@lovrabet/lovrabet-cli 2.3.10 → 2.3.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/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 +3 -3
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +50 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
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
|
+
const a13_0x21f73a=a13_0x2f8a;(function(_0x4cb5b1,_0x39bdf3){const _0x1c316b=a13_0x2f8a,_0x281f39=_0x4cb5b1();while(!![]){try{const _0x4ad9a2=parseInt(_0x1c316b(0x14e))/0x1*(-parseInt(_0x1c316b(0x175))/0x2)+-parseInt(_0x1c316b(0x169))/0x3+-parseInt(_0x1c316b(0x12c))/0x4*(parseInt(_0x1c316b(0x13b))/0x5)+parseInt(_0x1c316b(0x144))/0x6+-parseInt(_0x1c316b(0x167))/0x7+parseInt(_0x1c316b(0x179))/0x8+parseInt(_0x1c316b(0x154))/0x9*(parseInt(_0x1c316b(0x172))/0xa);if(_0x4ad9a2===_0x39bdf3)break;else _0x281f39['push'](_0x281f39['shift']());}catch(_0x130231){_0x281f39['push'](_0x281f39['shift']());}}}(a13_0x1de1,0x20920));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a13_0x2f8a(_0x30e915,_0x368152){_0x30e915=_0x30e915-0x124;const _0x1de18c=a13_0x1de1();let _0x2f8abc=_0x1de18c[_0x30e915];return _0x2f8abc;}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';function a13_0x1de1(){const _0x3fcc2d=['Use\x20`','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','AccessKey:\x20','global\x20config','push','101118XZLtxB','str','access_key','\x20config.\x20Nothing\x20to\x20clear.','Shorthand\x20for\x20--access-key','trim','logout','Device\x20authorization\x20completed.','auth','\x20Verify:\x20','114951PfDaLS','ClientAk','string','Clear\x20from\x20global\x20config\x20(default)','development','write','5679TjOwHM','access-key','project','ACCESS_KEY','(not\x20set)','scope','global','AccessKey\x20cleared\x20from\x20','production','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','userCenterDisplayName','info','test','join','stdin','status','\x20\x20export\x20','authRequired','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','1306417oKugRs','code','51567tmMwHZ','Write\x20to\x20global\x20config\x20(default)','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','bool','Clear\x20the\x20user\x20AccessKey\x20from\x20config','Show\x20current\x20authentication\x20status','yes','newConfigFileName','\x20config.','6550qQsHAC','Option\x20C:\x20environment\x20variable','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','4vSianM','Environment:\x20','success','Tip:\x20you\x20can\x20also\x20run:','1161416eDHzrT','Read\x20from\x20global\x20config\x20(default)','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','envName','Status:\x20configured\x20(not\x20remotely\x20verified)','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','Auth\x20mode:\x20','expired','Option\x20B:\x20apps\x20config\x20(','login','isTTY','env','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','validation','`auth\x20login`\x20does\x20not\x20support\x20--yes.','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','32820maciRr','stdout','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','=ak_xxx','\x20(via\x20','read','accessKeyCreatePath','check','Option\x20A:\x20','boolean','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Then\x20verify\x20with:\x20','accessKey','Invalid\x20accessKey\x20format.','Save\x20the\x20user\x20AccessKey\x20(global\x20by\x20default;\x20--project\x20for\x20project\x20config)','5GfpWyR','nonInteractive','\x20auth\x20status','global-default'];a13_0x1de1=function(){return _0x3fcc2d;};return a13_0x1de1();}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(_0x60c98b=USER_ACCESS_KEY_CREATE_URL){const _0x5792f0=a13_0x2f8a;writeCliSideChannelLine(_0x5792f0(0x140)+PRODUCT_CONFIG[_0x5792f0(0x15e)]+':'),writeCliSideChannelLine('\x0a'+_0x60c98b+'\x0a'),writeCliSideChannelLine(_0x5792f0(0x178)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x5792f0(0x17e));}function buildAccessKeySetupGuide(_0x422c97=USER_ACCESS_KEY_CREATE_URL){const _0xd22a9=a13_0x2f8a;return[_0xd22a9(0x140)+PRODUCT_CONFIG[_0xd22a9(0x15e)]+':',_0x422c97,_0xd22a9(0x166)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0xd22a9(0x161)]('\x0a');}function canPromptForAccessKey(_0x31b320){const _0x2c0ca9=a13_0x2f8a;return!_0x31b320['nonInteractive']&&process[_0x2c0ca9(0x162)][_0x2c0ca9(0x126)]!==![]&&process[_0x2c0ca9(0x12d)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x1224a9){const _0x532e15=a13_0x2f8a;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1224a9[_0x532e15(0x16c)]('global'),'explicitProject':_0x1224a9[_0x532e15(0x16c)](_0x532e15(0x156)),'policy':_0x532e15(0x13e)}));}async function resolveAuthWriteInput(_0xc1d51e){const _0x375b02=a13_0x2f8a;let _0x30f654=(_0xc1d51e[_0x375b02(0x145)](_0x375b02(0x155))||_0xc1d51e[_0x375b02(0x145)]('ak')||'')[_0x375b02(0x149)]();const _0x5c700d=(_0xc1d51e[_0x375b02(0x145)](_0x375b02(0x127))||'')[_0x375b02(0x149)](),_0x21ad66=''+getUserDomain()+PRODUCT_CONFIG[_0x375b02(0x132)];if(!_0x30f654&&canPromptForAccessKey(_0xc1d51e))try{showAccessKeyCreateHint(_0x21ad66),_0x30f654=await promptAccessKey('');}catch(_0x445cb4){if(isAbortPrompt(_0x445cb4))throw CliErrors['cancelled']();throw _0x445cb4;}if(!_0x30f654)throw CliErrors[_0x375b02(0x129)]('Missing\x20accessKey.',buildAccessKeySetupGuide(_0x21ad66));if(!ACCESS_KEY_PATTERN[_0x375b02(0x160)](_0x30f654))throw CliErrors[_0x375b02(0x129)](_0x375b02(0x139),_0x375b02(0x17f));if(!_0x5c700d)return{'accessKey':_0x30f654};const _0x49984e=normalizeEnv(_0x5c700d);return{'accessKey':_0x30f654,'env':isDaily(_0x49984e)?'daily':isDev(_0x49984e)?_0x375b02(0x152):_0x375b02(0x15c)};}export const authDefinitions=[{'service':'auth','command':a13_0x21f73a(0x125),'description':a13_0x21f73a(0x13a),'risk':a13_0x21f73a(0x153),'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':'access-key','type':a13_0x21f73a(0x150),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a13_0x21f73a(0x150),'description':a13_0x21f73a(0x148)},{'name':'global','type':a13_0x21f73a(0x135),'description':a13_0x21f73a(0x16a),'default':!![]},{'name':'project','type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x166bcf){const _0x174764=a13_0x21f73a;if(_0x166bcf[_0x174764(0x16c)](_0x174764(0x16f)))throw CliErrors['validation'](_0x174764(0x12a),_0x174764(0x13f)+CLI_BIN_NAME+_0x174764(0x15d)+CLI_BIN_NAME+_0x174764(0x174));const _0x2c028a=(_0x166bcf['str'](_0x174764(0x155))||_0x166bcf[_0x174764(0x145)]('ak')||'')[_0x174764(0x149)]();if(!_0x2c028a&&_0x166bcf[_0x174764(0x13c)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'])};const _0x24c8b4=await resolveAuthWriteInput(_0x166bcf),_0x3c0b0d=resolveAuthScopeFlags(_0x166bcf),_0x5c2572=readScopedConfig(_0x3c0b0d);_0x5c2572[_0x174764(0x138)]=_0x24c8b4[_0x174764(0x138)];_0x24c8b4[_0x174764(0x127)]&&(_0x5c2572[_0x174764(0x127)]=_0x24c8b4[_0x174764(0x127)]);writeScopedConfig(_0x5c2572,_0x3c0b0d);const _0x32714f=_0x3c0b0d[_0x174764(0x15a)]?'global':'project',_0x5830c3=_0x5c2572[_0x174764(0x127)]?'\x20Current\x20env:\x20'+_0x5c2572[_0x174764(0x127)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x32714f+_0x174764(0x171)+_0x5830c3+_0x174764(0x14d)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a13_0x21f73a(0x14c),'command':a13_0x21f73a(0x14a),'description':a13_0x21f73a(0x16d),'risk':a13_0x21f73a(0x153),'confirmationDescription':'Removes\x20the\x20user\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Credentials\x20in\x20another\x20scope\x20or\x20environment\x20variables\x20are\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x21f73a(0x15a),'type':a13_0x21f73a(0x135),'description':a13_0x21f73a(0x151),'default':!![]},{'name':a13_0x21f73a(0x156),'type':a13_0x21f73a(0x135),'description':a13_0x21f73a(0x17b),'default':![]}],async 'execute'(_0x305802){const _0x1a3273=a13_0x21f73a,_0x23de4d=resolveAuthScopeFlags(_0x305802),_0xbb7bc1=readScopedConfig(_0x23de4d),_0xf6cfba=!!_0xbb7bc1[_0x1a3273(0x138)];delete _0xbb7bc1[_0x1a3273(0x138)],writeScopedConfig(_0xbb7bc1,_0x23de4d);const _0x52e364=_0x23de4d[_0x1a3273(0x15a)]?_0x1a3273(0x15a):_0x1a3273(0x156);if(_0xf6cfba)return{'ok':!![],'message':_0x1a3273(0x15b)+_0x52e364+_0x1a3273(0x171)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x52e364+_0x1a3273(0x147)};}},{'service':a13_0x21f73a(0x14c),'command':a13_0x21f73a(0x163),'description':a13_0x21f73a(0x16e),'risk':a13_0x21f73a(0x131),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x21f73a(0x15a),'type':'boolean','description':a13_0x21f73a(0x17a),'default':!![]},{'name':a13_0x21f73a(0x156),'type':a13_0x21f73a(0x135),'description':a13_0x21f73a(0x136),'default':![]},{'name':a13_0x21f73a(0x133),'type':a13_0x21f73a(0x135),'description':a13_0x21f73a(0x128),'default':![]}],async 'execute'(_0x56e482){const _0x124eab=a13_0x21f73a,_0x1100b1=resolveAuthScopeFlags(_0x56e482),_0x3341e8=readScopedConfig(_0x1100b1),_0x2341d1=productEnvName(_0x124eab(0x157)),_0x29df69=_0x56e482[_0x124eab(0x138)],_0x139117=_0x56e482['accessKeySource'],_0x2b4607=['Auth\x20mode:\x20'+AUTH_MODE[_0x124eab(0x14f)]];if(_0x56e482[_0x124eab(0x17c)]&&!isProduction(_0x56e482[_0x124eab(0x17c)]))_0x2b4607[_0x124eab(0x143)](_0x124eab(0x176)+_0x56e482[_0x124eab(0x17c)]);_0x2b4607['push']('Stored\x20AccessKey\x20('+(_0x1100b1[_0x124eab(0x15a)]?'global':_0x124eab(0x156))+'\x20config):\x20'+(_0x3341e8[_0x124eab(0x138)]?maskCliAccessKey(_0x3341e8[_0x124eab(0x138)]):_0x124eab(0x158)));if(_0x29df69){const _0x1a83bf=maskCliAccessKey(_0x29df69);_0x2b4607['push'](_0x124eab(0x141)+_0x1a83bf+(_0x139117?_0x124eab(0x130)+_0x139117+')':'')),_0x2b4607[_0x124eab(0x143)](_0x124eab(0x17d));}if(!_0x29df69){_0x2b4607[_0x124eab(0x143)](''),_0x2b4607[_0x124eab(0x143)](_0x124eab(0x12b)),_0x2b4607[_0x124eab(0x143)](''),_0x2b4607['push'](_0x124eab(0x134)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x2b4607[_0x124eab(0x143)](''),_0x2b4607['push'](_0x124eab(0x124)+PRODUCT_CONFIG[_0x124eab(0x170)]+')'),_0x2b4607[_0x124eab(0x143)](_0x124eab(0x12e)),_0x2b4607[_0x124eab(0x143)](''),_0x2b4607[_0x124eab(0x143)](_0x124eab(0x173)),_0x2b4607[_0x124eab(0x143)](_0x124eab(0x164)+_0x2341d1+_0x124eab(0x12f)),_0x2b4607[_0x124eab(0x143)](''),_0x2b4607['push'](_0x124eab(0x137)+CLI_BIN_NAME+_0x124eab(0x13d)),_0x2b4607[_0x124eab(0x143)](_0x124eab(0x16b)+CLI_BIN_NAME+'\x20doctor');if(_0x56e482[_0x124eab(0x16c)](_0x124eab(0x133))){const _0xc62904=readStoredDeviceCode();if(_0xc62904&&!isStoredDeviceCodeExpired(_0xc62904)){const _0x2017ba=getUserDomain(),_0x524ed8=await fetchDeviceToken(_0x2017ba,_0xc62904[_0x124eab(0x168)]);if(_0x524ed8['status']===_0x124eab(0x177)&&_0x524ed8[_0x124eab(0x146)]){const _0x570723={'global':_0xc62904[_0x124eab(0x159)]===_0x124eab(0x15a)},_0x1cc9b7=readScopedConfig(_0x570723);_0x1cc9b7[_0x124eab(0x138)]=_0x524ed8[_0x124eab(0x146)],writeScopedConfig(_0x1cc9b7,_0x570723),deleteStoredDeviceCode();const _0x49acb2=_0x524ed8[_0x124eab(0x146)],_0x385d45=maskCliAccessKey(_0x49acb2),_0x2a9da7=_0xc62904['scope']===_0x124eab(0x15a)?_0x124eab(0x142):'project\x20config';return{'ok':!![],'message':[_0x124eab(0x181)+AUTH_MODE[_0x124eab(0x14f)],..._0x56e482[_0x124eab(0x17c)]&&!isProduction(_0x56e482[_0x124eab(0x17c)])?[_0x124eab(0x176)+_0x56e482[_0x124eab(0x17c)]]:[],_0x124eab(0x141)+_0x385d45+_0x124eab(0x130)+_0x2a9da7+')',_0x124eab(0x17d),_0x124eab(0x14b)]['join']('\x0a')};}_0x524ed8['status']===_0x124eab(0x182)&&deleteStoredDeviceCode();throw CliErrors[_0x124eab(0x165)](_0x124eab(0x180));}throw CliErrors['authRequired'](_0x2b4607['join']('\x0a'));}}return{'ok':!![],'message':_0x2b4607[_0x124eab(0x161)]('\x0a')};}},{'service':a13_0x21f73a(0x14c),'command':a13_0x21f73a(0x15f),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xf8f5be){const _0x5e5a12=a13_0x21f73a,_0x582947=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x582947,'meta':{'env':_0xf8f5be[_0x5e5a12(0x17c)]??'production'}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x17d0(){const _0x220cb9=['894etikpI','1039763RaLVPl','2041557hmNHbb','User\x20aborted\x20prompt','AccessKey\x20(paste\x20ak_...):\x20','9LtFeot','604167vrORjE','6YPKIiC','2709910hofDdG','8595272Nvikxt','AccessKey\x20(','close','removeListener','AbortPrompt','once','question','SIGINT','20345mDbViI','):\x20','77tcpBLY','stdin','2114860mMWmXw','race'];a14_0x17d0=function(){return _0x220cb9;};return a14_0x17d0();}(function(_0x415360,_0xf5304b){const _0x2c16aa=a14_0x1dbc,_0x414e39=_0x415360();while(!![]){try{const _0x1b44ec=-parseInt(_0x2c16aa(0xa7))/0x1+-parseInt(_0x2c16aa(0xad))/0x2*(parseInt(_0x2c16aa(0xac))/0x3)+parseInt(_0x2c16aa(0xa4))/0x4+parseInt(_0x2c16aa(0xa0))/0x5*(-parseInt(_0x2c16aa(0xa6))/0x6)+-parseInt(_0x2c16aa(0xa8))/0x7+-parseInt(_0x2c16aa(0xaf))/0x8*(-parseInt(_0x2c16aa(0xab))/0x9)+parseInt(_0x2c16aa(0xae))/0xa*(parseInt(_0x2c16aa(0xa2))/0xb);if(_0x1b44ec===_0xf5304b)break;else _0x414e39['push'](_0x414e39['shift']());}catch(_0x714d27){_0x414e39['push'](_0x414e39['shift']());}}}(a14_0x17d0,0xe9ef7));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x12428b=a14_0x1dbc;super(_0x12428b(0xa9)),this['name']=_0x12428b(0x9c);}}function createSafeRl(){const _0x300721=a14_0x1dbc,_0x22bb7d=createInterface({'input':process[_0x300721(0xa3)],'output':process['stdout']});let _0x23b4dc;const _0x1967d3=new Promise((_0x2d4615,_0xcd49b5)=>{const _0x5e9fc6=_0x300721;_0x23b4dc=()=>{const _0x1df589=a14_0x1dbc;_0x23b4dc&&(_0x22bb7d[_0x1df589(0x9b)](_0x1df589(0x9f),_0x23b4dc),_0x23b4dc=undefined);try{_0x22bb7d[_0x1df589(0xb1)]();}catch{}_0xcd49b5(new AbortPrompt());},_0x22bb7d[_0x5e9fc6(0x9d)]('SIGINT',_0x23b4dc);}),_0x4c9a1d=()=>{const _0x4f5051=_0x300721;_0x23b4dc&&(_0x22bb7d[_0x4f5051(0x9b)](_0x4f5051(0x9f),_0x23b4dc),_0x23b4dc=undefined);try{_0x22bb7d[_0x4f5051(0xb1)]();}catch{}};return{'rl':_0x22bb7d,'abortPromise':_0x1967d3,'disposeSuccess':_0x4c9a1d};}export async function promptAccessKey(_0x2575e0=''){const _0x30c6d7=a14_0x1dbc,{rl:_0x5ef0e6,abortPromise:_0x3a3742,disposeSuccess:_0x4ebb77}=createSafeRl(),_0x4ccd45=new Promise(_0x37c4c8=>{const _0x3fc25a=a14_0x1dbc,_0x5aeac6=_0x2575e0?_0x3fc25a(0xb0)+_0x2575e0+_0x3fc25a(0xa1):_0x3fc25a(0xaa);_0x5ef0e6[_0x3fc25a(0x9e)](_0x5aeac6,_0x416f51=>{_0x4ebb77(),_0x37c4c8(_0x416f51['trim']()||_0x2575e0);});});return Promise[_0x30c6d7(0xa5)]([_0x4ccd45,_0x3a3742]);}function a14_0x1dbc(_0x3b3ddc,_0x3c220c){_0x3b3ddc=_0x3b3ddc-0x9b;const _0x17d0c9=a14_0x17d0();let _0x1dbc83=_0x17d0c9[_0x3b3ddc];return _0x1dbc83;}export function isAbortPrompt(_0x291ec8){const _0x517bcb=a14_0x1dbc;return _0x291ec8 instanceof Error&&_0x291ec8['name']===_0x517bcb(0x9c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x530788=a15_0x5165;function a15_0x5165(_0x28e5f8,_0x290bae){_0x28e5f8=_0x28e5f8-0x8d;const _0x4536f6=a15_0x4536();let _0x51658f=_0x4536f6[_0x28e5f8];return _0x51658f;}(function(_0x92f581,_0x1b3991){const _0xfc9b9=a15_0x5165,_0x48f44d=_0x92f581();while(!![]){try{const _0x269c36=-parseInt(_0xfc9b9(0x95))/0x1+-parseInt(_0xfc9b9(0x98))/0x2+parseInt(_0xfc9b9(0x94))/0x3+parseInt(_0xfc9b9(0x9e))/0x4+parseInt(_0xfc9b9(0x9a))/0x5+-parseInt(_0xfc9b9(0x9b))/0x6+parseInt(_0xfc9b9(0x93))/0x7*(parseInt(_0xfc9b9(0x8d))/0x8);if(_0x269c36===_0x1b3991)break;else _0x48f44d['push'](_0x48f44d['shift']());}catch(_0x4cf914){_0x48f44d['push'](_0x48f44d['shift']());}}}(a15_0x4536,0xeebfe));import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x530788(0x97),'command':'detail','description':a15_0x530788(0x9c),'risk':a15_0x530788(0x8e),'flags':[{...NAME_FLAG,'required':!![],'description':'Backend\x20Function\x20name'}],async 'execute'(_0x4d83e2){const _0x31dcd2=a15_0x530788,_0x4271e3=await getBffEndpointContract(_0x4d83e2['appCode'],_0x4d83e2[_0x31dcd2(0x99)](_0x31dcd2(0x90)));return{'ok':!![],'data':{'appCode':_0x4271e3[_0x31dcd2(0x9d)],'functionName':_0x4271e3[_0x31dcd2(0x91)],'description':_0x4271e3[_0x31dcd2(0x8f)]||_0x31dcd2(0x96),'version':_0x4271e3[_0x31dcd2(0x9f)],'gmtModified':_0x4271e3[_0x31dcd2(0x92)]}};}};function a15_0x4536(){const _0x5f11f6=['name','functionName','gmtModified','11932802UTlVdO','2194530GNhOEh','1369010fdHCWE','(none)','bff','1158074JZZTcQ','str','2855240avGneX','6972588HhTjyn','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','appCode','4323276zmYICN','version','8yEvxDf','read','description'];a15_0x4536=function(){return _0x5f11f6;};return a15_0x4536();}
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a16_0x1e55(_0x1a5e1b,_0x2feb70){_0x1a5e1b=_0x1a5e1b-0xe1;const _0x21e0c6=a16_0x21e0();let _0x1e5567=_0x21e0c6[_0x1a5e1b];return _0x1e5567;}const a16_0x3fecfa=a16_0x1e55;function a16_0x21e0(){const _0x5d5d85=['125rKRHTk','21CwCrnQ','10978692BAVMcQ','17140mKlrlg','1098tSfwhP','now','4104oMhSvA','33VsfpFH','str','3860Qsjnok','14556NcYZsd','Backend\x20Function\x20name\x20to\x20execute','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','946VIvDqN','read','name','1865673gtJetQ','33560HwRVnC','bff'];a16_0x21e0=function(){return _0x5d5d85;};return a16_0x21e0();}(function(_0x40d840,_0x12d558){const _0x231d6f=a16_0x1e55,_0x8ac854=_0x40d840();while(!![]){try{const _0x2fb439=parseInt(_0x231d6f(0xef))/0x1*(parseInt(_0x231d6f(0xee))/0x2)+parseInt(_0x231d6f(0xec))/0x3*(-parseInt(_0x231d6f(0xf1))/0x4)+parseInt(_0x231d6f(0xe8))/0x5*(-parseInt(_0x231d6f(0xf2))/0x6)+-parseInt(_0x231d6f(0xe9))/0x7*(parseInt(_0x231d6f(0xe6))/0x8)+-parseInt(_0x231d6f(0xe5))/0x9+-parseInt(_0x231d6f(0xeb))/0xa*(parseInt(_0x231d6f(0xe2))/0xb)+parseInt(_0x231d6f(0xea))/0xc;if(_0x2fb439===_0x12d558)break;else _0x8ac854['push'](_0x8ac854['shift']());}catch(_0x2b7f75){_0x8ac854['push'](_0x8ac854['shift']());}}}(a16_0x21e0,0x31309));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_0x3fecfa(0xe7),'command':'exec','description':a16_0x3fecfa(0xe1),'risk':a16_0x3fecfa(0xe3),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x3fecfa(0xf3)},PARAMS_FLAG],async 'execute'(_0x3a5f48){const _0x3c3624=a16_0x3fecfa,_0x4ba19a=parseJsonParams(_0x3a5f48[_0x3c3624(0xf0)]('params')),_0x434803=Date['now'](),_0x4cfd06=await executeSdkBff(_0x3a5f48[_0x3c3624(0xf0)](_0x3c3624(0xe4)),_0x4ba19a),_0x482b16=Date[_0x3c3624(0xed)]()-_0x434803;return{'ok':!![],'data':{'result':_0x4cfd06,'elapsed':_0x482b16},'message':'Backend\x20Function\x20executed\x20in\x20'+_0x482b16+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52be03,_0x1a6aac){const _0x2e3120=a17_0x45da,_0x47fd03=_0x52be03();while(!![]){try{const _0x288d64=parseInt(_0x2e3120(0xed))/0x1*(-parseInt(_0x2e3120(0xf2))/0x2)+-parseInt(_0x2e3120(0xf0))/0x3*(-parseInt(_0x2e3120(0xf3))/0x4)+parseInt(_0x2e3120(0xec))/0x5+parseInt(_0x2e3120(0xf4))/0x6+-parseInt(_0x2e3120(0xeb))/0x7*(-parseInt(_0x2e3120(0xf1))/0x8)+parseInt(_0x2e3120(0xee))/0x9+parseInt(_0x2e3120(0xef))/0xa*(-parseInt(_0x2e3120(0xf5))/0xb);if(_0x288d64===_0x1a6aac)break;else _0x47fd03['push'](_0x47fd03['shift']());}catch(_0x550217){_0x47fd03['push'](_0x47fd03['shift']());}}}(a17_0x2025,0xd01f0));function a17_0x45da(_0x54a0e4,_0x4a1390){_0x54a0e4=_0x54a0e4-0xeb;const _0x202549=a17_0x2025();let _0x45dacf=_0x202549[_0x54a0e4];return _0x45dacf;}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];function a17_0x2025(){const _0x2883b5=['1900764JxzsxY','2204890dxOtFQ','3VNtaGu','8DHNHBA','15898NMklFe','1747172kGWuvf','3376860egXbHU','77jwDWjW','531447PpznBy','5863795mbacGn','8XRwuws'];a17_0x2025=function(){return _0x2883b5;};return a17_0x2025();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a18_0x2dfe(){const _0x1cdae6=['skillVersion','593382MumXEd','8839568VdUQea','error','39353490lAxycg','nonInteractive','repairCommand','1521768VAEEeN','pipe','install','installedPath','cwd','2162055BBZyQH','\x20installed','info','INSTALL_FAILED','\x20is\x20already\x20current','2025606KjShYw','changed','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','setLogPath',']:\x20','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','88068zCKoSz','inherit','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','45mAViLy','log','85zvCvgN'];a18_0x2dfe=function(){return _0x1cdae6;};return a18_0x2dfe();}function a18_0xd310(_0x4e4bb7,_0x12dda5){_0x4e4bb7=_0x4e4bb7-0x16c;const _0x2dfede=a18_0x2dfe();let _0xd31098=_0x2dfede[_0x4e4bb7];return _0xd31098;}const a18_0x2c33ab=a18_0xd310;(function(_0xfd98e3,_0x4a125d){const _0x3c7551=a18_0xd310,_0x4bdd2a=_0xfd98e3();while(!![]){try{const _0x5853cd=parseInt(_0x3c7551(0x183))/0x1*(parseInt(_0x3c7551(0x180))/0x2)+parseInt(_0x3c7551(0x17a))/0x3+-parseInt(_0x3c7551(0x170))/0x4+-parseInt(_0x3c7551(0x185))/0x5*(-parseInt(_0x3c7551(0x187))/0x6)+parseInt(_0x3c7551(0x175))/0x7+parseInt(_0x3c7551(0x188))/0x8+-parseInt(_0x3c7551(0x16d))/0x9;if(_0x5853cd===_0x4a125d)break;else _0x4bdd2a['push'](_0x4bdd2a['shift']());}catch(_0x5e2316){_0x4bdd2a['push'](_0x4bdd2a['shift']());}}}(a18_0x2dfe,0xf3d54));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a18_0x2c33ab(0x172),'description':a18_0x2c33ab(0x17f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x9859ec){const _0x1b07ed=a18_0x2c33ab;logger[_0x1b07ed(0x17d)](process[_0x1b07ed(0x174)]()),logger[_0x1b07ed(0x177)]('cli-skill-install',_0x1b07ed(0x17c));const _0x354d8d=installBuiltinSkill({'stdio':_0x9859ec[_0x1b07ed(0x16e)]?_0x1b07ed(0x171):_0x1b07ed(0x181)});if(!_0x354d8d['ok'])throw CliErrors['apiError']('Built-in\x20Skill\x20install\x20failed\x20['+(_0x354d8d['code']||_0x1b07ed(0x178))+_0x1b07ed(0x17e)+(_0x354d8d[_0x1b07ed(0x16c)]||'unknown'),_0x1b07ed(0x182)+_0x354d8d[_0x1b07ed(0x16f)]);const _0x1270af=_0x354d8d[_0x1b07ed(0x173)]?'\x20at\x20'+_0x354d8d[_0x1b07ed(0x173)]:'';return console[_0x1b07ed(0x184)](_0x354d8d[_0x1b07ed(0x17b)]?'CLI\x20Built-in\x20Skill\x20'+_0x354d8d[_0x1b07ed(0x186)]+_0x1b07ed(0x176)+_0x1270af:'CLI\x20Built-in\x20Skill\x20'+_0x354d8d[_0x1b07ed(0x186)]+_0x1b07ed(0x179)+_0x1270af),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ecf2d,_0xeebd74){const _0x2ed243=a19_0x4b79,_0x674e1d=_0x3ecf2d();while(!![]){try{const _0x8314f7=parseInt(_0x2ed243(0x1b1))/0x1+-parseInt(_0x2ed243(0x1b4))/0x2+-parseInt(_0x2ed243(0x1b5))/0x3+-parseInt(_0x2ed243(0x1c4))/0x4+-parseInt(_0x2ed243(0x1c0))/0x5*(-parseInt(_0x2ed243(0x1b7))/0x6)+parseInt(_0x2ed243(0x1c2))/0x7*(-parseInt(_0x2ed243(0x1b8))/0x8)+-parseInt(_0x2ed243(0x1c1))/0x9*(-parseInt(_0x2ed243(0x1b2))/0xa);if(_0x8314f7===_0xeebd74)break;else _0x674e1d['push'](_0x674e1d['shift']());}catch(_0x4420ce){_0x674e1d['push'](_0x674e1d['shift']());}}}(a19_0x62bd,0xcdd17));import{PRODUCT_CONFIG}from'../../constant/product.js';function a19_0x4b79(_0x4a2bc5,_0xa9fe71){_0x4a2bc5=_0x4a2bc5-0x1af;const _0x62bd5b=a19_0x62bd();let _0x4b7933=_0x62bd5b[_0x4a2bc5];return _0x4b7933;}export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a19_0x62bd(){const _0x1c2098=[',\x20or\x20create\x20a\x20project-local\x20','3317542WKYaGy','1007745SchtLM','global','31818KDMRaV','13383688YCtSSz','Add\x20--global\x20to\x20write\x20to\x20~/','global-default','validation','\x20found).','newConfigFileName','\x20first.','project','455zwhEGu','4374EhRDWk','7Mbsgvk','inProject','2984808pzCeZv','\x20(global)','Use\x20only\x20one\x20config\x20scope\x20flag.','1381541LjHeJb','69810mxZIHU'];a19_0x62bd=function(){return _0x1c2098;};return a19_0x62bd();}export function resolveConfigScope(_0x195845){const _0x4a5361=a19_0x4b79,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x414c9d}=_0x195845;if(explicitGlobal&&explicitProject)throw CliErrors[_0x4a5361(0x1bb)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x4a5361(0x1b0));if(explicitGlobal)return _0x4a5361(0x1b6);if(explicitProject)return _0x4a5361(0x1bf);switch(_0x414c9d){case _0x4a5361(0x1ba):return _0x4a5361(0x1b6);case'project-or-global-explicit':if(!(_0x195845[_0x4a5361(0x1c3)]??isInProject()))throw CliErrors[_0x4a5361(0x1bb)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x4a5361(0x1bd)]+_0x4a5361(0x1bc),_0x4a5361(0x1b9)+PRODUCT_CONFIG[_0x4a5361(0x1bd)]+_0x4a5361(0x1b3)+PRODUCT_CONFIG[_0x4a5361(0x1bd)]+_0x4a5361(0x1be));return'project';}}export function toScopeFlags(_0x2a07bd){const _0x3d6423=a19_0x4b79;return{'global':_0x2a07bd===_0x3d6423(0x1b6)};}export function formatScopeLabel(_0x34027d){const _0xb27712=a19_0x4b79;return _0x34027d===_0xb27712(0x1b6)?_0xb27712(0x1af):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a20_0xd055(_0x524ec8,_0x5a0962){_0x524ec8=_0x524ec8-0x127;const _0x5002f4=a20_0x5002();let _0xd055c6=_0x5002f4[_0x524ec8];return _0xd055c6;}(function(_0x182398,_0x100e39){const _0x751a0f=a20_0xd055,_0x1c11eb=_0x182398();while(!![]){try{const _0x5ba214=-parseInt(_0x751a0f(0x139))/0x1+-parseInt(_0x751a0f(0x12e))/0x2+-parseInt(_0x751a0f(0x13c))/0x3*(-parseInt(_0x751a0f(0x129))/0x4)+-parseInt(_0x751a0f(0x12d))/0x5+parseInt(_0x751a0f(0x12b))/0x6+-parseInt(_0x751a0f(0x131))/0x7+parseInt(_0x751a0f(0x135))/0x8;if(_0x5ba214===_0x100e39)break;else _0x1c11eb['push'](_0x1c11eb['shift']());}catch(_0x46a9c4){_0x1c11eb['push'](_0x1c11eb['shift']());}}}(a20_0x5002,0xe15e4));import{CliErrors}from'../../errors.js';function a20_0x5002(){const _0x4523b7=['Invalid\x20--','filter',':\x20expected\x20','1615548rKHrBS','At\x20least\x20one\x20of\x20','7865688vPnfZl','\x20are\x20mutually\x20exclusive\x20for\x20`','6253565QbJQLm','1807038KkHpsX','Use\x20only\x20one\x20of:\x20','join','10272500Csuyhl','map','length','Provide\x20one\x20of:\x20','34363104uIeTGi','validation','str','Flags\x20','1465383cGkWIi','Only\x20one\x20of\x20','\x20is\x20required\x20for\x20`','3kamenh','Remove\x20all\x20but\x20one.','flag'];a20_0x5002=function(){return _0x4523b7;};return a20_0x5002();}function isSet(_0x55290e,_0xe023af){const _0x550950=a20_0xd055,_0x519e3d=_0x55290e[_0x550950(0x13e)](_0xe023af);return _0x519e3d!==undefined&&_0x519e3d!==''&&_0x519e3d!==![]&&_0x519e3d!==0x0;}function fmtNames(_0x58798e){const _0x820a69=a20_0xd055;return _0x58798e[_0x820a69(0x132)](_0x4970af=>'--'+_0x4970af)[_0x820a69(0x130)](',\x20');}export function requireOneOf(_0x8d1610,_0x40684b,_0xb4d3c6){const _0x51ee02=a20_0xd055,_0x566329=_0x40684b['filter'](_0x17a1c7=>isSet(_0x8d1610,_0x17a1c7));if(_0x566329['length']!==0x1)throw CliErrors['validation'](_0x566329[_0x51ee02(0x133)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x40684b)+_0x51ee02(0x13b)+_0xb4d3c6+'`.':_0x51ee02(0x13a)+fmtNames(_0x40684b)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x566329)+'.',_0x566329['length']===0x0?_0x51ee02(0x134)+fmtNames(_0x40684b):_0x51ee02(0x13d));}export function requireAnyOf(_0x637eba,_0x4eafda,_0x57c6d0){const _0x454210=a20_0xd055;if(!_0x4eafda['some'](_0x49edc4=>isSet(_0x637eba,_0x49edc4)))throw CliErrors['validation'](_0x454210(0x12a)+fmtNames(_0x4eafda)+_0x454210(0x13b)+_0x57c6d0+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x4eafda));}export function mutuallyExclusive(_0x2a3b22,_0x4b4e3a,_0x213b93){const _0x100b67=a20_0xd055,_0x408777=_0x4b4e3a[_0x100b67(0x127)](_0x3dba2b=>isSet(_0x2a3b22,_0x3dba2b));if(_0x408777['length']>0x1)throw CliErrors[_0x100b67(0x136)](_0x100b67(0x138)+fmtNames(_0x408777)+_0x100b67(0x12c)+_0x213b93+'`.',_0x100b67(0x12f)+fmtNames(_0x4b4e3a));}export function validatePattern(_0x407c79,_0x542340,_0x2e8eea,_0x18e364){const _0x46dac1=a20_0xd055,_0x1596fc=_0x407c79[_0x46dac1(0x137)](_0x542340);if(_0x1596fc&&!_0x2e8eea['test'](_0x1596fc))throw CliErrors[_0x46dac1(0x136)](_0x46dac1(0x13f)+_0x542340+_0x46dac1(0x128)+_0x18e364+',\x20got\x20\x22'+_0x1596fc+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a21_0x16701a=a21_0x53c4;(function(_0x3581ca,_0x2b9bbe){const _0x2a56a4=a21_0x53c4,_0xd8d5a3=_0x3581ca();while(!![]){try{const _0x240cdc=-parseInt(_0x2a56a4(0x13c))/0x1*(-parseInt(_0x2a56a4(0x14b))/0x2)+-parseInt(_0x2a56a4(0x139))/0x3*(parseInt(_0x2a56a4(0x13e))/0x4)+parseInt(_0x2a56a4(0x14c))/0x5+parseInt(_0x2a56a4(0x149))/0x6*(parseInt(_0x2a56a4(0x137))/0x7)+-parseInt(_0x2a56a4(0x144))/0x8+-parseInt(_0x2a56a4(0x146))/0x9+parseInt(_0x2a56a4(0x147))/0xa;if(_0x240cdc===_0x2b9bbe)break;else _0xd8d5a3['push'](_0xd8d5a3['shift']());}catch(_0x3561aa){_0xd8d5a3['push'](_0xd8d5a3['shift']());}}}(a21_0x304e,0x4c358));function a21_0x53c4(_0x54d131,_0x1f6828){_0x54d131=_0x54d131-0x137;const _0x304e9d=a21_0x304e();let _0x53c4b6=_0x304e9d[_0x54d131];return _0x53c4b6;}export const GLOBAL_SCOPE_FLAG={'name':'global','type':a21_0x16701a(0x13d),'default':![],'description':a21_0x16701a(0x13a)};export const CODE_FLAG={'name':a21_0x16701a(0x14a),'type':a21_0x16701a(0x140),'required':!![],'description':a21_0x16701a(0x138),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'}};export const SQLCODE_FLAG={'name':a21_0x16701a(0x142),'type':a21_0x16701a(0x140),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0x16701a(0x14d)}};export const VERBOSE_FLAG={'name':'verbose','type':a21_0x16701a(0x13d),'description':a21_0x16701a(0x143)};export const PARAMS_FLAG={'name':a21_0x16701a(0x13f),'type':'string','description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};function a21_0x304e(){const _0x249626=['43233JOkNCe','Write\x20to\x20the\x20global\x20configuration','Resource\x20name\x20for\x20lookup','105113roMftE','boolean','104qQKGTk','params','string','number','sqlcode','Return\x20full\x20raw\x20response\x20object','1436896cspcFx','Resource\x20ID','2239155XDoTwZ','4910240biDNNx','name','30DBaXhE','code','8WOdxmZ','366170IPKNqD','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','182749rUZWsZ','Dataset\x20code\x20(32-char\x20hex\x20UUID)'];a21_0x304e=function(){return _0x249626;};return a21_0x304e();}export const NAME_FLAG={'name':a21_0x16701a(0x148),'type':a21_0x16701a(0x140),'description':a21_0x16701a(0x13b)};export const ID_FLAG={'name':'id','type':a21_0x16701a(0x141),'required':!![],'description':a21_0x16701a(0x145)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x8265f9,_0x4cf5a2){const _0x18ac68=a22_0x1c56,_0x42437a=_0x8265f9();while(!![]){try{const _0x171526=-parseInt(_0x18ac68(0x1fb))/0x1+-parseInt(_0x18ac68(0x1f8))/0x2+-parseInt(_0x18ac68(0x1fa))/0x3+parseInt(_0x18ac68(0x1ee))/0x4+-parseInt(_0x18ac68(0x1f9))/0x5+parseInt(_0x18ac68(0x1fd))/0x6*(parseInt(_0x18ac68(0x1f0))/0x7)+-parseInt(_0x18ac68(0x1ef))/0x8*(-parseInt(_0x18ac68(0x1f1))/0x9);if(_0x171526===_0x4cf5a2)break;else _0x42437a['push'](_0x42437a['shift']());}catch(_0x264862){_0x42437a['push'](_0x42437a['shift']());}}}(a22_0x56a5,0x18de1));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a22_0x1c56(_0x67ef7f,_0x433b5f){_0x67ef7f=_0x67ef7f-0x1ed;const _0x56a577=a22_0x56a5();let _0x1c5698=_0x56a577[_0x67ef7f];return _0x1c5698;}const BYTES_PER_MB=0x400*0x400;function a22_0x56a5(){const _0x35a1b2=['\x20path\x20is\x20required.','validation','374260WDMLlv','564035bqLXxH','2235MhvUJI','49032JsuDUV','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','12RphdGQ','ceil','257500DWdfBj','112TgQdow','365729sWrhNh','181737jzdJdL','size','File\x20is\x20not\x20a\x20regular\x20file:\x20','isFile','toFixed'];a22_0x56a5=function(){return _0x35a1b2;};return a22_0x56a5();}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x33eb29){const _0x4806d1=a22_0x1c56;if(_0x33eb29>=BYTES_PER_MB){const _0x296024=Math[_0x4806d1(0x1ed)](_0x33eb29/BYTES_PER_MB*0x64)/0x64;return _0x296024[_0x4806d1(0x1f5)](0x2)+'\x20MB';}return _0x33eb29+'\x20B';}export function requireRuntimeUploadFile(_0x3ce4d2,_0x5aaff3){const _0x388b2c=a22_0x1c56,_0x1031b6=_0x3ce4d2['trim']();if(!_0x1031b6)throw CliErrors['validation'](_0x5aaff3+_0x388b2c(0x1f6));if(!existsSync(_0x1031b6))throw CliErrors[_0x388b2c(0x1f7)]('File\x20not\x20found:\x20'+_0x1031b6);const _0x344883=statSync(_0x1031b6);if(!_0x344883[_0x388b2c(0x1f4)]())throw CliErrors['validation'](_0x388b2c(0x1f3)+_0x1031b6);if(_0x344883[_0x388b2c(0x1f2)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x388b2c(0x1fc)+_0x1031b6+'\x20('+formatBytes(_0x344883[_0x388b2c(0x1f2)])+')');return{'path':_0x1031b6,'size':_0x344883[_0x388b2c(0x1f2)]};}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a23_0x4b9976=a23_0x530c;(function(_0x4f7d1f,_0x51385c){const _0x5e2796=a23_0x530c,_0xf4fc0f=_0x4f7d1f();while(!![]){try{const _0x22fa3a=-parseInt(_0x5e2796(0x160))/0x1+parseInt(_0x5e2796(0x185))/0x2*(parseInt(_0x5e2796(0x17e))/0x3)+parseInt(_0x5e2796(0x16b))/0x4*(parseInt(_0x5e2796(0x187))/0x5)+parseInt(_0x5e2796(0x18d))/0x6+parseInt(_0x5e2796(0x1a4))/0x7*(-parseInt(_0x5e2796(0x1a7))/0x8)+-parseInt(_0x5e2796(0x19c))/0x9+-parseInt(_0x5e2796(0x178))/0xa;if(_0x22fa3a===_0x51385c)break;else _0xf4fc0f['push'](_0xf4fc0f['shift']());}catch(_0x212ef3){_0xf4fc0f['push'](_0xf4fc0f['shift']());}}}(a23_0x7693,0x5f7ae));function a23_0x7693(){const _0x25d60a=['read','join','1906407FXNkEm','pageSize','key','Usage:\x20','appcode','\x20(global)','Deleted\x20`','list','49SnlAGk','`\x20=\x20\x22','accessKey','394688oBhkst','field','Config\x20files:\x0a','Key\x20not\x20found:\x20','167657shykbg','Missing\x20key\x20argument.',';\x20apps.<alias>.appcode','Value\x20to\x20assign','delete','trim','Set\x20`','write','../../context.js','args','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','1321296Rytueg','\x20config\x20get\x20<key>','global','Delete\x20a\x20configuration\x20value','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Settable\x20keys:\x20','\x22.\x20Allowed:\x20','includes','set','Missing\x20key\x20or\x20value.','pageSize\x20must\x20be\x20a\x20positive\x20number','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','Top-level\x20key\x20\x22','899640ogCXIJ','Key\x20already\x20absent:\x20','raw','\x22\x20is\x20not\x20settable.','isArray','format','264dCeTEX','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','object','Set\x20a\x20configuration\x20value','config','alias','\x20\x20global:\x20\x20','532KUvlOz','pretty','10pEiAbl','value','log','split','validation','keys','3130956EufLYO','stringify','locale','\x20config\x20set\x20<key>\x20<value>\x20[--global]','\x20\x20project:\x20','apps','length','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','project-or-global-explicit','bool','Invalid\x20locale\x20value.','get','Invalid\x20value\x20for\x20\x22'];a23_0x7693=function(){return _0x25d60a;};return a23_0x7693();}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';function a23_0x530c(_0x4ba612,_0x4d0f7b){_0x4ba612=_0x4ba612-0x15f;const _0x7693d6=a23_0x7693();let _0x530c0e=_0x7693d6[_0x4ba612];return _0x530c0e;}import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x3183c2){const _0x31ecd1=a23_0x530c,_0x4175d0=_0x3183c2[_0x31ecd1(0x18a)]('.');if(_0x4175d0['length']!==0x3||_0x4175d0[0x0]!==_0x31ecd1(0x192)||_0x4175d0[0x2]!=='appcode')return undefined;const _0x17af2d=_0x4175d0[0x1]?.[_0x31ecd1(0x165)]();return _0x17af2d?_0x17af2d:undefined;}function parseAliasDeleteKey(_0x42beb1){const _0x597337=a23_0x530c,_0x234788=_0x42beb1['split']('.');if(_0x234788[_0x597337(0x193)]===0x2&&_0x234788[0x0]===_0x597337(0x192)){const _0x2dd94b=_0x234788[0x1]?.['trim']();return _0x2dd94b?{'alias':_0x2dd94b}:undefined;}if(_0x234788['length']===0x3&&_0x234788[0x0]===_0x597337(0x192)&&_0x234788[0x2]===_0x597337(0x1a0)){const _0x1a62ef=_0x234788[0x1]?.['trim']();return _0x1a62ef?{'alias':_0x1a62ef,'field':_0x597337(0x1a0)}:undefined;}return undefined;}function setLocalAppAlias(_0x39a2d4,_0x515e96,_0x11b77d){const _0x2b34ec=a23_0x530c,_0x2fedf3=_0x39a2d4[_0x2b34ec(0x192)]&&typeof _0x39a2d4['apps']===_0x2b34ec(0x180)&&!Array['isArray'](_0x39a2d4[_0x2b34ec(0x192)])?_0x39a2d4[_0x2b34ec(0x192)]:{},_0x4cee25=_0x2fedf3[_0x515e96]&&typeof _0x2fedf3[_0x515e96]==='object'&&!Array[_0x2b34ec(0x17c)](_0x2fedf3[_0x515e96])?_0x2fedf3[_0x515e96]:{};_0x4cee25[_0x2b34ec(0x1a0)]=_0x11b77d,_0x2fedf3[_0x515e96]=_0x4cee25,_0x39a2d4[_0x2b34ec(0x192)]=_0x2fedf3;}function deleteLocalAppAlias(_0x25175f,_0x110bc7){const _0x773b99=a23_0x530c;if(!_0x25175f[_0x773b99(0x192)]||typeof _0x25175f[_0x773b99(0x192)]!==_0x773b99(0x180)||Array[_0x773b99(0x17c)](_0x25175f[_0x773b99(0x192)]))return![];const _0x146741=_0x25175f[_0x773b99(0x192)],_0x505969=_0x146741[_0x110bc7['alias']];if(!_0x505969||typeof _0x505969!==_0x773b99(0x180)||Array[_0x773b99(0x17c)](_0x505969))return![];if(!_0x110bc7[_0x773b99(0x1a8)])return delete _0x146741[_0x110bc7[_0x773b99(0x183)]],!![];if(!(_0x110bc7[_0x773b99(0x1a8)]in _0x505969))return![];return delete _0x505969[_0x110bc7[_0x773b99(0x1a8)]],Object[_0x773b99(0x18c)](_0x505969)[_0x773b99(0x193)]===0x0&&delete _0x146741[_0x110bc7['alias']],!![];}const listDef={'service':a23_0x4b9976(0x182),'command':a23_0x4b9976(0x1a3),'description':'List\x20current\x20config','risk':a23_0x4b9976(0x19a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x44dabf){const _0x596ab6=a23_0x4b9976,{buildConfigFromFlags:_0x37adbb}=await import(_0x596ab6(0x168)),_0x13dbd7=_0x37adbb({}),_0x3a0c74=redactCliConfigCredentials(_0x13dbd7[_0x596ab6(0x17a)]),_0x5d0925=getProjectConfigPath(),_0x2e5bf3=resolveWriteConfigPath('global');if(_0x44dabf[_0x596ab6(0x17d)]===_0x596ab6(0x186))return{'ok':!![],'message':_0x596ab6(0x16f)+(JSON[_0x596ab6(0x18e)](_0x3a0c74,null,0x2)+'\x0a\x0a')+_0x596ab6(0x1a9)+(_0x596ab6(0x191)+(_0x5d0925??'(none)')+'\x0a')+(_0x596ab6(0x184)+_0x2e5bf3)};return{'ok':!![],'data':{'effective':_0x3a0c74,'configFiles':{'project':_0x5d0925??null,'global':_0x2e5bf3}}};}},getDef={'service':a23_0x4b9976(0x182),'command':a23_0x4b9976(0x198),'description':'Get\x20a\x20config\x20value','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a23_0x4b9976(0x17f),'required':!![]}],'flags':[],async 'execute'(_0x341b7f){const _0x21b8ab=a23_0x4b9976,_0x301d16=_0x341b7f[_0x21b8ab(0x169)][0x0];if(!_0x301d16)throw CliErrors['validation'](_0x21b8ab(0x161),_0x21b8ab(0x19f)+CLI_BIN_NAME+_0x21b8ab(0x16c));const {buildConfigFromFlags:_0x28e0e2}=await import('../../context.js'),{raw:_0x296db8}=_0x28e0e2({});if(_0x301d16['includes']('.')){const _0x491915=_0x301d16['split']('.');let _0x4aa2ae=_0x296db8;for(const _0x46be5e of _0x491915){if(_0x4aa2ae==null||typeof _0x4aa2ae!=='object')throw CliErrors[_0x21b8ab(0x18b)](_0x21b8ab(0x15f)+_0x301d16);_0x4aa2ae=_0x4aa2ae[_0x46be5e];}if(_0x4aa2ae===undefined)throw CliErrors[_0x21b8ab(0x18b)](_0x21b8ab(0x15f)+_0x301d16);const _0x363791=redactCliConfigValue(_0x301d16,_0x4aa2ae);return console['log'](typeof _0x363791===_0x21b8ab(0x180)?JSON['stringify'](_0x363791,null,0x2):String(_0x363791)),{'ok':!![]};}const _0x4ea87b=_0x296db8[_0x301d16];if(_0x4ea87b===undefined)throw CliErrors[_0x21b8ab(0x18b)](_0x21b8ab(0x15f)+_0x301d16);const _0x1b001e=redactCliConfigValue(_0x301d16,_0x4ea87b);return console['log'](typeof _0x1b001e==='object'?JSON[_0x21b8ab(0x18e)](_0x1b001e,null,0x2):String(_0x1b001e)),{'ok':!![]};}},setDef={'service':a23_0x4b9976(0x182),'command':a23_0x4b9976(0x173),'description':a23_0x4b9976(0x181),'risk':a23_0x4b9976(0x167),'confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x4b9976(0x19e),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x4b9976(0x188),'description':a23_0x4b9976(0x163),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x198605){const _0x125272=a23_0x4b9976,_0xadaf11=_0x198605[_0x125272(0x169)][0x0],_0x569fe4=_0x198605[_0x125272(0x169)][0x1];if(!_0xadaf11||_0x569fe4===undefined)throw CliErrors['validation'](_0x125272(0x174),_0x125272(0x19f)+CLI_BIN_NAME+_0x125272(0x190));if(ENUM_KEYS[_0xadaf11]&&!ENUM_KEYS[_0xadaf11][_0x125272(0x172)](_0x569fe4))throw CliErrors[_0x125272(0x18b)](_0x125272(0x199)+_0xadaf11+_0x125272(0x171)+ENUM_KEYS[_0xadaf11][_0x125272(0x19b)](',\x20'));if(isCliProtectedConfigKey(_0xadaf11))throw CliErrors[_0x125272(0x18b)]('\x22'+_0xadaf11+_0x125272(0x176));if(_0xadaf11===_0x125272(0x19d)){const _0x49c724=Number(_0x569fe4);if(isNaN(_0x49c724)||_0x49c724<=0x0)throw CliErrors[_0x125272(0x18b)](_0x125272(0x175));}const _0x4225c5=resolveWriteScope({'explicitGlobal':_0x198605['bool'](_0x125272(0x16d)),'policy':_0x125272(0x195)}),_0x2a4ed5=toScopeFlags(_0x4225c5),_0x1e8fab=readScopedConfig(_0x2a4ed5),_0x886ac6=parseAliasAppcodeSetKey(_0xadaf11);if(!_0x886ac6&&!isTopLevelConfigKey(_0xadaf11))throw CliErrors['validation'](_0x125272(0x177)+_0xadaf11+_0x125272(0x17b),_0x125272(0x170)+getTopLevelConfigKeySummary()+_0x125272(0x162));if(_0x886ac6)setLocalAppAlias(_0x1e8fab,_0x886ac6,_0x569fe4);else{if(_0xadaf11===_0x125272(0x18f)){const _0x18e5f9=normalizeLocale(_0x569fe4);if(!_0x18e5f9)throw CliErrors[_0x125272(0x18b)](_0x125272(0x197),_0x125272(0x194));_0x1e8fab[_0x125272(0x18f)]=_0x18e5f9;}else _0x1e8fab[_0xadaf11]=_0xadaf11===_0x125272(0x19d)?Number(_0x569fe4):DOMAIN_CONFIG_FIELDS[_0x125272(0x172)](_0xadaf11)?normalizeDomainOrigin(_0xadaf11,_0x569fe4):_0x569fe4;}const _0x3988c4=_0xadaf11===_0x125272(0x1a6)?maskCliAccessKey(_0x569fe4):!_0x886ac6&&_0xadaf11===_0x125272(0x18f)?String(_0x1e8fab[_0x125272(0x18f)]):_0x569fe4;return console[_0x125272(0x189)](_0x125272(0x166)+_0xadaf11+_0x125272(0x1a5)+_0x3988c4+'\x22'+(_0x4225c5===_0x125272(0x16d)?_0x125272(0x1a1):'')),writeScopedConfig(_0x1e8fab,_0x2a4ed5),{'ok':!![]};}},deleteDef={'service':'config','command':a23_0x4b9976(0x164),'description':a23_0x4b9976(0x16e),'risk':a23_0x4b9976(0x167),'confirmationDescription':a23_0x4b9976(0x16a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x4b9976(0x19e),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x22da69){const _0x4851a7=a23_0x4b9976,_0x5cc850=_0x22da69['args'][0x0];if(!_0x5cc850)throw CliErrors[_0x4851a7(0x18b)](_0x4851a7(0x161),_0x4851a7(0x19f)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x5cc850))throw CliErrors['validation']('\x22'+_0x5cc850+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x447420=resolveWriteScope({'explicitGlobal':_0x22da69[_0x4851a7(0x196)]('global'),'policy':'project-or-global-explicit'}),_0x2bef83=toScopeFlags(_0x447420),_0x8ec8d5=readScopedConfig(_0x2bef83),_0x496b5a=parseAliasDeleteKey(_0x5cc850);if(_0x496b5a){if(!deleteLocalAppAlias(_0x8ec8d5,_0x496b5a))return console[_0x4851a7(0x189)](_0x4851a7(0x179)+_0x5cc850+(_0x447420===_0x4851a7(0x16d)?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x5cc850,'scope':_0x447420,'changed':![]}};return console[_0x4851a7(0x189)]('Deleted\x20`'+_0x5cc850+'`'+(_0x447420===_0x4851a7(0x16d)?_0x4851a7(0x1a1):'')),writeScopedConfig(_0x8ec8d5,_0x2bef83),{'ok':!![],'data':{'key':_0x5cc850,'scope':_0x447420,'changed':!![]}};}if(_0x8ec8d5[_0x5cc850]===undefined)return console[_0x4851a7(0x189)](_0x4851a7(0x179)+_0x5cc850+(_0x447420===_0x4851a7(0x16d)?_0x4851a7(0x1a1):'')),{'ok':!![],'data':{'key':_0x5cc850,'scope':_0x447420,'changed':![]}};return delete _0x8ec8d5[_0x5cc850],console[_0x4851a7(0x189)](_0x4851a7(0x1a2)+_0x5cc850+'`'+(_0x447420===_0x4851a7(0x16d)?'\x20(global)':'')),writeScopedConfig(_0x8ec8d5,_0x2bef83),{'ok':!![],'data':{'key':_0x5cc850,'scope':_0x447420,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x347172=a24_0x4e8f;function a24_0x4e8f(_0x14bab9,_0x43156a){_0x14bab9=_0x14bab9-0xc2;const _0x298337=a24_0x2983();let _0x4e8f32=_0x298337[_0x14bab9];return _0x4e8f32;}(function(_0x46e153,_0x5f0427){const _0x2a8b2f=a24_0x4e8f,_0x5b09fe=_0x46e153();while(!![]){try{const _0x3068c6=parseInt(_0x2a8b2f(0xe3))/0x1*(parseInt(_0x2a8b2f(0xe1))/0x2)+parseInt(_0x2a8b2f(0xc2))/0x3+parseInt(_0x2a8b2f(0xea))/0x4*(-parseInt(_0x2a8b2f(0xdb))/0x5)+-parseInt(_0x2a8b2f(0xd5))/0x6*(parseInt(_0x2a8b2f(0xd7))/0x7)+-parseInt(_0x2a8b2f(0xef))/0x8+parseInt(_0x2a8b2f(0xe5))/0x9*(-parseInt(_0x2a8b2f(0xd3))/0xa)+parseInt(_0x2a8b2f(0xf1))/0xb;if(_0x3068c6===_0x5f0427)break;else _0x5b09fe['push'](_0x5b09fe['shift']());}catch(_0x31e521){_0x5b09fe['push'](_0x5b09fe['shift']());}}}(a24_0x2983,0xf1345));import{select}from'@inquirer/prompts';function a24_0x2983(){const _0x569a01=['runtime-domain','Available\x20regions:\x20','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','420BHogPj','config','4609422aQOdZp','Custom\x20User\x20HTTPS\x20origin','14WCxQsT','write','harness-domain','manifestDomains','9485dQQGkg','mode','str','official','api-domain','join','454906MLxgsI','Select\x20Lovrabet\x20region','2wWeZAP','region','79749xUwJjE','cancelled','user-domain','Region\x20\x22','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','3756MCaNDb','\x22\x20is\x20not\x20currently\x20available.','nonInteractive','Custom\x20Harness\x20HTTPS\x20origin','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','2020528JIyctA','keys','45090320pzEzBZ','1129296vzHKkU','Custom\x20SkillHub\x20HTTPS\x20origin','string','name','domain-config','routing','validation','Custom\x20KB\x20Service\x20HTTPS\x20origin','init','map','independent','label','domains','enterprise-v1'];a24_0x2983=function(){return _0x569a01;};return a24_0x2983();}import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':a24_0x347172(0xc6),'type':a24_0x347172(0xc4),'description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a24_0x347172(0xe7),'type':a24_0x347172(0xc4),'description':a24_0x347172(0xd6)},{'name':a24_0x347172(0xdf),'type':a24_0x347172(0xc4),'description':'Custom\x20platform\x20API\x20HTTPS\x20origin'},{'name':a24_0x347172(0xd0),'type':'string','description':'Custom\x20Runtime\x20HTTPS\x20origin'},{'name':'skill-domain','type':a24_0x347172(0xc4),'description':a24_0x347172(0xc3)},{'name':'kb-service-domain','type':'string','description':a24_0x347172(0xc9)},{'name':a24_0x347172(0xd9),'type':a24_0x347172(0xc4),'description':a24_0x347172(0xed)}];export const configInitFlags=[{'name':a24_0x347172(0xe4),'type':a24_0x347172(0xc4),'description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES[a24_0x347172(0xe0)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x40f314){const _0x427b1d=a24_0x347172,_0x23ba24=_0x40f314['str']('region');if(_0x23ba24){if(!isEnabledLovrabetRegion(_0x23ba24))throw CliErrors[_0x427b1d(0xc8)](_0x427b1d(0xe8)+_0x23ba24+_0x427b1d(0xeb),_0x427b1d(0xd1)+ENABLED_LOVRABET_REGION_VALUES[_0x427b1d(0xe0)](',\x20'));return _0x23ba24;}if(_0x40f314[_0x427b1d(0xec)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x427b1d(0xe2),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x427b1d(0xcb)](_0xaad7ac=>({'name':OFFICIAL_ROUTING_PROFILES[_0xaad7ac][_0x427b1d(0xcd)]+'\x20('+_0xaad7ac+')','value':_0xaad7ac}))});}catch(_0x4c10c0){if(_0x4c10c0?.[_0x427b1d(0xc5)]==='ExitPromptError')throw CliErrors[_0x427b1d(0xe6)]();throw _0x4c10c0;}}export async function executeConfigInit(_0x1f5425){const _0x1aa06c=a24_0x347172,_0x187848=resolveDomainConfigInput(_0x1f5425),_0x496949=_0x187848[_0x1aa06c(0xce)],_0x2bcfd0=Object[_0x1aa06c(0xf0)](_0x496949)['length']>0x0||_0x187848[_0x1aa06c(0xdc)]===_0x1aa06c(0xcf);if(_0x2bcfd0&&_0x1f5425[_0x1aa06c(0xdd)](_0x1aa06c(0xe4)))throw CliErrors['validation']('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');const _0x3c11d5={'global':!![]},_0x394d5e=readScopedConfig(_0x3c11d5);for(const _0xcaa6f1 of DOMAIN_CONFIG_FIELDS)delete _0x394d5e[_0xcaa6f1];for(const _0x29321d of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x394d5e[_0x29321d];delete _0x394d5e[_0x1aa06c(0xc7)];let _0x1adecf=null;if(_0x2bcfd0)delete _0x394d5e[_0x1aa06c(0xe4)],_0x187848[_0x1aa06c(0xdc)]===_0x1aa06c(0xcf)?_0x394d5e[_0x1aa06c(0xc7)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x187848[_0x1aa06c(0xda)]}:Object['assign'](_0x394d5e,_0x496949);else{_0x1adecf=await resolveRegion(_0x1f5425);if(_0x1adecf===DEFAULT_LOVRABET_REGION)delete _0x394d5e['region'];else _0x394d5e[_0x1aa06c(0xe4)]=_0x1adecf;}return writeScopedConfig(_0x394d5e,_0x3c11d5),{'ok':!![],'message':_0x2bcfd0?_0x1aa06c(0xee)+Object['keys'](_0x187848[_0x1aa06c(0xdc)]===_0x1aa06c(0xcf)?_0x187848[_0x1aa06c(0xda)]:_0x496949)[_0x1aa06c(0xe0)](',\x20')+'.':_0x1aa06c(0xd2)+_0x1adecf+'.','data':{'mode':_0x2bcfd0?_0x1aa06c(0xcc):_0x1aa06c(0xde),'protocol':_0x187848[_0x1aa06c(0xdc)]===_0x1aa06c(0xcf)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x1adecf,'domains':_0x496949}};}export const configInitDefinition={'service':a24_0x347172(0xd4),'command':a24_0x347172(0xca),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a24_0x347172(0xd8),'confirmationDescription':a24_0x347172(0xe9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a25_0x5698(){var _0x483fe7=['3151631aJtAdS','8zUrlpR','16fkUXYP','5890146mIBOrk','979600ejsrMP','1049106bkRswk','1670VmtlAO','1555836IrCfyh','1584318igflCt','71937YCiRpo'];a25_0x5698=function(){return _0x483fe7;};return a25_0x5698();}(function(_0x5e6562,_0xb849e3){var _0x51457b=a25_0x3bd6,_0x4459d7=_0x5e6562();while(!![]){try{var _0x3fe828=parseInt(_0x51457b(0x141))/0x1+-parseInt(_0x51457b(0x139))/0x2+-parseInt(_0x51457b(0x13a))/0x3+-parseInt(_0x51457b(0x13e))/0x4*(-parseInt(_0x51457b(0x140))/0x5)+parseInt(_0x51457b(0x13f))/0x6+parseInt(_0x51457b(0x13c))/0x7*(parseInt(_0x51457b(0x13d))/0x8)+-parseInt(_0x51457b(0x13b))/0x9*(parseInt(_0x51457b(0x138))/0xa);if(_0x3fe828===_0xb849e3)break;else _0x4459d7['push'](_0x4459d7['shift']());}catch(_0x3797d3){_0x4459d7['push'](_0x4459d7['shift']());}}}(a25_0x5698,0x984ef));function a25_0x3bd6(_0x7e9890,_0x4ec12f){_0x7e9890=_0x7e9890-0x138;var _0x56987c=a25_0x5698();var _0x3bd63e=_0x56987c[_0x7e9890];return _0x3bd63e;}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
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)};})};
|
|
1
|
+
const a26_0xc256a7=a26_0x29b0;(function(_0x42be15,_0x3c6e3c){const _0x42f244=a26_0x29b0,_0x412788=_0x42be15();while(!![]){try{const _0x4c6889=parseInt(_0x42f244(0x18d))/0x1*(-parseInt(_0x42f244(0x19f))/0x2)+parseInt(_0x42f244(0x1da))/0x3*(-parseInt(_0x42f244(0x1b2))/0x4)+-parseInt(_0x42f244(0x1a5))/0x5*(parseInt(_0x42f244(0x188))/0x6)+parseInt(_0x42f244(0x18b))/0x7*(parseInt(_0x42f244(0x191))/0x8)+parseInt(_0x42f244(0x1b8))/0x9*(-parseInt(_0x42f244(0x186))/0xa)+parseInt(_0x42f244(0x1ba))/0xb+parseInt(_0x42f244(0x18f))/0xc;if(_0x4c6889===_0x3c6e3c)break;else _0x412788['push'](_0x412788['shift']());}catch(_0x16d89d){_0x412788['push'](_0x412788['shift']());}}}(a26_0x3458,0x700ec));import{readFile,realpath}from'node:fs/promises';function a26_0x3458(){const _0x1c9c56=['\x20--code\x20','str','22385dYXhim','Excel\x20import\x20failed.','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','code','hashes','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','resume','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.','.lock','POST','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','Excel\x20contains\x20','20tJoiwP','batch-size','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','.\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','bool','.lock.recovery','45yVNLTG','.rows.json','4959658bprLgI','string','sheet','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','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.','.import-checkpoint.json','rows','DB_TABLE','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','warnings','See\x20','schemaFingerprint','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','all','length','file','max','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','validation','mappingFile','number','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','rowNumber','data','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','1-based\x20Excel\x20header\x20row','media','emptyRows','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','size','slice','\x20records.','51375KomlzR','boolean','report','object','1651810JpoDRN','map','1152upidwb','succeeded','appCode','91343xwemAv','header-row','43lUEQbk','errors','16991736dimQoJ','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','440jioEaV','isInteger','toString','/import-batch','/client/','parse','num','checkpoint','imageFields','METADATA','values','Imported\x20and\x20verified\x20','maxBatchSize','batchSize','16486LJzQaV','schemaVersion','import-excel','Maximum\x20records\x20per\x20request\x20(1..500)'];a26_0x3458=function(){return _0x1c9c56;};return a26_0x3458();}import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,getDatasetImportContract,createDatasetImportBatch,readDatasetImportRows,readDatasetImportTaskRows,uploadDatasetImportImage,readDatasetImportImage}from'../../core/api-client.js';import{getRuntimeDomain}from'../../constant/domain.js';import{CliError,CliErrors}from'../../errors.js';import{buildExcelManifest,normalizeImportFields}from'../../services/dataset-import/excel-reader.js';import{assertImportContract,assertImportPaths,runExcelImport,saveImportJson,resolveImportOutputPath}from'../../services/dataset-import/runner.js';import{assertDatasetImportTarget}from'../../services/dataset-import/metadata.js';import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';function a26_0x29b0(_0x443c33,_0x67d0b6){_0x443c33=_0x443c33-0x186;const _0x3458c2=a26_0x3458();let _0x29b02a=_0x3458c2[_0x443c33];return _0x29b02a;}import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function input(_0x284394){const _0x443a00=a26_0x29b0,_0x1e4547=_0x284394[_0x443a00(0x1a4)](_0x443a00(0x1c9)),_0x201e8c=_0x284394[_0x443a00(0x1a4)]('mapping');if(!_0x1e4547||!_0x201e8c)throw CliErrors[_0x443a00(0x1cc)]('--file\x20and\x20--mapping\x20are\x20required.');const _0x256b5c=_0x284394[_0x443a00(0x197)](_0x443a00(0x18c),0x1),_0x1120c3=_0x284394['num']('batch-size',0x1f4);if(!Number[_0x443a00(0x192)](_0x256b5c)||_0x256b5c<0x1||!Number['isInteger'](_0x1120c3)||_0x1120c3<0x1||_0x1120c3>0x1f4)throw CliErrors[_0x443a00(0x1cc)]('Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.');const _0xac6a1c=resolve(_0x284394[_0x443a00(0x1a4)](_0x443a00(0x198))||_0x1e4547+_0x443a00(0x1bf)),_0x59f725=resolve(_0x284394[_0x443a00(0x1a4)](_0x443a00(0x1dc))||_0x1e4547+'.import-report.json'),_0xe147ee=[resolve(_0x1e4547),resolve(_0x201e8c),_0xac6a1c,_0x59f725];if(new Set(_0xe147ee)[_0x443a00(0x1d7)]!==_0xe147ee[_0x443a00(0x1c8)])throw CliErrors[_0x443a00(0x1cc)](_0x443a00(0x1aa));return{'file':resolve(_0x1e4547),'mappingFile':resolve(_0x201e8c),'headerRow':_0x256b5c,'batchSize':_0x1120c3,'checkpoint':_0xac6a1c,'report':_0x59f725,'sheet':_0x284394[_0x443a00(0x1a4)](_0x443a00(0x1bc))||undefined,'resume':_0x284394[_0x443a00(0x1b6)](_0x443a00(0x1ab))};}async function prepare(_0x2bb5fb){const _0x281a4a=a26_0x29b0,_0x54c446=input(_0x2bb5fb),_0x122f52=_0x2bb5fb[_0x281a4a(0x1a4)](_0x281a4a(0x1a8));[_0x54c446[_0x281a4a(0x1c9)],_0x54c446[_0x281a4a(0x1cd)],_0x54c446[_0x281a4a(0x198)],_0x54c446[_0x281a4a(0x1dc)]]=await Promise['all']([realpath(_0x54c446[_0x281a4a(0x1c9)]),realpath(_0x54c446[_0x281a4a(0x1cd)]),resolveImportOutputPath(_0x54c446[_0x281a4a(0x198)]),resolveImportOutputPath(_0x54c446[_0x281a4a(0x1dc)])]),assertImportPaths(_0x54c446[_0x281a4a(0x198)],_0x54c446[_0x281a4a(0x1dc)],[_0x54c446[_0x281a4a(0x1c9)],_0x54c446['mappingFile']]);let _0x24c8d9;const _0x4a61cd=await readFile(_0x54c446[_0x281a4a(0x1cd)]);if(_0x4a61cd[_0x281a4a(0x1c8)]>0x400*0x400)throw CliErrors[_0x281a4a(0x1cc)]('Mapping\x20file\x20exceeds\x201\x20MB.');try{_0x24c8d9=JSON[_0x281a4a(0x196)](_0x4a61cd[_0x281a4a(0x193)]('utf8'));}catch{throw CliErrors[_0x281a4a(0x1cc)](_0x281a4a(0x1c6));}if(!_0x24c8d9||typeof _0x24c8d9!==_0x281a4a(0x1dd)||Array['isArray'](_0x24c8d9)||Object[_0x281a4a(0x19b)](_0x24c8d9)['some'](_0x516080=>typeof _0x516080!==_0x281a4a(0x1bb)))throw CliErrors[_0x281a4a(0x1cc)](_0x281a4a(0x1b4));const _0x47a2fa=await getDatasetDetail(_0x122f52),_0x5bfc05=assertDatasetImportTarget(_0x47a2fa,_0x2bb5fb[_0x281a4a(0x18a)],_0x122f52);if(_0x5bfc05===_0x281a4a(0x1c1))throw CliErrors[_0x281a4a(0x1cc)]('DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x122f52+_0x281a4a(0x1b5)+_0x2bb5fb[_0x281a4a(0x18a)]+_0x281a4a(0x1a3)+_0x122f52+_0x281a4a(0x1ad));if(_0x5bfc05!==_0x281a4a(0x19a))throw CliErrors[_0x281a4a(0x1cc)](_0x281a4a(0x1bd),'Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.');const _0x517cd4=await buildExcelManifest({..._0x54c446,'mapping':_0x24c8d9,'fields':normalizeImportFields(_0x47a2fa)}),_0x1ca0cb=await getDatasetImportContract(_0x2bb5fb[_0x281a4a(0x18a)],_0x122f52);assertImportContract(_0x1ca0cb,_0x2bb5fb[_0x281a4a(0x18a)],_0x122f52),assertImageImportCapability(_0x1ca0cb,_0x517cd4);if(_0x517cd4[_0x281a4a(0x199)]?.[_0x281a4a(0x1c8)]){const _0x2cfe27=await resolveImportOutputPath(_0x54c446[_0x281a4a(0x198)]+_0x281a4a(0x1b9)),_0x24fe25=await Promise[_0x281a4a(0x1c7)]([_0x2cfe27,_0x2cfe27+_0x281a4a(0x1ae),_0x2cfe27+_0x281a4a(0x1b7),_0x54c446[_0x281a4a(0x198)]+_0x281a4a(0x1ae),_0x54c446[_0x281a4a(0x198)]+_0x281a4a(0x1b7)][_0x281a4a(0x187)](resolveImportOutputPath));assertImportPaths(_0x54c446['checkpoint'],_0x54c446[_0x281a4a(0x1dc)],[_0x54c446[_0x281a4a(0x1c9)],_0x54c446[_0x281a4a(0x1cd)],..._0x24fe25[_0x281a4a(0x1d8)](0x0,0x3)]);}if(_0x54c446[_0x281a4a(0x19e)]>_0x1ca0cb[_0x281a4a(0x19d)])throw CliErrors[_0x281a4a(0x1cc)](_0x281a4a(0x1cb));return{'args':_0x54c446,'manifest':_0x517cd4,'contract':_0x1ca0cb,'code':_0x122f52};}async function checked(_0x59726a){const _0xe80eef=a26_0x29b0;try{return await _0x59726a();}catch(_0x4c6eed){if(_0x4c6eed instanceof CliError)throw _0x4c6eed;throw CliErrors[_0xe80eef(0x1cc)](_0x4c6eed['message']||_0xe80eef(0x1a6));}}export const dataImportExcel={'service':a26_0xc256a7(0x1d1),'command':a26_0xc256a7(0x1a1),'risk':'write','description':a26_0xc256a7(0x1be),'confirmationDescription':a26_0xc256a7(0x1c2),'flags':[CODE_FLAG,{'name':a26_0xc256a7(0x1c9),'type':a26_0xc256a7(0x1bb),'required':!![],'description':a26_0xc256a7(0x1d6)},{'name':a26_0xc256a7(0x1ac),'type':a26_0xc256a7(0x1bb),'required':!![],'description':a26_0xc256a7(0x1b0)},{'name':a26_0xc256a7(0x1bc),'type':'string','description':a26_0xc256a7(0x1cf)},{'name':a26_0xc256a7(0x18c),'type':'number','default':0x1,'description':a26_0xc256a7(0x1d3)},{'name':a26_0xc256a7(0x1b3),'type':a26_0xc256a7(0x1ce),'default':0x1f4,'description':a26_0xc256a7(0x1a2)},{'name':a26_0xc256a7(0x198),'type':a26_0xc256a7(0x1bb),'description':'Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)'},{'name':a26_0xc256a7(0x1dc),'type':a26_0xc256a7(0x1bb),'description':a26_0xc256a7(0x1a7)},{'name':'resume','type':a26_0xc256a7(0x1db),'description':a26_0xc256a7(0x190)}],'validate':async _0x31a9a2=>{input(_0x31a9a2);},'dryRun':async _0x55d823=>checked(async()=>{const _0x1f755a=a26_0xc256a7,{args:_0x370e23,manifest:_0x3b694b,contract:_0x218f3a,code:_0x47610d}=await prepare(_0x55d823),_0x3ba329=new Set(_0x3b694b[_0x1f755a(0x18e)][_0x1f755a(0x187)](_0x5582dc=>_0x5582dc[_0x1f755a(0x1d0)]))[_0x1f755a(0x1d7)];return{'method':_0x1f755a(0x1af),'url':_0x1f755a(0x195)+encodeURIComponent(_0x55d823[_0x1f755a(0x18a)])+'/'+encodeURIComponent(_0x47610d)+_0x1f755a(0x194),'description':_0x1f755a(0x1d2),'body':{'schemaFingerprint':_0x218f3a[_0x1f755a(0x1c5)]},'validRows':Math[_0x1f755a(0x1ca)](0x0,_0x3b694b[_0x1f755a(0x1c0)][_0x1f755a(0x1c8)]-_0x3ba329),'invalidRows':_0x3ba329,'invalidCells':_0x3b694b[_0x1f755a(0x18e)]['length'],'emptyRows':_0x3b694b['emptyRows'][_0x1f755a(0x1c8)],'expectedBatches':previewImportBatchCount(_0x3b694b,_0x218f3a,_0x370e23[_0x1f755a(0x19e)]),'imageCount':_0x3b694b['imageCells']?.['reduce']((_0x293338,_0x1340a8)=>_0x293338+_0x1340a8[_0x1f755a(0x1a9)][_0x1f755a(0x1c8)],0x0)??0x0,'uniqueImages':_0x3b694b[_0x1f755a(0x1d4)]?.['length']??0x0,'uniqueImageBytes':_0x3b694b[_0x1f755a(0x1d4)]?.['reduce']((_0x1002d1,_0x106ff9)=>_0x1002d1+_0x106ff9[_0x1f755a(0x1d7)],0x0)??0x0,'errors':_0x3b694b[_0x1f755a(0x18e)],'warnings':_0x3b694b[_0x1f755a(0x1c3)],'sheet':_0x3b694b[_0x1f755a(0x1bc)],'checkpoint':_0x370e23[_0x1f755a(0x198)],'report':_0x370e23['report']};}),'execute':async _0x2fb82d=>checked(async()=>{const _0x5979f5=a26_0xc256a7,{args:_0x518409,manifest:_0x257fc8,contract:_0x325762,code:_0x22a723}=await prepare(_0x2fb82d);if(_0x257fc8[_0x5979f5(0x18e)][_0x5979f5(0x1c8)]){await saveImportJson(_0x518409['report'],{'status':'invalid','sourceRows':_0x257fc8['rows'][_0x5979f5(0x1c8)],'errors':_0x257fc8['errors'],'emptyRows':_0x257fc8[_0x5979f5(0x1d5)],'warnings':_0x257fc8[_0x5979f5(0x1c3)]});throw CliErrors[_0x5979f5(0x1cc)](_0x5979f5(0x1b1)+_0x257fc8[_0x5979f5(0x18e)][_0x5979f5(0x1c8)]+'\x20invalid\x20cells.\x20No\x20records\x20were\x20written.',_0x5979f5(0x1c4)+_0x518409[_0x5979f5(0x1dc)]+'.');}const _0x1f2f32=_0x257fc8[_0x5979f5(0x199)]?.[_0x5979f5(0x1c8)]?runImageExcelImport:_0x325762[_0x5979f5(0x1a0)]===0x2?runAutoIdExcelImport:runExcelImport,_0x3b561b=await _0x1f2f32({..._0x518409,'manifest':_0x257fc8,'contract':_0x325762,'appCode':_0x2fb82d['appCode'],'datasetCode':_0x22a723,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x518409[_0x5979f5(0x1c9)],_0x518409[_0x5979f5(0x1cd)]],'imageApi':{'upload':(_0x36405d,_0x37fa73)=>uploadDatasetImportImage(_0x2fb82d[_0x5979f5(0x18a)],_0x22a723,_0x36405d,_0x37fa73),'readback':(_0x135814,_0x39be0f)=>readDatasetImportImage(_0x2fb82d[_0x5979f5(0x18a)],_0x22a723,_0x135814,_0x39be0f)},'api':{'write':(_0x55bf19,_0x1122d7)=>createDatasetImportBatch(_0x2fb82d[_0x5979f5(0x18a)],_0x22a723,{'schemaFingerprint':_0x325762['schemaFingerprint'],'items':_0x55bf19,..._0x1122d7===undefined?{}:{'taskId':_0x1122d7}}),'readback':_0x4b7c69=>readDatasetImportRows(_0x2fb82d['appCode'],_0x22a723,_0x4b7c69),'readTask':_0x4f020a=>readDatasetImportTaskRows(_0x2fb82d[_0x5979f5(0x18a)],_0x22a723,_0x4f020a)}});return{'ok':!![],'data':_0x3b561b,'message':_0x5979f5(0x19c)+_0x3b561b[_0x5979f5(0x189)]+_0x5979f5(0x1d9)};})};
|