@lovrabet/lovrabet-cli 2.3.3 → 2.3.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- 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/approval/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/init.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.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/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.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/region.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/kb-search-client.d.ts +7 -1
- package/lib/core/kb-search-client.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.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/builtin-skill.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/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.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/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.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
- package/skills/lovrabet/SKILL.md +4 -2
- package/skills/lovrabet/references/lovrabet-config-commands.md +1 -1
- package/skills/lovrabet/references/lovrabet-config.md +2 -2
- package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +16 -6
- package/skills/lovrabet/references/lovrabet-service-tree.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x90d57=a12_0x59cb;(function(_0x335c3b,_0x4d36a3){const _0x3f0a72=a12_0x59cb,_0x516d30=_0x335c3b();while(!![]){try{const _0x9d3df3=parseInt(_0x3f0a72(0x10c))/0x1+-parseInt(_0x3f0a72(0x11e))/0x2*(-parseInt(_0x3f0a72(0x126))/0x3)+parseInt(_0x3f0a72(0x11b))/0x4*(parseInt(_0x3f0a72(0x122))/0x5)+-parseInt(_0x3f0a72(0x125))/0x6+parseInt(_0x3f0a72(0x108))/0x7+-parseInt(_0x3f0a72(0xfa))/0x8*(-parseInt(_0x3f0a72(0xf6))/0x9)+parseInt(_0x3f0a72(0x120))/0xa*(-parseInt(_0x3f0a72(0x107))/0xb);if(_0x9d3df3===_0x4d36a3)break;else _0x516d30['push'](_0x516d30['shift']());}catch(_0x3b99e8){_0x516d30['push'](_0x516d30['shift']());}}}(a12_0x1f14,0xcc96e));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';function a12_0x1f14(){const _0x2f3225=['cancelled','floor','nonInteractive','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','accessKey','success','Device\x20authorization\x20cancelled.','scope','data','str','SIGINT','stringify','name','/device-auth?code=','Verify:\x20','Device\x20auth\x20API\x20returned\x20HTTP\x20','boolean','toISOString','json','36wiJEmH','createdAt','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','Device\x20auth\x20API\x20error\x20(','1745072YqXQyt','status','removeListener','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','once','object','project','device','code','aborted','global-default','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','signal','22tlFzuR','1064567aEJSHA','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','POST','global','1488967rSyoBz','\x0dWaiting\x20for\x20authorization...\x20','expired','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','access_key','Write\x20to\x20project\x20config','validation','stderr','AccessKey\x20saved\x20to\x20','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','After\x20authorizing,\x20re-run:\x20','&source=','write','application/json','),\x20retrying...','3672104xhavQC','lovrabet-cli','auth','15844MVIVSw','source','18286490ifQGsZ','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','5mesXcf','log','networkError','1175472dYNfik','477rLISMQ','AbortError','trim','/api/device-auth/token','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','apiError','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','Invalid\x20access_key\x20returned\x20by\x20server.','homeDirName','string','utf8','url-only','Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','\x20remaining'];a12_0x1f14=function(){return _0x2f3225;};return a12_0x1f14();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x418059){const _0x30a267=a12_0x59cb;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x418059['bool'](_0x30a267(0x10b)),'explicitProject':_0x418059['bool'](_0x30a267(0x100)),'policy':_0x30a267(0x104)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){return crypto['randomUUID']();}export function buildDeviceAuthUrl(_0x2168f9,_0x41e915,_0x4c8dd5='lovrabet-cli'){const _0x14c7df=a12_0x59cb;return _0x2168f9+_0x14c7df(0xf0)+encodeURIComponent(_0x41e915)+_0x14c7df(0x117)+encodeURIComponent(_0x4c8dd5);}export function getDeviceCodePath(){const _0x5ebe9c=a12_0x59cb;return homedir()+'/'+PRODUCT_CONFIG[_0x5ebe9c(0xdd)]+'/.device-auth';}function a12_0x59cb(_0xd27d52,_0x4991c0){_0xd27d52=_0xd27d52-0xd7;const _0x1f142a=a12_0x1f14();let _0x59cba3=_0x1f142a[_0xd27d52];return _0x59cba3;}export function readStoredDeviceCode(){const _0x37afa9=a12_0x59cb,_0x5408d3=getDeviceCodePath();if(!existsSync(_0x5408d3))return null;try{const _0x277aca=readFileSync(_0x5408d3,{'encoding':_0x37afa9(0xdf)}),_0x3a751a=JSON['parse'](_0x277aca);if(_0x3a751a&&typeof _0x3a751a[_0x37afa9(0x102)]==='string'&&typeof _0x3a751a[_0x37afa9(0xf7)]===_0x37afa9(0xde)&&(_0x3a751a[_0x37afa9(0xea)]==='global'||_0x3a751a[_0x37afa9(0xea)]===_0x37afa9(0x100)))return _0x3a751a;}catch{}return null;}export function writeStoredDeviceCode(_0x442000,_0x9553c1){const _0x262c66=a12_0x59cb,_0x385e3d=getDeviceCodePath(),_0x1d7963=dirname(_0x385e3d);!existsSync(_0x1d7963)&&mkdirSync(_0x1d7963,{'recursive':!![]});const _0x419ace={'code':_0x442000,'createdAt':new Date()[_0x262c66(0xf4)](),'scope':_0x9553c1};writeFileSync(_0x385e3d,JSON['stringify'](_0x419ace),{'encoding':_0x262c66(0xdf),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x3c6633=getDeviceCodePath();try{unlinkSync(_0x3c6633);}catch{}}export function isStoredDeviceCodeExpired(_0x41f2f1){const _0x571877=a12_0x59cb;return Date['now']()-new Date(_0x41f2f1[_0x571877(0xf7)])['getTime']()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x5533ff,_0x3ee293){const _0x23709f=a12_0x59cb,_0x3cec46=_0x5533ff+_0x23709f(0xd8),_0x3d522a=new AbortController(),_0x1d3665=setTimeout(()=>_0x3d522a['abort'](),0x2710),_0x5b90cb=await fetch(_0x3cec46,{'method':_0x23709f(0x10a),'headers':{'Content-Type':_0x23709f(0x119)},'body':JSON[_0x23709f(0xee)]({'code':_0x3ee293}),'signal':_0x3d522a['signal']});clearTimeout(_0x1d3665);if(!_0x5b90cb['ok'])throw CliErrors[_0x23709f(0x124)](_0x23709f(0xf2)+_0x5b90cb[_0x23709f(0xfb)]);const _0x58e489=await _0x5b90cb[_0x23709f(0xf5)](),_0x20a713=_0x58e489['data']&&typeof _0x58e489[_0x23709f(0xeb)]===_0x23709f(0xff)?_0x58e489[_0x23709f(0xeb)]:_0x58e489;if(!_0x20a713||typeof _0x20a713['status']!=='string')throw CliErrors[_0x23709f(0xda)]('Invalid\x20device\x20auth\x20response');return{'status':_0x20a713[_0x23709f(0xfb)],'access_key':typeof _0x20a713[_0x23709f(0x110)]===_0x23709f(0xde)?_0x20a713[_0x23709f(0x110)]:undefined};}export async function pollDeviceToken(_0x1866f6,_0x39b7a0,_0x49f480){const _0x20cadd=a12_0x59cb;let _0x4d32a6=0x0;for(let _0x35fbc5=0x0;_0x35fbc5<MAX_POLLS;_0x35fbc5++){if(_0x49f480[_0x20cadd(0x103)])throw CliErrors[_0x20cadd(0xe3)](_0x20cadd(0xe9));let _0xc6b3fa;try{_0xc6b3fa=await fetchDeviceToken(_0x1866f6,_0x39b7a0);}catch(_0x100988){if(_0x100988 instanceof Error&&_0x100988[_0x20cadd(0xef)]===_0x20cadd(0x127))throw CliErrors[_0x20cadd(0xe3)](_0x20cadd(0xe9));_0x4d32a6++;if(_0x4d32a6>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x20cadd(0x124)](_0x20cadd(0x105));writeCliSideChannelLine(_0x20cadd(0xf9)+_0x4d32a6+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x20cadd(0x11a)),await sleep(POLL_INTERVAL_MS);continue;}_0x4d32a6=0x0;if(_0xc6b3fa[_0x20cadd(0xfb)]===_0x20cadd(0xe8)){if(!_0xc6b3fa['access_key'])throw CliErrors[_0x20cadd(0xda)](_0x20cadd(0xdc));return _0xc6b3fa[_0x20cadd(0x110)];}if(_0xc6b3fa[_0x20cadd(0xfb)]===_0x20cadd(0x10e)){deleteStoredDeviceCode();throw CliErrors[_0x20cadd(0x112)](_0x20cadd(0x10f));}const _0x4a7e7b=(_0x35fbc5+0x1)*POLL_INTERVAL_MS,_0x3a6769=DEVICE_CODE_TTL_MS-_0x4a7e7b,_0x44e25d=Math[_0x20cadd(0xe4)](_0x3a6769/0xea60),_0x2e7258=Math[_0x20cadd(0xe4)](_0x3a6769%0xea60/0x3e8);process[_0x20cadd(0x113)][_0x20cadd(0x118)](_0x20cadd(0x10d)+_0x44e25d+':'+String(_0x2e7258)['padStart'](0x2,'0')+_0x20cadd(0xe2)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors['validation'](_0x20cadd(0x109));}function sleep(_0x2a21ca){return new Promise(_0x81b09b=>setTimeout(_0x81b09b,_0x2a21ca));}export const authDeviceDefinition={'service':a12_0x90d57(0x11d),'command':a12_0x90d57(0x101),'description':a12_0x90d57(0xd9),'risk':'write','confirmationDescription':a12_0x90d57(0xe1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x90d57(0x10b),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x90d57(0x100),'type':a12_0x90d57(0xf3),'description':a12_0x90d57(0x111),'default':![]},{'name':a12_0x90d57(0x11f),'type':'string','description':a12_0x90d57(0xfd),'default':a12_0x90d57(0x11c)},{'name':a12_0x90d57(0xe0),'type':'boolean','description':'Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','default':![]}],async 'execute'(_0x5aff13){const _0x4b6842=a12_0x90d57,_0x4bbad1=resolveAuthScopeFlags(_0x5aff13),_0x3ff9e8=_0x4bbad1['global']?_0x4b6842(0x10b):_0x4b6842(0x100),_0x35fe08=readScopedConfig(_0x4bbad1);if(_0x35fe08[_0x4b6842(0xe7)])return{'ok':!![],'message':_0x4b6842(0xdb)};const _0x2ea874=(_0x5aff13[_0x4b6842(0xec)]('source')||'lovrabet-cli')[_0x4b6842(0xd7)](),_0x4ab9cf=getUserDomain(),_0x3fd20c=readStoredDeviceCode(),_0x45225a=_0x3fd20c&&!isStoredDeviceCodeExpired(_0x3fd20c)?_0x3fd20c[_0x4b6842(0x102)]:((()=>{const _0x34ea56=generateDeviceCode();return writeStoredDeviceCode(_0x34ea56,_0x3ff9e8),_0x34ea56;})()),_0x256cf=buildDeviceAuthUrl(_0x4ab9cf,_0x45225a,_0x2ea874);if(_0x5aff13['bool']('url-only'))return console[_0x4b6842(0x123)](_0x256cf),{'ok':!![]};writeCliSideChannelLine(_0x4b6842(0xe6)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x256cf),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x4b6842(0x115));if(_0x5aff13[_0x4b6842(0xe5)])return writeCliSideChannelLine(_0x4b6842(0x116)+CLI_BIN_NAME+'\x20auth\x20device'),{'ok':!![],'message':_0x4b6842(0x121)};writeCliSideChannelLine(_0x4b6842(0xf8));const _0x557135=new AbortController(),_0x165f20=()=>{const _0x1d38ec=_0x4b6842;_0x557135['abort'](),process[_0x1d38ec(0xfc)](_0x1d38ec(0xed),_0x165f20);};process[_0x4b6842(0xfe)](_0x4b6842(0xed),_0x165f20);let _0x524343;try{_0x524343=await pollDeviceToken(_0x4ab9cf,_0x45225a,_0x557135[_0x4b6842(0x106)]);}finally{process[_0x4b6842(0xfc)](_0x4b6842(0xed),_0x165f20);}if(!ACCESS_KEY_PATTERN['test'](_0x524343))throw CliErrors[_0x4b6842(0xda)](_0x4b6842(0xdc));const _0x3b3b3c=readScopedConfig(_0x4bbad1);return _0x3b3b3c[_0x4b6842(0xe7)]=_0x524343,writeScopedConfig(_0x3b3b3c,_0x4bbad1),deleteStoredDeviceCode(),process[_0x4b6842(0x113)]['write']('\x0a'),writeCliSideChannelLine(_0x4b6842(0x114)+_0x3ff9e8+'\x20config.'),writeCliSideChannelLine(_0x4b6842(0xf1)+CLI_BIN_NAME+'\x20auth\x20status'),{'ok':!![],'message':'Device\x20authorization\x20successful.'};}};
|
|
1
|
+
const a12_0xf94840=a12_0x2b81;(function(_0x3d77f6,_0x2ee3ad){const _0x3e7df1=a12_0x2b81,_0x3d5b05=_0x3d77f6();while(!![]){try{const _0x2381b4=-parseInt(_0x3e7df1(0x181))/0x1+-parseInt(_0x3e7df1(0x18c))/0x2+parseInt(_0x3e7df1(0x1ae))/0x3*(-parseInt(_0x3e7df1(0x1af))/0x4)+parseInt(_0x3e7df1(0x1bf))/0x5+parseInt(_0x3e7df1(0x1c0))/0x6+parseInt(_0x3e7df1(0x1c9))/0x7+parseInt(_0x3e7df1(0x196))/0x8*(parseInt(_0x3e7df1(0x1c4))/0x9);if(_0x2381b4===_0x2ee3ad)break;else _0x3d5b05['push'](_0x3d5b05['shift']());}catch(_0x3c60fc){_0x3d5b05['push'](_0x3d5b05['shift']());}}}(a12_0x13e6,0xdb1c7));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x1e1de6){const _0x4b2202=a12_0x2b81;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1e1de6[_0x4b2202(0x1bb)]('global'),'explicitProject':_0x1e1de6[_0x4b2202(0x1bb)](_0x4b2202(0x1b6)),'policy':'global-default'}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){const _0x104741=a12_0x2b81;return crypto[_0x104741(0x1a2)]();}export function buildDeviceAuthUrl(_0x4f9136,_0x1e8509,_0x3e2ad2='lovrabet-cli'){return _0x4f9136+'/device-auth?code='+encodeURIComponent(_0x1e8509)+'&source='+encodeURIComponent(_0x3e2ad2);}export function getDeviceCodePath(){return homedir()+'/'+PRODUCT_CONFIG['homeDirName']+'/.device-auth';}export function readStoredDeviceCode(){const _0x2f6e01=a12_0x2b81,_0x4a7700=getDeviceCodePath();if(!existsSync(_0x4a7700))return null;try{const _0x1f4f33=readFileSync(_0x4a7700,{'encoding':_0x2f6e01(0x1b0)}),_0x831a01=JSON['parse'](_0x1f4f33);if(_0x831a01&&typeof _0x831a01[_0x2f6e01(0x17f)]===_0x2f6e01(0x1a6)&&typeof _0x831a01[_0x2f6e01(0x191)]===_0x2f6e01(0x1a6)&&(_0x831a01['scope']==='global'||_0x831a01[_0x2f6e01(0x1be)]===_0x2f6e01(0x1b6)))return _0x831a01;}catch{}return null;}function a12_0x13e6(){const _0x5df2c8=['now','aborted','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','url-only','Device\x20authorization\x20successful.','apiError','\x20auth\x20device','2484678mDloVC','abort','auth','expired','\x20remaining','createdAt','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','source','once','getTime','148792rxXsbe','nonInteractive','write','Device\x20auth\x20API\x20error\x20(','SIGINT','stderr','/api/device-auth/token','\x20auth\x20status','Device\x20authorization\x20cancelled.','\x20config.','stringify','access_key','randomUUID','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','object','networkError','string','Device\x20auth\x20API\x20returned\x20HTTP\x20','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','data','validation','After\x20authorizing,\x20re-run:\x20','global','trim','2170263dWOSGJ','4RrNRjM','utf8','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','POST','cancelled','toISOString','project','Invalid\x20device\x20auth\x20response','log','application/json','str','bool','Write\x20to\x20global\x20config\x20(default)','success','scope','582005NNenaD','6352032QgGgOW','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','removeListener','padStart','801rKlkEN','floor','boolean','test','signal','2696302nxUiUT','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','lovrabet-cli','json','status','Write\x20to\x20project\x20config','name','code','Invalid\x20access_key\x20returned\x20by\x20server.','352331KHWGRw','AbortError','Verify:\x20'];a12_0x13e6=function(){return _0x5df2c8;};return a12_0x13e6();}export function writeStoredDeviceCode(_0x4b1aab,_0x433ac2){const _0x34e0d0=a12_0x2b81,_0x4425b7=getDeviceCodePath(),_0x354d97=dirname(_0x4425b7);!existsSync(_0x354d97)&&mkdirSync(_0x354d97,{'recursive':!![]});const _0x22c88f={'code':_0x4b1aab,'createdAt':new Date()[_0x34e0d0(0x1b5)](),'scope':_0x433ac2};writeFileSync(_0x4425b7,JSON[_0x34e0d0(0x1a0)](_0x22c88f),{'encoding':_0x34e0d0(0x1b0),'mode':0x180});}function a12_0x2b81(_0x1fe60d,_0x4eb490){_0x1fe60d=_0x1fe60d-0x179;const _0x13e678=a12_0x13e6();let _0x2b8130=_0x13e678[_0x1fe60d];return _0x2b8130;}export function deleteStoredDeviceCode(){const _0x55f188=getDeviceCodePath();try{unlinkSync(_0x55f188);}catch{}}export function isStoredDeviceCodeExpired(_0xd7d767){const _0x476465=a12_0x2b81;return Date[_0x476465(0x184)]()-new Date(_0xd7d767[_0x476465(0x191)])[_0x476465(0x195)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x3d4a67,_0x14595d){const _0x23d69a=a12_0x2b81,_0x3560bb=_0x3d4a67+_0x23d69a(0x19c),_0xaea16d=new AbortController(),_0x47f3a0=setTimeout(()=>_0xaea16d[_0x23d69a(0x18d)](),0x2710),_0x97fce0=await fetch(_0x3560bb,{'method':_0x23d69a(0x1b3),'headers':{'Content-Type':_0x23d69a(0x1b9)},'body':JSON[_0x23d69a(0x1a0)]({'code':_0x14595d}),'signal':_0xaea16d[_0x23d69a(0x1c8)]});clearTimeout(_0x47f3a0);if(!_0x97fce0['ok'])throw CliErrors['networkError'](_0x23d69a(0x1a7)+_0x97fce0[_0x23d69a(0x17c)]);const _0xb264a6=await _0x97fce0[_0x23d69a(0x17b)](),_0x49d4d1=_0xb264a6[_0x23d69a(0x1a9)]&&typeof _0xb264a6['data']===_0x23d69a(0x1a4)?_0xb264a6['data']:_0xb264a6;if(!_0x49d4d1||typeof _0x49d4d1[_0x23d69a(0x17c)]!=='string')throw CliErrors[_0x23d69a(0x18a)](_0x23d69a(0x1b7));return{'status':_0x49d4d1[_0x23d69a(0x17c)],'access_key':typeof _0x49d4d1[_0x23d69a(0x1a1)]===_0x23d69a(0x1a6)?_0x49d4d1[_0x23d69a(0x1a1)]:undefined};}export async function pollDeviceToken(_0x459db1,_0x196f6c,_0x4cf6f5){const _0x155e6b=a12_0x2b81;let _0x31417a=0x0;for(let _0x16a018=0x0;_0x16a018<MAX_POLLS;_0x16a018++){if(_0x4cf6f5[_0x155e6b(0x185)])throw CliErrors[_0x155e6b(0x1b4)](_0x155e6b(0x19e));let _0x5deead;try{_0x5deead=await fetchDeviceToken(_0x459db1,_0x196f6c);}catch(_0x412bfa){if(_0x412bfa instanceof Error&&_0x412bfa[_0x155e6b(0x17e)]===_0x155e6b(0x182))throw CliErrors[_0x155e6b(0x1b4)](_0x155e6b(0x19e));_0x31417a++;if(_0x31417a>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x155e6b(0x1a5)](_0x155e6b(0x187));writeCliSideChannelLine(_0x155e6b(0x199)+_0x31417a+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+'),\x20retrying...'),await sleep(POLL_INTERVAL_MS);continue;}_0x31417a=0x0;if(_0x5deead['status']===_0x155e6b(0x1bd)){if(!_0x5deead['access_key'])throw CliErrors[_0x155e6b(0x18a)]('Invalid\x20access_key\x20returned\x20by\x20server.');return _0x5deead['access_key'];}if(_0x5deead[_0x155e6b(0x17c)]===_0x155e6b(0x18f)){deleteStoredDeviceCode();throw CliErrors[_0x155e6b(0x1aa)](_0x155e6b(0x179));}const _0x171269=(_0x16a018+0x1)*POLL_INTERVAL_MS,_0x19ae0b=DEVICE_CODE_TTL_MS-_0x171269,_0x2ad807=Math[_0x155e6b(0x1c5)](_0x19ae0b/0xea60),_0x4e5f25=Math[_0x155e6b(0x1c5)](_0x19ae0b%0xea60/0x3e8);process[_0x155e6b(0x19b)][_0x155e6b(0x198)]('\x0dWaiting\x20for\x20authorization...\x20'+_0x2ad807+':'+String(_0x4e5f25)[_0x155e6b(0x1c3)](0x2,'0')+_0x155e6b(0x190)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x155e6b(0x1aa)](_0x155e6b(0x1b1));}function sleep(_0x3c576c){return new Promise(_0x15a574=>setTimeout(_0x15a574,_0x3c576c));}export const authDeviceDefinition={'service':a12_0xf94840(0x18e),'command':'device','description':a12_0xf94840(0x1a3),'risk':a12_0xf94840(0x198),'confirmationDescription':'Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0xf94840(0x1c6),'description':a12_0xf94840(0x1bc),'default':!![]},{'name':a12_0xf94840(0x1b6),'type':a12_0xf94840(0x1c6),'description':a12_0xf94840(0x17d),'default':![]},{'name':a12_0xf94840(0x193),'type':a12_0xf94840(0x1a6),'description':a12_0xf94840(0x1a8),'default':a12_0xf94840(0x17a)},{'name':a12_0xf94840(0x188),'type':a12_0xf94840(0x1c6),'description':'Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','default':![]}],async 'execute'(_0x40d3b5){const _0x40463f=a12_0xf94840,_0x3507ca=resolveAuthScopeFlags(_0x40d3b5),_0x234e1a=_0x3507ca[_0x40463f(0x1ac)]?'global':_0x40463f(0x1b6),_0x2e9d59=readScopedConfig(_0x3507ca);if(_0x2e9d59['accessKey'])return{'ok':!![],'message':_0x40463f(0x1c1)};const _0x24d8aa=(_0x40d3b5[_0x40463f(0x1ba)](_0x40463f(0x193))||'lovrabet-cli')[_0x40463f(0x1ad)](),_0x17218f=getUserDomain(),_0x3a63e7=readStoredDeviceCode(),_0x40df9d=_0x3a63e7&&!isStoredDeviceCodeExpired(_0x3a63e7)?_0x3a63e7[_0x40463f(0x17f)]:((()=>{const _0xeb9100=generateDeviceCode();return writeStoredDeviceCode(_0xeb9100,_0x234e1a),_0xeb9100;})()),_0x361991=buildDeviceAuthUrl(_0x17218f,_0x40df9d,_0x24d8aa);if(_0x40d3b5['bool'](_0x40463f(0x188)))return console[_0x40463f(0x1b8)](_0x361991),{'ok':!![]};writeCliSideChannelLine(_0x40463f(0x186)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x361991),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x40463f(0x192));if(_0x40d3b5[_0x40463f(0x197)])return writeCliSideChannelLine(_0x40463f(0x1ab)+CLI_BIN_NAME+_0x40463f(0x18b)),{'ok':!![],'message':_0x40463f(0x1b2)};writeCliSideChannelLine('Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...');const _0x5a79cc=new AbortController(),_0x3e097a=()=>{const _0x1ed40b=_0x40463f;_0x5a79cc[_0x1ed40b(0x18d)](),process[_0x1ed40b(0x1c2)](_0x1ed40b(0x19a),_0x3e097a);};process[_0x40463f(0x194)](_0x40463f(0x19a),_0x3e097a);let _0x59113f;try{_0x59113f=await pollDeviceToken(_0x17218f,_0x40df9d,_0x5a79cc[_0x40463f(0x1c8)]);}finally{process[_0x40463f(0x1c2)]('SIGINT',_0x3e097a);}if(!ACCESS_KEY_PATTERN[_0x40463f(0x1c7)](_0x59113f))throw CliErrors[_0x40463f(0x18a)](_0x40463f(0x180));const _0x16430f=readScopedConfig(_0x3507ca);return _0x16430f['accessKey']=_0x59113f,writeScopedConfig(_0x16430f,_0x3507ca),deleteStoredDeviceCode(),process[_0x40463f(0x19b)][_0x40463f(0x198)]('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x234e1a+_0x40463f(0x19f)),writeCliSideChannelLine(_0x40463f(0x183)+CLI_BIN_NAME+_0x40463f(0x19d)),{'ok':!![],'message':_0x40463f(0x189)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a13_0x188d76=a13_0x4b41;(function(_0x37e594,_0x14ecb0){const _0x25b18c=a13_0x4b41,_0x27f9c4=_0x37e594();while(!![]){try{const _0x4b511d=parseInt(_0x25b18c(0x202))/0x1*(parseInt(_0x25b18c(0x204))/0x2)+parseInt(_0x25b18c(0x210))/0x3*(-parseInt(_0x25b18c(0x1d1))/0x4)+parseInt(_0x25b18c(0x1bb))/0x5+-parseInt(_0x25b18c(0x211))/0x6*(parseInt(_0x25b18c(0x1ed))/0x7)+parseInt(_0x25b18c(0x1df))/0x8*(-parseInt(_0x25b18c(0x1f5))/0x9)+-parseInt(_0x25b18c(0x1ca))/0xa+parseInt(_0x25b18c(0x1db))/0xb;if(_0x4b511d===_0x14ecb0)break;else _0x27f9c4['push'](_0x27f9c4['shift']());}catch(_0x514e38){_0x27f9c4['push'](_0x27f9c4['shift']());}}}(a13_0x1f87,0x295d4));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';import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(_0x2d1a20=USER_ACCESS_KEY_CREATE_URL){const _0x1343b3=a13_0x4b41;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x1343b3(0x1dc)]+':'),writeCliSideChannelLine('\x0a'+_0x2d1a20+'\x0a'),writeCliSideChannelLine(_0x1343b3(0x205)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(_0x521349=USER_ACCESS_KEY_CREATE_URL){const _0x59fd49=a13_0x4b41;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x59fd49(0x1dc)]+':',_0x521349,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x59fd49(0x1fb)][_0x59fd49(0x1d7)]('\x0a');}function canPromptForAccessKey(_0xe4373c){const _0x4a8f8a=a13_0x4b41;return!_0xe4373c[_0x4a8f8a(0x203)]&&process[_0x4a8f8a(0x213)][_0x4a8f8a(0x1c0)]!==![]&&process[_0x4a8f8a(0x206)][_0x4a8f8a(0x1c0)]!==![];}function resolveAuthScopeFlags(_0x5f2d91){const _0x5ae2fb=a13_0x4b41;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5f2d91[_0x5ae2fb(0x1d3)](_0x5ae2fb(0x207)),'explicitProject':_0x5f2d91[_0x5ae2fb(0x1d3)](_0x5ae2fb(0x1c8)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x2ed4c9){const _0x2a1388=a13_0x4b41;let _0x28f25d=(_0x2ed4c9['str']('access-key')||_0x2ed4c9[_0x2a1388(0x216)]('ak')||'')['trim']();const _0x1ca878=(_0x2ed4c9[_0x2a1388(0x216)](_0x2a1388(0x1e2))||'')[_0x2a1388(0x1c7)](),_0x33af9d=''+getUserDomain()+PRODUCT_CONFIG[_0x2a1388(0x1e9)];if(!_0x28f25d&&canPromptForAccessKey(_0x2ed4c9))try{showAccessKeyCreateHint(_0x33af9d),_0x28f25d=await promptAccessKey('');}catch(_0x4b3475){if(isAbortPrompt(_0x4b3475))throw CliErrors[_0x2a1388(0x20a)]();throw _0x4b3475;}if(!_0x28f25d)throw CliErrors[_0x2a1388(0x1c4)]('Missing\x20accessKey.',buildAccessKeySetupGuide(_0x33af9d));if(!ACCESS_KEY_PATTERN[_0x2a1388(0x20d)](_0x28f25d))throw CliErrors[_0x2a1388(0x1c4)](_0x2a1388(0x1ea),_0x2a1388(0x1f0));if(!_0x1ca878)return{'accessKey':_0x28f25d};const _0x451767=normalizeEnv(_0x1ca878);return{'accessKey':_0x28f25d,'env':isDaily(_0x451767)?'daily':isDev(_0x451767)?'development':_0x2a1388(0x1e0)};}function a13_0x4b41(_0x52bfee,_0x14805d){_0x52bfee=_0x52bfee-0x1bb;const _0x1f8713=a13_0x1f87();let _0x4b4193=_0x1f8713[_0x52bfee];return _0x4b4193;}function a13_0x1f87(){const _0x165fda=['81198ETSJre','Shorthand\x20for\x20--access-key','stdin','status','\x20Current\x20env:\x20','str','`auth\x20login`\x20does\x20not\x20support\x20--yes.','789565bvzYrj','No\x20AccessKey\x20found\x20in\x20','Clear\x20from\x20global\x20config\x20(default)','push','AccessKey\x20cleared\x20from\x20','isTTY','Status:\x20valid','Option\x20B:\x20apps\x20config\x20(','boolean','validation','access_key','global\x20config','trim','project','authRequired','2882350IqZVSK','logout','accessKey','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','info','\x20\x20export\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','195236XKqBYi','scope','bool','Use\x20`','Show\x20current\x20authentication\x20status','login','join','access-key','expired','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','4328643GxEcYv','userCenterDisplayName','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','462048Taakxc','production','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','env','newConfigFileName','ACCESS_KEY','\x20config.','\x20auth\x20status','project\x20config','AccessKey:\x20','accessKeyCreatePath','Invalid\x20accessKey\x20format.','\x20env\x20var','success','35YnLGFj','\x20Verify:\x20','ClientAk','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','string','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','code','read','9tyEeRZ','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','Option\x20A:\x20','check','yes','auth','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','=ak_xxx','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','AccessKey\x20(ak_xxx...)','67YejuHL','nonInteractive','2402TdNMGf','Tip:\x20you\x20can\x20also\x20run:','stdout','global','Auth\x20mode:\x20','\x20(via\x20','cancelled','Then\x20verify\x20with:\x20','Option\x20C:\x20environment\x20variable','test','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','AccessKey\x20saved\x20to\x20','3VCtcuV'];a13_0x1f87=function(){return _0x165fda;};return a13_0x1f87();}export const authDefinitions=[{'service':a13_0x188d76(0x1fa),'command':a13_0x188d76(0x1d6),'description':a13_0x188d76(0x1f6),'risk':'write','confirmationDescription':a13_0x188d76(0x20e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x188d76(0x1d8),'type':a13_0x188d76(0x1f1),'description':a13_0x188d76(0x201)},{'name':'ak','type':'string','description':a13_0x188d76(0x212)},{'name':a13_0x188d76(0x207),'type':a13_0x188d76(0x1c3),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x188d76(0x1c8),'type':a13_0x188d76(0x1c3),'description':a13_0x188d76(0x200),'default':![]}],async 'execute'(_0x175ab5){const _0xf02897=a13_0x188d76;if(_0x175ab5[_0xf02897(0x1d3)](_0xf02897(0x1f9)))throw CliErrors[_0xf02897(0x1c4)](_0xf02897(0x217),_0xf02897(0x1d4)+CLI_BIN_NAME+_0xf02897(0x1fc)+CLI_BIN_NAME+_0xf02897(0x1fd));const _0x393371=(_0x175ab5[_0xf02897(0x216)]('access-key')||_0x175ab5[_0xf02897(0x216)]('ak')||'')[_0xf02897(0x1c7)]();if(!_0x393371&&_0x175ab5[_0xf02897(0x203)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0xf02897(0x1e9)])};const _0x46475b=await resolveAuthWriteInput(_0x175ab5),_0x49bbb2=resolveAuthScopeFlags(_0x175ab5),_0x26419f=readScopedConfig(_0x49bbb2);_0x26419f['accessKey']=_0x46475b[_0xf02897(0x1cc)];_0x46475b[_0xf02897(0x1e2)]&&(_0x26419f[_0xf02897(0x1e2)]=_0x46475b[_0xf02897(0x1e2)]);writeScopedConfig(_0x26419f,_0x49bbb2);const _0x29ea8d=_0x49bbb2[_0xf02897(0x207)]?_0xf02897(0x207):_0xf02897(0x1c8),_0x29d03c=_0x26419f['env']?_0xf02897(0x215)+_0x26419f[_0xf02897(0x1e2)]+'.':'';return{'ok':!![],'message':_0xf02897(0x20f)+_0x29ea8d+_0xf02897(0x1e5)+_0x29d03c+_0xf02897(0x1ee)+CLI_BIN_NAME+_0xf02897(0x1e6)};}},{'service':a13_0x188d76(0x1fa),'command':a13_0x188d76(0x1cb),'description':'Clear\x20the\x20AccessKey\x20from\x20config','risk':'write','confirmationDescription':a13_0x188d76(0x1de),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0x188d76(0x1c3),'description':a13_0x188d76(0x1bd),'default':!![]},{'name':'project','type':'boolean','description':a13_0x188d76(0x1ff),'default':![]}],async 'execute'(_0x355eda){const _0x30f57d=a13_0x188d76,_0x259c96=resolveAuthScopeFlags(_0x355eda),_0x4f08a5=readScopedConfig(_0x259c96),_0x40a2c0=!!_0x4f08a5[_0x30f57d(0x1cc)];delete _0x4f08a5['accessKey'],writeScopedConfig(_0x4f08a5,_0x259c96);const _0x28aa50=_0x259c96[_0x30f57d(0x207)]?_0x30f57d(0x207):'project';if(_0x40a2c0)return{'ok':!![],'message':_0x30f57d(0x1bf)+_0x28aa50+'\x20config.'};return{'ok':!![],'message':_0x30f57d(0x1bc)+_0x28aa50+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a13_0x188d76(0x1fa),'command':a13_0x188d76(0x214),'description':a13_0x188d76(0x1d5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0x188d76(0x1c3),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x188d76(0x1c8),'type':a13_0x188d76(0x1c3),'description':a13_0x188d76(0x1f2),'default':![]},{'name':a13_0x188d76(0x1f8),'type':'boolean','description':a13_0x188d76(0x1e1),'default':![]}],async 'execute'(_0x20a398){const _0x267de7=a13_0x188d76,_0x110456=resolveAuthScopeFlags(_0x20a398),_0x3e6179=readScopedConfig(_0x110456),_0x63a274=productEnvName(_0x267de7(0x1e4)),_0x2e6f39=productEnv('ACCESS_KEY')||undefined,_0x281cfe=_0x3e6179[_0x267de7(0x1cc)]||undefined,_0x5465cb=_0x2e6f39||_0x281cfe,_0x126e88=_0x2e6f39?_0x63a274+_0x267de7(0x1eb):_0x281cfe?(_0x110456[_0x267de7(0x207)]?_0x267de7(0x207):_0x267de7(0x1c8))+'\x20config':null,_0xed831=[_0x267de7(0x208)+AUTH_MODE[_0x267de7(0x1ef)]];if(_0x5465cb){const _0x1b6535=maskCliAccessKey(_0x5465cb);_0xed831[_0x267de7(0x1be)]('AccessKey:\x20'+_0x1b6535+(_0x126e88?'\x20(via\x20'+_0x126e88+')':'')),_0xed831[_0x267de7(0x1be)](_0x267de7(0x1c1));}if(!_0x5465cb){_0xed831['push'](''),_0xed831[_0x267de7(0x1be)](_0x267de7(0x1d0)),_0xed831[_0x267de7(0x1be)](''),_0xed831['push'](_0x267de7(0x1f7)+CLI_BIN_NAME+_0x267de7(0x1dd)),_0xed831[_0x267de7(0x1be)](''),_0xed831[_0x267de7(0x1be)](_0x267de7(0x1c2)+PRODUCT_CONFIG[_0x267de7(0x1e3)]+')'),_0xed831[_0x267de7(0x1be)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0xed831['push'](''),_0xed831['push'](_0x267de7(0x20c)),_0xed831[_0x267de7(0x1be)](_0x267de7(0x1cf)+_0x63a274+_0x267de7(0x1fe)),_0xed831[_0x267de7(0x1be)](''),_0xed831[_0x267de7(0x1be)](_0x267de7(0x20b)+CLI_BIN_NAME+'\x20auth\x20status'),_0xed831[_0x267de7(0x1be)](_0x267de7(0x1da)+CLI_BIN_NAME+'\x20doctor');if(_0x20a398[_0x267de7(0x1d3)]('check')){const _0x366183=readStoredDeviceCode();if(_0x366183&&!isStoredDeviceCodeExpired(_0x366183)){const _0x461b92=getUserDomain(),_0x5f0305=await fetchDeviceToken(_0x461b92,_0x366183[_0x267de7(0x1f3)]);if(_0x5f0305[_0x267de7(0x214)]===_0x267de7(0x1ec)&&_0x5f0305['access_key']){const _0x512e49={'global':_0x366183[_0x267de7(0x1d2)]===_0x267de7(0x207)},_0x4dd75d=readScopedConfig(_0x512e49);_0x4dd75d[_0x267de7(0x1cc)]=_0x5f0305[_0x267de7(0x1c5)],writeScopedConfig(_0x4dd75d,_0x512e49),deleteStoredDeviceCode();const _0x2c082c=_0x5f0305['access_key'],_0x52c1c0=maskCliAccessKey(_0x2c082c),_0x2b82a1=_0x366183['scope']===_0x267de7(0x207)?_0x267de7(0x1c6):_0x267de7(0x1e7);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE[_0x267de7(0x1ef)],_0x267de7(0x1e8)+_0x52c1c0+_0x267de7(0x209)+_0x2b82a1+')','Status:\x20valid'][_0x267de7(0x1d7)]('\x0a')};}_0x5f0305[_0x267de7(0x214)]===_0x267de7(0x1d9)&&deleteStoredDeviceCode();throw CliErrors[_0x267de7(0x1c9)](_0x267de7(0x1cd));}throw CliErrors[_0x267de7(0x1c9)](_0xed831['join']('\x0a'));}}return{'ok':!![],'message':_0xed831[_0x267de7(0x1d7)]('\x0a')};}},{'service':a13_0x188d76(0x1fa),'command':a13_0x188d76(0x1ce),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a13_0x188d76(0x1f4),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3122c7){const _0x7d830b=a13_0x188d76,_0x56ae59=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x56ae59,'meta':{'env':_0x3122c7['envName']??_0x7d830b(0x1e0)}}};}},authDeviceDefinition];
|
|
1
|
+
const a13_0x3537de=a13_0x47b5;(function(_0x1589c7,_0x1c97d3){const _0x1d0690=a13_0x47b5,_0x32ab69=_0x1589c7();while(!![]){try{const _0x3ce7c0=-parseInt(_0x1d0690(0x115))/0x1+parseInt(_0x1d0690(0x10a))/0x2*(-parseInt(_0x1d0690(0x139))/0x3)+-parseInt(_0x1d0690(0xf2))/0x4+parseInt(_0x1d0690(0x11a))/0x5*(-parseInt(_0x1d0690(0x121))/0x6)+-parseInt(_0x1d0690(0x133))/0x7*(parseInt(_0x1d0690(0x103))/0x8)+-parseInt(_0x1d0690(0x122))/0x9*(-parseInt(_0x1d0690(0x145))/0xa)+parseInt(_0x1d0690(0x116))/0xb*(parseInt(_0x1d0690(0x13e))/0xc);if(_0x3ce7c0===_0x1c97d3)break;else _0x32ab69['push'](_0x32ab69['shift']());}catch(_0x8df9dd){_0x32ab69['push'](_0x32ab69['shift']());}}}(a13_0x403d,0x4c7fe));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a13_0x47b5(_0x29cc37,_0x190f34){_0x29cc37=_0x29cc37-0xe5;const _0x403d65=a13_0x403d();let _0x47b5d6=_0x403d65[_0x29cc37];return _0x47b5d6;}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';function a13_0x403d(){const _0x178bbb=['Invalid\x20accessKey\x20format.','global\x20config','authRequired','cancelled','Show\x20current\x20authentication\x20status','access-key','push','\x20doctor','\x20\x20export\x20','143895npUTIz','21015775pNvcho','Option\x20C:\x20environment\x20variable','ACCESS_KEY','yes','78655RITHBR','newConfigFileName','\x20config','AccessKey\x20cleared\x20from\x20','AccessKey:\x20','bool','global-default','186pxGSzM','1418733IOcMTD','ClientAk','stdin','string','project','test','Tip:\x20you\x20can\x20also\x20run:','expired','access_key','code','=ak_xxx','boolean','logout','read','Write\x20to\x20global\x20config\x20(default)','\x20config.\x20Nothing\x20to\x20clear.','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','2051hmytUD','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','production','Option\x20A:\x20','Use\x20`','global','18867XzcRpr','AccessKey\x20saved\x20to\x20','auth','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Auth\x20mode:\x20','12GqpFPw','\x20config.','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Option\x20B:\x20apps\x20config\x20(','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','\x20Verify:\x20','30UPGFio','trim','check','stdout','join','env','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','accessKeyCreatePath','No\x20AccessKey\x20found\x20in\x20','AccessKey\x20(ak_xxx...)','scope','status','\x20(via\x20','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','1467364zvTEmi','str','Then\x20verify\x20with:\x20','\x20Current\x20env:\x20','nonInteractive','write','\x20auth\x20status','validation','Shorthand\x20for\x20--access-key','Missing\x20accessKey.','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','\x20env\x20var','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','envName','info','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Status:\x20valid','15696dBrzVA','login','development','project\x20config','userCenterDisplayName','isTTY','accessKey','158LgotSC','Clear\x20the\x20AccessKey\x20from\x20config'];a13_0x403d=function(){return _0x178bbb;};return a13_0x403d();}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';import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(_0x4d881f=USER_ACCESS_KEY_CREATE_URL){const _0x47f71c=a13_0x47b5;writeCliSideChannelLine(_0x47f71c(0xf1)+PRODUCT_CONFIG[_0x47f71c(0x107)]+':'),writeCliSideChannelLine('\x0a'+_0x4d881f+'\x0a'),writeCliSideChannelLine(_0x47f71c(0x128)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(_0x7b2f73=USER_ACCESS_KEY_CREATE_URL){const _0x4c8b39=a13_0x47b5;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x4c8b39(0x107)]+':',_0x7b2f73,_0x4c8b39(0x140)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x53f99f){const _0x13064c=a13_0x47b5;return!_0x53f99f[_0x13064c(0xf6)]&&process[_0x13064c(0x124)][_0x13064c(0x108)]!==![]&&process[_0x13064c(0xe7)][_0x13064c(0x108)]!==![];}function resolveAuthScopeFlags(_0x45fa2f){const _0x27244e=a13_0x47b5;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x45fa2f[_0x27244e(0x11f)]('global'),'explicitProject':_0x45fa2f[_0x27244e(0x11f)](_0x27244e(0x126)),'policy':_0x27244e(0x120)}));}async function resolveAuthWriteInput(_0x46abe6){const _0x1c2bf6=a13_0x47b5;let _0x1e61e0=(_0x46abe6[_0x1c2bf6(0xf3)](_0x1c2bf6(0x111))||_0x46abe6[_0x1c2bf6(0xf3)]('ak')||'')[_0x1c2bf6(0xe5)]();const _0x4d8112=(_0x46abe6['str']('env')||'')[_0x1c2bf6(0xe5)](),_0x42273a=''+getUserDomain()+PRODUCT_CONFIG[_0x1c2bf6(0xeb)];if(!_0x1e61e0&&canPromptForAccessKey(_0x46abe6))try{showAccessKeyCreateHint(_0x42273a),_0x1e61e0=await promptAccessKey('');}catch(_0x5d26f7){if(isAbortPrompt(_0x5d26f7))throw CliErrors[_0x1c2bf6(0x10f)]();throw _0x5d26f7;}if(!_0x1e61e0)throw CliErrors[_0x1c2bf6(0xf9)](_0x1c2bf6(0xfb),buildAccessKeySetupGuide(_0x42273a));if(!ACCESS_KEY_PATTERN[_0x1c2bf6(0x127)](_0x1e61e0))throw CliErrors[_0x1c2bf6(0xf9)](_0x1c2bf6(0x10c),'Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x4d8112)return{'accessKey':_0x1e61e0};const _0x5b601d=normalizeEnv(_0x4d8112);return{'accessKey':_0x1e61e0,'env':isDaily(_0x5b601d)?'daily':isDev(_0x5b601d)?_0x1c2bf6(0x105):_0x1c2bf6(0x135)};}export const authDefinitions=[{'service':a13_0x3537de(0x13b),'command':a13_0x3537de(0x104),'description':a13_0x3537de(0x143),'risk':a13_0x3537de(0xf7),'confirmationDescription':'Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x3537de(0x111),'type':a13_0x3537de(0x125),'description':a13_0x3537de(0xed)},{'name':'ak','type':a13_0x3537de(0x125),'description':a13_0x3537de(0xfa)},{'name':a13_0x3537de(0x138),'type':a13_0x3537de(0x12d),'description':a13_0x3537de(0x130),'default':!![]},{'name':'project','type':'boolean','description':a13_0x3537de(0x13c),'default':![]}],async 'execute'(_0x5aeae0){const _0x429b20=a13_0x3537de;if(_0x5aeae0[_0x429b20(0x11f)](_0x429b20(0x119)))throw CliErrors['validation']('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x429b20(0x137)+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 _0x4ee127=(_0x5aeae0[_0x429b20(0xf3)]('access-key')||_0x5aeae0[_0x429b20(0xf3)]('ak')||'')['trim']();if(!_0x4ee127&&_0x5aeae0[_0x429b20(0xf6)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'])};const _0x3a0e63=await resolveAuthWriteInput(_0x5aeae0),_0x33a83c=resolveAuthScopeFlags(_0x5aeae0),_0x2783e8=readScopedConfig(_0x33a83c);_0x2783e8['accessKey']=_0x3a0e63['accessKey'];_0x3a0e63[_0x429b20(0xe9)]&&(_0x2783e8[_0x429b20(0xe9)]=_0x3a0e63[_0x429b20(0xe9)]);writeScopedConfig(_0x2783e8,_0x33a83c);const _0x1e696c=_0x33a83c[_0x429b20(0x138)]?_0x429b20(0x138):_0x429b20(0x126),_0x288c40=_0x2783e8[_0x429b20(0xe9)]?_0x429b20(0xf5)+_0x2783e8[_0x429b20(0xe9)]+'.':'';return{'ok':!![],'message':_0x429b20(0x13a)+_0x1e696c+'\x20config.'+_0x288c40+_0x429b20(0x144)+CLI_BIN_NAME+_0x429b20(0xf8)};}},{'service':a13_0x3537de(0x13b),'command':a13_0x3537de(0x12e),'description':a13_0x3537de(0x10b),'risk':a13_0x3537de(0xf7),'confirmationDescription':a13_0x3537de(0xfc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x3537de(0x138),'type':'boolean','description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a13_0x3537de(0x12d),'description':a13_0x3537de(0x141),'default':![]}],async 'execute'(_0x142fe0){const _0x5748bc=a13_0x3537de,_0x2e3ce3=resolveAuthScopeFlags(_0x142fe0),_0x49abcd=readScopedConfig(_0x2e3ce3),_0x3b42ac=!!_0x49abcd[_0x5748bc(0x109)];delete _0x49abcd[_0x5748bc(0x109)],writeScopedConfig(_0x49abcd,_0x2e3ce3);const _0x2d3b8e=_0x2e3ce3[_0x5748bc(0x138)]?_0x5748bc(0x138):_0x5748bc(0x126);if(_0x3b42ac)return{'ok':!![],'message':_0x5748bc(0x11d)+_0x2d3b8e+_0x5748bc(0x13f)};return{'ok':!![],'message':_0x5748bc(0xec)+_0x2d3b8e+_0x5748bc(0x131)};}},{'service':a13_0x3537de(0x13b),'command':a13_0x3537de(0xef),'description':a13_0x3537de(0x110),'risk':a13_0x3537de(0x12f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0x3537de(0x12d),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a13_0x3537de(0x101),'default':![]},{'name':a13_0x3537de(0xe6),'type':a13_0x3537de(0x12d),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x512127){const _0xccf303=a13_0x3537de,_0x4bea36=resolveAuthScopeFlags(_0x512127),_0x45cb0b=readScopedConfig(_0x4bea36),_0x30ff2a=productEnvName(_0xccf303(0x118)),_0x346342=productEnv(_0xccf303(0x118))||undefined,_0x33b105=_0x45cb0b[_0xccf303(0x109)]||undefined,_0x589d8d=_0x346342||_0x33b105,_0x22a389=_0x346342?_0x30ff2a+_0xccf303(0xfd):_0x33b105?(_0x4bea36[_0xccf303(0x138)]?_0xccf303(0x138):'project')+_0xccf303(0x11c):null,_0x4135b6=[_0xccf303(0x13d)+AUTH_MODE['ClientAk']];if(_0x589d8d){const _0x171034=maskCliAccessKey(_0x589d8d);_0x4135b6[_0xccf303(0x112)](_0xccf303(0x11e)+_0x171034+(_0x22a389?_0xccf303(0xf0)+_0x22a389+')':'')),_0x4135b6[_0xccf303(0x112)]('Status:\x20valid');}if(!_0x589d8d){_0x4135b6[_0xccf303(0x112)](''),_0x4135b6[_0xccf303(0x112)](_0xccf303(0xfe)),_0x4135b6['push'](''),_0x4135b6[_0xccf303(0x112)](_0xccf303(0x136)+CLI_BIN_NAME+_0xccf303(0xea)),_0x4135b6[_0xccf303(0x112)](''),_0x4135b6[_0xccf303(0x112)](_0xccf303(0x142)+PRODUCT_CONFIG[_0xccf303(0x11b)]+')'),_0x4135b6['push'](_0xccf303(0x134)),_0x4135b6[_0xccf303(0x112)](''),_0x4135b6[_0xccf303(0x112)](_0xccf303(0x117)),_0x4135b6[_0xccf303(0x112)](_0xccf303(0x114)+_0x30ff2a+_0xccf303(0x12c)),_0x4135b6[_0xccf303(0x112)](''),_0x4135b6[_0xccf303(0x112)](_0xccf303(0xf4)+CLI_BIN_NAME+_0xccf303(0xf8)),_0x4135b6[_0xccf303(0x112)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0xccf303(0x113));if(_0x512127[_0xccf303(0x11f)](_0xccf303(0xe6))){const _0x26ac00=readStoredDeviceCode();if(_0x26ac00&&!isStoredDeviceCodeExpired(_0x26ac00)){const _0x286f70=getUserDomain(),_0x59858e=await fetchDeviceToken(_0x286f70,_0x26ac00[_0xccf303(0x12b)]);if(_0x59858e[_0xccf303(0xef)]==='success'&&_0x59858e[_0xccf303(0x12a)]){const _0xc59af2={'global':_0x26ac00[_0xccf303(0xee)]===_0xccf303(0x138)},_0x478a16=readScopedConfig(_0xc59af2);_0x478a16['accessKey']=_0x59858e[_0xccf303(0x12a)],writeScopedConfig(_0x478a16,_0xc59af2),deleteStoredDeviceCode();const _0x2c25f4=_0x59858e[_0xccf303(0x12a)],_0x124309=maskCliAccessKey(_0x2c25f4),_0x2689d0=_0x26ac00[_0xccf303(0xee)]===_0xccf303(0x138)?_0xccf303(0x10d):_0xccf303(0x106);return{'ok':!![],'message':[_0xccf303(0x13d)+AUTH_MODE[_0xccf303(0x123)],_0xccf303(0x11e)+_0x124309+_0xccf303(0xf0)+_0x2689d0+')',_0xccf303(0x102)][_0xccf303(0xe8)]('\x0a')};}_0x59858e[_0xccf303(0xef)]===_0xccf303(0x129)&&deleteStoredDeviceCode();throw CliErrors[_0xccf303(0x10e)](_0xccf303(0x132));}throw CliErrors[_0xccf303(0x10e)](_0x4135b6[_0xccf303(0xe8)]('\x0a'));}}return{'ok':!![],'message':_0x4135b6[_0xccf303(0xe8)]('\x0a')};}},{'service':'auth','command':a13_0x3537de(0x100),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x38694e){const _0x5b418a=a13_0x3537de,_0x10d3ce=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x10d3ce,'meta':{'env':_0x38694e[_0x5b418a(0xff)]??'production'}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x565b38,_0x14e613){const _0x39ebb9=a14_0x562f,_0x350636=_0x565b38();while(!![]){try{const _0x4a5d16=parseInt(_0x39ebb9(0xe8))/0x1*(parseInt(_0x39ebb9(0xf0))/0x2)+-parseInt(_0x39ebb9(0xf2))/0x3+-parseInt(_0x39ebb9(0xe1))/0x4*(parseInt(_0x39ebb9(0xeb))/0x5)+-parseInt(_0x39ebb9(0xe6))/0x6*(-parseInt(_0x39ebb9(0xe2))/0x7)+-parseInt(_0x39ebb9(0xe3))/0x8*(parseInt(_0x39ebb9(0xe0))/0x9)+-parseInt(_0x39ebb9(0xea))/0xa+parseInt(_0x39ebb9(0xf7))/0xb;if(_0x4a5d16===_0x14e613)break;else _0x350636['push'](_0x350636['shift']());}catch(_0x43142c){_0x350636['push'](_0x350636['shift']());}}}(a14_0x19cd,0x66fb3));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x4adc9a=a14_0x562f;super(_0x4adc9a(0xec)),this['name']=_0x4adc9a(0xf6);}}function createSafeRl(){const _0x52e78b=a14_0x562f,_0xed436c=createInterface({'input':process[_0x52e78b(0xe5)],'output':process[_0x52e78b(0xf3)]});let _0x40fb90;const _0x574714=new Promise((_0xf93427,_0x9817cf)=>{const _0x33100e=_0x52e78b;_0x40fb90=()=>{const _0x45622b=a14_0x562f;_0x40fb90&&(_0xed436c[_0x45622b(0xe4)](_0x45622b(0xe9),_0x40fb90),_0x40fb90=undefined);try{_0xed436c[_0x45622b(0xf4)]();}catch{}_0x9817cf(new AbortPrompt());},_0xed436c[_0x33100e(0xee)](_0x33100e(0xe9),_0x40fb90);}),_0x8dc139=()=>{const _0x56d57f=_0x52e78b;_0x40fb90&&(_0xed436c[_0x56d57f(0xe4)](_0x56d57f(0xe9),_0x40fb90),_0x40fb90=undefined);try{_0xed436c[_0x56d57f(0xf4)]();}catch{}};return{'rl':_0xed436c,'abortPromise':_0x574714,'disposeSuccess':_0x8dc139};}export async function promptAccessKey(_0x432c22=''){const _0x2467d5=a14_0x562f,{rl:_0x36d6a5,abortPromise:_0x9d39dd,disposeSuccess:_0x11b0f5}=createSafeRl(),_0xe67f55=new Promise(_0x41018b=>{const _0x3f90bd=a14_0x562f,_0x13364e=_0x432c22?_0x3f90bd(0xf5)+_0x432c22+_0x3f90bd(0xed):_0x3f90bd(0xf1);_0x36d6a5[_0x3f90bd(0xef)](_0x13364e,_0x3a44e7=>{_0x11b0f5(),_0x41018b(_0x3a44e7['trim']()||_0x432c22);});});return Promise[_0x2467d5(0xe7)]([_0xe67f55,_0x9d39dd]);}function a14_0x19cd(){const _0x140530=['707gdPxeb','8kHujzV','removeListener','stdin','46398vQcsWK','race','125EbalKA','SIGINT','1877750yrXRuk','135AIpjiW','User\x20aborted\x20prompt','):\x20','once','question','9908ljpfop','AccessKey\x20(paste\x20ak_...):\x20','2355648QkzJbJ','stdout','close','AccessKey\x20(','AbortPrompt','9640378YYXyHS','881406zBaXxz','116140hKJYnI'];a14_0x19cd=function(){return _0x140530;};return a14_0x19cd();}function a14_0x562f(_0x1059bf,_0x9346a){_0x1059bf=_0x1059bf-0xe0;const _0x19cd26=a14_0x19cd();let _0x562f46=_0x19cd26[_0x1059bf];return _0x562f46;}export function isAbortPrompt(_0x1c3f57){const _0x47bce4=a14_0x562f;return _0x1c3f57 instanceof Error&&_0x1c3f57['name']===_0x47bce4(0xf6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x4e9d(_0xb90dd6,_0x1eb21c){_0xb90dd6=_0xb90dd6-0x170;const _0x260f48=a15_0x260f();let _0x4e9d5e=_0x260f48[_0xb90dd6];return _0x4e9d5e;}const a15_0x4e2824=a15_0x4e9d;(function(_0x1dba27,_0x335b78){const _0x7f00af=a15_0x4e9d,_0x51494c=_0x1dba27();while(!![]){try{const _0x41ef24=-parseInt(_0x7f00af(0x173))/0x1*(-parseInt(_0x7f00af(0x17a))/0x2)+-parseInt(_0x7f00af(0x183))/0x3*(parseInt(_0x7f00af(0x180))/0x4)+-parseInt(_0x7f00af(0x17b))/0x5+-parseInt(_0x7f00af(0x175))/0x6+-parseInt(_0x7f00af(0x170))/0x7*(parseInt(_0x7f00af(0x17e))/0x8)+parseInt(_0x7f00af(0x174))/0x9+parseInt(_0x7f00af(0x177))/0xa*(parseInt(_0x7f00af(0x171))/0xb);if(_0x41ef24===_0x335b78)break;else _0x51494c['push'](_0x51494c['shift']());}catch(_0xc2cfcf){_0x51494c['push'](_0x51494c['shift']());}}}(a15_0x260f,0x40488));function a15_0x260f(){const _0x189975=['gmtModified','10XxmaGM','appCode','detail','4diaZSV','1931935ttkFvi','Backend\x20Function\x20name','version','453976kvgQCt','(none)','18980JaNDNK','str','functionName','192ewjBeG','name','21JUvukU','14496427dqDteG','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','39857rcWdOV','1846125InSTpu','2874504wTnFqd'];a15_0x260f=function(){return _0x189975;};return a15_0x260f();}import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':'bff','command':a15_0x4e2824(0x179),'description':a15_0x4e2824(0x172),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x4e2824(0x17c)}],async 'execute'(_0x4c4e2f){const _0x3a56d8=a15_0x4e2824,_0x13ba89=await getBffEndpointContract(_0x4c4e2f[_0x3a56d8(0x178)],_0x4c4e2f[_0x3a56d8(0x181)](_0x3a56d8(0x184)));return{'ok':!![],'data':{'appCode':_0x13ba89[_0x3a56d8(0x178)],'functionName':_0x13ba89[_0x3a56d8(0x182)],'description':_0x13ba89['description']||_0x3a56d8(0x17f),'version':_0x13ba89[_0x3a56d8(0x17d)],'gmtModified':_0x13ba89[_0x3a56d8(0x176)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x4bc810=a16_0x5482;function a16_0x5482(_0x503de5,_0x2fac2d){_0x503de5=_0x503de5-0xf5;const _0x52e4a7=a16_0x52e4();let _0x548237=_0x52e4a7[_0x503de5];return _0x548237;}(function(_0x5ab713,_0x1745ee){const _0x4d7cca=a16_0x5482,_0x442539=_0x5ab713();while(!![]){try{const _0x4e4882=parseInt(_0x4d7cca(0xf5))/0x1+parseInt(_0x4d7cca(0xff))/0x2+-parseInt(_0x4d7cca(0xf6))/0x3+parseInt(_0x4d7cca(0x100))/0x4+parseInt(_0x4d7cca(0xf9))/0x5+-parseInt(_0x4d7cca(0xfe))/0x6+parseInt(_0x4d7cca(0x102))/0x7*(-parseInt(_0x4d7cca(0xf7))/0x8);if(_0x4e4882===_0x1745ee)break;else _0x442539['push'](_0x442539['shift']());}catch(_0x2e7e6e){_0x442539['push'](_0x442539['shift']());}}}(a16_0x52e4,0x4d081));function a16_0x52e4(){const _0x22cef0=['3856328TKBTYL','read','1638580BQgaTX','str','params','name','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','2255502nCymwb','300034mYDTqt','1435988rMhYpQ','now','7PajSOP','Backend\x20Function\x20name\x20to\x20execute','517711OnFXns','542886aoOpXf'];a16_0x52e4=function(){return _0x22cef0;};return a16_0x52e4();}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':'exec','description':a16_0x4bc810(0xfd),'risk':a16_0x4bc810(0xf8),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x4bc810(0x103)},PARAMS_FLAG],async 'execute'(_0x25c468){const _0x35d875=a16_0x4bc810,_0x5e5a8f=parseJsonParams(_0x25c468[_0x35d875(0xfa)](_0x35d875(0xfb))),_0x2c1657=Date[_0x35d875(0x101)](),_0x158975=await executeSdkBff(_0x25c468[_0x35d875(0xfa)](_0x35d875(0xfc)),_0x5e5a8f),_0x2d8aef=Date[_0x35d875(0x101)]()-_0x2c1657;return{'ok':!![],'data':{'result':_0x158975,'elapsed':_0x2d8aef},'message':'Backend\x20Function\x20executed\x20in\x20'+_0x2d8aef+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a17_0xfe18(_0x94394f,_0xb0bb12){_0x94394f=_0x94394f-0x164;const _0x3a8064=a17_0x3a80();let _0xfe18b1=_0x3a8064[_0x94394f];return _0xfe18b1;}function a17_0x3a80(){const _0x20e642=['6WEFBWf','4213DcBWkJ','1657880HlFhEy','6119990ptRWlH','11tfLpUr','906455XLTAse','66DZNGMX','8IIyMSU','200373ZPNzGI','98793UNhnjG','1358651wkvOGH'];a17_0x3a80=function(){return _0x20e642;};return a17_0x3a80();}(function(_0x4685f8,_0x116b95){const _0xe3dd90=a17_0xfe18,_0x5a9f5a=_0x4685f8();while(!![]){try{const _0x1d8e8=parseInt(_0xe3dd90(0x165))/0x1*(-parseInt(_0xe3dd90(0x16a))/0x2)+parseInt(_0xe3dd90(0x16c))/0x3*(-parseInt(_0xe3dd90(0x16b))/0x4)+-parseInt(_0xe3dd90(0x169))/0x5*(-parseInt(_0xe3dd90(0x164))/0x6)+-parseInt(_0xe3dd90(0x16e))/0x7+-parseInt(_0xe3dd90(0x166))/0x8+-parseInt(_0xe3dd90(0x16d))/0x9+-parseInt(_0xe3dd90(0x167))/0xa*(-parseInt(_0xe3dd90(0x168))/0xb);if(_0x1d8e8===_0x116b95)break;else _0x5a9f5a['push'](_0x5a9f5a['shift']());}catch(_0x128e2b){_0x5a9f5a['push'](_0x5a9f5a['shift']());}}}(a17_0x3a80,0x1a756));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x167cb3=a18_0x599c;(function(_0x337b3c,_0xaa080e){const _0x28aa98=a18_0x599c,_0x37e883=_0x337b3c();while(!![]){try{const _0x2652b9=parseInt(_0x28aa98(0x192))/0x1*(parseInt(_0x28aa98(0x185))/0x2)+parseInt(_0x28aa98(0x1a0))/0x3+parseInt(_0x28aa98(0x18d))/0x4*(-parseInt(_0x28aa98(0x189))/0x5)+-parseInt(_0x28aa98(0x198))/0x6+parseInt(_0x28aa98(0x188))/0x7*(-parseInt(_0x28aa98(0x18b))/0x8)+parseInt(_0x28aa98(0x19b))/0x9+parseInt(_0x28aa98(0x19f))/0xa;if(_0x2652b9===_0xaa080e)break;else _0x37e883['push'](_0x37e883['shift']());}catch(_0x1fa284){_0x37e883['push'](_0x37e883['shift']());}}}(a18_0xb073,0x8c28e));import{CliErrors}from'../../errors.js';function a18_0x599c(_0x19aa68,_0x5579e0){_0x19aa68=_0x19aa68-0x182;const _0xb073f1=a18_0xb073();let _0x599c7=_0xb073f1[_0x19aa68];return _0x599c7;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a18_0x167cb3(0x1a3),'command':a18_0x167cb3(0x183),'description':a18_0x167cb3(0x191),'risk':a18_0x167cb3(0x196),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xad6e52){const _0x1d7f65=a18_0x167cb3;logger[_0x1d7f65(0x195)](process[_0x1d7f65(0x18f)]()),logger[_0x1d7f65(0x194)]('cli-skill-install',_0x1d7f65(0x184));const _0x36801a=installBuiltinSkill({'stdio':_0xad6e52['nonInteractive']?_0x1d7f65(0x190):_0x1d7f65(0x182)});if(!_0x36801a['ok'])throw CliErrors[_0x1d7f65(0x187)](_0x1d7f65(0x1a1)+(_0x36801a['code']||_0x1d7f65(0x19a))+_0x1d7f65(0x193)+(_0x36801a[_0x1d7f65(0x199)]||_0x1d7f65(0x18a)),_0x1d7f65(0x19d)+_0x36801a['repairCommand']);const _0x50e6a0=_0x36801a[_0x1d7f65(0x186)]?_0x1d7f65(0x18c)+_0x36801a[_0x1d7f65(0x186)]:'';return console[_0x1d7f65(0x197)](_0x36801a[_0x1d7f65(0x1a2)]?_0x1d7f65(0x18e)+_0x36801a[_0x1d7f65(0x19e)]+'\x20installed'+_0x50e6a0:'CLI\x20Built-in\x20Skill\x20'+_0x36801a[_0x1d7f65(0x19e)]+_0x1d7f65(0x19c)+_0x50e6a0),{'ok':!![]};}}];function a18_0xb073(){const _0x4261ec=['unknown','4051144uQVqXz','\x20at\x20','4bCavco','CLI\x20Built-in\x20Skill\x20','cwd','pipe','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','647HirepQ',']:\x20','info','setLogPath','read','log','3160650tzgbIm','error','INSTALL_FAILED','7047513WeChQO','\x20is\x20already\x20current','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','skillVersion','9861520QHeWNO','65874rVPcnk','Built-in\x20Skill\x20install\x20failed\x20[','changed','cli-skill','inherit','install','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','776zyfEoX','installedPath','apiError','7diQcil','2174705SUoAHq'];a18_0xb073=function(){return _0x4261ec;};return a18_0xb073();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4bdc78,_0x14fed4){const _0x1519e9=a19_0x253b,_0x2ad8e2=_0x4bdc78();while(!![]){try{const _0x5b7eb0=-parseInt(_0x1519e9(0x88))/0x1+parseInt(_0x1519e9(0x7b))/0x2*(-parseInt(_0x1519e9(0x8d))/0x3)+-parseInt(_0x1519e9(0x8e))/0x4+parseInt(_0x1519e9(0x81))/0x5*(parseInt(_0x1519e9(0x8b))/0x6)+-parseInt(_0x1519e9(0x8f))/0x7*(parseInt(_0x1519e9(0x7e))/0x8)+parseInt(_0x1519e9(0x8a))/0x9+parseInt(_0x1519e9(0x84))/0xa;if(_0x5b7eb0===_0x14fed4)break;else _0x2ad8e2['push'](_0x2ad8e2['shift']());}catch(_0x39bcfe){_0x2ad8e2['push'](_0x2ad8e2['shift']());}}}(a19_0x2ac8,0x2a7e8));function a19_0x253b(_0xccb07,_0x1b8960){_0xccb07=_0xccb07-0x79;const _0x2ac832=a19_0x2ac8();let _0x253b86=_0x2ac832[_0xccb07];return _0x253b86;}function a19_0x2ac8(){const _0x324d87=['1559130tGAltJ','Add\x20--global\x20to\x20write\x20to\x20~/','project','\x20(global)','118542rUzwyC','inProject','1962729zqTtST','1356IbwYSy','Not\x20inside\x20a\x20project\x20(no\x20','3OrRzhf','158900sCMESu','14GQfOaE','global','newConfigFileName','158318YBrdsE','global-default','\x20found).','447592losMsj','\x20first.','validation','3305eCQAPm','project-or-global-explicit','Use\x20only\x20one\x20config\x20scope\x20flag.'];a19_0x2ac8=function(){return _0x324d87;};return a19_0x2ac8();}import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export function resolveConfigScope(_0x1aa332){const _0x288ed8=a19_0x253b,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x22cad8}=_0x1aa332;if(explicitGlobal&&explicitProject)throw CliErrors['validation']('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x288ed8(0x83));if(explicitGlobal)return _0x288ed8(0x79);if(explicitProject)return _0x288ed8(0x86);switch(_0x22cad8){case _0x288ed8(0x7c):return'global';case _0x288ed8(0x82):if(!(_0x1aa332[_0x288ed8(0x89)]??isInProject()))throw CliErrors[_0x288ed8(0x80)](_0x288ed8(0x8c)+PRODUCT_CONFIG[_0x288ed8(0x7a)]+_0x288ed8(0x7d),_0x288ed8(0x85)+PRODUCT_CONFIG['newConfigFileName']+',\x20or\x20create\x20a\x20project-local\x20'+PRODUCT_CONFIG['newConfigFileName']+_0x288ed8(0x7f));return _0x288ed8(0x86);}}export function toScopeFlags(_0x355c60){const _0x56f56d=a19_0x253b;return{'global':_0x355c60===_0x56f56d(0x79)};}export function formatScopeLabel(_0x308975){const _0x98efaa=a19_0x253b;return _0x308975==='global'?_0x98efaa(0x87):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b3080,_0xa6ef6a){const _0x1ace11=a20_0x45d7,_0x2998da=_0x3b3080();while(!![]){try{const _0xf8fc5f=-parseInt(_0x1ace11(0x1a1))/0x1*(parseInt(_0x1ace11(0x1b0))/0x2)+parseInt(_0x1ace11(0x1ae))/0x3+-parseInt(_0x1ace11(0x1b6))/0x4*(-parseInt(_0x1ace11(0x1a6))/0x5)+parseInt(_0x1ace11(0x1a8))/0x6*(parseInt(_0x1ace11(0x19f))/0x7)+parseInt(_0x1ace11(0x19a))/0x8*(parseInt(_0x1ace11(0x19c))/0x9)+-parseInt(_0x1ace11(0x1b2))/0xa+-parseInt(_0x1ace11(0x1a4))/0xb*(parseInt(_0x1ace11(0x1af))/0xc);if(_0xf8fc5f===_0xa6ef6a)break;else _0x2998da['push'](_0x2998da['shift']());}catch(_0x43fa9f){_0x2998da['push'](_0x2998da['shift']());}}}(a20_0x165d,0x32477));function a20_0x45d7(_0x2f854e,_0x3ead9f){_0x2f854e=_0x2f854e-0x199;const _0x165d18=a20_0x165d();let _0x45d772=_0x165d18[_0x2f854e];return _0x45d772;}import{CliErrors}from'../../errors.js';function isSet(_0x435c9c,_0x2ba7a2){const _0x37db65=a20_0x45d7,_0x154c94=_0x435c9c[_0x37db65(0x19d)](_0x2ba7a2);return _0x154c94!==undefined&&_0x154c94!==''&&_0x154c94!==![]&&_0x154c94!==0x0;}function fmtNames(_0x3cd995){const _0x31920c=a20_0x45d7;return _0x3cd995[_0x31920c(0x1b4)](_0x4c3ce0=>'--'+_0x4c3ce0)[_0x31920c(0x1a7)](',\x20');}export function requireOneOf(_0x3bcf77,_0x2d0a8d,_0x5bcf73){const _0x3154b5=a20_0x45d7,_0x16119e=_0x2d0a8d[_0x3154b5(0x1b3)](_0x211c3=>isSet(_0x3bcf77,_0x211c3));if(_0x16119e['length']!==0x1)throw CliErrors[_0x3154b5(0x19b)](_0x16119e['length']===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x2d0a8d)+'\x20is\x20required\x20for\x20`'+_0x5bcf73+'`.':_0x3154b5(0x1aa)+fmtNames(_0x2d0a8d)+_0x3154b5(0x1a0)+fmtNames(_0x16119e)+'.',_0x16119e[_0x3154b5(0x1b1)]===0x0?_0x3154b5(0x19e)+fmtNames(_0x2d0a8d):_0x3154b5(0x1b5));}function a20_0x165d(){const _0x5f572d=['\x20is\x20allowed,\x20found:\x20','46775gLetaj',',\x20got\x20\x22','At\x20least\x20one\x20of\x20','8385674YJmEXH',':\x20expected\x20','11255gASIMK','join','42kWseea','Use\x20only\x20one\x20of:\x20','Only\x20one\x20of\x20','Flags\x20','str','\x20is\x20required\x20for\x20`','810381fkQYhJ','12wCaOeD','4ttdWKE','length','44220ADkqqs','filter','map','Remove\x20all\x20but\x20one.','568OlCfWW','some','\x20are\x20mutually\x20exclusive\x20for\x20`','Invalid\x20--','938608fzwhEs','validation','27mSjAmK','flag','Provide\x20one\x20of:\x20','124502VaCtmF'];a20_0x165d=function(){return _0x5f572d;};return a20_0x165d();}export function requireAnyOf(_0x1283f3,_0xf19067,_0x42c5dc){const _0x3a298c=a20_0x45d7;if(!_0xf19067[_0x3a298c(0x1b7)](_0x4d71f7=>isSet(_0x1283f3,_0x4d71f7)))throw CliErrors['validation'](_0x3a298c(0x1a3)+fmtNames(_0xf19067)+_0x3a298c(0x1ad)+_0x42c5dc+'`.',_0x3a298c(0x19e)+fmtNames(_0xf19067));}export function mutuallyExclusive(_0x465241,_0x59ebd0,_0x26b065){const _0x36c4f2=a20_0x45d7,_0x303d4c=_0x59ebd0[_0x36c4f2(0x1b3)](_0x193671=>isSet(_0x465241,_0x193671));if(_0x303d4c['length']>0x1)throw CliErrors[_0x36c4f2(0x19b)](_0x36c4f2(0x1ab)+fmtNames(_0x303d4c)+_0x36c4f2(0x1b8)+_0x26b065+'`.',_0x36c4f2(0x1a9)+fmtNames(_0x59ebd0));}export function validatePattern(_0x2b7780,_0x24014a,_0x380484,_0x20c7a4){const _0x5cd7a8=a20_0x45d7,_0x718ec3=_0x2b7780[_0x5cd7a8(0x1ac)](_0x24014a);if(_0x718ec3&&!_0x380484['test'](_0x718ec3))throw CliErrors[_0x5cd7a8(0x19b)](_0x5cd7a8(0x199)+_0x24014a+_0x5cd7a8(0x1a5)+_0x20c7a4+_0x5cd7a8(0x1a2)+_0x718ec3+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a21_0x5e4166=a21_0x463e;(function(_0x2a624b,_0x1e7e65){const _0x55a475=a21_0x463e,_0x31c359=_0x2a624b();while(!![]){try{const _0x561376=parseInt(_0x55a475(0x16f))/0x1*(-parseInt(_0x55a475(0x17d))/0x2)+parseInt(_0x55a475(0x171))/0x3*(-parseInt(_0x55a475(0x179))/0x4)+parseInt(_0x55a475(0x16d))/0x5+-parseInt(_0x55a475(0x183))/0x6+-parseInt(_0x55a475(0x185))/0x7+parseInt(_0x55a475(0x17a))/0x8*(-parseInt(_0x55a475(0x182))/0x9)+parseInt(_0x55a475(0x184))/0xa;if(_0x561376===_0x1e7e65)break;else _0x31c359['push'](_0x31c359['shift']());}catch(_0x2b4de7){_0x31c359['push'](_0x31c359['shift']());}}}(a21_0x1b81,0xcd9a2));function a21_0x1b81(){const _0x10df5b=['Resource\x20name\x20for\x20lookup','36GNoiut','2504XwYCTr','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','string','414262jxqVer','params','number','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','name','13455ILZfSk','823608UXVYJb','40026870TCXHqM','1008049PFzhMF','Resource\x20ID','758710vOpAYC','Dataset\x20code\x20(32-char\x20hex\x20UUID)','7TSnANk','Write\x20to\x20the\x20global\x20configuration','371052FSCdge','global','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','verbose','Return\x20full\x20raw\x20response\x20object','boolean','sqlcode'];a21_0x1b81=function(){return _0x10df5b;};return a21_0x1b81();}export const GLOBAL_SCOPE_FLAG={'name':a21_0x5e4166(0x172),'type':a21_0x5e4166(0x176),'default':![],'description':a21_0x5e4166(0x170)};export const CODE_FLAG={'name':'code','type':a21_0x5e4166(0x17c),'required':!![],'description':a21_0x5e4166(0x16e),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x5e4166(0x180)}};export const SQLCODE_FLAG={'name':a21_0x5e4166(0x177),'type':a21_0x5e4166(0x17c),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0x5e4166(0x17b)}};function a21_0x463e(_0x3626b8,_0x3986ee){_0x3626b8=_0x3626b8-0x16d;const _0x1b8123=a21_0x1b81();let _0x463edd=_0x1b8123[_0x3626b8];return _0x463edd;}export const VERBOSE_FLAG={'name':a21_0x5e4166(0x174),'type':a21_0x5e4166(0x176),'description':a21_0x5e4166(0x175)};export const PARAMS_FLAG={'name':a21_0x5e4166(0x17e),'type':a21_0x5e4166(0x17c),'description':a21_0x5e4166(0x173)};export const NAME_FLAG={'name':a21_0x5e4166(0x181),'type':a21_0x5e4166(0x17c),'description':a21_0x5e4166(0x178)};export const ID_FLAG={'name':'id','type':a21_0x5e4166(0x17f),'required':!![],'description':a21_0x5e4166(0x186)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f4cc4,_0x4b3563){const _0x41efbf=a22_0x441d,_0x7e70a2=_0x1f4cc4();while(!![]){try{const _0xfb1d2=-parseInt(_0x41efbf(0x1ce))/0x1*(parseInt(_0x41efbf(0x1d6))/0x2)+-parseInt(_0x41efbf(0x1d5))/0x3*(-parseInt(_0x41efbf(0x1d4))/0x4)+-parseInt(_0x41efbf(0x1d3))/0x5+parseInt(_0x41efbf(0x1d7))/0x6*(parseInt(_0x41efbf(0x1c3))/0x7)+-parseInt(_0x41efbf(0x1ca))/0x8*(-parseInt(_0x41efbf(0x1c7))/0x9)+-parseInt(_0x41efbf(0x1d0))/0xa+-parseInt(_0x41efbf(0x1cb))/0xb*(-parseInt(_0x41efbf(0x1d1))/0xc);if(_0xfb1d2===_0x4b3563)break;else _0x7e70a2['push'](_0x7e70a2['shift']());}catch(_0xaf2229){_0x7e70a2['push'](_0x7e70a2['shift']());}}}(a22_0x2e32,0x43d7b));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a22_0x441d(_0x59e0c7,_0x8fa58f){_0x59e0c7=_0x59e0c7-0x1c3;const _0x2e3270=a22_0x2e32();let _0x441d1d=_0x2e3270[_0x59e0c7];return _0x441d1d;}function a22_0x2e32(){const _0x11f794=['342136dueaPm','5700299NuueXL','size','ceil','359PXyvNk','\x20path\x20is\x20required.','2556170wblSGu','12VwpxHD','toFixed','2262385PwjgpU','12fdRQiD','218382QnsOLg','1648apcyFH','44484lWRPTY','434wfLSVj','trim','\x20MB','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','18ngNrvA','isFile','validation'];a22_0x2e32=function(){return _0x11f794;};return a22_0x2e32();}function formatBytes(_0x13f063){const _0x1e1cb4=a22_0x441d;if(_0x13f063>=BYTES_PER_MB){const _0x3493f7=Math[_0x1e1cb4(0x1cd)](_0x13f063/BYTES_PER_MB*0x64)/0x64;return _0x3493f7[_0x1e1cb4(0x1d2)](0x2)+_0x1e1cb4(0x1c5);}return _0x13f063+'\x20B';}export function requireRuntimeUploadFile(_0x2ad5be,_0x59e941){const _0x462b25=a22_0x441d,_0x3c77ca=_0x2ad5be[_0x462b25(0x1c4)]();if(!_0x3c77ca)throw CliErrors[_0x462b25(0x1c9)](_0x59e941+_0x462b25(0x1cf));if(!existsSync(_0x3c77ca))throw CliErrors[_0x462b25(0x1c9)]('File\x20not\x20found:\x20'+_0x3c77ca);const _0x2a8995=statSync(_0x3c77ca);if(!_0x2a8995[_0x462b25(0x1c8)]())throw CliErrors[_0x462b25(0x1c9)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x3c77ca);if(_0x2a8995['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x462b25(0x1c9)](_0x462b25(0x1c6)+_0x3c77ca+'\x20('+formatBytes(_0x2a8995[_0x462b25(0x1cc)])+')');return{'path':_0x3c77ca,'size':_0x2a8995[_0x462b25(0x1cc)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a23_0x5f4962=a23_0x57ed;(function(_0x50a60a,_0xc0e55d){const _0x34bdb5=a23_0x57ed,_0x549386=_0x50a60a();while(!![]){try{const _0x394279=parseInt(_0x34bdb5(0x1da))/0x1*(-parseInt(_0x34bdb5(0x1c6))/0x2)+-parseInt(_0x34bdb5(0x1d5))/0x3+-parseInt(_0x34bdb5(0x1ba))/0x4+-parseInt(_0x34bdb5(0x1fb))/0x5+parseInt(_0x34bdb5(0x1fd))/0x6*(parseInt(_0x34bdb5(0x1d7))/0x7)+parseInt(_0x34bdb5(0x1f9))/0x8+-parseInt(_0x34bdb5(0x1e6))/0x9*(-parseInt(_0x34bdb5(0x1f1))/0xa);if(_0x394279===_0xc0e55d)break;else _0x549386['push'](_0x549386['shift']());}catch(_0x194d5c){_0x549386['push'](_0x549386['shift']());}}}(a23_0x183a,0xe0c83));function a23_0x183a(){const _0x44c1d8=['4053618LXgRZC','log','77CjaSuC','Set\x20a\x20configuration\x20value','\x20config\x20get\x20<key>','1240313eOdlKv','raw','join','\x20(global)','apps','bool','Key\x20not\x20found:\x20','set','field',';\x20apps.<alias>.appcode','global','trim','9dhxwmd','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','key','accessKey','Missing\x20key\x20argument.','config','list','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','Settable\x20keys:\x20','keys','args','37636310AlxYjO','(none)','../../context.js','Set\x20`','Top-level\x20key\x20\x22','Value\x20to\x20assign','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','Invalid\x20locale\x20value.','11269128EcTmvI','write','5928770NPrcHR','appcode','475926whOBXm','read','5387292wHwmJg','Key\x20already\x20absent:\x20','object','get','includes','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','locale','validation','Usage:\x20','project-or-global-explicit','format','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','2BPSZhX','Config\x20files:\x0a','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','`\x20=\x20\x22','alias','\x22\x20is\x20not\x20settable.','List\x20current\x20config','\x20\x20global:\x20\x20','length','pageSize','stringify','isArray','pageSize\x20must\x20be\x20a\x20positive\x20number','Deleted\x20`','Missing\x20key\x20or\x20value.'];a23_0x183a=function(){return _0x44c1d8;};return a23_0x183a();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x26dfe0){const _0x3284fd=a23_0x57ed,_0x43f139=_0x26dfe0['split']('.');if(_0x43f139[_0x3284fd(0x1ce)]!==0x3||_0x43f139[0x0]!==_0x3284fd(0x1de)||_0x43f139[0x2]!==_0x3284fd(0x1fc))return undefined;const _0xcdc89=_0x43f139[0x1]?.[_0x3284fd(0x1e5)]();return _0xcdc89?_0xcdc89:undefined;}function parseAliasDeleteKey(_0x42a7b8){const _0x2db682=a23_0x57ed,_0x40e318=_0x42a7b8['split']('.');if(_0x40e318[_0x2db682(0x1ce)]===0x2&&_0x40e318[0x0]===_0x2db682(0x1de)){const _0x36cd49=_0x40e318[0x1]?.[_0x2db682(0x1e5)]();return _0x36cd49?{'alias':_0x36cd49}:undefined;}if(_0x40e318[_0x2db682(0x1ce)]===0x3&&_0x40e318[0x0]===_0x2db682(0x1de)&&_0x40e318[0x2]===_0x2db682(0x1fc)){const _0x252a15=_0x40e318[0x1]?.['trim']();return _0x252a15?{'alias':_0x252a15,'field':_0x2db682(0x1fc)}:undefined;}return undefined;}function setLocalAppAlias(_0x49a2d9,_0x3a898d,_0x3ea613){const _0x160e3b=a23_0x57ed,_0x4addac=_0x49a2d9[_0x160e3b(0x1de)]&&typeof _0x49a2d9['apps']===_0x160e3b(0x1bc)&&!Array[_0x160e3b(0x1d1)](_0x49a2d9[_0x160e3b(0x1de)])?_0x49a2d9[_0x160e3b(0x1de)]:{},_0x13547b=_0x4addac[_0x3a898d]&&typeof _0x4addac[_0x3a898d]===_0x160e3b(0x1bc)&&!Array[_0x160e3b(0x1d1)](_0x4addac[_0x3a898d])?_0x4addac[_0x3a898d]:{};_0x13547b[_0x160e3b(0x1fc)]=_0x3ea613,_0x4addac[_0x3a898d]=_0x13547b,_0x49a2d9[_0x160e3b(0x1de)]=_0x4addac;}function deleteLocalAppAlias(_0x59e246,_0x9eff0e){const _0x306513=a23_0x57ed;if(!_0x59e246[_0x306513(0x1de)]||typeof _0x59e246[_0x306513(0x1de)]!==_0x306513(0x1bc)||Array[_0x306513(0x1d1)](_0x59e246['apps']))return![];const _0x144d50=_0x59e246[_0x306513(0x1de)],_0x570743=_0x144d50[_0x9eff0e[_0x306513(0x1ca)]];if(!_0x570743||typeof _0x570743!==_0x306513(0x1bc)||Array['isArray'](_0x570743))return![];if(!_0x9eff0e[_0x306513(0x1e2)])return delete _0x144d50[_0x9eff0e[_0x306513(0x1ca)]],!![];if(!(_0x9eff0e[_0x306513(0x1e2)]in _0x570743))return![];return delete _0x570743[_0x9eff0e[_0x306513(0x1e2)]],Object[_0x306513(0x1ef)](_0x570743)[_0x306513(0x1ce)]===0x0&&delete _0x144d50[_0x9eff0e['alias']],!![];}const listDef={'service':'config','command':a23_0x5f4962(0x1ec),'description':a23_0x5f4962(0x1cc),'risk':a23_0x5f4962(0x1fe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x50b508){const _0x2de271=a23_0x5f4962,{buildConfigFromFlags:_0x2f9ac5}=await import(_0x2de271(0x1f3)),_0x31f5b9=_0x2f9ac5({}),_0x7a26b6=redactCliConfigCredentials(_0x31f5b9[_0x2de271(0x1db)]),_0x30d20c=getProjectConfigPath(),_0x29b6e5=resolveWriteConfigPath('global');if(_0x50b508[_0x2de271(0x1c4)]==='pretty')return{'ok':!![],'message':_0x2de271(0x1bf)+(JSON[_0x2de271(0x1d0)](_0x7a26b6,null,0x2)+'\x0a\x0a')+_0x2de271(0x1c7)+('\x20\x20project:\x20'+(_0x30d20c??_0x2de271(0x1f2))+'\x0a')+(_0x2de271(0x1cd)+_0x29b6e5)};return{'ok':!![],'data':{'effective':_0x7a26b6,'configFiles':{'project':_0x30d20c??null,'global':_0x29b6e5}}};}},getDef={'service':a23_0x5f4962(0x1eb),'command':a23_0x5f4962(0x1bd),'description':'Get\x20a\x20config\x20value','risk':a23_0x5f4962(0x1fe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a23_0x5f4962(0x1f7),'required':!![]}],'flags':[],async 'execute'(_0x2c06c4){const _0x556488=a23_0x5f4962,_0x2443c1=_0x2c06c4[_0x556488(0x1f0)][0x0];if(!_0x2443c1)throw CliErrors['validation'](_0x556488(0x1ea),_0x556488(0x1c2)+CLI_BIN_NAME+_0x556488(0x1d9));const {buildConfigFromFlags:_0x51c13f}=await import(_0x556488(0x1f3)),{raw:_0x302c59}=_0x51c13f({});if(_0x2443c1[_0x556488(0x1be)]('.')){const _0x42c291=_0x2443c1['split']('.');let _0x570695=_0x302c59;for(const _0x44976f of _0x42c291){if(_0x570695==null||typeof _0x570695!=='object')throw CliErrors[_0x556488(0x1c1)]('Key\x20not\x20found:\x20'+_0x2443c1);_0x570695=_0x570695[_0x44976f];}if(_0x570695===undefined)throw CliErrors[_0x556488(0x1c1)](_0x556488(0x1e0)+_0x2443c1);const _0x497f98=redactCliConfigValue(_0x2443c1,_0x570695);return console[_0x556488(0x1d6)](typeof _0x497f98==='object'?JSON[_0x556488(0x1d0)](_0x497f98,null,0x2):String(_0x497f98)),{'ok':!![]};}const _0x1d3bce=_0x302c59[_0x2443c1];if(_0x1d3bce===undefined)throw CliErrors[_0x556488(0x1c1)](_0x556488(0x1e0)+_0x2443c1);const _0x28cd15=redactCliConfigValue(_0x2443c1,_0x1d3bce);return console[_0x556488(0x1d6)](typeof _0x28cd15===_0x556488(0x1bc)?JSON['stringify'](_0x28cd15,null,0x2):String(_0x28cd15)),{'ok':!![]};}},setDef={'service':a23_0x5f4962(0x1eb),'command':a23_0x5f4962(0x1e1),'description':a23_0x5f4962(0x1d8),'risk':a23_0x5f4962(0x1fa),'confirmationDescription':a23_0x5f4962(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x5f4962(0x1e8),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a23_0x5f4962(0x1f6),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x266ca6){const _0x1fd222=a23_0x5f4962,_0x4afd72=_0x266ca6[_0x1fd222(0x1f0)][0x0],_0x1726d0=_0x266ca6[_0x1fd222(0x1f0)][0x1];if(!_0x4afd72||_0x1726d0===undefined)throw CliErrors[_0x1fd222(0x1c1)](_0x1fd222(0x1d4),_0x1fd222(0x1c2)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x4afd72]&&!ENUM_KEYS[_0x4afd72][_0x1fd222(0x1be)](_0x1726d0))throw CliErrors[_0x1fd222(0x1c1)]('Invalid\x20value\x20for\x20\x22'+_0x4afd72+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x4afd72][_0x1fd222(0x1dc)](',\x20'));if(isCliProtectedConfigKey(_0x4afd72))throw CliErrors['validation']('\x22'+_0x4afd72+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0x4afd72===_0x1fd222(0x1cf)){const _0x53d9f4=Number(_0x1726d0);if(isNaN(_0x53d9f4)||_0x53d9f4<=0x0)throw CliErrors[_0x1fd222(0x1c1)](_0x1fd222(0x1d2));}const _0xe249c3=resolveWriteScope({'explicitGlobal':_0x266ca6[_0x1fd222(0x1df)](_0x1fd222(0x1e4)),'policy':_0x1fd222(0x1c3)}),_0x5ca041=toScopeFlags(_0xe249c3),_0x3f59f0=readScopedConfig(_0x5ca041),_0x421293=parseAliasAppcodeSetKey(_0x4afd72);if(!_0x421293&&!isTopLevelConfigKey(_0x4afd72))throw CliErrors['validation'](_0x1fd222(0x1f5)+_0x4afd72+_0x1fd222(0x1cb),_0x1fd222(0x1ee)+getTopLevelConfigKeySummary()+_0x1fd222(0x1e3));if(_0x421293)setLocalAppAlias(_0x3f59f0,_0x421293,_0x1726d0);else{if(_0x4afd72===_0x1fd222(0x1c0)){const _0x52610e=normalizeLocale(_0x1726d0);if(!_0x52610e)throw CliErrors[_0x1fd222(0x1c1)](_0x1fd222(0x1f8),_0x1fd222(0x1c8));_0x3f59f0[_0x1fd222(0x1c0)]=_0x52610e;}else _0x3f59f0[_0x4afd72]=_0x4afd72===_0x1fd222(0x1cf)?Number(_0x1726d0):DOMAIN_CONFIG_FIELDS[_0x1fd222(0x1be)](_0x4afd72)?normalizeDomainOrigin(_0x4afd72,_0x1726d0):_0x1726d0;}const _0xff6844=_0x4afd72===_0x1fd222(0x1e9)?maskCliAccessKey(_0x1726d0):!_0x421293&&_0x4afd72===_0x1fd222(0x1c0)?String(_0x3f59f0[_0x1fd222(0x1c0)]):_0x1726d0;return console[_0x1fd222(0x1d6)](_0x1fd222(0x1f4)+_0x4afd72+_0x1fd222(0x1c9)+_0xff6844+'\x22'+(_0xe249c3==='global'?_0x1fd222(0x1dd):'')),writeScopedConfig(_0x3f59f0,_0x5ca041),{'ok':!![]};}},deleteDef={'service':a23_0x5f4962(0x1eb),'command':'delete','description':'Delete\x20a\x20configuration\x20value','risk':'write','confirmationDescription':a23_0x5f4962(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x5f4962(0x1e8),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x2b830b){const _0x116cba=a23_0x5f4962,_0x1a0acc=_0x2b830b['args'][0x0];if(!_0x1a0acc)throw CliErrors[_0x116cba(0x1c1)](_0x116cba(0x1ea),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x1a0acc))throw CliErrors['validation']('\x22'+_0x1a0acc+_0x116cba(0x1ed));const _0x341cc0=resolveWriteScope({'explicitGlobal':_0x2b830b[_0x116cba(0x1df)](_0x116cba(0x1e4)),'policy':_0x116cba(0x1c3)}),_0x1f3977=toScopeFlags(_0x341cc0),_0x44d09b=readScopedConfig(_0x1f3977),_0x57b166=parseAliasDeleteKey(_0x1a0acc);if(_0x57b166){if(!deleteLocalAppAlias(_0x44d09b,_0x57b166))return console[_0x116cba(0x1d6)](_0x116cba(0x1bb)+_0x1a0acc+(_0x341cc0===_0x116cba(0x1e4)?_0x116cba(0x1dd):'')),{'ok':!![],'data':{'key':_0x1a0acc,'scope':_0x341cc0,'changed':![]}};return console['log'](_0x116cba(0x1d3)+_0x1a0acc+'`'+(_0x341cc0==='global'?_0x116cba(0x1dd):'')),writeScopedConfig(_0x44d09b,_0x1f3977),{'ok':!![],'data':{'key':_0x1a0acc,'scope':_0x341cc0,'changed':!![]}};}if(_0x44d09b[_0x1a0acc]===undefined)return console[_0x116cba(0x1d6)](_0x116cba(0x1bb)+_0x1a0acc+(_0x341cc0===_0x116cba(0x1e4)?_0x116cba(0x1dd):'')),{'ok':!![],'data':{'key':_0x1a0acc,'scope':_0x341cc0,'changed':![]}};return delete _0x44d09b[_0x1a0acc],console[_0x116cba(0x1d6)](_0x116cba(0x1d3)+_0x1a0acc+'`'+(_0x341cc0===_0x116cba(0x1e4)?_0x116cba(0x1dd):'')),writeScopedConfig(_0x44d09b,_0x1f3977),{'ok':!![],'data':{'key':_0x1a0acc,'scope':_0x341cc0,'changed':!![]}};}};function a23_0x57ed(_0x451435,_0x421b70){_0x451435=_0x451435-0x1ba;const _0x183a23=a23_0x183a();let _0x57edc5=_0x183a23[_0x451435];return _0x57edc5;}export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a23_0x1a3ff2=a23_0x4272;function a23_0x5987(){const _0x19b057=['write','Key\x20not\x20found:\x20','list','length','isArray','appcode','read','includes','Invalid\x20value\x20for\x20\x22','join','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','raw','set','../../context.js','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','project-or-global-explicit','validation','bool','1302946yuSaGi','1705626GAOdoN','accessKey','pageSize','global','884912olpdhD','2014074TLaYMN','keys','\x20(global)','List\x20current\x20config','Key\x20already\x20absent:\x20','Delete\x20a\x20configuration\x20value','apps','trim','object','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','Set\x20`','delete','Missing\x20key\x20argument.','key','alias','4794985XpEVfj','5531897HSdiQp','split','args','Missing\x20key\x20or\x20value.','1859916rBCJDU','\x20\x20project:\x20','\x22.\x20Allowed:\x20','Set\x20a\x20configuration\x20value','Value\x20to\x20assign','(none)',';\x20apps.<alias>.appcode','log','locale','field','Invalid\x20locale\x20value.','config','stringify','Get\x20a\x20config\x20value','Top-level\x20key\x20\x22','pageSize\x20must\x20be\x20a\x20positive\x20number','Usage:\x20','Deleted\x20`'];a23_0x5987=function(){return _0x19b057;};return a23_0x5987();}(function(_0x15b105,_0x5d8416){const _0x3d0c04=a23_0x4272,_0x4311fc=_0x15b105();while(!![]){try{const _0x427182=parseInt(_0x3d0c04(0x1a9))/0x1+-parseInt(_0x3d0c04(0x1a4))/0x2+-parseInt(_0x3d0c04(0x1aa))/0x3+parseInt(_0x3d0c04(0x1be))/0x4+parseInt(_0x3d0c04(0x1b9))/0x5+parseInt(_0x3d0c04(0x1a5))/0x6+-parseInt(_0x3d0c04(0x1ba))/0x7;if(_0x427182===_0x5d8416)break;else _0x4311fc['push'](_0x4311fc['shift']());}catch(_0x59f176){_0x4311fc['push'](_0x4311fc['shift']());}}}(a23_0x5987,0x75339));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x46522f){const _0x1cd78f=a23_0x4272,_0x26eb5b=_0x46522f[_0x1cd78f(0x1bb)]('.');if(_0x26eb5b[_0x1cd78f(0x1d3)]!==0x3||_0x26eb5b[0x0]!==_0x1cd78f(0x1b0)||_0x26eb5b[0x2]!=='appcode')return undefined;const _0x4b9b92=_0x26eb5b[0x1]?.[_0x1cd78f(0x1b1)]();return _0x4b9b92?_0x4b9b92:undefined;}function parseAliasDeleteKey(_0x1cc770){const _0x297000=a23_0x4272,_0x5d57cd=_0x1cc770[_0x297000(0x1bb)]('.');if(_0x5d57cd[_0x297000(0x1d3)]===0x2&&_0x5d57cd[0x0]===_0x297000(0x1b0)){const _0x178092=_0x5d57cd[0x1]?.['trim']();return _0x178092?{'alias':_0x178092}:undefined;}if(_0x5d57cd[_0x297000(0x1d3)]===0x3&&_0x5d57cd[0x0]===_0x297000(0x1b0)&&_0x5d57cd[0x2]===_0x297000(0x1d5)){const _0x33f3cb=_0x5d57cd[0x1]?.[_0x297000(0x1b1)]();return _0x33f3cb?{'alias':_0x33f3cb,'field':_0x297000(0x1d5)}:undefined;}return undefined;}function setLocalAppAlias(_0x2c291a,_0x155e0e,_0x53ba6f){const _0x5df874=a23_0x4272,_0x13cbc6=_0x2c291a[_0x5df874(0x1b0)]&&typeof _0x2c291a['apps']===_0x5df874(0x1b2)&&!Array[_0x5df874(0x1d4)](_0x2c291a[_0x5df874(0x1b0)])?_0x2c291a[_0x5df874(0x1b0)]:{},_0x3cb332=_0x13cbc6[_0x155e0e]&&typeof _0x13cbc6[_0x155e0e]===_0x5df874(0x1b2)&&!Array[_0x5df874(0x1d4)](_0x13cbc6[_0x155e0e])?_0x13cbc6[_0x155e0e]:{};_0x3cb332[_0x5df874(0x1d5)]=_0x53ba6f,_0x13cbc6[_0x155e0e]=_0x3cb332,_0x2c291a[_0x5df874(0x1b0)]=_0x13cbc6;}function deleteLocalAppAlias(_0x45b2eb,_0x57f6da){const _0x5701a8=a23_0x4272;if(!_0x45b2eb[_0x5701a8(0x1b0)]||typeof _0x45b2eb[_0x5701a8(0x1b0)]!==_0x5701a8(0x1b2)||Array[_0x5701a8(0x1d4)](_0x45b2eb[_0x5701a8(0x1b0)]))return![];const _0x193ddc=_0x45b2eb[_0x5701a8(0x1b0)],_0x20d459=_0x193ddc[_0x57f6da[_0x5701a8(0x1b8)]];if(!_0x20d459||typeof _0x20d459!=='object'||Array[_0x5701a8(0x1d4)](_0x20d459))return![];if(!_0x57f6da[_0x5701a8(0x1c7)])return delete _0x193ddc[_0x57f6da[_0x5701a8(0x1b8)]],!![];if(!(_0x57f6da[_0x5701a8(0x1c7)]in _0x20d459))return![];return delete _0x20d459[_0x57f6da['field']],Object[_0x5701a8(0x1ab)](_0x20d459)[_0x5701a8(0x1d3)]===0x0&&delete _0x193ddc[_0x57f6da[_0x5701a8(0x1b8)]],!![];}const listDef={'service':a23_0x1a3ff2(0x1c9),'command':a23_0x1a3ff2(0x1d2),'description':a23_0x1a3ff2(0x1ad),'risk':a23_0x1a3ff2(0x1d6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x27135c){const _0x1262a=a23_0x1a3ff2,{buildConfigFromFlags:_0x564163}=await import(_0x1262a(0x19f)),_0x1d39a3=_0x564163({}),_0x500ef8=redactCliConfigCredentials(_0x1d39a3[_0x1262a(0x19d)]),_0xda8111=getProjectConfigPath(),_0x3b3b7a=resolveWriteConfigPath(_0x1262a(0x1a8));if(_0x27135c['format']==='pretty')return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x1262a(0x1ca)](_0x500ef8,null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x1262a(0x1bf)+(_0xda8111??_0x1262a(0x1c3))+'\x0a')+('\x20\x20global:\x20\x20'+_0x3b3b7a)};return{'ok':!![],'data':{'effective':_0x500ef8,'configFiles':{'project':_0xda8111??null,'global':_0x3b3b7a}}};}},getDef={'service':'config','command':'get','description':a23_0x1a3ff2(0x1cb),'risk':a23_0x1a3ff2(0x1d6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1a3ff2(0x1b7),'description':a23_0x1a3ff2(0x1a0),'required':!![]}],'flags':[],async 'execute'(_0x2c94f1){const _0x1bcff2=a23_0x1a3ff2,_0x4daab4=_0x2c94f1[_0x1bcff2(0x1bc)][0x0];if(!_0x4daab4)throw CliErrors[_0x1bcff2(0x1a2)](_0x1bcff2(0x1b6),_0x1bcff2(0x1ce)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x225ef1}=await import('../../context.js'),{raw:_0x575c53}=_0x225ef1({});if(_0x4daab4[_0x1bcff2(0x1d7)]('.')){const _0x101a1e=_0x4daab4['split']('.');let _0x60bb0b=_0x575c53;for(const _0x3db6e2 of _0x101a1e){if(_0x60bb0b==null||typeof _0x60bb0b!==_0x1bcff2(0x1b2))throw CliErrors[_0x1bcff2(0x1a2)](_0x1bcff2(0x1d1)+_0x4daab4);_0x60bb0b=_0x60bb0b[_0x3db6e2];}if(_0x60bb0b===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x4daab4);const _0x6a1eec=redactCliConfigValue(_0x4daab4,_0x60bb0b);return console['log'](typeof _0x6a1eec===_0x1bcff2(0x1b2)?JSON['stringify'](_0x6a1eec,null,0x2):String(_0x6a1eec)),{'ok':!![]};}const _0x4789ab=_0x575c53[_0x4daab4];if(_0x4789ab===undefined)throw CliErrors['validation'](_0x1bcff2(0x1d1)+_0x4daab4);const _0x217b7a=redactCliConfigValue(_0x4daab4,_0x4789ab);return console[_0x1bcff2(0x1c5)](typeof _0x217b7a===_0x1bcff2(0x1b2)?JSON[_0x1bcff2(0x1ca)](_0x217b7a,null,0x2):String(_0x217b7a)),{'ok':!![]};}},setDef={'service':'config','command':a23_0x1a3ff2(0x19e),'description':a23_0x1a3ff2(0x1c1),'risk':a23_0x1a3ff2(0x1d0),'confirmationDescription':a23_0x1a3ff2(0x1b3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a23_0x1a3ff2(0x1c2),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x5693ad){const _0x1aadea=a23_0x1a3ff2,_0x351467=_0x5693ad['args'][0x0],_0x3505bf=_0x5693ad['args'][0x1];if(!_0x351467||_0x3505bf===undefined)throw CliErrors[_0x1aadea(0x1a2)](_0x1aadea(0x1bd),_0x1aadea(0x1ce)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x351467]&&!ENUM_KEYS[_0x351467]['includes'](_0x3505bf))throw CliErrors[_0x1aadea(0x1a2)](_0x1aadea(0x19a)+_0x351467+_0x1aadea(0x1c0)+ENUM_KEYS[_0x351467][_0x1aadea(0x19b)](',\x20'));if(isCliProtectedConfigKey(_0x351467))throw CliErrors[_0x1aadea(0x1a2)]('\x22'+_0x351467+_0x1aadea(0x19c));if(_0x351467===_0x1aadea(0x1a7)){const _0x47c850=Number(_0x3505bf);if(isNaN(_0x47c850)||_0x47c850<=0x0)throw CliErrors[_0x1aadea(0x1a2)](_0x1aadea(0x1cd));}const _0x47a511=resolveWriteScope({'explicitGlobal':_0x5693ad[_0x1aadea(0x1a3)](_0x1aadea(0x1a8)),'policy':_0x1aadea(0x1a1)}),_0x2fb310=toScopeFlags(_0x47a511),_0x2ada57=readScopedConfig(_0x2fb310),_0x53d111=parseAliasAppcodeSetKey(_0x351467);if(!_0x53d111&&!isTopLevelConfigKey(_0x351467))throw CliErrors['validation'](_0x1aadea(0x1cc)+_0x351467+'\x22\x20is\x20not\x20settable.','Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x1aadea(0x1c4));if(_0x53d111)setLocalAppAlias(_0x2ada57,_0x53d111,_0x3505bf);else{if(_0x351467==='locale'){const _0x447709=normalizeLocale(_0x3505bf);if(!_0x447709)throw CliErrors[_0x1aadea(0x1a2)](_0x1aadea(0x1c8),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');_0x2ada57[_0x1aadea(0x1c6)]=_0x447709;}else _0x2ada57[_0x351467]=_0x351467===_0x1aadea(0x1a7)?Number(_0x3505bf):DOMAIN_CONFIG_FIELDS[_0x1aadea(0x1d7)](_0x351467)?normalizeDomainOrigin(_0x351467,_0x3505bf):_0x3505bf;}const _0x580d3f=_0x351467===_0x1aadea(0x1a6)?maskCliAccessKey(_0x3505bf):!_0x53d111&&_0x351467===_0x1aadea(0x1c6)?String(_0x2ada57['locale']):_0x3505bf;return console[_0x1aadea(0x1c5)](_0x1aadea(0x1b4)+_0x351467+'`\x20=\x20\x22'+_0x580d3f+'\x22'+(_0x47a511===_0x1aadea(0x1a8)?'\x20(global)':'')),writeScopedConfig(_0x2ada57,_0x2fb310),{'ok':!![]};}},deleteDef={'service':'config','command':a23_0x1a3ff2(0x1b5),'description':a23_0x1a3ff2(0x1af),'risk':a23_0x1a3ff2(0x1d0),'confirmationDescription':'Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x14f00b){const _0x47cbaf=a23_0x1a3ff2,_0x6de1c3=_0x14f00b[_0x47cbaf(0x1bc)][0x0];if(!_0x6de1c3)throw CliErrors['validation'](_0x47cbaf(0x1b6),_0x47cbaf(0x1ce)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x6de1c3))throw CliErrors[_0x47cbaf(0x1a2)]('\x22'+_0x6de1c3+_0x47cbaf(0x19c));const _0x5420e0=resolveWriteScope({'explicitGlobal':_0x14f00b[_0x47cbaf(0x1a3)](_0x47cbaf(0x1a8)),'policy':_0x47cbaf(0x1a1)}),_0x19957b=toScopeFlags(_0x5420e0),_0x1e12a6=readScopedConfig(_0x19957b),_0x3a6869=parseAliasDeleteKey(_0x6de1c3);if(_0x3a6869){if(!deleteLocalAppAlias(_0x1e12a6,_0x3a6869))return console['log'](_0x47cbaf(0x1ae)+_0x6de1c3+(_0x5420e0===_0x47cbaf(0x1a8)?_0x47cbaf(0x1ac):'')),{'ok':!![],'data':{'key':_0x6de1c3,'scope':_0x5420e0,'changed':![]}};return console[_0x47cbaf(0x1c5)](_0x47cbaf(0x1cf)+_0x6de1c3+'`'+(_0x5420e0===_0x47cbaf(0x1a8)?_0x47cbaf(0x1ac):'')),writeScopedConfig(_0x1e12a6,_0x19957b),{'ok':!![],'data':{'key':_0x6de1c3,'scope':_0x5420e0,'changed':!![]}};}if(_0x1e12a6[_0x6de1c3]===undefined)return console[_0x47cbaf(0x1c5)](_0x47cbaf(0x1ae)+_0x6de1c3+(_0x5420e0===_0x47cbaf(0x1a8)?_0x47cbaf(0x1ac):'')),{'ok':!![],'data':{'key':_0x6de1c3,'scope':_0x5420e0,'changed':![]}};return delete _0x1e12a6[_0x6de1c3],console[_0x47cbaf(0x1c5)](_0x47cbaf(0x1cf)+_0x6de1c3+'`'+(_0x5420e0===_0x47cbaf(0x1a8)?_0x47cbaf(0x1ac):'')),writeScopedConfig(_0x1e12a6,_0x19957b),{'ok':!![],'data':{'key':_0x6de1c3,'scope':_0x5420e0,'changed':!![]}};}};function a23_0x4272(_0x405ad5,_0x3decc2){_0x405ad5=_0x405ad5-0x19a;const _0x5987ce=a23_0x5987();let _0x427211=_0x5987ce[_0x405ad5];return _0x427211;}export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x364558=a24_0x38ca;function a24_0x164a(){const _0x2db44d=['168340RchbJG','config','204ZkqUOi','68151OdqHBt','write','skill-domain','validation','1054170mderAt','init','enterprise-v1','api-domain','cancelled','str','keys','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','Custom\x20Runtime\x20HTTPS\x20origin','mode','Region\x20\x22','\x22\x20is\x20not\x20currently\x20available.','region','string','Custom\x20platform\x20API\x20HTTPS\x20origin','1208664vuraAt','284bBqrsM','domain-config','routing','Custom\x20SkillHub\x20HTTPS\x20origin','Select\x20Lovrabet\x20region','manifestDomains','join','40UWqLLA','2509011qeWiaR','label','Available\x20regions:\x20','official','16AmBZIw','nonInteractive','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','name','domains','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','301dAJJLO','Custom\x20User\x20HTTPS\x20origin','33YpNmIy','168539jnzozJ','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','runtime-domain','Independent-deployment\x20Domain\x20JSON\x20file','assign','ExitPromptError'];a24_0x164a=function(){return _0x2db44d;};return a24_0x164a();}(function(_0xe3ea92,_0x3f6888){const _0x3fe2b6=a24_0x38ca,_0x4b3aad=_0xe3ea92();while(!![]){try{const _0x140368=-parseInt(_0x3fe2b6(0x1af))/0x1*(-parseInt(_0x3fe2b6(0x1cf))/0x2)+-parseInt(_0x3fe2b6(0x1bb))/0x3+parseInt(_0x3fe2b6(0x1d6))/0x4*(parseInt(_0x3fe2b6(0x1b8))/0x5)+-parseInt(_0x3fe2b6(0x1ba))/0x6*(-parseInt(_0x3fe2b6(0x1b2))/0x7)+parseInt(_0x3fe2b6(0x1db))/0x8*(-parseInt(_0x3fe2b6(0x1d7))/0x9)+parseInt(_0x3fe2b6(0x1bf))/0xa+parseInt(_0x3fe2b6(0x1b1))/0xb*(-parseInt(_0x3fe2b6(0x1ce))/0xc);if(_0x140368===_0x3f6888)break;else _0x4b3aad['push'](_0x4b3aad['shift']());}catch(_0x133f62){_0x4b3aad['push'](_0x4b3aad['shift']());}}}(a24_0x164a,0x66c98));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':a24_0x364558(0x1d0),'type':a24_0x364558(0x1cc),'description':a24_0x364558(0x1b5)},{'name':'user-domain','type':a24_0x364558(0x1cc),'description':a24_0x364558(0x1b0)},{'name':a24_0x364558(0x1c2),'type':'string','description':a24_0x364558(0x1cd)},{'name':a24_0x364558(0x1b4),'type':a24_0x364558(0x1cc),'description':a24_0x364558(0x1c7)},{'name':a24_0x364558(0x1bd),'type':a24_0x364558(0x1cc),'description':a24_0x364558(0x1d2)}];function a24_0x38ca(_0x58164b,_0x49b78d){_0x58164b=_0x58164b-0x1ab;const _0x164ab2=a24_0x164a();let _0x38ca23=_0x164ab2[_0x58164b];return _0x38ca23;}export const configInitFlags=[{'name':a24_0x364558(0x1cb),'type':a24_0x364558(0x1cc),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a24_0x364558(0x1d5)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x46d0fe){const _0xc39cd6=a24_0x364558,_0x27f54e=_0x46d0fe[_0xc39cd6(0x1c4)](_0xc39cd6(0x1cb));if(_0x27f54e){if(!isEnabledLovrabetRegion(_0x27f54e))throw CliErrors[_0xc39cd6(0x1be)](_0xc39cd6(0x1c9)+_0x27f54e+_0xc39cd6(0x1ca),_0xc39cd6(0x1d9)+ENABLED_LOVRABET_REGION_VALUES[_0xc39cd6(0x1d5)](',\x20'));return _0x27f54e;}if(_0x46d0fe[_0xc39cd6(0x1dc)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0xc39cd6(0x1d3),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0xba6852=>({'name':OFFICIAL_ROUTING_PROFILES[_0xba6852][_0xc39cd6(0x1d8)]+'\x20('+_0xba6852+')','value':_0xba6852}))});}catch(_0x3d3bde){if(_0x3d3bde?.[_0xc39cd6(0x1ac)]===_0xc39cd6(0x1b7))throw CliErrors[_0xc39cd6(0x1c3)]();throw _0x3d3bde;}}export async function executeConfigInit(_0x54cb85){const _0x38d83b=a24_0x364558,_0x3f6b54=resolveDomainConfigInput(_0x54cb85),_0xa177bd=_0x3f6b54[_0x38d83b(0x1ad)],_0x3d8665=Object[_0x38d83b(0x1c5)](_0xa177bd)['length']>0x0;if(_0x3d8665&&_0x54cb85[_0x38d83b(0x1c4)](_0x38d83b(0x1cb)))throw CliErrors['validation'](_0x38d83b(0x1ae));const _0x6f6170={'global':!![]},_0x244414=readScopedConfig(_0x6f6170);for(const _0x23a5ad of DOMAIN_CONFIG_FIELDS)delete _0x244414[_0x23a5ad];for(const _0x4e1398 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x244414[_0x4e1398];delete _0x244414[_0x38d83b(0x1d1)];let _0x467b45=null;if(_0x3d8665)delete _0x244414[_0x38d83b(0x1cb)],_0x3f6b54[_0x38d83b(0x1c8)]==='enterprise-v1'?_0x244414['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x3f6b54['manifestDomains']}:Object[_0x38d83b(0x1b6)](_0x244414,_0xa177bd);else{_0x467b45=await resolveRegion(_0x54cb85);if(_0x467b45===DEFAULT_LOVRABET_REGION)delete _0x244414[_0x38d83b(0x1cb)];else _0x244414[_0x38d83b(0x1cb)]=_0x467b45;}return writeScopedConfig(_0x244414,_0x6f6170),{'ok':!![],'message':_0x3d8665?_0x38d83b(0x1ab)+Object['keys'](_0x3f6b54[_0x38d83b(0x1c8)]===_0x38d83b(0x1c1)?_0x3f6b54[_0x38d83b(0x1d4)]:_0xa177bd)[_0x38d83b(0x1d5)](',\x20')+'.':'Lovrabet\x20connection\x20configured\x20for\x20region:\x20'+_0x467b45+'.','data':{'mode':_0x3d8665?'independent':_0x38d83b(0x1da),'protocol':_0x3f6b54['mode']===_0x38d83b(0x1c1)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x467b45,'domains':_0xa177bd}};}export const configInitDefinition={'service':a24_0x364558(0x1b9),'command':a24_0x364558(0x1c0),'description':a24_0x364558(0x1c6),'risk':a24_0x364558(0x1bc),'confirmationDescription':a24_0x364558(0x1b3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5a3c6d,_0x21dc1c){var _0x3ca0b2=a25_0x4f99,_0x5a6304=_0x5a3c6d();while(!![]){try{var _0x45aac0=-parseInt(_0x3ca0b2(0x120))/0x1*(-parseInt(_0x3ca0b2(0x121))/0x2)+-parseInt(_0x3ca0b2(0x11b))/0x3+-parseInt(_0x3ca0b2(0x11c))/0x4+parseInt(_0x3ca0b2(0x11e))/0x5+-parseInt(_0x3ca0b2(0x11d))/0x6+-parseInt(_0x3ca0b2(0x11f))/0x7+parseInt(_0x3ca0b2(0x122))/0x8;if(_0x45aac0===_0x21dc1c)break;else _0x5a6304['push'](_0x5a6304['shift']());}catch(_0x33f4e2){_0x5a6304['push'](_0x5a6304['shift']());}}}(a25_0x1a0a,0x35f56));function a25_0x4f99(_0xdf2265,_0x427940){_0xdf2265=_0xdf2265-0x11b;var _0x1a0a81=a25_0x1a0a();var _0x4f998e=_0x1a0a81[_0xdf2265];return _0x4f998e;}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,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';function a25_0x1a0a(){var _0x2434a6=['133631CzKyZa','6RgrxyH','7160856pLckzN','731079faFhmO','1653128KMowLu','2312616FdcuAy','1862680Xkhouw','2835777qHaxKe'];a25_0x1a0a=function(){return _0x2434a6;};return a25_0x1a0a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a26_0x2762(){const _0x31e16d=['Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','data\x20','write','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','8081450qfYgJQ','\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\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}}','now','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20LOGICAL\x20COMBINATORS','\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\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','POST','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','65410pjBpib','\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}}','str','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','batchCreate','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','1110000ZGZGcK','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','read','command','\x20\x20WHERE\x20OPERATORS','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','body','params','363318ehdGgA','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','getOne','333504EduCTm','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\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\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','8WcSXPf','paramsRequired','\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}}','Get\x20a\x20single\x20record\x20by\x20ID','Preview:\x20data\x20','high-risk-write','dryRun','\x20\x20AGGREGATE\x20TYPES','update','join','/api/{appCode}/','confirmationDescription','487848TsKumP','\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}}','aggregate','\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.','operation','delete','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\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\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','code','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','filter','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','Update\x20an\x20existing\x20data\x20record','49sJBtaY','\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}]','108wRYyuv','\x20\x20PARAMS\x20STRUCTURE','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\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','\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}','length','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','data','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\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}}','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','6171550wRdmbm','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','build','description','\x20completed\x20in\x20','risk','batch','\x20\x20DATASET\x20BOUNDARY','Create\x20one\x20record\x20in\x20the\x20dataset','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','256WKecyg','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\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','\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\x20AGGREGATE\x20ALIAS\x20BOUNDARY'];a26_0x2762=function(){return _0x31e16d;};return a26_0x2762();}function a26_0x108c(_0x511825,_0xd5bc66){_0x511825=_0x511825-0x19f;const _0x276298=a26_0x2762();let _0x108c53=_0x276298[_0x511825];return _0x108c53;}const a26_0x166602=a26_0x108c;(function(_0x569de7,_0x355ddb){const _0x2faa51=a26_0x108c,_0x2c3fb2=_0x569de7();while(!![]){try{const _0x45eaaf=parseInt(_0x2faa51(0x1ee))/0x1+parseInt(_0x2faa51(0x200))/0x2*(parseInt(_0x2faa51(0x1f9))/0x3)+parseInt(_0x2faa51(0x1d2))/0x4*(parseInt(_0x2faa51(0x1e7))/0x5)+parseInt(_0x2faa51(0x1f6))/0x6*(parseInt(_0x2faa51(0x1b9))/0x7)+parseInt(_0x2faa51(0x1a9))/0x8*(-parseInt(_0x2faa51(0x1bb))/0x9)+-parseInt(_0x2faa51(0x1dd))/0xa+-parseInt(_0x2faa51(0x1c8))/0xb;if(_0x45eaaf===_0x355ddb)break;else _0x2c3fb2['push'](_0x2c3fb2['shift']());}catch(_0x4e0629){_0x2c3fb2['push'](_0x2c3fb2['shift']());}}}(a26_0x2762,0xae848));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a26_0x166602(0x1b5),'operation':a26_0x166602(0x1b5),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a26_0x166602(0x1bd)+a26_0x166602(0x1da),'helpExtra':[a26_0x166602(0x1f2),'\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}}',a26_0x166602(0x19f),a26_0x166602(0x1df),a26_0x166602(0x1d5),'\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}}',a26_0x166602(0x1be),'\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]}}',a26_0x166602(0x1c6),a26_0x166602(0x1aa),a26_0x166602(0x1e8),'',a26_0x166602(0x1e2),a26_0x166602(0x1c9),'\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}}]}','',a26_0x166602(0x1c4),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a26_0x166602(0x1b0),a26_0x166602(0x1ba),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','','\x20\x20PAGINATION','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a26_0x166602(0x1ac),a26_0x166602(0x1e6),a26_0x166602(0x1ef),a26_0x166602(0x1e1),a26_0x166602(0x1b1),a26_0x166602(0x1b6)][a26_0x166602(0x1a6)]('\x0a')},{'command':a26_0x166602(0x1f8),'operation':a26_0x166602(0x1f8),'risk':'read','paramsRequired':!![],'description':a26_0x166602(0x1a0),'paramsHint':a26_0x166602(0x1ff)},{'command':a26_0x166602(0x1bf),'operation':a26_0x166602(0x1bf),'risk':a26_0x166602(0x1d9),'paramsRequired':!![],'description':a26_0x166602(0x1d0),'confirmationDescription':a26_0x166602(0x1c7),'paramsHint':a26_0x166602(0x1b3)},{'command':a26_0x166602(0x1ec),'operation':a26_0x166602(0x1ec),'risk':a26_0x166602(0x1d9),'paramsRequired':!![],'description':a26_0x166602(0x1c2),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a26_0x166602(0x1f3)},{'command':'update','operation':a26_0x166602(0x1a5),'risk':'write','paramsRequired':!![],'description':a26_0x166602(0x1b8),'confirmationDescription':a26_0x166602(0x1eb),'paramsHint':a26_0x166602(0x1d3)+a26_0x166602(0x1d7)},{'command':a26_0x166602(0x1ae),'operation':a26_0x166602(0x1ae),'risk':a26_0x166602(0x1a2),'paramsRequired':!![],'description':a26_0x166602(0x1c5),'confirmationDescription':a26_0x166602(0x1d1),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'aggregate','operation':a26_0x166602(0x1ab),'risk':'read','paramsRequired':![],'description':a26_0x166602(0x1dc),'paramsHint':a26_0x166602(0x1f7)+a26_0x166602(0x1db),'helpExtra':[a26_0x166602(0x1a4),a26_0x166602(0x1e3),a26_0x166602(0x1de),a26_0x166602(0x1fa),'\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}',a26_0x166602(0x1c0),a26_0x166602(0x1ea),a26_0x166602(0x1b7),'',a26_0x166602(0x1bc),a26_0x166602(0x1fb),a26_0x166602(0x1fe),a26_0x166602(0x1fd),a26_0x166602(0x1ed),'\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a26_0x166602(0x1d6),a26_0x166602(0x1e4),'\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','',a26_0x166602(0x1cf),'\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only',a26_0x166602(0x1b4),'\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','','\x20\x20EXAMPLES',a26_0x166602(0x1fc),a26_0x166602(0x1af),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a26_0x166602(0x1d4),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a26_0x166602(0x1a6)]('\x0a')}];function makeDataCommand(_0x40ff72){const _0x3f89c8=a26_0x166602,_0x309642=_0x3f89c8(0x1d8)+_0x40ff72[_0x3f89c8(0x1f1)],_0x118bf9={'service':_0x3f89c8(0x1c3),'command':_0x40ff72[_0x3f89c8(0x1f1)],'description':_0x40ff72[_0x3f89c8(0x1cb)],'risk':_0x40ff72[_0x3f89c8(0x1cd)],..._0x40ff72['confirmationDescription']?{'confirmationDescription':_0x40ff72[_0x3f89c8(0x1a8)]}:{},'helpExtra':_0x40ff72['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x40ff72['paramsHint']}],'validate':async _0x1adb88=>{const _0x1f6763=_0x3f89c8;_0x40ff72[_0x1f6763(0x201)]&&requireAnyOf(_0x1adb88,[_0x1f6763(0x1f5)],_0x309642),_0x40ff72[_0x1f6763(0x1ad)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1adb88['str'](_0x1f6763(0x1f5)))),_0x40ff72[_0x1f6763(0x1ad)]===_0x1f6763(0x1a5)&&parseUpdateIdsFromParams(parseJsonParams(_0x1adb88[_0x1f6763(0x1e9)](_0x1f6763(0x1f5)))??{});},async 'execute'(_0x442a93){const _0x491cac=_0x3f89c8,_0x21db62=_0x442a93[_0x491cac(0x1e9)](_0x491cac(0x1b2)),_0x2a8582=_0x40ff72[_0x491cac(0x1ad)]===_0x491cac(0x1ec)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x442a93['str'](_0x491cac(0x1f5)))):parseJsonParams(_0x442a93[_0x491cac(0x1e9)](_0x491cac(0x1f5)))??{},_0x5e516f=_0x40ff72[_0x491cac(0x1ad)]===_0x491cac(0x1a5)?parseUpdateIdsFromParams(_0x2a8582):undefined,_0x148874=_0x5e516f?normalizeUpdateParamsForRuntime(_0x2a8582,_0x5e516f):_0x2a8582,_0x45a768=Date[_0x491cac(0x1e0)](),_0x4411e2=await executeData(_0x21db62,_0x40ff72[_0x491cac(0x1ad)],_0x148874),_0x1d841a=Date[_0x491cac(0x1e0)]()-_0x45a768,_0x23497a=_0x5e516f&&_0x5e516f[_0x491cac(0x1c1)]>0x1?buildBatchUpdateResult(_0x5e516f,_0x4411e2):_0x4411e2;return{'ok':!![],'data':{'result':_0x23497a,'elapsed':_0x1d841a},'message':'data\x20'+_0x40ff72[_0x491cac(0x1f1)]+_0x491cac(0x1cc)+_0x1d841a+'ms'};}};return _0x40ff72[_0x3f89c8(0x1cd)]!==_0x3f89c8(0x1f0)&&(_0x118bf9[_0x3f89c8(0x1a3)]=async _0x387d5e=>{const _0x46fff2=_0x3f89c8,_0x4b65be=_0x387d5e[_0x46fff2(0x1e9)](_0x46fff2(0x1b2)),_0x5f58a1=_0x40ff72['operation']===_0x46fff2(0x1ec)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x387d5e[_0x46fff2(0x1e9)](_0x46fff2(0x1f5)))):parseJsonParams(_0x387d5e[_0x46fff2(0x1e9)](_0x46fff2(0x1f5)))??{};let _0xf58a43=_0x5f58a1;if(_0x40ff72[_0x46fff2(0x1ad)]==='update'){const _0x567a3d=parseUpdateIdsFromParams(_0x5f58a1);_0xf58a43=normalizeUpdateParamsForRuntime(_0x5f58a1,_0x567a3d);}return dryRun(_0x46fff2(0x1e5),_0x46fff2(0x1a7)+_0x4b65be+'/'+_0x40ff72[_0x46fff2(0x1ad)])[_0x46fff2(0x1f4)](_0xf58a43)[_0x46fff2(0x1cb)](_0x46fff2(0x1a1)+_0x40ff72['command']+'\x20on\x20dataset\x20'+_0x4b65be)[_0x46fff2(0x1ca)]();}),_0x118bf9;}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0x5f245d,_0x230952){const _0x4336ed=a26_0x166602;return{'operation':'update','mode':_0x4336ed(0x1ce),'ids':_0x5f245d,'total':_0x5f245d[_0x4336ed(0x1c1)],'result':_0x230952};}
|
|
1
|
+
const a26_0x597485=a26_0x22b9;(function(_0x387a05,_0x1b4ce2){const _0x45aa91=a26_0x22b9,_0x4f5ee0=_0x387a05();while(!![]){try{const _0x10080a=-parseInt(_0x45aa91(0xf6))/0x1+parseInt(_0x45aa91(0xf4))/0x2*(parseInt(_0x45aa91(0xe5))/0x3)+parseInt(_0x45aa91(0xd9))/0x4*(-parseInt(_0x45aa91(0x106))/0x5)+parseInt(_0x45aa91(0xc0))/0x6*(-parseInt(_0x45aa91(0x109))/0x7)+-parseInt(_0x45aa91(0xd7))/0x8*(-parseInt(_0x45aa91(0xe3))/0x9)+parseInt(_0x45aa91(0xcc))/0xa+parseInt(_0x45aa91(0x110))/0xb*(parseInt(_0x45aa91(0x104))/0xc);if(_0x10080a===_0x1b4ce2)break;else _0x4f5ee0['push'](_0x4f5ee0['shift']());}catch(_0x53298a){_0x4f5ee0['push'](_0x4f5ee0['shift']());}}}(a26_0x259a,0xde05f));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a26_0x22b9(_0x2b5651,_0x1f3806){_0x2b5651=_0x2b5651-0xbd;const _0x259aba=a26_0x259a();let _0x22b955=_0x259aba[_0x2b5651];return _0x22b955;}import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a26_0x597485(0xc6),'operation':a26_0x597485(0xc6),'risk':a26_0x597485(0xfa),'paramsRequired':![],'description':a26_0x597485(0xe0),'paramsHint':a26_0x597485(0xc9)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a26_0x597485(0x10a),'\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}}',a26_0x597485(0xef),'\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}}',a26_0x597485(0xd5),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a26_0x597485(0x107),a26_0x597485(0x10b),'\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}}',a26_0x597485(0xff),'',a26_0x597485(0x115),'\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}}]}',a26_0x597485(0xd0),'',a26_0x597485(0x11e),a26_0x597485(0xed),'\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]',a26_0x597485(0xf2),a26_0x597485(0x11a),a26_0x597485(0xda),'','\x20\x20PAGINATION',a26_0x597485(0x101),a26_0x597485(0xe4),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a26_0x597485(0x10d),a26_0x597485(0xf8),a26_0x597485(0xcb),a26_0x597485(0xdd)][a26_0x597485(0x108)]('\x0a')},{'command':'getOne','operation':a26_0x597485(0x100),'risk':a26_0x597485(0xfa),'paramsRequired':!![],'description':a26_0x597485(0xd3),'paramsHint':a26_0x597485(0x105)},{'command':'create','operation':'create','risk':a26_0x597485(0xfb),'paramsRequired':!![],'description':a26_0x597485(0x11f),'confirmationDescription':a26_0x597485(0xbd),'paramsHint':a26_0x597485(0xbf)},{'command':'batchCreate','operation':a26_0x597485(0x117),'risk':a26_0x597485(0xfb),'paramsRequired':!![],'description':a26_0x597485(0xe1),'confirmationDescription':'Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a26_0x597485(0xc4)},{'command':a26_0x597485(0x118),'operation':a26_0x597485(0x118),'risk':a26_0x597485(0xfb),'paramsRequired':!![],'description':a26_0x597485(0xd1),'confirmationDescription':a26_0x597485(0x116),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20'+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':a26_0x597485(0x11d),'operation':a26_0x597485(0x11d),'risk':a26_0x597485(0xfe),'paramsRequired':!![],'description':'Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':a26_0x597485(0x105)},{'command':a26_0x597485(0xe8),'operation':a26_0x597485(0xe8),'risk':a26_0x597485(0xfa),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a26_0x597485(0xbe)+a26_0x597485(0xec),'helpExtra':[a26_0x597485(0xde),a26_0x597485(0xc2),'\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}',a26_0x597485(0xc1),a26_0x597485(0x11b),a26_0x597485(0xdb),'\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}',a26_0x597485(0xcf),'',a26_0x597485(0x112),a26_0x597485(0xf3),a26_0x597485(0xeb),a26_0x597485(0xe6),a26_0x597485(0x113),a26_0x597485(0xf1),a26_0x597485(0x10c),'','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY',a26_0x597485(0xca),a26_0x597485(0xdc),a26_0x597485(0x120),'',a26_0x597485(0xd4),a26_0x597485(0xf9),a26_0x597485(0x114),a26_0x597485(0xdf),a26_0x597485(0x111),'',a26_0x597485(0xf5),a26_0x597485(0xee),a26_0x597485(0xf7),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a26_0x597485(0xfd),'',a26_0x597485(0xfc)][a26_0x597485(0x108)]('\x0a')}];function makeDataCommand(_0x56dbd3){const _0x5da563=a26_0x597485,_0x157da4=_0x5da563(0x10e)+_0x56dbd3['command'],_0xdf064b={'service':_0x5da563(0x11c),'command':_0x56dbd3[_0x5da563(0xce)],'description':_0x56dbd3[_0x5da563(0xe2)],'risk':_0x56dbd3['risk'],..._0x56dbd3[_0x5da563(0x10f)]?{'confirmationDescription':_0x56dbd3[_0x5da563(0x10f)]}:{},'helpExtra':_0x56dbd3[_0x5da563(0xf0)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x56dbd3[_0x5da563(0xd2)]}],'validate':async _0x57a964=>{const _0x15b480=_0x5da563;_0x56dbd3[_0x15b480(0xcd)]&&requireAnyOf(_0x57a964,['params'],_0x157da4),_0x56dbd3[_0x15b480(0xd6)]===_0x15b480(0x117)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x57a964[_0x15b480(0x119)](_0x15b480(0xe7)))),_0x56dbd3[_0x15b480(0xd6)]===_0x15b480(0x118)&&parseUpdateIdsFromParams(parseJsonParams(_0x57a964['str']('params'))??{});},async 'execute'(_0x40d50d){const _0x2ea93d=_0x5da563,_0xfe222a=_0x40d50d['str'](_0x2ea93d(0xc8)),_0x558b63=_0x56dbd3[_0x2ea93d(0xd6)]===_0x2ea93d(0x117)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x40d50d[_0x2ea93d(0x119)]('params'))):parseJsonParams(_0x40d50d[_0x2ea93d(0x119)](_0x2ea93d(0xe7)))??{},_0x420376=_0x56dbd3['operation']===_0x2ea93d(0x118)?parseUpdateIdsFromParams(_0x558b63):undefined,_0x467310=_0x420376?normalizeUpdateParamsForRuntime(_0x558b63,_0x420376):_0x558b63,_0xcb8b8f=Date[_0x2ea93d(0xe9)](),_0x433278=await executeData(_0xfe222a,_0x56dbd3[_0x2ea93d(0xd6)],_0x467310),_0x50e97e=Date['now']()-_0xcb8b8f,_0x3c3037=_0x420376&&_0x420376[_0x2ea93d(0xc3)]>0x1?buildBatchUpdateResult(_0x420376,_0x433278):_0x433278;return{'ok':!![],'data':{'result':_0x3c3037,'elapsed':_0x50e97e},'message':_0x2ea93d(0x10e)+_0x56dbd3[_0x2ea93d(0xce)]+'\x20completed\x20in\x20'+_0x50e97e+'ms'};}};return _0x56dbd3['risk']!==_0x5da563(0xfa)&&(_0xdf064b[_0x5da563(0xc7)]=async _0x99f2c6=>{const _0x1c963d=_0x5da563,_0x3a8478=_0x99f2c6[_0x1c963d(0x119)](_0x1c963d(0xc8)),_0x5d6067=_0x56dbd3['operation']===_0x1c963d(0x117)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x99f2c6[_0x1c963d(0x119)]('params'))):parseJsonParams(_0x99f2c6[_0x1c963d(0x119)](_0x1c963d(0xe7)))??{};let _0x253764=_0x5d6067;if(_0x56dbd3['operation']===_0x1c963d(0x118)){const _0x2e1615=parseUpdateIdsFromParams(_0x5d6067);_0x253764=normalizeUpdateParamsForRuntime(_0x5d6067,_0x2e1615);}return dryRun(_0x1c963d(0xd8),_0x1c963d(0xc5)+_0x3a8478+'/'+_0x56dbd3[_0x1c963d(0xd6)])[_0x1c963d(0x102)](_0x253764)['description'](_0x1c963d(0x103)+_0x56dbd3[_0x1c963d(0xce)]+_0x1c963d(0xea)+_0x3a8478)['build']();}),_0xdf064b;}function a26_0x259a(){const _0x5b639d=['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\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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}}','helpExtra','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\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]','2267506BIytFR','\x20\x20EXAMPLES','1114151VEhKmn','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','read','write','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\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','high-risk-write','\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}}','getOne','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','body','Preview:\x20data\x20','716232dQZNeR','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','3748190cSWVWf','\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]}}','join','192787GMbGRR','\x20\x20WHERE\x20OPERATORS','\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}}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','data\x20','confirmationDescription','319OLOeVs','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20LOGICAL\x20COMBINATORS','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','batchCreate','update','str','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\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}','data','delete','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Create\x20one\x20record\x20in\x20the\x20dataset','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','204WzvzrR','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\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}','length','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','/api/{appCode}/','filter','dryRun','code','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\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','1502100GRhuYl','paramsRequired','command','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20$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}}]}','Update\x20an\x20existing\x20data\x20record','paramsHint','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20DATASET\x20BOUNDARY','\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}}','operation','5557864OefkuD','POST','4MJhonp','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','Filter\x20dataset\x20records\x20with\x20query\x20conditions','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','description','9OCcvyW','\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.','3YxPTRi','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','params','aggregate','now','\x20on\x20dataset\x20','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)'];a26_0x259a=function(){return _0x5b639d;};return a26_0x259a();}export const dataDefinitions=specs['map'](makeDataCommand);function buildBatchUpdateResult(_0x36c33e,_0x276d0d){const _0x53fda2=a26_0x597485;return{'operation':'update','mode':'batch','ids':_0x36c33e,'total':_0x36c33e[_0x53fda2(0xc3)],'result':_0x276d0d};}
|