@lovrabet/lovrabet-cli 2.2.5-beta.2 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/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.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.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.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 +1 -1
- package/skills/lovrabet/SKILL.md +4 -4
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +7 -6
- package/skills/lovrabet.manifest.json +3 -3
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a83_0x589b9c=a83_0x3e04;(function(_0x121dc0,_0x1bfc29){const _0x2a4459=a83_0x3e04,_0x395fd1=_0x121dc0();while(!![]){try{const _0x54ea63=parseInt(_0x2a4459(0x17f))/0x1*(parseInt(_0x2a4459(0x19f))/0x2)+-parseInt(_0x2a4459(0x172))/0x3+parseInt(_0x2a4459(0x18f))/0x4*(-parseInt(_0x2a4459(0x16b))/0x5)+-parseInt(_0x2a4459(0x1a4))/0x6+-parseInt(_0x2a4459(0x18b))/0x7*(-parseInt(_0x2a4459(0x16e))/0x8)+-parseInt(_0x2a4459(0x182))/0x9+parseInt(_0x2a4459(0x176))/0xa;if(_0x54ea63===_0x1bfc29)break;else _0x395fd1['push'](_0x395fd1['shift']());}catch(_0x594039){_0x395fd1['push'](_0x395fd1['shift']());}}}(a83_0x2cdf,0xb78ca));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a83_0x59fe35 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';function a83_0x3e04(_0x1b5115,_0x3bc94e){_0x1b5115=_0x1b5115-0x163;const _0x2cdff2=a83_0x2cdf();let _0x3e0435=_0x2cdff2[_0x1b5115];return _0x3e0435;}import{resolveNpmBin}from'../utils/platform.js';function a83_0x2cdf(){const _0xa96c41=['@lovrabet\x5clovrabet-cli','pipe','filter','install','@lovrabet/lovrabet-cli',']:\x20','latest','state','\x20CLI','\x20is\x20current.','reason','Already\x20up\x20to\x20date\x20(v','stderr','update','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','current','run','node_modules','status','valid','source','log','beta','bool','object','repairCommand','fromEntries','write','5CrsiAa','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','toLowerCase','152YzVZpO','warn','code','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','2365794cTqtcq','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','entries','boolean','21585530zlZFNl','\x20->\x20','args','validation','test','Checking\x20CLI\x20Built-in\x20Skill...','platform','skillVersion','unknown','301EeIhEU','exit\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','8817984Ovczlw','toString','Invalid\x20version:\x20','length','Version\x20comparison\x20failed:\x20','basename','INSTALL_FAILED','\x20version\x20from\x20npm.','Updated\x20to\x20v','62433zZCpFe','find','string','error','3901500oWuAqU','str','Update\x20failed:\x20','version','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Run\x20manually:\x20','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','join','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20','/dist-tags','stdout','timeout','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','/-/package/','trim','9250SBXqlE','win32','dirname','Unable\x20to\x20resolve\x20','lib','1347432oyIwpO','Updating\x20','npm','inherit','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.'];a83_0x2cdf=function(){return _0xa96c41;};return a83_0x2cdf();}import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a83_0x589b9c(0x1af),'type':a83_0x589b9c(0x175),'description':a83_0x589b9c(0x197),'default':![]},{'name':a83_0x589b9c(0x165),'type':a83_0x589b9c(0x175),'description':a83_0x589b9c(0x1b7),'default':![]},{'name':a83_0x589b9c(0x192),'type':a83_0x589b9c(0x18d),'description':a83_0x589b9c(0x193)}];function getRequestedVersion(_0x105fec){const _0x56a55a=a83_0x589b9c,_0x2db670=_0x105fec[_0x56a55a(0x190)]('version')[_0x56a55a(0x19e)]();if(_0x2db670)return _0x2db670;return String(_0x105fec[_0x56a55a(0x178)]?.[0x0]??'')[_0x56a55a(0x19e)]();}async function validateUpdateFlags(_0x230d49){const _0x319f75=a83_0x589b9c,_0x3d9664=getRequestedVersion(_0x230d49),_0x46aec5=[_0x230d49[_0x319f75(0x166)](_0x319f75(0x1af))?_0x319f75(0x1af):'',_0x230d49['bool'](_0x319f75(0x165))?_0x319f75(0x165):'',_0x3d9664?_0x319f75(0x192):''][_0x319f75(0x1ab)](Boolean);if(_0x46aec5[_0x319f75(0x185)]>0x1)throw CliErrors[_0x319f75(0x179)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x319f75(0x16c));if(_0x3d9664&&!a83_0x59fe35[_0x319f75(0x1bc)](_0x3d9664))throw CliErrors['validation'](_0x319f75(0x184)+_0x3d9664,_0x319f75(0x1a8));}async function fetchNpmDistTags(){const _0x2bc0c7=a83_0x589b9c;try{const _0x3127df=NPM_REGISTRY_BASE_URL+_0x2bc0c7(0x19d)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x2bc0c7(0x199),_0x4298f0=await fetch(_0x3127df,{'signal':AbortSignal[_0x2bc0c7(0x19b)](0x2710)});if(!_0x4298f0['ok'])return null;const _0xf3f9e4=await _0x4298f0['json']();if(!_0xf3f9e4||typeof _0xf3f9e4!==_0x2bc0c7(0x167))return null;return Object[_0x2bc0c7(0x169)](Object[_0x2bc0c7(0x174)](_0xf3f9e4)[_0x2bc0c7(0x1ab)](([,_0x42c1c8])=>typeof _0x42c1c8===_0x2bc0c7(0x18d)&&_0x42c1c8[_0x2bc0c7(0x19e)]())['map'](([_0x2b86be,_0x40c02f])=>[_0x2b86be,String(_0x40c02f)[_0x2bc0c7(0x19e)]()]));}catch{return null;}}async function resolveTargetVersion(_0x15b5c5){const _0x21537b=a83_0x589b9c,_0x5cd761=getRequestedVersion(_0x15b5c5);if(_0x5cd761)return{'version':_0x5cd761,'source':_0x21537b(0x192)};const _0x11c3b3=_0x15b5c5[_0x21537b(0x166)](_0x21537b(0x165))?'beta':_0x21537b(0x1af),_0x53eb52=await fetchNpmDistTags(),_0x15e778=_0x53eb52?.[_0x11c3b3];if(!_0x15e778)return null;return{'version':_0x15e778,'source':_0x11c3b3};}function shouldInstallTarget(_0x1ebac3,_0x3320a0){const _0x111577=a83_0x589b9c;if(_0x3320a0[_0x111577(0x163)]==='version'||_0x3320a0[_0x111577(0x163)]==='beta')return!a83_0x59fe35['eq'](_0x1ebac3,_0x3320a0[_0x111577(0x192)]);return a83_0x59fe35['lt'](_0x1ebac3,_0x3320a0[_0x111577(0x192)]);}export function installCliPackage(_0x3cc86e,_0x2d1003,_0x13c83b=resolveCurrentCliNpmPrefix()){const _0x199c93=a83_0x589b9c,_0x2526bc=resolveNpmBin(_0x199c93(0x1a6)),_0x655dd6=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3cc86e,_0x36f8cd=[_0x199c93(0x1ac),'-g',_0x655dd6],_0x5b7d99=runNpmInstall(_0x2526bc,_0x36f8cd,_0x2d1003);if(_0x5b7d99['ok']||!isNpmPrefixPermissionError(_0x5b7d99[_0x199c93(0x18e)]))return _0x5b7d99;if(!_0x13c83b||_0x5b7d99['error']?.[_0x199c93(0x16d)]()['includes'](_0x13c83b['toLowerCase']()))return _0x5b7d99;return console[_0x199c93(0x16f)](_0x199c93(0x19c)+_0x13c83b),runNpmInstall(_0x2526bc,[..._0x36f8cd,'--prefix',_0x13c83b],_0x2d1003);}export function resolveCurrentCliNpmPrefix(_0x190cfe=fileURLToPath(import.meta.url),_0x283698=process[a83_0x589b9c(0x17c)]){const _0x59aeee=a83_0x589b9c,_0x523be0=_0x283698==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x15e903=_0x523be0['dirname'](_0x523be0['dirname'](_0x523be0['dirname'](_0x190cfe))),_0x143e13=_0x283698===_0x59aeee(0x1a0)?_0x59aeee(0x1a9):_0x59aeee(0x1ad);let _0x2e8974=_0x523be0['dirname'](_0x15e903);while(!![]){if(_0x523be0[_0x59aeee(0x187)](_0x2e8974)===_0x59aeee(0x1ba)&&_0x523be0['relative'](_0x2e8974,_0x15e903)===_0x143e13){const _0x601984=_0x523be0[_0x59aeee(0x1a1)](_0x2e8974);return _0x523be0['basename'](_0x601984)===_0x59aeee(0x1a3)?_0x523be0[_0x59aeee(0x1a1)](_0x601984):_0x601984;}const _0x253249=_0x523be0['dirname'](_0x2e8974);if(_0x253249===_0x2e8974)return null;_0x2e8974=_0x253249;}}function runNpmInstall(_0x296805,_0x3d0dae,_0x25084a){const _0x59d55a=a83_0x589b9c;console[_0x59d55a(0x164)]('*\x20'+[_0x296805,..._0x3d0dae][_0x59d55a(0x196)]('\x20'));const _0x539f19=spawnSync(_0x296805,_0x3d0dae,{'cwd':process['cwd'](),'stdio':_0x59d55a(0x1aa),'env':process.env,'shell':![]}),_0x590929=_0x539f19['stderr']?_0x539f19[_0x59d55a(0x1b5)][_0x59d55a(0x183)]()[_0x59d55a(0x19e)]():'',_0x2970a7=_0x539f19[_0x59d55a(0x19a)]?_0x539f19[_0x59d55a(0x19a)][_0x59d55a(0x183)]()[_0x59d55a(0x19e)]():'';if(!_0x25084a){if(_0x2970a7)process[_0x59d55a(0x19a)][_0x59d55a(0x16a)](_0x2970a7+'\x0a');if(_0x590929)process[_0x59d55a(0x1b5)][_0x59d55a(0x16a)](_0x590929+'\x0a');}if(_0x539f19[_0x59d55a(0x1bb)]===0x0)return{'ok':!![]};const _0x384a90=_0x539f19[_0x59d55a(0x18e)]?.['message']||_0x590929||_0x2970a7||_0x59d55a(0x180)+(_0x539f19[_0x59d55a(0x1bb)]??'unknown');return{'ok':![],'error':_0x384a90};}function isNpmPrefixPermissionError(_0x577b82){const _0x403f85=a83_0x589b9c;return Boolean(_0x577b82&&/\b(?:EACCES|EPERM)\b/[_0x403f85(0x17a)](_0x577b82));}function repairCurrentBuiltinSkill(_0x409697){const _0xbb4b22=a83_0x589b9c;console['log'](_0xbb4b22(0x17b));const _0x581c21=installBuiltinSkill({'stdio':_0x409697?'pipe':_0xbb4b22(0x1a7)});if(_0x581c21['ok'])return console['log'](_0xbb4b22(0x198)+_0x581c21[_0xbb4b22(0x17d)]+_0xbb4b22(0x1b2)),!![];return console[_0xbb4b22(0x16f)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x581c21[_0xbb4b22(0x170)]||_0xbb4b22(0x188))+_0xbb4b22(0x1ae)+(_0x581c21[_0xbb4b22(0x18e)]||_0xbb4b22(0x17e))),console['log']('\x20\x20Run\x20manually:\x20'+_0x581c21[_0xbb4b22(0x168)]),![];}function verifyUpdatedBuiltinSkill(_0x260618){const _0x18958a=a83_0x589b9c;console[_0x18958a(0x164)](_0x18958a(0x17b));const _0x203ca9=inspectInstalledBuiltinSkillVersion(_0x260618);if(_0x203ca9[_0x18958a(0x1b0)]===_0x18958a(0x1b8))return console[_0x18958a(0x164)](_0x18958a(0x198)+_0x260618+_0x18958a(0x1b2)),!![];console[_0x18958a(0x16f)](_0x18958a(0x195)+_0x203ca9[_0x18958a(0x1b0)]+'.');if(_0x203ca9['reason'])console[_0x18958a(0x16f)]('\x20\x20'+_0x203ca9[_0x18958a(0x1b3)]);return console[_0x18958a(0x164)](_0x18958a(0x194)+_0x203ca9['repairCommand']),![];}async function execute(_0x3afc45){const _0x3a0019=a83_0x589b9c;await validateUpdateFlags(_0x3afc45);const _0x1f58c8=getCliVersion();console['log']('Current\x20version:\x20'+_0x1f58c8),console[_0x3a0019(0x164)]('Checking\x20npm\x20dist-tags...');const _0xdb3616=await resolveTargetVersion(_0x3afc45);if(!_0xdb3616){const _0x22595=_0x3afc45['bool'](_0x3a0019(0x165))?_0x3a0019(0x165):_0x3a0019(0x1af),_0x32aaaf=_0x3a0019(0x1a2)+_0x22595+_0x3a0019(0x189);return console['warn'](_0x32aaaf),console[_0x3a0019(0x164)](_0x3a0019(0x171)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x22595),{'ok':![]};}const _0x380259=[_0x1f58c8,_0xdb3616[_0x3a0019(0x192)]][_0x3a0019(0x18c)](_0x4ee07d=>!a83_0x59fe35[_0x3a0019(0x1bc)](_0x4ee07d));if(_0x380259)return console[_0x3a0019(0x16f)](_0x3a0019(0x186)+_0x380259+'.'),{'ok':![]};if(!shouldInstallTarget(_0x1f58c8,_0xdb3616)){const _0x2f0df5=_0xdb3616[_0x3a0019(0x163)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0xdb3616[_0x3a0019(0x192)]+').':_0x3a0019(0x1b4)+_0xdb3616[_0x3a0019(0x192)]+').';return console[_0x3a0019(0x164)](_0x2f0df5),{'ok':repairCurrentBuiltinSkill(_0x3afc45['nonInteractive'])};}console['log'](_0x3a0019(0x1a5)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x1f58c8+_0x3a0019(0x177)+_0xdb3616[_0x3a0019(0x192)]);const _0x4d6add=installCliPackage(_0xdb3616[_0x3a0019(0x192)],_0x3afc45['nonInteractive']);if(!_0x4d6add['ok']){const _0x1de8b6=_0x3a0019(0x191)+(_0x4d6add[_0x3a0019(0x18e)]||_0x3a0019(0x17e));return console[_0x3a0019(0x18e)](_0x1de8b6),console[_0x3a0019(0x164)](_0x3a0019(0x173)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0xdb3616[_0x3a0019(0x192)]),{'ok':![]};}return console['log'](_0x3a0019(0x18a)+_0xdb3616['version']+'.'),console[_0x3a0019(0x164)](_0x3a0019(0x181)),{'ok':verifyUpdatedBuiltinSkill(_0xdb3616[_0x3a0019(0x192)])};}export const updateDefinition={'service':a83_0x589b9c(0x1b6),'command':a83_0x589b9c(0x1b9),'description':'从\x20npm\x20更新\x20'+CLI_BIN_NAME+a83_0x589b9c(0x1b1),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x1ac60b=a84_0x4cd6;(function(_0x52030f,_0x4fd01f){const _0x5128fc=a84_0x4cd6,_0x37d5e1=_0x52030f();while(!![]){try{const _0x39e291=parseInt(_0x5128fc(0x155))/0x1+parseInt(_0x5128fc(0x167))/0x2*(-parseInt(_0x5128fc(0x15d))/0x3)+-parseInt(_0x5128fc(0x166))/0x4+-parseInt(_0x5128fc(0x165))/0x5+parseInt(_0x5128fc(0x16f))/0x6*(-parseInt(_0x5128fc(0x152))/0x7)+-parseInt(_0x5128fc(0x16a))/0x8+parseInt(_0x5128fc(0x16d))/0x9*(parseInt(_0x5128fc(0x163))/0xa);if(_0x39e291===_0x4fd01f)break;else _0x37d5e1['push'](_0x37d5e1['shift']());}catch(_0x3d63a3){_0x37d5e1['push'](_0x37d5e1['shift']());}}}(a84_0x116f,0xe6f34));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';function a84_0x4cd6(_0x3f2386,_0x2a81d0){_0x3f2386=_0x3f2386-0x150;const _0x116fac=a84_0x116f();let _0x4cd671=_0x116fac[_0x3f2386];return _0x4cd671;}import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING='The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.',SUPPORTED_PROVIDERS=[a84_0x1ac60b(0x168)];function a84_0x116f(){const _0x158022=['user-account','POST','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','1614004gbbnsT','str','account-id','963212wjTCMA','validation','write','trim','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','toLowerCase','apiError','bind','463863WrxbDH','Pass\x20one\x20of:\x20','provider','--account-id\x20cannot\x20be\x20empty.','External\x20account\x20binding\x20was\x20not\x20confirmed.','将当前\x20AccessKey\x20所属的平台用户绑定到指定协同生态外部账号;已有同\x20provider\x20绑定可能被替换。','52622030tgwFSk','External\x20account\x20provider','7011310QePSMR','3479740VZuWtk','18ViuyIt','dingtalk','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','3702376JNhnlh','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','includes','9QMiPct','string','30ZTpvAv'];a84_0x116f=function(){return _0x158022;};return a84_0x116f();}function readBindingInput(_0x345486){const _0x2ecc2c=a84_0x1ac60b,_0x39588d=_0x345486[_0x2ecc2c(0x153)]('provider')[_0x2ecc2c(0x158)]()[_0x2ecc2c(0x15a)]();if(!SUPPORTED_PROVIDERS[_0x2ecc2c(0x16c)](_0x39588d))throw CliErrors[_0x2ecc2c(0x156)]('Unsupported\x20provider:\x20'+(_0x39588d||'(empty)')+'.',_0x2ecc2c(0x15e)+SUPPORTED_PROVIDERS['join'](',\x20')+'.');const _0x1f2e9c=_0x345486['str'](_0x2ecc2c(0x154))['trim']();if(!_0x1f2e9c)throw CliErrors[_0x2ecc2c(0x156)](_0x2ecc2c(0x160),_0x2ecc2c(0x159));return{'provider':_0x39588d,'accountId':_0x1f2e9c};}function buildBindingData(_0x11e0ac,_0x60095,_0x40ef20){const _0x4f703b=a84_0x1ac60b;return{'operation':_0x4f703b(0x15c),'selector':{'provider':_0x11e0ac,'accountId':_0x60095},'before':null,'after':{'provider':_0x11e0ac,'accountId':_0x60095,'bound':!![]},'dryRun':_0x40ef20,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a84_0x1ac60b(0x170),'command':a84_0x1ac60b(0x15c),'description':a84_0x1ac60b(0x16b),'risk':a84_0x1ac60b(0x157),'confirmationDescription':a84_0x1ac60b(0x162),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a84_0x1ac60b(0x15f),'type':a84_0x1ac60b(0x16e),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a84_0x1ac60b(0x164)},{'name':'account-id','type':a84_0x1ac60b(0x16e),'required':!![],'description':'External\x20account\x20ID\x20for\x20the\x20selected\x20provider'}],async 'validate'(_0x7ff6ce){readBindingInput(_0x7ff6ce);},async 'dryRun'(_0x5f034f){const _0x276256=a84_0x1ac60b,{provider:_0x3f6094,accountId:_0x26eae1}=readBindingInput(_0x5f034f);return{...buildBindingData(_0x3f6094,_0x26eae1,!![]),'method':_0x276256(0x150),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x3f6094,'accountId':_0x26eae1}};},async 'execute'(_0x4cc542){const _0x551714=a84_0x1ac60b,{provider:_0x563837,accountId:_0x551845}=readBindingInput(_0x4cc542),_0x440996=await bindExternalUserAccount(_0x563837,_0x551845);if(_0x440996!==!![])throw CliErrors[_0x551714(0x15b)](_0x551714(0x161),_0x551714(0x169));return{'ok':!![],'data':buildBindingData(_0x563837,_0x551845,![]),'message':_0x551714(0x151)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1029fc,_0x2aa3b1){const _0x1fcbfc=a85_0x29ae,_0x593b98=_0x1029fc();while(!![]){try{const _0x517d59=-parseInt(_0x1fcbfc(0x81))/0x1*(-parseInt(_0x1fcbfc(0x7f))/0x2)+parseInt(_0x1fcbfc(0x7a))/0x3+parseInt(_0x1fcbfc(0x78))/0x4+parseInt(_0x1fcbfc(0x7c))/0x5*(parseInt(_0x1fcbfc(0x80))/0x6)+parseInt(_0x1fcbfc(0x79))/0x7*(parseInt(_0x1fcbfc(0x7d))/0x8)+parseInt(_0x1fcbfc(0x7e))/0x9+-parseInt(_0x1fcbfc(0x7b))/0xa;if(_0x517d59===_0x2aa3b1)break;else _0x593b98['push'](_0x593b98['shift']());}catch(_0x4d2a2b){_0x593b98['push'](_0x593b98['shift']());}}}(a85_0x10b0,0x2efca));function a85_0x29ae(_0x741565,_0x3debc2){_0x741565=_0x741565-0x78;const _0x10b0a5=a85_0x10b0();let _0x29ae35=_0x10b0a5[_0x741565];return _0x29ae35;}import{bindUserAccount}from'../../commands/user-account/bind.js';export const userAccountDefinitions=[bindUserAccount];function a85_0x10b0(){const _0x33b0e6=['345kXtgVJ','800288ADjMOb','93485GTvKiJ','75399UUuuPB','10617950WGuqvQ','1383185MBSqtJ','144RxaVeK','3443814QgkxgD','750xRrnkm','6wnXJAp'];a85_0x10b0=function(){return _0x33b0e6;};return a85_0x10b0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x5297b7=a86_0x3d2c;(function(_0x1ce2c5,_0x3a5b79){const _0x219386=a86_0x3d2c,_0x137df6=_0x1ce2c5();while(!![]){try{const _0x474e64=-parseInt(_0x219386(0xb4))/0x1+-parseInt(_0x219386(0x91))/0x2+-parseInt(_0x219386(0xa9))/0x3+-parseInt(_0x219386(0xa8))/0x4*(parseInt(_0x219386(0x96))/0x5)+parseInt(_0x219386(0xb1))/0x6+parseInt(_0x219386(0x9c))/0x7+parseInt(_0x219386(0x9a))/0x8*(parseInt(_0x219386(0xb3))/0x9);if(_0x474e64===_0x3a5b79)break;else _0x137df6['push'](_0x137df6['shift']());}catch(_0xd9c60){_0x137df6['push'](_0x137df6['shift']());}}}(a86_0x5c0b,0x3c2e9));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a86_0x3d2c(_0x5fade,_0x59107f){_0x5fade=_0x5fade-0x82;const _0x5c0b24=a86_0x5c0b();let _0x3d2cfe=_0x5c0b24[_0x5fade];return _0x3d2cfe;}import{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a86_0x5c0b(){const _0x47b330=['use','map','2743002zsiWUS','includes','4382793LMDlSP','354205vEubCI','trim','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','../../commands/app/remote-source.js','Available\x20apps:\x20','apps','items','\x0aDefault\x20app:\x20','validation','Workspace\x20configured.\x0aConfig\x20file:\x20','str','authRequired','\x0aAccessKey:\x20not\x20written','from','init','command','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','将在尚未绑定应用的当前工作目录写入\x20Lovrabet\x20项目配置,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','env','string','Target\x20environment','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','\x20workspace\x20','Use\x20`','560394uhoJzO','\x20--appcode\x20<code>\x20[--env\x20daily]','object','\x22.\x20Allowed:\x20','App\x20\x22','115zksDok','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','App\x20code\x20to\x20bind\x20directly','Run\x20`','16BXODYD','shouldWriteEnv','279412yqYhgO','workspace','Invalid\x20env\x20\x22','\x22\x20not\x20found.','../../core/api-client.js','accessKey','\x0aEnv:\x20','appcode','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','envName','appName','join','24868MwtfOi','1341417StidKJ','appCode','write','defaultApp','Conflicting\x20workspace\x20app\x20selectors.','length'];a86_0x5c0b=function(){return _0x47b330;};return a86_0x5c0b();}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':'app','type':'string','description':'App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default'},{'name':a86_0x5297b7(0xa3),'type':'string','description':a86_0x5297b7(0x98)},{'name':a86_0x5297b7(0x8b),'type':a86_0x5297b7(0x8c),'description':a86_0x5297b7(0x8d),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x7e9b23,_0xaa90b6){const _0x57179e=a86_0x5297b7,_0x34c2d9=_0x7e9b23[_0x57179e(0x83)]('app')[_0x57179e(0xb5)](),_0x50e1e9=_0x7e9b23[_0x57179e(0x83)]('appcode')[_0x57179e(0xb5)](),_0x41b406=_0x7e9b23['str'](_0x57179e(0x8b))[_0x57179e(0xb5)](),_0x54babe=resolveWorkspaceEnv(_0x41b406||_0x7e9b23[_0x57179e(0xa5)]||DEFAULT_CONFIG_VALUES['env']);if(!_0x34c2d9&&!_0x50e1e9)throw CliErrors[_0x57179e(0xbc)]('Missing\x20workspace\x20app\x20selector.','Usage:\x20'+CLI_BIN_NAME+_0x57179e(0x8f)+_0xaa90b6+_0x57179e(0x89)+CLI_BIN_NAME+_0x57179e(0x8f)+_0xaa90b6+_0x57179e(0x92));if(_0x34c2d9&&_0x50e1e9)throw CliErrors[_0x57179e(0xbc)](_0x57179e(0xad),_0x57179e(0x8e));const _0x358e14=resolveWriteConfigPath('project'),_0x5d5f3f=readConfigFile(_0x358e14);assertWorkspaceCommandState(_0xaa90b6,_0x5d5f3f);const _0x1a0511=_0x50e1e9||await resolveRemoteAppCode({'command':_0xaa90b6,'appName':_0x34c2d9,'env':_0x54babe,'accessKey':_0x7e9b23[_0x57179e(0xa1)]});return writeWorkspaceConfig({'command':_0xaa90b6,'appName':_0x34c2d9,'appcode':_0x1a0511,'env':_0x54babe,'shouldWriteEnv':!!_0x41b406,'accessKey':_0x7e9b23[_0x57179e(0xa1)]},_0x358e14,_0x5d5f3f),{'ok':!![],'data':{'configPath':_0x358e14,'app':_0x34c2d9||null,'appcode':_0x1a0511,'env':_0x41b406?_0x54babe:null,'accessKeyWritten':![],'command':'workspace\x20'+_0xaa90b6},'message':buildWorkspaceMessage(_0x358e14,_0x34c2d9,_0x1a0511,_0x41b406?_0x54babe:undefined)};}async function resolveRemoteAppCode(_0x50bf53){const _0x1a6977=a86_0x5297b7;if(!_0x50bf53[_0x1a6977(0xa1)])throw CliErrors[_0x1a6977(0x84)]('Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20'+CLI_BIN_NAME+'\x20workspace\x20'+_0x50bf53[_0x1a6977(0x88)]+'.');const {setActiveAK:_0xe5ac3a}=await import(_0x1a6977(0xa0)),{getRemoteAppList:_0xaef398}=await import(_0x1a6977(0xb7));_0xe5ac3a(_0x50bf53[_0x1a6977(0xa1)]);const _0x5a6679=await _0xaef398({'env':_0x50bf53[_0x1a6977(0x8b)],'accessKey':_0x50bf53[_0x1a6977(0xa1)],'noCache':![]}),_0x4317d0=findAppByName(_0x5a6679[_0x1a6977(0xba)],_0x50bf53['appName']);if(_0x4317d0&&!isRuntimeAccessibleApp(_0x4317d0))throw runtimeInaccessibleAppError(_0x4317d0,'\x22'+_0x50bf53[_0x1a6977(0xa6)]+'\x22');const _0x45bf6d=_0x4317d0?.[_0x1a6977(0xaa)]?.['trim']();if(_0x45bf6d)return _0x45bf6d;const _0x462e88=_0x5a6679['items'][_0x1a6977(0xb0)](_0x4aa929=>_0x4aa929[_0x1a6977(0xa6)])['filter'](Boolean),_0x1d4dda=_0x462e88[_0x1a6977(0xae)]?_0x1a6977(0xb8)+Array[_0x1a6977(0x86)](new Set(_0x462e88))[_0x1a6977(0xa7)](',\x20')+'.':_0x1a6977(0x99)+CLI_BIN_NAME+_0x1a6977(0xb6);throw CliErrors['validation'](_0x1a6977(0x95)+_0x50bf53[_0x1a6977(0xa6)]+_0x1a6977(0x9f),_0x1d4dda);}function writeWorkspaceConfig(_0x57f0d6,_0x37eea1,_0x254ee3){const _0x39e1f8=a86_0x5297b7;_0x57f0d6[_0x39e1f8(0x9b)]&&(_0x254ee3['env']=_0x57f0d6[_0x39e1f8(0x8b)]);if(_0x57f0d6[_0x39e1f8(0xa6)]){const _0x5a8b55=isRecord(_0x254ee3['apps'])?{..._0x254ee3[_0x39e1f8(0xb9)]}:{},_0x10bed6=isRecord(_0x5a8b55[_0x57f0d6[_0x39e1f8(0xa6)]])?_0x5a8b55[_0x57f0d6[_0x39e1f8(0xa6)]]:{};return _0x5a8b55[_0x57f0d6['appName']]={..._0x10bed6,'appcode':_0x57f0d6[_0x39e1f8(0xa3)]},_0x254ee3[_0x39e1f8(0xb9)]=_0x5a8b55,_0x254ee3[_0x39e1f8(0xac)]=_0x57f0d6['appName'],delete _0x254ee3[_0x39e1f8(0xa3)],delete _0x254ee3['app'],writeAndReturn(_0x37eea1,_0x254ee3);}return _0x254ee3['appcode']=_0x57f0d6[_0x39e1f8(0xa3)],delete _0x254ee3[_0x39e1f8(0xac)],delete _0x254ee3['app'],writeAndReturn(_0x37eea1,_0x254ee3);}function writeAndReturn(_0x224342,_0xbc98d3){return writeConfigFile(_0x224342,_0xbc98d3),_0x224342;}function resolveWorkspaceEnv(_0x3f24d8){const _0x39791f=a86_0x5297b7;if(RUNTIME_ENV_VALUES[_0x39791f(0xb2)](_0x3f24d8))return _0x3f24d8;throw CliErrors[_0x39791f(0xbc)](_0x39791f(0x9e)+_0x3f24d8+_0x39791f(0x94)+RUNTIME_ENV_VALUES[_0x39791f(0xa7)](',\x20'));}function buildWorkspaceMessage(_0x3e5d40,_0x2c94d0,_0x58f05b,_0x57519e){const _0x2a4b43=a86_0x5297b7,_0x552e1c=_0x2c94d0?_0x2c94d0+'\x20('+_0x58f05b+')':_0x58f05b,_0x323d8e=_0x57519e?_0x2a4b43(0xa2)+_0x57519e:'';return _0x2a4b43(0x82)+_0x3e5d40+_0x2a4b43(0xbb)+_0x552e1c+_0x323d8e+_0x2a4b43(0x85);}function isRecord(_0x4c8caa){const _0x2bce7d=a86_0x5297b7;return typeof _0x4c8caa===_0x2bce7d(0x93)&&_0x4c8caa!==null&&!Array['isArray'](_0x4c8caa);}function hasWorkspaceAppBinding(_0x2541ac){const _0x55b89b=a86_0x5297b7;if(typeof _0x2541ac[_0x55b89b(0xa3)]===_0x55b89b(0x8c)&&_0x2541ac['appcode'][_0x55b89b(0xb5)]()[_0x55b89b(0xae)]>0x0)return!![];if(typeof _0x2541ac['defaultApp']!=='string'||!_0x2541ac[_0x55b89b(0xac)][_0x55b89b(0xb5)]())return![];if(!isRecord(_0x2541ac[_0x55b89b(0xb9)]))return![];const _0x33199c=_0x2541ac[_0x55b89b(0xb9)][_0x2541ac[_0x55b89b(0xac)][_0x55b89b(0xb5)]()];return isRecord(_0x33199c)&&typeof _0x33199c[_0x55b89b(0xa3)]===_0x55b89b(0x8c)&&_0x33199c[_0x55b89b(0xa3)][_0x55b89b(0xb5)]()[_0x55b89b(0xae)]>0x0;}function assertWorkspaceCommandState(_0x4ef0aa,_0x4eedc2){const _0x5eb9ad=a86_0x5297b7,_0x193712=hasWorkspaceAppBinding(_0x4eedc2);if(_0x4ef0aa===_0x5eb9ad(0x87)&&_0x193712)throw CliErrors[_0x5eb9ad(0xbc)]('Workspace\x20app\x20context\x20is\x20already\x20initialized.',_0x5eb9ad(0x90)+CLI_BIN_NAME+_0x5eb9ad(0x97)+CLI_BIN_NAME+'\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.');if(_0x4ef0aa==='use'&&!_0x193712)throw CliErrors[_0x5eb9ad(0xbc)]('Workspace\x20app\x20context\x20is\x20not\x20initialized.',_0x5eb9ad(0x99)+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0x5eb9ad(0xa4));}function makeWorkspaceCommand(_0x3072f3){const _0xc768b7=a86_0x5297b7;return{'service':_0xc768b7(0x9d),'command':_0x3072f3,'description':_0x3072f3==='init'?'为尚未绑定应用的当前工作目录初始化应用上下文':'修改当前工作目录已有绑定的应用上下文','risk':_0xc768b7(0xab),'confirmationDescription':_0x3072f3===_0xc768b7(0x87)?_0xc768b7(0x8a):'将更新当前工作目录已有的应用绑定,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x44514c){return executeWorkspaceUse(_0x44514c,_0x3072f3);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a86_0x5297b7(0x87)),makeWorkspaceCommand(a86_0x5297b7(0xaf))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x45b5a0=a87_0x8967;(function(_0x13b710,_0x239b2d){const _0x43966a=a87_0x8967,_0x513ee7=_0x13b710();while(!![]){try{const _0x8021d1=-parseInt(_0x43966a(0x1a1))/0x1+parseInt(_0x43966a(0x1a0))/0x2+parseInt(_0x43966a(0x1b4))/0x3*(-parseInt(_0x43966a(0x1a9))/0x4)+parseInt(_0x43966a(0x1b3))/0x5*(-parseInt(_0x43966a(0x1a2))/0x6)+-parseInt(_0x43966a(0x1a4))/0x7+-parseInt(_0x43966a(0x19c))/0x8*(parseInt(_0x43966a(0x19d))/0x9)+-parseInt(_0x43966a(0x1b0))/0xa*(-parseInt(_0x43966a(0x1a3))/0xb);if(_0x8021d1===_0x239b2d)break;else _0x513ee7['push'](_0x513ee7['shift']());}catch(_0x4eda04){_0x513ee7['push'](_0x513ee7['shift']());}}}(a87_0x265c,0x874e9));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_0x45b5a0(0x1ac),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['env'],'importable':!![]},'format':{'description':a87_0x45b5a0(0x19b),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x45b5a0(0x19f)],'importable':!![]},'pageSize':{'description':a87_0x45b5a0(0x1af),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a87_0x45b5a0(0x1b1),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':'Override\x20SkillHub\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a87_0x45b5a0(0x1b5),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x45b5a0(0x1a8)],'importable':!![]},'locale':{'description':a87_0x45b5a0(0x1ab),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x45b5a0(0x1a5)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a87_0x45b5a0(0x1aa)](CONFIG_FIELD_SCHEMAS)[a87_0x45b5a0(0x199)](([,_0x4cf1f9])=>_0x4cf1f9['cliSettableTopLevel'])[a87_0x45b5a0(0x19e)](([_0x1e1264])=>_0x1e1264));function a87_0x8967(_0x4cc67c,_0x59e666){_0x4cc67c=_0x4cc67c-0x198;const _0x265cde=a87_0x265c();let _0x8967d3=_0x265cde[_0x4cc67c];return _0x8967d3;}export const CONFIG_ENUM_VALUES=Object[a87_0x45b5a0(0x198)](Object[a87_0x45b5a0(0x1aa)](CONFIG_FIELD_SCHEMAS)[a87_0x45b5a0(0x199)](([,_0x43bde5])=>_0x43bde5[a87_0x45b5a0(0x1a6)])['map'](([_0x202abf,_0x561f48])=>[_0x202abf,[..._0x561f48[a87_0x45b5a0(0x1a6)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a87_0x45b5a0(0x1aa)](CONFIG_FIELD_SCHEMAS)[a87_0x45b5a0(0x199)](([,_0xf99da3])=>_0xf99da3[a87_0x45b5a0(0x1b2)])['map'](([_0x11afb3])=>_0x11afb3);export function getConfigFieldSchema(_0x24f4b5){return CONFIG_FIELD_SCHEMAS[_0x24f4b5];}export function getConfigEnumValues(_0x2ee0fd){const _0x31080b=a87_0x45b5a0;return getConfigFieldSchema(_0x2ee0fd)?.[_0x31080b(0x1a6)];}export function getConfigDefaultValue(_0xe5c0a3){return getConfigFieldSchema(_0xe5c0a3)?.['defaultValue'];}export function isTopLevelConfigKey(_0xc01aeb){const _0x39405b=a87_0x45b5a0;return TOP_LEVEL_CONFIG_KEYS[_0x39405b(0x1ae)](_0xc01aeb);}export function isLegacyCompatConfigKey(_0x5274c2){const _0x2780b8=a87_0x45b5a0;return getConfigFieldSchema(_0x5274c2)?.[_0x2780b8(0x1ad)]===!![];}function a87_0x265c(){const _0x101aa1=['1692859JCjzwN','locale','enumValues','join','riskLevel','36sHDYLF','entries','Locale','Target\x20environment','legacyCompatOnly','has','Default\x20page\x20size','1663870reEJkC','Override\x20API\x20domain','importable','15130qOqURr','140109RkvDLY','Risk\x20level','fromEntries','filter',';\x20local\x20alias:\x20apps.<alias>.appcode','Default\x20output\x20format','440312RGNkoU','18YTsglP','map','format','999038AkxIYN','29074yCRLcq','942dtemvg','88YfsXaL'];a87_0x265c=function(){return _0x101aa1;};return a87_0x265c();}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x288918){const _0x5115b9=a87_0x45b5a0;return[..._0x288918][_0x5115b9(0x1a7)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x5a7e41=a87_0x45b5a0;return'Config\x20key.\x20Top-level:\x20'+getTopLevelConfigKeySummary()+_0x5a7e41(0x19a);}export function buildAppProfileListFields(_0x241dce){return{'env':_0x241dce,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x49074d=a88_0x11b8;(function(_0x420632,_0x261ca8){const _0x514d51=a88_0x11b8,_0x578e53=_0x420632();while(!![]){try{const _0x185e61=-parseInt(_0x514d51(0x1b6))/0x1*(-parseInt(_0x514d51(0x1b1))/0x2)+-parseInt(_0x514d51(0x1b4))/0x3+-parseInt(_0x514d51(0x1b7))/0x4*(-parseInt(_0x514d51(0x1be))/0x5)+-parseInt(_0x514d51(0x1b3))/0x6*(parseInt(_0x514d51(0x1b9))/0x7)+-parseInt(_0x514d51(0x1bd))/0x8*(-parseInt(_0x514d51(0x1bb))/0x9)+parseInt(_0x514d51(0x1b5))/0xa+-parseInt(_0x514d51(0x1ba))/0xb*(-parseInt(_0x514d51(0x1b8))/0xc);if(_0x185e61===_0x261ca8)break;else _0x578e53['push'](_0x578e53['shift']());}catch(_0x224f94){_0x578e53['push'](_0x578e53['shift']());}}}(a88_0x1499,0x404de));export const APP_PUBLISH_STATUS={'Published':a88_0x49074d(0x1b2),'Unpublished':'UNPUBLISH'};function a88_0x11b8(_0x4ed85e,_0x513231){_0x4ed85e=_0x4ed85e-0x1b1;const _0x1499f8=a88_0x1499();let _0x11b84e=_0x1499f8[_0x4ed85e];return _0x11b84e;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a88_0x49074d(0x1bc)];function a88_0x1499(){const _0x25ae22=['105934ZRPgoL','PUBLISHED','239790mWIlKJ','1474350XWkYxK','1119180aGBlxG','1jsXCuN','18928YeLwPH','1281636QLJZiU','7fYssvd','33GgxgTZ','9FEYdWq','Published','166872kzQKGm','305gCwmyB'];a88_0x1499=function(){return _0x25ae22;};return a88_0x1499();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a89_0x889dda=a89_0x3834;function a89_0x3834(_0x7484c0,_0x106a35){_0x7484c0=_0x7484c0-0xf5;const _0x3617d8=a89_0x3617();let _0x383438=_0x3617d8[_0x7484c0];return _0x383438;}(function(_0x239c06,_0x302da2){const _0x2ebe72=a89_0x3834,_0x2c2ad3=_0x239c06();while(!![]){try{const _0x4d3afe=-parseInt(_0x2ebe72(0xf9))/0x1*(-parseInt(_0x2ebe72(0xfe))/0x2)+-parseInt(_0x2ebe72(0xf8))/0x3*(-parseInt(_0x2ebe72(0xfd))/0x4)+parseInt(_0x2ebe72(0xf6))/0x5*(-parseInt(_0x2ebe72(0xfc))/0x6)+parseInt(_0x2ebe72(0xf7))/0x7+-parseInt(_0x2ebe72(0xff))/0x8+parseInt(_0x2ebe72(0xfb))/0x9+-parseInt(_0x2ebe72(0xfa))/0xa;if(_0x4d3afe===_0x302da2)break;else _0x2c2ad3['push'](_0x2c2ad3['shift']());}catch(_0x31aad2){_0x2c2ad3['push'](_0x2c2ad3['shift']());}}}(a89_0x3617,0x467e6));function a89_0x3617(){const _0x243865=['1349208zigNEc','18JCJGmD','3zXRRbf','1181710StEvdl','4086756lmVHCY','32628FAVlwp','24444jbMpFG','297606UevCAd','4435296esYrff','client-ak','155fQAypY'];a89_0x3617=function(){return _0x243865;};return a89_0x3617();}export const AUTH_MODE={'ClientAk':a89_0x889dda(0xf5)};export function isAuthMode(_0x1cb18f){return _0x1cb18f===AUTH_MODE['ClientAk'];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x4d6eb5=a90_0x10e5;(function(_0x3afb3e,_0x4a9ca6){const _0x50900f=a90_0x10e5,_0x521a77=_0x3afb3e();while(!![]){try{const _0x5081b6=-parseInt(_0x50900f(0x1f4))/0x1+parseInt(_0x50900f(0x1ec))/0x2*(-parseInt(_0x50900f(0x1e5))/0x3)+-parseInt(_0x50900f(0x20e))/0x4+parseInt(_0x50900f(0x200))/0x5*(-parseInt(_0x50900f(0x1df))/0x6)+-parseInt(_0x50900f(0x1fd))/0x7*(-parseInt(_0x50900f(0x1e2))/0x8)+-parseInt(_0x50900f(0x1fe))/0x9*(parseInt(_0x50900f(0x1f2))/0xa)+parseInt(_0x50900f(0x20b))/0xb;if(_0x5081b6===_0x4a9ca6)break;else _0x521a77['push'](_0x521a77['shift']());}catch(_0x4de6c2){_0x521a77['push'](_0x521a77['shift']());}}}(a90_0x3fe6,0x9643d));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a90_0x4d6eb5(0x1f9)];function a90_0x10e5(_0x2fdab7,_0x3a27a3){_0x2fdab7=_0x2fdab7-0x1df;const _0x3fe62d=a90_0x3fe6();let _0x10e542=_0x3fe62d[_0x2fdab7];return _0x10e542;}export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a90_0x4d6eb5(0x208),'meowKey':a90_0x4d6eb5(0x208),'type':a90_0x4d6eb5(0x1e1),'description':a90_0x4d6eb5(0x205),'hint':a90_0x4d6eb5(0x1f8)},{'name':a90_0x4d6eb5(0x1fa),'meowKey':a90_0x4d6eb5(0x1fa),'type':'string','description':a90_0x4d6eb5(0x1f7),'hint':a90_0x4d6eb5(0x1eb)},{'name':a90_0x4d6eb5(0x1e3),'meowKey':a90_0x4d6eb5(0x1e3),'type':a90_0x4d6eb5(0x1e1),'description':'Environment','hint':a90_0x4d6eb5(0x1ee)},{'name':'format','meowKey':a90_0x4d6eb5(0x1f1),'type':a90_0x4d6eb5(0x1e1),'description':'Output\x20format','hint':a90_0x4d6eb5(0x1e8)},{'name':'jq','meowKey':'jq','type':a90_0x4d6eb5(0x1e1),'description':a90_0x4d6eb5(0x1ff),'hint':'<expr>'},{'name':a90_0x4d6eb5(0x202),'meowKey':a90_0x4d6eb5(0x1e0),'type':a90_0x4d6eb5(0x1ed),'description':a90_0x4d6eb5(0x1fc)},{'name':'yes','meowKey':a90_0x4d6eb5(0x209),'type':a90_0x4d6eb5(0x1ed),'description':a90_0x4d6eb5(0x1f3)},{'name':a90_0x4d6eb5(0x206),'meowKey':a90_0x4d6eb5(0x1e7),'type':a90_0x4d6eb5(0x1ed),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a90_0x4d6eb5(0x204),'meowKey':'global','type':'boolean','description':a90_0x4d6eb5(0x1fb)},{'name':'ci','meowKey':'ci','type':'boolean','description':a90_0x4d6eb5(0x20d),'hidden':!![]},{'name':a90_0x4d6eb5(0x1f6),'meowKey':'help','type':'boolean','description':'Show\x20help'},{'name':'id','meowKey':'id','type':a90_0x4d6eb5(0x1e1),'description':a90_0x4d6eb5(0x1e9),'hidden':!![]},{'name':'name','meowKey':a90_0x4d6eb5(0x1f0),'type':a90_0x4d6eb5(0x1e1),'description':a90_0x4d6eb5(0x1e4),'hidden':!![]},{'name':a90_0x4d6eb5(0x1ea),'meowKey':a90_0x4d6eb5(0x1ea),'type':a90_0x4d6eb5(0x1e1),'description':a90_0x4d6eb5(0x203),'hidden':!![]},{'name':'params','meowKey':a90_0x4d6eb5(0x1ef),'type':a90_0x4d6eb5(0x1e1),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a90_0x4d6eb5(0x1e6),'meowKey':'verbose','type':a90_0x4d6eb5(0x1ed),'description':'Verbose\x20output','hidden':!![]},{'name':a90_0x4d6eb5(0x201),'meowKey':a90_0x4d6eb5(0x201),'type':a90_0x4d6eb5(0x1ed),'description':a90_0x4d6eb5(0x207),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a90_0x4d6eb5(0x1fa),'env','format','jq','dry-run',a90_0x4d6eb5(0x209),a90_0x4d6eb5(0x206),'ci']);function a90_0x3fe6(){const _0x28ea8f=['<code>','cliBinName','app','Use\x20global\x20config\x20scope','Preview\x20operation\x20without\x20executing','7JOKiMp','4923RppNXp','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','5xSRCZg','clear','dry-run','SQL\x20query\x20code','global','Override\x20appcode','non-interactive','Clear\x20output','appcode','yes','map','41683664tvfIjx','type','Alias\x20for\x20--non-interactive','4333224DBDkTl','fromEntries','1866108VTiUbL','dryRun','string','276232QpPspP','env','Name\x20filter','527754oLzJzm','verbose','nonInteractive','json\x20|\x20pretty\x20|\x20compress','Record\x20ID','sqlcode','<name>','12Xozamd','boolean','production\x20|\x20development\x20|\x20daily','params','name','format','8020tAuDXy','Skip\x20confirmation\x20for\x20high-risk\x20writes','319942KwSvZi','meowKey','help','Select\x20app\x20profile\x20by\x20name'];a90_0x3fe6=function(){return _0x28ea8f;};return a90_0x3fe6();}export function buildMeowFlags(){const _0x20a0ee=a90_0x4d6eb5;return Object[_0x20a0ee(0x20f)](GLOBAL_FLAGS[_0x20a0ee(0x20a)](_0x321267=>[_0x321267[_0x20a0ee(0x1f5)],{'type':_0x321267[_0x20a0ee(0x20c)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x4e61(){const _0x5d1d45=['10ZXsHwm','en-US','8466XMFKWd','16zNTQtL','257226oonlLm','4752396GfCEqM','write','133746VvBiLS','4gRpiNH','15179186QIOpFO','3129QImLCP','compress','production','4171440GDUDQz','84495ycLvfX'];a91_0x4e61=function(){return _0x5d1d45;};return a91_0x4e61();}function a91_0x2601(_0x129ac3,_0x4882a6){_0x129ac3=_0x129ac3-0x19e;const _0x4e61e2=a91_0x4e61();let _0x2601ea=_0x4e61e2[_0x129ac3];return _0x2601ea;}const a91_0x3ab703=a91_0x2601;(function(_0x1a9c65,_0x1c3a7a){const _0x2e5fa0=a91_0x2601,_0x1877a8=_0x1a9c65();while(!![]){try{const _0x4c9663=parseInt(_0x2e5fa0(0x1a5))/0x1*(-parseInt(_0x2e5fa0(0x1a6))/0x2)+parseInt(_0x2e5fa0(0x1a2))/0x3+parseInt(_0x2e5fa0(0x1a1))/0x4*(-parseInt(_0x2e5fa0(0x1ac))/0x5)+parseInt(_0x2e5fa0(0x1a0))/0x6*(-parseInt(_0x2e5fa0(0x1a8))/0x7)+parseInt(_0x2e5fa0(0x1ab))/0x8+parseInt(_0x2e5fa0(0x1a3))/0x9*(-parseInt(_0x2e5fa0(0x19e))/0xa)+parseInt(_0x2e5fa0(0x1a7))/0xb;if(_0x4c9663===_0x1c3a7a)break;else _0x1877a8['push'](_0x1877a8['shift']());}catch(_0x191414){_0x1877a8['push'](_0x1877a8['shift']());}}}(a91_0x4e61,0x786c1));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':a91_0x3ab703(0x1aa),'format':a91_0x3ab703(0x1a9),'locale':a91_0x3ab703(0x19f),'riskLevel':a91_0x3ab703(0x1a4)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x36e47d=a92_0x161c;(function(_0x15608e,_0x351184){const _0x13d550=a92_0x161c,_0x3e4bfd=_0x15608e();while(!![]){try{const _0x1d3343=parseInt(_0x13d550(0x8d))/0x1+-parseInt(_0x13d550(0x92))/0x2+parseInt(_0x13d550(0x8b))/0x3*(parseInt(_0x13d550(0x8c))/0x4)+-parseInt(_0x13d550(0x8e))/0x5+-parseInt(_0x13d550(0x8a))/0x6*(parseInt(_0x13d550(0x8f))/0x7)+-parseInt(_0x13d550(0x91))/0x8+parseInt(_0x13d550(0x90))/0x9;if(_0x1d3343===_0x351184)break;else _0x3e4bfd['push'](_0x3e4bfd['shift']());}catch(_0x1060de){_0x3e4bfd['push'](_0x3e4bfd['shift']());}}}(a92_0x4152,0x36901));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];function a92_0x4152(){const _0x207cb2=['2564ozUYQx','42588BkUsXN','1279865uupUmA','782803sBzuQR','10091286aQeyWs','636368NDRPrB','863630OQnRSf','npmRegistryBaseUrl','12RiisGM','237aqaYCy'];a92_0x4152=function(){return _0x207cb2;};return a92_0x4152();}export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];function a92_0x161c(_0x1b500c,_0x45d3a7){_0x1b500c=_0x1b500c-0x8a;const _0x415273=a92_0x4152();let _0x161c00=_0x415273[_0x1b500c];return _0x161c00;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a92_0x36e47d(0x93)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x31411a=a93_0x5b1a;function a93_0x5b1a(_0x3b549f,_0xc05d58){_0x3b549f=_0x3b549f-0x1d1;const _0x3510e9=a93_0x3510();let _0x5b1ae4=_0x3510e9[_0x3b549f];return _0x5b1ae4;}(function(_0xd6d140,_0xde78a8){const _0xe4aa48=a93_0x5b1a,_0x320942=_0xd6d140();while(!![]){try{const _0x5a6b8e=parseInt(_0xe4aa48(0x1e6))/0x1*(parseInt(_0xe4aa48(0x1dd))/0x2)+parseInt(_0xe4aa48(0x1e4))/0x3*(-parseInt(_0xe4aa48(0x1d6))/0x4)+parseInt(_0xe4aa48(0x1d8))/0x5*(-parseInt(_0xe4aa48(0x1d5))/0x6)+-parseInt(_0xe4aa48(0x1d9))/0x7*(-parseInt(_0xe4aa48(0x1e0))/0x8)+-parseInt(_0xe4aa48(0x1d3))/0x9+-parseInt(_0xe4aa48(0x1e3))/0xa+-parseInt(_0xe4aa48(0x1df))/0xb*(-parseInt(_0xe4aa48(0x1d4))/0xc);if(_0x5a6b8e===_0xde78a8)break;else _0x320942['push'](_0x320942['shift']());}catch(_0x3d8564){_0x320942['push'](_0x320942['shift']());}}}(a93_0x3510,0x19456));import{getEnv,isProduction}from'../constant/env.js';function a93_0x3510(){const _0x14509c=['runtime','25IOuPCU','924ocdigt','domains','userDomain','runtimeDomain','61682PyLknp','skillHubDomain','66zluQDL','5856SXnZfv','skillhub','nonProduction','1032790MIDxiO','54KsRtMp','user','4sGcBCc','api','production','753444sAdaSZ','374568diqcRA','18318BaTfdz','22556mvARUN'];a93_0x3510=function(){return _0x14509c;};return a93_0x3510();}import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x5697f5){const _0x176255=a93_0x5b1a;customApiDomain=_0x5697f5?.['apiDomain'],customUserDomain=_0x5697f5?.[_0x176255(0x1db)],customRuntimeDomain=_0x5697f5?.[_0x176255(0x1dc)],customSkillHubDomain=_0x5697f5?.[_0x176255(0x1de)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a93_0x31411a(0x1d2)][a93_0x31411a(0x1e5)]:PRODUCT_CONFIG[a93_0x31411a(0x1da)][a93_0x31411a(0x1e2)][a93_0x31411a(0x1e5)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a93_0x31411a(0x1d2)][a93_0x31411a(0x1d1)]:PRODUCT_CONFIG[a93_0x31411a(0x1da)][a93_0x31411a(0x1e2)][a93_0x31411a(0x1d1)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x31411a(0x1da)]['production'][a93_0x31411a(0x1d7)]:PRODUCT_CONFIG[a93_0x31411a(0x1da)][a93_0x31411a(0x1e2)][a93_0x31411a(0x1d7)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x31411a(0x1da)]['production']['skillhub']:PRODUCT_CONFIG['domains'][a93_0x31411a(0x1e2)][a93_0x31411a(0x1e1)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a94_0x3e36(){const _0x261ee7=['2400937XAIiIZ','44657mTXwVG','112lspcCx','online','58068tmGeTo','development','ENV','30xHovyv','241345bKIAuu','dev','2037492YuVuKX','332404QXLiEm','production','daily','90WQKJxT','21dAfVZY','1065933PWFtWP'];a94_0x3e36=function(){return _0x261ee7;};return a94_0x3e36();}const a94_0x520116=a94_0x4def;(function(_0x56163a,_0x53c996){const _0x3332d4=a94_0x4def,_0x2c54ce=_0x56163a();while(!![]){try{const _0x58ac6b=-parseInt(_0x3332d4(0x17b))/0x1*(-parseInt(_0x3332d4(0x170))/0x2)+-parseInt(_0x3332d4(0x178))/0x3*(-parseInt(_0x3332d4(0x174))/0x4)+parseInt(_0x3332d4(0x171))/0x5+-parseInt(_0x3332d4(0x173))/0x6+parseInt(_0x3332d4(0x17a))/0x7+-parseInt(_0x3332d4(0x17c))/0x8*(parseInt(_0x3332d4(0x17e))/0x9)+parseInt(_0x3332d4(0x177))/0xa*(-parseInt(_0x3332d4(0x179))/0xb);if(_0x58ac6b===_0x53c996)break;else _0x2c54ce['push'](_0x2c54ce['shift']());}catch(_0x432667){_0x2c54ce['push'](_0x2c54ce['shift']());}}}(a94_0x3e36,0x53331));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a94_0x520116(0x175),a94_0x520116(0x16e),a94_0x520116(0x176)];export function normalizeEnv(_0x23f0dc){const _0x36ea82=a94_0x520116;return _0x23f0dc===_0x36ea82(0x17d)?_0x36ea82(0x175):_0x23f0dc;}export function isProduction(_0x1073af){return normalizeEnv(_0x1073af)==='production';}export function isDaily(_0x5c7f00){const _0x293d4c=a94_0x520116;return normalizeEnv(_0x5c7f00)===_0x293d4c(0x176);}export function isDev(_0x18289f){const _0x5c878f=a94_0x520116,_0x5db3ba=normalizeEnv(_0x18289f);return _0x5db3ba===_0x5c878f(0x16e)||_0x5db3ba===_0x5c878f(0x172);}function a94_0x4def(_0x37992b,_0x33e7d7){_0x37992b=_0x37992b-0x16e;const _0x3e36d8=a94_0x3e36();let _0x4defb1=_0x3e36d8[_0x37992b];return _0x4defb1;}let env=normalizeEnv(productEnv(a94_0x520116(0x16f))||a94_0x520116(0x175));export function getEnv(){return env;}export function initEnv(_0x45a0b5){env=normalizeEnv(_0x45a0b5);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a95_0x51c8(_0xdb4ffe,_0x2b2f0d){_0xdb4ffe=_0xdb4ffe-0x9c;const _0x44c806=a95_0x44c8();let _0x51c898=_0x44c806[_0xdb4ffe];return _0x51c898;}const a95_0x5a373d=a95_0x51c8;function a95_0x44c8(){const _0x147fdf=['104xmBwoN','100275KaccYw','184420yJZIWP','100413HKOORn','2YlQebS','2981fPDMLo','742140EFnPBC','5028NHNfeJ','66SYZIMU','10ViahTB','124889KGvlFu','json','472540dvNgVH'];a95_0x44c8=function(){return _0x147fdf;};return a95_0x44c8();}(function(_0x2850ed,_0x4fccc8){const _0x37ea7c=a95_0x51c8,_0x3dd67c=_0x2850ed();while(!![]){try{const _0x505e34=-parseInt(_0x37ea7c(0xa8))/0x1*(-parseInt(_0x37ea7c(0xa2))/0x2)+parseInt(_0x37ea7c(0xa4))/0x3+-parseInt(_0x37ea7c(0xa0))/0x4*(parseInt(_0x37ea7c(0xa7))/0x5)+-parseInt(_0x37ea7c(0xa6))/0x6*(parseInt(_0x37ea7c(0x9f))/0x7)+parseInt(_0x37ea7c(0x9e))/0x8*(-parseInt(_0x37ea7c(0xa1))/0x9)+parseInt(_0x37ea7c(0x9d))/0xa+parseInt(_0x37ea7c(0xa3))/0xb*(parseInt(_0x37ea7c(0xa5))/0xc);if(_0x505e34===_0x4fccc8)break;else _0x3dd67c['push'](_0x3dd67c['shift']());}catch(_0x3470e6){_0x3dd67c['push'](_0x3dd67c['shift']());}}}(a95_0x44c8,0x21c06));export const OUTPUT_FORMAT_VALUES=[a95_0x5a373d(0x9c),'pretty','compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x39f83c=a96_0x1793;(function(_0x335845,_0x5a3a05){const _0x3ecf91=a96_0x1793,_0x5386e0=_0x335845();while(!![]){try{const _0x189d97=parseInt(_0x3ecf91(0xbc))/0x1+parseInt(_0x3ecf91(0xbd))/0x2+parseInt(_0x3ecf91(0xcb))/0x3+parseInt(_0x3ecf91(0xc5))/0x4+parseInt(_0x3ecf91(0xd0))/0x5*(parseInt(_0x3ecf91(0xc1))/0x6)+parseInt(_0x3ecf91(0xc8))/0x7*(parseInt(_0x3ecf91(0xc6))/0x8)+-parseInt(_0x3ecf91(0xc9))/0x9*(parseInt(_0x3ecf91(0xcc))/0xa);if(_0x189d97===_0x5a3a05)break;else _0x5386e0['push'](_0x5386e0['shift']());}catch(_0x53df5d){_0x5386e0['push'](_0x5386e0['shift']());}}}(a96_0xad75,0x8dab7));export const PRODUCT_CONFIG={'cliBinName':a96_0x39f83c(0xc2),'cliDisplayName':a96_0x39f83c(0xce),'npmPackageName':a96_0x39f83c(0xd3),'skillSource':a96_0x39f83c(0xc7),'internalSkillSource':'git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','globalSkillName':'lovrabet','npmRegistryBaseUrl':a96_0x39f83c(0xd1),'envPrefix':a96_0x39f83c(0xc0),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':[a96_0x39f83c(0xbe),a96_0x39f83c(0xd2)],'newConfigFileName':a96_0x39f83c(0xbe),'homeDirName':a96_0x39f83c(0xcd),'logFileName':a96_0x39f83c(0xc4),'invokeSource':a96_0x39f83c(0xbb),'userCenterDisplayName':a96_0x39f83c(0xca),'skipNpxSkillsEnvSuffix':'SKIP_NPX_SKILLS','domains':{'production':{'user':'https://user.lovrabet.com','api':a96_0x39f83c(0xcf),'runtime':'https://runtime.lovrabet.com','skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':a96_0x39f83c(0xbf),'api':a96_0x39f83c(0xd4),'runtime':'https://daily-runtime.lovrabet.com','skillhub':a96_0x39f83c(0xba)}},'accessKeyCreatePath':a96_0x39f83c(0xc3)};export function productEnvName(_0x223c21){return PRODUCT_CONFIG['envPrefix']+'_'+_0x223c21;}function a96_0x1793(_0x424dcd,_0x1e3be0){_0x424dcd=_0x424dcd-0xba;const _0xad75c2=a96_0xad75();let _0x1793c6=_0xad75c2[_0x424dcd];return _0x1793c6;}export function productEnvNames(_0x2dbbe2){return[productEnvName(_0x2dbbe2),...PRODUCT_CONFIG['legacyEnvPrefixes']['map'](_0x1a1586=>_0x1a1586+'_'+_0x2dbbe2)];}export function productEnv(_0x315a05){for(const _0xbb1746 of productEnvNames(_0x315a05)){const _0xbabfd2=process.env[_0xbb1746];if(_0xbabfd2!==undefined)return _0xbabfd2;}return undefined;}function a96_0xad75(){const _0x413047=['1063692zuqGUn','10RitmPF','.lovrabet','Lovrabet\x20Runtime\x20CLI','https://api.lovrabet.com','85giUHOi','https://registry.npmjs.org','.lovrabetrc','@lovrabet/lovrabet-cli','https://daily-api.lovrabet.com','https://skills-daily.lovrabet.com','cli:lovrabet-runtime','106192YlkQIu','1017346Ytzhsw','.lovrabet.json','https://user-daily.lovrabet.com','LOVRABET','210318yrHurE','lovrabet','/user/ak','.lovrabet-runtime.log','3392116DPrYWm','8NFChqL','lovrabet/lovrabet-cli','5891522FEojaF','24072534RTZMbC','Lovrabet\x20User\x20Center'];a96_0xad75=function(){return _0x413047;};return a96_0xad75();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a97_0x508bf1=a97_0x1bb1;function a97_0x2d36(){const _0x2a585c=['high-risk-write','16899021ESszjK','50ljzkPx','4108041fMcrgL','43188996GdEWxo','2cYmJaX','6GHYGlY','4320415acIqGS','write','1216601dvRMTo','10CGFawj','720676otRiKO','1057326YgaOJM','8nSBNiu'];a97_0x2d36=function(){return _0x2a585c;};return a97_0x2d36();}function a97_0x1bb1(_0x6fa6bb,_0x10e1b1){_0x6fa6bb=_0x6fa6bb-0x91;const _0x2d36de=a97_0x2d36();let _0x1bb16d=_0x2d36de[_0x6fa6bb];return _0x1bb16d;}(function(_0x45d4b9,_0x3687a7){const _0x9af2d6=a97_0x1bb1,_0x120f42=_0x45d4b9();while(!![]){try{const _0x409c32=-parseInt(_0x9af2d6(0x9c))/0x1*(parseInt(_0x9af2d6(0x98))/0x2)+-parseInt(_0x9af2d6(0x99))/0x3*(parseInt(_0x9af2d6(0x9e))/0x4)+parseInt(_0x9af2d6(0x9d))/0x5*(-parseInt(_0x9af2d6(0x91))/0x6)+-parseInt(_0x9af2d6(0x96))/0x7+parseInt(_0x9af2d6(0x92))/0x8*(parseInt(_0x9af2d6(0x94))/0x9)+-parseInt(_0x9af2d6(0x95))/0xa*(parseInt(_0x9af2d6(0x9a))/0xb)+parseInt(_0x9af2d6(0x97))/0xc;if(_0x409c32===_0x3687a7)break;else _0x120f42['push'](_0x120f42['shift']());}catch(_0x52b351){_0x120f42['push'](_0x120f42['shift']());}}}(a97_0x2d36,0xf354b));export const RISK_LEVEL_VALUES=['read',a97_0x508bf1(0x9b),a97_0x508bf1(0x93)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a98_0x2daeb4=a98_0x22b0;(function(_0x5487c1,_0x4c7a0e){const _0x23b760=a98_0x22b0,_0x2ac54b=_0x5487c1();while(!![]){try{const _0x1428d4=-parseInt(_0x23b760(0x6e))/0x1*(-parseInt(_0x23b760(0x65))/0x2)+parseInt(_0x23b760(0x70))/0x3+-parseInt(_0x23b760(0x6c))/0x4+-parseInt(_0x23b760(0x6f))/0x5+-parseInt(_0x23b760(0x6d))/0x6*(parseInt(_0x23b760(0x68))/0x7)+-parseInt(_0x23b760(0x69))/0x8*(-parseInt(_0x23b760(0x67))/0x9)+-parseInt(_0x23b760(0x71))/0xa*(-parseInt(_0x23b760(0x64))/0xb);if(_0x1428d4===_0x4c7a0e)break;else _0x2ac54b['push'](_0x2ac54b['shift']());}catch(_0x140e26){_0x2ac54b['push'](_0x2ac54b['shift']());}}}(a98_0x2ea1,0x9a708));function a98_0x2ea1(){const _0x346a12=['1007852lgcQKL','24vKfrKc','37SDXLnY','2739070tobXIo','1934928alCJVU','65560rOoHxd','accessKeyCreatePath','1980xEVGkM','7002jesIZy','user','2311398JWdtHI','1812783hZWqCv','16IooZRD','domains','production'];a98_0x2ea1=function(){return _0x346a12;};return a98_0x2ea1();}import{PRODUCT_CONFIG}from'../constant/product.js';function a98_0x22b0(_0x522043,_0x9389f1){_0x522043=_0x522043-0x64;const _0x2ea1aa=a98_0x2ea1();let _0x22b0d0=_0x2ea1aa[_0x522043];return _0x22b0d0;}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a98_0x2daeb4(0x6a)][a98_0x2daeb4(0x6b)][a98_0x2daeb4(0x66)]+PRODUCT_CONFIG[a98_0x2daeb4(0x72)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a99_0x842e7=a99_0x788a;(function(_0x58ef17,_0x47e43a){const _0x37f683=a99_0x788a,_0x16a0cb=_0x58ef17();while(!![]){try{const _0x5c0ea3=parseInt(_0x37f683(0x104))/0x1*(-parseInt(_0x37f683(0xf3))/0x2)+parseInt(_0x37f683(0x116))/0x3*(-parseInt(_0x37f683(0xfb))/0x4)+-parseInt(_0x37f683(0x117))/0x5*(parseInt(_0x37f683(0x101))/0x6)+parseInt(_0x37f683(0x126))/0x7+-parseInt(_0x37f683(0x112))/0x8*(parseInt(_0x37f683(0xff))/0x9)+-parseInt(_0x37f683(0x111))/0xa+parseInt(_0x37f683(0x12a))/0xb*(parseInt(_0x37f683(0x115))/0xc);if(_0x5c0ea3===_0x47e43a)break;else _0x16a0cb['push'](_0x16a0cb['shift']());}catch(_0x3df757){_0x16a0cb['push'](_0x16a0cb['shift']());}}}(a99_0x5cc3,0x9169f));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[a99_0x842e7(0x11e)];function a99_0x788a(_0x31b2fc,_0x42406e){_0x31b2fc=_0x31b2fc-0xec;const _0x5cc373=a99_0x5cc3();let _0x788aa9=_0x5cc373[_0x31b2fc];return _0x788aa9;}export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a99_0x842e7(0x107)];function resolveConfigPath(_0xe5127b){for(const _0x11a1dd of CONFIG_NAMES){const _0x5d53da=resolve(_0xe5127b,_0x11a1dd);if(existsSync(_0x5d53da))return _0x5d53da;}return undefined;}export function resolveWriteConfigPath(_0x2c551b){const _0x244113=a99_0x842e7,_0x45976f=_0x2c551b===_0x244113(0x109)?process[_0x244113(0x10a)]():homedir(),_0x4b31f1=resolveConfigPath(_0x45976f);return _0x4b31f1??resolve(_0x45976f,NEW_CONFIG_NAME);}export function readConfigFile(_0x153490){const _0x41e50b=a99_0x842e7;try{if(existsSync(_0x153490)){const _0x411e71=readFileSync(_0x153490,{'encoding':_0x41e50b(0x10f)});if(_0x411e71){const _0x2859c9=JSON[_0x41e50b(0x113)](_0x411e71);return migrateOnlineEnv(_0x153490,_0x2859c9),_0x2859c9;}}}catch{}return{};}function migrateOnlineEnv(_0x2eb57a,_0x5676ea){const _0xace6c=a99_0x842e7;let _0x7f204d=![];_0x5676ea[_0xace6c(0x103)]===_0xace6c(0xf1)&&(_0x5676ea['env']=_0xace6c(0x12b),_0x7f204d=!![]);if(_0x5676ea[_0xace6c(0x119)]&&typeof _0x5676ea[_0xace6c(0x119)]===_0xace6c(0x118))for(const _0x37ae12 of Object['values'](_0x5676ea[_0xace6c(0x119)])){_0x37ae12&&_0x37ae12[_0xace6c(0x103)]===_0xace6c(0xf1)&&(_0x37ae12[_0xace6c(0x103)]=_0xace6c(0x12b),_0x7f204d=!![]);}if(_0x7f204d)try{writeConfigFile(_0x2eb57a,_0x5676ea);}catch{}}export function writeConfigFile(_0x488df2,_0x544faf){const _0x4dc786=a99_0x842e7,_0x2e01db=dirname(_0x488df2);!existsSync(_0x2e01db)&&mkdirSync(_0x2e01db,{'recursive':!![]});const _0x29f543=_0x488df2+_0x4dc786(0x10e);try{writeFileSync(_0x29f543,JSON[_0x4dc786(0x137)](_0x544faf,null,0x2)+'\x0a',{'encoding':_0x4dc786(0x10f),'mode':0x180});try{renameSync(_0x29f543,_0x488df2);}catch(_0x19a6e8){if(_0x19a6e8[_0x4dc786(0xec)]===_0x4dc786(0xef)||_0x19a6e8[_0x4dc786(0xec)]===_0x4dc786(0x108)||_0x19a6e8['code']===_0x4dc786(0xf7)){writeFileSync(_0x488df2,JSON['stringify'](_0x544faf,null,0x2)+'\x0a',{'encoding':_0x4dc786(0x10f)});try{unlinkSync(_0x29f543);}catch{}}else throw _0x19a6e8;}}catch(_0x57206c){try{unlinkSync(_0x29f543);}catch{}throw _0x57206c;}}export function isNonInteractiveMode(_0x33d42f){const _0xde9ac8=a99_0x842e7;return!!(_0x33d42f[_0xde9ac8(0x122)]||_0x33d42f['ci']||productEnvNames('CI')[_0xde9ac8(0x121)](_0x571578=>process.env[_0x571578]===_0xde9ac8(0x127))||process.env.CI===_0xde9ac8(0x127)||!process[_0xde9ac8(0x114)][_0xde9ac8(0xfa)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x446e50=a99_0x842e7;if(!process[_0x446e50(0x10d)]['isTTY'])return![];try{const _0x3a0581=process['stdin'][_0x446e50(0x105)];return process[_0x446e50(0x10d)][_0x446e50(0x120)](!![]),process[_0x446e50(0x10d)]['setRawMode'](_0x3a0581??![]),!![];}catch{return![];}}export async function createContext(_0x3eb4bf){const _0x1937ee=a99_0x842e7,_0x4cb9d6=readRawConfig(),_0x49998c=buildConfig(_0x4cb9d6,_0x3eb4bf);await initGlobalEnvironment(_0x49998c);const {getUserDomain:_0x3b9022,getApiDomain:_0x133ddd}=await import('./constant/domain.js'),_0x5a8062={'apiDomain':_0x133ddd(),'userDomain':_0x3b9022()},_0x55a0b2=await buildAuth(_0x49998c);logger['setLogPath'](process[_0x1937ee(0x10a)]());const _0x289bbc=(CLI_BIN_NAME+'\x20'+process[_0x1937ee(0xf5)][_0x1937ee(0xf9)](0x2)['join']('\x20'))['trim']();logger[_0x1937ee(0x11b)](_0x289bbc);const _0x2f5119=isNonInteractiveMode(_0x3eb4bf);return{'config':_0x49998c,'auth':_0x55a0b2,'logger':logger,'env':_0x5a8062,'nonInteractive':_0x2f5119};}export function buildConfigFromFlags(_0xca06d9){return buildConfig(readRawConfig(),_0xca06d9);}export function getLocalAppAliases(_0x282112){const _0x5f1c42=a99_0x842e7;return _0x282112[_0x5f1c42(0x119)]&&typeof _0x282112['apps']===_0x5f1c42(0x118)?_0x282112[_0x5f1c42(0x119)]:{};}export function resolveLocalAppAliasCode(_0x43f251,_0x48b9d8){const _0x6e13d2=a99_0x842e7;if(!_0x48b9d8)return undefined;const _0x2a6e51=getLocalAppAliases(_0x43f251)[_0x48b9d8],_0x488437=_0x2a6e51?.[_0x6e13d2(0x134)];return typeof _0x488437===_0x6e13d2(0x131)&&_0x488437[_0x6e13d2(0x100)]()?_0x488437[_0x6e13d2(0x100)]():undefined;}export function readAppCodeFromConfig(){const _0x2ce203=a99_0x842e7,_0x4035b1=readRawConfig(),_0x1d7297=_0x4035b1['appcode']??_0x4035b1[_0x2ce203(0x11a)];if(typeof _0x1d7297===_0x2ce203(0x131)&&_0x1d7297['trim']())return _0x1d7297[_0x2ce203(0x100)]();const _0x7131ca=resolveLocalAppAliasCode(_0x4035b1,typeof _0x4035b1[_0x2ce203(0x135)]===_0x2ce203(0x131)?_0x4035b1[_0x2ce203(0x135)]:undefined);if(_0x7131ca)return _0x7131ca;const _0x55ef16=normalizeEnv(String(_0x4035b1[_0x2ce203(0x103)]||_0x2ce203(0x12b))),_0x1c8fe1=isDaily(_0x55ef16)?_0x2ce203(0xf4):isDev(_0x55ef16)?_0x2ce203(0xed):'production',_0x259356=resolveCachedAppCode(typeof _0x4035b1[_0x2ce203(0x135)]==='string'?_0x4035b1['defaultApp']:undefined,_0x1c8fe1,typeof _0x4035b1['accessKey']===_0x2ce203(0x131)?_0x4035b1[_0x2ce203(0xf0)]:undefined);if(_0x259356)return _0x259356;const _0x563706=Object['values'](getLocalAppAliases(_0x4035b1))[_0x2ce203(0x12d)](_0x2402dd=>_0x2402dd?.[_0x2ce203(0x134)]);return typeof _0x563706?.['appcode']===_0x2ce203(0x131)&&_0x563706[_0x2ce203(0x134)]['trim']()?_0x563706['appcode'][_0x2ce203(0x100)]():undefined;}export function readScopedConfig(_0xd5b050){const _0x50ad90=a99_0x842e7,_0xde4198=_0xd5b050[_0x50ad90(0x124)]?_0x50ad90(0x124):_0x50ad90(0x109);return readConfigFile(resolveWriteConfigPath(_0xde4198));}export function writeScopedConfig(_0x1cdcf1,_0x4c9230){const _0x4e46f6=a99_0x842e7,_0x1f5472=_0x4c9230[_0x4e46f6(0x124)]?'global':'project';writeConfigFile(resolveWriteConfigPath(_0x1f5472),_0x1cdcf1);}export async function initGlobalEnvironment(_0x3bfbbd){const _0x3213ba=a99_0x842e7,{initEnv:_0xd00045}=await import(_0x3213ba(0x110));_0xd00045(_0x3bfbbd[_0x3213ba(0x103)]);const {initDomains:_0x5dfefe}=await import('./constant/domain.js');_0x5dfefe({'apiDomain':_0x3bfbbd[_0x3213ba(0x132)][_0x3213ba(0x125)]||_0x3bfbbd[_0x3213ba(0x132)][_0x3213ba(0xfd)]||undefined,'userDomain':_0x3bfbbd[_0x3213ba(0x132)][_0x3213ba(0xf2)]||undefined,'runtimeDomain':_0x3bfbbd[_0x3213ba(0x132)][_0x3213ba(0x11f)]||undefined,'skillHubDomain':_0x3bfbbd[_0x3213ba(0x132)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x4863f0=a99_0x842e7;return resolveConfigPath(process[_0x4863f0(0x10a)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}function a99_0x5cc3(){const _0x327d17=['parse','stdout','552DOdSwT','111lfBDzC','5PnlDSj','object','apps','app','setRawCommand','APPCODE','PAGE_SIZE','configFileNames','runtimeDomain','setRawMode','some','nonInteractive','missing','global','apiDomain','5025636CYkgvd','true','write','authRequired','645480hzKWgH','production','pageSize','find','projectConfig','ENV','riskLevel','string','raw','cache','appcode','defaultApp','message','stringify','code','development','APP','EPERM','accessKey','online','userDomain','146ayUIfy','daily','argv','ACCESS_KEY','EACCES','local-alias','slice','isTTY','45244ljQZJJ','inherit','host','explicit','4329wSlbxX','trim','4030590WttgvX','locale','env','5177nJsiwr','isRaw','format','newConfigFileName','EXDEV','project','cwd','empty','maxRisk','stdin','.tmp','utf8','./constant/env.js','9210010HmONhD','7192IURQbr'];a99_0x5cc3=function(){return _0x327d17;};return a99_0x5cc3();}export function inspectCliConfigJsonFile(_0x33804b){const _0x47f210=a99_0x842e7;if(!existsSync(_0x33804b))return{'status':_0x47f210(0x123)};try{const _0x23ce8e=readFileSync(_0x33804b,{'encoding':_0x47f210(0x10f)});if(!_0x23ce8e?.[_0x47f210(0x100)]())return{'status':_0x47f210(0x10b)};const _0x5c0f38=JSON[_0x47f210(0x113)](_0x23ce8e);return{'status':'ok','data':_0x5c0f38};}catch(_0x137cce){return{'status':'error','message':_0x137cce instanceof Error?_0x137cce[_0x47f210(0x136)]:String(_0x137cce)};}}export function loadRawConfigLayers(_0x704734){const _0x1ba233=a99_0x842e7;let _0x233527={},_0x4c4913={},_0x3e2229,_0x4de133;try{_0x3e2229=resolveConfigPath(homedir());if(_0x3e2229){const _0x1495b8=readFileSync(_0x3e2229,{'encoding':_0x1ba233(0x10f)});if(_0x1495b8)_0x233527=JSON[_0x1ba233(0x113)](_0x1495b8);}}catch{}try{const _0x1dc623=_0x704734||process[_0x1ba233(0x10a)]();_0x4de133=resolveConfigPath(_0x1dc623);if(_0x4de133){const _0x3faf07=readFileSync(_0x4de133,{'encoding':_0x1ba233(0x10f)});if(_0x3faf07)_0x4c4913=JSON[_0x1ba233(0x113)](_0x3faf07);}}catch{}return{'globalPath':_0x3e2229,'projectPath':_0x4de133,'globalConfig':_0x233527,'projectConfig':_0x4c4913};}function mergeRawConfigLayers(_0x3f20de){const _0x4e9ee0=a99_0x842e7,{globalConfig:_0x30ca8c,projectConfig:_0xe8457c}=_0x3f20de;if(_0xe8457c[_0x4e9ee0(0xfc)]===![]){const _0x22fb1c={..._0xe8457c};return delete _0x22fb1c[_0x4e9ee0(0xfc)],_0x22fb1c;}const _0x11ee1e={..._0x30ca8c,..._0xe8457c};if(_0x4e9ee0(0x135)in _0xe8457c)_0x11ee1e[_0x4e9ee0(0x135)]=_0xe8457c[_0x4e9ee0(0x135)];else _0x30ca8c[_0x4e9ee0(0x135)]&&(_0x11ee1e['defaultApp']=_0x30ca8c[_0x4e9ee0(0x135)]);return _0x11ee1e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x7f04ba){return mergeRawConfigLayers(loadRawConfigLayers(_0x7f04ba));}export function readRawConfigWithLayers(_0x538c16){const _0xc26b88=loadRawConfigLayers(_0x538c16);return{'config':mergeRawConfigLayers(_0xc26b88),'layers':_0xc26b88};}export function resolveDefaultAppSource(_0x3acb5d){const _0x50d6ea=a99_0x842e7;if(_0x50d6ea(0x135)in _0x3acb5d[_0x50d6ea(0x12e)])return _0x50d6ea(0x109);if(_0x3acb5d[_0x50d6ea(0x12e)][_0x50d6ea(0xfc)]===![])return null;if(_0x3acb5d['globalConfig']['defaultApp'])return'global';return null;}function buildConfig(_0x24140c,_0x414ce6){const _0x5c76d1=a99_0x842e7,_0x4189c2=_0x24140c[_0x5c76d1(0x135)]||undefined,_0xaae49=_0x414ce6[_0x5c76d1(0x11a)]||env(_0x5c76d1(0xee))||undefined,_0x2e8ff3=_0xaae49||_0x4189c2||undefined,_0x361c61=env(_0x5c76d1(0xf6))||_0x24140c[_0x5c76d1(0xf0)]||undefined,_0x25fee1=_0x414ce6[_0x5c76d1(0x103)]||env(_0x5c76d1(0x12f))||_0x24140c[_0x5c76d1(0x103)]||DEFAULT_CONFIG_VALUES[_0x5c76d1(0x103)],_0x2d77dc=normalizeEnv(String(_0x25fee1)),_0xe6b60=isDaily(_0x2d77dc)?'daily':isDev(_0x2d77dc)?'development':_0x5c76d1(0x12b),_0xd058d2=typeof _0x414ce6[_0x5c76d1(0x134)]==='string'?_0x414ce6['appcode']:undefined,_0x427d30=env(_0x5c76d1(0x11c)),_0x2b43dc=_0xaae49?undefined:_0x24140c[_0x5c76d1(0x134)]||_0x24140c['app']||undefined,_0x4e4abc=_0xaae49||(_0x2b43dc?undefined:_0x4189c2),_0x388a89=resolveLocalAppAliasCode(_0x24140c,_0x4e4abc),_0x7b47e2=resolveCachedAppCode(_0x4e4abc,_0xe6b60,_0x361c61),_0x5df87f=_0xd058d2||_0x427d30||_0x2b43dc||_0x388a89||_0x7b47e2||undefined,_0x80ee77=_0xd058d2?_0x5c76d1(0xfe):_0x427d30?'env':_0x2b43dc?'top-level':_0x388a89?_0x5c76d1(0xf8):_0x7b47e2?_0x5c76d1(0x133):undefined,_0x50b3cd=_0x24140c[_0x5c76d1(0x102)]||DEFAULT_CONFIG_VALUES[_0x5c76d1(0x102)],_0x4daddc=undefined,_0x292d49=_0x414ce6[_0x5c76d1(0x106)]||env('FORMAT')||_0x24140c[_0x5c76d1(0x106)],_0x39a433=normalizeLegacyOutputFormat(_0x292d49),_0x407ddb=env(_0x5c76d1(0x11d))||_0x24140c[_0x5c76d1(0x12c)],_0x2aa5f3=_0x407ddb?Number(_0x407ddb)||undefined:undefined,_0x3d4a4a=_0x24140c[_0x5c76d1(0x130)]||_0x24140c[_0x5c76d1(0x10c)],_0x3be56b=_0x3d4a4a==='read'||_0x3d4a4a===_0x5c76d1(0x128)||_0x3d4a4a==='high-risk-write'?_0x3d4a4a:DEFAULT_CONFIG_VALUES['riskLevel'],_0x40be19=env('VERBOSE'),_0x5796d8=_0x40be19==='1'||_0x40be19===_0x5c76d1(0x127);return{'appCode':typeof _0x5df87f===_0x5c76d1(0x131)&&_0x5df87f[_0x5c76d1(0x100)]()?_0x5df87f[_0x5c76d1(0x100)]():undefined,'appCodeSource':_0x80ee77,'env':_0xe6b60,'locale':_0x50b3cd,'cookie':_0x4daddc,'accessKey':_0x361c61,'format':_0x39a433,'pageSize':_0x2aa5f3,'riskLevel':_0x3be56b,'verbose':_0x5796d8,'defaultApp':_0x4189c2,'currentApp':typeof _0x2e8ff3===_0x5c76d1(0x131)?_0x2e8ff3:undefined,'raw':_0x24140c};}function env(_0x49c884){return productEnv(_0x49c884);}async function buildAuth(_0x315498){const _0x27f261=a99_0x842e7,_0x5abb01='',_0x1f917c=!!_0x315498[_0x27f261(0xf0)];return{'cookie':_0x5abb01,'isLoggedIn':_0x1f917c,async 'getOrLogin'(){const _0x35f42a=_0x27f261;if(_0x1f917c)return _0x5abb01;throw CliErrors[_0x35f42a(0x129)]();}};}
|
|
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)]();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -351,7 +351,7 @@ export interface LoginUserInfo {
|
|
|
351
351
|
[key: string]: unknown;
|
|
352
352
|
}
|
|
353
353
|
export type RuntimeScheduleKind = "CRON" | "ONCE";
|
|
354
|
-
export type
|
|
354
|
+
export type RuntimeScheduleModel = "kimi/k3" | "deepseek-v4-flash-0731" | "deepseek-v4-pro-0813";
|
|
355
355
|
export type RuntimeScheduleTaskStatus = "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED";
|
|
356
356
|
export type RuntimeScheduleInput = {
|
|
357
357
|
kind: "CRON";
|
|
@@ -359,14 +359,14 @@ export type RuntimeScheduleInput = {
|
|
|
359
359
|
cron: string;
|
|
360
360
|
title: string;
|
|
361
361
|
prompt: string;
|
|
362
|
-
|
|
362
|
+
model: RuntimeScheduleModel;
|
|
363
363
|
} | {
|
|
364
364
|
kind: "ONCE";
|
|
365
365
|
timezone: "UTC";
|
|
366
366
|
scheduledAt: string;
|
|
367
367
|
title: string;
|
|
368
368
|
prompt: string;
|
|
369
|
-
|
|
369
|
+
model: RuntimeScheduleModel;
|
|
370
370
|
};
|
|
371
371
|
export interface RuntimeScheduleSummary {
|
|
372
372
|
scheduleId: string;
|