@lovrabet/lovrabet-cli 2.1.19-beta.1 → 2.1.19
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/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/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.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/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/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/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/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/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +2 -2
- package/lib/generated/build-info.js +1 -1
- package/lib/help.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/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/utils/apply-jq-filter.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
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x3328a0=a12_0x8539;(function(_0x381b83,_0x533a4d){const _0x288c14=a12_0x8539,_0x4ee8a0=_0x381b83();while(!![]){try{const _0x5bc1a0=parseInt(_0x288c14(0xfd))/0x1+-parseInt(_0x288c14(0xca))/0x2*(-parseInt(_0x288c14(0xc6))/0x3)+parseInt(_0x288c14(0xb3))/0x4+parseInt(_0x288c14(0xd1))/0x5*(parseInt(_0x288c14(0xc4))/0x6)+-parseInt(_0x288c14(0xee))/0x7+parseInt(_0x288c14(0xb7))/0x8+parseInt(_0x288c14(0xb0))/0x9*(-parseInt(_0x288c14(0xad))/0xa);if(_0x5bc1a0===_0x533a4d)break;else _0x4ee8a0['push'](_0x4ee8a0['shift']());}catch(_0x4687a9){_0x4ee8a0['push'](_0x4ee8a0['shift']());}}}(a12_0x5728,0x8c950));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a12_0x8539(_0x15ba0b,_0xcefc97){_0x15ba0b=_0x15ba0b-0xa2;const _0x572855=a12_0x5728();let _0x853940=_0x572855[_0x15ba0b];return _0x853940;}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';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x1e809b=a12_0x8539;writeCliSideChannelLine(_0x1e809b(0xb8)+PRODUCT_CONFIG[_0x1e809b(0xc2)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x53878a=a12_0x8539;return[_0x53878a(0xb8)+PRODUCT_CONFIG[_0x53878a(0xc2)]+':',USER_ACCESS_KEY_CREATE_URL,_0x53878a(0xfe)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x4dae7a){const _0x5085cc=a12_0x8539;return!_0x4dae7a[_0x5085cc(0xf7)]&&process[_0x5085cc(0xa4)]['isTTY']!==![]&&process[_0x5085cc(0xe7)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x5567cd){const _0x203603=a12_0x8539;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5567cd['bool']('global'),'explicitProject':_0x5567cd[_0x203603(0xb4)](_0x203603(0xe1)),'policy':_0x203603(0xb2)}));}function a12_0x5728(){const _0x29f4ee=['Status:\x20valid','trim','AccessKey\x20saved\x20to\x20','authRequired','validation','stdout','status','test','Clear\x20from\x20global\x20config\x20(default)','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','length','\x20config','7017304imcNWd','daily','\x20config.\x20Nothing\x20to\x20clear.','Read\x20from\x20global\x20config\x20(default)','slice','Invalid\x20accessKey\x20format:\x20\x22','boolean','accessKey','`auth\x20login`\x20does\x20not\x20support\x20--yes.','nonInteractive','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','access-key','ACCESS_KEY','Then\x20verify\x20with:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','195669PBVfJp','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Option\x20A:\x20','read','join','stdin','AccessKey\x20(ak_xxx...)','\x20doctor','\x20auth\x20status','str','project\x20config','string','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','info','2190ZYaJAP','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','production','28278wnUQYC','global','global-default','2217800DgytRb','bool','Show\x20current\x20authentication\x20status','code','5402472WFSJwb','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','newConfigFileName','\x20\x20export\x20','Option\x20B:\x20apps\x20config\x20(','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','global\x20config','logout','\x20config.','write','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','userCenterDisplayName','envName','263502lwPJhc','access_key','9bUzLtw','repeat','Auth\x20mode:\x20','development','414254WujfFT','ClientAk','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Write\x20to\x20global\x20config\x20(default)','=ak_xxx','\x20Verify:\x20','yes','25grkSAf','auth','Option\x20C:\x20environment\x20variable','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','push','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','AccessKey:\x20','env','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20Current\x20env:\x20','expired','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Shorthand\x20for\x20--access-key','\x20(via\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','scope','project'];a12_0x5728=function(){return _0x29f4ee;};return a12_0x5728();}async function resolveAuthWriteInput(_0x36d15c){const _0x3d1a0a=a12_0x8539;let _0x5bc8ae=(_0x36d15c['str'](_0x3d1a0a(0xf9))||_0x36d15c[_0x3d1a0a(0xa8)]('ak')||'')[_0x3d1a0a(0xe3)]();const _0x346a32=(_0x36d15c[_0x3d1a0a(0xa8)](_0x3d1a0a(0xd8))||'')['trim']();if(!_0x5bc8ae&&canPromptForAccessKey(_0x36d15c))try{showAccessKeyCreateHint(),_0x5bc8ae=await promptAccessKey('');}catch(_0x3bd595){if(isAbortPrompt(_0x3bd595))throw CliErrors['cancelled']();throw _0x3bd595;}if(!_0x5bc8ae)throw CliErrors['validation']('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x3d1a0a(0xe9)](_0x5bc8ae))throw CliErrors['validation'](_0x3d1a0a(0xf3)+_0x5bc8ae+'\x22',_0x3d1a0a(0xae));if(!_0x346a32)return{'accessKey':_0x5bc8ae};const _0x3bac04=normalizeEnv(_0x346a32);return{'accessKey':_0x5bc8ae,'env':isDaily(_0x3bac04)?_0x3d1a0a(0xef):isDev(_0x3bac04)?_0x3d1a0a(0xc9):_0x3d1a0a(0xaf)};}export const authDefinitions=[{'service':'auth','command':'login','description':a12_0x3328a0(0xab),'risk':a12_0x3328a0(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3328a0(0xf9),'type':a12_0x3328a0(0xaa),'description':a12_0x3328a0(0xa5)},{'name':'ak','type':a12_0x3328a0(0xaa),'description':a12_0x3328a0(0xdd)},{'name':a12_0x3328a0(0xb1),'type':a12_0x3328a0(0xf4),'description':a12_0x3328a0(0xcd),'default':!![]},{'name':a12_0x3328a0(0xe1),'type':a12_0x3328a0(0xf4),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x2e7c82){const _0x14e024=a12_0x3328a0;if(_0x2e7c82[_0x14e024(0xb4)](_0x14e024(0xd0)))throw CliErrors[_0x14e024(0xe6)](_0x14e024(0xf6),'Use\x20`'+CLI_BIN_NAME+_0x14e024(0xd9)+CLI_BIN_NAME+_0x14e024(0xeb));const _0xd2c1d3=(_0x2e7c82[_0x14e024(0xa8)](_0x14e024(0xf9))||_0x2e7c82[_0x14e024(0xa8)]('ak')||'')['trim']();if(!_0xd2c1d3&&_0x2e7c82[_0x14e024(0xf7)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x1d5688=await resolveAuthWriteInput(_0x2e7c82),_0x3b4d36=resolveAuthScopeFlags(_0x2e7c82),_0x1896cc=readScopedConfig(_0x3b4d36);_0x1896cc[_0x14e024(0xf5)]=_0x1d5688[_0x14e024(0xf5)];_0x1d5688[_0x14e024(0xd8)]&&(_0x1896cc[_0x14e024(0xd8)]=_0x1d5688['env']);writeScopedConfig(_0x1896cc,_0x3b4d36);const _0x548e50=_0x3b4d36[_0x14e024(0xb1)]?_0x14e024(0xb1):_0x14e024(0xe1),_0x26a176=_0x1896cc['env']?_0x14e024(0xda)+_0x1896cc[_0x14e024(0xd8)]+'.':'';return{'ok':!![],'message':_0x14e024(0xe4)+_0x548e50+_0x14e024(0xbf)+_0x26a176+_0x14e024(0xcf)+CLI_BIN_NAME+_0x14e024(0xa7)};}},{'service':'auth','command':'init','description':a12_0x3328a0(0xd4),'risk':a12_0x3328a0(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3328a0(0xf9),'type':'string','description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x3328a0(0xaa),'description':a12_0x3328a0(0xdd)},{'name':a12_0x3328a0(0xd8),'type':'string','description':a12_0x3328a0(0xf8)},{'name':a12_0x3328a0(0xb1),'type':'boolean','description':a12_0x3328a0(0xcd),'default':!![]},{'name':a12_0x3328a0(0xe1),'type':a12_0x3328a0(0xf4),'description':a12_0x3328a0(0xdc),'default':![]}],async 'execute'(_0x449555){const _0x471986=a12_0x3328a0,_0x5e7eb7=await resolveAuthWriteInput(_0x449555),_0x5e23df=resolveAuthScopeFlags(_0x449555),_0x3d5808={'accessKey':_0x5e7eb7[_0x471986(0xf5)]};_0x5e7eb7[_0x471986(0xd8)]&&(_0x3d5808['env']=_0x5e7eb7[_0x471986(0xd8)]);writeScopedConfig(_0x3d5808,_0x5e23df);const _0x1f7b20=_0x5e23df[_0x471986(0xb1)]?_0x471986(0xb1):_0x471986(0xe1),_0x3c6ba8=_0x3d5808[_0x471986(0xd8)]?'\x20Current\x20env:\x20'+_0x3d5808[_0x471986(0xd8)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x1f7b20+'\x20scope.'+_0x3c6ba8+_0x471986(0xcf)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a12_0x3328a0(0xd2),'command':a12_0x3328a0(0xbe),'description':'Clear\x20accessKey\x20from\x20config','risk':a12_0x3328a0(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3328a0(0xb1),'type':a12_0x3328a0(0xf4),'description':a12_0x3328a0(0xea),'default':!![]},{'name':a12_0x3328a0(0xe1),'type':a12_0x3328a0(0xf4),'description':a12_0x3328a0(0xbc),'default':![]}],async 'execute'(_0x2e9b13){const _0x3e6b71=a12_0x3328a0,_0x4bb288=resolveAuthScopeFlags(_0x2e9b13),_0x32a762=readScopedConfig(_0x4bb288),_0x57dfd2=!!_0x32a762[_0x3e6b71(0xf5)];delete _0x32a762[_0x3e6b71(0xf5)],writeScopedConfig(_0x32a762,_0x4bb288);const _0x2f3126=_0x4bb288[_0x3e6b71(0xb1)]?_0x3e6b71(0xb1):'project';if(_0x57dfd2)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x2f3126+_0x3e6b71(0xbf)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x2f3126+_0x3e6b71(0xf0)};}},{'service':a12_0x3328a0(0xd2),'command':a12_0x3328a0(0xe8),'description':a12_0x3328a0(0xb5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3328a0(0xb1),'type':a12_0x3328a0(0xf4),'description':a12_0x3328a0(0xf1),'default':!![]},{'name':'project','type':'boolean','description':a12_0x3328a0(0xfc),'default':![]},{'name':'check','type':a12_0x3328a0(0xf4),'description':a12_0x3328a0(0xd6),'default':![]}],async 'execute'(_0x24da8c){const _0x4eef42=a12_0x3328a0,_0x37aa71=resolveAuthScopeFlags(_0x24da8c),_0x2df037=readScopedConfig(_0x37aa71),_0xe1a290=productEnvName(_0x4eef42(0xfa)),_0x4bbf4b=productEnv(_0x4eef42(0xfa))||undefined,_0x4b0fd2=_0x2df037['accessKey']||undefined,_0x57aa12=_0x4bbf4b||_0x4b0fd2,_0x51897e=_0x4bbf4b?_0xe1a290+'\x20env\x20var':_0x4b0fd2?(_0x37aa71[_0x4eef42(0xb1)]?'global':'project')+_0x4eef42(0xed):null,_0x40f40b=[_0x4eef42(0xc8)+AUTH_MODE[_0x4eef42(0xcb)]];if(_0x57aa12){const _0x473967=_0x57aa12[_0x4eef42(0xec)]>0x8?''+_0x57aa12[_0x4eef42(0xf2)](0x0,0x8)+'*'[_0x4eef42(0xc7)](_0x57aa12[_0x4eef42(0xec)]-0x8):_0x57aa12;_0x40f40b['push'](_0x4eef42(0xd7)+_0x473967+(_0x51897e?_0x4eef42(0xde)+_0x51897e+')':'')),_0x40f40b[_0x4eef42(0xd5)](_0x4eef42(0xe2));}if(!_0x57aa12){_0x40f40b['push'](''),_0x40f40b[_0x4eef42(0xd5)](_0x4eef42(0xcc)),_0x40f40b[_0x4eef42(0xd5)](''),_0x40f40b[_0x4eef42(0xd5)](_0x4eef42(0xff)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x40f40b[_0x4eef42(0xd5)](''),_0x40f40b[_0x4eef42(0xd5)](_0x4eef42(0xbb)+PRODUCT_CONFIG[_0x4eef42(0xb9)]+')'),_0x40f40b['push']('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x40f40b[_0x4eef42(0xd5)](''),_0x40f40b[_0x4eef42(0xd5)](_0x4eef42(0xd3)),_0x40f40b[_0x4eef42(0xd5)](_0x4eef42(0xba)+_0xe1a290+_0x4eef42(0xce)),_0x40f40b['push'](''),_0x40f40b[_0x4eef42(0xd5)](_0x4eef42(0xfb)+CLI_BIN_NAME+_0x4eef42(0xa7)),_0x40f40b[_0x4eef42(0xd5)](_0x4eef42(0xdf)+CLI_BIN_NAME+_0x4eef42(0xa6));if(_0x24da8c[_0x4eef42(0xb4)]('check')){const _0x518144=readStoredDeviceCode();if(_0x518144&&!isStoredDeviceCodeExpired(_0x518144)){const _0x3d9d9d=getUserDomain(),_0x18f5f9=await fetchDeviceToken(_0x3d9d9d,_0x518144[_0x4eef42(0xb6)]);if(_0x18f5f9[_0x4eef42(0xe8)]==='success'&&_0x18f5f9[_0x4eef42(0xc5)]){const _0x59c5d2={'global':_0x518144['scope']===_0x4eef42(0xb1)},_0x212355=readScopedConfig(_0x59c5d2);_0x212355[_0x4eef42(0xf5)]=_0x18f5f9[_0x4eef42(0xc5)],writeScopedConfig(_0x212355,_0x59c5d2),deleteStoredDeviceCode();const _0x2534ea=_0x18f5f9[_0x4eef42(0xc5)],_0xe2967b=_0x2534ea[_0x4eef42(0xec)]>0x8?''+_0x2534ea[_0x4eef42(0xf2)](0x0,0x8)+'*'[_0x4eef42(0xc7)](_0x2534ea['length']-0x8):_0x2534ea,_0x7abc79=_0x518144[_0x4eef42(0xe0)]===_0x4eef42(0xb1)?_0x4eef42(0xbd):_0x4eef42(0xa9);return{'ok':!![],'message':[_0x4eef42(0xc8)+AUTH_MODE[_0x4eef42(0xcb)],_0x4eef42(0xd7)+_0xe2967b+_0x4eef42(0xde)+_0x7abc79+')',_0x4eef42(0xe2)][_0x4eef42(0xa3)]('\x0a')};}_0x18f5f9[_0x4eef42(0xe8)]===_0x4eef42(0xdb)&&deleteStoredDeviceCode();throw CliErrors[_0x4eef42(0xe5)](_0x4eef42(0xc1));}throw CliErrors[_0x4eef42(0xe5)](_0x40f40b[_0x4eef42(0xa3)]('\x0a'));}}return{'ok':!![],'message':_0x40f40b[_0x4eef42(0xa3)]('\x0a')};}},{'service':a12_0x3328a0(0xd2),'command':a12_0x3328a0(0xac),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a12_0x3328a0(0xa2),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x213e95){const _0xe6fe70=a12_0x3328a0,_0x58dd5e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x58dd5e,'meta':{'env':_0x213e95[_0xe6fe70(0xc3)]??'production'}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x1e4beb=a12_0x58d0;(function(_0x2b7cf9,_0x224631){const _0x5bb305=a12_0x58d0,_0x4f9c25=_0x2b7cf9();while(!![]){try{const _0x1650de=parseInt(_0x5bb305(0xdb))/0x1+parseInt(_0x5bb305(0xe7))/0x2*(parseInt(_0x5bb305(0xf2))/0x3)+parseInt(_0x5bb305(0x11a))/0x4+parseInt(_0x5bb305(0x115))/0x5*(-parseInt(_0x5bb305(0xdf))/0x6)+-parseInt(_0x5bb305(0xd9))/0x7+-parseInt(_0x5bb305(0xda))/0x8+-parseInt(_0x5bb305(0xf3))/0x9*(-parseInt(_0x5bb305(0xdc))/0xa);if(_0x1650de===_0x224631)break;else _0x4f9c25['push'](_0x4f9c25['shift']());}catch(_0x5d64ab){_0x4f9c25['push'](_0x4f9c25['shift']());}}}(a12_0x2a0d,0xb6f64));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';function a12_0x2a0d(){const _0x4912fd=['1402759FemDRa','10HIsuen','Auth\x20config\x20reinitialized\x20in\x20','validation','3606nHthAb','global\x20config','project\x20config','global','authRequired','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Invalid\x20accessKey\x20format:\x20\x22','Option\x20C:\x20environment\x20variable','52ReuLKI','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20doctor','write','push','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','scope','code','AccessKey\x20(ak_xxx...)','\x20config','\x20env\x20var','76098HMgRXu','2604078qXyFmv','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','AccessKey:\x20','No\x20AccessKey\x20found\x20in\x20','stdout','test','\x20Current\x20env:\x20','\x20scope.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','newConfigFileName','Use\x20`','\x20auth\x20status','slice','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','expired','length','bool','cancelled','info','Option\x20A:\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','repeat','userCenterDisplayName','ACCESS_KEY','read','env','global-default','isTTY','auth','ClientAk','Option\x20B:\x20apps\x20config\x20(','Auth\x20mode:\x20','\x20\x20export\x20','trim','5355FTtONC','accessKey','join','Read\x20from\x20global\x20config\x20(default)','AccessKey\x20cleared\x20from\x20','2636296YYGwHE','str','Write\x20to\x20global\x20config\x20(default)','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20auth\x20login\x20--access-key\x20<ak_xxx>','logout','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20Verify:\x20','nonInteractive','Shorthand\x20for\x20--access-key','login','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','string','Tip:\x20you\x20can\x20also\x20run:','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','status','=ak_xxx','daily','\x20config.\x20Nothing\x20to\x20clear.','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','access_key','Missing\x20accessKey.','AccessKey\x20saved\x20to\x20','access-key','Status:\x20valid','Then\x20verify\x20with:\x20','production','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','project','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','\x20(via\x20','boolean','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20config.','4732238FtScnc','7532592PUNCnS'];a12_0x2a0d=function(){return _0x4912fd;};return a12_0x2a0d();}import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';function a12_0x58d0(_0x467f81,_0x22b4e9){_0x467f81=_0x467f81-0xbd;const _0x2a0d73=a12_0x2a0d();let _0x58d007=_0x2a0d73[_0x467f81];return _0x58d007;}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x10afa1=a12_0x58d0;writeCliSideChannelLine(_0x10afa1(0xc3)+PRODUCT_CONFIG[_0x10afa1(0x109)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x10afa1(0xc2)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x10afa1(0x11f));}function buildAccessKeySetupGuide(){const _0x2e2684=a12_0x58d0;return[_0x2e2684(0xc3)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x2e2684(0x121)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x2a256e){const _0x13b4ee=a12_0x58d0;return!_0x2a256e[_0x13b4ee(0xbd)]&&process['stdin']['isTTY']!==![]&&process[_0x13b4ee(0xf7)][_0x13b4ee(0x10e)]!==![];}function resolveAuthScopeFlags(_0x5b79b9){const _0x4a89ff=a12_0x58d0;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5b79b9[_0x4a89ff(0x103)](_0x4a89ff(0xe2)),'explicitProject':_0x5b79b9['bool'](_0x4a89ff(0xd3)),'policy':_0x4a89ff(0x10d)}));}async function resolveAuthWriteInput(_0x2fc0ba){const _0x17a0d1=a12_0x58d0;let _0x384e06=(_0x2fc0ba['str'](_0x17a0d1(0xcd))||_0x2fc0ba[_0x17a0d1(0x11b)]('ak')||'')[_0x17a0d1(0x114)]();const _0x5ce850=(_0x2fc0ba[_0x17a0d1(0x11b)](_0x17a0d1(0x10c))||'')['trim']();if(!_0x384e06&&canPromptForAccessKey(_0x2fc0ba))try{showAccessKeyCreateHint(),_0x384e06=await promptAccessKey('');}catch(_0x4526d3){if(isAbortPrompt(_0x4526d3))throw CliErrors[_0x17a0d1(0x104)]();throw _0x4526d3;}if(!_0x384e06)throw CliErrors[_0x17a0d1(0xde)](_0x17a0d1(0xcb),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x17a0d1(0xf8)](_0x384e06))throw CliErrors[_0x17a0d1(0xde)](_0x17a0d1(0xe5)+_0x384e06+'\x22',_0x17a0d1(0x11d));if(!_0x5ce850)return{'accessKey':_0x384e06};const _0x4a8704=normalizeEnv(_0x5ce850);return{'accessKey':_0x384e06,'env':isDaily(_0x4a8704)?_0x17a0d1(0xc6):isDev(_0x4a8704)?'development':'production'};}export const authDefinitions=[{'service':a12_0x1e4beb(0x10f),'command':a12_0x1e4beb(0xbf),'description':a12_0x1e4beb(0xd4),'risk':a12_0x1e4beb(0xea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x1e4beb(0xcd),'type':a12_0x1e4beb(0xc1),'description':a12_0x1e4beb(0xef)},{'name':'ak','type':a12_0x1e4beb(0xc1),'description':a12_0x1e4beb(0xbe)},{'name':a12_0x1e4beb(0xe2),'type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0x11c),'default':!![]},{'name':'project','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xec),'default':![]}],async 'execute'(_0x27ed16){const _0x1e3040=a12_0x1e4beb;if(_0x27ed16[_0x1e3040(0x103)]('yes'))throw CliErrors[_0x1e3040(0xde)](_0x1e3040(0x107),_0x1e3040(0xfd)+CLI_BIN_NAME+_0x1e3040(0xc9)+CLI_BIN_NAME+_0x1e3040(0xfb));const _0xdf2880=(_0x27ed16[_0x1e3040(0x11b)](_0x1e3040(0xcd))||_0x27ed16['str']('ak')||'')[_0x1e3040(0x114)]();if(!_0xdf2880&&_0x27ed16[_0x1e3040(0xbd)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x59cd4d=await resolveAuthWriteInput(_0x27ed16),_0x44f8c4=resolveAuthScopeFlags(_0x27ed16),_0x5cece3=readScopedConfig(_0x44f8c4);_0x5cece3[_0x1e3040(0x116)]=_0x59cd4d[_0x1e3040(0x116)];_0x59cd4d['env']&&(_0x5cece3['env']=_0x59cd4d['env']);writeScopedConfig(_0x5cece3,_0x44f8c4);const _0x4b602c=_0x44f8c4[_0x1e3040(0xe2)]?_0x1e3040(0xe2):_0x1e3040(0xd3),_0x4e2d0a=_0x5cece3[_0x1e3040(0x10c)]?_0x1e3040(0xf9)+_0x5cece3[_0x1e3040(0x10c)]+'.':'';return{'ok':!![],'message':_0x1e3040(0xcc)+_0x4b602c+_0x1e3040(0xd8)+_0x4e2d0a+_0x1e3040(0x122)+CLI_BIN_NAME+_0x1e3040(0xfe)};}},{'service':a12_0x1e4beb(0x10f),'command':'init','description':a12_0x1e4beb(0x100),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x1e4beb(0xcd),'type':a12_0x1e4beb(0xc1),'description':a12_0x1e4beb(0xef)},{'name':'ak','type':'string','description':a12_0x1e4beb(0xbe)},{'name':a12_0x1e4beb(0x10c),'type':a12_0x1e4beb(0xc1),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':'global','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0x11c),'default':!![]},{'name':a12_0x1e4beb(0xd3),'type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xec),'default':![]}],async 'execute'(_0x495300){const _0xa8710=a12_0x1e4beb,_0x42feda=await resolveAuthWriteInput(_0x495300),_0xd89eae=resolveAuthScopeFlags(_0x495300),_0x1f64b9={'accessKey':_0x42feda[_0xa8710(0x116)]};_0x42feda[_0xa8710(0x10c)]&&(_0x1f64b9[_0xa8710(0x10c)]=_0x42feda['env']);writeScopedConfig(_0x1f64b9,_0xd89eae);const _0x835726=_0xd89eae['global']?_0xa8710(0xe2):_0xa8710(0xd3),_0x3a8542=_0x1f64b9[_0xa8710(0x10c)]?_0xa8710(0xf9)+_0x1f64b9['env']+'.':'';return{'ok':!![],'message':_0xa8710(0xdd)+_0x835726+_0xa8710(0xfa)+_0x3a8542+_0xa8710(0x122)+CLI_BIN_NAME+_0xa8710(0xfe)};}},{'service':a12_0x1e4beb(0x10f),'command':a12_0x1e4beb(0x120),'description':'Clear\x20accessKey\x20from\x20config','risk':a12_0x1e4beb(0xea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x1e4beb(0xe2),'type':a12_0x1e4beb(0xd6),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xc0),'default':![]}],async 'execute'(_0x5d810d){const _0x3c45a8=a12_0x1e4beb,_0x4cc67f=resolveAuthScopeFlags(_0x5d810d),_0x462db0=readScopedConfig(_0x4cc67f),_0x79e71a=!!_0x462db0[_0x3c45a8(0x116)];delete _0x462db0['accessKey'],writeScopedConfig(_0x462db0,_0x4cc67f);const _0x4e1e7a=_0x4cc67f[_0x3c45a8(0xe2)]?_0x3c45a8(0xe2):_0x3c45a8(0xd3);if(_0x79e71a)return{'ok':!![],'message':_0x3c45a8(0x119)+_0x4e1e7a+_0x3c45a8(0xd8)};return{'ok':!![],'message':_0x3c45a8(0xf6)+_0x4e1e7a+_0x3c45a8(0xc7)};}},{'service':a12_0x1e4beb(0x10f),'command':a12_0x1e4beb(0xc4),'description':'Show\x20current\x20authentication\x20status','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0x118),'default':!![]},{'name':a12_0x1e4beb(0xd3),'type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xe8),'default':![]},{'name':'check','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xd2),'default':![]}],async 'execute'(_0x26800c){const _0x179986=a12_0x1e4beb,_0x39b88=resolveAuthScopeFlags(_0x26800c),_0x57d555=readScopedConfig(_0x39b88),_0x236079=productEnvName(_0x179986(0x10a)),_0x4beba8=productEnv(_0x179986(0x10a))||undefined,_0x58872a=_0x57d555[_0x179986(0x116)]||undefined,_0x5263e3=_0x4beba8||_0x58872a,_0x27b1a0=_0x4beba8?_0x236079+_0x179986(0xf1):_0x58872a?(_0x39b88[_0x179986(0xe2)]?'global':'project')+_0x179986(0xf0):null,_0x172b89=[_0x179986(0x112)+AUTH_MODE['ClientAk']];if(_0x5263e3){const _0x36c1ac=_0x5263e3[_0x179986(0x102)]>0x8?''+_0x5263e3[_0x179986(0xff)](0x0,0x8)+'*'[_0x179986(0x108)](_0x5263e3[_0x179986(0x102)]-0x8):_0x5263e3;_0x172b89['push'](_0x179986(0xf5)+_0x36c1ac+(_0x27b1a0?_0x179986(0xd5)+_0x27b1a0+')':'')),_0x172b89[_0x179986(0xeb)](_0x179986(0xce));}if(!_0x5263e3){_0x172b89[_0x179986(0xeb)](''),_0x172b89[_0x179986(0xeb)](_0x179986(0xe4)),_0x172b89['push'](''),_0x172b89['push'](_0x179986(0x106)+CLI_BIN_NAME+_0x179986(0xd7)),_0x172b89['push'](''),_0x172b89[_0x179986(0xeb)](_0x179986(0x111)+PRODUCT_CONFIG[_0x179986(0xfc)]+')'),_0x172b89[_0x179986(0xeb)](_0x179986(0xd1)),_0x172b89[_0x179986(0xeb)](''),_0x172b89[_0x179986(0xeb)](_0x179986(0xe6)),_0x172b89['push'](_0x179986(0x113)+_0x236079+_0x179986(0xc5)),_0x172b89['push'](''),_0x172b89[_0x179986(0xeb)](_0x179986(0xcf)+CLI_BIN_NAME+'\x20auth\x20status'),_0x172b89['push'](_0x179986(0xf4)+CLI_BIN_NAME+_0x179986(0xe9));if(_0x26800c[_0x179986(0x103)]('check')){const _0x3302dd=readStoredDeviceCode();if(_0x3302dd&&!isStoredDeviceCodeExpired(_0x3302dd)){const _0x5d35cb=getUserDomain(),_0x90d5c0=await fetchDeviceToken(_0x5d35cb,_0x3302dd[_0x179986(0xee)]);if(_0x90d5c0[_0x179986(0xc4)]==='success'&&_0x90d5c0[_0x179986(0xca)]){const _0x1eda51={'global':_0x3302dd['scope']==='global'},_0x57de45=readScopedConfig(_0x1eda51);_0x57de45[_0x179986(0x116)]=_0x90d5c0['access_key'],writeScopedConfig(_0x57de45,_0x1eda51),deleteStoredDeviceCode();const _0x1a7990=_0x90d5c0[_0x179986(0xca)],_0x382c2b=_0x1a7990[_0x179986(0x102)]>0x8?''+_0x1a7990['slice'](0x0,0x8)+'*'[_0x179986(0x108)](_0x1a7990[_0x179986(0x102)]-0x8):_0x1a7990,_0x5e9bb9=_0x3302dd[_0x179986(0xed)]==='global'?_0x179986(0xe0):_0x179986(0xe1);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE[_0x179986(0x110)],'AccessKey:\x20'+_0x382c2b+_0x179986(0xd5)+_0x5e9bb9+')','Status:\x20valid']['join']('\x0a')};}_0x90d5c0[_0x179986(0xc4)]===_0x179986(0x101)&&deleteStoredDeviceCode();throw CliErrors[_0x179986(0xe3)](_0x179986(0xc8));}throw CliErrors[_0x179986(0xe3)](_0x172b89[_0x179986(0x117)]('\x0a'));}}return{'ok':!![],'message':_0x172b89['join']('\x0a')};}},{'service':a12_0x1e4beb(0x10f),'command':a12_0x1e4beb(0x105),'description':a12_0x1e4beb(0x11e),'risk':a12_0x1e4beb(0x10b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1dd941){const _0x187ca3=a12_0x1e4beb,_0x1b2191=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x1b2191,'meta':{'env':_0x1dd941['envName']??_0x187ca3(0xd0)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27abfc,_0xe419ce){const _0xeb07ac=a13_0x4a50,_0x2ccbcf=_0x27abfc();while(!![]){try{const _0x30ebe0=parseInt(_0xeb07ac(0xfb))/0x1+-parseInt(_0xeb07ac(0xf9))/0x2+-parseInt(_0xeb07ac(0xf5))/0x3*(parseInt(_0xeb07ac(0xe9))/0x4)+parseInt(_0xeb07ac(0xf7))/0x5+parseInt(_0xeb07ac(0xf8))/0x6*(-parseInt(_0xeb07ac(0xf0))/0x7)+parseInt(_0xeb07ac(0xef))/0x8+parseInt(_0xeb07ac(0xfc))/0x9*(parseInt(_0xeb07ac(0xf1))/0xa);if(_0x30ebe0===_0xe419ce)break;else _0x2ccbcf['push'](_0x2ccbcf['shift']());}catch(_0x49f812){_0x2ccbcf['push'](_0x2ccbcf['shift']());}}}(a13_0xb597,0x1da68));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x1657bd=a13_0x4a50;super(_0x1657bd(0xee)),this[_0x1657bd(0xf4)]=_0x1657bd(0xf6);}}function a13_0x4a50(_0x2482b6,_0xed9c69){_0x2482b6=_0x2482b6-0xe7;const _0xb597a5=a13_0xb597();let _0x4a50c4=_0xb597a5[_0x2482b6];return _0x4a50c4;}function createSafeRl(){const _0x864d1c=createInterface({'input':process['stdin'],'output':process['stdout']});let _0x43e14c;const _0x1880da=new Promise((_0x2efc52,_0x282726)=>{const _0x5a9a61=a13_0x4a50;_0x43e14c=()=>{const _0x32b8e8=a13_0x4a50;_0x43e14c&&(_0x864d1c[_0x32b8e8(0xfa)](_0x32b8e8(0xeb),_0x43e14c),_0x43e14c=undefined);try{_0x864d1c['close']();}catch{}_0x282726(new AbortPrompt());},_0x864d1c[_0x5a9a61(0xe8)](_0x5a9a61(0xeb),_0x43e14c);}),_0x4839f9=()=>{const _0x55c0a1=a13_0x4a50;_0x43e14c&&(_0x864d1c[_0x55c0a1(0xfa)](_0x55c0a1(0xeb),_0x43e14c),_0x43e14c=undefined);try{_0x864d1c[_0x55c0a1(0xed)]();}catch{}};return{'rl':_0x864d1c,'abortPromise':_0x1880da,'disposeSuccess':_0x4839f9};}export async function promptAccessKey(_0x418e8d=''){const _0x5374c7=a13_0x4a50,{rl:_0x8d4397,abortPromise:_0x5909ec,disposeSuccess:_0x4a6906}=createSafeRl(),_0x38eaae=new Promise(_0x1253cd=>{const _0x3c5bf1=a13_0x4a50,_0xc335d2=_0x418e8d?_0x3c5bf1(0xe7)+_0x418e8d+_0x3c5bf1(0xea):_0x3c5bf1(0xf3);_0x8d4397['question'](_0xc335d2,_0x1f6bf5=>{const _0x929799=_0x3c5bf1;_0x4a6906(),_0x1253cd(_0x1f6bf5[_0x929799(0xf2)]()||_0x418e8d);});});return Promise[_0x5374c7(0xec)]([_0x38eaae,_0x5909ec]);}export function isAbortPrompt(_0x53c575){const _0x1bb241=a13_0x4a50;return _0x53c575 instanceof Error&&_0x53c575[_0x1bb241(0xf4)]===_0x1bb241(0xf6);}function a13_0xb597(){const _0x93f340=['AccessKey\x20(','once','8624fJeqgx','):\x20','SIGINT','race','close','User\x20aborted\x20prompt','1223768iHoFwC','39970oWPZHg','1136380kCjULh','trim','AccessKey\x20(paste\x20ak_...):\x20','name','42IoryvJ','AbortPrompt','613125xEQQUz','90ikuhDh','451078GdFPIv','removeListener','73587vwPjQA','9Fasvtm'];a13_0xb597=function(){return _0x93f340;};return a13_0xb597();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x320a58=a14_0x281d;(function(_0x8f935e,_0x4dfd01){const _0x35ec78=a14_0x281d,_0x49cf6e=_0x8f935e();while(!![]){try{const _0x12fedc=-parseInt(_0x35ec78(0x1a5))/0x1+-parseInt(_0x35ec78(0x1a0))/0x2+-parseInt(_0x35ec78(0x1a1))/0x3+parseInt(_0x35ec78(0x199))/0x4*(parseInt(_0x35ec78(0x1a3))/0x5)+-parseInt(_0x35ec78(0x196))/0x6+parseInt(_0x35ec78(0x19e))/0x7+parseInt(_0x35ec78(0x193))/0x8;if(_0x12fedc===_0x4dfd01)break;else _0x49cf6e['push'](_0x49cf6e['shift']());}catch(_0x3a1dc4){_0x49cf6e['push'](_0x49cf6e['shift']());}}}(a14_0x2741,0xd432b));import{getBffEndpointContract}from'../../core/api-client.js';function a14_0x2741(){const _0x4caaf8=['2920320NTKPIB','detail','BFF\x20function\x20name','4jlfbIG','gmtModified','read','description','bff','2191602tnMdjH','str','2216868DJdakD','3505395DScEwn','Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','5041145XzHtTc','version','38764AILYIb','functionName','18801848NTCZRn','appCode','name'];a14_0x2741=function(){return _0x4caaf8;};return a14_0x2741();}import{NAME_FLAG}from'../../commands/common/flags.js';function a14_0x281d(_0x55dba2,_0x5c916e){_0x55dba2=_0x55dba2-0x192;const _0x27417c=a14_0x2741();let _0x281db9=_0x27417c[_0x55dba2];return _0x281db9;}export const bffDetail={'service':a14_0x320a58(0x19d),'command':a14_0x320a58(0x197),'description':a14_0x320a58(0x1a2),'risk':a14_0x320a58(0x19b),'flags':[{...NAME_FLAG,'required':!![],'description':a14_0x320a58(0x198)}],async 'execute'(_0x1c054f){const _0x451dcf=a14_0x320a58,_0x101f47=await getBffEndpointContract(_0x1c054f[_0x451dcf(0x194)],_0x1c054f[_0x451dcf(0x19f)](_0x451dcf(0x195)));return{'ok':!![],'data':{'appCode':_0x101f47[_0x451dcf(0x194)],'functionName':_0x101f47[_0x451dcf(0x192)],'description':_0x101f47[_0x451dcf(0x19c)]||'(none)','version':_0x101f47[_0x451dcf(0x1a4)],'gmtModified':_0x101f47[_0x451dcf(0x19a)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x140884=a15_0x10e5;(function(_0x527de2,_0x13b57f){const _0x189151=a15_0x10e5,_0x2371a5=_0x527de2();while(!![]){try{const _0xca58b7=parseInt(_0x189151(0xc8))/0x1+parseInt(_0x189151(0xce))/0x2+parseInt(_0x189151(0xcc))/0x3+parseInt(_0x189151(0xd1))/0x4*(parseInt(_0x189151(0xca))/0x5)+parseInt(_0x189151(0xd0))/0x6+parseInt(_0x189151(0xd4))/0x7*(-parseInt(_0x189151(0xcf))/0x8)+parseInt(_0x189151(0xcb))/0x9*(-parseInt(_0x189151(0xc6))/0xa);if(_0xca58b7===_0x13b57f)break;else _0x2371a5['push'](_0x2371a5['shift']());}catch(_0x5c14b0){_0x2371a5['push'](_0x2371a5['shift']());}}}(a15_0x2345,0x7c063));function a15_0x10e5(_0xcbf140,_0x40ec28){_0xcbf140=_0xcbf140-0xc4;const _0x234529=a15_0x2345();let _0x10e5bb=_0x234529[_0xcbf140];return _0x10e5bb;}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_0x140884(0xc9),'command':a15_0x140884(0xd3),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a15_0x140884(0xc5),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x140884(0xcd)},PARAMS_FLAG],async 'execute'(_0x2da9a1){const _0x5de0b0=a15_0x140884,_0x38271a=parseJsonParams(_0x2da9a1[_0x5de0b0(0xc4)]('params')),_0x2d081a=Date['now'](),_0x4c7bd0=await executeSdkBff(_0x2da9a1[_0x5de0b0(0xc4)](_0x5de0b0(0xd2)),_0x38271a),_0x42118d=Date[_0x5de0b0(0xc7)]()-_0x2d081a;return{'ok':!![],'data':{'result':_0x4c7bd0,'elapsed':_0x42118d},'message':_0x5de0b0(0xd5)+_0x42118d+'ms'};}};function a15_0x2345(){const _0x4c542b=['BFF\x20executed\x20in\x20','str','read','2950tjGIpK','now','8709OGtkzi','bff','845TLWkCj','22239TYodcX','2414625krIoYi','BFF\x20function\x20name\x20to\x20execute','413712Qwhrdg','2348200ltrXft','2252718FEdWKU','17080tqmaTp','name','exec','21PcDcoG'];a15_0x2345=function(){return _0x4c542b;};return a15_0x2345();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a16_0xd20b(_0xf30cb6,_0x1229d8){_0xf30cb6=_0xf30cb6-0x1e0;const _0xa04956=a16_0xa049();let _0xd20b4=_0xa04956[_0xf30cb6];return _0xd20b4;}(function(_0x3cf15d,_0x2cff64){const _0x235e5f=a16_0xd20b,_0x380144=_0x3cf15d();while(!![]){try{const _0x1472bc=parseInt(_0x235e5f(0x1e5))/0x1*(-parseInt(_0x235e5f(0x1e8))/0x2)+-parseInt(_0x235e5f(0x1e1))/0x3*(parseInt(_0x235e5f(0x1e0))/0x4)+parseInt(_0x235e5f(0x1e6))/0x5+parseInt(_0x235e5f(0x1e4))/0x6+-parseInt(_0x235e5f(0x1e2))/0x7+-parseInt(_0x235e5f(0x1e7))/0x8+parseInt(_0x235e5f(0x1e3))/0x9;if(_0x1472bc===_0x2cff64)break;else _0x380144['push'](_0x380144['shift']());}catch(_0x140665){_0x380144['push'](_0x380144['shift']());}}}(a16_0xa049,0x92abc));import{bffDetail}from'../../commands/bff/detail.js';function a16_0xa049(){const _0x39bf8f=['3682784HGOkMr','14135184nxTQua','1907532GhfKzi','1LpXnHR','3602900QBKnwJ','3759736frmcsM','66860BMuCDa','4fNJMhS','2936415EewpxD'];a16_0xa049=function(){return _0x39bf8f;};return a16_0xa049();}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a17_0x2e79(_0x53998d,_0x529254){_0x53998d=_0x53998d-0x11e;const _0x52f389=a17_0x52f3();let _0x2e79d9=_0x52f389[_0x53998d];return _0x2e79d9;}const a17_0x500222=a17_0x2e79;function a17_0x52f3(){const _0x415a9a=['../../skills/npx-skills-add.js','5247090MCggoY','apiError','setLogPath','56661nOpMuK','inherit','write','pipe','602LJXdqG','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','\x20-g\x20-y)...','CLI\x20Built-in\x20Skill\x20installed','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','cli-skill','log','62442QdTIeA','Skipped\x20npx\x20(','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','unknown','8quFaGI','2855696NJxgML','cwd','info','\x20-g\x20-y','793593bGlzEA','911807lCNhyb','nonInteractive','3697125StIZfX','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','error','skipped','40KHPoxg'];a17_0x52f3=function(){return _0x415a9a;};return a17_0x52f3();}(function(_0x413465,_0x280e7c){const _0x4422d5=a17_0x2e79,_0x76270c=_0x413465();while(!![]){try{const _0xf0326f=parseInt(_0x4422d5(0x139))/0x1+parseInt(_0x4422d5(0x11e))/0x2*(-parseInt(_0x4422d5(0x123))/0x3)+parseInt(_0x4422d5(0x134))/0x4+parseInt(_0x4422d5(0x13b))/0x5+parseInt(_0x4422d5(0x12f))/0x6*(-parseInt(_0x4422d5(0x127))/0x7)+-parseInt(_0x4422d5(0x133))/0x8*(parseInt(_0x4422d5(0x138))/0x9)+-parseInt(_0x4422d5(0x120))/0xa;if(_0xf0326f===_0x280e7c)break;else _0x76270c['push'](_0x76270c['shift']());}catch(_0x1c2631){_0x76270c['push'](_0x76270c['shift']());}}}(a17_0x52f3,0x75128));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a17_0x500222(0x12d),'command':'install','description':a17_0x500222(0x13c),'risk':a17_0x500222(0x125),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4c3edb){const _0x2cf34d=a17_0x500222;logger[_0x2cf34d(0x122)](process[_0x2cf34d(0x135)]()),logger[_0x2cf34d(0x136)]('cli-skill-install',_0x2cf34d(0x128));const {LOVRABET_SKILL_SOURCE:_0x19937b,LOVRABET_SKIP_NPX_SKILLS_ENV:_0xd1161e,runNpxSkillsAddGlobal:_0x300047}=await import(_0x2cf34d(0x11f)),_0x49a913=_0x4c3edb[_0x2cf34d(0x13a)]?_0x2cf34d(0x126):_0x2cf34d(0x124);console[_0x2cf34d(0x12e)](_0x2cf34d(0x12c)+_0x19937b+_0x2cf34d(0x129));const _0x53646f=_0x300047(process['cwd'](),_0x19937b,{'stdio':_0x49a913});if(_0x53646f[_0x2cf34d(0x13e)])console['log'](_0x2cf34d(0x130)+_0xd1161e+_0x2cf34d(0x131));else{if(_0x53646f['ok'])console[_0x2cf34d(0x12e)](_0x2cf34d(0x12a));else throw CliErrors[_0x2cf34d(0x121)]('npx\x20skills\x20add\x20failed:\x20'+(_0x53646f[_0x2cf34d(0x13d)]||_0x2cf34d(0x132)),_0x2cf34d(0x12b)+_0x19937b+_0x2cf34d(0x137));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x124ebb,_0x27ec43){const _0x45a806=a18_0x3865,_0x270dc3=_0x124ebb();while(!![]){try{const _0x2707dd=parseInt(_0x45a806(0x196))/0x1*(-parseInt(_0x45a806(0x19b))/0x2)+-parseInt(_0x45a806(0x190))/0x3+parseInt(_0x45a806(0x1a4))/0x4*(parseInt(_0x45a806(0x19e))/0x5)+parseInt(_0x45a806(0x198))/0x6+-parseInt(_0x45a806(0x191))/0x7*(-parseInt(_0x45a806(0x19d))/0x8)+-parseInt(_0x45a806(0x1a1))/0x9*(parseInt(_0x45a806(0x193))/0xa)+parseInt(_0x45a806(0x1a5))/0xb*(parseInt(_0x45a806(0x19c))/0xc);if(_0x2707dd===_0x27ec43)break;else _0x270dc3['push'](_0x270dc3['shift']());}catch(_0xdf3fca){_0x270dc3['push'](_0x270dc3['shift']());}}}(a18_0x15f1,0x76d3b));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a18_0x15f1(){const _0x19342a=['global-default','4QBUnAp','39941RRrasH','\x20init`\x20first.','global','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','2740515kPLqXc','791AYuoxB','project','10ksMUuN','project-or-global-explicit','newConfigFileName','863579OdWMKx','Use\x20only\x20one\x20config\x20scope\x20flag.','4763232mnuJPa','inProject','Add\x20--global\x20to\x20write\x20to\x20~/','2DySIGh','4188xlHupF','7328yPkYgs','930065AzYwTi','\x20found).','Not\x20inside\x20a\x20project\x20(no\x20','781317dDvtyN','validation'];a18_0x15f1=function(){return _0x19342a;};return a18_0x15f1();}export{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a18_0x3865(_0x532d0b,_0x2462ed){_0x532d0b=_0x532d0b-0x18d;const _0x15f1b3=a18_0x15f1();let _0x3865c6=_0x15f1b3[_0x532d0b];return _0x3865c6;}export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x27b649){const _0x454ff0=a18_0x3865,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x2b7ccb}=_0x27b649;if(explicitGlobal&&explicitProject)throw CliErrors['validation'](_0x454ff0(0x18f),_0x454ff0(0x197));if(explicitGlobal)return _0x454ff0(0x18e);if(explicitProject)return'project';switch(_0x2b7ccb){case _0x454ff0(0x1a3):return _0x454ff0(0x18e);case'project-default':return _0x27b649[_0x454ff0(0x199)]??isInProject()?_0x454ff0(0x192):'global';case _0x454ff0(0x194):if(!(_0x27b649[_0x454ff0(0x199)]??isInProject()))throw CliErrors[_0x454ff0(0x1a2)](_0x454ff0(0x1a0)+PRODUCT_CONFIG[_0x454ff0(0x195)]+_0x454ff0(0x19f),_0x454ff0(0x19a)+PRODUCT_CONFIG[_0x454ff0(0x195)]+',\x20or\x20run\x20`'+CLI_BIN_NAME+_0x454ff0(0x18d));return _0x454ff0(0x192);}}export function toScopeFlags(_0x304820){const _0x42d00b=a18_0x3865;return{'global':_0x304820===_0x42d00b(0x18e)};}export function formatScopeLabel(_0x2ec9f3){const _0x37b28c=a18_0x3865;return _0x2ec9f3===_0x37b28c(0x18e)?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x352602,_0xfe6dbc){const _0x8840d=a19_0x1c16,_0x4fc882=_0x352602();while(!![]){try{const _0x8fe41d=parseInt(_0x8840d(0x103))/0x1*(parseInt(_0x8840d(0xf5))/0x2)+parseInt(_0x8840d(0xfb))/0x3+-parseInt(_0x8840d(0xf2))/0x4+-parseInt(_0x8840d(0xf1))/0x5*(-parseInt(_0x8840d(0x109))/0x6)+parseInt(_0x8840d(0xee))/0x7*(parseInt(_0x8840d(0x105))/0x8)+parseInt(_0x8840d(0xfe))/0x9*(parseInt(_0x8840d(0xf6))/0xa)+parseInt(_0x8840d(0x106))/0xb*(-parseInt(_0x8840d(0xf3))/0xc);if(_0x8fe41d===_0xfe6dbc)break;else _0x4fc882['push'](_0x4fc882['shift']());}catch(_0x5cd265){_0x4fc882['push'](_0x4fc882['shift']());}}}(a19_0x33c7,0xdacad));function a19_0x33c7(){const _0x3f119e=['5381116dcCwXG','3877224ZxmOpx','\x20are\x20mutually\x20exclusive\x20for\x20`','6kzXFUi','10CxOsmw','\x20is\x20required\x20for\x20`','Use\x20only\x20one\x20of:\x20','\x20is\x20allowed,\x20found:\x20','At\x20least\x20one\x20of\x20','1524732kKRqfS','Flags\x20','Exactly\x20one\x20of\x20','215721tAbwDt','filter','some','test','join','66919uJSqUu',':\x20expected\x20','8kJPUGw','55UnHUxi','validation','Invalid\x20--','6TZvubl','11332405eWHkJc','length','Provide\x20one\x20of:\x20','7525385sdfDPS'];a19_0x33c7=function(){return _0x3f119e;};return a19_0x33c7();}import{CliErrors}from'../../errors.js';function isSet(_0x17fef7,_0x2807ce){const _0x44b503=_0x17fef7['flag'](_0x2807ce);return _0x44b503!==undefined&&_0x44b503!==''&&_0x44b503!==![]&&_0x44b503!==0x0;}function fmtNames(_0x42ce63){const _0x275d1d=a19_0x1c16;return _0x42ce63['map'](_0x38ceda=>'--'+_0x38ceda)[_0x275d1d(0x102)](',\x20');}export function requireOneOf(_0x10c658,_0x58500f,_0x2982c1){const _0x5f305b=a19_0x1c16,_0xa79b69=_0x58500f[_0x5f305b(0xff)](_0x5b5e05=>isSet(_0x10c658,_0x5b5e05));if(_0xa79b69['length']!==0x1)throw CliErrors[_0x5f305b(0x107)](_0xa79b69[_0x5f305b(0xef)]===0x0?_0x5f305b(0xfd)+fmtNames(_0x58500f)+'\x20is\x20required\x20for\x20`'+_0x2982c1+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x58500f)+_0x5f305b(0xf9)+fmtNames(_0xa79b69)+'.',_0xa79b69[_0x5f305b(0xef)]===0x0?_0x5f305b(0xf0)+fmtNames(_0x58500f):'Remove\x20all\x20but\x20one.');}function a19_0x1c16(_0x4f1869,_0x245f56){_0x4f1869=_0x4f1869-0xee;const _0x33c7a0=a19_0x33c7();let _0x1c16e9=_0x33c7a0[_0x4f1869];return _0x1c16e9;}export function requireAnyOf(_0x44ae28,_0x5e169e,_0x501c9f){const _0xd268f2=a19_0x1c16;if(!_0x5e169e[_0xd268f2(0x100)](_0x48f415=>isSet(_0x44ae28,_0x48f415)))throw CliErrors[_0xd268f2(0x107)](_0xd268f2(0xfa)+fmtNames(_0x5e169e)+_0xd268f2(0xf7)+_0x501c9f+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x5e169e));}export function mutuallyExclusive(_0x5f5a3c,_0x56287f,_0x191b28){const _0x1157f0=a19_0x1c16,_0x30aa35=_0x56287f['filter'](_0x590cf8=>isSet(_0x5f5a3c,_0x590cf8));if(_0x30aa35[_0x1157f0(0xef)]>0x1)throw CliErrors[_0x1157f0(0x107)](_0x1157f0(0xfc)+fmtNames(_0x30aa35)+_0x1157f0(0xf4)+_0x191b28+'`.',_0x1157f0(0xf8)+fmtNames(_0x56287f));}export function validatePattern(_0x4109d1,_0x4e1e1,_0xe01c03,_0x54694e){const _0x5cc60d=a19_0x1c16,_0x43c9c3=_0x4109d1['str'](_0x4e1e1);if(_0x43c9c3&&!_0xe01c03[_0x5cc60d(0x101)](_0x43c9c3))throw CliErrors[_0x5cc60d(0x107)](_0x5cc60d(0x108)+_0x4e1e1+_0x5cc60d(0x104)+_0x54694e+',\x20got\x20\x22'+_0x43c9c3+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a20_0x46b6(_0x5e01ae,_0x16974d){_0x5e01ae=_0x5e01ae-0x16b;const _0x41005a=a20_0x4100();let _0x46b6ac=_0x41005a[_0x5e01ae];return _0x46b6ac;}const a20_0x30684f=a20_0x46b6;(function(_0xb3b59c,_0x161ab4){const _0x3fc7cb=a20_0x46b6,_0x519b0b=_0xb3b59c();while(!![]){try{const _0x3a4c04=parseInt(_0x3fc7cb(0x181))/0x1+-parseInt(_0x3fc7cb(0x17c))/0x2*(parseInt(_0x3fc7cb(0x173))/0x3)+-parseInt(_0x3fc7cb(0x180))/0x4*(-parseInt(_0x3fc7cb(0x182))/0x5)+parseInt(_0x3fc7cb(0x171))/0x6*(-parseInt(_0x3fc7cb(0x17a))/0x7)+-parseInt(_0x3fc7cb(0x17b))/0x8+parseInt(_0x3fc7cb(0x177))/0x9*(parseInt(_0x3fc7cb(0x16c))/0xa)+-parseInt(_0x3fc7cb(0x176))/0xb;if(_0x3a4c04===_0x161ab4)break;else _0x519b0b['push'](_0x519b0b['shift']());}catch(_0x22b492){_0x519b0b['push'](_0x519b0b['shift']());}}}(a20_0x4100,0xd4475));export const CODE_FLAG={'name':a20_0x30684f(0x17f),'type':'string','required':!![],'description':a20_0x30684f(0x179),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a20_0x30684f(0x174)}};export const SQLCODE_FLAG={'name':a20_0x30684f(0x16b),'type':a20_0x30684f(0x17d),'required':!![],'description':a20_0x30684f(0x16f),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x30684f(0x172)}};export const VERBOSE_FLAG={'name':a20_0x30684f(0x183),'type':'boolean','description':'Return\x20full\x20raw\x20response\x20object'};function a20_0x4100(){const _0x358b5d=['Dataset\x20code\x20(32-char\x20hex\x20UUID)','91WocKwi','1193136mITzeL','465330SMwbNw','string','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','code','4NBzDBn','1490198zDpkka','5373545Ojtcdu','verbose','sqlcode','962470HNlmTE','Resource\x20name\x20for\x20lookup','number','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','params','164928hFhvEK','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','6KbyvJY','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','name','19605465yUMCkg','99MTBYhk','Resource\x20ID'];a20_0x4100=function(){return _0x358b5d;};return a20_0x4100();}export const PARAMS_FLAG={'name':a20_0x30684f(0x170),'type':'string','description':a20_0x30684f(0x17e)};export const NAME_FLAG={'name':a20_0x30684f(0x175),'type':a20_0x30684f(0x17d),'description':a20_0x30684f(0x16d)};export const ID_FLAG={'name':'id','type':a20_0x30684f(0x16e),'required':!![],'description':a20_0x30684f(0x178)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d0948,_0x59f6cc){const _0x444380=a21_0x169d,_0x47d09e=_0x4d0948();while(!![]){try{const _0x1cc9b5=-parseInt(_0x444380(0x7f))/0x1*(-parseInt(_0x444380(0x7c))/0x2)+-parseInt(_0x444380(0x7b))/0x3+-parseInt(_0x444380(0x72))/0x4+parseInt(_0x444380(0x78))/0x5*(-parseInt(_0x444380(0x74))/0x6)+parseInt(_0x444380(0x7d))/0x7*(-parseInt(_0x444380(0x81))/0x8)+parseInt(_0x444380(0x79))/0x9+-parseInt(_0x444380(0x77))/0xa*(-parseInt(_0x444380(0x75))/0xb);if(_0x1cc9b5===_0x59f6cc)break;else _0x47d09e['push'](_0x47d09e['shift']());}catch(_0x4334eb){_0x47d09e['push'](_0x47d09e['shift']());}}}(a21_0x184b,0x74b10));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a21_0x184b(){const _0x1f6279=['7894503lrLSTj','size','2562240uPjtHa','206ZrINEb','267694GTVfsC','validation','2507DcWNmU','File\x20not\x20found:\x20','48VPrJgr','trim','isFile','ceil','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','3070596gxTYRj','\x20MB','1400706BSyVXy','4213tVCDkb','File\x20is\x20not\x20a\x20regular\x20file:\x20','55550VldeRD','20dJCjNB'];a21_0x184b=function(){return _0x1f6279;};return a21_0x184b();}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a21_0x169d(_0x23fecf,_0x21aed6){_0x23fecf=_0x23fecf-0x6e;const _0x184b08=a21_0x184b();let _0x169d71=_0x184b08[_0x23fecf];return _0x169d71;}function formatBytes(_0x1d8348){const _0x1c95e4=a21_0x169d;if(_0x1d8348>=BYTES_PER_MB){const _0x1ab880=Math[_0x1c95e4(0x70)](_0x1d8348/BYTES_PER_MB*0x64)/0x64;return _0x1ab880['toFixed'](0x2)+_0x1c95e4(0x73);}return _0x1d8348+'\x20B';}export function requireRuntimeUploadFile(_0x157b92,_0x1b34eb){const _0x25d0f8=a21_0x169d,_0x28cd5f=_0x157b92[_0x25d0f8(0x6e)]();if(!_0x28cd5f)throw CliErrors['validation'](_0x1b34eb+'\x20path\x20is\x20required.');if(!existsSync(_0x28cd5f))throw CliErrors[_0x25d0f8(0x7e)](_0x25d0f8(0x80)+_0x28cd5f);const _0x19cd0d=statSync(_0x28cd5f);if(!_0x19cd0d[_0x25d0f8(0x6f)]())throw CliErrors[_0x25d0f8(0x7e)](_0x25d0f8(0x76)+_0x28cd5f);if(_0x19cd0d[_0x25d0f8(0x7a)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x25d0f8(0x7e)](_0x25d0f8(0x71)+_0x28cd5f+'\x20('+formatBytes(_0x19cd0d[_0x25d0f8(0x7a)])+')');return{'path':_0x28cd5f,'size':_0x19cd0d[_0x25d0f8(0x7a)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x16b394=a22_0xd224;function a22_0x3307(){const _0x30e796=['`\x20=\x20\x22','list','Invalid\x20value\x20for\x20\x22','\x20config\x20set\x20<key>\x20<value>\x20[--global]','\x20config\x20get\x20<key>','stringify','value','../../context.js','riskLevel','raw','5254551hRUstE','config','trim','Value\x20to\x20assign','global','Key\x20not\x20found:\x20','Key\x20\x22','(none)','isArray','1938936FuiyTy','args','validation','\x22\x20not\x20found\x20at\x20top\x20level.','apps','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20(global)',';\x20apps.<alias>.appcode','Missing\x20key\x20argument.','key','Get\x20a\x20config\x20value','field','bool','Write\x20to\x20global\x20config','project-or-global-explicit','Config\x20files:\x0a','10IJDdZv','\x20\x20project:\x20','Set\x20a\x20config\x20value','1484620OmSDSY','Delete\x20a\x20config\x20value','includes','1468qpujup','423688VKZQjf','\x22\x20is\x20not\x20settable.','boolean','pageSize\x20must\x20be\x20a\x20positive\x20number','List\x20current\x20config','Usage:\x20','split','get','length','format','appcode','alias','225837DKGqzM','7TuVXjD','log','3IbsxDW','81356basqVy','read','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','pageSize','object','write','Settable\x20keys:\x20','\x20\x20global:\x20\x20'];a22_0x3307=function(){return _0x30e796;};return a22_0x3307();}(function(_0x4a3627,_0x33fdd5){const _0xf2f552=a22_0xd224,_0x38e2fa=_0x4a3627();while(!![]){try{const _0x3b3504=parseInt(_0xf2f552(0x1ff))/0x1+parseInt(_0xf2f552(0x203))/0x2+parseInt(_0xf2f552(0x202))/0x3*(-parseInt(_0xf2f552(0x1f2))/0x4)+parseInt(_0xf2f552(0x1ef))/0x5+-parseInt(_0xf2f552(0x21e))/0x6*(-parseInt(_0xf2f552(0x200))/0x7)+-parseInt(_0xf2f552(0x1f3))/0x8+parseInt(_0xf2f552(0x215))/0x9*(-parseInt(_0xf2f552(0x1ec))/0xa);if(_0x3b3504===_0x33fdd5)break;else _0x38e2fa['push'](_0x38e2fa['shift']());}catch(_0x256213){_0x38e2fa['push'](_0x38e2fa['shift']());}}}(a22_0x3307,0x3ce54));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a22_0x16b394(0x219),'type':a22_0x16b394(0x1f5),'description':a22_0x16b394(0x1e9),'default':![]};function parseAliasAppcodeSetKey(_0x25f10d){const _0x1b4fd5=a22_0x16b394,_0x5a77a8=_0x25f10d[_0x1b4fd5(0x1f9)]('.');if(_0x5a77a8[_0x1b4fd5(0x1fb)]!==0x3||_0x5a77a8[0x0]!==_0x1b4fd5(0x222)||_0x5a77a8[0x2]!==_0x1b4fd5(0x1fd))return undefined;const _0x372c80=_0x5a77a8[0x1]?.[_0x1b4fd5(0x217)]();return _0x372c80?_0x372c80:undefined;}function parseAliasDeleteKey(_0x223e19){const _0x174ead=a22_0x16b394,_0x128044=_0x223e19[_0x174ead(0x1f9)]('.');if(_0x128044[_0x174ead(0x1fb)]===0x2&&_0x128044[0x0]===_0x174ead(0x222)){const _0x3aca25=_0x128044[0x1]?.[_0x174ead(0x217)]();return _0x3aca25?{'alias':_0x3aca25}:undefined;}if(_0x128044[_0x174ead(0x1fb)]===0x3&&_0x128044[0x0]===_0x174ead(0x222)&&_0x128044[0x2]===_0x174ead(0x1fd)){const _0x4c8b19=_0x128044[0x1]?.[_0x174ead(0x217)]();return _0x4c8b19?{'alias':_0x4c8b19,'field':_0x174ead(0x1fd)}:undefined;}return undefined;}function setLocalAppAlias(_0x5ac894,_0x20413f,_0x107753){const _0x3f7912=a22_0x16b394,_0x30c29b=_0x5ac894[_0x3f7912(0x222)]&&typeof _0x5ac894[_0x3f7912(0x222)]===_0x3f7912(0x207)&&!Array[_0x3f7912(0x21d)](_0x5ac894['apps'])?_0x5ac894[_0x3f7912(0x222)]:{},_0x8f3eac=_0x30c29b[_0x20413f]&&typeof _0x30c29b[_0x20413f]===_0x3f7912(0x207)&&!Array[_0x3f7912(0x21d)](_0x30c29b[_0x20413f])?_0x30c29b[_0x20413f]:{};_0x8f3eac[_0x3f7912(0x1fd)]=_0x107753,_0x30c29b[_0x20413f]=_0x8f3eac,_0x5ac894[_0x3f7912(0x222)]=_0x30c29b;}function a22_0xd224(_0x39d4ac,_0x3a8472){_0x39d4ac=_0x39d4ac-0x1e6;const _0x330782=a22_0x3307();let _0xd2242a=_0x330782[_0x39d4ac];return _0xd2242a;}function deleteLocalAppAlias(_0x2db0c2,_0x4c251d){const _0x2d8f42=a22_0x16b394;if(!_0x2db0c2[_0x2d8f42(0x222)]||typeof _0x2db0c2[_0x2d8f42(0x222)]!==_0x2d8f42(0x207)||Array[_0x2d8f42(0x21d)](_0x2db0c2['apps']))return![];const _0x475d7e=_0x2db0c2[_0x2d8f42(0x222)],_0x23c28b=_0x475d7e[_0x4c251d[_0x2d8f42(0x1fe)]];if(!_0x23c28b||typeof _0x23c28b!=='object'||Array[_0x2d8f42(0x21d)](_0x23c28b))return![];if(!_0x4c251d[_0x2d8f42(0x1e7)])return delete _0x475d7e[_0x4c251d[_0x2d8f42(0x1fe)]],!![];if(!(_0x4c251d[_0x2d8f42(0x1e7)]in _0x23c28b))return![];return delete _0x23c28b[_0x4c251d['field']],Object['keys'](_0x23c28b)['length']===0x0&&delete _0x475d7e[_0x4c251d[_0x2d8f42(0x1fe)]],!![];}const listDef={'service':a22_0x16b394(0x216),'command':a22_0x16b394(0x20c),'description':a22_0x16b394(0x1f7),'risk':a22_0x16b394(0x204),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x6e571b){const _0x24dfc1=a22_0x16b394,{buildConfigFromFlags:_0x42a8ae}=await import(_0x24dfc1(0x212)),_0x40f8b6=_0x42a8ae({}),_0x1f8e3c=getProjectConfigPath(),_0x3ce6aa=resolveWriteConfigPath(_0x24dfc1(0x219));if(_0x6e571b[_0x24dfc1(0x1fc)]==='pretty')return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON['stringify'](_0x40f8b6[_0x24dfc1(0x214)],null,0x2)+'\x0a\x0a')+_0x24dfc1(0x1eb)+(_0x24dfc1(0x1ed)+(_0x1f8e3c??_0x24dfc1(0x21c))+'\x0a')+(_0x24dfc1(0x20a)+_0x3ce6aa)};return{'ok':!![],'data':{'effective':_0x40f8b6[_0x24dfc1(0x214)],'configFiles':{'project':_0x1f8e3c??null,'global':_0x3ce6aa}}};}},getDef={'service':a22_0x16b394(0x216),'command':a22_0x16b394(0x1fa),'description':a22_0x16b394(0x1e6),'risk':a22_0x16b394(0x204),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x16b394(0x227),'description':a22_0x16b394(0x205),'required':!![]}],'flags':[],async 'execute'(_0x1255bd){const _0x42aae6=a22_0x16b394,_0x42b3fd=_0x1255bd['args'][0x0];if(!_0x42b3fd)throw CliErrors['validation'](_0x42aae6(0x226),'Usage:\x20'+CLI_BIN_NAME+_0x42aae6(0x20f));const {buildConfigFromFlags:_0x254105}=await import(_0x42aae6(0x212)),{raw:_0x445b25}=_0x254105({});if(_0x42b3fd[_0x42aae6(0x1f1)]('.')){const _0x49a993=_0x42b3fd[_0x42aae6(0x1f9)]('.');let _0x3a46f5=_0x445b25;for(const _0x35e6ff of _0x49a993){if(_0x3a46f5==null||typeof _0x3a46f5!=='object')throw CliErrors[_0x42aae6(0x220)](_0x42aae6(0x21a)+_0x42b3fd);_0x3a46f5=_0x3a46f5[_0x35e6ff];}if(_0x3a46f5===undefined)throw CliErrors[_0x42aae6(0x220)]('Key\x20not\x20found:\x20'+_0x42b3fd);return console['log'](typeof _0x3a46f5==='object'?JSON[_0x42aae6(0x210)](_0x3a46f5,null,0x2):String(_0x3a46f5)),{'ok':!![]};}const _0x40852b=_0x445b25[_0x42b3fd];if(_0x40852b===undefined)throw CliErrors[_0x42aae6(0x220)](_0x42aae6(0x21a)+_0x42b3fd);return console[_0x42aae6(0x201)](typeof _0x40852b===_0x42aae6(0x207)?JSON['stringify'](_0x40852b,null,0x2):String(_0x40852b)),{'ok':!![]};}},setDef={'service':a22_0x16b394(0x216),'command':'set','description':a22_0x16b394(0x1ee),'risk':a22_0x16b394(0x208),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x16b394(0x211),'description':a22_0x16b394(0x218),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x493d15){const _0xaadf49=a22_0x16b394,_0x5e88af=_0x493d15[_0xaadf49(0x21f)][0x0],_0x3e2aa5=_0x493d15[_0xaadf49(0x21f)][0x1];if(!_0x5e88af||_0x3e2aa5===undefined)throw CliErrors[_0xaadf49(0x220)]('Missing\x20key\x20or\x20value.',_0xaadf49(0x1f8)+CLI_BIN_NAME+_0xaadf49(0x20e));if(ENUM_KEYS[_0x5e88af]&&!ENUM_KEYS[_0x5e88af][_0xaadf49(0x1f1)](_0x3e2aa5))throw CliErrors[_0xaadf49(0x220)](_0xaadf49(0x20d)+_0x5e88af+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x5e88af]['join'](',\x20'));if(_0x5e88af===_0xaadf49(0x213))throw CliErrors[_0xaadf49(0x220)](_0xaadf49(0x223));if(_0x5e88af===_0xaadf49(0x206)){const _0x3d8070=Number(_0x3e2aa5);if(isNaN(_0x3d8070)||_0x3d8070<=0x0)throw CliErrors[_0xaadf49(0x220)](_0xaadf49(0x1f6));}const _0x58e842=resolveWriteScope({'explicitGlobal':_0x493d15[_0xaadf49(0x1e8)](_0xaadf49(0x219)),'policy':_0xaadf49(0x1ea)}),_0x33f929=toScopeFlags(_0x58e842),_0x25c28e=readScopedConfig(_0x33f929),_0x3def95=parseAliasAppcodeSetKey(_0x5e88af);if(!_0x3def95&&!isTopLevelConfigKey(_0x5e88af))throw CliErrors[_0xaadf49(0x220)]('Top-level\x20key\x20\x22'+_0x5e88af+_0xaadf49(0x1f4),_0xaadf49(0x209)+getTopLevelConfigKeySummary()+_0xaadf49(0x225));return _0x3def95?setLocalAppAlias(_0x25c28e,_0x3def95,_0x3e2aa5):_0x25c28e[_0x5e88af]=_0x5e88af===_0xaadf49(0x206)?Number(_0x3e2aa5):_0x3e2aa5,console[_0xaadf49(0x201)]('Set\x20`'+_0x5e88af+_0xaadf49(0x20b)+_0x3e2aa5+'\x22'+(_0x58e842===_0xaadf49(0x219)?'\x20(global)':'')),writeScopedConfig(_0x25c28e,_0x33f929),{'ok':!![]};}},deleteDef={'service':a22_0x16b394(0x216),'command':'delete','description':a22_0x16b394(0x1f0),'risk':a22_0x16b394(0x208),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x16b394(0x227),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3c5137){const _0x134c88=a22_0x16b394,_0x3c42a0=_0x3c5137[_0x134c88(0x21f)][0x0];if(!_0x3c42a0)throw CliErrors[_0x134c88(0x220)](_0x134c88(0x226),_0x134c88(0x1f8)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x344415=resolveWriteScope({'explicitGlobal':_0x3c5137[_0x134c88(0x1e8)](_0x134c88(0x219)),'policy':_0x134c88(0x1ea)}),_0x1bfac2=toScopeFlags(_0x344415),_0x355dec=readScopedConfig(_0x1bfac2),_0x5911ba=parseAliasDeleteKey(_0x3c42a0);if(_0x5911ba){if(!deleteLocalAppAlias(_0x355dec,_0x5911ba))throw CliErrors[_0x134c88(0x220)](_0x134c88(0x21a)+_0x3c42a0);return console[_0x134c88(0x201)]('Deleted\x20`'+_0x3c42a0+'`'+(_0x344415==='global'?_0x134c88(0x224):'')),writeScopedConfig(_0x355dec,_0x1bfac2),{'ok':!![]};}if(_0x355dec[_0x3c42a0]===undefined)throw CliErrors[_0x134c88(0x220)](_0x134c88(0x21b)+_0x3c42a0+_0x134c88(0x221));return delete _0x355dec[_0x3c42a0],console['log']('Deleted\x20`'+_0x3c42a0+'`'+(_0x344415===_0x134c88(0x219)?'\x20(global)':'')),writeScopedConfig(_0x355dec,_0x1bfac2),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x523d6b=a22_0x4ec7;(function(_0x1c78e9,_0x8d0d8c){const _0x5b9965=a22_0x4ec7,_0x471448=_0x1c78e9();while(!![]){try{const _0x15225c=parseInt(_0x5b9965(0xcd))/0x1+parseInt(_0x5b9965(0xda))/0x2+-parseInt(_0x5b9965(0xcf))/0x3+-parseInt(_0x5b9965(0xec))/0x4*(parseInt(_0x5b9965(0xc9))/0x5)+parseInt(_0x5b9965(0xe9))/0x6+-parseInt(_0x5b9965(0xc7))/0x7+-parseInt(_0x5b9965(0xea))/0x8;if(_0x15225c===_0x8d0d8c)break;else _0x471448['push'](_0x471448['shift']());}catch(_0x1cf52e){_0x471448['push'](_0x471448['shift']());}}}(a22_0x23ed,0xf1cc9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a22_0x523d6b(0xe3),'type':a22_0x523d6b(0xd4),'description':'Write\x20to\x20global\x20config','default':![]};function parseAliasAppcodeSetKey(_0x424235){const _0x4fc6b6=a22_0x523d6b,_0x482381=_0x424235[_0x4fc6b6(0xd5)]('.');if(_0x482381['length']!==0x3||_0x482381[0x0]!=='apps'||_0x482381[0x2]!=='appcode')return undefined;const _0x414aea=_0x482381[0x1]?.['trim']();return _0x414aea?_0x414aea:undefined;}function parseAliasDeleteKey(_0x34244e){const _0x2cec07=a22_0x523d6b,_0x3df9f9=_0x34244e[_0x2cec07(0xd5)]('.');if(_0x3df9f9['length']===0x2&&_0x3df9f9[0x0]===_0x2cec07(0xbe)){const _0x3f6f7b=_0x3df9f9[0x1]?.[_0x2cec07(0xc4)]();return _0x3f6f7b?{'alias':_0x3f6f7b}:undefined;}if(_0x3df9f9[_0x2cec07(0xdb)]===0x3&&_0x3df9f9[0x0]==='apps'&&_0x3df9f9[0x2]===_0x2cec07(0xbc)){const _0x4a030d=_0x3df9f9[0x1]?.[_0x2cec07(0xc4)]();return _0x4a030d?{'alias':_0x4a030d,'field':_0x2cec07(0xbc)}:undefined;}return undefined;}function setLocalAppAlias(_0x55fdd7,_0x9eea27,_0x1c2e97){const _0x5c4eea=a22_0x523d6b,_0x3a222f=_0x55fdd7[_0x5c4eea(0xbe)]&&typeof _0x55fdd7[_0x5c4eea(0xbe)]==='object'&&!Array[_0x5c4eea(0xe6)](_0x55fdd7[_0x5c4eea(0xbe)])?_0x55fdd7[_0x5c4eea(0xbe)]:{},_0x365379=_0x3a222f[_0x9eea27]&&typeof _0x3a222f[_0x9eea27]==='object'&&!Array[_0x5c4eea(0xe6)](_0x3a222f[_0x9eea27])?_0x3a222f[_0x9eea27]:{};_0x365379['appcode']=_0x1c2e97,_0x3a222f[_0x9eea27]=_0x365379,_0x55fdd7[_0x5c4eea(0xbe)]=_0x3a222f;}function deleteLocalAppAlias(_0x23c696,_0x526d4b){const _0x4c2dbc=a22_0x523d6b;if(!_0x23c696[_0x4c2dbc(0xbe)]||typeof _0x23c696[_0x4c2dbc(0xbe)]!==_0x4c2dbc(0xde)||Array['isArray'](_0x23c696[_0x4c2dbc(0xbe)]))return![];const _0x3159f4=_0x23c696[_0x4c2dbc(0xbe)],_0x7302a4=_0x3159f4[_0x526d4b['alias']];if(!_0x7302a4||typeof _0x7302a4!==_0x4c2dbc(0xde)||Array['isArray'](_0x7302a4))return![];if(!_0x526d4b[_0x4c2dbc(0xb2)])return delete _0x3159f4[_0x526d4b[_0x4c2dbc(0xc0)]],!![];if(!(_0x526d4b[_0x4c2dbc(0xb2)]in _0x7302a4))return![];return delete _0x7302a4[_0x526d4b[_0x4c2dbc(0xb2)]],Object[_0x4c2dbc(0xca)](_0x7302a4)[_0x4c2dbc(0xdb)]===0x0&&delete _0x3159f4[_0x526d4b[_0x4c2dbc(0xc0)]],!![];}function a22_0x4ec7(_0x1cb93a,_0x3b64bb){_0x1cb93a=_0x1cb93a-0xb0;const _0x23ed6d=a22_0x23ed();let _0x4ec7b8=_0x23ed6d[_0x1cb93a];return _0x4ec7b8;}function a22_0x23ed(){const _0x16d102=['Key\x20\x22','get','format','../../context.js','args','appcode','value','apps','\x20config\x20delete\x20<key>\x20[--global]','alias','\x20\x20project:\x20','Set\x20`',';\x20apps.<alias>.appcode','trim','Key\x20not\x20found:\x20','(none)','5725251DmwWht','log','220370EXfFys','keys','list','config','1889161GyKCSK','delete','2062569IkeCXC','Set\x20a\x20config\x20value','Get\x20a\x20config\x20value','Usage:\x20','Invalid\x20value\x20for\x20\x22','boolean','split','includes','validation','Deleted\x20`','project-or-global-explicit','1681934JMFkOw','length','Missing\x20key\x20argument.','Settable\x20keys:\x20','object','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Value\x20to\x20assign','raw','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','global','stringify','Config\x20files:\x0a','isArray','read','write','1616646FTFnnI','2972176KOzMnh','Delete\x20a\x20config\x20value','12AuPehn','Missing\x20key\x20or\x20value.','pretty','\x20\x20global:\x20\x20','pageSize\x20must\x20be\x20a\x20positive\x20number','key','\x20(global)','set','\x22.\x20Allowed:\x20','field','Top-level\x20key\x20\x22','pageSize','\x22\x20is\x20not\x20settable.','bool'];a22_0x23ed=function(){return _0x16d102;};return a22_0x23ed();}const listDef={'service':a22_0x523d6b(0xcc),'command':a22_0x523d6b(0xcb),'description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3d205a){const _0x4dfd73=a22_0x523d6b,{buildConfigFromFlags:_0x11c3d5}=await import(_0x4dfd73(0xba)),_0x45a114=_0x11c3d5({}),_0x14853b=getProjectConfigPath(),_0xf0325f=resolveWriteConfigPath('global');if(_0x3d205a[_0x4dfd73(0xb9)]===_0x4dfd73(0xee))return{'ok':!![],'message':_0x4dfd73(0xdf)+(JSON[_0x4dfd73(0xe4)](_0x45a114[_0x4dfd73(0xe1)],null,0x2)+'\x0a\x0a')+_0x4dfd73(0xe5)+(_0x4dfd73(0xc1)+(_0x14853b??_0x4dfd73(0xc6))+'\x0a')+(_0x4dfd73(0xef)+_0xf0325f)};return{'ok':!![],'data':{'effective':_0x45a114[_0x4dfd73(0xe1)],'configFiles':{'project':_0x14853b??null,'global':_0xf0325f}}};}},getDef={'service':'config','command':a22_0x523d6b(0xb8),'description':a22_0x523d6b(0xd1),'risk':a22_0x523d6b(0xe7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x523d6b(0xf1),'description':a22_0x523d6b(0xe2),'required':!![]}],'flags':[],async 'execute'(_0x3ab8aa){const _0x56c544=a22_0x523d6b,_0x532725=_0x3ab8aa[_0x56c544(0xbb)][0x0];if(!_0x532725)throw CliErrors[_0x56c544(0xd7)](_0x56c544(0xdc),_0x56c544(0xd2)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x1a4feb}=await import('../../context.js'),{raw:_0x3146ee}=_0x1a4feb({});if(_0x532725[_0x56c544(0xd6)]('.')){const _0x298328=_0x532725[_0x56c544(0xd5)]('.');let _0x41ed41=_0x3146ee;for(const _0x1ce661 of _0x298328){if(_0x41ed41==null||typeof _0x41ed41!==_0x56c544(0xde))throw CliErrors[_0x56c544(0xd7)]('Key\x20not\x20found:\x20'+_0x532725);_0x41ed41=_0x41ed41[_0x1ce661];}if(_0x41ed41===undefined)throw CliErrors['validation'](_0x56c544(0xc5)+_0x532725);return console['log'](typeof _0x41ed41===_0x56c544(0xde)?JSON[_0x56c544(0xe4)](_0x41ed41,null,0x2):String(_0x41ed41)),{'ok':!![]};}const _0x18af0e=_0x3146ee[_0x532725];if(_0x18af0e===undefined)throw CliErrors['validation'](_0x56c544(0xc5)+_0x532725);return console[_0x56c544(0xc8)](typeof _0x18af0e===_0x56c544(0xde)?JSON['stringify'](_0x18af0e,null,0x2):String(_0x18af0e)),{'ok':!![]};}},setDef={'service':a22_0x523d6b(0xcc),'command':a22_0x523d6b(0xb0),'description':a22_0x523d6b(0xd0),'risk':a22_0x523d6b(0xe8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x523d6b(0xbd),'description':a22_0x523d6b(0xe0),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1dc0a9){const _0x18d2e7=a22_0x523d6b,_0x35131e=_0x1dc0a9[_0x18d2e7(0xbb)][0x0],_0x5c5be4=_0x1dc0a9[_0x18d2e7(0xbb)][0x1];if(!_0x35131e||_0x5c5be4===undefined)throw CliErrors['validation'](_0x18d2e7(0xed),_0x18d2e7(0xd2)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x35131e]&&!ENUM_KEYS[_0x35131e][_0x18d2e7(0xd6)](_0x5c5be4))throw CliErrors['validation'](_0x18d2e7(0xd3)+_0x35131e+_0x18d2e7(0xb1)+ENUM_KEYS[_0x35131e]['join'](',\x20'));if(_0x35131e==='riskLevel')throw CliErrors[_0x18d2e7(0xd7)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x35131e===_0x18d2e7(0xb4)){const _0x2862a2=Number(_0x5c5be4);if(isNaN(_0x2862a2)||_0x2862a2<=0x0)throw CliErrors[_0x18d2e7(0xd7)](_0x18d2e7(0xf0));}const _0x5b8fa2=resolveWriteScope({'explicitGlobal':_0x1dc0a9[_0x18d2e7(0xb6)](_0x18d2e7(0xe3)),'policy':'project-or-global-explicit'}),_0x87cf47=toScopeFlags(_0x5b8fa2),_0x56ef49=readScopedConfig(_0x87cf47),_0x202797=parseAliasAppcodeSetKey(_0x35131e);if(!_0x202797&&!isTopLevelConfigKey(_0x35131e))throw CliErrors[_0x18d2e7(0xd7)](_0x18d2e7(0xb3)+_0x35131e+_0x18d2e7(0xb5),_0x18d2e7(0xdd)+getTopLevelConfigKeySummary()+_0x18d2e7(0xc3));return _0x202797?setLocalAppAlias(_0x56ef49,_0x202797,_0x5c5be4):_0x56ef49[_0x35131e]=_0x35131e===_0x18d2e7(0xb4)?Number(_0x5c5be4):_0x5c5be4,console[_0x18d2e7(0xc8)](_0x18d2e7(0xc2)+_0x35131e+'`\x20=\x20\x22'+_0x5c5be4+'\x22'+(_0x5b8fa2===_0x18d2e7(0xe3)?'\x20(global)':'')),writeScopedConfig(_0x56ef49,_0x87cf47),{'ok':!![]};}},deleteDef={'service':a22_0x523d6b(0xcc),'command':a22_0x523d6b(0xce),'description':a22_0x523d6b(0xeb),'risk':a22_0x523d6b(0xe8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3948fd){const _0x4251fe=a22_0x523d6b,_0x554a9b=_0x3948fd[_0x4251fe(0xbb)][0x0];if(!_0x554a9b)throw CliErrors[_0x4251fe(0xd7)](_0x4251fe(0xdc),_0x4251fe(0xd2)+CLI_BIN_NAME+_0x4251fe(0xbf));const _0x5c4177=resolveWriteScope({'explicitGlobal':_0x3948fd[_0x4251fe(0xb6)]('global'),'policy':_0x4251fe(0xd9)}),_0x13a37b=toScopeFlags(_0x5c4177),_0x56a5a8=readScopedConfig(_0x13a37b),_0x1b2514=parseAliasDeleteKey(_0x554a9b);if(_0x1b2514){if(!deleteLocalAppAlias(_0x56a5a8,_0x1b2514))throw CliErrors[_0x4251fe(0xd7)]('Key\x20not\x20found:\x20'+_0x554a9b);return console[_0x4251fe(0xc8)]('Deleted\x20`'+_0x554a9b+'`'+(_0x5c4177===_0x4251fe(0xe3)?'\x20(global)':'')),writeScopedConfig(_0x56a5a8,_0x13a37b),{'ok':!![]};}if(_0x56a5a8[_0x554a9b]===undefined)throw CliErrors[_0x4251fe(0xd7)](_0x4251fe(0xb7)+_0x554a9b+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x56a5a8[_0x554a9b],console['log'](_0x4251fe(0xd8)+_0x554a9b+'`'+(_0x5c4177===_0x4251fe(0xe3)?_0x4251fe(0xf2):'')),writeScopedConfig(_0x56a5a8,_0x13a37b),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57c97c,_0xacf983){var _0x1d4b9b=a23_0x4e37,_0x213eb7=_0x57c97c();while(!![]){try{var _0x475d92=-parseInt(_0x1d4b9b(0x1e6))/0x1*(-parseInt(_0x1d4b9b(0x1e5))/0x2)+parseInt(_0x1d4b9b(0x1e3))/0x3+-parseInt(_0x1d4b9b(0x1e8))/0x4+-parseInt(_0x1d4b9b(0x1e9))/0x5*(-parseInt(_0x1d4b9b(0x1e1))/0x6)+parseInt(_0x1d4b9b(0x1e7))/0x7+-parseInt(_0x1d4b9b(0x1e0))/0x8*(parseInt(_0x1d4b9b(0x1e2))/0x9)+parseInt(_0x1d4b9b(0x1e4))/0xa*(-parseInt(_0x1d4b9b(0x1df))/0xb);if(_0x475d92===_0xacf983)break;else _0x213eb7['push'](_0x213eb7['shift']());}catch(_0x8f299c){_0x213eb7['push'](_0x213eb7['shift']());}}}(a23_0x1d72,0x54114));function a23_0x1d72(){var _0x24ccbb=['1584840yrjmFS','8490oxvXkT','494GbZHfs','549bvOCPN','2786903bgWYRJ','261032xaBwZu','25QIUMYO','10736PritEY','8doflZR','329370HjngwZ','884385WVsNfL'];a23_0x1d72=function(){return _0x24ccbb;};return a23_0x1d72();}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a23_0x4e37(_0x15215d,_0x3b43a7){_0x15215d=_0x15215d-0x1df;var _0x1d727d=a23_0x1d72();var _0x4e37da=_0x1d727d[_0x15215d];return _0x4e37da;}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,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a24_0x1daadf=a24_0x1851;(function(_0x50607a,_0x65fbb4){const _0x23c269=a24_0x1851,_0x3aeee8=_0x50607a();while(!![]){try{const _0x25ef0b=-parseInt(_0x23c269(0x224))/0x1+parseInt(_0x23c269(0x21c))/0x2+-parseInt(_0x23c269(0x1fc))/0x3*(-parseInt(_0x23c269(0x1ee))/0x4)+parseInt(_0x23c269(0x1e6))/0x5*(parseInt(_0x23c269(0x1fd))/0x6)+parseInt(_0x23c269(0x1d0))/0x7+parseInt(_0x23c269(0x1fe))/0x8+-parseInt(_0x23c269(0x212))/0x9;if(_0x25ef0b===_0x65fbb4)break;else _0x3aeee8['push'](_0x3aeee8['shift']());}catch(_0x33282f){_0x3aeee8['push'](_0x3aeee8['shift']());}}}(a24_0x1ca3,0x529f9));import{executeData}from'../../core/sdk-client.js';function a24_0x1ca3(){const _0x113c77=['str','\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}}','1729956jrwXBk','map','\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}','batch','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','risk','code','\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}}','Preview:\x20data\x20','params','\x20completed\x20in\x20','\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}}','3caCOJS','1244628PlPQBR','3176368xycXQV','body','\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}}]}','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','dryRun','aggregate','Get\x20a\x20single\x20record\x20by\x20ID','join','filter','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','/api/{appCode}/','\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\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\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\x20EXAMPLES','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','update','8271846oIGLds','\x20\x20PARAMS\x20STRUCTURE','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','Filter\x20dataset\x20records\x20with\x20query\x20conditions','write','build','length','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Update\x20an\x20existing\x20record','now','614538DTZUKk','\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]}}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','high-risk-write','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','352230HXwFsP','POST','description','delete','batchCreate','1858549NRiiWE','\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','create','read','getOne','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20WHERE\x20OPERATORS','\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]','command','operation','\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\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','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20PAGINATION','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','data','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','5PxZcrI','data\x20','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','paramsRequired'];a24_0x1ca3=function(){return _0x113c77;};return a24_0x1ca3();}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':a24_0x1daadf(0x206),'operation':a24_0x1daadf(0x206),'risk':'read','paramsRequired':![],'description':a24_0x1daadf(0x215),'paramsHint':a24_0x1daadf(0x220)+a24_0x1daadf(0x219),'helpExtra':[a24_0x1daadf(0x1d7),'\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}}',a24_0x1daadf(0x20d),'\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}}',a24_0x1daadf(0x1fb),'\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}}',a24_0x1daadf(0x1ed),a24_0x1daadf(0x21d),a24_0x1daadf(0x1f7),a24_0x1daadf(0x222),a24_0x1daadf(0x221),'',a24_0x1daadf(0x207),a24_0x1daadf(0x20c),a24_0x1daadf(0x200),'',a24_0x1daadf(0x1e5),a24_0x1daadf(0x20a),a24_0x1daadf(0x1d8),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a24_0x1daadf(0x1ea),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a24_0x1daadf(0x1df),a24_0x1daadf(0x1f4),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a24_0x1daadf(0x1f2)][a24_0x1daadf(0x205)]('\x0a')},{'command':a24_0x1daadf(0x1d5),'operation':a24_0x1daadf(0x1d5),'risk':a24_0x1daadf(0x1d4),'paramsRequired':!![],'description':a24_0x1daadf(0x204),'paramsHint':a24_0x1daadf(0x21e)},{'command':a24_0x1daadf(0x1d3),'operation':a24_0x1daadf(0x1d3),'risk':a24_0x1daadf(0x216),'paramsRequired':!![],'description':a24_0x1daadf(0x223),'paramsHint':a24_0x1daadf(0x1dd)},{'command':a24_0x1daadf(0x1cf),'operation':'batchCreate','risk':'write','paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a24_0x1daadf(0x1e2)},{'command':a24_0x1daadf(0x211),'operation':'update','risk':a24_0x1daadf(0x216),'paramsRequired':!![],'description':a24_0x1daadf(0x21a),'paramsHint':a24_0x1daadf(0x214)+a24_0x1daadf(0x210)},{'command':'delete','operation':a24_0x1daadf(0x1ce),'risk':a24_0x1daadf(0x21f),'paramsRequired':!![],'description':a24_0x1daadf(0x1e0),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'aggregate','operation':a24_0x1daadf(0x203),'risk':a24_0x1daadf(0x1d4),'paramsRequired':![],'description':a24_0x1daadf(0x201),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+'Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':['\x20\x20AGGREGATE\x20TYPES',a24_0x1daadf(0x209),a24_0x1daadf(0x20e),a24_0x1daadf(0x1f0),a24_0x1daadf(0x1e9),a24_0x1daadf(0x1de),a24_0x1daadf(0x1d1),a24_0x1daadf(0x208),'',a24_0x1daadf(0x213),'\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]',a24_0x1daadf(0x1e4),a24_0x1daadf(0x1e1),'\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\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]',a24_0x1daadf(0x1e8),'',a24_0x1daadf(0x20f),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a24_0x1daadf(0x1db),'',a24_0x1daadf(0x1d6),a24_0x1daadf(0x1dc),'',a24_0x1daadf(0x1f3)][a24_0x1daadf(0x205)]('\x0a')}];function makeDataCommand(_0x56e8fc){const _0x3552ee=a24_0x1daadf,_0x1917f9=_0x3552ee(0x1e7)+_0x56e8fc[_0x3552ee(0x1d9)],_0x467c09={'service':_0x3552ee(0x1e3),'command':_0x56e8fc['command'],'description':_0x56e8fc[_0x3552ee(0x1cd)],'risk':_0x56e8fc[_0x3552ee(0x1f5)],'helpExtra':_0x56e8fc[_0x3552ee(0x1d2)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x56e8fc['paramsHint']}],'validate':async _0x32e614=>{const _0x40ca56=_0x3552ee;_0x56e8fc[_0x40ca56(0x1eb)]&&requireAnyOf(_0x32e614,['params'],_0x1917f9),_0x56e8fc[_0x40ca56(0x1da)]===_0x40ca56(0x1cf)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x32e614[_0x40ca56(0x1ec)]('params'))),_0x56e8fc[_0x40ca56(0x1da)]===_0x40ca56(0x211)&&parseUpdateIdsFromParams(parseJsonParams(_0x32e614[_0x40ca56(0x1ec)](_0x40ca56(0x1f9)))??{});},async 'execute'(_0x5910b6){const _0x1ac64b=_0x3552ee,_0xcc2bd=_0x5910b6[_0x1ac64b(0x1ec)](_0x1ac64b(0x1f6)),_0x5f4b14=_0x56e8fc[_0x1ac64b(0x1da)]===_0x1ac64b(0x1cf)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5910b6['str'](_0x1ac64b(0x1f9)))):parseJsonParams(_0x5910b6[_0x1ac64b(0x1ec)]('params'))??{},_0x335b44=_0x56e8fc['operation']===_0x1ac64b(0x211)?parseUpdateIdsFromParams(_0x5f4b14):undefined,_0x86a9d3=_0x335b44?normalizeUpdateParamsForRuntime(_0x5f4b14,_0x335b44):_0x5f4b14,_0x11b082=Date[_0x1ac64b(0x21b)](),_0x3e2469=await executeData(_0xcc2bd,_0x56e8fc[_0x1ac64b(0x1da)],_0x86a9d3),_0x2dfac0=Date[_0x1ac64b(0x21b)]()-_0x11b082,_0x14da9a=_0x335b44&&_0x335b44[_0x1ac64b(0x218)]>0x1?buildBatchUpdateResult(_0x335b44,_0x3e2469):_0x3e2469;return{'ok':!![],'data':{'result':_0x14da9a,'elapsed':_0x2dfac0},'message':_0x1ac64b(0x1e7)+_0x56e8fc[_0x1ac64b(0x1d9)]+_0x1ac64b(0x1fa)+_0x2dfac0+'ms'};}};return _0x56e8fc[_0x3552ee(0x1f5)]!==_0x3552ee(0x1d4)&&(_0x467c09[_0x3552ee(0x202)]=async _0x5c96f2=>{const _0x4fa3cb=_0x3552ee,_0x26c7fb=_0x5c96f2['str']('code'),_0x405795=_0x56e8fc[_0x4fa3cb(0x1da)]===_0x4fa3cb(0x1cf)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5c96f2[_0x4fa3cb(0x1ec)](_0x4fa3cb(0x1f9)))):parseJsonParams(_0x5c96f2['str'](_0x4fa3cb(0x1f9)))??{};let _0x4b9ddb=_0x405795;if(_0x56e8fc['operation']===_0x4fa3cb(0x211)){const _0x496f9b=parseUpdateIdsFromParams(_0x405795);_0x4b9ddb=normalizeUpdateParamsForRuntime(_0x405795,_0x496f9b);}return dryRun(_0x4fa3cb(0x1cc),_0x4fa3cb(0x20b)+_0x26c7fb+'/'+_0x56e8fc['operation'])[_0x4fa3cb(0x1ff)](_0x4b9ddb)[_0x4fa3cb(0x1cd)](_0x4fa3cb(0x1f8)+_0x56e8fc['command']+'\x20on\x20dataset\x20'+_0x26c7fb)[_0x4fa3cb(0x217)]();}),_0x467c09;}function a24_0x1851(_0x2e32ed,_0x13892a){_0x2e32ed=_0x2e32ed-0x1cc;const _0x1ca35f=a24_0x1ca3();let _0x18511a=_0x1ca35f[_0x2e32ed];return _0x18511a;}export const dataDefinitions=specs[a24_0x1daadf(0x1ef)](makeDataCommand);function buildBatchUpdateResult(_0x54480d,_0x1dec68){const _0x2fda36=a24_0x1daadf;return{'operation':'update','mode':_0x2fda36(0x1f1),'ids':_0x54480d,'total':_0x54480d[_0x2fda36(0x218)],'result':_0x1dec68};}
|
|
1
|
+
const a24_0x5da881=a24_0x1e4b;(function(_0x1ddf84,_0x3b7d74){const _0x213969=a24_0x1e4b,_0x45ef26=_0x1ddf84();while(!![]){try{const _0x7ce955=parseInt(_0x213969(0xf0))/0x1+-parseInt(_0x213969(0xd6))/0x2+-parseInt(_0x213969(0x104))/0x3+parseInt(_0x213969(0x119))/0x4+-parseInt(_0x213969(0xeb))/0x5*(-parseInt(_0x213969(0xd8))/0x6)+-parseInt(_0x213969(0xd3))/0x7+-parseInt(_0x213969(0x10d))/0x8*(-parseInt(_0x213969(0x114))/0x9);if(_0x7ce955===_0x3b7d74)break;else _0x45ef26['push'](_0x45ef26['shift']());}catch(_0x4849dd){_0x45ef26['push'](_0x45ef26['shift']());}}}(a24_0xc0c7,0xed5ac));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':a24_0x5da881(0x10a),'operation':a24_0x5da881(0x10a),'risk':a24_0x5da881(0x11d),'paramsRequired':![],'description':a24_0x5da881(0x103),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a24_0x5da881(0xe0),'helpExtra':[a24_0x5da881(0xf7),a24_0x5da881(0xf3),a24_0x5da881(0xfd),'\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}}','\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}}',a24_0x5da881(0x109),a24_0x5da881(0x118),a24_0x5da881(0xf1),a24_0x5da881(0xd9),a24_0x5da881(0xee),'',a24_0x5da881(0xe6),a24_0x5da881(0xe3),a24_0x5da881(0xf8),'',a24_0x5da881(0xd7),a24_0x5da881(0x11a),a24_0x5da881(0xf4),a24_0x5da881(0x10f),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a24_0x5da881(0x116),'',a24_0x5da881(0x111),a24_0x5da881(0xfb),a24_0x5da881(0x126),a24_0x5da881(0xcf)][a24_0x5da881(0x11b)]('\x0a')},{'command':'getOne','operation':'getOne','risk':'read','paramsRequired':!![],'description':a24_0x5da881(0xda),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x5da881(0x11e),'operation':a24_0x5da881(0x11e),'risk':a24_0x5da881(0xdc),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a24_0x5da881(0x115)},{'command':'batchCreate','operation':a24_0x5da881(0x117),'risk':a24_0x5da881(0xdc),'paramsRequired':!![],'description':a24_0x5da881(0xe7),'paramsHint':a24_0x5da881(0xdb)},{'command':a24_0x5da881(0x124),'operation':a24_0x5da881(0x124),'risk':a24_0x5da881(0xdc),'paramsRequired':!![],'description':a24_0x5da881(0xdd),'paramsHint':a24_0x5da881(0x11c)+a24_0x5da881(0xef)},{'command':a24_0x5da881(0xf2),'operation':a24_0x5da881(0xf2),'risk':a24_0x5da881(0x106),'paramsRequired':!![],'description':a24_0x5da881(0xec),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x5da881(0xfc),'operation':a24_0x5da881(0xfc),'risk':a24_0x5da881(0x11d),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a24_0x5da881(0x122)+a24_0x5da881(0x101),'helpExtra':[a24_0x5da881(0x108),a24_0x5da881(0x10b),a24_0x5da881(0xe1),a24_0x5da881(0xed),a24_0x5da881(0xd4),a24_0x5da881(0x113),a24_0x5da881(0x120),'\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a24_0x5da881(0x121),a24_0x5da881(0xf9),a24_0x5da881(0xde),a24_0x5da881(0x100),a24_0x5da881(0x10c),a24_0x5da881(0xd2),a24_0x5da881(0xe9),'',a24_0x5da881(0x110),a24_0x5da881(0xe8),a24_0x5da881(0xd5),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a24_0x5da881(0x11f),'',a24_0x5da881(0xff)][a24_0x5da881(0x11b)]('\x0a')}];function a24_0xc0c7(){const _0xfbe2ba=['body','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]','9835217nIZrVf','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','654664RCRkXU','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','3858cEUeaY','\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}}','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','write','Update\x20an\x20existing\x20record','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20completed\x20in\x20','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\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}','command','\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}}]}','build','operation','\x20\x20LOGICAL\x20COMBINATORS','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','map','7725AikLkg','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\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\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}}','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','307812qsHoIU','\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}}','delete','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','code','paramsRequired','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\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]','\x20on\x20dataset\x20','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','aggregate','\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}}','str','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','batch','Filter\x20dataset\x20records\x20with\x20query\x20conditions','2634018GAibwY','risk','high-risk-write','data','\x20\x20AGGREGATE\x20TYPES','\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}}','filter','\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\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','4485616iOOBBm','description','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20EXAMPLES','\x20\x20PAGINATION','/api/{appCode}/','\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}','18MPMFeS','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','batchCreate','\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]}}','4639688cIzkVx','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','join','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','read','create','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20PARAMS\x20STRUCTURE','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','now','update','params','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','length','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','data\x20'];a24_0xc0c7=function(){return _0xfbe2ba;};return a24_0xc0c7();}function makeDataCommand(_0x5ae584){const _0x5ad7b6=a24_0x5da881,_0x5203c0=_0x5ad7b6(0xd0)+_0x5ae584[_0x5ad7b6(0xe2)],_0x1c4a8e={'service':_0x5ad7b6(0x107),'command':_0x5ae584[_0x5ad7b6(0xe2)],'description':_0x5ae584[_0x5ad7b6(0x10e)],'risk':_0x5ae584['risk'],'helpExtra':_0x5ae584['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5ae584['paramsHint']}],'validate':async _0x52999a=>{const _0x434e7a=_0x5ad7b6;_0x5ae584[_0x434e7a(0xf6)]&&requireAnyOf(_0x52999a,[_0x434e7a(0x125)],_0x5203c0),_0x5ae584['operation']===_0x434e7a(0x117)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x52999a[_0x434e7a(0xfe)](_0x434e7a(0x125)))),_0x5ae584[_0x434e7a(0xe5)]===_0x434e7a(0x124)&&parseUpdateIdsFromParams(parseJsonParams(_0x52999a['str'](_0x434e7a(0x125)))??{});},async 'execute'(_0x535449){const _0xf927a=_0x5ad7b6,_0x3a1439=_0x535449[_0xf927a(0xfe)]('code'),_0x19733f=_0x5ae584[_0xf927a(0xe5)]===_0xf927a(0x117)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x535449[_0xf927a(0xfe)](_0xf927a(0x125)))):parseJsonParams(_0x535449['str']('params'))??{},_0x416bdc=_0x5ae584[_0xf927a(0xe5)]===_0xf927a(0x124)?parseUpdateIdsFromParams(_0x19733f):undefined,_0x413019=_0x416bdc?normalizeUpdateParamsForRuntime(_0x19733f,_0x416bdc):_0x19733f,_0x227dc1=Date[_0xf927a(0x123)](),_0x3ebc0b=await executeData(_0x3a1439,_0x5ae584[_0xf927a(0xe5)],_0x413019),_0x3c213=Date[_0xf927a(0x123)]()-_0x227dc1,_0x5df969=_0x416bdc&&_0x416bdc[_0xf927a(0x127)]>0x1?buildBatchUpdateResult(_0x416bdc,_0x3ebc0b):_0x3ebc0b;return{'ok':!![],'data':{'result':_0x5df969,'elapsed':_0x3c213},'message':_0xf927a(0xd0)+_0x5ae584['command']+_0xf927a(0xdf)+_0x3c213+'ms'};}};return _0x5ae584[_0x5ad7b6(0x105)]!=='read'&&(_0x1c4a8e['dryRun']=async _0x10f4e8=>{const _0x37b675=_0x5ad7b6,_0x55f03d=_0x10f4e8[_0x37b675(0xfe)](_0x37b675(0xf5)),_0x2a8151=_0x5ae584[_0x37b675(0xe5)]===_0x37b675(0x117)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x10f4e8[_0x37b675(0xfe)](_0x37b675(0x125)))):parseJsonParams(_0x10f4e8[_0x37b675(0xfe)](_0x37b675(0x125)))??{};let _0x15df9b=_0x2a8151;if(_0x5ae584['operation']===_0x37b675(0x124)){const _0x32e561=parseUpdateIdsFromParams(_0x2a8151);_0x15df9b=normalizeUpdateParamsForRuntime(_0x2a8151,_0x32e561);}return dryRun('POST',_0x37b675(0x112)+_0x55f03d+'/'+_0x5ae584[_0x37b675(0xe5)])[_0x37b675(0xd1)](_0x15df9b)['description']('Preview:\x20data\x20'+_0x5ae584[_0x37b675(0xe2)]+_0x37b675(0xfa)+_0x55f03d)[_0x37b675(0xe4)]();}),_0x1c4a8e;}export const dataDefinitions=specs[a24_0x5da881(0xea)](makeDataCommand);function a24_0x1e4b(_0x1fd936,_0x5b731f){_0x1fd936=_0x1fd936-0xcf;const _0xc0c737=a24_0xc0c7();let _0x1e4bd6=_0xc0c737[_0x1fd936];return _0x1e4bd6;}function buildBatchUpdateResult(_0x55285f,_0x59b337){const _0x23397e=a24_0x5da881;return{'operation':_0x23397e(0x124),'mode':_0x23397e(0x102),'ids':_0x55285f,'total':_0x55285f[_0x23397e(0x127)],'result':_0x59b337};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a25_0x5b08(){const _0x3b9315=['name','responseBody','code','displayName','validateRules','1426767tHsDjU','map','string','dataset','trim','deleted','allFields','push','properties','pkField','columnCodeListWithDeleted','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','allFieldNames','description','modifierNameField','modelCode','indexes','split','dbtableConfig','525599CNJBrW','method','formatRules','tableName','fields','responseFields','afterScriptId','creatorNameField','creatorIdField','2520752NXTGyB','labelField','dbType','object','requestFields','modelId','dbId','requestBody','host','doVersion','modifierIdField','logicField','sourceType','extend','length','doType','required','appCode','dbName','beforeScriptId','find','10NVAEeG','55RUEeMK','title','158116vphbpa','str','filter','type','11014155xcHIif','updateTimeField','path','createTimeField','options','operations','651952DINGWT','parse','dataType','detail','relatedPageInfoList','isArray','datasetKey','6zZdxPn','601922xxSVNj'];a25_0x5b08=function(){return _0x3b9315;};return a25_0x5b08();}const a25_0xffdd62=a25_0x2584;(function(_0x237726,_0x28b9af){const _0x4e4fb6=a25_0x2584,_0x26ce40=_0x237726();while(!![]){try{const _0x24b007=parseInt(_0x4e4fb6(0x8c))/0x1+parseInt(_0x4e4fb6(0xbf))/0x2+parseInt(_0x4e4fb6(0xc5))/0x3+-parseInt(_0x4e4fb6(0xad))/0x4*(-parseInt(_0x4e4fb6(0xab))/0x5)+-parseInt(_0x4e4fb6(0xbe))/0x6*(-parseInt(_0x4e4fb6(0xb7))/0x7)+-parseInt(_0x4e4fb6(0x95))/0x8+parseInt(_0x4e4fb6(0xb1))/0x9*(-parseInt(_0x4e4fb6(0xaa))/0xa);if(_0x24b007===_0x28b9af)break;else _0x26ce40['push'](_0x26ce40['shift']());}catch(_0x263e5f){_0x26ce40['push'](_0x26ce40['shift']());}}}(a25_0x5b08,0x4718f));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a25_0x2584(_0x3d0076,_0x20ba9f){_0x3d0076=_0x3d0076-0x89;const _0x5b08e8=a25_0x5b08();let _0x258455=_0x5b08e8[_0x3d0076];return _0x258455;}function normalizeField(_0x55fd0b){const _0x49a8aa=a25_0x2584;if(_0x55fd0b[_0x49a8aa(0xca)])return null;const _0x2c90da=Boolean(_0x55fd0b[_0x49a8aa(0xc3)]!==undefined||_0x55fd0b[_0x49a8aa(0xa4)]!==undefined);let _0x3b4e81={};if(!_0x2c90da&&typeof _0x55fd0b[_0x49a8aa(0xa2)]===_0x49a8aa(0xc7))try{_0x3b4e81=JSON[_0x49a8aa(0xb8)](_0x55fd0b[_0x49a8aa(0xa2)]);}catch{}const _0x1d86ac=_0x2c90da?_0x55fd0b[_0x49a8aa(0xc0)]:_0x55fd0b['code'],_0x447c80=_0x2c90da?_0x55fd0b[_0x49a8aa(0xc3)]:_0x55fd0b['name'],_0xac339c=_0x2c90da?_0x55fd0b['doType']:_0x55fd0b[_0x49a8aa(0xb0)]||_0x55fd0b[_0x49a8aa(0xb9)],_0x55e074=_0x2c90da?_0x55fd0b['pkField']===!![]:_0x3b4e81[_0x49a8aa(0xce)]===!![],_0x439d76=_0x2c90da?_0x55fd0b['required']===!![]:_0x3b4e81[_0x49a8aa(0xa5)]===!![],_0x4658aa=_0x2c90da?_0x55fd0b['options']??null:_0x3b4e81[_0x49a8aa(0xb5)]??null,_0x9c3abe={'name':_0x1d86ac,'displayName':_0x447c80||_0x1d86ac,'type':_0xac339c,'dbType':_0x55fd0b[_0x49a8aa(0x97)],'pk':_0x55e074,'required':_0x439d76,'description':_0x55fd0b['description']||undefined};return Array[_0x49a8aa(0xbc)](_0x4658aa)&&_0x4658aa[_0x49a8aa(0xa3)]>0x0&&(_0x9c3abe['options']=_0x4658aa),_0x9c3abe;}function parseJsonMaybe(_0x31ef51){if(typeof _0x31ef51!=='string')return _0x31ef51;try{return JSON['parse'](_0x31ef51);}catch{return _0x31ef51;}}function normalizeOperationEntry(_0x29d3f4,_0x2fda6b){const _0xe472=a25_0x2584;if(!_0x2fda6b||typeof _0x2fda6b!==_0xe472(0x98))return null;if(!_0x2fda6b['method']||!_0x2fda6b[_0xe472(0xb3)])return null;const _0x1bd58f={'name':_0x29d3f4,'method':_0x2fda6b[_0xe472(0x8d)],'path':_0x2fda6b[_0xe472(0xb3)]};if(_0x2fda6b['host'])_0x1bd58f[_0xe472(0x9d)]=_0x2fda6b[_0xe472(0x9d)];if(_0x2fda6b['requestBody']!=null)_0x1bd58f[_0xe472(0x9c)]=parseJsonMaybe(_0x2fda6b['requestBody']);if(_0x2fda6b[_0xe472(0xc1)]!=null)_0x1bd58f[_0xe472(0xc1)]=parseJsonMaybe(_0x2fda6b[_0xe472(0xc1)]);if(_0x2fda6b[_0xe472(0xa8)]!=null)_0x1bd58f[_0xe472(0xa8)]=_0x2fda6b[_0xe472(0xa8)];if(_0x2fda6b[_0xe472(0x92)]!=null)_0x1bd58f[_0xe472(0x92)]=_0x2fda6b[_0xe472(0x92)];if(Array[_0xe472(0xbc)](_0x2fda6b[_0xe472(0x99)]))_0x1bd58f[_0xe472(0x99)]=_0x2fda6b[_0xe472(0x99)];if(Array[_0xe472(0xbc)](_0x2fda6b[_0xe472(0x91)]))_0x1bd58f[_0xe472(0x91)]=_0x2fda6b[_0xe472(0x91)];return _0x1bd58f;}function summarizeDbtable(_0x386fbd){const _0x29412f=a25_0x2584,_0x52ffcb={},_0x4a9825=[_0x29412f(0x9b),_0x29412f(0xa7),_0x29412f(0x8f),_0x29412f(0xbd),_0x29412f(0xce),_0x29412f(0xcb),_0x29412f(0xa0),_0x29412f(0xb4),_0x29412f(0xb2),_0x29412f(0x94),_0x29412f(0x93),_0x29412f(0x9f),_0x29412f(0xd3),_0x29412f(0x96),'dblinkInfoDTO'];for(const _0x25a15d of _0x4a9825){if(_0x386fbd[_0x25a15d]!==undefined)_0x52ffcb[_0x25a15d]=_0x386fbd[_0x25a15d];}return typeof _0x52ffcb['allFields']==='string'&&_0x52ffcb[_0x29412f(0xcb)][_0x29412f(0xa3)]>0x0&&(_0x52ffcb[_0x29412f(0xd1)]=_0x52ffcb[_0x29412f(0xcb)][_0x29412f(0x8a)](',')['map'](_0x7bb362=>_0x7bb362[_0x29412f(0xc9)]())[_0x29412f(0xaf)](Boolean)),_0x52ffcb;}function normalizeRelatedPages(_0x34105d){const _0x7175d=a25_0x2584;if(!Array[_0x7175d(0xbc)](_0x34105d))return[];return _0x34105d[_0x7175d(0xaf)](_0x3f790f=>_0x3f790f&&typeof _0x3f790f===_0x7175d(0x98))['map'](_0xf98501=>({'id':_0xf98501['id'],'type':_0xf98501[_0x7175d(0xb0)],'code':_0xf98501[_0x7175d(0xc2)],'title':_0xf98501[_0x7175d(0xac)],'deleted':_0xf98501['deleted']===!![]}));}function normalizeFallbackFieldName(_0x437913,_0x575c38){const _0x204626=a25_0x2584,_0x38a961=_0x437913[_0x204626(0xc9)]();if(!_0x38a961)return null;return{'name':_0x38a961,'displayName':_0x38a961,'type':undefined,'dbType':undefined,'pk':_0x38a961===_0x575c38,'required':![],'description':undefined};}async function loadListFieldFallback(_0x237a30,_0x203fd9){const _0x4bd801=a25_0x2584;if(!_0x237a30||!_0x203fd9)return[];try{const _0x56cfbc=await listDatasets(_0x237a30,{'code':_0x203fd9}),_0xea0824=_0x56cfbc[_0x4bd801(0xa9)](_0x2a26b1=>_0x2a26b1['code']===_0x203fd9)??_0x56cfbc[0x0],_0x4bbfa7=_0xea0824?.[_0x4bd801(0x8b)]??{},_0x859de6=typeof _0x4bbfa7[_0x4bd801(0xcb)]===_0x4bd801(0xc7)?_0x4bbfa7[_0x4bd801(0xcb)][_0x4bd801(0x8a)](','):[];return _0x859de6[_0x4bd801(0xc6)](_0x3ba6ac=>normalizeFallbackFieldName(_0x3ba6ac,_0x4bbfa7['pkField']))[_0x4bd801(0xaf)](_0x1e921a=>_0x1e921a!==null);}catch{return[];}}export const datasetDetail={'service':a25_0xffdd62(0xc8),'command':a25_0xffdd62(0xba),'description':a25_0xffdd62(0xd0),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0xbef902){const _0x2b10cf=a25_0xffdd62,_0x48d605=await getDatasetDetail(_0xbef902[_0x2b10cf(0xae)]('code')),_0x1bffb5=Array['isArray'](_0x48d605[_0x2b10cf(0x90)])?_0x48d605[_0x2b10cf(0x90)]:Array[_0x2b10cf(0xbc)](_0x48d605[_0x2b10cf(0xcd)])?_0x48d605[_0x2b10cf(0xcd)]:[];let _0x2e9d1f=_0x1bffb5[_0x2b10cf(0xc6)](_0x54c9eb=>normalizeField(_0x54c9eb))['filter'](_0x224b6c=>_0x224b6c!==null);_0x2e9d1f[_0x2b10cf(0xa3)]===0x0&&(_0x2e9d1f=await loadListFieldFallback(_0xbef902[_0x2b10cf(0xa6)],_0xbef902[_0x2b10cf(0xae)](_0x2b10cf(0xc2))));const _0x40dbd8=_0x48d605[_0x2b10cf(0xb6)]??{},_0x594de0=[];for(const [_0x574686,_0x1510e5]of Object['entries'](_0x40dbd8)){const _0x2be8f2=normalizeOperationEntry(_0x574686,_0x1510e5);if(_0x2be8f2)_0x594de0[_0x2b10cf(0xcc)](_0x2be8f2);}const _0x5de14c=_0x48d605[_0x2b10cf(0x8b)]??{},_0x361d75=_0x48d605[_0x2b10cf(0xc8)]??{},_0x451fcb=_0x5de14c[_0x2b10cf(0x9b)]!=null?{'id':_0x5de14c[_0x2b10cf(0x9b)],'name':_0x5de14c['dbName']??null}:undefined;let _0x51048c;return typeof _0x48d605[_0x2b10cf(0xa2)]==='string'&&(_0x51048c=parseJsonMaybe(_0x48d605[_0x2b10cf(0xa2)])),{'ok':!![],'data':{'id':_0x48d605[_0x2b10cf(0x9a)]??_0x48d605['id'],'name':_0x48d605[_0x2b10cf(0xc0)],'code':_0x48d605[_0x2b10cf(0xd4)]||_0x48d605[_0x2b10cf(0xc2)],'doVersion':_0x48d605[_0x2b10cf(0x9e)],'description':_0x48d605[_0x2b10cf(0xd2)]||_0x361d75['tableComment']||undefined,'source':_0x48d605['source']||_0x361d75[_0x2b10cf(0xa1)],'table':_0x5de14c[_0x2b10cf(0x8f)]||_0x361d75[_0x2b10cf(0x8f)],'datasetKey':_0x5de14c['datasetKey'],'pk':_0x5de14c['pkField'],'db':_0x451fcb,'dbtable':summarizeDbtable(_0x5de14c),'fields':_0x2e9d1f,'operations':_0x594de0,'indexes':Array[_0x2b10cf(0xbc)](_0x361d75[_0x2b10cf(0x89)])?_0x361d75['indexes']:[],'relations':_0x48d605['relations']??null,'relatedPages':normalizeRelatedPages(_0x48d605[_0x2b10cf(0xbb)]),...Array['isArray'](_0x48d605[_0x2b10cf(0xcf)])?{'columnCodeListWithDeleted':_0x48d605[_0x2b10cf(0xcf)]}:{},'formatRules':Array['isArray'](_0x48d605[_0x2b10cf(0x8e)])?_0x48d605[_0x2b10cf(0x8e)]:[],'validateRules':Array[_0x2b10cf(0xbc)](_0x48d605[_0x2b10cf(0xc4)])?_0x48d605[_0x2b10cf(0xc4)]:[],..._0x51048c!==undefined?{'extend':_0x51048c}:{},'stats':{'fieldCount':_0x2e9d1f[_0x2b10cf(0xa3)],'operationCount':_0x594de0[_0x2b10cf(0xa3)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a26_0xdf31(_0xd01417,_0x2f7620){_0xd01417=_0xd01417-0x167;const _0x12caf0=a26_0x12ca();let _0xdf316b=_0x12caf0[_0xd01417];return _0xdf316b;}(function(_0x3b4f50,_0x4cb21b){const _0x26d479=a26_0xdf31,_0x23f5ad=_0x3b4f50();while(!![]){try{const _0x462156=parseInt(_0x26d479(0x168))/0x1+parseInt(_0x26d479(0x16d))/0x2+-parseInt(_0x26d479(0x16c))/0x3*(-parseInt(_0x26d479(0x16e))/0x4)+-parseInt(_0x26d479(0x169))/0x5*(parseInt(_0x26d479(0x167))/0x6)+parseInt(_0x26d479(0x16b))/0x7+parseInt(_0x26d479(0x16a))/0x8+-parseInt(_0x26d479(0x16f))/0x9;if(_0x462156===_0x4cb21b)break;else _0x23f5ad['push'](_0x23f5ad['shift']());}catch(_0x3c7481){_0x23f5ad['push'](_0x23f5ad['shift']());}}}(a26_0x12ca,0x3e163));function a26_0x12ca(){const _0x37f272=['782688SvQzKY','2028ZaDLmD','8505234VJIAHX','72EiqUpq','113380Ekecii','41755sBwlFo','1484136fCNapG','1418830IQIqab','2406UMDUtx'];a26_0x12ca=function(){return _0x37f272;};return a26_0x12ca();}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a27_0x14b6(){const _0x17b544=['2664378xnzBDQ','map','450086zvRxGv','datasetKey','pkField','dataset','name','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','11VecCuq','40MBVyWX','code','source','description','dbtableConfig','string','7DQDcWD','15pQkJBF','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','str','204198LSeePY','list','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','allFields','891672WAvSYT','read','2955318UwNWQb','13118850oeGkMp','3871616Bqqmzr','tableName'];a27_0x14b6=function(){return _0x17b544;};return a27_0x14b6();}const a27_0x5496e7=a27_0x1c80;(function(_0x360b1c,_0x345502){const _0x31f6a0=a27_0x1c80,_0x57e37c=_0x360b1c();while(!![]){try{const _0x305e71=parseInt(_0x31f6a0(0xfa))/0x1*(-parseInt(_0x31f6a0(0xed))/0x2)+-parseInt(_0x31f6a0(0xe7))/0x3+parseInt(_0x31f6a0(0xe5))/0x4+parseInt(_0x31f6a0(0xfb))/0x5*(-parseInt(_0x31f6a0(0xfe))/0x6)+parseInt(_0x31f6a0(0xe9))/0x7+-parseInt(_0x31f6a0(0xf4))/0x8*(-parseInt(_0x31f6a0(0xeb))/0x9)+parseInt(_0x31f6a0(0xe8))/0xa*(parseInt(_0x31f6a0(0xf3))/0xb);if(_0x305e71===_0x345502)break;else _0x57e37c['push'](_0x57e37c['shift']());}catch(_0x5e8742){_0x57e37c['push'](_0x57e37c['shift']());}}}(a27_0x14b6,0xdd17b));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a27_0x1c80(_0x19d63b,_0xee571b){_0x19d63b=_0x19d63b-0xe3;const _0x14b6bf=a27_0x14b6();let _0x1c80f5=_0x14b6bf[_0x19d63b];return _0x1c80f5;}export const datasetList={'service':a27_0x5496e7(0xf0),'command':a27_0x5496e7(0xff),'description':a27_0x5496e7(0xf2),'risk':a27_0x5496e7(0xe6),'flags':[{'name':a27_0x5496e7(0xf1),'type':a27_0x5496e7(0xf9),'description':a27_0x5496e7(0xfc)},{...CODE_FLAG,'required':![],'description':a27_0x5496e7(0xe3)}],async 'execute'(_0x168118){const _0xd93557=a27_0x5496e7,_0x682b3c=_0x168118[_0xd93557(0xfd)]('name'),_0x23d468=_0x168118[_0xd93557(0xfd)](_0xd93557(0xf5)),_0x4cf9f1=await listDatasets(_0x168118['appCode'],{..._0x682b3c&&{'name':_0x682b3c},..._0x23d468&&{'code':_0x23d468}});return{'ok':!![],'data':{'total':_0x4cf9f1['length'],'datasets':_0x4cf9f1[_0xd93557(0xec)](_0x54502b=>{const _0x174b38=_0xd93557,_0x46c600=_0x54502b[_0x174b38(0xf8)]??{};return{'id':_0x54502b['id'],'code':_0x54502b['code'],'name':_0x54502b['name'],'source':_0x54502b[_0x174b38(0xf6)],'description':_0x54502b[_0x174b38(0xf7)],'table':_0x46c600[_0x174b38(0xea)],'datasetKey':_0x46c600[_0x174b38(0xee)],'pk':_0x46c600[_0x174b38(0xef)],'fields':_0x46c600[_0x174b38(0xe4)]?_0x46c600[_0x174b38(0xe4)]['split'](',')['map'](_0x2ed9ff=>_0x2ed9ff['trim']()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x3bb8eb=a28_0xca02;(function(_0x54c6f1,_0x5ca7c3){const _0x56ff46=a28_0xca02,_0x3b6c5a=_0x54c6f1();while(!![]){try{const _0x314441=parseInt(_0x56ff46(0x79))/0x1+parseInt(_0x56ff46(0x7f))/0x2*(-parseInt(_0x56ff46(0x78))/0x3)+parseInt(_0x56ff46(0x7e))/0x4*(parseInt(_0x56ff46(0x75))/0x5)+parseInt(_0x56ff46(0x77))/0x6*(-parseInt(_0x56ff46(0x7d))/0x7)+parseInt(_0x56ff46(0x7a))/0x8*(-parseInt(_0x56ff46(0x80))/0x9)+-parseInt(_0x56ff46(0x73))/0xa+parseInt(_0x56ff46(0x6f))/0xb*(parseInt(_0x56ff46(0x76))/0xc);if(_0x314441===_0x5ca7c3)break;else _0x3b6c5a['push'](_0x3b6c5a['shift']());}catch(_0x317082){_0x3b6c5a['push'](_0x3b6c5a['shift']());}}}(a28_0x59de,0x99054));function a28_0x59de(){const _0x18bbf6=['282TACsSF','482433IkZqLk','227742fmfHOe','13128pJvqel','read','appCode','117950wtWWcI','636DleKje','2dGqvgN','3258zAvRau','22HsUKMS','str','dataset','code','7684020QWkgTY','trim','33045oRswgp','9980424bPklPC'];a28_0x59de=function(){return _0x18bbf6;};return a28_0x59de();}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a28_0xca02(_0x2bcb9a,_0x2e33b6){_0x2bcb9a=_0x2bcb9a-0x6f;const _0x59deb5=a28_0x59de();let _0xca0274=_0x59deb5[_0x2bcb9a];return _0xca0274;}import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x509ab3){const _0x40accb=a28_0xca02,_0x298b86=typeof _0x509ab3==='string'?_0x509ab3[_0x40accb(0x74)]():'';return _0x298b86||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x3bb8eb(0x71),'command':'sdk-doc','description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a28_0x3bb8eb(0x7b),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x4f108e){const _0x12789c=a28_0x3bb8eb,_0x24302b=_0x4f108e[_0x12789c(0x70)](_0x12789c(0x72)),_0x1b9b68=await getDatasetSdkUsageDoc(_0x24302b,_0x4f108e[_0x12789c(0x7c)]);return{'ok':!![],'data':{'code':_0x24302b,'appCode':_0x4f108e[_0x12789c(0x7c)],'markdown':formatDatasetSdkMarkdown(_0x1b9b68)}};}};
|