@lovrabet/lovrabet-cli 2.1.22-beta.6 → 2.1.22
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.d.ts +4 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +9 -0
- package/lib/runtime/confirmation.js +1 -0
- 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_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
|
+
const a12_0x99f42=a12_0x26ae;(function(_0x418a50,_0x3d1eca){const _0x5cd3d1=a12_0x26ae,_0x341a78=_0x418a50();while(!![]){try{const _0x303582=parseInt(_0x5cd3d1(0x202))/0x1+-parseInt(_0x5cd3d1(0x20c))/0x2+-parseInt(_0x5cd3d1(0x1d9))/0x3*(-parseInt(_0x5cd3d1(0x229))/0x4)+parseInt(_0x5cd3d1(0x239))/0x5*(-parseInt(_0x5cd3d1(0x20f))/0x6)+-parseInt(_0x5cd3d1(0x1dc))/0x7*(-parseInt(_0x5cd3d1(0x21a))/0x8)+-parseInt(_0x5cd3d1(0x1e5))/0x9+parseInt(_0x5cd3d1(0x21b))/0xa*(parseInt(_0x5cd3d1(0x1de))/0xb);if(_0x303582===_0x3d1eca)break;else _0x341a78['push'](_0x341a78['shift']());}catch(_0xbca0b0){_0x341a78['push'](_0x341a78['shift']());}}}(a12_0x5dca,0x3d623));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_0x5dca(){const _0x470a8b=['boolean','global','auth','yes','3332wvqKZI','env','accessKey','trim','authRequired','Write\x20to\x20global\x20config\x20(default)','read','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Missing\x20accessKey.','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Shorthand\x20for\x20--access-key','\x20env\x20var','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','write','68795YBahih','logout','将用新的认证信息替换所选作用域的整份\x20Lovrabet\x20配置;该作用域中原有的其他配置项也会被清空。确认界面不会显示密钥内容。','清空当前作用域配置并重新初始化认证','Invalid\x20accessKey\x20format:\x20\x22','1146fymWgr','string','repeat','4690gqpNkB','project\x20config','2882djCduG','length','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','从配置中清除\x20AccessKey','Show\x20current\x20authentication\x20status','\x20scope.','status','1538937pBvzFL','production','stdout','AccessKey\x20cleared\x20from\x20','isTTY','Auth\x20mode:\x20','\x20Verify:\x20','global\x20config','\x20Current\x20env:\x20','envName','join','\x20config','Read\x20from\x20global\x20config\x20(default)','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','AccessKey\x20saved\x20to\x20','init','Option\x20A:\x20','str','将\x20AccessKey\x20保存到配置(默认写入全局配置;使用\x20--project\x20写入项目配置)','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','\x20(via\x20','bool','info','access_key','ACCESS_KEY','AccessKey:\x20','Status:\x20valid','=ak_xxx','push','103642RZtyPc','Then\x20verify\x20with:\x20','check','project','Use\x20`','nonInteractive','AccessKey\x20(ak_xxx...)','stdin','userCenterDisplayName','scope','286262wwRriv','cancelled','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','174xYbkrQ','test','\x20config.','Tip:\x20you\x20can\x20also\x20run:','daily','Option\x20C:\x20environment\x20variable','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','validation','\x20\x20export\x20','development','`auth\x20login`\x20does\x20not\x20support\x20--yes.','4112zHSsiH','7570aqWYsZ','login','将从所选\x20Lovrabet\x20配置中移除\x20AccessKey;之后依赖该密钥的命令需要重新登录才能使用。','\x20auth\x20status','code','access-key','slice','ClientAk','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','newConfigFileName'];a12_0x5dca=function(){return _0x470a8b;};return a12_0x5dca();}import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x537bb3=a12_0x26ae;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x537bb3(0x20a)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x537bb3(0x212)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x537bb3(0x236));}function buildAccessKeySetupGuide(){const _0x5094b2=a12_0x26ae;return[_0x5094b2(0x1e0)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x5094b2(0x232)+CLI_BIN_NAME+_0x5094b2(0x230)][_0x5094b2(0x1ef)]('\x0a');}function a12_0x26ae(_0x35892d,_0x264d98){_0x35892d=_0x35892d-0x1d9;const _0x5dca55=a12_0x5dca();let _0x26aeb6=_0x5dca55[_0x35892d];return _0x26aeb6;}function canPromptForAccessKey(_0x1fddcb){const _0x7e2cbf=a12_0x26ae;return!_0x1fddcb[_0x7e2cbf(0x207)]&&process[_0x7e2cbf(0x209)][_0x7e2cbf(0x1e9)]!==![]&&process[_0x7e2cbf(0x1e7)][_0x7e2cbf(0x1e9)]!==![];}function resolveAuthScopeFlags(_0x182d73){const _0x4b7b42=a12_0x26ae;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x182d73['bool'](_0x4b7b42(0x226)),'explicitProject':_0x182d73[_0x4b7b42(0x1fa)](_0x4b7b42(0x205)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x4b0b11){const _0x3e8ec8=a12_0x26ae;let _0xb3ea52=(_0x4b0b11[_0x3e8ec8(0x1f6)](_0x3e8ec8(0x220))||_0x4b0b11[_0x3e8ec8(0x1f6)]('ak')||'')['trim']();const _0x347aa7=(_0x4b0b11[_0x3e8ec8(0x1f6)](_0x3e8ec8(0x22a))||'')[_0x3e8ec8(0x22c)]();if(!_0xb3ea52&&canPromptForAccessKey(_0x4b0b11))try{showAccessKeyCreateHint(),_0xb3ea52=await promptAccessKey('');}catch(_0x55958a){if(isAbortPrompt(_0x55958a))throw CliErrors[_0x3e8ec8(0x20d)]();throw _0x55958a;}if(!_0xb3ea52)throw CliErrors['validation'](_0x3e8ec8(0x231),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x3e8ec8(0x210)](_0xb3ea52))throw CliErrors[_0x3e8ec8(0x216)](_0x3e8ec8(0x23d)+_0xb3ea52+'\x22',_0x3e8ec8(0x1f2));if(!_0x347aa7)return{'accessKey':_0xb3ea52};const _0x260fa8=normalizeEnv(_0x347aa7);return{'accessKey':_0xb3ea52,'env':isDaily(_0x260fa8)?_0x3e8ec8(0x213):isDev(_0x260fa8)?_0x3e8ec8(0x218):'production'};}export const authDefinitions=[{'service':a12_0x99f42(0x227),'command':a12_0x99f42(0x21c),'description':a12_0x99f42(0x1f7),'risk':a12_0x99f42(0x238),'confirmationDescription':'将把新的\x20AccessKey\x20保存到所选\x20Lovrabet\x20配置;若该作用域已有\x20AccessKey,将被覆盖。确认界面不会显示密钥内容。','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x99f42(0x220),'type':a12_0x99f42(0x1da),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x99f42(0x226),'type':'boolean','description':a12_0x99f42(0x22e),'default':!![]},{'name':'project','type':a12_0x99f42(0x225),'description':a12_0x99f42(0x1f8),'default':![]}],async 'execute'(_0x3d6860){const _0x16e6b7=a12_0x99f42;if(_0x3d6860[_0x16e6b7(0x1fa)](_0x16e6b7(0x228)))throw CliErrors[_0x16e6b7(0x216)](_0x16e6b7(0x219),_0x16e6b7(0x206)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x3b8dd2=(_0x3d6860[_0x16e6b7(0x1f6)](_0x16e6b7(0x220))||_0x3d6860[_0x16e6b7(0x1f6)]('ak')||'')[_0x16e6b7(0x22c)]();if(!_0x3b8dd2&&_0x3d6860[_0x16e6b7(0x207)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x223ee9=await resolveAuthWriteInput(_0x3d6860),_0x1daaaf=resolveAuthScopeFlags(_0x3d6860),_0x104bb7=readScopedConfig(_0x1daaaf);_0x104bb7[_0x16e6b7(0x22b)]=_0x223ee9[_0x16e6b7(0x22b)];_0x223ee9[_0x16e6b7(0x22a)]&&(_0x104bb7[_0x16e6b7(0x22a)]=_0x223ee9['env']);writeScopedConfig(_0x104bb7,_0x1daaaf);const _0x10809f=_0x1daaaf['global']?_0x16e6b7(0x226):_0x16e6b7(0x205),_0x1b48ef=_0x104bb7[_0x16e6b7(0x22a)]?_0x16e6b7(0x1ed)+_0x104bb7[_0x16e6b7(0x22a)]+'.':'';return{'ok':!![],'message':_0x16e6b7(0x1f3)+_0x10809f+_0x16e6b7(0x211)+_0x1b48ef+_0x16e6b7(0x1eb)+CLI_BIN_NAME+_0x16e6b7(0x21e)};}},{'service':a12_0x99f42(0x227),'command':a12_0x99f42(0x1f4),'description':a12_0x99f42(0x23c),'risk':a12_0x99f42(0x238),'confirmationDescription':a12_0x99f42(0x23b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x99f42(0x220),'type':'string','description':a12_0x99f42(0x208)},{'name':'ak','type':a12_0x99f42(0x1da),'description':a12_0x99f42(0x233)},{'name':a12_0x99f42(0x22a),'type':a12_0x99f42(0x1da),'description':a12_0x99f42(0x237)},{'name':a12_0x99f42(0x226),'type':a12_0x99f42(0x225),'description':a12_0x99f42(0x22e),'default':!![]},{'name':a12_0x99f42(0x205),'type':a12_0x99f42(0x225),'description':a12_0x99f42(0x1f8),'default':![]}],async 'execute'(_0x19aede){const _0x44445a=a12_0x99f42,_0x10d550=await resolveAuthWriteInput(_0x19aede),_0x2f5c2b=resolveAuthScopeFlags(_0x19aede),_0x4514b2={'accessKey':_0x10d550['accessKey']};_0x10d550[_0x44445a(0x22a)]&&(_0x4514b2['env']=_0x10d550[_0x44445a(0x22a)]);writeScopedConfig(_0x4514b2,_0x2f5c2b);const _0x340ff5=_0x2f5c2b[_0x44445a(0x226)]?'global':_0x44445a(0x205),_0x10914f=_0x4514b2['env']?_0x44445a(0x1ed)+_0x4514b2[_0x44445a(0x22a)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x340ff5+_0x44445a(0x1e3)+_0x10914f+_0x44445a(0x1eb)+CLI_BIN_NAME+_0x44445a(0x21e)};}},{'service':a12_0x99f42(0x227),'command':a12_0x99f42(0x23a),'description':a12_0x99f42(0x1e1),'risk':a12_0x99f42(0x238),'confirmationDescription':a12_0x99f42(0x21d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x99f42(0x226),'type':a12_0x99f42(0x225),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x99f42(0x205),'type':a12_0x99f42(0x225),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x350b14){const _0x386f1d=a12_0x99f42,_0x121817=resolveAuthScopeFlags(_0x350b14),_0x19df7c=readScopedConfig(_0x121817),_0x600c8=!!_0x19df7c[_0x386f1d(0x22b)];delete _0x19df7c[_0x386f1d(0x22b)],writeScopedConfig(_0x19df7c,_0x121817);const _0x59db31=_0x121817[_0x386f1d(0x226)]?'global':_0x386f1d(0x205);if(_0x600c8)return{'ok':!![],'message':_0x386f1d(0x1e8)+_0x59db31+_0x386f1d(0x211)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x59db31+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a12_0x99f42(0x227),'command':a12_0x99f42(0x1e4),'description':a12_0x99f42(0x1e2),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x99f42(0x226),'type':a12_0x99f42(0x225),'description':a12_0x99f42(0x1f1),'default':!![]},{'name':a12_0x99f42(0x205),'type':a12_0x99f42(0x225),'description':a12_0x99f42(0x215),'default':![]},{'name':a12_0x99f42(0x204),'type':'boolean','description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x261cd2){const _0x11a5a0=a12_0x99f42,_0x35784f=resolveAuthScopeFlags(_0x261cd2),_0x36987d=readScopedConfig(_0x35784f),_0x3e3a72=productEnvName(_0x11a5a0(0x1fd)),_0x47b1dc=productEnv('ACCESS_KEY')||undefined,_0x34004d=_0x36987d[_0x11a5a0(0x22b)]||undefined,_0x23d889=_0x47b1dc||_0x34004d,_0x2ce95b=_0x47b1dc?_0x3e3a72+_0x11a5a0(0x234):_0x34004d?(_0x35784f['global']?_0x11a5a0(0x226):_0x11a5a0(0x205))+_0x11a5a0(0x1f0):null,_0x35d85f=[_0x11a5a0(0x1ea)+AUTH_MODE[_0x11a5a0(0x222)]];if(_0x23d889){const _0x42acbe=_0x23d889['length']>0x8?''+_0x23d889['slice'](0x0,0x8)+'*'['repeat'](_0x23d889[_0x11a5a0(0x1df)]-0x8):_0x23d889;_0x35d85f[_0x11a5a0(0x201)](_0x11a5a0(0x1fe)+_0x42acbe+(_0x2ce95b?_0x11a5a0(0x1f9)+_0x2ce95b+')':'')),_0x35d85f[_0x11a5a0(0x201)](_0x11a5a0(0x1ff));}if(!_0x23d889){_0x35d85f['push'](''),_0x35d85f[_0x11a5a0(0x201)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x35d85f['push'](''),_0x35d85f[_0x11a5a0(0x201)](_0x11a5a0(0x1f5)+CLI_BIN_NAME+_0x11a5a0(0x20e)),_0x35d85f[_0x11a5a0(0x201)](''),_0x35d85f[_0x11a5a0(0x201)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x11a5a0(0x224)]+')'),_0x35d85f[_0x11a5a0(0x201)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x35d85f[_0x11a5a0(0x201)](''),_0x35d85f[_0x11a5a0(0x201)](_0x11a5a0(0x214)),_0x35d85f[_0x11a5a0(0x201)](_0x11a5a0(0x217)+_0x3e3a72+_0x11a5a0(0x200)),_0x35d85f[_0x11a5a0(0x201)](''),_0x35d85f[_0x11a5a0(0x201)](_0x11a5a0(0x203)+CLI_BIN_NAME+_0x11a5a0(0x21e)),_0x35d85f['push'](_0x11a5a0(0x223)+CLI_BIN_NAME+'\x20doctor');if(_0x261cd2[_0x11a5a0(0x1fa)](_0x11a5a0(0x204))){const _0x20b78b=readStoredDeviceCode();if(_0x20b78b&&!isStoredDeviceCodeExpired(_0x20b78b)){const _0x2f5b90=getUserDomain(),_0x4fcd22=await fetchDeviceToken(_0x2f5b90,_0x20b78b[_0x11a5a0(0x21f)]);if(_0x4fcd22['status']==='success'&&_0x4fcd22[_0x11a5a0(0x1fc)]){const _0x205c79={'global':_0x20b78b[_0x11a5a0(0x20b)]===_0x11a5a0(0x226)},_0x1b7c20=readScopedConfig(_0x205c79);_0x1b7c20[_0x11a5a0(0x22b)]=_0x4fcd22['access_key'],writeScopedConfig(_0x1b7c20,_0x205c79),deleteStoredDeviceCode();const _0x56ec2d=_0x4fcd22['access_key'],_0x26c2b6=_0x56ec2d[_0x11a5a0(0x1df)]>0x8?''+_0x56ec2d[_0x11a5a0(0x221)](0x0,0x8)+'*'[_0x11a5a0(0x1db)](_0x56ec2d[_0x11a5a0(0x1df)]-0x8):_0x56ec2d,_0x52eddf=_0x20b78b[_0x11a5a0(0x20b)]===_0x11a5a0(0x226)?_0x11a5a0(0x1ec):_0x11a5a0(0x1dd);return{'ok':!![],'message':[_0x11a5a0(0x1ea)+AUTH_MODE[_0x11a5a0(0x222)],_0x11a5a0(0x1fe)+_0x26c2b6+_0x11a5a0(0x1f9)+_0x52eddf+')',_0x11a5a0(0x1ff)][_0x11a5a0(0x1ef)]('\x0a')};}_0x4fcd22[_0x11a5a0(0x1e4)]==='expired'&&deleteStoredDeviceCode();throw CliErrors[_0x11a5a0(0x22d)]('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors[_0x11a5a0(0x22d)](_0x35d85f['join']('\x0a'));}}return{'ok':!![],'message':_0x35d85f[_0x11a5a0(0x1ef)]('\x0a')};}},{'service':'auth','command':a12_0x99f42(0x1fb),'description':a12_0x99f42(0x235),'risk':a12_0x99f42(0x22f),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x39511a){const _0x47ebfc=a12_0x99f42,_0x150e1a=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x150e1a,'meta':{'env':_0x39511a[_0x47ebfc(0x1ee)]??_0x47ebfc(0x1e6)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a13_0x4222(){const _0xef547b=['):\x20','31833BKucme','16KmgGlf','once','4506594UDagCK','328VjOwie','User\x20aborted\x20prompt','9392InJXAi','close','SIGINT','2586600VCOpjP','AccessKey\x20(','2657823sdwQML','trim','7603480ZAQhQm','AbortPrompt','2272yNAmXH','name','1527ETJkkz'];a13_0x4222=function(){return _0xef547b;};return a13_0x4222();}(function(_0x55959f,_0x564014){const _0x1c129d=a13_0x5d22,_0xe5fc72=_0x55959f();while(!![]){try{const _0x37f732=-parseInt(_0x1c129d(0x1eb))/0x1*(-parseInt(_0x1c129d(0x1f0))/0x2)+-parseInt(_0x1c129d(0x1e8))/0x3*(-parseInt(_0x1c129d(0x1e6))/0x4)+-parseInt(_0x1c129d(0x1f3))/0x5+-parseInt(_0x1c129d(0x1ed))/0x6+parseInt(_0x1c129d(0x1e2))/0x7+-parseInt(_0x1c129d(0x1ee))/0x8*(-parseInt(_0x1c129d(0x1ea))/0x9)+parseInt(_0x1c129d(0x1e4))/0xa;if(_0x37f732===_0x564014)break;else _0xe5fc72['push'](_0xe5fc72['shift']());}catch(_0x705154){_0xe5fc72['push'](_0xe5fc72['shift']());}}}(a13_0x4222,0x5cfd3));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x1fc459=a13_0x5d22;super(_0x1fc459(0x1ef)),this['name']='AbortPrompt';}}function createSafeRl(){const _0x356edf=createInterface({'input':process['stdin'],'output':process['stdout']});let _0x1fdab7;const _0x435e8a=new Promise((_0x6a6683,_0x38f283)=>{const _0x5d5c20=a13_0x5d22;_0x1fdab7=()=>{const _0x546782=a13_0x5d22;_0x1fdab7&&(_0x356edf['removeListener'](_0x546782(0x1f2),_0x1fdab7),_0x1fdab7=undefined);try{_0x356edf[_0x546782(0x1f1)]();}catch{}_0x38f283(new AbortPrompt());},_0x356edf[_0x5d5c20(0x1ec)](_0x5d5c20(0x1f2),_0x1fdab7);}),_0x2c0950=()=>{const _0x46abd0=a13_0x5d22;_0x1fdab7&&(_0x356edf['removeListener']('SIGINT',_0x1fdab7),_0x1fdab7=undefined);try{_0x356edf[_0x46abd0(0x1f1)]();}catch{}};return{'rl':_0x356edf,'abortPromise':_0x435e8a,'disposeSuccess':_0x2c0950};}function a13_0x5d22(_0x55af95,_0x3b71f8){_0x55af95=_0x55af95-0x1e1;const _0x422288=a13_0x4222();let _0x5d222b=_0x422288[_0x55af95];return _0x5d222b;}export async function promptAccessKey(_0x1cbc98=''){const {rl:_0x976796,abortPromise:_0x15cadb,disposeSuccess:_0x3cc2d3}=createSafeRl(),_0x3b746e=new Promise(_0x50916d=>{const _0x40e8e0=a13_0x5d22,_0x2d9e0e=_0x1cbc98?_0x40e8e0(0x1e1)+_0x1cbc98+_0x40e8e0(0x1e9):'AccessKey\x20(paste\x20ak_...):\x20';_0x976796['question'](_0x2d9e0e,_0x60832a=>{const _0x433b9a=_0x40e8e0;_0x3cc2d3(),_0x50916d(_0x60832a[_0x433b9a(0x1e3)]()||_0x1cbc98);});});return Promise['race']([_0x3b746e,_0x15cadb]);}export function isAbortPrompt(_0x1fa1e0){const _0x5908e7=a13_0x5d22;return _0x1fa1e0 instanceof Error&&_0x1fa1e0[_0x5908e7(0x1e7)]===_0x5908e7(0x1e5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0xee27d0=a14_0x3b6d;(function(_0x478a3c,_0x42010f){const _0x2d51e0=a14_0x3b6d,_0x989afb=_0x478a3c();while(!![]){try{const _0xe64094=-parseInt(_0x2d51e0(0x177))/0x1*(parseInt(_0x2d51e0(0x17b))/0x2)+parseInt(_0x2d51e0(0x185))/0x3+-parseInt(_0x2d51e0(0x184))/0x4*(-parseInt(_0x2d51e0(0x17d))/0x5)+-parseInt(_0x2d51e0(0x187))/0x6+-parseInt(_0x2d51e0(0x183))/0x7+parseInt(_0x2d51e0(0x188))/0x8*(-parseInt(_0x2d51e0(0x174))/0x9)+parseInt(_0x2d51e0(0x178))/0xa;if(_0xe64094===_0x42010f)break;else _0x989afb['push'](_0x989afb['shift']());}catch(_0x4c058f){_0x989afb['push'](_0x989afb['shift']());}}}(a14_0x4412,0xbc93f));import{getBffEndpointContract}from'../../core/api-client.js';function a14_0x3b6d(_0x295cfe,_0x1f6819){_0x295cfe=_0x295cfe-0x174;const _0x44124b=a14_0x4412();let _0x3b6dd0=_0x44124b[_0x295cfe];return _0x3b6dd0;}function a14_0x4412(){const _0x555541=['gmtModified','(none)','description','appCode','8555246FuTNaH','3788zAmOVA','1122216EcNgRz','version','2860716VavHUD','82312pqPwMO','477UxxKbw','Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','read','2713whOTSl','32621820xWAxQm','str','bff','766EVlvDm','BFF\x20function\x20name','2215oiYBSj','functionName'];a14_0x4412=function(){return _0x555541;};return a14_0x4412();}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a14_0xee27d0(0x17a),'command':'detail','description':a14_0xee27d0(0x175),'risk':a14_0xee27d0(0x176),'flags':[{...NAME_FLAG,'required':!![],'description':a14_0xee27d0(0x17c)}],async 'execute'(_0x5cddf1){const _0x6d8bee=a14_0xee27d0,_0x2047b0=await getBffEndpointContract(_0x5cddf1[_0x6d8bee(0x182)],_0x5cddf1[_0x6d8bee(0x179)]('name'));return{'ok':!![],'data':{'appCode':_0x2047b0[_0x6d8bee(0x182)],'functionName':_0x2047b0[_0x6d8bee(0x17e)],'description':_0x2047b0[_0x6d8bee(0x181)]||_0x6d8bee(0x180),'version':_0x2047b0[_0x6d8bee(0x186)],'gmtModified':_0x2047b0[_0x6d8bee(0x17f)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x54a51d=a15_0x28f1;(function(_0x52f6d1,_0x5d9594){const _0x1b1254=a15_0x28f1,_0x5162c8=_0x52f6d1();while(!![]){try{const _0x2fed65=parseInt(_0x1b1254(0x15a))/0x1*(parseInt(_0x1b1254(0x156))/0x2)+-parseInt(_0x1b1254(0x14e))/0x3*(-parseInt(_0x1b1254(0x158))/0x4)+-parseInt(_0x1b1254(0x14f))/0x5+parseInt(_0x1b1254(0x152))/0x6*(-parseInt(_0x1b1254(0x159))/0x7)+-parseInt(_0x1b1254(0x15e))/0x8+parseInt(_0x1b1254(0x155))/0x9+parseInt(_0x1b1254(0x15d))/0xa*(-parseInt(_0x1b1254(0x15b))/0xb);if(_0x2fed65===_0x5d9594)break;else _0x5162c8['push'](_0x5162c8['shift']());}catch(_0x5dbaee){_0x5162c8['push'](_0x5162c8['shift']());}}}(a15_0x2cac,0x53733));import{executeSdkBff}from'../../core/sdk-client.js';function a15_0x2cac(){const _0x49861a=['549410uIvGRC','params','exec','6izgMFX','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','read','4037967FtOYEF','1138SjhCOb','now','32740uFcAtO','538545pwMLFd','1084oCqINc','5570367rVhspN','BFF\x20function\x20name\x20to\x20execute','10PIVQRw','1029232nYPaRH','bff','str','BFF\x20executed\x20in\x20','36qbkyWj'];a15_0x2cac=function(){return _0x49861a;};return a15_0x2cac();}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a15_0x28f1(_0x51e178,_0x3bbe4b){_0x51e178=_0x51e178-0x14b;const _0x2cacbe=a15_0x2cac();let _0x28f12e=_0x2cacbe[_0x51e178];return _0x28f12e;}export const bffExec={'service':a15_0x54a51d(0x14b),'command':a15_0x54a51d(0x151),'description':a15_0x54a51d(0x153),'risk':a15_0x54a51d(0x154),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x54a51d(0x15c)},PARAMS_FLAG],async 'execute'(_0x382d70){const _0x215ee8=a15_0x54a51d,_0x1e74b3=parseJsonParams(_0x382d70[_0x215ee8(0x14c)](_0x215ee8(0x150))),_0x55a8fb=Date['now'](),_0x11968c=await executeSdkBff(_0x382d70['str']('name'),_0x1e74b3),_0x5235ed=Date[_0x215ee8(0x157)]()-_0x55a8fb;return{'ok':!![],'data':{'result':_0x11968c,'elapsed':_0x5235ed},'message':_0x215ee8(0x14d)+_0x5235ed+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2afd62,_0x2f96ca){const _0xc7816e=a16_0xad8b,_0x314466=_0x2afd62();while(!![]){try{const _0x38f075=-parseInt(_0xc7816e(0x1ae))/0x1*(parseInt(_0xc7816e(0x1ab))/0x2)+parseInt(_0xc7816e(0x1af))/0x3*(parseInt(_0xc7816e(0x1b0))/0x4)+parseInt(_0xc7816e(0x1aa))/0x5+parseInt(_0xc7816e(0x1b1))/0x6*(-parseInt(_0xc7816e(0x1ac))/0x7)+-parseInt(_0xc7816e(0x1b2))/0x8+-parseInt(_0xc7816e(0x1b3))/0x9+-parseInt(_0xc7816e(0x1a9))/0xa*(-parseInt(_0xc7816e(0x1ad))/0xb);if(_0x38f075===_0x2f96ca)break;else _0x314466['push'](_0x314466['shift']());}catch(_0x541825){_0x314466['push'](_0x314466['shift']());}}}(a16_0x3f6b,0x70bb4));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];function a16_0xad8b(_0x492136,_0x2d4395){_0x492136=_0x492136-0x1a9;const _0x3f6b05=a16_0x3f6b();let _0xad8b6d=_0x3f6b05[_0x492136];return _0xad8b6d;}function a16_0x3f6b(){const _0x3e8881=['7193232xTVXcJ','2494197mpxnGZ','2412290OuLAmD','3606025JRVvny','51444GzQOVM','1302798KhMUxs','33qrBaSn','7DHOlbO','9NKTvZH','745748CtlKJo','6bqnAuB'];a16_0x3f6b=function(){return _0x3e8881;};return a16_0x3f6b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x23d027=a17_0xa5d6;function a17_0xa5d6(_0x50b56a,_0x215910){_0x50b56a=_0x50b56a-0x7a;const _0x1ee397=a17_0x1ee3();let _0xa5d6e7=_0x1ee397[_0x50b56a];return _0xa5d6e7;}(function(_0x5f5908,_0x24711e){const _0x18965c=a17_0xa5d6,_0xd46899=_0x5f5908();while(!![]){try{const _0x1b9bda=parseInt(_0x18965c(0x91))/0x1*(-parseInt(_0x18965c(0x97))/0x2)+-parseInt(_0x18965c(0x82))/0x3*(-parseInt(_0x18965c(0x84))/0x4)+parseInt(_0x18965c(0x8e))/0x5+parseInt(_0x18965c(0x87))/0x6*(parseInt(_0x18965c(0x7c))/0x7)+-parseInt(_0x18965c(0x8a))/0x8+parseInt(_0x18965c(0x98))/0x9+-parseInt(_0x18965c(0x8b))/0xa;if(_0x1b9bda===_0x24711e)break;else _0xd46899['push'](_0xd46899['shift']());}catch(_0x4d6a4d){_0xd46899['push'](_0xd46899['shift']());}}}(a17_0x1ee3,0xbd78c));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a17_0x1ee3(){const _0x37e01a=['CLI\x20Built-in\x20Skill\x20installed','npx\x20skills\x20add\x20failed:\x20','6539130ENWdPu','apiError','setLogPath','359fBILkZ','nonInteractive','cli-skill-install','将通过\x20npx\x20下载并全局安装\x20Lovrabet\x20CLI\x20内置\x20Skill;这会修改当前用户的全局\x20Skill\x20目录。','Skipped\x20npx\x20(','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','2840RrPwLK','4675104dlrHod','安装\x20Lovrabet\x20运行态所需的\x20CLI\x20内置\x20Skill','../../skills/npx-skills-add.js','pipe','7oZLueW','cwd','unknown','\x20-g\x20-y)...','write','\x20-g\x20-y','3tKhtcP','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','2475076IpdYip','info','skipped','6379212GFTywI','log','error','9132808hpJtjc','10817960upfpfr'];a17_0x1ee3=function(){return _0x37e01a;};return a17_0x1ee3();}export const cliSkillDefinitions=[{'service':'cli-skill','command':'install','description':a17_0x23d027(0x99),'risk':a17_0x23d027(0x80),'confirmationDescription':a17_0x23d027(0x94),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5487b6){const _0x529319=a17_0x23d027;logger[_0x529319(0x90)](process[_0x529319(0x7d)]()),logger[_0x529319(0x85)](_0x529319(0x93),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {LOVRABET_SKILL_SOURCE:_0x5de943,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x1f2986,runNpxSkillsAddGlobal:_0x2a42c0}=await import(_0x529319(0x7a)),_0x5366f3=_0x5487b6[_0x529319(0x92)]?_0x529319(0x7b):'inherit';console['log'](_0x529319(0x83)+_0x5de943+_0x529319(0x7f));const _0x31bdeb=_0x2a42c0(process['cwd'](),_0x5de943,{'stdio':_0x5366f3});if(_0x31bdeb[_0x529319(0x86)])console[_0x529319(0x88)](_0x529319(0x95)+_0x1f2986+'=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x31bdeb['ok'])console['log'](_0x529319(0x8c));else throw CliErrors[_0x529319(0x8f)](_0x529319(0x8d)+(_0x31bdeb[_0x529319(0x89)]||_0x529319(0x7e)),_0x529319(0x96)+_0x5de943+_0x529319(0x81));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x284985,_0x38ccfb){const _0x355948=a18_0x5635,_0x5207ab=_0x284985();while(!![]){try{const _0x5ad826=-parseInt(_0x355948(0x91))/0x1*(parseInt(_0x355948(0x89))/0x2)+parseInt(_0x355948(0x83))/0x3+-parseInt(_0x355948(0x90))/0x4+parseInt(_0x355948(0x8d))/0x5+-parseInt(_0x355948(0x8e))/0x6+parseInt(_0x355948(0x87))/0x7*(parseInt(_0x355948(0x92))/0x8)+parseInt(_0x355948(0x94))/0x9*(parseInt(_0x355948(0x8b))/0xa);if(_0x5ad826===_0x38ccfb)break;else _0x5207ab['push'](_0x5207ab['shift']());}catch(_0x5acd07){_0x5207ab['push'](_0x5207ab['shift']());}}}(a18_0x4e75,0xa23a7));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';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(_0x28ac46){const _0x2a2a8f=a18_0x5635,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x3b75a0}=_0x28ac46;if(explicitGlobal&&explicitProject)throw CliErrors[_0x2a2a8f(0x7d)](_0x2a2a8f(0x8a),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0x2a2a8f(0x7e);if(explicitProject)return'project';switch(_0x3b75a0){case _0x2a2a8f(0x93):return'global';case _0x2a2a8f(0x85):return _0x28ac46['inProject']??isInProject()?_0x2a2a8f(0x82):_0x2a2a8f(0x7e);case _0x2a2a8f(0x84):if(!(_0x28ac46['inProject']??isInProject()))throw CliErrors['validation'](_0x2a2a8f(0x7f)+PRODUCT_CONFIG[_0x2a2a8f(0x86)]+_0x2a2a8f(0x88),_0x2a2a8f(0x80)+PRODUCT_CONFIG['newConfigFileName']+_0x2a2a8f(0x81)+CLI_BIN_NAME+_0x2a2a8f(0x8f));return _0x2a2a8f(0x82);}}function a18_0x4e75(){const _0x21c390=['Add\x20--global\x20to\x20write\x20to\x20~/',',\x20or\x20run\x20`','project','1933782shALvB','project-or-global-explicit','project-default','newConfigFileName','304808SYSKpf','\x20found).','79652xdCRwi','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','376930FBAYkc','\x20(global)','4151980zNIsan','7574736SLRFZs','\x20init`\x20first.','2516232sFEYHL','13CgvpwF','176ayZNXy','global-default','153OsNHpq','validation','global','Not\x20inside\x20a\x20project\x20(no\x20'];a18_0x4e75=function(){return _0x21c390;};return a18_0x4e75();}function a18_0x5635(_0x20e410,_0x111096){_0x20e410=_0x20e410-0x7d;const _0x4e759a=a18_0x4e75();let _0x563577=_0x4e759a[_0x20e410];return _0x563577;}export function toScopeFlags(_0x403832){const _0x33a281=a18_0x5635;return{'global':_0x403832===_0x33a281(0x7e)};}export function formatScopeLabel(_0x258cea){const _0x212178=a18_0x5635;return _0x258cea===_0x212178(0x7e)?_0x212178(0x8c):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x241664,_0x5755ab){const _0x248221=a19_0x11fb,_0x1bbb28=_0x241664();while(!![]){try{const _0x2d8c7c=-parseInt(_0x248221(0x102))/0x1+-parseInt(_0x248221(0x109))/0x2+-parseInt(_0x248221(0x103))/0x3+parseInt(_0x248221(0x10e))/0x4*(parseInt(_0x248221(0x106))/0x5)+parseInt(_0x248221(0x108))/0x6*(parseInt(_0x248221(0x10a))/0x7)+-parseInt(_0x248221(0x10f))/0x8+parseInt(_0x248221(0x105))/0x9;if(_0x2d8c7c===_0x5755ab)break;else _0x1bbb28['push'](_0x1bbb28['shift']());}catch(_0x46e345){_0x1bbb28['push'](_0x1bbb28['shift']());}}}(a19_0x506a,0xdb3ab));function a19_0x11fb(_0x265f10,_0x3b0a87){_0x265f10=_0x265f10-0xf9;const _0x506a74=a19_0x506a();let _0x11fbec=_0x506a74[_0x265f10];return _0x11fbec;}import{CliErrors}from'../../errors.js';function isSet(_0x5d47f6,_0x27f439){const _0x53f8c0=a19_0x11fb,_0x106c24=_0x5d47f6[_0x53f8c0(0x100)](_0x27f439);return _0x106c24!==undefined&&_0x106c24!==''&&_0x106c24!==![]&&_0x106c24!==0x0;}function fmtNames(_0x2e82a7){const _0x2a25fb=a19_0x11fb;return _0x2e82a7[_0x2a25fb(0x10c)](_0x102143=>'--'+_0x102143)['join'](',\x20');}export function requireOneOf(_0x370c76,_0x17eeed,_0x4693df){const _0x1b5de0=a19_0x11fb,_0x5cc9ef=_0x17eeed['filter'](_0x51215c=>isSet(_0x370c76,_0x51215c));if(_0x5cc9ef['length']!==0x1)throw CliErrors[_0x1b5de0(0xfd)](_0x5cc9ef['length']===0x0?_0x1b5de0(0x107)+fmtNames(_0x17eeed)+_0x1b5de0(0x112)+_0x4693df+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x17eeed)+_0x1b5de0(0xfa)+fmtNames(_0x5cc9ef)+'.',_0x5cc9ef[_0x1b5de0(0xf9)]===0x0?_0x1b5de0(0x111)+fmtNames(_0x17eeed):_0x1b5de0(0xff));}export function requireAnyOf(_0x3461b5,_0xd8d671,_0x3bef18){const _0x52e9f4=a19_0x11fb;if(!_0xd8d671[_0x52e9f4(0xfb)](_0x98615b=>isSet(_0x3461b5,_0x98615b)))throw CliErrors[_0x52e9f4(0xfd)](_0x52e9f4(0x110)+fmtNames(_0xd8d671)+_0x52e9f4(0x112)+_0x3bef18+'`.',_0x52e9f4(0x111)+fmtNames(_0xd8d671));}export function mutuallyExclusive(_0x3de232,_0x579037,_0x5f50ec){const _0x2d2e7b=a19_0x11fb,_0xd9aeb0=_0x579037['filter'](_0x2c0499=>isSet(_0x3de232,_0x2c0499));if(_0xd9aeb0['length']>0x1)throw CliErrors[_0x2d2e7b(0xfd)](_0x2d2e7b(0x113)+fmtNames(_0xd9aeb0)+_0x2d2e7b(0xfc)+_0x5f50ec+'`.',_0x2d2e7b(0xfe)+fmtNames(_0x579037));}export function validatePattern(_0x13051d,_0x5f4b61,_0x57c4e8,_0x2ae12f){const _0x22e349=a19_0x11fb,_0x5878da=_0x13051d[_0x22e349(0x10b)](_0x5f4b61);if(_0x5878da&&!_0x57c4e8[_0x22e349(0x104)](_0x5878da))throw CliErrors[_0x22e349(0xfd)](_0x22e349(0x101)+_0x5f4b61+':\x20expected\x20'+_0x2ae12f+_0x22e349(0x10d)+_0x5878da+'\x22.');}function a19_0x506a(){const _0x8cc99c=['352BWzxus','4851160QZsZQe','At\x20least\x20one\x20of\x20','Provide\x20one\x20of:\x20','\x20is\x20required\x20for\x20`','Flags\x20','length','\x20is\x20allowed,\x20found:\x20','some','\x20are\x20mutually\x20exclusive\x20for\x20`','validation','Use\x20only\x20one\x20of:\x20','Remove\x20all\x20but\x20one.','flag','Invalid\x20--','1705971DdqyJO','3650520enqNqL','test','36463662PJKBfm','54485lPMCuK','Exactly\x20one\x20of\x20','27096WvIUGQ','1256890LMbyJw','70wxydjR','str','map',',\x20got\x20\x22'];a19_0x506a=function(){return _0x8cc99c;};return a19_0x506a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x1bc136=a20_0xab85;function a20_0xab85(_0x5e851f,_0x1c0f09){_0x5e851f=_0x5e851f-0xbf;const _0x9038a5=a20_0x9038();let _0xab8579=_0x9038a5[_0x5e851f];return _0xab8579;}(function(_0x2e5146,_0x288136){const _0x3c6573=a20_0xab85,_0x46643d=_0x2e5146();while(!![]){try{const _0x2aa5b1=parseInt(_0x3c6573(0xbf))/0x1*(parseInt(_0x3c6573(0xd1))/0x2)+parseInt(_0x3c6573(0xcf))/0x3+-parseInt(_0x3c6573(0xc8))/0x4*(parseInt(_0x3c6573(0xd4))/0x5)+-parseInt(_0x3c6573(0xc4))/0x6+parseInt(_0x3c6573(0xd5))/0x7+parseInt(_0x3c6573(0xc5))/0x8+-parseInt(_0x3c6573(0xc0))/0x9*(parseInt(_0x3c6573(0xc9))/0xa);if(_0x2aa5b1===_0x288136)break;else _0x46643d['push'](_0x46643d['shift']());}catch(_0x436b9e){_0x46643d['push'](_0x46643d['shift']());}}}(a20_0x9038,0x71b8c));export const CODE_FLAG={'name':a20_0x1bc136(0xce),'type':a20_0x1bc136(0xc6),'required':!![],'description':a20_0x1bc136(0xcb),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a20_0x1bc136(0xc1),'type':a20_0x1bc136(0xc6),'required':!![],'description':a20_0x1bc136(0xcc),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x1bc136(0xcd)}};function a20_0x9038(){const _0x5e6dfa=['Resource\x20name\x20for\x20lookup','5172924juLKtG','5052584OIztAv','string','Resource\x20ID','228OEdyWT','10biwufX','name','Dataset\x20code\x20(32-char\x20hex\x20UUID)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','code','2175402csdhqa','boolean','2OAgTUp','params','number','46855FfMhaF','114478fVEGwh','704249MSvySO','1936845hAASFO','sqlcode','verbose'];a20_0x9038=function(){return _0x5e6dfa;};return a20_0x9038();}export const VERBOSE_FLAG={'name':a20_0x1bc136(0xc2),'type':a20_0x1bc136(0xd0),'description':'Return\x20full\x20raw\x20response\x20object'};export const PARAMS_FLAG={'name':a20_0x1bc136(0xd2),'type':a20_0x1bc136(0xc6),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a20_0x1bc136(0xca),'type':'string','description':a20_0x1bc136(0xc3)};export const ID_FLAG={'name':'id','type':a20_0x1bc136(0xd3),'required':!![],'description':a20_0x1bc136(0xc7)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc4c5bc,_0x49e4fc){const _0x333570=a21_0x35a6,_0x1b40d9=_0xc4c5bc();while(!![]){try{const _0xaddd2b=parseInt(_0x333570(0xd5))/0x1*(-parseInt(_0x333570(0xcf))/0x2)+-parseInt(_0x333570(0xca))/0x3*(parseInt(_0x333570(0xc9))/0x4)+parseInt(_0x333570(0xd9))/0x5+-parseInt(_0x333570(0xd0))/0x6*(-parseInt(_0x333570(0xc8))/0x7)+parseInt(_0x333570(0xd6))/0x8*(-parseInt(_0x333570(0xcc))/0x9)+-parseInt(_0x333570(0xda))/0xa+-parseInt(_0x333570(0xce))/0xb*(-parseInt(_0x333570(0xdb))/0xc);if(_0xaddd2b===_0x49e4fc)break;else _0x1b40d9['push'](_0x1b40d9['shift']());}catch(_0x16a1c6){_0x1b40d9['push'](_0x1b40d9['shift']());}}}(a21_0x296d,0x71f2d));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a21_0x35a6(_0x47776d,_0x4a209a){_0x47776d=_0x47776d-0xc8;const _0x296d2f=a21_0x296d();let _0x35a6ac=_0x296d2f[_0x47776d];return _0x35a6ac;}function formatBytes(_0x4726bd){const _0x1abd09=a21_0x35a6;if(_0x4726bd>=BYTES_PER_MB){const _0x1ec0a6=Math[_0x1abd09(0xd1)](_0x4726bd/BYTES_PER_MB*0x64)/0x64;return _0x1ec0a6[_0x1abd09(0xcb)](0x2)+'\x20MB';}return _0x4726bd+'\x20B';}export function requireRuntimeUploadFile(_0x33e3b5,_0x3ebe1c){const _0x341c3d=a21_0x35a6,_0x361f7d=_0x33e3b5[_0x341c3d(0xd8)]();if(!_0x361f7d)throw CliErrors[_0x341c3d(0xdc)](_0x3ebe1c+_0x341c3d(0xcd));if(!existsSync(_0x361f7d))throw CliErrors['validation'](_0x341c3d(0xd7)+_0x361f7d);const _0x2351db=statSync(_0x361f7d);if(!_0x2351db[_0x341c3d(0xd3)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x361f7d);if(_0x2351db['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x341c3d(0xd2)+_0x361f7d+'\x20('+formatBytes(_0x2351db['size'])+')');return{'path':_0x361f7d,'size':_0x2351db[_0x341c3d(0xd4)]};}function a21_0x296d(){const _0x3fb574=['trim','1622960tpBJZC','7989970JosEXM','218292GVekvs','validation','7385UKjyum','92ZYjmhI','53259dBNLxb','toFixed','9Zmheot','\x20path\x20is\x20required.','1584TEiyab','17194vimdgD','2910OOFJWF','ceil','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','isFile','size','100XZQCFR','7376176VwNcRP','File\x20not\x20found:\x20'];a21_0x296d=function(){return _0x3fb574;};return a21_0x296d();}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a22_0x34a5c2=a22_0x518d;(function(_0x2a7eb2,_0x276a31){const _0x4634b7=a22_0x518d,_0x3ee80b=_0x2a7eb2();while(!![]){try{const _0x311bb6=-parseInt(_0x4634b7(0x210))/0x1*(-parseInt(_0x4634b7(0x20c))/0x2)+parseInt(_0x4634b7(0x1e9))/0x3+-parseInt(_0x4634b7(0x201))/0x4+parseInt(_0x4634b7(0x206))/0x5*(parseInt(_0x4634b7(0x20d))/0x6)+parseInt(_0x4634b7(0x207))/0x7+parseInt(_0x4634b7(0x1eb))/0x8+parseInt(_0x4634b7(0x1f8))/0x9*(-parseInt(_0x4634b7(0x1f0))/0xa);if(_0x311bb6===_0x276a31)break;else _0x3ee80b['push'](_0x3ee80b['shift']());}catch(_0x5b776b){_0x3ee80b['push'](_0x3ee80b['shift']());}}}(a22_0x1890,0xdd9d8));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';function a22_0x518d(_0x21d6a0,_0x5b2f22){_0x21d6a0=_0x21d6a0-0x1e9;const _0x189035=a22_0x1890();let _0x518d6b=_0x189035[_0x21d6a0];return _0x518d6b;}const GLOBAL_FLAG={'name':'global','type':a22_0x34a5c2(0x200),'description':a22_0x34a5c2(0x1f2),'default':![]};function parseAliasAppcodeSetKey(_0x3f2ac1){const _0x1ead61=a22_0x34a5c2,_0x4cba42=_0x3f2ac1[_0x1ead61(0x204)]('.');if(_0x4cba42['length']!==0x3||_0x4cba42[0x0]!=='apps'||_0x4cba42[0x2]!=='appcode')return undefined;const _0x5c134f=_0x4cba42[0x1]?.[_0x1ead61(0x216)]();return _0x5c134f?_0x5c134f:undefined;}function parseAliasDeleteKey(_0x33dfa6){const _0x4f2b30=a22_0x34a5c2,_0x48f98b=_0x33dfa6[_0x4f2b30(0x204)]('.');if(_0x48f98b[_0x4f2b30(0x1fb)]===0x2&&_0x48f98b[0x0]===_0x4f2b30(0x1ef)){const _0x4fe71d=_0x48f98b[0x1]?.[_0x4f2b30(0x216)]();return _0x4fe71d?{'alias':_0x4fe71d}:undefined;}if(_0x48f98b['length']===0x3&&_0x48f98b[0x0]==='apps'&&_0x48f98b[0x2]===_0x4f2b30(0x223)){const _0x4e5497=_0x48f98b[0x1]?.[_0x4f2b30(0x216)]();return _0x4e5497?{'alias':_0x4e5497,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x380c95,_0x2398fc,_0x4f6162){const _0xe68a53=a22_0x34a5c2,_0x5e28c8=_0x380c95['apps']&&typeof _0x380c95[_0xe68a53(0x1ef)]==='object'&&!Array[_0xe68a53(0x20f)](_0x380c95[_0xe68a53(0x1ef)])?_0x380c95['apps']:{},_0x4a4d58=_0x5e28c8[_0x2398fc]&&typeof _0x5e28c8[_0x2398fc]===_0xe68a53(0x213)&&!Array[_0xe68a53(0x20f)](_0x5e28c8[_0x2398fc])?_0x5e28c8[_0x2398fc]:{};_0x4a4d58['appcode']=_0x4f6162,_0x5e28c8[_0x2398fc]=_0x4a4d58,_0x380c95[_0xe68a53(0x1ef)]=_0x5e28c8;}function deleteLocalAppAlias(_0x3d98be,_0xccf64f){const _0x471cb4=a22_0x34a5c2;if(!_0x3d98be['apps']||typeof _0x3d98be[_0x471cb4(0x1ef)]!==_0x471cb4(0x213)||Array[_0x471cb4(0x20f)](_0x3d98be[_0x471cb4(0x1ef)]))return![];const _0x9c23c1=_0x3d98be['apps'],_0x40cc40=_0x9c23c1[_0xccf64f['alias']];if(!_0x40cc40||typeof _0x40cc40!==_0x471cb4(0x213)||Array[_0x471cb4(0x20f)](_0x40cc40))return![];if(!_0xccf64f[_0x471cb4(0x218)])return delete _0x9c23c1[_0xccf64f[_0x471cb4(0x212)]],!![];if(!(_0xccf64f['field']in _0x40cc40))return![];return delete _0x40cc40[_0xccf64f[_0x471cb4(0x218)]],Object[_0x471cb4(0x211)](_0x40cc40)['length']===0x0&&delete _0x9c23c1[_0xccf64f[_0x471cb4(0x212)]],!![];}const listDef={'service':a22_0x34a5c2(0x226),'command':'list','description':a22_0x34a5c2(0x215),'risk':a22_0x34a5c2(0x217),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1f4f39){const _0x56562=a22_0x34a5c2,{buildConfigFromFlags:_0xe7f7d6}=await import(_0x56562(0x20b)),_0x27d534=_0xe7f7d6({}),_0x3d63c2=getProjectConfigPath(),_0x3ae73f=resolveWriteConfigPath(_0x56562(0x21e));if(_0x1f4f39[_0x56562(0x1fe)]==='pretty')return{'ok':!![],'message':_0x56562(0x1fc)+(JSON[_0x56562(0x1f7)](_0x27d534[_0x56562(0x208)],null,0x2)+'\x0a\x0a')+_0x56562(0x220)+('\x20\x20project:\x20'+(_0x3d63c2??'(none)')+'\x0a')+('\x20\x20global:\x20\x20'+_0x3ae73f)};return{'ok':!![],'data':{'effective':_0x27d534[_0x56562(0x208)],'configFiles':{'project':_0x3d63c2??null,'global':_0x3ae73f}}};}},getDef={'service':a22_0x34a5c2(0x226),'command':a22_0x34a5c2(0x229),'description':'Get\x20a\x20config\x20value','risk':a22_0x34a5c2(0x217),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a22_0x34a5c2(0x1f1),'required':!![]}],'flags':[],async 'execute'(_0x2882df){const _0x25f8be=a22_0x34a5c2,_0x26d380=_0x2882df[_0x25f8be(0x21f)][0x0];if(!_0x26d380)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x25f8be(0x1f4)+CLI_BIN_NAME+_0x25f8be(0x21a));const {buildConfigFromFlags:_0x3046c1}=await import('../../context.js'),{raw:_0x53a710}=_0x3046c1({});if(_0x26d380[_0x25f8be(0x224)]('.')){const _0xf43376=_0x26d380['split']('.');let _0x5e7f96=_0x53a710;for(const _0x57f609 of _0xf43376){if(_0x5e7f96==null||typeof _0x5e7f96!==_0x25f8be(0x213))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x26d380);_0x5e7f96=_0x5e7f96[_0x57f609];}if(_0x5e7f96===undefined)throw CliErrors[_0x25f8be(0x1f6)]('Key\x20not\x20found:\x20'+_0x26d380);return console[_0x25f8be(0x205)](typeof _0x5e7f96===_0x25f8be(0x213)?JSON[_0x25f8be(0x1f7)](_0x5e7f96,null,0x2):String(_0x5e7f96)),{'ok':!![]};}const _0x53f6c4=_0x53a710[_0x26d380];if(_0x53f6c4===undefined)throw CliErrors[_0x25f8be(0x1f6)]('Key\x20not\x20found:\x20'+_0x26d380);return console[_0x25f8be(0x205)](typeof _0x53f6c4===_0x25f8be(0x213)?JSON[_0x25f8be(0x1f7)](_0x53f6c4,null,0x2):String(_0x53f6c4)),{'ok':!![]};}},setDef={'service':'config','command':a22_0x34a5c2(0x203),'description':a22_0x34a5c2(0x221),'risk':a22_0x34a5c2(0x1fa),'confirmationDescription':'修改\x20Lovrabet\x20CLI\x20配置;该变更可能影响后续命令使用的应用、环境或输出行为。','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x34a5c2(0x1ea),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a22_0x34a5c2(0x1f9),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x2677da){const _0x5162a9=a22_0x34a5c2,_0x3b80c9=_0x2677da[_0x5162a9(0x21f)][0x0],_0x49f937=_0x2677da[_0x5162a9(0x21f)][0x1];if(!_0x3b80c9||_0x49f937===undefined)throw CliErrors[_0x5162a9(0x1f6)](_0x5162a9(0x21c),_0x5162a9(0x1f4)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x3b80c9]&&!ENUM_KEYS[_0x3b80c9]['includes'](_0x49f937))throw CliErrors['validation'](_0x5162a9(0x222)+_0x3b80c9+_0x5162a9(0x1ed)+ENUM_KEYS[_0x3b80c9]['join'](',\x20'));if(_0x3b80c9===_0x5162a9(0x21d))throw CliErrors[_0x5162a9(0x1f6)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x3b80c9===_0x5162a9(0x1ee)){const _0x1f2d52=Number(_0x49f937);if(isNaN(_0x1f2d52)||_0x1f2d52<=0x0)throw CliErrors[_0x5162a9(0x1f6)](_0x5162a9(0x227));}const _0x4a9e6d=resolveWriteScope({'explicitGlobal':_0x2677da['bool'](_0x5162a9(0x21e)),'policy':_0x5162a9(0x225)}),_0x476dd5=toScopeFlags(_0x4a9e6d),_0x307089=readScopedConfig(_0x476dd5),_0x34fd27=parseAliasAppcodeSetKey(_0x3b80c9);if(!_0x34fd27&&!isTopLevelConfigKey(_0x3b80c9))throw CliErrors[_0x5162a9(0x1f6)]('Top-level\x20key\x20\x22'+_0x3b80c9+'\x22\x20is\x20not\x20settable.',_0x5162a9(0x214)+getTopLevelConfigKeySummary()+_0x5162a9(0x228));return _0x34fd27?setLocalAppAlias(_0x307089,_0x34fd27,_0x49f937):_0x307089[_0x3b80c9]=_0x3b80c9===_0x5162a9(0x1ee)?Number(_0x49f937):_0x49f937,console[_0x5162a9(0x205)](_0x5162a9(0x1ff)+_0x3b80c9+_0x5162a9(0x202)+_0x49f937+'\x22'+(_0x4a9e6d===_0x5162a9(0x21e)?_0x5162a9(0x20e):'')),writeScopedConfig(_0x307089,_0x476dd5),{'ok':!![]};}},deleteDef={'service':'config','command':'delete','description':a22_0x34a5c2(0x20a),'risk':a22_0x34a5c2(0x1fa),'confirmationDescription':a22_0x34a5c2(0x1f3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x34a5c2(0x1ea),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x25d21c){const _0x1062d8=a22_0x34a5c2,_0x359f75=_0x25d21c[_0x1062d8(0x21f)][0x0];if(!_0x359f75)throw CliErrors['validation'](_0x1062d8(0x219),_0x1062d8(0x1f4)+CLI_BIN_NAME+_0x1062d8(0x1f5));const _0x57184d=resolveWriteScope({'explicitGlobal':_0x25d21c[_0x1062d8(0x1ec)](_0x1062d8(0x21e)),'policy':_0x1062d8(0x225)}),_0x344b34=toScopeFlags(_0x57184d),_0x1a3ce4=readScopedConfig(_0x344b34),_0xbb28e5=parseAliasDeleteKey(_0x359f75);if(_0xbb28e5){if(!deleteLocalAppAlias(_0x1a3ce4,_0xbb28e5))throw CliErrors[_0x1062d8(0x1f6)](_0x1062d8(0x21b)+_0x359f75);return console['log'](_0x1062d8(0x209)+_0x359f75+'`'+(_0x57184d==='global'?_0x1062d8(0x20e):'')),writeScopedConfig(_0x1a3ce4,_0x344b34),{'ok':!![]};}if(_0x1a3ce4[_0x359f75]===undefined)throw CliErrors[_0x1062d8(0x1f6)](_0x1062d8(0x1fd)+_0x359f75+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x1a3ce4[_0x359f75],console['log'](_0x1062d8(0x209)+_0x359f75+'`'+(_0x57184d===_0x1062d8(0x21e)?_0x1062d8(0x20e):'')),writeScopedConfig(_0x1a3ce4,_0x344b34),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];function a22_0x1890(){const _0x83d78f=['Key\x20\x22','format','Set\x20`','boolean','4293824NkceqU','`\x20=\x20\x22','set','split','log','1481155mnLkfP','5355287EGygXz','raw','Deleted\x20`','删除配置项的值','../../context.js','4gjNwVk','36GNHtbC','\x20(global)','isArray','753022aWutFk','keys','alias','object','Settable\x20keys:\x20','List\x20current\x20config','trim','read','field','Missing\x20key\x20argument.','\x20config\x20get\x20<key>','Key\x20not\x20found:\x20','Missing\x20key\x20or\x20value.','riskLevel','global','args','Config\x20files:\x0a','设置配置项的值','Invalid\x20value\x20for\x20\x22','appcode','includes','project-or-global-explicit','config','pageSize\x20must\x20be\x20a\x20positive\x20number',';\x20apps.<alias>.appcode','get','2564016EZXXBX','key','6852632vyVkXK','bool','\x22.\x20Allowed:\x20','pageSize','apps','6297550OoZfiC','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','Write\x20to\x20global\x20config','删除\x20Lovrabet\x20CLI\x20配置项;后续命令将改用其他配置层或默认值。','Usage:\x20','\x20config\x20delete\x20<key>\x20[--global]','validation','stringify','54oYTyma','Value\x20to\x20assign','write','length','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'];a22_0x1890=function(){return _0x83d78f;};return a22_0x1890();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x145a14,_0x5b95d5){var _0x11ca50=a23_0x378c,_0x5257e0=_0x145a14();while(!![]){try{var _0x80b9ea=parseInt(_0x11ca50(0x13b))/0x1+-parseInt(_0x11ca50(0x143))/0x2+-parseInt(_0x11ca50(0x141))/0x3*(parseInt(_0x11ca50(0x139))/0x4)+-parseInt(_0x11ca50(0x13c))/0x5*(parseInt(_0x11ca50(0x13f))/0x6)+parseInt(_0x11ca50(0x138))/0x7*(parseInt(_0x11ca50(0x13a))/0x8)+parseInt(_0x11ca50(0x13e))/0x9*(parseInt(_0x11ca50(0x142))/0xa)+parseInt(_0x11ca50(0x13d))/0xb*(parseInt(_0x11ca50(0x140))/0xc);if(_0x80b9ea===_0x5b95d5)break;else _0x5257e0['push'](_0x5257e0['shift']());}catch(_0x454432){_0x5257e0['push'](_0x5257e0['shift']());}}}(a23_0xc7d7,0x20778));function a23_0xc7d7(){var _0x8b232a=['101670LaZrTW','1020QrQgje','12999HlibLC','18740axrxem','53076mstqXK','152509lDJiJM','56ldMqZt','24lfoCml','44345QyhbjJ','75JYVTgB','41855tKtvfT','198FTpoDl'];a23_0xc7d7=function(){return _0x8b232a;};return a23_0xc7d7();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a23_0x378c(_0x2345b6,_0x12dcdd){_0x2345b6=_0x2345b6-0x138;var _0xc7d7cb=a23_0xc7d7();var _0x378c14=_0xc7d7cb[_0x2345b6];return _0x378c14;}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
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
|
+
function a24_0x201c(_0xbb9ca9,_0x1094f0){_0xbb9ca9=_0xbb9ca9-0x73;const _0x5c3b58=a24_0x5c3b();let _0x201cfa=_0x5c3b58[_0xbb9ca9];return _0x201cfa;}const a24_0x5c2440=a24_0x201c;(function(_0x1cd774,_0x2ecb0c){const _0x104724=a24_0x201c,_0x3ab4e7=_0x1cd774();while(!![]){try{const _0x2cad7c=-parseInt(_0x104724(0x90))/0x1+parseInt(_0x104724(0x73))/0x2+parseInt(_0x104724(0xce))/0x3+-parseInt(_0x104724(0xc9))/0x4+parseInt(_0x104724(0xbf))/0x5+parseInt(_0x104724(0xa2))/0x6+-parseInt(_0x104724(0xa4))/0x7;if(_0x2cad7c===_0x2ecb0c)break;else _0x3ab4e7['push'](_0x3ab4e7['shift']());}catch(_0x23f4cf){_0x3ab4e7['push'](_0x3ab4e7['shift']());}}}(a24_0x5c3b,0xc127d));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';function a24_0x5c3b(){const _0x531eaf=['\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]','dryRun','length','now','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\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','在数据集中创建一条记录','filter','\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}}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\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\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}','batchCreate','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20$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}}]}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','join','\x20on\x20dataset\x20','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','str','\x20\x20PARAMS\x20STRUCTURE','\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}','4355645mtNmht','description','\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','update','\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\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20WHERE\x20OPERATORS','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','data\x20','4976844WZlsFr','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\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}}','params','body','2076633fGZUxX','修改当前应用数据集中的已有业务记录;确认后新值将立即保存。','删除数据记录(非交互模式需传入\x20--yes)','\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}','787230diIJNt','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\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\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}','paramsRequired','\x20completed\x20in\x20','code','向当前应用的数据集批量写入多条新业务记录;确认后将立即保存。','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','helpExtra','write','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','create','\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\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\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]}}','data','operation','getOne','confirmationDescription','\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.','790849vzKvoH','aggregate','\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','read','删除当前应用数据集中的业务记录;该操作可能无法恢复。','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','更新已有数据记录','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$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20AGGREGATE\x20TYPES','paramsHint','command','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','/api/{appCode}/','\x20\x20EXAMPLES','POST','向当前应用的数据集写入一条新业务记录;确认后将立即保存。','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','7533630wpFnsz','Get\x20a\x20single\x20record\x20by\x20ID','2704345pGpdTy','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'];a24_0x5c3b=function(){return _0x531eaf;};return a24_0x5c3b();}import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0x5c2440(0xad),'operation':'filter','risk':a24_0x5c2440(0x93),'paramsRequired':![],'description':a24_0x5c2440(0x74),'paramsHint':a24_0x5c2440(0x81)+a24_0x5c2440(0xb8),'helpExtra':[a24_0x5c2440(0xc6),a24_0x5c2440(0x7a),a24_0x5c2440(0xae),'\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_0x5c2440(0xb5),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}',a24_0x5c2440(0x98),a24_0x5c2440(0x8a),a24_0x5c2440(0xcb),a24_0x5c2440(0x78),a24_0x5c2440(0xb6),'',a24_0x5c2440(0x75),a24_0x5c2440(0xc3),a24_0x5c2440(0xb7),'',a24_0x5c2440(0x9c),a24_0x5c2440(0xc5),'\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]',a24_0x5c2440(0x85),a24_0x5c2440(0x79),a24_0x5c2440(0xaa),'','\x20\x20PAGINATION',a24_0x5c2440(0x77),a24_0x5c2440(0x8f),a24_0x5c2440(0x88),a24_0x5c2440(0xc4),a24_0x5c2440(0xc1),a24_0x5c2440(0x92),a24_0x5c2440(0xca)][a24_0x5c2440(0xb9)]('\x0a')},{'command':a24_0x5c2440(0x8d),'operation':a24_0x5c2440(0x8d),'risk':'read','paramsRequired':!![],'description':a24_0x5c2440(0xa3),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x5c2440(0x86),'operation':a24_0x5c2440(0x86),'risk':a24_0x5c2440(0x83),'paramsRequired':!![],'description':a24_0x5c2440(0xac),'confirmationDescription':a24_0x5c2440(0xa0),'paramsHint':a24_0x5c2440(0xaf)},{'command':a24_0x5c2440(0xb2),'operation':a24_0x5c2440(0xb2),'risk':a24_0x5c2440(0x83),'paramsRequired':!![],'description':'通过一次请求在数据集中批量创建多条记录','confirmationDescription':a24_0x5c2440(0x7f),'paramsHint':a24_0x5c2440(0x95)},{'command':a24_0x5c2440(0xc2),'operation':a24_0x5c2440(0xc2),'risk':a24_0x5c2440(0x83),'paramsRequired':!![],'description':a24_0x5c2440(0x96),'confirmationDescription':a24_0x5c2440(0xcf),'paramsHint':a24_0x5c2440(0x89)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':'delete','operation':'delete','risk':'high-risk-write','paramsRequired':!![],'description':a24_0x5c2440(0xd0),'confirmationDescription':a24_0x5c2440(0x94),'paramsHint':a24_0x5c2440(0xa5)},{'command':a24_0x5c2440(0x91),'operation':'aggregate','risk':a24_0x5c2440(0x93),'paramsRequired':![],'description':a24_0x5c2440(0xb4),'paramsHint':a24_0x5c2440(0xc7)+a24_0x5c2440(0x97),'helpExtra':[a24_0x5c2440(0x99),a24_0x5c2440(0xb0),a24_0x5c2440(0x7b),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}',a24_0x5c2440(0xbe),a24_0x5c2440(0xb1),a24_0x5c2440(0xd1),'',a24_0x5c2440(0xbd),a24_0x5c2440(0xa6),a24_0x5c2440(0x76),a24_0x5c2440(0xb3),a24_0x5c2440(0xbb),'\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_0x5c2440(0x87),'',a24_0x5c2440(0x9e),a24_0x5c2440(0x84),'\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_0x5c2440(0xa1),a24_0x5c2440(0xab),'',a24_0x5c2440(0x80)][a24_0x5c2440(0xb9)]('\x0a')}];function makeDataCommand(_0x25fb99){const _0x28ee50=a24_0x5c2440,_0x220315='data\x20'+_0x25fb99[_0x28ee50(0x9b)],_0x4cd93a={'service':_0x28ee50(0x8b),'command':_0x25fb99[_0x28ee50(0x9b)],'description':_0x25fb99[_0x28ee50(0xc0)],'risk':_0x25fb99['risk'],..._0x25fb99[_0x28ee50(0x8e)]?{'confirmationDescription':_0x25fb99['confirmationDescription']}:{},'helpExtra':_0x25fb99[_0x28ee50(0x82)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x25fb99[_0x28ee50(0x9a)]}],'validate':async _0x2b8390=>{const _0x156df8=_0x28ee50;_0x25fb99[_0x156df8(0x7c)]&&requireAnyOf(_0x2b8390,[_0x156df8(0xcc)],_0x220315),_0x25fb99['operation']===_0x156df8(0xb2)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2b8390[_0x156df8(0xbc)]('params'))),_0x25fb99[_0x156df8(0x8c)]===_0x156df8(0xc2)&&parseUpdateIdsFromParams(parseJsonParams(_0x2b8390[_0x156df8(0xbc)](_0x156df8(0xcc)))??{});},async 'execute'(_0x1673af){const _0x17a6a6=_0x28ee50,_0x3bbb6f=_0x1673af[_0x17a6a6(0xbc)](_0x17a6a6(0x7e)),_0x1e158b=_0x25fb99['operation']===_0x17a6a6(0xb2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1673af['str'](_0x17a6a6(0xcc)))):parseJsonParams(_0x1673af[_0x17a6a6(0xbc)](_0x17a6a6(0xcc)))??{},_0x151423=_0x25fb99[_0x17a6a6(0x8c)]===_0x17a6a6(0xc2)?parseUpdateIdsFromParams(_0x1e158b):undefined,_0x264ca6=_0x151423?normalizeUpdateParamsForRuntime(_0x1e158b,_0x151423):_0x1e158b,_0x1ada0d=Date[_0x17a6a6(0xa9)](),_0x3e65a4=await executeData(_0x3bbb6f,_0x25fb99[_0x17a6a6(0x8c)],_0x264ca6),_0x2acc63=Date[_0x17a6a6(0xa9)]()-_0x1ada0d,_0x5c82ff=_0x151423&&_0x151423['length']>0x1?buildBatchUpdateResult(_0x151423,_0x3e65a4):_0x3e65a4;return{'ok':!![],'data':{'result':_0x5c82ff,'elapsed':_0x2acc63},'message':_0x17a6a6(0xc8)+_0x25fb99[_0x17a6a6(0x9b)]+_0x17a6a6(0x7d)+_0x2acc63+'ms'};}};return _0x25fb99['risk']!==_0x28ee50(0x93)&&(_0x4cd93a[_0x28ee50(0xa7)]=async _0x2dadef=>{const _0x481502=_0x28ee50,_0xe8e033=_0x2dadef[_0x481502(0xbc)]('code'),_0x1aa2c2=_0x25fb99[_0x481502(0x8c)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2dadef[_0x481502(0xbc)](_0x481502(0xcc)))):parseJsonParams(_0x2dadef[_0x481502(0xbc)](_0x481502(0xcc)))??{};let _0x445b74=_0x1aa2c2;if(_0x25fb99[_0x481502(0x8c)]===_0x481502(0xc2)){const _0x41fdc6=parseUpdateIdsFromParams(_0x1aa2c2);_0x445b74=normalizeUpdateParamsForRuntime(_0x1aa2c2,_0x41fdc6);}return dryRun(_0x481502(0x9f),_0x481502(0x9d)+_0xe8e033+'/'+_0x25fb99[_0x481502(0x8c)])[_0x481502(0xcd)](_0x445b74)[_0x481502(0xc0)]('Preview:\x20data\x20'+_0x25fb99['command']+_0x481502(0xba)+_0xe8e033)['build']();}),_0x4cd93a;}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0x502eb9,_0xb2704f){const _0xf7a6fd=a24_0x5c2440;return{'operation':_0xf7a6fd(0xc2),'mode':'batch','ids':_0x502eb9,'total':_0x502eb9[_0xf7a6fd(0xa8)],'result':_0xb2704f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x1baeb8=a25_0xc1ce;(function(_0x3c7612,_0x1f1e98){const _0x8540c=a25_0xc1ce,_0x4dd9eb=_0x3c7612();while(!![]){try{const _0x55059b=parseInt(_0x8540c(0x1e5))/0x1+parseInt(_0x8540c(0x1da))/0x2+parseInt(_0x8540c(0x1de))/0x3+parseInt(_0x8540c(0x1db))/0x4+-parseInt(_0x8540c(0x1d0))/0x5*(-parseInt(_0x8540c(0x1cb))/0x6)+-parseInt(_0x8540c(0x1c5))/0x7*(parseInt(_0x8540c(0x1c3))/0x8)+-parseInt(_0x8540c(0x1b1))/0x9;if(_0x55059b===_0x1f1e98)break;else _0x4dd9eb['push'](_0x4dd9eb['shift']());}catch(_0x4a4e5c){_0x4dd9eb['push'](_0x4dd9eb['shift']());}}}(a25_0x5468,0xf3459));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a25_0xc1ce(_0x435af0,_0x2ea7b4){_0x435af0=_0x435af0-0x19f;const _0x5468c3=a25_0x5468();let _0xc1ce5e=_0x5468c3[_0x435af0];return _0xc1ce5e;}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x54148a){const _0x3f31b1=a25_0xc1ce;if(_0x54148a[_0x3f31b1(0x1b2)])return null;const _0xf872c7=Boolean(_0x54148a[_0x3f31b1(0x1d7)]!==undefined||_0x54148a[_0x3f31b1(0x19f)]!==undefined);let _0x63302e={};if(!_0xf872c7&&typeof _0x54148a['extend']==='string')try{_0x63302e=JSON[_0x3f31b1(0x1b4)](_0x54148a['extend']);}catch{}const _0x881d5a=_0xf872c7?_0x54148a[_0x3f31b1(0x1ad)]:_0x54148a[_0x3f31b1(0x1e0)],_0x40807c=_0xf872c7?_0x54148a[_0x3f31b1(0x1d7)]:_0x54148a[_0x3f31b1(0x1ad)],_0x3b3687=_0xf872c7?_0x54148a['doType']:_0x54148a[_0x3f31b1(0x1c0)]||_0x54148a['dataType'],_0x376158=_0xf872c7?_0x54148a['pkField']===!![]:_0x63302e[_0x3f31b1(0x1c6)]===!![],_0x13c4b3=_0xf872c7?_0x54148a['required']===!![]:_0x63302e[_0x3f31b1(0x1d9)]===!![],_0x5c33f6=_0xf872c7?_0x54148a[_0x3f31b1(0x1e4)]??null:_0x63302e[_0x3f31b1(0x1e4)]??null,_0x55b566={'name':_0x881d5a,'displayName':_0x40807c||_0x881d5a,'type':_0x3b3687,'dbType':_0x54148a[_0x3f31b1(0x1ea)],'pk':_0x376158,'required':_0x13c4b3,'description':_0x54148a['description']||undefined};return Array[_0x3f31b1(0x1c8)](_0x5c33f6)&&_0x5c33f6['length']>0x0&&(_0x55b566[_0x3f31b1(0x1e4)]=_0x5c33f6),_0x55b566;}function parseJsonMaybe(_0x1d4255){const _0x7993f0=a25_0xc1ce;if(typeof _0x1d4255!==_0x7993f0(0x1e2))return _0x1d4255;try{return JSON[_0x7993f0(0x1b4)](_0x1d4255);}catch{return _0x1d4255;}}function a25_0x5468(){const _0x5cbe22=['push','split','formatRules','modifierIdField','dbName','type','fields','extend','7928DIcAOK','responseBody','1267rQpGCB','pkField','responseFields','isArray','allFieldNames','appCode','354rIYeum','filter','validateRules','labelField','properties','29825zqLnfi','map','modifierNameField','logicField','trim','str','dbtableConfig','displayName','sourceType','required','55594KQXoxc','1200300aFHZFF','requestFields','path','5524800JlZBaA','beforeScriptId','code','length','string','afterScriptId','options','503780OAOMZc','datasetKey','modelCode','source','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','dbType','dataset','doType','object','relatedPageInfoList','createTimeField','operations','detail','read','dbId','dblinkInfoDTO','requestBody','modelId','tableName','doVersion','creatorNameField','name','host','indexes','columnCodeListWithDeleted','16644375sjCtEq','deleted','allFields','parse','relations','title','description','method','entries','updateTimeField'];a25_0x5468=function(){return _0x5cbe22;};return a25_0x5468();}function normalizeOperationEntry(_0x18b8b7,_0x4a10e9){const _0x3ae98c=a25_0xc1ce;if(!_0x4a10e9||typeof _0x4a10e9!==_0x3ae98c(0x1a0))return null;if(!_0x4a10e9[_0x3ae98c(0x1b8)]||!_0x4a10e9[_0x3ae98c(0x1dd)])return null;const _0x2ac47e={'name':_0x18b8b7,'method':_0x4a10e9[_0x3ae98c(0x1b8)],'path':_0x4a10e9[_0x3ae98c(0x1dd)]};if(_0x4a10e9[_0x3ae98c(0x1ae)])_0x2ac47e[_0x3ae98c(0x1ae)]=_0x4a10e9['host'];if(_0x4a10e9[_0x3ae98c(0x1a8)]!=null)_0x2ac47e['requestBody']=parseJsonMaybe(_0x4a10e9[_0x3ae98c(0x1a8)]);if(_0x4a10e9[_0x3ae98c(0x1c4)]!=null)_0x2ac47e['responseBody']=parseJsonMaybe(_0x4a10e9[_0x3ae98c(0x1c4)]);if(_0x4a10e9['beforeScriptId']!=null)_0x2ac47e[_0x3ae98c(0x1df)]=_0x4a10e9[_0x3ae98c(0x1df)];if(_0x4a10e9[_0x3ae98c(0x1e3)]!=null)_0x2ac47e[_0x3ae98c(0x1e3)]=_0x4a10e9[_0x3ae98c(0x1e3)];if(Array[_0x3ae98c(0x1c8)](_0x4a10e9[_0x3ae98c(0x1dc)]))_0x2ac47e[_0x3ae98c(0x1dc)]=_0x4a10e9[_0x3ae98c(0x1dc)];if(Array[_0x3ae98c(0x1c8)](_0x4a10e9['responseFields']))_0x2ac47e[_0x3ae98c(0x1c7)]=_0x4a10e9[_0x3ae98c(0x1c7)];return _0x2ac47e;}function summarizeDbtable(_0x2fad50){const _0x164d2f=a25_0xc1ce,_0x2a26f9={},_0x42e57d=[_0x164d2f(0x1a6),_0x164d2f(0x1bf),_0x164d2f(0x1aa),_0x164d2f(0x1e6),_0x164d2f(0x1c6),_0x164d2f(0x1b3),_0x164d2f(0x1d3),_0x164d2f(0x1a2),_0x164d2f(0x1ba),'creatorIdField',_0x164d2f(0x1ac),_0x164d2f(0x1be),_0x164d2f(0x1d2),_0x164d2f(0x1ce),_0x164d2f(0x1a7)];for(const _0x438d42 of _0x42e57d){if(_0x2fad50[_0x438d42]!==undefined)_0x2a26f9[_0x438d42]=_0x2fad50[_0x438d42];}return typeof _0x2a26f9[_0x164d2f(0x1b3)]===_0x164d2f(0x1e2)&&_0x2a26f9[_0x164d2f(0x1b3)][_0x164d2f(0x1e1)]>0x0&&(_0x2a26f9[_0x164d2f(0x1c9)]=_0x2a26f9[_0x164d2f(0x1b3)][_0x164d2f(0x1bc)](',')[_0x164d2f(0x1d1)](_0x4bb30f=>_0x4bb30f[_0x164d2f(0x1d4)]())[_0x164d2f(0x1cc)](Boolean)),_0x2a26f9;}function normalizeRelatedPages(_0x5917b8){const _0x14d1fe=a25_0xc1ce;if(!Array['isArray'](_0x5917b8))return[];return _0x5917b8[_0x14d1fe(0x1cc)](_0xb7d0a8=>_0xb7d0a8&&typeof _0xb7d0a8===_0x14d1fe(0x1a0))[_0x14d1fe(0x1d1)](_0x15f69f=>({'id':_0x15f69f['id'],'type':_0x15f69f['type'],'code':_0x15f69f[_0x14d1fe(0x1e0)],'title':_0x15f69f[_0x14d1fe(0x1b6)],'deleted':_0x15f69f[_0x14d1fe(0x1b2)]===!![]}));}function normalizeFallbackFieldName(_0x10f442,_0x3ac678){const _0x2e8c87=a25_0xc1ce,_0x2a7682=_0x10f442[_0x2e8c87(0x1d4)]();if(!_0x2a7682)return null;return{'name':_0x2a7682,'displayName':_0x2a7682,'type':undefined,'dbType':undefined,'pk':_0x2a7682===_0x3ac678,'required':![],'description':undefined};}async function loadListFieldFallback(_0x13ab9f,_0xfe9a70){const _0x27720f=a25_0xc1ce;if(!_0x13ab9f||!_0xfe9a70)return[];try{const _0x22e417=await listDatasets(_0x13ab9f,{'code':_0xfe9a70}),_0x346c45=_0x22e417['find'](_0x218442=>_0x218442[_0x27720f(0x1e0)]===_0xfe9a70)??_0x22e417[0x0],_0x8d14b3=_0x346c45?.[_0x27720f(0x1d6)]??{},_0x211aea=typeof _0x8d14b3['allFields']==='string'?_0x8d14b3[_0x27720f(0x1b3)][_0x27720f(0x1bc)](','):[];return _0x211aea['map'](_0x2bfac0=>normalizeFallbackFieldName(_0x2bfac0,_0x8d14b3[_0x27720f(0x1c6)]))[_0x27720f(0x1cc)](_0x25db30=>_0x25db30!==null);}catch{return[];}}export const datasetDetail={'service':a25_0x1baeb8(0x1eb),'command':a25_0x1baeb8(0x1a4),'description':a25_0x1baeb8(0x1e9),'risk':a25_0x1baeb8(0x1a5),'flags':[CODE_FLAG],async 'execute'(_0x1e5155){const _0x59bdcd=a25_0x1baeb8,_0x18b85e=await getDatasetDetail(_0x1e5155['str'](_0x59bdcd(0x1e0))),_0x4f8382=Array[_0x59bdcd(0x1c8)](_0x18b85e[_0x59bdcd(0x1c1)])?_0x18b85e[_0x59bdcd(0x1c1)]:Array[_0x59bdcd(0x1c8)](_0x18b85e[_0x59bdcd(0x1cf)])?_0x18b85e['properties']:[];let _0x2edc08=_0x4f8382[_0x59bdcd(0x1d1)](_0x41fcab=>normalizeField(_0x41fcab))[_0x59bdcd(0x1cc)](_0x12ca3b=>_0x12ca3b!==null);_0x2edc08['length']===0x0&&(_0x2edc08=await loadListFieldFallback(_0x1e5155[_0x59bdcd(0x1ca)],_0x1e5155[_0x59bdcd(0x1d5)](_0x59bdcd(0x1e0))));const _0x3bc146=_0x18b85e[_0x59bdcd(0x1a3)]??{},_0x132258=[];for(const [_0x433a02,_0x220971]of Object[_0x59bdcd(0x1b9)](_0x3bc146)){const _0x178e41=normalizeOperationEntry(_0x433a02,_0x220971);if(_0x178e41)_0x132258[_0x59bdcd(0x1bb)](_0x178e41);}const _0x58f50b=_0x18b85e['dbtableConfig']??{},_0x4013d3=_0x18b85e[_0x59bdcd(0x1eb)]??{},_0x32c678=_0x58f50b[_0x59bdcd(0x1a6)]!=null?{'id':_0x58f50b[_0x59bdcd(0x1a6)],'name':_0x58f50b['dbName']??null}:undefined;let _0x21fb04;return typeof _0x18b85e[_0x59bdcd(0x1c2)]===_0x59bdcd(0x1e2)&&(_0x21fb04=parseJsonMaybe(_0x18b85e[_0x59bdcd(0x1c2)])),{'ok':!![],'data':{'id':_0x18b85e[_0x59bdcd(0x1a9)]??_0x18b85e['id'],'name':_0x18b85e[_0x59bdcd(0x1ad)],'code':_0x18b85e[_0x59bdcd(0x1e7)]||_0x18b85e[_0x59bdcd(0x1e0)],'doVersion':_0x18b85e[_0x59bdcd(0x1ab)],'description':_0x18b85e[_0x59bdcd(0x1b7)]||_0x4013d3['tableComment']||undefined,'source':_0x18b85e[_0x59bdcd(0x1e8)]||_0x4013d3[_0x59bdcd(0x1d8)],'table':_0x58f50b[_0x59bdcd(0x1aa)]||_0x4013d3[_0x59bdcd(0x1aa)],'datasetKey':_0x58f50b[_0x59bdcd(0x1e6)],'pk':_0x58f50b['pkField'],'db':_0x32c678,'dbtable':summarizeDbtable(_0x58f50b),'fields':_0x2edc08,'operations':_0x132258,'indexes':Array[_0x59bdcd(0x1c8)](_0x4013d3[_0x59bdcd(0x1af)])?_0x4013d3['indexes']:[],'relations':_0x18b85e[_0x59bdcd(0x1b5)]??null,'relatedPages':normalizeRelatedPages(_0x18b85e[_0x59bdcd(0x1a1)]),...Array[_0x59bdcd(0x1c8)](_0x18b85e[_0x59bdcd(0x1b0)])?{'columnCodeListWithDeleted':_0x18b85e[_0x59bdcd(0x1b0)]}:{},'formatRules':Array[_0x59bdcd(0x1c8)](_0x18b85e[_0x59bdcd(0x1bd)])?_0x18b85e[_0x59bdcd(0x1bd)]:[],'validateRules':Array[_0x59bdcd(0x1c8)](_0x18b85e[_0x59bdcd(0x1cd)])?_0x18b85e[_0x59bdcd(0x1cd)]:[],..._0x21fb04!==undefined?{'extend':_0x21fb04}:{},'stats':{'fieldCount':_0x2edc08[_0x59bdcd(0x1e1)],'operationCount':_0x132258[_0x59bdcd(0x1e1)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf56202,_0x4b4ac9){const _0x1027eb=a26_0x2063,_0x33ac0d=_0xf56202();while(!![]){try{const _0x3b563a=-parseInt(_0x1027eb(0x71))/0x1*(parseInt(_0x1027eb(0x6e))/0x2)+parseInt(_0x1027eb(0x70))/0x3*(-parseInt(_0x1027eb(0x6d))/0x4)+-parseInt(_0x1027eb(0x6b))/0x5+parseInt(_0x1027eb(0x6f))/0x6+parseInt(_0x1027eb(0x74))/0x7*(parseInt(_0x1027eb(0x72))/0x8)+parseInt(_0x1027eb(0x73))/0x9+parseInt(_0x1027eb(0x6c))/0xa*(parseInt(_0x1027eb(0x75))/0xb);if(_0x3b563a===_0x4b4ac9)break;else _0x33ac0d['push'](_0x33ac0d['shift']());}catch(_0x51f292){_0x33ac0d['push'](_0x33ac0d['shift']());}}}(a26_0x2e48,0x1c630));function a26_0x2063(_0x1e30ec,_0x10080c){_0x1e30ec=_0x1e30ec-0x6b;const _0x2e4881=a26_0x2e48();let _0x206350=_0x2e4881[_0x1e30ec];return _0x206350;}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';function a26_0x2e48(){const _0x2b8bb0=['2660MkGGBi','98060qgBOlm','351972LgtvTQ','664224wfpYwG','21eapjIj','1NkZCdL','5064WPQnHU','623403hBJVLn','763gmdDqG','17941IWtQOK','1094755yBUMUL'];a26_0x2e48=function(){return _0x2b8bb0;};return a26_0x2e48();}export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a27_0x2b13(_0xb4b5cb,_0x11e945){_0xb4b5cb=_0xb4b5cb-0x1ac;const _0x2c4e6f=a27_0x2c4e();let _0x2b1384=_0x2c4e6f[_0xb4b5cb];return _0x2b1384;}const a27_0x390ab7=a27_0x2b13;(function(_0xa90a99,_0x40ee9e){const _0x312673=a27_0x2b13,_0x30f134=_0xa90a99();while(!![]){try{const _0x1188dc=-parseInt(_0x312673(0x1bc))/0x1+-parseInt(_0x312673(0x1ad))/0x2*(-parseInt(_0x312673(0x1bb))/0x3)+-parseInt(_0x312673(0x1bf))/0x4*(parseInt(_0x312673(0x1b3))/0x5)+parseInt(_0x312673(0x1c3))/0x6+parseInt(_0x312673(0x1ac))/0x7+parseInt(_0x312673(0x1c6))/0x8+-parseInt(_0x312673(0x1c1))/0x9*(parseInt(_0x312673(0x1be))/0xa);if(_0x1188dc===_0x40ee9e)break;else _0x30f134['push'](_0x30f134['shift']());}catch(_0x58d54b){_0x30f134['push'](_0x30f134['shift']());}}}(a27_0x2c4e,0xa6541));function a27_0x2c4e(){const _0xc84b80=['130uxoucH','5016112bTQzJX','code','782604worDOI','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','1331280FVKUuN','dataset','source','8265504wttNWJ','string','6449541fytURK','8bCIOZR','map','name','pkField','str','list','5WFKeAS','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','allFields','tableName','read','datasetKey','appCode','824685gGzufA','210274rJVpSO','length'];a27_0x2c4e=function(){return _0xc84b80;};return a27_0x2c4e();}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a27_0x390ab7(0x1c4),'command':a27_0x390ab7(0x1b2),'description':a27_0x390ab7(0x1b4),'risk':a27_0x390ab7(0x1b8),'flags':[{'name':a27_0x390ab7(0x1af),'type':a27_0x390ab7(0x1c7),'description':a27_0x390ab7(0x1b5)},{...CODE_FLAG,'required':![],'description':a27_0x390ab7(0x1c2)}],async 'execute'(_0x30d21f){const _0x3e3996=a27_0x390ab7,_0x360f1d=_0x30d21f['str'](_0x3e3996(0x1af)),_0x459a3b=_0x30d21f[_0x3e3996(0x1b1)](_0x3e3996(0x1c0)),_0x39726f=await listDatasets(_0x30d21f[_0x3e3996(0x1ba)],{..._0x360f1d&&{'name':_0x360f1d},..._0x459a3b&&{'code':_0x459a3b}});return{'ok':!![],'data':{'total':_0x39726f[_0x3e3996(0x1bd)],'datasets':_0x39726f[_0x3e3996(0x1ae)](_0x11a0cb=>{const _0x3bdc22=_0x3e3996,_0x65d8d1=_0x11a0cb['dbtableConfig']??{};return{'id':_0x11a0cb['id'],'code':_0x11a0cb['code'],'name':_0x11a0cb[_0x3bdc22(0x1af)],'source':_0x11a0cb[_0x3bdc22(0x1c5)],'description':_0x11a0cb['description'],'table':_0x65d8d1[_0x3bdc22(0x1b7)],'datasetKey':_0x65d8d1[_0x3bdc22(0x1b9)],'pk':_0x65d8d1[_0x3bdc22(0x1b0)],'fields':_0x65d8d1[_0x3bdc22(0x1b6)]?_0x65d8d1['allFields']['split'](',')[_0x3bdc22(0x1ae)](_0x37617f=>_0x37617f['trim']()):[]};})}};}};
|