@lovrabet/lovrabet-cli 2.1.18-beta.2 → 2.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/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.d.ts +7 -14
- 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_0x254002=a12_0x328a;(function(_0x37f449,_0x5a3cc5){const _0x1aa902=a12_0x328a,_0x32f43b=_0x37f449();while(!![]){try{const _0x2d7314=-parseInt(_0x1aa902(0x1d9))/0x1+-parseInt(_0x1aa902(0x1d3))/0x2*(-parseInt(_0x1aa902(0x1f2))/0x3)+-parseInt(_0x1aa902(0x1cf))/0x4+parseInt(_0x1aa902(0x1f4))/0x5+parseInt(_0x1aa902(0x1ed))/0x6*(parseInt(_0x1aa902(0x1e0))/0x7)+-parseInt(_0x1aa902(0x1a9))/0x8*(-parseInt(_0x1aa902(0x1bb))/0x9)+-parseInt(_0x1aa902(0x1c5))/0xa*(parseInt(_0x1aa902(0x1c3))/0xb);if(_0x2d7314===_0x5a3cc5)break;else _0x32f43b['push'](_0x32f43b['shift']());}catch(_0x10e80d){_0x32f43b['push'](_0x32f43b['shift']());}}}(a12_0x4eea,0xc51a1));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x491ac2=a12_0x328a;writeCliSideChannelLine(_0x491ac2(0x1dc)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x491ac2(0x1fa)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x521a69=a12_0x328a;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x521a69(0x1ec)]+':',USER_ACCESS_KEY_CREATE_URL,_0x521a69(0x1be)+CLI_BIN_NAME+_0x521a69(0x1d5)][_0x521a69(0x1a6)]('\x0a');}function canPromptForAccessKey(_0x2758d2){const _0x43890b=a12_0x328a;return!_0x2758d2[_0x43890b(0x1b9)]&&process['stdin']['isTTY']!==![]&&process[_0x43890b(0x1ba)][_0x43890b(0x1f8)]!==![];}function resolveAuthScopeFlags(_0xd2623d){const _0xdabde9=a12_0x328a;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0xd2623d[_0xdabde9(0x1bc)](_0xdabde9(0x1eb)),'explicitProject':_0xd2623d[_0xdabde9(0x1bc)](_0xdabde9(0x1ea)),'policy':_0xdabde9(0x1ac)}));}function a12_0x328a(_0x3bc12d,_0x46b4d2){_0x3bc12d=_0x3bc12d-0x1a3;const _0x4eea46=a12_0x4eea();let _0x328aab=_0x4eea46[_0x3bc12d];return _0x328aab;}async function resolveAuthWriteInput(_0x33462d){const _0x1226c7=a12_0x328a;let _0x2bd543=(_0x33462d['str'](_0x1226c7(0x1f5))||_0x33462d['str']('ak')||'')[_0x1226c7(0x1c6)]();const _0x273964=(_0x33462d[_0x1226c7(0x1a7)](_0x1226c7(0x1c9))||'')[_0x1226c7(0x1c6)]();if(!_0x2bd543&&canPromptForAccessKey(_0x33462d))try{showAccessKeyCreateHint(),_0x2bd543=await promptAccessKey('');}catch(_0x74c145){if(isAbortPrompt(_0x74c145))throw CliErrors[_0x1226c7(0x1b7)]();throw _0x74c145;}if(!_0x2bd543)throw CliErrors['validation'](_0x1226c7(0x1e5),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x1226c7(0x1a3)](_0x2bd543))throw CliErrors[_0x1226c7(0x1a8)](_0x1226c7(0x1d7)+_0x2bd543+'\x22',_0x1226c7(0x1ef));if(!_0x273964)return{'accessKey':_0x2bd543};const _0x5e80da=normalizeEnv(_0x273964);return{'accessKey':_0x2bd543,'env':isDaily(_0x5e80da)?_0x1226c7(0x1cc):isDev(_0x5e80da)?_0x1226c7(0x1aa):'production'};}export const authDefinitions=[{'service':'auth','command':a12_0x254002(0x1b2),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':a12_0x254002(0x1f1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x254002(0x1f5),'type':'string','description':a12_0x254002(0x1a4)},{'name':'ak','type':a12_0x254002(0x1a5),'description':a12_0x254002(0x1e9)},{'name':a12_0x254002(0x1eb),'type':a12_0x254002(0x1d2),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x254002(0x1ea),'type':'boolean','description':a12_0x254002(0x1e1),'default':![]}],async 'execute'(_0x4f0260){const _0x33db1d=a12_0x254002;if(_0x4f0260['bool']('yes'))throw CliErrors[_0x33db1d(0x1a8)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x33db1d(0x1e6)+CLI_BIN_NAME+_0x33db1d(0x1fd)+CLI_BIN_NAME+_0x33db1d(0x1e2));const _0x4b4642=(_0x4f0260['str'](_0x33db1d(0x1f5))||_0x4f0260[_0x33db1d(0x1a7)]('ak')||'')[_0x33db1d(0x1c6)]();if(!_0x4b4642&&_0x4f0260[_0x33db1d(0x1b9)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x44ca73=await resolveAuthWriteInput(_0x4f0260),_0xd57845=resolveAuthScopeFlags(_0x4f0260),_0x24161a=readScopedConfig(_0xd57845);_0x24161a['accessKey']=_0x44ca73[_0x33db1d(0x1c4)];_0x44ca73[_0x33db1d(0x1c9)]&&(_0x24161a['env']=_0x44ca73[_0x33db1d(0x1c9)]);writeScopedConfig(_0x24161a,_0xd57845);const _0x11f96b=_0xd57845[_0x33db1d(0x1eb)]?_0x33db1d(0x1eb):_0x33db1d(0x1ea),_0xeb27d3=_0x24161a[_0x33db1d(0x1c9)]?_0x33db1d(0x1b3)+_0x24161a[_0x33db1d(0x1c9)]+'.':'';return{'ok':!![],'message':_0x33db1d(0x1cb)+_0x11f96b+_0x33db1d(0x1ad)+_0xeb27d3+_0x33db1d(0x1fb)+CLI_BIN_NAME+_0x33db1d(0x1af)};}},{'service':a12_0x254002(0x1c0),'command':a12_0x254002(0x1f6),'description':a12_0x254002(0x1ae),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x254002(0x1f5),'type':a12_0x254002(0x1a5),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x254002(0x1a5),'description':'Shorthand\x20for\x20--access-key'},{'name':'env','type':a12_0x254002(0x1a5),'description':a12_0x254002(0x1ca)},{'name':a12_0x254002(0x1eb),'type':a12_0x254002(0x1d2),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x254002(0x1d2),'description':a12_0x254002(0x1e1),'default':![]}],async 'execute'(_0x184e94){const _0xfc253e=a12_0x254002,_0x5d9512=await resolveAuthWriteInput(_0x184e94),_0x384499=resolveAuthScopeFlags(_0x184e94),_0x28bbe9={'accessKey':_0x5d9512[_0xfc253e(0x1c4)]};_0x5d9512[_0xfc253e(0x1c9)]&&(_0x28bbe9[_0xfc253e(0x1c9)]=_0x5d9512['env']);writeScopedConfig(_0x28bbe9,_0x384499);const _0x3585ab=_0x384499[_0xfc253e(0x1eb)]?_0xfc253e(0x1eb):_0xfc253e(0x1ea),_0x4691e8=_0x28bbe9['env']?_0xfc253e(0x1b3)+_0x28bbe9[_0xfc253e(0x1c9)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x3585ab+_0xfc253e(0x1fc)+_0x4691e8+_0xfc253e(0x1fb)+CLI_BIN_NAME+_0xfc253e(0x1af)};}},{'service':a12_0x254002(0x1c0),'command':a12_0x254002(0x1cd),'description':a12_0x254002(0x1d8),'risk':a12_0x254002(0x1f1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x254002(0x1d2),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x254002(0x1d2),'description':a12_0x254002(0x1f0),'default':![]}],async 'execute'(_0x314d39){const _0x40d709=a12_0x254002,_0x312abb=resolveAuthScopeFlags(_0x314d39),_0x1797c=readScopedConfig(_0x312abb),_0x1a18e6=!!_0x1797c[_0x40d709(0x1c4)];delete _0x1797c[_0x40d709(0x1c4)],writeScopedConfig(_0x1797c,_0x312abb);const _0x58c8b7=_0x312abb[_0x40d709(0x1eb)]?_0x40d709(0x1eb):_0x40d709(0x1ea);if(_0x1a18e6)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x58c8b7+'\x20config.'};return{'ok':!![],'message':_0x40d709(0x1ee)+_0x58c8b7+_0x40d709(0x1de)};}},{'service':'auth','command':a12_0x254002(0x1e8),'description':a12_0x254002(0x1df),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x254002(0x1eb),'type':a12_0x254002(0x1d2),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x254002(0x1ea),'type':a12_0x254002(0x1d2),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a12_0x254002(0x1ff),'type':a12_0x254002(0x1d2),'description':a12_0x254002(0x1d1),'default':![]}],async 'execute'(_0x75e972){const _0x1b3b38=a12_0x254002,_0x1fd5cb=resolveAuthScopeFlags(_0x75e972),_0x21607c=readScopedConfig(_0x1fd5cb),_0x482a8b=productEnvName(_0x1b3b38(0x1c8)),_0x223818=productEnv(_0x1b3b38(0x1c8))||undefined,_0x98214a=_0x21607c['accessKey']||undefined,_0x5bb36b=_0x223818||_0x98214a,_0x13c076=_0x223818?_0x482a8b+'\x20env\x20var':_0x98214a?(_0x1fd5cb[_0x1b3b38(0x1eb)]?_0x1b3b38(0x1eb):_0x1b3b38(0x1ea))+'\x20config':null,_0x3d8805=[_0x1b3b38(0x1e7)+AUTH_MODE[_0x1b3b38(0x1e3)]];if(_0x5bb36b){const _0x2206a1=_0x5bb36b[_0x1b3b38(0x1d4)]>0x8?''+_0x5bb36b[_0x1b3b38(0x1c7)](0x0,0x8)+'*'[_0x1b3b38(0x1d6)](_0x5bb36b[_0x1b3b38(0x1d4)]-0x8):_0x5bb36b;_0x3d8805[_0x1b3b38(0x1c1)](_0x1b3b38(0x1b4)+_0x2206a1+(_0x13c076?_0x1b3b38(0x1f9)+_0x13c076+')':'')),_0x3d8805['push']('Status:\x20valid');}if(!_0x5bb36b){_0x3d8805[_0x1b3b38(0x1c1)](''),_0x3d8805[_0x1b3b38(0x1c1)](_0x1b3b38(0x1bf)),_0x3d8805['push'](''),_0x3d8805[_0x1b3b38(0x1c1)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x1b3b38(0x1e4)),_0x3d8805[_0x1b3b38(0x1c1)](''),_0x3d8805[_0x1b3b38(0x1c1)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x1b3b38(0x1c2)]+')'),_0x3d8805[_0x1b3b38(0x1c1)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x3d8805[_0x1b3b38(0x1c1)](''),_0x3d8805[_0x1b3b38(0x1c1)](_0x1b3b38(0x1bd)),_0x3d8805[_0x1b3b38(0x1c1)](_0x1b3b38(0x1d0)+_0x482a8b+_0x1b3b38(0x1ab)),_0x3d8805[_0x1b3b38(0x1c1)](''),_0x3d8805[_0x1b3b38(0x1c1)](_0x1b3b38(0x1dd)+CLI_BIN_NAME+_0x1b3b38(0x1af)),_0x3d8805['push'](_0x1b3b38(0x1b5)+CLI_BIN_NAME+'\x20doctor');if(_0x75e972['bool'](_0x1b3b38(0x1ff))){const _0x4bdb01=readStoredDeviceCode();if(_0x4bdb01&&!isStoredDeviceCodeExpired(_0x4bdb01)){const _0x2008b1=getUserDomain(),_0x3c36ca=await fetchDeviceToken(_0x2008b1,_0x4bdb01[_0x1b3b38(0x1b6)]);if(_0x3c36ca[_0x1b3b38(0x1e8)]===_0x1b3b38(0x1b0)&&_0x3c36ca[_0x1b3b38(0x1da)]){const _0x17b809={'global':_0x4bdb01[_0x1b3b38(0x1fe)]===_0x1b3b38(0x1eb)},_0x2b47e1=readScopedConfig(_0x17b809);_0x2b47e1[_0x1b3b38(0x1c4)]=_0x3c36ca[_0x1b3b38(0x1da)],writeScopedConfig(_0x2b47e1,_0x17b809),deleteStoredDeviceCode();const _0x532d58=_0x3c36ca['access_key'],_0x4319a2=_0x532d58[_0x1b3b38(0x1d4)]>0x8?''+_0x532d58[_0x1b3b38(0x1c7)](0x0,0x8)+'*'['repeat'](_0x532d58[_0x1b3b38(0x1d4)]-0x8):_0x532d58,_0x12edaf=_0x4bdb01[_0x1b3b38(0x1fe)]===_0x1b3b38(0x1eb)?_0x1b3b38(0x1f7):_0x1b3b38(0x1b8);return{'ok':!![],'message':[_0x1b3b38(0x1e7)+AUTH_MODE['ClientAk'],'AccessKey:\x20'+_0x4319a2+_0x1b3b38(0x1f9)+_0x12edaf+')','Status:\x20valid'][_0x1b3b38(0x1a6)]('\x0a')};}_0x3c36ca[_0x1b3b38(0x1e8)]===_0x1b3b38(0x1b1)&&deleteStoredDeviceCode();throw CliErrors[_0x1b3b38(0x1f3)]('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors['authRequired'](_0x3d8805[_0x1b3b38(0x1a6)]('\x0a'));}}return{'ok':!![],'message':_0x3d8805['join']('\x0a')};}},{'service':'auth','command':a12_0x254002(0x1db),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4e32d2){const _0x2477fc=a12_0x254002,_0x1750d2=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x1750d2,'meta':{'env':_0x4e32d2[_0x2477fc(0x1ce)]??'production'}}};}},authDeviceDefinition];function a12_0x4eea(){const _0x4d7fc5=['Missing\x20accessKey.','Use\x20`','Auth\x20mode:\x20','status','Shorthand\x20for\x20--access-key','project','global','userCenterDisplayName','6gmdIba','No\x20AccessKey\x20found\x20in\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','write','2807643HQEPyf','authRequired','7930690SERwxP','access-key','init','global\x20config','isTTY','\x20(via\x20','Tip:\x20you\x20can\x20also\x20run:','\x20Verify:\x20','\x20scope.','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','scope','check','test','AccessKey\x20(ak_xxx...)','string','join','str','validation','632YJZeyb','development','=ak_xxx','global-default','\x20config.','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','\x20auth\x20status','success','expired','login','\x20Current\x20env:\x20','AccessKey:\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','code','cancelled','project\x20config','nonInteractive','stdout','170865pkGbVb','bool','Option\x20C:\x20environment\x20variable','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','auth','push','newConfigFileName','3355IoBTPY','accessKey','86690OwIDay','trim','slice','ACCESS_KEY','env','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','AccessKey\x20saved\x20to\x20','daily','logout','envName','5146172kgAVNy','\x20\x20export\x20','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','boolean','2ZGOJkU','length','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','repeat','Invalid\x20accessKey\x20format:\x20\x22','Clear\x20accessKey\x20from\x20config','844002lfXyib','access_key','info','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Then\x20verify\x20with:\x20','\x20config.\x20Nothing\x20to\x20clear.','Show\x20current\x20authentication\x20status','10920595SXRTcX','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','ClientAk','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'];a12_0x4eea=function(){return _0x4d7fc5;};return a12_0x4eea();}
|
|
1
|
+
const a12_0x59be29=a12_0x29d2;(function(_0x43c994,_0x11efd0){const _0x9b87d8=a12_0x29d2,_0x5366e9=_0x43c994();while(!![]){try{const _0x177662=parseInt(_0x9b87d8(0xe9))/0x1+-parseInt(_0x9b87d8(0xec))/0x2+parseInt(_0x9b87d8(0x9d))/0x3+parseInt(_0x9b87d8(0xbb))/0x4*(parseInt(_0x9b87d8(0xf2))/0x5)+parseInt(_0x9b87d8(0xd3))/0x6*(-parseInt(_0x9b87d8(0x97))/0x7)+-parseInt(_0x9b87d8(0xf4))/0x8*(-parseInt(_0x9b87d8(0xb5))/0x9)+-parseInt(_0x9b87d8(0x99))/0xa*(parseInt(_0x9b87d8(0xee))/0xb);if(_0x177662===_0x11efd0)break;else _0x5366e9['push'](_0x5366e9['shift']());}catch(_0x9fe058){_0x5366e9['push'](_0x5366e9['shift']());}}}(a12_0xb368,0x291e7));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a12_0x29d2(_0x365b8e,_0x39e63a){_0x365b8e=_0x365b8e-0x93;const _0xb36896=a12_0xb368();let _0x29d20d=_0xb36896[_0x365b8e];return _0x29d20d;}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x37ceee=a12_0x29d2;writeCliSideChannelLine(_0x37ceee(0xbf)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x37ceee(0xbc)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x37ceee(0xb6));}function buildAccessKeySetupGuide(){const _0x263902=a12_0x29d2;return[_0x263902(0xbf)+PRODUCT_CONFIG[_0x263902(0xd9)]+':',USER_ACCESS_KEY_CREATE_URL,_0x263902(0xf3)+CLI_BIN_NAME+_0x263902(0xf5)][_0x263902(0xb3)]('\x0a');}function canPromptForAccessKey(_0xd9a4c8){const _0x3b52af=a12_0x29d2;return!_0xd9a4c8[_0x3b52af(0xce)]&&process[_0x3b52af(0xb4)][_0x3b52af(0xd7)]!==![]&&process['stdout'][_0x3b52af(0xd7)]!==![];}function resolveAuthScopeFlags(_0x2475b0){const _0x10e092=a12_0x29d2;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2475b0[_0x10e092(0xe3)](_0x10e092(0xe1)),'explicitProject':_0x2475b0[_0x10e092(0xe3)]('project'),'policy':_0x10e092(0xa2)}));}async function resolveAuthWriteInput(_0x5e7405){const _0x41c18d=a12_0x29d2;let _0x22a02c=(_0x5e7405[_0x41c18d(0x9b)](_0x41c18d(0xc4))||_0x5e7405[_0x41c18d(0x9b)]('ak')||'')['trim']();const _0x1dcefc=(_0x5e7405['str'](_0x41c18d(0xcb))||'')[_0x41c18d(0xca)]();if(!_0x22a02c&&canPromptForAccessKey(_0x5e7405))try{showAccessKeyCreateHint(),_0x22a02c=await promptAccessKey('');}catch(_0x1bb616){if(isAbortPrompt(_0x1bb616))throw CliErrors['cancelled']();throw _0x1bb616;}if(!_0x22a02c)throw CliErrors['validation'](_0x41c18d(0xd4),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x22a02c))throw CliErrors[_0x41c18d(0x9a)](_0x41c18d(0xe6)+_0x22a02c+'\x22',_0x41c18d(0xc9));if(!_0x1dcefc)return{'accessKey':_0x22a02c};const _0x513827=normalizeEnv(_0x1dcefc);return{'accessKey':_0x22a02c,'env':isDaily(_0x513827)?_0x41c18d(0xde):isDev(_0x513827)?_0x41c18d(0xf1):_0x41c18d(0xeb)};}function a12_0xb368(){const _0x4f909c=['If\x20command\x20execution\x20still\x20fails,\x20run:\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','trim','env','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','scope','nonInteractive','\x20config.\x20Nothing\x20to\x20clear.','ACCESS_KEY','Clear\x20accessKey\x20from\x20config','yes','130098InASlZ','Missing\x20accessKey.','newConfigFileName','=ak_xxx','isTTY','string','userCenterDisplayName','expired','\x20doctor','Option\x20A:\x20','Use\x20`','daily','Write\x20to\x20global\x20config\x20(default)','Then\x20verify\x20with:\x20','global','AccessKey\x20cleared\x20from\x20','bool','info','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Invalid\x20accessKey\x20format:\x20\x22','push','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','335073xvPnVU','project\x20config','production','284152hRtcBH','AccessKey:\x20','6118673pwmPEy','Auth\x20config\x20reinitialized\x20in\x20','Option\x20C:\x20environment\x20variable','development','5GGpQGJ','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','2387048tsfxEU','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Option\x20B:\x20apps\x20config\x20(','global\x20config','length','success','28NowRvG','Clear\x20from\x20global\x20config\x20(default)','10aDDIdM','validation','str','authRequired','308421ZhPNLn','Read\x20from\x20global\x20config\x20(default)','slice','AccessKey\x20saved\x20to\x20','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','global-default','login','AccessKey\x20(ak_xxx...)','Shorthand\x20for\x20--access-key','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','write','accessKey','No\x20AccessKey\x20found\x20in\x20','\x20Verify:\x20','Show\x20current\x20authentication\x20status','status','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Status:\x20valid','init','logout','\x20auth\x20status','\x20scope.','join','stdin','9kKNpHg','\x20auth\x20login\x20--access-key\x20<ak_xxx>','auth','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','project','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','868852Jeuyvg','Tip:\x20you\x20can\x20also\x20run:','repeat','ClientAk','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','access_key','\x20config','\x20(via\x20','check','access-key','code','boolean'];a12_0xb368=function(){return _0x4f909c;};return a12_0xb368();}export const authDefinitions=[{'service':a12_0x59be29(0xb7),'command':a12_0x59be29(0xa3),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x59be29(0xc4),'type':a12_0x59be29(0xd8),'description':a12_0x59be29(0xa4)},{'name':'ak','type':a12_0x59be29(0xd8),'description':a12_0x59be29(0xa5)},{'name':a12_0x59be29(0xe1),'type':'boolean','description':a12_0x59be29(0xdf),'default':!![]},{'name':a12_0x59be29(0xb9),'type':a12_0x59be29(0xc6),'description':a12_0x59be29(0xa6),'default':![]}],async 'execute'(_0x130a23){const _0xb18514=a12_0x59be29;if(_0x130a23['bool'](_0xb18514(0xd2)))throw CliErrors[_0xb18514(0x9a)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0xb18514(0xdd)+CLI_BIN_NAME+_0xb18514(0xcc)+CLI_BIN_NAME+_0xb18514(0xba));const _0x282387=(_0x130a23[_0xb18514(0x9b)]('access-key')||_0x130a23[_0xb18514(0x9b)]('ak')||'')[_0xb18514(0xca)]();if(!_0x282387&&_0x130a23[_0xb18514(0xce)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x3dcc22=await resolveAuthWriteInput(_0x130a23),_0x9f06b=resolveAuthScopeFlags(_0x130a23),_0x3039fa=readScopedConfig(_0x9f06b);_0x3039fa[_0xb18514(0xa8)]=_0x3dcc22['accessKey'];_0x3dcc22[_0xb18514(0xcb)]&&(_0x3039fa[_0xb18514(0xcb)]=_0x3dcc22[_0xb18514(0xcb)]);writeScopedConfig(_0x3039fa,_0x9f06b);const _0x1e54b5=_0x9f06b[_0xb18514(0xe1)]?_0xb18514(0xe1):_0xb18514(0xb9),_0x2081e1=_0x3039fa[_0xb18514(0xcb)]?'\x20Current\x20env:\x20'+_0x3039fa['env']+'.':'';return{'ok':!![],'message':_0xb18514(0xa0)+_0x1e54b5+'\x20config.'+_0x2081e1+_0xb18514(0xaa)+CLI_BIN_NAME+_0xb18514(0xb1)};}},{'service':a12_0x59be29(0xb7),'command':a12_0x59be29(0xaf),'description':a12_0x59be29(0xa1),'risk':a12_0x59be29(0xa7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x59be29(0xc4),'type':'string','description':a12_0x59be29(0xa4)},{'name':'ak','type':'string','description':a12_0x59be29(0xa5)},{'name':'env','type':a12_0x59be29(0xd8),'description':a12_0x59be29(0xe5)},{'name':a12_0x59be29(0xe1),'type':a12_0x59be29(0xc6),'description':a12_0x59be29(0xdf),'default':!![]},{'name':a12_0x59be29(0xb9),'type':a12_0x59be29(0xc6),'description':a12_0x59be29(0xa6),'default':![]}],async 'execute'(_0x1cd10a){const _0x23e123=a12_0x59be29,_0x315b61=await resolveAuthWriteInput(_0x1cd10a),_0x4405ef=resolveAuthScopeFlags(_0x1cd10a),_0x3f722f={'accessKey':_0x315b61[_0x23e123(0xa8)]};_0x315b61['env']&&(_0x3f722f[_0x23e123(0xcb)]=_0x315b61['env']);writeScopedConfig(_0x3f722f,_0x4405ef);const _0x3dc9f5=_0x4405ef[_0x23e123(0xe1)]?'global':_0x23e123(0xb9),_0x34c238=_0x3f722f[_0x23e123(0xcb)]?'\x20Current\x20env:\x20'+_0x3f722f[_0x23e123(0xcb)]+'.':'';return{'ok':!![],'message':_0x23e123(0xef)+_0x3dc9f5+_0x23e123(0xb2)+_0x34c238+_0x23e123(0xaa)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a12_0x59be29(0xb7),'command':a12_0x59be29(0xb0),'description':a12_0x59be29(0xd1),'risk':a12_0x59be29(0xa7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x59be29(0xc6),'description':a12_0x59be29(0x98),'default':!![]},{'name':a12_0x59be29(0xb9),'type':'boolean','description':a12_0x59be29(0xe8),'default':![]}],async 'execute'(_0xd20559){const _0x2246fb=a12_0x59be29,_0x56bc80=resolveAuthScopeFlags(_0xd20559),_0x4f8b74=readScopedConfig(_0x56bc80),_0x40d6a8=!!_0x4f8b74[_0x2246fb(0xa8)];delete _0x4f8b74[_0x2246fb(0xa8)],writeScopedConfig(_0x4f8b74,_0x56bc80);const _0x453607=_0x56bc80[_0x2246fb(0xe1)]?'global':_0x2246fb(0xb9);if(_0x40d6a8)return{'ok':!![],'message':_0x2246fb(0xe2)+_0x453607+'\x20config.'};return{'ok':!![],'message':_0x2246fb(0xa9)+_0x453607+_0x2246fb(0xcf)};}},{'service':'auth','command':a12_0x59be29(0xac),'description':a12_0x59be29(0xab),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x59be29(0xe1),'type':a12_0x59be29(0xc6),'description':a12_0x59be29(0x9e),'default':!![]},{'name':a12_0x59be29(0xb9),'type':a12_0x59be29(0xc6),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a12_0x59be29(0xc3),'type':a12_0x59be29(0xc6),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x5bb9e4){const _0x48d9fe=a12_0x59be29,_0x17812d=resolveAuthScopeFlags(_0x5bb9e4),_0x46128d=readScopedConfig(_0x17812d),_0x126cdb=productEnvName(_0x48d9fe(0xd0)),_0x1cccb1=productEnv(_0x48d9fe(0xd0))||undefined,_0x2719f8=_0x46128d[_0x48d9fe(0xa8)]||undefined,_0x5abac4=_0x1cccb1||_0x2719f8,_0x2da6f8=_0x1cccb1?_0x126cdb+'\x20env\x20var':_0x2719f8?(_0x17812d[_0x48d9fe(0xe1)]?_0x48d9fe(0xe1):_0x48d9fe(0xb9))+_0x48d9fe(0xc1):null,_0x81382d=['Auth\x20mode:\x20'+AUTH_MODE['ClientAk']];if(_0x5abac4){const _0x176b58=_0x5abac4[_0x48d9fe(0x95)]>0x8?''+_0x5abac4[_0x48d9fe(0x9f)](0x0,0x8)+'*'[_0x48d9fe(0xbd)](_0x5abac4['length']-0x8):_0x5abac4;_0x81382d[_0x48d9fe(0xe7)](_0x48d9fe(0xed)+_0x176b58+(_0x2da6f8?_0x48d9fe(0xc2)+_0x2da6f8+')':'')),_0x81382d['push']('Status:\x20valid');}if(!_0x5abac4){_0x81382d[_0x48d9fe(0xe7)](''),_0x81382d[_0x48d9fe(0xe7)](_0x48d9fe(0xc8)),_0x81382d[_0x48d9fe(0xe7)](''),_0x81382d['push'](_0x48d9fe(0xdc)+CLI_BIN_NAME+_0x48d9fe(0xad)),_0x81382d[_0x48d9fe(0xe7)](''),_0x81382d[_0x48d9fe(0xe7)](_0x48d9fe(0x93)+PRODUCT_CONFIG[_0x48d9fe(0xd5)]+')'),_0x81382d['push']('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x81382d['push'](''),_0x81382d[_0x48d9fe(0xe7)](_0x48d9fe(0xf0)),_0x81382d[_0x48d9fe(0xe7)]('\x20\x20export\x20'+_0x126cdb+_0x48d9fe(0xd6)),_0x81382d[_0x48d9fe(0xe7)](''),_0x81382d[_0x48d9fe(0xe7)](_0x48d9fe(0xe0)+CLI_BIN_NAME+_0x48d9fe(0xb1)),_0x81382d['push'](_0x48d9fe(0xc7)+CLI_BIN_NAME+_0x48d9fe(0xdb));if(_0x5bb9e4[_0x48d9fe(0xe3)](_0x48d9fe(0xc3))){const _0x6c4c37=readStoredDeviceCode();if(_0x6c4c37&&!isStoredDeviceCodeExpired(_0x6c4c37)){const _0x2a8f2a=getUserDomain(),_0x5b177a=await fetchDeviceToken(_0x2a8f2a,_0x6c4c37[_0x48d9fe(0xc5)]);if(_0x5b177a[_0x48d9fe(0xac)]===_0x48d9fe(0x96)&&_0x5b177a[_0x48d9fe(0xc0)]){const _0x455477={'global':_0x6c4c37[_0x48d9fe(0xcd)]===_0x48d9fe(0xe1)},_0x1af00b=readScopedConfig(_0x455477);_0x1af00b[_0x48d9fe(0xa8)]=_0x5b177a[_0x48d9fe(0xc0)],writeScopedConfig(_0x1af00b,_0x455477),deleteStoredDeviceCode();const _0x155fd5=_0x5b177a[_0x48d9fe(0xc0)],_0x23221a=_0x155fd5[_0x48d9fe(0x95)]>0x8?''+_0x155fd5['slice'](0x0,0x8)+'*'[_0x48d9fe(0xbd)](_0x155fd5[_0x48d9fe(0x95)]-0x8):_0x155fd5,_0x1debd1=_0x6c4c37[_0x48d9fe(0xcd)]===_0x48d9fe(0xe1)?_0x48d9fe(0x94):_0x48d9fe(0xea);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE[_0x48d9fe(0xbe)],'AccessKey:\x20'+_0x23221a+_0x48d9fe(0xc2)+_0x1debd1+')',_0x48d9fe(0xae)][_0x48d9fe(0xb3)]('\x0a')};}_0x5b177a[_0x48d9fe(0xac)]===_0x48d9fe(0xda)&&deleteStoredDeviceCode();throw CliErrors[_0x48d9fe(0x9c)](_0x48d9fe(0xb8));}throw CliErrors['authRequired'](_0x81382d[_0x48d9fe(0xb3)]('\x0a'));}}return{'ok':!![],'message':_0x81382d[_0x48d9fe(0xb3)]('\x0a')};}},{'service':a12_0x59be29(0xb7),'command':a12_0x59be29(0xe4),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2b4174){const _0x194eb2=a12_0x59be29,_0x31aa4a=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x31aa4a,'meta':{'env':_0x2b4174['envName']??_0x194eb2(0xeb)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0xf146(){const _0x4c3a8d=['SIGINT','stdout','stdin','215DjspkX','race','User\x20aborted\x20prompt','question','once','69576owtNfd','name','2jotRBv','985192kolyZp','3748302qtJTgM','6652rItpTY','AbortPrompt','trim','close','3863580LALfJq','7fxlOwi','removeListener','1052703TaIEoV','259509goTmpm','):\x20'];a13_0xf146=function(){return _0x4c3a8d;};return a13_0xf146();}(function(_0x58b0f1,_0x54a742){const _0xb34899=a13_0x2803,_0x4ea77f=_0x58b0f1();while(!![]){try{const _0x26afce=parseInt(_0xb34899(0x184))/0x1*(parseInt(_0xb34899(0x179))/0x2)+parseInt(_0xb34899(0x183))/0x3+-parseInt(_0xb34899(0x17c))/0x4*(parseInt(_0xb34899(0x189))/0x5)+parseInt(_0xb34899(0x177))/0x6*(parseInt(_0xb34899(0x181))/0x7)+-parseInt(_0xb34899(0x17a))/0x8+-parseInt(_0xb34899(0x17b))/0x9+parseInt(_0xb34899(0x180))/0xa;if(_0x26afce===_0x54a742)break;else _0x4ea77f['push'](_0x4ea77f['shift']());}catch(_0x3eefef){_0x4ea77f['push'](_0x4ea77f['shift']());}}}(a13_0xf146,0x60fac));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x5bab27=a13_0x2803;super(_0x5bab27(0x174)),this['name']=_0x5bab27(0x17d);}}function createSafeRl(){const _0x2656c4=a13_0x2803,_0x239d24=createInterface({'input':process[_0x2656c4(0x188)],'output':process[_0x2656c4(0x187)]});let _0x2ba538;const _0x901ade=new Promise((_0x3354cf,_0x5ad465)=>{const _0x16c942=_0x2656c4;_0x2ba538=()=>{const _0x4238c9=a13_0x2803;_0x2ba538&&(_0x239d24['removeListener'](_0x4238c9(0x186),_0x2ba538),_0x2ba538=undefined);try{_0x239d24[_0x4238c9(0x17f)]();}catch{}_0x5ad465(new AbortPrompt());},_0x239d24[_0x16c942(0x176)](_0x16c942(0x186),_0x2ba538);}),_0x13f2fb=()=>{const _0x2056d6=_0x2656c4;_0x2ba538&&(_0x239d24[_0x2056d6(0x182)](_0x2056d6(0x186),_0x2ba538),_0x2ba538=undefined);try{_0x239d24['close']();}catch{}};return{'rl':_0x239d24,'abortPromise':_0x901ade,'disposeSuccess':_0x13f2fb};}function a13_0x2803(_0x5e97a0,_0x49c153){_0x5e97a0=_0x5e97a0-0x174;const _0xf14638=a13_0xf146();let _0x280303=_0xf14638[_0x5e97a0];return _0x280303;}export async function promptAccessKey(_0x35e72c=''){const _0x571113=a13_0x2803,{rl:_0x118b98,abortPromise:_0x5ab023,disposeSuccess:_0x446ff4}=createSafeRl(),_0x5213da=new Promise(_0x37e05d=>{const _0xd07635=a13_0x2803,_0x24c09e=_0x35e72c?'AccessKey\x20('+_0x35e72c+_0xd07635(0x185):'AccessKey\x20(paste\x20ak_...):\x20';_0x118b98[_0xd07635(0x175)](_0x24c09e,_0x32e107=>{const _0x6b9694=_0xd07635;_0x446ff4(),_0x37e05d(_0x32e107[_0x6b9694(0x17e)]()||_0x35e72c);});});return Promise[_0x571113(0x18a)]([_0x5213da,_0x5ab023]);}export function isAbortPrompt(_0x20a5d8){const _0x38ce50=a13_0x2803;return _0x20a5d8 instanceof Error&&_0x20a5d8[_0x38ce50(0x178)]===_0x38ce50(0x17d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a14_0x4735(){const _0x108b0a=['745636lMhcvT','25523420abugFY','appCode','64PcIRNb','1439388lejCjL','(none)','210322loxqOD','6EBBFvI','BFF\x20function\x20name','str','15ghTNbK','bff','806701KxAlGE','Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','functionName','3554848vkQzBH','version','1703180aQLedn','read'];a14_0x4735=function(){return _0x108b0a;};return a14_0x4735();}const a14_0x26e351=a14_0x3da0;(function(_0x5d1271,_0x9ffafd){const _0x216514=a14_0x3da0,_0x2405c8=_0x5d1271();while(!![]){try{const _0x3d3a19=-parseInt(_0x216514(0x9b))/0x1+parseInt(_0x216514(0xa1))/0x2*(-parseInt(_0x216514(0x92))/0x3)+parseInt(_0x216514(0x97))/0x4+-parseInt(_0x216514(0x99))/0x5*(parseInt(_0x216514(0xa2))/0x6)+parseInt(_0x216514(0x94))/0x7+-parseInt(_0x216514(0x9e))/0x8*(parseInt(_0x216514(0x9f))/0x9)+parseInt(_0x216514(0x9c))/0xa;if(_0x3d3a19===_0x9ffafd)break;else _0x2405c8['push'](_0x2405c8['shift']());}catch(_0x332157){_0x2405c8['push'](_0x2405c8['shift']());}}}(a14_0x4735,0xa24bc));function a14_0x3da0(_0x2bfe0b,_0x28a857){_0x2bfe0b=_0x2bfe0b-0x91;const _0x47359d=a14_0x4735();let _0x3da02d=_0x47359d[_0x2bfe0b];return _0x3da02d;}import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a14_0x26e351(0x93),'command':'detail','description':a14_0x26e351(0x95),'risk':a14_0x26e351(0x9a),'flags':[{...NAME_FLAG,'required':!![],'description':a14_0x26e351(0xa3)}],async 'execute'(_0x24efaf){const _0x22c3fb=a14_0x26e351,_0x1b57fb=await getBffEndpointContract(_0x24efaf[_0x22c3fb(0x9d)],_0x24efaf[_0x22c3fb(0x91)]('name'));return{'ok':!![],'data':{'appCode':_0x1b57fb['appCode'],'functionName':_0x1b57fb[_0x22c3fb(0x96)],'description':_0x1b57fb['description']||_0x22c3fb(0xa0),'version':_0x1b57fb[_0x22c3fb(0x98)],'gmtModified':_0x1b57fb['gmtModified']}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x18eabb=a15_0x5d53;(function(_0x629f52,_0x3030a1){const _0x42d77a=a15_0x5d53,_0x254911=_0x629f52();while(!![]){try{const _0x5ec694=parseInt(_0x42d77a(0x136))/0x1+parseInt(_0x42d77a(0x12c))/0x2*(parseInt(_0x42d77a(0x139))/0x3)+-parseInt(_0x42d77a(0x134))/0x4*(parseInt(_0x42d77a(0x138))/0x5)+-parseInt(_0x42d77a(0x132))/0x6*(parseInt(_0x42d77a(0x131))/0x7)+-parseInt(_0x42d77a(0x135))/0x8*(-parseInt(_0x42d77a(0x133))/0x9)+parseInt(_0x42d77a(0x12a))/0xa+parseInt(_0x42d77a(0x12b))/0xb;if(_0x5ec694===_0x3030a1)break;else _0x254911['push'](_0x254911['shift']());}catch(_0x421fd3){_0x254911['push'](_0x254911['shift']());}}}(a15_0x6b0a,0x3bb1e));import{executeSdkBff}from'../../core/sdk-client.js';function a15_0x6b0a(){const _0x470cee=['BFF\x20executed\x20in\x20','2448700cAElbM','2778270KSZDlK','251098pDIayi','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','bff','exec','BFF\x20function\x20name\x20to\x20execute','3013290UUITTI','6YybRmx','12483niLGrw','5524xpIOXc','216ImHlIc','416413VGYBqO','params','1455jkstkF','3SBAJmk','str','now','read'];a15_0x6b0a=function(){return _0x470cee;};return a15_0x6b0a();}import{parseJsonParams}from'../../utils/params.js';function a15_0x5d53(_0xfb2ee8,_0x2a3314){_0xfb2ee8=_0xfb2ee8-0x12a;const _0x6b0afc=a15_0x6b0a();let _0x5d536b=_0x6b0afc[_0xfb2ee8];return _0x5d536b;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a15_0x18eabb(0x12e),'command':a15_0x18eabb(0x12f),'description':a15_0x18eabb(0x12d),'risk':a15_0x18eabb(0x13c),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x18eabb(0x130)},PARAMS_FLAG],async 'execute'(_0x555cf9){const _0x39a880=a15_0x18eabb,_0x4e52da=parseJsonParams(_0x555cf9[_0x39a880(0x13a)](_0x39a880(0x137))),_0x4d316b=Date[_0x39a880(0x13b)](),_0x3e4e03=await executeSdkBff(_0x555cf9[_0x39a880(0x13a)]('name'),_0x4e52da),_0x11d8a7=Date[_0x39a880(0x13b)]()-_0x4d316b;return{'ok':!![],'data':{'result':_0x3e4e03,'elapsed':_0x11d8a7},'message':_0x39a880(0x13d)+_0x11d8a7+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a16_0x7301(_0x111065,_0x1f5ee4){_0x111065=_0x111065-0x6d;const _0x54654e=a16_0x5465();let _0x73011e=_0x54654e[_0x111065];return _0x73011e;}(function(_0x46a11d,_0x10dec2){const _0x154744=a16_0x7301,_0x883f34=_0x46a11d();while(!![]){try{const _0x3069bd=parseInt(_0x154744(0x71))/0x1*(parseInt(_0x154744(0x77))/0x2)+-parseInt(_0x154744(0x72))/0x3+-parseInt(_0x154744(0x6f))/0x4*(parseInt(_0x154744(0x6e))/0x5)+parseInt(_0x154744(0x78))/0x6*(parseInt(_0x154744(0x6d))/0x7)+parseInt(_0x154744(0x75))/0x8+-parseInt(_0x154744(0x73))/0x9*(-parseInt(_0x154744(0x74))/0xa)+-parseInt(_0x154744(0x76))/0xb*(-parseInt(_0x154744(0x70))/0xc);if(_0x3069bd===_0x10dec2)break;else _0x883f34['push'](_0x883f34['shift']());}catch(_0x21589b){_0x883f34['push'](_0x883f34['shift']());}}}(a16_0x5465,0xb4804));import{bffDetail}from'../../commands/bff/detail.js';function a16_0x5465(){const _0x211652=['143mvdUrQ','2fcxaxS','11742pqEwnW','1743MHIsUX','2223820UVddLk','4yENPdK','261756AnCKAP','1031545PtmFtX','3880479DVWMgM','45SKUJLO','137630KXAcoK','4850936sXNEwR'];a16_0x5465=function(){return _0x211652;};return a16_0x5465();}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a17_0x28b7(_0x4885a4,_0x34ce1e){_0x4885a4=_0x4885a4-0xe6;const _0x49583a=a17_0x4958();let _0x28b79d=_0x49583a[_0x4885a4];return _0x28b79d;}const a17_0x67eedd=a17_0x28b7;(function(_0xcd90e2,_0x5bcdd8){const _0x33486c=a17_0x28b7,_0xe251ba=_0xcd90e2();while(!![]){try{const _0x1027b5=parseInt(_0x33486c(0xe8))/0x1*(-parseInt(_0x33486c(0xe9))/0x2)+parseInt(_0x33486c(0xfc))/0x3+parseInt(_0x33486c(0xf5))/0x4+parseInt(_0x33486c(0xf7))/0x5+parseInt(_0x33486c(0xea))/0x6*(parseInt(_0x33486c(0xfa))/0x7)+parseInt(_0x33486c(0xef))/0x8*(-parseInt(_0x33486c(0xeb))/0x9)+parseInt(_0x33486c(0xf9))/0xa*(-parseInt(_0x33486c(0x100))/0xb);if(_0x1027b5===_0x5bcdd8)break;else _0xe251ba['push'](_0xe251ba['shift']());}catch(_0x58aa05){_0xe251ba['push'](_0xe251ba['shift']());}}}(a17_0x4958,0x48af4));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a17_0x67eedd(0xf1),'command':a17_0x67eedd(0xfe),'description':a17_0x67eedd(0xf2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x549053){const _0x4cd295=a17_0x67eedd;logger['setLogPath'](process[_0x4cd295(0xe7)]()),logger[_0x4cd295(0xff)](_0x4cd295(0xfb),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {LOVRABET_SKILL_SOURCE:_0x1d2190,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x1acce5,runNpxSkillsAddGlobal:_0x1fb973}=await import(_0x4cd295(0xed)),_0x1e101b=_0x549053[_0x4cd295(0xee)]?'pipe':_0x4cd295(0xf8);console[_0x4cd295(0xe6)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20'+_0x1d2190+_0x4cd295(0xec));const _0x218d6e=_0x1fb973(process['cwd'](),_0x1d2190,{'stdio':_0x1e101b});if(_0x218d6e[_0x4cd295(0xf4)])console['log'](_0x4cd295(0xfd)+_0x1acce5+_0x4cd295(0x102));else{if(_0x218d6e['ok'])console[_0x4cd295(0xe6)](_0x4cd295(0x101));else throw CliErrors[_0x4cd295(0xf6)]('npx\x20skills\x20add\x20failed:\x20'+(_0x218d6e[_0x4cd295(0x103)]||'unknown'),_0x4cd295(0xf3)+_0x1d2190+_0x4cd295(0xf0));}return{'ok':!![]};}}];function a17_0x4958(){const _0x292170=['nonInteractive','1720MYwCjk','\x20-g\x20-y','cli-skill','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','skipped','334972nvfgYW','apiError','998080WDUuxj','inherit','1090ttoWiw','52787OjBFhM','cli-skill-install','1351362skMXXA','Skipped\x20npx\x20(','install','info','28831tNtXFt','CLI\x20Built-in\x20Skill\x20installed','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','error','log','cwd','8VQrobe','1694AohWCk','318STVpPe','22743tXgTkr','\x20-g\x20-y)...','../../skills/npx-skills-add.js'];a17_0x4958=function(){return _0x292170;};return a17_0x4958();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f779d,_0x4c6b65){const _0x5247e5=a18_0x4eb2,_0x2473ae=_0x4f779d();while(!![]){try{const _0x54f92a=parseInt(_0x5247e5(0x178))/0x1+parseInt(_0x5247e5(0x16c))/0x2*(parseInt(_0x5247e5(0x16f))/0x3)+parseInt(_0x5247e5(0x170))/0x4*(parseInt(_0x5247e5(0x174))/0x5)+-parseInt(_0x5247e5(0x16e))/0x6+parseInt(_0x5247e5(0x172))/0x7+parseInt(_0x5247e5(0x171))/0x8+-parseInt(_0x5247e5(0x175))/0x9;if(_0x54f92a===_0x4c6b65)break;else _0x2473ae['push'](_0x2473ae['shift']());}catch(_0x532247){_0x2473ae['push'](_0x2473ae['shift']());}}}(a18_0x4432,0x2daae));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';function a18_0x4432(){const _0x33c82e=['Not\x20inside\x20a\x20project\x20(no\x20','project-default','global-default','Add\x20--global\x20to\x20write\x20to\x20~/','inProject','2WAUTWh','Use\x20only\x20one\x20config\x20scope\x20flag.','1378086TzHIbb','651789ysGPUa','12cCZhih','2618008tTjixZ','592284EjpBWK','global','304805xIzEKD','4138587TYdWOi','\x20found).','newConfigFileName','64569PSaBIG','validation','\x20(global)'];a18_0x4432=function(){return _0x33c82e;};return a18_0x4432();}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(_0x20af4c){const _0x350007=a18_0x4eb2,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x2c9de3}=_0x20af4c;if(explicitGlobal&&explicitProject)throw CliErrors[_0x350007(0x179)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x350007(0x16d));if(explicitGlobal)return'global';if(explicitProject)return'project';switch(_0x2c9de3){case _0x350007(0x169):return _0x350007(0x173);case _0x350007(0x168):return _0x20af4c[_0x350007(0x16b)]??isInProject()?'project':'global';case'project-or-global-explicit':if(!(_0x20af4c[_0x350007(0x16b)]??isInProject()))throw CliErrors[_0x350007(0x179)](_0x350007(0x167)+PRODUCT_CONFIG[_0x350007(0x177)]+_0x350007(0x176),_0x350007(0x16a)+PRODUCT_CONFIG[_0x350007(0x177)]+',\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return'project';}}export function toScopeFlags(_0x1a4582){const _0x27efd3=a18_0x4eb2;return{'global':_0x1a4582===_0x27efd3(0x173)};}function a18_0x4eb2(_0x180fa5,_0xd2b284){_0x180fa5=_0x180fa5-0x167;const _0x4432ef=a18_0x4432();let _0x4eb2df=_0x4432ef[_0x180fa5];return _0x4eb2df;}export function formatScopeLabel(_0x354992){const _0x199c74=a18_0x4eb2;return _0x354992===_0x199c74(0x173)?_0x199c74(0x17a):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a19_0x4020(){const _0x4f0575=['Remove\x20all\x20but\x20one.','764406NBkwvX','44681XWrUaZ','78tFsTXY','\x20is\x20allowed,\x20found:\x20','651884XwFcYJ','length','Provide\x20one\x20of:\x20','test','str','join',':\x20expected\x20','filter','3326013NbAQJJ','\x20are\x20mutually\x20exclusive\x20for\x20`','Only\x20one\x20of\x20','3693mvcGti',',\x20got\x20\x22','Flags\x20','some','flag','map','1054870KFjNkn','684711oaAysE','Use\x20only\x20one\x20of:\x20','validation','104oHibCZ','At\x20least\x20one\x20of\x20','Exactly\x20one\x20of\x20'];a19_0x4020=function(){return _0x4f0575;};return a19_0x4020();}(function(_0x57973d,_0x2bd8f9){const _0x3db99d=a19_0x3310,_0x9433ba=_0x57973d();while(!![]){try{const _0x5801a5=parseInt(_0x3db99d(0x94))/0x1*(parseInt(_0x3db99d(0xa4))/0x2)+-parseInt(_0x3db99d(0x9b))/0x3+parseInt(_0x3db99d(0xa6))/0x4+parseInt(_0x3db99d(0x9a))/0x5+parseInt(_0x3db99d(0xa2))/0x6+-parseInt(_0x3db99d(0xa3))/0x7*(-parseInt(_0x3db99d(0x9e))/0x8)+-parseInt(_0x3db99d(0x91))/0x9;if(_0x5801a5===_0x2bd8f9)break;else _0x9433ba['push'](_0x9433ba['shift']());}catch(_0x4901ea){_0x9433ba['push'](_0x9433ba['shift']());}}}(a19_0x4020,0x1fdfe));import{CliErrors}from'../../errors.js';function isSet(_0x8d92a0,_0x29ecd6){const _0x52a210=a19_0x3310,_0x530faa=_0x8d92a0[_0x52a210(0x98)](_0x29ecd6);return _0x530faa!==undefined&&_0x530faa!==''&&_0x530faa!==![]&&_0x530faa!==0x0;}function fmtNames(_0x41d49d){const _0x3dff48=a19_0x3310;return _0x41d49d[_0x3dff48(0x99)](_0x4810c6=>'--'+_0x4810c6)[_0x3dff48(0x8e)](',\x20');}export function requireOneOf(_0x20afe5,_0x1c50f2,_0x3f07e7){const _0x2748c0=a19_0x3310,_0xa50863=_0x1c50f2[_0x2748c0(0x90)](_0x5c8c15=>isSet(_0x20afe5,_0x5c8c15));if(_0xa50863[_0x2748c0(0xa7)]!==0x1)throw CliErrors[_0x2748c0(0x9d)](_0xa50863[_0x2748c0(0xa7)]===0x0?_0x2748c0(0xa0)+fmtNames(_0x1c50f2)+'\x20is\x20required\x20for\x20`'+_0x3f07e7+'`.':_0x2748c0(0x93)+fmtNames(_0x1c50f2)+_0x2748c0(0xa5)+fmtNames(_0xa50863)+'.',_0xa50863['length']===0x0?_0x2748c0(0xa8)+fmtNames(_0x1c50f2):_0x2748c0(0xa1));}export function requireAnyOf(_0x52bc79,_0x5671d6,_0x288393){const _0x12f9ce=a19_0x3310;if(!_0x5671d6[_0x12f9ce(0x97)](_0x5712ba=>isSet(_0x52bc79,_0x5712ba)))throw CliErrors['validation'](_0x12f9ce(0x9f)+fmtNames(_0x5671d6)+'\x20is\x20required\x20for\x20`'+_0x288393+'`.',_0x12f9ce(0xa8)+fmtNames(_0x5671d6));}function a19_0x3310(_0x47ed58,_0x2abd2f){_0x47ed58=_0x47ed58-0x8d;const _0x4020c7=a19_0x4020();let _0x33107b=_0x4020c7[_0x47ed58];return _0x33107b;}export function mutuallyExclusive(_0x3706e0,_0x4a76c3,_0x3bbb5f){const _0x3bdd21=a19_0x3310,_0x46e976=_0x4a76c3[_0x3bdd21(0x90)](_0x1b6452=>isSet(_0x3706e0,_0x1b6452));if(_0x46e976[_0x3bdd21(0xa7)]>0x1)throw CliErrors[_0x3bdd21(0x9d)](_0x3bdd21(0x96)+fmtNames(_0x46e976)+_0x3bdd21(0x92)+_0x3bbb5f+'`.',_0x3bdd21(0x9c)+fmtNames(_0x4a76c3));}export function validatePattern(_0x294941,_0x49e37f,_0x20005a,_0x21095b){const _0xf4f6ec=a19_0x3310,_0x46f868=_0x294941[_0xf4f6ec(0x8d)](_0x49e37f);if(_0x46f868&&!_0x20005a[_0xf4f6ec(0xa9)](_0x46f868))throw CliErrors[_0xf4f6ec(0x9d)]('Invalid\x20--'+_0x49e37f+_0xf4f6ec(0x8f)+_0x21095b+_0xf4f6ec(0x95)+_0x46f868+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x1a0d75=a20_0x9416;function a20_0x2eb8(){const _0x84c14b=['194622awIxmK','52278hLwaLH','string','37416hjKmHI','name','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','verbose','8967123KsnGQt','Resource\x20name\x20for\x20lookup','Dataset\x20code\x20(32-char\x20hex\x20UUID)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1099OIFuYe','number','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','params','3546040PHONbq','sqlcode','613742ljnzRs','3621303NNlxPR','Return\x20full\x20raw\x20response\x20object','40diekHY'];a20_0x2eb8=function(){return _0x84c14b;};return a20_0x2eb8();}(function(_0x2b46a3,_0x35af7e){const _0x25297d=a20_0x9416,_0x2bf623=_0x2b46a3();while(!![]){try{const _0x3710d8=-parseInt(_0x25297d(0x1a1))/0x1+parseInt(_0x25297d(0x190))/0x2+parseInt(_0x25297d(0x1a2))/0x3+parseInt(_0x25297d(0x193))/0x4*(parseInt(_0x25297d(0x18f))/0x5)+parseInt(_0x25297d(0x191))/0x6*(parseInt(_0x25297d(0x19b))/0x7)+-parseInt(_0x25297d(0x19f))/0x8+-parseInt(_0x25297d(0x197))/0x9;if(_0x3710d8===_0x35af7e)break;else _0x2bf623['push'](_0x2bf623['shift']());}catch(_0x4688db){_0x2bf623['push'](_0x2bf623['shift']());}}}(a20_0x2eb8,0xa9651));export const CODE_FLAG={'name':'code','type':a20_0x1a0d75(0x192),'required':!![],'description':a20_0x1a0d75(0x199),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a20_0x1a0d75(0x195)}};export const SQLCODE_FLAG={'name':a20_0x1a0d75(0x1a0),'type':a20_0x1a0d75(0x192),'required':!![],'description':a20_0x1a0d75(0x19a),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x1a0d75(0x19d)}};export const VERBOSE_FLAG={'name':a20_0x1a0d75(0x196),'type':'boolean','description':a20_0x1a0d75(0x18e)};export const PARAMS_FLAG={'name':a20_0x1a0d75(0x19e),'type':a20_0x1a0d75(0x192),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a20_0x1a0d75(0x194),'type':'string','description':a20_0x1a0d75(0x198)};function a20_0x9416(_0x121bf2,_0x238a27){_0x121bf2=_0x121bf2-0x18e;const _0x2eb8e9=a20_0x2eb8();let _0x9416df=_0x2eb8e9[_0x121bf2];return _0x9416df;}export const ID_FLAG={'name':'id','type':a20_0x1a0d75(0x19c),'required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x9867bc,_0x1f050a){const _0x2aa148=a21_0x3317,_0x5cce1a=_0x9867bc();while(!![]){try{const _0x34e20d=parseInt(_0x2aa148(0xa5))/0x1+-parseInt(_0x2aa148(0xa2))/0x2+-parseInt(_0x2aa148(0xa1))/0x3+parseInt(_0x2aa148(0x9c))/0x4+-parseInt(_0x2aa148(0x9d))/0x5+-parseInt(_0x2aa148(0xa4))/0x6*(-parseInt(_0x2aa148(0x99))/0x7)+parseInt(_0x2aa148(0xa7))/0x8;if(_0x34e20d===_0x1f050a)break;else _0x5cce1a['push'](_0x5cce1a['shift']());}catch(_0x38e7d2){_0x5cce1a['push'](_0x5cce1a['shift']());}}}(a21_0x4bc2,0x7fd9e));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a21_0x3317(_0x17d1bb,_0x24d161){_0x17d1bb=_0x17d1bb-0x98;const _0x4bc276=a21_0x4bc2();let _0x3317be=_0x4bc276[_0x17d1bb];return _0x3317be;}function a21_0x4bc2(){const _0x4566e1=['846915ZrSLMH','2008146tJWgAM','validation','90qlZKWh','872530iAtcUD','isFile','7950192fUDXRE','toFixed','ceil','165333uhQkwM','size','\x20path\x20is\x20required.','1639924ACzVCH','4102570zPlfCd','trim','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20not\x20found:\x20'];a21_0x4bc2=function(){return _0x4566e1;};return a21_0x4bc2();}function formatBytes(_0x4bacde){const _0x44a01e=a21_0x3317;if(_0x4bacde>=BYTES_PER_MB){const _0x3eec42=Math[_0x44a01e(0x98)](_0x4bacde/BYTES_PER_MB*0x64)/0x64;return _0x3eec42[_0x44a01e(0xa8)](0x2)+'\x20MB';}return _0x4bacde+'\x20B';}export function requireRuntimeUploadFile(_0x5c7ce3,_0x53a4b8){const _0x3b0947=a21_0x3317,_0x3d4829=_0x5c7ce3[_0x3b0947(0x9e)]();if(!_0x3d4829)throw CliErrors[_0x3b0947(0xa3)](_0x53a4b8+_0x3b0947(0x9b));if(!existsSync(_0x3d4829))throw CliErrors['validation'](_0x3b0947(0xa0)+_0x3d4829);const _0xde801=statSync(_0x3d4829);if(!_0xde801[_0x3b0947(0xa6)]())throw CliErrors[_0x3b0947(0xa3)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x3d4829);if(_0xde801[_0x3b0947(0x9a)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x3b0947(0xa3)](_0x3b0947(0x9f)+_0x3d4829+'\x20('+formatBytes(_0xde801[_0x3b0947(0x9a)])+')');return{'path':_0x3d4829,'size':_0xde801[_0x3b0947(0x9a)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x1d4a2e=a22_0xa416;function a22_0x3c22(){const _0x426f91=['Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x22.\x20Allowed:\x20','10582317ZPJldQ','Top-level\x20key\x20\x22','bool','read','\x22\x20is\x20not\x20settable.','10GalayY','656571aGkcfS','length','global','Set\x20a\x20config\x20value','Usage:\x20','pretty','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20config\x20set\x20<key>\x20<value>\x20[--global]','Invalid\x20value\x20for\x20\x22','Key\x20not\x20found:\x20','Settable\x20keys:\x20','field','Missing\x20key\x20argument.','pageSize\x20must\x20be\x20a\x20positive\x20number','log','1073534ybUyFZ','stringify','key','66XXpZmI','Write\x20to\x20global\x20config','Deleted\x20`','apps','\x20(global)','pageSize','project-or-global-explicit','\x20config\x20delete\x20<key>\x20[--global]','split','20hnIjgT','validation','441560zBPCqe','`\x20=\x20\x22','Set\x20`','alias','Missing\x20key\x20or\x20value.','isArray','config','trim','8752392FWMGRM','object','keys','args','\x20\x20project:\x20','741005vFfwUR','list','../../context.js','Value\x20to\x20assign','appcode','riskLevel','605705fCPsib','raw','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','includes'];a22_0x3c22=function(){return _0x426f91;};return a22_0x3c22();}(function(_0x36cd74,_0x2556e9){const _0x1ff781=a22_0xa416,_0x5c5c3a=_0x36cd74();while(!![]){try{const _0x3adddc=parseInt(_0x1ff781(0x19a))/0x1+parseInt(_0x1ff781(0x1c3))/0x2+parseInt(_0x1ff781(0x1a6))/0x3+parseInt(_0x1ff781(0x1c1))/0x4*(-parseInt(_0x1ff781(0x1d0))/0x5)+-parseInt(_0x1ff781(0x1b8))/0x6*(parseInt(_0x1ff781(0x1b5))/0x7)+parseInt(_0x1ff781(0x1cb))/0x8+parseInt(_0x1ff781(0x1a0))/0x9*(parseInt(_0x1ff781(0x1a5))/0xa);if(_0x3adddc===_0x2556e9)break;else _0x5c5c3a['push'](_0x5c5c3a['shift']());}catch(_0x340763){_0x5c5c3a['push'](_0x5c5c3a['shift']());}}}(a22_0x3c22,0xd89b1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';function a22_0xa416(_0x70b33f,_0x3d98d6){_0x70b33f=_0x70b33f-0x196;const _0x3c225f=a22_0x3c22();let _0xa416bf=_0x3c225f[_0x70b33f];return _0xa416bf;}import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a22_0x1d4a2e(0x1a8),'type':'boolean','description':a22_0x1d4a2e(0x1b9),'default':![]};function parseAliasAppcodeSetKey(_0x450b12){const _0x26d33f=a22_0x1d4a2e,_0x198657=_0x450b12['split']('.');if(_0x198657[_0x26d33f(0x1a7)]!==0x3||_0x198657[0x0]!==_0x26d33f(0x1bb)||_0x198657[0x2]!==_0x26d33f(0x198))return undefined;const _0x208ffe=_0x198657[0x1]?.[_0x26d33f(0x1ca)]();return _0x208ffe?_0x208ffe:undefined;}function parseAliasDeleteKey(_0x1837b8){const _0x247233=a22_0x1d4a2e,_0x3dd808=_0x1837b8[_0x247233(0x1c0)]('.');if(_0x3dd808['length']===0x2&&_0x3dd808[0x0]===_0x247233(0x1bb)){const _0x23121c=_0x3dd808[0x1]?.[_0x247233(0x1ca)]();return _0x23121c?{'alias':_0x23121c}:undefined;}if(_0x3dd808[_0x247233(0x1a7)]===0x3&&_0x3dd808[0x0]===_0x247233(0x1bb)&&_0x3dd808[0x2]==='appcode'){const _0x572ecd=_0x3dd808[0x1]?.['trim']();return _0x572ecd?{'alias':_0x572ecd,'field':_0x247233(0x198)}:undefined;}return undefined;}function setLocalAppAlias(_0x5b8d27,_0xe6035a,_0x5bc573){const _0x5b87d5=a22_0x1d4a2e,_0x495901=_0x5b8d27[_0x5b87d5(0x1bb)]&&typeof _0x5b8d27[_0x5b87d5(0x1bb)]===_0x5b87d5(0x1cc)&&!Array['isArray'](_0x5b8d27[_0x5b87d5(0x1bb)])?_0x5b8d27[_0x5b87d5(0x1bb)]:{},_0x32561b=_0x495901[_0xe6035a]&&typeof _0x495901[_0xe6035a]===_0x5b87d5(0x1cc)&&!Array[_0x5b87d5(0x1c8)](_0x495901[_0xe6035a])?_0x495901[_0xe6035a]:{};_0x32561b[_0x5b87d5(0x198)]=_0x5bc573,_0x495901[_0xe6035a]=_0x32561b,_0x5b8d27[_0x5b87d5(0x1bb)]=_0x495901;}function deleteLocalAppAlias(_0x2032af,_0x3fd0eb){const _0x27e71d=a22_0x1d4a2e;if(!_0x2032af[_0x27e71d(0x1bb)]||typeof _0x2032af[_0x27e71d(0x1bb)]!==_0x27e71d(0x1cc)||Array[_0x27e71d(0x1c8)](_0x2032af['apps']))return![];const _0x1fa681=_0x2032af[_0x27e71d(0x1bb)],_0x5ae4b8=_0x1fa681[_0x3fd0eb[_0x27e71d(0x1c6)]];if(!_0x5ae4b8||typeof _0x5ae4b8!==_0x27e71d(0x1cc)||Array[_0x27e71d(0x1c8)](_0x5ae4b8))return![];if(!_0x3fd0eb[_0x27e71d(0x1b1)])return delete _0x1fa681[_0x3fd0eb[_0x27e71d(0x1c6)]],!![];if(!(_0x3fd0eb[_0x27e71d(0x1b1)]in _0x5ae4b8))return![];return delete _0x5ae4b8[_0x3fd0eb['field']],Object[_0x27e71d(0x1cd)](_0x5ae4b8)[_0x27e71d(0x1a7)]===0x0&&delete _0x1fa681[_0x3fd0eb[_0x27e71d(0x1c6)]],!![];}const listDef={'service':a22_0x1d4a2e(0x1c9),'command':a22_0x1d4a2e(0x1d1),'description':'List\x20current\x20config','risk':a22_0x1d4a2e(0x1a3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x344adc){const _0x184b0a=a22_0x1d4a2e,{buildConfigFromFlags:_0x24f38d}=await import(_0x184b0a(0x196)),_0x240881=_0x24f38d({}),_0x5aaeef=getProjectConfigPath(),_0x57732b=resolveWriteConfigPath(_0x184b0a(0x1a8));if(_0x344adc['format']===_0x184b0a(0x1ab))return{'ok':!![],'message':_0x184b0a(0x19c)+(JSON['stringify'](_0x240881[_0x184b0a(0x19b)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x184b0a(0x1cf)+(_0x5aaeef??'(none)')+'\x0a')+('\x20\x20global:\x20\x20'+_0x57732b)};return{'ok':!![],'data':{'effective':_0x240881[_0x184b0a(0x19b)],'configFiles':{'project':_0x5aaeef??null,'global':_0x57732b}}};}},getDef={'service':'config','command':'get','description':'Get\x20a\x20config\x20value','risk':a22_0x1d4a2e(0x1a3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x1d4a2e(0x1b7),'description':a22_0x1d4a2e(0x19e),'required':!![]}],'flags':[],async 'execute'(_0x51b0b1){const _0x3f066=a22_0x1d4a2e,_0xfa00b5=_0x51b0b1[_0x3f066(0x1ce)][0x0];if(!_0xfa00b5)throw CliErrors[_0x3f066(0x1c2)](_0x3f066(0x1b2),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x5be0fd}=await import(_0x3f066(0x196)),{raw:_0xc47279}=_0x5be0fd({});if(_0xfa00b5[_0x3f066(0x19d)]('.')){const _0x3fc8a3=_0xfa00b5[_0x3f066(0x1c0)]('.');let _0x5ded1c=_0xc47279;for(const _0x328f8b of _0x3fc8a3){if(_0x5ded1c==null||typeof _0x5ded1c!==_0x3f066(0x1cc))throw CliErrors[_0x3f066(0x1c2)](_0x3f066(0x1af)+_0xfa00b5);_0x5ded1c=_0x5ded1c[_0x328f8b];}if(_0x5ded1c===undefined)throw CliErrors[_0x3f066(0x1c2)](_0x3f066(0x1af)+_0xfa00b5);return console[_0x3f066(0x1b4)](typeof _0x5ded1c==='object'?JSON[_0x3f066(0x1b6)](_0x5ded1c,null,0x2):String(_0x5ded1c)),{'ok':!![]};}const _0x3e832c=_0xc47279[_0xfa00b5];if(_0x3e832c===undefined)throw CliErrors[_0x3f066(0x1c2)](_0x3f066(0x1af)+_0xfa00b5);return console['log'](typeof _0x3e832c===_0x3f066(0x1cc)?JSON[_0x3f066(0x1b6)](_0x3e832c,null,0x2):String(_0x3e832c)),{'ok':!![]};}},setDef={'service':a22_0x1d4a2e(0x1c9),'command':'set','description':a22_0x1d4a2e(0x1a9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x1d4a2e(0x1b7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a22_0x1d4a2e(0x197),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x55f156){const _0x22e28c=a22_0x1d4a2e,_0x22d8ef=_0x55f156['args'][0x0],_0x379438=_0x55f156[_0x22e28c(0x1ce)][0x1];if(!_0x22d8ef||_0x379438===undefined)throw CliErrors['validation'](_0x22e28c(0x1c7),_0x22e28c(0x1aa)+CLI_BIN_NAME+_0x22e28c(0x1ad));if(ENUM_KEYS[_0x22d8ef]&&!ENUM_KEYS[_0x22d8ef]['includes'](_0x379438))throw CliErrors[_0x22e28c(0x1c2)](_0x22e28c(0x1ae)+_0x22d8ef+_0x22e28c(0x19f)+ENUM_KEYS[_0x22d8ef]['join'](',\x20'));if(_0x22d8ef===_0x22e28c(0x199))throw CliErrors[_0x22e28c(0x1c2)](_0x22e28c(0x1ac));if(_0x22d8ef===_0x22e28c(0x1bd)){const _0x2d13af=Number(_0x379438);if(isNaN(_0x2d13af)||_0x2d13af<=0x0)throw CliErrors['validation'](_0x22e28c(0x1b3));}const _0x1f5643=resolveWriteScope({'explicitGlobal':_0x55f156[_0x22e28c(0x1a2)](_0x22e28c(0x1a8)),'policy':_0x22e28c(0x1be)}),_0x4584d7=toScopeFlags(_0x1f5643),_0x200cc4=readScopedConfig(_0x4584d7),_0x324d42=parseAliasAppcodeSetKey(_0x22d8ef);if(!_0x324d42&&!isTopLevelConfigKey(_0x22d8ef))throw CliErrors[_0x22e28c(0x1c2)](_0x22e28c(0x1a1)+_0x22d8ef+_0x22e28c(0x1a4),_0x22e28c(0x1b0)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x324d42?setLocalAppAlias(_0x200cc4,_0x324d42,_0x379438):_0x200cc4[_0x22d8ef]=_0x22d8ef===_0x22e28c(0x1bd)?Number(_0x379438):_0x379438,console[_0x22e28c(0x1b4)](_0x22e28c(0x1c5)+_0x22d8ef+_0x22e28c(0x1c4)+_0x379438+'\x22'+(_0x1f5643==='global'?_0x22e28c(0x1bc):'')),writeScopedConfig(_0x200cc4,_0x4584d7),{'ok':!![]};}},deleteDef={'service':a22_0x1d4a2e(0x1c9),'command':'delete','description':'Delete\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x232004){const _0x1201f9=a22_0x1d4a2e,_0x33f55c=_0x232004['args'][0x0];if(!_0x33f55c)throw CliErrors[_0x1201f9(0x1c2)]('Missing\x20key\x20argument.',_0x1201f9(0x1aa)+CLI_BIN_NAME+_0x1201f9(0x1bf));const _0x29b6b7=resolveWriteScope({'explicitGlobal':_0x232004[_0x1201f9(0x1a2)](_0x1201f9(0x1a8)),'policy':_0x1201f9(0x1be)}),_0x4c76bc=toScopeFlags(_0x29b6b7),_0x53b5ad=readScopedConfig(_0x4c76bc),_0x40668c=parseAliasDeleteKey(_0x33f55c);if(_0x40668c){if(!deleteLocalAppAlias(_0x53b5ad,_0x40668c))throw CliErrors[_0x1201f9(0x1c2)](_0x1201f9(0x1af)+_0x33f55c);return console[_0x1201f9(0x1b4)]('Deleted\x20`'+_0x33f55c+'`'+(_0x29b6b7===_0x1201f9(0x1a8)?_0x1201f9(0x1bc):'')),writeScopedConfig(_0x53b5ad,_0x4c76bc),{'ok':!![]};}if(_0x53b5ad[_0x33f55c]===undefined)throw CliErrors[_0x1201f9(0x1c2)]('Key\x20\x22'+_0x33f55c+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x53b5ad[_0x33f55c],console[_0x1201f9(0x1b4)](_0x1201f9(0x1ba)+_0x33f55c+'`'+(_0x29b6b7==='global'?_0x1201f9(0x1bc):'')),writeScopedConfig(_0x53b5ad,_0x4c76bc),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x58544c=a22_0x534e;function a22_0x534e(_0xbc77b8,_0x464dc8){_0xbc77b8=_0xbc77b8-0xf4;const _0x145184=a22_0x1451();let _0x534eb6=_0x145184[_0xbc77b8];return _0x534eb6;}(function(_0x329157,_0x248f4f){const _0x329f51=a22_0x534e,_0x2c1e38=_0x329157();while(!![]){try{const _0x3944d2=-parseInt(_0x329f51(0x116))/0x1*(-parseInt(_0x329f51(0x112))/0x2)+parseInt(_0x329f51(0x128))/0x3+parseInt(_0x329f51(0x107))/0x4*(parseInt(_0x329f51(0x117))/0x5)+parseInt(_0x329f51(0xfa))/0x6+parseInt(_0x329f51(0xf7))/0x7+parseInt(_0x329f51(0x124))/0x8*(-parseInt(_0x329f51(0x113))/0x9)+-parseInt(_0x329f51(0x100))/0xa;if(_0x3944d2===_0x248f4f)break;else _0x2c1e38['push'](_0x2c1e38['shift']());}catch(_0xb3e85b){_0x2c1e38['push'](_0x2c1e38['shift']());}}}(a22_0x1451,0xe9336));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_0x58544c(0x130),'type':a22_0x58544c(0x111),'description':'Write\x20to\x20global\x20config','default':![]};function parseAliasAppcodeSetKey(_0x45b3b6){const _0x560669=a22_0x58544c,_0x170730=_0x45b3b6[_0x560669(0x12a)]('.');if(_0x170730[_0x560669(0xf9)]!==0x3||_0x170730[0x0]!==_0x560669(0x10f)||_0x170730[0x2]!==_0x560669(0x110))return undefined;const _0x502292=_0x170730[0x1]?.[_0x560669(0xf6)]();return _0x502292?_0x502292:undefined;}function parseAliasDeleteKey(_0x2aee9c){const _0x4efb4f=a22_0x58544c,_0x5855de=_0x2aee9c['split']('.');if(_0x5855de[_0x4efb4f(0xf9)]===0x2&&_0x5855de[0x0]===_0x4efb4f(0x10f)){const _0x34a86c=_0x5855de[0x1]?.[_0x4efb4f(0xf6)]();return _0x34a86c?{'alias':_0x34a86c}:undefined;}if(_0x5855de[_0x4efb4f(0xf9)]===0x3&&_0x5855de[0x0]===_0x4efb4f(0x10f)&&_0x5855de[0x2]===_0x4efb4f(0x110)){const _0x50b15a=_0x5855de[0x1]?.[_0x4efb4f(0xf6)]();return _0x50b15a?{'alias':_0x50b15a,'field':_0x4efb4f(0x110)}:undefined;}return undefined;}function setLocalAppAlias(_0x15aeda,_0x5dceb5,_0x5926c7){const _0xb33c53=a22_0x58544c,_0xfb223b=_0x15aeda[_0xb33c53(0x10f)]&&typeof _0x15aeda[_0xb33c53(0x10f)]===_0xb33c53(0x118)&&!Array[_0xb33c53(0xfe)](_0x15aeda['apps'])?_0x15aeda[_0xb33c53(0x10f)]:{},_0x4fc473=_0xfb223b[_0x5dceb5]&&typeof _0xfb223b[_0x5dceb5]==='object'&&!Array[_0xb33c53(0xfe)](_0xfb223b[_0x5dceb5])?_0xfb223b[_0x5dceb5]:{};_0x4fc473['appcode']=_0x5926c7,_0xfb223b[_0x5dceb5]=_0x4fc473,_0x15aeda[_0xb33c53(0x10f)]=_0xfb223b;}function deleteLocalAppAlias(_0x16d5d3,_0x99b65){const _0x18741a=a22_0x58544c;if(!_0x16d5d3['apps']||typeof _0x16d5d3[_0x18741a(0x10f)]!=='object'||Array[_0x18741a(0xfe)](_0x16d5d3[_0x18741a(0x10f)]))return![];const _0x1d3e3b=_0x16d5d3['apps'],_0x148e7c=_0x1d3e3b[_0x99b65[_0x18741a(0xfb)]];if(!_0x148e7c||typeof _0x148e7c!==_0x18741a(0x118)||Array['isArray'](_0x148e7c))return![];if(!_0x99b65[_0x18741a(0x103)])return delete _0x1d3e3b[_0x99b65['alias']],!![];if(!(_0x99b65[_0x18741a(0x103)]in _0x148e7c))return![];return delete _0x148e7c[_0x99b65[_0x18741a(0x103)]],Object[_0x18741a(0xf8)](_0x148e7c)[_0x18741a(0xf9)]===0x0&&delete _0x1d3e3b[_0x99b65[_0x18741a(0xfb)]],!![];}const listDef={'service':a22_0x58544c(0x11b),'command':a22_0x58544c(0x108),'description':'List\x20current\x20config','risk':a22_0x58544c(0x12f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5317fa){const _0x2ce321=a22_0x58544c,{buildConfigFromFlags:_0x386185}=await import(_0x2ce321(0x121)),_0x5249c0=_0x386185({}),_0x15b298=getProjectConfigPath(),_0x2a385a=resolveWriteConfigPath(_0x2ce321(0x130));if(_0x5317fa[_0x2ce321(0xfc)]==='pretty')return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x2ce321(0xfd)](_0x5249c0['raw'],null,0x2)+'\x0a\x0a')+_0x2ce321(0x10a)+(_0x2ce321(0x105)+(_0x15b298??_0x2ce321(0x115))+'\x0a')+('\x20\x20global:\x20\x20'+_0x2a385a)};return{'ok':!![],'data':{'effective':_0x5249c0[_0x2ce321(0x126)],'configFiles':{'project':_0x15b298??null,'global':_0x2a385a}}};}},getDef={'service':a22_0x58544c(0x11b),'command':a22_0x58544c(0x104),'description':'Get\x20a\x20config\x20value','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x58544c(0xf5),'description':a22_0x58544c(0x10e),'required':!![]}],'flags':[],async 'execute'(_0x586b79){const _0x1079ec=a22_0x58544c,_0x29737c=_0x586b79[_0x1079ec(0x106)][0x0];if(!_0x29737c)throw CliErrors['validation'](_0x1079ec(0x101),_0x1079ec(0x122)+CLI_BIN_NAME+_0x1079ec(0x10b));const {buildConfigFromFlags:_0x1e54f2}=await import(_0x1079ec(0x121)),{raw:_0x5e503d}=_0x1e54f2({});if(_0x29737c['includes']('.')){const _0x562442=_0x29737c[_0x1079ec(0x12a)]('.');let _0xa42090=_0x5e503d;for(const _0x536323 of _0x562442){if(_0xa42090==null||typeof _0xa42090!==_0x1079ec(0x118))throw CliErrors['validation'](_0x1079ec(0x127)+_0x29737c);_0xa42090=_0xa42090[_0x536323];}if(_0xa42090===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x29737c);return console[_0x1079ec(0x11d)](typeof _0xa42090===_0x1079ec(0x118)?JSON[_0x1079ec(0xfd)](_0xa42090,null,0x2):String(_0xa42090)),{'ok':!![]};}const _0x12ed5d=_0x5e503d[_0x29737c];if(_0x12ed5d===undefined)throw CliErrors[_0x1079ec(0x12e)]('Key\x20not\x20found:\x20'+_0x29737c);return console['log'](typeof _0x12ed5d==='object'?JSON['stringify'](_0x12ed5d,null,0x2):String(_0x12ed5d)),{'ok':!![]};}},setDef={'service':a22_0x58544c(0x11b),'command':a22_0x58544c(0x12d),'description':a22_0x58544c(0x129),'risk':a22_0x58544c(0x11e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x58544c(0x132),'description':a22_0x58544c(0x102),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3db958){const _0x5858f4=a22_0x58544c,_0xa990b=_0x3db958[_0x5858f4(0x106)][0x0],_0x55930e=_0x3db958[_0x5858f4(0x106)][0x1];if(!_0xa990b||_0x55930e===undefined)throw CliErrors[_0x5858f4(0x12e)](_0x5858f4(0x131),_0x5858f4(0x122)+CLI_BIN_NAME+_0x5858f4(0xf4));if(ENUM_KEYS[_0xa990b]&&!ENUM_KEYS[_0xa990b]['includes'](_0x55930e))throw CliErrors[_0x5858f4(0x12e)]('Invalid\x20value\x20for\x20\x22'+_0xa990b+_0x5858f4(0x11a)+ENUM_KEYS[_0xa990b][_0x5858f4(0x125)](',\x20'));if(_0xa990b===_0x5858f4(0x114))throw CliErrors[_0x5858f4(0x12e)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0xa990b===_0x5858f4(0x11c)){const _0x106acf=Number(_0x55930e);if(isNaN(_0x106acf)||_0x106acf<=0x0)throw CliErrors[_0x5858f4(0x12e)](_0x5858f4(0x120));}const _0x56c37c=resolveWriteScope({'explicitGlobal':_0x3db958[_0x5858f4(0x119)]('global'),'policy':'project-or-global-explicit'}),_0x5e74a0=toScopeFlags(_0x56c37c),_0x72db8f=readScopedConfig(_0x5e74a0),_0x6900a6=parseAliasAppcodeSetKey(_0xa990b);if(!_0x6900a6&&!isTopLevelConfigKey(_0xa990b))throw CliErrors[_0x5858f4(0x12e)]('Top-level\x20key\x20\x22'+_0xa990b+_0x5858f4(0x10d),_0x5858f4(0x12b)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x6900a6?setLocalAppAlias(_0x72db8f,_0x6900a6,_0x55930e):_0x72db8f[_0xa990b]=_0xa990b==='pageSize'?Number(_0x55930e):_0x55930e,console[_0x5858f4(0x11d)](_0x5858f4(0xff)+_0xa990b+'`\x20=\x20\x22'+_0x55930e+'\x22'+(_0x56c37c===_0x5858f4(0x130)?'\x20(global)':'')),writeScopedConfig(_0x72db8f,_0x5e74a0),{'ok':!![]};}},deleteDef={'service':a22_0x58544c(0x11b),'command':a22_0x58544c(0x10c),'description':'Delete\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x58544c(0xf5),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x586d61){const _0x404b5d=a22_0x58544c,_0x1154e6=_0x586d61[_0x404b5d(0x106)][0x0];if(!_0x1154e6)throw CliErrors[_0x404b5d(0x12e)](_0x404b5d(0x101),_0x404b5d(0x122)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x42060f=resolveWriteScope({'explicitGlobal':_0x586d61['bool'](_0x404b5d(0x130)),'policy':_0x404b5d(0x11f)}),_0x2afbb9=toScopeFlags(_0x42060f),_0x1e0bfc=readScopedConfig(_0x2afbb9),_0x5a8a18=parseAliasDeleteKey(_0x1154e6);if(_0x5a8a18){if(!deleteLocalAppAlias(_0x1e0bfc,_0x5a8a18))throw CliErrors[_0x404b5d(0x12e)]('Key\x20not\x20found:\x20'+_0x1154e6);return console['log'](_0x404b5d(0x12c)+_0x1154e6+'`'+(_0x42060f===_0x404b5d(0x130)?_0x404b5d(0x123):'')),writeScopedConfig(_0x1e0bfc,_0x2afbb9),{'ok':!![]};}if(_0x1e0bfc[_0x1154e6]===undefined)throw CliErrors[_0x404b5d(0x12e)]('Key\x20\x22'+_0x1154e6+_0x404b5d(0x109));return delete _0x1e0bfc[_0x1154e6],console[_0x404b5d(0x11d)](_0x404b5d(0x12c)+_0x1154e6+'`'+(_0x42060f==='global'?_0x404b5d(0x123):'')),writeScopedConfig(_0x1e0bfc,_0x2afbb9),{'ok':!![]};}};function a22_0x1451(){const _0x1abeca=['Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','apps','appcode','boolean','456206gnTCat','653553fnVVwn','riskLevel','(none)','8HwCVMn','5EEseHL','object','bool','\x22.\x20Allowed:\x20','config','pageSize','log','write','project-or-global-explicit','pageSize\x20must\x20be\x20a\x20positive\x20number','../../context.js','Usage:\x20','\x20(global)','80SZDVDV','join','raw','Key\x20not\x20found:\x20','583695jAXPgs','Set\x20a\x20config\x20value','split','Settable\x20keys:\x20','Deleted\x20`','set','validation','read','global','Missing\x20key\x20or\x20value.','value','\x20config\x20set\x20<key>\x20<value>\x20[--global]','key','trim','8161461VagZnn','keys','length','2553288cXsFhx','alias','format','stringify','isArray','Set\x20`','22394430mMmvda','Missing\x20key\x20argument.','Value\x20to\x20assign','field','get','\x20\x20project:\x20','args','1239772oDDpVX','list','\x22\x20not\x20found\x20at\x20top\x20level.','Config\x20files:\x0a','\x20config\x20get\x20<key>','delete','\x22\x20is\x20not\x20settable.'];a22_0x1451=function(){return _0x1abeca;};return a22_0x1451();}export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d033e,_0x1dc825){var _0x217b02=a23_0x1338,_0x456406=_0x3d033e();while(!![]){try{var _0x6bc08c=parseInt(_0x217b02(0x1eb))/0x1*(parseInt(_0x217b02(0x1e5))/0x2)+parseInt(_0x217b02(0x1e8))/0x3+-parseInt(_0x217b02(0x1e6))/0x4+-parseInt(_0x217b02(0x1ea))/0x5+-parseInt(_0x217b02(0x1e7))/0x6+parseInt(_0x217b02(0x1ec))/0x7+parseInt(_0x217b02(0x1e4))/0x8*(parseInt(_0x217b02(0x1e9))/0x9);if(_0x6bc08c===_0x1dc825)break;else _0x456406['push'](_0x456406['shift']());}catch(_0x202e71){_0x456406['push'](_0x456406['shift']());}}}(a23_0x1b75,0xda4ce));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a23_0x1b75(){var _0x5d2608=['176192QqTwru','2yExzln','3113600EkFAXS','10405128DFiLZd','2226420yYLLwZ','693ALXQmX','5426105nmXpcX','1227504qBVlSS','5785325OnfrIf'];a23_0x1b75=function(){return _0x5d2608;};return a23_0x1b75();}export{readScopedConfig,writeScopedConfig}from'../../context.js';function a23_0x1338(_0x57b645,_0x499672){_0x57b645=_0x57b645-0x1e4;var _0x1b75ba=a23_0x1b75();var _0x1338f6=_0x1b75ba[_0x57b645];return _0x1338f6;}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_0x15e113=a24_0x1ddf;function a24_0x1ddf(_0x5e6c0a,_0x4335d2){_0x5e6c0a=_0x5e6c0a-0x1b0;const _0x5c422c=a24_0x5c42();let _0x1ddf02=_0x5c422c[_0x5e6c0a];return _0x1ddf02;}(function(_0x4e38eb,_0x5037a2){const _0x409956=a24_0x1ddf,_0x4314c8=_0x4e38eb();while(!![]){try{const _0x51a7e6=-parseInt(_0x409956(0x1c6))/0x1*(-parseInt(_0x409956(0x205))/0x2)+-parseInt(_0x409956(0x1d5))/0x3*(-parseInt(_0x409956(0x1d4))/0x4)+parseInt(_0x409956(0x1f3))/0x5*(-parseInt(_0x409956(0x1d2))/0x6)+-parseInt(_0x409956(0x1ff))/0x7+parseInt(_0x409956(0x1f1))/0x8*(parseInt(_0x409956(0x1b2))/0x9)+parseInt(_0x409956(0x1fb))/0xa*(-parseInt(_0x409956(0x1f8))/0xb)+parseInt(_0x409956(0x1d6))/0xc;if(_0x51a7e6===_0x5037a2)break;else _0x4314c8['push'](_0x4314c8['shift']());}catch(_0x114255){_0x4314c8['push'](_0x4314c8['shift']());}}}(a24_0x5c42,0x68043));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a24_0x5c42(){const _0x5a18de=['\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','description','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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','helpExtra','write','\x20on\x20dataset\x20','Get\x20a\x20single\x20record\x20by\x20ID','\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\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','code','high-risk-write','map','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20AGGREGATE\x20TYPES','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','1vjUWqD','delete','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\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}','getOne','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\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}','/api/{appCode}/','length','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','Filter\x20dataset\x20records\x20with\x20query\x20conditions','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','6FjXozE','paramsRequired','1356cosjwO','4965FdZUbs','11356596aIyQhQ','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','filter','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\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\x20EXAMPLES','command','\x20\x20WHERE\x20OPERATORS','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','update','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','batchCreate','POST','str','\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\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','data\x20','read','\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\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\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\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20completed\x20in\x20','1950728qkpVix','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','2707665UGZGUk','body','params','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','\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}}','3751495UOwANi','\x20\x20PAGINATION','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','10mOVcqx','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','build','paramsHint','4083555ytxjTH','\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}}]}','risk','operation','aggregate','now','281450JEyWHH','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20$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]}}','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','batch','\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}}','Preview:\x20data\x20','create','9ERMKhE','Update\x20an\x20existing\x20record'];a24_0x5c42=function(){return _0x5a18de;};return a24_0x5c42();}import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0x15e113(0x1d9),'operation':a24_0x15e113(0x1d9),'risk':'read','paramsRequired':![],'description':a24_0x15e113(0x1d0),'paramsHint':a24_0x15e113(0x1da)+a24_0x15e113(0x1d1),'helpExtra':[a24_0x15e113(0x1df),a24_0x15e113(0x1b4),a24_0x15e113(0x1ee),a24_0x15e113(0x206),'\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a24_0x15e113(0x207),a24_0x15e113(0x1f7),a24_0x15e113(0x1dc),a24_0x15e113(0x20b),'',a24_0x15e113(0x1e0),a24_0x15e113(0x1c3),a24_0x15e113(0x200),'',a24_0x15e113(0x1c8),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a24_0x15e113(0x1bd),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a24_0x15e113(0x1fa),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a24_0x15e113(0x1f9),a24_0x15e113(0x1be),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a24_0x15e113(0x1f2)]['join']('\x0a')},{'command':a24_0x15e113(0x1ca),'operation':a24_0x15e113(0x1ca),'risk':a24_0x15e113(0x1ea),'paramsRequired':!![],'description':a24_0x15e113(0x1bc),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x15e113(0x1b1),'operation':a24_0x15e113(0x1b1),'risk':a24_0x15e113(0x1ba),'paramsRequired':!![],'description':a24_0x15e113(0x1f6),'paramsHint':a24_0x15e113(0x1cf)},{'command':a24_0x15e113(0x1e4),'operation':'batchCreate','risk':a24_0x15e113(0x1ba),'paramsRequired':!![],'description':a24_0x15e113(0x1c5),'paramsHint':a24_0x15e113(0x1fc)},{'command':a24_0x15e113(0x1e2),'operation':'update','risk':'write','paramsRequired':!![],'description':a24_0x15e113(0x1b3),'paramsHint':a24_0x15e113(0x1db)+a24_0x15e113(0x1e3)},{'command':a24_0x15e113(0x1c7),'operation':'delete','risk':a24_0x15e113(0x1c1),'paramsRequired':!![],'description':a24_0x15e113(0x1d7),'paramsHint':a24_0x15e113(0x1ef)},{'command':a24_0x15e113(0x203),'operation':a24_0x15e113(0x203),'risk':a24_0x15e113(0x1ea),'paramsRequired':![],'description':a24_0x15e113(0x208),'paramsHint':a24_0x15e113(0x209)+a24_0x15e113(0x1bf),'helpExtra':[a24_0x15e113(0x1c4),a24_0x15e113(0x1eb),a24_0x15e113(0x1c9),'\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}',a24_0x15e113(0x1cc),a24_0x15e113(0x1ec),a24_0x15e113(0x1e7),a24_0x15e113(0x1e1),'','\x20\x20PARAMS\x20STRUCTURE',a24_0x15e113(0x1cb),a24_0x15e113(0x1b5),'\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_0x15e113(0x1d8),'\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]',a24_0x15e113(0x1ed),'',a24_0x15e113(0x1dd),a24_0x15e113(0x1b7),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a24_0x15e113(0x1b8),'',a24_0x15e113(0x1e8)]['join']('\x0a')}];function makeDataCommand(_0x3b49d2){const _0x175881=a24_0x15e113,_0x20599f=_0x175881(0x1e9)+_0x3b49d2[_0x175881(0x1de)],_0x4b991b={'service':'data','command':_0x3b49d2[_0x175881(0x1de)],'description':_0x3b49d2['description'],'risk':_0x3b49d2[_0x175881(0x201)],'helpExtra':_0x3b49d2[_0x175881(0x1b9)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x3b49d2[_0x175881(0x1fe)]}],'validate':async _0x1c5a25=>{const _0x4c765f=_0x175881;_0x3b49d2[_0x4c765f(0x1d3)]&&requireAnyOf(_0x1c5a25,['params'],_0x20599f),_0x3b49d2['operation']===_0x4c765f(0x1e4)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1c5a25['str'](_0x4c765f(0x1f5)))),_0x3b49d2[_0x4c765f(0x202)]===_0x4c765f(0x1e2)&&parseUpdateIdsFromParams(parseJsonParams(_0x1c5a25['str']('params'))??{});},async 'execute'(_0x3f004b){const _0x325603=_0x175881,_0x321acf=_0x3f004b[_0x325603(0x1e6)](_0x325603(0x1c0)),_0x5b1c13=_0x3b49d2[_0x325603(0x202)]===_0x325603(0x1e4)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3f004b[_0x325603(0x1e6)](_0x325603(0x1f5)))):parseJsonParams(_0x3f004b[_0x325603(0x1e6)](_0x325603(0x1f5)))??{},_0x50ce7d=_0x3b49d2[_0x325603(0x202)]===_0x325603(0x1e2)?parseUpdateIdsFromParams(_0x5b1c13):undefined,_0x119e21=_0x50ce7d?normalizeUpdateParamsForRuntime(_0x5b1c13,_0x50ce7d):_0x5b1c13,_0x3a140a=Date[_0x325603(0x204)](),_0x4d480d=await executeData(_0x321acf,_0x3b49d2[_0x325603(0x202)],_0x119e21),_0x35fa7b=Date[_0x325603(0x204)]()-_0x3a140a,_0x152446=_0x50ce7d&&_0x50ce7d[_0x325603(0x1ce)]>0x1?buildBatchUpdateResult(_0x50ce7d,_0x4d480d):_0x4d480d;return{'ok':!![],'data':{'result':_0x152446,'elapsed':_0x35fa7b},'message':_0x325603(0x1e9)+_0x3b49d2[_0x325603(0x1de)]+_0x325603(0x1f0)+_0x35fa7b+'ms'};}};return _0x3b49d2['risk']!==_0x175881(0x1ea)&&(_0x4b991b['dryRun']=async _0x4bfb63=>{const _0x353ca7=_0x175881,_0x131192=_0x4bfb63[_0x353ca7(0x1e6)]('code'),_0x2ff36d=_0x3b49d2[_0x353ca7(0x202)]===_0x353ca7(0x1e4)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4bfb63[_0x353ca7(0x1e6)](_0x353ca7(0x1f5)))):parseJsonParams(_0x4bfb63[_0x353ca7(0x1e6)](_0x353ca7(0x1f5)))??{};let _0x481673=_0x2ff36d;if(_0x3b49d2[_0x353ca7(0x202)]===_0x353ca7(0x1e2)){const _0x153a53=parseUpdateIdsFromParams(_0x2ff36d);_0x481673=normalizeUpdateParamsForRuntime(_0x2ff36d,_0x153a53);}return dryRun(_0x353ca7(0x1e5),_0x353ca7(0x1cd)+_0x131192+'/'+_0x3b49d2[_0x353ca7(0x202)])[_0x353ca7(0x1f4)](_0x481673)[_0x353ca7(0x1b6)](_0x353ca7(0x1b0)+_0x3b49d2['command']+_0x353ca7(0x1bb)+_0x131192)[_0x353ca7(0x1fd)]();}),_0x4b991b;}export const dataDefinitions=specs[a24_0x15e113(0x1c2)](makeDataCommand);function buildBatchUpdateResult(_0x1ccaf8,_0x38cce8){const _0x4eb087=a24_0x15e113;return{'operation':_0x4eb087(0x1e2),'mode':_0x4eb087(0x20a),'ids':_0x1ccaf8,'total':_0x1ccaf8[_0x4eb087(0x1ce)],'result':_0x38cce8};}
|
|
1
|
+
const a24_0x1be370=a24_0xb99e;(function(_0x4ce548,_0x388d5f){const _0x53c0ee=a24_0xb99e,_0x204c7f=_0x4ce548();while(!![]){try{const _0x5f4274=parseInt(_0x53c0ee(0x1b4))/0x1*(-parseInt(_0x53c0ee(0x1b0))/0x2)+-parseInt(_0x53c0ee(0x19f))/0x3+-parseInt(_0x53c0ee(0x182))/0x4+parseInt(_0x53c0ee(0x1d2))/0x5*(-parseInt(_0x53c0ee(0x198))/0x6)+parseInt(_0x53c0ee(0x1c5))/0x7*(parseInt(_0x53c0ee(0x17e))/0x8)+-parseInt(_0x53c0ee(0x1c0))/0x9*(parseInt(_0x53c0ee(0x199))/0xa)+parseInt(_0x53c0ee(0x1c8))/0xb;if(_0x5f4274===_0x388d5f)break;else _0x204c7f['push'](_0x204c7f['shift']());}catch(_0x7377f6){_0x204c7f['push'](_0x204c7f['shift']());}}}(a24_0x2923,0x1cdb4));import{executeData}from'../../core/sdk-client.js';function a24_0x2923(){const _0x1b3b1b=['\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','join','170105tpuGis','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20AGGREGATE\x20TYPES','\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}}','\x20on\x20dataset\x20','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','now','\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}}','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','521334tqBQgy','length','write','\x20\x20PARAMS\x20STRUCTURE','\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]}}','1367709JpYkPt','risk','batch','6465822FscMEq','\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\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}}','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','data\x20','\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}}]}','/api/{appCode}/','paramsRequired','25CxCEHo','Preview:\x20data\x20','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','update','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','8GeSyiO','\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}}','create','\x20\x20LOGICAL\x20COMBINATORS','250328BnnxSY','aggregate','\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\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20$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}}','Update\x20an\x20existing\x20record','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','params','operation','body','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$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}}','delete','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\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]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20PAGINATION','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','build','command','89814MRhvlq','40RsSrEq','\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}}','data','read','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','377271QfRyRc','map','filter','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\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}','description','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','dryRun','POST','batchCreate','str','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','code','getOne','2iUaNJY','\x20\x20WHERE\x20OPERATORS'];a24_0x2923=function(){return _0x1b3b1b;};return a24_0x2923();}import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0x1be370(0x1a1),'operation':a24_0x1be370(0x1a1),'risk':a24_0x1be370(0x19c),'paramsRequired':![],'description':a24_0x1be370(0x1a2),'paramsHint':a24_0x1be370(0x1b5)+a24_0x1be370(0x1a8),'helpExtra':[a24_0x1be370(0x1b1),a24_0x1be370(0x17f),a24_0x1be370(0x186),a24_0x1be370(0x18e),a24_0x1be370(0x184),a24_0x1be370(0x1b7),a24_0x1be370(0x1bd),a24_0x1be370(0x1c4),a24_0x1be370(0x188),a24_0x1be370(0x19a),a24_0x1be370(0x1ca),'',a24_0x1be370(0x181),a24_0x1be370(0x1d5),a24_0x1be370(0x1cf),'',a24_0x1be370(0x1cc),a24_0x1be370(0x1b9),a24_0x1be370(0x1bb),a24_0x1be370(0x193),a24_0x1be370(0x1d6),a24_0x1be370(0x1ad),'',a24_0x1be370(0x194),a24_0x1be370(0x190),a24_0x1be370(0x191),a24_0x1be370(0x1b2)]['join']('\x0a')},{'command':a24_0x1be370(0x1af),'operation':'getOne','risk':a24_0x1be370(0x19c),'paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a24_0x1be370(0x19e)},{'command':a24_0x1be370(0x180),'operation':a24_0x1be370(0x180),'risk':a24_0x1be370(0x1c2),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':'batchCreate','operation':a24_0x1be370(0x1ab),'risk':'write','paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a24_0x1be370(0x1a7)},{'command':a24_0x1be370(0x17c),'operation':a24_0x1be370(0x17c),'risk':a24_0x1be370(0x1c2),'paramsRequired':!![],'description':a24_0x1be370(0x187),'paramsHint':a24_0x1be370(0x1be)+'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_0x1be370(0x18f),'operation':a24_0x1be370(0x18f),'risk':'high-risk-write','paramsRequired':!![],'description':a24_0x1be370(0x1cb),'paramsHint':a24_0x1be370(0x19e)},{'command':a24_0x1be370(0x183),'operation':a24_0x1be370(0x183),'risk':a24_0x1be370(0x19c),'paramsRequired':![],'description':a24_0x1be370(0x18c),'paramsHint':a24_0x1be370(0x1bf)+'Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a24_0x1be370(0x1b6),a24_0x1be370(0x1ba),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}',a24_0x1be370(0x1a6),a24_0x1be370(0x185),a24_0x1be370(0x1a5),a24_0x1be370(0x1a3),a24_0x1be370(0x1d4),'',a24_0x1be370(0x1c3),a24_0x1be370(0x192),a24_0x1be370(0x17b),a24_0x1be370(0x1cd),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]',a24_0x1be370(0x19d),'','\x20\x20EXAMPLES',a24_0x1be370(0x17d),a24_0x1be370(0x18d),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a24_0x1be370(0x1c9),'',a24_0x1be370(0x195)][a24_0x1be370(0x1b3)]('\x0a')}];function makeDataCommand(_0x215abb){const _0xebfb74=a24_0x1be370,_0x1b51a9=_0xebfb74(0x1ce)+_0x215abb[_0xebfb74(0x197)],_0x53f85d={'service':_0xebfb74(0x19b),'command':_0x215abb[_0xebfb74(0x197)],'description':_0x215abb[_0xebfb74(0x1a4)],'risk':_0x215abb['risk'],'helpExtra':_0x215abb['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x215abb['paramsHint']}],'validate':async _0x5f3886=>{const _0x1dc3ac=_0xebfb74;_0x215abb[_0x1dc3ac(0x1d1)]&&requireAnyOf(_0x5f3886,[_0x1dc3ac(0x189)],_0x1b51a9),_0x215abb[_0x1dc3ac(0x18a)]===_0x1dc3ac(0x1ab)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5f3886['str']('params'))),_0x215abb['operation']==='update'&&parseUpdateIdsFromParams(parseJsonParams(_0x5f3886[_0x1dc3ac(0x1ac)](_0x1dc3ac(0x189)))??{});},async 'execute'(_0x10fdaa){const _0x2e2037=_0xebfb74,_0x2b8d6d=_0x10fdaa[_0x2e2037(0x1ac)](_0x2e2037(0x1ae)),_0x1c5906=_0x215abb[_0x2e2037(0x18a)]===_0x2e2037(0x1ab)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x10fdaa[_0x2e2037(0x1ac)](_0x2e2037(0x189)))):parseJsonParams(_0x10fdaa['str'](_0x2e2037(0x189)))??{},_0x504041=_0x215abb[_0x2e2037(0x18a)]==='update'?parseUpdateIdsFromParams(_0x1c5906):undefined,_0x43b5cd=_0x504041?normalizeUpdateParamsForRuntime(_0x1c5906,_0x504041):_0x1c5906,_0xfdcfcf=Date[_0x2e2037(0x1bc)](),_0x45f1b0=await executeData(_0x2b8d6d,_0x215abb[_0x2e2037(0x18a)],_0x43b5cd),_0x1e58a6=Date['now']()-_0xfdcfcf,_0x4ff9f4=_0x504041&&_0x504041[_0x2e2037(0x1c1)]>0x1?buildBatchUpdateResult(_0x504041,_0x45f1b0):_0x45f1b0;return{'ok':!![],'data':{'result':_0x4ff9f4,'elapsed':_0x1e58a6},'message':_0x2e2037(0x1ce)+_0x215abb[_0x2e2037(0x197)]+'\x20completed\x20in\x20'+_0x1e58a6+'ms'};}};return _0x215abb[_0xebfb74(0x1c6)]!==_0xebfb74(0x19c)&&(_0x53f85d[_0xebfb74(0x1a9)]=async _0x3fb6fd=>{const _0x798592=_0xebfb74,_0x4ea89b=_0x3fb6fd['str'](_0x798592(0x1ae)),_0x2f4d9d=_0x215abb[_0x798592(0x18a)]===_0x798592(0x1ab)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3fb6fd['str'](_0x798592(0x189)))):parseJsonParams(_0x3fb6fd[_0x798592(0x1ac)]('params'))??{};let _0x4d0313=_0x2f4d9d;if(_0x215abb['operation']===_0x798592(0x17c)){const _0x540022=parseUpdateIdsFromParams(_0x2f4d9d);_0x4d0313=normalizeUpdateParamsForRuntime(_0x2f4d9d,_0x540022);}return dryRun(_0x798592(0x1aa),_0x798592(0x1d0)+_0x4ea89b+'/'+_0x215abb['operation'])[_0x798592(0x18b)](_0x4d0313)[_0x798592(0x1a4)](_0x798592(0x1d3)+_0x215abb[_0x798592(0x197)]+_0x798592(0x1b8)+_0x4ea89b)[_0x798592(0x196)]();}),_0x53f85d;}export const dataDefinitions=specs[a24_0x1be370(0x1a0)](makeDataCommand);function a24_0xb99e(_0x4dd239,_0x12821a){_0x4dd239=_0x4dd239-0x17b;const _0x2923cd=a24_0x2923();let _0xb99e62=_0x2923cd[_0x4dd239];return _0xb99e62;}function buildBatchUpdateResult(_0xb691fa,_0xe36921){const _0x2018ad=a24_0x1be370;return{'operation':_0x2018ad(0x17c),'mode':_0x2018ad(0x1c7),'ids':_0xb691fa,'total':_0xb691fa[_0x2018ad(0x1c1)],'result':_0xe36921};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a25_0x5846(){const _0xca2156=['doVersion','modelCode','beforeScriptId','dataset','displayName','host','columnCodeListWithDeleted','588dxQNyh','7504EgBBqH','detail','validateRules','deleted','dbtableConfig','read','tableComment','fields','responseFields','title','modelId','doType','70741IVXFbX','options','description','source','trim','allFields','modifierNameField','required','filter','find','899955HuGysO','pkField','method','parse','datasetKey','modifierIdField','requestBody','creatorIdField','split','relatedPageInfoList','labelField','2qfdslx','dbName','str','type','path','442608vppPGv','formatRules','dblinkInfoDTO','93105ndNLRd','isArray','string','indexes','tableName','updateTimeField','entries','87981gLfQbU','18oIMBSk','responseBody','length','427WXWlUM','object','afterScriptId','map','operations','507248GVIEVq','requestFields','dbId','extend','20kYthmA','relations','code','dataType','appCode','creatorNameField'];a25_0x5846=function(){return _0xca2156;};return a25_0x5846();}const a25_0x3f739b=a25_0x5066;(function(_0x1ec01a,_0x25656c){const _0x1951cd=a25_0x5066,_0x20de36=_0x1ec01a();while(!![]){try{const _0x3a6f52=parseInt(_0x1951cd(0x91))/0x1*(-parseInt(_0x1951cd(0xcd))/0x2)+-parseInt(_0x1951cd(0xd2))/0x3+parseInt(_0x1951cd(0x9a))/0x4+parseInt(_0x1951cd(0x8a))/0x5*(parseInt(_0x1951cd(0x92))/0x6)+parseInt(_0x1951cd(0x95))/0x7*(parseInt(_0x1951cd(0xac))/0x8)+parseInt(_0x1951cd(0xc2))/0x9*(-parseInt(_0x1951cd(0x9e))/0xa)+-parseInt(_0x1951cd(0xb8))/0xb*(-parseInt(_0x1951cd(0xab))/0xc);if(_0x3a6f52===_0x25656c)break;else _0x20de36['push'](_0x20de36['shift']());}catch(_0x56753b){_0x20de36['push'](_0x20de36['shift']());}}}(a25_0x5846,0x1d2d1));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x38ba5a){const _0x39654c=a25_0x5066;if(_0x38ba5a[_0x39654c(0xaf)])return null;const _0x1c4ab9=Boolean(_0x38ba5a[_0x39654c(0xa8)]!==undefined||_0x38ba5a[_0x39654c(0xb7)]!==undefined);let _0x43d1ac={};if(!_0x1c4ab9&&typeof _0x38ba5a[_0x39654c(0x9d)]===_0x39654c(0x8c))try{_0x43d1ac=JSON['parse'](_0x38ba5a[_0x39654c(0x9d)]);}catch{}const _0x5ca68e=_0x1c4ab9?_0x38ba5a['name']:_0x38ba5a[_0x39654c(0xa0)],_0x4c1b5c=_0x1c4ab9?_0x38ba5a['displayName']:_0x38ba5a['name'],_0x584663=_0x1c4ab9?_0x38ba5a['doType']:_0x38ba5a['type']||_0x38ba5a[_0x39654c(0xa1)],_0x5e91be=_0x1c4ab9?_0x38ba5a[_0x39654c(0xc3)]===!![]:_0x43d1ac[_0x39654c(0xc3)]===!![],_0x410f30=_0x1c4ab9?_0x38ba5a[_0x39654c(0xbf)]===!![]:_0x43d1ac[_0x39654c(0xbf)]===!![],_0xe51a81=_0x1c4ab9?_0x38ba5a[_0x39654c(0xb9)]??null:_0x43d1ac[_0x39654c(0xb9)]??null,_0xeb3e16={'name':_0x5ca68e,'displayName':_0x4c1b5c||_0x5ca68e,'type':_0x584663,'dbType':_0x38ba5a['dbType'],'pk':_0x5e91be,'required':_0x410f30,'description':_0x38ba5a['description']||undefined};return Array[_0x39654c(0x8b)](_0xe51a81)&&_0xe51a81[_0x39654c(0x94)]>0x0&&(_0xeb3e16[_0x39654c(0xb9)]=_0xe51a81),_0xeb3e16;}function parseJsonMaybe(_0xf865fb){const _0x3daf32=a25_0x5066;if(typeof _0xf865fb!=='string')return _0xf865fb;try{return JSON[_0x3daf32(0xc5)](_0xf865fb);}catch{return _0xf865fb;}}function normalizeOperationEntry(_0x38bf61,_0x1a5745){const _0x440059=a25_0x5066;if(!_0x1a5745||typeof _0x1a5745!==_0x440059(0x96))return null;if(!_0x1a5745['method']||!_0x1a5745[_0x440059(0xd1)])return null;const _0x2d2eab={'name':_0x38bf61,'method':_0x1a5745[_0x440059(0xc4)],'path':_0x1a5745[_0x440059(0xd1)]};if(_0x1a5745[_0x440059(0xa9)])_0x2d2eab[_0x440059(0xa9)]=_0x1a5745[_0x440059(0xa9)];if(_0x1a5745[_0x440059(0xc8)]!=null)_0x2d2eab['requestBody']=parseJsonMaybe(_0x1a5745[_0x440059(0xc8)]);if(_0x1a5745[_0x440059(0x93)]!=null)_0x2d2eab['responseBody']=parseJsonMaybe(_0x1a5745[_0x440059(0x93)]);if(_0x1a5745[_0x440059(0xa6)]!=null)_0x2d2eab['beforeScriptId']=_0x1a5745[_0x440059(0xa6)];if(_0x1a5745[_0x440059(0x97)]!=null)_0x2d2eab['afterScriptId']=_0x1a5745['afterScriptId'];if(Array[_0x440059(0x8b)](_0x1a5745[_0x440059(0x9b)]))_0x2d2eab[_0x440059(0x9b)]=_0x1a5745[_0x440059(0x9b)];if(Array['isArray'](_0x1a5745[_0x440059(0xb4)]))_0x2d2eab[_0x440059(0xb4)]=_0x1a5745[_0x440059(0xb4)];return _0x2d2eab;}function summarizeDbtable(_0x59641e){const _0x2b8dcb=a25_0x5066,_0x5b0884={},_0x202cb4=['dbId',_0x2b8dcb(0xce),'tableName',_0x2b8dcb(0xc6),_0x2b8dcb(0xc3),'allFields','logicField','createTimeField',_0x2b8dcb(0x8f),_0x2b8dcb(0xc9),_0x2b8dcb(0xa3),_0x2b8dcb(0xc7),_0x2b8dcb(0xbe),_0x2b8dcb(0xcc),_0x2b8dcb(0xd4)];for(const _0x1c3ff0 of _0x202cb4){if(_0x59641e[_0x1c3ff0]!==undefined)_0x5b0884[_0x1c3ff0]=_0x59641e[_0x1c3ff0];}return typeof _0x5b0884['allFields']==='string'&&_0x5b0884['allFields'][_0x2b8dcb(0x94)]>0x0&&(_0x5b0884['allFieldNames']=_0x5b0884[_0x2b8dcb(0xbd)][_0x2b8dcb(0xca)](',')[_0x2b8dcb(0x98)](_0x2df04c=>_0x2df04c[_0x2b8dcb(0xbc)]())[_0x2b8dcb(0xc0)](Boolean)),_0x5b0884;}function a25_0x5066(_0x34f930,_0xee0910){_0x34f930=_0x34f930-0x8a;const _0x584680=a25_0x5846();let _0x50661f=_0x584680[_0x34f930];return _0x50661f;}function normalizeRelatedPages(_0x17fced){const _0x2e3c37=a25_0x5066;if(!Array['isArray'](_0x17fced))return[];return _0x17fced[_0x2e3c37(0xc0)](_0x1aaa28=>_0x1aaa28&&typeof _0x1aaa28==='object')[_0x2e3c37(0x98)](_0x313c4c=>({'id':_0x313c4c['id'],'type':_0x313c4c[_0x2e3c37(0xd0)],'code':_0x313c4c[_0x2e3c37(0xa0)],'title':_0x313c4c[_0x2e3c37(0xb5)],'deleted':_0x313c4c['deleted']===!![]}));}function normalizeFallbackFieldName(_0x1c1c4a,_0x5590ee){const _0x351a22=a25_0x5066,_0x3d37b9=_0x1c1c4a[_0x351a22(0xbc)]();if(!_0x3d37b9)return null;return{'name':_0x3d37b9,'displayName':_0x3d37b9,'type':undefined,'dbType':undefined,'pk':_0x3d37b9===_0x5590ee,'required':![],'description':undefined};}async function loadListFieldFallback(_0x4e1101,_0x354e2a){const _0x39e0b7=a25_0x5066;if(!_0x4e1101||!_0x354e2a)return[];try{const _0x27988f=await listDatasets(_0x4e1101,{'code':_0x354e2a}),_0x5a3383=_0x27988f[_0x39e0b7(0xc1)](_0x4bd09d=>_0x4bd09d[_0x39e0b7(0xa0)]===_0x354e2a)??_0x27988f[0x0],_0x2708d9=_0x5a3383?.[_0x39e0b7(0xb0)]??{},_0x382269=typeof _0x2708d9[_0x39e0b7(0xbd)]==='string'?_0x2708d9[_0x39e0b7(0xbd)]['split'](','):[];return _0x382269[_0x39e0b7(0x98)](_0x52aa50=>normalizeFallbackFieldName(_0x52aa50,_0x2708d9[_0x39e0b7(0xc3)]))[_0x39e0b7(0xc0)](_0x1a717a=>_0x1a717a!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':a25_0x3f739b(0xad),'description':'Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','risk':a25_0x3f739b(0xb1),'flags':[CODE_FLAG],async 'execute'(_0x2838d7){const _0x999c65=a25_0x3f739b,_0x350b78=await getDatasetDetail(_0x2838d7[_0x999c65(0xcf)]('code')),_0x26c44d=Array[_0x999c65(0x8b)](_0x350b78[_0x999c65(0xb3)])?_0x350b78[_0x999c65(0xb3)]:Array[_0x999c65(0x8b)](_0x350b78['properties'])?_0x350b78['properties']:[];let _0x1fc80c=_0x26c44d[_0x999c65(0x98)](_0x34fadf=>normalizeField(_0x34fadf))[_0x999c65(0xc0)](_0x46d1ad=>_0x46d1ad!==null);_0x1fc80c['length']===0x0&&(_0x1fc80c=await loadListFieldFallback(_0x2838d7[_0x999c65(0xa2)],_0x2838d7[_0x999c65(0xcf)]('code')));const _0x1dcb1c=_0x350b78[_0x999c65(0x99)]??{},_0x2cf81c=[];for(const [_0x32f0cf,_0x53d50c]of Object[_0x999c65(0x90)](_0x1dcb1c)){const _0x618a84=normalizeOperationEntry(_0x32f0cf,_0x53d50c);if(_0x618a84)_0x2cf81c['push'](_0x618a84);}const _0x74d77e=_0x350b78[_0x999c65(0xb0)]??{},_0x1ab8a5=_0x350b78[_0x999c65(0xa7)]??{},_0x4fcb8c=_0x74d77e[_0x999c65(0x9c)]!=null?{'id':_0x74d77e[_0x999c65(0x9c)],'name':_0x74d77e[_0x999c65(0xce)]??null}:undefined;let _0x5673a5;return typeof _0x350b78[_0x999c65(0x9d)]===_0x999c65(0x8c)&&(_0x5673a5=parseJsonMaybe(_0x350b78[_0x999c65(0x9d)])),{'ok':!![],'data':{'id':_0x350b78[_0x999c65(0xb6)]??_0x350b78['id'],'name':_0x350b78['name'],'code':_0x350b78[_0x999c65(0xa5)]||_0x350b78[_0x999c65(0xa0)],'doVersion':_0x350b78[_0x999c65(0xa4)],'description':_0x350b78[_0x999c65(0xba)]||_0x1ab8a5[_0x999c65(0xb2)]||undefined,'source':_0x350b78[_0x999c65(0xbb)]||_0x1ab8a5['sourceType'],'table':_0x74d77e['tableName']||_0x1ab8a5[_0x999c65(0x8e)],'datasetKey':_0x74d77e[_0x999c65(0xc6)],'pk':_0x74d77e['pkField'],'db':_0x4fcb8c,'dbtable':summarizeDbtable(_0x74d77e),'fields':_0x1fc80c,'operations':_0x2cf81c,'indexes':Array['isArray'](_0x1ab8a5[_0x999c65(0x8d)])?_0x1ab8a5[_0x999c65(0x8d)]:[],'relations':_0x350b78[_0x999c65(0x9f)]??null,'relatedPages':normalizeRelatedPages(_0x350b78[_0x999c65(0xcb)]),...Array[_0x999c65(0x8b)](_0x350b78[_0x999c65(0xaa)])?{'columnCodeListWithDeleted':_0x350b78[_0x999c65(0xaa)]}:{},'formatRules':Array[_0x999c65(0x8b)](_0x350b78[_0x999c65(0xd3)])?_0x350b78[_0x999c65(0xd3)]:[],'validateRules':Array[_0x999c65(0x8b)](_0x350b78[_0x999c65(0xae)])?_0x350b78['validateRules']:[],..._0x5673a5!==undefined?{'extend':_0x5673a5}:{},'stats':{'fieldCount':_0x1fc80c[_0x999c65(0x94)],'operationCount':_0x2cf81c[_0x999c65(0x94)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x224d09,_0x3f331d){const _0x5d675f=a26_0x2a10,_0x1419e0=_0x224d09();while(!![]){try{const _0x1318ba=parseInt(_0x5d675f(0xf3))/0x1+parseInt(_0x5d675f(0xf6))/0x2*(-parseInt(_0x5d675f(0xf8))/0x3)+parseInt(_0x5d675f(0xf2))/0x4*(-parseInt(_0x5d675f(0xfb))/0x5)+-parseInt(_0x5d675f(0xf7))/0x6*(-parseInt(_0x5d675f(0xf4))/0x7)+-parseInt(_0x5d675f(0xf5))/0x8+parseInt(_0x5d675f(0xf1))/0x9+parseInt(_0x5d675f(0xfa))/0xa*(parseInt(_0x5d675f(0xf9))/0xb);if(_0x1318ba===_0x3f331d)break;else _0x1419e0['push'](_0x1419e0['shift']());}catch(_0xed8eb6){_0x1419e0['push'](_0x1419e0['shift']());}}}(a26_0xb230,0xc4f66));import{datasetList}from'../../commands/dataset/list.js';function a26_0x2a10(_0x4088c9,_0x4cabef){_0x4088c9=_0x4088c9-0xf1;const _0xb230e0=a26_0xb230();let _0x2a1063=_0xb230e0[_0x4088c9];return _0x2a1063;}import{datasetDetail}from'../../commands/dataset/detail.js';function a26_0xb230(){const _0x11c442=['9122409LocYgE','12BxDGzX','1364896bSnaHm','9612267UbpAoX','5987000XWnKuc','2436OfDNGY','6RhqaAa','2925ouMiAQ','748QZCUfF','50990pzsrvh','2259545CyBcJC'];a26_0xb230=function(){return _0x11c442;};return a26_0xb230();}import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a27_0x21a279=a27_0x445b;function a27_0x445b(_0x47eeda,_0x55a4cc){_0x47eeda=_0x47eeda-0x1d1;const _0x47477f=a27_0x4747();let _0x445bdb=_0x47477f[_0x47eeda];return _0x445bdb;}(function(_0x394b17,_0x536d47){const _0x13dbee=a27_0x445b,_0x35fc2a=_0x394b17();while(!![]){try{const _0x6ffe9d=-parseInt(_0x13dbee(0x1df))/0x1*(parseInt(_0x13dbee(0x1d3))/0x2)+parseInt(_0x13dbee(0x1e0))/0x3+-parseInt(_0x13dbee(0x1d5))/0x4*(parseInt(_0x13dbee(0x1d1))/0x5)+-parseInt(_0x13dbee(0x1e8))/0x6+parseInt(_0x13dbee(0x1db))/0x7*(parseInt(_0x13dbee(0x1d2))/0x8)+parseInt(_0x13dbee(0x1e7))/0x9*(parseInt(_0x13dbee(0x1e5))/0xa)+-parseInt(_0x13dbee(0x1d6))/0xb*(-parseInt(_0x13dbee(0x1da))/0xc);if(_0x6ffe9d===_0x536d47)break;else _0x35fc2a['push'](_0x35fc2a['shift']());}catch(_0x6f7aee){_0x35fc2a['push'](_0x35fc2a['shift']());}}}(a27_0x4747,0x6d25b));function a27_0x4747(){const _0x489527=['71359oyPJnJ','1206309DaEmRd','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','pkField','trim','datasetKey','10eVpbjd','code','4742334irQmPN','1134318MvuqJm','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','split','str','dataset','map','source','2112545vaoiFH','247216VkjhEo','20wZuJmk','tableName','8kzVhaq','11GTpgzt','string','length','name','11109324RoSaGN','77pCMSkQ','list','allFields','appCode'];a27_0x4747=function(){return _0x489527;};return a27_0x4747();}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a27_0x21a279(0x1ec),'command':a27_0x21a279(0x1dc),'description':a27_0x21a279(0x1e9),'risk':'read','flags':[{'name':a27_0x21a279(0x1d9),'type':a27_0x21a279(0x1d7),'description':a27_0x21a279(0x1e1)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x2b286b){const _0x557def=a27_0x21a279,_0x1e1e34=_0x2b286b[_0x557def(0x1eb)]('name'),_0x5ccbb5=_0x2b286b['str'](_0x557def(0x1e6)),_0x493300=await listDatasets(_0x2b286b[_0x557def(0x1de)],{..._0x1e1e34&&{'name':_0x1e1e34},..._0x5ccbb5&&{'code':_0x5ccbb5}});return{'ok':!![],'data':{'total':_0x493300[_0x557def(0x1d8)],'datasets':_0x493300[_0x557def(0x1ed)](_0x5a3b30=>{const _0xd9c6de=_0x557def,_0xedbf8=_0x5a3b30['dbtableConfig']??{};return{'id':_0x5a3b30['id'],'code':_0x5a3b30[_0xd9c6de(0x1e6)],'name':_0x5a3b30[_0xd9c6de(0x1d9)],'source':_0x5a3b30[_0xd9c6de(0x1ee)],'description':_0x5a3b30['description'],'table':_0xedbf8[_0xd9c6de(0x1d4)],'datasetKey':_0xedbf8[_0xd9c6de(0x1e4)],'pk':_0xedbf8[_0xd9c6de(0x1e2)],'fields':_0xedbf8['allFields']?_0xedbf8[_0xd9c6de(0x1dd)][_0xd9c6de(0x1ea)](',')[_0xd9c6de(0x1ed)](_0xbb7672=>_0xbb7672[_0xd9c6de(0x1e3)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x547d95=a28_0x4071;(function(_0x402c0e,_0x3a3500){const _0x282738=a28_0x4071,_0x5830aa=_0x402c0e();while(!![]){try{const _0x2306f7=parseInt(_0x282738(0x1f6))/0x1+-parseInt(_0x282738(0x1f0))/0x2*(-parseInt(_0x282738(0x1e9))/0x3)+parseInt(_0x282738(0x1e8))/0x4+-parseInt(_0x282738(0x1f3))/0x5+-parseInt(_0x282738(0x1f5))/0x6+-parseInt(_0x282738(0x1ee))/0x7*(-parseInt(_0x282738(0x1ed))/0x8)+parseInt(_0x282738(0x1eb))/0x9*(-parseInt(_0x282738(0x1f8))/0xa);if(_0x2306f7===_0x3a3500)break;else _0x5830aa['push'](_0x5830aa['shift']());}catch(_0x38626e){_0x5830aa['push'](_0x5830aa['shift']());}}}(a28_0x2ba7,0x6d90d));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';function a28_0x4071(_0x5cb80e,_0xdf99c0){_0x5cb80e=_0x5cb80e-0x1e8;const _0x2ba7ad=a28_0x2ba7();let _0x407121=_0x2ba7ad[_0x5cb80e];return _0x407121;}function a28_0x2ba7(){const _0x564e79=['872351zmJnZO','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','800NdfHlJ','1842512MOrPZP','19470VjPvCb','string','160623jpzQrw','sdk-doc','136krETLz','279489jEBCpO','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','202YtWeIa','code','str','2596525NXSVIT','trim','1628292OBgTEo'];a28_0x2ba7=function(){return _0x564e79;};return a28_0x2ba7();}export function formatDatasetSdkMarkdown(_0x5c5c3a){const _0x30ea57=a28_0x4071,_0x1235a5=typeof _0x5c5c3a===_0x30ea57(0x1ea)?_0x5c5c3a[_0x30ea57(0x1f4)]():'';return _0x1235a5||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a28_0x547d95(0x1ec),'description':a28_0x547d95(0x1ef),'risk':'read','flags':[{...CODE_FLAG,'description':a28_0x547d95(0x1f7)}],async 'execute'(_0x58734d){const _0x5a3246=a28_0x547d95,_0x59d215=_0x58734d[_0x5a3246(0x1f2)](_0x5a3246(0x1f1)),_0x5eccf6=await getDatasetSdkUsageDoc(_0x59d215,_0x58734d['appCode']);return{'ok':!![],'data':{'code':_0x59d215,'appCode':_0x58734d['appCode'],'markdown':formatDatasetSdkMarkdown(_0x5eccf6)}};}};
|