@lovrabet/lovrabet-cli 2.3.1-beta.2 → 2.3.1-beta.3
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 +53 -1
- 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.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.d.ts +2 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.d.ts +2 -0
- package/lib/commands/config/init.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/domain-config.d.ts +33 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.d.ts +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 +3 -3
- 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.d.ts +0 -51
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.d.ts +3 -5
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +16 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- 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 +0 -2
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +59 -0
- package/lib/generated/official-routing.js +1 -0
- package/lib/generated/routing-contract.d.ts +9 -0
- package/lib/generated/routing-contract.js +1 -0
- 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/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/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 -1
- package/skills/lovrabet/SKILL.md +4 -4
- package/skills/lovrabet/guides/troubleshooting.md +3 -5
- package/skills/lovrabet/references/lovrabet-config-commands.md +33 -10
- package/skills/lovrabet/references/lovrabet-config.md +8 -20
- package/skills/lovrabet/references/lovrabet-doctor.md +0 -2
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +1 -3
- package/skills/lovrabet.manifest.json +3 -3
- package/lib/core/kb-search-client.d.ts +0 -30
- package/lib/core/kb-search-client.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0x2f46ac=a152_0x17bf;(function(_0x4ba32a,_0x37da86){const _0x48e255=a152_0x17bf,_0x43ae62=_0x4ba32a();while(!![]){try{const _0x365696=-parseInt(_0x48e255(0x109))/0x1*(parseInt(_0x48e255(0x120))/0x2)+parseInt(_0x48e255(0x122))/0x3*(-parseInt(_0x48e255(0x10b))/0x4)+parseInt(_0x48e255(0x10f))/0x5+parseInt(_0x48e255(0x124))/0x6+-parseInt(_0x48e255(0x123))/0x7*(parseInt(_0x48e255(0x11d))/0x8)+-parseInt(_0x48e255(0x11c))/0x9+parseInt(_0x48e255(0x128))/0xa;if(_0x365696===_0x37da86)break;else _0x43ae62['push'](_0x43ae62['shift']());}catch(_0xd5552a){_0x43ae62['push'](_0x43ae62['shift']());}}}(a152_0x3941,0xb9543));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a152_0x2f46ac(0x119),a152_0x2f46ac(0x111));function a152_0x3941(){const _0x3fa51=['77suMsqt','4819890bywAJv','find','\x20records\x20\x22','unusable','28696930nMpsyF','unverifiable','\x20uses\x20unsupported\x20version\x20','kind','version','.claude','95486ZPerRl','utf8','28848bmEqHI','includes','reason','SKILL.md','5369060WfvuBb','join','.skill-lock.json','number','message','skills','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','absent','parse','not-recorded','.agents','present','object','8188011sAkdsG','774496emwANC','recorded','home','26tAmKiV','map','321HsPCTC'];a152_0x3941=function(){return _0x3fa51;};return a152_0x3941();}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a152_0x2f46ac(0x114)),join(a152_0x2f46ac(0x108),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x517241,_0x5a5f4f){const _0x4beb58=a152_0x2f46ac;if(!existsSync(_0x517241))return{'kind':'not-recorded'};let _0x317cd2;try{_0x317cd2=JSON[_0x4beb58(0x117)](readFileSync(_0x517241,_0x4beb58(0x10a)));}catch(_0x5aca52){return{'kind':'unusable','reason':_0x517241+'\x20is\x20unreadable:\x20'+_0x5aca52[_0x4beb58(0x113)]};}const _0x260efb=_0x317cd2;if(typeof _0x260efb?.['version']!==_0x4beb58(0x112)||!SUPPORTED_LOCK_VERSIONS[_0x4beb58(0x10c)](_0x260efb[_0x4beb58(0x107)]))return{'kind':_0x4beb58(0x127),'reason':_0x517241+_0x4beb58(0x105)+String(_0x260efb?.[_0x4beb58(0x107)])};if(!_0x260efb[_0x4beb58(0x114)]||typeof _0x260efb[_0x4beb58(0x114)]!==_0x4beb58(0x11b))return{'kind':_0x4beb58(0x127),'reason':_0x517241+'\x20has\x20no\x20skills\x20map'};return _0x260efb['skills'][_0x5a5f4f]?{'kind':_0x4beb58(0x11e)}:{'kind':_0x4beb58(0x118)};}function a152_0x17bf(_0x7573ce,_0x31c021){_0x7573ce=_0x7573ce-0x105;const _0x3941fc=a152_0x3941();let _0x17bf85=_0x3941fc[_0x7573ce];return _0x17bf85;}export function resolveInstalledSkill(_0x42d017,_0x4a606a){const _0x23a7a9=a152_0x2f46ac,_0x23c224=_0x4a606a?.[_0x23a7a9(0x11f)]??homedir(),_0x2785c8=_0x4a606a?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x23a7a9(0x121)](_0x4f80b0=>join(_0x23c224,_0x4f80b0)),_0x4f9740=_0x4a606a?.['lockFile']??join(_0x23c224,SKILL_LOCK_RELATIVE_PATH),_0x974c3e=_0x2785c8[_0x23a7a9(0x121)](_0x2c8504=>join(_0x2c8504,_0x42d017,_0x23a7a9(0x10e))),_0x4e4787=_0x974c3e[_0x23a7a9(0x125)](_0x2f6513=>existsSync(_0x2f6513));if(_0x4e4787)return{'state':_0x23a7a9(0x11a),'path':_0x4e4787};const _0xff0707=readLockLookup(_0x4f9740,_0x42d017);if(_0xff0707['kind']===_0x23a7a9(0x127))return{'state':_0x23a7a9(0x129),'reason':_0xff0707[_0x23a7a9(0x10d)]};if(_0xff0707[_0x23a7a9(0x106)]===_0x23a7a9(0x11e))return{'state':_0x23a7a9(0x129),'reason':_0x4f9740+_0x23a7a9(0x126)+_0x42d017+_0x23a7a9(0x115)+('('+_0x974c3e[_0x23a7a9(0x110)](',\x20')+')')};return{'state':_0x23a7a9(0x116),'checked':_0x974c3e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x41565f=a153_0x268d;(function(_0x22d5f4,_0x5cd573){const _0x1991cf=a153_0x268d,_0x8a5712=_0x22d5f4();while(!![]){try{const _0x1d3bea=-parseInt(_0x1991cf(0x131))/0x1*(parseInt(_0x1991cf(0x123))/0x2)+parseInt(_0x1991cf(0x127))/0x3*(parseInt(_0x1991cf(0x124))/0x4)+-parseInt(_0x1991cf(0x12b))/0x5+parseInt(_0x1991cf(0x12e))/0x6*(parseInt(_0x1991cf(0x132))/0x7)+parseInt(_0x1991cf(0x139))/0x8*(parseInt(_0x1991cf(0x135))/0x9)+-parseInt(_0x1991cf(0x12f))/0xa+parseInt(_0x1991cf(0x126))/0xb;if(_0x1d3bea===_0x5cd573)break;else _0x8a5712['push'](_0x8a5712['shift']());}catch(_0x5cc7af){_0x8a5712['push'](_0x8a5712['shift']());}}}(a153_0x1726,0x46444));const REDACTED_ACCESS_KEY=a153_0x41565f(0x129);export function maskCliAccessKey(_0x4a1e44){const _0x343f3d=a153_0x41565f;if(typeof _0x4a1e44!==_0x343f3d(0x13a)||_0x4a1e44[_0x343f3d(0x130)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x4a1e44['slice'](0x0,0x8)+'*'['repeat'](_0x4a1e44[_0x343f3d(0x130)]-0x8);}export function redactCliConfigCredentials(_0x1e9c92){const _0xdb8e6c=a153_0x41565f,_0x194c37={..._0x1e9c92};return Object['prototype'][_0xdb8e6c(0x128)]['call'](_0x194c37,'accessKey')&&(_0x194c37[_0xdb8e6c(0x137)]=maskCliAccessKey(_0x194c37[_0xdb8e6c(0x137)])),_0x194c37[_0xdb8e6c(0x136)]&&typeof _0x194c37[_0xdb8e6c(0x136)]===_0xdb8e6c(0x138)&&!Array['isArray'](_0x194c37[_0xdb8e6c(0x136)])&&(_0x194c37[_0xdb8e6c(0x136)]=redactLegacyAppCredentials(_0x194c37['apps'])),_0x194c37;}function a153_0x1726(){const _0x478464=['117TixgVZ','apps','accessKey','object','107608wBbiNl','string','1510PngKhf','42088IdKvRj','fromEntries','2495504tXSjmL','105UQiZTC','hasOwnProperty','<redacted>','test','1397280EyHBNs','isArray','call','6SSRYzp','757000tAdDyn','length','551lHOhIv','2022832VkxpDL','map','prototype'];a153_0x1726=function(){return _0x478464;};return a153_0x1726();}export function redactCliConfigValue(_0x4d026e,_0x5ca483){const _0x3d9ffa=a153_0x41565f;if(_0x4d026e===_0x3d9ffa(0x137)||/^apps\.[^.]+\.accessKey$/[_0x3d9ffa(0x12a)](_0x4d026e))return maskCliAccessKey(_0x5ca483);if(_0x4d026e===_0x3d9ffa(0x136)&&_0x5ca483&&typeof _0x5ca483==='object'&&!Array[_0x3d9ffa(0x12c)](_0x5ca483))return redactLegacyAppCredentials(_0x5ca483);if(/^apps\.[^.]+$/[_0x3d9ffa(0x12a)](_0x4d026e)&&_0x5ca483&&typeof _0x5ca483===_0x3d9ffa(0x138)&&!Array[_0x3d9ffa(0x12c)](_0x5ca483)){const _0x34cb2c=_0x5ca483;return Object[_0x3d9ffa(0x134)]['hasOwnProperty']['call'](_0x34cb2c,_0x3d9ffa(0x137))?{..._0x34cb2c,'accessKey':maskCliAccessKey(_0x34cb2c[_0x3d9ffa(0x137)])}:_0x5ca483;}return _0x5ca483;}function a153_0x268d(_0x251e03,_0x425b26){_0x251e03=_0x251e03-0x123;const _0x1726dc=a153_0x1726();let _0x268dfd=_0x1726dc[_0x251e03];return _0x268dfd;}function redactLegacyAppCredentials(_0x2bc8e7){const _0xdd7d0c=a153_0x41565f;return Object[_0xdd7d0c(0x125)](Object['entries'](_0x2bc8e7)[_0xdd7d0c(0x133)](([_0x568c44,_0x22169a])=>{const _0x4d2bf5=_0xdd7d0c;if(!_0x22169a||typeof _0x22169a!==_0x4d2bf5(0x138)||Array[_0x4d2bf5(0x12c)](_0x22169a))return[_0x568c44,_0x22169a];const _0x1929bf={..._0x22169a};return Object['prototype']['hasOwnProperty'][_0x4d2bf5(0x12d)](_0x1929bf,_0x4d2bf5(0x137))&&(_0x1929bf['accessKey']=maskCliAccessKey(_0x1929bf[_0x4d2bf5(0x137)])),[_0x568c44,_0x1929bf];}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a154_0x395b(){const _0x1cf938=['1XTQvbL','3574700YEnESX','11585079cRDlji','1987180MqIlxc','2564722QzhJfk','14OgxzPz','11019990IERTDs','5676128kXTZtd','959982dbNGkj'];a154_0x395b=function(){return _0x1cf938;};return a154_0x395b();}(function(_0x4836a0,_0x504ed7){const _0x2395e8=a154_0x1798,_0x132c96=_0x4836a0();while(!![]){try{const _0x55082b=parseInt(_0x2395e8(0x174))/0x1*(parseInt(_0x2395e8(0x178))/0x2)+parseInt(_0x2395e8(0x173))/0x3+parseInt(_0x2395e8(0x175))/0x4+parseInt(_0x2395e8(0x177))/0x5+-parseInt(_0x2395e8(0x17a))/0x6+-parseInt(_0x2395e8(0x179))/0x7*(parseInt(_0x2395e8(0x17b))/0x8)+parseInt(_0x2395e8(0x176))/0x9;if(_0x55082b===_0x504ed7)break;else _0x132c96['push'](_0x132c96['shift']());}catch(_0x571039){_0x132c96['push'](_0x132c96['shift']());}}}(a154_0x395b,0xe1d48));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a154_0x1798(_0x5ac5a5,_0x248255){_0x5ac5a5=_0x5ac5a5-0x173;const _0x395be0=a154_0x395b();let _0x179836=_0x395be0[_0x5ac5a5];return _0x179836;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfdf38c,_0x219f9e){const _0x52cd62=a155_0x42ab,_0x10e6cb=_0xfdf38c();while(!![]){try{const _0x20e028=parseInt(_0x52cd62(0x1a4))/0x1*(parseInt(_0x52cd62(0x19b))/0x2)+parseInt(_0x52cd62(0x1a5))/0x3+parseInt(_0x52cd62(0x1a1))/0x4*(parseInt(_0x52cd62(0x1b4))/0x5)+-parseInt(_0x52cd62(0x1a7))/0x6+parseInt(_0x52cd62(0x1af))/0x7*(parseInt(_0x52cd62(0x1a9))/0x8)+parseInt(_0x52cd62(0x19e))/0x9*(-parseInt(_0x52cd62(0x1ab))/0xa)+-parseInt(_0x52cd62(0x19a))/0xb;if(_0x20e028===_0x219f9e)break;else _0x10e6cb['push'](_0x10e6cb['shift']());}catch(_0x307983){_0x10e6cb['push'](_0x10e6cb['shift']());}}}(a155_0x4533,0x77180));import a155_0x5a3d7a from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';function a155_0x4533(){const _0x30cba5=['npm\x20install\x20-g\x20','latest','stableVersion','valid','35ozCMcU','11214093lYncMB','341756bMnOIu','minimumVersionMessage','upgradeMessage','639801vREbwR','validation','join','90328UUcxUa','currentVersion','Current\x20version:\x20','4AApQHB','1441182GUTCNR','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','1174854AZAOas','minimumVersion','328hJPTHR','Recommended\x20stable:\x20','10Xmtbsp','unavailable','Upgrade\x20command:\x20','belowMinimum','77203ytTOjC'];a155_0x4533=function(){return _0x30cba5;};return a155_0x4533();}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0x1b581f,_0x55d018){const _0x57842d=a155_0x42ab,_0x39cbfd=a155_0x5a3d7a[_0x57842d(0x1b3)](_0x1b581f)===_0x1b581f,_0x165e03=_0x55d018?.[_0x57842d(0x1b2)]??null,_0x392f27=_0x55d018?.[_0x57842d(0x1a8)]??null,_0x104bc2=Boolean(_0x39cbfd&&_0x165e03&&a155_0x5a3d7a['lt'](_0x1b581f,_0x165e03)),_0x46cef0=Boolean(_0x39cbfd&&_0x392f27&&a155_0x5a3d7a['lt'](_0x1b581f,_0x392f27));return{'currentVersion':_0x1b581f,'stableVersion':_0x165e03,'minimumVersion':_0x392f27,'needsUpgrade':_0x104bc2||_0x46cef0,'belowMinimum':_0x46cef0,'upgradeMessage':_0x55d018?.[_0x57842d(0x19d)],'minimumVersionMessage':_0x55d018?.[_0x57842d(0x19c)]};}function a155_0x42ab(_0xb77a3e,_0x554723){_0xb77a3e=_0xb77a3e-0x19a;const _0x45332c=a155_0x4533();let _0x42abde=_0x45332c[_0xb77a3e];return _0x42abde;}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0x26e8ca){const _0x526e3e=a155_0x42ab;return _0x526e3e(0x1b0)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x26e8ca[_0x526e3e(0x1b2)]??_0x526e3e(0x1b1));}export function assertCliVersionSupported(_0x16399e){const _0x47df0d=a155_0x42ab;if(!_0x16399e[_0x47df0d(0x1ae)])return;const _0x57ed9d=[_0x16399e['minimumVersionMessage'],_0x47df0d(0x1a3)+_0x16399e[_0x47df0d(0x1a2)],'Minimum\x20supported:\x20'+_0x16399e[_0x47df0d(0x1a8)],_0x47df0d(0x1aa)+(_0x16399e['stableVersion']??_0x47df0d(0x1ac)),_0x47df0d(0x1ad)+getCliUpgradeCommand(_0x16399e)]['filter'](Boolean)[_0x47df0d(0x1a0)]('\x0a');throw CliErrors[_0x47df0d(0x19f)](_0x47df0d(0x1a6),_0x57ed9d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a0aa4,_0x105893){const _0x3ca06d=a156_0x34b4,_0x10a4a2=_0x5a0aa4();while(!![]){try{const _0x5bab06=parseInt(_0x3ca06d(0x1f5))/0x1+parseInt(_0x3ca06d(0x1eb))/0x2+parseInt(_0x3ca06d(0x1ec))/0x3*(parseInt(_0x3ca06d(0x1f9))/0x4)+-parseInt(_0x3ca06d(0x1fe))/0x5*(parseInt(_0x3ca06d(0x1fc))/0x6)+-parseInt(_0x3ca06d(0x1f3))/0x7*(parseInt(_0x3ca06d(0x1e5))/0x8)+-parseInt(_0x3ca06d(0x1e8))/0x9+-parseInt(_0x3ca06d(0x1ed))/0xa*(parseInt(_0x3ca06d(0x1fd))/0xb);if(_0x5bab06===_0x105893)break;else _0x10a4a2['push'](_0x10a4a2['shift']());}catch(_0x1c64f9){_0x10a4a2['push'](_0x10a4a2['shift']());}}}(a156_0x2408,0xcf253));import a156_0x29a2e3 from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x52b437){const _0x1bbc8c=a156_0x34b4;return typeof _0x52b437===_0x1bbc8c(0x1e6)&&_0x52b437['trim']()?_0x52b437[_0x1bbc8c(0x1ea)]():null;}function pickStrictSemver(_0x29d0cb){const _0x5945ba=a156_0x34b4,_0x2a7184=pickString(_0x29d0cb);return _0x2a7184&&a156_0x29a2e3[_0x5945ba(0x1f6)](_0x2a7184)===_0x2a7184?_0x2a7184:null;}function a156_0x34b4(_0x312df0,_0x179219){_0x312df0=_0x312df0-0x1e4;const _0x240832=a156_0x2408();let _0x34b483=_0x240832[_0x312df0];return _0x34b483;}export function normalizeCliVersionPolicy(_0x1ed485){const _0x45feb6=a156_0x34b4;if(!_0x1ed485||typeof _0x1ed485!=='object')return null;const _0x516421=_0x1ed485,_0x48b569=_0x516421['cli']&&typeof _0x516421['cli']===_0x45feb6(0x1fb)?_0x516421[_0x45feb6(0x1e7)]:_0x516421,_0x3fccf9=pickStrictSemver(_0x48b569[_0x45feb6(0x1fa)]??_0x48b569['latestVersion']??_0x48b569[_0x45feb6(0x1f2)]),_0x461bac=pickStrictSemver(_0x48b569[_0x45feb6(0x1f7)]??_0x48b569[_0x45feb6(0x1e9)]);if(!_0x3fccf9&&!_0x461bac)return null;if(_0x3fccf9&&_0x461bac&&a156_0x29a2e3['gt'](_0x461bac,_0x3fccf9))return null;return{'stableVersion':_0x3fccf9,'minimumVersion':_0x461bac,'upgradeMessage':pickString(_0x48b569[_0x45feb6(0x1f0)])??undefined,'minimumVersionMessage':pickString(_0x48b569[_0x45feb6(0x1ee)])??undefined};}export async function fetchCliVersionPolicy(){const _0x1f144d=a156_0x34b4;try{const _0x3a4894=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x1f144d(0x1ef)},'signal':AbortSignal[_0x1f144d(0x1f4)](FETCH_TIMEOUT_MS)});if(!_0x3a4894['ok'])return null;return normalizeCliVersionPolicy(await _0x3a4894[_0x1f144d(0x1f1)]());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;function a156_0x2408(){const _0x205c25=['trim','2146026pfEsXu','5217HdxKuO','16390IXsZyY','minimumVersionMessage','application/json','upgradeMessage','json','recommendedVersion','287567BeeDZK','timeout','554537cwKxGv','valid','minimumVersion','now','3688IJLPcf','stableVersion','object','6syAvrp','836WmZvbk','3528815EvRCVK','then','208pwhuYY','string','cli','4356072GAGZZt','minVersion'];a156_0x2408=function(){return _0x205c25;};return a156_0x2408();}export async function getCliVersionPolicy(){const _0x3cabd1=a156_0x34b4,_0x47278d=Date[_0x3cabd1(0x1f8)]();if(hasCachedPolicy){const _0x1f749c=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x47278d-cachedAt<_0x1f749c)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x3cabd1(0x1e4)](_0x59dd28=>{const _0x9d36f8=_0x3cabd1;return cachedPolicy=_0x59dd28,cachedAt=Date[_0x9d36f8(0x1f8)](),hasCachedPolicy=!![],_0x59dd28;})['finally'](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a157_0x2557(_0x4bc3f,_0x2e679c){_0x4bc3f=_0x4bc3f-0x14d;const _0x889fe0=a157_0x889f();let _0x2557a3=_0x889fe0[_0x4bc3f];return _0x2557a3;}function a157_0x889f(){const _0xe78682=['filter','toISOString','dirname','273308vAmhJx','Failed\x20to\x20clear\x20logs:','format','now','error','setLogPath','duration','trim','15YhoBBI','804018vtMkCT','message','setRawCommand','writeFileSync','red','command','join','readFileSync','utf8','rawCommand','errors','addColors','Completed:\x20','logTask','winstonLogger','timestamp','map','4TLIRlg','split','Starting:\x20','stringify','getWinstonInstance','currentRawCommand','2355904HSsKpK','12ejZRuT','File','2420595vlCQIy','initWinstonLogger','parse','logFilePath','green','warn','info','Failed:\x20','logFileName','243128EmKWRk','3567560mRqgqM','yellow','clearLogs','success','82361PbnOjs','transports','existsSync'];a157_0x889f=function(){return _0xe78682;};return a157_0x889f();}const a157_0x14dde7=a157_0x2557;(function(_0x1457ee,_0x74278){const _0x19a614=a157_0x2557,_0xf8df50=_0x1457ee();while(!![]){try{const _0x30d0f1=parseInt(_0x19a614(0x175))/0x1*(parseInt(_0x19a614(0x15e))/0x2)+parseInt(_0x19a614(0x14d))/0x3+parseInt(_0x19a614(0x170))/0x4*(parseInt(_0x19a614(0x183))/0x5)+parseInt(_0x19a614(0x165))/0x6*(-parseInt(_0x19a614(0x17b))/0x7)+-parseInt(_0x19a614(0x164))/0x8+parseInt(_0x19a614(0x167))/0x9+-parseInt(_0x19a614(0x171))/0xa;if(_0x30d0f1===_0x74278)break;else _0xf8df50['push'](_0xf8df50['shift']());}catch(_0x333b5b){_0xf8df50['push'](_0xf8df50['shift']());}}}(a157_0x889f,0x25c49));import a157_0x1ceb56 from'winston';import a157_0xecfcef from'node:fs';import a157_0x518be4 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a157_0x14dde7(0x15b)];[a157_0x14dde7(0x16a)]='';[a157_0x14dde7(0x163)]='';constructor(){}[a157_0x14dde7(0x14f)](_0x3796e4){const _0x170621=a157_0x14dde7;this[_0x170621(0x163)]=_0x3796e4;}[a157_0x14dde7(0x180)](_0x4c3d42){const _0x8cb160=a157_0x14dde7;this[_0x8cb160(0x16a)]=a157_0x518be4[_0x8cb160(0x153)](_0x4c3d42,PRODUCT_CONFIG[_0x8cb160(0x16f)]),this[_0x8cb160(0x15b)]&&this[_0x8cb160(0x15b)]['clear'](),this[_0x8cb160(0x168)]();}['initWinstonLogger'](){const _0x162615=a157_0x14dde7,_0x525d8e=a157_0x518be4[_0x162615(0x17a)](this[_0x162615(0x16a)]);!a157_0xecfcef[_0x162615(0x177)](_0x525d8e)&&a157_0xecfcef['mkdirSync'](_0x525d8e,{'recursive':!![]});const _0x4da56b=a157_0x1ceb56[_0x162615(0x17d)]['combine'](a157_0x1ceb56[_0x162615(0x17d)]['timestamp'](),a157_0x1ceb56[_0x162615(0x17d)][_0x162615(0x157)]({'stack':!![]}),a157_0x1ceb56[_0x162615(0x17d)]['printf'](_0x5c4ae1=>{const _0x169725=_0x162615,_0x4fa872={'timestamp':_0x5c4ae1[_0x169725(0x15c)]||new Date()[_0x169725(0x179)](),'level':_0x5c4ae1['level']||'info','command':_0x5c4ae1[_0x169725(0x152)]||'unknown','rawCommand':_0x5c4ae1[_0x169725(0x156)]||this[_0x169725(0x163)]||undefined,'message':_0x5c4ae1[_0x169725(0x14e)]||'','duration':_0x5c4ae1[_0x169725(0x181)]||undefined,'details':_0x5c4ae1['details']||undefined};return JSON[_0x169725(0x161)](_0x4fa872);}));this[_0x162615(0x15b)]=a157_0x1ceb56['createLogger']({'level':_0x162615(0x16d),'format':_0x4da56b,'transports':[new a157_0x1ceb56[(_0x162615(0x176))][(_0x162615(0x166))]({'filename':this['logFilePath'],'level':_0x162615(0x16d)})],'silent':![]}),a157_0x1ceb56[_0x162615(0x158)]({'success':_0x162615(0x16b),'error':_0x162615(0x151),'warn':_0x162615(0x172),'info':'blue'});}[a157_0x14dde7(0x16d)](_0xb54ac8,_0xa4189d,_0x28e96c){const _0xd20517=a157_0x14dde7;if(!this[_0xd20517(0x16a)]||!this[_0xd20517(0x15b)])return;this[_0xd20517(0x15b)][_0xd20517(0x16d)](_0xa4189d,{'command':_0xb54ac8,'details':_0x28e96c});}['success'](_0xf69389,_0x5e01bd,_0x46af51,_0x4e51ee){const _0x1de6f8=a157_0x14dde7;if(!this[_0x1de6f8(0x16a)]||!this['winstonLogger'])return;this[_0x1de6f8(0x15b)]['log'](_0x1de6f8(0x16d),_0x5e01bd,{'level':_0x1de6f8(0x174),'command':_0xf69389,'duration':_0x46af51,'details':_0x4e51ee});}['error'](_0x4aa73a,_0x37a497,_0x20b902){const _0x1d903a=a157_0x14dde7;if(!this[_0x1d903a(0x16a)]||!this[_0x1d903a(0x15b)])return;this['winstonLogger'][_0x1d903a(0x17f)](_0x37a497,{'command':_0x4aa73a,'details':_0x20b902});}[a157_0x14dde7(0x16c)](_0x532e65,_0x17ea11,_0x453e67){const _0x3f43ce=a157_0x14dde7;if(!this[_0x3f43ce(0x16a)]||!this[_0x3f43ce(0x15b)])return;this[_0x3f43ce(0x15b)]['warn'](_0x17ea11,{'command':_0x532e65,'details':_0x453e67});}async[a157_0x14dde7(0x15a)](_0x5f4b16,_0x34c191,_0x144e73){const _0x4057f9=a157_0x14dde7,_0x4b3ad5=Date['now']();this[_0x4057f9(0x16d)](_0x5f4b16,_0x4057f9(0x160)+_0x34c191);try{const _0x396c6f=await _0x144e73(),_0x380d63=Date[_0x4057f9(0x17e)]()-_0x4b3ad5;return this['success'](_0x5f4b16,_0x4057f9(0x159)+_0x34c191,_0x380d63),_0x396c6f;}catch(_0x2b1e75){const _0x1f93b9=Date[_0x4057f9(0x17e)]()-_0x4b3ad5;this[_0x4057f9(0x17f)](_0x5f4b16,_0x4057f9(0x16e)+_0x34c191,{'error':_0x2b1e75 instanceof Error?_0x2b1e75['message']:String(_0x2b1e75),'duration':_0x1f93b9});throw _0x2b1e75;}}['readLogs'](){const _0x47459=a157_0x14dde7;try{if(!a157_0xecfcef[_0x47459(0x177)](this[_0x47459(0x16a)]))return[];const _0x16efbb=a157_0xecfcef[_0x47459(0x154)](this[_0x47459(0x16a)],_0x47459(0x155));return _0x16efbb[_0x47459(0x15f)](/\r?\n/)[_0x47459(0x178)](_0xf358ed=>_0xf358ed[_0x47459(0x182)]())[_0x47459(0x15d)](_0x478809=>JSON[_0x47459(0x169)](_0x478809));}catch(_0x2c34e0){return console['warn']('Failed\x20to\x20read\x20logs:',_0x2c34e0),[];}}[a157_0x14dde7(0x173)](){const _0x20db1d=a157_0x14dde7;try{a157_0xecfcef[_0x20db1d(0x177)](this[_0x20db1d(0x16a)])&&a157_0xecfcef[_0x20db1d(0x150)](this[_0x20db1d(0x16a)],'',_0x20db1d(0x155));}catch(_0x41fb61){console[_0x20db1d(0x16c)](_0x20db1d(0x17c),_0x41fb61);}}[a157_0x14dde7(0x162)](){const _0x4fa914=a157_0x14dde7;return this[_0x4fa914(0x15b)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x51a8d6=a158_0x2f78;(function(_0x51f351,_0x3871a0){const _0x41f33d=a158_0x2f78,_0x7023f3=_0x51f351();while(!![]){try{const _0x5010ed=parseInt(_0x41f33d(0x16c))/0x1+parseInt(_0x41f33d(0x166))/0x2*(parseInt(_0x41f33d(0x164))/0x3)+parseInt(_0x41f33d(0x15a))/0x4*(-parseInt(_0x41f33d(0x15d))/0x5)+parseInt(_0x41f33d(0x15f))/0x6+parseInt(_0x41f33d(0x16a))/0x7+-parseInt(_0x41f33d(0x168))/0x8+-parseInt(_0x41f33d(0x161))/0x9*(-parseInt(_0x41f33d(0x169))/0xa);if(_0x5010ed===_0x3871a0)break;else _0x7023f3['push'](_0x7023f3['shift']());}catch(_0x4869fe){_0x7023f3['push'](_0x7023f3['shift']());}}}(a158_0x2455,0x661e0));function a158_0x2455(){const _0x1f9148=['includes','length','64545MLdqmb','MAX_SAFE_INTEGER','2nXdLkG','getOwnPropertyDescriptor','1385648yVVsvn','10eNthhf','2982987IQesgy','parse','71592RGXsSY','json','undefined','1500244tTOrDq','defineProperty','MIN_SAFE_INTEGER','10EiSvXO','slice','1958382plKVtH','exec','4463595vZJUyh'];a158_0x2455=function(){return _0x1f9148;};return a158_0x2455();}const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a158_0x51a8d6(0x165)]),MIN_SAFE_INTEGER=BigInt(Number[a158_0x51a8d6(0x15c)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x8395b5){const _0x369981=a158_0x51a8d6;if(_0x8395b5['includes']('.')||_0x8395b5[_0x369981(0x162)]('e')||_0x8395b5[_0x369981(0x162)]('E'))return![];const _0x37060b=BigInt(_0x8395b5);return _0x37060b>MAX_SAFE_INTEGER||_0x37060b<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x538f19){const _0x5926d2=a158_0x51a8d6;let _0x5360dd='',_0x44197d=![],_0x3ccf19=![];for(let _0xb7a89c=0x0;_0xb7a89c<_0x538f19[_0x5926d2(0x163)];){const _0x175bec=_0x538f19[_0xb7a89c];if(_0x44197d){_0x5360dd+=_0x175bec,_0xb7a89c+=0x1;if(_0x3ccf19)_0x3ccf19=![];else{if(_0x175bec==='\x5c')_0x3ccf19=!![];else _0x175bec==='\x22'&&(_0x44197d=![]);}continue;}if(_0x175bec==='\x22'){_0x44197d=!![],_0x5360dd+=_0x175bec,_0xb7a89c+=0x1;continue;}if(_0x175bec==='-'||_0x175bec>='0'&&_0x175bec<='9'){const _0x1842e9=JSON_NUMBER_PATTERN[_0x5926d2(0x160)](_0x538f19[_0x5926d2(0x15e)](_0xb7a89c))?.[0x0];if(_0x1842e9){_0x5360dd+=isUnsafeIntegerLiteral(_0x1842e9)?'\x22'+_0x1842e9+'\x22':_0x1842e9,_0xb7a89c+=_0x1842e9[_0x5926d2(0x163)];continue;}}_0x5360dd+=_0x175bec,_0xb7a89c+=0x1;}return _0x5360dd;}function a158_0x2f78(_0x4e6340,_0x43990a){_0x4e6340=_0x4e6340-0x15a;const _0x24550b=a158_0x2455();let _0x2f7808=_0x24550b[_0x4e6340];return _0x2f7808;}export function parseLosslessJson(_0x9be0f8){const _0x4133d7=a158_0x51a8d6;return JSON[_0x4133d7(0x16b)](quoteUnsafeIntegerLiterals(_0x9be0f8));}export function installLosslessJsonResponseParser(){const _0x2d8a11=a158_0x51a8d6;if(typeof Response===_0x2d8a11(0x16e))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object[_0x2d8a11(0x167)](responseJsonPrototype,_0x2d8a11(0x16d)),Object[_0x2d8a11(0x15b)](responseJsonPrototype,_0x2d8a11(0x16d),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0xd56003(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x48c9c0=_0x2d8a11;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x48c9c0(0x15b)](responseJsonPrototype,_0x48c9c0(0x16d),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x48c9c0(0x16d)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x2338d3,_0x5390f7){const _0x51a685=a159_0x5012,_0x4b6aea=_0x2338d3();while(!![]){try{const _0xf703dc=parseInt(_0x51a685(0xb3))/0x1*(parseInt(_0x51a685(0xc8))/0x2)+-parseInt(_0x51a685(0xbd))/0x3+-parseInt(_0x51a685(0xb8))/0x4+parseInt(_0x51a685(0xba))/0x5+parseInt(_0x51a685(0xc7))/0x6*(parseInt(_0x51a685(0xb0))/0x7)+parseInt(_0x51a685(0xb1))/0x8+-parseInt(_0x51a685(0xc2))/0x9*(parseInt(_0x51a685(0xc6))/0xa);if(_0xf703dc===_0x5390f7)break;else _0x4b6aea['push'](_0x4b6aea['shift']());}catch(_0x5d5e3e){_0x4b6aea['push'](_0x4b6aea['shift']());}}}(a159_0x58a8,0x729ba));function a159_0x58a8(){const _0x4d2df4=['5271640WWjlFi','string','473561fJbuXj','map','object','join','data\x20update\x20--params.','992552QiTIlc','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','3486385GsLTqp','data\x20update\x20can\x20update\x20at\x20most\x20','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','1185222zVpoEo','Invalid\x20JSON\x20for\x20--params:\x20','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','id[','isSafeInteger','9YgWjBp','test','validation','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','16529970xvkEIk','1123020rdgnUz','2AAIMSA','\x20records\x20per\x20call;\x20received\x20','isArray','length','items','35aQcVtd'];a159_0x58a8=function(){return _0x4d2df4;};return a159_0x58a8();}import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x332ab0){const _0x43438c=a159_0x5012;if(!_0x332ab0)return undefined;try{return parseLosslessJson(_0x332ab0);}catch{throw CliErrors[_0x43438c(0xc4)](_0x43438c(0xbe)+_0x332ab0);}}export function parseJsonParamsValue(_0x506446){const _0x177e30=a159_0x5012;if(!_0x506446)return undefined;try{return parseLosslessJson(_0x506446);}catch{throw CliErrors[_0x177e30(0xc4)](_0x177e30(0xbe)+_0x506446);}}export function parseBatchCreateItemsFromParams(_0x1d4f3d){const _0x52e0c4=a159_0x5012;if(Array['isArray'](_0x1d4f3d))return _0x1d4f3d;if(_0x1d4f3d!==null&&_0x1d4f3d!==undefined&&typeof _0x1d4f3d===_0x52e0c4(0xb5)&&Array[_0x52e0c4(0xad)](_0x1d4f3d[_0x52e0c4(0xaf)]))return _0x1d4f3d[_0x52e0c4(0xaf)];throw CliErrors[_0x52e0c4(0xc4)](_0x52e0c4(0xb9),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}function parseDataUpdateId(_0x30e0d6,_0x44118d){const _0x3ea4b4=a159_0x5012;if(typeof _0x30e0d6==='number'&&Number[_0x3ea4b4(0xc1)](_0x30e0d6)&&_0x30e0d6>0x0)return _0x30e0d6;if(typeof _0x30e0d6===_0x3ea4b4(0xb2)){if(/^[1-9]\d*$/[_0x3ea4b4(0xc3)](_0x30e0d6))return _0x30e0d6;}throw CliErrors[_0x3ea4b4(0xc4)](_0x3ea4b4(0xb7)+_0x44118d+_0x3ea4b4(0xbc));}export function parseUpdateIdsFromParams(_0x34f544){const _0x1345ab=a159_0x5012;if(_0x34f544===null||_0x34f544===undefined||typeof _0x34f544!=='object'||Array['isArray'](_0x34f544))throw CliErrors['validation']('data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.',_0x1345ab(0xc5));const _0x2e4be3=_0x34f544['id'];if(_0x2e4be3===undefined||_0x2e4be3===null)throw CliErrors[_0x1345ab(0xc4)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x1345ab(0xc5));const _0x1ac81d=Array[_0x1345ab(0xad)](_0x2e4be3)?_0x2e4be3:[_0x2e4be3];if(_0x1ac81d[_0x1345ab(0xae)]===0x0)throw CliErrors[_0x1345ab(0xc4)](_0x1345ab(0xbf));if(_0x1ac81d[_0x1345ab(0xae)]>MAX_DATA_UPDATE_IDS)throw CliErrors['validation'](_0x1345ab(0xbb)+MAX_DATA_UPDATE_IDS+_0x1345ab(0xc9)+_0x1ac81d[_0x1345ab(0xae)]+'.');return _0x1ac81d[_0x1345ab(0xb4)]((_0x55021c,_0x241dd8)=>parseDataUpdateId(_0x55021c,Array[_0x1345ab(0xad)](_0x2e4be3)?_0x1345ab(0xc0)+_0x241dd8+']':'id'));}function a159_0x5012(_0x478067,_0x520336){_0x478067=_0x478067-0xad;const _0x58a8eb=a159_0x58a8();let _0x50129a=_0x58a8eb[_0x478067];return _0x50129a;}export function normalizeUpdateParamsForRuntime(_0x55a822,_0x25d805){const _0x44de07=a159_0x5012;if(Array[_0x44de07(0xad)](_0x55a822['id'])&&_0x25d805[_0x44de07(0xae)]>0x1)return{..._0x55a822,'id':_0x25d805[_0x44de07(0xb6)](',')};return _0x55a822;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a160_0x10db(_0x55c0e3,_0x2cf782){_0x55c0e3=_0x55c0e3-0x121;const _0x4faecb=a160_0x4fae();let _0x10db75=_0x4faecb[_0x55c0e3];return _0x10db75;}function a160_0x4fae(){const _0x91a5f5=['1GfaSTH','2954954ExeoYv','25BLKlLs','13093713bFkUnM','platform','9552pbXuyz','.cmd','3896526uROZzF','5873LAyrdP','win32','977152UuuPJR','806524vuBCBJ','615591CRKrlH','190xFUQWH'];a160_0x4fae=function(){return _0x91a5f5;};return a160_0x4fae();}const a160_0x51f370=a160_0x10db;(function(_0x1b45fb,_0x3743e3){const _0x4a3b63=a160_0x10db,_0x5813ad=_0x1b45fb();while(!![]){try{const _0x1b8bcd=parseInt(_0x4a3b63(0x12a))/0x1*(parseInt(_0x4a3b63(0x12b))/0x2)+-parseInt(_0x4a3b63(0x128))/0x3+parseInt(_0x4a3b63(0x127))/0x4*(-parseInt(_0x4a3b63(0x12c))/0x5)+-parseInt(_0x4a3b63(0x123))/0x6+parseInt(_0x4a3b63(0x124))/0x7*(parseInt(_0x4a3b63(0x121))/0x8)+-parseInt(_0x4a3b63(0x12d))/0x9+-parseInt(_0x4a3b63(0x129))/0xa*(-parseInt(_0x4a3b63(0x126))/0xb);if(_0x1b8bcd===_0x3743e3)break;else _0x5813ad['push'](_0x5813ad['shift']());}catch(_0x1ce417){_0x5813ad['push'](_0x5813ad['shift']());}}}(a160_0x4fae,0xcf60d));export const isWindows=process[a160_0x51f370(0x12e)]===a160_0x51f370(0x125);export function resolveNpmBin(_0x215cc5){const _0x15e9b5=a160_0x51f370;return isWindows?_0x215cc5+_0x15e9b5(0x122):_0x215cc5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x117974,_0x436a31){const _0x2281fb=a161_0x4161,_0x64ecb=_0x117974();while(!![]){try{const _0x4c4e40=-parseInt(_0x2281fb(0xe6))/0x1+parseInt(_0x2281fb(0xe9))/0x2+-parseInt(_0x2281fb(0xcf))/0x3+-parseInt(_0x2281fb(0xe8))/0x4+parseInt(_0x2281fb(0xe1))/0x5*(-parseInt(_0x2281fb(0xd9))/0x6)+parseInt(_0x2281fb(0xde))/0x7*(parseInt(_0x2281fb(0xe7))/0x8)+-parseInt(_0x2281fb(0xd7))/0x9*(-parseInt(_0x2281fb(0xe4))/0xa);if(_0x4c4e40===_0x436a31)break;else _0x64ecb['push'](_0x64ecb['shift']());}catch(_0xb95d4a){_0x64ecb['push'](_0x64ecb['shift']());}}}(a161_0x57ee,0x54d10));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';function a161_0x57ee(){const _0x31bc9d=['391344iIzvAB','1314804CdHjIs','lastNotifiedAt','update-check.json','1892412nRsXMy','toLowerCase','filter','object','.cache','join','stableVersion','\x20is\x20recommended,\x20current\x20','9566190nxVBHv','lastNotifiedVersion','96tfsWNH','https://www.npmjs.com/package/','lovrabet-cli','belowMinimum','needsUpgrade','2058aIFAhu','yes','trim','215980bzlUdo','utf8','parse','10qedNca','stringify','49854Plshvq','2632ivNWWp'];a161_0x57ee=function(){return _0x31bc9d;};return a161_0x57ee();}import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{checkCliVersion,getCliUpgradeCommand}from'../utils/cli-version-check.js';const UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x5a54fb=a161_0x4161,_0x3fac51=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x5a54fb(0xe0)]()[_0x5a54fb(0xd0)]();return _0x3fac51==='1'||_0x3fac51==='true'||_0x3fac51===_0x5a54fb(0xdf);}function cacheRoot(){const _0xa3dc62=a161_0x4161;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0xa3dc62(0xd3));}export function getUpdateNoticeCachePath(){const _0x1003b8=a161_0x4161;return join(cacheRoot(),_0x1003b8(0xdb),_0x1003b8(0xce));}function a161_0x4161(_0x315b21,_0x43c0e6){_0x315b21=_0x315b21-0xce;const _0x57eeba=a161_0x57ee();let _0x416180=_0x57eeba[_0x315b21];return _0x416180;}async function readUpdateNoticeCache(){const _0xf611c3=a161_0x4161;try{const _0x1e2ba0=await readFile(getUpdateNoticeCachePath(),_0xf611c3(0xe2)),_0x757b6f=JSON[_0xf611c3(0xe3)](_0x1e2ba0);if(!_0x757b6f||typeof _0x757b6f!==_0xf611c3(0xd2))return{};return _0x757b6f;}catch{return{};}}async function writeUpdateNoticeCache(_0x250cc6){const _0x42f9da=a161_0x4161;try{const _0x1e5feb=getUpdateNoticeCachePath();await mkdir(dirname(_0x1e5feb),{'recursive':!![]}),await writeFile(_0x1e5feb,JSON[_0x42f9da(0xe5)](_0x250cc6,null,0x2)+'\x0a',_0x42f9da(0xe2));}catch{}}function isRecentlyNotified(_0x59a7bf,_0x347a94,_0x4003ef){const _0x20487f=a161_0x4161;return _0x59a7bf[_0x20487f(0xd8)]===_0x347a94&&typeof _0x59a7bf[_0x20487f(0xea)]==='number'&&_0x4003ef-_0x59a7bf[_0x20487f(0xea)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x2919b5){const _0x2d52ff=a161_0x4161;return _0x2d52ff(0xda)+LOVRABET_NPM_PACKAGE_NAME+'/v/'+_0x2919b5;}export async function resolveLatestUpdateNotice(_0xe792fa){const _0x55d23f=a161_0x4161;if(isUpdateNoticeDisabled())return null;try{const _0x51f8de=Date['now'](),_0x405dec=_0xe792fa??await checkCliVersion(),_0x1e0652=_0x405dec['currentVersion'],_0x36c12c=_0x405dec[_0x55d23f(0xd5)],_0x1d9c0d=await readUpdateNoticeCache();if(!_0x36c12c||!_0x405dec[_0x55d23f(0xdd)]||_0x405dec[_0x55d23f(0xdc)])return null;if(isRecentlyNotified(_0x1d9c0d,_0x36c12c,_0x51f8de))return null;const _0x51d3ad=getCliUpgradeCommand(_0x405dec);return await writeUpdateNoticeCache({..._0x1d9c0d,'checkedAt':_0x51f8de,'latest':_0x36c12c,'failed':![],'lastNotifiedVersion':_0x36c12c,'lastNotifiedAt':_0x51f8de}),{'command':_0x51d3ad,'current':_0x1e0652,'latest':_0x36c12c,'url':buildNpmVersionUrl(_0x36c12c),'message':[_0x405dec['upgradeMessage'],CLI_BIN_NAME+'\x20'+_0x36c12c+_0x55d23f(0xd6)+_0x1e0652+',\x20run:\x20'+_0x51d3ad][_0x55d23f(0xd1)](Boolean)[_0x55d23f(0xd4)]('\x20')};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1bc50f,_0x4d1dcd){const _0x3613ff=a162_0x27ea,_0x43552f=_0x1bc50f();while(!![]){try{const _0x2656e2=parseInt(_0x3613ff(0x135))/0x1*(-parseInt(_0x3613ff(0x130))/0x2)+parseInt(_0x3613ff(0x134))/0x3*(-parseInt(_0x3613ff(0x12d))/0x4)+-parseInt(_0x3613ff(0x132))/0x5*(parseInt(_0x3613ff(0x12e))/0x6)+parseInt(_0x3613ff(0x12f))/0x7+-parseInt(_0x3613ff(0x131))/0x8+parseInt(_0x3613ff(0x136))/0x9*(-parseInt(_0x3613ff(0x12c))/0xa)+parseInt(_0x3613ff(0x133))/0xb;if(_0x2656e2===_0x4d1dcd)break;else _0x43552f['push'](_0x43552f['shift']());}catch(_0x5d21f1){_0x43552f['push'](_0x43552f['shift']());}}}(a162_0x2064,0xbe335));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x2d6c10=a162_0x27ea,_0x4e5005=String(GIT_COMMIT);return _0x4e5005&&_0x4e5005!==_0x2d6c10(0x137)?_0x4e5005:'';}function a162_0x2064(){const _0x228cdc=['unknown','10HjnhlQ','127756bYdLpM','6488244FgZhYl','4931878Cwmzdb','22TiHSll','11731104jPdYTh','5iYxAmF','49736654tzEeSS','93syZIRd','18013AxLwHJ','6398937cXFPSw'];a162_0x2064=function(){return _0x228cdc;};return a162_0x2064();}function a162_0x27ea(_0x4768eb,_0x4b8c7a){_0x4768eb=_0x4768eb-0x12c;const _0x206426=a162_0x2064();let _0x27ea1d=_0x206426[_0x4768eb];return _0x27ea1d;}export function getCliVersionDisplay(){const _0xb4da1f=getCliGitCommit(),_0x398425=BUILD_TIME['slice'](0x0,0xa);if(!_0xb4da1f||!_0x398425)return VERSION;return VERSION+'\x20('+_0xb4da1f+',\x20'+_0x398425+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d3de8,_0x302bf0){var _0x3ea5c0=a163_0x454d,_0xb6dc59=_0x2d3de8();while(!![]){try{var _0xca1b9e=parseInt(_0x3ea5c0(0x1ad))/0x1+-parseInt(_0x3ea5c0(0x1ae))/0x2+-parseInt(_0x3ea5c0(0x1b1))/0x3*(parseInt(_0x3ea5c0(0x1af))/0x4)+-parseInt(_0x3ea5c0(0x1b2))/0x5*(-parseInt(_0x3ea5c0(0x1ac))/0x6)+parseInt(_0x3ea5c0(0x1ab))/0x7+parseInt(_0x3ea5c0(0x1b3))/0x8*(-parseInt(_0x3ea5c0(0x1b4))/0x9)+parseInt(_0x3ea5c0(0x1b5))/0xa;if(_0xca1b9e===_0x302bf0)break;else _0xb6dc59['push'](_0xb6dc59['shift']());}catch(_0x181f3c){_0xb6dc59['push'](_0xb6dc59['shift']());}}}(a163_0x483f,0xe2064));export function writeCliSideChannelLine(_0x1243ae){var _0x204151=a163_0x454d;process[_0x204151(0x1b6)][_0x204151(0x1b0)](_0x1243ae+'\x0a');}function a163_0x454d(_0xf42ad6,_0x26d389){_0xf42ad6=_0xf42ad6-0x1ab;var _0x483f87=a163_0x483f();var _0x454d65=_0x483f87[_0xf42ad6];return _0x454d65;}function a163_0x483f(){var _0x1908c5=['720QHQjPE','4815860AEgDVX','stderr','7944258uXFhai','2846202CANrBK','397146roXhrW','730976TqLFBs','4nvOmke','write','338367LceSWi','5KeGWRp','108392oKqSYu'];a163_0x483f=function(){return _0x1908c5;};return a163_0x483f();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/lovrabet-cli",
|
|
3
|
-
"version": "2.3.1-beta.
|
|
3
|
+
"version": "2.3.1-beta.3",
|
|
4
4
|
"description": "Runtime CLI for Lovrabet apps, datasets, SQL, Backend Function, skills, and AI agent workflows.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"verify:bundled-jq": "node scripts/verify-bundled-jq.mjs",
|
|
52
52
|
"validate:cli-version-policy": "node scripts/validate-cli-version-policy.mjs",
|
|
53
53
|
"regression:release-smoke": "node scripts/regression-release-smoke.mjs",
|
|
54
|
+
"release:summary:prepare": "node scripts/release-summary-preparation.mjs",
|
|
54
55
|
"deploy:verify": "node scripts/deploy-verify.mjs",
|
|
55
56
|
"pack:dry-run-summary": "node scripts/package-dry-run-summary.mjs",
|
|
56
57
|
"verify:release-package": "node scripts/verify-release-package.mjs",
|
package/skills/lovrabet/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lovrabet
|
|
3
3
|
displayName: Lovrabet 运行态 CLI
|
|
4
|
-
version: 2.3.1-beta.
|
|
4
|
+
version: 2.3.1-beta.3
|
|
5
5
|
description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、Personal Backend Function、文件上传、面向票证类业务材料文字与结构化字段提取的 OCR、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、业务角色、角色成员、页面权限、菜单权限、数据集权限、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、service tree、业务服务树、api-doc、dataset、data filter、file upload、file query-url、ocr recognize、OCR 识别、票证文字提取、票证字段提取、发票识别、票据识别、证照识别、附件上传、personal-bff、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
|
|
6
6
|
metadata:
|
|
7
7
|
requires:
|
|
@@ -49,7 +49,7 @@ npm 包会自动安装同版本 Built-in Skill。若 `lovrabet doctor` 报告缺
|
|
|
49
49
|
|
|
50
50
|
### 认证命令选择
|
|
51
51
|
|
|
52
|
-
- **首次使用或切换节点**:执行 `lovrabet config init
|
|
52
|
+
- **首次使用或切换节点**:执行 `lovrabet config init`,选择当前已开放国家/地区;独立部署优先导入 `lovrabet-routing/v1` 清单,清单同时声明 Domain、`cdn.libraries` 与 `cdn.lovrabet`,供两个 CLI 共用。该命令固定维护全局连接配置
|
|
53
53
|
- **只想更新 AK,尽量保留现有配置**:用户提供 AccessKey 后,使用 `lovrabet auth login --access-key <ACCESS_KEY>`
|
|
54
54
|
- **还没有 AK,需要先自助创建**:Agent 可先执行 `lovrabet auth login --non-interactive` 获取无打扰提示,把命令根据当前 `userDomain` 返回的创建地址发给用户;用户把 AccessKey 发给 Agent 后,再执行 `lovrabet auth login --access-key <ACCESS_KEY>`
|
|
55
55
|
- **想确认当前 AK 对应的是哪个用户**:使用 `lovrabet auth info`
|
|
@@ -72,7 +72,7 @@ npm 包会自动安装同版本 Built-in Skill。若 `lovrabet doctor` 报告缺
|
|
|
72
72
|
- **不要擅自加 `--global` 或修改本地配置** — 见上文「本地配置原则」;仅在用户明确要求或文档说明的场景使用配置写命令。
|
|
73
73
|
- **不要主动创建工作目录配置** — 即使连续多次在同一目录使用同一个 `--app` / `--appcode`,也只能提醒用户是否要写入当前目录 `.lovrabet.json`;必须得到用户明确同意后,才可执行 `workspace init/use`。
|
|
74
74
|
- **不要回显或记录真实凭证** — 如果用户提供 AccessKey,只用于本次认证命令;不要在最终答复、日志、文档片段或排障输出里展示真实值。
|
|
75
|
-
- **禁止通过修改配置文件提升权限** — 不得为了完成任务而修改 `.lovrabet.json`、环境变量或缓存内容来抬高 `riskLevel`、切换到并非用户明确授权的 `accessKey`、伪造 `defaultApp` / `appcode`
|
|
75
|
+
- **禁止通过修改配置文件提升权限** — 不得为了完成任务而修改 `.lovrabet.json`、环境变量或缓存内容来抬高 `riskLevel`、切换到并非用户明确授权的 `accessKey`、伪造 `defaultApp` / `appcode` 或连接路由,或借此突破当前权限边界。权限不足时,应明确说明限制,并要求用户提供合法的目标应用、凭证或确认范围。
|
|
76
76
|
- **不要访问未发布应用的数据** — `app list` 默认只展示已发布应用;即使通过 `app list --include-unpublished` 或缓存看到未发布应用,也不要把它作为 `dataset` / `data` / `sql` / `bff` 的目标。
|
|
77
77
|
- **不要臆测当前登录用户** — 只要任务依赖“当前是谁在登录 / 当前 AK 属于谁”,先执行 `lovrabet auth info`,再继续判断应用、权限或数据可见性。
|
|
78
78
|
- **运行态业务发现与实现资产隔离** — 运行态发现业务能力,不枚举实现资产。简单基础事实查询优先通过已治理 Dataset 的字段、关联和只读操作回答;稳定规则由业务 Skill 或可信 Service Tree 绑定到已发布入口。未绑定的 Custom SQL/Backend Function 实现资产不进入运行态候选。
|
|
@@ -331,7 +331,7 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
|
|
|
331
331
|
| **kb** | `detail` | 查看 personal 知识库正文与 RAG 状态 | read | AK |
|
|
332
332
|
| **kb** | `create` | 从本地文件创建 personal 知识库 | write | AK |
|
|
333
333
|
| **kb** | `update` | 从本地文件更新 personal 知识库 | write | AK |
|
|
334
|
-
| **kb** | `search` |
|
|
334
|
+
| **kb** | `search` | 检索可见公司和个人知识 | read | AK |
|
|
335
335
|
| **schedule** | `validate` | 校验 UTC 定时任务,不创建计划 | read | AK |
|
|
336
336
|
| **schedule** | `create` | 创建周期或单次定时任务(需确认) | high-risk-write | AK |
|
|
337
337
|
| **schedule** | `list` | 分页查看当前应用的定时任务 | read | AK |
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
优先检查:
|
|
22
22
|
|
|
23
|
-
1.
|
|
23
|
+
1. `lovrabet doctor` 显示的国家/地区和最终 Domain 是否正确
|
|
24
24
|
2. 当前 AK 对应的是否是预期用户:`lovrabet auth info`
|
|
25
25
|
3. `defaultApp` 是否能在 cache 中解析到 appcode
|
|
26
26
|
4. 是否需要先刷新 app cache
|
|
@@ -32,7 +32,6 @@ lovrabet app list --no-cache
|
|
|
32
32
|
如果你怀疑连接配置或认证信息不符合预期,比如:
|
|
33
33
|
|
|
34
34
|
- `defaultApp` 明显不对
|
|
35
|
-
- `env` 和预期不一致
|
|
36
35
|
- `auth info` 返回的用户不是你预期的账号
|
|
37
36
|
- `lovrabet doctor` 显示的 region 或 Domain 不符合预期
|
|
38
37
|
|
|
@@ -40,13 +39,12 @@ lovrabet app list --no-cache
|
|
|
40
39
|
|
|
41
40
|
```bash
|
|
42
41
|
lovrabet config init --region cn
|
|
43
|
-
lovrabet config set env daily --global
|
|
44
42
|
lovrabet auth login --access-key <ACCESS_KEY>
|
|
45
43
|
```
|
|
46
44
|
|
|
47
45
|
如果业务节点在印尼,把第一条改成 `lovrabet config init --region id`。企业独立部署使用 `lovrabet config init --domain-config <file>`。
|
|
48
46
|
|
|
49
|
-
`config init` 只替换全局 region/Domain 路由字段,`auth login` 只替换目标作用域的 AccessKey
|
|
47
|
+
`config init` 只替换全局 region/Domain 路由字段,`auth login` 只替换目标作用域的 AccessKey;两者都保留其他配置。最后执行 `lovrabet doctor` 核对最终生效的国家/地区和 Domain。
|
|
50
48
|
|
|
51
49
|
## `defaultApp` 已有,但仍然找不到 appcode
|
|
52
50
|
|
|
@@ -91,5 +89,5 @@ lovrabet doctor
|
|
|
91
89
|
|
|
92
90
|
- 配置来源不清楚
|
|
93
91
|
- `defaultApp` / `currentApp` 判断异常
|
|
94
|
-
-
|
|
92
|
+
- 国家/地区或 Domain 和实际请求不一致
|
|
95
93
|
- 认证信息看起来存在,但命令仍失败
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## config init — 初始化连接配置
|
|
8
8
|
|
|
9
|
-
固定写入全局配置 `~/.lovrabet.json
|
|
9
|
+
固定写入全局配置 `~/.lovrabet.json`,不需要额外的作用域参数。它只配置连接路由,不登录、不保存 AccessKey,也不建立当前目录的应用绑定。
|
|
10
10
|
|
|
11
11
|
交互模式用方向键选择 `Mainland China (cn)` 或 `Indonesia (id)`;当前不提供 `global`。非交互且未传 region/Domain 时默认 `cn`。自动化示例:
|
|
12
12
|
|
|
@@ -25,7 +25,31 @@ lovrabet config init --domain-config ./lovrabet-domains.json
|
|
|
25
25
|
|
|
26
26
|
### 独立部署模式
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
推荐使用两个 CLI 共用的版本化企业路由清单:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"protocol": "lovrabet-routing/v1",
|
|
33
|
+
"kind": "enterprise",
|
|
34
|
+
"cdn": {
|
|
35
|
+
"libraries": "https://cdnjs.cloudflare.com/ajax/libs",
|
|
36
|
+
"lovrabet": "https://g.lovrabet.com"
|
|
37
|
+
},
|
|
38
|
+
"domains": {
|
|
39
|
+
"userDomain": "https://user.customer.example.com",
|
|
40
|
+
"apiDomain": "https://api.customer.example.com",
|
|
41
|
+
"runtimeDomain": "https://runtime.customer.example.com",
|
|
42
|
+
"skillDomain": "https://skills.customer.example.com",
|
|
43
|
+
"kbDomain": {
|
|
44
|
+
"default": "https://kb-admin.customer.example.com",
|
|
45
|
+
"lovrabet-cli": "https://kb.customer.example.com"
|
|
46
|
+
},
|
|
47
|
+
"appDomain": "https://app.customer.example.com"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
新版清单要求完整服务拓扑以及 `cdn.libraries` / `cdn.lovrabet`。前者是第三方库的完整 CDN 基地址,后者是 Lovrabet 自有资源 origin;Runtime CLI 校验并保留它们,供同一清单被 Rabetbase 使用。Domain 可写成所有消费者共用的 HTTPS 字符串;确有差异时写成带 `default` 或消费者键的对象。对象优先使用 `lovrabet-cli`,其次使用 `default`,两者都没有时命令报错。Runtime CLI 会保留但不使用 `appDomain`、`localDomain`、`certificateDomain` 与 `cdn`。清单不能叠加单独的 Domain flags。旧扁平 JSON 继续兼容,只允许以下五个字段,且至少提供一个:
|
|
29
53
|
|
|
30
54
|
```json
|
|
31
55
|
{
|
|
@@ -37,11 +61,11 @@ Domain 文件必须是 JSON 对象,只允许以下五个字段,且至少提
|
|
|
37
61
|
}
|
|
38
62
|
```
|
|
39
63
|
|
|
40
|
-
也可以用 `--user-domain`、`--api-domain`、`--runtime-domain`、`--skill-domain`、`--kb-domain` 逐项传入;显式 flag
|
|
64
|
+
也可以用 `--user-domain`、`--api-domain`、`--runtime-domain`、`--skill-domain`、`--kb-domain` 逐项传入;显式 flag 只覆盖旧扁平文件里的同名字段。所有值必须是无账号、路径、query 和 fragment 的 HTTPS origin。
|
|
41
65
|
|
|
42
|
-
|
|
66
|
+
新版企业清单会保存为带协议标识的 `routing` 对象,并整体优先于旧顶层 Domain;旧扁平配置继续保持既有回退行为。
|
|
43
67
|
|
|
44
|
-
两种模式都保留 AccessKey、
|
|
68
|
+
两种模式都保留 AccessKey、format、locale、应用绑定等其他配置。初始化后用 `lovrabet doctor` 核对最终生效的国家/地区和五个 Domain。
|
|
45
69
|
|
|
46
70
|
## config list — 查看完整配置
|
|
47
71
|
|
|
@@ -65,7 +89,7 @@ lovrabet config get <key>
|
|
|
65
89
|
|
|
66
90
|
| 参数 | 类型 | 说明 |
|
|
67
91
|
|------|------|------|
|
|
68
|
-
| `<key>` | string | **必填** — 配置键名(如 `appcode`、`
|
|
92
|
+
| `<key>` | string | **必填** — 配置键名(如 `appcode`、`format`、`riskLevel`) |
|
|
69
93
|
|
|
70
94
|
**示例**:
|
|
71
95
|
|
|
@@ -73,8 +97,8 @@ lovrabet config get <key>
|
|
|
73
97
|
lovrabet config get appcode
|
|
74
98
|
# 输出: app-xxxxxxxx
|
|
75
99
|
|
|
76
|
-
lovrabet config get
|
|
77
|
-
# 输出:
|
|
100
|
+
lovrabet config get format
|
|
101
|
+
# 输出: compress
|
|
78
102
|
```
|
|
79
103
|
|
|
80
104
|
## config set — 写入配置项
|
|
@@ -102,11 +126,10 @@ lovrabet config set <key> <value>
|
|
|
102
126
|
|
|
103
127
|
```bash
|
|
104
128
|
# 写入当前目录配置(默认;须在含 .lovrabet.json 的目录下执行)
|
|
105
|
-
lovrabet config set env daily
|
|
106
129
|
lovrabet config set format compress
|
|
107
130
|
|
|
108
131
|
# 写入全局配置(任意目录可用,需用户明确意图)
|
|
109
|
-
lovrabet config set
|
|
132
|
+
lovrabet config set format compress --global
|
|
110
133
|
|
|
111
134
|
# 配置 User AK(client-ak)
|
|
112
135
|
lovrabet config set accessKey <ACCESS_KEY>
|