@lovrabet/lovrabet-cli 2.1.22-beta.4 → 2.1.22-beta.6
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/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/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/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/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_0x4b771b=a12_0x4cc2;(function(_0x21eb8b,_0x83dcb9){const _0xbeeba2=a12_0x4cc2,_0x37bebf=_0x21eb8b();while(!![]){try{const _0x5515ea=-parseInt(_0xbeeba2(0x1b8))/0x1*(-parseInt(_0xbeeba2(0x17b))/0x2)+-parseInt(_0xbeeba2(0x19c))/0x3*(parseInt(_0xbeeba2(0x17f))/0x4)+-parseInt(_0xbeeba2(0x16a))/0x5*(-parseInt(_0xbeeba2(0x193))/0x6)+-parseInt(_0xbeeba2(0x19a))/0x7+parseInt(_0xbeeba2(0x1a6))/0x8+-parseInt(_0xbeeba2(0x1a2))/0x9+parseInt(_0xbeeba2(0x18d))/0xa;if(_0x5515ea===_0x83dcb9)break;else _0x37bebf['push'](_0x37bebf['shift']());}catch(_0xae0dff){_0x37bebf['push'](_0x37bebf['shift']());}}}(a12_0x42d8,0x3131e));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';function a12_0x42d8(){const _0x9116be=['ACCESS_KEY','project','join','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','init','\x20scope.','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','slice','Shorthand\x20for\x20--access-key','project\x20config','4504190jFagZP','\x20config.','bool','env','validation','production','150wexgjq','AccessKey\x20saved\x20to\x20','string','Option\x20A:\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','nonInteractive','isTTY','1883798yaeNRX','Option\x20C:\x20environment\x20variable','3MrfGPL','\x20Verify:\x20','authRequired','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','code','Use\x20`','1277577jfLgrD','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','info','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','209568yEIdzj','global\x20config','str','\x20doctor','\x20env\x20var','\x20auth\x20status','\x20Current\x20env:\x20','Read\x20from\x20global\x20config\x20(default)','development','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','length','access-key','AccessKey\x20cleared\x20from\x20','login','AccessKey\x20(ak_xxx...)','Clear\x20from\x20global\x20config\x20(default)','read','status','4uUMenp','global','boolean','Auth\x20mode:\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','repeat','Show\x20current\x20authentication\x20status','\x20config.\x20Nothing\x20to\x20clear.','Auth\x20config\x20reinitialized\x20in\x20','cancelled','ClientAk','write','newConfigFileName','=ak_xxx','Write\x20to\x20global\x20config\x20(default)','push','Status:\x20valid','29240frqfUn','Tip:\x20you\x20can\x20also\x20run:','auth','Missing\x20accessKey.','stdout','scope','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','access_key','logout','accessKey','AccessKey:\x20','userCenterDisplayName','Then\x20verify\x20with:\x20','test','\x20(via\x20','\x20\x20export\x20','172268QHvhDs','\x20config','success','global-default','1419128aySaVE','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'];a12_0x42d8=function(){return _0x9116be;};return a12_0x42d8();}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 a12_0x4cc2(_0x44ab9c,_0x4fe059){_0x44ab9c=_0x44ab9c-0x162;const _0x42d8b5=a12_0x42d8();let _0x4cc275=_0x42d8b5[_0x44ab9c];return _0x4cc275;}function showAccessKeyCreateHint(){const _0x305fde=a12_0x4cc2;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x305fde(0x176)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x305fde(0x16b)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x1a7c5e=a12_0x4cc2;return[_0x1a7c5e(0x181)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x1a7c5e(0x1af)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0x1a7c5e(0x184)]('\x0a');}function canPromptForAccessKey(_0x50d088){const _0x529053=a12_0x4cc2;return!_0x50d088['nonInteractive']&&process['stdin'][_0x529053(0x199)]!==![]&&process[_0x529053(0x16e)][_0x529053(0x199)]!==![];}function resolveAuthScopeFlags(_0x1d7ca3){const _0x460aa0=a12_0x4cc2;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1d7ca3[_0x460aa0(0x18f)](_0x460aa0(0x1b9)),'explicitProject':_0x1d7ca3[_0x460aa0(0x18f)](_0x460aa0(0x183)),'policy':_0x460aa0(0x17e)}));}async function resolveAuthWriteInput(_0x1182c4){const _0x3d758f=a12_0x4cc2;let _0x3ea6e1=(_0x1182c4['str'](_0x3d758f(0x1b1))||_0x1182c4[_0x3d758f(0x1a8)]('ak')||'')['trim']();const _0x571b98=(_0x1182c4[_0x3d758f(0x1a8)]('env')||'')['trim']();if(!_0x3ea6e1&&canPromptForAccessKey(_0x1182c4))try{showAccessKeyCreateHint(),_0x3ea6e1=await promptAccessKey('');}catch(_0x353b42){if(isAbortPrompt(_0x353b42))throw CliErrors[_0x3d758f(0x162)]();throw _0x353b42;}if(!_0x3ea6e1)throw CliErrors['validation'](_0x3d758f(0x16d),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x3d758f(0x178)](_0x3ea6e1))throw CliErrors[_0x3d758f(0x191)]('Invalid\x20accessKey\x20format:\x20\x22'+_0x3ea6e1+'\x22',_0x3d758f(0x1a3));if(!_0x571b98)return{'accessKey':_0x3ea6e1};const _0x40151b=normalizeEnv(_0x571b98);return{'accessKey':_0x3ea6e1,'env':isDaily(_0x40151b)?'daily':isDev(_0x40151b)?_0x3d758f(0x1ae):'production'};}export const authDefinitions=[{'service':'auth','command':a12_0x4b771b(0x1b3),'description':a12_0x4b771b(0x1a5),'risk':a12_0x4b771b(0x164),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x4b771b(0x1b1),'type':'string','description':a12_0x4b771b(0x1b4)},{'name':'ak','type':a12_0x4b771b(0x195),'description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x4b771b(0x1b9),'type':a12_0x4b771b(0x1ba),'description':a12_0x4b771b(0x167),'default':!![]},{'name':a12_0x4b771b(0x183),'type':a12_0x4b771b(0x1ba),'description':a12_0x4b771b(0x171),'default':![]}],async 'execute'(_0x5b81cb){const _0x2b9c20=a12_0x4b771b;if(_0x5b81cb[_0x2b9c20(0x18f)]('yes'))throw CliErrors['validation'](_0x2b9c20(0x188),_0x2b9c20(0x1a1)+CLI_BIN_NAME+_0x2b9c20(0x1bc)+CLI_BIN_NAME+_0x2b9c20(0x170));const _0x4581c2=(_0x5b81cb[_0x2b9c20(0x1a8)](_0x2b9c20(0x1b1))||_0x5b81cb[_0x2b9c20(0x1a8)]('ak')||'')['trim']();if(!_0x4581c2&&_0x5b81cb[_0x2b9c20(0x198)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x1d1140=await resolveAuthWriteInput(_0x5b81cb),_0x268964=resolveAuthScopeFlags(_0x5b81cb),_0x197979=readScopedConfig(_0x268964);_0x197979[_0x2b9c20(0x174)]=_0x1d1140[_0x2b9c20(0x174)];_0x1d1140[_0x2b9c20(0x190)]&&(_0x197979[_0x2b9c20(0x190)]=_0x1d1140[_0x2b9c20(0x190)]);writeScopedConfig(_0x197979,_0x268964);const _0x5588c5=_0x268964[_0x2b9c20(0x1b9)]?_0x2b9c20(0x1b9):_0x2b9c20(0x183),_0x4d3f29=_0x197979['env']?_0x2b9c20(0x1ac)+_0x197979[_0x2b9c20(0x190)]+'.':'';return{'ok':!![],'message':_0x2b9c20(0x194)+_0x5588c5+_0x2b9c20(0x18e)+_0x4d3f29+_0x2b9c20(0x19d)+CLI_BIN_NAME+_0x2b9c20(0x1ab)};}},{'service':'auth','command':a12_0x4b771b(0x186),'description':a12_0x4b771b(0x19f),'risk':a12_0x4b771b(0x164),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x4b771b(0x1b1),'type':a12_0x4b771b(0x195),'description':a12_0x4b771b(0x1b4)},{'name':'ak','type':a12_0x4b771b(0x195),'description':a12_0x4b771b(0x18b)},{'name':a12_0x4b771b(0x190),'type':a12_0x4b771b(0x195),'description':a12_0x4b771b(0x189)},{'name':'global','type':a12_0x4b771b(0x1ba),'description':a12_0x4b771b(0x167),'default':!![]},{'name':a12_0x4b771b(0x183),'type':a12_0x4b771b(0x1ba),'description':a12_0x4b771b(0x171),'default':![]}],async 'execute'(_0x295639){const _0x35035b=a12_0x4b771b,_0x5c9749=await resolveAuthWriteInput(_0x295639),_0x3b3e7c=resolveAuthScopeFlags(_0x295639),_0x46e1b3={'accessKey':_0x5c9749[_0x35035b(0x174)]};_0x5c9749['env']&&(_0x46e1b3['env']=_0x5c9749['env']);writeScopedConfig(_0x46e1b3,_0x3b3e7c);const _0x5bb430=_0x3b3e7c[_0x35035b(0x1b9)]?'global':_0x35035b(0x183),_0x29bf95=_0x46e1b3[_0x35035b(0x190)]?'\x20Current\x20env:\x20'+_0x46e1b3[_0x35035b(0x190)]+'.':'';return{'ok':!![],'message':_0x35035b(0x1c1)+_0x5bb430+_0x35035b(0x187)+_0x29bf95+'\x20Verify:\x20'+CLI_BIN_NAME+_0x35035b(0x1ab)};}},{'service':'auth','command':a12_0x4b771b(0x173),'description':'Clear\x20accessKey\x20from\x20config','risk':a12_0x4b771b(0x164),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x4b771b(0x1b9),'type':a12_0x4b771b(0x1ba),'description':a12_0x4b771b(0x1b5),'default':!![]},{'name':a12_0x4b771b(0x183),'type':a12_0x4b771b(0x1ba),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x25f5f8){const _0x17f2d6=a12_0x4b771b,_0x50f4c3=resolveAuthScopeFlags(_0x25f5f8),_0x57a64d=readScopedConfig(_0x50f4c3),_0x1d3e00=!!_0x57a64d['accessKey'];delete _0x57a64d[_0x17f2d6(0x174)],writeScopedConfig(_0x57a64d,_0x50f4c3);const _0x1ddc69=_0x50f4c3[_0x17f2d6(0x1b9)]?_0x17f2d6(0x1b9):_0x17f2d6(0x183);if(_0x1d3e00)return{'ok':!![],'message':_0x17f2d6(0x1b2)+_0x1ddc69+_0x17f2d6(0x18e)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x1ddc69+_0x17f2d6(0x1c0)};}},{'service':a12_0x4b771b(0x16c),'command':a12_0x4b771b(0x1b7),'description':a12_0x4b771b(0x1bf),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x4b771b(0x1b9),'type':a12_0x4b771b(0x1ba),'description':a12_0x4b771b(0x1ad),'default':!![]},{'name':'project','type':a12_0x4b771b(0x1ba),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':'check','type':a12_0x4b771b(0x1ba),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x57bff0){const _0x3bb8f9=a12_0x4b771b,_0x241931=resolveAuthScopeFlags(_0x57bff0),_0x257813=readScopedConfig(_0x241931),_0x27387e=productEnvName('ACCESS_KEY'),_0x1c9274=productEnv(_0x3bb8f9(0x182))||undefined,_0x61159b=_0x257813['accessKey']||undefined,_0x19450e=_0x1c9274||_0x61159b,_0x368ac8=_0x1c9274?_0x27387e+_0x3bb8f9(0x1aa):_0x61159b?(_0x241931['global']?'global':'project')+_0x3bb8f9(0x17c):null,_0x461033=[_0x3bb8f9(0x1bb)+AUTH_MODE[_0x3bb8f9(0x163)]];if(_0x19450e){const _0xa18dfe=_0x19450e['length']>0x8?''+_0x19450e['slice'](0x0,0x8)+'*'[_0x3bb8f9(0x1be)](_0x19450e[_0x3bb8f9(0x1b0)]-0x8):_0x19450e;_0x461033[_0x3bb8f9(0x168)](_0x3bb8f9(0x175)+_0xa18dfe+(_0x368ac8?_0x3bb8f9(0x179)+_0x368ac8+')':'')),_0x461033['push']('Status:\x20valid');}if(!_0x19450e){_0x461033[_0x3bb8f9(0x168)](''),_0x461033[_0x3bb8f9(0x168)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x461033[_0x3bb8f9(0x168)](''),_0x461033[_0x3bb8f9(0x168)](_0x3bb8f9(0x196)+CLI_BIN_NAME+_0x3bb8f9(0x185)),_0x461033[_0x3bb8f9(0x168)](''),_0x461033['push']('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x3bb8f9(0x165)]+')'),_0x461033[_0x3bb8f9(0x168)](_0x3bb8f9(0x180)),_0x461033[_0x3bb8f9(0x168)](''),_0x461033[_0x3bb8f9(0x168)](_0x3bb8f9(0x19b)),_0x461033['push'](_0x3bb8f9(0x17a)+_0x27387e+_0x3bb8f9(0x166)),_0x461033[_0x3bb8f9(0x168)](''),_0x461033['push'](_0x3bb8f9(0x177)+CLI_BIN_NAME+'\x20auth\x20status'),_0x461033['push'](_0x3bb8f9(0x1bd)+CLI_BIN_NAME+_0x3bb8f9(0x1a9));if(_0x57bff0[_0x3bb8f9(0x18f)]('check')){const _0x5ef149=readStoredDeviceCode();if(_0x5ef149&&!isStoredDeviceCodeExpired(_0x5ef149)){const _0x583ce0=getUserDomain(),_0x576188=await fetchDeviceToken(_0x583ce0,_0x5ef149[_0x3bb8f9(0x1a0)]);if(_0x576188[_0x3bb8f9(0x1b7)]===_0x3bb8f9(0x17d)&&_0x576188[_0x3bb8f9(0x172)]){const _0x391fd7={'global':_0x5ef149['scope']===_0x3bb8f9(0x1b9)},_0x3683f2=readScopedConfig(_0x391fd7);_0x3683f2[_0x3bb8f9(0x174)]=_0x576188[_0x3bb8f9(0x172)],writeScopedConfig(_0x3683f2,_0x391fd7),deleteStoredDeviceCode();const _0x17496c=_0x576188[_0x3bb8f9(0x172)],_0x5bcf6e=_0x17496c[_0x3bb8f9(0x1b0)]>0x8?''+_0x17496c[_0x3bb8f9(0x18a)](0x0,0x8)+'*'[_0x3bb8f9(0x1be)](_0x17496c['length']-0x8):_0x17496c,_0x1967dd=_0x5ef149[_0x3bb8f9(0x16f)]===_0x3bb8f9(0x1b9)?_0x3bb8f9(0x1a7):_0x3bb8f9(0x18c);return{'ok':!![],'message':[_0x3bb8f9(0x1bb)+AUTH_MODE[_0x3bb8f9(0x163)],_0x3bb8f9(0x175)+_0x5bcf6e+_0x3bb8f9(0x179)+_0x1967dd+')',_0x3bb8f9(0x169)][_0x3bb8f9(0x184)]('\x0a')};}_0x576188[_0x3bb8f9(0x1b7)]==='expired'&&deleteStoredDeviceCode();throw CliErrors[_0x3bb8f9(0x19e)]('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors['authRequired'](_0x461033[_0x3bb8f9(0x184)]('\x0a'));}}return{'ok':!![],'message':_0x461033[_0x3bb8f9(0x184)]('\x0a')};}},{'service':a12_0x4b771b(0x16c),'command':a12_0x4b771b(0x1a4),'description':a12_0x4b771b(0x197),'risk':a12_0x4b771b(0x1b6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5a2e5b){const _0x278cbc=a12_0x4b771b,_0x57ab95=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x57ab95,'meta':{'env':_0x5a2e5b['envName']??_0x278cbc(0x192)}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x562351=a12_0x5b23;(function(_0x14816d,_0x29d4c6){const _0x21efb8=a12_0x5b23,_0x3d1516=_0x14816d();while(!![]){try{const _0xd4541b=parseInt(_0x21efb8(0x179))/0x1*(parseInt(_0x21efb8(0x1b1))/0x2)+parseInt(_0x21efb8(0x194))/0x3*(-parseInt(_0x21efb8(0x1bf))/0x4)+parseInt(_0x21efb8(0x190))/0x5+parseInt(_0x21efb8(0x17a))/0x6*(-parseInt(_0x21efb8(0x184))/0x7)+-parseInt(_0x21efb8(0x1aa))/0x8*(-parseInt(_0x21efb8(0x1a3))/0x9)+-parseInt(_0x21efb8(0x1c7))/0xa+parseInt(_0x21efb8(0x195))/0xb*(parseInt(_0x21efb8(0x1c9))/0xc);if(_0xd4541b===_0x29d4c6)break;else _0x3d1516['push'](_0x3d1516['shift']());}catch(_0x2c839a){_0x3d1516['push'](_0x3d1516['shift']());}}}(a12_0x192a,0x911c5));function a12_0x192a(){const _0x4a44df=['Status:\x20valid','\x20(via\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','Option\x20A:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','test','5225595mclcXD','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','development','global','6DuhvZq','10007503ywoVjG','No\x20AccessKey\x20found\x20in\x20','Auth\x20mode:\x20','ACCESS_KEY','\x20config.','userCenterDisplayName','global-default','\x20auth\x20status','accessKey','write','\x20Current\x20env:\x20','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','isTTY','Shorthand\x20for\x20--access-key','63nEyNEH','logout','=ak_xxx','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','read','Missing\x20accessKey.','project\x20config','257432DGQfqi','scope','join','string','slice','AccessKey:\x20','Invalid\x20accessKey\x20format:\x20\x22','64858sUdBXv','将\x20AccessKey\x20保存到配置(默认写入全局配置;使用\x20--project\x20写入项目配置)','success','access-key','env','cancelled','Show\x20current\x20authentication\x20status','\x20Verify:\x20','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','nonInteractive','从配置中清除\x20AccessKey','清空当前作用域配置并重新初始化认证','Write\x20to\x20global\x20config\x20(default)','validation','2181908siCVJz','AccessKey\x20cleared\x20from\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Auth\x20config\x20reinitialized\x20in\x20','daily','length','boolean','global\x20config','11672060BEdkfP','stdin','24QmEAAJ','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','AccessKey\x20(ak_xxx...)','Tip:\x20you\x20can\x20also\x20run:','project','check','Clear\x20from\x20global\x20config\x20(default)','init','auth','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','bool','access_key','Option\x20B:\x20apps\x20config\x20(','AccessKey\x20saved\x20to\x20','str','yes','envName','26pfijij','6483234tkTQQV','repeat','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','production','status','\x20config.\x20Nothing\x20to\x20clear.','ClientAk','\x20doctor','trim','login','7AlKFTL','code','push','\x20\x20export\x20'];a12_0x192a=function(){return _0x4a44df;};return a12_0x192a();}import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';function a12_0x5b23(_0x1312d4,_0x521107){_0x1312d4=_0x1312d4-0x168;const _0x192a04=a12_0x192a();let _0x5b2312=_0x192a04[_0x1312d4];return _0x5b2312;}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x3c5435=a12_0x5b23;writeCliSideChannelLine(_0x3c5435(0x1a0)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x3c5435(0x16b)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x476bf2=a12_0x5b23;return[_0x476bf2(0x1a0)+PRODUCT_CONFIG[_0x476bf2(0x19a)]+':',USER_ACCESS_KEY_CREATE_URL,_0x476bf2(0x171)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x189cb6){const _0x21781c=a12_0x5b23;return!_0x189cb6[_0x21781c(0x1ba)]&&process[_0x21781c(0x1c8)]['isTTY']!==![]&&process['stdout'][_0x21781c(0x1a1)]!==![];}function resolveAuthScopeFlags(_0x572fe9){const _0x1b97f5=a12_0x5b23;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x572fe9[_0x1b97f5(0x172)](_0x1b97f5(0x193)),'explicitProject':_0x572fe9['bool'](_0x1b97f5(0x16c)),'policy':_0x1b97f5(0x19b)}));}async function resolveAuthWriteInput(_0x141d40){const _0x4335a0=a12_0x5b23;let _0x23d3db=(_0x141d40[_0x4335a0(0x176)](_0x4335a0(0x1b4))||_0x141d40[_0x4335a0(0x176)]('ak')||'')[_0x4335a0(0x182)]();const _0x16f489=(_0x141d40[_0x4335a0(0x176)](_0x4335a0(0x1b5))||'')[_0x4335a0(0x182)]();if(!_0x23d3db&&canPromptForAccessKey(_0x141d40))try{showAccessKeyCreateHint(),_0x23d3db=await promptAccessKey('');}catch(_0x59feba){if(isAbortPrompt(_0x59feba))throw CliErrors[_0x4335a0(0x1b6)]();throw _0x59feba;}if(!_0x23d3db)throw CliErrors[_0x4335a0(0x1be)](_0x4335a0(0x1a8),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x4335a0(0x18f)](_0x23d3db))throw CliErrors[_0x4335a0(0x1be)](_0x4335a0(0x1b0)+_0x23d3db+'\x22',_0x4335a0(0x17c));if(!_0x16f489)return{'accessKey':_0x23d3db};const _0x137650=normalizeEnv(_0x16f489);return{'accessKey':_0x23d3db,'env':isDaily(_0x137650)?_0x4335a0(0x1c3):isDev(_0x137650)?_0x4335a0(0x192):_0x4335a0(0x17d)};}export const authDefinitions=[{'service':'auth','command':a12_0x562351(0x183),'description':a12_0x562351(0x1b2),'risk':a12_0x562351(0x19e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a12_0x562351(0x1ad),'description':a12_0x562351(0x16a)},{'name':'ak','type':'string','description':a12_0x562351(0x1a2)},{'name':a12_0x562351(0x193),'type':a12_0x562351(0x1c5),'description':a12_0x562351(0x1bd),'default':!![]},{'name':a12_0x562351(0x16c),'type':a12_0x562351(0x1c5),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x45cbfd){const _0x3403be=a12_0x562351;if(_0x45cbfd[_0x3403be(0x172)](_0x3403be(0x177)))throw CliErrors[_0x3403be(0x1be)](_0x3403be(0x18a),'Use\x20`'+CLI_BIN_NAME+_0x3403be(0x1a6)+CLI_BIN_NAME+_0x3403be(0x18b));const _0x2bd5e1=(_0x45cbfd[_0x3403be(0x176)]('access-key')||_0x45cbfd[_0x3403be(0x176)]('ak')||'')[_0x3403be(0x182)]();if(!_0x2bd5e1&&_0x45cbfd[_0x3403be(0x1ba)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x3899c9=await resolveAuthWriteInput(_0x45cbfd),_0x2787fe=resolveAuthScopeFlags(_0x45cbfd),_0x1383c3=readScopedConfig(_0x2787fe);_0x1383c3['accessKey']=_0x3899c9[_0x3403be(0x19d)];_0x3899c9['env']&&(_0x1383c3[_0x3403be(0x1b5)]=_0x3899c9[_0x3403be(0x1b5)]);writeScopedConfig(_0x1383c3,_0x2787fe);const _0x4f48e1=_0x2787fe[_0x3403be(0x193)]?_0x3403be(0x193):_0x3403be(0x16c),_0x4b01c4=_0x1383c3[_0x3403be(0x1b5)]?_0x3403be(0x19f)+_0x1383c3[_0x3403be(0x1b5)]+'.':'';return{'ok':!![],'message':_0x3403be(0x175)+_0x4f48e1+_0x3403be(0x199)+_0x4b01c4+_0x3403be(0x1b8)+CLI_BIN_NAME+_0x3403be(0x19c)};}},{'service':'auth','command':a12_0x562351(0x16f),'description':a12_0x562351(0x1bc),'risk':a12_0x562351(0x19e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x562351(0x1b4),'type':a12_0x562351(0x1ad),'description':a12_0x562351(0x16a)},{'name':'ak','type':a12_0x562351(0x1ad),'description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x562351(0x1b5),'type':a12_0x562351(0x1ad),'description':a12_0x562351(0x191)},{'name':a12_0x562351(0x193),'type':a12_0x562351(0x1c5),'description':a12_0x562351(0x1bd),'default':!![]},{'name':'project','type':a12_0x562351(0x1c5),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x1992d5){const _0x4b2f49=a12_0x562351,_0x5095f7=await resolveAuthWriteInput(_0x1992d5),_0x3c7b17=resolveAuthScopeFlags(_0x1992d5),_0x499257={'accessKey':_0x5095f7['accessKey']};_0x5095f7[_0x4b2f49(0x1b5)]&&(_0x499257['env']=_0x5095f7[_0x4b2f49(0x1b5)]);writeScopedConfig(_0x499257,_0x3c7b17);const _0x1f54e6=_0x3c7b17['global']?'global':_0x4b2f49(0x16c),_0x4ec63e=_0x499257[_0x4b2f49(0x1b5)]?_0x4b2f49(0x19f)+_0x499257[_0x4b2f49(0x1b5)]+'.':'';return{'ok':!![],'message':_0x4b2f49(0x1c2)+_0x1f54e6+'\x20scope.'+_0x4ec63e+_0x4b2f49(0x1b8)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':'auth','command':a12_0x562351(0x1a4),'description':a12_0x562351(0x1bb),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x562351(0x1c5),'description':a12_0x562351(0x16e),'default':!![]},{'name':a12_0x562351(0x16c),'type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0xb51d9a){const _0x1b8c4e=a12_0x562351,_0x1210e3=resolveAuthScopeFlags(_0xb51d9a),_0x2436ef=readScopedConfig(_0x1210e3),_0x3f5a3c=!!_0x2436ef[_0x1b8c4e(0x19d)];delete _0x2436ef[_0x1b8c4e(0x19d)],writeScopedConfig(_0x2436ef,_0x1210e3);const _0x3148c9=_0x1210e3['global']?_0x1b8c4e(0x193):_0x1b8c4e(0x16c);if(_0x3f5a3c)return{'ok':!![],'message':_0x1b8c4e(0x1c0)+_0x3148c9+_0x1b8c4e(0x199)};return{'ok':!![],'message':_0x1b8c4e(0x196)+_0x3148c9+_0x1b8c4e(0x17f)};}},{'service':a12_0x562351(0x170),'command':a12_0x562351(0x17e),'description':a12_0x562351(0x1b7),'risk':a12_0x562351(0x1a7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x562351(0x193),'type':a12_0x562351(0x1c5),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x562351(0x1c5),'description':a12_0x562351(0x18e),'default':![]},{'name':a12_0x562351(0x16d),'type':a12_0x562351(0x1c5),'description':a12_0x562351(0x18c),'default':![]}],async 'execute'(_0x44ebe7){const _0x38aeba=a12_0x562351,_0x2aaee7=resolveAuthScopeFlags(_0x44ebe7),_0xaced9b=readScopedConfig(_0x2aaee7),_0x30e1aa=productEnvName(_0x38aeba(0x198)),_0x5adb1a=productEnv('ACCESS_KEY')||undefined,_0x18303f=_0xaced9b[_0x38aeba(0x19d)]||undefined,_0xfea79=_0x5adb1a||_0x18303f,_0x11e5b0=_0x5adb1a?_0x30e1aa+'\x20env\x20var':_0x18303f?(_0x2aaee7[_0x38aeba(0x193)]?_0x38aeba(0x193):'project')+'\x20config':null,_0x40fcd0=[_0x38aeba(0x197)+AUTH_MODE[_0x38aeba(0x180)]];if(_0xfea79){const _0x52b06f=_0xfea79[_0x38aeba(0x1c4)]>0x8?''+_0xfea79['slice'](0x0,0x8)+'*'[_0x38aeba(0x17b)](_0xfea79[_0x38aeba(0x1c4)]-0x8):_0xfea79;_0x40fcd0[_0x38aeba(0x186)](_0x38aeba(0x1af)+_0x52b06f+(_0x11e5b0?_0x38aeba(0x189)+_0x11e5b0+')':'')),_0x40fcd0[_0x38aeba(0x186)]('Status:\x20valid');}if(!_0xfea79){_0x40fcd0[_0x38aeba(0x186)](''),_0x40fcd0[_0x38aeba(0x186)](_0x38aeba(0x169)),_0x40fcd0[_0x38aeba(0x186)](''),_0x40fcd0[_0x38aeba(0x186)](_0x38aeba(0x18d)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x40fcd0[_0x38aeba(0x186)](''),_0x40fcd0[_0x38aeba(0x186)](_0x38aeba(0x174)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x40fcd0[_0x38aeba(0x186)](_0x38aeba(0x168)),_0x40fcd0[_0x38aeba(0x186)](''),_0x40fcd0[_0x38aeba(0x186)]('Option\x20C:\x20environment\x20variable'),_0x40fcd0[_0x38aeba(0x186)](_0x38aeba(0x187)+_0x30e1aa+_0x38aeba(0x1a5)),_0x40fcd0[_0x38aeba(0x186)](''),_0x40fcd0[_0x38aeba(0x186)]('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x38aeba(0x19c)),_0x40fcd0[_0x38aeba(0x186)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x38aeba(0x181));if(_0x44ebe7['bool'](_0x38aeba(0x16d))){const _0x55df28=readStoredDeviceCode();if(_0x55df28&&!isStoredDeviceCodeExpired(_0x55df28)){const _0x375243=getUserDomain(),_0x263443=await fetchDeviceToken(_0x375243,_0x55df28[_0x38aeba(0x185)]);if(_0x263443[_0x38aeba(0x17e)]===_0x38aeba(0x1b3)&&_0x263443[_0x38aeba(0x173)]){const _0x511e3d={'global':_0x55df28[_0x38aeba(0x1ab)]===_0x38aeba(0x193)},_0x76e961=readScopedConfig(_0x511e3d);_0x76e961[_0x38aeba(0x19d)]=_0x263443[_0x38aeba(0x173)],writeScopedConfig(_0x76e961,_0x511e3d),deleteStoredDeviceCode();const _0xf67a7=_0x263443[_0x38aeba(0x173)],_0x310db8=_0xf67a7[_0x38aeba(0x1c4)]>0x8?''+_0xf67a7[_0x38aeba(0x1ae)](0x0,0x8)+'*'[_0x38aeba(0x17b)](_0xf67a7['length']-0x8):_0xf67a7,_0x571404=_0x55df28['scope']===_0x38aeba(0x193)?_0x38aeba(0x1c6):_0x38aeba(0x1a9);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE[_0x38aeba(0x180)],_0x38aeba(0x1af)+_0x310db8+'\x20(via\x20'+_0x571404+')',_0x38aeba(0x188)]['join']('\x0a')};}_0x263443[_0x38aeba(0x17e)]==='expired'&&deleteStoredDeviceCode();throw CliErrors['authRequired'](_0x38aeba(0x1b9));}throw CliErrors['authRequired'](_0x40fcd0[_0x38aeba(0x1ac)]('\x0a'));}}return{'ok':!![],'message':_0x40fcd0[_0x38aeba(0x1ac)]('\x0a')};}},{'service':a12_0x562351(0x170),'command':'info','description':a12_0x562351(0x1c1),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1ffd08){const _0x114fbf=a12_0x562351,_0x3c7743=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x3c7743,'meta':{'env':_0x1ffd08[_0x114fbf(0x178)]??_0x114fbf(0x17d)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x4ef7(){const _0x363cdb=['2008236xayXyQ','):\x20','SIGINT','7955040hKyyAj','4IVvMQB','stdin','112hnlxzk','close','race','82iRIiOn','1599966nPiKcW','177128yXaQth','once','AbortPrompt','AccessKey\x20(','name','AccessKey\x20(paste\x20ak_...):\x20','4612xZqwil','User\x20aborted\x20prompt','1585385OsCyxJ','trim','removeListener','1392738rjHQNE'];a13_0x4ef7=function(){return _0x363cdb;};return a13_0x4ef7();}(function(_0x5e5ac7,_0x1b7913){const _0x50c462=a13_0x4396,_0xa638b6=_0x5e5ac7();while(!![]){try{const _0x3d9554=-parseInt(_0x50c462(0x160))/0x1*(parseInt(_0x50c462(0x168))/0x2)+parseInt(_0x50c462(0x16d))/0x3+-parseInt(_0x50c462(0x15b))/0x4*(parseInt(_0x50c462(0x16a))/0x5)+-parseInt(_0x50c462(0x16e))/0x6+-parseInt(_0x50c462(0x162))/0x7*(parseInt(_0x50c462(0x15d))/0x8)+parseInt(_0x50c462(0x161))/0x9+parseInt(_0x50c462(0x171))/0xa;if(_0x3d9554===_0x1b7913)break;else _0xa638b6['push'](_0xa638b6['shift']());}catch(_0x1bf8f8){_0xa638b6['push'](_0xa638b6['shift']());}}}(a13_0x4ef7,0x3b2d9));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x46b5dc=a13_0x4396;super(_0x46b5dc(0x169)),this['name']='AbortPrompt';}}function createSafeRl(){const _0x3e5c30=a13_0x4396,_0x5df8a5=createInterface({'input':process[_0x3e5c30(0x15c)],'output':process['stdout']});let _0x1ed66e;const _0x4cfc5c=new Promise((_0x362df8,_0x19e603)=>{const _0x24ab71=_0x3e5c30;_0x1ed66e=()=>{const _0x4511d7=a13_0x4396;_0x1ed66e&&(_0x5df8a5['removeListener'](_0x4511d7(0x170),_0x1ed66e),_0x1ed66e=undefined);try{_0x5df8a5[_0x4511d7(0x15e)]();}catch{}_0x19e603(new AbortPrompt());},_0x5df8a5[_0x24ab71(0x163)]('SIGINT',_0x1ed66e);}),_0x1abad3=()=>{const _0x5ed824=_0x3e5c30;_0x1ed66e&&(_0x5df8a5[_0x5ed824(0x16c)](_0x5ed824(0x170),_0x1ed66e),_0x1ed66e=undefined);try{_0x5df8a5['close']();}catch{}};return{'rl':_0x5df8a5,'abortPromise':_0x4cfc5c,'disposeSuccess':_0x1abad3};}export async function promptAccessKey(_0x2cd428=''){const _0x13c726=a13_0x4396,{rl:_0x32d84a,abortPromise:_0x28d0c8,disposeSuccess:_0x4c8726}=createSafeRl(),_0x4592e1=new Promise(_0x26e6eb=>{const _0x238e49=a13_0x4396,_0x54d215=_0x2cd428?_0x238e49(0x165)+_0x2cd428+_0x238e49(0x16f):_0x238e49(0x167);_0x32d84a['question'](_0x54d215,_0x4c8e89=>{const _0x2d0d7c=_0x238e49;_0x4c8726(),_0x26e6eb(_0x4c8e89[_0x2d0d7c(0x16b)]()||_0x2cd428);});});return Promise[_0x13c726(0x15f)]([_0x4592e1,_0x28d0c8]);}function a13_0x4396(_0x4af2eb,_0x32d839){_0x4af2eb=_0x4af2eb-0x15b;const _0x4ef71d=a13_0x4ef7();let _0x4396f8=_0x4ef71d[_0x4af2eb];return _0x4396f8;}export function isAbortPrompt(_0x2ec788){const _0x46f777=a13_0x4396;return _0x2ec788 instanceof Error&&_0x2ec788[_0x46f777(0x166)]===_0x46f777(0x164);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x55ff15=a14_0x26c4;(function(_0x3f4ed3,_0x343eaa){const _0x211364=a14_0x26c4,_0x496f91=_0x3f4ed3();while(!![]){try{const _0x42193e=parseInt(_0x211364(0x1eb))/0x1*(parseInt(_0x211364(0x1e2))/0x2)+-parseInt(_0x211364(0x1e1))/0x3+parseInt(_0x211364(0x1df))/0x4+-parseInt(_0x211364(0x1e7))/0x5*(-parseInt(_0x211364(0x1ea))/0x6)+-parseInt(_0x211364(0x1f1))/0x7*(-parseInt(_0x211364(0x1e0))/0x8)+-parseInt(_0x211364(0x1e4))/0x9*(parseInt(_0x211364(0x1dd))/0xa)+-parseInt(_0x211364(0x1e8))/0xb;if(_0x42193e===_0x343eaa)break;else _0x496f91['push'](_0x496f91['shift']());}catch(_0x1dc1c6){_0x496f91['push'](_0x496f91['shift']());}}}(a14_0x5d72,0x4ea90));function a14_0x5d72(){const _0x28f2ac=['name','9HiwmbB','read','str','433805GYKfZT','5891556hHnXxo','Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','6cKugaV','2101MMJZik','functionName','(none)','gmtModified','bff','BFF\x20function\x20name','210esoHzN','appCode','description','version','4894310zRwjMt','detail','2074224BiKQff','108968FYYhNV','330117CpcwwM','422JSkkoT'];a14_0x5d72=function(){return _0x28f2ac;};return a14_0x5d72();}import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';function a14_0x26c4(_0x42ab9d,_0x14fe53){_0x42ab9d=_0x42ab9d-0x1db;const _0x5d729f=a14_0x5d72();let _0x26c46a=_0x5d729f[_0x42ab9d];return _0x26c46a;}export const bffDetail={'service':a14_0x55ff15(0x1ef),'command':a14_0x55ff15(0x1de),'description':a14_0x55ff15(0x1e9),'risk':a14_0x55ff15(0x1e5),'flags':[{...NAME_FLAG,'required':!![],'description':a14_0x55ff15(0x1f0)}],async 'execute'(_0x50f32c){const _0x386ef6=a14_0x55ff15,_0x4a461f=await getBffEndpointContract(_0x50f32c[_0x386ef6(0x1f2)],_0x50f32c[_0x386ef6(0x1e6)](_0x386ef6(0x1e3)));return{'ok':!![],'data':{'appCode':_0x4a461f['appCode'],'functionName':_0x4a461f[_0x386ef6(0x1ec)],'description':_0x4a461f[_0x386ef6(0x1db)]||_0x386ef6(0x1ed),'version':_0x4a461f[_0x386ef6(0x1dc)],'gmtModified':_0x4a461f[_0x386ef6(0x1ee)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x5a968e=a15_0x2e1b;(function(_0x2c1227,_0x2b4ea3){const _0x370dee=a15_0x2e1b,_0x25af7d=_0x2c1227();while(!![]){try{const _0x440382=-parseInt(_0x370dee(0xaa))/0x1*(-parseInt(_0x370dee(0xad))/0x2)+parseInt(_0x370dee(0xb2))/0x3*(parseInt(_0x370dee(0xa8))/0x4)+parseInt(_0x370dee(0xab))/0x5+parseInt(_0x370dee(0xa4))/0x6+-parseInt(_0x370dee(0xb0))/0x7+-parseInt(_0x370dee(0xae))/0x8+parseInt(_0x370dee(0xa9))/0x9*(-parseInt(_0x370dee(0xa6))/0xa);if(_0x440382===_0x2b4ea3)break;else _0x25af7d['push'](_0x25af7d['shift']());}catch(_0x5d5724){_0x25af7d['push'](_0x25af7d['shift']());}}}(a15_0x36af,0x9f542));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a15_0x2e1b(_0x40f6d3,_0x543600){_0x40f6d3=_0x40f6d3-0xa4;const _0x36af4e=a15_0x36af();let _0x2e1b93=_0x36af4e[_0x40f6d3];return _0x2e1b93;}export const bffExec={'service':'bff','command':a15_0x5a968e(0xaf),'description':a15_0x5a968e(0xac),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x1a4101){const _0x29ea6e=a15_0x5a968e,_0x92d4aa=parseJsonParams(_0x1a4101['str']('params')),_0x3c828d=Date[_0x29ea6e(0xa7)](),_0x320dc2=await executeSdkBff(_0x1a4101['str'](_0x29ea6e(0xb1)),_0x92d4aa),_0xed1439=Date[_0x29ea6e(0xa7)]()-_0x3c828d;return{'ok':!![],'data':{'result':_0x320dc2,'elapsed':_0xed1439},'message':_0x29ea6e(0xa5)+_0xed1439+'ms'};}};function a15_0x36af(){const _0x2dda56=['BFF\x20executed\x20in\x20','10LUgNYk','now','387356POOcKH','4081014RJAAMb','298169xVkwHg','6245455NiWUtP','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','2CZOdjT','8414240WtXBbA','exec','5080894lLNLzD','name','24kULqZy','3370236NMbVLF'];a15_0x36af=function(){return _0x2dda56;};return a15_0x36af();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d41a6,_0x44f8ea){const _0x1be84b=a16_0x2559,_0x3472d5=_0x2d41a6();while(!![]){try{const _0x18da11=parseInt(_0x1be84b(0x12a))/0x1*(-parseInt(_0x1be84b(0x124))/0x2)+parseInt(_0x1be84b(0x12c))/0x3+-parseInt(_0x1be84b(0x123))/0x4+-parseInt(_0x1be84b(0x128))/0x5*(-parseInt(_0x1be84b(0x125))/0x6)+parseInt(_0x1be84b(0x129))/0x7+parseInt(_0x1be84b(0x12b))/0x8*(-parseInt(_0x1be84b(0x12d))/0x9)+-parseInt(_0x1be84b(0x127))/0xa*(-parseInt(_0x1be84b(0x126))/0xb);if(_0x18da11===_0x44f8ea)break;else _0x3472d5['push'](_0x3472d5['shift']());}catch(_0x181e4d){_0x3472d5['push'](_0x3472d5['shift']());}}}(a16_0x25b4,0x582de));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a16_0x2559(_0x1945f3,_0x3d3963){_0x1945f3=_0x1945f3-0x123;const _0x25b4ac=a16_0x25b4();let _0x2559a9=_0x25b4ac[_0x1945f3];return _0x2559a9;}export const bffDefinitions=[bffDetail,bffExec];function a16_0x25b4(){const _0x41209b=['913288ZIoLZU','764427PXBcfl','27QjlZzH','1840632zlLdvk','2ZlSvLY','90aHhMot','235499BsiIYj','310XXrMeq','221195bEKjUd','1563772TmGQYd','641646zYijHx'];a16_0x25b4=function(){return _0x41209b;};return a16_0x25b4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0xc018d6=a17_0x2f3f;(function(_0x580b9b,_0x497fdc){const _0x323a6a=a17_0x2f3f,_0x514a3f=_0x580b9b();while(!![]){try{const _0x32ef28=parseInt(_0x323a6a(0x15d))/0x1+-parseInt(_0x323a6a(0x14c))/0x2*(parseInt(_0x323a6a(0x143))/0x3)+-parseInt(_0x323a6a(0x14a))/0x4+parseInt(_0x323a6a(0x14e))/0x5*(-parseInt(_0x323a6a(0x156))/0x6)+-parseInt(_0x323a6a(0x158))/0x7*(-parseInt(_0x323a6a(0x159))/0x8)+-parseInt(_0x323a6a(0x15a))/0x9*(parseInt(_0x323a6a(0x14d))/0xa)+parseInt(_0x323a6a(0x15f))/0xb*(parseInt(_0x323a6a(0x160))/0xc);if(_0x32ef28===_0x497fdc)break;else _0x514a3f['push'](_0x514a3f['shift']());}catch(_0x434935){_0x514a3f['push'](_0x514a3f['shift']());}}}(a17_0x3f6d,0x9b4fc));import{CliErrors}from'../../errors.js';function a17_0x2f3f(_0x4eb66e,_0x59385e){_0x4eb66e=_0x4eb66e-0x143;const _0x3f6dfb=a17_0x3f6d();let _0x2f3f26=_0x3f6dfb[_0x4eb66e];return _0x2f3f26;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a17_0xc018d6(0x14f),'command':a17_0xc018d6(0x152),'description':a17_0xc018d6(0x154),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2f1492){const _0x45b002=a17_0xc018d6;logger[_0x45b002(0x155)](process['cwd']()),logger[_0x45b002(0x145)](_0x45b002(0x161),_0x45b002(0x151));const {LOVRABET_SKILL_SOURCE:_0x1a2bd2,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x4b0abd,runNpxSkillsAddGlobal:_0x21c2f4}=await import(_0x45b002(0x147)),_0x130cc4=_0x2f1492[_0x45b002(0x15e)]?'pipe':_0x45b002(0x153);console[_0x45b002(0x144)](_0x45b002(0x157)+_0x1a2bd2+_0x45b002(0x150));const _0x1cf219=_0x21c2f4(process[_0x45b002(0x146)](),_0x1a2bd2,{'stdio':_0x130cc4});if(_0x1cf219['skipped'])console[_0x45b002(0x144)]('Skipped\x20npx\x20('+_0x4b0abd+_0x45b002(0x162));else{if(_0x1cf219['ok'])console[_0x45b002(0x144)](_0x45b002(0x15c));else throw CliErrors[_0x45b002(0x149)](_0x45b002(0x15b)+(_0x1cf219[_0x45b002(0x14b)]||_0x45b002(0x148)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20'+_0x1a2bd2+'\x20-g\x20-y');}return{'ok':!![]};}}];function a17_0x3f6d(){const _0x14a33c=['安装\x20Lovrabet\x20运行态所需的\x20CLI\x20内置\x20Skill','setLogPath','12378sYRcAY','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','1698053EBGNNd','8WpJepy','99342ZmmCOb','npx\x20skills\x20add\x20failed:\x20','CLI\x20Built-in\x20Skill\x20installed','92092SJQiez','nonInteractive','44077lFAXBP','7692GeYNZp','cli-skill-install','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','18CVVhxA','log','info','cwd','../../skills/npx-skills-add.js','unknown','apiError','3937192mbzSXG','error','204282CoOZhY','20mgdbCT','1570LcgdFY','cli-skill','\x20-g\x20-y)...','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','install','inherit'];a17_0x3f6d=function(){return _0x14a33c;};return a17_0x3f6d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fddb4,_0xc88013){const _0x3ad0f8=a18_0x1be3,_0x5020b4=_0x3fddb4();while(!![]){try{const _0x536d86=-parseInt(_0x3ad0f8(0xbf))/0x1+-parseInt(_0x3ad0f8(0xc2))/0x2+parseInt(_0x3ad0f8(0xbe))/0x3+-parseInt(_0x3ad0f8(0xc9))/0x4*(-parseInt(_0x3ad0f8(0xce))/0x5)+parseInt(_0x3ad0f8(0xd1))/0x6*(parseInt(_0x3ad0f8(0xcc))/0x7)+parseInt(_0x3ad0f8(0xcf))/0x8*(parseInt(_0x3ad0f8(0xc5))/0x9)+-parseInt(_0x3ad0f8(0xc6))/0xa;if(_0x536d86===_0xc88013)break;else _0x5020b4['push'](_0x5020b4['shift']());}catch(_0xf2a71c){_0x5020b4['push'](_0x5020b4['shift']());}}}(a18_0xdaf9,0x33a78));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';function a18_0xdaf9(){const _0x11859b=['739050oqKFLW','8zIPGbb','global-default','6tsfkyd','project-or-global-explicit','Add\x20--global\x20to\x20write\x20to\x20~/','950148xasMUu','157538BOsihE','inProject',',\x20or\x20run\x20`','648796VnxeWO','\x20found).','Not\x20inside\x20a\x20project\x20(no\x20','1391517TleFMr','3411940odQRrH','validation','\x20(global)','4EKeQAT','global','newConfigFileName','2908969sCgbPd','project'];a18_0xdaf9=function(){return _0x11859b;};return a18_0xdaf9();}export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a18_0x1be3(_0x2b0201,_0x2ec955){_0x2b0201=_0x2b0201-0xbe;const _0xdaf9b7=a18_0xdaf9();let _0x1be3ae=_0xdaf9b7[_0x2b0201];return _0x1be3ae;}export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x35c029){const _0x159c56=a18_0x1be3,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x3d995c}=_0x35c029;if(explicitGlobal&&explicitProject)throw CliErrors[_0x159c56(0xc7)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0x159c56(0xca);if(explicitProject)return _0x159c56(0xcd);switch(_0x3d995c){case _0x159c56(0xd0):return'global';case'project-default':return _0x35c029['inProject']??isInProject()?'project':'global';case _0x159c56(0xd2):if(!(_0x35c029[_0x159c56(0xc0)]??isInProject()))throw CliErrors[_0x159c56(0xc7)](_0x159c56(0xc4)+PRODUCT_CONFIG['newConfigFileName']+_0x159c56(0xc3),_0x159c56(0xd3)+PRODUCT_CONFIG[_0x159c56(0xcb)]+_0x159c56(0xc1)+CLI_BIN_NAME+'\x20init`\x20first.');return'project';}}export function toScopeFlags(_0x57db07){const _0x37f310=a18_0x1be3;return{'global':_0x57db07===_0x37f310(0xca)};}export function formatScopeLabel(_0x4f9370){const _0x1825f4=a18_0x1be3;return _0x4f9370==='global'?_0x1825f4(0xc8):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a19_0x35cf(_0x2a17d7,_0x4bd618){_0x2a17d7=_0x2a17d7-0xf2;const _0x2a8c96=a19_0x2a8c();let _0x35cf94=_0x2a8c96[_0x2a17d7];return _0x35cf94;}(function(_0x59b420,_0x1a44de){const _0x4bb9bf=a19_0x35cf,_0x2903dc=_0x59b420();while(!![]){try{const _0x2705a4=parseInt(_0x4bb9bf(0x105))/0x1+-parseInt(_0x4bb9bf(0x108))/0x2*(-parseInt(_0x4bb9bf(0xf5))/0x3)+-parseInt(_0x4bb9bf(0x10a))/0x4+-parseInt(_0x4bb9bf(0x103))/0x5*(parseInt(_0x4bb9bf(0x109))/0x6)+-parseInt(_0x4bb9bf(0xf9))/0x7*(-parseInt(_0x4bb9bf(0xff))/0x8)+-parseInt(_0x4bb9bf(0xfc))/0x9*(-parseInt(_0x4bb9bf(0xfd))/0xa)+-parseInt(_0x4bb9bf(0xf6))/0xb;if(_0x2705a4===_0x1a44de)break;else _0x2903dc['push'](_0x2903dc['shift']());}catch(_0x5389f4){_0x2903dc['push'](_0x2903dc['shift']());}}}(a19_0x2a8c,0x18ad0));import{CliErrors}from'../../errors.js';function isSet(_0x1c612c,_0x420385){const _0x2e1e02=a19_0x35cf,_0xf3f651=_0x1c612c[_0x2e1e02(0x10c)](_0x420385);return _0xf3f651!==undefined&&_0xf3f651!==''&&_0xf3f651!==![]&&_0xf3f651!==0x0;}function fmtNames(_0x1eade3){const _0x5a2193=a19_0x35cf;return _0x1eade3['map'](_0xf15594=>'--'+_0xf15594)[_0x5a2193(0xfe)](',\x20');}export function requireOneOf(_0x3f3d34,_0x4dfbdb,_0x5db31c){const _0x48aec9=a19_0x35cf,_0x5f0915=_0x4dfbdb[_0x48aec9(0xf2)](_0x8344cc=>isSet(_0x3f3d34,_0x8344cc));if(_0x5f0915[_0x48aec9(0x101)]!==0x1)throw CliErrors[_0x48aec9(0x106)](_0x5f0915['length']===0x0?_0x48aec9(0xf3)+fmtNames(_0x4dfbdb)+_0x48aec9(0xf4)+_0x5db31c+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x4dfbdb)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x5f0915)+'.',_0x5f0915[_0x48aec9(0x101)]===0x0?_0x48aec9(0xfb)+fmtNames(_0x4dfbdb):_0x48aec9(0x10b));}export function requireAnyOf(_0x5e38be,_0x4c47c6,_0x2a1242){const _0x1d4d36=a19_0x35cf;if(!_0x4c47c6[_0x1d4d36(0xf8)](_0x574516=>isSet(_0x5e38be,_0x574516)))throw CliErrors['validation'](_0x1d4d36(0x107)+fmtNames(_0x4c47c6)+'\x20is\x20required\x20for\x20`'+_0x2a1242+'`.',_0x1d4d36(0xfb)+fmtNames(_0x4c47c6));}export function mutuallyExclusive(_0x55ec17,_0x39566d,_0x4f3f05){const _0xf566c5=a19_0x35cf,_0x2b9242=_0x39566d['filter'](_0x3edab9=>isSet(_0x55ec17,_0x3edab9));if(_0x2b9242[_0xf566c5(0x101)]>0x1)throw CliErrors[_0xf566c5(0x106)](_0xf566c5(0x102)+fmtNames(_0x2b9242)+_0xf566c5(0xf7)+_0x4f3f05+'`.',_0xf566c5(0x104)+fmtNames(_0x39566d));}export function validatePattern(_0x1416b7,_0x2fec00,_0x33cae0,_0x2279cb){const _0x5a5710=a19_0x35cf,_0xf3e6a3=_0x1416b7['str'](_0x2fec00);if(_0xf3e6a3&&!_0x33cae0['test'](_0xf3e6a3))throw CliErrors['validation'](_0x5a5710(0x100)+_0x2fec00+':\x20expected\x20'+_0x2279cb+_0x5a5710(0xfa)+_0xf3e6a3+'\x22.');}function a19_0x2a8c(){const _0x2df6ac=['2097975xmRKkB','\x20are\x20mutually\x20exclusive\x20for\x20`','some','10178QfStUg',',\x20got\x20\x22','Provide\x20one\x20of:\x20','19089ilmNWb','930NFRqfJ','join','680RUGygK','Invalid\x20--','length','Flags\x20','249055xDQltg','Use\x20only\x20one\x20of:\x20','94602ydaENy','validation','At\x20least\x20one\x20of\x20','6OOAnuO','18KlIAkN','508992sThztU','Remove\x20all\x20but\x20one.','flag','filter','Exactly\x20one\x20of\x20','\x20is\x20required\x20for\x20`','153033YbuKyT'];a19_0x2a8c=function(){return _0x2df6ac;};return a19_0x2a8c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x566e45=a20_0x48fa;(function(_0x5b19a8,_0x4e5f43){const _0x3ccfd9=a20_0x48fa,_0x488fbe=_0x5b19a8();while(!![]){try{const _0x385c7e=parseInt(_0x3ccfd9(0xb1))/0x1*(-parseInt(_0x3ccfd9(0xa6))/0x2)+parseInt(_0x3ccfd9(0xb2))/0x3*(parseInt(_0x3ccfd9(0xa5))/0x4)+-parseInt(_0x3ccfd9(0xae))/0x5+parseInt(_0x3ccfd9(0x9f))/0x6+-parseInt(_0x3ccfd9(0xa9))/0x7+-parseInt(_0x3ccfd9(0xaf))/0x8+-parseInt(_0x3ccfd9(0xa2))/0x9*(-parseInt(_0x3ccfd9(0xa4))/0xa);if(_0x385c7e===_0x4e5f43)break;else _0x488fbe['push'](_0x488fbe['shift']());}catch(_0x33c3ca){_0x488fbe['push'](_0x488fbe['shift']());}}}(a20_0x55fd,0x85127));export const CODE_FLAG={'name':'code','type':a20_0x566e45(0xa3),'required':!![],'description':a20_0x566e45(0xa0),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a20_0x566e45(0xab)}};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x566e45(0xa8)}};export const VERBOSE_FLAG={'name':a20_0x566e45(0xaa),'type':a20_0x566e45(0xad),'description':a20_0x566e45(0xac)};function a20_0x48fa(_0x55a10a,_0x254983){_0x55a10a=_0x55a10a-0x9f;const _0x55fd97=a20_0x55fd();let _0x48fad7=_0x55fd97[_0x55a10a];return _0x48fad7;}export const PARAMS_FLAG={'name':'params','type':'string','description':a20_0x566e45(0xa7)};export const NAME_FLAG={'name':'name','type':a20_0x566e45(0xa3),'description':a20_0x566e45(0xa1)};export const ID_FLAG={'name':'id','type':a20_0x566e45(0xb0),'required':!![],'description':'Resource\x20ID'};function a20_0x55fd(){const _0x1879ae=['5070448XumLKA','number','17gYGGkn','9MzBWmv','2861436QVFfSX','Dataset\x20code\x20(32-char\x20hex\x20UUID)','Resource\x20name\x20for\x20lookup','63AXTvZt','string','4032840VslAgk','549820UFthXu','57238IlIGWo','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','6985440IyRrBW','verbose','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','Return\x20full\x20raw\x20response\x20object','boolean','5244735ysgffN'];a20_0x55fd=function(){return _0x1879ae;};return a20_0x55fd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d4dbf,_0x510c31){const _0x1fe90b=a21_0x4b3e,_0x2e3f75=_0x1d4dbf();while(!![]){try{const _0x3a06cd=parseInt(_0x1fe90b(0x1ee))/0x1*(-parseInt(_0x1fe90b(0x1f0))/0x2)+parseInt(_0x1fe90b(0x1e3))/0x3+-parseInt(_0x1fe90b(0x1e5))/0x4+parseInt(_0x1fe90b(0x1f1))/0x5*(parseInt(_0x1fe90b(0x1f2))/0x6)+-parseInt(_0x1fe90b(0x1ec))/0x7*(parseInt(_0x1fe90b(0x1e1))/0x8)+parseInt(_0x1fe90b(0x1ed))/0x9+parseInt(_0x1fe90b(0x1e2))/0xa;if(_0x3a06cd===_0x510c31)break;else _0x2e3f75['push'](_0x2e3f75['shift']());}catch(_0x2da865){_0x2e3f75['push'](_0x2e3f75['shift']());}}}(a21_0x9bf0,0xd3238));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a21_0x9bf0(){const _0x4c1a57=['5165108NwQiLU','File\x20not\x20found:\x20','validation','ceil','isFile','\x20MB','trim','125111YszbOD','10802124LBBBim','449jdjruT','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','4742BrVoKQ','31885qTnYfs','912HavGNo','\x20path\x20is\x20required.','size','384UUSrTX','13969920SkqVuv','1536156gdsaXZ','toFixed'];a21_0x9bf0=function(){return _0x4c1a57;};return a21_0x9bf0();}function a21_0x4b3e(_0x586397,_0x262805){_0x586397=_0x586397-0x1e0;const _0x9bf0bd=a21_0x9bf0();let _0x4b3ecb=_0x9bf0bd[_0x586397];return _0x4b3ecb;}const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x42b01a){const _0x6cb98a=a21_0x4b3e;if(_0x42b01a>=BYTES_PER_MB){const _0x56c838=Math[_0x6cb98a(0x1e8)](_0x42b01a/BYTES_PER_MB*0x64)/0x64;return _0x56c838[_0x6cb98a(0x1e4)](0x2)+_0x6cb98a(0x1ea);}return _0x42b01a+'\x20B';}export function requireRuntimeUploadFile(_0x40611e,_0x3509d0){const _0x2467ae=a21_0x4b3e,_0x3a5396=_0x40611e[_0x2467ae(0x1eb)]();if(!_0x3a5396)throw CliErrors[_0x2467ae(0x1e7)](_0x3509d0+_0x2467ae(0x1f3));if(!existsSync(_0x3a5396))throw CliErrors['validation'](_0x2467ae(0x1e6)+_0x3a5396);const _0x3c8b61=statSync(_0x3a5396);if(!_0x3c8b61[_0x2467ae(0x1e9)]())throw CliErrors[_0x2467ae(0x1e7)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x3a5396);if(_0x3c8b61['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x2467ae(0x1e7)](_0x2467ae(0x1ef)+_0x3a5396+'\x20('+formatBytes(_0x3c8b61[_0x2467ae(0x1e0)])+')');return{'path':_0x3a5396,'size':_0x3c8b61[_0x2467ae(0x1e0)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x457ff7=a22_0x412e;(function(_0x52e1b1,_0xe00372){const _0x40fc0c=a22_0x412e,_0x19bbc5=_0x52e1b1();while(!![]){try{const _0x56e04e=parseInt(_0x40fc0c(0x17a))/0x1+parseInt(_0x40fc0c(0x16a))/0x2*(parseInt(_0x40fc0c(0x17c))/0x3)+-parseInt(_0x40fc0c(0x192))/0x4+parseInt(_0x40fc0c(0x17d))/0x5+parseInt(_0x40fc0c(0x176))/0x6+parseInt(_0x40fc0c(0x174))/0x7*(parseInt(_0x40fc0c(0x177))/0x8)+-parseInt(_0x40fc0c(0x181))/0x9*(parseInt(_0x40fc0c(0x159))/0xa);if(_0x56e04e===_0xe00372)break;else _0x19bbc5['push'](_0x19bbc5['shift']());}catch(_0x8cec2d){_0x19bbc5['push'](_0x19bbc5['shift']());}}}(a22_0x9278,0x39401));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_0x457ff7(0x16e),'type':a22_0x457ff7(0x186),'description':a22_0x457ff7(0x18b),'default':![]};function parseAliasAppcodeSetKey(_0x479962){const _0x5cdfb6=a22_0x457ff7,_0x27b7cc=_0x479962[_0x5cdfb6(0x15b)]('.');if(_0x27b7cc[_0x5cdfb6(0x183)]!==0x3||_0x27b7cc[0x0]!==_0x5cdfb6(0x173)||_0x27b7cc[0x2]!=='appcode')return undefined;const _0x581780=_0x27b7cc[0x1]?.['trim']();return _0x581780?_0x581780:undefined;}function a22_0x412e(_0x43ffbc,_0x324d97){_0x43ffbc=_0x43ffbc-0x157;const _0x92786c=a22_0x9278();let _0x412e44=_0x92786c[_0x43ffbc];return _0x412e44;}function parseAliasDeleteKey(_0x408b11){const _0x5838c0=a22_0x457ff7,_0x4feba9=_0x408b11[_0x5838c0(0x15b)]('.');if(_0x4feba9[_0x5838c0(0x183)]===0x2&&_0x4feba9[0x0]===_0x5838c0(0x173)){const _0x3b2851=_0x4feba9[0x1]?.[_0x5838c0(0x172)]();return _0x3b2851?{'alias':_0x3b2851}:undefined;}if(_0x4feba9[_0x5838c0(0x183)]===0x3&&_0x4feba9[0x0]===_0x5838c0(0x173)&&_0x4feba9[0x2]===_0x5838c0(0x17b)){const _0x2af6c8=_0x4feba9[0x1]?.[_0x5838c0(0x172)]();return _0x2af6c8?{'alias':_0x2af6c8,'field':_0x5838c0(0x17b)}:undefined;}return undefined;}function a22_0x9278(){const _0x3d1973=['3XGFGcy','1943540woLbtP','stringify','pretty','(none)','1116ioZmGD','\x20(global)','length','keys','pageSize\x20must\x20be\x20a\x20positive\x20number','boolean','args','Key\x20\x22','field','project-or-global-explicit','Write\x20to\x20global\x20config','pageSize','alias','object','set','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Set\x20a\x20config\x20value','1832640qUjKRM','\x20\x20project:\x20','Key\x20not\x20found:\x20','Invalid\x20value\x20for\x20\x22','config','../../context.js','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','32660hRyqNV','Missing\x20key\x20or\x20value.','split',';\x20apps.<alias>.appcode','Deleted\x20`','bool','includes','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','Delete\x20a\x20config\x20value','isArray','format','delete','Usage:\x20','\x20config\x20get\x20<key>','read','`\x20=\x20\x22','value','466546REdnwQ','validation','key','get','global','raw','log','riskLevel','trim','apps','7hCbEUe','Get\x20a\x20config\x20value','1665528eLjDhH','1266632ILOXMY','\x20config\x20set\x20<key>\x20<value>\x20[--global]','write','39743elHmus','appcode'];a22_0x9278=function(){return _0x3d1973;};return a22_0x9278();}function setLocalAppAlias(_0x25116a,_0x4e1314,_0x1bc016){const _0x1f682d=a22_0x457ff7,_0x5d18e1=_0x25116a[_0x1f682d(0x173)]&&typeof _0x25116a[_0x1f682d(0x173)]==='object'&&!Array['isArray'](_0x25116a['apps'])?_0x25116a[_0x1f682d(0x173)]:{},_0x242e7f=_0x5d18e1[_0x4e1314]&&typeof _0x5d18e1[_0x4e1314]===_0x1f682d(0x18e)&&!Array[_0x1f682d(0x162)](_0x5d18e1[_0x4e1314])?_0x5d18e1[_0x4e1314]:{};_0x242e7f[_0x1f682d(0x17b)]=_0x1bc016,_0x5d18e1[_0x4e1314]=_0x242e7f,_0x25116a[_0x1f682d(0x173)]=_0x5d18e1;}function deleteLocalAppAlias(_0x53028d,_0x4b6669){const _0x2533fd=a22_0x457ff7;if(!_0x53028d[_0x2533fd(0x173)]||typeof _0x53028d[_0x2533fd(0x173)]!==_0x2533fd(0x18e)||Array[_0x2533fd(0x162)](_0x53028d[_0x2533fd(0x173)]))return![];const _0x51d716=_0x53028d[_0x2533fd(0x173)],_0x2cc9e7=_0x51d716[_0x4b6669[_0x2533fd(0x18d)]];if(!_0x2cc9e7||typeof _0x2cc9e7!==_0x2533fd(0x18e)||Array[_0x2533fd(0x162)](_0x2cc9e7))return![];if(!_0x4b6669[_0x2533fd(0x189)])return delete _0x51d716[_0x4b6669[_0x2533fd(0x18d)]],!![];if(!(_0x4b6669[_0x2533fd(0x189)]in _0x2cc9e7))return![];return delete _0x2cc9e7[_0x4b6669[_0x2533fd(0x189)]],Object[_0x2533fd(0x184)](_0x2cc9e7)['length']===0x0&&delete _0x51d716[_0x4b6669[_0x2533fd(0x18d)]],!![];}const listDef={'service':a22_0x457ff7(0x196),'command':'list','description':'List\x20current\x20config','risk':a22_0x457ff7(0x167),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x500fb5){const _0x43c03b=a22_0x457ff7,{buildConfigFromFlags:_0x377771}=await import(_0x43c03b(0x157)),_0x41c79c=_0x377771({}),_0x56125d=getProjectConfigPath(),_0x2ef362=resolveWriteConfigPath(_0x43c03b(0x16e));if(_0x500fb5[_0x43c03b(0x163)]===_0x43c03b(0x17f))return{'ok':!![],'message':_0x43c03b(0x158)+(JSON[_0x43c03b(0x17e)](_0x41c79c[_0x43c03b(0x16f)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x43c03b(0x193)+(_0x56125d??_0x43c03b(0x180))+'\x0a')+('\x20\x20global:\x20\x20'+_0x2ef362)};return{'ok':!![],'data':{'effective':_0x41c79c[_0x43c03b(0x16f)],'configFiles':{'project':_0x56125d??null,'global':_0x2ef362}}};}},getDef={'service':a22_0x457ff7(0x196),'command':a22_0x457ff7(0x16d),'description':a22_0x457ff7(0x175),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x457ff7(0x16c),'description':a22_0x457ff7(0x160),'required':!![]}],'flags':[],async 'execute'(_0x2a36d3){const _0x58adf7=a22_0x457ff7,_0xc7f4d8=_0x2a36d3[_0x58adf7(0x187)][0x0];if(!_0xc7f4d8)throw CliErrors[_0x58adf7(0x16b)]('Missing\x20key\x20argument.',_0x58adf7(0x165)+CLI_BIN_NAME+_0x58adf7(0x166));const {buildConfigFromFlags:_0x319303}=await import('../../context.js'),{raw:_0x5776be}=_0x319303({});if(_0xc7f4d8['includes']('.')){const _0x3cc311=_0xc7f4d8[_0x58adf7(0x15b)]('.');let _0x3c608c=_0x5776be;for(const _0x34bba7 of _0x3cc311){if(_0x3c608c==null||typeof _0x3c608c!==_0x58adf7(0x18e))throw CliErrors['validation'](_0x58adf7(0x194)+_0xc7f4d8);_0x3c608c=_0x3c608c[_0x34bba7];}if(_0x3c608c===undefined)throw CliErrors[_0x58adf7(0x16b)]('Key\x20not\x20found:\x20'+_0xc7f4d8);return console['log'](typeof _0x3c608c===_0x58adf7(0x18e)?JSON['stringify'](_0x3c608c,null,0x2):String(_0x3c608c)),{'ok':!![]};}const _0x40ff41=_0x5776be[_0xc7f4d8];if(_0x40ff41===undefined)throw CliErrors['validation'](_0x58adf7(0x194)+_0xc7f4d8);return console[_0x58adf7(0x170)](typeof _0x40ff41===_0x58adf7(0x18e)?JSON[_0x58adf7(0x17e)](_0x40ff41,null,0x2):String(_0x40ff41)),{'ok':!![]};}},setDef={'service':a22_0x457ff7(0x196),'command':a22_0x457ff7(0x18f),'description':a22_0x457ff7(0x191),'risk':a22_0x457ff7(0x179),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x457ff7(0x16c),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x457ff7(0x169),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x40d823){const _0x1a1892=a22_0x457ff7,_0x5cc59e=_0x40d823[_0x1a1892(0x187)][0x0],_0x148e93=_0x40d823[_0x1a1892(0x187)][0x1];if(!_0x5cc59e||_0x148e93===undefined)throw CliErrors[_0x1a1892(0x16b)](_0x1a1892(0x15a),_0x1a1892(0x165)+CLI_BIN_NAME+_0x1a1892(0x178));if(ENUM_KEYS[_0x5cc59e]&&!ENUM_KEYS[_0x5cc59e][_0x1a1892(0x15f)](_0x148e93))throw CliErrors[_0x1a1892(0x16b)](_0x1a1892(0x195)+_0x5cc59e+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x5cc59e]['join'](',\x20'));if(_0x5cc59e===_0x1a1892(0x171))throw CliErrors['validation'](_0x1a1892(0x190));if(_0x5cc59e==='pageSize'){const _0x4a7e81=Number(_0x148e93);if(isNaN(_0x4a7e81)||_0x4a7e81<=0x0)throw CliErrors['validation'](_0x1a1892(0x185));}const _0x44bb24=resolveWriteScope({'explicitGlobal':_0x40d823[_0x1a1892(0x15e)](_0x1a1892(0x16e)),'policy':_0x1a1892(0x18a)}),_0x531843=toScopeFlags(_0x44bb24),_0x1893da=readScopedConfig(_0x531843),_0x3f52c1=parseAliasAppcodeSetKey(_0x5cc59e);if(!_0x3f52c1&&!isTopLevelConfigKey(_0x5cc59e))throw CliErrors[_0x1a1892(0x16b)]('Top-level\x20key\x20\x22'+_0x5cc59e+'\x22\x20is\x20not\x20settable.','Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x1a1892(0x15c));return _0x3f52c1?setLocalAppAlias(_0x1893da,_0x3f52c1,_0x148e93):_0x1893da[_0x5cc59e]=_0x5cc59e===_0x1a1892(0x18c)?Number(_0x148e93):_0x148e93,console['log']('Set\x20`'+_0x5cc59e+_0x1a1892(0x168)+_0x148e93+'\x22'+(_0x44bb24===_0x1a1892(0x16e)?_0x1a1892(0x182):'')),writeScopedConfig(_0x1893da,_0x531843),{'ok':!![]};}},deleteDef={'service':a22_0x457ff7(0x196),'command':a22_0x457ff7(0x164),'description':a22_0x457ff7(0x161),'risk':a22_0x457ff7(0x179),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x457ff7(0x16c),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1ef59e){const _0x48f9ea=a22_0x457ff7,_0x30f45e=_0x1ef59e[_0x48f9ea(0x187)][0x0];if(!_0x30f45e)throw CliErrors['validation']('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x1d5ec9=resolveWriteScope({'explicitGlobal':_0x1ef59e[_0x48f9ea(0x15e)](_0x48f9ea(0x16e)),'policy':'project-or-global-explicit'}),_0x5ca65c=toScopeFlags(_0x1d5ec9),_0xffa3de=readScopedConfig(_0x5ca65c),_0x5be7d9=parseAliasDeleteKey(_0x30f45e);if(_0x5be7d9){if(!deleteLocalAppAlias(_0xffa3de,_0x5be7d9))throw CliErrors[_0x48f9ea(0x16b)](_0x48f9ea(0x194)+_0x30f45e);return console['log'](_0x48f9ea(0x15d)+_0x30f45e+'`'+(_0x1d5ec9===_0x48f9ea(0x16e)?_0x48f9ea(0x182):'')),writeScopedConfig(_0xffa3de,_0x5ca65c),{'ok':!![]};}if(_0xffa3de[_0x30f45e]===undefined)throw CliErrors[_0x48f9ea(0x16b)](_0x48f9ea(0x188)+_0x30f45e+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0xffa3de[_0x30f45e],console[_0x48f9ea(0x170)]('Deleted\x20`'+_0x30f45e+'`'+(_0x1d5ec9==='global'?_0x48f9ea(0x182):'')),writeScopedConfig(_0xffa3de,_0x5ca65c),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x265cd4=a22_0x4aec;(function(_0x5519f1,_0x11bc59){const _0x7b4570=a22_0x4aec,_0x5447ad=_0x5519f1();while(!![]){try{const _0x5544c5=parseInt(_0x7b4570(0x11d))/0x1*(parseInt(_0x7b4570(0x12b))/0x2)+-parseInt(_0x7b4570(0xeb))/0x3*(-parseInt(_0x7b4570(0x125))/0x4)+parseInt(_0x7b4570(0x111))/0x5+-parseInt(_0x7b4570(0xf7))/0x6+-parseInt(_0x7b4570(0x126))/0x7+-parseInt(_0x7b4570(0x12c))/0x8*(-parseInt(_0x7b4570(0x129))/0x9)+parseInt(_0x7b4570(0x104))/0xa*(-parseInt(_0x7b4570(0x11c))/0xb);if(_0x5544c5===_0x11bc59)break;else _0x5447ad['push'](_0x5447ad['shift']());}catch(_0x1cf58f){_0x5447ad['push'](_0x5447ad['shift']());}}}(a22_0x2906,0x52e50));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_0x265cd4(0x132),'type':a22_0x265cd4(0x11e),'description':a22_0x265cd4(0x124),'default':![]};function parseAliasAppcodeSetKey(_0x153109){const _0xf152b4=a22_0x265cd4,_0x3992a0=_0x153109[_0xf152b4(0xf6)]('.');if(_0x3992a0[_0xf152b4(0x109)]!==0x3||_0x3992a0[0x0]!==_0xf152b4(0x10a)||_0x3992a0[0x2]!==_0xf152b4(0xee))return undefined;const _0x5da11c=_0x3992a0[0x1]?.[_0xf152b4(0x131)]();return _0x5da11c?_0x5da11c:undefined;}function parseAliasDeleteKey(_0x50f48c){const _0x130be5=a22_0x265cd4,_0x1ec372=_0x50f48c['split']('.');if(_0x1ec372[_0x130be5(0x109)]===0x2&&_0x1ec372[0x0]===_0x130be5(0x10a)){const _0x326dbf=_0x1ec372[0x1]?.[_0x130be5(0x131)]();return _0x326dbf?{'alias':_0x326dbf}:undefined;}if(_0x1ec372[_0x130be5(0x109)]===0x3&&_0x1ec372[0x0]===_0x130be5(0x10a)&&_0x1ec372[0x2]===_0x130be5(0xee)){const _0x4b9616=_0x1ec372[0x1]?.[_0x130be5(0x131)]();return _0x4b9616?{'alias':_0x4b9616,'field':_0x130be5(0xee)}:undefined;}return undefined;}function a22_0x2906(){const _0x5a2a88=['includes','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','18ydcDRA','list','103042yzMAqL','2455888ieKFAP','Deleted\x20`','(none)','stringify','raw','trim','global','delete','18771AaeCuv','get','key','appcode','../../context.js',';\x20apps.<alias>.appcode','set','\x20(global)','\x20config\x20get\x20<key>','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','pretty','split','3338832WPpEPA','object','args','Settable\x20keys:\x20','Value\x20to\x20assign','write','alias','validation','\x22\x20not\x20found\x20at\x20top\x20level.','Top-level\x20key\x20\x22','Key\x20\x22','config','Get\x20a\x20config\x20value','50lPtgDD','\x20\x20project:\x20','read','删除配置项的值','Missing\x20key\x20argument.','length','apps','pageSize','\x20config\x20delete\x20<key>\x20[--global]','List\x20current\x20config','log','field','pageSize\x20must\x20be\x20a\x20positive\x20number','1736060zHSzXq','Usage:\x20','riskLevel','bool','isArray','`\x20=\x20\x22','Key\x20not\x20found:\x20','Config\x20files:\x0a','\x22\x20is\x20not\x20settable.','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','keys','447601CKbMCN','1PdPklb','boolean','format','Set\x20`','project-or-global-explicit','设置配置项的值','join','Write\x20to\x20global\x20config','116kslxzp','662865tMpNoK'];a22_0x2906=function(){return _0x5a2a88;};return a22_0x2906();}function setLocalAppAlias(_0xb9576b,_0x2492ea,_0x72fd88){const _0x16b797=a22_0x265cd4,_0xc4f8c6=_0xb9576b[_0x16b797(0x10a)]&&typeof _0xb9576b[_0x16b797(0x10a)]===_0x16b797(0xf8)&&!Array[_0x16b797(0x115)](_0xb9576b[_0x16b797(0x10a)])?_0xb9576b[_0x16b797(0x10a)]:{},_0x3ab9d0=_0xc4f8c6[_0x2492ea]&&typeof _0xc4f8c6[_0x2492ea]===_0x16b797(0xf8)&&!Array[_0x16b797(0x115)](_0xc4f8c6[_0x2492ea])?_0xc4f8c6[_0x2492ea]:{};_0x3ab9d0['appcode']=_0x72fd88,_0xc4f8c6[_0x2492ea]=_0x3ab9d0,_0xb9576b[_0x16b797(0x10a)]=_0xc4f8c6;}function deleteLocalAppAlias(_0x418fa1,_0x194678){const _0x453f3a=a22_0x265cd4;if(!_0x418fa1['apps']||typeof _0x418fa1[_0x453f3a(0x10a)]!==_0x453f3a(0xf8)||Array[_0x453f3a(0x115)](_0x418fa1[_0x453f3a(0x10a)]))return![];const _0x1865a8=_0x418fa1[_0x453f3a(0x10a)],_0x5d1c52=_0x1865a8[_0x194678[_0x453f3a(0xfd)]];if(!_0x5d1c52||typeof _0x5d1c52!==_0x453f3a(0xf8)||Array[_0x453f3a(0x115)](_0x5d1c52))return![];if(!_0x194678['field'])return delete _0x1865a8[_0x194678[_0x453f3a(0xfd)]],!![];if(!(_0x194678['field']in _0x5d1c52))return![];return delete _0x5d1c52[_0x194678[_0x453f3a(0x10f)]],Object[_0x453f3a(0x11b)](_0x5d1c52)['length']===0x0&&delete _0x1865a8[_0x194678['alias']],!![];}function a22_0x4aec(_0x1bb8e3,_0x1857e5){_0x1bb8e3=_0x1bb8e3-0xeb;const _0x290698=a22_0x2906();let _0x4aec07=_0x290698[_0x1bb8e3];return _0x4aec07;}const listDef={'service':'config','command':a22_0x265cd4(0x12a),'description':a22_0x265cd4(0x10d),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x53d34e){const _0xc44e1f=a22_0x265cd4,{buildConfigFromFlags:_0x1bfdd6}=await import(_0xc44e1f(0xef)),_0x1079b4=_0x1bfdd6({}),_0x47f2df=getProjectConfigPath(),_0x520acb=resolveWriteConfigPath(_0xc44e1f(0x132));if(_0x53d34e[_0xc44e1f(0x11f)]===_0xc44e1f(0xf5))return{'ok':!![],'message':_0xc44e1f(0xf4)+(JSON[_0xc44e1f(0x12f)](_0x1079b4[_0xc44e1f(0x130)],null,0x2)+'\x0a\x0a')+_0xc44e1f(0x118)+(_0xc44e1f(0x105)+(_0x47f2df??_0xc44e1f(0x12e))+'\x0a')+('\x20\x20global:\x20\x20'+_0x520acb)};return{'ok':!![],'data':{'effective':_0x1079b4[_0xc44e1f(0x130)],'configFiles':{'project':_0x47f2df??null,'global':_0x520acb}}};}},getDef={'service':'config','command':a22_0x265cd4(0xec),'description':a22_0x265cd4(0x103),'risk':a22_0x265cd4(0x106),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x265cd4(0xed),'description':a22_0x265cd4(0x11a),'required':!![]}],'flags':[],async 'execute'(_0x455107){const _0x265969=a22_0x265cd4,_0x30505e=_0x455107[_0x265969(0xf9)][0x0];if(!_0x30505e)throw CliErrors[_0x265969(0xfe)](_0x265969(0x108),_0x265969(0x112)+CLI_BIN_NAME+_0x265969(0xf3));const {buildConfigFromFlags:_0x3d28c5}=await import(_0x265969(0xef)),{raw:_0x3f95e8}=_0x3d28c5({});if(_0x30505e['includes']('.')){const _0x137146=_0x30505e[_0x265969(0xf6)]('.');let _0x59588c=_0x3f95e8;for(const _0x168ee5 of _0x137146){if(_0x59588c==null||typeof _0x59588c!==_0x265969(0xf8))throw CliErrors[_0x265969(0xfe)](_0x265969(0x117)+_0x30505e);_0x59588c=_0x59588c[_0x168ee5];}if(_0x59588c===undefined)throw CliErrors[_0x265969(0xfe)](_0x265969(0x117)+_0x30505e);return console[_0x265969(0x10e)](typeof _0x59588c===_0x265969(0xf8)?JSON['stringify'](_0x59588c,null,0x2):String(_0x59588c)),{'ok':!![]};}const _0x2b37a1=_0x3f95e8[_0x30505e];if(_0x2b37a1===undefined)throw CliErrors[_0x265969(0xfe)](_0x265969(0x117)+_0x30505e);return console[_0x265969(0x10e)](typeof _0x2b37a1===_0x265969(0xf8)?JSON[_0x265969(0x12f)](_0x2b37a1,null,0x2):String(_0x2b37a1)),{'ok':!![]};}},setDef={'service':a22_0x265cd4(0x102),'command':a22_0x265cd4(0xf1),'description':a22_0x265cd4(0x122),'risk':a22_0x265cd4(0xfc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x265cd4(0xed),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a22_0x265cd4(0xfb),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x7fda3b){const _0x279cd2=a22_0x265cd4,_0x1969a6=_0x7fda3b[_0x279cd2(0xf9)][0x0],_0x5ee541=_0x7fda3b[_0x279cd2(0xf9)][0x1];if(!_0x1969a6||_0x5ee541===undefined)throw CliErrors['validation']('Missing\x20key\x20or\x20value.',_0x279cd2(0x112)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x1969a6]&&!ENUM_KEYS[_0x1969a6][_0x279cd2(0x127)](_0x5ee541))throw CliErrors[_0x279cd2(0xfe)]('Invalid\x20value\x20for\x20\x22'+_0x1969a6+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x1969a6][_0x279cd2(0x123)](',\x20'));if(_0x1969a6===_0x279cd2(0x113))throw CliErrors[_0x279cd2(0xfe)](_0x279cd2(0x128));if(_0x1969a6===_0x279cd2(0x10b)){const _0x191e5e=Number(_0x5ee541);if(isNaN(_0x191e5e)||_0x191e5e<=0x0)throw CliErrors[_0x279cd2(0xfe)](_0x279cd2(0x110));}const _0x1c36da=resolveWriteScope({'explicitGlobal':_0x7fda3b[_0x279cd2(0x114)](_0x279cd2(0x132)),'policy':_0x279cd2(0x121)}),_0x282e7b=toScopeFlags(_0x1c36da),_0x4dcf79=readScopedConfig(_0x282e7b),_0x1c9225=parseAliasAppcodeSetKey(_0x1969a6);if(!_0x1c9225&&!isTopLevelConfigKey(_0x1969a6))throw CliErrors[_0x279cd2(0xfe)](_0x279cd2(0x100)+_0x1969a6+_0x279cd2(0x119),_0x279cd2(0xfa)+getTopLevelConfigKeySummary()+_0x279cd2(0xf0));return _0x1c9225?setLocalAppAlias(_0x4dcf79,_0x1c9225,_0x5ee541):_0x4dcf79[_0x1969a6]=_0x1969a6===_0x279cd2(0x10b)?Number(_0x5ee541):_0x5ee541,console[_0x279cd2(0x10e)](_0x279cd2(0x120)+_0x1969a6+_0x279cd2(0x116)+_0x5ee541+'\x22'+(_0x1c36da==='global'?_0x279cd2(0xf2):'')),writeScopedConfig(_0x4dcf79,_0x282e7b),{'ok':!![]};}},deleteDef={'service':a22_0x265cd4(0x102),'command':a22_0x265cd4(0x133),'description':a22_0x265cd4(0x107),'risk':a22_0x265cd4(0xfc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x265cd4(0xed),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x5b0cf3){const _0x7bab5d=a22_0x265cd4,_0x3d9b10=_0x5b0cf3[_0x7bab5d(0xf9)][0x0];if(!_0x3d9b10)throw CliErrors[_0x7bab5d(0xfe)](_0x7bab5d(0x108),_0x7bab5d(0x112)+CLI_BIN_NAME+_0x7bab5d(0x10c));const _0x5ac4f3=resolveWriteScope({'explicitGlobal':_0x5b0cf3[_0x7bab5d(0x114)](_0x7bab5d(0x132)),'policy':_0x7bab5d(0x121)}),_0x3b4e43=toScopeFlags(_0x5ac4f3),_0x5c44b9=readScopedConfig(_0x3b4e43),_0x443870=parseAliasDeleteKey(_0x3d9b10);if(_0x443870){if(!deleteLocalAppAlias(_0x5c44b9,_0x443870))throw CliErrors['validation'](_0x7bab5d(0x117)+_0x3d9b10);return console[_0x7bab5d(0x10e)](_0x7bab5d(0x12d)+_0x3d9b10+'`'+(_0x5ac4f3===_0x7bab5d(0x132)?_0x7bab5d(0xf2):'')),writeScopedConfig(_0x5c44b9,_0x3b4e43),{'ok':!![]};}if(_0x5c44b9[_0x3d9b10]===undefined)throw CliErrors[_0x7bab5d(0xfe)](_0x7bab5d(0x101)+_0x3d9b10+_0x7bab5d(0xff));return delete _0x5c44b9[_0x3d9b10],console['log'](_0x7bab5d(0x12d)+_0x3d9b10+'`'+(_0x5ac4f3==='global'?_0x7bab5d(0xf2):'')),writeScopedConfig(_0x5c44b9,_0x3b4e43),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5637af,_0x16847a){var _0x4e5ae5=a23_0x247e,_0x22d405=_0x5637af();while(!![]){try{var _0x27ba02=parseInt(_0x4e5ae5(0xed))/0x1+parseInt(_0x4e5ae5(0xf5))/0x2*(-parseInt(_0x4e5ae5(0xea))/0x3)+-parseInt(_0x4e5ae5(0xf0))/0x4+parseInt(_0x4e5ae5(0xef))/0x5*(parseInt(_0x4e5ae5(0xee))/0x6)+-parseInt(_0x4e5ae5(0xf3))/0x7*(parseInt(_0x4e5ae5(0xf1))/0x8)+-parseInt(_0x4e5ae5(0xf4))/0x9*(-parseInt(_0x4e5ae5(0xec))/0xa)+parseInt(_0x4e5ae5(0xf2))/0xb*(parseInt(_0x4e5ae5(0xeb))/0xc);if(_0x27ba02===_0x16847a)break;else _0x22d405['push'](_0x22d405['shift']());}catch(_0x1baf75){_0x22d405['push'](_0x22d405['shift']());}}}(a23_0x236e,0x91d72));import{CLI_BIN_NAME}from'../../constant/cli.js';function a23_0x236e(){var _0x2c2ae3=['1741596LsFWHU','3461096ikBkAN','11tgNvlT','7FyAeyE','27kAfNHh','12yzLHHZ','530577wKkmhb','9132204UEKovi','493180YqnWMO','953901ZqYiLI','1830PRmEOX','10880SiDVfd'];a23_0x236e=function(){return _0x2c2ae3;};return a23_0x236e();}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a23_0x247e(_0x529979,_0x21cbd8){_0x529979=_0x529979-0xea;var _0x236e24=a23_0x236e();var _0x247e6c=_0x236e24[_0x529979];return _0x247e6c;}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
|
-
function a24_0x1fbe(){const _0x5f1652=['\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}','232543GLYOhn','\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]}}','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','high-risk-write','/api/{appCode}/','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\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}}','write','2fkuXNJ','5wWoCHg','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','delete','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','risk','4023848LgXaka','8350830TUIcbh','\x20on\x20dataset\x20','join','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','6368046fvodch','dryRun','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','paramsHint','3190608UvsouG','POST','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20completed\x20in\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}}','create','map','\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\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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\x20EXAMPLES','\x20\x20PAGINATION','operation','\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\x20PARAMS\x20STRUCTURE','Update\x20an\x20existing\x20record','body','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','description','14HJUOYh','paramsRequired','length','\x20\x20AGGREGATE\x20TYPES','data','read','996700EANCSY','Get\x20a\x20single\x20record\x20by\x20ID','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\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}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20WHERE\x20OPERATORS','batchCreate','now','data\x20','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','12427173AVkfrH','code','str','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','helpExtra','filter','params','\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','update','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','command','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','getOne','aggregate','\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_0x1fbe=function(){return _0x5f1652;};return a24_0x1fbe();}const a24_0x3a096d=a24_0xef3b;(function(_0xbf7794,_0x42caaa){const _0x2ee9cb=a24_0xef3b,_0x4d53b1=_0xbf7794();while(!![]){try{const _0x5cb749=parseInt(_0x2ee9cb(0x1b7))/0x1*(-parseInt(_0x2ee9cb(0x1c3))/0x2)+parseInt(_0x2ee9cb(0x1d6))/0x3+-parseInt(_0x2ee9cb(0x1ef))/0x4+-parseInt(_0x2ee9cb(0x1c4))/0x5*(parseInt(_0x2ee9cb(0x1d1))/0x6)+parseInt(_0x2ee9cb(0x1e9))/0x7*(-parseInt(_0x2ee9cb(0x1cb))/0x8)+parseInt(_0x2ee9cb(0x1fd))/0x9+parseInt(_0x2ee9cb(0x1cc))/0xa;if(_0x5cb749===_0x42caaa)break;else _0x4d53b1['push'](_0x4d53b1['shift']());}catch(_0x3a49e9){_0x4d53b1['push'](_0x4d53b1['shift']());}}}(a24_0x1fbe,0xb251b));function a24_0xef3b(_0x11ec06,_0x493595){_0x11ec06=_0x11ec06-0x1b2;const _0x1fbe0f=a24_0x1fbe();let _0xef3b6c=_0x1fbe0f[_0x11ec06];return _0xef3b6c;}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_0x3a096d(0x202),'operation':a24_0x3a096d(0x202),'risk':a24_0x3a096d(0x1ee),'paramsRequired':![],'description':a24_0x3a096d(0x1f1),'paramsHint':a24_0x3a096d(0x1f7)+a24_0x3a096d(0x1bf),'helpExtra':[a24_0x3a096d(0x1f8),'\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\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}}',a24_0x3a096d(0x1b5),a24_0x3a096d(0x1e3),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\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}}',a24_0x3a096d(0x1b8),a24_0x3a096d(0x1c1),'\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}}',a24_0x3a096d(0x1da),'','\x20\x20LOGICAL\x20COMBINATORS',a24_0x3a096d(0x200),a24_0x3a096d(0x1c0),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a24_0x3a096d(0x1de),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\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_0x3a096d(0x1bb),a24_0x3a096d(0x1d8),'',a24_0x3a096d(0x1e1),a24_0x3a096d(0x1f3),'\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a24_0x3a096d(0x1e7),a24_0x3a096d(0x207),'\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27',a24_0x3a096d(0x1f2)][a24_0x3a096d(0x1ce)]('\x0a')},{'command':a24_0x3a096d(0x1b3),'operation':a24_0x3a096d(0x1b3),'risk':a24_0x3a096d(0x1ee),'paramsRequired':!![],'description':a24_0x3a096d(0x1f0),'paramsHint':a24_0x3a096d(0x206)},{'command':'create','operation':a24_0x3a096d(0x1db),'risk':a24_0x3a096d(0x1c2),'paramsRequired':!![],'description':a24_0x3a096d(0x1c6),'paramsHint':a24_0x3a096d(0x1f5)},{'command':'batchCreate','operation':a24_0x3a096d(0x1f9),'risk':a24_0x3a096d(0x1c2),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a24_0x3a096d(0x1b2)},{'command':a24_0x3a096d(0x205),'operation':a24_0x3a096d(0x205),'risk':a24_0x3a096d(0x1c2),'paramsRequired':!![],'description':a24_0x3a096d(0x1e5),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20'+a24_0x3a096d(0x1b9)},{'command':'delete','operation':a24_0x3a096d(0x1c8),'risk':a24_0x3a096d(0x1bc),'paramsRequired':!![],'description':a24_0x3a096d(0x1be),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x3a096d(0x1b4),'operation':'aggregate','risk':a24_0x3a096d(0x1ee),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a24_0x3a096d(0x1fc)+a24_0x3a096d(0x1d4),'helpExtra':[a24_0x3a096d(0x1ec),'\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}',a24_0x3a096d(0x1b6),a24_0x3a096d(0x1f6),a24_0x3a096d(0x1dd),a24_0x3a096d(0x1cf),a24_0x3a096d(0x1f4),a24_0x3a096d(0x1d0),'',a24_0x3a096d(0x1e4),'\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_0x3a096d(0x1d3),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)',a24_0x3a096d(0x1c9),'\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_0x3a096d(0x1ba),'',a24_0x3a096d(0x1e0),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a24_0x3a096d(0x204),'',a24_0x3a096d(0x1c5),a24_0x3a096d(0x1df),'',a24_0x3a096d(0x1c7)][a24_0x3a096d(0x1ce)]('\x0a')}];function makeDataCommand(_0x28075e){const _0x36ead0=a24_0x3a096d,_0x540817=_0x36ead0(0x1fb)+_0x28075e[_0x36ead0(0x208)],_0x5d9a71={'service':_0x36ead0(0x1ed),'command':_0x28075e[_0x36ead0(0x208)],'description':_0x28075e[_0x36ead0(0x1e8)],'risk':_0x28075e[_0x36ead0(0x1ca)],'helpExtra':_0x28075e[_0x36ead0(0x201)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x28075e[_0x36ead0(0x1d5)]}],'validate':async _0x222b3f=>{const _0x20e2c3=_0x36ead0;_0x28075e[_0x20e2c3(0x1ea)]&&requireAnyOf(_0x222b3f,[_0x20e2c3(0x203)],_0x540817),_0x28075e[_0x20e2c3(0x1e2)]===_0x20e2c3(0x1f9)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x222b3f[_0x20e2c3(0x1ff)](_0x20e2c3(0x203)))),_0x28075e[_0x20e2c3(0x1e2)]===_0x20e2c3(0x205)&&parseUpdateIdsFromParams(parseJsonParams(_0x222b3f[_0x20e2c3(0x1ff)](_0x20e2c3(0x203)))??{});},async 'execute'(_0x25dc81){const _0x31b4c6=_0x36ead0,_0x463091=_0x25dc81[_0x31b4c6(0x1ff)](_0x31b4c6(0x1fe)),_0x1f2e72=_0x28075e[_0x31b4c6(0x1e2)]===_0x31b4c6(0x1f9)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x25dc81[_0x31b4c6(0x1ff)]('params'))):parseJsonParams(_0x25dc81[_0x31b4c6(0x1ff)](_0x31b4c6(0x203)))??{},_0x36ed86=_0x28075e['operation']===_0x31b4c6(0x205)?parseUpdateIdsFromParams(_0x1f2e72):undefined,_0x45e370=_0x36ed86?normalizeUpdateParamsForRuntime(_0x1f2e72,_0x36ed86):_0x1f2e72,_0x3f8b0b=Date[_0x31b4c6(0x1fa)](),_0x13c99a=await executeData(_0x463091,_0x28075e['operation'],_0x45e370),_0x2ed5ca=Date[_0x31b4c6(0x1fa)]()-_0x3f8b0b,_0x54c7ca=_0x36ed86&&_0x36ed86[_0x31b4c6(0x1eb)]>0x1?buildBatchUpdateResult(_0x36ed86,_0x13c99a):_0x13c99a;return{'ok':!![],'data':{'result':_0x54c7ca,'elapsed':_0x2ed5ca},'message':_0x31b4c6(0x1fb)+_0x28075e['command']+_0x31b4c6(0x1d9)+_0x2ed5ca+'ms'};}};return _0x28075e[_0x36ead0(0x1ca)]!==_0x36ead0(0x1ee)&&(_0x5d9a71[_0x36ead0(0x1d2)]=async _0x2f5115=>{const _0x25fdda=_0x36ead0,_0x2e3880=_0x2f5115[_0x25fdda(0x1ff)](_0x25fdda(0x1fe)),_0x1aa25a=_0x28075e[_0x25fdda(0x1e2)]===_0x25fdda(0x1f9)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2f5115[_0x25fdda(0x1ff)]('params'))):parseJsonParams(_0x2f5115['str'](_0x25fdda(0x203)))??{};let _0x38770a=_0x1aa25a;if(_0x28075e[_0x25fdda(0x1e2)]===_0x25fdda(0x205)){const _0x2d8b6c=parseUpdateIdsFromParams(_0x1aa25a);_0x38770a=normalizeUpdateParamsForRuntime(_0x1aa25a,_0x2d8b6c);}return dryRun(_0x25fdda(0x1d7),_0x25fdda(0x1bd)+_0x2e3880+'/'+_0x28075e['operation'])[_0x25fdda(0x1e6)](_0x38770a)[_0x25fdda(0x1e8)]('Preview:\x20data\x20'+_0x28075e['command']+_0x25fdda(0x1cd)+_0x2e3880)['build']();}),_0x5d9a71;}export const dataDefinitions=specs[a24_0x3a096d(0x1dc)](makeDataCommand);function buildBatchUpdateResult(_0xdd8b07,_0x4f5c16){const _0x4d757f=a24_0x3a096d;return{'operation':_0x4d757f(0x205),'mode':'batch','ids':_0xdd8b07,'total':_0xdd8b07[_0x4d757f(0x1eb)],'result':_0x4f5c16};}
|
|
1
|
+
const a24_0x5938b3=a24_0x47b4;function a24_0x49d5(){const _0x24781a=['create','20223747wwXXWv','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','getOne','paramsHint','command','build','34812NZhGSB','read','\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\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}','length','\x20completed\x20in\x20','\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\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}}','high-risk-write','data\x20','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20EXAMPLES','1hJdsCH','255YcfCaC','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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}}','4172590EmknSr','\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}}','filter','1703672uWDIyk','4949720BhJCYC','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','str','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','update','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','paramsRequired','map','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','Preview:\x20data\x20','now','aggregate','\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}}]','batchCreate','\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}','operation','\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}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','description','\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}}','3365124kguxDj','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\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}}','data','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','risk','\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\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\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}}','3226461eMwNZI','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20on\x20dataset\x20','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','dryRun','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','删除数据记录(非交互模式需传入\x20--yes)','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','code','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','在数据集中创建一条记录','delete','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','params','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','write','body','更新已有数据记录'];a24_0x49d5=function(){return _0x24781a;};return a24_0x49d5();}(function(_0x13b075,_0x1873b1){const _0x22fdb5=a24_0x47b4,_0x1077f1=_0x13b075();while(!![]){try{const _0x5b0576=-parseInt(_0x22fdb5(0x207))/0x1*(parseInt(_0x22fdb5(0x20f))/0x2)+parseInt(_0x22fdb5(0x208))/0x3*(-parseInt(_0x22fdb5(0x1fb))/0x4)+-parseInt(_0x22fdb5(0x20c))/0x5+parseInt(_0x22fdb5(0x1d3))/0x6+-parseInt(_0x22fdb5(0x1dd))/0x7+parseInt(_0x22fdb5(0x210))/0x8+parseInt(_0x22fdb5(0x1f4))/0x9;if(_0x5b0576===_0x1873b1)break;else _0x1077f1['push'](_0x1077f1['shift']());}catch(_0x46129a){_0x1077f1['push'](_0x1077f1['shift']());}}}(a24_0x49d5,0x83be4));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_0x5938b3(0x20e),'operation':a24_0x5938b3(0x20e),'risk':a24_0x5938b3(0x1fc),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a24_0x5938b3(0x1d4)+a24_0x5938b3(0x1cf),'helpExtra':['\x20\x20WHERE\x20OPERATORS',a24_0x5938b3(0x1d2),a24_0x5938b3(0x1fd),a24_0x5938b3(0x202),a24_0x5938b3(0x1dc),a24_0x5938b3(0x1d5),a24_0x5938b3(0x20b),'\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}',a24_0x5938b3(0x1f6),a24_0x5938b3(0x20d),'','\x20\x20LOGICAL\x20COMBINATORS',a24_0x5938b3(0x1eb),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a24_0x5938b3(0x1d7),a24_0x5938b3(0x209),'\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_0x5938b3(0x1e7),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','','\x20\x20PAGINATION',a24_0x5938b3(0x1db),a24_0x5938b3(0x1ee),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a24_0x5938b3(0x1e0),a24_0x5938b3(0x1e1),'\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27',a24_0x5938b3(0x1e5)]['join']('\x0a')},{'command':a24_0x5938b3(0x1f7),'operation':a24_0x5938b3(0x1f7),'risk':'read','paramsRequired':!![],'description':a24_0x5938b3(0x205),'paramsHint':a24_0x5938b3(0x1ef)},{'command':a24_0x5938b3(0x1f3),'operation':'create','risk':a24_0x5938b3(0x1f0),'paramsRequired':!![],'description':a24_0x5938b3(0x1e8),'paramsHint':a24_0x5938b3(0x211)},{'command':a24_0x5938b3(0x1cb),'operation':a24_0x5938b3(0x1cb),'risk':a24_0x5938b3(0x1f0),'paramsRequired':!![],'description':'通过一次请求在数据集中批量创建多条记录','paramsHint':a24_0x5938b3(0x1de)},{'command':a24_0x5938b3(0x1c1),'operation':a24_0x5938b3(0x1c1),'risk':a24_0x5938b3(0x1f0),'paramsRequired':!![],'description':a24_0x5938b3(0x1f2),'paramsHint':a24_0x5938b3(0x1c2)+a24_0x5938b3(0x1c0)},{'command':a24_0x5938b3(0x1e9),'operation':a24_0x5938b3(0x1e9),'risk':a24_0x5938b3(0x203),'paramsRequired':!![],'description':a24_0x5938b3(0x1e4),'paramsHint':a24_0x5938b3(0x1ef)},{'command':a24_0x5938b3(0x1c9),'operation':a24_0x5938b3(0x1c9),'risk':a24_0x5938b3(0x1fc),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a24_0x5938b3(0x1bf)+a24_0x5938b3(0x1f5),'helpExtra':[a24_0x5938b3(0x1da),'\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\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}',a24_0x5938b3(0x1fe),a24_0x5938b3(0x1ce),'\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}',a24_0x5938b3(0x1cc),a24_0x5938b3(0x201),'','\x20\x20PARAMS\x20STRUCTURE',a24_0x5938b3(0x1c5),a24_0x5938b3(0x1ea),a24_0x5938b3(0x1e3),a24_0x5938b3(0x1ec),a24_0x5938b3(0x1ca),a24_0x5938b3(0x1c6),'',a24_0x5938b3(0x206),a24_0x5938b3(0x1d0),'\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','',a24_0x5938b3(0x20a),a24_0x5938b3(0x1d9),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.']['join']('\x0a')}];function a24_0x47b4(_0x2b9845,_0x19d426){_0x2b9845=_0x2b9845-0x1bf;const _0x49d5f9=a24_0x49d5();let _0x47b442=_0x49d5f9[_0x2b9845];return _0x47b442;}function makeDataCommand(_0x2e96bd){const _0x598854=a24_0x5938b3,_0xf59629=_0x598854(0x204)+_0x2e96bd[_0x598854(0x1f9)],_0x561cab={'service':_0x598854(0x1d6),'command':_0x2e96bd['command'],'description':_0x2e96bd[_0x598854(0x1d1)],'risk':_0x2e96bd[_0x598854(0x1d8)],'helpExtra':_0x2e96bd['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x2e96bd[_0x598854(0x1f8)]}],'validate':async _0x6cf84c=>{const _0x15dfb7=_0x598854;_0x2e96bd[_0x15dfb7(0x1c3)]&&requireAnyOf(_0x6cf84c,[_0x15dfb7(0x1ed)],_0xf59629),_0x2e96bd[_0x15dfb7(0x1cd)]===_0x15dfb7(0x1cb)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x6cf84c['str'](_0x15dfb7(0x1ed)))),_0x2e96bd[_0x15dfb7(0x1cd)]===_0x15dfb7(0x1c1)&&parseUpdateIdsFromParams(parseJsonParams(_0x6cf84c[_0x15dfb7(0x212)]('params'))??{});},async 'execute'(_0x1c4a0f){const _0x31abd6=_0x598854,_0x48cdb8=_0x1c4a0f[_0x31abd6(0x212)](_0x31abd6(0x1e6)),_0x3a81ae=_0x2e96bd['operation']===_0x31abd6(0x1cb)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1c4a0f[_0x31abd6(0x212)]('params'))):parseJsonParams(_0x1c4a0f[_0x31abd6(0x212)](_0x31abd6(0x1ed)))??{},_0x326b78=_0x2e96bd[_0x31abd6(0x1cd)]==='update'?parseUpdateIdsFromParams(_0x3a81ae):undefined,_0x4bb8d8=_0x326b78?normalizeUpdateParamsForRuntime(_0x3a81ae,_0x326b78):_0x3a81ae,_0x372e77=Date[_0x31abd6(0x1c8)](),_0x1a3885=await executeData(_0x48cdb8,_0x2e96bd['operation'],_0x4bb8d8),_0xe5b7b4=Date[_0x31abd6(0x1c8)]()-_0x372e77,_0x5dac3f=_0x326b78&&_0x326b78[_0x31abd6(0x1ff)]>0x1?buildBatchUpdateResult(_0x326b78,_0x1a3885):_0x1a3885;return{'ok':!![],'data':{'result':_0x5dac3f,'elapsed':_0xe5b7b4},'message':_0x31abd6(0x204)+_0x2e96bd[_0x31abd6(0x1f9)]+_0x31abd6(0x200)+_0xe5b7b4+'ms'};}};return _0x2e96bd['risk']!=='read'&&(_0x561cab[_0x598854(0x1e2)]=async _0x1a9d56=>{const _0x4fb071=_0x598854,_0x25891a=_0x1a9d56[_0x4fb071(0x212)](_0x4fb071(0x1e6)),_0x6f2dc8=_0x2e96bd[_0x4fb071(0x1cd)]===_0x4fb071(0x1cb)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1a9d56['str'](_0x4fb071(0x1ed)))):parseJsonParams(_0x1a9d56['str']('params'))??{};let _0x3d7fd7=_0x6f2dc8;if(_0x2e96bd['operation']==='update'){const _0x492c5a=parseUpdateIdsFromParams(_0x6f2dc8);_0x3d7fd7=normalizeUpdateParamsForRuntime(_0x6f2dc8,_0x492c5a);}return dryRun('POST','/api/{appCode}/'+_0x25891a+'/'+_0x2e96bd[_0x4fb071(0x1cd)])[_0x4fb071(0x1f1)](_0x3d7fd7)['description'](_0x4fb071(0x1c7)+_0x2e96bd[_0x4fb071(0x1f9)]+_0x4fb071(0x1df)+_0x25891a)[_0x4fb071(0x1fa)]();}),_0x561cab;}export const dataDefinitions=specs[a24_0x5938b3(0x1c4)](makeDataCommand);function buildBatchUpdateResult(_0x482dea,_0x4c8606){const _0x5c08e7=a24_0x5938b3;return{'operation':_0x5c08e7(0x1c1),'mode':'batch','ids':_0x482dea,'total':_0x482dea[_0x5c08e7(0x1ff)],'result':_0x4c8606};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x40ad8e=a25_0x55ed;(function(_0x1f09b1,_0x74368e){const _0x105ac0=a25_0x55ed,_0x538b8f=_0x1f09b1();while(!![]){try{const _0x3aac2e=-parseInt(_0x105ac0(0x78))/0x1+parseInt(_0x105ac0(0x82))/0x2*(parseInt(_0x105ac0(0x93))/0x3)+-parseInt(_0x105ac0(0x7b))/0x4*(-parseInt(_0x105ac0(0xac))/0x5)+-parseInt(_0x105ac0(0x8e))/0x6*(-parseInt(_0x105ac0(0xb9))/0x7)+-parseInt(_0x105ac0(0xa0))/0x8*(-parseInt(_0x105ac0(0xb3))/0x9)+-parseInt(_0x105ac0(0xbb))/0xa*(-parseInt(_0x105ac0(0x89))/0xb)+-parseInt(_0x105ac0(0xbf))/0xc;if(_0x3aac2e===_0x74368e)break;else _0x538b8f['push'](_0x538b8f['shift']());}catch(_0x5cc754){_0x538b8f['push'](_0x538b8f['shift']());}}}(a25_0x425d,0x93b4f));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a25_0x55ed(_0x362b43,_0x1afc3b){_0x362b43=_0x362b43-0x78;const _0x425d42=a25_0x425d();let _0x55ed09=_0x425d42[_0x362b43];return _0x55ed09;}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x2c487a){const _0x28c51a=a25_0x55ed;if(_0x2c487a['deleted'])return null;const _0x1245e1=Boolean(_0x2c487a[_0x28c51a(0xad)]!==undefined||_0x2c487a[_0x28c51a(0xc1)]!==undefined);let _0x43b3d1={};if(!_0x1245e1&&typeof _0x2c487a[_0x28c51a(0xab)]===_0x28c51a(0xbd))try{_0x43b3d1=JSON[_0x28c51a(0xb2)](_0x2c487a[_0x28c51a(0xab)]);}catch{}const _0x5d2e8b=_0x1245e1?_0x2c487a[_0x28c51a(0x97)]:_0x2c487a[_0x28c51a(0xa5)],_0x548ff1=_0x1245e1?_0x2c487a[_0x28c51a(0xad)]:_0x2c487a[_0x28c51a(0x97)],_0x1d8d31=_0x1245e1?_0x2c487a['doType']:_0x2c487a[_0x28c51a(0x81)]||_0x2c487a[_0x28c51a(0xa7)],_0x2a676e=_0x1245e1?_0x2c487a[_0x28c51a(0x85)]===!![]:_0x43b3d1[_0x28c51a(0x85)]===!![],_0x5bf498=_0x1245e1?_0x2c487a['required']===!![]:_0x43b3d1[_0x28c51a(0x8d)]===!![],_0x4418b2=_0x1245e1?_0x2c487a[_0x28c51a(0xa1)]??null:_0x43b3d1['options']??null,_0x14aa97={'name':_0x5d2e8b,'displayName':_0x548ff1||_0x5d2e8b,'type':_0x1d8d31,'dbType':_0x2c487a[_0x28c51a(0x80)],'pk':_0x2a676e,'required':_0x5bf498,'description':_0x2c487a[_0x28c51a(0xa9)]||undefined};return Array['isArray'](_0x4418b2)&&_0x4418b2[_0x28c51a(0x9f)]>0x0&&(_0x14aa97['options']=_0x4418b2),_0x14aa97;}function parseJsonMaybe(_0x2c55d2){const _0x3e9c67=a25_0x55ed;if(typeof _0x2c55d2!==_0x3e9c67(0xbd))return _0x2c55d2;try{return JSON['parse'](_0x2c55d2);}catch{return _0x2c55d2;}}function normalizeOperationEntry(_0x1355a9,_0x2fe4a6){const _0x3fa3c5=a25_0x55ed;if(!_0x2fe4a6||typeof _0x2fe4a6!==_0x3fa3c5(0x9d))return null;if(!_0x2fe4a6[_0x3fa3c5(0x79)]||!_0x2fe4a6[_0x3fa3c5(0xaf)])return null;const _0x3a3fce={'name':_0x1355a9,'method':_0x2fe4a6['method'],'path':_0x2fe4a6[_0x3fa3c5(0xaf)]};if(_0x2fe4a6[_0x3fa3c5(0xb6)])_0x3a3fce[_0x3fa3c5(0xb6)]=_0x2fe4a6[_0x3fa3c5(0xb6)];if(_0x2fe4a6[_0x3fa3c5(0xb4)]!=null)_0x3a3fce[_0x3fa3c5(0xb4)]=parseJsonMaybe(_0x2fe4a6[_0x3fa3c5(0xb4)]);if(_0x2fe4a6[_0x3fa3c5(0x9a)]!=null)_0x3a3fce[_0x3fa3c5(0x9a)]=parseJsonMaybe(_0x2fe4a6[_0x3fa3c5(0x9a)]);if(_0x2fe4a6[_0x3fa3c5(0x96)]!=null)_0x3a3fce[_0x3fa3c5(0x96)]=_0x2fe4a6[_0x3fa3c5(0x96)];if(_0x2fe4a6[_0x3fa3c5(0xb8)]!=null)_0x3a3fce['afterScriptId']=_0x2fe4a6[_0x3fa3c5(0xb8)];if(Array[_0x3fa3c5(0x7c)](_0x2fe4a6[_0x3fa3c5(0x8b)]))_0x3a3fce[_0x3fa3c5(0x8b)]=_0x2fe4a6[_0x3fa3c5(0x8b)];if(Array[_0x3fa3c5(0x7c)](_0x2fe4a6[_0x3fa3c5(0xaa)]))_0x3a3fce[_0x3fa3c5(0xaa)]=_0x2fe4a6[_0x3fa3c5(0xaa)];return _0x3a3fce;}function summarizeDbtable(_0x12322a){const _0x11a578=a25_0x55ed,_0x1c8b0c={},_0x4d4c7e=[_0x11a578(0xb1),_0x11a578(0x98),'tableName',_0x11a578(0xae),'pkField',_0x11a578(0x83),_0x11a578(0x99),'createTimeField','updateTimeField',_0x11a578(0x9c),_0x11a578(0x7a),'modifierIdField',_0x11a578(0xbc),_0x11a578(0xa3),_0x11a578(0xa2)];for(const _0x392066 of _0x4d4c7e){if(_0x12322a[_0x392066]!==undefined)_0x1c8b0c[_0x392066]=_0x12322a[_0x392066];}return typeof _0x1c8b0c[_0x11a578(0x83)]===_0x11a578(0xbd)&&_0x1c8b0c[_0x11a578(0x83)][_0x11a578(0x9f)]>0x0&&(_0x1c8b0c[_0x11a578(0x7e)]=_0x1c8b0c[_0x11a578(0x83)][_0x11a578(0x7d)](',')['map'](_0x517246=>_0x517246['trim']())['filter'](Boolean)),_0x1c8b0c;}function normalizeRelatedPages(_0xff9f7f){const _0x3f91d6=a25_0x55ed;if(!Array[_0x3f91d6(0x7c)](_0xff9f7f))return[];return _0xff9f7f['filter'](_0x4783e4=>_0x4783e4&&typeof _0x4783e4===_0x3f91d6(0x9d))[_0x3f91d6(0x90)](_0xb57906=>({'id':_0xb57906['id'],'type':_0xb57906[_0x3f91d6(0x81)],'code':_0xb57906['code'],'title':_0xb57906[_0x3f91d6(0x9b)],'deleted':_0xb57906[_0x3f91d6(0x8c)]===!![]}));}function normalizeFallbackFieldName(_0x3c1c18,_0x1deb72){const _0x3a479b=a25_0x55ed,_0x5071ed=_0x3c1c18[_0x3a479b(0xb7)]();if(!_0x5071ed)return null;return{'name':_0x5071ed,'displayName':_0x5071ed,'type':undefined,'dbType':undefined,'pk':_0x5071ed===_0x1deb72,'required':![],'description':undefined};}async function loadListFieldFallback(_0x21c31c,_0x4e3047){const _0x4389ac=a25_0x55ed;if(!_0x21c31c||!_0x4e3047)return[];try{const _0x481707=await listDatasets(_0x21c31c,{'code':_0x4e3047}),_0x5adaa1=_0x481707['find'](_0x4cbf27=>_0x4cbf27['code']===_0x4e3047)??_0x481707[0x0],_0xdaa9b0=_0x5adaa1?.[_0x4389ac(0x9e)]??{},_0x8a6944=typeof _0xdaa9b0[_0x4389ac(0x83)]===_0x4389ac(0xbd)?_0xdaa9b0[_0x4389ac(0x83)][_0x4389ac(0x7d)](','):[];return _0x8a6944['map'](_0x1146f1=>normalizeFallbackFieldName(_0x1146f1,_0xdaa9b0[_0x4389ac(0x85)]))[_0x4389ac(0xa4)](_0x50d99f=>_0x50d99f!==null);}catch{return[];}}export const datasetDetail={'service':a25_0x40ad8e(0x88),'command':a25_0x40ad8e(0x91),'description':'Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','risk':'read','flags':[CODE_FLAG],async 'execute'(_0x1ea832){const _0x902523=a25_0x40ad8e,_0x1a9c61=await getDatasetDetail(_0x1ea832['str'](_0x902523(0xa5))),_0x264899=Array[_0x902523(0x7c)](_0x1a9c61[_0x902523(0x7f)])?_0x1a9c61[_0x902523(0x7f)]:Array[_0x902523(0x7c)](_0x1a9c61[_0x902523(0xa6)])?_0x1a9c61[_0x902523(0xa6)]:[];let _0x825b00=_0x264899[_0x902523(0x90)](_0x2d9633=>normalizeField(_0x2d9633))[_0x902523(0xa4)](_0x5357e4=>_0x5357e4!==null);_0x825b00[_0x902523(0x9f)]===0x0&&(_0x825b00=await loadListFieldFallback(_0x1ea832[_0x902523(0xc2)],_0x1ea832[_0x902523(0x86)](_0x902523(0xa5))));const _0x407bc5=_0x1a9c61[_0x902523(0x84)]??{},_0x1c115f=[];for(const [_0x304dcf,_0x5869b9]of Object['entries'](_0x407bc5)){const _0x8b61fc=normalizeOperationEntry(_0x304dcf,_0x5869b9);if(_0x8b61fc)_0x1c115f[_0x902523(0x94)](_0x8b61fc);}const _0x501225=_0x1a9c61[_0x902523(0x9e)]??{},_0xb9a3a1=_0x1a9c61[_0x902523(0x88)]??{},_0x3c68fd=_0x501225[_0x902523(0xb1)]!=null?{'id':_0x501225[_0x902523(0xb1)],'name':_0x501225[_0x902523(0x98)]??null}:undefined;let _0x133c03;return typeof _0x1a9c61['extend']==='string'&&(_0x133c03=parseJsonMaybe(_0x1a9c61['extend'])),{'ok':!![],'data':{'id':_0x1a9c61['modelId']??_0x1a9c61['id'],'name':_0x1a9c61[_0x902523(0x97)],'code':_0x1a9c61[_0x902523(0x92)]||_0x1a9c61['code'],'doVersion':_0x1a9c61[_0x902523(0x8a)],'description':_0x1a9c61[_0x902523(0xa9)]||_0xb9a3a1[_0x902523(0x8f)]||undefined,'source':_0x1a9c61[_0x902523(0xb0)]||_0xb9a3a1[_0x902523(0x95)],'table':_0x501225[_0x902523(0xbe)]||_0xb9a3a1[_0x902523(0xbe)],'datasetKey':_0x501225['datasetKey'],'pk':_0x501225[_0x902523(0x85)],'db':_0x3c68fd,'dbtable':summarizeDbtable(_0x501225),'fields':_0x825b00,'operations':_0x1c115f,'indexes':Array[_0x902523(0x7c)](_0xb9a3a1[_0x902523(0x87)])?_0xb9a3a1[_0x902523(0x87)]:[],'relations':_0x1a9c61[_0x902523(0xc0)]??null,'relatedPages':normalizeRelatedPages(_0x1a9c61['relatedPageInfoList']),...Array[_0x902523(0x7c)](_0x1a9c61[_0x902523(0xba)])?{'columnCodeListWithDeleted':_0x1a9c61['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x902523(0x7c)](_0x1a9c61['formatRules'])?_0x1a9c61[_0x902523(0xa8)]:[],'validateRules':Array[_0x902523(0x7c)](_0x1a9c61[_0x902523(0xb5)])?_0x1a9c61[_0x902523(0xb5)]:[],..._0x133c03!==undefined?{'extend':_0x133c03}:{},'stats':{'fieldCount':_0x825b00['length'],'operationCount':_0x1c115f['length']}}};}};function a25_0x425d(){const _0x55f317=['dblinkInfoDTO','labelField','filter','code','properties','dataType','formatRules','description','responseFields','extend','5678875mwaECi','displayName','datasetKey','path','source','dbId','parse','702234maHKgS','requestBody','validateRules','host','trim','afterScriptId','77lwespJ','columnCodeListWithDeleted','20pkophR','modifierNameField','string','tableName','45159612YTUcpC','relations','doType','appCode','199051SOFIWS','method','creatorNameField','4wBJoBv','isArray','split','allFieldNames','fields','dbType','type','1126oRLnpw','allFields','operations','pkField','str','indexes','dataset','6454052IJTvXw','doVersion','requestFields','deleted','required','571362lWGvEz','tableComment','map','detail','modelCode','2709ppwzbS','push','sourceType','beforeScriptId','name','dbName','logicField','responseBody','title','creatorIdField','object','dbtableConfig','length','72EmAuvF','options'];a25_0x425d=function(){return _0x55f317;};return a25_0x425d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44f977,_0x2685b3){const _0x186759=a26_0xe590,_0x5eab1a=_0x44f977();while(!![]){try{const _0x493637=-parseInt(_0x186759(0x135))/0x1*(parseInt(_0x186759(0x13b))/0x2)+-parseInt(_0x186759(0x133))/0x3+-parseInt(_0x186759(0x132))/0x4*(-parseInt(_0x186759(0x134))/0x5)+-parseInt(_0x186759(0x136))/0x6*(parseInt(_0x186759(0x13a))/0x7)+parseInt(_0x186759(0x13c))/0x8+parseInt(_0x186759(0x139))/0x9*(-parseInt(_0x186759(0x137))/0xa)+parseInt(_0x186759(0x138))/0xb;if(_0x493637===_0x2685b3)break;else _0x5eab1a['push'](_0x5eab1a['shift']());}catch(_0x498524){_0x5eab1a['push'](_0x5eab1a['shift']());}}}(a26_0xa2cb,0x6c1f1));function a26_0xe590(_0x3580ec,_0x29048e){_0x3580ec=_0x3580ec-0x132;const _0xa2cbfe=a26_0xa2cb();let _0xe590ae=_0xa2cbfe[_0x3580ec];return _0xe590ae;}import{datasetList}from'../../commands/dataset/list.js';function a26_0xa2cb(){const _0x17d598=['7511XZqKur','562646UYSPRo','5474168znTjyb','196shEWCX','2146884hNBnDx','72305NXhijP','3btWdsu','318ICQrNV','1070NEZYKt','16330523QtseeM','68814TmwntQ'];a26_0xa2cb=function(){return _0x17d598;};return a26_0xa2cb();}import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x3dd55b=a27_0x1535;(function(_0x202f40,_0x1de98f){const _0x34c079=a27_0x1535,_0x38b573=_0x202f40();while(!![]){try{const _0x31c652=parseInt(_0x34c079(0x1c0))/0x1*(-parseInt(_0x34c079(0x1cf))/0x2)+-parseInt(_0x34c079(0x1d8))/0x3*(-parseInt(_0x34c079(0x1d7))/0x4)+-parseInt(_0x34c079(0x1d3))/0x5+-parseInt(_0x34c079(0x1d0))/0x6+-parseInt(_0x34c079(0x1c4))/0x7*(-parseInt(_0x34c079(0x1cc))/0x8)+parseInt(_0x34c079(0x1c5))/0x9+parseInt(_0x34c079(0x1d4))/0xa;if(_0x31c652===_0x1de98f)break;else _0x38b573['push'](_0x38b573['shift']());}catch(_0x53db01){_0x38b573['push'](_0x38b573['shift']());}}}(a27_0x47d5,0x8d7f2));import{listDatasets}from'../../core/api-client.js';function a27_0x1535(_0x156aa3,_0x221097){_0x156aa3=_0x156aa3-0x1bc;const _0x47d562=a27_0x47d5();let _0x1535b8=_0x47d562[_0x156aa3];return _0x1535b8;}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a27_0x3dd55b(0x1d1),'command':a27_0x3dd55b(0x1cd),'description':a27_0x3dd55b(0x1cb),'risk':a27_0x3dd55b(0x1c1),'flags':[{'name':'name','type':a27_0x3dd55b(0x1ca),'description':a27_0x3dd55b(0x1c6)},{...CODE_FLAG,'required':![],'description':a27_0x3dd55b(0x1d2)}],async 'execute'(_0x5a094a){const _0x407525=a27_0x3dd55b,_0x30b2f2=_0x5a094a[_0x407525(0x1c8)]('name'),_0x366c36=_0x5a094a['str'](_0x407525(0x1be)),_0x3fcf15=await listDatasets(_0x5a094a['appCode'],{..._0x30b2f2&&{'name':_0x30b2f2},..._0x366c36&&{'code':_0x366c36}});return{'ok':!![],'data':{'total':_0x3fcf15[_0x407525(0x1ce)],'datasets':_0x3fcf15[_0x407525(0x1c3)](_0x472d52=>{const _0x2204f1=_0x407525,_0x4ac7bc=_0x472d52[_0x2204f1(0x1c9)]??{};return{'id':_0x472d52['id'],'code':_0x472d52['code'],'name':_0x472d52[_0x2204f1(0x1bd)],'source':_0x472d52[_0x2204f1(0x1c2)],'description':_0x472d52[_0x2204f1(0x1bc)],'table':_0x4ac7bc[_0x2204f1(0x1d5)],'datasetKey':_0x4ac7bc['datasetKey'],'pk':_0x4ac7bc[_0x2204f1(0x1d6)],'fields':_0x4ac7bc[_0x2204f1(0x1c7)]?_0x4ac7bc[_0x2204f1(0x1c7)]['split'](',')['map'](_0x181221=>_0x181221[_0x2204f1(0x1bf)]()):[]};})}};}};function a27_0x47d5(){const _0x14e9f4=['allFields','str','dbtableConfig','string','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','56WJelBE','list','length','6zegWGy','6587088XVNHxM','dataset','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','4055505guJbyA','14109370YrZcFR','tableName','pkField','612004Htoxpo','18JvrEGv','description','name','code','trim','293796xbAOSw','read','source','map','961219PMwgUf','717705fthZPU','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'];a27_0x47d5=function(){return _0x14e9f4;};return a27_0x47d5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x1e6088=a28_0xd115;(function(_0x572c9a,_0x55591d){const _0x183aab=a28_0xd115,_0x491e08=_0x572c9a();while(!![]){try{const _0x53f389=-parseInt(_0x183aab(0x11e))/0x1*(-parseInt(_0x183aab(0x10e))/0x2)+parseInt(_0x183aab(0x11a))/0x3*(-parseInt(_0x183aab(0x116))/0x4)+parseInt(_0x183aab(0x113))/0x5*(parseInt(_0x183aab(0x11b))/0x6)+-parseInt(_0x183aab(0x121))/0x7*(-parseInt(_0x183aab(0x115))/0x8)+parseInt(_0x183aab(0x120))/0x9+-parseInt(_0x183aab(0x118))/0xa+-parseInt(_0x183aab(0x11d))/0xb;if(_0x53f389===_0x55591d)break;else _0x491e08['push'](_0x491e08['shift']());}catch(_0x2bdd1a){_0x491e08['push'](_0x491e08['shift']());}}}(a28_0x55c0,0xc820f));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x1e6088(0x11c);export function formatDatasetSdkMarkdown(_0x18532b){const _0x48e093=a28_0x1e6088,_0x51a94c=typeof _0x18532b===_0x48e093(0x110)?_0x18532b[_0x48e093(0x10f)]():'';return _0x51a94c||DEFAULT_MARKDOWN;}function a28_0x55c0(){const _0xce6264=['read','10457487QhjjVc','119kFLUco','str','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','2SuWTJr','trim','string','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','dataset','35PNWRmg','sdk-doc','88472bkNKFd','9476zptaja','code','15040310joZzjO','appCode','804URyAKd','833034TFNxUZ','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','9540256lVHDcn','1504127usmtLY'];a28_0x55c0=function(){return _0xce6264;};return a28_0x55c0();}function a28_0xd115(_0x28d52d,_0x299bd2){_0x28d52d=_0x28d52d-0x10d;const _0x55c0ee=a28_0x55c0();let _0xd1151c=_0x55c0ee[_0x28d52d];return _0xd1151c;}export const datasetSdkDoc={'service':a28_0x1e6088(0x112),'command':a28_0x1e6088(0x114),'description':a28_0x1e6088(0x10d),'risk':a28_0x1e6088(0x11f),'flags':[{...CODE_FLAG,'description':a28_0x1e6088(0x111)}],async 'execute'(_0x196ae2){const _0x4d9d21=a28_0x1e6088,_0x3cdcbb=_0x196ae2[_0x4d9d21(0x122)](_0x4d9d21(0x117)),_0x1917e1=await getDatasetSdkUsageDoc(_0x3cdcbb,_0x196ae2['appCode']);return{'ok':!![],'data':{'code':_0x3cdcbb,'appCode':_0x196ae2[_0x4d9d21(0x119)],'markdown':formatDatasetSdkMarkdown(_0x1917e1)}};}};
|