@lovrabet/lovrabet-cli 2.3.5 → 2.3.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.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.d.ts +3 -3
- 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 +11 -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 +7 -3
- package/skills/lovrabet/guides/app-resolution.md +2 -0
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +10 -1
- package/skills/lovrabet/references/dataset-discovery-workflow.md +14 -1
- package/skills/lovrabet/references/instant-api-workflow.md +2 -0
- package/skills/lovrabet/references/lovrabet-app.md +2 -0
- 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_0x329819=a13_0x492c;(function(_0xe0d530,_0x16088e){const _0x5e1b77=a13_0x492c,_0x58ae2c=_0xe0d530();while(!![]){try{const _0x5c4f0e=-parseInt(_0x5e1b77(0x170))/0x1*(parseInt(_0x5e1b77(0x167))/0x2)+-parseInt(_0x5e1b77(0x148))/0x3+-parseInt(_0x5e1b77(0x14a))/0x4*(-parseInt(_0x5e1b77(0x136))/0x5)+-parseInt(_0x5e1b77(0x146))/0x6+-parseInt(_0x5e1b77(0x179))/0x7+parseInt(_0x5e1b77(0x14c))/0x8*(-parseInt(_0x5e1b77(0x13f))/0x9)+parseInt(_0x5e1b77(0x15c))/0xa*(parseInt(_0x5e1b77(0x142))/0xb);if(_0x5c4f0e===_0x16088e)break;else _0x58ae2c['push'](_0x58ae2c['shift']());}catch(_0x31410a){_0x58ae2c['push'](_0x58ae2c['shift']());}}}(a13_0x14f2,0xab181));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a13_0x14f2(){const _0x3b2157=['\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','daily','read','5248593rFjgcG','production','env','nonInteractive','accessKeyCreatePath','accessKey','AccessKey:\x20','write','AccessKey\x20(ak_xxx...)','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Then\x20verify\x20with:\x20','access-key','yes','string','\x20env\x20var','access_key','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','stdin','authRequired','bool','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','\x20Current\x20env:\x20','userCenterDisplayName','project','expired','110DoDXrm','Missing\x20accessKey.','trim','Auth\x20mode:\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','cancelled','global','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','auth','28953OZvKat','Option\x20A:\x20','str','19743658gaPrFd','scope','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','673650ZeDZpJ','stdout','3432369vpQmdT','AccessKey\x20saved\x20to\x20','16292CZDrFe','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','2024IgOMLf','join','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','global\x20config','boolean','\x20\x20export\x20','Invalid\x20accessKey\x20format.','\x20auth\x20status','=ak_xxx','Clear\x20the\x20AccessKey\x20from\x20config','code','login','envName','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','push','\x20config.\x20Nothing\x20to\x20clear.','20lIGHey','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Status:\x20valid','test','Show\x20current\x20authentication\x20status','isTTY','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20Verify:\x20','ClientAk','validation','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','11738MbyoaF','\x20config','development','\x20config.','check','No\x20AccessKey\x20found\x20in\x20','Tip:\x20you\x20can\x20also\x20run:','Clear\x20from\x20global\x20config\x20(default)','AccessKey\x20cleared\x20from\x20','27eupzVg','Write\x20to\x20global\x20config\x20(default)','\x20(via\x20','status','project\x20config','success'];a13_0x14f2=function(){return _0x3b2157;};return a13_0x14f2();}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';function a13_0x492c(_0x2b87d6,_0x247abb){_0x2b87d6=_0x2b87d6-0x133;const _0x14f23e=a13_0x14f2();let _0x492cc4=_0x14f23e[_0x2b87d6];return _0x492cc4;}import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';import{maskCliAccessKey}from'../../utils/access-key-redaction.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(_0x3a32e3=USER_ACCESS_KEY_CREATE_URL){const _0xf8a1ce=a13_0x492c;writeCliSideChannelLine(_0xf8a1ce(0x144)+PRODUCT_CONFIG[_0xf8a1ce(0x133)]+':'),writeCliSideChannelLine('\x0a'+_0x3a32e3+'\x0a'),writeCliSideChannelLine(_0xf8a1ce(0x16d)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0xf8a1ce(0x145));}function buildAccessKeySetupGuide(_0x3bf366=USER_ACCESS_KEY_CREATE_URL){const _0xfd9017=a13_0x492c;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0xfd9017(0x133)]+':',_0x3bf366,_0xfd9017(0x166)+CLI_BIN_NAME+_0xfd9017(0x14b)]['join']('\x0a');}function canPromptForAccessKey(_0x259639){const _0x4c4152=a13_0x492c;return!_0x259639[_0x4c4152(0x17c)]&&process[_0x4c4152(0x18a)][_0x4c4152(0x161)]!==![]&&process[_0x4c4152(0x147)][_0x4c4152(0x161)]!==![];}function resolveAuthScopeFlags(_0x1f7c55){const _0xe42a6e=a13_0x492c;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1f7c55[_0xe42a6e(0x18c)](_0xe42a6e(0x13c)),'explicitProject':_0x1f7c55['bool'](_0xe42a6e(0x134)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x236e7d){const _0x110992=a13_0x492c;let _0x3f5e24=(_0x236e7d[_0x110992(0x141)](_0x110992(0x184))||_0x236e7d[_0x110992(0x141)]('ak')||'')[_0x110992(0x138)]();const _0x3d980a=(_0x236e7d['str'](_0x110992(0x17b))||'')[_0x110992(0x138)](),_0x52b1df=''+getUserDomain()+PRODUCT_CONFIG[_0x110992(0x17d)];if(!_0x3f5e24&&canPromptForAccessKey(_0x236e7d))try{showAccessKeyCreateHint(_0x52b1df),_0x3f5e24=await promptAccessKey('');}catch(_0x261dde){if(isAbortPrompt(_0x261dde))throw CliErrors[_0x110992(0x13b)]();throw _0x261dde;}if(!_0x3f5e24)throw CliErrors[_0x110992(0x165)](_0x110992(0x137),buildAccessKeySetupGuide(_0x52b1df));if(!ACCESS_KEY_PATTERN[_0x110992(0x15f)](_0x3f5e24))throw CliErrors['validation'](_0x110992(0x152),'Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x3d980a)return{'accessKey':_0x3f5e24};const _0x3a9abd=normalizeEnv(_0x3d980a);return{'accessKey':_0x3f5e24,'env':isDaily(_0x3a9abd)?_0x110992(0x177):isDev(_0x3a9abd)?_0x110992(0x169):_0x110992(0x17a)};}export const authDefinitions=[{'service':a13_0x329819(0x13e),'command':a13_0x329819(0x157),'description':a13_0x329819(0x159),'risk':a13_0x329819(0x180),'confirmationDescription':'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.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x329819(0x184),'type':'string','description':a13_0x329819(0x181)},{'name':'ak','type':a13_0x329819(0x186),'description':'Shorthand\x20for\x20--access-key'},{'name':a13_0x329819(0x13c),'type':a13_0x329819(0x150),'description':a13_0x329819(0x171),'default':!![]},{'name':a13_0x329819(0x134),'type':'boolean','description':a13_0x329819(0x13d),'default':![]}],async 'execute'(_0x2b7a29){const _0x2ce726=a13_0x329819;if(_0x2b7a29['bool'](_0x2ce726(0x185)))throw CliErrors[_0x2ce726(0x165)](_0x2ce726(0x162),'Use\x20`'+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 _0x1e2341=(_0x2b7a29[_0x2ce726(0x141)](_0x2ce726(0x184))||_0x2b7a29[_0x2ce726(0x141)]('ak')||'')[_0x2ce726(0x138)]();if(!_0x1e2341&&_0x2b7a29[_0x2ce726(0x17c)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG[_0x2ce726(0x17d)])};const _0xd523a0=await resolveAuthWriteInput(_0x2b7a29),_0x34602a=resolveAuthScopeFlags(_0x2b7a29),_0x14c20b=readScopedConfig(_0x34602a);_0x14c20b[_0x2ce726(0x17e)]=_0xd523a0['accessKey'];_0xd523a0[_0x2ce726(0x17b)]&&(_0x14c20b[_0x2ce726(0x17b)]=_0xd523a0['env']);writeScopedConfig(_0x14c20b,_0x34602a);const _0x2fb55b=_0x34602a['global']?_0x2ce726(0x13c):_0x2ce726(0x134),_0x3e1055=_0x14c20b[_0x2ce726(0x17b)]?_0x2ce726(0x18e)+_0x14c20b[_0x2ce726(0x17b)]+'.':'';return{'ok':!![],'message':_0x2ce726(0x149)+_0x2fb55b+_0x2ce726(0x16a)+_0x3e1055+_0x2ce726(0x163)+CLI_BIN_NAME+_0x2ce726(0x153)};}},{'service':'auth','command':'logout','description':a13_0x329819(0x155),'risk':a13_0x329819(0x180),'confirmationDescription':'Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x329819(0x13c),'type':'boolean','description':a13_0x329819(0x16e),'default':!![]},{'name':a13_0x329819(0x134),'type':a13_0x329819(0x150),'description':a13_0x329819(0x14e),'default':![]}],async 'execute'(_0x16e45d){const _0x575d96=a13_0x329819,_0x41bee7=resolveAuthScopeFlags(_0x16e45d),_0x1ab1d9=readScopedConfig(_0x41bee7),_0x5e0130=!!_0x1ab1d9[_0x575d96(0x17e)];delete _0x1ab1d9[_0x575d96(0x17e)],writeScopedConfig(_0x1ab1d9,_0x41bee7);const _0x453c1e=_0x41bee7[_0x575d96(0x13c)]?_0x575d96(0x13c):_0x575d96(0x134);if(_0x5e0130)return{'ok':!![],'message':_0x575d96(0x16f)+_0x453c1e+_0x575d96(0x16a)};return{'ok':!![],'message':_0x575d96(0x16c)+_0x453c1e+_0x575d96(0x15b)};}},{'service':a13_0x329819(0x13e),'command':a13_0x329819(0x173),'description':a13_0x329819(0x160),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x329819(0x13c),'type':a13_0x329819(0x150),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x329819(0x134),'type':a13_0x329819(0x150),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]},{'name':'check','type':a13_0x329819(0x150),'description':a13_0x329819(0x18d),'default':![]}],async 'execute'(_0x290299){const _0x22afe3=a13_0x329819,_0x5a3768=resolveAuthScopeFlags(_0x290299),_0x34e90a=readScopedConfig(_0x5a3768),_0x123090=productEnvName('ACCESS_KEY'),_0x4801d8=productEnv('ACCESS_KEY')||undefined,_0x296fe4=_0x34e90a[_0x22afe3(0x17e)]||undefined,_0x231d89=_0x4801d8||_0x296fe4,_0x35a483=_0x4801d8?_0x123090+_0x22afe3(0x187):_0x296fe4?(_0x5a3768[_0x22afe3(0x13c)]?_0x22afe3(0x13c):_0x22afe3(0x134))+_0x22afe3(0x168):null,_0x4b512b=['Auth\x20mode:\x20'+AUTH_MODE['ClientAk']];if(_0x231d89){const _0x2984a4=maskCliAccessKey(_0x231d89);_0x4b512b[_0x22afe3(0x15a)](_0x22afe3(0x17f)+_0x2984a4+(_0x35a483?_0x22afe3(0x172)+_0x35a483+')':'')),_0x4b512b[_0x22afe3(0x15a)](_0x22afe3(0x15e));}if(!_0x231d89){_0x4b512b[_0x22afe3(0x15a)](''),_0x4b512b[_0x22afe3(0x15a)](_0x22afe3(0x13a)),_0x4b512b[_0x22afe3(0x15a)](''),_0x4b512b['push'](_0x22afe3(0x140)+CLI_BIN_NAME+_0x22afe3(0x176)),_0x4b512b['push'](''),_0x4b512b['push']('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG['newConfigFileName']+')'),_0x4b512b[_0x22afe3(0x15a)](_0x22afe3(0x15d)),_0x4b512b[_0x22afe3(0x15a)](''),_0x4b512b[_0x22afe3(0x15a)]('Option\x20C:\x20environment\x20variable'),_0x4b512b[_0x22afe3(0x15a)](_0x22afe3(0x151)+_0x123090+_0x22afe3(0x154)),_0x4b512b[_0x22afe3(0x15a)](''),_0x4b512b[_0x22afe3(0x15a)](_0x22afe3(0x183)+CLI_BIN_NAME+_0x22afe3(0x153)),_0x4b512b[_0x22afe3(0x15a)](_0x22afe3(0x182)+CLI_BIN_NAME+'\x20doctor');if(_0x290299[_0x22afe3(0x18c)](_0x22afe3(0x16b))){const _0x5d9a33=readStoredDeviceCode();if(_0x5d9a33&&!isStoredDeviceCodeExpired(_0x5d9a33)){const _0x763c58=getUserDomain(),_0xde6999=await fetchDeviceToken(_0x763c58,_0x5d9a33[_0x22afe3(0x156)]);if(_0xde6999[_0x22afe3(0x173)]===_0x22afe3(0x175)&&_0xde6999['access_key']){const _0x27eec4={'global':_0x5d9a33[_0x22afe3(0x143)]===_0x22afe3(0x13c)},_0x11a1ea=readScopedConfig(_0x27eec4);_0x11a1ea[_0x22afe3(0x17e)]=_0xde6999[_0x22afe3(0x188)],writeScopedConfig(_0x11a1ea,_0x27eec4),deleteStoredDeviceCode();const _0x190eb3=_0xde6999[_0x22afe3(0x188)],_0x4384e7=maskCliAccessKey(_0x190eb3),_0x36a827=_0x5d9a33[_0x22afe3(0x143)]==='global'?_0x22afe3(0x14f):_0x22afe3(0x174);return{'ok':!![],'message':[_0x22afe3(0x139)+AUTH_MODE[_0x22afe3(0x164)],_0x22afe3(0x17f)+_0x4384e7+_0x22afe3(0x172)+_0x36a827+')',_0x22afe3(0x15e)][_0x22afe3(0x14d)]('\x0a')};}_0xde6999[_0x22afe3(0x173)]===_0x22afe3(0x135)&&deleteStoredDeviceCode();throw CliErrors[_0x22afe3(0x18b)]('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors[_0x22afe3(0x18b)](_0x4b512b['join']('\x0a'));}}return{'ok':!![],'message':_0x4b512b[_0x22afe3(0x14d)]('\x0a')};}},{'service':'auth','command':'info','description':a13_0x329819(0x189),'risk':a13_0x329819(0x178),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2aa1be){const _0x332825=a13_0x329819,_0x182e80=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x182e80,'meta':{'env':_0x2aa1be[_0x332825(0x158)]??_0x332825(0x17a)}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0x548f(_0x5aa5de,_0x28bb1e){_0x5aa5de=_0x5aa5de-0x76;const _0x348bf4=a14_0x348b();let _0x548fd1=_0x348bf4[_0x5aa5de];return _0x548fd1;}(function(_0x270816,_0x155e0c){const _0x290e66=a14_0x548f,_0x41d24a=_0x270816();while(!![]){try{const _0x325427=-parseInt(_0x290e66(0x7b))/0x1*(-parseInt(_0x290e66(0x85))/0x2)+-parseInt(_0x290e66(0x7c))/0x3*(parseInt(_0x290e66(0x80))/0x4)+-parseInt(_0x290e66(0x8b))/0x5+parseInt(_0x290e66(0x81))/0x6*(-parseInt(_0x290e66(0x79))/0x7)+parseInt(_0x290e66(0x88))/0x8*(-parseInt(_0x290e66(0x8a))/0x9)+-parseInt(_0x290e66(0x7f))/0xa*(-parseInt(_0x290e66(0x84))/0xb)+parseInt(_0x290e66(0x82))/0xc;if(_0x325427===_0x155e0c)break;else _0x41d24a['push'](_0x41d24a['shift']());}catch(_0x3d115c){_0x41d24a['push'](_0x41d24a['shift']());}}}(a14_0x348b,0x3f768));import{createInterface}from'node:readline';function a14_0x348b(){const _0x1ed0e7=['176460NDuAOf','14095032Wcwkrb','close','110cqjGzG','67916vHjKKe','name','AccessKey\x20(paste\x20ak_...):\x20','415328iQeZxO','question','90XuWLpW','1194500PXGExW','):\x20','SIGINT','trim','7GnYbMD','stdin','2aAcIqO','422187vNuGYE','removeListener','once','86370GJNKMG','8tmmquO'];a14_0x348b=function(){return _0x1ed0e7;};return a14_0x348b();}class AbortPrompt extends Error{constructor(){const _0x4a7109=a14_0x548f;super('User\x20aborted\x20prompt'),this[_0x4a7109(0x86)]='AbortPrompt';}}function createSafeRl(){const _0x57d7df=a14_0x548f,_0x26773b=createInterface({'input':process[_0x57d7df(0x7a)],'output':process['stdout']});let _0x4f5f97;const _0x146c5c=new Promise((_0xd4f666,_0x18adb9)=>{const _0x23ce27=_0x57d7df;_0x4f5f97=()=>{const _0x870e65=a14_0x548f;_0x4f5f97&&(_0x26773b[_0x870e65(0x7d)]('SIGINT',_0x4f5f97),_0x4f5f97=undefined);try{_0x26773b[_0x870e65(0x83)]();}catch{}_0x18adb9(new AbortPrompt());},_0x26773b[_0x23ce27(0x7e)](_0x23ce27(0x77),_0x4f5f97);}),_0xeeeb7=()=>{const _0x2aa29d=_0x57d7df;_0x4f5f97&&(_0x26773b[_0x2aa29d(0x7d)](_0x2aa29d(0x77),_0x4f5f97),_0x4f5f97=undefined);try{_0x26773b['close']();}catch{}};return{'rl':_0x26773b,'abortPromise':_0x146c5c,'disposeSuccess':_0xeeeb7};}export async function promptAccessKey(_0x3f6d90=''){const {rl:_0x2c74cf,abortPromise:_0x13be7b,disposeSuccess:_0x1e4c60}=createSafeRl(),_0x2bd9e9=new Promise(_0x233ea4=>{const _0x1af8da=a14_0x548f,_0x1e25d0=_0x3f6d90?'AccessKey\x20('+_0x3f6d90+_0x1af8da(0x76):_0x1af8da(0x87);_0x2c74cf[_0x1af8da(0x89)](_0x1e25d0,_0x3d98e0=>{const _0x1215e9=_0x1af8da;_0x1e4c60(),_0x233ea4(_0x3d98e0[_0x1215e9(0x78)]()||_0x3f6d90);});});return Promise['race']([_0x2bd9e9,_0x13be7b]);}export function isAbortPrompt(_0x29dd16){const _0x30bd87=a14_0x548f;return _0x29dd16 instanceof Error&&_0x29dd16[_0x30bd87(0x86)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a15_0x2d6a(_0x393a18,_0x470619){_0x393a18=_0x393a18-0x1e3;const _0x2553d9=a15_0x2553();let _0x2d6ab0=_0x2553d9[_0x393a18];return _0x2d6ab0;}const a15_0x559790=a15_0x2d6a;(function(_0x4da4fc,_0x1eff0e){const _0x5101ed=a15_0x2d6a,_0x167fc8=_0x4da4fc();while(!![]){try{const _0x22b5c8=-parseInt(_0x5101ed(0x1e5))/0x1*(-parseInt(_0x5101ed(0x1f6))/0x2)+parseInt(_0x5101ed(0x1e6))/0x3*(parseInt(_0x5101ed(0x1eb))/0x4)+-parseInt(_0x5101ed(0x1e9))/0x5*(-parseInt(_0x5101ed(0x1f5))/0x6)+-parseInt(_0x5101ed(0x1f4))/0x7+parseInt(_0x5101ed(0x1f7))/0x8+-parseInt(_0x5101ed(0x1e7))/0x9+-parseInt(_0x5101ed(0x1f1))/0xa;if(_0x22b5c8===_0x1eff0e)break;else _0x167fc8['push'](_0x167fc8['shift']());}catch(_0x322202){_0x167fc8['push'](_0x167fc8['shift']());}}}(a15_0x2553,0x57d96));import{getBffEndpointContract}from'../../core/api-client.js';function a15_0x2553(){const _0x3c7c5d=['version','bff','name','description','3694890wyWbOC','Backend\x20Function\x20name','read','2840369UunpDM','84JussJH','4720RZUqoM','3301272ySwNIs','appCode','str','246ChQWDK','3DQuKjv','3737466bVCbyx','gmtModified','126660MtRlxt','(none)','809972ARTsbc','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name'];a15_0x2553=function(){return _0x3c7c5d;};return a15_0x2553();}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x559790(0x1ee),'command':'detail','description':a15_0x559790(0x1ec),'risk':a15_0x559790(0x1f3),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x559790(0x1f2)}],async 'execute'(_0x23be44){const _0x3ee701=a15_0x559790,_0x162b93=await getBffEndpointContract(_0x23be44[_0x3ee701(0x1e3)],_0x23be44[_0x3ee701(0x1e4)](_0x3ee701(0x1ef)));return{'ok':!![],'data':{'appCode':_0x162b93[_0x3ee701(0x1e3)],'functionName':_0x162b93['functionName'],'description':_0x162b93[_0x3ee701(0x1f0)]||_0x3ee701(0x1ea),'version':_0x162b93[_0x3ee701(0x1ed)],'gmtModified':_0x162b93[_0x3ee701(0x1e8)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x5cf485=a16_0xed86;(function(_0x3e57f3,_0x33b44d){const _0x290c54=a16_0xed86,_0x5ebb62=_0x3e57f3();while(!![]){try{const _0x54adb=parseInt(_0x290c54(0x188))/0x1+parseInt(_0x290c54(0x18e))/0x2*(parseInt(_0x290c54(0x190))/0x3)+parseInt(_0x290c54(0x18d))/0x4*(parseInt(_0x290c54(0x192))/0x5)+-parseInt(_0x290c54(0x191))/0x6*(-parseInt(_0x290c54(0x18c))/0x7)+-parseInt(_0x290c54(0x18f))/0x8*(-parseInt(_0x290c54(0x187))/0x9)+parseInt(_0x290c54(0x189))/0xa+-parseInt(_0x290c54(0x193))/0xb;if(_0x54adb===_0x33b44d)break;else _0x5ebb62['push'](_0x5ebb62['shift']());}catch(_0x291e5e){_0x5ebb62['push'](_0x5ebb62['shift']());}}}(a16_0x4227,0xd5f08));import{executeSdkBff}from'../../core/sdk-client.js';function a16_0xed86(_0x32c548,_0x4c144b){_0x32c548=_0x32c548-0x185;const _0x42270c=a16_0x4227();let _0xed86c9=_0x42270c[_0x32c548];return _0xed86c9;}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x5cf485(0x195),'command':'exec','description':'Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','risk':a16_0x5cf485(0x194),'flags':[{...NAME_FLAG,'required':!![],'description':'Backend\x20Function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x5b6ae1){const _0x2eb052=a16_0x5cf485,_0x6a1d4b=parseJsonParams(_0x5b6ae1[_0x2eb052(0x18b)]('params')),_0x553630=Date[_0x2eb052(0x185)](),_0x207fb8=await executeSdkBff(_0x5b6ae1[_0x2eb052(0x18b)](_0x2eb052(0x18a)),_0x6a1d4b),_0x3db778=Date[_0x2eb052(0x185)]()-_0x553630;return{'ok':!![],'data':{'result':_0x207fb8,'elapsed':_0x3db778},'message':_0x2eb052(0x186)+_0x3db778+'ms'};}};function a16_0x4227(){const _0x15d73a=['15IHsqUO','57682559SOklzp','read','bff','now','Backend\x20Function\x20executed\x20in\x20','369RRGZNK','1040561PcDkMT','10866850rXLmAQ','name','str','14GHDuxt','1591180vctcvc','1240342cdIhXf','240008iAnmKa','3SiyJsD','2847966XZNdkO'];a16_0x4227=function(){return _0x15d73a;};return a16_0x4227();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a17_0x281c(_0x20dea3,_0x478f1a){_0x20dea3=_0x20dea3-0xf6;const _0x2bb4c4=a17_0x2bb4();let _0x281c62=_0x2bb4c4[_0x20dea3];return _0x281c62;}(function(_0x4f6884,_0x460306){const _0x528477=a17_0x281c,_0x16e79d=_0x4f6884();while(!![]){try{const _0x1f93fc=-parseInt(_0x528477(0xfa))/0x1+-parseInt(_0x528477(0xfb))/0x2+-parseInt(_0x528477(0xfd))/0x3*(-parseInt(_0x528477(0xf6))/0x4)+-parseInt(_0x528477(0xf8))/0x5+parseInt(_0x528477(0xf7))/0x6+parseInt(_0x528477(0xf9))/0x7+parseInt(_0x528477(0xfe))/0x8*(parseInt(_0x528477(0xfc))/0x9);if(_0x1f93fc===_0x460306)break;else _0x16e79d['push'](_0x16e79d['shift']());}catch(_0x571751){_0x16e79d['push'](_0x16e79d['shift']());}}}(a17_0x2bb4,0xb71f6));function a17_0x2bb4(){const _0xfabdcd=['1030916TgqeaS','16935165eamaHx','408585bRfhWD','8JATiBn','32ZetslM','144390inzmaY','4443270wteGau','310716dcwlGI','885516YnQXuX'];a17_0x2bb4=function(){return _0xfabdcd;};return a17_0x2bb4();}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x9ab897=a18_0x38d4;(function(_0x551d54,_0x4b72c9){const _0x9b949f=a18_0x38d4,_0x5835dd=_0x551d54();while(!![]){try{const _0x7de026=parseInt(_0x9b949f(0x176))/0x1+-parseInt(_0x9b949f(0x172))/0x2*(-parseInt(_0x9b949f(0x170))/0x3)+-parseInt(_0x9b949f(0x17c))/0x4+parseInt(_0x9b949f(0x17b))/0x5+parseInt(_0x9b949f(0x173))/0x6*(-parseInt(_0x9b949f(0x168))/0x7)+-parseInt(_0x9b949f(0x177))/0x8*(parseInt(_0x9b949f(0x15e))/0x9)+-parseInt(_0x9b949f(0x16b))/0xa*(-parseInt(_0x9b949f(0x174))/0xb);if(_0x7de026===_0x4b72c9)break;else _0x5835dd['push'](_0x5835dd['shift']());}catch(_0x1de9bf){_0x5835dd['push'](_0x5835dd['shift']());}}}(a18_0x1337,0x2fd4c));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a18_0x38d4(_0x56bd8c,_0x41261d){_0x56bd8c=_0x56bd8c-0x15d;const _0x13376d=a18_0x1337();let _0x38d4e3=_0x13376d[_0x56bd8c];return _0x38d4e3;}function a18_0x1337(){const _0x4ed23d=['changed','CLI\x20Built-in\x20Skill\x20','error','pipe','cli-skill','502999hYrohh','log','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.','50mYrKre','INSTALL_FAILED','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','installedPath','\x20is\x20already\x20current','75nOFPoo',']:\x20','21610hAUKaY','12XoKMCR','151624wChwyz','\x20installed','181948yEWhVL','555448eGtNFT','\x20at\x20','skillVersion','cli-skill-install','177180mrmZuu','311748LjShPh','apiError','nonInteractive','Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','setLogPath','18EjZsFb','info','install','unknown','Built-in\x20Skill\x20install\x20failed\x20['];a18_0x1337=function(){return _0x4ed23d;};return a18_0x1337();}export const cliSkillDefinitions=[{'service':a18_0x9ab897(0x167),'command':a18_0x9ab897(0x160),'description':a18_0x9ab897(0x17f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4f1fc3){const _0x468178=a18_0x9ab897;logger[_0x468178(0x15d)](process['cwd']()),logger[_0x468178(0x15f)](_0x468178(0x17a),_0x468178(0x16a));const _0x10c606=installBuiltinSkill({'stdio':_0x4f1fc3[_0x468178(0x17e)]?_0x468178(0x166):'inherit'});if(!_0x10c606['ok'])throw CliErrors[_0x468178(0x17d)](_0x468178(0x162)+(_0x10c606['code']||_0x468178(0x16c))+_0x468178(0x171)+(_0x10c606[_0x468178(0x165)]||_0x468178(0x161)),_0x468178(0x16d)+_0x10c606['repairCommand']);const _0x1d5d53=_0x10c606[_0x468178(0x16e)]?_0x468178(0x178)+_0x10c606[_0x468178(0x16e)]:'';return console[_0x468178(0x169)](_0x10c606[_0x468178(0x163)]?_0x468178(0x164)+_0x10c606[_0x468178(0x179)]+_0x468178(0x175)+_0x1d5d53:'CLI\x20Built-in\x20Skill\x20'+_0x10c606[_0x468178(0x179)]+_0x468178(0x16f)+_0x1d5d53),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x212a88,_0x105d88){const _0x523ad2=a19_0x69b8,_0xdd02b0=_0x212a88();while(!![]){try{const _0x22ae67=parseInt(_0x523ad2(0x102))/0x1*(-parseInt(_0x523ad2(0x101))/0x2)+parseInt(_0x523ad2(0xf3))/0x3*(-parseInt(_0x523ad2(0x100))/0x4)+parseInt(_0x523ad2(0xf0))/0x5*(-parseInt(_0x523ad2(0xf8))/0x6)+parseInt(_0x523ad2(0x103))/0x7*(parseInt(_0x523ad2(0xfc))/0x8)+parseInt(_0x523ad2(0xf7))/0x9+-parseInt(_0x523ad2(0xf6))/0xa+parseInt(_0x523ad2(0xfd))/0xb*(parseInt(_0x523ad2(0x105))/0xc);if(_0x22ae67===_0x105d88)break;else _0xdd02b0['push'](_0xdd02b0['shift']());}catch(_0x2a4c8c){_0xdd02b0['push'](_0xdd02b0['shift']());}}}(a19_0x4506,0xe3972));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';function a19_0x69b8(_0x42d93e,_0xabbc2){_0x42d93e=_0x42d93e-0xee;const _0x450644=a19_0x4506();let _0x69b8a9=_0x450644[_0x42d93e];return _0x69b8a9;}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(_0x4ee7c3){const _0x3c2696=a19_0x69b8,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x572240}=_0x4ee7c3;if(explicitGlobal&&explicitProject)throw CliErrors[_0x3c2696(0xf2)](_0x3c2696(0xf4),_0x3c2696(0xfb));if(explicitGlobal)return'global';if(explicitProject)return _0x3c2696(0xef);switch(_0x572240){case _0x3c2696(0xfa):return _0x3c2696(0xfe);case'project-or-global-explicit':if(!(_0x4ee7c3[_0x3c2696(0xf1)]??isInProject()))throw CliErrors[_0x3c2696(0xf2)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x3c2696(0xf9)]+_0x3c2696(0xf5),_0x3c2696(0xee)+PRODUCT_CONFIG[_0x3c2696(0xf9)]+_0x3c2696(0x104)+PRODUCT_CONFIG[_0x3c2696(0xf9)]+_0x3c2696(0xff));return _0x3c2696(0xef);}}export function toScopeFlags(_0x8dd834){const _0x3a6d12=a19_0x69b8;return{'global':_0x8dd834===_0x3a6d12(0xfe)};}function a19_0x4506(){const _0x5c5179=['\x20found).','2967480cqkrNs','8102691iDdpTG','12198XOgUdi','newConfigFileName','global-default','Use\x20only\x20one\x20config\x20scope\x20flag.','16IqdnGq','1078913jVaCmb','global','\x20first.','172892wSFREy','332JtLhQq','2648nAOUOy','3372852CVzPzz',',\x20or\x20create\x20a\x20project-local\x20','144kYORUT','Add\x20--global\x20to\x20write\x20to\x20~/','project','80yyGIjP','inProject','validation','93FIigCl','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.'];a19_0x4506=function(){return _0x5c5179;};return a19_0x4506();}export function formatScopeLabel(_0x4cc977){const _0xade9e=a19_0x69b8;return _0x4cc977===_0xade9e(0xfe)?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b071e,_0x49b3a8){const _0x44bb88=a20_0x32d2,_0x1d6be0=_0x3b071e();while(!![]){try{const _0x361b5b=parseInt(_0x44bb88(0x118))/0x1+-parseInt(_0x44bb88(0x117))/0x2+parseInt(_0x44bb88(0x11d))/0x3+-parseInt(_0x44bb88(0x11f))/0x4*(parseInt(_0x44bb88(0x125))/0x5)+-parseInt(_0x44bb88(0x11e))/0x6+parseInt(_0x44bb88(0x129))/0x7+parseInt(_0x44bb88(0x11c))/0x8*(parseInt(_0x44bb88(0x11a))/0x9);if(_0x361b5b===_0x49b3a8)break;else _0x1d6be0['push'](_0x1d6be0['shift']());}catch(_0x104cde){_0x1d6be0['push'](_0x1d6be0['shift']());}}}(a20_0x4101,0xb1c49));import{CliErrors}from'../../errors.js';function isSet(_0x24553f,_0x103d7c){const _0x198038=a20_0x32d2,_0x1c9400=_0x24553f[_0x198038(0x113)](_0x103d7c);return _0x1c9400!==undefined&&_0x1c9400!==''&&_0x1c9400!==![]&&_0x1c9400!==0x0;}function fmtNames(_0x361903){return _0x361903['map'](_0x157a43=>'--'+_0x157a43)['join'](',\x20');}function a20_0x4101(){const _0x428c7d=['4zJPwch',',\x20got\x20\x22','Provide\x20one\x20of:\x20','validation','some','Remove\x20all\x20but\x20one.','6556105YqMbUr','Use\x20only\x20one\x20of:\x20','Exactly\x20one\x20of\x20','test','5751291LmSJgX','At\x20least\x20one\x20of\x20','filter','\x20is\x20required\x20for\x20`','flag',':\x20expected\x20','length','Flags\x20','2251738fkOFXR','1199873tNoGwU','Only\x20one\x20of\x20','1139445eeHakE','\x20are\x20mutually\x20exclusive\x20for\x20`','88SzgknK','3497016LOoBaP','8487516zOiuaa'];a20_0x4101=function(){return _0x428c7d;};return a20_0x4101();}export function requireOneOf(_0x61602c,_0x3bb9c4,_0x133aa2){const _0x5a53a5=a20_0x32d2,_0x2b573c=_0x3bb9c4[_0x5a53a5(0x111)](_0x49f55b=>isSet(_0x61602c,_0x49f55b));if(_0x2b573c[_0x5a53a5(0x115)]!==0x1)throw CliErrors[_0x5a53a5(0x122)](_0x2b573c[_0x5a53a5(0x115)]===0x0?_0x5a53a5(0x127)+fmtNames(_0x3bb9c4)+'\x20is\x20required\x20for\x20`'+_0x133aa2+'`.':_0x5a53a5(0x119)+fmtNames(_0x3bb9c4)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x2b573c)+'.',_0x2b573c[_0x5a53a5(0x115)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x3bb9c4):_0x5a53a5(0x124));}export function requireAnyOf(_0x553fcd,_0x3859de,_0x4fbdb1){const _0x15b52b=a20_0x32d2;if(!_0x3859de[_0x15b52b(0x123)](_0x58ee88=>isSet(_0x553fcd,_0x58ee88)))throw CliErrors[_0x15b52b(0x122)](_0x15b52b(0x110)+fmtNames(_0x3859de)+_0x15b52b(0x112)+_0x4fbdb1+'`.',_0x15b52b(0x121)+fmtNames(_0x3859de));}export function mutuallyExclusive(_0x580441,_0x1d7a79,_0x56dbaf){const _0x18717c=a20_0x32d2,_0x448fe2=_0x1d7a79[_0x18717c(0x111)](_0x5044d2=>isSet(_0x580441,_0x5044d2));if(_0x448fe2[_0x18717c(0x115)]>0x1)throw CliErrors[_0x18717c(0x122)](_0x18717c(0x116)+fmtNames(_0x448fe2)+_0x18717c(0x11b)+_0x56dbaf+'`.',_0x18717c(0x126)+fmtNames(_0x1d7a79));}function a20_0x32d2(_0x290b39,_0x214dea){_0x290b39=_0x290b39-0x110;const _0x410113=a20_0x4101();let _0x32d2c5=_0x410113[_0x290b39];return _0x32d2c5;}export function validatePattern(_0x55c00f,_0x5f4786,_0x24c24d,_0x2eb798){const _0x2b26fd=a20_0x32d2,_0x293ac5=_0x55c00f['str'](_0x5f4786);if(_0x293ac5&&!_0x24c24d[_0x2b26fd(0x128)](_0x293ac5))throw CliErrors[_0x2b26fd(0x122)]('Invalid\x20--'+_0x5f4786+_0x2b26fd(0x114)+_0x2eb798+_0x2b26fd(0x120)+_0x293ac5+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a21_0x2b8556=a21_0x5c28;(function(_0x1994b6,_0x2be3bd){const _0x794f32=a21_0x5c28,_0xccd83=_0x1994b6();while(!![]){try{const _0x4a316e=-parseInt(_0x794f32(0xc0))/0x1+parseInt(_0x794f32(0xbf))/0x2*(-parseInt(_0x794f32(0xc2))/0x3)+-parseInt(_0x794f32(0xc1))/0x4+-parseInt(_0x794f32(0xb1))/0x5+-parseInt(_0x794f32(0xac))/0x6*(parseInt(_0x794f32(0xbb))/0x7)+parseInt(_0x794f32(0xb2))/0x8+parseInt(_0x794f32(0xbc))/0x9*(parseInt(_0x794f32(0xb8))/0xa);if(_0x4a316e===_0x2be3bd)break;else _0xccd83['push'](_0xccd83['shift']());}catch(_0x57bd69){_0xccd83['push'](_0xccd83['shift']());}}}(a21_0x2dfa,0x9cbc3));export const GLOBAL_SCOPE_FLAG={'name':a21_0x2b8556(0xba),'type':a21_0x2b8556(0xaf),'default':![],'description':a21_0x2b8556(0xae)};export const CODE_FLAG={'name':a21_0x2b8556(0xbd),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x2b8556(0xb3)}};export const SQLCODE_FLAG={'name':a21_0x2b8556(0xbe),'type':'string','required':!![],'description':a21_0x2b8556(0xb4),'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_0x2b8556(0xb6),'type':a21_0x2b8556(0xaf),'description':a21_0x2b8556(0xab)};export const PARAMS_FLAG={'name':a21_0x2b8556(0xb7),'type':a21_0x2b8556(0xb0),'description':a21_0x2b8556(0xb5)};function a21_0x2dfa(){const _0x34e6cc=['3101zFmsGF','452898vjfEmh','code','sqlcode','449738WPDgjV','1160684hZInQG','2449616pekUTO','3EjWFAW','Resource\x20ID','Return\x20full\x20raw\x20response\x20object','2334OtCzgC','number','Write\x20to\x20the\x20global\x20configuration','boolean','string','5646080HlATHx','8585064OOECqV','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','verbose','params','570RHBezh','name','global'];a21_0x2dfa=function(){return _0x34e6cc;};return a21_0x2dfa();}export const NAME_FLAG={'name':a21_0x2b8556(0xb9),'type':a21_0x2b8556(0xb0),'description':'Resource\x20name\x20for\x20lookup'};function a21_0x5c28(_0xb38892,_0x18d44a){_0xb38892=_0xb38892-0xab;const _0x2dfa9c=a21_0x2dfa();let _0x5c28ad=_0x2dfa9c[_0xb38892];return _0x5c28ad;}export const ID_FLAG={'name':'id','type':a21_0x2b8556(0xad),'required':!![],'description':a21_0x2b8556(0xc3)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c8926,_0x5499b4){const _0x62b30d=a22_0x3f89,_0x57e306=_0x3c8926();while(!![]){try{const _0x49e0f8=-parseInt(_0x62b30d(0x1bc))/0x1+-parseInt(_0x62b30d(0x1b9))/0x2+-parseInt(_0x62b30d(0x1b4))/0x3*(-parseInt(_0x62b30d(0x1c0))/0x4)+-parseInt(_0x62b30d(0x1c9))/0x5*(parseInt(_0x62b30d(0x1b6))/0x6)+-parseInt(_0x62b30d(0x1c7))/0x7+-parseInt(_0x62b30d(0x1bb))/0x8*(parseInt(_0x62b30d(0x1ba))/0x9)+-parseInt(_0x62b30d(0x1c4))/0xa*(-parseInt(_0x62b30d(0x1bd))/0xb);if(_0x49e0f8===_0x5499b4)break;else _0x57e306['push'](_0x57e306['shift']());}catch(_0x145943){_0x57e306['push'](_0x57e306['shift']());}}}(a22_0x5808,0x5d284));function a22_0x5808(){const _0x4210aa=['1868696BYOZxm','\x20path\x20is\x20required.','\x20MB','File\x20is\x20not\x20a\x20regular\x20file:\x20','15002390ysjPqS','isFile','toFixed','2969246SkzoAf','File\x20not\x20found:\x20','5EbRJdO','3Syucwj','trim','241158BVMzRX','size','ceil','1199880JCrkit','2151NUQTdw','13576pzUeqU','115947DTIIxt','11coVtBC','File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20','validation'];a22_0x5808=function(){return _0x4210aa;};return a22_0x5808();}function a22_0x3f89(_0x133161,_0x541418){_0x133161=_0x133161-0x1b4;const _0x58088c=a22_0x5808();let _0x3f89c8=_0x58088c[_0x133161];return _0x3f89c8;}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x48416c){const _0x2678a2=a22_0x3f89;if(_0x48416c>=BYTES_PER_MB){const _0x36ea52=Math[_0x2678a2(0x1b8)](_0x48416c/BYTES_PER_MB*0x64)/0x64;return _0x36ea52[_0x2678a2(0x1c6)](0x2)+_0x2678a2(0x1c2);}return _0x48416c+'\x20B';}export function requireRuntimeUploadFile(_0x4f494e,_0x17ddfb){const _0x43d7f3=a22_0x3f89,_0x129459=_0x4f494e[_0x43d7f3(0x1b5)]();if(!_0x129459)throw CliErrors[_0x43d7f3(0x1bf)](_0x17ddfb+_0x43d7f3(0x1c1));if(!existsSync(_0x129459))throw CliErrors[_0x43d7f3(0x1bf)](_0x43d7f3(0x1c8)+_0x129459);const _0x1604a6=statSync(_0x129459);if(!_0x1604a6[_0x43d7f3(0x1c5)]())throw CliErrors[_0x43d7f3(0x1bf)](_0x43d7f3(0x1c3)+_0x129459);if(_0x1604a6['size']>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x43d7f3(0x1bf)](_0x43d7f3(0x1be)+_0x129459+'\x20('+formatBytes(_0x1604a6[_0x43d7f3(0x1b7)])+')');return{'path':_0x129459,'size':_0x1604a6[_0x43d7f3(0x1b7)]};}
|
|
@@ -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
|
+
function a23_0x7ca5(_0x382d34,_0x310476){_0x382d34=_0x382d34-0x161;const _0xc6c21d=a23_0xc6c2();let _0x7ca5ec=_0xc6c21d[_0x382d34];return _0x7ca5ec;}function a23_0xc6c2(){const _0x267c18=['Settable\x20keys:\x20','249795VmNzPQ','4917hsgeEl','global','length','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','496UErHCb','bool','keys','pretty','\x20(global)','Value\x20to\x20assign','Set\x20a\x20configuration\x20value','Usage:\x20','key','log','Top-level\x20key\x20\x22','read','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','object','Missing\x20key\x20or\x20value.','639016DLMlxZ','Set\x20`','set','value','../../context.js','\x22\x20is\x20not\x20settable.','Key\x20not\x20found:\x20','Get\x20a\x20config\x20value','\x20\x20global:\x20\x20','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','list','stringify','pageSize','\x22.\x20Allowed:\x20','4968369RLruya','trim','format','raw','List\x20current\x20config','588825DArLII','1867524WlzDWc','split','field','Config\x20files:\x0a','Deleted\x20`','project-or-global-explicit','apps','locale','includes','delete','Key\x20already\x20absent:\x20','\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.','alias','join','\x20\x20project:\x20','config','66HaBVXI','appcode','(none)','validation','10SFExAy','\x20config\x20set\x20<key>\x20<value>\x20[--global]','26472peFdoJ','6leNXKU','Invalid\x20locale\x20value.','\x20config\x20get\x20<key>','accessKey','5257pwumAd','isArray','Missing\x20key\x20argument.','write',';\x20apps.<alias>.appcode'];a23_0xc6c2=function(){return _0x267c18;};return a23_0xc6c2();}const a23_0x54bb3c=a23_0x7ca5;(function(_0x4463d7,_0x299512){const _0xac0987=a23_0x7ca5,_0x1b17c2=_0x4463d7();while(!![]){try{const _0x19831c=-parseInt(_0xac0987(0x169))/0x1+parseInt(_0xac0987(0x19f))/0x2+parseInt(_0xac0987(0x181))/0x3*(parseInt(_0xac0987(0x16a))/0x4)+-parseInt(_0xac0987(0x18b))/0x5*(parseInt(_0xac0987(0x17a))/0x6)+-parseInt(_0xac0987(0x185))/0x7*(-parseInt(_0xac0987(0x190))/0x8)+parseInt(_0xac0987(0x164))/0x9*(-parseInt(_0xac0987(0x17e))/0xa)+-parseInt(_0xac0987(0x18c))/0xb*(-parseInt(_0xac0987(0x180))/0xc);if(_0x19831c===_0x299512)break;else _0x1b17c2['push'](_0x1b17c2['shift']());}catch(_0x21e5b2){_0x1b17c2['push'](_0x1b17c2['shift']());}}}(a23_0xc6c2,0x9162b));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(_0x35b3e5){const _0xb191b=a23_0x7ca5,_0x10bc46=_0x35b3e5[_0xb191b(0x16b)]('.');if(_0x10bc46[_0xb191b(0x18e)]!==0x3||_0x10bc46[0x0]!=='apps'||_0x10bc46[0x2]!==_0xb191b(0x17b))return undefined;const _0x59d678=_0x10bc46[0x1]?.['trim']();return _0x59d678?_0x59d678:undefined;}function parseAliasDeleteKey(_0xea621){const _0x4fb0d1=a23_0x7ca5,_0x4e5d9f=_0xea621[_0x4fb0d1(0x16b)]('.');if(_0x4e5d9f[_0x4fb0d1(0x18e)]===0x2&&_0x4e5d9f[0x0]===_0x4fb0d1(0x170)){const _0x3288b9=_0x4e5d9f[0x1]?.['trim']();return _0x3288b9?{'alias':_0x3288b9}:undefined;}if(_0x4e5d9f[_0x4fb0d1(0x18e)]===0x3&&_0x4e5d9f[0x0]===_0x4fb0d1(0x170)&&_0x4e5d9f[0x2]===_0x4fb0d1(0x17b)){const _0x5abc2d=_0x4e5d9f[0x1]?.[_0x4fb0d1(0x165)]();return _0x5abc2d?{'alias':_0x5abc2d,'field':_0x4fb0d1(0x17b)}:undefined;}return undefined;}function setLocalAppAlias(_0x131fdb,_0x3ed0bd,_0x31e3da){const _0x4d0a9d=a23_0x7ca5,_0x31e2ee=_0x131fdb[_0x4d0a9d(0x170)]&&typeof _0x131fdb[_0x4d0a9d(0x170)]===_0x4d0a9d(0x19d)&&!Array[_0x4d0a9d(0x186)](_0x131fdb[_0x4d0a9d(0x170)])?_0x131fdb[_0x4d0a9d(0x170)]:{},_0x2f4d65=_0x31e2ee[_0x3ed0bd]&&typeof _0x31e2ee[_0x3ed0bd]===_0x4d0a9d(0x19d)&&!Array['isArray'](_0x31e2ee[_0x3ed0bd])?_0x31e2ee[_0x3ed0bd]:{};_0x2f4d65[_0x4d0a9d(0x17b)]=_0x31e3da,_0x31e2ee[_0x3ed0bd]=_0x2f4d65,_0x131fdb[_0x4d0a9d(0x170)]=_0x31e2ee;}function deleteLocalAppAlias(_0x343029,_0x5a9076){const _0x6bacc7=a23_0x7ca5;if(!_0x343029['apps']||typeof _0x343029['apps']!==_0x6bacc7(0x19d)||Array[_0x6bacc7(0x186)](_0x343029[_0x6bacc7(0x170)]))return![];const _0x18bd6=_0x343029[_0x6bacc7(0x170)],_0xee5a74=_0x18bd6[_0x5a9076[_0x6bacc7(0x176)]];if(!_0xee5a74||typeof _0xee5a74!==_0x6bacc7(0x19d)||Array[_0x6bacc7(0x186)](_0xee5a74))return![];if(!_0x5a9076[_0x6bacc7(0x16c)])return delete _0x18bd6[_0x5a9076[_0x6bacc7(0x176)]],!![];if(!(_0x5a9076[_0x6bacc7(0x16c)]in _0xee5a74))return![];return delete _0xee5a74[_0x5a9076[_0x6bacc7(0x16c)]],Object[_0x6bacc7(0x192)](_0xee5a74)[_0x6bacc7(0x18e)]===0x0&&delete _0x18bd6[_0x5a9076[_0x6bacc7(0x176)]],!![];}const listDef={'service':a23_0x54bb3c(0x179),'command':a23_0x54bb3c(0x1a9),'description':a23_0x54bb3c(0x168),'risk':a23_0x54bb3c(0x19b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x40da9e){const _0x1f5546=a23_0x54bb3c,{buildConfigFromFlags:_0x8fcb6f}=await import(_0x1f5546(0x1a3)),_0x4df7be=_0x8fcb6f({}),_0x489203=redactCliConfigCredentials(_0x4df7be[_0x1f5546(0x167)]),_0x8729e1=getProjectConfigPath(),_0x91b862=resolveWriteConfigPath(_0x1f5546(0x18d));if(_0x40da9e[_0x1f5546(0x166)]===_0x1f5546(0x193))return{'ok':!![],'message':_0x1f5546(0x18f)+(JSON['stringify'](_0x489203,null,0x2)+'\x0a\x0a')+_0x1f5546(0x16d)+(_0x1f5546(0x178)+(_0x8729e1??_0x1f5546(0x17c))+'\x0a')+(_0x1f5546(0x1a7)+_0x91b862)};return{'ok':!![],'data':{'effective':_0x489203,'configFiles':{'project':_0x8729e1??null,'global':_0x91b862}}};}},getDef={'service':'config','command':'get','description':a23_0x54bb3c(0x1a6),'risk':a23_0x54bb3c(0x19b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x54bb3c(0x198),'description':a23_0x54bb3c(0x19c),'required':!![]}],'flags':[],async 'execute'(_0x3fad0e){const _0x3b64a5=a23_0x54bb3c,_0x5c9a46=_0x3fad0e['args'][0x0];if(!_0x5c9a46)throw CliErrors[_0x3b64a5(0x17d)](_0x3b64a5(0x187),_0x3b64a5(0x197)+CLI_BIN_NAME+_0x3b64a5(0x183));const {buildConfigFromFlags:_0x55a287}=await import(_0x3b64a5(0x1a3)),{raw:_0x2a36da}=_0x55a287({});if(_0x5c9a46[_0x3b64a5(0x172)]('.')){const _0x46f1cd=_0x5c9a46[_0x3b64a5(0x16b)]('.');let _0x26922d=_0x2a36da;for(const _0x461144 of _0x46f1cd){if(_0x26922d==null||typeof _0x26922d!==_0x3b64a5(0x19d))throw CliErrors[_0x3b64a5(0x17d)]('Key\x20not\x20found:\x20'+_0x5c9a46);_0x26922d=_0x26922d[_0x461144];}if(_0x26922d===undefined)throw CliErrors['validation'](_0x3b64a5(0x1a5)+_0x5c9a46);const _0x4d31e1=redactCliConfigValue(_0x5c9a46,_0x26922d);return console['log'](typeof _0x4d31e1===_0x3b64a5(0x19d)?JSON[_0x3b64a5(0x161)](_0x4d31e1,null,0x2):String(_0x4d31e1)),{'ok':!![]};}const _0x5c80cc=_0x2a36da[_0x5c9a46];if(_0x5c80cc===undefined)throw CliErrors[_0x3b64a5(0x17d)](_0x3b64a5(0x1a5)+_0x5c9a46);const _0x2cff9b=redactCliConfigValue(_0x5c9a46,_0x5c80cc);return console[_0x3b64a5(0x199)](typeof _0x2cff9b===_0x3b64a5(0x19d)?JSON['stringify'](_0x2cff9b,null,0x2):String(_0x2cff9b)),{'ok':!![]};}},setDef={'service':a23_0x54bb3c(0x179),'command':a23_0x54bb3c(0x1a1),'description':a23_0x54bb3c(0x196),'risk':a23_0x54bb3c(0x188),'confirmationDescription':'Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x54bb3c(0x1a2),'description':a23_0x54bb3c(0x195),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x27c6fc){const _0x3bec10=a23_0x54bb3c,_0x23afd6=_0x27c6fc['args'][0x0],_0x2fe347=_0x27c6fc['args'][0x1];if(!_0x23afd6||_0x2fe347===undefined)throw CliErrors[_0x3bec10(0x17d)](_0x3bec10(0x19e),_0x3bec10(0x197)+CLI_BIN_NAME+_0x3bec10(0x17f));if(ENUM_KEYS[_0x23afd6]&&!ENUM_KEYS[_0x23afd6][_0x3bec10(0x172)](_0x2fe347))throw CliErrors[_0x3bec10(0x17d)]('Invalid\x20value\x20for\x20\x22'+_0x23afd6+_0x3bec10(0x163)+ENUM_KEYS[_0x23afd6][_0x3bec10(0x177)](',\x20'));if(isCliProtectedConfigKey(_0x23afd6))throw CliErrors[_0x3bec10(0x17d)]('\x22'+_0x23afd6+_0x3bec10(0x175));if(_0x23afd6===_0x3bec10(0x162)){const _0x1d3df3=Number(_0x2fe347);if(isNaN(_0x1d3df3)||_0x1d3df3<=0x0)throw CliErrors[_0x3bec10(0x17d)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x7ad662=resolveWriteScope({'explicitGlobal':_0x27c6fc[_0x3bec10(0x191)](_0x3bec10(0x18d)),'policy':_0x3bec10(0x16f)}),_0x2c7bab=toScopeFlags(_0x7ad662),_0xff7e60=readScopedConfig(_0x2c7bab),_0x5d2843=parseAliasAppcodeSetKey(_0x23afd6);if(!_0x5d2843&&!isTopLevelConfigKey(_0x23afd6))throw CliErrors['validation'](_0x3bec10(0x19a)+_0x23afd6+_0x3bec10(0x1a4),_0x3bec10(0x18a)+getTopLevelConfigKeySummary()+_0x3bec10(0x189));if(_0x5d2843)setLocalAppAlias(_0xff7e60,_0x5d2843,_0x2fe347);else{if(_0x23afd6==='locale'){const _0x764441=normalizeLocale(_0x2fe347);if(!_0x764441)throw CliErrors['validation'](_0x3bec10(0x182),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');_0xff7e60[_0x3bec10(0x171)]=_0x764441;}else _0xff7e60[_0x23afd6]=_0x23afd6===_0x3bec10(0x162)?Number(_0x2fe347):DOMAIN_CONFIG_FIELDS[_0x3bec10(0x172)](_0x23afd6)?normalizeDomainOrigin(_0x23afd6,_0x2fe347):_0x2fe347;}const _0x409bc8=_0x23afd6===_0x3bec10(0x184)?maskCliAccessKey(_0x2fe347):!_0x5d2843&&_0x23afd6===_0x3bec10(0x171)?String(_0xff7e60['locale']):_0x2fe347;return console['log'](_0x3bec10(0x1a0)+_0x23afd6+'`\x20=\x20\x22'+_0x409bc8+'\x22'+(_0x7ad662===_0x3bec10(0x18d)?_0x3bec10(0x194):'')),writeScopedConfig(_0xff7e60,_0x2c7bab),{'ok':!![]};}},deleteDef={'service':a23_0x54bb3c(0x179),'command':a23_0x54bb3c(0x173),'description':'Delete\x20a\x20configuration\x20value','risk':a23_0x54bb3c(0x188),'confirmationDescription':a23_0x54bb3c(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x54bb3c(0x198),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x4a441f){const _0x2222b0=a23_0x54bb3c,_0x463bd=_0x4a441f['args'][0x0];if(!_0x463bd)throw CliErrors[_0x2222b0(0x17d)]('Missing\x20key\x20argument.',_0x2222b0(0x197)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(isCliProtectedConfigKey(_0x463bd))throw CliErrors[_0x2222b0(0x17d)]('\x22'+_0x463bd+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x2e7a63=resolveWriteScope({'explicitGlobal':_0x4a441f[_0x2222b0(0x191)]('global'),'policy':_0x2222b0(0x16f)}),_0x1f920a=toScopeFlags(_0x2e7a63),_0x5e055f=readScopedConfig(_0x1f920a),_0x26fa40=parseAliasDeleteKey(_0x463bd);if(_0x26fa40){if(!deleteLocalAppAlias(_0x5e055f,_0x26fa40))return console[_0x2222b0(0x199)](_0x2222b0(0x174)+_0x463bd+(_0x2e7a63===_0x2222b0(0x18d)?_0x2222b0(0x194):'')),{'ok':!![],'data':{'key':_0x463bd,'scope':_0x2e7a63,'changed':![]}};return console[_0x2222b0(0x199)](_0x2222b0(0x16e)+_0x463bd+'`'+(_0x2e7a63===_0x2222b0(0x18d)?'\x20(global)':'')),writeScopedConfig(_0x5e055f,_0x1f920a),{'ok':!![],'data':{'key':_0x463bd,'scope':_0x2e7a63,'changed':!![]}};}if(_0x5e055f[_0x463bd]===undefined)return console['log'](_0x2222b0(0x174)+_0x463bd+(_0x2e7a63===_0x2222b0(0x18d)?_0x2222b0(0x194):'')),{'ok':!![],'data':{'key':_0x463bd,'scope':_0x2e7a63,'changed':![]}};return delete _0x5e055f[_0x463bd],console['log'](_0x2222b0(0x16e)+_0x463bd+'`'+(_0x2e7a63===_0x2222b0(0x18d)?_0x2222b0(0x194):'')),writeScopedConfig(_0x5e055f,_0x1f920a),{'ok':!![],'data':{'key':_0x463bd,'scope':_0x2e7a63,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a24_0xef8476=a24_0x5ceb;function a24_0x5ceb(_0x3f4cfe,_0x58a11d){_0x3f4cfe=_0x3f4cfe-0x9f;const _0x10fd82=a24_0x10fd();let _0x5cebd6=_0x10fd82[_0x3f4cfe];return _0x5cebd6;}(function(_0x17c979,_0x450126){const _0x4774c3=a24_0x5ceb,_0x45d8a5=_0x17c979();while(!![]){try{const _0x1f1f72=parseInt(_0x4774c3(0xbb))/0x1*(-parseInt(_0x4774c3(0xae))/0x2)+-parseInt(_0x4774c3(0xb8))/0x3+parseInt(_0x4774c3(0xa9))/0x4+parseInt(_0x4774c3(0xb9))/0x5*(-parseInt(_0x4774c3(0xb4))/0x6)+-parseInt(_0x4774c3(0xbf))/0x7*(-parseInt(_0x4774c3(0xa1))/0x8)+-parseInt(_0x4774c3(0xaf))/0x9+-parseInt(_0x4774c3(0xb6))/0xa*(-parseInt(_0x4774c3(0xb1))/0xb);if(_0x1f1f72===_0x450126)break;else _0x45d8a5['push'](_0x45d8a5['shift']());}catch(_0x5ad5cb){_0x45d8a5['push'](_0x45d8a5['shift']());}}}(a24_0x10fd,0x7c2af));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';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';function a24_0x10fd(){const _0x30e0cc=['Region\x20\x22','nonInteractive','Custom\x20platform\x20API\x20HTTPS\x20origin','8gxGmRC','string','join','write','Independent-deployment\x20Domain\x20JSON\x20file','official','config','runtime-domain','1047440oYdWhr','enterprise-v1','Custom\x20User\x20HTTPS\x20origin','Custom\x20SkillHub\x20HTTPS\x20origin','ExitPromptError','29496RUrzwL','1095588wuSkyE','length','11MuLKcd','Custom\x20KB\x20Service\x20HTTPS\x20origin','Official\x20Lovrabet\x20region:\x20','6qOCyDI','kb-service-domain','14438400bKeYtY','Available\x20regions:\x20','2073132sxAZbW','1006790pkCLdu','skill-domain','58ijamng','str','routing','region','4706863SxyGaS','independent','domains','Custom\x20Runtime\x20HTTPS\x20origin','keys','label','mode','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','domain-config','validation','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Lovrabet\x20connection\x20configured\x20for\x20region:\x20'];a24_0x10fd=function(){return _0x30e0cc;};return a24_0x10fd();}const domainFlags=[{'name':a24_0xef8476(0xc7),'type':'string','description':a24_0xef8476(0xa5)},{'name':'user-domain','type':'string','description':a24_0xef8476(0xab)},{'name':'api-domain','type':a24_0xef8476(0xa2),'description':a24_0xef8476(0xa0)},{'name':a24_0xef8476(0xa8),'type':a24_0xef8476(0xa2),'description':a24_0xef8476(0xc2)},{'name':a24_0xef8476(0xba),'type':a24_0xef8476(0xa2),'description':a24_0xef8476(0xac)},{'name':a24_0xef8476(0xb5),'type':a24_0xef8476(0xa2),'description':a24_0xef8476(0xb2)}];export const configInitFlags=[{'name':a24_0xef8476(0xbe),'type':a24_0xef8476(0xa2),'description':a24_0xef8476(0xb3)+ENABLED_LOVRABET_REGION_VALUES[a24_0xef8476(0xa3)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x383001){const _0x29048e=a24_0xef8476,_0x1b3771=_0x383001[_0x29048e(0xbc)](_0x29048e(0xbe));if(_0x1b3771){if(!isEnabledLovrabetRegion(_0x1b3771))throw CliErrors[_0x29048e(0xc8)](_0x29048e(0xcb)+_0x1b3771+'\x22\x20is\x20not\x20currently\x20available.',_0x29048e(0xb7)+ENABLED_LOVRABET_REGION_VALUES['join'](',\x20'));return _0x1b3771;}if(_0x383001[_0x29048e(0x9f)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':'Select\x20Lovrabet\x20region','default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES['map'](_0x1cb8a7=>({'name':OFFICIAL_ROUTING_PROFILES[_0x1cb8a7][_0x29048e(0xc4)]+'\x20('+_0x1cb8a7+')','value':_0x1cb8a7}))});}catch(_0x535cfe){if(_0x535cfe?.['name']===_0x29048e(0xad))throw CliErrors['cancelled']();throw _0x535cfe;}}export async function executeConfigInit(_0xa3ab5){const _0x506d0d=a24_0xef8476,_0x577fd2=resolveDomainConfigInput(_0xa3ab5),_0x55a146=_0x577fd2[_0x506d0d(0xc1)],_0x5d123c=Object[_0x506d0d(0xc3)](_0x55a146)[_0x506d0d(0xb0)]>0x0;if(_0x5d123c&&_0xa3ab5['str'](_0x506d0d(0xbe)))throw CliErrors['validation'](_0x506d0d(0xc6));const _0x3339ed={'global':!![]},_0x560d36=readScopedConfig(_0x3339ed);for(const _0x5dac53 of DOMAIN_CONFIG_FIELDS)delete _0x560d36[_0x5dac53];for(const _0x5ca892 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x560d36[_0x5ca892];delete _0x560d36[_0x506d0d(0xbd)];let _0x5594cb=null;if(_0x5d123c)delete _0x560d36[_0x506d0d(0xbe)],_0x577fd2[_0x506d0d(0xc5)]==='enterprise-v1'?_0x560d36[_0x506d0d(0xbd)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x577fd2['manifestDomains']}:Object['assign'](_0x560d36,_0x55a146);else{_0x5594cb=await resolveRegion(_0xa3ab5);if(_0x5594cb===DEFAULT_LOVRABET_REGION)delete _0x560d36[_0x506d0d(0xbe)];else _0x560d36[_0x506d0d(0xbe)]=_0x5594cb;}return writeScopedConfig(_0x560d36,_0x3339ed),{'ok':!![],'message':_0x5d123c?_0x506d0d(0xc9)+Object[_0x506d0d(0xc3)](_0x577fd2[_0x506d0d(0xc5)]==='enterprise-v1'?_0x577fd2['manifestDomains']:_0x55a146)[_0x506d0d(0xa3)](',\x20')+'.':_0x506d0d(0xca)+_0x5594cb+'.','data':{'mode':_0x5d123c?_0x506d0d(0xc0):_0x506d0d(0xa6),'protocol':_0x577fd2['mode']===_0x506d0d(0xaa)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x5594cb,'domains':_0x55a146}};}export const configInitDefinition={'service':a24_0xef8476(0xa7),'command':'init','description':'Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','risk':a24_0xef8476(0xa4),'confirmationDescription':'Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3872cb,_0x1ab7ca){var _0x4a22c7=a25_0x31d1,_0x4aea68=_0x3872cb();while(!![]){try{var _0x39042d=parseInt(_0x4a22c7(0x1e5))/0x1+-parseInt(_0x4a22c7(0x1e0))/0x2+-parseInt(_0x4a22c7(0x1de))/0x3+parseInt(_0x4a22c7(0x1e1))/0x4+-parseInt(_0x4a22c7(0x1e2))/0x5*(parseInt(_0x4a22c7(0x1e3))/0x6)+parseInt(_0x4a22c7(0x1dd))/0x7+parseInt(_0x4a22c7(0x1e4))/0x8*(parseInt(_0x4a22c7(0x1df))/0x9);if(_0x39042d===_0x1ab7ca)break;else _0x4aea68['push'](_0x4aea68['shift']());}catch(_0x54d2cf){_0x4aea68['push'](_0x4aea68['shift']());}}}(a25_0x411d,0x91523));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a25_0x31d1(_0x235019,_0x3dea00){_0x235019=_0x235019-0x1dd;var _0x411ddc=a25_0x411d();var _0x31d172=_0x411ddc[_0x235019];return _0x31d172;}export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';function a25_0x411d(){var _0x1389a7=['2082OAadVf','1606288KDDWHe','228611RzBnEz','8325275FaskOc','456105JkytjE','27BnzcDC','1569182LVxaEg','712616UHVMEh','9605HdJZsY'];a25_0x411d=function(){return _0x1389a7;};return a25_0x411d();}
|
|
@@ -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_0x309168=a26_0xba87;(function(_0x228c44,_0x295748){const _0x5b17c8=a26_0xba87,_0x12f9a5=_0x228c44();while(!![]){try{const _0x123598=parseInt(_0x5b17c8(0x1df))/0x1*(parseInt(_0x5b17c8(0x1c8))/0x2)+parseInt(_0x5b17c8(0x1db))/0x3+parseInt(_0x5b17c8(0x1c2))/0x4*(parseInt(_0x5b17c8(0x1a9))/0x5)+-parseInt(_0x5b17c8(0x1e1))/0x6*(-parseInt(_0x5b17c8(0x195))/0x7)+parseInt(_0x5b17c8(0x19c))/0x8+parseInt(_0x5b17c8(0x1c3))/0x9*(parseInt(_0x5b17c8(0x1c1))/0xa)+-parseInt(_0x5b17c8(0x1d6))/0xb;if(_0x123598===_0x295748)break;else _0x12f9a5['push'](_0x12f9a5['shift']());}catch(_0x5508b1){_0x12f9a5['push'](_0x12f9a5['shift']());}}}(a26_0x2038,0xe0c92));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';import{CODE_FLAG}from'../../commands/common/flags.js';import{getDatasetDetail,getDatasetImportContract,createDatasetImportBatch,readDatasetImportRows,readDatasetImportTaskRows,uploadDatasetImportImage,readDatasetImportImage}from'../../core/api-client.js';import{getRuntimeDomain}from'../../constant/domain.js';import{CliError,CliErrors}from'../../errors.js';function a26_0xba87(_0x1ab585,_0x1f4fb7){_0x1ab585=_0x1ab585-0x18d;const _0x20380f=a26_0x2038();let _0xba87f=_0x20380f[_0x1ab585];return _0xba87f;}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_0x2038(){const _0x18c408=['Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','METADATA','batch-size','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','data','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','imageCells','file','errors','.lock','Excel\x20contains\x20','.rows.json','map','See\x20','1-based\x20Excel\x20header\x20row','utf8','appCode','\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.','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','10HvUdAY','4hzIFrd','16417656BgZAik','\x20--code\x20','write','values','mapping','336534TkfvTV','schemaFingerprint','/client/','imageFields','rows','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','POST','isArray','num','parse','warnings','Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.','report','header-row','47263733oGTQgV','sheet','length','Mapping\x20file\x20exceeds\x201\x20MB.','.import-checkpoint.json','4994391XeYVRy','.lock.recovery','some','batchSize','1OksqvI','message','6BBYAsS','slice','string','str','isInteger','media','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','maxBatchSize','647983XocApa','import-excel','number','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','--file\x20and\x20--mapping\x20are\x20required.','Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)','succeeded','3248408ElehhI','hashes','emptyRows','bool','Excel\x20import\x20failed.','mappingFile','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','checkpoint','schemaVersion','invalid','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','max','.\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','5307785AwUGoa','resume','boolean','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','validation'];a26_0x2038=function(){return _0x18c408;};return a26_0x2038();}function input(_0x353a10){const _0x37e410=a26_0xba87,_0xdbf097=_0x353a10[_0x37e410(0x18f)]('file'),_0x23d7bf=_0x353a10[_0x37e410(0x18f)](_0x37e410(0x1c7));if(!_0xdbf097||!_0x23d7bf)throw CliErrors[_0x37e410(0x1ad)](_0x37e410(0x199));const _0x46ecaa=_0x353a10[_0x37e410(0x1d0)](_0x37e410(0x1d5),0x1),_0x1444ec=_0x353a10[_0x37e410(0x1d0)](_0x37e410(0x1b0),0x1f4);if(!Number[_0x37e410(0x190)](_0x46ecaa)||_0x46ecaa<0x1||!Number[_0x37e410(0x190)](_0x1444ec)||_0x1444ec<0x1||_0x1444ec>0x1f4)throw CliErrors[_0x37e410(0x1ad)](_0x37e410(0x192));const _0x57cfbc=resolve(_0x353a10[_0x37e410(0x18f)]('checkpoint')||_0xdbf097+_0x37e410(0x1da)),_0x567494=resolve(_0x353a10['str'](_0x37e410(0x1d4))||_0xdbf097+'.import-report.json'),_0xf633f2=[resolve(_0xdbf097),resolve(_0x23d7bf),_0x57cfbc,_0x567494];if(new Set(_0xf633f2)['size']!==_0xf633f2[_0x37e410(0x1d8)])throw CliErrors[_0x37e410(0x1ad)](_0x37e410(0x1ac));return{'file':resolve(_0xdbf097),'mappingFile':resolve(_0x23d7bf),'headerRow':_0x46ecaa,'batchSize':_0x1444ec,'checkpoint':_0x57cfbc,'report':_0x567494,'sheet':_0x353a10[_0x37e410(0x18f)](_0x37e410(0x1d7))||undefined,'resume':_0x353a10[_0x37e410(0x19f)]('resume')};}async function prepare(_0x139a1c){const _0x2fab08=a26_0xba87,_0x25e70a=input(_0x139a1c),_0x5e6202=_0x139a1c[_0x2fab08(0x18f)]('code');[_0x25e70a[_0x2fab08(0x1b5)],_0x25e70a[_0x2fab08(0x1a1)],_0x25e70a['checkpoint'],_0x25e70a[_0x2fab08(0x1d4)]]=await Promise['all']([realpath(_0x25e70a['file']),realpath(_0x25e70a[_0x2fab08(0x1a1)]),resolveImportOutputPath(_0x25e70a['checkpoint']),resolveImportOutputPath(_0x25e70a[_0x2fab08(0x1d4)])]),assertImportPaths(_0x25e70a[_0x2fab08(0x1a3)],_0x25e70a[_0x2fab08(0x1d4)],[_0x25e70a['file'],_0x25e70a['mappingFile']]);let _0x7aa158;const _0x182bea=await readFile(_0x25e70a['mappingFile']);if(_0x182bea[_0x2fab08(0x1d8)]>0x400*0x400)throw CliErrors[_0x2fab08(0x1ad)](_0x2fab08(0x1d9));try{_0x7aa158=JSON[_0x2fab08(0x1d1)](_0x182bea['toString'](_0x2fab08(0x1bd)));}catch{throw CliErrors[_0x2fab08(0x1ad)]('Mapping\x20file\x20must\x20contain\x20valid\x20JSON.');}if(!_0x7aa158||typeof _0x7aa158!=='object'||Array[_0x2fab08(0x1cf)](_0x7aa158)||Object[_0x2fab08(0x1c6)](_0x7aa158)[_0x2fab08(0x1dd)](_0x5ac3b1=>typeof _0x5ac3b1!==_0x2fab08(0x18e)))throw CliErrors[_0x2fab08(0x1ad)](_0x2fab08(0x1d3));const _0x157912=await getDatasetDetail(_0x5e6202),_0x3baefb=assertDatasetImportTarget(_0x157912,_0x139a1c[_0x2fab08(0x1be)],_0x5e6202);if(_0x3baefb==='DB_TABLE')throw CliErrors[_0x2fab08(0x1ad)](_0x2fab08(0x1c0),'Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20'+_0x5e6202+_0x2fab08(0x1a8)+_0x139a1c['appCode']+_0x2fab08(0x1c4)+_0x5e6202+_0x2fab08(0x1bf));if(_0x3baefb!==_0x2fab08(0x1af))throw CliErrors[_0x2fab08(0x1ad)]('Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.',_0x2fab08(0x1ae));const _0x49b4bf=await buildExcelManifest({..._0x25e70a,'mapping':_0x7aa158,'fields':normalizeImportFields(_0x157912)}),_0x22f083=await getDatasetImportContract(_0x139a1c['appCode'],_0x5e6202);assertImportContract(_0x22f083,_0x139a1c[_0x2fab08(0x1be)],_0x5e6202),assertImageImportCapability(_0x22f083,_0x49b4bf);if(_0x49b4bf[_0x2fab08(0x1cb)]?.['length']){const _0x5d1e67=await resolveImportOutputPath(_0x25e70a[_0x2fab08(0x1a3)]+_0x2fab08(0x1b9)),_0x439618=await Promise['all']([_0x5d1e67,_0x5d1e67+_0x2fab08(0x1b7),_0x5d1e67+_0x2fab08(0x1dc),_0x25e70a[_0x2fab08(0x1a3)]+_0x2fab08(0x1b7),_0x25e70a[_0x2fab08(0x1a3)]+_0x2fab08(0x1dc)][_0x2fab08(0x1ba)](resolveImportOutputPath));assertImportPaths(_0x25e70a['checkpoint'],_0x25e70a['report'],[_0x25e70a[_0x2fab08(0x1b5)],_0x25e70a[_0x2fab08(0x1a1)],..._0x439618[_0x2fab08(0x18d)](0x0,0x3)]);}if(_0x25e70a[_0x2fab08(0x1de)]>_0x22f083[_0x2fab08(0x194)])throw CliErrors['validation'](_0x2fab08(0x198));return{'args':_0x25e70a,'manifest':_0x49b4bf,'contract':_0x22f083,'code':_0x5e6202};}async function checked(_0x5dacb2){const _0x94b8ad=a26_0xba87;try{return await _0x5dacb2();}catch(_0x2b0b1e){if(_0x2b0b1e instanceof CliError)throw _0x2b0b1e;throw CliErrors[_0x94b8ad(0x1ad)](_0x2b0b1e[_0x94b8ad(0x1e0)]||_0x94b8ad(0x1a0));}}export const dataImportExcel={'service':a26_0x309168(0x1b2),'command':a26_0x309168(0x196),'risk':a26_0x309168(0x1c5),'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_0x309168(0x1b5),'type':a26_0x309168(0x18e),'required':!![],'description':a26_0x309168(0x1a2)},{'name':a26_0x309168(0x1c7),'type':'string','required':!![],'description':a26_0x309168(0x1a6)},{'name':'sheet','type':a26_0x309168(0x18e),'description':a26_0x309168(0x19a)},{'name':a26_0x309168(0x1d5),'type':'number','default':0x1,'description':a26_0x309168(0x1bc)},{'name':a26_0x309168(0x1b0),'type':a26_0x309168(0x197),'default':0x1f4,'description':'Maximum\x20records\x20per\x20request\x20(1..500)'},{'name':a26_0x309168(0x1a3),'type':a26_0x309168(0x18e),'description':a26_0x309168(0x1cd)},{'name':a26_0x309168(0x1d4),'type':a26_0x309168(0x18e),'description':a26_0x309168(0x1b1)},{'name':a26_0x309168(0x1aa),'type':a26_0x309168(0x1ab),'description':a26_0x309168(0x1b3)}],'validate':async _0x171764=>{input(_0x171764);},'dryRun':async _0x2bd1c6=>checked(async()=>{const _0x3ebcac=a26_0x309168,{args:_0x1c904f,manifest:_0x461f53,contract:_0x3e2f35,code:_0x109933}=await prepare(_0x2bd1c6),_0x2276fc=new Set(_0x461f53['errors'][_0x3ebcac(0x1ba)](_0x539ff1=>_0x539ff1['rowNumber']))['size'];return{'method':_0x3ebcac(0x1ce),'url':_0x3ebcac(0x1ca)+encodeURIComponent(_0x2bd1c6['appCode'])+'/'+encodeURIComponent(_0x109933)+'/import-batch','description':'Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','body':{'schemaFingerprint':_0x3e2f35[_0x3ebcac(0x1c9)]},'validRows':Math[_0x3ebcac(0x1a7)](0x0,_0x461f53[_0x3ebcac(0x1cc)][_0x3ebcac(0x1d8)]-_0x2276fc),'invalidRows':_0x2276fc,'invalidCells':_0x461f53[_0x3ebcac(0x1b6)]['length'],'emptyRows':_0x461f53[_0x3ebcac(0x19e)][_0x3ebcac(0x1d8)],'expectedBatches':previewImportBatchCount(_0x461f53,_0x3e2f35,_0x1c904f['batchSize']),'imageCount':_0x461f53[_0x3ebcac(0x1b4)]?.['reduce']((_0x25b0c3,_0x1b9a95)=>_0x25b0c3+_0x1b9a95[_0x3ebcac(0x19d)]['length'],0x0)??0x0,'uniqueImages':_0x461f53[_0x3ebcac(0x191)]?.['length']??0x0,'uniqueImageBytes':_0x461f53[_0x3ebcac(0x191)]?.['reduce']((_0x3807b9,_0x4b1f4c)=>_0x3807b9+_0x4b1f4c['size'],0x0)??0x0,'errors':_0x461f53[_0x3ebcac(0x1b6)],'warnings':_0x461f53[_0x3ebcac(0x1d2)],'sheet':_0x461f53['sheet'],'checkpoint':_0x1c904f['checkpoint'],'report':_0x1c904f['report']};}),'execute':async _0x4d670c=>checked(async()=>{const _0x4b804e=a26_0x309168,{args:_0x1dc4b1,manifest:_0x5f03d9,contract:_0x29058e,code:_0x3fe1d9}=await prepare(_0x4d670c);if(_0x5f03d9[_0x4b804e(0x1b6)][_0x4b804e(0x1d8)]){await saveImportJson(_0x1dc4b1[_0x4b804e(0x1d4)],{'status':_0x4b804e(0x1a5),'sourceRows':_0x5f03d9[_0x4b804e(0x1cc)][_0x4b804e(0x1d8)],'errors':_0x5f03d9['errors'],'emptyRows':_0x5f03d9[_0x4b804e(0x19e)],'warnings':_0x5f03d9[_0x4b804e(0x1d2)]});throw CliErrors[_0x4b804e(0x1ad)](_0x4b804e(0x1b8)+_0x5f03d9[_0x4b804e(0x1b6)][_0x4b804e(0x1d8)]+_0x4b804e(0x193),_0x4b804e(0x1bb)+_0x1dc4b1[_0x4b804e(0x1d4)]+'.');}const _0x571a1d=_0x5f03d9[_0x4b804e(0x1cb)]?.['length']?runImageExcelImport:_0x29058e[_0x4b804e(0x1a4)]===0x2?runAutoIdExcelImport:runExcelImport,_0x18477e=await _0x571a1d({..._0x1dc4b1,'manifest':_0x5f03d9,'contract':_0x29058e,'appCode':_0x4d670c[_0x4b804e(0x1be)],'datasetCode':_0x3fe1d9,'runtimeDomain':getRuntimeDomain(),'inputPaths':[_0x1dc4b1[_0x4b804e(0x1b5)],_0x1dc4b1[_0x4b804e(0x1a1)]],'imageApi':{'upload':(_0x32d926,_0x3fe50c)=>uploadDatasetImportImage(_0x4d670c[_0x4b804e(0x1be)],_0x3fe1d9,_0x32d926,_0x3fe50c),'readback':(_0x5dff11,_0x510b06)=>readDatasetImportImage(_0x4d670c[_0x4b804e(0x1be)],_0x3fe1d9,_0x5dff11,_0x510b06)},'api':{'write':(_0x2bd853,_0x2eecef)=>createDatasetImportBatch(_0x4d670c[_0x4b804e(0x1be)],_0x3fe1d9,{'schemaFingerprint':_0x29058e[_0x4b804e(0x1c9)],'items':_0x2bd853,..._0x2eecef===undefined?{}:{'taskId':_0x2eecef}}),'readback':_0x3c6c4e=>readDatasetImportRows(_0x4d670c['appCode'],_0x3fe1d9,_0x3c6c4e),'readTask':_0x40b04a=>readDatasetImportTaskRows(_0x4d670c[_0x4b804e(0x1be)],_0x3fe1d9,_0x40b04a)}});return{'ok':!![],'data':_0x18477e,'message':'Imported\x20and\x20verified\x20'+_0x18477e[_0x4b804e(0x19b)]+'\x20records.'};})};
|