@lovrabet/lovrabet-cli 2.3.10 → 2.3.11
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_0x52ae40=a13_0x9322;function a13_0x9322(_0xcbde64,_0x108b16){_0xcbde64=_0xcbde64-0x10f;const _0x5228fa=a13_0x5228();let _0x932286=_0x5228fa[_0xcbde64];return _0x932286;}(function(_0x6923f3,_0x51d230){const _0x55501d=a13_0x9322,_0x1b1520=_0x6923f3();while(!![]){try{const _0x385f35=parseInt(_0x55501d(0x15a))/0x1+-parseInt(_0x55501d(0x119))/0x2*(-parseInt(_0x55501d(0x132))/0x3)+-parseInt(_0x55501d(0x149))/0x4*(parseInt(_0x55501d(0x154))/0x5)+-parseInt(_0x55501d(0x118))/0x6+parseInt(_0x55501d(0x122))/0x7*(parseInt(_0x55501d(0x13f))/0x8)+-parseInt(_0x55501d(0x16a))/0x9*(parseInt(_0x55501d(0x144))/0xa)+-parseInt(_0x55501d(0x128))/0xb*(-parseInt(_0x55501d(0x162))/0xc);if(_0x385f35===_0x51d230)break;else _0x1b1520['push'](_0x1b1520['shift']());}catch(_0x3612f5){_0x1b1520['push'](_0x1b1520['shift']());}}}(a13_0x5228,0x48413));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev,isProduction}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(_0x17c827=USER_ACCESS_KEY_CREATE_URL){const _0xf8a7aa=a13_0x9322;writeCliSideChannelLine(_0xf8a7aa(0x156)+PRODUCT_CONFIG[_0xf8a7aa(0x13b)]+':'),writeCliSideChannelLine('\x0a'+_0x17c827+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0xf8a7aa(0x11c));}function buildAccessKeySetupGuide(_0x7d769a=USER_ACCESS_KEY_CREATE_URL){const _0x344465=a13_0x9322;return[_0x344465(0x156)+PRODUCT_CONFIG['userCenterDisplayName']+':',_0x7d769a,_0x344465(0x126)+CLI_BIN_NAME+_0x344465(0x142)][_0x344465(0x14c)]('\x0a');}function canPromptForAccessKey(_0x2e7ea0){const _0x55aa37=a13_0x9322;return!_0x2e7ea0['nonInteractive']&&process['stdin'][_0x55aa37(0x12c)]!==![]&&process['stdout']['isTTY']!==![];}function a13_0x5228(){const _0x2a1013=['info','production','Stored\x20AccessKey\x20(','AccessKey\x20saved\x20to\x20','daily','1572FpJzfY','str','boolean','nonInteractive','env','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','code','Option\x20B:\x20apps\x20config\x20(','18ijbUEh','ClientAk','Missing\x20accessKey.','accessKey','write','project\x20config','AccessKey\x20(ak_xxx...)','global','access_key','Shorthand\x20for\x20--access-key','2611824gtKpjp','14316JKoRZE','\x20doctor','accessKeySource','\x20auth\x20login\x20--access-key\x20<ak_xxx>','=ak_xxx','Show\x20current\x20authentication\x20status','project','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','read','733117PsLdCH','Status:\x20configured\x20(not\x20remotely\x20verified)','success','Option\x20A:\x20','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Environment:\x20','8503oUATUU','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Write\x20to\x20global\x20config\x20(default)','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','isTTY','\x20auth\x20status','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20config.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','authRequired','243ZqEMoL','scope','\x20Verify:\x20','global\x20config','envName','\x20(via\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','access-key','development','userCenterDisplayName','auth','push','\x20Current\x20env:\x20','40nDzVia','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','No\x20AccessKey\x20found\x20in\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','login','2094810vgvfMv','accessKeyCreatePath','Option\x20C:\x20environment\x20variable','cancelled','\x20config.\x20Nothing\x20to\x20clear.','1604692xeOdkn','AccessKey:\x20','bool','join','check','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','trim','validation','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.','(not\x20set)','Use\x20`','5KUslaS','`auth\x20login`\x20does\x20not\x20support\x20--yes.','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Auth\x20mode:\x20','global-default','status','346678XDWNoc','string','yes'];a13_0x5228=function(){return _0x2a1013;};return a13_0x5228();}function resolveAuthScopeFlags(_0x7b372c){const _0x412d90=a13_0x9322;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x7b372c[_0x412d90(0x14b)]('global'),'explicitProject':_0x7b372c['bool'](_0x412d90(0x11f)),'policy':_0x412d90(0x158)}));}async function resolveAuthWriteInput(_0x3b867f){const _0x53b796=a13_0x9322;let _0x3cb680=(_0x3b867f['str'](_0x53b796(0x139))||_0x3b867f[_0x53b796(0x163)]('ak')||'')[_0x53b796(0x14f)]();const _0x354a10=(_0x3b867f[_0x53b796(0x163)]('env')||'')['trim'](),_0x44ebc5=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0x3cb680&&canPromptForAccessKey(_0x3b867f))try{showAccessKeyCreateHint(_0x44ebc5),_0x3cb680=await promptAccessKey('');}catch(_0x49f6fc){if(isAbortPrompt(_0x49f6fc))throw CliErrors[_0x53b796(0x147)]();throw _0x49f6fc;}if(!_0x3cb680)throw CliErrors[_0x53b796(0x150)](_0x53b796(0x110),buildAccessKeySetupGuide(_0x44ebc5));if(!ACCESS_KEY_PATTERN['test'](_0x3cb680))throw CliErrors['validation']('Invalid\x20accessKey\x20format.','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x354a10)return{'accessKey':_0x3cb680};const _0x88d6e5=normalizeEnv(_0x354a10);return{'accessKey':_0x3cb680,'env':isDaily(_0x88d6e5)?_0x53b796(0x161):isDev(_0x88d6e5)?_0x53b796(0x13a):_0x53b796(0x15e)};}export const authDefinitions=[{'service':a13_0x52ae40(0x13c),'command':a13_0x52ae40(0x143),'description':'Save\x20the\x20user\x20AccessKey\x20(global\x20by\x20default;\x20--project\x20for\x20project\x20config)','risk':a13_0x52ae40(0x112),'confirmationDescription':a13_0x52ae40(0x151),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x52ae40(0x139),'type':a13_0x52ae40(0x15b),'description':a13_0x52ae40(0x114)},{'name':'ak','type':a13_0x52ae40(0x15b),'description':a13_0x52ae40(0x117)},{'name':'global','type':a13_0x52ae40(0x164),'description':a13_0x52ae40(0x12a),'default':!![]},{'name':a13_0x52ae40(0x11f),'type':a13_0x52ae40(0x164),'description':a13_0x52ae40(0x14e),'default':![]}],async 'execute'(_0x1f010f){const _0x4ac620=a13_0x52ae40;if(_0x1f010f[_0x4ac620(0x14b)](_0x4ac620(0x15c)))throw CliErrors[_0x4ac620(0x150)](_0x4ac620(0x155),_0x4ac620(0x153)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x4ac620(0x130));const _0x518dd6=(_0x1f010f[_0x4ac620(0x163)](_0x4ac620(0x139))||_0x1f010f[_0x4ac620(0x163)]('ak')||'')[_0x4ac620(0x14f)]();if(!_0x518dd6&&_0x1f010f[_0x4ac620(0x165)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x4ac620(0x145)])};const _0x4fba37=await resolveAuthWriteInput(_0x1f010f),_0x225a4c=resolveAuthScopeFlags(_0x1f010f),_0x19786f=readScopedConfig(_0x225a4c);_0x19786f[_0x4ac620(0x111)]=_0x4fba37[_0x4ac620(0x111)];_0x4fba37[_0x4ac620(0x166)]&&(_0x19786f[_0x4ac620(0x166)]=_0x4fba37['env']);writeScopedConfig(_0x19786f,_0x225a4c);const _0x1018ac=_0x225a4c[_0x4ac620(0x115)]?_0x4ac620(0x115):_0x4ac620(0x11f),_0x51ce85=_0x19786f[_0x4ac620(0x166)]?_0x4ac620(0x13e)+_0x19786f[_0x4ac620(0x166)]+'.':'';return{'ok':!![],'message':_0x4ac620(0x160)+_0x1018ac+_0x4ac620(0x12f)+_0x51ce85+_0x4ac620(0x134)+CLI_BIN_NAME+_0x4ac620(0x12d)};}},{'service':a13_0x52ae40(0x13c),'command':'logout','description':'Clear\x20the\x20user\x20AccessKey\x20from\x20config','risk':a13_0x52ae40(0x112),'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_0x52ae40(0x115),'type':a13_0x52ae40(0x164),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x52ae40(0x11f),'type':a13_0x52ae40(0x164),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3fbd82){const _0x213152=a13_0x52ae40,_0x4698ea=resolveAuthScopeFlags(_0x3fbd82),_0x30f580=readScopedConfig(_0x4698ea),_0x41bad7=!!_0x30f580['accessKey'];delete _0x30f580[_0x213152(0x111)],writeScopedConfig(_0x30f580,_0x4698ea);const _0x1a04fd=_0x4698ea['global']?'global':_0x213152(0x11f);if(_0x41bad7)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x1a04fd+'\x20config.'};return{'ok':!![],'message':_0x213152(0x141)+_0x1a04fd+_0x213152(0x148)};}},{'service':a13_0x52ae40(0x13c),'command':a13_0x52ae40(0x159),'description':a13_0x52ae40(0x11e),'risk':a13_0x52ae40(0x121),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x52ae40(0x115),'type':a13_0x52ae40(0x164),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x52ae40(0x11f),'type':a13_0x52ae40(0x164),'description':a13_0x52ae40(0x129),'default':![]},{'name':a13_0x52ae40(0x14d),'type':a13_0x52ae40(0x164),'description':a13_0x52ae40(0x120),'default':![]}],async 'execute'(_0x71ec09){const _0x4e5244=a13_0x52ae40,_0x3cf6df=resolveAuthScopeFlags(_0x71ec09),_0x442fff=readScopedConfig(_0x3cf6df),_0x24b5b1=productEnvName('ACCESS_KEY'),_0x213f17=_0x71ec09[_0x4e5244(0x111)],_0x3a2df2=_0x71ec09[_0x4e5244(0x11b)],_0x1b0087=[_0x4e5244(0x157)+AUTH_MODE[_0x4e5244(0x10f)]];if(_0x71ec09[_0x4e5244(0x136)]&&!isProduction(_0x71ec09[_0x4e5244(0x136)]))_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x127)+_0x71ec09['envName']);_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x15f)+(_0x3cf6df['global']?_0x4e5244(0x115):_0x4e5244(0x11f))+'\x20config):\x20'+(_0x442fff[_0x4e5244(0x111)]?maskCliAccessKey(_0x442fff[_0x4e5244(0x111)]):_0x4e5244(0x152)));if(_0x213f17){const _0x58b114=maskCliAccessKey(_0x213f17);_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x14a)+_0x58b114+(_0x3a2df2?'\x20(via\x20'+_0x3a2df2+')':'')),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x123));}if(!_0x213f17){_0x1b0087[_0x4e5244(0x13d)](''),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x12e)),_0x1b0087[_0x4e5244(0x13d)](''),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x125)+CLI_BIN_NAME+_0x4e5244(0x12b)),_0x1b0087['push'](''),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x169)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x1b0087[_0x4e5244(0x13d)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x1b0087['push'](''),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x146)),_0x1b0087[_0x4e5244(0x13d)]('\x20\x20export\x20'+_0x24b5b1+_0x4e5244(0x11d)),_0x1b0087[_0x4e5244(0x13d)](''),_0x1b0087[_0x4e5244(0x13d)]('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0x1b0087[_0x4e5244(0x13d)](_0x4e5244(0x167)+CLI_BIN_NAME+_0x4e5244(0x11a));if(_0x71ec09['bool'](_0x4e5244(0x14d))){const _0x3a6207=readStoredDeviceCode();if(_0x3a6207&&!isStoredDeviceCodeExpired(_0x3a6207)){const _0x4a6eda=getUserDomain(),_0x354450=await fetchDeviceToken(_0x4a6eda,_0x3a6207[_0x4e5244(0x168)]);if(_0x354450[_0x4e5244(0x159)]===_0x4e5244(0x124)&&_0x354450[_0x4e5244(0x116)]){const _0x4eabde={'global':_0x3a6207['scope']==='global'},_0x477a6a=readScopedConfig(_0x4eabde);_0x477a6a[_0x4e5244(0x111)]=_0x354450[_0x4e5244(0x116)],writeScopedConfig(_0x477a6a,_0x4eabde),deleteStoredDeviceCode();const _0x276020=_0x354450[_0x4e5244(0x116)],_0x39944e=maskCliAccessKey(_0x276020),_0x304a66=_0x3a6207[_0x4e5244(0x133)]===_0x4e5244(0x115)?_0x4e5244(0x135):_0x4e5244(0x113);return{'ok':!![],'message':[_0x4e5244(0x157)+AUTH_MODE[_0x4e5244(0x10f)],..._0x71ec09[_0x4e5244(0x136)]&&!isProduction(_0x71ec09[_0x4e5244(0x136)])?[_0x4e5244(0x127)+_0x71ec09[_0x4e5244(0x136)]]:[],_0x4e5244(0x14a)+_0x39944e+_0x4e5244(0x137)+_0x304a66+')',_0x4e5244(0x123),'Device\x20authorization\x20completed.'][_0x4e5244(0x14c)]('\x0a')};}_0x354450[_0x4e5244(0x159)]==='expired'&&deleteStoredDeviceCode();throw CliErrors[_0x4e5244(0x131)](_0x4e5244(0x140));}throw CliErrors[_0x4e5244(0x131)](_0x1b0087[_0x4e5244(0x14c)]('\x0a'));}}return{'ok':!![],'message':_0x1b0087[_0x4e5244(0x14c)]('\x0a')};}},{'service':a13_0x52ae40(0x13c),'command':a13_0x52ae40(0x15d),'description':a13_0x52ae40(0x138),'risk':a13_0x52ae40(0x121),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x173f28){const _0x302582=a13_0x52ae40,_0x21cc5a=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x21cc5a,'meta':{'env':_0x173f28[_0x302582(0x136)]??_0x302582(0x15e)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x496732,_0x15d325){const _0x498791=a14_0x5815,_0x371642=_0x496732();while(!![]){try{const _0x5d8699=parseInt(_0x498791(0xe6))/0x1+-parseInt(_0x498791(0xe8))/0x2+parseInt(_0x498791(0xf8))/0x3*(-parseInt(_0x498791(0xf1))/0x4)+parseInt(_0x498791(0xec))/0x5+parseInt(_0x498791(0xed))/0x6+-parseInt(_0x498791(0xf2))/0x7*(-parseInt(_0x498791(0xea))/0x8)+parseInt(_0x498791(0xfa))/0x9;if(_0x5d8699===_0x15d325)break;else _0x371642['push'](_0x371642['shift']());}catch(_0x2f19b7){_0x371642['push'](_0x371642['shift']());}}}(a14_0x18ca,0xe42d2));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x10b394=a14_0x5815;super(_0x10b394(0xeb)),this[_0x10b394(0xfb)]=_0x10b394(0xf5);}}function createSafeRl(){const _0x36593a=a14_0x5815,_0x26d160=createInterface({'input':process[_0x36593a(0xef)],'output':process[_0x36593a(0xf7)]});let _0x82271f;const _0x144974=new Promise((_0x1aecb1,_0x5e1ebd)=>{const _0x2451aa=_0x36593a;_0x82271f=()=>{const _0x228b33=a14_0x5815;_0x82271f&&(_0x26d160[_0x228b33(0xf6)](_0x228b33(0xf3),_0x82271f),_0x82271f=undefined);try{_0x26d160[_0x228b33(0xf4)]();}catch{}_0x5e1ebd(new AbortPrompt());},_0x26d160[_0x2451aa(0xf0)]('SIGINT',_0x82271f);}),_0x41937e=()=>{const _0x18ae4c=_0x36593a;_0x82271f&&(_0x26d160[_0x18ae4c(0xf6)](_0x18ae4c(0xf3),_0x82271f),_0x82271f=undefined);try{_0x26d160['close']();}catch{}};return{'rl':_0x26d160,'abortPromise':_0x144974,'disposeSuccess':_0x41937e};}export async function promptAccessKey(_0x30cf2f=''){const {rl:_0x260213,abortPromise:_0x2ac5b1,disposeSuccess:_0x402892}=createSafeRl(),_0x3dfe97=new Promise(_0x48d305=>{const _0x828253=a14_0x5815,_0x5b6073=_0x30cf2f?_0x828253(0xee)+_0x30cf2f+_0x828253(0xe9):_0x828253(0xe5);_0x260213[_0x828253(0xf9)](_0x5b6073,_0x234255=>{const _0x309da1=_0x828253;_0x402892(),_0x48d305(_0x234255[_0x309da1(0xe7)]()||_0x30cf2f);});});return Promise['race']([_0x3dfe97,_0x2ac5b1]);}function a14_0x5815(_0x5c9fb7,_0x15a3a3){_0x5c9fb7=_0x5c9fb7-0xe5;const _0x18cad1=a14_0x18ca();let _0x581511=_0x18cad1[_0x5c9fb7];return _0x581511;}export function isAbortPrompt(_0x32336d){const _0x3a940d=a14_0x5815;return _0x32336d instanceof Error&&_0x32336d['name']===_0x3a940d(0xf5);}function a14_0x18ca(){const _0x1f337c=['AccessKey\x20(paste\x20ak_...):\x20','1740687FnEICw','trim','2830286EHCGTg','):\x20','23584tEWAUa','User\x20aborted\x20prompt','6191570GRSdgx','4880376EWIvnJ','AccessKey\x20(','stdin','once','6061076BCrMJD','98RDgbCr','SIGINT','close','AbortPrompt','removeListener','stdout','3UKewxb','question','282177NKaJQH','name'];a14_0x18ca=function(){return _0x1f337c;};return a14_0x18ca();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a15_0x8240(_0x277153,_0x3aab31){_0x277153=_0x277153-0x170;const _0x557f9d=a15_0x557f();let _0x824080=_0x557f9d[_0x277153];return _0x824080;}const a15_0x8d9a1b=a15_0x8240;(function(_0x24be5f,_0x520571){const _0x54133d=a15_0x8240,_0x3ee6fc=_0x24be5f();while(!![]){try{const _0x4c8c18=parseInt(_0x54133d(0x183))/0x1+parseInt(_0x54133d(0x17f))/0x2+-parseInt(_0x54133d(0x17c))/0x3*(-parseInt(_0x54133d(0x177))/0x4)+parseInt(_0x54133d(0x174))/0x5*(parseInt(_0x54133d(0x181))/0x6)+-parseInt(_0x54133d(0x17e))/0x7*(-parseInt(_0x54133d(0x186))/0x8)+-parseInt(_0x54133d(0x173))/0x9*(parseInt(_0x54133d(0x184))/0xa)+parseInt(_0x54133d(0x172))/0xb*(-parseInt(_0x54133d(0x179))/0xc);if(_0x4c8c18===_0x520571)break;else _0x3ee6fc['push'](_0x3ee6fc['shift']());}catch(_0x5ba862){_0x3ee6fc['push'](_0x3ee6fc['shift']());}}}(a15_0x557f,0x6bc60));import{getBffEndpointContract}from'../../core/api-client.js';function a15_0x557f(){const _0x250d33=['11zCsuLK','4716fSZXsY','17035RHYzql','version','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','111576ivrUWd','(none)','15512712EZpxVV','detail','gmtModified','3ojaeHI','description','7jNcMCe','704360YYbDVU','name','1182RHGOWi','str','848437RcEItz','16840zIXUHy','functionName','5735136vQiAvw','bff','appCode','read'];a15_0x557f=function(){return _0x250d33;};return a15_0x557f();}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x8d9a1b(0x187),'command':a15_0x8d9a1b(0x17a),'description':a15_0x8d9a1b(0x176),'risk':a15_0x8d9a1b(0x171),'flags':[{...NAME_FLAG,'required':!![],'description':'Backend\x20Function\x20name'}],async 'execute'(_0x3f245d){const _0x1c973d=a15_0x8d9a1b,_0x310453=await getBffEndpointContract(_0x3f245d[_0x1c973d(0x170)],_0x3f245d[_0x1c973d(0x182)](_0x1c973d(0x180)));return{'ok':!![],'data':{'appCode':_0x310453[_0x1c973d(0x170)],'functionName':_0x310453[_0x1c973d(0x185)],'description':_0x310453[_0x1c973d(0x17d)]||_0x1c973d(0x178),'version':_0x310453[_0x1c973d(0x175)],'gmtModified':_0x310453[_0x1c973d(0x17b)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x18cf8a=a16_0x5ae6;(function(_0x26a208,_0x19cbf7){const _0xb7bf66=a16_0x5ae6,_0x2ca329=_0x26a208();while(!![]){try{const _0x1cce57=parseInt(_0xb7bf66(0xbe))/0x1+-parseInt(_0xb7bf66(0xbd))/0x2+parseInt(_0xb7bf66(0xb7))/0x3*(parseInt(_0xb7bf66(0xae))/0x4)+-parseInt(_0xb7bf66(0xac))/0x5*(parseInt(_0xb7bf66(0xbb))/0x6)+parseInt(_0xb7bf66(0xb6))/0x7+parseInt(_0xb7bf66(0xba))/0x8*(-parseInt(_0xb7bf66(0xad))/0x9)+parseInt(_0xb7bf66(0xb9))/0xa*(parseInt(_0xb7bf66(0xb4))/0xb);if(_0x1cce57===_0x19cbf7)break;else _0x2ca329['push'](_0x2ca329['shift']());}catch(_0x2da1e2){_0x2ca329['push'](_0x2ca329['shift']());}}}(a16_0x3747,0x9e6da));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a16_0x3747(){const _0x1868d9=['now','bff','read','str','exec','99xOIVoo','params','1107092eZoIRR','42594lzLVWb','Backend\x20Function\x20name\x20to\x20execute','22970rSERPN','2256jsSdjA','3222186znfBzM','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','557860ManFMA','583715pqRMQG','name','10HXpfcF','774KgJErr','356HdPkOj'];a16_0x3747=function(){return _0x1868d9;};return a16_0x3747();}function a16_0x5ae6(_0x4c4d03,_0x90a5b4){_0x4c4d03=_0x4c4d03-0xac;const _0x3747bd=a16_0x3747();let _0x5ae66e=_0x3747bd[_0x4c4d03];return _0x5ae66e;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x18cf8a(0xb0),'command':a16_0x18cf8a(0xb3),'description':a16_0x18cf8a(0xbc),'risk':a16_0x18cf8a(0xb1),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x18cf8a(0xb8)},PARAMS_FLAG],async 'execute'(_0x2fc531){const _0x704290=a16_0x18cf8a,_0x487376=parseJsonParams(_0x2fc531[_0x704290(0xb2)](_0x704290(0xb5))),_0x3be82f=Date[_0x704290(0xaf)](),_0x34cbb7=await executeSdkBff(_0x2fc531[_0x704290(0xb2)](_0x704290(0xbf)),_0x487376),_0x1803c3=Date[_0x704290(0xaf)]()-_0x3be82f;return{'ok':!![],'data':{'result':_0x34cbb7,'elapsed':_0x1803c3},'message':'Backend\x20Function\x20executed\x20in\x20'+_0x1803c3+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17b77c,_0x54b820){const _0x174648=a17_0x33a7,_0x51caca=_0x17b77c();while(!![]){try{const _0x3008a7=-parseInt(_0x174648(0xd4))/0x1+parseInt(_0x174648(0xd9))/0x2+-parseInt(_0x174648(0xd7))/0x3+parseInt(_0x174648(0xda))/0x4*(parseInt(_0x174648(0xd8))/0x5)+parseInt(_0x174648(0xd6))/0x6+-parseInt(_0x174648(0xdb))/0x7+parseInt(_0x174648(0xd5))/0x8;if(_0x3008a7===_0x54b820)break;else _0x51caca['push'](_0x51caca['shift']());}catch(_0x2e404a){_0x51caca['push'](_0x51caca['shift']());}}}(a17_0x6b7b,0x9404f));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a17_0x6b7b(){const _0x1f5ed3=['68936uVBbip','2810213atrunb','716387fyjfiF','146032Wdkuxv','5906592ZltrCR','101361YMJOMf','40gCbOsi','1234724cRebUy'];a17_0x6b7b=function(){return _0x1f5ed3;};return a17_0x6b7b();}function a17_0x33a7(_0x38b0ee,_0x530749){_0x38b0ee=_0x38b0ee-0xd4;const _0x6b7b32=a17_0x6b7b();let _0x33a7fe=_0x6b7b32[_0x38b0ee];return _0x33a7fe;}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x9cad73=a18_0x20a3;(function(_0x4261e0,_0x362a2e){const _0x273558=a18_0x20a3,_0x356e09=_0x4261e0();while(!![]){try{const _0x183f1a=parseInt(_0x273558(0x12d))/0x1*(parseInt(_0x273558(0x110))/0x2)+-parseInt(_0x273558(0x121))/0x3*(parseInt(_0x273558(0x11d))/0x4)+-parseInt(_0x273558(0x10e))/0x5*(-parseInt(_0x273558(0x116))/0x6)+parseInt(_0x273558(0x11a))/0x7*(parseInt(_0x273558(0x12a))/0x8)+-parseInt(_0x273558(0x12e))/0x9+parseInt(_0x273558(0x12f))/0xa*(parseInt(_0x273558(0x11f))/0xb)+-parseInt(_0x273558(0x114))/0xc*(parseInt(_0x273558(0x125))/0xd);if(_0x183f1a===_0x362a2e)break;else _0x356e09['push'](_0x356e09['shift']());}catch(_0x31cd11){_0x356e09['push'](_0x356e09['shift']());}}}(a18_0x29b6,0xacae2));import{CliErrors}from'../../errors.js';function a18_0x29b6(){const _0x4fc646=['568qaDoyM','cli-skill-install','\x20installed','25sRHLQM','1233513elNNZJ','173230pWyZkQ','repairCommand','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','CLI\x20Built-in\x20Skill\x20','10cEpwop','error','99118uaoGvH','code','Built-in\x20Skill\x20install\x20failed\x20[','unknown','12385104pwXOQM','log','1673124UBiNJC','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','nonInteractive','apiError','41461AyqzDU','setLogPath',']:\x20','1201228roIwgk','changed','165pgBAsy','installedPath','6TafvhR','skillVersion','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','info','13ytuiwL','inherit','\x20at\x20','cli-skill','\x20is\x20already\x20current'];a18_0x29b6=function(){return _0x4fc646;};return a18_0x29b6();}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a18_0x20a3(_0x214fcc,_0x3bb802){_0x214fcc=_0x214fcc-0x10e;const _0x29b660=a18_0x29b6();let _0x20a3ed=_0x29b660[_0x214fcc];return _0x20a3ed;}export const cliSkillDefinitions=[{'service':a18_0x9cad73(0x128),'command':'install','description':a18_0x9cad73(0x131),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2ae7bb){const _0xdd0914=a18_0x9cad73;logger[_0xdd0914(0x11b)](process['cwd']()),logger[_0xdd0914(0x124)](_0xdd0914(0x12b),_0xdd0914(0x123));const _0x2d0a37=installBuiltinSkill({'stdio':_0x2ae7bb[_0xdd0914(0x118)]?'pipe':_0xdd0914(0x126)});if(!_0x2d0a37['ok'])throw CliErrors[_0xdd0914(0x119)](_0xdd0914(0x112)+(_0x2d0a37[_0xdd0914(0x111)]||'INSTALL_FAILED')+_0xdd0914(0x11c)+(_0x2d0a37[_0xdd0914(0x10f)]||_0xdd0914(0x113)),_0xdd0914(0x117)+_0x2d0a37[_0xdd0914(0x130)]);const _0x53b7c3=_0x2d0a37[_0xdd0914(0x120)]?_0xdd0914(0x127)+_0x2d0a37[_0xdd0914(0x120)]:'';return console[_0xdd0914(0x115)](_0x2d0a37[_0xdd0914(0x11e)]?'CLI\x20Built-in\x20Skill\x20'+_0x2d0a37[_0xdd0914(0x122)]+_0xdd0914(0x12c)+_0x53b7c3:_0xdd0914(0x132)+_0x2d0a37[_0xdd0914(0x122)]+_0xdd0914(0x129)+_0x53b7c3),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5325a5,_0x1f9bfd){const _0x241df7=a19_0x1129,_0x474ea4=_0x5325a5();while(!![]){try{const _0x370b9f=parseInt(_0x241df7(0x187))/0x1+-parseInt(_0x241df7(0x194))/0x2+parseInt(_0x241df7(0x18b))/0x3*(parseInt(_0x241df7(0x192))/0x4)+-parseInt(_0x241df7(0x193))/0x5+parseInt(_0x241df7(0x184))/0x6*(-parseInt(_0x241df7(0x186))/0x7)+-parseInt(_0x241df7(0x17e))/0x8+parseInt(_0x241df7(0x180))/0x9*(parseInt(_0x241df7(0x189))/0xa);if(_0x370b9f===_0x1f9bfd)break;else _0x474ea4['push'](_0x474ea4['shift']());}catch(_0x33ed10){_0x474ea4['push'](_0x474ea4['shift']());}}}(a19_0x1508,0xc9727));function a19_0x1508(){const _0x4388b8=['33410vOhkol','global','183AQsHJN','\x20first.','inProject','newConfigFileName','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','project','Not\x20inside\x20a\x20project\x20(no\x20','5648LjZyot','1812570cVbiNP','1968220SnmGVg','\x20(global)','10923800alYsHc','project-or-global-explicit','6921BiEbIB','validation','Add\x20--global\x20to\x20write\x20to\x20~/',',\x20or\x20create\x20a\x20project-local\x20','187926onDMGN','global-default','77yrGGxn','1226396RxROCr','Use\x20only\x20one\x20config\x20scope\x20flag.'];a19_0x1508=function(){return _0x4388b8;};return a19_0x1508();}import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a19_0x1129(_0x28b7dc,_0x276763){_0x28b7dc=_0x28b7dc-0x17d;const _0x1508ae=a19_0x1508();let _0x11291=_0x1508ae[_0x28b7dc];return _0x11291;}export function resolveConfigScope(_0x31aa03){const _0x1a7655=a19_0x1129,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x5ede24}=_0x31aa03;if(explicitGlobal&&explicitProject)throw CliErrors['validation'](_0x1a7655(0x18f),_0x1a7655(0x188));if(explicitGlobal)return'global';if(explicitProject)return _0x1a7655(0x190);switch(_0x5ede24){case _0x1a7655(0x185):return _0x1a7655(0x18a);case _0x1a7655(0x17f):if(!(_0x31aa03[_0x1a7655(0x18d)]??isInProject()))throw CliErrors[_0x1a7655(0x181)](_0x1a7655(0x191)+PRODUCT_CONFIG[_0x1a7655(0x18e)]+'\x20found).',_0x1a7655(0x182)+PRODUCT_CONFIG['newConfigFileName']+_0x1a7655(0x183)+PRODUCT_CONFIG[_0x1a7655(0x18e)]+_0x1a7655(0x18c));return _0x1a7655(0x190);}}export function toScopeFlags(_0x3d4efa){const _0x1f59b1=a19_0x1129;return{'global':_0x3d4efa===_0x1f59b1(0x18a)};}export function formatScopeLabel(_0x1ee8f0){const _0x3ef6bd=a19_0x1129;return _0x1ee8f0==='global'?_0x3ef6bd(0x17d):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a20_0x4682(_0x2017d9,_0x120940){_0x2017d9=_0x2017d9-0x151;const _0x2d5e09=a20_0x2d5e();let _0x46821f=_0x2d5e09[_0x2017d9];return _0x46821f;}(function(_0x33a26f,_0x5aed39){const _0x333f39=a20_0x4682,_0x57abb3=_0x33a26f();while(!![]){try{const _0x4c612c=parseInt(_0x333f39(0x156))/0x1+-parseInt(_0x333f39(0x169))/0x2+parseInt(_0x333f39(0x158))/0x3*(-parseInt(_0x333f39(0x15c))/0x4)+-parseInt(_0x333f39(0x153))/0x5*(parseInt(_0x333f39(0x165))/0x6)+-parseInt(_0x333f39(0x161))/0x7*(-parseInt(_0x333f39(0x15b))/0x8)+parseInt(_0x333f39(0x15a))/0x9+parseInt(_0x333f39(0x15d))/0xa*(-parseInt(_0x333f39(0x15f))/0xb);if(_0x4c612c===_0x5aed39)break;else _0x57abb3['push'](_0x57abb3['shift']());}catch(_0x33da6e){_0x57abb3['push'](_0x57abb3['shift']());}}}(a20_0x2d5e,0xdc4e6));import{CliErrors}from'../../errors.js';function isSet(_0x3f8ec8,_0x10d1e9){const _0x44ee45=a20_0x4682,_0x589343=_0x3f8ec8[_0x44ee45(0x16a)](_0x10d1e9);return _0x589343!==undefined&&_0x589343!==''&&_0x589343!==![]&&_0x589343!==0x0;}function a20_0x2d5e(){const _0x23f543=['some','43519DIdMQm','map','test','validation','2082cqZuUJ','length',',\x20got\x20\x22','filter','222154lwDogT','flag','Exactly\x20one\x20of\x20','Invalid\x20--','23865ZtAKGx','\x20is\x20required\x20for\x20`','Provide\x20one\x20of:\x20','1312789ROgeRK','join','9186KJOFAf','str','7139799vMSSAL','1600IcmtIn','168TatHtn','5512140XtTCcP','Use\x20only\x20one\x20of:\x20','11WBCHpL'];a20_0x2d5e=function(){return _0x23f543;};return a20_0x2d5e();}function fmtNames(_0x57e279){const _0xebeec4=a20_0x4682;return _0x57e279[_0xebeec4(0x162)](_0x41e04f=>'--'+_0x41e04f)[_0xebeec4(0x157)](',\x20');}export function requireOneOf(_0x127255,_0x2d46d4,_0x23294c){const _0x5dac02=a20_0x4682,_0x5938c4=_0x2d46d4[_0x5dac02(0x168)](_0x413329=>isSet(_0x127255,_0x413329));if(_0x5938c4[_0x5dac02(0x166)]!==0x1)throw CliErrors[_0x5dac02(0x164)](_0x5938c4[_0x5dac02(0x166)]===0x0?_0x5dac02(0x151)+fmtNames(_0x2d46d4)+_0x5dac02(0x154)+_0x23294c+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x2d46d4)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x5938c4)+'.',_0x5938c4[_0x5dac02(0x166)]===0x0?_0x5dac02(0x155)+fmtNames(_0x2d46d4):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x3a8e1d,_0x11346b,_0x52e738){const _0x1b387e=a20_0x4682;if(!_0x11346b[_0x1b387e(0x160)](_0x40b96a=>isSet(_0x3a8e1d,_0x40b96a)))throw CliErrors['validation']('At\x20least\x20one\x20of\x20'+fmtNames(_0x11346b)+_0x1b387e(0x154)+_0x52e738+'`.',_0x1b387e(0x155)+fmtNames(_0x11346b));}export function mutuallyExclusive(_0x447412,_0x17140c,_0x3661fb){const _0x43ba65=a20_0x4682,_0x59e3d7=_0x17140c[_0x43ba65(0x168)](_0x1811db=>isSet(_0x447412,_0x1811db));if(_0x59e3d7[_0x43ba65(0x166)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x59e3d7)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x3661fb+'`.',_0x43ba65(0x15e)+fmtNames(_0x17140c));}export function validatePattern(_0x4a5960,_0x24e4c8,_0x1036b2,_0x2d94bf){const _0x41bd28=a20_0x4682,_0x459028=_0x4a5960[_0x41bd28(0x159)](_0x24e4c8);if(_0x459028&&!_0x1036b2[_0x41bd28(0x163)](_0x459028))throw CliErrors[_0x41bd28(0x164)](_0x41bd28(0x152)+_0x24e4c8+':\x20expected\x20'+_0x2d94bf+_0x41bd28(0x167)+_0x459028+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a21_0x549e(_0x3d96c0,_0x1dc71e){_0x3d96c0=_0x3d96c0-0x13e;const _0x27df5e=a21_0x27df();let _0x549e6d=_0x27df5e[_0x3d96c0];return _0x549e6d;}const a21_0x23aafe=a21_0x549e;(function(_0x32d3d7,_0x137526){const _0x7e4d77=a21_0x549e,_0x5ac038=_0x32d3d7();while(!![]){try{const _0x4e6bde=parseInt(_0x7e4d77(0x142))/0x1+parseInt(_0x7e4d77(0x143))/0x2+-parseInt(_0x7e4d77(0x14c))/0x3+-parseInt(_0x7e4d77(0x145))/0x4+parseInt(_0x7e4d77(0x14d))/0x5*(-parseInt(_0x7e4d77(0x14f))/0x6)+-parseInt(_0x7e4d77(0x147))/0x7+parseInt(_0x7e4d77(0x13e))/0x8;if(_0x4e6bde===_0x137526)break;else _0x5ac038['push'](_0x5ac038['shift']());}catch(_0xe50655){_0x5ac038['push'](_0x5ac038['shift']());}}}(a21_0x27df,0x30f61));export const GLOBAL_SCOPE_FLAG={'name':a21_0x23aafe(0x140),'type':'boolean','default':![],'description':a21_0x23aafe(0x141)};function a21_0x27df(){const _0xb0e5c7=['266988KTDTpv','3506vAXvLX','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','1466608kfgBlw','Resource\x20name\x20for\x20lookup','2369815nOBlRe','params','Return\x20full\x20raw\x20response\x20object','sqlcode','code','6384eqiAqi','612995YeMSXg','string','18Mhnuaz','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','8055408KtCEPq','Resource\x20ID','global','Write\x20to\x20the\x20global\x20configuration'];a21_0x27df=function(){return _0xb0e5c7;};return a21_0x27df();}export const CODE_FLAG={'name':a21_0x23aafe(0x14b),'type':a21_0x23aafe(0x14e),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x23aafe(0x144)}};export const SQLCODE_FLAG={'name':a21_0x23aafe(0x14a),'type':'string','required':!![],'description':a21_0x23aafe(0x151),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':'verbose','type':'boolean','description':a21_0x23aafe(0x149)};export const PARAMS_FLAG={'name':a21_0x23aafe(0x148),'type':a21_0x23aafe(0x14e),'description':a21_0x23aafe(0x150)};export const NAME_FLAG={'name':'name','type':a21_0x23aafe(0x14e),'description':a21_0x23aafe(0x146)};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a21_0x23aafe(0x13f)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x188368,_0x1118ec){const _0xe2df77=a22_0xb534,_0x138063=_0x188368();while(!![]){try{const _0x321d12=parseInt(_0xe2df77(0x18d))/0x1*(-parseInt(_0xe2df77(0x1a0))/0x2)+-parseInt(_0xe2df77(0x19d))/0x3*(parseInt(_0xe2df77(0x190))/0x4)+-parseInt(_0xe2df77(0x18c))/0x5*(parseInt(_0xe2df77(0x19f))/0x6)+parseInt(_0xe2df77(0x199))/0x7*(-parseInt(_0xe2df77(0x18f))/0x8)+-parseInt(_0xe2df77(0x19b))/0x9+parseInt(_0xe2df77(0x19c))/0xa+parseInt(_0xe2df77(0x192))/0xb;if(_0x321d12===_0x1118ec)break;else _0x138063['push'](_0x138063['shift']());}catch(_0x9bd632){_0x138063['push'](_0x138063['shift']());}}}(a22_0x57f1,0x862fb));import{existsSync,statSync}from'node:fs';function a22_0x57f1(){const _0xd70279=['29dWLEeJ','size','7466504OvuKrF','15220bmOuoy','toFixed','24895101kQnnAx','\x20MB','trim','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','validation','ceil','File\x20not\x20found:\x20','7UYGeBM','\x20path\x20is\x20required.','899091VCbUss','3212520lXspTe','123mrDgSO','isFile','186ZtcHWo','16046mSEeLF','File\x20is\x20not\x20a\x20regular\x20file:\x20','98860MwrzpG'];a22_0x57f1=function(){return _0xd70279;};return a22_0x57f1();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a22_0xb534(_0x2b2474,_0x1a19da){_0x2b2474=_0x2b2474-0x18b;const _0x57f193=a22_0x57f1();let _0xb534c5=_0x57f193[_0x2b2474];return _0xb534c5;}function formatBytes(_0x404750){const _0x251f96=a22_0xb534;if(_0x404750>=BYTES_PER_MB){const _0x22aba0=Math[_0x251f96(0x197)](_0x404750/BYTES_PER_MB*0x64)/0x64;return _0x22aba0[_0x251f96(0x191)](0x2)+_0x251f96(0x193);}return _0x404750+'\x20B';}export function requireRuntimeUploadFile(_0x3afba1,_0x522ccd){const _0x1c6b89=a22_0xb534,_0x5efb94=_0x3afba1[_0x1c6b89(0x194)]();if(!_0x5efb94)throw CliErrors[_0x1c6b89(0x196)](_0x522ccd+_0x1c6b89(0x19a));if(!existsSync(_0x5efb94))throw CliErrors[_0x1c6b89(0x196)](_0x1c6b89(0x198)+_0x5efb94);const _0x2310b7=statSync(_0x5efb94);if(!_0x2310b7[_0x1c6b89(0x19e)]())throw CliErrors[_0x1c6b89(0x196)](_0x1c6b89(0x18b)+_0x5efb94);if(_0x2310b7['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x1c6b89(0x196)](_0x1c6b89(0x195)+_0x5efb94+'\x20('+formatBytes(_0x2310b7[_0x1c6b89(0x18e)])+')');return{'path':_0x5efb94,'size':_0x2310b7[_0x1c6b89(0x18e)]};}
|
|
@@ -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_0x1053e1=a23_0x534c;(function(_0x23361a,_0x126995){const _0x3b60a9=a23_0x534c,_0x1cea42=_0x23361a();while(!![]){try{const _0x10589a=parseInt(_0x3b60a9(0x114))/0x1*(-parseInt(_0x3b60a9(0x106))/0x2)+parseInt(_0x3b60a9(0xff))/0x3*(-parseInt(_0x3b60a9(0x119))/0x4)+parseInt(_0x3b60a9(0x101))/0x5+parseInt(_0x3b60a9(0x10b))/0x6+parseInt(_0x3b60a9(0x11c))/0x7*(-parseInt(_0x3b60a9(0xfa))/0x8)+-parseInt(_0x3b60a9(0x116))/0x9*(parseInt(_0x3b60a9(0x11e))/0xa)+parseInt(_0x3b60a9(0x10f))/0xb;if(_0x10589a===_0x126995)break;else _0x1cea42['push'](_0x1cea42['shift']());}catch(_0x24c3d5){_0x1cea42['push'](_0x1cea42['shift']());}}}(a23_0xce4f,0x4d718));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_0x534c(_0x20269c,_0x82941b){_0x20269c=_0x20269c-0xef;const _0xce4f80=a23_0xce4f();let _0x534c1c=_0xce4f80[_0x20269c];return _0x534c1c;}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(_0x522c1f){const _0x1824ba=a23_0x534c,_0x497f3e=_0x522c1f[_0x1824ba(0x12f)]('.');if(_0x497f3e[_0x1824ba(0xfd)]!==0x3||_0x497f3e[0x0]!==_0x1824ba(0x104)||_0x497f3e[0x2]!==_0x1824ba(0x10c))return undefined;const _0x227495=_0x497f3e[0x1]?.[_0x1824ba(0x12b)]();return _0x227495?_0x227495:undefined;}function a23_0xce4f(){const _0x57b8ee=['get','\x20config\x20get\x20<key>','trim','(none)','read','includes','split','Value\x20to\x20assign','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','isArray','delete','object','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','format','field','Missing\x20key\x20or\x20value.','project-or-global-explicit','Delete\x20a\x20configuration\x20value','Settable\x20keys:\x20','\x20\x20global:\x20\x20','\x20(global)','pretty','8FBFRkh','config','join','length','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','15SXpaTU','set','2426900OGnfgC','key','accessKey','apps','Usage:\x20','2ylppYU','Missing\x20key\x20argument.','validation','keys','write','2034978ZxWAuU','appcode','Get\x20a\x20config\x20value','locale','11094424aANrYf','Key\x20not\x20found:\x20','Deleted\x20`','Config\x20files:\x0a','Set\x20a\x20configuration\x20value','265417QpRWOu','Key\x20already\x20absent:\x20','511587fDJuQk','\x22.\x20Allowed:\x20','Invalid\x20value\x20for\x20\x22','373144qJvJTi','../../context.js','log','4294801VPWeHB','pageSize','30UAOGPG','\x22\x20is\x20not\x20settable.','value','pageSize\x20must\x20be\x20a\x20positive\x20number','alias','stringify','args','global','\x20config\x20set\x20<key>\x20<value>\x20[--global]','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US',';\x20apps.<alias>.appcode'];a23_0xce4f=function(){return _0x57b8ee;};return a23_0xce4f();}function parseAliasDeleteKey(_0x4be56e){const _0x1d5469=a23_0x534c,_0x238d14=_0x4be56e['split']('.');if(_0x238d14[_0x1d5469(0xfd)]===0x2&&_0x238d14[0x0]===_0x1d5469(0x104)){const _0xd6e990=_0x238d14[0x1]?.[_0x1d5469(0x12b)]();return _0xd6e990?{'alias':_0xd6e990}:undefined;}if(_0x238d14[_0x1d5469(0xfd)]===0x3&&_0x238d14[0x0]===_0x1d5469(0x104)&&_0x238d14[0x2]===_0x1d5469(0x10c)){const _0x328809=_0x238d14[0x1]?.[_0x1d5469(0x12b)]();return _0x328809?{'alias':_0x328809,'field':_0x1d5469(0x10c)}:undefined;}return undefined;}function setLocalAppAlias(_0x93782c,_0x504984,_0x1c8caa){const _0x52defe=a23_0x534c,_0x3c3f0a=_0x93782c[_0x52defe(0x104)]&&typeof _0x93782c[_0x52defe(0x104)]===_0x52defe(0xef)&&!Array['isArray'](_0x93782c[_0x52defe(0x104)])?_0x93782c['apps']:{},_0x392718=_0x3c3f0a[_0x504984]&&typeof _0x3c3f0a[_0x504984]==='object'&&!Array[_0x52defe(0x132)](_0x3c3f0a[_0x504984])?_0x3c3f0a[_0x504984]:{};_0x392718[_0x52defe(0x10c)]=_0x1c8caa,_0x3c3f0a[_0x504984]=_0x392718,_0x93782c['apps']=_0x3c3f0a;}function deleteLocalAppAlias(_0x3915cd,_0x18f7e3){const _0x21bb1c=a23_0x534c;if(!_0x3915cd['apps']||typeof _0x3915cd['apps']!==_0x21bb1c(0xef)||Array[_0x21bb1c(0x132)](_0x3915cd['apps']))return![];const _0x4619bf=_0x3915cd['apps'],_0x1f775c=_0x4619bf[_0x18f7e3[_0x21bb1c(0x122)]];if(!_0x1f775c||typeof _0x1f775c!=='object'||Array[_0x21bb1c(0x132)](_0x1f775c))return![];if(!_0x18f7e3[_0x21bb1c(0xf2)])return delete _0x4619bf[_0x18f7e3['alias']],!![];if(!(_0x18f7e3['field']in _0x1f775c))return![];return delete _0x1f775c[_0x18f7e3[_0x21bb1c(0xf2)]],Object[_0x21bb1c(0x109)](_0x1f775c)['length']===0x0&&delete _0x4619bf[_0x18f7e3['alias']],!![];}const listDef={'service':a23_0x1053e1(0xfb),'command':'list','description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xf40a9){const _0x39ecf3=a23_0x1053e1,{buildConfigFromFlags:_0x586a54}=await import(_0x39ecf3(0x11a)),_0x5f155b=_0x586a54({}),_0x5611c6=redactCliConfigCredentials(_0x5f155b['raw']),_0x226a79=getProjectConfigPath(),_0x19531d=resolveWriteConfigPath(_0x39ecf3(0x125));if(_0xf40a9[_0x39ecf3(0xf1)]===_0x39ecf3(0xf9))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON['stringify'](_0x5611c6,null,0x2)+'\x0a\x0a')+_0x39ecf3(0x112)+('\x20\x20project:\x20'+(_0x226a79??_0x39ecf3(0x12c))+'\x0a')+(_0x39ecf3(0xf7)+_0x19531d)};return{'ok':!![],'data':{'effective':_0x5611c6,'configFiles':{'project':_0x226a79??null,'global':_0x19531d}}};}},getDef={'service':a23_0x1053e1(0xfb),'command':a23_0x1053e1(0x129),'description':a23_0x1053e1(0x10d),'risk':a23_0x1053e1(0x12d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1053e1(0x102),'description':a23_0x1053e1(0x131),'required':!![]}],'flags':[],async 'execute'(_0x53c6c0){const _0x43f5e2=a23_0x1053e1,_0x13deda=_0x53c6c0['args'][0x0];if(!_0x13deda)throw CliErrors['validation'](_0x43f5e2(0x107),_0x43f5e2(0x105)+CLI_BIN_NAME+_0x43f5e2(0x12a));const {buildConfigFromFlags:_0x273933}=await import(_0x43f5e2(0x11a)),{raw:_0x4677ec}=_0x273933({});if(_0x13deda[_0x43f5e2(0x12e)]('.')){const _0x1ed4a7=_0x13deda[_0x43f5e2(0x12f)]('.');let _0x399bfc=_0x4677ec;for(const _0x4aa337 of _0x1ed4a7){if(_0x399bfc==null||typeof _0x399bfc!=='object')throw CliErrors[_0x43f5e2(0x108)](_0x43f5e2(0x110)+_0x13deda);_0x399bfc=_0x399bfc[_0x4aa337];}if(_0x399bfc===undefined)throw CliErrors[_0x43f5e2(0x108)](_0x43f5e2(0x110)+_0x13deda);const _0x27ed0e=redactCliConfigValue(_0x13deda,_0x399bfc);return console[_0x43f5e2(0x11b)](typeof _0x27ed0e===_0x43f5e2(0xef)?JSON[_0x43f5e2(0x123)](_0x27ed0e,null,0x2):String(_0x27ed0e)),{'ok':!![]};}const _0x116c06=_0x4677ec[_0x13deda];if(_0x116c06===undefined)throw CliErrors[_0x43f5e2(0x108)]('Key\x20not\x20found:\x20'+_0x13deda);const _0x594d33=redactCliConfigValue(_0x13deda,_0x116c06);return console[_0x43f5e2(0x11b)](typeof _0x594d33===_0x43f5e2(0xef)?JSON[_0x43f5e2(0x123)](_0x594d33,null,0x2):String(_0x594d33)),{'ok':!![]};}},setDef={'service':a23_0x1053e1(0xfb),'command':a23_0x1053e1(0x100),'description':a23_0x1053e1(0x113),'risk':'write','confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1053e1(0x102),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x1053e1(0x120),'description':a23_0x1053e1(0x130),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x38c4bb){const _0x59e404=a23_0x1053e1,_0x548906=_0x38c4bb[_0x59e404(0x124)][0x0],_0x253a24=_0x38c4bb[_0x59e404(0x124)][0x1];if(!_0x548906||_0x253a24===undefined)throw CliErrors[_0x59e404(0x108)](_0x59e404(0xf3),_0x59e404(0x105)+CLI_BIN_NAME+_0x59e404(0x126));if(ENUM_KEYS[_0x548906]&&!ENUM_KEYS[_0x548906][_0x59e404(0x12e)](_0x253a24))throw CliErrors[_0x59e404(0x108)](_0x59e404(0x118)+_0x548906+_0x59e404(0x117)+ENUM_KEYS[_0x548906][_0x59e404(0xfc)](',\x20'));if(isCliProtectedConfigKey(_0x548906))throw CliErrors[_0x59e404(0x108)]('\x22'+_0x548906+_0x59e404(0xf0));if(_0x548906===_0x59e404(0x11d)){const _0x3fe140=Number(_0x253a24);if(isNaN(_0x3fe140)||_0x3fe140<=0x0)throw CliErrors[_0x59e404(0x108)](_0x59e404(0x121));}const _0x4db576=resolveWriteScope({'explicitGlobal':_0x38c4bb['bool'](_0x59e404(0x125)),'policy':'project-or-global-explicit'}),_0x37fffc=toScopeFlags(_0x4db576),_0x288058=readScopedConfig(_0x37fffc),_0x34f197=parseAliasAppcodeSetKey(_0x548906);if(!_0x34f197&&!isTopLevelConfigKey(_0x548906))throw CliErrors[_0x59e404(0x108)]('Top-level\x20key\x20\x22'+_0x548906+_0x59e404(0x11f),_0x59e404(0xf6)+getTopLevelConfigKeySummary()+_0x59e404(0x128));if(_0x34f197)setLocalAppAlias(_0x288058,_0x34f197,_0x253a24);else{if(_0x548906===_0x59e404(0x10e)){const _0x1f1a32=normalizeLocale(_0x253a24);if(!_0x1f1a32)throw CliErrors[_0x59e404(0x108)]('Invalid\x20locale\x20value.',_0x59e404(0x127));_0x288058[_0x59e404(0x10e)]=_0x1f1a32;}else _0x288058[_0x548906]=_0x548906===_0x59e404(0x11d)?Number(_0x253a24):DOMAIN_CONFIG_FIELDS[_0x59e404(0x12e)](_0x548906)?normalizeDomainOrigin(_0x548906,_0x253a24):_0x253a24;}const _0x9ec08=_0x548906===_0x59e404(0x103)?maskCliAccessKey(_0x253a24):!_0x34f197&&_0x548906===_0x59e404(0x10e)?String(_0x288058[_0x59e404(0x10e)]):_0x253a24;return console[_0x59e404(0x11b)]('Set\x20`'+_0x548906+'`\x20=\x20\x22'+_0x9ec08+'\x22'+(_0x4db576===_0x59e404(0x125)?_0x59e404(0xf8):'')),writeScopedConfig(_0x288058,_0x37fffc),{'ok':!![]};}},deleteDef={'service':'config','command':a23_0x1053e1(0x133),'description':a23_0x1053e1(0xf5),'risk':a23_0x1053e1(0x10a),'confirmationDescription':a23_0x1053e1(0xfe),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x1053e1(0x102),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x51f80c){const _0x9fc2d0=a23_0x1053e1,_0x44ca96=_0x51f80c[_0x9fc2d0(0x124)][0x0];if(!_0x44ca96)throw CliErrors[_0x9fc2d0(0x108)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x44ca96))throw CliErrors[_0x9fc2d0(0x108)]('\x22'+_0x44ca96+_0x9fc2d0(0xf0));const _0x460354=resolveWriteScope({'explicitGlobal':_0x51f80c['bool'](_0x9fc2d0(0x125)),'policy':_0x9fc2d0(0xf4)}),_0xabba9=toScopeFlags(_0x460354),_0x9009fc=readScopedConfig(_0xabba9),_0x4c55b5=parseAliasDeleteKey(_0x44ca96);if(_0x4c55b5){if(!deleteLocalAppAlias(_0x9009fc,_0x4c55b5))return console[_0x9fc2d0(0x11b)]('Key\x20already\x20absent:\x20'+_0x44ca96+(_0x460354===_0x9fc2d0(0x125)?_0x9fc2d0(0xf8):'')),{'ok':!![],'data':{'key':_0x44ca96,'scope':_0x460354,'changed':![]}};return console[_0x9fc2d0(0x11b)]('Deleted\x20`'+_0x44ca96+'`'+(_0x460354===_0x9fc2d0(0x125)?'\x20(global)':'')),writeScopedConfig(_0x9009fc,_0xabba9),{'ok':!![],'data':{'key':_0x44ca96,'scope':_0x460354,'changed':!![]}};}if(_0x9009fc[_0x44ca96]===undefined)return console[_0x9fc2d0(0x11b)](_0x9fc2d0(0x115)+_0x44ca96+(_0x460354===_0x9fc2d0(0x125)?_0x9fc2d0(0xf8):'')),{'ok':!![],'data':{'key':_0x44ca96,'scope':_0x460354,'changed':![]}};return delete _0x9009fc[_0x44ca96],console[_0x9fc2d0(0x11b)](_0x9fc2d0(0x111)+_0x44ca96+'`'+(_0x460354==='global'?_0x9fc2d0(0xf8):'')),writeScopedConfig(_0x9009fc,_0xabba9),{'ok':!![],'data':{'key':_0x44ca96,'scope':_0x460354,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x448fac=a24_0x124d;(function(_0x1a596f,_0x472e7e){const _0x2a4e50=a24_0x124d,_0x45de54=_0x1a596f();while(!![]){try{const _0xbda186=parseInt(_0x2a4e50(0x9e))/0x1*(-parseInt(_0x2a4e50(0x99))/0x2)+parseInt(_0x2a4e50(0xa9))/0x3*(parseInt(_0x2a4e50(0xa6))/0x4)+-parseInt(_0x2a4e50(0xb8))/0x5+-parseInt(_0x2a4e50(0x89))/0x6*(-parseInt(_0x2a4e50(0xab))/0x7)+parseInt(_0x2a4e50(0x97))/0x8*(parseInt(_0x2a4e50(0x91))/0x9)+parseInt(_0x2a4e50(0x90))/0xa+-parseInt(_0x2a4e50(0x8b))/0xb*(parseInt(_0x2a4e50(0x8d))/0xc);if(_0xbda186===_0x472e7e)break;else _0x45de54['push'](_0x45de54['shift']());}catch(_0x8a0d4){_0x45de54['push'](_0x45de54['shift']());}}}(a24_0x186e,0x7fd24));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';function a24_0x186e(){const _0x58b232=['official','config','label','Available\x20regions:\x20','Select\x20Lovrabet\x20region','kb-service-domain','harness-domain','name','skill-domain','join','4193240EXfJyw','routing','keys','Custom\x20Runtime\x20HTTPS\x20origin','independent','length','18VzUumC','Custom\x20Harness\x20HTTPS\x20origin','11TjCmcE','api-domain','16291356FnhwQX','region','manifestDomains','8152360fBDXZo','4982301AtzkGK','Custom\x20platform\x20API\x20HTTPS\x20origin','nonInteractive','Official\x20Lovrabet\x20region:\x20','domain-config','assign','8afGxYw','string','16PKyUMK','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','init','mode','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','22153YBwCPT','cancelled','Region\x20\x22','\x22\x20is\x20not\x20currently\x20available.','user-domain','ExitPromptError','Independent-deployment\x20Domain\x20JSON\x20file','domains','4dBDpUx','str','enterprise-v1','1492437lgGedB','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','2405053LLedbz','Custom\x20SkillHub\x20HTTPS\x20origin','validation'];a24_0x186e=function(){return _0x58b232;};return a24_0x186e();}import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';function a24_0x124d(_0x401abf,_0x24fa3d){_0x401abf=_0x401abf-0x88;const _0x186ea0=a24_0x186e();let _0x124dbf=_0x186ea0[_0x401abf];return _0x124dbf;}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_0x448fac(0x95),'type':a24_0x448fac(0x98),'description':a24_0x448fac(0xa4)},{'name':a24_0x448fac(0xa2),'type':a24_0x448fac(0x98),'description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a24_0x448fac(0x8c),'type':'string','description':a24_0x448fac(0x92)},{'name':'runtime-domain','type':a24_0x448fac(0x98),'description':a24_0x448fac(0xbb)},{'name':a24_0x448fac(0xb6),'type':'string','description':a24_0x448fac(0xac)},{'name':a24_0x448fac(0xb3),'type':a24_0x448fac(0x98),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'},{'name':a24_0x448fac(0xb4),'type':'string','description':a24_0x448fac(0x8a)}];export const configInitFlags=[{'name':'region','type':a24_0x448fac(0x98),'description':a24_0x448fac(0x94)+ENABLED_LOVRABET_REGION_VALUES[a24_0x448fac(0xb7)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x552026){const _0x12c43a=a24_0x448fac,_0x288177=_0x552026[_0x12c43a(0xa7)](_0x12c43a(0x8e));if(_0x288177){if(!isEnabledLovrabetRegion(_0x288177))throw CliErrors[_0x12c43a(0xad)](_0x12c43a(0xa0)+_0x288177+_0x12c43a(0xa1),_0x12c43a(0xb1)+ENABLED_LOVRABET_REGION_VALUES[_0x12c43a(0xb7)](',\x20'));return _0x288177;}if(_0x552026[_0x12c43a(0x93)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x12c43a(0xb2),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x49101b=>({'name':OFFICIAL_ROUTING_PROFILES[_0x49101b][_0x12c43a(0xb0)]+'\x20('+_0x49101b+')','value':_0x49101b}))});}catch(_0x39d27c){if(_0x39d27c?.[_0x12c43a(0xb5)]===_0x12c43a(0xa3))throw CliErrors[_0x12c43a(0x9f)]();throw _0x39d27c;}}export async function executeConfigInit(_0x472af7){const _0x11d8fc=a24_0x448fac,_0x5d805a=resolveDomainConfigInput(_0x472af7),_0x152271=_0x5d805a[_0x11d8fc(0xa5)],_0xad962f=Object['keys'](_0x152271)[_0x11d8fc(0x88)]>0x0||_0x5d805a['mode']===_0x11d8fc(0xa8);if(_0xad962f&&_0x472af7[_0x11d8fc(0xa7)](_0x11d8fc(0x8e)))throw CliErrors[_0x11d8fc(0xad)]('Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.');const _0x237027={'global':!![]},_0x379c35=readScopedConfig(_0x237027);for(const _0x2b0e77 of DOMAIN_CONFIG_FIELDS)delete _0x379c35[_0x2b0e77];for(const _0x35ea71 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x379c35[_0x35ea71];delete _0x379c35[_0x11d8fc(0xb9)];let _0x2bdc71=null;if(_0xad962f)delete _0x379c35[_0x11d8fc(0x8e)],_0x5d805a[_0x11d8fc(0x9c)]===_0x11d8fc(0xa8)?_0x379c35[_0x11d8fc(0xb9)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x5d805a[_0x11d8fc(0x8f)]}:Object[_0x11d8fc(0x96)](_0x379c35,_0x152271);else{_0x2bdc71=await resolveRegion(_0x472af7);if(_0x2bdc71===DEFAULT_LOVRABET_REGION)delete _0x379c35[_0x11d8fc(0x8e)];else _0x379c35[_0x11d8fc(0x8e)]=_0x2bdc71;}return writeScopedConfig(_0x379c35,_0x237027),{'ok':!![],'message':_0xad962f?_0x11d8fc(0x9a)+Object[_0x11d8fc(0xba)](_0x5d805a[_0x11d8fc(0x9c)]===_0x11d8fc(0xa8)?_0x5d805a[_0x11d8fc(0x8f)]:_0x152271)[_0x11d8fc(0xb7)](',\x20')+'.':_0x11d8fc(0xaa)+_0x2bdc71+'.','data':{'mode':_0xad962f?_0x11d8fc(0xbc):_0x11d8fc(0xae),'protocol':_0x5d805a[_0x11d8fc(0x9c)]===_0x11d8fc(0xa8)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x2bdc71,'domains':_0x152271}};}export const configInitDefinition={'service':a24_0x448fac(0xaf),'command':a24_0x448fac(0x9b),'description':a24_0x448fac(0x9d),'risk':'write','confirmationDescription':'Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a25_0x14c5(){var _0x5dbe81=['27wGoIFq','1692677Lrxbfy','224399HnszlS','1411950WmKQVI','379810QTlnti','24QNlPNy','6496758oOJAOX','1187444EgyuYg','156988hXRfut','45bCRvSS'];a25_0x14c5=function(){return _0x5dbe81;};return a25_0x14c5();}(function(_0xa26ff5,_0x3ef306){var _0x8fe658=a25_0x4380,_0x115d18=_0xa26ff5();while(!![]){try{var _0x4d048c=parseInt(_0x8fe658(0x176))/0x1+parseInt(_0x8fe658(0x171))/0x2+-parseInt(_0x8fe658(0x174))/0x3*(parseInt(_0x8fe658(0x172))/0x4)+parseInt(_0x8fe658(0x177))/0x5+-parseInt(_0x8fe658(0x170))/0x6+parseInt(_0x8fe658(0x175))/0x7*(parseInt(_0x8fe658(0x179))/0x8)+parseInt(_0x8fe658(0x173))/0x9*(parseInt(_0x8fe658(0x178))/0xa);if(_0x4d048c===_0x3ef306)break;else _0x115d18['push'](_0x115d18['shift']());}catch(_0x49f7bf){_0x115d18['push'](_0x115d18['shift']());}}}(a25_0x14c5,0x8d8f9));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a25_0x4380(_0x3c9f31,_0x2f9dba){_0x3c9f31=_0x3c9f31-0x170;var _0x14c53f=a25_0x14c5();var _0x43808f=_0x14c53f[_0x3c9f31];return _0x43808f;}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_0x4b38a8=a26_0xf8c0;(function(_0xfdab73,_0x5650e5){const _0x1181a4=a26_0xf8c0,_0x117045=_0xfdab73();while(!![]){try{const _0x98b46=-parseInt(_0x1181a4(0x19f))/0x1+-parseInt(_0x1181a4(0x1b1))/0x2*(parseInt(_0x1181a4(0x1a8))/0x3)+-parseInt(_0x1181a4(0x196))/0x4+-parseInt(_0x1181a4(0x1a5))/0x5*(-parseInt(_0x1181a4(0x17e))/0x6)+parseInt(_0x1181a4(0x19b))/0x7*(parseInt(_0x1181a4(0x188))/0x8)+-parseInt(_0x1181a4(0x18b))/0x9*(parseInt(_0x1181a4(0x187))/0xa)+parseInt(_0x1181a4(0x1b3))/0xb*(parseInt(_0x1181a4(0x16d))/0xc);if(_0x98b46===_0x5650e5)break;else _0x117045['push'](_0x117045['shift']());}catch(_0x1d9afd){_0x117045['push'](_0x117045['shift']());}}}(a26_0x5f42,0xea159));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,getDatasetImportContract,createDatasetImportBatch,readDatasetImportRows,readDatasetImportTaskRows,uploadDatasetImportImage,readDatasetImportImage}from'../../core/api-client.js';import{getRuntimeDomain}from'../../constant/domain.js';import{CliError,CliErrors}from'../../errors.js';import{buildExcelManifest,normalizeImportFields}from'../../services/dataset-import/excel-reader.js';import{assertImportContract,assertImportPaths,runExcelImport,saveImportJson,resolveImportOutputPath}from'../../services/dataset-import/runner.js';import{assertDatasetImportTarget}from'../../services/dataset-import/metadata.js';import{runAutoIdExcelImport}from'../../services/dataset-import/auto-id-runner.js';import{assertImageImportCapability,runImageExcelImport}from'../../services/dataset-import/image-runner.js';import{previewImportBatchCount}from'../../services/dataset-import/preview.js';function a26_0x5f42(){const _0x13ed0b=['Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','isArray','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','\x20records.','warnings','header-row','rowNumber','isInteger','code','size','import-excel','length','parse','rows','toString','92028xnHWGM','validation','maxBatchSize','emptyRows','mappingFile','Excel\x20import\x20failed.','.\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','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','reduce','1940dxNERV','224xVLVHs','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.','Excel\x20contains\x20','34533zewlhP','map','errors','.lock.recovery','str','file','appCode','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','DB_TABLE','resume','object','1006412mSZOLu','.lock','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','max','num','238595pieKUD','/client/','message','boolean','226249DswYWu','schemaFingerprint','1-based\x20Excel\x20header\x20row','write','Maximum\x20records\x20per\x20request\x20(1..500)','string','155vlkqva','batch-size','report','3mDWuxH','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','Mapping\x20file\x20exceeds\x201\x20MB.','sheet','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','media','/import-batch','--file\x20and\x20--mapping\x20are\x20required.','number','371138DEhtuh','mapping','27478iYVAUz','hashes','invalid','checkpoint','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','.rows.json','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','imageFields','Imported\x20and\x20verified\x20','batchSize','4500TrTmUz'];a26_0x5f42=function(){return _0x13ed0b;};return a26_0x5f42();}function input(_0x5ea43e){const _0x5506f1=a26_0xf8c0,_0x16116c=_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x190)),_0x531dba=_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x1b2));if(!_0x16116c||!_0x531dba)throw CliErrors[_0x5506f1(0x17f)](_0x5506f1(0x1af));const _0x31b732=_0x5ea43e[_0x5506f1(0x19a)](_0x5506f1(0x174),0x1),_0x5f113f=_0x5ea43e[_0x5506f1(0x19a)](_0x5506f1(0x1a6),0x1f4);if(!Number[_0x5506f1(0x176)](_0x31b732)||_0x31b732<0x1||!Number['isInteger'](_0x5f113f)||_0x5f113f<0x1||_0x5f113f>0x1f4)throw CliErrors['validation'](_0x5506f1(0x16f));const _0x562a19=resolve(_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x1b6))||_0x16116c+'.import-checkpoint.json'),_0x322dd9=resolve(_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x1a7))||_0x16116c+'.import-report.json'),_0x39e0bf=[resolve(_0x16116c),resolve(_0x531dba),_0x562a19,_0x322dd9];if(new Set(_0x39e0bf)[_0x5506f1(0x178)]!==_0x39e0bf[_0x5506f1(0x17a)])throw CliErrors[_0x5506f1(0x17f)](_0x5506f1(0x169));return{'file':resolve(_0x16116c),'mappingFile':resolve(_0x531dba),'headerRow':_0x31b732,'batchSize':_0x5f113f,'checkpoint':_0x562a19,'report':_0x322dd9,'sheet':_0x5ea43e[_0x5506f1(0x18f)](_0x5506f1(0x1ab))||undefined,'resume':_0x5ea43e['bool'](_0x5506f1(0x194))};}async function prepare(_0x4cb48d){const _0xe0feb6=a26_0xf8c0,_0x430ada=input(_0x4cb48d),_0x3fd5c2=_0x4cb48d[_0xe0feb6(0x18f)](_0xe0feb6(0x177));[_0x430ada[_0xe0feb6(0x190)],_0x430ada[_0xe0feb6(0x182)],_0x430ada[_0xe0feb6(0x1b6)],_0x430ada[_0xe0feb6(0x1a7)]]=await Promise['all']([realpath(_0x430ada[_0xe0feb6(0x190)]),realpath(_0x430ada[_0xe0feb6(0x182)]),resolveImportOutputPath(_0x430ada['checkpoint']),resolveImportOutputPath(_0x430ada['report'])]),assertImportPaths(_0x430ada['checkpoint'],_0x430ada[_0xe0feb6(0x1a7)],[_0x430ada[_0xe0feb6(0x190)],_0x430ada['mappingFile']]);let _0xe0b99;const _0x4beae8=await readFile(_0x430ada[_0xe0feb6(0x182)]);if(_0x4beae8[_0xe0feb6(0x17a)]>0x400*0x400)throw CliErrors[_0xe0feb6(0x17f)](_0xe0feb6(0x1aa));try{_0xe0b99=JSON[_0xe0feb6(0x17b)](_0x4beae8[_0xe0feb6(0x17d)]('utf8'));}catch{throw CliErrors['validation'](_0xe0feb6(0x192));}if(!_0xe0b99||typeof _0xe0b99!==_0xe0feb6(0x195)||Array[_0xe0feb6(0x170)](_0xe0b99)||Object['values'](_0xe0b99)['some'](_0x14dd7b=>typeof _0x14dd7b!==_0xe0feb6(0x1a4)))throw CliErrors[_0xe0feb6(0x17f)](_0xe0feb6(0x1b7));const _0x3b454f=await getDatasetDetail(_0x3fd5c2),_0x2cda19=assertDatasetImportTarget(_0x3b454f,_0x4cb48d[_0xe0feb6(0x191)],_0x3fd5c2);if(_0x2cda19===_0xe0feb6(0x193))throw CliErrors[_0xe0feb6(0x17f)]('DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x3fd5c2+_0xe0feb6(0x184)+_0x4cb48d[_0xe0feb6(0x191)]+'\x20--code\x20'+_0x3fd5c2+'\x20--params\x20\x27<JSON\x20array>\x27\x20--dry-run\x20using\x20the\x20target\x20app\x27s\x20User\x20AK\x20and\x20runtime\x20permissions.\x20Dry-run\x20only\x20previews\x20the\x20request;\x20verify\x20written\x20rows\x20before\x20advancing\x20and\x20reconcile\x20unknown\x20outcomes\x20before\x20retrying.\x20This\x20DB_TABLE\x20route\x20does\x20not\x20support\x20import\x20checkpoints\x20or\x20--resume.\x20See\x20references/lovrabet-db-table-excel-import.md\x20in\x20the\x20built-in\x20Skill.\x20No\x20import\x20request\x20was\x20sent.');if(_0x2cda19!=='METADATA')throw CliErrors['validation']('Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.',_0xe0feb6(0x16e));const _0x53229f=await buildExcelManifest({..._0x430ada,'mapping':_0xe0b99,'fields':normalizeImportFields(_0x3b454f)}),_0x9fd7c8=await getDatasetImportContract(_0x4cb48d['appCode'],_0x3fd5c2);assertImportContract(_0x9fd7c8,_0x4cb48d['appCode'],_0x3fd5c2),assertImageImportCapability(_0x9fd7c8,_0x53229f);if(_0x53229f[_0xe0feb6(0x16a)]?.[_0xe0feb6(0x17a)]){const _0x82f4d5=await resolveImportOutputPath(_0x430ada[_0xe0feb6(0x1b6)]+_0xe0feb6(0x1b8)),_0x2c3561=await Promise['all']([_0x82f4d5,_0x82f4d5+_0xe0feb6(0x197),_0x82f4d5+'.lock.recovery',_0x430ada[_0xe0feb6(0x1b6)]+_0xe0feb6(0x197),_0x430ada['checkpoint']+_0xe0feb6(0x18e)][_0xe0feb6(0x18c)](resolveImportOutputPath));assertImportPaths(_0x430ada[_0xe0feb6(0x1b6)],_0x430ada['report'],[_0x430ada[_0xe0feb6(0x190)],_0x430ada['mappingFile'],..._0x2c3561['slice'](0x0,0x3)]);}if(_0x430ada[_0xe0feb6(0x16c)]>_0x9fd7c8[_0xe0feb6(0x180)])throw CliErrors[_0xe0feb6(0x17f)](_0xe0feb6(0x198));return{'args':_0x430ada,'manifest':_0x53229f,'contract':_0x9fd7c8,'code':_0x3fd5c2};}function a26_0xf8c0(_0x32589f,_0x395a5d){_0x32589f=_0x32589f-0x169;const _0x5f4289=a26_0x5f42();let _0xf8c07a=_0x5f4289[_0x32589f];return _0xf8c07a;}async function checked(_0x1a1f85){const _0x3d9df3=a26_0xf8c0;try{return await _0x1a1f85();}catch(_0x2fa3be){if(_0x2fa3be instanceof CliError)throw _0x2fa3be;throw CliErrors[_0x3d9df3(0x17f)](_0x2fa3be[_0x3d9df3(0x19d)]||_0x3d9df3(0x183));}}export const dataImportExcel={'service':'data','command':a26_0x4b38a8(0x179),'risk':a26_0x4b38a8(0x1a2),'description':a26_0x4b38a8(0x189),'confirmationDescription':a26_0x4b38a8(0x171),'flags':[CODE_FLAG,{'name':a26_0x4b38a8(0x190),'type':a26_0x4b38a8(0x1a4),'required':!![],'description':'Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)'},{'name':a26_0x4b38a8(0x1b2),'type':a26_0x4b38a8(0x1a4),'required':!![],'description':'JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes'},{'name':a26_0x4b38a8(0x1ab),'type':a26_0x4b38a8(0x1a4),'description':a26_0x4b38a8(0x1a9)},{'name':a26_0x4b38a8(0x174),'type':a26_0x4b38a8(0x1b0),'default':0x1,'description':a26_0x4b38a8(0x1a1)},{'name':a26_0x4b38a8(0x1a6),'type':a26_0x4b38a8(0x1b0),'default':0x1f4,'description':a26_0x4b38a8(0x1a3)},{'name':a26_0x4b38a8(0x1b6),'type':a26_0x4b38a8(0x1a4),'description':'Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)'},{'name':'report','type':'string','description':a26_0x4b38a8(0x1ac)},{'name':a26_0x4b38a8(0x194),'type':a26_0x4b38a8(0x19e),'description':'Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping'}],'validate':async _0x34bb4e=>{input(_0x34bb4e);},'dryRun':async _0xe99e61=>checked(async()=>{const _0x3f9c8f=a26_0x4b38a8,{args:_0x17cc45,manifest:_0x271450,contract:_0x125286,code:_0x5b5e6d}=await prepare(_0xe99e61),_0x241938=new Set(_0x271450[_0x3f9c8f(0x18d)][_0x3f9c8f(0x18c)](_0x2e343e=>_0x2e343e[_0x3f9c8f(0x175)]))[_0x3f9c8f(0x178)];return{'method':'POST','url':_0x3f9c8f(0x19c)+encodeURIComponent(_0xe99e61[_0x3f9c8f(0x191)])+'/'+encodeURIComponent(_0x5b5e6d)+_0x3f9c8f(0x1ae),'description':_0x3f9c8f(0x185),'body':{'schemaFingerprint':_0x125286[_0x3f9c8f(0x1a0)]},'validRows':Math[_0x3f9c8f(0x199)](0x0,_0x271450['rows']['length']-_0x241938),'invalidRows':_0x241938,'invalidCells':_0x271450['errors'][_0x3f9c8f(0x17a)],'emptyRows':_0x271450[_0x3f9c8f(0x181)][_0x3f9c8f(0x17a)],'expectedBatches':previewImportBatchCount(_0x271450,_0x125286,_0x17cc45[_0x3f9c8f(0x16c)]),'imageCount':_0x271450['imageCells']?.[_0x3f9c8f(0x186)]((_0x4499fd,_0x5df133)=>_0x4499fd+_0x5df133[_0x3f9c8f(0x1b4)][_0x3f9c8f(0x17a)],0x0)??0x0,'uniqueImages':_0x271450[_0x3f9c8f(0x1ad)]?.[_0x3f9c8f(0x17a)]??0x0,'uniqueImageBytes':_0x271450[_0x3f9c8f(0x1ad)]?.[_0x3f9c8f(0x186)]((_0x3e73aa,_0x32640f)=>_0x3e73aa+_0x32640f['size'],0x0)??0x0,'errors':_0x271450[_0x3f9c8f(0x18d)],'warnings':_0x271450[_0x3f9c8f(0x173)],'sheet':_0x271450[_0x3f9c8f(0x1ab)],'checkpoint':_0x17cc45[_0x3f9c8f(0x1b6)],'report':_0x17cc45[_0x3f9c8f(0x1a7)]};}),'execute':async _0x1939e6=>checked(async()=>{const _0x47553e=a26_0x4b38a8,{args:_0x2c98ca,manifest:_0x54c25d,contract:_0x5e1b5f,code:_0x402ef1}=await prepare(_0x1939e6);if(_0x54c25d[_0x47553e(0x18d)][_0x47553e(0x17a)]){await saveImportJson(_0x2c98ca['report'],{'status':_0x47553e(0x1b5),'sourceRows':_0x54c25d[_0x47553e(0x17c)][_0x47553e(0x17a)],'errors':_0x54c25d[_0x47553e(0x18d)],'emptyRows':_0x54c25d[_0x47553e(0x181)],'warnings':_0x54c25d[_0x47553e(0x173)]});throw CliErrors[_0x47553e(0x17f)](_0x47553e(0x18a)+_0x54c25d[_0x47553e(0x18d)][_0x47553e(0x17a)]+'\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','See\x20'+_0x2c98ca['report']+'.');}const _0x1d6070=_0x54c25d['imageFields']?.[_0x47553e(0x17a)]?runImageExcelImport:_0x5e1b5f['schemaVersion']===0x2?runAutoIdExcelImport:runExcelImport,_0x1eff6d=await _0x1d6070({..._0x2c98ca,'manifest':_0x54c25d,'contract':_0x5e1b5f,'appCode':_0x1939e6['appCode'],'datasetCode':_0x402ef1,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x2c98ca['file'],_0x2c98ca[_0x47553e(0x182)]],'imageApi':{'upload':(_0x4b9e67,_0x5d0fc7)=>uploadDatasetImportImage(_0x1939e6[_0x47553e(0x191)],_0x402ef1,_0x4b9e67,_0x5d0fc7),'readback':(_0x1417d6,_0x1576e8)=>readDatasetImportImage(_0x1939e6[_0x47553e(0x191)],_0x402ef1,_0x1417d6,_0x1576e8)},'api':{'write':(_0x13929b,_0xe7ce93)=>createDatasetImportBatch(_0x1939e6['appCode'],_0x402ef1,{'schemaFingerprint':_0x5e1b5f[_0x47553e(0x1a0)],'items':_0x13929b,..._0xe7ce93===undefined?{}:{'taskId':_0xe7ce93}}),'readback':_0x512b50=>readDatasetImportRows(_0x1939e6[_0x47553e(0x191)],_0x402ef1,_0x512b50),'readTask':_0xef849a=>readDatasetImportTaskRows(_0x1939e6[_0x47553e(0x191)],_0x402ef1,_0xef849a)}});return{'ok':!![],'data':_0x1eff6d,'message':_0x47553e(0x16b)+_0x1eff6d['succeeded']+_0x47553e(0x172)};})};
|