@lovrabet/lovrabet-cli 2.1.22-beta.2 → 2.1.22-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x405833=a12_0x299e;(function(_0x5a6c1e,_0x4cc631){const _0x225a22=a12_0x299e,_0x431d94=_0x5a6c1e();while(!![]){try{const _0x35a4b1=parseInt(_0x225a22(0x1be))/0x1*(-parseInt(_0x225a22(0x1a9))/0x2)+-parseInt(_0x225a22(0x194))/0x3+parseInt(_0x225a22(0x1c7))/0x4*(parseInt(_0x225a22(0x1b5))/0x5)+-parseInt(_0x225a22(0x1ba))/0x6+parseInt(_0x225a22(0x18d))/0x7*(parseInt(_0x225a22(0x1cf))/0x8)+-parseInt(_0x225a22(0x1b8))/0x9+parseInt(_0x225a22(0x1c6))/0xa*(parseInt(_0x225a22(0x1bd))/0xb);if(_0x35a4b1===_0x4cc631)break;else _0x431d94['push'](_0x431d94['shift']());}catch(_0x6d2e2c){_0x431d94['push'](_0x431d94['shift']());}}}(a12_0x1f03,0xcdaa6));function a12_0x1f03(){const _0x4064ae=['write','global-default','global\x20config','login','access-key','2590yFJUHm','8DVBAPw','Option\x20A:\x20','str','ACCESS_KEY','slice','Write\x20to\x20global\x20config\x20(default)','\x20config.\x20Nothing\x20to\x20clear.','Missing\x20accessKey.','232RWGAyX','Shorthand\x20for\x20--access-key','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Show\x20current\x20authentication\x20status','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Read\x20from\x20global\x20config\x20(default)','`auth\x20login`\x20does\x20not\x20support\x20--yes.','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','expired','production','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Status:\x20valid','info','init','status','bool','yes','development','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','validation','test','\x20env\x20var','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','newConfigFileName','check','string','auth','repeat','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','boolean','169680KGEYvn','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','\x20auth\x20status','daily','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','isTTY','Tip:\x20you\x20can\x20also\x20run:','1287879BvPSEn','\x20auth\x20login\x20--access-key\x20<ak_xxx>','authRequired','trim','access_key','userCenterDisplayName','length','Clear\x20from\x20global\x20config\x20(default)','logout','push','env','\x20\x20export\x20','success','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20doctor','=ak_xxx','ClientAk','global','stdin','\x20(via\x20','Clear\x20accessKey\x20from\x20config','24484OpakMA','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Auth\x20mode:\x20','join','project','read','code','\x20config','AccessKey\x20(ak_xxx...)','AccessKey:\x20','scope','accessKey','3447575vUNHqB','Invalid\x20accessKey\x20format:\x20\x22','\x20Verify:\x20','8709957Srwfkm','Option\x20C:\x20environment\x20variable','5433498IbhmiV','\x20Current\x20env:\x20','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','108581hWeeGA','122CrbSvh','Use\x20`','\x20config.'];a12_0x1f03=function(){return _0x4064ae;};return a12_0x1f03();}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 _0x527be8=a12_0x299e;writeCliSideChannelLine(_0x527be8(0x1aa)+PRODUCT_CONFIG[_0x527be8(0x199)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x527be8(0x193)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x527be8(0x195));}function buildAccessKeySetupGuide(){const _0x2f9865=a12_0x299e;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x2f9865(0x199)]+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x2f9865(0x1da)]['join']('\x0a');}function a12_0x299e(_0x3485be,_0x37b5b7){_0x3485be=_0x3485be-0x189;const _0x1f03c6=a12_0x1f03();let _0x299ec1=_0x1f03c6[_0x3485be];return _0x299ec1;}function canPromptForAccessKey(_0x43bfd4){const _0x1dfb1a=a12_0x299e;return!_0x43bfd4['nonInteractive']&&process[_0x1dfb1a(0x1a6)][_0x1dfb1a(0x192)]!==![]&&process['stdout']['isTTY']!==![];}function resolveAuthScopeFlags(_0xcd9f87){const _0xe32da9=a12_0x299e;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0xcd9f87['bool'](_0xe32da9(0x1a5)),'explicitProject':_0xcd9f87[_0xe32da9(0x1df)]('project'),'policy':_0xe32da9(0x1c2)}));}async function resolveAuthWriteInput(_0x47315a){const _0x166a93=a12_0x299e;let _0x59903f=(_0x47315a[_0x166a93(0x1c9)](_0x166a93(0x1c5))||_0x47315a[_0x166a93(0x1c9)]('ak')||'')[_0x166a93(0x197)]();const _0x399467=(_0x47315a[_0x166a93(0x1c9)](_0x166a93(0x19e))||'')['trim']();if(!_0x59903f&&canPromptForAccessKey(_0x47315a))try{showAccessKeyCreateHint(),_0x59903f=await promptAccessKey('');}catch(_0xcf019a){if(isAbortPrompt(_0xcf019a))throw CliErrors['cancelled']();throw _0xcf019a;}if(!_0x59903f)throw CliErrors[_0x166a93(0x1e3)](_0x166a93(0x1ce),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x166a93(0x1e4)](_0x59903f))throw CliErrors['validation'](_0x166a93(0x1b6)+_0x59903f+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x399467)return{'accessKey':_0x59903f};const _0x4f5455=normalizeEnv(_0x399467);return{'accessKey':_0x59903f,'env':isDaily(_0x4f5455)?_0x166a93(0x190):isDev(_0x4f5455)?_0x166a93(0x1e1):_0x166a93(0x1d9)};}export const authDefinitions=[{'service':'auth','command':a12_0x405833(0x1c4),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x405833(0x1c5),'type':a12_0x405833(0x1e9),'description':a12_0x405833(0x1b1)},{'name':'ak','type':a12_0x405833(0x1e9),'description':a12_0x405833(0x1d0)},{'name':a12_0x405833(0x1a5),'type':a12_0x405833(0x18c),'description':a12_0x405833(0x1cc),'default':!![]},{'name':a12_0x405833(0x1ad),'type':a12_0x405833(0x18c),'description':a12_0x405833(0x18b),'default':![]}],async 'execute'(_0x261b94){const _0x1cf913=a12_0x405833;if(_0x261b94[_0x1cf913(0x1df)](_0x1cf913(0x1e0)))throw CliErrors['validation'](_0x1cf913(0x1d6),_0x1cf913(0x1bf)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x26f23a=(_0x261b94['str']('access-key')||_0x261b94[_0x1cf913(0x1c9)]('ak')||'')[_0x1cf913(0x197)]();if(!_0x26f23a&&_0x261b94['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x53e428=await resolveAuthWriteInput(_0x261b94),_0x332961=resolveAuthScopeFlags(_0x261b94),_0x4f69e3=readScopedConfig(_0x332961);_0x4f69e3[_0x1cf913(0x1b4)]=_0x53e428[_0x1cf913(0x1b4)];_0x53e428[_0x1cf913(0x19e)]&&(_0x4f69e3['env']=_0x53e428[_0x1cf913(0x19e)]);writeScopedConfig(_0x4f69e3,_0x332961);const _0x9405ec=_0x332961[_0x1cf913(0x1a5)]?_0x1cf913(0x1a5):_0x1cf913(0x1ad),_0x341a61=_0x4f69e3['env']?_0x1cf913(0x1bb)+_0x4f69e3[_0x1cf913(0x19e)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x9405ec+_0x1cf913(0x1c0)+_0x341a61+_0x1cf913(0x1b7)+CLI_BIN_NAME+_0x1cf913(0x18f)};}},{'service':'auth','command':a12_0x405833(0x1dd),'description':a12_0x405833(0x1d1),'risk':a12_0x405833(0x1c1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x405833(0x1c5),'type':a12_0x405833(0x1e9),'description':a12_0x405833(0x1b1)},{'name':'ak','type':a12_0x405833(0x1e9),'description':a12_0x405833(0x1d0)},{'name':a12_0x405833(0x19e),'type':'string','description':a12_0x405833(0x1a1)},{'name':a12_0x405833(0x1a5),'type':a12_0x405833(0x18c),'description':a12_0x405833(0x1cc),'default':!![]},{'name':a12_0x405833(0x1ad),'type':'boolean','description':a12_0x405833(0x18b),'default':![]}],async 'execute'(_0x2ce0bd){const _0x33146e=a12_0x405833,_0x35f849=await resolveAuthWriteInput(_0x2ce0bd),_0xc38bf4=resolveAuthScopeFlags(_0x2ce0bd),_0x3ec070={'accessKey':_0x35f849[_0x33146e(0x1b4)]};_0x35f849['env']&&(_0x3ec070[_0x33146e(0x19e)]=_0x35f849[_0x33146e(0x19e)]);writeScopedConfig(_0x3ec070,_0xc38bf4);const _0x2e1479=_0xc38bf4[_0x33146e(0x1a5)]?_0x33146e(0x1a5):_0x33146e(0x1ad),_0x4b87de=_0x3ec070['env']?_0x33146e(0x1bb)+_0x3ec070['env']+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x2e1479+'\x20scope.'+_0x4b87de+_0x33146e(0x1b7)+CLI_BIN_NAME+_0x33146e(0x18f)};}},{'service':'auth','command':a12_0x405833(0x19c),'description':a12_0x405833(0x1a8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x405833(0x18c),'description':a12_0x405833(0x19b),'default':!![]},{'name':a12_0x405833(0x1ad),'type':a12_0x405833(0x18c),'description':a12_0x405833(0x1e2),'default':![]}],async 'execute'(_0x171483){const _0x3751e0=a12_0x405833,_0x1bad3b=resolveAuthScopeFlags(_0x171483),_0x30e858=readScopedConfig(_0x1bad3b),_0x26d66f=!!_0x30e858[_0x3751e0(0x1b4)];delete _0x30e858[_0x3751e0(0x1b4)],writeScopedConfig(_0x30e858,_0x1bad3b);const _0x3fbf42=_0x1bad3b[_0x3751e0(0x1a5)]?_0x3751e0(0x1a5):_0x3751e0(0x1ad);if(_0x26d66f)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x3fbf42+_0x3751e0(0x1c0)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x3fbf42+_0x3751e0(0x1cd)};}},{'service':a12_0x405833(0x189),'command':'status','description':a12_0x405833(0x1d2),'risk':a12_0x405833(0x1ae),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x405833(0x1a5),'type':a12_0x405833(0x18c),'description':a12_0x405833(0x1d5),'default':!![]},{'name':a12_0x405833(0x1ad),'type':a12_0x405833(0x18c),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a12_0x405833(0x1e8),'type':a12_0x405833(0x18c),'description':a12_0x405833(0x1bc),'default':![]}],async 'execute'(_0x103b3b){const _0x163d6c=a12_0x405833,_0x24f779=resolveAuthScopeFlags(_0x103b3b),_0x4e1845=readScopedConfig(_0x24f779),_0x2da27b=productEnvName('ACCESS_KEY'),_0x571f30=productEnv(_0x163d6c(0x1ca))||undefined,_0x4203a1=_0x4e1845[_0x163d6c(0x1b4)]||undefined,_0x5bf04d=_0x571f30||_0x4203a1,_0xd4b1a9=_0x571f30?_0x2da27b+_0x163d6c(0x1e5):_0x4203a1?(_0x24f779[_0x163d6c(0x1a5)]?_0x163d6c(0x1a5):'project')+_0x163d6c(0x1b0):null,_0xa3fa55=[_0x163d6c(0x1ab)+AUTH_MODE[_0x163d6c(0x1a4)]];if(_0x5bf04d){const _0xaca867=_0x5bf04d[_0x163d6c(0x19a)]>0x8?''+_0x5bf04d[_0x163d6c(0x1cb)](0x0,0x8)+'*'['repeat'](_0x5bf04d[_0x163d6c(0x19a)]-0x8):_0x5bf04d;_0xa3fa55[_0x163d6c(0x19d)](_0x163d6c(0x1b2)+_0xaca867+(_0xd4b1a9?_0x163d6c(0x1a7)+_0xd4b1a9+')':'')),_0xa3fa55[_0x163d6c(0x19d)](_0x163d6c(0x1db));}if(!_0x5bf04d){_0xa3fa55[_0x163d6c(0x19d)](''),_0xa3fa55[_0x163d6c(0x19d)](_0x163d6c(0x1e6)),_0xa3fa55[_0x163d6c(0x19d)](''),_0xa3fa55[_0x163d6c(0x19d)](_0x163d6c(0x1c8)+CLI_BIN_NAME+_0x163d6c(0x18e)),_0xa3fa55[_0x163d6c(0x19d)](''),_0xa3fa55[_0x163d6c(0x19d)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x163d6c(0x1e7)]+')'),_0xa3fa55[_0x163d6c(0x19d)](_0x163d6c(0x1d7)),_0xa3fa55[_0x163d6c(0x19d)](''),_0xa3fa55[_0x163d6c(0x19d)](_0x163d6c(0x1b9)),_0xa3fa55[_0x163d6c(0x19d)](_0x163d6c(0x19f)+_0x2da27b+_0x163d6c(0x1a3)),_0xa3fa55['push'](''),_0xa3fa55['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0xa3fa55['push'](_0x163d6c(0x1d4)+CLI_BIN_NAME+_0x163d6c(0x1a2));if(_0x103b3b[_0x163d6c(0x1df)](_0x163d6c(0x1e8))){const _0x2f8171=readStoredDeviceCode();if(_0x2f8171&&!isStoredDeviceCodeExpired(_0x2f8171)){const _0x2d3607=getUserDomain(),_0x20fa36=await fetchDeviceToken(_0x2d3607,_0x2f8171[_0x163d6c(0x1af)]);if(_0x20fa36['status']===_0x163d6c(0x1a0)&&_0x20fa36[_0x163d6c(0x198)]){const _0x474bea={'global':_0x2f8171[_0x163d6c(0x1b3)]==='global'},_0x34ca1c=readScopedConfig(_0x474bea);_0x34ca1c[_0x163d6c(0x1b4)]=_0x20fa36[_0x163d6c(0x198)],writeScopedConfig(_0x34ca1c,_0x474bea),deleteStoredDeviceCode();const _0x5825a1=_0x20fa36[_0x163d6c(0x198)],_0x398e95=_0x5825a1['length']>0x8?''+_0x5825a1[_0x163d6c(0x1cb)](0x0,0x8)+'*'[_0x163d6c(0x18a)](_0x5825a1[_0x163d6c(0x19a)]-0x8):_0x5825a1,_0x4eb0bc=_0x2f8171['scope']===_0x163d6c(0x1a5)?_0x163d6c(0x1c3):'project\x20config';return{'ok':!![],'message':[_0x163d6c(0x1ab)+AUTH_MODE[_0x163d6c(0x1a4)],_0x163d6c(0x1b2)+_0x398e95+_0x163d6c(0x1a7)+_0x4eb0bc+')','Status:\x20valid'][_0x163d6c(0x1ac)]('\x0a')};}_0x20fa36[_0x163d6c(0x1de)]===_0x163d6c(0x1d8)&&deleteStoredDeviceCode();throw CliErrors[_0x163d6c(0x196)](_0x163d6c(0x191));}throw CliErrors[_0x163d6c(0x196)](_0xa3fa55[_0x163d6c(0x1ac)]('\x0a'));}}return{'ok':!![],'message':_0xa3fa55[_0x163d6c(0x1ac)]('\x0a')};}},{'service':'auth','command':a12_0x405833(0x1dc),'description':a12_0x405833(0x1d3),'risk':a12_0x405833(0x1ae),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x52582c){const _0x17c3c3=a12_0x405833,_0x29571=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x29571,'meta':{'env':_0x52582c['envName']??_0x17c3c3(0x1d9)}}};}},authDeviceDefinition];
|
|
1
|
+
const a12_0x3fa7ed=a12_0x11e1;(function(_0x231149,_0x177edc){const _0x2802c5=a12_0x11e1,_0x4761bb=_0x231149();while(!![]){try{const _0x11f5ae=parseInt(_0x2802c5(0x18b))/0x1*(-parseInt(_0x2802c5(0x1ca))/0x2)+parseInt(_0x2802c5(0x1a3))/0x3*(-parseInt(_0x2802c5(0x1cc))/0x4)+parseInt(_0x2802c5(0x1be))/0x5+-parseInt(_0x2802c5(0x1a9))/0x6+-parseInt(_0x2802c5(0x18e))/0x7*(parseInt(_0x2802c5(0x1c7))/0x8)+parseInt(_0x2802c5(0x177))/0x9*(-parseInt(_0x2802c5(0x187))/0xa)+parseInt(_0x2802c5(0x1bb))/0xb;if(_0x11f5ae===_0x177edc)break;else _0x4761bb['push'](_0x4761bb['shift']());}catch(_0x1c883e){_0x4761bb['push'](_0x4761bb['shift']());}}}(a12_0x46d4,0x8f956));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a12_0x46d4(){const _0x47e0ca=['Missing\x20accessKey.','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20scope.','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Invalid\x20accessKey\x20format:\x20\x22','slice','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','length','code','project','authRequired','=ak_xxx','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','2080amqGei','trim','AccessKey\x20(ak_xxx...)','\x20config.','8605hESCMX','Auth\x20mode:\x20','Write\x20to\x20global\x20config\x20(default)','168yhDDRi','production','yes','project\x20config','\x20env\x20var','scope','cancelled','development','str','global','Clear\x20accessKey\x20from\x20config','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Option\x20C:\x20environment\x20variable','join','logout','bool','expired','Shorthand\x20for\x20--access-key','isTTY','nonInteractive','string','9CkCxMY','stdout','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Show\x20current\x20authentication\x20status','Tip:\x20you\x20can\x20also\x20run:','Option\x20B:\x20apps\x20config\x20(','6697728KGduiU','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','global\x20config','\x20config.\x20Nothing\x20to\x20clear.','userCenterDisplayName','newConfigFileName','Clear\x20from\x20global\x20config\x20(default)','boolean','ACCESS_KEY','access-key','read','push','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','status','Read\x20from\x20global\x20config\x20(default)','AccessKey\x20cleared\x20from\x20','stdin','repeat','30899473FMSfrv','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','check','3932515pSwpym','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','env','\x20auth\x20status','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Status:\x20valid','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','write','\x20Current\x20env:\x20','57808HftqCp','AccessKey:\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','166WrmOZP','ClientAk','1250364ExOvEy','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','init','accessKey','No\x20AccessKey\x20found\x20in\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','auth','\x20(via\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20Verify:\x20','Auth\x20config\x20reinitialized\x20in\x20','daily','envName','access_key','2844RQsTSS'];a12_0x46d4=function(){return _0x47e0ca;};return a12_0x46d4();}import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x517459=a12_0x11e1;writeCliSideChannelLine(_0x517459(0x1b5)+PRODUCT_CONFIG[_0x517459(0x1ad)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x517459(0x1a7)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x517459(0x185));}function a12_0x11e1(_0x3216cf,_0x240b24){_0x3216cf=_0x3216cf-0x172;const _0x46d436=a12_0x46d4();let _0x11e18f=_0x46d436[_0x3216cf];return _0x11e18f;}function buildAccessKeySetupGuide(){const _0x2ec29e=a12_0x11e1;return[_0x2ec29e(0x1b5)+PRODUCT_CONFIG[_0x2ec29e(0x1ad)]+':',USER_ACCESS_KEY_CREATE_URL,_0x2ec29e(0x186)+CLI_BIN_NAME+_0x2ec29e(0x1bf)]['join']('\x0a');}function canPromptForAccessKey(_0x884565){const _0x346805=a12_0x11e1;return!_0x884565[_0x346805(0x1a1)]&&process[_0x346805(0x1b9)]['isTTY']!==![]&&process[_0x346805(0x1a4)][_0x346805(0x1a0)]!==![];}function resolveAuthScopeFlags(_0x49b75d){const _0x246e25=a12_0x11e1;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x49b75d['bool'](_0x246e25(0x197)),'explicitProject':_0x49b75d[_0x246e25(0x19d)](_0x246e25(0x182)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x26d594){const _0x5bcba7=a12_0x11e1;let _0x4bc55c=(_0x26d594[_0x5bcba7(0x196)](_0x5bcba7(0x1b2))||_0x26d594[_0x5bcba7(0x196)]('ak')||'')[_0x5bcba7(0x188)]();const _0x424cd4=(_0x26d594[_0x5bcba7(0x196)](_0x5bcba7(0x1c0))||'')[_0x5bcba7(0x188)]();if(!_0x4bc55c&&canPromptForAccessKey(_0x26d594))try{showAccessKeyCreateHint(),_0x4bc55c=await promptAccessKey('');}catch(_0x5b8dd7){if(isAbortPrompt(_0x5b8dd7))throw CliErrors[_0x5bcba7(0x194)]();throw _0x5b8dd7;}if(!_0x4bc55c)throw CliErrors['validation'](_0x5bcba7(0x178),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x4bc55c))throw CliErrors['validation'](_0x5bcba7(0x17c)+_0x4bc55c+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x424cd4)return{'accessKey':_0x4bc55c};const _0x50bb79=normalizeEnv(_0x424cd4);return{'accessKey':_0x4bc55c,'env':isDaily(_0x50bb79)?_0x5bcba7(0x174):isDev(_0x50bb79)?_0x5bcba7(0x195):'production'};}export const authDefinitions=[{'service':a12_0x3fa7ed(0x1d2),'command':'login','description':a12_0x3fa7ed(0x17f),'risk':a12_0x3fa7ed(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3fa7ed(0x1b2),'type':'string','description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x3fa7ed(0x1a2),'description':a12_0x3fa7ed(0x19f)},{'name':'global','type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x18d),'default':!![]},{'name':a12_0x3fa7ed(0x182),'type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x17e),'default':![]}],async 'execute'(_0x176d18){const _0x138e31=a12_0x3fa7ed;if(_0x176d18[_0x138e31(0x19d)](_0x138e31(0x190)))throw CliErrors['validation'](_0x138e31(0x179),'Use\x20`'+CLI_BIN_NAME+_0x138e31(0x1cd)+CLI_BIN_NAME+_0x138e31(0x1c2));const _0x1a0aa2=(_0x176d18[_0x138e31(0x196)](_0x138e31(0x1b2))||_0x176d18['str']('ak')||'')[_0x138e31(0x188)]();if(!_0x1a0aa2&&_0x176d18[_0x138e31(0x1a1)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0xfa8578=await resolveAuthWriteInput(_0x176d18),_0x429c2b=resolveAuthScopeFlags(_0x176d18),_0x1fc499=readScopedConfig(_0x429c2b);_0x1fc499[_0x138e31(0x1cf)]=_0xfa8578['accessKey'];_0xfa8578['env']&&(_0x1fc499['env']=_0xfa8578['env']);writeScopedConfig(_0x1fc499,_0x429c2b);const _0x5c8af2=_0x429c2b['global']?_0x138e31(0x197):_0x138e31(0x182),_0x1b4b62=_0x1fc499[_0x138e31(0x1c0)]?'\x20Current\x20env:\x20'+_0x1fc499['env']+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x5c8af2+_0x138e31(0x18a)+_0x1b4b62+_0x138e31(0x172)+CLI_BIN_NAME+_0x138e31(0x1c1)};}},{'service':a12_0x3fa7ed(0x1d2),'command':a12_0x3fa7ed(0x1ce),'description':a12_0x3fa7ed(0x17b),'risk':a12_0x3fa7ed(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3fa7ed(0x1b2),'type':'string','description':a12_0x3fa7ed(0x189)},{'name':'ak','type':a12_0x3fa7ed(0x1a2),'description':'Shorthand\x20for\x20--access-key'},{'name':'env','type':'string','description':a12_0x3fa7ed(0x1c9)},{'name':a12_0x3fa7ed(0x197),'type':a12_0x3fa7ed(0x1b0),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a12_0x3fa7ed(0x17e),'default':![]}],async 'execute'(_0x176224){const _0x8dbfb9=a12_0x3fa7ed,_0x13706f=await resolveAuthWriteInput(_0x176224),_0x22aae5=resolveAuthScopeFlags(_0x176224),_0x591442={'accessKey':_0x13706f[_0x8dbfb9(0x1cf)]};_0x13706f[_0x8dbfb9(0x1c0)]&&(_0x591442['env']=_0x13706f[_0x8dbfb9(0x1c0)]);writeScopedConfig(_0x591442,_0x22aae5);const _0x41af08=_0x22aae5[_0x8dbfb9(0x197)]?_0x8dbfb9(0x197):_0x8dbfb9(0x182),_0x5140af=_0x591442[_0x8dbfb9(0x1c0)]?_0x8dbfb9(0x1c6)+_0x591442[_0x8dbfb9(0x1c0)]+'.':'';return{'ok':!![],'message':_0x8dbfb9(0x173)+_0x41af08+_0x8dbfb9(0x17a)+_0x5140af+_0x8dbfb9(0x172)+CLI_BIN_NAME+_0x8dbfb9(0x1c1)};}},{'service':a12_0x3fa7ed(0x1d2),'command':a12_0x3fa7ed(0x19c),'description':a12_0x3fa7ed(0x198),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3fa7ed(0x197),'type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x1af),'default':!![]},{'name':a12_0x3fa7ed(0x182),'type':a12_0x3fa7ed(0x1b0),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x32f031){const _0x4dfd1b=a12_0x3fa7ed,_0x387386=resolveAuthScopeFlags(_0x32f031),_0x2d7a64=readScopedConfig(_0x387386),_0xa2d5fc=!!_0x2d7a64[_0x4dfd1b(0x1cf)];delete _0x2d7a64[_0x4dfd1b(0x1cf)],writeScopedConfig(_0x2d7a64,_0x387386);const _0x5556aa=_0x387386[_0x4dfd1b(0x197)]?_0x4dfd1b(0x197):_0x4dfd1b(0x182);if(_0xa2d5fc)return{'ok':!![],'message':_0x4dfd1b(0x1b8)+_0x5556aa+_0x4dfd1b(0x18a)};return{'ok':!![],'message':_0x4dfd1b(0x1d0)+_0x5556aa+_0x4dfd1b(0x1ac)};}},{'service':a12_0x3fa7ed(0x1d2),'command':a12_0x3fa7ed(0x1b6),'description':a12_0x3fa7ed(0x1a6),'risk':a12_0x3fa7ed(0x1b3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3fa7ed(0x197),'type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x1b7),'default':!![]},{'name':a12_0x3fa7ed(0x182),'type':a12_0x3fa7ed(0x1b0),'description':a12_0x3fa7ed(0x1c4),'default':![]},{'name':a12_0x3fa7ed(0x1bd),'type':a12_0x3fa7ed(0x1b0),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x203ef4){const _0x29ea94=a12_0x3fa7ed,_0x1ef2f9=resolveAuthScopeFlags(_0x203ef4),_0x1ba3ba=readScopedConfig(_0x1ef2f9),_0x235c9a=productEnvName(_0x29ea94(0x1b1)),_0x992de9=productEnv('ACCESS_KEY')||undefined,_0x3a1852=_0x1ba3ba[_0x29ea94(0x1cf)]||undefined,_0x3f22c1=_0x992de9||_0x3a1852,_0xea89d6=_0x992de9?_0x235c9a+_0x29ea94(0x192):_0x3a1852?(_0x1ef2f9[_0x29ea94(0x197)]?_0x29ea94(0x197):'project')+'\x20config':null,_0x54fc6=[_0x29ea94(0x18c)+AUTH_MODE[_0x29ea94(0x1cb)]];if(_0x3f22c1){const _0x16e42e=_0x3f22c1[_0x29ea94(0x180)]>0x8?''+_0x3f22c1[_0x29ea94(0x17d)](0x0,0x8)+'*'[_0x29ea94(0x1ba)](_0x3f22c1[_0x29ea94(0x180)]-0x8):_0x3f22c1;_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x1c8)+_0x16e42e+(_0xea89d6?'\x20(via\x20'+_0xea89d6+')':'')),_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x1c3));}if(!_0x3f22c1){_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6['push'](_0x29ea94(0x1d4)),_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6[_0x29ea94(0x1b4)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x29ea94(0x199)),_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6['push'](_0x29ea94(0x1a8)+PRODUCT_CONFIG[_0x29ea94(0x1ae)]+')'),_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x1a5)),_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x19a)),_0x54fc6[_0x29ea94(0x1b4)]('\x20\x20export\x20'+_0x235c9a+_0x29ea94(0x184)),_0x54fc6[_0x29ea94(0x1b4)](''),_0x54fc6['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0x54fc6[_0x29ea94(0x1b4)](_0x29ea94(0x1d1)+CLI_BIN_NAME+'\x20doctor');if(_0x203ef4[_0x29ea94(0x19d)](_0x29ea94(0x1bd))){const _0x1666e2=readStoredDeviceCode();if(_0x1666e2&&!isStoredDeviceCodeExpired(_0x1666e2)){const _0x413b8a=getUserDomain(),_0x33503d=await fetchDeviceToken(_0x413b8a,_0x1666e2[_0x29ea94(0x181)]);if(_0x33503d[_0x29ea94(0x1b6)]==='success'&&_0x33503d[_0x29ea94(0x176)]){const _0x1b2b48={'global':_0x1666e2[_0x29ea94(0x193)]===_0x29ea94(0x197)},_0xda4d34=readScopedConfig(_0x1b2b48);_0xda4d34[_0x29ea94(0x1cf)]=_0x33503d[_0x29ea94(0x176)],writeScopedConfig(_0xda4d34,_0x1b2b48),deleteStoredDeviceCode();const _0x13e117=_0x33503d[_0x29ea94(0x176)],_0x5e1dba=_0x13e117[_0x29ea94(0x180)]>0x8?''+_0x13e117[_0x29ea94(0x17d)](0x0,0x8)+'*'[_0x29ea94(0x1ba)](_0x13e117[_0x29ea94(0x180)]-0x8):_0x13e117,_0xb7b14d=_0x1666e2[_0x29ea94(0x193)]===_0x29ea94(0x197)?_0x29ea94(0x1ab):_0x29ea94(0x191);return{'ok':!![],'message':[_0x29ea94(0x18c)+AUTH_MODE['ClientAk'],_0x29ea94(0x1c8)+_0x5e1dba+_0x29ea94(0x1d3)+_0xb7b14d+')',_0x29ea94(0x1c3)][_0x29ea94(0x19b)]('\x0a')};}_0x33503d['status']===_0x29ea94(0x19e)&&deleteStoredDeviceCode();throw CliErrors[_0x29ea94(0x183)](_0x29ea94(0x1aa));}throw CliErrors[_0x29ea94(0x183)](_0x54fc6['join']('\x0a'));}}return{'ok':!![],'message':_0x54fc6[_0x29ea94(0x19b)]('\x0a')};}},{'service':'auth','command':'info','description':a12_0x3fa7ed(0x1bc),'risk':a12_0x3fa7ed(0x1b3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xa49635){const _0x4952c5=a12_0x3fa7ed,_0x169252=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x169252,'meta':{'env':_0xa49635[_0x4952c5(0x175)]??_0x4952c5(0x18f)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3823cd,_0x3d786b){const _0xff12ec=a13_0x59e8,_0x260bb5=_0x3823cd();while(!![]){try{const _0x5af5d7=-parseInt(_0xff12ec(0x1bf))/0x1+-parseInt(_0xff12ec(0x1ad))/0x2*(parseInt(_0xff12ec(0x1be))/0x3)+parseInt(_0xff12ec(0x1b2))/0x4+parseInt(_0xff12ec(0x1b0))/0x5*(-parseInt(_0xff12ec(0x1b3))/0x6)+-parseInt(_0xff12ec(0x1ae))/0x7+parseInt(_0xff12ec(0x1af))/0x8*(-parseInt(_0xff12ec(0x1b9))/0x9)+parseInt(_0xff12ec(0x1b8))/0xa*(parseInt(_0xff12ec(0x1b7))/0xb);if(_0x5af5d7===_0x3d786b)break;else _0x260bb5['push'](_0x260bb5['shift']());}catch(_0x143708){_0x260bb5['push'](_0x260bb5['shift']());}}}(a13_0x541c,0xbd4ca));function a13_0x541c(){const _0x3cf6fb=['71457JTiRZf','1229520jEDRDW','removeListener','AccessKey\x20(paste\x20ak_...):\x20','stdin','AccessKey\x20(','34FIbjoY','6596933vETEMK','1656AzNLHk','10IqScDa','once','3906040VnVNoh','2089206bTnuRE','question','close','name','48261422Xeuikt','10qYsILT','57186NEJpEH','stdout','SIGINT','):\x20','AbortPrompt'];a13_0x541c=function(){return _0x3cf6fb;};return a13_0x541c();}import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x259189=a13_0x59e8;super('User\x20aborted\x20prompt'),this[_0x259189(0x1b6)]=_0x259189(0x1bd);}}function createSafeRl(){const _0x5e519b=a13_0x59e8,_0x178286=createInterface({'input':process[_0x5e519b(0x1c2)],'output':process[_0x5e519b(0x1ba)]});let _0x53569d;const _0x4f4ba1=new Promise((_0x2ef909,_0xab2806)=>{const _0x528ee1=_0x5e519b;_0x53569d=()=>{const _0x49618c=a13_0x59e8;_0x53569d&&(_0x178286[_0x49618c(0x1c0)](_0x49618c(0x1bb),_0x53569d),_0x53569d=undefined);try{_0x178286[_0x49618c(0x1b5)]();}catch{}_0xab2806(new AbortPrompt());},_0x178286[_0x528ee1(0x1b1)]('SIGINT',_0x53569d);}),_0x4b4418=()=>{const _0x1b4214=_0x5e519b;_0x53569d&&(_0x178286[_0x1b4214(0x1c0)](_0x1b4214(0x1bb),_0x53569d),_0x53569d=undefined);try{_0x178286[_0x1b4214(0x1b5)]();}catch{}};return{'rl':_0x178286,'abortPromise':_0x4f4ba1,'disposeSuccess':_0x4b4418};}export async function promptAccessKey(_0x156c68=''){const {rl:_0x189ada,abortPromise:_0xca71b2,disposeSuccess:_0x424482}=createSafeRl(),_0x62d984=new Promise(_0x5687e4=>{const _0xb66f2f=a13_0x59e8,_0x6b546a=_0x156c68?_0xb66f2f(0x1ac)+_0x156c68+_0xb66f2f(0x1bc):_0xb66f2f(0x1c1);_0x189ada[_0xb66f2f(0x1b4)](_0x6b546a,_0xb5ce6c=>{_0x424482(),_0x5687e4(_0xb5ce6c['trim']()||_0x156c68);});});return Promise['race']([_0x62d984,_0xca71b2]);}function a13_0x59e8(_0x518097,_0xe24f48){_0x518097=_0x518097-0x1ac;const _0x541c16=a13_0x541c();let _0x59e847=_0x541c16[_0x518097];return _0x59e847;}export function isAbortPrompt(_0x353738){const _0x402192=a13_0x59e8;return _0x353738 instanceof Error&&_0x353738['name']===_0x402192(0x1bd);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x4d845a=a14_0x51d7;(function(_0x4c7acb,_0x1457ed){const _0x27ede6=a14_0x51d7,_0xae4f81=_0x4c7acb();while(!![]){try{const _0x91dc39=parseInt(_0x27ede6(0x1c5))/0x1+-parseInt(_0x27ede6(0x1cb))/0x2+parseInt(_0x27ede6(0x1c7))/0x3+parseInt(_0x27ede6(0x1cf))/0x4*(parseInt(_0x27ede6(0x1d3))/0x5)+-parseInt(_0x27ede6(0x1ce))/0x6+-parseInt(_0x27ede6(0x1d0))/0x7*(parseInt(_0x27ede6(0x1d2))/0x8)+parseInt(_0x27ede6(0x1c9))/0x9*(parseInt(_0x27ede6(0x1d7))/0xa);if(_0x91dc39===_0x1457ed)break;else _0xae4f81['push'](_0xae4f81['shift']());}catch(_0x2a2af0){_0xae4f81['push'](_0xae4f81['shift']());}}}(a14_0x1201,0x3d253));import{getBffEndpointContract}from'../../core/api-client.js';function a14_0x1201(){const _0x40c6e9=['BFF\x20function\x20name','45YsWzJY','version','825336MPhYCL','description','read','1538880IXDjQX','21956MwzNLw','7mTksEQ','functionName','444712VCzoJl','345CyVqJu','Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','gmtModified','detail','242750dMXGfO','367200qsytFi','appCode','323616PEWLfR'];a14_0x1201=function(){return _0x40c6e9;};return a14_0x1201();}import{NAME_FLAG}from'../../commands/common/flags.js';function a14_0x51d7(_0x29343a,_0x146350){_0x29343a=_0x29343a-0x1c5;const _0x12018e=a14_0x1201();let _0x51d7fa=_0x12018e[_0x29343a];return _0x51d7fa;}export const bffDetail={'service':'bff','command':a14_0x4d845a(0x1d6),'description':a14_0x4d845a(0x1d4),'risk':a14_0x4d845a(0x1cd),'flags':[{...NAME_FLAG,'required':!![],'description':a14_0x4d845a(0x1c8)}],async 'execute'(_0x3979b5){const _0x8ab55d=a14_0x4d845a,_0x165525=await getBffEndpointContract(_0x3979b5['appCode'],_0x3979b5['str']('name'));return{'ok':!![],'data':{'appCode':_0x165525[_0x8ab55d(0x1c6)],'functionName':_0x165525[_0x8ab55d(0x1d1)],'description':_0x165525[_0x8ab55d(0x1cc)]||'(none)','version':_0x165525[_0x8ab55d(0x1ca)],'gmtModified':_0x165525[_0x8ab55d(0x1d5)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a15_0x5360(){const _0x46e07d=['exec','BFF\x20function\x20name\x20to\x20execute','str','24050MMnZNL','6321227lVndZh','params','12XonCrl','95652dGjEzG','50MhrhQs','5703952QSYNqF','1218fKCKPX','16IrrWNH','428684GErKKs','496550pygKeU','BFF\x20executed\x20in\x20','now','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','7102522VWKMmp'];a15_0x5360=function(){return _0x46e07d;};return a15_0x5360();}const a15_0x52b159=a15_0x5615;(function(_0xf30ee9,_0x9e6a4a){const _0x29ec85=a15_0x5615,_0xa78e0a=_0xf30ee9();while(!![]){try{const _0x13b083=-parseInt(_0x29ec85(0x186))/0x1+-parseInt(_0x29ec85(0x185))/0x2*(-parseInt(_0x29ec85(0x17f))/0x3)+parseInt(_0x29ec85(0x182))/0x4+-parseInt(_0x29ec85(0x17c))/0x5*(-parseInt(_0x29ec85(0x183))/0x6)+parseInt(_0x29ec85(0x18a))/0x7+parseInt(_0x29ec85(0x184))/0x8*(-parseInt(_0x29ec85(0x180))/0x9)+-parseInt(_0x29ec85(0x181))/0xa*(parseInt(_0x29ec85(0x17d))/0xb);if(_0x13b083===_0x9e6a4a)break;else _0xa78e0a['push'](_0xa78e0a['shift']());}catch(_0x2efb0f){_0xa78e0a['push'](_0xa78e0a['shift']());}}}(a15_0x5360,0xd7a8d));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a15_0x5615(_0x4984cc,_0x3b5262){_0x4984cc=_0x4984cc-0x17b;const _0x5360dc=a15_0x5360();let _0x5615ea=_0x5360dc[_0x4984cc];return _0x5615ea;}export const bffExec={'service':'bff','command':a15_0x52b159(0x18b),'description':a15_0x52b159(0x189),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x52b159(0x18c)},PARAMS_FLAG],async 'execute'(_0x5497c9){const _0x5eb244=a15_0x52b159,_0x1c7610=parseJsonParams(_0x5497c9[_0x5eb244(0x17b)](_0x5eb244(0x17e))),_0x466bf4=Date[_0x5eb244(0x188)](),_0x372b31=await executeSdkBff(_0x5497c9[_0x5eb244(0x17b)]('name'),_0x1c7610),_0xc36aff=Date[_0x5eb244(0x188)]()-_0x466bf4;return{'ok':!![],'data':{'result':_0x372b31,'elapsed':_0xc36aff},'message':_0x5eb244(0x187)+_0xc36aff+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x86b13a,_0x4561ce){const _0x2b53b3=a16_0x1c12,_0x4ba1ff=_0x86b13a();while(!![]){try{const _0xe2918d=parseInt(_0x2b53b3(0x125))/0x1+-parseInt(_0x2b53b3(0x123))/0x2+-parseInt(_0x2b53b3(0x129))/0x3*(-parseInt(_0x2b53b3(0x124))/0x4)+parseInt(_0x2b53b3(0x127))/0x5+-parseInt(_0x2b53b3(0x126))/0x6*(-parseInt(_0x2b53b3(0x128))/0x7)+-parseInt(_0x2b53b3(0x122))/0x8+parseInt(_0x2b53b3(0x120))/0x9*(-parseInt(_0x2b53b3(0x121))/0xa);if(_0xe2918d===_0x4561ce)break;else _0x4ba1ff['push'](_0x4ba1ff['shift']());}catch(_0x1857a4){_0x4ba1ff['push'](_0x4ba1ff['shift']());}}}(a16_0x2c60,0x654f6));import{bffDetail}from'../../commands/bff/detail.js';function a16_0x1c12(_0x47bd17,_0x3768f9){_0x47bd17=_0x47bd17-0x120;const _0x2c6059=a16_0x2c60();let _0x1c12a9=_0x2c6059[_0x47bd17];return _0x1c12a9;}import{bffExec}from'../../commands/bff/exec.js';function a16_0x2c60(){const _0x283270=['7nuQpOh','426477qXqvHc','1161CAxKgs','105930VgicMS','1765664IpDAzK','100456yGNuuw','12qpWsXn','736HCDpzY','4971138hQRctx','3983315NQysea'];a16_0x2c60=function(){return _0x283270;};return a16_0x2c60();}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a17_0x28b3cd=a17_0x574a;(function(_0x849d8e,_0x5db50f){const _0x5d3e71=a17_0x574a,_0x1a1ea6=_0x849d8e();while(!![]){try{const _0x293916=-parseInt(_0x5d3e71(0x7e))/0x1*(parseInt(_0x5d3e71(0x82))/0x2)+parseInt(_0x5d3e71(0x7a))/0x3+-parseInt(_0x5d3e71(0x84))/0x4+-parseInt(_0x5d3e71(0x89))/0x5*(parseInt(_0x5d3e71(0x8a))/0x6)+parseInt(_0x5d3e71(0x8b))/0x7*(parseInt(_0x5d3e71(0x72))/0x8)+parseInt(_0x5d3e71(0x87))/0x9*(parseInt(_0x5d3e71(0x7d))/0xa)+parseInt(_0x5d3e71(0x73))/0xb*(parseInt(_0x5d3e71(0x8d))/0xc);if(_0x293916===_0x5db50f)break;else _0x1a1ea6['push'](_0x1a1ea6['shift']());}catch(_0x3e653b){_0x1a1ea6['push'](_0x1a1ea6['shift']());}}}(a17_0x5d2f,0x84a42));function a17_0x574a(_0xbad7f1,_0x4190f7){_0xbad7f1=_0xbad7f1-0x71;const _0x5d2f0a=a17_0x5d2f();let _0x574ac6=_0x5d2f0a[_0xbad7f1];return _0x574ac6;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a17_0x28b3cd(0x7b),'command':'install','description':a17_0x28b3cd(0x81),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5093d9){const _0x792600=a17_0x28b3cd;logger[_0x792600(0x74)](process['cwd']()),logger['info'](_0x792600(0x8e),_0x792600(0x7f));const {LOVRABET_SKILL_SOURCE:_0x3c4dd4,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x57bf7e,runNpxSkillsAddGlobal:_0x69f29d}=await import('../../skills/npx-skills-add.js'),_0x270f49=_0x5093d9[_0x792600(0x8c)]?_0x792600(0x86):_0x792600(0x90);console[_0x792600(0x75)](_0x792600(0x80)+_0x3c4dd4+_0x792600(0x7c));const _0x32e1d6=_0x69f29d(process[_0x792600(0x77)](),_0x3c4dd4,{'stdio':_0x270f49});if(_0x32e1d6['skipped'])console[_0x792600(0x75)](_0x792600(0x8f)+_0x57bf7e+_0x792600(0x79));else{if(_0x32e1d6['ok'])console[_0x792600(0x75)](_0x792600(0x83));else throw CliErrors[_0x792600(0x85)](_0x792600(0x78)+(_0x32e1d6[_0x792600(0x76)]||_0x792600(0x71)),_0x792600(0x88)+_0x3c4dd4+'\x20-g\x20-y');}return{'ok':!![]};}}];function a17_0x5d2f(){const _0x33e72a=['Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','50zgmNkT','287214UJMmDI','448yBjQTn','nonInteractive','12rcrQdD','cli-skill-install','Skipped\x20npx\x20(','inherit','unknown','111584KXELqQ','8091061YuHtQS','setLogPath','log','error','cwd','npx\x20skills\x20add\x20failed:\x20','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','1276920LwIhQk','cli-skill','\x20-g\x20-y)...','690sFMkba','150761lyMZQl','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','14esoxvz','CLI\x20Built-in\x20Skill\x20installed','481100PMGTdg','apiError','pipe','18747oenUgW'];a17_0x5d2f=function(){return _0x33e72a;};return a17_0x5d2f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x597766,_0x58c1a9){const _0x2a65bc=a18_0x21af,_0x5ac80b=_0x597766();while(!![]){try{const _0x4ef2e0=parseInt(_0x2a65bc(0xd9))/0x1+-parseInt(_0x2a65bc(0xdf))/0x2*(-parseInt(_0x2a65bc(0xd2))/0x3)+parseInt(_0x2a65bc(0xcc))/0x4*(-parseInt(_0x2a65bc(0xc9))/0x5)+parseInt(_0x2a65bc(0xdc))/0x6*(-parseInt(_0x2a65bc(0xd5))/0x7)+parseInt(_0x2a65bc(0xca))/0x8+parseInt(_0x2a65bc(0xde))/0x9*(parseInt(_0x2a65bc(0xdb))/0xa)+-parseInt(_0x2a65bc(0xce))/0xb;if(_0x4ef2e0===_0x58c1a9)break;else _0x5ac80b['push'](_0x5ac80b['shift']());}catch(_0x40cce2){_0x5ac80b['push'](_0x5ac80b['shift']());}}}(a18_0x5337,0x492e3));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';function a18_0x5337(){const _0xd9dea6=['Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','189485iCTkwh','2830736IQerno','project-default','12mWOiuz','inProject','5715413YXnvxQ','project','global-default','\x20init`\x20first.','3ZWLLqF','validation','\x20found).','7wpJaaf','Add\x20--global\x20to\x20write\x20to\x20~/','newConfigFileName',',\x20or\x20run\x20`','483473AVgVKT','global','10kEQzaG','3084558Xuqtpn','Use\x20only\x20one\x20config\x20scope\x20flag.','1989576qKhyZK','777470mZlUza'];a18_0x5337=function(){return _0xd9dea6;};return a18_0x5337();}function a18_0x21af(_0x1567a2,_0x236c48){_0x1567a2=_0x1567a2-0xc9;const _0x533708=a18_0x5337();let _0x21afe3=_0x533708[_0x1567a2];return _0x21afe3;}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(_0x3ed202){const _0x1231c8=a18_0x21af,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x10b187}=_0x3ed202;if(explicitGlobal&&explicitProject)throw CliErrors[_0x1231c8(0xd3)](_0x1231c8(0xe0),_0x1231c8(0xdd));if(explicitGlobal)return'global';if(explicitProject)return _0x1231c8(0xcf);switch(_0x10b187){case _0x1231c8(0xd0):return'global';case _0x1231c8(0xcb):return _0x3ed202[_0x1231c8(0xcd)]??isInProject()?_0x1231c8(0xcf):_0x1231c8(0xda);case'project-or-global-explicit':if(!(_0x3ed202[_0x1231c8(0xcd)]??isInProject()))throw CliErrors[_0x1231c8(0xd3)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x1231c8(0xd7)]+_0x1231c8(0xd4),_0x1231c8(0xd6)+PRODUCT_CONFIG[_0x1231c8(0xd7)]+_0x1231c8(0xd8)+CLI_BIN_NAME+_0x1231c8(0xd1));return _0x1231c8(0xcf);}}export function toScopeFlags(_0x404cc8){const _0x401757=a18_0x21af;return{'global':_0x404cc8===_0x401757(0xda)};}export function formatScopeLabel(_0x358030){return _0x358030==='global'?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xf0c26b,_0x1e40e4){const _0x4c5e6d=a19_0x2b39,_0x4aff86=_0xf0c26b();while(!![]){try{const _0x5b5d49=-parseInt(_0x4c5e6d(0x176))/0x1+parseInt(_0x4c5e6d(0x184))/0x2*(-parseInt(_0x4c5e6d(0x181))/0x3)+parseInt(_0x4c5e6d(0x170))/0x4+-parseInt(_0x4c5e6d(0x186))/0x5+parseInt(_0x4c5e6d(0x183))/0x6+parseInt(_0x4c5e6d(0x16e))/0x7+parseInt(_0x4c5e6d(0x172))/0x8;if(_0x5b5d49===_0x1e40e4)break;else _0x4aff86['push'](_0x4aff86['shift']());}catch(_0x593afb){_0x4aff86['push'](_0x4aff86['shift']());}}}(a19_0xdcc3,0x4a988));import{CliErrors}from'../../errors.js';function isSet(_0x2ef616,_0x3ca99e){const _0x5e335f=a19_0x2b39,_0xd6337a=_0x2ef616[_0x5e335f(0x17d)](_0x3ca99e);return _0xd6337a!==undefined&&_0xd6337a!==''&&_0xd6337a!==![]&&_0xd6337a!==0x0;}function fmtNames(_0x32aa2f){const _0x413cc7=a19_0x2b39;return _0x32aa2f[_0x413cc7(0x16f)](_0x193664=>'--'+_0x193664)[_0x413cc7(0x17f)](',\x20');}export function requireOneOf(_0x22ce93,_0x50276e,_0x2fdc8d){const _0x586ed8=a19_0x2b39,_0x42c0af=_0x50276e[_0x586ed8(0x185)](_0x229edd=>isSet(_0x22ce93,_0x229edd));if(_0x42c0af[_0x586ed8(0x180)]!==0x1)throw CliErrors[_0x586ed8(0x175)](_0x42c0af[_0x586ed8(0x180)]===0x0?_0x586ed8(0x174)+fmtNames(_0x50276e)+_0x586ed8(0x179)+_0x2fdc8d+'`.':_0x586ed8(0x17b)+fmtNames(_0x50276e)+_0x586ed8(0x182)+fmtNames(_0x42c0af)+'.',_0x42c0af['length']===0x0?_0x586ed8(0x16d)+fmtNames(_0x50276e):_0x586ed8(0x16c));}export function requireAnyOf(_0x22aa79,_0x37d332,_0x2964f3){const _0xddc696=a19_0x2b39;if(!_0x37d332[_0xddc696(0x17a)](_0x3a0c5d=>isSet(_0x22aa79,_0x3a0c5d)))throw CliErrors[_0xddc696(0x175)](_0xddc696(0x171)+fmtNames(_0x37d332)+_0xddc696(0x179)+_0x2964f3+'`.',_0xddc696(0x16d)+fmtNames(_0x37d332));}export function mutuallyExclusive(_0x18ce5e,_0x279425,_0x646a0){const _0x5c0287=a19_0x2b39,_0x3a09e7=_0x279425['filter'](_0x594a64=>isSet(_0x18ce5e,_0x594a64));if(_0x3a09e7[_0x5c0287(0x180)]>0x1)throw CliErrors[_0x5c0287(0x175)](_0x5c0287(0x17e)+fmtNames(_0x3a09e7)+_0x5c0287(0x173)+_0x646a0+'`.',_0x5c0287(0x17c)+fmtNames(_0x279425));}export function validatePattern(_0x24cf45,_0xa8baa3,_0x3d5c7e,_0x57d4da){const _0x19dc8d=a19_0x2b39,_0x8ab4c5=_0x24cf45[_0x19dc8d(0x178)](_0xa8baa3);if(_0x8ab4c5&&!_0x3d5c7e['test'](_0x8ab4c5))throw CliErrors['validation'](_0x19dc8d(0x177)+_0xa8baa3+':\x20expected\x20'+_0x57d4da+',\x20got\x20\x22'+_0x8ab4c5+'\x22.');}function a19_0x2b39(_0x58166e,_0x93e141){_0x58166e=_0x58166e-0x16c;const _0xdcc334=a19_0xdcc3();let _0x2b39b5=_0xdcc334[_0x58166e];return _0x2b39b5;}function a19_0xdcc3(){const _0x4a4a96=['join','length','141ssrKAX','\x20is\x20allowed,\x20found:\x20','1052166aOmDwh','6052jxItqp','filter','2399290gZnWMF','Remove\x20all\x20but\x20one.','Provide\x20one\x20of:\x20','1634346jTJaJO','map','904448dwtnxh','At\x20least\x20one\x20of\x20','3175928TbZJRo','\x20are\x20mutually\x20exclusive\x20for\x20`','Exactly\x20one\x20of\x20','validation','104318aXmvrC','Invalid\x20--','str','\x20is\x20required\x20for\x20`','some','Only\x20one\x20of\x20','Use\x20only\x20one\x20of:\x20','flag','Flags\x20'];a19_0xdcc3=function(){return _0x4a4a96;};return a19_0xdcc3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x1ab21f=a20_0x181c;function a20_0x181c(_0x16175d,_0x4f4adb){_0x16175d=_0x16175d-0xd2;const _0x315e50=a20_0x315e();let _0x181c34=_0x315e50[_0x16175d];return _0x181c34;}(function(_0x4354d0,_0x36329c){const _0x289970=a20_0x181c,_0x57a316=_0x4354d0();while(!![]){try{const _0x21e810=-parseInt(_0x289970(0xd8))/0x1*(-parseInt(_0x289970(0xd7))/0x2)+-parseInt(_0x289970(0xdc))/0x3*(parseInt(_0x289970(0xe3))/0x4)+-parseInt(_0x289970(0xd5))/0x5*(-parseInt(_0x289970(0xe5))/0x6)+parseInt(_0x289970(0xdd))/0x7+-parseInt(_0x289970(0xe8))/0x8*(-parseInt(_0x289970(0xe4))/0x9)+-parseInt(_0x289970(0xd6))/0xa*(parseInt(_0x289970(0xe2))/0xb)+-parseInt(_0x289970(0xd4))/0xc;if(_0x21e810===_0x36329c)break;else _0x57a316['push'](_0x57a316['shift']());}catch(_0x5d2c6d){_0x57a316['push'](_0x57a316['shift']());}}}(a20_0x315e,0xefe41));function a20_0x315e(){const _0x5ade74=['Return\x20full\x20raw\x20response\x20object','name','1676064FPneuw','288885PRtFZG','3850mOrAku','2dRtduO','1134505gYSshv','Resource\x20ID','code','boolean','822efgvfX','12388838wqoiPb','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Dataset\x20code\x20(32-char\x20hex\x20UUID)','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','Resource\x20name\x20for\x20lookup','48961MmFpLo','28228GOGZor','36xYydmd','186qRNzwb','verbose','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','148184kRphcc','string','sqlcode'];a20_0x315e=function(){return _0x5ade74;};return a20_0x315e();}export const CODE_FLAG={'name':a20_0x1ab21f(0xda),'type':a20_0x1ab21f(0xe9),'required':!![],'description':a20_0x1ab21f(0xdf),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a20_0x1ab21f(0xea),'type':a20_0x1ab21f(0xe9),'required':!![],'description':a20_0x1ab21f(0xde),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a20_0x1ab21f(0xe7)}};export const VERBOSE_FLAG={'name':a20_0x1ab21f(0xe6),'type':a20_0x1ab21f(0xdb),'description':a20_0x1ab21f(0xd2)};export const PARAMS_FLAG={'name':'params','type':a20_0x1ab21f(0xe9),'description':a20_0x1ab21f(0xe0)};export const NAME_FLAG={'name':a20_0x1ab21f(0xd3),'type':a20_0x1ab21f(0xe9),'description':a20_0x1ab21f(0xe1)};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a20_0x1ab21f(0xd9)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5749fc,_0x258249){const _0x3eb466=a21_0x3205,_0xd15352=_0x5749fc();while(!![]){try{const _0x321d66=parseInt(_0x3eb466(0x197))/0x1*(-parseInt(_0x3eb466(0x191))/0x2)+parseInt(_0x3eb466(0x19a))/0x3+-parseInt(_0x3eb466(0x199))/0x4*(parseInt(_0x3eb466(0x18a))/0x5)+parseInt(_0x3eb466(0x192))/0x6*(-parseInt(_0x3eb466(0x196))/0x7)+parseInt(_0x3eb466(0x18d))/0x8*(-parseInt(_0x3eb466(0x18b))/0x9)+parseInt(_0x3eb466(0x18c))/0xa*(parseInt(_0x3eb466(0x193))/0xb)+parseInt(_0x3eb466(0x195))/0xc*(parseInt(_0x3eb466(0x189))/0xd);if(_0x321d66===_0x258249)break;else _0xd15352['push'](_0xd15352['shift']());}catch(_0x156db1){_0xd15352['push'](_0xd15352['shift']());}}}(a21_0x2bfb,0x4f1c3));function a21_0x2bfb(){const _0xfc6376=['26364enpROC','28605dgAHSh','9GSdXuE','6220DLkfIq','2646824qHeRmO','isFile','trim','validation','14140PRSbAF','3551466EddNsh','451wOTvDd','File\x20not\x20found:\x20','9528BjIOUm','7kzxque','1iRyBAE','size','440GWKzpI','742335RVkXez','File\x20is\x20not\x20a\x20regular\x20file:\x20','\x20MB','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20'];a21_0x2bfb=function(){return _0xfc6376;};return a21_0x2bfb();}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a21_0x3205(_0x35fd1b,_0x20b5e6){_0x35fd1b=_0x35fd1b-0x189;const _0x2bfbee=a21_0x2bfb();let _0x320588=_0x2bfbee[_0x35fd1b];return _0x320588;}const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x198031){const _0x13ddbe=a21_0x3205;if(_0x198031>=BYTES_PER_MB){const _0x4c3016=Math['ceil'](_0x198031/BYTES_PER_MB*0x64)/0x64;return _0x4c3016['toFixed'](0x2)+_0x13ddbe(0x19c);}return _0x198031+'\x20B';}export function requireRuntimeUploadFile(_0x150860,_0x1a3721){const _0x28de8a=a21_0x3205,_0x46fd7b=_0x150860[_0x28de8a(0x18f)]();if(!_0x46fd7b)throw CliErrors[_0x28de8a(0x190)](_0x1a3721+'\x20path\x20is\x20required.');if(!existsSync(_0x46fd7b))throw CliErrors[_0x28de8a(0x190)](_0x28de8a(0x194)+_0x46fd7b);const _0xdd2d6c=statSync(_0x46fd7b);if(!_0xdd2d6c[_0x28de8a(0x18e)]())throw CliErrors[_0x28de8a(0x190)](_0x28de8a(0x19b)+_0x46fd7b);if(_0xdd2d6c[_0x28de8a(0x198)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x28de8a(0x19d)+_0x46fd7b+'\x20('+formatBytes(_0xdd2d6c['size'])+')');return{'path':_0x46fd7b,'size':_0xdd2d6c['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0xb6dd9b=a22_0x1a0d;function a22_0x1a0d(_0x598b86,_0x55f14f){_0x598b86=_0x598b86-0x173;const _0xafd7f5=a22_0xafd7();let _0x1a0dc8=_0xafd7f5[_0x598b86];return _0x1a0dc8;}(function(_0x5a0a8a,_0x29da74){const _0x25c939=a22_0x1a0d,_0x3e456b=_0x5a0a8a();while(!![]){try{const _0x15cb77=parseInt(_0x25c939(0x180))/0x1*(parseInt(_0x25c939(0x1a5))/0x2)+-parseInt(_0x25c939(0x173))/0x3*(parseInt(_0x25c939(0x19e))/0x4)+-parseInt(_0x25c939(0x1af))/0x5*(-parseInt(_0x25c939(0x17a))/0x6)+-parseInt(_0x25c939(0x17d))/0x7+parseInt(_0x25c939(0x18e))/0x8+-parseInt(_0x25c939(0x1a9))/0x9*(parseInt(_0x25c939(0x1a6))/0xa)+-parseInt(_0x25c939(0x19a))/0xb*(-parseInt(_0x25c939(0x17e))/0xc);if(_0x15cb77===_0x29da74)break;else _0x3e456b['push'](_0x3e456b['shift']());}catch(_0x497a46){_0x3e456b['push'](_0x3e456b['shift']());}}}(a22_0xafd7,0x53c17));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a22_0xb6dd9b(0x19d),'type':'boolean','description':a22_0xb6dd9b(0x193),'default':![]};function parseAliasAppcodeSetKey(_0x1f69c3){const _0x258c87=a22_0xb6dd9b,_0x2b57f3=_0x1f69c3['split']('.');if(_0x2b57f3['length']!==0x3||_0x2b57f3[0x0]!=='apps'||_0x2b57f3[0x2]!=='appcode')return undefined;const _0x23d1e6=_0x2b57f3[0x1]?.[_0x258c87(0x1b4)]();return _0x23d1e6?_0x23d1e6:undefined;}function parseAliasDeleteKey(_0x398cc0){const _0x151b49=a22_0xb6dd9b,_0x452c4f=_0x398cc0[_0x151b49(0x1ad)]('.');if(_0x452c4f['length']===0x2&&_0x452c4f[0x0]==='apps'){const _0x55c2ec=_0x452c4f[0x1]?.[_0x151b49(0x1b4)]();return _0x55c2ec?{'alias':_0x55c2ec}:undefined;}if(_0x452c4f[_0x151b49(0x1a2)]===0x3&&_0x452c4f[0x0]===_0x151b49(0x18c)&&_0x452c4f[0x2]===_0x151b49(0x196)){const _0x271248=_0x452c4f[0x1]?.[_0x151b49(0x1b4)]();return _0x271248?{'alias':_0x271248,'field':_0x151b49(0x196)}:undefined;}return undefined;}function setLocalAppAlias(_0x1b9df2,_0x5031fe,_0x2779d7){const _0x126872=a22_0xb6dd9b,_0x2106bf=_0x1b9df2[_0x126872(0x18c)]&&typeof _0x1b9df2['apps']===_0x126872(0x183)&&!Array[_0x126872(0x1b1)](_0x1b9df2[_0x126872(0x18c)])?_0x1b9df2[_0x126872(0x18c)]:{},_0x5552b2=_0x2106bf[_0x5031fe]&&typeof _0x2106bf[_0x5031fe]===_0x126872(0x183)&&!Array[_0x126872(0x1b1)](_0x2106bf[_0x5031fe])?_0x2106bf[_0x5031fe]:{};_0x5552b2[_0x126872(0x196)]=_0x2779d7,_0x2106bf[_0x5031fe]=_0x5552b2,_0x1b9df2['apps']=_0x2106bf;}function a22_0xafd7(){const _0x25465d=['Usage:\x20','list','\x22\x20not\x20found\x20at\x20top\x20level.','pageSize','\x20\x20global:\x20\x20','apps','\x22\x20is\x20not\x20settable.','4201824ddlKKs','Top-level\x20key\x20\x22','pageSize\x20must\x20be\x20a\x20positive\x20number','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','project-or-global-explicit','Write\x20to\x20global\x20config','keys','Value\x20to\x20assign','appcode','Key\x20\x22','\x20config\x20set\x20<key>\x20<value>\x20[--global]','\x20config\x20get\x20<key>','11BtQBSM','../../context.js','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','global','28sVQcEl','bool','key','Set\x20a\x20config\x20value','length','log','Set\x20`','48206Ewuheh','290AlXHJn','\x20config\x20delete\x20<key>\x20[--global]','read','135693EgNIdN','\x20\x20project:\x20','includes','(none)','split','value','5PVjqRc','write','isArray','\x20(global)','field','trim','alias','\x22.\x20Allowed:\x20','args','47694uwHkoR','Deleted\x20`','config','List\x20current\x20config','Key\x20not\x20found:\x20','`\x20=\x20\x22','Missing\x20key\x20or\x20value.','790710HMFkue','riskLevel','raw','3132640fcvwwr','954168yOXIUV','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','25aWwhwH','delete','stringify','object','validation','Config\x20files:\x0a','join'];a22_0xafd7=function(){return _0x25465d;};return a22_0xafd7();}function deleteLocalAppAlias(_0x518d2e,_0x1c5859){const _0x1bfd9a=a22_0xb6dd9b;if(!_0x518d2e['apps']||typeof _0x518d2e[_0x1bfd9a(0x18c)]!=='object'||Array[_0x1bfd9a(0x1b1)](_0x518d2e['apps']))return![];const _0x840260=_0x518d2e[_0x1bfd9a(0x18c)],_0x283f7d=_0x840260[_0x1c5859[_0x1bfd9a(0x1b5)]];if(!_0x283f7d||typeof _0x283f7d!==_0x1bfd9a(0x183)||Array['isArray'](_0x283f7d))return![];if(!_0x1c5859[_0x1bfd9a(0x1b3)])return delete _0x840260[_0x1c5859[_0x1bfd9a(0x1b5)]],!![];if(!(_0x1c5859['field']in _0x283f7d))return![];return delete _0x283f7d[_0x1c5859[_0x1bfd9a(0x1b3)]],Object[_0x1bfd9a(0x194)](_0x283f7d)[_0x1bfd9a(0x1a2)]===0x0&&delete _0x840260[_0x1c5859[_0x1bfd9a(0x1b5)]],!![];}const listDef={'service':a22_0xb6dd9b(0x175),'command':a22_0xb6dd9b(0x188),'description':a22_0xb6dd9b(0x176),'risk':a22_0xb6dd9b(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x291926){const _0x19e0ef=a22_0xb6dd9b,{buildConfigFromFlags:_0x168ca8}=await import(_0x19e0ef(0x19b)),_0x5bacce=_0x168ca8({}),_0x27d8f8=getProjectConfigPath(),_0x5add93=resolveWriteConfigPath('global');if(_0x291926['format']==='pretty')return{'ok':!![],'message':_0x19e0ef(0x19c)+(JSON[_0x19e0ef(0x182)](_0x5bacce[_0x19e0ef(0x17c)],null,0x2)+'\x0a\x0a')+_0x19e0ef(0x185)+(_0x19e0ef(0x1aa)+(_0x27d8f8??_0x19e0ef(0x1ac))+'\x0a')+(_0x19e0ef(0x18b)+_0x5add93)};return{'ok':!![],'data':{'effective':_0x5bacce[_0x19e0ef(0x17c)],'configFiles':{'project':_0x27d8f8??null,'global':_0x5add93}}};}},getDef={'service':'config','command':'get','description':'Get\x20a\x20config\x20value','risk':a22_0xb6dd9b(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0xb6dd9b(0x1a0),'description':a22_0xb6dd9b(0x191),'required':!![]}],'flags':[],async 'execute'(_0x543962){const _0x4c5810=a22_0xb6dd9b,_0x57faa4=_0x543962[_0x4c5810(0x1b7)][0x0];if(!_0x57faa4)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x4c5810(0x187)+CLI_BIN_NAME+_0x4c5810(0x199));const {buildConfigFromFlags:_0x34b940}=await import(_0x4c5810(0x19b)),{raw:_0x3f3a2a}=_0x34b940({});if(_0x57faa4[_0x4c5810(0x1ab)]('.')){const _0x143f05=_0x57faa4[_0x4c5810(0x1ad)]('.');let _0x5705a5=_0x3f3a2a;for(const _0x4a2f73 of _0x143f05){if(_0x5705a5==null||typeof _0x5705a5!==_0x4c5810(0x183))throw CliErrors[_0x4c5810(0x184)](_0x4c5810(0x177)+_0x57faa4);_0x5705a5=_0x5705a5[_0x4a2f73];}if(_0x5705a5===undefined)throw CliErrors[_0x4c5810(0x184)]('Key\x20not\x20found:\x20'+_0x57faa4);return console[_0x4c5810(0x1a3)](typeof _0x5705a5===_0x4c5810(0x183)?JSON[_0x4c5810(0x182)](_0x5705a5,null,0x2):String(_0x5705a5)),{'ok':!![]};}const _0x734735=_0x3f3a2a[_0x57faa4];if(_0x734735===undefined)throw CliErrors[_0x4c5810(0x184)](_0x4c5810(0x177)+_0x57faa4);return console[_0x4c5810(0x1a3)](typeof _0x734735===_0x4c5810(0x183)?JSON['stringify'](_0x734735,null,0x2):String(_0x734735)),{'ok':!![]};}},setDef={'service':a22_0xb6dd9b(0x175),'command':'set','description':a22_0xb6dd9b(0x1a1),'risk':a22_0xb6dd9b(0x1b0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0xb6dd9b(0x1ae),'description':a22_0xb6dd9b(0x195),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x226c36){const _0x58b3a4=a22_0xb6dd9b,_0x411d62=_0x226c36[_0x58b3a4(0x1b7)][0x0],_0x195f66=_0x226c36[_0x58b3a4(0x1b7)][0x1];if(!_0x411d62||_0x195f66===undefined)throw CliErrors['validation'](_0x58b3a4(0x179),_0x58b3a4(0x187)+CLI_BIN_NAME+_0x58b3a4(0x198));if(ENUM_KEYS[_0x411d62]&&!ENUM_KEYS[_0x411d62]['includes'](_0x195f66))throw CliErrors[_0x58b3a4(0x184)]('Invalid\x20value\x20for\x20\x22'+_0x411d62+_0x58b3a4(0x1b6)+ENUM_KEYS[_0x411d62][_0x58b3a4(0x186)](',\x20'));if(_0x411d62===_0x58b3a4(0x17b))throw CliErrors[_0x58b3a4(0x184)](_0x58b3a4(0x17f));if(_0x411d62===_0x58b3a4(0x18a)){const _0x5dd2d8=Number(_0x195f66);if(isNaN(_0x5dd2d8)||_0x5dd2d8<=0x0)throw CliErrors['validation'](_0x58b3a4(0x190));}const _0x4a1c02=resolveWriteScope({'explicitGlobal':_0x226c36[_0x58b3a4(0x19f)](_0x58b3a4(0x19d)),'policy':_0x58b3a4(0x192)}),_0x5cf7ca=toScopeFlags(_0x4a1c02),_0x4fe609=readScopedConfig(_0x5cf7ca),_0x3db586=parseAliasAppcodeSetKey(_0x411d62);if(!_0x3db586&&!isTopLevelConfigKey(_0x411d62))throw CliErrors[_0x58b3a4(0x184)](_0x58b3a4(0x18f)+_0x411d62+_0x58b3a4(0x18d),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x3db586?setLocalAppAlias(_0x4fe609,_0x3db586,_0x195f66):_0x4fe609[_0x411d62]=_0x411d62===_0x58b3a4(0x18a)?Number(_0x195f66):_0x195f66,console[_0x58b3a4(0x1a3)](_0x58b3a4(0x1a4)+_0x411d62+_0x58b3a4(0x178)+_0x195f66+'\x22'+(_0x4a1c02===_0x58b3a4(0x19d)?_0x58b3a4(0x1b2):'')),writeScopedConfig(_0x4fe609,_0x5cf7ca),{'ok':!![]};}},deleteDef={'service':'config','command':a22_0xb6dd9b(0x181),'description':'Delete\x20a\x20config\x20value','risk':a22_0xb6dd9b(0x1b0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0xb6dd9b(0x1a0),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x589d39){const _0x2c886c=a22_0xb6dd9b,_0x358c1e=_0x589d39[_0x2c886c(0x1b7)][0x0];if(!_0x358c1e)throw CliErrors[_0x2c886c(0x184)]('Missing\x20key\x20argument.',_0x2c886c(0x187)+CLI_BIN_NAME+_0x2c886c(0x1a7));const _0x5bb3b5=resolveWriteScope({'explicitGlobal':_0x589d39['bool'](_0x2c886c(0x19d)),'policy':_0x2c886c(0x192)}),_0x440ec2=toScopeFlags(_0x5bb3b5),_0x1ac0a7=readScopedConfig(_0x440ec2),_0x44f3bc=parseAliasDeleteKey(_0x358c1e);if(_0x44f3bc){if(!deleteLocalAppAlias(_0x1ac0a7,_0x44f3bc))throw CliErrors['validation'](_0x2c886c(0x177)+_0x358c1e);return console[_0x2c886c(0x1a3)](_0x2c886c(0x174)+_0x358c1e+'`'+(_0x5bb3b5===_0x2c886c(0x19d)?_0x2c886c(0x1b2):'')),writeScopedConfig(_0x1ac0a7,_0x440ec2),{'ok':!![]};}if(_0x1ac0a7[_0x358c1e]===undefined)throw CliErrors['validation'](_0x2c886c(0x197)+_0x358c1e+_0x2c886c(0x189));return delete _0x1ac0a7[_0x358c1e],console['log'](_0x2c886c(0x174)+_0x358c1e+'`'+(_0x5bb3b5===_0x2c886c(0x19d)?_0x2c886c(0x1b2):'')),writeScopedConfig(_0x1ac0a7,_0x440ec2),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x265ac7=a22_0x552a;(function(_0x4faa01,_0x4f9e46){const _0x181b29=a22_0x552a,_0x55d2ba=_0x4faa01();while(!![]){try{const _0x3e4ea4=parseInt(_0x181b29(0x1d0))/0x1*(parseInt(_0x181b29(0x1d8))/0x2)+parseInt(_0x181b29(0x1d6))/0x3*(parseInt(_0x181b29(0x1ea))/0x4)+parseInt(_0x181b29(0x1b7))/0x5*(parseInt(_0x181b29(0x1da))/0x6)+parseInt(_0x181b29(0x1f0))/0x7*(-parseInt(_0x181b29(0x1e4))/0x8)+parseInt(_0x181b29(0x1db))/0x9+parseInt(_0x181b29(0x1c2))/0xa+-parseInt(_0x181b29(0x1e7))/0xb*(parseInt(_0x181b29(0x1c8))/0xc);if(_0x3e4ea4===_0x4f9e46)break;else _0x55d2ba['push'](_0x55d2ba['shift']());}catch(_0x3afeba){_0x55d2ba['push'](_0x55d2ba['shift']());}}}(a22_0x4567,0x3cffa));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a22_0x265ac7(0x1c5),'type':a22_0x265ac7(0x1e8),'description':a22_0x265ac7(0x1ee),'default':![]};function a22_0x4567(){const _0x50dae9=['#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x20\x20project:\x20','50KtFius','bool','apps','project-or-global-explicit','pageSize','Config\x20files:\x0a','409731wbsWkU','keys','4336pUAhgM','trim','126kdIYuR','290619HWxuXj','format','Key\x20not\x20found:\x20','object','Deleted\x20`','\x22\x20is\x20not\x20settable.','\x20config\x20get\x20<key>','riskLevel','Set\x20a\x20config\x20value','1409056yhlHzi','\x20config\x20set\x20<key>\x20<value>\x20[--global]','appcode','253lXjGzX','boolean','Top-level\x20key\x20\x22','12VJOlRz','join',';\x20apps.<alias>.appcode','\x22.\x20Allowed:\x20','Write\x20to\x20global\x20config','Key\x20\x22','7vGxdSj','length','field','Invalid\x20value\x20for\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','list','config','key','List\x20current\x20config','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20\x20global:\x20\x20','isArray','(none)','5080RTMGhy','write','value','Usage:\x20','Get\x20a\x20config\x20value','includes','pretty','args','log','set','\x20(global)','479530FHytyn','`\x20=\x20\x22','split','global','validation','../../context.js','101076YOSAKp','Missing\x20key\x20or\x20value.','pageSize\x20must\x20be\x20a\x20positive\x20number','stringify','delete','alias'];a22_0x4567=function(){return _0x50dae9;};return a22_0x4567();}function a22_0x552a(_0x50ad95,_0x3a4b17){_0x50ad95=_0x50ad95-0x1ad;const _0x4567ec=a22_0x4567();let _0x552aab=_0x4567ec[_0x50ad95];return _0x552aab;}function parseAliasAppcodeSetKey(_0x29f39d){const _0x3845cf=a22_0x265ac7,_0x20fb95=_0x29f39d[_0x3845cf(0x1c4)]('.');if(_0x20fb95['length']!==0x3||_0x20fb95[0x0]!==_0x3845cf(0x1d2)||_0x20fb95[0x2]!==_0x3845cf(0x1e6))return undefined;const _0x332647=_0x20fb95[0x1]?.[_0x3845cf(0x1d9)]();return _0x332647?_0x332647:undefined;}function parseAliasDeleteKey(_0x186891){const _0xe2cbd4=a22_0x265ac7,_0x1522e3=_0x186891[_0xe2cbd4(0x1c4)]('.');if(_0x1522e3[_0xe2cbd4(0x1f1)]===0x2&&_0x1522e3[0x0]===_0xe2cbd4(0x1d2)){const _0x215de0=_0x1522e3[0x1]?.[_0xe2cbd4(0x1d9)]();return _0x215de0?{'alias':_0x215de0}:undefined;}if(_0x1522e3[_0xe2cbd4(0x1f1)]===0x3&&_0x1522e3[0x0]===_0xe2cbd4(0x1d2)&&_0x1522e3[0x2]===_0xe2cbd4(0x1e6)){const _0x2940aa=_0x1522e3[0x1]?.[_0xe2cbd4(0x1d9)]();return _0x2940aa?{'alias':_0x2940aa,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x45f1a0,_0x56c8d3,_0x37532b){const _0x5d2cb8=a22_0x265ac7,_0x1f4cb8=_0x45f1a0[_0x5d2cb8(0x1d2)]&&typeof _0x45f1a0[_0x5d2cb8(0x1d2)]===_0x5d2cb8(0x1de)&&!Array['isArray'](_0x45f1a0[_0x5d2cb8(0x1d2)])?_0x45f1a0[_0x5d2cb8(0x1d2)]:{},_0x353854=_0x1f4cb8[_0x56c8d3]&&typeof _0x1f4cb8[_0x56c8d3]==='object'&&!Array[_0x5d2cb8(0x1b5)](_0x1f4cb8[_0x56c8d3])?_0x1f4cb8[_0x56c8d3]:{};_0x353854[_0x5d2cb8(0x1e6)]=_0x37532b,_0x1f4cb8[_0x56c8d3]=_0x353854,_0x45f1a0[_0x5d2cb8(0x1d2)]=_0x1f4cb8;}function deleteLocalAppAlias(_0x42ebf0,_0x4b335e){const _0x4e8285=a22_0x265ac7;if(!_0x42ebf0[_0x4e8285(0x1d2)]||typeof _0x42ebf0[_0x4e8285(0x1d2)]!==_0x4e8285(0x1de)||Array['isArray'](_0x42ebf0[_0x4e8285(0x1d2)]))return![];const _0x415f35=_0x42ebf0[_0x4e8285(0x1d2)],_0x5a99bc=_0x415f35[_0x4b335e['alias']];if(!_0x5a99bc||typeof _0x5a99bc!==_0x4e8285(0x1de)||Array[_0x4e8285(0x1b5)](_0x5a99bc))return![];if(!_0x4b335e[_0x4e8285(0x1f2)])return delete _0x415f35[_0x4b335e[_0x4e8285(0x1cd)]],!![];if(!(_0x4b335e['field']in _0x5a99bc))return![];return delete _0x5a99bc[_0x4b335e[_0x4e8285(0x1f2)]],Object[_0x4e8285(0x1d7)](_0x5a99bc)[_0x4e8285(0x1f1)]===0x0&&delete _0x415f35[_0x4b335e[_0x4e8285(0x1cd)]],!![];}const listDef={'service':'config','command':a22_0x265ac7(0x1af),'description':a22_0x265ac7(0x1b2),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x214f7f){const _0x3f69a9=a22_0x265ac7,{buildConfigFromFlags:_0x40a759}=await import(_0x3f69a9(0x1c7)),_0x48959b=_0x40a759({}),_0x1dbd78=getProjectConfigPath(),_0x336e55=resolveWriteConfigPath(_0x3f69a9(0x1c5));if(_0x214f7f[_0x3f69a9(0x1dc)]===_0x3f69a9(0x1bd))return{'ok':!![],'message':_0x3f69a9(0x1ce)+(JSON[_0x3f69a9(0x1cb)](_0x48959b['raw'],null,0x2)+'\x0a\x0a')+_0x3f69a9(0x1d5)+(_0x3f69a9(0x1cf)+(_0x1dbd78??_0x3f69a9(0x1b6))+'\x0a')+(_0x3f69a9(0x1b4)+_0x336e55)};return{'ok':!![],'data':{'effective':_0x48959b['raw'],'configFiles':{'project':_0x1dbd78??null,'global':_0x336e55}}};}},getDef={'service':a22_0x265ac7(0x1b0),'command':'get','description':a22_0x265ac7(0x1bb),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x4debe0){const _0x3cfa32=a22_0x265ac7,_0x2ad38b=_0x4debe0[_0x3cfa32(0x1be)][0x0];if(!_0x2ad38b)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x3cfa32(0x1ba)+CLI_BIN_NAME+_0x3cfa32(0x1e1));const {buildConfigFromFlags:_0x1fa29c}=await import(_0x3cfa32(0x1c7)),{raw:_0x3493e7}=_0x1fa29c({});if(_0x2ad38b[_0x3cfa32(0x1bc)]('.')){const _0x1e77f3=_0x2ad38b[_0x3cfa32(0x1c4)]('.');let _0x1ff714=_0x3493e7;for(const _0xb20023 of _0x1e77f3){if(_0x1ff714==null||typeof _0x1ff714!==_0x3cfa32(0x1de))throw CliErrors[_0x3cfa32(0x1c6)](_0x3cfa32(0x1dd)+_0x2ad38b);_0x1ff714=_0x1ff714[_0xb20023];}if(_0x1ff714===undefined)throw CliErrors[_0x3cfa32(0x1c6)](_0x3cfa32(0x1dd)+_0x2ad38b);return console[_0x3cfa32(0x1bf)](typeof _0x1ff714===_0x3cfa32(0x1de)?JSON['stringify'](_0x1ff714,null,0x2):String(_0x1ff714)),{'ok':!![]};}const _0x3d4971=_0x3493e7[_0x2ad38b];if(_0x3d4971===undefined)throw CliErrors[_0x3cfa32(0x1c6)](_0x3cfa32(0x1dd)+_0x2ad38b);return console[_0x3cfa32(0x1bf)](typeof _0x3d4971==='object'?JSON[_0x3cfa32(0x1cb)](_0x3d4971,null,0x2):String(_0x3d4971)),{'ok':!![]};}},setDef={'service':a22_0x265ac7(0x1b0),'command':a22_0x265ac7(0x1c0),'description':a22_0x265ac7(0x1e3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x265ac7(0x1b1),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x265ac7(0x1b9),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0xaba2f7){const _0x3c244c=a22_0x265ac7,_0x224252=_0xaba2f7[_0x3c244c(0x1be)][0x0],_0x404bb8=_0xaba2f7[_0x3c244c(0x1be)][0x1];if(!_0x224252||_0x404bb8===undefined)throw CliErrors[_0x3c244c(0x1c6)](_0x3c244c(0x1c9),_0x3c244c(0x1ba)+CLI_BIN_NAME+_0x3c244c(0x1e5));if(ENUM_KEYS[_0x224252]&&!ENUM_KEYS[_0x224252]['includes'](_0x404bb8))throw CliErrors['validation'](_0x3c244c(0x1ad)+_0x224252+_0x3c244c(0x1ed)+ENUM_KEYS[_0x224252][_0x3c244c(0x1eb)](',\x20'));if(_0x224252===_0x3c244c(0x1e2))throw CliErrors['validation'](_0x3c244c(0x1b3));if(_0x224252===_0x3c244c(0x1d4)){const _0xc43d42=Number(_0x404bb8);if(isNaN(_0xc43d42)||_0xc43d42<=0x0)throw CliErrors[_0x3c244c(0x1c6)](_0x3c244c(0x1ca));}const _0x957dee=resolveWriteScope({'explicitGlobal':_0xaba2f7[_0x3c244c(0x1d1)](_0x3c244c(0x1c5)),'policy':_0x3c244c(0x1d3)}),_0x55468e=toScopeFlags(_0x957dee),_0x37e8ee=readScopedConfig(_0x55468e),_0x3b437f=parseAliasAppcodeSetKey(_0x224252);if(!_0x3b437f&&!isTopLevelConfigKey(_0x224252))throw CliErrors[_0x3c244c(0x1c6)](_0x3c244c(0x1e9)+_0x224252+_0x3c244c(0x1e0),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x3c244c(0x1ec));return _0x3b437f?setLocalAppAlias(_0x37e8ee,_0x3b437f,_0x404bb8):_0x37e8ee[_0x224252]=_0x224252==='pageSize'?Number(_0x404bb8):_0x404bb8,console['log']('Set\x20`'+_0x224252+_0x3c244c(0x1c3)+_0x404bb8+'\x22'+(_0x957dee===_0x3c244c(0x1c5)?_0x3c244c(0x1c1):'')),writeScopedConfig(_0x37e8ee,_0x55468e),{'ok':!![]};}},deleteDef={'service':a22_0x265ac7(0x1b0),'command':a22_0x265ac7(0x1cc),'description':'Delete\x20a\x20config\x20value','risk':a22_0x265ac7(0x1b8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x265ac7(0x1b1),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0xcc8216){const _0x156836=a22_0x265ac7,_0x34e777=_0xcc8216[_0x156836(0x1be)][0x0];if(!_0x34e777)throw CliErrors[_0x156836(0x1c6)]('Missing\x20key\x20argument.',_0x156836(0x1ba)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x220c38=resolveWriteScope({'explicitGlobal':_0xcc8216[_0x156836(0x1d1)](_0x156836(0x1c5)),'policy':_0x156836(0x1d3)}),_0x5aaa70=toScopeFlags(_0x220c38),_0x2d6af5=readScopedConfig(_0x5aaa70),_0x1ee977=parseAliasDeleteKey(_0x34e777);if(_0x1ee977){if(!deleteLocalAppAlias(_0x2d6af5,_0x1ee977))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x34e777);return console[_0x156836(0x1bf)](_0x156836(0x1df)+_0x34e777+'`'+(_0x220c38===_0x156836(0x1c5)?_0x156836(0x1c1):'')),writeScopedConfig(_0x2d6af5,_0x5aaa70),{'ok':!![]};}if(_0x2d6af5[_0x34e777]===undefined)throw CliErrors[_0x156836(0x1c6)](_0x156836(0x1ef)+_0x34e777+_0x156836(0x1ae));return delete _0x2d6af5[_0x34e777],console[_0x156836(0x1bf)](_0x156836(0x1df)+_0x34e777+'`'+(_0x220c38===_0x156836(0x1c5)?_0x156836(0x1c1):'')),writeScopedConfig(_0x2d6af5,_0x5aaa70),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a23_0x4a1b(_0xbf76e5,_0x39b4c8){_0xbf76e5=_0xbf76e5-0x17f;var _0x5c67d3=a23_0x5c67();var _0x4a1b8f=_0x5c67d3[_0xbf76e5];return _0x4a1b8f;}(function(_0x27a7ad,_0x1a4f8d){var _0x37ff15=a23_0x4a1b,_0x58a1ba=_0x27a7ad();while(!![]){try{var _0x3df7e8=parseInt(_0x37ff15(0x181))/0x1+-parseInt(_0x37ff15(0x189))/0x2*(parseInt(_0x37ff15(0x187))/0x3)+parseInt(_0x37ff15(0x18b))/0x4*(parseInt(_0x37ff15(0x183))/0x5)+parseInt(_0x37ff15(0x17f))/0x6*(-parseInt(_0x37ff15(0x184))/0x7)+-parseInt(_0x37ff15(0x180))/0x8*(-parseInt(_0x37ff15(0x185))/0x9)+-parseInt(_0x37ff15(0x182))/0xa*(parseInt(_0x37ff15(0x188))/0xb)+parseInt(_0x37ff15(0x186))/0xc*(-parseInt(_0x37ff15(0x18a))/0xd);if(_0x3df7e8===_0x1a4f8d)break;else _0x58a1ba['push'](_0x58a1ba['shift']());}catch(_0x5cfc86){_0x58a1ba['push'](_0x58a1ba['shift']());}}}(a23_0x5c67,0x507d3));function a23_0x5c67(){var _0x50ee90=['30DlDCSi','395AgETEB','66801LEuhDt','18SVQgBG','132ejLABE','21MhXBYp','1242461FgKOst','2918OJXygz','311805tVtMem','10364azhpzl','186zLQOXu','2184176HGXSmD','487684WWuhkG'];a23_0x5c67=function(){return _0x50ee90;};return a23_0x5c67();}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a24_0x13852e=a24_0x2269;function a24_0x2859(){const _0x50e45a=['\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\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}','901889GhFyZe','command','str','length','aggregate','21472780UPmwlr','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\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}','2GJtUvv','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\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$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','write','risk','data','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','data\x20','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]','\x20\x20PARAMS\x20STRUCTURE','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','755bndyhZ','read','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','462vnjCjv','5179652ikBsWC','Get\x20a\x20single\x20record\x20by\x20ID','params','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\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\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20completed\x20in\x20','create','map','\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.','getOne','batch','11ewjLRj','/api/{appCode}/','\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}','6690267Okfohe','\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}}','delete','dryRun','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','helpExtra','Preview:\x20data\x20','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\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--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','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','join','description','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','code','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','1544hmipYT','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','1160073GOBJME','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','\x20\x20PAGINATION','\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]}}','operation','now','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','52507uqDBJk','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','batchCreate','update','filter','paramsHint','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20on\x20dataset\x20','\x20\x20AGGREGATE\x20TYPES','POST','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)'];a24_0x2859=function(){return _0x50e45a;};return a24_0x2859();}(function(_0x5d2093,_0x532bda){const _0x4253fb=a24_0x2269,_0x25fe5f=_0x5d2093();while(!![]){try{const _0x3bb59d=-parseInt(_0x4253fb(0x123))/0x1+-parseInt(_0x4253fb(0x12b))/0x2*(-parseInt(_0x4253fb(0x10c))/0x3)+parseInt(_0x4253fb(0xe5))/0x4+parseInt(_0x4253fb(0xe1))/0x5*(parseInt(_0x4253fb(0xe4))/0x6)+-parseInt(_0x4253fb(0x114))/0x7*(parseInt(_0x4253fb(0x109))/0x8)+-parseInt(_0x4253fb(0xf5))/0x9+-parseInt(_0x4253fb(0x128))/0xa*(-parseInt(_0x4253fb(0xf2))/0xb);if(_0x3bb59d===_0x532bda)break;else _0x25fe5f['push'](_0x25fe5f['shift']());}catch(_0x452197){_0x25fe5f['push'](_0x25fe5f['shift']());}}}(a24_0x2859,0xb682c));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';function a24_0x2269(_0x53365d,_0x4073f0){_0x53365d=_0x53365d-0xd7;const _0x285947=a24_0x2859();let _0x226903=_0x285947[_0x53365d];return _0x226903;}const specs=[{'command':a24_0x13852e(0x119),'operation':a24_0x13852e(0x119),'risk':a24_0x13852e(0xe2),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a24_0x13852e(0x11c)+a24_0x13852e(0x116),'helpExtra':['\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}',a24_0x13852e(0xf6),a24_0x13852e(0x100),a24_0x13852e(0x12d),'\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_0x13852e(0x113),a24_0x13852e(0x110),'\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_0x13852e(0xd7),a24_0x13852e(0x10a),'',a24_0x13852e(0xdf),a24_0x13852e(0xff),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a24_0x13852e(0x129),a24_0x13852e(0x10d),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a24_0x13852e(0xf9),'',a24_0x13852e(0x10f),a24_0x13852e(0xfc),a24_0x13852e(0xef),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a24_0x13852e(0xfb),'\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',a24_0x13852e(0x12c),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.']['join']('\x0a')},{'command':a24_0x13852e(0xf0),'operation':a24_0x13852e(0xf0),'risk':a24_0x13852e(0xe2),'paramsRequired':!![],'description':a24_0x13852e(0xe6),'paramsHint':a24_0x13852e(0xfa)},{'command':'create','operation':a24_0x13852e(0xed),'risk':a24_0x13852e(0xd8),'paramsRequired':!![],'description':a24_0x13852e(0xe3),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':a24_0x13852e(0x117),'operation':a24_0x13852e(0x117),'risk':'write','paramsRequired':!![],'description':a24_0x13852e(0x10e),'paramsHint':a24_0x13852e(0x102)},{'command':a24_0x13852e(0x118),'operation':a24_0x13852e(0x118),'risk':'write','paramsRequired':!![],'description':'Update\x20an\x20existing\x20record','paramsHint':a24_0x13852e(0x11b)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':'delete','operation':a24_0x13852e(0xf7),'risk':'high-risk-write','paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a24_0x13852e(0xfa)},{'command':a24_0x13852e(0x127),'operation':a24_0x13852e(0x127),'risk':'read','paramsRequired':![],'description':a24_0x13852e(0x120),'paramsHint':a24_0x13852e(0x106)+a24_0x13852e(0x105),'helpExtra':[a24_0x13852e(0x11e),a24_0x13852e(0xea),a24_0x13852e(0x122),a24_0x13852e(0xf4),a24_0x13852e(0x115),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}',a24_0x13852e(0x12a),a24_0x13852e(0xe0),'',a24_0x13852e(0xde),a24_0x13852e(0x121),a24_0x13852e(0xdb),a24_0x13852e(0xe8),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a24_0x13852e(0xdd),a24_0x13852e(0xe9),'','\x20\x20EXAMPLES',a24_0x13852e(0x108),a24_0x13852e(0xeb),'',a24_0x13852e(0x10b),a24_0x13852e(0x101),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a24_0x13852e(0x103)]('\x0a')}];function makeDataCommand(_0x19d7a2){const _0x4642ae=a24_0x13852e,_0x268fa1=_0x4642ae(0xdc)+_0x19d7a2[_0x4642ae(0x124)],_0x310092={'service':_0x4642ae(0xda),'command':_0x19d7a2[_0x4642ae(0x124)],'description':_0x19d7a2['description'],'risk':_0x19d7a2[_0x4642ae(0xd9)],'helpExtra':_0x19d7a2[_0x4642ae(0xfd)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x19d7a2[_0x4642ae(0x11a)]}],'validate':async _0x1af9fa=>{const _0x5c1b5a=_0x4642ae;_0x19d7a2['paramsRequired']&&requireAnyOf(_0x1af9fa,[_0x5c1b5a(0xe7)],_0x268fa1),_0x19d7a2['operation']===_0x5c1b5a(0x117)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1af9fa[_0x5c1b5a(0x125)]('params'))),_0x19d7a2[_0x5c1b5a(0x111)]===_0x5c1b5a(0x118)&&parseUpdateIdsFromParams(parseJsonParams(_0x1af9fa['str']('params'))??{});},async 'execute'(_0x27f3c3){const _0x21d664=_0x4642ae,_0x34eae8=_0x27f3c3['str'](_0x21d664(0x107)),_0x57c6f1=_0x19d7a2[_0x21d664(0x111)]===_0x21d664(0x117)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x27f3c3['str']('params'))):parseJsonParams(_0x27f3c3[_0x21d664(0x125)](_0x21d664(0xe7)))??{},_0x33ec23=_0x19d7a2[_0x21d664(0x111)]===_0x21d664(0x118)?parseUpdateIdsFromParams(_0x57c6f1):undefined,_0xb849dd=_0x33ec23?normalizeUpdateParamsForRuntime(_0x57c6f1,_0x33ec23):_0x57c6f1,_0x5a12eb=Date[_0x21d664(0x112)](),_0x233bf9=await executeData(_0x34eae8,_0x19d7a2[_0x21d664(0x111)],_0xb849dd),_0xb25ef4=Date[_0x21d664(0x112)]()-_0x5a12eb,_0x5952af=_0x33ec23&&_0x33ec23[_0x21d664(0x126)]>0x1?buildBatchUpdateResult(_0x33ec23,_0x233bf9):_0x233bf9;return{'ok':!![],'data':{'result':_0x5952af,'elapsed':_0xb25ef4},'message':_0x21d664(0xdc)+_0x19d7a2[_0x21d664(0x124)]+_0x21d664(0xec)+_0xb25ef4+'ms'};}};return _0x19d7a2['risk']!==_0x4642ae(0xe2)&&(_0x310092[_0x4642ae(0xf8)]=async _0x3ca6fb=>{const _0x4ef9d5=_0x4642ae,_0x41296c=_0x3ca6fb['str'](_0x4ef9d5(0x107)),_0x2964b2=_0x19d7a2[_0x4ef9d5(0x111)]===_0x4ef9d5(0x117)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3ca6fb[_0x4ef9d5(0x125)](_0x4ef9d5(0xe7)))):parseJsonParams(_0x3ca6fb['str'](_0x4ef9d5(0xe7)))??{};let _0x293c5b=_0x2964b2;if(_0x19d7a2[_0x4ef9d5(0x111)]==='update'){const _0x205c70=parseUpdateIdsFromParams(_0x2964b2);_0x293c5b=normalizeUpdateParamsForRuntime(_0x2964b2,_0x205c70);}return dryRun(_0x4ef9d5(0x11f),_0x4ef9d5(0xf3)+_0x41296c+'/'+_0x19d7a2[_0x4ef9d5(0x111)])['body'](_0x293c5b)[_0x4ef9d5(0x104)](_0x4ef9d5(0xfe)+_0x19d7a2['command']+_0x4ef9d5(0x11d)+_0x41296c)['build']();}),_0x310092;}export const dataDefinitions=specs[a24_0x13852e(0xee)](makeDataCommand);function buildBatchUpdateResult(_0x281e52,_0x252432){const _0x19a843=a24_0x13852e;return{'operation':_0x19a843(0x118),'mode':_0x19a843(0xf1),'ids':_0x281e52,'total':_0x281e52[_0x19a843(0x126)],'result':_0x252432};}
|
|
1
|
+
const a24_0x195886=a24_0x461b;(function(_0x22985f,_0x35dddd){const _0x4ee428=a24_0x461b,_0x1bd3ab=_0x22985f();while(!![]){try{const _0x4e5a85=parseInt(_0x4ee428(0x190))/0x1*(-parseInt(_0x4ee428(0x171))/0x2)+parseInt(_0x4ee428(0x173))/0x3*(-parseInt(_0x4ee428(0x191))/0x4)+-parseInt(_0x4ee428(0x197))/0x5*(-parseInt(_0x4ee428(0x18c))/0x6)+parseInt(_0x4ee428(0x172))/0x7*(-parseInt(_0x4ee428(0x158))/0x8)+-parseInt(_0x4ee428(0x167))/0x9+parseInt(_0x4ee428(0x16f))/0xa*(-parseInt(_0x4ee428(0x18f))/0xb)+-parseInt(_0x4ee428(0x193))/0xc*(-parseInt(_0x4ee428(0x19b))/0xd);if(_0x4e5a85===_0x35dddd)break;else _0x1bd3ab['push'](_0x1bd3ab['shift']());}catch(_0x9986bb){_0x1bd3ab['push'](_0x1bd3ab['shift']());}}}(a24_0x3eda,0x35bc7));import{executeData}from'../../core/sdk-client.js';function a24_0x3eda(){const _0x1ff55d=['JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','length','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','paramsRequired','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','now','operation','batch','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','helpExtra','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','385272xPlmdd','create','join','command','delete','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','Preview:\x20data\x20','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','read','\x20\x20WHERE\x20OPERATORS','update','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','1598346PCkfaW','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','20YPvPIx','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','214414hxVJoW','49SEIhkS','29229neEVwj','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','batchCreate','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','map','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','dryRun','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','/api/{appCode}/','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20completed\x20in\x20','\x20on\x20dataset\x20','Update\x20an\x20existing\x20record','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','risk','code','description','10926TJkWST','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','build','1840113JbhYkj','3mGzdkf','48qycMNv','high-risk-write','492504fFeGOx','body','filter','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','985LYuoaL','data','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','params','364ReySRY','str','paramsHint','\x20\x20PAGINATION','write'];a24_0x3eda=function(){return _0x1ff55d;};return a24_0x3eda();}import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';function a24_0x461b(_0x27f733,_0x40858a){_0x27f733=_0x27f733-0x144;const _0x3edab9=a24_0x3eda();let _0x461b94=_0x3edab9[_0x27f733];return _0x461b94;}import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0x195886(0x195),'operation':a24_0x195886(0x195),'risk':a24_0x195886(0x162),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a24_0x195886(0x152)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a24_0x195886(0x163),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}',a24_0x195886(0x183),a24_0x195886(0x161),a24_0x195886(0x160),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}',a24_0x195886(0x17b),a24_0x195886(0x15d),'\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}',a24_0x195886(0x168),a24_0x195886(0x174),'','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}',a24_0x195886(0x14e),'',a24_0x195886(0x147),a24_0x195886(0x178),a24_0x195886(0x17a),a24_0x195886(0x196),a24_0x195886(0x157),a24_0x195886(0x154),'',a24_0x195886(0x19e),a24_0x195886(0x16e),a24_0x195886(0x14c),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a24_0x195886(0x16b),a24_0x195886(0x181),a24_0x195886(0x179),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a24_0x195886(0x15a)]('\x0a')},{'command':'getOne','operation':'getOne','risk':'read','paramsRequired':!![],'description':a24_0x195886(0x14b),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0x195886(0x159),'operation':a24_0x195886(0x159),'risk':'write','paramsRequired':!![],'description':a24_0x195886(0x17c),'paramsHint':a24_0x195886(0x188)},{'command':a24_0x195886(0x177),'operation':a24_0x195886(0x177),'risk':a24_0x195886(0x19f),'paramsRequired':!![],'description':a24_0x195886(0x17d),'paramsHint':a24_0x195886(0x14d)},{'command':a24_0x195886(0x164),'operation':a24_0x195886(0x164),'risk':a24_0x195886(0x19f),'paramsRequired':!![],'description':a24_0x195886(0x187),'paramsHint':a24_0x195886(0x1a0)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':a24_0x195886(0x15c),'operation':a24_0x195886(0x15c),'risk':a24_0x195886(0x192),'paramsRequired':!![],'description':a24_0x195886(0x199),'paramsHint':a24_0x195886(0x16c)},{'command':'aggregate','operation':'aggregate','risk':'read','paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a24_0x195886(0x148)+a24_0x195886(0x175),'helpExtra':[a24_0x195886(0x165),a24_0x195886(0x16d),a24_0x195886(0x145),a24_0x195886(0x184),a24_0x195886(0x176),a24_0x195886(0x17f),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a24_0x195886(0x16a),a24_0x195886(0x146),a24_0x195886(0x18d),a24_0x195886(0x156),a24_0x195886(0x166),a24_0x195886(0x15f),a24_0x195886(0x169),'','\x20\x20EXAMPLES','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','',a24_0x195886(0x170),a24_0x195886(0x149),'',a24_0x195886(0x153)][a24_0x195886(0x15a)]('\x0a')}];function makeDataCommand(_0x1a8f3d){const _0x52294d=a24_0x195886,_0x38bb6e='data\x20'+_0x1a8f3d['command'],_0x1f0132={'service':_0x52294d(0x198),'command':_0x1a8f3d[_0x52294d(0x15b)],'description':_0x1a8f3d[_0x52294d(0x18b)],'risk':_0x1a8f3d[_0x52294d(0x189)],'helpExtra':_0x1a8f3d[_0x52294d(0x155)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x1a8f3d[_0x52294d(0x19d)]}],'validate':async _0x4891f5=>{const _0x463cb2=_0x52294d;_0x1a8f3d[_0x463cb2(0x14a)]&&requireAnyOf(_0x4891f5,[_0x463cb2(0x19a)],_0x38bb6e),_0x1a8f3d[_0x463cb2(0x150)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4891f5['str']('params'))),_0x1a8f3d[_0x463cb2(0x150)]===_0x463cb2(0x164)&&parseUpdateIdsFromParams(parseJsonParams(_0x4891f5[_0x463cb2(0x19c)](_0x463cb2(0x19a)))??{});},async 'execute'(_0xf11e42){const _0x2c1273=_0x52294d,_0x1e939f=_0xf11e42[_0x2c1273(0x19c)](_0x2c1273(0x18a)),_0x151911=_0x1a8f3d[_0x2c1273(0x150)]===_0x2c1273(0x177)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xf11e42['str']('params'))):parseJsonParams(_0xf11e42[_0x2c1273(0x19c)]('params'))??{},_0x580093=_0x1a8f3d[_0x2c1273(0x150)]===_0x2c1273(0x164)?parseUpdateIdsFromParams(_0x151911):undefined,_0x46aa83=_0x580093?normalizeUpdateParamsForRuntime(_0x151911,_0x580093):_0x151911,_0x3d66a1=Date[_0x2c1273(0x14f)](),_0x7ea95b=await executeData(_0x1e939f,_0x1a8f3d[_0x2c1273(0x150)],_0x46aa83),_0x5a39eb=Date[_0x2c1273(0x14f)]()-_0x3d66a1,_0x4b31dd=_0x580093&&_0x580093['length']>0x1?buildBatchUpdateResult(_0x580093,_0x7ea95b):_0x7ea95b;return{'ok':!![],'data':{'result':_0x4b31dd,'elapsed':_0x5a39eb},'message':'data\x20'+_0x1a8f3d[_0x2c1273(0x15b)]+_0x2c1273(0x185)+_0x5a39eb+'ms'};}};return _0x1a8f3d[_0x52294d(0x189)]!==_0x52294d(0x162)&&(_0x1f0132[_0x52294d(0x180)]=async _0x37df0d=>{const _0x5ae99d=_0x52294d,_0x569a2b=_0x37df0d[_0x5ae99d(0x19c)]('code'),_0x43bc65=_0x1a8f3d['operation']===_0x5ae99d(0x177)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x37df0d['str']('params'))):parseJsonParams(_0x37df0d['str'](_0x5ae99d(0x19a)))??{};let _0x43068a=_0x43bc65;if(_0x1a8f3d['operation']==='update'){const _0x30a2a9=parseUpdateIdsFromParams(_0x43bc65);_0x43068a=normalizeUpdateParamsForRuntime(_0x43bc65,_0x30a2a9);}return dryRun('POST',_0x5ae99d(0x182)+_0x569a2b+'/'+_0x1a8f3d[_0x5ae99d(0x150)])[_0x5ae99d(0x194)](_0x43068a)[_0x5ae99d(0x18b)](_0x5ae99d(0x15e)+_0x1a8f3d['command']+_0x5ae99d(0x186)+_0x569a2b)[_0x5ae99d(0x18e)]();}),_0x1f0132;}export const dataDefinitions=specs[a24_0x195886(0x17e)](makeDataCommand);function buildBatchUpdateResult(_0x2fd715,_0x5560de){const _0x19e1c6=a24_0x195886;return{'operation':_0x19e1c6(0x164),'mode':_0x19e1c6(0x151),'ids':_0x2fd715,'total':_0x2fd715[_0x19e1c6(0x144)],'result':_0x5560de};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x97defc=a25_0x5cdb;(function(_0x32cb47,_0x51b019){const _0x25ed4c=a25_0x5cdb,_0x4f2b37=_0x32cb47();while(!![]){try{const _0x51bd94=-parseInt(_0x25ed4c(0x106))/0x1+-parseInt(_0x25ed4c(0x13f))/0x2+-parseInt(_0x25ed4c(0x120))/0x3*(-parseInt(_0x25ed4c(0x12c))/0x4)+-parseInt(_0x25ed4c(0x113))/0x5*(-parseInt(_0x25ed4c(0x137))/0x6)+parseInt(_0x25ed4c(0x141))/0x7*(parseInt(_0x25ed4c(0x131))/0x8)+parseInt(_0x25ed4c(0x14b))/0x9+-parseInt(_0x25ed4c(0x11f))/0xa*(-parseInt(_0x25ed4c(0x13a))/0xb);if(_0x51bd94===_0x51b019)break;else _0x4f2b37['push'](_0x4f2b37['shift']());}catch(_0x43c427){_0x4f2b37['push'](_0x4f2b37['shift']());}}}(a25_0x5435,0x39c3a));function a25_0x5cdb(_0x338700,_0x4c8b8f){_0x338700=_0x338700-0x105;const _0x54351e=a25_0x5435();let _0x5cdb16=_0x54351e[_0x338700];return _0x5cdb16;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a25_0x5435(){const _0x18c456=['relatedPageInfoList','dbtableConfig','52472IsdbiY','responseBody','afterScriptId','columnCodeListWithDeleted','map','appCode','41544EZxAuz','fields','trim','66BOHpiY','options','displayName','modelId','updateTimeField','794650SMANGN','tableComment','77tpwvKy','name','type','extend','requestBody','formatRules','title','method','string','dbType','2205450QgLDpg','createTimeField','341224jyHuGK','responseFields','dbId','creatorIdField','host','split','dbName','push','required','modifierIdField','object','doType','sourceType','50NuUivd','source','labelField','tableName','doVersion','str','validateRules','pkField','indexes','beforeScriptId','filter','allFields','591720xITCMi','3048ESWtlQ','creatorNameField','deleted','datasetKey','entries','path','description','isArray','parse','code','modelCode','dataset','920xagbZl','length','requestFields'];a25_0x5435=function(){return _0x18c456;};return a25_0x5435();}function normalizeField(_0x468eae){const _0x47d241=a25_0x5cdb;if(_0x468eae[_0x47d241(0x122)])return null;const _0x37b0db=Boolean(_0x468eae[_0x47d241(0x13c)]!==undefined||_0x468eae[_0x47d241(0x111)]!==undefined);let _0xda870a={};if(!_0x37b0db&&typeof _0x468eae['extend']===_0x47d241(0x149))try{_0xda870a=JSON[_0x47d241(0x128)](_0x468eae[_0x47d241(0x144)]);}catch{}const _0x69f560=_0x37b0db?_0x468eae[_0x47d241(0x142)]:_0x468eae[_0x47d241(0x129)],_0x388a21=_0x37b0db?_0x468eae[_0x47d241(0x13c)]:_0x468eae['name'],_0x113d76=_0x37b0db?_0x468eae[_0x47d241(0x111)]:_0x468eae[_0x47d241(0x143)]||_0x468eae['dataType'],_0x4a2926=_0x37b0db?_0x468eae[_0x47d241(0x11a)]===!![]:_0xda870a['pkField']===!![],_0x1e1c37=_0x37b0db?_0x468eae['required']===!![]:_0xda870a[_0x47d241(0x10e)]===!![],_0x3892de=_0x37b0db?_0x468eae[_0x47d241(0x13b)]??null:_0xda870a[_0x47d241(0x13b)]??null,_0x45f1ba={'name':_0x69f560,'displayName':_0x388a21||_0x69f560,'type':_0x113d76,'dbType':_0x468eae[_0x47d241(0x14a)],'pk':_0x4a2926,'required':_0x1e1c37,'description':_0x468eae[_0x47d241(0x126)]||undefined};return Array[_0x47d241(0x127)](_0x3892de)&&_0x3892de[_0x47d241(0x12d)]>0x0&&(_0x45f1ba[_0x47d241(0x13b)]=_0x3892de),_0x45f1ba;}function parseJsonMaybe(_0x13f616){const _0x5c2ef8=a25_0x5cdb;if(typeof _0x13f616!=='string')return _0x13f616;try{return JSON[_0x5c2ef8(0x128)](_0x13f616);}catch{return _0x13f616;}}function normalizeOperationEntry(_0x25e161,_0x3637e8){const _0x3a2dba=a25_0x5cdb;if(!_0x3637e8||typeof _0x3637e8!==_0x3a2dba(0x110))return null;if(!_0x3637e8[_0x3a2dba(0x148)]||!_0x3637e8[_0x3a2dba(0x125)])return null;const _0x1c3353={'name':_0x25e161,'method':_0x3637e8[_0x3a2dba(0x148)],'path':_0x3637e8[_0x3a2dba(0x125)]};if(_0x3637e8[_0x3a2dba(0x10a)])_0x1c3353[_0x3a2dba(0x10a)]=_0x3637e8[_0x3a2dba(0x10a)];if(_0x3637e8[_0x3a2dba(0x145)]!=null)_0x1c3353[_0x3a2dba(0x145)]=parseJsonMaybe(_0x3637e8[_0x3a2dba(0x145)]);if(_0x3637e8[_0x3a2dba(0x132)]!=null)_0x1c3353[_0x3a2dba(0x132)]=parseJsonMaybe(_0x3637e8[_0x3a2dba(0x132)]);if(_0x3637e8['beforeScriptId']!=null)_0x1c3353[_0x3a2dba(0x11c)]=_0x3637e8['beforeScriptId'];if(_0x3637e8[_0x3a2dba(0x133)]!=null)_0x1c3353[_0x3a2dba(0x133)]=_0x3637e8['afterScriptId'];if(Array[_0x3a2dba(0x127)](_0x3637e8[_0x3a2dba(0x12e)]))_0x1c3353[_0x3a2dba(0x12e)]=_0x3637e8[_0x3a2dba(0x12e)];if(Array[_0x3a2dba(0x127)](_0x3637e8[_0x3a2dba(0x107)]))_0x1c3353[_0x3a2dba(0x107)]=_0x3637e8['responseFields'];return _0x1c3353;}function summarizeDbtable(_0x1c194f){const _0x509256=a25_0x5cdb,_0x3b8912={},_0x119911=[_0x509256(0x108),_0x509256(0x10c),_0x509256(0x116),_0x509256(0x123),'pkField',_0x509256(0x11e),'logicField',_0x509256(0x105),_0x509256(0x13e),_0x509256(0x109),_0x509256(0x121),_0x509256(0x10f),'modifierNameField',_0x509256(0x115),'dblinkInfoDTO'];for(const _0x5dfe35 of _0x119911){if(_0x1c194f[_0x5dfe35]!==undefined)_0x3b8912[_0x5dfe35]=_0x1c194f[_0x5dfe35];}return typeof _0x3b8912[_0x509256(0x11e)]==='string'&&_0x3b8912[_0x509256(0x11e)][_0x509256(0x12d)]>0x0&&(_0x3b8912['allFieldNames']=_0x3b8912[_0x509256(0x11e)]['split'](',')[_0x509256(0x135)](_0x223eda=>_0x223eda[_0x509256(0x139)]())[_0x509256(0x11d)](Boolean)),_0x3b8912;}function normalizeRelatedPages(_0x5a1e64){const _0x1d14fd=a25_0x5cdb;if(!Array[_0x1d14fd(0x127)](_0x5a1e64))return[];return _0x5a1e64[_0x1d14fd(0x11d)](_0x4b415f=>_0x4b415f&&typeof _0x4b415f==='object')[_0x1d14fd(0x135)](_0x11dace=>({'id':_0x11dace['id'],'type':_0x11dace[_0x1d14fd(0x143)],'code':_0x11dace[_0x1d14fd(0x129)],'title':_0x11dace[_0x1d14fd(0x147)],'deleted':_0x11dace[_0x1d14fd(0x122)]===!![]}));}function normalizeFallbackFieldName(_0x938e4c,_0x1c3e55){const _0x42db44=a25_0x5cdb,_0x48eda1=_0x938e4c[_0x42db44(0x139)]();if(!_0x48eda1)return null;return{'name':_0x48eda1,'displayName':_0x48eda1,'type':undefined,'dbType':undefined,'pk':_0x48eda1===_0x1c3e55,'required':![],'description':undefined};}async function loadListFieldFallback(_0x820c1c,_0x4f6a2b){const _0xbc1ef=a25_0x5cdb;if(!_0x820c1c||!_0x4f6a2b)return[];try{const _0x5e413b=await listDatasets(_0x820c1c,{'code':_0x4f6a2b}),_0x27c766=_0x5e413b['find'](_0x5eaff3=>_0x5eaff3[_0xbc1ef(0x129)]===_0x4f6a2b)??_0x5e413b[0x0],_0x6615d6=_0x27c766?.[_0xbc1ef(0x130)]??{},_0x5309a0=typeof _0x6615d6['allFields']===_0xbc1ef(0x149)?_0x6615d6[_0xbc1ef(0x11e)][_0xbc1ef(0x10b)](','):[];return _0x5309a0[_0xbc1ef(0x135)](_0x5a2149=>normalizeFallbackFieldName(_0x5a2149,_0x6615d6['pkField']))[_0xbc1ef(0x11d)](_0x27262e=>_0x27262e!==null);}catch{return[];}}export const datasetDetail={'service':a25_0x97defc(0x12b),'command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','risk':'read','flags':[CODE_FLAG],async 'execute'(_0x2396d4){const _0x58f564=a25_0x97defc,_0x388756=await getDatasetDetail(_0x2396d4[_0x58f564(0x118)](_0x58f564(0x129))),_0x6573b=Array['isArray'](_0x388756[_0x58f564(0x138)])?_0x388756[_0x58f564(0x138)]:Array['isArray'](_0x388756['properties'])?_0x388756['properties']:[];let _0x27b6e0=_0x6573b[_0x58f564(0x135)](_0x54c614=>normalizeField(_0x54c614))[_0x58f564(0x11d)](_0x1dc21e=>_0x1dc21e!==null);_0x27b6e0['length']===0x0&&(_0x27b6e0=await loadListFieldFallback(_0x2396d4[_0x58f564(0x136)],_0x2396d4['str'](_0x58f564(0x129))));const _0xea829e=_0x388756['operations']??{},_0x39bafd=[];for(const [_0x50f50f,_0x3abb67]of Object[_0x58f564(0x124)](_0xea829e)){const _0x3fe6a0=normalizeOperationEntry(_0x50f50f,_0x3abb67);if(_0x3fe6a0)_0x39bafd[_0x58f564(0x10d)](_0x3fe6a0);}const _0x14802b=_0x388756['dbtableConfig']??{},_0x349c5e=_0x388756['dataset']??{},_0x222873=_0x14802b[_0x58f564(0x108)]!=null?{'id':_0x14802b[_0x58f564(0x108)],'name':_0x14802b[_0x58f564(0x10c)]??null}:undefined;let _0x3e61f1;return typeof _0x388756[_0x58f564(0x144)]==='string'&&(_0x3e61f1=parseJsonMaybe(_0x388756[_0x58f564(0x144)])),{'ok':!![],'data':{'id':_0x388756[_0x58f564(0x13d)]??_0x388756['id'],'name':_0x388756[_0x58f564(0x142)],'code':_0x388756[_0x58f564(0x12a)]||_0x388756[_0x58f564(0x129)],'doVersion':_0x388756[_0x58f564(0x117)],'description':_0x388756['description']||_0x349c5e[_0x58f564(0x140)]||undefined,'source':_0x388756[_0x58f564(0x114)]||_0x349c5e[_0x58f564(0x112)],'table':_0x14802b[_0x58f564(0x116)]||_0x349c5e['tableName'],'datasetKey':_0x14802b[_0x58f564(0x123)],'pk':_0x14802b['pkField'],'db':_0x222873,'dbtable':summarizeDbtable(_0x14802b),'fields':_0x27b6e0,'operations':_0x39bafd,'indexes':Array[_0x58f564(0x127)](_0x349c5e[_0x58f564(0x11b)])?_0x349c5e[_0x58f564(0x11b)]:[],'relations':_0x388756['relations']??null,'relatedPages':normalizeRelatedPages(_0x388756[_0x58f564(0x12f)]),...Array[_0x58f564(0x127)](_0x388756['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x388756[_0x58f564(0x134)]}:{},'formatRules':Array['isArray'](_0x388756[_0x58f564(0x146)])?_0x388756['formatRules']:[],'validateRules':Array[_0x58f564(0x127)](_0x388756['validateRules'])?_0x388756[_0x58f564(0x119)]:[],..._0x3e61f1!==undefined?{'extend':_0x3e61f1}:{},'stats':{'fieldCount':_0x27b6e0[_0x58f564(0x12d)],'operationCount':_0x39bafd[_0x58f564(0x12d)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a26_0x473f(_0x594213,_0x1bb57b){_0x594213=_0x594213-0x116;const _0x40bb33=a26_0x40bb();let _0x473fe7=_0x40bb33[_0x594213];return _0x473fe7;}(function(_0x1b5682,_0x598b26){const _0xc9cac7=a26_0x473f,_0x647ceb=_0x1b5682();while(!![]){try{const _0x2efb12=-parseInt(_0xc9cac7(0x117))/0x1+parseInt(_0xc9cac7(0x11a))/0x2*(-parseInt(_0xc9cac7(0x11f))/0x3)+parseInt(_0xc9cac7(0x11e))/0x4*(parseInt(_0xc9cac7(0x121))/0x5)+-parseInt(_0xc9cac7(0x11c))/0x6*(-parseInt(_0xc9cac7(0x11d))/0x7)+parseInt(_0xc9cac7(0x120))/0x8+parseInt(_0xc9cac7(0x119))/0x9*(-parseInt(_0xc9cac7(0x118))/0xa)+-parseInt(_0xc9cac7(0x11b))/0xb*(parseInt(_0xc9cac7(0x116))/0xc);if(_0x2efb12===_0x598b26)break;else _0x647ceb['push'](_0x647ceb['shift']());}catch(_0x42ae84){_0x647ceb['push'](_0x647ceb['shift']());}}}(a26_0x40bb,0x80760));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';function a26_0x40bb(){const _0x5e3f1f=['96190MYsDfE','11IJJWKy','7794PXcXla','1883pefPcO','46884LsNygD','15vjGddi','6304824JaufHu','415jBaySf','7280580xMjJWj','513681vkyxfM','1150jhQiOr','17478YihFzH'];a26_0x40bb=function(){return _0x5e3f1f;};return a26_0x40bb();}export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a27_0x1bf426=a27_0x12dd;(function(_0x462cad,_0x5402b4){const _0x4b5f06=a27_0x12dd,_0x3763d9=_0x462cad();while(!![]){try{const _0x2f78f8=-parseInt(_0x4b5f06(0x13f))/0x1+parseInt(_0x4b5f06(0x146))/0x2*(-parseInt(_0x4b5f06(0x147))/0x3)+parseInt(_0x4b5f06(0x145))/0x4*(parseInt(_0x4b5f06(0x142))/0x5)+-parseInt(_0x4b5f06(0x13a))/0x6+parseInt(_0x4b5f06(0x14c))/0x7*(-parseInt(_0x4b5f06(0x130))/0x8)+parseInt(_0x4b5f06(0x13b))/0x9*(parseInt(_0x4b5f06(0x134))/0xa)+-parseInt(_0x4b5f06(0x14a))/0xb*(-parseInt(_0x4b5f06(0x132))/0xc);if(_0x2f78f8===_0x5402b4)break;else _0x3763d9['push'](_0x3763d9['shift']());}catch(_0x32078b){_0x3763d9['push'](_0x3763d9['shift']());}}}(a27_0x1aeb,0x222d5));function a27_0x12dd(_0x3bbf6a,_0x8b9037){_0x3bbf6a=_0x3bbf6a-0x130;const _0x1aebcd=a27_0x1aeb();let _0x12dd0d=_0x1aebcd[_0x3bbf6a];return _0x12dd0d;}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a27_0x1aeb(){const _0x129c94=['List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','2865467toCRoc','allFields','7xfjlBc','118552rZYpPv','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','12mXZuPM','map','70MgrvIO','name','appCode','read','pkField','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','1130730htUtvx','13374HzHArj','trim','source','dataset','71497dzINVU','description','split','5dXRMCP','str','string','1110628abXpoH','26XfSgIb','30876lMhXMe','datasetKey'];a27_0x1aeb=function(){return _0x129c94;};return a27_0x1aeb();}export const datasetList={'service':a27_0x1bf426(0x13e),'command':'list','description':a27_0x1bf426(0x149),'risk':a27_0x1bf426(0x137),'flags':[{'name':a27_0x1bf426(0x135),'type':a27_0x1bf426(0x144),'description':a27_0x1bf426(0x139)},{...CODE_FLAG,'required':![],'description':a27_0x1bf426(0x131)}],async 'execute'(_0x1700e6){const _0x7ee9d=a27_0x1bf426,_0x472692=_0x1700e6['str'](_0x7ee9d(0x135)),_0x1878f1=_0x1700e6[_0x7ee9d(0x143)]('code'),_0x7a5490=await listDatasets(_0x1700e6[_0x7ee9d(0x136)],{..._0x472692&&{'name':_0x472692},..._0x1878f1&&{'code':_0x1878f1}});return{'ok':!![],'data':{'total':_0x7a5490['length'],'datasets':_0x7a5490[_0x7ee9d(0x133)](_0x3f1363=>{const _0x2ce650=_0x7ee9d,_0xa12431=_0x3f1363['dbtableConfig']??{};return{'id':_0x3f1363['id'],'code':_0x3f1363['code'],'name':_0x3f1363['name'],'source':_0x3f1363[_0x2ce650(0x13d)],'description':_0x3f1363[_0x2ce650(0x140)],'table':_0xa12431['tableName'],'datasetKey':_0xa12431[_0x2ce650(0x148)],'pk':_0xa12431[_0x2ce650(0x138)],'fields':_0xa12431[_0x2ce650(0x14b)]?_0xa12431[_0x2ce650(0x14b)][_0x2ce650(0x141)](',')[_0x2ce650(0x133)](_0x102ea7=>_0x102ea7[_0x2ce650(0x13c)]()):[]};})}};}};
|