@lovrabet/lovrabet-cli 2.1.22-beta.3 → 2.1.22-beta.5
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_0x3fa7ed=a12_0x11e1;(function(_0x231149,_0x177edc){const _0x2802c5=a12_0x11e1,_0x4761bb=_0x231149();while(!![]){try{const _0x11f5ae=parseInt(_0x2802c5(0x18b))/0x1*(-parseInt(_0x2802c5(0x1ca))/0x2)+parseInt(_0x2802c5(0x1a3))/0x3*(-parseInt(_0x2802c5(0x1cc))/0x4)+parseInt(_0x2802c5(0x1be))/0x5+-parseInt(_0x2802c5(0x1a9))/0x6+-parseInt(_0x2802c5(0x18e))/0x7*(parseInt(_0x2802c5(0x1c7))/0x8)+parseInt(_0x2802c5(0x177))/0x9*(-parseInt(_0x2802c5(0x187))/0xa)+parseInt(_0x2802c5(0x1bb))/0xb;if(_0x11f5ae===_0x177edc)break;else _0x4761bb['push'](_0x4761bb['shift']());}catch(_0x1c883e){_0x4761bb['push'](_0x4761bb['shift']());}}}(a12_0x46d4,0x8f956));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';function a12_0x46d4(){const _0x47e0ca=['Missing\x20accessKey.','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20scope.','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Invalid\x20accessKey\x20format:\x20\x22','slice','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','length','code','project','authRequired','=ak_xxx','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','2080amqGei','trim','AccessKey\x20(ak_xxx...)','\x20config.','8605hESCMX','Auth\x20mode:\x20','Write\x20to\x20global\x20config\x20(default)','168yhDDRi','production','yes','project\x20config','\x20env\x20var','scope','cancelled','development','str','global','Clear\x20accessKey\x20from\x20config','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Option\x20C:\x20environment\x20variable','join','logout','bool','expired','Shorthand\x20for\x20--access-key','isTTY','nonInteractive','string','9CkCxMY','stdout','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Show\x20current\x20authentication\x20status','Tip:\x20you\x20can\x20also\x20run:','Option\x20B:\x20apps\x20config\x20(','6697728KGduiU','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','global\x20config','\x20config.\x20Nothing\x20to\x20clear.','userCenterDisplayName','newConfigFileName','Clear\x20from\x20global\x20config\x20(default)','boolean','ACCESS_KEY','access-key','read','push','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','status','Read\x20from\x20global\x20config\x20(default)','AccessKey\x20cleared\x20from\x20','stdin','repeat','30899473FMSfrv','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','check','3932515pSwpym','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','env','\x20auth\x20status','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Status:\x20valid','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','write','\x20Current\x20env:\x20','57808HftqCp','AccessKey:\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','166WrmOZP','ClientAk','1250364ExOvEy','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','init','accessKey','No\x20AccessKey\x20found\x20in\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','auth','\x20(via\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20Verify:\x20','Auth\x20config\x20reinitialized\x20in\x20','daily','envName','access_key','2844RQsTSS'];a12_0x46d4=function(){return _0x47e0ca;};return a12_0x46d4();}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 _0x517459=a12_0x11e1;writeCliSideChannelLine(_0x517459(0x1b5)+PRODUCT_CONFIG[_0x517459(0x1ad)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x517459(0x1a7)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x517459(0x185));}function a12_0x11e1(_0x3216cf,_0x240b24){_0x3216cf=_0x3216cf-0x172;const _0x46d436=a12_0x46d4();let _0x11e18f=_0x46d436[_0x3216cf];return _0x11e18f;}function buildAccessKeySetupGuide(){const _0x2ec29e=a12_0x11e1;return[_0x2ec29e(0x1b5)+PRODUCT_CONFIG[_0x2ec29e(0x1ad)]+':',USER_ACCESS_KEY_CREATE_URL,_0x2ec29e(0x186)+CLI_BIN_NAME+_0x2ec29e(0x1bf)]['join']('\x0a');}function canPromptForAccessKey(_0x884565){const _0x346805=a12_0x11e1;return!_0x884565[_0x346805(0x1a1)]&&process[_0x346805(0x1b9)]['isTTY']!==![]&&process[_0x346805(0x1a4)][_0x346805(0x1a0)]!==![];}function resolveAuthScopeFlags(_0x49b75d){const _0x246e25=a12_0x11e1;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x49b75d['bool'](_0x246e25(0x197)),'explicitProject':_0x49b75d[_0x246e25(0x19d)](_0x246e25(0x182)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x26d594){const _0x5bcba7=a12_0x11e1;let _0x4bc55c=(_0x26d594[_0x5bcba7(0x196)](_0x5bcba7(0x1b2))||_0x26d594[_0x5bcba7(0x196)]('ak')||'')[_0x5bcba7(0x188)]();const _0x424cd4=(_0x26d594[_0x5bcba7(0x196)](_0x5bcba7(0x1c0))||'')[_0x5bcba7(0x188)]();if(!_0x4bc55c&&canPromptForAccessKey(_0x26d594))try{showAccessKeyCreateHint(),_0x4bc55c=await promptAccessKey('');}catch(_0x5b8dd7){if(isAbortPrompt(_0x5b8dd7))throw CliErrors[_0x5bcba7(0x194)]();throw _0x5b8dd7;}if(!_0x4bc55c)throw CliErrors['validation'](_0x5bcba7(0x178),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x4bc55c))throw CliErrors['validation'](_0x5bcba7(0x17c)+_0x4bc55c+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x424cd4)return{'accessKey':_0x4bc55c};const _0x50bb79=normalizeEnv(_0x424cd4);return{'accessKey':_0x4bc55c,'env':isDaily(_0x50bb79)?_0x5bcba7(0x174):isDev(_0x50bb79)?_0x5bcba7(0x195):'production'};}export const authDefinitions=[{'service':a12_0x3fa7ed(0x1d2),'command':'login','description':a12_0x3fa7ed(0x17f),'risk':a12_0x3fa7ed(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3fa7ed(0x1b2),'type':'string','description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x3fa7ed(0x1a2),'description':a12_0x3fa7ed(0x19f)},{'name':'global','type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x18d),'default':!![]},{'name':a12_0x3fa7ed(0x182),'type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x17e),'default':![]}],async 'execute'(_0x176d18){const _0x138e31=a12_0x3fa7ed;if(_0x176d18[_0x138e31(0x19d)](_0x138e31(0x190)))throw CliErrors['validation'](_0x138e31(0x179),'Use\x20`'+CLI_BIN_NAME+_0x138e31(0x1cd)+CLI_BIN_NAME+_0x138e31(0x1c2));const _0x1a0aa2=(_0x176d18[_0x138e31(0x196)](_0x138e31(0x1b2))||_0x176d18['str']('ak')||'')[_0x138e31(0x188)]();if(!_0x1a0aa2&&_0x176d18[_0x138e31(0x1a1)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0xfa8578=await resolveAuthWriteInput(_0x176d18),_0x429c2b=resolveAuthScopeFlags(_0x176d18),_0x1fc499=readScopedConfig(_0x429c2b);_0x1fc499[_0x138e31(0x1cf)]=_0xfa8578['accessKey'];_0xfa8578['env']&&(_0x1fc499['env']=_0xfa8578['env']);writeScopedConfig(_0x1fc499,_0x429c2b);const _0x5c8af2=_0x429c2b['global']?_0x138e31(0x197):_0x138e31(0x182),_0x1b4b62=_0x1fc499[_0x138e31(0x1c0)]?'\x20Current\x20env:\x20'+_0x1fc499['env']+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x5c8af2+_0x138e31(0x18a)+_0x1b4b62+_0x138e31(0x172)+CLI_BIN_NAME+_0x138e31(0x1c1)};}},{'service':a12_0x3fa7ed(0x1d2),'command':a12_0x3fa7ed(0x1ce),'description':a12_0x3fa7ed(0x17b),'risk':a12_0x3fa7ed(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3fa7ed(0x1b2),'type':'string','description':a12_0x3fa7ed(0x189)},{'name':'ak','type':a12_0x3fa7ed(0x1a2),'description':'Shorthand\x20for\x20--access-key'},{'name':'env','type':'string','description':a12_0x3fa7ed(0x1c9)},{'name':a12_0x3fa7ed(0x197),'type':a12_0x3fa7ed(0x1b0),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a12_0x3fa7ed(0x17e),'default':![]}],async 'execute'(_0x176224){const _0x8dbfb9=a12_0x3fa7ed,_0x13706f=await resolveAuthWriteInput(_0x176224),_0x22aae5=resolveAuthScopeFlags(_0x176224),_0x591442={'accessKey':_0x13706f[_0x8dbfb9(0x1cf)]};_0x13706f[_0x8dbfb9(0x1c0)]&&(_0x591442['env']=_0x13706f[_0x8dbfb9(0x1c0)]);writeScopedConfig(_0x591442,_0x22aae5);const _0x41af08=_0x22aae5[_0x8dbfb9(0x197)]?_0x8dbfb9(0x197):_0x8dbfb9(0x182),_0x5140af=_0x591442[_0x8dbfb9(0x1c0)]?_0x8dbfb9(0x1c6)+_0x591442[_0x8dbfb9(0x1c0)]+'.':'';return{'ok':!![],'message':_0x8dbfb9(0x173)+_0x41af08+_0x8dbfb9(0x17a)+_0x5140af+_0x8dbfb9(0x172)+CLI_BIN_NAME+_0x8dbfb9(0x1c1)};}},{'service':a12_0x3fa7ed(0x1d2),'command':a12_0x3fa7ed(0x19c),'description':a12_0x3fa7ed(0x198),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3fa7ed(0x197),'type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x1af),'default':!![]},{'name':a12_0x3fa7ed(0x182),'type':a12_0x3fa7ed(0x1b0),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x32f031){const _0x4dfd1b=a12_0x3fa7ed,_0x387386=resolveAuthScopeFlags(_0x32f031),_0x2d7a64=readScopedConfig(_0x387386),_0xa2d5fc=!!_0x2d7a64[_0x4dfd1b(0x1cf)];delete _0x2d7a64[_0x4dfd1b(0x1cf)],writeScopedConfig(_0x2d7a64,_0x387386);const _0x5556aa=_0x387386[_0x4dfd1b(0x197)]?_0x4dfd1b(0x197):_0x4dfd1b(0x182);if(_0xa2d5fc)return{'ok':!![],'message':_0x4dfd1b(0x1b8)+_0x5556aa+_0x4dfd1b(0x18a)};return{'ok':!![],'message':_0x4dfd1b(0x1d0)+_0x5556aa+_0x4dfd1b(0x1ac)};}},{'service':a12_0x3fa7ed(0x1d2),'command':a12_0x3fa7ed(0x1b6),'description':a12_0x3fa7ed(0x1a6),'risk':a12_0x3fa7ed(0x1b3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3fa7ed(0x197),'type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x1b7),'default':!![]},{'name':a12_0x3fa7ed(0x182),'type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x1c4),'default':![]},{'name':a12_0x3fa7ed(0x1bd),'type':a12_0x3fa7ed(0x1b0),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x203ef4){const _0x29ea94=a12_0x3fa7ed,_0x1ef2f9=resolveAuthScopeFlags(_0x203ef4),_0x1ba3ba=readScopedConfig(_0x1ef2f9),_0x235c9a=productEnvName(_0x29ea94(0x1b1)),_0x992de9=productEnv('ACCESS_KEY')||undefined,_0x3a1852=_0x1ba3ba[_0x29ea94(0x1cf)]||undefined,_0x3f22c1=_0x992de9||_0x3a1852,_0xea89d6=_0x992de9?_0x235c9a+_0x29ea94(0x192):_0x3a1852?(_0x1ef2f9[_0x29ea94(0x197)]?_0x29ea94(0x197):'project')+'\x20config':null,_0x54fc6=[_0x29ea94(0x18c)+AUTH_MODE[_0x29ea94(0x1cb)]];if(_0x3f22c1){const _0x16e42e=_0x3f22c1[_0x29ea94(0x180)]>0x8?''+_0x3f22c1[_0x29ea94(0x17d)](0x0,0x8)+'*'[_0x29ea94(0x1ba)](_0x3f22c1[_0x29ea94(0x180)]-0x8):_0x3f22c1;_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x1c8)+_0x16e42e+(_0xea89d6?'\x20(via\x20'+_0xea89d6+')':'')),_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x1c3));}if(!_0x3f22c1){_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6['push'](_0x29ea94(0x1d4)),_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6[_0x29ea94(0x1b4)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x29ea94(0x199)),_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6['push'](_0x29ea94(0x1a8)+PRODUCT_CONFIG[_0x29ea94(0x1ae)]+')'),_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x1a5)),_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x19a)),_0x54fc6[_0x29ea94(0x1b4)]('\x20\x20export\x20'+_0x235c9a+_0x29ea94(0x184)),_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x1d1)+CLI_BIN_NAME+'\x20doctor');if(_0x203ef4[_0x29ea94(0x19d)](_0x29ea94(0x1bd))){const _0x1666e2=readStoredDeviceCode();if(_0x1666e2&&!isStoredDeviceCodeExpired(_0x1666e2)){const _0x413b8a=getUserDomain(),_0x33503d=await fetchDeviceToken(_0x413b8a,_0x1666e2[_0x29ea94(0x181)]);if(_0x33503d[_0x29ea94(0x1b6)]==='success'&&_0x33503d[_0x29ea94(0x176)]){const _0x1b2b48={'global':_0x1666e2[_0x29ea94(0x193)]===_0x29ea94(0x197)},_0xda4d34=readScopedConfig(_0x1b2b48);_0xda4d34[_0x29ea94(0x1cf)]=_0x33503d[_0x29ea94(0x176)],writeScopedConfig(_0xda4d34,_0x1b2b48),deleteStoredDeviceCode();const _0x13e117=_0x33503d[_0x29ea94(0x176)],_0x5e1dba=_0x13e117[_0x29ea94(0x180)]>0x8?''+_0x13e117[_0x29ea94(0x17d)](0x0,0x8)+'*'[_0x29ea94(0x1ba)](_0x13e117[_0x29ea94(0x180)]-0x8):_0x13e117,_0xb7b14d=_0x1666e2[_0x29ea94(0x193)]===_0x29ea94(0x197)?_0x29ea94(0x1ab):_0x29ea94(0x191);return{'ok':!![],'message':[_0x29ea94(0x18c)+AUTH_MODE['ClientAk'],_0x29ea94(0x1c8)+_0x5e1dba+_0x29ea94(0x1d3)+_0xb7b14d+')',_0x29ea94(0x1c3)][_0x29ea94(0x19b)]('\x0a')};}_0x33503d['status']===_0x29ea94(0x19e)&&deleteStoredDeviceCode();throw CliErrors[_0x29ea94(0x183)](_0x29ea94(0x1aa));}throw CliErrors[_0x29ea94(0x183)](_0x54fc6['join']('\x0a'));}}return{'ok':!![],'message':_0x54fc6[_0x29ea94(0x19b)]('\x0a')};}},{'service':'auth','command':'info','description':a12_0x3fa7ed(0x1bc),'risk':a12_0x3fa7ed(0x1b3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xa49635){const _0x4952c5=a12_0x3fa7ed,_0x169252=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x169252,'meta':{'env':_0xa49635[_0x4952c5(0x175)]??_0x4952c5(0x18f)}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x521da6=a12_0x2298;(function(_0x501f35,_0x102e44){const _0x419550=a12_0x2298,_0x289cf3=_0x501f35();while(!![]){try{const _0x575504=-parseInt(_0x419550(0x213))/0x1+-parseInt(_0x419550(0x235))/0x2+-parseInt(_0x419550(0x1f6))/0x3+-parseInt(_0x419550(0x246))/0x4*(-parseInt(_0x419550(0x1e7))/0x5)+parseInt(_0x419550(0x220))/0x6*(-parseInt(_0x419550(0x21e))/0x7)+-parseInt(_0x419550(0x20c))/0x8*(parseInt(_0x419550(0x23a))/0x9)+-parseInt(_0x419550(0x1e6))/0xa*(-parseInt(_0x419550(0x211))/0xb);if(_0x575504===_0x102e44)break;else _0x289cf3['push'](_0x289cf3['shift']());}catch(_0x59015f){_0x289cf3['push'](_0x289cf3['shift']());}}}(a12_0x1404,0x538ff));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';function a12_0x1404(){const _0x4ec432=['newConfigFileName','info','read','env','64386PYdfCK','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','logout','Status:\x20valid','AccessKey:\x20','\x20auth\x20status','join','Auth\x20config\x20reinitialized\x20in\x20','project','\x20Verify:\x20','str','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','69864TarzhT','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','login','从配置中清除\x20AccessKey','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20config.','global\x20config','10146580uYLQeZ','15WKiXgO','AccessKey\x20cleared\x20from\x20','cancelled','development','bool','daily','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','expired','Read\x20from\x20global\x20config\x20(default)','nonInteractive','\x20config.\x20Nothing\x20to\x20clear.','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Option\x20B:\x20apps\x20config\x20(','authRequired','accessKey','1489890pMUaQU','Option\x20A:\x20','boolean','access_key','将用新的认证信息替换所选作用域的整份\x20Lovrabet\x20配置;该作用域中原有的其他配置项也会被清空。确认界面不会显示密钥内容。','auth','push','string','将把新的\x20AccessKey\x20保存到所选\x20Lovrabet\x20配置;若该作用域已有\x20AccessKey,将被覆盖。确认界面不会显示密钥内容。','AccessKey\x20(ak_xxx...)','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Write\x20to\x20global\x20config\x20(default)','access-key','Auth\x20mode:\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','\x20config','Option\x20C:\x20environment\x20variable','success','Clear\x20from\x20global\x20config\x20(default)','ClientAk','validation','yes','24RIxIDl','\x20doctor','\x20\x20export\x20','stdin','ACCESS_KEY','22aOegfy','将\x20AccessKey\x20保存到配置(默认写入全局配置;使用\x20--project\x20写入项目配置)','466059bJLZmB','repeat','production','length','Use\x20`','project\x20config','Then\x20verify\x20with:\x20','write','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','userCenterDisplayName','2164491qlNZZr','=ak_xxx','12vJUEIv','scope','trim','\x20env\x20var','清空当前作用域配置并重新初始化认证','check','No\x20AccessKey\x20found\x20in\x20','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','slice','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20Current\x20env:\x20','\x20scope.','isTTY','Tip:\x20you\x20can\x20also\x20run:','status','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','stdout','test','global','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20(via\x20','273732EfOpCe'];a12_0x1404=function(){return _0x4ec432;};return a12_0x1404();}import{CliErrors}from'../../errors.js';function a12_0x2298(_0x3d8627,_0x2f0fc5){_0x3d8627=_0x3d8627-0x1df;const _0x14047b=a12_0x1404();let _0x22980e=_0x14047b[_0x3d8627];return _0x22980e;}import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x3a0b39=a12_0x2298;writeCliSideChannelLine(_0x3a0b39(0x233)+PRODUCT_CONFIG[_0x3a0b39(0x21d)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x3a0b39(0x22d)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x3a0b39(0x1df));}function buildAccessKeySetupGuide(){const _0x4db2d5=a12_0x2298;return[_0x4db2d5(0x233)+PRODUCT_CONFIG[_0x4db2d5(0x21d)]+':',USER_ACCESS_KEY_CREATE_URL,_0x4db2d5(0x227)+CLI_BIN_NAME+_0x4db2d5(0x1e0)][_0x4db2d5(0x240)]('\x0a');}function canPromptForAccessKey(_0x299810){const _0x300e12=a12_0x2298;return!_0x299810[_0x300e12(0x1f0)]&&process[_0x300e12(0x20f)][_0x300e12(0x22c)]!==![]&&process[_0x300e12(0x230)][_0x300e12(0x22c)]!==![];}function resolveAuthScopeFlags(_0x49f50d){const _0x246d74=a12_0x2298;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x49f50d[_0x246d74(0x1eb)](_0x246d74(0x232)),'explicitProject':_0x49f50d['bool'](_0x246d74(0x242)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x1505a9){const _0x145cf3=a12_0x2298;let _0x4ba8b9=(_0x1505a9[_0x145cf3(0x244)](_0x145cf3(0x202))||_0x1505a9[_0x145cf3(0x244)]('ak')||'')[_0x145cf3(0x222)]();const _0x297d7b=(_0x1505a9['str']('env')||'')[_0x145cf3(0x222)]();if(!_0x4ba8b9&&canPromptForAccessKey(_0x1505a9))try{showAccessKeyCreateHint(),_0x4ba8b9=await promptAccessKey('');}catch(_0x43e77e){if(isAbortPrompt(_0x43e77e))throw CliErrors[_0x145cf3(0x1e9)]();throw _0x43e77e;}if(!_0x4ba8b9)throw CliErrors[_0x145cf3(0x20a)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x145cf3(0x231)](_0x4ba8b9))throw CliErrors['validation']('Invalid\x20accessKey\x20format:\x20\x22'+_0x4ba8b9+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x297d7b)return{'accessKey':_0x4ba8b9};const _0x3378fd=normalizeEnv(_0x297d7b);return{'accessKey':_0x4ba8b9,'env':isDaily(_0x3378fd)?_0x145cf3(0x1ec):isDev(_0x3378fd)?_0x145cf3(0x1ea):'production'};}export const authDefinitions=[{'service':'auth','command':a12_0x521da6(0x1e1),'description':a12_0x521da6(0x212),'risk':a12_0x521da6(0x21a),'confirmationDescription':a12_0x521da6(0x1fe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x521da6(0x202),'type':a12_0x521da6(0x1fd),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':'global','type':'boolean','description':a12_0x521da6(0x201),'default':!![]},{'name':'project','type':a12_0x521da6(0x1f8),'description':a12_0x521da6(0x204),'default':![]}],async 'execute'(_0x5cafa3){const _0x2aba8d=a12_0x521da6;if(_0x5cafa3[_0x2aba8d(0x1eb)](_0x2aba8d(0x20b)))throw CliErrors['validation']('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x2aba8d(0x217)+CLI_BIN_NAME+_0x2aba8d(0x1e3)+CLI_BIN_NAME+_0x2aba8d(0x22f));const _0x1460d3=(_0x5cafa3[_0x2aba8d(0x244)](_0x2aba8d(0x202))||_0x5cafa3[_0x2aba8d(0x244)]('ak')||'')[_0x2aba8d(0x222)]();if(!_0x1460d3&&_0x5cafa3[_0x2aba8d(0x1f0)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x49e279=await resolveAuthWriteInput(_0x5cafa3),_0x2f0cb0=resolveAuthScopeFlags(_0x5cafa3),_0x2d4a2e=readScopedConfig(_0x2f0cb0);_0x2d4a2e['accessKey']=_0x49e279[_0x2aba8d(0x1f5)];_0x49e279[_0x2aba8d(0x239)]&&(_0x2d4a2e[_0x2aba8d(0x239)]=_0x49e279[_0x2aba8d(0x239)]);writeScopedConfig(_0x2d4a2e,_0x2f0cb0);const _0x49be97=_0x2f0cb0[_0x2aba8d(0x232)]?_0x2aba8d(0x232):_0x2aba8d(0x242),_0x4debe0=_0x2d4a2e['env']?_0x2aba8d(0x22a)+_0x2d4a2e['env']+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x49be97+_0x2aba8d(0x1e4)+_0x4debe0+_0x2aba8d(0x243)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a12_0x521da6(0x1fb),'command':'init','description':a12_0x521da6(0x224),'risk':a12_0x521da6(0x21a),'confirmationDescription':a12_0x521da6(0x1fa),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a12_0x521da6(0x1ff)},{'name':'ak','type':a12_0x521da6(0x1fd),'description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x521da6(0x239),'type':a12_0x521da6(0x1fd),'description':a12_0x521da6(0x23b)},{'name':a12_0x521da6(0x232),'type':'boolean','description':a12_0x521da6(0x201),'default':!![]},{'name':a12_0x521da6(0x242),'type':a12_0x521da6(0x1f8),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x5c7500){const _0x3c50f6=a12_0x521da6,_0x435ae5=await resolveAuthWriteInput(_0x5c7500),_0xfa3326=resolveAuthScopeFlags(_0x5c7500),_0x4c6cd0={'accessKey':_0x435ae5[_0x3c50f6(0x1f5)]};_0x435ae5[_0x3c50f6(0x239)]&&(_0x4c6cd0[_0x3c50f6(0x239)]=_0x435ae5[_0x3c50f6(0x239)]);writeScopedConfig(_0x4c6cd0,_0xfa3326);const _0x446c2c=_0xfa3326[_0x3c50f6(0x232)]?_0x3c50f6(0x232):_0x3c50f6(0x242),_0x57fd3b=_0x4c6cd0[_0x3c50f6(0x239)]?_0x3c50f6(0x22a)+_0x4c6cd0[_0x3c50f6(0x239)]+'.':'';return{'ok':!![],'message':_0x3c50f6(0x241)+_0x446c2c+_0x3c50f6(0x22b)+_0x57fd3b+_0x3c50f6(0x243)+CLI_BIN_NAME+_0x3c50f6(0x23f)};}},{'service':a12_0x521da6(0x1fb),'command':a12_0x521da6(0x23c),'description':a12_0x521da6(0x1e2),'risk':'write','confirmationDescription':'将从所选\x20Lovrabet\x20配置中移除\x20AccessKey;之后依赖该密钥的命令需要重新登录才能使用。','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x521da6(0x232),'type':a12_0x521da6(0x1f8),'description':a12_0x521da6(0x208),'default':!![]},{'name':a12_0x521da6(0x242),'type':a12_0x521da6(0x1f8),'description':a12_0x521da6(0x200),'default':![]}],async 'execute'(_0x1a37d5){const _0x3fc2ec=a12_0x521da6,_0x51fe14=resolveAuthScopeFlags(_0x1a37d5),_0x32d9c1=readScopedConfig(_0x51fe14),_0x2de792=!!_0x32d9c1['accessKey'];delete _0x32d9c1['accessKey'],writeScopedConfig(_0x32d9c1,_0x51fe14);const _0x19f9ca=_0x51fe14[_0x3fc2ec(0x232)]?_0x3fc2ec(0x232):_0x3fc2ec(0x242);if(_0x2de792)return{'ok':!![],'message':_0x3fc2ec(0x1e8)+_0x19f9ca+_0x3fc2ec(0x1e4)};return{'ok':!![],'message':_0x3fc2ec(0x226)+_0x19f9ca+_0x3fc2ec(0x1f1)};}},{'service':a12_0x521da6(0x1fb),'command':a12_0x521da6(0x22e),'description':'Show\x20current\x20authentication\x20status','risk':a12_0x521da6(0x238),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a12_0x521da6(0x1ef),'default':!![]},{'name':a12_0x521da6(0x242),'type':a12_0x521da6(0x1f8),'description':a12_0x521da6(0x229),'default':![]},{'name':a12_0x521da6(0x225),'type':a12_0x521da6(0x1f8),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x57c94d){const _0x31811e=a12_0x521da6,_0x16c225=resolveAuthScopeFlags(_0x57c94d),_0x70dd47=readScopedConfig(_0x16c225),_0x2e8e0f=productEnvName(_0x31811e(0x210)),_0x24a5f0=productEnv(_0x31811e(0x210))||undefined,_0x70f273=_0x70dd47[_0x31811e(0x1f5)]||undefined,_0x48e403=_0x24a5f0||_0x70f273,_0x234f17=_0x24a5f0?_0x2e8e0f+_0x31811e(0x223):_0x70f273?(_0x16c225[_0x31811e(0x232)]?_0x31811e(0x232):_0x31811e(0x242))+_0x31811e(0x205):null,_0x4cca35=[_0x31811e(0x203)+AUTH_MODE[_0x31811e(0x209)]];if(_0x48e403){const _0x311c08=_0x48e403['length']>0x8?''+_0x48e403[_0x31811e(0x228)](0x0,0x8)+'*'[_0x31811e(0x214)](_0x48e403[_0x31811e(0x216)]-0x8):_0x48e403;_0x4cca35[_0x31811e(0x1fc)]('AccessKey:\x20'+_0x311c08+(_0x234f17?_0x31811e(0x234)+_0x234f17+')':'')),_0x4cca35['push'](_0x31811e(0x23d));}if(!_0x48e403){_0x4cca35['push'](''),_0x4cca35[_0x31811e(0x1fc)](_0x31811e(0x1f2)),_0x4cca35[_0x31811e(0x1fc)](''),_0x4cca35[_0x31811e(0x1fc)](_0x31811e(0x1f7)+CLI_BIN_NAME+_0x31811e(0x21c)),_0x4cca35[_0x31811e(0x1fc)](''),_0x4cca35['push'](_0x31811e(0x1f3)+PRODUCT_CONFIG[_0x31811e(0x236)]+')'),_0x4cca35['push']('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x4cca35['push'](''),_0x4cca35[_0x31811e(0x1fc)](_0x31811e(0x206)),_0x4cca35[_0x31811e(0x1fc)](_0x31811e(0x20e)+_0x2e8e0f+_0x31811e(0x21f)),_0x4cca35['push'](''),_0x4cca35[_0x31811e(0x1fc)](_0x31811e(0x219)+CLI_BIN_NAME+_0x31811e(0x23f)),_0x4cca35[_0x31811e(0x1fc)](_0x31811e(0x1ed)+CLI_BIN_NAME+_0x31811e(0x20d));if(_0x57c94d['bool'](_0x31811e(0x225))){const _0x5c8bbf=readStoredDeviceCode();if(_0x5c8bbf&&!isStoredDeviceCodeExpired(_0x5c8bbf)){const _0xd9f922=getUserDomain(),_0x5369bc=await fetchDeviceToken(_0xd9f922,_0x5c8bbf['code']);if(_0x5369bc['status']===_0x31811e(0x207)&&_0x5369bc[_0x31811e(0x1f9)]){const _0x45abde={'global':_0x5c8bbf[_0x31811e(0x221)]==='global'},_0x56d9e0=readScopedConfig(_0x45abde);_0x56d9e0[_0x31811e(0x1f5)]=_0x5369bc[_0x31811e(0x1f9)],writeScopedConfig(_0x56d9e0,_0x45abde),deleteStoredDeviceCode();const _0x400bb5=_0x5369bc[_0x31811e(0x1f9)],_0x38942e=_0x400bb5['length']>0x8?''+_0x400bb5[_0x31811e(0x228)](0x0,0x8)+'*'['repeat'](_0x400bb5[_0x31811e(0x216)]-0x8):_0x400bb5,_0x5f50dc=_0x5c8bbf[_0x31811e(0x221)]==='global'?_0x31811e(0x1e5):_0x31811e(0x218);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE['ClientAk'],_0x31811e(0x23e)+_0x38942e+'\x20(via\x20'+_0x5f50dc+')',_0x31811e(0x23d)][_0x31811e(0x240)]('\x0a')};}_0x5369bc['status']===_0x31811e(0x1ee)&&deleteStoredDeviceCode();throw CliErrors[_0x31811e(0x1f4)](_0x31811e(0x245));}throw CliErrors[_0x31811e(0x1f4)](_0x4cca35['join']('\x0a'));}}return{'ok':!![],'message':_0x4cca35[_0x31811e(0x240)]('\x0a')};}},{'service':a12_0x521da6(0x1fb),'command':a12_0x521da6(0x237),'description':a12_0x521da6(0x21b),'risk':a12_0x521da6(0x238),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3883a8){const _0x28dc1a=a12_0x521da6,_0x12040e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x12040e,'meta':{'env':_0x3883a8['envName']??_0x28dc1a(0x215)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x449783,_0x21894f){const _0x4d6adb=a13_0x3287,_0x2f067b=_0x449783();while(!![]){try{const _0x4c1ff6=parseInt(_0x4d6adb(0xbc))/0x1+-parseInt(_0x4d6adb(0xa6))/0x2*(-parseInt(_0x4d6adb(0xb7))/0x3)+parseInt(_0x4d6adb(0xb2))/0x4*(parseInt(_0x4d6adb(0xb9))/0x5)+-parseInt(_0x4d6adb(0xb8))/0x6+-parseInt(_0x4d6adb(0xa9))/0x7*(parseInt(_0x4d6adb(0xbd))/0x8)+parseInt(_0x4d6adb(0xae))/0x9*(-parseInt(_0x4d6adb(0xbb))/0xa)+parseInt(_0x4d6adb(0xb6))/0xb*(parseInt(_0x4d6adb(0xa7))/0xc);if(_0x4c1ff6===_0x21894f)break;else _0x2f067b['push'](_0x2f067b['shift']());}catch(_0x530fdc){_0x2f067b['push'](_0x2f067b['shift']());}}}(a13_0x39b8,0xc49c1));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x302b50=a13_0x3287;super('User\x20aborted\x20prompt'),this[_0x302b50(0xab)]='AbortPrompt';}}function createSafeRl(){const _0x466e97=a13_0x3287,_0x33336a=createInterface({'input':process[_0x466e97(0xad)],'output':process[_0x466e97(0xb5)]});let _0x279bbf;const _0x595bc0=new Promise((_0xb35f68,_0x1d852f)=>{const _0x292199=_0x466e97;_0x279bbf=()=>{const _0x2a9a95=a13_0x3287;_0x279bbf&&(_0x33336a[_0x2a9a95(0xb3)](_0x2a9a95(0xb0),_0x279bbf),_0x279bbf=undefined);try{_0x33336a[_0x2a9a95(0xb4)]();}catch{}_0x1d852f(new AbortPrompt());},_0x33336a[_0x292199(0xaa)](_0x292199(0xb0),_0x279bbf);}),_0x55285b=()=>{const _0xd8e964=_0x466e97;_0x279bbf&&(_0x33336a['removeListener'](_0xd8e964(0xb0),_0x279bbf),_0x279bbf=undefined);try{_0x33336a[_0xd8e964(0xb4)]();}catch{}};return{'rl':_0x33336a,'abortPromise':_0x595bc0,'disposeSuccess':_0x55285b};}function a13_0x3287(_0x2bb8b5,_0x1c043e){_0x2bb8b5=_0x2bb8b5-0xa5;const _0x39b879=a13_0x39b8();let _0x328740=_0x39b879[_0x2bb8b5];return _0x328740;}export async function promptAccessKey(_0x509001=''){const _0x45e98e=a13_0x3287,{rl:_0x37cbee,abortPromise:_0x282aaf,disposeSuccess:_0x1478d8}=createSafeRl(),_0xd329b6=new Promise(_0x14c820=>{const _0xc85707=a13_0x3287,_0x120df6=_0x509001?'AccessKey\x20('+_0x509001+_0xc85707(0xa8):_0xc85707(0xac);_0x37cbee[_0xc85707(0xb1)](_0x120df6,_0x552f5e=>{const _0xcec883=_0xc85707;_0x1478d8(),_0x14c820(_0x552f5e[_0xcec883(0xaf)]()||_0x509001);});});return Promise[_0x45e98e(0xa5)]([_0xd329b6,_0x282aaf]);}export function isAbortPrompt(_0x5574bd){const _0x1bac76=a13_0x3287;return _0x5574bd instanceof Error&&_0x5574bd[_0x1bac76(0xab)]===_0x1bac76(0xba);}function a13_0x39b8(){const _0x5841cb=['1686tKwpIX','12KolMZx','):\x20','1276142ZEzNxT','once','name','AccessKey\x20(paste\x20ak_...):\x20','stdin','45AhMpov','trim','SIGINT','question','12GlwDVi','removeListener','close','stdout','20128823NRYOsG','2322uHrxkl','6363084BVTfQs','833285SXnPAD','AbortPrompt','1079810esfoEW','517222NrQQAA','48YuiTgj','race'];a13_0x39b8=function(){return _0x5841cb;};return a13_0x39b8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x4fe5d5=a14_0x3242;(function(_0x350cdc,_0x57c444){const _0xe4bf77=a14_0x3242,_0x56f321=_0x350cdc();while(!![]){try{const _0x5de521=parseInt(_0xe4bf77(0xd6))/0x1+-parseInt(_0xe4bf77(0xc8))/0x2*(-parseInt(_0xe4bf77(0xd9))/0x3)+-parseInt(_0xe4bf77(0xdd))/0x4*(parseInt(_0xe4bf77(0xd2))/0x5)+parseInt(_0xe4bf77(0xd8))/0x6*(parseInt(_0xe4bf77(0xce))/0x7)+parseInt(_0xe4bf77(0xd0))/0x8*(parseInt(_0xe4bf77(0xcb))/0x9)+-parseInt(_0xe4bf77(0xd4))/0xa*(-parseInt(_0xe4bf77(0xd7))/0xb)+-parseInt(_0xe4bf77(0xda))/0xc*(parseInt(_0xe4bf77(0xd3))/0xd);if(_0x5de521===_0x57c444)break;else _0x56f321['push'](_0x56f321['shift']());}catch(_0x3f8f2a){_0x56f321['push'](_0x56f321['shift']());}}}(a14_0x27df,0x8caca));import{getBffEndpointContract}from'../../core/api-client.js';function a14_0x3242(_0x4e4ec0,_0x295d54){_0x4e4ec0=_0x4e4ec0-0xc8;const _0x27df97=a14_0x27df();let _0x3242c1=_0x27df97[_0x4e4ec0];return _0x3242c1;}import{NAME_FLAG}from'../../commands/common/flags.js';function a14_0x27df(){const _0x38ef94=['(none)','21LtPKOg','appCode','424Cxrijn','str','125QYlpbI','25909vhMoRC','10650NFJZUb','description','387292NHazJc','3256OToZCJ','100698tXPWPY','9phnaOz','1188OhDBoz','functionName','version','42124PcKRsc','4546meuJjr','detail','BFF\x20function\x20name','47052MaBPih','bff'];a14_0x27df=function(){return _0x38ef94;};return a14_0x27df();}export const bffDetail={'service':a14_0x4fe5d5(0xcc),'command':a14_0x4fe5d5(0xc9),'description':'Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a14_0x4fe5d5(0xca)}],async 'execute'(_0x238143){const _0x4ca4f5=a14_0x4fe5d5,_0x5498ed=await getBffEndpointContract(_0x238143[_0x4ca4f5(0xcf)],_0x238143[_0x4ca4f5(0xd1)]('name'));return{'ok':!![],'data':{'appCode':_0x5498ed[_0x4ca4f5(0xcf)],'functionName':_0x5498ed[_0x4ca4f5(0xdb)],'description':_0x5498ed[_0x4ca4f5(0xd5)]||_0x4ca4f5(0xcd),'version':_0x5498ed[_0x4ca4f5(0xdc)],'gmtModified':_0x5498ed['gmtModified']}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a15_0x2790cf=a15_0x1655;function a15_0x421e(){const _0x5edae8=['1049175IVBjIR','40073wZOJIx','exec','1608MCMBWu','now','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','266754KfDizk','184iUKqTc','BFF\x20function\x20name\x20to\x20execute','196278tgNCLw','612143qngfBr','8328cHInjJ','name','read','8uKMXlk','10rGIzMJ','20TSslnG','10106QEqlWp','str'];a15_0x421e=function(){return _0x5edae8;};return a15_0x421e();}(function(_0x1fd922,_0x5ca0a6){const _0x5da93f=a15_0x1655,_0x2b00cd=_0x1fd922();while(!![]){try{const _0x35b55f=parseInt(_0x5da93f(0x168))/0x1+parseInt(_0x5da93f(0x170))/0x2+parseInt(_0x5da93f(0x162))/0x3*(parseInt(_0x5da93f(0x171))/0x4)+parseInt(_0x5da93f(0x167))/0x5*(parseInt(_0x5da93f(0x160))/0x6)+-parseInt(_0x5da93f(0x161))/0x7*(-parseInt(_0x5da93f(0x165))/0x8)+parseInt(_0x5da93f(0x16a))/0x9*(parseInt(_0x5da93f(0x166))/0xa)+parseInt(_0x5da93f(0x16b))/0xb*(-parseInt(_0x5da93f(0x16d))/0xc);if(_0x35b55f===_0x5ca0a6)break;else _0x2b00cd['push'](_0x2b00cd['shift']());}catch(_0x45084c){_0x2b00cd['push'](_0x2b00cd['shift']());}}}(a15_0x421e,0x1cc85));function a15_0x1655(_0x4eebd4,_0x49a9b0){_0x4eebd4=_0x4eebd4-0x15f;const _0x421ef2=a15_0x421e();let _0x16557f=_0x421ef2[_0x4eebd4];return _0x16557f;}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':a15_0x2790cf(0x16c),'description':a15_0x2790cf(0x16f),'risk':a15_0x2790cf(0x164),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x2790cf(0x15f)},PARAMS_FLAG],async 'execute'(_0xd76b5f){const _0x5b06fc=a15_0x2790cf,_0x9a05f8=parseJsonParams(_0xd76b5f[_0x5b06fc(0x169)]('params')),_0x50b527=Date[_0x5b06fc(0x16e)](),_0x2314e1=await executeSdkBff(_0xd76b5f[_0x5b06fc(0x169)](_0x5b06fc(0x163)),_0x9a05f8),_0x38af74=Date[_0x5b06fc(0x16e)]()-_0x50b527;return{'ok':!![],'data':{'result':_0x2314e1,'elapsed':_0x38af74},'message':'BFF\x20executed\x20in\x20'+_0x38af74+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x176b79,_0x2860e4){const _0x31e5e7=a16_0x4a37,_0x54f3a5=_0x176b79();while(!![]){try{const _0x7f531a=-parseInt(_0x31e5e7(0x172))/0x1*(-parseInt(_0x31e5e7(0x169))/0x2)+-parseInt(_0x31e5e7(0x16f))/0x3+parseInt(_0x31e5e7(0x16e))/0x4+parseInt(_0x31e5e7(0x16a))/0x5*(parseInt(_0x31e5e7(0x16d))/0x6)+parseInt(_0x31e5e7(0x16b))/0x7*(parseInt(_0x31e5e7(0x170))/0x8)+-parseInt(_0x31e5e7(0x171))/0x9+-parseInt(_0x31e5e7(0x16c))/0xa*(parseInt(_0x31e5e7(0x168))/0xb);if(_0x7f531a===_0x2860e4)break;else _0x54f3a5['push'](_0x54f3a5['shift']());}catch(_0x5a91b6){_0x54f3a5['push'](_0x54f3a5['shift']());}}}(a16_0x5c7c,0x25665));import{bffDetail}from'../../commands/bff/detail.js';function a16_0x5c7c(){const _0x259912=['1641888HEljMG','5253lYOpLL','33869sVNiFK','10XqioQZ','15PtwYQN','387597rfwEhd','40awCWeO','385794KQYpWI','431092KwpiiX','767559EDDxUS','40hRTIVa'];a16_0x5c7c=function(){return _0x259912;};return a16_0x5c7c();}import{bffExec}from'../../commands/bff/exec.js';function a16_0x4a37(_0x5db68c,_0x47a780){_0x5db68c=_0x5db68c-0x168;const _0x5c7c6a=a16_0x5c7c();let _0x4a37de=_0x5c7c6a[_0x5db68c];return _0x4a37de;}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x539f09=a17_0x28e1;(function(_0x48c36f,_0x5a97ba){const _0x26dc1d=a17_0x28e1,_0x3e61f3=_0x48c36f();while(!![]){try{const _0x4e90a9=-parseInt(_0x26dc1d(0x1e2))/0x1*(-parseInt(_0x26dc1d(0x1e4))/0x2)+parseInt(_0x26dc1d(0x1ea))/0x3*(-parseInt(_0x26dc1d(0x1db))/0x4)+parseInt(_0x26dc1d(0x1d9))/0x5+-parseInt(_0x26dc1d(0x1e1))/0x6+parseInt(_0x26dc1d(0x1e6))/0x7*(-parseInt(_0x26dc1d(0x1f0))/0x8)+parseInt(_0x26dc1d(0x1dc))/0x9+parseInt(_0x26dc1d(0x1e7))/0xa*(parseInt(_0x26dc1d(0x1f3))/0xb);if(_0x4e90a9===_0x5a97ba)break;else _0x3e61f3['push'](_0x3e61f3['shift']());}catch(_0x1207f9){_0x3e61f3['push'](_0x3e61f3['shift']());}}}(a17_0x1e8c,0x51c39));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a17_0x28e1(_0x401276,_0x4550fe){_0x401276=_0x401276-0x1d6;const _0x1e8cad=a17_0x1e8c();let _0x28e1fc=_0x1e8cad[_0x401276];return _0x28e1fc;}function a17_0x1e8c(){const _0x4f8124=['1694268DEeVGH','338jLruSu','setLogPath','1756TDABmm','log','11053xDJGzf','3860rwSMrf','npx\x20skills\x20add\x20failed:\x20','Skipped\x20npx\x20(','892623zuTxGR','apiError','info','write','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','error','2648GqNShh','cwd','cli-skill','12353mwLmIx','nonInteractive','CLI\x20Built-in\x20Skill\x20installed','cli-skill-install','2223060XixlJI','pipe','4JSGkjU','2363571DSADCB','\x20-g\x20-y)...','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','inherit','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20'];a17_0x1e8c=function(){return _0x4f8124;};return a17_0x1e8c();}export const cliSkillDefinitions=[{'service':a17_0x539f09(0x1f2),'command':'install','description':'安装\x20Lovrabet\x20运行态所需的\x20CLI\x20内置\x20Skill','risk':a17_0x539f09(0x1ed),'confirmationDescription':'将通过\x20npx\x20下载并全局安装\x20Lovrabet\x20CLI\x20内置\x20Skill;这会修改当前用户的全局\x20Skill\x20目录。','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5be4a9){const _0x3577bc=a17_0x539f09;logger[_0x3577bc(0x1e3)](process[_0x3577bc(0x1f1)]()),logger[_0x3577bc(0x1ec)](_0x3577bc(0x1d8),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {LOVRABET_SKILL_SOURCE:_0x50f4de,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x32b1a9,runNpxSkillsAddGlobal:_0x4d1788}=await import('../../skills/npx-skills-add.js'),_0x15eaf1=_0x5be4a9[_0x3577bc(0x1d6)]?_0x3577bc(0x1da):_0x3577bc(0x1df);console[_0x3577bc(0x1e5)](_0x3577bc(0x1ee)+_0x50f4de+_0x3577bc(0x1dd));const _0x46eac6=_0x4d1788(process[_0x3577bc(0x1f1)](),_0x50f4de,{'stdio':_0x15eaf1});if(_0x46eac6['skipped'])console[_0x3577bc(0x1e5)](_0x3577bc(0x1e9)+_0x32b1a9+_0x3577bc(0x1de));else{if(_0x46eac6['ok'])console[_0x3577bc(0x1e5)](_0x3577bc(0x1d7));else throw CliErrors[_0x3577bc(0x1eb)](_0x3577bc(0x1e8)+(_0x46eac6[_0x3577bc(0x1ef)]||'unknown'),_0x3577bc(0x1e0)+_0x50f4de+'\x20-g\x20-y');}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc8f052,_0x7a4fe){const _0x2f9ea6=a18_0x4ca9,_0x1f7f3d=_0xc8f052();while(!![]){try{const _0x4e88ad=-parseInt(_0x2f9ea6(0x112))/0x1+-parseInt(_0x2f9ea6(0x10a))/0x2+-parseInt(_0x2f9ea6(0x103))/0x3*(-parseInt(_0x2f9ea6(0x109))/0x4)+-parseInt(_0x2f9ea6(0x110))/0x5*(-parseInt(_0x2f9ea6(0x116))/0x6)+-parseInt(_0x2f9ea6(0x101))/0x7*(parseInt(_0x2f9ea6(0x108))/0x8)+-parseInt(_0x2f9ea6(0x111))/0x9*(parseInt(_0x2f9ea6(0x10f))/0xa)+parseInt(_0x2f9ea6(0x107))/0xb;if(_0x4e88ad===_0x7a4fe)break;else _0x1f7f3d['push'](_0x1f7f3d['shift']());}catch(_0x4653d8){_0x1f7f3d['push'](_0x1f7f3d['shift']());}}}(a18_0x3416,0x6e86f));function a18_0x3416(){const _0x53c15d=['754749JFiWzA','809732ZjqnDF','project-or-global-explicit','global-default','global','6CgbxCB','project-default','1641829LOtwTh','Use\x20only\x20one\x20config\x20scope\x20flag.','3VyHLPM','\x20(global)','\x20found).','newConfigFileName','22314688AXSAMt','24IdCmEK','864908jRNdvw','716474UxfCoM','validation','inProject',',\x20or\x20run\x20`','Add\x20--global\x20to\x20write\x20to\x20~/','70nXiYHg','3332605jjMdBa'];a18_0x3416=function(){return _0x53c15d;};return a18_0x3416();}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(_0x2afc24){const _0x424657=a18_0x4ca9,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x5be990}=_0x2afc24;if(explicitGlobal&&explicitProject)throw CliErrors[_0x424657(0x10b)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x424657(0x102));if(explicitGlobal)return _0x424657(0x115);if(explicitProject)return'project';switch(_0x5be990){case _0x424657(0x114):return _0x424657(0x115);case _0x424657(0x117):return _0x2afc24[_0x424657(0x10c)]??isInProject()?'project':'global';case _0x424657(0x113):if(!(_0x2afc24[_0x424657(0x10c)]??isInProject()))throw CliErrors[_0x424657(0x10b)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x424657(0x106)]+_0x424657(0x105),_0x424657(0x10e)+PRODUCT_CONFIG[_0x424657(0x106)]+_0x424657(0x10d)+CLI_BIN_NAME+'\x20init`\x20first.');return'project';}}export function toScopeFlags(_0x5b1429){return{'global':_0x5b1429==='global'};}function a18_0x4ca9(_0xe975f1,_0x1acf24){_0xe975f1=_0xe975f1-0x101;const _0x3416ac=a18_0x3416();let _0x4ca94b=_0x3416ac[_0xe975f1];return _0x4ca94b;}export function formatScopeLabel(_0xdb982e){const _0x3a951e=a18_0x4ca9;return _0xdb982e==='global'?_0x3a951e(0x104):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a19_0x4b65(){const _0x106d96=['flag','Provide\x20one\x20of:\x20','str','Remove\x20all\x20but\x20one.','\x20is\x20allowed,\x20found:\x20','286308bGcDYK','1902856IpvuHu','test',':\x20expected\x20','validation','\x20are\x20mutually\x20exclusive\x20for\x20`','5769810cYnkms','972032lDrLlh','filter','At\x20least\x20one\x20of\x20','Invalid\x20--','some','8lEgeDt','2735760hedBLU','908376PKZAov','3831201uHBMNq','length','Only\x20one\x20of\x20','10SkZrME','Exactly\x20one\x20of\x20','map','\x20is\x20required\x20for\x20`'];a19_0x4b65=function(){return _0x106d96;};return a19_0x4b65();}(function(_0x16a0f0,_0x5d76f4){const _0x37a658=a19_0x243d,_0x59b0ee=_0x16a0f0();while(!![]){try{const _0x3389e2=-parseInt(_0x37a658(0x141))/0x1+parseInt(_0x37a658(0x148))/0x2+-parseInt(_0x37a658(0x14e))/0x3+parseInt(_0x37a658(0x142))/0x4*(parseInt(_0x37a658(0x153))/0x5)+parseInt(_0x37a658(0x147))/0x6+-parseInt(_0x37a658(0x14f))/0x7+-parseInt(_0x37a658(0x14d))/0x8*(parseInt(_0x37a658(0x150))/0x9);if(_0x3389e2===_0x5d76f4)break;else _0x59b0ee['push'](_0x59b0ee['shift']());}catch(_0x12e6e7){_0x59b0ee['push'](_0x59b0ee['shift']());}}}(a19_0x4b65,0x9d912));import{CliErrors}from'../../errors.js';function isSet(_0x3bff2b,_0x50d470){const _0x30bd2f=a19_0x243d,_0xe072b0=_0x3bff2b[_0x30bd2f(0x157)](_0x50d470);return _0xe072b0!==undefined&&_0xe072b0!==''&&_0xe072b0!==![]&&_0xe072b0!==0x0;}function a19_0x243d(_0x1a2477,_0x2f81be){_0x1a2477=_0x1a2477-0x140;const _0x4b6504=a19_0x4b65();let _0x243d9b=_0x4b6504[_0x1a2477];return _0x243d9b;}function fmtNames(_0x433b6c){const _0x3b9aa7=a19_0x243d;return _0x433b6c[_0x3b9aa7(0x155)](_0x47c5ed=>'--'+_0x47c5ed)['join'](',\x20');}export function requireOneOf(_0x2316fa,_0x55df2e,_0xb66c13){const _0x487cb5=a19_0x243d,_0x495764=_0x55df2e[_0x487cb5(0x149)](_0x242be7=>isSet(_0x2316fa,_0x242be7));if(_0x495764[_0x487cb5(0x151)]!==0x1)throw CliErrors[_0x487cb5(0x145)](_0x495764['length']===0x0?_0x487cb5(0x154)+fmtNames(_0x55df2e)+_0x487cb5(0x156)+_0xb66c13+'`.':_0x487cb5(0x152)+fmtNames(_0x55df2e)+_0x487cb5(0x140)+fmtNames(_0x495764)+'.',_0x495764[_0x487cb5(0x151)]===0x0?_0x487cb5(0x158)+fmtNames(_0x55df2e):_0x487cb5(0x15a));}export function requireAnyOf(_0xfda6d4,_0x5a64ac,_0x226cc9){const _0x46c71a=a19_0x243d;if(!_0x5a64ac[_0x46c71a(0x14c)](_0x5783f5=>isSet(_0xfda6d4,_0x5783f5)))throw CliErrors[_0x46c71a(0x145)](_0x46c71a(0x14a)+fmtNames(_0x5a64ac)+_0x46c71a(0x156)+_0x226cc9+'`.',_0x46c71a(0x158)+fmtNames(_0x5a64ac));}export function mutuallyExclusive(_0x49bea5,_0x17534b,_0x152813){const _0x3d6c3b=a19_0x243d,_0x15ed5c=_0x17534b[_0x3d6c3b(0x149)](_0x1552a1=>isSet(_0x49bea5,_0x1552a1));if(_0x15ed5c[_0x3d6c3b(0x151)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x15ed5c)+_0x3d6c3b(0x146)+_0x152813+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x17534b));}export function validatePattern(_0x38a7ef,_0x3ea89d,_0x315fd1,_0x34312a){const _0x9bb2f1=a19_0x243d,_0x140ae3=_0x38a7ef[_0x9bb2f1(0x159)](_0x3ea89d);if(_0x140ae3&&!_0x315fd1[_0x9bb2f1(0x143)](_0x140ae3))throw CliErrors[_0x9bb2f1(0x145)](_0x9bb2f1(0x14b)+_0x3ea89d+_0x9bb2f1(0x144)+_0x34312a+',\x20got\x20\x22'+_0x140ae3+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x30760f=a20_0x2737;function a20_0x2737(_0x4fa679,_0x15953b){_0x4fa679=_0x4fa679-0xf9;const _0x401de8=a20_0x401d();let _0x27379d=_0x401de8[_0x4fa679];return _0x27379d;}(function(_0x48a08f,_0xd8fc89){const _0x27443b=a20_0x2737,_0x4001c4=_0x48a08f();while(!![]){try{const _0x79f8f1=-parseInt(_0x27443b(0xfd))/0x1+-parseInt(_0x27443b(0x104))/0x2+parseInt(_0x27443b(0x102))/0x3*(-parseInt(_0x27443b(0xfe))/0x4)+-parseInt(_0x27443b(0x109))/0x5*(-parseInt(_0x27443b(0x106))/0x6)+parseInt(_0x27443b(0xfa))/0x7+parseInt(_0x27443b(0x108))/0x8+parseInt(_0x27443b(0xfc))/0x9;if(_0x79f8f1===_0xd8fc89)break;else _0x4001c4['push'](_0x4001c4['shift']());}catch(_0x3d313e){_0x4001c4['push'](_0x4001c4['shift']());}}}(a20_0x401d,0x467ba));export const CODE_FLAG={'name':'code','type':a20_0x30760f(0x107),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a20_0x30760f(0xff),'type':a20_0x30760f(0x107),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':'verbose','type':a20_0x30760f(0xf9),'description':a20_0x30760f(0xfb)};function a20_0x401d(){const _0x4b2752=['sqlcode','name','params','1446vwoAWI','Resource\x20name\x20for\x20lookup','283310SadVxb','number','870594EjEwVQ','string','647176PuTgOm','5YyRgoy','boolean','3965325ZZeQaZ','Return\x20full\x20raw\x20response\x20object','517554FhcSva','264420LERZZI','1288EeEsYJ'];a20_0x401d=function(){return _0x4b2752;};return a20_0x401d();}export const PARAMS_FLAG={'name':a20_0x30760f(0x101),'type':a20_0x30760f(0x107),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a20_0x30760f(0x100),'type':'string','description':a20_0x30760f(0x103)};export const ID_FLAG={'name':'id','type':a20_0x30760f(0x105),'required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x408f63,_0x1cf48c){const _0x427ce0=a21_0x5317,_0x505ea3=_0x408f63();while(!![]){try{const _0x4e610d=parseInt(_0x427ce0(0x8f))/0x1+parseInt(_0x427ce0(0x90))/0x2+-parseInt(_0x427ce0(0x95))/0x3+parseInt(_0x427ce0(0x9b))/0x4*(parseInt(_0x427ce0(0x91))/0x5)+-parseInt(_0x427ce0(0x98))/0x6*(parseInt(_0x427ce0(0x92))/0x7)+-parseInt(_0x427ce0(0x8d))/0x8*(-parseInt(_0x427ce0(0x8c))/0x9)+-parseInt(_0x427ce0(0x96))/0xa*(-parseInt(_0x427ce0(0x9a))/0xb);if(_0x4e610d===_0x1cf48c)break;else _0x505ea3['push'](_0x505ea3['shift']());}catch(_0x360058){_0x505ea3['push'](_0x505ea3['shift']());}}}(a21_0x4db4,0x19aed));function a21_0x4db4(){const _0x15cd65=['729sNcAje','9864Bsvqzv','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','33429pMiscX','89740NSBiZm','422580rJLbmJ','1211WyTdvT','File\x20not\x20found:\x20','ceil','466695uMSePS','12370GTqExC','validation','2598vQeOzn','File\x20is\x20not\x20a\x20regular\x20file:\x20','649uJzfxB','4KnOrID','isFile'];a21_0x4db4=function(){return _0x15cd65;};return a21_0x4db4();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a21_0x5317(_0x33d0fd,_0x3582c2){_0x33d0fd=_0x33d0fd-0x8b;const _0x4db4da=a21_0x4db4();let _0x531712=_0x4db4da[_0x33d0fd];return _0x531712;}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x2d2571){const _0xc737d6=a21_0x5317;if(_0x2d2571>=BYTES_PER_MB){const _0x437c8c=Math[_0xc737d6(0x94)](_0x2d2571/BYTES_PER_MB*0x64)/0x64;return _0x437c8c['toFixed'](0x2)+'\x20MB';}return _0x2d2571+'\x20B';}export function requireRuntimeUploadFile(_0x6faebc,_0x1bda14){const _0x444c5b=a21_0x5317,_0x20c361=_0x6faebc['trim']();if(!_0x20c361)throw CliErrors['validation'](_0x1bda14+'\x20path\x20is\x20required.');if(!existsSync(_0x20c361))throw CliErrors[_0x444c5b(0x97)](_0x444c5b(0x93)+_0x20c361);const _0xc0b05b=statSync(_0x20c361);if(!_0xc0b05b[_0x444c5b(0x8b)]())throw CliErrors['validation'](_0x444c5b(0x99)+_0x20c361);if(_0xc0b05b['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x444c5b(0x97)](_0x444c5b(0x8e)+_0x20c361+'\x20('+formatBytes(_0xc0b05b['size'])+')');return{'path':_0x20c361,'size':_0xc0b05b['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x265ac7=a22_0x552a;(function(_0x4faa01,_0x4f9e46){const _0x181b29=a22_0x552a,_0x55d2ba=_0x4faa01();while(!![]){try{const _0x3e4ea4=parseInt(_0x181b29(0x1d0))/0x1*(parseInt(_0x181b29(0x1d8))/0x2)+parseInt(_0x181b29(0x1d6))/0x3*(parseInt(_0x181b29(0x1ea))/0x4)+parseInt(_0x181b29(0x1b7))/0x5*(parseInt(_0x181b29(0x1da))/0x6)+parseInt(_0x181b29(0x1f0))/0x7*(-parseInt(_0x181b29(0x1e4))/0x8)+parseInt(_0x181b29(0x1db))/0x9+parseInt(_0x181b29(0x1c2))/0xa+-parseInt(_0x181b29(0x1e7))/0xb*(parseInt(_0x181b29(0x1c8))/0xc);if(_0x3e4ea4===_0x4f9e46)break;else _0x55d2ba['push'](_0x55d2ba['shift']());}catch(_0x3afeba){_0x55d2ba['push'](_0x55d2ba['shift']());}}}(a22_0x4567,0x3cffa));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_0x265ac7(0x1c5),'type':a22_0x265ac7(0x1e8),'description':a22_0x265ac7(0x1ee),'default':![]};function a22_0x4567(){const _0x50dae9=['#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x20\x20project:\x20','50KtFius','bool','apps','project-or-global-explicit','pageSize','Config\x20files:\x0a','409731wbsWkU','keys','4336pUAhgM','trim','126kdIYuR','290619HWxuXj','format','Key\x20not\x20found:\x20','object','Deleted\x20`','\x22\x20is\x20not\x20settable.','\x20config\x20get\x20<key>','riskLevel','Set\x20a\x20config\x20value','1409056yhlHzi','\x20config\x20set\x20<key>\x20<value>\x20[--global]','appcode','253lXjGzX','boolean','Top-level\x20key\x20\x22','12VJOlRz','join',';\x20apps.<alias>.appcode','\x22.\x20Allowed:\x20','Write\x20to\x20global\x20config','Key\x20\x22','7vGxdSj','length','field','Invalid\x20value\x20for\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','list','config','key','List\x20current\x20config','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20\x20global:\x20\x20','isArray','(none)','5080RTMGhy','write','value','Usage:\x20','Get\x20a\x20config\x20value','includes','pretty','args','log','set','\x20(global)','479530FHytyn','`\x20=\x20\x22','split','global','validation','../../context.js','101076YOSAKp','Missing\x20key\x20or\x20value.','pageSize\x20must\x20be\x20a\x20positive\x20number','stringify','delete','alias'];a22_0x4567=function(){return _0x50dae9;};return a22_0x4567();}function a22_0x552a(_0x50ad95,_0x3a4b17){_0x50ad95=_0x50ad95-0x1ad;const _0x4567ec=a22_0x4567();let _0x552aab=_0x4567ec[_0x50ad95];return _0x552aab;}function parseAliasAppcodeSetKey(_0x29f39d){const _0x3845cf=a22_0x265ac7,_0x20fb95=_0x29f39d[_0x3845cf(0x1c4)]('.');if(_0x20fb95['length']!==0x3||_0x20fb95[0x0]!==_0x3845cf(0x1d2)||_0x20fb95[0x2]!==_0x3845cf(0x1e6))return undefined;const _0x332647=_0x20fb95[0x1]?.[_0x3845cf(0x1d9)]();return _0x332647?_0x332647:undefined;}function parseAliasDeleteKey(_0x186891){const _0xe2cbd4=a22_0x265ac7,_0x1522e3=_0x186891[_0xe2cbd4(0x1c4)]('.');if(_0x1522e3[_0xe2cbd4(0x1f1)]===0x2&&_0x1522e3[0x0]===_0xe2cbd4(0x1d2)){const _0x215de0=_0x1522e3[0x1]?.[_0xe2cbd4(0x1d9)]();return _0x215de0?{'alias':_0x215de0}:undefined;}if(_0x1522e3[_0xe2cbd4(0x1f1)]===0x3&&_0x1522e3[0x0]===_0xe2cbd4(0x1d2)&&_0x1522e3[0x2]===_0xe2cbd4(0x1e6)){const _0x2940aa=_0x1522e3[0x1]?.[_0xe2cbd4(0x1d9)]();return _0x2940aa?{'alias':_0x2940aa,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x45f1a0,_0x56c8d3,_0x37532b){const _0x5d2cb8=a22_0x265ac7,_0x1f4cb8=_0x45f1a0[_0x5d2cb8(0x1d2)]&&typeof _0x45f1a0[_0x5d2cb8(0x1d2)]===_0x5d2cb8(0x1de)&&!Array['isArray'](_0x45f1a0[_0x5d2cb8(0x1d2)])?_0x45f1a0[_0x5d2cb8(0x1d2)]:{},_0x353854=_0x1f4cb8[_0x56c8d3]&&typeof _0x1f4cb8[_0x56c8d3]==='object'&&!Array[_0x5d2cb8(0x1b5)](_0x1f4cb8[_0x56c8d3])?_0x1f4cb8[_0x56c8d3]:{};_0x353854[_0x5d2cb8(0x1e6)]=_0x37532b,_0x1f4cb8[_0x56c8d3]=_0x353854,_0x45f1a0[_0x5d2cb8(0x1d2)]=_0x1f4cb8;}function deleteLocalAppAlias(_0x42ebf0,_0x4b335e){const _0x4e8285=a22_0x265ac7;if(!_0x42ebf0[_0x4e8285(0x1d2)]||typeof _0x42ebf0[_0x4e8285(0x1d2)]!==_0x4e8285(0x1de)||Array['isArray'](_0x42ebf0[_0x4e8285(0x1d2)]))return![];const _0x415f35=_0x42ebf0[_0x4e8285(0x1d2)],_0x5a99bc=_0x415f35[_0x4b335e['alias']];if(!_0x5a99bc||typeof _0x5a99bc!==_0x4e8285(0x1de)||Array[_0x4e8285(0x1b5)](_0x5a99bc))return![];if(!_0x4b335e[_0x4e8285(0x1f2)])return delete _0x415f35[_0x4b335e[_0x4e8285(0x1cd)]],!![];if(!(_0x4b335e['field']in _0x5a99bc))return![];return delete _0x5a99bc[_0x4b335e[_0x4e8285(0x1f2)]],Object[_0x4e8285(0x1d7)](_0x5a99bc)[_0x4e8285(0x1f1)]===0x0&&delete _0x415f35[_0x4b335e[_0x4e8285(0x1cd)]],!![];}const listDef={'service':'config','command':a22_0x265ac7(0x1af),'description':a22_0x265ac7(0x1b2),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x214f7f){const _0x3f69a9=a22_0x265ac7,{buildConfigFromFlags:_0x40a759}=await import(_0x3f69a9(0x1c7)),_0x48959b=_0x40a759({}),_0x1dbd78=getProjectConfigPath(),_0x336e55=resolveWriteConfigPath(_0x3f69a9(0x1c5));if(_0x214f7f[_0x3f69a9(0x1dc)]===_0x3f69a9(0x1bd))return{'ok':!![],'message':_0x3f69a9(0x1ce)+(JSON[_0x3f69a9(0x1cb)](_0x48959b['raw'],null,0x2)+'\x0a\x0a')+_0x3f69a9(0x1d5)+(_0x3f69a9(0x1cf)+(_0x1dbd78??_0x3f69a9(0x1b6))+'\x0a')+(_0x3f69a9(0x1b4)+_0x336e55)};return{'ok':!![],'data':{'effective':_0x48959b['raw'],'configFiles':{'project':_0x1dbd78??null,'global':_0x336e55}}};}},getDef={'service':a22_0x265ac7(0x1b0),'command':'get','description':a22_0x265ac7(0x1bb),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x4debe0){const _0x3cfa32=a22_0x265ac7,_0x2ad38b=_0x4debe0[_0x3cfa32(0x1be)][0x0];if(!_0x2ad38b)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x3cfa32(0x1ba)+CLI_BIN_NAME+_0x3cfa32(0x1e1));const {buildConfigFromFlags:_0x1fa29c}=await import(_0x3cfa32(0x1c7)),{raw:_0x3493e7}=_0x1fa29c({});if(_0x2ad38b[_0x3cfa32(0x1bc)]('.')){const _0x1e77f3=_0x2ad38b[_0x3cfa32(0x1c4)]('.');let _0x1ff714=_0x3493e7;for(const _0xb20023 of _0x1e77f3){if(_0x1ff714==null||typeof _0x1ff714!==_0x3cfa32(0x1de))throw CliErrors[_0x3cfa32(0x1c6)](_0x3cfa32(0x1dd)+_0x2ad38b);_0x1ff714=_0x1ff714[_0xb20023];}if(_0x1ff714===undefined)throw CliErrors[_0x3cfa32(0x1c6)](_0x3cfa32(0x1dd)+_0x2ad38b);return console[_0x3cfa32(0x1bf)](typeof _0x1ff714===_0x3cfa32(0x1de)?JSON['stringify'](_0x1ff714,null,0x2):String(_0x1ff714)),{'ok':!![]};}const _0x3d4971=_0x3493e7[_0x2ad38b];if(_0x3d4971===undefined)throw CliErrors[_0x3cfa32(0x1c6)](_0x3cfa32(0x1dd)+_0x2ad38b);return console[_0x3cfa32(0x1bf)](typeof _0x3d4971==='object'?JSON[_0x3cfa32(0x1cb)](_0x3d4971,null,0x2):String(_0x3d4971)),{'ok':!![]};}},setDef={'service':a22_0x265ac7(0x1b0),'command':a22_0x265ac7(0x1c0),'description':a22_0x265ac7(0x1e3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x265ac7(0x1b1),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x265ac7(0x1b9),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0xaba2f7){const _0x3c244c=a22_0x265ac7,_0x224252=_0xaba2f7[_0x3c244c(0x1be)][0x0],_0x404bb8=_0xaba2f7[_0x3c244c(0x1be)][0x1];if(!_0x224252||_0x404bb8===undefined)throw CliErrors[_0x3c244c(0x1c6)](_0x3c244c(0x1c9),_0x3c244c(0x1ba)+CLI_BIN_NAME+_0x3c244c(0x1e5));if(ENUM_KEYS[_0x224252]&&!ENUM_KEYS[_0x224252]['includes'](_0x404bb8))throw CliErrors['validation'](_0x3c244c(0x1ad)+_0x224252+_0x3c244c(0x1ed)+ENUM_KEYS[_0x224252][_0x3c244c(0x1eb)](',\x20'));if(_0x224252===_0x3c244c(0x1e2))throw CliErrors['validation'](_0x3c244c(0x1b3));if(_0x224252===_0x3c244c(0x1d4)){const _0xc43d42=Number(_0x404bb8);if(isNaN(_0xc43d42)||_0xc43d42<=0x0)throw CliErrors[_0x3c244c(0x1c6)](_0x3c244c(0x1ca));}const _0x957dee=resolveWriteScope({'explicitGlobal':_0xaba2f7[_0x3c244c(0x1d1)](_0x3c244c(0x1c5)),'policy':_0x3c244c(0x1d3)}),_0x55468e=toScopeFlags(_0x957dee),_0x37e8ee=readScopedConfig(_0x55468e),_0x3b437f=parseAliasAppcodeSetKey(_0x224252);if(!_0x3b437f&&!isTopLevelConfigKey(_0x224252))throw CliErrors[_0x3c244c(0x1c6)](_0x3c244c(0x1e9)+_0x224252+_0x3c244c(0x1e0),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x3c244c(0x1ec));return _0x3b437f?setLocalAppAlias(_0x37e8ee,_0x3b437f,_0x404bb8):_0x37e8ee[_0x224252]=_0x224252==='pageSize'?Number(_0x404bb8):_0x404bb8,console['log']('Set\x20`'+_0x224252+_0x3c244c(0x1c3)+_0x404bb8+'\x22'+(_0x957dee===_0x3c244c(0x1c5)?_0x3c244c(0x1c1):'')),writeScopedConfig(_0x37e8ee,_0x55468e),{'ok':!![]};}},deleteDef={'service':a22_0x265ac7(0x1b0),'command':a22_0x265ac7(0x1cc),'description':'Delete\x20a\x20config\x20value','risk':a22_0x265ac7(0x1b8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x265ac7(0x1b1),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0xcc8216){const _0x156836=a22_0x265ac7,_0x34e777=_0xcc8216[_0x156836(0x1be)][0x0];if(!_0x34e777)throw CliErrors[_0x156836(0x1c6)]('Missing\x20key\x20argument.',_0x156836(0x1ba)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x220c38=resolveWriteScope({'explicitGlobal':_0xcc8216[_0x156836(0x1d1)](_0x156836(0x1c5)),'policy':_0x156836(0x1d3)}),_0x5aaa70=toScopeFlags(_0x220c38),_0x2d6af5=readScopedConfig(_0x5aaa70),_0x1ee977=parseAliasDeleteKey(_0x34e777);if(_0x1ee977){if(!deleteLocalAppAlias(_0x2d6af5,_0x1ee977))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x34e777);return console[_0x156836(0x1bf)](_0x156836(0x1df)+_0x34e777+'`'+(_0x220c38===_0x156836(0x1c5)?_0x156836(0x1c1):'')),writeScopedConfig(_0x2d6af5,_0x5aaa70),{'ok':!![]};}if(_0x2d6af5[_0x34e777]===undefined)throw CliErrors[_0x156836(0x1c6)](_0x156836(0x1ef)+_0x34e777+_0x156836(0x1ae));return delete _0x2d6af5[_0x34e777],console[_0x156836(0x1bf)](_0x156836(0x1df)+_0x34e777+'`'+(_0x220c38===_0x156836(0x1c5)?_0x156836(0x1c1):'')),writeScopedConfig(_0x2d6af5,_0x5aaa70),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x40ee7a=a22_0x4461;(function(_0x43bc96,_0x2f1a24){const _0x70ffd2=a22_0x4461,_0x4ca900=_0x43bc96();while(!![]){try{const _0x58ec03=-parseInt(_0x70ffd2(0x1c2))/0x1+parseInt(_0x70ffd2(0x1f8))/0x2*(-parseInt(_0x70ffd2(0x1c9))/0x3)+parseInt(_0x70ffd2(0x1c7))/0x4+-parseInt(_0x70ffd2(0x1d0))/0x5*(parseInt(_0x70ffd2(0x1e6))/0x6)+-parseInt(_0x70ffd2(0x1e5))/0x7*(parseInt(_0x70ffd2(0x1f4))/0x8)+-parseInt(_0x70ffd2(0x1e7))/0x9+parseInt(_0x70ffd2(0x1c6))/0xa;if(_0x58ec03===_0x2f1a24)break;else _0x4ca900['push'](_0x4ca900['shift']());}catch(_0x2c4b23){_0x4ca900['push'](_0x4ca900['shift']());}}}(a22_0x26a7,0x7b92a));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_0x4461(_0x1f203d,_0x504dca){_0x1f203d=_0x1f203d-0x1bb;const _0x26a73a=a22_0x26a7();let _0x4461d3=_0x26a73a[_0x1f203d];return _0x4461d3;}const GLOBAL_FLAG={'name':a22_0x40ee7a(0x1de),'type':a22_0x40ee7a(0x1e9),'description':'Write\x20to\x20global\x20config','default':![]};function parseAliasAppcodeSetKey(_0x265f78){const _0x303483=a22_0x40ee7a,_0x273960=_0x265f78[_0x303483(0x1d8)]('.');if(_0x273960[_0x303483(0x1cc)]!==0x3||_0x273960[0x0]!==_0x303483(0x1bd)||_0x273960[0x2]!==_0x303483(0x1dc))return undefined;const _0x4d557a=_0x273960[0x1]?.[_0x303483(0x1e3)]();return _0x4d557a?_0x4d557a:undefined;}function parseAliasDeleteKey(_0x3d91d0){const _0x2a7479=a22_0x40ee7a,_0x518cd4=_0x3d91d0[_0x2a7479(0x1d8)]('.');if(_0x518cd4[_0x2a7479(0x1cc)]===0x2&&_0x518cd4[0x0]===_0x2a7479(0x1bd)){const _0x4ece35=_0x518cd4[0x1]?.[_0x2a7479(0x1e3)]();return _0x4ece35?{'alias':_0x4ece35}:undefined;}if(_0x518cd4[_0x2a7479(0x1cc)]===0x3&&_0x518cd4[0x0]==='apps'&&_0x518cd4[0x2]===_0x2a7479(0x1dc)){const _0x361ce8=_0x518cd4[0x1]?.[_0x2a7479(0x1e3)]();return _0x361ce8?{'alias':_0x361ce8,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x34300f,_0x598e3e,_0x15be07){const _0x2bd0d6=a22_0x40ee7a,_0x784aa=_0x34300f[_0x2bd0d6(0x1bd)]&&typeof _0x34300f[_0x2bd0d6(0x1bd)]==='object'&&!Array[_0x2bd0d6(0x1cf)](_0x34300f['apps'])?_0x34300f[_0x2bd0d6(0x1bd)]:{},_0x2f6420=_0x784aa[_0x598e3e]&&typeof _0x784aa[_0x598e3e]===_0x2bd0d6(0x1e2)&&!Array[_0x2bd0d6(0x1cf)](_0x784aa[_0x598e3e])?_0x784aa[_0x598e3e]:{};_0x2f6420[_0x2bd0d6(0x1dc)]=_0x15be07,_0x784aa[_0x598e3e]=_0x2f6420,_0x34300f[_0x2bd0d6(0x1bd)]=_0x784aa;}function deleteLocalAppAlias(_0x390690,_0x5779b2){const _0x4908d0=a22_0x40ee7a;if(!_0x390690['apps']||typeof _0x390690[_0x4908d0(0x1bd)]!==_0x4908d0(0x1e2)||Array[_0x4908d0(0x1cf)](_0x390690['apps']))return![];const _0x56633e=_0x390690[_0x4908d0(0x1bd)],_0x3feacd=_0x56633e[_0x5779b2[_0x4908d0(0x1dd)]];if(!_0x3feacd||typeof _0x3feacd!==_0x4908d0(0x1e2)||Array[_0x4908d0(0x1cf)](_0x3feacd))return![];if(!_0x5779b2[_0x4908d0(0x1d1)])return delete _0x56633e[_0x5779b2['alias']],!![];if(!(_0x5779b2['field']in _0x3feacd))return![];return delete _0x3feacd[_0x5779b2[_0x4908d0(0x1d1)]],Object[_0x4908d0(0x1ca)](_0x3feacd)[_0x4908d0(0x1cc)]===0x0&&delete _0x56633e[_0x5779b2[_0x4908d0(0x1dd)]],!![];}const listDef={'service':'config','command':a22_0x40ee7a(0x1c0),'description':a22_0x40ee7a(0x1c3),'risk':a22_0x40ee7a(0x1da),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x26e630){const _0x4b6d7e=a22_0x40ee7a,{buildConfigFromFlags:_0xd62030}=await import(_0x4b6d7e(0x1d6)),_0x3314bf=_0xd62030({}),_0x5f3515=getProjectConfigPath(),_0xbaa88e=resolveWriteConfigPath(_0x4b6d7e(0x1de));if(_0x26e630['format']==='pretty')return{'ok':!![],'message':_0x4b6d7e(0x1d3)+(JSON[_0x4b6d7e(0x1db)](_0x3314bf[_0x4b6d7e(0x1bc)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x4b6d7e(0x1e4)+(_0x5f3515??'(none)')+'\x0a')+(_0x4b6d7e(0x1bf)+_0xbaa88e)};return{'ok':!![],'data':{'effective':_0x3314bf[_0x4b6d7e(0x1bc)],'configFiles':{'project':_0x5f3515??null,'global':_0xbaa88e}}};}},getDef={'service':'config','command':a22_0x40ee7a(0x1d7),'description':a22_0x40ee7a(0x1c4),'risk':a22_0x40ee7a(0x1da),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x40ee7a(0x1ef),'description':a22_0x40ee7a(0x1f5),'required':!![]}],'flags':[],async 'execute'(_0x2c223c){const _0x961a1e=a22_0x40ee7a,_0xed713b=_0x2c223c['args'][0x0];if(!_0xed713b)throw CliErrors[_0x961a1e(0x1cd)](_0x961a1e(0x1be),_0x961a1e(0x1eb)+CLI_BIN_NAME+_0x961a1e(0x1ce));const {buildConfigFromFlags:_0x311230}=await import(_0x961a1e(0x1d6)),{raw:_0x253aae}=_0x311230({});if(_0xed713b[_0x961a1e(0x1f6)]('.')){const _0x4200f4=_0xed713b[_0x961a1e(0x1d8)]('.');let _0x434c72=_0x253aae;for(const _0x545327 of _0x4200f4){if(_0x434c72==null||typeof _0x434c72!=='object')throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0xed713b);_0x434c72=_0x434c72[_0x545327];}if(_0x434c72===undefined)throw CliErrors['validation'](_0x961a1e(0x1f0)+_0xed713b);return console[_0x961a1e(0x1ec)](typeof _0x434c72==='object'?JSON[_0x961a1e(0x1db)](_0x434c72,null,0x2):String(_0x434c72)),{'ok':!![]};}const _0x11ae4f=_0x253aae[_0xed713b];if(_0x11ae4f===undefined)throw CliErrors[_0x961a1e(0x1cd)]('Key\x20not\x20found:\x20'+_0xed713b);return console['log'](typeof _0x11ae4f===_0x961a1e(0x1e2)?JSON[_0x961a1e(0x1db)](_0x11ae4f,null,0x2):String(_0x11ae4f)),{'ok':!![]};}},setDef={'service':a22_0x40ee7a(0x1c1),'command':'set','description':'设置配置项的值','risk':a22_0x40ee7a(0x1bb),'confirmationDescription':a22_0x40ee7a(0x1e8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x40ee7a(0x1d5),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x5e286e){const _0x5b5a90=a22_0x40ee7a,_0x1c9cf8=_0x5e286e[_0x5b5a90(0x1df)][0x0],_0x48059e=_0x5e286e[_0x5b5a90(0x1df)][0x1];if(!_0x1c9cf8||_0x48059e===undefined)throw CliErrors[_0x5b5a90(0x1cd)](_0x5b5a90(0x1ed),_0x5b5a90(0x1eb)+CLI_BIN_NAME+_0x5b5a90(0x1ee));if(ENUM_KEYS[_0x1c9cf8]&&!ENUM_KEYS[_0x1c9cf8][_0x5b5a90(0x1f6)](_0x48059e))throw CliErrors[_0x5b5a90(0x1cd)]('Invalid\x20value\x20for\x20\x22'+_0x1c9cf8+_0x5b5a90(0x1f9)+ENUM_KEYS[_0x1c9cf8][_0x5b5a90(0x1ea)](',\x20'));if(_0x1c9cf8==='riskLevel')throw CliErrors[_0x5b5a90(0x1cd)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x1c9cf8===_0x5b5a90(0x1f2)){const _0x654191=Number(_0x48059e);if(isNaN(_0x654191)||_0x654191<=0x0)throw CliErrors[_0x5b5a90(0x1cd)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x5cf99f=resolveWriteScope({'explicitGlobal':_0x5e286e[_0x5b5a90(0x1e0)](_0x5b5a90(0x1de)),'policy':_0x5b5a90(0x1f7)}),_0x58e90e=toScopeFlags(_0x5cf99f),_0x1b51d1=readScopedConfig(_0x58e90e),_0x5a7ebf=parseAliasAppcodeSetKey(_0x1c9cf8);if(!_0x5a7ebf&&!isTopLevelConfigKey(_0x1c9cf8))throw CliErrors[_0x5b5a90(0x1cd)](_0x5b5a90(0x1f1)+_0x1c9cf8+'\x22\x20is\x20not\x20settable.',_0x5b5a90(0x1c8)+getTopLevelConfigKeySummary()+_0x5b5a90(0x1cb));return _0x5a7ebf?setLocalAppAlias(_0x1b51d1,_0x5a7ebf,_0x48059e):_0x1b51d1[_0x1c9cf8]=_0x1c9cf8==='pageSize'?Number(_0x48059e):_0x48059e,console[_0x5b5a90(0x1ec)](_0x5b5a90(0x1d2)+_0x1c9cf8+'`\x20=\x20\x22'+_0x48059e+'\x22'+(_0x5cf99f===_0x5b5a90(0x1de)?_0x5b5a90(0x1e1):'')),writeScopedConfig(_0x1b51d1,_0x58e90e),{'ok':!![]};}},deleteDef={'service':a22_0x40ee7a(0x1c1),'command':'delete','description':a22_0x40ee7a(0x1c5),'risk':a22_0x40ee7a(0x1bb),'confirmationDescription':'删除\x20Lovrabet\x20CLI\x20配置项;后续命令将改用其他配置层或默认值。','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x40ee7a(0x1ef),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x512ec2){const _0x20210f=a22_0x40ee7a,_0xa48a4a=_0x512ec2['args'][0x0];if(!_0xa48a4a)throw CliErrors['validation'](_0x20210f(0x1be),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x45b6cd=resolveWriteScope({'explicitGlobal':_0x512ec2[_0x20210f(0x1e0)](_0x20210f(0x1de)),'policy':_0x20210f(0x1f7)}),_0x3b81c8=toScopeFlags(_0x45b6cd),_0x4a2b3d=readScopedConfig(_0x3b81c8),_0x3ecd65=parseAliasDeleteKey(_0xa48a4a);if(_0x3ecd65){if(!deleteLocalAppAlias(_0x4a2b3d,_0x3ecd65))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0xa48a4a);return console[_0x20210f(0x1ec)](_0x20210f(0x1f3)+_0xa48a4a+'`'+(_0x45b6cd===_0x20210f(0x1de)?_0x20210f(0x1e1):'')),writeScopedConfig(_0x4a2b3d,_0x3b81c8),{'ok':!![]};}if(_0x4a2b3d[_0xa48a4a]===undefined)throw CliErrors[_0x20210f(0x1cd)](_0x20210f(0x1d4)+_0xa48a4a+_0x20210f(0x1d9));return delete _0x4a2b3d[_0xa48a4a],console['log']('Deleted\x20`'+_0xa48a4a+'`'+(_0x45b6cd===_0x20210f(0x1de)?_0x20210f(0x1e1):'')),writeScopedConfig(_0x4a2b3d,_0x3b81c8),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];function a22_0x26a7(){const _0x49a755=['validation','\x20config\x20get\x20<key>','isArray','66155ESjgWz','field','Set\x20`','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Key\x20\x22','value','../../context.js','get','split','\x22\x20not\x20found\x20at\x20top\x20level.','read','stringify','appcode','alias','global','args','bool','\x20(global)','object','trim','\x20\x20project:\x20','7RSMLrk','198klgThK','496098mgXJVj','修改\x20Lovrabet\x20CLI\x20配置;该变更可能影响后续命令使用的应用、环境或输出行为。','boolean','join','Usage:\x20','log','Missing\x20key\x20or\x20value.','\x20config\x20set\x20<key>\x20<value>\x20[--global]','key','Key\x20not\x20found:\x20','Top-level\x20key\x20\x22','pageSize','Deleted\x20`','4256352ImYGhn','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','includes','project-or-global-explicit','4LdQkkn','\x22.\x20Allowed:\x20','write','raw','apps','Missing\x20key\x20argument.','\x20\x20global:\x20\x20','list','config','708759rbVOLQ','List\x20current\x20config','Get\x20a\x20config\x20value','删除配置项的值','25706770cHFWDJ','2701676itACWI','Settable\x20keys:\x20','1511091wMHktT','keys',';\x20apps.<alias>.appcode','length'];a22_0x26a7=function(){return _0x49a755;};return a22_0x26a7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e56c0,_0x4ef1d7){var _0x142668=a23_0x518b,_0x25a977=_0x3e56c0();while(!![]){try{var _0x34ebb5=-parseInt(_0x142668(0xe2))/0x1+-parseInt(_0x142668(0xe9))/0x2*(-parseInt(_0x142668(0xe1))/0x3)+-parseInt(_0x142668(0xe6))/0x4*(parseInt(_0x142668(0xe4))/0x5)+parseInt(_0x142668(0xe3))/0x6*(parseInt(_0x142668(0xe8))/0x7)+parseInt(_0x142668(0xea))/0x8+-parseInt(_0x142668(0xe7))/0x9+-parseInt(_0x142668(0xe5))/0xa;if(_0x34ebb5===_0x4ef1d7)break;else _0x25a977['push'](_0x25a977['shift']());}catch(_0x450c84){_0x25a977['push'](_0x25a977['shift']());}}}(a23_0x353e,0x8e9ac));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a23_0x353e(){var _0x53c2cf=['204093rZezAV','562291GNpnDl','6773646YcJOCR','131195dWaKic','2961260XcINjB','20Nlujmt','269334nRTrjs','7VlyRpt','2fgkReA','3253392gnkjcj'];a23_0x353e=function(){return _0x53c2cf;};return a23_0x353e();}function a23_0x518b(_0x3f1fe9,_0x2eca61){_0x3f1fe9=_0x3f1fe9-0xe1;var _0x353e04=a23_0x353e();var _0x518b21=_0x353e04[_0x3f1fe9];return _0x518b21;}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_0x195886=a24_0x461b;(function(_0x22985f,_0x35dddd){const _0x4ee428=a24_0x461b,_0x1bd3ab=_0x22985f();while(!![]){try{const _0x4e5a85=parseInt(_0x4ee428(0x190))/0x1*(-parseInt(_0x4ee428(0x171))/0x2)+parseInt(_0x4ee428(0x173))/0x3*(-parseInt(_0x4ee428(0x191))/0x4)+-parseInt(_0x4ee428(0x197))/0x5*(-parseInt(_0x4ee428(0x18c))/0x6)+parseInt(_0x4ee428(0x172))/0x7*(-parseInt(_0x4ee428(0x158))/0x8)+-parseInt(_0x4ee428(0x167))/0x9+parseInt(_0x4ee428(0x16f))/0xa*(-parseInt(_0x4ee428(0x18f))/0xb)+-parseInt(_0x4ee428(0x193))/0xc*(-parseInt(_0x4ee428(0x19b))/0xd);if(_0x4e5a85===_0x35dddd)break;else _0x1bd3ab['push'](_0x1bd3ab['shift']());}catch(_0x9986bb){_0x1bd3ab['push'](_0x1bd3ab['shift']());}}}(a24_0x3eda,0x35bc7));import{executeData}from'../../core/sdk-client.js';function a24_0x3eda(){const _0x1ff55d=['JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','length','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\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\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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','paramsRequired','Get\x20a\x20single\x20record\x20by\x20ID','\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\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','now','operation','batch','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','helpExtra','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','385272xPlmdd','create','join','command','delete','\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]}}','Preview:\x20data\x20','\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}}]','\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$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}}','read','\x20\x20WHERE\x20OPERATORS','update','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','1598346PCkfaW','\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\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\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\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','20YPvPIx','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','214414hxVJoW','49SEIhkS','29229neEVwj','\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}}','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','batchCreate','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\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$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','map','\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}','dryRun','\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','/api/{appCode}/','\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}','\x20completed\x20in\x20','\x20on\x20dataset\x20','Update\x20an\x20existing\x20record','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','risk','code','description','10926TJkWST','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','build','1840113JbhYkj','3mGzdkf','48qycMNv','high-risk-write','492504fFeGOx','body','filter','\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}]','985LYuoaL','data','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','params','364ReySRY','str','paramsHint','\x20\x20PAGINATION','write'];a24_0x3eda=function(){return _0x1ff55d;};return a24_0x3eda();}import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';function a24_0x461b(_0x27f733,_0x40858a){_0x27f733=_0x27f733-0x144;const _0x3edab9=a24_0x3eda();let _0x461b94=_0x3edab9[_0x27f733];return _0x461b94;}import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0x195886(0x195),'operation':a24_0x195886(0x195),'risk':a24_0x195886(0x162),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a24_0x195886(0x152)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a24_0x195886(0x163),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}',a24_0x195886(0x183),a24_0x195886(0x161),a24_0x195886(0x160),'\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_0x195886(0x17b),a24_0x195886(0x15d),'\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_0x195886(0x168),a24_0x195886(0x174),'','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}',a24_0x195886(0x14e),'',a24_0x195886(0x147),a24_0x195886(0x178),a24_0x195886(0x17a),a24_0x195886(0x196),a24_0x195886(0x157),a24_0x195886(0x154),'',a24_0x195886(0x19e),a24_0x195886(0x16e),a24_0x195886(0x14c),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a24_0x195886(0x16b),a24_0x195886(0x181),a24_0x195886(0x179),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a24_0x195886(0x15a)]('\x0a')},{'command':'getOne','operation':'getOne','risk':'read','paramsRequired':!![],'description':a24_0x195886(0x14b),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x195886(0x159),'operation':a24_0x195886(0x159),'risk':'write','paramsRequired':!![],'description':a24_0x195886(0x17c),'paramsHint':a24_0x195886(0x188)},{'command':a24_0x195886(0x177),'operation':a24_0x195886(0x177),'risk':a24_0x195886(0x19f),'paramsRequired':!![],'description':a24_0x195886(0x17d),'paramsHint':a24_0x195886(0x14d)},{'command':a24_0x195886(0x164),'operation':a24_0x195886(0x164),'risk':a24_0x195886(0x19f),'paramsRequired':!![],'description':a24_0x195886(0x187),'paramsHint':a24_0x195886(0x1a0)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':a24_0x195886(0x15c),'operation':a24_0x195886(0x15c),'risk':a24_0x195886(0x192),'paramsRequired':!![],'description':a24_0x195886(0x199),'paramsHint':a24_0x195886(0x16c)},{'command':'aggregate','operation':'aggregate','risk':'read','paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a24_0x195886(0x148)+a24_0x195886(0x175),'helpExtra':[a24_0x195886(0x165),a24_0x195886(0x16d),a24_0x195886(0x145),a24_0x195886(0x184),a24_0x195886(0x176),a24_0x195886(0x17f),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a24_0x195886(0x16a),a24_0x195886(0x146),a24_0x195886(0x18d),a24_0x195886(0x156),a24_0x195886(0x166),a24_0x195886(0x15f),a24_0x195886(0x169),'','\x20\x20EXAMPLES','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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_0x195886(0x170),a24_0x195886(0x149),'',a24_0x195886(0x153)][a24_0x195886(0x15a)]('\x0a')}];function makeDataCommand(_0x1a8f3d){const _0x52294d=a24_0x195886,_0x38bb6e='data\x20'+_0x1a8f3d['command'],_0x1f0132={'service':_0x52294d(0x198),'command':_0x1a8f3d[_0x52294d(0x15b)],'description':_0x1a8f3d[_0x52294d(0x18b)],'risk':_0x1a8f3d[_0x52294d(0x189)],'helpExtra':_0x1a8f3d[_0x52294d(0x155)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x1a8f3d[_0x52294d(0x19d)]}],'validate':async _0x4891f5=>{const _0x463cb2=_0x52294d;_0x1a8f3d[_0x463cb2(0x14a)]&&requireAnyOf(_0x4891f5,[_0x463cb2(0x19a)],_0x38bb6e),_0x1a8f3d[_0x463cb2(0x150)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4891f5['str']('params'))),_0x1a8f3d[_0x463cb2(0x150)]===_0x463cb2(0x164)&&parseUpdateIdsFromParams(parseJsonParams(_0x4891f5[_0x463cb2(0x19c)](_0x463cb2(0x19a)))??{});},async 'execute'(_0xf11e42){const _0x2c1273=_0x52294d,_0x1e939f=_0xf11e42[_0x2c1273(0x19c)](_0x2c1273(0x18a)),_0x151911=_0x1a8f3d[_0x2c1273(0x150)]===_0x2c1273(0x177)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xf11e42['str']('params'))):parseJsonParams(_0xf11e42[_0x2c1273(0x19c)]('params'))??{},_0x580093=_0x1a8f3d[_0x2c1273(0x150)]===_0x2c1273(0x164)?parseUpdateIdsFromParams(_0x151911):undefined,_0x46aa83=_0x580093?normalizeUpdateParamsForRuntime(_0x151911,_0x580093):_0x151911,_0x3d66a1=Date[_0x2c1273(0x14f)](),_0x7ea95b=await executeData(_0x1e939f,_0x1a8f3d[_0x2c1273(0x150)],_0x46aa83),_0x5a39eb=Date[_0x2c1273(0x14f)]()-_0x3d66a1,_0x4b31dd=_0x580093&&_0x580093['length']>0x1?buildBatchUpdateResult(_0x580093,_0x7ea95b):_0x7ea95b;return{'ok':!![],'data':{'result':_0x4b31dd,'elapsed':_0x5a39eb},'message':'data\x20'+_0x1a8f3d[_0x2c1273(0x15b)]+_0x2c1273(0x185)+_0x5a39eb+'ms'};}};return _0x1a8f3d[_0x52294d(0x189)]!==_0x52294d(0x162)&&(_0x1f0132[_0x52294d(0x180)]=async _0x37df0d=>{const _0x5ae99d=_0x52294d,_0x569a2b=_0x37df0d[_0x5ae99d(0x19c)]('code'),_0x43bc65=_0x1a8f3d['operation']===_0x5ae99d(0x177)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x37df0d['str']('params'))):parseJsonParams(_0x37df0d['str'](_0x5ae99d(0x19a)))??{};let _0x43068a=_0x43bc65;if(_0x1a8f3d['operation']==='update'){const _0x30a2a9=parseUpdateIdsFromParams(_0x43bc65);_0x43068a=normalizeUpdateParamsForRuntime(_0x43bc65,_0x30a2a9);}return dryRun('POST',_0x5ae99d(0x182)+_0x569a2b+'/'+_0x1a8f3d[_0x5ae99d(0x150)])[_0x5ae99d(0x194)](_0x43068a)[_0x5ae99d(0x18b)](_0x5ae99d(0x15e)+_0x1a8f3d['command']+_0x5ae99d(0x186)+_0x569a2b)[_0x5ae99d(0x18e)]();}),_0x1f0132;}export const dataDefinitions=specs[a24_0x195886(0x17e)](makeDataCommand);function buildBatchUpdateResult(_0x2fd715,_0x5560de){const _0x19e1c6=a24_0x195886;return{'operation':_0x19e1c6(0x164),'mode':_0x19e1c6(0x151),'ids':_0x2fd715,'total':_0x2fd715[_0x19e1c6(0x144)],'result':_0x5560de};}
|
|
1
|
+
const a24_0x3825a0=a24_0x40d6;(function(_0x5095b3,_0x1de9d5){const _0x28d565=a24_0x40d6,_0x4dc3ed=_0x5095b3();while(!![]){try{const _0x1bef24=parseInt(_0x28d565(0x1eb))/0x1*(-parseInt(_0x28d565(0x1f4))/0x2)+parseInt(_0x28d565(0x1de))/0x3+-parseInt(_0x28d565(0x1e3))/0x4*(-parseInt(_0x28d565(0x1f9))/0x5)+parseInt(_0x28d565(0x1d9))/0x6+parseInt(_0x28d565(0x1bb))/0x7+parseInt(_0x28d565(0x1f2))/0x8+-parseInt(_0x28d565(0x1f8))/0x9*(parseInt(_0x28d565(0x1fe))/0xa);if(_0x1bef24===_0x1de9d5)break;else _0x4dc3ed['push'](_0x4dc3ed['shift']());}catch(_0xe969a0){_0x4dc3ed['push'](_0x4dc3ed['shift']());}}}(a24_0x5c05,0xe3808));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';function a24_0x5c05(){const _0x2ef337=['\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}','map','387uuSSdc','365GrDdfu','confirmationDescription','data\x20','operation','\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]}}','1194060HgbvZj','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\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}}]}','getOne','向当前应用的数据集写入一条新业务记录;确认后将立即保存。','\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}}','str','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','在数据集中创建一条记录','command','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','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.','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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}}]}','delete','\x20completed\x20in\x20','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','update','修改当前应用数据集中的已有业务记录;确认后新值将立即保存。','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','create','paramsHint','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','删除数据记录(非交互模式需传入\x20--yes)','9763943RidcQT','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20on\x20dataset\x20','\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}','向当前应用的数据集批量写入多条新业务记录;确认后将立即保存。','batch','\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\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20\x20\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}}]','\x20\x20PARAMS\x20STRUCTURE','write','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\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\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\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20EXAMPLES','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\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}','paramsRequired','read','helpExtra','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','code','通过一次请求在数据集中批量创建多条记录','POST','Preview:\x20data\x20','\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}}','7060728TrTdIl','删除当前应用数据集中的业务记录;该操作可能无法恢复。','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\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}}','2765205NxFila','data','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','45380XNbKCK','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20AGGREGATE\x20TYPES','risk','\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}}','batchCreate','1qdfJmz','now','\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}}','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','description','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','更新已有数据记录','14831224jYKDdL','filter','218308JrgCfN','join'];a24_0x5c05=function(){return _0x2ef337;};return a24_0x5c05();}const specs=[{'command':'filter','operation':a24_0x3825a0(0x1f3),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a24_0x3825a0(0x1b9),'helpExtra':[a24_0x3825a0(0x1ff),a24_0x3825a0(0x1d8),a24_0x3825a0(0x1c9),a24_0x3825a0(0x1dd),a24_0x3825a0(0x205),'\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_0x3825a0(0x1e9),a24_0x3825a0(0x1fd),a24_0x3825a0(0x1ed),a24_0x3825a0(0x1b6),a24_0x3825a0(0x1af),'',a24_0x3825a0(0x1e5),a24_0x3825a0(0x202),a24_0x3825a0(0x1b0),'',a24_0x3825a0(0x1dc),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a24_0x3825a0(0x20a),a24_0x3825a0(0x201),a24_0x3825a0(0x1c7),'','\x20\x20PAGINATION',a24_0x3825a0(0x1e6),a24_0x3825a0(0x1ad),a24_0x3825a0(0x200),a24_0x3825a0(0x1c2),a24_0x3825a0(0x1e1),a24_0x3825a0(0x1d3),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a24_0x3825a0(0x1f5)]('\x0a')},{'command':a24_0x3825a0(0x203),'operation':'getOne','risk':'read','paramsRequired':!![],'description':a24_0x3825a0(0x1e0),'paramsHint':a24_0x3825a0(0x1b3)},{'command':a24_0x3825a0(0x1b7),'operation':a24_0x3825a0(0x1b7),'risk':a24_0x3825a0(0x1c6),'paramsRequired':!![],'description':a24_0x3825a0(0x208),'confirmationDescription':a24_0x3825a0(0x204),'paramsHint':a24_0x3825a0(0x1ca)},{'command':a24_0x3825a0(0x1ea),'operation':a24_0x3825a0(0x1ea),'risk':'write','paramsRequired':!![],'description':a24_0x3825a0(0x1d5),'confirmationDescription':a24_0x3825a0(0x1bf),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a24_0x3825a0(0x1b4),'operation':a24_0x3825a0(0x1b4),'risk':a24_0x3825a0(0x1c6),'paramsRequired':!![],'description':a24_0x3825a0(0x1f1),'confirmationDescription':a24_0x3825a0(0x1b5),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20'+a24_0x3825a0(0x1db)},{'command':a24_0x3825a0(0x1b1),'operation':a24_0x3825a0(0x1b1),'risk':'high-risk-write','paramsRequired':!![],'description':a24_0x3825a0(0x1ba),'confirmationDescription':a24_0x3825a0(0x1da),'paramsHint':a24_0x3825a0(0x1b3)},{'command':'aggregate','operation':a24_0x3825a0(0x1d2),'risk':a24_0x3825a0(0x1d0),'paramsRequired':![],'description':a24_0x3825a0(0x1ee),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a24_0x3825a0(0x207),'helpExtra':[a24_0x3825a0(0x1e7),a24_0x3825a0(0x1c1),a24_0x3825a0(0x1be),a24_0x3825a0(0x1f6),a24_0x3825a0(0x1cd),'\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_0x3825a0(0x1ce),'\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a24_0x3825a0(0x1c5),a24_0x3825a0(0x1e2),a24_0x3825a0(0x1bc),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)',a24_0x3825a0(0x1e4),a24_0x3825a0(0x1c4),a24_0x3825a0(0x1c8),'',a24_0x3825a0(0x1cc),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a24_0x3825a0(0x1cb),'',a24_0x3825a0(0x1ae),a24_0x3825a0(0x1c3),'',a24_0x3825a0(0x1f0)][a24_0x3825a0(0x1f5)]('\x0a')}];function makeDataCommand(_0x392016){const _0x1701e4=a24_0x3825a0,_0x5defc1=_0x1701e4(0x1fb)+_0x392016[_0x1701e4(0x209)],_0x40a94e={'service':_0x1701e4(0x1df),'command':_0x392016[_0x1701e4(0x209)],'description':_0x392016[_0x1701e4(0x1ef)],'risk':_0x392016[_0x1701e4(0x1e8)],..._0x392016[_0x1701e4(0x1fa)]?{'confirmationDescription':_0x392016['confirmationDescription']}:{},'helpExtra':_0x392016[_0x1701e4(0x1d1)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x392016[_0x1701e4(0x1b8)]}],'validate':async _0x30efef=>{const _0x47ca9b=_0x1701e4;_0x392016[_0x47ca9b(0x1cf)]&&requireAnyOf(_0x30efef,['params'],_0x5defc1),_0x392016['operation']===_0x47ca9b(0x1ea)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x30efef[_0x47ca9b(0x206)](_0x47ca9b(0x20b)))),_0x392016[_0x47ca9b(0x1fc)]===_0x47ca9b(0x1b4)&&parseUpdateIdsFromParams(parseJsonParams(_0x30efef[_0x47ca9b(0x206)](_0x47ca9b(0x20b)))??{});},async 'execute'(_0x410573){const _0xe11405=_0x1701e4,_0x5b27eb=_0x410573[_0xe11405(0x206)](_0xe11405(0x1d4)),_0x2ef409=_0x392016[_0xe11405(0x1fc)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x410573[_0xe11405(0x206)](_0xe11405(0x20b)))):parseJsonParams(_0x410573[_0xe11405(0x206)](_0xe11405(0x20b)))??{},_0x514460=_0x392016[_0xe11405(0x1fc)]==='update'?parseUpdateIdsFromParams(_0x2ef409):undefined,_0x403143=_0x514460?normalizeUpdateParamsForRuntime(_0x2ef409,_0x514460):_0x2ef409,_0x4b08d2=Date[_0xe11405(0x1ec)](),_0x4fc278=await executeData(_0x5b27eb,_0x392016['operation'],_0x403143),_0x43db46=Date[_0xe11405(0x1ec)]()-_0x4b08d2,_0x162cc7=_0x514460&&_0x514460['length']>0x1?buildBatchUpdateResult(_0x514460,_0x4fc278):_0x4fc278;return{'ok':!![],'data':{'result':_0x162cc7,'elapsed':_0x43db46},'message':_0xe11405(0x1fb)+_0x392016[_0xe11405(0x209)]+_0xe11405(0x1b2)+_0x43db46+'ms'};}};return _0x392016[_0x1701e4(0x1e8)]!=='read'&&(_0x40a94e['dryRun']=async _0x3b6849=>{const _0x1ce58b=_0x1701e4,_0x5a5279=_0x3b6849[_0x1ce58b(0x206)](_0x1ce58b(0x1d4)),_0x492c4d=_0x392016['operation']===_0x1ce58b(0x1ea)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3b6849[_0x1ce58b(0x206)](_0x1ce58b(0x20b)))):parseJsonParams(_0x3b6849['str'](_0x1ce58b(0x20b)))??{};let _0x35f2d3=_0x492c4d;if(_0x392016[_0x1ce58b(0x1fc)]===_0x1ce58b(0x1b4)){const _0x101826=parseUpdateIdsFromParams(_0x492c4d);_0x35f2d3=normalizeUpdateParamsForRuntime(_0x492c4d,_0x101826);}return dryRun(_0x1ce58b(0x1d6),'/api/{appCode}/'+_0x5a5279+'/'+_0x392016[_0x1ce58b(0x1fc)])['body'](_0x35f2d3)[_0x1ce58b(0x1ef)](_0x1ce58b(0x1d7)+_0x392016[_0x1ce58b(0x209)]+_0x1ce58b(0x1bd)+_0x5a5279)['build']();}),_0x40a94e;}export const dataDefinitions=specs[a24_0x3825a0(0x1f7)](makeDataCommand);function a24_0x40d6(_0xbe9afe,_0x40a1b5){_0xbe9afe=_0xbe9afe-0x1ad;const _0x5c0542=a24_0x5c05();let _0x40d6cc=_0x5c0542[_0xbe9afe];return _0x40d6cc;}function buildBatchUpdateResult(_0x57f864,_0x234509){const _0x3c87f9=a24_0x3825a0;return{'operation':_0x3c87f9(0x1b4),'mode':_0x3c87f9(0x1c0),'ids':_0x57f864,'total':_0x57f864['length'],'result':_0x234509};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0xb7f40f=a25_0x3219;(function(_0x542084,_0x589992){const _0xa0e90=a25_0x3219,_0x5306d4=_0x542084();while(!![]){try{const _0x1fb847=-parseInt(_0xa0e90(0xbf))/0x1*(-parseInt(_0xa0e90(0xdf))/0x2)+parseInt(_0xa0e90(0xcd))/0x3+parseInt(_0xa0e90(0xae))/0x4*(-parseInt(_0xa0e90(0xb8))/0x5)+parseInt(_0xa0e90(0xe1))/0x6*(parseInt(_0xa0e90(0xda))/0x7)+parseInt(_0xa0e90(0xe2))/0x8+parseInt(_0xa0e90(0xaf))/0x9+parseInt(_0xa0e90(0xe7))/0xa*(-parseInt(_0xa0e90(0xb5))/0xb);if(_0x1fb847===_0x589992)break;else _0x5306d4['push'](_0x5306d4['shift']());}catch(_0x2a0eda){_0x5306d4['push'](_0x5306d4['shift']());}}}(a25_0xdfa6,0x992db));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a25_0xdfa6(){const _0x40b00c=['description','string','filter','creatorIdField','formatRules','responseBody','trim','str','beforeScriptId','required','tableComment','dataType','44mVSSnU','10011843EItAyK','indexes','method','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','creatorNameField','columnCodeListWithDeleted','16223075wvvegq','dbType','afterScriptId','404205jFzwyZ','name','options','doVersion','validateRules','dataset','dblinkInfoDTO','126xMNzFo','dbName','operations','createTimeField','push','tableName','type','extend','updateTimeField','modifierNameField','dbId','relations','map','doType','369381BmQgPh','requestFields','read','appCode','responseFields','find','labelField','code','host','properties','modelCode','requestBody','path','1617644fuMDdY','displayName','deleted','allFields','split','766uxtdgT','pkField','30DiiCph','4417784LgkHhU','object','title','fields','dbtableConfig','10ZvYkHp','length','isArray','parse'];a25_0xdfa6=function(){return _0x40b00c;};return a25_0xdfa6();}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x11138e){const _0x47e88e=a25_0x3219;if(_0x11138e['deleted'])return null;const _0x46e84b=Boolean(_0x11138e[_0x47e88e(0xdb)]!==undefined||_0x11138e['doType']!==undefined);let _0x533660={};if(!_0x46e84b&&typeof _0x11138e[_0x47e88e(0xc6)]==='string')try{_0x533660=JSON[_0x47e88e(0xa1)](_0x11138e[_0x47e88e(0xc6)]);}catch{}const _0x1b4e04=_0x46e84b?_0x11138e[_0x47e88e(0xb9)]:_0x11138e['code'],_0x2c8a1e=_0x46e84b?_0x11138e['displayName']:_0x11138e[_0x47e88e(0xb9)],_0x6f0cea=_0x46e84b?_0x11138e[_0x47e88e(0xcc)]:_0x11138e[_0x47e88e(0xc5)]||_0x11138e[_0x47e88e(0xad)],_0x1b47dc=_0x46e84b?_0x11138e['pkField']===!![]:_0x533660['pkField']===!![],_0xc5f474=_0x46e84b?_0x11138e[_0x47e88e(0xab)]===!![]:_0x533660[_0x47e88e(0xab)]===!![],_0x5b0f7a=_0x46e84b?_0x11138e[_0x47e88e(0xba)]??null:_0x533660['options']??null,_0xe07b37={'name':_0x1b4e04,'displayName':_0x2c8a1e||_0x1b4e04,'type':_0x6f0cea,'dbType':_0x11138e[_0x47e88e(0xb6)],'pk':_0x1b47dc,'required':_0xc5f474,'description':_0x11138e['description']||undefined};return Array[_0x47e88e(0xa0)](_0x5b0f7a)&&_0x5b0f7a[_0x47e88e(0x9f)]>0x0&&(_0xe07b37[_0x47e88e(0xba)]=_0x5b0f7a),_0xe07b37;}function a25_0x3219(_0x5aafac,_0x32ce7a){_0x5aafac=_0x5aafac-0x9f;const _0xdfa622=a25_0xdfa6();let _0x3219c9=_0xdfa622[_0x5aafac];return _0x3219c9;}function parseJsonMaybe(_0x219362){const _0x2718f9=a25_0x3219;if(typeof _0x219362!=='string')return _0x219362;try{return JSON[_0x2718f9(0xa1)](_0x219362);}catch{return _0x219362;}}function normalizeOperationEntry(_0x14eec3,_0x273553){const _0x22f374=a25_0x3219;if(!_0x273553||typeof _0x273553!==_0x22f374(0xe3))return null;if(!_0x273553[_0x22f374(0xb1)]||!_0x273553[_0x22f374(0xd9)])return null;const _0x4a755b={'name':_0x14eec3,'method':_0x273553[_0x22f374(0xb1)],'path':_0x273553['path']};if(_0x273553[_0x22f374(0xd5)])_0x4a755b[_0x22f374(0xd5)]=_0x273553[_0x22f374(0xd5)];if(_0x273553[_0x22f374(0xd8)]!=null)_0x4a755b[_0x22f374(0xd8)]=parseJsonMaybe(_0x273553[_0x22f374(0xd8)]);if(_0x273553[_0x22f374(0xa7)]!=null)_0x4a755b[_0x22f374(0xa7)]=parseJsonMaybe(_0x273553[_0x22f374(0xa7)]);if(_0x273553[_0x22f374(0xaa)]!=null)_0x4a755b[_0x22f374(0xaa)]=_0x273553[_0x22f374(0xaa)];if(_0x273553[_0x22f374(0xb7)]!=null)_0x4a755b['afterScriptId']=_0x273553['afterScriptId'];if(Array[_0x22f374(0xa0)](_0x273553[_0x22f374(0xce)]))_0x4a755b[_0x22f374(0xce)]=_0x273553[_0x22f374(0xce)];if(Array[_0x22f374(0xa0)](_0x273553[_0x22f374(0xd1)]))_0x4a755b[_0x22f374(0xd1)]=_0x273553[_0x22f374(0xd1)];return _0x4a755b;}function summarizeDbtable(_0x2546b7){const _0x1c70f6=a25_0x3219,_0x15a0b3={},_0x27fac8=[_0x1c70f6(0xc9),_0x1c70f6(0xc0),'tableName','datasetKey',_0x1c70f6(0xe0),_0x1c70f6(0xdd),'logicField',_0x1c70f6(0xc2),_0x1c70f6(0xc7),_0x1c70f6(0xa5),_0x1c70f6(0xb3),'modifierIdField',_0x1c70f6(0xc8),_0x1c70f6(0xd3),_0x1c70f6(0xbe)];for(const _0x42c6dd of _0x27fac8){if(_0x2546b7[_0x42c6dd]!==undefined)_0x15a0b3[_0x42c6dd]=_0x2546b7[_0x42c6dd];}return typeof _0x15a0b3[_0x1c70f6(0xdd)]===_0x1c70f6(0xa3)&&_0x15a0b3['allFields']['length']>0x0&&(_0x15a0b3['allFieldNames']=_0x15a0b3[_0x1c70f6(0xdd)][_0x1c70f6(0xde)](',')[_0x1c70f6(0xcb)](_0x261848=>_0x261848[_0x1c70f6(0xa8)]())[_0x1c70f6(0xa4)](Boolean)),_0x15a0b3;}function normalizeRelatedPages(_0x3748fa){const _0x24eac7=a25_0x3219;if(!Array['isArray'](_0x3748fa))return[];return _0x3748fa[_0x24eac7(0xa4)](_0x586c57=>_0x586c57&&typeof _0x586c57==='object')[_0x24eac7(0xcb)](_0x1eaa37=>({'id':_0x1eaa37['id'],'type':_0x1eaa37[_0x24eac7(0xc5)],'code':_0x1eaa37[_0x24eac7(0xd4)],'title':_0x1eaa37[_0x24eac7(0xe4)],'deleted':_0x1eaa37[_0x24eac7(0xdc)]===!![]}));}function normalizeFallbackFieldName(_0x31a066,_0x1ed6c3){const _0x29aaeb=a25_0x3219,_0x454d8f=_0x31a066[_0x29aaeb(0xa8)]();if(!_0x454d8f)return null;return{'name':_0x454d8f,'displayName':_0x454d8f,'type':undefined,'dbType':undefined,'pk':_0x454d8f===_0x1ed6c3,'required':![],'description':undefined};}async function loadListFieldFallback(_0x311efb,_0x35afb9){const _0x7716fe=a25_0x3219;if(!_0x311efb||!_0x35afb9)return[];try{const _0x7675e2=await listDatasets(_0x311efb,{'code':_0x35afb9}),_0x141198=_0x7675e2[_0x7716fe(0xd2)](_0x30dcee=>_0x30dcee[_0x7716fe(0xd4)]===_0x35afb9)??_0x7675e2[0x0],_0x54d904=_0x141198?.[_0x7716fe(0xe6)]??{},_0x4d5062=typeof _0x54d904[_0x7716fe(0xdd)]===_0x7716fe(0xa3)?_0x54d904[_0x7716fe(0xdd)][_0x7716fe(0xde)](','):[];return _0x4d5062[_0x7716fe(0xcb)](_0x10dca1=>normalizeFallbackFieldName(_0x10dca1,_0x54d904[_0x7716fe(0xe0)]))[_0x7716fe(0xa4)](_0x303702=>_0x303702!==null);}catch{return[];}}export const datasetDetail={'service':a25_0xb7f40f(0xbd),'command':'detail','description':a25_0xb7f40f(0xb2),'risk':a25_0xb7f40f(0xcf),'flags':[CODE_FLAG],async 'execute'(_0x253330){const _0x1c15ff=a25_0xb7f40f,_0x31427b=await getDatasetDetail(_0x253330[_0x1c15ff(0xa9)](_0x1c15ff(0xd4))),_0xcccc45=Array[_0x1c15ff(0xa0)](_0x31427b[_0x1c15ff(0xe5)])?_0x31427b['fields']:Array['isArray'](_0x31427b['properties'])?_0x31427b[_0x1c15ff(0xd6)]:[];let _0x23035b=_0xcccc45[_0x1c15ff(0xcb)](_0x2075bc=>normalizeField(_0x2075bc))[_0x1c15ff(0xa4)](_0x5a12cf=>_0x5a12cf!==null);_0x23035b[_0x1c15ff(0x9f)]===0x0&&(_0x23035b=await loadListFieldFallback(_0x253330[_0x1c15ff(0xd0)],_0x253330[_0x1c15ff(0xa9)]('code')));const _0x476b62=_0x31427b[_0x1c15ff(0xc1)]??{},_0x319fe9=[];for(const [_0x4b959d,_0x2b32f6]of Object['entries'](_0x476b62)){const _0xf772fb=normalizeOperationEntry(_0x4b959d,_0x2b32f6);if(_0xf772fb)_0x319fe9[_0x1c15ff(0xc3)](_0xf772fb);}const _0x31eb94=_0x31427b[_0x1c15ff(0xe6)]??{},_0x186318=_0x31427b[_0x1c15ff(0xbd)]??{},_0x2ce805=_0x31eb94['dbId']!=null?{'id':_0x31eb94[_0x1c15ff(0xc9)],'name':_0x31eb94[_0x1c15ff(0xc0)]??null}:undefined;let _0x25ac9d;return typeof _0x31427b[_0x1c15ff(0xc6)]===_0x1c15ff(0xa3)&&(_0x25ac9d=parseJsonMaybe(_0x31427b[_0x1c15ff(0xc6)])),{'ok':!![],'data':{'id':_0x31427b['modelId']??_0x31427b['id'],'name':_0x31427b['name'],'code':_0x31427b[_0x1c15ff(0xd7)]||_0x31427b['code'],'doVersion':_0x31427b[_0x1c15ff(0xbb)],'description':_0x31427b[_0x1c15ff(0xa2)]||_0x186318[_0x1c15ff(0xac)]||undefined,'source':_0x31427b['source']||_0x186318['sourceType'],'table':_0x31eb94[_0x1c15ff(0xc4)]||_0x186318['tableName'],'datasetKey':_0x31eb94['datasetKey'],'pk':_0x31eb94['pkField'],'db':_0x2ce805,'dbtable':summarizeDbtable(_0x31eb94),'fields':_0x23035b,'operations':_0x319fe9,'indexes':Array[_0x1c15ff(0xa0)](_0x186318['indexes'])?_0x186318[_0x1c15ff(0xb0)]:[],'relations':_0x31427b[_0x1c15ff(0xca)]??null,'relatedPages':normalizeRelatedPages(_0x31427b['relatedPageInfoList']),...Array[_0x1c15ff(0xa0)](_0x31427b[_0x1c15ff(0xb4)])?{'columnCodeListWithDeleted':_0x31427b[_0x1c15ff(0xb4)]}:{},'formatRules':Array[_0x1c15ff(0xa0)](_0x31427b[_0x1c15ff(0xa6)])?_0x31427b[_0x1c15ff(0xa6)]:[],'validateRules':Array['isArray'](_0x31427b[_0x1c15ff(0xbc)])?_0x31427b[_0x1c15ff(0xbc)]:[],..._0x25ac9d!==undefined?{'extend':_0x25ac9d}:{},'stats':{'fieldCount':_0x23035b['length'],'operationCount':_0x319fe9[_0x1c15ff(0x9f)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a26_0x24fe(){const _0x206155=['810646hHZRFQ','1678734cFledY','23191135OAfmEY','879179uBuAgg','9693AHespk','120SeWDgh','1902137GuNACv','10ElPnEG','2375556rEDVrk','9rJYcEs','5dswtPO'];a26_0x24fe=function(){return _0x206155;};return a26_0x24fe();}(function(_0x33b5cf,_0x34f54d){const _0x9284ad=a26_0x5d8a,_0x2ff7eb=_0x33b5cf();while(!![]){try{const _0x20e05a=-parseInt(_0x9284ad(0x111))/0x1+parseInt(_0x9284ad(0x116))/0x2+-parseInt(_0x9284ad(0x114))/0x3*(parseInt(_0x9284ad(0x113))/0x4)+-parseInt(_0x9284ad(0x115))/0x5*(-parseInt(_0x9284ad(0x10c))/0x6)+parseInt(_0x9284ad(0x10e))/0x7*(parseInt(_0x9284ad(0x110))/0x8)+parseInt(_0x9284ad(0x10f))/0x9*(-parseInt(_0x9284ad(0x112))/0xa)+parseInt(_0x9284ad(0x10d))/0xb;if(_0x20e05a===_0x34f54d)break;else _0x2ff7eb['push'](_0x2ff7eb['shift']());}catch(_0x6615aa){_0x2ff7eb['push'](_0x2ff7eb['shift']());}}}(a26_0x24fe,0xf24d7));import{datasetList}from'../../commands/dataset/list.js';function a26_0x5d8a(_0xf776d2,_0x651adb){_0xf776d2=_0xf776d2-0x10c;const _0x24fe5b=a26_0x24fe();let _0x5d8af1=_0x24fe5b[_0xf776d2];return _0x5d8af1;}import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x337a30=a27_0x472d;(function(_0x15d291,_0x1a4b1f){const _0x277594=a27_0x472d,_0x2c41d2=_0x15d291();while(!![]){try{const _0xd7f84=parseInt(_0x277594(0x133))/0x1+-parseInt(_0x277594(0x12c))/0x2*(parseInt(_0x277594(0x142))/0x3)+-parseInt(_0x277594(0x136))/0x4+-parseInt(_0x277594(0x13b))/0x5+parseInt(_0x277594(0x137))/0x6+parseInt(_0x277594(0x131))/0x7+-parseInt(_0x277594(0x139))/0x8*(-parseInt(_0x277594(0x138))/0x9);if(_0xd7f84===_0x1a4b1f)break;else _0x2c41d2['push'](_0x2c41d2['shift']());}catch(_0xaebe6d){_0x2c41d2['push'](_0x2c41d2['shift']());}}}(a27_0x4386,0x65287));import{listDatasets}from'../../core/api-client.js';function a27_0x4386(){const _0x3564c1=['2HIbjWy','map','allFields','source','tableName','1835148WBDlys','code','67261Alosov','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','dbtableConfig','865732MEJpzN','150246gRxqIg','27wVXKKz','1704648wAIFxY','trim','1680950FRTDQb','read','list','description','dataset','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','str','80229EssdJt','name'];a27_0x4386=function(){return _0x3564c1;};return a27_0x4386();}function a27_0x472d(_0x290107,_0x50c141){_0x290107=_0x290107-0x12c;const _0x4386c7=a27_0x4386();let _0x472d7e=_0x4386c7[_0x290107];return _0x472d7e;}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a27_0x337a30(0x13f),'command':a27_0x337a30(0x13d),'description':a27_0x337a30(0x140),'risk':a27_0x337a30(0x13c),'flags':[{'name':a27_0x337a30(0x143),'type':'string','description':'Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'},{...CODE_FLAG,'required':![],'description':a27_0x337a30(0x134)}],async 'execute'(_0x385533){const _0x14112e=a27_0x337a30,_0x45184e=_0x385533['str'](_0x14112e(0x143)),_0x120e56=_0x385533[_0x14112e(0x141)](_0x14112e(0x132)),_0xb071a2=await listDatasets(_0x385533['appCode'],{..._0x45184e&&{'name':_0x45184e},..._0x120e56&&{'code':_0x120e56}});return{'ok':!![],'data':{'total':_0xb071a2['length'],'datasets':_0xb071a2[_0x14112e(0x12d)](_0x4b1ce2=>{const _0x3eff2e=_0x14112e,_0x47484a=_0x4b1ce2[_0x3eff2e(0x135)]??{};return{'id':_0x4b1ce2['id'],'code':_0x4b1ce2[_0x3eff2e(0x132)],'name':_0x4b1ce2[_0x3eff2e(0x143)],'source':_0x4b1ce2[_0x3eff2e(0x12f)],'description':_0x4b1ce2[_0x3eff2e(0x13e)],'table':_0x47484a[_0x3eff2e(0x130)],'datasetKey':_0x47484a['datasetKey'],'pk':_0x47484a['pkField'],'fields':_0x47484a[_0x3eff2e(0x12e)]?_0x47484a['allFields']['split'](',')[_0x3eff2e(0x12d)](_0x4987ea=>_0x4987ea[_0x3eff2e(0x13a)]()):[]};})}};}};
|