@lovrabet/lovrabet-cli 2.2.7-beta.1 → 2.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.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.d.ts +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/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.d.ts +12 -0
- package/lib/commands/config/init.js +1 -0
- package/lib/commands/config/shared.d.ts +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/file/index.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.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/diagram.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/diagram.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-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.d.ts +11 -0
- package/lib/config/domain-config.js +1 -0
- package/lib/config/schema.d.ts +7 -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.d.ts +4 -0
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +10 -3
- 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.d.ts +52 -14
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.d.ts +15 -0
- package/lib/constant/region.js +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.d.ts +2 -0
- package/lib/constant/url.js +1 -1
- package/lib/context.d.ts +2 -6
- 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.d.ts +2 -0
- 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/rate-limit.js +1 -1
- package/lib/framework/raw-flags.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.d.ts +3 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.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/install-target.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/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.d.ts +15 -0
- package/lib/utils/access-key-redaction.js +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.d.ts +12 -0
- package/lib/utils/cli-version-check.js +1 -0
- package/lib/utils/cli-version-policy.d.ts +12 -0
- package/lib/utils/cli-version-policy.js +1 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.d.ts +2 -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 +3 -1
- package/skills/lovrabet/SKILL.md +11 -12
- package/skills/lovrabet/guides/troubleshooting.md +12 -8
- package/skills/lovrabet/references/lovrabet-app.md +1 -1
- package/skills/lovrabet/references/lovrabet-auth.md +7 -25
- package/skills/lovrabet/references/lovrabet-config-commands.md +42 -5
- package/skills/lovrabet/references/lovrabet-config.md +25 -5
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x2f3625=a12_0x5587;(function(_0x1d7ac2,_0x47d21c){const _0x51dd1c=a12_0x5587,_0x3df09e=_0x1d7ac2();while(!![]){try{const _0x5d8d8a=parseInt(_0x51dd1c(0x19f))/0x1*(parseInt(_0x51dd1c(0x194))/0x2)+-parseInt(_0x51dd1c(0x155))/0x3+-parseInt(_0x51dd1c(0x177))/0x4+parseInt(_0x51dd1c(0x161))/0x5+-parseInt(_0x51dd1c(0x18f))/0x6*(parseInt(_0x51dd1c(0x16a))/0x7)+parseInt(_0x51dd1c(0x19c))/0x8*(parseInt(_0x51dd1c(0x1a0))/0x9)+-parseInt(_0x51dd1c(0x180))/0xa*(parseInt(_0x51dd1c(0x18a))/0xb);if(_0x5d8d8a===_0x47d21c)break;else _0x3df09e['push'](_0x3df09e['shift']());}catch(_0x439f76){_0x3df09e['push'](_0x3df09e['shift']());}}}(a12_0x2e1c,0xf344d));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';function a12_0x5587(_0x1d8955,_0x27c07c){_0x1d8955=_0x1d8955-0x154;const _0x2e1c96=a12_0x2e1c();let _0x55877a=_0x2e1c96[_0x1d8955];return _0x55877a;}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';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x48a832=a12_0x5587;writeCliSideChannelLine(_0x48a832(0x157)+PRODUCT_CONFIG[_0x48a832(0x15e)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x48a832(0x1a1)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x48a832(0x16b));}function buildAccessKeySetupGuide(){const _0xc0d6d4=a12_0x5587;return[_0xc0d6d4(0x157)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0xc0d6d4(0x175)]('\x0a');}function canPromptForAccessKey(_0x4d1092){const _0x148099=a12_0x5587;return!_0x4d1092[_0x148099(0x15f)]&&process[_0x148099(0x1a6)][_0x148099(0x181)]!==![]&&process[_0x148099(0x162)][_0x148099(0x181)]!==![];}function a12_0x2e1c(){const _0x56072b=['envName','login','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','auth','\x20auth\x20status','development','push','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','2022222FLEGJA','init','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','success','accessKey','logout','trim','project','userCenterDisplayName','nonInteractive','Write\x20to\x20global\x20config\x20(default)','5101620FUotbd','stdout','read','Read\x20from\x20global\x20config\x20(default)','validation','daily','将用新的认证信息替换所选作用域的整份\x20Lovrabet\x20配置;该作用域中原有的其他配置项也会被清空。确认界面不会显示密钥内容。','expired','Use\x20`','4959178VWDIxi','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','access-key','Shorthand\x20for\x20--access-key','=ak_xxx','project\x20config','AccessKey\x20(ak_xxx...)','AccessKey\x20cleared\x20from\x20','将从所选\x20Lovrabet\x20配置中移除\x20AccessKey;之后依赖该密钥的命令需要重新登录才能使用。','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','join','Option\x20C:\x20environment\x20variable','2003108tWphlx','write','\x20doctor','\x20config.\x20Nothing\x20to\x20clear.','info','code','Missing\x20accessKey.','Show\x20current\x20authentication\x20status','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','10011310OLWYQa','isTTY','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','string','authRequired','production','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20Verify:\x20','\x20(via\x20','ClientAk','11SmKbbO','Status:\x20valid','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','repeat','`auth\x20login`\x20does\x20not\x20support\x20--yes.','6IqqZwy','AccessKey\x20saved\x20to\x20','AccessKey:\x20','将把新的\x20AccessKey\x20保存到所选\x20Lovrabet\x20配置;若该作用域已有\x20AccessKey,将被覆盖。确认界面不会显示密钥内容。','Auth\x20config\x20reinitialized\x20in\x20','2980934RCvggk','cancelled','check','bool','Then\x20verify\x20with:\x20','str','Option\x20B:\x20apps\x20config\x20(','\x20scope.','16eFglVp','test','Clear\x20from\x20global\x20config\x20(default)','1QxsvEE','6165333VluaKy','Tip:\x20you\x20can\x20also\x20run:','yes','\x20\x20export\x20','\x20Current\x20env:\x20','newConfigFileName','stdin','global','\x20config.','env','boolean','access_key','status','global\x20config','Auth\x20mode:\x20','length','slice','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config'];a12_0x2e1c=function(){return _0x56072b;};return a12_0x2e1c();}function resolveAuthScopeFlags(_0x56f143){const _0xf33f41=a12_0x5587;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x56f143[_0xf33f41(0x197)](_0xf33f41(0x1a7)),'explicitProject':_0x56f143[_0xf33f41(0x197)]('project'),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x2c8d11){const _0x31a48d=a12_0x5587;let _0x5328a9=(_0x2c8d11[_0x31a48d(0x199)](_0x31a48d(0x16d))||_0x2c8d11[_0x31a48d(0x199)]('ak')||'')[_0x31a48d(0x15c)]();const _0x1f078f=(_0x2c8d11['str']('env')||'')[_0x31a48d(0x15c)]();if(!_0x5328a9&&canPromptForAccessKey(_0x2c8d11))try{showAccessKeyCreateHint(),_0x5328a9=await promptAccessKey('');}catch(_0x5cc584){if(isAbortPrompt(_0x5cc584))throw CliErrors[_0x31a48d(0x195)]();throw _0x5cc584;}if(!_0x5328a9)throw CliErrors[_0x31a48d(0x165)](_0x31a48d(0x17d),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x31a48d(0x19d)](_0x5328a9))throw CliErrors[_0x31a48d(0x165)]('Invalid\x20accessKey\x20format:\x20\x22'+_0x5328a9+'\x22',_0x31a48d(0x158));if(!_0x1f078f)return{'accessKey':_0x5328a9};const _0x366afd=normalizeEnv(_0x1f078f);return{'accessKey':_0x5328a9,'env':isDaily(_0x366afd)?_0x31a48d(0x166):isDev(_0x366afd)?_0x31a48d(0x1b7):'production'};}export const authDefinitions=[{'service':'auth','command':a12_0x2f3625(0x1b3),'description':'将\x20AccessKey\x20保存到配置(默认写入全局配置;使用\x20--project\x20写入项目配置)','risk':a12_0x2f3625(0x178),'confirmationDescription':a12_0x2f3625(0x192),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2f3625(0x16d),'type':a12_0x2f3625(0x183),'description':a12_0x2f3625(0x171)},{'name':'ak','type':'string','description':a12_0x2f3625(0x16e)},{'name':a12_0x2f3625(0x1a7),'type':a12_0x2f3625(0x1aa),'description':a12_0x2f3625(0x160),'default':!![]},{'name':'project','type':'boolean','description':a12_0x2f3625(0x1b1),'default':![]}],async 'execute'(_0x2ddcaf){const _0x3a8886=a12_0x2f3625;if(_0x2ddcaf[_0x3a8886(0x197)](_0x3a8886(0x1a2)))throw CliErrors[_0x3a8886(0x165)](_0x3a8886(0x18e),_0x3a8886(0x169)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x242e06=(_0x2ddcaf[_0x3a8886(0x199)](_0x3a8886(0x16d))||_0x2ddcaf['str']('ak')||'')['trim']();if(!_0x242e06&&_0x2ddcaf[_0x3a8886(0x15f)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x1d8d1d=await resolveAuthWriteInput(_0x2ddcaf),_0x57f9ae=resolveAuthScopeFlags(_0x2ddcaf),_0x1e18fd=readScopedConfig(_0x57f9ae);_0x1e18fd['accessKey']=_0x1d8d1d[_0x3a8886(0x15a)];_0x1d8d1d[_0x3a8886(0x1a9)]&&(_0x1e18fd[_0x3a8886(0x1a9)]=_0x1d8d1d['env']);writeScopedConfig(_0x1e18fd,_0x57f9ae);const _0xeb900e=_0x57f9ae[_0x3a8886(0x1a7)]?_0x3a8886(0x1a7):_0x3a8886(0x15d),_0x4d2f0c=_0x1e18fd[_0x3a8886(0x1a9)]?_0x3a8886(0x1a4)+_0x1e18fd['env']+'.':'';return{'ok':!![],'message':_0x3a8886(0x190)+_0xeb900e+_0x3a8886(0x1a8)+_0x4d2f0c+'\x20Verify:\x20'+CLI_BIN_NAME+_0x3a8886(0x1b6)};}},{'service':a12_0x2f3625(0x1b5),'command':a12_0x2f3625(0x156),'description':'清空当前作用域配置并重新初始化认证','risk':a12_0x2f3625(0x178),'confirmationDescription':a12_0x2f3625(0x167),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2f3625(0x16d),'type':a12_0x2f3625(0x183),'description':a12_0x2f3625(0x171)},{'name':'ak','type':a12_0x2f3625(0x183),'description':a12_0x2f3625(0x16e)},{'name':a12_0x2f3625(0x1a9),'type':'string','description':a12_0x2f3625(0x182)},{'name':a12_0x2f3625(0x1a7),'type':a12_0x2f3625(0x1aa),'description':a12_0x2f3625(0x160),'default':!![]},{'name':a12_0x2f3625(0x15d),'type':a12_0x2f3625(0x1aa),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x70b818){const _0x2c8d57=a12_0x2f3625,_0x2135ee=await resolveAuthWriteInput(_0x70b818),_0x209adb=resolveAuthScopeFlags(_0x70b818),_0x36ea36={'accessKey':_0x2135ee[_0x2c8d57(0x15a)]};_0x2135ee[_0x2c8d57(0x1a9)]&&(_0x36ea36[_0x2c8d57(0x1a9)]=_0x2135ee[_0x2c8d57(0x1a9)]);writeScopedConfig(_0x36ea36,_0x209adb);const _0x2a4609=_0x209adb['global']?_0x2c8d57(0x1a7):'project',_0xed2147=_0x36ea36[_0x2c8d57(0x1a9)]?_0x2c8d57(0x1a4)+_0x36ea36['env']+'.':'';return{'ok':!![],'message':_0x2c8d57(0x193)+_0x2a4609+_0x2c8d57(0x19b)+_0xed2147+_0x2c8d57(0x187)+CLI_BIN_NAME+_0x2c8d57(0x1b6)};}},{'service':a12_0x2f3625(0x1b5),'command':a12_0x2f3625(0x15b),'description':'从配置中清除\x20AccessKey','risk':a12_0x2f3625(0x178),'confirmationDescription':a12_0x2f3625(0x173),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2f3625(0x1a7),'type':a12_0x2f3625(0x1aa),'description':a12_0x2f3625(0x19e),'default':!![]},{'name':'project','type':a12_0x2f3625(0x1aa),'description':a12_0x2f3625(0x186),'default':![]}],async 'execute'(_0x1a9bfd){const _0x53d8ec=a12_0x2f3625,_0x12edef=resolveAuthScopeFlags(_0x1a9bfd),_0x73f651=readScopedConfig(_0x12edef),_0x26bc80=!!_0x73f651['accessKey'];delete _0x73f651['accessKey'],writeScopedConfig(_0x73f651,_0x12edef);const _0x4a81e6=_0x12edef[_0x53d8ec(0x1a7)]?_0x53d8ec(0x1a7):_0x53d8ec(0x15d);if(_0x26bc80)return{'ok':!![],'message':_0x53d8ec(0x172)+_0x4a81e6+'\x20config.'};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x4a81e6+_0x53d8ec(0x17a)};}},{'service':a12_0x2f3625(0x1b5),'command':a12_0x2f3625(0x1ac),'description':a12_0x2f3625(0x17e),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x2f3625(0x1aa),'description':a12_0x2f3625(0x164),'default':!![]},{'name':'project','type':a12_0x2f3625(0x1aa),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a12_0x2f3625(0x196),'type':a12_0x2f3625(0x1aa),'description':a12_0x2f3625(0x18c),'default':![]}],async 'execute'(_0x47b48e){const _0xac27d=a12_0x2f3625,_0x10f151=resolveAuthScopeFlags(_0x47b48e),_0x19451c=readScopedConfig(_0x10f151),_0x43494a=productEnvName('ACCESS_KEY'),_0x1cdb7a=productEnv('ACCESS_KEY')||undefined,_0x38299d=_0x19451c[_0xac27d(0x15a)]||undefined,_0x5c8ab2=_0x1cdb7a||_0x38299d,_0x58a5a9=_0x1cdb7a?_0x43494a+'\x20env\x20var':_0x38299d?(_0x10f151['global']?'global':_0xac27d(0x15d))+'\x20config':null,_0x524c7f=['Auth\x20mode:\x20'+AUTH_MODE[_0xac27d(0x189)]];if(_0x5c8ab2){const _0x269339=_0x5c8ab2[_0xac27d(0x1af)]>0x8?''+_0x5c8ab2[_0xac27d(0x1b0)](0x0,0x8)+'*'['repeat'](_0x5c8ab2[_0xac27d(0x1af)]-0x8):_0x5c8ab2;_0x524c7f['push'](_0xac27d(0x191)+_0x269339+(_0x58a5a9?'\x20(via\x20'+_0x58a5a9+')':'')),_0x524c7f[_0xac27d(0x1b8)](_0xac27d(0x18b));}if(!_0x5c8ab2){_0x524c7f['push'](''),_0x524c7f[_0xac27d(0x1b8)](_0xac27d(0x154)),_0x524c7f[_0xac27d(0x1b8)](''),_0x524c7f['push']('Option\x20A:\x20'+CLI_BIN_NAME+_0xac27d(0x16c)),_0x524c7f[_0xac27d(0x1b8)](''),_0x524c7f[_0xac27d(0x1b8)](_0xac27d(0x19a)+PRODUCT_CONFIG[_0xac27d(0x1a5)]+')'),_0x524c7f[_0xac27d(0x1b8)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x524c7f[_0xac27d(0x1b8)](''),_0x524c7f[_0xac27d(0x1b8)](_0xac27d(0x176)),_0x524c7f[_0xac27d(0x1b8)](_0xac27d(0x1a3)+_0x43494a+_0xac27d(0x16f)),_0x524c7f[_0xac27d(0x1b8)](''),_0x524c7f[_0xac27d(0x1b8)](_0xac27d(0x198)+CLI_BIN_NAME+_0xac27d(0x1b6)),_0x524c7f['push'](_0xac27d(0x174)+CLI_BIN_NAME+_0xac27d(0x179));if(_0x47b48e['bool']('check')){const _0x4378ad=readStoredDeviceCode();if(_0x4378ad&&!isStoredDeviceCodeExpired(_0x4378ad)){const _0x70931d=getUserDomain(),_0x380ecc=await fetchDeviceToken(_0x70931d,_0x4378ad[_0xac27d(0x17c)]);if(_0x380ecc[_0xac27d(0x1ac)]===_0xac27d(0x159)&&_0x380ecc[_0xac27d(0x1ab)]){const _0x49527f={'global':_0x4378ad['scope']==='global'},_0x523080=readScopedConfig(_0x49527f);_0x523080['accessKey']=_0x380ecc[_0xac27d(0x1ab)],writeScopedConfig(_0x523080,_0x49527f),deleteStoredDeviceCode();const _0x80215c=_0x380ecc['access_key'],_0x54a885=_0x80215c['length']>0x8?''+_0x80215c[_0xac27d(0x1b0)](0x0,0x8)+'*'[_0xac27d(0x18d)](_0x80215c['length']-0x8):_0x80215c,_0x241a34=_0x4378ad['scope']===_0xac27d(0x1a7)?_0xac27d(0x1ad):_0xac27d(0x170);return{'ok':!![],'message':[_0xac27d(0x1ae)+AUTH_MODE[_0xac27d(0x189)],_0xac27d(0x191)+_0x54a885+_0xac27d(0x188)+_0x241a34+')',_0xac27d(0x18b)][_0xac27d(0x175)]('\x0a')};}_0x380ecc[_0xac27d(0x1ac)]===_0xac27d(0x168)&&deleteStoredDeviceCode();throw CliErrors[_0xac27d(0x184)](_0xac27d(0x1b4));}throw CliErrors[_0xac27d(0x184)](_0x524c7f[_0xac27d(0x175)]('\x0a'));}}return{'ok':!![],'message':_0x524c7f[_0xac27d(0x175)]('\x0a')};}},{'service':a12_0x2f3625(0x1b5),'command':a12_0x2f3625(0x17b),'description':a12_0x2f3625(0x17f),'risk':a12_0x2f3625(0x163),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x290a91){const _0x1d27b0=a12_0x2f3625,_0x5d4067=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x5d4067,'meta':{'env':_0x290a91[_0x1d27b0(0x1b2)]??_0x1d27b0(0x185)}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x2745cf=a12_0x3841;(function(_0x1f8845,_0x4f1725){const _0x51d40c=a12_0x3841,_0x3cd5a8=_0x1f8845();while(!![]){try{const _0x3fdc11=-parseInt(_0x51d40c(0xe4))/0x1+parseInt(_0x51d40c(0xb8))/0x2+-parseInt(_0x51d40c(0xee))/0x3*(-parseInt(_0x51d40c(0xd7))/0x4)+-parseInt(_0x51d40c(0xca))/0x5+parseInt(_0x51d40c(0xd1))/0x6*(parseInt(_0x51d40c(0xf1))/0x7)+-parseInt(_0x51d40c(0xd6))/0x8*(parseInt(_0x51d40c(0xd3))/0x9)+-parseInt(_0x51d40c(0xd8))/0xa;if(_0x3fdc11===_0x4f1725)break;else _0x3cd5a8['push'](_0x3cd5a8['shift']());}catch(_0x446721){_0x3cd5a8['push'](_0x3cd5a8['shift']());}}}(a12_0x5b75,0x7b67a));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';function a12_0x3841(_0x13b592,_0x43a7c7){_0x13b592=_0x13b592-0x9f;const _0x5b757b=a12_0x5b75();let _0x3841e7=_0x5b757b[_0x13b592];return _0x3841e7;}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';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function a12_0x5b75(){const _0x2a3b87=['Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','ClientAk','431910iOAZFy','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','success','development','AccessKey\x20(ak_xxx...)','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20config.','str','stdout','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','159VxfgDm','production','Status:\x20valid','32676gSPRlV','\x20auth\x20login\x20--access-key\x20<ak_xxx>','global\x20config','Then\x20verify\x20with:\x20','\x20auth\x20status','env','\x20Verify:\x20','accessKeyCreatePath','scope','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','stdin','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','project','trim','status','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','write','validation','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','read','expired','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','envName','Write\x20to\x20global\x20config\x20(default)','Show\x20current\x20authentication\x20status','ACCESS_KEY','Read\x20from\x20global\x20config\x20(default)','Missing\x20accessKey.','isTTY','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','Invalid\x20accessKey\x20format.','1823698AieOCi','Tip:\x20you\x20can\x20also\x20run:','\x20\x20export\x20','bool','Option\x20B:\x20apps\x20config\x20(','AccessKey:\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','global','push','Option\x20A:\x20','\x20(via\x20','logout','\x20env\x20var','access_key','join','auth','Clear\x20the\x20AccessKey\x20from\x20config','access-key','1401505igHuGk','string','\x20doctor','No\x20AccessKey\x20found\x20in\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','426qNjUkD','boolean','111771rvAvWF','Shorthand\x20for\x20--access-key','userCenterDisplayName','8KOaSfV','35300XssvTz','4809060TqyJLW','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','AccessKey\x20saved\x20to\x20','info','accessKey','Use\x20`','Auth\x20mode:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','\x20Current\x20env:\x20','authRequired'];a12_0x5b75=function(){return _0x2a3b87;};return a12_0x5b75();}function showAccessKeyCreateHint(_0x5357cc=USER_ACCESS_KEY_CREATE_URL){const _0xfc1580=a12_0x3841;writeCliSideChannelLine(_0xfc1580(0xa8)+PRODUCT_CONFIG[_0xfc1580(0xd5)]+':'),writeCliSideChannelLine('\x0a'+_0x5357cc+'\x0a'),writeCliSideChannelLine(_0xfc1580(0xb9)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0xfc1580(0xf2));}function buildAccessKeySetupGuide(_0x358058=USER_ACCESS_KEY_CREATE_URL){const _0xc1a7f6=a12_0x3841;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0xc1a7f6(0xd5)]+':',_0x358058,_0xc1a7f6(0xe9)+CLI_BIN_NAME+_0xc1a7f6(0xae)][_0xc1a7f6(0xc6)]('\x0a');}function canPromptForAccessKey(_0x3fc520){const _0x52e1b0=a12_0x3841;return!_0x3fc520['nonInteractive']&&process[_0x52e1b0(0xa3)]['isTTY']!==![]&&process[_0x52e1b0(0xec)][_0x52e1b0(0xb5)]!==![];}function resolveAuthScopeFlags(_0x4be5d6){const _0x18916e=a12_0x3841;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4be5d6[_0x18916e(0xbb)]('global'),'explicitProject':_0x4be5d6[_0x18916e(0xbb)](_0x18916e(0xa5)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x290e8d){const _0x42ce46=a12_0x3841;let _0x8c8c7e=(_0x290e8d[_0x42ce46(0xeb)](_0x42ce46(0xc9))||_0x290e8d[_0x42ce46(0xeb)]('ak')||'')[_0x42ce46(0xa6)]();const _0xabbf50=(_0x290e8d[_0x42ce46(0xeb)](_0x42ce46(0xf6))||'')[_0x42ce46(0xa6)](),_0x52c0c6=''+getUserDomain()+PRODUCT_CONFIG[_0x42ce46(0xa0)];if(!_0x8c8c7e&&canPromptForAccessKey(_0x290e8d))try{showAccessKeyCreateHint(_0x52c0c6),_0x8c8c7e=await promptAccessKey('');}catch(_0x465050){if(isAbortPrompt(_0x465050))throw CliErrors['cancelled']();throw _0x465050;}if(!_0x8c8c7e)throw CliErrors[_0x42ce46(0xaa)](_0x42ce46(0xb4),buildAccessKeySetupGuide(_0x52c0c6));if(!ACCESS_KEY_PATTERN['test'](_0x8c8c7e))throw CliErrors[_0x42ce46(0xaa)](_0x42ce46(0xb7),_0x42ce46(0xbe));if(!_0xabbf50)return{'accessKey':_0x8c8c7e};const _0x4599e7=normalizeEnv(_0xabbf50);return{'accessKey':_0x8c8c7e,'env':isDaily(_0x4599e7)?'daily':isDev(_0x4599e7)?_0x42ce46(0xe7):_0x42ce46(0xef)};}export const authDefinitions=[{'service':a12_0x2745cf(0xc7),'command':'login','description':a12_0x2745cf(0xed),'risk':a12_0x2745cf(0xa9),'confirmationDescription':a12_0x2745cf(0xcf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2745cf(0xc9),'type':a12_0x2745cf(0xcb),'description':a12_0x2745cf(0xe8)},{'name':'ak','type':'string','description':a12_0x2745cf(0xd4)},{'name':'global','type':a12_0x2745cf(0xd2),'description':a12_0x2745cf(0xb0),'default':!![]},{'name':a12_0x2745cf(0xa5),'type':a12_0x2745cf(0xd2),'description':a12_0x2745cf(0xd0),'default':![]}],async 'execute'(_0x140972){const _0x3d7bf7=a12_0x2745cf;if(_0x140972[_0x3d7bf7(0xbb)]('yes'))throw CliErrors[_0x3d7bf7(0xaa)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x3d7bf7(0xdd)+CLI_BIN_NAME+_0x3d7bf7(0xd9)+CLI_BIN_NAME+_0x3d7bf7(0xdf));const _0x2e5eb8=(_0x140972[_0x3d7bf7(0xeb)](_0x3d7bf7(0xc9))||_0x140972[_0x3d7bf7(0xeb)]('ak')||'')['trim']();if(!_0x2e5eb8&&_0x140972['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'])};const _0x2dc3bc=await resolveAuthWriteInput(_0x140972),_0x59a398=resolveAuthScopeFlags(_0x140972),_0xc32c2c=readScopedConfig(_0x59a398);_0xc32c2c['accessKey']=_0x2dc3bc[_0x3d7bf7(0xdc)];_0x2dc3bc[_0x3d7bf7(0xf6)]&&(_0xc32c2c[_0x3d7bf7(0xf6)]=_0x2dc3bc['env']);writeScopedConfig(_0xc32c2c,_0x59a398);const _0x37baac=_0x59a398['global']?_0x3d7bf7(0xbf):_0x3d7bf7(0xa5),_0x3c1430=_0xc32c2c['env']?_0x3d7bf7(0xe0)+_0xc32c2c[_0x3d7bf7(0xf6)]+'.':'';return{'ok':!![],'message':_0x3d7bf7(0xda)+_0x37baac+_0x3d7bf7(0xea)+_0x3c1430+_0x3d7bf7(0x9f)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a12_0x2745cf(0xc7),'command':a12_0x2745cf(0xc3),'description':a12_0x2745cf(0xc8),'risk':a12_0x2745cf(0xa9),'confirmationDescription':a12_0x2745cf(0xe5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2745cf(0xbf),'type':a12_0x2745cf(0xd2),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x2745cf(0xa5),'type':a12_0x2745cf(0xd2),'description':a12_0x2745cf(0xe2),'default':![]}],async 'execute'(_0x3be225){const _0x2dcf3b=a12_0x2745cf,_0x301b9a=resolveAuthScopeFlags(_0x3be225),_0x5a5f37=readScopedConfig(_0x301b9a),_0x1fc5eb=!!_0x5a5f37[_0x2dcf3b(0xdc)];delete _0x5a5f37[_0x2dcf3b(0xdc)],writeScopedConfig(_0x5a5f37,_0x301b9a);const _0x5611c0=_0x301b9a[_0x2dcf3b(0xbf)]?_0x2dcf3b(0xbf):'project';if(_0x1fc5eb)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x5611c0+_0x2dcf3b(0xea)};return{'ok':!![],'message':_0x2dcf3b(0xcd)+_0x5611c0+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a12_0x2745cf(0xc7),'command':a12_0x2745cf(0xa7),'description':a12_0x2745cf(0xb1),'risk':a12_0x2745cf(0xac),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2745cf(0xbf),'type':a12_0x2745cf(0xd2),'description':a12_0x2745cf(0xb3),'default':!![]},{'name':a12_0x2745cf(0xa5),'type':a12_0x2745cf(0xd2),'description':a12_0x2745cf(0xce),'default':![]},{'name':'check','type':a12_0x2745cf(0xd2),'description':a12_0x2745cf(0xa4),'default':![]}],async 'execute'(_0x5bf585){const _0x2603de=a12_0x2745cf,_0x75310b=resolveAuthScopeFlags(_0x5bf585),_0x21c5d2=readScopedConfig(_0x75310b),_0x4b2ede=productEnvName('ACCESS_KEY'),_0x392468=productEnv(_0x2603de(0xb2))||undefined,_0x24c04a=_0x21c5d2[_0x2603de(0xdc)]||undefined,_0x27ba70=_0x392468||_0x24c04a,_0x190708=_0x392468?_0x4b2ede+_0x2603de(0xc4):_0x24c04a?(_0x75310b[_0x2603de(0xbf)]?'global':_0x2603de(0xa5))+'\x20config':null,_0x468352=['Auth\x20mode:\x20'+AUTH_MODE[_0x2603de(0xe3)]];if(_0x27ba70){const _0x322217=maskCliAccessKey(_0x27ba70);_0x468352['push'](_0x2603de(0xbd)+_0x322217+(_0x190708?_0x2603de(0xc2)+_0x190708+')':'')),_0x468352[_0x2603de(0xc0)](_0x2603de(0xf0));}if(!_0x27ba70){_0x468352[_0x2603de(0xc0)](''),_0x468352[_0x2603de(0xc0)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x468352[_0x2603de(0xc0)](''),_0x468352[_0x2603de(0xc0)](_0x2603de(0xc1)+CLI_BIN_NAME+_0x2603de(0xab)),_0x468352[_0x2603de(0xc0)](''),_0x468352[_0x2603de(0xc0)](_0x2603de(0xbc)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x468352[_0x2603de(0xc0)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x468352[_0x2603de(0xc0)](''),_0x468352[_0x2603de(0xc0)]('Option\x20C:\x20environment\x20variable'),_0x468352['push'](_0x2603de(0xba)+_0x4b2ede+'=ak_xxx'),_0x468352[_0x2603de(0xc0)](''),_0x468352['push'](_0x2603de(0xf4)+CLI_BIN_NAME+_0x2603de(0xf5)),_0x468352['push'](_0x2603de(0xa2)+CLI_BIN_NAME+_0x2603de(0xcc));if(_0x5bf585[_0x2603de(0xbb)]('check')){const _0x205982=readStoredDeviceCode();if(_0x205982&&!isStoredDeviceCodeExpired(_0x205982)){const _0xea6a48=getUserDomain(),_0x487094=await fetchDeviceToken(_0xea6a48,_0x205982['code']);if(_0x487094[_0x2603de(0xa7)]===_0x2603de(0xe6)&&_0x487094[_0x2603de(0xc5)]){const _0x15c60f={'global':_0x205982[_0x2603de(0xa1)]==='global'},_0x15e16f=readScopedConfig(_0x15c60f);_0x15e16f[_0x2603de(0xdc)]=_0x487094[_0x2603de(0xc5)],writeScopedConfig(_0x15e16f,_0x15c60f),deleteStoredDeviceCode();const _0x59ee0a=_0x487094[_0x2603de(0xc5)],_0x4571ff=maskCliAccessKey(_0x59ee0a),_0x330ab9=_0x205982[_0x2603de(0xa1)]===_0x2603de(0xbf)?_0x2603de(0xf3):'project\x20config';return{'ok':!![],'message':[_0x2603de(0xde)+AUTH_MODE[_0x2603de(0xe3)],_0x2603de(0xbd)+_0x4571ff+_0x2603de(0xc2)+_0x330ab9+')',_0x2603de(0xf0)][_0x2603de(0xc6)]('\x0a')};}_0x487094[_0x2603de(0xa7)]===_0x2603de(0xad)&&deleteStoredDeviceCode();throw CliErrors[_0x2603de(0xe1)](_0x2603de(0xb6));}throw CliErrors[_0x2603de(0xe1)](_0x468352['join']('\x0a'));}}return{'ok':!![],'message':_0x468352[_0x2603de(0xc6)]('\x0a')};}},{'service':a12_0x2745cf(0xc7),'command':a12_0x2745cf(0xdb),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a12_0x2745cf(0xac),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x12beec){const _0x1b6f6c=a12_0x2745cf,_0x35a170=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x35a170,'meta':{'env':_0x12beec[_0x1b6f6c(0xaf)]??'production'}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d1021,_0x13f7a0){const _0x6b9f05=a13_0x1c62,_0x239768=_0x3d1021();while(!![]){try{const _0x226bd=-parseInt(_0x6b9f05(0x1f1))/0x1*(-parseInt(_0x6b9f05(0x1f4))/0x2)+-parseInt(_0x6b9f05(0x1ed))/0x3+-parseInt(_0x6b9f05(0x1fc))/0x4*(parseInt(_0x6b9f05(0x1fb))/0x5)+-parseInt(_0x6b9f05(0x1f0))/0x6+-parseInt(_0x6b9f05(0x1ea))/0x7*(-parseInt(_0x6b9f05(0x1f6))/0x8)+parseInt(_0x6b9f05(0x1f2))/0x9*(-parseInt(_0x6b9f05(0x1ec))/0xa)+parseInt(_0x6b9f05(0x1ee))/0xb;if(_0x226bd===_0x13f7a0)break;else _0x239768['push'](_0x239768['shift']());}catch(_0x30a1e3){_0x239768['push'](_0x239768['shift']());}}}(a13_0xc5ef,0xef6f0));import{createInterface}from'node:readline';function a13_0x1c62(_0x38ab53,_0x32b0b1){_0x38ab53=_0x38ab53-0x1e9;const _0xc5ef1b=a13_0xc5ef();let _0x1c6281=_0xc5ef1b[_0x38ab53];return _0x1c6281;}class AbortPrompt extends Error{constructor(){const _0x5b82f1=a13_0x1c62;super(_0x5b82f1(0x1f3)),this[_0x5b82f1(0x1ff)]='AbortPrompt';}}function createSafeRl(){const _0xd55a2c=a13_0x1c62,_0xa0bed0=createInterface({'input':process[_0xd55a2c(0x200)],'output':process[_0xd55a2c(0x1f5)]});let _0x163c66;const _0x596cc1=new Promise((_0x1d9757,_0x3ed748)=>{const _0x39e455=_0xd55a2c;_0x163c66=()=>{const _0x3b971a=a13_0x1c62;_0x163c66&&(_0xa0bed0['removeListener'](_0x3b971a(0x1ef),_0x163c66),_0x163c66=undefined);try{_0xa0bed0['close']();}catch{}_0x3ed748(new AbortPrompt());},_0xa0bed0[_0x39e455(0x1fe)](_0x39e455(0x1ef),_0x163c66);}),_0x15066d=()=>{const _0xfbe428=_0xd55a2c;_0x163c66&&(_0xa0bed0[_0xfbe428(0x1fd)](_0xfbe428(0x1ef),_0x163c66),_0x163c66=undefined);try{_0xa0bed0['close']();}catch{}};return{'rl':_0xa0bed0,'abortPromise':_0x596cc1,'disposeSuccess':_0x15066d};}export async function promptAccessKey(_0x2e8e5f=''){const _0x1b8af1=a13_0x1c62,{rl:_0x37cbc6,abortPromise:_0x1dc9b4,disposeSuccess:_0x580f8e}=createSafeRl(),_0xb2162c=new Promise(_0x1c20a0=>{const _0x39e607=a13_0x1c62,_0x317544=_0x2e8e5f?_0x39e607(0x1eb)+_0x2e8e5f+_0x39e607(0x1f9):'AccessKey\x20(paste\x20ak_...):\x20';_0x37cbc6[_0x39e607(0x1f8)](_0x317544,_0x2f49ef=>{const _0x5155b7=_0x39e607;_0x580f8e(),_0x1c20a0(_0x2f49ef[_0x5155b7(0x1e9)]()||_0x2e8e5f);});});return Promise[_0x1b8af1(0x1f7)]([_0xb2162c,_0x1dc9b4]);}export function isAbortPrompt(_0x46341e){const _0x2f99e7=a13_0x1c62;return _0x46341e instanceof Error&&_0x46341e['name']===_0x2f99e7(0x1fa);}function a13_0xc5ef(){const _0x8503c8=['11326139evtpva','SIGINT','94470MbpYle','32668NNjKvC','16326yExOAv','User\x20aborted\x20prompt','62vmNIZF','stdout','2552736DeEFeZ','race','question','):\x20','AbortPrompt','5nKiGZq','2746244IVokjr','removeListener','once','name','stdin','trim','35ZIEyUG','AccessKey\x20(','7070FecZvb','2016879EVcWKZ'];a13_0xc5ef=function(){return _0x8503c8;};return a13_0xc5ef();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x2b1075=a14_0xe4c8;(function(_0x3c3c4d,_0x205909){const _0x166e2c=a14_0xe4c8,_0x2e2b3a=_0x3c3c4d();while(!![]){try{const _0x27d9e3=parseInt(_0x166e2c(0x174))/0x1*(-parseInt(_0x166e2c(0x179))/0x2)+parseInt(_0x166e2c(0x17f))/0x3*(parseInt(_0x166e2c(0x17a))/0x4)+parseInt(_0x166e2c(0x181))/0x5+-parseInt(_0x166e2c(0x173))/0x6+-parseInt(_0x166e2c(0x17c))/0x7*(parseInt(_0x166e2c(0x172))/0x8)+parseInt(_0x166e2c(0x180))/0x9*(parseInt(_0x166e2c(0x176))/0xa)+parseInt(_0x166e2c(0x17e))/0xb*(parseInt(_0x166e2c(0x177))/0xc);if(_0x27d9e3===_0x205909)break;else _0x2e2b3a['push'](_0x2e2b3a['shift']());}catch(_0x12bcd0){_0x2e2b3a['push'](_0x2e2b3a['shift']());}}}(a14_0x2a5f,0x95f49));function a14_0xe4c8(_0x21b9cb,_0x3a9d66){_0x21b9cb=_0x21b9cb-0x170;const _0x2a5f1d=a14_0x2a5f();let _0xe4c824=_0x2a5f1d[_0x21b9cb];return _0xe4c824;}import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a14_0x2b1075(0x17b),'command':'detail','description':'Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a14_0x2b1075(0x17d)}],async 'execute'(_0x45b8bb){const _0x5a7772=a14_0x2b1075,_0x52b06b=await getBffEndpointContract(_0x45b8bb[_0x5a7772(0x178)],_0x45b8bb['str'](_0x5a7772(0x171)));return{'ok':!![],'data':{'appCode':_0x52b06b[_0x5a7772(0x178)],'functionName':_0x52b06b['functionName'],'description':_0x52b06b['description']||'(none)','version':_0x52b06b[_0x5a7772(0x170)],'gmtModified':_0x52b06b[_0x5a7772(0x175)]}};}};function a14_0x2a5f(){const _0x3e3a94=['572217CFuQgq','gmtModified','30MYrWQS','24KgnHcC','appCode','4gqmabm','93724dowxKl','bff','98WlDxFx','Backend\x20Function\x20name','6713069ZLvrjh','60iagxfz','3367512QojEsk','3014465xiGFfC','version','name','249752ZkvLtV','7313148xJnmAH'];a14_0x2a5f=function(){return _0x3e3a94;};return a14_0x2a5f();}
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a15_0x26fb(_0x2f5cad,_0x55a574){_0x2f5cad=_0x2f5cad-0x138;const _0x17d66c=a15_0x17d6();let _0x26fbf6=_0x17d66c[_0x2f5cad];return _0x26fbf6;}const a15_0x39a6d5=a15_0x26fb;(function(_0x24dd82,_0x4f1f57){const _0x6bfc5d=a15_0x26fb,_0x3567f7=_0x24dd82();while(!![]){try{const _0x2956ac=parseInt(_0x6bfc5d(0x13d))/0x1*(-parseInt(_0x6bfc5d(0x144))/0x2)+-parseInt(_0x6bfc5d(0x13e))/0x3+-parseInt(_0x6bfc5d(0x148))/0x4+-parseInt(_0x6bfc5d(0x143))/0x5*(parseInt(_0x6bfc5d(0x145))/0x6)+-parseInt(_0x6bfc5d(0x13c))/0x7+-parseInt(_0x6bfc5d(0x13a))/0x8*(parseInt(_0x6bfc5d(0x146))/0x9)+-parseInt(_0x6bfc5d(0x147))/0xa*(-parseInt(_0x6bfc5d(0x13f))/0xb);if(_0x2956ac===_0x4f1f57)break;else _0x3567f7['push'](_0x3567f7['shift']());}catch(_0x16bb4f){_0x3567f7['push'](_0x3567f7['shift']());}}}(a15_0x17d6,0xad0e1));function a15_0x17d6(){const _0x4c8610=['2433109iQwDRY','2441TyaSoy','789612Xnrwna','11fQdCiP','exec','now','params','5rVnkBR','302hGeMve','2253714FULXNx','6921FLJPnD','34004710aLJVnW','4392988PIVTCs','str','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','2480vGcXSx','Backend\x20Function\x20name\x20to\x20execute'];a15_0x17d6=function(){return _0x4c8610;};return a15_0x17d6();}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':a15_0x39a6d5(0x140),'description':a15_0x39a6d5(0x139),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x39a6d5(0x13b)},PARAMS_FLAG],async 'execute'(_0x342234){const _0x2b4fdc=a15_0x39a6d5,_0x830c8d=parseJsonParams(_0x342234[_0x2b4fdc(0x138)](_0x2b4fdc(0x142))),_0x5d7c38=Date[_0x2b4fdc(0x141)](),_0x5c949b=await executeSdkBff(_0x342234[_0x2b4fdc(0x138)]('name'),_0x830c8d),_0xd6c6ce=Date[_0x2b4fdc(0x141)]()-_0x5d7c38;return{'ok':!![],'data':{'result':_0x5c949b,'elapsed':_0xd6c6ce},'message':'Backend\x20Function\x20executed\x20in\x20'+_0xd6c6ce+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51bf9a,_0x3ae396){const _0x36953f=a16_0x3c72,_0x34b5e5=_0x51bf9a();while(!![]){try{const _0x37cbf3=-parseInt(_0x36953f(0xdc))/0x1*(parseInt(_0x36953f(0xe4))/0x2)+parseInt(_0x36953f(0xdd))/0x3+parseInt(_0x36953f(0xe6))/0x4*(-parseInt(_0x36953f(0xde))/0x5)+parseInt(_0x36953f(0xe2))/0x6+-parseInt(_0x36953f(0xdf))/0x7*(-parseInt(_0x36953f(0xe1))/0x8)+-parseInt(_0x36953f(0xe5))/0x9*(parseInt(_0x36953f(0xe3))/0xa)+-parseInt(_0x36953f(0xdb))/0xb*(parseInt(_0x36953f(0xe0))/0xc);if(_0x37cbf3===_0x3ae396)break;else _0x34b5e5['push'](_0x34b5e5['shift']());}catch(_0x1574cc){_0x34b5e5['push'](_0x34b5e5['shift']());}}}(a16_0x3269,0x9319f));import{bffDetail}from'../../commands/bff/detail.js';function a16_0x3269(){const _0x351526=['1IKUyvo','1469745XWcHKS','16180IWtzTz','3318301hyziCX','3608796tjbKOr','16BAbrXb','2684892ZBGUFU','350870mhPZXJ','67058CATmFn','162HKWnAZ','392LVrrkA','11oVsiox'];a16_0x3269=function(){return _0x351526;};return a16_0x3269();}import{bffExec}from'../../commands/bff/exec.js';function a16_0x3c72(_0x23ac1d,_0x345c17){_0x23ac1d=_0x23ac1d-0xdb;const _0x326928=a16_0x3269();let _0x3c7244=_0x326928[_0x23ac1d];return _0x3c7244;}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a17_0x410e(){const _0x5a21c3=['Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','unknown','1137346vwLQKf','\x20at\x20','cli-skill-install','pipe','install','cli-skill','Built-in\x20Skill\x20install\x20failed\x20[','changed','2180120NhHigk','installedPath','skillVersion','info','CLI\x20Built-in\x20Skill\x20','1319262jLHGxF','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','INSTALL_FAILED','795035KgDwEX','apiError','681162SOPlfn','nonInteractive','50nhVlbC','296pFQZUL','121478wRxFGq','code','log','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','4945216uxTwNn','setLogPath','153Jxandf','cwd'];a17_0x410e=function(){return _0x5a21c3;};return a17_0x410e();}const a17_0x255bbc=a17_0x2b43;function a17_0x2b43(_0x1f54ad,_0x15bbe7){_0x1f54ad=_0x1f54ad-0x1f3;const _0x410e9d=a17_0x410e();let _0x2b431a=_0x410e9d[_0x1f54ad];return _0x2b431a;}(function(_0x39c791,_0x26e5ca){const _0x32b391=a17_0x2b43,_0x21c1d3=_0x39c791();while(!![]){try{const _0x52654e=-parseInt(_0x32b391(0x1f4))/0x1+parseInt(_0x32b391(0x204))/0x2+parseInt(_0x32b391(0x211))/0x3+-parseInt(_0x32b391(0x1fe))/0x4+-parseInt(_0x32b391(0x1f8))/0x5*(parseInt(_0x32b391(0x1f6))/0x6)+parseInt(_0x32b391(0x1fa))/0x7*(-parseInt(_0x32b391(0x1f9))/0x8)+-parseInt(_0x32b391(0x200))/0x9*(-parseInt(_0x32b391(0x20c))/0xa);if(_0x52654e===_0x26e5ca)break;else _0x21c1d3['push'](_0x21c1d3['shift']());}catch(_0x4f3398){_0x21c1d3['push'](_0x21c1d3['shift']());}}}(a17_0x410e,0xdd2c4));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a17_0x255bbc(0x209),'command':a17_0x255bbc(0x208),'description':a17_0x255bbc(0x202),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5d4883){const _0x51023e=a17_0x255bbc;logger[_0x51023e(0x1ff)](process[_0x51023e(0x201)]()),logger[_0x51023e(0x20f)](_0x51023e(0x206),_0x51023e(0x1fd));const _0xeb7cf1=installBuiltinSkill({'stdio':_0x5d4883[_0x51023e(0x1f7)]?_0x51023e(0x207):'inherit'});if(!_0xeb7cf1['ok'])throw CliErrors[_0x51023e(0x1f5)](_0x51023e(0x20a)+(_0xeb7cf1[_0x51023e(0x1fb)]||_0x51023e(0x1f3))+']:\x20'+(_0xeb7cf1['error']||_0x51023e(0x203)),_0x51023e(0x212)+_0xeb7cf1['repairCommand']);const _0x214c5f=_0xeb7cf1[_0x51023e(0x20d)]?_0x51023e(0x205)+_0xeb7cf1['installedPath']:'';return console[_0x51023e(0x1fc)](_0xeb7cf1[_0x51023e(0x20b)]?_0x51023e(0x210)+_0xeb7cf1[_0x51023e(0x20e)]+'\x20installed'+_0x214c5f:_0x51023e(0x210)+_0xeb7cf1['skillVersion']+'\x20is\x20already\x20current'+_0x214c5f),{'ok':!![]};}}];
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
export { DEFAULT_APP_PROFILE_NAME, DEFAULT_CONFIG_VALUES, } from "../../constant/defaults.js";
|
|
27
27
|
export { RUNTIME_ENV_VALUES } from "../../constant/env.js";
|
|
28
28
|
export { OUTPUT_FORMAT_VALUES } from "../../constant/output.js";
|
|
29
|
-
export { buildAppProfileListFields, CONFIG_ENUM_VALUES, IMPORTABLE_RUNTIME_CONFIG_KEYS, TOP_LEVEL_CONFIG_KEYS, getConfigCommandKeyDescription, getConfigDefaultValue, getConfigEnumValues, getTopLevelConfigKeyList, getTopLevelConfigKeySummary, isLegacyCompatConfigKey, isTopLevelConfigKey, } from "../../config/schema.js";
|
|
29
|
+
export { buildAppProfileListFields, CONFIG_ENUM_VALUES, CLI_PROTECTED_CONFIG_KEYS, IMPORTABLE_RUNTIME_CONFIG_KEYS, TOP_LEVEL_CONFIG_KEYS, getConfigCommandKeyDescription, getConfigDefaultValue, getConfigEnumValues, getTopLevelConfigKeyList, getTopLevelConfigKeySummary, isLegacyCompatConfigKey, isCliProtectedConfigKey, isTopLevelConfigKey, normalizeLocale, } from "../../config/schema.js";
|
|
30
30
|
/** Config write scope: either global or project. */
|
|
31
31
|
export type ConfigScope = "global" | "project";
|
|
32
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1163ef,_0x212dae){const _0x19730f=a18_0x19b5,_0x43eb83=_0x1163ef();while(!![]){try{const _0x2c68f1=parseInt(_0x19730f(0xd9))/0x1*(parseInt(_0x19730f(0xd7))/0x2)+parseInt(_0x19730f(0xd2))/0x3*(-parseInt(_0x19730f(0xd4))/0x4)+-parseInt(_0x19730f(0xe0))/0x5+-parseInt(_0x19730f(0xce))/0x6*(-parseInt(_0x19730f(0xe1))/0x7)+parseInt(_0x19730f(0xcd))/0x8*(parseInt(_0x19730f(0xd0))/0x9)+-parseInt(_0x19730f(0xcb))/0xa*(parseInt(_0x19730f(0xd1))/0xb)+-parseInt(_0x19730f(0xd6))/0xc*(-parseInt(_0x19730f(0xcc))/0xd);if(_0x2c68f1===_0x212dae)break;else _0x43eb83['push'](_0x43eb83['shift']());}catch(_0xa46442){_0x43eb83['push'](_0x43eb83['shift']());}}}(a18_0x48ab,0x71da5));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';function a18_0x48ab(){const _0x57389e=['250xbawyJ','newConfigFileName','5369XaKRfE','global','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',',\x20or\x20create\x20a\x20project-local\x20','Not\x20inside\x20a\x20project\x20(no\x20','validation','inProject','4288410tyolEx','346871EQEkVn','Add\x20--global\x20to\x20write\x20to\x20~/','project-or-global-explicit','Use\x20only\x20one\x20config\x20scope\x20flag.','252830RWgtdL','5038163LkMGCM','8qZAFMh','6smNiUZ','\x20found).','6400431hNVVIr','297llxeLV','75bcNbGE','project','32044RxLNkw','global-default','24pqXjhA'];a18_0x48ab=function(){return _0x57389e;};return a18_0x48ab();}import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export function resolveConfigScope(_0xe2bdb4){const _0x3e1a4e=a18_0x19b5,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x6e6af4}=_0xe2bdb4;if(explicitGlobal&&explicitProject)throw CliErrors[_0x3e1a4e(0xde)](_0x3e1a4e(0xdb),_0x3e1a4e(0xca));if(explicitGlobal)return _0x3e1a4e(0xda);if(explicitProject)return _0x3e1a4e(0xd3);switch(_0x6e6af4){case _0x3e1a4e(0xd5):return _0x3e1a4e(0xda);case _0x3e1a4e(0xc9):if(!(_0xe2bdb4[_0x3e1a4e(0xdf)]??isInProject()))throw CliErrors[_0x3e1a4e(0xde)](_0x3e1a4e(0xdd)+PRODUCT_CONFIG[_0x3e1a4e(0xd8)]+_0x3e1a4e(0xcf),_0x3e1a4e(0xc8)+PRODUCT_CONFIG[_0x3e1a4e(0xd8)]+_0x3e1a4e(0xdc)+PRODUCT_CONFIG[_0x3e1a4e(0xd8)]+'\x20first.');return _0x3e1a4e(0xd3);}}function a18_0x19b5(_0x46dced,_0x28c471){_0x46dced=_0x46dced-0xc8;const _0x48abe5=a18_0x48ab();let _0x19b531=_0x48abe5[_0x46dced];return _0x19b531;}export function toScopeFlags(_0x500ab0){const _0x55723b=a18_0x19b5;return{'global':_0x500ab0===_0x55723b(0xda)};}export function formatScopeLabel(_0x4697c5){return _0x4697c5==='global'?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58e467,_0x5341ab){const _0x5a3def=a19_0xdbf8,_0x468181=_0x58e467();while(!![]){try{const _0x55ab1a=-parseInt(_0x5a3def(0xa6))/0x1+parseInt(_0x5a3def(0xa1))/0x2*(parseInt(_0x5a3def(0xa2))/0x3)+parseInt(_0x5a3def(0xbc))/0x4*(-parseInt(_0x5a3def(0xb4))/0x5)+parseInt(_0x5a3def(0xaa))/0x6*(-parseInt(_0x5a3def(0xba))/0x7)+parseInt(_0x5a3def(0xb9))/0x8*(parseInt(_0x5a3def(0xa0))/0x9)+parseInt(_0x5a3def(0xab))/0xa*(parseInt(_0x5a3def(0xa7))/0xb)+parseInt(_0x5a3def(0xa8))/0xc;if(_0x55ab1a===_0x5341ab)break;else _0x468181['push'](_0x468181['shift']());}catch(_0x385fb9){_0x468181['push'](_0x468181['shift']());}}}(a19_0x22cd,0x4d7a1));import{CliErrors}from'../../errors.js';function isSet(_0x440098,_0x12f406){const _0x32d09a=a19_0xdbf8,_0x2ddeae=_0x440098[_0x32d09a(0xb0)](_0x12f406);return _0x2ddeae!==undefined&&_0x2ddeae!==''&&_0x2ddeae!==![]&&_0x2ddeae!==0x0;}function fmtNames(_0x32287f){return _0x32287f['map'](_0x447fc4=>'--'+_0x447fc4)['join'](',\x20');}function a19_0xdbf8(_0x6d8f84,_0x144fe8){_0x6d8f84=_0x6d8f84-0x9e;const _0x22cdbe=a19_0x22cd();let _0xdbf829=_0x22cdbe[_0x6d8f84];return _0xdbf829;}export function requireOneOf(_0x54e519,_0x5b7b06,_0xdbe911){const _0x2d3cdf=a19_0xdbf8,_0x482cfc=_0x5b7b06[_0x2d3cdf(0xa4)](_0x33e771=>isSet(_0x54e519,_0x33e771));if(_0x482cfc[_0x2d3cdf(0xa3)]!==0x1)throw CliErrors[_0x2d3cdf(0xb3)](_0x482cfc[_0x2d3cdf(0xa3)]===0x0?_0x2d3cdf(0x9f)+fmtNames(_0x5b7b06)+'\x20is\x20required\x20for\x20`'+_0xdbe911+'`.':_0x2d3cdf(0x9e)+fmtNames(_0x5b7b06)+_0x2d3cdf(0xb7)+fmtNames(_0x482cfc)+'.',_0x482cfc[_0x2d3cdf(0xa3)]===0x0?_0x2d3cdf(0xb1)+fmtNames(_0x5b7b06):'Remove\x20all\x20but\x20one.');}function a19_0x22cd(){const _0x3e5d0a=['39608rOMxkW','Only\x20one\x20of\x20','Exactly\x20one\x20of\x20','18VFEHlS','22LVWVhf','129327eXfhYo','length','filter',',\x20got\x20\x22','613635YKZIGR','6655eQzlmV','6654384aDDGTz','test','1722FCbAaZ','750HEGLzj','\x20are\x20mutually\x20exclusive\x20for\x20`',':\x20expected\x20','At\x20least\x20one\x20of\x20','Invalid\x20--','flag','Provide\x20one\x20of:\x20','Use\x20only\x20one\x20of:\x20','validation','235RMsdfL','\x20is\x20required\x20for\x20`','Flags\x20','\x20is\x20allowed,\x20found:\x20','some','1465864kxhTnh','1078CufcbH','str'];a19_0x22cd=function(){return _0x3e5d0a;};return a19_0x22cd();}export function requireAnyOf(_0x513377,_0x229d50,_0x59fb86){const _0x2eeb4=a19_0xdbf8;if(!_0x229d50[_0x2eeb4(0xb8)](_0x43d90e=>isSet(_0x513377,_0x43d90e)))throw CliErrors[_0x2eeb4(0xb3)](_0x2eeb4(0xae)+fmtNames(_0x229d50)+_0x2eeb4(0xb5)+_0x59fb86+'`.',_0x2eeb4(0xb1)+fmtNames(_0x229d50));}export function mutuallyExclusive(_0x2210ac,_0x3fac44,_0x362a10){const _0x104fbe=a19_0xdbf8,_0x4af6fe=_0x3fac44[_0x104fbe(0xa4)](_0x20ade8=>isSet(_0x2210ac,_0x20ade8));if(_0x4af6fe[_0x104fbe(0xa3)]>0x1)throw CliErrors[_0x104fbe(0xb3)](_0x104fbe(0xb6)+fmtNames(_0x4af6fe)+_0x104fbe(0xac)+_0x362a10+'`.',_0x104fbe(0xb2)+fmtNames(_0x3fac44));}export function validatePattern(_0x346152,_0x435124,_0xb15703,_0x3289bd){const _0x3d492d=a19_0xdbf8,_0x3fe081=_0x346152[_0x3d492d(0xbb)](_0x435124);if(_0x3fe081&&!_0xb15703[_0x3d492d(0xa9)](_0x3fe081))throw CliErrors['validation'](_0x3d492d(0xaf)+_0x435124+_0x3d492d(0xad)+_0x3289bd+_0x3d492d(0xa5)+_0x3fe081+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x2cd753=a20_0x2427;(function(_0xa809b,_0x57b41c){const _0x517a28=a20_0x2427,_0x20489d=_0xa809b();while(!![]){try{const _0x41dac2=parseInt(_0x517a28(0x1cc))/0x1*(-parseInt(_0x517a28(0x1e3))/0x2)+-parseInt(_0x517a28(0x1da))/0x3*(parseInt(_0x517a28(0x1cf))/0x4)+parseInt(_0x517a28(0x1d9))/0x5*(parseInt(_0x517a28(0x1d8))/0x6)+parseInt(_0x517a28(0x1d7))/0x7*(parseInt(_0x517a28(0x1cb))/0x8)+parseInt(_0x517a28(0x1e1))/0x9+-parseInt(_0x517a28(0x1df))/0xa*(-parseInt(_0x517a28(0x1d0))/0xb)+parseInt(_0x517a28(0x1de))/0xc*(-parseInt(_0x517a28(0x1c9))/0xd);if(_0x41dac2===_0x57b41c)break;else _0x20489d['push'](_0x20489d['shift']());}catch(_0x3c123e){_0x20489d['push'](_0x20489d['shift']());}}}(a20_0x1c4d,0xee3c1));export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':a20_0x2cd753(0x1cd),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a20_0x2cd753(0x1d4)}};export const SQLCODE_FLAG={'name':a20_0x2cd753(0x1e0),'type':a20_0x2cd753(0x1d5),'required':!![],'description':a20_0x2cd753(0x1d3),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x2cd753(0x1ca)}};function a20_0x1c4d(){const _0x57b161=['params','475573stsDxM','9527790yStJjX','5VqHDXs','111nNPkwh','boolean','Resource\x20name\x20for\x20lookup','name','35472444felkcJ','229300QGyowG','sqlcode','15967665AUNRSD','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','2puXRDe','13gZujHJ','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','104iYJTya','772748QNKXXE','Dataset\x20code\x20(32-char\x20hex\x20UUID)','Return\x20full\x20raw\x20response\x20object','126356AswMbN','781PSBzgT','Resource\x20ID','verbose','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','string'];a20_0x1c4d=function(){return _0x57b161;};return a20_0x1c4d();}export const VERBOSE_FLAG={'name':a20_0x2cd753(0x1d2),'type':a20_0x2cd753(0x1db),'description':a20_0x2cd753(0x1ce)};export const PARAMS_FLAG={'name':a20_0x2cd753(0x1d6),'type':a20_0x2cd753(0x1d5),'description':a20_0x2cd753(0x1e2)};function a20_0x2427(_0x2723d4,_0x2170ed){_0x2723d4=_0x2723d4-0x1c9;const _0x1c4d67=a20_0x1c4d();let _0x242774=_0x1c4d67[_0x2723d4];return _0x242774;}export const NAME_FLAG={'name':a20_0x2cd753(0x1dd),'type':a20_0x2cd753(0x1d5),'description':a20_0x2cd753(0x1dc)};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a20_0x2cd753(0x1d1)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5bdbd9,_0x50a0fe){const _0x1bb524=a21_0xcc97,_0x45c338=_0x5bdbd9();while(!![]){try{const _0x246813=-parseInt(_0x1bb524(0x165))/0x1*(-parseInt(_0x1bb524(0x168))/0x2)+-parseInt(_0x1bb524(0x16a))/0x3*(parseInt(_0x1bb524(0x16f))/0x4)+parseInt(_0x1bb524(0x16d))/0x5+parseInt(_0x1bb524(0x172))/0x6*(-parseInt(_0x1bb524(0x177))/0x7)+-parseInt(_0x1bb524(0x16e))/0x8*(-parseInt(_0x1bb524(0x174))/0x9)+-parseInt(_0x1bb524(0x16b))/0xa*(-parseInt(_0x1bb524(0x166))/0xb)+-parseInt(_0x1bb524(0x170))/0xc;if(_0x246813===_0x50a0fe)break;else _0x45c338['push'](_0x45c338['shift']());}catch(_0xd249ac){_0x45c338['push'](_0x45c338['shift']());}}}(a21_0x2bab,0x2cd95));import{existsSync,statSync}from'node:fs';function a21_0xcc97(_0x18701c,_0x482821){_0x18701c=_0x18701c-0x164;const _0x2babbe=a21_0x2bab();let _0xcc97eb=_0x2babbe[_0x18701c];return _0xcc97eb;}function a21_0x2bab(){const _0x1417aa=['147234KAWmpT','File\x20not\x20found:\x20','9QEQtQJ','trim','toFixed','91QYczoG','validation','isFile','146791GJpZxc','61105YANcIT','\x20path\x20is\x20required.','2aGNBal','\x20MB','3aDpRWN','630cOLpGa','size','1333740ZrguQu','1652248NbVLXY','1347140ADMobq','1566504KdxhzV','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a21_0x2bab=function(){return _0x1417aa;};return a21_0x2bab();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x51375e){const _0x1d1e14=a21_0xcc97;if(_0x51375e>=BYTES_PER_MB){const _0x4ee88a=Math['ceil'](_0x51375e/BYTES_PER_MB*0x64)/0x64;return _0x4ee88a[_0x1d1e14(0x176)](0x2)+_0x1d1e14(0x169);}return _0x51375e+'\x20B';}export function requireRuntimeUploadFile(_0x28d4b9,_0x44faac){const _0x438251=a21_0xcc97,_0x4904e8=_0x28d4b9[_0x438251(0x175)]();if(!_0x4904e8)throw CliErrors[_0x438251(0x178)](_0x44faac+_0x438251(0x167));if(!existsSync(_0x4904e8))throw CliErrors[_0x438251(0x178)](_0x438251(0x173)+_0x4904e8);const _0x27385f=statSync(_0x4904e8);if(!_0x27385f[_0x438251(0x164)]())throw CliErrors[_0x438251(0x178)](_0x438251(0x171)+_0x4904e8);if(_0x27385f[_0x438251(0x16c)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x438251(0x178)]('File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x4904e8+'\x20('+formatBytes(_0x27385f['size'])+')');return{'path':_0x4904e8,'size':_0x27385f[_0x438251(0x16c)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a22_0x4db5(_0x3005a4,_0x4a402e){_0x3005a4=_0x3005a4-0x12e;const _0x3c2f7e=a22_0x3c2f();let _0x4db557=_0x3c2f7e[_0x3005a4];return _0x4db557;}const a22_0x2ebb=a22_0x4db5;(function(_0x2fa736,_0x1eae71){const _0x407983=a22_0x4db5,_0x1d6255=_0x2fa736();while(!![]){try{const _0x2083d6=parseInt(_0x407983(0x130))/0x1+parseInt(_0x407983(0x13e))/0x2+parseInt(_0x407983(0x171))/0x3+-parseInt(_0x407983(0x131))/0x4*(parseInt(_0x407983(0x15e))/0x5)+-parseInt(_0x407983(0x167))/0x6*(-parseInt(_0x407983(0x137))/0x7)+parseInt(_0x407983(0x176))/0x8*(-parseInt(_0x407983(0x160))/0x9)+-parseInt(_0x407983(0x15f))/0xa*(parseInt(_0x407983(0x168))/0xb);if(_0x2083d6===_0x1eae71)break;else _0x1d6255['push'](_0x1d6255['shift']());}catch(_0x4e76f3){_0x1d6255['push'](_0x1d6255['shift']());}}}(a22_0x3c2f,0xb467c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a22_0x3c2f(){const _0x2b4f49=['write','Usage:\x20','\x20config\x20get\x20<key>','project-or-global-explicit','\x20config\x20set\x20<key>\x20<value>\x20[--global]','Config\x20files:\x0a','Top-level\x20key\x20\x22','Missing\x20key\x20or\x20value.','\x22.\x20Allowed:\x20','isArray','pretty','Invalid\x20value\x20for\x20\x22','field','includes','Get\x20a\x20config\x20value','\x22\x20not\x20found\x20at\x20top\x20level.','raw','35MemWDI','791360AWkkyZ','45EtVCKQ','key','../../context.js','object','`\x20=\x20\x22','Set\x20`','format','6ktbFxE','22KpyKHP','List\x20current\x20config','修改\x20Lovrabet\x20CLI\x20配置;该变更可能影响后续命令使用的应用、环境或输出行为。','get','riskLevel','config','\x20\x20global:\x20\x20','stringify','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','691812KtOEfs','alias','(none)','Write\x20to\x20global\x20config','validation','517896igtkRs','pageSize\x20must\x20be\x20a\x20positive\x20number','apps','删除配置项的值','803544RTgnfV','819348EMcPmn','set','length',';\x20apps.<alias>.appcode','Key\x20not\x20found:\x20','Value\x20to\x20assign','6286021crmsUz','设置配置项的值','read','Settable\x20keys:\x20','Deleted\x20`','bool','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','1445210EXkwSN','\x20config\x20delete\x20<key>\x20[--global]','split','global','trim','\x20\x20project:\x20','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','args','\x20(global)','appcode','join','delete','log','pageSize','Missing\x20key\x20argument.'];a22_0x3c2f=function(){return _0x2b4f49;};return a22_0x3c2f();}const GLOBAL_FLAG={'name':'global','type':'boolean','description':a22_0x2ebb(0x174),'default':![]};function parseAliasAppcodeSetKey(_0x4e37ab){const _0x250cac=a22_0x2ebb,_0x1b8da2=_0x4e37ab[_0x250cac(0x140)]('.');if(_0x1b8da2['length']!==0x3||_0x1b8da2[0x0]!==_0x250cac(0x12e)||_0x1b8da2[0x2]!=='appcode')return undefined;const _0x3405a2=_0x1b8da2[0x1]?.[_0x250cac(0x142)]();return _0x3405a2?_0x3405a2:undefined;}function parseAliasDeleteKey(_0x386930){const _0x32ff1e=a22_0x2ebb,_0x2d9356=_0x386930[_0x32ff1e(0x140)]('.');if(_0x2d9356[_0x32ff1e(0x133)]===0x2&&_0x2d9356[0x0]===_0x32ff1e(0x12e)){const _0x15778b=_0x2d9356[0x1]?.[_0x32ff1e(0x142)]();return _0x15778b?{'alias':_0x15778b}:undefined;}if(_0x2d9356[_0x32ff1e(0x133)]===0x3&&_0x2d9356[0x0]===_0x32ff1e(0x12e)&&_0x2d9356[0x2]===_0x32ff1e(0x147)){const _0x334148=_0x2d9356[0x1]?.['trim']();return _0x334148?{'alias':_0x334148,'field':_0x32ff1e(0x147)}:undefined;}return undefined;}function setLocalAppAlias(_0x2ede54,_0x192fcb,_0x2e3dff){const _0x4dbc84=a22_0x2ebb,_0x314310=_0x2ede54[_0x4dbc84(0x12e)]&&typeof _0x2ede54[_0x4dbc84(0x12e)]===_0x4dbc84(0x163)&&!Array[_0x4dbc84(0x156)](_0x2ede54[_0x4dbc84(0x12e)])?_0x2ede54[_0x4dbc84(0x12e)]:{},_0x303ec8=_0x314310[_0x192fcb]&&typeof _0x314310[_0x192fcb]==='object'&&!Array['isArray'](_0x314310[_0x192fcb])?_0x314310[_0x192fcb]:{};_0x303ec8[_0x4dbc84(0x147)]=_0x2e3dff,_0x314310[_0x192fcb]=_0x303ec8,_0x2ede54[_0x4dbc84(0x12e)]=_0x314310;}function deleteLocalAppAlias(_0x23e2eb,_0x3b766d){const _0x23567c=a22_0x2ebb;if(!_0x23e2eb[_0x23567c(0x12e)]||typeof _0x23e2eb[_0x23567c(0x12e)]!==_0x23567c(0x163)||Array[_0x23567c(0x156)](_0x23e2eb['apps']))return![];const _0x4cd091=_0x23e2eb[_0x23567c(0x12e)],_0x1964ce=_0x4cd091[_0x3b766d[_0x23567c(0x172)]];if(!_0x1964ce||typeof _0x1964ce!=='object'||Array['isArray'](_0x1964ce))return![];if(!_0x3b766d['field'])return delete _0x4cd091[_0x3b766d[_0x23567c(0x172)]],!![];if(!(_0x3b766d[_0x23567c(0x159)]in _0x1964ce))return![];return delete _0x1964ce[_0x3b766d['field']],Object['keys'](_0x1964ce)['length']===0x0&&delete _0x4cd091[_0x3b766d[_0x23567c(0x172)]],!![];}const listDef={'service':a22_0x2ebb(0x16d),'command':'list','description':a22_0x2ebb(0x169),'risk':a22_0x2ebb(0x139),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x55120e){const _0x526eac=a22_0x2ebb,{buildConfigFromFlags:_0x4d8413}=await import('../../context.js'),_0x266d41=_0x4d8413({}),_0x2a9751=getProjectConfigPath(),_0x311579=resolveWriteConfigPath('global');if(_0x55120e[_0x526eac(0x166)]===_0x526eac(0x157))return{'ok':!![],'message':_0x526eac(0x144)+(JSON[_0x526eac(0x16f)](_0x266d41['raw'],null,0x2)+'\x0a\x0a')+_0x526eac(0x152)+(_0x526eac(0x143)+(_0x2a9751??_0x526eac(0x173))+'\x0a')+(_0x526eac(0x16e)+_0x311579)};return{'ok':!![],'data':{'effective':_0x266d41[_0x526eac(0x15d)],'configFiles':{'project':_0x2a9751??null,'global':_0x311579}}};}},getDef={'service':a22_0x2ebb(0x16d),'command':a22_0x2ebb(0x16b),'description':a22_0x2ebb(0x15b),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a22_0x2ebb(0x170),'required':!![]}],'flags':[],async 'execute'(_0x2dd8ab){const _0x2ff1f3=a22_0x2ebb,_0x230f44=_0x2dd8ab[_0x2ff1f3(0x145)][0x0];if(!_0x230f44)throw CliErrors['validation'](_0x2ff1f3(0x14c),_0x2ff1f3(0x14e)+CLI_BIN_NAME+_0x2ff1f3(0x14f));const {buildConfigFromFlags:_0x15f540}=await import(_0x2ff1f3(0x162)),{raw:_0x328b98}=_0x15f540({});if(_0x230f44[_0x2ff1f3(0x15a)]('.')){const _0x5e3688=_0x230f44['split']('.');let _0x6f5782=_0x328b98;for(const _0x4e9792 of _0x5e3688){if(_0x6f5782==null||typeof _0x6f5782!==_0x2ff1f3(0x163))throw CliErrors[_0x2ff1f3(0x175)](_0x2ff1f3(0x135)+_0x230f44);_0x6f5782=_0x6f5782[_0x4e9792];}if(_0x6f5782===undefined)throw CliErrors[_0x2ff1f3(0x175)](_0x2ff1f3(0x135)+_0x230f44);return console[_0x2ff1f3(0x14a)](typeof _0x6f5782===_0x2ff1f3(0x163)?JSON['stringify'](_0x6f5782,null,0x2):String(_0x6f5782)),{'ok':!![]};}const _0x3d9bc7=_0x328b98[_0x230f44];if(_0x3d9bc7===undefined)throw CliErrors[_0x2ff1f3(0x175)](_0x2ff1f3(0x135)+_0x230f44);return console['log'](typeof _0x3d9bc7===_0x2ff1f3(0x163)?JSON[_0x2ff1f3(0x16f)](_0x3d9bc7,null,0x2):String(_0x3d9bc7)),{'ok':!![]};}},setDef={'service':a22_0x2ebb(0x16d),'command':a22_0x2ebb(0x132),'description':a22_0x2ebb(0x138),'risk':a22_0x2ebb(0x14d),'confirmationDescription':a22_0x2ebb(0x16a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x2ebb(0x161),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a22_0x2ebb(0x136),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x75c3df){const _0x2864dd=a22_0x2ebb,_0x525b28=_0x75c3df[_0x2864dd(0x145)][0x0],_0x5df702=_0x75c3df[_0x2864dd(0x145)][0x1];if(!_0x525b28||_0x5df702===undefined)throw CliErrors[_0x2864dd(0x175)](_0x2864dd(0x154),'Usage:\x20'+CLI_BIN_NAME+_0x2864dd(0x151));if(ENUM_KEYS[_0x525b28]&&!ENUM_KEYS[_0x525b28]['includes'](_0x5df702))throw CliErrors[_0x2864dd(0x175)](_0x2864dd(0x158)+_0x525b28+_0x2864dd(0x155)+ENUM_KEYS[_0x525b28][_0x2864dd(0x148)](',\x20'));if(_0x525b28===_0x2864dd(0x16c))throw CliErrors[_0x2864dd(0x175)](_0x2864dd(0x13d));if(_0x525b28===_0x2864dd(0x14b)){const _0x470057=Number(_0x5df702);if(isNaN(_0x470057)||_0x470057<=0x0)throw CliErrors[_0x2864dd(0x175)](_0x2864dd(0x177));}const _0x320887=resolveWriteScope({'explicitGlobal':_0x75c3df[_0x2864dd(0x13c)](_0x2864dd(0x141)),'policy':_0x2864dd(0x150)}),_0xf6b53e=toScopeFlags(_0x320887),_0xd17984=readScopedConfig(_0xf6b53e),_0x3fa3a8=parseAliasAppcodeSetKey(_0x525b28);if(!_0x3fa3a8&&!isTopLevelConfigKey(_0x525b28))throw CliErrors[_0x2864dd(0x175)](_0x2864dd(0x153)+_0x525b28+'\x22\x20is\x20not\x20settable.',_0x2864dd(0x13a)+getTopLevelConfigKeySummary()+_0x2864dd(0x134));return _0x3fa3a8?setLocalAppAlias(_0xd17984,_0x3fa3a8,_0x5df702):_0xd17984[_0x525b28]=_0x525b28==='pageSize'?Number(_0x5df702):_0x5df702,console[_0x2864dd(0x14a)](_0x2864dd(0x165)+_0x525b28+_0x2864dd(0x164)+_0x5df702+'\x22'+(_0x320887===_0x2864dd(0x141)?_0x2864dd(0x146):'')),writeScopedConfig(_0xd17984,_0xf6b53e),{'ok':!![]};}},deleteDef={'service':'config','command':a22_0x2ebb(0x149),'description':a22_0x2ebb(0x12f),'risk':a22_0x2ebb(0x14d),'confirmationDescription':'删除\x20Lovrabet\x20CLI\x20配置项;后续命令将改用其他配置层或默认值。','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x2ebb(0x161),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x152ac8){const _0x425196=a22_0x2ebb,_0x159d48=_0x152ac8[_0x425196(0x145)][0x0];if(!_0x159d48)throw CliErrors[_0x425196(0x175)](_0x425196(0x14c),_0x425196(0x14e)+CLI_BIN_NAME+_0x425196(0x13f));const _0x9c6a73=resolveWriteScope({'explicitGlobal':_0x152ac8[_0x425196(0x13c)](_0x425196(0x141)),'policy':_0x425196(0x150)}),_0x51b35c=toScopeFlags(_0x9c6a73),_0x4be5f5=readScopedConfig(_0x51b35c),_0x38ef7a=parseAliasDeleteKey(_0x159d48);if(_0x38ef7a){if(!deleteLocalAppAlias(_0x4be5f5,_0x38ef7a))throw CliErrors['validation'](_0x425196(0x135)+_0x159d48);return console[_0x425196(0x14a)](_0x425196(0x13b)+_0x159d48+'`'+(_0x9c6a73===_0x425196(0x141)?_0x425196(0x146):'')),writeScopedConfig(_0x4be5f5,_0x51b35c),{'ok':!![]};}if(_0x4be5f5[_0x159d48]===undefined)throw CliErrors['validation']('Key\x20\x22'+_0x159d48+_0x425196(0x15c));return delete _0x4be5f5[_0x159d48],console[_0x425196(0x14a)](_0x425196(0x13b)+_0x159d48+'`'+(_0x9c6a73===_0x425196(0x141)?_0x425196(0x146):'')),writeScopedConfig(_0x4be5f5,_0x51b35c),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x1bdf49=a22_0x1187;(function(_0x37290e,_0x310213){const _0x10e02a=a22_0x1187,_0x4904a1=_0x37290e();while(!![]){try{const _0xdcfc80=-parseInt(_0x10e02a(0xd0))/0x1*(parseInt(_0x10e02a(0xeb))/0x2)+-parseInt(_0x10e02a(0xde))/0x3+-parseInt(_0x10e02a(0xda))/0x4*(parseInt(_0x10e02a(0xfc))/0x5)+-parseInt(_0x10e02a(0xdc))/0x6*(parseInt(_0x10e02a(0xe9))/0x7)+-parseInt(_0x10e02a(0xf1))/0x8*(-parseInt(_0x10e02a(0xc6))/0x9)+parseInt(_0x10e02a(0xcf))/0xa+parseInt(_0x10e02a(0xe4))/0xb;if(_0xdcfc80===_0x310213)break;else _0x4904a1['push'](_0x4904a1['shift']());}catch(_0x2a5966){_0x4904a1['push'](_0x4904a1['shift']());}}}(a22_0x38e3,0x71428));function a22_0x38e3(){const _0x2e0be0=['keys','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','\x20\x20project:\x20','config','9GoPuiI','value','pageSize\x20must\x20be\x20a\x20positive\x20number','bool','list','Usage:\x20','\x20(global)','Get\x20a\x20config\x20value','write','1501750VhPJNF','137paypfo','\x20config\x20set\x20<key>\x20<value>\x20[--global]','../../context.js','Set\x20a\x20configuration\x20value','Key\x20already\x20absent:\x20','accessKey','Missing\x20key\x20argument.','validation','Top-level\x20key\x20\x22',';\x20apps.<alias>.appcode','694964KktNyB','args','3725988ezUxTI','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','2335566FrydrU','split','locale','length','Write\x20to\x20global\x20config','raw','30617983YkUGkM','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','get','project-or-global-explicit','apps','7TfHnzY','join','5854GPyXWS','\x22\x20is\x20not\x20settable.','isArray','stringify','includes','List\x20current\x20config','1596064eCiolS','Settable\x20keys:\x20','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Delete\x20a\x20configuration\x20value','global','\x20config\x20delete\x20<key>\x20[--global]','Missing\x20key\x20or\x20value.','object','Set\x20`','trim','Deleted\x20`','25lpeymk','Key\x20not\x20found:\x20','log','\x20\x20global:\x20\x20','key','read','(none)','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','field','\x22.\x20Allowed:\x20','appcode','pageSize'];a22_0x38e3=function(){return _0x2e0be0;};return a22_0x38e3();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';const GLOBAL_FLAG={'name':a22_0x1bdf49(0xf5),'type':'boolean','description':a22_0x1bdf49(0xe2),'default':![]};function parseAliasAppcodeSetKey(_0x1fd8c9){const _0xeeb1de=a22_0x1bdf49,_0x1ff39f=_0x1fd8c9[_0xeeb1de(0xdf)]('.');if(_0x1ff39f['length']!==0x3||_0x1ff39f[0x0]!=='apps'||_0x1ff39f[0x2]!==_0xeeb1de(0xc0))return undefined;const _0x4ccfc5=_0x1ff39f[0x1]?.[_0xeeb1de(0xfa)]();return _0x4ccfc5?_0x4ccfc5:undefined;}function a22_0x1187(_0x5324c7,_0x17a6f6){_0x5324c7=_0x5324c7-0xbc;const _0x38e35a=a22_0x38e3();let _0x118772=_0x38e35a[_0x5324c7];return _0x118772;}function parseAliasDeleteKey(_0x84ddb8){const _0x4a68e3=a22_0x1bdf49,_0x2c1949=_0x84ddb8['split']('.');if(_0x2c1949['length']===0x2&&_0x2c1949[0x0]===_0x4a68e3(0xe8)){const _0x2d3c99=_0x2c1949[0x1]?.[_0x4a68e3(0xfa)]();return _0x2d3c99?{'alias':_0x2d3c99}:undefined;}if(_0x2c1949[_0x4a68e3(0xe1)]===0x3&&_0x2c1949[0x0]===_0x4a68e3(0xe8)&&_0x2c1949[0x2]===_0x4a68e3(0xc0)){const _0x121042=_0x2c1949[0x1]?.[_0x4a68e3(0xfa)]();return _0x121042?{'alias':_0x121042,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x418dbd,_0x286a0f,_0x22ed56){const _0xac711c=a22_0x1bdf49,_0x482c5f=_0x418dbd['apps']&&typeof _0x418dbd[_0xac711c(0xe8)]===_0xac711c(0xf8)&&!Array['isArray'](_0x418dbd[_0xac711c(0xe8)])?_0x418dbd[_0xac711c(0xe8)]:{},_0x2ec6a2=_0x482c5f[_0x286a0f]&&typeof _0x482c5f[_0x286a0f]===_0xac711c(0xf8)&&!Array['isArray'](_0x482c5f[_0x286a0f])?_0x482c5f[_0x286a0f]:{};_0x2ec6a2[_0xac711c(0xc0)]=_0x22ed56,_0x482c5f[_0x286a0f]=_0x2ec6a2,_0x418dbd[_0xac711c(0xe8)]=_0x482c5f;}function deleteLocalAppAlias(_0x75b4af,_0x1926db){const _0x32c9f6=a22_0x1bdf49;if(!_0x75b4af['apps']||typeof _0x75b4af[_0x32c9f6(0xe8)]!==_0x32c9f6(0xf8)||Array[_0x32c9f6(0xed)](_0x75b4af[_0x32c9f6(0xe8)]))return![];const _0x4cea3d=_0x75b4af['apps'],_0x1d52b5=_0x4cea3d[_0x1926db['alias']];if(!_0x1d52b5||typeof _0x1d52b5!==_0x32c9f6(0xf8)||Array[_0x32c9f6(0xed)](_0x1d52b5))return![];if(!_0x1926db[_0x32c9f6(0xbe)])return delete _0x4cea3d[_0x1926db['alias']],!![];if(!(_0x1926db[_0x32c9f6(0xbe)]in _0x1d52b5))return![];return delete _0x1d52b5[_0x1926db[_0x32c9f6(0xbe)]],Object[_0x32c9f6(0xc2)](_0x1d52b5)[_0x32c9f6(0xe1)]===0x0&&delete _0x4cea3d[_0x1926db['alias']],!![];}const listDef={'service':a22_0x1bdf49(0xc5),'command':a22_0x1bdf49(0xca),'description':a22_0x1bdf49(0xf0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5efc8e){const _0x55d367=a22_0x1bdf49,{buildConfigFromFlags:_0x1fff9f}=await import(_0x55d367(0xd2)),_0x36a31e=_0x1fff9f({}),_0x398ae7=redactCliConfigCredentials(_0x36a31e[_0x55d367(0xe3)]),_0x521d84=getProjectConfigPath(),_0x32cc28=resolveWriteConfigPath('global');if(_0x5efc8e['format']==='pretty')return{'ok':!![],'message':_0x55d367(0xf3)+(JSON[_0x55d367(0xee)](_0x398ae7,null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x55d367(0xc4)+(_0x521d84??_0x55d367(0xbc))+'\x0a')+(_0x55d367(0xff)+_0x32cc28)};return{'ok':!![],'data':{'effective':_0x398ae7,'configFiles':{'project':_0x521d84??null,'global':_0x32cc28}}};}},getDef={'service':a22_0x1bdf49(0xc5),'command':a22_0x1bdf49(0xe6),'description':a22_0x1bdf49(0xcd),'risk':a22_0x1bdf49(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x1bdf49(0x100),'description':a22_0x1bdf49(0xe5),'required':!![]}],'flags':[],async 'execute'(_0x4a79e8){const _0x21197a=a22_0x1bdf49,_0x1f84ba=_0x4a79e8[_0x21197a(0xdb)][0x0];if(!_0x1f84ba)throw CliErrors[_0x21197a(0xd7)](_0x21197a(0xd6),_0x21197a(0xcb)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x3ae345}=await import(_0x21197a(0xd2)),{raw:_0x4c16e4}=_0x3ae345({});if(_0x1f84ba[_0x21197a(0xef)]('.')){const _0x2ab6f5=_0x1f84ba[_0x21197a(0xdf)]('.');let _0x5b7ce2=_0x4c16e4;for(const _0x89829e of _0x2ab6f5){if(_0x5b7ce2==null||typeof _0x5b7ce2!==_0x21197a(0xf8))throw CliErrors[_0x21197a(0xd7)]('Key\x20not\x20found:\x20'+_0x1f84ba);_0x5b7ce2=_0x5b7ce2[_0x89829e];}if(_0x5b7ce2===undefined)throw CliErrors[_0x21197a(0xd7)](_0x21197a(0xfd)+_0x1f84ba);const _0x1faeed=redactCliConfigValue(_0x1f84ba,_0x5b7ce2);return console[_0x21197a(0xfe)](typeof _0x1faeed===_0x21197a(0xf8)?JSON[_0x21197a(0xee)](_0x1faeed,null,0x2):String(_0x1faeed)),{'ok':!![]};}const _0x2d0979=_0x4c16e4[_0x1f84ba];if(_0x2d0979===undefined)throw CliErrors[_0x21197a(0xd7)](_0x21197a(0xfd)+_0x1f84ba);const _0x7e93b4=redactCliConfigValue(_0x1f84ba,_0x2d0979);return console['log'](typeof _0x7e93b4===_0x21197a(0xf8)?JSON['stringify'](_0x7e93b4,null,0x2):String(_0x7e93b4)),{'ok':!![]};}},setDef={'service':a22_0x1bdf49(0xc5),'command':'set','description':a22_0x1bdf49(0xd3),'risk':a22_0x1bdf49(0xce),'confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x1bdf49(0x100),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x1bdf49(0xc7),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x525267){const _0x79dba3=a22_0x1bdf49,_0x4fe762=_0x525267[_0x79dba3(0xdb)][0x0],_0x28c6fe=_0x525267[_0x79dba3(0xdb)][0x1];if(!_0x4fe762||_0x28c6fe===undefined)throw CliErrors[_0x79dba3(0xd7)](_0x79dba3(0xf7),_0x79dba3(0xcb)+CLI_BIN_NAME+_0x79dba3(0xd1));if(ENUM_KEYS[_0x4fe762]&&!ENUM_KEYS[_0x4fe762][_0x79dba3(0xef)](_0x28c6fe))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x4fe762+_0x79dba3(0xbf)+ENUM_KEYS[_0x4fe762][_0x79dba3(0xea)](',\x20'));if(isCliProtectedConfigKey(_0x4fe762))throw CliErrors['validation']('\x22'+_0x4fe762+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0x4fe762==='pageSize'){const _0x270604=Number(_0x28c6fe);if(isNaN(_0x270604)||_0x270604<=0x0)throw CliErrors[_0x79dba3(0xd7)](_0x79dba3(0xc8));}const _0x1e757e=resolveWriteScope({'explicitGlobal':_0x525267[_0x79dba3(0xc9)](_0x79dba3(0xf5)),'policy':_0x79dba3(0xe7)}),_0x6755c2=toScopeFlags(_0x1e757e),_0x4e96b9=readScopedConfig(_0x6755c2),_0x7daa73=parseAliasAppcodeSetKey(_0x4fe762);if(!_0x7daa73&&!isTopLevelConfigKey(_0x4fe762))throw CliErrors[_0x79dba3(0xd7)](_0x79dba3(0xd8)+_0x4fe762+_0x79dba3(0xec),_0x79dba3(0xf2)+getTopLevelConfigKeySummary()+_0x79dba3(0xd9));if(_0x7daa73)setLocalAppAlias(_0x4e96b9,_0x7daa73,_0x28c6fe);else{if(_0x4fe762===_0x79dba3(0xe0)){const _0x7112ab=normalizeLocale(_0x28c6fe);if(!_0x7112ab)throw CliErrors['validation']('Invalid\x20locale\x20value.',_0x79dba3(0xdd));_0x4e96b9[_0x79dba3(0xe0)]=_0x7112ab;}else _0x4e96b9[_0x4fe762]=_0x4fe762===_0x79dba3(0xc1)?Number(_0x28c6fe):DOMAIN_CONFIG_FIELDS['includes'](_0x4fe762)?normalizeDomainOrigin(_0x4fe762,_0x28c6fe):_0x28c6fe;}const _0x27b4d9=_0x4fe762===_0x79dba3(0xd5)?maskCliAccessKey(_0x28c6fe):!_0x7daa73&&_0x4fe762===_0x79dba3(0xe0)?String(_0x4e96b9['locale']):_0x28c6fe;return console[_0x79dba3(0xfe)](_0x79dba3(0xf9)+_0x4fe762+'`\x20=\x20\x22'+_0x27b4d9+'\x22'+(_0x1e757e===_0x79dba3(0xf5)?_0x79dba3(0xcc):'')),writeScopedConfig(_0x4e96b9,_0x6755c2),{'ok':!![]};}},deleteDef={'service':a22_0x1bdf49(0xc5),'command':'delete','description':a22_0x1bdf49(0xf4),'risk':'write','confirmationDescription':a22_0x1bdf49(0xbd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x239628){const _0x234ed7=a22_0x1bdf49,_0x14f764=_0x239628[_0x234ed7(0xdb)][0x0];if(!_0x14f764)throw CliErrors[_0x234ed7(0xd7)](_0x234ed7(0xd6),_0x234ed7(0xcb)+CLI_BIN_NAME+_0x234ed7(0xf6));if(isCliProtectedConfigKey(_0x14f764))throw CliErrors[_0x234ed7(0xd7)]('\x22'+_0x14f764+_0x234ed7(0xc3));const _0x612674=resolveWriteScope({'explicitGlobal':_0x239628['bool'](_0x234ed7(0xf5)),'policy':_0x234ed7(0xe7)}),_0x3edf86=toScopeFlags(_0x612674),_0x1a3ec4=readScopedConfig(_0x3edf86),_0x2ec7f4=parseAliasDeleteKey(_0x14f764);if(_0x2ec7f4){if(!deleteLocalAppAlias(_0x1a3ec4,_0x2ec7f4))return console[_0x234ed7(0xfe)](_0x234ed7(0xd4)+_0x14f764+(_0x612674===_0x234ed7(0xf5)?_0x234ed7(0xcc):'')),{'ok':!![],'data':{'key':_0x14f764,'scope':_0x612674,'changed':![]}};return console['log'](_0x234ed7(0xfb)+_0x14f764+'`'+(_0x612674==='global'?_0x234ed7(0xcc):'')),writeScopedConfig(_0x1a3ec4,_0x3edf86),{'ok':!![],'data':{'key':_0x14f764,'scope':_0x612674,'changed':!![]}};}if(_0x1a3ec4[_0x14f764]===undefined)return console[_0x234ed7(0xfe)]('Key\x20already\x20absent:\x20'+_0x14f764+(_0x612674==='global'?_0x234ed7(0xcc):'')),{'ok':!![],'data':{'key':_0x14f764,'scope':_0x612674,'changed':![]}};return delete _0x1a3ec4[_0x14f764],console[_0x234ed7(0xfe)](_0x234ed7(0xfb)+_0x14f764+'`'+(_0x612674===_0x234ed7(0xf5)?'\x20(global)':'')),writeScopedConfig(_0x1a3ec4,_0x3edf86),{'ok':!![],'data':{'key':_0x14f764,'scope':_0x612674,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CommandDefinition, FlagDef, RuntimeContext } from "../../framework/types.js";
|
|
2
|
+
export declare const configInitFlags: FlagDef[];
|
|
3
|
+
export declare function executeConfigInit(ctx: RuntimeContext): Promise<{
|
|
4
|
+
ok: boolean;
|
|
5
|
+
message: string;
|
|
6
|
+
data: {
|
|
7
|
+
mode: string;
|
|
8
|
+
region: "global" | "id" | "cn" | null;
|
|
9
|
+
domains: Partial<Record<"userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "apiDomain", string>>;
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
export declare const configInitDefinition: CommandDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a23_0x35994a=a23_0x1bc0;(function(_0x3548d3,_0x3d803d){const _0xa87118=a23_0x1bc0,_0x22bf1d=_0x3548d3();while(!![]){try{const _0x41000e=-parseInt(_0xa87118(0x13d))/0x1*(-parseInt(_0xa87118(0x131))/0x2)+-parseInt(_0xa87118(0x13c))/0x3+-parseInt(_0xa87118(0x144))/0x4+-parseInt(_0xa87118(0x13e))/0x5+parseInt(_0xa87118(0x141))/0x6*(parseInt(_0xa87118(0x152))/0x7)+parseInt(_0xa87118(0x13b))/0x8+parseInt(_0xa87118(0x145))/0x9*(parseInt(_0xa87118(0x14b))/0xa);if(_0x41000e===_0x3d803d)break;else _0x22bf1d['push'](_0x22bf1d['shift']());}catch(_0x3691e1){_0x22bf1d['push'](_0x22bf1d['shift']());}}}(a23_0x4f78,0x71b84));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainFlags}from'../../config/domain-config.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';const domainFlags=[{'name':'domain-config','type':a23_0x35994a(0x149),'description':a23_0x35994a(0x148)},{'name':'user-domain','type':a23_0x35994a(0x149),'description':a23_0x35994a(0x14f)},{'name':a23_0x35994a(0x154),'type':a23_0x35994a(0x149),'description':a23_0x35994a(0x132)},{'name':a23_0x35994a(0x14e),'type':a23_0x35994a(0x149),'description':a23_0x35994a(0x13a)},{'name':a23_0x35994a(0x138),'type':'string','description':a23_0x35994a(0x13f)},{'name':a23_0x35994a(0x142),'type':a23_0x35994a(0x149),'description':'Custom\x20knowledge-base\x20HTTPS\x20origin'}];export const configInitFlags=[{'name':'region','type':a23_0x35994a(0x149),'description':a23_0x35994a(0x130),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];function a23_0x1bc0(_0x3789da,_0x2654e1){_0x3789da=_0x3789da-0x12e;const _0x4f789a=a23_0x4f78();let _0x1bc091=_0x4f789a[_0x3789da];return _0x1bc091;}function a23_0x4f78(){const _0x31cd79=['2716640Qbfmap','12411EHZavh','validation','str','Independent-deployment\x20Domain\x20JSON\x20file','string','independent','3630saquqm','official','ExitPromptError','runtime-domain','Custom\x20User\x20HTTPS\x20origin','assign','name','7DnDLxs','region','api-domain','join','Indonesia\x20(id)','length','Official\x20Lovrabet\x20region:\x20cn\x20or\x20id','2810ocKkEg','Custom\x20platform\x20API\x20HTTPS\x20origin','Mainland\x20China\x20(cn)','write','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','skill-domain','nonInteractive','Custom\x20Runtime\x20HTTPS\x20origin','3702840Hvxuma','2039124HtoWet','409hUlGbC','2266780xolWbK','Custom\x20SkillHub\x20HTTPS\x20origin','keys','4439658msgTXA','kb-domain','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'];a23_0x4f78=function(){return _0x31cd79;};return a23_0x4f78();}async function resolveRegion(_0x39b050){const _0x2a634f=a23_0x35994a,_0x48431a=_0x39b050[_0x2a634f(0x147)]('region');if(_0x48431a){if(!isEnabledLovrabetRegion(_0x48431a))throw CliErrors[_0x2a634f(0x146)]('Region\x20\x22'+_0x48431a+'\x22\x20is\x20not\x20currently\x20available.','Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x48431a;}if(_0x39b050[_0x2a634f(0x139)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':[{'name':_0x2a634f(0x133),'value':'cn'},{'name':_0x2a634f(0x12e),'value':'id'}]});}catch(_0x1c1359){if(_0x1c1359?.[_0x2a634f(0x151)]===_0x2a634f(0x14d))throw CliErrors['cancelled']();throw _0x1c1359;}}export async function executeConfigInit(_0x14cfee){const _0x492277=a23_0x35994a,_0x110159=resolveDomainFlags(_0x14cfee),_0x2b650b=Object[_0x492277(0x140)](_0x110159)[_0x492277(0x12f)]>0x0;if(_0x2b650b&&_0x14cfee[_0x492277(0x147)](_0x492277(0x153)))throw CliErrors[_0x492277(0x146)](_0x492277(0x137));const _0x1c79b1=readScopedConfig({'global':!![]});for(const _0x126769 of DOMAIN_CONFIG_FIELDS)delete _0x1c79b1[_0x126769];for(const _0x1b7acd of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x1c79b1[_0x1b7acd];let _0x3f6aa3=null;if(_0x2b650b)delete _0x1c79b1[_0x492277(0x153)],Object[_0x492277(0x150)](_0x1c79b1,_0x110159);else{_0x3f6aa3=await resolveRegion(_0x14cfee);if(_0x3f6aa3===DEFAULT_LOVRABET_REGION)delete _0x1c79b1[_0x492277(0x153)];else _0x1c79b1[_0x492277(0x153)]=_0x3f6aa3;}return writeScopedConfig(_0x1c79b1,{'global':!![]}),{'ok':!![],'message':_0x2b650b?_0x492277(0x143)+Object[_0x492277(0x140)](_0x110159)[_0x492277(0x155)](',\x20')+'.':_0x492277(0x136)+_0x3f6aa3+'.','data':{'mode':_0x2b650b?_0x492277(0x14a):_0x492277(0x14c),'region':_0x3f6aa3,'domains':_0x110159}};}export const configInitDefinition={'service':'config','command':'init','description':a23_0x35994a(0x135),'risk':a23_0x35994a(0x134),'confirmationDescription':'Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
import { CLI_BIN_NAME } from "../../constant/cli.js";
|
|
15
15
|
export { CLI_BIN_NAME };
|
|
16
16
|
export { readScopedConfig, writeScopedConfig } from "../../context.js";
|
|
17
|
-
export { resolveConfigScope as resolveWriteScope, TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS, CONFIG_ENUM_VALUES as ENUM_KEYS, getConfigCommandKeyDescription, getTopLevelConfigKeyList, getTopLevelConfigKeySummary, isTopLevelConfigKey, toScopeFlags, } from "../../commands/common/config-policy.js";
|
|
17
|
+
export { resolveConfigScope as resolveWriteScope, TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS, CONFIG_ENUM_VALUES as ENUM_KEYS, getConfigCommandKeyDescription, getTopLevelConfigKeyList, getTopLevelConfigKeySummary, isCliProtectedConfigKey, isTopLevelConfigKey, normalizeLocale, toScopeFlags, } from "../../commands/common/config-policy.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5423a7,_0x540eca){var _0x596178=a24_0x56e5,_0x4d7c9d=_0x5423a7();while(!![]){try{var _0xd6637d=-parseInt(_0x596178(0x74))/0x1+-parseInt(_0x596178(0x6f))/0x2*(parseInt(_0x596178(0x71))/0x3)+parseInt(_0x596178(0x6e))/0x4+parseInt(_0x596178(0x70))/0x5*(parseInt(_0x596178(0x73))/0x6)+parseInt(_0x596178(0x72))/0x7*(-parseInt(_0x596178(0x75))/0x8)+-parseInt(_0x596178(0x6d))/0x9+parseInt(_0x596178(0x76))/0xa;if(_0xd6637d===_0x540eca)break;else _0x4d7c9d['push'](_0x4d7c9d['shift']());}catch(_0x2b4548){_0x4d7c9d['push'](_0x4d7c9d['shift']());}}}(a24_0x138f,0xca015));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a24_0x56e5(_0x44c10c,_0x22a375){_0x44c10c=_0x44c10c-0x6d;var _0x138fd3=a24_0x138f();var _0x56e583=_0x138fd3[_0x44c10c];return _0x56e583;}export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';function a24_0x138f(){var _0x2f7861=['8vFFdGg','37519110adgKjA','1922724jbqwiA','1240536pGkDBv','66hUVlJb','2943110viPYLy','144516hQceFm','7461398zoHyJH','6UTcsby','954028HadHrP'];a24_0x138f=function(){return _0x2f7861;};return a24_0x138f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a24_0x1759de=a24_0x1053;(function(_0x136368,_0x3b0111){const _0x14a0d0=a24_0x1053,_0x4a8e5b=_0x136368();while(!![]){try{const _0x311b90=-parseInt(_0x14a0d0(0x1b4))/0x1*(-parseInt(_0x14a0d0(0x19d))/0x2)+-parseInt(_0x14a0d0(0x17c))/0x3*(parseInt(_0x14a0d0(0x198))/0x4)+parseInt(_0x14a0d0(0x1c8))/0x5*(-parseInt(_0x14a0d0(0x17a))/0x6)+-parseInt(_0x14a0d0(0x180))/0x7*(-parseInt(_0x14a0d0(0x1cc))/0x8)+-parseInt(_0x14a0d0(0x1c2))/0x9*(-parseInt(_0x14a0d0(0x1db))/0xa)+-parseInt(_0x14a0d0(0x196))/0xb+parseInt(_0x14a0d0(0x1ba))/0xc*(parseInt(_0x14a0d0(0x1ad))/0xd);if(_0x311b90===_0x3b0111)break;else _0x4a8e5b['push'](_0x4a8e5b['shift']());}catch(_0x5a30e9){_0x4a8e5b['push'](_0x4a8e5b['shift']());}}}(a24_0x56b9,0xa8436));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a24_0x1053(_0x41fc02,_0x3ced6d){_0x41fc02=_0x41fc02-0x179;const _0x56b968=a24_0x56b9();let _0x1053c9=_0x56b968[_0x41fc02];return _0x1053c9;}import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';function a24_0x56b9(){const _0x17ae51=['\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','risk','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','4270747GueQKn','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','31DscVbP','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','36EYSuMF','\x20\x20EXAMPLES','write','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20AGGREGATE\x20TYPES','filter','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','9TqCgkF','confirmationDescription','\x20on\x20dataset\x20','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','5DJKfhW','update','batchCreate','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','12752dTXpAv','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','operation','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','paramsRequired','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','删除数据记录(非交互模式需传入\x20--yes)','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Preview:\x20data\x20','delete','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','通过一次请求在数据集中批量创建多条记录','command','9160490aoXgEr','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','7140366cARMaM','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','1214931sPkKoW','create','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','description','4165arpjgY','length','code','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','read','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','data','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','更新已有数据记录','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','params','batch','now','aggregate','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','str','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','删除当前应用数据集中的业务记录;该操作可能无法恢复。','13256155tWziTc','修改当前应用数据集中的已有业务记录;确认后新值将立即保存。','4pRWNrG','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','paramsHint','\x20\x20LOGICAL\x20COMBINATORS','41246gWeemI','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','map','向当前应用的数据集写入一条新业务记录;确认后将立即保存。','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','join','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'];a24_0x56b9=function(){return _0x17ae51;};return a24_0x56b9();}const specs=[{'command':a24_0x1759de(0x1c0),'operation':a24_0x1759de(0x1c0),'risk':a24_0x1759de(0x184),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a24_0x1759de(0x1bd),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a24_0x1759de(0x1d2),a24_0x1759de(0x19a),a24_0x1759de(0x183),a24_0x1759de(0x1d0),a24_0x1759de(0x186),a24_0x1759de(0x1c5),a24_0x1759de(0x1c1),a24_0x1759de(0x19f),a24_0x1759de(0x19e),a24_0x1759de(0x189),'',a24_0x1759de(0x19c),a24_0x1759de(0x1cb),a24_0x1759de(0x194),'',a24_0x1759de(0x1ac),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a24_0x1759de(0x1b9),a24_0x1759de(0x1b1),'','\x20\x20PAGINATION',a24_0x1759de(0x188),a24_0x1759de(0x1a7),a24_0x1759de(0x1d8),a24_0x1759de(0x1a3),a24_0x1759de(0x1d5),a24_0x1759de(0x1ab),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a24_0x1759de(0x1a4)]('\x0a')},{'command':'getOne','operation':'getOne','risk':a24_0x1759de(0x184),'paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a24_0x1759de(0x190)},{'command':a24_0x1759de(0x17d),'operation':a24_0x1759de(0x17d),'risk':a24_0x1759de(0x1bc),'paramsRequired':!![],'description':'在数据集中创建一条记录','confirmationDescription':a24_0x1759de(0x1a1),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':a24_0x1759de(0x1ca),'operation':a24_0x1759de(0x1ca),'risk':a24_0x1759de(0x1bc),'paramsRequired':!![],'description':a24_0x1759de(0x1d9),'confirmationDescription':'向当前应用的数据集批量写入多条新业务记录;确认后将立即保存。','paramsHint':a24_0x1759de(0x1a5)},{'command':a24_0x1759de(0x1c9),'operation':a24_0x1759de(0x1c9),'risk':a24_0x1759de(0x1bc),'paramsRequired':!![],'description':a24_0x1759de(0x18a),'confirmationDescription':a24_0x1759de(0x197),'paramsHint':a24_0x1759de(0x1aa)+a24_0x1759de(0x17e)},{'command':a24_0x1759de(0x1d7),'operation':a24_0x1759de(0x1d7),'risk':'high-risk-write','paramsRequired':!![],'description':a24_0x1759de(0x1d4),'confirmationDescription':a24_0x1759de(0x195),'paramsHint':a24_0x1759de(0x190)},{'command':a24_0x1759de(0x18f),'operation':'aggregate','risk':a24_0x1759de(0x184),'paramsRequired':![],'description':a24_0x1759de(0x18b),'paramsHint':a24_0x1759de(0x1d3)+a24_0x1759de(0x1b5),'helpExtra':[a24_0x1759de(0x1bf),a24_0x1759de(0x1c7),a24_0x1759de(0x185),a24_0x1759de(0x179),a24_0x1759de(0x193),a24_0x1759de(0x1b2),a24_0x1759de(0x1cd),'\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a24_0x1759de(0x1b8),a24_0x1759de(0x192),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)',a24_0x1759de(0x1b6),a24_0x1759de(0x1b7),a24_0x1759de(0x1b0),a24_0x1759de(0x1ce),'','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY',a24_0x1759de(0x1b3),a24_0x1759de(0x1a6),a24_0x1759de(0x1c6),'','\x20\x20DATASET\x20BOUNDARY',a24_0x1759de(0x17b),a24_0x1759de(0x1a2),'\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL',a24_0x1759de(0x1ae),'',a24_0x1759de(0x1bb),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a24_0x1759de(0x1af),'',a24_0x1759de(0x1a9),a24_0x1759de(0x1be),'',a24_0x1759de(0x199)][a24_0x1759de(0x1a4)]('\x0a')}];function makeDataCommand(_0x19ca4b){const _0x4ec869=a24_0x1759de,_0x2169ff='data\x20'+_0x19ca4b[_0x4ec869(0x1da)],_0x5bd7bd={'service':_0x4ec869(0x187),'command':_0x19ca4b[_0x4ec869(0x1da)],'description':_0x19ca4b[_0x4ec869(0x17f)],'risk':_0x19ca4b[_0x4ec869(0x1a8)],..._0x19ca4b[_0x4ec869(0x1c3)]?{'confirmationDescription':_0x19ca4b['confirmationDescription']}:{},'helpExtra':_0x19ca4b['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x19ca4b[_0x4ec869(0x19b)]}],'validate':async _0x1e5ab0=>{const _0x2621db=_0x4ec869;_0x19ca4b[_0x2621db(0x1d1)]&&requireAnyOf(_0x1e5ab0,['params'],_0x2169ff),_0x19ca4b['operation']===_0x2621db(0x1ca)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1e5ab0[_0x2621db(0x191)](_0x2621db(0x18c)))),_0x19ca4b[_0x2621db(0x1cf)]===_0x2621db(0x1c9)&&parseUpdateIdsFromParams(parseJsonParams(_0x1e5ab0['str']('params'))??{});},async 'execute'(_0x1127e0){const _0x2ab892=_0x4ec869,_0x4148db=_0x1127e0[_0x2ab892(0x191)](_0x2ab892(0x182)),_0x505194=_0x19ca4b['operation']===_0x2ab892(0x1ca)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1127e0[_0x2ab892(0x191)](_0x2ab892(0x18c)))):parseJsonParams(_0x1127e0['str'](_0x2ab892(0x18c)))??{},_0x4b3f12=_0x19ca4b[_0x2ab892(0x1cf)]===_0x2ab892(0x1c9)?parseUpdateIdsFromParams(_0x505194):undefined,_0x4e535b=_0x4b3f12?normalizeUpdateParamsForRuntime(_0x505194,_0x4b3f12):_0x505194,_0x20aceb=Date[_0x2ab892(0x18e)](),_0x4f3e87=await executeData(_0x4148db,_0x19ca4b['operation'],_0x4e535b),_0x561b10=Date['now']()-_0x20aceb,_0x25686d=_0x4b3f12&&_0x4b3f12[_0x2ab892(0x181)]>0x1?buildBatchUpdateResult(_0x4b3f12,_0x4f3e87):_0x4f3e87;return{'ok':!![],'data':{'result':_0x25686d,'elapsed':_0x561b10},'message':'data\x20'+_0x19ca4b[_0x2ab892(0x1da)]+'\x20completed\x20in\x20'+_0x561b10+'ms'};}};return _0x19ca4b[_0x4ec869(0x1a8)]!==_0x4ec869(0x184)&&(_0x5bd7bd['dryRun']=async _0x561dcd=>{const _0xf71f4b=_0x4ec869,_0x422460=_0x561dcd['str'](_0xf71f4b(0x182)),_0x3e2fd4=_0x19ca4b[_0xf71f4b(0x1cf)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x561dcd[_0xf71f4b(0x191)](_0xf71f4b(0x18c)))):parseJsonParams(_0x561dcd[_0xf71f4b(0x191)](_0xf71f4b(0x18c)))??{};let _0x5a9df7=_0x3e2fd4;if(_0x19ca4b['operation']===_0xf71f4b(0x1c9)){const _0xad84ae=parseUpdateIdsFromParams(_0x3e2fd4);_0x5a9df7=normalizeUpdateParamsForRuntime(_0x3e2fd4,_0xad84ae);}return dryRun('POST','/api/{appCode}/'+_0x422460+'/'+_0x19ca4b[_0xf71f4b(0x1cf)])['body'](_0x5a9df7)[_0xf71f4b(0x17f)](_0xf71f4b(0x1d6)+_0x19ca4b[_0xf71f4b(0x1da)]+_0xf71f4b(0x1c4)+_0x422460)['build']();}),_0x5bd7bd;}export const dataDefinitions=specs[a24_0x1759de(0x1a0)](makeDataCommand);function buildBatchUpdateResult(_0x43f098,_0x32f909){const _0x46ed78=a24_0x1759de;return{'operation':_0x46ed78(0x1c9),'mode':_0x46ed78(0x18d),'ids':_0x43f098,'total':_0x43f098['length'],'result':_0x32f909};}
|
|
1
|
+
const a25_0xbb6373=a25_0x5d87;function a25_0x31dd(){const _0x109ee1=['1314408ABpozo','helpExtra','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','Filter\x20dataset\x20records\x20with\x20query\x20conditions','2895005LGtLuO','865749rcmlJJ','command','54BJenMK','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\x20\x20PAGINATION','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','batchCreate','confirmationDescription','Update\x20an\x20existing\x20data\x20record','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','dryRun','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','\x20\x20AGGREGATE\x20TYPES','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','data\x20','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','high-risk-write','code','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','paramsRequired','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','Create\x20one\x20record\x20in\x20the\x20dataset','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','create','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','map','Get\x20a\x20single\x20record\x20by\x20ID','paramsHint','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20completed\x20in\x20','3375896YjjdhZ','str','219758IGgMDS','\x20\x20PARAMS\x20STRUCTURE','filter','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','getOne','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','description','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','aggregate','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','4BycYEM','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','48PkkCjL','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','risk','77ZQFoLc','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','1282pmjTwp','read','\x20\x20EXAMPLES','Preview:\x20data\x20','353DqLubi','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20on\x20dataset\x20','write','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','join','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','params','/api/{appCode}/','delete','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20LOGICAL\x20COMBINATORS','now','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','update','body','359060kAKaAv','POST','build','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','operation','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}'];a25_0x31dd=function(){return _0x109ee1;};return a25_0x31dd();}(function(_0xe2b99f,_0x5283d9){const _0xb9ef5=a25_0x5d87,_0x47f121=_0xe2b99f();while(!![]){try{const _0x4e1e4c=parseInt(_0xb9ef5(0xac))/0x1*(-parseInt(_0xb9ef5(0xa8))/0x2)+-parseInt(_0xb9ef5(0xcd))/0x3*(-parseInt(_0xb9ef5(0x9f))/0x4)+parseInt(_0xb9ef5(0xcc))/0x5+-parseInt(_0xb9ef5(0xa2))/0x6*(-parseInt(_0xb9ef5(0xf8))/0x7)+parseInt(_0xb9ef5(0xf6))/0x8+-parseInt(_0xb9ef5(0xcf))/0x9*(parseInt(_0xb9ef5(0xc1))/0xa)+parseInt(_0xb9ef5(0xa6))/0xb*(-parseInt(_0xb9ef5(0xc8))/0xc);if(_0x4e1e4c===_0x5283d9)break;else _0x47f121['push'](_0x47f121['shift']());}catch(_0x2d6e1d){_0x47f121['push'](_0x47f121['shift']());}}}(a25_0x31dd,0x511f4));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';function a25_0x5d87(_0x2d9601,_0x3771dc){_0x2d9601=_0x2d9601-0x9a;const _0x31dd4f=a25_0x31dd();let _0x5d8761=_0x31dd4f[_0x2d9601];return _0x5d8761;}import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a25_0xbb6373(0xfa),'operation':a25_0xbb6373(0xfa),'risk':a25_0xbb6373(0xa9),'paramsRequired':![],'description':a25_0xbb6373(0xcb),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a25_0xbb6373(0xa3),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a25_0xbb6373(0x102),a25_0xbb6373(0xed),a25_0xbb6373(0xb8),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a25_0xbb6373(0xca),a25_0xbb6373(0x9a),'\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}',a25_0xbb6373(0x101),'',a25_0xbb6373(0xbb),a25_0xbb6373(0xeb),a25_0xbb6373(0xa4),'',a25_0xbb6373(0xd0),a25_0xbb6373(0xb9),a25_0xbb6373(0xdd),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a25_0xbb6373(0xa0),a25_0xbb6373(0xf4),'',a25_0xbb6373(0xd3),a25_0xbb6373(0xa1),a25_0xbb6373(0xb4),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a25_0xbb6373(0xbe),a25_0xbb6373(0xe0),a25_0xbb6373(0xde),a25_0xbb6373(0xb3)]['join']('\x0a')},{'command':a25_0xbb6373(0x100),'operation':'getOne','risk':a25_0xbb6373(0xa9),'paramsRequired':!![],'description':a25_0xbb6373(0xf2),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a25_0xbb6373(0xee),'operation':'create','risk':a25_0xbb6373(0xaf),'paramsRequired':!![],'description':a25_0xbb6373(0xe9),'confirmationDescription':a25_0xbb6373(0xe8),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':a25_0xbb6373(0xd5),'operation':a25_0xbb6373(0xd5),'risk':a25_0xbb6373(0xaf),'paramsRequired':!![],'description':a25_0xbb6373(0xc4),'confirmationDescription':a25_0xbb6373(0xba),'paramsHint':a25_0xbb6373(0xe5)},{'command':'update','operation':'update','risk':a25_0xbb6373(0xaf),'paramsRequired':!![],'description':a25_0xbb6373(0xd7),'confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a25_0xbb6373(0xd1)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':'delete','operation':a25_0xbb6373(0xb7),'risk':a25_0xbb6373(0xe3),'paramsRequired':!![],'description':a25_0xbb6373(0xd2),'confirmationDescription':a25_0xbb6373(0xdc),'paramsHint':a25_0xbb6373(0xc6)},{'command':a25_0xbb6373(0x9d),'operation':a25_0xbb6373(0x9d),'risk':'read','paramsRequired':![],'description':a25_0xbb6373(0xad),'paramsHint':a25_0xbb6373(0xd4)+a25_0xbb6373(0xb0),'helpExtra':[a25_0xbb6373(0xdb),a25_0xbb6373(0xe6),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}',a25_0xbb6373(0xfb),a25_0xbb6373(0xd8),a25_0xbb6373(0xfe),a25_0xbb6373(0xc7),a25_0xbb6373(0xb2),'',a25_0xbb6373(0xf9),a25_0xbb6373(0xef),a25_0xbb6373(0xe1),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)',a25_0xbb6373(0xfc),a25_0xbb6373(0xec),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only',a25_0xbb6373(0xe2),a25_0xbb6373(0xf0),'',a25_0xbb6373(0xea),a25_0xbb6373(0xbd),a25_0xbb6373(0xfd),a25_0xbb6373(0x9e),a25_0xbb6373(0xda),'',a25_0xbb6373(0xaa),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a25_0xbb6373(0x9c),'',a25_0xbb6373(0xff),a25_0xbb6373(0xa7),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a25_0xbb6373(0xb1)]('\x0a')}];function makeDataCommand(_0x5983c8){const _0x79009d=a25_0xbb6373,_0x1c37f0=_0x79009d(0xdf)+_0x5983c8[_0x79009d(0xce)],_0x334850={'service':'data','command':_0x5983c8[_0x79009d(0xce)],'description':_0x5983c8[_0x79009d(0x9b)],'risk':_0x5983c8[_0x79009d(0xa5)],..._0x5983c8[_0x79009d(0xd6)]?{'confirmationDescription':_0x5983c8[_0x79009d(0xd6)]}:{},'helpExtra':_0x5983c8[_0x79009d(0xc9)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5983c8[_0x79009d(0xf3)]}],'validate':async _0x12eb7c=>{const _0x4c2364=_0x79009d;_0x5983c8[_0x4c2364(0xe7)]&&requireAnyOf(_0x12eb7c,[_0x4c2364(0xb5)],_0x1c37f0),_0x5983c8[_0x4c2364(0xc5)]===_0x4c2364(0xd5)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x12eb7c[_0x4c2364(0xf7)](_0x4c2364(0xb5)))),_0x5983c8[_0x4c2364(0xc5)]==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x12eb7c[_0x4c2364(0xf7)](_0x4c2364(0xb5)))??{});},async 'execute'(_0xb74a3b){const _0x26f550=_0x79009d,_0x397b56=_0xb74a3b[_0x26f550(0xf7)]('code'),_0x29a3e3=_0x5983c8[_0x26f550(0xc5)]===_0x26f550(0xd5)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xb74a3b[_0x26f550(0xf7)](_0x26f550(0xb5)))):parseJsonParams(_0xb74a3b['str'](_0x26f550(0xb5)))??{},_0x2927ab=_0x5983c8[_0x26f550(0xc5)]==='update'?parseUpdateIdsFromParams(_0x29a3e3):undefined,_0x58722a=_0x2927ab?normalizeUpdateParamsForRuntime(_0x29a3e3,_0x2927ab):_0x29a3e3,_0x29e294=Date[_0x26f550(0xbc)](),_0x2dc561=await executeData(_0x397b56,_0x5983c8[_0x26f550(0xc5)],_0x58722a),_0x46c90c=Date[_0x26f550(0xbc)]()-_0x29e294,_0x2eb661=_0x2927ab&&_0x2927ab['length']>0x1?buildBatchUpdateResult(_0x2927ab,_0x2dc561):_0x2dc561;return{'ok':!![],'data':{'result':_0x2eb661,'elapsed':_0x46c90c},'message':_0x26f550(0xdf)+_0x5983c8[_0x26f550(0xce)]+_0x26f550(0xf5)+_0x46c90c+'ms'};}};return _0x5983c8[_0x79009d(0xa5)]!==_0x79009d(0xa9)&&(_0x334850[_0x79009d(0xd9)]=async _0x442e7f=>{const _0x2ec994=_0x79009d,_0x236b0f=_0x442e7f[_0x2ec994(0xf7)](_0x2ec994(0xe4)),_0x1dbe67=_0x5983c8[_0x2ec994(0xc5)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x442e7f[_0x2ec994(0xf7)](_0x2ec994(0xb5)))):parseJsonParams(_0x442e7f[_0x2ec994(0xf7)](_0x2ec994(0xb5)))??{};let _0x47bf45=_0x1dbe67;if(_0x5983c8[_0x2ec994(0xc5)]===_0x2ec994(0xbf)){const _0x3ff3f4=parseUpdateIdsFromParams(_0x1dbe67);_0x47bf45=normalizeUpdateParamsForRuntime(_0x1dbe67,_0x3ff3f4);}return dryRun(_0x2ec994(0xc2),_0x2ec994(0xb6)+_0x236b0f+'/'+_0x5983c8[_0x2ec994(0xc5)])[_0x2ec994(0xc0)](_0x47bf45)[_0x2ec994(0x9b)](_0x2ec994(0xab)+_0x5983c8['command']+_0x2ec994(0xae)+_0x236b0f)[_0x2ec994(0xc3)]();}),_0x334850;}export const dataDefinitions=specs[a25_0xbb6373(0xf1)](makeDataCommand);function buildBatchUpdateResult(_0xcc3ff,_0x142eaa){const _0x5be1a2=a25_0xbb6373;return{'operation':_0x5be1a2(0xbf),'mode':'batch','ids':_0xcc3ff,'total':_0xcc3ff['length'],'result':_0x142eaa};}
|