@lovrabet/lovrabet-cli 2.3.5-beta.2 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.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.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a13_0x136abe=a13_0x2191;(function(_0x3f99c1,_0x20584c){const _0x2b6210=a13_0x2191,_0x55468e=_0x3f99c1();while(!![]){try{const _0x552580=-parseInt(_0x2b6210(0xeb))/0x1+parseInt(_0x2b6210(0x102))/0x2+parseInt(_0x2b6210(0x10a))/0x3+-parseInt(_0x2b6210(0xd0))/0x4*(parseInt(_0x2b6210(0x11e))/0x5)+parseInt(_0x2b6210(0xd9))/0x6*(-parseInt(_0x2b6210(0xe7))/0x7)+-parseInt(_0x2b6210(0xe4))/0x8*(-parseInt(_0x2b6210(0x11c))/0x9)+-parseInt(_0x2b6210(0x120))/0xa*(-parseInt(_0x2b6210(0xe6))/0xb);if(_0x552580===_0x20584c)break;else _0x55468e['push'](_0x55468e['shift']());}catch(_0x1d7b47){_0x55468e['push'](_0x55468e['shift']());}}}(a13_0x28de,0xec5da));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_0x2191(_0x962a6c,_0x12efed){_0x962a6c=_0x962a6c-0xc9;const _0x28de1d=a13_0x28de();let _0x219122=_0x28de1d[_0x962a6c];return _0x219122;}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';function a13_0x28de(){const _0x5831a4=['Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','scope','AccessKey\x20(ak_xxx...)','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','trim','Then\x20verify\x20with:\x20','access-key','envName','1461808uXRABA','push','22wCCEAr','7UkfcSx','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','userCenterDisplayName','417904lFnfbN','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','AccessKey\x20saved\x20to\x20','Auth\x20mode:\x20','check','\x20Verify:\x20','validation','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','\x20(via\x20','production','\x20config','\x20auth\x20status','project\x20config','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20config.','Missing\x20accessKey.','Status:\x20valid','accessKey','join','stdout','expired','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','2367132KyHVJG','Show\x20current\x20authentication\x20status','success','Clear\x20the\x20AccessKey\x20from\x20config','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','AccessKey\x20cleared\x20from\x20','read','global-default','1283235kDbRwE','cancelled','newConfigFileName','\x20Current\x20env:\x20','isTTY','auth','bool','ACCESS_KEY','AccessKey:\x20','global','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','nonInteractive','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Option\x20B:\x20apps\x20config\x20(','info','Option\x20C:\x20environment\x20variable','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','authRequired','9CRSRCO','access_key','150OHZszC','yes','14370520HatBAD','\x20doctor','Save\x20the\x20AccessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20the\x20project\x20file)','env','daily','test','Tip:\x20you\x20can\x20also\x20run:','\x20\x20export\x20','code','boolean','str','204244hDjkgR','write','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','status','`auth\x20login`\x20does\x20not\x20support\x20--yes.','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','project','Read\x20from\x20global\x20config\x20(default)','development','10501518OtOmJx','Clear\x20from\x20global\x20config\x20(default)','Shorthand\x20for\x20--access-key'];a13_0x28de=function(){return _0x5831a4;};return a13_0x28de();}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(_0x1d201f=USER_ACCESS_KEY_CREATE_URL){const _0x43a27b=a13_0x2191;writeCliSideChannelLine(_0x43a27b(0x101)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+_0x1d201f+'\x0a'),writeCliSideChannelLine(_0x43a27b(0xcb)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x43a27b(0xec));}function buildAccessKeySetupGuide(_0x20fb1d=USER_ACCESS_KEY_CREATE_URL){const _0x4af645=a13_0x2191;return[_0x4af645(0x101)+PRODUCT_CONFIG[_0x4af645(0xea)]+':',_0x20fb1d,_0x4af645(0xed)+CLI_BIN_NAME+_0x4af645(0x114)][_0x4af645(0xfe)]('\x0a');}function canPromptForAccessKey(_0x32cf7e){const _0x1c5f55=a13_0x2191;return!_0x32cf7e[_0x1c5f55(0x115)]&&process['stdin'][_0x1c5f55(0x10e)]!==![]&&process[_0x1c5f55(0xff)][_0x1c5f55(0x10e)]!==![];}function resolveAuthScopeFlags(_0x25831c){const _0x2b3d40=a13_0x2191;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x25831c[_0x2b3d40(0x110)](_0x2b3d40(0x113)),'explicitProject':_0x25831c['bool'](_0x2b3d40(0xd6)),'policy':_0x2b3d40(0x109)}));}async function resolveAuthWriteInput(_0x2ee5a8){const _0x235f55=a13_0x2191;let _0xa8873a=(_0x2ee5a8[_0x235f55(0xcf)](_0x235f55(0xe2))||_0x2ee5a8['str']('ak')||'')[_0x235f55(0xe0)]();const _0x262da8=(_0x2ee5a8[_0x235f55(0xcf)]('env')||'')[_0x235f55(0xe0)](),_0x40ea28=''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'];if(!_0xa8873a&&canPromptForAccessKey(_0x2ee5a8))try{showAccessKeyCreateHint(_0x40ea28),_0xa8873a=await promptAccessKey('');}catch(_0x76d974){if(isAbortPrompt(_0x76d974))throw CliErrors[_0x235f55(0x10b)]();throw _0x76d974;}if(!_0xa8873a)throw CliErrors['validation'](_0x235f55(0xfb),buildAccessKeySetupGuide(_0x40ea28));if(!ACCESS_KEY_PATTERN[_0x235f55(0xca)](_0xa8873a))throw CliErrors[_0x235f55(0xf2)]('Invalid\x20accessKey\x20format.',_0x235f55(0x106));if(!_0x262da8)return{'accessKey':_0xa8873a};const _0x422a96=normalizeEnv(_0x262da8);return{'accessKey':_0xa8873a,'env':isDaily(_0x422a96)?_0x235f55(0xc9):isDev(_0x422a96)?_0x235f55(0xd8):_0x235f55(0xf5)};}export const authDefinitions=[{'service':a13_0x136abe(0x10f),'command':'login','description':a13_0x136abe(0x122),'risk':a13_0x136abe(0xd1),'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':'access-key','type':'string','description':a13_0x136abe(0xde)},{'name':'ak','type':'string','description':a13_0x136abe(0xdb)},{'name':a13_0x136abe(0x113),'type':a13_0x136abe(0xce),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a13_0x136abe(0xd6),'type':a13_0x136abe(0xce),'description':a13_0x136abe(0xdc),'default':![]}],async 'execute'(_0x3d4272){const _0x3e42b9=a13_0x136abe;if(_0x3d4272['bool'](_0x3e42b9(0x11f)))throw CliErrors[_0x3e42b9(0xf2)](_0x3e42b9(0xd4),'Use\x20`'+CLI_BIN_NAME+_0x3e42b9(0x11a)+CLI_BIN_NAME+_0x3e42b9(0xdf));const _0x26671b=(_0x3d4272[_0x3e42b9(0xcf)]('access-key')||_0x3d4272[_0x3e42b9(0xcf)]('ak')||'')[_0x3e42b9(0xe0)]();if(!_0x26671b&&_0x3d4272[_0x3e42b9(0x115)])return{'ok':!![],'message':buildAccessKeySetupGuide(''+getUserDomain()+PRODUCT_CONFIG['accessKeyCreatePath'])};const _0x44ec4d=await resolveAuthWriteInput(_0x3d4272),_0x1b59c5=resolveAuthScopeFlags(_0x3d4272),_0xbf927f=readScopedConfig(_0x1b59c5);_0xbf927f['accessKey']=_0x44ec4d['accessKey'];_0x44ec4d[_0x3e42b9(0x123)]&&(_0xbf927f[_0x3e42b9(0x123)]=_0x44ec4d[_0x3e42b9(0x123)]);writeScopedConfig(_0xbf927f,_0x1b59c5);const _0x1bd604=_0x1b59c5[_0x3e42b9(0x113)]?_0x3e42b9(0x113):_0x3e42b9(0xd6),_0x4b2e42=_0xbf927f[_0x3e42b9(0x123)]?_0x3e42b9(0x10d)+_0xbf927f['env']+'.':'';return{'ok':!![],'message':_0x3e42b9(0xee)+_0x1bd604+'\x20config.'+_0x4b2e42+_0x3e42b9(0xf1)+CLI_BIN_NAME+_0x3e42b9(0xf7)};}},{'service':a13_0x136abe(0x10f),'command':'logout','description':a13_0x136abe(0x105),'risk':a13_0x136abe(0xd1),'confirmationDescription':'Removes\x20the\x20AccessKey\x20from\x20the\x20selected\x20Lovrabet\x20config.\x20Commands\x20that\x20need\x20that\x20key\x20will\x20require\x20login\x20again.','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x136abe(0x113),'type':a13_0x136abe(0xce),'description':a13_0x136abe(0xda),'default':!![]},{'name':'project','type':a13_0x136abe(0xce),'description':a13_0x136abe(0xf9),'default':![]}],async 'execute'(_0x1a2526){const _0x3321c8=a13_0x136abe,_0x16f4a1=resolveAuthScopeFlags(_0x1a2526),_0x3db293=readScopedConfig(_0x16f4a1),_0x4a8d9a=!!_0x3db293[_0x3321c8(0xfd)];delete _0x3db293['accessKey'],writeScopedConfig(_0x3db293,_0x16f4a1);const _0x39c562=_0x16f4a1[_0x3321c8(0x113)]?_0x3321c8(0x113):_0x3321c8(0xd6);if(_0x4a8d9a)return{'ok':!![],'message':_0x3321c8(0x107)+_0x39c562+_0x3321c8(0xfa)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x39c562+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a13_0x136abe(0x10f),'command':a13_0x136abe(0xd3),'description':a13_0x136abe(0x103),'risk':a13_0x136abe(0x108),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a13_0x136abe(0x113),'type':a13_0x136abe(0xce),'description':a13_0x136abe(0xd7),'default':!![]},{'name':'project','type':a13_0x136abe(0xce),'description':a13_0x136abe(0x116),'default':![]},{'name':a13_0x136abe(0xf0),'type':a13_0x136abe(0xce),'description':a13_0x136abe(0xf3),'default':![]}],async 'execute'(_0x4eb215){const _0x4feacb=a13_0x136abe,_0x11dcc9=resolveAuthScopeFlags(_0x4eb215),_0x4485ed=readScopedConfig(_0x11dcc9),_0x51c3b5=productEnvName(_0x4feacb(0x111)),_0x116c7c=productEnv(_0x4feacb(0x111))||undefined,_0x4955ca=_0x4485ed[_0x4feacb(0xfd)]||undefined,_0xe5d503=_0x116c7c||_0x4955ca,_0x1c04bd=_0x116c7c?_0x51c3b5+'\x20env\x20var':_0x4955ca?(_0x11dcc9[_0x4feacb(0x113)]?_0x4feacb(0x113):_0x4feacb(0xd6))+_0x4feacb(0xf6):null,_0x32c82e=['Auth\x20mode:\x20'+AUTH_MODE['ClientAk']];if(_0xe5d503){const _0xf6168f=maskCliAccessKey(_0xe5d503);_0x32c82e[_0x4feacb(0xe5)](_0x4feacb(0x112)+_0xf6168f+(_0x1c04bd?_0x4feacb(0xf4)+_0x1c04bd+')':'')),_0x32c82e[_0x4feacb(0xe5)](_0x4feacb(0xfc));}if(!_0xe5d503){_0x32c82e[_0x4feacb(0xe5)](''),_0x32c82e[_0x4feacb(0xe5)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x32c82e[_0x4feacb(0xe5)](''),_0x32c82e[_0x4feacb(0xe5)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x4feacb(0xd2)),_0x32c82e[_0x4feacb(0xe5)](''),_0x32c82e['push'](_0x4feacb(0x117)+PRODUCT_CONFIG[_0x4feacb(0x10c)]+')'),_0x32c82e[_0x4feacb(0xe5)](_0x4feacb(0xd5)),_0x32c82e[_0x4feacb(0xe5)](''),_0x32c82e['push'](_0x4feacb(0x119)),_0x32c82e[_0x4feacb(0xe5)](_0x4feacb(0xcc)+_0x51c3b5+'=ak_xxx'),_0x32c82e[_0x4feacb(0xe5)](''),_0x32c82e[_0x4feacb(0xe5)](_0x4feacb(0xe1)+CLI_BIN_NAME+_0x4feacb(0xf7)),_0x32c82e['push'](_0x4feacb(0xe9)+CLI_BIN_NAME+_0x4feacb(0x121));if(_0x4eb215[_0x4feacb(0x110)](_0x4feacb(0xf0))){const _0x1d452e=readStoredDeviceCode();if(_0x1d452e&&!isStoredDeviceCodeExpired(_0x1d452e)){const _0x2e8acd=getUserDomain(),_0x6a4836=await fetchDeviceToken(_0x2e8acd,_0x1d452e[_0x4feacb(0xcd)]);if(_0x6a4836['status']===_0x4feacb(0x104)&&_0x6a4836[_0x4feacb(0x11d)]){const _0x4b48d8={'global':_0x1d452e[_0x4feacb(0xdd)]===_0x4feacb(0x113)},_0x5e2709=readScopedConfig(_0x4b48d8);_0x5e2709[_0x4feacb(0xfd)]=_0x6a4836[_0x4feacb(0x11d)],writeScopedConfig(_0x5e2709,_0x4b48d8),deleteStoredDeviceCode();const _0x41946d=_0x6a4836['access_key'],_0x3bb73a=maskCliAccessKey(_0x41946d),_0x2c3bee=_0x1d452e[_0x4feacb(0xdd)]===_0x4feacb(0x113)?'global\x20config':_0x4feacb(0xf8);return{'ok':!![],'message':[_0x4feacb(0xef)+AUTH_MODE['ClientAk'],_0x4feacb(0x112)+_0x3bb73a+_0x4feacb(0xf4)+_0x2c3bee+')',_0x4feacb(0xfc)][_0x4feacb(0xfe)]('\x0a')};}_0x6a4836[_0x4feacb(0xd3)]===_0x4feacb(0x100)&&deleteStoredDeviceCode();throw CliErrors[_0x4feacb(0x11b)]('Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.');}throw CliErrors['authRequired'](_0x32c82e[_0x4feacb(0xfe)]('\x0a'));}}return{'ok':!![],'message':_0x32c82e[_0x4feacb(0xfe)]('\x0a')};}},{'service':'auth','command':a13_0x136abe(0x118),'description':a13_0x136abe(0xe8),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x486a75){const _0x16c928=a13_0x136abe,_0x29ddaf=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x29ddaf,'meta':{'env':_0x486a75[_0x16c928(0xe3)]??_0x16c928(0xf5)}}};}},authDeviceDefinition];
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x40c5(_0x1ced21,_0x2e3eaa){_0x1ced21=_0x1ced21-0x111;const _0xb8a36c=a14_0xb8a3();let _0x40c5e8=_0xb8a36c[_0x1ced21];return _0x40c5e8;}(function(_0x57a7bf,_0x57a7fa){const _0x48d8fc=a14_0x40c5,_0x5bc5f3=_0x57a7bf();while(!![]){try{const _0x3b3ce0=-parseInt(_0x48d8fc(0x11b))/0x1+-parseInt(_0x48d8fc(0x114))/0x2*(-parseInt(_0x48d8fc(0x122))/0x3)+-parseInt(_0x48d8fc(0x11d))/0x4*(parseInt(_0x48d8fc(0x121))/0x5)+-parseInt(_0x48d8fc(0x123))/0x6*(parseInt(_0x48d8fc(0x116))/0x7)+-parseInt(_0x48d8fc(0x11f))/0x8+-parseInt(_0x48d8fc(0x118))/0x9*(parseInt(_0x48d8fc(0x112))/0xa)+parseInt(_0x48d8fc(0x11c))/0xb;if(_0x3b3ce0===_0x57a7fa)break;else _0x5bc5f3['push'](_0x5bc5f3['shift']());}catch(_0x201581){_0x5bc5f3['push'](_0x5bc5f3['shift']());}}}(a14_0xb8a3,0xde9f3));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x47d86a=a14_0x40c5;super(_0x47d86a(0x124)),this[_0x47d86a(0x127)]=_0x47d86a(0x11e);}}function createSafeRl(){const _0x2adc04=createInterface({'input':process['stdin'],'output':process['stdout']});let _0x1077f0;const _0x33a2bf=new Promise((_0x308c02,_0x5f42cc)=>{const _0x12b476=a14_0x40c5;_0x1077f0=()=>{const _0x1f79a6=a14_0x40c5;_0x1077f0&&(_0x2adc04[_0x1f79a6(0x126)](_0x1f79a6(0x11a),_0x1077f0),_0x1077f0=undefined);try{_0x2adc04[_0x1f79a6(0x115)]();}catch{}_0x5f42cc(new AbortPrompt());},_0x2adc04['once'](_0x12b476(0x11a),_0x1077f0);}),_0x5ae997=()=>{const _0x73b0ad=a14_0x40c5;_0x1077f0&&(_0x2adc04[_0x73b0ad(0x126)](_0x73b0ad(0x11a),_0x1077f0),_0x1077f0=undefined);try{_0x2adc04[_0x73b0ad(0x115)]();}catch{}};return{'rl':_0x2adc04,'abortPromise':_0x33a2bf,'disposeSuccess':_0x5ae997};}export async function promptAccessKey(_0x4a2c6d=''){const _0x33ec81=a14_0x40c5,{rl:_0x1d8afb,abortPromise:_0x2ccb2c,disposeSuccess:_0x267c0f}=createSafeRl(),_0x2b811e=new Promise(_0x3e4663=>{const _0x4e06d4=a14_0x40c5,_0x47a12c=_0x4a2c6d?_0x4e06d4(0x125)+_0x4a2c6d+_0x4e06d4(0x111):_0x4e06d4(0x120);_0x1d8afb[_0x4e06d4(0x119)](_0x47a12c,_0x456572=>{const _0x2cc860=_0x4e06d4;_0x267c0f(),_0x3e4663(_0x456572[_0x2cc860(0x117)]()||_0x4a2c6d);});});return Promise[_0x33ec81(0x113)]([_0x2b811e,_0x2ccb2c]);}function a14_0xb8a3(){const _0x3f633a=['1704165FLeTdA','48643892rSfeuK','4NgvFvk','AbortPrompt','7208368xDvwAW','AccessKey\x20(paste\x20ak_...):\x20','2837635gOCvRI','5226dwlfMc','4866aTtYPe','User\x20aborted\x20prompt','AccessKey\x20(','removeListener','name','):\x20','1513910oyYdAL','race','1006nYRyTs','close','9170thmQxW','trim','9UVwwMN','question','SIGINT'];a14_0xb8a3=function(){return _0x3f633a;};return a14_0xb8a3();}export function isAbortPrompt(_0x329360){return _0x329360 instanceof Error&&_0x329360['name']==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a15_0x2aec(){const _0x46c097=['850980aaQglv','detail','(none)','3847452wanMNz','34967gxJFGy','gmtModified','Backend\x20Function\x20name','name','bff','755XUCVoh','functionName','Get\x20a\x20Backend\x20Function\x20endpoint\x20contract\x20by\x20function\x20name','69FKVuXS','18230JNJiAP','31770DZRAyO','2630928TEVCYd','str','appCode','7421805MluWUc'];a15_0x2aec=function(){return _0x46c097;};return a15_0x2aec();}const a15_0x2cf222=a15_0x3341;(function(_0x1542d3,_0x295c49){const _0x59ae45=a15_0x3341,_0x2f9a8e=_0x1542d3();while(!![]){try{const _0x2f6a22=-parseInt(_0x59ae45(0x9c))/0x1+parseInt(_0x59ae45(0xa5))/0x2*(parseInt(_0x59ae45(0xa4))/0x3)+parseInt(_0x59ae45(0x98))/0x4+parseInt(_0x59ae45(0xa1))/0x5*(-parseInt(_0x59ae45(0x93))/0x6)+parseInt(_0x59ae45(0x9b))/0x7+-parseInt(_0x59ae45(0x94))/0x8+parseInt(_0x59ae45(0x97))/0x9;if(_0x2f6a22===_0x295c49)break;else _0x2f9a8e['push'](_0x2f9a8e['shift']());}catch(_0xb58ff2){_0x2f9a8e['push'](_0x2f9a8e['shift']());}}}(a15_0x2aec,0x9a9cd));function a15_0x3341(_0x5e9de2,_0x311c0){_0x5e9de2=_0x5e9de2-0x93;const _0x2aece0=a15_0x2aec();let _0x334126=_0x2aece0[_0x5e9de2];return _0x334126;}import{getBffEndpointContract}from'../../core/api-client.js';import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a15_0x2cf222(0xa0),'command':a15_0x2cf222(0x99),'description':a15_0x2cf222(0xa3),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a15_0x2cf222(0x9e)}],async 'execute'(_0xac698b){const _0x2db802=a15_0x2cf222,_0x51310b=await getBffEndpointContract(_0xac698b[_0x2db802(0x96)],_0xac698b[_0x2db802(0x95)](_0x2db802(0x9f)));return{'ok':!![],'data':{'appCode':_0x51310b[_0x2db802(0x96)],'functionName':_0x51310b[_0x2db802(0xa2)],'description':_0x51310b['description']||_0x2db802(0x9a),'version':_0x51310b['version'],'gmtModified':_0x51310b[_0x2db802(0x9d)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x2ce079=a16_0x3e86;(function(_0x2f3300,_0x5c80d7){const _0xee04cd=a16_0x3e86,_0x22ba16=_0x2f3300();while(!![]){try{const _0x4e535b=parseInt(_0xee04cd(0x93))/0x1*(parseInt(_0xee04cd(0x8f))/0x2)+parseInt(_0xee04cd(0x92))/0x3+parseInt(_0xee04cd(0x9f))/0x4+-parseInt(_0xee04cd(0x9d))/0x5*(parseInt(_0xee04cd(0x94))/0x6)+parseInt(_0xee04cd(0x90))/0x7+-parseInt(_0xee04cd(0x9a))/0x8*(parseInt(_0xee04cd(0x9b))/0x9)+-parseInt(_0xee04cd(0x95))/0xa;if(_0x4e535b===_0x5c80d7)break;else _0x22ba16['push'](_0x22ba16['shift']());}catch(_0x1f7b53){_0x22ba16['push'](_0x22ba16['shift']());}}}(a16_0x2f07,0x8a35e));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a16_0x3e86(_0x5565f8,_0x7a858){_0x5565f8=_0x5565f8-0x8f;const _0x2f07c0=a16_0x2f07();let _0x3e8635=_0x2f07c0[_0x5565f8];return _0x3e8635;}function a16_0x2f07(){const _0x9c6de4=['1110vLRJUP','6916380oSjxWq','bff','params','read','Backend\x20Function\x20executed\x20in\x20','6990416OytOGc','9FSFpPL','exec','5945AcJAPb','str','4282052gZyMmI','now','6kNizzl','5120850FbMfbL','Backend\x20Function\x20name\x20to\x20execute','326769yXZHIC','146843jftyVV'];a16_0x2f07=function(){return _0x9c6de4;};return a16_0x2f07();}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a16_0x2ce079(0x96),'command':a16_0x2ce079(0x9c),'description':'Execute\x20a\x20Backend\x20Function\x20script\x20by\x20function\x20name','risk':a16_0x2ce079(0x98),'flags':[{...NAME_FLAG,'required':!![],'description':a16_0x2ce079(0x91)},PARAMS_FLAG],async 'execute'(_0x17a78d){const _0x165c78=a16_0x2ce079,_0xd4d565=parseJsonParams(_0x17a78d[_0x165c78(0x9e)](_0x165c78(0x97))),_0x85eddf=Date[_0x165c78(0xa0)](),_0x532d5b=await executeSdkBff(_0x17a78d[_0x165c78(0x9e)]('name'),_0xd4d565),_0x44027f=Date['now']()-_0x85eddf;return{'ok':!![],'data':{'result':_0x532d5b,'elapsed':_0x44027f},'message':_0x165c78(0x99)+_0x44027f+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21ce64,_0x37be2f){const _0x5575a0=a17_0x1e0d,_0x11723d=_0x21ce64();while(!![]){try{const _0x45c5f9=parseInt(_0x5575a0(0x145))/0x1+parseInt(_0x5575a0(0x149))/0x2+-parseInt(_0x5575a0(0x146))/0x3*(parseInt(_0x5575a0(0x147))/0x4)+parseInt(_0x5575a0(0x144))/0x5+parseInt(_0x5575a0(0x14a))/0x6*(parseInt(_0x5575a0(0x14b))/0x7)+parseInt(_0x5575a0(0x143))/0x8+-parseInt(_0x5575a0(0x148))/0x9;if(_0x45c5f9===_0x37be2f)break;else _0x11723d['push'](_0x11723d['shift']());}catch(_0x237b4c){_0x11723d['push'](_0x11723d['shift']());}}}(a17_0x79cd,0x39c93));function a17_0x79cd(){const _0x48c850=['3uuqxKn','1876468yBVOBM','3142611UdCrxD','8804ZePcoG','97896AcEwCH','42jmmjtb','868776nQkXAG','2293455BJAoZw','385401aurATv'];a17_0x79cd=function(){return _0x48c850;};return a17_0x79cd();}import{bffDetail}from'../../commands/bff/detail.js';function a17_0x1e0d(_0x1ca677,_0x2d855c){_0x1ca677=_0x1ca677-0x143;const _0x79cd28=a17_0x79cd();let _0x1e0dbc=_0x79cd28[_0x1ca677];return _0x1e0dbc;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a18_0x354268=a18_0x5f2d;(function(_0x40b4a3,_0xe382b2){const _0x5a2edb=a18_0x5f2d,_0x3220c0=_0x40b4a3();while(!![]){try{const _0x2a23f0=parseInt(_0x5a2edb(0xe4))/0x1+-parseInt(_0x5a2edb(0xf0))/0x2+-parseInt(_0x5a2edb(0xf9))/0x3*(-parseInt(_0x5a2edb(0xe7))/0x4)+-parseInt(_0x5a2edb(0xf8))/0x5*(-parseInt(_0x5a2edb(0xe6))/0x6)+parseInt(_0x5a2edb(0xf3))/0x7+-parseInt(_0x5a2edb(0xeb))/0x8*(-parseInt(_0x5a2edb(0xf6))/0x9)+-parseInt(_0x5a2edb(0xe9))/0xa;if(_0x2a23f0===_0xe382b2)break;else _0x3220c0['push'](_0x3220c0['shift']());}catch(_0x188a65){_0x3220c0['push'](_0x3220c0['shift']());}}}(a18_0x52af,0x92948));import{CliErrors}from'../../errors.js';function a18_0x5f2d(_0x30c109,_0x1bd026){_0x30c109=_0x30c109-0xde;const _0x52af19=a18_0x52af();let _0x5f2d4a=_0x52af19[_0x30c109];return _0x5f2d4a;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a18_0x52af(){const _0x8c7633=['323404JLwKyI','pipe','1464nsNUzL','28oLNMgl','setLogPath','9365330mYJWYu','skillVersion','21120gEYDxI','inherit','changed','error','installedPath','1015410ATZybJ','apiError','nonInteractive','5735905FCAsNJ','code','repairCommand','1026PKgkEF','cli-skill','1160EKaArb','233247MpPBzU','CLI\x20Built-in\x20Skill\x20','INSTALL_FAILED','log','install','info','Built-in\x20Skill\x20install\x20failed\x20[',']:\x20'];a18_0x52af=function(){return _0x8c7633;};return a18_0x52af();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a18_0x354268(0xf7),'command':a18_0x354268(0xe0),'description':'Install\x20the\x20built-in\x20CLI\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4cca99){const _0x1c08ef=a18_0x354268;logger[_0x1c08ef(0xe8)](process['cwd']()),logger[_0x1c08ef(0xe1)]('cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20npm\x20package.');const _0x4ff61a=installBuiltinSkill({'stdio':_0x4cca99[_0x1c08ef(0xf2)]?_0x1c08ef(0xe5):_0x1c08ef(0xec)});if(!_0x4ff61a['ok'])throw CliErrors[_0x1c08ef(0xf1)](_0x1c08ef(0xe2)+(_0x4ff61a[_0x1c08ef(0xf4)]||_0x1c08ef(0xde))+_0x1c08ef(0xe3)+(_0x4ff61a[_0x1c08ef(0xee)]||'unknown'),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x4ff61a[_0x1c08ef(0xf5)]);const _0x57cef4=_0x4ff61a['installedPath']?'\x20at\x20'+_0x4ff61a[_0x1c08ef(0xef)]:'';return console[_0x1c08ef(0xdf)](_0x4ff61a[_0x1c08ef(0xed)]?_0x1c08ef(0xfa)+_0x4ff61a[_0x1c08ef(0xea)]+'\x20installed'+_0x57cef4:_0x1c08ef(0xfa)+_0x4ff61a[_0x1c08ef(0xea)]+'\x20is\x20already\x20current'+_0x57cef4),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52e69f,_0x3d6fbd){const _0x407112=a19_0x4d59,_0x319551=_0x52e69f();while(!![]){try{const _0x26d0b4=-parseInt(_0x407112(0x1f4))/0x1*(parseInt(_0x407112(0x1f8))/0x2)+parseInt(_0x407112(0x1fb))/0x3*(parseInt(_0x407112(0x1f1))/0x4)+parseInt(_0x407112(0x1fa))/0x5*(parseInt(_0x407112(0x1e6))/0x6)+-parseInt(_0x407112(0x1e7))/0x7*(parseInt(_0x407112(0x1f9))/0x8)+-parseInt(_0x407112(0x1f3))/0x9*(parseInt(_0x407112(0x1f0))/0xa)+parseInt(_0x407112(0x1e8))/0xb+parseInt(_0x407112(0x1f2))/0xc;if(_0x26d0b4===_0x3d6fbd)break;else _0x319551['push'](_0x319551['shift']());}catch(_0x76604a){_0x319551['push'](_0x319551['shift']());}}}(a19_0x5cdd,0x1a267));import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a19_0x5cdd(){const _0x1759c2=['newConfigFileName','10380Iezhhs','1540cOoVeo','1059476VCLkNw','global','Not\x20inside\x20a\x20project\x20(no\x20','global-default','project-or-global-explicit','Add\x20--global\x20to\x20write\x20to\x20~/','Use\x20only\x20one\x20config\x20scope\x20flag.','\x20first.','10QLxOtg','2816EjIkdJ','139452tYELNK','318753cAvSCG','23Ymencj','project','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','inProject','11814QKrUjR','5168ABzpYR','470nlTReb','639cjrzTg','validation'];a19_0x5cdd=function(){return _0x1759c2;};return a19_0x5cdd();}export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,CLI_PROTECTED_CONFIG_KEYS,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export function resolveConfigScope(_0x40999c){const _0x4eec7f=a19_0x4d59,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x191f47}=_0x40999c;if(explicitGlobal&&explicitProject)throw CliErrors[_0x4eec7f(0x1e4)](_0x4eec7f(0x1f6),_0x4eec7f(0x1ee));if(explicitGlobal)return _0x4eec7f(0x1e9);if(explicitProject)return _0x4eec7f(0x1f5);switch(_0x191f47){case _0x4eec7f(0x1eb):return _0x4eec7f(0x1e9);case _0x4eec7f(0x1ec):if(!(_0x40999c[_0x4eec7f(0x1f7)]??isInProject()))throw CliErrors[_0x4eec7f(0x1e4)](_0x4eec7f(0x1ea)+PRODUCT_CONFIG[_0x4eec7f(0x1e5)]+'\x20found).',_0x4eec7f(0x1ed)+PRODUCT_CONFIG[_0x4eec7f(0x1e5)]+',\x20or\x20create\x20a\x20project-local\x20'+PRODUCT_CONFIG[_0x4eec7f(0x1e5)]+_0x4eec7f(0x1ef));return _0x4eec7f(0x1f5);}}function a19_0x4d59(_0xda0c7e,_0x499cc3){_0xda0c7e=_0xda0c7e-0x1e4;const _0x5cdd97=a19_0x5cdd();let _0x4d59c9=_0x5cdd97[_0xda0c7e];return _0x4d59c9;}export function toScopeFlags(_0x50e22a){const _0x31759c=a19_0x4d59;return{'global':_0x50e22a===_0x31759c(0x1e9)};}export function formatScopeLabel(_0x184c36){const _0x4d431a=a19_0x4d59;return _0x184c36===_0x4d431a(0x1e9)?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2cefc8,_0x53b4f4){const _0x26f095=a20_0x291b,_0x4dda29=_0x2cefc8();while(!![]){try{const _0x3b3c8a=-parseInt(_0x26f095(0x1e5))/0x1+parseInt(_0x26f095(0x1eb))/0x2*(parseInt(_0x26f095(0x1e3))/0x3)+parseInt(_0x26f095(0x1e6))/0x4+parseInt(_0x26f095(0x1d7))/0x5+-parseInt(_0x26f095(0x1de))/0x6+-parseInt(_0x26f095(0x1e0))/0x7+-parseInt(_0x26f095(0x1e7))/0x8*(-parseInt(_0x26f095(0x1ee))/0x9);if(_0x3b3c8a===_0x53b4f4)break;else _0x4dda29['push'](_0x4dda29['shift']());}catch(_0x6f56c8){_0x4dda29['push'](_0x4dda29['shift']());}}}(a20_0x3330,0xd3010));function a20_0x3330(){const _0x5e5344=['length','str','1277455YcmJBq','flag','validation','\x20is\x20allowed,\x20found:\x20','Flags\x20','Exactly\x20one\x20of\x20','filter','10238322ZwUSng','\x20is\x20required\x20for\x20`','5777261SWJcWP',',\x20got\x20\x22','join','563106wzxRMZ','Provide\x20one\x20of:\x20','1038822ndmLxo','3651388EfyTsZ','16hdrVNK','Remove\x20all\x20but\x20one.','Use\x20only\x20one\x20of:\x20','map','4lJOfOX',':\x20expected\x20','At\x20least\x20one\x20of\x20','13009779uaBMqs','Invalid\x20--'];a20_0x3330=function(){return _0x5e5344;};return a20_0x3330();}import{CliErrors}from'../../errors.js';function isSet(_0x542ea9,_0x49c948){const _0x622962=a20_0x291b,_0xdad85f=_0x542ea9[_0x622962(0x1d8)](_0x49c948);return _0xdad85f!==undefined&&_0xdad85f!==''&&_0xdad85f!==![]&&_0xdad85f!==0x0;}function fmtNames(_0x44e8e3){const _0x41390d=a20_0x291b;return _0x44e8e3[_0x41390d(0x1ea)](_0x40ee77=>'--'+_0x40ee77)[_0x41390d(0x1e2)](',\x20');}export function requireOneOf(_0x29c102,_0x4c0640,_0x369a2e){const _0x5e7c6b=a20_0x291b,_0x35b37b=_0x4c0640[_0x5e7c6b(0x1dd)](_0x338d1b=>isSet(_0x29c102,_0x338d1b));if(_0x35b37b[_0x5e7c6b(0x1d5)]!==0x1)throw CliErrors[_0x5e7c6b(0x1d9)](_0x35b37b['length']===0x0?_0x5e7c6b(0x1dc)+fmtNames(_0x4c0640)+_0x5e7c6b(0x1df)+_0x369a2e+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x4c0640)+_0x5e7c6b(0x1da)+fmtNames(_0x35b37b)+'.',_0x35b37b['length']===0x0?_0x5e7c6b(0x1e4)+fmtNames(_0x4c0640):_0x5e7c6b(0x1e8));}export function requireAnyOf(_0x5943a6,_0x1953ad,_0xde5a83){const _0x291738=a20_0x291b;if(!_0x1953ad['some'](_0x14fe22=>isSet(_0x5943a6,_0x14fe22)))throw CliErrors[_0x291738(0x1d9)](_0x291738(0x1ed)+fmtNames(_0x1953ad)+_0x291738(0x1df)+_0xde5a83+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x1953ad));}function a20_0x291b(_0x2ba160,_0x4d75ad){_0x2ba160=_0x2ba160-0x1d5;const _0x3330b4=a20_0x3330();let _0x291b98=_0x3330b4[_0x2ba160];return _0x291b98;}export function mutuallyExclusive(_0x55f7f1,_0x1d659b,_0x597de9){const _0x499237=a20_0x291b,_0x2843d4=_0x1d659b[_0x499237(0x1dd)](_0x4c1bf9=>isSet(_0x55f7f1,_0x4c1bf9));if(_0x2843d4['length']>0x1)throw CliErrors[_0x499237(0x1d9)](_0x499237(0x1db)+fmtNames(_0x2843d4)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x597de9+'`.',_0x499237(0x1e9)+fmtNames(_0x1d659b));}export function validatePattern(_0x28f4d8,_0x417469,_0x23fb84,_0x214491){const _0x55409b=a20_0x291b,_0x1720ab=_0x28f4d8[_0x55409b(0x1d6)](_0x417469);if(_0x1720ab&&!_0x23fb84['test'](_0x1720ab))throw CliErrors[_0x55409b(0x1d9)](_0x55409b(0x1ef)+_0x417469+_0x55409b(0x1ec)+_0x214491+_0x55409b(0x1e1)+_0x1720ab+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a21_0x50d691=a21_0x2472;(function(_0x3b61a7,_0xc109b1){const _0x1defd8=a21_0x2472,_0x3d2dfa=_0x3b61a7();while(!![]){try{const _0xf25c13=-parseInt(_0x1defd8(0x1ef))/0x1*(parseInt(_0x1defd8(0x1f3))/0x2)+parseInt(_0x1defd8(0x1fa))/0x3*(-parseInt(_0x1defd8(0x1e6))/0x4)+-parseInt(_0x1defd8(0x1eb))/0x5*(parseInt(_0x1defd8(0x1e4))/0x6)+-parseInt(_0x1defd8(0x1f7))/0x7*(parseInt(_0x1defd8(0x1f8))/0x8)+parseInt(_0x1defd8(0x1e8))/0x9*(parseInt(_0x1defd8(0x1ed))/0xa)+parseInt(_0x1defd8(0x1f2))/0xb+parseInt(_0x1defd8(0x1f9))/0xc*(parseInt(_0x1defd8(0x1fc))/0xd);if(_0xf25c13===_0xc109b1)break;else _0x3d2dfa['push'](_0x3d2dfa['shift']());}catch(_0x4b26e4){_0x3d2dfa['push'](_0x3d2dfa['shift']());}}}(a21_0x1842,0x1e97b));export const GLOBAL_SCOPE_FLAG={'name':a21_0x50d691(0x1f5),'type':a21_0x50d691(0x1fd),'default':![],'description':a21_0x50d691(0x1e7)};export const CODE_FLAG={'name':'code','type':a21_0x50d691(0x1f0),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a21_0x50d691(0x1ec)}};export const SQLCODE_FLAG={'name':a21_0x50d691(0x1f1),'type':a21_0x50d691(0x1f0),'required':!![],'description':a21_0x50d691(0x1f4),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a21_0x50d691(0x1ee)}};export const VERBOSE_FLAG={'name':a21_0x50d691(0x1ea),'type':a21_0x50d691(0x1fd),'description':a21_0x50d691(0x1e9)};function a21_0x1842(){const _0x4a1c3c=['2LDmpVT','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','global','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','111552yvmkBW','112peOITc','1361076yoYUtC','2265Zufcxh','params','26JWDWaz','boolean','Resource\x20name\x20for\x20lookup','number','800598tlDcQW','name','284lXYhCC','Write\x20to\x20the\x20global\x20configuration','1838709omzaMx','Return\x20full\x20raw\x20response\x20object','verbose','5JjQmqv','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','10VggZqL','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','30999HJtcTI','string','sqlcode','1488311ybiLXX'];a21_0x1842=function(){return _0x4a1c3c;};return a21_0x1842();}export const PARAMS_FLAG={'name':a21_0x50d691(0x1fb),'type':a21_0x50d691(0x1f0),'description':a21_0x50d691(0x1f6)};export const NAME_FLAG={'name':a21_0x50d691(0x1e5),'type':'string','description':a21_0x50d691(0x1fe)};function a21_0x2472(_0x24fd15,_0x3620a7){_0x24fd15=_0x24fd15-0x1e4;const _0x18425e=a21_0x1842();let _0x2472de=_0x18425e[_0x24fd15];return _0x2472de;}export const ID_FLAG={'name':'id','type':a21_0x50d691(0x1ff),'required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x993645,_0x23da8c){const _0x3e01b6=a22_0x22a4,_0x136463=_0x993645();while(!![]){try{const _0xf81558=parseInt(_0x3e01b6(0x189))/0x1+parseInt(_0x3e01b6(0x187))/0x2+-parseInt(_0x3e01b6(0x17d))/0x3+parseInt(_0x3e01b6(0x184))/0x4*(parseInt(_0x3e01b6(0x18b))/0x5)+parseInt(_0x3e01b6(0x17c))/0x6+-parseInt(_0x3e01b6(0x17f))/0x7*(parseInt(_0x3e01b6(0x180))/0x8)+-parseInt(_0x3e01b6(0x188))/0x9;if(_0xf81558===_0x23da8c)break;else _0x136463['push'](_0x136463['shift']());}catch(_0x31c662){_0x136463['push'](_0x136463['shift']());}}}(a22_0x595b,0x202ab));import{existsSync,statSync}from'node:fs';function a22_0x595b(){const _0x3abac6=['2292930wHeskm','106585kxJsdI','ceil','104045JqPRcp','\x20MB','toFixed','1391622PGZSIl','549300zDEosP','size','7fYQqeC','1701968shDLWO','File\x20not\x20found:\x20','trim','File\x20is\x20not\x20a\x20regular\x20file:\x20','36uCPjtR','validation','isFile','513136xqjHxP'];a22_0x595b=function(){return _0x3abac6;};return a22_0x595b();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a22_0x22a4(_0x18a1f8,_0x53caad){_0x18a1f8=_0x18a1f8-0x17a;const _0x595b7d=a22_0x595b();let _0x22a441=_0x595b7d[_0x18a1f8];return _0x22a441;}function formatBytes(_0x455265){const _0x362843=a22_0x22a4;if(_0x455265>=BYTES_PER_MB){const _0xf26fa6=Math[_0x362843(0x18a)](_0x455265/BYTES_PER_MB*0x64)/0x64;return _0xf26fa6[_0x362843(0x17b)](0x2)+_0x362843(0x17a);}return _0x455265+'\x20B';}export function requireRuntimeUploadFile(_0x366e02,_0x273961){const _0x219f27=a22_0x22a4,_0x2108be=_0x366e02[_0x219f27(0x182)]();if(!_0x2108be)throw CliErrors[_0x219f27(0x185)](_0x273961+'\x20path\x20is\x20required.');if(!existsSync(_0x2108be))throw CliErrors[_0x219f27(0x185)](_0x219f27(0x181)+_0x2108be);const _0x28f4e9=statSync(_0x2108be);if(!_0x28f4e9[_0x219f27(0x186)]())throw CliErrors[_0x219f27(0x185)](_0x219f27(0x183)+_0x2108be);if(_0x28f4e9[_0x219f27(0x17e)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x219f27(0x185)]('File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2108be+'\x20('+formatBytes(_0x28f4e9[_0x219f27(0x17e)])+')');return{'path':_0x2108be,'size':_0x28f4e9[_0x219f27(0x17e)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a23_0x2e252e=a23_0x2e23;(function(_0x2deccb,_0x198425){const _0xe1847f=a23_0x2e23,_0x10e8a7=_0x2deccb();while(!![]){try{const _0x57edf3=-parseInt(_0xe1847f(0x1a4))/0x1+-parseInt(_0xe1847f(0x1b9))/0x2*(-parseInt(_0xe1847f(0x1b1))/0x3)+-parseInt(_0xe1847f(0x197))/0x4+parseInt(_0xe1847f(0x1bc))/0x5*(-parseInt(_0xe1847f(0x193))/0x6)+-parseInt(_0xe1847f(0x1ba))/0x7+-parseInt(_0xe1847f(0x19a))/0x8*(parseInt(_0xe1847f(0x19c))/0x9)+parseInt(_0xe1847f(0x1d3))/0xa*(parseInt(_0xe1847f(0x1a6))/0xb);if(_0x57edf3===_0x198425)break;else _0x10e8a7['push'](_0x10e8a7['shift']());}catch(_0x473b86){_0x10e8a7['push'](_0x10e8a7['shift']());}}}(a23_0x4d48,0x937aa));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a23_0x4d48(){const _0x3f466f=['Value\x20to\x20assign','field','Set\x20a\x20configuration\x20value','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','args','trim','read','1646qXKgCw','1223894iaTJnV','Deleted\x20`','5TyFPtU','global','format','log','raw','pageSize','stringify','config','Missing\x20key\x20or\x20value.','isArray','\x22\x20is\x20not\x20settable.','Key\x20already\x20absent:\x20','Invalid\x20value\x20for\x20\x22','apps','get','Key\x20not\x20found:\x20','length','accessKey','(none)','pageSize\x20must\x20be\x20a\x20positive\x20number','set','Get\x20a\x20config\x20value','key','13605500uCLMpj','\x20\x20project:\x20','includes','Top-level\x20key\x20\x22','object','864570lNwpoc','Config\x20files:\x0a','locale','bool','2874344zGpOvw','write','\x20(global)','8JLoPRP','split','8107443tLANvP','\x20config\x20get\x20<key>','List\x20current\x20config','Settable\x20keys:\x20','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x20config\x20delete\x20<key>\x20[--global]','Deletes\x20a\x20Lovrabet\x20CLI\x20config\x20key.\x20Later\x20commands\x20will\x20fall\x20back\x20to\x20another\x20config\x20layer\x20or\x20the\x20default.','Invalid\x20locale\x20value.','1097967uQDKvd','Changes\x20Lovrabet\x20CLI\x20configuration.\x20Later\x20commands\x20may\x20use\x20a\x20different\x20app,\x20environment,\x20or\x20output\x20behavior.','22oaHebo','Missing\x20key\x20argument.','validation','value','Usage:\x20','delete','alias','../../context.js','\x20config\x20set\x20<key>\x20<value>\x20[--global]','\x20\x20global:\x20\x20','appcode','3351WMmuMt'];a23_0x4d48=function(){return _0x3f466f;};return a23_0x4d48();}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(_0x4239e2){const _0x4553cf=a23_0x2e23,_0x124b6b=_0x4239e2[_0x4553cf(0x19b)]('.');if(_0x124b6b[_0x4553cf(0x1cc)]!==0x3||_0x124b6b[0x0]!=='apps'||_0x124b6b[0x2]!==_0x4553cf(0x1b0))return undefined;const _0x399ba4=_0x124b6b[0x1]?.[_0x4553cf(0x1b7)]();return _0x399ba4?_0x399ba4:undefined;}function parseAliasDeleteKey(_0x5520a2){const _0x3be48b=a23_0x2e23,_0x3108e1=_0x5520a2[_0x3be48b(0x19b)]('.');if(_0x3108e1[_0x3be48b(0x1cc)]===0x2&&_0x3108e1[0x0]===_0x3be48b(0x1c9)){const _0x412cf2=_0x3108e1[0x1]?.[_0x3be48b(0x1b7)]();return _0x412cf2?{'alias':_0x412cf2}:undefined;}if(_0x3108e1[_0x3be48b(0x1cc)]===0x3&&_0x3108e1[0x0]===_0x3be48b(0x1c9)&&_0x3108e1[0x2]===_0x3be48b(0x1b0)){const _0x1c52ad=_0x3108e1[0x1]?.['trim']();return _0x1c52ad?{'alias':_0x1c52ad,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x106ebf,_0x43bf2e,_0xed89a8){const _0x2ae942=a23_0x2e23,_0x353375=_0x106ebf[_0x2ae942(0x1c9)]&&typeof _0x106ebf[_0x2ae942(0x1c9)]===_0x2ae942(0x192)&&!Array[_0x2ae942(0x1c5)](_0x106ebf[_0x2ae942(0x1c9)])?_0x106ebf[_0x2ae942(0x1c9)]:{},_0x3da7ea=_0x353375[_0x43bf2e]&&typeof _0x353375[_0x43bf2e]===_0x2ae942(0x192)&&!Array['isArray'](_0x353375[_0x43bf2e])?_0x353375[_0x43bf2e]:{};_0x3da7ea[_0x2ae942(0x1b0)]=_0xed89a8,_0x353375[_0x43bf2e]=_0x3da7ea,_0x106ebf[_0x2ae942(0x1c9)]=_0x353375;}function a23_0x2e23(_0x46935b,_0x3c6a09){_0x46935b=_0x46935b-0x191;const _0x4d48ba=a23_0x4d48();let _0x2e23f9=_0x4d48ba[_0x46935b];return _0x2e23f9;}function deleteLocalAppAlias(_0x2fb56c,_0x14e220){const _0x21bb2c=a23_0x2e23;if(!_0x2fb56c[_0x21bb2c(0x1c9)]||typeof _0x2fb56c[_0x21bb2c(0x1c9)]!==_0x21bb2c(0x192)||Array[_0x21bb2c(0x1c5)](_0x2fb56c[_0x21bb2c(0x1c9)]))return![];const _0x1394b1=_0x2fb56c['apps'],_0x225824=_0x1394b1[_0x14e220[_0x21bb2c(0x1ac)]];if(!_0x225824||typeof _0x225824!==_0x21bb2c(0x192)||Array[_0x21bb2c(0x1c5)](_0x225824))return![];if(!_0x14e220[_0x21bb2c(0x1b3)])return delete _0x1394b1[_0x14e220[_0x21bb2c(0x1ac)]],!![];if(!(_0x14e220[_0x21bb2c(0x1b3)]in _0x225824))return![];return delete _0x225824[_0x14e220[_0x21bb2c(0x1b3)]],Object['keys'](_0x225824)[_0x21bb2c(0x1cc)]===0x0&&delete _0x1394b1[_0x14e220[_0x21bb2c(0x1ac)]],!![];}const listDef={'service':a23_0x2e252e(0x1c3),'command':'list','description':a23_0x2e252e(0x19e),'risk':a23_0x2e252e(0x1b8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x360627){const _0x5b499a=a23_0x2e252e,{buildConfigFromFlags:_0x328329}=await import(_0x5b499a(0x1ad)),_0x49ed1=_0x328329({}),_0x335f5f=redactCliConfigCredentials(_0x49ed1[_0x5b499a(0x1c0)]),_0x3bd678=getProjectConfigPath(),_0xe15cb4=resolveWriteConfigPath(_0x5b499a(0x1bd));if(_0x360627[_0x5b499a(0x1be)]==='pretty')return{'ok':!![],'message':_0x5b499a(0x1a0)+(JSON[_0x5b499a(0x1c2)](_0x335f5f,null,0x2)+'\x0a\x0a')+_0x5b499a(0x194)+(_0x5b499a(0x1d4)+(_0x3bd678??_0x5b499a(0x1ce))+'\x0a')+(_0x5b499a(0x1af)+_0xe15cb4)};return{'ok':!![],'data':{'effective':_0x335f5f,'configFiles':{'project':_0x3bd678??null,'global':_0xe15cb4}}};}},getDef={'service':a23_0x2e252e(0x1c3),'command':a23_0x2e252e(0x1ca),'description':a23_0x2e252e(0x1d1),'risk':a23_0x2e252e(0x1b8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x251e1d){const _0x24e45b=a23_0x2e252e,_0x238eda=_0x251e1d[_0x24e45b(0x1b6)][0x0];if(!_0x238eda)throw CliErrors[_0x24e45b(0x1a8)](_0x24e45b(0x1a7),'Usage:\x20'+CLI_BIN_NAME+_0x24e45b(0x19d));const {buildConfigFromFlags:_0x4ef449}=await import(_0x24e45b(0x1ad)),{raw:_0xd592d0}=_0x4ef449({});if(_0x238eda[_0x24e45b(0x1d5)]('.')){const _0x5cab37=_0x238eda[_0x24e45b(0x19b)]('.');let _0x3493ac=_0xd592d0;for(const _0x4e7e3d of _0x5cab37){if(_0x3493ac==null||typeof _0x3493ac!==_0x24e45b(0x192))throw CliErrors[_0x24e45b(0x1a8)]('Key\x20not\x20found:\x20'+_0x238eda);_0x3493ac=_0x3493ac[_0x4e7e3d];}if(_0x3493ac===undefined)throw CliErrors[_0x24e45b(0x1a8)](_0x24e45b(0x1cb)+_0x238eda);const _0x3e86a1=redactCliConfigValue(_0x238eda,_0x3493ac);return console['log'](typeof _0x3e86a1===_0x24e45b(0x192)?JSON[_0x24e45b(0x1c2)](_0x3e86a1,null,0x2):String(_0x3e86a1)),{'ok':!![]};}const _0x5c0fb8=_0xd592d0[_0x238eda];if(_0x5c0fb8===undefined)throw CliErrors[_0x24e45b(0x1a8)](_0x24e45b(0x1cb)+_0x238eda);const _0x549b3a=redactCliConfigValue(_0x238eda,_0x5c0fb8);return console['log'](typeof _0x549b3a==='object'?JSON[_0x24e45b(0x1c2)](_0x549b3a,null,0x2):String(_0x549b3a)),{'ok':!![]};}},setDef={'service':a23_0x2e252e(0x1c3),'command':a23_0x2e252e(0x1d0),'description':a23_0x2e252e(0x1b4),'risk':a23_0x2e252e(0x198),'confirmationDescription':a23_0x2e252e(0x1a5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2e252e(0x1d2),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a23_0x2e252e(0x1a9),'description':a23_0x2e252e(0x1b2),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x423e1d){const _0x25c797=a23_0x2e252e,_0x40941b=_0x423e1d[_0x25c797(0x1b6)][0x0],_0x3adf72=_0x423e1d[_0x25c797(0x1b6)][0x1];if(!_0x40941b||_0x3adf72===undefined)throw CliErrors[_0x25c797(0x1a8)](_0x25c797(0x1c4),_0x25c797(0x1aa)+CLI_BIN_NAME+_0x25c797(0x1ae));if(ENUM_KEYS[_0x40941b]&&!ENUM_KEYS[_0x40941b][_0x25c797(0x1d5)](_0x3adf72))throw CliErrors[_0x25c797(0x1a8)](_0x25c797(0x1c8)+_0x40941b+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x40941b]['join'](',\x20'));if(isCliProtectedConfigKey(_0x40941b))throw CliErrors['validation']('\x22'+_0x40941b+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');if(_0x40941b===_0x25c797(0x1c1)){const _0x4959a8=Number(_0x3adf72);if(isNaN(_0x4959a8)||_0x4959a8<=0x0)throw CliErrors[_0x25c797(0x1a8)](_0x25c797(0x1cf));}const _0xf5469=resolveWriteScope({'explicitGlobal':_0x423e1d['bool']('global'),'policy':'project-or-global-explicit'}),_0x385c99=toScopeFlags(_0xf5469),_0x35ef25=readScopedConfig(_0x385c99),_0x38dc89=parseAliasAppcodeSetKey(_0x40941b);if(!_0x38dc89&&!isTopLevelConfigKey(_0x40941b))throw CliErrors['validation'](_0x25c797(0x191)+_0x40941b+_0x25c797(0x1c6),_0x25c797(0x19f)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');if(_0x38dc89)setLocalAppAlias(_0x35ef25,_0x38dc89,_0x3adf72);else{if(_0x40941b===_0x25c797(0x195)){const _0x421e83=normalizeLocale(_0x3adf72);if(!_0x421e83)throw CliErrors[_0x25c797(0x1a8)](_0x25c797(0x1a3),_0x25c797(0x1b5));_0x35ef25['locale']=_0x421e83;}else _0x35ef25[_0x40941b]=_0x40941b==='pageSize'?Number(_0x3adf72):DOMAIN_CONFIG_FIELDS[_0x25c797(0x1d5)](_0x40941b)?normalizeDomainOrigin(_0x40941b,_0x3adf72):_0x3adf72;}const _0x19a983=_0x40941b===_0x25c797(0x1cd)?maskCliAccessKey(_0x3adf72):!_0x38dc89&&_0x40941b===_0x25c797(0x195)?String(_0x35ef25[_0x25c797(0x195)]):_0x3adf72;return console[_0x25c797(0x1bf)]('Set\x20`'+_0x40941b+'`\x20=\x20\x22'+_0x19a983+'\x22'+(_0xf5469==='global'?'\x20(global)':'')),writeScopedConfig(_0x35ef25,_0x385c99),{'ok':!![]};}},deleteDef={'service':a23_0x2e252e(0x1c3),'command':a23_0x2e252e(0x1ab),'description':'Delete\x20a\x20configuration\x20value','risk':a23_0x2e252e(0x198),'confirmationDescription':a23_0x2e252e(0x1a2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a23_0x2e252e(0x1d2),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_SCOPE_FLAG],async 'execute'(_0x30c4a2){const _0x183df1=a23_0x2e252e,_0x5dcc23=_0x30c4a2[_0x183df1(0x1b6)][0x0];if(!_0x5dcc23)throw CliErrors[_0x183df1(0x1a8)](_0x183df1(0x1a7),_0x183df1(0x1aa)+CLI_BIN_NAME+_0x183df1(0x1a1));if(isCliProtectedConfigKey(_0x5dcc23))throw CliErrors['validation']('\x22'+_0x5dcc23+'\x22\x20is\x20protected\x20and\x20cannot\x20be\x20changed\x20via\x20config\x20commands.');const _0x3f42a1=resolveWriteScope({'explicitGlobal':_0x30c4a2[_0x183df1(0x196)](_0x183df1(0x1bd)),'policy':'project-or-global-explicit'}),_0x438908=toScopeFlags(_0x3f42a1),_0x24d768=readScopedConfig(_0x438908),_0x499dcb=parseAliasDeleteKey(_0x5dcc23);if(_0x499dcb){if(!deleteLocalAppAlias(_0x24d768,_0x499dcb))return console[_0x183df1(0x1bf)](_0x183df1(0x1c7)+_0x5dcc23+(_0x3f42a1===_0x183df1(0x1bd)?'\x20(global)':'')),{'ok':!![],'data':{'key':_0x5dcc23,'scope':_0x3f42a1,'changed':![]}};return console['log'](_0x183df1(0x1bb)+_0x5dcc23+'`'+(_0x3f42a1===_0x183df1(0x1bd)?'\x20(global)':'')),writeScopedConfig(_0x24d768,_0x438908),{'ok':!![],'data':{'key':_0x5dcc23,'scope':_0x3f42a1,'changed':!![]}};}if(_0x24d768[_0x5dcc23]===undefined)return console[_0x183df1(0x1bf)](_0x183df1(0x1c7)+_0x5dcc23+(_0x3f42a1===_0x183df1(0x1bd)?_0x183df1(0x199):'')),{'ok':!![],'data':{'key':_0x5dcc23,'scope':_0x3f42a1,'changed':![]}};return delete _0x24d768[_0x5dcc23],console[_0x183df1(0x1bf)](_0x183df1(0x1bb)+_0x5dcc23+'`'+(_0x3f42a1===_0x183df1(0x1bd)?_0x183df1(0x199):'')),writeScopedConfig(_0x24d768,_0x438908),{'ok':!![],'data':{'key':_0x5dcc23,'scope':_0x3f42a1,'changed':!![]}};}};export const configDefinitions=[configInitDefinition,listDef,getDef,setDef,deleteDef];
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a24_0x13ac(_0x1b6959,_0x3c66a8){_0x1b6959=_0x1b6959-0x171;const _0x23e249=a24_0x23e2();let _0x13ac75=_0x23e249[_0x1b6959];return _0x13ac75;}const a24_0x55d299=a24_0x13ac;(function(_0x333e03,_0x1563a5){const _0x56dad2=a24_0x13ac,_0x429530=_0x333e03();while(!![]){try{const _0xbe8250=parseInt(_0x56dad2(0x179))/0x1+parseInt(_0x56dad2(0x18d))/0x2*(parseInt(_0x56dad2(0x19e))/0x3)+parseInt(_0x56dad2(0x17b))/0x4*(-parseInt(_0x56dad2(0x1a4))/0x5)+parseInt(_0x56dad2(0x1a1))/0x6*(-parseInt(_0x56dad2(0x18e))/0x7)+parseInt(_0x56dad2(0x187))/0x8*(-parseInt(_0x56dad2(0x193))/0x9)+-parseInt(_0x56dad2(0x18b))/0xa+parseInt(_0x56dad2(0x188))/0xb;if(_0xbe8250===_0x1563a5)break;else _0x429530['push'](_0x429530['shift']());}catch(_0x43325a){_0x429530['push'](_0x429530['shift']());}}}(a24_0x23e2,0xe1bf9));import{select}from'@inquirer/prompts';import{CliErrors}from'../../errors.js';import{readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{DOMAIN_CONFIG_FIELDS,LEGACY_DOMAIN_CONFIG_FIELDS,resolveDomainConfigInput}from'../../config/domain-config.js';function a24_0x23e2(){const _0x4ae960=['499723LzGWPe','skill-domain','length','domain-config','api-domain','6664257dhWPfb','assign','Available\x20regions:\x20','Custom\x20Runtime\x20HTTPS\x20origin','Custom\x20KB\x20Service\x20HTTPS\x20origin','independent','runtime-domain','nonInteractive','region','cancelled','Updates\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domain\x20configuration.\x20AccessKey,\x20output\x20format,\x20and\x20app\x20bindings\x20stay\x20unchanged.','2136111pDnOcK','write','enterprise-v1','30AEhiOO','join','name','170iPahtO','string','Custom\x20SkillHub\x20HTTPS\x20origin','kb-service-domain','Region\x20\x22','str','Custom\x20platform\x20API\x20HTTPS\x20origin','user-domain','Official\x20Lovrabet\x20region:\x20','17656ATbmAw','validation','187548zwAibH','domains','Lovrabet\x20connection\x20configured\x20for\x20region:\x20','manifestDomains','routing','mode','ExitPromptError','config','init','map','Lovrabet\x20connection\x20configured\x20for\x20independent\x20deployment.\x20Domains:\x20','Select\x20Lovrabet\x20region','16huliqk','37298657EZHZay','keys','Initialize\x20the\x20global\x20Lovrabet\x20region\x20or\x20independent-deployment\x20Domains','4758030eFwugB','Choose\x20either\x20an\x20official\x20region\x20or\x20independent-deployment\x20Domains,\x20not\x20both.','4UhFIkR'];a24_0x23e2=function(){return _0x4ae960;};return a24_0x23e2();}import{ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL}from'../../generated/routing-contract.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES,isEnabledLovrabetRegion}from'../../constant/region.js';import{OFFICIAL_ROUTING_PROFILES}from'../../generated/official-routing.js';const domainFlags=[{'name':a24_0x55d299(0x191),'type':a24_0x55d299(0x171),'description':'Independent-deployment\x20Domain\x20JSON\x20file'},{'name':a24_0x55d299(0x177),'type':a24_0x55d299(0x171),'description':'Custom\x20User\x20HTTPS\x20origin'},{'name':a24_0x55d299(0x192),'type':'string','description':a24_0x55d299(0x176)},{'name':a24_0x55d299(0x199),'type':a24_0x55d299(0x171),'description':a24_0x55d299(0x196)},{'name':a24_0x55d299(0x18f),'type':a24_0x55d299(0x171),'description':a24_0x55d299(0x172)},{'name':a24_0x55d299(0x173),'type':a24_0x55d299(0x171),'description':a24_0x55d299(0x197)}];export const configInitFlags=[{'name':'region','type':a24_0x55d299(0x171),'description':a24_0x55d299(0x178)+ENABLED_LOVRABET_REGION_VALUES[a24_0x55d299(0x1a2)](',\x20'),'enum':[...ENABLED_LOVRABET_REGION_VALUES]},...domainFlags];async function resolveRegion(_0x80c116){const _0x475f36=a24_0x55d299,_0xb81915=_0x80c116['str'](_0x475f36(0x19b));if(_0xb81915){if(!isEnabledLovrabetRegion(_0xb81915))throw CliErrors[_0x475f36(0x17a)](_0x475f36(0x174)+_0xb81915+'\x22\x20is\x20not\x20currently\x20available.',_0x475f36(0x195)+ENABLED_LOVRABET_REGION_VALUES[_0x475f36(0x1a2)](',\x20'));return _0xb81915;}if(_0x80c116[_0x475f36(0x19a)])return DEFAULT_LOVRABET_REGION;try{return await select({'message':_0x475f36(0x186),'default':DEFAULT_LOVRABET_REGION,'choices':ENABLED_LOVRABET_REGION_VALUES[_0x475f36(0x184)](_0x3ba9e2=>({'name':OFFICIAL_ROUTING_PROFILES[_0x3ba9e2]['label']+'\x20('+_0x3ba9e2+')','value':_0x3ba9e2}))});}catch(_0x254a7c){if(_0x254a7c?.[_0x475f36(0x1a3)]===_0x475f36(0x181))throw CliErrors[_0x475f36(0x19c)]();throw _0x254a7c;}}export async function executeConfigInit(_0x205de2){const _0xa67643=a24_0x55d299,_0x2cb14f=resolveDomainConfigInput(_0x205de2),_0x39ad03=_0x2cb14f[_0xa67643(0x17c)],_0x57ebc1=Object[_0xa67643(0x189)](_0x39ad03)[_0xa67643(0x190)]>0x0;if(_0x57ebc1&&_0x205de2[_0xa67643(0x175)](_0xa67643(0x19b)))throw CliErrors[_0xa67643(0x17a)](_0xa67643(0x18c));const _0x1a7f8b={'global':!![]},_0x3a85ed=readScopedConfig(_0x1a7f8b);for(const _0x4968ae of DOMAIN_CONFIG_FIELDS)delete _0x3a85ed[_0x4968ae];for(const _0xa67d29 of LEGACY_DOMAIN_CONFIG_FIELDS)delete _0x3a85ed[_0xa67d29];delete _0x3a85ed[_0xa67643(0x17f)];let _0x304cc0=null;if(_0x57ebc1)delete _0x3a85ed[_0xa67643(0x19b)],_0x2cb14f[_0xa67643(0x180)]===_0xa67643(0x1a0)?_0x3a85ed[_0xa67643(0x17f)]={'protocol':ENTERPRISE_ROUTING_PROTOCOL,'kind':ENTERPRISE_ROUTING_KIND,'domains':_0x2cb14f[_0xa67643(0x17e)]}:Object[_0xa67643(0x194)](_0x3a85ed,_0x39ad03);else{_0x304cc0=await resolveRegion(_0x205de2);if(_0x304cc0===DEFAULT_LOVRABET_REGION)delete _0x3a85ed[_0xa67643(0x19b)];else _0x3a85ed[_0xa67643(0x19b)]=_0x304cc0;}return writeScopedConfig(_0x3a85ed,_0x1a7f8b),{'ok':!![],'message':_0x57ebc1?_0xa67643(0x185)+Object[_0xa67643(0x189)](_0x2cb14f['mode']===_0xa67643(0x1a0)?_0x2cb14f[_0xa67643(0x17e)]:_0x39ad03)[_0xa67643(0x1a2)](',\x20')+'.':_0xa67643(0x17d)+_0x304cc0+'.','data':{'mode':_0x57ebc1?_0xa67643(0x198):'official','protocol':_0x2cb14f[_0xa67643(0x180)]===_0xa67643(0x1a0)?ENTERPRISE_ROUTING_PROTOCOL:undefined,'region':_0x304cc0,'domains':_0x39ad03}};}export const configInitDefinition={'service':a24_0x55d299(0x182),'command':a24_0x55d299(0x183),'description':a24_0x55d299(0x18a),'risk':a24_0x55d299(0x19f),'confirmationDescription':a24_0x55d299(0x19d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':configInitFlags,'execute':executeConfigInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a25_0x44d3(_0xc8b519,_0x37c016){_0xc8b519=_0xc8b519-0x1d3;var _0x4a286a=a25_0x4a28();var _0x44d3b4=_0x4a286a[_0xc8b519];return _0x44d3b4;}(function(_0x2f8d44,_0x4e160f){var _0x21d10b=a25_0x44d3,_0x5701d9=_0x2f8d44();while(!![]){try{var _0x1eae7d=-parseInt(_0x21d10b(0x1dc))/0x1+-parseInt(_0x21d10b(0x1d8))/0x2*(parseInt(_0x21d10b(0x1d7))/0x3)+parseInt(_0x21d10b(0x1d6))/0x4+parseInt(_0x21d10b(0x1db))/0x5*(-parseInt(_0x21d10b(0x1d3))/0x6)+-parseInt(_0x21d10b(0x1d4))/0x7+-parseInt(_0x21d10b(0x1d5))/0x8+-parseInt(_0x21d10b(0x1da))/0x9*(-parseInt(_0x21d10b(0x1d9))/0xa);if(_0x1eae7d===_0x4e160f)break;else _0x5701d9['push'](_0x5701d9['shift']());}catch(_0x6e32ef){_0x5701d9['push'](_0x5701d9['shift']());}}}(a25_0x4a28,0xaecd1));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a25_0x4a28(){var _0x196b70=['7731612EjSARr','10080456fxhsTb','2447964ipdlqe','3989694ojIwaO','2IOZCmN','2013030ujEMTe','225WxcPZL','7970bYovAX','78460LRTLQI','4350xRfJzU'];a25_0x4a28=function(){return _0x196b70;};return a25_0x4a28();}export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isCliProtectedConfigKey,isTopLevelConfigKey,normalizeLocale,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a26_0x41d4cf=a26_0x4271;(function(_0x391ff1,_0x2f13c2){const _0x12821f=a26_0x4271,_0x224573=_0x391ff1();while(!![]){try{const _0x58f7fd=parseInt(_0x12821f(0x21b))/0x1*(parseInt(_0x12821f(0x219))/0x2)+parseInt(_0x12821f(0x220))/0x3+parseInt(_0x12821f(0x208))/0x4*(parseInt(_0x12821f(0x1f5))/0x5)+-parseInt(_0x12821f(0x229))/0x6*(-parseInt(_0x12821f(0x221))/0x7)+-parseInt(_0x12821f(0x1fc))/0x8+-parseInt(_0x12821f(0x21d))/0x9*(parseInt(_0x12821f(0x1fd))/0xa)+-parseInt(_0x12821f(0x212))/0xb;if(_0x58f7fd===_0x2f13c2)break;else _0x224573['push'](_0x224573['shift']());}catch(_0x26a17d){_0x224573['push'](_0x224573['shift']());}}}(a26_0x1a42,0xb4359));import{readFile,realpath}from'node:fs/promises';import{resolve}from'node:path';function a26_0x4271(_0x497980,_0x5652eb){_0x497980=_0x497980-0x1f4;const _0x1a4218=a26_0x1a42();let _0x42715c=_0x1a4218[_0x497980];return _0x42715c;}import{CODE_FLAG}from'../../commands/common/flags.js';function a26_0x1a42(){const _0x580f89=['\x20invalid\x20cells.\x20No\x20records\x20were\x20written.','Reconcile\x20imported\x20records\x20and\x20resume\x20the\x20exact\x20original\x20file,\x20target\x20and\x20mapping','.import-report.json','bool','resume','Excel\x20contains\x20','JSON\x20file\x20mapping\x20Excel\x20headers\x20to\x20dataset\x20field\x20codes','message','schemaFingerprint','POST','some','/import-batch','appCode','file','rows','invalid','Header\x20row\x20must\x20be\x20positive\x20and\x20batch\x20size\x20must\x20be\x20between\x201\x20and\x20500.','Mapping\x20file\x20must\x20contain\x20valid\x20JSON.','DB_TABLE\x20datasets\x20use\x20the\x20existing\x20batchCreate\x20operation;\x20import-excel\x20only\x20supports\x20METADATA\x20datasets.','--file\x20and\x20--mapping\x20are\x20required.','10UFDeRi','sheet','map','batch-size','\x20records.','Run\x20dataset\x20detail\x20to\x20confirm\x20the\x20source.\x20Only\x20DB_TABLE\x20has\x20the\x20documented\x20alternative\x20batchCreate\x20route;\x20do\x20not\x20guess\x20or\x20automatically\x20switch\x20APIs.','Creates\x20real\x20dataset\x20records\x20immediately.\x20Keep\x20the\x20checkpoint\x20to\x20reconcile\x20and\x20resume\x20interrupted\x20imports.','8677152rYtVfm','70gnbToN','schemaVersion','Dataset\x20source\x20is\x20missing\x20or\x20unsupported;\x20import-excel\x20requires\x20METADATA.','emptyRows','validation','rowNumber','write','string','batchSize','.\x20Validate\x20fields\x20and\x20confirmed\x20unique\x20business\x20keys,\x20convert\x20Excel\x20rows\x20to\x20JSON,\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20limits.\x20Preview\x20one\x20batch\x20with\x20lovrabet\x20data\x20batchCreate\x20--appcode\x20','Local\x20Excel\x20validation\x20only;\x20no\x20records\x20or\x20checkpoint\x20were\x20written.','2690228LIVboM','Local\x20XLSX\x20file\x20(maximum\x2020\x20MB)','str','/client/','Source,\x20mapping,\x20checkpoint\x20and\x20report\x20must\x20be\x20different\x20files.','warnings','mappingFile','Private\x20result\x20report\x20(default:\x20XLSX\x20path\x20plus\x20.import-report.json)','isArray','values','4915339GQMxQt','size','Private\x20checkpoint\x20file\x20(default:\x20XLSX\x20path\x20plus\x20.import-checkpoint.json)','errors','isInteger','mapping','report','394facCDa','max','6494nfuVcu','number','672561sqtWps','succeeded','toString','209016jnPYjG','203OnGJNm','header-row','checkpoint','length','parse','Excel\x20import\x20failed.','num','maxBatchSize','20406sEvauW','Maximum\x20records\x20per\x20request\x20(1..500)','Inspect\x20lovrabet\x20dataset\x20detail\x20--code\x20','Batch\x20size\x20exceeds\x20the\x20server\x20import\x20contract.','utf8','DB_TABLE'];a26_0x1a42=function(){return _0x580f89;};return a26_0x1a42();}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';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(_0x435929){const _0x1fdf52=a26_0x4271,_0x54d5fb=_0x435929[_0x1fdf52(0x20a)]('file'),_0x43b1d6=_0x435929['str'](_0x1fdf52(0x217));if(!_0x54d5fb||!_0x43b1d6)throw CliErrors[_0x1fdf52(0x201)](_0x1fdf52(0x1f4));const _0x32c212=_0x435929[_0x1fdf52(0x227)](_0x1fdf52(0x222),0x1),_0x4f7204=_0x435929[_0x1fdf52(0x227)]('batch-size',0x1f4);if(!Number[_0x1fdf52(0x216)](_0x32c212)||_0x32c212<0x1||!Number[_0x1fdf52(0x216)](_0x4f7204)||_0x4f7204<0x1||_0x4f7204>0x1f4)throw CliErrors[_0x1fdf52(0x201)](_0x1fdf52(0x23f));const _0x48ea60=resolve(_0x435929['str']('checkpoint')||_0x54d5fb+'.import-checkpoint.json'),_0x2f1335=resolve(_0x435929[_0x1fdf52(0x20a)]('report')||_0x54d5fb+_0x1fdf52(0x231)),_0x224eca=[resolve(_0x54d5fb),resolve(_0x43b1d6),_0x48ea60,_0x2f1335];if(new Set(_0x224eca)[_0x1fdf52(0x213)]!==_0x224eca[_0x1fdf52(0x224)])throw CliErrors['validation'](_0x1fdf52(0x20c));return{'file':resolve(_0x54d5fb),'mappingFile':resolve(_0x43b1d6),'headerRow':_0x32c212,'batchSize':_0x4f7204,'checkpoint':_0x48ea60,'report':_0x2f1335,'sheet':_0x435929[_0x1fdf52(0x20a)]('sheet')||undefined,'resume':_0x435929[_0x1fdf52(0x232)](_0x1fdf52(0x233))};}async function prepare(_0x21d9cf){const _0x18a040=a26_0x4271,_0x4def6c=input(_0x21d9cf),_0x1c80d9=_0x21d9cf[_0x18a040(0x20a)]('code');[_0x4def6c['file'],_0x4def6c[_0x18a040(0x20e)],_0x4def6c[_0x18a040(0x223)],_0x4def6c[_0x18a040(0x218)]]=await Promise['all']([realpath(_0x4def6c['file']),realpath(_0x4def6c[_0x18a040(0x20e)]),resolveImportOutputPath(_0x4def6c[_0x18a040(0x223)]),resolveImportOutputPath(_0x4def6c[_0x18a040(0x218)])]),assertImportPaths(_0x4def6c[_0x18a040(0x223)],_0x4def6c[_0x18a040(0x218)],[_0x4def6c[_0x18a040(0x23c)],_0x4def6c[_0x18a040(0x20e)]]);let _0x37c041;const _0x3a9787=await readFile(_0x4def6c[_0x18a040(0x20e)]);if(_0x3a9787[_0x18a040(0x224)]>0x400*0x400)throw CliErrors[_0x18a040(0x201)]('Mapping\x20file\x20exceeds\x201\x20MB.');try{_0x37c041=JSON[_0x18a040(0x225)](_0x3a9787[_0x18a040(0x21f)](_0x18a040(0x22d)));}catch{throw CliErrors[_0x18a040(0x201)](_0x18a040(0x240));}if(!_0x37c041||typeof _0x37c041!=='object'||Array[_0x18a040(0x210)](_0x37c041)||Object[_0x18a040(0x211)](_0x37c041)[_0x18a040(0x239)](_0x446e4f=>typeof _0x446e4f!==_0x18a040(0x204)))throw CliErrors['validation']('Mapping\x20must\x20be\x20an\x20object\x20from\x20Excel\x20headers\x20to\x20field\x20codes.');const _0x1af3d2=await getDatasetDetail(_0x1c80d9),_0x983746=assertDatasetImportTarget(_0x1af3d2,_0x21d9cf[_0x18a040(0x23b)],_0x1c80d9);if(_0x983746===_0x18a040(0x22e))throw CliErrors[_0x18a040(0x201)](_0x18a040(0x241),_0x18a040(0x22b)+_0x1c80d9+_0x18a040(0x206)+_0x21d9cf[_0x18a040(0x23b)]+'\x20--code\x20'+_0x1c80d9+'\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(_0x983746!=='METADATA')throw CliErrors[_0x18a040(0x201)](_0x18a040(0x1ff),_0x18a040(0x1fa));const _0x2bf489=await buildExcelManifest({..._0x4def6c,'mapping':_0x37c041,'fields':normalizeImportFields(_0x1af3d2)}),_0xf04f93=await getDatasetImportContract(_0x21d9cf[_0x18a040(0x23b)],_0x1c80d9);assertImportContract(_0xf04f93,_0x21d9cf['appCode'],_0x1c80d9);if(_0x4def6c[_0x18a040(0x205)]>_0xf04f93[_0x18a040(0x228)])throw CliErrors['validation'](_0x18a040(0x22c));return{'args':_0x4def6c,'manifest':_0x2bf489,'contract':_0xf04f93,'code':_0x1c80d9};}async function checked(_0x331b3e){const _0x576ea7=a26_0x4271;try{return await _0x331b3e();}catch(_0x51ccf5){if(_0x51ccf5 instanceof CliError)throw _0x51ccf5;throw CliErrors[_0x576ea7(0x201)](_0x51ccf5[_0x576ea7(0x236)]||_0x576ea7(0x226));}}export const dataImportExcel={'service':'data','command':'import-excel','risk':a26_0x41d4cf(0x203),'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':a26_0x41d4cf(0x1fb),'flags':[CODE_FLAG,{'name':a26_0x41d4cf(0x23c),'type':a26_0x41d4cf(0x204),'required':!![],'description':a26_0x41d4cf(0x209)},{'name':a26_0x41d4cf(0x217),'type':a26_0x41d4cf(0x204),'required':!![],'description':a26_0x41d4cf(0x235)},{'name':a26_0x41d4cf(0x1f6),'type':a26_0x41d4cf(0x204),'description':'Worksheet\x20name\x20or\x201-based\x20index\x20(default:\x20first\x20worksheet)'},{'name':a26_0x41d4cf(0x222),'type':a26_0x41d4cf(0x21c),'default':0x1,'description':'1-based\x20Excel\x20header\x20row'},{'name':a26_0x41d4cf(0x1f8),'type':a26_0x41d4cf(0x21c),'default':0x1f4,'description':a26_0x41d4cf(0x22a)},{'name':a26_0x41d4cf(0x223),'type':a26_0x41d4cf(0x204),'description':a26_0x41d4cf(0x214)},{'name':a26_0x41d4cf(0x218),'type':'string','description':a26_0x41d4cf(0x20f)},{'name':a26_0x41d4cf(0x233),'type':'boolean','description':a26_0x41d4cf(0x230)}],'validate':async _0x3649ef=>{input(_0x3649ef);},'dryRun':async _0x5b385a=>checked(async()=>{const _0x20c302=a26_0x41d4cf,{args:_0x37faf9,manifest:_0x13bbb8,contract:_0x309315,code:_0x3b17da}=await prepare(_0x5b385a),_0x36e6f4=new Set(_0x13bbb8[_0x20c302(0x215)][_0x20c302(0x1f7)](_0x1cb9b0=>_0x1cb9b0[_0x20c302(0x202)]))[_0x20c302(0x213)];return{'method':_0x20c302(0x238),'url':_0x20c302(0x20b)+encodeURIComponent(_0x5b385a['appCode'])+'/'+encodeURIComponent(_0x3b17da)+_0x20c302(0x23a),'description':_0x20c302(0x207),'body':{'schemaFingerprint':_0x309315['schemaFingerprint']},'validRows':Math[_0x20c302(0x21a)](0x0,_0x13bbb8[_0x20c302(0x23d)][_0x20c302(0x224)]-_0x36e6f4),'invalidRows':_0x36e6f4,'invalidCells':_0x13bbb8[_0x20c302(0x215)][_0x20c302(0x224)],'emptyRows':_0x13bbb8[_0x20c302(0x200)][_0x20c302(0x224)],'expectedBatches':previewImportBatchCount(_0x13bbb8,_0x309315,_0x37faf9[_0x20c302(0x205)]),'errors':_0x13bbb8[_0x20c302(0x215)],'warnings':_0x13bbb8[_0x20c302(0x20d)],'sheet':_0x13bbb8[_0x20c302(0x1f6)],'checkpoint':_0x37faf9[_0x20c302(0x223)],'report':_0x37faf9[_0x20c302(0x218)]};}),'execute':async _0x5c5d19=>checked(async()=>{const _0x269b49=a26_0x41d4cf,{args:_0x2ddf2a,manifest:_0xef8121,contract:_0x55ed34,code:_0x560a2c}=await prepare(_0x5c5d19);if(_0xef8121['errors']['length']){await saveImportJson(_0x2ddf2a[_0x269b49(0x218)],{'status':_0x269b49(0x23e),'sourceRows':_0xef8121[_0x269b49(0x23d)][_0x269b49(0x224)],'errors':_0xef8121[_0x269b49(0x215)],'emptyRows':_0xef8121[_0x269b49(0x200)],'warnings':_0xef8121[_0x269b49(0x20d)]});throw CliErrors[_0x269b49(0x201)](_0x269b49(0x234)+_0xef8121[_0x269b49(0x215)]['length']+_0x269b49(0x22f),'See\x20'+_0x2ddf2a[_0x269b49(0x218)]+'.');}const _0x5d1aa7=_0x55ed34[_0x269b49(0x1fe)]===0x2?runAutoIdExcelImport:runExcelImport,_0x96871f=await _0x5d1aa7({..._0x2ddf2a,'manifest':_0xef8121,'contract':_0x55ed34,'appCode':_0x5c5d19[_0x269b49(0x23b)],'datasetCode':_0x560a2c,'runtimeDomain':getRuntimeDomain(),'api':{'write':(_0x2aa635,_0x5d1a71)=>createDatasetImportBatch(_0x5c5d19[_0x269b49(0x23b)],_0x560a2c,{'schemaFingerprint':_0x55ed34[_0x269b49(0x237)],'items':_0x2aa635,..._0x5d1a71===undefined?{}:{'taskId':_0x5d1a71}}),'readback':_0xb9249f=>readDatasetImportRows(_0x5c5d19[_0x269b49(0x23b)],_0x560a2c,_0xb9249f),'readTask':_0x13c7d2=>readDatasetImportTaskRows(_0x5c5d19[_0x269b49(0x23b)],_0x560a2c,_0x13c7d2)}});return{'ok':!![],'data':_0x96871f,'message':'Imported\x20and\x20verified\x20'+_0x96871f[_0x269b49(0x21e)]+_0x269b49(0x1f9)};})};
|
|
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 +1 @@
|
|
|
1
|
-
function a27_0x5547(){const _0x386354=['\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','operation','read','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','update','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','5468136HPLFZe','\x20\x20AGGREGATE\x20TYPES','build','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','high-risk-write','data\x20','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','description','2999180nTJdDd','Filter\x20dataset\x20records\x20with\x20query\x20conditions','222YsspiR','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','filter','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','body','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','/api/{appCode}/','16SAQzIP','1512261VoSuJj','batchCreate','command','\x20\x20DATASET\x20BOUNDARY','str','660431jkoUPk','risk','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','Get\x20a\x20single\x20record\x20by\x20ID','Create\x20one\x20record\x20in\x20the\x20dataset','20zvUgKH','Update\x20an\x20existing\x20data\x20record','paramsRequired','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','dryRun','params','confirmationDescription','batch','now','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','join','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20EXAMPLES','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','278571IAYqEi','write','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20PAGINATION','POST','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20completed\x20in\x20','paramsHint','delete','aggregate','43526xUFUUo','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20on\x20dataset\x20','\x20\x20EXCEL\x20ROUTES','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','1325698fmkcjN','create','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','length','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','helpExtra','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','getOne'];a27_0x5547=function(){return _0x386354;};return a27_0x5547();}const a27_0x5e6a5e=a27_0x5680;(function(_0xf6bae2,_0x164d27){const _0x360317=a27_0x5680,_0x258388=_0xf6bae2();while(!![]){try{const _0x50087b=-parseInt(_0x360317(0x1ec))/0x1+-parseInt(_0x360317(0x220))/0x2+-parseInt(_0x360317(0x203))/0x3*(-parseInt(_0x360317(0x1e6))/0x4)+parseInt(_0x360317(0x1dc))/0x5+parseInt(_0x360317(0x1de))/0x6*(-parseInt(_0x360317(0x214))/0x7)+parseInt(_0x360317(0x1d3))/0x8+-parseInt(_0x360317(0x1e7))/0x9*(-parseInt(_0x360317(0x1f3))/0xa);if(_0x50087b===_0x164d27)break;else _0x258388['push'](_0x258388['shift']());}catch(_0x3f2435){_0x258388['push'](_0x258388['shift']());}}}(a27_0x5547,0x6acf5));import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';function a27_0x5680(_0x4f8be0,_0x49b85b){_0x4f8be0=_0x4f8be0-0x1c9;const _0x5547da=a27_0x5547();let _0x56806a=_0x5547da[_0x4f8be0];return _0x56806a;}import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':'filter','operation':a27_0x5e6a5e(0x1e1),'risk':a27_0x5e6a5e(0x1ca),'paramsRequired':![],'description':a27_0x5e6a5e(0x1dd),'paramsHint':a27_0x5e6a5e(0x208)+a27_0x5e6a5e(0x224),'helpExtra':[a27_0x5e6a5e(0x1d1),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}',a27_0x5e6a5e(0x206),a27_0x5e6a5e(0x205),a27_0x5e6a5e(0x1d0),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a27_0x5e6a5e(0x22d),a27_0x5e6a5e(0x21c),'\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}',a27_0x5e6a5e(0x209),'','\x20\x20LOGICAL\x20COMBINATORS',a27_0x5e6a5e(0x21b),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','',a27_0x5e6a5e(0x200),a27_0x5e6a5e(0x20a),a27_0x5e6a5e(0x1ef),a27_0x5e6a5e(0x1cc),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a27_0x5e6a5e(0x20c),a27_0x5e6a5e(0x1ff),'\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.',a27_0x5e6a5e(0x222),a27_0x5e6a5e(0x20f),'\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27',a27_0x5e6a5e(0x22a),a27_0x5e6a5e(0x202)]['join']('\x0a')},{'command':a27_0x5e6a5e(0x228),'operation':'getOne','risk':'read','paramsRequired':!![],'description':a27_0x5e6a5e(0x1f1),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0x5e6a5e(0x221),'operation':'create','risk':a27_0x5e6a5e(0x204),'paramsRequired':!![],'description':a27_0x5e6a5e(0x1f2),'confirmationDescription':'Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x5e6a5e(0x1e2)},{'command':'batchCreate','operation':a27_0x5e6a5e(0x1e8),'risk':a27_0x5e6a5e(0x204),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','helpExtra':[a27_0x5e6a5e(0x21e),a27_0x5e6a5e(0x1cf),'\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,',a27_0x5e6a5e(0x1da),a27_0x5e6a5e(0x22b),'\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.',a27_0x5e6a5e(0x207),a27_0x5e6a5e(0x219),'\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.',a27_0x5e6a5e(0x1df),a27_0x5e6a5e(0x229)][a27_0x5e6a5e(0x1fe)]('\x0a'),'confirmationDescription':a27_0x5e6a5e(0x215),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a27_0x5e6a5e(0x1cd),'operation':a27_0x5e6a5e(0x1cd),'risk':a27_0x5e6a5e(0x204),'paramsRequired':!![],'description':a27_0x5e6a5e(0x1f4),'confirmationDescription':a27_0x5e6a5e(0x1d9),'paramsHint':a27_0x5e6a5e(0x216)+'Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27'},{'command':a27_0x5e6a5e(0x212),'operation':a27_0x5e6a5e(0x212),'risk':a27_0x5e6a5e(0x1d7),'paramsRequired':!![],'description':a27_0x5e6a5e(0x21a),'confirmationDescription':a27_0x5e6a5e(0x21f),'paramsHint':a27_0x5e6a5e(0x1cb)},{'command':a27_0x5e6a5e(0x213),'operation':a27_0x5e6a5e(0x213),'risk':a27_0x5e6a5e(0x1ca),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a27_0x5e6a5e(0x1fd)+a27_0x5e6a5e(0x1e4),'helpExtra':[a27_0x5e6a5e(0x1d4),'\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}',a27_0x5e6a5e(0x1ee),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a27_0x5e6a5e(0x1fc),'',a27_0x5e6a5e(0x218),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a27_0x5e6a5e(0x217),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a27_0x5e6a5e(0x1ce),a27_0x5e6a5e(0x20b),'',a27_0x5e6a5e(0x227),a27_0x5e6a5e(0x1e0),'\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields',a27_0x5e6a5e(0x225),'',a27_0x5e6a5e(0x1ea),'\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only',a27_0x5e6a5e(0x1f6),a27_0x5e6a5e(0x20e),a27_0x5e6a5e(0x1f0),'',a27_0x5e6a5e(0x201),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a27_0x5e6a5e(0x1d6),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a27_0x5e6a5e(0x22c),'',a27_0x5e6a5e(0x1d2)][a27_0x5e6a5e(0x1fe)]('\x0a')}];function makeDataCommand(_0x103f82){const _0x560c3c=a27_0x5e6a5e,_0x132849=_0x560c3c(0x1d8)+_0x103f82[_0x560c3c(0x1e9)],_0x4917dd={'service':'data','command':_0x103f82[_0x560c3c(0x1e9)],'description':_0x103f82[_0x560c3c(0x1db)],'risk':_0x103f82[_0x560c3c(0x1ed)],..._0x103f82[_0x560c3c(0x1f9)]?{'confirmationDescription':_0x103f82['confirmationDescription']}:{},'helpExtra':_0x103f82[_0x560c3c(0x226)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x103f82[_0x560c3c(0x211)]}],'validate':async _0x5adada=>{const _0x4f9fd0=_0x560c3c;_0x103f82[_0x4f9fd0(0x1f5)]&&requireAnyOf(_0x5adada,[_0x4f9fd0(0x1f8)],_0x132849),_0x103f82[_0x4f9fd0(0x1c9)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5adada['str'](_0x4f9fd0(0x1f8)))),_0x103f82['operation']===_0x4f9fd0(0x1cd)&&parseUpdateIdsFromParams(parseJsonParams(_0x5adada[_0x4f9fd0(0x1eb)]('params'))??{});},async 'execute'(_0x13c5a9){const _0x58a909=_0x560c3c,_0x314c6f=_0x13c5a9[_0x58a909(0x1eb)]('code'),_0x1599fe=_0x103f82[_0x58a909(0x1c9)]===_0x58a909(0x1e8)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x13c5a9[_0x58a909(0x1eb)](_0x58a909(0x1f8)))):parseJsonParams(_0x13c5a9[_0x58a909(0x1eb)](_0x58a909(0x1f8)))??{},_0x83c92b=_0x103f82[_0x58a909(0x1c9)]===_0x58a909(0x1cd)?parseUpdateIdsFromParams(_0x1599fe):undefined,_0x3a27e6=_0x83c92b?normalizeUpdateParamsForRuntime(_0x1599fe,_0x83c92b):_0x1599fe,_0x2076db=Date[_0x58a909(0x1fb)](),_0x2e3aec=await executeData(_0x314c6f,_0x103f82[_0x58a909(0x1c9)],_0x3a27e6),_0x2e4046=Date[_0x58a909(0x1fb)]()-_0x2076db,_0x51b3fd=_0x83c92b&&_0x83c92b[_0x58a909(0x223)]>0x1?buildBatchUpdateResult(_0x83c92b,_0x2e3aec):_0x2e3aec;return{'ok':!![],'data':{'result':_0x51b3fd,'elapsed':_0x2e4046},'message':_0x58a909(0x1d8)+_0x103f82[_0x58a909(0x1e9)]+_0x58a909(0x210)+_0x2e4046+'ms'};}};return _0x103f82[_0x560c3c(0x1ed)]!==_0x560c3c(0x1ca)&&(_0x4917dd[_0x560c3c(0x1f7)]=async _0x2a7489=>{const _0x4fa3f5=_0x560c3c,_0x362677=_0x2a7489['str']('code'),_0x2e880f=_0x103f82[_0x4fa3f5(0x1c9)]===_0x4fa3f5(0x1e8)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2a7489[_0x4fa3f5(0x1eb)](_0x4fa3f5(0x1f8)))):parseJsonParams(_0x2a7489[_0x4fa3f5(0x1eb)]('params'))??{};let _0x7efc64=_0x2e880f;if(_0x103f82['operation']===_0x4fa3f5(0x1cd)){const _0x3c11f4=parseUpdateIdsFromParams(_0x2e880f);_0x7efc64=normalizeUpdateParamsForRuntime(_0x2e880f,_0x3c11f4);}return dryRun(_0x4fa3f5(0x20d),_0x4fa3f5(0x1e5)+_0x362677+'/'+_0x103f82[_0x4fa3f5(0x1c9)])[_0x4fa3f5(0x1e3)](_0x7efc64)[_0x4fa3f5(0x1db)]('Preview:\x20data\x20'+_0x103f82[_0x4fa3f5(0x1e9)]+_0x4fa3f5(0x21d)+_0x362677)[_0x4fa3f5(0x1d5)]();}),_0x4917dd;}export const dataDefinitions=[...specs['map'](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0xbd899c,_0x5c4e00){const _0x57ab4f=a27_0x5e6a5e;return{'operation':_0x57ab4f(0x1cd),'mode':_0x57ab4f(0x1fa),'ids':_0xbd899c,'total':_0xbd899c[_0x57ab4f(0x223)],'result':_0x5c4e00};}
|
|
1
|
+
function a27_0x1feb(){const _0x4a930a=['now','code','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','description','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','read','high-risk-write','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','data\x20','\x20on\x20dataset\x20','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','\x20\x20WHERE\x20OPERATORS','delete','operation','paramsHint','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','POST','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','write','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','aggregate','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','getOne','1317428Vmtmmt','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','7559388SHpjIr','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','12HwNyhC','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','update','paramsRequired','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','754930EsetgN','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','str','join','\x20\x20EXAMPLES','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','command','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20PAGINATION','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','dryRun','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','batchCreate','length','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20completed\x20in\x20','Create\x20one\x20record\x20in\x20the\x20dataset','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20PARAMS\x20STRUCTURE','filter','body','helpExtra','3568664hwHRvo','risk','batch','3776510atpQXG','1869710oXLXmc','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','Preview:\x20data\x20','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','1711530XOvHPA','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20AGGREGATE\x20TYPES','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20LOGICAL\x20COMBINATORS','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','params','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','data','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','8INlaqN','map'];a27_0x1feb=function(){return _0x4a930a;};return a27_0x1feb();}const a27_0x1a2f74=a27_0x587c;(function(_0x1ce8cf,_0x5c1309){const _0x56be66=a27_0x587c,_0x322667=_0x1ce8cf();while(!![]){try{const _0x25ca37=-parseInt(_0x56be66(0xe8))/0x1+-parseInt(_0x56be66(0x10f))/0x2+-parseInt(_0x56be66(0x116))/0x3+parseInt(_0x56be66(0x10b))/0x4+-parseInt(_0x56be66(0x10e))/0x5*(-parseInt(_0x56be66(0x14d))/0x6)+-parseInt(_0x56be66(0x147))/0x7+-parseInt(_0x56be66(0x126))/0x8*(-parseInt(_0x56be66(0x14a))/0x9);if(_0x25ca37===_0x5c1309)break;else _0x322667['push'](_0x322667['shift']());}catch(_0x3fceff){_0x322667['push'](_0x322667['shift']());}}}(a27_0x1feb,0xc1e5b));import{dataImportExcel}from'./import-excel.js';function a27_0x587c(_0x4663af,_0x2a876c){_0x4663af=_0x4663af-0xe6;const _0x1feb97=a27_0x1feb();let _0x587c97=_0x1feb97[_0x4663af];return _0x587c97;}import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x1a2f74(0x108),'operation':'filter','risk':a27_0x1a2f74(0x132),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a27_0x1a2f74(0x12c)+a27_0x1a2f74(0xf8),'helpExtra':[a27_0x1a2f74(0x139),a27_0x1a2f74(0x11f),'\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a27_0x1a2f74(0xf3),a27_0x1a2f74(0xef),a27_0x1a2f74(0x143),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a27_0x1a2f74(0x106),a27_0x1a2f74(0x14b),'\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}',a27_0x1a2f74(0x13d),'',a27_0x1a2f74(0x11d),'\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}',a27_0x1a2f74(0xed),'',a27_0x1a2f74(0x110),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a27_0x1a2f74(0x125),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a27_0x1a2f74(0x12e),a27_0x1a2f74(0xf4),'',a27_0x1a2f74(0xfa),'\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.',a27_0x1a2f74(0x123),a27_0x1a2f74(0xee),a27_0x1a2f74(0x140),a27_0x1a2f74(0x14e),'\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27',a27_0x1a2f74(0xf9)]['join']('\x0a')},{'command':'getOne','operation':a27_0x1a2f74(0x146),'risk':a27_0x1a2f74(0x132),'paramsRequired':!![],'description':a27_0x1a2f74(0xfc),'paramsHint':a27_0x1a2f74(0x100)},{'command':'create','operation':'create','risk':a27_0x1a2f74(0x141),'paramsRequired':!![],'description':a27_0x1a2f74(0x105),'confirmationDescription':a27_0x1a2f74(0x117),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':a27_0x1a2f74(0x101),'operation':a27_0x1a2f74(0x101),'risk':a27_0x1a2f74(0x141),'paramsRequired':!![],'description':a27_0x1a2f74(0x14c),'helpExtra':['\x20\x20EXCEL\x20ROUTES',a27_0x1a2f74(0x131),a27_0x1a2f74(0x112),a27_0x1a2f74(0xf1),a27_0x1a2f74(0x134),a27_0x1a2f74(0x113),'\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.',a27_0x1a2f74(0x11a),a27_0x1a2f74(0xf5),a27_0x1a2f74(0xfd)][a27_0x1a2f74(0xeb)]('\x0a'),'confirmationDescription':a27_0x1a2f74(0x11e),'paramsHint':a27_0x1a2f74(0x142)},{'command':a27_0x1a2f74(0x150),'operation':'update','risk':a27_0x1a2f74(0x141),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20data\x20record','confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x1a2f74(0x12b)+a27_0x1a2f74(0x12d)},{'command':a27_0x1a2f74(0x13a),'operation':'delete','risk':a27_0x1a2f74(0x133),'paramsRequired':!![],'description':a27_0x1a2f74(0x145),'confirmationDescription':a27_0x1a2f74(0x148),'paramsHint':a27_0x1a2f74(0x100)},{'command':a27_0x1a2f74(0x144),'operation':'aggregate','risk':a27_0x1a2f74(0x132),'paramsRequired':![],'description':a27_0x1a2f74(0x111),'paramsHint':a27_0x1a2f74(0x149)+a27_0x1a2f74(0xf2),'helpExtra':[a27_0x1a2f74(0x119),a27_0x1a2f74(0xff),a27_0x1a2f74(0xfb),a27_0x1a2f74(0x118),a27_0x1a2f74(0x14f),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}',a27_0x1a2f74(0x11c),a27_0x1a2f74(0x135),'',a27_0x1a2f74(0x107),a27_0x1a2f74(0x115),a27_0x1a2f74(0x121),a27_0x1a2f74(0xf6),a27_0x1a2f74(0xe7),a27_0x1a2f74(0x11b),a27_0x1a2f74(0xe9),'',a27_0x1a2f74(0x138),'\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields',a27_0x1a2f74(0xf0),'','\x20\x20DATASET\x20BOUNDARY',a27_0x1a2f74(0x103),a27_0x1a2f74(0x12a),a27_0x1a2f74(0x12f),'\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','',a27_0x1a2f74(0xec),a27_0x1a2f74(0x124),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','',a27_0x1a2f74(0x13e),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.']['join']('\x0a')}];function makeDataCommand(_0x2927a5){const _0x3c6e20=a27_0x1a2f74,_0x1bab85='data\x20'+_0x2927a5['command'],_0x4671bb={'service':_0x3c6e20(0x122),'command':_0x2927a5[_0x3c6e20(0xf7)],'description':_0x2927a5['description'],'risk':_0x2927a5[_0x3c6e20(0x10c)],..._0x2927a5['confirmationDescription']?{'confirmationDescription':_0x2927a5['confirmationDescription']}:{},'helpExtra':_0x2927a5[_0x3c6e20(0x10a)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x2927a5[_0x3c6e20(0x13c)]}],'validate':async _0x66ee84=>{const _0x44cae3=_0x3c6e20;_0x2927a5[_0x44cae3(0xe6)]&&requireAnyOf(_0x66ee84,[_0x44cae3(0x120)],_0x1bab85),_0x2927a5[_0x44cae3(0x13b)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x66ee84[_0x44cae3(0xea)](_0x44cae3(0x120)))),_0x2927a5[_0x44cae3(0x13b)]===_0x44cae3(0x150)&&parseUpdateIdsFromParams(parseJsonParams(_0x66ee84[_0x44cae3(0xea)](_0x44cae3(0x120)))??{});},async 'execute'(_0x4efb11){const _0x14d78e=_0x3c6e20,_0x4492e4=_0x4efb11[_0x14d78e(0xea)](_0x14d78e(0x129)),_0x3e1ed6=_0x2927a5[_0x14d78e(0x13b)]===_0x14d78e(0x101)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4efb11[_0x14d78e(0xea)]('params'))):parseJsonParams(_0x4efb11[_0x14d78e(0xea)](_0x14d78e(0x120)))??{},_0x2a5bb5=_0x2927a5[_0x14d78e(0x13b)]===_0x14d78e(0x150)?parseUpdateIdsFromParams(_0x3e1ed6):undefined,_0x5995b6=_0x2a5bb5?normalizeUpdateParamsForRuntime(_0x3e1ed6,_0x2a5bb5):_0x3e1ed6,_0x36f5be=Date[_0x14d78e(0x128)](),_0x43eb73=await executeData(_0x4492e4,_0x2927a5['operation'],_0x5995b6),_0x421f11=Date[_0x14d78e(0x128)]()-_0x36f5be,_0x1efdf8=_0x2a5bb5&&_0x2a5bb5[_0x14d78e(0x102)]>0x1?buildBatchUpdateResult(_0x2a5bb5,_0x43eb73):_0x43eb73;return{'ok':!![],'data':{'result':_0x1efdf8,'elapsed':_0x421f11},'message':_0x14d78e(0x136)+_0x2927a5[_0x14d78e(0xf7)]+_0x14d78e(0x104)+_0x421f11+'ms'};}};return _0x2927a5[_0x3c6e20(0x10c)]!==_0x3c6e20(0x132)&&(_0x4671bb[_0x3c6e20(0xfe)]=async _0x152e7e=>{const _0x341bbe=_0x3c6e20,_0x16a286=_0x152e7e[_0x341bbe(0xea)](_0x341bbe(0x129)),_0x52932d=_0x2927a5[_0x341bbe(0x13b)]===_0x341bbe(0x101)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x152e7e[_0x341bbe(0xea)]('params'))):parseJsonParams(_0x152e7e[_0x341bbe(0xea)](_0x341bbe(0x120)))??{};let _0x46fb24=_0x52932d;if(_0x2927a5[_0x341bbe(0x13b)]==='update'){const _0x21d9fb=parseUpdateIdsFromParams(_0x52932d);_0x46fb24=normalizeUpdateParamsForRuntime(_0x52932d,_0x21d9fb);}return dryRun(_0x341bbe(0x13f),'/api/{appCode}/'+_0x16a286+'/'+_0x2927a5[_0x341bbe(0x13b)])[_0x341bbe(0x109)](_0x46fb24)[_0x341bbe(0x130)](_0x341bbe(0x114)+_0x2927a5[_0x341bbe(0xf7)]+_0x341bbe(0x137)+_0x16a286)['build']();}),_0x4671bb;}export const dataDefinitions=[...specs[a27_0x1a2f74(0x127)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0x5f03ba,_0x29a10e){const _0x5dbc66=a27_0x1a2f74;return{'operation':_0x5dbc66(0x150),'mode':_0x5dbc66(0x10d),'ids':_0x5f03ba,'total':_0x5f03ba[_0x5dbc66(0x102)],'result':_0x29a10e};}
|