@lovrabet/lovrabet-cli 2.3.1-beta.3 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +3 -3
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.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 +0 -16
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.d.ts +2 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +2 -2
- package/skills/lovrabet/references/lovrabet-config-commands.md +3 -1
- package/skills/lovrabet/references/lovrabet-config.md +2 -2
- package/skills/lovrabet/references/lovrabet-doctor.md +2 -0
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +3 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x35db22=a12_0x365a;function a12_0x365a(_0x3f6df2,_0x3bd52e){_0x3f6df2=_0x3f6df2-0x100;const _0x37a4e3=a12_0x37a4();let _0x365aff=_0x37a4e3[_0x3f6df2];return _0x365aff;}(function(_0x2b41b2,_0x56cb16){const _0x5a2037=a12_0x365a,_0x4adb1d=_0x2b41b2();while(!![]){try{const _0x28ed34=-parseInt(_0x5a2037(0x122))/0x1+parseInt(_0x5a2037(0x12f))/0x2*(-parseInt(_0x5a2037(0x102))/0x3)+parseInt(_0x5a2037(0x108))/0x4*(-parseInt(_0x5a2037(0x13c))/0x5)+-parseInt(_0x5a2037(0x114))/0x6+parseInt(_0x5a2037(0x12a))/0x7+-parseInt(_0x5a2037(0x104))/0x8+parseInt(_0x5a2037(0x100))/0x9;if(_0x28ed34===_0x56cb16)break;else _0x4adb1d['push'](_0x4adb1d['shift']());}catch(_0x43440a){_0x4adb1d['push'](_0x4adb1d['shift']());}}}(a12_0x37a4,0x71274));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(_0x48e3eb=USER_ACCESS_KEY_CREATE_URL){const _0x38d9c5=a12_0x365a;writeCliSideChannelLine(_0x38d9c5(0x124)+PRODUCT_CONFIG[_0x38d9c5(0x10f)]+':'),writeCliSideChannelLine('\x0a'+_0x48e3eb+'\x0a'),writeCliSideChannelLine(_0x38d9c5(0x13e)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(_0x3a5aab=USER_ACCESS_KEY_CREATE_URL){const _0x463ac2=a12_0x365a;return[_0x463ac2(0x124)+PRODUCT_CONFIG['userCenterDisplayName']+':',_0x3a5aab,_0x463ac2(0x145)+CLI_BIN_NAME+_0x463ac2(0x133)]['join']('\x0a');}function canPromptForAccessKey(_0x206f76){const _0x313d77=a12_0x365a;return!_0x206f76[_0x313d77(0x14d)]&&process[_0x313d77(0x113)][_0x313d77(0x14f)]!==![]&&process['stdout'][_0x313d77(0x14f)]!==![];}function resolveAuthScopeFlags(_0x84f20a){const _0x17ddfe=a12_0x365a;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x84f20a['bool'](_0x17ddfe(0x11a)),'explicitProject':_0x84f20a[_0x17ddfe(0x12d)](_0x17ddfe(0x12e)),'policy':_0x17ddfe(0x152)}));}function a12_0x37a4(){const _0x2a65b6=['cancelled','Tip:\x20you\x20can\x20also\x20run:','scope','\x20(via\x20','accessKeyCreatePath','AccessKey:\x20','Read\x20from\x20global\x20config\x20(default)','AccessKey\x20cleared\x20from\x20','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20config.','global\x20config','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','login','AccessKey\x20(ak_xxx...)','nonInteractive','\x20\x20export\x20','isTTY','status','\x20auth\x20status','global-default','\x20doctor','Option\x20C:\x20environment\x20variable','check','\x20config.\x20Nothing\x20to\x20clear.','auth','Option\x20A:\x20','19258425aVZBya','daily','6uLhanK','authRequired','3396576HLEINk','Clear\x20the\x20AccessKey\x20from\x20config','accessKey','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.','273916LecszB','Clear\x20from\x20global\x20config\x20(default)','AccessKey\x20saved\x20to\x20','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','access_key','=ak_xxx','access-key','userCenterDisplayName','str','ACCESS_KEY','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','stdin','3049542tXmYIj','production','write','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','test','global','read','\x20env\x20var','expired','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Invalid\x20accessKey\x20format.','yes','trim','627887SOSKjg','Use\x20`','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','env','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','newConfigFileName','Auth\x20mode:\x20','boolean','1730652ykVztM','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','ClientAk','bool','project','20474aSOmrK','\x20Current\x20env:\x20','Status:\x20valid','push','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','envName','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20Verify:\x20','join','validation','Missing\x20accessKey.','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','`auth\x20login`\x20does\x20not\x20support\x20--yes.','25NNXiaI'];a12_0x37a4=function(){return _0x2a65b6;};return a12_0x37a4();}async function resolveAuthWriteInput(_0x204950){const _0x387575=a12_0x365a;let _0x1b1c5d=(_0x204950[_0x387575(0x110)](_0x387575(0x10e))||_0x204950[_0x387575(0x110)]('ak')||'')['trim']();const _0x288d5c=(_0x204950[_0x387575(0x110)](_0x387575(0x125))||'')['trim'](),_0x18ffe7=''+getUserDomain()+PRODUCT_CONFIG[_0x387575(0x141)];if(!_0x1b1c5d&&canPromptForAccessKey(_0x204950))try{showAccessKeyCreateHint(_0x18ffe7),_0x1b1c5d=await promptAccessKey('');}catch(_0x5d154d){if(isAbortPrompt(_0x5d154d))throw CliErrors[_0x387575(0x13d)]();throw _0x5d154d;}if(!_0x1b1c5d)throw CliErrors[_0x387575(0x138)](_0x387575(0x139),buildAccessKeySetupGuide(_0x18ffe7));if(!ACCESS_KEY_PATTERN[_0x387575(0x119)](_0x1b1c5d))throw CliErrors[_0x387575(0x138)](_0x387575(0x11f),_0x387575(0x118));if(!_0x288d5c)return{'accessKey':_0x1b1c5d};const _0x47047f=normalizeEnv(_0x288d5c);return{'accessKey':_0x1b1c5d,'env':isDaily(_0x47047f)?_0x387575(0x101):isDev(_0x47047f)?'development':_0x387575(0x115)};}export const authDefinitions=[{'service':a12_0x35db22(0x157),'command':a12_0x35db22(0x14b),'description':a12_0x35db22(0x149),'risk':a12_0x35db22(0x116),'confirmationDescription':a12_0x35db22(0x107),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x35db22(0x10e),'type':'string','description':a12_0x35db22(0x14c)},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x35db22(0x11a),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a12_0x35db22(0x13a),'default':![]}],async 'execute'(_0x260c15){const _0x405730=a12_0x35db22;if(_0x260c15['bool'](_0x405730(0x120)))throw CliErrors[_0x405730(0x138)](_0x405730(0x13b),_0x405730(0x123)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x405730(0x117));const _0x3d5f6b=(_0x260c15[_0x405730(0x110)]('access-key')||_0x260c15[_0x405730(0x110)]('ak')||'')[_0x405730(0x121)]();if(!_0x3d5f6b&&_0x260c15[_0x405730(0x14d)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x405730(0x141)])};const _0x154d42=await resolveAuthWriteInput(_0x260c15),_0x3f915a=resolveAuthScopeFlags(_0x260c15),_0x534dbf=readScopedConfig(_0x3f915a);_0x534dbf[_0x405730(0x106)]=_0x154d42[_0x405730(0x106)];_0x154d42[_0x405730(0x125)]&&(_0x534dbf[_0x405730(0x125)]=_0x154d42[_0x405730(0x125)]);writeScopedConfig(_0x534dbf,_0x3f915a);const _0x322588=_0x3f915a[_0x405730(0x11a)]?_0x405730(0x11a):_0x405730(0x12e),_0x151688=_0x534dbf[_0x405730(0x125)]?_0x405730(0x130)+_0x534dbf[_0x405730(0x125)]+'.':'';return{'ok':!![],'message':_0x405730(0x10a)+_0x322588+_0x405730(0x146)+_0x151688+_0x405730(0x136)+CLI_BIN_NAME+_0x405730(0x151)};}},{'service':a12_0x35db22(0x157),'command':'logout','description':a12_0x35db22(0x105),'risk':a12_0x35db22(0x116),'confirmationDescription':a12_0x35db22(0x12b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x35db22(0x11a),'type':a12_0x35db22(0x129),'description':a12_0x35db22(0x109),'default':!![]},{'name':a12_0x35db22(0x12e),'type':a12_0x35db22(0x129),'description':a12_0x35db22(0x11e),'default':![]}],async 'execute'(_0xcdf24f){const _0x1f97e6=a12_0x35db22,_0x3fb9f1=resolveAuthScopeFlags(_0xcdf24f),_0x4280c0=readScopedConfig(_0x3fb9f1),_0xaebcfa=!!_0x4280c0[_0x1f97e6(0x106)];delete _0x4280c0[_0x1f97e6(0x106)],writeScopedConfig(_0x4280c0,_0x3fb9f1);const _0xfc5cb7=_0x3fb9f1[_0x1f97e6(0x11a)]?_0x1f97e6(0x11a):_0x1f97e6(0x12e);if(_0xaebcfa)return{'ok':!![],'message':_0x1f97e6(0x144)+_0xfc5cb7+_0x1f97e6(0x146)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0xfc5cb7+_0x1f97e6(0x156)};}},{'service':'auth','command':a12_0x35db22(0x150),'description':'Show\x20current\x20authentication\x20status','risk':a12_0x35db22(0x11b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x35db22(0x11a),'type':a12_0x35db22(0x129),'description':a12_0x35db22(0x143),'default':!![]},{'name':a12_0x35db22(0x12e),'type':'boolean','description':a12_0x35db22(0x135),'default':![]},{'name':a12_0x35db22(0x155),'type':a12_0x35db22(0x129),'description':a12_0x35db22(0x10b),'default':![]}],async 'execute'(_0x31721f){const _0x3aa0b9=a12_0x35db22,_0x5c756f=resolveAuthScopeFlags(_0x31721f),_0x4901df=readScopedConfig(_0x5c756f),_0x449b04=productEnvName(_0x3aa0b9(0x111)),_0x2850e1=productEnv('ACCESS_KEY')||undefined,_0x30adb2=_0x4901df[_0x3aa0b9(0x106)]||undefined,_0x5342f0=_0x2850e1||_0x30adb2,_0x498384=_0x2850e1?_0x449b04+_0x3aa0b9(0x11c):_0x30adb2?(_0x5c756f[_0x3aa0b9(0x11a)]?'global':'project')+'\x20config':null,_0x3fcc8e=[_0x3aa0b9(0x128)+AUTH_MODE[_0x3aa0b9(0x12c)]];if(_0x5342f0){const _0x50c4dc=maskCliAccessKey(_0x5342f0);_0x3fcc8e[_0x3aa0b9(0x132)](_0x3aa0b9(0x142)+_0x50c4dc+(_0x498384?_0x3aa0b9(0x140)+_0x498384+')':'')),_0x3fcc8e['push'](_0x3aa0b9(0x131));}if(!_0x5342f0){_0x3fcc8e[_0x3aa0b9(0x132)](''),_0x3fcc8e['push']('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x3fcc8e['push'](''),_0x3fcc8e[_0x3aa0b9(0x132)](_0x3aa0b9(0x158)+CLI_BIN_NAME+_0x3aa0b9(0x112)),_0x3fcc8e[_0x3aa0b9(0x132)](''),_0x3fcc8e[_0x3aa0b9(0x132)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x3aa0b9(0x127)]+')'),_0x3fcc8e[_0x3aa0b9(0x132)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x3fcc8e[_0x3aa0b9(0x132)](''),_0x3fcc8e[_0x3aa0b9(0x132)](_0x3aa0b9(0x154)),_0x3fcc8e[_0x3aa0b9(0x132)](_0x3aa0b9(0x14e)+_0x449b04+_0x3aa0b9(0x10d)),_0x3fcc8e[_0x3aa0b9(0x132)](''),_0x3fcc8e[_0x3aa0b9(0x132)]('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x3aa0b9(0x151)),_0x3fcc8e[_0x3aa0b9(0x132)](_0x3aa0b9(0x148)+CLI_BIN_NAME+_0x3aa0b9(0x153));if(_0x31721f['bool'](_0x3aa0b9(0x155))){const _0x17926f=readStoredDeviceCode();if(_0x17926f&&!isStoredDeviceCodeExpired(_0x17926f)){const _0x5178a9=getUserDomain(),_0x564526=await fetchDeviceToken(_0x5178a9,_0x17926f['code']);if(_0x564526[_0x3aa0b9(0x150)]==='success'&&_0x564526[_0x3aa0b9(0x10c)]){const _0x2af219={'global':_0x17926f[_0x3aa0b9(0x13f)]===_0x3aa0b9(0x11a)},_0x5a30b7=readScopedConfig(_0x2af219);_0x5a30b7[_0x3aa0b9(0x106)]=_0x564526[_0x3aa0b9(0x10c)],writeScopedConfig(_0x5a30b7,_0x2af219),deleteStoredDeviceCode();const _0x117511=_0x564526[_0x3aa0b9(0x10c)],_0x47866a=maskCliAccessKey(_0x117511),_0x10f2aa=_0x17926f[_0x3aa0b9(0x13f)]===_0x3aa0b9(0x11a)?_0x3aa0b9(0x147):'project\x20config';return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE[_0x3aa0b9(0x12c)],_0x3aa0b9(0x142)+_0x47866a+'\x20(via\x20'+_0x10f2aa+')',_0x3aa0b9(0x131)]['join']('\x0a')};}_0x564526['status']===_0x3aa0b9(0x11d)&&deleteStoredDeviceCode();throw CliErrors[_0x3aa0b9(0x103)](_0x3aa0b9(0x14a));}throw CliErrors[_0x3aa0b9(0x103)](_0x3fcc8e[_0x3aa0b9(0x137)]('\x0a'));}}return{'ok':!![],'message':_0x3fcc8e['join']('\x0a')};}},{'service':'auth','command':'info','description':a12_0x35db22(0x126),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3e62a6){const _0x1a60bb=a12_0x35db22,_0x4b0f7d=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x4b0f7d,'meta':{'env':_0x3e62a6[_0x1a60bb(0x134)]??_0x1a60bb(0x115)}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x15a533=a12_0x4d93;(function(_0x1ffe8f,_0x3ced69){const _0x229edc=a12_0x4d93,_0x1cffce=_0x1ffe8f();while(!![]){try{const _0x51c713=parseInt(_0x229edc(0x141))/0x1*(parseInt(_0x229edc(0x15a))/0x2)+-parseInt(_0x229edc(0x10a))/0x3*(-parseInt(_0x229edc(0x13b))/0x4)+-parseInt(_0x229edc(0x15c))/0x5+parseInt(_0x229edc(0x124))/0x6+-parseInt(_0x229edc(0x140))/0x7*(parseInt(_0x229edc(0x10b))/0x8)+parseInt(_0x229edc(0x11a))/0x9+-parseInt(_0x229edc(0x149))/0xa;if(_0x51c713===_0x3ced69)break;else _0x1cffce['push'](_0x1cffce['shift']());}catch(_0x1db35b){_0x1cffce['push'](_0x1cffce['shift']());}}}(a12_0x117c,0x2e20a));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a12_0x4d93(_0x3c0211,_0x5529fa){_0x3c0211=_0x3c0211-0x106;const _0x117c81=a12_0x117c();let _0x4d9359=_0x117c81[_0x3c0211];return _0x4d9359;}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function a12_0x117c(){const _0xcdffa5=['39JKBfJz','read','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','check','\x20Current\x20env:\x20','Status:\x20valid','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','1712750NDKnWv','str','info','global-default','Invalid\x20accessKey\x20format.','push','\x20\x20export\x20','Clear\x20the\x20AccessKey\x20from\x20config','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','Use\x20`','userCenterDisplayName','boolean','expired','Shorthand\x20for\x20--access-key','Show\x20current\x20authentication\x20status','Tip:\x20you\x20can\x20also\x20run:','14854HPYuIR','string','907930MTtHCh','\x20auth\x20login\x20--access-key\x20<ak_xxx>','production','yes','Option\x20A:\x20','code','\x20env\x20var','20343CkOpVk','384vKjXcc','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','scope','validation','ClientAk','auth','project','envName','status','Then\x20verify\x20with:\x20','isTTY','=ak_xxx','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','test','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','2287134fgYarE','bool','access-key','Clear\x20from\x20global\x20config\x20(default)','Read\x20from\x20global\x20config\x20(default)','\x20config.\x20Nothing\x20to\x20clear.','Auth\x20mode:\x20','accessKey','env','\x20auth\x20status','78270AHFybd','No\x20AccessKey\x20found\x20in\x20','accessKeyCreatePath','write','\x20config.','\x20Verify:\x20','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20config','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Missing\x20accessKey.','global','AccessKey\x20saved\x20to\x20','access_key','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','logout','\x20(via\x20','stdout','nonInteractive','newConfigFileName','authRequired','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','join','44MXvWQy','development','AccessKey:\x20','project\x20config','trim','13069MiMCJz'];a12_0x117c=function(){return _0xcdffa5;};return a12_0x117c();}function showAccessKeyCreateHint(_0x58f20f=USER_ACCESS_KEY_CREATE_URL){const _0x13b289=a12_0x4d93;writeCliSideChannelLine(_0x13b289(0x117)+PRODUCT_CONFIG[_0x13b289(0x154)]+':'),writeCliSideChannelLine('\x0a'+_0x58f20f+'\x0a'),writeCliSideChannelLine(_0x13b289(0x159)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x13b289(0x15d));}function buildAccessKeySetupGuide(_0x399e99=USER_ACCESS_KEY_CREATE_URL){const _0x2fba6f=a12_0x4d93;return[_0x2fba6f(0x117)+PRODUCT_CONFIG[_0x2fba6f(0x154)]+':',_0x399e99,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x2fba6f(0x147)][_0x2fba6f(0x13a)]('\x0a');}function canPromptForAccessKey(_0x8de12c){const _0x1e3f81=a12_0x4d93;return!_0x8de12c[_0x1e3f81(0x135)]&&process['stdin'][_0x1e3f81(0x115)]!==![]&&process[_0x1e3f81(0x134)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x3ad631){const _0x5ace6d=a12_0x4d93;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3ad631['bool'](_0x5ace6d(0x12e)),'explicitProject':_0x3ad631[_0x5ace6d(0x11b)](_0x5ace6d(0x111)),'policy':_0x5ace6d(0x14c)}));}async function resolveAuthWriteInput(_0x253875){const _0x3e1a5d=a12_0x4d93;let _0x14ba5c=(_0x253875[_0x3e1a5d(0x14a)](_0x3e1a5d(0x11c))||_0x253875[_0x3e1a5d(0x14a)]('ak')||'')['trim']();const _0x132f8f=(_0x253875[_0x3e1a5d(0x14a)](_0x3e1a5d(0x122))||'')[_0x3e1a5d(0x13f)](),_0x3fdf68=''+getUserDomain()+PRODUCT_CONFIG[_0x3e1a5d(0x126)];if(!_0x14ba5c&&canPromptForAccessKey(_0x253875))try{showAccessKeyCreateHint(_0x3fdf68),_0x14ba5c=await promptAccessKey('');}catch(_0x4f2882){if(isAbortPrompt(_0x4f2882))throw CliErrors['cancelled']();throw _0x4f2882;}if(!_0x14ba5c)throw CliErrors[_0x3e1a5d(0x10e)](_0x3e1a5d(0x12d),buildAccessKeySetupGuide(_0x3fdf68));if(!ACCESS_KEY_PATTERN[_0x3e1a5d(0x118)](_0x14ba5c))throw CliErrors[_0x3e1a5d(0x10e)](_0x3e1a5d(0x14d),_0x3e1a5d(0x119));if(!_0x132f8f)return{'accessKey':_0x14ba5c};const _0x557ae7=normalizeEnv(_0x132f8f);return{'accessKey':_0x14ba5c,'env':isDaily(_0x557ae7)?'daily':isDev(_0x557ae7)?_0x3e1a5d(0x13c):'production'};}export const authDefinitions=[{'service':'auth','command':'login','description':a12_0x15a533(0x10c),'risk':a12_0x15a533(0x127),'confirmationDescription':a12_0x15a533(0x152),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x15a533(0x11c),'type':a12_0x15a533(0x15b),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x15a533(0x15b),'description':a12_0x15a533(0x157)},{'name':a12_0x15a533(0x12e),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x15a533(0x155),'description':a12_0x15a533(0x138),'default':![]}],async 'execute'(_0x24bff4){const _0x38f819=a12_0x15a533;if(_0x24bff4[_0x38f819(0x11b)](_0x38f819(0x106)))throw CliErrors[_0x38f819(0x10e)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x38f819(0x153)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x38f819(0x148));const _0x220c87=(_0x24bff4[_0x38f819(0x14a)](_0x38f819(0x11c))||_0x24bff4[_0x38f819(0x14a)]('ak')||'')['trim']();if(!_0x220c87&&_0x24bff4[_0x38f819(0x135)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x38f819(0x126)])};const _0x538f27=await resolveAuthWriteInput(_0x24bff4),_0x11566d=resolveAuthScopeFlags(_0x24bff4),_0x12c55f=readScopedConfig(_0x11566d);_0x12c55f['accessKey']=_0x538f27[_0x38f819(0x121)];_0x538f27[_0x38f819(0x122)]&&(_0x12c55f['env']=_0x538f27[_0x38f819(0x122)]);writeScopedConfig(_0x12c55f,_0x11566d);const _0x3de6b1=_0x11566d[_0x38f819(0x12e)]?_0x38f819(0x12e):_0x38f819(0x111),_0x509599=_0x12c55f[_0x38f819(0x122)]?_0x38f819(0x145)+_0x12c55f[_0x38f819(0x122)]+'.':'';return{'ok':!![],'message':_0x38f819(0x12f)+_0x3de6b1+_0x38f819(0x128)+_0x509599+_0x38f819(0x129)+CLI_BIN_NAME+_0x38f819(0x123)};}},{'service':a12_0x15a533(0x110),'command':a12_0x15a533(0x132),'description':a12_0x15a533(0x150),'risk':a12_0x15a533(0x127),'confirmationDescription':'Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x15a533(0x12e),'type':a12_0x15a533(0x155),'description':a12_0x15a533(0x11d),'default':!![]},{'name':a12_0x15a533(0x111),'type':a12_0x15a533(0x155),'description':a12_0x15a533(0x131),'default':![]}],async 'execute'(_0x544472){const _0x56cf12=a12_0x15a533,_0x393813=resolveAuthScopeFlags(_0x544472),_0x19efaf=readScopedConfig(_0x393813),_0x2aaa58=!!_0x19efaf[_0x56cf12(0x121)];delete _0x19efaf[_0x56cf12(0x121)],writeScopedConfig(_0x19efaf,_0x393813);const _0x12f15a=_0x393813[_0x56cf12(0x12e)]?_0x56cf12(0x12e):_0x56cf12(0x111);if(_0x2aaa58)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x12f15a+_0x56cf12(0x128)};return{'ok':!![],'message':_0x56cf12(0x125)+_0x12f15a+_0x56cf12(0x11f)};}},{'service':'auth','command':a12_0x15a533(0x113),'description':a12_0x15a533(0x158),'risk':a12_0x15a533(0x142),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a12_0x15a533(0x11e),'default':!![]},{'name':a12_0x15a533(0x111),'type':a12_0x15a533(0x155),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a12_0x15a533(0x144),'type':a12_0x15a533(0x155),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x5f54e6){const _0xa540b8=a12_0x15a533,_0x3481a1=resolveAuthScopeFlags(_0x5f54e6),_0x5bede9=readScopedConfig(_0x3481a1),_0x48764f=productEnvName('ACCESS_KEY'),_0x12e299=productEnv('ACCESS_KEY')||undefined,_0x5b96f7=_0x5bede9[_0xa540b8(0x121)]||undefined,_0x309360=_0x12e299||_0x5b96f7,_0x30580b=_0x12e299?_0x48764f+_0xa540b8(0x109):_0x5b96f7?(_0x3481a1[_0xa540b8(0x12e)]?_0xa540b8(0x12e):_0xa540b8(0x111))+_0xa540b8(0x12b):null,_0x2349fc=[_0xa540b8(0x120)+AUTH_MODE[_0xa540b8(0x10f)]];if(_0x309360){const _0x15f152=maskCliAccessKey(_0x309360);_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x13d)+_0x15f152+(_0x30580b?_0xa540b8(0x133)+_0x30580b+')':'')),_0x2349fc['push']('Status:\x20valid');}if(!_0x309360){_0x2349fc[_0xa540b8(0x14e)](''),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x143)),_0x2349fc['push'](''),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x107)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x2349fc['push'](''),_0x2349fc['push']('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0xa540b8(0x136)]+')'),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x12c)),_0x2349fc[_0xa540b8(0x14e)](''),_0x2349fc[_0xa540b8(0x14e)]('Option\x20C:\x20environment\x20variable'),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x14f)+_0x48764f+_0xa540b8(0x116)),_0x2349fc[_0xa540b8(0x14e)](''),_0x2349fc['push'](_0xa540b8(0x114)+CLI_BIN_NAME+_0xa540b8(0x123)),_0x2349fc[_0xa540b8(0x14e)](_0xa540b8(0x151)+CLI_BIN_NAME+'\x20doctor');if(_0x5f54e6['bool'](_0xa540b8(0x144))){const _0x23c0a7=readStoredDeviceCode();if(_0x23c0a7&&!isStoredDeviceCodeExpired(_0x23c0a7)){const _0x60f5ad=getUserDomain(),_0x403f12=await fetchDeviceToken(_0x60f5ad,_0x23c0a7[_0xa540b8(0x108)]);if(_0x403f12[_0xa540b8(0x113)]==='success'&&_0x403f12['access_key']){const _0x4c7059={'global':_0x23c0a7[_0xa540b8(0x10d)]==='global'},_0x33fe63=readScopedConfig(_0x4c7059);_0x33fe63[_0xa540b8(0x121)]=_0x403f12['access_key'],writeScopedConfig(_0x33fe63,_0x4c7059),deleteStoredDeviceCode();const _0x1b40bd=_0x403f12[_0xa540b8(0x130)],_0x1e678f=maskCliAccessKey(_0x1b40bd),_0x57011b=_0x23c0a7[_0xa540b8(0x10d)]===_0xa540b8(0x12e)?'global\x20config':_0xa540b8(0x13e);return{'ok':!![],'message':[_0xa540b8(0x120)+AUTH_MODE[_0xa540b8(0x10f)],_0xa540b8(0x13d)+_0x1e678f+_0xa540b8(0x133)+_0x57011b+')',_0xa540b8(0x146)]['join']('\x0a')};}_0x403f12[_0xa540b8(0x113)]===_0xa540b8(0x156)&&deleteStoredDeviceCode();throw CliErrors[_0xa540b8(0x137)](_0xa540b8(0x12a));}throw CliErrors['authRequired'](_0x2349fc[_0xa540b8(0x13a)]('\x0a'));}}return{'ok':!![],'message':_0x2349fc[_0xa540b8(0x13a)]('\x0a')};}},{'service':'auth','command':a12_0x15a533(0x14b),'description':a12_0x15a533(0x139),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x293dff){const _0x584f02=a12_0x15a533,_0x263288=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x263288,'meta':{'env':_0x293dff[_0x584f02(0x112)]??_0x584f02(0x15e)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fa0ba,_0x365916){const _0x2c4606=a13_0xd2be,_0x387369=_0x1fa0ba();while(!![]){try{const _0x27526d=parseInt(_0x2c4606(0x73))/0x1*(parseInt(_0x2c4606(0x78))/0x2)+-parseInt(_0x2c4606(0x70))/0x3*(-parseInt(_0x2c4606(0x65))/0x4)+-parseInt(_0x2c4606(0x6c))/0x5+-parseInt(_0x2c4606(0x6b))/0x6+parseInt(_0x2c4606(0x6e))/0x7+parseInt(_0x2c4606(0x77))/0x8*(-parseInt(_0x2c4606(0x71))/0x9)+-parseInt(_0x2c4606(0x69))/0xa*(-parseInt(_0x2c4606(0x72))/0xb);if(_0x27526d===_0x365916)break;else _0x387369['push'](_0x387369['shift']());}catch(_0x142725){_0x387369['push'](_0x387369['shift']());}}}(a13_0x3244,0xef9c2));import{createInterface}from'node:readline';function a13_0xd2be(_0x5542b1,_0xba12a6){_0x5542b1=_0x5542b1-0x64;const _0x324438=a13_0x3244();let _0xd2be7f=_0x324438[_0x5542b1];return _0xd2be7f;}class AbortPrompt extends Error{constructor(){const _0x27968c=a13_0xd2be;super(_0x27968c(0x75)),this[_0x27968c(0x67)]=_0x27968c(0x66);}}function createSafeRl(){const _0x1265d1=a13_0xd2be,_0x1858f6=createInterface({'input':process['stdin'],'output':process[_0x1265d1(0x74)]});let _0x5701e6;const _0x457fad=new Promise((_0x46b474,_0x41488e)=>{const _0x1e094e=_0x1265d1;_0x5701e6=()=>{const _0x72218b=a13_0xd2be;_0x5701e6&&(_0x1858f6[_0x72218b(0x7a)]('SIGINT',_0x5701e6),_0x5701e6=undefined);try{_0x1858f6[_0x72218b(0x64)]();}catch{}_0x41488e(new AbortPrompt());},_0x1858f6[_0x1e094e(0x6d)](_0x1e094e(0x79),_0x5701e6);}),_0x16604b=()=>{const _0x3e43f2=_0x1265d1;_0x5701e6&&(_0x1858f6[_0x3e43f2(0x7a)](_0x3e43f2(0x79),_0x5701e6),_0x5701e6=undefined);try{_0x1858f6[_0x3e43f2(0x64)]();}catch{}};return{'rl':_0x1858f6,'abortPromise':_0x457fad,'disposeSuccess':_0x16604b};}function a13_0x3244(){const _0x2fbef3=['104RcLBKV','SIGINT','removeListener','):\x20','close','48ETteqU','AbortPrompt','name','question','10nVqJGT','AccessKey\x20(paste\x20ak_...):\x20','1114338upNlni','8214475TsaLZV','once','10731329jOokIp','trim','47727TOZQNE','597231tYxvig','11736703OebeTg','10577SVrbTi','stdout','User\x20aborted\x20prompt','AccessKey\x20(','64QrCOAw'];a13_0x3244=function(){return _0x2fbef3;};return a13_0x3244();}export async function promptAccessKey(_0x3f66f7=''){const {rl:_0x37a3d1,abortPromise:_0x35cfc1,disposeSuccess:_0x5b753b}=createSafeRl(),_0x1ab937=new Promise(_0x4a0a22=>{const _0x199c0a=a13_0xd2be,_0x92bd4=_0x3f66f7?_0x199c0a(0x76)+_0x3f66f7+_0x199c0a(0x7b):_0x199c0a(0x6a);_0x37a3d1[_0x199c0a(0x68)](_0x92bd4,_0x48ffeb=>{const _0x292fe7=_0x199c0a;_0x5b753b(),_0x4a0a22(_0x48ffeb[_0x292fe7(0x6f)]()||_0x3f66f7);});});return Promise['race']([_0x1ab937,_0x35cfc1]);}export function isAbortPrompt(_0x3b559c){return _0x3b559c instanceof Error&&_0x3b559c['name']==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x6e22a1=a14_0x5c70;(function(_0x40217b,_0x2c29d8){const _0x394677=a14_0x5c70,_0x2cd732=_0x40217b();while(!![]){try{const _0x164752=-parseInt(_0x394677(0x1ec))/0x1+parseInt(_0x394677(0x1e0))/0x2+-parseInt(_0x394677(0x1db))/0x3*(parseInt(_0x394677(0x1e3))/0x4)+-parseInt(_0x394677(0x1eb))/0x5*(parseInt(_0x394677(0x1df))/0x6)+-parseInt(_0x394677(0x1e2))/0x7+parseInt(_0x394677(0x1dc))/0x8+parseInt(_0x394677(0x1e7))/0x9*(parseInt(_0x394677(0x1e5))/0xa);if(_0x164752===_0x2c29d8)break;else _0x2cd732['push'](_0x2cd732['shift']());}catch(_0xbc4dc2){_0x2cd732['push'](_0x2cd732['shift']());}}}(a14_0x5dda,0x8650b));import{getBffEndpointContract}from'../../core/api-client.js';function a14_0x5dda(){const _0x3ec61e=['143066yelDjq','version','4860807prqvJU','84FdzIyD','(none)','1399810QqHORk','description','171rHrUWy','detail','bff','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','140PanoBj','947316ZxnQTd','38133NsJlpX','4501400uTPpXp','Backend\x20Function\x20name','appCode','178938LasvqD'];a14_0x5dda=function(){return _0x3ec61e;};return a14_0x5dda();}function a14_0x5c70(_0x523c83,_0x24c178){_0x523c83=_0x523c83-0x1db;const _0x5ddab0=a14_0x5dda();let _0x5c702b=_0x5ddab0[_0x523c83];return _0x5c702b;}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a14_0x6e22a1(0x1e9),'command':a14_0x6e22a1(0x1e8),'description':a14_0x6e22a1(0x1ea),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a14_0x6e22a1(0x1dd)}],async 'execute'(_0x2e4975){const _0x33421e=a14_0x6e22a1,_0x308777=await getBffEndpointContract(_0x2e4975[_0x33421e(0x1de)],_0x2e4975['str']('name'));return{'ok':!![],'data':{'appCode':_0x308777[_0x33421e(0x1de)],'functionName':_0x308777['functionName'],'description':_0x308777[_0x33421e(0x1e6)]||_0x33421e(0x1e4),'version':_0x308777[_0x33421e(0x1e1)],'gmtModified':_0x308777['gmtModified']}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x31e8ef=a15_0x384e;(function(_0x3b4b6e,_0x443f2e){const _0x3e40d6=a15_0x384e,_0x4bd59f=_0x3b4b6e();while(!![]){try{const _0x4f4067=parseInt(_0x3e40d6(0x128))/0x1+parseInt(_0x3e40d6(0x12c))/0x2+parseInt(_0x3e40d6(0x122))/0x3*(parseInt(_0x3e40d6(0x12e))/0x4)+-parseInt(_0x3e40d6(0x121))/0x5*(parseInt(_0x3e40d6(0x11e))/0x6)+-parseInt(_0x3e40d6(0x124))/0x7+parseInt(_0x3e40d6(0x120))/0x8*(-parseInt(_0x3e40d6(0x11f))/0x9)+-parseInt(_0x3e40d6(0x12f))/0xa*(parseInt(_0x3e40d6(0x12d))/0xb);if(_0x4f4067===_0x443f2e)break;else _0x4bd59f['push'](_0x4bd59f['shift']());}catch(_0x14daee){_0x4bd59f['push'](_0x4bd59f['shift']());}}}(a15_0x272f,0xdc8df));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a15_0x31e8ef(0x125),'command':a15_0x31e8ef(0x126),'description':'Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','risk':a15_0x31e8ef(0x127),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x31e8ef(0x12b)},PARAMS_FLAG],async 'execute'(_0x54ab3a){const _0x4214d5=a15_0x31e8ef,_0x3f7ff9=parseJsonParams(_0x54ab3a[_0x4214d5(0x12a)]('params')),_0x39c743=Date[_0x4214d5(0x123)](),_0x26a59f=await executeSdkBff(_0x54ab3a[_0x4214d5(0x12a)](_0x4214d5(0x129)),_0x3f7ff9),_0x150935=Date[_0x4214d5(0x123)]()-_0x39c743;return{'ok':!![],'data':{'result':_0x26a59f,'elapsed':_0x150935},'message':_0x4214d5(0x130)+_0x150935+'ms'};}};function a15_0x384e(_0x524487,_0x46cad0){_0x524487=_0x524487-0x11e;const _0x272f9d=a15_0x272f();let _0x384e9c=_0x272f9d[_0x524487];return _0x384e9c;}function a15_0x272f(){const _0x498df9=['exec','read','1166368CQFKzR','name','str','Backend\x20Function\x20name\x20to\x20execute','2425476PpffvW','11DNYoIK','5432SqPJDO','12072070YnuLHl','Backend\x20Function\x20executed\x20in\x20','7705746raxLov','6129txYFRd','5392zhWlGY','5crCJaX','3825nJlKPw','now','1796711ATvoDL','bff'];a15_0x272f=function(){return _0x498df9;};return a15_0x272f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a16_0x5ba5(){const _0x38ed55=['485YjUNVn','12603129ovKsal','32129410CyvnoW','1554629olSkEL','2UeufAD','244434LPyjIV','246920hJKjPw','279FSHSFP','5852196aIXtSW','50924KsAXFq'];a16_0x5ba5=function(){return _0x38ed55;};return a16_0x5ba5();}(function(_0x1fd14c,_0x103374){const _0x5de251=a16_0x1b93,_0x4ce264=_0x1fd14c();while(!![]){try{const _0x5a1059=parseInt(_0x5de251(0x15a))/0x1+-parseInt(_0x5de251(0x15b))/0x2*(-parseInt(_0x5de251(0x15c))/0x3)+parseInt(_0x5de251(0x160))/0x4*(-parseInt(_0x5de251(0x161))/0x5)+parseInt(_0x5de251(0x15f))/0x6+parseInt(_0x5de251(0x162))/0x7+-parseInt(_0x5de251(0x15d))/0x8*(-parseInt(_0x5de251(0x15e))/0x9)+-parseInt(_0x5de251(0x159))/0xa;if(_0x5a1059===_0x103374)break;else _0x4ce264['push'](_0x4ce264['shift']());}catch(_0x561a06){_0x4ce264['push'](_0x4ce264['shift']());}}}(a16_0x5ba5,0xe0d37));import{bffDetail}from'../../commands/bff/detail.js';function a16_0x1b93(_0x378343,_0x4e10e1){_0x378343=_0x378343-0x159;const _0x5ba5c5=a16_0x5ba5();let _0x1b9367=_0x5ba5c5[_0x378343];return _0x1b9367;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x439a14=a17_0xd103;(function(_0x26249d,_0x5c0d06){const _0x4e8d83=a17_0xd103,_0x3f7831=_0x26249d();while(!![]){try{const _0x1d329f=-parseInt(_0x4e8d83(0x15b))/0x1+parseInt(_0x4e8d83(0x146))/0x2+-parseInt(_0x4e8d83(0x141))/0x3*(-parseInt(_0x4e8d83(0x157))/0x4)+-parseInt(_0x4e8d83(0x139))/0x5+parseInt(_0x4e8d83(0x147))/0x6*(-parseInt(_0x4e8d83(0x140))/0x7)+-parseInt(_0x4e8d83(0x142))/0x8*(parseInt(_0x4e8d83(0x14e))/0x9)+parseInt(_0x4e8d83(0x149))/0xa*(parseInt(_0x4e8d83(0x153))/0xb);if(_0x1d329f===_0x5c0d06)break;else _0x3f7831['push'](_0x3f7831['shift']());}catch(_0x3980a1){_0x3f7831['push'](_0x3f7831['shift']());}}}(a17_0x3d7d,0x2976e));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a17_0x3d7d(){const _0x5211c4=['\x20at\x20','error','130052QUqJxH','215055kJEBDu','cwd','apiError','nonInteractive','unknown','cli-skill','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','2114xtNrHV','486GacNyw','1198088zfqqEL','Built-in\x20Skill\x20install\x20failed\x20[','cli-skill-install',']:\x20','612712dCMYVY','5088TXMFZh','skillVersion','50psbrDR','\x20installed','installedPath','CLI\x20Built-in\x20Skill\x20','changed','18tcjfZW','setLogPath','INSTALL_FAILED','\x20is\x20already\x20current','info','1039379PbjosG','pipe','inherit','code','2956VUdQCy','read'];a17_0x3d7d=function(){return _0x5211c4;};return a17_0x3d7d();}import{logger}from'../../utils/logger.js';function a17_0xd103(_0x29b26e,_0xa5815c){_0x29b26e=_0x29b26e-0x139;const _0x3d7d4f=a17_0x3d7d();let _0xd10360=_0x3d7d4f[_0x29b26e];return _0xd10360;}export const cliSkillDefinitions=[{'service':a17_0x439a14(0x13e),'command':'install','description':'Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','risk':a17_0x439a14(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x104725){const _0x5a17f1=a17_0x439a14;logger[_0x5a17f1(0x14f)](process[_0x5a17f1(0x13a)]()),logger[_0x5a17f1(0x152)](_0x5a17f1(0x144),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.');const _0x54e2b7=installBuiltinSkill({'stdio':_0x104725[_0x5a17f1(0x13c)]?_0x5a17f1(0x154):_0x5a17f1(0x155)});if(!_0x54e2b7['ok'])throw CliErrors[_0x5a17f1(0x13b)](_0x5a17f1(0x143)+(_0x54e2b7[_0x5a17f1(0x156)]||_0x5a17f1(0x150))+_0x5a17f1(0x145)+(_0x54e2b7[_0x5a17f1(0x15a)]||_0x5a17f1(0x13d)),_0x5a17f1(0x13f)+_0x54e2b7['repairCommand']);const _0x2c8556=_0x54e2b7[_0x5a17f1(0x14b)]?_0x5a17f1(0x159)+_0x54e2b7['installedPath']:'';return console['log'](_0x54e2b7[_0x5a17f1(0x14d)]?_0x5a17f1(0x14c)+_0x54e2b7[_0x5a17f1(0x148)]+_0x5a17f1(0x14a)+_0x2c8556:_0x5a17f1(0x14c)+_0x54e2b7[_0x5a17f1(0x148)]+_0x5a17f1(0x151)+_0x2c8556),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x307ac4,_0x117b99){const _0x8915c=a18_0x3fcd,_0x54c059=_0x307ac4();while(!![]){try{const _0x3c14e0=parseInt(_0x8915c(0x14d))/0x1*(-parseInt(_0x8915c(0x13c))/0x2)+parseInt(_0x8915c(0x145))/0x3+parseInt(_0x8915c(0x13d))/0x4+parseInt(_0x8915c(0x140))/0x5+-parseInt(_0x8915c(0x14a))/0x6+parseInt(_0x8915c(0x149))/0x7*(parseInt(_0x8915c(0x146))/0x8)+-parseInt(_0x8915c(0x14e))/0x9;if(_0x3c14e0===_0x117b99)break;else _0x54c059['push'](_0x54c059['shift']());}catch(_0x2a4d01){_0x54c059['push'](_0x54c059['shift']());}}}(a18_0x44ef,0xb68a3));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a18_0x44ef(){const _0x52275f=['global','69GxiCjk','18009675bYSxdX','validation','7604igdfGj','5841220PdULqa','Use\x20only\x20one\x20config\x20scope\x20flag.','newConfigFileName','2840515ndbViE','\x20(global)','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','global-default',',\x20or\x20create\x20a\x20project-local\x20','2698278RygPyo','8NYLZnV','Add\x20--global\x20to\x20write\x20to\x20~/','\x20first.','1192093ajlqzm','522222MJXkug','project-or-global-explicit'];a18_0x44ef=function(){return _0x52275f;};return a18_0x44ef();}export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a18_0x3fcd(_0xd85858,_0x533945){_0xd85858=_0xd85858-0x13c;const _0x44eff1=a18_0x44ef();let _0x3fcd5b=_0x44eff1[_0xd85858];return _0x3fcd5b;}export function resolveConfigScope(_0x58026c){const _0x59898e=a18_0x3fcd,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x425470}=_0x58026c;if(explicitGlobal&&explicitProject)throw CliErrors[_0x59898e(0x14f)](_0x59898e(0x142),_0x59898e(0x13e));if(explicitGlobal)return _0x59898e(0x14c);if(explicitProject)return'project';switch(_0x425470){case _0x59898e(0x143):return _0x59898e(0x14c);case _0x59898e(0x14b):if(!(_0x58026c['inProject']??isInProject()))throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x20found).',_0x59898e(0x147)+PRODUCT_CONFIG['newConfigFileName']+_0x59898e(0x144)+PRODUCT_CONFIG[_0x59898e(0x13f)]+_0x59898e(0x148));return'project';}}export function toScopeFlags(_0x3f69f3){const _0xf2d381=a18_0x3fcd;return{'global':_0x3f69f3===_0xf2d381(0x14c)};}export function formatScopeLabel(_0x109f89){const _0x1383b8=a18_0x3fcd;return _0x109f89===_0x1383b8(0x14c)?_0x1383b8(0x141):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a19_0x43a1(_0x39f56b,_0x728117){_0x39f56b=_0x39f56b-0x1bb;const _0x1ba7ed=a19_0x1ba7();let _0x43a157=_0x1ba7ed[_0x39f56b];return _0x43a157;}(function(_0x496cdc,_0x2d916c){const _0x4023df=a19_0x43a1,_0x408804=_0x496cdc();while(!![]){try{const _0x49f5ae=-parseInt(_0x4023df(0x1c5))/0x1+parseInt(_0x4023df(0x1be))/0x2*(-parseInt(_0x4023df(0x1c4))/0x3)+-parseInt(_0x4023df(0x1d0))/0x4*(parseInt(_0x4023df(0x1bf))/0x5)+-parseInt(_0x4023df(0x1ca))/0x6*(parseInt(_0x4023df(0x1cd))/0x7)+parseInt(_0x4023df(0x1ce))/0x8+parseInt(_0x4023df(0x1d7))/0x9*(-parseInt(_0x4023df(0x1c7))/0xa)+parseInt(_0x4023df(0x1bc))/0xb;if(_0x49f5ae===_0x2d916c)break;else _0x408804['push'](_0x408804['shift']());}catch(_0x435bc4){_0x408804['push'](_0x408804['shift']());}}}(a19_0x1ba7,0x3da2d));import{CliErrors}from'../../errors.js';function isSet(_0xc008c3,_0x19bbbf){const _0x724f1=a19_0x43a1,_0xc7495=_0xc008c3[_0x724f1(0x1c1)](_0x19bbbf);return _0xc7495!==undefined&&_0xc7495!==''&&_0xc7495!==![]&&_0xc7495!==0x0;}function fmtNames(_0x2b701a){const _0xf0d877=a19_0x43a1;return _0x2b701a[_0xf0d877(0x1d5)](_0x156f75=>'--'+_0x156f75)[_0xf0d877(0x1c0)](',\x20');}export function requireOneOf(_0x4fcbae,_0x1cec77,_0x438dcb){const _0x3499fe=a19_0x43a1,_0x33888f=_0x1cec77[_0x3499fe(0x1cb)](_0xe9f234=>isSet(_0x4fcbae,_0xe9f234));if(_0x33888f[_0x3499fe(0x1d6)]!==0x1)throw CliErrors[_0x3499fe(0x1d1)](_0x33888f['length']===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x1cec77)+_0x3499fe(0x1cf)+_0x438dcb+'`.':_0x3499fe(0x1d3)+fmtNames(_0x1cec77)+_0x3499fe(0x1cc)+fmtNames(_0x33888f)+'.',_0x33888f[_0x3499fe(0x1d6)]===0x0?_0x3499fe(0x1c6)+fmtNames(_0x1cec77):_0x3499fe(0x1c8));}function a19_0x1ba7(){const _0x4ae316=['str','map','length','5841hgBOTp','Use\x20only\x20one\x20of:\x20','18026569hQlmka',',\x20got\x20\x22','40cSJRHZ','1567915XCXiAv','join','flag',':\x20expected\x20','Flags\x20','60147fqiaew','111210CBJybo','Provide\x20one\x20of:\x20','6180iBVfGd','Remove\x20all\x20but\x20one.','At\x20least\x20one\x20of\x20','228ICDJqk','filter','\x20is\x20allowed,\x20found:\x20','51373LYjqkM','955352kKThiT','\x20is\x20required\x20for\x20`','4OVPJTw','validation','some','Only\x20one\x20of\x20'];a19_0x1ba7=function(){return _0x4ae316;};return a19_0x1ba7();}export function requireAnyOf(_0x5a2e7a,_0x48a1fd,_0x41c06c){const _0x53459e=a19_0x43a1;if(!_0x48a1fd[_0x53459e(0x1d2)](_0x4ddbfa=>isSet(_0x5a2e7a,_0x4ddbfa)))throw CliErrors[_0x53459e(0x1d1)](_0x53459e(0x1c9)+fmtNames(_0x48a1fd)+_0x53459e(0x1cf)+_0x41c06c+'`.',_0x53459e(0x1c6)+fmtNames(_0x48a1fd));}export function mutuallyExclusive(_0xbf867d,_0x1be88d,_0x588a56){const _0xe17e63=a19_0x43a1,_0x4d7d44=_0x1be88d['filter'](_0x24c672=>isSet(_0xbf867d,_0x24c672));if(_0x4d7d44[_0xe17e63(0x1d6)]>0x1)throw CliErrors[_0xe17e63(0x1d1)](_0xe17e63(0x1c3)+fmtNames(_0x4d7d44)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x588a56+'`.',_0xe17e63(0x1bb)+fmtNames(_0x1be88d));}export function validatePattern(_0x4a9654,_0x5c384d,_0x4eb738,_0x456db4){const _0x49be62=a19_0x43a1,_0x273f3b=_0x4a9654[_0x49be62(0x1d4)](_0x5c384d);if(_0x273f3b&&!_0x4eb738['test'](_0x273f3b))throw CliErrors[_0x49be62(0x1d1)]('Invalid\x20--'+_0x5c384d+_0x49be62(0x1c2)+_0x456db4+_0x49be62(0x1bd)+_0x273f3b+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a20_0x4d41b9=a20_0x3178;(function(_0x5651de,_0xdddf7f){const _0x58348f=a20_0x3178,_0x2c0a72=_0x5651de();while(!![]){try{const _0x28b99f=parseInt(_0x58348f(0x134))/0x1+parseInt(_0x58348f(0x132))/0x2+-parseInt(_0x58348f(0x137))/0x3*(-parseInt(_0x58348f(0x13b))/0x4)+-parseInt(_0x58348f(0x129))/0x5*(parseInt(_0x58348f(0x13c))/0x6)+parseInt(_0x58348f(0x138))/0x7*(-parseInt(_0x58348f(0x135))/0x8)+parseInt(_0x58348f(0x131))/0x9*(parseInt(_0x58348f(0x13a))/0xa)+parseInt(_0x58348f(0x12e))/0xb*(-parseInt(_0x58348f(0x12b))/0xc);if(_0x28b99f===_0xdddf7f)break;else _0x2c0a72['push'](_0x2c0a72['shift']());}catch(_0x3df07e){_0x2c0a72['push'](_0x2c0a72['shift']());}}}(a20_0xf465,0x2d547));export const GLOBAL_SCOPE_FLAG={'name':a20_0x4d41b9(0x133),'type':a20_0x4d41b9(0x12a),'default':![],'description':a20_0x4d41b9(0x12c)};export const CODE_FLAG={'name':'code','type':a20_0x4d41b9(0x139),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'}};export const SQLCODE_FLAG={'name':a20_0x4d41b9(0x130),'type':a20_0x4d41b9(0x139),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x4d41b9(0x12d)}};function a20_0xf465(){const _0x53411d=['67857CQIrUb','8246TWFkEg','string','20JbmYhY','16kVcWsJ','12KroaAc','192900IaNWmY','boolean','12ZQoafP','Write\x20to\x20the\x20global\x20configuration','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','3396052qnTSHZ','Resource\x20ID','sqlcode','804537ElzDGH','213668QpZQqb','global','267325GHEgYR','488YbinRv','Return\x20full\x20raw\x20response\x20object'];a20_0xf465=function(){return _0x53411d;};return a20_0xf465();}export const VERBOSE_FLAG={'name':'verbose','type':a20_0x4d41b9(0x12a),'description':a20_0x4d41b9(0x136)};function a20_0x3178(_0x456c94,_0x8b962e){_0x456c94=_0x456c94-0x129;const _0xf4650c=a20_0xf465();let _0x317897=_0xf4650c[_0x456c94];return _0x317897;}export const PARAMS_FLAG={'name':'params','type':'string','description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':'name','type':a20_0x4d41b9(0x139),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a20_0x4d41b9(0x12f)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a21_0x4d6b(){const _0x51597f=['\x20MB','File\x20not\x20found:\x20','34748MKMTeG','4470968lwDLRt','3298959HGoHal','41259wWzFsg','139945KXZXeM','trim','\x20path\x20is\x20required.','10mSGlKM','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','toFixed','validation','468723IbNses','18zTPujw','33663ovFGku','isFile','size','378ggAjkI','ceil','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a21_0x4d6b=function(){return _0x51597f;};return a21_0x4d6b();}(function(_0x2da264,_0xc1abd){const _0x30dba8=a21_0x2fa3,_0x55e178=_0x2da264();while(!![]){try{const _0x36e2dc=parseInt(_0x30dba8(0x170))/0x1*(parseInt(_0x30dba8(0x179))/0x2)+-parseInt(_0x30dba8(0x178))/0x3+parseInt(_0x30dba8(0x16d))/0x4+-parseInt(_0x30dba8(0x171))/0x5+-parseInt(_0x30dba8(0x17d))/0x6*(-parseInt(_0x30dba8(0x17a))/0x7)+-parseInt(_0x30dba8(0x16e))/0x8+parseInt(_0x30dba8(0x16f))/0x9*(parseInt(_0x30dba8(0x174))/0xa);if(_0x36e2dc===_0xc1abd)break;else _0x55e178['push'](_0x55e178['shift']());}catch(_0x5b974d){_0x55e178['push'](_0x55e178['shift']());}}}(a21_0x4d6b,0x4ad03));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x4a2837){const _0x7cdda9=a21_0x2fa3;if(_0x4a2837>=BYTES_PER_MB){const _0x179726=Math[_0x7cdda9(0x17e)](_0x4a2837/BYTES_PER_MB*0x64)/0x64;return _0x179726[_0x7cdda9(0x176)](0x2)+_0x7cdda9(0x180);}return _0x4a2837+'\x20B';}function a21_0x2fa3(_0x483c68,_0x42f7ee){_0x483c68=_0x483c68-0x16c;const _0x4d6bcd=a21_0x4d6b();let _0x2fa3d5=_0x4d6bcd[_0x483c68];return _0x2fa3d5;}export function requireRuntimeUploadFile(_0x520a82,_0x533888){const _0x3aea7f=a21_0x2fa3,_0xf17b9=_0x520a82[_0x3aea7f(0x172)]();if(!_0xf17b9)throw CliErrors['validation'](_0x533888+_0x3aea7f(0x173));if(!existsSync(_0xf17b9))throw CliErrors[_0x3aea7f(0x177)](_0x3aea7f(0x16c)+_0xf17b9);const _0xf88f9c=statSync(_0xf17b9);if(!_0xf88f9c[_0x3aea7f(0x17b)]())throw CliErrors[_0x3aea7f(0x177)](_0x3aea7f(0x17f)+_0xf17b9);if(_0xf88f9c[_0x3aea7f(0x17c)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x3aea7f(0x177)](_0x3aea7f(0x175)+_0xf17b9+'\x20('+formatBytes(_0xf88f9c[_0x3aea7f(0x17c)])+')');return{'path':_0xf17b9,'size':_0xf88f9c[_0x3aea7f(0x17c)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x55d1b1=a22_0x5bd8;(function(_0xfc86,_0x417315){const _0x35181c=a22_0x5bd8,_0x110a30=_0xfc86();while(!![]){try{const _0x22a77f=-parseInt(_0x35181c(0x14b))/0x1+-parseInt(_0x35181c(0x161))/0x2*(parseInt(_0x35181c(0x157))/0x3)+-parseInt(_0x35181c(0x14e))/0x4*(-parseInt(_0x35181c(0x146))/0x5)+-parseInt(_0x35181c(0x171))/0x6+-parseInt(_0x35181c(0x143))/0x7*(-parseInt(_0x35181c(0x13a))/0x8)+-parseInt(_0x35181c(0x16d))/0x9+-parseInt(_0x35181c(0x13e))/0xa*(-parseInt(_0x35181c(0x162))/0xb);if(_0x22a77f===_0x417315)break;else _0x110a30['push'](_0x110a30['shift']());}catch(_0x3cdb0e){_0x110a30['push'](_0x110a30['shift']());}}}(a22_0x39c9,0x58640));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 a22_0x5bd8(_0x428bd6,_0x3dc0bb){_0x428bd6=_0x428bd6-0x132;const _0x39c947=a22_0x39c9();let _0x5bd892=_0x39c947[_0x428bd6];return _0x5bd892;}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(_0x2d6956){const _0x29f92b=a22_0x5bd8,_0xffc524=_0x2d6956[_0x29f92b(0x135)]('.');if(_0xffc524[_0x29f92b(0x13c)]!==0x3||_0xffc524[0x0]!=='apps'||_0xffc524[0x2]!=='appcode')return undefined;const _0x9ff13f=_0xffc524[0x1]?.[_0x29f92b(0x152)]();return _0x9ff13f?_0x9ff13f:undefined;}function parseAliasDeleteKey(_0x24ecd1){const _0xebe378=a22_0x5bd8,_0x4f4301=_0x24ecd1[_0xebe378(0x135)]('.');if(_0x4f4301[_0xebe378(0x13c)]===0x2&&_0x4f4301[0x0]==='apps'){const _0xb68e31=_0x4f4301[0x1]?.[_0xebe378(0x152)]();return _0xb68e31?{'alias':_0xb68e31}:undefined;}if(_0x4f4301[_0xebe378(0x13c)]===0x3&&_0x4f4301[0x0]===_0xebe378(0x149)&&_0x4f4301[0x2]===_0xebe378(0x165)){const _0x471bba=_0x4f4301[0x1]?.[_0xebe378(0x152)]();return _0x471bba?{'alias':_0x471bba,'field':_0xebe378(0x165)}:undefined;}return undefined;}function setLocalAppAlias(_0x15f232,_0x6cc884,_0x3925b5){const _0x3a38e9=a22_0x5bd8,_0x411dbc=_0x15f232[_0x3a38e9(0x149)]&&typeof _0x15f232[_0x3a38e9(0x149)]===_0x3a38e9(0x138)&&!Array[_0x3a38e9(0x15b)](_0x15f232['apps'])?_0x15f232[_0x3a38e9(0x149)]:{},_0x3aa13a=_0x411dbc[_0x6cc884]&&typeof _0x411dbc[_0x6cc884]===_0x3a38e9(0x138)&&!Array[_0x3a38e9(0x15b)](_0x411dbc[_0x6cc884])?_0x411dbc[_0x6cc884]:{};_0x3aa13a[_0x3a38e9(0x165)]=_0x3925b5,_0x411dbc[_0x6cc884]=_0x3aa13a,_0x15f232[_0x3a38e9(0x149)]=_0x411dbc;}function a22_0x39c9(){const _0x673033=['isArray','pageSize','Usage:\x20','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','delete','alias','950738NMrzwv','500676jjBaca','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','bool','appcode','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','write','locale','validation','\x20\x20global:\x20\x20','config','(none)','2486295Rollva','args','\x22\x20is\x20not\x20settable.','\x20config\x20delete\x20<key>\x20[--global]','2785254TbsQJf','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Key\x20already\x20absent:\x20','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','split','\x20(global)','pageSize\x20must\x20be\x20a\x20positive\x20number','object','stringify','8THxXwK','\x22.\x20Allowed:\x20','length','List\x20current\x20config','300mPnYBb','Deleted\x20`','Key\x20not\x20found:\x20','Invalid\x20locale\x20value.',';\x20apps.<alias>.appcode','1712123xlBcqV','Invalid\x20value\x20for\x20\x22','global','10zXqTWi','includes','join','apps','`\x20=\x20\x22','87854znREks','log','get','111332RrjQDg','Config\x20files:\x0a','Missing\x20key\x20argument.','\x20\x20project:\x20','trim','Delete\x20a\x20configuration\x20value','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','field','keys','3YoOjoP','key','Value\x20to\x20assign','Top-level\x20key\x20\x22'];a22_0x39c9=function(){return _0x673033;};return a22_0x39c9();}function deleteLocalAppAlias(_0x4ff717,_0x5114c8){const _0x264dad=a22_0x5bd8;if(!_0x4ff717[_0x264dad(0x149)]||typeof _0x4ff717['apps']!==_0x264dad(0x138)||Array[_0x264dad(0x15b)](_0x4ff717['apps']))return![];const _0x12dee5=_0x4ff717[_0x264dad(0x149)],_0x1c2eda=_0x12dee5[_0x5114c8[_0x264dad(0x160)]];if(!_0x1c2eda||typeof _0x1c2eda!==_0x264dad(0x138)||Array[_0x264dad(0x15b)](_0x1c2eda))return![];if(!_0x5114c8['field'])return delete _0x12dee5[_0x5114c8[_0x264dad(0x160)]],!![];if(!(_0x5114c8[_0x264dad(0x155)]in _0x1c2eda))return![];return delete _0x1c2eda[_0x5114c8['field']],Object[_0x264dad(0x156)](_0x1c2eda)[_0x264dad(0x13c)]===0x0&&delete _0x12dee5[_0x5114c8['alias']],!![];}const listDef={'service':'config','command':'list','description':a22_0x55d1b1(0x13d),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2db60e){const _0x3cfab4=a22_0x55d1b1,{buildConfigFromFlags:_0x4afbc0}=await import('../../context.js'),_0x558feb=_0x4afbc0({}),_0x2add09=redactCliConfigCredentials(_0x558feb['raw']),_0x1d3d30=getProjectConfigPath(),_0x36bc33=resolveWriteConfigPath(_0x3cfab4(0x145));if(_0x2db60e['format']==='pretty')return{'ok':!![],'message':_0x3cfab4(0x132)+(JSON[_0x3cfab4(0x139)](_0x2add09,null,0x2)+'\x0a\x0a')+_0x3cfab4(0x14f)+(_0x3cfab4(0x151)+(_0x1d3d30??_0x3cfab4(0x16c))+'\x0a')+(_0x3cfab4(0x16a)+_0x36bc33)};return{'ok':!![],'data':{'effective':_0x2add09,'configFiles':{'project':_0x1d3d30??null,'global':_0x36bc33}}};}},getDef={'service':'config','command':a22_0x55d1b1(0x14d),'description':'Get\x20a\x20config\x20value','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x55d1b1(0x158),'description':a22_0x55d1b1(0x166),'required':!![]}],'flags':[],async 'execute'(_0x36ec92){const _0x4cdb71=a22_0x55d1b1,_0x38a67f=_0x36ec92[_0x4cdb71(0x16e)][0x0];if(!_0x38a67f)throw CliErrors[_0x4cdb71(0x169)](_0x4cdb71(0x150),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0xe924f6}=await import('../../context.js'),{raw:_0x12578c}=_0xe924f6({});if(_0x38a67f[_0x4cdb71(0x147)]('.')){const _0x20d3f2=_0x38a67f['split']('.');let _0xd21873=_0x12578c;for(const _0x22db69 of _0x20d3f2){if(_0xd21873==null||typeof _0xd21873!==_0x4cdb71(0x138))throw CliErrors[_0x4cdb71(0x169)](_0x4cdb71(0x140)+_0x38a67f);_0xd21873=_0xd21873[_0x22db69];}if(_0xd21873===undefined)throw CliErrors['validation'](_0x4cdb71(0x140)+_0x38a67f);const _0x32c1e6=redactCliConfigValue(_0x38a67f,_0xd21873);return console[_0x4cdb71(0x14c)](typeof _0x32c1e6===_0x4cdb71(0x138)?JSON[_0x4cdb71(0x139)](_0x32c1e6,null,0x2):String(_0x32c1e6)),{'ok':!![]};}const _0x11792c=_0x12578c[_0x38a67f];if(_0x11792c===undefined)throw CliErrors[_0x4cdb71(0x169)](_0x4cdb71(0x140)+_0x38a67f);const _0x272622=redactCliConfigValue(_0x38a67f,_0x11792c);return console['log'](typeof _0x272622===_0x4cdb71(0x138)?JSON[_0x4cdb71(0x139)](_0x272622,null,0x2):String(_0x272622)),{'ok':!![]};}},setDef={'service':a22_0x55d1b1(0x16b),'command':'set','description':'Set\x20a\x20configuration\x20value','risk':a22_0x55d1b1(0x167),'confirmationDescription':a22_0x55d1b1(0x154),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a22_0x55d1b1(0x159),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x136817){const _0x43c0df=a22_0x55d1b1,_0x8b9195=_0x136817[_0x43c0df(0x16e)][0x0],_0x1ee219=_0x136817[_0x43c0df(0x16e)][0x1];if(!_0x8b9195||_0x1ee219===undefined)throw CliErrors[_0x43c0df(0x169)]('Missing\x20key\x20or\x20value.',_0x43c0df(0x15d)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x8b9195]&&!ENUM_KEYS[_0x8b9195][_0x43c0df(0x147)](_0x1ee219))throw CliErrors['validation'](_0x43c0df(0x144)+_0x8b9195+_0x43c0df(0x13b)+ENUM_KEYS[_0x8b9195][_0x43c0df(0x148)](',\x20'));if(isCliProtectedConfigKey(_0x8b9195))throw CliErrors[_0x43c0df(0x169)]('\x22'+_0x8b9195+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0x8b9195===_0x43c0df(0x15c)){const _0x171df9=Number(_0x1ee219);if(isNaN(_0x171df9)||_0x171df9<=0x0)throw CliErrors[_0x43c0df(0x169)](_0x43c0df(0x137));}const _0x264c98=resolveWriteScope({'explicitGlobal':_0x136817[_0x43c0df(0x164)](_0x43c0df(0x145)),'policy':'project-or-global-explicit'}),_0x380306=toScopeFlags(_0x264c98),_0x153e19=readScopedConfig(_0x380306),_0x218c06=parseAliasAppcodeSetKey(_0x8b9195);if(!_0x218c06&&!isTopLevelConfigKey(_0x8b9195))throw CliErrors[_0x43c0df(0x169)](_0x43c0df(0x15a)+_0x8b9195+_0x43c0df(0x16f),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x43c0df(0x142));if(_0x218c06)setLocalAppAlias(_0x153e19,_0x218c06,_0x1ee219);else{if(_0x8b9195==='locale'){const _0x5f0809=normalizeLocale(_0x1ee219);if(!_0x5f0809)throw CliErrors[_0x43c0df(0x169)](_0x43c0df(0x141),_0x43c0df(0x163));_0x153e19[_0x43c0df(0x168)]=_0x5f0809;}else _0x153e19[_0x8b9195]=_0x8b9195===_0x43c0df(0x15c)?Number(_0x1ee219):DOMAIN_CONFIG_FIELDS['includes'](_0x8b9195)?normalizeDomainOrigin(_0x8b9195,_0x1ee219):_0x1ee219;}const _0x4a33ce=_0x8b9195==='accessKey'?maskCliAccessKey(_0x1ee219):!_0x218c06&&_0x8b9195===_0x43c0df(0x168)?String(_0x153e19['locale']):_0x1ee219;return console[_0x43c0df(0x14c)]('Set\x20`'+_0x8b9195+_0x43c0df(0x14a)+_0x4a33ce+'\x22'+(_0x264c98==='global'?_0x43c0df(0x136):'')),writeScopedConfig(_0x153e19,_0x380306),{'ok':!![]};}},deleteDef={'service':a22_0x55d1b1(0x16b),'command':a22_0x55d1b1(0x15f),'description':a22_0x55d1b1(0x153),'risk':a22_0x55d1b1(0x167),'confirmationDescription':a22_0x55d1b1(0x134),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x55d1b1(0x158),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x42873d){const _0xe6964a=a22_0x55d1b1,_0x16f72a=_0x42873d['args'][0x0];if(!_0x16f72a)throw CliErrors[_0xe6964a(0x169)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0xe6964a(0x170));if(isCliProtectedConfigKey(_0x16f72a))throw CliErrors['validation']('\x22'+_0x16f72a+_0xe6964a(0x15e));const _0x1be8cf=resolveWriteScope({'explicitGlobal':_0x42873d[_0xe6964a(0x164)](_0xe6964a(0x145)),'policy':'project-or-global-explicit'}),_0x3e9730=toScopeFlags(_0x1be8cf),_0x1b398d=readScopedConfig(_0x3e9730),_0x4732e2=parseAliasDeleteKey(_0x16f72a);if(_0x4732e2){if(!deleteLocalAppAlias(_0x1b398d,_0x4732e2))return console[_0xe6964a(0x14c)](_0xe6964a(0x133)+_0x16f72a+(_0x1be8cf===_0xe6964a(0x145)?_0xe6964a(0x136):'')),{'ok':!![],'data':{'key':_0x16f72a,'scope':_0x1be8cf,'changed':![]}};return console[_0xe6964a(0x14c)](_0xe6964a(0x13f)+_0x16f72a+'`'+(_0x1be8cf==='global'?_0xe6964a(0x136):'')),writeScopedConfig(_0x1b398d,_0x3e9730),{'ok':!![],'data':{'key':_0x16f72a,'scope':_0x1be8cf,'changed':!![]}};}if(_0x1b398d[_0x16f72a]===undefined)return console['log'](_0xe6964a(0x133)+_0x16f72a+(_0x1be8cf==='global'?_0xe6964a(0x136):'')),{'ok':!![],'data':{'key':_0x16f72a,'scope':_0x1be8cf,'changed':![]}};return delete _0x1b398d[_0x16f72a],console[_0xe6964a(0x14c)](_0xe6964a(0x13f)+_0x16f72a+'`'+(_0x1be8cf==='global'?'\x20(global)':'')),writeScopedConfig(_0x1b398d,_0x3e9730),{'ok':!![],'data':{'key':_0x16f72a,'scope':_0x1be8cf,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x1f5080=a22_0x1ed6;(function(_0x54b1e5,_0x51e668){const _0x32d9c1=a22_0x1ed6,_0x34dccd=_0x54b1e5();while(!![]){try{const _0x43d29f=parseInt(_0x32d9c1(0xf3))/0x1*(-parseInt(_0x32d9c1(0xda))/0x2)+parseInt(_0x32d9c1(0xf9))/0x3+parseInt(_0x32d9c1(0xc8))/0x4+-parseInt(_0x32d9c1(0xe9))/0x5*(parseInt(_0x32d9c1(0xf6))/0x6)+-parseInt(_0x32d9c1(0xee))/0x7*(-parseInt(_0x32d9c1(0xe1))/0x8)+-parseInt(_0x32d9c1(0xe4))/0x9*(parseInt(_0x32d9c1(0xd2))/0xa)+-parseInt(_0x32d9c1(0xcf))/0xb*(-parseInt(_0x32d9c1(0xbc))/0xc);if(_0x43d29f===_0x51e668)break;else _0x34dccd['push'](_0x34dccd['shift']());}catch(_0x1279c7){_0x34dccd['push'](_0x34dccd['shift']());}}}(a22_0x3bbf,0x21d31));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a22_0x3bbf(){const _0x3e5364=['set','64444ofgrZd','\x20\x20global:\x20\x20','delete','key','format','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','Invalid\x20locale\x20value.','2110317yrVdEn','validation','keys','590QLaHvJ','includes','split','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Deleted\x20`','Usage:\x20','bool','pageSize\x20must\x20be\x20a\x20positive\x20number','8028ngvxYT','write','Invalid\x20value\x20for\x20\x22','list','Set\x20a\x20configuration\x20value','List\x20current\x20config','Missing\x20key\x20or\x20value.','33608QqbULQ','appcode','apps','11493ljkWnl','read','value','Top-level\x20key\x20\x22','Key\x20not\x20found:\x20','5akGlwW','log','\x20config\x20set\x20<key>\x20<value>\x20[--global]','length','stringify','14XKOtqi','args','Get\x20a\x20config\x20value','\x22\x20is\x20not\x20settable.','join','54qzmZbx','object','get','1513158fJayAk','config','isArray','248349pVBPjs','alias','locale','project-or-global-explicit','`\x20=\x20\x22','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x20config\x20delete\x20<key>\x20[--global]','Key\x20already\x20absent:\x20','\x20\x20project:\x20','accessKey','pageSize','global','36daHHAd','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','field','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x20(global)','pretty','../../context.js','raw','Settable\x20keys:\x20','Value\x20to\x20assign','trim'];a22_0x3bbf=function(){return _0x3e5364;};return a22_0x3bbf();}import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';function a22_0x1ed6(_0x5c9ca1,_0x874f9c){_0x5c9ca1=_0x5c9ca1-0xb5;const _0x3bbf66=a22_0x3bbf();let _0x1ed6ff=_0x3bbf66[_0x5c9ca1];return _0x1ed6ff;}import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x4ae06b){const _0x53e4f3=a22_0x1ed6,_0x5c7531=_0x4ae06b['split']('.');if(_0x5c7531[_0x53e4f3(0xec)]!==0x3||_0x5c7531[0x0]!=='apps'||_0x5c7531[0x2]!==_0x53e4f3(0xe2))return undefined;const _0x28fd16=_0x5c7531[0x1]?.[_0x53e4f3(0xc6)]();return _0x28fd16?_0x28fd16:undefined;}function parseAliasDeleteKey(_0xbdcf67){const _0x2c0709=a22_0x1ed6,_0x1d483d=_0xbdcf67[_0x2c0709(0xd4)]('.');if(_0x1d483d[_0x2c0709(0xec)]===0x2&&_0x1d483d[0x0]===_0x2c0709(0xe3)){const _0x5ae810=_0x1d483d[0x1]?.[_0x2c0709(0xc6)]();return _0x5ae810?{'alias':_0x5ae810}:undefined;}if(_0x1d483d[_0x2c0709(0xec)]===0x3&&_0x1d483d[0x0]===_0x2c0709(0xe3)&&_0x1d483d[0x2]===_0x2c0709(0xe2)){const _0x125aef=_0x1d483d[0x1]?.['trim']();return _0x125aef?{'alias':_0x125aef,'field':_0x2c0709(0xe2)}:undefined;}return undefined;}function setLocalAppAlias(_0x3930d9,_0x8ad744,_0x2f88ec){const _0xe68d67=a22_0x1ed6,_0x242a13=_0x3930d9[_0xe68d67(0xe3)]&&typeof _0x3930d9[_0xe68d67(0xe3)]===_0xe68d67(0xf4)&&!Array['isArray'](_0x3930d9[_0xe68d67(0xe3)])?_0x3930d9[_0xe68d67(0xe3)]:{},_0x3e72eb=_0x242a13[_0x8ad744]&&typeof _0x242a13[_0x8ad744]===_0xe68d67(0xf4)&&!Array['isArray'](_0x242a13[_0x8ad744])?_0x242a13[_0x8ad744]:{};_0x3e72eb['appcode']=_0x2f88ec,_0x242a13[_0x8ad744]=_0x3e72eb,_0x3930d9['apps']=_0x242a13;}function deleteLocalAppAlias(_0x418578,_0x1370e6){const _0x44b9f3=a22_0x1ed6;if(!_0x418578[_0x44b9f3(0xe3)]||typeof _0x418578[_0x44b9f3(0xe3)]!==_0x44b9f3(0xf4)||Array[_0x44b9f3(0xf8)](_0x418578[_0x44b9f3(0xe3)]))return![];const _0x5afd17=_0x418578[_0x44b9f3(0xe3)],_0x44c74d=_0x5afd17[_0x1370e6[_0x44b9f3(0xfa)]];if(!_0x44c74d||typeof _0x44c74d!==_0x44b9f3(0xf4)||Array['isArray'](_0x44c74d))return![];if(!_0x1370e6[_0x44b9f3(0xbe)])return delete _0x5afd17[_0x1370e6[_0x44b9f3(0xfa)]],!![];if(!(_0x1370e6[_0x44b9f3(0xbe)]in _0x44c74d))return![];return delete _0x44c74d[_0x1370e6[_0x44b9f3(0xbe)]],Object[_0x44b9f3(0xd1)](_0x44c74d)[_0x44b9f3(0xec)]===0x0&&delete _0x5afd17[_0x1370e6[_0x44b9f3(0xfa)]],!![];}const listDef={'service':'config','command':a22_0x1f5080(0xdd),'description':a22_0x1f5080(0xdf),'risk':a22_0x1f5080(0xe5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x57fb07){const _0x97c282=a22_0x1f5080,{buildConfigFromFlags:_0xbf16b9}=await import(_0x97c282(0xc2)),_0x5a3830=_0xbf16b9({}),_0xdff40=redactCliConfigCredentials(_0x5a3830[_0x97c282(0xc3)]),_0xa45184=getProjectConfigPath(),_0x129cda=resolveWriteConfigPath('global');if(_0x57fb07[_0x97c282(0xcc)]===_0x97c282(0xc1))return{'ok':!![],'message':_0x97c282(0xb5)+(JSON[_0x97c282(0xed)](_0xdff40,null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x97c282(0xb8)+(_0xa45184??'(none)')+'\x0a')+(_0x97c282(0xc9)+_0x129cda)};return{'ok':!![],'data':{'effective':_0xdff40,'configFiles':{'project':_0xa45184??null,'global':_0x129cda}}};}},getDef={'service':a22_0x1f5080(0xf7),'command':a22_0x1f5080(0xf5),'description':a22_0x1f5080(0xf0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a22_0x1f5080(0xbf),'required':!![]}],'flags':[],async 'execute'(_0x4b61da){const _0x58a268=a22_0x1f5080,_0xca3a01=_0x4b61da[_0x58a268(0xef)][0x0];if(!_0xca3a01)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x58a268(0xd7)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x88626f}=await import(_0x58a268(0xc2)),{raw:_0x355cab}=_0x88626f({});if(_0xca3a01[_0x58a268(0xd3)]('.')){const _0x3d9c67=_0xca3a01['split']('.');let _0x15604f=_0x355cab;for(const _0x1e9310 of _0x3d9c67){if(_0x15604f==null||typeof _0x15604f!==_0x58a268(0xf4))throw CliErrors[_0x58a268(0xd0)]('Key\x20not\x20found:\x20'+_0xca3a01);_0x15604f=_0x15604f[_0x1e9310];}if(_0x15604f===undefined)throw CliErrors[_0x58a268(0xd0)](_0x58a268(0xe8)+_0xca3a01);const _0x19e674=redactCliConfigValue(_0xca3a01,_0x15604f);return console[_0x58a268(0xea)](typeof _0x19e674===_0x58a268(0xf4)?JSON['stringify'](_0x19e674,null,0x2):String(_0x19e674)),{'ok':!![]};}const _0xd3be78=_0x355cab[_0xca3a01];if(_0xd3be78===undefined)throw CliErrors[_0x58a268(0xd0)]('Key\x20not\x20found:\x20'+_0xca3a01);const _0x2fa18b=redactCliConfigValue(_0xca3a01,_0xd3be78);return console[_0x58a268(0xea)](typeof _0x2fa18b==='object'?JSON['stringify'](_0x2fa18b,null,0x2):String(_0x2fa18b)),{'ok':!![]};}},setDef={'service':'config','command':a22_0x1f5080(0xc7),'description':a22_0x1f5080(0xde),'risk':a22_0x1f5080(0xdb),'confirmationDescription':a22_0x1f5080(0xbd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x1f5080(0xcb),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x1f5080(0xe6),'description':a22_0x1f5080(0xc5),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x205557){const _0x157f16=a22_0x1f5080,_0xfcc417=_0x205557[_0x157f16(0xef)][0x0],_0x19604a=_0x205557[_0x157f16(0xef)][0x1];if(!_0xfcc417||_0x19604a===undefined)throw CliErrors['validation'](_0x157f16(0xe0),_0x157f16(0xd7)+CLI_BIN_NAME+_0x157f16(0xeb));if(ENUM_KEYS[_0xfcc417]&&!ENUM_KEYS[_0xfcc417][_0x157f16(0xd3)](_0x19604a))throw CliErrors[_0x157f16(0xd0)](_0x157f16(0xdc)+_0xfcc417+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0xfcc417][_0x157f16(0xf2)](',\x20'));if(isCliProtectedConfigKey(_0xfcc417))throw CliErrors[_0x157f16(0xd0)]('\x22'+_0xfcc417+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0xfcc417==='pageSize'){const _0x1f9f10=Number(_0x19604a);if(isNaN(_0x1f9f10)||_0x1f9f10<=0x0)throw CliErrors['validation'](_0x157f16(0xd9));}const _0x2928b7=resolveWriteScope({'explicitGlobal':_0x205557[_0x157f16(0xd8)](_0x157f16(0xbb)),'policy':_0x157f16(0xfc)}),_0x513aec=toScopeFlags(_0x2928b7),_0x37de00=readScopedConfig(_0x513aec),_0x2156ad=parseAliasAppcodeSetKey(_0xfcc417);if(!_0x2156ad&&!isTopLevelConfigKey(_0xfcc417))throw CliErrors[_0x157f16(0xd0)](_0x157f16(0xe7)+_0xfcc417+_0x157f16(0xf1),_0x157f16(0xc4)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');if(_0x2156ad)setLocalAppAlias(_0x37de00,_0x2156ad,_0x19604a);else{if(_0xfcc417==='locale'){const _0x484953=normalizeLocale(_0x19604a);if(!_0x484953)throw CliErrors[_0x157f16(0xd0)](_0x157f16(0xce),_0x157f16(0xd5));_0x37de00['locale']=_0x484953;}else _0x37de00[_0xfcc417]=_0xfcc417===_0x157f16(0xba)?Number(_0x19604a):DOMAIN_CONFIG_FIELDS[_0x157f16(0xd3)](_0xfcc417)?normalizeDomainOrigin(_0xfcc417,_0x19604a):_0x19604a;}const _0x25f2e8=_0xfcc417===_0x157f16(0xb9)?maskCliAccessKey(_0x19604a):!_0x2156ad&&_0xfcc417===_0x157f16(0xfb)?String(_0x37de00[_0x157f16(0xfb)]):_0x19604a;return console[_0x157f16(0xea)]('Set\x20`'+_0xfcc417+_0x157f16(0xfd)+_0x25f2e8+'\x22'+(_0x2928b7===_0x157f16(0xbb)?_0x157f16(0xc0):'')),writeScopedConfig(_0x37de00,_0x513aec),{'ok':!![]};}},deleteDef={'service':a22_0x1f5080(0xf7),'command':a22_0x1f5080(0xca),'description':'Delete\x20a\x20configuration\x20value','risk':a22_0x1f5080(0xdb),'confirmationDescription':a22_0x1f5080(0xcd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x1f5080(0xcb),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x17a7eb){const _0x8c8a42=a22_0x1f5080,_0x97c154=_0x17a7eb[_0x8c8a42(0xef)][0x0];if(!_0x97c154)throw CliErrors[_0x8c8a42(0xd0)]('Missing\x20key\x20argument.',_0x8c8a42(0xd7)+CLI_BIN_NAME+_0x8c8a42(0xb6));if(isCliProtectedConfigKey(_0x97c154))throw CliErrors[_0x8c8a42(0xd0)]('\x22'+_0x97c154+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x174566=resolveWriteScope({'explicitGlobal':_0x17a7eb[_0x8c8a42(0xd8)](_0x8c8a42(0xbb)),'policy':_0x8c8a42(0xfc)}),_0x4b7b51=toScopeFlags(_0x174566),_0x31defb=readScopedConfig(_0x4b7b51),_0x5f56ec=parseAliasDeleteKey(_0x97c154);if(_0x5f56ec){if(!deleteLocalAppAlias(_0x31defb,_0x5f56ec))return console[_0x8c8a42(0xea)]('Key\x20already\x20absent:\x20'+_0x97c154+(_0x174566==='global'?_0x8c8a42(0xc0):'')),{'ok':!![],'data':{'key':_0x97c154,'scope':_0x174566,'changed':![]}};return console['log'](_0x8c8a42(0xd6)+_0x97c154+'`'+(_0x174566===_0x8c8a42(0xbb)?'\x20(global)':'')),writeScopedConfig(_0x31defb,_0x4b7b51),{'ok':!![],'data':{'key':_0x97c154,'scope':_0x174566,'changed':!![]}};}if(_0x31defb[_0x97c154]===undefined)return console[_0x8c8a42(0xea)](_0x8c8a42(0xb7)+_0x97c154+(_0x174566===_0x8c8a42(0xbb)?_0x8c8a42(0xc0):'')),{'ok':!![],'data':{'key':_0x97c154,'scope':_0x174566,'changed':![]}};return delete _0x31defb[_0x97c154],console[_0x8c8a42(0xea)]('Deleted\x20`'+_0x97c154+'`'+(_0x174566===_0x8c8a42(0xbb)?_0x8c8a42(0xc0):'')),writeScopedConfig(_0x31defb,_0x4b7b51),{'ok':!![],'data':{'key':_0x97c154,'scope':_0x174566,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a23_0x5c9c37=a23_0x2268;function a23_0x2268(_0x21e9de,_0x1d8714){_0x21e9de=_0x21e9de-0xa4;const _0x7a9a46=a23_0x7a9a();let _0x2268cc=_0x7a9a46[_0x21e9de];return _0x2268cc;}(function(_0x27907f,_0x3bce41){const _0x38c300=a23_0x2268,_0x452d6a=_0x27907f();while(!![]){try{const _0xdad685=parseInt(_0x38c300(0xaf))/0x1*(parseInt(_0x38c300(0xc6))/0x2)+parseInt(_0x38c300(0xcb))/0x3*(-parseInt(_0x38c300(0xc4))/0x4)+parseInt(_0x38c300(0xca))/0x5+parseInt(_0x38c300(0xbe))/0x6*(-parseInt(_0x38c300(0xc0))/0x7)+-parseInt(_0x38c300(0xd2))/0x8*(parseInt(_0x38c300(0xd8))/0x9)+parseInt(_0x38c300(0xc7))/0xa*(parseInt(_0x38c300(0xb2))/0xb)+parseInt(_0x38c300(0xa6))/0xc;if(_0xdad685===_0x3bce41)break;else _0x452d6a['push'](_0x452d6a['shift']());}catch(_0x574d0c){_0x452d6a['push'](_0x452d6a['shift']());}}}(a23_0x7a9a,0x8a767));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';function a23_0x7a9a(){const _0x372065=['47173uxDQXM','domains','official','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','8OTplez','Independent-deployment\x20Domain\x20JSON\x20file','136XsftwG','129770FVpZTw','manifestDomains','skill-domain','3120570AFvQyt','1626510WIRbiK','name','string','Region\x20\x22','cdn','Official\x20Lovrabet\x20region:\x20','ExitPromptError','16ulrmlV','routing','Select\x20Lovrabet\x20region','init','Custom\x20User\x20HTTPS\x20origin','Custom\x20Runtime\x20HTTPS\x20origin','527382XJoLXn','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','join','12229320KDskNf','mode','nonInteractive','api-domain','map','region','Available\x20regions:\x20','str','assign','7307JDjyev','runtime-domain','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','165XnoIQb','\x22\x20is\x20not\x20currently\x20available.','enterprise-v1','validation','write','Custom\x20knowledge-base\x20HTTPS\x20origin','length','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','label','keys','config','Custom\x20SkillHub\x20HTTPS\x20origin','504wSeSvn','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains'];a23_0x7a9a=function(){return _0x372065;};return a23_0x7a9a();}import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':'domain-config','type':a23_0x5c9c37(0xcd),'description':a23_0x5c9c37(0xc5)},{'name':'user-domain','type':'string','description':a23_0x5c9c37(0xd6)},{'name':a23_0x5c9c37(0xa9),'type':a23_0x5c9c37(0xcd),'description':'Custom\x20platform\x20API\x20HTTPS\x20origin'},{'name':a23_0x5c9c37(0xb0),'type':a23_0x5c9c37(0xcd),'description':a23_0x5c9c37(0xd7)},{'name':a23_0x5c9c37(0xc9),'type':a23_0x5c9c37(0xcd),'description':a23_0x5c9c37(0xbd)},{'name':'kb-domain','type':a23_0x5c9c37(0xcd),'description':a23_0x5c9c37(0xb7)}];export const configInitFlags=[{'name':'region','type':'string','description':a23_0x5c9c37(0xd0)+ENABLED_LOVRABET_REGION_VALUES[a23_0x5c9c37(0xa5)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x46ec26){const _0x3de061=a23_0x5c9c37,_0x35baf4=_0x46ec26['str'](_0x3de061(0xab));if(_0x35baf4){if(!isEnabledLovrabetRegion(_0x35baf4))throw CliErrors[_0x3de061(0xb5)](_0x3de061(0xce)+_0x35baf4+_0x3de061(0xb3),_0x3de061(0xac)+ENABLED_LOVRABET_REGION_VALUES[_0x3de061(0xa5)](',\x20'));return _0x35baf4;}if(_0x46ec26[_0x3de061(0xa8)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x3de061(0xd4),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x3de061(0xaa)](_0x2eff34=>({'name':OFFICIAL_ROUTING_PROFILES[_0x2eff34][_0x3de061(0xba)]+'\x20('+_0x2eff34+')','value':_0x2eff34}))});}catch(_0x1a4a3b){if(_0x1a4a3b?.[_0x3de061(0xcc)]===_0x3de061(0xd1))throw CliErrors['cancelled']();throw _0x1a4a3b;}}export async function executeConfigInit(_0x3f2cb9){const _0x5bd271=a23_0x5c9c37,_0x3c2cc5=resolveDomainConfigInput(_0x3f2cb9),_0x1d4574=_0x3c2cc5[_0x5bd271(0xc1)],_0x134746=Object[_0x5bd271(0xbb)](_0x1d4574)[_0x5bd271(0xb8)]>0x0;if(_0x134746&&_0x3f2cb9[_0x5bd271(0xad)](_0x5bd271(0xab)))throw CliErrors[_0x5bd271(0xb5)](_0x5bd271(0xc3));const _0x2e9935={'global':!![]},_0x33b88f=readScopedConfig(_0x2e9935);for(const _0x1ffdb7 of DOMAIN_CONFIG_FIELDS)delete _0x33b88f[_0x1ffdb7];for(const _0x27489b of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x33b88f[_0x27489b];delete _0x33b88f[_0x5bd271(0xd3)];let _0x42fb5c=null;if(_0x134746)delete _0x33b88f[_0x5bd271(0xab)],_0x3c2cc5[_0x5bd271(0xa7)]===_0x5bd271(0xb4)?_0x33b88f[_0x5bd271(0xd3)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x3c2cc5[_0x5bd271(0xc8)],'cdn':_0x3c2cc5[_0x5bd271(0xcf)]}:Object[_0x5bd271(0xae)](_0x33b88f,_0x1d4574);else{_0x42fb5c=await resolveRegion(_0x3f2cb9);if(_0x42fb5c===DEFAULT_LOVRABET_REGION)delete _0x33b88f[_0x5bd271(0xab)];else _0x33b88f[_0x5bd271(0xab)]=_0x42fb5c;}return writeScopedConfig(_0x33b88f,_0x2e9935),{'ok':!![],'message':_0x134746?_0x5bd271(0xa4)+Object[_0x5bd271(0xbb)](_0x3c2cc5['mode']===_0x5bd271(0xb4)?_0x3c2cc5[_0x5bd271(0xc8)]:_0x1d4574)[_0x5bd271(0xa5)](',\x20')+'.':_0x5bd271(0xb9)+_0x42fb5c+'.','data':{'mode':_0x134746?'independent':_0x5bd271(0xc2),'protocol':_0x3c2cc5[_0x5bd271(0xa7)]===_0x5bd271(0xb4)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x42fb5c,'domains':_0x1d4574,'cdn':_0x3c2cc5[_0x5bd271(0xa7)]===_0x5bd271(0xb4)?_0x3c2cc5[_0x5bd271(0xcf)]:undefined}};}export const configInitDefinition={'service':a23_0x5c9c37(0xbc),'command':a23_0x5c9c37(0xd5),'description':a23_0x5c9c37(0xbf),'risk':a23_0x5c9c37(0xb6),'confirmationDescription':a23_0x5c9c37(0xb1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a59d6,_0x1c4727){var _0x66049b=a24_0x3f9d,_0x41a518=_0x5a59d6();while(!![]){try{var _0x4b36eb=parseInt(_0x66049b(0x19b))/0x1+-parseInt(_0x66049b(0x195))/0x2+-parseInt(_0x66049b(0x194))/0x3*(parseInt(_0x66049b(0x196))/0x4)+parseInt(_0x66049b(0x193))/0x5*(parseInt(_0x66049b(0x197))/0x6)+parseInt(_0x66049b(0x198))/0x7+parseInt(_0x66049b(0x192))/0x8+parseInt(_0x66049b(0x19a))/0x9*(parseInt(_0x66049b(0x199))/0xa);if(_0x4b36eb===_0x1c4727)break;else _0x41a518['push'](_0x41a518['shift']());}catch(_0x28bf50){_0x41a518['push'](_0x41a518['shift']());}}}(a24_0x207c,0xae4c9));import{CLI_BIN_NAME}from'../../constant/cli.js';function a24_0x3f9d(_0x58cd2e,_0x199fcf){_0x58cd2e=_0x58cd2e-0x192;var _0x207c6b=a24_0x207c();var _0x3f9dac=_0x207c6b[_0x58cd2e];return _0x3f9dac;}function a24_0x207c(){var _0x401d09=['1793892EumKlK','228RRudtl','6rYuNhU','3470922hVyexq','10rZOPvf','7920657JZqokg','850309IMXTpV','5325752rmuCEB','373365eWbWMH','71355OFGiOP'];a24_0x207c=function(){return _0x401d09;};return a24_0x207c();}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a25_0x53c6(_0xd52995,_0x572b98){_0xd52995=_0xd52995-0x14a;const _0x362b97=a25_0x362b();let _0x53c672=_0x362b97[_0xd52995];return _0x53c672;}const a25_0x239022=a25_0x53c6;(function(_0x53a0c9,_0x53d51c){const _0x255f5d=a25_0x53c6,_0x26b270=_0x53a0c9();while(!![]){try{const _0x1b8944=parseInt(_0x255f5d(0x17e))/0x1*(parseInt(_0x255f5d(0x193))/0x2)+parseInt(_0x255f5d(0x1ad))/0x3+-parseInt(_0x255f5d(0x1a6))/0x4*(-parseInt(_0x255f5d(0x1a2))/0x5)+-parseInt(_0x255f5d(0x19a))/0x6*(parseInt(_0x255f5d(0x153))/0x7)+-parseInt(_0x255f5d(0x1a4))/0x8*(-parseInt(_0x255f5d(0x15c))/0x9)+parseInt(_0x255f5d(0x1a9))/0xa+-parseInt(_0x255f5d(0x150))/0xb*(parseInt(_0x255f5d(0x172))/0xc);if(_0x1b8944===_0x53d51c)break;else _0x26b270['push'](_0x26b270['shift']());}catch(_0x13902b){_0x26b270['push'](_0x26b270['shift']());}}}(a25_0x362b,0x4f426));import{executeData}from'../../core/sdk-client.js';function a25_0x362b(){const _0x4e5f14=['\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}','\x20\x20DATASET\x20BOUNDARY','str','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\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]}}','28655HzPifb','delete','confirmationDescription','938427uwTpaY','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','data\x20','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20EXAMPLES','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\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','378693bMOlFA','params','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','join','aggregate','Update\x20an\x20existing\x20data\x20record','\x20\x20AGGREGATE\x20TYPES','\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\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\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\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}','helpExtra','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','risk','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','length','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','8400OcBVyZ','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','Preview:\x20data\x20','create','Create\x20one\x20record\x20in\x20the\x20dataset','batch','\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\x20WHERE\x20OPERATORS','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','batchCreate','34028Gfyppr','/api/{appCode}/','read','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20PARAMS\x20STRUCTURE','body','update','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\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}}','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','getOne','now','\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\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','write','\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','operation','\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','filter','34daaTnG','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','build','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','command','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','6cLmkry','\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\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}','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','map','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','3635Wkyqes','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','120AndMnJ','high-risk-write','2612nBmUpl','code','description','868540kzNDyG','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\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}}','\x20on\x20dataset\x20','1532973sXjyoh','paramsRequired','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\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}}','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\x20\x20\x20\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}'];a25_0x362b=function(){return _0x4e5f14;};return a25_0x362b();}import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a25_0x239022(0x192),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a25_0x239022(0x15b)+a25_0x239022(0x15f),'helpExtra':[a25_0x239022(0x179),'\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}}',a25_0x239022(0x1ab),a25_0x239022(0x188),a25_0x239022(0x15a),a25_0x239022(0x181),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a25_0x239022(0x14f),'\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\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}',a25_0x239022(0x194),'','\x20\x20LOGICAL\x20COMBINATORS','\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_0x239022(0x165),'',a25_0x239022(0x14e),a25_0x239022(0x183),a25_0x239022(0x164),a25_0x239022(0x195),a25_0x239022(0x16e),a25_0x239022(0x199),'','\x20\x20PAGINATION',a25_0x239022(0x156),a25_0x239022(0x18c),a25_0x239022(0x16c),a25_0x239022(0x1aa),a25_0x239022(0x191),a25_0x239022(0x18f),a25_0x239022(0x182)][a25_0x239022(0x160)]('\x0a')},{'command':a25_0x239022(0x18a),'operation':a25_0x239022(0x18a),'risk':a25_0x239022(0x180),'paramsRequired':!![],'description':a25_0x239022(0x157),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'create','operation':a25_0x239022(0x175),'risk':a25_0x239022(0x18e),'paramsRequired':!![],'description':a25_0x239022(0x176),'confirmationDescription':a25_0x239022(0x15e),'paramsHint':a25_0x239022(0x16b)},{'command':a25_0x239022(0x17d),'operation':a25_0x239022(0x17d),'risk':a25_0x239022(0x18e),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','confirmationDescription':a25_0x239022(0x169),'paramsHint':a25_0x239022(0x19e)},{'command':'update','operation':a25_0x239022(0x186),'risk':a25_0x239022(0x18e),'paramsRequired':!![],'description':a25_0x239022(0x162),'confirmationDescription':a25_0x239022(0x154),'paramsHint':a25_0x239022(0x1af)+a25_0x239022(0x1b1)},{'command':'delete','operation':a25_0x239022(0x151),'risk':a25_0x239022(0x1a5),'paramsRequired':!![],'description':a25_0x239022(0x19d),'confirmationDescription':a25_0x239022(0x189),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'aggregate','operation':a25_0x239022(0x161),'risk':a25_0x239022(0x180),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a25_0x239022(0x1a0)+a25_0x239022(0x159),'helpExtra':[a25_0x239022(0x163),a25_0x239022(0x14b),a25_0x239022(0x19c),a25_0x239022(0x197),a25_0x239022(0x17c),a25_0x239022(0x14a),a25_0x239022(0x167),'\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_0x239022(0x184),'\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_0x239022(0x18d),a25_0x239022(0x1a1),a25_0x239022(0x166),a25_0x239022(0x1b0),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a25_0x239022(0x173),'\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only',a25_0x239022(0x17b),a25_0x239022(0x187),'',a25_0x239022(0x14c),'\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only',a25_0x239022(0x170),a25_0x239022(0x17a),'\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','',a25_0x239022(0x158),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a25_0x239022(0x19b),'',a25_0x239022(0x1a3),a25_0x239022(0x178),'',a25_0x239022(0x171)]['join']('\x0a')}];function makeDataCommand(_0x4e5549){const _0x50786d=a25_0x239022,_0x4be3fd=_0x50786d(0x155)+_0x4e5549[_0x50786d(0x198)],_0x5a5642={'service':'data','command':_0x4e5549[_0x50786d(0x198)],'description':_0x4e5549[_0x50786d(0x1a8)],'risk':_0x4e5549[_0x50786d(0x16d)],..._0x4e5549[_0x50786d(0x152)]?{'confirmationDescription':_0x4e5549[_0x50786d(0x152)]}:{},'helpExtra':_0x4e5549[_0x50786d(0x168)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x4e5549[_0x50786d(0x16a)]}],'validate':async _0x159c92=>{const _0xc188f7=_0x50786d;_0x4e5549[_0xc188f7(0x1ae)]&&requireAnyOf(_0x159c92,['params'],_0x4be3fd),_0x4e5549[_0xc188f7(0x190)]===_0xc188f7(0x17d)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x159c92[_0xc188f7(0x14d)](_0xc188f7(0x15d)))),_0x4e5549[_0xc188f7(0x190)]===_0xc188f7(0x186)&&parseUpdateIdsFromParams(parseJsonParams(_0x159c92[_0xc188f7(0x14d)](_0xc188f7(0x15d)))??{});},async 'execute'(_0x3087d9){const _0x29b13b=_0x50786d,_0x456736=_0x3087d9[_0x29b13b(0x14d)](_0x29b13b(0x1a7)),_0x41d20d=_0x4e5549[_0x29b13b(0x190)]===_0x29b13b(0x17d)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3087d9[_0x29b13b(0x14d)](_0x29b13b(0x15d)))):parseJsonParams(_0x3087d9[_0x29b13b(0x14d)](_0x29b13b(0x15d)))??{},_0x3ea5ec=_0x4e5549[_0x29b13b(0x190)]===_0x29b13b(0x186)?parseUpdateIdsFromParams(_0x41d20d):undefined,_0x54c088=_0x3ea5ec?normalizeUpdateParamsForRuntime(_0x41d20d,_0x3ea5ec):_0x41d20d,_0x5c5a77=Date[_0x29b13b(0x18b)](),_0x2fb8e9=await executeData(_0x456736,_0x4e5549[_0x29b13b(0x190)],_0x54c088),_0x1af381=Date['now']()-_0x5c5a77,_0x30f02b=_0x3ea5ec&&_0x3ea5ec[_0x29b13b(0x16f)]>0x1?buildBatchUpdateResult(_0x3ea5ec,_0x2fb8e9):_0x2fb8e9;return{'ok':!![],'data':{'result':_0x30f02b,'elapsed':_0x1af381},'message':'data\x20'+_0x4e5549[_0x29b13b(0x198)]+'\x20completed\x20in\x20'+_0x1af381+'ms'};}};return _0x4e5549['risk']!==_0x50786d(0x180)&&(_0x5a5642['dryRun']=async _0x1d077e=>{const _0x34a162=_0x50786d,_0x33652f=_0x1d077e[_0x34a162(0x14d)](_0x34a162(0x1a7)),_0x1ae985=_0x4e5549['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1d077e[_0x34a162(0x14d)](_0x34a162(0x15d)))):parseJsonParams(_0x1d077e[_0x34a162(0x14d)](_0x34a162(0x15d)))??{};let _0x424ef3=_0x1ae985;if(_0x4e5549[_0x34a162(0x190)]===_0x34a162(0x186)){const _0x2b01a5=parseUpdateIdsFromParams(_0x1ae985);_0x424ef3=normalizeUpdateParamsForRuntime(_0x1ae985,_0x2b01a5);}return dryRun('POST',_0x34a162(0x17f)+_0x33652f+'/'+_0x4e5549[_0x34a162(0x190)])[_0x34a162(0x185)](_0x424ef3)[_0x34a162(0x1a8)](_0x34a162(0x174)+_0x4e5549[_0x34a162(0x198)]+_0x34a162(0x1ac)+_0x33652f)[_0x34a162(0x196)]();}),_0x5a5642;}export const dataDefinitions=specs[a25_0x239022(0x19f)](makeDataCommand);function buildBatchUpdateResult(_0x20c0d9,_0x1229eb){const _0xb8656=a25_0x239022;return{'operation':_0xb8656(0x186),'mode':_0xb8656(0x177),'ids':_0x20c0d9,'total':_0x20c0d9[_0xb8656(0x16f)],'result':_0x1229eb};}
|
|
1
|
+
function a25_0x26fd(){const _0x204656=['\x20completed\x20in\x20','\x20\x20PAGINATION','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','confirmationDescription','7bOHTEx','dryRun','3fbvJQu','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint','write','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','batch','getOne','aggregate','176256nnjMxF','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','build','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','Update\x20an\x20existing\x20data\x20record','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','data','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','params','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','10VkqSAZ','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','batchCreate','read','create','469228WZghOz','helpExtra','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','join','data\x20','high-risk-write','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20AGGREGATE\x20TYPES','1615312bToZWy','risk','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','Create\x20one\x20record\x20in\x20the\x20dataset','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','description','6899508Xkcbtx','now','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20PARAMS\x20STRUCTURE','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20DATASET\x20BOUNDARY','str','24NVtYtU','paramsRequired','Preview:\x20data\x20','length','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','code','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','command','2300946BwcLHA','delete','filter','update','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','operation','POST','1106570CQrWjv','162403eloAwH'];a25_0x26fd=function(){return _0x204656;};return a25_0x26fd();}const a25_0x1fba5b=a25_0x57d1;(function(_0x251582,_0xca8e84){const _0x41b081=a25_0x57d1,_0x566cb3=_0x251582();while(!![]){try{const _0x7c6c57=-parseInt(_0x41b081(0xf1))/0x1+-parseInt(_0x41b081(0xc1))/0x2*(-parseInt(_0x41b081(0xfa))/0x3)+parseInt(_0x41b081(0xb8))/0x4*(-parseInt(_0x41b081(0xb3))/0x5)+-parseInt(_0x41b081(0xe8))/0x6*(parseInt(_0x41b081(0xf8))/0x7)+parseInt(_0x41b081(0xd1))/0x8*(-parseInt(_0x41b081(0x103))/0x9)+-parseInt(_0x41b081(0xf0))/0xa+parseInt(_0x41b081(0xc9))/0xb;if(_0x7c6c57===_0xca8e84)break;else _0x566cb3['push'](_0x566cb3['shift']());}catch(_0x140610){_0x566cb3['push'](_0x566cb3['shift']());}}}(a25_0x26fd,0x76667));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a25_0x1fba5b(0xea),'risk':'read','paramsRequired':![],'description':a25_0x1fba5b(0xd6),'paramsHint':a25_0x1fba5b(0xff)+a25_0x1fba5b(0xbf),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a25_0x1fba5b(0xd5),a25_0x1fba5b(0xba),'\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}',a25_0x1fba5b(0xcb),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a25_0x1fba5b(0xa8),a25_0x1fba5b(0xe6),a25_0x1fba5b(0xe1),a25_0x1fba5b(0x104),'','\x20\x20LOGICAL\x20COMBINATORS',a25_0x1fba5b(0xe2),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a25_0x1fba5b(0xd7),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a25_0x1fba5b(0xb2),a25_0x1fba5b(0xad),a25_0x1fba5b(0xda),'',a25_0x1fba5b(0xf3),'\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a25_0x1fba5b(0xfb),a25_0x1fba5b(0xf5),'\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.',a25_0x1fba5b(0xb0),a25_0x1fba5b(0xdd),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a25_0x1fba5b(0xbb)]('\x0a')},{'command':a25_0x1fba5b(0x101),'operation':a25_0x1fba5b(0x101),'risk':a25_0x1fba5b(0xb6),'paramsRequired':!![],'description':a25_0x1fba5b(0xcc),'paramsHint':a25_0x1fba5b(0xaf)},{'command':a25_0x1fba5b(0xb7),'operation':a25_0x1fba5b(0xb7),'risk':a25_0x1fba5b(0xfe),'paramsRequired':!![],'description':a25_0x1fba5b(0xc6),'confirmationDescription':'Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a25_0x1fba5b(0xe4)},{'command':a25_0x1fba5b(0xb5),'operation':a25_0x1fba5b(0xb5),'risk':'write','paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','confirmationDescription':a25_0x1fba5b(0xc5),'paramsHint':a25_0x1fba5b(0xe0)},{'command':a25_0x1fba5b(0xeb),'operation':'update','risk':'write','paramsRequired':!![],'description':a25_0x1fba5b(0xac),'confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a25_0x1fba5b(0xc4)+a25_0x1fba5b(0xdb)},{'command':'delete','operation':a25_0x1fba5b(0xe9),'risk':a25_0x1fba5b(0xbd),'paramsRequired':!![],'description':'Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':a25_0x1fba5b(0xaf)},{'command':'aggregate','operation':a25_0x1fba5b(0x102),'risk':a25_0x1fba5b(0xb6),'paramsRequired':![],'description':a25_0x1fba5b(0xfc),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a25_0x1fba5b(0xdf),'helpExtra':[a25_0x1fba5b(0xc0),a25_0x1fba5b(0xc7),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}',a25_0x1fba5b(0xf4),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a25_0x1fba5b(0xa9),'',a25_0x1fba5b(0xcd),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a25_0x1fba5b(0xe5),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)',a25_0x1fba5b(0xc3),a25_0x1fba5b(0xde),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a25_0x1fba5b(0xce),a25_0x1fba5b(0xaa),a25_0x1fba5b(0xf6),a25_0x1fba5b(0xed),'',a25_0x1fba5b(0xcf),a25_0x1fba5b(0xe3),'\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL',a25_0x1fba5b(0xec),a25_0x1fba5b(0xab),'','\x20\x20EXAMPLES','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a25_0x1fba5b(0xb4),'',a25_0x1fba5b(0xd9),a25_0x1fba5b(0xbe),'',a25_0x1fba5b(0xd8)]['join']('\x0a')}];function a25_0x57d1(_0x54bf70,_0x2c6761){_0x54bf70=_0x54bf70-0xa7;const _0x26fd7f=a25_0x26fd();let _0x57d1c8=_0x26fd7f[_0x54bf70];return _0x57d1c8;}function makeDataCommand(_0x781ecd){const _0x16c216=a25_0x1fba5b,_0x3f1ec4=_0x16c216(0xbc)+_0x781ecd[_0x16c216(0xe7)],_0x1eada4={'service':_0x16c216(0xae),'command':_0x781ecd[_0x16c216(0xe7)],'description':_0x781ecd[_0x16c216(0xc8)],'risk':_0x781ecd[_0x16c216(0xc2)],..._0x781ecd[_0x16c216(0xf7)]?{'confirmationDescription':_0x781ecd['confirmationDescription']}:{},'helpExtra':_0x781ecd[_0x16c216(0xb9)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x781ecd[_0x16c216(0xfd)]}],'validate':async _0x2a6e8a=>{const _0x51d681=_0x16c216;_0x781ecd[_0x51d681(0xd2)]&&requireAnyOf(_0x2a6e8a,['params'],_0x3f1ec4),_0x781ecd['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2a6e8a[_0x51d681(0xd0)](_0x51d681(0xb1)))),_0x781ecd[_0x51d681(0xee)]===_0x51d681(0xeb)&&parseUpdateIdsFromParams(parseJsonParams(_0x2a6e8a[_0x51d681(0xd0)](_0x51d681(0xb1)))??{});},async 'execute'(_0x59f7a9){const _0x2cd5ab=_0x16c216,_0x23b9e2=_0x59f7a9[_0x2cd5ab(0xd0)]('code'),_0x2ff110=_0x781ecd[_0x2cd5ab(0xee)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x59f7a9[_0x2cd5ab(0xd0)](_0x2cd5ab(0xb1)))):parseJsonParams(_0x59f7a9[_0x2cd5ab(0xd0)](_0x2cd5ab(0xb1)))??{},_0x5cf714=_0x781ecd['operation']==='update'?parseUpdateIdsFromParams(_0x2ff110):undefined,_0x780270=_0x5cf714?normalizeUpdateParamsForRuntime(_0x2ff110,_0x5cf714):_0x2ff110,_0x2c8d87=Date[_0x2cd5ab(0xca)](),_0x54d2bb=await executeData(_0x23b9e2,_0x781ecd[_0x2cd5ab(0xee)],_0x780270),_0x323374=Date['now']()-_0x2c8d87,_0x4f9edf=_0x5cf714&&_0x5cf714[_0x2cd5ab(0xd4)]>0x1?buildBatchUpdateResult(_0x5cf714,_0x54d2bb):_0x54d2bb;return{'ok':!![],'data':{'result':_0x4f9edf,'elapsed':_0x323374},'message':_0x2cd5ab(0xbc)+_0x781ecd[_0x2cd5ab(0xe7)]+_0x2cd5ab(0xf2)+_0x323374+'ms'};}};return _0x781ecd[_0x16c216(0xc2)]!=='read'&&(_0x1eada4[_0x16c216(0xf9)]=async _0x3edea7=>{const _0x14f8e9=_0x16c216,_0x3ca87c=_0x3edea7[_0x14f8e9(0xd0)](_0x14f8e9(0xdc)),_0x89163=_0x781ecd[_0x14f8e9(0xee)]===_0x14f8e9(0xb5)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3edea7[_0x14f8e9(0xd0)](_0x14f8e9(0xb1)))):parseJsonParams(_0x3edea7[_0x14f8e9(0xd0)](_0x14f8e9(0xb1)))??{};let _0xafae2d=_0x89163;if(_0x781ecd[_0x14f8e9(0xee)]===_0x14f8e9(0xeb)){const _0x777ac6=parseUpdateIdsFromParams(_0x89163);_0xafae2d=normalizeUpdateParamsForRuntime(_0x89163,_0x777ac6);}return dryRun(_0x14f8e9(0xef),'/api/{appCode}/'+_0x3ca87c+'/'+_0x781ecd[_0x14f8e9(0xee)])['body'](_0xafae2d)[_0x14f8e9(0xc8)](_0x14f8e9(0xd3)+_0x781ecd[_0x14f8e9(0xe7)]+'\x20on\x20dataset\x20'+_0x3ca87c)[_0x14f8e9(0xa7)]();}),_0x1eada4;}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0x4cfefb,_0x9b7e3a){const _0x553f0b=a25_0x1fba5b;return{'operation':'update','mode':_0x553f0b(0x100),'ids':_0x4cfefb,'total':_0x4cfefb[_0x553f0b(0xd4)],'result':_0x9b7e3a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a26_0x42425f=a26_0x1568;(function(_0x22b46f,_0x4bc330){const _0x5976bd=a26_0x1568,_0x55545a=_0x22b46f();while(!![]){try{const _0x494208=-parseInt(_0x5976bd(0x178))/0x1*(parseInt(_0x5976bd(0x159))/0x2)+parseInt(_0x5976bd(0x189))/0x3+-parseInt(_0x5976bd(0x188))/0x4*(-parseInt(_0x5976bd(0x161))/0x5)+parseInt(_0x5976bd(0x182))/0x6*(parseInt(_0x5976bd(0x18d))/0x7)+-parseInt(_0x5976bd(0x19f))/0x8*(parseInt(_0x5976bd(0x15a))/0x9)+parseInt(_0x5976bd(0x195))/0xa+-parseInt(_0x5976bd(0x170))/0xb*(parseInt(_0x5976bd(0x19d))/0xc);if(_0x494208===_0x4bc330)break;else _0x55545a['push'](_0x55545a['shift']());}catch(_0x499741){_0x55545a['push'](_0x55545a['shift']());}}}(a26_0x25cd,0xee89e));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x5e0dc1){const _0x210719=a26_0x1568;if(_0x5e0dc1['deleted'])return null;const _0x452830=Boolean(_0x5e0dc1[_0x210719(0x19a)]!==undefined||_0x5e0dc1['doType']!==undefined);let _0x2fa765={};if(!_0x452830&&typeof _0x5e0dc1[_0x210719(0x169)]===_0x210719(0x166))try{_0x2fa765=JSON[_0x210719(0x18c)](_0x5e0dc1['extend']);}catch{}const _0x4e2e5b=_0x452830?_0x5e0dc1[_0x210719(0x192)]:_0x5e0dc1['code'],_0x524e85=_0x452830?_0x5e0dc1[_0x210719(0x19a)]:_0x5e0dc1[_0x210719(0x192)],_0x38eaf1=_0x452830?_0x5e0dc1[_0x210719(0x17c)]:_0x5e0dc1[_0x210719(0x184)]||_0x5e0dc1[_0x210719(0x190)],_0x6d33b9=_0x452830?_0x5e0dc1[_0x210719(0x175)]===!![]:_0x2fa765[_0x210719(0x175)]===!![],_0x43801e=_0x452830?_0x5e0dc1['required']===!![]:_0x2fa765['required']===!![],_0x362ce3=_0x452830?_0x5e0dc1[_0x210719(0x15d)]??null:_0x2fa765[_0x210719(0x15d)]??null,_0x480307={'name':_0x4e2e5b,'displayName':_0x524e85||_0x4e2e5b,'type':_0x38eaf1,'dbType':_0x5e0dc1[_0x210719(0x15e)],'pk':_0x6d33b9,'required':_0x43801e,'description':_0x5e0dc1[_0x210719(0x172)]||undefined};return Array[_0x210719(0x186)](_0x362ce3)&&_0x362ce3[_0x210719(0x187)]>0x0&&(_0x480307['options']=_0x362ce3),_0x480307;}function parseJsonMaybe(_0x2daeb3){const _0x266b3f=a26_0x1568;if(typeof _0x2daeb3!==_0x266b3f(0x166))return _0x2daeb3;try{return JSON[_0x266b3f(0x18c)](_0x2daeb3);}catch{return _0x2daeb3;}}function normalizeOperationEntry(_0x35b9a8,_0x6b3ac9){const _0x57bf83=a26_0x1568;if(!_0x6b3ac9||typeof _0x6b3ac9!==_0x57bf83(0x196))return null;if(!_0x6b3ac9['method']||!_0x6b3ac9['path'])return null;const _0x24de55={'name':_0x35b9a8,'method':_0x6b3ac9[_0x57bf83(0x16b)],'path':_0x6b3ac9['path']};if(_0x6b3ac9[_0x57bf83(0x191)])_0x24de55['host']=_0x6b3ac9[_0x57bf83(0x191)];if(_0x6b3ac9[_0x57bf83(0x198)]!=null)_0x24de55[_0x57bf83(0x198)]=parseJsonMaybe(_0x6b3ac9['requestBody']);if(_0x6b3ac9[_0x57bf83(0x15c)]!=null)_0x24de55[_0x57bf83(0x15c)]=parseJsonMaybe(_0x6b3ac9[_0x57bf83(0x15c)]);if(_0x6b3ac9[_0x57bf83(0x18f)]!=null)_0x24de55[_0x57bf83(0x18f)]=_0x6b3ac9[_0x57bf83(0x18f)];if(_0x6b3ac9[_0x57bf83(0x180)]!=null)_0x24de55[_0x57bf83(0x180)]=_0x6b3ac9['afterScriptId'];if(Array[_0x57bf83(0x186)](_0x6b3ac9['requestFields']))_0x24de55[_0x57bf83(0x18a)]=_0x6b3ac9['requestFields'];if(Array[_0x57bf83(0x186)](_0x6b3ac9[_0x57bf83(0x165)]))_0x24de55['responseFields']=_0x6b3ac9['responseFields'];return _0x24de55;}function a26_0x25cd(){const _0x5d24ea=['9948186odTfpI','code','type','modelId','isArray','length','1985284aeTCqR','2234460DvhLPI','requestFields','columnCodeListWithDeleted','parse','7SGbksR','entries','beforeScriptId','dataType','host','name','modifierIdField','formatRules','18912210mqLIqh','object','allFields','requestBody','source','displayName','indexes','updateTimeField','60NqGWag','split','3339944rlieLC','map','logicField','tableName','67556SHCQBk','18DOBTzQ','filter','responseBody','options','dbType','datasetKey','dataset','5ghFfZN','doVersion','properties','appCode','responseFields','string','title','find','extend','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','method','sourceType','allFieldNames','labelField','relations','2762485UzmMJB','dbId','description','str','modifierNameField','pkField','operations','validateRules','51YLdLTU','dbtableConfig','fields','push','doType','read','relatedPageInfoList','trim','afterScriptId','dbName'];a26_0x25cd=function(){return _0x5d24ea;};return a26_0x25cd();}function summarizeDbtable(_0x52e78d){const _0x369ad6=a26_0x1568,_0x49324b={},_0xb9b82e=['dbId','dbName','tableName',_0x369ad6(0x15f),_0x369ad6(0x175),_0x369ad6(0x197),_0x369ad6(0x1a1),'createTimeField',_0x369ad6(0x19c),'creatorIdField','creatorNameField',_0x369ad6(0x193),_0x369ad6(0x174),_0x369ad6(0x16e),'dblinkInfoDTO'];for(const _0x436ed0 of _0xb9b82e){if(_0x52e78d[_0x436ed0]!==undefined)_0x49324b[_0x436ed0]=_0x52e78d[_0x436ed0];}return typeof _0x49324b[_0x369ad6(0x197)]===_0x369ad6(0x166)&&_0x49324b['allFields'][_0x369ad6(0x187)]>0x0&&(_0x49324b[_0x369ad6(0x16d)]=_0x49324b[_0x369ad6(0x197)]['split'](',')['map'](_0x2d45e6=>_0x2d45e6['trim']())[_0x369ad6(0x15b)](Boolean)),_0x49324b;}function normalizeRelatedPages(_0x478935){const _0x103bd1=a26_0x1568;if(!Array[_0x103bd1(0x186)](_0x478935))return[];return _0x478935['filter'](_0x24d956=>_0x24d956&&typeof _0x24d956==='object')['map'](_0x5cb55a=>({'id':_0x5cb55a['id'],'type':_0x5cb55a[_0x103bd1(0x184)],'code':_0x5cb55a[_0x103bd1(0x183)],'title':_0x5cb55a[_0x103bd1(0x167)],'deleted':_0x5cb55a['deleted']===!![]}));}function normalizeFallbackFieldName(_0x33332f,_0x4b9bb4){const _0x4b3e6f=a26_0x1568,_0x1231c0=_0x33332f[_0x4b3e6f(0x17f)]();if(!_0x1231c0)return null;return{'name':_0x1231c0,'displayName':_0x1231c0,'type':undefined,'dbType':undefined,'pk':_0x1231c0===_0x4b9bb4,'required':![],'description':undefined};}function a26_0x1568(_0x5bc067,_0x118803){_0x5bc067=_0x5bc067-0x158;const _0x25cd5b=a26_0x25cd();let _0x156817=_0x25cd5b[_0x5bc067];return _0x156817;}async function loadListFieldFallback(_0x149ebc,_0x2c147a){const _0x281300=a26_0x1568;if(!_0x149ebc||!_0x2c147a)return[];try{const _0x3d9a0d=await listDatasets(_0x149ebc,{'code':_0x2c147a}),_0x4eae57=_0x3d9a0d[_0x281300(0x168)](_0x294006=>_0x294006[_0x281300(0x183)]===_0x2c147a)??_0x3d9a0d[0x0],_0x5cb28a=_0x4eae57?.[_0x281300(0x179)]??{},_0x2f69e1=typeof _0x5cb28a[_0x281300(0x197)]==='string'?_0x5cb28a[_0x281300(0x197)][_0x281300(0x19e)](','):[];return _0x2f69e1['map'](_0x18e613=>normalizeFallbackFieldName(_0x18e613,_0x5cb28a[_0x281300(0x175)]))[_0x281300(0x15b)](_0x44f8b2=>_0x44f8b2!==null);}catch{return[];}}export const datasetDetail={'service':a26_0x42425f(0x160),'command':'detail','description':a26_0x42425f(0x16a),'risk':a26_0x42425f(0x17d),'flags':[CODE_FLAG],async 'execute'(_0x41bee9){const _0x523d25=a26_0x42425f,_0x5e656a=await getDatasetDetail(_0x41bee9[_0x523d25(0x173)](_0x523d25(0x183))),_0x5ec3a9=Array[_0x523d25(0x186)](_0x5e656a[_0x523d25(0x17a)])?_0x5e656a[_0x523d25(0x17a)]:Array[_0x523d25(0x186)](_0x5e656a[_0x523d25(0x163)])?_0x5e656a[_0x523d25(0x163)]:[];let _0x16c6b6=_0x5ec3a9[_0x523d25(0x1a0)](_0x917dc5=>normalizeField(_0x917dc5))[_0x523d25(0x15b)](_0xfcce52=>_0xfcce52!==null);_0x16c6b6[_0x523d25(0x187)]===0x0&&(_0x16c6b6=await loadListFieldFallback(_0x41bee9[_0x523d25(0x164)],_0x41bee9[_0x523d25(0x173)](_0x523d25(0x183))));const _0x49ee14=_0x5e656a[_0x523d25(0x176)]??{},_0xc040c4=[];for(const [_0x1e4b01,_0x5f2006]of Object[_0x523d25(0x18e)](_0x49ee14)){const _0x1c3db3=normalizeOperationEntry(_0x1e4b01,_0x5f2006);if(_0x1c3db3)_0xc040c4[_0x523d25(0x17b)](_0x1c3db3);}const _0x110108=_0x5e656a['dbtableConfig']??{},_0x21187a=_0x5e656a['dataset']??{},_0x21e9f8=_0x110108[_0x523d25(0x171)]!=null?{'id':_0x110108[_0x523d25(0x171)],'name':_0x110108[_0x523d25(0x181)]??null}:undefined;let _0x43745f;return typeof _0x5e656a[_0x523d25(0x169)]===_0x523d25(0x166)&&(_0x43745f=parseJsonMaybe(_0x5e656a[_0x523d25(0x169)])),{'ok':!![],'data':{'id':_0x5e656a[_0x523d25(0x185)]??_0x5e656a['id'],'name':_0x5e656a[_0x523d25(0x192)],'code':_0x5e656a['modelCode']||_0x5e656a[_0x523d25(0x183)],'doVersion':_0x5e656a[_0x523d25(0x162)],'description':_0x5e656a[_0x523d25(0x172)]||_0x21187a['tableComment']||undefined,'source':_0x5e656a[_0x523d25(0x199)]||_0x21187a[_0x523d25(0x16c)],'table':_0x110108[_0x523d25(0x158)]||_0x21187a[_0x523d25(0x158)],'datasetKey':_0x110108[_0x523d25(0x15f)],'pk':_0x110108['pkField'],'db':_0x21e9f8,'dbtable':summarizeDbtable(_0x110108),'fields':_0x16c6b6,'operations':_0xc040c4,'indexes':Array[_0x523d25(0x186)](_0x21187a['indexes'])?_0x21187a[_0x523d25(0x19b)]:[],'relations':_0x5e656a[_0x523d25(0x16f)]??null,'relatedPages':normalizeRelatedPages(_0x5e656a[_0x523d25(0x17e)]),...Array[_0x523d25(0x186)](_0x5e656a['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x5e656a[_0x523d25(0x18b)]}:{},'formatRules':Array[_0x523d25(0x186)](_0x5e656a['formatRules'])?_0x5e656a[_0x523d25(0x194)]:[],'validateRules':Array[_0x523d25(0x186)](_0x5e656a[_0x523d25(0x177)])?_0x5e656a[_0x523d25(0x177)]:[],..._0x43745f!==undefined?{'extend':_0x43745f}:{},'stats':{'fieldCount':_0x16c6b6[_0x523d25(0x187)],'operationCount':_0xc040c4[_0x523d25(0x187)]}}};}};
|