@lovrabet/lovrabet-cli 2.3.1-beta.4 → 2.3.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.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.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/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.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/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.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- 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.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x197b88=a12_0x43e2;(function(_0x1aa9e2,_0x1477be){const _0x4f7601=a12_0x43e2,_0x43275c=_0x1aa9e2();while(!![]){try{const _0x42c2c1=parseInt(_0x4f7601(0x14e))/0x1+parseInt(_0x4f7601(0x189))/0x2*(-parseInt(_0x4f7601(0x170))/0x3)+parseInt(_0x4f7601(0x143))/0x4+parseInt(_0x4f7601(0x179))/0x5+parseInt(_0x4f7601(0x177))/0x6*(-parseInt(_0x4f7601(0x164))/0x7)+-parseInt(_0x4f7601(0x174))/0x8*(-parseInt(_0x4f7601(0x18e))/0x9)+-parseInt(_0x4f7601(0x181))/0xa;if(_0x42c2c1===_0x1477be)break;else _0x43275c['push'](_0x43275c['shift']());}catch(_0x519822){_0x43275c['push'](_0x43275c['shift']());}}}(a12_0x1e32,0x7ec93));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';function a12_0x1e32(){const _0x2e3e3d=['\x20\x20export\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Use\x20`','3042032TiPpwp','Tip:\x20you\x20can\x20also\x20run:','Shorthand\x20for\x20--access-key','Clear\x20the\x20AccessKey\x20from\x20config','Read\x20from\x20global\x20config\x20(default)','\x20auth\x20login\x20--access-key\x20<ak_xxx>','global-default','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','stdout','userCenterDisplayName','push','629435OiMInz','Clear\x20from\x20global\x20config\x20(default)','newConfigFileName','daily','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','check','accessKeyCreatePath','access-key','scope','Option\x20A:\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','cancelled','str','\x20Verify:\x20','access_key','production','Status:\x20valid','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','authRequired','`auth\x20login`\x20does\x20not\x20support\x20--yes.','=ak_xxx','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','602nOkxyF','Write\x20to\x20global\x20config\x20(default)','ACCESS_KEY','read','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','join','ClientAk','status','boolean','isTTY','expired','code','322077TMQOfG','string','Auth\x20mode:\x20','\x20config.','152suZDFd','\x20auth\x20status','Option\x20B:\x20apps\x20config\x20(','20622gznZhO','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','2287315qMLTbd','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','development','global','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','write','test','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','12893610QwUxtr','AccessKey\x20(ak_xxx...)','\x20(via\x20','bool','accessKey','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Invalid\x20accessKey\x20format.','2YqEXcR','\x20env\x20var','Option\x20C:\x20environment\x20variable','trim','\x20config.\x20Nothing\x20to\x20clear.','172521gmCCnu','project','auth','\x20config','validation','AccessKey:\x20','AccessKey\x20cleared\x20from\x20','Then\x20verify\x20with:\x20','envName','Show\x20current\x20authentication\x20status','No\x20AccessKey\x20found\x20in\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','project\x20config','nonInteractive','env','login'];a12_0x1e32=function(){return _0x2e3e3d;};return a12_0x1e32();}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 showAccessKeyCreateHint(_0x410b00=USER_ACCESS_KEY_CREATE_URL){const _0x163557=a12_0x43e2;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+_0x410b00+'\x0a'),writeCliSideChannelLine(_0x163557(0x144)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x163557(0x148));}function buildAccessKeySetupGuide(_0xe96dd=USER_ACCESS_KEY_CREATE_URL){const _0x2d5606=a12_0x43e2;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x2d5606(0x14c)]+':',_0xe96dd,_0x2d5606(0x152)+CLI_BIN_NAME+_0x2d5606(0x139)][_0x2d5606(0x169)]('\x0a');}function a12_0x43e2(_0x3980e7,_0x507b2b){_0x3980e7=_0x3980e7-0x133;const _0x1e3211=a12_0x1e32();let _0x43e2cf=_0x1e3211[_0x3980e7];return _0x43e2cf;}function canPromptForAccessKey(_0x1b5dae){const _0x3065e5=a12_0x43e2;return!_0x1b5dae[_0x3065e5(0x13d)]&&process['stdin'][_0x3065e5(0x16d)]!==![]&&process[_0x3065e5(0x14b)][_0x3065e5(0x16d)]!==![];}function resolveAuthScopeFlags(_0x24fd41){const _0xf2419a=a12_0x43e2;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x24fd41[_0xf2419a(0x184)](_0xf2419a(0x17c)),'explicitProject':_0x24fd41[_0xf2419a(0x184)](_0xf2419a(0x18f)),'policy':_0xf2419a(0x149)}));}async function resolveAuthWriteInput(_0x591945){const _0x4a024e=a12_0x43e2;let _0x405efb=(_0x591945['str'](_0x4a024e(0x155))||_0x591945[_0x4a024e(0x15a)]('ak')||'')[_0x4a024e(0x18c)]();const _0x49b5a1=(_0x591945[_0x4a024e(0x15a)](_0x4a024e(0x13e))||'')[_0x4a024e(0x18c)](),_0x204814=''+getUserDomain()+PRODUCT_CONFIG[_0x4a024e(0x154)];if(!_0x405efb&&canPromptForAccessKey(_0x591945))try{showAccessKeyCreateHint(_0x204814),_0x405efb=await promptAccessKey('');}catch(_0x2ee1a7){if(isAbortPrompt(_0x2ee1a7))throw CliErrors[_0x4a024e(0x159)]();throw _0x2ee1a7;}if(!_0x405efb)throw CliErrors[_0x4a024e(0x192)]('Missing\x20accessKey.',buildAccessKeySetupGuide(_0x204814));if(!ACCESS_KEY_PATTERN[_0x4a024e(0x17f)](_0x405efb))throw CliErrors[_0x4a024e(0x192)](_0x4a024e(0x188),_0x4a024e(0x163));if(!_0x49b5a1)return{'accessKey':_0x405efb};const _0x2756f8=normalizeEnv(_0x49b5a1);return{'accessKey':_0x405efb,'env':isDaily(_0x2756f8)?_0x4a024e(0x151):isDev(_0x2756f8)?_0x4a024e(0x17b):_0x4a024e(0x15d)};}export const authDefinitions=[{'service':a12_0x197b88(0x190),'command':a12_0x197b88(0x13f),'description':'Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','risk':'write','confirmationDescription':'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.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x197b88(0x155),'type':a12_0x197b88(0x171),'description':a12_0x197b88(0x182)},{'name':'ak','type':a12_0x197b88(0x171),'description':a12_0x197b88(0x145)},{'name':a12_0x197b88(0x17c),'type':'boolean','description':a12_0x197b88(0x165),'default':!![]},{'name':a12_0x197b88(0x18f),'type':a12_0x197b88(0x16c),'description':a12_0x197b88(0x17d),'default':![]}],async 'execute'(_0x5df078){const _0x218347=a12_0x197b88;if(_0x5df078[_0x218347(0x184)]('yes'))throw CliErrors['validation'](_0x218347(0x161),_0x218347(0x142)+CLI_BIN_NAME+_0x218347(0x141)+CLI_BIN_NAME+_0x218347(0x187));const _0x2fcf92=(_0x5df078[_0x218347(0x15a)](_0x218347(0x155))||_0x5df078[_0x218347(0x15a)]('ak')||'')[_0x218347(0x18c)]();if(!_0x2fcf92&&_0x5df078['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x218347(0x154)])};const _0x434ba6=await resolveAuthWriteInput(_0x5df078),_0x1dab07=resolveAuthScopeFlags(_0x5df078),_0x35f389=readScopedConfig(_0x1dab07);_0x35f389[_0x218347(0x185)]=_0x434ba6[_0x218347(0x185)];_0x434ba6[_0x218347(0x13e)]&&(_0x35f389[_0x218347(0x13e)]=_0x434ba6[_0x218347(0x13e)]);writeScopedConfig(_0x35f389,_0x1dab07);const _0x3f2079=_0x1dab07['global']?_0x218347(0x17c):_0x218347(0x18f),_0x2097bb=_0x35f389[_0x218347(0x13e)]?'\x20Current\x20env:\x20'+_0x35f389[_0x218347(0x13e)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x3f2079+'\x20config.'+_0x2097bb+_0x218347(0x15b)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a12_0x197b88(0x190),'command':'logout','description':a12_0x197b88(0x146),'risk':a12_0x197b88(0x17e),'confirmationDescription':a12_0x197b88(0x186),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x197b88(0x17c),'type':a12_0x197b88(0x16c),'description':a12_0x197b88(0x14f),'default':!![]},{'name':'project','type':a12_0x197b88(0x16c),'description':a12_0x197b88(0x17a),'default':![]}],async 'execute'(_0x4a0560){const _0xc3dbee=a12_0x197b88,_0x1a5da1=resolveAuthScopeFlags(_0x4a0560),_0x2e9e41=readScopedConfig(_0x1a5da1),_0xa62b7=!!_0x2e9e41[_0xc3dbee(0x185)];delete _0x2e9e41[_0xc3dbee(0x185)],writeScopedConfig(_0x2e9e41,_0x1a5da1);const _0x4567d9=_0x1a5da1[_0xc3dbee(0x17c)]?_0xc3dbee(0x17c):'project';if(_0xa62b7)return{'ok':!![],'message':_0xc3dbee(0x134)+_0x4567d9+_0xc3dbee(0x173)};return{'ok':!![],'message':_0xc3dbee(0x138)+_0x4567d9+_0xc3dbee(0x18d)};}},{'service':a12_0x197b88(0x190),'command':'status','description':a12_0x197b88(0x137),'risk':a12_0x197b88(0x167),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x197b88(0x17c),'type':'boolean','description':a12_0x197b88(0x147),'default':!![]},{'name':'project','type':a12_0x197b88(0x16c),'description':a12_0x197b88(0x178),'default':![]},{'name':a12_0x197b88(0x153),'type':'boolean','description':a12_0x197b88(0x13a),'default':![]}],async 'execute'(_0x25d6c2){const _0x3a654f=a12_0x197b88,_0x1bed1d=resolveAuthScopeFlags(_0x25d6c2),_0x355d97=readScopedConfig(_0x1bed1d),_0x33e616=productEnvName('ACCESS_KEY'),_0x564ada=productEnv(_0x3a654f(0x166))||undefined,_0x12e6c5=_0x355d97[_0x3a654f(0x185)]||undefined,_0x62fd63=_0x564ada||_0x12e6c5,_0x343f56=_0x564ada?_0x33e616+_0x3a654f(0x18a):_0x12e6c5?(_0x1bed1d['global']?_0x3a654f(0x17c):_0x3a654f(0x18f))+_0x3a654f(0x191):null,_0x351b55=[_0x3a654f(0x172)+AUTH_MODE[_0x3a654f(0x16a)]];if(_0x62fd63){const _0x90ea28=maskCliAccessKey(_0x62fd63);_0x351b55['push'](_0x3a654f(0x133)+_0x90ea28+(_0x343f56?_0x3a654f(0x183)+_0x343f56+')':'')),_0x351b55[_0x3a654f(0x14d)](_0x3a654f(0x15e));}if(!_0x62fd63){_0x351b55[_0x3a654f(0x14d)](''),_0x351b55[_0x3a654f(0x14d)](_0x3a654f(0x13b)),_0x351b55[_0x3a654f(0x14d)](''),_0x351b55[_0x3a654f(0x14d)](_0x3a654f(0x157)+CLI_BIN_NAME+_0x3a654f(0x14a)),_0x351b55[_0x3a654f(0x14d)](''),_0x351b55[_0x3a654f(0x14d)](_0x3a654f(0x176)+PRODUCT_CONFIG[_0x3a654f(0x150)]+')'),_0x351b55[_0x3a654f(0x14d)](_0x3a654f(0x180)),_0x351b55['push'](''),_0x351b55[_0x3a654f(0x14d)](_0x3a654f(0x18b)),_0x351b55['push'](_0x3a654f(0x140)+_0x33e616+_0x3a654f(0x162)),_0x351b55[_0x3a654f(0x14d)](''),_0x351b55['push'](_0x3a654f(0x135)+CLI_BIN_NAME+_0x3a654f(0x175)),_0x351b55[_0x3a654f(0x14d)](_0x3a654f(0x15f)+CLI_BIN_NAME+'\x20doctor');if(_0x25d6c2[_0x3a654f(0x184)](_0x3a654f(0x153))){const _0x45b8eb=readStoredDeviceCode();if(_0x45b8eb&&!isStoredDeviceCodeExpired(_0x45b8eb)){const _0x24b447=getUserDomain(),_0x1865b0=await fetchDeviceToken(_0x24b447,_0x45b8eb[_0x3a654f(0x16f)]);if(_0x1865b0[_0x3a654f(0x16b)]==='success'&&_0x1865b0[_0x3a654f(0x15c)]){const _0x3e882b={'global':_0x45b8eb[_0x3a654f(0x156)]===_0x3a654f(0x17c)},_0x31f1ae=readScopedConfig(_0x3e882b);_0x31f1ae[_0x3a654f(0x185)]=_0x1865b0[_0x3a654f(0x15c)],writeScopedConfig(_0x31f1ae,_0x3e882b),deleteStoredDeviceCode();const _0xd54e0d=_0x1865b0[_0x3a654f(0x15c)],_0x451eb5=maskCliAccessKey(_0xd54e0d),_0x3cf6c6=_0x45b8eb['scope']===_0x3a654f(0x17c)?'global\x20config':_0x3a654f(0x13c);return{'ok':!![],'message':[_0x3a654f(0x172)+AUTH_MODE['ClientAk'],_0x3a654f(0x133)+_0x451eb5+_0x3a654f(0x183)+_0x3cf6c6+')',_0x3a654f(0x15e)]['join']('\x0a')};}_0x1865b0[_0x3a654f(0x16b)]===_0x3a654f(0x16e)&&deleteStoredDeviceCode();throw CliErrors['authRequired'](_0x3a654f(0x168));}throw CliErrors[_0x3a654f(0x160)](_0x351b55[_0x3a654f(0x169)]('\x0a'));}}return{'ok':!![],'message':_0x351b55[_0x3a654f(0x169)]('\x0a')};}},{'service':a12_0x197b88(0x190),'command':'info','description':a12_0x197b88(0x158),'risk':a12_0x197b88(0x167),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xc81f33){const _0x1c44a7=a12_0x197b88,_0x2a01e5=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2a01e5,'meta':{'env':_0xc81f33[_0x1c44a7(0x136)]??_0x1c44a7(0x15d)}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x15a533=a12_0x4d93;(function(_0x1ffe8f,_0x3ced69){const _0x229edc=a12_0x4d93,_0x1cffce=_0x1ffe8f();while(!![]){try{const _0x51c713=parseInt(_0x229edc(0x141))/0x1*(parseInt(_0x229edc(0x15a))/0x2)+-parseInt(_0x229edc(0x10a))/0x3*(-parseInt(_0x229edc(0x13b))/0x4)+-parseInt(_0x229edc(0x15c))/0x5+parseInt(_0x229edc(0x124))/0x6+-parseInt(_0x229edc(0x140))/0x7*(parseInt(_0x229edc(0x10b))/0x8)+parseInt(_0x229edc(0x11a))/0x9+-parseInt(_0x229edc(0x149))/0xa;if(_0x51c713===_0x3ced69)break;else _0x1cffce['push'](_0x1cffce['shift']());}catch(_0x1db35b){_0x1cffce['push'](_0x1cffce['shift']());}}}(a12_0x117c,0x2e20a));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a12_0x4d93(_0x3c0211,_0x5529fa){_0x3c0211=_0x3c0211-0x106;const _0x117c81=a12_0x117c();let _0x4d9359=_0x117c81[_0x3c0211];return _0x4d9359;}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';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_0x117c(){const _0xcdffa5=['39JKBfJz','read','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','check','\x20Current\x20env:\x20','Status:\x20valid','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','1712750NDKnWv','str','info','global-default','Invalid\x20accessKey\x20format.','push','\x20\x20export\x20','Clear\x20the\x20AccessKey\x20from\x20config','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','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.','Use\x20`','userCenterDisplayName','boolean','expired','Shorthand\x20for\x20--access-key','Show\x20current\x20authentication\x20status','Tip:\x20you\x20can\x20also\x20run:','14854HPYuIR','string','907930MTtHCh','\x20auth\x20login\x20--access-key\x20<ak_xxx>','production','yes','Option\x20A:\x20','code','\x20env\x20var','20343CkOpVk','384vKjXcc','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','scope','validation','ClientAk','auth','project','envName','status','Then\x20verify\x20with:\x20','isTTY','=ak_xxx','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','test','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','2287134fgYarE','bool','access-key','Clear\x20from\x20global\x20config\x20(default)','Read\x20from\x20global\x20config\x20(default)','\x20config.\x20Nothing\x20to\x20clear.','Auth\x20mode:\x20','accessKey','env','\x20auth\x20status','78270AHFybd','No\x20AccessKey\x20found\x20in\x20','accessKeyCreatePath','write','\x20config.','\x20Verify:\x20','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20config','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Missing\x20accessKey.','global','AccessKey\x20saved\x20to\x20','access_key','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','logout','\x20(via\x20','stdout','nonInteractive','newConfigFileName','authRequired','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','join','44MXvWQy','development','AccessKey:\x20','project\x20config','trim','13069MiMCJz'];a12_0x117c=function(){return _0xcdffa5;};return a12_0x117c();}function showAccessKeyCreateHint(_0x58f20f=USER_ACCESS_KEY_CREATE_URL){const _0x13b289=a12_0x4d93;writeCliSideChannelLine(_0x13b289(0x117)+PRODUCT_CONFIG[_0x13b289(0x154)]+':'),writeCliSideChannelLine('\x0a'+_0x58f20f+'\x0a'),writeCliSideChannelLine(_0x13b289(0x159)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x13b289(0x15d));}function buildAccessKeySetupGuide(_0x399e99=USER_ACCESS_KEY_CREATE_URL){const _0x2fba6f=a12_0x4d93;return[_0x2fba6f(0x117)+PRODUCT_CONFIG[_0x2fba6f(0x154)]+':',_0x399e99,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x2fba6f(0x147)][_0x2fba6f(0x13a)]('\x0a');}function canPromptForAccessKey(_0x8de12c){const _0x1e3f81=a12_0x4d93;return!_0x8de12c[_0x1e3f81(0x135)]&&process['stdin'][_0x1e3f81(0x115)]!==![]&&process[_0x1e3f81(0x134)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x3ad631){const _0x5ace6d=a12_0x4d93;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3ad631['bool'](_0x5ace6d(0x12e)),'explicitProject':_0x3ad631[_0x5ace6d(0x11b)](_0x5ace6d(0x111)),'policy':_0x5ace6d(0x14c)}));}async function resolveAuthWriteInput(_0x253875){const _0x3e1a5d=a12_0x4d93;let _0x14ba5c=(_0x253875[_0x3e1a5d(0x14a)](_0x3e1a5d(0x11c))||_0x253875[_0x3e1a5d(0x14a)]('ak')||'')['trim']();const _0x132f8f=(_0x253875[_0x3e1a5d(0x14a)](_0x3e1a5d(0x122))||'')[_0x3e1a5d(0x13f)](),_0x3fdf68=''+getUserDomain()+PRODUCT_CONFIG[_0x3e1a5d(0x126)];if(!_0x14ba5c&&canPromptForAccessKey(_0x253875))try{showAccessKeyCreateHint(_0x3fdf68),_0x14ba5c=await promptAccessKey('');}catch(_0x4f2882){if(isAbortPrompt(_0x4f2882))throw CliErrors['cancelled']();throw _0x4f2882;}if(!_0x14ba5c)throw CliErrors[_0x3e1a5d(0x10e)](_0x3e1a5d(0x12d),buildAccessKeySetupGuide(_0x3fdf68));if(!ACCESS_KEY_PATTERN[_0x3e1a5d(0x118)](_0x14ba5c))throw CliErrors[_0x3e1a5d(0x10e)](_0x3e1a5d(0x14d),_0x3e1a5d(0x119));if(!_0x132f8f)return{'accessKey':_0x14ba5c};const _0x557ae7=normalizeEnv(_0x132f8f);return{'accessKey':_0x14ba5c,'env':isDaily(_0x557ae7)?'daily':isDev(_0x557ae7)?_0x3e1a5d(0x13c):'production'};}export const authDefinitions=[{'service':'auth','command':'login','description':a12_0x15a533(0x10c),'risk':a12_0x15a533(0x127),'confirmationDescription':a12_0x15a533(0x152),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x15a533(0x11c),'type':a12_0x15a533(0x15b),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x15a533(0x15b),'description':a12_0x15a533(0x157)},{'name':a12_0x15a533(0x12e),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x15a533(0x155),'description':a12_0x15a533(0x138),'default':![]}],async 'execute'(_0x24bff4){const _0x38f819=a12_0x15a533;if(_0x24bff4[_0x38f819(0x11b)](_0x38f819(0x106)))throw CliErrors[_0x38f819(0x10e)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x38f819(0x153)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x38f819(0x148));const _0x220c87=(_0x24bff4[_0x38f819(0x14a)](_0x38f819(0x11c))||_0x24bff4[_0x38f819(0x14a)]('ak')||'')['trim']();if(!_0x220c87&&_0x24bff4[_0x38f819(0x135)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x38f819(0x126)])};const _0x538f27=await resolveAuthWriteInput(_0x24bff4),_0x11566d=resolveAuthScopeFlags(_0x24bff4),_0x12c55f=readScopedConfig(_0x11566d);_0x12c55f['accessKey']=_0x538f27[_0x38f819(0x121)];_0x538f27[_0x38f819(0x122)]&&(_0x12c55f['env']=_0x538f27[_0x38f819(0x122)]);writeScopedConfig(_0x12c55f,_0x11566d);const _0x3de6b1=_0x11566d[_0x38f819(0x12e)]?_0x38f819(0x12e):_0x38f819(0x111),_0x509599=_0x12c55f[_0x38f819(0x122)]?_0x38f819(0x145)+_0x12c55f[_0x38f819(0x122)]+'.':'';return{'ok':!![],'message':_0x38f819(0x12f)+_0x3de6b1+_0x38f819(0x128)+_0x509599+_0x38f819(0x129)+CLI_BIN_NAME+_0x38f819(0x123)};}},{'service':a12_0x15a533(0x110),'command':a12_0x15a533(0x132),'description':a12_0x15a533(0x150),'risk':a12_0x15a533(0x127),'confirmationDescription':'Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x15a533(0x12e),'type':a12_0x15a533(0x155),'description':a12_0x15a533(0x11d),'default':!![]},{'name':a12_0x15a533(0x111),'type':a12_0x15a533(0x155),'description':a12_0x15a533(0x131),'default':![]}],async 'execute'(_0x544472){const _0x56cf12=a12_0x15a533,_0x393813=resolveAuthScopeFlags(_0x544472),_0x19efaf=readScopedConfig(_0x393813),_0x2aaa58=!!_0x19efaf[_0x56cf12(0x121)];delete _0x19efaf[_0x56cf12(0x121)],writeScopedConfig(_0x19efaf,_0x393813);const _0x12f15a=_0x393813[_0x56cf12(0x12e)]?_0x56cf12(0x12e):_0x56cf12(0x111);if(_0x2aaa58)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x12f15a+_0x56cf12(0x128)};return{'ok':!![],'message':_0x56cf12(0x125)+_0x12f15a+_0x56cf12(0x11f)};}},{'service':'auth','command':a12_0x15a533(0x113),'description':a12_0x15a533(0x158),'risk':a12_0x15a533(0x142),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a12_0x15a533(0x11e),'default':!![]},{'name':a12_0x15a533(0x111),'type':a12_0x15a533(0x155),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a12_0x15a533(0x144),'type':a12_0x15a533(0x155),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x5f54e6){const _0xa540b8=a12_0x15a533,_0x3481a1=resolveAuthScopeFlags(_0x5f54e6),_0x5bede9=readScopedConfig(_0x3481a1),_0x48764f=productEnvName('ACCESS_KEY'),_0x12e299=productEnv('ACCESS_KEY')||undefined,_0x5b96f7=_0x5bede9[_0xa540b8(0x121)]||undefined,_0x309360=_0x12e299||_0x5b96f7,_0x30580b=_0x12e299?_0x48764f+_0xa540b8(0x109):_0x5b96f7?(_0x3481a1[_0xa540b8(0x12e)]?_0xa540b8(0x12e):_0xa540b8(0x111))+_0xa540b8(0x12b):null,_0x2349fc=[_0xa540b8(0x120)+AUTH_MODE[_0xa540b8(0x10f)]];if(_0x309360){const _0x15f152=maskCliAccessKey(_0x309360);_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x13d)+_0x15f152+(_0x30580b?_0xa540b8(0x133)+_0x30580b+')':'')),_0x2349fc['push']('Status:\x20valid');}if(!_0x309360){_0x2349fc[_0xa540b8(0x14e)](''),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x143)),_0x2349fc['push'](''),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x107)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x2349fc['push'](''),_0x2349fc['push']('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0xa540b8(0x136)]+')'),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x12c)),_0x2349fc[_0xa540b8(0x14e)](''),_0x2349fc[_0xa540b8(0x14e)]('Option\x20C:\x20environment\x20variable'),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x14f)+_0x48764f+_0xa540b8(0x116)),_0x2349fc[_0xa540b8(0x14e)](''),_0x2349fc['push'](_0xa540b8(0x114)+CLI_BIN_NAME+_0xa540b8(0x123)),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x151)+CLI_BIN_NAME+'\x20doctor');if(_0x5f54e6['bool'](_0xa540b8(0x144))){const _0x23c0a7=readStoredDeviceCode();if(_0x23c0a7&&!isStoredDeviceCodeExpired(_0x23c0a7)){const _0x60f5ad=getUserDomain(),_0x403f12=await fetchDeviceToken(_0x60f5ad,_0x23c0a7[_0xa540b8(0x108)]);if(_0x403f12[_0xa540b8(0x113)]==='success'&&_0x403f12['access_key']){const _0x4c7059={'global':_0x23c0a7[_0xa540b8(0x10d)]==='global'},_0x33fe63=readScopedConfig(_0x4c7059);_0x33fe63[_0xa540b8(0x121)]=_0x403f12['access_key'],writeScopedConfig(_0x33fe63,_0x4c7059),deleteStoredDeviceCode();const _0x1b40bd=_0x403f12[_0xa540b8(0x130)],_0x1e678f=maskCliAccessKey(_0x1b40bd),_0x57011b=_0x23c0a7[_0xa540b8(0x10d)]===_0xa540b8(0x12e)?'global\x20config':_0xa540b8(0x13e);return{'ok':!![],'message':[_0xa540b8(0x120)+AUTH_MODE[_0xa540b8(0x10f)],_0xa540b8(0x13d)+_0x1e678f+_0xa540b8(0x133)+_0x57011b+')',_0xa540b8(0x146)]['join']('\x0a')};}_0x403f12[_0xa540b8(0x113)]===_0xa540b8(0x156)&&deleteStoredDeviceCode();throw CliErrors[_0xa540b8(0x137)](_0xa540b8(0x12a));}throw CliErrors['authRequired'](_0x2349fc[_0xa540b8(0x13a)]('\x0a'));}}return{'ok':!![],'message':_0x2349fc[_0xa540b8(0x13a)]('\x0a')};}},{'service':'auth','command':a12_0x15a533(0x14b),'description':a12_0x15a533(0x139),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x293dff){const _0x584f02=a12_0x15a533,_0x263288=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x263288,'meta':{'env':_0x293dff[_0x584f02(0x112)]??_0x584f02(0x15e)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fa0ba,_0x365916){const _0x2c4606=a13_0xd2be,_0x387369=_0x1fa0ba();while(!![]){try{const _0x27526d=parseInt(_0x2c4606(0x73))/0x1*(parseInt(_0x2c4606(0x78))/0x2)+-parseInt(_0x2c4606(0x70))/0x3*(-parseInt(_0x2c4606(0x65))/0x4)+-parseInt(_0x2c4606(0x6c))/0x5+-parseInt(_0x2c4606(0x6b))/0x6+parseInt(_0x2c4606(0x6e))/0x7+parseInt(_0x2c4606(0x77))/0x8*(-parseInt(_0x2c4606(0x71))/0x9)+-parseInt(_0x2c4606(0x69))/0xa*(-parseInt(_0x2c4606(0x72))/0xb);if(_0x27526d===_0x365916)break;else _0x387369['push'](_0x387369['shift']());}catch(_0x142725){_0x387369['push'](_0x387369['shift']());}}}(a13_0x3244,0xef9c2));import{createInterface}from'node:readline';function a13_0xd2be(_0x5542b1,_0xba12a6){_0x5542b1=_0x5542b1-0x64;const _0x324438=a13_0x3244();let _0xd2be7f=_0x324438[_0x5542b1];return _0xd2be7f;}class AbortPrompt extends Error{constructor(){const _0x27968c=a13_0xd2be;super(_0x27968c(0x75)),this[_0x27968c(0x67)]=_0x27968c(0x66);}}function createSafeRl(){const _0x1265d1=a13_0xd2be,_0x1858f6=createInterface({'input':process['stdin'],'output':process[_0x1265d1(0x74)]});let _0x5701e6;const _0x457fad=new Promise((_0x46b474,_0x41488e)=>{const _0x1e094e=_0x1265d1;_0x5701e6=()=>{const _0x72218b=a13_0xd2be;_0x5701e6&&(_0x1858f6[_0x72218b(0x7a)]('SIGINT',_0x5701e6),_0x5701e6=undefined);try{_0x1858f6[_0x72218b(0x64)]();}catch{}_0x41488e(new AbortPrompt());},_0x1858f6[_0x1e094e(0x6d)](_0x1e094e(0x79),_0x5701e6);}),_0x16604b=()=>{const _0x3e43f2=_0x1265d1;_0x5701e6&&(_0x1858f6[_0x3e43f2(0x7a)](_0x3e43f2(0x79),_0x5701e6),_0x5701e6=undefined);try{_0x1858f6[_0x3e43f2(0x64)]();}catch{}};return{'rl':_0x1858f6,'abortPromise':_0x457fad,'disposeSuccess':_0x16604b};}function a13_0x3244(){const _0x2fbef3=['104RcLBKV','SIGINT','removeListener','):\x20','close','48ETteqU','AbortPrompt','name','question','10nVqJGT','AccessKey\x20(paste\x20ak_...):\x20','1114338upNlni','8214475TsaLZV','once','10731329jOokIp','trim','47727TOZQNE','597231tYxvig','11736703OebeTg','10577SVrbTi','stdout','User\x20aborted\x20prompt','AccessKey\x20(','64QrCOAw'];a13_0x3244=function(){return _0x2fbef3;};return a13_0x3244();}export async function promptAccessKey(_0x3f66f7=''){const {rl:_0x37a3d1,abortPromise:_0x35cfc1,disposeSuccess:_0x5b753b}=createSafeRl(),_0x1ab937=new Promise(_0x4a0a22=>{const _0x199c0a=a13_0xd2be,_0x92bd4=_0x3f66f7?_0x199c0a(0x76)+_0x3f66f7+_0x199c0a(0x7b):_0x199c0a(0x6a);_0x37a3d1[_0x199c0a(0x68)](_0x92bd4,_0x48ffeb=>{const _0x292fe7=_0x199c0a;_0x5b753b(),_0x4a0a22(_0x48ffeb[_0x292fe7(0x6f)]()||_0x3f66f7);});});return Promise['race']([_0x1ab937,_0x35cfc1]);}export function isAbortPrompt(_0x3b559c){return _0x3b559c instanceof Error&&_0x3b559c['name']==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x6e22a1=a14_0x5c70;(function(_0x40217b,_0x2c29d8){const _0x394677=a14_0x5c70,_0x2cd732=_0x40217b();while(!![]){try{const _0x164752=-parseInt(_0x394677(0x1ec))/0x1+parseInt(_0x394677(0x1e0))/0x2+-parseInt(_0x394677(0x1db))/0x3*(parseInt(_0x394677(0x1e3))/0x4)+-parseInt(_0x394677(0x1eb))/0x5*(parseInt(_0x394677(0x1df))/0x6)+-parseInt(_0x394677(0x1e2))/0x7+parseInt(_0x394677(0x1dc))/0x8+parseInt(_0x394677(0x1e7))/0x9*(parseInt(_0x394677(0x1e5))/0xa);if(_0x164752===_0x2c29d8)break;else _0x2cd732['push'](_0x2cd732['shift']());}catch(_0xbc4dc2){_0x2cd732['push'](_0x2cd732['shift']());}}}(a14_0x5dda,0x8650b));import{getBffEndpointContract}from'../../core/api-client.js';function a14_0x5dda(){const _0x3ec61e=['143066yelDjq','version','4860807prqvJU','84FdzIyD','(none)','1399810QqHORk','description','171rHrUWy','detail','bff','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','140PanoBj','947316ZxnQTd','38133NsJlpX','4501400uTPpXp','Backend\x20Function\x20name','appCode','178938LasvqD'];a14_0x5dda=function(){return _0x3ec61e;};return a14_0x5dda();}function a14_0x5c70(_0x523c83,_0x24c178){_0x523c83=_0x523c83-0x1db;const _0x5ddab0=a14_0x5dda();let _0x5c702b=_0x5ddab0[_0x523c83];return _0x5c702b;}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a14_0x6e22a1(0x1e9),'command':a14_0x6e22a1(0x1e8),'description':a14_0x6e22a1(0x1ea),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a14_0x6e22a1(0x1dd)}],async 'execute'(_0x2e4975){const _0x33421e=a14_0x6e22a1,_0x308777=await getBffEndpointContract(_0x2e4975[_0x33421e(0x1de)],_0x2e4975['str']('name'));return{'ok':!![],'data':{'appCode':_0x308777[_0x33421e(0x1de)],'functionName':_0x308777['functionName'],'description':_0x308777[_0x33421e(0x1e6)]||_0x33421e(0x1e4),'version':_0x308777[_0x33421e(0x1e1)],'gmtModified':_0x308777['gmtModified']}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x31e8ef=a15_0x384e;(function(_0x3b4b6e,_0x443f2e){const _0x3e40d6=a15_0x384e,_0x4bd59f=_0x3b4b6e();while(!![]){try{const _0x4f4067=parseInt(_0x3e40d6(0x128))/0x1+parseInt(_0x3e40d6(0x12c))/0x2+parseInt(_0x3e40d6(0x122))/0x3*(parseInt(_0x3e40d6(0x12e))/0x4)+-parseInt(_0x3e40d6(0x121))/0x5*(parseInt(_0x3e40d6(0x11e))/0x6)+-parseInt(_0x3e40d6(0x124))/0x7+parseInt(_0x3e40d6(0x120))/0x8*(-parseInt(_0x3e40d6(0x11f))/0x9)+-parseInt(_0x3e40d6(0x12f))/0xa*(parseInt(_0x3e40d6(0x12d))/0xb);if(_0x4f4067===_0x443f2e)break;else _0x4bd59f['push'](_0x4bd59f['shift']());}catch(_0x14daee){_0x4bd59f['push'](_0x4bd59f['shift']());}}}(a15_0x272f,0xdc8df));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':a15_0x31e8ef(0x125),'command':a15_0x31e8ef(0x126),'description':'Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','risk':a15_0x31e8ef(0x127),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x31e8ef(0x12b)},PARAMS_FLAG],async 'execute'(_0x54ab3a){const _0x4214d5=a15_0x31e8ef,_0x3f7ff9=parseJsonParams(_0x54ab3a[_0x4214d5(0x12a)]('params')),_0x39c743=Date[_0x4214d5(0x123)](),_0x26a59f=await executeSdkBff(_0x54ab3a[_0x4214d5(0x12a)](_0x4214d5(0x129)),_0x3f7ff9),_0x150935=Date[_0x4214d5(0x123)]()-_0x39c743;return{'ok':!![],'data':{'result':_0x26a59f,'elapsed':_0x150935},'message':_0x4214d5(0x130)+_0x150935+'ms'};}};function a15_0x384e(_0x524487,_0x46cad0){_0x524487=_0x524487-0x11e;const _0x272f9d=a15_0x272f();let _0x384e9c=_0x272f9d[_0x524487];return _0x384e9c;}function a15_0x272f(){const _0x498df9=['exec','read','1166368CQFKzR','name','str','Backend\x20Function\x20name\x20to\x20execute','2425476PpffvW','11DNYoIK','5432SqPJDO','12072070YnuLHl','Backend\x20Function\x20executed\x20in\x20','7705746raxLov','6129txYFRd','5392zhWlGY','5crCJaX','3825nJlKPw','now','1796711ATvoDL','bff'];a15_0x272f=function(){return _0x498df9;};return a15_0x272f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a16_0x5ba5(){const _0x38ed55=['485YjUNVn','12603129ovKsal','32129410CyvnoW','1554629olSkEL','2UeufAD','244434LPyjIV','246920hJKjPw','279FSHSFP','5852196aIXtSW','50924KsAXFq'];a16_0x5ba5=function(){return _0x38ed55;};return a16_0x5ba5();}(function(_0x1fd14c,_0x103374){const _0x5de251=a16_0x1b93,_0x4ce264=_0x1fd14c();while(!![]){try{const _0x5a1059=parseInt(_0x5de251(0x15a))/0x1+-parseInt(_0x5de251(0x15b))/0x2*(-parseInt(_0x5de251(0x15c))/0x3)+parseInt(_0x5de251(0x160))/0x4*(-parseInt(_0x5de251(0x161))/0x5)+parseInt(_0x5de251(0x15f))/0x6+parseInt(_0x5de251(0x162))/0x7+-parseInt(_0x5de251(0x15d))/0x8*(-parseInt(_0x5de251(0x15e))/0x9)+-parseInt(_0x5de251(0x159))/0xa;if(_0x5a1059===_0x103374)break;else _0x4ce264['push'](_0x4ce264['shift']());}catch(_0x561a06){_0x4ce264['push'](_0x4ce264['shift']());}}}(a16_0x5ba5,0xe0d37));import{bffDetail}from'../../commands/bff/detail.js';function a16_0x1b93(_0x378343,_0x4e10e1){_0x378343=_0x378343-0x159;const _0x5ba5c5=a16_0x5ba5();let _0x1b9367=_0x5ba5c5[_0x378343];return _0x1b9367;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x439a14=a17_0xd103;(function(_0x26249d,_0x5c0d06){const _0x4e8d83=a17_0xd103,_0x3f7831=_0x26249d();while(!![]){try{const _0x1d329f=-parseInt(_0x4e8d83(0x15b))/0x1+parseInt(_0x4e8d83(0x146))/0x2+-parseInt(_0x4e8d83(0x141))/0x3*(-parseInt(_0x4e8d83(0x157))/0x4)+-parseInt(_0x4e8d83(0x139))/0x5+parseInt(_0x4e8d83(0x147))/0x6*(-parseInt(_0x4e8d83(0x140))/0x7)+-parseInt(_0x4e8d83(0x142))/0x8*(parseInt(_0x4e8d83(0x14e))/0x9)+parseInt(_0x4e8d83(0x149))/0xa*(parseInt(_0x4e8d83(0x153))/0xb);if(_0x1d329f===_0x5c0d06)break;else _0x3f7831['push'](_0x3f7831['shift']());}catch(_0x3980a1){_0x3f7831['push'](_0x3f7831['shift']());}}}(a17_0x3d7d,0x2976e));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a17_0x3d7d(){const _0x5211c4=['\x20at\x20','error','130052QUqJxH','215055kJEBDu','cwd','apiError','nonInteractive','unknown','cli-skill','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','2114xtNrHV','486GacNyw','1198088zfqqEL','Built-in\x20Skill\x20install\x20failed\x20[','cli-skill-install',']:\x20','612712dCMYVY','5088TXMFZh','skillVersion','50psbrDR','\x20installed','installedPath','CLI\x20Built-in\x20Skill\x20','changed','18tcjfZW','setLogPath','INSTALL_FAILED','\x20is\x20already\x20current','info','1039379PbjosG','pipe','inherit','code','2956VUdQCy','read'];a17_0x3d7d=function(){return _0x5211c4;};return a17_0x3d7d();}import{logger}from'../../utils/logger.js';function a17_0xd103(_0x29b26e,_0xa5815c){_0x29b26e=_0x29b26e-0x139;const _0x3d7d4f=a17_0x3d7d();let _0xd10360=_0x3d7d4f[_0x29b26e];return _0xd10360;}export const cliSkillDefinitions=[{'service':a17_0x439a14(0x13e),'command':'install','description':'Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','risk':a17_0x439a14(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x104725){const _0x5a17f1=a17_0x439a14;logger[_0x5a17f1(0x14f)](process[_0x5a17f1(0x13a)]()),logger[_0x5a17f1(0x152)](_0x5a17f1(0x144),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.');const _0x54e2b7=installBuiltinSkill({'stdio':_0x104725[_0x5a17f1(0x13c)]?_0x5a17f1(0x154):_0x5a17f1(0x155)});if(!_0x54e2b7['ok'])throw CliErrors[_0x5a17f1(0x13b)](_0x5a17f1(0x143)+(_0x54e2b7[_0x5a17f1(0x156)]||_0x5a17f1(0x150))+_0x5a17f1(0x145)+(_0x54e2b7[_0x5a17f1(0x15a)]||_0x5a17f1(0x13d)),_0x5a17f1(0x13f)+_0x54e2b7['repairCommand']);const _0x2c8556=_0x54e2b7[_0x5a17f1(0x14b)]?_0x5a17f1(0x159)+_0x54e2b7['installedPath']:'';return console['log'](_0x54e2b7[_0x5a17f1(0x14d)]?_0x5a17f1(0x14c)+_0x54e2b7[_0x5a17f1(0x148)]+_0x5a17f1(0x14a)+_0x2c8556:_0x5a17f1(0x14c)+_0x54e2b7[_0x5a17f1(0x148)]+_0x5a17f1(0x151)+_0x2c8556),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x307ac4,_0x117b99){const _0x8915c=a18_0x3fcd,_0x54c059=_0x307ac4();while(!![]){try{const _0x3c14e0=parseInt(_0x8915c(0x14d))/0x1*(-parseInt(_0x8915c(0x13c))/0x2)+parseInt(_0x8915c(0x145))/0x3+parseInt(_0x8915c(0x13d))/0x4+parseInt(_0x8915c(0x140))/0x5+-parseInt(_0x8915c(0x14a))/0x6+parseInt(_0x8915c(0x149))/0x7*(parseInt(_0x8915c(0x146))/0x8)+-parseInt(_0x8915c(0x14e))/0x9;if(_0x3c14e0===_0x117b99)break;else _0x54c059['push'](_0x54c059['shift']());}catch(_0x2a4d01){_0x54c059['push'](_0x54c059['shift']());}}}(a18_0x44ef,0xb68a3));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';function a18_0x44ef(){const _0x52275f=['global','69GxiCjk','18009675bYSxdX','validation','7604igdfGj','5841220PdULqa','Use\x20only\x20one\x20config\x20scope\x20flag.','newConfigFileName','2840515ndbViE','\x20(global)','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','global-default',',\x20or\x20create\x20a\x20project-local\x20','2698278RygPyo','8NYLZnV','Add\x20--global\x20to\x20write\x20to\x20~/','\x20first.','1192093ajlqzm','522222MJXkug','project-or-global-explicit'];a18_0x44ef=function(){return _0x52275f;};return a18_0x44ef();}export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';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';function a18_0x3fcd(_0xd85858,_0x533945){_0xd85858=_0xd85858-0x13c;const _0x44eff1=a18_0x44ef();let _0x3fcd5b=_0x44eff1[_0xd85858];return _0x3fcd5b;}export function resolveConfigScope(_0x58026c){const _0x59898e=a18_0x3fcd,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x425470}=_0x58026c;if(explicitGlobal&&explicitProject)throw CliErrors[_0x59898e(0x14f)](_0x59898e(0x142),_0x59898e(0x13e));if(explicitGlobal)return _0x59898e(0x14c);if(explicitProject)return'project';switch(_0x425470){case _0x59898e(0x143):return _0x59898e(0x14c);case _0x59898e(0x14b):if(!(_0x58026c['inProject']??isInProject()))throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x20found).',_0x59898e(0x147)+PRODUCT_CONFIG['newConfigFileName']+_0x59898e(0x144)+PRODUCT_CONFIG[_0x59898e(0x13f)]+_0x59898e(0x148));return'project';}}export function toScopeFlags(_0x3f69f3){const _0xf2d381=a18_0x3fcd;return{'global':_0x3f69f3===_0xf2d381(0x14c)};}export function formatScopeLabel(_0x109f89){const _0x1383b8=a18_0x3fcd;return _0x109f89===_0x1383b8(0x14c)?_0x1383b8(0x141):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a19_0x43a1(_0x39f56b,_0x728117){_0x39f56b=_0x39f56b-0x1bb;const _0x1ba7ed=a19_0x1ba7();let _0x43a157=_0x1ba7ed[_0x39f56b];return _0x43a157;}(function(_0x496cdc,_0x2d916c){const _0x4023df=a19_0x43a1,_0x408804=_0x496cdc();while(!![]){try{const _0x49f5ae=-parseInt(_0x4023df(0x1c5))/0x1+parseInt(_0x4023df(0x1be))/0x2*(-parseInt(_0x4023df(0x1c4))/0x3)+-parseInt(_0x4023df(0x1d0))/0x4*(parseInt(_0x4023df(0x1bf))/0x5)+-parseInt(_0x4023df(0x1ca))/0x6*(parseInt(_0x4023df(0x1cd))/0x7)+parseInt(_0x4023df(0x1ce))/0x8+parseInt(_0x4023df(0x1d7))/0x9*(-parseInt(_0x4023df(0x1c7))/0xa)+parseInt(_0x4023df(0x1bc))/0xb;if(_0x49f5ae===_0x2d916c)break;else _0x408804['push'](_0x408804['shift']());}catch(_0x435bc4){_0x408804['push'](_0x408804['shift']());}}}(a19_0x1ba7,0x3da2d));import{CliErrors}from'../../errors.js';function isSet(_0xc008c3,_0x19bbbf){const _0x724f1=a19_0x43a1,_0xc7495=_0xc008c3[_0x724f1(0x1c1)](_0x19bbbf);return _0xc7495!==undefined&&_0xc7495!==''&&_0xc7495!==![]&&_0xc7495!==0x0;}function fmtNames(_0x2b701a){const _0xf0d877=a19_0x43a1;return _0x2b701a[_0xf0d877(0x1d5)](_0x156f75=>'--'+_0x156f75)[_0xf0d877(0x1c0)](',\x20');}export function requireOneOf(_0x4fcbae,_0x1cec77,_0x438dcb){const _0x3499fe=a19_0x43a1,_0x33888f=_0x1cec77[_0x3499fe(0x1cb)](_0xe9f234=>isSet(_0x4fcbae,_0xe9f234));if(_0x33888f[_0x3499fe(0x1d6)]!==0x1)throw CliErrors[_0x3499fe(0x1d1)](_0x33888f['length']===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x1cec77)+_0x3499fe(0x1cf)+_0x438dcb+'`.':_0x3499fe(0x1d3)+fmtNames(_0x1cec77)+_0x3499fe(0x1cc)+fmtNames(_0x33888f)+'.',_0x33888f[_0x3499fe(0x1d6)]===0x0?_0x3499fe(0x1c6)+fmtNames(_0x1cec77):_0x3499fe(0x1c8));}function a19_0x1ba7(){const _0x4ae316=['str','map','length','5841hgBOTp','Use\x20only\x20one\x20of:\x20','18026569hQlmka',',\x20got\x20\x22','40cSJRHZ','1567915XCXiAv','join','flag',':\x20expected\x20','Flags\x20','60147fqiaew','111210CBJybo','Provide\x20one\x20of:\x20','6180iBVfGd','Remove\x20all\x20but\x20one.','At\x20least\x20one\x20of\x20','228ICDJqk','filter','\x20is\x20allowed,\x20found:\x20','51373LYjqkM','955352kKThiT','\x20is\x20required\x20for\x20`','4OVPJTw','validation','some','Only\x20one\x20of\x20'];a19_0x1ba7=function(){return _0x4ae316;};return a19_0x1ba7();}export function requireAnyOf(_0x5a2e7a,_0x48a1fd,_0x41c06c){const _0x53459e=a19_0x43a1;if(!_0x48a1fd[_0x53459e(0x1d2)](_0x4ddbfa=>isSet(_0x5a2e7a,_0x4ddbfa)))throw CliErrors[_0x53459e(0x1d1)](_0x53459e(0x1c9)+fmtNames(_0x48a1fd)+_0x53459e(0x1cf)+_0x41c06c+'`.',_0x53459e(0x1c6)+fmtNames(_0x48a1fd));}export function mutuallyExclusive(_0xbf867d,_0x1be88d,_0x588a56){const _0xe17e63=a19_0x43a1,_0x4d7d44=_0x1be88d['filter'](_0x24c672=>isSet(_0xbf867d,_0x24c672));if(_0x4d7d44[_0xe17e63(0x1d6)]>0x1)throw CliErrors[_0xe17e63(0x1d1)](_0xe17e63(0x1c3)+fmtNames(_0x4d7d44)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x588a56+'`.',_0xe17e63(0x1bb)+fmtNames(_0x1be88d));}export function validatePattern(_0x4a9654,_0x5c384d,_0x4eb738,_0x456db4){const _0x49be62=a19_0x43a1,_0x273f3b=_0x4a9654[_0x49be62(0x1d4)](_0x5c384d);if(_0x273f3b&&!_0x4eb738['test'](_0x273f3b))throw CliErrors[_0x49be62(0x1d1)]('Invalid\x20--'+_0x5c384d+_0x49be62(0x1c2)+_0x456db4+_0x49be62(0x1bd)+_0x273f3b+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x4d41b9=a20_0x3178;(function(_0x5651de,_0xdddf7f){const _0x58348f=a20_0x3178,_0x2c0a72=_0x5651de();while(!![]){try{const _0x28b99f=parseInt(_0x58348f(0x134))/0x1+parseInt(_0x58348f(0x132))/0x2+-parseInt(_0x58348f(0x137))/0x3*(-parseInt(_0x58348f(0x13b))/0x4)+-parseInt(_0x58348f(0x129))/0x5*(parseInt(_0x58348f(0x13c))/0x6)+parseInt(_0x58348f(0x138))/0x7*(-parseInt(_0x58348f(0x135))/0x8)+parseInt(_0x58348f(0x131))/0x9*(parseInt(_0x58348f(0x13a))/0xa)+parseInt(_0x58348f(0x12e))/0xb*(-parseInt(_0x58348f(0x12b))/0xc);if(_0x28b99f===_0xdddf7f)break;else _0x2c0a72['push'](_0x2c0a72['shift']());}catch(_0x3df07e){_0x2c0a72['push'](_0x2c0a72['shift']());}}}(a20_0xf465,0x2d547));export const GLOBAL_SCOPE_FLAG={'name':a20_0x4d41b9(0x133),'type':a20_0x4d41b9(0x12a),'default':![],'description':a20_0x4d41b9(0x12c)};export const CODE_FLAG={'name':'code','type':a20_0x4d41b9(0x139),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'}};export const SQLCODE_FLAG={'name':a20_0x4d41b9(0x130),'type':a20_0x4d41b9(0x139),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x4d41b9(0x12d)}};function a20_0xf465(){const _0x53411d=['67857CQIrUb','8246TWFkEg','string','20JbmYhY','16kVcWsJ','12KroaAc','192900IaNWmY','boolean','12ZQoafP','Write\x20to\x20the\x20global\x20configuration','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','3396052qnTSHZ','Resource\x20ID','sqlcode','804537ElzDGH','213668QpZQqb','global','267325GHEgYR','488YbinRv','Return\x20full\x20raw\x20response\x20object'];a20_0xf465=function(){return _0x53411d;};return a20_0xf465();}export const VERBOSE_FLAG={'name':'verbose','type':a20_0x4d41b9(0x12a),'description':a20_0x4d41b9(0x136)};function a20_0x3178(_0x456c94,_0x8b962e){_0x456c94=_0x456c94-0x129;const _0xf4650c=a20_0xf465();let _0x317897=_0xf4650c[_0x456c94];return _0x317897;}export const PARAMS_FLAG={'name':'params','type':'string','description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':'name','type':a20_0x4d41b9(0x139),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a20_0x4d41b9(0x12f)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a21_0x4d6b(){const _0x51597f=['\x20MB','File\x20not\x20found:\x20','34748MKMTeG','4470968lwDLRt','3298959HGoHal','41259wWzFsg','139945KXZXeM','trim','\x20path\x20is\x20required.','10mSGlKM','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','toFixed','validation','468723IbNses','18zTPujw','33663ovFGku','isFile','size','378ggAjkI','ceil','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a21_0x4d6b=function(){return _0x51597f;};return a21_0x4d6b();}(function(_0x2da264,_0xc1abd){const _0x30dba8=a21_0x2fa3,_0x55e178=_0x2da264();while(!![]){try{const _0x36e2dc=parseInt(_0x30dba8(0x170))/0x1*(parseInt(_0x30dba8(0x179))/0x2)+-parseInt(_0x30dba8(0x178))/0x3+parseInt(_0x30dba8(0x16d))/0x4+-parseInt(_0x30dba8(0x171))/0x5+-parseInt(_0x30dba8(0x17d))/0x6*(-parseInt(_0x30dba8(0x17a))/0x7)+-parseInt(_0x30dba8(0x16e))/0x8+parseInt(_0x30dba8(0x16f))/0x9*(parseInt(_0x30dba8(0x174))/0xa);if(_0x36e2dc===_0xc1abd)break;else _0x55e178['push'](_0x55e178['shift']());}catch(_0x5b974d){_0x55e178['push'](_0x55e178['shift']());}}}(a21_0x4d6b,0x4ad03));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x4a2837){const _0x7cdda9=a21_0x2fa3;if(_0x4a2837>=BYTES_PER_MB){const _0x179726=Math[_0x7cdda9(0x17e)](_0x4a2837/BYTES_PER_MB*0x64)/0x64;return _0x179726[_0x7cdda9(0x176)](0x2)+_0x7cdda9(0x180);}return _0x4a2837+'\x20B';}function a21_0x2fa3(_0x483c68,_0x42f7ee){_0x483c68=_0x483c68-0x16c;const _0x4d6bcd=a21_0x4d6b();let _0x2fa3d5=_0x4d6bcd[_0x483c68];return _0x2fa3d5;}export function requireRuntimeUploadFile(_0x520a82,_0x533888){const _0x3aea7f=a21_0x2fa3,_0xf17b9=_0x520a82[_0x3aea7f(0x172)]();if(!_0xf17b9)throw CliErrors['validation'](_0x533888+_0x3aea7f(0x173));if(!existsSync(_0xf17b9))throw CliErrors[_0x3aea7f(0x177)](_0x3aea7f(0x16c)+_0xf17b9);const _0xf88f9c=statSync(_0xf17b9);if(!_0xf88f9c[_0x3aea7f(0x17b)]())throw CliErrors[_0x3aea7f(0x177)](_0x3aea7f(0x17f)+_0xf17b9);if(_0xf88f9c[_0x3aea7f(0x17c)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x3aea7f(0x177)](_0x3aea7f(0x175)+_0xf17b9+'\x20('+formatBytes(_0xf88f9c[_0x3aea7f(0x17c)])+')');return{'path':_0xf17b9,'size':_0xf88f9c[_0x3aea7f(0x17c)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x4ffe0b=a22_0x3807;function a22_0x230c(){const _0x812101=['pageSize','object','pretty','validation','format','\x20config\x20get\x20<key>','global','split','Usage:\x20','trim','Delete\x20a\x20configuration\x20value','\x20config\x20delete\x20<key>\x20[--global]','`\x20=\x20\x22','Key\x20already\x20absent:\x20','List\x20current\x20config','178wcZKlW','348uoTDau','key','Invalid\x20value\x20for\x20\x22','includes','get','\x22\x20is\x20not\x20settable.','Value\x20to\x20assign','pageSize\x20must\x20be\x20a\x20positive\x20number','10OgUmmD','4946lRXlgK','2047452qFlueu','log','Set\x20`','length','35042OzOsoA','Settable\x20keys:\x20','isArray','Top-level\x20key\x20\x22','Missing\x20key\x20or\x20value.','list','Deleted\x20`','appcode','bool','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','\x20(global)','Set\x20a\x20configuration\x20value','raw','Get\x20a\x20config\x20value','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','value','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','256451nTdriH','Key\x20not\x20found:\x20','Missing\x20key\x20argument.','683355WerFxT','field','12205UJTcgr','stringify','156OKjNau','config','Config\x20files:\x0a','args','(none)','locale','read','\x20\x20project:\x20','179397WzDILz','apps','keys','set','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','664VSAdIx','alias','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','16ZWfhDY'];a22_0x230c=function(){return _0x812101;};return a22_0x230c();}(function(_0x22987a,_0x51d184){const _0x3f2a10=a22_0x3807,_0x59787e=_0x22987a();while(!![]){try{const _0x34dca7=parseInt(_0x3f2a10(0x19e))/0x1*(-parseInt(_0x3f2a10(0x194))/0x2)+parseInt(_0x3f2a10(0x170))/0x3+parseInt(_0x3f2a10(0x181))/0x4*(parseInt(_0x3f2a10(0x172))/0x5)+parseInt(_0x3f2a10(0x174))/0x6*(-parseInt(_0x3f2a10(0x15c))/0x7)+parseInt(_0x3f2a10(0x184))/0x8*(-parseInt(_0x3f2a10(0x17c))/0x9)+-parseInt(_0x3f2a10(0x19d))/0xa*(parseInt(_0x3f2a10(0x19f))/0xb)+parseInt(_0x3f2a10(0x195))/0xc*(parseInt(_0x3f2a10(0x16d))/0xd);if(_0x34dca7===_0x51d184)break;else _0x59787e['push'](_0x59787e['shift']());}catch(_0x1b264c){_0x59787e['push'](_0x59787e['shift']());}}}(a22_0x230c,0x63c96));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{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x4088b4){const _0x137893=a22_0x3807,_0x325fee=_0x4088b4['split']('.');if(_0x325fee[_0x137893(0x1a2)]!==0x3||_0x325fee[0x0]!==_0x137893(0x17d)||_0x325fee[0x2]!==_0x137893(0x163))return undefined;const _0x5423e2=_0x325fee[0x1]?.[_0x137893(0x18e)]();return _0x5423e2?_0x5423e2:undefined;}function parseAliasDeleteKey(_0x478d69){const _0x5f8acc=a22_0x3807,_0x45233d=_0x478d69[_0x5f8acc(0x18c)]('.');if(_0x45233d[_0x5f8acc(0x1a2)]===0x2&&_0x45233d[0x0]==='apps'){const _0x4a6ad3=_0x45233d[0x1]?.[_0x5f8acc(0x18e)]();return _0x4a6ad3?{'alias':_0x4a6ad3}:undefined;}if(_0x45233d[_0x5f8acc(0x1a2)]===0x3&&_0x45233d[0x0]===_0x5f8acc(0x17d)&&_0x45233d[0x2]===_0x5f8acc(0x163)){const _0x2128c0=_0x45233d[0x1]?.[_0x5f8acc(0x18e)]();return _0x2128c0?{'alias':_0x2128c0,'field':_0x5f8acc(0x163)}:undefined;}return undefined;}function setLocalAppAlias(_0x494d08,_0x15553b,_0x3ed189){const _0x665bb=a22_0x3807,_0x52731f=_0x494d08['apps']&&typeof _0x494d08['apps']===_0x665bb(0x186)&&!Array[_0x665bb(0x15e)](_0x494d08[_0x665bb(0x17d)])?_0x494d08[_0x665bb(0x17d)]:{},_0x4af878=_0x52731f[_0x15553b]&&typeof _0x52731f[_0x15553b]===_0x665bb(0x186)&&!Array[_0x665bb(0x15e)](_0x52731f[_0x15553b])?_0x52731f[_0x15553b]:{};_0x4af878[_0x665bb(0x163)]=_0x3ed189,_0x52731f[_0x15553b]=_0x4af878,_0x494d08[_0x665bb(0x17d)]=_0x52731f;}function deleteLocalAppAlias(_0x50a172,_0x354897){const _0x41783a=a22_0x3807;if(!_0x50a172[_0x41783a(0x17d)]||typeof _0x50a172[_0x41783a(0x17d)]!==_0x41783a(0x186)||Array[_0x41783a(0x15e)](_0x50a172[_0x41783a(0x17d)]))return![];const _0x5c335e=_0x50a172[_0x41783a(0x17d)],_0x59b875=_0x5c335e[_0x354897[_0x41783a(0x182)]];if(!_0x59b875||typeof _0x59b875!==_0x41783a(0x186)||Array['isArray'](_0x59b875))return![];if(!_0x354897[_0x41783a(0x171)])return delete _0x5c335e[_0x354897[_0x41783a(0x182)]],!![];if(!(_0x354897[_0x41783a(0x171)]in _0x59b875))return![];return delete _0x59b875[_0x354897[_0x41783a(0x171)]],Object[_0x41783a(0x17e)](_0x59b875)[_0x41783a(0x1a2)]===0x0&&delete _0x5c335e[_0x354897[_0x41783a(0x182)]],!![];}const listDef={'service':'config','command':a22_0x4ffe0b(0x161),'description':a22_0x4ffe0b(0x193),'risk':a22_0x4ffe0b(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x22f00d){const _0x37f006=a22_0x4ffe0b,{buildConfigFromFlags:_0x4f8dea}=await import('../../context.js'),_0x243ae6=_0x4f8dea({}),_0x5c4f9e=redactCliConfigCredentials(_0x243ae6[_0x37f006(0x168)]),_0x32a76f=getProjectConfigPath(),_0x47476d=resolveWriteConfigPath('global');if(_0x22f00d[_0x37f006(0x189)]===_0x37f006(0x187))return{'ok':!![],'message':_0x37f006(0x183)+(JSON['stringify'](_0x5c4f9e,null,0x2)+'\x0a\x0a')+_0x37f006(0x176)+(_0x37f006(0x17b)+(_0x32a76f??_0x37f006(0x178))+'\x0a')+('\x20\x20global:\x20\x20'+_0x47476d)};return{'ok':!![],'data':{'effective':_0x5c4f9e,'configFiles':{'project':_0x32a76f??null,'global':_0x47476d}}};}},getDef={'service':a22_0x4ffe0b(0x175),'command':a22_0x4ffe0b(0x199),'description':a22_0x4ffe0b(0x169),'risk':a22_0x4ffe0b(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x4ffe0b(0x196),'description':a22_0x4ffe0b(0x180),'required':!![]}],'flags':[],async 'execute'(_0x55c7d6){const _0x54f83a=a22_0x4ffe0b,_0x3111e3=_0x55c7d6['args'][0x0];if(!_0x3111e3)throw CliErrors[_0x54f83a(0x188)]('Missing\x20key\x20argument.',_0x54f83a(0x18d)+CLI_BIN_NAME+_0x54f83a(0x18a));const {buildConfigFromFlags:_0x28aea2}=await import('../../context.js'),{raw:_0x53cdac}=_0x28aea2({});if(_0x3111e3[_0x54f83a(0x198)]('.')){const _0x48411c=_0x3111e3[_0x54f83a(0x18c)]('.');let _0x1b47b1=_0x53cdac;for(const _0x2846ba of _0x48411c){if(_0x1b47b1==null||typeof _0x1b47b1!=='object')throw CliErrors[_0x54f83a(0x188)](_0x54f83a(0x16e)+_0x3111e3);_0x1b47b1=_0x1b47b1[_0x2846ba];}if(_0x1b47b1===undefined)throw CliErrors['validation'](_0x54f83a(0x16e)+_0x3111e3);const _0x2a72ad=redactCliConfigValue(_0x3111e3,_0x1b47b1);return console[_0x54f83a(0x1a0)](typeof _0x2a72ad===_0x54f83a(0x186)?JSON[_0x54f83a(0x173)](_0x2a72ad,null,0x2):String(_0x2a72ad)),{'ok':!![]};}const _0x10b376=_0x53cdac[_0x3111e3];if(_0x10b376===undefined)throw CliErrors[_0x54f83a(0x188)](_0x54f83a(0x16e)+_0x3111e3);const _0x55a26a=redactCliConfigValue(_0x3111e3,_0x10b376);return console[_0x54f83a(0x1a0)](typeof _0x55a26a===_0x54f83a(0x186)?JSON[_0x54f83a(0x173)](_0x55a26a,null,0x2):String(_0x55a26a)),{'ok':!![]};}},setDef={'service':a22_0x4ffe0b(0x175),'command':a22_0x4ffe0b(0x17f),'description':a22_0x4ffe0b(0x167),'risk':'write','confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x4ffe0b(0x196),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x4ffe0b(0x16b),'description':a22_0x4ffe0b(0x19b),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x1bf6af){const _0x142b53=a22_0x4ffe0b,_0x1ed6f8=_0x1bf6af[_0x142b53(0x177)][0x0],_0x1385b2=_0x1bf6af[_0x142b53(0x177)][0x1];if(!_0x1ed6f8||_0x1385b2===undefined)throw CliErrors[_0x142b53(0x188)](_0x142b53(0x160),_0x142b53(0x18d)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x1ed6f8]&&!ENUM_KEYS[_0x1ed6f8][_0x142b53(0x198)](_0x1385b2))throw CliErrors[_0x142b53(0x188)](_0x142b53(0x197)+_0x1ed6f8+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x1ed6f8]['join'](',\x20'));if(isCliProtectedConfigKey(_0x1ed6f8))throw CliErrors['validation']('\x22'+_0x1ed6f8+_0x142b53(0x165));if(_0x1ed6f8===_0x142b53(0x185)){const _0x399c4e=Number(_0x1385b2);if(isNaN(_0x399c4e)||_0x399c4e<=0x0)throw CliErrors[_0x142b53(0x188)](_0x142b53(0x19c));}const _0x445da2=resolveWriteScope({'explicitGlobal':_0x1bf6af[_0x142b53(0x164)]('global'),'policy':'project-or-global-explicit'}),_0x3d2a4b=toScopeFlags(_0x445da2),_0x36499c=readScopedConfig(_0x3d2a4b),_0x3345ae=parseAliasAppcodeSetKey(_0x1ed6f8);if(!_0x3345ae&&!isTopLevelConfigKey(_0x1ed6f8))throw CliErrors['validation'](_0x142b53(0x15f)+_0x1ed6f8+_0x142b53(0x19a),_0x142b53(0x15d)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');if(_0x3345ae)setLocalAppAlias(_0x36499c,_0x3345ae,_0x1385b2);else{if(_0x1ed6f8===_0x142b53(0x179)){const _0x5be35e=normalizeLocale(_0x1385b2);if(!_0x5be35e)throw CliErrors[_0x142b53(0x188)]('Invalid\x20locale\x20value.',_0x142b53(0x16a));_0x36499c[_0x142b53(0x179)]=_0x5be35e;}else _0x36499c[_0x1ed6f8]=_0x1ed6f8==='pageSize'?Number(_0x1385b2):DOMAIN_CONFIG_FIELDS['includes'](_0x1ed6f8)?normalizeDomainOrigin(_0x1ed6f8,_0x1385b2):_0x1385b2;}const _0x38b932=_0x1ed6f8==='accessKey'?maskCliAccessKey(_0x1385b2):!_0x3345ae&&_0x1ed6f8===_0x142b53(0x179)?String(_0x36499c[_0x142b53(0x179)]):_0x1385b2;return console['log'](_0x142b53(0x1a1)+_0x1ed6f8+_0x142b53(0x191)+_0x38b932+'\x22'+(_0x445da2===_0x142b53(0x18b)?_0x142b53(0x166):'')),writeScopedConfig(_0x36499c,_0x3d2a4b),{'ok':!![]};}},deleteDef={'service':a22_0x4ffe0b(0x175),'command':'delete','description':a22_0x4ffe0b(0x18f),'risk':'write','confirmationDescription':a22_0x4ffe0b(0x16c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x4ffe0b(0x196),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x311b4b){const _0x56173a=a22_0x4ffe0b,_0x246e4d=_0x311b4b['args'][0x0];if(!_0x246e4d)throw CliErrors['validation'](_0x56173a(0x16f),_0x56173a(0x18d)+CLI_BIN_NAME+_0x56173a(0x190));if(isCliProtectedConfigKey(_0x246e4d))throw CliErrors[_0x56173a(0x188)]('\x22'+_0x246e4d+_0x56173a(0x165));const _0x150143=resolveWriteScope({'explicitGlobal':_0x311b4b['bool'](_0x56173a(0x18b)),'policy':'project-or-global-explicit'}),_0x3813b3=toScopeFlags(_0x150143),_0x26c986=readScopedConfig(_0x3813b3),_0x36caeb=parseAliasDeleteKey(_0x246e4d);if(_0x36caeb){if(!deleteLocalAppAlias(_0x26c986,_0x36caeb))return console['log'](_0x56173a(0x192)+_0x246e4d+(_0x150143===_0x56173a(0x18b)?_0x56173a(0x166):'')),{'ok':!![],'data':{'key':_0x246e4d,'scope':_0x150143,'changed':![]}};return console[_0x56173a(0x1a0)](_0x56173a(0x162)+_0x246e4d+'`'+(_0x150143===_0x56173a(0x18b)?'\x20(global)':'')),writeScopedConfig(_0x26c986,_0x3813b3),{'ok':!![],'data':{'key':_0x246e4d,'scope':_0x150143,'changed':!![]}};}if(_0x26c986[_0x246e4d]===undefined)return console[_0x56173a(0x1a0)]('Key\x20already\x20absent:\x20'+_0x246e4d+(_0x150143===_0x56173a(0x18b)?_0x56173a(0x166):'')),{'ok':!![],'data':{'key':_0x246e4d,'scope':_0x150143,'changed':![]}};return delete _0x26c986[_0x246e4d],console[_0x56173a(0x1a0)](_0x56173a(0x162)+_0x246e4d+'`'+(_0x150143===_0x56173a(0x18b)?'\x20(global)':'')),writeScopedConfig(_0x26c986,_0x3813b3),{'ok':!![],'data':{'key':_0x246e4d,'scope':_0x150143,'changed':!![]}};}};function a22_0x3807(_0x4461bb,_0x313bf0){_0x4461bb=_0x4461bb-0x15c;const _0x230cd=a22_0x230c();let _0x3807e2=_0x230cd[_0x4461bb];return _0x3807e2;}export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x1f5080=a22_0x1ed6;(function(_0x54b1e5,_0x51e668){const _0x32d9c1=a22_0x1ed6,_0x34dccd=_0x54b1e5();while(!![]){try{const _0x43d29f=parseInt(_0x32d9c1(0xf3))/0x1*(-parseInt(_0x32d9c1(0xda))/0x2)+parseInt(_0x32d9c1(0xf9))/0x3+parseInt(_0x32d9c1(0xc8))/0x4+-parseInt(_0x32d9c1(0xe9))/0x5*(parseInt(_0x32d9c1(0xf6))/0x6)+-parseInt(_0x32d9c1(0xee))/0x7*(-parseInt(_0x32d9c1(0xe1))/0x8)+-parseInt(_0x32d9c1(0xe4))/0x9*(parseInt(_0x32d9c1(0xd2))/0xa)+-parseInt(_0x32d9c1(0xcf))/0xb*(-parseInt(_0x32d9c1(0xbc))/0xc);if(_0x43d29f===_0x51e668)break;else _0x34dccd['push'](_0x34dccd['shift']());}catch(_0x1279c7){_0x34dccd['push'](_0x34dccd['shift']());}}}(a22_0x3bbf,0x21d31));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';function a22_0x3bbf(){const _0x3e5364=['set','64444ofgrZd','\x20\x20global:\x20\x20','delete','key','format','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','Invalid\x20locale\x20value.','2110317yrVdEn','validation','keys','590QLaHvJ','includes','split','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Deleted\x20`','Usage:\x20','bool','pageSize\x20must\x20be\x20a\x20positive\x20number','8028ngvxYT','write','Invalid\x20value\x20for\x20\x22','list','Set\x20a\x20configuration\x20value','List\x20current\x20config','Missing\x20key\x20or\x20value.','33608QqbULQ','appcode','apps','11493ljkWnl','read','value','Top-level\x20key\x20\x22','Key\x20not\x20found:\x20','5akGlwW','log','\x20config\x20set\x20<key>\x20<value>\x20[--global]','length','stringify','14XKOtqi','args','Get\x20a\x20config\x20value','\x22\x20is\x20not\x20settable.','join','54qzmZbx','object','get','1513158fJayAk','config','isArray','248349pVBPjs','alias','locale','project-or-global-explicit','`\x20=\x20\x22','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x20config\x20delete\x20<key>\x20[--global]','Key\x20already\x20absent:\x20','\x20\x20project:\x20','accessKey','pageSize','global','36daHHAd','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','field','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x20(global)','pretty','../../context.js','raw','Settable\x20keys:\x20','Value\x20to\x20assign','trim'];a22_0x3bbf=function(){return _0x3e5364;};return a22_0x3bbf();}import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';function a22_0x1ed6(_0x5c9ca1,_0x874f9c){_0x5c9ca1=_0x5c9ca1-0xb5;const _0x3bbf66=a22_0x3bbf();let _0x1ed6ff=_0x3bbf66[_0x5c9ca1];return _0x1ed6ff;}import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x4ae06b){const _0x53e4f3=a22_0x1ed6,_0x5c7531=_0x4ae06b['split']('.');if(_0x5c7531[_0x53e4f3(0xec)]!==0x3||_0x5c7531[0x0]!=='apps'||_0x5c7531[0x2]!==_0x53e4f3(0xe2))return undefined;const _0x28fd16=_0x5c7531[0x1]?.[_0x53e4f3(0xc6)]();return _0x28fd16?_0x28fd16:undefined;}function parseAliasDeleteKey(_0xbdcf67){const _0x2c0709=a22_0x1ed6,_0x1d483d=_0xbdcf67[_0x2c0709(0xd4)]('.');if(_0x1d483d[_0x2c0709(0xec)]===0x2&&_0x1d483d[0x0]===_0x2c0709(0xe3)){const _0x5ae810=_0x1d483d[0x1]?.[_0x2c0709(0xc6)]();return _0x5ae810?{'alias':_0x5ae810}:undefined;}if(_0x1d483d[_0x2c0709(0xec)]===0x3&&_0x1d483d[0x0]===_0x2c0709(0xe3)&&_0x1d483d[0x2]===_0x2c0709(0xe2)){const _0x125aef=_0x1d483d[0x1]?.['trim']();return _0x125aef?{'alias':_0x125aef,'field':_0x2c0709(0xe2)}:undefined;}return undefined;}function setLocalAppAlias(_0x3930d9,_0x8ad744,_0x2f88ec){const _0xe68d67=a22_0x1ed6,_0x242a13=_0x3930d9[_0xe68d67(0xe3)]&&typeof _0x3930d9[_0xe68d67(0xe3)]===_0xe68d67(0xf4)&&!Array['isArray'](_0x3930d9[_0xe68d67(0xe3)])?_0x3930d9[_0xe68d67(0xe3)]:{},_0x3e72eb=_0x242a13[_0x8ad744]&&typeof _0x242a13[_0x8ad744]===_0xe68d67(0xf4)&&!Array['isArray'](_0x242a13[_0x8ad744])?_0x242a13[_0x8ad744]:{};_0x3e72eb['appcode']=_0x2f88ec,_0x242a13[_0x8ad744]=_0x3e72eb,_0x3930d9['apps']=_0x242a13;}function deleteLocalAppAlias(_0x418578,_0x1370e6){const _0x44b9f3=a22_0x1ed6;if(!_0x418578[_0x44b9f3(0xe3)]||typeof _0x418578[_0x44b9f3(0xe3)]!==_0x44b9f3(0xf4)||Array[_0x44b9f3(0xf8)](_0x418578[_0x44b9f3(0xe3)]))return![];const _0x5afd17=_0x418578[_0x44b9f3(0xe3)],_0x44c74d=_0x5afd17[_0x1370e6[_0x44b9f3(0xfa)]];if(!_0x44c74d||typeof _0x44c74d!==_0x44b9f3(0xf4)||Array['isArray'](_0x44c74d))return![];if(!_0x1370e6[_0x44b9f3(0xbe)])return delete _0x5afd17[_0x1370e6[_0x44b9f3(0xfa)]],!![];if(!(_0x1370e6[_0x44b9f3(0xbe)]in _0x44c74d))return![];return delete _0x44c74d[_0x1370e6[_0x44b9f3(0xbe)]],Object[_0x44b9f3(0xd1)](_0x44c74d)[_0x44b9f3(0xec)]===0x0&&delete _0x5afd17[_0x1370e6[_0x44b9f3(0xfa)]],!![];}const listDef={'service':'config','command':a22_0x1f5080(0xdd),'description':a22_0x1f5080(0xdf),'risk':a22_0x1f5080(0xe5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x57fb07){const _0x97c282=a22_0x1f5080,{buildConfigFromFlags:_0xbf16b9}=await import(_0x97c282(0xc2)),_0x5a3830=_0xbf16b9({}),_0xdff40=redactCliConfigCredentials(_0x5a3830[_0x97c282(0xc3)]),_0xa45184=getProjectConfigPath(),_0x129cda=resolveWriteConfigPath('global');if(_0x57fb07[_0x97c282(0xcc)]===_0x97c282(0xc1))return{'ok':!![],'message':_0x97c282(0xb5)+(JSON[_0x97c282(0xed)](_0xdff40,null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x97c282(0xb8)+(_0xa45184??'(none)')+'\x0a')+(_0x97c282(0xc9)+_0x129cda)};return{'ok':!![],'data':{'effective':_0xdff40,'configFiles':{'project':_0xa45184??null,'global':_0x129cda}}};}},getDef={'service':a22_0x1f5080(0xf7),'command':a22_0x1f5080(0xf5),'description':a22_0x1f5080(0xf0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a22_0x1f5080(0xbf),'required':!![]}],'flags':[],async 'execute'(_0x4b61da){const _0x58a268=a22_0x1f5080,_0xca3a01=_0x4b61da[_0x58a268(0xef)][0x0];if(!_0xca3a01)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x58a268(0xd7)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x88626f}=await import(_0x58a268(0xc2)),{raw:_0x355cab}=_0x88626f({});if(_0xca3a01[_0x58a268(0xd3)]('.')){const _0x3d9c67=_0xca3a01['split']('.');let _0x15604f=_0x355cab;for(const _0x1e9310 of _0x3d9c67){if(_0x15604f==null||typeof _0x15604f!==_0x58a268(0xf4))throw CliErrors[_0x58a268(0xd0)]('Key\x20not\x20found:\x20'+_0xca3a01);_0x15604f=_0x15604f[_0x1e9310];}if(_0x15604f===undefined)throw CliErrors[_0x58a268(0xd0)](_0x58a268(0xe8)+_0xca3a01);const _0x19e674=redactCliConfigValue(_0xca3a01,_0x15604f);return console[_0x58a268(0xea)](typeof _0x19e674===_0x58a268(0xf4)?JSON['stringify'](_0x19e674,null,0x2):String(_0x19e674)),{'ok':!![]};}const _0xd3be78=_0x355cab[_0xca3a01];if(_0xd3be78===undefined)throw CliErrors[_0x58a268(0xd0)]('Key\x20not\x20found:\x20'+_0xca3a01);const _0x2fa18b=redactCliConfigValue(_0xca3a01,_0xd3be78);return console[_0x58a268(0xea)](typeof _0x2fa18b==='object'?JSON['stringify'](_0x2fa18b,null,0x2):String(_0x2fa18b)),{'ok':!![]};}},setDef={'service':'config','command':a22_0x1f5080(0xc7),'description':a22_0x1f5080(0xde),'risk':a22_0x1f5080(0xdb),'confirmationDescription':a22_0x1f5080(0xbd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x1f5080(0xcb),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x1f5080(0xe6),'description':a22_0x1f5080(0xc5),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x205557){const _0x157f16=a22_0x1f5080,_0xfcc417=_0x205557[_0x157f16(0xef)][0x0],_0x19604a=_0x205557[_0x157f16(0xef)][0x1];if(!_0xfcc417||_0x19604a===undefined)throw CliErrors['validation'](_0x157f16(0xe0),_0x157f16(0xd7)+CLI_BIN_NAME+_0x157f16(0xeb));if(ENUM_KEYS[_0xfcc417]&&!ENUM_KEYS[_0xfcc417][_0x157f16(0xd3)](_0x19604a))throw CliErrors[_0x157f16(0xd0)](_0x157f16(0xdc)+_0xfcc417+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0xfcc417][_0x157f16(0xf2)](',\x20'));if(isCliProtectedConfigKey(_0xfcc417))throw CliErrors[_0x157f16(0xd0)]('\x22'+_0xfcc417+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0xfcc417==='pageSize'){const _0x1f9f10=Number(_0x19604a);if(isNaN(_0x1f9f10)||_0x1f9f10<=0x0)throw CliErrors['validation'](_0x157f16(0xd9));}const _0x2928b7=resolveWriteScope({'explicitGlobal':_0x205557[_0x157f16(0xd8)](_0x157f16(0xbb)),'policy':_0x157f16(0xfc)}),_0x513aec=toScopeFlags(_0x2928b7),_0x37de00=readScopedConfig(_0x513aec),_0x2156ad=parseAliasAppcodeSetKey(_0xfcc417);if(!_0x2156ad&&!isTopLevelConfigKey(_0xfcc417))throw CliErrors[_0x157f16(0xd0)](_0x157f16(0xe7)+_0xfcc417+_0x157f16(0xf1),_0x157f16(0xc4)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');if(_0x2156ad)setLocalAppAlias(_0x37de00,_0x2156ad,_0x19604a);else{if(_0xfcc417==='locale'){const _0x484953=normalizeLocale(_0x19604a);if(!_0x484953)throw CliErrors[_0x157f16(0xd0)](_0x157f16(0xce),_0x157f16(0xd5));_0x37de00['locale']=_0x484953;}else _0x37de00[_0xfcc417]=_0xfcc417===_0x157f16(0xba)?Number(_0x19604a):DOMAIN_CONFIG_FIELDS[_0x157f16(0xd3)](_0xfcc417)?normalizeDomainOrigin(_0xfcc417,_0x19604a):_0x19604a;}const _0x25f2e8=_0xfcc417===_0x157f16(0xb9)?maskCliAccessKey(_0x19604a):!_0x2156ad&&_0xfcc417===_0x157f16(0xfb)?String(_0x37de00[_0x157f16(0xfb)]):_0x19604a;return console[_0x157f16(0xea)]('Set\x20`'+_0xfcc417+_0x157f16(0xfd)+_0x25f2e8+'\x22'+(_0x2928b7===_0x157f16(0xbb)?_0x157f16(0xc0):'')),writeScopedConfig(_0x37de00,_0x513aec),{'ok':!![]};}},deleteDef={'service':a22_0x1f5080(0xf7),'command':a22_0x1f5080(0xca),'description':'Delete\x20a\x20configuration\x20value','risk':a22_0x1f5080(0xdb),'confirmationDescription':a22_0x1f5080(0xcd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x1f5080(0xcb),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x17a7eb){const _0x8c8a42=a22_0x1f5080,_0x97c154=_0x17a7eb[_0x8c8a42(0xef)][0x0];if(!_0x97c154)throw CliErrors[_0x8c8a42(0xd0)]('Missing\x20key\x20argument.',_0x8c8a42(0xd7)+CLI_BIN_NAME+_0x8c8a42(0xb6));if(isCliProtectedConfigKey(_0x97c154))throw CliErrors[_0x8c8a42(0xd0)]('\x22'+_0x97c154+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x174566=resolveWriteScope({'explicitGlobal':_0x17a7eb[_0x8c8a42(0xd8)](_0x8c8a42(0xbb)),'policy':_0x8c8a42(0xfc)}),_0x4b7b51=toScopeFlags(_0x174566),_0x31defb=readScopedConfig(_0x4b7b51),_0x5f56ec=parseAliasDeleteKey(_0x97c154);if(_0x5f56ec){if(!deleteLocalAppAlias(_0x31defb,_0x5f56ec))return console[_0x8c8a42(0xea)]('Key\x20already\x20absent:\x20'+_0x97c154+(_0x174566==='global'?_0x8c8a42(0xc0):'')),{'ok':!![],'data':{'key':_0x97c154,'scope':_0x174566,'changed':![]}};return console['log'](_0x8c8a42(0xd6)+_0x97c154+'`'+(_0x174566===_0x8c8a42(0xbb)?'\x20(global)':'')),writeScopedConfig(_0x31defb,_0x4b7b51),{'ok':!![],'data':{'key':_0x97c154,'scope':_0x174566,'changed':!![]}};}if(_0x31defb[_0x97c154]===undefined)return console[_0x8c8a42(0xea)](_0x8c8a42(0xb7)+_0x97c154+(_0x174566===_0x8c8a42(0xbb)?_0x8c8a42(0xc0):'')),{'ok':!![],'data':{'key':_0x97c154,'scope':_0x174566,'changed':![]}};return delete _0x31defb[_0x97c154],console[_0x8c8a42(0xea)]('Deleted\x20`'+_0x97c154+'`'+(_0x174566===_0x8c8a42(0xbb)?_0x8c8a42(0xc0):'')),writeScopedConfig(_0x31defb,_0x4b7b51),{'ok':!![],'data':{'key':_0x97c154,'scope':_0x174566,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x5c9c37=a23_0x2268;function a23_0x2268(_0x21e9de,_0x1d8714){_0x21e9de=_0x21e9de-0xa4;const _0x7a9a46=a23_0x7a9a();let _0x2268cc=_0x7a9a46[_0x21e9de];return _0x2268cc;}(function(_0x27907f,_0x3bce41){const _0x38c300=a23_0x2268,_0x452d6a=_0x27907f();while(!![]){try{const _0xdad685=parseInt(_0x38c300(0xaf))/0x1*(parseInt(_0x38c300(0xc6))/0x2)+parseInt(_0x38c300(0xcb))/0x3*(-parseInt(_0x38c300(0xc4))/0x4)+parseInt(_0x38c300(0xca))/0x5+parseInt(_0x38c300(0xbe))/0x6*(-parseInt(_0x38c300(0xc0))/0x7)+-parseInt(_0x38c300(0xd2))/0x8*(parseInt(_0x38c300(0xd8))/0x9)+parseInt(_0x38c300(0xc7))/0xa*(parseInt(_0x38c300(0xb2))/0xb)+parseInt(_0x38c300(0xa6))/0xc;if(_0xdad685===_0x3bce41)break;else _0x452d6a['push'](_0x452d6a['shift']());}catch(_0x574d0c){_0x452d6a['push'](_0x452d6a['shift']());}}}(a23_0x7a9a,0x8a767));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,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';function a23_0x7a9a(){const _0x372065=['47173uxDQXM','domains','official','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','8OTplez','Independent-deployment\x20Domain\x20JSON\x20file','136XsftwG','129770FVpZTw','manifestDomains','skill-domain','3120570AFvQyt','1626510WIRbiK','name','string','Region\x20\x22','cdn','Official\x20Lovrabet\x20region:\x20','ExitPromptError','16ulrmlV','routing','Select\x20Lovrabet\x20region','init','Custom\x20User\x20HTTPS\x20origin','Custom\x20Runtime\x20HTTPS\x20origin','527382XJoLXn','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','join','12229320KDskNf','mode','nonInteractive','api-domain','map','region','Available\x20regions:\x20','str','assign','7307JDjyev','runtime-domain','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','165XnoIQb','\x22\x20is\x20not\x20currently\x20available.','enterprise-v1','validation','write','Custom\x20knowledge-base\x20HTTPS\x20origin','length','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','label','keys','config','Custom\x20SkillHub\x20HTTPS\x20origin','504wSeSvn','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains'];a23_0x7a9a=function(){return _0x372065;};return a23_0x7a9a();}import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':'domain-config','type':a23_0x5c9c37(0xcd),'description':a23_0x5c9c37(0xc5)},{'name':'user-domain','type':'string','description':a23_0x5c9c37(0xd6)},{'name':a23_0x5c9c37(0xa9),'type':a23_0x5c9c37(0xcd),'description':'Custom\x20platform\x20API\x20HTTPS\x20origin'},{'name':a23_0x5c9c37(0xb0),'type':a23_0x5c9c37(0xcd),'description':a23_0x5c9c37(0xd7)},{'name':a23_0x5c9c37(0xc9),'type':a23_0x5c9c37(0xcd),'description':a23_0x5c9c37(0xbd)},{'name':'kb-domain','type':a23_0x5c9c37(0xcd),'description':a23_0x5c9c37(0xb7)}];export const configInitFlags=[{'name':'region','type':'string','description':a23_0x5c9c37(0xd0)+ENABLED_LOVRABET_REGION_VALUES[a23_0x5c9c37(0xa5)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x46ec26){const _0x3de061=a23_0x5c9c37,_0x35baf4=_0x46ec26['str'](_0x3de061(0xab));if(_0x35baf4){if(!isEnabledLovrabetRegion(_0x35baf4))throw CliErrors[_0x3de061(0xb5)](_0x3de061(0xce)+_0x35baf4+_0x3de061(0xb3),_0x3de061(0xac)+ENABLED_LOVRABET_REGION_VALUES[_0x3de061(0xa5)](',\x20'));return _0x35baf4;}if(_0x46ec26[_0x3de061(0xa8)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x3de061(0xd4),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x3de061(0xaa)](_0x2eff34=>({'name':OFFICIAL_ROUTING_PROFILES[_0x2eff34][_0x3de061(0xba)]+'\x20('+_0x2eff34+')','value':_0x2eff34}))});}catch(_0x1a4a3b){if(_0x1a4a3b?.[_0x3de061(0xcc)]===_0x3de061(0xd1))throw CliErrors['cancelled']();throw _0x1a4a3b;}}export async function executeConfigInit(_0x3f2cb9){const _0x5bd271=a23_0x5c9c37,_0x3c2cc5=resolveDomainConfigInput(_0x3f2cb9),_0x1d4574=_0x3c2cc5[_0x5bd271(0xc1)],_0x134746=Object[_0x5bd271(0xbb)](_0x1d4574)[_0x5bd271(0xb8)]>0x0;if(_0x134746&&_0x3f2cb9[_0x5bd271(0xad)](_0x5bd271(0xab)))throw CliErrors[_0x5bd271(0xb5)](_0x5bd271(0xc3));const _0x2e9935={'global':!![]},_0x33b88f=readScopedConfig(_0x2e9935);for(const _0x1ffdb7 of DOMAIN_CONFIG_FIELDS)delete _0x33b88f[_0x1ffdb7];for(const _0x27489b of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x33b88f[_0x27489b];delete _0x33b88f[_0x5bd271(0xd3)];let _0x42fb5c=null;if(_0x134746)delete _0x33b88f[_0x5bd271(0xab)],_0x3c2cc5[_0x5bd271(0xa7)]===_0x5bd271(0xb4)?_0x33b88f[_0x5bd271(0xd3)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x3c2cc5[_0x5bd271(0xc8)],'cdn':_0x3c2cc5[_0x5bd271(0xcf)]}:Object[_0x5bd271(0xae)](_0x33b88f,_0x1d4574);else{_0x42fb5c=await resolveRegion(_0x3f2cb9);if(_0x42fb5c===DEFAULT_LOVRABET_REGION)delete _0x33b88f[_0x5bd271(0xab)];else _0x33b88f[_0x5bd271(0xab)]=_0x42fb5c;}return writeScopedConfig(_0x33b88f,_0x2e9935),{'ok':!![],'message':_0x134746?_0x5bd271(0xa4)+Object[_0x5bd271(0xbb)](_0x3c2cc5['mode']===_0x5bd271(0xb4)?_0x3c2cc5[_0x5bd271(0xc8)]:_0x1d4574)[_0x5bd271(0xa5)](',\x20')+'.':_0x5bd271(0xb9)+_0x42fb5c+'.','data':{'mode':_0x134746?'independent':_0x5bd271(0xc2),'protocol':_0x3c2cc5[_0x5bd271(0xa7)]===_0x5bd271(0xb4)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x42fb5c,'domains':_0x1d4574,'cdn':_0x3c2cc5[_0x5bd271(0xa7)]===_0x5bd271(0xb4)?_0x3c2cc5[_0x5bd271(0xcf)]:undefined}};}export const configInitDefinition={'service':a23_0x5c9c37(0xbc),'command':a23_0x5c9c37(0xd5),'description':a23_0x5c9c37(0xbf),'risk':a23_0x5c9c37(0xb6),'confirmationDescription':a23_0x5c9c37(0xb1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a59d6,_0x1c4727){var _0x66049b=a24_0x3f9d,_0x41a518=_0x5a59d6();while(!![]){try{var _0x4b36eb=parseInt(_0x66049b(0x19b))/0x1+-parseInt(_0x66049b(0x195))/0x2+-parseInt(_0x66049b(0x194))/0x3*(parseInt(_0x66049b(0x196))/0x4)+parseInt(_0x66049b(0x193))/0x5*(parseInt(_0x66049b(0x197))/0x6)+parseInt(_0x66049b(0x198))/0x7+parseInt(_0x66049b(0x192))/0x8+parseInt(_0x66049b(0x19a))/0x9*(parseInt(_0x66049b(0x199))/0xa);if(_0x4b36eb===_0x1c4727)break;else _0x41a518['push'](_0x41a518['shift']());}catch(_0x28bf50){_0x41a518['push'](_0x41a518['shift']());}}}(a24_0x207c,0xae4c9));import{CLI_BIN_NAME}from'../../constant/cli.js';function a24_0x3f9d(_0x58cd2e,_0x199fcf){_0x58cd2e=_0x58cd2e-0x192;var _0x207c6b=a24_0x207c();var _0x3f9dac=_0x207c6b[_0x58cd2e];return _0x3f9dac;}function a24_0x207c(){var _0x401d09=['1793892EumKlK','228RRudtl','6rYuNhU','3470922hVyexq','10rZOPvf','7920657JZqokg','850309IMXTpV','5325752rmuCEB','373365eWbWMH','71355OFGiOP'];a24_0x207c=function(){return _0x401d09;};return a24_0x207c();}export{CLI_BIN_NAME};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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a25_0x3b3155=a25_0x2e99;function a25_0x2a59(){const _0x2c2a2d=['body','\x20\x20LOGICAL\x20COMBINATORS','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','join','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','high-risk-write','\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\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\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}','params','\x20\x20AGGREGATE\x20TYPES','data\x20','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\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]','update','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\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}','256480sXLXWH','Create\x20one\x20record\x20in\x20the\x20dataset','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\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}','command','now','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','batch','\x20\x20PARAMS\x20STRUCTURE','\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}}','\x20on\x20dataset\x20','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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}]','\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}','944ohOYbS','aggregate','operation','\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\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20completed\x20in\x20','code','34854funwpn','\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]','description','\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}}]}','helpExtra','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','delete','\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','confirmationDescription','360PzSsjD','\x20\x20EXAMPLES','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','/api/{appCode}/','batchCreate','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\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]}}','risk','422204JywOcD','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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.','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','filter','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\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\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\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}}','getOne','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','dryRun','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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\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','length','Update\x20an\x20existing\x20data\x20record','write','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','POST','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','str','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','6430550HrvLmK','9270XLnJEq','\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}}]}','read','274126JFymqg','create','\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}}','Get\x20a\x20single\x20record\x20by\x20ID','1804932zvNpzt'];a25_0x2a59=function(){return _0x2c2a2d;};return a25_0x2a59();}(function(_0x20134c,_0x234cb2){const _0x1b7552=a25_0x2e99,_0x50483b=_0x20134c();while(!![]){try{const _0x380f06=-parseInt(_0x1b7552(0x1cb))/0x1+-parseInt(_0x1b7552(0x18a))/0x2+parseInt(_0x1b7552(0x1b6))/0x3+-parseInt(_0x1b7552(0x1af))/0x4*(-parseInt(_0x1b7552(0x187))/0x5)+parseInt(_0x1b7552(0x18e))/0x6+-parseInt(_0x1b7552(0x186))/0x7+parseInt(_0x1b7552(0x1a1))/0x8*(parseInt(_0x1b7552(0x1c0))/0x9);if(_0x380f06===_0x234cb2)break;else _0x50483b['push'](_0x50483b['shift']());}catch(_0x35c431){_0x50483b['push'](_0x50483b['shift']());}}}(a25_0x2a59,0x875e3));import{executeData}from'../../core/sdk-client.js';function a25_0x2e99(_0xcc5e22,_0x19ab20){_0xcc5e22=_0xcc5e22-0x17b;const _0x2a59ef=a25_0x2a59();let _0x2e999d=_0x2a59ef[_0xcc5e22];return _0x2e999d;}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';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a25_0x3b3155(0x1d1),'operation':a25_0x3b3155(0x1d1),'risk':a25_0x3b3155(0x189),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a25_0x3b3155(0x19f)+a25_0x3b3155(0x1d0),'helpExtra':[a25_0x3b3155(0x1d2),a25_0x3b3155(0x1d7),'\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_0x3b3155(0x17b),a25_0x3b3155(0x1b3),'\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}}',a25_0x3b3155(0x1b2),a25_0x3b3155(0x1c9),a25_0x3b3155(0x18c),a25_0x3b3155(0x1aa),'\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}}','',a25_0x3b3155(0x190),a25_0x3b3155(0x1b9),a25_0x3b3155(0x188),'',a25_0x3b3155(0x185),a25_0x3b3155(0x180),a25_0x3b3155(0x19d),a25_0x3b3155(0x1ad),a25_0x3b3155(0x1cc),a25_0x3b3155(0x193),'','\x20\x20PAGINATION','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a25_0x3b3155(0x1cf),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a25_0x3b3155(0x19c),'\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',a25_0x3b3155(0x17c),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.']['join']('\x0a')},{'command':'getOne','operation':a25_0x3b3155(0x1d8),'risk':a25_0x3b3155(0x189),'paramsRequired':!![],'description':a25_0x3b3155(0x18d),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a25_0x3b3155(0x18b),'operation':a25_0x3b3155(0x18b),'risk':a25_0x3b3155(0x17f),'paramsRequired':!![],'description':a25_0x3b3155(0x1a2),'confirmationDescription':a25_0x3b3155(0x1c5),'paramsHint':a25_0x3b3155(0x197)},{'command':a25_0x3b3155(0x1c7),'operation':a25_0x3b3155(0x1c7),'risk':a25_0x3b3155(0x17f),'paramsRequired':!![],'description':a25_0x3b3155(0x184),'confirmationDescription':a25_0x3b3155(0x1d6),'paramsHint':a25_0x3b3155(0x1c8)},{'command':a25_0x3b3155(0x19e),'operation':'update','risk':a25_0x3b3155(0x17f),'paramsRequired':!![],'description':a25_0x3b3155(0x17e),'confirmationDescription':a25_0x3b3155(0x1cd),'paramsHint':a25_0x3b3155(0x1db)+a25_0x3b3155(0x1a3)},{'command':a25_0x3b3155(0x1bd),'operation':a25_0x3b3155(0x1bd),'risk':a25_0x3b3155(0x194),'paramsRequired':!![],'description':a25_0x3b3155(0x1c4),'confirmationDescription':a25_0x3b3155(0x1bb),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a25_0x3b3155(0x1b0),'operation':a25_0x3b3155(0x1b0),'risk':'read','paramsRequired':![],'description':a25_0x3b3155(0x191),'paramsHint':a25_0x3b3155(0x1dc)+a25_0x3b3155(0x1bc),'helpExtra':[a25_0x3b3155(0x19a),a25_0x3b3155(0x1a0),a25_0x3b3155(0x1ae),a25_0x3b3155(0x1a4),a25_0x3b3155(0x1d4),a25_0x3b3155(0x198),'\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\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}','',a25_0x3b3155(0x1a9),a25_0x3b3155(0x1b7),a25_0x3b3155(0x1ac),a25_0x3b3155(0x196),a25_0x3b3155(0x1c3),'\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\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}]','',a25_0x3b3155(0x182),a25_0x3b3155(0x1d9),a25_0x3b3155(0x1d3),'\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','','\x20\x20DATASET\x20BOUNDARY',a25_0x3b3155(0x1d5),a25_0x3b3155(0x1c2),'\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','',a25_0x3b3155(0x1c1),a25_0x3b3155(0x1ce),a25_0x3b3155(0x1be),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a25_0x3b3155(0x195),'',a25_0x3b3155(0x1a7)][a25_0x3b3155(0x192)]('\x0a')}];function makeDataCommand(_0x200d47){const _0x441224=a25_0x3b3155,_0x249673=_0x441224(0x19b)+_0x200d47[_0x441224(0x1a5)],_0x3b05fd={'service':'data','command':_0x200d47[_0x441224(0x1a5)],'description':_0x200d47[_0x441224(0x1b8)],'risk':_0x200d47[_0x441224(0x1ca)],..._0x200d47[_0x441224(0x1bf)]?{'confirmationDescription':_0x200d47[_0x441224(0x1bf)]}:{},'helpExtra':_0x200d47[_0x441224(0x1ba)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x200d47['paramsHint']}],'validate':async _0x134675=>{const _0x463732=_0x441224;_0x200d47['paramsRequired']&&requireAnyOf(_0x134675,[_0x463732(0x199)],_0x249673),_0x200d47[_0x463732(0x1b1)]===_0x463732(0x1c7)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x134675[_0x463732(0x183)](_0x463732(0x199)))),_0x200d47[_0x463732(0x1b1)]===_0x463732(0x19e)&&parseUpdateIdsFromParams(parseJsonParams(_0x134675[_0x463732(0x183)](_0x463732(0x199)))??{});},async 'execute'(_0x1be2b9){const _0x596389=_0x441224,_0x442f73=_0x1be2b9['str'](_0x596389(0x1b5)),_0x467880=_0x200d47['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1be2b9[_0x596389(0x183)](_0x596389(0x199)))):parseJsonParams(_0x1be2b9['str'](_0x596389(0x199)))??{},_0x505d80=_0x200d47[_0x596389(0x1b1)]==='update'?parseUpdateIdsFromParams(_0x467880):undefined,_0x26bd93=_0x505d80?normalizeUpdateParamsForRuntime(_0x467880,_0x505d80):_0x467880,_0x494def=Date[_0x596389(0x1a6)](),_0x2264ed=await executeData(_0x442f73,_0x200d47[_0x596389(0x1b1)],_0x26bd93),_0x521cb7=Date[_0x596389(0x1a6)]()-_0x494def,_0x4aea92=_0x505d80&&_0x505d80[_0x596389(0x17d)]>0x1?buildBatchUpdateResult(_0x505d80,_0x2264ed):_0x2264ed;return{'ok':!![],'data':{'result':_0x4aea92,'elapsed':_0x521cb7},'message':_0x596389(0x19b)+_0x200d47[_0x596389(0x1a5)]+_0x596389(0x1b4)+_0x521cb7+'ms'};}};return _0x200d47[_0x441224(0x1ca)]!==_0x441224(0x189)&&(_0x3b05fd[_0x441224(0x1da)]=async _0x553e3b=>{const _0x5eca0a=_0x441224,_0x31f31a=_0x553e3b[_0x5eca0a(0x183)](_0x5eca0a(0x1b5)),_0x48b6c6=_0x200d47['operation']===_0x5eca0a(0x1c7)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x553e3b[_0x5eca0a(0x183)](_0x5eca0a(0x199)))):parseJsonParams(_0x553e3b['str'](_0x5eca0a(0x199)))??{};let _0x516de8=_0x48b6c6;if(_0x200d47[_0x5eca0a(0x1b1)]===_0x5eca0a(0x19e)){const _0x221425=parseUpdateIdsFromParams(_0x48b6c6);_0x516de8=normalizeUpdateParamsForRuntime(_0x48b6c6,_0x221425);}return dryRun(_0x5eca0a(0x181),_0x5eca0a(0x1c6)+_0x31f31a+'/'+_0x200d47[_0x5eca0a(0x1b1)])[_0x5eca0a(0x18f)](_0x516de8)[_0x5eca0a(0x1b8)]('Preview:\x20data\x20'+_0x200d47['command']+_0x5eca0a(0x1ab)+_0x31f31a)['build']();}),_0x3b05fd;}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0xf3fa5c,_0x3c587f){const _0x1d44a5=a25_0x3b3155;return{'operation':_0x1d44a5(0x19e),'mode':_0x1d44a5(0x1a8),'ids':_0xf3fa5c,'total':_0xf3fa5c[_0x1d44a5(0x17d)],'result':_0x3c587f};}
|
|
1
|
+
function a25_0x26fd(){const _0x204656=['\x20completed\x20in\x20','\x20\x20PAGINATION','\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\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','confirmationDescription','7bOHTEx','dryRun','3fbvJQu','\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.','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint','write','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','batch','getOne','aggregate','176256nnjMxF','\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}}','build','\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]}}','\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\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','Update\x20an\x20existing\x20data\x20record','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','data','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\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','params','\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}]','10VkqSAZ','\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','batchCreate','read','create','469228WZghOz','helpExtra','\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}}','join','data\x20','high-risk-write','\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','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20AGGREGATE\x20TYPES','1615312bToZWy','risk','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','Create\x20one\x20record\x20in\x20the\x20dataset','\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}','description','6899508Xkcbtx','now','\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}}','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20PARAMS\x20STRUCTURE','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20DATASET\x20BOUNDARY','str','24NVtYtU','paramsRequired','Preview:\x20data\x20','length','\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}}','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','code','\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\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}}','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\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$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\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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}}','command','2300946BwcLHA','delete','filter','update','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','operation','POST','1106570CQrWjv','162403eloAwH'];a25_0x26fd=function(){return _0x204656;};return a25_0x26fd();}const a25_0x1fba5b=a25_0x57d1;(function(_0x251582,_0xca8e84){const _0x41b081=a25_0x57d1,_0x566cb3=_0x251582();while(!![]){try{const _0x7c6c57=-parseInt(_0x41b081(0xf1))/0x1+-parseInt(_0x41b081(0xc1))/0x2*(-parseInt(_0x41b081(0xfa))/0x3)+parseInt(_0x41b081(0xb8))/0x4*(-parseInt(_0x41b081(0xb3))/0x5)+-parseInt(_0x41b081(0xe8))/0x6*(parseInt(_0x41b081(0xf8))/0x7)+parseInt(_0x41b081(0xd1))/0x8*(-parseInt(_0x41b081(0x103))/0x9)+-parseInt(_0x41b081(0xf0))/0xa+parseInt(_0x41b081(0xc9))/0xb;if(_0x7c6c57===_0xca8e84)break;else _0x566cb3['push'](_0x566cb3['shift']());}catch(_0x140610){_0x566cb3['push'](_0x566cb3['shift']());}}}(a25_0x26fd,0x76667));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';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a25_0x1fba5b(0xea),'risk':'read','paramsRequired':![],'description':a25_0x1fba5b(0xd6),'paramsHint':a25_0x1fba5b(0xff)+a25_0x1fba5b(0xbf),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a25_0x1fba5b(0xd5),a25_0x1fba5b(0xba),'\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$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}',a25_0x1fba5b(0xcb),'\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_0x1fba5b(0xa8),a25_0x1fba5b(0xe6),a25_0x1fba5b(0xe1),a25_0x1fba5b(0x104),'','\x20\x20LOGICAL\x20COMBINATORS',a25_0x1fba5b(0xe2),'\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}}]}','','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a25_0x1fba5b(0xd7),'\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]',a25_0x1fba5b(0xb2),a25_0x1fba5b(0xad),a25_0x1fba5b(0xda),'',a25_0x1fba5b(0xf3),'\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a25_0x1fba5b(0xfb),a25_0x1fba5b(0xf5),'\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.',a25_0x1fba5b(0xb0),a25_0x1fba5b(0xdd),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a25_0x1fba5b(0xbb)]('\x0a')},{'command':a25_0x1fba5b(0x101),'operation':a25_0x1fba5b(0x101),'risk':a25_0x1fba5b(0xb6),'paramsRequired':!![],'description':a25_0x1fba5b(0xcc),'paramsHint':a25_0x1fba5b(0xaf)},{'command':a25_0x1fba5b(0xb7),'operation':a25_0x1fba5b(0xb7),'risk':a25_0x1fba5b(0xfe),'paramsRequired':!![],'description':a25_0x1fba5b(0xc6),'confirmationDescription':'Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a25_0x1fba5b(0xe4)},{'command':a25_0x1fba5b(0xb5),'operation':a25_0x1fba5b(0xb5),'risk':'write','paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','confirmationDescription':a25_0x1fba5b(0xc5),'paramsHint':a25_0x1fba5b(0xe0)},{'command':a25_0x1fba5b(0xeb),'operation':'update','risk':'write','paramsRequired':!![],'description':a25_0x1fba5b(0xac),'confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a25_0x1fba5b(0xc4)+a25_0x1fba5b(0xdb)},{'command':'delete','operation':a25_0x1fba5b(0xe9),'risk':a25_0x1fba5b(0xbd),'paramsRequired':!![],'description':'Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':a25_0x1fba5b(0xaf)},{'command':'aggregate','operation':a25_0x1fba5b(0x102),'risk':a25_0x1fba5b(0xb6),'paramsRequired':![],'description':a25_0x1fba5b(0xfc),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a25_0x1fba5b(0xdf),'helpExtra':[a25_0x1fba5b(0xc0),a25_0x1fba5b(0xc7),'\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\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\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}',a25_0x1fba5b(0xf4),'\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_0x1fba5b(0xa9),'',a25_0x1fba5b(0xcd),'\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]',a25_0x1fba5b(0xe5),'\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_0x1fba5b(0xc3),a25_0x1fba5b(0xde),'\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}]','',a25_0x1fba5b(0xce),a25_0x1fba5b(0xaa),a25_0x1fba5b(0xf6),a25_0x1fba5b(0xed),'',a25_0x1fba5b(0xcf),a25_0x1fba5b(0xe3),'\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL',a25_0x1fba5b(0xec),a25_0x1fba5b(0xab),'','\x20\x20EXAMPLES','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a25_0x1fba5b(0xb4),'',a25_0x1fba5b(0xd9),a25_0x1fba5b(0xbe),'',a25_0x1fba5b(0xd8)]['join']('\x0a')}];function a25_0x57d1(_0x54bf70,_0x2c6761){_0x54bf70=_0x54bf70-0xa7;const _0x26fd7f=a25_0x26fd();let _0x57d1c8=_0x26fd7f[_0x54bf70];return _0x57d1c8;}function makeDataCommand(_0x781ecd){const _0x16c216=a25_0x1fba5b,_0x3f1ec4=_0x16c216(0xbc)+_0x781ecd[_0x16c216(0xe7)],_0x1eada4={'service':_0x16c216(0xae),'command':_0x781ecd[_0x16c216(0xe7)],'description':_0x781ecd[_0x16c216(0xc8)],'risk':_0x781ecd[_0x16c216(0xc2)],..._0x781ecd[_0x16c216(0xf7)]?{'confirmationDescription':_0x781ecd['confirmationDescription']}:{},'helpExtra':_0x781ecd[_0x16c216(0xb9)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x781ecd[_0x16c216(0xfd)]}],'validate':async _0x2a6e8a=>{const _0x51d681=_0x16c216;_0x781ecd[_0x51d681(0xd2)]&&requireAnyOf(_0x2a6e8a,['params'],_0x3f1ec4),_0x781ecd['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2a6e8a[_0x51d681(0xd0)](_0x51d681(0xb1)))),_0x781ecd[_0x51d681(0xee)]===_0x51d681(0xeb)&&parseUpdateIdsFromParams(parseJsonParams(_0x2a6e8a[_0x51d681(0xd0)](_0x51d681(0xb1)))??{});},async 'execute'(_0x59f7a9){const _0x2cd5ab=_0x16c216,_0x23b9e2=_0x59f7a9[_0x2cd5ab(0xd0)]('code'),_0x2ff110=_0x781ecd[_0x2cd5ab(0xee)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x59f7a9[_0x2cd5ab(0xd0)](_0x2cd5ab(0xb1)))):parseJsonParams(_0x59f7a9[_0x2cd5ab(0xd0)](_0x2cd5ab(0xb1)))??{},_0x5cf714=_0x781ecd['operation']==='update'?parseUpdateIdsFromParams(_0x2ff110):undefined,_0x780270=_0x5cf714?normalizeUpdateParamsForRuntime(_0x2ff110,_0x5cf714):_0x2ff110,_0x2c8d87=Date[_0x2cd5ab(0xca)](),_0x54d2bb=await executeData(_0x23b9e2,_0x781ecd[_0x2cd5ab(0xee)],_0x780270),_0x323374=Date['now']()-_0x2c8d87,_0x4f9edf=_0x5cf714&&_0x5cf714[_0x2cd5ab(0xd4)]>0x1?buildBatchUpdateResult(_0x5cf714,_0x54d2bb):_0x54d2bb;return{'ok':!![],'data':{'result':_0x4f9edf,'elapsed':_0x323374},'message':_0x2cd5ab(0xbc)+_0x781ecd[_0x2cd5ab(0xe7)]+_0x2cd5ab(0xf2)+_0x323374+'ms'};}};return _0x781ecd[_0x16c216(0xc2)]!=='read'&&(_0x1eada4[_0x16c216(0xf9)]=async _0x3edea7=>{const _0x14f8e9=_0x16c216,_0x3ca87c=_0x3edea7[_0x14f8e9(0xd0)](_0x14f8e9(0xdc)),_0x89163=_0x781ecd[_0x14f8e9(0xee)]===_0x14f8e9(0xb5)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3edea7[_0x14f8e9(0xd0)](_0x14f8e9(0xb1)))):parseJsonParams(_0x3edea7[_0x14f8e9(0xd0)](_0x14f8e9(0xb1)))??{};let _0xafae2d=_0x89163;if(_0x781ecd[_0x14f8e9(0xee)]===_0x14f8e9(0xeb)){const _0x777ac6=parseUpdateIdsFromParams(_0x89163);_0xafae2d=normalizeUpdateParamsForRuntime(_0x89163,_0x777ac6);}return dryRun(_0x14f8e9(0xef),'/api/{appCode}/'+_0x3ca87c+'/'+_0x781ecd[_0x14f8e9(0xee)])['body'](_0xafae2d)[_0x14f8e9(0xc8)](_0x14f8e9(0xd3)+_0x781ecd[_0x14f8e9(0xe7)]+'\x20on\x20dataset\x20'+_0x3ca87c)[_0x14f8e9(0xa7)]();}),_0x1eada4;}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0x4cfefb,_0x9b7e3a){const _0x553f0b=a25_0x1fba5b;return{'operation':'update','mode':_0x553f0b(0x100),'ids':_0x4cfefb,'total':_0x4cfefb[_0x553f0b(0xd4)],'result':_0x9b7e3a};}
|