@lovrabet/lovrabet-cli 2.2.4-beta.3 → 2.2.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.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.d.ts +7 -0
- 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.d.ts +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 +1 -1
- package/skills/lovrabet.manifest.json +3 -3
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a83_0x3bd49f=a83_0x5ba7;(function(_0x103e22,_0x27192b){const _0x1b8f66=a83_0x5ba7,_0x4a5e34=_0x103e22();while(!![]){try{const _0x56a3cd=parseInt(_0x1b8f66(0x229))/0x1*(-parseInt(_0x1b8f66(0x1fa))/0x2)+parseInt(_0x1b8f66(0x23a))/0x3*(parseInt(_0x1b8f66(0x1f8))/0x4)+parseInt(_0x1b8f66(0x1ee))/0x5+parseInt(_0x1b8f66(0x22f))/0x6+-parseInt(_0x1b8f66(0x217))/0x7*(parseInt(_0x1b8f66(0x21f))/0x8)+parseInt(_0x1b8f66(0x213))/0x9+parseInt(_0x1b8f66(0x22c))/0xa*(parseInt(_0x1b8f66(0x239))/0xb);if(_0x56a3cd===_0x27192b)break;else _0x4a5e34['push'](_0x4a5e34['shift']());}catch(_0x5bbf3e){_0x4a5e34['push'](_0x4a5e34['shift']());}}}(a83_0x4ee0,0x6969d));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a83_0x172b6f 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_0x3bd49f(0x226),'type':a83_0x3bd49f(0x21e),'description':a83_0x3bd49f(0x1f5),'default':![]},{'name':'beta','type':a83_0x3bd49f(0x21e),'description':a83_0x3bd49f(0x21a),'default':![]},{'name':a83_0x3bd49f(0x212),'type':a83_0x3bd49f(0x1f1),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x4e6689){const _0x34721f=a83_0x3bd49f,_0x25ab03=_0x4e6689[_0x34721f(0x234)](_0x34721f(0x212))[_0x34721f(0x20a)]();if(_0x25ab03)return _0x25ab03;return String(_0x4e6689[_0x34721f(0x210)]?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x2a35f5){const _0x5436e5=a83_0x3bd49f,_0x257552=getRequestedVersion(_0x2a35f5),_0x1c9a24=[_0x2a35f5[_0x5436e5(0x202)](_0x5436e5(0x226))?'latest':'',_0x2a35f5['bool'](_0x5436e5(0x22b))?'beta':'',_0x257552?_0x5436e5(0x212):'']['filter'](Boolean);if(_0x1c9a24[_0x5436e5(0x20d)]>0x1)throw CliErrors['validation'](_0x5436e5(0x1f6),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x257552&&!a83_0x172b6f['valid'](_0x257552))throw CliErrors[_0x5436e5(0x21d)](_0x5436e5(0x219)+_0x257552,_0x5436e5(0x1f4));}async function fetchNpmDistTags(){const _0xec81c5=a83_0x3bd49f;try{const _0x580b71=NPM_REGISTRY_BASE_URL+_0xec81c5(0x204)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0xec81c5(0x232),_0x3cf3af=await fetch(_0x580b71,{'signal':AbortSignal[_0xec81c5(0x20e)](0x2710)});if(!_0x3cf3af['ok'])return null;const _0x55094e=await _0x3cf3af[_0xec81c5(0x1e9)]();if(!_0x55094e||typeof _0x55094e!==_0xec81c5(0x214))return null;return Object[_0xec81c5(0x201)](Object[_0xec81c5(0x206)](_0x55094e)[_0xec81c5(0x1f2)](([,_0x4fa24f])=>typeof _0x4fa24f===_0xec81c5(0x1f1)&&_0x4fa24f['trim']())['map'](([_0x41a41e,_0x4e988b])=>[_0x41a41e,String(_0x4e988b)['trim']()]));}catch{return null;}}function a83_0x4ee0(){const _0x2919c9=['Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20Run\x20manually:\x20','Checking\x20npm\x20dist-tags...','validation','boolean','4386864QAVszl','error','@lovrabet/lovrabet-cli','从\x20npm\x20更新\x20','toString','basename','exit\x20','latest','pipe','node_modules','2wbUHdk','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','beta','56580CzJOVQ','@lovrabet\x5clovrabet-cli','find','473622zwoDMJ','write','\x20->\x20','/dist-tags',']:\x20','str','valid','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Update\x20failed:\x20','current','1419WlDhts','798807TbRfdm','unknown','\x20\x20CLI\x20Built-in\x20Skill\x20','\x20is\x20current.','json','reason','update','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','state','55720MMrFQF','install','lib','string','filter','platform','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','run','4usfYTy','Current\x20version:\x20','355458xRxNEW','repairCommand','dirname','Already\x20on\x20requested\x20version\x20(v','cwd','\x20version\x20from\x20npm.','stderr','fromEntries','bool','source','/-/package/','code','entries','status','\x20CLI','read','trim','Version\x20comparison\x20failed:\x20','Checking\x20CLI\x20Built-in\x20Skill...','length','timeout','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','args','stdout','version','2244213bBNDOc','object','warn','log','7WsAfZL','nonInteractive','Invalid\x20version:\x20'];a83_0x4ee0=function(){return _0x2919c9;};return a83_0x4ee0();}async function resolveTargetVersion(_0x3fa0ba){const _0x5e5016=a83_0x3bd49f,_0x3024b2=getRequestedVersion(_0x3fa0ba);if(_0x3024b2)return{'version':_0x3024b2,'source':_0x5e5016(0x212)};const _0x204c32=_0x3fa0ba[_0x5e5016(0x202)]('beta')?'beta':'latest',_0x56e43d=await fetchNpmDistTags(),_0x204bb7=_0x56e43d?.[_0x204c32];if(!_0x204bb7)return null;return{'version':_0x204bb7,'source':_0x204c32};}function shouldInstallTarget(_0xa91a3,_0x54472c){const _0x2e33ff=a83_0x3bd49f;if(_0x54472c[_0x2e33ff(0x203)]===_0x2e33ff(0x212)||_0x54472c[_0x2e33ff(0x203)]===_0x2e33ff(0x22b))return!a83_0x172b6f['eq'](_0xa91a3,_0x54472c[_0x2e33ff(0x212)]);return a83_0x172b6f['lt'](_0xa91a3,_0x54472c[_0x2e33ff(0x212)]);}export function installCliPackage(_0x284d04,_0x504f73,_0x6679af=resolveCurrentCliNpmPrefix()){const _0x28b7ce=a83_0x3bd49f,_0x28ba29=resolveNpmBin('npm'),_0x3352cc=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x284d04,_0x1e9bbf=[_0x28b7ce(0x1ef),'-g',_0x3352cc],_0x569009=runNpmInstall(_0x28ba29,_0x1e9bbf,_0x504f73);if(_0x569009['ok']||!isNpmPrefixPermissionError(_0x569009[_0x28b7ce(0x220)]))return _0x569009;if(!_0x6679af||_0x569009[_0x28b7ce(0x220)]?.['toLowerCase']()['includes'](_0x6679af['toLowerCase']()))return _0x569009;return console[_0x28b7ce(0x215)](_0x28b7ce(0x22a)+_0x6679af),runNpmInstall(_0x28ba29,[..._0x1e9bbf,'--prefix',_0x6679af],_0x504f73);}export function resolveCurrentCliNpmPrefix(_0x440008=fileURLToPath(import.meta.url),_0x42dc27=process[a83_0x3bd49f(0x1f3)]){const _0x596f73=a83_0x3bd49f,_0x138372=_0x42dc27==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x4ecd7f=_0x138372[_0x596f73(0x1fc)](_0x138372[_0x596f73(0x1fc)](_0x138372[_0x596f73(0x1fc)](_0x440008))),_0x3240a9=_0x42dc27==='win32'?_0x596f73(0x22d):_0x596f73(0x221);let _0x58c5b0=_0x138372['dirname'](_0x4ecd7f);while(!![]){if(_0x138372[_0x596f73(0x224)](_0x58c5b0)===_0x596f73(0x228)&&_0x138372['relative'](_0x58c5b0,_0x4ecd7f)===_0x3240a9){const _0x5459b5=_0x138372[_0x596f73(0x1fc)](_0x58c5b0);return _0x138372[_0x596f73(0x224)](_0x5459b5)===_0x596f73(0x1f0)?_0x138372['dirname'](_0x5459b5):_0x5459b5;}const _0x25f2b=_0x138372['dirname'](_0x58c5b0);if(_0x25f2b===_0x58c5b0)return null;_0x58c5b0=_0x25f2b;}}function runNpmInstall(_0x40502b,_0xef4425,_0x2cda15){const _0x36c371=a83_0x3bd49f;console['log']('*\x20'+[_0x40502b,..._0xef4425]['join']('\x20'));const _0x49de70=spawnSync(_0x40502b,_0xef4425,{'cwd':process[_0x36c371(0x1fe)](),'stdio':_0x36c371(0x227),'env':process.env,'shell':![]}),_0x6f9c0c=_0x49de70[_0x36c371(0x200)]?_0x49de70[_0x36c371(0x200)][_0x36c371(0x223)]()['trim']():'',_0x52d338=_0x49de70[_0x36c371(0x211)]?_0x49de70[_0x36c371(0x211)][_0x36c371(0x223)]()[_0x36c371(0x20a)]():'';if(!_0x2cda15){if(_0x52d338)process[_0x36c371(0x211)][_0x36c371(0x230)](_0x52d338+'\x0a');if(_0x6f9c0c)process['stderr'][_0x36c371(0x230)](_0x6f9c0c+'\x0a');}if(_0x49de70[_0x36c371(0x207)]===0x0)return{'ok':!![]};const _0x49de5f=_0x49de70[_0x36c371(0x220)]?.['message']||_0x6f9c0c||_0x52d338||_0x36c371(0x225)+(_0x49de70['status']??'unknown');return{'ok':![],'error':_0x49de5f};}function isNpmPrefixPermissionError(_0x10e00a){return Boolean(_0x10e00a&&/\b(?:EACCES|EPERM)\b/['test'](_0x10e00a));}function repairCurrentBuiltinSkill(_0x40e35a){const _0x53f739=a83_0x3bd49f;console[_0x53f739(0x216)](_0x53f739(0x20c));const _0xc9edfd=installBuiltinSkill({'stdio':_0x40e35a?_0x53f739(0x227):'inherit'});if(_0xc9edfd['ok'])return console['log'](_0x53f739(0x1e7)+_0xc9edfd['skillVersion']+_0x53f739(0x1e8)),!![];return console[_0x53f739(0x215)](_0x53f739(0x236)+(_0xc9edfd[_0x53f739(0x205)]||'INSTALL_FAILED')+_0x53f739(0x233)+(_0xc9edfd[_0x53f739(0x220)]||_0x53f739(0x1e6))),console[_0x53f739(0x216)](_0x53f739(0x21b)+_0xc9edfd[_0x53f739(0x1fb)]),![];}function verifyUpdatedBuiltinSkill(_0x30b5fe){const _0x15a9cc=a83_0x3bd49f;console[_0x15a9cc(0x216)](_0x15a9cc(0x20c));const _0x201b6d=inspectInstalledBuiltinSkillVersion(_0x30b5fe);if(_0x201b6d[_0x15a9cc(0x1ed)]===_0x15a9cc(0x238))return console['log']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x30b5fe+_0x15a9cc(0x1e8)),!![];console[_0x15a9cc(0x215)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x201b6d[_0x15a9cc(0x1ed)]+'.');if(_0x201b6d['reason'])console[_0x15a9cc(0x215)]('\x20\x20'+_0x201b6d[_0x15a9cc(0x1ea)]);return console['log'](_0x15a9cc(0x21b)+_0x201b6d[_0x15a9cc(0x1fb)]),![];}async function execute(_0x45a0c5){const _0x46eca2=a83_0x3bd49f;await validateUpdateFlags(_0x45a0c5);const _0x3250ac=getCliVersion();console[_0x46eca2(0x216)](_0x46eca2(0x1f9)+_0x3250ac),console['log'](_0x46eca2(0x21c));const _0x33376f=await resolveTargetVersion(_0x45a0c5);if(!_0x33376f){const _0x471cad=_0x45a0c5[_0x46eca2(0x202)]('beta')?_0x46eca2(0x22b):_0x46eca2(0x226),_0x47f400='Unable\x20to\x20resolve\x20'+_0x471cad+_0x46eca2(0x1ff);return console['warn'](_0x47f400),console[_0x46eca2(0x216)](_0x46eca2(0x1ec)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x471cad),{'ok':![]};}const _0x22be6a=[_0x3250ac,_0x33376f['version']][_0x46eca2(0x22e)](_0x3ba934=>!a83_0x172b6f[_0x46eca2(0x235)](_0x3ba934));if(_0x22be6a)return console[_0x46eca2(0x215)](_0x46eca2(0x20b)+_0x22be6a+'.'),{'ok':![]};if(!shouldInstallTarget(_0x3250ac,_0x33376f)){const _0xaaec98=_0x33376f['source']===_0x46eca2(0x212)?_0x46eca2(0x1fd)+_0x33376f[_0x46eca2(0x212)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x33376f[_0x46eca2(0x212)]+').';return console[_0x46eca2(0x216)](_0xaaec98),{'ok':repairCurrentBuiltinSkill(_0x45a0c5[_0x46eca2(0x218)])};}console[_0x46eca2(0x216)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x3250ac+_0x46eca2(0x231)+_0x33376f[_0x46eca2(0x212)]);const _0x2a24f5=installCliPackage(_0x33376f[_0x46eca2(0x212)],_0x45a0c5['nonInteractive']);if(!_0x2a24f5['ok']){const _0x66db79=_0x46eca2(0x237)+(_0x2a24f5['error']||_0x46eca2(0x1e6));return console['error'](_0x66db79),console[_0x46eca2(0x216)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x33376f[_0x46eca2(0x212)]),{'ok':![]};}return console[_0x46eca2(0x216)]('Updated\x20to\x20v'+_0x33376f[_0x46eca2(0x212)]+'.'),console[_0x46eca2(0x216)](_0x46eca2(0x20f)),{'ok':verifyUpdatedBuiltinSkill(_0x33376f['version'])};}function a83_0x5ba7(_0x736f25,_0x57dedf){_0x736f25=_0x736f25-0x1e6;const _0x4ee0f9=a83_0x4ee0();let _0x5ba706=_0x4ee0f9[_0x736f25];return _0x5ba706;}export const updateDefinition={'service':a83_0x3bd49f(0x1eb),'command':a83_0x3bd49f(0x1f7),'description':a83_0x3bd49f(0x222)+CLI_BIN_NAME+a83_0x3bd49f(0x208),'risk':a83_0x3bd49f(0x209),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a83_0x17c1c8=a83_0x2ad2;(function(_0x266dc8,_0x9ce311){const _0x2299e2=a83_0x2ad2,_0x4cb1dd=_0x266dc8();while(!![]){try{const _0x1caf5e=-parseInt(_0x2299e2(0x1c9))/0x1*(-parseInt(_0x2299e2(0x1f8))/0x2)+parseInt(_0x2299e2(0x205))/0x3+parseInt(_0x2299e2(0x201))/0x4+parseInt(_0x2299e2(0x212))/0x5*(parseInt(_0x2299e2(0x1ef))/0x6)+parseInt(_0x2299e2(0x1d1))/0x7*(parseInt(_0x2299e2(0x1f0))/0x8)+-parseInt(_0x2299e2(0x1ee))/0x9+-parseInt(_0x2299e2(0x202))/0xa;if(_0x1caf5e===_0x9ce311)break;else _0x4cb1dd['push'](_0x4cb1dd['shift']());}catch(_0x4c3585){_0x4cb1dd['push'](_0x4cb1dd['shift']());}}}(a83_0x8f50,0xa31d1));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a83_0x38cd5e 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_0x17c1c8(0x1bb),'type':a83_0x17c1c8(0x1e9),'description':a83_0x17c1c8(0x1f3),'default':![]},{'name':a83_0x17c1c8(0x20d),'type':a83_0x17c1c8(0x1e9),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a83_0x17c1c8(0x1c0),'type':'string','description':a83_0x17c1c8(0x1c5)}];function getRequestedVersion(_0x20fa4f){const _0x3d49d4=a83_0x17c1c8,_0x651ee3=_0x20fa4f[_0x3d49d4(0x1ca)]('version')[_0x3d49d4(0x1be)]();if(_0x651ee3)return _0x651ee3;return String(_0x20fa4f[_0x3d49d4(0x1f1)]?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x337120){const _0x29e1be=a83_0x17c1c8,_0x300b05=getRequestedVersion(_0x337120),_0x2db16b=[_0x337120[_0x29e1be(0x1e6)](_0x29e1be(0x1bb))?_0x29e1be(0x1bb):'',_0x337120[_0x29e1be(0x1e6)](_0x29e1be(0x20d))?_0x29e1be(0x20d):'',_0x300b05?_0x29e1be(0x1c0):''][_0x29e1be(0x1fe)](Boolean);if(_0x2db16b[_0x29e1be(0x1f7)]>0x1)throw CliErrors['validation'](_0x29e1be(0x1ff),_0x29e1be(0x1d4));if(_0x300b05&&!a83_0x38cd5e[_0x29e1be(0x200)](_0x300b05))throw CliErrors[_0x29e1be(0x1f9)](_0x29e1be(0x20a)+_0x300b05,_0x29e1be(0x1e8));}async function fetchNpmDistTags(){const _0x5758a8=a83_0x17c1c8;try{const _0xab30da=NPM_REGISTRY_BASE_URL+_0x5758a8(0x1b9)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x5758a8(0x1fd),_0x2f654f=await fetch(_0xab30da,{'signal':AbortSignal[_0x5758a8(0x1f6)](0x2710)});if(!_0x2f654f['ok'])return null;const _0x1734c7=await _0x2f654f[_0x5758a8(0x1dd)]();if(!_0x1734c7||typeof _0x1734c7!=='object')return null;return Object[_0x5758a8(0x1c8)](Object[_0x5758a8(0x1c7)](_0x1734c7)[_0x5758a8(0x1fe)](([,_0x365b30])=>typeof _0x365b30==='string'&&_0x365b30[_0x5758a8(0x1be)]())[_0x5758a8(0x1cd)](([_0x4d3d8a,_0x209e92])=>[_0x4d3d8a,String(_0x209e92)[_0x5758a8(0x1be)]()]));}catch{return null;}}function a83_0x2ad2(_0x3550e9,_0x14b411){_0x3550e9=_0x3550e9-0x1b8;const _0x8f50cb=a83_0x8f50();let _0x2ad2fa=_0x8f50cb[_0x3550e9];return _0x2ad2fa;}async function resolveTargetVersion(_0x3848f9){const _0x47c27f=a83_0x17c1c8,_0x297b7d=getRequestedVersion(_0x3848f9);if(_0x297b7d)return{'version':_0x297b7d,'source':'version'};const _0x56202c=_0x3848f9[_0x47c27f(0x1e6)](_0x47c27f(0x20d))?'beta':'latest',_0x436a80=await fetchNpmDistTags(),_0x306542=_0x436a80?.[_0x56202c];if(!_0x306542)return null;return{'version':_0x306542,'source':_0x56202c};}function shouldInstallTarget(_0x25d7fa,_0x32841d){const _0x543105=a83_0x17c1c8;if(_0x32841d[_0x543105(0x1fc)]==='version'||_0x32841d[_0x543105(0x1fc)]===_0x543105(0x20d))return!a83_0x38cd5e['eq'](_0x25d7fa,_0x32841d[_0x543105(0x1c0)]);return a83_0x38cd5e['lt'](_0x25d7fa,_0x32841d[_0x543105(0x1c0)]);}export function installCliPackage(_0x4d3e82,_0x39f906,_0x2fb0ad=resolveCurrentCliNpmPrefix()){const _0x464d17=a83_0x17c1c8,_0x547b2a=resolveNpmBin('npm'),_0x4e8d38=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4d3e82,_0x509b4b=[_0x464d17(0x1da),'-g',_0x4e8d38],_0x173090=runNpmInstall(_0x547b2a,_0x509b4b,_0x39f906);if(_0x173090['ok']||!isNpmPrefixPermissionError(_0x173090[_0x464d17(0x1eb)]))return _0x173090;if(!_0x2fb0ad||_0x173090['error']?.[_0x464d17(0x204)]()[_0x464d17(0x1cb)](_0x2fb0ad[_0x464d17(0x204)]()))return _0x173090;return console[_0x464d17(0x1d7)](_0x464d17(0x1f4)+_0x2fb0ad),runNpmInstall(_0x547b2a,[..._0x509b4b,_0x464d17(0x207),_0x2fb0ad],_0x39f906);}export function resolveCurrentCliNpmPrefix(_0x1638f9=fileURLToPath(import.meta.url),_0x4dbc84=process[a83_0x17c1c8(0x1e7)]){const _0x192c47=a83_0x17c1c8,_0x1a8a18=_0x4dbc84===_0x192c47(0x1c2)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x18a3c4=_0x1a8a18['dirname'](_0x1a8a18['dirname'](_0x1a8a18['dirname'](_0x1638f9))),_0x3652c1=_0x4dbc84===_0x192c47(0x1c2)?'@lovrabet\x5clovrabet-cli':_0x192c47(0x1e5);let _0x5436dd=_0x1a8a18[_0x192c47(0x20c)](_0x18a3c4);while(!![]){if(_0x1a8a18[_0x192c47(0x1e1)](_0x5436dd)==='node_modules'&&_0x1a8a18[_0x192c47(0x1e2)](_0x5436dd,_0x18a3c4)===_0x3652c1){const _0x390530=_0x1a8a18['dirname'](_0x5436dd);return _0x1a8a18[_0x192c47(0x1e1)](_0x390530)===_0x192c47(0x206)?_0x1a8a18[_0x192c47(0x20c)](_0x390530):_0x390530;}const _0x25490e=_0x1a8a18['dirname'](_0x5436dd);if(_0x25490e===_0x5436dd)return null;_0x5436dd=_0x25490e;}}function runNpmInstall(_0x6c8276,_0x3650bc,_0x26d0ce){const _0x2a7f2a=a83_0x17c1c8;console[_0x2a7f2a(0x1ba)]('*\x20'+[_0x6c8276,..._0x3650bc][_0x2a7f2a(0x1ce)]('\x20'));const _0x28529e=spawnSync(_0x6c8276,_0x3650bc,{'cwd':process[_0x2a7f2a(0x1cf)](),'stdio':_0x2a7f2a(0x1d6),'env':process.env,'shell':![]}),_0x12b4e1=_0x28529e[_0x2a7f2a(0x1d2)]?_0x28529e[_0x2a7f2a(0x1d2)]['toString']()['trim']():'',_0x3ad0ce=_0x28529e[_0x2a7f2a(0x1ec)]?_0x28529e[_0x2a7f2a(0x1ec)][_0x2a7f2a(0x1ea)]()[_0x2a7f2a(0x1be)]():'';if(!_0x26d0ce){if(_0x3ad0ce)process[_0x2a7f2a(0x1ec)]['write'](_0x3ad0ce+'\x0a');if(_0x12b4e1)process[_0x2a7f2a(0x1d2)]['write'](_0x12b4e1+'\x0a');}if(_0x28529e[_0x2a7f2a(0x1f2)]===0x0)return{'ok':!![]};const _0x45dfb0=_0x28529e['error']?.[_0x2a7f2a(0x1d3)]||_0x12b4e1||_0x3ad0ce||_0x2a7f2a(0x1bd)+(_0x28529e[_0x2a7f2a(0x1f2)]??_0x2a7f2a(0x1fa));return{'ok':![],'error':_0x45dfb0};}function isNpmPrefixPermissionError(_0xd79907){const _0x2da08a=a83_0x17c1c8;return Boolean(_0xd79907&&/\b(?:EACCES|EPERM)\b/[_0x2da08a(0x1dc)](_0xd79907));}function repairCurrentBuiltinSkill(_0x459d56){const _0x4003c6=a83_0x17c1c8;console['log'](_0x4003c6(0x1fb));const _0x1e005b=installBuiltinSkill({'stdio':_0x459d56?'pipe':_0x4003c6(0x1db)});if(_0x1e005b['ok'])return console[_0x4003c6(0x1ba)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x1e005b[_0x4003c6(0x1bf)]+'\x20is\x20current.'),!![];return console[_0x4003c6(0x1d7)](_0x4003c6(0x209)+(_0x1e005b[_0x4003c6(0x1cc)]||_0x4003c6(0x1e3))+']:\x20'+(_0x1e005b[_0x4003c6(0x1eb)]||_0x4003c6(0x1fa))),console[_0x4003c6(0x1ba)](_0x4003c6(0x1d8)+_0x1e005b[_0x4003c6(0x1c4)]),![];}function verifyUpdatedBuiltinSkill(_0x4df8d){const _0x23e799=a83_0x17c1c8;console[_0x23e799(0x1ba)](_0x23e799(0x1fb));const _0x1501dd=inspectInstalledBuiltinSkillVersion(_0x4df8d);if(_0x1501dd[_0x23e799(0x203)]===_0x23e799(0x211))return console[_0x23e799(0x1ba)](_0x23e799(0x1ed)+_0x4df8d+_0x23e799(0x20e)),!![];console[_0x23e799(0x1d7)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x1501dd[_0x23e799(0x203)]+'.');if(_0x1501dd['reason'])console[_0x23e799(0x1d7)]('\x20\x20'+_0x1501dd[_0x23e799(0x20b)]);return console[_0x23e799(0x1ba)](_0x23e799(0x1d8)+_0x1501dd[_0x23e799(0x1c4)]),![];}async function execute(_0x96bdfe){const _0x58547d=a83_0x17c1c8;await validateUpdateFlags(_0x96bdfe);const _0x1fd523=getCliVersion();console[_0x58547d(0x1ba)](_0x58547d(0x1d5)+_0x1fd523),console['log'](_0x58547d(0x1c1));const _0x395cd9=await resolveTargetVersion(_0x96bdfe);if(!_0x395cd9){const _0x4062aa=_0x96bdfe['bool'](_0x58547d(0x20d))?_0x58547d(0x20d):_0x58547d(0x1bb),_0x1d6c8b='Unable\x20to\x20resolve\x20'+_0x4062aa+_0x58547d(0x210);return console[_0x58547d(0x1d7)](_0x1d6c8b),console[_0x58547d(0x1ba)](_0x58547d(0x1bc)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4062aa),{'ok':![]};}const _0x34d646=[_0x1fd523,_0x395cd9[_0x58547d(0x1c0)]][_0x58547d(0x1f5)](_0x559b45=>!a83_0x38cd5e[_0x58547d(0x200)](_0x559b45));if(_0x34d646)return console[_0x58547d(0x1d7)](_0x58547d(0x1d0)+_0x34d646+'.'),{'ok':![]};if(!shouldInstallTarget(_0x1fd523,_0x395cd9)){const _0x174079=_0x395cd9['source']===_0x58547d(0x1c0)?_0x58547d(0x1e4)+_0x395cd9[_0x58547d(0x1c0)]+').':_0x58547d(0x1b8)+_0x395cd9[_0x58547d(0x1c0)]+').';return console[_0x58547d(0x1ba)](_0x174079),{'ok':repairCurrentBuiltinSkill(_0x96bdfe[_0x58547d(0x1c6)])};}console[_0x58547d(0x1ba)](_0x58547d(0x1df)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x1fd523+'\x20->\x20'+_0x395cd9[_0x58547d(0x1c0)]);const _0x1e7e05=installCliPackage(_0x395cd9[_0x58547d(0x1c0)],_0x96bdfe[_0x58547d(0x1c6)]);if(!_0x1e7e05['ok']){const _0x2018c3='Update\x20failed:\x20'+(_0x1e7e05['error']||_0x58547d(0x1fa));return console[_0x58547d(0x1eb)](_0x2018c3),console[_0x58547d(0x1ba)](_0x58547d(0x20f)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x395cd9[_0x58547d(0x1c0)]),{'ok':![]};}return console[_0x58547d(0x1ba)](_0x58547d(0x208)+_0x395cd9['version']+'.'),console[_0x58547d(0x1ba)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),{'ok':verifyUpdatedBuiltinSkill(_0x395cd9[_0x58547d(0x1c0)])};}function a83_0x8f50(){const _0x170149=['cwd','Version\x20comparison\x20failed:\x20','120141TRfTSB','stderr','message','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','Current\x20version:\x20','pipe','warn','\x20\x20Run\x20manually:\x20','read','install','inherit','test','json','update','Updating\x20','\x20CLI','basename','relative','INSTALL_FAILED','Already\x20on\x20requested\x20version\x20(v','@lovrabet/lovrabet-cli','bool','platform','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','boolean','toString','error','stdout','\x20\x20CLI\x20Built-in\x20Skill\x20','3949947iEeela','21606JMuvdM','424oChEsQ','args','status','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','find','timeout','length','644AcJxJT','validation','unknown','Checking\x20CLI\x20Built-in\x20Skill...','source','/dist-tags','filter','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','valid','3640804EslsEH','39012710UWRHos','state','toLowerCase','3790482Zpngcx','lib','--prefix','Updated\x20to\x20v','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Invalid\x20version:\x20','reason','dirname','beta','\x20is\x20current.','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','\x20version\x20from\x20npm.','current','1475JTQbpk','Already\x20up\x20to\x20date\x20(v','/-/package/','log','latest','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','exit\x20','trim','skillVersion','version','Checking\x20npm\x20dist-tags...','win32','run','repairCommand','Install\x20a\x20specific\x20CLI\x20version','nonInteractive','entries','fromEntries','2679loJnUB','str','includes','code','map','join'];a83_0x8f50=function(){return _0x170149;};return a83_0x8f50();}export const updateDefinition={'service':a83_0x17c1c8(0x1de),'command':a83_0x17c1c8(0x1c3),'description':'从\x20npm\x20更新\x20'+CLI_BIN_NAME+a83_0x17c1c8(0x1e0),'risk':a83_0x17c1c8(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x2f17e1=a84_0x42cb;(function(_0x26dce6,_0x12ad4b){const _0x422cb3=a84_0x42cb,_0x174b4d=_0x26dce6();while(!![]){try{const _0x596488=parseInt(_0x422cb3(0x122))/0x1*(parseInt(_0x422cb3(0x130))/0x2)+parseInt(_0x422cb3(0x125))/0x3+-parseInt(_0x422cb3(0x120))/0x4+parseInt(_0x422cb3(0x126))/0x5+-parseInt(_0x422cb3(0x136))/0x6*(-parseInt(_0x422cb3(0x12f))/0x7)+-parseInt(_0x422cb3(0x121))/0x8*(-parseInt(_0x422cb3(0x12d))/0x9)+-parseInt(_0x422cb3(0x129))/0xa;if(_0x596488===_0x12ad4b)break;else _0x174b4d['push'](_0x174b4d['shift']());}catch(_0x1e75e){_0x174b4d['push'](_0x174b4d['shift']());}}}(a84_0x222d,0x932f9));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a84_0x2f17e1(0x12b),SUPPORTED_PROVIDERS=[a84_0x2f17e1(0x133)];function a84_0x222d(){const _0x335462=['POST','(empty)','dingtalk','str','string','408PCJvez','External\x20account\x20binding\x20was\x20not\x20confirmed.','External\x20account\x20provider','apiError','provider','trim','将当前\x20AccessKey\x20所属的平台用户绑定到指定协同生态外部账号;已有同\x20provider\x20绑定可能被替换。','validation','account-id','4411700heUtdL','699272NDmQQQ','57262XXbHSP','includes','join','1183965sUDldP','1313710GyGBuQ','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','7218140azolHK','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','toLowerCase','45JtjfjY','bind','107765YfmLaR','10YVKCUB'];a84_0x222d=function(){return _0x335462;};return a84_0x222d();}function a84_0x42cb(_0x2ffae9,_0x5bcd7a){_0x2ffae9=_0x2ffae9-0x11d;const _0x222d5c=a84_0x222d();let _0x42cb4a=_0x222d5c[_0x2ffae9];return _0x42cb4a;}function readBindingInput(_0x155acc){const _0x4ea4ab=a84_0x2f17e1,_0x24081c=_0x155acc[_0x4ea4ab(0x134)](_0x4ea4ab(0x13a))[_0x4ea4ab(0x13b)]()[_0x4ea4ab(0x12c)]();if(!SUPPORTED_PROVIDERS[_0x4ea4ab(0x123)](_0x24081c))throw CliErrors['validation']('Unsupported\x20provider:\x20'+(_0x24081c||_0x4ea4ab(0x132))+'.','Pass\x20one\x20of:\x20'+SUPPORTED_PROVIDERS[_0x4ea4ab(0x124)](',\x20')+'.');const _0x3810c1=_0x155acc[_0x4ea4ab(0x134)](_0x4ea4ab(0x11f))['trim']();if(!_0x3810c1)throw CliErrors[_0x4ea4ab(0x11e)]('--account-id\x20cannot\x20be\x20empty.',_0x4ea4ab(0x127));return{'provider':_0x24081c,'accountId':_0x3810c1};}function buildBindingData(_0x4db67e,_0x4d7e66,_0x59bdb3){const _0x2dd189=a84_0x2f17e1;return{'operation':_0x2dd189(0x12e),'selector':{'provider':_0x4db67e,'accountId':_0x4d7e66},'before':null,'after':{'provider':_0x4db67e,'accountId':_0x4d7e66,'bound':!![]},'dryRun':_0x59bdb3,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':'user-account','command':a84_0x2f17e1(0x12e),'description':'Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','risk':'write','confirmationDescription':a84_0x2f17e1(0x11d),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':'provider','type':a84_0x2f17e1(0x135),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a84_0x2f17e1(0x138)},{'name':a84_0x2f17e1(0x11f),'type':a84_0x2f17e1(0x135),'required':!![],'description':a84_0x2f17e1(0x12a)}],async 'validate'(_0x46f88a){readBindingInput(_0x46f88a);},async 'dryRun'(_0x3ada48){const _0x4a2eb5=a84_0x2f17e1,{provider:_0x444596,accountId:_0xde54ef}=readBindingInput(_0x3ada48);return{...buildBindingData(_0x444596,_0xde54ef,!![]),'method':_0x4a2eb5(0x131),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x444596,'accountId':_0xde54ef}};},async 'execute'(_0x272715){const _0x19b242=a84_0x2f17e1,{provider:_0x3b8650,accountId:_0x5be477}=readBindingInput(_0x272715),_0x3fa46c=await bindExternalUserAccount(_0x3b8650,_0x5be477);if(_0x3fa46c!==!![])throw CliErrors[_0x19b242(0x139)](_0x19b242(0x137),_0x19b242(0x128));return{'ok':!![],'data':buildBindingData(_0x3b8650,_0x5be477,![]),'message':'Bound\x20current\x20user\x20to\x20external\x20provider\x20account.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a85_0x1c3a(_0x2ce5f3,_0x39243f){_0x2ce5f3=_0x2ce5f3-0x142;const _0x2ee612=a85_0x2ee6();let _0x1c3a65=_0x2ee612[_0x2ce5f3];return _0x1c3a65;}(function(_0x15fdeb,_0x21c8b8){const _0x102fc5=a85_0x1c3a,_0x58bef7=_0x15fdeb();while(!![]){try{const _0x40a163=-parseInt(_0x102fc5(0x143))/0x1*(parseInt(_0x102fc5(0x145))/0x2)+parseInt(_0x102fc5(0x144))/0x3+-parseInt(_0x102fc5(0x147))/0x4*(parseInt(_0x102fc5(0x14a))/0x5)+parseInt(_0x102fc5(0x148))/0x6+parseInt(_0x102fc5(0x14b))/0x7*(parseInt(_0x102fc5(0x14c))/0x8)+parseInt(_0x102fc5(0x146))/0x9*(parseInt(_0x102fc5(0x142))/0xa)+parseInt(_0x102fc5(0x149))/0xb;if(_0x40a163===_0x21c8b8)break;else _0x58bef7['push'](_0x58bef7['shift']());}catch(_0x2ab95a){_0x58bef7['push'](_0x58bef7['shift']());}}}(a85_0x2ee6,0x238a9));import{bindUserAccount}from'../../commands/user-account/bind.js';function a85_0x2ee6(){const _0x459fc7=['22776BqeRcT','714054vDiBjH','1335kAqfQo','14laJRJW','254368tlSBeQ','1468190lGYWal','10357RlAPgE','148686GufwDL','2XMlDeb','9PIDFqt','2588ohDTTK'];a85_0x2ee6=function(){return _0x459fc7;};return a85_0x2ee6();}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x3d0774=a86_0x3aab;(function(_0x91adef,_0x3b15be){const _0x2e469f=a86_0x3aab,_0x47199f=_0x91adef();while(!![]){try{const _0x26363b=parseInt(_0x2e469f(0xad))/0x1*(parseInt(_0x2e469f(0xa4))/0x2)+-parseInt(_0x2e469f(0x80))/0x3*(parseInt(_0x2e469f(0xa5))/0x4)+parseInt(_0x2e469f(0xaa))/0x5*(parseInt(_0x2e469f(0x95))/0x6)+-parseInt(_0x2e469f(0x90))/0x7*(parseInt(_0x2e469f(0x98))/0x8)+-parseInt(_0x2e469f(0x7e))/0x9+parseInt(_0x2e469f(0xae))/0xa*(parseInt(_0x2e469f(0x81))/0xb)+parseInt(_0x2e469f(0x8e))/0xc*(parseInt(_0x2e469f(0x8d))/0xd);if(_0x26363b===_0x3b15be)break;else _0x47199f['push'](_0x47199f['shift']());}catch(_0x164ae1){_0x47199f['push'](_0x47199f['shift']());}}}(a86_0x14af,0x884aa));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';function a86_0x14af(){const _0x363217=['defaultApp','filter','5OlPoYi','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','env','1ZxrElg','20ocBwza','Usage:\x20','Target\x20environment','str','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','Missing\x20workspace\x20app\x20selector.','items','object','command','includes','appCode','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','\x22\x20not\x20found.','envName','write','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','\x20workspace\x20','app','App\x20code\x20to\x20bind\x20directly','../../core/api-client.js','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','\x22.\x20Allowed:\x20','apps','修改当前工作目录已有绑定的应用上下文','3944763LGNAuA','accessKey','1219011SPwAvn','3888643ZRoxFA','为尚未绑定应用的当前工作目录初始化应用上下文','map','appName','isArray','workspace','appcode','length','Invalid\x20env\x20\x22','\x20--appcode\x20<code>\x20[--env\x20daily]','Conflicting\x20workspace\x20app\x20selectors.','trim','13gUdtwM','952284ysLDcy','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','7GofZiN','将在尚未绑定应用的当前工作目录写入\x20Lovrabet\x20项目配置,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','from','Workspace\x20app\x20context\x20is\x20not\x20initialized.','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','5211174GhJXUE','validation','Use\x20`','4380472GtKIdx','string','init','Run\x20`','Workspace\x20app\x20context\x20is\x20already\x20initialized.','将更新当前工作目录已有的应用绑定,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','\x0aEnv:\x20','use','App\x20\x22','Available\x20apps:\x20','../../commands/app/remote-source.js','shouldWriteEnv','1403756hPiDNu','8eDcRix','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20'];a86_0x14af=function(){return _0x363217;};return a86_0x14af();}const WORKSPACE_USE_FLAGS=[{'name':a86_0x3d0774(0xbf),'type':a86_0x3d0774(0x99),'description':a86_0x3d0774(0xbd)},{'name':a86_0x3d0774(0x87),'type':'string','description':a86_0x3d0774(0xc0)},{'name':a86_0x3d0774(0xac),'type':'string','description':a86_0x3d0774(0xb0),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x3fa4b4,_0x10e05e){const _0x1a17b5=a86_0x3d0774,_0x3fbb85=_0x3fa4b4[_0x1a17b5(0xb1)]('app')['trim'](),_0x5d9dcc=_0x3fa4b4['str']('appcode')[_0x1a17b5(0x8c)](),_0x3f7aa9=_0x3fa4b4[_0x1a17b5(0xb1)](_0x1a17b5(0xac))['trim'](),_0x4abcf7=resolveWorkspaceEnv(_0x3f7aa9||_0x3fa4b4[_0x1a17b5(0xbb)]||DEFAULT_CONFIG_VALUES['env']);if(!_0x3fbb85&&!_0x5d9dcc)throw CliErrors[_0x1a17b5(0x96)](_0x1a17b5(0xb3),_0x1a17b5(0xaf)+CLI_BIN_NAME+'\x20workspace\x20'+_0x10e05e+_0x1a17b5(0xa7)+CLI_BIN_NAME+_0x1a17b5(0xbe)+_0x10e05e+_0x1a17b5(0x8a));if(_0x3fbb85&&_0x5d9dcc)throw CliErrors['validation'](_0x1a17b5(0x8b),_0x1a17b5(0xab));const _0x4a1deb=resolveWriteConfigPath('project'),_0x542a9e=readConfigFile(_0x4a1deb);assertWorkspaceCommandState(_0x10e05e,_0x542a9e);const _0x11405b=_0x5d9dcc||await resolveRemoteAppCode({'command':_0x10e05e,'appName':_0x3fbb85,'env':_0x4abcf7,'accessKey':_0x3fa4b4[_0x1a17b5(0x7f)]});return writeWorkspaceConfig({'command':_0x10e05e,'appName':_0x3fbb85,'appcode':_0x11405b,'env':_0x4abcf7,'shouldWriteEnv':!!_0x3f7aa9,'accessKey':_0x3fa4b4['accessKey']},_0x4a1deb,_0x542a9e),{'ok':!![],'data':{'configPath':_0x4a1deb,'app':_0x3fbb85||null,'appcode':_0x11405b,'env':_0x3f7aa9?_0x4abcf7:null,'accessKeyWritten':![],'command':'workspace\x20'+_0x10e05e},'message':buildWorkspaceMessage(_0x4a1deb,_0x3fbb85,_0x11405b,_0x3f7aa9?_0x4abcf7:undefined)};}async function resolveRemoteAppCode(_0x286028){const _0x46b489=a86_0x3d0774;if(!_0x286028[_0x46b489(0x7f)])throw CliErrors['authRequired'](_0x46b489(0xb2)+CLI_BIN_NAME+_0x46b489(0xbe)+_0x286028[_0x46b489(0xb6)]+'.');const {setActiveAK:_0xbc1e04}=await import(_0x46b489(0x79)),{getRemoteAppList:_0x56ffec}=await import(_0x46b489(0xa2));_0xbc1e04(_0x286028[_0x46b489(0x7f)]);const _0xe37e07=await _0x56ffec({'env':_0x286028['env'],'accessKey':_0x286028[_0x46b489(0x7f)],'noCache':![]}),_0x382846=findAppByName(_0xe37e07[_0x46b489(0xb4)],_0x286028[_0x46b489(0x84)]);if(_0x382846&&!isRuntimeAccessibleApp(_0x382846))throw runtimeInaccessibleAppError(_0x382846,'\x22'+_0x286028[_0x46b489(0x84)]+'\x22');const _0x147fb5=_0x382846?.[_0x46b489(0xb8)]?.[_0x46b489(0x8c)]();if(_0x147fb5)return _0x147fb5;const _0x16dd67=_0xe37e07[_0x46b489(0xb4)][_0x46b489(0x83)](_0x8d6ce2=>_0x8d6ce2['appName'])[_0x46b489(0xa9)](Boolean),_0x3acd3e=_0x16dd67[_0x46b489(0x88)]?_0x46b489(0xa1)+Array[_0x46b489(0x92)](new Set(_0x16dd67))['join'](',\x20')+'.':_0x46b489(0x9b)+CLI_BIN_NAME+_0x46b489(0x8f);throw CliErrors['validation'](_0x46b489(0xa0)+_0x286028[_0x46b489(0x84)]+_0x46b489(0xba),_0x3acd3e);}function writeWorkspaceConfig(_0xed1c1,_0x554704,_0x2d3f87){const _0x30e910=a86_0x3d0774;_0xed1c1[_0x30e910(0xa3)]&&(_0x2d3f87[_0x30e910(0xac)]=_0xed1c1[_0x30e910(0xac)]);if(_0xed1c1[_0x30e910(0x84)]){const _0x586f89=isRecord(_0x2d3f87[_0x30e910(0x7c)])?{..._0x2d3f87['apps']}:{},_0x5b3f3d=isRecord(_0x586f89[_0xed1c1[_0x30e910(0x84)]])?_0x586f89[_0xed1c1[_0x30e910(0x84)]]:{};return _0x586f89[_0xed1c1['appName']]={..._0x5b3f3d,'appcode':_0xed1c1['appcode']},_0x2d3f87[_0x30e910(0x7c)]=_0x586f89,_0x2d3f87['defaultApp']=_0xed1c1['appName'],delete _0x2d3f87[_0x30e910(0x87)],delete _0x2d3f87[_0x30e910(0xbf)],writeAndReturn(_0x554704,_0x2d3f87);}return _0x2d3f87['appcode']=_0xed1c1[_0x30e910(0x87)],delete _0x2d3f87[_0x30e910(0xa8)],delete _0x2d3f87[_0x30e910(0xbf)],writeAndReturn(_0x554704,_0x2d3f87);}function writeAndReturn(_0x27ba24,_0xc1b5a9){return writeConfigFile(_0x27ba24,_0xc1b5a9),_0x27ba24;}function resolveWorkspaceEnv(_0x32190b){const _0xd5f4c1=a86_0x3d0774;if(RUNTIME_ENV_VALUES[_0xd5f4c1(0xb7)](_0x32190b))return _0x32190b;throw CliErrors[_0xd5f4c1(0x96)](_0xd5f4c1(0x89)+_0x32190b+_0xd5f4c1(0x7b)+RUNTIME_ENV_VALUES['join'](',\x20'));}function buildWorkspaceMessage(_0xfc8749,_0x5228cd,_0x4837d6,_0x14240d){const _0x43c9df=a86_0x3d0774,_0x47c768=_0x5228cd?_0x5228cd+'\x20('+_0x4837d6+')':_0x4837d6,_0x16b124=_0x14240d?_0x43c9df(0x9e)+_0x14240d:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0xfc8749+'\x0aDefault\x20app:\x20'+_0x47c768+_0x16b124+'\x0aAccessKey:\x20not\x20written';}function a86_0x3aab(_0x332b43,_0x504f74){_0x332b43=_0x332b43-0x79;const _0x14af47=a86_0x14af();let _0x3aab35=_0x14af47[_0x332b43];return _0x3aab35;}function isRecord(_0x22c4ad){const _0x52f040=a86_0x3d0774;return typeof _0x22c4ad===_0x52f040(0xb5)&&_0x22c4ad!==null&&!Array[_0x52f040(0x85)](_0x22c4ad);}function hasWorkspaceAppBinding(_0x2ddb2d){const _0x5c4afa=a86_0x3d0774;if(typeof _0x2ddb2d[_0x5c4afa(0x87)]==='string'&&_0x2ddb2d['appcode'][_0x5c4afa(0x8c)]()['length']>0x0)return!![];if(typeof _0x2ddb2d[_0x5c4afa(0xa8)]!==_0x5c4afa(0x99)||!_0x2ddb2d[_0x5c4afa(0xa8)]['trim']())return![];if(!isRecord(_0x2ddb2d[_0x5c4afa(0x7c)]))return![];const _0xf06304=_0x2ddb2d[_0x5c4afa(0x7c)][_0x2ddb2d['defaultApp'][_0x5c4afa(0x8c)]()];return isRecord(_0xf06304)&&typeof _0xf06304[_0x5c4afa(0x87)]===_0x5c4afa(0x99)&&_0xf06304[_0x5c4afa(0x87)][_0x5c4afa(0x8c)]()[_0x5c4afa(0x88)]>0x0;}function assertWorkspaceCommandState(_0x148b1e,_0x193ba3){const _0x4df425=a86_0x3d0774,_0x4e2444=hasWorkspaceAppBinding(_0x193ba3);if(_0x148b1e===_0x4df425(0x9a)&&_0x4e2444)throw CliErrors[_0x4df425(0x96)](_0x4df425(0x9c),_0x4df425(0x97)+CLI_BIN_NAME+_0x4df425(0xa6)+CLI_BIN_NAME+_0x4df425(0xb9));if(_0x148b1e==='use'&&!_0x4e2444)throw CliErrors[_0x4df425(0x96)](_0x4df425(0x93),_0x4df425(0x9b)+CLI_BIN_NAME+_0x4df425(0x7a)+CLI_BIN_NAME+_0x4df425(0x94));}function makeWorkspaceCommand(_0x31d5e5){const _0x2f914b=a86_0x3d0774;return{'service':_0x2f914b(0x86),'command':_0x31d5e5,'description':_0x31d5e5===_0x2f914b(0x9a)?_0x2f914b(0x82):_0x2f914b(0x7d),'risk':_0x2f914b(0xbc),'confirmationDescription':_0x31d5e5==='init'?_0x2f914b(0x91):_0x2f914b(0x9d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x44beaf){return executeWorkspaceUse(_0x44beaf,_0x31d5e5);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a86_0x3d0774(0x9a)),makeWorkspaceCommand(a86_0x3d0774(0x9f))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x23a9e4=a87_0x3ddb;(function(_0x154fd5,_0x13e359){const _0x6d5984=a87_0x3ddb,_0x1755c1=_0x154fd5();while(!![]){try{const _0x4d74a3=parseInt(_0x6d5984(0x84))/0x1+parseInt(_0x6d5984(0x8d))/0x2*(parseInt(_0x6d5984(0x8c))/0x3)+-parseInt(_0x6d5984(0x85))/0x4*(parseInt(_0x6d5984(0x79))/0x5)+-parseInt(_0x6d5984(0x71))/0x6+-parseInt(_0x6d5984(0x89))/0x7*(parseInt(_0x6d5984(0x75))/0x8)+-parseInt(_0x6d5984(0x81))/0x9+parseInt(_0x6d5984(0x72))/0xa;if(_0x4d74a3===_0x13e359)break;else _0x1755c1['push'](_0x1755c1['shift']());}catch(_0x32d221){_0x1755c1['push'](_0x1755c1['shift']());}}}(a87_0x1faa,0x45f0c));function a87_0x3ddb(_0x365ef4,_0x437109){_0x365ef4=_0x365ef4-0x70;const _0x1faa7e=a87_0x1faa();let _0x3ddb4c=_0x1faa7e[_0x365ef4];return _0x3ddb4c;}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':'Target\x20environment','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x23a9e4(0x73)],'importable':!![]},'format':{'description':a87_0x23a9e4(0x7b),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x23a9e4(0x86)],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a87_0x23a9e4(0x76),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a87_0x23a9e4(0x83),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a87_0x23a9e4(0x7d),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a87_0x23a9e4(0x7a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a87_0x23a9e4(0x77),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['riskLevel'],'importable':!![]},'locale':{'description':a87_0x23a9e4(0x87),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x23a9e4(0x74)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)['filter'](([,_0xc8cba])=>_0xc8cba[a87_0x23a9e4(0x8e)])['map'](([_0x5e5a4c])=>_0x5e5a4c));export const CONFIG_ENUM_VALUES=Object[a87_0x23a9e4(0x82)](Object[a87_0x23a9e4(0x70)](CONFIG_FIELD_SCHEMAS)[a87_0x23a9e4(0x88)](([,_0x45e9e4])=>_0x45e9e4['enumValues'])['map'](([_0x58f2ca,_0x5c1e9c])=>[_0x58f2ca,[..._0x5c1e9c['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a87_0x23a9e4(0x70)](CONFIG_FIELD_SCHEMAS)[a87_0x23a9e4(0x88)](([,_0x3e0fa6])=>_0x3e0fa6[a87_0x23a9e4(0x78)])[a87_0x23a9e4(0x8a)](([_0x3d36e7])=>_0x3d36e7);function a87_0x1faa(){const _0x75fbbb=['10038720KTdKXS','env','locale','120wkZGvq','Override\x20API\x20domain','Risk\x20level','importable','1260870wdUkaN','Access\x20key\x20(client-ak\x20auth)','Default\x20output\x20format','enumValues','Override\x20SkillHub\x20domain',';\x20local\x20alias:\x20apps.<alias>.appcode','defaultValue','has','3178458dMGSaE','fromEntries','Override\x20runtime\x20domain','10132TTzMLH','4PjEods','format','Locale','filter','124481bsCBxB','map','legacyCompatOnly','307878vxVMSd','6gGzYHo','cliSettableTopLevel','entries','979950HGhiNR'];a87_0x1faa=function(){return _0x75fbbb;};return a87_0x1faa();}export function getConfigFieldSchema(_0x4e7036){return CONFIG_FIELD_SCHEMAS[_0x4e7036];}export function getConfigEnumValues(_0x31bac7){const _0x239634=a87_0x23a9e4;return getConfigFieldSchema(_0x31bac7)?.[_0x239634(0x7c)];}export function getConfigDefaultValue(_0x335ba7){const _0x4e9a12=a87_0x23a9e4;return getConfigFieldSchema(_0x335ba7)?.[_0x4e9a12(0x7f)];}export function isTopLevelConfigKey(_0x4bdb15){const _0x5aeb30=a87_0x23a9e4;return TOP_LEVEL_CONFIG_KEYS[_0x5aeb30(0x80)](_0x4bdb15);}export function isLegacyCompatConfigKey(_0x4ed228){const _0x18bba1=a87_0x23a9e4;return getConfigFieldSchema(_0x4ed228)?.[_0x18bba1(0x8b)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x1c4909){return[..._0x1c4909]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x52b44b=a87_0x23a9e4;return'Config\x20key.\x20Top-level:\x20'+getTopLevelConfigKeySummary()+_0x52b44b(0x7e);}export function buildAppProfileListFields(_0xde65f6){return{'env':_0xde65f6,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a88_0x3659(_0x2a1545,_0x3eceea){_0x2a1545=_0x2a1545-0xa3;const _0x1867e1=a88_0x1867();let _0x36590e=_0x1867e1[_0x2a1545];return _0x36590e;}const a88_0xcdbd50=a88_0x3659;function a88_0x1867(){const _0x2fc3f9=['UNPUBLISH','3618512NlzDvJ','2148020sFGfHV','6kvCepq','PUBLISHED','50taAfnK','35166AiCirB','931495Jrduiu','932504rzEHCp','12sHryMg','2810097PGkLlL','Published','18866310kwAICL'];a88_0x1867=function(){return _0x2fc3f9;};return a88_0x1867();}(function(_0x1f43a6,_0x3d883d){const _0x287823=a88_0x3659,_0x46fe92=_0x1f43a6();while(!![]){try{const _0x1f3f2b=-parseInt(_0x287823(0xaf))/0x1*(parseInt(_0x287823(0xae))/0x2)+parseInt(_0x287823(0xac))/0x3*(parseInt(_0x287823(0xa4))/0x4)+-parseInt(_0x287823(0xa3))/0x5+parseInt(_0x287823(0xa5))/0x6*(-parseInt(_0x287823(0xab))/0x7)+-parseInt(_0x287823(0xaa))/0x8+parseInt(_0x287823(0xa6))/0x9+parseInt(_0x287823(0xa8))/0xa;if(_0x1f3f2b===_0x3d883d)break;else _0x46fe92['push'](_0x46fe92['shift']());}catch(_0x2274da){_0x46fe92['push'](_0x46fe92['shift']());}}}(a88_0x1867,0x82481));export const APP_PUBLISH_STATUS={'Published':a88_0xcdbd50(0xad),'Unpublished':a88_0xcdbd50(0xa9)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a88_0xcdbd50(0xa7)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x201c2a=a89_0x10a2;function a89_0x1013(){const _0x2b5bd4=['391956cjBnLa','5256iqDaDb','215032VCzvuo','client-ak','494362VpIfyP','81gpQuOb','321APVebW','11933196zhoUeR','6470DSUziE','4482gfIbsJ','1248uyBYfz','ClientAk','220hkoaSg','9884cbZOWl'];a89_0x1013=function(){return _0x2b5bd4;};return a89_0x1013();}function a89_0x10a2(_0x4f69bc,_0xb075ff){_0x4f69bc=_0x4f69bc-0x1d4;const _0x101350=a89_0x1013();let _0x10a27d=_0x101350[_0x4f69bc];return _0x10a27d;}(function(_0x5701c2,_0x5b1de6){const _0x5e927f=a89_0x10a2,_0x512bac=_0x5701c2();while(!![]){try{const _0xc77852=-parseInt(_0x5e927f(0x1d5))/0x1+-parseInt(_0x5e927f(0x1de))/0x2*(-parseInt(_0x5e927f(0x1db))/0x3)+parseInt(_0x5e927f(0x1df))/0x4*(-parseInt(_0x5e927f(0x1dd))/0x5)+parseInt(_0x5e927f(0x1d6))/0x6*(parseInt(_0x5e927f(0x1d4))/0x7)+parseInt(_0x5e927f(0x1d7))/0x8*(parseInt(_0x5e927f(0x1da))/0x9)+parseInt(_0x5e927f(0x1e1))/0xa*(parseInt(_0x5e927f(0x1d9))/0xb)+-parseInt(_0x5e927f(0x1dc))/0xc;if(_0xc77852===_0x5b1de6)break;else _0x512bac['push'](_0x512bac['shift']());}catch(_0x40d87f){_0x512bac['push'](_0x512bac['shift']());}}}(a89_0x1013,0xdfee1));export const AUTH_MODE={'ClientAk':a89_0x201c2a(0x1d8)};export function isAuthMode(_0x2df3fe){const _0x28b3e0=a89_0x201c2a;return _0x2df3fe===AUTH_MODE[_0x28b3e0(0x1e0)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a90_0x4c4084=a90_0x432a;(function(_0x319733,_0x2b6aaf){const _0x170a75=a90_0x432a,_0x4805ad=_0x319733();while(!![]){try{const _0x316e19=parseInt(_0x170a75(0x1fb))/0x1*(parseInt(_0x170a75(0x1fc))/0x2)+-parseInt(_0x170a75(0x219))/0x3+-parseInt(_0x170a75(0x210))/0x4*(-parseInt(_0x170a75(0x20d))/0x5)+-parseInt(_0x170a75(0x1f7))/0x6+-parseInt(_0x170a75(0x214))/0x7+parseInt(_0x170a75(0x1f1))/0x8+parseInt(_0x170a75(0x208))/0x9*(parseInt(_0x170a75(0x1f4))/0xa);if(_0x316e19===_0x2b6aaf)break;else _0x4805ad['push'](_0x4805ad['shift']());}catch(_0x6632ff){_0x4805ad['push'](_0x4805ad['shift']());}}}(a90_0x55d9,0x5a21c));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a90_0x4c4084(0x205)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a90_0x4c4084(0x209),'meowKey':'appcode','type':a90_0x4c4084(0x1ff),'description':a90_0x4c4084(0x1fd),'hint':a90_0x4c4084(0x215)},{'name':a90_0x4c4084(0x21a),'meowKey':a90_0x4c4084(0x21a),'type':'string','description':a90_0x4c4084(0x1fe),'hint':'<name>'},{'name':a90_0x4c4084(0x1fa),'meowKey':a90_0x4c4084(0x1fa),'type':a90_0x4c4084(0x1ff),'description':'Environment','hint':a90_0x4c4084(0x200)},{'name':a90_0x4c4084(0x1f2),'meowKey':'format','type':a90_0x4c4084(0x1ff),'description':'Output\x20format','hint':a90_0x4c4084(0x1f5)},{'name':'jq','meowKey':'jq','type':a90_0x4c4084(0x1ff),'description':a90_0x4c4084(0x212),'hint':'<expr>'},{'name':a90_0x4c4084(0x20f),'meowKey':a90_0x4c4084(0x204),'type':a90_0x4c4084(0x203),'description':a90_0x4c4084(0x211)},{'name':a90_0x4c4084(0x217),'meowKey':a90_0x4c4084(0x217),'type':a90_0x4c4084(0x203),'description':a90_0x4c4084(0x201)},{'name':'non-interactive','meowKey':a90_0x4c4084(0x213),'type':'boolean','description':a90_0x4c4084(0x202)},{'name':'global','meowKey':'global','type':a90_0x4c4084(0x203),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':'boolean','description':a90_0x4c4084(0x1f6),'hidden':!![]},{'name':a90_0x4c4084(0x206),'meowKey':a90_0x4c4084(0x206),'type':'boolean','description':a90_0x4c4084(0x20c)},{'name':'id','meowKey':'id','type':a90_0x4c4084(0x1ff),'description':'Record\x20ID','hidden':!![]},{'name':'name','meowKey':'name','type':a90_0x4c4084(0x1ff),'description':'Name\x20filter','hidden':!![]},{'name':a90_0x4c4084(0x218),'meowKey':a90_0x4c4084(0x218),'type':a90_0x4c4084(0x1ff),'description':a90_0x4c4084(0x1f9),'hidden':!![]},{'name':'params','meowKey':a90_0x4c4084(0x216),'type':a90_0x4c4084(0x1ff),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a90_0x4c4084(0x20a),'meowKey':a90_0x4c4084(0x20a),'type':a90_0x4c4084(0x203),'description':a90_0x4c4084(0x1f8),'hidden':!![]},{'name':a90_0x4c4084(0x1f3),'meowKey':a90_0x4c4084(0x1f3),'type':a90_0x4c4084(0x203),'description':'Clear\x20output','hidden':!![]}];function a90_0x432a(_0x2b1c13,_0x3cfd44){_0x2b1c13=_0x2b1c13-0x1f1;const _0x55d990=a90_0x55d9();let _0x432aea=_0x55d990[_0x2b1c13];return _0x432aea;}function a90_0x55d9(){const _0x347c4e=['465203iqDiUb','2XYqTJZ','Override\x20appcode','Select\x20app\x20profile\x20by\x20name','string','production\x20|\x20development\x20|\x20daily','Skip\x20confirmation\x20for\x20high-risk\x20writes','Force\x20non-interactive\x20mode\x20(CI)','boolean','dryRun','cliDisplayName','help','type','171yLbeCY','appcode','verbose','map','Show\x20help','15vQVLrC','non-interactive','dry-run','728668MLrXBR','Preview\x20operation\x20without\x20executing','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','nonInteractive','5103966NIqCLj','<code>','params','yes','sqlcode','1639611GMZeUq','app','3446384PuoBpS','format','clear','317290bFimPy','json\x20|\x20pretty\x20|\x20compress','Alias\x20for\x20--non-interactive','2402988RbuGjI','Verbose\x20output','SQL\x20query\x20code','env'];a90_0x55d9=function(){return _0x347c4e;};return a90_0x55d9();}export const PIPELINE_FLAG_NAMES=new Set(['appcode',a90_0x4c4084(0x21a),a90_0x4c4084(0x1fa),a90_0x4c4084(0x1f2),'jq',a90_0x4c4084(0x20f),a90_0x4c4084(0x217),a90_0x4c4084(0x20e),'ci']);export function buildMeowFlags(){const _0x4fa938=a90_0x4c4084;return Object['fromEntries'](GLOBAL_FLAGS[_0x4fa938(0x20b)](_0x1fa19b=>[_0x1fa19b['meowKey'],{'type':_0x1fa19b[_0x4fa938(0x207)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a91_0x4f73(){const _0x5146f7=['production','20TMaSes','en-US','main','3967209oeZFVI','702233rFcHrC','256645mnDqum','2064UBCGSM','9352sYcQlz','15198280CYeNzC','100362QOjeIs','10975173QiYWJP','compress','96lEKgpK','15BYRhXJ'];a91_0x4f73=function(){return _0x5146f7;};return a91_0x4f73();}function a91_0x5c7f(_0x502fb4,_0x257aa3){_0x502fb4=_0x502fb4-0x1d5;const _0x4f730f=a91_0x4f73();let _0x5c7f11=_0x4f730f[_0x502fb4];return _0x5c7f11;}const a91_0x3e2f79=a91_0x5c7f;(function(_0x41cebf,_0xdc1238){const _0x527819=a91_0x5c7f,_0xb9ed03=_0x41cebf();while(!![]){try{const _0x3130ef=parseInt(_0x527819(0x1e0))/0x1*(-parseInt(_0x527819(0x1dc))/0x2)+parseInt(_0x527819(0x1d9))/0x3*(-parseInt(_0x527819(0x1da))/0x4)+-parseInt(_0x527819(0x1d8))/0x5+-parseInt(_0x527819(0x1df))/0x6*(-parseInt(_0x527819(0x1d7))/0x7)+parseInt(_0x527819(0x1db))/0x8+-parseInt(_0x527819(0x1d6))/0x9*(-parseInt(_0x527819(0x1e2))/0xa)+-parseInt(_0x527819(0x1dd))/0xb;if(_0x3130ef===_0xdc1238)break;else _0xb9ed03['push'](_0xb9ed03['shift']());}catch(_0x2eb586){_0xb9ed03['push'](_0xb9ed03['shift']());}}}(a91_0x4f73,0xee520));export const DEFAULT_APP_PROFILE_NAME=a91_0x3e2f79(0x1d5);export const DEFAULT_CONFIG_VALUES={'env':a91_0x3e2f79(0x1e1),'format':a91_0x3e2f79(0x1de),'locale':a91_0x3e2f79(0x1e3),'riskLevel':'write'};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a91_0x3e2f79(0x1de);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a92_0x1132(){const _0x1d1ed3=['246NBycNN','4586620MWYOzP','3292KDRQIm','9pHoyEm','119WYKfZM','npmPackageName','33195720AImefb','125824AonqSm','skillSource','266288MZGerU','3963EaQcRJ','8592LobysS','2315JOYwQk','npmRegistryBaseUrl','7574StmKAQ'];a92_0x1132=function(){return _0x1d1ed3;};return a92_0x1132();}function a92_0x2933(_0x157a47,_0x2946fa){_0x157a47=_0x157a47-0x152;const _0x11327c=a92_0x1132();let _0x293336=_0x11327c[_0x157a47];return _0x293336;}const a92_0x49296c=a92_0x2933;(function(_0x4766d7,_0x5b814e){const _0x37967e=a92_0x2933,_0x255c38=_0x4766d7();while(!![]){try{const _0x4d7377=parseInt(_0x37967e(0x152))/0x1*(-parseInt(_0x37967e(0x153))/0x2)+-parseInt(_0x37967e(0x15d))/0x3*(parseInt(_0x37967e(0x155))/0x4)+parseInt(_0x37967e(0x15f))/0x5*(parseInt(_0x37967e(0x15e))/0x6)+-parseInt(_0x37967e(0x157))/0x7*(parseInt(_0x37967e(0x15a))/0x8)+parseInt(_0x37967e(0x156))/0x9*(-parseInt(_0x37967e(0x154))/0xa)+parseInt(_0x37967e(0x15c))/0xb+parseInt(_0x37967e(0x159))/0xc;if(_0x4d7377===_0x5b814e)break;else _0x255c38['push'](_0x255c38['shift']());}catch(_0xf5321d){_0x255c38['push'](_0x255c38['shift']());}}}(a92_0x1132,0xad067));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a92_0x49296c(0x158)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a92_0x49296c(0x15b)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a92_0x49296c(0x160)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a93_0x35f222=a93_0x366e;function a93_0x366e(_0x215086,_0x4fe216){_0x215086=_0x215086-0x114;const _0x1e4ae4=a93_0x1e4a();let _0x366ec5=_0x1e4ae4[_0x215086];return _0x366ec5;}(function(_0xc02a6e,_0x4802f4){const _0x23fa79=a93_0x366e,_0x1acef2=_0xc02a6e();while(!![]){try{const _0x31036c=-parseInt(_0x23fa79(0x125))/0x1*(-parseInt(_0x23fa79(0x117))/0x2)+parseInt(_0x23fa79(0x123))/0x3*(-parseInt(_0x23fa79(0x11a))/0x4)+parseInt(_0x23fa79(0x128))/0x5*(parseInt(_0x23fa79(0x11c))/0x6)+parseInt(_0x23fa79(0x126))/0x7+-parseInt(_0x23fa79(0x120))/0x8+parseInt(_0x23fa79(0x119))/0x9+parseInt(_0x23fa79(0x122))/0xa*(-parseInt(_0x23fa79(0x127))/0xb);if(_0x31036c===_0x4802f4)break;else _0x1acef2['push'](_0x1acef2['shift']());}catch(_0x11bc1b){_0x1acef2['push'](_0x1acef2['shift']());}}}(a93_0x1e4a,0x2c34c));function a93_0x1e4a(){const _0x322d50=['1954799UaiRQu','145EyzMej','skillhub','runtime','runtimeDomain','production','2yLSFPm','user','2929932owuxJv','809960JWbMtu','skillHubDomain','6954aRNkjp','userDomain','apiDomain','api','802632exZdWE','domains','30vNbIKI','3ciIDcV','nonProduction','315818RPOpkC','2394259PClvOL'];a93_0x1e4a=function(){return _0x322d50;};return a93_0x1e4a();}import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x588aa5){const _0x1ef85a=a93_0x366e;customApiDomain=_0x588aa5?.[_0x1ef85a(0x11e)],customUserDomain=_0x588aa5?.[_0x1ef85a(0x11d)],customRuntimeDomain=_0x588aa5?.[_0x1ef85a(0x115)],customSkillHubDomain=_0x588aa5?.[_0x1ef85a(0x11b)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x35f222(0x121)][a93_0x35f222(0x116)][a93_0x35f222(0x118)]:PRODUCT_CONFIG['domains'][a93_0x35f222(0x124)]['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x35f222(0x121)][a93_0x35f222(0x116)]['api']:PRODUCT_CONFIG[a93_0x35f222(0x121)][a93_0x35f222(0x124)][a93_0x35f222(0x11f)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x35f222(0x121)][a93_0x35f222(0x116)][a93_0x35f222(0x114)]:PRODUCT_CONFIG['domains'][a93_0x35f222(0x124)][a93_0x35f222(0x114)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x35f222(0x121)][a93_0x35f222(0x116)][a93_0x35f222(0x129)]:PRODUCT_CONFIG[a93_0x35f222(0x121)]['nonProduction'][a93_0x35f222(0x129)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x4bb472=a94_0x2cf7;(function(_0x46842c,_0x4e5f19){const _0x27c815=a94_0x2cf7,_0x4084ca=_0x46842c();while(!![]){try{const _0x107680=-parseInt(_0x27c815(0xa3))/0x1*(-parseInt(_0x27c815(0xa8))/0x2)+parseInt(_0x27c815(0xa7))/0x3+-parseInt(_0x27c815(0xad))/0x4+parseInt(_0x27c815(0xa0))/0x5+-parseInt(_0x27c815(0xa1))/0x6+-parseInt(_0x27c815(0xa4))/0x7+parseInt(_0x27c815(0xac))/0x8;if(_0x107680===_0x4e5f19)break;else _0x4084ca['push'](_0x4084ca['shift']());}catch(_0x240a5f){_0x4084ca['push'](_0x4084ca['shift']());}}}(a94_0x394d,0x980e1));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a94_0x4bb472(0xa6),a94_0x4bb472(0xa9)];export function normalizeEnv(_0xbc62d2){const _0x3a56ca=a94_0x4bb472;return _0xbc62d2===_0x3a56ca(0xa5)?_0x3a56ca(0xab):_0xbc62d2;}export function isProduction(_0x42f9ea){const _0x1d0d8f=a94_0x4bb472;return normalizeEnv(_0x42f9ea)===_0x1d0d8f(0xab);}export function isDaily(_0x30b959){const _0x332638=a94_0x4bb472;return normalizeEnv(_0x30b959)===_0x332638(0xa9);}function a94_0x2cf7(_0x339bd7,_0x2bb7ae){_0x339bd7=_0x339bd7-0xa0;const _0x394de7=a94_0x394d();let _0x2cf772=_0x394de7[_0x339bd7];return _0x2cf772;}export function isDev(_0x5d85cf){const _0x5b7925=a94_0x4bb472,_0x3add9f=normalizeEnv(_0x5d85cf);return _0x3add9f===_0x5b7925(0xa6)||_0x3add9f===_0x5b7925(0xaa);}let env=normalizeEnv(productEnv(a94_0x4bb472(0xa2))||a94_0x4bb472(0xab));export function getEnv(){return env;}function a94_0x394d(){const _0x2298f5=['708342YSjzNE','44426QmRuaE','daily','dev','production','22535328WsLzYq','4120820WvACEw','199085PWthms','7321302hWEXcr','ENV','32mgqMjH','6512968LGyuat','online','development'];a94_0x394d=function(){return _0x2298f5;};return a94_0x394d();}export function initEnv(_0x21889b){env=normalizeEnv(_0x21889b);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a95_0x365b01=a95_0x3f4a;(function(_0x23c5c4,_0x4939a4){const _0x4224d9=a95_0x3f4a,_0x513bf9=_0x23c5c4();while(!![]){try{const _0x1f6bbe=-parseInt(_0x4224d9(0x155))/0x1+parseInt(_0x4224d9(0x153))/0x2*(parseInt(_0x4224d9(0x152))/0x3)+-parseInt(_0x4224d9(0x14f))/0x4+parseInt(_0x4224d9(0x157))/0x5+-parseInt(_0x4224d9(0x14e))/0x6*(parseInt(_0x4224d9(0x150))/0x7)+-parseInt(_0x4224d9(0x151))/0x8+parseInt(_0x4224d9(0x154))/0x9*(parseInt(_0x4224d9(0x156))/0xa);if(_0x1f6bbe===_0x4939a4)break;else _0x513bf9['push'](_0x513bf9['shift']());}catch(_0x5b111b){_0x513bf9['push'](_0x513bf9['shift']());}}}(a95_0x416a,0xbcacc));function a95_0x3f4a(_0x1bda9e,_0x136b26){_0x1bda9e=_0x1bda9e-0x14e;const _0x416ab0=a95_0x416a();let _0x3f4ac0=_0x416ab0[_0x1bda9e];return _0x3f4ac0;}export const OUTPUT_FORMAT_VALUES=[a95_0x365b01(0x159),a95_0x365b01(0x158),'compress'];function a95_0x416a(){const _0x3d900e=['93lRoCoo','6784qFGTnY','21861531CCUirp','1441510eySNPN','20sNbJZV','3790355ADzOUL','pretty','json','870xrUOGR','6052476ngTmTK','73003tQBymL','3853560AJbksV'];a95_0x416a=function(){return _0x3d900e;};return a95_0x416a();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a96_0x32bd(_0x45225f,_0x4b641b){_0x45225f=_0x45225f-0x1bd;const _0x55e87c=a96_0x55e8();let _0x32bd98=_0x55e87c[_0x45225f];return _0x32bd98;}const a96_0x161b4d=a96_0x32bd;(function(_0x4bec97,_0x697be6){const _0x336cef=a96_0x32bd,_0x2db904=_0x4bec97();while(!![]){try{const _0x2a435e=parseInt(_0x336cef(0x1be))/0x1*(parseInt(_0x336cef(0x1d6))/0x2)+-parseInt(_0x336cef(0x1cd))/0x3+-parseInt(_0x336cef(0x1c3))/0x4*(-parseInt(_0x336cef(0x1c2))/0x5)+-parseInt(_0x336cef(0x1c1))/0x6+-parseInt(_0x336cef(0x1d7))/0x7+-parseInt(_0x336cef(0x1ce))/0x8+parseInt(_0x336cef(0x1c9))/0x9*(parseInt(_0x336cef(0x1d4))/0xa);if(_0x2a435e===_0x697be6)break;else _0x2db904['push'](_0x2db904['shift']());}catch(_0x1cedec){_0x2db904['push'](_0x2db904['shift']());}}}(a96_0x55e8,0x75f87));export const PRODUCT_CONFIG={'cliBinName':a96_0x161b4d(0x1c4),'cliDisplayName':a96_0x161b4d(0x1cb),'npmPackageName':a96_0x161b4d(0x1d9),'skillSource':a96_0x161b4d(0x1c5),'internalSkillSource':a96_0x161b4d(0x1cf),'globalSkillName':a96_0x161b4d(0x1c4),'npmRegistryBaseUrl':a96_0x161b4d(0x1db),'envPrefix':a96_0x161b4d(0x1d3),'legacyEnvPrefixes':[a96_0x161b4d(0x1d1)],'configFileNames':[a96_0x161b4d(0x1d8),a96_0x161b4d(0x1d0)],'newConfigFileName':a96_0x161b4d(0x1d8),'homeDirName':'.lovrabet','logFileName':a96_0x161b4d(0x1d2),'invokeSource':a96_0x161b4d(0x1dc),'userCenterDisplayName':a96_0x161b4d(0x1c8),'skipNpxSkillsEnvSuffix':a96_0x161b4d(0x1c6),'domains':{'production':{'user':a96_0x161b4d(0x1c7),'api':a96_0x161b4d(0x1c0),'runtime':a96_0x161b4d(0x1dd),'skillhub':a96_0x161b4d(0x1ca)},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':'https://daily-api.lovrabet.com','runtime':a96_0x161b4d(0x1bd),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':a96_0x161b4d(0x1d5)};export function productEnvName(_0x5f1042){const _0x5ab400=a96_0x161b4d;return PRODUCT_CONFIG[_0x5ab400(0x1bf)]+'_'+_0x5f1042;}export function productEnvNames(_0x174247){const _0x5522a2=a96_0x161b4d;return[productEnvName(_0x174247),...PRODUCT_CONFIG[_0x5522a2(0x1cc)][_0x5522a2(0x1da)](_0x3a6a05=>_0x3a6a05+'_'+_0x174247)];}function a96_0x55e8(){const _0x1cdcaf=['https://user.lovrabet.com','Lovrabet\x20User\x20Center','2331joEFnO','https://skills.lovrabet.com','Lovrabet\x20Runtime\x20CLI','legacyEnvPrefixes','2018040nqENpG','584376rVaWDT','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','.lovrabetrc','RABETBASE','.lovrabet-runtime.log','LOVRABET','26710fTrjqV','/user/ak','10tWODyz','2269225qUUDIS','.lovrabet.json','@lovrabet/lovrabet-cli','map','https://registry.npmjs.org','cli:lovrabet-runtime','https://runtime.lovrabet.com','https://daily-runtime.lovrabet.com','115036WljQPA','envPrefix','https://api.lovrabet.com','864534dlliNC','5boWTgJ','1720916hwJeRy','lovrabet','lovrabet/lovrabet-cli','SKIP_NPX_SKILLS'];a96_0x55e8=function(){return _0x1cdcaf;};return a96_0x55e8();}export function productEnv(_0x3ad26c){for(const _0x3b4fc0 of productEnvNames(_0x3ad26c)){const _0xb670ee=process.env[_0x3b4fc0];if(_0xb670ee!==undefined)return _0xb670ee;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a97_0x3664(_0x70ade3,_0x94d6c8){_0x70ade3=_0x70ade3-0x170;const _0x370a97=a97_0x370a();let _0x366480=_0x370a97[_0x70ade3];return _0x366480;}const a97_0x5ea992=a97_0x3664;function a97_0x370a(){const _0x5d464a=['read','947061ObCdOs','2451537BZclTt','102361opniTH','72ompmCq','330IvRzVg','83560yOXozm','4760736RtiMTW','634516krQGzW','3PTCCsn','235tvTLxG','high-risk-write','98012LAxzPu'];a97_0x370a=function(){return _0x5d464a;};return a97_0x370a();}(function(_0x1104eb,_0x41383e){const _0x5e23bd=a97_0x3664,_0x5bf83b=_0x1104eb();while(!![]){try{const _0x8051f=parseInt(_0x5e23bd(0x174))/0x1+parseInt(_0x5e23bd(0x17b))/0x2*(parseInt(_0x5e23bd(0x17c))/0x3)+parseInt(_0x5e23bd(0x172))/0x4*(-parseInt(_0x5e23bd(0x170))/0x5)+-parseInt(_0x5e23bd(0x178))/0x6*(-parseInt(_0x5e23bd(0x176))/0x7)+-parseInt(_0x5e23bd(0x17a))/0x8+-parseInt(_0x5e23bd(0x177))/0x9*(-parseInt(_0x5e23bd(0x179))/0xa)+parseInt(_0x5e23bd(0x175))/0xb;if(_0x8051f===_0x41383e)break;else _0x5bf83b['push'](_0x5bf83b['shift']());}catch(_0x3a4ebb){_0x5bf83b['push'](_0x5bf83b['shift']());}}}(a97_0x370a,0x954ee));export const RISK_LEVEL_VALUES=[a97_0x5ea992(0x173),'write',a97_0x5ea992(0x171)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x1e9d5c=a98_0xc9ea;(function(_0x14b648,_0x4545e8){const _0x3ed88e=a98_0xc9ea,_0x100c68=_0x14b648();while(!![]){try{const _0x24973a=-parseInt(_0x3ed88e(0x115))/0x1*(parseInt(_0x3ed88e(0x110))/0x2)+-parseInt(_0x3ed88e(0x10c))/0x3+parseInt(_0x3ed88e(0x117))/0x4*(-parseInt(_0x3ed88e(0x111))/0x5)+parseInt(_0x3ed88e(0x116))/0x6*(-parseInt(_0x3ed88e(0x10d))/0x7)+-parseInt(_0x3ed88e(0x11a))/0x8*(parseInt(_0x3ed88e(0x119))/0x9)+parseInt(_0x3ed88e(0x10f))/0xa*(-parseInt(_0x3ed88e(0x114))/0xb)+-parseInt(_0x3ed88e(0x118))/0xc*(-parseInt(_0x3ed88e(0x10e))/0xd);if(_0x24973a===_0x4545e8)break;else _0x100c68['push'](_0x100c68['shift']());}catch(_0xfbfa5d){_0x100c68['push'](_0x100c68['shift']());}}}(a98_0x169b,0xa4565));import{PRODUCT_CONFIG}from'../constant/product.js';function a98_0x169b(){const _0x461089=['domains','3519699QfUMTQ','329IutMGc','150033ETCipJ','407590dpquDS','62796jvwPIg','2577835HwDUqB','user','accessKeyCreatePath','44kXsAoK','27uPRAEP','48270XxvbJQ','4FpaFWr','5280kxwdar','3981654DqKhib','24UJPLTx'];a98_0x169b=function(){return _0x461089;};return a98_0x169b();}function a98_0xc9ea(_0x4b25b2,_0x4e1761){_0x4b25b2=_0x4b25b2-0x10b;const _0x169b4e=a98_0x169b();let _0xc9eab5=_0x169b4e[_0x4b25b2];return _0xc9eab5;}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a98_0x1e9d5c(0x10b)]['production'][a98_0x1e9d5c(0x112)]+PRODUCT_CONFIG[a98_0x1e9d5c(0x113)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a99_0x17b8e6=a99_0x38c1;(function(_0x3624aa,_0x59b4f6){const _0x845aca=a99_0x38c1,_0x368330=_0x3624aa();while(!![]){try{const _0x507cf9=parseInt(_0x845aca(0xd4))/0x1*(-parseInt(_0x845aca(0xff))/0x2)+-parseInt(_0x845aca(0x10c))/0x3+parseInt(_0x845aca(0xce))/0x4+parseInt(_0x845aca(0x106))/0x5+-parseInt(_0x845aca(0xf9))/0x6+-parseInt(_0x845aca(0x10f))/0x7*(parseInt(_0x845aca(0x10a))/0x8)+-parseInt(_0x845aca(0xed))/0x9*(-parseInt(_0x845aca(0xfb))/0xa);if(_0x507cf9===_0x59b4f6)break;else _0x368330['push'](_0x368330['shift']());}catch(_0x5f0f07){_0x368330['push'](_0x368330['shift']());}}}(a99_0xd4e0,0x5f2be));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'];function a99_0x38c1(_0x567317,_0x1c6212){_0x567317=_0x567317-0xcc;const _0xd4e0b3=a99_0xd4e0();let _0x38c111=_0xd4e0b3[_0x567317];return _0x38c111;}export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a99_0x17b8e6(0xdd)];function resolveConfigPath(_0x3dc3d4){for(const _0x51bee4 of CONFIG_NAMES){const _0x489dac=resolve(_0x3dc3d4,_0x51bee4);if(existsSync(_0x489dac))return _0x489dac;}return undefined;}export function resolveWriteConfigPath(_0x5789f2){const _0x55d2bc=a99_0x17b8e6,_0x5afa83=_0x5789f2===_0x55d2bc(0xee)?process['cwd']():homedir(),_0x4623c0=resolveConfigPath(_0x5afa83);return _0x4623c0??resolve(_0x5afa83,NEW_CONFIG_NAME);}export function readConfigFile(_0x5e0359){const _0x75e3f6=a99_0x17b8e6;try{if(existsSync(_0x5e0359)){const _0x3c905f=readFileSync(_0x5e0359,{'encoding':_0x75e3f6(0x116)});if(_0x3c905f){const _0x4fd337=JSON[_0x75e3f6(0x108)](_0x3c905f);return migrateOnlineEnv(_0x5e0359,_0x4fd337),_0x4fd337;}}}catch{}return{};}function migrateOnlineEnv(_0x26ef11,_0x4cef28){const _0x33539a=a99_0x17b8e6;let _0x1a5308=![];_0x4cef28[_0x33539a(0x110)]===_0x33539a(0xd6)&&(_0x4cef28[_0x33539a(0x110)]=_0x33539a(0xf0),_0x1a5308=!![]);if(_0x4cef28['apps']&&typeof _0x4cef28['apps']===_0x33539a(0xf2))for(const _0x5d3c7a of Object['values'](_0x4cef28[_0x33539a(0xe9)])){_0x5d3c7a&&_0x5d3c7a[_0x33539a(0x110)]===_0x33539a(0xd6)&&(_0x5d3c7a[_0x33539a(0x110)]=_0x33539a(0xf0),_0x1a5308=!![]);}if(_0x1a5308)try{writeConfigFile(_0x26ef11,_0x4cef28);}catch{}}export function writeConfigFile(_0x4d1c3,_0x563ed7){const _0x309530=a99_0x17b8e6,_0x507134=dirname(_0x4d1c3);!existsSync(_0x507134)&&mkdirSync(_0x507134,{'recursive':!![]});const _0x131a77=_0x4d1c3+_0x309530(0x104);try{writeFileSync(_0x131a77,JSON[_0x309530(0xdb)](_0x563ed7,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x131a77,_0x4d1c3);}catch(_0x3f9534){if(_0x3f9534[_0x309530(0xec)]===_0x309530(0x111)||_0x3f9534['code']===_0x309530(0x10e)||_0x3f9534['code']===_0x309530(0x102)){writeFileSync(_0x4d1c3,JSON[_0x309530(0xdb)](_0x563ed7,null,0x2)+'\x0a',{'encoding':_0x309530(0x116)});try{unlinkSync(_0x131a77);}catch{}}else throw _0x3f9534;}}catch(_0x5d8c1d){try{unlinkSync(_0x131a77);}catch{}throw _0x5d8c1d;}}export function isNonInteractiveMode(_0x5c6b9d){const _0x3b9d84=a99_0x17b8e6;return!!(_0x5c6b9d[_0x3b9d84(0xf6)]||_0x5c6b9d['ci']||productEnvNames('CI')[_0x3b9d84(0x115)](_0x2522e7=>process.env[_0x2522e7]===_0x3b9d84(0xd9))||process.env.CI===_0x3b9d84(0xd9)||!process[_0x3b9d84(0xf4)][_0x3b9d84(0xfd)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x39dd1f=a99_0x17b8e6;if(!process['stdin'][_0x39dd1f(0xfd)])return![];try{const _0x4705cd=process[_0x39dd1f(0xe3)][_0x39dd1f(0x107)];return process[_0x39dd1f(0xe3)][_0x39dd1f(0x112)](!![]),process[_0x39dd1f(0xe3)][_0x39dd1f(0x112)](_0x4705cd??![]),!![];}catch{return![];}}export async function createContext(_0x34610b){const _0x25b0d9=a99_0x17b8e6,_0x27d208=readRawConfig(),_0x49d090=buildConfig(_0x27d208,_0x34610b);await initGlobalEnvironment(_0x49d090);const {getUserDomain:_0xc86780,getApiDomain:_0x45cb02}=await import(_0x25b0d9(0xf5)),_0x4312e2={'apiDomain':_0x45cb02(),'userDomain':_0xc86780()},_0x13edc8=await buildAuth(_0x49d090);logger[_0x25b0d9(0xeb)](process[_0x25b0d9(0xe0)]());const _0x4dda7a=(CLI_BIN_NAME+'\x20'+process[_0x25b0d9(0xf1)][_0x25b0d9(0xd5)](0x2)[_0x25b0d9(0x105)]('\x20'))[_0x25b0d9(0xf7)]();logger[_0x25b0d9(0xfe)](_0x4dda7a);const _0x365119=isNonInteractiveMode(_0x34610b);return{'config':_0x49d090,'auth':_0x13edc8,'logger':logger,'env':_0x4312e2,'nonInteractive':_0x365119};}export function buildConfigFromFlags(_0x245cd8){return buildConfig(readRawConfig(),_0x245cd8);}export function getLocalAppAliases(_0x3496a3){const _0x4622e1=a99_0x17b8e6;return _0x3496a3['apps']&&typeof _0x3496a3['apps']===_0x4622e1(0xf2)?_0x3496a3[_0x4622e1(0xe9)]:{};}export function resolveLocalAppAliasCode(_0x525b27,_0x463ae2){const _0x3111e8=a99_0x17b8e6;if(!_0x463ae2)return undefined;const _0x4499ec=getLocalAppAliases(_0x525b27)[_0x463ae2],_0x445c10=_0x4499ec?.['appcode'];return typeof _0x445c10==='string'&&_0x445c10[_0x3111e8(0xf7)]()?_0x445c10['trim']():undefined;}export function readAppCodeFromConfig(){const _0x4097f4=a99_0x17b8e6,_0x90248=readRawConfig(),_0x4441ad=_0x90248[_0x4097f4(0x114)]??_0x90248[_0x4097f4(0xfc)];if(typeof _0x4441ad==='string'&&_0x4441ad[_0x4097f4(0xf7)]())return _0x4441ad['trim']();const _0x271843=resolveLocalAppAliasCode(_0x90248,typeof _0x90248[_0x4097f4(0x117)]==='string'?_0x90248[_0x4097f4(0x117)]:undefined);if(_0x271843)return _0x271843;const _0x106bce=normalizeEnv(String(_0x90248[_0x4097f4(0x110)]||_0x4097f4(0xf0))),_0x34c51d=isDaily(_0x106bce)?_0x4097f4(0x101):isDev(_0x106bce)?_0x4097f4(0x103):_0x4097f4(0xf0),_0xfc120=resolveCachedAppCode(typeof _0x90248[_0x4097f4(0x117)]===_0x4097f4(0x10d)?_0x90248[_0x4097f4(0x117)]:undefined,_0x34c51d,typeof _0x90248[_0x4097f4(0xcf)]===_0x4097f4(0x10d)?_0x90248['accessKey']:undefined);if(_0xfc120)return _0xfc120;const _0x53c3d5=Object[_0x4097f4(0xe8)](getLocalAppAliases(_0x90248))[_0x4097f4(0xcc)](_0x18e791=>_0x18e791?.[_0x4097f4(0x114)]);return typeof _0x53c3d5?.['appcode']==='string'&&_0x53c3d5['appcode'][_0x4097f4(0xf7)]()?_0x53c3d5[_0x4097f4(0x114)][_0x4097f4(0xf7)]():undefined;}export function readScopedConfig(_0x2923e2){const _0x57c746=a99_0x17b8e6,_0x29173a=_0x2923e2[_0x57c746(0xf3)]?'global':'project';return readConfigFile(resolveWriteConfigPath(_0x29173a));}export function writeScopedConfig(_0x928586,_0x1ce485){const _0x55314c=a99_0x17b8e6,_0x5a114b=_0x1ce485['global']?_0x55314c(0xf3):_0x55314c(0xee);writeConfigFile(resolveWriteConfigPath(_0x5a114b),_0x928586);}export async function initGlobalEnvironment(_0x1925c3){const _0x293158=a99_0x17b8e6,{initEnv:_0x5c2649}=await import(_0x293158(0xde));_0x5c2649(_0x1925c3[_0x293158(0x110)]);const {initDomains:_0x1b9a11}=await import(_0x293158(0xf5));_0x1b9a11({'apiDomain':_0x1925c3[_0x293158(0xd1)]['apiDomain']||_0x1925c3[_0x293158(0xd1)][_0x293158(0xda)]||undefined,'userDomain':_0x1925c3[_0x293158(0xd1)]['userDomain']||undefined,'runtimeDomain':_0x1925c3['raw']['runtimeDomain']||undefined,'skillHubDomain':_0x1925c3[_0x293158(0xd1)][_0x293158(0xfa)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x132655){const _0x19022e=a99_0x17b8e6;if(!existsSync(_0x132655))return{'status':'missing'};try{const _0x2e73ec=readFileSync(_0x132655,{'encoding':'utf8'});if(!_0x2e73ec?.[_0x19022e(0xf7)]())return{'status':_0x19022e(0xdf)};const _0x51969f=JSON[_0x19022e(0x108)](_0x2e73ec);return{'status':'ok','data':_0x51969f};}catch(_0x3c24f0){return{'status':_0x19022e(0xd0),'message':_0x3c24f0 instanceof Error?_0x3c24f0['message']:String(_0x3c24f0)};}}export function loadRawConfigLayers(_0x521b84){const _0x471a36=a99_0x17b8e6;let _0x45174c={},_0x4b0436={},_0x33bbda,_0x4fe052;try{_0x33bbda=resolveConfigPath(homedir());if(_0x33bbda){const _0x2aba5b=readFileSync(_0x33bbda,{'encoding':_0x471a36(0x116)});if(_0x2aba5b)_0x45174c=JSON[_0x471a36(0x108)](_0x2aba5b);}}catch{}try{const _0x1fe1a9=_0x521b84||process[_0x471a36(0xe0)]();_0x4fe052=resolveConfigPath(_0x1fe1a9);if(_0x4fe052){const _0x55cabb=readFileSync(_0x4fe052,{'encoding':_0x471a36(0x116)});if(_0x55cabb)_0x4b0436=JSON['parse'](_0x55cabb);}}catch{}return{'globalPath':_0x33bbda,'projectPath':_0x4fe052,'globalConfig':_0x45174c,'projectConfig':_0x4b0436};}function mergeRawConfigLayers(_0x57a212){const _0x3ebea0=a99_0x17b8e6,{globalConfig:_0x1ff7f7,projectConfig:_0x340b13}=_0x57a212;if(_0x340b13[_0x3ebea0(0xd2)]===![]){const _0x2bb0d3={..._0x340b13};return delete _0x2bb0d3[_0x3ebea0(0xd2)],_0x2bb0d3;}const _0x4ebc4b={..._0x1ff7f7,..._0x340b13};if('defaultApp'in _0x340b13)_0x4ebc4b['defaultApp']=_0x340b13[_0x3ebea0(0x117)];else _0x1ff7f7[_0x3ebea0(0x117)]&&(_0x4ebc4b[_0x3ebea0(0x117)]=_0x1ff7f7[_0x3ebea0(0x117)]);return _0x4ebc4b;}export function isInProject(){return!!getProjectConfigPath();}function a99_0xd4e0(){const _0x360e8f=['2bjPohf','ENV','daily','EACCES','development','.tmp','join','1230290vchffV','isRaw','parse','VERBOSE','16SzDoDW','PAGE_SIZE','717fYPMNY','string','EXDEV','60193hSYYmR','env','EPERM','setRawMode','top-level','appcode','some','utf8','defaultApp','find','maxRisk','856156wrwryC','accessKey','error','raw','inherit','locale','754165oiLOlM','slice','online','format','pageSize','true','host','stringify','APPCODE','newConfigFileName','./constant/env.js','empty','cwd','cache','globalConfig','stdin','projectConfig','FORMAT','riskLevel','local-alias','values','apps','write','setLogPath','code','5093559ulEZmm','project','APP','production','argv','object','global','stdout','./constant/domain.js','nonInteractive','trim','high-risk-write','2583450jtRlcz','skillHubDomain','20TQboNR','app','isTTY','setRawCommand'];a99_0xd4e0=function(){return _0x360e8f;};return a99_0xd4e0();}export function readRawConfig(_0x58e757){return mergeRawConfigLayers(loadRawConfigLayers(_0x58e757));}export function readRawConfigWithLayers(_0x42f3c9){const _0x467e69=loadRawConfigLayers(_0x42f3c9);return{'config':mergeRawConfigLayers(_0x467e69),'layers':_0x467e69};}export function resolveDefaultAppSource(_0x54c010){const _0x3ec547=a99_0x17b8e6;if(_0x3ec547(0x117)in _0x54c010[_0x3ec547(0xe4)])return'project';if(_0x54c010[_0x3ec547(0xe4)]['inherit']===![])return null;if(_0x54c010[_0x3ec547(0xe2)][_0x3ec547(0x117)])return _0x3ec547(0xf3);return null;}function buildConfig(_0x4d5582,_0x380686){const _0x158ba2=a99_0x17b8e6,_0x17a17a=_0x4d5582[_0x158ba2(0x117)]||undefined,_0x19f37b=_0x380686[_0x158ba2(0xfc)]||env(_0x158ba2(0xef))||undefined,_0x3e3e0b=_0x19f37b||_0x17a17a||undefined,_0x40540f=env('ACCESS_KEY')||_0x4d5582[_0x158ba2(0xcf)]||undefined,_0x2d52c7=_0x380686['env']||env(_0x158ba2(0x100))||_0x4d5582[_0x158ba2(0x110)]||DEFAULT_CONFIG_VALUES[_0x158ba2(0x110)],_0x183d00=normalizeEnv(String(_0x2d52c7)),_0x3da086=isDaily(_0x183d00)?_0x158ba2(0x101):isDev(_0x183d00)?'development':_0x158ba2(0xf0),_0x5a109f=typeof _0x380686[_0x158ba2(0x114)]===_0x158ba2(0x10d)?_0x380686[_0x158ba2(0x114)]:undefined,_0x12f2f0=env(_0x158ba2(0xdc)),_0x1b922f=_0x19f37b?undefined:_0x4d5582[_0x158ba2(0x114)]||_0x4d5582['app']||undefined,_0x2edc84=_0x19f37b||(_0x1b922f?undefined:_0x17a17a),_0x11c1c7=resolveLocalAppAliasCode(_0x4d5582,_0x2edc84),_0x17490d=resolveCachedAppCode(_0x2edc84,_0x3da086,_0x40540f),_0x1593ea=_0x5a109f||_0x12f2f0||_0x1b922f||_0x11c1c7||_0x17490d||undefined,_0x209d91=_0x5a109f?'explicit':_0x12f2f0?_0x158ba2(0x110):_0x1b922f?_0x158ba2(0x113):_0x11c1c7?_0x158ba2(0xe7):_0x17490d?_0x158ba2(0xe1):undefined,_0x59d7a8=_0x4d5582[_0x158ba2(0xd3)]||DEFAULT_CONFIG_VALUES[_0x158ba2(0xd3)],_0x9f2dc1=undefined,_0x110b42=_0x380686[_0x158ba2(0xd7)]||env(_0x158ba2(0xe5))||_0x4d5582[_0x158ba2(0xd7)],_0x3ba33f=normalizeLegacyOutputFormat(_0x110b42),_0xfd704d=env(_0x158ba2(0x10b))||_0x4d5582[_0x158ba2(0xd8)],_0x2926bd=_0xfd704d?Number(_0xfd704d)||undefined:undefined,_0x2e831d=_0x4d5582[_0x158ba2(0xe6)]||_0x4d5582[_0x158ba2(0xcd)],_0x2913bf=_0x2e831d==='read'||_0x2e831d===_0x158ba2(0xea)||_0x2e831d===_0x158ba2(0xf8)?_0x2e831d:DEFAULT_CONFIG_VALUES[_0x158ba2(0xe6)],_0x306f54=env(_0x158ba2(0x109)),_0x2def58=_0x306f54==='1'||_0x306f54==='true';return{'appCode':typeof _0x1593ea===_0x158ba2(0x10d)&&_0x1593ea[_0x158ba2(0xf7)]()?_0x1593ea['trim']():undefined,'appCodeSource':_0x209d91,'env':_0x3da086,'locale':_0x59d7a8,'cookie':_0x9f2dc1,'accessKey':_0x40540f,'format':_0x3ba33f,'pageSize':_0x2926bd,'riskLevel':_0x2913bf,'verbose':_0x2def58,'defaultApp':_0x17a17a,'currentApp':typeof _0x3e3e0b==='string'?_0x3e3e0b:undefined,'raw':_0x4d5582};}function env(_0x4e1265){return productEnv(_0x4e1265);}async function buildAuth(_0x3ec2a7){const _0x530c40=a99_0x17b8e6,_0x2c4b96='',_0x1539c2=!!_0x3ec2a7[_0x530c40(0xcf)];return{'cookie':_0x2c4b96,'isLoggedIn':_0x1539c2,async 'getOrLogin'(){if(_0x1539c2)return _0x2c4b96;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a99_0x4e6e73=a99_0x3c5c;(function(_0x1de17e,_0x4bb558){const _0x30d056=a99_0x3c5c,_0x6b2c27=_0x1de17e();while(!![]){try{const _0x3eb2a=parseInt(_0x30d056(0x219))/0x1*(parseInt(_0x30d056(0x204))/0x2)+parseInt(_0x30d056(0x20d))/0x3*(-parseInt(_0x30d056(0x1f3))/0x4)+-parseInt(_0x30d056(0x20b))/0x5+parseInt(_0x30d056(0x20a))/0x6+-parseInt(_0x30d056(0x1e5))/0x7+parseInt(_0x30d056(0x208))/0x8+-parseInt(_0x30d056(0x21f))/0x9;if(_0x3eb2a===_0x4bb558)break;else _0x6b2c27['push'](_0x6b2c27['shift']());}catch(_0x1933ee){_0x6b2c27['push'](_0x6b2c27['shift']());}}}(a99_0x2cbf,0xc6b67));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_0x4e6e73(0x1f9)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a99_0x4e6e73(0x1fc)];function resolveConfigPath(_0x3a9c1d){for(const _0x2079a7 of CONFIG_NAMES){const _0xaf35ee=resolve(_0x3a9c1d,_0x2079a7);if(existsSync(_0xaf35ee))return _0xaf35ee;}return undefined;}export function resolveWriteConfigPath(_0x31c518){const _0x1dfee4=a99_0x4e6e73,_0x299b8c=_0x31c518===_0x1dfee4(0x226)?process[_0x1dfee4(0x1f2)]():homedir(),_0x3e3f9e=resolveConfigPath(_0x299b8c);return _0x3e3f9e??resolve(_0x299b8c,NEW_CONFIG_NAME);}export function readConfigFile(_0x333ee8){const _0x5c8c7a=a99_0x4e6e73;try{if(existsSync(_0x333ee8)){const _0x2bebb2=readFileSync(_0x333ee8,{'encoding':_0x5c8c7a(0x223)});if(_0x2bebb2){const _0x9525eb=JSON['parse'](_0x2bebb2);return migrateOnlineEnv(_0x333ee8,_0x9525eb),_0x9525eb;}}}catch{}return{};}function migrateOnlineEnv(_0xc8ee37,_0x1b397e){const _0x35822c=a99_0x4e6e73;let _0x5d29d6=![];_0x1b397e['env']===_0x35822c(0x221)&&(_0x1b397e['env']=_0x35822c(0x202),_0x5d29d6=!![]);if(_0x1b397e[_0x35822c(0x1e9)]&&typeof _0x1b397e[_0x35822c(0x1e9)]==='object')for(const _0x5978d8 of Object[_0x35822c(0x224)](_0x1b397e[_0x35822c(0x1e9)])){_0x5978d8&&_0x5978d8[_0x35822c(0x212)]===_0x35822c(0x221)&&(_0x5978d8[_0x35822c(0x212)]=_0x35822c(0x202),_0x5d29d6=!![]);}if(_0x5d29d6)try{writeConfigFile(_0xc8ee37,_0x1b397e);}catch{}}export function writeConfigFile(_0x3faf09,_0x27431b){const _0x1b7d77=a99_0x4e6e73,_0x27b58e=dirname(_0x3faf09);!existsSync(_0x27b58e)&&mkdirSync(_0x27b58e,{'recursive':!![]});const _0x96e8ef=_0x3faf09+_0x1b7d77(0x200);try{writeFileSync(_0x96e8ef,JSON['stringify'](_0x27431b,null,0x2)+'\x0a',{'encoding':_0x1b7d77(0x223),'mode':0x180});try{renameSync(_0x96e8ef,_0x3faf09);}catch(_0xf5179b){if(_0xf5179b[_0x1b7d77(0x1f7)]==='EPERM'||_0xf5179b[_0x1b7d77(0x1f7)]===_0x1b7d77(0x227)||_0xf5179b[_0x1b7d77(0x1f7)]===_0x1b7d77(0x215)){writeFileSync(_0x3faf09,JSON['stringify'](_0x27431b,null,0x2)+'\x0a',{'encoding':_0x1b7d77(0x223)});try{unlinkSync(_0x96e8ef);}catch{}}else throw _0xf5179b;}}catch(_0x3af7e1){try{unlinkSync(_0x96e8ef);}catch{}throw _0x3af7e1;}}export function isNonInteractiveMode(_0x3f9266){const _0xecc382=a99_0x4e6e73;return!!(_0x3f9266[_0xecc382(0x213)]||_0x3f9266['ci']||productEnvNames('CI')[_0xecc382(0x21e)](_0x15a38e=>process.env[_0x15a38e]===_0xecc382(0x1f5))||process.env.CI==='true'||!process[_0xecc382(0x207)][_0xecc382(0x216)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1899d3=a99_0x4e6e73;if(!process['stdin'][_0x1899d3(0x216)])return![];try{const _0x2c19c2=process['stdin']['isRaw'];return process[_0x1899d3(0x210)][_0x1899d3(0x218)](!![]),process[_0x1899d3(0x210)][_0x1899d3(0x218)](_0x2c19c2??![]),!![];}catch{return![];}}export async function createContext(_0x1a13fb){const _0xd3ed2f=a99_0x4e6e73,_0x65b247=readRawConfig(),_0x49d2e2=buildConfig(_0x65b247,_0x1a13fb);await initGlobalEnvironment(_0x49d2e2);const {getUserDomain:_0x1de407,getApiDomain:_0x33c93d}=await import(_0xd3ed2f(0x217)),_0x5baedb={'apiDomain':_0x33c93d(),'userDomain':_0x1de407()},_0x5d08d9=await buildAuth(_0x49d2e2);logger[_0xd3ed2f(0x1ec)](process[_0xd3ed2f(0x1f2)]());const _0x3665ea=(CLI_BIN_NAME+'\x20'+process[_0xd3ed2f(0x1f8)][_0xd3ed2f(0x20f)](0x2)['join']('\x20'))[_0xd3ed2f(0x203)]();logger[_0xd3ed2f(0x1e6)](_0x3665ea);const _0x503b90=isNonInteractiveMode(_0x1a13fb);return{'config':_0x49d2e2,'auth':_0x5d08d9,'logger':logger,'env':_0x5baedb,'nonInteractive':_0x503b90};}export function buildConfigFromFlags(_0x5b2f49){return buildConfig(readRawConfig(),_0x5b2f49);}export function getLocalAppAliases(_0x302fcf){const _0x17a543=a99_0x4e6e73;return _0x302fcf[_0x17a543(0x1e9)]&&typeof _0x302fcf[_0x17a543(0x1e9)]===_0x17a543(0x222)?_0x302fcf['apps']:{};}export function resolveLocalAppAliasCode(_0x43f814,_0xe52eb0){const _0x37f34f=a99_0x4e6e73;if(!_0xe52eb0)return undefined;const _0x2bde7a=getLocalAppAliases(_0x43f814)[_0xe52eb0],_0x4e2092=_0x2bde7a?.[_0x37f34f(0x1fa)];return typeof _0x4e2092===_0x37f34f(0x21a)&&_0x4e2092['trim']()?_0x4e2092[_0x37f34f(0x203)]():undefined;}export function readAppCodeFromConfig(){const _0x29c6f0=a99_0x4e6e73,_0x521130=readRawConfig(),_0x1e0b67=_0x521130[_0x29c6f0(0x1fa)]??_0x521130[_0x29c6f0(0x1f0)];if(typeof _0x1e0b67===_0x29c6f0(0x21a)&&_0x1e0b67[_0x29c6f0(0x203)]())return _0x1e0b67[_0x29c6f0(0x203)]();const _0x1ed207=resolveLocalAppAliasCode(_0x521130,typeof _0x521130[_0x29c6f0(0x1fd)]===_0x29c6f0(0x21a)?_0x521130[_0x29c6f0(0x1fd)]:undefined);if(_0x1ed207)return _0x1ed207;const _0x4e783b=normalizeEnv(String(_0x521130[_0x29c6f0(0x212)]||_0x29c6f0(0x202))),_0xc67c98=isDaily(_0x4e783b)?_0x29c6f0(0x205):isDev(_0x4e783b)?_0x29c6f0(0x1ea):'production',_0xa25814=resolveCachedAppCode(typeof _0x521130[_0x29c6f0(0x1fd)]===_0x29c6f0(0x21a)?_0x521130[_0x29c6f0(0x1fd)]:undefined,_0xc67c98,typeof _0x521130[_0x29c6f0(0x20c)]==='string'?_0x521130[_0x29c6f0(0x20c)]:undefined);if(_0xa25814)return _0xa25814;const _0x22960c=Object['values'](getLocalAppAliases(_0x521130))[_0x29c6f0(0x1fb)](_0x4c674a=>_0x4c674a?.[_0x29c6f0(0x1fa)]);return typeof _0x22960c?.[_0x29c6f0(0x1fa)]===_0x29c6f0(0x21a)&&_0x22960c[_0x29c6f0(0x1fa)][_0x29c6f0(0x203)]()?_0x22960c[_0x29c6f0(0x1fa)][_0x29c6f0(0x203)]():undefined;}export function readScopedConfig(_0x3b9633){const _0x2e4c7d=a99_0x4e6e73,_0x1e7b9a=_0x3b9633[_0x2e4c7d(0x1f1)]?_0x2e4c7d(0x1f1):_0x2e4c7d(0x226);return readConfigFile(resolveWriteConfigPath(_0x1e7b9a));}export function writeScopedConfig(_0x31a35a,_0xb3e421){const _0x5505c7=a99_0x4e6e73,_0x554e07=_0xb3e421[_0x5505c7(0x1f1)]?_0x5505c7(0x1f1):_0x5505c7(0x226);writeConfigFile(resolveWriteConfigPath(_0x554e07),_0x31a35a);}export async function initGlobalEnvironment(_0x357f11){const _0xbbda45=a99_0x4e6e73,{initEnv:_0x2f8594}=await import('./constant/env.js');_0x2f8594(_0x357f11[_0xbbda45(0x212)]);const {initDomains:_0x31d6a8}=await import('./constant/domain.js');_0x31d6a8({'apiDomain':_0x357f11[_0xbbda45(0x1e8)][_0xbbda45(0x1eb)]||_0x357f11[_0xbbda45(0x1e8)][_0xbbda45(0x220)]||undefined,'userDomain':_0x357f11[_0xbbda45(0x1e8)]['userDomain']||undefined,'runtimeDomain':_0x357f11[_0xbbda45(0x1e8)]['runtimeDomain']||undefined,'skillHubDomain':_0x357f11['raw']['skillHubDomain']||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4f73bb){const _0x5939f4=a99_0x4e6e73;if(!existsSync(_0x4f73bb))return{'status':_0x5939f4(0x206)};try{const _0x398ac1=readFileSync(_0x4f73bb,{'encoding':_0x5939f4(0x223)});if(!_0x398ac1?.['trim']())return{'status':_0x5939f4(0x201)};const _0x3ddf5d=JSON[_0x5939f4(0x225)](_0x398ac1);return{'status':'ok','data':_0x3ddf5d};}catch(_0x22c522){return{'status':'error','message':_0x22c522 instanceof Error?_0x22c522['message']:String(_0x22c522)};}}export function loadRawConfigLayers(_0x45180e){const _0x367f3f=a99_0x4e6e73;let _0x55a898={},_0x1cccc8={},_0x1939df,_0x469dca;try{_0x1939df=resolveConfigPath(homedir());if(_0x1939df){const _0x2fdbab=readFileSync(_0x1939df,{'encoding':'utf8'});if(_0x2fdbab)_0x55a898=JSON[_0x367f3f(0x225)](_0x2fdbab);}}catch{}try{const _0x1025cc=_0x45180e||process[_0x367f3f(0x1f2)]();_0x469dca=resolveConfigPath(_0x1025cc);if(_0x469dca){const _0x18cb4f=readFileSync(_0x469dca,{'encoding':'utf8'});if(_0x18cb4f)_0x1cccc8=JSON[_0x367f3f(0x225)](_0x18cb4f);}}catch{}return{'globalPath':_0x1939df,'projectPath':_0x469dca,'globalConfig':_0x55a898,'projectConfig':_0x1cccc8};}function mergeRawConfigLayers(_0x4a7793){const _0x3060ca=a99_0x4e6e73,{globalConfig:_0x6e4e4d,projectConfig:_0xaaa669}=_0x4a7793;if(_0xaaa669[_0x3060ca(0x21b)]===![]){const _0x4c3e55={..._0xaaa669};return delete _0x4c3e55[_0x3060ca(0x21b)],_0x4c3e55;}const _0x44921b={..._0x6e4e4d,..._0xaaa669};if(_0x3060ca(0x1fd)in _0xaaa669)_0x44921b[_0x3060ca(0x1fd)]=_0xaaa669[_0x3060ca(0x1fd)];else _0x6e4e4d[_0x3060ca(0x1fd)]&&(_0x44921b['defaultApp']=_0x6e4e4d[_0x3060ca(0x1fd)]);return _0x44921b;}export function isInProject(){return!!getProjectConfigPath();}function a99_0x2cbf(){const _0x51a9d5=['setLogPath','top-level','high-risk-write','explicit','app','global','cwd','24nyaebT','riskLevel','true','APP','code','argv','configFileNames','appcode','find','newConfigFileName','defaultApp','write','VERBOSE','.tmp','empty','production','trim','2DCQwSH','daily','missing','stdout','9528352zTTfhY','format','7155606aBOUbs','1923375sKwUmJ','accessKey','510519pRBblg','APPCODE','slice','stdin','locale','env','nonInteractive','projectConfig','EACCES','isTTY','./constant/domain.js','setRawMode','662455xMmpuB','string','inherit','pageSize','FORMAT','some','1901709eGESvL','host','online','object','utf8','values','parse','project','EXDEV','PAGE_SIZE','4306113VLqGDu','setRawCommand','local-alias','raw','apps','development','apiDomain'];a99_0x2cbf=function(){return _0x51a9d5;};return a99_0x2cbf();}export function readRawConfig(_0x125e31){return mergeRawConfigLayers(loadRawConfigLayers(_0x125e31));}export function readRawConfigWithLayers(_0x3a2856){const _0x4bf2a5=loadRawConfigLayers(_0x3a2856);return{'config':mergeRawConfigLayers(_0x4bf2a5),'layers':_0x4bf2a5};}function a99_0x3c5c(_0x5ebe3f,_0x2e463c){_0x5ebe3f=_0x5ebe3f-0x1e5;const _0x2cbf71=a99_0x2cbf();let _0x3c5c00=_0x2cbf71[_0x5ebe3f];return _0x3c5c00;}export function resolveDefaultAppSource(_0x27ed0c){const _0x99106b=a99_0x4e6e73;if(_0x99106b(0x1fd)in _0x27ed0c['projectConfig'])return _0x99106b(0x226);if(_0x27ed0c[_0x99106b(0x214)][_0x99106b(0x21b)]===![])return null;if(_0x27ed0c['globalConfig']['defaultApp'])return'global';return null;}function buildConfig(_0x1a1e1c,_0x52206){const _0x92b404=a99_0x4e6e73,_0x17c664=_0x1a1e1c[_0x92b404(0x1fd)]||undefined,_0x4c6d91=_0x52206[_0x92b404(0x1f0)]||env(_0x92b404(0x1f6))||undefined,_0x44d162=_0x4c6d91||_0x17c664||undefined,_0x412ebb=env('ACCESS_KEY')||_0x1a1e1c[_0x92b404(0x20c)]||undefined,_0x4fb62d=_0x52206['env']||env('ENV')||_0x1a1e1c[_0x92b404(0x212)]||DEFAULT_CONFIG_VALUES['env'],_0x3d38b8=normalizeEnv(String(_0x4fb62d)),_0x5e8bd6=isDaily(_0x3d38b8)?_0x92b404(0x205):isDev(_0x3d38b8)?_0x92b404(0x1ea):_0x92b404(0x202),_0x5c88a3=typeof _0x52206[_0x92b404(0x1fa)]===_0x92b404(0x21a)?_0x52206['appcode']:undefined,_0x3a5b14=env(_0x92b404(0x20e)),_0xb935a0=_0x4c6d91?undefined:_0x1a1e1c[_0x92b404(0x1fa)]||_0x1a1e1c[_0x92b404(0x1f0)]||undefined,_0x30dfce=_0x4c6d91||(_0xb935a0?undefined:_0x17c664),_0x3470c1=resolveLocalAppAliasCode(_0x1a1e1c,_0x30dfce),_0x37e9aa=resolveCachedAppCode(_0x30dfce,_0x5e8bd6,_0x412ebb),_0x13acce=_0x5c88a3||_0x3a5b14||_0xb935a0||_0x3470c1||_0x37e9aa||undefined,_0x408807=_0x5c88a3?_0x92b404(0x1ef):_0x3a5b14?_0x92b404(0x212):_0xb935a0?_0x92b404(0x1ed):_0x3470c1?_0x92b404(0x1e7):_0x37e9aa?'cache':undefined,_0x2dcf2d=_0x1a1e1c[_0x92b404(0x211)]||DEFAULT_CONFIG_VALUES[_0x92b404(0x211)],_0x38fb89=undefined,_0x222ac2=_0x52206[_0x92b404(0x209)]||env(_0x92b404(0x21d))||_0x1a1e1c[_0x92b404(0x209)],_0x127eca=normalizeLegacyOutputFormat(_0x222ac2),_0x2e3808=env(_0x92b404(0x228))||_0x1a1e1c[_0x92b404(0x21c)],_0x3286b5=_0x2e3808?Number(_0x2e3808)||undefined:undefined,_0x45732a=_0x1a1e1c[_0x92b404(0x1f4)]||_0x1a1e1c['maxRisk'],_0x25bf8b=_0x45732a==='read'||_0x45732a===_0x92b404(0x1fe)||_0x45732a===_0x92b404(0x1ee)?_0x45732a:DEFAULT_CONFIG_VALUES[_0x92b404(0x1f4)],_0x5d3215=env(_0x92b404(0x1ff)),_0x1dc43c=_0x5d3215==='1'||_0x5d3215===_0x92b404(0x1f5);return{'appCode':typeof _0x13acce===_0x92b404(0x21a)&&_0x13acce[_0x92b404(0x203)]()?_0x13acce['trim']():undefined,'appCodeSource':_0x408807,'env':_0x5e8bd6,'locale':_0x2dcf2d,'cookie':_0x38fb89,'accessKey':_0x412ebb,'format':_0x127eca,'pageSize':_0x3286b5,'riskLevel':_0x25bf8b,'verbose':_0x1dc43c,'defaultApp':_0x17c664,'currentApp':typeof _0x44d162===_0x92b404(0x21a)?_0x44d162:undefined,'raw':_0x1a1e1c};}function env(_0x1e11f3){return productEnv(_0x1e11f3);}async function buildAuth(_0x2c2230){const _0x18dc0e=a99_0x4e6e73,_0x53f112='',_0x28491e=!!_0x2c2230[_0x18dc0e(0x20c)];return{'cookie':_0x53f112,'isLoggedIn':_0x28491e,async 'getOrLogin'(){if(_0x28491e)return _0x53f112;throw CliErrors['authRequired']();}};}
|