@lovrabet/lovrabet-cli 2.1.19 → 2.1.20-beta.1
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.d.ts +12 -0
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.d.ts +12 -0
- package/lib/framework/raw-flags.js +1 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x1e4beb=a12_0x58d0;(function(_0x2b7cf9,_0x224631){const _0x5bb305=a12_0x58d0,_0x4f9c25=_0x2b7cf9();while(!![]){try{const _0x1650de=parseInt(_0x5bb305(0xdb))/0x1+parseInt(_0x5bb305(0xe7))/0x2*(parseInt(_0x5bb305(0xf2))/0x3)+parseInt(_0x5bb305(0x11a))/0x4+parseInt(_0x5bb305(0x115))/0x5*(-parseInt(_0x5bb305(0xdf))/0x6)+-parseInt(_0x5bb305(0xd9))/0x7+-parseInt(_0x5bb305(0xda))/0x8+-parseInt(_0x5bb305(0xf3))/0x9*(-parseInt(_0x5bb305(0xdc))/0xa);if(_0x1650de===_0x224631)break;else _0x4f9c25['push'](_0x4f9c25['shift']());}catch(_0x5d64ab){_0x4f9c25['push'](_0x4f9c25['shift']());}}}(a12_0x2a0d,0xb6f64));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';function a12_0x2a0d(){const _0x4912fd=['1402759FemDRa','10HIsuen','Auth\x20config\x20reinitialized\x20in\x20','validation','3606nHthAb','global\x20config','project\x20config','global','authRequired','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Invalid\x20accessKey\x20format:\x20\x22','Option\x20C:\x20environment\x20variable','52ReuLKI','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20doctor','write','push','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','scope','code','AccessKey\x20(ak_xxx...)','\x20config','\x20env\x20var','76098HMgRXu','2604078qXyFmv','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','AccessKey:\x20','No\x20AccessKey\x20found\x20in\x20','stdout','test','\x20Current\x20env:\x20','\x20scope.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','newConfigFileName','Use\x20`','\x20auth\x20status','slice','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','expired','length','bool','cancelled','info','Option\x20A:\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','repeat','userCenterDisplayName','ACCESS_KEY','read','env','global-default','isTTY','auth','ClientAk','Option\x20B:\x20apps\x20config\x20(','Auth\x20mode:\x20','\x20\x20export\x20','trim','5355FTtONC','accessKey','join','Read\x20from\x20global\x20config\x20(default)','AccessKey\x20cleared\x20from\x20','2636296YYGwHE','str','Write\x20to\x20global\x20config\x20(default)','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20auth\x20login\x20--access-key\x20<ak_xxx>','logout','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20Verify:\x20','nonInteractive','Shorthand\x20for\x20--access-key','login','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','string','Tip:\x20you\x20can\x20also\x20run:','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','status','=ak_xxx','daily','\x20config.\x20Nothing\x20to\x20clear.','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','access_key','Missing\x20accessKey.','AccessKey\x20saved\x20to\x20','access-key','Status:\x20valid','Then\x20verify\x20with:\x20','production','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','project','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','\x20(via\x20','boolean','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20config.','4732238FtScnc','7532592PUNCnS'];a12_0x2a0d=function(){return _0x4912fd;};return a12_0x2a0d();}import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';function a12_0x58d0(_0x467f81,_0x22b4e9){_0x467f81=_0x467f81-0xbd;const _0x2a0d73=a12_0x2a0d();let _0x58d007=_0x2a0d73[_0x467f81];return _0x58d007;}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x10afa1=a12_0x58d0;writeCliSideChannelLine(_0x10afa1(0xc3)+PRODUCT_CONFIG[_0x10afa1(0x109)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x10afa1(0xc2)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x10afa1(0x11f));}function buildAccessKeySetupGuide(){const _0x2e2684=a12_0x58d0;return[_0x2e2684(0xc3)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x2e2684(0x121)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x2a256e){const _0x13b4ee=a12_0x58d0;return!_0x2a256e[_0x13b4ee(0xbd)]&&process['stdin']['isTTY']!==![]&&process[_0x13b4ee(0xf7)][_0x13b4ee(0x10e)]!==![];}function resolveAuthScopeFlags(_0x5b79b9){const _0x4a89ff=a12_0x58d0;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5b79b9[_0x4a89ff(0x103)](_0x4a89ff(0xe2)),'explicitProject':_0x5b79b9['bool'](_0x4a89ff(0xd3)),'policy':_0x4a89ff(0x10d)}));}async function resolveAuthWriteInput(_0x2fc0ba){const _0x17a0d1=a12_0x58d0;let _0x384e06=(_0x2fc0ba['str'](_0x17a0d1(0xcd))||_0x2fc0ba[_0x17a0d1(0x11b)]('ak')||'')[_0x17a0d1(0x114)]();const _0x5ce850=(_0x2fc0ba[_0x17a0d1(0x11b)](_0x17a0d1(0x10c))||'')['trim']();if(!_0x384e06&&canPromptForAccessKey(_0x2fc0ba))try{showAccessKeyCreateHint(),_0x384e06=await promptAccessKey('');}catch(_0x4526d3){if(isAbortPrompt(_0x4526d3))throw CliErrors[_0x17a0d1(0x104)]();throw _0x4526d3;}if(!_0x384e06)throw CliErrors[_0x17a0d1(0xde)](_0x17a0d1(0xcb),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x17a0d1(0xf8)](_0x384e06))throw CliErrors[_0x17a0d1(0xde)](_0x17a0d1(0xe5)+_0x384e06+'\x22',_0x17a0d1(0x11d));if(!_0x5ce850)return{'accessKey':_0x384e06};const _0x4a8704=normalizeEnv(_0x5ce850);return{'accessKey':_0x384e06,'env':isDaily(_0x4a8704)?_0x17a0d1(0xc6):isDev(_0x4a8704)?'development':'production'};}export const authDefinitions=[{'service':a12_0x1e4beb(0x10f),'command':a12_0x1e4beb(0xbf),'description':a12_0x1e4beb(0xd4),'risk':a12_0x1e4beb(0xea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x1e4beb(0xcd),'type':a12_0x1e4beb(0xc1),'description':a12_0x1e4beb(0xef)},{'name':'ak','type':a12_0x1e4beb(0xc1),'description':a12_0x1e4beb(0xbe)},{'name':a12_0x1e4beb(0xe2),'type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0x11c),'default':!![]},{'name':'project','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xec),'default':![]}],async 'execute'(_0x27ed16){const _0x1e3040=a12_0x1e4beb;if(_0x27ed16[_0x1e3040(0x103)]('yes'))throw CliErrors[_0x1e3040(0xde)](_0x1e3040(0x107),_0x1e3040(0xfd)+CLI_BIN_NAME+_0x1e3040(0xc9)+CLI_BIN_NAME+_0x1e3040(0xfb));const _0xdf2880=(_0x27ed16[_0x1e3040(0x11b)](_0x1e3040(0xcd))||_0x27ed16['str']('ak')||'')[_0x1e3040(0x114)]();if(!_0xdf2880&&_0x27ed16[_0x1e3040(0xbd)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x59cd4d=await resolveAuthWriteInput(_0x27ed16),_0x44f8c4=resolveAuthScopeFlags(_0x27ed16),_0x5cece3=readScopedConfig(_0x44f8c4);_0x5cece3[_0x1e3040(0x116)]=_0x59cd4d[_0x1e3040(0x116)];_0x59cd4d['env']&&(_0x5cece3['env']=_0x59cd4d['env']);writeScopedConfig(_0x5cece3,_0x44f8c4);const _0x4b602c=_0x44f8c4[_0x1e3040(0xe2)]?_0x1e3040(0xe2):_0x1e3040(0xd3),_0x4e2d0a=_0x5cece3[_0x1e3040(0x10c)]?_0x1e3040(0xf9)+_0x5cece3[_0x1e3040(0x10c)]+'.':'';return{'ok':!![],'message':_0x1e3040(0xcc)+_0x4b602c+_0x1e3040(0xd8)+_0x4e2d0a+_0x1e3040(0x122)+CLI_BIN_NAME+_0x1e3040(0xfe)};}},{'service':a12_0x1e4beb(0x10f),'command':'init','description':a12_0x1e4beb(0x100),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x1e4beb(0xcd),'type':a12_0x1e4beb(0xc1),'description':a12_0x1e4beb(0xef)},{'name':'ak','type':'string','description':a12_0x1e4beb(0xbe)},{'name':a12_0x1e4beb(0x10c),'type':a12_0x1e4beb(0xc1),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':'global','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0x11c),'default':!![]},{'name':a12_0x1e4beb(0xd3),'type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xec),'default':![]}],async 'execute'(_0x495300){const _0xa8710=a12_0x1e4beb,_0x42feda=await resolveAuthWriteInput(_0x495300),_0xd89eae=resolveAuthScopeFlags(_0x495300),_0x1f64b9={'accessKey':_0x42feda[_0xa8710(0x116)]};_0x42feda[_0xa8710(0x10c)]&&(_0x1f64b9[_0xa8710(0x10c)]=_0x42feda['env']);writeScopedConfig(_0x1f64b9,_0xd89eae);const _0x835726=_0xd89eae['global']?_0xa8710(0xe2):_0xa8710(0xd3),_0x3a8542=_0x1f64b9[_0xa8710(0x10c)]?_0xa8710(0xf9)+_0x1f64b9['env']+'.':'';return{'ok':!![],'message':_0xa8710(0xdd)+_0x835726+_0xa8710(0xfa)+_0x3a8542+_0xa8710(0x122)+CLI_BIN_NAME+_0xa8710(0xfe)};}},{'service':a12_0x1e4beb(0x10f),'command':a12_0x1e4beb(0x120),'description':'Clear\x20accessKey\x20from\x20config','risk':a12_0x1e4beb(0xea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x1e4beb(0xe2),'type':a12_0x1e4beb(0xd6),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xc0),'default':![]}],async 'execute'(_0x5d810d){const _0x3c45a8=a12_0x1e4beb,_0x4cc67f=resolveAuthScopeFlags(_0x5d810d),_0x462db0=readScopedConfig(_0x4cc67f),_0x79e71a=!!_0x462db0[_0x3c45a8(0x116)];delete _0x462db0['accessKey'],writeScopedConfig(_0x462db0,_0x4cc67f);const _0x4e1e7a=_0x4cc67f[_0x3c45a8(0xe2)]?_0x3c45a8(0xe2):_0x3c45a8(0xd3);if(_0x79e71a)return{'ok':!![],'message':_0x3c45a8(0x119)+_0x4e1e7a+_0x3c45a8(0xd8)};return{'ok':!![],'message':_0x3c45a8(0xf6)+_0x4e1e7a+_0x3c45a8(0xc7)};}},{'service':a12_0x1e4beb(0x10f),'command':a12_0x1e4beb(0xc4),'description':'Show\x20current\x20authentication\x20status','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0x118),'default':!![]},{'name':a12_0x1e4beb(0xd3),'type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xe8),'default':![]},{'name':'check','type':a12_0x1e4beb(0xd6),'description':a12_0x1e4beb(0xd2),'default':![]}],async 'execute'(_0x26800c){const _0x179986=a12_0x1e4beb,_0x39b88=resolveAuthScopeFlags(_0x26800c),_0x57d555=readScopedConfig(_0x39b88),_0x236079=productEnvName(_0x179986(0x10a)),_0x4beba8=productEnv(_0x179986(0x10a))||undefined,_0x58872a=_0x57d555[_0x179986(0x116)]||undefined,_0x5263e3=_0x4beba8||_0x58872a,_0x27b1a0=_0x4beba8?_0x236079+_0x179986(0xf1):_0x58872a?(_0x39b88[_0x179986(0xe2)]?'global':'project')+_0x179986(0xf0):null,_0x172b89=[_0x179986(0x112)+AUTH_MODE['ClientAk']];if(_0x5263e3){const _0x36c1ac=_0x5263e3[_0x179986(0x102)]>0x8?''+_0x5263e3[_0x179986(0xff)](0x0,0x8)+'*'[_0x179986(0x108)](_0x5263e3[_0x179986(0x102)]-0x8):_0x5263e3;_0x172b89['push'](_0x179986(0xf5)+_0x36c1ac+(_0x27b1a0?_0x179986(0xd5)+_0x27b1a0+')':'')),_0x172b89[_0x179986(0xeb)](_0x179986(0xce));}if(!_0x5263e3){_0x172b89[_0x179986(0xeb)](''),_0x172b89[_0x179986(0xeb)](_0x179986(0xe4)),_0x172b89['push'](''),_0x172b89['push'](_0x179986(0x106)+CLI_BIN_NAME+_0x179986(0xd7)),_0x172b89['push'](''),_0x172b89[_0x179986(0xeb)](_0x179986(0x111)+PRODUCT_CONFIG[_0x179986(0xfc)]+')'),_0x172b89[_0x179986(0xeb)](_0x179986(0xd1)),_0x172b89[_0x179986(0xeb)](''),_0x172b89[_0x179986(0xeb)](_0x179986(0xe6)),_0x172b89['push'](_0x179986(0x113)+_0x236079+_0x179986(0xc5)),_0x172b89['push'](''),_0x172b89[_0x179986(0xeb)](_0x179986(0xcf)+CLI_BIN_NAME+'\x20auth\x20status'),_0x172b89['push'](_0x179986(0xf4)+CLI_BIN_NAME+_0x179986(0xe9));if(_0x26800c[_0x179986(0x103)]('check')){const _0x3302dd=readStoredDeviceCode();if(_0x3302dd&&!isStoredDeviceCodeExpired(_0x3302dd)){const _0x5d35cb=getUserDomain(),_0x90d5c0=await fetchDeviceToken(_0x5d35cb,_0x3302dd[_0x179986(0xee)]);if(_0x90d5c0[_0x179986(0xc4)]==='success'&&_0x90d5c0[_0x179986(0xca)]){const _0x1eda51={'global':_0x3302dd['scope']==='global'},_0x57de45=readScopedConfig(_0x1eda51);_0x57de45[_0x179986(0x116)]=_0x90d5c0['access_key'],writeScopedConfig(_0x57de45,_0x1eda51),deleteStoredDeviceCode();const _0x1a7990=_0x90d5c0[_0x179986(0xca)],_0x382c2b=_0x1a7990[_0x179986(0x102)]>0x8?''+_0x1a7990['slice'](0x0,0x8)+'*'[_0x179986(0x108)](_0x1a7990[_0x179986(0x102)]-0x8):_0x1a7990,_0x5e9bb9=_0x3302dd[_0x179986(0xed)]==='global'?_0x179986(0xe0):_0x179986(0xe1);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE[_0x179986(0x110)],'AccessKey:\x20'+_0x382c2b+_0x179986(0xd5)+_0x5e9bb9+')','Status:\x20valid']['join']('\x0a')};}_0x90d5c0[_0x179986(0xc4)]===_0x179986(0x101)&&deleteStoredDeviceCode();throw CliErrors[_0x179986(0xe3)](_0x179986(0xc8));}throw CliErrors[_0x179986(0xe3)](_0x172b89[_0x179986(0x117)]('\x0a'));}}return{'ok':!![],'message':_0x172b89['join']('\x0a')};}},{'service':a12_0x1e4beb(0x10f),'command':a12_0x1e4beb(0x105),'description':a12_0x1e4beb(0x11e),'risk':a12_0x1e4beb(0x10b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1dd941){const _0x187ca3=a12_0x1e4beb,_0x1b2191=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x1b2191,'meta':{'env':_0x1dd941['envName']??_0x187ca3(0xd0)}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x2322ca=a12_0x251f;(function(_0x2283a1,_0x47588f){const _0x272890=a12_0x251f,_0x2504e0=_0x2283a1();while(!![]){try{const _0x21df44=parseInt(_0x272890(0x164))/0x1*(parseInt(_0x272890(0x185))/0x2)+-parseInt(_0x272890(0x15e))/0x3*(parseInt(_0x272890(0x174))/0x4)+parseInt(_0x272890(0x1a3))/0x5*(-parseInt(_0x272890(0x16f))/0x6)+-parseInt(_0x272890(0x190))/0x7+parseInt(_0x272890(0x158))/0x8*(-parseInt(_0x272890(0x186))/0x9)+parseInt(_0x272890(0x1a5))/0xa+parseInt(_0x272890(0x19f))/0xb;if(_0x21df44===_0x47588f)break;else _0x2504e0['push'](_0x2504e0['shift']());}catch(_0x24c446){_0x2504e0['push'](_0x2504e0['shift']());}}}(a12_0x7188,0x3fd39));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 _0x5145c3=a12_0x251f;writeCliSideChannelLine(_0x5145c3(0x152)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x5145c3(0x172)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x5145c3(0x180));}function buildAccessKeySetupGuide(){const _0xc99293=a12_0x251f;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0xc99293(0x19c)]+':',USER_ACCESS_KEY_CREATE_URL,_0xc99293(0x14e)+CLI_BIN_NAME+_0xc99293(0x14a)]['join']('\x0a');}function canPromptForAccessKey(_0x1c223a){const _0x3f63d3=a12_0x251f;return!_0x1c223a[_0x3f63d3(0x18b)]&&process[_0x3f63d3(0x193)]['isTTY']!==![]&&process[_0x3f63d3(0x171)][_0x3f63d3(0x1a1)]!==![];}function a12_0x7188(){const _0x4c90db=['Show\x20current\x20authentication\x20status','access_key','104llkqIn','authRequired','AccessKey:\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','newConfigFileName','join','envName','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','read','ClientAk','24kOabNu','\x20auth\x20status','stdout','Tip:\x20you\x20can\x20also\x20run:','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','1955212kPXNwv','AccessKey\x20cleared\x20from\x20','Missing\x20accessKey.','auth','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','production','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','yes','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Auth\x20mode:\x20','AccessKey\x20saved\x20to\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','write','repeat','Write\x20to\x20global\x20config\x20(default)','success','6244vwtwuQ','1093221RWcRoV','str','\x20Verify:\x20','\x20env\x20var','No\x20AccessKey\x20found\x20in\x20','nonInteractive','trim','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','length','boolean','98112yNnEUL','Clear\x20accessKey\x20from\x20config','\x20config.','stdin','development','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','\x20Current\x20env:\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Read\x20from\x20global\x20config\x20(default)','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','string','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','userCenterDisplayName','global\x20config','project\x20config','9638442tiNCef','Option\x20B:\x20apps\x20config\x20(','isTTY','\x20scope.','495200neGFDj','test','809710VVWQNa','accessKey','\x20config','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Clear\x20from\x20global\x20config\x20(default)','init','status','ACCESS_KEY','scope','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','access-key','bool','global','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20\x20export\x20','Status:\x20valid','project','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','code','Option\x20C:\x20environment\x20variable','global-default','env','push','8PAlORa','\x20(via\x20','Option\x20A:\x20','validation','\x20doctor','check','3ZojsBN','Shorthand\x20for\x20--access-key','Invalid\x20accessKey\x20format:\x20\x22','expired'];a12_0x7188=function(){return _0x4c90db;};return a12_0x7188();}function resolveAuthScopeFlags(_0x117b28){const _0x64493a=a12_0x251f;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x117b28['bool']('global'),'explicitProject':_0x117b28[_0x64493a(0x14c)](_0x64493a(0x151)),'policy':_0x64493a(0x155)}));}async function resolveAuthWriteInput(_0x309eca){const _0x37020a=a12_0x251f;let _0x1b3bb4=(_0x309eca[_0x37020a(0x187)](_0x37020a(0x14b))||_0x309eca[_0x37020a(0x187)]('ak')||'')[_0x37020a(0x18c)]();const _0x332368=(_0x309eca[_0x37020a(0x187)](_0x37020a(0x156))||'')[_0x37020a(0x18c)]();if(!_0x1b3bb4&&canPromptForAccessKey(_0x309eca))try{showAccessKeyCreateHint(),_0x1b3bb4=await promptAccessKey('');}catch(_0x4ff766){if(isAbortPrompt(_0x4ff766))throw CliErrors['cancelled']();throw _0x4ff766;}if(!_0x1b3bb4)throw CliErrors[_0x37020a(0x15b)](_0x37020a(0x176),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x37020a(0x1a4)](_0x1b3bb4))throw CliErrors[_0x37020a(0x15b)](_0x37020a(0x160)+_0x1b3bb4+'\x22',_0x37020a(0x19b));if(!_0x332368)return{'accessKey':_0x1b3bb4};const _0x244c7e=normalizeEnv(_0x332368);return{'accessKey':_0x1b3bb4,'env':isDaily(_0x244c7e)?'daily':isDev(_0x244c7e)?_0x37020a(0x194):_0x37020a(0x179)};}function a12_0x251f(_0x4bfee2,_0x41f399){_0x4bfee2=_0x4bfee2-0x14a;const _0x71886f=a12_0x7188();let _0x251f89=_0x71886f[_0x4bfee2];return _0x251f89;}export const authDefinitions=[{'service':a12_0x2322ca(0x177),'command':'login','description':a12_0x2322ca(0x173),'risk':a12_0x2322ca(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a12_0x2322ca(0x19a),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x2322ca(0x19a),'description':a12_0x2322ca(0x15f)},{'name':'global','type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x183),'default':!![]},{'name':a12_0x2322ca(0x151),'type':'boolean','description':a12_0x2322ca(0x17d),'default':![]}],async 'execute'(_0x617096){const _0x56be3b=a12_0x2322ca;if(_0x617096['bool'](_0x56be3b(0x17c)))throw CliErrors['validation'](_0x56be3b(0x197),'Use\x20`'+CLI_BIN_NAME+_0x56be3b(0x1a8)+CLI_BIN_NAME+_0x56be3b(0x18d));const _0xffc09a=(_0x617096[_0x56be3b(0x187)](_0x56be3b(0x14b))||_0x617096[_0x56be3b(0x187)]('ak')||'')['trim']();if(!_0xffc09a&&_0x617096[_0x56be3b(0x18b)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x2e3450=await resolveAuthWriteInput(_0x617096),_0x40bed5=resolveAuthScopeFlags(_0x617096),_0x22b15e=readScopedConfig(_0x40bed5);_0x22b15e['accessKey']=_0x2e3450[_0x56be3b(0x1a6)];_0x2e3450[_0x56be3b(0x156)]&&(_0x22b15e['env']=_0x2e3450[_0x56be3b(0x156)]);writeScopedConfig(_0x22b15e,_0x40bed5);const _0x284483=_0x40bed5[_0x56be3b(0x14d)]?_0x56be3b(0x14d):_0x56be3b(0x151),_0x4d2adf=_0x22b15e[_0x56be3b(0x156)]?_0x56be3b(0x196)+_0x22b15e[_0x56be3b(0x156)]+'.':'';return{'ok':!![],'message':_0x56be3b(0x17f)+_0x284483+_0x56be3b(0x192)+_0x4d2adf+_0x56be3b(0x188)+CLI_BIN_NAME+_0x56be3b(0x170)};}},{'service':'auth','command':a12_0x2322ca(0x1aa),'description':a12_0x2322ca(0x195),'risk':a12_0x2322ca(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a12_0x2322ca(0x19a),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x2322ca(0x19a),'description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x2322ca(0x156),'type':a12_0x2322ca(0x19a),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a12_0x2322ca(0x14d),'type':'boolean','description':a12_0x2322ca(0x183),'default':!![]},{'name':'project','type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x17d),'default':![]}],async 'execute'(_0x2c5236){const _0xcb944=a12_0x2322ca,_0xd81207=await resolveAuthWriteInput(_0x2c5236),_0x64fa20=resolveAuthScopeFlags(_0x2c5236),_0x1f8b03={'accessKey':_0xd81207['accessKey']};_0xd81207[_0xcb944(0x156)]&&(_0x1f8b03[_0xcb944(0x156)]=_0xd81207[_0xcb944(0x156)]);writeScopedConfig(_0x1f8b03,_0x64fa20);const _0x4b7a7f=_0x64fa20[_0xcb944(0x14d)]?_0xcb944(0x14d):_0xcb944(0x151),_0x51d559=_0x1f8b03[_0xcb944(0x156)]?_0xcb944(0x196)+_0x1f8b03[_0xcb944(0x156)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x4b7a7f+_0xcb944(0x1a2)+_0x51d559+_0xcb944(0x188)+CLI_BIN_NAME+_0xcb944(0x170)};}},{'service':a12_0x2322ca(0x177),'command':'logout','description':a12_0x2322ca(0x191),'risk':a12_0x2322ca(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2322ca(0x14d),'type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x1a9),'default':!![]},{'name':a12_0x2322ca(0x151),'type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x199),'default':![]}],async 'execute'(_0x2a48eb){const _0x12327d=a12_0x2322ca,_0x481f85=resolveAuthScopeFlags(_0x2a48eb),_0x4ab4ab=readScopedConfig(_0x481f85),_0x5536c7=!!_0x4ab4ab['accessKey'];delete _0x4ab4ab['accessKey'],writeScopedConfig(_0x4ab4ab,_0x481f85);const _0xdc8cdc=_0x481f85['global']?_0x12327d(0x14d):_0x12327d(0x151);if(_0x5536c7)return{'ok':!![],'message':_0x12327d(0x175)+_0xdc8cdc+_0x12327d(0x192)};return{'ok':!![],'message':_0x12327d(0x18a)+_0xdc8cdc+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a12_0x2322ca(0x177),'command':'status','description':a12_0x2322ca(0x162),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2322ca(0x14d),'type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x198),'default':!![]},{'name':a12_0x2322ca(0x151),'type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x17b),'default':![]},{'name':a12_0x2322ca(0x15d),'type':a12_0x2322ca(0x18f),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x43a4b8){const _0x1ab6e9=a12_0x2322ca,_0x1d9608=resolveAuthScopeFlags(_0x43a4b8),_0x1f1031=readScopedConfig(_0x1d9608),_0x2f22c1=productEnvName(_0x1ab6e9(0x1ac)),_0x4622d8=productEnv(_0x1ab6e9(0x1ac))||undefined,_0x187d7d=_0x1f1031[_0x1ab6e9(0x1a6)]||undefined,_0x25c833=_0x4622d8||_0x187d7d,_0x8e788e=_0x4622d8?_0x2f22c1+_0x1ab6e9(0x189):_0x187d7d?(_0x1d9608[_0x1ab6e9(0x14d)]?_0x1ab6e9(0x14d):_0x1ab6e9(0x151))+_0x1ab6e9(0x1a7):null,_0x342d23=[_0x1ab6e9(0x17e)+AUTH_MODE[_0x1ab6e9(0x16e)]];if(_0x25c833){const _0x2bec4b=_0x25c833[_0x1ab6e9(0x18e)]>0x8?''+_0x25c833['slice'](0x0,0x8)+'*'[_0x1ab6e9(0x182)](_0x25c833[_0x1ab6e9(0x18e)]-0x8):_0x25c833;_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x166)+_0x2bec4b+(_0x8e788e?_0x1ab6e9(0x159)+_0x8e788e+')':'')),_0x342d23[_0x1ab6e9(0x157)]('Status:\x20valid');}if(!_0x25c833){_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x17a)),_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x15a)+CLI_BIN_NAME+_0x1ab6e9(0x16c)),_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x1a0)+PRODUCT_CONFIG[_0x1ab6e9(0x168)]+')'),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x178)),_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x154)),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x14f)+_0x2f22c1+'=ak_xxx'),_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x1ab6e9(0x170)),_0x342d23[_0x1ab6e9(0x157)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x1ab6e9(0x15c));if(_0x43a4b8['bool']('check')){const _0x243340=readStoredDeviceCode();if(_0x243340&&!isStoredDeviceCodeExpired(_0x243340)){const _0x3cc79a=getUserDomain(),_0x1eca80=await fetchDeviceToken(_0x3cc79a,_0x243340[_0x1ab6e9(0x153)]);if(_0x1eca80[_0x1ab6e9(0x1ab)]===_0x1ab6e9(0x184)&&_0x1eca80[_0x1ab6e9(0x163)]){const _0x5a2ac4={'global':_0x243340[_0x1ab6e9(0x1ad)]==='global'},_0x2a1274=readScopedConfig(_0x5a2ac4);_0x2a1274[_0x1ab6e9(0x1a6)]=_0x1eca80[_0x1ab6e9(0x163)],writeScopedConfig(_0x2a1274,_0x5a2ac4),deleteStoredDeviceCode();const _0xcccc2=_0x1eca80['access_key'],_0x54506f=_0xcccc2[_0x1ab6e9(0x18e)]>0x8?''+_0xcccc2['slice'](0x0,0x8)+'*'[_0x1ab6e9(0x182)](_0xcccc2[_0x1ab6e9(0x18e)]-0x8):_0xcccc2,_0x1016be=_0x243340[_0x1ab6e9(0x1ad)]===_0x1ab6e9(0x14d)?_0x1ab6e9(0x19d):_0x1ab6e9(0x19e);return{'ok':!![],'message':[_0x1ab6e9(0x17e)+AUTH_MODE[_0x1ab6e9(0x16e)],_0x1ab6e9(0x166)+_0x54506f+_0x1ab6e9(0x159)+_0x1016be+')',_0x1ab6e9(0x150)][_0x1ab6e9(0x169)]('\x0a')};}_0x1eca80['status']===_0x1ab6e9(0x161)&&deleteStoredDeviceCode();throw CliErrors[_0x1ab6e9(0x165)](_0x1ab6e9(0x16b));}throw CliErrors['authRequired'](_0x342d23[_0x1ab6e9(0x169)]('\x0a'));}}return{'ok':!![],'message':_0x342d23[_0x1ab6e9(0x169)]('\x0a')};}},{'service':a12_0x2322ca(0x177),'command':'info','description':a12_0x2322ca(0x167),'risk':a12_0x2322ca(0x16d),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3b1c51){const _0x4ed9f9=a12_0x2322ca,_0x52c361=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x52c361,'meta':{'env':_0x3b1c51[_0x4ed9f9(0x16a)]??_0x4ed9f9(0x179)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x363412,_0x4cd14b){const _0x37f178=a13_0x3a0d,_0x4a53ab=_0x363412();while(!![]){try{const _0x521085=parseInt(_0x37f178(0x152))/0x1+parseInt(_0x37f178(0x15d))/0x2*(-parseInt(_0x37f178(0x156))/0x3)+-parseInt(_0x37f178(0x15c))/0x4+parseInt(_0x37f178(0x14c))/0x5+parseInt(_0x37f178(0x151))/0x6+parseInt(_0x37f178(0x14a))/0x7*(parseInt(_0x37f178(0x150))/0x8)+-parseInt(_0x37f178(0x153))/0x9*(parseInt(_0x37f178(0x155))/0xa);if(_0x521085===_0x4cd14b)break;else _0x4a53ab['push'](_0x4a53ab['shift']());}catch(_0x30dfad){_0x4a53ab['push'](_0x4a53ab['shift']());}}}(a13_0x4cac,0x3c8ef));import{createInterface}from'node:readline';function a13_0x3a0d(_0x3c7ebd,_0x43fd1e){_0x3c7ebd=_0x3c7ebd-0x14a;const _0x4cac7c=a13_0x4cac();let _0x3a0dab=_0x4cac7c[_0x3c7ebd];return _0x3a0dab;}class AbortPrompt extends Error{constructor(){const _0x5c3d7d=a13_0x3a0d;super('User\x20aborted\x20prompt'),this[_0x5c3d7d(0x15a)]=_0x5c3d7d(0x14d);}}function createSafeRl(){const _0xd9d0c7=a13_0x3a0d,_0x419b20=createInterface({'input':process[_0xd9d0c7(0x14f)],'output':process['stdout']});let _0x59a53b;const _0x326c32=new Promise((_0x3ffddc,_0x56f776)=>{const _0x2514b6=_0xd9d0c7;_0x59a53b=()=>{const _0x3cc0aa=a13_0x3a0d;_0x59a53b&&(_0x419b20[_0x3cc0aa(0x157)](_0x3cc0aa(0x14e),_0x59a53b),_0x59a53b=undefined);try{_0x419b20[_0x3cc0aa(0x14b)]();}catch{}_0x56f776(new AbortPrompt());},_0x419b20[_0x2514b6(0x15b)]('SIGINT',_0x59a53b);}),_0x44c00d=()=>{const _0x261b4b=_0xd9d0c7;_0x59a53b&&(_0x419b20[_0x261b4b(0x157)](_0x261b4b(0x14e),_0x59a53b),_0x59a53b=undefined);try{_0x419b20[_0x261b4b(0x14b)]();}catch{}};return{'rl':_0x419b20,'abortPromise':_0x326c32,'disposeSuccess':_0x44c00d};}function a13_0x4cac(){const _0x4f8417=['3448971ivxDRk','AccessKey\x20(paste\x20ak_...):\x20','10TKJuee','786mnpEZc','removeListener','AccessKey\x20(','race','name','once','1270880wzPxpU','1994PyIJrx','1421462dzUhuI','close','2365935VhZhpr','AbortPrompt','SIGINT','stdin','16LQuwhv','503838YyoblR','246908tyNuQW'];a13_0x4cac=function(){return _0x4f8417;};return a13_0x4cac();}export async function promptAccessKey(_0x12d21b=''){const _0x4efddb=a13_0x3a0d,{rl:_0x18510f,abortPromise:_0x413d8f,disposeSuccess:_0x4577e7}=createSafeRl(),_0x3eceb1=new Promise(_0xeee123=>{const _0x38c74c=a13_0x3a0d,_0x13aef4=_0x12d21b?_0x38c74c(0x158)+_0x12d21b+'):\x20':_0x38c74c(0x154);_0x18510f['question'](_0x13aef4,_0x505ffa=>{_0x4577e7(),_0xeee123(_0x505ffa['trim']()||_0x12d21b);});});return Promise[_0x4efddb(0x159)]([_0x3eceb1,_0x413d8f]);}export function isAbortPrompt(_0x5afe59){const _0x4caaed=a13_0x3a0d;return _0x5afe59 instanceof Error&&_0x5afe59[_0x4caaed(0x15a)]===_0x4caaed(0x14d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a14_0x3170(_0x266637,_0x2838e3){_0x266637=_0x266637-0x15c;const _0x2e73a9=a14_0x2e73();let _0x3170af=_0x2e73a9[_0x266637];return _0x3170af;}function a14_0x2e73(){const _0x4c86ee=['Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','276tzDXlf','bff','appCode','18580vDKHvs','755HuOrPi','read','801MhXWNV','35259iHEvbZ','1629896RfewON','42cVJzjL','detail','(none)','str','618JisQXz','description','gmtModified','BFF\x20function\x20name','5652HXlspt','192181izGfSp','version','337794prGLbU','276TrrUna'];a14_0x2e73=function(){return _0x4c86ee;};return a14_0x2e73();}const a14_0x24659d=a14_0x3170;(function(_0xe47be5,_0x50953d){const _0x1fa2c3=a14_0x3170,_0x3e897c=_0xe47be5();while(!![]){try{const _0x30f20c=parseInt(_0x1fa2c3(0x170))/0x1+parseInt(_0x1fa2c3(0x165))/0x2*(-parseInt(_0x1fa2c3(0x169))/0x3)+parseInt(_0x1fa2c3(0x16d))/0x4*(-parseInt(_0x1fa2c3(0x160))/0x5)+parseInt(_0x1fa2c3(0x15c))/0x6*(-parseInt(_0x1fa2c3(0x163))/0x7)+-parseInt(_0x1fa2c3(0x164))/0x8+-parseInt(_0x1fa2c3(0x162))/0x9*(-parseInt(_0x1fa2c3(0x15f))/0xa)+parseInt(_0x1fa2c3(0x16e))/0xb*(parseInt(_0x1fa2c3(0x171))/0xc);if(_0x30f20c===_0x50953d)break;else _0x3e897c['push'](_0x3e897c['shift']());}catch(_0x2eeda5){_0x3e897c['push'](_0x3e897c['shift']());}}}(a14_0x2e73,0x3d7d5));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a14_0x24659d(0x15d),'command':a14_0x24659d(0x166),'description':a14_0x24659d(0x172),'risk':a14_0x24659d(0x161),'flags':[{...NAME_FLAG,'required':!![],'description':a14_0x24659d(0x16c)}],async 'execute'(_0x4e50bd){const _0x589d27=a14_0x24659d,_0x21099e=await getBffEndpointContract(_0x4e50bd[_0x589d27(0x15e)],_0x4e50bd[_0x589d27(0x168)]('name'));return{'ok':!![],'data':{'appCode':_0x21099e[_0x589d27(0x15e)],'functionName':_0x21099e['functionName'],'description':_0x21099e[_0x589d27(0x16a)]||_0x589d27(0x167),'version':_0x21099e[_0x589d27(0x16f)],'gmtModified':_0x21099e[_0x589d27(0x16b)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x54807b=a15_0x2064;(function(_0x4bf3cf,_0x2a1997){const _0x232657=a15_0x2064,_0x56bfe7=_0x4bf3cf();while(!![]){try{const _0x3d8852=-parseInt(_0x232657(0x1ea))/0x1*(-parseInt(_0x232657(0x1ec))/0x2)+-parseInt(_0x232657(0x1ee))/0x3+parseInt(_0x232657(0x1f4))/0x4*(-parseInt(_0x232657(0x1f2))/0x5)+parseInt(_0x232657(0x1e8))/0x6*(parseInt(_0x232657(0x1f1))/0x7)+parseInt(_0x232657(0x1ed))/0x8*(parseInt(_0x232657(0x1e7))/0x9)+parseInt(_0x232657(0x1e9))/0xa+-parseInt(_0x232657(0x1e6))/0xb*(parseInt(_0x232657(0x1f3))/0xc);if(_0x3d8852===_0x2a1997)break;else _0x56bfe7['push'](_0x56bfe7['shift']());}catch(_0x462e6d){_0x56bfe7['push'](_0x56bfe7['shift']());}}}(a15_0x5e29,0x2673a));import{executeSdkBff}from'../../core/sdk-client.js';function a15_0x5e29(){const _0x599da0=['str','40663BhUCiT','105tKVQXj','372YcqYzj','2356FaxZYw','exec','7007feymEg','18YLFGPI','66oPStTL','357720mojXHk','5zALOzP','read','34180xoUzDl','848600EIHsqu','622971AMWQch','now'];a15_0x5e29=function(){return _0x599da0;};return a15_0x5e29();}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a15_0x2064(_0x544189,_0x25dd57){_0x544189=_0x544189-0x1e5;const _0x5e292a=a15_0x5e29();let _0x20644c=_0x5e292a[_0x544189];return _0x20644c;}export const bffExec={'service':'bff','command':a15_0x54807b(0x1e5),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a15_0x54807b(0x1eb),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x1d6b95){const _0x52e33d=a15_0x54807b,_0x56f03e=parseJsonParams(_0x1d6b95[_0x52e33d(0x1f0)]('params')),_0x43904f=Date[_0x52e33d(0x1ef)](),_0x5bfe34=await executeSdkBff(_0x1d6b95['str']('name'),_0x56f03e),_0x519b44=Date['now']()-_0x43904f;return{'ok':!![],'data':{'result':_0x5bfe34,'elapsed':_0x519b44},'message':'BFF\x20executed\x20in\x20'+_0x519b44+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0x2ca2(){const _0x12f675=['5148060bXmggy','12171448tjATdF','3tzfxmw','30XSzqSM','2866444oeUUbH','6101570sGljVd','806402wDfjot','18jxurKt','442003msiTqx','967463sCajNI'];a16_0x2ca2=function(){return _0x12f675;};return a16_0x2ca2();}function a16_0x3e49(_0x51aea7,_0xb630a0){_0x51aea7=_0x51aea7-0x1c9;const _0x2ca26c=a16_0x2ca2();let _0x3e49b2=_0x2ca26c[_0x51aea7];return _0x3e49b2;}(function(_0x11bd94,_0x1b2f89){const _0x2cc4ce=a16_0x3e49,_0x41fc0f=_0x11bd94();while(!![]){try{const _0xbadf10=parseInt(_0x2cc4ce(0x1cb))/0x1+parseInt(_0x2cc4ce(0x1c9))/0x2*(-parseInt(_0x2cc4ce(0x1cf))/0x3)+parseInt(_0x2cc4ce(0x1d1))/0x4+parseInt(_0x2cc4ce(0x1cd))/0x5+parseInt(_0x2cc4ce(0x1d0))/0x6*(-parseInt(_0x2cc4ce(0x1cc))/0x7)+-parseInt(_0x2cc4ce(0x1ce))/0x8+parseInt(_0x2cc4ce(0x1ca))/0x9*(parseInt(_0x2cc4ce(0x1d2))/0xa);if(_0xbadf10===_0x1b2f89)break;else _0x41fc0f['push'](_0x41fc0f['shift']());}catch(_0x3ea28c){_0x41fc0f['push'](_0x41fc0f['shift']());}}}(a16_0x2ca2,0xc191f));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a17_0x5b8a22=a17_0x15e6;function a17_0x2d98(){const _0x66476c=['skipped','nonInteractive','\x20-g\x20-y','1650690cjhLRp','cli-skill-install','unknown','9qVeAhR','8701580DetfTJ','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','info','80RZwHCA','204034ASWAhR','write','apiError','Skipped\x20npx\x20(','install','pipe','1355lagCnZ','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','45134wRSHZz','116263uqAKhn','1850836msrViN','error','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','log','13170DlDiTM','npx\x20skills\x20add\x20failed:\x20','CLI\x20Built-in\x20Skill\x20installed','../../skills/npx-skills-add.js','cwd'];a17_0x2d98=function(){return _0x66476c;};return a17_0x2d98();}(function(_0x625b17,_0x5bc53d){const _0x2cc568=a17_0x15e6,_0x1171a3=_0x625b17();while(!![]){try{const _0x2ae9a2=-parseInt(_0x2cc568(0x125))/0x1+-parseInt(_0x2cc568(0x12e))/0x2+parseInt(_0x2cc568(0x11d))/0x3+-parseInt(_0x2cc568(0x130))/0x4+-parseInt(_0x2cc568(0x12b))/0x5*(parseInt(_0x2cc568(0x115))/0x6)+parseInt(_0x2cc568(0x12f))/0x7*(parseInt(_0x2cc568(0x124))/0x8)+parseInt(_0x2cc568(0x120))/0x9*(parseInt(_0x2cc568(0x121))/0xa);if(_0x2ae9a2===_0x5bc53d)break;else _0x1171a3['push'](_0x1171a3['shift']());}catch(_0x26052d){_0x1171a3['push'](_0x1171a3['shift']());}}}(a17_0x2d98,0x49cf3));import{CliErrors}from'../../errors.js';function a17_0x15e6(_0xd69c57,_0x4d5641){_0xd69c57=_0xd69c57-0x115;const _0x2d9822=a17_0x2d98();let _0x15e661=_0x2d9822[_0xd69c57];return _0x15e661;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a17_0x5b8a22(0x129),'description':a17_0x5b8a22(0x132),'risk':a17_0x5b8a22(0x126),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x15a56e){const _0x5ac68d=a17_0x5b8a22;logger['setLogPath'](process[_0x5ac68d(0x119)]()),logger[_0x5ac68d(0x123)](_0x5ac68d(0x11e),_0x5ac68d(0x12d));const {LOVRABET_SKILL_SOURCE:_0x25c858,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x28db17,runNpxSkillsAddGlobal:_0x50bf5c}=await import(_0x5ac68d(0x118)),_0xa06f9f=_0x15a56e[_0x5ac68d(0x11b)]?_0x5ac68d(0x12a):'inherit';console['log']('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20'+_0x25c858+'\x20-g\x20-y)...');const _0x3b2180=_0x50bf5c(process[_0x5ac68d(0x119)](),_0x25c858,{'stdio':_0xa06f9f});if(_0x3b2180[_0x5ac68d(0x11a)])console[_0x5ac68d(0x133)](_0x5ac68d(0x128)+_0x28db17+_0x5ac68d(0x122));else{if(_0x3b2180['ok'])console[_0x5ac68d(0x133)](_0x5ac68d(0x117));else throw CliErrors[_0x5ac68d(0x127)](_0x5ac68d(0x116)+(_0x3b2180[_0x5ac68d(0x131)]||_0x5ac68d(0x11f)),_0x5ac68d(0x12c)+_0x25c858+_0x5ac68d(0x11c));}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x374e42,_0x13f3cc){const _0x33bc5a=a18_0x1b28,_0x5fdc8=_0x374e42();while(!![]){try{const _0x419f16=-parseInt(_0x33bc5a(0x15d))/0x1+-parseInt(_0x33bc5a(0x161))/0x2*(parseInt(_0x33bc5a(0x15a))/0x3)+-parseInt(_0x33bc5a(0x168))/0x4+parseInt(_0x33bc5a(0x16d))/0x5*(parseInt(_0x33bc5a(0x16c))/0x6)+parseInt(_0x33bc5a(0x16b))/0x7*(parseInt(_0x33bc5a(0x163))/0x8)+-parseInt(_0x33bc5a(0x15f))/0x9*(-parseInt(_0x33bc5a(0x160))/0xa)+parseInt(_0x33bc5a(0x15e))/0xb;if(_0x419f16===_0x13f3cc)break;else _0x5fdc8['push'](_0x5fdc8['shift']());}catch(_0xe0ea62){_0x5fdc8['push'](_0x5fdc8['shift']());}}}(a18_0x52d1,0xacdb6));import{CLI_BIN_NAME}from'../../constant/cli.js';function a18_0x52d1(){const _0x61d9bc=['global-default','project-default','4659088AhjBZe','\x20(global)','newConfigFileName','14tAyYyo','107298WjCINy','40JDxCom','validation','\x20found).','2427BFAkrn','inProject','Use\x20only\x20one\x20config\x20scope\x20flag.','1220991UcXJtR','33135652DnuZfU','1895409CqVIFN','30onYKFy','2972GZJYFE','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','2035040ttBFts','project','global'];a18_0x52d1=function(){return _0x61d9bc;};return a18_0x52d1();}import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x2357dd){const _0x154418=a18_0x1b28,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x539b6f}=_0x2357dd;if(explicitGlobal&&explicitProject)throw CliErrors[_0x154418(0x16e)](_0x154418(0x162),_0x154418(0x15c));if(explicitGlobal)return _0x154418(0x165);if(explicitProject)return _0x154418(0x164);switch(_0x539b6f){case _0x154418(0x166):return _0x154418(0x165);case _0x154418(0x167):return _0x2357dd[_0x154418(0x15b)]??isInProject()?_0x154418(0x164):'global';case'project-or-global-explicit':if(!(_0x2357dd[_0x154418(0x15b)]??isInProject()))throw CliErrors[_0x154418(0x16e)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x154418(0x16a)]+_0x154418(0x16f),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG['newConfigFileName']+',\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return _0x154418(0x164);}}export function toScopeFlags(_0x1c101d){return{'global':_0x1c101d==='global'};}function a18_0x1b28(_0xad0b2a,_0x1adfce){_0xad0b2a=_0xad0b2a-0x15a;const _0x52d1c1=a18_0x52d1();let _0x1b2805=_0x52d1c1[_0xad0b2a];return _0x1b2805;}export function formatScopeLabel(_0x247016){const _0x385174=a18_0x1b28;return _0x247016===_0x385174(0x165)?_0x385174(0x169):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31a70b,_0x25bb20){const _0x5cfa0c=a19_0x3183,_0x4883a8=_0x31a70b();while(!![]){try{const _0x294a33=parseInt(_0x5cfa0c(0x18a))/0x1*(parseInt(_0x5cfa0c(0x180))/0x2)+-parseInt(_0x5cfa0c(0x173))/0x3*(-parseInt(_0x5cfa0c(0x17f))/0x4)+parseInt(_0x5cfa0c(0x18b))/0x5+parseInt(_0x5cfa0c(0x181))/0x6+-parseInt(_0x5cfa0c(0x176))/0x7*(parseInt(_0x5cfa0c(0x185))/0x8)+parseInt(_0x5cfa0c(0x189))/0x9*(parseInt(_0x5cfa0c(0x175))/0xa)+parseInt(_0x5cfa0c(0x17c))/0xb*(-parseInt(_0x5cfa0c(0x172))/0xc);if(_0x294a33===_0x25bb20)break;else _0x4883a8['push'](_0x4883a8['shift']());}catch(_0x3c8dee){_0x4883a8['push'](_0x4883a8['shift']());}}}(a19_0x12e7,0xb9d96));import{CliErrors}from'../../errors.js';function isSet(_0x5df458,_0x3bc26){const _0x4cb231=_0x5df458['flag'](_0x3bc26);return _0x4cb231!==undefined&&_0x4cb231!==''&&_0x4cb231!==![]&&_0x4cb231!==0x0;}function fmtNames(_0x46ad91){const _0x4a3eba=a19_0x3183;return _0x46ad91[_0x4a3eba(0x18c)](_0x55a3d7=>'--'+_0x55a3d7)[_0x4a3eba(0x187)](',\x20');}export function requireOneOf(_0x487374,_0x3e6546,_0x542faf){const _0x3ecaf2=a19_0x3183,_0xfa848a=_0x3e6546[_0x3ecaf2(0x17e)](_0x91607f=>isSet(_0x487374,_0x91607f));if(_0xfa848a[_0x3ecaf2(0x178)]!==0x1)throw CliErrors[_0x3ecaf2(0x18d)](_0xfa848a['length']===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x3e6546)+_0x3ecaf2(0x17b)+_0x542faf+'`.':_0x3ecaf2(0x17a)+fmtNames(_0x3e6546)+_0x3ecaf2(0x17d)+fmtNames(_0xfa848a)+'.',_0xfa848a[_0x3ecaf2(0x178)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x3e6546):_0x3ecaf2(0x186));}export function requireAnyOf(_0x30cc91,_0x5633a6,_0x4b94e8){const _0xf17f2f=a19_0x3183;if(!_0x5633a6[_0xf17f2f(0x184)](_0x5a68d4=>isSet(_0x30cc91,_0x5a68d4)))throw CliErrors[_0xf17f2f(0x18d)](_0xf17f2f(0x179)+fmtNames(_0x5633a6)+_0xf17f2f(0x17b)+_0x4b94e8+'`.',_0xf17f2f(0x171)+fmtNames(_0x5633a6));}function a19_0x3183(_0x5d17c6,_0x480a45){_0x5d17c6=_0x5d17c6-0x171;const _0x12e7c6=a19_0x12e7();let _0x318304=_0x12e7c6[_0x5d17c6];return _0x318304;}export function mutuallyExclusive(_0x4d3e34,_0x139027,_0xcb77a6){const _0x2361eb=a19_0x3183,_0x558b7f=_0x139027[_0x2361eb(0x17e)](_0x21d78c=>isSet(_0x4d3e34,_0x21d78c));if(_0x558b7f['length']>0x1)throw CliErrors[_0x2361eb(0x18d)]('Flags\x20'+fmtNames(_0x558b7f)+_0x2361eb(0x177)+_0xcb77a6+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x139027));}export function validatePattern(_0x23a797,_0x180d9c,_0xd51dad,_0x45b072){const _0x50d032=a19_0x3183,_0x68edfd=_0x23a797[_0x50d032(0x183)](_0x180d9c);if(_0x68edfd&&!_0xd51dad[_0x50d032(0x188)](_0x68edfd))throw CliErrors[_0x50d032(0x18d)](_0x50d032(0x182)+_0x180d9c+':\x20expected\x20'+_0x45b072+_0x50d032(0x174)+_0x68edfd+'\x22.');}function a19_0x12e7(){const _0x237e15=['37036BfZgWm','4173005uPqJym','map','validation','Provide\x20one\x20of:\x20','12SiKuSt','417EhNZMG',',\x20got\x20\x22','130HRrRaO','35SPgnLI','\x20are\x20mutually\x20exclusive\x20for\x20`','length','At\x20least\x20one\x20of\x20','Only\x20one\x20of\x20','\x20is\x20required\x20for\x20`','21094821mnUxzu','\x20is\x20allowed,\x20found:\x20','filter','18776lumbqh','4qIbwcD','2083740Hgyrms','Invalid\x20--','str','some','129464Ksshau','Remove\x20all\x20but\x20one.','join','test','589455DWrXjH'];a19_0x12e7=function(){return _0x237e15;};return a19_0x12e7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a20_0x2af759=a20_0x1c52;(function(_0x5bea73,_0x515bb9){const _0x331379=a20_0x1c52,_0x5926a9=_0x5bea73();while(!![]){try{const _0x2e4321=-parseInt(_0x331379(0x195))/0x1+parseInt(_0x331379(0x196))/0x2+parseInt(_0x331379(0x1a0))/0x3*(-parseInt(_0x331379(0x19f))/0x4)+parseInt(_0x331379(0x1a2))/0x5+-parseInt(_0x331379(0x19d))/0x6*(parseInt(_0x331379(0x1a1))/0x7)+parseInt(_0x331379(0x199))/0x8+parseInt(_0x331379(0x19e))/0x9;if(_0x2e4321===_0x515bb9)break;else _0x5926a9['push'](_0x5926a9['shift']());}catch(_0x4fddcc){_0x5926a9['push'](_0x5926a9['shift']());}}}(a20_0x3197,0x907d3));export const CODE_FLAG={'name':'code','type':a20_0x2af759(0x1a8),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a20_0x2af759(0x1a4)}};export const SQLCODE_FLAG={'name':a20_0x2af759(0x1a3),'type':a20_0x2af759(0x1a8),'required':!![],'description':a20_0x2af759(0x19c),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x2af759(0x1a5)}};export const VERBOSE_FLAG={'name':'verbose','type':a20_0x2af759(0x19a),'description':a20_0x2af759(0x1a9)};function a20_0x3197(){const _0x499cff=['number','string','Return\x20full\x20raw\x20response\x20object','1108051drfPFV','1627586rXglva','Resource\x20ID','params','7686408AqYXhj','boolean','name','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','22254PDKLyP','1671957rogajY','4CXDzYb','443742TzWbYH','791NEkcNE','1532710HsIFfN','sqlcode','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Resource\x20name\x20for\x20lookup'];a20_0x3197=function(){return _0x499cff;};return a20_0x3197();}export const PARAMS_FLAG={'name':a20_0x2af759(0x198),'type':'string','description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};function a20_0x1c52(_0x2e9483,_0x37f80d){_0x2e9483=_0x2e9483-0x195;const _0x319700=a20_0x3197();let _0x1c52d4=_0x319700[_0x2e9483];return _0x1c52d4;}export const NAME_FLAG={'name':a20_0x2af759(0x19b),'type':a20_0x2af759(0x1a8),'description':a20_0x2af759(0x1a6)};export const ID_FLAG={'name':'id','type':a20_0x2af759(0x1a7),'required':!![],'description':a20_0x2af759(0x197)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ee627,_0x5160eb){const _0x28421a=a21_0x212a,_0x2abd4d=_0x1ee627();while(!![]){try{const _0x424e7f=-parseInt(_0x28421a(0xc2))/0x1+parseInt(_0x28421a(0xc1))/0x2*(-parseInt(_0x28421a(0xd5))/0x3)+parseInt(_0x28421a(0xd4))/0x4+parseInt(_0x28421a(0xd1))/0x5*(parseInt(_0x28421a(0xcb))/0x6)+-parseInt(_0x28421a(0xc8))/0x7+parseInt(_0x28421a(0xd3))/0x8*(-parseInt(_0x28421a(0xc5))/0x9)+-parseInt(_0x28421a(0xd2))/0xa*(-parseInt(_0x28421a(0xc3))/0xb);if(_0x424e7f===_0x5160eb)break;else _0x2abd4d['push'](_0x2abd4d['shift']());}catch(_0x505b3b){_0x2abd4d['push'](_0x2abd4d['shift']());}}}(a21_0x496c,0x56eca));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_0x496c(){const _0x338036=['210237IIymXN','4lcqXOh','161081eotSpY','312488mtzSSU','\x20path\x20is\x20required.','27lRoJCO','trim','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','3089422usgGjl','isFile','toFixed','1568118MVLnhO','ceil','validation','size','File\x20not\x20found:\x20','\x20MB','10dseRRo','140OehuSr','1187456XgAuSa','2494020CrBHDi'];a21_0x496c=function(){return _0x338036;};return a21_0x496c();}function a21_0x212a(_0x2338e4,_0x7acbb3){_0x2338e4=_0x2338e4-0xc1;const _0x496cd0=a21_0x496c();let _0x212a1a=_0x496cd0[_0x2338e4];return _0x212a1a;}function formatBytes(_0x503ab5){const _0x129361=a21_0x212a;if(_0x503ab5>=BYTES_PER_MB){const _0x2e5699=Math[_0x129361(0xcc)](_0x503ab5/BYTES_PER_MB*0x64)/0x64;return _0x2e5699[_0x129361(0xca)](0x2)+_0x129361(0xd0);}return _0x503ab5+'\x20B';}export function requireRuntimeUploadFile(_0x1aacf1,_0x363068){const _0x536e7c=a21_0x212a,_0x2a14b0=_0x1aacf1[_0x536e7c(0xc6)]();if(!_0x2a14b0)throw CliErrors['validation'](_0x363068+_0x536e7c(0xc4));if(!existsSync(_0x2a14b0))throw CliErrors[_0x536e7c(0xcd)](_0x536e7c(0xcf)+_0x2a14b0);const _0x367baa=statSync(_0x2a14b0);if(!_0x367baa[_0x536e7c(0xc9)]())throw CliErrors[_0x536e7c(0xcd)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2a14b0);if(_0x367baa[_0x536e7c(0xce)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x536e7c(0xcd)](_0x536e7c(0xc7)+_0x2a14b0+'\x20('+formatBytes(_0x367baa[_0x536e7c(0xce)])+')');return{'path':_0x2a14b0,'size':_0x367baa[_0x536e7c(0xce)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x45773f=a22_0x845a;(function(_0x105040,_0x5abbfe){const _0x1107d4=a22_0x845a,_0x4d6ab9=_0x105040();while(!![]){try{const _0x446059=parseInt(_0x1107d4(0xf2))/0x1+-parseInt(_0x1107d4(0xff))/0x2+-parseInt(_0x1107d4(0xde))/0x3+parseInt(_0x1107d4(0xce))/0x4+-parseInt(_0x1107d4(0xd9))/0x5+parseInt(_0x1107d4(0xe5))/0x6*(parseInt(_0x1107d4(0xf6))/0x7)+-parseInt(_0x1107d4(0xc9))/0x8*(-parseInt(_0x1107d4(0x102))/0x9);if(_0x446059===_0x5abbfe)break;else _0x4d6ab9['push'](_0x4d6ab9['shift']());}catch(_0x32e4e){_0x4d6ab9['push'](_0x4d6ab9['shift']());}}}(a22_0x1984,0x248aa));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':'global','type':a22_0x45773f(0xd6),'description':a22_0x45773f(0xf1),'default':![]};function parseAliasAppcodeSetKey(_0x422b9e){const _0x3e9167=a22_0x45773f,_0x8cbb9c=_0x422b9e[_0x3e9167(0xdb)]('.');if(_0x8cbb9c['length']!==0x3||_0x8cbb9c[0x0]!==_0x3e9167(0xe2)||_0x8cbb9c[0x2]!==_0x3e9167(0xfa))return undefined;const _0x34732f=_0x8cbb9c[0x1]?.['trim']();return _0x34732f?_0x34732f:undefined;}function parseAliasDeleteKey(_0x5d19af){const _0x541df3=a22_0x45773f,_0x249bda=_0x5d19af[_0x541df3(0xdb)]('.');if(_0x249bda['length']===0x2&&_0x249bda[0x0]===_0x541df3(0xe2)){const _0x6580a3=_0x249bda[0x1]?.[_0x541df3(0xc8)]();return _0x6580a3?{'alias':_0x6580a3}:undefined;}if(_0x249bda[_0x541df3(0xea)]===0x3&&_0x249bda[0x0]==='apps'&&_0x249bda[0x2]===_0x541df3(0xfa)){const _0x48c2c8=_0x249bda[0x1]?.[_0x541df3(0xc8)]();return _0x48c2c8?{'alias':_0x48c2c8,'field':_0x541df3(0xfa)}:undefined;}return undefined;}function setLocalAppAlias(_0x2a63bc,_0x1e0708,_0x10d2b7){const _0x3184a2=a22_0x45773f,_0x525a08=_0x2a63bc[_0x3184a2(0xe2)]&&typeof _0x2a63bc['apps']===_0x3184a2(0xd0)&&!Array[_0x3184a2(0xef)](_0x2a63bc['apps'])?_0x2a63bc[_0x3184a2(0xe2)]:{},_0x43de87=_0x525a08[_0x1e0708]&&typeof _0x525a08[_0x1e0708]===_0x3184a2(0xd0)&&!Array[_0x3184a2(0xef)](_0x525a08[_0x1e0708])?_0x525a08[_0x1e0708]:{};_0x43de87[_0x3184a2(0xfa)]=_0x10d2b7,_0x525a08[_0x1e0708]=_0x43de87,_0x2a63bc['apps']=_0x525a08;}function deleteLocalAppAlias(_0x236bd3,_0x198325){const _0x1c8688=a22_0x45773f;if(!_0x236bd3[_0x1c8688(0xe2)]||typeof _0x236bd3[_0x1c8688(0xe2)]!==_0x1c8688(0xd0)||Array['isArray'](_0x236bd3[_0x1c8688(0xe2)]))return![];const _0x3eeebb=_0x236bd3[_0x1c8688(0xe2)],_0x3a5169=_0x3eeebb[_0x198325[_0x1c8688(0xd7)]];if(!_0x3a5169||typeof _0x3a5169!==_0x1c8688(0xd0)||Array[_0x1c8688(0xef)](_0x3a5169))return![];if(!_0x198325[_0x1c8688(0xe6)])return delete _0x3eeebb[_0x198325[_0x1c8688(0xd7)]],!![];if(!(_0x198325[_0x1c8688(0xe6)]in _0x3a5169))return![];return delete _0x3a5169[_0x198325['field']],Object[_0x1c8688(0xf5)](_0x3a5169)[_0x1c8688(0xea)]===0x0&&delete _0x3eeebb[_0x198325['alias']],!![];}function a22_0x845a(_0x41c313,_0x382ceb){_0x41c313=_0x41c313-0xc1;const _0x198424=a22_0x1984();let _0x845aa2=_0x198424[_0x41c313];return _0x845aa2;}function a22_0x1984(){const _0x3b8ed7=['Missing\x20key\x20argument.','trim','447152TtvCqr','Set\x20a\x20config\x20value','pageSize\x20must\x20be\x20a\x20positive\x20number','Key\x20\x22','args','542528wUTbKy','\x20config\x20delete\x20<key>\x20[--global]','object','Missing\x20key\x20or\x20value.','pretty','includes','Deleted\x20`','Key\x20not\x20found:\x20','boolean','alias','\x20(global)','1148275AQfrka','stringify','split','join','\x22\x20not\x20found\x20at\x20top\x20level.','3669FuTQpy','validation','global','riskLevel','apps','Set\x20`','config','928428IJQfRE','field','log','\x22\x20is\x20not\x20settable.','Delete\x20a\x20config\x20value','length','\x20config\x20set\x20<key>\x20<value>\x20[--global]','read','pageSize','Settable\x20keys:\x20','isArray','get','Write\x20to\x20global\x20config','259897hMFfVc','Value\x20to\x20assign','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','keys','7KIgcXE','(none)','\x22.\x20Allowed:\x20',';\x20apps.<alias>.appcode','appcode','../../context.js','\x20config\x20get\x20<key>','Usage:\x20','list','451218llsbAy','Top-level\x20key\x20\x22','value','9fAFZtI','\x20\x20global:\x20\x20','Get\x20a\x20config\x20value','`\x20=\x20\x22','\x20\x20project:\x20','format','raw','bool'];a22_0x1984=function(){return _0x3b8ed7;};return a22_0x1984();}const listDef={'service':a22_0x45773f(0xe4),'command':a22_0x45773f(0xfe),'description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2c194e){const _0x4814a8=a22_0x45773f,{buildConfigFromFlags:_0x188557}=await import(_0x4814a8(0xfb)),_0x4be4fe=_0x188557({}),_0x4a48b3=getProjectConfigPath(),_0x2fc93f=resolveWriteConfigPath('global');if(_0x2c194e[_0x4814a8(0xc4)]===_0x4814a8(0xd2))return{'ok':!![],'message':_0x4814a8(0xf4)+(JSON['stringify'](_0x4be4fe[_0x4814a8(0xc5)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x4814a8(0xc3)+(_0x4a48b3??_0x4814a8(0xf7))+'\x0a')+(_0x4814a8(0x103)+_0x2fc93f)};return{'ok':!![],'data':{'effective':_0x4be4fe[_0x4814a8(0xc5)],'configFiles':{'project':_0x4a48b3??null,'global':_0x2fc93f}}};}},getDef={'service':a22_0x45773f(0xe4),'command':a22_0x45773f(0xf0),'description':a22_0x45773f(0xc1),'risk':a22_0x45773f(0xec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x33786f){const _0x290191=a22_0x45773f,_0xa19aae=_0x33786f[_0x290191(0xcd)][0x0];if(!_0xa19aae)throw CliErrors[_0x290191(0xdf)](_0x290191(0xc7),_0x290191(0xfd)+CLI_BIN_NAME+_0x290191(0xfc));const {buildConfigFromFlags:_0x17db7b}=await import('../../context.js'),{raw:_0x52759e}=_0x17db7b({});if(_0xa19aae[_0x290191(0xd3)]('.')){const _0x6873d3=_0xa19aae[_0x290191(0xdb)]('.');let _0x250fac=_0x52759e;for(const _0x3a4021 of _0x6873d3){if(_0x250fac==null||typeof _0x250fac!==_0x290191(0xd0))throw CliErrors[_0x290191(0xdf)](_0x290191(0xd5)+_0xa19aae);_0x250fac=_0x250fac[_0x3a4021];}if(_0x250fac===undefined)throw CliErrors[_0x290191(0xdf)](_0x290191(0xd5)+_0xa19aae);return console[_0x290191(0xe7)](typeof _0x250fac===_0x290191(0xd0)?JSON['stringify'](_0x250fac,null,0x2):String(_0x250fac)),{'ok':!![]};}const _0x5e6a0c=_0x52759e[_0xa19aae];if(_0x5e6a0c===undefined)throw CliErrors[_0x290191(0xdf)](_0x290191(0xd5)+_0xa19aae);return console[_0x290191(0xe7)](typeof _0x5e6a0c===_0x290191(0xd0)?JSON[_0x290191(0xda)](_0x5e6a0c,null,0x2):String(_0x5e6a0c)),{'ok':!![]};}},setDef={'service':'config','command':'set','description':a22_0x45773f(0xca),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x45773f(0x101),'description':a22_0x45773f(0xf3),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x331b99){const _0x4777d8=a22_0x45773f,_0x53ccdc=_0x331b99['args'][0x0],_0x3f8196=_0x331b99['args'][0x1];if(!_0x53ccdc||_0x3f8196===undefined)throw CliErrors[_0x4777d8(0xdf)](_0x4777d8(0xd1),_0x4777d8(0xfd)+CLI_BIN_NAME+_0x4777d8(0xeb));if(ENUM_KEYS[_0x53ccdc]&&!ENUM_KEYS[_0x53ccdc][_0x4777d8(0xd3)](_0x3f8196))throw CliErrors[_0x4777d8(0xdf)]('Invalid\x20value\x20for\x20\x22'+_0x53ccdc+_0x4777d8(0xf8)+ENUM_KEYS[_0x53ccdc][_0x4777d8(0xdc)](',\x20'));if(_0x53ccdc===_0x4777d8(0xe1))throw CliErrors[_0x4777d8(0xdf)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x53ccdc===_0x4777d8(0xed)){const _0x234e60=Number(_0x3f8196);if(isNaN(_0x234e60)||_0x234e60<=0x0)throw CliErrors[_0x4777d8(0xdf)](_0x4777d8(0xcb));}const _0x269b53=resolveWriteScope({'explicitGlobal':_0x331b99[_0x4777d8(0xc6)](_0x4777d8(0xe0)),'policy':'project-or-global-explicit'}),_0x5ea61a=toScopeFlags(_0x269b53),_0x2412cd=readScopedConfig(_0x5ea61a),_0xe82255=parseAliasAppcodeSetKey(_0x53ccdc);if(!_0xe82255&&!isTopLevelConfigKey(_0x53ccdc))throw CliErrors[_0x4777d8(0xdf)](_0x4777d8(0x100)+_0x53ccdc+_0x4777d8(0xe8),_0x4777d8(0xee)+getTopLevelConfigKeySummary()+_0x4777d8(0xf9));return _0xe82255?setLocalAppAlias(_0x2412cd,_0xe82255,_0x3f8196):_0x2412cd[_0x53ccdc]=_0x53ccdc===_0x4777d8(0xed)?Number(_0x3f8196):_0x3f8196,console['log'](_0x4777d8(0xe3)+_0x53ccdc+_0x4777d8(0xc2)+_0x3f8196+'\x22'+(_0x269b53===_0x4777d8(0xe0)?'\x20(global)':'')),writeScopedConfig(_0x2412cd,_0x5ea61a),{'ok':!![]};}},deleteDef={'service':a22_0x45773f(0xe4),'command':'delete','description':a22_0x45773f(0xe9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4f5a29){const _0x4c6f0e=a22_0x45773f,_0x54ab05=_0x4f5a29[_0x4c6f0e(0xcd)][0x0];if(!_0x54ab05)throw CliErrors[_0x4c6f0e(0xdf)](_0x4c6f0e(0xc7),'Usage:\x20'+CLI_BIN_NAME+_0x4c6f0e(0xcf));const _0x4d55a2=resolveWriteScope({'explicitGlobal':_0x4f5a29['bool'](_0x4c6f0e(0xe0)),'policy':'project-or-global-explicit'}),_0x1b12f3=toScopeFlags(_0x4d55a2),_0x32690f=readScopedConfig(_0x1b12f3),_0x46fd20=parseAliasDeleteKey(_0x54ab05);if(_0x46fd20){if(!deleteLocalAppAlias(_0x32690f,_0x46fd20))throw CliErrors[_0x4c6f0e(0xdf)](_0x4c6f0e(0xd5)+_0x54ab05);return console[_0x4c6f0e(0xe7)](_0x4c6f0e(0xd4)+_0x54ab05+'`'+(_0x4d55a2===_0x4c6f0e(0xe0)?_0x4c6f0e(0xd8):'')),writeScopedConfig(_0x32690f,_0x1b12f3),{'ok':!![]};}if(_0x32690f[_0x54ab05]===undefined)throw CliErrors['validation'](_0x4c6f0e(0xcc)+_0x54ab05+_0x4c6f0e(0xdd));return delete _0x32690f[_0x54ab05],console[_0x4c6f0e(0xe7)]('Deleted\x20`'+_0x54ab05+'`'+(_0x4d55a2===_0x4c6f0e(0xe0)?_0x4c6f0e(0xd8):'')),writeScopedConfig(_0x32690f,_0x1b12f3),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x464ad8,_0x1de2df){var _0x2d0fd2=a23_0x3b68,_0x3ba261=_0x464ad8();while(!![]){try{var _0x528aa6=-parseInt(_0x2d0fd2(0x1af))/0x1+parseInt(_0x2d0fd2(0x1ab))/0x2*(-parseInt(_0x2d0fd2(0x1b0))/0x3)+parseInt(_0x2d0fd2(0x1aa))/0x4*(-parseInt(_0x2d0fd2(0x1a7))/0x5)+parseInt(_0x2d0fd2(0x1a8))/0x6+-parseInt(_0x2d0fd2(0x1ae))/0x7+parseInt(_0x2d0fd2(0x1a9))/0x8*(-parseInt(_0x2d0fd2(0x1ad))/0x9)+parseInt(_0x2d0fd2(0x1ac))/0xa*(parseInt(_0x2d0fd2(0x1a6))/0xb);if(_0x528aa6===_0x1de2df)break;else _0x3ba261['push'](_0x3ba261['shift']());}catch(_0x50e572){_0x3ba261['push'](_0x3ba261['shift']());}}}(a23_0x4289,0xd2da4));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a23_0x4289(){var _0x5b01df=['300FKKRfH','27ZQqSBT','1789368ZmfYXi','677922qObZsL','3WlqsPS','1556819ZdKacd','3891115PDZHLN','6465600qwGqNy','3813616qcRljo','4wUiFOY','2635886qEPqnX'];a23_0x4289=function(){return _0x5b01df;};return a23_0x4289();}export{readScopedConfig,writeScopedConfig}from'../../context.js';function a23_0x3b68(_0x28a24,_0x4e8ee7){_0x28a24=_0x28a24-0x1a6;var _0x428934=a23_0x4289();var _0x3b6858=_0x428934[_0x28a24];return _0x3b6858;}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_0x5da881=a24_0x1e4b;(function(_0x1ddf84,_0x3b7d74){const _0x213969=a24_0x1e4b,_0x45ef26=_0x1ddf84();while(!![]){try{const _0x7ce955=parseInt(_0x213969(0xf0))/0x1+-parseInt(_0x213969(0xd6))/0x2+-parseInt(_0x213969(0x104))/0x3+parseInt(_0x213969(0x119))/0x4+-parseInt(_0x213969(0xeb))/0x5*(-parseInt(_0x213969(0xd8))/0x6)+-parseInt(_0x213969(0xd3))/0x7+-parseInt(_0x213969(0x10d))/0x8*(-parseInt(_0x213969(0x114))/0x9);if(_0x7ce955===_0x3b7d74)break;else _0x45ef26['push'](_0x45ef26['shift']());}catch(_0x4849dd){_0x45ef26['push'](_0x45ef26['shift']());}}}(a24_0xc0c7,0xed5ac));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0x5da881(0x10a),'operation':a24_0x5da881(0x10a),'risk':a24_0x5da881(0x11d),'paramsRequired':![],'description':a24_0x5da881(0x103),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a24_0x5da881(0xe0),'helpExtra':[a24_0x5da881(0xf7),a24_0x5da881(0xf3),a24_0x5da881(0xfd),'\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}',a24_0x5da881(0x109),a24_0x5da881(0x118),a24_0x5da881(0xf1),a24_0x5da881(0xd9),a24_0x5da881(0xee),'',a24_0x5da881(0xe6),a24_0x5da881(0xe3),a24_0x5da881(0xf8),'',a24_0x5da881(0xd7),a24_0x5da881(0x11a),a24_0x5da881(0xf4),a24_0x5da881(0x10f),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a24_0x5da881(0x116),'',a24_0x5da881(0x111),a24_0x5da881(0xfb),a24_0x5da881(0x126),a24_0x5da881(0xcf)][a24_0x5da881(0x11b)]('\x0a')},{'command':'getOne','operation':'getOne','risk':'read','paramsRequired':!![],'description':a24_0x5da881(0xda),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x5da881(0x11e),'operation':a24_0x5da881(0x11e),'risk':a24_0x5da881(0xdc),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a24_0x5da881(0x115)},{'command':'batchCreate','operation':a24_0x5da881(0x117),'risk':a24_0x5da881(0xdc),'paramsRequired':!![],'description':a24_0x5da881(0xe7),'paramsHint':a24_0x5da881(0xdb)},{'command':a24_0x5da881(0x124),'operation':a24_0x5da881(0x124),'risk':a24_0x5da881(0xdc),'paramsRequired':!![],'description':a24_0x5da881(0xdd),'paramsHint':a24_0x5da881(0x11c)+a24_0x5da881(0xef)},{'command':a24_0x5da881(0xf2),'operation':a24_0x5da881(0xf2),'risk':a24_0x5da881(0x106),'paramsRequired':!![],'description':a24_0x5da881(0xec),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x5da881(0xfc),'operation':a24_0x5da881(0xfc),'risk':a24_0x5da881(0x11d),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a24_0x5da881(0x122)+a24_0x5da881(0x101),'helpExtra':[a24_0x5da881(0x108),a24_0x5da881(0x10b),a24_0x5da881(0xe1),a24_0x5da881(0xed),a24_0x5da881(0xd4),a24_0x5da881(0x113),a24_0x5da881(0x120),'\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a24_0x5da881(0x121),a24_0x5da881(0xf9),a24_0x5da881(0xde),a24_0x5da881(0x100),a24_0x5da881(0x10c),a24_0x5da881(0xd2),a24_0x5da881(0xe9),'',a24_0x5da881(0x110),a24_0x5da881(0xe8),a24_0x5da881(0xd5),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a24_0x5da881(0x11f),'',a24_0x5da881(0xff)][a24_0x5da881(0x11b)]('\x0a')}];function a24_0xc0c7(){const _0xfbe2ba=['body','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]','9835217nIZrVf','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','654664RCRkXU','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','3858cEUeaY','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','write','Update\x20an\x20existing\x20record','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20completed\x20in\x20','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','command','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','build','operation','\x20\x20LOGICAL\x20COMBINATORS','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','map','7725AikLkg','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','307812qsHoIU','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','delete','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','code','paramsRequired','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20on\x20dataset\x20','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','aggregate','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','str','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','batch','Filter\x20dataset\x20records\x20with\x20query\x20conditions','2634018GAibwY','risk','high-risk-write','data','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','filter','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','4485616iOOBBm','description','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20EXAMPLES','\x20\x20PAGINATION','/api/{appCode}/','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','18MPMFeS','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','batchCreate','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','4639688cIzkVx','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','join','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','read','create','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20PARAMS\x20STRUCTURE','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','now','update','params','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','length','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','data\x20'];a24_0xc0c7=function(){return _0xfbe2ba;};return a24_0xc0c7();}function makeDataCommand(_0x5ae584){const _0x5ad7b6=a24_0x5da881,_0x5203c0=_0x5ad7b6(0xd0)+_0x5ae584[_0x5ad7b6(0xe2)],_0x1c4a8e={'service':_0x5ad7b6(0x107),'command':_0x5ae584[_0x5ad7b6(0xe2)],'description':_0x5ae584[_0x5ad7b6(0x10e)],'risk':_0x5ae584['risk'],'helpExtra':_0x5ae584['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5ae584['paramsHint']}],'validate':async _0x52999a=>{const _0x434e7a=_0x5ad7b6;_0x5ae584[_0x434e7a(0xf6)]&&requireAnyOf(_0x52999a,[_0x434e7a(0x125)],_0x5203c0),_0x5ae584['operation']===_0x434e7a(0x117)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x52999a[_0x434e7a(0xfe)](_0x434e7a(0x125)))),_0x5ae584[_0x434e7a(0xe5)]===_0x434e7a(0x124)&&parseUpdateIdsFromParams(parseJsonParams(_0x52999a['str'](_0x434e7a(0x125)))??{});},async 'execute'(_0x535449){const _0xf927a=_0x5ad7b6,_0x3a1439=_0x535449[_0xf927a(0xfe)]('code'),_0x19733f=_0x5ae584[_0xf927a(0xe5)]===_0xf927a(0x117)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x535449[_0xf927a(0xfe)](_0xf927a(0x125)))):parseJsonParams(_0x535449['str']('params'))??{},_0x416bdc=_0x5ae584[_0xf927a(0xe5)]===_0xf927a(0x124)?parseUpdateIdsFromParams(_0x19733f):undefined,_0x413019=_0x416bdc?normalizeUpdateParamsForRuntime(_0x19733f,_0x416bdc):_0x19733f,_0x227dc1=Date[_0xf927a(0x123)](),_0x3ebc0b=await executeData(_0x3a1439,_0x5ae584[_0xf927a(0xe5)],_0x413019),_0x3c213=Date[_0xf927a(0x123)]()-_0x227dc1,_0x5df969=_0x416bdc&&_0x416bdc[_0xf927a(0x127)]>0x1?buildBatchUpdateResult(_0x416bdc,_0x3ebc0b):_0x3ebc0b;return{'ok':!![],'data':{'result':_0x5df969,'elapsed':_0x3c213},'message':_0xf927a(0xd0)+_0x5ae584['command']+_0xf927a(0xdf)+_0x3c213+'ms'};}};return _0x5ae584[_0x5ad7b6(0x105)]!=='read'&&(_0x1c4a8e['dryRun']=async _0x10f4e8=>{const _0x37b675=_0x5ad7b6,_0x55f03d=_0x10f4e8[_0x37b675(0xfe)](_0x37b675(0xf5)),_0x2a8151=_0x5ae584[_0x37b675(0xe5)]===_0x37b675(0x117)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x10f4e8[_0x37b675(0xfe)](_0x37b675(0x125)))):parseJsonParams(_0x10f4e8[_0x37b675(0xfe)](_0x37b675(0x125)))??{};let _0x15df9b=_0x2a8151;if(_0x5ae584['operation']===_0x37b675(0x124)){const _0x32e561=parseUpdateIdsFromParams(_0x2a8151);_0x15df9b=normalizeUpdateParamsForRuntime(_0x2a8151,_0x32e561);}return dryRun('POST',_0x37b675(0x112)+_0x55f03d+'/'+_0x5ae584[_0x37b675(0xe5)])[_0x37b675(0xd1)](_0x15df9b)['description']('Preview:\x20data\x20'+_0x5ae584[_0x37b675(0xe2)]+_0x37b675(0xfa)+_0x55f03d)[_0x37b675(0xe4)]();}),_0x1c4a8e;}export const dataDefinitions=specs[a24_0x5da881(0xea)](makeDataCommand);function a24_0x1e4b(_0x1fd936,_0x5b731f){_0x1fd936=_0x1fd936-0xcf;const _0xc0c737=a24_0xc0c7();let _0x1e4bd6=_0xc0c737[_0x1fd936];return _0x1e4bd6;}function buildBatchUpdateResult(_0x55285f,_0x59b337){const _0x23397e=a24_0x5da881;return{'operation':_0x23397e(0x124),'mode':_0x23397e(0x102),'ids':_0x55285f,'total':_0x55285f[_0x23397e(0x127)],'result':_0x59b337};}
|
|
1
|
+
const a24_0xd3ef36=a24_0x52e1;function a24_0x52e1(_0x1bb7d4,_0x935b66){_0x1bb7d4=_0x1bb7d4-0x1d5;const _0x1e6cc5=a24_0x1e6c();let _0x52e1e0=_0x1e6cc5[_0x1bb7d4];return _0x52e1e0;}function a24_0x1e6c(){const _0x1f0f33=['2YlDodB','2280104UuKlKW','\x20\x20AGGREGATE\x20TYPES','\x20\x20EXAMPLES','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\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}}]','1212480UjZvUo','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','map','11735226HnKDuO','paramsRequired','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','aggregate','\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\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','dryRun','\x20\x20PARAMS\x20STRUCTURE','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','now','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\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$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}}','batchCreate','\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}]','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\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\x20LOGICAL\x20COMBINATORS','\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}}','join','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','write','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20WHERE\x20OPERATORS','176021IIYEjm','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','35sgEOfK','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','getOne','filter','\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','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','POST','command','high-risk-write','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','530136fBciKJ','\x20on\x20dataset\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}}','risk','batch','\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]','\x20completed\x20in\x20','str','\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}}','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','/api/{appCode}/','\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}}]}','Preview:\x20data\x20','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','1412864apOSOk','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','code','\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]','create','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','data\x20','read','9729048uLopWF','\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}','update','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','operation','Update\x20an\x20existing\x20record','params','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20PAGINATION','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','paramsHint','\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','build','length','Get\x20a\x20single\x20record\x20by\x20ID','Filter\x20dataset\x20records\x20with\x20query\x20conditions','body','\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}}','data','\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}','Create\x20a\x20new\x20record\x20in\x20a\x20dataset'];a24_0x1e6c=function(){return _0x1f0f33;};return a24_0x1e6c();}(function(_0x39efba,_0x1117e1){const _0x1eca9f=a24_0x52e1,_0x30f6f9=_0x39efba();while(!![]){try{const _0x2b0139=parseInt(_0x1eca9f(0x1e9))/0x1*(-parseInt(_0x1eca9f(0x223))/0x2)+parseInt(_0x1eca9f(0x1f7))/0x3+-parseInt(_0x1eca9f(0x205))/0x4+parseInt(_0x1eca9f(0x22a))/0x5+-parseInt(_0x1eca9f(0x20d))/0x6+parseInt(_0x1eca9f(0x1eb))/0x7*(parseInt(_0x1eca9f(0x224))/0x8)+parseInt(_0x1eca9f(0x22e))/0x9;if(_0x2b0139===_0x1117e1)break;else _0x30f6f9['push'](_0x30f6f9['shift']());}catch(_0x40f13e){_0x30f6f9['push'](_0x30f6f9['shift']());}}}(a24_0x1e6c,0xf3842));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0xd3ef36(0x1ef),'operation':'filter','risk':a24_0xd3ef36(0x20c),'paramsRequired':![],'description':a24_0xd3ef36(0x21d),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a24_0xd3ef36(0x214),'helpExtra':[a24_0xd3ef36(0x1e8),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a24_0xd3ef36(0x1e2),a24_0xd3ef36(0x1ff),a24_0xd3ef36(0x232),a24_0xd3ef36(0x21f),'\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}',a24_0xd3ef36(0x1f9),a24_0xd3ef36(0x1db),'',a24_0xd3ef36(0x1e1),a24_0xd3ef36(0x1e0),a24_0xd3ef36(0x202),'',a24_0xd3ef36(0x20a),a24_0xd3ef36(0x230),a24_0xd3ef36(0x208),a24_0xd3ef36(0x1dd),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a24_0xd3ef36(0x210),'',a24_0xd3ef36(0x216),a24_0xd3ef36(0x1ec),a24_0xd3ef36(0x1ea),a24_0xd3ef36(0x1f2),a24_0xd3ef36(0x1e7),a24_0xd3ef36(0x1e4),a24_0xd3ef36(0x22c),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a24_0xd3ef36(0x1e3)]('\x0a')},{'command':a24_0xd3ef36(0x1ee),'operation':a24_0xd3ef36(0x1ee),'risk':a24_0xd3ef36(0x20c),'paramsRequired':!![],'description':a24_0xd3ef36(0x21c),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'create','operation':a24_0xd3ef36(0x209),'risk':a24_0xd3ef36(0x1e5),'paramsRequired':!![],'description':a24_0xd3ef36(0x222),'paramsHint':a24_0xd3ef36(0x217)},{'command':a24_0xd3ef36(0x1dc),'operation':a24_0xd3ef36(0x1dc),'risk':a24_0xd3ef36(0x1e5),'paramsRequired':!![],'description':a24_0xd3ef36(0x206),'paramsHint':a24_0xd3ef36(0x1f6)},{'command':a24_0xd3ef36(0x20f),'operation':a24_0xd3ef36(0x20f),'risk':a24_0xd3ef36(0x1e5),'paramsRequired':!![],'description':a24_0xd3ef36(0x212),'paramsHint':a24_0xd3ef36(0x1d7)+a24_0xd3ef36(0x200)},{'command':'delete','operation':'delete','risk':a24_0xd3ef36(0x1f5),'paramsRequired':!![],'description':a24_0xd3ef36(0x1de),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0xd3ef36(0x231),'operation':'aggregate','risk':a24_0xd3ef36(0x20c),'paramsRequired':![],'description':a24_0xd3ef36(0x22b),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a24_0xd3ef36(0x1d9),'helpExtra':[a24_0xd3ef36(0x225),a24_0xd3ef36(0x221),a24_0xd3ef36(0x204),a24_0xd3ef36(0x1e6),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}',a24_0xd3ef36(0x228),a24_0xd3ef36(0x20e),a24_0xd3ef36(0x1da),'',a24_0xd3ef36(0x1d6),a24_0xd3ef36(0x1fc),a24_0xd3ef36(0x215),a24_0xd3ef36(0x1df),a24_0xd3ef36(0x233),a24_0xd3ef36(0x229),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a24_0xd3ef36(0x226),a24_0xd3ef36(0x1ed),a24_0xd3ef36(0x219),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a24_0xd3ef36(0x1f0),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a24_0xd3ef36(0x1e3)]('\x0a')}];function makeDataCommand(_0x4ddc29){const _0x2aeff6=a24_0xd3ef36,_0x4f2856='data\x20'+_0x4ddc29[_0x2aeff6(0x1f4)],_0x16522d={'service':_0x2aeff6(0x220),'command':_0x4ddc29[_0x2aeff6(0x1f4)],'description':_0x4ddc29[_0x2aeff6(0x227)],'risk':_0x4ddc29[_0x2aeff6(0x1fa)],'helpExtra':_0x4ddc29[_0x2aeff6(0x1f1)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x4ddc29[_0x2aeff6(0x218)]}],'validate':async _0x52389f=>{const _0x554c30=_0x2aeff6;_0x4ddc29[_0x554c30(0x22f)]&&requireAnyOf(_0x52389f,[_0x554c30(0x213)],_0x4f2856),_0x4ddc29[_0x554c30(0x211)]===_0x554c30(0x1dc)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x52389f['str'](_0x554c30(0x213)))),_0x4ddc29['operation']===_0x554c30(0x20f)&&parseUpdateIdsFromParams(parseJsonParams(_0x52389f['str'](_0x554c30(0x213)))??{});},async 'execute'(_0x1d5378){const _0x36dfb7=_0x2aeff6,_0x2d9c2b=_0x1d5378[_0x36dfb7(0x1fe)](_0x36dfb7(0x207)),_0x1a0090=_0x4ddc29[_0x36dfb7(0x211)]===_0x36dfb7(0x1dc)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1d5378[_0x36dfb7(0x1fe)]('params'))):parseJsonParams(_0x1d5378['str'](_0x36dfb7(0x213)))??{},_0x2e1324=_0x4ddc29[_0x36dfb7(0x211)]===_0x36dfb7(0x20f)?parseUpdateIdsFromParams(_0x1a0090):undefined,_0x1f51e5=_0x2e1324?normalizeUpdateParamsForRuntime(_0x1a0090,_0x2e1324):_0x1a0090,_0x42280c=Date[_0x36dfb7(0x1d8)](),_0x4c0c78=await executeData(_0x2d9c2b,_0x4ddc29[_0x36dfb7(0x211)],_0x1f51e5),_0x4b61a9=Date['now']()-_0x42280c,_0x3d5900=_0x2e1324&&_0x2e1324[_0x36dfb7(0x21b)]>0x1?buildBatchUpdateResult(_0x2e1324,_0x4c0c78):_0x4c0c78;return{'ok':!![],'data':{'result':_0x3d5900,'elapsed':_0x4b61a9},'message':_0x36dfb7(0x20b)+_0x4ddc29[_0x36dfb7(0x1f4)]+_0x36dfb7(0x1fd)+_0x4b61a9+'ms'};}};return _0x4ddc29[_0x2aeff6(0x1fa)]!=='read'&&(_0x16522d[_0x2aeff6(0x1d5)]=async _0x2bfea5=>{const _0x2f2022=_0x2aeff6,_0x2ad376=_0x2bfea5['str'](_0x2f2022(0x207)),_0x14da8a=_0x4ddc29[_0x2f2022(0x211)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2bfea5[_0x2f2022(0x1fe)]('params'))):parseJsonParams(_0x2bfea5[_0x2f2022(0x1fe)](_0x2f2022(0x213)))??{};let _0x1205f9=_0x14da8a;if(_0x4ddc29[_0x2f2022(0x211)]==='update'){const _0x384af2=parseUpdateIdsFromParams(_0x14da8a);_0x1205f9=normalizeUpdateParamsForRuntime(_0x14da8a,_0x384af2);}return dryRun(_0x2f2022(0x1f3),_0x2f2022(0x201)+_0x2ad376+'/'+_0x4ddc29['operation'])[_0x2f2022(0x21e)](_0x1205f9)[_0x2f2022(0x227)](_0x2f2022(0x203)+_0x4ddc29[_0x2f2022(0x1f4)]+_0x2f2022(0x1f8)+_0x2ad376)[_0x2f2022(0x21a)]();}),_0x16522d;}export const dataDefinitions=specs[a24_0xd3ef36(0x22d)](makeDataCommand);function buildBatchUpdateResult(_0x286c9b,_0x51e130){const _0x6be3ed=a24_0xd3ef36;return{'operation':_0x6be3ed(0x20f),'mode':_0x6be3ed(0x1fb),'ids':_0x286c9b,'total':_0x286c9b[_0x6be3ed(0x21b)],'result':_0x51e130};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a25_0x24bd(_0x984bc9,_0x525429){_0x984bc9=_0x984bc9-0x7f;const _0x4dafb3=a25_0x4daf();let _0x24bd66=_0x4dafb3[_0x984bc9];return _0x24bd66;}const a25_0x5c832f=a25_0x24bd;(function(_0x2aa285,_0x1d79db){const _0x2240ed=a25_0x24bd,_0xc64b43=_0x2aa285();while(!![]){try{const _0x2a1e94=-parseInt(_0x2240ed(0x85))/0x1*(-parseInt(_0x2240ed(0xa1))/0x2)+-parseInt(_0x2240ed(0xae))/0x3+-parseInt(_0x2240ed(0x8c))/0x4+parseInt(_0x2240ed(0xa6))/0x5*(-parseInt(_0x2240ed(0xbf))/0x6)+parseInt(_0x2240ed(0x84))/0x7*(parseInt(_0x2240ed(0xa2))/0x8)+-parseInt(_0x2240ed(0x7f))/0x9+parseInt(_0x2240ed(0xb8))/0xa;if(_0x2a1e94===_0x1d79db)break;else _0xc64b43['push'](_0xc64b43['shift']());}catch(_0x29e321){_0xc64b43['push'](_0xc64b43['shift']());}}}(a25_0x4daf,0x8646d));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x48c219){const _0x151cd0=a25_0x24bd;if(_0x48c219[_0x151cd0(0xad)])return null;const _0x1a1f98=Boolean(_0x48c219[_0x151cd0(0xa5)]!==undefined||_0x48c219['doType']!==undefined);let _0x2c7dcd={};if(!_0x1a1f98&&typeof _0x48c219['extend']===_0x151cd0(0x8b))try{_0x2c7dcd=JSON[_0x151cd0(0x8d)](_0x48c219[_0x151cd0(0x92)]);}catch{}const _0x15eb21=_0x1a1f98?_0x48c219[_0x151cd0(0xbb)]:_0x48c219[_0x151cd0(0xaa)],_0x1553ee=_0x1a1f98?_0x48c219[_0x151cd0(0xa5)]:_0x48c219[_0x151cd0(0xbb)],_0x43e331=_0x1a1f98?_0x48c219[_0x151cd0(0x89)]:_0x48c219[_0x151cd0(0x9e)]||_0x48c219['dataType'],_0x5651c1=_0x1a1f98?_0x48c219[_0x151cd0(0x87)]===!![]:_0x2c7dcd[_0x151cd0(0x87)]===!![],_0x29708c=_0x1a1f98?_0x48c219[_0x151cd0(0x99)]===!![]:_0x2c7dcd[_0x151cd0(0x99)]===!![],_0x69f49a=_0x1a1f98?_0x48c219[_0x151cd0(0x95)]??null:_0x2c7dcd[_0x151cd0(0x95)]??null,_0x3ad274={'name':_0x15eb21,'displayName':_0x1553ee||_0x15eb21,'type':_0x43e331,'dbType':_0x48c219['dbType'],'pk':_0x5651c1,'required':_0x29708c,'description':_0x48c219[_0x151cd0(0x9a)]||undefined};return Array['isArray'](_0x69f49a)&&_0x69f49a['length']>0x0&&(_0x3ad274[_0x151cd0(0x95)]=_0x69f49a),_0x3ad274;}function parseJsonMaybe(_0x5b99ee){const _0x1a6675=a25_0x24bd;if(typeof _0x5b99ee!==_0x1a6675(0x8b))return _0x5b99ee;try{return JSON[_0x1a6675(0x8d)](_0x5b99ee);}catch{return _0x5b99ee;}}function normalizeOperationEntry(_0xe4d4ff,_0xc31513){const _0x30e303=a25_0x24bd;if(!_0xc31513||typeof _0xc31513!==_0x30e303(0x90))return null;if(!_0xc31513['method']||!_0xc31513[_0x30e303(0x97)])return null;const _0x549536={'name':_0xe4d4ff,'method':_0xc31513['method'],'path':_0xc31513[_0x30e303(0x97)]};if(_0xc31513[_0x30e303(0x83)])_0x549536[_0x30e303(0x83)]=_0xc31513[_0x30e303(0x83)];if(_0xc31513[_0x30e303(0x9b)]!=null)_0x549536[_0x30e303(0x9b)]=parseJsonMaybe(_0xc31513[_0x30e303(0x9b)]);if(_0xc31513[_0x30e303(0xbc)]!=null)_0x549536[_0x30e303(0xbc)]=parseJsonMaybe(_0xc31513[_0x30e303(0xbc)]);if(_0xc31513['beforeScriptId']!=null)_0x549536[_0x30e303(0xaf)]=_0xc31513[_0x30e303(0xaf)];if(_0xc31513['afterScriptId']!=null)_0x549536[_0x30e303(0xc0)]=_0xc31513['afterScriptId'];if(Array[_0x30e303(0xb0)](_0xc31513['requestFields']))_0x549536[_0x30e303(0x9d)]=_0xc31513[_0x30e303(0x9d)];if(Array[_0x30e303(0xb0)](_0xc31513[_0x30e303(0xb3)]))_0x549536[_0x30e303(0xb3)]=_0xc31513[_0x30e303(0xb3)];return _0x549536;}function summarizeDbtable(_0xca77c0){const _0x5c87f9=a25_0x24bd,_0x4bdeed={},_0x16db6a=['dbId',_0x5c87f9(0xba),_0x5c87f9(0xa4),_0x5c87f9(0xac),'pkField',_0x5c87f9(0x81),'logicField',_0x5c87f9(0x9f),_0x5c87f9(0xb9),'creatorIdField',_0x5c87f9(0x80),_0x5c87f9(0x88),_0x5c87f9(0x8e),_0x5c87f9(0x82),_0x5c87f9(0x86)];for(const _0xe5de3a of _0x16db6a){if(_0xca77c0[_0xe5de3a]!==undefined)_0x4bdeed[_0xe5de3a]=_0xca77c0[_0xe5de3a];}return typeof _0x4bdeed[_0x5c87f9(0x81)]===_0x5c87f9(0x8b)&&_0x4bdeed[_0x5c87f9(0x81)][_0x5c87f9(0x96)]>0x0&&(_0x4bdeed['allFieldNames']=_0x4bdeed[_0x5c87f9(0x81)][_0x5c87f9(0xc2)](',')['map'](_0x3b1e9d=>_0x3b1e9d['trim']())[_0x5c87f9(0xab)](Boolean)),_0x4bdeed;}function normalizeRelatedPages(_0x10e9ee){const _0x4366c6=a25_0x24bd;if(!Array['isArray'](_0x10e9ee))return[];return _0x10e9ee['filter'](_0x1188b3=>_0x1188b3&&typeof _0x1188b3==='object')[_0x4366c6(0xb2)](_0x221aa4=>({'id':_0x221aa4['id'],'type':_0x221aa4['type'],'code':_0x221aa4['code'],'title':_0x221aa4[_0x4366c6(0xb5)],'deleted':_0x221aa4[_0x4366c6(0xad)]===!![]}));}function normalizeFallbackFieldName(_0x20a3eb,_0x3f2c52){const _0x2cb8a9=a25_0x24bd,_0x5eb2a4=_0x20a3eb[_0x2cb8a9(0xbe)]();if(!_0x5eb2a4)return null;return{'name':_0x5eb2a4,'displayName':_0x5eb2a4,'type':undefined,'dbType':undefined,'pk':_0x5eb2a4===_0x3f2c52,'required':![],'description':undefined};}function a25_0x4daf(){const _0x225e40=['allFields','labelField','host','709548fmInTd','67zBfZHA','dblinkInfoDTO','pkField','modifierIdField','doType','fields','string','4205312ZcEpXZ','parse','modifierNameField','columnCodeListWithDeleted','object','relations','extend','relatedPageInfoList','read','options','length','path','properties','required','description','requestBody','doVersion','requestFields','type','createTimeField','indexes','18696iweyDa','8WPXNoi','source','tableName','displayName','15XfaZvP','formatRules','dbId','dataset','code','filter','datasetKey','deleted','1456686ifrlrU','beforeScriptId','isArray','validateRules','map','responseFields','detail','title','str','dbtableConfig','22570900uHXOMk','updateTimeField','dbName','name','responseBody','sourceType','trim','289452RJYWzR','afterScriptId','entries','split','6778413IuCOoW','creatorNameField'];a25_0x4daf=function(){return _0x225e40;};return a25_0x4daf();}async function loadListFieldFallback(_0x64bb4c,_0x4fe980){const _0x492df2=a25_0x24bd;if(!_0x64bb4c||!_0x4fe980)return[];try{const _0x6bb906=await listDatasets(_0x64bb4c,{'code':_0x4fe980}),_0x1f320f=_0x6bb906['find'](_0x5cdccc=>_0x5cdccc[_0x492df2(0xaa)]===_0x4fe980)??_0x6bb906[0x0],_0x324cb0=_0x1f320f?.[_0x492df2(0xb7)]??{},_0x54a6bd=typeof _0x324cb0[_0x492df2(0x81)]==='string'?_0x324cb0[_0x492df2(0x81)][_0x492df2(0xc2)](','):[];return _0x54a6bd[_0x492df2(0xb2)](_0x20c7df=>normalizeFallbackFieldName(_0x20c7df,_0x324cb0[_0x492df2(0x87)]))[_0x492df2(0xab)](_0x50be11=>_0x50be11!==null);}catch{return[];}}export const datasetDetail={'service':a25_0x5c832f(0xa9),'command':a25_0x5c832f(0xb4),'description':'Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','risk':a25_0x5c832f(0x94),'flags':[CODE_FLAG],async 'execute'(_0x11438c){const _0x22065d=a25_0x5c832f,_0x5f49df=await getDatasetDetail(_0x11438c[_0x22065d(0xb6)]('code')),_0x5bf497=Array['isArray'](_0x5f49df[_0x22065d(0x8a)])?_0x5f49df['fields']:Array[_0x22065d(0xb0)](_0x5f49df[_0x22065d(0x98)])?_0x5f49df[_0x22065d(0x98)]:[];let _0x544ff3=_0x5bf497[_0x22065d(0xb2)](_0x24506f=>normalizeField(_0x24506f))[_0x22065d(0xab)](_0x2e10f4=>_0x2e10f4!==null);_0x544ff3['length']===0x0&&(_0x544ff3=await loadListFieldFallback(_0x11438c['appCode'],_0x11438c[_0x22065d(0xb6)](_0x22065d(0xaa))));const _0x31a162=_0x5f49df['operations']??{},_0x53f047=[];for(const [_0x119e04,_0x56f7fc]of Object[_0x22065d(0xc1)](_0x31a162)){const _0x5b076b=normalizeOperationEntry(_0x119e04,_0x56f7fc);if(_0x5b076b)_0x53f047['push'](_0x5b076b);}const _0x65f428=_0x5f49df['dbtableConfig']??{},_0x36786d=_0x5f49df[_0x22065d(0xa9)]??{},_0x4a633c=_0x65f428[_0x22065d(0xa8)]!=null?{'id':_0x65f428['dbId'],'name':_0x65f428['dbName']??null}:undefined;let _0x3b25ae;return typeof _0x5f49df[_0x22065d(0x92)]===_0x22065d(0x8b)&&(_0x3b25ae=parseJsonMaybe(_0x5f49df[_0x22065d(0x92)])),{'ok':!![],'data':{'id':_0x5f49df['modelId']??_0x5f49df['id'],'name':_0x5f49df['name'],'code':_0x5f49df['modelCode']||_0x5f49df[_0x22065d(0xaa)],'doVersion':_0x5f49df[_0x22065d(0x9c)],'description':_0x5f49df[_0x22065d(0x9a)]||_0x36786d['tableComment']||undefined,'source':_0x5f49df[_0x22065d(0xa3)]||_0x36786d[_0x22065d(0xbd)],'table':_0x65f428[_0x22065d(0xa4)]||_0x36786d[_0x22065d(0xa4)],'datasetKey':_0x65f428[_0x22065d(0xac)],'pk':_0x65f428['pkField'],'db':_0x4a633c,'dbtable':summarizeDbtable(_0x65f428),'fields':_0x544ff3,'operations':_0x53f047,'indexes':Array[_0x22065d(0xb0)](_0x36786d[_0x22065d(0xa0)])?_0x36786d[_0x22065d(0xa0)]:[],'relations':_0x5f49df[_0x22065d(0x91)]??null,'relatedPages':normalizeRelatedPages(_0x5f49df[_0x22065d(0x93)]),...Array[_0x22065d(0xb0)](_0x5f49df[_0x22065d(0x8f)])?{'columnCodeListWithDeleted':_0x5f49df[_0x22065d(0x8f)]}:{},'formatRules':Array[_0x22065d(0xb0)](_0x5f49df[_0x22065d(0xa7)])?_0x5f49df[_0x22065d(0xa7)]:[],'validateRules':Array[_0x22065d(0xb0)](_0x5f49df[_0x22065d(0xb1)])?_0x5f49df['validateRules']:[],..._0x3b25ae!==undefined?{'extend':_0x3b25ae}:{},'stats':{'fieldCount':_0x544ff3[_0x22065d(0x96)],'operationCount':_0x53f047[_0x22065d(0x96)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x56ea44,_0x185606){const _0x193d03=a26_0x1630,_0x477e96=_0x56ea44();while(!![]){try{const _0x587faf=parseInt(_0x193d03(0x147))/0x1+-parseInt(_0x193d03(0x144))/0x2+-parseInt(_0x193d03(0x13f))/0x3+parseInt(_0x193d03(0x142))/0x4+-parseInt(_0x193d03(0x140))/0x5*(-parseInt(_0x193d03(0x146))/0x6)+parseInt(_0x193d03(0x143))/0x7*(parseInt(_0x193d03(0x145))/0x8)+-parseInt(_0x193d03(0x141))/0x9;if(_0x587faf===_0x185606)break;else _0x477e96['push'](_0x477e96['shift']());}catch(_0x31e881){_0x477e96['push'](_0x477e96['shift']());}}}(a26_0x3f05,0xb92d1));function a26_0x1630(_0x38b891,_0x15bf16){_0x38b891=_0x38b891-0x13f;const _0x3f0507=a26_0x3f05();let _0x1630d2=_0x3f0507[_0x38b891];return _0x1630d2;}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];function a26_0x3f05(){const _0x19979c=['833951kFcADS','122409GoIsQW','15yfZZBI','1953180gFcDtc','2498252sEmISS','70oRuhtp','2457940ENwspS','337640iinhfR','729420EwGowK'];a26_0x3f05=function(){return _0x19979c;};return a26_0x3f05();}
|