@lovrabet/lovrabet-cli 2.2.5 → 2.2.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- 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/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.d.ts +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.d.ts +2 -2
- 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.d.ts +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/shared.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/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.d.ts +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/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +3 -3
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.d.ts +3 -3
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.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.d.ts +3 -3
- 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/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/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/apply-jq-filter.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/platform.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 +2 -2
- package/skills/lovrabet/SKILL.md +16 -15
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +2 -2
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +7 -5
- package/skills/lovrabet/references/dataset-discovery-workflow.md +2 -2
- package/skills/lovrabet/references/lovrabet-app-config.md +1 -1
- package/skills/lovrabet/references/lovrabet-bff-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-file-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +35 -7
- package/skills/lovrabet.manifest.json +3 -3
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a83_0x1fddaa=a83_0x45ef;(function(_0x29234f,_0xa4a9fe){const _0x3f0de8=a83_0x45ef,_0x147c42=_0x29234f();while(!![]){try{const _0x1da7a8=-parseInt(_0x3f0de8(0xf2))/0x1*(parseInt(_0x3f0de8(0xd9))/0x2)+-parseInt(_0x3f0de8(0x107))/0x3+parseInt(_0x3f0de8(0xe9))/0x4*(-parseInt(_0x3f0de8(0x116))/0x5)+-parseInt(_0x3f0de8(0x115))/0x6*(parseInt(_0x3f0de8(0x11c))/0x7)+-parseInt(_0x3f0de8(0xfa))/0x8*(-parseInt(_0x3f0de8(0x100))/0x9)+parseInt(_0x3f0de8(0x105))/0xa*(-parseInt(_0x3f0de8(0x101))/0xb)+-parseInt(_0x3f0de8(0xc8))/0xc*(-parseInt(_0x3f0de8(0x109))/0xd);if(_0x1da7a8===_0xa4a9fe)break;else _0x147c42['push'](_0x147c42['shift']());}catch(_0x3adb70){_0x147c42['push'](_0x147c42['shift']());}}}(a83_0x3c58,0xde893));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a83_0x47b59c from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a83_0x1fddaa(0xfb),'type':a83_0x1fddaa(0xcc),'description':a83_0x1fddaa(0xe1),'default':![]},{'name':a83_0x1fddaa(0xc9),'type':a83_0x1fddaa(0xcc),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':a83_0x1fddaa(0xe8),'description':a83_0x1fddaa(0x103)}];function getRequestedVersion(_0x1ae41f){const _0x3edc99=a83_0x1fddaa,_0x3f67cc=_0x1ae41f['str'](_0x3edc99(0xf1))[_0x3edc99(0xdb)]();if(_0x3f67cc)return _0x3f67cc;return String(_0x1ae41f[_0x3edc99(0x102)]?.[0x0]??'')[_0x3edc99(0xdb)]();}async function validateUpdateFlags(_0x58ad6f){const _0x94f9dc=a83_0x1fddaa,_0x1ebeef=getRequestedVersion(_0x58ad6f),_0x2dfd42=[_0x58ad6f[_0x94f9dc(0xd6)](_0x94f9dc(0xfb))?_0x94f9dc(0xfb):'',_0x58ad6f[_0x94f9dc(0xd6)]('beta')?_0x94f9dc(0xc9):'',_0x1ebeef?_0x94f9dc(0xf1):'']['filter'](Boolean);if(_0x2dfd42[_0x94f9dc(0xd2)]>0x1)throw CliErrors[_0x94f9dc(0xf7)](_0x94f9dc(0x118),_0x94f9dc(0x11d));if(_0x1ebeef&&!a83_0x47b59c[_0x94f9dc(0xfc)](_0x1ebeef))throw CliErrors[_0x94f9dc(0xf7)](_0x94f9dc(0xf3)+_0x1ebeef,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x16bf03=a83_0x1fddaa;try{const _0x277147=NPM_REGISTRY_BASE_URL+_0x16bf03(0xd3)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x16bf03(0xe5),_0x1096fc=await fetch(_0x277147,{'signal':AbortSignal[_0x16bf03(0xf6)](0x2710)});if(!_0x1096fc['ok'])return null;const _0x165060=await _0x1096fc[_0x16bf03(0xed)]();if(!_0x165060||typeof _0x165060!==_0x16bf03(0x113))return null;return Object[_0x16bf03(0x10a)](Object['entries'](_0x165060)[_0x16bf03(0xd5)](([,_0x2c41b7])=>typeof _0x2c41b7===_0x16bf03(0xe8)&&_0x2c41b7['trim']())[_0x16bf03(0xcd)](([_0x171523,_0x489b8d])=>[_0x171523,String(_0x489b8d)[_0x16bf03(0xdb)]()]));}catch{return null;}}async function resolveTargetVersion(_0x3341c3){const _0x49acd8=a83_0x1fddaa,_0x4edccd=getRequestedVersion(_0x3341c3);if(_0x4edccd)return{'version':_0x4edccd,'source':_0x49acd8(0xf1)};const _0x408ad6=_0x3341c3[_0x49acd8(0xd6)](_0x49acd8(0xc9))?_0x49acd8(0xc9):_0x49acd8(0xfb),_0x30de97=await fetchNpmDistTags(),_0x3f4b16=_0x30de97?.[_0x408ad6];if(!_0x3f4b16)return null;return{'version':_0x3f4b16,'source':_0x408ad6};}function shouldInstallTarget(_0x3140a1,_0x174877){const _0x130e0b=a83_0x1fddaa;if(_0x174877[_0x130e0b(0xec)]===_0x130e0b(0xf1)||_0x174877[_0x130e0b(0xec)]===_0x130e0b(0xc9))return!a83_0x47b59c['eq'](_0x3140a1,_0x174877[_0x130e0b(0xf1)]);return a83_0x47b59c['lt'](_0x3140a1,_0x174877['version']);}function a83_0x3c58(){const _0x19c022=['/-/package/','\x20\x20Run\x20manually:\x20','filter','bool','exit\x20','read','6TawXnL','Current\x20version:\x20','trim','code','run','find','write','update','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','repairCommand','dirname','nonInteractive','/dist-tags','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','platform','string','2404MXEOXs','stderr','join','source','json','\x20is\x20current.','--prefix','\x20\x20CLI\x20Built-in\x20Skill\x20','version','4283YgUPLz','Invalid\x20version:\x20','pipe','Unable\x20to\x20resolve\x20','timeout','validation','error','npm','332472huuPtu','latest','valid','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Version\x20comparison\x20failed:\x20','\x20version\x20from\x20npm.','378Xxcgqu','121wctQQl','args','Install\x20a\x20specific\x20CLI\x20version','status','1033450SGEeij','toLowerCase','4526772ZapRbF','includes','13RnbRqL','fromEntries','warn','state','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','INSTALL_FAILED','unknown','Updating\x20','Update\x20failed:\x20','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','object','relative','6qSZdsp','4695rGRmhu','reason','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','\x20->\x20','lib','stdout','314965oxhSWS','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','Updated\x20to\x20v','node_modules','basename','inherit','message','Already\x20up\x20to\x20date\x20(v','29207172ENfWQQ','beta','skillVersion','log','boolean','map','@lovrabet/lovrabet-cli','install','Checking\x20CLI\x20Built-in\x20Skill...','toString','length'];a83_0x3c58=function(){return _0x19c022;};return a83_0x3c58();}export function installCliPackage(_0x3b73fa,_0x173408,_0x2b91b0=resolveCurrentCliNpmPrefix()){const _0x18a570=a83_0x1fddaa,_0x3c23cf=resolveNpmBin(_0x18a570(0xf9)),_0x1f9faf=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3b73fa,_0xe10ff5=[_0x18a570(0xcf),'-g',_0x1f9faf],_0x1e0e99=runNpmInstall(_0x3c23cf,_0xe10ff5,_0x173408);if(_0x1e0e99['ok']||!isNpmPrefixPermissionError(_0x1e0e99[_0x18a570(0xf8)]))return _0x1e0e99;if(!_0x2b91b0||_0x1e0e99[_0x18a570(0xf8)]?.[_0x18a570(0x106)]()[_0x18a570(0x108)](_0x2b91b0[_0x18a570(0x106)]()))return _0x1e0e99;return console[_0x18a570(0x10b)](_0x18a570(0x112)+_0x2b91b0),runNpmInstall(_0x3c23cf,[..._0xe10ff5,_0x18a570(0xef),_0x2b91b0],_0x173408);}export function resolveCurrentCliNpmPrefix(_0x4af237=fileURLToPath(import.meta.url),_0x24e30e=process[a83_0x1fddaa(0xe7)]){const _0x3ee0b6=a83_0x1fddaa,_0xc0569=_0x24e30e==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x3d8dbb=_0xc0569[_0x3ee0b6(0xe3)](_0xc0569['dirname'](_0xc0569[_0x3ee0b6(0xe3)](_0x4af237))),_0x3892ed=_0x24e30e==='win32'?'@lovrabet\x5clovrabet-cli':_0x3ee0b6(0xce);let _0x42e60c=_0xc0569[_0x3ee0b6(0xe3)](_0x3d8dbb);while(!![]){if(_0xc0569[_0x3ee0b6(0xc4)](_0x42e60c)===_0x3ee0b6(0x11f)&&_0xc0569[_0x3ee0b6(0x114)](_0x42e60c,_0x3d8dbb)===_0x3892ed){const _0x40c29b=_0xc0569['dirname'](_0x42e60c);return _0xc0569[_0x3ee0b6(0xc4)](_0x40c29b)===_0x3ee0b6(0x11a)?_0xc0569['dirname'](_0x40c29b):_0x40c29b;}const _0x4ffc21=_0xc0569[_0x3ee0b6(0xe3)](_0x42e60c);if(_0x4ffc21===_0x42e60c)return null;_0x42e60c=_0x4ffc21;}}function runNpmInstall(_0x111021,_0x391d68,_0x2a1a3c){const _0x2211d7=a83_0x1fddaa;console[_0x2211d7(0xcb)]('*\x20'+[_0x111021,..._0x391d68][_0x2211d7(0xeb)]('\x20'));const _0x5356e2=spawnSync(_0x111021,_0x391d68,{'cwd':process['cwd'](),'stdio':_0x2211d7(0xf4),'env':process.env,'shell':![]}),_0x350db8=_0x5356e2[_0x2211d7(0xea)]?_0x5356e2['stderr'][_0x2211d7(0xd1)]()[_0x2211d7(0xdb)]():'',_0x5d9ef5=_0x5356e2[_0x2211d7(0x11b)]?_0x5356e2[_0x2211d7(0x11b)][_0x2211d7(0xd1)]()['trim']():'';if(!_0x2a1a3c){if(_0x5d9ef5)process['stdout']['write'](_0x5d9ef5+'\x0a');if(_0x350db8)process[_0x2211d7(0xea)][_0x2211d7(0xdf)](_0x350db8+'\x0a');}if(_0x5356e2[_0x2211d7(0x104)]===0x0)return{'ok':!![]};const _0x5d7cdc=_0x5356e2[_0x2211d7(0xf8)]?.[_0x2211d7(0xc6)]||_0x350db8||_0x5d9ef5||_0x2211d7(0xd7)+(_0x5356e2[_0x2211d7(0x104)]??'unknown');return{'ok':![],'error':_0x5d7cdc};}function isNpmPrefixPermissionError(_0x2d8898){return Boolean(_0x2d8898&&/\b(?:EACCES|EPERM)\b/['test'](_0x2d8898));}function repairCurrentBuiltinSkill(_0x34755c){const _0x1c598f=a83_0x1fddaa;console[_0x1c598f(0xcb)](_0x1c598f(0xd0));const _0x64d88a=installBuiltinSkill({'stdio':_0x34755c?_0x1c598f(0xf4):_0x1c598f(0xc5)});if(_0x64d88a['ok'])return console[_0x1c598f(0xcb)](_0x1c598f(0xf0)+_0x64d88a[_0x1c598f(0xca)]+_0x1c598f(0xee)),!![];return console[_0x1c598f(0x10b)](_0x1c598f(0xfd)+(_0x64d88a[_0x1c598f(0xdc)]||_0x1c598f(0x10e))+']:\x20'+(_0x64d88a[_0x1c598f(0xf8)]||_0x1c598f(0x10f))),console[_0x1c598f(0xcb)](_0x1c598f(0xd4)+_0x64d88a['repairCommand']),![];}function verifyUpdatedBuiltinSkill(_0x53858e){const _0x1a4cb1=a83_0x1fddaa;console[_0x1a4cb1(0xcb)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x25c5e3=inspectInstalledBuiltinSkillVersion(_0x53858e);if(_0x25c5e3[_0x1a4cb1(0x10c)]==='current')return console[_0x1a4cb1(0xcb)](_0x1a4cb1(0xf0)+_0x53858e+_0x1a4cb1(0xee)),!![];console[_0x1a4cb1(0x10b)](_0x1a4cb1(0x10d)+_0x25c5e3[_0x1a4cb1(0x10c)]+'.');if(_0x25c5e3['reason'])console['warn']('\x20\x20'+_0x25c5e3[_0x1a4cb1(0x117)]);return console[_0x1a4cb1(0xcb)](_0x1a4cb1(0xd4)+_0x25c5e3[_0x1a4cb1(0xe2)]),![];}async function execute(_0x270428){const _0x48fcef=a83_0x1fddaa;await validateUpdateFlags(_0x270428);const _0x25eadf=getCliVersion();console[_0x48fcef(0xcb)](_0x48fcef(0xda)+_0x25eadf),console[_0x48fcef(0xcb)]('Checking\x20npm\x20dist-tags...');const _0xa78117=await resolveTargetVersion(_0x270428);if(!_0xa78117){const _0x3a55d9=_0x270428[_0x48fcef(0xd6)](_0x48fcef(0xc9))?_0x48fcef(0xc9):_0x48fcef(0xfb),_0x132e4a=_0x48fcef(0xf5)+_0x3a55d9+_0x48fcef(0xff);return console[_0x48fcef(0x10b)](_0x132e4a),console[_0x48fcef(0xcb)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3a55d9),{'ok':![]};}const _0x5a0870=[_0x25eadf,_0xa78117[_0x48fcef(0xf1)]][_0x48fcef(0xde)](_0x300e48=>!a83_0x47b59c[_0x48fcef(0xfc)](_0x300e48));if(_0x5a0870)return console[_0x48fcef(0x10b)](_0x48fcef(0xfe)+_0x5a0870+'.'),{'ok':![]};if(!shouldInstallTarget(_0x25eadf,_0xa78117)){const _0x3aa1ad=_0xa78117['source']===_0x48fcef(0xf1)?'Already\x20on\x20requested\x20version\x20(v'+_0xa78117['version']+').':_0x48fcef(0xc7)+_0xa78117['version']+').';return console[_0x48fcef(0xcb)](_0x3aa1ad),{'ok':repairCurrentBuiltinSkill(_0x270428[_0x48fcef(0xe4)])};}console['log'](_0x48fcef(0x110)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x25eadf+_0x48fcef(0x119)+_0xa78117[_0x48fcef(0xf1)]);const _0x2e740d=installCliPackage(_0xa78117[_0x48fcef(0xf1)],_0x270428[_0x48fcef(0xe4)]);if(!_0x2e740d['ok']){const _0x12b620=_0x48fcef(0x111)+(_0x2e740d[_0x48fcef(0xf8)]||'unknown');return console[_0x48fcef(0xf8)](_0x12b620),console[_0x48fcef(0xcb)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0xa78117[_0x48fcef(0xf1)]),{'ok':![]};}return console[_0x48fcef(0xcb)](_0x48fcef(0x11e)+_0xa78117['version']+'.'),console[_0x48fcef(0xcb)](_0x48fcef(0xe6)),{'ok':verifyUpdatedBuiltinSkill(_0xa78117[_0x48fcef(0xf1)])};}function a83_0x45ef(_0x196271,_0x2536f3){_0x196271=_0x196271-0xc4;const _0x3c5845=a83_0x3c58();let _0x45ef5a=_0x3c5845[_0x196271];return _0x45ef5a;}export const updateDefinition={'service':a83_0x1fddaa(0xe0),'command':a83_0x1fddaa(0xdd),'description':'从\x20npm\x20更新\x20'+CLI_BIN_NAME+'\x20CLI','risk':a83_0x1fddaa(0xd8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a83_0x5624ea=a83_0x3524;(function(_0x2eecb3,_0x16cdb0){const _0x318f7a=a83_0x3524,_0xef8a2=_0x2eecb3();while(!![]){try{const _0x5bd317=-parseInt(_0x318f7a(0x14e))/0x1+-parseInt(_0x318f7a(0x15e))/0x2+-parseInt(_0x318f7a(0x16a))/0x3+parseInt(_0x318f7a(0x13f))/0x4+-parseInt(_0x318f7a(0x15d))/0x5+parseInt(_0x318f7a(0x163))/0x6*(parseInt(_0x318f7a(0x172))/0x7)+parseInt(_0x318f7a(0x171))/0x8*(parseInt(_0x318f7a(0x12c))/0x9);if(_0x5bd317===_0x16cdb0)break;else _0xef8a2['push'](_0xef8a2['shift']());}catch(_0x35727a){_0xef8a2['push'](_0xef8a2['shift']());}}}(a83_0xbe54,0x7b795));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a83_0x18c15a from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';function a83_0xbe54(){const _0x21e94e=['exit\x20','beta','warn','entries','node_modules','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','basename','/dist-tags','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','1243210OxGmZK','983426ricGyM','lib','npm','object','message','2941248wUeLBz','\x20\x20Run\x20manually:\x20','str','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','Install\x20a\x20specific\x20CLI\x20version','log','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','2255049fUyVnJ','valid','version','join','relative','\x20is\x20current.','toLowerCase','9485416UifonY','14AwWxjb','repairCommand','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Checking\x20CLI\x20Built-in\x20Skill...','Unable\x20to\x20resolve\x20','INSTALL_FAILED','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','find','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','\x20->\x20','state','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','latest','filter','Already\x20on\x20requested\x20version\x20(v','error','status','9HvTeqh','/-/package/','boolean','\x20CLI','stdout',']:\x20','inherit','Invalid\x20version:\x20','dirname','source','toString','\x20\x20CLI\x20Built-in\x20Skill\x20','string','update','pipe','从\x20npm\x20更新\x20','win32','json','includes','828596sZiJZL','write','validation','map','unknown','@lovrabet\x5clovrabet-cli','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Checking\x20npm\x20dist-tags...','skillVersion','read','Update\x20failed:\x20','Current\x20version:\x20','cwd','install','nonInteractive','375455dExxvo','stderr','bool','trim','reason','Version\x20comparison\x20failed:\x20'];a83_0xbe54=function(){return _0x21e94e;};return a83_0xbe54();}import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a83_0x5624ea(0x17e),'type':a83_0x5624ea(0x12e),'description':a83_0x5624ea(0x169),'default':![]},{'name':a83_0x5624ea(0x155),'type':a83_0x5624ea(0x12e),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':a83_0x5624ea(0x138),'description':a83_0x5624ea(0x167)}];function getRequestedVersion(_0x13ad49){const _0xbe3e9f=a83_0x5624ea,_0x1c2087=_0x13ad49[_0xbe3e9f(0x165)](_0xbe3e9f(0x16c))[_0xbe3e9f(0x151)]();if(_0x1c2087)return _0x1c2087;return String(_0x13ad49['args']?.[0x0]??'')[_0xbe3e9f(0x151)]();}async function validateUpdateFlags(_0x1d3882){const _0xf82cda=a83_0x5624ea,_0x20431d=getRequestedVersion(_0x1d3882),_0x2c8776=[_0x1d3882['bool']('latest')?_0xf82cda(0x17e):'',_0x1d3882[_0xf82cda(0x150)](_0xf82cda(0x155))?'beta':'',_0x20431d?'version':'']['filter'](Boolean);if(_0x2c8776['length']>0x1)throw CliErrors[_0xf82cda(0x141)](_0xf82cda(0x17a),_0xf82cda(0x178));if(_0x20431d&&!a83_0x18c15a[_0xf82cda(0x16b)](_0x20431d))throw CliErrors[_0xf82cda(0x141)](_0xf82cda(0x133)+_0x20431d,_0xf82cda(0x15c));}async function fetchNpmDistTags(){const _0x3c0df2=a83_0x5624ea;try{const _0x2e65d0=NPM_REGISTRY_BASE_URL+_0x3c0df2(0x12d)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x3c0df2(0x15b),_0x27131d=await fetch(_0x2e65d0,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x27131d['ok'])return null;const _0xc22706=await _0x27131d[_0x3c0df2(0x13d)]();if(!_0xc22706||typeof _0xc22706!==_0x3c0df2(0x161))return null;return Object['fromEntries'](Object[_0x3c0df2(0x157)](_0xc22706)[_0x3c0df2(0x17f)](([,_0x14cc13])=>typeof _0x14cc13==='string'&&_0x14cc13[_0x3c0df2(0x151)]())[_0x3c0df2(0x142)](([_0x48123d,_0x12fd2a])=>[_0x48123d,String(_0x12fd2a)[_0x3c0df2(0x151)]()]));}catch{return null;}}async function resolveTargetVersion(_0x5c8286){const _0x4b508a=a83_0x5624ea,_0x111241=getRequestedVersion(_0x5c8286);if(_0x111241)return{'version':_0x111241,'source':_0x4b508a(0x16c)};const _0x4489f5=_0x5c8286['bool'](_0x4b508a(0x155))?_0x4b508a(0x155):'latest',_0x3fecb9=await fetchNpmDistTags(),_0x44c4e0=_0x3fecb9?.[_0x4489f5];if(!_0x44c4e0)return null;return{'version':_0x44c4e0,'source':_0x4489f5};}function shouldInstallTarget(_0x4b352a,_0x392a3f){const _0xae4692=a83_0x5624ea;if(_0x392a3f[_0xae4692(0x135)]===_0xae4692(0x16c)||_0x392a3f[_0xae4692(0x135)]===_0xae4692(0x155))return!a83_0x18c15a['eq'](_0x4b352a,_0x392a3f[_0xae4692(0x16c)]);return a83_0x18c15a['lt'](_0x4b352a,_0x392a3f[_0xae4692(0x16c)]);}export function installCliPackage(_0x5bff08,_0x16a2bd,_0x44eae3=resolveCurrentCliNpmPrefix()){const _0x5f3430=a83_0x5624ea,_0x24246a=resolveNpmBin(_0x5f3430(0x160)),_0x3ef1d5=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5bff08,_0x5df3ac=[_0x5f3430(0x14c),'-g',_0x3ef1d5],_0x11ac97=runNpmInstall(_0x24246a,_0x5df3ac,_0x16a2bd);if(_0x11ac97['ok']||!isNpmPrefixPermissionError(_0x11ac97[_0x5f3430(0x12a)]))return _0x11ac97;if(!_0x44eae3||_0x11ac97[_0x5f3430(0x12a)]?.[_0x5f3430(0x170)]()[_0x5f3430(0x13e)](_0x44eae3[_0x5f3430(0x170)]()))return _0x11ac97;return console[_0x5f3430(0x156)](_0x5f3430(0x166)+_0x44eae3),runNpmInstall(_0x24246a,[..._0x5df3ac,'--prefix',_0x44eae3],_0x16a2bd);}export function resolveCurrentCliNpmPrefix(_0x33e9e6=fileURLToPath(import.meta.url),_0xd6bf4c=process['platform']){const _0x4f361d=a83_0x5624ea,_0x3920d9=_0xd6bf4c==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x502331=_0x3920d9[_0x4f361d(0x134)](_0x3920d9[_0x4f361d(0x134)](_0x3920d9[_0x4f361d(0x134)](_0x33e9e6))),_0x1d7ddd=_0xd6bf4c===_0x4f361d(0x13c)?_0x4f361d(0x144):'@lovrabet/lovrabet-cli';let _0x26e099=_0x3920d9[_0x4f361d(0x134)](_0x502331);while(!![]){if(_0x3920d9[_0x4f361d(0x15a)](_0x26e099)===_0x4f361d(0x158)&&_0x3920d9[_0x4f361d(0x16e)](_0x26e099,_0x502331)===_0x1d7ddd){const _0x39c8fc=_0x3920d9[_0x4f361d(0x134)](_0x26e099);return _0x3920d9[_0x4f361d(0x15a)](_0x39c8fc)===_0x4f361d(0x15f)?_0x3920d9[_0x4f361d(0x134)](_0x39c8fc):_0x39c8fc;}const _0x153c83=_0x3920d9[_0x4f361d(0x134)](_0x26e099);if(_0x153c83===_0x26e099)return null;_0x26e099=_0x153c83;}}function runNpmInstall(_0x18c8a1,_0x288674,_0x27b9f2){const _0x3626c2=a83_0x5624ea;console[_0x3626c2(0x168)]('*\x20'+[_0x18c8a1,..._0x288674][_0x3626c2(0x16d)]('\x20'));const _0x3c699c=spawnSync(_0x18c8a1,_0x288674,{'cwd':process[_0x3626c2(0x14b)](),'stdio':_0x3626c2(0x13a),'env':process.env,'shell':![]}),_0x219e2a=_0x3c699c[_0x3626c2(0x14f)]?_0x3c699c[_0x3626c2(0x14f)][_0x3626c2(0x136)]()[_0x3626c2(0x151)]():'',_0x4d7462=_0x3c699c[_0x3626c2(0x130)]?_0x3c699c['stdout']['toString']()[_0x3626c2(0x151)]():'';if(!_0x27b9f2){if(_0x4d7462)process[_0x3626c2(0x130)]['write'](_0x4d7462+'\x0a');if(_0x219e2a)process[_0x3626c2(0x14f)][_0x3626c2(0x140)](_0x219e2a+'\x0a');}if(_0x3c699c['status']===0x0)return{'ok':!![]};const _0x19f169=_0x3c699c[_0x3626c2(0x12a)]?.[_0x3626c2(0x162)]||_0x219e2a||_0x4d7462||_0x3626c2(0x154)+(_0x3c699c[_0x3626c2(0x12b)]??_0x3626c2(0x143));return{'ok':![],'error':_0x19f169};}function isNpmPrefixPermissionError(_0x2c7a1a){return Boolean(_0x2c7a1a&&/\b(?:EACCES|EPERM)\b/['test'](_0x2c7a1a));}function repairCurrentBuiltinSkill(_0x301a2e){const _0x4a88c6=a83_0x5624ea;console[_0x4a88c6(0x168)](_0x4a88c6(0x175));const _0x22fa14=installBuiltinSkill({'stdio':_0x301a2e?'pipe':_0x4a88c6(0x132)});if(_0x22fa14['ok'])return console['log']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x22fa14[_0x4a88c6(0x147)]+_0x4a88c6(0x16f)),!![];return console[_0x4a88c6(0x156)](_0x4a88c6(0x145)+(_0x22fa14['code']||_0x4a88c6(0x177))+_0x4a88c6(0x131)+(_0x22fa14['error']||'unknown')),console[_0x4a88c6(0x168)](_0x4a88c6(0x164)+_0x22fa14[_0x4a88c6(0x173)]),![];}function verifyUpdatedBuiltinSkill(_0x241f0d){const _0xfc2954=a83_0x5624ea;console[_0xfc2954(0x168)](_0xfc2954(0x175));const _0x2968f0=inspectInstalledBuiltinSkillVersion(_0x241f0d);if(_0x2968f0[_0xfc2954(0x17c)]==='current')return console[_0xfc2954(0x168)](_0xfc2954(0x137)+_0x241f0d+'\x20is\x20current.'),!![];console[_0xfc2954(0x156)](_0xfc2954(0x17d)+_0x2968f0[_0xfc2954(0x17c)]+'.');if(_0x2968f0[_0xfc2954(0x152)])console[_0xfc2954(0x156)]('\x20\x20'+_0x2968f0[_0xfc2954(0x152)]);return console[_0xfc2954(0x168)](_0xfc2954(0x164)+_0x2968f0[_0xfc2954(0x173)]),![];}async function execute(_0x11cf45){const _0x51377f=a83_0x5624ea;await validateUpdateFlags(_0x11cf45);const _0x1b4677=getCliVersion();console[_0x51377f(0x168)](_0x51377f(0x14a)+_0x1b4677),console[_0x51377f(0x168)](_0x51377f(0x146));const _0x4e7dd7=await resolveTargetVersion(_0x11cf45);if(!_0x4e7dd7){const _0x3966c2=_0x11cf45[_0x51377f(0x150)]('beta')?_0x51377f(0x155):_0x51377f(0x17e),_0x5eb238=_0x51377f(0x176)+_0x3966c2+'\x20version\x20from\x20npm.';return console['warn'](_0x5eb238),console['log'](_0x51377f(0x159)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3966c2),{'ok':![]};}const _0x5d342b=[_0x1b4677,_0x4e7dd7[_0x51377f(0x16c)]][_0x51377f(0x179)](_0x2ea1=>!a83_0x18c15a[_0x51377f(0x16b)](_0x2ea1));if(_0x5d342b)return console['warn'](_0x51377f(0x153)+_0x5d342b+'.'),{'ok':![]};if(!shouldInstallTarget(_0x1b4677,_0x4e7dd7)){const _0x450ce6=_0x4e7dd7[_0x51377f(0x135)]==='version'?_0x51377f(0x129)+_0x4e7dd7[_0x51377f(0x16c)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x4e7dd7[_0x51377f(0x16c)]+').';return console[_0x51377f(0x168)](_0x450ce6),{'ok':repairCurrentBuiltinSkill(_0x11cf45[_0x51377f(0x14d)])};}console[_0x51377f(0x168)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x1b4677+_0x51377f(0x17b)+_0x4e7dd7[_0x51377f(0x16c)]);const _0x2fb40d=installCliPackage(_0x4e7dd7[_0x51377f(0x16c)],_0x11cf45[_0x51377f(0x14d)]);if(!_0x2fb40d['ok']){const _0x4d244d=_0x51377f(0x149)+(_0x2fb40d['error']||_0x51377f(0x143));return console[_0x51377f(0x12a)](_0x4d244d),console[_0x51377f(0x168)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4e7dd7[_0x51377f(0x16c)]),{'ok':![]};}return console[_0x51377f(0x168)]('Updated\x20to\x20v'+_0x4e7dd7[_0x51377f(0x16c)]+'.'),console[_0x51377f(0x168)](_0x51377f(0x174)),{'ok':verifyUpdatedBuiltinSkill(_0x4e7dd7[_0x51377f(0x16c)])};}function a83_0x3524(_0x498073,_0x580567){_0x498073=_0x498073-0x129;const _0xbe5489=a83_0xbe54();let _0x35249e=_0xbe5489[_0x498073];return _0x35249e;}export const updateDefinition={'service':a83_0x5624ea(0x139),'command':'run','description':a83_0x5624ea(0x13b)+CLI_BIN_NAME+a83_0x5624ea(0x12f),'risk':a83_0x5624ea(0x148),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x3075de=a84_0x586b;(function(_0x404e97,_0x4dbc4c){const _0x29e5be=a84_0x586b,_0x373e21=_0x404e97();while(!![]){try{const _0x3e0590=parseInt(_0x29e5be(0x1a9))/0x1+parseInt(_0x29e5be(0x1b5))/0x2*(parseInt(_0x29e5be(0x1aa))/0x3)+-parseInt(_0x29e5be(0x198))/0x4*(-parseInt(_0x29e5be(0x1a3))/0x5)+-parseInt(_0x29e5be(0x1a4))/0x6*(-parseInt(_0x29e5be(0x1b3))/0x7)+-parseInt(_0x29e5be(0x1a0))/0x8+parseInt(_0x29e5be(0x1ab))/0x9*(parseInt(_0x29e5be(0x1a6))/0xa)+-parseInt(_0x29e5be(0x1a5))/0xb*(parseInt(_0x29e5be(0x1b7))/0xc);if(_0x3e0590===_0x4dbc4c)break;else _0x373e21['push'](_0x373e21['shift']());}catch(_0x2bcea9){_0x373e21['push'](_0x373e21['shift']());}}}(a84_0x20ba,0x6858b));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';function a84_0x20ba(){const _0x1120d7=['write','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','join','Unsupported\x20provider:\x20','7udllwG','account-id','106FRQeHH','includes','12IaJhTy','1332764QGxGHd','(empty)','bind','External\x20account\x20binding\x20was\x20not\x20confirmed.','provider','string','validation','--account-id\x20cannot\x20be\x20empty.','2115336cITBDa','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','Pass\x20one\x20of:\x20','5ZUsrtr','4541766KjdKDU','21481009NPeucG','4709180JETWgU','str','trim','611498QJlxdX','26721NCiXqK','9cBfQmm','External\x20account\x20provider','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','POST'];a84_0x20ba=function(){return _0x1120d7;};return a84_0x20ba();}import{CliErrors}from'../../errors.js';function a84_0x586b(_0x4bd020,_0x510e52){_0x4bd020=_0x4bd020-0x198;const _0x20baad=a84_0x20ba();let _0x586b1b=_0x20baad[_0x4bd020];return _0x586b1b;}const CURRENT_BINDING_WARNING=a84_0x3075de(0x1b0),SUPPORTED_PROVIDERS=['dingtalk'];function readBindingInput(_0x32b0ea){const _0x3dc96c=a84_0x3075de,_0x197c48=_0x32b0ea[_0x3dc96c(0x1a7)](_0x3dc96c(0x19c))[_0x3dc96c(0x1a8)]()['toLowerCase']();if(!SUPPORTED_PROVIDERS[_0x3dc96c(0x1b6)](_0x197c48))throw CliErrors[_0x3dc96c(0x19e)](_0x3dc96c(0x1b2)+(_0x197c48||_0x3dc96c(0x199))+'.',_0x3dc96c(0x1a2)+SUPPORTED_PROVIDERS[_0x3dc96c(0x1b1)](',\x20')+'.');const _0x1670f9=_0x32b0ea['str'](_0x3dc96c(0x1b4))[_0x3dc96c(0x1a8)]();if(!_0x1670f9)throw CliErrors[_0x3dc96c(0x19e)](_0x3dc96c(0x19f),'Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.');return{'provider':_0x197c48,'accountId':_0x1670f9};}function buildBindingData(_0x4ac142,_0xde0b6,_0x5a66fd){return{'operation':'bind','selector':{'provider':_0x4ac142,'accountId':_0xde0b6},'before':null,'after':{'provider':_0x4ac142,'accountId':_0xde0b6,'bound':!![]},'dryRun':_0x5a66fd,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':'user-account','command':a84_0x3075de(0x19a),'description':a84_0x3075de(0x1ad),'risk':a84_0x3075de(0x1af),'confirmationDescription':'将当前\x20AccessKey\x20所属的平台用户绑定到指定协同生态外部账号;已有同\x20provider\x20绑定可能被替换。','requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':'provider','type':a84_0x3075de(0x19d),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a84_0x3075de(0x1ac)},{'name':'account-id','type':a84_0x3075de(0x19d),'required':!![],'description':a84_0x3075de(0x1a1)}],async 'validate'(_0x566d57){readBindingInput(_0x566d57);},async 'dryRun'(_0x1b1a3d){const _0x256d27=a84_0x3075de,{provider:_0x58989d,accountId:_0x5c3244}=readBindingInput(_0x1b1a3d);return{...buildBindingData(_0x58989d,_0x5c3244,!![]),'method':_0x256d27(0x1ae),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x58989d,'accountId':_0x5c3244}};},async 'execute'(_0x4dd9d2){const _0x2883b0=a84_0x3075de,{provider:_0xf219f7,accountId:_0x366bd4}=readBindingInput(_0x4dd9d2),_0xbd160a=await bindExternalUserAccount(_0xf219f7,_0x366bd4);if(_0xbd160a!==!![])throw CliErrors['apiError'](_0x2883b0(0x19b),'Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.');return{'ok':!![],'data':buildBindingData(_0xf219f7,_0x366bd4,![]),'message':'Bound\x20current\x20user\x20to\x20external\x20provider\x20account.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a85_0x1b0f(_0x23312d,_0x3c03ca){_0x23312d=_0x23312d-0x1f2;const _0xa506b4=a85_0xa506();let _0x1b0f4a=_0xa506b4[_0x23312d];return _0x1b0f4a;}(function(_0x2096b3,_0x38d81a){const _0x3c41a9=a85_0x1b0f,_0x2f4c67=_0x2096b3();while(!![]){try{const _0x10c888=parseInt(_0x3c41a9(0x1f6))/0x1*(-parseInt(_0x3c41a9(0x1fc))/0x2)+parseInt(_0x3c41a9(0x1f7))/0x3*(-parseInt(_0x3c41a9(0x1fb))/0x4)+-parseInt(_0x3c41a9(0x1f9))/0x5*(-parseInt(_0x3c41a9(0x1f5))/0x6)+-parseInt(_0x3c41a9(0x1fa))/0x7*(-parseInt(_0x3c41a9(0x1f4))/0x8)+parseInt(_0x3c41a9(0x1f3))/0x9*(parseInt(_0x3c41a9(0x1f2))/0xa)+parseInt(_0x3c41a9(0x1f8))/0xb+-parseInt(_0x3c41a9(0x1fd))/0xc*(parseInt(_0x3c41a9(0x1fe))/0xd);if(_0x10c888===_0x38d81a)break;else _0x2f4c67['push'](_0x2f4c67['shift']());}catch(_0x43a166){_0x2f4c67['push'](_0x2f4c67['shift']());}}}(a85_0xa506,0x4f379));import{bindUserAccount}from'../../commands/user-account/bind.js';function a85_0xa506(){const _0x2b41f0=['1796535GBSjCT','56RJSlCl','44NcDDrY','1562EprFmE','12TvmcVw','4851223nccBxU','5857480PCZqFb','9FUjRDj','223336OHLEkp','6WOwsEl','658zOuHvf','8361QyNmaU','811888lNegIu'];a85_0xa506=function(){return _0x2b41f0;};return a85_0xa506();}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x545e2c=a86_0x7fa5;function a86_0x7fa5(_0x224ac0,_0x2c9267){_0x224ac0=_0x224ac0-0xfe;const _0xf3af46=a86_0xf3af();let _0x7fa580=_0xf3af46[_0x224ac0];return _0x7fa580;}(function(_0xebce88,_0x1e5256){const _0x32874f=a86_0x7fa5,_0x2df0aa=_0xebce88();while(!![]){try{const _0x39a597=-parseInt(_0x32874f(0x105))/0x1*(-parseInt(_0x32874f(0x101))/0x2)+-parseInt(_0x32874f(0x13f))/0x3*(parseInt(_0x32874f(0x10b))/0x4)+-parseInt(_0x32874f(0x12e))/0x5+-parseInt(_0x32874f(0x13a))/0x6+-parseInt(_0x32874f(0x129))/0x7*(parseInt(_0x32874f(0xff))/0x8)+-parseInt(_0x32874f(0x100))/0x9*(-parseInt(_0x32874f(0x140))/0xa)+parseInt(_0x32874f(0x135))/0xb;if(_0x39a597===_0x1e5256)break;else _0x2df0aa['push'](_0x2df0aa['shift']());}catch(_0x283f54){_0x2df0aa['push'](_0x2df0aa['shift']());}}}(a86_0xf3af,0x9488c));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a86_0xf3af(){const _0x35d81b=['\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','\x22\x20not\x20found.','将更新当前工作目录已有的应用绑定,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','validation','\x0aAccessKey:\x20not\x20written','init','map','App\x20code\x20to\x20bind\x20directly','app','appName','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','object','workspace\x20','616kpsPRz','trim','\x0aEnv:\x20','length','isArray','4607905EuwJdG','string','workspace','Workspace\x20configured.\x0aConfig\x20file:\x20','Run\x20`','Available\x20apps:\x20','filter','26601828StCSBd','\x20workspace\x20','authRequired','join','str','6980364HeQdbJ','Missing\x20workspace\x20app\x20selector.','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','appCode','command','7677uJooRC','70KxASQq','Use\x20`','Invalid\x20env\x20\x22','为尚未绑定应用的当前工作目录初始化应用上下文','19312LkiYGS','302445uCvpVE','2jtXLeL','project','use','修改当前工作目录已有绑定的应用上下文','1101808AitNcx','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','将在尚未绑定应用的当前工作目录写入\x20Lovrabet\x20项目配置,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','App\x20\x22','accessKey','1328Prnnlg','Workspace\x20app\x20context\x20is\x20already\x20initialized.','apps','appcode','env','\x0aDefault\x20app:\x20','Usage:\x20','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','defaultApp','write','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','from','../../core/api-client.js','shouldWriteEnv','Conflicting\x20workspace\x20app\x20selectors.','items'];a86_0xf3af=function(){return _0x35d81b;};return a86_0xf3af();}import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a86_0x545e2c(0x124),'type':a86_0x545e2c(0x12f),'description':a86_0x545e2c(0x115)},{'name':'appcode','type':a86_0x545e2c(0x12f),'description':a86_0x545e2c(0x123)},{'name':a86_0x545e2c(0x10f),'type':'string','description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x331b7a,_0x334329){const _0x379c77=a86_0x545e2c,_0x56e91a=_0x331b7a[_0x379c77(0x139)]('app')[_0x379c77(0x12a)](),_0x29ffe8=_0x331b7a['str'](_0x379c77(0x10e))[_0x379c77(0x12a)](),_0x297517=_0x331b7a[_0x379c77(0x139)](_0x379c77(0x10f))[_0x379c77(0x12a)](),_0x46d57d=resolveWorkspaceEnv(_0x297517||_0x331b7a['envName']||DEFAULT_CONFIG_VALUES['env']);if(!_0x56e91a&&!_0x29ffe8)throw CliErrors[_0x379c77(0x11f)](_0x379c77(0x13b),_0x379c77(0x111)+CLI_BIN_NAME+_0x379c77(0x136)+_0x334329+_0x379c77(0x107)+CLI_BIN_NAME+'\x20workspace\x20'+_0x334329+'\x20--appcode\x20<code>\x20[--env\x20daily]');if(_0x56e91a&&_0x29ffe8)throw CliErrors[_0x379c77(0x11f)](_0x379c77(0x119),_0x379c77(0x126));const _0x5b48ae=resolveWriteConfigPath(_0x379c77(0x102)),_0x450ecd=readConfigFile(_0x5b48ae);assertWorkspaceCommandState(_0x334329,_0x450ecd);const _0x4b670d=_0x29ffe8||await resolveRemoteAppCode({'command':_0x334329,'appName':_0x56e91a,'env':_0x46d57d,'accessKey':_0x331b7a['accessKey']});return writeWorkspaceConfig({'command':_0x334329,'appName':_0x56e91a,'appcode':_0x4b670d,'env':_0x46d57d,'shouldWriteEnv':!!_0x297517,'accessKey':_0x331b7a[_0x379c77(0x10a)]},_0x5b48ae,_0x450ecd),{'ok':!![],'data':{'configPath':_0x5b48ae,'app':_0x56e91a||null,'appcode':_0x4b670d,'env':_0x297517?_0x46d57d:null,'accessKeyWritten':![],'command':_0x379c77(0x128)+_0x334329},'message':buildWorkspaceMessage(_0x5b48ae,_0x56e91a,_0x4b670d,_0x297517?_0x46d57d:undefined)};}async function resolveRemoteAppCode(_0x4c0352){const _0x3ea07a=a86_0x545e2c;if(!_0x4c0352[_0x3ea07a(0x10a)])throw CliErrors[_0x3ea07a(0x137)](_0x3ea07a(0x112)+CLI_BIN_NAME+_0x3ea07a(0x136)+_0x4c0352[_0x3ea07a(0x13e)]+'.');const {setActiveAK:_0x1a07d4}=await import(_0x3ea07a(0x117)),{getRemoteAppList:_0xb896e0}=await import('../../commands/app/remote-source.js');_0x1a07d4(_0x4c0352['accessKey']);const _0x335711=await _0xb896e0({'env':_0x4c0352[_0x3ea07a(0x10f)],'accessKey':_0x4c0352[_0x3ea07a(0x10a)],'noCache':![]}),_0x353cb3=findAppByName(_0x335711[_0x3ea07a(0x11a)],_0x4c0352[_0x3ea07a(0x125)]);if(_0x353cb3&&!isRuntimeAccessibleApp(_0x353cb3))throw runtimeInaccessibleAppError(_0x353cb3,'\x22'+_0x4c0352[_0x3ea07a(0x125)]+'\x22');const _0x35fa33=_0x353cb3?.[_0x3ea07a(0x13d)]?.['trim']();if(_0x35fa33)return _0x35fa33;const _0x445720=_0x335711[_0x3ea07a(0x11a)][_0x3ea07a(0x122)](_0x41719d=>_0x41719d[_0x3ea07a(0x125)])[_0x3ea07a(0x134)](Boolean),_0x599b5f=_0x445720['length']?_0x3ea07a(0x133)+Array[_0x3ea07a(0x116)](new Set(_0x445720))[_0x3ea07a(0x138)](',\x20')+'.':_0x3ea07a(0x132)+CLI_BIN_NAME+_0x3ea07a(0x13c);throw CliErrors[_0x3ea07a(0x11f)](_0x3ea07a(0x109)+_0x4c0352[_0x3ea07a(0x125)]+_0x3ea07a(0x11c),_0x599b5f);}function writeWorkspaceConfig(_0x2a5220,_0x51f396,_0x541bd2){const _0x3129c5=a86_0x545e2c;_0x2a5220[_0x3129c5(0x118)]&&(_0x541bd2[_0x3129c5(0x10f)]=_0x2a5220[_0x3129c5(0x10f)]);if(_0x2a5220['appName']){const _0x51bbbf=isRecord(_0x541bd2[_0x3129c5(0x10d)])?{..._0x541bd2[_0x3129c5(0x10d)]}:{},_0x9c5433=isRecord(_0x51bbbf[_0x2a5220[_0x3129c5(0x125)]])?_0x51bbbf[_0x2a5220[_0x3129c5(0x125)]]:{};return _0x51bbbf[_0x2a5220[_0x3129c5(0x125)]]={..._0x9c5433,'appcode':_0x2a5220[_0x3129c5(0x10e)]},_0x541bd2[_0x3129c5(0x10d)]=_0x51bbbf,_0x541bd2[_0x3129c5(0x113)]=_0x2a5220[_0x3129c5(0x125)],delete _0x541bd2['appcode'],delete _0x541bd2[_0x3129c5(0x124)],writeAndReturn(_0x51f396,_0x541bd2);}return _0x541bd2['appcode']=_0x2a5220[_0x3129c5(0x10e)],delete _0x541bd2[_0x3129c5(0x113)],delete _0x541bd2[_0x3129c5(0x124)],writeAndReturn(_0x51f396,_0x541bd2);}function writeAndReturn(_0x694f7b,_0x5459c8){return writeConfigFile(_0x694f7b,_0x5459c8),_0x694f7b;}function resolveWorkspaceEnv(_0x9076e){const _0x2d60ac=a86_0x545e2c;if(RUNTIME_ENV_VALUES['includes'](_0x9076e))return _0x9076e;throw CliErrors[_0x2d60ac(0x11f)](_0x2d60ac(0x142)+_0x9076e+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x2d60ac(0x138)](',\x20'));}function buildWorkspaceMessage(_0x376b1a,_0x5ed801,_0x429478,_0x38f566){const _0x538343=a86_0x545e2c,_0x519fac=_0x5ed801?_0x5ed801+'\x20('+_0x429478+')':_0x429478,_0x13ffa1=_0x38f566?_0x538343(0x12b)+_0x38f566:'';return _0x538343(0x131)+_0x376b1a+_0x538343(0x110)+_0x519fac+_0x13ffa1+_0x538343(0x120);}function isRecord(_0x444943){const _0x56cf56=a86_0x545e2c;return typeof _0x444943===_0x56cf56(0x127)&&_0x444943!==null&&!Array[_0x56cf56(0x12d)](_0x444943);}function hasWorkspaceAppBinding(_0x5eebd5){const _0x1a29d0=a86_0x545e2c;if(typeof _0x5eebd5['appcode']===_0x1a29d0(0x12f)&&_0x5eebd5[_0x1a29d0(0x10e)][_0x1a29d0(0x12a)]()[_0x1a29d0(0x12c)]>0x0)return!![];if(typeof _0x5eebd5['defaultApp']!==_0x1a29d0(0x12f)||!_0x5eebd5[_0x1a29d0(0x113)][_0x1a29d0(0x12a)]())return![];if(!isRecord(_0x5eebd5['apps']))return![];const _0x5b1f4f=_0x5eebd5['apps'][_0x5eebd5['defaultApp']['trim']()];return isRecord(_0x5b1f4f)&&typeof _0x5b1f4f[_0x1a29d0(0x10e)]===_0x1a29d0(0x12f)&&_0x5b1f4f[_0x1a29d0(0x10e)][_0x1a29d0(0x12a)]()[_0x1a29d0(0x12c)]>0x0;}function assertWorkspaceCommandState(_0x23dd74,_0x36712e){const _0x4cfad9=a86_0x545e2c,_0x228623=hasWorkspaceAppBinding(_0x36712e);if(_0x23dd74===_0x4cfad9(0x121)&&_0x228623)throw CliErrors[_0x4cfad9(0x11f)](_0x4cfad9(0x10c),_0x4cfad9(0x141)+CLI_BIN_NAME+_0x4cfad9(0x11e)+CLI_BIN_NAME+_0x4cfad9(0x11b));if(_0x23dd74==='use'&&!_0x228623)throw CliErrors[_0x4cfad9(0x11f)]('Workspace\x20app\x20context\x20is\x20not\x20initialized.',_0x4cfad9(0x132)+CLI_BIN_NAME+_0x4cfad9(0x106)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');}function makeWorkspaceCommand(_0x486c33){const _0x27414b=a86_0x545e2c;return{'service':_0x27414b(0x130),'command':_0x486c33,'description':_0x486c33===_0x27414b(0x121)?_0x27414b(0xfe):_0x27414b(0x104),'risk':_0x27414b(0x114),'confirmationDescription':_0x486c33===_0x27414b(0x121)?_0x27414b(0x108):_0x27414b(0x11d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x494c72){return executeWorkspaceUse(_0x494c72,_0x486c33);}};}export const workspaceDefinitions=[makeWorkspaceCommand('init'),makeWorkspaceCommand(a86_0x545e2c(0x103))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a87_0x54c8(){const _0x4097ce=['entries','Default\x20page\x20size','defaultValue','12vbIKEu','2904384WuLmDF','Risk\x20level','enumValues','cliSettableTopLevel','351665kbfhfv','legacyCompatOnly','Override\x20SkillHub\x20domain','riskLevel','filter','Default\x20output\x20format','53236rbbNzJ','map','Override\x20user\x20domain',';\x20local\x20alias:\x20apps.<alias>.appcode','24yeDktK','format','Access\x20key\x20(client-ak\x20auth)','has','1218222XzFVcv','143804bjDKXo','5886710elfPsr','join','Locale','Override\x20API\x20domain','fromEntries','locale','Target\x20environment','24HGLwYv','940205wpMXnQ'];a87_0x54c8=function(){return _0x4097ce;};return a87_0x54c8();}const a87_0x1614f5=a87_0x4f80;(function(_0xfea37b,_0x329fc3){const _0x36184e=a87_0x4f80,_0x5960aa=_0xfea37b();while(!![]){try{const _0x3835f8=-parseInt(_0x36184e(0x132))/0x1+parseInt(_0x36184e(0x141))/0x2+parseInt(_0x36184e(0x149))/0x3*(-parseInt(_0x36184e(0x138))/0x4)+parseInt(_0x36184e(0x14a))/0x5*(parseInt(_0x36184e(0x12d))/0x6)+parseInt(_0x36184e(0x12e))/0x7+parseInt(_0x36184e(0x13c))/0x8*(parseInt(_0x36184e(0x140))/0x9)+-parseInt(_0x36184e(0x142))/0xa;if(_0x3835f8===_0x329fc3)break;else _0x5960aa['push'](_0x5960aa['shift']());}catch(_0x21173c){_0x5960aa['push'](_0x5960aa['shift']());}}}(a87_0x54c8,0x363d2));function a87_0x4f80(_0x1c6983,_0x2b5af6){_0x1c6983=_0x1c6983-0x12a;const _0x54c820=a87_0x54c8();let _0x4f8001=_0x54c820[_0x1c6983];return _0x4f8001;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a87_0x1614f5(0x148),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['env'],'importable':!![]},'format':{'description':a87_0x1614f5(0x137),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x1614f5(0x13d)],'importable':!![]},'pageSize':{'description':a87_0x1614f5(0x12b),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a87_0x1614f5(0x145),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a87_0x1614f5(0x13a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a87_0x1614f5(0x134),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a87_0x1614f5(0x13e),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a87_0x1614f5(0x12f),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x1614f5(0x135)],'importable':!![]},'locale':{'description':a87_0x1614f5(0x144),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x1614f5(0x147)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x36652e])=>_0x36652e[a87_0x1614f5(0x131)])[a87_0x1614f5(0x139)](([_0x54d7ec])=>_0x54d7ec));export const CONFIG_ENUM_VALUES=Object[a87_0x1614f5(0x146)](Object[a87_0x1614f5(0x12a)](CONFIG_FIELD_SCHEMAS)[a87_0x1614f5(0x136)](([,_0x57960b])=>_0x57960b[a87_0x1614f5(0x130)])[a87_0x1614f5(0x139)](([_0x2a6173,_0x40ac40])=>[_0x2a6173,[..._0x40ac40[a87_0x1614f5(0x130)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a87_0x1614f5(0x12a)](CONFIG_FIELD_SCHEMAS)[a87_0x1614f5(0x136)](([,_0x1d2324])=>_0x1d2324['importable'])[a87_0x1614f5(0x139)](([_0x42ba5c])=>_0x42ba5c);export function getConfigFieldSchema(_0x1b12a9){return CONFIG_FIELD_SCHEMAS[_0x1b12a9];}export function getConfigEnumValues(_0x25abd1){const _0xcd0865=a87_0x1614f5;return getConfigFieldSchema(_0x25abd1)?.[_0xcd0865(0x130)];}export function getConfigDefaultValue(_0x45c3c3){const _0x1ecdc9=a87_0x1614f5;return getConfigFieldSchema(_0x45c3c3)?.[_0x1ecdc9(0x12c)];}export function isTopLevelConfigKey(_0xdfc54){const _0x27e891=a87_0x1614f5;return TOP_LEVEL_CONFIG_KEYS[_0x27e891(0x13f)](_0xdfc54);}export function isLegacyCompatConfigKey(_0x50cd6){const _0x2955bb=a87_0x1614f5;return getConfigFieldSchema(_0x50cd6)?.[_0x2955bb(0x133)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x547674){const _0x43f689=a87_0x1614f5;return[..._0x547674][_0x43f689(0x143)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x5c7952=a87_0x1614f5;return'Config\x20key.\x20Top-level:\x20'+getTopLevelConfigKeySummary()+_0x5c7952(0x13b);}export function buildAppProfileListFields(_0x5a2d1b){return{'env':_0x5a2d1b,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x5a27f7=a88_0x3f36;(function(_0x27c496,_0x42311c){const _0x6a1204=a88_0x3f36,_0x22760f=_0x27c496();while(!![]){try{const _0x580ddf=-parseInt(_0x6a1204(0x7b))/0x1+parseInt(_0x6a1204(0x76))/0x2+parseInt(_0x6a1204(0x73))/0x3+parseInt(_0x6a1204(0x7f))/0x4*(parseInt(_0x6a1204(0x75))/0x5)+-parseInt(_0x6a1204(0x7e))/0x6*(-parseInt(_0x6a1204(0x7c))/0x7)+parseInt(_0x6a1204(0x74))/0x8*(-parseInt(_0x6a1204(0x78))/0x9)+-parseInt(_0x6a1204(0x7d))/0xa;if(_0x580ddf===_0x42311c)break;else _0x22760f['push'](_0x22760f['shift']());}catch(_0x28f7c3){_0x22760f['push'](_0x22760f['shift']());}}}(a88_0x9d95,0x21c2c));export const APP_PUBLISH_STATUS={'Published':a88_0x5a27f7(0x79),'Unpublished':a88_0x5a27f7(0x7a)};function a88_0x3f36(_0x4f4b7a,_0x2c0248){_0x4f4b7a=_0x4f4b7a-0x73;const _0x9d952c=a88_0x9d95();let _0x3f362f=_0x9d952c[_0x4f4b7a];return _0x3f362f;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a88_0x5a27f7(0x77)];function a88_0x9d95(){const _0x54e205=['PUBLISHED','UNPUBLISH','174465yBKDAA','14aonVtG','1630020UKHWmf','616794lZAWGT','124876ONDHFT','750807YXVlcL','8NmdRyt','10AqauvW','464398lfKoaO','Published','2472777AFmOdX'];a88_0x9d95=function(){return _0x54e205;};return a88_0x9d95();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57894b,_0x40c8d9){const _0x2f8a16=a89_0x3150,_0x4c3fcb=_0x57894b();while(!![]){try{const _0x2b2aac=parseInt(_0x2f8a16(0x161))/0x1*(-parseInt(_0x2f8a16(0x15f))/0x2)+parseInt(_0x2f8a16(0x162))/0x3+-parseInt(_0x2f8a16(0x15d))/0x4+-parseInt(_0x2f8a16(0x164))/0x5+parseInt(_0x2f8a16(0x163))/0x6+parseInt(_0x2f8a16(0x160))/0x7*(-parseInt(_0x2f8a16(0x15c))/0x8)+-parseInt(_0x2f8a16(0x15e))/0x9*(-parseInt(_0x2f8a16(0x165))/0xa);if(_0x2b2aac===_0x40c8d9)break;else _0x4c3fcb['push'](_0x4c3fcb['shift']());}catch(_0x2a1dd5){_0x4c3fcb['push'](_0x4c3fcb['shift']());}}}(a89_0x3562,0x1cf01));export const AUTH_MODE={'ClientAk':'client-ak'};export function isAuthMode(_0x3eab9d){return _0x3eab9d===AUTH_MODE['ClientAk'];}function a89_0x3150(_0x50b738,_0x10038f){_0x50b738=_0x50b738-0x15c;const _0x356234=a89_0x3562();let _0x315097=_0x356234[_0x50b738];return _0x315097;}function a89_0x3562(){const _0x15c90e=['927496VhpsAh','38079HZLplT','50mNddJm','65933rgrIvY','925MojEdx','84168QNZsyV','1300440abiOKa','162245wXgGai','470mvPyXO','32pMuVwh'];a89_0x3562=function(){return _0x15c90e;};return a89_0x3562();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x1089c1=a90_0x55ca;(function(_0x21f34b,_0x59bdde){const _0x2d21e5=a90_0x55ca,_0x405181=_0x21f34b();while(!![]){try{const _0x291b48=-parseInt(_0x2d21e5(0x11f))/0x1+-parseInt(_0x2d21e5(0x105))/0x2+-parseInt(_0x2d21e5(0x11b))/0x3+-parseInt(_0x2d21e5(0xfb))/0x4+parseInt(_0x2d21e5(0x100))/0x5*(-parseInt(_0x2d21e5(0x118))/0x6)+-parseInt(_0x2d21e5(0x107))/0x7*(-parseInt(_0x2d21e5(0x114))/0x8)+parseInt(_0x2d21e5(0x10e))/0x9;if(_0x291b48===_0x59bdde)break;else _0x405181['push'](_0x405181['shift']());}catch(_0x439612){_0x405181['push'](_0x405181['shift']());}}}(a90_0x4a67,0x5cd08));function a90_0x55ca(_0x1a8a84,_0x23419a){_0x1a8a84=_0x1a8a84-0xf9;const _0x4a6707=a90_0x4a67();let _0x55caec=_0x4a6707[_0x1a8a84];return _0x55caec;}import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a90_0x1089c1(0x126)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a90_0x1089c1(0x12a),'type':'string','description':a90_0x1089c1(0x11a),'hint':a90_0x1089c1(0x109)},{'name':a90_0x1089c1(0x127),'meowKey':a90_0x1089c1(0x127),'type':'string','description':a90_0x1089c1(0xfc),'hint':a90_0x1089c1(0xfe)},{'name':'env','meowKey':a90_0x1089c1(0x117),'type':a90_0x1089c1(0x10c),'description':a90_0x1089c1(0x10d),'hint':a90_0x1089c1(0x11e)},{'name':'format','meowKey':'format','type':a90_0x1089c1(0x10c),'description':a90_0x1089c1(0x12d),'hint':a90_0x1089c1(0x120)},{'name':'jq','meowKey':'jq','type':a90_0x1089c1(0x10c),'description':a90_0x1089c1(0xfa),'hint':a90_0x1089c1(0x122)},{'name':a90_0x1089c1(0x108),'meowKey':a90_0x1089c1(0x128),'type':'boolean','description':a90_0x1089c1(0x103)},{'name':'yes','meowKey':a90_0x1089c1(0x111),'type':a90_0x1089c1(0x12b),'description':a90_0x1089c1(0xff)},{'name':'non-interactive','meowKey':a90_0x1089c1(0x116),'type':a90_0x1089c1(0x12b),'description':a90_0x1089c1(0x124)},{'name':a90_0x1089c1(0x125),'meowKey':a90_0x1089c1(0x125),'type':a90_0x1089c1(0x12b),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a90_0x1089c1(0x12b),'description':a90_0x1089c1(0x104),'hidden':!![]},{'name':a90_0x1089c1(0x106),'meowKey':a90_0x1089c1(0x106),'type':'boolean','description':a90_0x1089c1(0xfd)},{'name':'id','meowKey':'id','type':a90_0x1089c1(0x10c),'description':a90_0x1089c1(0x11d),'hidden':!![]},{'name':a90_0x1089c1(0x102),'meowKey':a90_0x1089c1(0x102),'type':a90_0x1089c1(0x10c),'description':a90_0x1089c1(0x10f),'hidden':!![]},{'name':a90_0x1089c1(0x112),'meowKey':'sqlcode','type':a90_0x1089c1(0x10c),'description':a90_0x1089c1(0x121),'hidden':!![]},{'name':a90_0x1089c1(0xf9),'meowKey':a90_0x1089c1(0xf9),'type':a90_0x1089c1(0x10c),'description':a90_0x1089c1(0x129),'hidden':!![]},{'name':a90_0x1089c1(0x110),'meowKey':a90_0x1089c1(0x110),'type':a90_0x1089c1(0x12b),'description':a90_0x1089c1(0x11c),'hidden':!![]},{'name':a90_0x1089c1(0x123),'meowKey':a90_0x1089c1(0x123),'type':'boolean','description':a90_0x1089c1(0x10b),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a90_0x1089c1(0x127),a90_0x1089c1(0x117),a90_0x1089c1(0x101),'jq',a90_0x1089c1(0x108),a90_0x1089c1(0x111),a90_0x1089c1(0x115),'ci']);export function buildMeowFlags(){const _0x1daf90=a90_0x1089c1;return Object[_0x1daf90(0x119)](GLOBAL_FLAGS[_0x1daf90(0x113)](_0x123ca1=>[_0x123ca1[_0x1daf90(0x12c)],{'type':_0x123ca1[_0x1daf90(0x10a)]}]));}function a90_0x4a67(){const _0xe51973=['Force\x20non-interactive\x20mode\x20(CI)','global','cliDisplayName','app','dryRun','JSON\x20params\x20for\x20execute\x20commands','appcode','boolean','meowKey','Output\x20format','params','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','1005060EcjLby','Select\x20app\x20profile\x20by\x20name','Show\x20help','<name>','Skip\x20confirmation\x20for\x20high-risk\x20writes','387070xZfMvq','format','name','Preview\x20operation\x20without\x20executing','Alias\x20for\x20--non-interactive','995842PNleYT','help','291893oekkKB','dry-run','<code>','type','Clear\x20output','string','Environment','15403770MBLnQP','Name\x20filter','verbose','yes','sqlcode','map','32bzuiBQ','non-interactive','nonInteractive','env','6CdQRJK','fromEntries','Override\x20appcode','152631lKZKdS','Verbose\x20output','Record\x20ID','production\x20|\x20development\x20|\x20daily','620681BWulsb','json\x20|\x20pretty\x20|\x20compress','SQL\x20query\x20code','<expr>','clear'];a90_0x4a67=function(){return _0xe51973;};return a90_0x4a67();}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x6dce(){const _0x2d8bac=['main','6997952UXiPlJ','1204470TeCBXu','3pTfciP','compress','2956512Wtjrzo','417781oOLRPu','42RTnEIn','535535HBLLdR','2714134hGtoAk','9EDgMNx','production','en-US','242430OPckAZ'];a91_0x6dce=function(){return _0x2d8bac;};return a91_0x6dce();}const a91_0x2a3e4c=a91_0x45ed;(function(_0x4565e1,_0x4cd5e6){const _0x48a6e3=a91_0x45ed,_0x1b8ab2=_0x4565e1();while(!![]){try{const _0x49bc45=-parseInt(_0x48a6e3(0x1b2))/0x1+-parseInt(_0x48a6e3(0x1bc))/0x2*(-parseInt(_0x48a6e3(0x1b6))/0x3)+parseInt(_0x48a6e3(0x1b8))/0x4+parseInt(_0x48a6e3(0x1bb))/0x5+parseInt(_0x48a6e3(0x1ba))/0x6*(-parseInt(_0x48a6e3(0x1b9))/0x7)+-parseInt(_0x48a6e3(0x1b4))/0x8+-parseInt(_0x48a6e3(0x1bd))/0x9*(-parseInt(_0x48a6e3(0x1b5))/0xa);if(_0x49bc45===_0x4cd5e6)break;else _0x1b8ab2['push'](_0x1b8ab2['shift']());}catch(_0x584241){_0x1b8ab2['push'](_0x1b8ab2['shift']());}}}(a91_0x6dce,0xc093a));export const DEFAULT_APP_PROFILE_NAME=a91_0x2a3e4c(0x1b3);function a91_0x45ed(_0x7852cc,_0x531ec9){_0x7852cc=_0x7852cc-0x1b2;const _0x6dce20=a91_0x6dce();let _0x45ed4d=_0x6dce20[_0x7852cc];return _0x45ed4d;}export const DEFAULT_CONFIG_VALUES={'env':a91_0x2a3e4c(0x1be),'format':a91_0x2a3e4c(0x1b7),'locale':a91_0x2a3e4c(0x1bf),'riskLevel':'write'};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a91_0x2a3e4c(0x1b7);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a92_0x3f98(_0x50f5b0,_0x2299cf){_0x50f5b0=_0x50f5b0-0xbe;const _0x1b7ced=a92_0x1b7c();let _0x3f98de=_0x1b7ced[_0x50f5b0];return _0x3f98de;}const a92_0x275e36=a92_0x3f98;function a92_0x1b7c(){const _0x11dda7=['6982510YtMxsY','6544DZxusu','885sJfgCw','2Gkokjl','11673409ONKHLJ','3303DhTpkp','skillSource','npmRegistryBaseUrl','641496QyJrLe','15812NnDJEz','474BjEEeM','1643964zaxAXa','58443PwREHW'];a92_0x1b7c=function(){return _0x11dda7;};return a92_0x1b7c();}(function(_0x2a2e37,_0x2e75ff){const _0x566966=a92_0x3f98,_0xb27dc2=_0x2a2e37();while(!![]){try{const _0x283790=parseInt(_0x566966(0xc7))/0x1*(parseInt(_0x566966(0xbf))/0x2)+parseInt(_0x566966(0xc2))/0x3+parseInt(_0x566966(0xc0))/0x4*(-parseInt(_0x566966(0xc6))/0x5)+parseInt(_0x566966(0xc1))/0x6*(parseInt(_0x566966(0xc3))/0x7)+-parseInt(_0x566966(0xc5))/0x8*(parseInt(_0x566966(0xc9))/0x9)+parseInt(_0x566966(0xc4))/0xa+-parseInt(_0x566966(0xc8))/0xb;if(_0x283790===_0x2e75ff)break;else _0xb27dc2['push'](_0xb27dc2['shift']());}catch(_0x443cf9){_0xb27dc2['push'](_0xb27dc2['shift']());}}}(a92_0x1b7c,0x76b38));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a92_0x275e36(0xca)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a92_0x275e36(0xbe)];
|
package/lib/constant/domain.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare function initDomains(domains?: {
|
|
|
38
38
|
*/
|
|
39
39
|
export declare const getUserDomain: () => string;
|
|
40
40
|
/**
|
|
41
|
-
* Returns the primary API domain for management operations (datasets, SQL,
|
|
41
|
+
* Returns the primary API domain for management operations (datasets, SQL, Backend Function).
|
|
42
42
|
*
|
|
43
43
|
* Why the domain changes based on env: production and staging (daily) have
|
|
44
44
|
* separate infrastructure. Development uses the same staging API — there is no
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a93_0x3e89(_0x1ba24f,_0xbbcc06){_0x1ba24f=_0x1ba24f-0x16f;const _0x25b3c8=a93_0x25b3();let _0x3e89e2=_0x25b3c8[_0x1ba24f];return _0x3e89e2;}const a93_0x543e0c=a93_0x3e89;(function(_0x3a4309,_0x4b4d1a){const _0x5ade19=a93_0x3e89,_0x45af3a=_0x3a4309();while(!![]){try{const _0x449e20=-parseInt(_0x5ade19(0x17b))/0x1+parseInt(_0x5ade19(0x17c))/0x2*(-parseInt(_0x5ade19(0x17a))/0x3)+-parseInt(_0x5ade19(0x173))/0x4*(-parseInt(_0x5ade19(0x175))/0x5)+parseInt(_0x5ade19(0x179))/0x6*(parseInt(_0x5ade19(0x176))/0x7)+-parseInt(_0x5ade19(0x177))/0x8*(-parseInt(_0x5ade19(0x17f))/0x9)+parseInt(_0x5ade19(0x181))/0xa*(parseInt(_0x5ade19(0x180))/0xb)+parseInt(_0x5ade19(0x171))/0xc*(parseInt(_0x5ade19(0x174))/0xd);if(_0x449e20===_0x4b4d1a)break;else _0x45af3a['push'](_0x45af3a['shift']());}catch(_0x2e54dc){_0x45af3a['push'](_0x45af3a['shift']());}}}(a93_0x25b3,0x59e44));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x15091){const _0xdb18cc=a93_0x3e89;customApiDomain=_0x15091?.['apiDomain'],customUserDomain=_0x15091?.[_0xdb18cc(0x183)],customRuntimeDomain=_0x15091?.[_0xdb18cc(0x170)],customSkillHubDomain=_0x15091?.[_0xdb18cc(0x182)];}function a93_0x25b3(){const _0x173cb6=['6wfAqYT','1266231fZwhMQ','439220FnLgwE','2qurRri','production','nonProduction','63MBbgqj','11FekEtW','579590ooahdB','skillHubDomain','userDomain','skillhub','runtimeDomain','2309136MjHOzA','domains','36fOSyHq','13sgCNOZ','154670HVPTLA','2590091ALkPWB','377928hFnsKv','user'];a93_0x25b3=function(){return _0x173cb6;};return a93_0x25b3();}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x543e0c(0x172)][a93_0x543e0c(0x17d)]['user']:PRODUCT_CONFIG['domains'][a93_0x543e0c(0x17e)][a93_0x543e0c(0x178)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x543e0c(0x172)][a93_0x543e0c(0x17d)]['api']:PRODUCT_CONFIG[a93_0x543e0c(0x172)][a93_0x543e0c(0x17e)]['api']);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains']['production']['runtime']:PRODUCT_CONFIG[a93_0x543e0c(0x172)][a93_0x543e0c(0x17e)]['runtime']);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x543e0c(0x172)][a93_0x543e0c(0x17d)][a93_0x543e0c(0x16f)]:PRODUCT_CONFIG[a93_0x543e0c(0x172)][a93_0x543e0c(0x17e)][a93_0x543e0c(0x16f)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a94_0x299719=a94_0x3875;function a94_0x3ea8(){const _0x3e66c3=['ENV','420896HdSKrM','online','1046118HRjDVC','daily','3568509QiRBAh','18835000ZBaFeb','4Blfmqo','production','3942808lROjkh','development','94292MCctQa','7426706EIYPRC','6RkvzTp','205MGPucB'];a94_0x3ea8=function(){return _0x3e66c3;};return a94_0x3ea8();}(function(_0x4ee4b,_0x145023){const _0x59e7ba=a94_0x3875,_0x3d5d82=_0x4ee4b();while(!![]){try{const _0x836a33=-parseInt(_0x59e7ba(0x1ae))/0x1*(parseInt(_0x59e7ba(0x1a5))/0x2)+parseInt(_0x59e7ba(0x1a1))/0x3+-parseInt(_0x59e7ba(0x1a9))/0x4*(parseInt(_0x59e7ba(0x1ac))/0x5)+parseInt(_0x59e7ba(0x1ab))/0x6*(parseInt(_0x59e7ba(0x1aa))/0x7)+-parseInt(_0x59e7ba(0x1a7))/0x8+-parseInt(_0x59e7ba(0x1a3))/0x9+parseInt(_0x59e7ba(0x1a4))/0xa;if(_0x836a33===_0x145023)break;else _0x3d5d82['push'](_0x3d5d82['shift']());}catch(_0x4d45ac){_0x3d5d82['push'](_0x3d5d82['shift']());}}}(a94_0x3ea8,0x91647));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a94_0x299719(0x1a8),a94_0x299719(0x1a2)];export function normalizeEnv(_0x81f5c){const _0x158b7a=a94_0x299719;return _0x81f5c===_0x158b7a(0x1af)?_0x158b7a(0x1a6):_0x81f5c;}export function isProduction(_0x241a38){return normalizeEnv(_0x241a38)==='production';}export function isDaily(_0x3d10b8){return normalizeEnv(_0x3d10b8)==='daily';}function a94_0x3875(_0x1691d5,_0x327113){_0x1691d5=_0x1691d5-0x1a1;const _0x3ea805=a94_0x3ea8();let _0x387550=_0x3ea805[_0x1691d5];return _0x387550;}export function isDev(_0x684d22){const _0x46b2c2=a94_0x299719,_0x49f45b=normalizeEnv(_0x684d22);return _0x49f45b===_0x46b2c2(0x1a8)||_0x49f45b==='dev';}let env=normalizeEnv(productEnv(a94_0x299719(0x1ad))||a94_0x299719(0x1a6));export function getEnv(){return env;}export function initEnv(_0x263e6f){env=normalizeEnv(_0x263e6f);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a95_0x2a1c(_0x1e1ae6,_0x5c5117){_0x1e1ae6=_0x1e1ae6-0xe3;const _0x15b099=a95_0x15b0();let _0x2a1c23=_0x15b099[_0x1e1ae6];return _0x2a1c23;}const a95_0x308aa1=a95_0x2a1c;(function(_0x5bfab0,_0x25208b){const _0x30a2a5=a95_0x2a1c,_0x4f9bff=_0x5bfab0();while(!![]){try{const _0x4c2e4c=-parseInt(_0x30a2a5(0xeb))/0x1*(parseInt(_0x30a2a5(0xe8))/0x2)+-parseInt(_0x30a2a5(0xf0))/0x3+parseInt(_0x30a2a5(0xe5))/0x4*(parseInt(_0x30a2a5(0xe4))/0x5)+parseInt(_0x30a2a5(0xea))/0x6*(parseInt(_0x30a2a5(0xee))/0x7)+-parseInt(_0x30a2a5(0xe7))/0x8*(parseInt(_0x30a2a5(0xe6))/0x9)+parseInt(_0x30a2a5(0xe9))/0xa*(-parseInt(_0x30a2a5(0xed))/0xb)+parseInt(_0x30a2a5(0xec))/0xc;if(_0x4c2e4c===_0x25208b)break;else _0x4f9bff['push'](_0x4f9bff['shift']());}catch(_0x533b2a){_0x4f9bff['push'](_0x4f9bff['shift']());}}}(a95_0x15b0,0x3c699));export const OUTPUT_FORMAT_VALUES=['json',a95_0x308aa1(0xef),a95_0x308aa1(0xe3)];function a95_0x15b0(){const _0x277f9a=['compress','335ofAHLb','13372tmCrYF','3910104kbQDBL','8cuyoIH','319778fXSDRl','13710YwJqpl','47868LaDyoR','1ddrcaN','15075720OxYIfQ','2233QYoyCn','21tZHYIg','pretty','1152354yFFump'];a95_0x15b0=function(){return _0x277f9a;};return a95_0x15b0();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x42e2a1=a96_0x4aa0;(function(_0x55b7ba,_0x965ece){const _0x5c3abf=a96_0x4aa0,_0x44c44d=_0x55b7ba();while(!![]){try{const _0xd1bad=-parseInt(_0x5c3abf(0x15c))/0x1+parseInt(_0x5c3abf(0x145))/0x2*(parseInt(_0x5c3abf(0x148))/0x3)+-parseInt(_0x5c3abf(0x154))/0x4*(parseInt(_0x5c3abf(0x149))/0x5)+-parseInt(_0x5c3abf(0x151))/0x6+-parseInt(_0x5c3abf(0x15d))/0x7*(-parseInt(_0x5c3abf(0x147))/0x8)+parseInt(_0x5c3abf(0x153))/0x9+parseInt(_0x5c3abf(0x152))/0xa;if(_0xd1bad===_0x965ece)break;else _0x44c44d['push'](_0x44c44d['shift']());}catch(_0x1820d3){_0x44c44d['push'](_0x44c44d['shift']());}}}(a96_0x1a88,0x389e9));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a96_0x42e2a1(0x15f),'npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a96_0x42e2a1(0x14d),'internalSkillSource':a96_0x42e2a1(0x158),'globalSkillName':'lovrabet','npmRegistryBaseUrl':'https://registry.npmjs.org','envPrefix':a96_0x42e2a1(0x15a),'legacyEnvPrefixes':[a96_0x42e2a1(0x14f)],'configFileNames':[a96_0x42e2a1(0x15e),a96_0x42e2a1(0x15b)],'newConfigFileName':a96_0x42e2a1(0x15e),'homeDirName':'.lovrabet','logFileName':'.lovrabet-runtime.log','invokeSource':a96_0x42e2a1(0x156),'userCenterDisplayName':a96_0x42e2a1(0x157),'skipNpxSkillsEnvSuffix':a96_0x42e2a1(0x155),'domains':{'production':{'user':a96_0x42e2a1(0x14b),'api':'https://api.lovrabet.com','runtime':'https://runtime.lovrabet.com','skillhub':a96_0x42e2a1(0x159)},'nonProduction':{'user':a96_0x42e2a1(0x14c),'api':a96_0x42e2a1(0x146),'runtime':a96_0x42e2a1(0x14a),'skillhub':a96_0x42e2a1(0x14e)}},'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x443bba){return PRODUCT_CONFIG['envPrefix']+'_'+_0x443bba;}export function productEnvNames(_0x16bac1){const _0x57ea95=a96_0x42e2a1;return[productEnvName(_0x16bac1),...PRODUCT_CONFIG['legacyEnvPrefixes'][_0x57ea95(0x150)](_0xf46d06=>_0xf46d06+'_'+_0x16bac1)];}function a96_0x1a88(){const _0x3ad1c0=['.lovrabet.json','Lovrabet\x20Runtime\x20CLI','2DvKqsW','https://daily-api.lovrabet.com','3544WoSRWU','335193ETaNko','230ISTpFX','https://daily-runtime.lovrabet.com','https://user.lovrabet.com','https://user-daily.lovrabet.com','lovrabet/lovrabet-cli','https://skills-daily.lovrabet.com','RABETBASE','map','1427016oPBQtQ','4521350pSgkRP','1714923cVapPJ','7160eQHBJm','SKIP_NPX_SKILLS','cli:lovrabet-runtime','Lovrabet\x20User\x20Center','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','https://skills.lovrabet.com','LOVRABET','.lovrabetrc','454834SMzEaJ','3990GFKayH'];a96_0x1a88=function(){return _0x3ad1c0;};return a96_0x1a88();}function a96_0x4aa0(_0xef0f5,_0xc76d59){_0xef0f5=_0xef0f5-0x145;const _0x1a885f=a96_0x1a88();let _0x4aa0c4=_0x1a885f[_0xef0f5];return _0x4aa0c4;}export function productEnv(_0x2da7d6){for(const _0x56a230 of productEnvNames(_0x2da7d6)){const _0x20512e=process.env[_0x56a230];if(_0x20512e!==undefined)return _0x20512e;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x164fdf=a97_0x344b;function a97_0x344b(_0x1df636,_0x12f3e2){_0x1df636=_0x1df636-0x1c1;const _0x7fc7f2=a97_0x7fc7();let _0x344b91=_0x7fc7f2[_0x1df636];return _0x344b91;}function a97_0x7fc7(){const _0x3c5485=['10957821bADZBO','4459656eGQRNe','high-risk-write','1299810QrhGAC','271319JmAzfi','2486996IqXHNf','621284iXvQMa','3056562JBEUUT','read'];a97_0x7fc7=function(){return _0x3c5485;};return a97_0x7fc7();}(function(_0x1e22fb,_0x4d31e9){const _0x21c73e=a97_0x344b,_0x50dbf9=_0x1e22fb();while(!![]){try{const _0x35ab07=-parseInt(_0x21c73e(0x1c2))/0x1+parseInt(_0x21c73e(0x1c4))/0x2+-parseInt(_0x21c73e(0x1c5))/0x3+parseInt(_0x21c73e(0x1c3))/0x4+parseInt(_0x21c73e(0x1c1))/0x5+-parseInt(_0x21c73e(0x1c8))/0x6+parseInt(_0x21c73e(0x1c7))/0x7;if(_0x35ab07===_0x4d31e9)break;else _0x50dbf9['push'](_0x50dbf9['shift']());}catch(_0xa88c35){_0x50dbf9['push'](_0x50dbf9['shift']());}}}(a97_0x7fc7,0xb0d53));export const RISK_LEVEL_VALUES=[a97_0x164fdf(0x1c6),'write',a97_0x164fdf(0x1c9)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x16e193=a98_0x15bf;function a98_0x2de0(){const _0x20cd86=['135858qKOWgE','1388169FpSSDc','accessKeyCreatePath','1327032GhKApA','production','3ARqNbo','10mhpwHC','384400LPqwxt','210133hGRdQt','10TeGChE','379380PUuIrM','125476pDtLCB','domains'];a98_0x2de0=function(){return _0x20cd86;};return a98_0x2de0();}(function(_0x4b75d9,_0x44ae17){const _0xdc215a=a98_0x15bf,_0x40a2e8=_0x4b75d9();while(!![]){try{const _0x42dd57=parseInt(_0xdc215a(0x14c))/0x1+parseInt(_0xdc215a(0x14e))/0x2*(parseInt(_0xdc215a(0x146))/0x3)+parseInt(_0xdc215a(0x148))/0x4+parseInt(_0xdc215a(0x147))/0x5*(parseInt(_0xdc215a(0x14b))/0x6)+parseInt(_0xdc215a(0x149))/0x7+-parseInt(_0xdc215a(0x151))/0x8+-parseInt(_0xdc215a(0x14f))/0x9*(parseInt(_0xdc215a(0x14a))/0xa);if(_0x42dd57===_0x44ae17)break;else _0x40a2e8['push'](_0x40a2e8['shift']());}catch(_0x4aeec4){_0x40a2e8['push'](_0x40a2e8['shift']());}}}(a98_0x2de0,0x1eba8));function a98_0x15bf(_0x3af7e8,_0x3c6c36){_0x3af7e8=_0x3af7e8-0x145;const _0x2de0d2=a98_0x2de0();let _0x15bf69=_0x2de0d2[_0x3af7e8];return _0x15bf69;}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a98_0x16e193(0x14d)][a98_0x16e193(0x145)]['user']+PRODUCT_CONFIG[a98_0x16e193(0x150)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a99_0xf7f404=a99_0x5e78;(function(_0x1f6edb,_0x24a3cc){const _0x17893d=a99_0x5e78,_0x41c10f=_0x1f6edb();while(!![]){try{const _0x474339=-parseInt(_0x17893d(0xa6))/0x1*(parseInt(_0x17893d(0xad))/0x2)+-parseInt(_0x17893d(0xe0))/0x3*(parseInt(_0x17893d(0xda))/0x4)+-parseInt(_0x17893d(0xbc))/0x5*(-parseInt(_0x17893d(0xaf))/0x6)+-parseInt(_0x17893d(0xa0))/0x7*(-parseInt(_0x17893d(0xca))/0x8)+parseInt(_0x17893d(0x9c))/0x9+-parseInt(_0x17893d(0xae))/0xa+parseInt(_0x17893d(0xd8))/0xb*(-parseInt(_0x17893d(0xdf))/0xc);if(_0x474339===_0x24a3cc)break;else _0x41c10f['push'](_0x41c10f['shift']());}catch(_0x5a7781){_0x41c10f['push'](_0x41c10f['shift']());}}}(a99_0x3ea9,0x9d032));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a99_0xf7f404(0xb4)];function resolveConfigPath(_0x1b6f11){for(const _0x1daafd of CONFIG_NAMES){const _0x1ab26c=resolve(_0x1b6f11,_0x1daafd);if(existsSync(_0x1ab26c))return _0x1ab26c;}return undefined;}export function resolveWriteConfigPath(_0x5a4c86){const _0x5cc28a=a99_0xf7f404,_0x3d66ac=_0x5a4c86==='project'?process[_0x5cc28a(0x9f)]():homedir(),_0x34339d=resolveConfigPath(_0x3d66ac);return _0x34339d??resolve(_0x3d66ac,NEW_CONFIG_NAME);}export function readConfigFile(_0x5dbcdf){try{if(existsSync(_0x5dbcdf)){const _0x4750d9=readFileSync(_0x5dbcdf,{'encoding':'utf8'});if(_0x4750d9){const _0x3701d2=JSON['parse'](_0x4750d9);return migrateOnlineEnv(_0x5dbcdf,_0x3701d2),_0x3701d2;}}}catch{}return{};}function migrateOnlineEnv(_0x168df8,_0x272347){const _0x1f77fd=a99_0xf7f404;let _0x256e51=![];_0x272347[_0x1f77fd(0xc9)]===_0x1f77fd(0xe2)&&(_0x272347[_0x1f77fd(0xc9)]=_0x1f77fd(0xa8),_0x256e51=!![]);if(_0x272347['apps']&&typeof _0x272347[_0x1f77fd(0xbb)]===_0x1f77fd(0xb0))for(const _0xf6b2f7 of Object['values'](_0x272347[_0x1f77fd(0xbb)])){_0xf6b2f7&&_0xf6b2f7[_0x1f77fd(0xc9)]===_0x1f77fd(0xe2)&&(_0xf6b2f7['env']=_0x1f77fd(0xa8),_0x256e51=!![]);}if(_0x256e51)try{writeConfigFile(_0x168df8,_0x272347);}catch{}}export function writeConfigFile(_0x25b2f9,_0x109b76){const _0x33b9cc=a99_0xf7f404,_0x51c891=dirname(_0x25b2f9);!existsSync(_0x51c891)&&mkdirSync(_0x51c891,{'recursive':!![]});const _0x3544e1=_0x25b2f9+_0x33b9cc(0xd4);try{writeFileSync(_0x3544e1,JSON[_0x33b9cc(0xa4)](_0x109b76,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x3544e1,_0x25b2f9);}catch(_0x45e9c7){if(_0x45e9c7[_0x33b9cc(0xa7)]==='EPERM'||_0x45e9c7[_0x33b9cc(0xa7)]===_0x33b9cc(0xdc)||_0x45e9c7[_0x33b9cc(0xa7)]===_0x33b9cc(0xa1)){writeFileSync(_0x25b2f9,JSON[_0x33b9cc(0xa4)](_0x109b76,null,0x2)+'\x0a',{'encoding':_0x33b9cc(0xa2)});try{unlinkSync(_0x3544e1);}catch{}}else throw _0x45e9c7;}}catch(_0x54ab73){try{unlinkSync(_0x3544e1);}catch{}throw _0x54ab73;}}export function isNonInteractiveMode(_0x2a0349){const _0x2b452b=a99_0xf7f404;return!!(_0x2a0349[_0x2b452b(0xba)]||_0x2a0349['ci']||productEnvNames('CI')[_0x2b452b(0xa3)](_0x2b13b7=>process.env[_0x2b13b7]==='true')||process.env.CI==='true'||!process['stdout'][_0x2b452b(0xcf)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1597e7=a99_0xf7f404;if(!process[_0x1597e7(0xd6)][_0x1597e7(0xcf)])return![];try{const _0x495d27=process['stdin'][_0x1597e7(0xc0)];return process[_0x1597e7(0xd6)][_0x1597e7(0xb3)](!![]),process[_0x1597e7(0xd6)]['setRawMode'](_0x495d27??![]),!![];}catch{return![];}}export async function createContext(_0x4de388){const _0x2762ca=a99_0xf7f404,_0x1a3c17=readRawConfig(),_0x2b116f=buildConfig(_0x1a3c17,_0x4de388);await initGlobalEnvironment(_0x2b116f);const {getUserDomain:_0x3cfdfb,getApiDomain:_0x2714c4}=await import(_0x2762ca(0xac)),_0x3a9f3f={'apiDomain':_0x2714c4(),'userDomain':_0x3cfdfb()},_0x3999c4=await buildAuth(_0x2b116f);logger[_0x2762ca(0xb7)](process['cwd']());const _0x31c3d6=(CLI_BIN_NAME+'\x20'+process['argv'][_0x2762ca(0xb6)](0x2)[_0x2762ca(0xc8)]('\x20'))[_0x2762ca(0xdd)]();logger['setRawCommand'](_0x31c3d6);const _0x2456a2=isNonInteractiveMode(_0x4de388);return{'config':_0x2b116f,'auth':_0x3999c4,'logger':logger,'env':_0x3a9f3f,'nonInteractive':_0x2456a2};}export function buildConfigFromFlags(_0xfb8231){return buildConfig(readRawConfig(),_0xfb8231);}export function getLocalAppAliases(_0x2abfcb){const _0x5a64a0=a99_0xf7f404;return _0x2abfcb[_0x5a64a0(0xbb)]&&typeof _0x2abfcb[_0x5a64a0(0xbb)]==='object'?_0x2abfcb[_0x5a64a0(0xbb)]:{};}export function resolveLocalAppAliasCode(_0x578a74,_0x38a490){const _0x2aae6e=a99_0xf7f404;if(!_0x38a490)return undefined;const _0x59c41e=getLocalAppAliases(_0x578a74)[_0x38a490],_0x16f6a9=_0x59c41e?.[_0x2aae6e(0xc2)];return typeof _0x16f6a9===_0x2aae6e(0xd1)&&_0x16f6a9[_0x2aae6e(0xdd)]()?_0x16f6a9['trim']():undefined;}export function readAppCodeFromConfig(){const _0x2d2e09=a99_0xf7f404,_0x2ce2d9=readRawConfig(),_0x5d51e9=_0x2ce2d9[_0x2d2e09(0xc2)]??_0x2ce2d9[_0x2d2e09(0x9e)];if(typeof _0x5d51e9===_0x2d2e09(0xd1)&&_0x5d51e9['trim']())return _0x5d51e9['trim']();const _0x53a3ff=resolveLocalAppAliasCode(_0x2ce2d9,typeof _0x2ce2d9['defaultApp']===_0x2d2e09(0xd1)?_0x2ce2d9['defaultApp']:undefined);if(_0x53a3ff)return _0x53a3ff;const _0x2e3683=normalizeEnv(String(_0x2ce2d9[_0x2d2e09(0xc9)]||_0x2d2e09(0xa8))),_0x1ca47f=isDaily(_0x2e3683)?_0x2d2e09(0xb8):isDev(_0x2e3683)?'development':_0x2d2e09(0xa8),_0xe34ce6=resolveCachedAppCode(typeof _0x2ce2d9[_0x2d2e09(0xab)]==='string'?_0x2ce2d9['defaultApp']:undefined,_0x1ca47f,typeof _0x2ce2d9['accessKey']===_0x2d2e09(0xd1)?_0x2ce2d9[_0x2d2e09(0xd0)]:undefined);if(_0xe34ce6)return _0xe34ce6;const _0x19e2c5=Object[_0x2d2e09(0xc4)](getLocalAppAliases(_0x2ce2d9))['find'](_0x241252=>_0x241252?.[_0x2d2e09(0xc2)]);return typeof _0x19e2c5?.['appcode']===_0x2d2e09(0xd1)&&_0x19e2c5[_0x2d2e09(0xc2)][_0x2d2e09(0xdd)]()?_0x19e2c5['appcode'][_0x2d2e09(0xdd)]():undefined;}export function readScopedConfig(_0x4c25d5){const _0x57be47=a99_0xf7f404,_0xe4f1e=_0x4c25d5[_0x57be47(0xc3)]?'global':'project';return readConfigFile(resolveWriteConfigPath(_0xe4f1e));}export function writeScopedConfig(_0x1285da,_0x141531){const _0x5f4a3d=a99_0xf7f404,_0xac59cd=_0x141531[_0x5f4a3d(0xc3)]?_0x5f4a3d(0xc3):_0x5f4a3d(0xb9);writeConfigFile(resolveWriteConfigPath(_0xac59cd),_0x1285da);}export async function initGlobalEnvironment(_0x562113){const _0x4aeb69=a99_0xf7f404,{initEnv:_0x5102af}=await import('./constant/env.js');_0x5102af(_0x562113[_0x4aeb69(0xc9)]);const {initDomains:_0x1524d3}=await import('./constant/domain.js');_0x1524d3({'apiDomain':_0x562113[_0x4aeb69(0xa5)][_0x4aeb69(0xcd)]||_0x562113[_0x4aeb69(0xa5)][_0x4aeb69(0xdb)]||undefined,'userDomain':_0x562113['raw'][_0x4aeb69(0xbe)]||undefined,'runtimeDomain':_0x562113[_0x4aeb69(0xa5)]['runtimeDomain']||undefined,'skillHubDomain':_0x562113[_0x4aeb69(0xa5)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x789ef2=a99_0xf7f404;return resolveConfigPath(process[_0x789ef2(0x9f)]());}function a99_0x5e78(_0x17f994,_0x22a74f){_0x17f994=_0x17f994-0x9c;const _0x3ea9a0=a99_0x3ea9();let _0x5e78d6=_0x3ea9a0[_0x17f994];return _0x5e78d6;}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x54cb06){const _0x48b263=a99_0xf7f404;if(!existsSync(_0x54cb06))return{'status':_0x48b263(0xb2)};try{const _0x17cd33=readFileSync(_0x54cb06,{'encoding':_0x48b263(0xa2)});if(!_0x17cd33?.[_0x48b263(0xdd)]())return{'status':'empty'};const _0x2ed1b0=JSON['parse'](_0x17cd33);return{'status':'ok','data':_0x2ed1b0};}catch(_0x3b4786){return{'status':_0x48b263(0xde),'message':_0x3b4786 instanceof Error?_0x3b4786[_0x48b263(0xd3)]:String(_0x3b4786)};}}function a99_0x3ea9(){const _0x165116=['FORMAT','isRaw','VERBOSE','appcode','global','values','projectConfig','APPCODE','maxRisk','join','env','8uFfjSC','PAGE_SIZE','APP','apiDomain','pageSize','isTTY','accessKey','string','ENV','message','.tmp','globalConfig','stdin','riskLevel','11wfdxGl','explicit','52XGbdeQ','host','EXDEV','trim','error','275052Unypmr','199479fzqUrs','authRequired','online','4278951ajchju','write','app','cwd','3860801bUkimD','EACCES','utf8','some','stringify','raw','17584RDyxML','code','production','inherit','locale','defaultApp','./constant/domain.js','8ADqkPs','1521390bAthhG','13002rRvshE','object','parse','missing','setRawMode','newConfigFileName','format','slice','setLogPath','daily','project','nonInteractive','apps','1675QtATaw','true','userDomain'];a99_0x3ea9=function(){return _0x165116;};return a99_0x3ea9();}export function loadRawConfigLayers(_0x4f34b5){const _0x5e65a3=a99_0xf7f404;let _0x69b758={},_0x52d83d={},_0x5f5a08,_0x40560d;try{_0x5f5a08=resolveConfigPath(homedir());if(_0x5f5a08){const _0x298f5a=readFileSync(_0x5f5a08,{'encoding':_0x5e65a3(0xa2)});if(_0x298f5a)_0x69b758=JSON[_0x5e65a3(0xb1)](_0x298f5a);}}catch{}try{const _0x1009a2=_0x4f34b5||process[_0x5e65a3(0x9f)]();_0x40560d=resolveConfigPath(_0x1009a2);if(_0x40560d){const _0x237fd2=readFileSync(_0x40560d,{'encoding':_0x5e65a3(0xa2)});if(_0x237fd2)_0x52d83d=JSON[_0x5e65a3(0xb1)](_0x237fd2);}}catch{}return{'globalPath':_0x5f5a08,'projectPath':_0x40560d,'globalConfig':_0x69b758,'projectConfig':_0x52d83d};}function mergeRawConfigLayers(_0x15f3c6){const _0x272617=a99_0xf7f404,{globalConfig:_0x21aab8,projectConfig:_0xb7f289}=_0x15f3c6;if(_0xb7f289[_0x272617(0xa9)]===![]){const _0x1adad1={..._0xb7f289};return delete _0x1adad1[_0x272617(0xa9)],_0x1adad1;}const _0x1d0a09={..._0x21aab8,..._0xb7f289};if(_0x272617(0xab)in _0xb7f289)_0x1d0a09['defaultApp']=_0xb7f289[_0x272617(0xab)];else _0x21aab8[_0x272617(0xab)]&&(_0x1d0a09[_0x272617(0xab)]=_0x21aab8[_0x272617(0xab)]);return _0x1d0a09;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x4aaded){return mergeRawConfigLayers(loadRawConfigLayers(_0x4aaded));}export function readRawConfigWithLayers(_0x386c59){const _0x38db22=loadRawConfigLayers(_0x386c59);return{'config':mergeRawConfigLayers(_0x38db22),'layers':_0x38db22};}export function resolveDefaultAppSource(_0x24d037){const _0x5d555e=a99_0xf7f404;if(_0x5d555e(0xab)in _0x24d037[_0x5d555e(0xc5)])return'project';if(_0x24d037[_0x5d555e(0xc5)][_0x5d555e(0xa9)]===![])return null;if(_0x24d037[_0x5d555e(0xd5)][_0x5d555e(0xab)])return _0x5d555e(0xc3);return null;}function buildConfig(_0x4dbedf,_0x5c7b2f){const _0x5769ad=a99_0xf7f404,_0x4632f8=_0x4dbedf[_0x5769ad(0xab)]||undefined,_0x320472=_0x5c7b2f[_0x5769ad(0x9e)]||env(_0x5769ad(0xcc))||undefined,_0x4c1627=_0x320472||_0x4632f8||undefined,_0x1657e4=env('ACCESS_KEY')||_0x4dbedf[_0x5769ad(0xd0)]||undefined,_0x525467=_0x5c7b2f['env']||env(_0x5769ad(0xd2))||_0x4dbedf[_0x5769ad(0xc9)]||DEFAULT_CONFIG_VALUES[_0x5769ad(0xc9)],_0x2f1ad8=normalizeEnv(String(_0x525467)),_0xeaf281=isDaily(_0x2f1ad8)?_0x5769ad(0xb8):isDev(_0x2f1ad8)?'development':'production',_0x834568=typeof _0x5c7b2f['appcode']===_0x5769ad(0xd1)?_0x5c7b2f[_0x5769ad(0xc2)]:undefined,_0x1bd28f=env(_0x5769ad(0xc6)),_0x2fc80e=_0x320472?undefined:_0x4dbedf[_0x5769ad(0xc2)]||_0x4dbedf[_0x5769ad(0x9e)]||undefined,_0x4f606c=_0x320472||(_0x2fc80e?undefined:_0x4632f8),_0x4babd7=resolveLocalAppAliasCode(_0x4dbedf,_0x4f606c),_0x241cac=resolveCachedAppCode(_0x4f606c,_0xeaf281,_0x1657e4),_0x1cec73=_0x834568||_0x1bd28f||_0x2fc80e||_0x4babd7||_0x241cac||undefined,_0x46aefd=_0x834568?_0x5769ad(0xd9):_0x1bd28f?_0x5769ad(0xc9):_0x2fc80e?'top-level':_0x4babd7?'local-alias':_0x241cac?'cache':undefined,_0x1c4bc0=_0x4dbedf[_0x5769ad(0xaa)]||DEFAULT_CONFIG_VALUES['locale'],_0x3a4a0f=undefined,_0x18b797=_0x5c7b2f[_0x5769ad(0xb5)]||env(_0x5769ad(0xbf))||_0x4dbedf[_0x5769ad(0xb5)],_0xad4cc=normalizeLegacyOutputFormat(_0x18b797),_0x37750e=env(_0x5769ad(0xcb))||_0x4dbedf[_0x5769ad(0xce)],_0x41e771=_0x37750e?Number(_0x37750e)||undefined:undefined,_0x4259a8=_0x4dbedf['riskLevel']||_0x4dbedf[_0x5769ad(0xc7)],_0x4969db=_0x4259a8==='read'||_0x4259a8===_0x5769ad(0x9d)||_0x4259a8==='high-risk-write'?_0x4259a8:DEFAULT_CONFIG_VALUES[_0x5769ad(0xd7)],_0x38c290=env(_0x5769ad(0xc1)),_0x34156b=_0x38c290==='1'||_0x38c290===_0x5769ad(0xbd);return{'appCode':typeof _0x1cec73==='string'&&_0x1cec73[_0x5769ad(0xdd)]()?_0x1cec73[_0x5769ad(0xdd)]():undefined,'appCodeSource':_0x46aefd,'env':_0xeaf281,'locale':_0x1c4bc0,'cookie':_0x3a4a0f,'accessKey':_0x1657e4,'format':_0xad4cc,'pageSize':_0x41e771,'riskLevel':_0x4969db,'verbose':_0x34156b,'defaultApp':_0x4632f8,'currentApp':typeof _0x4c1627===_0x5769ad(0xd1)?_0x4c1627:undefined,'raw':_0x4dbedf};}function env(_0x53587f){return productEnv(_0x53587f);}async function buildAuth(_0x13b5d4){const _0x2981d9=a99_0xf7f404,_0x1196ee='',_0x2d01ac=!!_0x13b5d4[_0x2981d9(0xd0)];return{'cookie':_0x1196ee,'isLoggedIn':_0x2d01ac,async 'getOrLogin'(){const _0x16804f=_0x2981d9;if(_0x2d01ac)return _0x1196ee;throw CliErrors[_0x16804f(0xe1)]();}};}
|
|
1
|
+
const a99_0x171aa3=a99_0xe9b1;(function(_0x45aa20,_0x1eedb1){const _0x159839=a99_0xe9b1,_0x5c4c89=_0x45aa20();while(!![]){try{const _0x53fcc1=-parseInt(_0x159839(0x208))/0x1*(parseInt(_0x159839(0x1e5))/0x2)+parseInt(_0x159839(0x1e7))/0x3*(-parseInt(_0x159839(0x20d))/0x4)+parseInt(_0x159839(0x1dd))/0x5+-parseInt(_0x159839(0x218))/0x6*(-parseInt(_0x159839(0x1ee))/0x7)+parseInt(_0x159839(0x1da))/0x8*(-parseInt(_0x159839(0x20b))/0x9)+parseInt(_0x159839(0x1df))/0xa+parseInt(_0x159839(0x1de))/0xb;if(_0x53fcc1===_0x1eedb1)break;else _0x5c4c89['push'](_0x5c4c89['shift']());}catch(_0x398976){_0x5c4c89['push'](_0x5c4c89['shift']());}}}(a99_0x187b,0x29b26));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';function a99_0x187b(){const _0x229384=['21nkjRAm','isRaw','defaultApp','apps','riskLevel','high-risk-write','FORMAT','inherit','./constant/domain.js','some','production','locale','top-level','EPERM','app','find','EXDEV','development','code','newConfigFileName','accessKey','daily','object','projectConfig','isTTY','read','1rjygmG','maxRisk','setLogPath','2750823ZBNMhA','appcode','232PjjSYd','setRawCommand','parse','project','global','EACCES','explicit','cwd','userDomain','APPCODE','join','309954ijubDm','globalConfig','empty','write','utf8','configFileNames','ACCESS_KEY','true','pageSize','setRawMode','.tmp','apiDomain','./constant/env.js','authRequired','format','skillHubDomain','APP','stringify','string','8DeRboe','stdout','stdin','1046775feUJST','5605886znDfxx','1140000loKddI','nonInteractive','online','VERBOSE','argv','local-alias','670634ryoTtY','trim','9114OQasGf','message','raw','env','ENV','cache','values'];a99_0x187b=function(){return _0x229384;};return a99_0x187b();}export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a99_0x171aa3(0x21d)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a99_0x171aa3(0x201)];function resolveConfigPath(_0x1f230a){for(const _0x57f7c3 of CONFIG_NAMES){const _0x1639c7=resolve(_0x1f230a,_0x57f7c3);if(existsSync(_0x1639c7))return _0x1639c7;}return undefined;}export function resolveWriteConfigPath(_0x2fe152){const _0x42e334=a99_0x171aa3,_0x5a7748=_0x2fe152===_0x42e334(0x210)?process[_0x42e334(0x214)]():homedir(),_0x1b116d=resolveConfigPath(_0x5a7748);return _0x1b116d??resolve(_0x5a7748,NEW_CONFIG_NAME);}export function readConfigFile(_0x1a687d){const _0x54d378=a99_0x171aa3;try{if(existsSync(_0x1a687d)){const _0x56228f=readFileSync(_0x1a687d,{'encoding':'utf8'});if(_0x56228f){const _0x25b252=JSON[_0x54d378(0x20f)](_0x56228f);return migrateOnlineEnv(_0x1a687d,_0x25b252),_0x25b252;}}}catch{}return{};}function migrateOnlineEnv(_0x40a17b,_0x37c3ae){const _0xf67f33=a99_0x171aa3;let _0x2c09c6=![];_0x37c3ae[_0xf67f33(0x1ea)]==='online'&&(_0x37c3ae[_0xf67f33(0x1ea)]=_0xf67f33(0x1f8),_0x2c09c6=!![]);if(_0x37c3ae[_0xf67f33(0x1f1)]&&typeof _0x37c3ae['apps']===_0xf67f33(0x204))for(const _0x412ae4 of Object[_0xf67f33(0x1ed)](_0x37c3ae['apps'])){_0x412ae4&&_0x412ae4[_0xf67f33(0x1ea)]===_0xf67f33(0x1e1)&&(_0x412ae4[_0xf67f33(0x1ea)]=_0xf67f33(0x1f8),_0x2c09c6=!![]);}if(_0x2c09c6)try{writeConfigFile(_0x40a17b,_0x37c3ae);}catch{}}export function writeConfigFile(_0x578d57,_0x1681e7){const _0x168591=a99_0x171aa3,_0x4798c9=dirname(_0x578d57);!existsSync(_0x4798c9)&&mkdirSync(_0x4798c9,{'recursive':!![]});const _0x276228=_0x578d57+_0x168591(0x1d1);try{writeFileSync(_0x276228,JSON[_0x168591(0x1d8)](_0x1681e7,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x276228,_0x578d57);}catch(_0x2029f7){if(_0x2029f7[_0x168591(0x200)]===_0x168591(0x1fb)||_0x2029f7['code']===_0x168591(0x1fe)||_0x2029f7[_0x168591(0x200)]===_0x168591(0x212)){writeFileSync(_0x578d57,JSON['stringify'](_0x1681e7,null,0x2)+'\x0a',{'encoding':_0x168591(0x21c)});try{unlinkSync(_0x276228);}catch{}}else throw _0x2029f7;}}catch(_0x38dc2b){try{unlinkSync(_0x276228);}catch{}throw _0x38dc2b;}}export function isNonInteractiveMode(_0x4c56ba){const _0x57a9ad=a99_0x171aa3;return!!(_0x4c56ba[_0x57a9ad(0x1e0)]||_0x4c56ba['ci']||productEnvNames('CI')[_0x57a9ad(0x1f7)](_0x4dfef9=>process.env[_0x4dfef9]==='true')||process.env.CI===_0x57a9ad(0x21f)||!process[_0x57a9ad(0x1db)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x11700e=a99_0x171aa3;if(!process[_0x11700e(0x1dc)][_0x11700e(0x206)])return![];try{const _0x329322=process['stdin'][_0x11700e(0x1ef)];return process[_0x11700e(0x1dc)][_0x11700e(0x221)](!![]),process[_0x11700e(0x1dc)][_0x11700e(0x221)](_0x329322??![]),!![];}catch{return![];}}export async function createContext(_0x9b2a10){const _0x4594e3=a99_0x171aa3,_0x330df2=readRawConfig(),_0x409d18=buildConfig(_0x330df2,_0x9b2a10);await initGlobalEnvironment(_0x409d18);const {getUserDomain:_0x2b640b,getApiDomain:_0x5689af}=await import(_0x4594e3(0x1f6)),_0x1fe2d5={'apiDomain':_0x5689af(),'userDomain':_0x2b640b()},_0xf03896=await buildAuth(_0x409d18);logger[_0x4594e3(0x20a)](process[_0x4594e3(0x214)]());const _0x8e723a=(CLI_BIN_NAME+'\x20'+process[_0x4594e3(0x1e3)]['slice'](0x2)[_0x4594e3(0x217)]('\x20'))[_0x4594e3(0x1e6)]();logger[_0x4594e3(0x20e)](_0x8e723a);const _0x11785f=isNonInteractiveMode(_0x9b2a10);return{'config':_0x409d18,'auth':_0xf03896,'logger':logger,'env':_0x1fe2d5,'nonInteractive':_0x11785f};}export function buildConfigFromFlags(_0x1ff349){return buildConfig(readRawConfig(),_0x1ff349);}export function getLocalAppAliases(_0x18cbee){const _0x4f5cf6=a99_0x171aa3;return _0x18cbee[_0x4f5cf6(0x1f1)]&&typeof _0x18cbee[_0x4f5cf6(0x1f1)]===_0x4f5cf6(0x204)?_0x18cbee[_0x4f5cf6(0x1f1)]:{};}export function resolveLocalAppAliasCode(_0x4dcf26,_0x4421db){const _0xc8e7f1=a99_0x171aa3;if(!_0x4421db)return undefined;const _0x4431b4=getLocalAppAliases(_0x4dcf26)[_0x4421db],_0x4711f1=_0x4431b4?.[_0xc8e7f1(0x20c)];return typeof _0x4711f1===_0xc8e7f1(0x1d9)&&_0x4711f1[_0xc8e7f1(0x1e6)]()?_0x4711f1[_0xc8e7f1(0x1e6)]():undefined;}export function readAppCodeFromConfig(){const _0x1c093c=a99_0x171aa3,_0x21fee9=readRawConfig(),_0x5f19c5=_0x21fee9[_0x1c093c(0x20c)]??_0x21fee9[_0x1c093c(0x1fc)];if(typeof _0x5f19c5===_0x1c093c(0x1d9)&&_0x5f19c5[_0x1c093c(0x1e6)]())return _0x5f19c5[_0x1c093c(0x1e6)]();const _0xc9160c=resolveLocalAppAliasCode(_0x21fee9,typeof _0x21fee9['defaultApp']==='string'?_0x21fee9[_0x1c093c(0x1f0)]:undefined);if(_0xc9160c)return _0xc9160c;const _0x4dd7d0=normalizeEnv(String(_0x21fee9[_0x1c093c(0x1ea)]||'production')),_0xcde584=isDaily(_0x4dd7d0)?'daily':isDev(_0x4dd7d0)?_0x1c093c(0x1ff):'production',_0x286f59=resolveCachedAppCode(typeof _0x21fee9[_0x1c093c(0x1f0)]===_0x1c093c(0x1d9)?_0x21fee9['defaultApp']:undefined,_0xcde584,typeof _0x21fee9[_0x1c093c(0x202)]===_0x1c093c(0x1d9)?_0x21fee9[_0x1c093c(0x202)]:undefined);if(_0x286f59)return _0x286f59;const _0x3b3179=Object[_0x1c093c(0x1ed)](getLocalAppAliases(_0x21fee9))[_0x1c093c(0x1fd)](_0x1c0f83=>_0x1c0f83?.[_0x1c093c(0x20c)]);return typeof _0x3b3179?.[_0x1c093c(0x20c)]===_0x1c093c(0x1d9)&&_0x3b3179[_0x1c093c(0x20c)][_0x1c093c(0x1e6)]()?_0x3b3179[_0x1c093c(0x20c)][_0x1c093c(0x1e6)]():undefined;}export function readScopedConfig(_0x8b4eeb){const _0x30d9e9=a99_0x171aa3,_0x3ed7f3=_0x8b4eeb[_0x30d9e9(0x211)]?_0x30d9e9(0x211):_0x30d9e9(0x210);return readConfigFile(resolveWriteConfigPath(_0x3ed7f3));}function a99_0xe9b1(_0x5cc350,_0x1fb83e){_0x5cc350=_0x5cc350-0x1d1;const _0x187bd6=a99_0x187b();let _0xe9b1b5=_0x187bd6[_0x5cc350];return _0xe9b1b5;}export function writeScopedConfig(_0x450514,_0x3396e7){const _0x499c41=a99_0x171aa3,_0x4e801a=_0x3396e7[_0x499c41(0x211)]?'global':_0x499c41(0x210);writeConfigFile(resolveWriteConfigPath(_0x4e801a),_0x450514);}export async function initGlobalEnvironment(_0x24994d){const _0x5a757b=a99_0x171aa3,{initEnv:_0x22aab4}=await import(_0x5a757b(0x1d3));_0x22aab4(_0x24994d[_0x5a757b(0x1ea)]);const {initDomains:_0x1164e2}=await import('./constant/domain.js');_0x1164e2({'apiDomain':_0x24994d['raw'][_0x5a757b(0x1d2)]||_0x24994d['raw']['host']||undefined,'userDomain':_0x24994d[_0x5a757b(0x1e9)][_0x5a757b(0x215)]||undefined,'runtimeDomain':_0x24994d[_0x5a757b(0x1e9)]['runtimeDomain']||undefined,'skillHubDomain':_0x24994d[_0x5a757b(0x1e9)][_0x5a757b(0x1d6)]||undefined});}export function getProjectConfigPath(){const _0x12d892=a99_0x171aa3;return resolveConfigPath(process[_0x12d892(0x214)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5d23dd){const _0x14e6a8=a99_0x171aa3;if(!existsSync(_0x5d23dd))return{'status':'missing'};try{const _0x3135cc=readFileSync(_0x5d23dd,{'encoding':_0x14e6a8(0x21c)});if(!_0x3135cc?.[_0x14e6a8(0x1e6)]())return{'status':_0x14e6a8(0x21a)};const _0x3723bc=JSON[_0x14e6a8(0x20f)](_0x3135cc);return{'status':'ok','data':_0x3723bc};}catch(_0x138868){return{'status':'error','message':_0x138868 instanceof Error?_0x138868[_0x14e6a8(0x1e8)]:String(_0x138868)};}}export function loadRawConfigLayers(_0x4dbf80){const _0x2f4a2a=a99_0x171aa3;let _0x376caf={},_0x5382b1={},_0x21887d,_0x35b5bf;try{_0x21887d=resolveConfigPath(homedir());if(_0x21887d){const _0x1e7886=readFileSync(_0x21887d,{'encoding':_0x2f4a2a(0x21c)});if(_0x1e7886)_0x376caf=JSON[_0x2f4a2a(0x20f)](_0x1e7886);}}catch{}try{const _0x2b8345=_0x4dbf80||process[_0x2f4a2a(0x214)]();_0x35b5bf=resolveConfigPath(_0x2b8345);if(_0x35b5bf){const _0x4c5001=readFileSync(_0x35b5bf,{'encoding':_0x2f4a2a(0x21c)});if(_0x4c5001)_0x5382b1=JSON[_0x2f4a2a(0x20f)](_0x4c5001);}}catch{}return{'globalPath':_0x21887d,'projectPath':_0x35b5bf,'globalConfig':_0x376caf,'projectConfig':_0x5382b1};}function mergeRawConfigLayers(_0x49ce7c){const _0x5f4f24=a99_0x171aa3,{globalConfig:_0xaddf63,projectConfig:_0x32bb9b}=_0x49ce7c;if(_0x32bb9b[_0x5f4f24(0x1f5)]===![]){const _0x40f354={..._0x32bb9b};return delete _0x40f354['inherit'],_0x40f354;}const _0x443d9e={..._0xaddf63,..._0x32bb9b};if('defaultApp'in _0x32bb9b)_0x443d9e[_0x5f4f24(0x1f0)]=_0x32bb9b[_0x5f4f24(0x1f0)];else _0xaddf63[_0x5f4f24(0x1f0)]&&(_0x443d9e[_0x5f4f24(0x1f0)]=_0xaddf63[_0x5f4f24(0x1f0)]);return _0x443d9e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5170b3){return mergeRawConfigLayers(loadRawConfigLayers(_0x5170b3));}export function readRawConfigWithLayers(_0x30e633){const _0xa8983d=loadRawConfigLayers(_0x30e633);return{'config':mergeRawConfigLayers(_0xa8983d),'layers':_0xa8983d};}export function resolveDefaultAppSource(_0x2b3271){const _0x4e03dd=a99_0x171aa3;if('defaultApp'in _0x2b3271[_0x4e03dd(0x205)])return _0x4e03dd(0x210);if(_0x2b3271['projectConfig'][_0x4e03dd(0x1f5)]===![])return null;if(_0x2b3271[_0x4e03dd(0x219)][_0x4e03dd(0x1f0)])return'global';return null;}function buildConfig(_0x118cbf,_0x2c2364){const _0x31b4e2=a99_0x171aa3,_0x2ba9ac=_0x118cbf[_0x31b4e2(0x1f0)]||undefined,_0xa09b77=_0x2c2364['app']||env(_0x31b4e2(0x1d7))||undefined,_0x294830=_0xa09b77||_0x2ba9ac||undefined,_0x7e2cdd=env(_0x31b4e2(0x21e))||_0x118cbf['accessKey']||undefined,_0x414e4f=_0x2c2364[_0x31b4e2(0x1ea)]||env(_0x31b4e2(0x1eb))||_0x118cbf[_0x31b4e2(0x1ea)]||DEFAULT_CONFIG_VALUES[_0x31b4e2(0x1ea)],_0x46f2af=normalizeEnv(String(_0x414e4f)),_0x1bc0e9=isDaily(_0x46f2af)?_0x31b4e2(0x203):isDev(_0x46f2af)?_0x31b4e2(0x1ff):'production',_0x38b061=typeof _0x2c2364[_0x31b4e2(0x20c)]===_0x31b4e2(0x1d9)?_0x2c2364[_0x31b4e2(0x20c)]:undefined,_0x384067=env(_0x31b4e2(0x216)),_0x31514a=_0xa09b77?undefined:_0x118cbf[_0x31b4e2(0x20c)]||_0x118cbf[_0x31b4e2(0x1fc)]||undefined,_0x5d1203=_0xa09b77||(_0x31514a?undefined:_0x2ba9ac),_0x4ab072=resolveLocalAppAliasCode(_0x118cbf,_0x5d1203),_0x2b02c8=resolveCachedAppCode(_0x5d1203,_0x1bc0e9,_0x7e2cdd),_0x5ea2a1=_0x38b061||_0x384067||_0x31514a||_0x4ab072||_0x2b02c8||undefined,_0x7b0ab7=_0x38b061?_0x31b4e2(0x213):_0x384067?_0x31b4e2(0x1ea):_0x31514a?_0x31b4e2(0x1fa):_0x4ab072?_0x31b4e2(0x1e4):_0x2b02c8?_0x31b4e2(0x1ec):undefined,_0x7d0eb3=_0x118cbf[_0x31b4e2(0x1f9)]||DEFAULT_CONFIG_VALUES[_0x31b4e2(0x1f9)],_0x501601=undefined,_0xd81408=_0x2c2364[_0x31b4e2(0x1d5)]||env(_0x31b4e2(0x1f4))||_0x118cbf[_0x31b4e2(0x1d5)],_0x272f1d=normalizeLegacyOutputFormat(_0xd81408),_0x1b23bf=env('PAGE_SIZE')||_0x118cbf[_0x31b4e2(0x220)],_0x342fab=_0x1b23bf?Number(_0x1b23bf)||undefined:undefined,_0x1b761f=_0x118cbf[_0x31b4e2(0x1f2)]||_0x118cbf[_0x31b4e2(0x209)],_0x49ff14=_0x1b761f===_0x31b4e2(0x207)||_0x1b761f===_0x31b4e2(0x21b)||_0x1b761f===_0x31b4e2(0x1f3)?_0x1b761f:DEFAULT_CONFIG_VALUES[_0x31b4e2(0x1f2)],_0x3cafc5=env(_0x31b4e2(0x1e2)),_0x2da151=_0x3cafc5==='1'||_0x3cafc5===_0x31b4e2(0x21f);return{'appCode':typeof _0x5ea2a1==='string'&&_0x5ea2a1[_0x31b4e2(0x1e6)]()?_0x5ea2a1[_0x31b4e2(0x1e6)]():undefined,'appCodeSource':_0x7b0ab7,'env':_0x1bc0e9,'locale':_0x7d0eb3,'cookie':_0x501601,'accessKey':_0x7e2cdd,'format':_0x272f1d,'pageSize':_0x342fab,'riskLevel':_0x49ff14,'verbose':_0x2da151,'defaultApp':_0x2ba9ac,'currentApp':typeof _0x294830===_0x31b4e2(0x1d9)?_0x294830:undefined,'raw':_0x118cbf};}function env(_0xc22289){return productEnv(_0xc22289);}async function buildAuth(_0x39d873){const _0x328546=a99_0x171aa3,_0x466b6e='',_0xb733d2=!!_0x39d873[_0x328546(0x202)];return{'cookie':_0x466b6e,'isLoggedIn':_0xb733d2,async 'getOrLogin'(){const _0x4ea2b9=_0x328546;if(_0xb733d2)return _0x466b6e;throw CliErrors[_0x4ea2b9(0x1d4)]();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Management API client using raw `fetch`.
|
|
3
3
|
*
|
|
4
4
|
* Why a separate module from `sdk-client.ts`: the SDK (`@lovrabet/sdk`) is designed
|
|
5
|
-
* for runtime operations (data/SQL/
|
|
5
|
+
* for runtime operations (data/SQL/Backend Function execution) and encapsulates the SDK client
|
|
6
6
|
* lifecycle. This module handles authenticated API calls that the SDK does not
|
|
7
7
|
* cover: listing datasets, fetching app lists, querying runtime contracts, etc.
|
|
8
8
|
*
|
|
@@ -18,7 +18,7 @@ import type { Paging } from "../framework/response.js";
|
|
|
18
18
|
export declare function setActiveAK(ak: string): void;
|
|
19
19
|
/** Clears the active AccessKey after command completion. */
|
|
20
20
|
export declare function clearActiveAK(): void;
|
|
21
|
-
/** Public runtime contract for one known
|
|
21
|
+
/** Public runtime contract for one known Backend Function endpoint. */
|
|
22
22
|
export interface BffEndpointContract {
|
|
23
23
|
appCode: string;
|
|
24
24
|
functionName: string;
|
|
@@ -27,7 +27,7 @@ export interface BffEndpointContract {
|
|
|
27
27
|
gmtModified?: string | number;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Fetches one known
|
|
30
|
+
* Fetches one known Backend Function endpoint contract by its stable runtime identity.
|
|
31
31
|
* The runtime exposes an AK-authenticated exact endpoint keyed by appCode + functionName.
|
|
32
32
|
* Platform-only fields returned by older backends are intentionally discarded here.
|
|
33
33
|
*/
|