@lovrabet/lovrabet-cli 2.3.2-beta.3 → 2.3.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.d.ts +15 -0
- package/lib/commands/approval/index.js +1 -0
- 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.d.ts +83 -0
- 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/positive-safe-integer.d.ts +5 -0
- package/lib/utils/positive-safe-integer.js +1 -0
- package/lib/utils/redaction.d.ts +17 -0
- package/lib/utils/redaction.js +1 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +3 -2
- package/skills/lovrabet/references/lovrabet-approval-workflow.md +73 -0
- package/skills/lovrabet.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
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
|
+
const a13_0x13502c=a13_0xaace;(function(_0x36889b,_0x34cdfd){const _0x552596=a13_0xaace,_0x39e444=_0x36889b();while(!![]){try{const _0x41dfb5=-parseInt(_0x552596(0xe5))/0x1+-parseInt(_0x552596(0x111))/0x2+parseInt(_0x552596(0xcb))/0x3+parseInt(_0x552596(0xc8))/0x4+-parseInt(_0x552596(0x112))/0x5*(-parseInt(_0x552596(0x10e))/0x6)+parseInt(_0x552596(0x115))/0x7*(-parseInt(_0x552596(0xf7))/0x8)+parseInt(_0x552596(0x10a))/0x9*(parseInt(_0x552596(0xfa))/0xa);if(_0x41dfb5===_0x34cdfd)break;else _0x39e444['push'](_0x39e444['shift']());}catch(_0x19f699){_0x39e444['push'](_0x39e444['shift']());}}}(a13_0x40a1,0x75b87));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';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(_0xac9948=USER_ACCESS_KEY_CREATE_URL){const _0xb5b387=a13_0xaace;writeCliSideChannelLine(_0xb5b387(0xf8)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+_0xac9948+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0xb5b387(0xd2));}function buildAccessKeySetupGuide(_0x43b17c=USER_ACCESS_KEY_CREATE_URL){const _0x5a711f=a13_0xaace;return[_0x5a711f(0xf8)+PRODUCT_CONFIG['userCenterDisplayName']+':',_0x43b17c,_0x5a711f(0xee)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0x5a711f(0xf3)]('\x0a');}function canPromptForAccessKey(_0x5cfb2e){const _0x50cb31=a13_0xaace;return!_0x5cfb2e['nonInteractive']&&process[_0x50cb31(0xfe)][_0x50cb31(0xd5)]!==![]&&process[_0x50cb31(0xea)][_0x50cb31(0xd5)]!==![];}function a13_0xaace(_0x3d24ad,_0xcf73f9){_0x3d24ad=_0x3d24ad-0xbc;const _0x40a1dd=a13_0x40a1();let _0xaace8=_0x40a1dd[_0x3d24ad];return _0xaace8;}function resolveAuthScopeFlags(_0x2657d3){const _0x221ad1=a13_0xaace;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2657d3[_0x221ad1(0xe7)](_0x221ad1(0x105)),'explicitProject':_0x2657d3[_0x221ad1(0xe7)](_0x221ad1(0xe4)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x3be0d9){const _0x56ce15=a13_0xaace;let _0x1f85f8=(_0x3be0d9[_0x56ce15(0xfd)](_0x56ce15(0xd4))||_0x3be0d9[_0x56ce15(0xfd)]('ak')||'')[_0x56ce15(0xed)]();const _0x1b23a6=(_0x3be0d9[_0x56ce15(0xfd)](_0x56ce15(0x109))||'')[_0x56ce15(0xed)](),_0x58ec6e=''+getUserDomain()+PRODUCT_CONFIG[_0x56ce15(0xc9)];if(!_0x1f85f8&&canPromptForAccessKey(_0x3be0d9))try{showAccessKeyCreateHint(_0x58ec6e),_0x1f85f8=await promptAccessKey('');}catch(_0x4241bc){if(isAbortPrompt(_0x4241bc))throw CliErrors[_0x56ce15(0xe6)]();throw _0x4241bc;}if(!_0x1f85f8)throw CliErrors[_0x56ce15(0x107)](_0x56ce15(0x110),buildAccessKeySetupGuide(_0x58ec6e));if(!ACCESS_KEY_PATTERN[_0x56ce15(0x114)](_0x1f85f8))throw CliErrors['validation']('Invalid\x20accessKey\x20format.',_0x56ce15(0xc7));if(!_0x1b23a6)return{'accessKey':_0x1f85f8};const _0xe706f8=normalizeEnv(_0x1b23a6);return{'accessKey':_0x1f85f8,'env':isDaily(_0xe706f8)?_0x56ce15(0xf4):isDev(_0xe706f8)?'development':_0x56ce15(0xc4)};}export const authDefinitions=[{'service':a13_0x13502c(0xcc),'command':a13_0x13502c(0x116),'description':a13_0x13502c(0xda),'risk':'write','confirmationDescription':a13_0x13502c(0x10c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x13502c(0xd4),'type':a13_0x13502c(0xc5),'description':a13_0x13502c(0x10d)},{'name':'ak','type':a13_0x13502c(0xc5),'description':a13_0x13502c(0x100)},{'name':a13_0x13502c(0x105),'type':a13_0x13502c(0xf2),'description':a13_0x13502c(0xc0),'default':!![]},{'name':a13_0x13502c(0xe4),'type':a13_0x13502c(0xf2),'description':a13_0x13502c(0xdb),'default':![]}],async 'execute'(_0xcb9c27){const _0x306183=a13_0x13502c;if(_0xcb9c27[_0x306183(0xe7)](_0x306183(0xe1)))throw CliErrors[_0x306183(0x107)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x306183(0xc2)+CLI_BIN_NAME+_0x306183(0xf9)+CLI_BIN_NAME+_0x306183(0xf1));const _0x329393=(_0xcb9c27[_0x306183(0xfd)](_0x306183(0xd4))||_0xcb9c27[_0x306183(0xfd)]('ak')||'')[_0x306183(0xed)]();if(!_0x329393&&_0xcb9c27[_0x306183(0xf0)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x306183(0xc9)])};const _0x43ff9c=await resolveAuthWriteInput(_0xcb9c27),_0x1aa4c9=resolveAuthScopeFlags(_0xcb9c27),_0x4f8967=readScopedConfig(_0x1aa4c9);_0x4f8967['accessKey']=_0x43ff9c[_0x306183(0xe0)];_0x43ff9c[_0x306183(0x109)]&&(_0x4f8967[_0x306183(0x109)]=_0x43ff9c[_0x306183(0x109)]);writeScopedConfig(_0x4f8967,_0x1aa4c9);const _0xb98838=_0x1aa4c9[_0x306183(0x105)]?'global':_0x306183(0xe4),_0x493365=_0x4f8967['env']?_0x306183(0x103)+_0x4f8967[_0x306183(0x109)]+'.':'';return{'ok':!![],'message':_0x306183(0xd6)+_0xb98838+_0x306183(0xe9)+_0x493365+_0x306183(0xef)+CLI_BIN_NAME+_0x306183(0xec)};}},{'service':a13_0x13502c(0xcc),'command':a13_0x13502c(0xe3),'description':a13_0x13502c(0x10b),'risk':a13_0x13502c(0xd7),'confirmationDescription':a13_0x13502c(0xca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x13502c(0x105),'type':'boolean','description':a13_0x13502c(0xd1),'default':!![]},{'name':a13_0x13502c(0xe4),'type':a13_0x13502c(0xf2),'description':a13_0x13502c(0x11a),'default':![]}],async 'execute'(_0xd6e570){const _0x3b8baf=a13_0x13502c,_0x2573cc=resolveAuthScopeFlags(_0xd6e570),_0x33a3a5=readScopedConfig(_0x2573cc),_0x3ac166=!!_0x33a3a5[_0x3b8baf(0xe0)];delete _0x33a3a5['accessKey'],writeScopedConfig(_0x33a3a5,_0x2573cc);const _0x836558=_0x2573cc[_0x3b8baf(0x105)]?_0x3b8baf(0x105):_0x3b8baf(0xe4);if(_0x3ac166)return{'ok':!![],'message':_0x3b8baf(0x118)+_0x836558+_0x3b8baf(0xe9)};return{'ok':!![],'message':_0x3b8baf(0xfc)+_0x836558+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a13_0x13502c(0xcc),'command':a13_0x13502c(0xbe),'description':a13_0x13502c(0xe2),'risk':a13_0x13502c(0xdf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x13502c(0x105),'type':a13_0x13502c(0xf2),'description':a13_0x13502c(0xfb),'default':!![]},{'name':a13_0x13502c(0xe4),'type':a13_0x13502c(0xf2),'description':a13_0x13502c(0xc6),'default':![]},{'name':a13_0x13502c(0xc1),'type':a13_0x13502c(0xf2),'description':a13_0x13502c(0xbc),'default':![]}],async 'execute'(_0x4c12c1){const _0x38cf4b=a13_0x13502c,_0x4f6ca9=resolveAuthScopeFlags(_0x4c12c1),_0x2a51b6=readScopedConfig(_0x4f6ca9),_0x4fe06f=productEnvName(_0x38cf4b(0xdd)),_0x4f2af6=productEnv(_0x38cf4b(0xdd))||undefined,_0x51d2b6=_0x2a51b6['accessKey']||undefined,_0x3f9c7c=_0x4f2af6||_0x51d2b6,_0x251777=_0x4f2af6?_0x4fe06f+'\x20env\x20var':_0x51d2b6?(_0x4f6ca9[_0x38cf4b(0x105)]?_0x38cf4b(0x105):_0x38cf4b(0xe4))+_0x38cf4b(0xd0):null,_0x4569bc=['Auth\x20mode:\x20'+AUTH_MODE[_0x38cf4b(0x102)]];if(_0x3f9c7c){const _0x4f7027=maskCliAccessKey(_0x3f9c7c);_0x4569bc[_0x38cf4b(0xc3)](_0x38cf4b(0xe8)+_0x4f7027+(_0x251777?_0x38cf4b(0xbd)+_0x251777+')':'')),_0x4569bc[_0x38cf4b(0xc3)](_0x38cf4b(0x108));}if(!_0x3f9c7c){_0x4569bc[_0x38cf4b(0xc3)](''),_0x4569bc[_0x38cf4b(0xc3)](_0x38cf4b(0x119)),_0x4569bc['push'](''),_0x4569bc[_0x38cf4b(0xc3)](_0x38cf4b(0xd3)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x4569bc['push'](''),_0x4569bc[_0x38cf4b(0xc3)](_0x38cf4b(0x106)+PRODUCT_CONFIG[_0x38cf4b(0x117)]+')'),_0x4569bc['push'](_0x38cf4b(0xce)),_0x4569bc[_0x38cf4b(0xc3)](''),_0x4569bc[_0x38cf4b(0xc3)](_0x38cf4b(0xcd)),_0x4569bc['push']('\x20\x20export\x20'+_0x4fe06f+_0x38cf4b(0xf6)),_0x4569bc[_0x38cf4b(0xc3)](''),_0x4569bc[_0x38cf4b(0xc3)](_0x38cf4b(0x10f)+CLI_BIN_NAME+_0x38cf4b(0xec)),_0x4569bc[_0x38cf4b(0xc3)](_0x38cf4b(0x101)+CLI_BIN_NAME+_0x38cf4b(0xd9));if(_0x4c12c1['bool'](_0x38cf4b(0xc1))){const _0x5e87f1=readStoredDeviceCode();if(_0x5e87f1&&!isStoredDeviceCodeExpired(_0x5e87f1)){const _0x145b7c=getUserDomain(),_0x9d08d9=await fetchDeviceToken(_0x145b7c,_0x5e87f1[_0x38cf4b(0xbf)]);if(_0x9d08d9['status']===_0x38cf4b(0xeb)&&_0x9d08d9[_0x38cf4b(0xf5)]){const _0x74f16c={'global':_0x5e87f1[_0x38cf4b(0x104)]===_0x38cf4b(0x105)},_0x176966=readScopedConfig(_0x74f16c);_0x176966['accessKey']=_0x9d08d9[_0x38cf4b(0xf5)],writeScopedConfig(_0x176966,_0x74f16c),deleteStoredDeviceCode();const _0x43b584=_0x9d08d9['access_key'],_0x5043d2=maskCliAccessKey(_0x43b584),_0x3a6ee9=_0x5e87f1[_0x38cf4b(0x104)]===_0x38cf4b(0x105)?_0x38cf4b(0xd8):_0x38cf4b(0xde);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE[_0x38cf4b(0x102)],_0x38cf4b(0xe8)+_0x5043d2+_0x38cf4b(0xbd)+_0x3a6ee9+')','Status:\x20valid'][_0x38cf4b(0xf3)]('\x0a')};}_0x9d08d9[_0x38cf4b(0xbe)]===_0x38cf4b(0xcf)&&deleteStoredDeviceCode();throw CliErrors[_0x38cf4b(0xff)]('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors[_0x38cf4b(0xff)](_0x4569bc['join']('\x0a'));}}return{'ok':!![],'message':_0x4569bc[_0x38cf4b(0xf3)]('\x0a')};}},{'service':a13_0x13502c(0xcc),'command':a13_0x13502c(0x113),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x73c332){const _0x4d14dc=a13_0x13502c,_0x43aede=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x43aede,'meta':{'env':_0x73c332[_0x4d14dc(0xdc)]??_0x4d14dc(0xc4)}}};}},authDeviceDefinition];function a13_0x40a1(){const _0x5e5b6d=['validation','Status:\x20valid','env','29808DiqDHh','Clear\x20the\x20AccessKey\x20from\x20config','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','AccessKey\x20(ak_xxx...)','10518mWRxeU','Then\x20verify\x20with:\x20','Missing\x20accessKey.','1364712UDddHb','930LLjFKp','info','test','1347605vjZBQw','login','newConfigFileName','AccessKey\x20cleared\x20from\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','\x20(via\x20','status','code','Write\x20to\x20global\x20config\x20(default)','check','Use\x20`','push','production','string','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','1100076dvEsHT','accessKeyCreatePath','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','1759152ZjFhCF','auth','Option\x20C:\x20environment\x20variable','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','expired','\x20config','Clear\x20from\x20global\x20config\x20(default)','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Option\x20A:\x20','access-key','isTTY','AccessKey\x20saved\x20to\x20','write','global\x20config','\x20doctor','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','envName','ACCESS_KEY','project\x20config','read','accessKey','yes','Show\x20current\x20authentication\x20status','logout','project','870375dMkAlh','cancelled','bool','AccessKey:\x20','\x20config.','stdout','success','\x20auth\x20status','trim','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20Verify:\x20','nonInteractive','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','boolean','join','daily','access_key','=ak_xxx','8rUbPDC','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','3140Kbqqya','Read\x20from\x20global\x20config\x20(default)','No\x20AccessKey\x20found\x20in\x20','str','stdin','authRequired','Shorthand\x20for\x20--access-key','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','ClientAk','\x20Current\x20env:\x20','scope','global','Option\x20B:\x20apps\x20config\x20('];a13_0x40a1=function(){return _0x5e5b6d;};return a13_0x40a1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x41e9(){const _0x4d4bc6=['race','1941760KdoTVB','question','stdin','19501790lmnWKD','AbortPrompt','8nirWjV','7631847MdmFiG','496BtUVbA','SIGINT','AccessKey\x20(paste\x20ak_...):\x20','close','AccessKey\x20(','4072747RkbRIW','stdout','once','User\x20aborted\x20prompt','6qHBSWi','removeListener','2664895EBQCnY','2948jLvFEm','1440438pYPURk','name'];a14_0x41e9=function(){return _0x4d4bc6;};return a14_0x41e9();}function a14_0x438c(_0xc4f82a,_0x20752a){_0xc4f82a=_0xc4f82a-0x1f2;const _0x41e983=a14_0x41e9();let _0x438ca6=_0x41e983[_0xc4f82a];return _0x438ca6;}(function(_0x4c56fc,_0x303273){const _0x3d011d=a14_0x438c,_0x337889=_0x4c56fc();while(!![]){try{const _0x31149f=-parseInt(_0x3d011d(0x203))/0x1*(-parseInt(_0x3d011d(0x1f8))/0x2)+parseInt(_0x3d011d(0x1f9))/0x3+parseInt(_0x3d011d(0x1fc))/0x4+parseInt(_0x3d011d(0x1f7))/0x5*(-parseInt(_0x3d011d(0x1f5))/0x6)+-parseInt(_0x3d011d(0x208))/0x7*(-parseInt(_0x3d011d(0x201))/0x8)+parseInt(_0x3d011d(0x202))/0x9+-parseInt(_0x3d011d(0x1ff))/0xa;if(_0x31149f===_0x303273)break;else _0x337889['push'](_0x337889['shift']());}catch(_0x2b1305){_0x337889['push'](_0x337889['shift']());}}}(a14_0x41e9,0x9d108));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x564e5e=a14_0x438c;super(_0x564e5e(0x1f4)),this[_0x564e5e(0x1fa)]=_0x564e5e(0x200);}}function createSafeRl(){const _0x220152=a14_0x438c,_0x506094=createInterface({'input':process[_0x220152(0x1fe)],'output':process[_0x220152(0x1f2)]});let _0x1c7025;const _0x349a24=new Promise((_0x547cb1,_0x17e811)=>{const _0x5aacca=_0x220152;_0x1c7025=()=>{const _0xdbc8de=a14_0x438c;_0x1c7025&&(_0x506094[_0xdbc8de(0x1f6)](_0xdbc8de(0x204),_0x1c7025),_0x1c7025=undefined);try{_0x506094[_0xdbc8de(0x206)]();}catch{}_0x17e811(new AbortPrompt());},_0x506094[_0x5aacca(0x1f3)](_0x5aacca(0x204),_0x1c7025);}),_0x5342ac=()=>{const _0x4d364e=_0x220152;_0x1c7025&&(_0x506094['removeListener'](_0x4d364e(0x204),_0x1c7025),_0x1c7025=undefined);try{_0x506094[_0x4d364e(0x206)]();}catch{}};return{'rl':_0x506094,'abortPromise':_0x349a24,'disposeSuccess':_0x5342ac};}export async function promptAccessKey(_0x586e41=''){const _0x2f80d5=a14_0x438c,{rl:_0x493165,abortPromise:_0x11617d,disposeSuccess:_0x5ddbe2}=createSafeRl(),_0x3e4e4b=new Promise(_0x41666e=>{const _0x63b013=a14_0x438c,_0x9796cf=_0x586e41?_0x63b013(0x207)+_0x586e41+'):\x20':_0x63b013(0x205);_0x493165[_0x63b013(0x1fd)](_0x9796cf,_0xe91106=>{_0x5ddbe2(),_0x41666e(_0xe91106['trim']()||_0x586e41);});});return Promise[_0x2f80d5(0x1fb)]([_0x3e4e4b,_0x11617d]);}export function isAbortPrompt(_0x3f51ab){const _0x279e99=a14_0x438c;return _0x3f51ab instanceof Error&&_0x3f51ab['name']===_0x279e99(0x200);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x561a(_0x317fba,_0x593705){_0x317fba=_0x317fba-0xac;const _0xc40ad5=a15_0xc40a();let _0x561a42=_0xc40ad5[_0x317fba];return _0x561a42;}const a15_0x32ea45=a15_0x561a;(function(_0x3698b5,_0xe8dc4c){const _0x270ca7=a15_0x561a,_0x138057=_0x3698b5();while(!![]){try{const _0x25d444=parseInt(_0x270ca7(0xb8))/0x1*(parseInt(_0x270ca7(0xbd))/0x2)+-parseInt(_0x270ca7(0xac))/0x3+-parseInt(_0x270ca7(0xaf))/0x4*(-parseInt(_0x270ca7(0xb1))/0x5)+parseInt(_0x270ca7(0xba))/0x6+parseInt(_0x270ca7(0xae))/0x7+-parseInt(_0x270ca7(0xb0))/0x8+-parseInt(_0x270ca7(0xb9))/0x9;if(_0x25d444===_0xe8dc4c)break;else _0x138057['push'](_0x138057['shift']());}catch(_0x1c7bfc){_0x138057['push'](_0x138057['shift']());}}}(a15_0xc40a,0x788c2));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':'bff','command':a15_0x32ea45(0xb7),'description':a15_0x32ea45(0xbb),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x32ea45(0xb3)}],async 'execute'(_0x4488e9){const _0x4321ca=a15_0x32ea45,_0x3a9386=await getBffEndpointContract(_0x4488e9[_0x4321ca(0xb5)],_0x4488e9[_0x4321ca(0xbe)](_0x4321ca(0xb6)));return{'ok':!![],'data':{'appCode':_0x3a9386[_0x4321ca(0xb5)],'functionName':_0x3a9386['functionName'],'description':_0x3a9386[_0x4321ca(0xbc)]||_0x4321ca(0xad),'version':_0x3a9386[_0x4321ca(0xb2)],'gmtModified':_0x3a9386[_0x4321ca(0xb4)]}};}};function a15_0xc40a(){const _0x3d6a30=['60GNZibq','5900760EjSObX','310710grGdSF','version','Backend\x20Function\x20name','gmtModified','appCode','name','detail','125997dAcUfy','6537438wHNBAG','3346014cEGmUa','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','description','4pYGIgE','str','1244334ZwcCDJ','(none)','4415068tvOXCN'];a15_0xc40a=function(){return _0x3d6a30;};return a15_0xc40a();}
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x5f388d=a16_0x38a9;(function(_0x2ee0d1,_0x11c337){const _0x518c25=a16_0x38a9,_0x29e36e=_0x2ee0d1();while(!![]){try{const _0x59615c=parseInt(_0x518c25(0xa7))/0x1+-parseInt(_0x518c25(0xa1))/0x2+-parseInt(_0x518c25(0xa5))/0x3*(-parseInt(_0x518c25(0xa4))/0x4)+parseInt(_0x518c25(0xa8))/0x5*(parseInt(_0x518c25(0xa2))/0x6)+-parseInt(_0x518c25(0xab))/0x7*(parseInt(_0x518c25(0x9c))/0x8)+parseInt(_0x518c25(0xaa))/0x9+-parseInt(_0x518c25(0x9e))/0xa;if(_0x59615c===_0x11c337)break;else _0x29e36e['push'](_0x29e36e['shift']());}catch(_0x56774a){_0x29e36e['push'](_0x29e36e['shift']());}}}(a16_0x1c3d,0x34ef8));function a16_0x38a9(_0x2f8df5,_0x4b98ea){_0x2f8df5=_0x2f8df5-0x9b;const _0x1c3d22=a16_0x1c3d();let _0x38a9af=_0x1c3d22[_0x2f8df5];return _0x38a9af;}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a16_0x1c3d(){const _0x44581a=['Backend\x20Function\x20name\x20to\x20execute','bff','8ZSNMBu','params','2646500hgxipT','str','name','425908DyduJn','770010MXCxXH','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','846008veAPtX','3XZcyqa','read','420352nyerKV','5KUMdiT','now','137322rapADa','567133brewzl'];a16_0x1c3d=function(){return _0x44581a;};return a16_0x1c3d();}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x5f388d(0x9b),'command':'exec','description':a16_0x5f388d(0xa3),'risk':a16_0x5f388d(0xa6),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x5f388d(0xac)},PARAMS_FLAG],async 'execute'(_0x12a5f6){const _0xeb0762=a16_0x5f388d,_0x3bc1ee=parseJsonParams(_0x12a5f6['str'](_0xeb0762(0x9d))),_0x4e1125=Date[_0xeb0762(0xa9)](),_0x38fb7e=await executeSdkBff(_0x12a5f6[_0xeb0762(0x9f)](_0xeb0762(0xa0)),_0x3bc1ee),_0x92bfbd=Date[_0xeb0762(0xa9)]()-_0x4e1125;return{'ok':!![],'data':{'result':_0x38fb7e,'elapsed':_0x92bfbd},'message':'Backend\x20Function\x20executed\x20in\x20'+_0x92bfbd+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3607d6,_0x55ec29){const _0x4c04ff=a17_0x3a60,_0x7b05e9=_0x3607d6();while(!![]){try{const _0x159873=-parseInt(_0x4c04ff(0x1bf))/0x1*(-parseInt(_0x4c04ff(0x1c0))/0x2)+parseInt(_0x4c04ff(0x1bd))/0x3*(parseInt(_0x4c04ff(0x1c3))/0x4)+parseInt(_0x4c04ff(0x1c2))/0x5+-parseInt(_0x4c04ff(0x1b8))/0x6*(parseInt(_0x4c04ff(0x1b9))/0x7)+parseInt(_0x4c04ff(0x1bc))/0x8*(-parseInt(_0x4c04ff(0x1c1))/0x9)+parseInt(_0x4c04ff(0x1bb))/0xa*(-parseInt(_0x4c04ff(0x1be))/0xb)+-parseInt(_0x4c04ff(0x1b7))/0xc*(-parseInt(_0x4c04ff(0x1ba))/0xd);if(_0x159873===_0x55ec29)break;else _0x7b05e9['push'](_0x7b05e9['shift']());}catch(_0xd6b4f3){_0x7b05e9['push'](_0x7b05e9['shift']());}}}(a17_0x56c7,0x2f1c1));import{bffDetail}from'../../commands/bff/detail.js';function a17_0x3a60(_0x3a201c,_0xc29e62){_0x3a201c=_0x3a201c-0x1b7;const _0x56c7c3=a17_0x56c7();let _0x3a60fa=_0x56c7c3[_0x3a201c];return _0x3a60fa;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];function a17_0x56c7(){const _0x483c00=['4SiecOh','9gBZpio','403245iNtYCV','79400agJfdn','35808JEPgTB','6txrnyL','668269efeQUM','1755ymxKnY','10vRBgSk','2551344uYdeYV','12eHpeHr','1978031swoOMR','112139hgqjoG'];a17_0x56c7=function(){return _0x483c00;};return a17_0x56c7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a18_0x526b07=a18_0x3eae;(function(_0x5f3551,_0x3119e4){const _0x4d626a=a18_0x3eae,_0x23f097=_0x5f3551();while(!![]){try{const _0x456a9d=-parseInt(_0x4d626a(0x15f))/0x1+parseInt(_0x4d626a(0x144))/0x2+parseInt(_0x4d626a(0x15a))/0x3+-parseInt(_0x4d626a(0x151))/0x4+parseInt(_0x4d626a(0x14d))/0x5+parseInt(_0x4d626a(0x152))/0x6*(-parseInt(_0x4d626a(0x156))/0x7)+parseInt(_0x4d626a(0x148))/0x8;if(_0x456a9d===_0x3119e4)break;else _0x23f097['push'](_0x23f097['shift']());}catch(_0x312cd0){_0x23f097['push'](_0x23f097['shift']());}}}(a18_0x4f8c,0x5bbd6));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a18_0x3eae(_0x54f30d,_0x335f17){_0x54f30d=_0x54f30d-0x13d;const _0x4f8c19=a18_0x4f8c();let _0x3eaeac=_0x4f8c19[_0x54f30d];return _0x3eaeac;}function a18_0x4f8c(){const _0x366c2a=['\x20at\x20','INSTALL_FAILED','install','apiError','322700atOJOa','skillVersion','log','CLI\x20Built-in\x20Skill\x20','3288520IEDHRK','code','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','cwd','installedPath','1574845oqVyRj','\x20is\x20already\x20current','read','pipe','1673256vYoUNP','13026BBANIE','Built-in\x20Skill\x20install\x20failed\x20[','cli-skill','error','238cZOKTj','unknown','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','260127aJjbJc','changed','setLogPath',']:\x20','cli-skill-install','106199boyyjb','inherit','info','nonInteractive'];a18_0x4f8c=function(){return _0x366c2a;};return a18_0x4f8c();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a18_0x526b07(0x154),'command':a18_0x526b07(0x142),'description':a18_0x526b07(0x158),'risk':a18_0x526b07(0x14f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x463344){const _0x5d89bc=a18_0x526b07;logger[_0x5d89bc(0x15c)](process[_0x5d89bc(0x14b)]()),logger[_0x5d89bc(0x13e)](_0x5d89bc(0x15e),_0x5d89bc(0x159));const _0x25e4b9=installBuiltinSkill({'stdio':_0x463344[_0x5d89bc(0x13f)]?_0x5d89bc(0x150):_0x5d89bc(0x13d)});if(!_0x25e4b9['ok'])throw CliErrors[_0x5d89bc(0x143)](_0x5d89bc(0x153)+(_0x25e4b9[_0x5d89bc(0x149)]||_0x5d89bc(0x141))+_0x5d89bc(0x15d)+(_0x25e4b9[_0x5d89bc(0x155)]||_0x5d89bc(0x157)),_0x5d89bc(0x14a)+_0x25e4b9['repairCommand']);const _0x5bd389=_0x25e4b9[_0x5d89bc(0x14c)]?_0x5d89bc(0x140)+_0x25e4b9[_0x5d89bc(0x14c)]:'';return console[_0x5d89bc(0x146)](_0x25e4b9[_0x5d89bc(0x15b)]?_0x5d89bc(0x147)+_0x25e4b9[_0x5d89bc(0x145)]+'\x20installed'+_0x5bd389:_0x5d89bc(0x147)+_0x25e4b9[_0x5d89bc(0x145)]+_0x5d89bc(0x14e)+_0x5bd389),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f7a07,_0x36d38c){const _0xc40062=a19_0x4a05,_0x2fc618=_0x2f7a07();while(!![]){try{const _0x198ec8=-parseInt(_0xc40062(0x159))/0x1*(-parseInt(_0xc40062(0x160))/0x2)+parseInt(_0xc40062(0x151))/0x3*(-parseInt(_0xc40062(0x155))/0x4)+-parseInt(_0xc40062(0x157))/0x5+-parseInt(_0xc40062(0x15f))/0x6+parseInt(_0xc40062(0x150))/0x7+parseInt(_0xc40062(0x15c))/0x8*(parseInt(_0xc40062(0x15a))/0x9)+parseInt(_0xc40062(0x15d))/0xa;if(_0x198ec8===_0x36d38c)break;else _0x2fc618['push'](_0x2fc618['shift']());}catch(_0xd77263){_0x2fc618['push'](_0x2fc618['shift']());}}}(a19_0xd993,0x60116));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a19_0xd993(){const _0x33d955=['91251BuWozB','validation','136LEQfGU','11114610gvoKvk','Use\x20only\x20one\x20config\x20scope\x20flag.','72186dnPvUU','4kNjLnt','Not\x20inside\x20a\x20project\x20(no\x20','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','global-default','\x20(global)','\x20first.','\x20found).','580692OYTKbY','15bzNjBE',',\x20or\x20create\x20a\x20project-local\x20','inProject','newConfigFileName','456992OvZbEI','global','3135565iVlELm','project','118549dWFEcS'];a19_0xd993=function(){return _0x33d955;};return a19_0xd993();}export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,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(_0x4f333c){const _0xe4fbfd=a19_0x4a05,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x131fa3}=_0x4f333c;if(explicitGlobal&&explicitProject)throw CliErrors[_0xe4fbfd(0x15b)](_0xe4fbfd(0x162),_0xe4fbfd(0x15e));if(explicitGlobal)return _0xe4fbfd(0x156);if(explicitProject)return _0xe4fbfd(0x158);switch(_0x131fa3){case _0xe4fbfd(0x163):return _0xe4fbfd(0x156);case'project-or-global-explicit':if(!(_0x4f333c[_0xe4fbfd(0x153)]??isInProject()))throw CliErrors[_0xe4fbfd(0x15b)](_0xe4fbfd(0x161)+PRODUCT_CONFIG[_0xe4fbfd(0x154)]+_0xe4fbfd(0x14f),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0xe4fbfd(0x154)]+_0xe4fbfd(0x152)+PRODUCT_CONFIG['newConfigFileName']+_0xe4fbfd(0x14e));return _0xe4fbfd(0x158);}}export function toScopeFlags(_0x49748f){const _0x33269f=a19_0x4a05;return{'global':_0x49748f===_0x33269f(0x156)};}function a19_0x4a05(_0x273208,_0x488998){_0x273208=_0x273208-0x14d;const _0xd993ef=a19_0xd993();let _0x4a058b=_0xd993ef[_0x273208];return _0x4a058b;}export function formatScopeLabel(_0x4c57a8){const _0x3bf3dd=a19_0x4a05;return _0x4c57a8===_0x3bf3dd(0x156)?_0x3bf3dd(0x14d):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x316dd1,_0x2b38c5){const _0x30c0e8=a20_0x11fa,_0x49ceaa=_0x316dd1();while(!![]){try{const _0x1a627c=-parseInt(_0x30c0e8(0xee))/0x1*(-parseInt(_0x30c0e8(0xec))/0x2)+-parseInt(_0x30c0e8(0xf1))/0x3*(parseInt(_0x30c0e8(0xe5))/0x4)+parseInt(_0x30c0e8(0xe7))/0x5+parseInt(_0x30c0e8(0xef))/0x6+-parseInt(_0x30c0e8(0xf7))/0x7*(-parseInt(_0x30c0e8(0xfd))/0x8)+-parseInt(_0x30c0e8(0xfb))/0x9+-parseInt(_0x30c0e8(0xfa))/0xa;if(_0x1a627c===_0x2b38c5)break;else _0x49ceaa['push'](_0x49ceaa['shift']());}catch(_0xf0d46b){_0x49ceaa['push'](_0x49ceaa['shift']());}}}(a20_0x4a66,0xa0e96));import{CliErrors}from'../../errors.js';function isSet(_0x114df5,_0x374525){const _0x1405dd=a20_0x11fa,_0x4e72bc=_0x114df5[_0x1405dd(0xeb)](_0x374525);return _0x4e72bc!==undefined&&_0x4e72bc!==''&&_0x4e72bc!==![]&&_0x4e72bc!==0x0;}function fmtNames(_0x16aa31){const _0x3c60d7=a20_0x11fa;return _0x16aa31[_0x3c60d7(0xfc)](_0x2553be=>'--'+_0x2553be)[_0x3c60d7(0xf5)](',\x20');}export function requireOneOf(_0x20e75f,_0x483f05,_0x34415c){const _0x341432=a20_0x11fa,_0x128521=_0x483f05['filter'](_0x4aff2d=>isSet(_0x20e75f,_0x4aff2d));if(_0x128521[_0x341432(0xf6)]!==0x1)throw CliErrors[_0x341432(0xe8)](_0x128521[_0x341432(0xf6)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x483f05)+_0x341432(0xe6)+_0x34415c+'`.':_0x341432(0xed)+fmtNames(_0x483f05)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x128521)+'.',_0x128521['length']===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x483f05):_0x341432(0xf0));}export function requireAnyOf(_0x5e28f3,_0x4a8ecc,_0x39e07a){const _0x2a420d=a20_0x11fa;if(!_0x4a8ecc[_0x2a420d(0xf2)](_0x48983b=>isSet(_0x5e28f3,_0x48983b)))throw CliErrors['validation']('At\x20least\x20one\x20of\x20'+fmtNames(_0x4a8ecc)+_0x2a420d(0xe6)+_0x39e07a+'`.',_0x2a420d(0xf9)+fmtNames(_0x4a8ecc));}function a20_0x4a66(){const _0x1c1f8b=['Only\x20one\x20of\x20','221469dUAhMe','2398188vfMskp','Remove\x20all\x20but\x20one.','204144MYUGFh','some',':\x20expected\x20','Invalid\x20--','join','length','4060YQpSPr',',\x20got\x20\x22','Provide\x20one\x20of:\x20','9751130rLmPld','4105602ewkizW','map','3592xZgPnF','Use\x20only\x20one\x20of:\x20','12IuVhOX','\x20is\x20required\x20for\x20`','5957365lioiBH','validation','\x20are\x20mutually\x20exclusive\x20for\x20`','filter','flag','4SOjfrV'];a20_0x4a66=function(){return _0x1c1f8b;};return a20_0x4a66();}function a20_0x11fa(_0x8d620f,_0x311c24){_0x8d620f=_0x8d620f-0xe5;const _0x4a6609=a20_0x4a66();let _0x11fae6=_0x4a6609[_0x8d620f];return _0x11fae6;}export function mutuallyExclusive(_0x42c606,_0xa8eccc,_0x3c331d){const _0x28e6ec=a20_0x11fa,_0x394aa1=_0xa8eccc[_0x28e6ec(0xea)](_0x507824=>isSet(_0x42c606,_0x507824));if(_0x394aa1['length']>0x1)throw CliErrors[_0x28e6ec(0xe8)]('Flags\x20'+fmtNames(_0x394aa1)+_0x28e6ec(0xe9)+_0x3c331d+'`.',_0x28e6ec(0xfe)+fmtNames(_0xa8eccc));}export function validatePattern(_0x465da7,_0x316629,_0x4af84e,_0x5a2c01){const _0x3f97d7=a20_0x11fa,_0x3c6b32=_0x465da7['str'](_0x316629);if(_0x3c6b32&&!_0x4af84e['test'](_0x3c6b32))throw CliErrors[_0x3f97d7(0xe8)](_0x3f97d7(0xf4)+_0x316629+_0x3f97d7(0xf3)+_0x5a2c01+_0x3f97d7(0xf8)+_0x3c6b32+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a21_0x4ef6(_0x47c708,_0x713812){_0x47c708=_0x47c708-0x1ac;const _0x3254ca=a21_0x3254();let _0x4ef6f3=_0x3254ca[_0x47c708];return _0x4ef6f3;}function a21_0x3254(){const _0x53c41d=['5199918vYmwOm','2jKfyCO','35748pKYUNF','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','sqlcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','code','Resource\x20name\x20for\x20lookup','2091684lkYqJZ','Dataset\x20code\x20(32-char\x20hex\x20UUID)','verbose','global','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','2358093XGeWBJ','1007941dsZRgG','number','string','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','boolean','6339004elTgwO','117JXYtkB','5GMDjak','Resource\x20ID','3448SrgrKi','10563355mrtBsw','4nXeumy','Return\x20full\x20raw\x20response\x20object','10coxNmd'];a21_0x3254=function(){return _0x53c41d;};return a21_0x3254();}const a21_0x3c3110=a21_0x4ef6;(function(_0x50ff8d,_0x5e7fa9){const _0x3a6fd2=a21_0x4ef6,_0x13a7f1=_0x50ff8d();while(!![]){try{const _0x1716ad=-parseInt(_0x3a6fd2(0x1be))/0x1*(-parseInt(_0x3a6fd2(0x1b1))/0x2)+-parseInt(_0x3a6fd2(0x1bd))/0x3*(parseInt(_0x3a6fd2(0x1ad))/0x4)+-parseInt(_0x3a6fd2(0x1c5))/0x5*(-parseInt(_0x3a6fd2(0x1b0))/0x6)+parseInt(_0x3a6fd2(0x1c3))/0x7+-parseInt(_0x3a6fd2(0x1c7))/0x8*(parseInt(_0x3a6fd2(0x1b2))/0x9)+parseInt(_0x3a6fd2(0x1af))/0xa*(-parseInt(_0x3a6fd2(0x1ac))/0xb)+-parseInt(_0x3a6fd2(0x1b8))/0xc*(-parseInt(_0x3a6fd2(0x1c4))/0xd);if(_0x1716ad===_0x5e7fa9)break;else _0x13a7f1['push'](_0x13a7f1['shift']());}catch(_0x2a7998){_0x13a7f1['push'](_0x13a7f1['shift']());}}}(a21_0x3254,0xd9725));export const GLOBAL_SCOPE_FLAG={'name':a21_0x3c3110(0x1bb),'type':a21_0x3c3110(0x1c2),'default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};export const CODE_FLAG={'name':a21_0x3c3110(0x1b6),'type':a21_0x3c3110(0x1c0),'required':!![],'description':a21_0x3c3110(0x1b9),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x3c3110(0x1b3)}};export const SQLCODE_FLAG={'name':a21_0x3c3110(0x1b4),'type':a21_0x3c3110(0x1c0),'required':!![],'description':a21_0x3c3110(0x1b5),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0x3c3110(0x1bc)}};export const VERBOSE_FLAG={'name':a21_0x3c3110(0x1ba),'type':a21_0x3c3110(0x1c2),'description':a21_0x3c3110(0x1ae)};export const PARAMS_FLAG={'name':'params','type':a21_0x3c3110(0x1c0),'description':a21_0x3c3110(0x1c1)};export const NAME_FLAG={'name':'name','type':a21_0x3c3110(0x1c0),'description':a21_0x3c3110(0x1b7)};export const ID_FLAG={'name':'id','type':a21_0x3c3110(0x1bf),'required':!![],'description':a21_0x3c3110(0x1c6)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e7f76,_0x102744){const _0x3d0bbf=a22_0x5df1,_0x49d3c1=_0x5e7f76();while(!![]){try{const _0x23c46b=-parseInt(_0x3d0bbf(0x1d7))/0x1*(-parseInt(_0x3d0bbf(0x1d5))/0x2)+-parseInt(_0x3d0bbf(0x1d6))/0x3+-parseInt(_0x3d0bbf(0x1d8))/0x4+parseInt(_0x3d0bbf(0x1db))/0x5+-parseInt(_0x3d0bbf(0x1cd))/0x6*(-parseInt(_0x3d0bbf(0x1cb))/0x7)+-parseInt(_0x3d0bbf(0x1d9))/0x8*(parseInt(_0x3d0bbf(0x1d4))/0x9)+parseInt(_0x3d0bbf(0x1d3))/0xa;if(_0x23c46b===_0x102744)break;else _0x49d3c1['push'](_0x49d3c1['shift']());}catch(_0x23642c){_0x49d3c1['push'](_0x49d3c1['shift']());}}}(a22_0xcf5b,0x76ce6));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a22_0xcf5b(){const _0x177fdc=['\x20MB','2621150kvjZqY','1408383dcYnux','198382HJoVLc','1892529MznrpC','6tBpOsq','3698692owCGlk','8toGTti','toFixed','4325265TjaytF','File\x20not\x20found:\x20','1111411WzYOjJ','isFile','18mOiVGM','validation','trim','size','\x20path\x20is\x20required.'];a22_0xcf5b=function(){return _0x177fdc;};return a22_0xcf5b();}const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x375152){const _0xa24d95=a22_0x5df1;if(_0x375152>=BYTES_PER_MB){const _0x164df4=Math['ceil'](_0x375152/BYTES_PER_MB*0x64)/0x64;return _0x164df4[_0xa24d95(0x1da)](0x2)+_0xa24d95(0x1d2);}return _0x375152+'\x20B';}function a22_0x5df1(_0x41e05d,_0x106b45){_0x41e05d=_0x41e05d-0x1ca;const _0xcf5b5e=a22_0xcf5b();let _0x5df174=_0xcf5b5e[_0x41e05d];return _0x5df174;}export function requireRuntimeUploadFile(_0x5ade7e,_0xdef284){const _0x3ed651=a22_0x5df1,_0x49275b=_0x5ade7e[_0x3ed651(0x1cf)]();if(!_0x49275b)throw CliErrors[_0x3ed651(0x1ce)](_0xdef284+_0x3ed651(0x1d1));if(!existsSync(_0x49275b))throw CliErrors['validation'](_0x3ed651(0x1ca)+_0x49275b);const _0x477998=statSync(_0x49275b);if(!_0x477998[_0x3ed651(0x1cc)]())throw CliErrors[_0x3ed651(0x1ce)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x49275b);if(_0x477998[_0x3ed651(0x1d0)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x3ed651(0x1ce)]('File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x49275b+'\x20('+formatBytes(_0x477998['size'])+')');return{'path':_0x49275b,'size':_0x477998[_0x3ed651(0x1d0)]};}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a23_0x10d7dd=a23_0x31ee;(function(_0x5ea717,_0x4cc634){const _0x300778=a23_0x31ee,_0x4400c7=_0x5ea717();while(!![]){try{const _0x39c307=-parseInt(_0x300778(0x16c))/0x1+parseInt(_0x300778(0x19b))/0x2+-parseInt(_0x300778(0x165))/0x3+parseInt(_0x300778(0x18a))/0x4*(parseInt(_0x300778(0x1a6))/0x5)+-parseInt(_0x300778(0x1a8))/0x6*(parseInt(_0x300778(0x17e))/0x7)+-parseInt(_0x300778(0x174))/0x8+-parseInt(_0x300778(0x170))/0x9*(-parseInt(_0x300778(0x185))/0xa);if(_0x39c307===_0x4cc634)break;else _0x4400c7['push'](_0x4400c7['shift']());}catch(_0x3d47b4){_0x4400c7['push'](_0x4400c7['shift']());}}}(a23_0x4c38,0xc4298));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';function a23_0x31ee(_0x491e7e,_0xb6f338){_0x491e7e=_0x491e7e-0x162;const _0x4c38dd=a23_0x4c38();let _0x31ee83=_0x4c38dd[_0x491e7e];return _0x31ee83;}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(_0x1c2fd0){const _0x2af2b1=a23_0x31ee,_0x3a1935=_0x1c2fd0['split']('.');if(_0x3a1935[_0x2af2b1(0x1a1)]!==0x3||_0x3a1935[0x0]!==_0x2af2b1(0x179)||_0x3a1935[0x2]!==_0x2af2b1(0x181))return undefined;const _0x128819=_0x3a1935[0x1]?.[_0x2af2b1(0x19f)]();return _0x128819?_0x128819:undefined;}function parseAliasDeleteKey(_0xe5568e){const _0x1a33e4=a23_0x31ee,_0xa53c8f=_0xe5568e['split']('.');if(_0xa53c8f[_0x1a33e4(0x1a1)]===0x2&&_0xa53c8f[0x0]===_0x1a33e4(0x179)){const _0x7f05ee=_0xa53c8f[0x1]?.[_0x1a33e4(0x19f)]();return _0x7f05ee?{'alias':_0x7f05ee}:undefined;}if(_0xa53c8f[_0x1a33e4(0x1a1)]===0x3&&_0xa53c8f[0x0]===_0x1a33e4(0x179)&&_0xa53c8f[0x2]==='appcode'){const _0xa74004=_0xa53c8f[0x1]?.['trim']();return _0xa74004?{'alias':_0xa74004,'field':_0x1a33e4(0x181)}:undefined;}return undefined;}function setLocalAppAlias(_0xa440ed,_0x17760d,_0x1beec7){const _0x45500b=a23_0x31ee,_0x935241=_0xa440ed['apps']&&typeof _0xa440ed['apps']===_0x45500b(0x1a3)&&!Array['isArray'](_0xa440ed['apps'])?_0xa440ed[_0x45500b(0x179)]:{},_0x3017ec=_0x935241[_0x17760d]&&typeof _0x935241[_0x17760d]===_0x45500b(0x1a3)&&!Array[_0x45500b(0x184)](_0x935241[_0x17760d])?_0x935241[_0x17760d]:{};_0x3017ec['appcode']=_0x1beec7,_0x935241[_0x17760d]=_0x3017ec,_0xa440ed[_0x45500b(0x179)]=_0x935241;}function a23_0x4c38(){const _0x11e698=['key','780417oPlOtp','write','includes','global','Key\x20not\x20found:\x20','locale','Set\x20`','1048750CXuQEz','\x20\x20global:\x20\x20','keys','Get\x20a\x20config\x20value','1469367stYPpw','set',';\x20apps.<alias>.appcode','\x20config\x20set\x20<key>\x20<value>\x20[--global]','12342472PLeJCe','stringify','read','Config\x20files:\x0a','\x22\x20is\x20not\x20settable.','apps','validation','alias','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','`\x20=\x20\x22','2449097gyySdV','config','format','appcode','Usage:\x20','log','isArray','180tLNHCt','Missing\x20key\x20argument.','../../context.js','pageSize\x20must\x20be\x20a\x20positive\x20number','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','3980468BkPVoN','Deleted\x20`','list','\x22.\x20Allowed:\x20','(none)','Invalid\x20locale\x20value.','Invalid\x20value\x20for\x20\x22','value','Delete\x20a\x20configuration\x20value','Key\x20already\x20absent:\x20','\x20config\x20delete\x20<key>\x20[--global]','accessKey','project-or-global-explicit','pretty','Set\x20a\x20configuration\x20value','args','delete','842138alreIL','Missing\x20key\x20or\x20value.','get','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','trim','bool','length','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','object','\x20config\x20get\x20<key>','pageSize','5hWeKUg','\x20(global)','12XylGDR','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','field'];a23_0x4c38=function(){return _0x11e698;};return a23_0x4c38();}function deleteLocalAppAlias(_0x3c98f0,_0x879292){const _0x38250a=a23_0x31ee;if(!_0x3c98f0[_0x38250a(0x179)]||typeof _0x3c98f0[_0x38250a(0x179)]!==_0x38250a(0x1a3)||Array[_0x38250a(0x184)](_0x3c98f0['apps']))return![];const _0x5a911f=_0x3c98f0[_0x38250a(0x179)],_0x47ec21=_0x5a911f[_0x879292['alias']];if(!_0x47ec21||typeof _0x47ec21!==_0x38250a(0x1a3)||Array[_0x38250a(0x184)](_0x47ec21))return![];if(!_0x879292['field'])return delete _0x5a911f[_0x879292[_0x38250a(0x17b)]],!![];if(!(_0x879292[_0x38250a(0x163)]in _0x47ec21))return![];return delete _0x47ec21[_0x879292[_0x38250a(0x163)]],Object[_0x38250a(0x16e)](_0x47ec21)[_0x38250a(0x1a1)]===0x0&&delete _0x5a911f[_0x879292[_0x38250a(0x17b)]],!![];}const listDef={'service':'config','command':a23_0x10d7dd(0x18c),'description':'List\x20current\x20config','risk':a23_0x10d7dd(0x176),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x39ab99){const _0x37b12f=a23_0x10d7dd,{buildConfigFromFlags:_0x2aca84}=await import(_0x37b12f(0x187)),_0x2ea158=_0x2aca84({}),_0x1c5c96=redactCliConfigCredentials(_0x2ea158['raw']),_0x47fe42=getProjectConfigPath(),_0x55b078=resolveWriteConfigPath(_0x37b12f(0x168));if(_0x39ab99[_0x37b12f(0x180)]===_0x37b12f(0x197))return{'ok':!![],'message':_0x37b12f(0x189)+(JSON[_0x37b12f(0x175)](_0x1c5c96,null,0x2)+'\x0a\x0a')+_0x37b12f(0x177)+('\x20\x20project:\x20'+(_0x47fe42??_0x37b12f(0x18e))+'\x0a')+(_0x37b12f(0x16d)+_0x55b078)};return{'ok':!![],'data':{'effective':_0x1c5c96,'configFiles':{'project':_0x47fe42??null,'global':_0x55b078}}};}},getDef={'service':a23_0x10d7dd(0x17f),'command':a23_0x10d7dd(0x19d),'description':a23_0x10d7dd(0x16f),'risk':a23_0x10d7dd(0x176),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x10d7dd(0x164),'description':a23_0x10d7dd(0x17c),'required':!![]}],'flags':[],async 'execute'(_0x2c74de){const _0x417d1c=a23_0x10d7dd,_0x408642=_0x2c74de[_0x417d1c(0x199)][0x0];if(!_0x408642)throw CliErrors[_0x417d1c(0x17a)](_0x417d1c(0x186),_0x417d1c(0x182)+CLI_BIN_NAME+_0x417d1c(0x1a4));const {buildConfigFromFlags:_0x617435}=await import('../../context.js'),{raw:_0x6c1e2f}=_0x617435({});if(_0x408642[_0x417d1c(0x167)]('.')){const _0xd2c7d=_0x408642['split']('.');let _0x3a0b64=_0x6c1e2f;for(const _0x4a0d41 of _0xd2c7d){if(_0x3a0b64==null||typeof _0x3a0b64!==_0x417d1c(0x1a3))throw CliErrors[_0x417d1c(0x17a)]('Key\x20not\x20found:\x20'+_0x408642);_0x3a0b64=_0x3a0b64[_0x4a0d41];}if(_0x3a0b64===undefined)throw CliErrors[_0x417d1c(0x17a)]('Key\x20not\x20found:\x20'+_0x408642);const _0x5f031d=redactCliConfigValue(_0x408642,_0x3a0b64);return console[_0x417d1c(0x183)](typeof _0x5f031d===_0x417d1c(0x1a3)?JSON[_0x417d1c(0x175)](_0x5f031d,null,0x2):String(_0x5f031d)),{'ok':!![]};}const _0x57bd6d=_0x6c1e2f[_0x408642];if(_0x57bd6d===undefined)throw CliErrors[_0x417d1c(0x17a)](_0x417d1c(0x169)+_0x408642);const _0x54dbc7=redactCliConfigValue(_0x408642,_0x57bd6d);return console[_0x417d1c(0x183)](typeof _0x54dbc7==='object'?JSON['stringify'](_0x54dbc7,null,0x2):String(_0x54dbc7)),{'ok':!![]};}},setDef={'service':a23_0x10d7dd(0x17f),'command':a23_0x10d7dd(0x171),'description':a23_0x10d7dd(0x198),'risk':a23_0x10d7dd(0x166),'confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x10d7dd(0x164),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x10d7dd(0x191),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x58abf4){const _0x28c0d2=a23_0x10d7dd,_0x1f7d19=_0x58abf4[_0x28c0d2(0x199)][0x0],_0x5e4503=_0x58abf4[_0x28c0d2(0x199)][0x1];if(!_0x1f7d19||_0x5e4503===undefined)throw CliErrors['validation'](_0x28c0d2(0x19c),_0x28c0d2(0x182)+CLI_BIN_NAME+_0x28c0d2(0x173));if(ENUM_KEYS[_0x1f7d19]&&!ENUM_KEYS[_0x1f7d19][_0x28c0d2(0x167)](_0x5e4503))throw CliErrors[_0x28c0d2(0x17a)](_0x28c0d2(0x190)+_0x1f7d19+_0x28c0d2(0x18d)+ENUM_KEYS[_0x1f7d19]['join'](',\x20'));if(isCliProtectedConfigKey(_0x1f7d19))throw CliErrors[_0x28c0d2(0x17a)]('\x22'+_0x1f7d19+_0x28c0d2(0x1a2));if(_0x1f7d19===_0x28c0d2(0x1a5)){const _0x48eb79=Number(_0x5e4503);if(isNaN(_0x48eb79)||_0x48eb79<=0x0)throw CliErrors['validation'](_0x28c0d2(0x188));}const _0x1b5dc2=resolveWriteScope({'explicitGlobal':_0x58abf4[_0x28c0d2(0x1a0)](_0x28c0d2(0x168)),'policy':_0x28c0d2(0x196)}),_0x3ebe6b=toScopeFlags(_0x1b5dc2),_0x146283=readScopedConfig(_0x3ebe6b),_0x386eb4=parseAliasAppcodeSetKey(_0x1f7d19);if(!_0x386eb4&&!isTopLevelConfigKey(_0x1f7d19))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x1f7d19+_0x28c0d2(0x178),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x28c0d2(0x172));if(_0x386eb4)setLocalAppAlias(_0x146283,_0x386eb4,_0x5e4503);else{if(_0x1f7d19===_0x28c0d2(0x16a)){const _0x43e0ca=normalizeLocale(_0x5e4503);if(!_0x43e0ca)throw CliErrors[_0x28c0d2(0x17a)](_0x28c0d2(0x18f),_0x28c0d2(0x162));_0x146283[_0x28c0d2(0x16a)]=_0x43e0ca;}else _0x146283[_0x1f7d19]=_0x1f7d19===_0x28c0d2(0x1a5)?Number(_0x5e4503):DOMAIN_CONFIG_FIELDS[_0x28c0d2(0x167)](_0x1f7d19)?normalizeDomainOrigin(_0x1f7d19,_0x5e4503):_0x5e4503;}const _0x53be80=_0x1f7d19===_0x28c0d2(0x195)?maskCliAccessKey(_0x5e4503):!_0x386eb4&&_0x1f7d19===_0x28c0d2(0x16a)?String(_0x146283[_0x28c0d2(0x16a)]):_0x5e4503;return console[_0x28c0d2(0x183)](_0x28c0d2(0x16b)+_0x1f7d19+_0x28c0d2(0x17d)+_0x53be80+'\x22'+(_0x1b5dc2===_0x28c0d2(0x168)?_0x28c0d2(0x1a7):'')),writeScopedConfig(_0x146283,_0x3ebe6b),{'ok':!![]};}},deleteDef={'service':a23_0x10d7dd(0x17f),'command':a23_0x10d7dd(0x19a),'description':a23_0x10d7dd(0x192),'risk':a23_0x10d7dd(0x166),'confirmationDescription':a23_0x10d7dd(0x19e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x56c46b){const _0x2812f5=a23_0x10d7dd,_0x1f2f6e=_0x56c46b['args'][0x0];if(!_0x1f2f6e)throw CliErrors[_0x2812f5(0x17a)](_0x2812f5(0x186),_0x2812f5(0x182)+CLI_BIN_NAME+_0x2812f5(0x194));if(isCliProtectedConfigKey(_0x1f2f6e))throw CliErrors[_0x2812f5(0x17a)]('\x22'+_0x1f2f6e+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x28b70a=resolveWriteScope({'explicitGlobal':_0x56c46b[_0x2812f5(0x1a0)](_0x2812f5(0x168)),'policy':_0x2812f5(0x196)}),_0x4940ce=toScopeFlags(_0x28b70a),_0x37ba74=readScopedConfig(_0x4940ce),_0x28cff0=parseAliasDeleteKey(_0x1f2f6e);if(_0x28cff0){if(!deleteLocalAppAlias(_0x37ba74,_0x28cff0))return console['log'](_0x2812f5(0x193)+_0x1f2f6e+(_0x28b70a==='global'?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x1f2f6e,'scope':_0x28b70a,'changed':![]}};return console['log'](_0x2812f5(0x18b)+_0x1f2f6e+'`'+(_0x28b70a===_0x2812f5(0x168)?_0x2812f5(0x1a7):'')),writeScopedConfig(_0x37ba74,_0x4940ce),{'ok':!![],'data':{'key':_0x1f2f6e,'scope':_0x28b70a,'changed':!![]}};}if(_0x37ba74[_0x1f2f6e]===undefined)return console['log']('Key\x20already\x20absent:\x20'+_0x1f2f6e+(_0x28b70a===_0x2812f5(0x168)?_0x2812f5(0x1a7):'')),{'ok':!![],'data':{'key':_0x1f2f6e,'scope':_0x28b70a,'changed':![]}};return delete _0x37ba74[_0x1f2f6e],console[_0x2812f5(0x183)]('Deleted\x20`'+_0x1f2f6e+'`'+(_0x28b70a==='global'?_0x2812f5(0x1a7):'')),writeScopedConfig(_0x37ba74,_0x4940ce),{'ok':!![],'data':{'key':_0x1f2f6e,'scope':_0x28b70a,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x1ec0c0=a24_0x2091;(function(_0x5b04fa,_0x5b36bb){const _0x251cd3=a24_0x2091,_0x10b36f=_0x5b04fa();while(!![]){try{const _0xacbdd7=-parseInt(_0x251cd3(0x11c))/0x1*(-parseInt(_0x251cd3(0x11b))/0x2)+-parseInt(_0x251cd3(0x13d))/0x3*(-parseInt(_0x251cd3(0x137))/0x4)+parseInt(_0x251cd3(0x120))/0x5+-parseInt(_0x251cd3(0x121))/0x6+-parseInt(_0x251cd3(0x125))/0x7*(parseInt(_0x251cd3(0x119))/0x8)+-parseInt(_0x251cd3(0x134))/0x9+parseInt(_0x251cd3(0x11a))/0xa;if(_0xacbdd7===_0x5b36bb)break;else _0x10b36f['push'](_0x10b36f['shift']());}catch(_0x5972b5){_0x10b36f['push'](_0x10b36f['shift']());}}}(a24_0x34b9,0x83ddc));import{select}from'@inquirer/prompts';function a24_0x2091(_0x144999,_0x3d855e){_0x144999=_0x144999-0x115;const _0x34b952=a24_0x34b9();let _0x209172=_0x34b952[_0x144999];return _0x209172;}function a24_0x34b9(){const _0x1f075b=['3542260Tjwfnp','114828hCvjUp','cancelled','Custom\x20Runtime\x20HTTPS\x20origin','domains','2374057HulHqb','official','Official\x20Lovrabet\x20region:\x20','mode','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','Custom\x20platform\x20API\x20HTTPS\x20origin','config','str','manifestDomains','write','nonInteractive','\x22\x20is\x20not\x20currently\x20available.','Select\x20Lovrabet\x20region','string','length','5688063OKcAOK','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','Region\x20\x22','200WgbVmK','enterprise-v1','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','region','routing','validation','30381dTmXsS','Custom\x20User\x20HTTPS\x20origin','init','assign','runtime-domain','keys','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','user-domain','ExitPromptError','8siidel','2142680yrcnbb','202700uNxKBU','1dwYzuB','Custom\x20SkillHub\x20HTTPS\x20origin','join','skill-domain'];a24_0x34b9=function(){return _0x1f075b;};return a24_0x34b9();}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':'domain-config','type':'string','description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a24_0x1ec0c0(0x117),'type':a24_0x1ec0c0(0x132),'description':a24_0x1ec0c0(0x13e)},{'name':'api-domain','type':a24_0x1ec0c0(0x132),'description':a24_0x1ec0c0(0x12a)},{'name':a24_0x1ec0c0(0x141),'type':a24_0x1ec0c0(0x132),'description':a24_0x1ec0c0(0x123)},{'name':a24_0x1ec0c0(0x11f),'type':a24_0x1ec0c0(0x132),'description':a24_0x1ec0c0(0x11d)}];export const configInitFlags=[{'name':'region','type':a24_0x1ec0c0(0x132),'description':a24_0x1ec0c0(0x127)+ENABLED_LOVRABET_REGION_VALUES[a24_0x1ec0c0(0x11e)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x561a03){const _0x446994=a24_0x1ec0c0,_0x57745b=_0x561a03[_0x446994(0x12c)]('region');if(_0x57745b){if(!isEnabledLovrabetRegion(_0x57745b))throw CliErrors[_0x446994(0x13c)](_0x446994(0x136)+_0x57745b+_0x446994(0x130),'Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x446994(0x11e)](',\x20'));return _0x57745b;}if(_0x561a03[_0x446994(0x12f)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x446994(0x131),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x4737e9=>({'name':OFFICIAL_ROUTING_PROFILES[_0x4737e9]['label']+'\x20('+_0x4737e9+')','value':_0x4737e9}))});}catch(_0x1452b0){if(_0x1452b0?.['name']===_0x446994(0x118))throw CliErrors[_0x446994(0x122)]();throw _0x1452b0;}}export async function executeConfigInit(_0x488d6f){const _0xe0ae30=a24_0x1ec0c0,_0x3d8987=resolveDomainConfigInput(_0x488d6f),_0x1de49e=_0x3d8987[_0xe0ae30(0x124)],_0x20fa91=Object[_0xe0ae30(0x115)](_0x1de49e)[_0xe0ae30(0x133)]>0x0;if(_0x20fa91&&_0x488d6f[_0xe0ae30(0x12c)]('region'))throw CliErrors[_0xe0ae30(0x13c)](_0xe0ae30(0x135));const _0x85ee5e={'global':!![]},_0x4c16f3=readScopedConfig(_0x85ee5e);for(const _0x2aa40a of DOMAIN_CONFIG_FIELDS)delete _0x4c16f3[_0x2aa40a];for(const _0x332a83 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x4c16f3[_0x332a83];delete _0x4c16f3['routing'];let _0x51f138=null;if(_0x20fa91)delete _0x4c16f3[_0xe0ae30(0x13a)],_0x3d8987['mode']===_0xe0ae30(0x138)?_0x4c16f3[_0xe0ae30(0x13b)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x3d8987[_0xe0ae30(0x12d)]}:Object[_0xe0ae30(0x140)](_0x4c16f3,_0x1de49e);else{_0x51f138=await resolveRegion(_0x488d6f);if(_0x51f138===DEFAULT_LOVRABET_REGION)delete _0x4c16f3[_0xe0ae30(0x13a)];else _0x4c16f3[_0xe0ae30(0x13a)]=_0x51f138;}return writeScopedConfig(_0x4c16f3,_0x85ee5e),{'ok':!![],'message':_0x20fa91?_0xe0ae30(0x116)+Object['keys'](_0x3d8987['mode']==='enterprise-v1'?_0x3d8987[_0xe0ae30(0x12d)]:_0x1de49e)[_0xe0ae30(0x11e)](',\x20')+'.':_0xe0ae30(0x129)+_0x51f138+'.','data':{'mode':_0x20fa91?'independent':_0xe0ae30(0x126),'protocol':_0x3d8987[_0xe0ae30(0x128)]===_0xe0ae30(0x138)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x51f138,'domains':_0x1de49e}};}export const configInitDefinition={'service':a24_0x1ec0c0(0x12b),'command':a24_0x1ec0c0(0x13f),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a24_0x1ec0c0(0x12e),'confirmationDescription':a24_0x1ec0c0(0x139),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57b7b9,_0x313f00){var _0x2436b7=a25_0x3107,_0x3e958f=_0x57b7b9();while(!![]){try{var _0x2878b3=-parseInt(_0x2436b7(0x1a2))/0x1+-parseInt(_0x2436b7(0x19c))/0x2*(-parseInt(_0x2436b7(0x19f))/0x3)+parseInt(_0x2436b7(0x19e))/0x4+-parseInt(_0x2436b7(0x19d))/0x5*(-parseInt(_0x2436b7(0x1a4))/0x6)+parseInt(_0x2436b7(0x1a0))/0x7+-parseInt(_0x2436b7(0x1a3))/0x8*(-parseInt(_0x2436b7(0x1a1))/0x9)+-parseInt(_0x2436b7(0x1a5))/0xa;if(_0x2878b3===_0x313f00)break;else _0x3e958f['push'](_0x3e958f['shift']());}catch(_0x38cbf0){_0x3e958f['push'](_0x3e958f['shift']());}}}(a25_0x3324,0x98510));import{CLI_BIN_NAME}from'../../constant/cli.js';function a25_0x3107(_0x3aa697,_0x425056){_0x3aa697=_0x3aa697-0x19c;var _0x3324ac=a25_0x3324();var _0x31070a=_0x3324ac[_0x3aa697];return _0x31070a;}export{CLI_BIN_NAME};function a25_0x3324(){var _0x20b58a=['24460560nEjlAg','10UQqHFy','26440FzCPIE','4249912EMBxgF','77409qAtXkW','5906376dCARjR','18KSDATT','162411wbLuyN','2123224SbEwZv','756rasUYu'];a25_0x3324=function(){return _0x20b58a;};return a25_0x3324();}export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a25_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};}
|
|
1
|
+
function a26_0x532f(){const _0x3f797a=['\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}','/api/{appCode}/','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\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\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','Filter\x20dataset\x20records\x20with\x20query\x20conditions','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','aggregate','params','description','batchCreate','now','\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}}','1332778npkRam','23113737jtWblp','high-risk-write','\x20\x20AGGREGATE\x20TYPES','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\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}','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20PARAMS\x20STRUCTURE','\x20\x20PAGINATION','3672306kuHaSP','build','helpExtra','\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\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','\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\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','7006578vwMABi','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','getOne','Create\x20one\x20record\x20in\x20the\x20dataset','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','data','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','5OsqXxa','\x20\x20WHERE\x20OPERATORS','length','operation','\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}}','962626ZujzFq','read','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','filter','\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\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\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}','command','\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','delete','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20completed\x20in\x20','join','batch','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20\x20\x20$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]}}','update','POST','body','8tzIztC','959767GMPVLD','str','data\x20','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\x20\x20EXAMPLES','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','code','3878340WPGgHR','\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}}','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\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}}','confirmationDescription','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','risk','\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}','write','\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}]','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\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}}','create','paramsRequired','paramsHint'];a26_0x532f=function(){return _0x3f797a;};return a26_0x532f();}const a26_0x9fd606=a26_0xfc73;(function(_0x287074,_0x4232ec){const _0x439225=a26_0xfc73,_0x284413=_0x287074();while(!![]){try{const _0x3e8286=-parseInt(_0x439225(0x9a))/0x1+parseInt(_0x439225(0xc3))/0x2+-parseInt(_0x439225(0x6e))/0x3+parseInt(_0x439225(0xa3))/0x4+-parseInt(_0x439225(0x80))/0x5*(parseInt(_0x439225(0x76))/0x6)+-parseInt(_0x439225(0x85))/0x7+-parseInt(_0x439225(0x99))/0x8*(-parseInt(_0x439225(0xc4))/0x9);if(_0x3e8286===_0x4232ec)break;else _0x284413['push'](_0x284413['shift']());}catch(_0x5a80db){_0x284413['push'](_0x284413['shift']());}}}(a26_0x532f,0xae909));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a26_0xfc73(_0x57315c,_0x235f89){_0x57315c=_0x57315c-0x6a;const _0x532f31=a26_0x532f();let _0xfc73aa=_0x532f31[_0x57315c];return _0xfc73aa;}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':a26_0x9fd606(0x88),'operation':a26_0x9fd606(0x88),'risk':'read','paramsRequired':![],'description':a26_0x9fd606(0xbb),'paramsHint':a26_0x9fd606(0x7a)+a26_0x9fd606(0x87),'helpExtra':[a26_0x9fd606(0x81),a26_0x9fd606(0x84),a26_0x9fd606(0x7e),a26_0x9fd606(0xa7),a26_0x9fd606(0x89),a26_0x9fd606(0xaa),a26_0x9fd606(0x94),a26_0x9fd606(0x95),a26_0x9fd606(0xa4),a26_0x9fd606(0xc2),'\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}}','',a26_0x9fd606(0xc8),'\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}}]}',a26_0x9fd606(0xb7),'',a26_0x9fd606(0xa5),a26_0x9fd606(0x75),a26_0x9fd606(0xcc),a26_0x9fd606(0xb8),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a26_0x9fd606(0x6d),a26_0x9fd606(0xba),'\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.',a26_0x9fd606(0x9f),a26_0x9fd606(0x7f),a26_0x9fd606(0x74),'\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',a26_0x9fd606(0xca)]['join']('\x0a')},{'command':a26_0x9fd606(0x78),'operation':a26_0x9fd606(0x78),'risk':a26_0x9fd606(0x86),'paramsRequired':!![],'description':a26_0x9fd606(0xc7),'paramsHint':a26_0x9fd606(0xcb)},{'command':a26_0x9fd606(0xb2),'operation':a26_0x9fd606(0xb2),'risk':'write','paramsRequired':!![],'description':a26_0x9fd606(0x79),'confirmationDescription':a26_0x9fd606(0x77),'paramsHint':a26_0x9fd606(0xab)},{'command':a26_0x9fd606(0xc0),'operation':a26_0x9fd606(0xc0),'risk':a26_0x9fd606(0xae),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','confirmationDescription':a26_0x9fd606(0xa1),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a26_0x9fd606(0x96),'operation':a26_0x9fd606(0x96),'risk':a26_0x9fd606(0xae),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20data\x20record','confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a26_0x9fd606(0xbc)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':'delete','operation':a26_0x9fd606(0x8e),'risk':a26_0x9fd606(0xc5),'paramsRequired':!![],'description':a26_0x9fd606(0x7b),'confirmationDescription':a26_0x9fd606(0x73),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a26_0x9fd606(0xbd),'operation':a26_0x9fd606(0xbd),'risk':a26_0x9fd606(0x86),'paramsRequired':![],'description':a26_0x9fd606(0x6b),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a26_0x9fd606(0xb0),'helpExtra':[a26_0x9fd606(0xc6),a26_0x9fd606(0x8b),a26_0x9fd606(0xa9),a26_0x9fd606(0xb5),a26_0x9fd606(0x6a),'\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}',a26_0x9fd606(0xad),a26_0x9fd606(0x8a),'',a26_0x9fd606(0x6c),'\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]',a26_0x9fd606(0x9d),a26_0x9fd606(0xc9),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a26_0x9fd606(0xb1),a26_0x9fd606(0xaf),'',a26_0x9fd606(0xb9),a26_0x9fd606(0x9e),a26_0x9fd606(0x93),a26_0x9fd606(0x72),'','\x20\x20DATASET\x20BOUNDARY','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only',a26_0x9fd606(0x8f),a26_0x9fd606(0xa6),'\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','',a26_0x9fd606(0xa0),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a26_0x9fd606(0x71),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a26_0x9fd606(0x8d),'',a26_0x9fd606(0x7d)][a26_0x9fd606(0x91)]('\x0a')}];function makeDataCommand(_0x3053e8){const _0x1987da=a26_0x9fd606,_0x363dae=_0x1987da(0x9c)+_0x3053e8['command'],_0x32ff33={'service':_0x1987da(0x7c),'command':_0x3053e8[_0x1987da(0x8c)],'description':_0x3053e8[_0x1987da(0xbf)],'risk':_0x3053e8[_0x1987da(0xac)],..._0x3053e8[_0x1987da(0xa8)]?{'confirmationDescription':_0x3053e8[_0x1987da(0xa8)]}:{},'helpExtra':_0x3053e8[_0x1987da(0x70)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x3053e8[_0x1987da(0xb4)]}],'validate':async _0x27d435=>{const _0x4a9617=_0x1987da;_0x3053e8[_0x4a9617(0xb3)]&&requireAnyOf(_0x27d435,[_0x4a9617(0xbe)],_0x363dae),_0x3053e8[_0x4a9617(0x83)]===_0x4a9617(0xc0)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x27d435[_0x4a9617(0x9b)](_0x4a9617(0xbe)))),_0x3053e8[_0x4a9617(0x83)]===_0x4a9617(0x96)&&parseUpdateIdsFromParams(parseJsonParams(_0x27d435['str'](_0x4a9617(0xbe)))??{});},async 'execute'(_0x3281f3){const _0x5027e7=_0x1987da,_0x5a01eb=_0x3281f3[_0x5027e7(0x9b)](_0x5027e7(0xa2)),_0x1be95b=_0x3053e8[_0x5027e7(0x83)]===_0x5027e7(0xc0)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3281f3[_0x5027e7(0x9b)](_0x5027e7(0xbe)))):parseJsonParams(_0x3281f3['str']('params'))??{},_0x6f6922=_0x3053e8[_0x5027e7(0x83)]==='update'?parseUpdateIdsFromParams(_0x1be95b):undefined,_0x44cc03=_0x6f6922?normalizeUpdateParamsForRuntime(_0x1be95b,_0x6f6922):_0x1be95b,_0x498b88=Date['now'](),_0x1cdb45=await executeData(_0x5a01eb,_0x3053e8[_0x5027e7(0x83)],_0x44cc03),_0x1d5c11=Date[_0x5027e7(0xc1)]()-_0x498b88,_0x5a18b2=_0x6f6922&&_0x6f6922[_0x5027e7(0x82)]>0x1?buildBatchUpdateResult(_0x6f6922,_0x1cdb45):_0x1cdb45;return{'ok':!![],'data':{'result':_0x5a18b2,'elapsed':_0x1d5c11},'message':_0x5027e7(0x9c)+_0x3053e8[_0x5027e7(0x8c)]+_0x5027e7(0x90)+_0x1d5c11+'ms'};}};return _0x3053e8[_0x1987da(0xac)]!=='read'&&(_0x32ff33['dryRun']=async _0x35f746=>{const _0x479791=_0x1987da,_0x16e596=_0x35f746[_0x479791(0x9b)](_0x479791(0xa2)),_0x588c69=_0x3053e8[_0x479791(0x83)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x35f746['str'](_0x479791(0xbe)))):parseJsonParams(_0x35f746[_0x479791(0x9b)](_0x479791(0xbe)))??{};let _0x3b1935=_0x588c69;if(_0x3053e8[_0x479791(0x83)]===_0x479791(0x96)){const _0x586b52=parseUpdateIdsFromParams(_0x588c69);_0x3b1935=normalizeUpdateParamsForRuntime(_0x588c69,_0x586b52);}return dryRun(_0x479791(0x97),_0x479791(0xb6)+_0x16e596+'/'+_0x3053e8[_0x479791(0x83)])[_0x479791(0x98)](_0x3b1935)[_0x479791(0xbf)]('Preview:\x20data\x20'+_0x3053e8['command']+'\x20on\x20dataset\x20'+_0x16e596)[_0x479791(0x6f)]();}),_0x32ff33;}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0x4cfe02,_0x445030){const _0x3632be=a26_0x9fd606;return{'operation':'update','mode':_0x3632be(0x92),'ids':_0x4cfe02,'total':_0x4cfe02[_0x3632be(0x82)],'result':_0x445030};}
|