@lovrabet/lovrabet-cli 2.3.10-beta.1 → 2.3.10-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/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.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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.d.ts +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.d.ts +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.d.ts +6 -0
- 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-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -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/access-error.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.d.ts +3 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- 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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.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/runtime-user-id.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 +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a13_0x5345ea=a13_0x1cf6;(function(_0x1c1efc,_0xa81ad1){const _0x256af2=a13_0x1cf6,_0x59d7e5=_0x1c1efc();while(!![]){try{const _0x17e573=parseInt(_0x256af2(0x101))/0x1+-parseInt(_0x256af2(0x129))/0x2+-parseInt(_0x256af2(0xd2))/0x3+-parseInt(_0x256af2(0xfa))/0x4+parseInt(_0x256af2(0xe5))/0x5+parseInt(_0x256af2(0x104))/0x6+parseInt(_0x256af2(0x120))/0x7*(-parseInt(_0x256af2(0xdf))/0x8);if(_0x17e573===_0xa81ad1)break;else _0x59d7e5['push'](_0x59d7e5['shift']());}catch(_0x1e9643){_0x59d7e5['push'](_0x59d7e5['shift']());}}}(a13_0x2ce6,0xda8dc));function a13_0x1cf6(_0x163af4,_0x711f56){_0x163af4=_0x163af4-0xd2;const _0x2ce68f=a13_0x2ce6();let _0x1cf696=_0x2ce68f[_0x163af4];return _0x1cf696;}function a13_0x2ce6(){const _0x421d1e=['userCenterDisplayName','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','Option\x20B:\x20apps\x20config\x20(','Auth\x20mode:\x20','506356FjdTiJ','\x20\x20export\x20','Saves\x20a\x20user\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','4235304GDEhPo','Option\x20C:\x20environment\x20variable','push','validation','production','string','trim','\x20Verify:\x20','nonInteractive','str','global\x20config','Missing\x20accessKey.','\x20config.','check','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','accessKeyCreatePath','Clear\x20the\x20user\x20AccessKey\x20from\x20config','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Invalid\x20accessKey\x20format.','ClientAk','code','Save\x20the\x20user\x20AccessKey\x20(global\x20by\x20default;\x20--project\x20for\x20project\x20config)','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','AccessKey:\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','info','access_key','4319UEphze','Use\x20`','\x20config.\x20Nothing\x20to\x20clear.','Stored\x20AccessKey\x20(','isTTY','bool','auth','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','development','285994WGGTmG','logout','ACCESS_KEY','status','AccessKey\x20saved\x20to\x20','read','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','1221636aWJqPN','\x20doctor','global','project','Shorthand\x20for\x20--access-key','project\x20config','authRequired','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','env','AccessKey\x20cleared\x20from\x20','accessKey','envName','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','5200ZxXete','newConfigFileName','expired','\x20auth\x20status','login','\x20Current\x20env:\x20','7337090gQWZxw','accessKeySource','scope','cancelled','\x20config):\x20','daily','Device\x20authorization\x20completed.','success','Option\x20A:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','boolean','join','test','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','AccessKey\x20(ak_xxx...)','=ak_xxx','Status:\x20configured\x20(not\x20remotely\x20verified)','access-key','Environment:\x20','stdin','3332812hlMlmo','\x20(via\x20','Write\x20to\x20global\x20config\x20(default)'];a13_0x2ce6=function(){return _0x421d1e;};return a13_0x2ce6();}import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev,isProduction}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(_0x1bc855=USER_ACCESS_KEY_CREATE_URL){const _0x2008eb=a13_0x1cf6;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+_0x1bc855+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x2008eb(0xee));}function buildAccessKeySetupGuide(_0x3403f1=USER_ACCESS_KEY_CREATE_URL){const _0x23e772=a13_0x1cf6;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x23e772(0xfd)]+':',_0x3403f1,_0x23e772(0xde)+CLI_BIN_NAME+_0x23e772(0x116)][_0x23e772(0xf0)]('\x0a');}function canPromptForAccessKey(_0x449804){const _0x30f4da=a13_0x1cf6;return!_0x449804[_0x30f4da(0x10c)]&&process[_0x30f4da(0xf9)][_0x30f4da(0x124)]!==![]&&process['stdout']['isTTY']!==![];}function resolveAuthScopeFlags(_0x2213e2){const _0x30bf4c=a13_0x1cf6;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2213e2[_0x30bf4c(0x125)]('global'),'explicitProject':_0x2213e2[_0x30bf4c(0x125)]('project'),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x38f783){const _0x28f7b6=a13_0x1cf6;let _0xa630df=(_0x38f783[_0x28f7b6(0x10d)](_0x28f7b6(0xf7))||_0x38f783['str']('ak')||'')[_0x28f7b6(0x10a)]();const _0x1c668f=(_0x38f783[_0x28f7b6(0x10d)](_0x28f7b6(0xda))||'')[_0x28f7b6(0x10a)](),_0x2ceba4=''+getUserDomain()+PRODUCT_CONFIG[_0x28f7b6(0x113)];if(!_0xa630df&&canPromptForAccessKey(_0x38f783))try{showAccessKeyCreateHint(_0x2ceba4),_0xa630df=await promptAccessKey('');}catch(_0x65d030){if(isAbortPrompt(_0x65d030))throw CliErrors[_0x28f7b6(0xe8)]();throw _0x65d030;}if(!_0xa630df)throw CliErrors[_0x28f7b6(0x107)](_0x28f7b6(0x10f),buildAccessKeySetupGuide(_0x2ceba4));if(!ACCESS_KEY_PATTERN[_0x28f7b6(0xf1)](_0xa630df))throw CliErrors['validation'](_0x28f7b6(0x117),_0x28f7b6(0xf2));if(!_0x1c668f)return{'accessKey':_0xa630df};const _0x9b879d=normalizeEnv(_0x1c668f);return{'accessKey':_0xa630df,'env':isDaily(_0x9b879d)?_0x28f7b6(0xea):isDev(_0x9b879d)?_0x28f7b6(0x128):_0x28f7b6(0x108)};}export const authDefinitions=[{'service':'auth','command':a13_0x5345ea(0xe3),'description':a13_0x5345ea(0x11a),'risk':'write','confirmationDescription':a13_0x5345ea(0x103),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x5345ea(0xf7),'type':a13_0x5345ea(0x109),'description':a13_0x5345ea(0xf4)},{'name':'ak','type':a13_0x5345ea(0x109),'description':a13_0x5345ea(0xd6)},{'name':a13_0x5345ea(0xd4),'type':'boolean','description':a13_0x5345ea(0xfc),'default':!![]},{'name':a13_0x5345ea(0xd5),'type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3ab043){const _0x1857f3=a13_0x5345ea;if(_0x3ab043['bool']('yes'))throw CliErrors[_0x1857f3(0x107)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x1857f3(0x121)+CLI_BIN_NAME+_0x1857f3(0x112)+CLI_BIN_NAME+_0x1857f3(0x127));const _0x5be4dd=(_0x3ab043['str'](_0x1857f3(0xf7))||_0x3ab043[_0x1857f3(0x10d)]('ak')||'')[_0x1857f3(0x10a)]();if(!_0x5be4dd&&_0x3ab043[_0x1857f3(0x10c)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'])};const _0x48e8cd=await resolveAuthWriteInput(_0x3ab043),_0x364598=resolveAuthScopeFlags(_0x3ab043),_0xcafcba=readScopedConfig(_0x364598);_0xcafcba[_0x1857f3(0xdc)]=_0x48e8cd[_0x1857f3(0xdc)];_0x48e8cd['env']&&(_0xcafcba[_0x1857f3(0xda)]=_0x48e8cd['env']);writeScopedConfig(_0xcafcba,_0x364598);const _0x3f31d9=_0x364598[_0x1857f3(0xd4)]?_0x1857f3(0xd4):_0x1857f3(0xd5),_0x3fa5bc=_0xcafcba[_0x1857f3(0xda)]?_0x1857f3(0xe4)+_0xcafcba[_0x1857f3(0xda)]+'.':'';return{'ok':!![],'message':_0x1857f3(0x12d)+_0x3f31d9+_0x1857f3(0x110)+_0x3fa5bc+_0x1857f3(0x10b)+CLI_BIN_NAME+_0x1857f3(0xe2)};}},{'service':'auth','command':a13_0x5345ea(0x12a),'description':a13_0x5345ea(0x114),'risk':'write','confirmationDescription':'Removes\x20the\x20user\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Credentials\x20in\x20another\x20scope\x20or\x20environment\x20variables\x20are\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0x5345ea(0xef),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x5345ea(0xd5),'type':a13_0x5345ea(0xef),'description':a13_0x5345ea(0x11d),'default':![]}],async 'execute'(_0x5b8c70){const _0x58f93d=a13_0x5345ea,_0xb6a868=resolveAuthScopeFlags(_0x5b8c70),_0x3ed1ef=readScopedConfig(_0xb6a868),_0x224ad8=!!_0x3ed1ef[_0x58f93d(0xdc)];delete _0x3ed1ef['accessKey'],writeScopedConfig(_0x3ed1ef,_0xb6a868);const _0x4c972d=_0xb6a868[_0x58f93d(0xd4)]?_0x58f93d(0xd4):'project';if(_0x224ad8)return{'ok':!![],'message':_0x58f93d(0xdb)+_0x4c972d+_0x58f93d(0x110)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x4c972d+_0x58f93d(0x122)};}},{'service':a13_0x5345ea(0x126),'command':a13_0x5345ea(0x12c),'description':'Show\x20current\x20authentication\x20status','risk':a13_0x5345ea(0x12e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0x5345ea(0xef),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x5345ea(0xd5),'type':'boolean','description':a13_0x5345ea(0x12f),'default':![]},{'name':a13_0x5345ea(0x111),'type':a13_0x5345ea(0xef),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x536bbf){const _0x2ac030=a13_0x5345ea,_0x156db9=resolveAuthScopeFlags(_0x536bbf),_0x1a3767=readScopedConfig(_0x156db9),_0x1b1b3b=productEnvName(_0x2ac030(0x12b)),_0xa1e8ce=_0x536bbf[_0x2ac030(0xdc)],_0x2db21c=_0x536bbf[_0x2ac030(0xe6)],_0x4077d8=[_0x2ac030(0x100)+AUTH_MODE[_0x2ac030(0x118)]];if(_0x536bbf[_0x2ac030(0xdd)]&&!isProduction(_0x536bbf[_0x2ac030(0xdd)]))_0x4077d8[_0x2ac030(0x106)](_0x2ac030(0xf8)+_0x536bbf['envName']);_0x4077d8[_0x2ac030(0x106)](_0x2ac030(0x123)+(_0x156db9[_0x2ac030(0xd4)]?_0x2ac030(0xd4):_0x2ac030(0xd5))+_0x2ac030(0xe9)+(_0x1a3767['accessKey']?maskCliAccessKey(_0x1a3767[_0x2ac030(0xdc)]):'(not\x20set)'));if(_0xa1e8ce){const _0x5504a0=maskCliAccessKey(_0xa1e8ce);_0x4077d8[_0x2ac030(0x106)](_0x2ac030(0x11c)+_0x5504a0+(_0x2db21c?_0x2ac030(0xfb)+_0x2db21c+')':'')),_0x4077d8['push']('Status:\x20configured\x20(not\x20remotely\x20verified)');}if(!_0xa1e8ce){_0x4077d8[_0x2ac030(0x106)](''),_0x4077d8['push'](_0x2ac030(0xd9)),_0x4077d8[_0x2ac030(0x106)](''),_0x4077d8[_0x2ac030(0x106)](_0x2ac030(0xed)+CLI_BIN_NAME+_0x2ac030(0xf3)),_0x4077d8['push'](''),_0x4077d8[_0x2ac030(0x106)](_0x2ac030(0xff)+PRODUCT_CONFIG[_0x2ac030(0xe0)]+')'),_0x4077d8[_0x2ac030(0x106)](_0x2ac030(0x11b)),_0x4077d8[_0x2ac030(0x106)](''),_0x4077d8['push'](_0x2ac030(0x105)),_0x4077d8['push'](_0x2ac030(0x102)+_0x1b1b3b+_0x2ac030(0xf5)),_0x4077d8[_0x2ac030(0x106)](''),_0x4077d8['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x2ac030(0xe2)),_0x4077d8[_0x2ac030(0x106)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x2ac030(0xd3));if(_0x536bbf[_0x2ac030(0x125)](_0x2ac030(0x111))){const _0x3d3623=readStoredDeviceCode();if(_0x3d3623&&!isStoredDeviceCodeExpired(_0x3d3623)){const _0x1109f0=getUserDomain(),_0x204c3f=await fetchDeviceToken(_0x1109f0,_0x3d3623[_0x2ac030(0x119)]);if(_0x204c3f[_0x2ac030(0x12c)]===_0x2ac030(0xec)&&_0x204c3f[_0x2ac030(0x11f)]){const _0x4c1910={'global':_0x3d3623[_0x2ac030(0xe7)]===_0x2ac030(0xd4)},_0x3bb47e=readScopedConfig(_0x4c1910);_0x3bb47e[_0x2ac030(0xdc)]=_0x204c3f[_0x2ac030(0x11f)],writeScopedConfig(_0x3bb47e,_0x4c1910),deleteStoredDeviceCode();const _0x54a74b=_0x204c3f[_0x2ac030(0x11f)],_0x3cd8e9=maskCliAccessKey(_0x54a74b),_0x2a5a8d=_0x3d3623[_0x2ac030(0xe7)]==='global'?_0x2ac030(0x10e):_0x2ac030(0xd7);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE['ClientAk'],..._0x536bbf['envName']&&!isProduction(_0x536bbf[_0x2ac030(0xdd)])?['Environment:\x20'+_0x536bbf[_0x2ac030(0xdd)]]:[],_0x2ac030(0x11c)+_0x3cd8e9+_0x2ac030(0xfb)+_0x2a5a8d+')',_0x2ac030(0xf6),_0x2ac030(0xeb)][_0x2ac030(0xf0)]('\x0a')};}_0x204c3f['status']===_0x2ac030(0xe1)&&deleteStoredDeviceCode();throw CliErrors['authRequired'](_0x2ac030(0xfe));}throw CliErrors[_0x2ac030(0xd8)](_0x4077d8['join']('\x0a'));}}return{'ok':!![],'message':_0x4077d8[_0x2ac030(0xf0)]('\x0a')};}},{'service':a13_0x5345ea(0x126),'command':a13_0x5345ea(0x11e),'description':a13_0x5345ea(0x115),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5e149e){const _0x281880=a13_0x5345ea,_0x5a34ae=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x5a34ae,'meta':{'env':_0x5e149e[_0x281880(0xdd)]??_0x281880(0x108)}}};}},authDeviceDefinition];
|
|
1
|
+
const a13_0x381c56=a13_0x3613;(function(_0xe97b53,_0x2c2840){const _0x41fcc9=a13_0x3613,_0x539be5=_0xe97b53();while(!![]){try{const _0x953c4b=-parseInt(_0x41fcc9(0x1e5))/0x1+parseInt(_0x41fcc9(0x1da))/0x2+parseInt(_0x41fcc9(0x1d7))/0x3+-parseInt(_0x41fcc9(0x222))/0x4*(parseInt(_0x41fcc9(0x1ed))/0x5)+parseInt(_0x41fcc9(0x215))/0x6*(-parseInt(_0x41fcc9(0x1db))/0x7)+parseInt(_0x41fcc9(0x200))/0x8*(-parseInt(_0x41fcc9(0x1e8))/0x9)+parseInt(_0x41fcc9(0x211))/0xa*(parseInt(_0x41fcc9(0x1f8))/0xb);if(_0x953c4b===_0x2c2840)break;else _0x539be5['push'](_0x539be5['shift']());}catch(_0x579a68){_0x539be5['push'](_0x539be5['shift']());}}}(a13_0xafac,0x7593a));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';function a13_0x3613(_0x1c46a4,_0x1c810e){_0x1c46a4=_0x1c46a4-0x1cd;const _0xafac8d=a13_0xafac();let _0x361315=_0xafac8d[_0x1c46a4];return _0x361315;}import{normalizeEnv,isDaily,isDev,isProduction}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(_0x5f0866=USER_ACCESS_KEY_CREATE_URL){const _0x149574=a13_0x3613;writeCliSideChannelLine(_0x149574(0x21b)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+_0x5f0866+'\x0a'),writeCliSideChannelLine(_0x149574(0x20a)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x149574(0x217));}function buildAccessKeySetupGuide(_0x7d8fc8=USER_ACCESS_KEY_CREATE_URL){const _0x2d1d28=a13_0x3613;return[_0x2d1d28(0x21b)+PRODUCT_CONFIG[_0x2d1d28(0x1cd)]+':',_0x7d8fc8,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x2d1d28(0x216)][_0x2d1d28(0x1d5)]('\x0a');}function canPromptForAccessKey(_0x3b9722){const _0x21ecea=a13_0x3613;return!_0x3b9722[_0x21ecea(0x1f6)]&&process['stdin'][_0x21ecea(0x21a)]!==![]&&process['stdout']['isTTY']!==![];}function a13_0xafac(){const _0xd7f2d0=['1750DOEoHv','global-default','scope','accessKeySource','AccessKey\x20saved\x20to\x20','check','Clear\x20the\x20user\x20AccessKey\x20from\x20config','info','\x20config.','yes','281302sWvBBw','Clear\x20from\x20global\x20config\x20(default)','Removes\x20the\x20user\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Credentials\x20in\x20another\x20scope\x20or\x20environment\x20variables\x20are\x20unchanged.','31689UOfcQo','project','AccessKey\x20(ak_xxx...)','bool','\x20auth\x20status','172820aRxZTj','No\x20AccessKey\x20found\x20in\x20','Status:\x20configured\x20(not\x20remotely\x20verified)','Option\x20A:\x20','development','envName','boolean','Then\x20verify\x20with:\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','nonInteractive','login','11cFSBpb','access_key','status','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','accessKey','production','Save\x20the\x20user\x20AccessKey\x20(global\x20by\x20default;\x20--project\x20for\x20project\x20config)','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','1976tWkEWH','ClientAk','Environment:\x20','push','\x20config.\x20Nothing\x20to\x20clear.','\x20doctor','ACCESS_KEY','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Shorthand\x20for\x20--access-key','accessKeyCreatePath','Tip:\x20you\x20can\x20also\x20run:','Saves\x20a\x20user\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','test','logout','success','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','str','10863350RVHuwu','\x20\x20export\x20','global','project\x20config','3282sPbhkQ','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20auth\x20login\x20--access-key\x20<ak_xxx>','auth','access-key','isTTY','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','authRequired','env','AccessKey:\x20','write','trim','\x20(via\x20','88HveYLo','Auth\x20mode:\x20','code','userCenterDisplayName','newConfigFileName','=ak_xxx','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Option\x20B:\x20apps\x20config\x20(','read','Use\x20`','global\x20config','join','validation','1790559wAEDRg','Device\x20authorization\x20completed.','Read\x20from\x20global\x20config\x20(default)','1693106DVoFnn'];a13_0xafac=function(){return _0xd7f2d0;};return a13_0xafac();}function resolveAuthScopeFlags(_0x1ce5f4){const _0x2659db=a13_0x3613;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1ce5f4[_0x2659db(0x1eb)]('global'),'explicitProject':_0x1ce5f4['bool'](_0x2659db(0x1e9)),'policy':_0x2659db(0x1dc)}));}async function resolveAuthWriteInput(_0x19d428){const _0x3a0a6f=a13_0x3613;let _0x4e5310=(_0x19d428['str'](_0x3a0a6f(0x219))||_0x19d428[_0x3a0a6f(0x210)]('ak')||'')[_0x3a0a6f(0x220)]();const _0x2f47e0=(_0x19d428[_0x3a0a6f(0x210)]('env')||'')[_0x3a0a6f(0x220)](),_0x31c7d1=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0x4e5310&&canPromptForAccessKey(_0x19d428))try{showAccessKeyCreateHint(_0x31c7d1),_0x4e5310=await promptAccessKey('');}catch(_0x443790){if(isAbortPrompt(_0x443790))throw CliErrors['cancelled']();throw _0x443790;}if(!_0x4e5310)throw CliErrors[_0x3a0a6f(0x1d6)]('Missing\x20accessKey.',buildAccessKeySetupGuide(_0x31c7d1));if(!ACCESS_KEY_PATTERN[_0x3a0a6f(0x20c)](_0x4e5310))throw CliErrors['validation']('Invalid\x20accessKey\x20format.','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x2f47e0)return{'accessKey':_0x4e5310};const _0x166350=normalizeEnv(_0x2f47e0);return{'accessKey':_0x4e5310,'env':isDaily(_0x166350)?'daily':isDev(_0x166350)?_0x3a0a6f(0x1f1):_0x3a0a6f(0x1fd)};}export const authDefinitions=[{'service':'auth','command':a13_0x381c56(0x1f7),'description':a13_0x381c56(0x1fe),'risk':a13_0x381c56(0x21f),'confirmationDescription':a13_0x381c56(0x20b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x381c56(0x219),'type':'string','description':a13_0x381c56(0x1ea)},{'name':'ak','type':'string','description':a13_0x381c56(0x208)},{'name':a13_0x381c56(0x213),'type':a13_0x381c56(0x1f3),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x381c56(0x1e9),'type':'boolean','description':a13_0x381c56(0x1f5),'default':![]}],async 'execute'(_0x24f2e9){const _0x3a1369=a13_0x381c56;if(_0x24f2e9['bool'](_0x3a1369(0x1e4)))throw CliErrors['validation']('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x3a1369(0x1d3)+CLI_BIN_NAME+_0x3a1369(0x1ff)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x4cf4b0=(_0x24f2e9[_0x3a1369(0x210)](_0x3a1369(0x219))||_0x24f2e9[_0x3a1369(0x210)]('ak')||'')[_0x3a1369(0x220)]();if(!_0x4cf4b0&&_0x24f2e9[_0x3a1369(0x1f6)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x3a1369(0x209)])};const _0x584964=await resolveAuthWriteInput(_0x24f2e9),_0x838a16=resolveAuthScopeFlags(_0x24f2e9),_0x38b406=readScopedConfig(_0x838a16);_0x38b406[_0x3a1369(0x1fc)]=_0x584964['accessKey'];_0x584964['env']&&(_0x38b406['env']=_0x584964['env']);writeScopedConfig(_0x38b406,_0x838a16);const _0x4b83cf=_0x838a16['global']?'global':_0x3a1369(0x1e9),_0x5bf8eb=_0x38b406['env']?'\x20Current\x20env:\x20'+_0x38b406[_0x3a1369(0x21d)]+'.':'';return{'ok':!![],'message':_0x3a1369(0x1df)+_0x4b83cf+_0x3a1369(0x1e3)+_0x5bf8eb+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':'auth','command':a13_0x381c56(0x20d),'description':a13_0x381c56(0x1e1),'risk':a13_0x381c56(0x21f),'confirmationDescription':a13_0x381c56(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x381c56(0x213),'type':a13_0x381c56(0x1f3),'description':a13_0x381c56(0x1e6),'default':!![]},{'name':'project','type':a13_0x381c56(0x1f3),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3fc4f5){const _0x4e41eb=a13_0x381c56,_0x4a4075=resolveAuthScopeFlags(_0x3fc4f5),_0xed252d=readScopedConfig(_0x4a4075),_0x455708=!!_0xed252d[_0x4e41eb(0x1fc)];delete _0xed252d[_0x4e41eb(0x1fc)],writeScopedConfig(_0xed252d,_0x4a4075);const _0x5c2794=_0x4a4075[_0x4e41eb(0x213)]?_0x4e41eb(0x213):'project';if(_0x455708)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x5c2794+_0x4e41eb(0x1e3)};return{'ok':!![],'message':_0x4e41eb(0x1ee)+_0x5c2794+_0x4e41eb(0x204)};}},{'service':a13_0x381c56(0x218),'command':'status','description':'Show\x20current\x20authentication\x20status','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x381c56(0x213),'type':a13_0x381c56(0x1f3),'description':a13_0x381c56(0x1d9),'default':!![]},{'name':a13_0x381c56(0x1e9),'type':a13_0x381c56(0x1f3),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a13_0x381c56(0x1e0),'type':'boolean','description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0xb92045){const _0x14c951=a13_0x381c56,_0x9c00a4=resolveAuthScopeFlags(_0xb92045),_0x407eeb=readScopedConfig(_0x9c00a4),_0x2c1f0e=productEnvName(_0x14c951(0x206)),_0x350294=_0xb92045['accessKey'],_0x3eb4c8=_0xb92045[_0x14c951(0x1de)],_0x58d9bd=[_0x14c951(0x223)+AUTH_MODE[_0x14c951(0x201)]];if(_0xb92045[_0x14c951(0x1f2)]&&!isProduction(_0xb92045[_0x14c951(0x1f2)]))_0x58d9bd['push'](_0x14c951(0x202)+_0xb92045[_0x14c951(0x1f2)]);_0x58d9bd[_0x14c951(0x203)]('Stored\x20AccessKey\x20('+(_0x9c00a4[_0x14c951(0x213)]?_0x14c951(0x213):'project')+'\x20config):\x20'+(_0x407eeb['accessKey']?maskCliAccessKey(_0x407eeb['accessKey']):'(not\x20set)'));if(_0x350294){const _0x3c0f08=maskCliAccessKey(_0x350294);_0x58d9bd[_0x14c951(0x203)](_0x14c951(0x21e)+_0x3c0f08+(_0x3eb4c8?_0x14c951(0x221)+_0x3eb4c8+')':'')),_0x58d9bd[_0x14c951(0x203)](_0x14c951(0x1ef));}if(!_0x350294){_0x58d9bd[_0x14c951(0x203)](''),_0x58d9bd['push'](_0x14c951(0x20f)),_0x58d9bd[_0x14c951(0x203)](''),_0x58d9bd[_0x14c951(0x203)](_0x14c951(0x1f0)+CLI_BIN_NAME+_0x14c951(0x1fb)),_0x58d9bd[_0x14c951(0x203)](''),_0x58d9bd[_0x14c951(0x203)](_0x14c951(0x1d1)+PRODUCT_CONFIG[_0x14c951(0x1ce)]+')'),_0x58d9bd[_0x14c951(0x203)](_0x14c951(0x207)),_0x58d9bd[_0x14c951(0x203)](''),_0x58d9bd[_0x14c951(0x203)]('Option\x20C:\x20environment\x20variable'),_0x58d9bd[_0x14c951(0x203)](_0x14c951(0x212)+_0x2c1f0e+_0x14c951(0x1cf)),_0x58d9bd[_0x14c951(0x203)](''),_0x58d9bd['push'](_0x14c951(0x1f4)+CLI_BIN_NAME+_0x14c951(0x1ec)),_0x58d9bd[_0x14c951(0x203)](_0x14c951(0x1d0)+CLI_BIN_NAME+_0x14c951(0x205));if(_0xb92045[_0x14c951(0x1eb)](_0x14c951(0x1e0))){const _0x3c4f29=readStoredDeviceCode();if(_0x3c4f29&&!isStoredDeviceCodeExpired(_0x3c4f29)){const _0x3e5250=getUserDomain(),_0x20f462=await fetchDeviceToken(_0x3e5250,_0x3c4f29[_0x14c951(0x224)]);if(_0x20f462['status']===_0x14c951(0x20e)&&_0x20f462[_0x14c951(0x1f9)]){const _0x21b874={'global':_0x3c4f29[_0x14c951(0x1dd)]===_0x14c951(0x213)},_0x1f8991=readScopedConfig(_0x21b874);_0x1f8991['accessKey']=_0x20f462['access_key'],writeScopedConfig(_0x1f8991,_0x21b874),deleteStoredDeviceCode();const _0x127529=_0x20f462[_0x14c951(0x1f9)],_0x28cad9=maskCliAccessKey(_0x127529),_0x3e701e=_0x3c4f29[_0x14c951(0x1dd)]===_0x14c951(0x213)?_0x14c951(0x1d4):_0x14c951(0x214);return{'ok':!![],'message':[_0x14c951(0x223)+AUTH_MODE['ClientAk'],..._0xb92045[_0x14c951(0x1f2)]&&!isProduction(_0xb92045['envName'])?[_0x14c951(0x202)+_0xb92045['envName']]:[],_0x14c951(0x21e)+_0x28cad9+_0x14c951(0x221)+_0x3e701e+')',_0x14c951(0x1ef),_0x14c951(0x1d8)]['join']('\x0a')};}_0x20f462[_0x14c951(0x1fa)]==='expired'&&deleteStoredDeviceCode();throw CliErrors[_0x14c951(0x21c)]('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors[_0x14c951(0x21c)](_0x58d9bd[_0x14c951(0x1d5)]('\x0a'));}}return{'ok':!![],'message':_0x58d9bd[_0x14c951(0x1d5)]('\x0a')};}},{'service':a13_0x381c56(0x218),'command':a13_0x381c56(0x1e2),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a13_0x381c56(0x1d2),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x58b2ec){const _0x4610c9=a13_0x381c56,_0x5022af=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x5022af,'meta':{'env':_0x58b2ec[_0x4610c9(0x1f2)]??'production'}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x527eea,_0x45f887){const _0x425d6d=a14_0x282a,_0x3a86f2=_0x527eea();while(!![]){try{const _0x1dcfe9=-parseInt(_0x425d6d(0x1dc))/0x1+-parseInt(_0x425d6d(0x1de))/0x2+parseInt(_0x425d6d(0x1d5))/0x3*(parseInt(_0x425d6d(0x1e0))/0x4)+-parseInt(_0x425d6d(0x1e3))/0x5+parseInt(_0x425d6d(0x1e4))/0x6+-parseInt(_0x425d6d(0x1da))/0x7*(parseInt(_0x425d6d(0x1d7))/0x8)+parseInt(_0x425d6d(0x1dd))/0x9;if(_0x1dcfe9===_0x45f887)break;else _0x3a86f2['push'](_0x3a86f2['shift']());}catch(_0x20bbd6){_0x3a86f2['push'](_0x3a86f2['shift']());}}}(a14_0x4467,0x45000));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x126b2a=a14_0x282a;super(_0x126b2a(0x1db)),this['name']=_0x126b2a(0x1e5);}}function createSafeRl(){const _0x1508c2=a14_0x282a,_0x1593c5=createInterface({'input':process[_0x1508c2(0x1d8)],'output':process['stdout']});let _0x585726;const _0x25e1af=new Promise((_0x24aabe,_0x5e4f55)=>{_0x585726=()=>{const _0x1a3238=a14_0x282a;_0x585726&&(_0x1593c5[_0x1a3238(0x1d6)](_0x1a3238(0x1e2),_0x585726),_0x585726=undefined);try{_0x1593c5[_0x1a3238(0x1e1)]();}catch{}_0x5e4f55(new AbortPrompt());},_0x1593c5['once']('SIGINT',_0x585726);}),_0x2b0edf=()=>{const _0x2858df=_0x1508c2;_0x585726&&(_0x1593c5[_0x2858df(0x1d6)](_0x2858df(0x1e2),_0x585726),_0x585726=undefined);try{_0x1593c5[_0x2858df(0x1e1)]();}catch{}};return{'rl':_0x1593c5,'abortPromise':_0x25e1af,'disposeSuccess':_0x2b0edf};}export async function promptAccessKey(_0xea94c3=''){const _0x38ebbf=a14_0x282a,{rl:_0x22b773,abortPromise:_0x137f48,disposeSuccess:_0xa1dd44}=createSafeRl(),_0x5c1a8b=new Promise(_0x1ac5dc=>{const _0x3518a4=_0xea94c3?'AccessKey\x20('+_0xea94c3+'):\x20':'AccessKey\x20(paste\x20ak_...):\x20';_0x22b773['question'](_0x3518a4,_0x40a48f=>{const _0x3d9e57=a14_0x282a;_0xa1dd44(),_0x1ac5dc(_0x40a48f[_0x3d9e57(0x1e6)]()||_0xea94c3);});});return Promise[_0x38ebbf(0x1d9)]([_0x5c1a8b,_0x137f48]);}function a14_0x282a(_0x4f8c5d,_0x30c11e){_0x4f8c5d=_0x4f8c5d-0x1d5;const _0x446764=a14_0x4467();let _0x282a13=_0x446764[_0x4f8c5d];return _0x282a13;}function a14_0x4467(){const _0x1826fa=['name','20WhGIXu','close','SIGINT','1668225NhTQwO','481872VmRQaB','AbortPrompt','trim','300603TNvRUz','removeListener','624oEpcxB','stdin','race','22673QPoDNa','User\x20aborted\x20prompt','47496mtNyQY','6986115MHHCMJ','882290vrvYpn'];a14_0x4467=function(){return _0x1826fa;};return a14_0x4467();}export function isAbortPrompt(_0x2c3e56){const _0x759f03=a14_0x282a;return _0x2c3e56 instanceof Error&&_0x2c3e56[_0x759f03(0x1df)]===_0x759f03(0x1e5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x4e5e75=a15_0x5400;(function(_0x215911,_0x3a8781){const _0x3400a1=a15_0x5400,_0x5b9a19=_0x215911();while(!![]){try{const _0x593cee=-parseInt(_0x3400a1(0x124))/0x1+parseInt(_0x3400a1(0x121))/0x2*(-parseInt(_0x3400a1(0x11c))/0x3)+-parseInt(_0x3400a1(0x126))/0x4*(parseInt(_0x3400a1(0x11f))/0x5)+parseInt(_0x3400a1(0x130))/0x6*(-parseInt(_0x3400a1(0x12c))/0x7)+parseInt(_0x3400a1(0x120))/0x8*(parseInt(_0x3400a1(0x12b))/0x9)+parseInt(_0x3400a1(0x12d))/0xa+parseInt(_0x3400a1(0x12a))/0xb;if(_0x593cee===_0x3a8781)break;else _0x5b9a19['push'](_0x5b9a19['shift']());}catch(_0x41674b){_0x5b9a19['push'](_0x5b9a19['shift']());}}}(a15_0x2ff7,0x3428a));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';function a15_0x5400(_0x315e18,_0x412762){_0x315e18=_0x315e18-0x11c;const _0x2ff7c9=a15_0x2ff7();let _0x5400ac=_0x2ff7c9[_0x315e18];return _0x5400ac;}function a15_0x2ff7(){const _0xf784c2=['gmtModified','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','functionName','5866234CVUdkQ','19449vVtcKq','79898NuBvod','1383150XxIYiz','Backend\x20Function\x20name','name','60JvZchX','3ZeQwmG','str','detail','35fHGAtu','232OmdbJm','371122gICFaP','version','description','169394RdYqbe','read','29452gYOXcE'];a15_0x2ff7=function(){return _0xf784c2;};return a15_0x2ff7();}export const bffDetail={'service':'bff','command':a15_0x4e5e75(0x11e),'description':a15_0x4e5e75(0x128),'risk':a15_0x4e5e75(0x125),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x4e5e75(0x12e)}],async 'execute'(_0x375110){const _0x3ce730=a15_0x4e5e75,_0xdc57f8=await getBffEndpointContract(_0x375110['appCode'],_0x375110[_0x3ce730(0x11d)](_0x3ce730(0x12f)));return{'ok':!![],'data':{'appCode':_0xdc57f8['appCode'],'functionName':_0xdc57f8[_0x3ce730(0x129)],'description':_0xdc57f8[_0x3ce730(0x123)]||'(none)','version':_0xdc57f8[_0x3ce730(0x122)],'gmtModified':_0xdc57f8[_0x3ce730(0x127)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x12301f=a16_0x1a39;(function(_0x25585d,_0x554fe9){const _0x4fbdb2=a16_0x1a39,_0x32a315=_0x25585d();while(!![]){try{const _0x26c060=-parseInt(_0x4fbdb2(0x123))/0x1*(parseInt(_0x4fbdb2(0x122))/0x2)+-parseInt(_0x4fbdb2(0x12e))/0x3*(parseInt(_0x4fbdb2(0x11e))/0x4)+-parseInt(_0x4fbdb2(0x120))/0x5+parseInt(_0x4fbdb2(0x121))/0x6*(-parseInt(_0x4fbdb2(0x12a))/0x7)+parseInt(_0x4fbdb2(0x12d))/0x8*(-parseInt(_0x4fbdb2(0x11c))/0x9)+parseInt(_0x4fbdb2(0x12c))/0xa+-parseInt(_0x4fbdb2(0x130))/0xb*(-parseInt(_0x4fbdb2(0x128))/0xc);if(_0x26c060===_0x554fe9)break;else _0x32a315['push'](_0x32a315['shift']());}catch(_0x3cfa59){_0x32a315['push'](_0x32a315['shift']());}}}(a16_0x17f5,0x8be80));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a16_0x1a39(_0xfada0b,_0x469b65){_0xfada0b=_0xfada0b-0x11b;const _0x17f5e6=a16_0x17f5();let _0x1a39ef=_0x17f5e6[_0xfada0b];return _0x1a39ef;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x12301f(0x12b),'command':a16_0x12301f(0x126),'description':a16_0x12301f(0x11b),'risk':a16_0x12301f(0x11f),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x12301f(0x127)},PARAMS_FLAG],async 'execute'(_0xc1ed5){const _0x4b12fc=a16_0x12301f,_0x1bdff3=parseJsonParams(_0xc1ed5[_0x4b12fc(0x12f)](_0x4b12fc(0x11d))),_0x36f5ed=Date[_0x4b12fc(0x124)](),_0x10077e=await executeSdkBff(_0xc1ed5[_0x4b12fc(0x12f)](_0x4b12fc(0x125)),_0x1bdff3),_0x5da41b=Date[_0x4b12fc(0x124)]()-_0x36f5ed;return{'ok':!![],'data':{'result':_0x10077e,'elapsed':_0x5da41b},'message':_0x4b12fc(0x129)+_0x5da41b+'ms'};}};function a16_0x17f5(){const _0x3b6730=['bff','7878080IecjcF','4716112WGgWbn','27EweVpc','str','106425cUbviy','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','9IXZWmX','params','49532XnMiUJ','read','3089160eTBmYz','3743328xAxkkh','681146NOUhPn','2SsMMwu','now','name','exec','Backend\x20Function\x20name\x20to\x20execute','2988XrtqAg','Backend\x20Function\x20executed\x20in\x20','7HkrItj'];a16_0x17f5=function(){return _0x3b6730;};return a16_0x17f5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a1979,_0x2594b6){const _0x3b8729=a17_0x50a7,_0x4cb184=_0x1a1979();while(!![]){try{const _0xde6715=-parseInt(_0x3b8729(0xab))/0x1*(parseInt(_0x3b8729(0xad))/0x2)+parseInt(_0x3b8729(0xae))/0x3+parseInt(_0x3b8729(0xb2))/0x4+-parseInt(_0x3b8729(0xaf))/0x5*(parseInt(_0x3b8729(0xb1))/0x6)+-parseInt(_0x3b8729(0xb0))/0x7+-parseInt(_0x3b8729(0xac))/0x8+parseInt(_0x3b8729(0xaa))/0x9;if(_0xde6715===_0x2594b6)break;else _0x4cb184['push'](_0x4cb184['shift']());}catch(_0x23a121){_0x4cb184['push'](_0x4cb184['shift']());}}}(a17_0x32f5,0x60f62));import{bffDetail}from'../../commands/bff/detail.js';function a17_0x50a7(_0x45f87c,_0x35d9b7){_0x45f87c=_0x45f87c-0xaa;const _0x32f53e=a17_0x32f5();let _0x50a752=_0x32f53e[_0x45f87c];return _0x50a752;}import{bffExec}from'../../commands/bff/exec.js';function a17_0x32f5(){const _0x316199=['5327980qeVmZJ','186XOZksS','1565040APgnmi','11456973hrBsks','1463bwflWd','2460984bsoGJq','390BqFhVa','1720284vIzphB','78465KMVFPT'];a17_0x32f5=function(){return _0x316199;};return a17_0x32f5();}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x1fee24=a18_0x19fe;function a18_0x5120(){const _0x30ad3e=['7605270fTVkNM','install','apiError','code','error','CLI\x20Built-in\x20Skill\x20','\x20installed','setLogPath','unknown','7hJgLoB','2778436FsxPRv','nonInteractive','INSTALL_FAILED','log','read','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','3062725UKbOzo','repairCommand','4214708PyXuHN','pipe',']:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','1563544gvyvxi','cli-skill','cli-skill-install','installedPath','skillVersion','inherit','\x20is\x20already\x20current','4636232eHLoAz','814047XirrUF','\x20at\x20'];a18_0x5120=function(){return _0x30ad3e;};return a18_0x5120();}(function(_0x51f12b,_0x185caa){const _0x7c9d5a=a18_0x19fe,_0x1f451c=_0x51f12b();while(!![]){try{const _0x1a7c25=-parseInt(_0x7c9d5a(0x1b3))/0x1+-parseInt(_0x7c9d5a(0x1a7))/0x2+parseInt(_0x7c9d5a(0x1bb))/0x3+parseInt(_0x7c9d5a(0x1af))/0x4+parseInt(_0x7c9d5a(0x1ad))/0x5+parseInt(_0x7c9d5a(0x1bd))/0x6*(parseInt(_0x7c9d5a(0x1c6))/0x7)+parseInt(_0x7c9d5a(0x1ba))/0x8;if(_0x1a7c25===_0x185caa)break;else _0x1f451c['push'](_0x1f451c['shift']());}catch(_0x4976ba){_0x1f451c['push'](_0x1f451c['shift']());}}}(a18_0x5120,0xcb18b));function a18_0x19fe(_0x11a3b2,_0x3aa632){_0x11a3b2=_0x11a3b2-0x1a7;const _0x5120d2=a18_0x5120();let _0x19fe00=_0x5120d2[_0x11a3b2];return _0x19fe00;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a18_0x1fee24(0x1b4),'command':a18_0x1fee24(0x1be),'description':'Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','risk':a18_0x1fee24(0x1ab),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x50d5c7){const _0x160d80=a18_0x1fee24;logger[_0x160d80(0x1c4)](process['cwd']()),logger['info'](_0x160d80(0x1b5),_0x160d80(0x1b2));const _0x151e96=installBuiltinSkill({'stdio':_0x50d5c7[_0x160d80(0x1a8)]?_0x160d80(0x1b0):_0x160d80(0x1b8)});if(!_0x151e96['ok'])throw CliErrors[_0x160d80(0x1bf)]('Built-in\x20Skill\x20install\x20failed\x20['+(_0x151e96[_0x160d80(0x1c0)]||_0x160d80(0x1a9))+_0x160d80(0x1b1)+(_0x151e96[_0x160d80(0x1c1)]||_0x160d80(0x1c5)),_0x160d80(0x1ac)+_0x151e96[_0x160d80(0x1ae)]);const _0x2c1f17=_0x151e96[_0x160d80(0x1b6)]?_0x160d80(0x1bc)+_0x151e96[_0x160d80(0x1b6)]:'';return console[_0x160d80(0x1aa)](_0x151e96['changed']?_0x160d80(0x1c2)+_0x151e96[_0x160d80(0x1b7)]+_0x160d80(0x1c3)+_0x2c1f17:_0x160d80(0x1c2)+_0x151e96[_0x160d80(0x1b7)]+_0x160d80(0x1b9)+_0x2c1f17),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24bffb,_0x5e840b){const _0x563213=a19_0x2d24,_0xf4a1ba=_0x24bffb();while(!![]){try{const _0x299f13=parseInt(_0x563213(0x154))/0x1+parseInt(_0x563213(0x167))/0x2+-parseInt(_0x563213(0x15f))/0x3+-parseInt(_0x563213(0x165))/0x4+parseInt(_0x563213(0x157))/0x5*(-parseInt(_0x563213(0x161))/0x6)+parseInt(_0x563213(0x162))/0x7+-parseInt(_0x563213(0x166))/0x8*(parseInt(_0x563213(0x15a))/0x9);if(_0x299f13===_0x5e840b)break;else _0xf4a1ba['push'](_0xf4a1ba['shift']());}catch(_0x239851){_0xf4a1ba['push'](_0xf4a1ba['shift']());}}}(a19_0x2648,0xec406));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a19_0x2648(){const _0x566042=['Not\x20inside\x20a\x20project\x20(no\x20','Use\x20only\x20one\x20config\x20scope\x20flag.','1890455LwwJSR','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','global','565LGIDQd','\x20(global)','\x20found).','18jLdXJT','Add\x20--global\x20to\x20write\x20to\x20~/','project-or-global-explicit','newConfigFileName',',\x20or\x20create\x20a\x20project-local\x20','2465208BQrAWG','global-default','17598scQokA','11279632xSQeKh','validation','inProject','292056AjMmvs','8444320EAMthB','1606228KNAEPD','\x20first.'];a19_0x2648=function(){return _0x566042;};return a19_0x2648();}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(_0x4a3a79){const _0xfca177=a19_0x2d24,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x4eec99}=_0x4a3a79;if(explicitGlobal&&explicitProject)throw CliErrors['validation'](_0xfca177(0x155),_0xfca177(0x153));if(explicitGlobal)return _0xfca177(0x156);if(explicitProject)return'project';switch(_0x4eec99){case _0xfca177(0x160):return'global';case _0xfca177(0x15c):if(!(_0x4a3a79[_0xfca177(0x164)]??isInProject()))throw CliErrors[_0xfca177(0x163)](_0xfca177(0x152)+PRODUCT_CONFIG[_0xfca177(0x15d)]+_0xfca177(0x159),_0xfca177(0x15b)+PRODUCT_CONFIG[_0xfca177(0x15d)]+_0xfca177(0x15e)+PRODUCT_CONFIG[_0xfca177(0x15d)]+_0xfca177(0x151));return'project';}}function a19_0x2d24(_0x58de44,_0x5bdd89){_0x58de44=_0x58de44-0x151;const _0x26482f=a19_0x2648();let _0x2d24e1=_0x26482f[_0x58de44];return _0x2d24e1;}export function toScopeFlags(_0x36410f){const _0x50d573=a19_0x2d24;return{'global':_0x36410f===_0x50d573(0x156)};}export function formatScopeLabel(_0x4f6dd1){const _0x563144=a19_0x2d24;return _0x4f6dd1===_0x563144(0x156)?_0x563144(0x158):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a20_0x3940(_0x460a5e,_0x6cbf6c){_0x460a5e=_0x460a5e-0xf8;const _0x353b47=a20_0x353b();let _0x394083=_0x353b47[_0x460a5e];return _0x394083;}(function(_0x1ca627,_0x569b4a){const _0x5a8644=a20_0x3940,_0x2e70dd=_0x1ca627();while(!![]){try{const _0x5f3d86=parseInt(_0x5a8644(0x114))/0x1*(parseInt(_0x5a8644(0x103))/0x2)+-parseInt(_0x5a8644(0x109))/0x3*(-parseInt(_0x5a8644(0xfa))/0x4)+parseInt(_0x5a8644(0xfe))/0x5+-parseInt(_0x5a8644(0x102))/0x6*(-parseInt(_0x5a8644(0x111))/0x7)+-parseInt(_0x5a8644(0x104))/0x8+-parseInt(_0x5a8644(0x108))/0x9+parseInt(_0x5a8644(0x100))/0xa*(-parseInt(_0x5a8644(0x113))/0xb);if(_0x5f3d86===_0x569b4a)break;else _0x2e70dd['push'](_0x2e70dd['shift']());}catch(_0x30a223){_0x2e70dd['push'](_0x2e70dd['shift']());}}}(a20_0x353b,0x896d6));import{CliErrors}from'../../errors.js';function a20_0x353b(){const _0x886b28=['2867632rZmkNO','Flags\x20','Only\x20one\x20of\x20','some','1308969REzMmN','2495133pVAJqt','map','\x20is\x20allowed,\x20found:\x20','\x20is\x20required\x20for\x20`','Invalid\x20--','flag','Remove\x20all\x20but\x20one.','join','13762PrthND','\x20are\x20mutually\x20exclusive\x20for\x20`','11eqMQii','91KBETRJ','length','validation',':\x20expected\x20','Exactly\x20one\x20of\x20','filter','4YkpplF','Use\x20only\x20one\x20of:\x20',',\x20got\x20\x22','At\x20least\x20one\x20of\x20','3299120YaHVHw','test','18906350totydL','Provide\x20one\x20of:\x20','2946fkeWxC','11002qcpGwN'];a20_0x353b=function(){return _0x886b28;};return a20_0x353b();}function isSet(_0x4509e3,_0x5e8263){const _0xffbbda=a20_0x3940,_0x325c87=_0x4509e3[_0xffbbda(0x10e)](_0x5e8263);return _0x325c87!==undefined&&_0x325c87!==''&&_0x325c87!==![]&&_0x325c87!==0x0;}function fmtNames(_0x12cc64){const _0x5cbb0f=a20_0x3940;return _0x12cc64[_0x5cbb0f(0x10a)](_0x44153e=>'--'+_0x44153e)[_0x5cbb0f(0x110)](',\x20');}export function requireOneOf(_0x5a577e,_0x24a45d,_0x124aae){const _0x2e0dbd=a20_0x3940,_0x5b1f0d=_0x24a45d[_0x2e0dbd(0xf9)](_0x5d7324=>isSet(_0x5a577e,_0x5d7324));if(_0x5b1f0d['length']!==0x1)throw CliErrors[_0x2e0dbd(0x116)](_0x5b1f0d['length']===0x0?_0x2e0dbd(0xf8)+fmtNames(_0x24a45d)+_0x2e0dbd(0x10c)+_0x124aae+'`.':_0x2e0dbd(0x106)+fmtNames(_0x24a45d)+_0x2e0dbd(0x10b)+fmtNames(_0x5b1f0d)+'.',_0x5b1f0d['length']===0x0?_0x2e0dbd(0x101)+fmtNames(_0x24a45d):_0x2e0dbd(0x10f));}export function requireAnyOf(_0x4e92d5,_0x2be091,_0x4bae18){const _0x466b6f=a20_0x3940;if(!_0x2be091[_0x466b6f(0x107)](_0x498e7d=>isSet(_0x4e92d5,_0x498e7d)))throw CliErrors[_0x466b6f(0x116)](_0x466b6f(0xfd)+fmtNames(_0x2be091)+'\x20is\x20required\x20for\x20`'+_0x4bae18+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x2be091));}export function mutuallyExclusive(_0x567899,_0x26bb8a,_0x2249f2){const _0x2e011d=a20_0x3940,_0x5a49b9=_0x26bb8a[_0x2e011d(0xf9)](_0x4ac40e=>isSet(_0x567899,_0x4ac40e));if(_0x5a49b9[_0x2e011d(0x115)]>0x1)throw CliErrors[_0x2e011d(0x116)](_0x2e011d(0x105)+fmtNames(_0x5a49b9)+_0x2e011d(0x112)+_0x2249f2+'`.',_0x2e011d(0xfb)+fmtNames(_0x26bb8a));}export function validatePattern(_0xb1fd6d,_0x63e840,_0x4d004b,_0x371eb6){const _0x3f92e5=a20_0x3940,_0x31e7e0=_0xb1fd6d['str'](_0x63e840);if(_0x31e7e0&&!_0x4d004b[_0x3f92e5(0xff)](_0x31e7e0))throw CliErrors['validation'](_0x3f92e5(0x10d)+_0x63e840+_0x3f92e5(0x117)+_0x371eb6+_0x3f92e5(0xfc)+_0x31e7e0+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a21_0x5598ad=a21_0x2e58;(function(_0x28dfb5,_0x166390){const _0x1ca96b=a21_0x2e58,_0x1ae213=_0x28dfb5();while(!![]){try{const _0x1c27d4=parseInt(_0x1ca96b(0x1aa))/0x1+-parseInt(_0x1ca96b(0x1b4))/0x2+-parseInt(_0x1ca96b(0x1b3))/0x3*(-parseInt(_0x1ca96b(0x1ad))/0x4)+-parseInt(_0x1ca96b(0x19e))/0x5*(-parseInt(_0x1ca96b(0x1ac))/0x6)+parseInt(_0x1ca96b(0x1b6))/0x7*(-parseInt(_0x1ca96b(0x1a1))/0x8)+parseInt(_0x1ca96b(0x1b1))/0x9+parseInt(_0x1ca96b(0x1af))/0xa*(-parseInt(_0x1ca96b(0x1a2))/0xb);if(_0x1c27d4===_0x166390)break;else _0x1ae213['push'](_0x1ae213['shift']());}catch(_0x2f1272){_0x1ae213['push'](_0x1ae213['shift']());}}}(a21_0x5e7e,0x3c348));export const GLOBAL_SCOPE_FLAG={'name':a21_0x5598ad(0x1a4),'type':a21_0x5598ad(0x1b0),'default':![],'description':a21_0x5598ad(0x1b5)};function a21_0x5e7e(){const _0x2493dd=['853250lQrxeE','Write\x20to\x20the\x20global\x20configuration','21pzmRep','541850lhmkNn','Resource\x20name\x20for\x20lookup','Return\x20full\x20raw\x20response\x20object','458880UitorW','55yakUUc','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','global','name','verbose','sqlcode','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','string','363412yvIlFn','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','6wSskvp','4sZcSlY','params','1057670sVlWlo','boolean','4078863luXOeQ','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1347453dRmPsD'];a21_0x5e7e=function(){return _0x2493dd;};return a21_0x5e7e();}export const CODE_FLAG={'name':'code','type':a21_0x5598ad(0x1a9),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x5598ad(0x1a3)}};export const SQLCODE_FLAG={'name':a21_0x5598ad(0x1a7),'type':a21_0x5598ad(0x1a9),'required':!![],'description':a21_0x5598ad(0x1b2),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0x5598ad(0x1ab)}};export const VERBOSE_FLAG={'name':a21_0x5598ad(0x1a6),'type':a21_0x5598ad(0x1b0),'description':a21_0x5598ad(0x1a0)};export const PARAMS_FLAG={'name':a21_0x5598ad(0x1ae),'type':a21_0x5598ad(0x1a9),'description':a21_0x5598ad(0x1a8)};export const NAME_FLAG={'name':a21_0x5598ad(0x1a5),'type':a21_0x5598ad(0x1a9),'description':a21_0x5598ad(0x19f)};function a21_0x2e58(_0x45eff5,_0x49ef4e){_0x45eff5=_0x45eff5-0x19e;const _0x5e7e85=a21_0x5e7e();let _0x2e5871=_0x5e7e85[_0x45eff5];return _0x2e5871;}export const ID_FLAG={'name':'id','type':'number','required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x520ca7,_0x5f28a0){const _0x1a7f4d=a22_0x2964,_0x5a1be1=_0x520ca7();while(!![]){try{const _0x86ea7f=parseInt(_0x1a7f4d(0x138))/0x1+-parseInt(_0x1a7f4d(0x139))/0x2*(parseInt(_0x1a7f4d(0x129))/0x3)+parseInt(_0x1a7f4d(0x136))/0x4*(parseInt(_0x1a7f4d(0x135))/0x5)+parseInt(_0x1a7f4d(0x130))/0x6*(-parseInt(_0x1a7f4d(0x12c))/0x7)+parseInt(_0x1a7f4d(0x132))/0x8*(parseInt(_0x1a7f4d(0x12b))/0x9)+parseInt(_0x1a7f4d(0x131))/0xa*(-parseInt(_0x1a7f4d(0x12d))/0xb)+parseInt(_0x1a7f4d(0x133))/0xc;if(_0x86ea7f===_0x5f28a0)break;else _0x5a1be1['push'](_0x5a1be1['shift']());}catch(_0x742740){_0x5a1be1['push'](_0x5a1be1['shift']());}}}(a22_0x104b,0xf0a21));function a22_0x2964(_0x452469,_0x3296ab){_0x452469=_0x452469-0x128;const _0x104b3f=a22_0x104b();let _0x29649f=_0x104b3f[_0x452469];return _0x29649f;}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_0x104b(){const _0x3ebacf=['174951nhjdgG','validation','2556SgeTIs','1481704qPSHOM','8274607gegclf','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20not\x20found:\x20','48nhhDWD','10xQlrga','49992AwZEZp','10162344RnWxeL','size','3285YSyeSb','9268gXcJNU','toFixed','861958UJyWiB','54zsMTCz','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','\x20path\x20is\x20required.','isFile'];a22_0x104b=function(){return _0x3ebacf;};return a22_0x104b();}function formatBytes(_0x59dcbf){const _0x4facf7=a22_0x2964;if(_0x59dcbf>=BYTES_PER_MB){const _0xec1a05=Math['ceil'](_0x59dcbf/BYTES_PER_MB*0x64)/0x64;return _0xec1a05[_0x4facf7(0x137)](0x2)+'\x20MB';}return _0x59dcbf+'\x20B';}export function requireRuntimeUploadFile(_0x222bcf,_0x3439ad){const _0x110635=a22_0x2964,_0x205d16=_0x222bcf['trim']();if(!_0x205d16)throw CliErrors['validation'](_0x3439ad+_0x110635(0x13b));if(!existsSync(_0x205d16))throw CliErrors['validation'](_0x110635(0x12f)+_0x205d16);const _0x52e3fa=statSync(_0x205d16);if(!_0x52e3fa[_0x110635(0x128)]())throw CliErrors[_0x110635(0x12a)](_0x110635(0x12e)+_0x205d16);if(_0x52e3fa[_0x110635(0x134)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x110635(0x13a)+_0x205d16+'\x20('+formatBytes(_0x52e3fa[_0x110635(0x134)])+')');return{'path':_0x205d16,'size':_0x52e3fa[_0x110635(0x134)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a23_0x3071(){const _0x5b8d4c=['log','\x22.\x20Allowed:\x20','85wKwZjt','Usage:\x20','Set\x20`','../../context.js','config','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x22\x20is\x20not\x20settable.','Get\x20a\x20config\x20value','pageSize','apps','locale','appcode','Missing\x20key\x20or\x20value.','length','isArray',';\x20apps.<alias>.appcode','project-or-global-explicit','Set\x20a\x20configuration\x20value','1074484tIuApP','Top-level\x20key\x20\x22','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','accessKey','validation','6JElrle','\x20(global)','alias','1185436GUnZgX','value','\x20config\x20delete\x20<key>\x20[--global]','\x20\x20project:\x20','56358EpKfTa','args','delete','field','set','Key\x20already\x20absent:\x20','global','\x20\x20global:\x20\x20','Value\x20to\x20assign','get','`\x20=\x20\x22','key','pageSize\x20must\x20be\x20a\x20positive\x20number','List\x20current\x20config','object','\x20config\x20set\x20<key>\x20<value>\x20[--global]','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','pretty','Invalid\x20locale\x20value.','\x20config\x20get\x20<key>','trim','Deleted\x20`','6848082vJtMHo','format','stringify','raw','3288808YBVibT','Delete\x20a\x20configuration\x20value','Settable\x20keys:\x20','111822VyDpuV','Missing\x20key\x20argument.','write','Key\x20not\x20found:\x20','640032EoCZFw','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','(none)','split','read','includes','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.'];a23_0x3071=function(){return _0x5b8d4c;};return a23_0x3071();}const a23_0x1a62bd=a23_0x5b43;(function(_0x3ab600,_0x3f21bf){const _0x22d5bd=a23_0x5b43,_0x58e07e=_0x3ab600();while(!![]){try{const _0x2bb001=-parseInt(_0x22d5bd(0xe1))/0x1+parseInt(_0x22d5bd(0x103))/0x2+-parseInt(_0x22d5bd(0xda))/0x3*(-parseInt(_0x22d5bd(0xd5))/0x4)+-parseInt(_0x22d5bd(0xc3))/0x5*(parseInt(_0x22d5bd(0xff))/0x6)+parseInt(_0x22d5bd(0xdd))/0x7+parseInt(_0x22d5bd(0xfc))/0x8+-parseInt(_0x22d5bd(0xf8))/0x9;if(_0x2bb001===_0x3f21bf)break;else _0x58e07e['push'](_0x58e07e['shift']());}catch(_0x16207c){_0x58e07e['push'](_0x58e07e['shift']());}}}(a23_0x3071,0x4a206));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(_0x6c4530){const _0x58c8c8=a23_0x5b43,_0x2620dd=_0x6c4530[_0x58c8c8(0xbd)]('.');if(_0x2620dd['length']!==0x3||_0x2620dd[0x0]!==_0x58c8c8(0xcc)||_0x2620dd[0x2]!==_0x58c8c8(0xce))return undefined;const _0xd3f8b6=_0x2620dd[0x1]?.[_0x58c8c8(0xf6)]();return _0xd3f8b6?_0xd3f8b6:undefined;}function parseAliasDeleteKey(_0x3a0944){const _0x4660ab=a23_0x5b43,_0x99960f=_0x3a0944[_0x4660ab(0xbd)]('.');if(_0x99960f['length']===0x2&&_0x99960f[0x0]===_0x4660ab(0xcc)){const _0x4ffb40=_0x99960f[0x1]?.[_0x4660ab(0xf6)]();return _0x4ffb40?{'alias':_0x4ffb40}:undefined;}if(_0x99960f[_0x4660ab(0xd0)]===0x3&&_0x99960f[0x0]===_0x4660ab(0xcc)&&_0x99960f[0x2]==='appcode'){const _0x477f18=_0x99960f[0x1]?.[_0x4660ab(0xf6)]();return _0x477f18?{'alias':_0x477f18,'field':_0x4660ab(0xce)}:undefined;}return undefined;}function setLocalAppAlias(_0x5a34ef,_0xbfa99a,_0x233a85){const _0x4dc98d=a23_0x5b43,_0x1ebaa2=_0x5a34ef[_0x4dc98d(0xcc)]&&typeof _0x5a34ef['apps']==='object'&&!Array[_0x4dc98d(0xd1)](_0x5a34ef['apps'])?_0x5a34ef[_0x4dc98d(0xcc)]:{},_0x145b5f=_0x1ebaa2[_0xbfa99a]&&typeof _0x1ebaa2[_0xbfa99a]===_0x4dc98d(0xef)&&!Array['isArray'](_0x1ebaa2[_0xbfa99a])?_0x1ebaa2[_0xbfa99a]:{};_0x145b5f[_0x4dc98d(0xce)]=_0x233a85,_0x1ebaa2[_0xbfa99a]=_0x145b5f,_0x5a34ef[_0x4dc98d(0xcc)]=_0x1ebaa2;}function deleteLocalAppAlias(_0x17f20a,_0x57fab4){const _0x462f53=a23_0x5b43;if(!_0x17f20a['apps']||typeof _0x17f20a[_0x462f53(0xcc)]!==_0x462f53(0xef)||Array[_0x462f53(0xd1)](_0x17f20a[_0x462f53(0xcc)]))return![];const _0x41d817=_0x17f20a['apps'],_0x46891a=_0x41d817[_0x57fab4[_0x462f53(0xdc)]];if(!_0x46891a||typeof _0x46891a!==_0x462f53(0xef)||Array[_0x462f53(0xd1)](_0x46891a))return![];if(!_0x57fab4['field'])return delete _0x41d817[_0x57fab4[_0x462f53(0xdc)]],!![];if(!(_0x57fab4[_0x462f53(0xe4)]in _0x46891a))return![];return delete _0x46891a[_0x57fab4[_0x462f53(0xe4)]],Object['keys'](_0x46891a)[_0x462f53(0xd0)]===0x0&&delete _0x41d817[_0x57fab4['alias']],!![];}const listDef={'service':a23_0x1a62bd(0xc7),'command':'list','description':a23_0x1a62bd(0xee),'risk':a23_0x1a62bd(0xbe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x27f4dd){const _0x2b4d97=a23_0x1a62bd,{buildConfigFromFlags:_0x2b3f8f}=await import(_0x2b4d97(0xc6)),_0x88dfc4=_0x2b3f8f({}),_0x580f2e=redactCliConfigCredentials(_0x88dfc4[_0x2b4d97(0xfb)]),_0x176845=getProjectConfigPath(),_0x4c4ae5=resolveWriteConfigPath(_0x2b4d97(0xe7));if(_0x27f4dd[_0x2b4d97(0xf9)]===_0x2b4d97(0xf3))return{'ok':!![],'message':_0x2b4d97(0xd7)+(JSON[_0x2b4d97(0xfa)](_0x580f2e,null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x2b4d97(0xe0)+(_0x176845??_0x2b4d97(0xbc))+'\x0a')+(_0x2b4d97(0xe8)+_0x4c4ae5)};return{'ok':!![],'data':{'effective':_0x580f2e,'configFiles':{'project':_0x176845??null,'global':_0x4c4ae5}}};}},getDef={'service':'config','command':a23_0x1a62bd(0xea),'description':a23_0x1a62bd(0xca),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1a62bd(0xec),'description':a23_0x1a62bd(0xc8),'required':!![]}],'flags':[],async 'execute'(_0x101e01){const _0x4e986c=a23_0x1a62bd,_0x4f917b=_0x101e01['args'][0x0];if(!_0x4f917b)throw CliErrors['validation'](_0x4e986c(0x100),_0x4e986c(0xc4)+CLI_BIN_NAME+_0x4e986c(0xf5));const {buildConfigFromFlags:_0x5d030a}=await import('../../context.js'),{raw:_0x32cbe6}=_0x5d030a({});if(_0x4f917b[_0x4e986c(0xbf)]('.')){const _0x2c8830=_0x4f917b[_0x4e986c(0xbd)]('.');let _0x24341d=_0x32cbe6;for(const _0x1fc715 of _0x2c8830){if(_0x24341d==null||typeof _0x24341d!==_0x4e986c(0xef))throw CliErrors[_0x4e986c(0xd9)](_0x4e986c(0x102)+_0x4f917b);_0x24341d=_0x24341d[_0x1fc715];}if(_0x24341d===undefined)throw CliErrors[_0x4e986c(0xd9)](_0x4e986c(0x102)+_0x4f917b);const _0x4c433d=redactCliConfigValue(_0x4f917b,_0x24341d);return console[_0x4e986c(0xc1)](typeof _0x4c433d==='object'?JSON['stringify'](_0x4c433d,null,0x2):String(_0x4c433d)),{'ok':!![]};}const _0x1f70b2=_0x32cbe6[_0x4f917b];if(_0x1f70b2===undefined)throw CliErrors[_0x4e986c(0xd9)]('Key\x20not\x20found:\x20'+_0x4f917b);const _0x287976=redactCliConfigValue(_0x4f917b,_0x1f70b2);return console['log'](typeof _0x287976==='object'?JSON['stringify'](_0x287976,null,0x2):String(_0x287976)),{'ok':!![]};}},setDef={'service':a23_0x1a62bd(0xc7),'command':a23_0x1a62bd(0xe5),'description':a23_0x1a62bd(0xd4),'risk':a23_0x1a62bd(0x101),'confirmationDescription':a23_0x1a62bd(0xbb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1a62bd(0xec),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x1a62bd(0xde),'description':a23_0x1a62bd(0xe9),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x22a9eb){const _0x5eb3d5=a23_0x1a62bd,_0x4cc069=_0x22a9eb[_0x5eb3d5(0xe2)][0x0],_0x183b16=_0x22a9eb[_0x5eb3d5(0xe2)][0x1];if(!_0x4cc069||_0x183b16===undefined)throw CliErrors[_0x5eb3d5(0xd9)](_0x5eb3d5(0xcf),_0x5eb3d5(0xc4)+CLI_BIN_NAME+_0x5eb3d5(0xf0));if(ENUM_KEYS[_0x4cc069]&&!ENUM_KEYS[_0x4cc069][_0x5eb3d5(0xbf)](_0x183b16))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x4cc069+_0x5eb3d5(0xc2)+ENUM_KEYS[_0x4cc069]['join'](',\x20'));if(isCliProtectedConfigKey(_0x4cc069))throw CliErrors[_0x5eb3d5(0xd9)]('\x22'+_0x4cc069+_0x5eb3d5(0xc0));if(_0x4cc069==='pageSize'){const _0x298566=Number(_0x183b16);if(isNaN(_0x298566)||_0x298566<=0x0)throw CliErrors['validation'](_0x5eb3d5(0xed));}const _0x3c3ad4=resolveWriteScope({'explicitGlobal':_0x22a9eb['bool'](_0x5eb3d5(0xe7)),'policy':_0x5eb3d5(0xd3)}),_0x49b71c=toScopeFlags(_0x3c3ad4),_0x53d319=readScopedConfig(_0x49b71c),_0x4a7d70=parseAliasAppcodeSetKey(_0x4cc069);if(!_0x4a7d70&&!isTopLevelConfigKey(_0x4cc069))throw CliErrors[_0x5eb3d5(0xd9)](_0x5eb3d5(0xd6)+_0x4cc069+_0x5eb3d5(0xc9),_0x5eb3d5(0xfe)+getTopLevelConfigKeySummary()+_0x5eb3d5(0xd2));if(_0x4a7d70)setLocalAppAlias(_0x53d319,_0x4a7d70,_0x183b16);else{if(_0x4cc069===_0x5eb3d5(0xcd)){const _0x6af51f=normalizeLocale(_0x183b16);if(!_0x6af51f)throw CliErrors[_0x5eb3d5(0xd9)](_0x5eb3d5(0xf4),_0x5eb3d5(0xf2));_0x53d319[_0x5eb3d5(0xcd)]=_0x6af51f;}else _0x53d319[_0x4cc069]=_0x4cc069===_0x5eb3d5(0xcb)?Number(_0x183b16):DOMAIN_CONFIG_FIELDS[_0x5eb3d5(0xbf)](_0x4cc069)?normalizeDomainOrigin(_0x4cc069,_0x183b16):_0x183b16;}const _0x2dd6e8=_0x4cc069===_0x5eb3d5(0xd8)?maskCliAccessKey(_0x183b16):!_0x4a7d70&&_0x4cc069==='locale'?String(_0x53d319[_0x5eb3d5(0xcd)]):_0x183b16;return console[_0x5eb3d5(0xc1)](_0x5eb3d5(0xc5)+_0x4cc069+_0x5eb3d5(0xeb)+_0x2dd6e8+'\x22'+(_0x3c3ad4===_0x5eb3d5(0xe7)?_0x5eb3d5(0xdb):'')),writeScopedConfig(_0x53d319,_0x49b71c),{'ok':!![]};}},deleteDef={'service':a23_0x1a62bd(0xc7),'command':a23_0x1a62bd(0xe3),'description':a23_0x1a62bd(0xfd),'risk':a23_0x1a62bd(0x101),'confirmationDescription':a23_0x1a62bd(0xf1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1a62bd(0xec),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x4f2212){const _0x5ba501=a23_0x1a62bd,_0x15a590=_0x4f2212['args'][0x0];if(!_0x15a590)throw CliErrors[_0x5ba501(0xd9)]('Missing\x20key\x20argument.',_0x5ba501(0xc4)+CLI_BIN_NAME+_0x5ba501(0xdf));if(isCliProtectedConfigKey(_0x15a590))throw CliErrors[_0x5ba501(0xd9)]('\x22'+_0x15a590+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x5e1a81=resolveWriteScope({'explicitGlobal':_0x4f2212['bool'](_0x5ba501(0xe7)),'policy':_0x5ba501(0xd3)}),_0x6dd808=toScopeFlags(_0x5e1a81),_0x219932=readScopedConfig(_0x6dd808),_0x7ea0b6=parseAliasDeleteKey(_0x15a590);if(_0x7ea0b6){if(!deleteLocalAppAlias(_0x219932,_0x7ea0b6))return console[_0x5ba501(0xc1)](_0x5ba501(0xe6)+_0x15a590+(_0x5e1a81===_0x5ba501(0xe7)?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x15a590,'scope':_0x5e1a81,'changed':![]}};return console['log'](_0x5ba501(0xf7)+_0x15a590+'`'+(_0x5e1a81===_0x5ba501(0xe7)?'\x20(global)':'')),writeScopedConfig(_0x219932,_0x6dd808),{'ok':!![],'data':{'key':_0x15a590,'scope':_0x5e1a81,'changed':!![]}};}if(_0x219932[_0x15a590]===undefined)return console[_0x5ba501(0xc1)]('Key\x20already\x20absent:\x20'+_0x15a590+(_0x5e1a81===_0x5ba501(0xe7)?_0x5ba501(0xdb):'')),{'ok':!![],'data':{'key':_0x15a590,'scope':_0x5e1a81,'changed':![]}};return delete _0x219932[_0x15a590],console['log'](_0x5ba501(0xf7)+_0x15a590+'`'+(_0x5e1a81==='global'?_0x5ba501(0xdb):'')),writeScopedConfig(_0x219932,_0x6dd808),{'ok':!![],'data':{'key':_0x15a590,'scope':_0x5e1a81,'changed':!![]}};}};function a23_0x5b43(_0x51785d,_0x4de225){_0x51785d=_0x51785d-0xbb;const _0x3071d9=a23_0x3071();let _0x5b43ee=_0x3071d9[_0x51785d];return _0x5b43ee;}export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a23_0x39bdb1=a23_0x3ec4;(function(_0x46ff9f,_0x500215){const _0x5997e6=a23_0x3ec4,_0x7b9b37=_0x46ff9f();while(!![]){try{const _0x1a346c=parseInt(_0x5997e6(0xca))/0x1*(-parseInt(_0x5997e6(0x9c))/0x2)+parseInt(_0x5997e6(0x9f))/0x3*(parseInt(_0x5997e6(0xc1))/0x4)+parseInt(_0x5997e6(0x96))/0x5*(-parseInt(_0x5997e6(0xbe))/0x6)+-parseInt(_0x5997e6(0xc4))/0x7+-parseInt(_0x5997e6(0x97))/0x8*(-parseInt(_0x5997e6(0xc2))/0x9)+parseInt(_0x5997e6(0xc8))/0xa+-parseInt(_0x5997e6(0xbc))/0xb*(-parseInt(_0x5997e6(0xb1))/0xc);if(_0x1a346c===_0x500215)break;else _0x7b9b37['push'](_0x7b9b37['shift']());}catch(_0x3cafac){_0x7b9b37['push'](_0x7b9b37['shift']());}}}(a23_0x38f5,0x54f34));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(_0x457455){const _0x66d103=a23_0x3ec4,_0x56dc93=_0x457455['split']('.');if(_0x56dc93[_0x66d103(0xcc)]!==0x3||_0x56dc93[0x0]!=='apps'||_0x56dc93[0x2]!==_0x66d103(0x98))return undefined;const _0x3fc3f9=_0x56dc93[0x1]?.[_0x66d103(0xce)]();return _0x3fc3f9?_0x3fc3f9:undefined;}function parseAliasDeleteKey(_0x5c0015){const _0x3caf35=a23_0x3ec4,_0xa423a5=_0x5c0015[_0x3caf35(0xc5)]('.');if(_0xa423a5[_0x3caf35(0xcc)]===0x2&&_0xa423a5[0x0]==='apps'){const _0x243d87=_0xa423a5[0x1]?.[_0x3caf35(0xce)]();return _0x243d87?{'alias':_0x243d87}:undefined;}if(_0xa423a5[_0x3caf35(0xcc)]===0x3&&_0xa423a5[0x0]===_0x3caf35(0x8e)&&_0xa423a5[0x2]===_0x3caf35(0x98)){const _0x25cb2d=_0xa423a5[0x1]?.[_0x3caf35(0xce)]();return _0x25cb2d?{'alias':_0x25cb2d,'field':_0x3caf35(0x98)}:undefined;}return undefined;}function setLocalAppAlias(_0x39ee6c,_0x289017,_0x269f1c){const _0x5120df=a23_0x3ec4,_0x6d979e=_0x39ee6c['apps']&&typeof _0x39ee6c['apps']==='object'&&!Array['isArray'](_0x39ee6c[_0x5120df(0x8e)])?_0x39ee6c[_0x5120df(0x8e)]:{},_0x1dd7e0=_0x6d979e[_0x289017]&&typeof _0x6d979e[_0x289017]===_0x5120df(0xc3)&&!Array[_0x5120df(0xa4)](_0x6d979e[_0x289017])?_0x6d979e[_0x289017]:{};_0x1dd7e0[_0x5120df(0x98)]=_0x269f1c,_0x6d979e[_0x289017]=_0x1dd7e0,_0x39ee6c[_0x5120df(0x8e)]=_0x6d979e;}function a23_0x3ec4(_0x4a6246,_0x4f7993){_0x4a6246=_0x4a6246-0x8d;const _0x38f515=a23_0x38f5();let _0x3ec4db=_0x38f515[_0x4a6246];return _0x3ec4db;}function deleteLocalAppAlias(_0x2c7e1a,_0x26ccc5){const _0x59d6dd=a23_0x3ec4;if(!_0x2c7e1a[_0x59d6dd(0x8e)]||typeof _0x2c7e1a[_0x59d6dd(0x8e)]!==_0x59d6dd(0xc3)||Array[_0x59d6dd(0xa4)](_0x2c7e1a['apps']))return![];const _0x585fc0=_0x2c7e1a['apps'],_0x28239b=_0x585fc0[_0x26ccc5[_0x59d6dd(0xaf)]];if(!_0x28239b||typeof _0x28239b!==_0x59d6dd(0xc3)||Array[_0x59d6dd(0xa4)](_0x28239b))return![];if(!_0x26ccc5['field'])return delete _0x585fc0[_0x26ccc5[_0x59d6dd(0xaf)]],!![];if(!(_0x26ccc5['field']in _0x28239b))return![];return delete _0x28239b[_0x26ccc5['field']],Object[_0x59d6dd(0xb5)](_0x28239b)['length']===0x0&&delete _0x585fc0[_0x26ccc5[_0x59d6dd(0xaf)]],!![];}function a23_0x38f5(){const _0xca2f89=['log','85MvhgUT','8DLsiau','appcode','(none)','raw','config','516EzEeKW','delete','set','3909gNBXvF','value','format','validation','Set\x20`','isArray','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Key\x20already\x20absent:\x20','stringify','\x20\x20project:\x20','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','Delete\x20a\x20configuration\x20value','global','\x20config\x20set\x20<key>\x20<value>\x20[--global]','bool','alias','\x22.\x20Allowed:\x20','24DRKEse','Invalid\x20locale\x20value.','Settable\x20keys:\x20','Deleted\x20`','keys','\x22\x20is\x20not\x20settable.','write','Key\x20not\x20found:\x20','Missing\x20key\x20argument.','Get\x20a\x20config\x20value','Config\x20files:\x0a','6288997QtwmSr','List\x20current\x20config','5790zScTYg','args','key','36MFYnMh','1558278MCsxop','object','3171686qbPRdj','split','pretty','get','1057560wHNhnR','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','2390YnRsUP','Usage:\x20','length','pageSize','trim','Value\x20to\x20assign','\x20config\x20delete\x20<key>\x20[--global]','apps','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','locale','\x20(global)','Top-level\x20key\x20\x22','../../context.js','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'];a23_0x38f5=function(){return _0xca2f89;};return a23_0x38f5();}const listDef={'service':a23_0x39bdb1(0x9b),'command':'list','description':a23_0x39bdb1(0xbd),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4c9356){const _0x36e16e=a23_0x39bdb1,{buildConfigFromFlags:_0x5d8206}=await import(_0x36e16e(0x93)),_0x15bd1f=_0x5d8206({}),_0x466e7c=redactCliConfigCredentials(_0x15bd1f[_0x36e16e(0x9a)]),_0xba614=getProjectConfigPath(),_0x5a200d=resolveWriteConfigPath(_0x36e16e(0xac));if(_0x4c9356[_0x36e16e(0xa1)]===_0x36e16e(0xc6))return{'ok':!![],'message':_0x36e16e(0x94)+(JSON[_0x36e16e(0xa8)](_0x466e7c,null,0x2)+'\x0a\x0a')+_0x36e16e(0xbb)+(_0x36e16e(0xa9)+(_0xba614??_0x36e16e(0x99))+'\x0a')+('\x20\x20global:\x20\x20'+_0x5a200d)};return{'ok':!![],'data':{'effective':_0x466e7c,'configFiles':{'project':_0xba614??null,'global':_0x5a200d}}};}},getDef={'service':a23_0x39bdb1(0x9b),'command':a23_0x39bdb1(0xc7),'description':a23_0x39bdb1(0xba),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x39bdb1(0xc0),'description':a23_0x39bdb1(0xaa),'required':!![]}],'flags':[],async 'execute'(_0x5ad748){const _0xbda4e7=a23_0x39bdb1,_0x215daa=_0x5ad748['args'][0x0];if(!_0x215daa)throw CliErrors[_0xbda4e7(0xa2)](_0xbda4e7(0xb9),_0xbda4e7(0xcb)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x58deb5}=await import(_0xbda4e7(0x93)),{raw:_0x25facb}=_0x58deb5({});if(_0x215daa['includes']('.')){const _0x51156a=_0x215daa['split']('.');let _0xfa9d4d=_0x25facb;for(const _0x4d6ec3 of _0x51156a){if(_0xfa9d4d==null||typeof _0xfa9d4d!==_0xbda4e7(0xc3))throw CliErrors[_0xbda4e7(0xa2)](_0xbda4e7(0xb8)+_0x215daa);_0xfa9d4d=_0xfa9d4d[_0x4d6ec3];}if(_0xfa9d4d===undefined)throw CliErrors[_0xbda4e7(0xa2)](_0xbda4e7(0xb8)+_0x215daa);const _0x2073f2=redactCliConfigValue(_0x215daa,_0xfa9d4d);return console[_0xbda4e7(0x95)](typeof _0x2073f2===_0xbda4e7(0xc3)?JSON[_0xbda4e7(0xa8)](_0x2073f2,null,0x2):String(_0x2073f2)),{'ok':!![]};}const _0xf65862=_0x25facb[_0x215daa];if(_0xf65862===undefined)throw CliErrors[_0xbda4e7(0xa2)](_0xbda4e7(0xb8)+_0x215daa);const _0x481061=redactCliConfigValue(_0x215daa,_0xf65862);return console[_0xbda4e7(0x95)](typeof _0x481061===_0xbda4e7(0xc3)?JSON[_0xbda4e7(0xa8)](_0x481061,null,0x2):String(_0x481061)),{'ok':!![]};}},setDef={'service':a23_0x39bdb1(0x9b),'command':a23_0x39bdb1(0x9e),'description':'Set\x20a\x20configuration\x20value','risk':a23_0x39bdb1(0xb7),'confirmationDescription':a23_0x39bdb1(0xc9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x39bdb1(0xa0),'description':a23_0x39bdb1(0xcf),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0xef6bf2){const _0x464060=a23_0x39bdb1,_0x35eba9=_0xef6bf2[_0x464060(0xbf)][0x0],_0x154705=_0xef6bf2[_0x464060(0xbf)][0x1];if(!_0x35eba9||_0x154705===undefined)throw CliErrors['validation']('Missing\x20key\x20or\x20value.',_0x464060(0xcb)+CLI_BIN_NAME+_0x464060(0xad));if(ENUM_KEYS[_0x35eba9]&&!ENUM_KEYS[_0x35eba9]['includes'](_0x154705))throw CliErrors[_0x464060(0xa2)]('Invalid\x20value\x20for\x20\x22'+_0x35eba9+_0x464060(0xb0)+ENUM_KEYS[_0x35eba9]['join'](',\x20'));if(isCliProtectedConfigKey(_0x35eba9))throw CliErrors[_0x464060(0xa2)]('\x22'+_0x35eba9+_0x464060(0x8f));if(_0x35eba9===_0x464060(0xcd)){const _0x240db8=Number(_0x154705);if(isNaN(_0x240db8)||_0x240db8<=0x0)throw CliErrors[_0x464060(0xa2)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x339a12=resolveWriteScope({'explicitGlobal':_0xef6bf2[_0x464060(0xae)](_0x464060(0xac)),'policy':'project-or-global-explicit'}),_0x41c32f=toScopeFlags(_0x339a12),_0x216858=readScopedConfig(_0x41c32f),_0x30da8d=parseAliasAppcodeSetKey(_0x35eba9);if(!_0x30da8d&&!isTopLevelConfigKey(_0x35eba9))throw CliErrors[_0x464060(0xa2)](_0x464060(0x92)+_0x35eba9+_0x464060(0xb6),_0x464060(0xb3)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');if(_0x30da8d)setLocalAppAlias(_0x216858,_0x30da8d,_0x154705);else{if(_0x35eba9===_0x464060(0x90)){const _0x3c9122=normalizeLocale(_0x154705);if(!_0x3c9122)throw CliErrors[_0x464060(0xa2)](_0x464060(0xb2),_0x464060(0xa6));_0x216858[_0x464060(0x90)]=_0x3c9122;}else _0x216858[_0x35eba9]=_0x35eba9===_0x464060(0xcd)?Number(_0x154705):DOMAIN_CONFIG_FIELDS['includes'](_0x35eba9)?normalizeDomainOrigin(_0x35eba9,_0x154705):_0x154705;}const _0x4ad7c1=_0x35eba9==='accessKey'?maskCliAccessKey(_0x154705):!_0x30da8d&&_0x35eba9==='locale'?String(_0x216858[_0x464060(0x90)]):_0x154705;return console['log'](_0x464060(0xa3)+_0x35eba9+'`\x20=\x20\x22'+_0x4ad7c1+'\x22'+(_0x339a12===_0x464060(0xac)?_0x464060(0x91):'')),writeScopedConfig(_0x216858,_0x41c32f),{'ok':!![]};}},deleteDef={'service':'config','command':a23_0x39bdb1(0x9d),'description':a23_0x39bdb1(0xab),'risk':a23_0x39bdb1(0xb7),'confirmationDescription':a23_0x39bdb1(0xa5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x4da0b3){const _0x2b02ac=a23_0x39bdb1,_0x5d93d4=_0x4da0b3[_0x2b02ac(0xbf)][0x0];if(!_0x5d93d4)throw CliErrors[_0x2b02ac(0xa2)](_0x2b02ac(0xb9),_0x2b02ac(0xcb)+CLI_BIN_NAME+_0x2b02ac(0x8d));if(isCliProtectedConfigKey(_0x5d93d4))throw CliErrors[_0x2b02ac(0xa2)]('\x22'+_0x5d93d4+_0x2b02ac(0x8f));const _0x4582b3=resolveWriteScope({'explicitGlobal':_0x4da0b3[_0x2b02ac(0xae)](_0x2b02ac(0xac)),'policy':'project-or-global-explicit'}),_0x89de67=toScopeFlags(_0x4582b3),_0x346578=readScopedConfig(_0x89de67),_0x24e59d=parseAliasDeleteKey(_0x5d93d4);if(_0x24e59d){if(!deleteLocalAppAlias(_0x346578,_0x24e59d))return console['log'](_0x2b02ac(0xa7)+_0x5d93d4+(_0x4582b3===_0x2b02ac(0xac)?_0x2b02ac(0x91):'')),{'ok':!![],'data':{'key':_0x5d93d4,'scope':_0x4582b3,'changed':![]}};return console['log'](_0x2b02ac(0xb4)+_0x5d93d4+'`'+(_0x4582b3===_0x2b02ac(0xac)?'\x20(global)':'')),writeScopedConfig(_0x346578,_0x89de67),{'ok':!![],'data':{'key':_0x5d93d4,'scope':_0x4582b3,'changed':!![]}};}if(_0x346578[_0x5d93d4]===undefined)return console['log'](_0x2b02ac(0xa7)+_0x5d93d4+(_0x4582b3===_0x2b02ac(0xac)?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x5d93d4,'scope':_0x4582b3,'changed':![]}};return delete _0x346578[_0x5d93d4],console[_0x2b02ac(0x95)](_0x2b02ac(0xb4)+_0x5d93d4+'`'+(_0x4582b3==='global'?'\x20(global)':'')),writeScopedConfig(_0x346578,_0x89de67),{'ok':!![],'data':{'key':_0x5d93d4,'scope':_0x4582b3,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -7,7 +7,7 @@ export declare function executeConfigInit(ctx: RuntimeContext): Promise<{
|
|
|
7
7
|
mode: string;
|
|
8
8
|
protocol: "lovrabet-routing/v1" | undefined;
|
|
9
9
|
region: "global" | "id" | "cn" | null;
|
|
10
|
-
domains: Partial<Record<"runtimeDomain" | "userDomain" | "skillDomain" | "kbServiceDomain" | "apiDomain", string>>;
|
|
10
|
+
domains: Partial<Record<"runtimeDomain" | "userDomain" | "skillDomain" | "kbServiceDomain" | "harnessDomain" | "apiDomain", string>>;
|
|
11
11
|
};
|
|
12
12
|
}>;
|
|
13
13
|
export declare const configInitDefinition: CommandDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a24_0x39218c=a24_0x145b;(function(_0x554add,_0x2f2888){const _0x48ec69=a24_0x145b,_0x3f3892=_0x554add();while(!![]){try{const _0x4a0402=-parseInt(_0x48ec69(0xae))/0x1+-parseInt(_0x48ec69(0xa2))/0x2+parseInt(_0x48ec69(0xa3))/0x3+parseInt(_0x48ec69(0xac))/0x4+parseInt(_0x48ec69(0xba))/0x5*(-parseInt(_0x48ec69(0x9b))/0x6)+-parseInt(_0x48ec69(0xa8))/0x7+-parseInt(_0x48ec69(0x98))/0x8*(parseInt(_0x48ec69(0xbc))/0x9);if(_0x4a0402===_0x2f2888)break;else _0x3f3892['push'](_0x3f3892['shift']());}catch(_0x312586){_0x3f3892['push'](_0x3f3892['shift']());}}}(a24_0x30f5,0xdda6c));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';function a24_0x145b(_0x566337,_0x17d894){_0x566337=_0x566337-0x92;const _0x30f5e1=a24_0x30f5();let _0x145bc7=_0x30f5e1[_0x566337];return _0x145bc7;}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';function a24_0x30f5(){const _0xc9b766=['Select\x20Lovrabet\x20region','map','Custom\x20Runtime\x20HTTPS\x20origin','251038fpoKTR','4803936aKOArV','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','domain-config','manifestDomains','skill-domain','12153442QGrWaB','api-domain','validation','harness-domain','6033976BVVavK','str','92956BdRkre','nonInteractive','routing','string','Official\x20Lovrabet\x20region:\x20','independent','Custom\x20KB\x20Service\x20HTTPS\x20origin','runtime-domain','write','cancelled','name','Independent-deployment\x20Domain\x20JSON\x20file','1895kDIMjv','Custom\x20User\x20HTTPS\x20origin','413883WyaFtk','keys','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','assign','Custom\x20platform\x20API\x20HTTPS\x20origin','init','enterprise-v1','kb-service-domain','Available\x20regions:\x20','region','mode','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','32limequ','length','join','1002eAyRcX','Custom\x20SkillHub\x20HTTPS\x20origin','Custom\x20Harness\x20HTTPS\x20origin','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains'];a24_0x30f5=function(){return _0xc9b766;};return a24_0x30f5();}import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':a24_0x39218c(0xa5),'type':a24_0x39218c(0xb1),'description':a24_0x39218c(0xb9)},{'name':'user-domain','type':a24_0x39218c(0xb1),'description':a24_0x39218c(0xbb)},{'name':a24_0x39218c(0xa9),'type':'string','description':a24_0x39218c(0xc1)},{'name':a24_0x39218c(0xb5),'type':a24_0x39218c(0xb1),'description':a24_0x39218c(0xa1)},{'name':a24_0x39218c(0xa7),'type':'string','description':a24_0x39218c(0x9c)},{'name':a24_0x39218c(0x93),'type':'string','description':a24_0x39218c(0xb4)},{'name':a24_0x39218c(0xab),'type':a24_0x39218c(0xb1),'description':a24_0x39218c(0x9d)}];export const configInitFlags=[{'name':a24_0x39218c(0x95),'type':a24_0x39218c(0xb1),'description':a24_0x39218c(0xb2)+ENABLED_LOVRABET_REGION_VALUES[a24_0x39218c(0x9a)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x1aa7fa){const _0x163411=a24_0x39218c,_0xce73a3=_0x1aa7fa['str'](_0x163411(0x95));if(_0xce73a3){if(!isEnabledLovrabetRegion(_0xce73a3))throw CliErrors[_0x163411(0xaa)]('Region\x20\x22'+_0xce73a3+'\x22\x20is\x20not\x20currently\x20available.',_0x163411(0x94)+ENABLED_LOVRABET_REGION_VALUES[_0x163411(0x9a)](',\x20'));return _0xce73a3;}if(_0x1aa7fa[_0x163411(0xaf)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x163411(0x9f),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x163411(0xa0)](_0x57f6b6=>({'name':OFFICIAL_ROUTING_PROFILES[_0x57f6b6]['label']+'\x20('+_0x57f6b6+')','value':_0x57f6b6}))});}catch(_0x254894){if(_0x254894?.[_0x163411(0xb8)]==='ExitPromptError')throw CliErrors[_0x163411(0xb7)]();throw _0x254894;}}export async function executeConfigInit(_0x48af79){const _0x118721=a24_0x39218c,_0xba51c1=resolveDomainConfigInput(_0x48af79),_0x32b231=_0xba51c1['domains'],_0xd9546e=Object[_0x118721(0xbd)](_0x32b231)[_0x118721(0x99)]>0x0;if(_0xd9546e&&_0x48af79[_0x118721(0xad)]('region'))throw CliErrors[_0x118721(0xaa)](_0x118721(0xbe));const _0x2dba81={'global':!![]},_0x2f2e59=readScopedConfig(_0x2dba81);for(const _0x42ec04 of DOMAIN_CONFIG_FIELDS)delete _0x2f2e59[_0x42ec04];for(const _0x54447b of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x2f2e59[_0x54447b];delete _0x2f2e59[_0x118721(0xb0)];let _0x1004e4=null;if(_0xd9546e)delete _0x2f2e59[_0x118721(0x95)],_0xba51c1[_0x118721(0x96)]===_0x118721(0x92)?_0x2f2e59[_0x118721(0xb0)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0xba51c1[_0x118721(0xa6)]}:Object[_0x118721(0xc0)](_0x2f2e59,_0x32b231);else{_0x1004e4=await resolveRegion(_0x48af79);if(_0x1004e4===DEFAULT_LOVRABET_REGION)delete _0x2f2e59['region'];else _0x2f2e59[_0x118721(0x95)]=_0x1004e4;}return writeScopedConfig(_0x2f2e59,_0x2dba81),{'ok':!![],'message':_0xd9546e?_0x118721(0xbf)+Object[_0x118721(0xbd)](_0xba51c1['mode']===_0x118721(0x92)?_0xba51c1['manifestDomains']:_0x32b231)[_0x118721(0x9a)](',\x20')+'.':_0x118721(0xa4)+_0x1004e4+'.','data':{'mode':_0xd9546e?_0x118721(0xb3):'official','protocol':_0xba51c1['mode']==='enterprise-v1'?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x1004e4,'domains':_0x32b231}};}export const configInitDefinition={'service':'config','command':a24_0x39218c(0xc2),'description':a24_0x39218c(0x9e),'risk':a24_0x39218c(0xb6),'confirmationDescription':a24_0x39218c(0x97),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a25_0x1f8b(_0x3b5efe,_0x231310){_0x3b5efe=_0x3b5efe-0x1e0;var _0x28b906=a25_0x28b9();var _0x1f8b52=_0x28b906[_0x3b5efe];return _0x1f8b52;}(function(_0x5e4545,_0xfbf465){var _0x1c5b35=a25_0x1f8b,_0x5d7db4=_0x5e4545();while(!![]){try{var _0xe5f62d=parseInt(_0x1c5b35(0x1e9))/0x1*(-parseInt(_0x1c5b35(0x1e8))/0x2)+parseInt(_0x1c5b35(0x1e5))/0x3+-parseInt(_0x1c5b35(0x1e7))/0x4+parseInt(_0x1c5b35(0x1e1))/0x5*(parseInt(_0x1c5b35(0x1e0))/0x6)+parseInt(_0x1c5b35(0x1e4))/0x7+parseInt(_0x1c5b35(0x1e3))/0x8*(-parseInt(_0x1c5b35(0x1ea))/0x9)+parseInt(_0x1c5b35(0x1e6))/0xa*(-parseInt(_0x1c5b35(0x1e2))/0xb);if(_0xe5f62d===_0xfbf465)break;else _0x5d7db4['push'](_0x5d7db4['shift']());}catch(_0x23998d){_0x5d7db4['push'](_0x5d7db4['shift']());}}}(a25_0x28b9,0xc8f83));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_0x28b9(){var _0x3c51a4=['5rnMfFF','117458duxKPl','1208QDPRrk','9338504fGgnym','4095951HzaTCR','450lapNHi','5326396ubVQhY','9332XKKyAe','46lVzzfO','71541KfYEia','8104956zxmnkB'];a25_0x28b9=function(){return _0x3c51a4;};return a25_0x28b9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a26_0x364b15=a26_0x2c50;(function(_0x56fca5,_0x28f8cd){const _0x3077b9=a26_0x2c50,_0xaf4484=_0x56fca5();while(!![]){try{const _0x5c0fa5=-parseInt(_0x3077b9(0x1f5))/0x1+parseInt(_0x3077b9(0x1e4))/0x2+parseInt(_0x3077b9(0x1d8))/0x3+-parseInt(_0x3077b9(0x1f0))/0x4*(-parseInt(_0x3077b9(0x202))/0x5)+parseInt(_0x3077b9(0x1fd))/0x6+-parseInt(_0x3077b9(0x1c5))/0x7*(-parseInt(_0x3077b9(0x20d))/0x8)+-parseInt(_0x3077b9(0x1c3))/0x9;if(_0x5c0fa5===_0x28f8cd)break;else _0xaf4484['push'](_0xaf4484['shift']());}catch(_0x26a3ac){_0xaf4484['push'](_0xaf4484['shift']());}}}(a26_0x5e10,0x3a17c));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,getDatasetImportContract,createDatasetImportBatch,readDatasetImportRows,readDatasetImportTaskRows,uploadDatasetImportImage,readDatasetImportImage}from'../../core/api-client.js';import{getRuntimeDomain}from'../../constant/domain.js';import{CliError,CliErrors}from'../../errors.js';import{buildExcelManifest,normalizeImportFields}from'../../services/dataset-import/excel-reader.js';import{assertImportContract,assertImportPaths,runExcelImport,saveImportJson,resolveImportOutputPath}from'../../services/dataset-import/runner.js';import{assertDatasetImportTarget}from'../../services/dataset-import/metadata.js';import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function a26_0x2c50(_0x4ecd0b,_0x15e0f1){_0x4ecd0b=_0x4ecd0b-0x1c2;const _0x5e103a=a26_0x5e10();let _0x2c50b3=_0x5e103a[_0x4ecd0b];return _0x2c50b3;}function input(_0x30059e){const _0x3b8100=a26_0x2c50,_0x465b7d=_0x30059e['str'](_0x3b8100(0x1cd)),_0x34beba=_0x30059e[_0x3b8100(0x1fe)](_0x3b8100(0x1ce));if(!_0x465b7d||!_0x34beba)throw CliErrors['validation'](_0x3b8100(0x1f4));const _0x33aa92=_0x30059e['num'](_0x3b8100(0x1ef),0x1),_0x1395c9=_0x30059e[_0x3b8100(0x1fc)](_0x3b8100(0x1d5),0x1f4);if(!Number['isInteger'](_0x33aa92)||_0x33aa92<0x1||!Number['isInteger'](_0x1395c9)||_0x1395c9<0x1||_0x1395c9>0x1f4)throw CliErrors[_0x3b8100(0x1e7)](_0x3b8100(0x1ca));const _0x3cfe6f=resolve(_0x30059e[_0x3b8100(0x1fe)](_0x3b8100(0x1fb))||_0x465b7d+_0x3b8100(0x1dc)),_0x4113e4=resolve(_0x30059e[_0x3b8100(0x1fe)](_0x3b8100(0x1e9))||_0x465b7d+_0x3b8100(0x203)),_0x380cd4=[resolve(_0x465b7d),resolve(_0x34beba),_0x3cfe6f,_0x4113e4];if(new Set(_0x380cd4)['size']!==_0x380cd4[_0x3b8100(0x208)])throw CliErrors[_0x3b8100(0x1e7)](_0x3b8100(0x201));return{'file':resolve(_0x465b7d),'mappingFile':resolve(_0x34beba),'headerRow':_0x33aa92,'batchSize':_0x1395c9,'checkpoint':_0x3cfe6f,'report':_0x4113e4,'sheet':_0x30059e['str']('sheet')||undefined,'resume':_0x30059e['bool'](_0x3b8100(0x218))};}async function prepare(_0x108818){const _0x5b43c9=a26_0x2c50,_0x1e5065=input(_0x108818),_0x2afe55=_0x108818[_0x5b43c9(0x1fe)](_0x5b43c9(0x215));[_0x1e5065[_0x5b43c9(0x1cd)],_0x1e5065['mappingFile'],_0x1e5065[_0x5b43c9(0x1fb)],_0x1e5065[_0x5b43c9(0x1e9)]]=await Promise[_0x5b43c9(0x1f6)]([realpath(_0x1e5065[_0x5b43c9(0x1cd)]),realpath(_0x1e5065[_0x5b43c9(0x206)]),resolveImportOutputPath(_0x1e5065[_0x5b43c9(0x1fb)]),resolveImportOutputPath(_0x1e5065[_0x5b43c9(0x1e9)])]),assertImportPaths(_0x1e5065[_0x5b43c9(0x1fb)],_0x1e5065[_0x5b43c9(0x1e9)],[_0x1e5065[_0x5b43c9(0x1cd)],_0x1e5065[_0x5b43c9(0x206)]]);let _0x4da29d;const _0x492a58=await readFile(_0x1e5065['mappingFile']);if(_0x492a58[_0x5b43c9(0x208)]>0x400*0x400)throw CliErrors[_0x5b43c9(0x1e7)]('Mapping\x20file\x20exceeds\x201\x20MB.');try{_0x4da29d=JSON['parse'](_0x492a58['toString']('utf8'));}catch{throw CliErrors[_0x5b43c9(0x1e7)](_0x5b43c9(0x1f8));}if(!_0x4da29d||typeof _0x4da29d!=='object'||Array[_0x5b43c9(0x20c)](_0x4da29d)||Object[_0x5b43c9(0x1ee)](_0x4da29d)[_0x5b43c9(0x211)](_0x2903e3=>typeof _0x2903e3!==_0x5b43c9(0x204)))throw CliErrors[_0x5b43c9(0x1e7)](_0x5b43c9(0x1f7));const _0x3dce24=await getDatasetDetail(_0x2afe55),_0x2f03f0=assertDatasetImportTarget(_0x3dce24,_0x108818['appCode'],_0x2afe55);if(_0x2f03f0===_0x5b43c9(0x1de))throw CliErrors['validation'](_0x5b43c9(0x1d9),_0x5b43c9(0x20a)+_0x2afe55+_0x5b43c9(0x1f2)+_0x108818[_0x5b43c9(0x1d0)]+_0x5b43c9(0x1da)+_0x2afe55+_0x5b43c9(0x1d6));if(_0x2f03f0!==_0x5b43c9(0x1d7))throw CliErrors['validation'](_0x5b43c9(0x209),_0x5b43c9(0x1cc));const _0x8e4339=await buildExcelManifest({..._0x1e5065,'mapping':_0x4da29d,'fields':normalizeImportFields(_0x3dce24)}),_0x142824=await getDatasetImportContract(_0x108818[_0x5b43c9(0x1d0)],_0x2afe55);assertImportContract(_0x142824,_0x108818[_0x5b43c9(0x1d0)],_0x2afe55),assertImageImportCapability(_0x142824,_0x8e4339);if(_0x8e4339[_0x5b43c9(0x1c9)]?.[_0x5b43c9(0x208)]){const _0x1a3c81=await resolveImportOutputPath(_0x1e5065['checkpoint']+_0x5b43c9(0x1d4)),_0x2df323=await Promise['all']([_0x1a3c81,_0x1a3c81+_0x5b43c9(0x1d3),_0x1a3c81+'.lock.recovery',_0x1e5065[_0x5b43c9(0x1fb)]+_0x5b43c9(0x1d3),_0x1e5065['checkpoint']+_0x5b43c9(0x213)][_0x5b43c9(0x20b)](resolveImportOutputPath));assertImportPaths(_0x1e5065[_0x5b43c9(0x1fb)],_0x1e5065[_0x5b43c9(0x1e9)],[_0x1e5065[_0x5b43c9(0x1cd)],_0x1e5065[_0x5b43c9(0x206)],..._0x2df323[_0x5b43c9(0x1ff)](0x0,0x3)]);}if(_0x1e5065[_0x5b43c9(0x1e8)]>_0x142824['maxBatchSize'])throw CliErrors[_0x5b43c9(0x1e7)]('Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.');return{'args':_0x1e5065,'manifest':_0x8e4339,'contract':_0x142824,'code':_0x2afe55};}async function checked(_0x171dde){const _0x4c9498=a26_0x2c50;try{return await _0x171dde();}catch(_0x513e88){if(_0x513e88 instanceof CliError)throw _0x513e88;throw CliErrors[_0x4c9498(0x1e7)](_0x513e88[_0x4c9498(0x214)]||_0x4c9498(0x1cb));}}export const dataImportExcel={'service':'data','command':a26_0x364b15(0x1df),'risk':'write','description':a26_0x364b15(0x1d1),'confirmationDescription':a26_0x364b15(0x1e0),'flags':[CODE_FLAG,{'name':'file','type':'string','required':!![],'description':a26_0x364b15(0x1dd)},{'name':a26_0x364b15(0x1ce),'type':a26_0x364b15(0x204),'required':!![],'description':a26_0x364b15(0x1c7)},{'name':a26_0x364b15(0x1db),'type':a26_0x364b15(0x204),'description':a26_0x364b15(0x1ed)},{'name':a26_0x364b15(0x1ef),'type':a26_0x364b15(0x1ec),'default':0x1,'description':a26_0x364b15(0x1f3)},{'name':a26_0x364b15(0x1d5),'type':a26_0x364b15(0x1ec),'default':0x1f4,'description':a26_0x364b15(0x1eb)},{'name':a26_0x364b15(0x1fb),'type':a26_0x364b15(0x204),'description':a26_0x364b15(0x1e6)},{'name':a26_0x364b15(0x1e9),'type':a26_0x364b15(0x204),'description':a26_0x364b15(0x1e5)},{'name':a26_0x364b15(0x218),'type':a26_0x364b15(0x20e),'description':a26_0x364b15(0x216)}],'validate':async _0x43d66f=>{input(_0x43d66f);},'dryRun':async _0x1f87c7=>checked(async()=>{const _0xa58ce1=a26_0x364b15,{args:_0x3a2373,manifest:_0x3fae1c,contract:_0x57c903,code:_0x5b060d}=await prepare(_0x1f87c7),_0x475ad8=new Set(_0x3fae1c[_0xa58ce1(0x1e1)][_0xa58ce1(0x20b)](_0x1eae27=>_0x1eae27[_0xa58ce1(0x1f9)]))[_0xa58ce1(0x210)];return{'method':_0xa58ce1(0x1c4),'url':_0xa58ce1(0x205)+encodeURIComponent(_0x1f87c7['appCode'])+'/'+encodeURIComponent(_0x5b060d)+_0xa58ce1(0x1e3),'description':_0xa58ce1(0x1e2),'body':{'schemaFingerprint':_0x57c903[_0xa58ce1(0x217)]},'validRows':Math['max'](0x0,_0x3fae1c[_0xa58ce1(0x1f1)]['length']-_0x475ad8),'invalidRows':_0x475ad8,'invalidCells':_0x3fae1c['errors'][_0xa58ce1(0x208)],'emptyRows':_0x3fae1c['emptyRows'][_0xa58ce1(0x208)],'expectedBatches':previewImportBatchCount(_0x3fae1c,_0x57c903,_0x3a2373[_0xa58ce1(0x1e8)]),'imageCount':_0x3fae1c[_0xa58ce1(0x1ea)]?.[_0xa58ce1(0x207)]((_0x2b4f45,_0x136d7d)=>_0x2b4f45+_0x136d7d[_0xa58ce1(0x1c6)][_0xa58ce1(0x208)],0x0)??0x0,'uniqueImages':_0x3fae1c[_0xa58ce1(0x1c8)]?.[_0xa58ce1(0x208)]??0x0,'uniqueImageBytes':_0x3fae1c[_0xa58ce1(0x1c8)]?.[_0xa58ce1(0x207)]((_0x48f9cc,_0x4a2455)=>_0x48f9cc+_0x4a2455[_0xa58ce1(0x210)],0x0)??0x0,'errors':_0x3fae1c[_0xa58ce1(0x1e1)],'warnings':_0x3fae1c[_0xa58ce1(0x20f)],'sheet':_0x3fae1c['sheet'],'checkpoint':_0x3a2373[_0xa58ce1(0x1fb)],'report':_0x3a2373[_0xa58ce1(0x1e9)]};}),'execute':async _0x3a3d0a=>checked(async()=>{const _0x1a4e1c=a26_0x364b15,{args:_0x41124b,manifest:_0x5b964e,contract:_0x8e1766,code:_0x4871d1}=await prepare(_0x3a3d0a);if(_0x5b964e[_0x1a4e1c(0x1e1)][_0x1a4e1c(0x208)]){await saveImportJson(_0x41124b[_0x1a4e1c(0x1e9)],{'status':_0x1a4e1c(0x200),'sourceRows':_0x5b964e[_0x1a4e1c(0x1f1)]['length'],'errors':_0x5b964e[_0x1a4e1c(0x1e1)],'emptyRows':_0x5b964e[_0x1a4e1c(0x1fa)],'warnings':_0x5b964e['warnings']});throw CliErrors[_0x1a4e1c(0x1e7)](_0x1a4e1c(0x1c2)+_0x5b964e[_0x1a4e1c(0x1e1)][_0x1a4e1c(0x208)]+'\x20invalid\x20cells.\x20No\x20records\x20were\x20written.',_0x1a4e1c(0x1d2)+_0x41124b[_0x1a4e1c(0x1e9)]+'.');}const _0x4ef69a=_0x5b964e[_0x1a4e1c(0x1c9)]?.[_0x1a4e1c(0x208)]?runImageExcelImport:_0x8e1766['schemaVersion']===0x2?runAutoIdExcelImport:runExcelImport,_0x1a7285=await _0x4ef69a({..._0x41124b,'manifest':_0x5b964e,'contract':_0x8e1766,'appCode':_0x3a3d0a[_0x1a4e1c(0x1d0)],'datasetCode':_0x4871d1,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x41124b[_0x1a4e1c(0x1cd)],_0x41124b[_0x1a4e1c(0x206)]],'imageApi':{'upload':(_0x3ba4a9,_0x45c328)=>uploadDatasetImportImage(_0x3a3d0a[_0x1a4e1c(0x1d0)],_0x4871d1,_0x3ba4a9,_0x45c328),'readback':(_0x493599,_0x5a6c3c)=>readDatasetImportImage(_0x3a3d0a[_0x1a4e1c(0x1d0)],_0x4871d1,_0x493599,_0x5a6c3c)},'api':{'write':(_0x2a9564,_0x4c1b5e)=>createDatasetImportBatch(_0x3a3d0a[_0x1a4e1c(0x1d0)],_0x4871d1,{'schemaFingerprint':_0x8e1766[_0x1a4e1c(0x217)],'items':_0x2a9564,..._0x4c1b5e===undefined?{}:{'taskId':_0x4c1b5e}}),'readback':_0x36efb1=>readDatasetImportRows(_0x3a3d0a[_0x1a4e1c(0x1d0)],_0x4871d1,_0x36efb1),'readTask':_0x142248=>readDatasetImportTaskRows(_0x3a3d0a[_0x1a4e1c(0x1d0)],_0x4871d1,_0x142248)}});return{'ok':!![],'data':_0x1a7285,'message':_0x1a4e1c(0x1cf)+_0x1a7285['succeeded']+_0x1a4e1c(0x212)};})};function a26_0x5e10(){const _0x4035c2=['import-excel','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','errors','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','/import-batch','947052iYJeff','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','validation','batchSize','report','imageCells','Maximum\x20records\x20per\x20request\x20(1..500)','number','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','values','header-row','436imbLWp','rows','.\x20Validate\x20fields\x20and\x20confirmed\x20unique\x20business\x20keys,\x20convert\x20Excel\x20rows\x20to\x20JSON,\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20limits.\x20Preview\x20one\x20batch\x20with\x20lovrabet\x20data\x20batchCreate\x20--appcode\x20','1-based\x20Excel\x20header\x20row','--file\x20and\x20--mapping\x20are\x20required.','247506uqUVUN','all','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','rowNumber','emptyRows','checkpoint','num','1674504nmuGWP','str','slice','invalid','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','9435xwOFKA','.import-report.json','string','/client/','mappingFile','reduce','length','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20','map','isArray','2216qUSpzi','boolean','warnings','size','some','\x20records.','.lock.recovery','message','code','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','schemaFingerprint','resume','Excel\x20contains\x20','6508251fcLMeP','POST','644PfkBsi','hashes','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','media','imageFields','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','Excel\x20import\x20failed.','Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','file','mapping','Imported\x20and\x20verified\x20','appCode','Import\x20one\x20XLSX\x20worksheet\x20into\x20METADATA\x20with\x20checkpoint\x20recovery.\x20DB_TABLE\x20uses\x20lovrabet\x20data\x20batchCreate\x20after\x20mapping\x20and\x20validation;\x20that\x20route\x20has\x20no\x20import\x20checkpoint\x20or\x20--resume.','See\x20','.lock','.rows.json','batch-size','\x20--params\x20\x27<JSON\x20array>\x27\x20--dry-run\x20using\x20the\x20target\x20app\x27s\x20User\x20AK\x20and\x20runtime\x20permissions.\x20Dry-run\x20only\x20previews\x20the\x20request;\x20verify\x20written\x20rows\x20before\x20advancing\x20and\x20reconcile\x20unknown\x20outcomes\x20before\x20retrying.\x20This\x20DB_TABLE\x20route\x20does\x20not\x20support\x20import\x20checkpoints\x20or\x20--resume.\x20See\x20references/lovrabet-db-table-excel-import.md\x20in\x20the\x20built-in\x20Skill.\x20No\x20import\x20request\x20was\x20sent.','METADATA','674448thYiqs','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','\x20--code\x20','sheet','.import-checkpoint.json','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','DB_TABLE'];a26_0x5e10=function(){return _0x4035c2;};return a26_0x5e10();}
|
|
1
|
+
const a26_0x214e13=a26_0xa912;(function(_0x379f23,_0x1c8ff3){const _0x31003e=a26_0xa912,_0x534f8a=_0x379f23();while(!![]){try{const _0x37fadc=parseInt(_0x31003e(0x142))/0x1*(parseInt(_0x31003e(0x10d))/0x2)+parseInt(_0x31003e(0x109))/0x3+-parseInt(_0x31003e(0x132))/0x4+-parseInt(_0x31003e(0xff))/0x5+-parseInt(_0x31003e(0x136))/0x6*(parseInt(_0x31003e(0x12c))/0x7)+parseInt(_0x31003e(0x13d))/0x8+-parseInt(_0x31003e(0x13f))/0x9*(parseInt(_0x31003e(0x10c))/0xa);if(_0x37fadc===_0x1c8ff3)break;else _0x534f8a['push'](_0x534f8a['shift']());}catch(_0x10332f){_0x534f8a['push'](_0x534f8a['shift']());}}}(a26_0x49f2,0x7157b));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,getDatasetImportContract,createDatasetImportBatch,readDatasetImportRows,readDatasetImportTaskRows,uploadDatasetImportImage,readDatasetImportImage}from'../../core/api-client.js';import{getRuntimeDomain}from'../../constant/domain.js';import{CliError,CliErrors}from'../../errors.js';import{buildExcelManifest,normalizeImportFields}from'../../services/dataset-import/excel-reader.js';import{assertImportContract,assertImportPaths,runExcelImport,saveImportJson,resolveImportOutputPath}from'../../services/dataset-import/runner.js';import{assertDatasetImportTarget}from'../../services/dataset-import/metadata.js';import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';function a26_0xa912(_0x483883,_0x23b34b){_0x483883=_0x483883-0xee;const _0x49f2cd=a26_0x49f2();let _0xa912d9=_0x49f2cd[_0x483883];return _0xa912d9;}import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function a26_0x49f2(){const _0x24ab46=['Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','length','1-based\x20Excel\x20header\x20row','slice','.lock','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','number','Maximum\x20records\x20per\x20request\x20(1..500)','.import-checkpoint.json','/client/','sheet','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','file','map','toString','batch-size','imageCells','.rows.json','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','POST','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','hashes','batchSize','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','.import-report.json','schemaFingerprint','reduce','Import\x20one\x20XLSX\x20worksheet\x20into\x20METADATA\x20with\x20checkpoint\x20recovery.\x20DB_TABLE\x20uses\x20lovrabet\x20data\x20batchCreate\x20after\x20mapping\x20and\x20validation;\x20that\x20route\x20has\x20no\x20import\x20checkpoint\x20or\x20--resume.','errors','imageFields','637Ddufae','.\x20Validate\x20fields\x20and\x20confirmed\x20unique\x20business\x20keys,\x20convert\x20Excel\x20rows\x20to\x20JSON,\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20limits.\x20Preview\x20one\x20batch\x20with\x20lovrabet\x20data\x20batchCreate\x20--appcode\x20','checkpoint','Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','.lock.recovery','mappingFile','698808AKMZiT','num','--file\x20and\x20--mapping\x20are\x20required.','validation','31698btaSOV','str','media','some','warnings','import-excel','values','6756672NpwpsF','maxBatchSize','1492749nISYPh','code','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','170395OVrAfA','isArray','emptyRows','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20','message','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','parse','size','appCode','rows','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','write','Excel\x20contains\x20','report','/import-batch','all','rowNumber','string','1684655meHbWU','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','isInteger','invalid','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','max','data','resume','bool','786585EJamgb','DB_TABLE','\x20--code\x20','20zxoacw','8suDTYG'];a26_0x49f2=function(){return _0x24ab46;};return a26_0x49f2();}function input(_0x4cba1a){const _0x24c0c5=a26_0xa912,_0x21ff29=_0x4cba1a[_0x24c0c5(0x137)](_0x24c0c5(0x11a)),_0x4e3aea=_0x4cba1a[_0x24c0c5(0x137)]('mapping');if(!_0x21ff29||!_0x4e3aea)throw CliErrors[_0x24c0c5(0x135)](_0x24c0c5(0x134));const _0x43891f=_0x4cba1a['num']('header-row',0x1),_0x4ec8ea=_0x4cba1a[_0x24c0c5(0x133)](_0x24c0c5(0x11d),0x1f4);if(!Number['isInteger'](_0x43891f)||_0x43891f<0x1||!Number[_0x24c0c5(0x101)](_0x4ec8ea)||_0x4ec8ea<0x1||_0x4ec8ea>0x1f4)throw CliErrors[_0x24c0c5(0x135)](_0x24c0c5(0xf2));const _0x320997=resolve(_0x4cba1a[_0x24c0c5(0x137)](_0x24c0c5(0x12e))||_0x21ff29+_0x24c0c5(0x116)),_0x2217e5=resolve(_0x4cba1a[_0x24c0c5(0x137)](_0x24c0c5(0xfa))||_0x21ff29+_0x24c0c5(0x126)),_0x2ee751=[resolve(_0x21ff29),resolve(_0x4e3aea),_0x320997,_0x2217e5];if(new Set(_0x2ee751)[_0x24c0c5(0xf4)]!==_0x2ee751[_0x24c0c5(0x10f)])throw CliErrors[_0x24c0c5(0x135)](_0x24c0c5(0x113));return{'file':resolve(_0x21ff29),'mappingFile':resolve(_0x4e3aea),'headerRow':_0x43891f,'batchSize':_0x4ec8ea,'checkpoint':_0x320997,'report':_0x2217e5,'sheet':_0x4cba1a[_0x24c0c5(0x137)]('sheet')||undefined,'resume':_0x4cba1a[_0x24c0c5(0x108)]('resume')};}async function prepare(_0x2e0eb7){const _0x127074=a26_0xa912,_0x38a6e6=input(_0x2e0eb7),_0x501763=_0x2e0eb7[_0x127074(0x137)](_0x127074(0x140));[_0x38a6e6['file'],_0x38a6e6['mappingFile'],_0x38a6e6[_0x127074(0x12e)],_0x38a6e6[_0x127074(0xfa)]]=await Promise['all']([realpath(_0x38a6e6[_0x127074(0x11a)]),realpath(_0x38a6e6[_0x127074(0x131)]),resolveImportOutputPath(_0x38a6e6[_0x127074(0x12e)]),resolveImportOutputPath(_0x38a6e6[_0x127074(0xfa)])]),assertImportPaths(_0x38a6e6[_0x127074(0x12e)],_0x38a6e6[_0x127074(0xfa)],[_0x38a6e6[_0x127074(0x11a)],_0x38a6e6[_0x127074(0x131)]]);let _0x1c345d;const _0x1cc15c=await readFile(_0x38a6e6[_0x127074(0x131)]);if(_0x1cc15c[_0x127074(0x10f)]>0x400*0x400)throw CliErrors[_0x127074(0x135)]('Mapping\x20file\x20exceeds\x201\x20MB.');try{_0x1c345d=JSON[_0x127074(0xf3)](_0x1cc15c[_0x127074(0x11c)]('utf8'));}catch{throw CliErrors['validation'](_0x127074(0x103));}if(!_0x1c345d||typeof _0x1c345d!=='object'||Array[_0x127074(0x143)](_0x1c345d)||Object[_0x127074(0x13c)](_0x1c345d)[_0x127074(0x139)](_0x46ff53=>typeof _0x46ff53!=='string'))throw CliErrors[_0x127074(0x135)]('Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.');const _0x2c9a93=await getDatasetDetail(_0x501763),_0x387327=assertDatasetImportTarget(_0x2c9a93,_0x2e0eb7['appCode'],_0x501763);if(_0x387327===_0x127074(0x10a))throw CliErrors[_0x127074(0x135)](_0x127074(0xf7),_0x127074(0xef)+_0x501763+_0x127074(0x12d)+_0x2e0eb7['appCode']+_0x127074(0x10b)+_0x501763+'\x20--params\x20\x27<JSON\x20array>\x27\x20--dry-run\x20using\x20the\x20target\x20app\x27s\x20User\x20AK\x20and\x20runtime\x20permissions.\x20Dry-run\x20only\x20previews\x20the\x20request;\x20verify\x20written\x20rows\x20before\x20advancing\x20and\x20reconcile\x20unknown\x20outcomes\x20before\x20retrying.\x20This\x20DB_TABLE\x20route\x20does\x20not\x20support\x20import\x20checkpoints\x20or\x20--resume.\x20See\x20references/lovrabet-db-table-excel-import.md\x20in\x20the\x20built-in\x20Skill.\x20No\x20import\x20request\x20was\x20sent.');if(_0x387327!=='METADATA')throw CliErrors[_0x127074(0x135)]('Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.',_0x127074(0x12f));const _0x2f990e=await buildExcelManifest({..._0x38a6e6,'mapping':_0x1c345d,'fields':normalizeImportFields(_0x2c9a93)}),_0x241157=await getDatasetImportContract(_0x2e0eb7[_0x127074(0xf5)],_0x501763);assertImportContract(_0x241157,_0x2e0eb7['appCode'],_0x501763),assertImageImportCapability(_0x241157,_0x2f990e);if(_0x2f990e[_0x127074(0x12b)]?.[_0x127074(0x10f)]){const _0x402a96=await resolveImportOutputPath(_0x38a6e6[_0x127074(0x12e)]+_0x127074(0x11f)),_0x42a94f=await Promise[_0x127074(0xfc)]([_0x402a96,_0x402a96+_0x127074(0x112),_0x402a96+_0x127074(0x130),_0x38a6e6['checkpoint']+_0x127074(0x112),_0x38a6e6['checkpoint']+_0x127074(0x130)][_0x127074(0x11b)](resolveImportOutputPath));assertImportPaths(_0x38a6e6['checkpoint'],_0x38a6e6[_0x127074(0xfa)],[_0x38a6e6[_0x127074(0x11a)],_0x38a6e6[_0x127074(0x131)],..._0x42a94f[_0x127074(0x111)](0x0,0x3)]);}if(_0x38a6e6[_0x127074(0x124)]>_0x241157[_0x127074(0x13e)])throw CliErrors[_0x127074(0x135)](_0x127074(0x100));return{'args':_0x38a6e6,'manifest':_0x2f990e,'contract':_0x241157,'code':_0x501763};}async function checked(_0x5394c1){const _0x17d92e=a26_0xa912;try{return await _0x5394c1();}catch(_0x3e71e4){if(_0x3e71e4 instanceof CliError)throw _0x3e71e4;throw CliErrors[_0x17d92e(0x135)](_0x3e71e4[_0x17d92e(0xf0)]||'Excel\x20import\x20failed.');}}export const dataImportExcel={'service':a26_0x214e13(0x106),'command':a26_0x214e13(0x13b),'risk':a26_0x214e13(0xf8),'description':a26_0x214e13(0x129),'confirmationDescription':a26_0x214e13(0xf1),'flags':[CODE_FLAG,{'name':a26_0x214e13(0x11a),'type':a26_0x214e13(0xfe),'required':!![],'description':a26_0x214e13(0x119)},{'name':'mapping','type':a26_0x214e13(0xfe),'required':!![],'description':a26_0x214e13(0x122)},{'name':a26_0x214e13(0x118),'type':a26_0x214e13(0xfe),'description':a26_0x214e13(0x104)},{'name':'header-row','type':a26_0x214e13(0x114),'default':0x1,'description':a26_0x214e13(0x110)},{'name':a26_0x214e13(0x11d),'type':a26_0x214e13(0x114),'default':0x1f4,'description':a26_0x214e13(0x115)},{'name':a26_0x214e13(0x12e),'type':'string','description':a26_0x214e13(0x120)},{'name':a26_0x214e13(0xfa),'type':'string','description':'Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)'},{'name':a26_0x214e13(0x107),'type':'boolean','description':a26_0x214e13(0x10e)}],'validate':async _0x501959=>{input(_0x501959);},'dryRun':async _0x3dbdc1=>checked(async()=>{const _0x49b3f1=a26_0x214e13,{args:_0x2d4a95,manifest:_0x374422,contract:_0x2146cd,code:_0x7eff5d}=await prepare(_0x3dbdc1),_0xed1fbc=new Set(_0x374422[_0x49b3f1(0x12a)][_0x49b3f1(0x11b)](_0x1e6c96=>_0x1e6c96[_0x49b3f1(0xfd)]))[_0x49b3f1(0xf4)];return{'method':_0x49b3f1(0x121),'url':_0x49b3f1(0x117)+encodeURIComponent(_0x3dbdc1[_0x49b3f1(0xf5)])+'/'+encodeURIComponent(_0x7eff5d)+_0x49b3f1(0xfb),'description':_0x49b3f1(0x141),'body':{'schemaFingerprint':_0x2146cd[_0x49b3f1(0x127)]},'validRows':Math[_0x49b3f1(0x105)](0x0,_0x374422[_0x49b3f1(0xf6)]['length']-_0xed1fbc),'invalidRows':_0xed1fbc,'invalidCells':_0x374422[_0x49b3f1(0x12a)][_0x49b3f1(0x10f)],'emptyRows':_0x374422[_0x49b3f1(0xee)][_0x49b3f1(0x10f)],'expectedBatches':previewImportBatchCount(_0x374422,_0x2146cd,_0x2d4a95[_0x49b3f1(0x124)]),'imageCount':_0x374422[_0x49b3f1(0x11e)]?.[_0x49b3f1(0x128)]((_0x6cbbf4,_0x4ad93e)=>_0x6cbbf4+_0x4ad93e[_0x49b3f1(0x123)][_0x49b3f1(0x10f)],0x0)??0x0,'uniqueImages':_0x374422[_0x49b3f1(0x138)]?.[_0x49b3f1(0x10f)]??0x0,'uniqueImageBytes':_0x374422[_0x49b3f1(0x138)]?.[_0x49b3f1(0x128)]((_0x427f19,_0x53b6a2)=>_0x427f19+_0x53b6a2['size'],0x0)??0x0,'errors':_0x374422['errors'],'warnings':_0x374422[_0x49b3f1(0x13a)],'sheet':_0x374422['sheet'],'checkpoint':_0x2d4a95['checkpoint'],'report':_0x2d4a95[_0x49b3f1(0xfa)]};}),'execute':async _0x2267de=>checked(async()=>{const _0x16c6cc=a26_0x214e13,{args:_0x20dff3,manifest:_0x705adf,contract:_0x1da0fb,code:_0x526a3c}=await prepare(_0x2267de);if(_0x705adf['errors'][_0x16c6cc(0x10f)]){await saveImportJson(_0x20dff3[_0x16c6cc(0xfa)],{'status':_0x16c6cc(0x102),'sourceRows':_0x705adf[_0x16c6cc(0xf6)][_0x16c6cc(0x10f)],'errors':_0x705adf[_0x16c6cc(0x12a)],'emptyRows':_0x705adf[_0x16c6cc(0xee)],'warnings':_0x705adf['warnings']});throw CliErrors[_0x16c6cc(0x135)](_0x16c6cc(0xf9)+_0x705adf[_0x16c6cc(0x12a)][_0x16c6cc(0x10f)]+_0x16c6cc(0x125),'See\x20'+_0x20dff3[_0x16c6cc(0xfa)]+'.');}const _0x82c985=_0x705adf['imageFields']?.[_0x16c6cc(0x10f)]?runImageExcelImport:_0x1da0fb['schemaVersion']===0x2?runAutoIdExcelImport:runExcelImport,_0xa0ff67=await _0x82c985({..._0x20dff3,'manifest':_0x705adf,'contract':_0x1da0fb,'appCode':_0x2267de[_0x16c6cc(0xf5)],'datasetCode':_0x526a3c,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x20dff3[_0x16c6cc(0x11a)],_0x20dff3[_0x16c6cc(0x131)]],'imageApi':{'upload':(_0x5acafd,_0x322adb)=>uploadDatasetImportImage(_0x2267de[_0x16c6cc(0xf5)],_0x526a3c,_0x5acafd,_0x322adb),'readback':(_0x3a59e8,_0x3e5c1c)=>readDatasetImportImage(_0x2267de[_0x16c6cc(0xf5)],_0x526a3c,_0x3a59e8,_0x3e5c1c)},'api':{'write':(_0xd4b4a8,_0x5cfc42)=>createDatasetImportBatch(_0x2267de[_0x16c6cc(0xf5)],_0x526a3c,{'schemaFingerprint':_0x1da0fb[_0x16c6cc(0x127)],'items':_0xd4b4a8,..._0x5cfc42===undefined?{}:{'taskId':_0x5cfc42}}),'readback':_0x6d85b9=>readDatasetImportRows(_0x2267de[_0x16c6cc(0xf5)],_0x526a3c,_0x6d85b9),'readTask':_0x424b25=>readDatasetImportTaskRows(_0x2267de[_0x16c6cc(0xf5)],_0x526a3c,_0x424b25)}});return{'ok':!![],'data':_0xa0ff67,'message':'Imported\x20and\x20verified\x20'+_0xa0ff67['succeeded']+'\x20records.'};})};
|