@lovrabet/lovrabet-cli 2.1.7-beta.2 → 2.1.7-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -0
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a0_0xd33b64=a0_0x3a9e;(function(_0x37f9ab,_0x35ff04){const _0x2a8236=a0_0x3a9e,_0x411012=_0x37f9ab();while(!![]){try{const _0x3a20f9=parseInt(_0x2a8236(0x115))/0x1*(-parseInt(_0x2a8236(0x113))/0x2)+-parseInt(_0x2a8236(0x126))/0x3+-parseInt(_0x2a8236(0x120))/0x4+parseInt(_0x2a8236(0x12a))/0x5+-parseInt(_0x2a8236(0x11c))/0x6*(-parseInt(_0x2a8236(0x107))/0x7)+-parseInt(_0x2a8236(0x116))/0x8+parseInt(_0x2a8236(0x11b))/0x9;if(_0x3a20f9===_0x35ff04)break;else _0x411012['push'](_0x411012['shift']());}catch(_0x1a05e4){_0x411012['push'](_0x411012['shift']());}}}(a0_0x1e2f,0xaa892));import{jsx as a0_0x608b63}from'react/jsx-runtime';function a0_0x3a9e(_0x4b31e3,_0x566604){_0x4b31e3=_0x4b31e3-0x105;const _0x1e2f4d=a0_0x1e2f();let _0x3a9e9c=_0x1e2f4d[_0x4b31e3];return _0x3a9e9c;}import a0_0x46aee1 from'meow';import{render}from'ink';import{Help}from'./help.js';function a0_0x1e2f(){const _0x529ada=['log','definition','name','ExitPromptError','message','1616198TXSTNR','args','1dkPKvv','4815592KBHmtO','input','error','\x0aCancelled.\x0a','Unexpected\x20error:','11125359Pafibw','2624004GuPNju','code','./framework/preparse.js','cancelled','2645916uUosKJ','handler','unknownCommand','stderr','write','catch','400338aSHfQu','original','ERR_STREAM_DESTROYED','help','1776670FgakeP',':\x20--','flags','exit','21spxmLC','defaultCommand','length','flatMap','exitCode','ERR_USE_AFTER_CLOSE','assign'];a0_0x1e2f=function(){return _0x529ada;};return a0_0x1e2f();}import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x46aee1(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0xd33b64(0x125)](handleError);async function main(){try{await run();}catch(_0x1de9e8){handleError(_0x1de9e8);}}async function run(){const _0x2fb919=a0_0xd33b64;let _0x41afbd=cli[_0x2fb919(0x117)][0x0],_0x397d0d=cli[_0x2fb919(0x117)][0x1];const _0x5be6bb=cli[_0x2fb919(0x105)];try{const {correctFlags:_0x50fc7b}=await import(_0x2fb919(0x11e)),_0x538ff6=getAllDefinitions()[_0x2fb919(0x10a)](_0x1ef109=>_0x1ef109['flags']??[]),{flags:_0x5ea82a,corrections:_0x36a34b}=_0x50fc7b(_0x5be6bb,_0x538ff6);if(_0x36a34b[_0x2fb919(0x109)]>0x0){for(const _0x3043b7 of _0x36a34b){process[_0x2fb919(0x123)][_0x2fb919(0x124)]('[preparse]\x20'+_0x3043b7[_0x2fb919(0x121)]+_0x2fb919(0x12b)+_0x3043b7[_0x2fb919(0x127)]+'\x20->\x20--'+_0x3043b7['corrected']+'\x0a');}Object[_0x2fb919(0x10d)](_0x5be6bb,_0x5ea82a);}}catch{}if(!_0x41afbd){const {waitUntilExit:_0xdb735f}=render(a0_0x608b63(Help,{}));await _0xdb735f();return;}if(!isKnownService(_0x41afbd)){const _0x2b33b5=resolveDynamicServiceCommand(cli[_0x2fb919(0x117)],_0x5be6bb);if(_0x2b33b5){if(_0x5be6bb[_0x2fb919(0x129)]){console['log'](generateCommandHelp(_0x2b33b5[_0x2fb919(0x10f)]));return;}Object[_0x2fb919(0x10d)](_0x5be6bb,_0x2b33b5[_0x2fb919(0x105)]);const _0x4a34e7=buildConfigFromFlags(_0x5be6bb);await initGlobalEnvironment(_0x4a34e7);const _0x571a94=createPipelineEnv(_0x4a34e7,_0x5be6bb);_0x571a94[_0x2fb919(0x114)]=_0x2b33b5[_0x2fb919(0x114)],await runCommand(_0x2b33b5[_0x2fb919(0x10f)],_0x571a94);return;}if(_0x5be6bb[_0x2fb919(0x129)]){const _0x151efa=generateDynamicServiceHelp(_0x41afbd);if(_0x151efa){console[_0x2fb919(0x10e)](_0x151efa);return;}}const {waitUntilExit:_0x5ac982}=render(a0_0x608b63(Help,{}));await _0x5ac982();return;}const _0x48e922=getServiceEntry(_0x41afbd);if(!_0x397d0d){if(_0x5be6bb[_0x2fb919(0x129)]){console[_0x2fb919(0x10e)](generateServiceHelp(_0x41afbd));return;}if(_0x48e922[_0x2fb919(0x108)])_0x397d0d=_0x48e922[_0x2fb919(0x108)];else{console[_0x2fb919(0x10e)](generateServiceHelp(_0x41afbd));return;}}const _0x1a59f1=findDefinition(_0x41afbd,_0x397d0d);!_0x1a59f1&&(console[_0x2fb919(0x10e)](generateServiceHelp(_0x41afbd)),handleError(CliErrors[_0x2fb919(0x122)](_0x41afbd+'\x20'+_0x397d0d)));if(_0x5be6bb[_0x2fb919(0x129)]){console[_0x2fb919(0x10e)](generateCommandHelp(_0x1a59f1));return;}const _0x418b5a=buildConfigFromFlags(_0x5be6bb);await initGlobalEnvironment(_0x418b5a);const _0x16d5c6=createPipelineEnv(_0x418b5a,_0x5be6bb);_0x16d5c6[_0x2fb919(0x114)]=cli['input']['slice'](0x2),await runCommand(_0x1a59f1,_0x16d5c6);}function handleError(_0x4a7e1d){const _0x352b2a=a0_0xd33b64;if(_0x4a7e1d instanceof CliError){_0x4a7e1d[_0x352b2a(0x11d)]===_0x352b2a(0x11f)&&(process[_0x352b2a(0x123)][_0x352b2a(0x124)](_0x352b2a(0x119)),process['exit'](0x0));console['error']('Error:\x20'+_0x4a7e1d[_0x352b2a(0x112)]);if(_0x4a7e1d['hint'])console['error']('Hint:\x20'+_0x4a7e1d['hint']);process[_0x352b2a(0x106)](_0x4a7e1d[_0x352b2a(0x10b)]);}isUserCancellation(_0x4a7e1d)&&(process[_0x352b2a(0x123)][_0x352b2a(0x124)](_0x352b2a(0x119)),process[_0x352b2a(0x106)](0x0)),console[_0x352b2a(0x118)](_0x352b2a(0x11a),_0x4a7e1d),process[_0x352b2a(0x106)](0x1);}function isUserCancellation(_0x2408a2){const _0x4d96d6=a0_0xd33b64;if(!(_0x2408a2 instanceof Error))return![];if(_0x2408a2[_0x4d96d6(0x110)]===_0x4d96d6(0x111))return!![];if(_0x2408a2[_0x4d96d6(0x11d)]===_0x4d96d6(0x10c))return!![];if(_0x2408a2[_0x4d96d6(0x11d)]===_0x4d96d6(0x128))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a1_0x1b937f=a1_0x1a62;(function(_0x537252,_0x435b0e){const _0x2c6064=a1_0x1a62,_0x1973d7=_0x537252();while(!![]){try{const _0x37f275=-parseInt(_0x2c6064(0x1c7))/0x1*(-parseInt(_0x2c6064(0x1df))/0x2)+-parseInt(_0x2c6064(0x1da))/0x3+-parseInt(_0x2c6064(0x1bb))/0x4+-parseInt(_0x2c6064(0x18a))/0x5*(parseInt(_0x2c6064(0x1ae))/0x6)+parseInt(_0x2c6064(0x193))/0x7*(-parseInt(_0x2c6064(0x1b6))/0x8)+-parseInt(_0x2c6064(0x1b7))/0x9+parseInt(_0x2c6064(0x17f))/0xa;if(_0x37f275===_0x435b0e)break;else _0x1973d7['push'](_0x1973d7['shift']());}catch(_0x2ae475){_0x1973d7['push'](_0x1973d7['shift']());}}}(a1_0x5b11,0xa624d));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x1b937f(0x1f5),'type':a1_0x1b937f(0x1d6),'description':a1_0x1b937f(0x1c3)},KEYWORD_FLAG={'name':a1_0x1b937f(0x195),'type':a1_0x1b937f(0x1d6),'description':a1_0x1b937f(0x1d1)},DOC_CODE_FLAG={'name':a1_0x1b937f(0x183),'type':a1_0x1b937f(0x1d6),'required':!![],'description':a1_0x1b937f(0x1ec)},DOCS=[{'code':a1_0x1b937f(0x19d),'category':a1_0x1b937f(0x1ad),'title':a1_0x1b937f(0x191),'method':a1_0x1b937f(0x1d4),'path':a1_0x1b937f(0x1a4),'summary':a1_0x1b937f(0x1dd),'whenToUse':a1_0x1b937f(0x1d8),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1b937f(0x1a6),'responseHighlights':[a1_0x1b937f(0x1bc),a1_0x1b937f(0x1a5)],'examples':[a1_0x1b937f(0x18e)],'notes':[a1_0x1b937f(0x185)],'markdown':[a1_0x1b937f(0x1aa),'',a1_0x1b937f(0x1a3)][a1_0x1b937f(0x181)]('\x0a')},{'code':a1_0x1b937f(0x1d5),'category':a1_0x1b937f(0x1ad),'title':a1_0x1b937f(0x1f2),'method':a1_0x1b937f(0x197),'path':a1_0x1b937f(0x18f),'summary':a1_0x1b937f(0x1b1),'whenToUse':'需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','pathParams':[],'queryParams':[{'name':a1_0x1b937f(0x183),'description':a1_0x1b937f(0x1b3)}],'bodySchema':a1_0x1b937f(0x1e7),'responseHighlights':[a1_0x1b937f(0x184),a1_0x1b937f(0x18b),a1_0x1b937f(0x19c)],'examples':[a1_0x1b937f(0x1b8)],'notes':[a1_0x1b937f(0x1c5)],'markdown':[a1_0x1b937f(0x1d3),'','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x1b937f(0x181)]('\x0a')},{'code':'dataset_data_filter','category':'dataset','title':a1_0x1b937f(0x1fa),'method':a1_0x1b937f(0x1d4),'path':a1_0x1b937f(0x1d0),'summary':a1_0x1b937f(0x187),'whenToUse':a1_0x1b937f(0x1cf),'pathParams':[{'name':a1_0x1b937f(0x194),'description':a1_0x1b937f(0x1ee)},{'name':a1_0x1b937f(0x1e8),'description':a1_0x1b937f(0x1b3)}],'queryParams':[],'bodySchema':a1_0x1b937f(0x1e6),'responseHighlights':[a1_0x1b937f(0x18c),a1_0x1b937f(0x17e)],'examples':[a1_0x1b937f(0x1e9)],'notes':[a1_0x1b937f(0x1eb)],'markdown':[a1_0x1b937f(0x1e3),'','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x1b937f(0x181)]('\x0a')},{'code':a1_0x1b937f(0x1c6),'category':a1_0x1b937f(0x1ad),'title':a1_0x1b937f(0x1bd),'method':a1_0x1b937f(0x1d4),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x1b937f(0x1be),'whenToUse':a1_0x1b937f(0x1ef),'pathParams':[{'name':a1_0x1b937f(0x194),'description':a1_0x1b937f(0x1ee)},{'name':a1_0x1b937f(0x1e8),'description':a1_0x1b937f(0x1b3)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':['result\x20rows\x20contain\x20aggregate\x20aliases',a1_0x1b937f(0x1d2)],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':[a1_0x1b937f(0x1c8),a1_0x1b937f(0x1ea)],'markdown':[a1_0x1b937f(0x186),'',a1_0x1b937f(0x1e0)][a1_0x1b937f(0x181)]('\x0a')},{'code':a1_0x1b937f(0x199),'category':a1_0x1b937f(0x1ad),'title':'Get\x20one\x20dataset\x20record','method':a1_0x1b937f(0x1d4),'path':'/api/{appCode}/{datasetCode}/getOne','summary':a1_0x1b937f(0x1a2),'whenToUse':a1_0x1b937f(0x1e5),'pathParams':[{'name':a1_0x1b937f(0x194),'description':a1_0x1b937f(0x1ee)},{'name':'datasetCode','description':a1_0x1b937f(0x1b3)}],'queryParams':[],'bodySchema':a1_0x1b937f(0x19b),'responseHighlights':[a1_0x1b937f(0x1f8)],'examples':[a1_0x1b937f(0x182)],'notes':[a1_0x1b937f(0x1db)],'markdown':a1_0x1b937f(0x1c0)},{'code':a1_0x1b937f(0x1f3),'category':a1_0x1b937f(0x1ad),'title':a1_0x1b937f(0x190),'method':a1_0x1b937f(0x1d4),'path':a1_0x1b937f(0x1f0),'summary':a1_0x1b937f(0x1cd),'whenToUse':a1_0x1b937f(0x1a8),'pathParams':[{'name':a1_0x1b937f(0x194),'description':a1_0x1b937f(0x1ee)},{'name':a1_0x1b937f(0x1e8),'description':a1_0x1b937f(0x1b3)}],'queryParams':[],'bodySchema':a1_0x1b937f(0x1f9),'responseHighlights':[a1_0x1b937f(0x1b4)],'examples':[a1_0x1b937f(0x1d7)],'notes':[a1_0x1b937f(0x198)],'markdown':a1_0x1b937f(0x19f)},{'code':a1_0x1b937f(0x1de),'category':'bf','title':a1_0x1b937f(0x1e2),'method':a1_0x1b937f(0x197),'path':a1_0x1b937f(0x180),'summary':'获取应用下可调用的\x20BF\x20函数列表','whenToUse':a1_0x1b937f(0x1cc),'pathParams':[{'name':a1_0x1b937f(0x194),'description':a1_0x1b937f(0x1ee)}],'queryParams':[],'bodySchema':a1_0x1b937f(0x1e7),'responseHighlights':[a1_0x1b937f(0x1ac)],'examples':['lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'],'notes':[a1_0x1b937f(0x188)],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':a1_0x1b937f(0x1dc),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':a1_0x1b937f(0x1d4),'path':'/api/endpoint/{appCode}/{scriptName}','summary':a1_0x1b937f(0x1f4),'whenToUse':'已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','pathParams':[{'name':a1_0x1b937f(0x194),'description':a1_0x1b937f(0x1ee)},{'name':a1_0x1b937f(0x192),'description':a1_0x1b937f(0x196)}],'queryParams':[],'bodySchema':a1_0x1b937f(0x1ab),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':[a1_0x1b937f(0x189)],'notes':[a1_0x1b937f(0x1b0)],'markdown':a1_0x1b937f(0x1b2)},{'code':'custom_sql_execute','category':a1_0x1b937f(0x1e4),'title':a1_0x1b937f(0x1c1),'method':a1_0x1b937f(0x1d4),'path':a1_0x1b937f(0x18d),'summary':a1_0x1b937f(0x1a7),'whenToUse':a1_0x1b937f(0x1e1),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1b937f(0x1b5),'responseHighlights':[a1_0x1b937f(0x1ce)],'examples':[a1_0x1b937f(0x1a9)],'notes':['Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.'],'markdown':a1_0x1b937f(0x1cb)}];function entrySummary(_0x4ef67d){const _0x17f0c1=a1_0x1b937f;return{'code':_0x4ef67d['code'],'category':_0x4ef67d[_0x17f0c1(0x1f5)],'method':_0x4ef67d[_0x17f0c1(0x1a0)],'path':_0x4ef67d[_0x17f0c1(0x1a1)],'summary':_0x4ef67d[_0x17f0c1(0x1ca)],'whenToUse':_0x4ef67d[_0x17f0c1(0x1af)]};}function a1_0x1a62(_0x4ee20a,_0x477e46){_0x4ee20a=_0x4ee20a-0x17e;const _0x5b11b9=a1_0x5b11();let _0x1a6236=_0x5b11b9[_0x4ee20a];return _0x1a6236;}export function listApiDocEntries(_0x463049={}){const _0x45b5d7=a1_0x1b937f,_0x109bbb=String(_0x463049[_0x45b5d7(0x1f5)]||'')[_0x45b5d7(0x1ed)](),_0x4b9f4c=String(_0x463049['keyword']||'')['trim']()[_0x45b5d7(0x1d9)]();return DOCS[_0x45b5d7(0x1f1)](_0x58a2dc=>{const _0x4c7ea8=_0x45b5d7;if(_0x109bbb&&_0x58a2dc[_0x4c7ea8(0x1f5)]!==_0x109bbb)return![];if(!_0x4b9f4c)return!![];return[_0x58a2dc['code'],_0x58a2dc[_0x4c7ea8(0x1f5)],_0x58a2dc[_0x4c7ea8(0x1a0)],_0x58a2dc[_0x4c7ea8(0x1a1)],_0x58a2dc[_0x4c7ea8(0x1ca)],_0x58a2dc['whenToUse'],_0x58a2dc[_0x4c7ea8(0x1f6)]]['join']('\x20')[_0x4c7ea8(0x1d9)]()['includes'](_0x4b9f4c);})['map'](entrySummary);}export function getApiDocDetail(_0x18cc82){const _0x63ea01=a1_0x1b937f,_0x373032=DOCS[_0x63ea01(0x1bf)](_0x38d7f4=>_0x38d7f4[_0x63ea01(0x183)]===_0x18cc82);if(!_0x373032)throw CliErrors[_0x63ea01(0x1ba)](_0x63ea01(0x1c2)+_0x18cc82);return{..._0x373032};}const apiDocList={'service':a1_0x1b937f(0x1b9),'command':'list','description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':a1_0x1b937f(0x19a),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x1fed35){const _0x41ec1f=a1_0x1b937f,_0x1c097d=listApiDocEntries({'category':_0x1fed35['str'](_0x41ec1f(0x1f5)),'keyword':_0x1fed35[_0x41ec1f(0x19e)]('keyword')});return{'ok':!![],'data':{'total':_0x1c097d[_0x41ec1f(0x1c9)],'items':_0x1c097d}};}},apiDocDetail={'service':a1_0x1b937f(0x1b9),'command':a1_0x1b937f(0x1f7),'description':a1_0x1b937f(0x1c4),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x49336c){const _0x173f6a=a1_0x1b937f;return{'ok':!![],'data':getApiDocDetail(_0x49336c[_0x173f6a(0x19e)](_0x173f6a(0x183)))};}};function a1_0x5b11(){const _0x537121=['聚合查询数据集数据','find','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','Execute\x20custom\x20SQL','API\x20doc\x20code\x20not\x20found:\x20','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','Show\x20runtime\x20API\x20documentation\x20by\x20code','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','dataset_data_aggregate','2187huCPst','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','length','summary','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','创建数据','Returns\x20SQL\x20execution\x20payload','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','/api/{appCode}/{datasetCode}/filter','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','where\x20filters\x20before\x20aggregation','##\x20Dataset\x20detail','POST','dataset_detail','string','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','toLowerCase','2919489DIdcns','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','bf_execute','分页获取数据集列表','bf_function_list','498nTotiZ','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','List\x20BF\x20endpoint\x20functions','##\x20Filter\x20dataset\x20data','custom_sql','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','None','datasetCode','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','API\x20doc\x20code,\x20for\x20example\x20dataset_list','trim','Current\x20app\x20code','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','/api/{appCode}/{datasetCode}/create','filter','Dataset\x20detail','dataset_data_create','执行指定\x20BF\x20函数','category','title','detail','Returns\x20one\x20matching\x20business\x20record','{\x22fieldName\x22:\x22value\x22}','Filter\x20dataset\x20data','paging\x20contains\x20pagination','33189590zAOqoN','/api/endpoint/{appCode}/functions','join','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','code','fields/properties\x20describe\x20data\x20shape','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','##\x20Aggregate\x20dataset\x20data','条件过滤查询数据','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','3916135qzhNMX','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','tableData\x20contains\x20records','/api/custom/executeSql','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','/api/dataset/getOneByCode?code={datasetCode}','Create\x20dataset\x20record','List\x20datasets','scriptName','158319ixVSpw','appCode','keyword','Endpoint\x20function\x20name','GET','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','dataset_data_get_one','read','{\x22id\x22:123}','operations\x20describes\x20runtime\x20APIs','dataset_list','str','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','method','path','查询单条数据','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','/api/dataset/get-dataset-list-by-app-code','paging.totalCount\x20gives\x20total\x20rows','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','执行自定义\x20SQL','需要向指定数据集新增一条业务数据时使用','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','##\x20List\x20datasets','{\x22param\x22:\x22value\x22}','Returns\x20endpoint\x20functionName/id/description','dataset','6VpvyaN','whenToUse','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','获取数据集详情','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','32-character\x20dataset\x20code','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','168GVWqXq','3663756bJZPDH','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','api-doc','validation','2178264gEiQbD','tableData\x20contains\x20dataset\x20id/code/name','Aggregate\x20dataset\x20data'];a1_0x5b11=function(){return _0x537121;};return a1_0x5b11();}export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
1
|
+
function a1_0x156c(){const _0x1b8a8d=['4141816rqVhJu','执行自定义\x20SQL','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','Create\x20dataset\x20record','API\x20doc\x20code,\x20for\x20example\x20dataset_list','Aggregate\x20dataset\x20data','scriptName','tableData\x20contains\x20dataset\x20id/code/name','filter','创建数据','##\x20Dataset\x20detail','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','whenToUse','list','Execute\x20BF\x20endpoint\x20function','{\x22fieldName\x22:\x22value\x22}','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','bf_function_list','Returns\x20one\x20matching\x20business\x20record','聚合查询数据集数据','category','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Dataset\x20detail','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','##\x20List\x20datasets','str','length','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','keyword','API\x20doc\x20code\x20not\x20found:\x20','Current\x20app\x20code','/api/dataset/get-dataset-list-by-app-code','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','code','toLowerCase','POST','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','/api/endpoint/{appCode}/functions','read','GET','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','514PHNOzi','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','3262602jzToia','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','map','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','method','dataset_data_create','api-doc','需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','validation','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','{\x22id\x22:123}','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','Returns\x20SQL\x20execution\x20payload','Returns\x20script\x20business\x20payload','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','Filter\x20dataset\x20data','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','where\x20filters\x20before\x20aggregation','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','##\x20Aggregate\x20dataset\x20data','分页获取数据集列表','32-character\x20dataset\x20code','dataset_data_get_one','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','summary','title','lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27','获取应用下可调用的\x20BF\x20函数列表','Get\x20one\x20dataset\x20record','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','/api/{appCode}/{datasetCode}/filter','/api/{appCode}/{datasetCode}/aggregate','/api/{appCode}/{datasetCode}/create','dataset','dataset_data_aggregate','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','461xzheBg','dataset_data_filter','List\x20datasets','143460nJWVGR','string','需要向指定数据集新增一条业务数据时使用','includes','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','2142513YHWspn','join','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','/api/{appCode}/{datasetCode}/getOne','Show\x20runtime\x20API\x20documentation\x20by\x20code','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','tableData\x20contains\x20records','dataset_detail','find','List\x20BF\x20endpoint\x20functions','/api/endpoint/{appCode}/{scriptName}','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','appCode','1225700qKpFzY','Endpoint\x20function\x20name','##\x20Filter\x20dataset\x20data','dataset_list','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','/api/dataset/getOneByCode?code={datasetCode}','datasetCode','条件过滤查询数据','None','执行指定\x20BF\x20函数','4596312YedJeK'];a1_0x156c=function(){return _0x1b8a8d;};return a1_0x156c();}function a1_0xa7db(_0x49faf6,_0x102d69){_0x49faf6=_0x49faf6-0x105;const _0x156c4a=a1_0x156c();let _0xa7dbf7=_0x156c4a[_0x49faf6];return _0xa7dbf7;}const a1_0x243a00=a1_0xa7db;(function(_0x180c12,_0x4b6f82){const _0x46ef08=a1_0xa7db,_0xd319e0=_0x180c12();while(!![]){try{const _0x40a24e=parseInt(_0x46ef08(0x10b))/0x1*(parseInt(_0x46ef08(0x15b))/0x2)+-parseInt(_0x46ef08(0x113))/0x3+parseInt(_0x46ef08(0x122))/0x4+-parseInt(_0x46ef08(0x10e))/0x5+parseInt(_0x46ef08(0x12c))/0x6+parseInt(_0x46ef08(0x15d))/0x7+-parseInt(_0x46ef08(0x12d))/0x8;if(_0x40a24e===_0x4b6f82)break;else _0xd319e0['push'](_0xd319e0['shift']());}catch(_0x5b55ac){_0xd319e0['push'](_0xd319e0['shift']());}}}(a1_0x156c,0x60ca2));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x243a00(0x142),'type':'string','description':a1_0x243a00(0x126)},KEYWORD_FLAG={'name':a1_0x243a00(0x14d),'type':'string','description':a1_0x243a00(0x14b)},DOC_CODE_FLAG={'name':a1_0x243a00(0x153),'type':a1_0x243a00(0x10f),'required':!![],'description':a1_0x243a00(0x132)},DOCS=[{'code':a1_0x243a00(0x125),'category':a1_0x243a00(0x108),'title':a1_0x243a00(0x10d),'method':'POST','path':a1_0x243a00(0x150),'summary':a1_0x243a00(0x173),'whenToUse':'需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','pathParams':[],'queryParams':[],'bodySchema':a1_0x243a00(0x14c),'responseHighlights':[a1_0x243a00(0x135),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x243a00(0x120)],'notes':[a1_0x243a00(0x16c)],'markdown':[a1_0x243a00(0x148),'',a1_0x243a00(0x130)]['join']('\x0a')},{'code':a1_0x243a00(0x11c),'category':'dataset','title':a1_0x243a00(0x144),'method':a1_0x243a00(0x159),'path':a1_0x243a00(0x127),'summary':'获取数据集详情','whenToUse':a1_0x243a00(0x164),'pathParams':[],'queryParams':[{'name':a1_0x243a00(0x153),'description':a1_0x243a00(0x174)}],'bodySchema':a1_0x243a00(0x12a),'responseHighlights':['fields/properties\x20describe\x20data\x20shape',a1_0x243a00(0x12f),'operations\x20describes\x20runtime\x20APIs'],'examples':[a1_0x243a00(0x147)],'notes':[a1_0x243a00(0x16e)],'markdown':[a1_0x243a00(0x138),'','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x243a00(0x114)]('\x0a')},{'code':a1_0x243a00(0x10c),'category':a1_0x243a00(0x108),'title':a1_0x243a00(0x16d),'method':a1_0x243a00(0x155),'path':a1_0x243a00(0x105),'summary':a1_0x243a00(0x129),'whenToUse':a1_0x243a00(0x17c),'pathParams':[{'name':'appCode','description':a1_0x243a00(0x14f)},{'name':a1_0x243a00(0x128),'description':a1_0x243a00(0x174)}],'queryParams':[],'bodySchema':a1_0x243a00(0x15e),'responseHighlights':[a1_0x243a00(0x11b),'paging\x20contains\x20pagination'],'examples':[a1_0x243a00(0x169)],'notes':[a1_0x243a00(0x170)],'markdown':[a1_0x243a00(0x124),'',a1_0x243a00(0x139)][a1_0x243a00(0x114)]('\x0a')},{'code':a1_0x243a00(0x109),'category':a1_0x243a00(0x108),'title':a1_0x243a00(0x133),'method':a1_0x243a00(0x155),'path':a1_0x243a00(0x106),'summary':a1_0x243a00(0x141),'whenToUse':'需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','pathParams':[{'name':a1_0x243a00(0x121),'description':a1_0x243a00(0x14f)},{'name':a1_0x243a00(0x128),'description':a1_0x243a00(0x174)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':['result\x20rows\x20contain\x20aggregate\x20aliases',a1_0x243a00(0x16f)],'examples':[a1_0x243a00(0x179)],'notes':[a1_0x243a00(0x11a),a1_0x243a00(0x143)],'markdown':[a1_0x243a00(0x172),'',a1_0x243a00(0x160)][a1_0x243a00(0x114)]('\x0a')},{'code':a1_0x243a00(0x175),'category':'dataset','title':a1_0x243a00(0x17b),'method':a1_0x243a00(0x155),'path':a1_0x243a00(0x117),'summary':'查询单条数据','whenToUse':a1_0x243a00(0x166),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':a1_0x243a00(0x128),'description':a1_0x243a00(0x174)}],'queryParams':[],'bodySchema':a1_0x243a00(0x167),'responseHighlights':[a1_0x243a00(0x140)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x243a00(0x15c)],'markdown':'##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.'},{'code':a1_0x243a00(0x162),'category':'dataset','title':a1_0x243a00(0x131),'method':a1_0x243a00(0x155),'path':a1_0x243a00(0x107),'summary':a1_0x243a00(0x137),'whenToUse':a1_0x243a00(0x110),'pathParams':[{'name':a1_0x243a00(0x121),'description':a1_0x243a00(0x14f)},{'name':a1_0x243a00(0x128),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x243a00(0x13d),'responseHighlights':[a1_0x243a00(0x119)],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':[a1_0x243a00(0x176)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':a1_0x243a00(0x13f),'category':'bf','title':a1_0x243a00(0x11e),'method':'GET','path':a1_0x243a00(0x157),'summary':a1_0x243a00(0x17a),'whenToUse':a1_0x243a00(0x112),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'}],'queryParams':[],'bodySchema':'None','responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':[a1_0x243a00(0x152)],'notes':[a1_0x243a00(0x13e)],'markdown':a1_0x243a00(0x15a)},{'code':'bf_execute','category':'bf','title':a1_0x243a00(0x13c),'method':a1_0x243a00(0x155),'path':a1_0x243a00(0x11f),'summary':a1_0x243a00(0x12b),'whenToUse':a1_0x243a00(0x156),'pathParams':[{'name':a1_0x243a00(0x121),'description':a1_0x243a00(0x14f)},{'name':a1_0x243a00(0x134),'description':a1_0x243a00(0x123)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x243a00(0x16b)],'examples':[a1_0x243a00(0x168)],'notes':[a1_0x243a00(0x171)],'markdown':a1_0x243a00(0x146)},{'code':'custom_sql_execute','category':'custom_sql','title':'Execute\x20custom\x20SQL','method':'POST','path':'/api/custom/executeSql','summary':a1_0x243a00(0x12e),'whenToUse':a1_0x243a00(0x116),'pathParams':[],'queryParams':[],'bodySchema':a1_0x243a00(0x10a),'responseHighlights':[a1_0x243a00(0x16a)],'examples':[a1_0x243a00(0x145)],'notes':[a1_0x243a00(0x115)],'markdown':a1_0x243a00(0x151)}];function entrySummary(_0x5b83ee){const _0x3e8de2=a1_0x243a00;return{'code':_0x5b83ee[_0x3e8de2(0x153)],'category':_0x5b83ee[_0x3e8de2(0x142)],'method':_0x5b83ee[_0x3e8de2(0x161)],'path':_0x5b83ee['path'],'summary':_0x5b83ee['summary'],'whenToUse':_0x5b83ee['whenToUse']};}export function listApiDocEntries(_0x4672a5={}){const _0x4ad5a0=a1_0x243a00,_0x2d6be1=String(_0x4672a5[_0x4ad5a0(0x142)]||'')['trim'](),_0x1658ff=String(_0x4672a5[_0x4ad5a0(0x14d)]||'')['trim']()[_0x4ad5a0(0x154)]();return DOCS[_0x4ad5a0(0x136)](_0x1273bc=>{const _0x510f94=_0x4ad5a0;if(_0x2d6be1&&_0x1273bc[_0x510f94(0x142)]!==_0x2d6be1)return![];if(!_0x1658ff)return!![];return[_0x1273bc[_0x510f94(0x153)],_0x1273bc['category'],_0x1273bc[_0x510f94(0x161)],_0x1273bc['path'],_0x1273bc[_0x510f94(0x177)],_0x1273bc[_0x510f94(0x13a)],_0x1273bc[_0x510f94(0x178)]][_0x510f94(0x114)]('\x20')[_0x510f94(0x154)]()[_0x510f94(0x111)](_0x1658ff);})[_0x4ad5a0(0x15f)](entrySummary);}export function getApiDocDetail(_0x183579){const _0x3ea4af=a1_0x243a00,_0x57e3b4=DOCS[_0x3ea4af(0x11d)](_0x11e32a=>_0x11e32a[_0x3ea4af(0x153)]===_0x183579);if(!_0x57e3b4)throw CliErrors[_0x3ea4af(0x165)](_0x3ea4af(0x14e)+_0x183579);return{..._0x57e3b4};}const apiDocList={'service':a1_0x243a00(0x163),'command':a1_0x243a00(0x13b),'description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':'read','requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x58e33a){const _0x42bad7=a1_0x243a00,_0x5e7b10=listApiDocEntries({'category':_0x58e33a[_0x42bad7(0x149)]('category'),'keyword':_0x58e33a[_0x42bad7(0x149)](_0x42bad7(0x14d))});return{'ok':!![],'data':{'total':_0x5e7b10[_0x42bad7(0x14a)],'items':_0x5e7b10}};}},apiDocDetail={'service':a1_0x243a00(0x163),'command':'detail','description':a1_0x243a00(0x118),'risk':a1_0x243a00(0x158),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x5af658){const _0x6ff17c=a1_0x243a00;return{'ok':!![],'data':getApiDocDetail(_0x5af658[_0x6ff17c(0x149)](_0x6ff17c(0x153)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x568419,_0x4b8864){const _0x2937f4=a2_0x3366,_0x46639f=_0x568419();while(!![]){try{const _0x1f9765=-parseInt(_0x2937f4(0x1d3))/0x1*(-parseInt(_0x2937f4(0x1cf))/0x2)+-parseInt(_0x2937f4(0x1de))/0x3*(-parseInt(_0x2937f4(0x1da))/0x4)+parseInt(_0x2937f4(0x1db))/0x5+-parseInt(_0x2937f4(0x1ec))/0x6*(parseInt(_0x2937f4(0x1d7))/0x7)+parseInt(_0x2937f4(0x1d6))/0x8*(-parseInt(_0x2937f4(0x1d9))/0x9)+parseInt(_0x2937f4(0x1ea))/0xa*(parseInt(_0x2937f4(0x1e6))/0xb)+-parseInt(_0x2937f4(0x1e7))/0xc;if(_0x1f9765===_0x4b8864)break;else _0x46639f['push'](_0x46639f['shift']());}catch(_0x1fa572){_0x46639f['push'](_0x46639f['shift']());}}}(a2_0x4aa9,0xa1c1f));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';function a2_0x3366(_0x15b1e9,_0x1cb01b){_0x15b1e9=_0x15b1e9-0x1cf;const _0x4aa934=a2_0x4aa9();let _0x3366d0=_0x4aa934[_0x15b1e9];return _0x3366d0;}import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0xd60292){const _0x168cff=a2_0x3366,_0x48ef90=_0xd60292['trim'](),_0x31874c=_0x48ef90[_0x168cff(0x1e8)](-0x6)||_0x168cff(0x1e5),_0x5ac0f0=createHash(_0x168cff(0x1df))[_0x168cff(0x1d0)](_0x48ef90)[_0x168cff(0x1dc)]('hex')[_0x168cff(0x1e8)](0x0,0xc);return _0x168cff(0x1ed)+_0x31874c+'_'+_0x5ac0f0;}export function getAppCacheFilePath(_0xdc1a06,_0x5232a6){const _0x3e8662=a2_0x3366;return resolve(homedir(),PRODUCT_CONFIG[_0x3e8662(0x1d1)],_0x3e8662(0x1e2),_0xdc1a06,fingerprintAccessKey(_0x5232a6),_0x3e8662(0x1e9));}export function readCachedAppList(_0x18d81d,_0x2aee17){const _0x1e86c6=a2_0x3366;if(!_0x2aee17?.[_0x1e86c6(0x1d8)]())return null;const _0x2a137d=getAppCacheFilePath(_0x18d81d,_0x2aee17);if(!existsSync(_0x2a137d))return null;try{const _0x4bb399=readFileSync(_0x2a137d,_0x1e86c6(0x1eb));if(!_0x4bb399[_0x1e86c6(0x1d8)]())return null;const _0x363d0e=JSON[_0x1e86c6(0x1e0)](_0x4bb399);if(!Array[_0x1e86c6(0x1d2)](_0x363d0e[_0x1e86c6(0x1d4)]))return null;return _0x363d0e;}catch{return null;}}function a2_0x4aa9(){const _0x1f8bbe=['homeDirName','isArray','3uZcVFE','items','code','83352FSdnFr','224JtrCfA','trim','189pEuZHO','496336hsEXJh','4736585kMXqGB','digest','appName','24xcjpTs','sha256','parse','stringify','cache','EACCES','.tmp','unknown','1216457NhBRdd','7258152UrJNdj','slice','my-apps.json','20CnkLxk','utf8','134868YtHetF','ak_','EPERM','29558uSQLvQ','update'];a2_0x4aa9=function(){return _0x1f8bbe;};return a2_0x4aa9();}export function writeCachedAppList(_0x4211e6,_0x5930ea,_0x24f61f){const _0x329ed6=a2_0x3366,_0x3a5624=getAppCacheFilePath(_0x4211e6,_0x5930ea),_0x3a8855=dirname(_0x3a5624);!existsSync(_0x3a8855)&&mkdirSync(_0x3a8855,{'recursive':!![]});const _0x41b02c=_0x3a5624+_0x329ed6(0x1e4);try{writeFileSync(_0x41b02c,JSON['stringify'](_0x24f61f,null,0x2)+'\x0a',{'encoding':_0x329ed6(0x1eb),'mode':0x180});try{renameSync(_0x41b02c,_0x3a5624);}catch(_0x1af354){if(_0x1af354['code']===_0x329ed6(0x1ee)||_0x1af354[_0x329ed6(0x1d5)]==='EXDEV'||_0x1af354['code']===_0x329ed6(0x1e3)){writeFileSync(_0x3a5624,JSON[_0x329ed6(0x1e1)](_0x24f61f,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x41b02c);}catch{}}else throw _0x1af354;}}catch(_0x1b78de){try{unlinkSync(_0x41b02c);}catch{}throw _0x1b78de;}return _0x3a5624;}export function resolveCachedAppCode(_0x498e5c,_0x14c161,_0x42dd63){const _0x4d23d4=a2_0x3366;if(!_0x498e5c)return undefined;const _0x371b1b=readCachedAppList(_0x14c161,_0x42dd63),_0x5e9125=_0x371b1b?.[_0x4d23d4(0x1d4)]['find'](_0x195b07=>_0x195b07[_0x4d23d4(0x1dd)]===_0x498e5c&&isRuntimeAccessibleApp(_0x195b07));return _0x5e9125?.['appCode']?.[_0x4d23d4(0x1d8)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0x2ac050=a3_0x70f2;(function(_0x1f6bb3,_0x203fb6){const _0xb12718=a3_0x70f2,_0x4d19eb=_0x1f6bb3();while(!![]){try{const _0x2d1098=parseInt(_0xb12718(0xb7))/0x1+parseInt(_0xb12718(0xfd))/0x2+parseInt(_0xb12718(0xf4))/0x3*(-parseInt(_0xb12718(0xb2))/0x4)+parseInt(_0xb12718(0xf1))/0x5+-parseInt(_0xb12718(0xbf))/0x6+-parseInt(_0xb12718(0xc9))/0x7+parseInt(_0xb12718(0xed))/0x8;if(_0x2d1098===_0x203fb6)break;else _0x4d19eb['push'](_0x4d19eb['shift']());}catch(_0x533dd5){_0x4d19eb['push'](_0x4d19eb['shift']());}}}(a3_0xb6e9,0x2e7ff));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';function a3_0xb6e9(){const _0x2696be=['nonInteractive','globalPath','3eNwidV','cache','Missing\x20app\x20name.','\x20app\x20','local','Target\x20environment\x20(default:\x20current\x20env)','source','appPublishStatus','Remote\x20app\x20name\x20to\x20activate','87666WJsnyY','boolean','Default\x20app\x20candidate\x20set\x20to\x20\x22','Refreshed\x20app\x20cache\x20with\x20','write','production','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','init','filter','list','.appcode\x20to\x20.lovrabet.json.','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','envName','raw','116796cpOiSO','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','map','remote','config','17211VfFMLA','../../commands/app/remote-source.js','include-unpublished','read','items','defaultApp','validation','args','1632042HfWGEv','Use\x20`','enableI18n','app','bool','no-cache','Use\x20global\x20config\x20scope','appOwnerName','import','No\x20apps\x20found\x20on\x20the\x20platform.','2446661KnXMoc','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','use','Filter\x20by\x20environment\x20(default:\x20current\x20env)','type','appcode','accessKey','trim','global','\x20app(s)\x20for\x20env=\x22','\x20is\x20deprecated.\x20Use\x20`','\x20app\x20use\x20<name>\x20[--global]','Read\x20app\x20list\x20from\x20local\x20cache\x20only','string','isArray','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','App\x20\x22','find','langs','i18nInfo','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','appCode','No\x20cached\x20apps\x20found.','isCurrent','Usage:\x20','fetchedAt','length','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','cachePath','str','projectPath','../../commands/app/cache.js','../../context.js','\x22\x20not\x20found.','env','join','3815128wBVMFc','appName','pull','name','1516285ncbEKg'];a3_0xb6e9=function(){return _0x2696be;};return a3_0xb6e9();}import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':'global','type':a3_0x2ac050(0xfe),'description':a3_0x2ac050(0xc5),'default':![]};function a3_0x70f2(_0x54ca4f,_0x251185){_0x54ca4f=_0x54ca4f-0xaa;const _0xb6e97c=a3_0xb6e9();let _0x70f233=_0xb6e97c[_0x54ca4f];return _0x70f233;}function collectFlags(_0x137bc8,_0x728e82){const _0x3c40f7=a3_0x2ac050,_0x5bc50f={};for(const _0xc02eab of _0x728e82){const _0x23dd1d=_0xc02eab[_0x3c40f7(0xcd)]===_0x3c40f7(0xfe)?_0x137bc8[_0x3c40f7(0xc3)](_0xc02eab[_0x3c40f7(0xf0)]):_0x137bc8[_0x3c40f7(0xe6)](_0xc02eab[_0x3c40f7(0xf0)]);if(_0x23dd1d!==''&&_0x23dd1d!==![])_0x5bc50f[_0xc02eab[_0x3c40f7(0xf0)]]=_0x23dd1d;}if(_0x137bc8[_0x3c40f7(0xf2)])_0x5bc50f[_0x3c40f7(0xf2)]=!![];return _0x5bc50f;}function normalizeLanguages(_0x1a715d){const _0x261a6d=a3_0x2ac050;if(!Array[_0x261a6d(0xd7)](_0x1a715d))return[];return _0x1a715d[_0x261a6d(0xac)](_0x2ec3e7=>typeof _0x2ec3e7==='string')[_0x261a6d(0xb4)](_0x544dfb=>_0x544dfb['trim']())[_0x261a6d(0xac)](Boolean);}function buildRemoteAppI18nFields(_0x2a2b3e){const _0x21f43d=a3_0x2ac050,_0x129c90=normalizeLanguages(_0x2a2b3e[_0x21f43d(0xdc)]?.[_0x21f43d(0xdb)]);return{'enableI18n':typeof _0x2a2b3e[_0x21f43d(0xc1)]==='boolean'?_0x2a2b3e[_0x21f43d(0xc1)]:null,'languages':_0x129c90,'i18nInfo':_0x2a2b3e[_0x21f43d(0xdc)]?{..._0x2a2b3e[_0x21f43d(0xdc)],'langs':_0x129c90[_0x21f43d(0xe3)]?_0x129c90:null}:null};}const initDef={'service':a3_0x2ac050(0xc2),'command':a3_0x2ac050(0xab),'description':a3_0x2ac050(0xdd),'risk':a3_0x2ac050(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x25d30f){const _0x15d6b9=a3_0x2ac050;return warnDeprecatedAppCommand('init',CLI_BIN_NAME+_0x15d6b9(0xaa)),await runInit(collectFlags(_0x25d30f,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x2ac050(0xc2),'command':a3_0x2ac050(0xad),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a3_0x2ac050(0xba),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x2ac050(0xeb),'type':a3_0x2ac050(0xd6),'description':a3_0x2ac050(0xcc),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x2ac050(0xf8),'type':a3_0x2ac050(0xfe),'description':a3_0x2ac050(0xd5),'default':![]},{'name':a3_0x2ac050(0xc4),'type':'boolean','description':a3_0x2ac050(0xb3),'default':![]},{'name':a3_0x2ac050(0xb9),'type':a3_0x2ac050(0xfe),'description':'Include\x20unpublished\x20apps\x20for\x20diagnostics','default':![]}],async 'execute'(_0x30fc7e){const _0x2d911a=a3_0x2ac050,_0x16cf5b=_0x30fc7e['str'](_0x2d911a(0xeb))||_0x30fc7e[_0x2d911a(0xb0)]||getEnv()||_0x2d911a(0x102),_0x5a401b=_0x30fc7e[_0x2d911a(0xc3)]('local'),_0x520b7c=_0x30fc7e[_0x2d911a(0xc3)](_0x2d911a(0xc4)),_0x3b51ce=_0x30fc7e[_0x2d911a(0xc3)](_0x2d911a(0xb9)),{readRawConfigWithLayers:_0x30e1ae,resolveDefaultAppSource:_0x2baa0e,getLocalAppAliases:_0x202be6}=await import(_0x2d911a(0xe9)),{getRemoteAppList:_0x9b494f}=await import(_0x2d911a(0xb8)),{config:_0x286ba0,layers:_0x3b8128}=_0x30e1ae(),_0x520c71=_0x2baa0e(_0x3b8128),{defaultApp:_0x8b563b}=_0x286ba0,_0xe63d23=await _0x9b494f({'env':_0x16cf5b,'accessKey':_0x30fc7e['accessKey'],'localOnly':_0x5a401b,'noCache':_0x520b7c}),_0x52c56e=_0x3b51ce?_0xe63d23[_0x2d911a(0xbb)]:filterRuntimeAccessibleApps(_0xe63d23[_0x2d911a(0xbb)]),_0x299b6d=_0xe63d23[_0x2d911a(0xbb)]['length']-_0x52c56e['length'],_0x20c8cd=_0x52c56e['map'](_0x130b8b=>{const _0x59aa22=_0x2d911a;return{'name':_0x130b8b[_0x59aa22(0xee)],'appcode':_0x130b8b[_0x59aa22(0xde)],'named':!![],'definedIn':_0x59aa22(0xb5),'isDefault':_0x130b8b[_0x59aa22(0xee)]===_0x8b563b,...buildAppProfileListFields(_0x16cf5b),...buildRemoteAppI18nFields(_0x130b8b),'source':_0xe63d23[_0x59aa22(0xfa)],'owner':_0x130b8b[_0x59aa22(0xc6)]??null,'status':_0x130b8b[_0x59aa22(0xfb)]??null,'cachedAt':_0xe63d23['fetchedAt']};}),_0x466a47=_0x202be6(_0x286ba0);let _0x2ac5ff=0x0;for(const [_0x35ce4e,_0x252cd0]of Object['entries'](_0x466a47)){const _0x42f887=typeof _0x252cd0[_0x2d911a(0xce)]===_0x2d911a(0xd6)?_0x252cd0[_0x2d911a(0xce)][_0x2d911a(0xd0)]():'';if(!_0x42f887)continue;const _0x55838e=findAppByCode(_0xe63d23['items'],_0x42f887);if(!_0x3b51ce&&_0x55838e&&!isRuntimeAccessibleApp(_0x55838e))continue;_0x2ac5ff+=0x1,_0x20c8cd['push']({'name':_0x35ce4e,'appcode':_0x42f887,'named':!![],'definedIn':_0x2d911a(0xf8),'isDefault':_0x35ce4e===_0x8b563b,...buildAppProfileListFields(_0x16cf5b),'source':_0x2d911a(0xb6),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x20c8cd,_0x30fc7e['mergedCli']);const _0x433d3d=_0x20c8cd[_0x2d911a(0xda)](_0x3c9914=>_0x3c9914[_0x2d911a(0xe0)]===!![]),_0x3572c1=_0x8b563b??_0x433d3d?.[_0x2d911a(0xf0)]??null,_0x52e071={'env':_0x16cf5b,'source':_0xe63d23[_0x2d911a(0xfa)],'fetchedAt':_0xe63d23[_0x2d911a(0xe2)],'cachePath':_0xe63d23[_0x2d911a(0xe5)],'globalPath':_0x3b8128[_0x2d911a(0xf3)]??null,'projectPath':_0x3b8128[_0x2d911a(0xe7)]??null,'defaultApp':_0x3572c1,'defaultAppSource':_0x8b563b!=null?_0x520c71:null,'localAliasCount':_0x2ac5ff,'remoteTotal':_0xe63d23['items'][_0x2d911a(0xe3)],'hiddenUnpublishedCount':_0x299b6d,'includeUnpublished':_0x3b51ce};if(_0x20c8cd[_0x2d911a(0xe3)]===0x0)return{'ok':!![],'data':{'items':_0x20c8cd,'meta':_0x52e071},'message':_0xe63d23[_0x2d911a(0xfa)]===_0x2d911a(0xf5)?_0x2d911a(0xdf):_0x2d911a(0xc8)};return{'ok':!![],'data':{'items':_0x20c8cd,'meta':_0x52e071}};}},pullDef={'service':a3_0x2ac050(0xc2),'command':a3_0x2ac050(0xef),'description':a3_0x2ac050(0xd8),'risk':a3_0x2ac050(0x101),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x2ac050(0xeb),'type':'string','description':a3_0x2ac050(0xf9),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x2ac050(0xf8),'type':a3_0x2ac050(0xfe),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x2ac050(0xc4),'type':a3_0x2ac050(0xfe),'description':a3_0x2ac050(0xb3),'default':![]}],async 'execute'(_0x3fb5c7){const _0x10e956=a3_0x2ac050,_0x2cf6ba=_0x3fb5c7[_0x10e956(0xe6)](_0x10e956(0xeb))||_0x3fb5c7['envName']||getEnv()||'production',_0x2a992d=_0x3fb5c7[_0x10e956(0xc3)](_0x10e956(0xf8)),_0x12fa7c=_0x3fb5c7[_0x10e956(0xc3)](_0x10e956(0xc4)),{getRemoteAppList:_0x53a3d3}=await import(_0x10e956(0xb8)),_0x62c3c6=await _0x53a3d3({'env':_0x2cf6ba,'accessKey':_0x3fb5c7[_0x10e956(0xcf)],'localOnly':_0x2a992d,'noCache':_0x12fa7c});return{'ok':!![],'data':{'total':_0x62c3c6['items']['length'],'env':_0x2cf6ba,'source':_0x62c3c6['source'],'fetchedAt':_0x62c3c6[_0x10e956(0xe2)],'cachePath':_0x62c3c6[_0x10e956(0xe5)]},'message':_0x62c3c6[_0x10e956(0xfa)]===_0x10e956(0xf5)?'Loaded\x20'+_0x62c3c6[_0x10e956(0xbb)]['length']+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x2cf6ba+'\x22.':_0x10e956(0x100)+_0x62c3c6[_0x10e956(0xbb)][_0x10e956(0xe3)]+_0x10e956(0xd2)+_0x2cf6ba+'\x22.'};}},useDef={'service':'app','command':'use','description':'Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a3_0x2ac050(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x2ac050(0xf0),'description':a3_0x2ac050(0xfc),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x37757b){const _0x24747c=a3_0x2ac050;if(!_0x37757b[_0x24747c(0xbe)][0x0])throw CliErrors[_0x24747c(0xbd)](_0x24747c(0xf6),_0x24747c(0xe1)+CLI_BIN_NAME+_0x24747c(0xd4));},async 'execute'(_0x3276ae){const _0x5e4f46=a3_0x2ac050;warnDeprecatedAppCommand(_0x5e4f46(0xcb),CLI_BIN_NAME+_0x5e4f46(0xaf));const _0x3ce073=_0x3276ae['args'][0x0];if(!_0x3ce073)throw CliErrors[_0x5e4f46(0xbd)](_0x5e4f46(0xf6),_0x5e4f46(0xe1)+CLI_BIN_NAME+_0x5e4f46(0xd4));const {buildConfigFromFlags:_0x18dd55,resolveLocalAppAliasCode:_0x475b03}=await import(_0x5e4f46(0xe9)),{readCachedAppList:_0x21273f}=await import(_0x5e4f46(0xe8)),_0x3d8ac7=_0x3276ae[_0x5e4f46(0xe6)](_0x5e4f46(0xeb)),_0x349806=_0x18dd55(_0x3d8ac7?{'env':_0x3d8ac7}:{}),_0x25b65d=_0x21273f(_0x349806[_0x5e4f46(0xeb)],_0x349806[_0x5e4f46(0xcf)]),_0x98bb4e=_0x25b65d?.[_0x5e4f46(0xbb)][_0x5e4f46(0xda)](_0x543f41=>_0x543f41['appName']===_0x3ce073),_0x5852bf=_0x475b03(_0x349806[_0x5e4f46(0xb1)]??{},_0x3ce073);if(_0x98bb4e&&!isRuntimeAccessibleApp(_0x98bb4e))throw runtimeInaccessibleAppError(_0x98bb4e,'\x22'+_0x3ce073+'\x22');if(_0x5852bf){const _0x3f78d2=_0x25b65d?.['items']['find'](_0x243595=>_0x243595[_0x5e4f46(0xde)]?.['trim']()===_0x5852bf);if(_0x3f78d2&&!isRuntimeAccessibleApp(_0x3f78d2))throw runtimeInaccessibleAppError(_0x3f78d2,'\x22'+_0x3ce073+'\x22');}if(!_0x98bb4e&&!_0x5852bf&&_0x349806['defaultApp']!==_0x3ce073){const _0x1b67b6=[..._0x25b65d?.[_0x5e4f46(0xbb)][_0x5e4f46(0xb4)](_0x3208b0=>_0x3208b0[_0x5e4f46(0xee)])??[]],_0x41ece0=_0x1b67b6[_0x5e4f46(0xe3)]===0x0?_0x5e4f46(0xc0)+CLI_BIN_NAME+_0x5e4f46(0xca)+_0x3ce073+_0x5e4f46(0xae):'Available\x20remote\x20apps:\x20'+Array['from'](new Set(_0x1b67b6))[_0x5e4f46(0xec)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors[_0x5e4f46(0xbd)](_0x5e4f46(0xd9)+_0x3ce073+_0x5e4f46(0xea),_0x41ece0);}const _0x21a6bc=_0x3276ae[_0x5e4f46(0xc3)](_0x5e4f46(0xd1));let _0x3f9cb1;if(_0x21a6bc)_0x3f9cb1={'global':!![]};else{const {isInProject:_0x589955}=await import(_0x5e4f46(0xe9)),_0xc17288=_0x589955();_0x3f9cb1=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0xc17288}));}const _0x365171=readConfig(_0x3f9cb1);return _0x365171[_0x5e4f46(0xbc)]=_0x3ce073,writeConfig(_0x365171,_0x3f9cb1),{'ok':!![],'message':_0x5e4f46(0xff)+_0x3ce073+'\x22'+scopeLabel(_0x3f9cb1)+'.'};}};function warnDeprecatedAppCommand(_0x92b7bf,_0x158c53){const _0xc4ed8f=a3_0x2ac050;console['warn'](CLI_BIN_NAME+_0xc4ed8f(0xf7)+_0x92b7bf+_0xc4ed8f(0xd3)+_0x158c53+'`\x20instead.');}const importDef={'service':a3_0x2ac050(0xc2),'command':a3_0x2ac050(0xc7),'description':a3_0x2ac050(0xe4),'risk':a3_0x2ac050(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0xef1c51){return await runInitImport(collectFlags(_0xef1c51,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a3_0x25581a=a3_0x576c;(function(_0x48a631,_0x3af7d0){const _0x2fb93b=a3_0x576c,_0x427d31=_0x48a631();while(!![]){try{const _0x4cc7e3=-parseInt(_0x2fb93b(0x19c))/0x1*(parseInt(_0x2fb93b(0x15f))/0x2)+-parseInt(_0x2fb93b(0x1b1))/0x3*(parseInt(_0x2fb93b(0x192))/0x4)+parseInt(_0x2fb93b(0x16f))/0x5*(parseInt(_0x2fb93b(0x19d))/0x6)+parseInt(_0x2fb93b(0x1a2))/0x7+parseInt(_0x2fb93b(0x189))/0x8+parseInt(_0x2fb93b(0x17f))/0x9*(parseInt(_0x2fb93b(0x181))/0xa)+parseInt(_0x2fb93b(0x184))/0xb*(-parseInt(_0x2fb93b(0x16a))/0xc);if(_0x4cc7e3===_0x3af7d0)break;else _0x427d31['push'](_0x427d31['shift']());}catch(_0x199c96){_0x427d31['push'](_0x427d31['shift']());}}}(a3_0x3a7e,0xb9cd3));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';function a3_0x576c(_0x6977af,_0x286712){_0x6977af=_0x6977af-0x15d;const _0x3a7e56=a3_0x3a7e();let _0x576c5b=_0x3a7e56[_0x6977af];return _0x576c5b;}const GLOBAL_FLAG={'name':a3_0x25581a(0x180),'type':'boolean','description':a3_0x25581a(0x183),'default':![]};function collectFlags(_0x2e1939,_0x5992cc){const _0x2ad22b=a3_0x25581a,_0x40d5b3={};for(const _0x5ec6d8 of _0x5992cc){const _0x2c36d1=_0x5ec6d8[_0x2ad22b(0x16b)]===_0x2ad22b(0x1ac)?_0x2e1939[_0x2ad22b(0x168)](_0x5ec6d8[_0x2ad22b(0x198)]):_0x2e1939[_0x2ad22b(0x1b4)](_0x5ec6d8['name']);if(_0x2c36d1!==''&&_0x2c36d1!==![])_0x40d5b3[_0x5ec6d8[_0x2ad22b(0x198)]]=_0x2c36d1;}if(_0x2e1939['nonInteractive'])_0x40d5b3[_0x2ad22b(0x1bd)]=!![];return _0x40d5b3;}function normalizeLanguages(_0x327566){const _0xa563b7=a3_0x25581a;if(!Array[_0xa563b7(0x19b)](_0x327566))return[];return _0x327566[_0xa563b7(0x1b2)](_0x4b30f6=>typeof _0x4b30f6===_0xa563b7(0x171))[_0xa563b7(0x162)](_0x3df01d=>_0x3df01d[_0xa563b7(0x1a8)]())[_0xa563b7(0x1b2)](Boolean);}function buildRemoteAppI18nFields(_0x55cb20){const _0x11a5bb=a3_0x25581a,_0x4c82f0=normalizeLanguages(_0x55cb20[_0x11a5bb(0x1ba)]?.[_0x11a5bb(0x18c)]);return{'enableI18n':typeof _0x55cb20['enableI18n']==='boolean'?_0x55cb20[_0x11a5bb(0x1b8)]:null,'languages':_0x4c82f0,'i18nInfo':_0x55cb20[_0x11a5bb(0x1ba)]?{..._0x55cb20[_0x11a5bb(0x1ba)],'langs':_0x4c82f0['length']?_0x4c82f0:null}:null};}const initDef={'service':a3_0x25581a(0x19f),'command':a3_0x25581a(0x18f),'description':a3_0x25581a(0x1a7),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x453d3b){const _0x491ebc=a3_0x25581a;return warnDeprecatedAppCommand(_0x491ebc(0x18f),CLI_BIN_NAME+_0x491ebc(0x1be)),await runInit(collectFlags(_0x453d3b,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x25581a(0x19f),'command':a3_0x25581a(0x186),'description':a3_0x25581a(0x18e),'risk':a3_0x25581a(0x1ab),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x25581a(0x177),'type':a3_0x25581a(0x171),'description':a3_0x25581a(0x182),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x25581a(0x1a1),'type':'boolean','description':a3_0x25581a(0x188),'default':![]},{'name':a3_0x25581a(0x17d),'type':a3_0x25581a(0x1ac),'description':a3_0x25581a(0x17c),'default':![]},{'name':'include-unpublished','type':a3_0x25581a(0x1ac),'description':'Include\x20unpublished\x20apps\x20for\x20diagnostics','default':![]}],async 'execute'(_0x19f672){const _0x191b23=a3_0x25581a,_0x40b66c=_0x19f672[_0x191b23(0x1b4)]('env')||_0x19f672[_0x191b23(0x172)]||getEnv()||_0x191b23(0x1b7),_0x44e016=_0x19f672[_0x191b23(0x168)](_0x191b23(0x1a1)),_0x2f292d=_0x19f672[_0x191b23(0x168)](_0x191b23(0x17d)),_0x255504=_0x19f672['bool'](_0x191b23(0x15d)),{readRawConfigWithLayers:_0x5eea7a,resolveDefaultAppSource:_0x561c73,getLocalAppAliases:_0xbb8e1b}=await import('../../context.js'),{getRemoteAppList:_0x4664e6}=await import(_0x191b23(0x194)),{config:_0x2e0e62,layers:_0x516b7f}=_0x5eea7a(),_0x16072e=_0x561c73(_0x516b7f),{defaultApp:_0x56537c}=_0x2e0e62,_0x3a5e94=await _0x4664e6({'env':_0x40b66c,'accessKey':_0x19f672['accessKey'],'localOnly':_0x44e016,'noCache':_0x2f292d}),_0x52283a=_0x255504?_0x3a5e94[_0x191b23(0x1a0)]:filterRuntimeAccessibleApps(_0x3a5e94[_0x191b23(0x1a0)]),_0x1b9647=_0x3a5e94['items'][_0x191b23(0x1a3)]-_0x52283a[_0x191b23(0x1a3)],_0x45aa36=_0x52283a[_0x191b23(0x162)](_0x3c2b76=>{const _0x4233c5=_0x191b23;return{'name':_0x3c2b76['appName'],'appcode':_0x3c2b76[_0x4233c5(0x165)],'named':!![],'definedIn':'remote','isDefault':_0x3c2b76['appName']===_0x56537c,...buildAppProfileListFields(_0x40b66c),...buildRemoteAppI18nFields(_0x3c2b76),'source':_0x3a5e94[_0x4233c5(0x191)],'owner':_0x3c2b76[_0x4233c5(0x1b9)]??null,'status':_0x3c2b76[_0x4233c5(0x1ad)]??null,'cachedAt':_0x3a5e94[_0x4233c5(0x178)]};}),_0x28356b=_0xbb8e1b(_0x2e0e62);let _0x1e78c8=0x0;for(const [_0x373159,_0x227e01]of Object[_0x191b23(0x18a)](_0x28356b)){const _0x577ef0=typeof _0x227e01['appcode']===_0x191b23(0x171)?_0x227e01[_0x191b23(0x15e)][_0x191b23(0x1a8)]():'';if(!_0x577ef0)continue;const _0x4f5abc=findAppByCode(_0x3a5e94[_0x191b23(0x1a0)],_0x577ef0);if(!_0x255504&&_0x4f5abc&&!isRuntimeAccessibleApp(_0x4f5abc))continue;_0x1e78c8+=0x1,_0x45aa36[_0x191b23(0x19e)]({'name':_0x373159,'appcode':_0x577ef0,'named':!![],'definedIn':_0x191b23(0x1a1),'isDefault':_0x373159===_0x56537c,...buildAppProfileListFields(_0x40b66c),'source':_0x191b23(0x167),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x45aa36,_0x19f672[_0x191b23(0x197)]);const _0x1dc4a9=_0x45aa36['find'](_0x15bd45=>_0x15bd45[_0x191b23(0x18b)]===!![]),_0x286262=_0x56537c??_0x1dc4a9?.[_0x191b23(0x198)]??null,_0x2fb8c4={'env':_0x40b66c,'source':_0x3a5e94['source'],'fetchedAt':_0x3a5e94[_0x191b23(0x178)],'cachePath':_0x3a5e94[_0x191b23(0x1a6)],'globalPath':_0x516b7f[_0x191b23(0x17e)]??null,'projectPath':_0x516b7f[_0x191b23(0x187)]??null,'defaultApp':_0x286262,'defaultAppSource':_0x56537c!=null?_0x16072e:null,'localAliasCount':_0x1e78c8,'remoteTotal':_0x3a5e94[_0x191b23(0x1a0)][_0x191b23(0x1a3)],'hiddenUnpublishedCount':_0x1b9647,'includeUnpublished':_0x255504};if(_0x45aa36[_0x191b23(0x1a3)]===0x0)return{'ok':!![],'data':{'items':_0x45aa36,'meta':_0x2fb8c4},'message':_0x3a5e94['source']===_0x191b23(0x176)?_0x191b23(0x166):_0x191b23(0x163)};return{'ok':!![],'data':{'items':_0x45aa36,'meta':_0x2fb8c4}};}},pullDef={'service':a3_0x25581a(0x19f),'command':a3_0x25581a(0x1b0),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x25581a(0x170),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x25581a(0x177),'type':a3_0x25581a(0x171),'description':a3_0x25581a(0x164),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x25581a(0x1ac),'description':a3_0x25581a(0x1af),'default':![]},{'name':a3_0x25581a(0x17d),'type':a3_0x25581a(0x1ac),'description':a3_0x25581a(0x17c),'default':![]}],async 'execute'(_0x8fb3c5){const _0x125ac9=a3_0x25581a,_0x397169=_0x8fb3c5[_0x125ac9(0x1b4)](_0x125ac9(0x177))||_0x8fb3c5[_0x125ac9(0x172)]||getEnv()||_0x125ac9(0x1b7),_0x143cba=_0x8fb3c5[_0x125ac9(0x168)](_0x125ac9(0x1a1)),_0x50b8e9=_0x8fb3c5[_0x125ac9(0x168)](_0x125ac9(0x17d)),{getRemoteAppList:_0x486fcf}=await import(_0x125ac9(0x194)),_0x31fdfe=await _0x486fcf({'env':_0x397169,'accessKey':_0x8fb3c5[_0x125ac9(0x16d)],'localOnly':_0x143cba,'noCache':_0x50b8e9});return{'ok':!![],'data':{'total':_0x31fdfe[_0x125ac9(0x1a0)][_0x125ac9(0x1a3)],'env':_0x397169,'source':_0x31fdfe[_0x125ac9(0x191)],'fetchedAt':_0x31fdfe[_0x125ac9(0x178)],'cachePath':_0x31fdfe[_0x125ac9(0x1a6)]},'message':_0x31fdfe[_0x125ac9(0x191)]==='cache'?_0x125ac9(0x190)+_0x31fdfe[_0x125ac9(0x1a0)][_0x125ac9(0x1a3)]+_0x125ac9(0x161)+_0x397169+'\x22.':_0x125ac9(0x1ae)+_0x31fdfe[_0x125ac9(0x1a0)][_0x125ac9(0x1a3)]+_0x125ac9(0x185)+_0x397169+'\x22.'};}},useDef={'service':a3_0x25581a(0x19f),'command':a3_0x25581a(0x179),'description':'Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x25581a(0x198),'description':a3_0x25581a(0x1bf),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x2ce0d9){const _0x4fb770=a3_0x25581a;if(!_0x2ce0d9['args'][0x0])throw CliErrors[_0x4fb770(0x1b5)]('Missing\x20app\x20name.',_0x4fb770(0x169)+CLI_BIN_NAME+_0x4fb770(0x174));},async 'execute'(_0x3b1105){const _0x3f89a8=a3_0x25581a;warnDeprecatedAppCommand(_0x3f89a8(0x179),CLI_BIN_NAME+_0x3f89a8(0x17b));const _0x22ae98=_0x3b1105['args'][0x0];if(!_0x22ae98)throw CliErrors[_0x3f89a8(0x1b5)](_0x3f89a8(0x1bc),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x2d8a4a,resolveLocalAppAliasCode:_0x44c579}=await import(_0x3f89a8(0x18d)),{readCachedAppList:_0x534af0}=await import(_0x3f89a8(0x160)),_0x1ba71b=_0x3b1105[_0x3f89a8(0x1b4)](_0x3f89a8(0x177)),_0x2877da=_0x2d8a4a(_0x1ba71b?{'env':_0x1ba71b}:{}),_0x4ebfb4=_0x534af0(_0x2877da['env'],_0x2877da['accessKey']),_0x17557a=_0x4ebfb4?.[_0x3f89a8(0x1a0)]['find'](_0x1920f8=>_0x1920f8[_0x3f89a8(0x1a5)]===_0x22ae98),_0x16b61c=_0x44c579(_0x2877da[_0x3f89a8(0x1a9)]??{},_0x22ae98);if(_0x17557a&&!isRuntimeAccessibleApp(_0x17557a))throw runtimeInaccessibleAppError(_0x17557a,'\x22'+_0x22ae98+'\x22');if(_0x16b61c){const _0x30f618=_0x4ebfb4?.[_0x3f89a8(0x1a0)][_0x3f89a8(0x175)](_0x4f857c=>_0x4f857c[_0x3f89a8(0x165)]?.['trim']()===_0x16b61c);if(_0x30f618&&!isRuntimeAccessibleApp(_0x30f618))throw runtimeInaccessibleAppError(_0x30f618,'\x22'+_0x22ae98+'\x22');}if(!_0x17557a&&!_0x16b61c&&_0x2877da[_0x3f89a8(0x1b6)]!==_0x22ae98){const _0x47446b=[..._0x4ebfb4?.[_0x3f89a8(0x1a0)][_0x3f89a8(0x162)](_0x309958=>_0x309958[_0x3f89a8(0x1a5)])??[]],_0x3afcf6=_0x47446b['length']===0x0?_0x3f89a8(0x17a)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x22ae98+_0x3f89a8(0x195):'Available\x20remote\x20apps:\x20'+Array[_0x3f89a8(0x1b3)](new Set(_0x47446b))[_0x3f89a8(0x19a)](',\x20')+_0x3f89a8(0x1a4);throw CliErrors[_0x3f89a8(0x1b5)](_0x3f89a8(0x173)+_0x22ae98+'\x22\x20not\x20found.',_0x3afcf6);}const _0xed3c1f=_0x3b1105['bool'](_0x3f89a8(0x180));let _0x2f71f1;if(_0xed3c1f)_0x2f71f1={'global':!![]};else{const {isInProject:_0x5ab38a}=await import('../../context.js'),_0x3f895c=_0x5ab38a();_0x2f71f1=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x3f89a8(0x16c),'inProject':_0x3f895c}));}const _0x21090b=readConfig(_0x2f71f1);return _0x21090b[_0x3f89a8(0x1b6)]=_0x22ae98,writeConfig(_0x21090b,_0x2f71f1),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x22ae98+'\x22'+scopeLabel(_0x2f71f1)+'.'};}};function warnDeprecatedAppCommand(_0x484f79,_0x2aa67b){const _0x33e567=a3_0x25581a;console[_0x33e567(0x193)](CLI_BIN_NAME+_0x33e567(0x199)+_0x484f79+_0x33e567(0x1aa)+_0x2aa67b+_0x33e567(0x196));}const importDef={'service':a3_0x25581a(0x19f),'command':a3_0x25581a(0x16e),'description':a3_0x25581a(0x1bb),'risk':a3_0x25581a(0x170),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x41aaf9){return await runInitImport(collectFlags(_0x41aaf9,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];function a3_0x3a7e(){const _0x4a077b=['items','local','2388071FazdFt','length','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','appName','cachePath','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','trim','raw','\x20is\x20deprecated.\x20Use\x20`','read','boolean','appPublishStatus','Refreshed\x20app\x20cache\x20with\x20','Read\x20from\x20local\x20cache\x20only','pull','99aDhiMu','filter','from','str','validation','defaultApp','production','enableI18n','appOwnerName','i18nInfo','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','Missing\x20app\x20name.','nonInteractive','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','Remote\x20app\x20name\x20to\x20activate','include-unpublished','appcode','14BExfXn','../../commands/app/cache.js','\x20cached\x20app(s)\x20for\x20env=\x22','map','No\x20apps\x20found\x20on\x20the\x20platform.','Target\x20environment\x20(default:\x20current\x20env)','appCode','No\x20cached\x20apps\x20found.','config','bool','Usage:\x20','516ffBkMn','type','project-default','accessKey','import','45dcSeUN','write','string','envName','App\x20\x22','\x20app\x20use\x20<name>\x20[--global]','find','cache','env','fetchedAt','use','Use\x20`','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','no-cache','globalPath','33813MSOBMs','global','1730GvNmKx','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Use\x20global\x20config\x20scope','271557udEmta','\x20app(s)\x20for\x20env=\x22','list','projectPath','Read\x20app\x20list\x20from\x20local\x20cache\x20only','11120560JCgYxn','entries','isCurrent','langs','../../context.js','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','init','Loaded\x20','source','40364mddNvY','warn','../../commands/app/remote-source.js','.appcode\x20to\x20.lovrabet.json.','`\x20instead.','mergedCli','name','\x20app\x20','join','isArray','153849RMHBDB','567564nncGWd','push','app'];a3_0x3a7e=function(){return _0x4a077b;};return a3_0x3a7e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12fc65,_0x20ae5e){const _0x5a8578=a4_0x30e5,_0x1d8ce0=_0x12fc65();while(!![]){try{const _0x142cbe=parseInt(_0x5a8578(0x146))/0x1+parseInt(_0x5a8578(0x14c))/0x2*(-parseInt(_0x5a8578(0x15a))/0x3)+parseInt(_0x5a8578(0x14b))/0x4*(parseInt(_0x5a8578(0x147))/0x5)+parseInt(_0x5a8578(0x157))/0x6*(-parseInt(_0x5a8578(0x14d))/0x7)+parseInt(_0x5a8578(0x149))/0x8+-parseInt(_0x5a8578(0x154))/0x9+-parseInt(_0x5a8578(0x158))/0xa*(-parseInt(_0x5a8578(0x152))/0xb);if(_0x142cbe===_0x20ae5e)break;else _0x1d8ce0['push'](_0x1d8ce0['shift']());}catch(_0x3128fa){_0x1d8ce0['push'](_0x1d8ce0['shift']());}}}(a4_0xd410,0x1d11a));function a4_0x30e5(_0xdb229a,_0x4aeead){_0xdb229a=_0xdb229a-0x146;const _0xd41073=a4_0xd410();let _0x30e556=_0xd41073[_0xdb229a];return _0x30e556;}function a4_0xd410(){const _0xf1bca3=['appName','1644352CZiTLH','filter','4XPVPHh','8lVzWCY','55972jGsyrF','.\x20Publish\x20the\x20app\x20before\x20using\x20','trim','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','appCode','2383689HSuEEY','toUpperCase','1664721RTfEbK','UNKNOWN','appPublishStatus','150wOZUjI','10ebMxpL','find','47700lZeVGp','116633YtmCiz','143295pnxvTp'];a4_0xd410=function(){return _0xf1bca3;};return a4_0xd410();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x3f835d){const _0x30b69c=a4_0x30e5;if(typeof _0x3f835d!=='string')return null;const _0x96204=_0x3f835d[_0x30b69c(0x14f)]();return _0x96204?_0x96204[_0x30b69c(0x153)]():null;}export function isRuntimeAccessibleApp(_0x119753){const _0xc48cb2=a4_0x30e5;return normalizeAppPublishStatus(_0x119753[_0xc48cb2(0x156)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x1214bd){const _0x21e61f=a4_0x30e5;return _0x1214bd[_0x21e61f(0x14a)](isRuntimeAccessibleApp);}export function findAppByName(_0x2f4853,_0x1c4f10){const _0x45e8e7=a4_0x30e5;return _0x2f4853[_0x45e8e7(0x159)](_0x4640da=>_0x4640da[_0x45e8e7(0x148)]===_0x1c4f10);}export function findAppByCode(_0x580b95,_0x14d70d){const _0x27e49f=a4_0x30e5,_0xc1c29a=_0x14d70d[_0x27e49f(0x14f)]();if(!_0xc1c29a)return undefined;return _0x580b95[_0x27e49f(0x159)](_0x1cdf5e=>_0x1cdf5e[_0x27e49f(0x151)]?.[_0x27e49f(0x14f)]()===_0xc1c29a);}export function runtimeInaccessibleAppError(_0x2f6650,_0x4667b7){const _0x28a2c1=a4_0x30e5,_0x1e8757=normalizeAppPublishStatus(_0x2f6650[_0x28a2c1(0x156)])??_0x28a2c1(0x155);return CliErrors['validation']('App\x20'+_0x4667b7+'\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','Current\x20status:\x20'+_0x1e8757+_0x28a2c1(0x14e)+CLI_BIN_NAME+_0x28a2c1(0x150));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x451e5a,_0x1ea428){const _0x2d329b=a5_0x2bc3,_0x4ef721=_0x451e5a();while(!![]){try{const _0x338628=-parseInt(_0x2d329b(0x71))/0x1+parseInt(_0x2d329b(0x79))/0x2*(-parseInt(_0x2d329b(0x7b))/0x3)+-parseInt(_0x2d329b(0x77))/0x4+-parseInt(_0x2d329b(0x75))/0x5*(parseInt(_0x2d329b(0x7a))/0x6)+parseInt(_0x2d329b(0x72))/0x7*(parseInt(_0x2d329b(0x7f))/0x8)+-parseInt(_0x2d329b(0x7d))/0x9*(-parseInt(_0x2d329b(0x7e))/0xa)+parseInt(_0x2d329b(0x73))/0xb;if(_0x338628===_0x1ea428)break;else _0x4ef721['push'](_0x4ef721['shift']());}catch(_0x1c2bfe){_0x4ef721['push'](_0x4ef721['shift']());}}}(a5_0x3cf4,0xd8740));import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0x3cf4(){const _0x4a5fa4=['791312IwTHeG','tableData','1155372cMEhos','19374jYpaTO','9LqQosk','errorMsg','9AphWck','12498530XNPHyg','1697960ulKOUG','751720tlNQta','28vmFVKA','23100220YxEbEe','errorCode','975OXSNuT','parse'];a5_0x3cf4=function(){return _0x4a5fa4;};return a5_0x3cf4();}import{readFileSync}from'fs';function a5_0x2bc3(_0x117ad7,_0x3f51f9){_0x117ad7=_0x117ad7-0x71;const _0x3cf4d2=a5_0x3cf4();let _0x2bc317=_0x3cf4d2[_0x117ad7];return _0x2bc317;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x5936d3=a5_0x2bc3,_0x32c0fe=join(__dirname,'../../../mock/app-list.json'),_0x50f5a6=readFileSync(_0x32c0fe,'utf-8');return JSON[_0x5936d3(0x76)](_0x50f5a6);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x538987=a5_0x2bc3,_0x1c47ec=getMockAppList();if(!_0x1c47ec['success'])throw new Error('Mock\x20API\x20error:\x20'+_0x1c47ec[_0x538987(0x7c)]+'\x20('+_0x1c47ec[_0x538987(0x74)]+')');return _0x1c47ec['data'][_0x538987(0x78)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4dfcfb,_0x4c1b76){const _0x37793f=a6_0x1b58,_0x2b745c=_0x4dfcfb();while(!![]){try{const _0x3c2cc8=-parseInt(_0x37793f(0xd4))/0x1*(-parseInt(_0x37793f(0xd6))/0x2)+-parseInt(_0x37793f(0xd1))/0x3+-parseInt(_0x37793f(0xce))/0x4*(-parseInt(_0x37793f(0xcc))/0x5)+-parseInt(_0x37793f(0xd2))/0x6*(parseInt(_0x37793f(0xc4))/0x7)+-parseInt(_0x37793f(0xcb))/0x8+parseInt(_0x37793f(0xc9))/0x9*(-parseInt(_0x37793f(0xc5))/0xa)+parseInt(_0x37793f(0xc6))/0xb*(parseInt(_0x37793f(0xd7))/0xc);if(_0x3c2cc8===_0x4c1b76)break;else _0x2b745c['push'](_0x2b745c['shift']());}catch(_0x421022){_0x2b745c['push'](_0x2b745c['shift']());}}}(a6_0x4d28,0xd4dcd));import{getMyApps}from'../../core/api-client.js';function a6_0x4d28(){const _0x5419e5=['toLowerCase','82eCUOkC','mock','10366TJrsCF','12gwBNbE','8617IgDxYz','1882830JgVhHO','28192835LDajVT','fetchedAt','APP_LIST_SOURCE','9KrIVzn','trim','10272392KLCdFL','140710ZrcVve','toISOString','8bVgRyd','remote','items','1254477TMkzxV','1374NPIrlN'];a6_0x4d28=function(){return _0x5419e5;};return a6_0x4d28();}import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a6_0x1b58(_0x4ace79,_0x2cbc81){_0x4ace79=_0x4ace79-0xc4;const _0x4d2835=a6_0x4d28();let _0x1b581d=_0x4d2835[_0x4ace79];return _0x1b581d;}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x470cb4=a6_0x1b58,_0x5ec89a=(productEnv(_0x470cb4(0xc8))||'')['trim']()[_0x470cb4(0xd3)]();return _0x5ec89a===_0x470cb4(0xd5);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x1df485){const _0x3fe00c=a6_0x1b58,{env:_0x45eff9,accessKey:_0x12e492,localOnly:localOnly=![],noCache:noCache=![]}=_0x1df485,_0x4e57e1=readCachedAppList(_0x45eff9,_0x12e492),_0x226ba3=_0x12e492?.[_0x3fe00c(0xca)]()?getAppCacheFilePath(_0x45eff9,_0x12e492):null;if(localOnly)return{'items':_0x4e57e1?.[_0x3fe00c(0xd0)]??[],'source':'cache','fetchedAt':_0x4e57e1?.[_0x3fe00c(0xc7)]??null,'cachePath':_0x226ba3};try{const _0x570611=await getRemoteAppItems(),_0x6b15c4=shouldUseMockRemoteApps()?_0x3fe00c(0xd5):_0x3fe00c(0xcf),_0x2fdb21=new Date()[_0x3fe00c(0xcd)](),_0x44f785=_0x12e492?.[_0x3fe00c(0xca)]()?writeCachedAppList(_0x45eff9,_0x12e492,{'env':_0x45eff9,'fetchedAt':_0x2fdb21,'source':_0x6b15c4,'items':_0x570611}):null;return{'items':_0x570611,'source':_0x6b15c4,'fetchedAt':_0x2fdb21,'cachePath':_0x44f785};}catch(_0x4ea9e3){if(!noCache&&_0x4e57e1)return{'items':_0x4e57e1[_0x3fe00c(0xd0)],'source':'cache','fetchedAt':_0x4e57e1[_0x3fe00c(0xc7)],'cachePath':_0x226ba3};throw _0x4ea9e3;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20fd14,_0x581ec9){const _0x2b0421=a7_0xef31,_0x4c47ab=_0x20fd14();while(!![]){try{const _0x420600=-parseInt(_0x2b0421(0x81))/0x1*(parseInt(_0x2b0421(0x79))/0x2)+parseInt(_0x2b0421(0x82))/0x3+-parseInt(_0x2b0421(0x6d))/0x4*(parseInt(_0x2b0421(0x7f))/0x5)+parseInt(_0x2b0421(0x72))/0x6+parseInt(_0x2b0421(0x80))/0x7*(parseInt(_0x2b0421(0x7a))/0x8)+parseInt(_0x2b0421(0x73))/0x9+-parseInt(_0x2b0421(0x6e))/0xa*(-parseInt(_0x2b0421(0x76))/0xb);if(_0x420600===_0x581ec9)break;else _0x4c47ab['push'](_0x4c47ab['shift']());}catch(_0x2dba4e){_0x4c47ab['push'](_0x4c47ab['shift']());}}}(a7_0x1c2a,0x28ea5));import{CLI_BIN_NAME}from'../../constant/cli.js';function a7_0x1c2a(){const _0xa9b36c=['36376LFlgen','defaultApp','isCurrent','find','definedIn','6770alucmp','126FdCptV','20519XXYSEQ','332121UwffUE','64bssZzH','400740HIRbAT','appCode','name','named','516792hVAUjq','865827QcuHyy','global','trim','11JWndOI','appcode','currentApp','22hYslxx'];a7_0x1c2a=function(){return _0xa9b36c;};return a7_0x1c2a();}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x4a4f33,_0x49a856){const _0x32e810=a7_0xef31;if(!_0x49a856)return;const _0x21ebfe=!!(_0x49a856['currentApp']??_0x49a856[_0x32e810(0x7b)]);for(const _0x436d0d of _0x4a4f33){_0x436d0d[_0x32e810(0x7c)]=![];}const _0x582546=_0x49a856[_0x32e810(0x6f)]!=null?String(_0x49a856[_0x32e810(0x6f)])['trim']():'';if(_0x21ebfe){const _0x1fb681=_0x49a856[_0x32e810(0x78)]??_0x49a856[_0x32e810(0x7b)];if(_0x1fb681){const _0x4a6a62=_0x4a4f33[_0x32e810(0x7d)](_0x303ddf=>_0x303ddf[_0x32e810(0x71)]===!![]&&_0x303ddf[_0x32e810(0x70)]===_0x1fb681&&_0x303ddf[_0x32e810(0x7e)]==='local'),_0x2b73db=_0x4a6a62??_0x4a4f33[_0x32e810(0x7d)](_0x4a775f=>_0x4a775f['named']===!![]&&_0x4a775f['name']===_0x1fb681);if(_0x2b73db){const _0x3740e9=String(_0x2b73db['appcode']??'')[_0x32e810(0x75)]();if(!_0x582546||_0x3740e9===_0x582546){_0x2b73db[_0x32e810(0x7c)]=!![];return;}}}if(_0x582546){const _0x4bbd9c=_0x4a4f33[_0x32e810(0x7d)](_0x685c80=>String(_0x685c80['appcode']??'')[_0x32e810(0x75)]()===_0x582546);_0x4bbd9c&&(_0x4bbd9c[_0x32e810(0x7c)]=!![]);}return;}if(!_0x582546)return;for(const _0x41ffbd of _0x4a4f33){String(_0x41ffbd[_0x32e810(0x77)]??'')[_0x32e810(0x75)]()===_0x582546&&(_0x41ffbd[_0x32e810(0x7c)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a7_0xef31(_0x546d26,_0x5b7dd8){_0x546d26=_0x546d26-0x6d;const _0x1c2a1a=a7_0x1c2a();let _0xef3157=_0x1c2a1a[_0x546d26];return _0xef3157;}export function scopeLabel(_0x84bce3){const _0x45ec78=a7_0xef31;return formatScopeLabel(_0x84bce3[_0x45ec78(0x74)]?'global':'project');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a8_0x199233=a8_0x6cc5;(function(_0x1ad9f9,_0x109a0b){const _0x2fe975=a8_0x6cc5,_0x51cd51=_0x1ad9f9();while(!![]){try{const _0x4cae83=-parseInt(_0x2fe975(0x107))/0x1+parseInt(_0x2fe975(0x101))/0x2+-parseInt(_0x2fe975(0x10c))/0x3+-parseInt(_0x2fe975(0x11a))/0x4+-parseInt(_0x2fe975(0x111))/0x5*(-parseInt(_0x2fe975(0xe2))/0x6)+parseInt(_0x2fe975(0xe7))/0x7+-parseInt(_0x2fe975(0xec))/0x8;if(_0x4cae83===_0x109a0b)break;else _0x51cd51['push'](_0x51cd51['shift']());}catch(_0x4416b6){_0x51cd51['push'](_0x51cd51['shift']());}}}(a8_0xb7de,0x9d46f));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a8_0x199233(0x103),ARTIFACT_SOURCE_AGENT=a8_0x199233(0x10a),ALLOWED_REACT_MODULE_IMPORTS=[a8_0x199233(0x109),'react-dom','lodash','dayjs','antd',a8_0x199233(0x10e)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':a8_0x199233(0x114),'type':a8_0x199233(0x112),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file'},ARTIFACT_NAME_FLAG={'name':a8_0x199233(0x121),'type':a8_0x199233(0x112),'description':a8_0x199233(0xf6)},METADATA_FLAG={'name':a8_0x199233(0x11e),'type':a8_0x199233(0x112),'description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x3e9556){const _0x401821=a8_0x199233;return typeof _0x3e9556===_0x401821(0x100)&&_0x3e9556!==null&&!Array[_0x401821(0xfa)](_0x3e9556);}function readSourceFile(_0x1feedf){const _0x4d1277=a8_0x199233;if(!_0x1feedf)throw CliErrors[_0x4d1277(0xe6)]('File\x20path\x20is\x20required.');if(!existsSync(_0x1feedf))throw CliErrors[_0x4d1277(0xe6)]('File\x20not\x20found:\x20'+_0x1feedf);if(!statSync(_0x1feedf)['isFile']())throw CliErrors[_0x4d1277(0xe6)](_0x4d1277(0xed)+_0x1feedf);const _0xcff81b=readFileSync(_0x1feedf,'utf8');return validateReactModuleSource(_0xcff81b),_0xcff81b;}function parseMetadata(_0x10d314){const _0x4a0ea2=a8_0x199233;if(!_0x10d314)return undefined;let _0x581326;try{_0x581326=JSON[_0x4a0ea2(0xee)](_0x10d314);}catch{throw CliErrors[_0x4a0ea2(0xe6)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x10d314);}if(!isPlainObject(_0x581326))throw CliErrors[_0x4a0ea2(0xe6)](_0x4a0ea2(0xfc));const _0x3714a3={..._0x581326};return delete _0x3714a3[_0x4a0ea2(0xef)],_0x3714a3;}function a8_0x6cc5(_0x36f143,_0x3c27c4){_0x36f143=_0x36f143-0xe2;const _0xb7de64=a8_0xb7de();let _0x6cc55b=_0xb7de64[_0x36f143];return _0x6cc55b;}function getPackageName(_0x58fb37){const _0x5c60ff=a8_0x199233;if(_0x58fb37[_0x5c60ff(0xf4)]('@')){const [_0x585cf6,_0x212300]=_0x58fb37[_0x5c60ff(0xff)]('/');return _0x585cf6&&_0x212300?_0x585cf6+'/'+_0x212300:_0x58fb37;}return _0x58fb37['split']('/')[0x0]||_0x58fb37;}function validateAllowedImports(_0x2036a0){const _0x305674=a8_0x199233,_0x1fbc4a=new Set();for(const _0x1d6ae0 of IMPORT_SOURCE_PATTERNS){_0x1d6ae0[_0x305674(0x11f)]=0x0;let _0x46fc2e;while((_0x46fc2e=_0x1d6ae0[_0x305674(0x104)](_0x2036a0))!==null){const _0x45a48d=_0x46fc2e[0x1]?.[_0x305674(0x120)]();_0x45a48d&&_0x1fbc4a['add'](_0x45a48d);}}const _0x507947=[..._0x1fbc4a][_0x305674(0xf8)](getPackageName)['filter'](_0x4801f1=>!ALLOWED_REACT_MODULE_IMPORTS[_0x305674(0x122)](_0x4801f1));if(_0x507947[_0x305674(0x118)]>0x0)throw CliErrors[_0x305674(0xe6)](_0x305674(0x10b)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x507947)][_0x305674(0x11d)](',\x20'));}export function validateReactModuleSource(_0x4e09b5){const _0x5c3bb0=a8_0x199233;if(!_0x4e09b5[_0x5c3bb0(0x120)]())throw CliErrors[_0x5c3bb0(0xe6)](_0x5c3bb0(0xf9));if(PAGE_LEVEL_PATTERNS[_0x5c3bb0(0x105)](_0x5169cb=>_0x5169cb[_0x5c3bb0(0x127)](_0x4e09b5)))throw CliErrors[_0x5c3bb0(0xe6)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x4e09b5);}function buildArtifactInput(_0x60e115){const _0x212db6=a8_0x199233,_0x297f10=readSourceFile(_0x60e115[_0x212db6(0xfe)](_0x212db6(0x114))),_0x28eea6=_0x60e115[_0x212db6(0xfe)](_0x212db6(0x121))['trim'](),_0x42f207=parseMetadata(_0x60e115[_0x212db6(0xfe)](_0x212db6(0x11e)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x28eea6?{'name':_0x28eea6}:{},'content':_0x297f10,..._0x42f207?{'metadata':_0x42f207}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x19b615){const _0x129dba=a8_0x199233;return{'id':_0x19b615['id'],'name':_0x19b615[_0x129dba(0x121)],'artifactType':_0x19b615[_0x129dba(0xf2)],'source':_0x19b615[_0x129dba(0x123)],'favorite':_0x19b615[_0x129dba(0xe4)],'deleted':_0x19b615[_0x129dba(0xf1)],'createTime':_0x19b615[_0x129dba(0x117)],'updateTime':_0x19b615[_0x129dba(0x11c)]};}function detailArtifact(_0x16b6b1){const _0x5ec50b=a8_0x199233;return{'id':_0x16b6b1['id'],'appCode':_0x16b6b1[_0x5ec50b(0x10f)],'name':_0x16b6b1[_0x5ec50b(0x121)],'artifactType':_0x16b6b1[_0x5ec50b(0xf2)],'source':_0x16b6b1[_0x5ec50b(0x123)],'favorite':_0x16b6b1['favorite'],'deleted':_0x16b6b1['deleted'],'content':_0x16b6b1[_0x5ec50b(0xfb)]??'','compiledContent':_0x16b6b1[_0x5ec50b(0xef)],'metadata':_0x16b6b1['metadata']??{},'createTime':_0x16b6b1['createTime'],'updateTime':_0x16b6b1[_0x5ec50b(0x11c)]};}function readFavoriteFlag(_0x1cc019){const _0x505bf7=a8_0x199233,_0x3ce0d3=_0x1cc019[_0x505bf7(0x128)]('favorite');return _0x3ce0d3===undefined||_0x3ce0d3===null||_0x3ce0d3===''?undefined:_0x1cc019[_0x505bf7(0x106)](_0x505bf7(0xe4));}function a8_0xb7de(){const _0x1d2e7c=['24sAgzOQ','detail','favorite','update','validation','5826765MOjJnc','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','/client/artifact/','read','num','9529296VgbGLt','File\x20is\x20not\x20a\x20regular\x20file:\x20','parse','compiledContent','Show\x20one\x20Artifact\x20by\x20id','deleted','artifactType','Artifact\x20ID','startsWith','/client/artifact/create','Artifact\x20display\x20name','write','map','Artifact\x20source\x20file\x20is\x20blank.','isArray','content','--metadata\x20must\x20be\x20a\x20JSON\x20object.','description','str','split','object','1990644evpVlx','Preview:\x20create\x20react_module\x20Artifact','react_module','exec','some','bool','42856xbYNju','create','react','AGENT','react_module\x20imports\x20are\x20limited\x20to:\x20','1065723PWWsnP','artifact','@ant-design/icons','appCode','list','1030355aKhezV','string','build','file','boolean','verbose','createTime','length','Optional\x20favorite-state\x20filter','1674140bGKHZK','Created\x20Artifact\x20','updateTime','join','metadata','lastIndex','trim','name','includes','source','body','Preview:\x20update\x20react_module\x20Artifact\x20','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','test','flag'];a8_0xb7de=function(){return _0x1d2e7c;};return a8_0xb7de();}const artifactList={'service':a8_0x199233(0x10d),'command':a8_0x199233(0x110),'description':'List\x20current-app\x20react_module\x20Artifacts','risk':a8_0x199233(0xea),'flags':[{'name':'source','type':a8_0x199233(0x112),'description':a8_0x199233(0xe8)},{'name':a8_0x199233(0xe4),'type':a8_0x199233(0x115),'description':a8_0x199233(0x119)},VERBOSE_FLAG],async 'execute'(_0x3332e3){const _0x2022ab=a8_0x199233,_0x10c4ea=await listRuntimeArtifacts(_0x3332e3[_0x2022ab(0x10f)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x3332e3[_0x2022ab(0xfe)](_0x2022ab(0x123))?{'source':_0x3332e3[_0x2022ab(0xfe)](_0x2022ab(0x123))}:{},...readFavoriteFlag(_0x3332e3)!==undefined?{'favorite':readFavoriteFlag(_0x3332e3)}:{}});return{'ok':!![],'data':{'total':_0x10c4ea[_0x2022ab(0x118)],'items':_0x3332e3[_0x2022ab(0x106)](_0x2022ab(0x116))?_0x10c4ea:_0x10c4ea[_0x2022ab(0xf8)](summarizeArtifact)}};}},artifactDetail={'service':a8_0x199233(0x10d),'command':a8_0x199233(0xe3),'description':a8_0x199233(0xf0),'risk':'read','flags':[{...ID_FLAG,'description':a8_0x199233(0xf3)}],async 'execute'(_0x35ca80){const _0x54970a=a8_0x199233,_0x102acf=await getRuntimeArtifact(_0x35ca80[_0x54970a(0xeb)]('id'),_0x35ca80[_0x54970a(0x10f)]);return{'ok':!![],'data':detailArtifact(_0x102acf)};}},artifactCreate={'service':a8_0x199233(0x10d),'command':a8_0x199233(0x108),'description':a8_0x199233(0x126),'risk':a8_0x199233(0xf7),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x242c24){const _0x79ae45=a8_0x199233,_0x1c1d3d=buildArtifactInput(_0x242c24),_0x783e0b=await createRuntimeArtifact(_0x242c24[_0x79ae45(0x10f)],_0x1c1d3d);return{'ok':!![],'data':detailArtifact(_0x783e0b),'message':_0x79ae45(0x11b)+_0x783e0b['id']+(_0x783e0b[_0x79ae45(0x121)]?'\x20('+_0x783e0b[_0x79ae45(0x121)]+')':'')};},async 'dryRun'(_0x10f049){const _0x59c9bc=a8_0x199233,_0x5be208=buildArtifactInput(_0x10f049);return dryRun('POST',_0x59c9bc(0xf5))[_0x59c9bc(0x124)]({'appCode':_0x10f049[_0x59c9bc(0x10f)],..._0x5be208})[_0x59c9bc(0xfd)](_0x59c9bc(0x102))[_0x59c9bc(0x113)]();}},artifactUpdate={'service':'artifact','command':a8_0x199233(0xe5),'description':'Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':'write','flags':[{...ID_FLAG,'description':a8_0x199233(0xf3)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x20c2be){const _0x40212f=a8_0x199233,_0x36731d=_0x20c2be[_0x40212f(0xeb)]('id'),_0x3f01e6=buildArtifactInput(_0x20c2be),_0x122b3a=await updateRuntimeArtifact(_0x36731d,_0x20c2be['appCode'],_0x3f01e6);return{'ok':!![],'data':detailArtifact(_0x122b3a),'message':'Updated\x20Artifact\x20'+_0x122b3a['id']+(_0x122b3a[_0x40212f(0x121)]?'\x20('+_0x122b3a[_0x40212f(0x121)]+')':'')};},async 'dryRun'(_0x1a15b6){const _0x36e86f=a8_0x199233,_0x356e19=_0x1a15b6[_0x36e86f(0xeb)]('id'),_0x1b9024=buildArtifactInput(_0x1a15b6);return dryRun('POST',_0x36e86f(0xe9)+_0x356e19+'/update')[_0x36e86f(0x124)]({'appCode':_0x1a15b6[_0x36e86f(0x10f)],..._0x1b9024})['description'](_0x36e86f(0x125)+_0x356e19)['build']();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
1
|
+
const a8_0x23242b=a8_0x478f;(function(_0x1b9873,_0x667127){const _0x38c005=a8_0x478f,_0x5a87ea=_0x1b9873();while(!![]){try{const _0x5089d2=parseInt(_0x38c005(0x226))/0x1+parseInt(_0x38c005(0x1e9))/0x2*(-parseInt(_0x38c005(0x22a))/0x3)+parseInt(_0x38c005(0x219))/0x4+-parseInt(_0x38c005(0x1f4))/0x5*(parseInt(_0x38c005(0x1eb))/0x6)+-parseInt(_0x38c005(0x1e0))/0x7+parseInt(_0x38c005(0x21c))/0x8*(parseInt(_0x38c005(0x1e7))/0x9)+parseInt(_0x38c005(0x1f5))/0xa;if(_0x5089d2===_0x667127)break;else _0x5a87ea['push'](_0x5a87ea['shift']());}catch(_0x362e19){_0x5a87ea['push'](_0x5a87ea['shift']());}}}(a8_0x3220,0x9c6e8));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE='react_module',ARTIFACT_SOURCE_AGENT=a8_0x23242b(0x22d),ALLOWED_REACT_MODULE_IMPORTS=[a8_0x23242b(0x225),a8_0x23242b(0x20a),a8_0x23242b(0x20b),a8_0x23242b(0x1e5),a8_0x23242b(0x1fb),'@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS[a8_0x23242b(0x1f7)](',\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':'string','required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file'},ARTIFACT_NAME_FLAG={'name':a8_0x23242b(0x20e),'type':a8_0x23242b(0x22b),'description':a8_0x23242b(0x1e6)},METADATA_FLAG={'name':a8_0x23242b(0x210),'type':a8_0x23242b(0x22b),'description':a8_0x23242b(0x1ee)};function isPlainObject(_0x3cf549){const _0x44a527=a8_0x23242b;return typeof _0x3cf549==='object'&&_0x3cf549!==null&&!Array[_0x44a527(0x1f6)](_0x3cf549);}function readSourceFile(_0xd6a997){const _0x3105e9=a8_0x23242b;if(!_0xd6a997)throw CliErrors[_0x3105e9(0x227)](_0x3105e9(0x229));if(!existsSync(_0xd6a997))throw CliErrors[_0x3105e9(0x227)](_0x3105e9(0x200)+_0xd6a997);if(!statSync(_0xd6a997)['isFile']())throw CliErrors[_0x3105e9(0x227)](_0x3105e9(0x215)+_0xd6a997);const _0x5aca0f=readFileSync(_0xd6a997,_0x3105e9(0x1df));return validateReactModuleSource(_0x5aca0f),_0x5aca0f;}function parseMetadata(_0x156356){const _0x20393c=a8_0x23242b;if(!_0x156356)return undefined;let _0x2bd4c2;try{_0x2bd4c2=JSON[_0x20393c(0x1ed)](_0x156356);}catch{throw CliErrors['validation'](_0x20393c(0x1f9)+_0x156356);}if(!isPlainObject(_0x2bd4c2))throw CliErrors[_0x20393c(0x227)](_0x20393c(0x1e3));const _0x50bba7={..._0x2bd4c2};return delete _0x50bba7[_0x20393c(0x218)],_0x50bba7;}function getPackageName(_0x475bb6){const _0x483e0a=a8_0x23242b;if(_0x475bb6['startsWith']('@')){const [_0x8bee35,_0x120a62]=_0x475bb6[_0x483e0a(0x1f3)]('/');return _0x8bee35&&_0x120a62?_0x8bee35+'/'+_0x120a62:_0x475bb6;}return _0x475bb6[_0x483e0a(0x1f3)]('/')[0x0]||_0x475bb6;}function validateAllowedImports(_0x408775){const _0x1107b5=a8_0x23242b,_0x37eebd=new Set();for(const _0x53af60 of IMPORT_SOURCE_PATTERNS){_0x53af60[_0x1107b5(0x209)]=0x0;let _0x41f3d3;while((_0x41f3d3=_0x53af60[_0x1107b5(0x216)](_0x408775))!==null){const _0x1a1b9b=_0x41f3d3[0x1]?.['trim']();_0x1a1b9b&&_0x37eebd[_0x1107b5(0x1f0)](_0x1a1b9b);}}const _0x3d27b5=[..._0x37eebd][_0x1107b5(0x1ec)](getPackageName)[_0x1107b5(0x1f1)](_0x51e7a3=>!ALLOWED_REACT_MODULE_IMPORTS['includes'](_0x51e7a3));if(_0x3d27b5[_0x1107b5(0x1fc)]>0x0)throw CliErrors['validation'](_0x1107b5(0x208)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+'.\x20Unsupported:\x20'+[...new Set(_0x3d27b5)]['join'](',\x20'));}export function validateReactModuleSource(_0x596d73){const _0x1fd476=a8_0x23242b;if(!_0x596d73[_0x1fd476(0x222)]())throw CliErrors['validation'](_0x1fd476(0x213));if(PAGE_LEVEL_PATTERNS[_0x1fd476(0x220)](_0x3cf64f=>_0x3cf64f[_0x1fd476(0x21f)](_0x596d73)))throw CliErrors[_0x1fd476(0x227)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x596d73);}function buildArtifactInput(_0x56f8b8){const _0x2fee24=a8_0x23242b,_0x416bdc=readSourceFile(_0x56f8b8[_0x2fee24(0x20c)]('file')),_0x11c25d=_0x56f8b8['str'](_0x2fee24(0x20e))[_0x2fee24(0x222)](),_0x8602ac=parseMetadata(_0x56f8b8[_0x2fee24(0x20c)](_0x2fee24(0x210)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x11c25d?{'name':_0x11c25d}:{},'content':_0x416bdc,..._0x8602ac?{'metadata':_0x8602ac}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0xaa34a9){const _0x361e55=a8_0x23242b;return{'id':_0xaa34a9['id'],'name':_0xaa34a9[_0x361e55(0x20e)],'artifactType':_0xaa34a9[_0x361e55(0x1e8)],'source':_0xaa34a9[_0x361e55(0x1f2)],'favorite':_0xaa34a9[_0x361e55(0x20f)],'deleted':_0xaa34a9[_0x361e55(0x21d)],'createTime':_0xaa34a9[_0x361e55(0x22c)],'updateTime':_0xaa34a9[_0x361e55(0x205)]};}function detailArtifact(_0x478314){const _0x1c6fc=a8_0x23242b;return{'id':_0x478314['id'],'appCode':_0x478314['appCode'],'name':_0x478314[_0x1c6fc(0x20e)],'artifactType':_0x478314[_0x1c6fc(0x1e8)],'source':_0x478314[_0x1c6fc(0x1f2)],'favorite':_0x478314[_0x1c6fc(0x20f)],'deleted':_0x478314['deleted'],'content':_0x478314[_0x1c6fc(0x21b)]??'','compiledContent':_0x478314[_0x1c6fc(0x218)],'metadata':_0x478314[_0x1c6fc(0x210)]??{},'createTime':_0x478314[_0x1c6fc(0x22c)],'updateTime':_0x478314[_0x1c6fc(0x205)]};}function readFavoriteFlag(_0x15720f){const _0x33af60=a8_0x23242b,_0x5f5344=_0x15720f[_0x33af60(0x1fd)](_0x33af60(0x20f));return _0x5f5344===undefined||_0x5f5344===null||_0x5f5344===''?undefined:_0x15720f['bool'](_0x33af60(0x20f));}function a8_0x478f(_0x4d1d16,_0x3317d9){_0x4d1d16=_0x4d1d16-0x1df;const _0x322013=a8_0x3220();let _0x478f8b=_0x322013[_0x4d1d16];return _0x478f8b;}function a8_0x3220(){const _0x365dd3=['651682pLytYb','validation','num','File\x20path\x20is\x20required.','15sWDuyX','string','createTime','AGENT','utf8','8840538woqlIj','Preview:\x20create\x20react_module\x20Artifact','/client/artifact/','--metadata\x20must\x20be\x20a\x20JSON\x20object.','description','dayjs','Artifact\x20display\x20name','568872chykCc','artifactType','45442PazesB','List\x20current-app\x20react_module\x20Artifacts','42lznnVE','map','parse','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','detail','add','filter','source','split','128645VFlpTY','13241360iQVEov','isArray','join','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','Invalid\x20JSON\x20for\x20--metadata:\x20','appCode','antd','length','flag','/update','boolean','File\x20not\x20found:\x20','bool','list','Preview:\x20update\x20react_module\x20Artifact\x20','artifact','updateTime','Created\x20Artifact\x20','Updated\x20Artifact\x20','react_module\x20imports\x20are\x20limited\x20to:\x20','lastIndex','react-dom','lodash','str','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','name','favorite','metadata','/client/artifact/create','create','Artifact\x20source\x20file\x20is\x20blank.','build','File\x20is\x20not\x20a\x20regular\x20file:\x20','exec','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','compiledContent','380608gqIwPT','write','content','16sHApLm','deleted','Show\x20one\x20Artifact\x20by\x20id','test','some','Artifact\x20ID','trim','read','POST','react'];a8_0x3220=function(){return _0x365dd3;};return a8_0x3220();}const artifactList={'service':'artifact','command':a8_0x23242b(0x202),'description':a8_0x23242b(0x1ea),'risk':a8_0x23242b(0x223),'flags':[{'name':a8_0x23242b(0x1f2),'type':'string','description':a8_0x23242b(0x1f8)},{'name':a8_0x23242b(0x20f),'type':a8_0x23242b(0x1ff),'description':'Optional\x20favorite-state\x20filter'},VERBOSE_FLAG],async 'execute'(_0x211113){const _0x2d3114=a8_0x23242b,_0x632377=await listRuntimeArtifacts(_0x211113[_0x2d3114(0x1fa)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x211113['str']('source')?{'source':_0x211113[_0x2d3114(0x20c)](_0x2d3114(0x1f2))}:{},...readFavoriteFlag(_0x211113)!==undefined?{'favorite':readFavoriteFlag(_0x211113)}:{}});return{'ok':!![],'data':{'total':_0x632377[_0x2d3114(0x1fc)],'items':_0x211113[_0x2d3114(0x201)]('verbose')?_0x632377:_0x632377['map'](summarizeArtifact)}};}},artifactDetail={'service':a8_0x23242b(0x204),'command':a8_0x23242b(0x1ef),'description':a8_0x23242b(0x21e),'risk':a8_0x23242b(0x223),'flags':[{...ID_FLAG,'description':a8_0x23242b(0x221)}],async 'execute'(_0x47c6f5){const _0x11451c=a8_0x23242b,_0x34e396=await getRuntimeArtifact(_0x47c6f5[_0x11451c(0x228)]('id'),_0x47c6f5[_0x11451c(0x1fa)]);return{'ok':!![],'data':detailArtifact(_0x34e396)};}},artifactCreate={'service':a8_0x23242b(0x204),'command':a8_0x23242b(0x212),'description':a8_0x23242b(0x217),'risk':a8_0x23242b(0x21a),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x425a58){const _0x4ce470=a8_0x23242b,_0x7ce051=buildArtifactInput(_0x425a58),_0xf7403a=await createRuntimeArtifact(_0x425a58[_0x4ce470(0x1fa)],_0x7ce051);return{'ok':!![],'data':detailArtifact(_0xf7403a),'message':_0x4ce470(0x206)+_0xf7403a['id']+(_0xf7403a['name']?'\x20('+_0xf7403a['name']+')':'')};},async 'dryRun'(_0x24d26a){const _0x7b82a9=a8_0x23242b,_0x4bae56=buildArtifactInput(_0x24d26a);return dryRun(_0x7b82a9(0x224),_0x7b82a9(0x211))['body']({'appCode':_0x24d26a['appCode'],..._0x4bae56})['description'](_0x7b82a9(0x1e1))[_0x7b82a9(0x214)]();}},artifactUpdate={'service':'artifact','command':'update','description':a8_0x23242b(0x20d),'risk':'write','flags':[{...ID_FLAG,'description':a8_0x23242b(0x221)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x233841){const _0x2d4d04=a8_0x23242b,_0x8a961b=_0x233841[_0x2d4d04(0x228)]('id'),_0x435f8f=buildArtifactInput(_0x233841),_0x4b105f=await updateRuntimeArtifact(_0x8a961b,_0x233841[_0x2d4d04(0x1fa)],_0x435f8f);return{'ok':!![],'data':detailArtifact(_0x4b105f),'message':_0x2d4d04(0x207)+_0x4b105f['id']+(_0x4b105f[_0x2d4d04(0x20e)]?'\x20('+_0x4b105f[_0x2d4d04(0x20e)]+')':'')};},async 'dryRun'(_0x36583c){const _0xda792e=a8_0x23242b,_0x3be564=_0x36583c['num']('id'),_0x4b657e=buildArtifactInput(_0x36583c);return dryRun('POST',_0xda792e(0x1e2)+_0x3be564+_0xda792e(0x1fe))['body']({'appCode':_0x36583c[_0xda792e(0x1fa)],..._0x4b657e})[_0xda792e(0x1e4)](_0xda792e(0x203)+_0x3be564)[_0xda792e(0x214)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a9_0x33f95b=a9_0x3cdf;(function(_0x528728,_0x16ce38){const _0x3c2464=a9_0x3cdf,_0x325b2c=_0x528728();while(!![]){try{const _0x3dabef=parseInt(_0x3c2464(0x165))/0x1+-parseInt(_0x3c2464(0x158))/0x2*(parseInt(_0x3c2464(0x180))/0x3)+parseInt(_0x3c2464(0x14f))/0x4+parseInt(_0x3c2464(0x159))/0x5+-parseInt(_0x3c2464(0x190))/0x6*(parseInt(_0x3c2464(0x18c))/0x7)+parseInt(_0x3c2464(0x144))/0x8+-parseInt(_0x3c2464(0x16b))/0x9*(parseInt(_0x3c2464(0x148))/0xa);if(_0x3dabef===_0x16ce38)break;else _0x325b2c['push'](_0x325b2c['shift']());}catch(_0x4e183a){_0x325b2c['push'](_0x325b2c['shift']());}}}(a9_0xddae,0xddf29));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a9_0x3cdf(_0x213b03,_0x444872){_0x213b03=_0x213b03-0x140;const _0xddaed2=a9_0xddae();let _0x3cdf8e=_0xddaed2[_0x213b03];return _0x3cdf8e;}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';function a9_0xddae(){const _0x271fc9=['read','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','join','Clear\x20accessKey\x20from\x20config','login','env','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','length','push','1056622CKUnTG','global-default','auth','\x20Verify:\x20','36zjxcNz','trim','stdin','stdout','\x20auth\x20status','Then\x20verify\x20with:\x20','AccessKey\x20(ak_xxx...)','Invalid\x20accessKey\x20format:\x20\x22','accessKey','slice','5361968XBaDyb','global','Tip:\x20you\x20can\x20also\x20run:','Option\x20A:\x20','10vuCHeC','Auth\x20config\x20reinitialized\x20in\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','bool','access-key','\x20doctor','\x20Current\x20env:\x20','5758824KIMPzS','str','Read\x20from\x20global\x20config\x20(default)','\x20config.\x20Nothing\x20to\x20clear.','Show\x20current\x20authentication\x20status','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','ClientAk','project','`auth\x20login`\x20does\x20not\x20support\x20--yes.','25994cFcJSJ','8013365sPAISB','info','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20config','\x20scope.','validation','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Auth\x20mode:\x20','newConfigFileName','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','envName','nonInteractive','283980BdIowy','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Use\x20`','write','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','init','11799297ZJAybU','boolean','string','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','ACCESS_KEY','No\x20AccessKey\x20found\x20in\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','isTTY','Option\x20C:\x20environment\x20variable','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20(via\x20','userCenterDisplayName','production','status','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','AccessKey\x20cleared\x20from\x20','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','logout','Shorthand\x20for\x20--access-key','Write\x20to\x20global\x20config\x20(default)','\x20config.','201MLASuZ','AccessKey\x20saved\x20to\x20','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'];a9_0xddae=function(){return _0x271fc9;};return a9_0xddae();}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 _0x329ecd=a9_0x3cdf;writeCliSideChannelLine(_0x329ecd(0x17b)+PRODUCT_CONFIG[_0x329ecd(0x176)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x329ecd(0x146)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x329ecd(0x166));}function buildAccessKeySetupGuide(){const _0x1c066d=a9_0x3cdf;return[_0x1c066d(0x17b)+PRODUCT_CONFIG[_0x1c066d(0x176)]+':',USER_ACCESS_KEY_CREATE_URL,_0x1c066d(0x16e)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0x1c066d(0x185)]('\x0a');}function canPromptForAccessKey(_0x417dea){const _0xa5b24c=a9_0x3cdf;return!_0x417dea[_0xa5b24c(0x164)]&&process[_0xa5b24c(0x192)]['isTTY']!==![]&&process[_0xa5b24c(0x193)][_0xa5b24c(0x172)]!==![];}function resolveAuthScopeFlags(_0x4942ec){const _0x4d226f=a9_0x3cdf;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4942ec[_0x4d226f(0x14b)](_0x4d226f(0x145)),'explicitProject':_0x4942ec['bool'](_0x4d226f(0x156)),'policy':_0x4d226f(0x18d)}));}async function resolveAuthWriteInput(_0x854801){const _0x39dfd9=a9_0x3cdf;let _0x1efaf6=(_0x854801[_0x39dfd9(0x150)](_0x39dfd9(0x14c))||_0x854801[_0x39dfd9(0x150)]('ak')||'')[_0x39dfd9(0x191)]();const _0x501908=(_0x854801[_0x39dfd9(0x150)](_0x39dfd9(0x188))||'')[_0x39dfd9(0x191)]();if(!_0x1efaf6&&canPromptForAccessKey(_0x854801))try{showAccessKeyCreateHint(),_0x1efaf6=await promptAccessKey('');}catch(_0x33ddf1){if(isAbortPrompt(_0x33ddf1))throw CliErrors['cancelled']();throw _0x33ddf1;}if(!_0x1efaf6)throw CliErrors['validation']('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x1efaf6))throw CliErrors[_0x39dfd9(0x15e)](_0x39dfd9(0x141)+_0x1efaf6+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x501908)return{'accessKey':_0x1efaf6};const _0x400920=normalizeEnv(_0x501908);return{'accessKey':_0x1efaf6,'env':isDaily(_0x400920)?'daily':isDev(_0x400920)?'development':_0x39dfd9(0x177)};}export const authDefinitions=[{'service':a9_0x33f95b(0x18e),'command':a9_0x33f95b(0x187),'description':a9_0x33f95b(0x169),'risk':a9_0x33f95b(0x168),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a9_0x33f95b(0x140)},{'name':'ak','type':a9_0x33f95b(0x16d),'description':'Shorthand\x20for\x20--access-key'},{'name':a9_0x33f95b(0x145),'type':a9_0x33f95b(0x16c),'description':a9_0x33f95b(0x17e),'default':!![]},{'name':a9_0x33f95b(0x156),'type':a9_0x33f95b(0x16c),'description':a9_0x33f95b(0x154),'default':![]}],async 'execute'(_0x48f8c6){const _0x547f8e=a9_0x33f95b;if(_0x48f8c6[_0x547f8e(0x14b)]('yes'))throw CliErrors[_0x547f8e(0x15e)](_0x547f8e(0x157),_0x547f8e(0x167)+CLI_BIN_NAME+_0x547f8e(0x14a)+CLI_BIN_NAME+_0x547f8e(0x171));const _0x1c6230=(_0x48f8c6[_0x547f8e(0x150)]('access-key')||_0x48f8c6['str']('ak')||'')[_0x547f8e(0x191)]();if(!_0x1c6230&&_0x48f8c6[_0x547f8e(0x164)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x273ca7=await resolveAuthWriteInput(_0x48f8c6),_0x3e193d=resolveAuthScopeFlags(_0x48f8c6),_0x51fd57=readScopedConfig(_0x3e193d);_0x51fd57[_0x547f8e(0x142)]=_0x273ca7[_0x547f8e(0x142)];_0x273ca7[_0x547f8e(0x188)]&&(_0x51fd57[_0x547f8e(0x188)]=_0x273ca7[_0x547f8e(0x188)]);writeScopedConfig(_0x51fd57,_0x3e193d);const _0x208755=_0x3e193d[_0x547f8e(0x145)]?_0x547f8e(0x145):_0x547f8e(0x156),_0x29c06b=_0x51fd57[_0x547f8e(0x188)]?'\x20Current\x20env:\x20'+_0x51fd57[_0x547f8e(0x188)]+'.':'';return{'ok':!![],'message':_0x547f8e(0x181)+_0x208755+'\x20config.'+_0x29c06b+_0x547f8e(0x18f)+CLI_BIN_NAME+_0x547f8e(0x194)};}},{'service':a9_0x33f95b(0x18e),'command':a9_0x33f95b(0x16a),'description':a9_0x33f95b(0x162),'risk':a9_0x33f95b(0x168),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x33f95b(0x14c),'type':'string','description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a9_0x33f95b(0x16d),'description':a9_0x33f95b(0x17d)},{'name':a9_0x33f95b(0x188),'type':a9_0x33f95b(0x16d),'description':a9_0x33f95b(0x15f)},{'name':a9_0x33f95b(0x145),'type':a9_0x33f95b(0x16c),'description':a9_0x33f95b(0x17e),'default':!![]},{'name':'project','type':a9_0x33f95b(0x16c),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x186c80){const _0x20177d=a9_0x33f95b,_0x40f449=await resolveAuthWriteInput(_0x186c80),_0x5ad9f9=resolveAuthScopeFlags(_0x186c80),_0x36eefd={'accessKey':_0x40f449[_0x20177d(0x142)]};_0x40f449[_0x20177d(0x188)]&&(_0x36eefd[_0x20177d(0x188)]=_0x40f449[_0x20177d(0x188)]);writeScopedConfig(_0x36eefd,_0x5ad9f9);const _0x1e437a=_0x5ad9f9[_0x20177d(0x145)]?_0x20177d(0x145):_0x20177d(0x156),_0x124a0f=_0x36eefd[_0x20177d(0x188)]?_0x20177d(0x14e)+_0x36eefd[_0x20177d(0x188)]+'.':'';return{'ok':!![],'message':_0x20177d(0x149)+_0x1e437a+_0x20177d(0x15d)+_0x124a0f+_0x20177d(0x18f)+CLI_BIN_NAME+_0x20177d(0x194)};}},{'service':'auth','command':a9_0x33f95b(0x17c),'description':a9_0x33f95b(0x186),'risk':a9_0x33f95b(0x168),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x33f95b(0x145),'type':a9_0x33f95b(0x16c),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a9_0x33f95b(0x156),'type':a9_0x33f95b(0x16c),'description':a9_0x33f95b(0x179),'default':![]}],async 'execute'(_0x8b26f9){const _0x26d58a=a9_0x33f95b,_0x428f45=resolveAuthScopeFlags(_0x8b26f9),_0x57e3b0=readScopedConfig(_0x428f45),_0x6edd30=!!_0x57e3b0[_0x26d58a(0x142)];delete _0x57e3b0[_0x26d58a(0x142)],writeScopedConfig(_0x57e3b0,_0x428f45);const _0x63b147=_0x428f45[_0x26d58a(0x145)]?_0x26d58a(0x145):_0x26d58a(0x156);if(_0x6edd30)return{'ok':!![],'message':_0x26d58a(0x17a)+_0x63b147+_0x26d58a(0x17f)};return{'ok':!![],'message':_0x26d58a(0x170)+_0x63b147+_0x26d58a(0x152)};}},{'service':a9_0x33f95b(0x18e),'command':a9_0x33f95b(0x178),'description':a9_0x33f95b(0x153),'risk':a9_0x33f95b(0x183),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x33f95b(0x145),'type':a9_0x33f95b(0x16c),'description':a9_0x33f95b(0x151),'default':!![]},{'name':'project','type':'boolean','description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x48bf99){const _0x47895a=a9_0x33f95b,_0x3e9e3f=resolveAuthScopeFlags(_0x48bf99),_0x4b4045=readScopedConfig(_0x3e9e3f),_0x21ab22=productEnvName(_0x47895a(0x16f)),_0x4c2229=productEnv(_0x47895a(0x16f))||undefined,_0x1efaab=_0x4b4045[_0x47895a(0x142)]||undefined,_0x5542aa=_0x4c2229||_0x1efaab,_0x333f3e=_0x4c2229?_0x21ab22+'\x20env\x20var':_0x1efaab?(_0x3e9e3f['global']?_0x47895a(0x145):_0x47895a(0x156))+_0x47895a(0x15c):null,_0x471992=[_0x47895a(0x160)+AUTH_MODE[_0x47895a(0x155)]];if(_0x5542aa){const _0x112324=_0x5542aa[_0x47895a(0x18a)]>0x8?''+_0x5542aa[_0x47895a(0x143)](0x0,0x8)+'*'['repeat'](_0x5542aa[_0x47895a(0x18a)]-0x8):_0x5542aa;_0x471992[_0x47895a(0x18b)]('AccessKey:\x20'+_0x112324+(_0x333f3e?_0x47895a(0x175)+_0x333f3e+')':''));}return!_0x5542aa&&(_0x471992[_0x47895a(0x18b)](''),_0x471992[_0x47895a(0x18b)](_0x47895a(0x15b)),_0x471992[_0x47895a(0x18b)](''),_0x471992[_0x47895a(0x18b)](_0x47895a(0x147)+CLI_BIN_NAME+_0x47895a(0x184)),_0x471992[_0x47895a(0x18b)](''),_0x471992[_0x47895a(0x18b)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x47895a(0x161)]+')'),_0x471992[_0x47895a(0x18b)](_0x47895a(0x182)),_0x471992[_0x47895a(0x18b)](''),_0x471992['push'](_0x47895a(0x173)),_0x471992[_0x47895a(0x18b)]('\x20\x20export\x20'+_0x21ab22+'=ak_xxx'),_0x471992[_0x47895a(0x18b)](''),_0x471992['push'](_0x47895a(0x195)+CLI_BIN_NAME+'\x20auth\x20status'),_0x471992[_0x47895a(0x18b)](_0x47895a(0x174)+CLI_BIN_NAME+_0x47895a(0x14d))),{'ok':!![],'message':_0x471992['join']('\x0a')};}},{'service':a9_0x33f95b(0x18e),'command':a9_0x33f95b(0x15a),'description':a9_0x33f95b(0x189),'risk':a9_0x33f95b(0x183),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xe183a6){const _0x18cd87=a9_0x33f95b,_0x3b1367=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x3b1367,'meta':{'env':_0xe183a6[_0x18cd87(0x163)]??_0x18cd87(0x177)}}};}}];
|
|
1
|
+
const a9_0x86fcab=a9_0x1525;(function(_0x471a4d,_0x23a99a){const _0x2c2d6f=a9_0x1525,_0x1c956a=_0x471a4d();while(!![]){try{const _0x559b0f=-parseInt(_0x2c2d6f(0x15f))/0x1+parseInt(_0x2c2d6f(0x16c))/0x2+parseInt(_0x2c2d6f(0x16f))/0x3+parseInt(_0x2c2d6f(0x195))/0x4*(parseInt(_0x2c2d6f(0x176))/0x5)+-parseInt(_0x2c2d6f(0x19c))/0x6*(-parseInt(_0x2c2d6f(0x183))/0x7)+parseInt(_0x2c2d6f(0x188))/0x8*(parseInt(_0x2c2d6f(0x15d))/0x9)+parseInt(_0x2c2d6f(0x18b))/0xa*(-parseInt(_0x2c2d6f(0x19d))/0xb);if(_0x559b0f===_0x23a99a)break;else _0x1c956a['push'](_0x1c956a['shift']());}catch(_0x75ef01){_0x1c956a['push'](_0x1c956a['shift']());}}}(a9_0x2046,0x45aa2));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a9_0x1525(_0x1d0608,_0x568be5){_0x1d0608=_0x1d0608-0x150;const _0x2046fd=a9_0x2046();let _0x1525c9=_0x2046fd[_0x1d0608];return _0x1525c9;}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 _0x6f7b1b=a9_0x1525;writeCliSideChannelLine(_0x6f7b1b(0x15c)+PRODUCT_CONFIG[_0x6f7b1b(0x161)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x6f7b1b(0x154)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x6f7b1b(0x164));}function buildAccessKeySetupGuide(){const _0x2606d8=a9_0x1525;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x2606d8(0x161)]+':',USER_ACCESS_KEY_CREATE_URL,_0x2606d8(0x18e)+CLI_BIN_NAME+_0x2606d8(0x168)][_0x2606d8(0x19b)]('\x0a');}function canPromptForAccessKey(_0x400dc2){const _0x43f215=a9_0x1525;return!_0x400dc2[_0x43f215(0x174)]&&process[_0x43f215(0x158)][_0x43f215(0x194)]!==![]&&process['stdout'][_0x43f215(0x194)]!==![];}function resolveAuthScopeFlags(_0x3a1f5b){const _0x369440=a9_0x1525;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3a1f5b[_0x369440(0x17d)]('global'),'explicitProject':_0x3a1f5b[_0x369440(0x17d)]('project'),'policy':_0x369440(0x15a)}));}async function resolveAuthWriteInput(_0x37f0fa){const _0x400966=a9_0x1525;let _0x64a3fb=(_0x37f0fa[_0x400966(0x184)](_0x400966(0x189))||_0x37f0fa[_0x400966(0x184)]('ak')||'')[_0x400966(0x18c)]();const _0x4fe9a6=(_0x37f0fa[_0x400966(0x184)](_0x400966(0x179))||'')[_0x400966(0x18c)]();if(!_0x64a3fb&&canPromptForAccessKey(_0x37f0fa))try{showAccessKeyCreateHint(),_0x64a3fb=await promptAccessKey('');}catch(_0x33d7d8){if(isAbortPrompt(_0x33d7d8))throw CliErrors[_0x400966(0x181)]();throw _0x33d7d8;}if(!_0x64a3fb)throw CliErrors['validation']('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x400966(0x197)](_0x64a3fb))throw CliErrors[_0x400966(0x1a0)](_0x400966(0x175)+_0x64a3fb+'\x22',_0x400966(0x172));if(!_0x4fe9a6)return{'accessKey':_0x64a3fb};const _0x31d7aa=normalizeEnv(_0x4fe9a6);return{'accessKey':_0x64a3fb,'env':isDaily(_0x31d7aa)?'daily':isDev(_0x31d7aa)?'development':'production'};}export const authDefinitions=[{'service':a9_0x86fcab(0x162),'command':'login','description':a9_0x86fcab(0x186),'risk':a9_0x86fcab(0x17e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x86fcab(0x189),'type':a9_0x86fcab(0x159),'description':a9_0x86fcab(0x167)},{'name':'ak','type':a9_0x86fcab(0x159),'description':a9_0x86fcab(0x165)},{'name':a9_0x86fcab(0x199),'type':'boolean','description':a9_0x86fcab(0x160),'default':!![]},{'name':a9_0x86fcab(0x19f),'type':a9_0x86fcab(0x15b),'description':a9_0x86fcab(0x16d),'default':![]}],async 'execute'(_0x521f4b){const _0x5e454f=a9_0x86fcab;if(_0x521f4b[_0x5e454f(0x17d)](_0x5e454f(0x171)))throw CliErrors[_0x5e454f(0x1a0)](_0x5e454f(0x170),_0x5e454f(0x185)+CLI_BIN_NAME+_0x5e454f(0x191)+CLI_BIN_NAME+_0x5e454f(0x1a1));const _0x433fe7=(_0x521f4b['str'](_0x5e454f(0x189))||_0x521f4b[_0x5e454f(0x184)]('ak')||'')['trim']();if(!_0x433fe7&&_0x521f4b[_0x5e454f(0x174)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x4a9eef=await resolveAuthWriteInput(_0x521f4b),_0x25945e=resolveAuthScopeFlags(_0x521f4b),_0x596b79=readScopedConfig(_0x25945e);_0x596b79[_0x5e454f(0x192)]=_0x4a9eef[_0x5e454f(0x192)];_0x4a9eef[_0x5e454f(0x179)]&&(_0x596b79[_0x5e454f(0x179)]=_0x4a9eef['env']);writeScopedConfig(_0x596b79,_0x25945e);const _0x12b790=_0x25945e[_0x5e454f(0x199)]?'global':_0x5e454f(0x19f),_0x533113=_0x596b79[_0x5e454f(0x179)]?_0x5e454f(0x198)+_0x596b79[_0x5e454f(0x179)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x12b790+_0x5e454f(0x16a)+_0x533113+'\x20Verify:\x20'+CLI_BIN_NAME+_0x5e454f(0x1a2)};}},{'service':'auth','command':a9_0x86fcab(0x19a),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a9_0x86fcab(0x17e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a9_0x86fcab(0x159),'description':a9_0x86fcab(0x167)},{'name':'ak','type':a9_0x86fcab(0x159),'description':a9_0x86fcab(0x165)},{'name':a9_0x86fcab(0x179),'type':a9_0x86fcab(0x159),'description':a9_0x86fcab(0x187)},{'name':a9_0x86fcab(0x199),'type':a9_0x86fcab(0x15b),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a9_0x86fcab(0x16d),'default':![]}],async 'execute'(_0x499357){const _0x71fc2d=a9_0x86fcab,_0x31ec26=await resolveAuthWriteInput(_0x499357),_0x26d860=resolveAuthScopeFlags(_0x499357),_0x2a9ae1={'accessKey':_0x31ec26['accessKey']};_0x31ec26[_0x71fc2d(0x179)]&&(_0x2a9ae1[_0x71fc2d(0x179)]=_0x31ec26[_0x71fc2d(0x179)]);writeScopedConfig(_0x2a9ae1,_0x26d860);const _0x14646e=_0x26d860[_0x71fc2d(0x199)]?_0x71fc2d(0x199):'project',_0x470c23=_0x2a9ae1['env']?_0x71fc2d(0x198)+_0x2a9ae1[_0x71fc2d(0x179)]+'.':'';return{'ok':!![],'message':_0x71fc2d(0x17a)+_0x14646e+'\x20scope.'+_0x470c23+'\x20Verify:\x20'+CLI_BIN_NAME+_0x71fc2d(0x1a2)};}},{'service':a9_0x86fcab(0x162),'command':a9_0x86fcab(0x1a3),'description':a9_0x86fcab(0x19e),'risk':a9_0x86fcab(0x17e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x86fcab(0x199),'type':'boolean','description':a9_0x86fcab(0x17f),'default':!![]},{'name':a9_0x86fcab(0x19f),'type':'boolean','description':a9_0x86fcab(0x153),'default':![]}],async 'execute'(_0x57fe5b){const _0x56f003=a9_0x86fcab,_0x8e1b64=resolveAuthScopeFlags(_0x57fe5b),_0x2761c5=readScopedConfig(_0x8e1b64),_0x18e614=!!_0x2761c5['accessKey'];delete _0x2761c5[_0x56f003(0x192)],writeScopedConfig(_0x2761c5,_0x8e1b64);const _0x174875=_0x8e1b64[_0x56f003(0x199)]?_0x56f003(0x199):_0x56f003(0x19f);if(_0x18e614)return{'ok':!![],'message':_0x56f003(0x196)+_0x174875+_0x56f003(0x16a)};return{'ok':!![],'message':_0x56f003(0x180)+_0x174875+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a9_0x86fcab(0x162),'command':a9_0x86fcab(0x166),'description':'Show\x20current\x20authentication\x20status','risk':a9_0x86fcab(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a9_0x86fcab(0x199),'type':a9_0x86fcab(0x15b),'description':a9_0x86fcab(0x178),'default':!![]},{'name':a9_0x86fcab(0x19f),'type':a9_0x86fcab(0x15b),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x1c5896){const _0x1c23d8=a9_0x86fcab,_0x891a36=resolveAuthScopeFlags(_0x1c5896),_0x31497d=readScopedConfig(_0x891a36),_0x34d9cf=productEnvName(_0x1c23d8(0x15e)),_0x44d31f=productEnv('ACCESS_KEY')||undefined,_0x2ce83=_0x31497d['accessKey']||undefined,_0x5d5cba=_0x44d31f||_0x2ce83,_0x2c3f22=_0x44d31f?_0x34d9cf+'\x20env\x20var':_0x2ce83?(_0x891a36['global']?_0x1c23d8(0x199):_0x1c23d8(0x19f))+_0x1c23d8(0x156):null,_0x239502=[_0x1c23d8(0x18f)+AUTH_MODE['ClientAk']];if(_0x5d5cba){const _0x49cbbf=_0x5d5cba[_0x1c23d8(0x182)]>0x8?''+_0x5d5cba[_0x1c23d8(0x173)](0x0,0x8)+'*'[_0x1c23d8(0x18a)](_0x5d5cba[_0x1c23d8(0x182)]-0x8):_0x5d5cba;_0x239502[_0x1c23d8(0x163)]('AccessKey:\x20'+_0x49cbbf+(_0x2c3f22?_0x1c23d8(0x193)+_0x2c3f22+')':''));}return!_0x5d5cba&&(_0x239502[_0x1c23d8(0x163)](''),_0x239502[_0x1c23d8(0x163)](_0x1c23d8(0x17c)),_0x239502[_0x1c23d8(0x163)](''),_0x239502['push'](_0x1c23d8(0x155)+CLI_BIN_NAME+_0x1c23d8(0x190)),_0x239502['push'](''),_0x239502['push'](_0x1c23d8(0x16b)+PRODUCT_CONFIG[_0x1c23d8(0x17b)]+')'),_0x239502[_0x1c23d8(0x163)](_0x1c23d8(0x152)),_0x239502[_0x1c23d8(0x163)](''),_0x239502['push'](_0x1c23d8(0x150)),_0x239502['push']('\x20\x20export\x20'+_0x34d9cf+'=ak_xxx'),_0x239502['push'](''),_0x239502[_0x1c23d8(0x163)]('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0x239502[_0x1c23d8(0x163)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x1c23d8(0x169))),{'ok':!![],'message':_0x239502[_0x1c23d8(0x19b)]('\x0a')};}},{'service':'auth','command':a9_0x86fcab(0x151),'description':a9_0x86fcab(0x18d),'risk':a9_0x86fcab(0x177),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5dfe98){const _0x689ad2=a9_0x86fcab,_0x40a361=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x40a361,'meta':{'env':_0x5dfe98[_0x689ad2(0x16e)]??_0x689ad2(0x157)}}};}}];function a9_0x2046(){const _0x20d3ee=['17244zecKVS','5141587FqwzFN','Clear\x20accessKey\x20from\x20config','project','validation','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','\x20auth\x20status','logout','Option\x20C:\x20environment\x20variable','info','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Tip:\x20you\x20can\x20also\x20run:','Option\x20A:\x20','\x20config','production','stdin','string','global-default','boolean','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','9AewUUO','ACCESS_KEY','355087EfuTqU','Write\x20to\x20global\x20config\x20(default)','userCenterDisplayName','auth','push','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Shorthand\x20for\x20--access-key','status','AccessKey\x20(ak_xxx...)','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20doctor','\x20config.','Option\x20B:\x20apps\x20config\x20(','7312ByGDht','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','envName','29463dxhKTs','`auth\x20login`\x20does\x20not\x20support\x20--yes.','yes','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','slice','nonInteractive','Invalid\x20accessKey\x20format:\x20\x22','35RqCUlI','read','Read\x20from\x20global\x20config\x20(default)','env','Auth\x20config\x20reinitialized\x20in\x20','newConfigFileName','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','bool','write','Clear\x20from\x20global\x20config\x20(default)','No\x20AccessKey\x20found\x20in\x20','cancelled','length','1211xbFnSE','str','Use\x20`','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','4434192NVvreH','access-key','repeat','20PumVbS','trim','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Auth\x20mode:\x20','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','accessKey','\x20(via\x20','isTTY','291608LfIQGa','AccessKey\x20cleared\x20from\x20','test','\x20Current\x20env:\x20','global','init','join'];a9_0x2046=function(){return _0x20d3ee;};return a9_0x2046();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a10_0x5d48(_0x31c904,_0x1d6dee){_0x31c904=_0x31c904-0x106;const _0x183f9d=a10_0x183f();let _0x5d48a1=_0x183f9d[_0x31c904];return _0x5d48a1;}function a10_0x183f(){const _0x10d840=['AccessKey\x20(','12781JkRidN','name','94roczwj','race','AbortPrompt','2908UovRUd','196170VLzAzV','6832JQuejq','once','stdin','question','468biwqfG','SIGINT','AccessKey\x20(paste\x20ak_...):\x20','21JHTfjr','):\x20','1623815rGySKH','10GmKBQP','3KnfiuG','close','User\x20aborted\x20prompt','18AekhfC','removeListener','8161439KHKXtB','289692ftYPmn','trim'];a10_0x183f=function(){return _0x10d840;};return a10_0x183f();}(function(_0x22025d,_0x429aa7){const _0x216e63=a10_0x5d48,_0x43bebf=_0x22025d();while(!![]){try{const _0x508fff=-parseInt(_0x216e63(0x118))/0x1*(parseInt(_0x216e63(0x11a))/0x2)+-parseInt(_0x216e63(0x10f))/0x3*(-parseInt(_0x216e63(0x11d))/0x4)+-parseInt(_0x216e63(0x10d))/0x5*(-parseInt(_0x216e63(0x112))/0x6)+parseInt(_0x216e63(0x10b))/0x7*(-parseInt(_0x216e63(0x11f))/0x8)+parseInt(_0x216e63(0x115))/0x9*(parseInt(_0x216e63(0x10e))/0xa)+parseInt(_0x216e63(0x114))/0xb+parseInt(_0x216e63(0x108))/0xc*(-parseInt(_0x216e63(0x11e))/0xd);if(_0x508fff===_0x429aa7)break;else _0x43bebf['push'](_0x43bebf['shift']());}catch(_0x3903be){_0x43bebf['push'](_0x43bebf['shift']());}}}(a10_0x183f,0x8813e));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x556251=a10_0x5d48;super(_0x556251(0x111)),this[_0x556251(0x119)]=_0x556251(0x11c);}}function createSafeRl(){const _0x336c5a=a10_0x5d48,_0x1c53a0=createInterface({'input':process[_0x336c5a(0x106)],'output':process['stdout']});let _0x22431e;const _0x2e4b71=new Promise((_0x25b95f,_0x25e1d2)=>{const _0x3776d3=_0x336c5a;_0x22431e=()=>{const _0x3e2276=a10_0x5d48;_0x22431e&&(_0x1c53a0['removeListener'](_0x3e2276(0x109),_0x22431e),_0x22431e=undefined);try{_0x1c53a0[_0x3e2276(0x110)]();}catch{}_0x25e1d2(new AbortPrompt());},_0x1c53a0[_0x3776d3(0x120)](_0x3776d3(0x109),_0x22431e);}),_0x57aebe=()=>{const _0x2bf19c=_0x336c5a;_0x22431e&&(_0x1c53a0[_0x2bf19c(0x113)](_0x2bf19c(0x109),_0x22431e),_0x22431e=undefined);try{_0x1c53a0[_0x2bf19c(0x110)]();}catch{}};return{'rl':_0x1c53a0,'abortPromise':_0x2e4b71,'disposeSuccess':_0x57aebe};}export async function promptAccessKey(_0x51b707=''){const _0x2c7ae3=a10_0x5d48,{rl:_0x5aa0bb,abortPromise:_0x50b7d8,disposeSuccess:_0x5e9c05}=createSafeRl(),_0x5254da=new Promise(_0x175dae=>{const _0x27086f=a10_0x5d48,_0x134dd1=_0x51b707?_0x27086f(0x117)+_0x51b707+_0x27086f(0x10c):_0x27086f(0x10a);_0x5aa0bb[_0x27086f(0x107)](_0x134dd1,_0x2fa4e3=>{const _0x113629=_0x27086f;_0x5e9c05(),_0x175dae(_0x2fa4e3[_0x113629(0x116)]()||_0x51b707);});});return Promise[_0x2c7ae3(0x11b)]([_0x5254da,_0x50b7d8]);}export function isAbortPrompt(_0x3aab65){const _0x468732=a10_0x5d48;return _0x3aab65 instanceof Error&&_0x3aab65[_0x468732(0x119)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x18eb86=a11_0x51fc;function a11_0x47e4(){const _0x5ee5da=['3926kIiLge','(none)','functionName','num','5336736uOMvpK','142212EpFuGy','Script\x20ID','423ghZPNG','createdTime','verbose','303tGywCG','1300TDQdDX','2784WRvbPW','Get\x20BFF\x20script\x20details\x20by\x20ID','updatedTime','description','1943984dPZQGS','bool','read','1022709asPEWY','324170SfZcRn','detail','bff'];a11_0x47e4=function(){return _0x5ee5da;};return a11_0x47e4();}function a11_0x51fc(_0xd539c9,_0x1b368a){_0xd539c9=_0xd539c9-0x1df;const _0x47e477=a11_0x47e4();let _0x51fce4=_0x47e477[_0xd539c9];return _0x51fce4;}(function(_0x3b1081,_0x2ab952){const _0x47e041=a11_0x51fc,_0x58d7c5=_0x3b1081();while(!![]){try{const _0x3fa447=parseInt(_0x47e041(0x1f4))/0x1+-parseInt(_0x47e041(0x1e1))/0x2*(-parseInt(_0x47e041(0x1eb))/0x3)+parseInt(_0x47e041(0x1ed))/0x4*(parseInt(_0x47e041(0x1ec))/0x5)+parseInt(_0x47e041(0x1e5))/0x6+parseInt(_0x47e041(0x1e6))/0x7+-parseInt(_0x47e041(0x1f1))/0x8+-parseInt(_0x47e041(0x1e8))/0x9*(parseInt(_0x47e041(0x1f5))/0xa);if(_0x3fa447===_0x2ab952)break;else _0x58d7c5['push'](_0x58d7c5['shift']());}catch(_0x52b5f6){_0x58d7c5['push'](_0x58d7c5['shift']());}}}(a11_0x47e4,0x85153));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a11_0x18eb86(0x1e0),'command':a11_0x18eb86(0x1df),'description':a11_0x18eb86(0x1ee),'risk':a11_0x18eb86(0x1f3),'flags':[{...ID_FLAG,'description':a11_0x18eb86(0x1e7)},VERBOSE_FLAG],async 'execute'(_0x264607){const _0x166721=a11_0x18eb86,_0x2ce750=await getBffScriptInfo(_0x264607[_0x166721(0x1e4)]('id')),_0x4a3048=_0x264607[_0x166721(0x1f2)](_0x166721(0x1ea));if(_0x4a3048)return{'ok':!![],'data':_0x2ce750};return{'ok':!![],'data':{'id':_0x2ce750['id'],'appCode':_0x2ce750['appCode'],'functionName':_0x2ce750[_0x166721(0x1e3)]??'','scriptType':_0x2ce750['scriptType'],'description':_0x2ce750[_0x166721(0x1f0)]||_0x166721(0x1e2),'createdTime':_0x2ce750[_0x166721(0x1e9)]??'','updatedTime':_0x2ce750[_0x166721(0x1ef)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x35385a=a12_0x592e;(function(_0x472e3a,_0x9a4ef0){const _0x185958=a12_0x592e,_0x40f680=_0x472e3a();while(!![]){try{const _0x98e915=-parseInt(_0x185958(0x15f))/0x1+-parseInt(_0x185958(0x15e))/0x2*(-parseInt(_0x185958(0x162))/0x3)+-parseInt(_0x185958(0x156))/0x4+-parseInt(_0x185958(0x161))/0x5+-parseInt(_0x185958(0x15d))/0x6*(-parseInt(_0x185958(0x155))/0x7)+parseInt(_0x185958(0x157))/0x8+parseInt(_0x185958(0x158))/0x9;if(_0x98e915===_0x9a4ef0)break;else _0x40f680['push'](_0x40f680['shift']());}catch(_0x5f5a20){_0x40f680['push'](_0x40f680['shift']());}}}(a12_0x23e1,0x1eda1));function a12_0x23e1(){const _0x53110b=['1127664JCdSRl','622368mVkvSl','now','params','name','bff','6kbpKdg','6152nRVIBi','118183VbVlpm','str','532525zWArbf','207hEgSeN','BFF\x20function\x20name\x20to\x20execute','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','exec','BFF\x20executed\x20in\x20','679266QURXvm','673340SBEZfG'];a12_0x23e1=function(){return _0x53110b;};return a12_0x23e1();}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a12_0x592e(_0x23c46d,_0x4eac8b){_0x23c46d=_0x23c46d-0x151;const _0x23e119=a12_0x23e1();let _0x592e1b=_0x23e119[_0x23c46d];return _0x592e1b;}export const bffExec={'service':a12_0x35385a(0x15c),'command':a12_0x35385a(0x153),'description':a12_0x35385a(0x152),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a12_0x35385a(0x151)},PARAMS_FLAG],async 'execute'(_0x4e5841){const _0x540e98=a12_0x35385a,_0x325e7d=parseJsonParams(_0x4e5841[_0x540e98(0x160)](_0x540e98(0x15a))),_0x3b1f6a=Date[_0x540e98(0x159)](),_0x32330d=await executeSdkBff(_0x4e5841[_0x540e98(0x160)](_0x540e98(0x15b)),_0x325e7d),_0x505491=Date[_0x540e98(0x159)]()-_0x3b1f6a;return{'ok':!![],'data':{'result':_0x32330d,'elapsed':_0x505491},'message':_0x540e98(0x154)+_0x505491+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4038b5,_0x2c1137){const _0x1e2eb6=a13_0x20cc,_0x1f618f=_0x4038b5();while(!![]){try{const _0x377b5e=parseInt(_0x1e2eb6(0x1c3))/0x1*(parseInt(_0x1e2eb6(0x1c1))/0x2)+-parseInt(_0x1e2eb6(0x1c4))/0x3+parseInt(_0x1e2eb6(0x1bf))/0x4+parseInt(_0x1e2eb6(0x1c7))/0x5+-parseInt(_0x1e2eb6(0x1c2))/0x6+-parseInt(_0x1e2eb6(0x1c0))/0x7*(-parseInt(_0x1e2eb6(0x1c5))/0x8)+parseInt(_0x1e2eb6(0x1c6))/0x9;if(_0x377b5e===_0x2c1137)break;else _0x1f618f['push'](_0x1f618f['shift']());}catch(_0x3912d8){_0x1f618f['push'](_0x1f618f['shift']());}}}(a13_0x11d4,0x9a9ae));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a13_0x11d4(){const _0x2efb11=['31544OYvxuw','1102239gYrryC','742610dchCDT','2529176DDktSa','1603zHzIMt','14066fONjmD','4252284spqjTH','7WqgizM','1540467evAOgy'];a13_0x11d4=function(){return _0x2efb11;};return a13_0x11d4();}function a13_0x20cc(_0x149db3,_0x1ef825){_0x149db3=_0x149db3-0x1bf;const _0x11d402=a13_0x11d4();let _0x20cc34=_0x11d402[_0x149db3];return _0x20cc34;}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x30d361=a14_0x4df6;function a14_0x4df6(_0x32c299,_0x136911){_0x32c299=_0x32c299-0x197;const _0x3c339a=a14_0x3c33();let _0x4df6b3=_0x3c339a[_0x32c299];return _0x4df6b3;}(function(_0x206882,_0x192c49){const _0x46ac45=a14_0x4df6,_0x3c385f=_0x206882();while(!![]){try{const _0x35f1ab=parseInt(_0x46ac45(0x19c))/0x1+-parseInt(_0x46ac45(0x1a2))/0x2+parseInt(_0x46ac45(0x198))/0x3+parseInt(_0x46ac45(0x1ae))/0x4*(parseInt(_0x46ac45(0x1a9))/0x5)+parseInt(_0x46ac45(0x1aa))/0x6*(parseInt(_0x46ac45(0x19d))/0x7)+parseInt(_0x46ac45(0x19e))/0x8*(-parseInt(_0x46ac45(0x197))/0x9)+-parseInt(_0x46ac45(0x19f))/0xa;if(_0x35f1ab===_0x192c49)break;else _0x3c385f['push'](_0x3c385f['shift']());}catch(_0x40e828){_0x3c385f['push'](_0x3c385f['shift']());}}}(a14_0x3c33,0x281f7));import{CliErrors}from'../../errors.js';function a14_0x3c33(){const _0x36b5bf=['5873760lfAwqF','unknown','cli-skill-install','349396MdTtck','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','nonInteractive','cwd','inherit','CLI\x20Built-in\x20Skill\x20installed','npx\x20skills\x20add\x20failed:\x20','25pcLrap','1101306ObmqaJ','cli-skill','log','write','225068CVSWPV','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','skipped','Skipped\x20npx\x20(','\x20-g\x20-y','184644VPGqbr','796110uzySAU','install','\x20-g\x20-y)...','info','237193FIjYrC','7HXZujR','16jkPpAt'];a14_0x3c33=function(){return _0x36b5bf;};return a14_0x3c33();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a14_0x30d361(0x1ab),'command':a14_0x30d361(0x199),'description':'Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','risk':a14_0x30d361(0x1ad),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x296d10){const _0x21af1b=a14_0x30d361;logger['setLogPath'](process['cwd']()),logger[_0x21af1b(0x19b)](_0x21af1b(0x1a1),_0x21af1b(0x1af));const {LOVRABET_SKILL_SOURCE:_0x1eb46b,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x1eb3e3,runNpxSkillsAddGlobal:_0x41b1df}=await import('../../skills/npx-skills-add.js'),_0x284d6f=_0x296d10[_0x21af1b(0x1a4)]?'pipe':_0x21af1b(0x1a6);console[_0x21af1b(0x1ac)](_0x21af1b(0x1b0)+_0x1eb46b+_0x21af1b(0x19a));const _0x55f7fb=_0x41b1df(process[_0x21af1b(0x1a5)](),_0x1eb46b,{'stdio':_0x284d6f});if(_0x55f7fb[_0x21af1b(0x1b1)])console[_0x21af1b(0x1ac)](_0x21af1b(0x1b2)+_0x1eb3e3+_0x21af1b(0x1a3));else{if(_0x55f7fb['ok'])console[_0x21af1b(0x1ac)](_0x21af1b(0x1a7));else throw CliErrors['apiError'](_0x21af1b(0x1a8)+(_0x55f7fb['error']||_0x21af1b(0x1a0)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20'+_0x1eb46b+_0x21af1b(0x1b3));}return{'ok':!![]};}}];
|