@lovrabet/lovrabet-cli 2.3.2-beta.1 → 2.3.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/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/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 +2 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
- package/lib/utils/platform.d.ts +0 -17
- package/lib/utils/platform.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x32a81c=a12_0x4ce1;(function(_0x51e0d8,_0x441503){const _0xf844f=a12_0x4ce1,_0x234edd=_0x51e0d8();while(!![]){try{const _0xc7acf6=parseInt(_0xf844f(0xe1))/0x1+-parseInt(_0xf844f(0xd0))/0x2+-parseInt(_0xf844f(0xce))/0x3*(parseInt(_0xf844f(0xef))/0x4)+parseInt(_0xf844f(0xd7))/0x5*(parseInt(_0xf844f(0xcc))/0x6)+parseInt(_0xf844f(0xc4))/0x7+-parseInt(_0xf844f(0xff))/0x8*(parseInt(_0xf844f(0xb9))/0x9)+-parseInt(_0xf844f(0xf5))/0xa*(parseInt(_0xf844f(0xe0))/0xb);if(_0xc7acf6===_0x441503)break;else _0x234edd['push'](_0x234edd['shift']());}catch(_0x165161){_0x234edd['push'](_0x234edd['shift']());}}}(a12_0x4800,0x86d65));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';function a12_0x4800(){const _0x229d17=['accessKeyCreatePath','ClientAk','Then\x20verify\x20with:\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','5597564EhXYBQ','Auth\x20mode:\x20','global\x20config','=ak_xxx','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','authRequired','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','AccessKey\x20cleared\x20from\x20','186cvpNMi','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','213hBAnux','Write\x20to\x20global\x20config\x20(default)','494894vdyXSS','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','info','validation','accessKey','\x20auth\x20status','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','112880csOcJW','project\x20config','`auth\x20login`\x20does\x20not\x20support\x20--yes.','env','logout','\x20env\x20var','AccessKey:\x20','boolean','read','887447eDKtmO','942484qaosZR','envName','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','bool','nonInteractive','Shorthand\x20for\x20--access-key','Invalid\x20accessKey\x20format.','\x20config','global','production','development','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','test','string','25528jxNfAP','\x20(via\x20','str','trim','\x20Current\x20env:\x20','stdout','30GcRvYn','code','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Option\x20B:\x20apps\x20config\x20(','auth','join','Missing\x20accessKey.','cancelled','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','write','8FARnSd','Clear\x20from\x20global\x20config\x20(default)','project','access-key','yes','AccessKey\x20saved\x20to\x20','userCenterDisplayName','\x20\x20export\x20','\x20config.','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20doctor','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.','scope','access_key','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Status:\x20valid','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','isTTY','push','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','ACCESS_KEY','8523891LLaQTj','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','No\x20AccessKey\x20found\x20in\x20','status','daily','Option\x20C:\x20environment\x20variable'];a12_0x4800=function(){return _0x229d17;};return a12_0x4800();}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';function a12_0x4ce1(_0x4bfb64,_0x37f9be){_0x4bfb64=_0x4bfb64-0xb4;const _0x48003e=a12_0x4800();let _0x4ce152=_0x48003e[_0x4bfb64];return _0x4ce152;}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(_0x68143=USER_ACCESS_KEY_CREATE_URL){const _0x590fef=a12_0x4ce1;writeCliSideChannelLine(_0x590fef(0xd6)+PRODUCT_CONFIG[_0x590fef(0x105)]+':'),writeCliSideChannelLine('\x0a'+_0x68143+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x590fef(0x108));}function buildAccessKeySetupGuide(_0x21ff2e=USER_ACCESS_KEY_CREATE_URL){const _0x254823=a12_0x4ce1;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':',_0x21ff2e,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x254823(0xba)][_0x254823(0xfa)]('\x0a');}function canPromptForAccessKey(_0x481b69){const _0x4a092d=a12_0x4ce1;return!_0x481b69[_0x4a092d(0xe5)]&&process['stdin'][_0x4a092d(0xb5)]!==![]&&process[_0x4a092d(0xf4)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x3eb499){const _0xed691c=a12_0x4ce1;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3eb499[_0xed691c(0xe4)](_0xed691c(0xe9)),'explicitProject':_0x3eb499[_0xed691c(0xe4)](_0xed691c(0x101)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x3ba4c0){const _0x5690fb=a12_0x4ce1;let _0x32c1=(_0x3ba4c0['str']('access-key')||_0x3ba4c0[_0x5690fb(0xf1)]('ak')||'')[_0x5690fb(0xf2)]();const _0x36961c=(_0x3ba4c0['str']('env')||'')[_0x5690fb(0xf2)](),_0x14ea5d=''+getUserDomain()+PRODUCT_CONFIG[_0x5690fb(0xc0)];if(!_0x32c1&&canPromptForAccessKey(_0x3ba4c0))try{showAccessKeyCreateHint(_0x14ea5d),_0x32c1=await promptAccessKey('');}catch(_0x3c1324){if(isAbortPrompt(_0x3c1324))throw CliErrors[_0x5690fb(0xfc)]();throw _0x3c1324;}if(!_0x32c1)throw CliErrors[_0x5690fb(0xd3)](_0x5690fb(0xfb),buildAccessKeySetupGuide(_0x14ea5d));if(!ACCESS_KEY_PATTERN[_0x5690fb(0xed)](_0x32c1))throw CliErrors[_0x5690fb(0xd3)](_0x5690fb(0xe7),_0x5690fb(0xb4));if(!_0x36961c)return{'accessKey':_0x32c1};const _0x249f48=normalizeEnv(_0x36961c);return{'accessKey':_0x32c1,'env':isDaily(_0x249f48)?_0x5690fb(0xbe):isDev(_0x249f48)?_0x5690fb(0xeb):_0x5690fb(0xea)};}export const authDefinitions=[{'service':a12_0x32a81c(0xf9),'command':'login','description':'Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','risk':'write','confirmationDescription':a12_0x32a81c(0x10a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x32a81c(0x102),'type':a12_0x32a81c(0xee),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x32a81c(0xee),'description':a12_0x32a81c(0xe6)},{'name':a12_0x32a81c(0xe9),'type':a12_0x32a81c(0xde),'description':a12_0x32a81c(0xcf),'default':!![]},{'name':'project','type':'boolean','description':a12_0x32a81c(0xbb),'default':![]}],async 'execute'(_0x3343be){const _0x2bfb34=a12_0x32a81c;if(_0x3343be[_0x2bfb34(0xe4)](_0x2bfb34(0x103)))throw CliErrors[_0x2bfb34(0xd3)](_0x2bfb34(0xd9),'Use\x20`'+CLI_BIN_NAME+_0x2bfb34(0xfd)+CLI_BIN_NAME+_0x2bfb34(0xf7));const _0x308a5c=(_0x3343be['str'](_0x2bfb34(0x102))||_0x3343be['str']('ak')||'')[_0x2bfb34(0xf2)]();if(!_0x308a5c&&_0x3343be[_0x2bfb34(0xe5)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x2bfb34(0xc0)])};const _0x34154b=await resolveAuthWriteInput(_0x3343be),_0x1f5323=resolveAuthScopeFlags(_0x3343be),_0xfc34f7=readScopedConfig(_0x1f5323);_0xfc34f7[_0x2bfb34(0xd4)]=_0x34154b[_0x2bfb34(0xd4)];_0x34154b[_0x2bfb34(0xda)]&&(_0xfc34f7[_0x2bfb34(0xda)]=_0x34154b['env']);writeScopedConfig(_0xfc34f7,_0x1f5323);const _0x1633cd=_0x1f5323[_0x2bfb34(0xe9)]?'global':_0x2bfb34(0x101),_0x1a8bb5=_0xfc34f7[_0x2bfb34(0xda)]?_0x2bfb34(0xf3)+_0xfc34f7[_0x2bfb34(0xda)]+'.':'';return{'ok':!![],'message':_0x2bfb34(0x104)+_0x1633cd+_0x2bfb34(0x107)+_0x1a8bb5+'\x20Verify:\x20'+CLI_BIN_NAME+_0x2bfb34(0xd5)};}},{'service':a12_0x32a81c(0xf9),'command':a12_0x32a81c(0xdb),'description':'Clear\x20the\x20AccessKey\x20from\x20config','risk':a12_0x32a81c(0xfe),'confirmationDescription':a12_0x32a81c(0xe3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x32a81c(0xe9),'type':a12_0x32a81c(0xde),'description':a12_0x32a81c(0x100),'default':!![]},{'name':'project','type':a12_0x32a81c(0xde),'description':a12_0x32a81c(0x10d),'default':![]}],async 'execute'(_0x1f29f9){const _0xbd20eb=a12_0x32a81c,_0x87ad4c=resolveAuthScopeFlags(_0x1f29f9),_0x14f7f0=readScopedConfig(_0x87ad4c),_0x140c6b=!!_0x14f7f0[_0xbd20eb(0xd4)];delete _0x14f7f0[_0xbd20eb(0xd4)],writeScopedConfig(_0x14f7f0,_0x87ad4c);const _0x2facfa=_0x87ad4c[_0xbd20eb(0xe9)]?'global':_0xbd20eb(0x101);if(_0x140c6b)return{'ok':!![],'message':_0xbd20eb(0xcb)+_0x2facfa+'\x20config.'};return{'ok':!![],'message':_0xbd20eb(0xbc)+_0x2facfa+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a12_0x32a81c(0xf9),'command':'status','description':'Show\x20current\x20authentication\x20status','risk':a12_0x32a81c(0xdf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x32a81c(0xe9),'type':a12_0x32a81c(0xde),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x32a81c(0x101),'type':a12_0x32a81c(0xde),'description':a12_0x32a81c(0xca),'default':![]},{'name':'check','type':a12_0x32a81c(0xde),'description':a12_0x32a81c(0xec),'default':![]}],async 'execute'(_0x2b038e){const _0x1b813c=a12_0x32a81c,_0x46cdb6=resolveAuthScopeFlags(_0x2b038e),_0x2f0290=readScopedConfig(_0x46cdb6),_0x141914=productEnvName(_0x1b813c(0xb8)),_0x17e6d7=productEnv('ACCESS_KEY')||undefined,_0x3068c9=_0x2f0290[_0x1b813c(0xd4)]||undefined,_0xec8035=_0x17e6d7||_0x3068c9,_0x719fe1=_0x17e6d7?_0x141914+_0x1b813c(0xdc):_0x3068c9?(_0x46cdb6[_0x1b813c(0xe9)]?_0x1b813c(0xe9):'project')+_0x1b813c(0xe8):null,_0x2b21b9=[_0x1b813c(0xc5)+AUTH_MODE[_0x1b813c(0xc1)]];if(_0xec8035){const _0x11ec88=maskCliAccessKey(_0xec8035);_0x2b21b9[_0x1b813c(0xb6)]('AccessKey:\x20'+_0x11ec88+(_0x719fe1?_0x1b813c(0xf0)+_0x719fe1+')':'')),_0x2b21b9['push'](_0x1b813c(0x10e));}if(!_0xec8035){_0x2b21b9[_0x1b813c(0xb6)](''),_0x2b21b9[_0x1b813c(0xb6)](_0x1b813c(0xc3)),_0x2b21b9[_0x1b813c(0xb6)](''),_0x2b21b9[_0x1b813c(0xb6)]('Option\x20A:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x2b21b9['push'](''),_0x2b21b9[_0x1b813c(0xb6)](_0x1b813c(0xf8)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x2b21b9[_0x1b813c(0xb6)](_0x1b813c(0xb7)),_0x2b21b9[_0x1b813c(0xb6)](''),_0x2b21b9['push'](_0x1b813c(0xbf)),_0x2b21b9[_0x1b813c(0xb6)](_0x1b813c(0x106)+_0x141914+_0x1b813c(0xc7)),_0x2b21b9[_0x1b813c(0xb6)](''),_0x2b21b9[_0x1b813c(0xb6)](_0x1b813c(0xc2)+CLI_BIN_NAME+_0x1b813c(0xd5)),_0x2b21b9[_0x1b813c(0xb6)](_0x1b813c(0xd1)+CLI_BIN_NAME+_0x1b813c(0x109));if(_0x2b038e[_0x1b813c(0xe4)]('check')){const _0xd53a0a=readStoredDeviceCode();if(_0xd53a0a&&!isStoredDeviceCodeExpired(_0xd53a0a)){const _0xe2d544=getUserDomain(),_0x3721f3=await fetchDeviceToken(_0xe2d544,_0xd53a0a[_0x1b813c(0xf6)]);if(_0x3721f3[_0x1b813c(0xbd)]==='success'&&_0x3721f3[_0x1b813c(0x10c)]){const _0x2d1b84={'global':_0xd53a0a['scope']===_0x1b813c(0xe9)},_0x5e8038=readScopedConfig(_0x2d1b84);_0x5e8038[_0x1b813c(0xd4)]=_0x3721f3[_0x1b813c(0x10c)],writeScopedConfig(_0x5e8038,_0x2d1b84),deleteStoredDeviceCode();const _0x21110e=_0x3721f3['access_key'],_0x7350ac=maskCliAccessKey(_0x21110e),_0x36296e=_0xd53a0a[_0x1b813c(0x10b)]==='global'?_0x1b813c(0xc6):_0x1b813c(0xd8);return{'ok':!![],'message':[_0x1b813c(0xc5)+AUTH_MODE['ClientAk'],_0x1b813c(0xdd)+_0x7350ac+_0x1b813c(0xf0)+_0x36296e+')','Status:\x20valid'][_0x1b813c(0xfa)]('\x0a')};}_0x3721f3[_0x1b813c(0xbd)]==='expired'&&deleteStoredDeviceCode();throw CliErrors['authRequired'](_0x1b813c(0xc8));}throw CliErrors[_0x1b813c(0xc9)](_0x2b21b9[_0x1b813c(0xfa)]('\x0a'));}}return{'ok':!![],'message':_0x2b21b9[_0x1b813c(0xfa)]('\x0a')};}},{'service':a12_0x32a81c(0xf9),'command':a12_0x32a81c(0xd2),'description':a12_0x32a81c(0xcd),'risk':a12_0x32a81c(0xdf),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x30a1d7){const _0x171e73=a12_0x32a81c,_0x4f31f7=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x4f31f7,'meta':{'env':_0x30a1d7[_0x171e73(0xe2)]??_0x171e73(0xea)}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x20eb84=a12_0x57bd;(function(_0x137a87,_0x3ac6ec){const _0x53d802=a12_0x57bd,_0x2131a2=_0x137a87();while(!![]){try{const _0x1c649e=-parseInt(_0x53d802(0x206))/0x1*(-parseInt(_0x53d802(0x1de))/0x2)+-parseInt(_0x53d802(0x21d))/0x3+-parseInt(_0x53d802(0x1f3))/0x4*(parseInt(_0x53d802(0x20e))/0x5)+-parseInt(_0x53d802(0x224))/0x6*(-parseInt(_0x53d802(0x218))/0x7)+-parseInt(_0x53d802(0x20d))/0x8+parseInt(_0x53d802(0x216))/0x9*(-parseInt(_0x53d802(0x1f1))/0xa)+-parseInt(_0x53d802(0x1cf))/0xb*(-parseInt(_0x53d802(0x20f))/0xc);if(_0x1c649e===_0x3ac6ec)break;else _0x2131a2['push'](_0x2131a2['shift']());}catch(_0x2992db){_0x2131a2['push'](_0x2131a2['shift']());}}}(a12_0x57d8,0xae851));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a12_0x57bd(_0x4a5e81,_0x1b82c6){_0x4a5e81=_0x4a5e81-0x1c6;const _0x57d846=a12_0x57d8();let _0x57bdd3=_0x57d846[_0x4a5e81];return _0x57bdd3;}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';function a12_0x57d8(){const _0x14349f=['Invalid\x20accessKey\x20format.','Show\x20current\x20authentication\x20status','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20doctor','2909982mTsjuV','Clear\x20from\x20global\x20config\x20(default)','access-key','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','AccessKey\x20(ak_xxx...)','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Option\x20A:\x20','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','\x20(via\x20','check','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.','77XTrImE','AccessKey\x20cleared\x20from\x20','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','AccessKey:\x20','\x20config.','nonInteractive','read','daily','trim','isTTY','production','Auth\x20mode:\x20','write','Write\x20to\x20global\x20config\x20(default)','status','2cbHIcs','\x20env\x20var','\x20auth\x20status','No\x20AccessKey\x20found\x20in\x20','Tip:\x20you\x20can\x20also\x20run:','auth','env','project','join','cancelled','accessKey','login','access_key','global-default','accessKeyCreatePath','Read\x20from\x20global\x20config\x20(default)','envName','=ak_xxx','userCenterDisplayName','8320tsWhpN','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','428IIxQwl','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','string','newConfigFileName','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','ClientAk','push','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','boolean','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Clear\x20the\x20AccessKey\x20from\x20config','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','global','Missing\x20accessKey.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','stdout','project\x20config','977234oOfZJV','code','AccessKey\x20saved\x20to\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','success','validation','Status:\x20valid','6753064BIdouD','11425aMoRoK','744936RDfhss','str','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','development','stdin','Use\x20`','scope','4122oxhZax','bool','14UoaPrz','info','yes','\x20config','ACCESS_KEY','591771msmdfw','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','authRequired'];a12_0x57d8=function(){return _0x14349f;};return a12_0x57d8();}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 showAccessKeyCreateHint(_0x58c9d2=USER_ACCESS_KEY_CREATE_URL){const _0x2769f6=a12_0x57bd;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x2769f6(0x1f0)]+':'),writeCliSideChannelLine('\x0a'+_0x58c9d2+'\x0a'),writeCliSideChannelLine(_0x2769f6(0x1e2)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x2769f6(0x1fd));}function buildAccessKeySetupGuide(_0x4567fb=USER_ACCESS_KEY_CREATE_URL){const _0x615d96=a12_0x57bd;return[_0x615d96(0x1c7)+PRODUCT_CONFIG[_0x615d96(0x1f0)]+':',_0x4567fb,_0x615d96(0x211)+CLI_BIN_NAME+_0x615d96(0x1fe)][_0x615d96(0x1e6)]('\x0a');}function canPromptForAccessKey(_0x510ad1){const _0x2eec17=a12_0x57bd;return!_0x510ad1[_0x2eec17(0x1d4)]&&process[_0x2eec17(0x213)][_0x2eec17(0x1d8)]!==![]&&process[_0x2eec17(0x204)][_0x2eec17(0x1d8)]!==![];}function resolveAuthScopeFlags(_0xacabd6){const _0x2bd7fd=a12_0x57bd;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0xacabd6['bool'](_0x2bd7fd(0x201)),'explicitProject':_0xacabd6['bool'](_0x2bd7fd(0x1e5)),'policy':_0x2bd7fd(0x1eb)}));}async function resolveAuthWriteInput(_0x9e5f35){const _0x4ca506=a12_0x57bd;let _0x1168eb=(_0x9e5f35[_0x4ca506(0x210)](_0x4ca506(0x1c6))||_0x9e5f35['str']('ak')||'')[_0x4ca506(0x1d7)]();const _0x28c1ba=(_0x9e5f35[_0x4ca506(0x210)]('env')||'')[_0x4ca506(0x1d7)](),_0x1572e1=''+getUserDomain()+PRODUCT_CONFIG[_0x4ca506(0x1ec)];if(!_0x1168eb&&canPromptForAccessKey(_0x9e5f35))try{showAccessKeyCreateHint(_0x1572e1),_0x1168eb=await promptAccessKey('');}catch(_0x2e51e5){if(isAbortPrompt(_0x2e51e5))throw CliErrors[_0x4ca506(0x1e7)]();throw _0x2e51e5;}if(!_0x1168eb)throw CliErrors[_0x4ca506(0x20b)](_0x4ca506(0x202),buildAccessKeySetupGuide(_0x1572e1));if(!ACCESS_KEY_PATTERN['test'](_0x1168eb))throw CliErrors['validation'](_0x4ca506(0x220),'Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x28c1ba)return{'accessKey':_0x1168eb};const _0x201718=normalizeEnv(_0x28c1ba);return{'accessKey':_0x1168eb,'env':isDaily(_0x201718)?_0x4ca506(0x1d6):isDev(_0x201718)?_0x4ca506(0x212):_0x4ca506(0x1d9)};}export const authDefinitions=[{'service':a12_0x20eb84(0x1e3),'command':a12_0x20eb84(0x1e9),'description':a12_0x20eb84(0x1cb),'risk':'write','confirmationDescription':a12_0x20eb84(0x1ce),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x20eb84(0x1c6),'type':'string','description':a12_0x20eb84(0x1c8)},{'name':'ak','type':a12_0x20eb84(0x1f5),'description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x20eb84(0x201),'type':a12_0x20eb84(0x1fc),'description':a12_0x20eb84(0x1dc),'default':!![]},{'name':a12_0x20eb84(0x1e5),'type':'boolean','description':a12_0x20eb84(0x1fa),'default':![]}],async 'execute'(_0x4da033){const _0x428892=a12_0x20eb84;if(_0x4da033['bool'](_0x428892(0x21a)))throw CliErrors[_0x428892(0x20b)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x428892(0x214)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x428892(0x203));const _0x2e5639=(_0x4da033['str'](_0x428892(0x1c6))||_0x4da033[_0x428892(0x210)]('ak')||'')['trim']();if(!_0x2e5639&&_0x4da033['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x428892(0x1ec)])};const _0x597dba=await resolveAuthWriteInput(_0x4da033),_0x620a99=resolveAuthScopeFlags(_0x4da033),_0x6d39ed=readScopedConfig(_0x620a99);_0x6d39ed['accessKey']=_0x597dba['accessKey'];_0x597dba[_0x428892(0x1e4)]&&(_0x6d39ed[_0x428892(0x1e4)]=_0x597dba['env']);writeScopedConfig(_0x6d39ed,_0x620a99);const _0x2b87ac=_0x620a99['global']?_0x428892(0x201):_0x428892(0x1e5),_0x26fca8=_0x6d39ed['env']?'\x20Current\x20env:\x20'+_0x6d39ed[_0x428892(0x1e4)]+'.':'';return{'ok':!![],'message':_0x428892(0x208)+_0x2b87ac+_0x428892(0x1d3)+_0x26fca8+'\x20Verify:\x20'+CLI_BIN_NAME+_0x428892(0x1e0)};}},{'service':a12_0x20eb84(0x1e3),'command':'logout','description':a12_0x20eb84(0x1ff),'risk':a12_0x20eb84(0x1db),'confirmationDescription':a12_0x20eb84(0x200),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x20eb84(0x201),'type':a12_0x20eb84(0x1fc),'description':a12_0x20eb84(0x225),'default':!![]},{'name':a12_0x20eb84(0x1e5),'type':'boolean','description':a12_0x20eb84(0x1f7),'default':![]}],async 'execute'(_0x32e9df){const _0x268d5b=a12_0x20eb84,_0x45703c=resolveAuthScopeFlags(_0x32e9df),_0x297759=readScopedConfig(_0x45703c),_0x333e18=!!_0x297759[_0x268d5b(0x1e8)];delete _0x297759['accessKey'],writeScopedConfig(_0x297759,_0x45703c);const _0x1780f4=_0x45703c['global']?_0x268d5b(0x201):_0x268d5b(0x1e5);if(_0x333e18)return{'ok':!![],'message':_0x268d5b(0x1d0)+_0x1780f4+_0x268d5b(0x1d3)};return{'ok':!![],'message':_0x268d5b(0x1e1)+_0x1780f4+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a12_0x20eb84(0x1e3),'command':a12_0x20eb84(0x1dd),'description':a12_0x20eb84(0x221),'risk':a12_0x20eb84(0x1d5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x20eb84(0x1fc),'description':a12_0x20eb84(0x1ed),'default':!![]},{'name':'project','type':a12_0x20eb84(0x1fc),'description':a12_0x20eb84(0x209),'default':![]},{'name':a12_0x20eb84(0x1cd),'type':a12_0x20eb84(0x1fc),'description':a12_0x20eb84(0x1f2),'default':![]}],async 'execute'(_0x18f521){const _0x1ec561=a12_0x20eb84,_0x123297=resolveAuthScopeFlags(_0x18f521),_0x42c88a=readScopedConfig(_0x123297),_0x140d5e=productEnvName(_0x1ec561(0x21c)),_0x508572=productEnv('ACCESS_KEY')||undefined,_0x522248=_0x42c88a[_0x1ec561(0x1e8)]||undefined,_0x2166c3=_0x508572||_0x522248,_0x5e64e6=_0x508572?_0x140d5e+_0x1ec561(0x1df):_0x522248?(_0x123297['global']?'global':_0x1ec561(0x1e5))+_0x1ec561(0x21b):null,_0x1451b0=[_0x1ec561(0x1da)+AUTH_MODE[_0x1ec561(0x1f8)]];if(_0x2166c3){const _0x577701=maskCliAccessKey(_0x2166c3);_0x1451b0[_0x1ec561(0x1f9)](_0x1ec561(0x1d2)+_0x577701+(_0x5e64e6?'\x20(via\x20'+_0x5e64e6+')':'')),_0x1451b0[_0x1ec561(0x1f9)](_0x1ec561(0x20c));}if(!_0x2166c3){_0x1451b0[_0x1ec561(0x1f9)](''),_0x1451b0[_0x1ec561(0x1f9)](_0x1ec561(0x1fb)),_0x1451b0['push'](''),_0x1451b0['push'](_0x1ec561(0x1ca)+CLI_BIN_NAME+_0x1ec561(0x1c9)),_0x1451b0[_0x1ec561(0x1f9)](''),_0x1451b0[_0x1ec561(0x1f9)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x1ec561(0x1f6)]+')'),_0x1451b0[_0x1ec561(0x1f9)](_0x1ec561(0x1f4)),_0x1451b0[_0x1ec561(0x1f9)](''),_0x1451b0['push']('Option\x20C:\x20environment\x20variable'),_0x1451b0[_0x1ec561(0x1f9)]('\x20\x20export\x20'+_0x140d5e+_0x1ec561(0x1ef)),_0x1451b0['push'](''),_0x1451b0[_0x1ec561(0x1f9)]('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x1ec561(0x1e0)),_0x1451b0[_0x1ec561(0x1f9)](_0x1ec561(0x222)+CLI_BIN_NAME+_0x1ec561(0x223));if(_0x18f521[_0x1ec561(0x217)]('check')){const _0x13c5ba=readStoredDeviceCode();if(_0x13c5ba&&!isStoredDeviceCodeExpired(_0x13c5ba)){const _0x211d66=getUserDomain(),_0x4af05f=await fetchDeviceToken(_0x211d66,_0x13c5ba[_0x1ec561(0x207)]);if(_0x4af05f[_0x1ec561(0x1dd)]===_0x1ec561(0x20a)&&_0x4af05f[_0x1ec561(0x1ea)]){const _0x4fb8ec={'global':_0x13c5ba[_0x1ec561(0x215)]===_0x1ec561(0x201)},_0x19d51d=readScopedConfig(_0x4fb8ec);_0x19d51d[_0x1ec561(0x1e8)]=_0x4af05f[_0x1ec561(0x1ea)],writeScopedConfig(_0x19d51d,_0x4fb8ec),deleteStoredDeviceCode();const _0x2d37b8=_0x4af05f[_0x1ec561(0x1ea)],_0xdf51fd=maskCliAccessKey(_0x2d37b8),_0x4a62f8=_0x13c5ba[_0x1ec561(0x215)]===_0x1ec561(0x201)?'global\x20config':_0x1ec561(0x205);return{'ok':!![],'message':[_0x1ec561(0x1da)+AUTH_MODE[_0x1ec561(0x1f8)],'AccessKey:\x20'+_0xdf51fd+_0x1ec561(0x1cc)+_0x4a62f8+')',_0x1ec561(0x20c)][_0x1ec561(0x1e6)]('\x0a')};}_0x4af05f[_0x1ec561(0x1dd)]==='expired'&&deleteStoredDeviceCode();throw CliErrors[_0x1ec561(0x21f)](_0x1ec561(0x1d1));}throw CliErrors[_0x1ec561(0x21f)](_0x1451b0[_0x1ec561(0x1e6)]('\x0a'));}}return{'ok':!![],'message':_0x1451b0[_0x1ec561(0x1e6)]('\x0a')};}},{'service':a12_0x20eb84(0x1e3),'command':a12_0x20eb84(0x219),'description':a12_0x20eb84(0x21e),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x444985){const _0x2ceb76=a12_0x20eb84,_0xf0ccd1=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0xf0ccd1,'meta':{'env':_0x444985[_0x2ceb76(0x1ee)]??'production'}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x4e99(){const _0x78dac4=['36aePUNj','removeListener','10118984sSXLLD','close','44119572rLqlxr','AccessKey\x20(paste\x20ak_...):\x20','trim','10169341SSJxfm','106398iTkxwr','3140PzBgxg','3729995uWjsRg','SIGINT','name','stdout','9TXKezb','AccessKey\x20(','16599hTPyXB','4106NXGtya','User\x20aborted\x20prompt','6iKrTnd','AbortPrompt','127VuqDlK','stdin','race'];a13_0x4e99=function(){return _0x78dac4;};return a13_0x4e99();}(function(_0x229ba7,_0x260620){const _0x3de3ea=a13_0xce56,_0x59147e=_0x229ba7();while(!![]){try{const _0x341dfa=parseInt(_0x3de3ea(0x1e0))/0x1*(parseInt(_0x3de3ea(0x1dc))/0x2)+parseInt(_0x3de3ea(0x1d3))/0x3*(parseInt(_0x3de3ea(0x1e3))/0x4)+parseInt(_0x3de3ea(0x1d5))/0x5+parseInt(_0x3de3ea(0x1de))/0x6*(parseInt(_0x3de3ea(0x1d2))/0x7)+-parseInt(_0x3de3ea(0x1e5))/0x8*(-parseInt(_0x3de3ea(0x1d9))/0x9)+parseInt(_0x3de3ea(0x1d4))/0xa*(parseInt(_0x3de3ea(0x1db))/0xb)+-parseInt(_0x3de3ea(0x1e7))/0xc;if(_0x341dfa===_0x260620)break;else _0x59147e['push'](_0x59147e['shift']());}catch(_0xeafeb0){_0x59147e['push'](_0x59147e['shift']());}}}(a13_0x4e99,0xcd433));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x1588b2=a13_0xce56;super(_0x1588b2(0x1dd)),this[_0x1588b2(0x1d7)]='AbortPrompt';}}function a13_0xce56(_0x3c9e66,_0x3b444d){_0x3c9e66=_0x3c9e66-0x1d2;const _0x4e99ad=a13_0x4e99();let _0xce56db=_0x4e99ad[_0x3c9e66];return _0xce56db;}function createSafeRl(){const _0x5df944=a13_0xce56,_0x2202ac=createInterface({'input':process[_0x5df944(0x1e1)],'output':process[_0x5df944(0x1d8)]});let _0x29cced;const _0x53ad61=new Promise((_0x58d2cb,_0x1e86e0)=>{const _0x467824=_0x5df944;_0x29cced=()=>{const _0x2dab24=a13_0xce56;_0x29cced&&(_0x2202ac['removeListener'](_0x2dab24(0x1d6),_0x29cced),_0x29cced=undefined);try{_0x2202ac[_0x2dab24(0x1e6)]();}catch{}_0x1e86e0(new AbortPrompt());},_0x2202ac['once'](_0x467824(0x1d6),_0x29cced);}),_0x132e04=()=>{const _0x4c221c=_0x5df944;_0x29cced&&(_0x2202ac[_0x4c221c(0x1e4)](_0x4c221c(0x1d6),_0x29cced),_0x29cced=undefined);try{_0x2202ac[_0x4c221c(0x1e6)]();}catch{}};return{'rl':_0x2202ac,'abortPromise':_0x53ad61,'disposeSuccess':_0x132e04};}export async function promptAccessKey(_0x2f2951=''){const _0x14aa4c=a13_0xce56,{rl:_0x36b857,abortPromise:_0x498b35,disposeSuccess:_0xf0fd1}=createSafeRl(),_0x3e5dff=new Promise(_0x35a7a2=>{const _0x12bffc=a13_0xce56,_0xa3588c=_0x2f2951?_0x12bffc(0x1da)+_0x2f2951+'):\x20':_0x12bffc(0x1e8);_0x36b857['question'](_0xa3588c,_0x294521=>{const _0x9f5f53=_0x12bffc;_0xf0fd1(),_0x35a7a2(_0x294521[_0x9f5f53(0x1e9)]()||_0x2f2951);});});return Promise[_0x14aa4c(0x1e2)]([_0x3e5dff,_0x498b35]);}export function isAbortPrompt(_0x2bc1f0){const _0x1d5199=a13_0xce56;return _0x2bc1f0 instanceof Error&&_0x2bc1f0[_0x1d5199(0x1d7)]===_0x1d5199(0x1df);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x1650(){const _0x3bc908=['27294ssfJsX','gmtModified','301blCons','7228jKqmKi','421768uBTLKk','4193340UGKBOD','name','Backend\x20Function\x20name','version','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','290836ERlTYQ','597aCAgQs','functionName','read','description','4243788RKdBpS','str','5691552DMTKNL','appCode','30XRaVuX'];a14_0x1650=function(){return _0x3bc908;};return a14_0x1650();}function a14_0x38a6(_0x43c073,_0x243d9d){_0x43c073=_0x43c073-0xdf;const _0x1650e2=a14_0x1650();let _0x38a68c=_0x1650e2[_0x43c073];return _0x38a68c;}const a14_0x281384=a14_0x38a6;(function(_0x4e7e25,_0x5a3374){const _0x41e8a8=a14_0x38a6,_0x2d008b=_0x4e7e25();while(!![]){try{const _0x30bce2=-parseInt(_0x41e8a8(0xf1))/0x1+parseInt(_0x41e8a8(0xea))/0x2*(parseInt(_0x41e8a8(0xf2))/0x3)+-parseInt(_0x41e8a8(0xeb))/0x4*(parseInt(_0x41e8a8(0xe6))/0x5)+parseInt(_0x41e8a8(0xe7))/0x6*(-parseInt(_0x41e8a8(0xe9))/0x7)+parseInt(_0x41e8a8(0xe4))/0x8+parseInt(_0x41e8a8(0xe2))/0x9+-parseInt(_0x41e8a8(0xec))/0xa;if(_0x30bce2===_0x5a3374)break;else _0x2d008b['push'](_0x2d008b['shift']());}catch(_0x4e23e8){_0x2d008b['push'](_0x2d008b['shift']());}}}(a14_0x1650,0x58cd5));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':'bff','command':'detail','description':a14_0x281384(0xf0),'risk':a14_0x281384(0xe0),'flags':[{...NAME_FLAG,'required':!![],'description':a14_0x281384(0xee)}],async 'execute'(_0x4c53d7){const _0x393aad=a14_0x281384,_0x5d06ab=await getBffEndpointContract(_0x4c53d7[_0x393aad(0xe5)],_0x4c53d7[_0x393aad(0xe3)](_0x393aad(0xed)));return{'ok':!![],'data':{'appCode':_0x5d06ab[_0x393aad(0xe5)],'functionName':_0x5d06ab[_0x393aad(0xdf)],'description':_0x5d06ab[_0x393aad(0xe1)]||'(none)','version':_0x5d06ab[_0x393aad(0xef)],'gmtModified':_0x5d06ab[_0x393aad(0xe8)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a15_0x3a3e4c=a15_0x1b38;(function(_0x5ee09c,_0x187c05){const _0x5d6e05=a15_0x1b38,_0x3fe753=_0x5ee09c();while(!![]){try{const _0x1bfc73=parseInt(_0x5d6e05(0x16c))/0x1+parseInt(_0x5d6e05(0x169))/0x2*(-parseInt(_0x5d6e05(0x176))/0x3)+-parseInt(_0x5d6e05(0x16e))/0x4+-parseInt(_0x5d6e05(0x175))/0x5*(-parseInt(_0x5d6e05(0x173))/0x6)+-parseInt(_0x5d6e05(0x167))/0x7*(-parseInt(_0x5d6e05(0x172))/0x8)+parseInt(_0x5d6e05(0x168))/0x9+-parseInt(_0x5d6e05(0x166))/0xa;if(_0x1bfc73===_0x187c05)break;else _0x3fe753['push'](_0x3fe753['shift']());}catch(_0x5314cb){_0x3fe753['push'](_0x3fe753['shift']());}}}(a15_0x1a83,0x1db1a));function a15_0x1a83(){const _0x333f59=['Backend\x20Function\x20name\x20to\x20execute','bff','140262fxuuKf','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','361260hKdBvi','Backend\x20Function\x20executed\x20in\x20','str','now','8wIKwCE','211614twuzzJ','params','15CtltgB','3PxmwMx','124730kOFFSl','146181iEkcGG','1747089hHYvNy','473318wMZwrD'];a15_0x1a83=function(){return _0x333f59;};return a15_0x1a83();}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a15_0x1b38(_0x44a75d,_0x3333f8){_0x44a75d=_0x44a75d-0x166;const _0x1a83cf=a15_0x1a83();let _0x1b3815=_0x1a83cf[_0x44a75d];return _0x1b3815;}export const bffExec={'service':a15_0x3a3e4c(0x16b),'command':'exec','description':a15_0x3a3e4c(0x16d),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x3a3e4c(0x16a)},PARAMS_FLAG],async 'execute'(_0x2db36d){const _0x32059f=a15_0x3a3e4c,_0x67234f=parseJsonParams(_0x2db36d[_0x32059f(0x170)](_0x32059f(0x174))),_0x35c07c=Date[_0x32059f(0x171)](),_0x145db1=await executeSdkBff(_0x2db36d['str']('name'),_0x67234f),_0x3e94c4=Date['now']()-_0x35c07c;return{'ok':!![],'data':{'result':_0x145db1,'elapsed':_0x3e94c4},'message':_0x32059f(0x16f)+_0x3e94c4+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x281cab,_0x39deb7){const _0x36339e=a16_0xb3d3,_0x1f2808=_0x281cab();while(!![]){try{const _0xd9c956=-parseInt(_0x36339e(0xdb))/0x1*(-parseInt(_0x36339e(0xd9))/0x2)+parseInt(_0x36339e(0xd7))/0x3+-parseInt(_0x36339e(0xda))/0x4+parseInt(_0x36339e(0xd6))/0x5*(-parseInt(_0x36339e(0xd8))/0x6)+parseInt(_0x36339e(0xd4))/0x7*(parseInt(_0x36339e(0xdc))/0x8)+parseInt(_0x36339e(0xd5))/0x9+-parseInt(_0x36339e(0xdd))/0xa;if(_0xd9c956===_0x39deb7)break;else _0x1f2808['push'](_0x1f2808['shift']());}catch(_0x31b81){_0x1f2808['push'](_0x1f2808['shift']());}}}(a16_0x5b6f,0x4a6ae));import{bffDetail}from'../../commands/bff/detail.js';function a16_0xb3d3(_0x116def,_0x45d0e8){_0x116def=_0x116def-0xd4;const _0x5b6f70=a16_0x5b6f();let _0xb3d376=_0x5b6f70[_0x116def];return _0xb3d376;}import{bffExec}from'../../commands/bff/exec.js';function a16_0x5b6f(){const _0x35a282=['1425306dNioSU','12GpZxLS','96vrEAtu','430480XZcBJW','1627ytnFfh','1113080Upgbbt','1569330eKfGCE','7erRVpc','2002590ahzjgE','863690TgYxnN'];a16_0x5b6f=function(){return _0x35a282;};return a16_0x5b6f();}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a17_0x270e(_0x4f92ab,_0x38140c){_0x4f92ab=_0x4f92ab-0xb4;const _0x3ea044=a17_0x3ea0();let _0x270ef6=_0x3ea044[_0x4f92ab];return _0x270ef6;}const a17_0x48305c=a17_0x270e;(function(_0x16956a,_0x49e565){const _0x524fed=a17_0x270e,_0x442d07=_0x16956a();while(!![]){try{const _0x12b0e5=-parseInt(_0x524fed(0xb6))/0x1+parseInt(_0x524fed(0xb7))/0x2+-parseInt(_0x524fed(0xbc))/0x3*(-parseInt(_0x524fed(0xc6))/0x4)+-parseInt(_0x524fed(0xb9))/0x5*(-parseInt(_0x524fed(0xbb))/0x6)+-parseInt(_0x524fed(0xb4))/0x7+-parseInt(_0x524fed(0xc9))/0x8+parseInt(_0x524fed(0xc2))/0x9*(-parseInt(_0x524fed(0xd0))/0xa);if(_0x12b0e5===_0x49e565)break;else _0x442d07['push'](_0x442d07['shift']());}catch(_0x44ce06){_0x442d07['push'](_0x442d07['shift']());}}}(a17_0x3ea0,0x1a9bd));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a17_0x48305c(0xc4),'command':a17_0x48305c(0xbe),'description':a17_0x48305c(0xc8),'risk':a17_0x48305c(0xbf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4f323e){const _0x304534=a17_0x48305c;logger['setLogPath'](process[_0x304534(0xbd)]()),logger[_0x304534(0xce)](_0x304534(0xcd),_0x304534(0xca));const _0x524f93=installBuiltinSkill({'stdio':_0x4f323e['nonInteractive']?'pipe':'inherit'});if(!_0x524f93['ok'])throw CliErrors['apiError'](_0x304534(0xb8)+(_0x524f93[_0x304534(0xc0)]||_0x304534(0xb5))+']:\x20'+(_0x524f93[_0x304534(0xcc)]||_0x304534(0xc5)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x524f93['repairCommand']);const _0x3bd77d=_0x524f93['installedPath']?'\x20at\x20'+_0x524f93[_0x304534(0xba)]:'';return console[_0x304534(0xc7)](_0x524f93['changed']?_0x304534(0xc3)+_0x524f93[_0x304534(0xcf)]+_0x304534(0xcb)+_0x3bd77d:'CLI\x20Built-in\x20Skill\x20'+_0x524f93[_0x304534(0xcf)]+_0x304534(0xc1)+_0x3bd77d),{'ok':!![]};}}];function a17_0x3ea0(){const _0x5e77db=['154772nFMTBJ','Built-in\x20Skill\x20install\x20failed\x20[','355VcNNWG','installedPath','15732ipqobv','384AFqqlY','cwd','install','read','code','\x20is\x20already\x20current','841473mPQBtf','CLI\x20Built-in\x20Skill\x20','cli-skill','unknown','2756geReUa','log','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','349416KSkxSp','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','\x20installed','error','cli-skill-install','info','skillVersion','20zcjqMO','79737HMHQbH','INSTALL_FAILED','689RnivqI'];a17_0x3ea0=function(){return _0x5e77db;};return a17_0x3ea0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd9280c,_0x5d93af){const _0xcb54b3=a18_0x14d4,_0x3921ce=_0xd9280c();while(!![]){try{const _0x199553=-parseInt(_0xcb54b3(0x191))/0x1+-parseInt(_0xcb54b3(0x197))/0x2+-parseInt(_0xcb54b3(0x18c))/0x3*(-parseInt(_0xcb54b3(0x18e))/0x4)+-parseInt(_0xcb54b3(0x199))/0x5+parseInt(_0xcb54b3(0x19f))/0x6*(-parseInt(_0xcb54b3(0x19c))/0x7)+-parseInt(_0xcb54b3(0x194))/0x8*(parseInt(_0xcb54b3(0x193))/0x9)+parseInt(_0xcb54b3(0x190))/0xa;if(_0x199553===_0x5d93af)break;else _0x3921ce['push'](_0x3921ce['shift']());}catch(_0x1a575f){_0x3921ce['push'](_0x3921ce['shift']());}}}(a18_0x51f6,0x3d797));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_0x14d4(_0x5538b6,_0x425104){_0x5538b6=_0x5538b6-0x18b;const _0x51f691=a18_0x51f6();let _0x14d49d=_0x51f691[_0x5538b6];return _0x14d49d;}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';export function resolveConfigScope(_0x401c9b){const _0x33aae1=a18_0x14d4,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x1a23f3}=_0x401c9b;if(explicitGlobal&&explicitProject)throw CliErrors[_0x33aae1(0x19a)](_0x33aae1(0x195),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0x33aae1(0x198);if(explicitProject)return'project';switch(_0x1a23f3){case _0x33aae1(0x18b):return'global';case'project-or-global-explicit':if(!(_0x401c9b[_0x33aae1(0x1a0)]??isInProject()))throw CliErrors['validation'](_0x33aae1(0x192)+PRODUCT_CONFIG['newConfigFileName']+_0x33aae1(0x19d),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0x33aae1(0x196)]+_0x33aae1(0x19b)+PRODUCT_CONFIG[_0x33aae1(0x196)]+_0x33aae1(0x18d));return _0x33aae1(0x19e);}}export function toScopeFlags(_0x3f470b){const _0x64691d=a18_0x14d4;return{'global':_0x3f470b===_0x64691d(0x198)};}function a18_0x51f6(){const _0x4d5b6b=['global-default','452286sXHpel','\x20first.','4JKWWKm','\x20(global)','13903510RBNvCg','150911bsmYMS','Not\x20inside\x20a\x20project\x20(no\x20','126ENmYGv','219720pmDFTS','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','newConfigFileName','759204TVqqAc','global','122310CXoDMk','validation',',\x20or\x20create\x20a\x20project-local\x20','2448803yDiSvL','\x20found).','project','6ShJKtn','inProject'];a18_0x51f6=function(){return _0x4d5b6b;};return a18_0x51f6();}export function formatScopeLabel(_0x3daeb9){const _0x5de95f=a18_0x14d4;return _0x3daeb9===_0x5de95f(0x198)?_0x5de95f(0x18f):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa8b87c,_0x20df35){const _0x1a4844=a19_0x5954,_0x4ecf10=_0xa8b87c();while(!![]){try{const _0x3f763d=-parseInt(_0x1a4844(0x170))/0x1+-parseInt(_0x1a4844(0x160))/0x2*(-parseInt(_0x1a4844(0x15c))/0x3)+-parseInt(_0x1a4844(0x15d))/0x4*(-parseInt(_0x1a4844(0x15b))/0x5)+parseInt(_0x1a4844(0x15a))/0x6*(-parseInt(_0x1a4844(0x16f))/0x7)+parseInt(_0x1a4844(0x16b))/0x8+parseInt(_0x1a4844(0x158))/0x9+-parseInt(_0x1a4844(0x15e))/0xa;if(_0x3f763d===_0x20df35)break;else _0x4ecf10['push'](_0x4ecf10['shift']());}catch(_0x3ddf33){_0x4ecf10['push'](_0x4ecf10['shift']());}}}(a19_0x2281,0xcb5b7));import{CliErrors}from'../../errors.js';function isSet(_0x4dbd39,_0x30dce4){const _0x2f363e=a19_0x5954,_0xf1095=_0x4dbd39[_0x2f363e(0x163)](_0x30dce4);return _0xf1095!==undefined&&_0xf1095!==''&&_0xf1095!==![]&&_0xf1095!==0x0;}function a19_0x2281(){const _0x36ca04=['some','length','filter','28pDvlma','44660gQrLLO','str','At\x20least\x20one\x20of\x20','\x20is\x20required\x20for\x20`','Flags\x20','9011943AIQpav','Exactly\x20one\x20of\x20','2087772RaAcOt','195OEPxEE','291hOaazb','94516xoNktC','7160680QnxmjS',':\x20expected\x20','20278wamubm','Use\x20only\x20one\x20of:\x20','map','flag','Only\x20one\x20of\x20',',\x20got\x20\x22','\x20are\x20mutually\x20exclusive\x20for\x20`','Remove\x20all\x20but\x20one.','join','Provide\x20one\x20of:\x20','validation','633488eCYGBO'];a19_0x2281=function(){return _0x36ca04;};return a19_0x2281();}function fmtNames(_0x9c2378){const _0x4532a5=a19_0x5954;return _0x9c2378[_0x4532a5(0x162)](_0x3f36d3=>'--'+_0x3f36d3)[_0x4532a5(0x168)](',\x20');}export function requireOneOf(_0x3a009f,_0x48e754,_0x2bfab1){const _0x33e1d5=a19_0x5954,_0x533e04=_0x48e754['filter'](_0x501a54=>isSet(_0x3a009f,_0x501a54));if(_0x533e04[_0x33e1d5(0x16d)]!==0x1)throw CliErrors['validation'](_0x533e04['length']===0x0?_0x33e1d5(0x159)+fmtNames(_0x48e754)+_0x33e1d5(0x156)+_0x2bfab1+'`.':_0x33e1d5(0x164)+fmtNames(_0x48e754)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x533e04)+'.',_0x533e04['length']===0x0?_0x33e1d5(0x169)+fmtNames(_0x48e754):_0x33e1d5(0x167));}export function requireAnyOf(_0x3600c3,_0x110c98,_0x199dbe){const _0x226ac9=a19_0x5954;if(!_0x110c98[_0x226ac9(0x16c)](_0x1668ea=>isSet(_0x3600c3,_0x1668ea)))throw CliErrors['validation'](_0x226ac9(0x155)+fmtNames(_0x110c98)+_0x226ac9(0x156)+_0x199dbe+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x110c98));}export function mutuallyExclusive(_0x3b21d4,_0x14ece6,_0x2d22bd){const _0x1e6e4a=a19_0x5954,_0x378b34=_0x14ece6[_0x1e6e4a(0x16e)](_0x364e8e=>isSet(_0x3b21d4,_0x364e8e));if(_0x378b34[_0x1e6e4a(0x16d)]>0x1)throw CliErrors[_0x1e6e4a(0x16a)](_0x1e6e4a(0x157)+fmtNames(_0x378b34)+_0x1e6e4a(0x166)+_0x2d22bd+'`.',_0x1e6e4a(0x161)+fmtNames(_0x14ece6));}function a19_0x5954(_0x309121,_0x289d43){_0x309121=_0x309121-0x154;const _0x2281b9=a19_0x2281();let _0x595454=_0x2281b9[_0x309121];return _0x595454;}export function validatePattern(_0x3b993c,_0x2afcce,_0x37804f,_0x4d680e){const _0x25fa11=a19_0x5954,_0xa01824=_0x3b993c[_0x25fa11(0x154)](_0x2afcce);if(_0xa01824&&!_0x37804f['test'](_0xa01824))throw CliErrors[_0x25fa11(0x16a)]('Invalid\x20--'+_0x2afcce+_0x25fa11(0x15f)+_0x4d680e+_0x25fa11(0x165)+_0xa01824+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x29e2a8=a20_0x529a;(function(_0x3f0b0a,_0x3d8bba){const _0x3c2710=a20_0x529a,_0x3eacd3=_0x3f0b0a();while(!![]){try{const _0x519587=-parseInt(_0x3c2710(0xbf))/0x1*(-parseInt(_0x3c2710(0xcc))/0x2)+parseInt(_0x3c2710(0xc5))/0x3+-parseInt(_0x3c2710(0xc1))/0x4+parseInt(_0x3c2710(0xce))/0x5+parseInt(_0x3c2710(0xc2))/0x6+parseInt(_0x3c2710(0xc9))/0x7+-parseInt(_0x3c2710(0xc3))/0x8;if(_0x519587===_0x3d8bba)break;else _0x3eacd3['push'](_0x3eacd3['shift']());}catch(_0x2010ef){_0x3eacd3['push'](_0x3eacd3['shift']());}}}(a20_0x511b,0x33687));export const GLOBAL_SCOPE_FLAG={'name':'global','type':a20_0x29e2a8(0xcd),'default':![],'description':a20_0x29e2a8(0xcb)};export const CODE_FLAG={'name':'code','type':a20_0x29e2a8(0xcf),'required':!![],'description':a20_0x29e2a8(0xc8),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'}};export const SQLCODE_FLAG={'name':a20_0x29e2a8(0xc4),'type':a20_0x29e2a8(0xcf),'required':!![],'description':a20_0x29e2a8(0xca),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':'verbose','type':a20_0x29e2a8(0xcd),'description':'Return\x20full\x20raw\x20response\x20object'};function a20_0x529a(_0x3529f4,_0x3c3304){_0x3529f4=_0x3529f4-0xbf;const _0x511b73=a20_0x511b();let _0x529af3=_0x511b73[_0x3529f4];return _0x529af3;}function a20_0x511b(){const _0x1358f2=['string','77nuKtRh','number','493236ejhpzV','169470rAOVUA','3310496QlRYTw','sqlcode','96705fIWVKk','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','params','Dataset\x20code\x20(32-char\x20hex\x20UUID)','274666BpqJtl','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Write\x20to\x20the\x20global\x20configuration','8184OUNwGG','boolean','1664430NKPzFT'];a20_0x511b=function(){return _0x1358f2;};return a20_0x511b();}export const PARAMS_FLAG={'name':a20_0x29e2a8(0xc7),'type':a20_0x29e2a8(0xcf),'description':a20_0x29e2a8(0xc6)};export const NAME_FLAG={'name':'name','type':a20_0x29e2a8(0xcf),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a20_0x29e2a8(0xc0),'required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c4555,_0x13fc64){const _0x1ead81=a21_0x54ec,_0x320251=_0x5c4555();while(!![]){try{const _0x311849=-parseInt(_0x1ead81(0x146))/0x1+-parseInt(_0x1ead81(0x13d))/0x2+-parseInt(_0x1ead81(0x145))/0x3*(parseInt(_0x1ead81(0x149))/0x4)+parseInt(_0x1ead81(0x141))/0x5*(-parseInt(_0x1ead81(0x13b))/0x6)+-parseInt(_0x1ead81(0x148))/0x7*(-parseInt(_0x1ead81(0x13a))/0x8)+-parseInt(_0x1ead81(0x142))/0x9*(parseInt(_0x1ead81(0x147))/0xa)+parseInt(_0x1ead81(0x139))/0xb;if(_0x311849===_0x13fc64)break;else _0x320251['push'](_0x320251['shift']());}catch(_0x3a0a3b){_0x320251['push'](_0x320251['shift']());}}}(a21_0x5f0a,0xb2246));import{existsSync,statSync}from'node:fs';function a21_0x5f0a(){const _0x40efca=['813030ckxukX','70SzoSct','2087288WnaIPA','4WIEOUA','File\x20not\x20found:\x20','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','38036526cvtLbr','24QfCHKK','6placPi','\x20path\x20is\x20required.','43154RhlixZ','size','toFixed','trim','7125200RZXpuI','398646HrIYbN','File\x20is\x20not\x20a\x20regular\x20file:\x20','validation','3159129CQpbeK'];a21_0x5f0a=function(){return _0x40efca;};return a21_0x5f0a();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a21_0x54ec(_0x4a25b6,_0x468c40){_0x4a25b6=_0x4a25b6-0x138;const _0x5f0abe=a21_0x5f0a();let _0x54ec4f=_0x5f0abe[_0x4a25b6];return _0x54ec4f;}function formatBytes(_0x3fe38a){const _0x1a3ef2=a21_0x54ec;if(_0x3fe38a>=BYTES_PER_MB){const _0x56eda2=Math['ceil'](_0x3fe38a/BYTES_PER_MB*0x64)/0x64;return _0x56eda2[_0x1a3ef2(0x13f)](0x2)+'\x20MB';}return _0x3fe38a+'\x20B';}export function requireRuntimeUploadFile(_0x20083a,_0x18923d){const _0x2c2462=a21_0x54ec,_0x47baa9=_0x20083a[_0x2c2462(0x140)]();if(!_0x47baa9)throw CliErrors[_0x2c2462(0x144)](_0x18923d+_0x2c2462(0x13c));if(!existsSync(_0x47baa9))throw CliErrors['validation'](_0x2c2462(0x14a)+_0x47baa9);const _0x411a8b=statSync(_0x47baa9);if(!_0x411a8b['isFile']())throw CliErrors[_0x2c2462(0x144)](_0x2c2462(0x143)+_0x47baa9);if(_0x411a8b['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x2c2462(0x144)](_0x2c2462(0x138)+_0x47baa9+'\x20('+formatBytes(_0x411a8b['size'])+')');return{'path':_0x47baa9,'size':_0x411a8b[_0x2c2462(0x13e)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x3ecc11=a22_0x2648;(function(_0xde1ef8,_0x1dd36a){const _0x60df46=a22_0x2648,_0x1b1b8c=_0xde1ef8();while(!![]){try{const _0x30393e=parseInt(_0x60df46(0x1cb))/0x1*(parseInt(_0x60df46(0x1ac))/0x2)+-parseInt(_0x60df46(0x190))/0x3+-parseInt(_0x60df46(0x1b1))/0x4*(-parseInt(_0x60df46(0x1d0))/0x5)+parseInt(_0x60df46(0x1ab))/0x6+parseInt(_0x60df46(0x1ba))/0x7*(-parseInt(_0x60df46(0x1b8))/0x8)+parseInt(_0x60df46(0x19e))/0x9*(parseInt(_0x60df46(0x194))/0xa)+parseInt(_0x60df46(0x193))/0xb;if(_0x30393e===_0x1dd36a)break;else _0x1b1b8c['push'](_0x1b1b8c['shift']());}catch(_0x5a0282){_0x1b1b8c['push'](_0x1b1b8c['shift']());}}}(a22_0x3e26,0x54f16));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 a22_0x2648(_0x2eb9bd,_0x4dd674){_0x2eb9bd=_0x2eb9bd-0x18b;const _0x3e26ad=a22_0x3e26();let _0x26484e=_0x3e26ad[_0x2eb9bd];return _0x26484e;}function a22_0x3e26(){const _0x3df797=['config','(none)','Get\x20a\x20config\x20value','value','\x20config\x20delete\x20<key>\x20[--global]','global','../../context.js','46152GzUWMU','\x20config\x20get\x20<key>','stringify','validation','List\x20current\x20config','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','`\x20=\x20\x22','raw','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','pretty','key','split','549060DahxCg','2VWfieS','format','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','alias','length','2216yoCDIy','bool','Set\x20a\x20configuration\x20value','trim','apps','Missing\x20key\x20argument.','project-or-global-explicit','8jeeyzB','join','3280690UJowfO','pageSize','Top-level\x20key\x20\x22','Config\x20files:\x0a','appcode','Usage:\x20','isArray','keys','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','log','accessKey','\x20config\x20set\x20<key>\x20<value>\x20[--global]','args','includes','\x20(global)','object',';\x20apps.<alias>.appcode','378253oPWNnE','\x22\x20is\x20not\x20settable.','\x22.\x20Allowed:\x20','\x20\x20project:\x20','field','5uYEhwn','\x20\x20global:\x20\x20','read','Missing\x20key\x20or\x20value.','get','locale','Delete\x20a\x20configuration\x20value','881256EQdSFc','write','Deleted\x20`','3768677NexnGB','580SmpniM','Key\x20not\x20found:\x20','list'];a22_0x3e26=function(){return _0x3df797;};return a22_0x3e26();}function parseAliasAppcodeSetKey(_0x430360){const _0x23e51d=a22_0x2648,_0x173b17=_0x430360[_0x23e51d(0x1aa)]('.');if(_0x173b17[_0x23e51d(0x1b0)]!==0x3||_0x173b17[0x0]!==_0x23e51d(0x1b5)||_0x173b17[0x2]!==_0x23e51d(0x1be))return undefined;const _0x2c99a4=_0x173b17[0x1]?.[_0x23e51d(0x1b4)]();return _0x2c99a4?_0x2c99a4:undefined;}function parseAliasDeleteKey(_0x2112e1){const _0x36afa3=a22_0x2648,_0x567bd1=_0x2112e1[_0x36afa3(0x1aa)]('.');if(_0x567bd1[_0x36afa3(0x1b0)]===0x2&&_0x567bd1[0x0]===_0x36afa3(0x1b5)){const _0x1196d4=_0x567bd1[0x1]?.[_0x36afa3(0x1b4)]();return _0x1196d4?{'alias':_0x1196d4}:undefined;}if(_0x567bd1[_0x36afa3(0x1b0)]===0x3&&_0x567bd1[0x0]===_0x36afa3(0x1b5)&&_0x567bd1[0x2]===_0x36afa3(0x1be)){const _0x4b2656=_0x567bd1[0x1]?.['trim']();return _0x4b2656?{'alias':_0x4b2656,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x1bc9ef,_0x15316d,_0x2e685f){const _0x269cf5=a22_0x2648,_0x4deacc=_0x1bc9ef[_0x269cf5(0x1b5)]&&typeof _0x1bc9ef[_0x269cf5(0x1b5)]==='object'&&!Array[_0x269cf5(0x1c0)](_0x1bc9ef[_0x269cf5(0x1b5)])?_0x1bc9ef[_0x269cf5(0x1b5)]:{},_0x2f5eaa=_0x4deacc[_0x15316d]&&typeof _0x4deacc[_0x15316d]==='object'&&!Array[_0x269cf5(0x1c0)](_0x4deacc[_0x15316d])?_0x4deacc[_0x15316d]:{};_0x2f5eaa[_0x269cf5(0x1be)]=_0x2e685f,_0x4deacc[_0x15316d]=_0x2f5eaa,_0x1bc9ef[_0x269cf5(0x1b5)]=_0x4deacc;}function deleteLocalAppAlias(_0x14ea4d,_0x27d068){const _0x11f19e=a22_0x2648;if(!_0x14ea4d[_0x11f19e(0x1b5)]||typeof _0x14ea4d[_0x11f19e(0x1b5)]!=='object'||Array[_0x11f19e(0x1c0)](_0x14ea4d[_0x11f19e(0x1b5)]))return![];const _0x5607c6=_0x14ea4d[_0x11f19e(0x1b5)],_0x3767a5=_0x5607c6[_0x27d068[_0x11f19e(0x1af)]];if(!_0x3767a5||typeof _0x3767a5!=='object'||Array['isArray'](_0x3767a5))return![];if(!_0x27d068[_0x11f19e(0x1cf)])return delete _0x5607c6[_0x27d068[_0x11f19e(0x1af)]],!![];if(!(_0x27d068[_0x11f19e(0x1cf)]in _0x3767a5))return![];return delete _0x3767a5[_0x27d068[_0x11f19e(0x1cf)]],Object[_0x11f19e(0x1c1)](_0x3767a5)['length']===0x0&&delete _0x5607c6[_0x27d068['alias']],!![];}const listDef={'service':a22_0x3ecc11(0x197),'command':a22_0x3ecc11(0x196),'description':a22_0x3ecc11(0x1a2),'risk':a22_0x3ecc11(0x18b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1c8ea0){const _0x29e974=a22_0x3ecc11,{buildConfigFromFlags:_0x1b2941}=await import('../../context.js'),_0x2bde56=_0x1b2941({}),_0x4d45db=redactCliConfigCredentials(_0x2bde56[_0x29e974(0x1a6)]),_0x24231b=getProjectConfigPath(),_0x7bcc76=resolveWriteConfigPath('global');if(_0x1c8ea0[_0x29e974(0x1ad)]===_0x29e974(0x1a8))return{'ok':!![],'message':_0x29e974(0x1a4)+(JSON[_0x29e974(0x1a0)](_0x4d45db,null,0x2)+'\x0a\x0a')+_0x29e974(0x1bd)+(_0x29e974(0x1ce)+(_0x24231b??_0x29e974(0x198))+'\x0a')+(_0x29e974(0x1d1)+_0x7bcc76)};return{'ok':!![],'data':{'effective':_0x4d45db,'configFiles':{'project':_0x24231b??null,'global':_0x7bcc76}}};}},getDef={'service':a22_0x3ecc11(0x197),'command':a22_0x3ecc11(0x18d),'description':a22_0x3ecc11(0x199),'risk':a22_0x3ecc11(0x18b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x3ecc11(0x1a9),'description':a22_0x3ecc11(0x1ae),'required':!![]}],'flags':[],async 'execute'(_0x34fcda){const _0x1cae07=a22_0x3ecc11,_0x2a8671=_0x34fcda[_0x1cae07(0x1c6)][0x0];if(!_0x2a8671)throw CliErrors[_0x1cae07(0x1a1)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x1cae07(0x19f));const {buildConfigFromFlags:_0x2f1d42}=await import(_0x1cae07(0x19d)),{raw:_0x573a0b}=_0x2f1d42({});if(_0x2a8671[_0x1cae07(0x1c7)]('.')){const _0x2cde33=_0x2a8671[_0x1cae07(0x1aa)]('.');let _0x2e735c=_0x573a0b;for(const _0x321dc3 of _0x2cde33){if(_0x2e735c==null||typeof _0x2e735c!=='object')throw CliErrors[_0x1cae07(0x1a1)](_0x1cae07(0x195)+_0x2a8671);_0x2e735c=_0x2e735c[_0x321dc3];}if(_0x2e735c===undefined)throw CliErrors[_0x1cae07(0x1a1)](_0x1cae07(0x195)+_0x2a8671);const _0x2f8da3=redactCliConfigValue(_0x2a8671,_0x2e735c);return console[_0x1cae07(0x1c3)](typeof _0x2f8da3===_0x1cae07(0x1c9)?JSON[_0x1cae07(0x1a0)](_0x2f8da3,null,0x2):String(_0x2f8da3)),{'ok':!![]};}const _0x407de6=_0x573a0b[_0x2a8671];if(_0x407de6===undefined)throw CliErrors['validation'](_0x1cae07(0x195)+_0x2a8671);const _0xa71b34=redactCliConfigValue(_0x2a8671,_0x407de6);return console[_0x1cae07(0x1c3)](typeof _0xa71b34===_0x1cae07(0x1c9)?JSON['stringify'](_0xa71b34,null,0x2):String(_0xa71b34)),{'ok':!![]};}},setDef={'service':a22_0x3ecc11(0x197),'command':'set','description':a22_0x3ecc11(0x1b3),'risk':a22_0x3ecc11(0x191),'confirmationDescription':a22_0x3ecc11(0x1a7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x3ecc11(0x1a9),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x3ecc11(0x19a),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x24754f){const _0x58a6aa=a22_0x3ecc11,_0x102f62=_0x24754f[_0x58a6aa(0x1c6)][0x0],_0x293cd8=_0x24754f[_0x58a6aa(0x1c6)][0x1];if(!_0x102f62||_0x293cd8===undefined)throw CliErrors[_0x58a6aa(0x1a1)](_0x58a6aa(0x18c),_0x58a6aa(0x1bf)+CLI_BIN_NAME+_0x58a6aa(0x1c5));if(ENUM_KEYS[_0x102f62]&&!ENUM_KEYS[_0x102f62][_0x58a6aa(0x1c7)](_0x293cd8))throw CliErrors[_0x58a6aa(0x1a1)]('Invalid\x20value\x20for\x20\x22'+_0x102f62+_0x58a6aa(0x1cd)+ENUM_KEYS[_0x102f62][_0x58a6aa(0x1b9)](',\x20'));if(isCliProtectedConfigKey(_0x102f62))throw CliErrors[_0x58a6aa(0x1a1)]('\x22'+_0x102f62+_0x58a6aa(0x1c2));if(_0x102f62===_0x58a6aa(0x1bb)){const _0x606217=Number(_0x293cd8);if(isNaN(_0x606217)||_0x606217<=0x0)throw CliErrors[_0x58a6aa(0x1a1)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x28969c=resolveWriteScope({'explicitGlobal':_0x24754f[_0x58a6aa(0x1b2)](_0x58a6aa(0x19c)),'policy':_0x58a6aa(0x1b7)}),_0x569510=toScopeFlags(_0x28969c),_0x7e2c66=readScopedConfig(_0x569510),_0x1e1b12=parseAliasAppcodeSetKey(_0x102f62);if(!_0x1e1b12&&!isTopLevelConfigKey(_0x102f62))throw CliErrors[_0x58a6aa(0x1a1)](_0x58a6aa(0x1bc)+_0x102f62+_0x58a6aa(0x1cc),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x58a6aa(0x1ca));if(_0x1e1b12)setLocalAppAlias(_0x7e2c66,_0x1e1b12,_0x293cd8);else{if(_0x102f62===_0x58a6aa(0x18e)){const _0x5c52a5=normalizeLocale(_0x293cd8);if(!_0x5c52a5)throw CliErrors[_0x58a6aa(0x1a1)]('Invalid\x20locale\x20value.',_0x58a6aa(0x1a3));_0x7e2c66[_0x58a6aa(0x18e)]=_0x5c52a5;}else _0x7e2c66[_0x102f62]=_0x102f62===_0x58a6aa(0x1bb)?Number(_0x293cd8):DOMAIN_CONFIG_FIELDS[_0x58a6aa(0x1c7)](_0x102f62)?normalizeDomainOrigin(_0x102f62,_0x293cd8):_0x293cd8;}const _0x2d8e18=_0x102f62===_0x58a6aa(0x1c4)?maskCliAccessKey(_0x293cd8):!_0x1e1b12&&_0x102f62===_0x58a6aa(0x18e)?String(_0x7e2c66[_0x58a6aa(0x18e)]):_0x293cd8;return console[_0x58a6aa(0x1c3)]('Set\x20`'+_0x102f62+_0x58a6aa(0x1a5)+_0x2d8e18+'\x22'+(_0x28969c===_0x58a6aa(0x19c)?_0x58a6aa(0x1c8):'')),writeScopedConfig(_0x7e2c66,_0x569510),{'ok':!![]};}},deleteDef={'service':a22_0x3ecc11(0x197),'command':'delete','description':a22_0x3ecc11(0x18f),'risk':'write','confirmationDescription':'Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x378dcf){const _0x2c7440=a22_0x3ecc11,_0x186138=_0x378dcf[_0x2c7440(0x1c6)][0x0];if(!_0x186138)throw CliErrors[_0x2c7440(0x1a1)](_0x2c7440(0x1b6),_0x2c7440(0x1bf)+CLI_BIN_NAME+_0x2c7440(0x19b));if(isCliProtectedConfigKey(_0x186138))throw CliErrors['validation']('\x22'+_0x186138+_0x2c7440(0x1c2));const _0x5a79b2=resolveWriteScope({'explicitGlobal':_0x378dcf[_0x2c7440(0x1b2)](_0x2c7440(0x19c)),'policy':_0x2c7440(0x1b7)}),_0x13bd39=toScopeFlags(_0x5a79b2),_0x5d0dcf=readScopedConfig(_0x13bd39),_0x66f15f=parseAliasDeleteKey(_0x186138);if(_0x66f15f){if(!deleteLocalAppAlias(_0x5d0dcf,_0x66f15f))return console[_0x2c7440(0x1c3)]('Key\x20already\x20absent:\x20'+_0x186138+(_0x5a79b2===_0x2c7440(0x19c)?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x186138,'scope':_0x5a79b2,'changed':![]}};return console[_0x2c7440(0x1c3)](_0x2c7440(0x192)+_0x186138+'`'+(_0x5a79b2===_0x2c7440(0x19c)?_0x2c7440(0x1c8):'')),writeScopedConfig(_0x5d0dcf,_0x13bd39),{'ok':!![],'data':{'key':_0x186138,'scope':_0x5a79b2,'changed':!![]}};}if(_0x5d0dcf[_0x186138]===undefined)return console[_0x2c7440(0x1c3)]('Key\x20already\x20absent:\x20'+_0x186138+(_0x5a79b2===_0x2c7440(0x19c)?_0x2c7440(0x1c8):'')),{'ok':!![],'data':{'key':_0x186138,'scope':_0x5a79b2,'changed':![]}};return delete _0x5d0dcf[_0x186138],console[_0x2c7440(0x1c3)](_0x2c7440(0x192)+_0x186138+'`'+(_0x5a79b2===_0x2c7440(0x19c)?_0x2c7440(0x1c8):'')),writeScopedConfig(_0x5d0dcf,_0x13bd39),{'ok':!![],'data':{'key':_0x186138,'scope':_0x5a79b2,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x2119fd=a22_0x3022;function a22_0x26ae(){const _0x956975=['trim','config','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','validation','8249427OHtzTB',';\x20apps.<alias>.appcode','alias','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','isArray','Set\x20a\x20configuration\x20value','Settable\x20keys:\x20','field','apps','Invalid\x20value\x20for\x20\x22','pageSize','accessKey','locale','../../context.js','list','length','\x20config\x20get\x20<key>','4429888tIqVDr','split','Missing\x20key\x20argument.','project-or-global-explicit','2842435UmuncR','Usage:\x20','1btGhoy','object','8PXZjQo','3400859GEbOzG','Deleted\x20`','log','join','\x20\x20project:\x20','7liLeAY','value','global','read','830144EiCmzx','\x22\x20is\x20not\x20settable.','args','pretty','Key\x20not\x20found:\x20','Value\x20to\x20assign','Config\x20files:\x0a','List\x20current\x20config','includes','Missing\x20key\x20or\x20value.','\x20(global)','548103mtTHFR','set','Get\x20a\x20config\x20value','write','`\x20=\x20\x22','key','get','stringify','Invalid\x20locale\x20value.','bool','raw','keys','Top-level\x20key\x20\x22','942738MFpGlG','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','10MnpXbs','format','Key\x20already\x20absent:\x20','\x20config\x20set\x20<key>\x20<value>\x20[--global]','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','appcode','Delete\x20a\x20configuration\x20value'];a22_0x26ae=function(){return _0x956975;};return a22_0x26ae();}(function(_0x1cdaf0,_0x555207){const _0x216e45=a22_0x3022,_0x295caa=_0x1cdaf0();while(!![]){try{const _0x4e389d=parseInt(_0x216e45(0x113))/0x1*(parseInt(_0x216e45(0x11f))/0x2)+-parseInt(_0x216e45(0x12a))/0x3*(parseInt(_0x216e45(0x115))/0x4)+-parseInt(_0x216e45(0x111))/0x5+-parseInt(_0x216e45(0xef))/0x6+parseInt(_0x216e45(0x11b))/0x7*(parseInt(_0x216e45(0x10d))/0x8)+-parseInt(_0x216e45(0xfc))/0x9*(-parseInt(_0x216e45(0xf1))/0xa)+-parseInt(_0x216e45(0x116))/0xb;if(_0x4e389d===_0x555207)break;else _0x295caa['push'](_0x295caa['shift']());}catch(_0x5b5841){_0x295caa['push'](_0x295caa['shift']());}}}(a22_0x26ae,0x7676e));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(_0x2ba185){const _0x3d37bb=a22_0x3022,_0x594672=_0x2ba185[_0x3d37bb(0x10e)]('.');if(_0x594672[_0x3d37bb(0x10b)]!==0x3||_0x594672[0x0]!==_0x3d37bb(0x104)||_0x594672[0x2]!==_0x3d37bb(0xf6))return undefined;const _0x3b42d4=_0x594672[0x1]?.['trim']();return _0x3b42d4?_0x3b42d4:undefined;}function parseAliasDeleteKey(_0x33a909){const _0x5155b1=a22_0x3022,_0x4298f7=_0x33a909[_0x5155b1(0x10e)]('.');if(_0x4298f7[_0x5155b1(0x10b)]===0x2&&_0x4298f7[0x0]===_0x5155b1(0x104)){const _0x5f8685=_0x4298f7[0x1]?.[_0x5155b1(0xf8)]();return _0x5f8685?{'alias':_0x5f8685}:undefined;}if(_0x4298f7[_0x5155b1(0x10b)]===0x3&&_0x4298f7[0x0]===_0x5155b1(0x104)&&_0x4298f7[0x2]===_0x5155b1(0xf6)){const _0x253c75=_0x4298f7[0x1]?.[_0x5155b1(0xf8)]();return _0x253c75?{'alias':_0x253c75,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x17a301,_0x5d7b62,_0x536498){const _0x40718f=a22_0x3022,_0xdc66d8=_0x17a301['apps']&&typeof _0x17a301[_0x40718f(0x104)]===_0x40718f(0x114)&&!Array[_0x40718f(0x100)](_0x17a301[_0x40718f(0x104)])?_0x17a301['apps']:{},_0x186c1e=_0xdc66d8[_0x5d7b62]&&typeof _0xdc66d8[_0x5d7b62]===_0x40718f(0x114)&&!Array['isArray'](_0xdc66d8[_0x5d7b62])?_0xdc66d8[_0x5d7b62]:{};_0x186c1e[_0x40718f(0xf6)]=_0x536498,_0xdc66d8[_0x5d7b62]=_0x186c1e,_0x17a301[_0x40718f(0x104)]=_0xdc66d8;}function deleteLocalAppAlias(_0x35b5ef,_0x76897b){const _0x41125e=a22_0x3022;if(!_0x35b5ef[_0x41125e(0x104)]||typeof _0x35b5ef[_0x41125e(0x104)]!=='object'||Array['isArray'](_0x35b5ef['apps']))return![];const _0x124f64=_0x35b5ef[_0x41125e(0x104)],_0x304f99=_0x124f64[_0x76897b[_0x41125e(0xfe)]];if(!_0x304f99||typeof _0x304f99!=='object'||Array[_0x41125e(0x100)](_0x304f99))return![];if(!_0x76897b['field'])return delete _0x124f64[_0x76897b[_0x41125e(0xfe)]],!![];if(!(_0x76897b[_0x41125e(0x103)]in _0x304f99))return![];return delete _0x304f99[_0x76897b[_0x41125e(0x103)]],Object[_0x41125e(0xed)](_0x304f99)[_0x41125e(0x10b)]===0x0&&delete _0x124f64[_0x76897b[_0x41125e(0xfe)]],!![];}function a22_0x3022(_0x4c3cc6,_0x536eec){_0x4c3cc6=_0x4c3cc6-0xe9;const _0x26ae50=a22_0x26ae();let _0x3022bd=_0x26ae50[_0x4c3cc6];return _0x3022bd;}const listDef={'service':a22_0x2119fd(0xf9),'command':a22_0x2119fd(0x10a),'description':a22_0x2119fd(0x126),'risk':a22_0x2119fd(0x11e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4b60dd){const _0x54ce02=a22_0x2119fd,{buildConfigFromFlags:_0x34ac82}=await import(_0x54ce02(0x109)),_0xc176cd=_0x34ac82({}),_0x5afb4a=redactCliConfigCredentials(_0xc176cd[_0x54ce02(0xec)]),_0x3d541b=getProjectConfigPath(),_0x252685=resolveWriteConfigPath(_0x54ce02(0x11d));if(_0x4b60dd[_0x54ce02(0xf2)]===_0x54ce02(0x122))return{'ok':!![],'message':_0x54ce02(0xfa)+(JSON[_0x54ce02(0xe9)](_0x5afb4a,null,0x2)+'\x0a\x0a')+_0x54ce02(0x125)+(_0x54ce02(0x11a)+(_0x3d541b??'(none)')+'\x0a')+('\x20\x20global:\x20\x20'+_0x252685)};return{'ok':!![],'data':{'effective':_0x5afb4a,'configFiles':{'project':_0x3d541b??null,'global':_0x252685}}};}},getDef={'service':'config','command':a22_0x2119fd(0x130),'description':a22_0x2119fd(0x12c),'risk':a22_0x2119fd(0x11e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x2119fd(0x12f),'description':a22_0x2119fd(0xff),'required':!![]}],'flags':[],async 'execute'(_0x4d3c58){const _0x5ef1b9=a22_0x2119fd,_0x16495b=_0x4d3c58['args'][0x0];if(!_0x16495b)throw CliErrors[_0x5ef1b9(0xfb)](_0x5ef1b9(0x10f),_0x5ef1b9(0x112)+CLI_BIN_NAME+_0x5ef1b9(0x10c));const {buildConfigFromFlags:_0x15fb8c}=await import(_0x5ef1b9(0x109)),{raw:_0x6d1eea}=_0x15fb8c({});if(_0x16495b[_0x5ef1b9(0x127)]('.')){const _0x1accbe=_0x16495b[_0x5ef1b9(0x10e)]('.');let _0x87e2b2=_0x6d1eea;for(const _0x29b090 of _0x1accbe){if(_0x87e2b2==null||typeof _0x87e2b2!=='object')throw CliErrors[_0x5ef1b9(0xfb)]('Key\x20not\x20found:\x20'+_0x16495b);_0x87e2b2=_0x87e2b2[_0x29b090];}if(_0x87e2b2===undefined)throw CliErrors[_0x5ef1b9(0xfb)](_0x5ef1b9(0x123)+_0x16495b);const _0x5e45c2=redactCliConfigValue(_0x16495b,_0x87e2b2);return console[_0x5ef1b9(0x118)](typeof _0x5e45c2===_0x5ef1b9(0x114)?JSON[_0x5ef1b9(0xe9)](_0x5e45c2,null,0x2):String(_0x5e45c2)),{'ok':!![]};}const _0x46fa2c=_0x6d1eea[_0x16495b];if(_0x46fa2c===undefined)throw CliErrors['validation'](_0x5ef1b9(0x123)+_0x16495b);const _0x442591=redactCliConfigValue(_0x16495b,_0x46fa2c);return console[_0x5ef1b9(0x118)](typeof _0x442591===_0x5ef1b9(0x114)?JSON['stringify'](_0x442591,null,0x2):String(_0x442591)),{'ok':!![]};}},setDef={'service':a22_0x2119fd(0xf9),'command':a22_0x2119fd(0x12b),'description':a22_0x2119fd(0x101),'risk':a22_0x2119fd(0x12d),'confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x2119fd(0x11c),'description':a22_0x2119fd(0x124),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x4bc10a){const _0x94d13f=a22_0x2119fd,_0x51208a=_0x4bc10a[_0x94d13f(0x121)][0x0],_0x2b72a1=_0x4bc10a[_0x94d13f(0x121)][0x1];if(!_0x51208a||_0x2b72a1===undefined)throw CliErrors[_0x94d13f(0xfb)](_0x94d13f(0x128),_0x94d13f(0x112)+CLI_BIN_NAME+_0x94d13f(0xf4));if(ENUM_KEYS[_0x51208a]&&!ENUM_KEYS[_0x51208a][_0x94d13f(0x127)](_0x2b72a1))throw CliErrors[_0x94d13f(0xfb)](_0x94d13f(0x105)+_0x51208a+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x51208a][_0x94d13f(0x119)](',\x20'));if(isCliProtectedConfigKey(_0x51208a))throw CliErrors[_0x94d13f(0xfb)]('\x22'+_0x51208a+_0x94d13f(0xf5));if(_0x51208a===_0x94d13f(0x106)){const _0x5e61be=Number(_0x2b72a1);if(isNaN(_0x5e61be)||_0x5e61be<=0x0)throw CliErrors[_0x94d13f(0xfb)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x591436=resolveWriteScope({'explicitGlobal':_0x4bc10a['bool'](_0x94d13f(0x11d)),'policy':_0x94d13f(0x110)}),_0x9d3c6b=toScopeFlags(_0x591436),_0x2fc057=readScopedConfig(_0x9d3c6b),_0x49a96d=parseAliasAppcodeSetKey(_0x51208a);if(!_0x49a96d&&!isTopLevelConfigKey(_0x51208a))throw CliErrors[_0x94d13f(0xfb)](_0x94d13f(0xee)+_0x51208a+_0x94d13f(0x120),_0x94d13f(0x102)+getTopLevelConfigKeySummary()+_0x94d13f(0xfd));if(_0x49a96d)setLocalAppAlias(_0x2fc057,_0x49a96d,_0x2b72a1);else{if(_0x51208a===_0x94d13f(0x108)){const _0x290431=normalizeLocale(_0x2b72a1);if(!_0x290431)throw CliErrors[_0x94d13f(0xfb)](_0x94d13f(0xea),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');_0x2fc057[_0x94d13f(0x108)]=_0x290431;}else _0x2fc057[_0x51208a]=_0x51208a===_0x94d13f(0x106)?Number(_0x2b72a1):DOMAIN_CONFIG_FIELDS[_0x94d13f(0x127)](_0x51208a)?normalizeDomainOrigin(_0x51208a,_0x2b72a1):_0x2b72a1;}const _0x25a374=_0x51208a===_0x94d13f(0x107)?maskCliAccessKey(_0x2b72a1):!_0x49a96d&&_0x51208a==='locale'?String(_0x2fc057[_0x94d13f(0x108)]):_0x2b72a1;return console[_0x94d13f(0x118)]('Set\x20`'+_0x51208a+_0x94d13f(0x12e)+_0x25a374+'\x22'+(_0x591436===_0x94d13f(0x11d)?_0x94d13f(0x129):'')),writeScopedConfig(_0x2fc057,_0x9d3c6b),{'ok':!![]};}},deleteDef={'service':a22_0x2119fd(0xf9),'command':'delete','description':a22_0x2119fd(0xf7),'risk':a22_0x2119fd(0x12d),'confirmationDescription':a22_0x2119fd(0xf0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x2119fd(0x12f),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x26d594){const _0xa0db05=a22_0x2119fd,_0xfa7ac5=_0x26d594[_0xa0db05(0x121)][0x0];if(!_0xfa7ac5)throw CliErrors[_0xa0db05(0xfb)](_0xa0db05(0x10f),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0xfa7ac5))throw CliErrors[_0xa0db05(0xfb)]('\x22'+_0xfa7ac5+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x2312aa=resolveWriteScope({'explicitGlobal':_0x26d594[_0xa0db05(0xeb)]('global'),'policy':_0xa0db05(0x110)}),_0x1c8da6=toScopeFlags(_0x2312aa),_0x4df6ab=readScopedConfig(_0x1c8da6),_0xb77384=parseAliasDeleteKey(_0xfa7ac5);if(_0xb77384){if(!deleteLocalAppAlias(_0x4df6ab,_0xb77384))return console[_0xa0db05(0x118)](_0xa0db05(0xf3)+_0xfa7ac5+(_0x2312aa===_0xa0db05(0x11d)?_0xa0db05(0x129):'')),{'ok':!![],'data':{'key':_0xfa7ac5,'scope':_0x2312aa,'changed':![]}};return console[_0xa0db05(0x118)](_0xa0db05(0x117)+_0xfa7ac5+'`'+(_0x2312aa===_0xa0db05(0x11d)?'\x20(global)':'')),writeScopedConfig(_0x4df6ab,_0x1c8da6),{'ok':!![],'data':{'key':_0xfa7ac5,'scope':_0x2312aa,'changed':!![]}};}if(_0x4df6ab[_0xfa7ac5]===undefined)return console[_0xa0db05(0x118)]('Key\x20already\x20absent:\x20'+_0xfa7ac5+(_0x2312aa===_0xa0db05(0x11d)?_0xa0db05(0x129):'')),{'ok':!![],'data':{'key':_0xfa7ac5,'scope':_0x2312aa,'changed':![]}};return delete _0x4df6ab[_0xfa7ac5],console[_0xa0db05(0x118)](_0xa0db05(0x117)+_0xfa7ac5+'`'+(_0x2312aa==='global'?'\x20(global)':'')),writeScopedConfig(_0x4df6ab,_0x1c8da6),{'ok':!![],'data':{'key':_0xfa7ac5,'scope':_0x2312aa,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x1ebd6b=a23_0x3440;(function(_0x51f567,_0x290221){const _0x269e47=a23_0x3440,_0x218522=_0x51f567();while(!![]){try{const _0x3bde3d=-parseInt(_0x269e47(0x172))/0x1+-parseInt(_0x269e47(0x16e))/0x2*(-parseInt(_0x269e47(0x18d))/0x3)+-parseInt(_0x269e47(0x183))/0x4*(parseInt(_0x269e47(0x176))/0x5)+-parseInt(_0x269e47(0x198))/0x6*(-parseInt(_0x269e47(0x18c))/0x7)+-parseInt(_0x269e47(0x184))/0x8*(parseInt(_0x269e47(0x190))/0x9)+parseInt(_0x269e47(0x182))/0xa*(-parseInt(_0x269e47(0x16d))/0xb)+parseInt(_0x269e47(0x18a))/0xc*(parseInt(_0x269e47(0x195))/0xd);if(_0x3bde3d===_0x290221)break;else _0x218522['push'](_0x218522['shift']());}catch(_0x171efe){_0x218522['push'](_0x218522['shift']());}}}(a23_0x22e4,0xd0f4b));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';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':a23_0x1ebd6b(0x185),'type':a23_0x1ebd6b(0x188),'description':a23_0x1ebd6b(0x16b)},{'name':'user-domain','type':a23_0x1ebd6b(0x188),'description':a23_0x1ebd6b(0x179)},{'name':a23_0x1ebd6b(0x197),'type':a23_0x1ebd6b(0x188),'description':a23_0x1ebd6b(0x187)},{'name':a23_0x1ebd6b(0x193),'type':'string','description':a23_0x1ebd6b(0x171)},{'name':'skill-domain','type':a23_0x1ebd6b(0x188),'description':a23_0x1ebd6b(0x177)}];function a23_0x22e4(){const _0x3998f8=['domains','854TWthar','3TpqkVG','independent','Available\x20regions:\x20','3339LxKVej','manifestDomains','mode','runtime-domain','Region\x20\x22','5161aEjSCN','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','api-domain','47394RkikRk','Independent-deployment\x20Domain\x20JSON\x20file','assign','1045iBGToM','229286EtxDyu','routing','enterprise-v1','Custom\x20Runtime\x20HTTPS\x20origin','596869GFeZLI','label','validation','length','568795xbaUGg','Custom\x20SkillHub\x20HTTPS\x20origin','str','Custom\x20User\x20HTTPS\x20origin','\x22\x20is\x20not\x20currently\x20available.','join','cancelled','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','init','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','region','nonInteractive','165350AWBdiH','28hKdpvC','16456TudfzZ','domain-config','Select\x20Lovrabet\x20region','Custom\x20platform\x20API\x20HTTPS\x20origin','string','keys','105936kKmbqf'];a23_0x22e4=function(){return _0x3998f8;};return a23_0x22e4();}export const configInitFlags=[{'name':a23_0x1ebd6b(0x180),'type':a23_0x1ebd6b(0x188),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a23_0x1ebd6b(0x17b)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x1ed820){const _0x1f965f=a23_0x1ebd6b,_0x1196be=_0x1ed820[_0x1f965f(0x178)](_0x1f965f(0x180));if(_0x1196be){if(!isEnabledLovrabetRegion(_0x1196be))throw CliErrors['validation'](_0x1f965f(0x194)+_0x1196be+_0x1f965f(0x17a),_0x1f965f(0x18f)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x1196be;}if(_0x1ed820[_0x1f965f(0x181)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x1f965f(0x186),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x306995=>({'name':OFFICIAL_ROUTING_PROFILES[_0x306995][_0x1f965f(0x173)]+'\x20('+_0x306995+')','value':_0x306995}))});}catch(_0x272698){if(_0x272698?.['name']==='ExitPromptError')throw CliErrors[_0x1f965f(0x17c)]();throw _0x272698;}}export async function executeConfigInit(_0x54bba9){const _0x5cff65=a23_0x1ebd6b,_0x5965f7=resolveDomainConfigInput(_0x54bba9),_0x42a8ae=_0x5965f7[_0x5cff65(0x18b)],_0x159831=Object[_0x5cff65(0x189)](_0x42a8ae)[_0x5cff65(0x175)]>0x0;if(_0x159831&&_0x54bba9[_0x5cff65(0x178)]('region'))throw CliErrors[_0x5cff65(0x174)](_0x5cff65(0x196));const _0x5f424b={'global':!![]},_0x2eecfd=readScopedConfig(_0x5f424b);for(const _0x8c1f3 of DOMAIN_CONFIG_FIELDS)delete _0x2eecfd[_0x8c1f3];for(const _0x16d629 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x2eecfd[_0x16d629];delete _0x2eecfd[_0x5cff65(0x16f)];let _0x4a5c34=null;if(_0x159831)delete _0x2eecfd[_0x5cff65(0x180)],_0x5965f7[_0x5cff65(0x192)]==='enterprise-v1'?_0x2eecfd[_0x5cff65(0x16f)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x5965f7[_0x5cff65(0x191)]}:Object[_0x5cff65(0x16c)](_0x2eecfd,_0x42a8ae);else{_0x4a5c34=await resolveRegion(_0x54bba9);if(_0x4a5c34===DEFAULT_LOVRABET_REGION)delete _0x2eecfd[_0x5cff65(0x180)];else _0x2eecfd[_0x5cff65(0x180)]=_0x4a5c34;}return writeScopedConfig(_0x2eecfd,_0x5f424b),{'ok':!![],'message':_0x159831?'Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object[_0x5cff65(0x189)](_0x5965f7['mode']===_0x5cff65(0x170)?_0x5965f7['manifestDomains']:_0x42a8ae)['join'](',\x20')+'.':_0x5cff65(0x17f)+_0x4a5c34+'.','data':{'mode':_0x159831?_0x5cff65(0x18e):'official','protocol':_0x5965f7[_0x5cff65(0x192)]===_0x5cff65(0x170)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x4a5c34,'domains':_0x42a8ae}};}function a23_0x3440(_0x3b7bcf,_0x18c738){_0x3b7bcf=_0x3b7bcf-0x16b;const _0x22e494=a23_0x22e4();let _0x34405a=_0x22e494[_0x3b7bcf];return _0x34405a;}export const configInitDefinition={'service':'config','command':a23_0x1ebd6b(0x17e),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':a23_0x1ebd6b(0x17d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58ea58,_0x1d2a4f){var _0x541a13=a24_0x25d1,_0x27ab41=_0x58ea58();while(!![]){try{var _0x4f9b3e=-parseInt(_0x541a13(0x12b))/0x1*(parseInt(_0x541a13(0x12a))/0x2)+-parseInt(_0x541a13(0x120))/0x3*(-parseInt(_0x541a13(0x124))/0x4)+-parseInt(_0x541a13(0x129))/0x5*(parseInt(_0x541a13(0x127))/0x6)+-parseInt(_0x541a13(0x122))/0x7*(parseInt(_0x541a13(0x12c))/0x8)+-parseInt(_0x541a13(0x123))/0x9*(parseInt(_0x541a13(0x128))/0xa)+-parseInt(_0x541a13(0x126))/0xb*(-parseInt(_0x541a13(0x125))/0xc)+parseInt(_0x541a13(0x121))/0xd;if(_0x4f9b3e===_0x1d2a4f)break;else _0x27ab41['push'](_0x27ab41['shift']());}catch(_0xd787e7){_0x27ab41['push'](_0x27ab41['shift']());}}}(a24_0x4848,0x87c69));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a24_0x25d1(_0x400667,_0x3d4ba1){_0x400667=_0x400667-0x120;var _0x484834=a24_0x4848();var _0x25d1f9=_0x484834[_0x400667];return _0x25d1f9;}export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';function a24_0x4848(){var _0x327d20=['953432xVmHUp','48855zUqgWY','12715547eSjVel','7XRfqql','850599eDFeKT','20ClXxTg','3768SoAxie','19294hBdhSY','3042sKgLWf','40ScLDxF','4535cdknPr','2qrCsUG','97091KJDbuE'];a24_0x4848=function(){return _0x327d20;};return a24_0x4848();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a25_0x2a36(){const _0x125bc0=['\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','getOne','body','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\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}}','4RFFzCZ','paramsRequired','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','\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]','length','\x20\x20AGGREGATE\x20TYPES','map','\x20on\x20dataset\x20','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','update','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\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}','operation','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','Update\x20an\x20existing\x20data\x20record','batchCreate','build','3015LcatsJ','\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}','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','Preview:\x20data\x20','4051506SVuZsG','2343ZqJMtg','11320008rknYAf','/api/{appCode}/','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\x20\x20PARAMS\x20STRUCTURE','description','\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\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\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\x20PAGINATION','write','helpExtra','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','data\x20','132CvFzWu','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\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\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','create','confirmationDescription','code','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\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\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}','join','aggregate','str','filter','data','\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}}','10564701bmhJkO','delete','1202JspAaK','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','1635931fcwfzv','\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}}]}','760566VtPzfO','\x20\x20LOGICAL\x20COMBINATORS','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','Create\x20one\x20record\x20in\x20the\x20dataset','read','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','command','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\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\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','params','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','high-risk-write','5hChBsw','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\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}}','dryRun','\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\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}]','now','35800ezeWYm','\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_0x2a36=function(){return _0x125bc0;};return a25_0x2a36();}const a25_0x18905a=a25_0x57ed;(function(_0x18d6dd,_0x567d46){const _0x19e5ba=a25_0x57ed,_0x391b68=_0x18d6dd();while(!![]){try{const _0x1641bb=-parseInt(_0x19e5ba(0x14d))/0x1*(parseInt(_0x19e5ba(0x16e))/0x2)+parseInt(_0x19e5ba(0x172))/0x3*(parseInt(_0x19e5ba(0x194))/0x4)+-parseInt(_0x19e5ba(0x184))/0x5*(parseInt(_0x19e5ba(0x14c))/0x6)+-parseInt(_0x19e5ba(0x16c))/0x7+parseInt(_0x19e5ba(0x14e))/0x8+parseInt(_0x19e5ba(0x147))/0x9*(parseInt(_0x19e5ba(0x18b))/0xa)+parseInt(_0x19e5ba(0x170))/0xb*(parseInt(_0x19e5ba(0x15b))/0xc);if(_0x1641bb===_0x567d46)break;else _0x391b68['push'](_0x391b68['shift']());}catch(_0x5c7b57){_0x391b68['push'](_0x391b68['shift']());}}}(a25_0x2a36,0xde70d));import{executeData}from'../../core/sdk-client.js';function a25_0x57ed(_0x4a974e,_0x45c20e){_0x4a974e=_0x4a974e-0x139;const _0x2a366e=a25_0x2a36();let _0x57edfd=_0x2a366e[_0x4a974e];return _0x57edfd;}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_0x18905a(0x169),'operation':a25_0x18905a(0x169),'risk':'read','paramsRequired':![],'description':a25_0x18905a(0x175),'paramsHint':a25_0x18905a(0x16f)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':['\x20\x20WHERE\x20OPERATORS',a25_0x18905a(0x192),a25_0x18905a(0x18c),a25_0x18905a(0x188),'\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}}','\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_0x18905a(0x16b),a25_0x18905a(0x15d),'\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}}',a25_0x18905a(0x186),'\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_0x18905a(0x173),a25_0x18905a(0x17e),a25_0x18905a(0x171),'',a25_0x18905a(0x15e),a25_0x18905a(0x182),a25_0x18905a(0x197),a25_0x18905a(0x17f),a25_0x18905a(0x139),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a25_0x18905a(0x156),a25_0x18905a(0x163),'\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.',a25_0x18905a(0x13d),a25_0x18905a(0x13f),a25_0x18905a(0x13b),'\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',a25_0x18905a(0x18e)]['join']('\x0a')},{'command':a25_0x18905a(0x18f),'operation':a25_0x18905a(0x18f),'risk':'read','paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a25_0x18905a(0x154)},{'command':a25_0x18905a(0x160),'operation':'create','risk':a25_0x18905a(0x157),'paramsRequired':!![],'description':a25_0x18905a(0x177),'confirmationDescription':a25_0x18905a(0x140),'paramsHint':a25_0x18905a(0x14a)},{'command':'batchCreate','operation':a25_0x18905a(0x145),'risk':a25_0x18905a(0x157),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','confirmationDescription':a25_0x18905a(0x17b),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a25_0x18905a(0x13e),'operation':'update','risk':a25_0x18905a(0x157),'paramsRequired':!![],'description':a25_0x18905a(0x144),'confirmationDescription':a25_0x18905a(0x196),'paramsHint':a25_0x18905a(0x149)+a25_0x18905a(0x150)},{'command':a25_0x18905a(0x16d),'operation':'delete','risk':a25_0x18905a(0x183),'paramsRequired':!![],'description':a25_0x18905a(0x179),'confirmationDescription':a25_0x18905a(0x174),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a25_0x18905a(0x167),'operation':a25_0x18905a(0x167),'risk':a25_0x18905a(0x178),'paramsRequired':![],'description':a25_0x18905a(0x180),'paramsHint':a25_0x18905a(0x191)+'Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a25_0x18905a(0x199),a25_0x18905a(0x141),a25_0x18905a(0x148),'\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}',a25_0x18905a(0x155),a25_0x18905a(0x164),'\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_0x18905a(0x165),'',a25_0x18905a(0x151),a25_0x18905a(0x13a),a25_0x18905a(0x176),a25_0x18905a(0x143),a25_0x18905a(0x153),a25_0x18905a(0x193),a25_0x18905a(0x189),'','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only',a25_0x18905a(0x17d),a25_0x18905a(0x17c),'','\x20\x20DATASET\x20BOUNDARY',a25_0x18905a(0x185),a25_0x18905a(0x15c),a25_0x18905a(0x15f),'\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','','\x20\x20EXAMPLES',a25_0x18905a(0x159),a25_0x18905a(0x18d),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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','',a25_0x18905a(0x13c)][a25_0x18905a(0x166)]('\x0a')}];function makeDataCommand(_0xbea712){const _0x14e461=a25_0x18905a,_0x5bf0fb='data\x20'+_0xbea712['command'],_0x381c2b={'service':_0x14e461(0x16a),'command':_0xbea712[_0x14e461(0x17a)],'description':_0xbea712[_0x14e461(0x152)],'risk':_0xbea712['risk'],..._0xbea712[_0x14e461(0x161)]?{'confirmationDescription':_0xbea712[_0x14e461(0x161)]}:{},'helpExtra':_0xbea712[_0x14e461(0x158)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0xbea712['paramsHint']}],'validate':async _0x19e99c=>{const _0x5305fe=_0x14e461;_0xbea712[_0x5305fe(0x195)]&&requireAnyOf(_0x19e99c,[_0x5305fe(0x181)],_0x5bf0fb),_0xbea712['operation']===_0x5305fe(0x145)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x19e99c[_0x5305fe(0x168)]('params'))),_0xbea712[_0x5305fe(0x142)]===_0x5305fe(0x13e)&&parseUpdateIdsFromParams(parseJsonParams(_0x19e99c[_0x5305fe(0x168)](_0x5305fe(0x181)))??{});},async 'execute'(_0x3a35cf){const _0xc560b0=_0x14e461,_0x431c07=_0x3a35cf[_0xc560b0(0x168)](_0xc560b0(0x162)),_0x40e2f8=_0xbea712[_0xc560b0(0x142)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3a35cf[_0xc560b0(0x168)](_0xc560b0(0x181)))):parseJsonParams(_0x3a35cf[_0xc560b0(0x168)](_0xc560b0(0x181)))??{},_0x45fbc7=_0xbea712[_0xc560b0(0x142)]===_0xc560b0(0x13e)?parseUpdateIdsFromParams(_0x40e2f8):undefined,_0x438e61=_0x45fbc7?normalizeUpdateParamsForRuntime(_0x40e2f8,_0x45fbc7):_0x40e2f8,_0x25ce80=Date[_0xc560b0(0x18a)](),_0x177f5f=await executeData(_0x431c07,_0xbea712['operation'],_0x438e61),_0x5c0180=Date[_0xc560b0(0x18a)]()-_0x25ce80,_0x138f39=_0x45fbc7&&_0x45fbc7['length']>0x1?buildBatchUpdateResult(_0x45fbc7,_0x177f5f):_0x177f5f;return{'ok':!![],'data':{'result':_0x138f39,'elapsed':_0x5c0180},'message':_0xc560b0(0x15a)+_0xbea712[_0xc560b0(0x17a)]+'\x20completed\x20in\x20'+_0x5c0180+'ms'};}};return _0xbea712['risk']!==_0x14e461(0x178)&&(_0x381c2b[_0x14e461(0x187)]=async _0x46b21f=>{const _0x1f4f53=_0x14e461,_0x1b7c0b=_0x46b21f[_0x1f4f53(0x168)](_0x1f4f53(0x162)),_0x3123e9=_0xbea712[_0x1f4f53(0x142)]===_0x1f4f53(0x145)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x46b21f[_0x1f4f53(0x168)](_0x1f4f53(0x181)))):parseJsonParams(_0x46b21f[_0x1f4f53(0x168)](_0x1f4f53(0x181)))??{};let _0x2b475d=_0x3123e9;if(_0xbea712[_0x1f4f53(0x142)]===_0x1f4f53(0x13e)){const _0x2e6b7b=parseUpdateIdsFromParams(_0x3123e9);_0x2b475d=normalizeUpdateParamsForRuntime(_0x3123e9,_0x2e6b7b);}return dryRun('POST',_0x1f4f53(0x14f)+_0x1b7c0b+'/'+_0xbea712[_0x1f4f53(0x142)])[_0x1f4f53(0x190)](_0x2b475d)[_0x1f4f53(0x152)](_0x1f4f53(0x14b)+_0xbea712[_0x1f4f53(0x17a)]+_0x1f4f53(0x19b)+_0x1b7c0b)[_0x1f4f53(0x146)]();}),_0x381c2b;}export const dataDefinitions=specs[a25_0x18905a(0x19a)](makeDataCommand);function buildBatchUpdateResult(_0x24cf66,_0x480673){const _0x3b5170=a25_0x18905a;return{'operation':_0x3b5170(0x13e),'mode':'batch','ids':_0x24cf66,'total':_0x24cf66[_0x3b5170(0x198)],'result':_0x480673};}
|
|
1
|
+
const a25_0x32deef=a25_0x2c9a;(function(_0x45551a,_0x5ce4e2){const _0x558f60=a25_0x2c9a,_0x1ec86c=_0x45551a();while(!![]){try{const _0x42c03d=-parseInt(_0x558f60(0x206))/0x1*(parseInt(_0x558f60(0x1f1))/0x2)+-parseInt(_0x558f60(0x1f0))/0x3*(-parseInt(_0x558f60(0x1e7))/0x4)+-parseInt(_0x558f60(0x1eb))/0x5+-parseInt(_0x558f60(0x218))/0x6*(-parseInt(_0x558f60(0x229))/0x7)+parseInt(_0x558f60(0x20c))/0x8*(-parseInt(_0x558f60(0x212))/0x9)+parseInt(_0x558f60(0x1dc))/0xa*(parseInt(_0x558f60(0x211))/0xb)+-parseInt(_0x558f60(0x1ce))/0xc*(-parseInt(_0x558f60(0x20d))/0xd);if(_0x42c03d===_0x5ce4e2)break;else _0x1ec86c['push'](_0x1ec86c['shift']());}catch(_0x68189f){_0x1ec86c['push'](_0x1ec86c['shift']());}}}(a25_0x5ef3,0x262cb));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';function a25_0x5ef3(){const _0x56c2f9=['filter','delete','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','update','\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}}','data','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','operation','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','1600404aTcqNO','\x20on\x20dataset\x20','\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.','\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}}','command','\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\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\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Create\x20one\x20record\x20in\x20the\x20dataset','write','description','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','POST','37270GEFgXC','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','length','str','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\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}','high-risk-write','/api/{appCode}/','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','batch','228OPovcY','paramsRequired','params','now','56865NEuFid','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','helpExtra','\x20\x20LOGICAL\x20COMBINATORS','\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}}','11079AZHLgC','4362IUWANb','\x20completed\x20in\x20','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20PARAMS\x20STRUCTURE','\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\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}}]}','paramsHint','\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\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}','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','read','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\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\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}}','create','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20\x20DATASET\x20BOUNDARY','137iQVkND','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','join','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','\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','9680sXblQl','13GaJjqR','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','data\x20','110PAKZYE','1170aCiVPR','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','Filter\x20dataset\x20records\x20with\x20query\x20conditions','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','\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}}','body','30eRDOFJ','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','batchCreate','code','\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}}','\x20\x20PAGINATION','Update\x20an\x20existing\x20data\x20record','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20EXAMPLES','risk','\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}}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20WHERE\x20OPERATORS','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\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}','339773EvFFjQ','\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_0x5ef3=function(){return _0x56c2f9;};return a25_0x5ef3();}function a25_0x2c9a(_0x51e95d,_0x33ba07){_0x51e95d=_0x51e95d-0x1c9;const _0x5ef383=a25_0x5ef3();let _0x2c9a0c=_0x5ef383[_0x51e95d];return _0x2c9a0c;}import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a25_0x32deef(0x22b),'risk':a25_0x32deef(0x1fc),'paramsRequired':![],'description':a25_0x32deef(0x214),'paramsHint':a25_0x32deef(0x1da)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a25_0x32deef(0x225),a25_0x32deef(0x1ef),a25_0x32deef(0x21d),a25_0x32deef(0x216),'\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_0x32deef(0x22a),a25_0x32deef(0x1d1),a25_0x32deef(0x201),a25_0x32deef(0x233),a25_0x32deef(0x223),a25_0x32deef(0x202),'',a25_0x32deef(0x1ee),'\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}}]}',a25_0x32deef(0x1f7),'',a25_0x32deef(0x1dd),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a25_0x32deef(0x1d3),a25_0x32deef(0x1ff),a25_0x32deef(0x20f),'',a25_0x32deef(0x21e),a25_0x32deef(0x231),a25_0x32deef(0x1d0),a25_0x32deef(0x213),'\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.',a25_0x32deef(0x20b),'\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\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a25_0x32deef(0x208)]('\x0a')},{'command':'getOne','operation':'getOne','risk':a25_0x32deef(0x1fc),'paramsRequired':!![],'description':a25_0x32deef(0x226),'paramsHint':a25_0x32deef(0x21a)},{'command':'create','operation':a25_0x32deef(0x203),'risk':a25_0x32deef(0x1d8),'paramsRequired':!![],'description':a25_0x32deef(0x1d7),'confirmationDescription':a25_0x32deef(0x200),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':'batchCreate','operation':a25_0x32deef(0x21b),'risk':a25_0x32deef(0x1d8),'paramsRequired':!![],'description':a25_0x32deef(0x1fd),'confirmationDescription':a25_0x32deef(0x1cd),'paramsHint':a25_0x32deef(0x20e)},{'command':a25_0x32deef(0x232),'operation':'update','risk':a25_0x32deef(0x1d8),'paramsRequired':!![],'description':a25_0x32deef(0x21f),'confirmationDescription':a25_0x32deef(0x1fb),'paramsHint':a25_0x32deef(0x1f3)+a25_0x32deef(0x22d)},{'command':a25_0x32deef(0x22c),'operation':a25_0x32deef(0x22c),'risk':a25_0x32deef(0x1e3),'paramsRequired':!![],'description':a25_0x32deef(0x1e5),'confirmationDescription':a25_0x32deef(0x215),'paramsHint':a25_0x32deef(0x21a)},{'command':'aggregate','operation':'aggregate','risk':a25_0x32deef(0x1fc),'paramsRequired':![],'description':a25_0x32deef(0x1f4),'paramsHint':a25_0x32deef(0x224)+a25_0x32deef(0x1e1),'helpExtra':[a25_0x32deef(0x22e),a25_0x32deef(0x1fa),a25_0x32deef(0x228),a25_0x32deef(0x1d5),a25_0x32deef(0x1e2),a25_0x32deef(0x1d4),a25_0x32deef(0x22f),'\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_0x32deef(0x1f5),'\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_0x32deef(0x1e0),a25_0x32deef(0x207),a25_0x32deef(0x1d6),a25_0x32deef(0x1f9),a25_0x32deef(0x230),'',a25_0x32deef(0x227),a25_0x32deef(0x1fe),'\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','',a25_0x32deef(0x205),a25_0x32deef(0x204),a25_0x32deef(0x209),a25_0x32deef(0x1ca),a25_0x32deef(0x20a),'',a25_0x32deef(0x221),a25_0x32deef(0x219),a25_0x32deef(0x220),'',a25_0x32deef(0x1cb),a25_0x32deef(0x1f6),'',a25_0x32deef(0x1ec)]['join']('\x0a')}];function makeDataCommand(_0x1b0d55){const _0x28efc3=a25_0x32deef,_0x3fac5f='data\x20'+_0x1b0d55[_0x28efc3(0x1d2)],_0x15f172={'service':_0x28efc3(0x1c9),'command':_0x1b0d55[_0x28efc3(0x1d2)],'description':_0x1b0d55[_0x28efc3(0x1d9)],'risk':_0x1b0d55['risk'],..._0x1b0d55['confirmationDescription']?{'confirmationDescription':_0x1b0d55['confirmationDescription']}:{},'helpExtra':_0x1b0d55[_0x28efc3(0x1ed)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x1b0d55[_0x28efc3(0x1f8)]}],'validate':async _0x55e62d=>{const _0xae9783=_0x28efc3;_0x1b0d55[_0xae9783(0x1e8)]&&requireAnyOf(_0x55e62d,['params'],_0x3fac5f),_0x1b0d55[_0xae9783(0x1cc)]===_0xae9783(0x21b)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x55e62d[_0xae9783(0x1df)](_0xae9783(0x1e9)))),_0x1b0d55[_0xae9783(0x1cc)]===_0xae9783(0x232)&&parseUpdateIdsFromParams(parseJsonParams(_0x55e62d['str'](_0xae9783(0x1e9)))??{});},async 'execute'(_0x201259){const _0x3958a1=_0x28efc3,_0x543df6=_0x201259[_0x3958a1(0x1df)](_0x3958a1(0x21c)),_0x3e06c6=_0x1b0d55[_0x3958a1(0x1cc)]===_0x3958a1(0x21b)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x201259['str'](_0x3958a1(0x1e9)))):parseJsonParams(_0x201259[_0x3958a1(0x1df)](_0x3958a1(0x1e9)))??{},_0x23a003=_0x1b0d55[_0x3958a1(0x1cc)]===_0x3958a1(0x232)?parseUpdateIdsFromParams(_0x3e06c6):undefined,_0x265c3d=_0x23a003?normalizeUpdateParamsForRuntime(_0x3e06c6,_0x23a003):_0x3e06c6,_0x242c82=Date[_0x3958a1(0x1ea)](),_0x4c4a94=await executeData(_0x543df6,_0x1b0d55[_0x3958a1(0x1cc)],_0x265c3d),_0x2c6b5e=Date['now']()-_0x242c82,_0x513715=_0x23a003&&_0x23a003[_0x3958a1(0x1de)]>0x1?buildBatchUpdateResult(_0x23a003,_0x4c4a94):_0x4c4a94;return{'ok':!![],'data':{'result':_0x513715,'elapsed':_0x2c6b5e},'message':_0x3958a1(0x210)+_0x1b0d55[_0x3958a1(0x1d2)]+_0x3958a1(0x1f2)+_0x2c6b5e+'ms'};}};return _0x1b0d55[_0x28efc3(0x222)]!==_0x28efc3(0x1fc)&&(_0x15f172['dryRun']=async _0x28062b=>{const _0x3a4f53=_0x28efc3,_0x3670a9=_0x28062b[_0x3a4f53(0x1df)](_0x3a4f53(0x21c)),_0x20c42a=_0x1b0d55[_0x3a4f53(0x1cc)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x28062b[_0x3a4f53(0x1df)]('params'))):parseJsonParams(_0x28062b[_0x3a4f53(0x1df)]('params'))??{};let _0x33043b=_0x20c42a;if(_0x1b0d55[_0x3a4f53(0x1cc)]===_0x3a4f53(0x232)){const _0x28b528=parseUpdateIdsFromParams(_0x20c42a);_0x33043b=normalizeUpdateParamsForRuntime(_0x20c42a,_0x28b528);}return dryRun(_0x3a4f53(0x1db),_0x3a4f53(0x1e4)+_0x3670a9+'/'+_0x1b0d55[_0x3a4f53(0x1cc)])[_0x3a4f53(0x217)](_0x33043b)[_0x3a4f53(0x1d9)]('Preview:\x20data\x20'+_0x1b0d55[_0x3a4f53(0x1d2)]+_0x3a4f53(0x1cf)+_0x3670a9)['build']();}),_0x15f172;}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0x368929,_0x101c81){const _0x14613f=a25_0x32deef;return{'operation':_0x14613f(0x232),'mode':_0x14613f(0x1e6),'ids':_0x368929,'total':_0x368929['length'],'result':_0x101c81};}
|