@lovrabet/lovrabet-cli 2.0.13-beta.6 → 2.0.13-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/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/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/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/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -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/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_0x27d913=a0_0x246d;(function(_0x59b6aa,_0x1aed42){const _0x2e800e=a0_0x246d,_0xb62ef2=_0x59b6aa();while(!![]){try{const _0x4d7fe2=parseInt(_0x2e800e(0x118))/0x1+parseInt(_0x2e800e(0x12a))/0x2*(parseInt(_0x2e800e(0x12c))/0x3)+parseInt(_0x2e800e(0x11d))/0x4+parseInt(_0x2e800e(0x123))/0x5*(-parseInt(_0x2e800e(0x12e))/0x6)+-parseInt(_0x2e800e(0x11e))/0x7*(-parseInt(_0x2e800e(0x133))/0x8)+-parseInt(_0x2e800e(0x139))/0x9+-parseInt(_0x2e800e(0x11f))/0xa*(-parseInt(_0x2e800e(0x127))/0xb);if(_0x4d7fe2===_0x1aed42)break;else _0xb62ef2['push'](_0xb62ef2['shift']());}catch(_0x5136fc){_0xb62ef2['push'](_0xb62ef2['shift']());}}}(a0_0x2f68,0xb940d));import{jsx as a0_0x4c1222}from'react/jsx-runtime';import a0_0x18d46b 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{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';function a0_0x246d(_0x578734,_0x56cfe4){_0x578734=_0x578734-0x118;const _0x2f6838=a0_0x2f68();let _0x246d7d=_0x2f6838[_0x578734];return _0x246d7d;}function a0_0x2f68(){const _0x5a03ed=['301NpHoQQ','782410CRebQl','length','Error:\x20','code','22245gYTdRM','flags','name','unknownCommand','88FfTWAK','hint','defaultCommand','731684yYvAVB','catch','3HoiRiw','input','204FPPIiy','log',':\x20--','[preparse]\x20','ERR_STREAM_DESTROYED','69152mHaFIr','\x20->\x20--','error','corrected','stderr','assign','6184062MhxQQl','handler','\x0aCancelled.\x0a','slice','args','write','help','165434WSRnvl','exit','cancelled','flatMap','./framework/preparse.js','273140GUqYxB'];a0_0x2f68=function(){return _0x5a03ed;};return a0_0x2f68();}const helpText=generateFullHelp(),cli=a0_0x18d46b(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0x27d913(0x12b)](handleError);async function main(){try{await run();}catch(_0x44b92a){handleError(_0x44b92a);}}async function run(){const _0x437a8c=a0_0x27d913;let _0x34bc02=cli[_0x437a8c(0x12d)][0x0],_0x30d97b=cli['input'][0x1];const _0x3acd25=cli[_0x437a8c(0x124)];try{const {correctFlags:_0x1dbb88}=await import(_0x437a8c(0x11c)),_0x3f34b3=getAllDefinitions()[_0x437a8c(0x11b)](_0x5e4e3f=>_0x5e4e3f[_0x437a8c(0x124)]??[]),{flags:_0x3157ef,corrections:_0x4ef944}=_0x1dbb88(_0x3acd25,_0x3f34b3);if(_0x4ef944[_0x437a8c(0x120)]>0x0){for(const _0x515982 of _0x4ef944){process[_0x437a8c(0x137)][_0x437a8c(0x13e)](_0x437a8c(0x131)+_0x515982[_0x437a8c(0x13a)]+_0x437a8c(0x130)+_0x515982['original']+_0x437a8c(0x134)+_0x515982[_0x437a8c(0x136)]+'\x0a');}Object[_0x437a8c(0x138)](_0x3acd25,_0x3157ef);}}catch{}if(!_0x34bc02||!isKnownService(_0x34bc02)){const {waitUntilExit:_0x426120}=render(a0_0x4c1222(Help,{}));await _0x426120();return;}const _0x3e5d2b=getServiceEntry(_0x34bc02);if(!_0x30d97b){if(_0x3acd25['help']){console[_0x437a8c(0x12f)](generateServiceHelp(_0x34bc02));return;}if(_0x3e5d2b[_0x437a8c(0x129)])_0x30d97b=_0x3e5d2b[_0x437a8c(0x129)];else{console[_0x437a8c(0x12f)](generateServiceHelp(_0x34bc02));return;}}const _0x3caf3c=findDefinition(_0x34bc02,_0x30d97b);!_0x3caf3c&&(console[_0x437a8c(0x12f)](generateServiceHelp(_0x34bc02)),handleError(CliErrors[_0x437a8c(0x126)](_0x34bc02+'\x20'+_0x30d97b)));if(_0x3acd25[_0x437a8c(0x13f)]){console[_0x437a8c(0x12f)](generateCommandHelp(_0x3caf3c));return;}const _0x1ae2b0=buildConfigFromFlags(_0x3acd25);await initGlobalEnvironment(_0x1ae2b0);const _0x56caec=createPipelineEnv(_0x1ae2b0,_0x3acd25);_0x56caec[_0x437a8c(0x13d)]=cli[_0x437a8c(0x12d)][_0x437a8c(0x13c)](0x2),await runCommand(_0x3caf3c,_0x56caec);}function handleError(_0x44ade6){const _0x2d60ed=a0_0x27d913;if(_0x44ade6 instanceof CliError){_0x44ade6[_0x2d60ed(0x122)]===_0x2d60ed(0x11a)&&(process[_0x2d60ed(0x137)][_0x2d60ed(0x13e)](_0x2d60ed(0x13b)),process[_0x2d60ed(0x119)](0x0));console[_0x2d60ed(0x135)](_0x2d60ed(0x121)+_0x44ade6['message']);if(_0x44ade6[_0x2d60ed(0x128)])console[_0x2d60ed(0x135)]('Hint:\x20'+_0x44ade6[_0x2d60ed(0x128)]);process['exit'](_0x44ade6['exitCode']);}isUserCancellation(_0x44ade6)&&(process[_0x2d60ed(0x137)][_0x2d60ed(0x13e)]('\x0aCancelled.\x0a'),process[_0x2d60ed(0x119)](0x0)),console['error']('Unexpected\x20error:',_0x44ade6),process['exit'](0x1);}function isUserCancellation(_0x445324){const _0x257698=a0_0x27d913;if(!(_0x445324 instanceof Error))return![];if(_0x445324[_0x257698(0x125)]==='ExitPromptError')return!![];if(_0x445324[_0x257698(0x122)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x445324[_0x257698(0x122)]===_0x257698(0x132))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a1_0xb5d83b=a1_0x4587;(function(_0x1c2b52,_0x1f8e15){const _0x29e015=a1_0x4587,_0x4643b1=_0x1c2b52();while(!![]){try{const _0x291c14=parseInt(_0x29e015(0x21e))/0x1*(-parseInt(_0x29e015(0x1bc))/0x2)+-parseInt(_0x29e015(0x1eb))/0x3+-parseInt(_0x29e015(0x1ce))/0x4+-parseInt(_0x29e015(0x1cc))/0x5+-parseInt(_0x29e015(0x1db))/0x6*(-parseInt(_0x29e015(0x1c6))/0x7)+-parseInt(_0x29e015(0x1c3))/0x8*(-parseInt(_0x29e015(0x210))/0x9)+-parseInt(_0x29e015(0x1ff))/0xa*(-parseInt(_0x29e015(0x1c5))/0xb);if(_0x291c14===_0x1f8e15)break;else _0x4643b1['push'](_0x4643b1['shift']());}catch(_0x48888a){_0x4643b1['push'](_0x4643b1['shift']());}}}(a1_0x2e49,0xb24b7));function a1_0x4587(_0x30888e,_0x902cee){_0x30888e=_0x30888e-0x1b9;const _0x2e4957=a1_0x2e49();let _0x4587c0=_0x2e4957[_0x30888e];return _0x4587c0;}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0xb5d83b(0x22f),'type':a1_0xb5d83b(0x1e8),'description':a1_0xb5d83b(0x21a)},KEYWORD_FLAG={'name':'keyword','type':'string','description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0xb5d83b(0x22c),'type':a1_0xb5d83b(0x1e8),'required':!![],'description':a1_0xb5d83b(0x1fe)},DOCS=[{'code':'dataset_list','category':'dataset','title':'List\x20datasets','method':a1_0xb5d83b(0x1ee),'path':a1_0xb5d83b(0x1d2),'summary':'分页获取数据集列表','whenToUse':a1_0xb5d83b(0x1e6),'pathParams':[],'queryParams':[],'bodySchema':a1_0xb5d83b(0x1dd),'responseHighlights':['tableData\x20contains\x20dataset\x20id/code/name',a1_0xb5d83b(0x21b)],'examples':[a1_0xb5d83b(0x227)],'notes':[a1_0xb5d83b(0x221)],'markdown':['##\x20List\x20datasets','','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0xb5d83b(0x1d9)]('\x0a')},{'code':a1_0xb5d83b(0x228),'category':a1_0xb5d83b(0x1da),'title':a1_0xb5d83b(0x201),'method':a1_0xb5d83b(0x1dc),'path':'/api/dataset/getOneByCode?code={datasetCode}','summary':a1_0xb5d83b(0x20c),'whenToUse':'需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','pathParams':[],'queryParams':[{'name':'code','description':a1_0xb5d83b(0x211)}],'bodySchema':a1_0xb5d83b(0x1fc),'responseHighlights':['fields/properties\x20describe\x20data\x20shape',a1_0xb5d83b(0x219)],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':['##\x20Dataset\x20detail','',a1_0xb5d83b(0x1cb)]['join']('\x0a')},{'code':'dataset_data_filter','category':a1_0xb5d83b(0x1da),'title':a1_0xb5d83b(0x217),'method':'POST','path':a1_0xb5d83b(0x1d6),'summary':a1_0xb5d83b(0x1c2),'whenToUse':a1_0xb5d83b(0x1be),'pathParams':[{'name':a1_0xb5d83b(0x22b),'description':a1_0xb5d83b(0x1e9)},{'name':a1_0xb5d83b(0x205),'description':a1_0xb5d83b(0x211)}],'queryParams':[],'bodySchema':a1_0xb5d83b(0x1d3),'responseHighlights':[a1_0xb5d83b(0x218),a1_0xb5d83b(0x1fd)],'examples':[a1_0xb5d83b(0x1d5)],'notes':[a1_0xb5d83b(0x1bd)],'markdown':[a1_0xb5d83b(0x1bb),'',a1_0xb5d83b(0x1f6)][a1_0xb5d83b(0x1d9)]('\x0a')},{'code':a1_0xb5d83b(0x1ba),'category':a1_0xb5d83b(0x1da),'title':a1_0xb5d83b(0x20d),'method':'POST','path':a1_0xb5d83b(0x216),'summary':a1_0xb5d83b(0x1ef),'whenToUse':a1_0xb5d83b(0x1c7),'pathParams':[{'name':a1_0xb5d83b(0x22b),'description':a1_0xb5d83b(0x1e9)},{'name':a1_0xb5d83b(0x205),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0xb5d83b(0x20a),'responseHighlights':[a1_0xb5d83b(0x222),'where\x20filters\x20before\x20aggregation'],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':[a1_0xb5d83b(0x22e)],'markdown':[a1_0xb5d83b(0x229),'',a1_0xb5d83b(0x1e4)]['join']('\x0a')},{'code':a1_0xb5d83b(0x1d1),'category':a1_0xb5d83b(0x1da),'title':a1_0xb5d83b(0x1f4),'method':a1_0xb5d83b(0x1ee),'path':a1_0xb5d83b(0x204),'summary':a1_0xb5d83b(0x1fb),'whenToUse':'已经知道记录\x20id,需要按数据集读取单条业务数据时使用','pathParams':[{'name':'appCode','description':a1_0xb5d83b(0x1e9)},{'name':a1_0xb5d83b(0x205),'description':a1_0xb5d83b(0x211)}],'queryParams':[],'bodySchema':a1_0xb5d83b(0x1f3),'responseHighlights':[a1_0xb5d83b(0x1e7)],'examples':[a1_0xb5d83b(0x1ea)],'notes':[a1_0xb5d83b(0x1fa)],'markdown':a1_0xb5d83b(0x22a)},{'code':a1_0xb5d83b(0x1b9),'category':a1_0xb5d83b(0x1da),'title':a1_0xb5d83b(0x1bf),'method':a1_0xb5d83b(0x1ee),'path':a1_0xb5d83b(0x1f9),'summary':a1_0xb5d83b(0x203),'whenToUse':a1_0xb5d83b(0x223),'pathParams':[{'name':a1_0xb5d83b(0x22b),'description':a1_0xb5d83b(0x1e9)},{'name':a1_0xb5d83b(0x205),'description':a1_0xb5d83b(0x211)}],'queryParams':[],'bodySchema':a1_0xb5d83b(0x1c0),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':[a1_0xb5d83b(0x215)],'notes':[a1_0xb5d83b(0x207)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':a1_0xb5d83b(0x1f0),'category':'bf','title':a1_0xb5d83b(0x213),'method':a1_0xb5d83b(0x1dc),'path':'/api/endpoint/{appCode}/functions','summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':a1_0xb5d83b(0x20e),'pathParams':[{'name':a1_0xb5d83b(0x22b),'description':a1_0xb5d83b(0x1e9)}],'queryParams':[],'bodySchema':'None','responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':[a1_0xb5d83b(0x209)],'markdown':a1_0xb5d83b(0x1e1)},{'code':'bf_execute','category':'bf','title':a1_0xb5d83b(0x1c4),'method':'POST','path':a1_0xb5d83b(0x1d4),'summary':a1_0xb5d83b(0x224),'whenToUse':a1_0xb5d83b(0x1c1),'pathParams':[{'name':a1_0xb5d83b(0x22b),'description':'Current\x20app\x20code'},{'name':a1_0xb5d83b(0x225),'description':'Endpoint\x20function\x20name'}],'queryParams':[],'bodySchema':a1_0xb5d83b(0x202),'responseHighlights':[a1_0xb5d83b(0x1e5)],'examples':[a1_0xb5d83b(0x212)],'notes':[a1_0xb5d83b(0x1f2)],'markdown':a1_0xb5d83b(0x206)},{'code':a1_0xb5d83b(0x1ca),'category':a1_0xb5d83b(0x1f5),'title':a1_0xb5d83b(0x214),'method':a1_0xb5d83b(0x1ee),'path':'/api/custom/executeSql','summary':a1_0xb5d83b(0x1e2),'whenToUse':a1_0xb5d83b(0x1df),'pathParams':[],'queryParams':[],'bodySchema':a1_0xb5d83b(0x1d8),'responseHighlights':[a1_0xb5d83b(0x1f8)],'examples':[a1_0xb5d83b(0x220)],'notes':[a1_0xb5d83b(0x1cf)],'markdown':a1_0xb5d83b(0x200)}];function entrySummary(_0x443d2d){const _0x2f4786=a1_0xb5d83b;return{'code':_0x443d2d[_0x2f4786(0x22c)],'category':_0x443d2d[_0x2f4786(0x22f)],'method':_0x443d2d[_0x2f4786(0x21c)],'path':_0x443d2d['path'],'summary':_0x443d2d[_0x2f4786(0x1ec)],'whenToUse':_0x443d2d[_0x2f4786(0x208)]};}export function listApiDocEntries(_0x2291b2={}){const _0x265407=a1_0xb5d83b,_0x3c19b9=String(_0x2291b2[_0x265407(0x22f)]||'')['trim'](),_0x29b874=String(_0x2291b2[_0x265407(0x1c9)]||'')[_0x265407(0x21d)]()['toLowerCase']();return DOCS[_0x265407(0x22d)](_0x419b39=>{const _0x2f5a89=_0x265407;if(_0x3c19b9&&_0x419b39['category']!==_0x3c19b9)return![];if(!_0x29b874)return!![];return[_0x419b39[_0x2f5a89(0x22c)],_0x419b39['category'],_0x419b39[_0x2f5a89(0x21c)],_0x419b39[_0x2f5a89(0x20f)],_0x419b39[_0x2f5a89(0x1ec)],_0x419b39[_0x2f5a89(0x208)],_0x419b39[_0x2f5a89(0x1ed)]]['join']('\x20')[_0x2f5a89(0x1cd)]()[_0x2f5a89(0x226)](_0x29b874);})[_0x265407(0x1de)](entrySummary);}export function getApiDocDetail(_0x109311){const _0x26b272=a1_0xb5d83b,_0x116c57=DOCS[_0x26b272(0x1c8)](_0x489da0=>_0x489da0[_0x26b272(0x22c)]===_0x109311);if(!_0x116c57)throw CliErrors[_0x26b272(0x1e3)](_0x26b272(0x1d7)+_0x109311);return{..._0x116c57};}const apiDocList={'service':a1_0xb5d83b(0x1f7),'command':'list','description':a1_0xb5d83b(0x1f1),'risk':a1_0xb5d83b(0x20b),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x41f823){const _0x22215a=a1_0xb5d83b,_0x1bda94=listApiDocEntries({'category':_0x41f823[_0x22215a(0x1e0)](_0x22215a(0x22f)),'keyword':_0x41f823[_0x22215a(0x1e0)]('keyword')});return{'ok':!![],'data':{'total':_0x1bda94[_0x22215a(0x1d0)],'items':_0x1bda94}};}},apiDocDetail={'service':a1_0xb5d83b(0x1f7),'command':a1_0xb5d83b(0x21f),'description':'Show\x20runtime\x20API\x20documentation\x20by\x20code','risk':a1_0xb5d83b(0x20b),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x38c86f){const _0x8a334f=a1_0xb5d83b;return{'ok':!![],'data':getApiDocDetail(_0x38c86f[_0x8a334f(0x1e0)](_0x8a334f(0x22c)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];function a1_0x2e49(){const _0x51e6c3=['30UJbxwA','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Dataset\x20detail','{\x22param\x22:\x22value\x22}','创建数据','/api/{appCode}/{datasetCode}/getOne','datasetCode','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','whenToUse','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','read','获取数据集详情','Aggregate\x20dataset\x20data','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','path','3402gPLrJi','32-character\x20dataset\x20code','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','List\x20BF\x20endpoint\x20functions','Execute\x20custom\x20SQL','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','/api/{appCode}/{datasetCode}/aggregate','Filter\x20dataset\x20data','tableData\x20contains\x20records','operations\x20describes\x20runtime\x20APIs','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','paging.totalCount\x20gives\x20total\x20rows','method','trim','102037hzDRUi','detail','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','result\x20rows\x20contain\x20aggregate\x20aliases','需要向指定数据集新增一条业务数据时使用','执行指定\x20BF\x20函数','scriptName','includes','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','dataset_detail','##\x20Aggregate\x20dataset\x20data','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','appCode','code','filter','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','category','dataset_data_create','dataset_data_aggregate','##\x20Filter\x20dataset\x20data','20pCJiMv','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','Create\x20dataset\x20record','{\x22fieldName\x22:\x22value\x22}','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','条件过滤查询数据','15872HxCkXc','Execute\x20BF\x20endpoint\x20function','8570782sNYISz','1418438YowQiV','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','find','keyword','custom_sql_execute','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','2088685ovFJrn','toLowerCase','3679588ACiaLI','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','length','dataset_data_get_one','/api/dataset/get-dataset-list-by-app-code','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','/api/endpoint/{appCode}/{scriptName}','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','/api/{appCode}/{datasetCode}/filter','API\x20doc\x20code\x20not\x20found:\x20','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','join','dataset','42NWcORz','GET','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','map','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','str','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','执行自定义\x20SQL','validation','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','Returns\x20script\x20business\x20payload','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','Returns\x20one\x20matching\x20business\x20record','string','Current\x20app\x20code','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','4252731SXyfzW','summary','title','POST','聚合查询数据集数据','bf_function_list','List\x20available\x20runtime\x20API\x20documentation\x20entries','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','{\x22id\x22:123}','Get\x20one\x20dataset\x20record','custom_sql','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','api-doc','Returns\x20SQL\x20execution\x20payload','/api/{appCode}/{datasetCode}/create','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','查询单条数据','None','paging\x20contains\x20pagination','API\x20doc\x20code,\x20for\x20example\x20dataset_list'];a1_0x2e49=function(){return _0x51e6c3;};return a1_0x2e49();}
|
|
1
|
+
const a1_0x4d685c=a1_0x2a2d;(function(_0x86befa,_0xfe5329){const _0x4e9a40=a1_0x2a2d,_0x5e17e7=_0x86befa();while(!![]){try{const _0x3a8c63=-parseInt(_0x4e9a40(0x180))/0x1+parseInt(_0x4e9a40(0x16e))/0x2+parseInt(_0x4e9a40(0x19e))/0x3*(parseInt(_0x4e9a40(0x15a))/0x4)+parseInt(_0x4e9a40(0x15c))/0x5+parseInt(_0x4e9a40(0x17e))/0x6+-parseInt(_0x4e9a40(0x18d))/0x7*(parseInt(_0x4e9a40(0x150))/0x8)+parseInt(_0x4e9a40(0x13e))/0x9*(-parseInt(_0x4e9a40(0x1a2))/0xa);if(_0x3a8c63===_0xfe5329)break;else _0x5e17e7['push'](_0x5e17e7['shift']());}catch(_0x26f60c){_0x5e17e7['push'](_0x5e17e7['shift']());}}}(a1_0x5f19,0xf09ae));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x4d685c(0x19b),'type':a1_0x4d685c(0x145),'description':a1_0x4d685c(0x190)},KEYWORD_FLAG={'name':a1_0x4d685c(0x141),'type':a1_0x4d685c(0x145),'description':a1_0x4d685c(0x16a)},DOC_CODE_FLAG={'name':a1_0x4d685c(0x187),'type':a1_0x4d685c(0x145),'required':!![],'description':a1_0x4d685c(0x139)},DOCS=[{'code':'dataset_list','category':a1_0x4d685c(0x191),'title':a1_0x4d685c(0x169),'method':a1_0x4d685c(0x185),'path':'/api/dataset/get-dataset-list-by-app-code','summary':'分页获取数据集列表','whenToUse':a1_0x4d685c(0x153),'pathParams':[],'queryParams':[],'bodySchema':a1_0x4d685c(0x19a),'responseHighlights':[a1_0x4d685c(0x155),a1_0x4d685c(0x1a6)],'examples':[a1_0x4d685c(0x19c)],'notes':[a1_0x4d685c(0x1a5)],'markdown':[a1_0x4d685c(0x165),'',a1_0x4d685c(0x15b)][a1_0x4d685c(0x17d)]('\x0a')},{'code':a1_0x4d685c(0x147),'category':a1_0x4d685c(0x191),'title':a1_0x4d685c(0x14c),'method':a1_0x4d685c(0x199),'path':a1_0x4d685c(0x17f),'summary':'获取数据集详情','whenToUse':a1_0x4d685c(0x192),'pathParams':[],'queryParams':[{'name':a1_0x4d685c(0x187),'description':a1_0x4d685c(0x174)}],'bodySchema':a1_0x4d685c(0x15e),'responseHighlights':[a1_0x4d685c(0x179),'operations\x20describes\x20runtime\x20APIs'],'examples':[a1_0x4d685c(0x140)],'notes':['If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.'],'markdown':['##\x20Dataset\x20detail','','Inspect\x20field\x20names\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x4d685c(0x17d)]('\x0a')},{'code':a1_0x4d685c(0x183),'category':a1_0x4d685c(0x191),'title':a1_0x4d685c(0x17c),'method':'POST','path':'/api/{appCode}/{datasetCode}/filter','summary':'条件过滤查询数据','whenToUse':a1_0x4d685c(0x16f),'pathParams':[{'name':a1_0x4d685c(0x171),'description':a1_0x4d685c(0x16d)},{'name':a1_0x4d685c(0x156),'description':a1_0x4d685c(0x174)}],'queryParams':[],'bodySchema':a1_0x4d685c(0x18a),'responseHighlights':[a1_0x4d685c(0x152),a1_0x4d685c(0x157)],'examples':[a1_0x4d685c(0x1a9)],'notes':['Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.'],'markdown':[a1_0x4d685c(0x18e),'',a1_0x4d685c(0x1a8)][a1_0x4d685c(0x17d)]('\x0a')},{'code':a1_0x4d685c(0x17a),'category':'dataset','title':a1_0x4d685c(0x181),'method':a1_0x4d685c(0x185),'path':a1_0x4d685c(0x151),'summary':'聚合查询数据集数据','whenToUse':a1_0x4d685c(0x18b),'pathParams':[{'name':a1_0x4d685c(0x171),'description':a1_0x4d685c(0x16d)},{'name':a1_0x4d685c(0x156),'description':a1_0x4d685c(0x174)}],'queryParams':[],'bodySchema':a1_0x4d685c(0x15d),'responseHighlights':[a1_0x4d685c(0x176),a1_0x4d685c(0x14b)],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':[a1_0x4d685c(0x16c)],'markdown':[a1_0x4d685c(0x146),'',a1_0x4d685c(0x193)]['join']('\x0a')},{'code':a1_0x4d685c(0x173),'category':'dataset','title':a1_0x4d685c(0x14d),'method':a1_0x4d685c(0x185),'path':a1_0x4d685c(0x175),'summary':a1_0x4d685c(0x18f),'whenToUse':a1_0x4d685c(0x13d),'pathParams':[{'name':a1_0x4d685c(0x171),'description':'Current\x20app\x20code'},{'name':a1_0x4d685c(0x156),'description':a1_0x4d685c(0x174)}],'queryParams':[],'bodySchema':a1_0x4d685c(0x168),'responseHighlights':[a1_0x4d685c(0x178)],'examples':[a1_0x4d685c(0x170)],'notes':[a1_0x4d685c(0x16b)],'markdown':a1_0x4d685c(0x188)},{'code':a1_0x4d685c(0x1a7),'category':a1_0x4d685c(0x191),'title':a1_0x4d685c(0x148),'method':'POST','path':a1_0x4d685c(0x167),'summary':a1_0x4d685c(0x14e),'whenToUse':a1_0x4d685c(0x186),'pathParams':[{'name':a1_0x4d685c(0x171),'description':a1_0x4d685c(0x16d)},{'name':a1_0x4d685c(0x156),'description':a1_0x4d685c(0x174)}],'queryParams':[],'bodySchema':a1_0x4d685c(0x159),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':[a1_0x4d685c(0x1a4)],'notes':[a1_0x4d685c(0x196)],'markdown':a1_0x4d685c(0x189)},{'code':'bf_function_list','category':'bf','title':'List\x20BF\x20endpoint\x20functions','method':'GET','path':'/api/endpoint/{appCode}/functions','summary':a1_0x4d685c(0x15f),'whenToUse':a1_0x4d685c(0x195),'pathParams':[{'name':a1_0x4d685c(0x171),'description':a1_0x4d685c(0x16d)}],'queryParams':[],'bodySchema':a1_0x4d685c(0x15e),'responseHighlights':[a1_0x4d685c(0x163)],'examples':[a1_0x4d685c(0x142)],'notes':['CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.'],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x4d685c(0x1a1),'category':'bf','title':a1_0x4d685c(0x13b),'method':'POST','path':a1_0x4d685c(0x1a0),'summary':a1_0x4d685c(0x177),'whenToUse':a1_0x4d685c(0x13a),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x4d685c(0x13f),'description':a1_0x4d685c(0x1aa)}],'queryParams':[],'bodySchema':a1_0x4d685c(0x14a),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x4d685c(0x194)],'notes':[a1_0x4d685c(0x162)],'markdown':'##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.'},{'code':'custom_sql_execute','category':a1_0x4d685c(0x197),'title':a1_0x4d685c(0x198),'method':a1_0x4d685c(0x185),'path':a1_0x4d685c(0x138),'summary':a1_0x4d685c(0x149),'whenToUse':'已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','pathParams':[],'queryParams':[],'bodySchema':a1_0x4d685c(0x13c),'responseHighlights':[a1_0x4d685c(0x1a3)],'examples':[a1_0x4d685c(0x14f)],'notes':[a1_0x4d685c(0x182)],'markdown':'##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.'}];function a1_0x5f19(){const _0x24c7c7=['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','filter','9OGUMTm','method','/api/endpoint/{appCode}/{scriptName}','bf_execute','23821970gyJzEh','Returns\x20SQL\x20execution\x20payload','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','paging.totalCount\x20gives\x20total\x20rows','dataset_data_create','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','Endpoint\x20function\x20name','/api/custom/executeSql','API\x20doc\x20code,\x20for\x20example\x20dataset_list','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','Execute\x20BF\x20endpoint\x20function','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','9ViwVnt','scriptName','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','keyword','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','summary','str','string','##\x20Aggregate\x20dataset\x20data','dataset_detail','Create\x20dataset\x20record','执行自定义\x20SQL','{\x22param\x22:\x22value\x22}','where\x20filters\x20before\x20aggregation','Dataset\x20detail','Get\x20one\x20dataset\x20record','创建数据','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','161608gAcnsI','/api/{appCode}/{datasetCode}/aggregate','tableData\x20contains\x20records','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','trim','tableData\x20contains\x20dataset\x20id/code/name','datasetCode','paging\x20contains\x20pagination','whenToUse','{\x22fieldName\x22:\x22value\x22}','1385844aecqsa','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','4344800wpERpi','{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','None','获取应用下可调用的\x20BF\x20函数列表','toLowerCase','api-doc','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Returns\x20endpoint\x20functionName/id/description','path','##\x20List\x20datasets','map','/api/{appCode}/{datasetCode}/create','{\x22id\x22:123}','List\x20datasets','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','Current\x20app\x20code','3361186huoUBr','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','appCode','read','dataset_data_get_one','32-character\x20dataset\x20code','/api/{appCode}/{datasetCode}/getOne','result\x20rows\x20contain\x20aggregate\x20aliases','执行指定\x20BF\x20函数','Returns\x20one\x20matching\x20business\x20record','fields/properties\x20describe\x20data\x20shape','dataset_data_aggregate','List\x20available\x20runtime\x20API\x20documentation\x20entries','Filter\x20dataset\x20data','join','11618832PcoXDi','/api/dataset/getOneByCode?code={datasetCode}','218397fHoezN','Aggregate\x20dataset\x20data','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','dataset_data_filter','Show\x20runtime\x20API\x20documentation\x20by\x20code','POST','需要向指定数据集新增一条业务数据时使用','code','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','includes','672MmrzvU','##\x20Filter\x20dataset\x20data','查询单条数据','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','dataset','需要按数据集\x20code\x20获取字段、表信息或操作定义时使用','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','custom_sql','Execute\x20custom\x20SQL','GET','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','category'];a1_0x5f19=function(){return _0x24c7c7;};return a1_0x5f19();}function entrySummary(_0xa70c26){const _0x1bdf98=a1_0x4d685c;return{'code':_0xa70c26[_0x1bdf98(0x187)],'category':_0xa70c26[_0x1bdf98(0x19b)],'method':_0xa70c26[_0x1bdf98(0x19f)],'path':_0xa70c26['path'],'summary':_0xa70c26[_0x1bdf98(0x143)],'whenToUse':_0xa70c26[_0x1bdf98(0x158)]};}function a1_0x2a2d(_0x2bbf51,_0x35a7d6){_0x2bbf51=_0x2bbf51-0x138;const _0x5f1994=a1_0x5f19();let _0x2a2df5=_0x5f1994[_0x2bbf51];return _0x2a2df5;}export function listApiDocEntries(_0x2efda0={}){const _0x35f75f=a1_0x4d685c,_0x44bf51=String(_0x2efda0[_0x35f75f(0x19b)]||'')['trim'](),_0x334bda=String(_0x2efda0[_0x35f75f(0x141)]||'')[_0x35f75f(0x154)]()[_0x35f75f(0x160)]();return DOCS[_0x35f75f(0x19d)](_0x3f5624=>{const _0x56a62f=_0x35f75f;if(_0x44bf51&&_0x3f5624[_0x56a62f(0x19b)]!==_0x44bf51)return![];if(!_0x334bda)return!![];return[_0x3f5624[_0x56a62f(0x187)],_0x3f5624[_0x56a62f(0x19b)],_0x3f5624[_0x56a62f(0x19f)],_0x3f5624[_0x56a62f(0x164)],_0x3f5624[_0x56a62f(0x143)],_0x3f5624[_0x56a62f(0x158)],_0x3f5624['title']][_0x56a62f(0x17d)]('\x20')['toLowerCase']()[_0x56a62f(0x18c)](_0x334bda);})[_0x35f75f(0x166)](entrySummary);}export function getApiDocDetail(_0x14397b){const _0x3d06f7=a1_0x4d685c,_0x4adabd=DOCS['find'](_0x13df1e=>_0x13df1e[_0x3d06f7(0x187)]===_0x14397b);if(!_0x4adabd)throw CliErrors['validation']('API\x20doc\x20code\x20not\x20found:\x20'+_0x14397b);return{..._0x4adabd};}const apiDocList={'service':a1_0x4d685c(0x161),'command':'list','description':a1_0x4d685c(0x17b),'risk':a1_0x4d685c(0x172),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x30a586){const _0x46f52c=a1_0x4d685c,_0x59af27=listApiDocEntries({'category':_0x30a586[_0x46f52c(0x144)](_0x46f52c(0x19b)),'keyword':_0x30a586['str'](_0x46f52c(0x141))});return{'ok':!![],'data':{'total':_0x59af27['length'],'items':_0x59af27}};}},apiDocDetail={'service':a1_0x4d685c(0x161),'command':'detail','description':a1_0x4d685c(0x184),'risk':a1_0x4d685c(0x172),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x3d7a7f){const _0x2a2788=a1_0x4d685c;return{'ok':!![],'data':getApiDocDetail(_0x3d7a7f['str'](_0x2a2788(0x187)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x87d546,_0x273250){const _0x2b18c3=a2_0x55de,_0x740764=_0x87d546();while(!![]){try{const _0x1298ec=parseInt(_0x2b18c3(0x13c))/0x1+parseInt(_0x2b18c3(0x127))/0x2+parseInt(_0x2b18c3(0x12f))/0x3+-parseInt(_0x2b18c3(0x12a))/0x4+-parseInt(_0x2b18c3(0x130))/0x5+parseInt(_0x2b18c3(0x13d))/0x6+-parseInt(_0x2b18c3(0x128))/0x7;if(_0x1298ec===_0x273250)break;else _0x740764['push'](_0x740764['shift']());}catch(_0xfe810b){_0x740764['push'](_0x740764['shift']());}}}(a2_0x4eca,0xd3a1a));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x43db4c){const _0x1408cc=a2_0x55de,_0x178a28=_0x43db4c['trim'](),_0x589c96=_0x178a28['slice'](-0x6)||_0x1408cc(0x138),_0x47613c=createHash(_0x1408cc(0x129))[_0x1408cc(0x12e)](_0x178a28)[_0x1408cc(0x132)](_0x1408cc(0x12c))[_0x1408cc(0x139)](0x0,0xc);return _0x1408cc(0x135)+_0x589c96+'_'+_0x47613c;}export function getAppCacheFilePath(_0x1143ce,_0x4b88ed){const _0x2a08b8=a2_0x55de;return resolve(homedir(),PRODUCT_CONFIG[_0x2a08b8(0x134)],'cache',_0x1143ce,fingerprintAccessKey(_0x4b88ed),_0x2a08b8(0x133));}export function readCachedAppList(_0x2e929d,_0x13f0db){const _0x4d1656=a2_0x55de;if(!_0x13f0db?.[_0x4d1656(0x12b)]())return null;const _0x53cf74=getAppCacheFilePath(_0x2e929d,_0x13f0db);if(!existsSync(_0x53cf74))return null;try{const _0x1164e5=readFileSync(_0x53cf74,'utf8');if(!_0x1164e5[_0x4d1656(0x12b)]())return null;const _0xc203bf=JSON[_0x4d1656(0x13a)](_0x1164e5);if(!Array['isArray'](_0xc203bf['items']))return null;return _0xc203bf;}catch{return null;}}function a2_0x55de(_0x5a771e,_0x5df08e){_0x5a771e=_0x5a771e-0x127;const _0x4eca7e=a2_0x4eca();let _0x55de3f=_0x4eca7e[_0x5a771e];return _0x55de3f;}export function writeCachedAppList(_0x154ec4,_0x45874a,_0xe118e3){const _0x5950e5=a2_0x55de,_0x241367=getAppCacheFilePath(_0x154ec4,_0x45874a),_0x1bc72d=dirname(_0x241367);!existsSync(_0x1bc72d)&&mkdirSync(_0x1bc72d,{'recursive':!![]});const _0x128cd=_0x241367+'.tmp';try{writeFileSync(_0x128cd,JSON['stringify'](_0xe118e3,null,0x2)+'\x0a',{'encoding':_0x5950e5(0x137),'mode':0x180});try{renameSync(_0x128cd,_0x241367);}catch(_0x262164){if(_0x262164[_0x5950e5(0x13e)]===_0x5950e5(0x136)||_0x262164[_0x5950e5(0x13e)]==='EXDEV'||_0x262164['code']==='EACCES'){writeFileSync(_0x241367,JSON['stringify'](_0xe118e3,null,0x2)+'\x0a',{'encoding':_0x5950e5(0x137)});try{unlinkSync(_0x128cd);}catch{}}else throw _0x262164;}}catch(_0x2704f5){try{unlinkSync(_0x128cd);}catch{}throw _0x2704f5;}return _0x241367;}export function resolveCachedAppCode(_0x2ace5e,_0x629e94,_0x52cc5e){const _0x283c81=a2_0x55de;if(!_0x2ace5e)return undefined;const _0x42ada2=readCachedAppList(_0x629e94,_0x52cc5e),_0x1add10=_0x42ada2?.[_0x283c81(0x12d)][_0x283c81(0x131)](_0x5665d9=>_0x5665d9[_0x283c81(0x13b)]===_0x2ace5e);return _0x1add10?.['appCode']?.['trim']()||undefined;}function a2_0x4eca(){const _0x78ce1f=['items','update','2044347HqtNjM','4170895LDrazW','find','digest','my-apps.json','homeDirName','ak_','EPERM','utf8','unknown','slice','parse','appName','1064705lydkLc','2915862pGdpeP','code','3226134dxsZxc','4828579iHClgr','sha256','5817520GAxrxo','trim','hex'];a2_0x4eca=function(){return _0x78ce1f;};return a2_0x4eca();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0x4b1f40=a3_0x3a5b;(function(_0x390a8a,_0x59ea39){const _0x105b6d=a3_0x3a5b,_0x2d8a1b=_0x390a8a();while(!![]){try{const _0x14b7a1=-parseInt(_0x105b6d(0xbe))/0x1+-parseInt(_0x105b6d(0xd9))/0x2+-parseInt(_0x105b6d(0x95))/0x3+-parseInt(_0x105b6d(0xaf))/0x4+parseInt(_0x105b6d(0xa6))/0x5+parseInt(_0x105b6d(0xb1))/0x6*(-parseInt(_0x105b6d(0x98))/0x7)+-parseInt(_0x105b6d(0xd3))/0x8*(-parseInt(_0x105b6d(0xd5))/0x9);if(_0x14b7a1===_0x59ea39)break;else _0x2d8a1b['push'](_0x2d8a1b['shift']());}catch(_0x40e804){_0x2d8a1b['push'](_0x2d8a1b['shift']());}}}(a3_0x20f4,0x99673));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.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';function a3_0x20f4(){const _0x391062=['Missing\x20app\x20name.','init','local','config','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','nonInteractive','../../context.js','1173676LsgyMV','Usage:\x20','60366mSiITx','fetchedAt','pull','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Target\x20environment\x20(default:\x20current\x20env)','write','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','validation','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','../../commands/app/remote-source.js','items','\x20cached\x20app(s)\x20for\x20env=\x22','Loaded\x20','523934WDTkmE','name','read','\x22\x20not\x20found.','Read\x20from\x20local\x20cache\x20only','Remote\x20app\x20name\x20to\x20activate','cache','Use\x20`','projectPath','i18nInfo','.appcode\x20to\x20.lovrabet.json.','source','args','project-default','defaultApp','filter','enableI18n','str','newConfigFileName','map','Available\x20remote\x20apps:\x20','1016OzjSJY','app','265905xxObjb','globalPath','bool','mergedCli','1984594YYApMk','entries','appcode','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','Initialize\x20','\x20app\x20use\x20<name>\x20[--global]','accessKey','env','global','No\x20cached\x20apps\x20found.','from','production','2964918YXQWwE','boolean','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','280PkFgSa','Set\x20the\x20fallback\x20app\x20candidate','Default\x20app\x20candidate\x20set\x20to\x20\x22','raw','isArray','envName','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','appName','no-cache','Use\x20global\x20config\x20scope','remote','\x20config\x20file','string','Read\x20app\x20list\x20from\x20local\x20cache\x20only','382600LgvKpP','length'];a3_0x20f4=function(){return _0x391062;};return a3_0x20f4();}import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':'global','type':a3_0x4b1f40(0x96),'description':a3_0x4b1f40(0xa1),'default':![]};function collectFlags(_0x38e716,_0x543d4e){const _0x217b58=a3_0x4b1f40,_0x148ef3={};for(const _0x3d355d of _0x543d4e){const _0x374bb6=_0x3d355d['type']===_0x217b58(0x96)?_0x38e716[_0x217b58(0xd7)](_0x3d355d[_0x217b58(0xbf)]):_0x38e716['str'](_0x3d355d[_0x217b58(0xbf)]);if(_0x374bb6!==''&&_0x374bb6!==![])_0x148ef3[_0x3d355d['name']]=_0x374bb6;}if(_0x38e716[_0x217b58(0xad)])_0x148ef3[_0x217b58(0xad)]=!![];return _0x148ef3;}function normalizeLanguages(_0xbcf9ea){const _0x29c76d=a3_0x4b1f40;if(!Array[_0x29c76d(0x9c)](_0xbcf9ea))return[];return _0xbcf9ea[_0x29c76d(0xcd)](_0x41e846=>typeof _0x41e846===_0x29c76d(0xa4))[_0x29c76d(0xd1)](_0x381c54=>_0x381c54['trim']())[_0x29c76d(0xcd)](Boolean);}function buildRemoteAppI18nFields(_0x551adb){const _0x20c145=a3_0x4b1f40,_0x2c1c75=normalizeLanguages(_0x551adb[_0x20c145(0xc7)]?.['langs']);return{'enableI18n':typeof _0x551adb[_0x20c145(0xce)]===_0x20c145(0x96)?_0x551adb[_0x20c145(0xce)]:null,'languages':_0x2c1c75,'i18nInfo':_0x551adb[_0x20c145(0xc7)]?{..._0x551adb['i18nInfo'],'langs':_0x2c1c75['length']?_0x2c1c75:null}:null};}const initDef={'service':'app','command':a3_0x4b1f40(0xa9),'description':a3_0x4b1f40(0x8d)+PRODUCT_CONFIG[a3_0x4b1f40(0xd0)]+a3_0x4b1f40(0xa3),'risk':a3_0x4b1f40(0xb6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x1305a8){return await runInit(collectFlags(_0x1305a8,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x4b1f40(0xd4),'command':'list','description':a3_0x4b1f40(0xb7),'risk':a3_0x4b1f40(0xc0),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x4b1f40(0x90),'type':a3_0x4b1f40(0xa4),'description':a3_0x4b1f40(0xb4),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x4b1f40(0xaa),'type':a3_0x4b1f40(0x96),'description':a3_0x4b1f40(0xa5),'default':![]},{'name':a3_0x4b1f40(0xa0),'type':'boolean','description':a3_0x4b1f40(0xac),'default':![]}],async 'execute'(_0x3923ab){const _0x34985f=a3_0x4b1f40,_0x46dd7e=_0x3923ab[_0x34985f(0xcf)]('env')||_0x3923ab[_0x34985f(0x9d)]||getEnv()||_0x34985f(0x94),_0x545775=_0x3923ab['bool'](_0x34985f(0xaa)),_0x16ff7e=_0x3923ab[_0x34985f(0xd7)](_0x34985f(0xa0)),{readRawConfigWithLayers:_0x2f4438,resolveDefaultAppSource:_0x3a9790,getLocalAppAliases:_0x5f2d79}=await import(_0x34985f(0xae)),{getRemoteAppList:_0x43fc40}=await import('../../commands/app/remote-source.js'),{config:_0x406c98,layers:_0x3c86bd}=_0x2f4438(),_0x263288=_0x3a9790(_0x3c86bd),{defaultApp:_0x5000ce}=_0x406c98,_0x4d2502=await _0x43fc40({'env':_0x46dd7e,'accessKey':_0x3923ab[_0x34985f(0x8f)],'localOnly':_0x545775,'noCache':_0x16ff7e}),_0x4f0cd6=_0x4d2502[_0x34985f(0xbb)]['map'](_0x58293f=>{const _0x31f94c=_0x34985f;return{'name':_0x58293f['appName'],'appcode':_0x58293f['appCode'],'named':!![],'definedIn':_0x31f94c(0xa2),'isDefault':_0x58293f[_0x31f94c(0x9f)]===_0x5000ce,...buildAppProfileListFields(_0x46dd7e),...buildRemoteAppI18nFields(_0x58293f),'source':_0x4d2502[_0x31f94c(0xc9)],'owner':_0x58293f['appOwnerName']??null,'status':_0x58293f['appPublishStatus']??null,'cachedAt':_0x4d2502['fetchedAt']};}),_0x592dc6=_0x5f2d79(_0x406c98);let _0x1fa8a4=0x0;for(const [_0x50b1f6,_0x4ceaea]of Object[_0x34985f(0xda)](_0x592dc6)){const _0x1d3204=typeof _0x4ceaea[_0x34985f(0xdb)]==='string'?_0x4ceaea[_0x34985f(0xdb)]['trim']():'';if(!_0x1d3204)continue;_0x1fa8a4+=0x1,_0x4f0cd6['push']({'name':_0x50b1f6,'appcode':_0x1d3204,'named':!![],'definedIn':'local','isDefault':_0x50b1f6===_0x5000ce,...buildAppProfileListFields(_0x46dd7e),'source':_0x34985f(0xab),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x4f0cd6,_0x3923ab[_0x34985f(0xd8)]);if(_0x4f0cd6[_0x34985f(0xa7)]===0x0)return{'ok':!![],'data':[],'message':_0x4d2502[_0x34985f(0xc9)]==='cache'?_0x34985f(0x92):'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0x14b1ee=_0x4f0cd6['find'](_0x2c4a82=>_0x2c4a82['isCurrent']===!![]),_0x3e65bf=_0x5000ce??_0x14b1ee?.[_0x34985f(0xbf)]??null,_0x3bce03={'env':_0x46dd7e,'source':_0x4d2502[_0x34985f(0xc9)],'fetchedAt':_0x4d2502[_0x34985f(0xb2)],'cachePath':_0x4d2502['cachePath'],'globalPath':_0x3c86bd[_0x34985f(0xd6)]??null,'projectPath':_0x3c86bd[_0x34985f(0xc6)]??null,'defaultApp':_0x3e65bf,'defaultAppSource':_0x5000ce!=null?_0x263288:null,'localAliasCount':_0x1fa8a4};return{'ok':!![],'data':{'items':_0x4f0cd6,'meta':_0x3bce03}};}},pullDef={'service':a3_0x4b1f40(0xd4),'command':a3_0x4b1f40(0xb3),'description':a3_0x4b1f40(0xb9),'risk':a3_0x4b1f40(0xb6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x4b1f40(0x90),'type':a3_0x4b1f40(0xa4),'description':a3_0x4b1f40(0xb5),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x4b1f40(0xaa),'type':a3_0x4b1f40(0x96),'description':a3_0x4b1f40(0xc2),'default':![]},{'name':a3_0x4b1f40(0xa0),'type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x10d5be){const _0x2e2800=a3_0x4b1f40,_0x4f5a8e=_0x10d5be[_0x2e2800(0xcf)]('env')||_0x10d5be[_0x2e2800(0x9d)]||getEnv()||_0x2e2800(0x94),_0xeaeb0b=_0x10d5be[_0x2e2800(0xd7)](_0x2e2800(0xaa)),_0x5931f3=_0x10d5be[_0x2e2800(0xd7)](_0x2e2800(0xa0)),{getRemoteAppList:_0x2b98c7}=await import(_0x2e2800(0xba)),_0x380cf0=await _0x2b98c7({'env':_0x4f5a8e,'accessKey':_0x10d5be[_0x2e2800(0x8f)],'localOnly':_0xeaeb0b,'noCache':_0x5931f3});return{'ok':!![],'data':{'total':_0x380cf0[_0x2e2800(0xbb)][_0x2e2800(0xa7)],'env':_0x4f5a8e,'source':_0x380cf0['source'],'fetchedAt':_0x380cf0['fetchedAt'],'cachePath':_0x380cf0['cachePath']},'message':_0x380cf0[_0x2e2800(0xc9)]===_0x2e2800(0xc4)?_0x2e2800(0xbd)+_0x380cf0['items'][_0x2e2800(0xa7)]+_0x2e2800(0xbc)+_0x4f5a8e+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x380cf0[_0x2e2800(0xbb)][_0x2e2800(0xa7)]+'\x20app(s)\x20for\x20env=\x22'+_0x4f5a8e+'\x22.'};}},useDef={'service':a3_0x4b1f40(0xd4),'command':'use','description':a3_0x4b1f40(0x99),'risk':a3_0x4b1f40(0xb6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x4b1f40(0xbf),'description':a3_0x4b1f40(0xc3),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x3a353a){const _0x5156da=a3_0x4b1f40;if(!_0x3a353a['args'][0x0])throw CliErrors[_0x5156da(0xb8)](_0x5156da(0xa8),_0x5156da(0xb0)+CLI_BIN_NAME+_0x5156da(0x8e));},async 'execute'(_0x458a32){const _0x250ccd=a3_0x4b1f40,_0x423ea3=_0x458a32[_0x250ccd(0xca)][0x0];if(!_0x423ea3)throw CliErrors[_0x250ccd(0xb8)](_0x250ccd(0xa8),_0x250ccd(0xb0)+CLI_BIN_NAME+_0x250ccd(0x8e));const {buildConfigFromFlags:_0xb13aaa,resolveLocalAppAliasCode:_0x5ed8f1}=await import(_0x250ccd(0xae)),{readCachedAppList:_0x3c89e9}=await import('../../commands/app/cache.js'),_0x5c7df4=_0x458a32['str']('env'),_0x13df25=_0xb13aaa(_0x5c7df4?{'env':_0x5c7df4}:{}),_0x2d4e23=_0x3c89e9(_0x13df25['env'],_0x13df25[_0x250ccd(0x8f)]),_0x2fdecf=_0x2d4e23?.['items']['find'](_0x5c8e95=>_0x5c8e95[_0x250ccd(0x9f)]===_0x423ea3),_0x4fd12a=_0x5ed8f1(_0x13df25[_0x250ccd(0x9b)]??{},_0x423ea3);if(!_0x2fdecf&&!_0x4fd12a&&_0x13df25[_0x250ccd(0xcc)]!==_0x423ea3){const _0x45e8ba=[..._0x2d4e23?.[_0x250ccd(0xbb)][_0x250ccd(0xd1)](_0x2a076a=>_0x2a076a['appName'])??[]],_0x1f8ba1=_0x45e8ba['length']===0x0?_0x250ccd(0xc5)+CLI_BIN_NAME+_0x250ccd(0x9e)+_0x423ea3+_0x250ccd(0xc8):_0x250ccd(0xd2)+Array[_0x250ccd(0x93)](new Set(_0x45e8ba))['join'](',\x20')+_0x250ccd(0x97);throw CliErrors[_0x250ccd(0xb8)]('App\x20\x22'+_0x423ea3+_0x250ccd(0xc1),_0x1f8ba1);}const _0x3a50ec=_0x458a32[_0x250ccd(0xd7)](_0x250ccd(0x91));let _0x46f75f;if(_0x3a50ec)_0x46f75f={'global':!![]};else{const {isInProject:_0x3d1679}=await import(_0x250ccd(0xae)),_0x428f8f=_0x3d1679();_0x46f75f=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x250ccd(0xcb),'inProject':_0x428f8f}));}const _0x2086bd=readConfig(_0x46f75f);return _0x2086bd[_0x250ccd(0xcc)]=_0x423ea3,writeConfig(_0x2086bd,_0x46f75f),{'ok':!![],'message':_0x250ccd(0x9a)+_0x423ea3+'\x22'+scopeLabel(_0x46f75f)+'.'};}},importDef={'service':a3_0x4b1f40(0xd4),'command':'import','description':a3_0x4b1f40(0x8c),'risk':a3_0x4b1f40(0xb6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x11f23a){return await runInitImport(collectFlags(_0x11f23a,initImportFlagDefs)),{'ok':!![]};}};function a3_0x3a5b(_0x532e8d,_0x4e89a5){_0x532e8d=_0x532e8d-0x8c;const _0x20f45b=a3_0x20f4();let _0x3a5b24=_0x20f45b[_0x532e8d];return _0x3a5b24;}export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a3_0x5eb44c=a3_0x399d;(function(_0x89a365,_0xf0c9e4){const _0x5c53d0=a3_0x399d,_0x489a35=_0x89a365();while(!![]){try{const _0xf3b84a=-parseInt(_0x5c53d0(0x1de))/0x1*(parseInt(_0x5c53d0(0x1f7))/0x2)+parseInt(_0x5c53d0(0x20d))/0x3+parseInt(_0x5c53d0(0x209))/0x4+-parseInt(_0x5c53d0(0x212))/0x5+-parseInt(_0x5c53d0(0x200))/0x6*(-parseInt(_0x5c53d0(0x1f0))/0x7)+-parseInt(_0x5c53d0(0x219))/0x8*(-parseInt(_0x5c53d0(0x207))/0x9)+-parseInt(_0x5c53d0(0x1d5))/0xa;if(_0xf3b84a===_0xf0c9e4)break;else _0x489a35['push'](_0x489a35['shift']());}catch(_0x381d0e){_0x489a35['push'](_0x489a35['shift']());}}}(a3_0x40f3,0xb7105));import{CliErrors}from'../../errors.js';function a3_0x40f3(){const _0x2ad290=['12874920LpmCyE','Read\x20from\x20local\x20cache\x20only','Remote\x20app\x20name\x20to\x20activate','cachePath','raw','push','appPublishStatus','App\x20\x22','Default\x20app\x20candidate\x20set\x20to\x20\x22','1028055yWHJTE','Use\x20`','no-cache','string','projectPath','join','newConfigFileName','Use\x20global\x20config\x20scope','appName','local','read','source','pull','Usage:\x20','trim','Loaded\x20','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','isArray','7kvgaQT','.appcode\x20to\x20.lovrabet.json.','envName','length','name','Missing\x20app\x20name.','validation','2RBZJPE','bool','globalPath','defaultApp','find','appOwnerName','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','import','6924654PCEuLJ','app','entries','../../context.js','\x20app\x20use\x20<name>\x20[--global]','appCode','production','240399QgEUDr','isCurrent','3787456vcuTZm','No\x20cached\x20apps\x20found.','mergedCli','Initialize\x20','3178398LLlkyR','env','\x20cached\x20app(s)\x20for\x20env=\x22','map','enableI18n','1410200RePfmh','Set\x20the\x20fallback\x20app\x20candidate','fetchedAt','items','boolean','global','Read\x20app\x20list\x20from\x20local\x20cache\x20only','56haKLKl','accessKey','cache','i18nInfo','\x20config\x20file','\x20app(s)\x20for\x20env=\x22','from','write','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','list','nonInteractive','Filter\x20by\x20environment\x20(default:\x20current\x20env)','../../commands/app/cache.js','args','appcode','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','filter','str'];a3_0x40f3=function(){return _0x2ad290;};return a3_0x40f3();}import{PRODUCT_CONFIG}from'../../constant/product.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';const GLOBAL_FLAG={'name':a3_0x5eb44c(0x217),'type':a3_0x5eb44c(0x216),'description':a3_0x5eb44c(0x1e5),'default':![]};function collectFlags(_0x474c80,_0x193a1d){const _0x18cd14=a3_0x5eb44c,_0x237e58={};for(const _0xdfec81 of _0x193a1d){const _0xe45371=_0xdfec81['type']===_0x18cd14(0x216)?_0x474c80['bool'](_0xdfec81['name']):_0x474c80[_0x18cd14(0x1d4)](_0xdfec81[_0x18cd14(0x1f4)]);if(_0xe45371!==''&&_0xe45371!==![])_0x237e58[_0xdfec81[_0x18cd14(0x1f4)]]=_0xe45371;}if(_0x474c80[_0x18cd14(0x1cd)])_0x237e58[_0x18cd14(0x1cd)]=!![];return _0x237e58;}function normalizeLanguages(_0xdbd424){const _0x477e59=a3_0x5eb44c;if(!Array[_0x477e59(0x1ef)](_0xdbd424))return[];return _0xdbd424[_0x477e59(0x1d3)](_0x224a4b=>typeof _0x224a4b===_0x477e59(0x1e1))[_0x477e59(0x210)](_0xb2ed6b=>_0xb2ed6b['trim']())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x41d80a){const _0x3a4b5d=a3_0x5eb44c,_0x399b2f=normalizeLanguages(_0x41d80a[_0x3a4b5d(0x21c)]?.['langs']);return{'enableI18n':typeof _0x41d80a['enableI18n']===_0x3a4b5d(0x216)?_0x41d80a[_0x3a4b5d(0x211)]:null,'languages':_0x399b2f,'i18nInfo':_0x41d80a[_0x3a4b5d(0x21c)]?{..._0x41d80a[_0x3a4b5d(0x21c)],'langs':_0x399b2f[_0x3a4b5d(0x1f3)]?_0x399b2f:null}:null};}const initDef={'service':a3_0x5eb44c(0x201),'command':'init','description':a3_0x5eb44c(0x20c)+PRODUCT_CONFIG[a3_0x5eb44c(0x1e4)]+a3_0x5eb44c(0x21d),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x103f99){return await runInit(collectFlags(_0x103f99,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x5eb44c(0x201),'command':a3_0x5eb44c(0x1cc),'description':a3_0x5eb44c(0x1fd),'risk':a3_0x5eb44c(0x1e8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x5eb44c(0x20e),'type':a3_0x5eb44c(0x1e1),'description':a3_0x5eb44c(0x1ce),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x5eb44c(0x1e7),'type':a3_0x5eb44c(0x216),'description':a3_0x5eb44c(0x218),'default':![]},{'name':a3_0x5eb44c(0x1e0),'type':'boolean','description':a3_0x5eb44c(0x1d2),'default':![]}],async 'execute'(_0x4833fa){const _0x1f5828=a3_0x5eb44c,_0x19621e=_0x4833fa[_0x1f5828(0x1d4)](_0x1f5828(0x20e))||_0x4833fa[_0x1f5828(0x1f2)]||getEnv()||_0x1f5828(0x206),_0x4d4d06=_0x4833fa['bool'](_0x1f5828(0x1e7)),_0x43b841=_0x4833fa['bool'](_0x1f5828(0x1e0)),{readRawConfigWithLayers:_0x233336,resolveDefaultAppSource:_0x3e55f5,getLocalAppAliases:_0xcd2922}=await import(_0x1f5828(0x203)),{getRemoteAppList:_0x377016}=await import('../../commands/app/remote-source.js'),{config:_0x9b7a7a,layers:_0x4f25f8}=_0x233336(),_0x1fc893=_0x3e55f5(_0x4f25f8),{defaultApp:_0x29f468}=_0x9b7a7a,_0x32cb35=await _0x377016({'env':_0x19621e,'accessKey':_0x4833fa[_0x1f5828(0x21a)],'localOnly':_0x4d4d06,'noCache':_0x43b841}),_0x2afd35=_0x32cb35[_0x1f5828(0x215)][_0x1f5828(0x210)](_0x3c443b=>{const _0x6aa697=_0x1f5828;return{'name':_0x3c443b['appName'],'appcode':_0x3c443b[_0x6aa697(0x205)],'named':!![],'definedIn':'remote','isDefault':_0x3c443b[_0x6aa697(0x1e6)]===_0x29f468,...buildAppProfileListFields(_0x19621e),...buildRemoteAppI18nFields(_0x3c443b),'source':_0x32cb35[_0x6aa697(0x1e9)],'owner':_0x3c443b[_0x6aa697(0x1fc)]??null,'status':_0x3c443b[_0x6aa697(0x1db)]??null,'cachedAt':_0x32cb35[_0x6aa697(0x214)]};}),_0x30fc07=_0xcd2922(_0x9b7a7a);let _0x370e42=0x0;for(const [_0x556868,_0xe83ad]of Object[_0x1f5828(0x202)](_0x30fc07)){const _0x5e58ba=typeof _0xe83ad[_0x1f5828(0x1d1)]===_0x1f5828(0x1e1)?_0xe83ad[_0x1f5828(0x1d1)][_0x1f5828(0x1ec)]():'';if(!_0x5e58ba)continue;_0x370e42+=0x1,_0x2afd35[_0x1f5828(0x1da)]({'name':_0x556868,'appcode':_0x5e58ba,'named':!![],'definedIn':_0x1f5828(0x1e7),'isDefault':_0x556868===_0x29f468,...buildAppProfileListFields(_0x19621e),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x2afd35,_0x4833fa[_0x1f5828(0x20b)]);if(_0x2afd35[_0x1f5828(0x1f3)]===0x0)return{'ok':!![],'data':[],'message':_0x32cb35['source']===_0x1f5828(0x21b)?_0x1f5828(0x20a):'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0x5a3957=_0x2afd35[_0x1f5828(0x1fb)](_0x3e573d=>_0x3e573d[_0x1f5828(0x208)]===!![]),_0x45d4cf=_0x29f468??_0x5a3957?.[_0x1f5828(0x1f4)]??null,_0x1ce05c={'env':_0x19621e,'source':_0x32cb35[_0x1f5828(0x1e9)],'fetchedAt':_0x32cb35['fetchedAt'],'cachePath':_0x32cb35[_0x1f5828(0x1d8)],'globalPath':_0x4f25f8[_0x1f5828(0x1f9)]??null,'projectPath':_0x4f25f8[_0x1f5828(0x1e2)]??null,'defaultApp':_0x45d4cf,'defaultAppSource':_0x29f468!=null?_0x1fc893:null,'localAliasCount':_0x370e42};return{'ok':!![],'data':{'items':_0x2afd35,'meta':_0x1ce05c}};}},pullDef={'service':a3_0x5eb44c(0x201),'command':a3_0x5eb44c(0x1ea),'description':a3_0x5eb44c(0x1fe),'risk':a3_0x5eb44c(0x220),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x5eb44c(0x20e),'type':a3_0x5eb44c(0x1e1),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x5eb44c(0x1e7),'type':a3_0x5eb44c(0x216),'description':a3_0x5eb44c(0x1d6),'default':![]},{'name':a3_0x5eb44c(0x1e0),'type':'boolean','description':a3_0x5eb44c(0x1d2),'default':![]}],async 'execute'(_0x3d4944){const _0x3fce39=a3_0x5eb44c,_0x367dea=_0x3d4944[_0x3fce39(0x1d4)](_0x3fce39(0x20e))||_0x3d4944[_0x3fce39(0x1f2)]||getEnv()||'production',_0x34c518=_0x3d4944[_0x3fce39(0x1f8)](_0x3fce39(0x1e7)),_0x257aa0=_0x3d4944[_0x3fce39(0x1f8)]('no-cache'),{getRemoteAppList:_0x445c94}=await import('../../commands/app/remote-source.js'),_0x5bbce2=await _0x445c94({'env':_0x367dea,'accessKey':_0x3d4944[_0x3fce39(0x21a)],'localOnly':_0x34c518,'noCache':_0x257aa0});return{'ok':!![],'data':{'total':_0x5bbce2[_0x3fce39(0x215)][_0x3fce39(0x1f3)],'env':_0x367dea,'source':_0x5bbce2[_0x3fce39(0x1e9)],'fetchedAt':_0x5bbce2[_0x3fce39(0x214)],'cachePath':_0x5bbce2[_0x3fce39(0x1d8)]},'message':_0x5bbce2[_0x3fce39(0x1e9)]==='cache'?_0x3fce39(0x1ed)+_0x5bbce2[_0x3fce39(0x215)][_0x3fce39(0x1f3)]+_0x3fce39(0x20f)+_0x367dea+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x5bbce2[_0x3fce39(0x215)]['length']+_0x3fce39(0x21e)+_0x367dea+'\x22.'};}},useDef={'service':a3_0x5eb44c(0x201),'command':'use','description':a3_0x5eb44c(0x213),'risk':a3_0x5eb44c(0x220),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a3_0x5eb44c(0x1d7),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x44989a){const _0x4a9090=a3_0x5eb44c;if(!_0x44989a[_0x4a9090(0x1d0)][0x0])throw CliErrors['validation']('Missing\x20app\x20name.',_0x4a9090(0x1eb)+CLI_BIN_NAME+_0x4a9090(0x204));},async 'execute'(_0x1b425c){const _0x5b5b13=a3_0x5eb44c,_0x356573=_0x1b425c[_0x5b5b13(0x1d0)][0x0];if(!_0x356573)throw CliErrors[_0x5b5b13(0x1f6)](_0x5b5b13(0x1f5),_0x5b5b13(0x1eb)+CLI_BIN_NAME+_0x5b5b13(0x204));const {buildConfigFromFlags:_0x40f543,resolveLocalAppAliasCode:_0x1bd85}=await import(_0x5b5b13(0x203)),{readCachedAppList:_0x38c25c}=await import(_0x5b5b13(0x1cf)),_0x4a4674=_0x1b425c[_0x5b5b13(0x1d4)](_0x5b5b13(0x20e)),_0x202c60=_0x40f543(_0x4a4674?{'env':_0x4a4674}:{}),_0x267c6e=_0x38c25c(_0x202c60[_0x5b5b13(0x20e)],_0x202c60[_0x5b5b13(0x21a)]),_0x33b014=_0x267c6e?.[_0x5b5b13(0x215)][_0x5b5b13(0x1fb)](_0x5aa4f6=>_0x5aa4f6[_0x5b5b13(0x1e6)]===_0x356573),_0x19ce17=_0x1bd85(_0x202c60[_0x5b5b13(0x1d9)]??{},_0x356573);if(!_0x33b014&&!_0x19ce17&&_0x202c60[_0x5b5b13(0x1fa)]!==_0x356573){const _0x3ac782=[..._0x267c6e?.['items']['map'](_0x59a51a=>_0x59a51a[_0x5b5b13(0x1e6)])??[]],_0x2137d2=_0x3ac782[_0x5b5b13(0x1f3)]===0x0?_0x5b5b13(0x1df)+CLI_BIN_NAME+_0x5b5b13(0x1ee)+_0x356573+_0x5b5b13(0x1f1):'Available\x20remote\x20apps:\x20'+Array[_0x5b5b13(0x21f)](new Set(_0x3ac782))[_0x5b5b13(0x1e3)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors[_0x5b5b13(0x1f6)](_0x5b5b13(0x1dc)+_0x356573+'\x22\x20not\x20found.',_0x2137d2);}const _0x2a2189=_0x1b425c[_0x5b5b13(0x1f8)](_0x5b5b13(0x217));let _0x320d04;if(_0x2a2189)_0x320d04={'global':!![]};else{const {isInProject:_0x19ee68}=await import(_0x5b5b13(0x203)),_0x52ba57=_0x19ee68();_0x320d04=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x52ba57}));}const _0x4d000f=readConfig(_0x320d04);return _0x4d000f[_0x5b5b13(0x1fa)]=_0x356573,writeConfig(_0x4d000f,_0x320d04),{'ok':!![],'message':_0x5b5b13(0x1dd)+_0x356573+'\x22'+scopeLabel(_0x320d04)+'.'};}},importDef={'service':a3_0x5eb44c(0x201),'command':a3_0x5eb44c(0x1ff),'description':a3_0x5eb44c(0x221),'risk':a3_0x5eb44c(0x220),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x7df57c){return await runInitImport(collectFlags(_0x7df57c,initImportFlagDefs)),{'ok':!![]};}};function a3_0x399d(_0x302fbe,_0x340b4a){_0x302fbe=_0x302fbe-0x1cc;const _0x40f3c6=a3_0x40f3();let _0x399dfe=_0x40f3c6[_0x302fbe];return _0x399dfe;}export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3288f7,_0x595835){const _0x4a7462=a4_0x3929,_0x187b3f=_0x3288f7();while(!![]){try{const _0x5217a4=parseInt(_0x4a7462(0x108))/0x1*(parseInt(_0x4a7462(0x113))/0x2)+-parseInt(_0x4a7462(0x109))/0x3+-parseInt(_0x4a7462(0x111))/0x4*(-parseInt(_0x4a7462(0x10d))/0x5)+-parseInt(_0x4a7462(0x10c))/0x6*(-parseInt(_0x4a7462(0x105))/0x7)+parseInt(_0x4a7462(0x10f))/0x8+parseInt(_0x4a7462(0x106))/0x9+-parseInt(_0x4a7462(0x10e))/0xa;if(_0x5217a4===_0x595835)break;else _0x187b3f['push'](_0x187b3f['shift']());}catch(_0x59b5ac){_0x187b3f['push'](_0x187b3f['shift']());}}}(a4_0xf8ed,0x5c738));function a4_0xf8ed(){const _0x4f7637=['60tcoRct','1837060kAKbkA','390512QaNmmr','errorMsg','66268TNACvA','errorCode','20666yeNEri','parse','56AGbLHt','5930271FVmLUM','data','1xTMtvF','1067244obgIXY','../../../mock/app-list.json','Mock\x20API\x20error:\x20','948YxJveR'];a4_0xf8ed=function(){return _0x4f7637;};return a4_0xf8ed();}import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x4a2443=a4_0x3929,_0x56d565=join(__dirname,_0x4a2443(0x10a)),_0x5bd20e=readFileSync(_0x56d565,'utf-8');return JSON[_0x4a2443(0x104)](_0x5bd20e);}function a4_0x3929(_0x2677a8,_0x59d2f6){_0x2677a8=_0x2677a8-0x104;const _0xf8ed24=a4_0xf8ed();let _0x392906=_0xf8ed24[_0x2677a8];return _0x392906;}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x2406ba=a4_0x3929,_0x7ee3ba=getMockAppList();if(!_0x7ee3ba['success'])throw new Error(_0x2406ba(0x10b)+_0x7ee3ba[_0x2406ba(0x110)]+'\x20('+_0x7ee3ba[_0x2406ba(0x112)]+')');return _0x7ee3ba[_0x2406ba(0x107)]['tableData'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x94503a,_0x55786d){const _0x52159d=a5_0x5eb1,_0x418418=_0x94503a();while(!![]){try{const _0x551346=parseInt(_0x52159d(0x83))/0x1*(-parseInt(_0x52159d(0x82))/0x2)+parseInt(_0x52159d(0x8c))/0x3*(-parseInt(_0x52159d(0x92))/0x4)+parseInt(_0x52159d(0x8b))/0x5*(parseInt(_0x52159d(0x84))/0x6)+-parseInt(_0x52159d(0x87))/0x7+-parseInt(_0x52159d(0x86))/0x8+parseInt(_0x52159d(0x91))/0x9*(parseInt(_0x52159d(0x80))/0xa)+parseInt(_0x52159d(0x8e))/0xb*(parseInt(_0x52159d(0x8f))/0xc);if(_0x551346===_0x55786d)break;else _0x418418['push'](_0x418418['shift']());}catch(_0x7c7b2a){_0x418418['push'](_0x418418['shift']());}}}(a5_0x1dff,0x9ba4e));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a5_0x1dff(){const _0x2230e4=['fetchedAt','4203216NjUrxG','3360056sHjHBW','cache','toISOString','remote','251455FgHfiz','12NLwCye','items','17765bZLQfV','21588jDwcFs','mock','9IjTfXq','1022228VPgWvf','APP_LIST_SOURCE','trim','504540lzQqvg','toLowerCase','1888932kzPkcq','1uNsPrF','78NGOEKt'];a5_0x1dff=function(){return _0x2230e4;};return a5_0x1dff();}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x125841=a5_0x5eb1,_0x18c14b=(productEnv(_0x125841(0x93))||'')[_0x125841(0x7f)]()[_0x125841(0x81)]();return _0x18c14b===_0x125841(0x90);}function a5_0x5eb1(_0x5618b6,_0x9a84bc){_0x5618b6=_0x5618b6-0x7f;const _0x1dffed=a5_0x1dff();let _0x5eb1de=_0x1dffed[_0x5618b6];return _0x5eb1de;}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x195623){const _0x34c2b0=a5_0x5eb1,{env:_0x40a417,accessKey:_0xdf98dc,localOnly:localOnly=![],noCache:noCache=![]}=_0x195623,_0xc133bf=readCachedAppList(_0x40a417,_0xdf98dc),_0x145cca=_0xdf98dc?.[_0x34c2b0(0x7f)]()?getAppCacheFilePath(_0x40a417,_0xdf98dc):null;if(localOnly)return{'items':_0xc133bf?.[_0x34c2b0(0x8d)]??[],'source':_0x34c2b0(0x88),'fetchedAt':_0xc133bf?.['fetchedAt']??null,'cachePath':_0x145cca};try{const _0x59c750=await getRemoteAppItems(),_0x4e7d00=shouldUseMockRemoteApps()?_0x34c2b0(0x90):_0x34c2b0(0x8a),_0x30c1a3=new Date()[_0x34c2b0(0x89)](),_0x257a0e=_0xdf98dc?.[_0x34c2b0(0x7f)]()?writeCachedAppList(_0x40a417,_0xdf98dc,{'env':_0x40a417,'fetchedAt':_0x30c1a3,'source':_0x4e7d00,'items':_0x59c750}):null;return{'items':_0x59c750,'source':_0x4e7d00,'fetchedAt':_0x30c1a3,'cachePath':_0x257a0e};}catch(_0x5849a6){if(!noCache&&_0xc133bf)return{'items':_0xc133bf[_0x34c2b0(0x8d)],'source':'cache','fetchedAt':_0xc133bf[_0x34c2b0(0x85)],'cachePath':_0x145cca};throw _0x5849a6;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39f5ae,_0x2cd2ac){const _0x25aa11=a6_0x2887,_0xc0e71b=_0x39f5ae();while(!![]){try{const _0x57ede6=parseInt(_0x25aa11(0x18e))/0x1*(-parseInt(_0x25aa11(0x182))/0x2)+parseInt(_0x25aa11(0x196))/0x3*(parseInt(_0x25aa11(0x190))/0x4)+parseInt(_0x25aa11(0x180))/0x5+-parseInt(_0x25aa11(0x186))/0x6+parseInt(_0x25aa11(0x188))/0x7*(-parseInt(_0x25aa11(0x18f))/0x8)+-parseInt(_0x25aa11(0x192))/0x9+parseInt(_0x25aa11(0x194))/0xa*(-parseInt(_0x25aa11(0x187))/0xb);if(_0x57ede6===_0x2cd2ac)break;else _0xc0e71b['push'](_0xc0e71b['shift']());}catch(_0x307f37){_0xc0e71b['push'](_0xc0e71b['shift']());}}}(a6_0x11d2,0xd03fe));import{CLI_BIN_NAME}from'../../constant/cli.js';function a6_0x2887(_0x29e779,_0x1d905a){_0x29e779=_0x29e779-0x180;const _0x11d295=a6_0x11d2();let _0x288757=_0x11d295[_0x29e779];return _0x288757;}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x16c8b6,_0x16ef81){const _0x5c40e0=a6_0x2887;if(!_0x16ef81)return;const _0x25e3c9=!!(_0x16ef81[_0x5c40e0(0x18a)]??_0x16ef81[_0x5c40e0(0x183)]);for(const _0x14e164 of _0x16c8b6){_0x14e164[_0x5c40e0(0x189)]=![];}const _0x4e4638=_0x16ef81[_0x5c40e0(0x193)]!=null?String(_0x16ef81['appCode'])['trim']():'';if(_0x25e3c9){const _0x3dfd70=_0x16ef81[_0x5c40e0(0x18a)]??_0x16ef81['defaultApp'];if(_0x3dfd70){const _0x4cfc5f=_0x16c8b6[_0x5c40e0(0x185)](_0x246dc5=>_0x246dc5[_0x5c40e0(0x184)]===!![]&&_0x246dc5['name']===_0x3dfd70&&_0x246dc5[_0x5c40e0(0x18d)]===_0x5c40e0(0x191)),_0x566875=_0x4cfc5f??_0x16c8b6[_0x5c40e0(0x185)](_0x4b12d4=>_0x4b12d4[_0x5c40e0(0x184)]===!![]&&_0x4b12d4['name']===_0x3dfd70);_0x566875&&(_0x566875['isCurrent']=!![]);}return;}if(!_0x4e4638)return;for(const _0x3534a8 of _0x16c8b6){String(_0x3534a8[_0x5c40e0(0x18b)]??'')[_0x5c40e0(0x18c)]()===_0x4e4638&&(_0x3534a8[_0x5c40e0(0x189)]=!![]);}}function a6_0x11d2(){const _0x57092c=['489474frcppz','appCode','10YSSPRv','global','91893LadKqm','8011230LabSRE','project','353072GFXQiN','defaultApp','named','find','654102ZQmSUB','3495448dfbFmG','49dGpvZA','isCurrent','currentApp','appcode','trim','definedIn','1aCTqMA','699744YBBBWl','68yKeWls','local'];a6_0x11d2=function(){return _0x57092c;};return a6_0x11d2();}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x4d868f){const _0x2dfb5c=a6_0x2887;return formatScopeLabel(_0x4d868f[_0x2dfb5c(0x195)]?_0x2dfb5c(0x195):_0x2dfb5c(0x181));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a7_0x1147d8=a7_0x1ff3;(function(_0x1215f7,_0x4dc5f8){const _0x501df6=a7_0x1ff3,_0x46c46=_0x1215f7();while(!![]){try{const _0x1d7611=-parseInt(_0x501df6(0xeb))/0x1*(parseInt(_0x501df6(0x111))/0x2)+parseInt(_0x501df6(0x114))/0x3*(-parseInt(_0x501df6(0xf9))/0x4)+-parseInt(_0x501df6(0x104))/0x5+-parseInt(_0x501df6(0xe9))/0x6*(-parseInt(_0x501df6(0xcf))/0x7)+-parseInt(_0x501df6(0xe7))/0x8+-parseInt(_0x501df6(0x103))/0x9*(parseInt(_0x501df6(0xd8))/0xa)+parseInt(_0x501df6(0xcc))/0xb;if(_0x1d7611===_0x4dc5f8)break;else _0x46c46['push'](_0x46c46['shift']());}catch(_0x5a2bd8){_0x46c46['push'](_0x46c46['shift']());}}}(a7_0x5707,0x2689e));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=a7_0x1147d8(0x118),ARTIFACT_SOURCE_AGENT=a7_0x1147d8(0x116),ALLOWED_REACT_MODULE_IMPORTS=[a7_0x1147d8(0x10b),a7_0x1147d8(0xfe),a7_0x1147d8(0xe8),a7_0x1147d8(0x10a),a7_0x1147d8(0x10e),a7_0x1147d8(0x108)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a7_0x1147d8(0x117)](',\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':a7_0x1147d8(0xd0),'type':a7_0x1147d8(0xfc),'required':!![],'description':a7_0x1147d8(0x115)},ARTIFACT_NAME_FLAG={'name':'name','type':'string','description':a7_0x1147d8(0xdf)},METADATA_FLAG={'name':a7_0x1147d8(0xea),'type':a7_0x1147d8(0xfc),'description':a7_0x1147d8(0xd6)};function isPlainObject(_0x3a9d61){return typeof _0x3a9d61==='object'&&_0x3a9d61!==null&&!Array['isArray'](_0x3a9d61);}function readSourceFile(_0x5c07d4){const _0x3d6031=a7_0x1147d8;if(!_0x5c07d4)throw CliErrors[_0x3d6031(0xce)](_0x3d6031(0xe6));if(!existsSync(_0x5c07d4))throw CliErrors['validation'](_0x3d6031(0x112)+_0x5c07d4);if(!statSync(_0x5c07d4)[_0x3d6031(0x110)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5c07d4);const _0xd4046e=readFileSync(_0x5c07d4,_0x3d6031(0x106));return validateReactModuleSource(_0xd4046e),_0xd4046e;}function parseMetadata(_0x3e1491){const _0x4728c8=a7_0x1147d8;if(!_0x3e1491)return undefined;let _0x50ac52;try{_0x50ac52=JSON[_0x4728c8(0xf4)](_0x3e1491);}catch{throw CliErrors['validation'](_0x4728c8(0xf2)+_0x3e1491);}if(!isPlainObject(_0x50ac52))throw CliErrors[_0x4728c8(0xce)](_0x4728c8(0xf1));const _0x3d0a08={..._0x50ac52};return delete _0x3d0a08[_0x4728c8(0xcd)],_0x3d0a08;}function a7_0x5707(){const _0x16f894=['/client/artifact/','react-dom','artifact','/update','length','includes','26109FDWGvo','1562135kXIDTM','Preview:\x20create\x20react_module\x20Artifact','utf8','add','@ant-design/icons','List\x20current-app\x20react_module\x20Artifacts','dayjs','react','num','lastIndex','antd','test','isFile','2uEhrUk','File\x20not\x20found:\x20','description','3lHAKJn','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','AGENT','join','react_module','favorite','build','Artifact\x20ID','7849809UKcwrm','compiledContent','validation','991109aicBeZ','file','Show\x20one\x20Artifact\x20by\x20id','map','read','some','name','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','deleted','1040mGRYBL','Artifact\x20source\x20file\x20is\x20blank.','Created\x20Artifact\x20','exec','createTime','write','split','Artifact\x20display\x20name','trim','Preview:\x20update\x20react_module\x20Artifact\x20','str','body','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','verbose','File\x20path\x20is\x20required.','1246032GOHVhl','lodash','12nMMUrO','metadata','1226mrXLhN','artifactType','source','filter','detail','bool','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Invalid\x20JSON\x20for\x20--metadata:\x20','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','parse','boolean','updateTime','.\x20Unsupported:\x20','POST','271312OtSbnr','content','appCode','string'];a7_0x5707=function(){return _0x16f894;};return a7_0x5707();}function getPackageName(_0x16139d){const _0x10d3b1=a7_0x1147d8;if(_0x16139d['startsWith']('@')){const [_0x32f16f,_0x4b6875]=_0x16139d[_0x10d3b1(0xde)]('/');return _0x32f16f&&_0x4b6875?_0x32f16f+'/'+_0x4b6875:_0x16139d;}return _0x16139d[_0x10d3b1(0xde)]('/')[0x0]||_0x16139d;}function validateAllowedImports(_0x4fa34e){const _0x3d10ed=a7_0x1147d8,_0xc4c604=new Set();for(const _0x5efa59 of IMPORT_SOURCE_PATTERNS){_0x5efa59[_0x3d10ed(0x10d)]=0x0;let _0x4adf71;while((_0x4adf71=_0x5efa59[_0x3d10ed(0xdb)](_0x4fa34e))!==null){const _0x42a003=_0x4adf71[0x1]?.[_0x3d10ed(0xe0)]();_0x42a003&&_0xc4c604[_0x3d10ed(0x107)](_0x42a003);}}const _0x31dafc=[..._0xc4c604][_0x3d10ed(0xd2)](getPackageName)[_0x3d10ed(0xee)](_0x4cc3d6=>!ALLOWED_REACT_MODULE_IMPORTS[_0x3d10ed(0x102)](_0x4cc3d6));if(_0x31dafc[_0x3d10ed(0x101)]>0x0)throw CliErrors[_0x3d10ed(0xce)]('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x3d10ed(0xf7)+[...new Set(_0x31dafc)][_0x3d10ed(0x117)](',\x20'));}export function validateReactModuleSource(_0x18c96c){const _0x3ca48e=a7_0x1147d8;if(!_0x18c96c[_0x3ca48e(0xe0)]())throw CliErrors[_0x3ca48e(0xce)](_0x3ca48e(0xd9));if(PAGE_LEVEL_PATTERNS[_0x3ca48e(0xd4)](_0x46d55c=>_0x46d55c[_0x3ca48e(0x10f)](_0x18c96c)))throw CliErrors[_0x3ca48e(0xce)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x18c96c);}function buildArtifactInput(_0x1cb504){const _0x3c76c0=a7_0x1147d8,_0x2e3628=readSourceFile(_0x1cb504[_0x3c76c0(0xe2)](_0x3c76c0(0xd0))),_0x503f0d=_0x1cb504[_0x3c76c0(0xe2)]('name')[_0x3c76c0(0xe0)](),_0x3a4b8c=parseMetadata(_0x1cb504[_0x3c76c0(0xe2)](_0x3c76c0(0xea)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x503f0d?{'name':_0x503f0d}:{},'content':_0x2e3628,..._0x3a4b8c?{'metadata':_0x3a4b8c}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x3565b2){const _0x536f5e=a7_0x1147d8;return{'id':_0x3565b2['id'],'name':_0x3565b2[_0x536f5e(0xd5)],'artifactType':_0x3565b2[_0x536f5e(0xec)],'source':_0x3565b2[_0x536f5e(0xed)],'favorite':_0x3565b2[_0x536f5e(0xc9)],'deleted':_0x3565b2[_0x536f5e(0xd7)],'createTime':_0x3565b2[_0x536f5e(0xdc)],'updateTime':_0x3565b2[_0x536f5e(0xf6)]};}function a7_0x1ff3(_0x1baf27,_0x384230){_0x1baf27=_0x1baf27-0xc9;const _0x57071b=a7_0x5707();let _0x1ff3ec=_0x57071b[_0x1baf27];return _0x1ff3ec;}function detailArtifact(_0x26b968){const _0x113cfb=a7_0x1147d8;return{'id':_0x26b968['id'],'appCode':_0x26b968['appCode'],'name':_0x26b968[_0x113cfb(0xd5)],'artifactType':_0x26b968[_0x113cfb(0xec)],'source':_0x26b968[_0x113cfb(0xed)],'favorite':_0x26b968[_0x113cfb(0xc9)],'deleted':_0x26b968[_0x113cfb(0xd7)],'content':_0x26b968[_0x113cfb(0xfa)]??'','compiledContent':_0x26b968[_0x113cfb(0xcd)],'metadata':_0x26b968[_0x113cfb(0xea)]??{},'createTime':_0x26b968[_0x113cfb(0xdc)],'updateTime':_0x26b968[_0x113cfb(0xf6)]};}function readFavoriteFlag(_0x114e0b){const _0x54f950=a7_0x1147d8,_0x3fed6a=_0x114e0b['flag']('favorite');return _0x3fed6a===undefined||_0x3fed6a===null||_0x3fed6a===''?undefined:_0x114e0b['bool'](_0x54f950(0xc9));}const artifactList={'service':a7_0x1147d8(0xff),'command':'list','description':a7_0x1147d8(0x109),'risk':a7_0x1147d8(0xd3),'flags':[{'name':a7_0x1147d8(0xed),'type':a7_0x1147d8(0xfc),'description':a7_0x1147d8(0xf3)},{'name':a7_0x1147d8(0xc9),'type':a7_0x1147d8(0xf5),'description':'Optional\x20favorite-state\x20filter'},VERBOSE_FLAG],async 'execute'(_0x1716bb){const _0x2d2486=a7_0x1147d8,_0x1e7927=await listRuntimeArtifacts(_0x1716bb[_0x2d2486(0xfb)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x1716bb[_0x2d2486(0xe2)]('source')?{'source':_0x1716bb[_0x2d2486(0xe2)](_0x2d2486(0xed))}:{},...readFavoriteFlag(_0x1716bb)!==undefined?{'favorite':readFavoriteFlag(_0x1716bb)}:{}});return{'ok':!![],'data':{'total':_0x1e7927['length'],'items':_0x1716bb[_0x2d2486(0xf0)](_0x2d2486(0xe5))?_0x1e7927:_0x1e7927[_0x2d2486(0xd2)](summarizeArtifact)}};}},artifactDetail={'service':a7_0x1147d8(0xff),'command':a7_0x1147d8(0xef),'description':a7_0x1147d8(0xd1),'risk':a7_0x1147d8(0xd3),'flags':[{...ID_FLAG,'description':a7_0x1147d8(0xcb)}],async 'execute'(_0x23f7e7){const _0x2cd24f=a7_0x1147d8,_0x291156=await getRuntimeArtifact(_0x23f7e7['num']('id'),_0x23f7e7[_0x2cd24f(0xfb)]);return{'ok':!![],'data':detailArtifact(_0x291156)};}},artifactCreate={'service':a7_0x1147d8(0xff),'command':'create','description':a7_0x1147d8(0xe4),'risk':a7_0x1147d8(0xdd),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x422776){const _0x30e8a4=a7_0x1147d8,_0x1cdcea=buildArtifactInput(_0x422776),_0x256e47=await createRuntimeArtifact(_0x422776[_0x30e8a4(0xfb)],_0x1cdcea);return{'ok':!![],'data':detailArtifact(_0x256e47),'message':_0x30e8a4(0xda)+_0x256e47['id']+(_0x256e47['name']?'\x20('+_0x256e47['name']+')':'')};},async 'dryRun'(_0x19cf9b){const _0x26d5de=a7_0x1147d8,_0x330f40=buildArtifactInput(_0x19cf9b);return dryRun(_0x26d5de(0xf8),'/client/artifact/create')[_0x26d5de(0xe3)]({'appCode':_0x19cf9b[_0x26d5de(0xfb)],..._0x330f40})['description'](_0x26d5de(0x105))[_0x26d5de(0xca)]();}},artifactUpdate={'service':a7_0x1147d8(0xff),'command':'update','description':'Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a7_0x1147d8(0xdd),'flags':[{...ID_FLAG,'description':a7_0x1147d8(0xcb)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x5c94ed){const _0x4e9d81=a7_0x1147d8,_0x21f7a9=_0x5c94ed[_0x4e9d81(0x10c)]('id'),_0xa48fff=buildArtifactInput(_0x5c94ed),_0x259c46=await updateRuntimeArtifact(_0x21f7a9,_0x5c94ed[_0x4e9d81(0xfb)],_0xa48fff);return{'ok':!![],'data':detailArtifact(_0x259c46),'message':'Updated\x20Artifact\x20'+_0x259c46['id']+(_0x259c46['name']?'\x20('+_0x259c46['name']+')':'')};},async 'dryRun'(_0x585755){const _0x14ae57=a7_0x1147d8,_0x2267af=_0x585755[_0x14ae57(0x10c)]('id'),_0x46c56f=buildArtifactInput(_0x585755);return dryRun(_0x14ae57(0xf8),_0x14ae57(0xfd)+_0x2267af+_0x14ae57(0x100))[_0x14ae57(0xe3)]({'appCode':_0x585755[_0x14ae57(0xfb)],..._0x46c56f})[_0x14ae57(0x113)](_0x14ae57(0xe1)+_0x2267af)[_0x14ae57(0xca)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
1
|
+
const a7_0x17b876=a7_0x8da4;function a7_0x5220(){const _0x5a7466=['compiledContent','join','update','exec','artifactType','file','createTime','Artifact\x20ID','some','File\x20not\x20found:\x20','12AvbgEM','favorite','3GaIHhe','includes','test','utf8','868713UJhJfR','react_module','bool','artifact','startsWith','13915dJxdaN','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','content','Optional\x20favorite-state\x20filter','name','map','updateTime','list','--metadata\x20must\x20be\x20a\x20JSON\x20object.','@ant-design/icons','validation','metadata','1725400nnQKTN','description','str','/client/artifact/create','write','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','num','2152600KEtwNA','AGENT','Show\x20one\x20Artifact\x20by\x20id','POST','read','string','File\x20is\x20not\x20a\x20regular\x20file:\x20','Artifact\x20source\x20file\x20is\x20blank.','List\x20current-app\x20react_module\x20Artifacts','lodash','isFile','parse','verbose','25254504FMTOYe','create','filter','flag','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Created\x20Artifact\x20','9RBISvZ','lastIndex','460924CxHMQd','788WFfIfU','source','split','isArray','Artifact\x20display\x20name','appCode','detail','deleted','body','Preview:\x20create\x20react_module\x20Artifact','trim','/client/artifact/','build','Updated\x20Artifact\x20','Preview:\x20update\x20react_module\x20Artifact\x20','add','.\x20Unsupported:\x20','3878854ljlygc','react_module\x20imports\x20are\x20limited\x20to:\x20','Invalid\x20JSON\x20for\x20--metadata:\x20'];a7_0x5220=function(){return _0x5a7466;};return a7_0x5220();}(function(_0x4c4cf7,_0x1e9167){const _0x2ce294=a7_0x8da4,_0x286472=_0x4c4cf7();while(!![]){try{const _0x4ff48b=-parseInt(_0x2ce294(0xca))/0x1+-parseInt(_0x2ce294(0xa5))/0x2*(parseInt(_0x2ce294(0xc6))/0x3)+-parseInt(_0x2ce294(0xa6))/0x4*(-parseInt(_0x2ce294(0xcf))/0x5)+parseInt(_0x2ce294(0xc4))/0x6*(-parseInt(_0x2ce294(0xb7))/0x7)+parseInt(_0x2ce294(0x90))/0x8+parseInt(_0x2ce294(0xa3))/0x9*(-parseInt(_0x2ce294(0x89))/0xa)+parseInt(_0x2ce294(0x9d))/0xb;if(_0x4ff48b===_0x1e9167)break;else _0x286472['push'](_0x286472['shift']());}catch(_0x368db8){_0x286472['push'](_0x286472['shift']());}}}(a7_0x5220,0xb302f));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=a7_0x17b876(0xcb),ARTIFACT_SOURCE_AGENT=a7_0x17b876(0x91),ALLOWED_REACT_MODULE_IMPORTS=['react','react-dom',a7_0x17b876(0x99),'dayjs','antd',a7_0x17b876(0x86)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a7_0x17b876(0xbb)](',\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':a7_0x17b876(0x95),'required':!![],'description':a7_0x17b876(0x7d)},ARTIFACT_NAME_FLAG={'name':a7_0x17b876(0x81),'type':'string','description':a7_0x17b876(0xaa)},METADATA_FLAG={'name':a7_0x17b876(0x88),'type':a7_0x17b876(0x95),'description':a7_0x17b876(0x7e)};function isPlainObject(_0x2e7c1c){const _0x3e866e=a7_0x17b876;return typeof _0x2e7c1c==='object'&&_0x2e7c1c!==null&&!Array[_0x3e866e(0xa9)](_0x2e7c1c);}function readSourceFile(_0x2af4fd){const _0x1d3e30=a7_0x17b876;if(!_0x2af4fd)throw CliErrors[_0x1d3e30(0x87)]('File\x20path\x20is\x20required.');if(!existsSync(_0x2af4fd))throw CliErrors['validation'](_0x1d3e30(0xc3)+_0x2af4fd);if(!statSync(_0x2af4fd)[_0x1d3e30(0x9a)]())throw CliErrors[_0x1d3e30(0x87)](_0x1d3e30(0x96)+_0x2af4fd);const _0x566afe=readFileSync(_0x2af4fd,_0x1d3e30(0xc9));return validateReactModuleSource(_0x566afe),_0x566afe;}function parseMetadata(_0x1144ae){const _0x81264e=a7_0x17b876;if(!_0x1144ae)return undefined;let _0x1cea2a;try{_0x1cea2a=JSON[_0x81264e(0x9b)](_0x1144ae);}catch{throw CliErrors[_0x81264e(0x87)](_0x81264e(0xb9)+_0x1144ae);}if(!isPlainObject(_0x1cea2a))throw CliErrors['validation'](_0x81264e(0x85));const _0x2ec3b5={..._0x1cea2a};return delete _0x2ec3b5['compiledContent'],_0x2ec3b5;}function getPackageName(_0x427e2f){const _0x4602b2=a7_0x17b876;if(_0x427e2f[_0x4602b2(0xce)]('@')){const [_0x75aed4,_0x43c44c]=_0x427e2f['split']('/');return _0x75aed4&&_0x43c44c?_0x75aed4+'/'+_0x43c44c:_0x427e2f;}return _0x427e2f[_0x4602b2(0xa8)]('/')[0x0]||_0x427e2f;}function validateAllowedImports(_0x4ae936){const _0x2588b4=a7_0x17b876,_0x1db8e5=new Set();for(const _0x7b50e2 of IMPORT_SOURCE_PATTERNS){_0x7b50e2[_0x2588b4(0xa4)]=0x0;let _0x3fc8b3;while((_0x3fc8b3=_0x7b50e2[_0x2588b4(0xbd)](_0x4ae936))!==null){const _0x1a9617=_0x3fc8b3[0x1]?.[_0x2588b4(0xb0)]();_0x1a9617&&_0x1db8e5[_0x2588b4(0xb5)](_0x1a9617);}}const _0x570bae=[..._0x1db8e5][_0x2588b4(0x82)](getPackageName)[_0x2588b4(0x9f)](_0x679993=>!ALLOWED_REACT_MODULE_IMPORTS[_0x2588b4(0xc7)](_0x679993));if(_0x570bae['length']>0x0)throw CliErrors[_0x2588b4(0x87)](_0x2588b4(0xb8)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x2588b4(0xb6)+[...new Set(_0x570bae)]['join'](',\x20'));}export function validateReactModuleSource(_0x56576a){const _0x34b320=a7_0x17b876;if(!_0x56576a[_0x34b320(0xb0)]())throw CliErrors[_0x34b320(0x87)](_0x34b320(0x97));if(PAGE_LEVEL_PATTERNS[_0x34b320(0xc2)](_0x2b7bb2=>_0x2b7bb2[_0x34b320(0xc8)](_0x56576a)))throw CliErrors[_0x34b320(0x87)](_0x34b320(0xd0));validateAllowedImports(_0x56576a);}function buildArtifactInput(_0x4925f3){const _0x1dd5ba=a7_0x17b876,_0x1f77b8=readSourceFile(_0x4925f3[_0x1dd5ba(0x8b)](_0x1dd5ba(0xbf))),_0x214ec3=_0x4925f3[_0x1dd5ba(0x8b)](_0x1dd5ba(0x81))['trim'](),_0x75d7da=parseMetadata(_0x4925f3[_0x1dd5ba(0x8b)](_0x1dd5ba(0x88)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x214ec3?{'name':_0x214ec3}:{},'content':_0x1f77b8,..._0x75d7da?{'metadata':_0x75d7da}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x1717e5){const _0x116f7d=a7_0x17b876;return{'id':_0x1717e5['id'],'name':_0x1717e5[_0x116f7d(0x81)],'artifactType':_0x1717e5[_0x116f7d(0xbe)],'source':_0x1717e5['source'],'favorite':_0x1717e5['favorite'],'deleted':_0x1717e5[_0x116f7d(0xad)],'createTime':_0x1717e5[_0x116f7d(0xc0)],'updateTime':_0x1717e5[_0x116f7d(0x83)]};}function detailArtifact(_0x5ee499){const _0x320984=a7_0x17b876;return{'id':_0x5ee499['id'],'appCode':_0x5ee499[_0x320984(0xab)],'name':_0x5ee499[_0x320984(0x81)],'artifactType':_0x5ee499['artifactType'],'source':_0x5ee499[_0x320984(0xa7)],'favorite':_0x5ee499[_0x320984(0xc5)],'deleted':_0x5ee499['deleted'],'content':_0x5ee499[_0x320984(0x7f)]??'','compiledContent':_0x5ee499[_0x320984(0xba)],'metadata':_0x5ee499[_0x320984(0x88)]??{},'createTime':_0x5ee499['createTime'],'updateTime':_0x5ee499[_0x320984(0x83)]};}function readFavoriteFlag(_0x163b95){const _0x5a6992=a7_0x17b876,_0x2a46f2=_0x163b95[_0x5a6992(0xa0)](_0x5a6992(0xc5));return _0x2a46f2===undefined||_0x2a46f2===null||_0x2a46f2===''?undefined:_0x163b95[_0x5a6992(0xcc)]('favorite');}function a7_0x8da4(_0x46182f,_0x1913a4){_0x46182f=_0x46182f-0x7d;const _0x522052=a7_0x5220();let _0x8da416=_0x522052[_0x46182f];return _0x8da416;}const artifactList={'service':a7_0x17b876(0xcd),'command':a7_0x17b876(0x84),'description':a7_0x17b876(0x98),'risk':a7_0x17b876(0x94),'flags':[{'name':a7_0x17b876(0xa7),'type':a7_0x17b876(0x95),'description':a7_0x17b876(0x8e)},{'name':'favorite','type':'boolean','description':a7_0x17b876(0x80)},VERBOSE_FLAG],async 'execute'(_0x4ad915){const _0x2ed87a=a7_0x17b876,_0x596087=await listRuntimeArtifacts(_0x4ad915[_0x2ed87a(0xab)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4ad915[_0x2ed87a(0x8b)](_0x2ed87a(0xa7))?{'source':_0x4ad915[_0x2ed87a(0x8b)](_0x2ed87a(0xa7))}:{},...readFavoriteFlag(_0x4ad915)!==undefined?{'favorite':readFavoriteFlag(_0x4ad915)}:{}});return{'ok':!![],'data':{'total':_0x596087['length'],'items':_0x4ad915['bool'](_0x2ed87a(0x9c))?_0x596087:_0x596087[_0x2ed87a(0x82)](summarizeArtifact)}};}},artifactDetail={'service':a7_0x17b876(0xcd),'command':a7_0x17b876(0xac),'description':a7_0x17b876(0x92),'risk':a7_0x17b876(0x94),'flags':[{...ID_FLAG,'description':a7_0x17b876(0xc1)}],async 'execute'(_0x36454f){const _0x43a484=a7_0x17b876,_0x5da06f=await getRuntimeArtifact(_0x36454f['num']('id'),_0x36454f[_0x43a484(0xab)]);return{'ok':!![],'data':detailArtifact(_0x5da06f)};}},artifactCreate={'service':'artifact','command':a7_0x17b876(0x9e),'description':'Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a7_0x17b876(0x8d),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x4cb23a){const _0x3e4d8a=a7_0x17b876,_0x59056b=buildArtifactInput(_0x4cb23a),_0x59066c=await createRuntimeArtifact(_0x4cb23a['appCode'],_0x59056b);return{'ok':!![],'data':detailArtifact(_0x59066c),'message':_0x3e4d8a(0xa2)+_0x59066c['id']+(_0x59066c[_0x3e4d8a(0x81)]?'\x20('+_0x59066c[_0x3e4d8a(0x81)]+')':'')};},async 'dryRun'(_0x2a7b50){const _0x3e41aa=a7_0x17b876,_0x4e20dc=buildArtifactInput(_0x2a7b50);return dryRun(_0x3e41aa(0x93),_0x3e41aa(0x8c))[_0x3e41aa(0xae)]({'appCode':_0x2a7b50[_0x3e41aa(0xab)],..._0x4e20dc})['description'](_0x3e41aa(0xaf))[_0x3e41aa(0xb2)]();}},artifactUpdate={'service':a7_0x17b876(0xcd),'command':a7_0x17b876(0xbc),'description':a7_0x17b876(0xa1),'risk':a7_0x17b876(0x8d),'flags':[{...ID_FLAG,'description':'Artifact\x20ID'},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x47cd68){const _0x557c43=a7_0x17b876,_0x28cffe=_0x47cd68[_0x557c43(0x8f)]('id'),_0x39557f=buildArtifactInput(_0x47cd68),_0x12d16c=await updateRuntimeArtifact(_0x28cffe,_0x47cd68['appCode'],_0x39557f);return{'ok':!![],'data':detailArtifact(_0x12d16c),'message':_0x557c43(0xb3)+_0x12d16c['id']+(_0x12d16c['name']?'\x20('+_0x12d16c[_0x557c43(0x81)]+')':'')};},async 'dryRun'(_0x2be995){const _0x2e0f7a=a7_0x17b876,_0x2f4933=_0x2be995['num']('id'),_0x5a0fad=buildArtifactInput(_0x2be995);return dryRun(_0x2e0f7a(0x93),_0x2e0f7a(0xb1)+_0x2f4933+'/update')[_0x2e0f7a(0xae)]({'appCode':_0x2be995['appCode'],..._0x5a0fad})[_0x2e0f7a(0x8a)](_0x2e0f7a(0xb4)+_0x2f4933)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a8_0x329f89=a8_0x202d;(function(_0x199344,_0x331106){const _0xd8eb33=a8_0x202d,_0x4b39ec=_0x199344();while(!![]){try{const _0x33d788=parseInt(_0xd8eb33(0x213))/0x1+-parseInt(_0xd8eb33(0x1fd))/0x2*(parseInt(_0xd8eb33(0x1c1))/0x3)+-parseInt(_0xd8eb33(0x1dd))/0x4+-parseInt(_0xd8eb33(0x1f4))/0x5*(-parseInt(_0xd8eb33(0x1ee))/0x6)+parseInt(_0xd8eb33(0x1c6))/0x7*(-parseInt(_0xd8eb33(0x1db))/0x8)+-parseInt(_0xd8eb33(0x1ff))/0x9*(parseInt(_0xd8eb33(0x20e))/0xa)+parseInt(_0xd8eb33(0x1e1))/0xb;if(_0x33d788===_0x331106)break;else _0x4b39ec['push'](_0x4b39ec['shift']());}catch(_0x59cb9b){_0x4b39ec['push'](_0x4b39ec['shift']());}}}(a8_0x4898,0x203f8));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a8_0x4898(){const _0x437a3c=['3ZAOGxu','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','AccessKey:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>','720881MLPfYS','boolean','Shorthand\x20for\x20--access-key','daily','bool','\x20scope.','\x20config.','\x20auth\x20status','No\x20AccessKey\x20found\x20in\x20','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','accessKey','AccessKey\x20cleared\x20from\x20','Auth\x20config\x20reinitialized\x20in\x20','length','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','ClientAk','Then\x20verify\x20with:\x20','auth','nonInteractive','16HjKpnE','AccessKey\x20(ak_xxx...)','124168ydZPCF','Show\x20current\x20authentication\x20status','Read\x20from\x20global\x20config\x20(default)','\x20config','3631441HjIgSl','\x20(via\x20','write','join','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','global','userCenterDisplayName','trim','stdout','global-default','\x20doctor','validation','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','132FzotSe','cancelled','\x20env\x20var','isTTY','yes','ACCESS_KEY','47045QVPvbp','status','\x20Verify:\x20','read','Missing\x20accessKey.','info','string','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Auth\x20mode:\x20','248174qkgxVG','push','66042pfaJkq','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','env','Clear\x20accessKey\x20from\x20config','production','init','access-key','Option\x20A:\x20','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','=ak_xxx','login','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','stdin','AccessKey\x20saved\x20to\x20','str','90ydpfqM','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Tip:\x20you\x20can\x20also\x20run:','project','slice','22096Yditma','\x20Current\x20env:\x20','Write\x20to\x20global\x20config\x20(default)','development','Option\x20C:\x20environment\x20variable'];a8_0x4898=function(){return _0x437a3c;};return a8_0x4898();}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';function a8_0x202d(_0x1df3ec,_0x120221){_0x1df3ec=_0x1df3ec-0x1bd;const _0x4898f6=a8_0x4898();let _0x202def=_0x4898f6[_0x1df3ec];return _0x202def;}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 _0x4defec=a8_0x202d;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x4defec(0x1e7)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x4defec(0x210)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x4defec(0x1c5));}function buildAccessKeySetupGuide(){const _0x29b0b4=a8_0x202d;return[_0x29b0b4(0x1c2)+PRODUCT_CONFIG[_0x29b0b4(0x1e7)]+':',USER_ACCESS_KEY_CREATE_URL,_0x29b0b4(0x20f)+CLI_BIN_NAME+_0x29b0b4(0x20a)][_0x29b0b4(0x1e4)]('\x0a');}function canPromptForAccessKey(_0x352443){const _0x1f9305=a8_0x202d;return!_0x352443['nonInteractive']&&process[_0x1f9305(0x20b)]['isTTY']!==![]&&process[_0x1f9305(0x1e9)][_0x1f9305(0x1f1)]!==![];}function resolveAuthScopeFlags(_0x390d42){const _0x1be5e5=a8_0x202d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x390d42[_0x1be5e5(0x1ca)](_0x1be5e5(0x1e6)),'explicitProject':_0x390d42[_0x1be5e5(0x1ca)](_0x1be5e5(0x211)),'policy':_0x1be5e5(0x1ea)}));}async function resolveAuthWriteInput(_0x4bd6a9){const _0x540ed4=a8_0x202d;let _0x5d287d=(_0x4bd6a9[_0x540ed4(0x20d)](_0x540ed4(0x205))||_0x4bd6a9[_0x540ed4(0x20d)]('ak')||'')[_0x540ed4(0x1e8)]();const _0x5bcbfb=(_0x4bd6a9[_0x540ed4(0x20d)](_0x540ed4(0x201))||'')[_0x540ed4(0x1e8)]();if(!_0x5d287d&&canPromptForAccessKey(_0x4bd6a9))try{showAccessKeyCreateHint(),_0x5d287d=await promptAccessKey('');}catch(_0x3f94fd){if(isAbortPrompt(_0x3f94fd))throw CliErrors[_0x540ed4(0x1ef)]();throw _0x3f94fd;}if(!_0x5d287d)throw CliErrors[_0x540ed4(0x1ec)](_0x540ed4(0x1f8),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x5d287d))throw CliErrors[_0x540ed4(0x1ec)]('Invalid\x20accessKey\x20format:\x20\x22'+_0x5d287d+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x5bcbfb)return{'accessKey':_0x5d287d};const _0x42dadc=normalizeEnv(_0x5bcbfb);return{'accessKey':_0x5d287d,'env':isDaily(_0x42dadc)?_0x540ed4(0x1c9):isDev(_0x42dadc)?_0x540ed4(0x1bf):_0x540ed4(0x203)};}export const authDefinitions=[{'service':a8_0x329f89(0x1d9),'command':a8_0x329f89(0x209),'description':a8_0x329f89(0x207),'risk':a8_0x329f89(0x1e3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x329f89(0x205),'type':'string','description':a8_0x329f89(0x1dc)},{'name':'ak','type':a8_0x329f89(0x1fa),'description':'Shorthand\x20for\x20--access-key'},{'name':a8_0x329f89(0x1e6),'type':a8_0x329f89(0x1c7),'description':a8_0x329f89(0x1be),'default':!![]},{'name':a8_0x329f89(0x211),'type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x27067b){const _0x18aa18=a8_0x329f89;if(_0x27067b[_0x18aa18(0x1ca)](_0x18aa18(0x1f2)))throw CliErrors['validation']('`auth\x20login`\x20does\x20not\x20support\x20--yes.','Use\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x18aa18(0x1d5));const _0xe57fdd=(_0x27067b['str']('access-key')||_0x27067b[_0x18aa18(0x20d)]('ak')||'')[_0x18aa18(0x1e8)]();if(!_0xe57fdd&&_0x27067b[_0x18aa18(0x1da)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x2612f2=await resolveAuthWriteInput(_0x27067b),_0x236fca=resolveAuthScopeFlags(_0x27067b),_0x38baed=readScopedConfig(_0x236fca);_0x38baed[_0x18aa18(0x1d0)]=_0x2612f2['accessKey'];_0x2612f2[_0x18aa18(0x201)]&&(_0x38baed[_0x18aa18(0x201)]=_0x2612f2[_0x18aa18(0x201)]);writeScopedConfig(_0x38baed,_0x236fca);const _0xa6af97=_0x236fca[_0x18aa18(0x1e6)]?_0x18aa18(0x1e6):_0x18aa18(0x211),_0x282294=_0x38baed['env']?_0x18aa18(0x1bd)+_0x38baed[_0x18aa18(0x201)]+'.':'';return{'ok':!![],'message':_0x18aa18(0x20c)+_0xa6af97+_0x18aa18(0x1cc)+_0x282294+'\x20Verify:\x20'+CLI_BIN_NAME+_0x18aa18(0x1cd)};}},{'service':a8_0x329f89(0x1d9),'command':a8_0x329f89(0x204),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a8_0x329f89(0x1e3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x329f89(0x205),'type':a8_0x329f89(0x1fa),'description':a8_0x329f89(0x1dc)},{'name':'ak','type':'string','description':a8_0x329f89(0x1c8)},{'name':a8_0x329f89(0x201),'type':a8_0x329f89(0x1fa),'description':a8_0x329f89(0x1d4)},{'name':'global','type':a8_0x329f89(0x1c7),'description':a8_0x329f89(0x1be),'default':!![]},{'name':a8_0x329f89(0x211),'type':a8_0x329f89(0x1c7),'description':a8_0x329f89(0x200),'default':![]}],async 'execute'(_0x2b7a19){const _0x18ce10=a8_0x329f89,_0x273dd1=await resolveAuthWriteInput(_0x2b7a19),_0x2a04f4=resolveAuthScopeFlags(_0x2b7a19),_0x53ed7a={'accessKey':_0x273dd1[_0x18ce10(0x1d0)]};_0x273dd1[_0x18ce10(0x201)]&&(_0x53ed7a[_0x18ce10(0x201)]=_0x273dd1['env']);writeScopedConfig(_0x53ed7a,_0x2a04f4);const _0x150353=_0x2a04f4[_0x18ce10(0x1e6)]?_0x18ce10(0x1e6):'project',_0xf07a8c=_0x53ed7a[_0x18ce10(0x201)]?_0x18ce10(0x1bd)+_0x53ed7a[_0x18ce10(0x201)]+'.':'';return{'ok':!![],'message':_0x18ce10(0x1d2)+_0x150353+_0x18ce10(0x1cb)+_0xf07a8c+_0x18ce10(0x1f6)+CLI_BIN_NAME+_0x18ce10(0x1cd)};}},{'service':a8_0x329f89(0x1d9),'command':'logout','description':a8_0x329f89(0x202),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x329f89(0x1e6),'type':a8_0x329f89(0x1c7),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a8_0x329f89(0x211),'type':a8_0x329f89(0x1c7),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x516808){const _0x4fe0b8=a8_0x329f89,_0x392664=resolveAuthScopeFlags(_0x516808),_0x47774b=readScopedConfig(_0x392664),_0x36d803=!!_0x47774b[_0x4fe0b8(0x1d0)];delete _0x47774b[_0x4fe0b8(0x1d0)],writeScopedConfig(_0x47774b,_0x392664);const _0x22ff89=_0x392664[_0x4fe0b8(0x1e6)]?_0x4fe0b8(0x1e6):_0x4fe0b8(0x211);if(_0x36d803)return{'ok':!![],'message':_0x4fe0b8(0x1d1)+_0x22ff89+_0x4fe0b8(0x1cc)};return{'ok':!![],'message':_0x4fe0b8(0x1ce)+_0x22ff89+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a8_0x329f89(0x1d9),'command':a8_0x329f89(0x1f5),'description':a8_0x329f89(0x1de),'risk':a8_0x329f89(0x1f7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a8_0x329f89(0x1c7),'description':a8_0x329f89(0x1df),'default':!![]},{'name':a8_0x329f89(0x211),'type':a8_0x329f89(0x1c7),'description':a8_0x329f89(0x1c4),'default':![]}],async 'execute'(_0x23976d){const _0x543229=a8_0x329f89,_0x51e287=resolveAuthScopeFlags(_0x23976d),_0x5c3001=readScopedConfig(_0x51e287),_0x60e594=productEnvName(_0x543229(0x1f3)),_0x51ddc2=productEnv(_0x543229(0x1f3))||undefined,_0x30f7b5=_0x5c3001[_0x543229(0x1d0)]||undefined,_0x5a2a8f=_0x51ddc2||_0x30f7b5,_0x428dcd=_0x51ddc2?_0x60e594+_0x543229(0x1f0):_0x30f7b5?(_0x51e287[_0x543229(0x1e6)]?_0x543229(0x1e6):'project')+_0x543229(0x1e0):null,_0xa721a4=[_0x543229(0x1fc)+AUTH_MODE[_0x543229(0x1d7)]];if(_0x5a2a8f){const _0x55eff0=_0x5a2a8f[_0x543229(0x1d3)]>0x8?''+_0x5a2a8f[_0x543229(0x212)](0x0,0x8)+'*'['repeat'](_0x5a2a8f[_0x543229(0x1d3)]-0x8):_0x5a2a8f;_0xa721a4[_0x543229(0x1fe)](_0x543229(0x1c3)+_0x55eff0+(_0x428dcd?_0x543229(0x1e2)+_0x428dcd+')':''));}return!_0x5a2a8f&&(_0xa721a4[_0x543229(0x1fe)](''),_0xa721a4[_0x543229(0x1fe)](_0x543229(0x1e5)),_0xa721a4[_0x543229(0x1fe)](''),_0xa721a4['push'](_0x543229(0x206)+CLI_BIN_NAME+_0x543229(0x1ed)),_0xa721a4['push'](''),_0xa721a4[_0x543229(0x1fe)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG['newConfigFileName']+')'),_0xa721a4[_0x543229(0x1fe)](_0x543229(0x1cf)),_0xa721a4['push'](''),_0xa721a4[_0x543229(0x1fe)](_0x543229(0x1c0)),_0xa721a4[_0x543229(0x1fe)]('\x20\x20export\x20'+_0x60e594+_0x543229(0x208)),_0xa721a4['push'](''),_0xa721a4[_0x543229(0x1fe)](_0x543229(0x1d8)+CLI_BIN_NAME+_0x543229(0x1cd)),_0xa721a4[_0x543229(0x1fe)](_0x543229(0x1d6)+CLI_BIN_NAME+_0x543229(0x1eb))),{'ok':!![],'message':_0xa721a4['join']('\x0a')};}},{'service':a8_0x329f89(0x1d9),'command':a8_0x329f89(0x1f9),'description':a8_0x329f89(0x1fb),'risk':a8_0x329f89(0x1f7),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x40b08a){const _0x465eaa=a8_0x329f89,_0x46689c=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x46689c,'meta':{'env':_0x40b08a['envName']??_0x465eaa(0x203)}}};}}];
|
|
1
|
+
const a8_0x5a53b1=a8_0x26f5;(function(_0x4caca4,_0x5273d9){const _0x213b93=a8_0x26f5,_0x1de670=_0x4caca4();while(!![]){try{const _0x577088=-parseInt(_0x213b93(0xe5))/0x1+parseInt(_0x213b93(0xc8))/0x2*(-parseInt(_0x213b93(0xc3))/0x3)+-parseInt(_0x213b93(0xf0))/0x4*(parseInt(_0x213b93(0xea))/0x5)+parseInt(_0x213b93(0xf1))/0x6*(-parseInt(_0x213b93(0xa3))/0x7)+-parseInt(_0x213b93(0xb2))/0x8*(-parseInt(_0x213b93(0xd5))/0x9)+-parseInt(_0x213b93(0xde))/0xa+parseInt(_0x213b93(0xa5))/0xb;if(_0x577088===_0x5273d9)break;else _0x1de670['push'](_0x1de670['shift']());}catch(_0x338be8){_0x1de670['push'](_0x1de670['shift']());}}}(a8_0x3cc6,0x874e7));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a8_0x3cc6(){const _0x49e048=['`auth\x20login`\x20does\x20not\x20support\x20--yes.','push','=ak_xxx','\x20Current\x20env:\x20','write','Write\x20to\x20global\x20config\x20(default)','daily','Option\x20A:\x20','Tip:\x20you\x20can\x20also\x20run:','read','accessKey','AccessKey\x20saved\x20to\x20','21dAVURn','Then\x20verify\x20with:\x20','Use\x20`','isTTY','Shorthand\x20for\x20--access-key','60442lMQNxq','slice','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','No\x20AccessKey\x20found\x20in\x20','AccessKey\x20cleared\x20from\x20','\x20auth\x20status','AccessKey:\x20','development','stdout','join','trim','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','9CAUTeV','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','\x20Verify:\x20','Option\x20B:\x20apps\x20config\x20(','init','str','auth','4386910mLkgAk','test','\x20env\x20var','global','Invalid\x20accessKey\x20format:\x20\x22','Clear\x20accessKey\x20from\x20config','project','876383CpzdDv','\x20config','cancelled','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Auth\x20config\x20reinitialized\x20in\x20','505265mDVtiv','boolean','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20config.','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','access-key','24HJmRVp','12vBOhVg','\x20\x20export\x20','\x20(via\x20','status','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Clear\x20from\x20global\x20config\x20(default)','string','production','Show\x20current\x20authentication\x20status','nonInteractive','userCenterDisplayName','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Read\x20from\x20global\x20config\x20(default)','72457KpqHnC','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','20007383LmJYjw','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','login','validation','bool','length','repeat','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','AccessKey\x20(ak_xxx...)','\x20config.\x20Nothing\x20to\x20clear.','\x20scope.','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Option\x20C:\x20environment\x20variable','7112024KrEsNg','yes','ACCESS_KEY','info','env'];a8_0x3cc6=function(){return _0x49e048;};return a8_0x3cc6();}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a8_0x26f5(_0x5b2717,_0x17b1cd){_0x5b2717=_0x5b2717-0xa1;const _0x3cc61f=a8_0x3cc6();let _0x26f5aa=_0x3cc61f[_0x5b2717];return _0x26f5aa;}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x32e24f=a8_0x26f5;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x32e24f(0xfb)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x32e24f(0xbf)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x32e24f(0xe8));}function buildAccessKeySetupGuide(){const _0x4261da=a8_0x26f5;return[_0x4261da(0xd6)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x4261da(0xfc)+CLI_BIN_NAME+_0x4261da(0xcb)][_0x4261da(0xd2)]('\x0a');}function canPromptForAccessKey(_0x482a2d){const _0x408e21=a8_0x26f5;return!_0x482a2d[_0x408e21(0xfa)]&&process['stdin'][_0x408e21(0xc6)]!==![]&&process[_0x408e21(0xd1)][_0x408e21(0xc6)]!==![];}function resolveAuthScopeFlags(_0x6a1c60){const _0x4c4716=a8_0x26f5;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x6a1c60[_0x4c4716(0xa9)](_0x4c4716(0xe1)),'explicitProject':_0x6a1c60[_0x4c4716(0xa9)](_0x4c4716(0xe4)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x500025){const _0x501268=a8_0x26f5;let _0x36eb9f=(_0x500025[_0x501268(0xdc)]('access-key')||_0x500025[_0x501268(0xdc)]('ak')||'')[_0x501268(0xd3)]();const _0x59111c=(_0x500025[_0x501268(0xdc)]('env')||'')[_0x501268(0xd3)]();if(!_0x36eb9f&&canPromptForAccessKey(_0x500025))try{showAccessKeyCreateHint(),_0x36eb9f=await promptAccessKey('');}catch(_0x249d8f){if(isAbortPrompt(_0x249d8f))throw CliErrors[_0x501268(0xe7)]();throw _0x249d8f;}if(!_0x36eb9f)throw CliErrors[_0x501268(0xa8)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x501268(0xdf)](_0x36eb9f))throw CliErrors['validation'](_0x501268(0xe2)+_0x36eb9f+'\x22',_0x501268(0xd7));if(!_0x59111c)return{'accessKey':_0x36eb9f};const _0x2d6672=normalizeEnv(_0x59111c);return{'accessKey':_0x36eb9f,'env':isDaily(_0x2d6672)?_0x501268(0xbd):isDev(_0x2d6672)?_0x501268(0xd0):_0x501268(0xf8)};}export const authDefinitions=[{'service':a8_0x5a53b1(0xdd),'command':a8_0x5a53b1(0xa7),'description':a8_0x5a53b1(0xf5),'risk':a8_0x5a53b1(0xbb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x5a53b1(0xef),'type':a8_0x5a53b1(0xf7),'description':a8_0x5a53b1(0xad)},{'name':'ak','type':a8_0x5a53b1(0xf7),'description':a8_0x5a53b1(0xc7)},{'name':a8_0x5a53b1(0xe1),'type':a8_0x5a53b1(0xeb),'description':a8_0x5a53b1(0xbc),'default':!![]},{'name':a8_0x5a53b1(0xe4),'type':a8_0x5a53b1(0xeb),'description':a8_0x5a53b1(0xa1),'default':![]}],async 'execute'(_0x5919c8){const _0x10637e=a8_0x5a53b1;if(_0x5919c8[_0x10637e(0xa9)](_0x10637e(0xb3)))throw CliErrors[_0x10637e(0xa8)](_0x10637e(0xb7),_0x10637e(0xc5)+CLI_BIN_NAME+_0x10637e(0xa6)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x20ddc4=(_0x5919c8[_0x10637e(0xdc)](_0x10637e(0xef))||_0x5919c8[_0x10637e(0xdc)]('ak')||'')[_0x10637e(0xd3)]();if(!_0x20ddc4&&_0x5919c8[_0x10637e(0xfa)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x44eaf3=await resolveAuthWriteInput(_0x5919c8),_0x28b922=resolveAuthScopeFlags(_0x5919c8),_0x497dce=readScopedConfig(_0x28b922);_0x497dce[_0x10637e(0xc1)]=_0x44eaf3[_0x10637e(0xc1)];_0x44eaf3['env']&&(_0x497dce[_0x10637e(0xb6)]=_0x44eaf3[_0x10637e(0xb6)]);writeScopedConfig(_0x497dce,_0x28b922);const _0x3fe0de=_0x28b922[_0x10637e(0xe1)]?_0x10637e(0xe1):_0x10637e(0xe4),_0xbbab7=_0x497dce[_0x10637e(0xb6)]?_0x10637e(0xba)+_0x497dce['env']+'.':'';return{'ok':!![],'message':_0x10637e(0xc2)+_0x3fe0de+_0x10637e(0xed)+_0xbbab7+_0x10637e(0xd9)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a8_0x5a53b1(0xdd),'command':a8_0x5a53b1(0xdb),'description':a8_0x5a53b1(0xd8),'risk':a8_0x5a53b1(0xbb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x5a53b1(0xef),'type':a8_0x5a53b1(0xf7),'description':a8_0x5a53b1(0xad)},{'name':'ak','type':a8_0x5a53b1(0xf7),'description':a8_0x5a53b1(0xc7)},{'name':'env','type':a8_0x5a53b1(0xf7),'description':a8_0x5a53b1(0xa4)},{'name':a8_0x5a53b1(0xe1),'type':a8_0x5a53b1(0xeb),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a8_0x5a53b1(0xe4),'type':a8_0x5a53b1(0xeb),'description':a8_0x5a53b1(0xa1),'default':![]}],async 'execute'(_0x22e4d1){const _0x1e1cf9=a8_0x5a53b1,_0x2479e5=await resolveAuthWriteInput(_0x22e4d1),_0x3bcc86=resolveAuthScopeFlags(_0x22e4d1),_0x50cea9={'accessKey':_0x2479e5[_0x1e1cf9(0xc1)]};_0x2479e5['env']&&(_0x50cea9['env']=_0x2479e5[_0x1e1cf9(0xb6)]);writeScopedConfig(_0x50cea9,_0x3bcc86);const _0x872691=_0x3bcc86[_0x1e1cf9(0xe1)]?_0x1e1cf9(0xe1):'project',_0x4040d4=_0x50cea9[_0x1e1cf9(0xb6)]?'\x20Current\x20env:\x20'+_0x50cea9[_0x1e1cf9(0xb6)]+'.':'';return{'ok':!![],'message':_0x1e1cf9(0xe9)+_0x872691+_0x1e1cf9(0xaf)+_0x4040d4+'\x20Verify:\x20'+CLI_BIN_NAME+_0x1e1cf9(0xce)};}},{'service':a8_0x5a53b1(0xdd),'command':'logout','description':a8_0x5a53b1(0xe3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a8_0x5a53b1(0xeb),'description':a8_0x5a53b1(0xf6),'default':!![]},{'name':a8_0x5a53b1(0xe4),'type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x251e62){const _0x5b2b52=a8_0x5a53b1,_0x383695=resolveAuthScopeFlags(_0x251e62),_0x6815a8=readScopedConfig(_0x383695),_0x3d530e=!!_0x6815a8['accessKey'];delete _0x6815a8[_0x5b2b52(0xc1)],writeScopedConfig(_0x6815a8,_0x383695);const _0x599d52=_0x383695[_0x5b2b52(0xe1)]?_0x5b2b52(0xe1):'project';if(_0x3d530e)return{'ok':!![],'message':_0x5b2b52(0xcd)+_0x599d52+_0x5b2b52(0xed)};return{'ok':!![],'message':_0x5b2b52(0xcc)+_0x599d52+_0x5b2b52(0xae)};}},{'service':a8_0x5a53b1(0xdd),'command':a8_0x5a53b1(0xf4),'description':a8_0x5a53b1(0xf9),'risk':a8_0x5a53b1(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a8_0x5a53b1(0xe1),'type':a8_0x5a53b1(0xeb),'description':a8_0x5a53b1(0xa2),'default':!![]},{'name':a8_0x5a53b1(0xe4),'type':'boolean','description':a8_0x5a53b1(0xac),'default':![]}],async 'execute'(_0x3f0044){const _0x3b624b=a8_0x5a53b1,_0x3f3dd8=resolveAuthScopeFlags(_0x3f0044),_0x518958=readScopedConfig(_0x3f3dd8),_0x1ef045=productEnvName(_0x3b624b(0xb4)),_0x2318b4=productEnv(_0x3b624b(0xb4))||undefined,_0x7a7824=_0x518958['accessKey']||undefined,_0x532dc2=_0x2318b4||_0x7a7824,_0x4b4f5b=_0x2318b4?_0x1ef045+_0x3b624b(0xe0):_0x7a7824?(_0x3f3dd8['global']?_0x3b624b(0xe1):_0x3b624b(0xe4))+_0x3b624b(0xe6):null,_0x34a3f3=['Auth\x20mode:\x20'+AUTH_MODE['ClientAk']];if(_0x532dc2){const _0x1d8335=_0x532dc2[_0x3b624b(0xaa)]>0x8?''+_0x532dc2[_0x3b624b(0xc9)](0x0,0x8)+'*'[_0x3b624b(0xab)](_0x532dc2[_0x3b624b(0xaa)]-0x8):_0x532dc2;_0x34a3f3[_0x3b624b(0xb8)](_0x3b624b(0xcf)+_0x1d8335+(_0x4b4f5b?_0x3b624b(0xf3)+_0x4b4f5b+')':''));}return!_0x532dc2&&(_0x34a3f3[_0x3b624b(0xb8)](''),_0x34a3f3[_0x3b624b(0xb8)](_0x3b624b(0xca)),_0x34a3f3['push'](''),_0x34a3f3[_0x3b624b(0xb8)](_0x3b624b(0xbe)+CLI_BIN_NAME+_0x3b624b(0xec)),_0x34a3f3[_0x3b624b(0xb8)](''),_0x34a3f3[_0x3b624b(0xb8)](_0x3b624b(0xda)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x34a3f3['push'](_0x3b624b(0xb0)),_0x34a3f3[_0x3b624b(0xb8)](''),_0x34a3f3['push'](_0x3b624b(0xb1)),_0x34a3f3[_0x3b624b(0xb8)](_0x3b624b(0xf2)+_0x1ef045+_0x3b624b(0xb9)),_0x34a3f3[_0x3b624b(0xb8)](''),_0x34a3f3[_0x3b624b(0xb8)](_0x3b624b(0xc4)+CLI_BIN_NAME+_0x3b624b(0xce)),_0x34a3f3[_0x3b624b(0xb8)](_0x3b624b(0xd4)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x34a3f3[_0x3b624b(0xd2)]('\x0a')};}},{'service':'auth','command':a8_0x5a53b1(0xb5),'description':a8_0x5a53b1(0xee),'risk':a8_0x5a53b1(0xc0),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4e527c){const _0x397a7c=a8_0x5a53b1,_0x60e5d3=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x60e5d3,'meta':{'env':_0x4e527c['envName']??_0x397a7c(0xf8)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xef24a4,_0x1d9be4){const _0x42c35f=a9_0x5c5d,_0x2b9ba8=_0xef24a4();while(!![]){try{const _0x3545bf=-parseInt(_0x42c35f(0x93))/0x1*(-parseInt(_0x42c35f(0x90))/0x2)+-parseInt(_0x42c35f(0x8c))/0x3*(parseInt(_0x42c35f(0x95))/0x4)+-parseInt(_0x42c35f(0x97))/0x5+parseInt(_0x42c35f(0x8d))/0x6*(-parseInt(_0x42c35f(0x8f))/0x7)+parseInt(_0x42c35f(0x9c))/0x8*(parseInt(_0x42c35f(0x9b))/0x9)+parseInt(_0x42c35f(0x87))/0xa+parseInt(_0x42c35f(0x92))/0xb*(parseInt(_0x42c35f(0x8a))/0xc);if(_0x3545bf===_0x1d9be4)break;else _0x2b9ba8['push'](_0x2b9ba8['shift']());}catch(_0x5df14a){_0x2b9ba8['push'](_0x2b9ba8['shift']());}}}(a9_0x3fce,0xdf4b3));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x16ce9e=a9_0x5c5d;super(_0x16ce9e(0x96)),this[_0x16ce9e(0x91)]=_0x16ce9e(0x8e);}}function createSafeRl(){const _0x481c5d=a9_0x5c5d,_0xe08f7d=createInterface({'input':process['stdin'],'output':process[_0x481c5d(0x89)]});let _0x1bbe86;const _0x54351b=new Promise((_0x2120ae,_0x1c4921)=>{const _0x570ce0=_0x481c5d;_0x1bbe86=()=>{const _0x8865f8=a9_0x5c5d;_0x1bbe86&&(_0xe08f7d[_0x8865f8(0x8b)](_0x8865f8(0x94),_0x1bbe86),_0x1bbe86=undefined);try{_0xe08f7d['close']();}catch{}_0x1c4921(new AbortPrompt());},_0xe08f7d[_0x570ce0(0x99)](_0x570ce0(0x94),_0x1bbe86);}),_0x274920=()=>{const _0x50e136=_0x481c5d;_0x1bbe86&&(_0xe08f7d['removeListener'](_0x50e136(0x94),_0x1bbe86),_0x1bbe86=undefined);try{_0xe08f7d[_0x50e136(0x98)]();}catch{}};return{'rl':_0xe08f7d,'abortPromise':_0x54351b,'disposeSuccess':_0x274920};}function a9_0x5c5d(_0x517e93,_0x4417ad){_0x517e93=_0x517e93-0x87;const _0x3fce30=a9_0x3fce();let _0x5c5dd8=_0x3fce30[_0x517e93];return _0x5c5dd8;}export async function promptAccessKey(_0x1c5663=''){const {rl:_0x4ad0dd,abortPromise:_0x3f87a2,disposeSuccess:_0x36a2b6}=createSafeRl(),_0x5f36bc=new Promise(_0x141544=>{const _0x47174e=a9_0x5c5d,_0x12aeb7=_0x1c5663?_0x47174e(0x9a)+_0x1c5663+'):\x20':_0x47174e(0x88);_0x4ad0dd['question'](_0x12aeb7,_0x2b7301=>{_0x36a2b6(),_0x141544(_0x2b7301['trim']()||_0x1c5663);});});return Promise['race']([_0x5f36bc,_0x3f87a2]);}function a9_0x3fce(){const _0x382b51=['close','once','AccessKey\x20(','9ogiOeq','9425200sxdRcc','895920IGsipT','AccessKey\x20(paste\x20ak_...):\x20','stdout','228YAcczP','removeListener','876ODLVYu','2479170HaneAI','AbortPrompt','7JLdLRC','10RsjTHZ','name','1310474YaSgNd','184699aohxXd','SIGINT','20884ZqggDj','User\x20aborted\x20prompt','8012225MByUzr'];a9_0x3fce=function(){return _0x382b51;};return a9_0x3fce();}export function isAbortPrompt(_0x38bb4f){const _0x21b489=a9_0x5c5d;return _0x38bb4f instanceof Error&&_0x38bb4f[_0x21b489(0x91)]===_0x21b489(0x8e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a10_0x290473=a10_0x140a;(function(_0x4ec78b,_0x78da33){const _0x234fcb=a10_0x140a,_0xc16552=_0x4ec78b();while(!![]){try{const _0x1d67ae=-parseInt(_0x234fcb(0x1af))/0x1+parseInt(_0x234fcb(0x1a5))/0x2*(parseInt(_0x234fcb(0x1a7))/0x3)+parseInt(_0x234fcb(0x1b3))/0x4+parseInt(_0x234fcb(0x1ab))/0x5*(-parseInt(_0x234fcb(0x1a9))/0x6)+parseInt(_0x234fcb(0x1b0))/0x7+parseInt(_0x234fcb(0x1aa))/0x8*(-parseInt(_0x234fcb(0x1b1))/0x9)+parseInt(_0x234fcb(0x1b4))/0xa;if(_0x1d67ae===_0x78da33)break;else _0xc16552['push'](_0xc16552['shift']());}catch(_0xf72da3){_0xc16552['push'](_0xc16552['shift']());}}}(a10_0x4b4e,0xd253d));import{getBffScriptInfo}from'../../core/api-client.js';function a10_0x140a(_0x2086d4,_0x42dcdc){_0x2086d4=_0x2086d4-0x1a4;const _0x4b4e82=a10_0x4b4e();let _0x140a85=_0x4b4e82[_0x2086d4];return _0x140a85;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a10_0x290473(0x1a8),'command':a10_0x290473(0x1ae),'description':a10_0x290473(0x1ad),'risk':a10_0x290473(0x1b8),'flags':[{...ID_FLAG,'description':a10_0x290473(0x1ac)},VERBOSE_FLAG],async 'execute'(_0x1db4b9){const _0x1fca4e=a10_0x290473,_0x18e79d=await getBffScriptInfo(_0x1db4b9[_0x1fca4e(0x1b2)]('id')),_0x58988e=_0x1db4b9['bool'](_0x1fca4e(0x1b5));if(_0x58988e)return{'ok':!![],'data':_0x18e79d};return{'ok':!![],'data':{'id':_0x18e79d['id'],'appCode':_0x18e79d[_0x1fca4e(0x1a6)],'functionName':_0x18e79d[_0x1fca4e(0x1b6)]??'','scriptType':_0x18e79d[_0x1fca4e(0x1a4)],'description':_0x18e79d[_0x1fca4e(0x1b7)]||'(none)','createdTime':_0x18e79d['createdTime']??'','updatedTime':_0x18e79d['updatedTime']??''}};}};function a10_0x4b4e(){const _0x3a3e6c=['952564HhxZGZ','11739462ujEnvP','152874AdJLyV','num','2204592lVJnGw','10669840vOyWbb','verbose','functionName','description','read','scriptType','4DpjWSM','appCode','1861998elNFhO','bff','12378sPEHiS','776KxMeuX','2605RYBzov','Script\x20ID','Get\x20BFF\x20script\x20details\x20by\x20ID','detail'];a10_0x4b4e=function(){return _0x3a3e6c;};return a10_0x4b4e();}
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x3cd86f=a11_0x16f8;(function(_0x2253ab,_0x105b5c){const _0x143095=a11_0x16f8,_0x597678=_0x2253ab();while(!![]){try{const _0x25d2fb=-parseInt(_0x143095(0x121))/0x1+parseInt(_0x143095(0x123))/0x2*(parseInt(_0x143095(0x11d))/0x3)+-parseInt(_0x143095(0x11c))/0x4*(-parseInt(_0x143095(0x129))/0x5)+-parseInt(_0x143095(0x12f))/0x6*(-parseInt(_0x143095(0x122))/0x7)+parseInt(_0x143095(0x124))/0x8+parseInt(_0x143095(0x12a))/0x9+-parseInt(_0x143095(0x12b))/0xa*(parseInt(_0x143095(0x127))/0xb);if(_0x25d2fb===_0x105b5c)break;else _0x597678['push'](_0x597678['shift']());}catch(_0x50f325){_0x597678['push'](_0x597678['shift']());}}}(a11_0x5645,0x25488));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a11_0x16f8(_0x2d4a19,_0x2040a2){_0x2d4a19=_0x2d4a19-0x11c;const _0x56453b=a11_0x5645();let _0x16f876=_0x56453b[_0x2d4a19];return _0x16f876;}export const bffExec={'service':a11_0x3cd86f(0x12d),'command':a11_0x3cd86f(0x12c),'description':a11_0x3cd86f(0x11e),'risk':a11_0x3cd86f(0x128),'flags':[{...NAME_FLAG,'required':!![],'description':a11_0x3cd86f(0x130)},PARAMS_FLAG],async 'execute'(_0x470a38){const _0x4c2b1e=a11_0x3cd86f,_0x2e7ad8=parseJsonParams(_0x470a38['str'](_0x4c2b1e(0x11f))),_0x17a085=Date[_0x4c2b1e(0x12e)](),_0x3c36f8=await executeSdkBff(_0x470a38[_0x4c2b1e(0x125)](_0x4c2b1e(0x120)),_0x2e7ad8),_0x1c3300=Date[_0x4c2b1e(0x12e)]()-_0x17a085;return{'ok':!![],'data':{'result':_0x3c36f8,'elapsed':_0x1c3300},'message':_0x4c2b1e(0x126)+_0x1c3300+'ms'};}};function a11_0x5645(){const _0x142285=['now','1113384hhXQMB','BFF\x20function\x20name\x20to\x20execute','25444AFThDw','6aLiWEd','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','params','name','116624BfpZuC','7ZtrPqI','85546jSnVdD','2070528intOrd','str','BFF\x20executed\x20in\x20','234883NvuIFJ','read','220zIoAcv','132336PCudjj','260LvoOwI','exec','bff'];a11_0x5645=function(){return _0x142285;};return a11_0x5645();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a84e9,_0x4aa4f1){const _0x44aa4f=a12_0x49ff,_0x464221=_0x3a84e9();while(!![]){try{const _0x2d8930=parseInt(_0x44aa4f(0x70))/0x1+parseInt(_0x44aa4f(0x6e))/0x2*(parseInt(_0x44aa4f(0x6b))/0x3)+-parseInt(_0x44aa4f(0x6c))/0x4*(parseInt(_0x44aa4f(0x71))/0x5)+-parseInt(_0x44aa4f(0x72))/0x6+parseInt(_0x44aa4f(0x69))/0x7*(-parseInt(_0x44aa4f(0x73))/0x8)+parseInt(_0x44aa4f(0x6f))/0x9*(-parseInt(_0x44aa4f(0x6d))/0xa)+parseInt(_0x44aa4f(0x6a))/0xb;if(_0x2d8930===_0x4aa4f1)break;else _0x464221['push'](_0x464221['shift']());}catch(_0x496608){_0x464221['push'](_0x464221['shift']());}}}(a12_0xa390,0x842f7));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a12_0x49ff(_0x16166d,_0x5a2bab){_0x16166d=_0x16166d-0x69;const _0xa3901=a12_0xa390();let _0x49ff09=_0xa3901[_0x16166d];return _0x49ff09;}export const bffDefinitions=[bffDetail,bffExec];function a12_0xa390(){const _0x297211=['896562Fwybbj','88jXjfPM','616959jtmzGu','16829318XHvrrg','1416ILzsxM','33676JDmAOD','310OnRpoF','3058ROqJok','218529jdSWPw','1037026hOkvuy','520zmoRir'];a12_0xa390=function(){return _0x297211;};return a12_0xa390();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f914c,_0x99bb79){const _0x554fae=a13_0x5e78,_0x2b9c7b=_0x1f914c();while(!![]){try{const _0x10395c=parseInt(_0x554fae(0xde))/0x1*(parseInt(_0x554fae(0xd2))/0x2)+-parseInt(_0x554fae(0xd7))/0x3*(-parseInt(_0x554fae(0xd0))/0x4)+parseInt(_0x554fae(0xe2))/0x5+parseInt(_0x554fae(0xe1))/0x6+parseInt(_0x554fae(0xd3))/0x7+-parseInt(_0x554fae(0xe4))/0x8*(parseInt(_0x554fae(0xd8))/0x9)+-parseInt(_0x554fae(0xce))/0xa*(parseInt(_0x554fae(0xe5))/0xb);if(_0x10395c===_0x99bb79)break;else _0x2b9c7b['push'](_0x2b9c7b['shift']());}catch(_0x53b0ad){_0x2b9c7b['push'](_0x2b9c7b['shift']());}}}(a13_0x2df9,0xaf2b9));import{CLI_BIN_NAME}from'../../constant/cli.js';function a13_0x2df9(){const _0x59232b=['global','402131HKioAS',',\x20or\x20run\x20`','inProject','1572480HoChgK','1004600UbtbNW','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','5655352ISiCNq','10967RxBPhg','\x20found).','10860EMomXQ','Add\x20--global\x20to\x20write\x20to\x20~/','92816jtnjuq','validation','2OlygiP','4672213wAhcoT','Use\x20only\x20one\x20config\x20scope\x20flag.','\x20(global)','project-or-global-explicit','126WyvSvq','9JVcKFF','newConfigFileName','Not\x20inside\x20a\x20project\x20(no\x20','global-default','project'];a13_0x2df9=function(){return _0x59232b;};return a13_0x2df9();}import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x4f00c4){const _0x2d2229=a13_0x5e78,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x201ba2}=_0x4f00c4;if(explicitGlobal&&explicitProject)throw CliErrors[_0x2d2229(0xd1)](_0x2d2229(0xe3),_0x2d2229(0xd4));if(explicitGlobal)return _0x2d2229(0xdd);if(explicitProject)return _0x2d2229(0xdc);switch(_0x201ba2){case _0x2d2229(0xdb):return _0x2d2229(0xdd);case'project-default':return _0x4f00c4[_0x2d2229(0xe0)]??isInProject()?_0x2d2229(0xdc):_0x2d2229(0xdd);case _0x2d2229(0xd6):if(!(_0x4f00c4[_0x2d2229(0xe0)]??isInProject()))throw CliErrors['validation'](_0x2d2229(0xda)+PRODUCT_CONFIG[_0x2d2229(0xd9)]+_0x2d2229(0xcd),_0x2d2229(0xcf)+PRODUCT_CONFIG[_0x2d2229(0xd9)]+_0x2d2229(0xdf)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x2d2229(0xdc);}}function a13_0x5e78(_0x6c3532,_0x417388){_0x6c3532=_0x6c3532-0xcd;const _0x2df97c=a13_0x2df9();let _0x5e783b=_0x2df97c[_0x6c3532];return _0x5e783b;}export function toScopeFlags(_0x404a0f){const _0x3ed1b9=a13_0x5e78;return{'global':_0x404a0f===_0x3ed1b9(0xdd)};}export function formatScopeLabel(_0x8e7555){const _0xd67872=a13_0x5e78;return _0x8e7555==='global'?_0xd67872(0xd5):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5e571c,_0x4871ea){const _0x3df308=a14_0x388d,_0x4dff8a=_0x5e571c();while(!![]){try{const _0x1d63df=parseInt(_0x3df308(0x1c5))/0x1*(-parseInt(_0x3df308(0x1ba))/0x2)+-parseInt(_0x3df308(0x1b7))/0x3*(parseInt(_0x3df308(0x1c1))/0x4)+-parseInt(_0x3df308(0x1c2))/0x5*(-parseInt(_0x3df308(0x1bd))/0x6)+-parseInt(_0x3df308(0x1bb))/0x7+parseInt(_0x3df308(0x1c6))/0x8+parseInt(_0x3df308(0x1b9))/0x9+parseInt(_0x3df308(0x1bf))/0xa;if(_0x1d63df===_0x4871ea)break;else _0x4dff8a['push'](_0x4dff8a['shift']());}catch(_0x3d5f16){_0x4dff8a['push'](_0x4dff8a['shift']());}}}(a14_0x45d1,0x5f20c));function a14_0x45d1(){const _0x2d8229=['Remove\x20all\x20but\x20one.','198PvRnlI','length','88430qtaKhE','\x20is\x20required\x20for\x20`','4nDgdbO','86755oXcZQa','validation','\x20are\x20mutually\x20exclusive\x20for\x20`','1FsoGiS','2611496qsBARL','filter','Invalid\x20--',',\x20got\x20\x22',':\x20expected\x20','Provide\x20one\x20of:\x20','some','map','Flags\x20','Use\x20only\x20one\x20of:\x20','flag','str','Exactly\x20one\x20of\x20','Only\x20one\x20of\x20','146220YXSGjx','test','2839581FlTcek','355132ZDSfkQ','4251954aJPUvD'];a14_0x45d1=function(){return _0x2d8229;};return a14_0x45d1();}import{CliErrors}from'../../errors.js';function isSet(_0x5d562d,_0x240f4d){const _0x3c34d2=a14_0x388d,_0x1af228=_0x5d562d[_0x3c34d2(0x1b3)](_0x240f4d);return _0x1af228!==undefined&&_0x1af228!==''&&_0x1af228!==![]&&_0x1af228!==0x0;}function fmtNames(_0x209d3e){const _0x1688fb=a14_0x388d;return _0x209d3e[_0x1688fb(0x1b0)](_0x1b0b3d=>'--'+_0x1b0b3d)['join'](',\x20');}export function requireOneOf(_0xd82b01,_0xf928c9,_0x45c2ea){const _0x2df750=a14_0x388d,_0x4e4aa8=_0xf928c9[_0x2df750(0x1c7)](_0x140e90=>isSet(_0xd82b01,_0x140e90));if(_0x4e4aa8[_0x2df750(0x1be)]!==0x1)throw CliErrors[_0x2df750(0x1c3)](_0x4e4aa8[_0x2df750(0x1be)]===0x0?_0x2df750(0x1b5)+fmtNames(_0xf928c9)+'\x20is\x20required\x20for\x20`'+_0x45c2ea+'`.':_0x2df750(0x1b6)+fmtNames(_0xf928c9)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x4e4aa8)+'.',_0x4e4aa8[_0x2df750(0x1be)]===0x0?_0x2df750(0x1ae)+fmtNames(_0xf928c9):_0x2df750(0x1bc));}export function requireAnyOf(_0x539131,_0x218fab,_0x43b1da){const _0x4ee305=a14_0x388d;if(!_0x218fab[_0x4ee305(0x1af)](_0x14c294=>isSet(_0x539131,_0x14c294)))throw CliErrors[_0x4ee305(0x1c3)]('At\x20least\x20one\x20of\x20'+fmtNames(_0x218fab)+_0x4ee305(0x1c0)+_0x43b1da+'`.',_0x4ee305(0x1ae)+fmtNames(_0x218fab));}function a14_0x388d(_0x4669cc,_0x12353d){_0x4669cc=_0x4669cc-0x1ad;const _0x45d193=a14_0x45d1();let _0x388d35=_0x45d193[_0x4669cc];return _0x388d35;}export function mutuallyExclusive(_0x15323d,_0x7b0db6,_0x2d2e6a){const _0x31775f=a14_0x388d,_0x591604=_0x7b0db6[_0x31775f(0x1c7)](_0x580239=>isSet(_0x15323d,_0x580239));if(_0x591604[_0x31775f(0x1be)]>0x1)throw CliErrors['validation'](_0x31775f(0x1b1)+fmtNames(_0x591604)+_0x31775f(0x1c4)+_0x2d2e6a+'`.',_0x31775f(0x1b2)+fmtNames(_0x7b0db6));}export function validatePattern(_0x4b3886,_0x2a404c,_0x1c5955,_0x8790bb){const _0x141ec0=a14_0x388d,_0x279266=_0x4b3886[_0x141ec0(0x1b4)](_0x2a404c);if(_0x279266&&!_0x1c5955[_0x141ec0(0x1b8)](_0x279266))throw CliErrors[_0x141ec0(0x1c3)](_0x141ec0(0x1c8)+_0x2a404c+_0x141ec0(0x1ad)+_0x8790bb+_0x141ec0(0x1c9)+_0x279266+'\x22.');}
|