@lovrabet/lovrabet-cli 2.3.10-beta.3 → 2.3.10
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.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.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-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.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/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
|
-
function a13_0x13f0(_0x217c68,_0x2643ed){_0x217c68=_0x217c68-0xc4;const _0xb41b5f=a13_0xb41b();let _0x13f0d5=_0xb41b5f[_0x217c68];return _0x13f0d5;}const a13_0xecc359=a13_0x13f0;(function(_0x43752,_0x382472){const _0x309c86=a13_0x13f0,_0x1f4cf7=_0x43752();while(!![]){try{const _0x55e408=parseInt(_0x309c86(0xec))/0x1*(parseInt(_0x309c86(0xcc))/0x2)+-parseInt(_0x309c86(0x111))/0x3+-parseInt(_0x309c86(0xd3))/0x4+-parseInt(_0x309c86(0xf9))/0x5*(-parseInt(_0x309c86(0xe3))/0x6)+-parseInt(_0x309c86(0x107))/0x7*(parseInt(_0x309c86(0xfc))/0x8)+-parseInt(_0x309c86(0x121))/0x9*(parseInt(_0x309c86(0xf3))/0xa)+parseInt(_0x309c86(0xe2))/0xb;if(_0x55e408===_0x382472)break;else _0x1f4cf7['push'](_0x1f4cf7['shift']());}catch(_0x31aefa){_0x1f4cf7['push'](_0x1f4cf7['shift']());}}}(a13_0xb41b,0x785ee));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a13_0xb41b(){const _0x54f785=['stdin','read','stdout','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','No\x20AccessKey\x20found\x20in\x20','(not\x20set)','Shorthand\x20for\x20--access-key','\x20config):\x20','30752rhwgrt','Use\x20`','AccessKey\x20saved\x20to\x20','string','boolean','envName','newConfigFileName','2851788nRiASG','Removes\x20the\x20user\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Credentials\x20in\x20another\x20scope\x20or\x20environment\x20variables\x20are\x20unchanged.','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','test','Save\x20the\x20user\x20AccessKey\x20(global\x20by\x20default;\x20--project\x20for\x20project\x20config)','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Option\x20A:\x20','accessKeySource','AccessKey\x20cleared\x20from\x20','success','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','authRequired','global-default','validation','Clear\x20from\x20global\x20config\x20(default)','16872658sXouZz','534UqyPdo','accessKeyCreatePath','expired','push','join','ACCESS_KEY','accessKey','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','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.','13MfEDiG','\x20Verify:\x20','\x20doctor','production','cancelled','Tip:\x20you\x20can\x20also\x20run:','\x20Current\x20env:\x20','24350MemybR','development','status','project\x20config','Option\x20C:\x20environment\x20variable','isTTY','52950EBfsPP','nonInteractive','access_key','64gpmKnr','Device\x20authorization\x20completed.','info','daily','Read\x20from\x20global\x20config\x20(default)','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20config.','Option\x20B:\x20apps\x20config\x20(','scope','trim','\x20auth\x20login\x20--access-key\x20<ak_xxx>','186109PBhBmx','Clear\x20the\x20user\x20AccessKey\x20from\x20config','global','Auth\x20mode:\x20','code','Status:\x20configured\x20(not\x20remotely\x20verified)','write','env','\x20(via\x20','userCenterDisplayName','1712775SunrQV','Stored\x20AccessKey\x20(','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','AccessKey\x20(ak_xxx...)','check','ClientAk','login','project','auth','Missing\x20accessKey.','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','bool','Then\x20verify\x20with:\x20','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','access-key','\x20config.\x20Nothing\x20to\x20clear.','2538MCnXaf','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','\x20auth\x20status','\x20\x20export\x20','AccessKey:\x20','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','str','Environment:\x20'];a13_0xb41b=function(){return _0x54f785;};return a13_0xb41b();}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(_0x30f770=USER_ACCESS_KEY_CREATE_URL){const _0x189427=a13_0x13f0;writeCliSideChannelLine(_0x189427(0x11b)+PRODUCT_CONFIG[_0x189427(0x110)]+':'),writeCliSideChannelLine('\x0a'+_0x30f770+'\x0a'),writeCliSideChannelLine(_0x189427(0xf1)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x189427(0x106));}function buildAccessKeySetupGuide(_0x1c7c24=USER_ACCESS_KEY_CREATE_URL){const _0x29c893=a13_0x13f0;return[_0x29c893(0x11b)+PRODUCT_CONFIG[_0x29c893(0x110)]+':',_0x1c7c24,_0x29c893(0x127)+CLI_BIN_NAME+_0x29c893(0xc7)][_0x29c893(0xe7)]('\x0a');}function canPromptForAccessKey(_0x1ee646){const _0x24d9bc=a13_0x13f0;return!_0x1ee646[_0x24d9bc(0xfa)]&&process[_0x24d9bc(0xc4)][_0x24d9bc(0xf8)]!==![]&&process[_0x24d9bc(0xc6)]['isTTY']!==![];}function resolveAuthScopeFlags(_0xd08a33){const _0x296b01=a13_0x13f0;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0xd08a33['bool'](_0x296b01(0x109)),'explicitProject':_0xd08a33[_0x296b01(0x11c)](_0x296b01(0x118)),'policy':_0x296b01(0xdf)}));}async function resolveAuthWriteInput(_0x24d8ec){const _0x1633ba=a13_0x13f0;let _0x12ca92=(_0x24d8ec['str'](_0x1633ba(0x11f))||_0x24d8ec[_0x1633ba(0x128)]('ak')||'')[_0x1633ba(0x105)]();const _0x554a12=(_0x24d8ec[_0x1633ba(0x128)]('env')||'')[_0x1633ba(0x105)](),_0x57e903=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0x12ca92&&canPromptForAccessKey(_0x24d8ec))try{showAccessKeyCreateHint(_0x57e903),_0x12ca92=await promptAccessKey('');}catch(_0x2af743){if(isAbortPrompt(_0x2af743))throw CliErrors[_0x1633ba(0xf0)]();throw _0x2af743;}if(!_0x12ca92)throw CliErrors[_0x1633ba(0xe0)](_0x1633ba(0x11a),buildAccessKeySetupGuide(_0x57e903));if(!ACCESS_KEY_PATTERN[_0x1633ba(0xd6)](_0x12ca92))throw CliErrors[_0x1633ba(0xe0)]('Invalid\x20accessKey\x20format.','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x554a12)return{'accessKey':_0x12ca92};const _0x2e7d09=normalizeEnv(_0x554a12);return{'accessKey':_0x12ca92,'env':isDaily(_0x2e7d09)?_0x1633ba(0xff):isDev(_0x2e7d09)?_0x1633ba(0xf4):_0x1633ba(0xef)};}export const authDefinitions=[{'service':'auth','command':a13_0xecc359(0x117),'description':a13_0xecc359(0xd7),'risk':a13_0xecc359(0x10d),'confirmationDescription':a13_0xecc359(0xeb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a13_0xecc359(0xcf),'description':a13_0xecc359(0x114)},{'name':'ak','type':a13_0xecc359(0xcf),'description':a13_0xecc359(0xca)},{'name':'global','type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a13_0xecc359(0xd0),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x758894){const _0x390938=a13_0xecc359;if(_0x758894[_0x390938(0x11c)]('yes'))throw CliErrors['validation'](_0x390938(0x101),_0x390938(0xcd)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x390938(0xea));const _0x2e6d39=(_0x758894['str'](_0x390938(0x11f))||_0x758894[_0x390938(0x128)]('ak')||'')[_0x390938(0x105)]();if(!_0x2e6d39&&_0x758894[_0x390938(0xfa)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x390938(0xe4)])};const _0x58964a=await resolveAuthWriteInput(_0x758894),_0x5f1068=resolveAuthScopeFlags(_0x758894),_0x2f16f5=readScopedConfig(_0x5f1068);_0x2f16f5[_0x390938(0xe9)]=_0x58964a[_0x390938(0xe9)];_0x58964a[_0x390938(0x10e)]&&(_0x2f16f5[_0x390938(0x10e)]=_0x58964a[_0x390938(0x10e)]);writeScopedConfig(_0x2f16f5,_0x5f1068);const _0xf2f54e=_0x5f1068[_0x390938(0x109)]?'global':_0x390938(0x118),_0x293a3d=_0x2f16f5[_0x390938(0x10e)]?_0x390938(0xf2)+_0x2f16f5[_0x390938(0x10e)]+'.':'';return{'ok':!![],'message':_0x390938(0xce)+_0xf2f54e+_0x390938(0x102)+_0x293a3d+_0x390938(0xed)+CLI_BIN_NAME+_0x390938(0x124)};}},{'service':a13_0xecc359(0x119),'command':'logout','description':a13_0xecc359(0x108),'risk':'write','confirmationDescription':a13_0xecc359(0xd4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0xecc359(0x109),'type':'boolean','description':a13_0xecc359(0xe1),'default':!![]},{'name':a13_0xecc359(0x118),'type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x2a9d8d){const _0x32b4de=a13_0xecc359,_0x1d7603=resolveAuthScopeFlags(_0x2a9d8d),_0x560deb=readScopedConfig(_0x1d7603),_0xf221e6=!!_0x560deb[_0x32b4de(0xe9)];delete _0x560deb[_0x32b4de(0xe9)],writeScopedConfig(_0x560deb,_0x1d7603);const _0x6b7bdf=_0x1d7603[_0x32b4de(0x109)]?_0x32b4de(0x109):'project';if(_0xf221e6)return{'ok':!![],'message':_0x32b4de(0xdb)+_0x6b7bdf+'\x20config.'};return{'ok':!![],'message':_0x32b4de(0xc8)+_0x6b7bdf+_0x32b4de(0x120)};}},{'service':a13_0xecc359(0x119),'command':a13_0xecc359(0xf5),'description':'Show\x20current\x20authentication\x20status','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0xecc359(0xd0),'description':a13_0xecc359(0x100),'default':!![]},{'name':a13_0xecc359(0x118),'type':a13_0xecc359(0xd0),'description':a13_0xecc359(0xd5),'default':![]},{'name':'check','type':a13_0xecc359(0xd0),'description':a13_0xecc359(0x123),'default':![]}],async 'execute'(_0x549a34){const _0x4e1af8=a13_0xecc359,_0x4d4c7c=resolveAuthScopeFlags(_0x549a34),_0x1e4f13=readScopedConfig(_0x4d4c7c),_0x25bea9=productEnvName(_0x4e1af8(0xe8)),_0x571875=_0x549a34[_0x4e1af8(0xe9)],_0x34eae2=_0x549a34[_0x4e1af8(0xda)],_0x5b6a46=[_0x4e1af8(0x10a)+AUTH_MODE[_0x4e1af8(0x116)]];if(_0x549a34['envName']&&!isProduction(_0x549a34[_0x4e1af8(0xd1)]))_0x5b6a46[_0x4e1af8(0xe6)](_0x4e1af8(0x129)+_0x549a34[_0x4e1af8(0xd1)]);_0x5b6a46[_0x4e1af8(0xe6)](_0x4e1af8(0x112)+(_0x4d4c7c[_0x4e1af8(0x109)]?_0x4e1af8(0x109):_0x4e1af8(0x118))+_0x4e1af8(0xcb)+(_0x1e4f13['accessKey']?maskCliAccessKey(_0x1e4f13[_0x4e1af8(0xe9)]):_0x4e1af8(0xc9)));if(_0x571875){const _0x3bdd21=maskCliAccessKey(_0x571875);_0x5b6a46[_0x4e1af8(0xe6)](_0x4e1af8(0x126)+_0x3bdd21+(_0x34eae2?_0x4e1af8(0x10f)+_0x34eae2+')':'')),_0x5b6a46['push'](_0x4e1af8(0x10c));}if(!_0x571875){_0x5b6a46[_0x4e1af8(0xe6)](''),_0x5b6a46['push'](_0x4e1af8(0xdd)),_0x5b6a46[_0x4e1af8(0xe6)](''),_0x5b6a46['push'](_0x4e1af8(0xd9)+CLI_BIN_NAME+_0x4e1af8(0x122)),_0x5b6a46[_0x4e1af8(0xe6)](''),_0x5b6a46[_0x4e1af8(0xe6)](_0x4e1af8(0x103)+PRODUCT_CONFIG[_0x4e1af8(0xd2)]+')'),_0x5b6a46[_0x4e1af8(0xe6)](_0x4e1af8(0x113)),_0x5b6a46['push'](''),_0x5b6a46[_0x4e1af8(0xe6)](_0x4e1af8(0xf7)),_0x5b6a46[_0x4e1af8(0xe6)](_0x4e1af8(0x125)+_0x25bea9+'=ak_xxx'),_0x5b6a46[_0x4e1af8(0xe6)](''),_0x5b6a46[_0x4e1af8(0xe6)](_0x4e1af8(0x11d)+CLI_BIN_NAME+_0x4e1af8(0x124)),_0x5b6a46['push'](_0x4e1af8(0xd8)+CLI_BIN_NAME+_0x4e1af8(0xee));if(_0x549a34[_0x4e1af8(0x11c)](_0x4e1af8(0x115))){const _0x29daf9=readStoredDeviceCode();if(_0x29daf9&&!isStoredDeviceCodeExpired(_0x29daf9)){const _0xf0b1f6=getUserDomain(),_0x4ee59f=await fetchDeviceToken(_0xf0b1f6,_0x29daf9[_0x4e1af8(0x10b)]);if(_0x4ee59f[_0x4e1af8(0xf5)]===_0x4e1af8(0xdc)&&_0x4ee59f[_0x4e1af8(0xfb)]){const _0x233204={'global':_0x29daf9[_0x4e1af8(0x104)]===_0x4e1af8(0x109)},_0x53a3e9=readScopedConfig(_0x233204);_0x53a3e9[_0x4e1af8(0xe9)]=_0x4ee59f[_0x4e1af8(0xfb)],writeScopedConfig(_0x53a3e9,_0x233204),deleteStoredDeviceCode();const _0x91ffcb=_0x4ee59f['access_key'],_0x197fa8=maskCliAccessKey(_0x91ffcb),_0xebf267=_0x29daf9['scope']===_0x4e1af8(0x109)?'global\x20config':_0x4e1af8(0xf6);return{'ok':!![],'message':[_0x4e1af8(0x10a)+AUTH_MODE[_0x4e1af8(0x116)],..._0x549a34[_0x4e1af8(0xd1)]&&!isProduction(_0x549a34[_0x4e1af8(0xd1)])?[_0x4e1af8(0x129)+_0x549a34[_0x4e1af8(0xd1)]]:[],'AccessKey:\x20'+_0x197fa8+_0x4e1af8(0x10f)+_0xebf267+')',_0x4e1af8(0x10c),_0x4e1af8(0xfd)][_0x4e1af8(0xe7)]('\x0a')};}_0x4ee59f[_0x4e1af8(0xf5)]===_0x4e1af8(0xe5)&&deleteStoredDeviceCode();throw CliErrors['authRequired'](_0x4e1af8(0x11e));}throw CliErrors[_0x4e1af8(0xde)](_0x5b6a46[_0x4e1af8(0xe7)]('\x0a'));}}return{'ok':!![],'message':_0x5b6a46['join']('\x0a')};}},{'service':a13_0xecc359(0x119),'command':a13_0xecc359(0xfe),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a13_0xecc359(0xc5),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3a585a){const _0x196508=a13_0xecc359,_0x297a48=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x297a48,'meta':{'env':_0x3a585a['envName']??_0x196508(0xef)}}};}},authDeviceDefinition];
|
|
1
|
+
const a13_0x5edbf2=a13_0x5b3d;(function(_0x401b1d,_0x451c8d){const _0x3ce9b6=a13_0x5b3d,_0x4a0af7=_0x401b1d();while(!![]){try{const _0x32f161=parseInt(_0x3ce9b6(0xf3))/0x1*(-parseInt(_0x3ce9b6(0xfe))/0x2)+parseInt(_0x3ce9b6(0xe2))/0x3+parseInt(_0x3ce9b6(0xce))/0x4*(parseInt(_0x3ce9b6(0xff))/0x5)+parseInt(_0x3ce9b6(0x125))/0x6*(-parseInt(_0x3ce9b6(0x116))/0x7)+parseInt(_0x3ce9b6(0xe9))/0x8*(-parseInt(_0x3ce9b6(0x113))/0x9)+-parseInt(_0x3ce9b6(0xf4))/0xa+parseInt(_0x3ce9b6(0x112))/0xb;if(_0x32f161===_0x451c8d)break;else _0x4a0af7['push'](_0x4a0af7['shift']());}catch(_0x2216ff){_0x4a0af7['push'](_0x4a0af7['shift']());}}}(a13_0xaac2,0x21190));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';function a13_0x5b3d(_0x10f1c7,_0x4f598a){_0x10f1c7=_0x10f1c7-0xca;const _0xaac252=a13_0xaac2();let _0x5b3dbb=_0xaac252[_0x10f1c7];return _0x5b3dbb;}function a13_0xaac2(){const _0x24ec0c=['nonInteractive','\x20(via\x20','join','access-key','Option\x20A:\x20','\x20config.\x20Nothing\x20to\x20clear.','AccessKey\x20(ak_xxx...)','global-default','test','check','43464mixoSP','Auth\x20mode:\x20','\x20Current\x20env:\x20','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','auth','stdin','485036vRAyRV','\x20auth\x20login\x20--access-key\x20<ak_xxx>','AccessKey\x20saved\x20to\x20','Status:\x20configured\x20(not\x20remotely\x20verified)','\x20Verify:\x20','status','code','Option\x20B:\x20apps\x20config\x20(','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','No\x20AccessKey\x20found\x20in\x20','\x20auth\x20status','cancelled','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','(not\x20set)','Use\x20`','access_key','accessKey','Save\x20the\x20user\x20AccessKey\x20(global\x20by\x20default;\x20--project\x20for\x20project\x20config)','\x20\x20export\x20','Shorthand\x20for\x20--access-key','586743OcNUvu','read','Clear\x20the\x20user\x20AccessKey\x20from\x20config','boolean','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','daily','40QltKyK','expired','project\x20config','global','development','project','str','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','bool','production','1dwERjo','261490mIiDPY','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','write','AccessKey\x20cleared\x20from\x20','login','newConfigFileName','trim','userCenterDisplayName','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Read\x20from\x20global\x20config\x20(default)','31422xIoIZb','10QWPqPX','=ak_xxx','Missing\x20accessKey.','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','scope','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20config):\x20','ClientAk','string','authRequired','push','Removes\x20the\x20user\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Credentials\x20in\x20another\x20scope\x20or\x20environment\x20variables\x20are\x20unchanged.','validation','Show\x20current\x20authentication\x20status','\x20config.','global\x20config','accessKeyCreatePath','envName','isTTY','834306SjFRsm','240633AtBgGE','env','AccessKey:\x20','196yXcMpn','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','\x20doctor','Then\x20verify\x20with:\x20','info'];a13_0xaac2=function(){return _0x24ec0c;};return a13_0xaac2();}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(_0x377553=USER_ACCESS_KEY_CREATE_URL){const _0x118b04=a13_0x5b3d;writeCliSideChannelLine(_0x118b04(0x102)+PRODUCT_CONFIG[_0x118b04(0xfb)]+':'),writeCliSideChannelLine('\x0a'+_0x377553+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x118b04(0xcf));}function buildAccessKeySetupGuide(_0x158125=USER_ACCESS_KEY_CREATE_URL){const _0x22211a=a13_0x5b3d;return[_0x22211a(0x102)+PRODUCT_CONFIG['userCenterDisplayName']+':',_0x158125,_0x22211a(0xf0)+CLI_BIN_NAME+_0x22211a(0xfc)][_0x22211a(0x11d)]('\x0a');}function canPromptForAccessKey(_0x4638cd){const _0x2ad592=a13_0x5b3d;return!_0x4638cd[_0x2ad592(0x11b)]&&process[_0x2ad592(0xcd)]['isTTY']!==![]&&process['stdout'][_0x2ad592(0x111)]!==![];}function resolveAuthScopeFlags(_0x4652a3){const _0x45df1c=a13_0x5b3d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4652a3['bool'](_0x45df1c(0xec)),'explicitProject':_0x4652a3[_0x45df1c(0xf1)](_0x45df1c(0xee)),'policy':_0x45df1c(0x122)}));}async function resolveAuthWriteInput(_0x27848d){const _0x307633=a13_0x5b3d;let _0x201390=(_0x27848d['str'](_0x307633(0x11e))||_0x27848d['str']('ak')||'')[_0x307633(0xfa)]();const _0x1a9be2=(_0x27848d['str']('env')||'')[_0x307633(0xfa)](),_0xa0d859=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0x201390&&canPromptForAccessKey(_0x27848d))try{showAccessKeyCreateHint(_0xa0d859),_0x201390=await promptAccessKey('');}catch(_0x136743){if(isAbortPrompt(_0x136743))throw CliErrors[_0x307633(0xd9)]();throw _0x136743;}if(!_0x201390)throw CliErrors['validation'](_0x307633(0x101),buildAccessKeySetupGuide(_0xa0d859));if(!ACCESS_KEY_PATTERN[_0x307633(0x123)](_0x201390))throw CliErrors[_0x307633(0x10b)]('Invalid\x20accessKey\x20format.','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x1a9be2)return{'accessKey':_0x201390};const _0x314403=normalizeEnv(_0x1a9be2);return{'accessKey':_0x201390,'env':isDaily(_0x314403)?_0x307633(0xe8):isDev(_0x314403)?_0x307633(0xed):_0x307633(0xf2)};}export const authDefinitions=[{'service':'auth','command':a13_0x5edbf2(0xf8),'description':a13_0x5edbf2(0xdf),'risk':a13_0x5edbf2(0xf6),'confirmationDescription':'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.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x5edbf2(0x11e),'type':a13_0x5edbf2(0x107),'description':a13_0x5edbf2(0x121)},{'name':'ak','type':a13_0x5edbf2(0x107),'description':a13_0x5edbf2(0xe1)},{'name':a13_0x5edbf2(0xec),'type':a13_0x5edbf2(0xe5),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x5edbf2(0xee),'type':a13_0x5edbf2(0xe5),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3382e7){const _0x142b6c=a13_0x5edbf2;if(_0x3382e7[_0x142b6c(0xf1)]('yes'))throw CliErrors['validation'](_0x142b6c(0xe6),_0x142b6c(0xdc)+CLI_BIN_NAME+_0x142b6c(0x104)+CLI_BIN_NAME+_0x142b6c(0xf5));const _0x1aeafe=(_0x3382e7[_0x142b6c(0xef)](_0x142b6c(0x11e))||_0x3382e7[_0x142b6c(0xef)]('ak')||'')['trim']();if(!_0x1aeafe&&_0x3382e7[_0x142b6c(0x11b)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x142b6c(0x10f)])};const _0x4b5789=await resolveAuthWriteInput(_0x3382e7),_0x2b6ba7=resolveAuthScopeFlags(_0x3382e7),_0x4e4d6e=readScopedConfig(_0x2b6ba7);_0x4e4d6e[_0x142b6c(0xde)]=_0x4b5789[_0x142b6c(0xde)];_0x4b5789[_0x142b6c(0x114)]&&(_0x4e4d6e[_0x142b6c(0x114)]=_0x4b5789[_0x142b6c(0x114)]);writeScopedConfig(_0x4e4d6e,_0x2b6ba7);const _0x5bf4f6=_0x2b6ba7['global']?_0x142b6c(0xec):_0x142b6c(0xee),_0x66fc20=_0x4e4d6e[_0x142b6c(0x114)]?_0x142b6c(0xca)+_0x4e4d6e[_0x142b6c(0x114)]+'.':'';return{'ok':!![],'message':_0x142b6c(0xd0)+_0x5bf4f6+_0x142b6c(0x10d)+_0x66fc20+_0x142b6c(0xd2)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':'auth','command':'logout','description':a13_0x5edbf2(0xe4),'risk':a13_0x5edbf2(0xf6),'confirmationDescription':a13_0x5edbf2(0x10a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x5edbf2(0xec),'type':'boolean','description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a13_0x5edbf2(0xe5),'description':a13_0x5edbf2(0xe7),'default':![]}],async 'execute'(_0x1fac51){const _0x4fef41=a13_0x5edbf2,_0x53b3e0=resolveAuthScopeFlags(_0x1fac51),_0x13a868=readScopedConfig(_0x53b3e0),_0x398a33=!!_0x13a868[_0x4fef41(0xde)];delete _0x13a868[_0x4fef41(0xde)],writeScopedConfig(_0x13a868,_0x53b3e0);const _0x501ef5=_0x53b3e0['global']?_0x4fef41(0xec):_0x4fef41(0xee);if(_0x398a33)return{'ok':!![],'message':_0x4fef41(0xf7)+_0x501ef5+_0x4fef41(0x10d)};return{'ok':!![],'message':_0x4fef41(0xd7)+_0x501ef5+_0x4fef41(0x120)};}},{'service':'auth','command':a13_0x5edbf2(0xd3),'description':a13_0x5edbf2(0x10c),'risk':a13_0x5edbf2(0xe3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a13_0x5edbf2(0xe5),'description':a13_0x5edbf2(0xfd),'default':!![]},{'name':a13_0x5edbf2(0xee),'type':a13_0x5edbf2(0xe5),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a13_0x5edbf2(0x124),'type':a13_0x5edbf2(0xe5),'description':a13_0x5edbf2(0xcb),'default':![]}],async 'execute'(_0x3283c2){const _0x2b2cc3=a13_0x5edbf2,_0xe6bf92=resolveAuthScopeFlags(_0x3283c2),_0x36b09f=readScopedConfig(_0xe6bf92),_0x452059=productEnvName('ACCESS_KEY'),_0x165724=_0x3283c2[_0x2b2cc3(0xde)],_0x30b9f8=_0x3283c2['accessKeySource'],_0x4e2784=[_0x2b2cc3(0x126)+AUTH_MODE[_0x2b2cc3(0x106)]];if(_0x3283c2['envName']&&!isProduction(_0x3283c2[_0x2b2cc3(0x110)]))_0x4e2784[_0x2b2cc3(0x109)]('Environment:\x20'+_0x3283c2['envName']);_0x4e2784[_0x2b2cc3(0x109)]('Stored\x20AccessKey\x20('+(_0xe6bf92['global']?_0x2b2cc3(0xec):_0x2b2cc3(0xee))+_0x2b2cc3(0x105)+(_0x36b09f[_0x2b2cc3(0xde)]?maskCliAccessKey(_0x36b09f[_0x2b2cc3(0xde)]):_0x2b2cc3(0xdb)));if(_0x165724){const _0x4ff913=maskCliAccessKey(_0x165724);_0x4e2784[_0x2b2cc3(0x109)]('AccessKey:\x20'+_0x4ff913+(_0x30b9f8?_0x2b2cc3(0x11c)+_0x30b9f8+')':'')),_0x4e2784['push'](_0x2b2cc3(0xd1));}if(!_0x165724){_0x4e2784[_0x2b2cc3(0x109)](''),_0x4e2784[_0x2b2cc3(0x109)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x4e2784['push'](''),_0x4e2784[_0x2b2cc3(0x109)](_0x2b2cc3(0x11f)+CLI_BIN_NAME+_0x2b2cc3(0xda)),_0x4e2784[_0x2b2cc3(0x109)](''),_0x4e2784[_0x2b2cc3(0x109)](_0x2b2cc3(0xd5)+PRODUCT_CONFIG[_0x2b2cc3(0xf9)]+')'),_0x4e2784['push'](_0x2b2cc3(0x117)),_0x4e2784[_0x2b2cc3(0x109)](''),_0x4e2784['push']('Option\x20C:\x20environment\x20variable'),_0x4e2784[_0x2b2cc3(0x109)](_0x2b2cc3(0xe0)+_0x452059+_0x2b2cc3(0x100)),_0x4e2784[_0x2b2cc3(0x109)](''),_0x4e2784['push'](_0x2b2cc3(0x119)+CLI_BIN_NAME+_0x2b2cc3(0xd8)),_0x4e2784['push'](_0x2b2cc3(0xd6)+CLI_BIN_NAME+_0x2b2cc3(0x118));if(_0x3283c2[_0x2b2cc3(0xf1)](_0x2b2cc3(0x124))){const _0x3d169a=readStoredDeviceCode();if(_0x3d169a&&!isStoredDeviceCodeExpired(_0x3d169a)){const _0x4a9e7a=getUserDomain(),_0x51fd9d=await fetchDeviceToken(_0x4a9e7a,_0x3d169a[_0x2b2cc3(0xd4)]);if(_0x51fd9d[_0x2b2cc3(0xd3)]==='success'&&_0x51fd9d['access_key']){const _0x2ebaf9={'global':_0x3d169a[_0x2b2cc3(0x103)]===_0x2b2cc3(0xec)},_0xa287db=readScopedConfig(_0x2ebaf9);_0xa287db[_0x2b2cc3(0xde)]=_0x51fd9d[_0x2b2cc3(0xdd)],writeScopedConfig(_0xa287db,_0x2ebaf9),deleteStoredDeviceCode();const _0x3c399a=_0x51fd9d[_0x2b2cc3(0xdd)],_0x95388e=maskCliAccessKey(_0x3c399a),_0x3dfc43=_0x3d169a[_0x2b2cc3(0x103)]===_0x2b2cc3(0xec)?_0x2b2cc3(0x10e):_0x2b2cc3(0xeb);return{'ok':!![],'message':[_0x2b2cc3(0x126)+AUTH_MODE[_0x2b2cc3(0x106)],..._0x3283c2[_0x2b2cc3(0x110)]&&!isProduction(_0x3283c2[_0x2b2cc3(0x110)])?['Environment:\x20'+_0x3283c2[_0x2b2cc3(0x110)]]:[],_0x2b2cc3(0x115)+_0x95388e+'\x20(via\x20'+_0x3dfc43+')',_0x2b2cc3(0xd1),'Device\x20authorization\x20completed.'][_0x2b2cc3(0x11d)]('\x0a')};}_0x51fd9d[_0x2b2cc3(0xd3)]===_0x2b2cc3(0xea)&&deleteStoredDeviceCode();throw CliErrors['authRequired']('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors[_0x2b2cc3(0x108)](_0x4e2784[_0x2b2cc3(0x11d)]('\x0a'));}}return{'ok':!![],'message':_0x4e2784[_0x2b2cc3(0x11d)]('\x0a')};}},{'service':a13_0x5edbf2(0xcc),'command':a13_0x5edbf2(0x11a),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a13_0x5edbf2(0xe3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x574a96){const _0x3f9d5e=a13_0x5edbf2,_0x109059=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x109059,'meta':{'env':_0x574a96[_0x3f9d5e(0x110)]??'production'}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ce48e,_0x43f9e8){const _0x223501=a14_0x3152,_0x4334e9=_0x2ce48e();while(!![]){try{const _0x3d7cb1=-parseInt(_0x223501(0x101))/0x1*(parseInt(_0x223501(0x102))/0x2)+-parseInt(_0x223501(0x110))/0x3+-parseInt(_0x223501(0x104))/0x4*(parseInt(_0x223501(0x10f))/0x5)+-parseInt(_0x223501(0x10b))/0x6+parseInt(_0x223501(0x10d))/0x7*(parseInt(_0x223501(0x113))/0x8)+-parseInt(_0x223501(0x111))/0x9*(-parseInt(_0x223501(0x115))/0xa)+-parseInt(_0x223501(0x10a))/0xb*(-parseInt(_0x223501(0x106))/0xc);if(_0x3d7cb1===_0x43f9e8)break;else _0x4334e9['push'](_0x4334e9['shift']());}catch(_0x2bfcfd){_0x4334e9['push'](_0x4334e9['shift']());}}}(a14_0x4476,0x9a5dc));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0xcb87f5=a14_0x3152;super(_0xcb87f5(0x109)),this[_0xcb87f5(0x108)]=_0xcb87f5(0x103);}}function a14_0x4476(){const _0x2487f3=['question','341117ORUZkU','once','10085ipJwFS','360483wTUIqN','38988nwjWng','trim','32SnQWeI','SIGINT','570NGFNHg','close','AccessKey\x20(paste\x20ak_...):\x20','removeListener','26063ugQnaE','10joUnRS','AbortPrompt','1484wiYRtc','stdout','24OvlNtp','stdin','name','User\x20aborted\x20prompt','12798192FpgAzr','6826350ytsHRi'];a14_0x4476=function(){return _0x2487f3;};return a14_0x4476();}function createSafeRl(){const _0x14b4b4=a14_0x3152,_0x4748d8=createInterface({'input':process[_0x14b4b4(0x107)],'output':process[_0x14b4b4(0x105)]});let _0x73ca82;const _0x389d32=new Promise((_0xa5d091,_0xc61d64)=>{const _0x41f6df=_0x14b4b4;_0x73ca82=()=>{const _0x2534a2=a14_0x3152;_0x73ca82&&(_0x4748d8[_0x2534a2(0x100)]('SIGINT',_0x73ca82),_0x73ca82=undefined);try{_0x4748d8[_0x2534a2(0x116)]();}catch{}_0xc61d64(new AbortPrompt());},_0x4748d8[_0x41f6df(0x10e)](_0x41f6df(0x114),_0x73ca82);}),_0x387728=()=>{const _0x59b349=_0x14b4b4;_0x73ca82&&(_0x4748d8[_0x59b349(0x100)](_0x59b349(0x114),_0x73ca82),_0x73ca82=undefined);try{_0x4748d8[_0x59b349(0x116)]();}catch{}};return{'rl':_0x4748d8,'abortPromise':_0x389d32,'disposeSuccess':_0x387728};}export async function promptAccessKey(_0x5aa306=''){const {rl:_0x5890bf,abortPromise:_0x208a15,disposeSuccess:_0x2a2a26}=createSafeRl(),_0x15c26d=new Promise(_0x320797=>{const _0x1348d4=a14_0x3152,_0x1d5626=_0x5aa306?'AccessKey\x20('+_0x5aa306+'):\x20':_0x1348d4(0x117);_0x5890bf[_0x1348d4(0x10c)](_0x1d5626,_0x437381=>{const _0x3f0237=_0x1348d4;_0x2a2a26(),_0x320797(_0x437381[_0x3f0237(0x112)]()||_0x5aa306);});});return Promise['race']([_0x15c26d,_0x208a15]);}function a14_0x3152(_0x5a3d6,_0x37fea2){_0x5a3d6=_0x5a3d6-0x100;const _0x4476bd=a14_0x4476();let _0x31528f=_0x4476bd[_0x5a3d6];return _0x31528f;}export function isAbortPrompt(_0x160a07){const _0x1b9c82=a14_0x3152;return _0x160a07 instanceof Error&&_0x160a07[_0x1b9c82(0x108)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a15_0x126f6e=a15_0x4094;(function(_0x27bf8a,_0x27f521){const _0x4f0039=a15_0x4094,_0x400c2a=_0x27bf8a();while(!![]){try{const _0x4ad00e=parseInt(_0x4f0039(0x193))/0x1+-parseInt(_0x4f0039(0x197))/0x2+parseInt(_0x4f0039(0x199))/0x3*(-parseInt(_0x4f0039(0x194))/0x4)+-parseInt(_0x4f0039(0x18e))/0x5+parseInt(_0x4f0039(0x19b))/0x6+parseInt(_0x4f0039(0x18c))/0x7+-parseInt(_0x4f0039(0x18b))/0x8;if(_0x4ad00e===_0x27f521)break;else _0x400c2a['push'](_0x400c2a['shift']());}catch(_0x223ffa){_0x400c2a['push'](_0x400c2a['shift']());}}}(a15_0xc58f,0x76f2f));import{getBffEndpointContract}from'../../core/api-client.js';function a15_0x4094(_0x5ded15,_0x1c5a31){_0x5ded15=_0x5ded15-0x18b;const _0xc58f7d=a15_0xc58f();let _0x40942f=_0xc58f7d[_0x5ded15];return _0x40942f;}function a15_0xc58f(){const _0x44d62d=['str','889719lznIwh','description','3028386jGWNzw','2423520pFySIq','2218545dzVHAa','read','148330Igmley','(none)','bff','appCode','gmtModified','468928pinlyR','4SKSZQS','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','detail','348400FSxVyT'];a15_0xc58f=function(){return _0x44d62d;};return a15_0xc58f();}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x126f6e(0x190),'command':a15_0x126f6e(0x196),'description':a15_0x126f6e(0x195),'risk':a15_0x126f6e(0x18d),'flags':[{...NAME_FLAG,'required':!![],'description':'Backend\x20Function\x20name'}],async 'execute'(_0x4ef802){const _0x4b3e10=a15_0x126f6e,_0xddcd93=await getBffEndpointContract(_0x4ef802['appCode'],_0x4ef802[_0x4b3e10(0x198)]('name'));return{'ok':!![],'data':{'appCode':_0xddcd93[_0x4b3e10(0x191)],'functionName':_0xddcd93['functionName'],'description':_0xddcd93[_0x4b3e10(0x19a)]||_0x4b3e10(0x18f),'version':_0xddcd93['version'],'gmtModified':_0xddcd93[_0x4b3e10(0x192)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x4c68c9=a16_0x2d9a;function a16_0x2d9a(_0x4783b1,_0x24ac2b){_0x4783b1=_0x4783b1-0x12d;const _0x438f96=a16_0x438f();let _0x2d9a92=_0x438f96[_0x4783b1];return _0x2d9a92;}function a16_0x438f(){const _0x3db1b1=['138988oedybt','Backend\x20Function\x20executed\x20in\x20','read','5WkzZmi','now','20122FzviuY','bff','13616622nklRHK','name','975792WFIaKS','125GhMGrf','57xHciQC','params','7zwXBVm','Backend\x20Function\x20name\x20to\x20execute','20clylfD','str','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','47110020eSdySt','8658920zwzICU','5353271JusWPz','13thxlyD'];a16_0x438f=function(){return _0x3db1b1;};return a16_0x438f();}(function(_0x49981d,_0x4b7a95){const _0x438f55=a16_0x2d9a,_0x20fe5d=_0x49981d();while(!![]){try{const _0x4e2cdf=parseInt(_0x438f55(0x13f))/0x1*(parseInt(_0x438f55(0x13a))/0x2)+parseInt(_0x438f55(0x140))/0x3*(-parseInt(_0x438f55(0x135))/0x4)+parseInt(_0x438f55(0x138))/0x5*(-parseInt(_0x438f55(0x13e))/0x6)+parseInt(_0x438f55(0x142))/0x7*(-parseInt(_0x438f55(0x132))/0x8)+-parseInt(_0x438f55(0x13c))/0x9+-parseInt(_0x438f55(0x12e))/0xa*(parseInt(_0x438f55(0x133))/0xb)+-parseInt(_0x438f55(0x131))/0xc*(-parseInt(_0x438f55(0x134))/0xd);if(_0x4e2cdf===_0x4b7a95)break;else _0x20fe5d['push'](_0x20fe5d['shift']());}catch(_0x5ef81f){_0x20fe5d['push'](_0x20fe5d['shift']());}}}(a16_0x438f,0xc15b6));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x4c68c9(0x13b),'command':'exec','description':a16_0x4c68c9(0x130),'risk':a16_0x4c68c9(0x137),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x4c68c9(0x12d)},PARAMS_FLAG],async 'execute'(_0x4d450d){const _0x3936ae=a16_0x4c68c9,_0x27fa6f=parseJsonParams(_0x4d450d[_0x3936ae(0x12f)](_0x3936ae(0x141))),_0x32f042=Date[_0x3936ae(0x139)](),_0x264423=await executeSdkBff(_0x4d450d['str'](_0x3936ae(0x13d)),_0x27fa6f),_0x1df8ef=Date[_0x3936ae(0x139)]()-_0x32f042;return{'ok':!![],'data':{'result':_0x264423,'elapsed':_0x1df8ef},'message':_0x3936ae(0x136)+_0x1df8ef+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x172589,_0x4d87f2){const _0x3a2cb6=a17_0x4db7,_0x280c6e=_0x172589();while(!![]){try{const _0x5df87a=parseInt(_0x3a2cb6(0x18a))/0x1+parseInt(_0x3a2cb6(0x188))/0x2*(parseInt(_0x3a2cb6(0x184))/0x3)+-parseInt(_0x3a2cb6(0x183))/0x4*(-parseInt(_0x3a2cb6(0x18b))/0x5)+parseInt(_0x3a2cb6(0x182))/0x6+-parseInt(_0x3a2cb6(0x185))/0x7+parseInt(_0x3a2cb6(0x186))/0x8+parseInt(_0x3a2cb6(0x189))/0x9*(-parseInt(_0x3a2cb6(0x187))/0xa);if(_0x5df87a===_0x4d87f2)break;else _0x280c6e['push'](_0x280c6e['shift']());}catch(_0x123c04){_0x280c6e['push'](_0x280c6e['shift']());}}}(a17_0x4215,0x86918));function a17_0x4215(){const _0x205e3a=['4932070ZtVmMG','130376ycnxcQ','36wHyeHP','201137oElVvw','4305570eorwPO','2926368cuArhg','4CHHFes','3JPunNS','9653UvuAVD','7281856fxsmMu'];a17_0x4215=function(){return _0x205e3a;};return a17_0x4215();}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a17_0x4db7(_0x2f4288,_0x1b2fdf){_0x2f4288=_0x2f4288-0x182;const _0x421581=a17_0x4215();let _0x4db712=_0x421581[_0x2f4288];return _0x4db712;}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x406612=a18_0x2416;(function(_0x90dc42,_0x243433){const _0x505f1f=a18_0x2416,_0x457b10=_0x90dc42();while(!![]){try{const _0x450691=-parseInt(_0x505f1f(0x14a))/0x1+parseInt(_0x505f1f(0x156))/0x2*(parseInt(_0x505f1f(0x141))/0x3)+-parseInt(_0x505f1f(0x152))/0x4+-parseInt(_0x505f1f(0x144))/0x5+parseInt(_0x505f1f(0x147))/0x6*(-parseInt(_0x505f1f(0x14e))/0x7)+-parseInt(_0x505f1f(0x146))/0x8*(-parseInt(_0x505f1f(0x142))/0x9)+parseInt(_0x505f1f(0x14b))/0xa;if(_0x450691===_0x243433)break;else _0x457b10['push'](_0x457b10['shift']());}catch(_0x4bbe28){_0x457b10['push'](_0x457b10['shift']());}}}(a18_0x3f47,0x77404));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a18_0x3f47(){const _0x867e51=['info','3vbeBZi','6847317AreKlx','skillVersion','4700820XlxiHX','apiError','8VCMdYn','48714zXpHiA','code','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','643440ExMGht','21682530QBloYp','inherit','unknown','840wQSGiB','cwd','log','install','2831488LnWDod','installedPath','cli-skill-install','\x20at\x20','1650284FhuaMz','CLI\x20Built-in\x20Skill\x20','\x20installed','changed','nonInteractive','repairCommand','error','setLogPath','\x20is\x20already\x20current',']:\x20','read'];a18_0x3f47=function(){return _0x867e51;};return a18_0x3f47();}function a18_0x2416(_0x1a1ea0,_0x455271){_0x1a1ea0=_0x1a1ea0-0x13d;const _0x3f472a=a18_0x3f47();let _0x241628=_0x3f472a[_0x1a1ea0];return _0x241628;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a18_0x406612(0x151),'description':'Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','risk':a18_0x406612(0x13f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3deaef){const _0x29baf7=a18_0x406612;logger[_0x29baf7(0x15d)](process[_0x29baf7(0x14f)]()),logger[_0x29baf7(0x140)](_0x29baf7(0x154),_0x29baf7(0x149));const _0x322b6a=installBuiltinSkill({'stdio':_0x3deaef[_0x29baf7(0x15a)]?'pipe':_0x29baf7(0x14c)});if(!_0x322b6a['ok'])throw CliErrors[_0x29baf7(0x145)]('Built-in\x20Skill\x20install\x20failed\x20['+(_0x322b6a[_0x29baf7(0x148)]||'INSTALL_FAILED')+_0x29baf7(0x13e)+(_0x322b6a[_0x29baf7(0x15c)]||_0x29baf7(0x14d)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x322b6a[_0x29baf7(0x15b)]);const _0x2af005=_0x322b6a[_0x29baf7(0x153)]?_0x29baf7(0x155)+_0x322b6a['installedPath']:'';return console[_0x29baf7(0x150)](_0x322b6a[_0x29baf7(0x159)]?_0x29baf7(0x157)+_0x322b6a[_0x29baf7(0x143)]+_0x29baf7(0x158)+_0x2af005:_0x29baf7(0x157)+_0x322b6a[_0x29baf7(0x143)]+_0x29baf7(0x13d)+_0x2af005),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2565c0,_0x5e6573){const _0x65cea9=a19_0x2880,_0x2ec0bf=_0x2565c0();while(!![]){try{const _0x3b8c62=parseInt(_0x65cea9(0x1e7))/0x1+parseInt(_0x65cea9(0x1e9))/0x2+-parseInt(_0x65cea9(0x1dd))/0x3+parseInt(_0x65cea9(0x1e3))/0x4+-parseInt(_0x65cea9(0x1de))/0x5+-parseInt(_0x65cea9(0x1e2))/0x6*(parseInt(_0x65cea9(0x1e1))/0x7)+parseInt(_0x65cea9(0x1df))/0x8*(parseInt(_0x65cea9(0x1e4))/0x9);if(_0x3b8c62===_0x5e6573)break;else _0x2ec0bf['push'](_0x2ec0bf['shift']());}catch(_0x47be08){_0x2ec0bf['push'](_0x2ec0bf['shift']());}}}(a19_0x2836,0x311f1));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a19_0x2880(_0x322a72,_0x5230db){_0x322a72=_0x322a72-0x1dd;const _0x283670=a19_0x2836();let _0x288001=_0x283670[_0x322a72];return _0x288001;}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(_0x20a89e){const _0x48d4ac=a19_0x2880,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x4d6bf2}=_0x20a89e;if(explicitGlobal&&explicitProject)throw CliErrors[_0x48d4ac(0x1ea)](_0x48d4ac(0x1ed),_0x48d4ac(0x1ec));if(explicitGlobal)return _0x48d4ac(0x1e5);if(explicitProject)return _0x48d4ac(0x1ee);switch(_0x4d6bf2){case'global-default':return'global';case'project-or-global-explicit':if(!(_0x20a89e[_0x48d4ac(0x1eb)]??isInProject()))throw CliErrors[_0x48d4ac(0x1ea)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x48d4ac(0x1e0)]+_0x48d4ac(0x1e8),_0x48d4ac(0x1e6)+PRODUCT_CONFIG[_0x48d4ac(0x1e0)]+',\x20or\x20create\x20a\x20project-local\x20'+PRODUCT_CONFIG[_0x48d4ac(0x1e0)]+'\x20first.');return _0x48d4ac(0x1ee);}}function a19_0x2836(){const _0x25cf58=['newConfigFileName','2307655zWhXEL','6SSLJfN','1424000BTGVLg','45TTBIoS','global','Add\x20--global\x20to\x20write\x20to\x20~/','173198IEjKvW','\x20found).','615906PhVdqv','validation','inProject','Use\x20only\x20one\x20config\x20scope\x20flag.','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','project','391356urHMjX','1286040xvddez','130200jlwUEV'];a19_0x2836=function(){return _0x25cf58;};return a19_0x2836();}export function toScopeFlags(_0x487480){const _0xce5489=a19_0x2880;return{'global':_0x487480===_0xce5489(0x1e5)};}export function formatScopeLabel(_0x294a9a){const _0x2c3185=a19_0x2880;return _0x294a9a===_0x2c3185(0x1e5)?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d770e,_0xfe2ee2){const _0x2e3499=a20_0x3ab8,_0x4f7e21=_0x4d770e();while(!![]){try{const _0x3c28fb=parseInt(_0x2e3499(0xa8))/0x1*(parseInt(_0x2e3499(0xa3))/0x2)+parseInt(_0x2e3499(0xad))/0x3+parseInt(_0x2e3499(0xaa))/0x4*(-parseInt(_0x2e3499(0xa0))/0x5)+parseInt(_0x2e3499(0x9e))/0x6*(parseInt(_0x2e3499(0xa2))/0x7)+-parseInt(_0x2e3499(0xb0))/0x8*(-parseInt(_0x2e3499(0xb5))/0x9)+parseInt(_0x2e3499(0x97))/0xa*(parseInt(_0x2e3499(0x9c))/0xb)+parseInt(_0x2e3499(0x9f))/0xc*(-parseInt(_0x2e3499(0xb6))/0xd);if(_0x3c28fb===_0xfe2ee2)break;else _0x4f7e21['push'](_0x4f7e21['shift']());}catch(_0xb1e482){_0x4f7e21['push'](_0x4f7e21['shift']());}}}(a20_0x5925,0x51ea8));function a20_0x3ab8(_0x4e756d,_0x339c37){_0x4e756d=_0x4e756d-0x97;const _0x592568=a20_0x5925();let _0x3ab898=_0x592568[_0x4e756d];return _0x3ab898;}import{CliErrors}from'../../errors.js';function isSet(_0x319083,_0x312c9f){const _0x25af4b=a20_0x3ab8,_0x43aa0c=_0x319083[_0x25af4b(0xa4)](_0x312c9f);return _0x43aa0c!==undefined&&_0x43aa0c!==''&&_0x43aa0c!==![]&&_0x43aa0c!==0x0;}function fmtNames(_0x325ec5){const _0x4a544a=a20_0x3ab8;return _0x325ec5[_0x4a544a(0xab)](_0x584dec=>'--'+_0x584dec)[_0x4a544a(0x9a)](',\x20');}export function requireOneOf(_0x2d6cee,_0x24015d,_0x28ea02){const _0x29e49a=a20_0x3ab8,_0x486213=_0x24015d[_0x29e49a(0x99)](_0x5929a8=>isSet(_0x2d6cee,_0x5929a8));if(_0x486213[_0x29e49a(0x9b)]!==0x1)throw CliErrors[_0x29e49a(0xa9)](_0x486213[_0x29e49a(0x9b)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x24015d)+_0x29e49a(0xac)+_0x28ea02+'`.':_0x29e49a(0xa7)+fmtNames(_0x24015d)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x486213)+'.',_0x486213[_0x29e49a(0x9b)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x24015d):_0x29e49a(0xb4));}export function requireAnyOf(_0x25cc2f,_0x4f357b,_0x482419){const _0x378710=a20_0x3ab8;if(!_0x4f357b['some'](_0x58fcb4=>isSet(_0x25cc2f,_0x58fcb4)))throw CliErrors[_0x378710(0xa9)](_0x378710(0xa5)+fmtNames(_0x4f357b)+'\x20is\x20required\x20for\x20`'+_0x482419+'`.',_0x378710(0x9d)+fmtNames(_0x4f357b));}export function mutuallyExclusive(_0x5f1059,_0x47908f,_0x4ee9cf){const _0x1166cf=a20_0x3ab8,_0x29a67c=_0x47908f[_0x1166cf(0x99)](_0x2ffdfb=>isSet(_0x5f1059,_0x2ffdfb));if(_0x29a67c[_0x1166cf(0x9b)]>0x1)throw CliErrors[_0x1166cf(0xa9)](_0x1166cf(0x98)+fmtNames(_0x29a67c)+_0x1166cf(0xaf)+_0x4ee9cf+'`.',_0x1166cf(0xb1)+fmtNames(_0x47908f));}function a20_0x5925(){const _0x5cd75c=['Use\x20only\x20one\x20of:\x20','str',':\x20expected\x20','Remove\x20all\x20but\x20one.','9qJYTto','377spdNWd','210710DiZpJr','Flags\x20','filter','join','length','33sfbXHt','Provide\x20one\x20of:\x20','3877032szWOwS','362184vECOPi','616495dKbaYQ','test','7uwOPCd','2XYfeBi','flag','At\x20least\x20one\x20of\x20','Invalid\x20--','Only\x20one\x20of\x20','330643pgUicS','validation','4ZtIFhH','map','\x20is\x20required\x20for\x20`','809787mQXLnk',',\x20got\x20\x22','\x20are\x20mutually\x20exclusive\x20for\x20`','193184bTabJE'];a20_0x5925=function(){return _0x5cd75c;};return a20_0x5925();}export function validatePattern(_0x5ed931,_0xeb0e8f,_0x53b285,_0x543dd7){const _0x1cf0af=a20_0x3ab8,_0x3ee4bd=_0x5ed931[_0x1cf0af(0xb2)](_0xeb0e8f);if(_0x3ee4bd&&!_0x53b285[_0x1cf0af(0xa1)](_0x3ee4bd))throw CliErrors[_0x1cf0af(0xa9)](_0x1cf0af(0xa6)+_0xeb0e8f+_0x1cf0af(0xb3)+_0x543dd7+_0x1cf0af(0xae)+_0x3ee4bd+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a21_0x48ca(_0x12b861,_0xc0c12){_0x12b861=_0x12b861-0xbb;const _0x53ab7b=a21_0x53ab();let _0x48caa7=_0x53ab7b[_0x12b861];return _0x48caa7;}const a21_0x51b8da=a21_0x48ca;(function(_0x45551a,_0x374dc0){const _0x127d4a=a21_0x48ca,_0x5252fe=_0x45551a();while(!![]){try{const _0x4c36c3=parseInt(_0x127d4a(0xd0))/0x1*(-parseInt(_0x127d4a(0xca))/0x2)+-parseInt(_0x127d4a(0xc5))/0x3+-parseInt(_0x127d4a(0xc7))/0x4*(-parseInt(_0x127d4a(0xcb))/0x5)+-parseInt(_0x127d4a(0xc3))/0x6+parseInt(_0x127d4a(0xc2))/0x7+-parseInt(_0x127d4a(0xc6))/0x8*(parseInt(_0x127d4a(0xc1))/0x9)+parseInt(_0x127d4a(0xcd))/0xa;if(_0x4c36c3===_0x374dc0)break;else _0x5252fe['push'](_0x5252fe['shift']());}catch(_0x1a32d8){_0x5252fe['push'](_0x5252fe['shift']());}}}(a21_0x53ab,0x66ead));function a21_0x53ab(){const _0x377aad=['14364250XthRqo','name','string','1ZLalqY','Resource\x20ID','boolean','global','Write\x20to\x20the\x20global\x20configuration','Resource\x20name\x20for\x20lookup','verbose','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','9rBfxTr','1527897BbgeIO','2721306NuYYMR','params','598668FVdxUs','2561336lRuPTf','188vXYwcd','number','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','760574bEmBzJ','12810iBgFoH','sqlcode'];a21_0x53ab=function(){return _0x377aad;};return a21_0x53ab();}export const GLOBAL_SCOPE_FLAG={'name':a21_0x51b8da(0xbc),'type':a21_0x51b8da(0xbb),'default':![],'description':a21_0x51b8da(0xbd)};export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x51b8da(0xc0)}};export const SQLCODE_FLAG={'name':a21_0x51b8da(0xcc),'type':a21_0x51b8da(0xcf),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a21_0x51b8da(0xbf),'type':'boolean','description':'Return\x20full\x20raw\x20response\x20object'};export const PARAMS_FLAG={'name':a21_0x51b8da(0xc4),'type':a21_0x51b8da(0xcf),'description':a21_0x51b8da(0xc9)};export const NAME_FLAG={'name':a21_0x51b8da(0xce),'type':a21_0x51b8da(0xcf),'description':a21_0x51b8da(0xbe)};export const ID_FLAG={'name':'id','type':a21_0x51b8da(0xc8),'required':!![],'description':a21_0x51b8da(0xd1)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a22_0x3cbe(_0x2aade1,_0x2bb1ca){_0x2aade1=_0x2aade1-0x1f3;const _0x2c834e=a22_0x2c83();let _0x3cbe37=_0x2c834e[_0x2aade1];return _0x3cbe37;}(function(_0x5744eb,_0x27119b){const _0x1942fe=a22_0x3cbe,_0x3687e8=_0x5744eb();while(!![]){try{const _0x139c9b=-parseInt(_0x1942fe(0x1fc))/0x1*(parseInt(_0x1942fe(0x1f5))/0x2)+-parseInt(_0x1942fe(0x203))/0x3*(parseInt(_0x1942fe(0x1f4))/0x4)+-parseInt(_0x1942fe(0x1f8))/0x5+-parseInt(_0x1942fe(0x1fd))/0x6*(parseInt(_0x1942fe(0x204))/0x7)+-parseInt(_0x1942fe(0x1fa))/0x8*(parseInt(_0x1942fe(0x206))/0x9)+-parseInt(_0x1942fe(0x1f6))/0xa*(-parseInt(_0x1942fe(0x205))/0xb)+parseInt(_0x1942fe(0x207))/0xc;if(_0x139c9b===_0x27119b)break;else _0x3687e8['push'](_0x3687e8['shift']());}catch(_0x20b286){_0x3687e8['push'](_0x3687e8['shift']());}}}(a22_0x2c83,0xd7883));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_0x2c83(){const _0x2b8ac9=['\x20path\x20is\x20required.','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','3UAbfxP','14987FZrWwC','176SJlXSP','495EGKzXf','44382492PKgaAK','validation','size','3183344yauibi','2PxmRaP','278870obJYui','isFile','3216400yUXlFg','ceil','202480rzycph','toFixed','26099VDcGip','1134mmzTmX','\x20MB','trim','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a22_0x2c83=function(){return _0x2b8ac9;};return a22_0x2c83();}function formatBytes(_0x554f22){const _0x43d6c9=a22_0x3cbe;if(_0x554f22>=BYTES_PER_MB){const _0x536e1f=Math[_0x43d6c9(0x1f9)](_0x554f22/BYTES_PER_MB*0x64)/0x64;return _0x536e1f[_0x43d6c9(0x1fb)](0x2)+_0x43d6c9(0x1fe);}return _0x554f22+'\x20B';}export function requireRuntimeUploadFile(_0xcf31c,_0x25d0ab){const _0x31acca=a22_0x3cbe,_0x3b4063=_0xcf31c[_0x31acca(0x1ff)]();if(!_0x3b4063)throw CliErrors[_0x31acca(0x208)](_0x25d0ab+_0x31acca(0x201));if(!existsSync(_0x3b4063))throw CliErrors[_0x31acca(0x208)]('File\x20not\x20found:\x20'+_0x3b4063);const _0x511a84=statSync(_0x3b4063);if(!_0x511a84[_0x31acca(0x1f7)]())throw CliErrors[_0x31acca(0x208)](_0x31acca(0x200)+_0x3b4063);if(_0x511a84['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x31acca(0x208)](_0x31acca(0x202)+_0x3b4063+'\x20('+formatBytes(_0x511a84[_0x31acca(0x1f3)])+')');return{'path':_0x3b4063,'size':_0x511a84[_0x31acca(0x1f3)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a23_0x2e2458=a23_0x2cc2;(function(_0x55b799,_0x3a458a){const _0x51caa5=a23_0x2cc2,_0x1ff337=_0x55b799();while(!![]){try{const _0x5a2fe7=-parseInt(_0x51caa5(0xc8))/0x1+-parseInt(_0x51caa5(0xc9))/0x2+-parseInt(_0x51caa5(0xda))/0x3+-parseInt(_0x51caa5(0xaf))/0x4*(parseInt(_0x51caa5(0xd8))/0x5)+parseInt(_0x51caa5(0xbe))/0x6+-parseInt(_0x51caa5(0xa7))/0x7*(parseInt(_0x51caa5(0x9c))/0x8)+parseInt(_0x51caa5(0x9e))/0x9;if(_0x5a2fe7===_0x3a458a)break;else _0x1ff337['push'](_0x1ff337['shift']());}catch(_0x3805ae){_0x1ff337['push'](_0x1ff337['shift']());}}}(a23_0x1aea,0xa758e));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';function a23_0x2cc2(_0x332abe,_0xd2a3b1){_0x332abe=_0x332abe-0x94;const _0x1aea79=a23_0x1aea();let _0x2cc2df=_0x1aea79[_0x332abe];return _0x2cc2df;}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(_0x3a762d){const _0x1fe476=a23_0x2cc2,_0x1cccf2=_0x3a762d[_0x1fe476(0x96)]('.');if(_0x1cccf2[_0x1fe476(0xc5)]!==0x3||_0x1cccf2[0x0]!==_0x1fe476(0xcd)||_0x1cccf2[0x2]!==_0x1fe476(0x98))return undefined;const _0x4d72d4=_0x1cccf2[0x1]?.[_0x1fe476(0xa6)]();return _0x4d72d4?_0x4d72d4:undefined;}function parseAliasDeleteKey(_0x50272d){const _0x464a82=a23_0x2cc2,_0x533118=_0x50272d['split']('.');if(_0x533118[_0x464a82(0xc5)]===0x2&&_0x533118[0x0]===_0x464a82(0xcd)){const _0x589c29=_0x533118[0x1]?.[_0x464a82(0xa6)]();return _0x589c29?{'alias':_0x589c29}:undefined;}if(_0x533118[_0x464a82(0xc5)]===0x3&&_0x533118[0x0]===_0x464a82(0xcd)&&_0x533118[0x2]==='appcode'){const _0x1f86ba=_0x533118[0x1]?.[_0x464a82(0xa6)]();return _0x1f86ba?{'alias':_0x1f86ba,'field':'appcode'}:undefined;}return undefined;}function a23_0x1aea(){const _0x41af98=['Set\x20`','split','field','appcode','Get\x20a\x20config\x20value','(none)','get','152xMJCjq','key','21955221PvzSlV','config','list','write','pretty','join','isArray','global','trim','412517HlinuQ','args','Missing\x20key\x20or\x20value.','\x20config\x20delete\x20<key>\x20[--global]','\x20\x20project:\x20','set','\x22\x20is\x20not\x20settable.','format','4Idgbad','Set\x20a\x20configuration\x20value','Value\x20to\x20assign','bool','includes','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','pageSize','Usage:\x20','\x20\x20global:\x20\x20','`\x20=\x20\x22','value','Deleted\x20`','Key\x20already\x20absent:\x20','Settable\x20keys:\x20','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','5401356fgXvqX','stringify','pageSize\x20must\x20be\x20a\x20positive\x20number','read','project-or-global-explicit','\x20(global)','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','length','\x20config\x20get\x20<key>','Key\x20not\x20found:\x20','167926mSmqnU','1962624jmgEId','delete','object','Delete\x20a\x20configuration\x20value','apps','Missing\x20key\x20argument.','../../context.js','Invalid\x20locale\x20value.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','List\x20current\x20config','locale','raw','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','Config\x20files:\x0a','log','1614005QfiqJv','alias','187539QNDmym','validation'];a23_0x1aea=function(){return _0x41af98;};return a23_0x1aea();}function setLocalAppAlias(_0x1246c2,_0x419844,_0xedc347){const _0x3bf716=a23_0x2cc2,_0x44e403=_0x1246c2[_0x3bf716(0xcd)]&&typeof _0x1246c2['apps']===_0x3bf716(0xcb)&&!Array[_0x3bf716(0xa4)](_0x1246c2[_0x3bf716(0xcd)])?_0x1246c2['apps']:{},_0x35de71=_0x44e403[_0x419844]&&typeof _0x44e403[_0x419844]===_0x3bf716(0xcb)&&!Array['isArray'](_0x44e403[_0x419844])?_0x44e403[_0x419844]:{};_0x35de71['appcode']=_0xedc347,_0x44e403[_0x419844]=_0x35de71,_0x1246c2[_0x3bf716(0xcd)]=_0x44e403;}function deleteLocalAppAlias(_0x4ce99b,_0x3fd85f){const _0x25b442=a23_0x2cc2;if(!_0x4ce99b[_0x25b442(0xcd)]||typeof _0x4ce99b[_0x25b442(0xcd)]!=='object'||Array[_0x25b442(0xa4)](_0x4ce99b[_0x25b442(0xcd)]))return![];const _0x510583=_0x4ce99b[_0x25b442(0xcd)],_0x27f6ec=_0x510583[_0x3fd85f[_0x25b442(0xd9)]];if(!_0x27f6ec||typeof _0x27f6ec!==_0x25b442(0xcb)||Array['isArray'](_0x27f6ec))return![];if(!_0x3fd85f[_0x25b442(0x97)])return delete _0x510583[_0x3fd85f[_0x25b442(0xd9)]],!![];if(!(_0x3fd85f[_0x25b442(0x97)]in _0x27f6ec))return![];return delete _0x27f6ec[_0x3fd85f[_0x25b442(0x97)]],Object['keys'](_0x27f6ec)[_0x25b442(0xc5)]===0x0&&delete _0x510583[_0x3fd85f['alias']],!![];}const listDef={'service':a23_0x2e2458(0x9f),'command':a23_0x2e2458(0xa0),'description':a23_0x2e2458(0xd2),'risk':a23_0x2e2458(0xc1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x370ecb){const _0x2a0bfe=a23_0x2e2458,{buildConfigFromFlags:_0x3a7ad1}=await import('../../context.js'),_0x3354b4=_0x3a7ad1({}),_0x57d461=redactCliConfigCredentials(_0x3354b4[_0x2a0bfe(0xd4)]),_0x5ad6f3=getProjectConfigPath(),_0x3372a1=resolveWriteConfigPath(_0x2a0bfe(0xa5));if(_0x370ecb[_0x2a0bfe(0xae)]===_0x2a0bfe(0xa2))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x2a0bfe(0xbf)](_0x57d461,null,0x2)+'\x0a\x0a')+_0x2a0bfe(0xd6)+(_0x2a0bfe(0xab)+(_0x5ad6f3??_0x2a0bfe(0x9a))+'\x0a')+(_0x2a0bfe(0xb7)+_0x3372a1)};return{'ok':!![],'data':{'effective':_0x57d461,'configFiles':{'project':_0x5ad6f3??null,'global':_0x3372a1}}};}},getDef={'service':a23_0x2e2458(0x9f),'command':a23_0x2e2458(0x9b),'description':a23_0x2e2458(0x99),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2e2458(0x9d),'description':a23_0x2e2458(0xb4),'required':!![]}],'flags':[],async 'execute'(_0x406bf3){const _0x4cacb1=a23_0x2e2458,_0x5d5058=_0x406bf3[_0x4cacb1(0xa8)][0x0];if(!_0x5d5058)throw CliErrors['validation'](_0x4cacb1(0xce),'Usage:\x20'+CLI_BIN_NAME+_0x4cacb1(0xc6));const {buildConfigFromFlags:_0x12e80d}=await import(_0x4cacb1(0xcf)),{raw:_0x3ac74f}=_0x12e80d({});if(_0x5d5058['includes']('.')){const _0x5c9fd1=_0x5d5058['split']('.');let _0x1372e7=_0x3ac74f;for(const _0x374616 of _0x5c9fd1){if(_0x1372e7==null||typeof _0x1372e7!==_0x4cacb1(0xcb))throw CliErrors[_0x4cacb1(0x94)](_0x4cacb1(0xc7)+_0x5d5058);_0x1372e7=_0x1372e7[_0x374616];}if(_0x1372e7===undefined)throw CliErrors[_0x4cacb1(0x94)](_0x4cacb1(0xc7)+_0x5d5058);const _0x50d43f=redactCliConfigValue(_0x5d5058,_0x1372e7);return console[_0x4cacb1(0xd7)](typeof _0x50d43f==='object'?JSON['stringify'](_0x50d43f,null,0x2):String(_0x50d43f)),{'ok':!![]};}const _0x2c3119=_0x3ac74f[_0x5d5058];if(_0x2c3119===undefined)throw CliErrors[_0x4cacb1(0x94)](_0x4cacb1(0xc7)+_0x5d5058);const _0x1ba9a9=redactCliConfigValue(_0x5d5058,_0x2c3119);return console[_0x4cacb1(0xd7)](typeof _0x1ba9a9==='object'?JSON[_0x4cacb1(0xbf)](_0x1ba9a9,null,0x2):String(_0x1ba9a9)),{'ok':!![]};}},setDef={'service':a23_0x2e2458(0x9f),'command':a23_0x2e2458(0xac),'description':a23_0x2e2458(0xb0),'risk':a23_0x2e2458(0xa1),'confirmationDescription':a23_0x2e2458(0xd5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x2e2458(0xb9),'description':a23_0x2e2458(0xb1),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x41106c){const _0x2b38ba=a23_0x2e2458,_0x1a8238=_0x41106c[_0x2b38ba(0xa8)][0x0],_0x1c4741=_0x41106c[_0x2b38ba(0xa8)][0x1];if(!_0x1a8238||_0x1c4741===undefined)throw CliErrors['validation'](_0x2b38ba(0xa9),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x1a8238]&&!ENUM_KEYS[_0x1a8238][_0x2b38ba(0xb3)](_0x1c4741))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x1a8238+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x1a8238][_0x2b38ba(0xa3)](',\x20'));if(isCliProtectedConfigKey(_0x1a8238))throw CliErrors[_0x2b38ba(0x94)]('\x22'+_0x1a8238+_0x2b38ba(0xc4));if(_0x1a8238===_0x2b38ba(0xb5)){const _0xc6cb15=Number(_0x1c4741);if(isNaN(_0xc6cb15)||_0xc6cb15<=0x0)throw CliErrors[_0x2b38ba(0x94)](_0x2b38ba(0xc0));}const _0x8b351b=resolveWriteScope({'explicitGlobal':_0x41106c[_0x2b38ba(0xb2)](_0x2b38ba(0xa5)),'policy':_0x2b38ba(0xc2)}),_0xeb35b3=toScopeFlags(_0x8b351b),_0x28e72f=readScopedConfig(_0xeb35b3),_0x5448ca=parseAliasAppcodeSetKey(_0x1a8238);if(!_0x5448ca&&!isTopLevelConfigKey(_0x1a8238))throw CliErrors[_0x2b38ba(0x94)]('Top-level\x20key\x20\x22'+_0x1a8238+_0x2b38ba(0xad),_0x2b38ba(0xbc)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');if(_0x5448ca)setLocalAppAlias(_0x28e72f,_0x5448ca,_0x1c4741);else{if(_0x1a8238===_0x2b38ba(0xd3)){const _0x52e0b2=normalizeLocale(_0x1c4741);if(!_0x52e0b2)throw CliErrors[_0x2b38ba(0x94)](_0x2b38ba(0xd0),_0x2b38ba(0xd1));_0x28e72f[_0x2b38ba(0xd3)]=_0x52e0b2;}else _0x28e72f[_0x1a8238]=_0x1a8238===_0x2b38ba(0xb5)?Number(_0x1c4741):DOMAIN_CONFIG_FIELDS[_0x2b38ba(0xb3)](_0x1a8238)?normalizeDomainOrigin(_0x1a8238,_0x1c4741):_0x1c4741;}const _0x53af0b=_0x1a8238==='accessKey'?maskCliAccessKey(_0x1c4741):!_0x5448ca&&_0x1a8238===_0x2b38ba(0xd3)?String(_0x28e72f[_0x2b38ba(0xd3)]):_0x1c4741;return console['log'](_0x2b38ba(0x95)+_0x1a8238+_0x2b38ba(0xb8)+_0x53af0b+'\x22'+(_0x8b351b==='global'?_0x2b38ba(0xc3):'')),writeScopedConfig(_0x28e72f,_0xeb35b3),{'ok':!![]};}},deleteDef={'service':a23_0x2e2458(0x9f),'command':a23_0x2e2458(0xca),'description':a23_0x2e2458(0xcc),'risk':a23_0x2e2458(0xa1),'confirmationDescription':a23_0x2e2458(0xbd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2e2458(0x9d),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x573cf6){const _0x3ccb7f=a23_0x2e2458,_0x7f2024=_0x573cf6[_0x3ccb7f(0xa8)][0x0];if(!_0x7f2024)throw CliErrors[_0x3ccb7f(0x94)](_0x3ccb7f(0xce),_0x3ccb7f(0xb6)+CLI_BIN_NAME+_0x3ccb7f(0xaa));if(isCliProtectedConfigKey(_0x7f2024))throw CliErrors[_0x3ccb7f(0x94)]('\x22'+_0x7f2024+_0x3ccb7f(0xc4));const _0x48288a=resolveWriteScope({'explicitGlobal':_0x573cf6[_0x3ccb7f(0xb2)](_0x3ccb7f(0xa5)),'policy':_0x3ccb7f(0xc2)}),_0x3c331b=toScopeFlags(_0x48288a),_0x6948a4=readScopedConfig(_0x3c331b),_0x2fe2e3=parseAliasDeleteKey(_0x7f2024);if(_0x2fe2e3){if(!deleteLocalAppAlias(_0x6948a4,_0x2fe2e3))return console[_0x3ccb7f(0xd7)](_0x3ccb7f(0xbb)+_0x7f2024+(_0x48288a===_0x3ccb7f(0xa5)?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x7f2024,'scope':_0x48288a,'changed':![]}};return console[_0x3ccb7f(0xd7)]('Deleted\x20`'+_0x7f2024+'`'+(_0x48288a===_0x3ccb7f(0xa5)?_0x3ccb7f(0xc3):'')),writeScopedConfig(_0x6948a4,_0x3c331b),{'ok':!![],'data':{'key':_0x7f2024,'scope':_0x48288a,'changed':!![]}};}if(_0x6948a4[_0x7f2024]===undefined)return console['log'](_0x3ccb7f(0xbb)+_0x7f2024+(_0x48288a===_0x3ccb7f(0xa5)?_0x3ccb7f(0xc3):'')),{'ok':!![],'data':{'key':_0x7f2024,'scope':_0x48288a,'changed':![]}};return delete _0x6948a4[_0x7f2024],console[_0x3ccb7f(0xd7)](_0x3ccb7f(0xba)+_0x7f2024+'`'+(_0x48288a===_0x3ccb7f(0xa5)?_0x3ccb7f(0xc3):'')),writeScopedConfig(_0x6948a4,_0x3c331b),{'ok':!![],'data':{'key':_0x7f2024,'scope':_0x48288a,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a23_0xdc7412=a23_0x2d22;(function(_0x35adcd,_0x400726){const _0xadcb5c=a23_0x2d22,_0x360c37=_0x35adcd();while(!![]){try{const _0x1532a7=parseInt(_0xadcb5c(0x15f))/0x1+-parseInt(_0xadcb5c(0x156))/0x2+-parseInt(_0xadcb5c(0x13a))/0x3*(parseInt(_0xadcb5c(0x16a))/0x4)+-parseInt(_0xadcb5c(0x166))/0x5*(parseInt(_0xadcb5c(0x142))/0x6)+parseInt(_0xadcb5c(0x146))/0x7+-parseInt(_0xadcb5c(0x16d))/0x8+-parseInt(_0xadcb5c(0x164))/0x9*(-parseInt(_0xadcb5c(0x170))/0xa);if(_0x1532a7===_0x400726)break;else _0x360c37['push'](_0x360c37['shift']());}catch(_0x551ca7){_0x360c37['push'](_0x360c37['shift']());}}}(a23_0x3f9b,0x59d29));function a23_0x2d22(_0x52d4d1,_0x5f2706){_0x52d4d1=_0x52d4d1-0x139;const _0x3f9b67=a23_0x3f9b();let _0x2d22bf=_0x3f9b67[_0x52d4d1];return _0x2d22bf;}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';function a23_0x3f9b(){const _0x3926b7=['Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x20config\x20get\x20<key>','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','79432SCPMno','length','Deleted\x20`','4976176VdzPXg','raw','pageSize\x20must\x20be\x20a\x20positive\x20number','16550jJkUIo','args','\x22.\x20Allowed:\x20','isArray','project-or-global-explicit','value','accessKey','Missing\x20key\x20argument.','delete','global','validation',';\x20apps.<alias>.appcode','trim','\x20\x20global:\x20\x20','6kScKVH','Key\x20not\x20found:\x20','Get\x20a\x20config\x20value','Set\x20`','Delete\x20a\x20configuration\x20value','join','../../context.js','Key\x20already\x20absent:\x20','289242EzvsSw','list','List\x20current\x20config','alias','898828eBWHiM','Invalid\x20locale\x20value.','locale','Settable\x20keys:\x20','\x20(global)','\x20config\x20set\x20<key>\x20<value>\x20[--global]','format','Set\x20a\x20configuration\x20value','field','includes','Invalid\x20value\x20for\x20\x22','key','Value\x20to\x20assign','appcode','write','log','1467486FbGRGe','`\x20=\x20\x22','pageSize','pretty','config','read','object','Usage:\x20','bool','10457OmSguF','apps','split','stringify','Missing\x20key\x20or\x20value.','11718zzrFTP','\x22\x20is\x20not\x20settable.','55BQiaBy'];a23_0x3f9b=function(){return _0x3926b7;};return a23_0x3f9b();}import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x5ac9d6){const _0x500d26=a23_0x2d22,_0x18d73f=_0x5ac9d6['split']('.');if(_0x18d73f[_0x500d26(0x16b)]!==0x3||_0x18d73f[0x0]!==_0x500d26(0x160)||_0x18d73f[0x2]!=='appcode')return undefined;const _0x5e558d=_0x18d73f[0x1]?.[_0x500d26(0x17c)]();return _0x5e558d?_0x5e558d:undefined;}function parseAliasDeleteKey(_0x10712f){const _0x1ffbad=a23_0x2d22,_0x4cf8ed=_0x10712f[_0x1ffbad(0x161)]('.');if(_0x4cf8ed[_0x1ffbad(0x16b)]===0x2&&_0x4cf8ed[0x0]===_0x1ffbad(0x160)){const _0x3cfccc=_0x4cf8ed[0x1]?.[_0x1ffbad(0x17c)]();return _0x3cfccc?{'alias':_0x3cfccc}:undefined;}if(_0x4cf8ed['length']===0x3&&_0x4cf8ed[0x0]===_0x1ffbad(0x160)&&_0x4cf8ed[0x2]==='appcode'){const _0x47f9b3=_0x4cf8ed[0x1]?.['trim']();return _0x47f9b3?{'alias':_0x47f9b3,'field':_0x1ffbad(0x153)}:undefined;}return undefined;}function setLocalAppAlias(_0xfc1f28,_0x56426c,_0x5f1375){const _0x122cd7=a23_0x2d22,_0x540513=_0xfc1f28[_0x122cd7(0x160)]&&typeof _0xfc1f28[_0x122cd7(0x160)]===_0x122cd7(0x15c)&&!Array[_0x122cd7(0x173)](_0xfc1f28['apps'])?_0xfc1f28[_0x122cd7(0x160)]:{},_0x386fad=_0x540513[_0x56426c]&&typeof _0x540513[_0x56426c]===_0x122cd7(0x15c)&&!Array[_0x122cd7(0x173)](_0x540513[_0x56426c])?_0x540513[_0x56426c]:{};_0x386fad['appcode']=_0x5f1375,_0x540513[_0x56426c]=_0x386fad,_0xfc1f28[_0x122cd7(0x160)]=_0x540513;}function deleteLocalAppAlias(_0x170930,_0x1f2971){const _0xd8ac3b=a23_0x2d22;if(!_0x170930[_0xd8ac3b(0x160)]||typeof _0x170930[_0xd8ac3b(0x160)]!==_0xd8ac3b(0x15c)||Array['isArray'](_0x170930[_0xd8ac3b(0x160)]))return![];const _0x3c41b3=_0x170930[_0xd8ac3b(0x160)],_0x6a23f6=_0x3c41b3[_0x1f2971[_0xd8ac3b(0x145)]];if(!_0x6a23f6||typeof _0x6a23f6!=='object'||Array['isArray'](_0x6a23f6))return![];if(!_0x1f2971['field'])return delete _0x3c41b3[_0x1f2971[_0xd8ac3b(0x145)]],!![];if(!(_0x1f2971[_0xd8ac3b(0x14e)]in _0x6a23f6))return![];return delete _0x6a23f6[_0x1f2971[_0xd8ac3b(0x14e)]],Object['keys'](_0x6a23f6)['length']===0x0&&delete _0x3c41b3[_0x1f2971[_0xd8ac3b(0x145)]],!![];}const listDef={'service':a23_0xdc7412(0x15a),'command':a23_0xdc7412(0x143),'description':a23_0xdc7412(0x144),'risk':a23_0xdc7412(0x15b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x40b5ca){const _0x8cd47d=a23_0xdc7412,{buildConfigFromFlags:_0x5c538c}=await import(_0x8cd47d(0x140)),_0x3f9fbd=_0x5c538c({}),_0x777b53=redactCliConfigCredentials(_0x3f9fbd[_0x8cd47d(0x16e)]),_0x5548de=getProjectConfigPath(),_0x4a6014=resolveWriteConfigPath(_0x8cd47d(0x179));if(_0x40b5ca[_0x8cd47d(0x14c)]===_0x8cd47d(0x159))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x8cd47d(0x162)](_0x777b53,null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+('\x20\x20project:\x20'+(_0x5548de??'(none)')+'\x0a')+(_0x8cd47d(0x139)+_0x4a6014)};return{'ok':!![],'data':{'effective':_0x777b53,'configFiles':{'project':_0x5548de??null,'global':_0x4a6014}}};}},getDef={'service':a23_0xdc7412(0x15a),'command':'get','description':a23_0xdc7412(0x13c),'risk':a23_0xdc7412(0x15b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0xdc7412(0x151),'description':a23_0xdc7412(0x167),'required':!![]}],'flags':[],async 'execute'(_0x14e22a){const _0x120fb9=a23_0xdc7412,_0x22f61f=_0x14e22a[_0x120fb9(0x171)][0x0];if(!_0x22f61f)throw CliErrors[_0x120fb9(0x17a)]('Missing\x20key\x20argument.',_0x120fb9(0x15d)+CLI_BIN_NAME+_0x120fb9(0x168));const {buildConfigFromFlags:_0x9c35ad}=await import(_0x120fb9(0x140)),{raw:_0x3f735a}=_0x9c35ad({});if(_0x22f61f[_0x120fb9(0x14f)]('.')){const _0x46c3cb=_0x22f61f[_0x120fb9(0x161)]('.');let _0x1c1537=_0x3f735a;for(const _0x381478 of _0x46c3cb){if(_0x1c1537==null||typeof _0x1c1537!==_0x120fb9(0x15c))throw CliErrors[_0x120fb9(0x17a)](_0x120fb9(0x13b)+_0x22f61f);_0x1c1537=_0x1c1537[_0x381478];}if(_0x1c1537===undefined)throw CliErrors[_0x120fb9(0x17a)]('Key\x20not\x20found:\x20'+_0x22f61f);const _0x159712=redactCliConfigValue(_0x22f61f,_0x1c1537);return console[_0x120fb9(0x155)](typeof _0x159712===_0x120fb9(0x15c)?JSON[_0x120fb9(0x162)](_0x159712,null,0x2):String(_0x159712)),{'ok':!![]};}const _0x9af2d0=_0x3f735a[_0x22f61f];if(_0x9af2d0===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x22f61f);const _0x4f4402=redactCliConfigValue(_0x22f61f,_0x9af2d0);return console[_0x120fb9(0x155)](typeof _0x4f4402===_0x120fb9(0x15c)?JSON[_0x120fb9(0x162)](_0x4f4402,null,0x2):String(_0x4f4402)),{'ok':!![]};}},setDef={'service':'config','command':'set','description':a23_0xdc7412(0x14d),'risk':a23_0xdc7412(0x154),'confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0xdc7412(0x175),'description':a23_0xdc7412(0x152),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x147b67){const _0x29b356=a23_0xdc7412,_0x489211=_0x147b67[_0x29b356(0x171)][0x0],_0x72068d=_0x147b67[_0x29b356(0x171)][0x1];if(!_0x489211||_0x72068d===undefined)throw CliErrors[_0x29b356(0x17a)](_0x29b356(0x163),_0x29b356(0x15d)+CLI_BIN_NAME+_0x29b356(0x14b));if(ENUM_KEYS[_0x489211]&&!ENUM_KEYS[_0x489211][_0x29b356(0x14f)](_0x72068d))throw CliErrors[_0x29b356(0x17a)](_0x29b356(0x150)+_0x489211+_0x29b356(0x172)+ENUM_KEYS[_0x489211][_0x29b356(0x13f)](',\x20'));if(isCliProtectedConfigKey(_0x489211))throw CliErrors[_0x29b356(0x17a)]('\x22'+_0x489211+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0x489211==='pageSize'){const _0x92c569=Number(_0x72068d);if(isNaN(_0x92c569)||_0x92c569<=0x0)throw CliErrors[_0x29b356(0x17a)](_0x29b356(0x16f));}const _0x5e1289=resolveWriteScope({'explicitGlobal':_0x147b67[_0x29b356(0x15e)](_0x29b356(0x179)),'policy':_0x29b356(0x174)}),_0x48da61=toScopeFlags(_0x5e1289),_0x1083fd=readScopedConfig(_0x48da61),_0x284723=parseAliasAppcodeSetKey(_0x489211);if(!_0x284723&&!isTopLevelConfigKey(_0x489211))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x489211+_0x29b356(0x165),_0x29b356(0x149)+getTopLevelConfigKeySummary()+_0x29b356(0x17b));if(_0x284723)setLocalAppAlias(_0x1083fd,_0x284723,_0x72068d);else{if(_0x489211==='locale'){const _0x4d496f=normalizeLocale(_0x72068d);if(!_0x4d496f)throw CliErrors[_0x29b356(0x17a)](_0x29b356(0x147),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');_0x1083fd[_0x29b356(0x148)]=_0x4d496f;}else _0x1083fd[_0x489211]=_0x489211===_0x29b356(0x158)?Number(_0x72068d):DOMAIN_CONFIG_FIELDS[_0x29b356(0x14f)](_0x489211)?normalizeDomainOrigin(_0x489211,_0x72068d):_0x72068d;}const _0x4ec28b=_0x489211===_0x29b356(0x176)?maskCliAccessKey(_0x72068d):!_0x284723&&_0x489211==='locale'?String(_0x1083fd['locale']):_0x72068d;return console[_0x29b356(0x155)](_0x29b356(0x13d)+_0x489211+_0x29b356(0x157)+_0x4ec28b+'\x22'+(_0x5e1289===_0x29b356(0x179)?_0x29b356(0x14a):'')),writeScopedConfig(_0x1083fd,_0x48da61),{'ok':!![]};}},deleteDef={'service':a23_0xdc7412(0x15a),'command':a23_0xdc7412(0x178),'description':a23_0xdc7412(0x13e),'risk':'write','confirmationDescription':a23_0xdc7412(0x169),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0xdc7412(0x151),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x311eb3){const _0x12db85=a23_0xdc7412,_0x707f76=_0x311eb3[_0x12db85(0x171)][0x0];if(!_0x707f76)throw CliErrors[_0x12db85(0x17a)](_0x12db85(0x177),_0x12db85(0x15d)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x707f76))throw CliErrors[_0x12db85(0x17a)]('\x22'+_0x707f76+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x20b99e=resolveWriteScope({'explicitGlobal':_0x311eb3[_0x12db85(0x15e)](_0x12db85(0x179)),'policy':_0x12db85(0x174)}),_0x43a90b=toScopeFlags(_0x20b99e),_0x28d434=readScopedConfig(_0x43a90b),_0x570aad=parseAliasDeleteKey(_0x707f76);if(_0x570aad){if(!deleteLocalAppAlias(_0x28d434,_0x570aad))return console[_0x12db85(0x155)](_0x12db85(0x141)+_0x707f76+(_0x20b99e==='global'?_0x12db85(0x14a):'')),{'ok':!![],'data':{'key':_0x707f76,'scope':_0x20b99e,'changed':![]}};return console[_0x12db85(0x155)](_0x12db85(0x16c)+_0x707f76+'`'+(_0x20b99e===_0x12db85(0x179)?_0x12db85(0x14a):'')),writeScopedConfig(_0x28d434,_0x43a90b),{'ok':!![],'data':{'key':_0x707f76,'scope':_0x20b99e,'changed':!![]}};}if(_0x28d434[_0x707f76]===undefined)return console[_0x12db85(0x155)](_0x12db85(0x141)+_0x707f76+(_0x20b99e===_0x12db85(0x179)?_0x12db85(0x14a):'')),{'ok':!![],'data':{'key':_0x707f76,'scope':_0x20b99e,'changed':![]}};return delete _0x28d434[_0x707f76],console[_0x12db85(0x155)]('Deleted\x20`'+_0x707f76+'`'+(_0x20b99e===_0x12db85(0x179)?'\x20(global)':'')),writeScopedConfig(_0x28d434,_0x43a90b),{'ok':!![],'data':{'key':_0x707f76,'scope':_0x20b99e,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x40336f=a24_0x12e7;(function(_0x1296d1,_0xa40d24){const _0x2ff409=a24_0x12e7,_0x1c25d4=_0x1296d1();while(!![]){try{const _0x64e524=-parseInt(_0x2ff409(0x9c))/0x1*(-parseInt(_0x2ff409(0xb7))/0x2)+parseInt(_0x2ff409(0xc1))/0x3*(parseInt(_0x2ff409(0x98))/0x4)+-parseInt(_0x2ff409(0xa4))/0x5*(parseInt(_0x2ff409(0xbd))/0x6)+parseInt(_0x2ff409(0x9e))/0x7+-parseInt(_0x2ff409(0xa9))/0x8*(-parseInt(_0x2ff409(0xae))/0x9)+parseInt(_0x2ff409(0xa6))/0xa+-parseInt(_0x2ff409(0xaa))/0xb;if(_0x64e524===_0xa40d24)break;else _0x1c25d4['push'](_0x1c25d4['shift']());}catch(_0x24413a){_0x1c25d4['push'](_0x1c25d4['shift']());}}}(a24_0x517f,0x8b8fc));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';function a24_0x12e7(_0x4c8beb,_0x11e958){_0x4c8beb=_0x4c8beb-0x93;const _0x517f1f=a24_0x517f();let _0x12e79f=_0x517f1f[_0x4c8beb];return _0x12e79f;}import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':'domain-config','type':'string','description':a24_0x40336f(0x94)},{'name':'user-domain','type':a24_0x40336f(0xb0),'description':a24_0x40336f(0xa5)},{'name':'api-domain','type':a24_0x40336f(0xb0),'description':a24_0x40336f(0xad)},{'name':a24_0x40336f(0xbb),'type':a24_0x40336f(0xb0),'description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':a24_0x40336f(0xb8),'type':a24_0x40336f(0xb0),'description':a24_0x40336f(0x96)},{'name':a24_0x40336f(0xb3),'type':a24_0x40336f(0xb0),'description':a24_0x40336f(0xa8)},{'name':'harness-domain','type':a24_0x40336f(0xb0),'description':a24_0x40336f(0xb9)}];export const configInitFlags=[{'name':'region','type':a24_0x40336f(0xb0),'description':a24_0x40336f(0x9a)+ENABLED_LOVRABET_REGION_VALUES[a24_0x40336f(0xaf)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x318067){const _0x54bf94=a24_0x40336f,_0x33eabd=_0x318067[_0x54bf94(0x95)](_0x54bf94(0xb6));if(_0x33eabd){if(!isEnabledLovrabetRegion(_0x33eabd))throw CliErrors[_0x54bf94(0xb1)](_0x54bf94(0xc3)+_0x33eabd+_0x54bf94(0xb4),_0x54bf94(0xa3)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x33eabd;}if(_0x318067[_0x54bf94(0xb5)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x54bf94(0x97),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x54bf94(0xbe)](_0xd11fbe=>({'name':OFFICIAL_ROUTING_PROFILES[_0xd11fbe][_0x54bf94(0x99)]+'\x20('+_0xd11fbe+')','value':_0xd11fbe}))});}catch(_0x5b8fb1){if(_0x5b8fb1?.[_0x54bf94(0xa7)]==='ExitPromptError')throw CliErrors[_0x54bf94(0xbc)]();throw _0x5b8fb1;}}export async function executeConfigInit(_0x3848fa){const _0x4c0ad5=a24_0x40336f,_0x36cb4f=resolveDomainConfigInput(_0x3848fa),_0x24852e=_0x36cb4f['domains'],_0x4dfbd1=Object[_0x4c0ad5(0xc0)](_0x24852e)[_0x4c0ad5(0x9b)]>0x0||_0x36cb4f['mode']===_0x4c0ad5(0xab);if(_0x4dfbd1&&_0x3848fa[_0x4c0ad5(0x95)](_0x4c0ad5(0xb6)))throw CliErrors[_0x4c0ad5(0xb1)]('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');const _0x162caf={'global':!![]},_0x4ccef7=readScopedConfig(_0x162caf);for(const _0x4ac388 of DOMAIN_CONFIG_FIELDS)delete _0x4ccef7[_0x4ac388];for(const _0x466941 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x4ccef7[_0x466941];delete _0x4ccef7[_0x4c0ad5(0xac)];let _0x31ee23=null;if(_0x4dfbd1)delete _0x4ccef7[_0x4c0ad5(0xb6)],_0x36cb4f[_0x4c0ad5(0x93)]==='enterprise-v1'?_0x4ccef7['routing']={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x36cb4f['manifestDomains']}:Object[_0x4c0ad5(0xa0)](_0x4ccef7,_0x24852e);else{_0x31ee23=await resolveRegion(_0x3848fa);if(_0x31ee23===DEFAULT_LOVRABET_REGION)delete _0x4ccef7[_0x4c0ad5(0xb6)];else _0x4ccef7['region']=_0x31ee23;}return writeScopedConfig(_0x4ccef7,_0x162caf),{'ok':!![],'message':_0x4dfbd1?_0x4c0ad5(0xa2)+Object[_0x4c0ad5(0xc0)](_0x36cb4f[_0x4c0ad5(0x93)]==='enterprise-v1'?_0x36cb4f['manifestDomains']:_0x24852e)['join'](',\x20')+'.':_0x4c0ad5(0xa1)+_0x31ee23+'.','data':{'mode':_0x4dfbd1?_0x4c0ad5(0x9d):_0x4c0ad5(0x9f),'protocol':_0x36cb4f[_0x4c0ad5(0x93)]===_0x4c0ad5(0xab)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x31ee23,'domains':_0x24852e}};}export const configInitDefinition={'service':a24_0x40336f(0xc2),'command':'init','description':a24_0x40336f(0xba),'risk':a24_0x40336f(0xb2),'confirmationDescription':a24_0x40336f(0xbf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};function a24_0x517f(){const _0x3e0c78=['961848ZMvSiF','7648498mIzkdj','enterprise-v1','routing','Custom\x20platform\x20API\x20HTTPS\x20origin','63sZubbf','join','string','validation','write','kb-service-domain','\x22\x20is\x20not\x20currently\x20available.','nonInteractive','region','6OtlWmr','skill-domain','Custom\x20Harness\x20HTTPS\x20origin','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','runtime-domain','cancelled','18unhqfZ','map','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','keys','1476750wIbXmH','config','Region\x20\x22','mode','Independent-deployment\x20Domain\x20JSON\x20file','str','Custom\x20SkillHub\x20HTTPS\x20origin','Select\x20Lovrabet\x20region','4mVIKWB','label','Official\x20Lovrabet\x20region:\x20','length','102417QQkOMq','independent','380856FJgGEc','official','assign','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Available\x20regions:\x20','1345585fLkRBZ','Custom\x20User\x20HTTPS\x20origin','3787870VYCrPq','name','Custom\x20KB\x20Service\x20HTTPS\x20origin'];a24_0x517f=function(){return _0x3e0c78;};return a24_0x517f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18e454,_0x361a5f){var _0x1c24ca=a25_0x32f4,_0xa4d63b=_0x18e454();while(!![]){try{var _0x15f186=parseInt(_0x1c24ca(0xfa))/0x1*(parseInt(_0x1c24ca(0xfd))/0x2)+parseInt(_0x1c24ca(0xfe))/0x3*(parseInt(_0x1c24ca(0xfc))/0x4)+-parseInt(_0x1c24ca(0xff))/0x5*(parseInt(_0x1c24ca(0x100))/0x6)+parseInt(_0x1c24ca(0xf8))/0x7*(-parseInt(_0x1c24ca(0xfb))/0x8)+parseInt(_0x1c24ca(0xf6))/0x9+parseInt(_0x1c24ca(0xf5))/0xa*(parseInt(_0x1c24ca(0xf9))/0xb)+-parseInt(_0x1c24ca(0xf7))/0xc;if(_0x15f186===_0x361a5f)break;else _0xa4d63b['push'](_0xa4d63b['shift']());}catch(_0x4276f7){_0xa4d63b['push'](_0xa4d63b['shift']());}}}(a25_0x3e1e,0xa998a));function a25_0x3e1e(){var _0x37cdb4=['4918zNRmlu','3952635VGDPsR','57295Irnyyn','6rvVXcG','2297830xqemch','1234242hXpJCO','13060536RSiiJh','14yEdrtE','55NTkehi','223Byhzju','5429808FTfHNp','4TYaUhO'];a25_0x3e1e=function(){return _0x37cdb4;};return a25_0x3e1e();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a25_0x32f4(_0x51fd3d,_0x44eaa3){_0x51fd3d=_0x51fd3d-0xf5;var _0x3e1ec9=a25_0x3e1e();var _0x32f4d6=_0x3e1ec9[_0x51fd3d];return _0x32f4d6;}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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a26_0x36da7e=a26_0x507c;(function(_0x30665e,_0x3de84f){const _0x969469=a26_0x507c,_0x2ee3d0=_0x30665e();while(!![]){try{const _0x51f7ee=-parseInt(_0x969469(0x169))/0x1*(-parseInt(_0x969469(0x131))/0x2)+-parseInt(_0x969469(0x165))/0x3*(-parseInt(_0x969469(0x17e))/0x4)+parseInt(_0x969469(0x12e))/0x5+-parseInt(_0x969469(0x177))/0x6+parseInt(_0x969469(0x139))/0x7*(-parseInt(_0x969469(0x176))/0x8)+parseInt(_0x969469(0x16b))/0x9+-parseInt(_0x969469(0x14e))/0xa*(parseInt(_0x969469(0x148))/0xb);if(_0x51f7ee===_0x3de84f)break;else _0x2ee3d0['push'](_0x2ee3d0['shift']());}catch(_0x20af2d){_0x2ee3d0['push'](_0x2ee3d0['shift']());}}}(a26_0x3b7e,0xdcf82));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';function a26_0x507c(_0x4e9592,_0x1a7168){_0x4e9592=_0x4e9592-0x12d;const _0x3b7e00=a26_0x3b7e();let _0x507c07=_0x3b7e00[_0x4e9592];return _0x507c07;}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 input(_0x56982e){const _0x4cd4b6=a26_0x507c,_0x266456=_0x56982e['str'](_0x4cd4b6(0x14d)),_0x3c842e=_0x56982e['str'](_0x4cd4b6(0x13e));if(!_0x266456||!_0x3c842e)throw CliErrors[_0x4cd4b6(0x13b)](_0x4cd4b6(0x13f));const _0x525787=_0x56982e['num'](_0x4cd4b6(0x175),0x1),_0x18dde0=_0x56982e[_0x4cd4b6(0x15e)](_0x4cd4b6(0x13c),0x1f4);if(!Number['isInteger'](_0x525787)||_0x525787<0x1||!Number[_0x4cd4b6(0x156)](_0x18dde0)||_0x18dde0<0x1||_0x18dde0>0x1f4)throw CliErrors['validation'](_0x4cd4b6(0x136));const _0x55db3d=resolve(_0x56982e[_0x4cd4b6(0x16c)]('checkpoint')||_0x266456+_0x4cd4b6(0x178)),_0x9863=resolve(_0x56982e[_0x4cd4b6(0x16c)](_0x4cd4b6(0x172))||_0x266456+_0x4cd4b6(0x174)),_0x2639f7=[resolve(_0x266456),resolve(_0x3c842e),_0x55db3d,_0x9863];if(new Set(_0x2639f7)['size']!==_0x2639f7[_0x4cd4b6(0x14c)])throw CliErrors[_0x4cd4b6(0x13b)]('Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.');return{'file':resolve(_0x266456),'mappingFile':resolve(_0x3c842e),'headerRow':_0x525787,'batchSize':_0x18dde0,'checkpoint':_0x55db3d,'report':_0x9863,'sheet':_0x56982e[_0x4cd4b6(0x16c)]('sheet')||undefined,'resume':_0x56982e['bool'](_0x4cd4b6(0x152))};}async function prepare(_0x5de7d8){const _0x19e046=a26_0x507c,_0x414c96=input(_0x5de7d8),_0x27824d=_0x5de7d8['str']('code');[_0x414c96['file'],_0x414c96[_0x19e046(0x133)],_0x414c96['checkpoint'],_0x414c96[_0x19e046(0x172)]]=await Promise[_0x19e046(0x17c)]([realpath(_0x414c96[_0x19e046(0x14d)]),realpath(_0x414c96['mappingFile']),resolveImportOutputPath(_0x414c96[_0x19e046(0x157)]),resolveImportOutputPath(_0x414c96[_0x19e046(0x172)])]),assertImportPaths(_0x414c96[_0x19e046(0x157)],_0x414c96[_0x19e046(0x172)],[_0x414c96['file'],_0x414c96[_0x19e046(0x133)]]);let _0x3ad60d;const _0x3bbbae=await readFile(_0x414c96[_0x19e046(0x133)]);if(_0x3bbbae[_0x19e046(0x14c)]>0x400*0x400)throw CliErrors['validation']('Mapping\x20file\x20exceeds\x201\x20MB.');try{_0x3ad60d=JSON['parse'](_0x3bbbae[_0x19e046(0x181)](_0x19e046(0x15a)));}catch{throw CliErrors[_0x19e046(0x13b)]('Mapping\x20file\x20must\x20contain\x20valid\x20JSON.');}if(!_0x3ad60d||typeof _0x3ad60d!==_0x19e046(0x142)||Array['isArray'](_0x3ad60d)||Object[_0x19e046(0x13a)](_0x3ad60d)[_0x19e046(0x173)](_0x103e3a=>typeof _0x103e3a!==_0x19e046(0x145)))throw CliErrors[_0x19e046(0x13b)](_0x19e046(0x159));const _0x591ddd=await getDatasetDetail(_0x27824d),_0x46a24a=assertDatasetImportTarget(_0x591ddd,_0x5de7d8[_0x19e046(0x179)],_0x27824d);if(_0x46a24a===_0x19e046(0x134))throw CliErrors['validation'](_0x19e046(0x16d),'Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x27824d+_0x19e046(0x17d)+_0x5de7d8[_0x19e046(0x179)]+_0x19e046(0x164)+_0x27824d+_0x19e046(0x171));if(_0x46a24a!==_0x19e046(0x167))throw CliErrors[_0x19e046(0x13b)](_0x19e046(0x155),_0x19e046(0x14b));const _0x27f4dd=await buildExcelManifest({..._0x414c96,'mapping':_0x3ad60d,'fields':normalizeImportFields(_0x591ddd)}),_0x4239d2=await getDatasetImportContract(_0x5de7d8['appCode'],_0x27824d);assertImportContract(_0x4239d2,_0x5de7d8['appCode'],_0x27824d),assertImageImportCapability(_0x4239d2,_0x27f4dd);if(_0x27f4dd[_0x19e046(0x138)]?.[_0x19e046(0x14c)]){const _0x5b0d6b=await resolveImportOutputPath(_0x414c96['checkpoint']+'.rows.json'),_0x2edfba=await Promise['all']([_0x5b0d6b,_0x5b0d6b+_0x19e046(0x147),_0x5b0d6b+_0x19e046(0x141),_0x414c96[_0x19e046(0x157)]+_0x19e046(0x147),_0x414c96['checkpoint']+'.lock.recovery'][_0x19e046(0x14a)](resolveImportOutputPath));assertImportPaths(_0x414c96['checkpoint'],_0x414c96[_0x19e046(0x172)],[_0x414c96[_0x19e046(0x14d)],_0x414c96[_0x19e046(0x133)],..._0x2edfba[_0x19e046(0x13d)](0x0,0x3)]);}if(_0x414c96[_0x19e046(0x16e)]>_0x4239d2[_0x19e046(0x12f)])throw CliErrors['validation'](_0x19e046(0x137));return{'args':_0x414c96,'manifest':_0x27f4dd,'contract':_0x4239d2,'code':_0x27824d};}async function checked(_0x12e3f1){const _0x170e5d=a26_0x507c;try{return await _0x12e3f1();}catch(_0x154929){if(_0x154929 instanceof CliError)throw _0x154929;throw CliErrors[_0x170e5d(0x13b)](_0x154929[_0x170e5d(0x160)]||'Excel\x20import\x20failed.');}}function a26_0x3b7e(){const _0x349a03=['imageCells','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','num','emptyRows','message','See\x20','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','errors','\x20--code\x20','3bCBVSh','warnings','METADATA','/import-batch','27880DjJxqd','import-excel','11538585MsSGLp','str','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','batchSize','sheet','Excel\x20contains\x20','\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.','report','some','.import-report.json','header-row','369336yqhHXt','8160030takDUO','.import-checkpoint.json','appCode','rows','size','all','.\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','5726148GpNIaj','Imported\x20and\x20verified\x20','boolean','toString','schemaVersion','reduce','177415QMCofZ','maxBatchSize','/client/','106RPUIqY','Maximum\x20records\x20per\x20request\x20(1..500)','mappingFile','DB_TABLE','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','imageFields','231MXxqzl','values','validation','batch-size','slice','mapping','--file\x20and\x20--mapping\x20are\x20required.','write','.lock.recovery','object','hashes','POST','string','\x20records.','.lock','4819309lVKYGB','max','map','Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','length','file','10HwKkyc','rowNumber','number','schemaFingerprint','resume','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','media','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','isInteger','checkpoint','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','utf8','1-based\x20Excel\x20header\x20row'];a26_0x3b7e=function(){return _0x349a03;};return a26_0x3b7e();}export const dataImportExcel={'service':'data','command':a26_0x36da7e(0x16a),'risk':a26_0x36da7e(0x140),'description':'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.','confirmationDescription':'Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','flags':[CODE_FLAG,{'name':'file','type':'string','required':!![],'description':'Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)'},{'name':a26_0x36da7e(0x13e),'type':a26_0x36da7e(0x145),'required':!![],'description':a26_0x36da7e(0x15d)},{'name':a26_0x36da7e(0x16f),'type':a26_0x36da7e(0x145),'description':a26_0x36da7e(0x135)},{'name':a26_0x36da7e(0x175),'type':a26_0x36da7e(0x150),'default':0x1,'description':a26_0x36da7e(0x15b)},{'name':'batch-size','type':a26_0x36da7e(0x150),'default':0x1f4,'description':a26_0x36da7e(0x132)},{'name':a26_0x36da7e(0x157),'type':a26_0x36da7e(0x145),'description':'Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)'},{'name':'report','type':a26_0x36da7e(0x145),'description':a26_0x36da7e(0x153)},{'name':'resume','type':a26_0x36da7e(0x180),'description':'Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping'}],'validate':async _0x4ff058=>{input(_0x4ff058);},'dryRun':async _0x2309e5=>checked(async()=>{const _0x505f65=a26_0x36da7e,{args:_0x281755,manifest:_0x19e798,contract:_0x59d901,code:_0x3fd158}=await prepare(_0x2309e5),_0x5574c2=new Set(_0x19e798[_0x505f65(0x163)][_0x505f65(0x14a)](_0x2582b2=>_0x2582b2[_0x505f65(0x14f)]))['size'];return{'method':_0x505f65(0x144),'url':_0x505f65(0x130)+encodeURIComponent(_0x2309e5[_0x505f65(0x179)])+'/'+encodeURIComponent(_0x3fd158)+_0x505f65(0x168),'description':_0x505f65(0x158),'body':{'schemaFingerprint':_0x59d901['schemaFingerprint']},'validRows':Math[_0x505f65(0x149)](0x0,_0x19e798[_0x505f65(0x17a)][_0x505f65(0x14c)]-_0x5574c2),'invalidRows':_0x5574c2,'invalidCells':_0x19e798[_0x505f65(0x163)][_0x505f65(0x14c)],'emptyRows':_0x19e798[_0x505f65(0x15f)]['length'],'expectedBatches':previewImportBatchCount(_0x19e798,_0x59d901,_0x281755['batchSize']),'imageCount':_0x19e798[_0x505f65(0x15c)]?.[_0x505f65(0x12d)]((_0x3b7821,_0x70da08)=>_0x3b7821+_0x70da08[_0x505f65(0x143)]['length'],0x0)??0x0,'uniqueImages':_0x19e798[_0x505f65(0x154)]?.[_0x505f65(0x14c)]??0x0,'uniqueImageBytes':_0x19e798['media']?.[_0x505f65(0x12d)]((_0x3d2a31,_0x5e5a46)=>_0x3d2a31+_0x5e5a46[_0x505f65(0x17b)],0x0)??0x0,'errors':_0x19e798[_0x505f65(0x163)],'warnings':_0x19e798[_0x505f65(0x166)],'sheet':_0x19e798[_0x505f65(0x16f)],'checkpoint':_0x281755[_0x505f65(0x157)],'report':_0x281755[_0x505f65(0x172)]};}),'execute':async _0x37dd43=>checked(async()=>{const _0x3e734e=a26_0x36da7e,{args:_0x5cd364,manifest:_0x16b856,contract:_0x24ab1a,code:_0xf34eca}=await prepare(_0x37dd43);if(_0x16b856[_0x3e734e(0x163)][_0x3e734e(0x14c)]){await saveImportJson(_0x5cd364[_0x3e734e(0x172)],{'status':'invalid','sourceRows':_0x16b856[_0x3e734e(0x17a)][_0x3e734e(0x14c)],'errors':_0x16b856[_0x3e734e(0x163)],'emptyRows':_0x16b856[_0x3e734e(0x15f)],'warnings':_0x16b856['warnings']});throw CliErrors[_0x3e734e(0x13b)](_0x3e734e(0x170)+_0x16b856['errors'][_0x3e734e(0x14c)]+_0x3e734e(0x162),_0x3e734e(0x161)+_0x5cd364['report']+'.');}const _0x2abc16=_0x16b856[_0x3e734e(0x138)]?.[_0x3e734e(0x14c)]?runImageExcelImport:_0x24ab1a[_0x3e734e(0x182)]===0x2?runAutoIdExcelImport:runExcelImport,_0x4cec5e=await _0x2abc16({..._0x5cd364,'manifest':_0x16b856,'contract':_0x24ab1a,'appCode':_0x37dd43[_0x3e734e(0x179)],'datasetCode':_0xf34eca,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x5cd364[_0x3e734e(0x14d)],_0x5cd364[_0x3e734e(0x133)]],'imageApi':{'upload':(_0x2e8ab2,_0x1e7962)=>uploadDatasetImportImage(_0x37dd43[_0x3e734e(0x179)],_0xf34eca,_0x2e8ab2,_0x1e7962),'readback':(_0x3c62f6,_0x181e12)=>readDatasetImportImage(_0x37dd43['appCode'],_0xf34eca,_0x3c62f6,_0x181e12)},'api':{'write':(_0xf02b0f,_0x16c73e)=>createDatasetImportBatch(_0x37dd43['appCode'],_0xf34eca,{'schemaFingerprint':_0x24ab1a[_0x3e734e(0x151)],'items':_0xf02b0f,..._0x16c73e===undefined?{}:{'taskId':_0x16c73e}}),'readback':_0x7a9283=>readDatasetImportRows(_0x37dd43[_0x3e734e(0x179)],_0xf34eca,_0x7a9283),'readTask':_0x39b132=>readDatasetImportTaskRows(_0x37dd43['appCode'],_0xf34eca,_0x39b132)}});return{'ok':!![],'data':_0x4cec5e,'message':_0x3e734e(0x17f)+_0x4cec5e['succeeded']+_0x3e734e(0x146)};})};
|
|
1
|
+
const a26_0x4010fc=a26_0x2344;(function(_0xbd0ac6,_0xe3c864){const _0x4418b4=a26_0x2344,_0x566699=_0xbd0ac6();while(!![]){try{const _0x278ecd=-parseInt(_0x4418b4(0x9d))/0x1*(parseInt(_0x4418b4(0xcb))/0x2)+parseInt(_0x4418b4(0x9a))/0x3*(-parseInt(_0x4418b4(0xbc))/0x4)+-parseInt(_0x4418b4(0xb1))/0x5*(parseInt(_0x4418b4(0xce))/0x6)+parseInt(_0x4418b4(0xc8))/0x7*(-parseInt(_0x4418b4(0x9c))/0x8)+-parseInt(_0x4418b4(0xb8))/0x9+parseInt(_0x4418b4(0xcf))/0xa*(-parseInt(_0x4418b4(0x9e))/0xb)+parseInt(_0x4418b4(0x8b))/0xc;if(_0x278ecd===_0xe3c864)break;else _0x566699['push'](_0x566699['shift']());}catch(_0x29253e){_0x566699['push'](_0x566699['shift']());}}}(a26_0x48d6,0x6c1d0));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';function a26_0x2344(_0xe60eb0,_0x464087){_0xe60eb0=_0xe60eb0-0x7b;const _0x48d6ea=a26_0x48d6();let _0x234454=_0x48d6ea[_0xe60eb0];return _0x234454;}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_0x48d6(){const _0x1d3210=['boolean','DB_TABLE','12JfxqVq','271780UoHUTl','num','mappingFile','imageCells','str','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','file','import-excel','media','/client/','report','data','schemaVersion','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','batch-size','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','resume','emptyRows','29927460zVfztT','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','/import-batch','header-row','checkpoint','batchSize','\x20records.','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','warnings','number','.lock.recovery','Mapping\x20file\x20exceeds\x201\x20MB.','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','3nxEnQe','string','1416iryOEK','47LiELyK','55zbwKga','--file\x20and\x20--mapping\x20are\x20required.','utf8','reduce','max','size','Maximum\x20records\x20per\x20request\x20(1..500)','mapping','\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.','succeeded','length','METADATA','validation','\x20--code\x20','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','POST','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','129770gCjPYd','bool','1-based\x20Excel\x20header\x20row','.import-checkpoint.json','imageFields','object','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.','6335946RUXHdi','all','errors','sheet','1134096uvBHZP','Excel\x20import\x20failed.','.import-report.json','values','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','message','some','rowNumber','schemaFingerprint','invalid','isInteger','appCode','3703cZQRcn','.lock','parse','33284oXfDan'];a26_0x48d6=function(){return _0x1d3210;};return a26_0x48d6();}import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function input(_0x363c6b){const _0x37358e=a26_0x2344,_0xd6da12=_0x363c6b[_0x37358e(0x7c)](_0x37358e(0x7e)),_0x3fc12f=_0x363c6b[_0x37358e(0x7c)]('mapping');if(!_0xd6da12||!_0x3fc12f)throw CliErrors[_0x37358e(0xaa)](_0x37358e(0x9f));const _0x416519=_0x363c6b[_0x37358e(0xd0)](_0x37358e(0x8f),0x1),_0x1cd3ca=_0x363c6b[_0x37358e(0xd0)]('batch-size',0x1f4);if(!Number[_0x37358e(0xc6)](_0x416519)||_0x416519<0x1||!Number[_0x37358e(0xc6)](_0x1cd3ca)||_0x1cd3ca<0x1||_0x1cd3ca>0x1f4)throw CliErrors[_0x37358e(0xaa)](_0x37358e(0x7d));const _0x52bcad=resolve(_0x363c6b[_0x37358e(0x7c)](_0x37358e(0x90))||_0xd6da12+_0x37358e(0xb4)),_0x669460=resolve(_0x363c6b[_0x37358e(0x7c)]('report')||_0xd6da12+_0x37358e(0xbe)),_0x158faa=[resolve(_0xd6da12),resolve(_0x3fc12f),_0x52bcad,_0x669460];if(new Set(_0x158faa)[_0x37358e(0xa3)]!==_0x158faa[_0x37358e(0xa8)])throw CliErrors[_0x37358e(0xaa)](_0x37358e(0xac));return{'file':resolve(_0xd6da12),'mappingFile':resolve(_0x3fc12f),'headerRow':_0x416519,'batchSize':_0x1cd3ca,'checkpoint':_0x52bcad,'report':_0x669460,'sheet':_0x363c6b[_0x37358e(0x7c)]('sheet')||undefined,'resume':_0x363c6b[_0x37358e(0xb2)]('resume')};}async function prepare(_0x52235a){const _0xb47048=a26_0x2344,_0x54471c=input(_0x52235a),_0x266686=_0x52235a['str']('code');[_0x54471c[_0xb47048(0x7e)],_0x54471c[_0xb47048(0xd1)],_0x54471c['checkpoint'],_0x54471c['report']]=await Promise[_0xb47048(0xb9)]([realpath(_0x54471c[_0xb47048(0x7e)]),realpath(_0x54471c['mappingFile']),resolveImportOutputPath(_0x54471c[_0xb47048(0x90)]),resolveImportOutputPath(_0x54471c[_0xb47048(0x82)])]),assertImportPaths(_0x54471c[_0xb47048(0x90)],_0x54471c[_0xb47048(0x82)],[_0x54471c[_0xb47048(0x7e)],_0x54471c[_0xb47048(0xd1)]]);let _0x469efd;const _0x1d2f5c=await readFile(_0x54471c['mappingFile']);if(_0x1d2f5c['length']>0x400*0x400)throw CliErrors['validation'](_0xb47048(0x98));try{_0x469efd=JSON[_0xb47048(0xca)](_0x1d2f5c['toString'](_0xb47048(0xa0)));}catch{throw CliErrors[_0xb47048(0xaa)]('Mapping\x20file\x20must\x20contain\x20valid\x20JSON.');}if(!_0x469efd||typeof _0x469efd!==_0xb47048(0xb6)||Array['isArray'](_0x469efd)||Object[_0xb47048(0xbf)](_0x469efd)[_0xb47048(0xc2)](_0x5cda05=>typeof _0x5cda05!=='string'))throw CliErrors[_0xb47048(0xaa)](_0xb47048(0x94));const _0x15ce35=await getDatasetDetail(_0x266686),_0x310cd1=assertDatasetImportTarget(_0x15ce35,_0x52235a[_0xb47048(0xc7)],_0x266686);if(_0x310cd1===_0xb47048(0xcd))throw CliErrors[_0xb47048(0xaa)](_0xb47048(0xaf),'Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x266686+'.\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'+_0x52235a[_0xb47048(0xc7)]+_0xb47048(0xab)+_0x266686+_0xb47048(0xa6));if(_0x310cd1!==_0xb47048(0xa9))throw CliErrors[_0xb47048(0xaa)](_0xb47048(0x93),'Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.');const _0x4a8a05=await buildExcelManifest({..._0x54471c,'mapping':_0x469efd,'fields':normalizeImportFields(_0x15ce35)}),_0x79551a=await getDatasetImportContract(_0x52235a['appCode'],_0x266686);assertImportContract(_0x79551a,_0x52235a[_0xb47048(0xc7)],_0x266686),assertImageImportCapability(_0x79551a,_0x4a8a05);if(_0x4a8a05[_0xb47048(0xb5)]?.[_0xb47048(0xa8)]){const _0x2d16c3=await resolveImportOutputPath(_0x54471c['checkpoint']+'.rows.json'),_0x4f4f3b=await Promise[_0xb47048(0xb9)]([_0x2d16c3,_0x2d16c3+_0xb47048(0xc9),_0x2d16c3+'.lock.recovery',_0x54471c[_0xb47048(0x90)]+_0xb47048(0xc9),_0x54471c[_0xb47048(0x90)]+_0xb47048(0x97)]['map'](resolveImportOutputPath));assertImportPaths(_0x54471c[_0xb47048(0x90)],_0x54471c[_0xb47048(0x82)],[_0x54471c[_0xb47048(0x7e)],_0x54471c[_0xb47048(0xd1)],..._0x4f4f3b['slice'](0x0,0x3)]);}if(_0x54471c[_0xb47048(0x91)]>_0x79551a['maxBatchSize'])throw CliErrors[_0xb47048(0xaa)](_0xb47048(0x8d));return{'args':_0x54471c,'manifest':_0x4a8a05,'contract':_0x79551a,'code':_0x266686};}async function checked(_0x1ed7d5){const _0xa98c8=a26_0x2344;try{return await _0x1ed7d5();}catch(_0x5c8c24){if(_0x5c8c24 instanceof CliError)throw _0x5c8c24;throw CliErrors['validation'](_0x5c8c24[_0xa98c8(0xc1)]||_0xa98c8(0xbd));}}export const dataImportExcel={'service':a26_0x4010fc(0x83),'command':a26_0x4010fc(0x7f),'risk':'write','description':a26_0x4010fc(0xb7),'confirmationDescription':'Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','flags':[CODE_FLAG,{'name':'file','type':a26_0x4010fc(0x9b),'required':!![],'description':a26_0x4010fc(0x99)},{'name':a26_0x4010fc(0xa5),'type':a26_0x4010fc(0x9b),'required':!![],'description':a26_0x4010fc(0x88)},{'name':a26_0x4010fc(0xbb),'type':'string','description':a26_0x4010fc(0xad)},{'name':'header-row','type':a26_0x4010fc(0x96),'default':0x1,'description':a26_0x4010fc(0xb3)},{'name':a26_0x4010fc(0x86),'type':a26_0x4010fc(0x96),'default':0x1f4,'description':a26_0x4010fc(0xa4)},{'name':'checkpoint','type':a26_0x4010fc(0x9b),'description':a26_0x4010fc(0xb0)},{'name':'report','type':'string','description':a26_0x4010fc(0x85)},{'name':a26_0x4010fc(0x89),'type':a26_0x4010fc(0xcc),'description':a26_0x4010fc(0x8c)}],'validate':async _0x1729bf=>{input(_0x1729bf);},'dryRun':async _0x3ecac2=>checked(async()=>{const _0x108a12=a26_0x4010fc,{args:_0x3027ee,manifest:_0x22e297,contract:_0x96ae60,code:_0x20f7e1}=await prepare(_0x3ecac2),_0x584659=new Set(_0x22e297[_0x108a12(0xba)]['map'](_0x5be918=>_0x5be918[_0x108a12(0xc3)]))[_0x108a12(0xa3)];return{'method':_0x108a12(0xae),'url':_0x108a12(0x81)+encodeURIComponent(_0x3ecac2['appCode'])+'/'+encodeURIComponent(_0x20f7e1)+_0x108a12(0x8e),'description':_0x108a12(0x87),'body':{'schemaFingerprint':_0x96ae60[_0x108a12(0xc4)]},'validRows':Math[_0x108a12(0xa2)](0x0,_0x22e297['rows']['length']-_0x584659),'invalidRows':_0x584659,'invalidCells':_0x22e297[_0x108a12(0xba)]['length'],'emptyRows':_0x22e297[_0x108a12(0x8a)][_0x108a12(0xa8)],'expectedBatches':previewImportBatchCount(_0x22e297,_0x96ae60,_0x3027ee[_0x108a12(0x91)]),'imageCount':_0x22e297[_0x108a12(0x7b)]?.[_0x108a12(0xa1)]((_0x41bb43,_0x157120)=>_0x41bb43+_0x157120['hashes'][_0x108a12(0xa8)],0x0)??0x0,'uniqueImages':_0x22e297[_0x108a12(0x80)]?.[_0x108a12(0xa8)]??0x0,'uniqueImageBytes':_0x22e297[_0x108a12(0x80)]?.[_0x108a12(0xa1)]((_0x1495a4,_0x565b91)=>_0x1495a4+_0x565b91[_0x108a12(0xa3)],0x0)??0x0,'errors':_0x22e297[_0x108a12(0xba)],'warnings':_0x22e297[_0x108a12(0x95)],'sheet':_0x22e297['sheet'],'checkpoint':_0x3027ee[_0x108a12(0x90)],'report':_0x3027ee[_0x108a12(0x82)]};}),'execute':async _0x31c6a1=>checked(async()=>{const _0xbed5a7=a26_0x4010fc,{args:_0xadfa79,manifest:_0x28ba14,contract:_0x428e3d,code:_0x2b39cf}=await prepare(_0x31c6a1);if(_0x28ba14[_0xbed5a7(0xba)][_0xbed5a7(0xa8)]){await saveImportJson(_0xadfa79['report'],{'status':_0xbed5a7(0xc5),'sourceRows':_0x28ba14['rows']['length'],'errors':_0x28ba14[_0xbed5a7(0xba)],'emptyRows':_0x28ba14[_0xbed5a7(0x8a)],'warnings':_0x28ba14['warnings']});throw CliErrors['validation']('Excel\x20contains\x20'+_0x28ba14[_0xbed5a7(0xba)][_0xbed5a7(0xa8)]+_0xbed5a7(0xc0),'See\x20'+_0xadfa79[_0xbed5a7(0x82)]+'.');}const _0x1124a8=_0x28ba14[_0xbed5a7(0xb5)]?.['length']?runImageExcelImport:_0x428e3d[_0xbed5a7(0x84)]===0x2?runAutoIdExcelImport:runExcelImport,_0x3a4b91=await _0x1124a8({..._0xadfa79,'manifest':_0x28ba14,'contract':_0x428e3d,'appCode':_0x31c6a1['appCode'],'datasetCode':_0x2b39cf,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0xadfa79[_0xbed5a7(0x7e)],_0xadfa79[_0xbed5a7(0xd1)]],'imageApi':{'upload':(_0x418adf,_0x2496b6)=>uploadDatasetImportImage(_0x31c6a1[_0xbed5a7(0xc7)],_0x2b39cf,_0x418adf,_0x2496b6),'readback':(_0x43b393,_0x963c38)=>readDatasetImportImage(_0x31c6a1[_0xbed5a7(0xc7)],_0x2b39cf,_0x43b393,_0x963c38)},'api':{'write':(_0x487314,_0x5a2f25)=>createDatasetImportBatch(_0x31c6a1['appCode'],_0x2b39cf,{'schemaFingerprint':_0x428e3d[_0xbed5a7(0xc4)],'items':_0x487314,..._0x5a2f25===undefined?{}:{'taskId':_0x5a2f25}}),'readback':_0x3e4b46=>readDatasetImportRows(_0x31c6a1[_0xbed5a7(0xc7)],_0x2b39cf,_0x3e4b46),'readTask':_0x2df0e9=>readDatasetImportTaskRows(_0x31c6a1[_0xbed5a7(0xc7)],_0x2b39cf,_0x2df0e9)}});return{'ok':!![],'data':_0x3a4b91,'message':'Imported\x20and\x20verified\x20'+_0x3a4b91[_0xbed5a7(0xa7)]+_0xbed5a7(0x92)};})};
|