@lovrabet/lovrabet-cli 2.3.5 → 2.3.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/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.d.ts +10 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.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.d.ts +3 -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.d.ts +3 -0
- package/lib/services/dataset-import/image-bytes.js +1 -0
- package/lib/services/dataset-import/image-ooxml.d.ts +10 -0
- package/lib/services/dataset-import/image-ooxml.js +1 -0
- package/lib/services/dataset-import/image-runner.d.ts +48 -0
- package/lib/services/dataset-import/image-runner.js +1 -0
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.d.ts +10 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/services/dataset-import/types.d.ts +28 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +4 -1
- package/skills/lovrabet/SKILL.md +3 -1
- package/skills/lovrabet/references/lovrabet-excel-import.md +19 -0
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a13_0x1250cf=a13_0x1a8d;(function(_0x2e70b5,_0x1864cf){const _0x2917d4=a13_0x1a8d,_0x3967c1=_0x2e70b5();while(!![]){try{const _0x4f2070=parseInt(_0x2917d4(0xf4))/0x1+parseInt(_0x2917d4(0xf9))/0x2+parseInt(_0x2917d4(0xcf))/0x3+-parseInt(_0x2917d4(0xed))/0x4*(parseInt(_0x2917d4(0xfc))/0x5)+parseInt(_0x2917d4(0x100))/0x6*(-parseInt(_0x2917d4(0xe7))/0x7)+parseInt(_0x2917d4(0xd8))/0x8+parseInt(_0x2917d4(0xd9))/0x9;if(_0x4f2070===_0x1864cf)break;else _0x3967c1['push'](_0x3967c1['shift']());}catch(_0x4d5ebd){_0x3967c1['push'](_0x3967c1['shift']());}}}(a13_0xb18e,0x39c3c));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';function a13_0x1a8d(_0x2aa3ba,_0x49b793){_0x2aa3ba=_0x2aa3ba-0xc0;const _0xb18e15=a13_0xb18e();let _0x1a8d21=_0xb18e15[_0x2aa3ba];return _0x1a8d21;}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 a13_0xb18e(){const _0x4b429a=['auth','push','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Status:\x20valid','Auth\x20mode:\x20','No\x20AccessKey\x20found\x20in\x20','AccessKey:\x20','project\x20config','Then\x20verify\x20with:\x20','AccessKey\x20cleared\x20from\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Tip:\x20you\x20can\x20also\x20run:','=ak_xxx','success','login','project','Show\x20current\x20authentication\x20status','accessKey','logout','join','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20auth\x20login\x20--access-key\x20<ak_xxx>','write','\x20Verify:\x20','isTTY','scope','Option\x20C:\x20environment\x20variable','380010znUcYQ','string','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','ACCESS_KEY','global-default','stdin','Option\x20B:\x20apps\x20config\x20(','\x20config.','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','2625672qJBXns','1635975muZbEu','\x20auth\x20status','boolean','\x20\x20export\x20','env','expired','\x20(via\x20','str','\x20doctor','read','access_key','production','bool','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','14IiSXSf','nonInteractive','validation','userCenterDisplayName','Use\x20`','\x20env\x20var','4oNqGyD','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','trim','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','status','info','Clear\x20the\x20AccessKey\x20from\x20config','10705hnXDDz','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','code','authRequired','Missing\x20accessKey.','95896IPOXJC','access-key','check','173735oOAgsW','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','global\x20config','1271868emSWpk','newConfigFileName','ClientAk','test','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','global','AccessKey\x20(ak_xxx...)','accessKeyCreatePath'];a13_0xb18e=function(){return _0x4b429a;};return a13_0xb18e();}function showAccessKeyCreateHint(_0x4ad5ca=USER_ACCESS_KEY_CREATE_URL){const _0x28733b=a13_0x1a8d;writeCliSideChannelLine(_0x28733b(0xfe)+PRODUCT_CONFIG[_0x28733b(0xea)]+':'),writeCliSideChannelLine('\x0a'+_0x4ad5ca+'\x0a'),writeCliSideChannelLine(_0x28733b(0x116)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x28733b(0xc9));}function buildAccessKeySetupGuide(_0x1e3ff2=USER_ACCESS_KEY_CREATE_URL){const _0x500940=a13_0x1a8d;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x500940(0xea)]+':',_0x1e3ff2,_0x500940(0xf0)+CLI_BIN_NAME+_0x500940(0xd7)]['join']('\x0a');}function canPromptForAccessKey(_0x3e8720){const _0x65016d=a13_0x1a8d;return!_0x3e8720[_0x65016d(0xe8)]&&process[_0x65016d(0xd4)][_0x65016d(0xcc)]!==![]&&process['stdout'][_0x65016d(0xcc)]!==![];}function resolveAuthScopeFlags(_0x405749){const _0x389bbe=a13_0x1a8d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x405749[_0x389bbe(0xe5)](_0x389bbe(0x105)),'explicitProject':_0x405749[_0x389bbe(0xe5)](_0x389bbe(0xc3)),'policy':_0x389bbe(0xd3)}));}async function resolveAuthWriteInput(_0x2627b9){const _0x10118c=a13_0x1a8d;let _0x5d7c71=(_0x2627b9[_0x10118c(0xe0)](_0x10118c(0xfa))||_0x2627b9[_0x10118c(0xe0)]('ak')||'')[_0x10118c(0xef)]();const _0x402806=(_0x2627b9[_0x10118c(0xe0)]('env')||'')['trim'](),_0x1aadfb=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0x5d7c71&&canPromptForAccessKey(_0x2627b9))try{showAccessKeyCreateHint(_0x1aadfb),_0x5d7c71=await promptAccessKey('');}catch(_0x1c88da){if(isAbortPrompt(_0x1c88da))throw CliErrors['cancelled']();throw _0x1c88da;}if(!_0x5d7c71)throw CliErrors['validation'](_0x10118c(0xf8),buildAccessKeySetupGuide(_0x1aadfb));if(!ACCESS_KEY_PATTERN[_0x10118c(0x103)](_0x5d7c71))throw CliErrors[_0x10118c(0xe9)]('Invalid\x20accessKey\x20format.',_0x10118c(0x104));if(!_0x402806)return{'accessKey':_0x5d7c71};const _0x566975=normalizeEnv(_0x402806);return{'accessKey':_0x5d7c71,'env':isDaily(_0x566975)?'daily':isDev(_0x566975)?'development':_0x10118c(0xe4)};}export const authDefinitions=[{'service':a13_0x1250cf(0x108),'command':a13_0x1250cf(0xc2),'description':a13_0x1250cf(0xee),'risk':a13_0x1250cf(0xca),'confirmationDescription':a13_0x1250cf(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x1250cf(0xfa),'type':a13_0x1250cf(0xd0),'description':a13_0x1250cf(0x106)},{'name':'ak','type':a13_0x1250cf(0xd0),'description':'Shorthand\x20for\x20--access-key'},{'name':a13_0x1250cf(0x105),'type':a13_0x1250cf(0xdb),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x1250cf(0xc3),'type':'boolean','description':a13_0x1250cf(0xfd),'default':![]}],async 'execute'(_0xba43fb){const _0xa6c3e9=a13_0x1250cf;if(_0xba43fb['bool']('yes'))throw CliErrors['validation'](_0xa6c3e9(0xc8),_0xa6c3e9(0xeb)+CLI_BIN_NAME+_0xa6c3e9(0x112)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x3084c6=(_0xba43fb[_0xa6c3e9(0xe0)](_0xa6c3e9(0xfa))||_0xba43fb[_0xa6c3e9(0xe0)]('ak')||'')[_0xa6c3e9(0xef)]();if(!_0x3084c6&&_0xba43fb[_0xa6c3e9(0xe8)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0xa6c3e9(0x107)])};const _0xc62cbc=await resolveAuthWriteInput(_0xba43fb),_0x326a8c=resolveAuthScopeFlags(_0xba43fb),_0x6a2031=readScopedConfig(_0x326a8c);_0x6a2031[_0xa6c3e9(0xc5)]=_0xc62cbc['accessKey'];_0xc62cbc['env']&&(_0x6a2031[_0xa6c3e9(0xdd)]=_0xc62cbc[_0xa6c3e9(0xdd)]);writeScopedConfig(_0x6a2031,_0x326a8c);const _0x5e31c3=_0x326a8c[_0xa6c3e9(0x105)]?_0xa6c3e9(0x105):_0xa6c3e9(0xc3),_0x2ee3c2=_0x6a2031[_0xa6c3e9(0xdd)]?'\x20Current\x20env:\x20'+_0x6a2031[_0xa6c3e9(0xdd)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x5e31c3+_0xa6c3e9(0xd6)+_0x2ee3c2+_0xa6c3e9(0xcb)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':'auth','command':a13_0x1250cf(0xc6),'description':a13_0x1250cf(0xf3),'risk':a13_0x1250cf(0xca),'confirmationDescription':a13_0x1250cf(0xd1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x1250cf(0x105),'type':a13_0x1250cf(0xdb),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x1250cf(0xc3),'type':a13_0x1250cf(0xdb),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x506177){const _0x508063=a13_0x1250cf,_0x448daa=resolveAuthScopeFlags(_0x506177),_0x1f8d68=readScopedConfig(_0x448daa),_0x35aff2=!!_0x1f8d68[_0x508063(0xc5)];delete _0x1f8d68['accessKey'],writeScopedConfig(_0x1f8d68,_0x448daa);const _0x1ef01f=_0x448daa[_0x508063(0x105)]?_0x508063(0x105):_0x508063(0xc3);if(_0x35aff2)return{'ok':!![],'message':_0x508063(0x111)+_0x1ef01f+_0x508063(0xd6)};return{'ok':!![],'message':_0x508063(0x10d)+_0x1ef01f+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a13_0x1250cf(0x108),'command':a13_0x1250cf(0xf1),'description':a13_0x1250cf(0xc4),'risk':a13_0x1250cf(0xe2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x1250cf(0x105),'type':a13_0x1250cf(0xdb),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a13_0x1250cf(0xdb),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':a13_0x1250cf(0xfb),'type':a13_0x1250cf(0xdb),'description':a13_0x1250cf(0x113),'default':![]}],async 'execute'(_0x389f06){const _0x330957=a13_0x1250cf,_0x4ebed3=resolveAuthScopeFlags(_0x389f06),_0x3c1e8f=readScopedConfig(_0x4ebed3),_0x29514b=productEnvName(_0x330957(0xd2)),_0xcc2577=productEnv('ACCESS_KEY')||undefined,_0x169f30=_0x3c1e8f['accessKey']||undefined,_0x1f56ae=_0xcc2577||_0x169f30,_0x582eea=_0xcc2577?_0x29514b+_0x330957(0xec):_0x169f30?(_0x4ebed3['global']?_0x330957(0x105):'project')+'\x20config':null,_0x138b81=[_0x330957(0x10c)+AUTH_MODE[_0x330957(0x102)]];if(_0x1f56ae){const _0x38428=maskCliAccessKey(_0x1f56ae);_0x138b81[_0x330957(0x109)](_0x330957(0x10e)+_0x38428+(_0x582eea?'\x20(via\x20'+_0x582eea+')':'')),_0x138b81[_0x330957(0x109)](_0x330957(0x10b));}if(!_0x1f56ae){_0x138b81['push'](''),_0x138b81[_0x330957(0x109)](_0x330957(0xe6)),_0x138b81[_0x330957(0x109)](''),_0x138b81[_0x330957(0x109)]('Option\x20A:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x138b81[_0x330957(0x109)](''),_0x138b81[_0x330957(0x109)](_0x330957(0xd5)+PRODUCT_CONFIG[_0x330957(0x101)]+')'),_0x138b81[_0x330957(0x109)](_0x330957(0x10a)),_0x138b81[_0x330957(0x109)](''),_0x138b81[_0x330957(0x109)](_0x330957(0xce)),_0x138b81['push'](_0x330957(0xdc)+_0x29514b+_0x330957(0xc0)),_0x138b81[_0x330957(0x109)](''),_0x138b81[_0x330957(0x109)](_0x330957(0x110)+CLI_BIN_NAME+_0x330957(0xda)),_0x138b81[_0x330957(0x109)](_0x330957(0x115)+CLI_BIN_NAME+_0x330957(0xe1));if(_0x389f06[_0x330957(0xe5)](_0x330957(0xfb))){const _0x434f62=readStoredDeviceCode();if(_0x434f62&&!isStoredDeviceCodeExpired(_0x434f62)){const _0x33b12d=getUserDomain(),_0x4a5562=await fetchDeviceToken(_0x33b12d,_0x434f62[_0x330957(0xf6)]);if(_0x4a5562['status']===_0x330957(0xc1)&&_0x4a5562[_0x330957(0xe3)]){const _0x4cffa0={'global':_0x434f62[_0x330957(0xcd)]===_0x330957(0x105)},_0xa8ab28=readScopedConfig(_0x4cffa0);_0xa8ab28['accessKey']=_0x4a5562[_0x330957(0xe3)],writeScopedConfig(_0xa8ab28,_0x4cffa0),deleteStoredDeviceCode();const _0x20da5e=_0x4a5562['access_key'],_0x20f219=maskCliAccessKey(_0x20da5e),_0x5a0691=_0x434f62[_0x330957(0xcd)]==='global'?_0x330957(0xff):_0x330957(0x10f);return{'ok':!![],'message':[_0x330957(0x10c)+AUTH_MODE['ClientAk'],_0x330957(0x10e)+_0x20f219+_0x330957(0xdf)+_0x5a0691+')','Status:\x20valid'][_0x330957(0xc7)]('\x0a')};}_0x4a5562['status']===_0x330957(0xde)&&deleteStoredDeviceCode();throw CliErrors[_0x330957(0xf7)](_0x330957(0x114));}throw CliErrors['authRequired'](_0x138b81[_0x330957(0xc7)]('\x0a'));}}return{'ok':!![],'message':_0x138b81[_0x330957(0xc7)]('\x0a')};}},{'service':a13_0x1250cf(0x108),'command':a13_0x1250cf(0xf2),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a13_0x1250cf(0xe2),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x43bebb){const _0x2b5064=a13_0x1250cf,_0x28662c=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x28662c,'meta':{'env':_0x43bebb['envName']??_0x2b5064(0xe4)}}};}},authDeviceDefinition];
|
|
1
|
+
const a13_0x232ef1=a13_0x2f6a;(function(_0x2eeb00,_0x23b478){const _0x564a56=a13_0x2f6a,_0x4de222=_0x2eeb00();while(!![]){try{const _0x599163=parseInt(_0x564a56(0x84))/0x1*(-parseInt(_0x564a56(0xae))/0x2)+-parseInt(_0x564a56(0x95))/0x3+parseInt(_0x564a56(0x80))/0x4+parseInt(_0x564a56(0x8d))/0x5*(-parseInt(_0x564a56(0xab))/0x6)+parseInt(_0x564a56(0xc7))/0x7+parseInt(_0x564a56(0xbc))/0x8*(parseInt(_0x564a56(0xd2))/0x9)+-parseInt(_0x564a56(0xc4))/0xa*(parseInt(_0x564a56(0xc9))/0xb);if(_0x599163===_0x23b478)break;else _0x4de222['push'](_0x4de222['shift']());}catch(_0x1096fb){_0x4de222['push'](_0x4de222['shift']());}}}(a13_0x34d1,0x1bbfb));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';function a13_0x2f6a(_0x1cffb1,_0x3f4d9c){_0x1cffb1=_0x1cffb1-0x7d;const _0x34d1a4=a13_0x34d1();let _0x2f6a0d=_0x34d1a4[_0x1cffb1];return _0x2f6a0d;}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(_0x48add4=USER_ACCESS_KEY_CREATE_URL){const _0x19c8e0=a13_0x2f6a;writeCliSideChannelLine(_0x19c8e0(0x9c)+PRODUCT_CONFIG[_0x19c8e0(0x82)]+':'),writeCliSideChannelLine('\x0a'+_0x48add4+'\x0a'),writeCliSideChannelLine(_0x19c8e0(0xc2)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(_0x10df5b=USER_ACCESS_KEY_CREATE_URL){const _0x5ef1cd=a13_0x2f6a;return[_0x5ef1cd(0x9c)+PRODUCT_CONFIG['userCenterDisplayName']+':',_0x10df5b,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x5ef1cd(0x8f)][_0x5ef1cd(0xcc)]('\x0a');}function canPromptForAccessKey(_0x32a623){const _0x535fb6=a13_0x2f6a;return!_0x32a623[_0x535fb6(0x83)]&&process['stdin'][_0x535fb6(0xc5)]!==![]&&process[_0x535fb6(0xb3)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x1bd0a0){const _0x50cd78=a13_0x2f6a;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1bd0a0['bool'](_0x50cd78(0x92)),'explicitProject':_0x1bd0a0[_0x50cd78(0xdb)]('project'),'policy':'global-default'}));}function a13_0x34d1(){const _0x428fe=['No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','read','daily','logout','string','bool','success','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','validation','542940GpGPvL','Clear\x20from\x20global\x20config\x20(default)','userCenterDisplayName','nonInteractive','1DHqIgn','Invalid\x20accessKey\x20format.','AccessKey\x20(ak_xxx...)','Shorthand\x20for\x20--access-key','push','AccessKey\x20cleared\x20from\x20','newConfigFileName','cancelled','env','5CGfhAq','test','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','AccessKey\x20saved\x20to\x20','global','info','yes','394464NqNCXm','ACCESS_KEY','Option\x20B:\x20apps\x20config\x20(','=ak_xxx','Show\x20current\x20authentication\x20status','trim','project\x20config','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','str','Option\x20A:\x20','project','Option\x20C:\x20environment\x20variable','Write\x20to\x20global\x20config\x20(default)','Saves\x20a\x20new\x20AccessKey\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20An\x20existing\x20key\x20in\x20that\x20scope\x20is\x20overwritten.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20secret.','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','access-key','boolean','access_key','\x20\x20export\x20','Auth\x20mode:\x20','code','272418OKzFMG','Missing\x20accessKey.','Clear\x20the\x20AccessKey\x20from\x20config','15546nePgDK','Then\x20verify\x20with:\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','stdout','auth','\x20config.','write','\x20config.\x20Nothing\x20to\x20clear.','accessKey','check','\x20(via\x20','accessKeyCreatePath','259832pUhRAR','production','authRequired','envName','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20Verify:\x20','Tip:\x20you\x20can\x20also\x20run:','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','10ibxrvE','isTTY','\x20env\x20var','1068564eSoxwL','ClientAk','962511XCCoIF','status','Status:\x20valid','join','Use\x20`','scope','\x20auth\x20status','AccessKey:\x20','No\x20AccessKey\x20found\x20in\x20','27HYdIqW','login','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'];a13_0x34d1=function(){return _0x428fe;};return a13_0x34d1();}async function resolveAuthWriteInput(_0x240e50){const _0x58a999=a13_0x2f6a;let _0x35ff9=(_0x240e50[_0x58a999(0x9e)]('access-key')||_0x240e50['str']('ak')||'')['trim']();const _0x3c5b5e=(_0x240e50['str'](_0x58a999(0x8c))||'')[_0x58a999(0x9a)](),_0x36fd65=''+getUserDomain()+PRODUCT_CONFIG[_0x58a999(0xbb)];if(!_0x35ff9&&canPromptForAccessKey(_0x240e50))try{showAccessKeyCreateHint(_0x36fd65),_0x35ff9=await promptAccessKey('');}catch(_0x6c532d){if(isAbortPrompt(_0x6c532d))throw CliErrors[_0x58a999(0x8b)]();throw _0x6c532d;}if(!_0x35ff9)throw CliErrors[_0x58a999(0x7f)](_0x58a999(0xac),buildAccessKeySetupGuide(_0x36fd65));if(!ACCESS_KEY_PATTERN[_0x58a999(0x8e)](_0x35ff9))throw CliErrors['validation'](_0x58a999(0x85),_0x58a999(0x7e));if(!_0x3c5b5e)return{'accessKey':_0x35ff9};const _0x215a94=normalizeEnv(_0x3c5b5e);return{'accessKey':_0x35ff9,'env':isDaily(_0x215a94)?_0x58a999(0xd8):isDev(_0x215a94)?'development':_0x58a999(0xbd)};}export const authDefinitions=[{'service':a13_0x232ef1(0xb4),'command':a13_0x232ef1(0xd3),'description':a13_0x232ef1(0x9d),'risk':a13_0x232ef1(0xb6),'confirmationDescription':a13_0x232ef1(0xa3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x232ef1(0xa5),'type':a13_0x232ef1(0xda),'description':a13_0x232ef1(0x86)},{'name':'ak','type':'string','description':a13_0x232ef1(0x87)},{'name':a13_0x232ef1(0x92),'type':a13_0x232ef1(0xa6),'description':a13_0x232ef1(0xa2),'default':!![]},{'name':'project','type':a13_0x232ef1(0xa6),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0xcf22d4){const _0x3f986b=a13_0x232ef1;if(_0xcf22d4[_0x3f986b(0xdb)](_0x3f986b(0x94)))throw CliErrors[_0x3f986b(0x7f)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x3f986b(0xcd)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x30fb3a=(_0xcf22d4['str'](_0x3f986b(0xa5))||_0xcf22d4[_0x3f986b(0x9e)]('ak')||'')[_0x3f986b(0x9a)]();if(!_0x30fb3a&&_0xcf22d4[_0x3f986b(0x83)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'])};const _0x34584a=await resolveAuthWriteInput(_0xcf22d4),_0x2f905f=resolveAuthScopeFlags(_0xcf22d4),_0x2ae541=readScopedConfig(_0x2f905f);_0x2ae541[_0x3f986b(0xb8)]=_0x34584a[_0x3f986b(0xb8)];_0x34584a['env']&&(_0x2ae541[_0x3f986b(0x8c)]=_0x34584a[_0x3f986b(0x8c)]);writeScopedConfig(_0x2ae541,_0x2f905f);const _0xc0e153=_0x2f905f[_0x3f986b(0x92)]?_0x3f986b(0x92):_0x3f986b(0xa0),_0x61563c=_0x2ae541[_0x3f986b(0x8c)]?'\x20Current\x20env:\x20'+_0x2ae541[_0x3f986b(0x8c)]+'.':'';return{'ok':!![],'message':_0x3f986b(0x91)+_0xc0e153+_0x3f986b(0xb5)+_0x61563c+_0x3f986b(0xc1)+CLI_BIN_NAME+_0x3f986b(0xcf)};}},{'service':'auth','command':a13_0x232ef1(0xd9),'description':a13_0x232ef1(0xad),'risk':a13_0x232ef1(0xb6),'confirmationDescription':a13_0x232ef1(0x90),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x232ef1(0x92),'type':'boolean','description':a13_0x232ef1(0x81),'default':!![]},{'name':a13_0x232ef1(0xa0),'type':a13_0x232ef1(0xa6),'description':a13_0x232ef1(0xb2),'default':![]}],async 'execute'(_0x46f120){const _0xaf0721=a13_0x232ef1,_0x327f1d=resolveAuthScopeFlags(_0x46f120),_0x5c495f=readScopedConfig(_0x327f1d),_0x1a4ad1=!!_0x5c495f[_0xaf0721(0xb8)];delete _0x5c495f['accessKey'],writeScopedConfig(_0x5c495f,_0x327f1d);const _0x37a14a=_0x327f1d['global']?_0xaf0721(0x92):_0xaf0721(0xa0);if(_0x1a4ad1)return{'ok':!![],'message':_0xaf0721(0x89)+_0x37a14a+_0xaf0721(0xb5)};return{'ok':!![],'message':_0xaf0721(0xd1)+_0x37a14a+_0xaf0721(0xb7)};}},{'service':a13_0x232ef1(0xb4),'command':a13_0x232ef1(0xca),'description':a13_0x232ef1(0x99),'risk':a13_0x232ef1(0xd7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x232ef1(0x92),'type':a13_0x232ef1(0xa6),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a13_0x232ef1(0xb1),'default':![]},{'name':'check','type':a13_0x232ef1(0xa6),'description':a13_0x232ef1(0xd4),'default':![]}],async 'execute'(_0x19dfd1){const _0x341e33=a13_0x232ef1,_0x2def55=resolveAuthScopeFlags(_0x19dfd1),_0x3b6f34=readScopedConfig(_0x2def55),_0x5915f6=productEnvName(_0x341e33(0x96)),_0x516e9d=productEnv(_0x341e33(0x96))||undefined,_0x245ac4=_0x3b6f34[_0x341e33(0xb8)]||undefined,_0x3186a2=_0x516e9d||_0x245ac4,_0x322844=_0x516e9d?_0x5915f6+_0x341e33(0xc6):_0x245ac4?(_0x2def55[_0x341e33(0x92)]?'global':_0x341e33(0xa0))+'\x20config':null,_0x3fd4d7=[_0x341e33(0xa9)+AUTH_MODE[_0x341e33(0xc8)]];if(_0x3186a2){const _0x58a5cf=maskCliAccessKey(_0x3186a2);_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xd0)+_0x58a5cf+(_0x322844?_0x341e33(0xba)+_0x322844+')':'')),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xcb));}if(!_0x3186a2){_0x3fd4d7[_0x341e33(0x88)](''),_0x3fd4d7['push'](_0x341e33(0xd6)),_0x3fd4d7[_0x341e33(0x88)](''),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0x9f)+CLI_BIN_NAME+_0x341e33(0xd5)),_0x3fd4d7[_0x341e33(0x88)](''),_0x3fd4d7['push'](_0x341e33(0x97)+PRODUCT_CONFIG[_0x341e33(0x8a)]+')'),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xc3)),_0x3fd4d7[_0x341e33(0x88)](''),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xa1)),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xa8)+_0x5915f6+_0x341e33(0x98)),_0x3fd4d7['push'](''),_0x3fd4d7['push'](_0x341e33(0xaf)+CLI_BIN_NAME+_0x341e33(0xcf)),_0x3fd4d7[_0x341e33(0x88)](_0x341e33(0xb0)+CLI_BIN_NAME+'\x20doctor');if(_0x19dfd1['bool'](_0x341e33(0xb9))){const _0x9cf01c=readStoredDeviceCode();if(_0x9cf01c&&!isStoredDeviceCodeExpired(_0x9cf01c)){const _0x22ecf9=getUserDomain(),_0x366235=await fetchDeviceToken(_0x22ecf9,_0x9cf01c[_0x341e33(0xaa)]);if(_0x366235[_0x341e33(0xca)]===_0x341e33(0x7d)&&_0x366235[_0x341e33(0xa7)]){const _0x3c5e0e={'global':_0x9cf01c['scope']===_0x341e33(0x92)},_0x4b241b=readScopedConfig(_0x3c5e0e);_0x4b241b[_0x341e33(0xb8)]=_0x366235[_0x341e33(0xa7)],writeScopedConfig(_0x4b241b,_0x3c5e0e),deleteStoredDeviceCode();const _0x4c69f2=_0x366235[_0x341e33(0xa7)],_0x3e28c4=maskCliAccessKey(_0x4c69f2),_0xf7c860=_0x9cf01c[_0x341e33(0xce)]===_0x341e33(0x92)?'global\x20config':_0x341e33(0x9b);return{'ok':!![],'message':[_0x341e33(0xa9)+AUTH_MODE[_0x341e33(0xc8)],_0x341e33(0xd0)+_0x3e28c4+_0x341e33(0xba)+_0xf7c860+')',_0x341e33(0xcb)][_0x341e33(0xcc)]('\x0a')};}_0x366235[_0x341e33(0xca)]==='expired'&&deleteStoredDeviceCode();throw CliErrors['authRequired'](_0x341e33(0xc0));}throw CliErrors[_0x341e33(0xbe)](_0x3fd4d7['join']('\x0a'));}}return{'ok':!![],'message':_0x3fd4d7[_0x341e33(0xcc)]('\x0a')};}},{'service':a13_0x232ef1(0xb4),'command':a13_0x232ef1(0x93),'description':a13_0x232ef1(0xa4),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x160fdc){const _0xcde13e=a13_0x232ef1,_0x2da283=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2da283,'meta':{'env':_0x160fdc[_0xcde13e(0xbf)]??'production'}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x217ea9,_0x2e450d){const _0x1fa998=a14_0xde63,_0x26e04d=_0x217ea9();while(!![]){try{const _0x144a90=parseInt(_0x1fa998(0x1a5))/0x1*(parseInt(_0x1fa998(0x1b0))/0x2)+-parseInt(_0x1fa998(0x1a7))/0x3*(parseInt(_0x1fa998(0x1a9))/0x4)+parseInt(_0x1fa998(0x1b4))/0x5+-parseInt(_0x1fa998(0x1af))/0x6+parseInt(_0x1fa998(0x1a8))/0x7+parseInt(_0x1fa998(0x1aa))/0x8*(parseInt(_0x1fa998(0x1a4))/0x9)+-parseInt(_0x1fa998(0x1b1))/0xa*(parseInt(_0x1fa998(0x1b3))/0xb);if(_0x144a90===_0x2e450d)break;else _0x26e04d['push'](_0x26e04d['shift']());}catch(_0x21d6bf){_0x26e04d['push'](_0x26e04d['shift']());}}}(a14_0xca43,0xd2401));function a14_0xde63(_0x5bba58,_0x3e2ae2){_0x5bba58=_0x5bba58-0x1a2;const _0xca4300=a14_0xca43();let _0xde636=_0xca4300[_0x5bba58];return _0xde636;}import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x5d67aa=a14_0xde63;super('User\x20aborted\x20prompt'),this[_0x5d67aa(0x1ad)]=_0x5d67aa(0x1b5);}}function createSafeRl(){const _0x20801e=a14_0xde63,_0x42cf45=createInterface({'input':process[_0x20801e(0x1a2)],'output':process[_0x20801e(0x1ab)]});let _0x1c7f1b;const _0x591eed=new Promise((_0x3acd5b,_0x48de1c)=>{const _0x7efdd5=_0x20801e;_0x1c7f1b=()=>{const _0x3cf580=a14_0xde63;_0x1c7f1b&&(_0x42cf45[_0x3cf580(0x1a6)](_0x3cf580(0x1a3),_0x1c7f1b),_0x1c7f1b=undefined);try{_0x42cf45[_0x3cf580(0x1b2)]();}catch{}_0x48de1c(new AbortPrompt());},_0x42cf45[_0x7efdd5(0x1ac)](_0x7efdd5(0x1a3),_0x1c7f1b);}),_0x31c2e1=()=>{const _0x464ef8=_0x20801e;_0x1c7f1b&&(_0x42cf45[_0x464ef8(0x1a6)](_0x464ef8(0x1a3),_0x1c7f1b),_0x1c7f1b=undefined);try{_0x42cf45[_0x464ef8(0x1b2)]();}catch{}};return{'rl':_0x42cf45,'abortPromise':_0x591eed,'disposeSuccess':_0x31c2e1};}export async function promptAccessKey(_0xeeebfc=''){const _0x127b51=a14_0xde63,{rl:_0x5826ce,abortPromise:_0x59a2f8,disposeSuccess:_0x464f28}=createSafeRl(),_0xa0d5f1=new Promise(_0x558edb=>{const _0x15a3e1=a14_0xde63,_0x227d4c=_0xeeebfc?'AccessKey\x20('+_0xeeebfc+_0x15a3e1(0x1ae):'AccessKey\x20(paste\x20ak_...):\x20';_0x5826ce['question'](_0x227d4c,_0xa9cbc7=>{_0x464f28(),_0x558edb(_0xa9cbc7['trim']()||_0xeeebfc);});});return Promise[_0x127b51(0x1b6)]([_0xa0d5f1,_0x59a2f8]);}function a14_0xca43(){const _0x20bbb8=['close','2036100YEePpI','8166155KByUjn','AbortPrompt','race','stdin','SIGINT','12488139UfybVS','51DItxMo','removeListener','14709thlipn','5333510VaFfiZ','764gnuVOz','8WNfPBP','stdout','once','name','):\x20','9477366ddkkaE','5874cPPUGa','30HfJuXM'];a14_0xca43=function(){return _0x20bbb8;};return a14_0xca43();}export function isAbortPrompt(_0x323aa7){const _0x3ffc4d=a14_0xde63;return _0x323aa7 instanceof Error&&_0x323aa7[_0x3ffc4d(0x1ad)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a15_0x277678=a15_0x4b9f;(function(_0x59b4c7,_0x514747){const _0x752e28=a15_0x4b9f,_0x4423ca=_0x59b4c7();while(!![]){try{const _0x3d9114=parseInt(_0x752e28(0xa6))/0x1*(parseInt(_0x752e28(0x9a))/0x2)+parseInt(_0x752e28(0x9b))/0x3*(-parseInt(_0x752e28(0xa5))/0x4)+parseInt(_0x752e28(0xa8))/0x5*(parseInt(_0x752e28(0x9e))/0x6)+parseInt(_0x752e28(0xa0))/0x7*(parseInt(_0x752e28(0x95))/0x8)+-parseInt(_0x752e28(0xa2))/0x9*(-parseInt(_0x752e28(0x99))/0xa)+-parseInt(_0x752e28(0x94))/0xb+parseInt(_0x752e28(0xa9))/0xc;if(_0x3d9114===_0x514747)break;else _0x4423ca['push'](_0x4423ca['shift']());}catch(_0xa4c40c){_0x4423ca['push'](_0x4423ca['shift']());}}}(a15_0x3cdb,0x6d077));function a15_0x4b9f(_0x5cfc2d,_0x3be84f){_0x5cfc2d=_0x5cfc2d-0x94;const _0x3cdb34=a15_0x3cdb();let _0x4b9fbb=_0x3cdb34[_0x5cfc2d];return _0x4b9fbb;}import{getBffEndpointContract}from'../../core/api-client.js';function a15_0x3cdb(){const _0x4d71ba=['77FdiEwR','functionName','15RwNCLE','643476cwXpfC','str','5793843WRMije','9480FzpTMW','version','name','bff','5558290JUMEJR','3428YnDPEX','1752330FujOuQ','detail','description','1093962GGZmsV','Backend\x20Function\x20name','1589AIUiPV','appCode','9ONtRjq','(none)','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','4XkZjEG'];a15_0x3cdb=function(){return _0x4d71ba;};return a15_0x3cdb();}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x277678(0x98),'command':a15_0x277678(0x9c),'description':a15_0x277678(0xa4),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x277678(0x9f)}],async 'execute'(_0x4a17b9){const _0x4ef283=a15_0x277678,_0x326f29=await getBffEndpointContract(_0x4a17b9[_0x4ef283(0xa1)],_0x4a17b9[_0x4ef283(0xaa)](_0x4ef283(0x97)));return{'ok':!![],'data':{'appCode':_0x326f29[_0x4ef283(0xa1)],'functionName':_0x326f29[_0x4ef283(0xa7)],'description':_0x326f29[_0x4ef283(0x9d)]||_0x4ef283(0xa3),'version':_0x326f29[_0x4ef283(0x96)],'gmtModified':_0x326f29['gmtModified']}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x135973=a16_0x4631;(function(_0x5698d9,_0x18b292){const _0x21fb9b=a16_0x4631,_0x5b06b7=_0x5698d9();while(!![]){try{const _0x179a79=parseInt(_0x21fb9b(0xd5))/0x1*(-parseInt(_0x21fb9b(0xcc))/0x2)+-parseInt(_0x21fb9b(0xd2))/0x3+-parseInt(_0x21fb9b(0xce))/0x4+-parseInt(_0x21fb9b(0xd7))/0x5+-parseInt(_0x21fb9b(0xcf))/0x6+parseInt(_0x21fb9b(0xca))/0x7+-parseInt(_0x21fb9b(0xd1))/0x8*(-parseInt(_0x21fb9b(0xd0))/0x9);if(_0x179a79===_0x18b292)break;else _0x5b06b7['push'](_0x5b06b7['shift']());}catch(_0x5f54c3){_0x5b06b7['push'](_0x5b06b7['shift']());}}}(a16_0x142c,0xab3e1));import{executeSdkBff}from'../../core/sdk-client.js';function a16_0x142c(){const _0x4a2b63=['3357KpaKND','48568cODMyN','725106JQwozH','Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','str','359uaalII','name','5140185RFgohj','8182104dgIkFG','Backend\x20Function\x20executed\x20in\x20','478xSbkBg','now','3342340sUelSm','3244926gxggFJ'];a16_0x142c=function(){return _0x4a2b63;};return a16_0x142c();}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a16_0x4631(_0x5cd06f,_0x38023d){_0x5cd06f=_0x5cd06f-0xca;const _0x142c18=a16_0x142c();let _0x4631fc=_0x142c18[_0x5cd06f];return _0x4631fc;}export const bffExec={'service':'bff','command':'exec','description':a16_0x135973(0xd3),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':'Backend\x20Function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x546d35){const _0x1b4c9e=a16_0x135973,_0x2bbb31=parseJsonParams(_0x546d35[_0x1b4c9e(0xd4)]('params')),_0x34f5b4=Date[_0x1b4c9e(0xcd)](),_0x4cb1ac=await executeSdkBff(_0x546d35[_0x1b4c9e(0xd4)](_0x1b4c9e(0xd6)),_0x2bbb31),_0x4faedd=Date[_0x1b4c9e(0xcd)]()-_0x34f5b4;return{'ok':!![],'data':{'result':_0x4cb1ac,'elapsed':_0x4faedd},'message':_0x1b4c9e(0xcb)+_0x4faedd+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x540d99,_0x348bbd){const _0x1d2b82=a17_0x5aec,_0xcfe835=_0x540d99();while(!![]){try{const _0x12c1c0=-parseInt(_0x1d2b82(0x1be))/0x1+-parseInt(_0x1d2b82(0x1bc))/0x2+parseInt(_0x1d2b82(0x1bd))/0x3*(-parseInt(_0x1d2b82(0x1b9))/0x4)+parseInt(_0x1d2b82(0x1c0))/0x5*(parseInt(_0x1d2b82(0x1ba))/0x6)+-parseInt(_0x1d2b82(0x1b7))/0x7*(-parseInt(_0x1d2b82(0x1bf))/0x8)+parseInt(_0x1d2b82(0x1bb))/0x9+-parseInt(_0x1d2b82(0x1b8))/0xa;if(_0x12c1c0===_0x348bbd)break;else _0xcfe835['push'](_0xcfe835['shift']());}catch(_0xdab4fb){_0xcfe835['push'](_0xcfe835['shift']());}}}(a17_0x1019,0xf0763));import{bffDetail}from'../../commands/bff/detail.js';function a17_0x1019(){const _0x456490=['2262504MUovZD','28209WBeNAw','773952pFsEcj','8MGazXj','28745ieYIAI','9623852kHFkHu','587730IhAjhB','548YvHRgK','1446GBImjb','13290966aZAhzE'];a17_0x1019=function(){return _0x456490;};return a17_0x1019();}function a17_0x5aec(_0x107a55,_0x493aef){_0x107a55=_0x107a55-0x1b7;const _0x101963=a17_0x1019();let _0x5aec53=_0x101963[_0x107a55];return _0x5aec53;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x3db678=a18_0x31ec;function a18_0x31ec(_0x2f3b89,_0x50ed34){_0x2f3b89=_0x2f3b89-0x1b9;const _0x53c789=a18_0x53c7();let _0x31ec58=_0x53c789[_0x2f3b89];return _0x31ec58;}(function(_0x48077d,_0x3a6d46){const _0x377312=a18_0x31ec,_0x2d42a9=_0x48077d();while(!![]){try{const _0x1acff8=parseInt(_0x377312(0x1cc))/0x1+parseInt(_0x377312(0x1bb))/0x2+parseInt(_0x377312(0x1be))/0x3*(parseInt(_0x377312(0x1ba))/0x4)+-parseInt(_0x377312(0x1d0))/0x5+-parseInt(_0x377312(0x1bd))/0x6+-parseInt(_0x377312(0x1bf))/0x7*(-parseInt(_0x377312(0x1c2))/0x8)+-parseInt(_0x377312(0x1bc))/0x9*(parseInt(_0x377312(0x1c1))/0xa);if(_0x1acff8===_0x3a6d46)break;else _0x2d42a9['push'](_0x2d42a9['shift']());}catch(_0x17109c){_0x2d42a9['push'](_0x2d42a9['shift']());}}}(a18_0x53c7,0x9a35b));function a18_0x53c7(){const _0x4de49b=['setLogPath','nonInteractive','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','\x20is\x20already\x20current','\x20at\x20','changed','skillVersion','installedPath','311920mXcnrG','unknown','CLI\x20Built-in\x20Skill\x20','code','2437235paudvR','read','install','apiError','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','inherit','Built-in\x20Skill\x20install\x20failed\x20[','error','4588DhfgMV','1888152YqtEKw','9QEiRWr','2916948HuuvUZ','1362vyUsBR','21nMfcAX','pipe','4643820CgHtYL','781056NfCIJm','cwd'];a18_0x53c7=function(){return _0x4de49b;};return a18_0x53c7();}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a18_0x3db678(0x1d2),'description':a18_0x3db678(0x1c6),'risk':a18_0x3db678(0x1d1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x48c3ea){const _0x58db0b=a18_0x3db678;logger[_0x58db0b(0x1c4)](process[_0x58db0b(0x1c3)]()),logger['info']('cli-skill-install',_0x58db0b(0x1d4));const _0x4aed9c=installBuiltinSkill({'stdio':_0x48c3ea[_0x58db0b(0x1c5)]?_0x58db0b(0x1c0):_0x58db0b(0x1d5)});if(!_0x4aed9c['ok'])throw CliErrors[_0x58db0b(0x1d3)](_0x58db0b(0x1d6)+(_0x4aed9c[_0x58db0b(0x1cf)]||'INSTALL_FAILED')+']:\x20'+(_0x4aed9c[_0x58db0b(0x1b9)]||_0x58db0b(0x1cd)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x4aed9c['repairCommand']);const _0x3cf21e=_0x4aed9c[_0x58db0b(0x1cb)]?_0x58db0b(0x1c8)+_0x4aed9c[_0x58db0b(0x1cb)]:'';return console['log'](_0x4aed9c[_0x58db0b(0x1c9)]?_0x58db0b(0x1ce)+_0x4aed9c[_0x58db0b(0x1ca)]+'\x20installed'+_0x3cf21e:'CLI\x20Built-in\x20Skill\x20'+_0x4aed9c[_0x58db0b(0x1ca)]+_0x58db0b(0x1c7)+_0x3cf21e),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a19_0xcec7(){const _0xc71068=['40uEsIHc','validation','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','\x20found).','inProject','Use\x20only\x20one\x20config\x20scope\x20flag.','1UkXPXY',',\x20or\x20create\x20a\x20project-local\x20','2597514hqRmDR','9753865HsEhYt','\x20first.','452583vhebtD','\x20(global)','50HPqVzK','newConfigFileName','project-or-global-explicit','3wyVXcY','2573565RpdfAm','43141DqdHCw','1348540FSyYAI','project','global','1120102hUaYoX','Not\x20inside\x20a\x20project\x20(no\x20'];a19_0xcec7=function(){return _0xc71068;};return a19_0xcec7();}(function(_0x3b116b,_0x4d9c6f){const _0xaecfd0=a19_0x5d45,_0x4a868d=_0x3b116b();while(!![]){try{const _0x1c53eb=-parseInt(_0xaecfd0(0xf0))/0x1*(parseInt(_0xaecfd0(0xe8))/0x2)+-parseInt(_0xaecfd0(0xe2))/0x3*(-parseInt(_0xaecfd0(0xe5))/0x4)+parseInt(_0xaecfd0(0xe3))/0x5+-parseInt(_0xaecfd0(0xf2))/0x6+parseInt(_0xaecfd0(0xe4))/0x7*(-parseInt(_0xaecfd0(0xea))/0x8)+parseInt(_0xaecfd0(0xdd))/0x9*(-parseInt(_0xaecfd0(0xdf))/0xa)+parseInt(_0xaecfd0(0xdb))/0xb;if(_0x1c53eb===_0x4d9c6f)break;else _0x4a868d['push'](_0x4a868d['shift']());}catch(_0x17cee4){_0x4a868d['push'](_0x4a868d['shift']());}}}(a19_0xcec7,0x711ef));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a19_0x5d45(_0x4ccb4b,_0xf89f3d){_0x4ccb4b=_0x4ccb4b-0xdb;const _0xcec712=a19_0xcec7();let _0x5d457a=_0xcec712[_0x4ccb4b];return _0x5d457a;}export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export function resolveConfigScope(_0x56b010){const _0x5ab0f5=a19_0x5d45,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x311a85}=_0x56b010;if(explicitGlobal&&explicitProject)throw CliErrors['validation'](_0x5ab0f5(0xec),_0x5ab0f5(0xef));if(explicitGlobal)return _0x5ab0f5(0xe7);if(explicitProject)return _0x5ab0f5(0xe6);switch(_0x311a85){case'global-default':return _0x5ab0f5(0xe7);case _0x5ab0f5(0xe1):if(!(_0x56b010[_0x5ab0f5(0xee)]??isInProject()))throw CliErrors[_0x5ab0f5(0xeb)](_0x5ab0f5(0xe9)+PRODUCT_CONFIG[_0x5ab0f5(0xe0)]+_0x5ab0f5(0xed),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0x5ab0f5(0xe0)]+_0x5ab0f5(0xf1)+PRODUCT_CONFIG[_0x5ab0f5(0xe0)]+_0x5ab0f5(0xdc));return'project';}}export function toScopeFlags(_0x2eeaed){const _0x40ecbf=a19_0x5d45;return{'global':_0x2eeaed===_0x40ecbf(0xe7)};}export function formatScopeLabel(_0x280af4){const _0x26030d=a19_0x5d45;return _0x280af4===_0x26030d(0xe7)?_0x26030d(0xde):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dc381,_0x19b097){const _0x41e77c=a20_0x2e20,_0x2d076e=_0x5dc381();while(!![]){try{const _0x6436a5=parseInt(_0x41e77c(0x1b3))/0x1+-parseInt(_0x41e77c(0x1ac))/0x2*(parseInt(_0x41e77c(0x1b4))/0x3)+parseInt(_0x41e77c(0x1c2))/0x4*(parseInt(_0x41e77c(0x1be))/0x5)+-parseInt(_0x41e77c(0x1c4))/0x6*(parseInt(_0x41e77c(0x1b2))/0x7)+-parseInt(_0x41e77c(0x1bc))/0x8*(-parseInt(_0x41e77c(0x1ae))/0x9)+-parseInt(_0x41e77c(0x1b1))/0xa*(-parseInt(_0x41e77c(0x1bd))/0xb)+-parseInt(_0x41e77c(0x1a8))/0xc*(parseInt(_0x41e77c(0x1b7))/0xd);if(_0x6436a5===_0x19b097)break;else _0x2d076e['push'](_0x2d076e['shift']());}catch(_0x514307){_0x2d076e['push'](_0x2d076e['shift']());}}}(a20_0x5f47,0x5d3bc));import{CliErrors}from'../../errors.js';function isSet(_0x524b25,_0x1ab431){const _0x2feaf1=a20_0x2e20,_0x13b846=_0x524b25[_0x2feaf1(0x1ba)](_0x1ab431);return _0x13b846!==undefined&&_0x13b846!==''&&_0x13b846!==![]&&_0x13b846!==0x0;}function a20_0x2e20(_0xe9cd61,_0x258711){_0xe9cd61=_0xe9cd61-0x1a8;const _0x5f478b=a20_0x5f47();let _0x2e2092=_0x5f478b[_0xe9cd61];return _0x2e2092;}function fmtNames(_0x3c5210){const _0x3166c2=a20_0x2e20;return _0x3c5210[_0x3166c2(0x1c3)](_0x36545d=>'--'+_0x36545d)[_0x3166c2(0x1b6)](',\x20');}export function requireOneOf(_0x4ab9f2,_0x30fb13,_0x315292){const _0x1dd992=a20_0x2e20,_0x32be05=_0x30fb13['filter'](_0x31e643=>isSet(_0x4ab9f2,_0x31e643));if(_0x32be05[_0x1dd992(0x1c8)]!==0x1)throw CliErrors[_0x1dd992(0x1aa)](_0x32be05['length']===0x0?_0x1dd992(0x1bb)+fmtNames(_0x30fb13)+_0x1dd992(0x1b8)+_0x315292+'`.':_0x1dd992(0x1ad)+fmtNames(_0x30fb13)+_0x1dd992(0x1c6)+fmtNames(_0x32be05)+'.',_0x32be05[_0x1dd992(0x1c8)]===0x0?_0x1dd992(0x1c7)+fmtNames(_0x30fb13):_0x1dd992(0x1b9));}function a20_0x5f47(){const _0x1da5bf=['At\x20least\x20one\x20of\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','356416HJgBnR','map','174774GwOxpC','test','\x20is\x20allowed,\x20found:\x20','Provide\x20one\x20of:\x20','length',',\x20got\x20\x22','24900Sptipj','Flags\x20','validation','some','645026cShUPH','Only\x20one\x20of\x20','465462fLvqtf','Use\x20only\x20one\x20of:\x20','str','50dGoSET','126kKsnTY','399072CsGjoX','3xGqjyM','Invalid\x20--','join','26kypUca','\x20is\x20required\x20for\x20`','Remove\x20all\x20but\x20one.','flag','Exactly\x20one\x20of\x20','88bswdXX','386749wyhuuN','5vVOJSB',':\x20expected\x20'];a20_0x5f47=function(){return _0x1da5bf;};return a20_0x5f47();}export function requireAnyOf(_0x54908b,_0x178f0b,_0x310525){const _0x350362=a20_0x2e20;if(!_0x178f0b[_0x350362(0x1ab)](_0x1ad41e=>isSet(_0x54908b,_0x1ad41e)))throw CliErrors[_0x350362(0x1aa)](_0x350362(0x1c0)+fmtNames(_0x178f0b)+_0x350362(0x1b8)+_0x310525+'`.',_0x350362(0x1c7)+fmtNames(_0x178f0b));}export function mutuallyExclusive(_0x2cf51d,_0x4aa028,_0x4696da){const _0x3c7c6c=a20_0x2e20,_0x391bb5=_0x4aa028['filter'](_0x5cce16=>isSet(_0x2cf51d,_0x5cce16));if(_0x391bb5[_0x3c7c6c(0x1c8)]>0x1)throw CliErrors[_0x3c7c6c(0x1aa)](_0x3c7c6c(0x1a9)+fmtNames(_0x391bb5)+_0x3c7c6c(0x1c1)+_0x4696da+'`.',_0x3c7c6c(0x1af)+fmtNames(_0x4aa028));}export function validatePattern(_0x3c8bf1,_0x5ef5aa,_0x42d674,_0x12f90d){const _0x321803=a20_0x2e20,_0x32fb06=_0x3c8bf1[_0x321803(0x1b0)](_0x5ef5aa);if(_0x32fb06&&!_0x42d674[_0x321803(0x1c5)](_0x32fb06))throw CliErrors[_0x321803(0x1aa)](_0x321803(0x1b5)+_0x5ef5aa+_0x321803(0x1bf)+_0x12f90d+_0x321803(0x1c9)+_0x32fb06+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a21_0x1a56d5=a21_0x305d;(function(_0x10f85f,_0x431f30){const _0x3eacfe=a21_0x305d,_0x440f4a=_0x10f85f();while(!![]){try{const _0x441f2d=parseInt(_0x3eacfe(0x175))/0x1+parseInt(_0x3eacfe(0x16f))/0x2+-parseInt(_0x3eacfe(0x16e))/0x3*(-parseInt(_0x3eacfe(0x171))/0x4)+parseInt(_0x3eacfe(0x177))/0x5+parseInt(_0x3eacfe(0x174))/0x6*(-parseInt(_0x3eacfe(0x172))/0x7)+parseInt(_0x3eacfe(0x176))/0x8+parseInt(_0x3eacfe(0x16a))/0x9*(-parseInt(_0x3eacfe(0x179))/0xa);if(_0x441f2d===_0x431f30)break;else _0x440f4a['push'](_0x440f4a['shift']());}catch(_0x5c9d76){_0x440f4a['push'](_0x440f4a['shift']());}}}(a21_0xa00e,0x474be));function a21_0xa00e(){const _0x49e201=['1615915IrzcKY','Dataset\x20code\x20(32-char\x20hex\x20UUID)','6610UIOeQE','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','number','code','params','boolean','Resource\x20ID','sqlcode','19566bQELoA','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','Resource\x20name\x20for\x20lookup','verbose','522987YvYObq','405644rWfoWm','string','4JfJnlH','731843yVeGdb','name','6YMyJft','583956wEOQEP','4394424tMFNjW'];a21_0xa00e=function(){return _0x49e201;};return a21_0xa00e();}function a21_0x305d(_0x22214c,_0x404b5){_0x22214c=_0x22214c-0x167;const _0xa00e17=a21_0xa00e();let _0x305dc9=_0xa00e17[_0x22214c];return _0x305dc9;}export const GLOBAL_SCOPE_FLAG={'name':'global','type':'boolean','default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};export const CODE_FLAG={'name':a21_0x1a56d5(0x17c),'type':'string','required':!![],'description':a21_0x1a56d5(0x178),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'}};export const SQLCODE_FLAG={'name':a21_0x1a56d5(0x169),'type':'string','required':!![],'description':a21_0x1a56d5(0x17a),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a21_0x1a56d5(0x16d),'type':a21_0x1a56d5(0x167),'description':'Return\x20full\x20raw\x20response\x20object'};export const PARAMS_FLAG={'name':a21_0x1a56d5(0x17d),'type':a21_0x1a56d5(0x170),'description':a21_0x1a56d5(0x16b)};export const NAME_FLAG={'name':a21_0x1a56d5(0x173),'type':a21_0x1a56d5(0x170),'description':a21_0x1a56d5(0x16c)};export const ID_FLAG={'name':'id','type':a21_0x1a56d5(0x17b),'required':!![],'description':a21_0x1a56d5(0x168)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44f215,_0x30f826){const _0x38459a=a22_0x1dff,_0x5b0650=_0x44f215();while(!![]){try{const _0x226e8b=parseInt(_0x38459a(0x19f))/0x1*(-parseInt(_0x38459a(0x1a7))/0x2)+parseInt(_0x38459a(0x1b1))/0x3*(parseInt(_0x38459a(0x1b3))/0x4)+-parseInt(_0x38459a(0x1a8))/0x5*(parseInt(_0x38459a(0x1a3))/0x6)+-parseInt(_0x38459a(0x1b0))/0x7*(-parseInt(_0x38459a(0x1a5))/0x8)+-parseInt(_0x38459a(0x1a9))/0x9+parseInt(_0x38459a(0x1a0))/0xa*(parseInt(_0x38459a(0x1b2))/0xb)+-parseInt(_0x38459a(0x1a6))/0xc*(-parseInt(_0x38459a(0x1ad))/0xd);if(_0x226e8b===_0x30f826)break;else _0x5b0650['push'](_0x5b0650['shift']());}catch(_0x556662){_0x5b0650['push'](_0x5b0650['shift']());}}}(a22_0x3df3,0x9341c));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a22_0x1dff(_0x350718,_0x48d964){_0x350718=_0x350718-0x19f;const _0x3df39b=a22_0x3df3();let _0x1dff69=_0x3df39b[_0x350718];return _0x1dff69;}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x5a84be){const _0x3699bf=a22_0x1dff;if(_0x5a84be>=BYTES_PER_MB){const _0x4e90d7=Math[_0x3699bf(0x1ae)](_0x5a84be/BYTES_PER_MB*0x64)/0x64;return _0x4e90d7[_0x3699bf(0x1ac)](0x2)+_0x3699bf(0x1a1);}return _0x5a84be+'\x20B';}export function requireRuntimeUploadFile(_0x2ac149,_0x25686e){const _0x450f5e=a22_0x1dff,_0x37f643=_0x2ac149['trim']();if(!_0x37f643)throw CliErrors[_0x450f5e(0x1a4)](_0x25686e+'\x20path\x20is\x20required.');if(!existsSync(_0x37f643))throw CliErrors[_0x450f5e(0x1a4)](_0x450f5e(0x1af)+_0x37f643);const _0x53d611=statSync(_0x37f643);if(!_0x53d611[_0x450f5e(0x1a2)]())throw CliErrors['validation'](_0x450f5e(0x1aa)+_0x37f643);if(_0x53d611[_0x450f5e(0x1b4)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x450f5e(0x1a4)](_0x450f5e(0x1ab)+_0x37f643+'\x20('+formatBytes(_0x53d611['size'])+')');return{'path':_0x37f643,'size':_0x53d611[_0x450f5e(0x1b4)]};}function a22_0x3df3(){const _0x37ffe2=['\x20MB','isFile','6362622wPRhMG','validation','24dbsphU','4581948GvmGmX','10oMMkvO','5MqHqxj','9545400tTexHK','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','toFixed','52AfXqPu','ceil','File\x20not\x20found:\x20','161077ucrhjb','51ZfKZeN','12537349BkfWuI','204136mSrkub','size','175897UQVjSl','10BiBjEO'];a22_0x3df3=function(){return _0x37ffe2;};return a22_0x3df3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a23_0x2fa02c=a23_0x4756;(function(_0x3a12a6,_0x3e4ce4){const _0x25d50e=a23_0x4756,_0x21a4a7=_0x3a12a6();while(!![]){try{const _0x121f00=parseInt(_0x25d50e(0x15b))/0x1*(parseInt(_0x25d50e(0x176))/0x2)+parseInt(_0x25d50e(0x187))/0x3*(parseInt(_0x25d50e(0x17c))/0x4)+-parseInt(_0x25d50e(0x159))/0x5+parseInt(_0x25d50e(0x169))/0x6*(parseInt(_0x25d50e(0x150))/0x7)+-parseInt(_0x25d50e(0x17f))/0x8+-parseInt(_0x25d50e(0x153))/0x9+parseInt(_0x25d50e(0x16f))/0xa;if(_0x121f00===_0x3e4ce4)break;else _0x21a4a7['push'](_0x21a4a7['shift']());}catch(_0x955fc3){_0x21a4a7['push'](_0x21a4a7['shift']());}}}(a23_0x64c8,0x5eb30));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_0x4756(_0x4cda5f,_0x5a4138){_0x4cda5f=_0x4cda5f-0x14c;const _0x64c8cd=a23_0x64c8();let _0x4756d3=_0x64c8cd[_0x4cda5f];return _0x4756d3;}import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0xae6f5f){const _0x514c40=a23_0x4756,_0x1b0478=_0xae6f5f[_0x514c40(0x155)]('.');if(_0x1b0478[_0x514c40(0x18e)]!==0x3||_0x1b0478[0x0]!=='apps'||_0x1b0478[0x2]!==_0x514c40(0x16a))return undefined;const _0x12fd45=_0x1b0478[0x1]?.[_0x514c40(0x160)]();return _0x12fd45?_0x12fd45:undefined;}function a23_0x64c8(){const _0x5514b1=['Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','\x22.\x20Allowed:\x20','isArray','Key\x20already\x20absent:\x20','trim','args','delete','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x20\x20project:\x20','read','bool','\x20config\x20get\x20<key>','log','501588YHVjpX','appcode','format','get','set','Deleted\x20`','6191090VKGFZj','pretty','Usage:\x20','\x20config\x20delete\x20<key>\x20[--global]','validation','\x20(global)','(none)','86zLycKu','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','accessKey','project-or-global-explicit','Set\x20a\x20configuration\x20value','join','528mNLinw','config','Delete\x20a\x20configuration\x20value','5899600rwrEcg','locale','apps','raw','Top-level\x20key\x20\x22','value','field','keys','13689CBQVxP','`\x20=\x20\x22','Missing\x20key\x20argument.','Settable\x20keys:\x20','Invalid\x20locale\x20value.','alias','../../context.js','length','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','\x20config\x20set\x20<key>\x20<value>\x20[--global]','Key\x20not\x20found:\x20','global','pageSize','stringify','key','write','42CCNmPf','includes','Config\x20files:\x0a','4619034FNVDjN','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','split','Set\x20`','object','Get\x20a\x20config\x20value','1510575PTLzbO','Value\x20to\x20assign','5062Xdwxwt'];a23_0x64c8=function(){return _0x5514b1;};return a23_0x64c8();}function parseAliasDeleteKey(_0x507ae3){const _0x34485c=a23_0x4756,_0x1e4219=_0x507ae3[_0x34485c(0x155)]('.');if(_0x1e4219['length']===0x2&&_0x1e4219[0x0]===_0x34485c(0x181)){const _0x176584=_0x1e4219[0x1]?.['trim']();return _0x176584?{'alias':_0x176584}:undefined;}if(_0x1e4219[_0x34485c(0x18e)]===0x3&&_0x1e4219[0x0]==='apps'&&_0x1e4219[0x2]===_0x34485c(0x16a)){const _0x439046=_0x1e4219[0x1]?.[_0x34485c(0x160)]();return _0x439046?{'alias':_0x439046,'field':_0x34485c(0x16a)}:undefined;}return undefined;}function setLocalAppAlias(_0x41c68d,_0x41e655,_0x333712){const _0x848c94=a23_0x4756,_0x4385b3=_0x41c68d[_0x848c94(0x181)]&&typeof _0x41c68d[_0x848c94(0x181)]===_0x848c94(0x157)&&!Array[_0x848c94(0x15e)](_0x41c68d[_0x848c94(0x181)])?_0x41c68d[_0x848c94(0x181)]:{},_0x325351=_0x4385b3[_0x41e655]&&typeof _0x4385b3[_0x41e655]===_0x848c94(0x157)&&!Array[_0x848c94(0x15e)](_0x4385b3[_0x41e655])?_0x4385b3[_0x41e655]:{};_0x325351[_0x848c94(0x16a)]=_0x333712,_0x4385b3[_0x41e655]=_0x325351,_0x41c68d[_0x848c94(0x181)]=_0x4385b3;}function deleteLocalAppAlias(_0x102793,_0x120ed1){const _0x13c00=a23_0x4756;if(!_0x102793['apps']||typeof _0x102793[_0x13c00(0x181)]!==_0x13c00(0x157)||Array[_0x13c00(0x15e)](_0x102793['apps']))return![];const _0x5c8b57=_0x102793[_0x13c00(0x181)],_0x117fe2=_0x5c8b57[_0x120ed1[_0x13c00(0x18c)]];if(!_0x117fe2||typeof _0x117fe2!==_0x13c00(0x157)||Array[_0x13c00(0x15e)](_0x117fe2))return![];if(!_0x120ed1[_0x13c00(0x185)])return delete _0x5c8b57[_0x120ed1[_0x13c00(0x18c)]],!![];if(!(_0x120ed1[_0x13c00(0x185)]in _0x117fe2))return![];return delete _0x117fe2[_0x120ed1[_0x13c00(0x185)]],Object[_0x13c00(0x186)](_0x117fe2)[_0x13c00(0x18e)]===0x0&&delete _0x5c8b57[_0x120ed1[_0x13c00(0x18c)]],!![];}const listDef={'service':a23_0x2fa02c(0x17d),'command':'list','description':'List\x20current\x20config','risk':a23_0x2fa02c(0x165),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x44e847){const _0x1d82e4=a23_0x2fa02c,{buildConfigFromFlags:_0x3caf81}=await import('../../context.js'),_0x31f1a3=_0x3caf81({}),_0x58d381=redactCliConfigCredentials(_0x31f1a3[_0x1d82e4(0x182)]),_0x3fdd39=getProjectConfigPath(),_0x5ee591=resolveWriteConfigPath(_0x1d82e4(0x192));if(_0x44e847[_0x1d82e4(0x16b)]===_0x1d82e4(0x170))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x1d82e4(0x14d)](_0x58d381,null,0x2)+'\x0a\x0a')+_0x1d82e4(0x152)+(_0x1d82e4(0x164)+(_0x3fdd39??_0x1d82e4(0x175))+'\x0a')+('\x20\x20global:\x20\x20'+_0x5ee591)};return{'ok':!![],'data':{'effective':_0x58d381,'configFiles':{'project':_0x3fdd39??null,'global':_0x5ee591}}};}},getDef={'service':'config','command':a23_0x2fa02c(0x16c),'description':a23_0x2fa02c(0x158),'risk':a23_0x2fa02c(0x165),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2fa02c(0x14e),'description':a23_0x2fa02c(0x163),'required':!![]}],'flags':[],async 'execute'(_0x54a48c){const _0x183a82=a23_0x2fa02c,_0x43b296=_0x54a48c['args'][0x0];if(!_0x43b296)throw CliErrors[_0x183a82(0x173)](_0x183a82(0x189),'Usage:\x20'+CLI_BIN_NAME+_0x183a82(0x167));const {buildConfigFromFlags:_0x402b56}=await import(_0x183a82(0x18d)),{raw:_0x467d3c}=_0x402b56({});if(_0x43b296[_0x183a82(0x151)]('.')){const _0x378d57=_0x43b296[_0x183a82(0x155)]('.');let _0x484191=_0x467d3c;for(const _0x1114f4 of _0x378d57){if(_0x484191==null||typeof _0x484191!==_0x183a82(0x157))throw CliErrors[_0x183a82(0x173)](_0x183a82(0x191)+_0x43b296);_0x484191=_0x484191[_0x1114f4];}if(_0x484191===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x43b296);const _0xfb9824=redactCliConfigValue(_0x43b296,_0x484191);return console['log'](typeof _0xfb9824===_0x183a82(0x157)?JSON[_0x183a82(0x14d)](_0xfb9824,null,0x2):String(_0xfb9824)),{'ok':!![]};}const _0x370f45=_0x467d3c[_0x43b296];if(_0x370f45===undefined)throw CliErrors['validation'](_0x183a82(0x191)+_0x43b296);const _0x3110ba=redactCliConfigValue(_0x43b296,_0x370f45);return console[_0x183a82(0x168)](typeof _0x3110ba===_0x183a82(0x157)?JSON[_0x183a82(0x14d)](_0x3110ba,null,0x2):String(_0x3110ba)),{'ok':!![]};}},setDef={'service':a23_0x2fa02c(0x17d),'command':a23_0x2fa02c(0x16d),'description':a23_0x2fa02c(0x17a),'risk':a23_0x2fa02c(0x14f),'confirmationDescription':a23_0x2fa02c(0x154),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2fa02c(0x14e),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x2fa02c(0x184),'description':a23_0x2fa02c(0x15a),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x42da05){const _0x569abe=a23_0x2fa02c,_0x20a74b=_0x42da05['args'][0x0],_0x34ea44=_0x42da05[_0x569abe(0x161)][0x1];if(!_0x20a74b||_0x34ea44===undefined)throw CliErrors['validation']('Missing\x20key\x20or\x20value.',_0x569abe(0x171)+CLI_BIN_NAME+_0x569abe(0x190));if(ENUM_KEYS[_0x20a74b]&&!ENUM_KEYS[_0x20a74b][_0x569abe(0x151)](_0x34ea44))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x20a74b+_0x569abe(0x15d)+ENUM_KEYS[_0x20a74b][_0x569abe(0x17b)](',\x20'));if(isCliProtectedConfigKey(_0x20a74b))throw CliErrors[_0x569abe(0x173)]('\x22'+_0x20a74b+_0x569abe(0x18f));if(_0x20a74b===_0x569abe(0x14c)){const _0x46f4ba=Number(_0x34ea44);if(isNaN(_0x46f4ba)||_0x46f4ba<=0x0)throw CliErrors[_0x569abe(0x173)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x4a2972=resolveWriteScope({'explicitGlobal':_0x42da05[_0x569abe(0x166)](_0x569abe(0x192)),'policy':_0x569abe(0x179)}),_0x28a738=toScopeFlags(_0x4a2972),_0x3b24b8=readScopedConfig(_0x28a738),_0x484cfb=parseAliasAppcodeSetKey(_0x20a74b);if(!_0x484cfb&&!isTopLevelConfigKey(_0x20a74b))throw CliErrors[_0x569abe(0x173)](_0x569abe(0x183)+_0x20a74b+'\x22\x20is\x20not\x20settable.',_0x569abe(0x18a)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');if(_0x484cfb)setLocalAppAlias(_0x3b24b8,_0x484cfb,_0x34ea44);else{if(_0x20a74b===_0x569abe(0x180)){const _0x1d16fe=normalizeLocale(_0x34ea44);if(!_0x1d16fe)throw CliErrors[_0x569abe(0x173)](_0x569abe(0x18b),_0x569abe(0x15c));_0x3b24b8[_0x569abe(0x180)]=_0x1d16fe;}else _0x3b24b8[_0x20a74b]=_0x20a74b===_0x569abe(0x14c)?Number(_0x34ea44):DOMAIN_CONFIG_FIELDS['includes'](_0x20a74b)?normalizeDomainOrigin(_0x20a74b,_0x34ea44):_0x34ea44;}const _0x596eda=_0x20a74b===_0x569abe(0x178)?maskCliAccessKey(_0x34ea44):!_0x484cfb&&_0x20a74b===_0x569abe(0x180)?String(_0x3b24b8[_0x569abe(0x180)]):_0x34ea44;return console[_0x569abe(0x168)](_0x569abe(0x156)+_0x20a74b+_0x569abe(0x188)+_0x596eda+'\x22'+(_0x4a2972==='global'?'\x20(global)':'')),writeScopedConfig(_0x3b24b8,_0x28a738),{'ok':!![]};}},deleteDef={'service':a23_0x2fa02c(0x17d),'command':a23_0x2fa02c(0x162),'description':a23_0x2fa02c(0x17e),'risk':a23_0x2fa02c(0x14f),'confirmationDescription':a23_0x2fa02c(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2fa02c(0x14e),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x5061b5){const _0x37fee1=a23_0x2fa02c,_0x430f3a=_0x5061b5['args'][0x0];if(!_0x430f3a)throw CliErrors[_0x37fee1(0x173)](_0x37fee1(0x189),_0x37fee1(0x171)+CLI_BIN_NAME+_0x37fee1(0x172));if(isCliProtectedConfigKey(_0x430f3a))throw CliErrors[_0x37fee1(0x173)]('\x22'+_0x430f3a+_0x37fee1(0x18f));const _0x2bc81a=resolveWriteScope({'explicitGlobal':_0x5061b5['bool'](_0x37fee1(0x192)),'policy':_0x37fee1(0x179)}),_0x22f060=toScopeFlags(_0x2bc81a),_0x34756d=readScopedConfig(_0x22f060),_0x2e708e=parseAliasDeleteKey(_0x430f3a);if(_0x2e708e){if(!deleteLocalAppAlias(_0x34756d,_0x2e708e))return console[_0x37fee1(0x168)](_0x37fee1(0x15f)+_0x430f3a+(_0x2bc81a===_0x37fee1(0x192)?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x430f3a,'scope':_0x2bc81a,'changed':![]}};return console[_0x37fee1(0x168)](_0x37fee1(0x16e)+_0x430f3a+'`'+(_0x2bc81a===_0x37fee1(0x192)?_0x37fee1(0x174):'')),writeScopedConfig(_0x34756d,_0x22f060),{'ok':!![],'data':{'key':_0x430f3a,'scope':_0x2bc81a,'changed':!![]}};}if(_0x34756d[_0x430f3a]===undefined)return console[_0x37fee1(0x168)](_0x37fee1(0x15f)+_0x430f3a+(_0x2bc81a===_0x37fee1(0x192)?_0x37fee1(0x174):'')),{'ok':!![],'data':{'key':_0x430f3a,'scope':_0x2bc81a,'changed':![]}};return delete _0x34756d[_0x430f3a],console['log'](_0x37fee1(0x16e)+_0x430f3a+'`'+(_0x2bc81a===_0x37fee1(0x192)?_0x37fee1(0x174):'')),writeScopedConfig(_0x34756d,_0x22f060),{'ok':!![],'data':{'key':_0x430f3a,'scope':_0x2bc81a,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a23_0x538553=a23_0x5746;(function(_0x11169e,_0x1c9b42){const _0x30c147=a23_0x5746,_0x420a4d=_0x11169e();while(!![]){try{const _0x35bf0c=-parseInt(_0x30c147(0x1a2))/0x1*(parseInt(_0x30c147(0x1b5))/0x2)+-parseInt(_0x30c147(0x1c3))/0x3*(parseInt(_0x30c147(0x1c7))/0x4)+parseInt(_0x30c147(0x1d0))/0x5+-parseInt(_0x30c147(0x1bd))/0x6*(-parseInt(_0x30c147(0x1b2))/0x7)+-parseInt(_0x30c147(0x1b8))/0x8+parseInt(_0x30c147(0x1bc))/0x9+parseInt(_0x30c147(0x19f))/0xa;if(_0x35bf0c===_0x1c9b42)break;else _0x420a4d['push'](_0x420a4d['shift']());}catch(_0x5d9d52){_0x420a4d['push'](_0x420a4d['shift']());}}}(a23_0x591f,0x4fcfd));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';import{DOMAIN_CONFIG_FIELDS,normalizeDomainOrigin}from'../../config/domain-config.js';import{configInitDefinition}from'../../commands/config/init.js';import{GLOBAL_SCOPE_FLAG}from'../../commands/common/flags.js';import{maskCliAccessKey,redactCliConfigCredentials,redactCliConfigValue}from'../../utils/access-key-redaction.js';function parseAliasAppcodeSetKey(_0x2a298f){const _0x36807b=a23_0x5746,_0x3798a4=_0x2a298f['split']('.');if(_0x3798a4[_0x36807b(0x196)]!==0x3||_0x3798a4[0x0]!=='apps'||_0x3798a4[0x2]!==_0x36807b(0x1c0))return undefined;const _0x330fd1=_0x3798a4[0x1]?.['trim']();return _0x330fd1?_0x330fd1:undefined;}function parseAliasDeleteKey(_0xc5eefb){const _0x182fa1=a23_0x5746,_0x42830e=_0xc5eefb[_0x182fa1(0x194)]('.');if(_0x42830e['length']===0x2&&_0x42830e[0x0]===_0x182fa1(0x198)){const _0x3472eb=_0x42830e[0x1]?.[_0x182fa1(0x1bb)]();return _0x3472eb?{'alias':_0x3472eb}:undefined;}if(_0x42830e[_0x182fa1(0x196)]===0x3&&_0x42830e[0x0]===_0x182fa1(0x198)&&_0x42830e[0x2]===_0x182fa1(0x1c0)){const _0x4dffc4=_0x42830e[0x1]?.['trim']();return _0x4dffc4?{'alias':_0x4dffc4,'field':_0x182fa1(0x1c0)}:undefined;}return undefined;}function a23_0x5746(_0x5229e4,_0x15fb1e){_0x5229e4=_0x5229e4-0x193;const _0x591fa6=a23_0x591f();let _0x57462f=_0x591fa6[_0x5229e4];return _0x57462f;}function setLocalAppAlias(_0x11ca35,_0x161b41,_0x41fbe3){const _0x3b7438=a23_0x5746,_0x21c151=_0x11ca35[_0x3b7438(0x198)]&&typeof _0x11ca35[_0x3b7438(0x198)]===_0x3b7438(0x1b7)&&!Array[_0x3b7438(0x1b3)](_0x11ca35[_0x3b7438(0x198)])?_0x11ca35[_0x3b7438(0x198)]:{},_0x1fec0d=_0x21c151[_0x161b41]&&typeof _0x21c151[_0x161b41]===_0x3b7438(0x1b7)&&!Array[_0x3b7438(0x1b3)](_0x21c151[_0x161b41])?_0x21c151[_0x161b41]:{};_0x1fec0d[_0x3b7438(0x1c0)]=_0x41fbe3,_0x21c151[_0x161b41]=_0x1fec0d,_0x11ca35[_0x3b7438(0x198)]=_0x21c151;}function deleteLocalAppAlias(_0x5b74fd,_0x2f111e){const _0x149962=a23_0x5746;if(!_0x5b74fd[_0x149962(0x198)]||typeof _0x5b74fd[_0x149962(0x198)]!==_0x149962(0x1b7)||Array[_0x149962(0x1b3)](_0x5b74fd[_0x149962(0x198)]))return![];const _0x5f867b=_0x5b74fd[_0x149962(0x198)],_0x2be595=_0x5f867b[_0x2f111e[_0x149962(0x1d9)]];if(!_0x2be595||typeof _0x2be595!==_0x149962(0x1b7)||Array[_0x149962(0x1b3)](_0x2be595))return![];if(!_0x2f111e[_0x149962(0x1a5)])return delete _0x5f867b[_0x2f111e[_0x149962(0x1d9)]],!![];if(!(_0x2f111e[_0x149962(0x1a5)]in _0x2be595))return![];return delete _0x2be595[_0x2f111e[_0x149962(0x1a5)]],Object[_0x149962(0x1b6)](_0x2be595)['length']===0x0&&delete _0x5f867b[_0x2f111e['alias']],!![];}const listDef={'service':'config','command':a23_0x538553(0x1ca),'description':a23_0x538553(0x1c4),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1c8c7d){const _0x48436e=a23_0x538553,{buildConfigFromFlags:_0x2677e0}=await import(_0x48436e(0x1af)),_0x23654a=_0x2677e0({}),_0x5741ce=redactCliConfigCredentials(_0x23654a[_0x48436e(0x19d)]),_0x5df66c=getProjectConfigPath(),_0x31d033=resolveWriteConfigPath('global');if(_0x1c8c7d[_0x48436e(0x1ae)]===_0x48436e(0x1d7))return{'ok':!![],'message':_0x48436e(0x1a0)+(JSON[_0x48436e(0x1c1)](_0x5741ce,null,0x2)+'\x0a\x0a')+_0x48436e(0x19b)+(_0x48436e(0x199)+(_0x5df66c??_0x48436e(0x19a))+'\x0a')+(_0x48436e(0x1c2)+_0x31d033)};return{'ok':!![],'data':{'effective':_0x5741ce,'configFiles':{'project':_0x5df66c??null,'global':_0x31d033}}};}},getDef={'service':a23_0x538553(0x193),'command':'get','description':a23_0x538553(0x1d4),'risk':a23_0x538553(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x37064b){const _0x1b74a0=a23_0x538553,_0xe1a075=_0x37064b['args'][0x0];if(!_0xe1a075)throw CliErrors[_0x1b74a0(0x1ce)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x1b74a0(0x195));const {buildConfigFromFlags:_0x225d90}=await import(_0x1b74a0(0x1af)),{raw:_0x27ae95}=_0x225d90({});if(_0xe1a075[_0x1b74a0(0x1da)]('.')){const _0x6dec8f=_0xe1a075[_0x1b74a0(0x194)]('.');let _0x2a24af=_0x27ae95;for(const _0x4aa6a7 of _0x6dec8f){if(_0x2a24af==null||typeof _0x2a24af!=='object')throw CliErrors[_0x1b74a0(0x1ce)](_0x1b74a0(0x1cd)+_0xe1a075);_0x2a24af=_0x2a24af[_0x4aa6a7];}if(_0x2a24af===undefined)throw CliErrors[_0x1b74a0(0x1ce)](_0x1b74a0(0x1cd)+_0xe1a075);const _0x43044c=redactCliConfigValue(_0xe1a075,_0x2a24af);return console[_0x1b74a0(0x1bf)](typeof _0x43044c===_0x1b74a0(0x1b7)?JSON[_0x1b74a0(0x1c1)](_0x43044c,null,0x2):String(_0x43044c)),{'ok':!![]};}const _0x9355df=_0x27ae95[_0xe1a075];if(_0x9355df===undefined)throw CliErrors[_0x1b74a0(0x1ce)](_0x1b74a0(0x1cd)+_0xe1a075);const _0x13b325=redactCliConfigValue(_0xe1a075,_0x9355df);return console[_0x1b74a0(0x1bf)](typeof _0x13b325===_0x1b74a0(0x1b7)?JSON[_0x1b74a0(0x1c1)](_0x13b325,null,0x2):String(_0x13b325)),{'ok':!![]};}},setDef={'service':a23_0x538553(0x193),'command':a23_0x538553(0x1cc),'description':a23_0x538553(0x1d5),'risk':a23_0x538553(0x1a7),'confirmationDescription':a23_0x538553(0x1b4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x538553(0x1a9),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x538553(0x1d3),'description':a23_0x538553(0x1d6),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0xad164f){const _0xb39cd8=a23_0x538553,_0x3f4389=_0xad164f[_0xb39cd8(0x1ba)][0x0],_0x364417=_0xad164f[_0xb39cd8(0x1ba)][0x1];if(!_0x3f4389||_0x364417===undefined)throw CliErrors[_0xb39cd8(0x1ce)](_0xb39cd8(0x1d1),_0xb39cd8(0x1c5)+CLI_BIN_NAME+_0xb39cd8(0x1be));if(ENUM_KEYS[_0x3f4389]&&!ENUM_KEYS[_0x3f4389][_0xb39cd8(0x1da)](_0x364417))throw CliErrors[_0xb39cd8(0x1ce)](_0xb39cd8(0x1cf)+_0x3f4389+_0xb39cd8(0x1b0)+ENUM_KEYS[_0x3f4389][_0xb39cd8(0x1b1)](',\x20'));if(isCliProtectedConfigKey(_0x3f4389))throw CliErrors['validation']('\x22'+_0x3f4389+_0xb39cd8(0x1a1));if(_0x3f4389===_0xb39cd8(0x1ab)){const _0x5e8452=Number(_0x364417);if(isNaN(_0x5e8452)||_0x5e8452<=0x0)throw CliErrors['validation']('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x12553c=resolveWriteScope({'explicitGlobal':_0xad164f[_0xb39cd8(0x1a4)](_0xb39cd8(0x1d2)),'policy':'project-or-global-explicit'}),_0x1649e5=toScopeFlags(_0x12553c),_0x59246b=readScopedConfig(_0x1649e5),_0x248e5e=parseAliasAppcodeSetKey(_0x3f4389);if(!_0x248e5e&&!isTopLevelConfigKey(_0x3f4389))throw CliErrors[_0xb39cd8(0x1ce)](_0xb39cd8(0x19c)+_0x3f4389+'\x22\x20is\x20not\x20settable.',_0xb39cd8(0x1aa)+getTopLevelConfigKeySummary()+_0xb39cd8(0x1c6));if(_0x248e5e)setLocalAppAlias(_0x59246b,_0x248e5e,_0x364417);else{if(_0x3f4389===_0xb39cd8(0x1c8)){const _0x20886a=normalizeLocale(_0x364417);if(!_0x20886a)throw CliErrors[_0xb39cd8(0x1ce)](_0xb39cd8(0x19e),_0xb39cd8(0x1a3));_0x59246b['locale']=_0x20886a;}else _0x59246b[_0x3f4389]=_0x3f4389===_0xb39cd8(0x1ab)?Number(_0x364417):DOMAIN_CONFIG_FIELDS[_0xb39cd8(0x1da)](_0x3f4389)?normalizeDomainOrigin(_0x3f4389,_0x364417):_0x364417;}const _0x1f8ba3=_0x3f4389===_0xb39cd8(0x1d8)?maskCliAccessKey(_0x364417):!_0x248e5e&&_0x3f4389===_0xb39cd8(0x1c8)?String(_0x59246b[_0xb39cd8(0x1c8)]):_0x364417;return console[_0xb39cd8(0x1bf)](_0xb39cd8(0x1cb)+_0x3f4389+_0xb39cd8(0x197)+_0x1f8ba3+'\x22'+(_0x12553c===_0xb39cd8(0x1d2)?_0xb39cd8(0x1ad):'')),writeScopedConfig(_0x59246b,_0x1649e5),{'ok':!![]};}},deleteDef={'service':'config','command':'delete','description':a23_0x538553(0x1a6),'risk':a23_0x538553(0x1a7),'confirmationDescription':'Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x5c95d5){const _0xb0c7c9=a23_0x538553,_0x7ea2ca=_0x5c95d5['args'][0x0];if(!_0x7ea2ca)throw CliErrors[_0xb0c7c9(0x1ce)](_0xb0c7c9(0x1c9),_0xb0c7c9(0x1c5)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x7ea2ca))throw CliErrors[_0xb0c7c9(0x1ce)]('\x22'+_0x7ea2ca+_0xb0c7c9(0x1a1));const _0x3cdd21=resolveWriteScope({'explicitGlobal':_0x5c95d5[_0xb0c7c9(0x1a4)](_0xb0c7c9(0x1d2)),'policy':'project-or-global-explicit'}),_0x36c1d9=toScopeFlags(_0x3cdd21),_0x261e16=readScopedConfig(_0x36c1d9),_0x43c278=parseAliasDeleteKey(_0x7ea2ca);if(_0x43c278){if(!deleteLocalAppAlias(_0x261e16,_0x43c278))return console[_0xb0c7c9(0x1bf)](_0xb0c7c9(0x1b9)+_0x7ea2ca+(_0x3cdd21===_0xb0c7c9(0x1d2)?_0xb0c7c9(0x1ad):'')),{'ok':!![],'data':{'key':_0x7ea2ca,'scope':_0x3cdd21,'changed':![]}};return console[_0xb0c7c9(0x1bf)](_0xb0c7c9(0x1ac)+_0x7ea2ca+'`'+(_0x3cdd21==='global'?_0xb0c7c9(0x1ad):'')),writeScopedConfig(_0x261e16,_0x36c1d9),{'ok':!![],'data':{'key':_0x7ea2ca,'scope':_0x3cdd21,'changed':!![]}};}if(_0x261e16[_0x7ea2ca]===undefined)return console[_0xb0c7c9(0x1bf)](_0xb0c7c9(0x1b9)+_0x7ea2ca+(_0x3cdd21===_0xb0c7c9(0x1d2)?_0xb0c7c9(0x1ad):'')),{'ok':!![],'data':{'key':_0x7ea2ca,'scope':_0x3cdd21,'changed':![]}};return delete _0x261e16[_0x7ea2ca],console[_0xb0c7c9(0x1bf)](_0xb0c7c9(0x1ac)+_0x7ea2ca+'`'+(_0x3cdd21==='global'?_0xb0c7c9(0x1ad):'')),writeScopedConfig(_0x261e16,_0x36c1d9),{'ok':!![],'data':{'key':_0x7ea2ca,'scope':_0x3cdd21,'changed':!![]}};}};function a23_0x591f(){const _0x532312=['318624WLTfMj','\x20config\x20set\x20<key>\x20<value>\x20[--global]','log','appcode','stringify','\x20\x20global:\x20\x20','3NunAbr','List\x20current\x20config','Usage:\x20',';\x20apps.<alias>.appcode','1242768MxEoPb','locale','Missing\x20key\x20argument.','list','Set\x20`','set','Key\x20not\x20found:\x20','validation','Invalid\x20value\x20for\x20\x22','1932940DyrmKI','Missing\x20key\x20or\x20value.','global','value','Get\x20a\x20config\x20value','Set\x20a\x20configuration\x20value','Value\x20to\x20assign','pretty','accessKey','alias','includes','config','split','\x20config\x20get\x20<key>','length','`\x20=\x20\x22','apps','\x20\x20project:\x20','(none)','Config\x20files:\x0a','Top-level\x20key\x20\x22','raw','Invalid\x20locale\x20value.','3315420rlQbJN','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','3lTZlMM','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','bool','field','Delete\x20a\x20configuration\x20value','write','read','key','Settable\x20keys:\x20','pageSize','Deleted\x20`','\x20(global)','format','../../context.js','\x22.\x20Allowed:\x20','join','7UJwqEa','isArray','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','103840MGUakl','keys','object','3907544osklDb','Key\x20already\x20absent:\x20','args','trim','4595130tGcopv'];a23_0x591f=function(){return _0x532312;};return a23_0x591f();}export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a24_0x30bc5e=a24_0x3cbf;(function(_0x5505df,_0x14181f){const _0x3c7364=a24_0x3cbf,_0x4ef14d=_0x5505df();while(!![]){try{const _0x74997b=-parseInt(_0x3c7364(0x1ec))/0x1+parseInt(_0x3c7364(0x1e9))/0x2*(-parseInt(_0x3c7364(0x1e8))/0x3)+-parseInt(_0x3c7364(0x1e2))/0x4+-parseInt(_0x3c7364(0x1f6))/0x5*(-parseInt(_0x3c7364(0x1e0))/0x6)+parseInt(_0x3c7364(0x200))/0x7+-parseInt(_0x3c7364(0x1f1))/0x8*(parseInt(_0x3c7364(0x1fc))/0x9)+parseInt(_0x3c7364(0x1eb))/0xa;if(_0x74997b===_0x14181f)break;else _0x4ef14d['push'](_0x4ef14d['shift']());}catch(_0x15c712){_0x4ef14d['push'](_0x4ef14d['shift']());}}}(a24_0x38c4,0x1c270));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';function a24_0x3cbf(_0x5eba65,_0x524efc){_0x5eba65=_0x5eba65-0x1da;const _0x38c42f=a24_0x38c4();let _0x3cbf73=_0x38c42f[_0x5eba65];return _0x3cbf73;}import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':'domain-config','type':'string','description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a24_0x30bc5e(0x1e5),'type':a24_0x30bc5e(0x1f4),'description':a24_0x30bc5e(0x1f0)},{'name':a24_0x30bc5e(0x1f9),'type':'string','description':a24_0x30bc5e(0x1fb)},{'name':'runtime-domain','type':a24_0x30bc5e(0x1f4),'description':a24_0x30bc5e(0x1f5)},{'name':'skill-domain','type':a24_0x30bc5e(0x1f4),'description':a24_0x30bc5e(0x1ed)},{'name':a24_0x30bc5e(0x1dc),'type':a24_0x30bc5e(0x1f4),'description':'Custom\x20KB\x20Service\x20HTTPS\x20origin'}];export const configInitFlags=[{'name':a24_0x30bc5e(0x1de),'type':'string','description':'Official\x20Lovrabet\x20region:\x20'+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x26192b){const _0x22612a=a24_0x30bc5e,_0x5a0eba=_0x26192b['str']('region');if(_0x5a0eba){if(!isEnabledLovrabetRegion(_0x5a0eba))throw CliErrors['validation'](_0x22612a(0x1fe)+_0x5a0eba+'\x22\x20is\x20not\x20currently\x20available.','Available\x20regions:\x20'+ENABLED_LOVRABET_REGION_VALUES[_0x22612a(0x1e7)](',\x20'));return _0x5a0eba;}if(_0x26192b['nonInteractive'])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x22612a(0x1e6)](_0x4efcaa=>({'name':OFFICIAL_ROUTING_PROFILES[_0x4efcaa]['label']+'\x20('+_0x4efcaa+')','value':_0x4efcaa}))});}catch(_0x5d8d07){if(_0x5d8d07?.[_0x22612a(0x1ea)]===_0x22612a(0x1e1))throw CliErrors[_0x22612a(0x1fa)]();throw _0x5d8d07;}}export async function executeConfigInit(_0x1bb20a){const _0x178d3c=a24_0x30bc5e,_0x54bdd7=resolveDomainConfigInput(_0x1bb20a),_0x57a431=_0x54bdd7[_0x178d3c(0x1ef)],_0x54c1d0=Object[_0x178d3c(0x1ff)](_0x57a431)[_0x178d3c(0x1fd)]>0x0;if(_0x54c1d0&&_0x1bb20a[_0x178d3c(0x1ee)](_0x178d3c(0x1de)))throw CliErrors['validation'](_0x178d3c(0x1e3));const _0x2b696c={'global':!![]},_0x3e5280=readScopedConfig(_0x2b696c);for(const _0xc17262 of DOMAIN_CONFIG_FIELDS)delete _0x3e5280[_0xc17262];for(const _0x56509e of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x3e5280[_0x56509e];delete _0x3e5280[_0x178d3c(0x1e4)];let _0x5bae88=null;if(_0x54c1d0)delete _0x3e5280['region'],_0x54bdd7[_0x178d3c(0x1dd)]===_0x178d3c(0x1df)?_0x3e5280[_0x178d3c(0x1e4)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x54bdd7['manifestDomains']}:Object[_0x178d3c(0x1f2)](_0x3e5280,_0x57a431);else{_0x5bae88=await resolveRegion(_0x1bb20a);if(_0x5bae88===DEFAULT_LOVRABET_REGION)delete _0x3e5280['region'];else _0x3e5280[_0x178d3c(0x1de)]=_0x5bae88;}return writeScopedConfig(_0x3e5280,_0x2b696c),{'ok':!![],'message':_0x54c1d0?'Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20'+Object['keys'](_0x54bdd7['mode']==='enterprise-v1'?_0x54bdd7[_0x178d3c(0x1f3)]:_0x57a431)['join'](',\x20')+'.':_0x178d3c(0x1db)+_0x5bae88+'.','data':{'mode':_0x54c1d0?'independent':'official','protocol':_0x54bdd7[_0x178d3c(0x1dd)]===_0x178d3c(0x1df)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5bae88,'domains':_0x57a431}};}function a24_0x38c4(){const _0x1dc89f=['keys','1141161tdFVLC','init','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','kb-service-domain','mode','region','enterprise-v1','260898EUATgn','ExitPromptError','172516ayoFbF','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','routing','user-domain','map','join','3jARyda','293386haMskD','name','1689720NBvZIL','66651PfGTuO','Custom\x20SkillHub\x20HTTPS\x20origin','str','domains','Custom\x20User\x20HTTPS\x20origin','16QAFDKJ','assign','manifestDomains','string','Custom\x20Runtime\x20HTTPS\x20origin','10modZYZ','config','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','api-domain','cancelled','Custom\x20platform\x20API\x20HTTPS\x20origin','212292gVyNlo','length','Region\x20\x22'];a24_0x38c4=function(){return _0x1dc89f;};return a24_0x38c4();}export const configInitDefinition={'service':a24_0x30bc5e(0x1f7),'command':a24_0x30bc5e(0x1da),'description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':'write','confirmationDescription':a24_0x30bc5e(0x1f8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a25_0x5265(_0x5398dd,_0x4b9245){_0x5398dd=_0x5398dd-0xaf;var _0x4a45d7=a25_0x4a45();var _0x5265a7=_0x4a45d7[_0x5398dd];return _0x5265a7;}(function(_0x2c3dad,_0x2991a4){var _0x4b4ffa=a25_0x5265,_0x29f981=_0x2c3dad();while(!![]){try{var _0x43660e=-parseInt(_0x4b4ffa(0xb3))/0x1*(-parseInt(_0x4b4ffa(0xb0))/0x2)+parseInt(_0x4b4ffa(0xb5))/0x3+parseInt(_0x4b4ffa(0xb4))/0x4+-parseInt(_0x4b4ffa(0xb6))/0x5+-parseInt(_0x4b4ffa(0xb2))/0x6+parseInt(_0x4b4ffa(0xb7))/0x7*(parseInt(_0x4b4ffa(0xaf))/0x8)+-parseInt(_0x4b4ffa(0xb1))/0x9;if(_0x43660e===_0x2991a4)break;else _0x29f981['push'](_0x29f981['shift']());}catch(_0x4d7074){_0x29f981['push'](_0x29f981['shift']());}}}(a25_0x4a45,0xc10e6));import{CLI_BIN_NAME}from'../../constant/cli.js';function a25_0x4a45(){var _0x545e01=['5697774NbcNFb','5919126KjBwwS','104610NQeKmT','3258544ZPbdxx','2768502qHWuFf','6578820QUImDA','7oubGrO','6703592dJCgXQ','22ldrLmT'];a25_0x4a45=function(){return _0x545e01;};return a25_0x4a45();}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a26_0x40a05e=a26_0x5397;(function(_0x214c75,_0x2a8dfa){const _0x559f2d=a26_0x5397,_0xbd6c04=_0x214c75();while(!![]){try{const _0x4d897b=parseInt(_0x559f2d(0x163))/0x1*(parseInt(_0x559f2d(0x182))/0x2)+-parseInt(_0x559f2d(0x197))/0x3*(parseInt(_0x559f2d(0x160))/0x4)+parseInt(_0x559f2d(0x16a))/0x5*(parseInt(_0x559f2d(0x177))/0x6)+parseInt(_0x559f2d(0x167))/0x7+parseInt(_0x559f2d(0x169))/0x8+-parseInt(_0x559f2d(0x173))/0x9+-parseInt(_0x559f2d(0x161))/0xa;if(_0x4d897b===_0x2a8dfa)break;else _0xbd6c04['push'](_0xbd6c04['shift']());}catch(_0x46a9fb){_0xbd6c04['push'](_0xbd6c04['shift']());}}}(a26_0xb6e2,0x54bca));function a26_0x5397(_0x24d8cb,_0xf45175){_0x24d8cb=_0x24d8cb-0x160;const _0xb6e2f9=a26_0xb6e2();let _0x5397b5=_0xb6e2f9[_0x24d8cb];return _0x5397b5;}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}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';function a26_0xb6e2(){const _0xb4bab0=['.\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','batchSize','appCode','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','167610kNpoRf','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','POST','emptyRows','resume','length','size','some','mapping','schemaVersion','header-row','batch-size','report','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','checkpoint','28wLnySZ','4450640XyCrOK','See\x20','3UuZLbV','mappingFile','values','str','2974475TfQWJK','object','1832968PwmRls','130555MlMArZ','toString','rows','rowNumber','errors','--file\x20and\x20--mapping\x20are\x20required.','invalid','\x20records.','1-based\x20Excel\x20header\x20row','1919178vqDNet','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','file','number','138eVOYCd','maxBatchSize','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','warnings','message','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','Excel\x20import\x20failed.','validation','bool','isArray','94586YqabvU','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','DB_TABLE','.import-report.json','num','write','isInteger','string','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','/import-batch','Maximum\x20records\x20per\x20request\x20(1..500)','utf8','schemaFingerprint','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','.import-checkpoint.json','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'];a26_0xb6e2=function(){return _0xb4bab0;};return a26_0xb6e2();}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{previewImportBatchCount}from'../../services/dataset-import/preview.js';function input(_0x33ad34){const _0x3d1d6b=a26_0x5397,_0x177bb9=_0x33ad34[_0x3d1d6b(0x166)](_0x3d1d6b(0x175)),_0x326462=_0x33ad34[_0x3d1d6b(0x166)](_0x3d1d6b(0x19f));if(!_0x177bb9||!_0x326462)throw CliErrors['validation'](_0x3d1d6b(0x16f));const _0xdf3291=_0x33ad34[_0x3d1d6b(0x186)](_0x3d1d6b(0x1a1),0x1),_0x1c6515=_0x33ad34[_0x3d1d6b(0x186)](_0x3d1d6b(0x1a2),0x1f4);if(!Number['isInteger'](_0xdf3291)||_0xdf3291<0x1||!Number[_0x3d1d6b(0x188)](_0x1c6515)||_0x1c6515<0x1||_0x1c6515>0x1f4)throw CliErrors[_0x3d1d6b(0x17f)](_0x3d1d6b(0x190));const _0x5e8142=resolve(_0x33ad34[_0x3d1d6b(0x166)](_0x3d1d6b(0x1a5))||_0x177bb9+_0x3d1d6b(0x191)),_0x5a3f3e=resolve(_0x33ad34[_0x3d1d6b(0x166)](_0x3d1d6b(0x1a3))||_0x177bb9+_0x3d1d6b(0x185)),_0xe409c5=[resolve(_0x177bb9),resolve(_0x326462),_0x5e8142,_0x5a3f3e];if(new Set(_0xe409c5)[_0x3d1d6b(0x19d)]!==_0xe409c5[_0x3d1d6b(0x19c)])throw CliErrors[_0x3d1d6b(0x17f)](_0x3d1d6b(0x17d));return{'file':resolve(_0x177bb9),'mappingFile':resolve(_0x326462),'headerRow':_0xdf3291,'batchSize':_0x1c6515,'checkpoint':_0x5e8142,'report':_0x5a3f3e,'sheet':_0x33ad34['str']('sheet')||undefined,'resume':_0x33ad34[_0x3d1d6b(0x180)](_0x3d1d6b(0x19b))};}async function prepare(_0x31156f){const _0x286c95=a26_0x5397,_0x3cabef=input(_0x31156f),_0x16f9d7=_0x31156f[_0x286c95(0x166)]('code');[_0x3cabef['file'],_0x3cabef[_0x286c95(0x164)],_0x3cabef[_0x286c95(0x1a5)],_0x3cabef[_0x286c95(0x1a3)]]=await Promise['all']([realpath(_0x3cabef[_0x286c95(0x175)]),realpath(_0x3cabef[_0x286c95(0x164)]),resolveImportOutputPath(_0x3cabef[_0x286c95(0x1a5)]),resolveImportOutputPath(_0x3cabef[_0x286c95(0x1a3)])]),assertImportPaths(_0x3cabef[_0x286c95(0x1a5)],_0x3cabef['report'],[_0x3cabef[_0x286c95(0x175)],_0x3cabef[_0x286c95(0x164)]]);let _0x192037;const _0x4b9a79=await readFile(_0x3cabef['mappingFile']);if(_0x4b9a79[_0x286c95(0x19c)]>0x400*0x400)throw CliErrors[_0x286c95(0x17f)]('Mapping\x20file\x20exceeds\x201\x20MB.');try{_0x192037=JSON['parse'](_0x4b9a79[_0x286c95(0x16b)](_0x286c95(0x18d)));}catch{throw CliErrors['validation']('Mapping\x20file\x20must\x20contain\x20valid\x20JSON.');}if(!_0x192037||typeof _0x192037!==_0x286c95(0x168)||Array[_0x286c95(0x181)](_0x192037)||Object[_0x286c95(0x165)](_0x192037)[_0x286c95(0x19e)](_0x56a000=>typeof _0x56a000!=='string'))throw CliErrors[_0x286c95(0x17f)](_0x286c95(0x1a4));const _0x4d7340=await getDatasetDetail(_0x16f9d7),_0x3789bb=assertDatasetImportTarget(_0x4d7340,_0x31156f[_0x286c95(0x195)],_0x16f9d7);if(_0x3789bb===_0x286c95(0x184))throw CliErrors[_0x286c95(0x17f)](_0x286c95(0x183),_0x286c95(0x192)+_0x16f9d7+_0x286c95(0x193)+_0x31156f[_0x286c95(0x195)]+'\x20--code\x20'+_0x16f9d7+'\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(_0x3789bb!=='METADATA')throw CliErrors['validation'](_0x286c95(0x18f),'Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.');const _0xdcce45=await buildExcelManifest({..._0x3cabef,'mapping':_0x192037,'fields':normalizeImportFields(_0x4d7340)}),_0x50542c=await getDatasetImportContract(_0x31156f[_0x286c95(0x195)],_0x16f9d7);assertImportContract(_0x50542c,_0x31156f['appCode'],_0x16f9d7);if(_0x3cabef[_0x286c95(0x194)]>_0x50542c[_0x286c95(0x178)])throw CliErrors[_0x286c95(0x17f)]('Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.');return{'args':_0x3cabef,'manifest':_0xdcce45,'contract':_0x50542c,'code':_0x16f9d7};}async function checked(_0x4d98e1){const _0x2d034d=a26_0x5397;try{return await _0x4d98e1();}catch(_0x328d69){if(_0x328d69 instanceof CliError)throw _0x328d69;throw CliErrors[_0x2d034d(0x17f)](_0x328d69[_0x2d034d(0x17b)]||_0x2d034d(0x17e));}}export const dataImportExcel={'service':'data','command':'import-excel','risk':a26_0x40a05e(0x187),'description':'Import\x20one\x20XLSX\x20worksheet\x20into\x20METADATA\x20with\x20checkpoint\x20recovery.\x20DB_TABLE\x20uses\x20lovrabet\x20data\x20batchCreate\x20after\x20mapping\x20and\x20validation;\x20that\x20route\x20has\x20no\x20import\x20checkpoint\x20or\x20--resume.','confirmationDescription':'Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','flags':[CODE_FLAG,{'name':a26_0x40a05e(0x175),'type':a26_0x40a05e(0x189),'required':!![],'description':'Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)'},{'name':'mapping','type':a26_0x40a05e(0x189),'required':!![],'description':a26_0x40a05e(0x179)},{'name':'sheet','type':'string','description':'Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)'},{'name':'header-row','type':a26_0x40a05e(0x176),'default':0x1,'description':a26_0x40a05e(0x172)},{'name':a26_0x40a05e(0x1a2),'type':'number','default':0x1f4,'description':a26_0x40a05e(0x18c)},{'name':a26_0x40a05e(0x1a5),'type':'string','description':a26_0x40a05e(0x174)},{'name':a26_0x40a05e(0x1a3),'type':a26_0x40a05e(0x189),'description':a26_0x40a05e(0x18a)},{'name':a26_0x40a05e(0x19b),'type':'boolean','description':a26_0x40a05e(0x196)}],'validate':async _0x334165=>{input(_0x334165);},'dryRun':async _0x568ad2=>checked(async()=>{const _0x53d805=a26_0x40a05e,{args:_0x40de9a,manifest:_0x3b876e,contract:_0x1af8ff,code:_0x1a51ba}=await prepare(_0x568ad2),_0x9865fc=new Set(_0x3b876e[_0x53d805(0x16e)]['map'](_0x5a5527=>_0x5a5527[_0x53d805(0x16d)]))['size'];return{'method':_0x53d805(0x199),'url':'/client/'+encodeURIComponent(_0x568ad2['appCode'])+'/'+encodeURIComponent(_0x1a51ba)+_0x53d805(0x18b),'description':_0x53d805(0x198),'body':{'schemaFingerprint':_0x1af8ff[_0x53d805(0x18e)]},'validRows':Math['max'](0x0,_0x3b876e[_0x53d805(0x16c)][_0x53d805(0x19c)]-_0x9865fc),'invalidRows':_0x9865fc,'invalidCells':_0x3b876e[_0x53d805(0x16e)][_0x53d805(0x19c)],'emptyRows':_0x3b876e[_0x53d805(0x19a)][_0x53d805(0x19c)],'expectedBatches':previewImportBatchCount(_0x3b876e,_0x1af8ff,_0x40de9a[_0x53d805(0x194)]),'errors':_0x3b876e[_0x53d805(0x16e)],'warnings':_0x3b876e[_0x53d805(0x17a)],'sheet':_0x3b876e['sheet'],'checkpoint':_0x40de9a[_0x53d805(0x1a5)],'report':_0x40de9a[_0x53d805(0x1a3)]};}),'execute':async _0x42abef=>checked(async()=>{const _0x20d990=a26_0x40a05e,{args:_0x15972c,manifest:_0x35aff9,contract:_0x188478,code:_0x2a5ef7}=await prepare(_0x42abef);if(_0x35aff9['errors'][_0x20d990(0x19c)]){await saveImportJson(_0x15972c[_0x20d990(0x1a3)],{'status':_0x20d990(0x170),'sourceRows':_0x35aff9[_0x20d990(0x16c)][_0x20d990(0x19c)],'errors':_0x35aff9[_0x20d990(0x16e)],'emptyRows':_0x35aff9[_0x20d990(0x19a)],'warnings':_0x35aff9[_0x20d990(0x17a)]});throw CliErrors['validation']('Excel\x20contains\x20'+_0x35aff9['errors'][_0x20d990(0x19c)]+_0x20d990(0x17c),_0x20d990(0x162)+_0x15972c['report']+'.');}const _0x5e34e2=_0x188478[_0x20d990(0x1a0)]===0x2?runAutoIdExcelImport:runExcelImport,_0x592b18=await _0x5e34e2({..._0x15972c,'manifest':_0x35aff9,'contract':_0x188478,'appCode':_0x42abef[_0x20d990(0x195)],'datasetCode':_0x2a5ef7,'runtimeDomain':getRuntimeDomain(),'api':{'write':(_0x47a8a4,_0x219f2e)=>createDatasetImportBatch(_0x42abef[_0x20d990(0x195)],_0x2a5ef7,{'schemaFingerprint':_0x188478[_0x20d990(0x18e)],'items':_0x47a8a4,..._0x219f2e===undefined?{}:{'taskId':_0x219f2e}}),'readback':_0xed8e81=>readDatasetImportRows(_0x42abef[_0x20d990(0x195)],_0x2a5ef7,_0xed8e81),'readTask':_0x3ac350=>readDatasetImportTaskRows(_0x42abef[_0x20d990(0x195)],_0x2a5ef7,_0x3ac350)}});return{'ok':!![],'data':_0x592b18,'message':'Imported\x20and\x20verified\x20'+_0x592b18['succeeded']+_0x20d990(0x171)};})};
|
|
1
|
+
const a26_0x37f433=a26_0x4ae0;(function(_0x4b2383,_0x1f5894){const _0x2d9378=a26_0x4ae0,_0x2d2312=_0x4b2383();while(!![]){try{const _0x1b43ea=parseInt(_0x2d9378(0x1ee))/0x1+-parseInt(_0x2d9378(0x1f6))/0x2+parseInt(_0x2d9378(0x1ec))/0x3*(parseInt(_0x2d9378(0x1f2))/0x4)+parseInt(_0x2d9378(0x1e4))/0x5+parseInt(_0x2d9378(0x1f8))/0x6*(parseInt(_0x2d9378(0x1e7))/0x7)+parseInt(_0x2d9378(0x1e3))/0x8*(parseInt(_0x2d9378(0x1c7))/0x9)+-parseInt(_0x2d9378(0x1e6))/0xa;if(_0x1b43ea===_0x1f5894)break;else _0x2d2312['push'](_0x2d2312['shift']());}catch(_0x18c6d1){_0x2d2312['push'](_0x2d2312['shift']());}}}(a26_0x5a0a,0x63aa2));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';function a26_0x5a0a(){const _0x31b400=['number','report','Excel\x20import\x20failed.','.lock','all','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','batch-size','warnings','header-row','media','appCode','\x20--code\x20','\x20records.','file','errors','/client/','1-based\x20Excel\x20header\x20row','str','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','/import-batch','values','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','sheet','9OwCzRe','reduce','schemaVersion','isInteger','.lock.recovery','invalid','size','max','string','Mapping\x20file\x20exceeds\x201\x20MB.','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','emptyRows','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','POST','.import-report.json','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.','toString','schemaFingerprint','resume','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','METADATA','parse','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','maxBatchSize','mapping','See\x20','imageCells','3275312aXCcZx','2897220PpYRoL','map','18372970RTNgns','28dUFXaO','batchSize','Imported\x20and\x20verified\x20','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','imageFields','3WOGTGO','bool','606721XUontr','checkpoint','data','num','2807916aBvKBe','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','utf8','.rows.json','882894YWgtjj','rows','584118ssougL','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','length','mappingFile','DB_TABLE','validation','isArray','slice'];a26_0x5a0a=function(){return _0x31b400;};return a26_0x5a0a();}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_0x4ae0(_0x2e9d18,_0x36c120){_0x2e9d18=_0x2e9d18-0x1c2;const _0x5a0a97=a26_0x5a0a();let _0x4ae0de=_0x5a0a97[_0x2e9d18];return _0x4ae0de;}function input(_0x57a592){const _0x429734=a26_0x4ae0,_0x4c9195=_0x57a592[_0x429734(0x211)](_0x429734(0x20d)),_0x2a23a8=_0x57a592['str'](_0x429734(0x1e0));if(!_0x4c9195||!_0x2a23a8)throw CliErrors['validation']('--file\x20and\x20--mapping\x20are\x20required.');const _0x46e051=_0x57a592['num'](_0x429734(0x208),0x1),_0x13f0b7=_0x57a592[_0x429734(0x1f1)](_0x429734(0x206),0x1f4);if(!Number['isInteger'](_0x46e051)||_0x46e051<0x1||!Number[_0x429734(0x1ca)](_0x13f0b7)||_0x13f0b7<0x1||_0x13f0b7>0x1f4)throw CliErrors['validation']('Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.');const _0x37dec1=resolve(_0x57a592['str']('checkpoint')||_0x4c9195+'.import-checkpoint.json'),_0x392403=resolve(_0x57a592['str'](_0x429734(0x201))||_0x4c9195+_0x429734(0x1d5)),_0x123962=[resolve(_0x4c9195),resolve(_0x2a23a8),_0x37dec1,_0x392403];if(new Set(_0x123962)[_0x429734(0x1cd)]!==_0x123962[_0x429734(0x1fa)])throw CliErrors['validation']('Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.');return{'file':resolve(_0x4c9195),'mappingFile':resolve(_0x2a23a8),'headerRow':_0x46e051,'batchSize':_0x13f0b7,'checkpoint':_0x37dec1,'report':_0x392403,'sheet':_0x57a592[_0x429734(0x211)](_0x429734(0x1c6))||undefined,'resume':_0x57a592[_0x429734(0x1ed)](_0x429734(0x1d9))};}async function prepare(_0x4cfc9e){const _0x5205dd=a26_0x4ae0,_0x558cbb=input(_0x4cfc9e),_0x2e493a=_0x4cfc9e[_0x5205dd(0x211)]('code');[_0x558cbb[_0x5205dd(0x20d)],_0x558cbb['mappingFile'],_0x558cbb[_0x5205dd(0x1ef)],_0x558cbb['report']]=await Promise[_0x5205dd(0x204)]([realpath(_0x558cbb[_0x5205dd(0x20d)]),realpath(_0x558cbb[_0x5205dd(0x1fb)]),resolveImportOutputPath(_0x558cbb['checkpoint']),resolveImportOutputPath(_0x558cbb[_0x5205dd(0x201)])]),assertImportPaths(_0x558cbb[_0x5205dd(0x1ef)],_0x558cbb[_0x5205dd(0x201)],[_0x558cbb[_0x5205dd(0x20d)],_0x558cbb['mappingFile']]);let _0x30ea0b;const _0x55c63c=await readFile(_0x558cbb[_0x5205dd(0x1fb)]);if(_0x55c63c[_0x5205dd(0x1fa)]>0x400*0x400)throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1d0));try{_0x30ea0b=JSON[_0x5205dd(0x1dc)](_0x55c63c[_0x5205dd(0x1d7)](_0x5205dd(0x1f4)));}catch{throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1da));}if(!_0x30ea0b||typeof _0x30ea0b!=='object'||Array[_0x5205dd(0x1fe)](_0x30ea0b)||Object[_0x5205dd(0x1c4)](_0x30ea0b)['some'](_0x25dfa3=>typeof _0x25dfa3!==_0x5205dd(0x1cf)))throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1f3));const _0x35a5ae=await getDatasetDetail(_0x2e493a),_0x4468e0=assertDatasetImportTarget(_0x35a5ae,_0x4cfc9e[_0x5205dd(0x20a)],_0x2e493a);if(_0x4468e0===_0x5205dd(0x1fc))throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x205),'Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x2e493a+'.\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'+_0x4cfc9e[_0x5205dd(0x20a)]+_0x5205dd(0x20b)+_0x2e493a+'\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(_0x4468e0!==_0x5205dd(0x1db))throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1d1),'Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.');const _0x5b89ba=await buildExcelManifest({..._0x558cbb,'mapping':_0x30ea0b,'fields':normalizeImportFields(_0x35a5ae)}),_0x5cffde=await getDatasetImportContract(_0x4cfc9e[_0x5205dd(0x20a)],_0x2e493a);assertImportContract(_0x5cffde,_0x4cfc9e[_0x5205dd(0x20a)],_0x2e493a),assertImageImportCapability(_0x5cffde,_0x5b89ba);if(_0x5b89ba[_0x5205dd(0x1eb)]?.[_0x5205dd(0x1fa)]){const _0x4c6d88=await resolveImportOutputPath(_0x558cbb['checkpoint']+_0x5205dd(0x1f5)),_0x1c6ef8=await Promise[_0x5205dd(0x204)]([_0x4c6d88,_0x4c6d88+_0x5205dd(0x203),_0x4c6d88+_0x5205dd(0x1cb),_0x558cbb['checkpoint']+_0x5205dd(0x203),_0x558cbb[_0x5205dd(0x1ef)]+_0x5205dd(0x1cb)][_0x5205dd(0x1e5)](resolveImportOutputPath));assertImportPaths(_0x558cbb['checkpoint'],_0x558cbb['report'],[_0x558cbb[_0x5205dd(0x20d)],_0x558cbb['mappingFile'],..._0x1c6ef8[_0x5205dd(0x1ff)](0x0,0x3)]);}if(_0x558cbb[_0x5205dd(0x1e8)]>_0x5cffde[_0x5205dd(0x1df)])throw CliErrors[_0x5205dd(0x1fd)](_0x5205dd(0x1dd));return{'args':_0x558cbb,'manifest':_0x5b89ba,'contract':_0x5cffde,'code':_0x2e493a};}async function checked(_0x5cd6b8){const _0xd011b5=a26_0x4ae0;try{return await _0x5cd6b8();}catch(_0x4f1036){if(_0x4f1036 instanceof CliError)throw _0x4f1036;throw CliErrors[_0xd011b5(0x1fd)](_0x4f1036['message']||_0xd011b5(0x202));}}export const dataImportExcel={'service':a26_0x37f433(0x1f0),'command':'import-excel','risk':'write','description':a26_0x37f433(0x1d6),'confirmationDescription':a26_0x37f433(0x1ea),'flags':[CODE_FLAG,{'name':a26_0x37f433(0x20d),'type':a26_0x37f433(0x1cf),'required':!![],'description':a26_0x37f433(0x1c5)},{'name':a26_0x37f433(0x1e0),'type':'string','required':!![],'description':'JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes'},{'name':a26_0x37f433(0x1c6),'type':a26_0x37f433(0x1cf),'description':a26_0x37f433(0x1de)},{'name':a26_0x37f433(0x208),'type':a26_0x37f433(0x200),'default':0x1,'description':a26_0x37f433(0x210)},{'name':a26_0x37f433(0x206),'type':a26_0x37f433(0x200),'default':0x1f4,'description':'Maximum\x20records\x20per\x20request\x20(1..500)'},{'name':'checkpoint','type':a26_0x37f433(0x1cf),'description':'Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)'},{'name':a26_0x37f433(0x201),'type':a26_0x37f433(0x1cf),'description':a26_0x37f433(0x1d3)},{'name':a26_0x37f433(0x1d9),'type':'boolean','description':'Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping'}],'validate':async _0x3d6ab4=>{input(_0x3d6ab4);},'dryRun':async _0x14f55d=>checked(async()=>{const _0x2e51d7=a26_0x37f433,{args:_0x146fc8,manifest:_0x33a9e5,contract:_0x9f65f4,code:_0x376480}=await prepare(_0x14f55d),_0x8f9edc=new Set(_0x33a9e5[_0x2e51d7(0x20e)][_0x2e51d7(0x1e5)](_0x3251be=>_0x3251be['rowNumber']))[_0x2e51d7(0x1cd)];return{'method':_0x2e51d7(0x1d4),'url':_0x2e51d7(0x20f)+encodeURIComponent(_0x14f55d[_0x2e51d7(0x20a)])+'/'+encodeURIComponent(_0x376480)+_0x2e51d7(0x1c3),'description':_0x2e51d7(0x1c2),'body':{'schemaFingerprint':_0x9f65f4[_0x2e51d7(0x1d8)]},'validRows':Math[_0x2e51d7(0x1ce)](0x0,_0x33a9e5['rows'][_0x2e51d7(0x1fa)]-_0x8f9edc),'invalidRows':_0x8f9edc,'invalidCells':_0x33a9e5[_0x2e51d7(0x20e)][_0x2e51d7(0x1fa)],'emptyRows':_0x33a9e5[_0x2e51d7(0x1d2)]['length'],'expectedBatches':previewImportBatchCount(_0x33a9e5,_0x9f65f4,_0x146fc8['batchSize']),'imageCount':_0x33a9e5[_0x2e51d7(0x1e2)]?.[_0x2e51d7(0x1c8)]((_0x2e97ec,_0x382ad3)=>_0x2e97ec+_0x382ad3['hashes'][_0x2e51d7(0x1fa)],0x0)??0x0,'uniqueImages':_0x33a9e5[_0x2e51d7(0x209)]?.[_0x2e51d7(0x1fa)]??0x0,'uniqueImageBytes':_0x33a9e5[_0x2e51d7(0x209)]?.[_0x2e51d7(0x1c8)]((_0x217cb9,_0xb1d775)=>_0x217cb9+_0xb1d775['size'],0x0)??0x0,'errors':_0x33a9e5[_0x2e51d7(0x20e)],'warnings':_0x33a9e5[_0x2e51d7(0x207)],'sheet':_0x33a9e5[_0x2e51d7(0x1c6)],'checkpoint':_0x146fc8['checkpoint'],'report':_0x146fc8[_0x2e51d7(0x201)]};}),'execute':async _0x1f285e=>checked(async()=>{const _0x6d940c=a26_0x37f433,{args:_0x3e93b4,manifest:_0x3417aa,contract:_0x171f2a,code:_0x2ce1de}=await prepare(_0x1f285e);if(_0x3417aa['errors'][_0x6d940c(0x1fa)]){await saveImportJson(_0x3e93b4[_0x6d940c(0x201)],{'status':_0x6d940c(0x1cc),'sourceRows':_0x3417aa[_0x6d940c(0x1f7)][_0x6d940c(0x1fa)],'errors':_0x3417aa[_0x6d940c(0x20e)],'emptyRows':_0x3417aa['emptyRows'],'warnings':_0x3417aa[_0x6d940c(0x207)]});throw CliErrors[_0x6d940c(0x1fd)]('Excel\x20contains\x20'+_0x3417aa['errors'][_0x6d940c(0x1fa)]+_0x6d940c(0x1f9),_0x6d940c(0x1e1)+_0x3e93b4[_0x6d940c(0x201)]+'.');}const _0x1f7fae=_0x3417aa['imageFields']?.[_0x6d940c(0x1fa)]?runImageExcelImport:_0x171f2a[_0x6d940c(0x1c9)]===0x2?runAutoIdExcelImport:runExcelImport,_0xeefe5d=await _0x1f7fae({..._0x3e93b4,'manifest':_0x3417aa,'contract':_0x171f2a,'appCode':_0x1f285e[_0x6d940c(0x20a)],'datasetCode':_0x2ce1de,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x3e93b4[_0x6d940c(0x20d)],_0x3e93b4[_0x6d940c(0x1fb)]],'imageApi':{'upload':(_0x40836c,_0x30d358)=>uploadDatasetImportImage(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,_0x40836c,_0x30d358),'readback':(_0x2a2c55,_0x1b5882)=>readDatasetImportImage(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,_0x2a2c55,_0x1b5882)},'api':{'write':(_0x395cf3,_0x598a94)=>createDatasetImportBatch(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,{'schemaFingerprint':_0x171f2a[_0x6d940c(0x1d8)],'items':_0x395cf3,..._0x598a94===undefined?{}:{'taskId':_0x598a94}}),'readback':_0x45be1f=>readDatasetImportRows(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,_0x45be1f),'readTask':_0x85e027=>readDatasetImportTaskRows(_0x1f285e[_0x6d940c(0x20a)],_0x2ce1de,_0x85e027)}});return{'ok':!![],'data':_0xeefe5d,'message':_0x6d940c(0x1e9)+_0xeefe5d['succeeded']+_0x6d940c(0x20c)};})};
|