@lovrabet/lovrabet-cli 2.2.4-beta.2 → 2.2.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.d.ts +19 -0
- 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.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +4 -4
- package/skills/lovrabet/references/lovrabet-ocr-workflow.md +17 -2
- package/skills/lovrabet.manifest.json +3 -3
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a83_0x16f720=a83_0x4f77;(function(_0xdb013c,_0x1110d9){const _0xc390d7=a83_0x4f77,_0xa97f9c=_0xdb013c();while(!![]){try{const _0x4b1684=-parseInt(_0xc390d7(0xdf))/0x1*(-parseInt(_0xc390d7(0xb6))/0x2)+parseInt(_0xc390d7(0xc8))/0x3+-parseInt(_0xc390d7(0xaf))/0x4*(-parseInt(_0xc390d7(0xbf))/0x5)+-parseInt(_0xc390d7(0xc3))/0x6+parseInt(_0xc390d7(0xd8))/0x7+-parseInt(_0xc390d7(0xbd))/0x8+parseInt(_0xc390d7(0xc5))/0x9*(-parseInt(_0xc390d7(0xcb))/0xa);if(_0x4b1684===_0x1110d9)break;else _0xa97f9c['push'](_0xa97f9c['shift']());}catch(_0x58c3f2){_0xa97f9c['push'](_0xa97f9c['shift']());}}}(a83_0x1969,0x84257));import{spawnSync}from'node:child_process';import a83_0x578d75 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';function a83_0x1969(){const _0x44ac5b=['find','/-/package/','latest','Updating\x20','validation','Already\x20on\x20requested\x20version\x20(v','383464ADUbqj','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','Unable\x20to\x20resolve\x20','current','Invalid\x20version:\x20','boolean','3644888tPoqSr','\x20\x20CLI\x20Built-in\x20Skill\x20','10nOufaz','stderr','string','\x20->\x20','2847702iibAJJ','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','117NVqcWn','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','object','1520676XdfukR','trim','\x20\x20Run\x20manually:\x20','884960CidekU','Update\x20failed:\x20','state','unknown','log','message','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20is\x20current.','read','map','repairCommand','error','status','4716173UABZHp','fromEntries',']:\x20','\x20CLI','run','skillVersion','filter','4aESFhh','beta','str','stdout','pipe','timeout','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','inherit','\x20version\x20from\x20npm.','exit\x20','warn','bool','version','Checking\x20CLI\x20Built-in\x20Skill...','reason','toString','Checking\x20npm\x20dist-tags...','update','Install\x20a\x20specific\x20CLI\x20version','source','nonInteractive','1348776mjihhV'];a83_0x1969=function(){return _0x44ac5b;};return a83_0x1969();}import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a83_0x16f720(0xb2),'type':'boolean','description':a83_0x16f720(0xa0),'default':![]},{'name':'beta','type':a83_0x16f720(0xbc),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a83_0x16f720(0xa6),'type':'string','description':a83_0x16f720(0xac)}];function getRequestedVersion(_0xd97d2d){const _0x1209d7=a83_0x16f720,_0x40ac90=_0xd97d2d[_0x1209d7(0x9c)](_0x1209d7(0xa6))['trim']();if(_0x40ac90)return _0x40ac90;return String(_0xd97d2d['args']?.[0x0]??'')[_0x1209d7(0xc9)]();}async function validateUpdateFlags(_0x5270dc){const _0x59be0b=a83_0x16f720,_0x301957=getRequestedVersion(_0x5270dc),_0x2b6662=[_0x5270dc[_0x59be0b(0xa5)](_0x59be0b(0xb2))?_0x59be0b(0xb2):'',_0x5270dc[_0x59be0b(0xa5)](_0x59be0b(0x9b))?_0x59be0b(0x9b):'',_0x301957?'version':'']['filter'](Boolean);if(_0x2b6662['length']>0x1)throw CliErrors[_0x59be0b(0xb4)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x59be0b(0xb7));if(_0x301957&&!a83_0x578d75['valid'](_0x301957))throw CliErrors[_0x59be0b(0xb4)](_0x59be0b(0xbb)+_0x301957,_0x59be0b(0xd1));}async function fetchNpmDistTags(){const _0x1a5d47=a83_0x16f720;try{const _0xbfb576=NPM_REGISTRY_BASE_URL+_0x1a5d47(0xb1)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x47b965=await fetch(_0xbfb576,{'signal':AbortSignal[_0x1a5d47(0x9f)](0x2710)});if(!_0x47b965['ok'])return null;const _0x13635e=await _0x47b965['json']();if(!_0x13635e||typeof _0x13635e!==_0x1a5d47(0xc7))return null;return Object[_0x1a5d47(0xd9)](Object['entries'](_0x13635e)[_0x1a5d47(0xde)](([,_0x3d0205])=>typeof _0x3d0205===_0x1a5d47(0xc1)&&_0x3d0205[_0x1a5d47(0xc9)]())[_0x1a5d47(0xd4)](([_0x814e77,_0xf9d1cb])=>[_0x814e77,String(_0xf9d1cb)[_0x1a5d47(0xc9)]()]));}catch{return null;}}async function resolveTargetVersion(_0x5f5c11){const _0x350ad6=a83_0x16f720,_0xb499ea=getRequestedVersion(_0x5f5c11);if(_0xb499ea)return{'version':_0xb499ea,'source':'version'};const _0x53de07=_0x5f5c11[_0x350ad6(0xa5)]('beta')?'beta':_0x350ad6(0xb2),_0xb2910c=await fetchNpmDistTags(),_0xfbcec6=_0xb2910c?.[_0x53de07];if(!_0xfbcec6)return null;return{'version':_0xfbcec6,'source':_0x53de07};}function shouldInstallTarget(_0x21f3bb,_0x4b39b8){const _0x4b3e03=a83_0x16f720;if(_0x4b39b8[_0x4b3e03(0xad)]===_0x4b3e03(0xa6)||_0x4b39b8[_0x4b3e03(0xad)]===_0x4b3e03(0x9b))return!a83_0x578d75['eq'](_0x21f3bb,_0x4b39b8[_0x4b3e03(0xa6)]);return a83_0x578d75['lt'](_0x21f3bb,_0x4b39b8[_0x4b3e03(0xa6)]);}function installCliPackage(_0x5f1877,_0x23c992){const _0x1bd7cc=a83_0x16f720,_0x2ce12b=resolveNpmBin('npm'),_0x4484fd=['install','-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5f1877];console[_0x1bd7cc(0xcf)]('*\x20'+[_0x2ce12b,..._0x4484fd]['join']('\x20'));const _0x516541=spawnSync(_0x2ce12b,_0x4484fd,{'cwd':process['cwd'](),'stdio':_0x23c992?'pipe':'inherit','env':process.env,'shell':![]});if(_0x516541[_0x1bd7cc(0xd7)]===0x0)return{'ok':!![]};let _0x20104e=_0x516541['error']?.[_0x1bd7cc(0xd0)]||_0x1bd7cc(0xa3)+(_0x516541['status']??'unknown');if(_0x23c992){const _0x8a97a9=_0x516541[_0x1bd7cc(0xc0)]?_0x516541[_0x1bd7cc(0xc0)][_0x1bd7cc(0xa9)]()['trim']():'',_0x5f506a=_0x516541[_0x1bd7cc(0x9d)]?_0x516541[_0x1bd7cc(0x9d)][_0x1bd7cc(0xa9)]()[_0x1bd7cc(0xc9)]():'';if(_0x8a97a9)_0x20104e=_0x8a97a9;else{if(_0x5f506a)_0x20104e=_0x5f506a;}}return{'ok':![],'error':_0x20104e};}function a83_0x4f77(_0x29fceb,_0x206ebc){_0x29fceb=_0x29fceb-0x9b;const _0x19696e=a83_0x1969();let _0x4f7737=_0x19696e[_0x29fceb];return _0x4f7737;}function repairCurrentBuiltinSkill(_0x235f61){const _0x239c38=a83_0x16f720;console[_0x239c38(0xcf)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x319850=installBuiltinSkill({'stdio':_0x235f61?_0x239c38(0x9e):_0x239c38(0xa1)});if(_0x319850['ok'])return console[_0x239c38(0xcf)](_0x239c38(0xbe)+_0x319850[_0x239c38(0xdd)]+'\x20is\x20current.'),!![];return console[_0x239c38(0xa4)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x319850['code']||'INSTALL_FAILED')+_0x239c38(0xda)+(_0x319850[_0x239c38(0xd6)]||'unknown')),console[_0x239c38(0xcf)]('\x20\x20Run\x20manually:\x20'+_0x319850['repairCommand']),![];}function verifyUpdatedBuiltinSkill(_0x195e8a){const _0x5c1f00=a83_0x16f720;console['log'](_0x5c1f00(0xa7));const _0x25d9ed=inspectInstalledBuiltinSkillVersion(_0x195e8a);if(_0x25d9ed[_0x5c1f00(0xcd)]===_0x5c1f00(0xba))return console[_0x5c1f00(0xcf)](_0x5c1f00(0xbe)+_0x195e8a+_0x5c1f00(0xd2)),!![];console[_0x5c1f00(0xa4)](_0x5c1f00(0xb8)+_0x25d9ed[_0x5c1f00(0xcd)]+'.');if(_0x25d9ed[_0x5c1f00(0xa8)])console['warn']('\x20\x20'+_0x25d9ed[_0x5c1f00(0xa8)]);return console['log'](_0x5c1f00(0xca)+_0x25d9ed[_0x5c1f00(0xd5)]),![];}async function execute(_0x210366){const _0x14f51f=a83_0x16f720;await validateUpdateFlags(_0x210366);const _0x2b0be7=getCliVersion();console['log']('Current\x20version:\x20'+_0x2b0be7),console[_0x14f51f(0xcf)](_0x14f51f(0xaa));const _0x30cf48=await resolveTargetVersion(_0x210366);if(!_0x30cf48){const _0x4ebfae=_0x210366[_0x14f51f(0xa5)]('beta')?_0x14f51f(0x9b):_0x14f51f(0xb2),_0x58e794=_0x14f51f(0xb9)+_0x4ebfae+_0x14f51f(0xa2);return console[_0x14f51f(0xa4)](_0x58e794),console[_0x14f51f(0xcf)](_0x14f51f(0xc6)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4ebfae),{'ok':![]};}const _0x5e357c=[_0x2b0be7,_0x30cf48[_0x14f51f(0xa6)]][_0x14f51f(0xb0)](_0x26094b=>!a83_0x578d75['valid'](_0x26094b));if(_0x5e357c)return console['warn']('Version\x20comparison\x20failed:\x20'+_0x5e357c+'.'),{'ok':![]};if(!shouldInstallTarget(_0x2b0be7,_0x30cf48)){const _0x3bd1f0=_0x30cf48[_0x14f51f(0xad)]===_0x14f51f(0xa6)?_0x14f51f(0xb5)+_0x30cf48[_0x14f51f(0xa6)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x30cf48['version']+').';return console[_0x14f51f(0xcf)](_0x3bd1f0),{'ok':repairCurrentBuiltinSkill(_0x210366[_0x14f51f(0xae)])};}console['log'](_0x14f51f(0xb3)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x2b0be7+_0x14f51f(0xc2)+_0x30cf48['version']);const _0x34c1dc=installCliPackage(_0x30cf48[_0x14f51f(0xa6)],_0x210366[_0x14f51f(0xae)]);if(!_0x34c1dc['ok']){const _0x3da7ec=_0x14f51f(0xcc)+(_0x34c1dc[_0x14f51f(0xd6)]||_0x14f51f(0xce));return console['error'](_0x3da7ec),console[_0x14f51f(0xcf)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x30cf48[_0x14f51f(0xa6)]),{'ok':![]};}return console[_0x14f51f(0xcf)]('Updated\x20to\x20v'+_0x30cf48[_0x14f51f(0xa6)]+'.'),console[_0x14f51f(0xcf)](_0x14f51f(0xc4)),{'ok':verifyUpdatedBuiltinSkill(_0x30cf48['version'])};}export const updateDefinition={'service':a83_0x16f720(0xab),'command':a83_0x16f720(0xdc),'description':'从\x20npm\x20更新\x20'+CLI_BIN_NAME+a83_0x16f720(0xdb),'risk':a83_0x16f720(0xd3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x3d6cb0=a84_0x3f28;(function(_0x4e36bb,_0x50f088){const _0x1a46de=a84_0x3f28,_0x356963=_0x4e36bb();while(!![]){try{const _0x12b7de=parseInt(_0x1a46de(0x1e8))/0x1*(-parseInt(_0x1a46de(0x1f6))/0x2)+-parseInt(_0x1a46de(0x1d2))/0x3*(-parseInt(_0x1a46de(0x1d6))/0x4)+-parseInt(_0x1a46de(0x1e4))/0x5+parseInt(_0x1a46de(0x1e7))/0x6*(-parseInt(_0x1a46de(0x1d4))/0x7)+-parseInt(_0x1a46de(0x1f2))/0x8*(parseInt(_0x1a46de(0x1d1))/0x9)+parseInt(_0x1a46de(0x1d9))/0xa*(parseInt(_0x1a46de(0x1db))/0xb)+parseInt(_0x1a46de(0x1f5))/0xc*(parseInt(_0x1a46de(0x1dc))/0xd);if(_0x12b7de===_0x50f088)break;else _0x356963['push'](_0x356963['shift']());}catch(_0x4d7366){_0x356963['push'](_0x356963['shift']());}}}(a84_0x1046,0x9cb76));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';function a84_0x3f28(_0x29391c,_0x532c68){_0x29391c=_0x29391c-0x1d1;const _0x1046cb=a84_0x1046();let _0x3f283a=_0x1046cb[_0x29391c];return _0x3f283a;}import{CliErrors}from'../../errors.js';function a84_0x1046(){const _0x28d51f=['The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','bind','2532GdqOSE','126onHPLj','trim','333pkqrro','3daLKHj','string','7fFQKSG','write','1153548coQwYe','join','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','4909170XGQdUo','validation','22ozjFFY','46891VYIvCZ','--account-id\x20cannot\x20be\x20empty.','user-account','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','POST','Pass\x20one\x20of:\x20','(empty)','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','562275dMiWAW','dingtalk','将当前\x20AccessKey\x20所属的平台用户绑定到指定协同生态外部账号;已有同\x20provider\x20绑定可能被替换。','5781702jgebOZ','3737FLAlzl','External\x20account\x20provider','str','includes','External\x20account\x20binding\x20was\x20not\x20confirmed.','provider','apiError','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','account-id','16840uxIVKY'];a84_0x1046=function(){return _0x28d51f;};return a84_0x1046();}const CURRENT_BINDING_WARNING=a84_0x3d6cb0(0x1f3),SUPPORTED_PROVIDERS=[a84_0x3d6cb0(0x1e5)];function readBindingInput(_0x488302){const _0x49fb09=a84_0x3d6cb0,_0x3d2cf0=_0x488302[_0x49fb09(0x1ea)](_0x49fb09(0x1ed))[_0x49fb09(0x1f7)]()['toLowerCase']();if(!SUPPORTED_PROVIDERS[_0x49fb09(0x1eb)](_0x3d2cf0))throw CliErrors[_0x49fb09(0x1da)]('Unsupported\x20provider:\x20'+(_0x3d2cf0||_0x49fb09(0x1e2))+'.',_0x49fb09(0x1e1)+SUPPORTED_PROVIDERS[_0x49fb09(0x1d7)](',\x20')+'.');const _0x361699=_0x488302[_0x49fb09(0x1ea)](_0x49fb09(0x1f1))[_0x49fb09(0x1f7)]();if(!_0x361699)throw CliErrors[_0x49fb09(0x1da)](_0x49fb09(0x1dd),_0x49fb09(0x1df));return{'provider':_0x3d2cf0,'accountId':_0x361699};}function buildBindingData(_0x281551,_0x2b5239,_0x475bcc){const _0x237be0=a84_0x3d6cb0;return{'operation':_0x237be0(0x1f4),'selector':{'provider':_0x281551,'accountId':_0x2b5239},'before':null,'after':{'provider':_0x281551,'accountId':_0x2b5239,'bound':!![]},'dryRun':_0x475bcc,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a84_0x3d6cb0(0x1de),'command':a84_0x3d6cb0(0x1f4),'description':a84_0x3d6cb0(0x1d8),'risk':a84_0x3d6cb0(0x1d5),'confirmationDescription':a84_0x3d6cb0(0x1e6),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a84_0x3d6cb0(0x1ed),'type':a84_0x3d6cb0(0x1d3),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a84_0x3d6cb0(0x1e9)},{'name':a84_0x3d6cb0(0x1f1),'type':'string','required':!![],'description':a84_0x3d6cb0(0x1e3)}],async 'validate'(_0xb1ba2c){readBindingInput(_0xb1ba2c);},async 'dryRun'(_0xacde08){const _0x168136=a84_0x3d6cb0,{provider:_0x4bd2f2,accountId:_0x59dee1}=readBindingInput(_0xacde08);return{...buildBindingData(_0x4bd2f2,_0x59dee1,!![]),'method':_0x168136(0x1e0),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x4bd2f2,'accountId':_0x59dee1}};},async 'execute'(_0x4ac234){const _0x168a62=a84_0x3d6cb0,{provider:_0x2a7fc7,accountId:_0x4fd393}=readBindingInput(_0x4ac234),_0x46a46f=await bindExternalUserAccount(_0x2a7fc7,_0x4fd393);if(_0x46a46f!==!![])throw CliErrors[_0x168a62(0x1ee)](_0x168a62(0x1ec),_0x168a62(0x1f0));return{'ok':!![],'data':buildBindingData(_0x2a7fc7,_0x4fd393,![]),'message':_0x168a62(0x1ef)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a85_0x24e4(_0x566d22,_0x549b1f){_0x566d22=_0x566d22-0x1a1;const _0x20b9d6=a85_0x20b9();let _0x24e423=_0x20b9d6[_0x566d22];return _0x24e423;}(function(_0xd45880,_0x25862d){const _0x4779b6=a85_0x24e4,_0x195154=_0xd45880();while(!![]){try{const _0x4d9a92=-parseInt(_0x4779b6(0x1a8))/0x1+-parseInt(_0x4779b6(0x1a9))/0x2+parseInt(_0x4779b6(0x1a7))/0x3*(parseInt(_0x4779b6(0x1a4))/0x4)+-parseInt(_0x4779b6(0x1a6))/0x5+parseInt(_0x4779b6(0x1a3))/0x6*(-parseInt(_0x4779b6(0x1a1))/0x7)+parseInt(_0x4779b6(0x1a2))/0x8+parseInt(_0x4779b6(0x1aa))/0x9*(parseInt(_0x4779b6(0x1a5))/0xa);if(_0x4d9a92===_0x25862d)break;else _0x195154['push'](_0x195154['shift']());}catch(_0x3f944c){_0x195154['push'](_0x195154['shift']());}}}(a85_0x20b9,0x8f0ce));import{bindUserAccount}from'../../commands/user-account/bind.js';export const userAccountDefinitions=[bindUserAccount];function a85_0x20b9(){const _0x16a73a=['461388ZVCNUN','1524530PaSype','90ywCWnY','7AESBBs','2822856GfiNbA','533688tMypZS','12efjBTo','1093940iInxAC','625285zmaKdF','576795ldVmCv'];a85_0x20b9=function(){return _0x16a73a;};return a85_0x20b9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x3dd84c=a86_0x5c04;(function(_0x334d4f,_0x640217){const _0x56f556=a86_0x5c04,_0x105a1e=_0x334d4f();while(!![]){try{const _0x53117d=-parseInt(_0x56f556(0x193))/0x1+parseInt(_0x56f556(0x18d))/0x2*(-parseInt(_0x56f556(0x16d))/0x3)+parseInt(_0x56f556(0x160))/0x4*(parseInt(_0x56f556(0x192))/0x5)+-parseInt(_0x56f556(0x175))/0x6+-parseInt(_0x56f556(0x15d))/0x7*(parseInt(_0x56f556(0x169))/0x8)+parseInt(_0x56f556(0x17f))/0x9+parseInt(_0x56f556(0x16a))/0xa;if(_0x53117d===_0x640217)break;else _0x105a1e['push'](_0x105a1e['shift']());}catch(_0x4b372b){_0x105a1e['push'](_0x105a1e['shift']());}}}(a86_0x5c20,0xd96b1));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';const WORKSPACE_USE_FLAGS=[{'name':a86_0x3dd84c(0x17b),'type':a86_0x3dd84c(0x17e),'description':a86_0x3dd84c(0x17d)},{'name':a86_0x3dd84c(0x194),'type':'string','description':'App\x20code\x20to\x20bind\x20directly'},{'name':a86_0x3dd84c(0x168),'type':a86_0x3dd84c(0x17e),'description':a86_0x3dd84c(0x164),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x5c0305,_0x1be1ef){const _0x39866e=a86_0x3dd84c,_0x5806bb=_0x5c0305['str']('app')[_0x39866e(0x180)](),_0x32d8e2=_0x5c0305[_0x39866e(0x191)]('appcode')[_0x39866e(0x180)](),_0x48c6e2=_0x5c0305[_0x39866e(0x191)](_0x39866e(0x168))[_0x39866e(0x180)](),_0x4eb3d8=resolveWorkspaceEnv(_0x48c6e2||_0x5c0305[_0x39866e(0x190)]||DEFAULT_CONFIG_VALUES[_0x39866e(0x168)]);if(!_0x5806bb&&!_0x32d8e2)throw CliErrors[_0x39866e(0x170)](_0x39866e(0x187),'Usage:\x20'+CLI_BIN_NAME+'\x20workspace\x20'+_0x1be1ef+_0x39866e(0x18e)+CLI_BIN_NAME+_0x39866e(0x16f)+_0x1be1ef+'\x20--appcode\x20<code>\x20[--env\x20daily]');if(_0x5806bb&&_0x32d8e2)throw CliErrors[_0x39866e(0x170)](_0x39866e(0x195),'Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.');const _0x5e3d21=resolveWriteConfigPath(_0x39866e(0x167)),_0x3cd782=readConfigFile(_0x5e3d21);assertWorkspaceCommandState(_0x1be1ef,_0x3cd782);const _0x2cc667=_0x32d8e2||await resolveRemoteAppCode({'command':_0x1be1ef,'appName':_0x5806bb,'env':_0x4eb3d8,'accessKey':_0x5c0305['accessKey']});return writeWorkspaceConfig({'command':_0x1be1ef,'appName':_0x5806bb,'appcode':_0x2cc667,'env':_0x4eb3d8,'shouldWriteEnv':!!_0x48c6e2,'accessKey':_0x5c0305['accessKey']},_0x5e3d21,_0x3cd782),{'ok':!![],'data':{'configPath':_0x5e3d21,'app':_0x5806bb||null,'appcode':_0x2cc667,'env':_0x48c6e2?_0x4eb3d8:null,'accessKeyWritten':![],'command':_0x39866e(0x178)+_0x1be1ef},'message':buildWorkspaceMessage(_0x5e3d21,_0x5806bb,_0x2cc667,_0x48c6e2?_0x4eb3d8:undefined)};}async function resolveRemoteAppCode(_0x42ec35){const _0x42cabd=a86_0x3dd84c;if(!_0x42ec35[_0x42cabd(0x15f)])throw CliErrors[_0x42cabd(0x196)](_0x42cabd(0x189)+CLI_BIN_NAME+_0x42cabd(0x16f)+_0x42ec35[_0x42cabd(0x186)]+'.');const {setActiveAK:_0x2cf877}=await import('../../core/api-client.js'),{getRemoteAppList:_0xfef9e}=await import(_0x42cabd(0x17a));_0x2cf877(_0x42ec35[_0x42cabd(0x15f)]);const _0x571552=await _0xfef9e({'env':_0x42ec35[_0x42cabd(0x168)],'accessKey':_0x42ec35['accessKey'],'noCache':![]}),_0x1fc3d3=findAppByName(_0x571552[_0x42cabd(0x17c)],_0x42ec35[_0x42cabd(0x172)]);if(_0x1fc3d3&&!isRuntimeAccessibleApp(_0x1fc3d3))throw runtimeInaccessibleAppError(_0x1fc3d3,'\x22'+_0x42ec35[_0x42cabd(0x172)]+'\x22');const _0x55122c=_0x1fc3d3?.[_0x42cabd(0x18a)]?.[_0x42cabd(0x180)]();if(_0x55122c)return _0x55122c;const _0x366c3b=_0x571552[_0x42cabd(0x17c)]['map'](_0x10d03f=>_0x10d03f[_0x42cabd(0x172)])[_0x42cabd(0x165)](Boolean),_0x1be96a=_0x366c3b[_0x42cabd(0x179)]?_0x42cabd(0x182)+Array[_0x42cabd(0x15c)](new Set(_0x366c3b))[_0x42cabd(0x16b)](',\x20')+'.':_0x42cabd(0x173)+CLI_BIN_NAME+_0x42cabd(0x162);throw CliErrors[_0x42cabd(0x170)](_0x42cabd(0x197)+_0x42ec35[_0x42cabd(0x172)]+'\x22\x20not\x20found.',_0x1be96a);}function writeWorkspaceConfig(_0x58a504,_0x4df85a,_0xadad31){const _0x43c505=a86_0x3dd84c;_0x58a504[_0x43c505(0x161)]&&(_0xadad31[_0x43c505(0x168)]=_0x58a504[_0x43c505(0x168)]);if(_0x58a504['appName']){const _0x9f3abc=isRecord(_0xadad31[_0x43c505(0x176)])?{..._0xadad31[_0x43c505(0x176)]}:{},_0x45ab0b=isRecord(_0x9f3abc[_0x58a504[_0x43c505(0x172)]])?_0x9f3abc[_0x58a504[_0x43c505(0x172)]]:{};return _0x9f3abc[_0x58a504[_0x43c505(0x172)]]={..._0x45ab0b,'appcode':_0x58a504['appcode']},_0xadad31[_0x43c505(0x176)]=_0x9f3abc,_0xadad31[_0x43c505(0x166)]=_0x58a504[_0x43c505(0x172)],delete _0xadad31[_0x43c505(0x194)],delete _0xadad31[_0x43c505(0x17b)],writeAndReturn(_0x4df85a,_0xadad31);}return _0xadad31['appcode']=_0x58a504[_0x43c505(0x194)],delete _0xadad31[_0x43c505(0x166)],delete _0xadad31[_0x43c505(0x17b)],writeAndReturn(_0x4df85a,_0xadad31);}function a86_0x5c04(_0x3cfcfc,_0x4ed703){_0x3cfcfc=_0x3cfcfc-0x15c;const _0x5c208a=a86_0x5c20();let _0x5c04d7=_0x5c208a[_0x3cfcfc];return _0x5c04d7;}function writeAndReturn(_0x1831d8,_0x41c55c){return writeConfigFile(_0x1831d8,_0x41c55c),_0x1831d8;}function resolveWorkspaceEnv(_0x51ea0b){const _0x3d0887=a86_0x3dd84c;if(RUNTIME_ENV_VALUES[_0x3d0887(0x18c)](_0x51ea0b))return _0x51ea0b;throw CliErrors[_0x3d0887(0x170)]('Invalid\x20env\x20\x22'+_0x51ea0b+_0x3d0887(0x181)+RUNTIME_ENV_VALUES[_0x3d0887(0x16b)](',\x20'));}function buildWorkspaceMessage(_0x4f694e,_0x53adf6,_0x3460c2,_0x1e20fa){const _0x167cf9=a86_0x3dd84c,_0x19c821=_0x53adf6?_0x53adf6+'\x20('+_0x3460c2+')':_0x3460c2,_0x3bb868=_0x1e20fa?_0x167cf9(0x18f)+_0x1e20fa:'';return _0x167cf9(0x15e)+_0x4f694e+_0x167cf9(0x183)+_0x19c821+_0x3bb868+_0x167cf9(0x177);}function isRecord(_0x2693c2){const _0x48a140=a86_0x3dd84c;return typeof _0x2693c2==='object'&&_0x2693c2!==null&&!Array[_0x48a140(0x185)](_0x2693c2);}function hasWorkspaceAppBinding(_0x8f26e3){const _0x35da36=a86_0x3dd84c;if(typeof _0x8f26e3[_0x35da36(0x194)]===_0x35da36(0x17e)&&_0x8f26e3['appcode'][_0x35da36(0x180)]()['length']>0x0)return!![];if(typeof _0x8f26e3['defaultApp']!==_0x35da36(0x17e)||!_0x8f26e3[_0x35da36(0x166)]['trim']())return![];if(!isRecord(_0x8f26e3[_0x35da36(0x176)]))return![];const _0x242ca4=_0x8f26e3[_0x35da36(0x176)][_0x8f26e3['defaultApp'][_0x35da36(0x180)]()];return isRecord(_0x242ca4)&&typeof _0x242ca4[_0x35da36(0x194)]===_0x35da36(0x17e)&&_0x242ca4['appcode'][_0x35da36(0x180)]()[_0x35da36(0x179)]>0x0;}function a86_0x5c20(){const _0x43d3d0=['将在尚未绑定应用的当前工作目录写入\x20Lovrabet\x20项目配置,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','includes','2lZkbMZ','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','\x0aEnv:\x20','envName','str','10NPnpZo','1424708eZtCGG','appcode','Conflicting\x20workspace\x20app\x20selectors.','authRequired','App\x20\x22','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','from','133AKXQLY','Workspace\x20configured.\x0aConfig\x20file:\x20','accessKey','1435388rCRhkG','shouldWriteEnv','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','Use\x20`','Target\x20environment','filter','defaultApp','project','env','101392xKPvxi','26220950UmhaLa','join','use','2141481lvroGe','Workspace\x20app\x20context\x20is\x20not\x20initialized.','\x20workspace\x20','validation','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','appName','Run\x20`','init','7017990jwPnSj','apps','\x0aAccessKey:\x20not\x20written','workspace\x20','length','../../commands/app/remote-source.js','app','items','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','string','9897858efBhyD','trim','\x22.\x20Allowed:\x20','Available\x20apps:\x20','\x0aDefault\x20app:\x20','将更新当前工作目录已有的应用绑定,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','isArray','command','Missing\x20workspace\x20app\x20selector.','为尚未绑定应用的当前工作目录初始化应用上下文','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','appCode'];a86_0x5c20=function(){return _0x43d3d0;};return a86_0x5c20();}function assertWorkspaceCommandState(_0x4ff4bd,_0xa9d69c){const _0x5ce859=a86_0x3dd84c,_0x324131=hasWorkspaceAppBinding(_0xa9d69c);if(_0x4ff4bd===_0x5ce859(0x174)&&_0x324131)throw CliErrors['validation']('Workspace\x20app\x20context\x20is\x20already\x20initialized.',_0x5ce859(0x163)+CLI_BIN_NAME+_0x5ce859(0x171)+CLI_BIN_NAME+_0x5ce859(0x198));if(_0x4ff4bd==='use'&&!_0x324131)throw CliErrors[_0x5ce859(0x170)](_0x5ce859(0x16e),_0x5ce859(0x173)+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');}function makeWorkspaceCommand(_0x5c8a13){const _0x24865a=a86_0x3dd84c;return{'service':'workspace','command':_0x5c8a13,'description':_0x5c8a13===_0x24865a(0x174)?_0x24865a(0x188):'修改当前工作目录已有绑定的应用上下文','risk':'write','confirmationDescription':_0x5c8a13===_0x24865a(0x174)?_0x24865a(0x18b):_0x24865a(0x184),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x4fc187){return executeWorkspaceUse(_0x4fc187,_0x5c8a13);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a86_0x3dd84c(0x174)),makeWorkspaceCommand(a86_0x3dd84c(0x16c))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x1e05fd=a87_0x3c77;(function(_0x6e5fe1,_0x569fb7){const _0x310b82=a87_0x3c77,_0x1be4e0=_0x6e5fe1();while(!![]){try{const _0x2a6eea=parseInt(_0x310b82(0x1f6))/0x1+-parseInt(_0x310b82(0x1ed))/0x2+-parseInt(_0x310b82(0x205))/0x3+-parseInt(_0x310b82(0x204))/0x4*(parseInt(_0x310b82(0x1f9))/0x5)+-parseInt(_0x310b82(0x1fb))/0x6+parseInt(_0x310b82(0x1fd))/0x7+-parseInt(_0x310b82(0x208))/0x8*(-parseInt(_0x310b82(0x1f1))/0x9);if(_0x2a6eea===_0x569fb7)break;else _0x1be4e0['push'](_0x1be4e0['shift']());}catch(_0x3f22be){_0x1be4e0['push'](_0x1be4e0['shift']());}}}(a87_0x5398,0xf2000));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a87_0x1e05fd(0x1f8),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x1e05fd(0x1fa)],'importable':!![]},'format':{'description':a87_0x1e05fd(0x1ee),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a87_0x1e05fd(0x1fc),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a87_0x1e05fd(0x1f5),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a87_0x1e05fd(0x201),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a87_0x1e05fd(0x1f2),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a87_0x1e05fd(0x1f3),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x1e05fd(0x1f4)],'importable':!![]},'locale':{'description':'Locale','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['locale'],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a87_0x1e05fd(0x209)](CONFIG_FIELD_SCHEMAS)[a87_0x1e05fd(0x203)](([,_0x4f808f])=>_0x4f808f['cliSettableTopLevel'])[a87_0x1e05fd(0x202)](([_0x4b46f6])=>_0x4b46f6));export const CONFIG_ENUM_VALUES=Object[a87_0x1e05fd(0x1ef)](Object[a87_0x1e05fd(0x209)](CONFIG_FIELD_SCHEMAS)[a87_0x1e05fd(0x203)](([,_0x59ea80])=>_0x59ea80[a87_0x1e05fd(0x207)])['map'](([_0x5b8397,_0x5a37fa])=>[_0x5b8397,[..._0x5a37fa[a87_0x1e05fd(0x207)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a87_0x1e05fd(0x209)](CONFIG_FIELD_SCHEMAS)[a87_0x1e05fd(0x203)](([,_0x10ed7d])=>_0x10ed7d['importable'])[a87_0x1e05fd(0x202)](([_0x176ef3])=>_0x176ef3);export function getConfigFieldSchema(_0x22b0ab){return CONFIG_FIELD_SCHEMAS[_0x22b0ab];}export function getConfigEnumValues(_0x2ae1e1){return getConfigFieldSchema(_0x2ae1e1)?.['enumValues'];}function a87_0x3c77(_0x5e13f2,_0xd20615){_0x5e13f2=_0x5e13f2-0x1ed;const _0x53989e=a87_0x5398();let _0x3c7778=_0x53989e[_0x5e13f2];return _0x3c7778;}export function getConfigDefaultValue(_0x5becb6){const _0x562b7d=a87_0x1e05fd;return getConfigFieldSchema(_0x5becb6)?.[_0x562b7d(0x1f0)];}export function isTopLevelConfigKey(_0x4fd585){const _0x2a6df9=a87_0x1e05fd;return TOP_LEVEL_CONFIG_KEYS[_0x2a6df9(0x200)](_0x4fd585);}export function isLegacyCompatConfigKey(_0x5e6b19){const _0x548018=a87_0x1e05fd;return getConfigFieldSchema(_0x5e6b19)?.[_0x548018(0x1fe)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}function a87_0x5398(){const _0x34bd9b=['filter','76892ubiXfc','3843750LFLwxu','Config\x20key.\x20Top-level:\x20','enumValues','8MNRBct','entries','2619928CtkmYC','Default\x20output\x20format','fromEntries','defaultValue','22333977MhDdIA','Access\x20key\x20(client-ak\x20auth)','Risk\x20level','riskLevel','Override\x20runtime\x20domain','1809020GxBHan',';\x20local\x20alias:\x20apps.<alias>.appcode','Target\x20environment','225GZBxXX','env','9382212fLerQt','Override\x20API\x20domain','12044270ngSjWP','legacyCompatOnly','join','has','Override\x20SkillHub\x20domain','map'];a87_0x5398=function(){return _0x34bd9b;};return a87_0x5398();}export function formatConfigKeyList(_0x4349da){const _0x4eb322=a87_0x1e05fd;return[..._0x4349da][_0x4eb322(0x1ff)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x5e51ae=a87_0x1e05fd;return _0x5e51ae(0x206)+getTopLevelConfigKeySummary()+_0x5e51ae(0x1f7);}export function buildAppProfileListFields(_0x124567){return{'env':_0x124567,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x4792a8=a88_0x1dc1;(function(_0x36812a,_0x548c7d){const _0x277319=a88_0x1dc1,_0x16dc3c=_0x36812a();while(!![]){try{const _0x3a4a4b=-parseInt(_0x277319(0x102))/0x1+parseInt(_0x277319(0xfb))/0x2*(-parseInt(_0x277319(0x104))/0x3)+-parseInt(_0x277319(0x105))/0x4+-parseInt(_0x277319(0xff))/0x5*(parseInt(_0x277319(0x107))/0x6)+parseInt(_0x277319(0xfe))/0x7+-parseInt(_0x277319(0x106))/0x8*(-parseInt(_0x277319(0xfd))/0x9)+-parseInt(_0x277319(0x103))/0xa*(parseInt(_0x277319(0x100))/0xb);if(_0x3a4a4b===_0x548c7d)break;else _0x16dc3c['push'](_0x16dc3c['shift']());}catch(_0x307fcb){_0x16dc3c['push'](_0x16dc3c['shift']());}}}(a88_0x4254,0x8c547));function a88_0x1dc1(_0x415fb5,_0x5b6e51){_0x415fb5=_0x415fb5-0xfb;const _0x4254e=a88_0x4254();let _0x1dc15c=_0x4254e[_0x415fb5];return _0x1dc15c;}export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a88_0x4792a8(0xfc)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a88_0x4792a8(0x101)];function a88_0x4254(){const _0x48169c=['11fwZkBv','Published','120060hByjvw','387690XMGHkc','764433mETBrZ','150796SGOcBO','4005544GWmGMf','144HNNIjw','6Yiwcwc','UNPUBLISH','18QecnJG','6441498LeemXp','80385RhurYL'];a88_0x4254=function(){return _0x48169c;};return a88_0x4254();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a89_0x59fc1e=a89_0x6f6b;(function(_0x4f1af2,_0x4d761c){const _0x23534a=a89_0x6f6b,_0x12ab22=_0x4f1af2();while(!![]){try{const _0x3eaefb=-parseInt(_0x23534a(0x146))/0x1*(parseInt(_0x23534a(0x14a))/0x2)+-parseInt(_0x23534a(0x148))/0x3+parseInt(_0x23534a(0x14c))/0x4+-parseInt(_0x23534a(0x14b))/0x5*(parseInt(_0x23534a(0x145))/0x6)+-parseInt(_0x23534a(0x143))/0x7+parseInt(_0x23534a(0x144))/0x8*(-parseInt(_0x23534a(0x147))/0x9)+parseInt(_0x23534a(0x141))/0xa*(parseInt(_0x23534a(0x14d))/0xb);if(_0x3eaefb===_0x4d761c)break;else _0x12ab22['push'](_0x12ab22['shift']());}catch(_0x39b943){_0x12ab22['push'](_0x12ab22['shift']());}}}(a89_0x178a,0xcafd2));export const AUTH_MODE={'ClientAk':a89_0x59fc1e(0x149)};function a89_0x6f6b(_0x5408f5,_0x117e00){_0x5408f5=_0x5408f5-0x141;const _0x178a36=a89_0x178a();let _0x6f6b14=_0x178a36[_0x5408f5];return _0x6f6b14;}export function isAuthMode(_0x1b619a){const _0x2499bb=a89_0x59fc1e;return _0x1b619a===AUTH_MODE[_0x2499bb(0x142)];}function a89_0x178a(){const _0x257b45=['4771797HuhNbl','client-ak','2ztrpeb','1103570hvaaHS','2193260gwAXjY','23916629pQagab','20QcYJcM','ClientAk','9886079lujpMT','18256VbHbQd','12ICEaeA','123551LhXjLa','1962ZpKvdm'];a89_0x178a=function(){return _0x257b45;};return a89_0x178a();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a90_0x5dda(_0xfd733c,_0x129f2e){_0xfd733c=_0xfd733c-0xe4;const _0x4c387b=a90_0x4c38();let _0x5dda3a=_0x4c387b[_0xfd733c];return _0x5dda3a;}function a90_0x4c38(){const _0x5d56b1=['fromEntries','3065288VvIKxG','help','528ERxCnn','yes','dry-run','Output\x20format','appcode','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','Name\x20filter','Preview\x20operation\x20without\x20executing','clear','sqlcode','Alias\x20for\x20--non-interactive','4491399qNuyRI','map','99mIHqFW','cliDisplayName','type','891001DuRbGi','format','env','global','non-interactive','<code>','boolean','Verbose\x20output','json\x20|\x20pretty\x20|\x20compress','11175lChHbl','string','production\x20|\x20development\x20|\x20daily','1281848hpnufJ','1611561TIRQnN','Skip\x20confirmation\x20for\x20high-risk\x20writes','SQL\x20query\x20code','Record\x20ID','meowKey','name','1877980GIcAqr','cliBinName','app','<name>','verbose','params'];a90_0x4c38=function(){return _0x5d56b1;};return a90_0x4c38();}const a90_0x417fc5=a90_0x5dda;(function(_0x1cc828,_0x4b3fea){const _0x59bee8=a90_0x5dda,_0x1bfe18=_0x1cc828();while(!![]){try{const _0x43bd73=parseInt(_0x59bee8(0x10c))/0x1+parseInt(_0x59bee8(0xf3))/0x2+parseInt(_0x59bee8(0x107))/0x3+-parseInt(_0x59bee8(0xfa))/0x4+parseInt(_0x59bee8(0xe9))/0x5*(parseInt(_0x59bee8(0xfc))/0x6)+-parseInt(_0x59bee8(0xed))/0x7+parseInt(_0x59bee8(0xec))/0x8*(-parseInt(_0x59bee8(0x109))/0x9);if(_0x43bd73===_0x4b3fea)break;else _0x1bfe18['push'](_0x1bfe18['shift']());}catch(_0x23ea9d){_0x1bfe18['push'](_0x1bfe18['shift']());}}}(a90_0x4c38,0xbab2e));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a90_0x417fc5(0xf4)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a90_0x417fc5(0x10a)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a90_0x417fc5(0x100),'meowKey':a90_0x417fc5(0x100),'type':a90_0x417fc5(0xea),'description':'Override\x20appcode','hint':a90_0x417fc5(0xe5)},{'name':a90_0x417fc5(0xf5),'meowKey':'app','type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a90_0x417fc5(0xf6)},{'name':'env','meowKey':a90_0x417fc5(0x10e),'type':a90_0x417fc5(0xea),'description':'Environment','hint':a90_0x417fc5(0xeb)},{'name':'format','meowKey':'format','type':'string','description':a90_0x417fc5(0xff),'hint':a90_0x417fc5(0xe8)},{'name':'jq','meowKey':'jq','type':a90_0x417fc5(0xea),'description':a90_0x417fc5(0x101),'hint':'<expr>'},{'name':a90_0x417fc5(0xfe),'meowKey':'dryRun','type':a90_0x417fc5(0xe6),'description':a90_0x417fc5(0x103)},{'name':a90_0x417fc5(0xfd),'meowKey':a90_0x417fc5(0xfd),'type':'boolean','description':a90_0x417fc5(0xee)},{'name':'non-interactive','meowKey':'nonInteractive','type':'boolean','description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a90_0x417fc5(0x10f),'meowKey':a90_0x417fc5(0x10f),'type':a90_0x417fc5(0xe6),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a90_0x417fc5(0xe6),'description':a90_0x417fc5(0x106),'hidden':!![]},{'name':a90_0x417fc5(0xfb),'meowKey':'help','type':'boolean','description':'Show\x20help'},{'name':'id','meowKey':'id','type':a90_0x417fc5(0xea),'description':a90_0x417fc5(0xf0),'hidden':!![]},{'name':a90_0x417fc5(0xf2),'meowKey':a90_0x417fc5(0xf2),'type':a90_0x417fc5(0xea),'description':a90_0x417fc5(0x102),'hidden':!![]},{'name':a90_0x417fc5(0x105),'meowKey':a90_0x417fc5(0x105),'type':a90_0x417fc5(0xea),'description':a90_0x417fc5(0xef),'hidden':!![]},{'name':a90_0x417fc5(0xf8),'meowKey':a90_0x417fc5(0xf8),'type':a90_0x417fc5(0xea),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':'verbose','meowKey':a90_0x417fc5(0xf7),'type':a90_0x417fc5(0xe6),'description':a90_0x417fc5(0xe7),'hidden':!![]},{'name':a90_0x417fc5(0x104),'meowKey':a90_0x417fc5(0x104),'type':'boolean','description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a90_0x417fc5(0x100),a90_0x417fc5(0xf5),a90_0x417fc5(0x10e),a90_0x417fc5(0x10d),'jq',a90_0x417fc5(0xfe),a90_0x417fc5(0xfd),a90_0x417fc5(0xe4),'ci']);export function buildMeowFlags(){const _0x345788=a90_0x417fc5;return Object[_0x345788(0xf9)](GLOBAL_FLAGS[_0x345788(0x108)](_0x35da0a=>[_0x35da0a[_0x345788(0xf1)],{'type':_0x35da0a[_0x345788(0x10b)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x36d421=a91_0x41e4;(function(_0x3ea935,_0x296658){const _0x448861=a91_0x41e4,_0x4e9ef9=_0x3ea935();while(!![]){try{const _0x20531f=parseInt(_0x448861(0x16f))/0x1+-parseInt(_0x448861(0x169))/0x2*(-parseInt(_0x448861(0x168))/0x3)+parseInt(_0x448861(0x16a))/0x4+-parseInt(_0x448861(0x16e))/0x5+-parseInt(_0x448861(0x171))/0x6*(parseInt(_0x448861(0x16d))/0x7)+-parseInt(_0x448861(0x172))/0x8+-parseInt(_0x448861(0x16b))/0x9*(parseInt(_0x448861(0x173))/0xa);if(_0x20531f===_0x296658)break;else _0x4e9ef9['push'](_0x4e9ef9['shift']());}catch(_0x24e90b){_0x4e9ef9['push'](_0x4e9ef9['shift']());}}}(a91_0x2e7d,0xcb682));function a91_0x2e7d(){const _0x5dd0f9=['production','112zDNRTb','2135325edcMEY','1516612BKYqZq','write','424854sbwaMC','3057320pJNXKI','90GNPRmo','en-US','compress','6eczFpa','1223168oJEdXT','211708gEERnU','17379jrojMg'];a91_0x2e7d=function(){return _0x5dd0f9;};return a91_0x2e7d();}export const DEFAULT_APP_PROFILE_NAME='main';function a91_0x41e4(_0x2e90cc,_0x316780){_0x2e90cc=_0x2e90cc-0x167;const _0x2e7d7c=a91_0x2e7d();let _0x41e4d4=_0x2e7d7c[_0x2e90cc];return _0x41e4d4;}export const DEFAULT_CONFIG_VALUES={'env':a91_0x36d421(0x16c),'format':a91_0x36d421(0x167),'locale':a91_0x36d421(0x174),'riskLevel':a91_0x36d421(0x170)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x1d47fc=a92_0xff6a;function a92_0xc846(){const _0x1ecb44=['143018DSysdJ','3UHKoAb','21ZQBeWt','119694SIKwfT','25137tUeFDN','1074500MGqYlP','380500tOGpOR','1496737PQcIwX','skillSource','npmRegistryBaseUrl','1pOOpwY','72BJJaGh','542056YyOZLX','npmPackageName','48LursbI'];a92_0xc846=function(){return _0x1ecb44;};return a92_0xc846();}(function(_0x4c7029,_0x24675b){const _0x22a9d6=a92_0xff6a,_0x9c760e=_0x4c7029();while(!![]){try{const _0x5c99e5=-parseInt(_0x22a9d6(0x1b0))/0x1*(parseInt(_0x22a9d6(0x1a6))/0x2)+-parseInt(_0x22a9d6(0x1a7))/0x3*(-parseInt(_0x22a9d6(0x1b2))/0x4)+-parseInt(_0x22a9d6(0x1ab))/0x5+-parseInt(_0x22a9d6(0x1a9))/0x6*(parseInt(_0x22a9d6(0x1a8))/0x7)+parseInt(_0x22a9d6(0x1b1))/0x8*(parseInt(_0x22a9d6(0x1aa))/0x9)+-parseInt(_0x22a9d6(0x1ac))/0xa+parseInt(_0x22a9d6(0x1ad))/0xb*(parseInt(_0x22a9d6(0x1a5))/0xc);if(_0x5c99e5===_0x24675b)break;else _0x9c760e['push'](_0x9c760e['shift']());}catch(_0x58a088){_0x9c760e['push'](_0x9c760e['shift']());}}}(a92_0xc846,0x4e465));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a92_0x1d47fc(0x1a4)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a92_0x1d47fc(0x1ae)];function a92_0xff6a(_0x570d64,_0x5b9a41){_0x570d64=_0x570d64-0x1a4;const _0xc84640=a92_0xc846();let _0xff6a17=_0xc84640[_0x570d64];return _0xff6a17;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a92_0x1d47fc(0x1af)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a93_0x2f4c(_0x4f4ac4,_0x489543){_0x4f4ac4=_0x4f4ac4-0xd6;const _0x130912=a93_0x1309();let _0x2f4cad=_0x130912[_0x4f4ac4];return _0x2f4cad;}const a93_0x2d7b2e=a93_0x2f4c;(function(_0x1dd572,_0x5c6b15){const _0xf701a1=a93_0x2f4c,_0x28f38e=_0x1dd572();while(!![]){try{const _0x35da3a=-parseInt(_0xf701a1(0xdd))/0x1+parseInt(_0xf701a1(0xe6))/0x2*(parseInt(_0xf701a1(0xda))/0x3)+-parseInt(_0xf701a1(0xea))/0x4+-parseInt(_0xf701a1(0xe8))/0x5*(-parseInt(_0xf701a1(0xdc))/0x6)+parseInt(_0xf701a1(0xe9))/0x7*(-parseInt(_0xf701a1(0xd6))/0x8)+-parseInt(_0xf701a1(0xd7))/0x9*(-parseInt(_0xf701a1(0xe7))/0xa)+-parseInt(_0xf701a1(0xe0))/0xb*(-parseInt(_0xf701a1(0xe3))/0xc);if(_0x35da3a===_0x5c6b15)break;else _0x28f38e['push'](_0x28f38e['shift']());}catch(_0x22f517){_0x28f38e['push'](_0x28f38e['shift']());}}}(a93_0x1309,0x299ae));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;function a93_0x1309(){const _0x55f9ca=['skillHubDomain','121206moZhvC','10PQBROc','256615DLPcTF','7IKTkXw','1043616yXgZkl','1775384PzJmBg','2192787OXjMAj','nonProduction','runtime','3KoZsbp','apiDomain','30NKGSmN','316933WlBDNe','domains','userDomain','4502443lmlFEG','production','api','12aSEBze','user'];a93_0x1309=function(){return _0x55f9ca;};return a93_0x1309();}export function initDomains(_0xf993fc){const _0x459275=a93_0x2f4c;customApiDomain=_0xf993fc?.[_0x459275(0xdb)],customUserDomain=_0xf993fc?.[_0x459275(0xdf)],customRuntimeDomain=_0xf993fc?.['runtimeDomain'],customSkillHubDomain=_0xf993fc?.[_0x459275(0xe5)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x2d7b2e(0xde)][a93_0x2d7b2e(0xe1)][a93_0x2d7b2e(0xe4)]:PRODUCT_CONFIG[a93_0x2d7b2e(0xde)][a93_0x2d7b2e(0xd8)][a93_0x2d7b2e(0xe4)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x2d7b2e(0xde)][a93_0x2d7b2e(0xe1)][a93_0x2d7b2e(0xe2)]:PRODUCT_CONFIG[a93_0x2d7b2e(0xde)][a93_0x2d7b2e(0xd8)][a93_0x2d7b2e(0xe2)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x2d7b2e(0xde)][a93_0x2d7b2e(0xe1)][a93_0x2d7b2e(0xd9)]:PRODUCT_CONFIG[a93_0x2d7b2e(0xde)]['nonProduction'][a93_0x2d7b2e(0xd9)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a93_0x2d7b2e(0xde)]['production']['skillhub']:PRODUCT_CONFIG['domains'][a93_0x2d7b2e(0xd8)]['skillhub']);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a94_0x3b4460=a94_0x3ff1;(function(_0x201ef3,_0xfc17a3){const _0x4d65a6=a94_0x3ff1,_0x257426=_0x201ef3();while(!![]){try{const _0x4234cf=-parseInt(_0x4d65a6(0x1b1))/0x1+-parseInt(_0x4d65a6(0x1a4))/0x2+parseInt(_0x4d65a6(0x1a6))/0x3*(parseInt(_0x4d65a6(0x1ab))/0x4)+parseInt(_0x4d65a6(0x1a9))/0x5+parseInt(_0x4d65a6(0x1b0))/0x6*(-parseInt(_0x4d65a6(0x1af))/0x7)+parseInt(_0x4d65a6(0x1a7))/0x8+-parseInt(_0x4d65a6(0x1ae))/0x9;if(_0x4234cf===_0xfc17a3)break;else _0x257426['push'](_0x257426['shift']());}catch(_0x3dab40){_0x257426['push'](_0x257426['shift']());}}}(a94_0x53c5,0xeb6ed));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a94_0x3b4460(0x1a8),a94_0x3b4460(0x1ad)];function a94_0x53c5(){const _0x36689e=['676268JVStXg','online','858378zIMiLy','13936952IFWWpY','development','3111360kTItZi','production','8hHqZPI','ENV','daily','6788385nNEeos','17787moROEi','312CVICDv','747779Dqzjlq'];a94_0x53c5=function(){return _0x36689e;};return a94_0x53c5();}function a94_0x3ff1(_0x1e3250,_0x41d8fb){_0x1e3250=_0x1e3250-0x1a4;const _0x53c5d3=a94_0x53c5();let _0x3ff19b=_0x53c5d3[_0x1e3250];return _0x3ff19b;}export function normalizeEnv(_0x219f36){const _0x24bdb1=a94_0x3b4460;return _0x219f36===_0x24bdb1(0x1a5)?_0x24bdb1(0x1aa):_0x219f36;}export function isProduction(_0xd01077){const _0xa97f75=a94_0x3b4460;return normalizeEnv(_0xd01077)===_0xa97f75(0x1aa);}export function isDaily(_0x2865be){const _0x508177=a94_0x3b4460;return normalizeEnv(_0x2865be)===_0x508177(0x1ad);}export function isDev(_0x287925){const _0x374241=a94_0x3b4460,_0x5dafe8=normalizeEnv(_0x287925);return _0x5dafe8===_0x374241(0x1a8)||_0x5dafe8==='dev';}let env=normalizeEnv(productEnv(a94_0x3b4460(0x1ac))||a94_0x3b4460(0x1aa));export function getEnv(){return env;}export function initEnv(_0x36f15a){env=normalizeEnv(_0x36f15a);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a95_0x1d52(){const _0x580065=['2926752DfWlzZ','3DbMPBO','358890WxNyJJ','9050130VbnRzv','55900mMAoHg','8671720EIheDc','compress','18740130PNnByr','7svSqYs','5717540WWCKDm','1FZgQba','json'];a95_0x1d52=function(){return _0x580065;};return a95_0x1d52();}const a95_0x1ddac7=a95_0x18aa;(function(_0x1ec332,_0x2a42f0){const _0x212f57=a95_0x18aa,_0x3b986b=_0x1ec332();while(!![]){try{const _0x4dd591=parseInt(_0x212f57(0x6b))/0x1*(parseInt(_0x212f57(0x6f))/0x2)+-parseInt(_0x212f57(0x6e))/0x3*(-parseInt(_0x212f57(0x71))/0x4)+parseInt(_0x212f57(0x6a))/0x5+-parseInt(_0x212f57(0x6d))/0x6+-parseInt(_0x212f57(0x69))/0x7*(parseInt(_0x212f57(0x66))/0x8)+-parseInt(_0x212f57(0x70))/0x9+parseInt(_0x212f57(0x68))/0xa;if(_0x4dd591===_0x2a42f0)break;else _0x3b986b['push'](_0x3b986b['shift']());}catch(_0x55fad8){_0x3b986b['push'](_0x3b986b['shift']());}}}(a95_0x1d52,0x9ab0e));function a95_0x18aa(_0x494a8d,_0x56debf){_0x494a8d=_0x494a8d-0x66;const _0x1d527b=a95_0x1d52();let _0x18aae3=_0x1d527b[_0x494a8d];return _0x18aae3;}export const OUTPUT_FORMAT_VALUES=[a95_0x1ddac7(0x6c),'pretty',a95_0x1ddac7(0x67)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x408298=a96_0x1d9d;(function(_0x2c0cfe,_0x120abd){const _0x231ab1=a96_0x1d9d,_0x3c1ca4=_0x2c0cfe();while(!![]){try{const _0x35e77c=parseInt(_0x231ab1(0x7d))/0x1*(-parseInt(_0x231ab1(0x83))/0x2)+-parseInt(_0x231ab1(0x82))/0x3*(-parseInt(_0x231ab1(0x8f))/0x4)+parseInt(_0x231ab1(0x7b))/0x5*(parseInt(_0x231ab1(0x81))/0x6)+parseInt(_0x231ab1(0x88))/0x7*(-parseInt(_0x231ab1(0x84))/0x8)+-parseInt(_0x231ab1(0x7a))/0x9+parseInt(_0x231ab1(0x8d))/0xa+-parseInt(_0x231ab1(0x90))/0xb;if(_0x35e77c===_0x120abd)break;else _0x3c1ca4['push'](_0x3c1ca4['shift']());}catch(_0x43f0bc){_0x3c1ca4['push'](_0x3c1ca4['shift']());}}}(a96_0x3727,0x36239));function a96_0x1d9d(_0x5e635f,_0x3038cc){_0x5e635f=_0x5e635f-0x70;const _0x372769=a96_0x3727();let _0x1d9d83=_0x372769[_0x5e635f];return _0x1d9d83;}function a96_0x3727(){const _0x347193=['54246rsxWWf','8Rsmcko','.lovrabetrc','https://user.lovrabet.com','https://daily-api.lovrabet.com','90223rHWrur','https://registry.npmjs.org','https://daily-runtime.lovrabet.com','envPrefix','map','1824750YzDfES','SKIP_NPX_SKILLS','151576YKmUtO','459349tDMYYJ','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','https://user-daily.lovrabet.com','RABETBASE','LOVRABET','/user/ak','lovrabet','legacyEnvPrefixes','https://runtime.lovrabet.com','https://skills.lovrabet.com','.lovrabet-runtime.log','2037915tkgGBR','475235LwzDKb','https://skills-daily.lovrabet.com','5jwOAUN','cli:lovrabet-runtime','.lovrabet','@lovrabet/lovrabet-cli','24MbxHZY','6cPukua'];a96_0x3727=function(){return _0x347193;};return a96_0x3727();}export const PRODUCT_CONFIG={'cliBinName':a96_0x408298(0x75),'cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':a96_0x408298(0x80),'skillSource':'lovrabet/lovrabet-cli','internalSkillSource':a96_0x408298(0x70),'globalSkillName':'lovrabet','npmRegistryBaseUrl':a96_0x408298(0x89),'envPrefix':a96_0x408298(0x73),'legacyEnvPrefixes':[a96_0x408298(0x72)],'configFileNames':['.lovrabet.json',a96_0x408298(0x85)],'newConfigFileName':'.lovrabet.json','homeDirName':a96_0x408298(0x7f),'logFileName':a96_0x408298(0x79),'invokeSource':a96_0x408298(0x7e),'userCenterDisplayName':'Lovrabet\x20User\x20Center','skipNpxSkillsEnvSuffix':a96_0x408298(0x8e),'domains':{'production':{'user':a96_0x408298(0x86),'api':'https://api.lovrabet.com','runtime':a96_0x408298(0x77),'skillhub':a96_0x408298(0x78)},'nonProduction':{'user':a96_0x408298(0x71),'api':a96_0x408298(0x87),'runtime':a96_0x408298(0x8a),'skillhub':a96_0x408298(0x7c)}},'accessKeyCreatePath':a96_0x408298(0x74)};export function productEnvName(_0x4c7cdd){const _0x501ea8=a96_0x408298;return PRODUCT_CONFIG[_0x501ea8(0x8b)]+'_'+_0x4c7cdd;}export function productEnvNames(_0xe98f93){const _0x369fbc=a96_0x408298;return[productEnvName(_0xe98f93),...PRODUCT_CONFIG[_0x369fbc(0x76)][_0x369fbc(0x8c)](_0x17b9fa=>_0x17b9fa+'_'+_0xe98f93)];}export function productEnv(_0x35e983){for(const _0x1ed3f0 of productEnvNames(_0x35e983)){const _0x35dbac=process.env[_0x1ed3f0];if(_0x35dbac!==undefined)return _0x35dbac;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a97_0xd432(_0x476ba7,_0x38d524){_0x476ba7=_0x476ba7-0x1c9;const _0x5605c1=a97_0x5605();let _0xd43294=_0x5605c1[_0x476ba7];return _0xd43294;}const a97_0x1f36d4=a97_0xd432;function a97_0x5605(){const _0x49c40c=['15815iGMutf','135887IAJNmE','81JtnTwx','3lbNsCG','read','17739469CKRJsT','write','12XIQkNM','21455ijAWjV','918746SQIUVu','4wDEKdz','7936080ikmeWm','458792sgInqJ','570irCsck'];a97_0x5605=function(){return _0x49c40c;};return a97_0x5605();}(function(_0x48d1b3,_0x2a5a99){const _0x5f0553=a97_0xd432,_0x7d590a=_0x48d1b3();while(!![]){try{const _0x11a3fe=parseInt(_0x5f0553(0x1d1))/0x1+parseInt(_0x5f0553(0x1cb))/0x2*(parseInt(_0x5f0553(0x1d3))/0x3)+parseInt(_0x5f0553(0x1cc))/0x4*(parseInt(_0x5f0553(0x1d0))/0x5)+parseInt(_0x5f0553(0x1cf))/0x6*(parseInt(_0x5f0553(0x1ca))/0x7)+parseInt(_0x5f0553(0x1ce))/0x8*(parseInt(_0x5f0553(0x1d2))/0x9)+parseInt(_0x5f0553(0x1cd))/0xa+parseInt(_0x5f0553(0x1d5))/0xb*(-parseInt(_0x5f0553(0x1c9))/0xc);if(_0x11a3fe===_0x2a5a99)break;else _0x7d590a['push'](_0x7d590a['shift']());}catch(_0x2425b0){_0x7d590a['push'](_0x7d590a['shift']());}}}(a97_0x5605,0x8f3ac));export const RISK_LEVEL_VALUES=[a97_0x1f36d4(0x1d4),a97_0x1f36d4(0x1d6),'high-risk-write'];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a98_0x1aa2b1=a98_0x8559;(function(_0x4da77f,_0x49ae45){const _0x9ba3e0=a98_0x8559,_0xe4f591=_0x4da77f();while(!![]){try{const _0x26cfaf=-parseInt(_0x9ba3e0(0x132))/0x1+-parseInt(_0x9ba3e0(0x133))/0x2*(parseInt(_0x9ba3e0(0x138))/0x3)+-parseInt(_0x9ba3e0(0x13d))/0x4+-parseInt(_0x9ba3e0(0x13c))/0x5*(parseInt(_0x9ba3e0(0x13b))/0x6)+parseInt(_0x9ba3e0(0x134))/0x7*(-parseInt(_0x9ba3e0(0x136))/0x8)+parseInt(_0x9ba3e0(0x131))/0x9*(-parseInt(_0x9ba3e0(0x13a))/0xa)+parseInt(_0x9ba3e0(0x130))/0xb*(parseInt(_0x9ba3e0(0x139))/0xc);if(_0x26cfaf===_0x49ae45)break;else _0xe4f591['push'](_0xe4f591['shift']());}catch(_0x146f67){_0xe4f591['push'](_0xe4f591['shift']());}}}(a98_0x2482,0xc1557));import{PRODUCT_CONFIG}from'../constant/product.js';function a98_0x8559(_0x54c659,_0x4f77d4){_0x54c659=_0x54c659-0x130;const _0x2482b9=a98_0x2482();let _0x85595e=_0x2482b9[_0x54c659];return _0x85595e;}function a98_0x2482(){const _0x208f9c=['25182oXuhIv','1875GuzgLu','4646968MtXHqW','49896YvBbOk','19818yxbQiO','1248550JfXqGI','56230CGMUsu','7HmgSSr','user','9916264FrKFzD','domains','21GJWrQG','19068astWom','4520GBMeSg'];a98_0x2482=function(){return _0x208f9c;};return a98_0x2482();}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a98_0x1aa2b1(0x137)]['production'][a98_0x1aa2b1(0x135)]+PRODUCT_CONFIG['accessKeyCreatePath'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a99_0x4229ec=a99_0x3de0;(function(_0x148b64,_0x57c094){const _0x1fc884=a99_0x3de0,_0x549c85=_0x148b64();while(!![]){try{const _0x8f9b02=-parseInt(_0x1fc884(0xf8))/0x1*(-parseInt(_0x1fc884(0xf7))/0x2)+-parseInt(_0x1fc884(0x10d))/0x3*(parseInt(_0x1fc884(0xc5))/0x4)+-parseInt(_0x1fc884(0xca))/0x5*(parseInt(_0x1fc884(0xe8))/0x6)+-parseInt(_0x1fc884(0xe1))/0x7+-parseInt(_0x1fc884(0x108))/0x8*(parseInt(_0x1fc884(0x10c))/0x9)+-parseInt(_0x1fc884(0xf6))/0xa*(-parseInt(_0x1fc884(0xd9))/0xb)+-parseInt(_0x1fc884(0xcd))/0xc*(-parseInt(_0x1fc884(0xda))/0xd);if(_0x8f9b02===_0x57c094)break;else _0x549c85['push'](_0x549c85['shift']());}catch(_0x4c2863){_0x549c85['push'](_0x549c85['shift']());}}}(a99_0x5774,0xb1271));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a99_0x5774(){const _0x24a665=['runtimeDomain','3197601qotkyr','3351345orpruk','riskLevel','maxRisk','newConfigFileName','4TUUHWd','env','high-risk-write','missing','object','1614590WpAZvN','values','stdin','12TkFhuo','nonInteractive','explicit','code','ENV','stdout','some','parse','.tmp','apiDomain','skillHubDomain','./constant/domain.js','5599ZoGlSR','47718658nguCIO','cwd','read','string','isTTY','PAGE_SIZE','local-alias','7065744OaSkkn','appcode','global','top-level','locale','APPCODE','projectConfig','6hJcbKX','configFileNames','slice','trim','cache','true','EXDEV','find','APP','setLogPath','authRequired','FORMAT','inherit','globalConfig','1090VsLvOw','2HrsRgJ','514762Nbwclu','setRawMode','project','EACCES','./constant/env.js','format','online','app','daily','raw','join','VERBOSE','accessKey','production','utf8','empty','24umWHPh','defaultApp','apps'];a99_0x5774=function(){return _0x24a665;};return a99_0x5774();}import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';function a99_0x3de0(_0x28eec3,_0x4aac61){_0x28eec3=_0x28eec3-0xc3;const _0x57745f=a99_0x5774();let _0x3de084=_0x57745f[_0x28eec3];return _0x3de084;}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_0x4229ec(0xe9)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a99_0x4229ec(0xc4)];function resolveConfigPath(_0x568a5e){for(const _0x1b2ede of CONFIG_NAMES){const _0x1c35f8=resolve(_0x568a5e,_0x1b2ede);if(existsSync(_0x1c35f8))return _0x1c35f8;}return undefined;}export function resolveWriteConfigPath(_0x18665b){const _0x5f4931=a99_0x4229ec,_0x59e33d=_0x18665b===_0x5f4931(0xfa)?process[_0x5f4931(0xdb)]():homedir(),_0x9f3395=resolveConfigPath(_0x59e33d);return _0x9f3395??resolve(_0x59e33d,NEW_CONFIG_NAME);}export function readConfigFile(_0x3715a7){const _0x56c583=a99_0x4229ec;try{if(existsSync(_0x3715a7)){const _0x48952f=readFileSync(_0x3715a7,{'encoding':_0x56c583(0x106)});if(_0x48952f){const _0x1ed836=JSON['parse'](_0x48952f);return migrateOnlineEnv(_0x3715a7,_0x1ed836),_0x1ed836;}}}catch{}return{};}function migrateOnlineEnv(_0x328850,_0x5c07b5){const _0x578df4=a99_0x4229ec;let _0x931b7a=![];_0x5c07b5[_0x578df4(0xc6)]===_0x578df4(0xfe)&&(_0x5c07b5[_0x578df4(0xc6)]='production',_0x931b7a=!![]);if(_0x5c07b5[_0x578df4(0x10a)]&&typeof _0x5c07b5[_0x578df4(0x10a)]===_0x578df4(0xc9))for(const _0x45ea4e of Object[_0x578df4(0xcb)](_0x5c07b5[_0x578df4(0x10a)])){_0x45ea4e&&_0x45ea4e['env']===_0x578df4(0xfe)&&(_0x45ea4e[_0x578df4(0xc6)]=_0x578df4(0x105),_0x931b7a=!![]);}if(_0x931b7a)try{writeConfigFile(_0x328850,_0x5c07b5);}catch{}}export function writeConfigFile(_0x2e1cbd,_0x1e2814){const _0x1dd3e4=a99_0x4229ec,_0x494761=dirname(_0x2e1cbd);!existsSync(_0x494761)&&mkdirSync(_0x494761,{'recursive':!![]});const _0x2e2f70=_0x2e1cbd+_0x1dd3e4(0xd5);try{writeFileSync(_0x2e2f70,JSON['stringify'](_0x1e2814,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x2e2f70,_0x2e1cbd);}catch(_0x5229db){if(_0x5229db['code']==='EPERM'||_0x5229db[_0x1dd3e4(0xd0)]===_0x1dd3e4(0xee)||_0x5229db[_0x1dd3e4(0xd0)]===_0x1dd3e4(0xfb)){writeFileSync(_0x2e1cbd,JSON['stringify'](_0x1e2814,null,0x2)+'\x0a',{'encoding':_0x1dd3e4(0x106)});try{unlinkSync(_0x2e2f70);}catch{}}else throw _0x5229db;}}catch(_0x1c504f){try{unlinkSync(_0x2e2f70);}catch{}throw _0x1c504f;}}export function isNonInteractiveMode(_0x2d43f1){const _0x23519f=a99_0x4229ec;return!!(_0x2d43f1[_0x23519f(0xce)]||_0x2d43f1['ci']||productEnvNames('CI')[_0x23519f(0xd3)](_0x3b4642=>process.env[_0x3b4642]==='true')||process.env.CI===_0x23519f(0xed)||!process[_0x23519f(0xd2)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x20b61c=a99_0x4229ec;if(!process[_0x20b61c(0xcc)][_0x20b61c(0xde)])return![];try{const _0xc4371d=process[_0x20b61c(0xcc)]['isRaw'];return process[_0x20b61c(0xcc)]['setRawMode'](!![]),process[_0x20b61c(0xcc)][_0x20b61c(0xf9)](_0xc4371d??![]),!![];}catch{return![];}}export async function createContext(_0x4476ce){const _0x4713cb=a99_0x4229ec,_0x5b07d4=readRawConfig(),_0x301178=buildConfig(_0x5b07d4,_0x4476ce);await initGlobalEnvironment(_0x301178);const {getUserDomain:_0x1af7e5,getApiDomain:_0x40a44f}=await import('./constant/domain.js'),_0x5af938={'apiDomain':_0x40a44f(),'userDomain':_0x1af7e5()},_0x56701e=await buildAuth(_0x301178);logger[_0x4713cb(0xf1)](process['cwd']());const _0x37c4dd=(CLI_BIN_NAME+'\x20'+process['argv'][_0x4713cb(0xea)](0x2)[_0x4713cb(0x102)]('\x20'))[_0x4713cb(0xeb)]();logger['setRawCommand'](_0x37c4dd);const _0x179daf=isNonInteractiveMode(_0x4476ce);return{'config':_0x301178,'auth':_0x56701e,'logger':logger,'env':_0x5af938,'nonInteractive':_0x179daf};}export function buildConfigFromFlags(_0x51b2df){return buildConfig(readRawConfig(),_0x51b2df);}export function getLocalAppAliases(_0x2ed323){const _0x4fb416=a99_0x4229ec;return _0x2ed323[_0x4fb416(0x10a)]&&typeof _0x2ed323[_0x4fb416(0x10a)]===_0x4fb416(0xc9)?_0x2ed323[_0x4fb416(0x10a)]:{};}export function resolveLocalAppAliasCode(_0xe345db,_0x52d320){const _0x4ac119=a99_0x4229ec;if(!_0x52d320)return undefined;const _0x3ba21c=getLocalAppAliases(_0xe345db)[_0x52d320],_0x2eba41=_0x3ba21c?.[_0x4ac119(0xe2)];return typeof _0x2eba41===_0x4ac119(0xdd)&&_0x2eba41['trim']()?_0x2eba41[_0x4ac119(0xeb)]():undefined;}export function readAppCodeFromConfig(){const _0x4c4d3f=a99_0x4229ec,_0x147b0c=readRawConfig(),_0x6b5147=_0x147b0c[_0x4c4d3f(0xe2)]??_0x147b0c['app'];if(typeof _0x6b5147==='string'&&_0x6b5147[_0x4c4d3f(0xeb)]())return _0x6b5147[_0x4c4d3f(0xeb)]();const _0x21e2d5=resolveLocalAppAliasCode(_0x147b0c,typeof _0x147b0c[_0x4c4d3f(0x109)]==='string'?_0x147b0c[_0x4c4d3f(0x109)]:undefined);if(_0x21e2d5)return _0x21e2d5;const _0x620789=normalizeEnv(String(_0x147b0c[_0x4c4d3f(0xc6)]||_0x4c4d3f(0x105))),_0x27d68d=isDaily(_0x620789)?_0x4c4d3f(0x100):isDev(_0x620789)?'development':'production',_0x3c55c1=resolveCachedAppCode(typeof _0x147b0c[_0x4c4d3f(0x109)]===_0x4c4d3f(0xdd)?_0x147b0c[_0x4c4d3f(0x109)]:undefined,_0x27d68d,typeof _0x147b0c[_0x4c4d3f(0x104)]===_0x4c4d3f(0xdd)?_0x147b0c['accessKey']:undefined);if(_0x3c55c1)return _0x3c55c1;const _0x23652e=Object['values'](getLocalAppAliases(_0x147b0c))[_0x4c4d3f(0xef)](_0x5172ca=>_0x5172ca?.[_0x4c4d3f(0xe2)]);return typeof _0x23652e?.['appcode']==='string'&&_0x23652e[_0x4c4d3f(0xe2)][_0x4c4d3f(0xeb)]()?_0x23652e[_0x4c4d3f(0xe2)][_0x4c4d3f(0xeb)]():undefined;}export function readScopedConfig(_0x1cd367){const _0x56e736=a99_0x4229ec,_0x2d6eab=_0x1cd367[_0x56e736(0xe3)]?_0x56e736(0xe3):_0x56e736(0xfa);return readConfigFile(resolveWriteConfigPath(_0x2d6eab));}export function writeScopedConfig(_0x1b8286,_0x4843c8){const _0x2bfed2=a99_0x4229ec,_0x3c414a=_0x4843c8['global']?'global':_0x2bfed2(0xfa);writeConfigFile(resolveWriteConfigPath(_0x3c414a),_0x1b8286);}export async function initGlobalEnvironment(_0x4fc83c){const _0x5417b3=a99_0x4229ec,{initEnv:_0x1effc0}=await import(_0x5417b3(0xfc));_0x1effc0(_0x4fc83c[_0x5417b3(0xc6)]);const {initDomains:_0xd2944d}=await import(_0x5417b3(0xd8));_0xd2944d({'apiDomain':_0x4fc83c['raw'][_0x5417b3(0xd6)]||_0x4fc83c[_0x5417b3(0x101)]['host']||undefined,'userDomain':_0x4fc83c[_0x5417b3(0x101)]['userDomain']||undefined,'runtimeDomain':_0x4fc83c[_0x5417b3(0x101)][_0x5417b3(0x10b)]||undefined,'skillHubDomain':_0x4fc83c[_0x5417b3(0x101)][_0x5417b3(0xd7)]||undefined});}export function getProjectConfigPath(){const _0x3c970b=a99_0x4229ec;return resolveConfigPath(process[_0x3c970b(0xdb)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x476226){const _0x456ff9=a99_0x4229ec;if(!existsSync(_0x476226))return{'status':_0x456ff9(0xc8)};try{const _0x365b38=readFileSync(_0x476226,{'encoding':_0x456ff9(0x106)});if(!_0x365b38?.[_0x456ff9(0xeb)]())return{'status':_0x456ff9(0x107)};const _0x457615=JSON[_0x456ff9(0xd4)](_0x365b38);return{'status':'ok','data':_0x457615};}catch(_0x142f72){return{'status':'error','message':_0x142f72 instanceof Error?_0x142f72['message']:String(_0x142f72)};}}export function loadRawConfigLayers(_0x3f6b57){const _0x581002=a99_0x4229ec;let _0x329046={},_0x4bfcf8={},_0x13eac4,_0x5a9cff;try{_0x13eac4=resolveConfigPath(homedir());if(_0x13eac4){const _0x202221=readFileSync(_0x13eac4,{'encoding':_0x581002(0x106)});if(_0x202221)_0x329046=JSON[_0x581002(0xd4)](_0x202221);}}catch{}try{const _0x4ebe18=_0x3f6b57||process[_0x581002(0xdb)]();_0x5a9cff=resolveConfigPath(_0x4ebe18);if(_0x5a9cff){const _0x16486e=readFileSync(_0x5a9cff,{'encoding':_0x581002(0x106)});if(_0x16486e)_0x4bfcf8=JSON['parse'](_0x16486e);}}catch{}return{'globalPath':_0x13eac4,'projectPath':_0x5a9cff,'globalConfig':_0x329046,'projectConfig':_0x4bfcf8};}function mergeRawConfigLayers(_0x1977c1){const _0x20c409=a99_0x4229ec,{globalConfig:_0x24fa4e,projectConfig:_0x353763}=_0x1977c1;if(_0x353763[_0x20c409(0xf4)]===![]){const _0x12bf60={..._0x353763};return delete _0x12bf60[_0x20c409(0xf4)],_0x12bf60;}const _0x45db2e={..._0x24fa4e,..._0x353763};if(_0x20c409(0x109)in _0x353763)_0x45db2e['defaultApp']=_0x353763[_0x20c409(0x109)];else _0x24fa4e[_0x20c409(0x109)]&&(_0x45db2e[_0x20c409(0x109)]=_0x24fa4e['defaultApp']);return _0x45db2e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x27b258){return mergeRawConfigLayers(loadRawConfigLayers(_0x27b258));}export function readRawConfigWithLayers(_0x45638e){const _0x5c588e=loadRawConfigLayers(_0x45638e);return{'config':mergeRawConfigLayers(_0x5c588e),'layers':_0x5c588e};}export function resolveDefaultAppSource(_0x1c43ed){const _0x31b0af=a99_0x4229ec;if(_0x31b0af(0x109)in _0x1c43ed[_0x31b0af(0xe7)])return _0x31b0af(0xfa);if(_0x1c43ed[_0x31b0af(0xe7)][_0x31b0af(0xf4)]===![])return null;if(_0x1c43ed[_0x31b0af(0xf5)]['defaultApp'])return _0x31b0af(0xe3);return null;}function buildConfig(_0xcc1c5a,_0x1be46a){const _0x39cd4b=a99_0x4229ec,_0x2d4b80=_0xcc1c5a[_0x39cd4b(0x109)]||undefined,_0x325e0d=_0x1be46a[_0x39cd4b(0xff)]||env(_0x39cd4b(0xf0))||undefined,_0x4fbc0f=_0x325e0d||_0x2d4b80||undefined,_0x3f81ef=env('ACCESS_KEY')||_0xcc1c5a[_0x39cd4b(0x104)]||undefined,_0x148429=_0x1be46a[_0x39cd4b(0xc6)]||env(_0x39cd4b(0xd1))||_0xcc1c5a[_0x39cd4b(0xc6)]||DEFAULT_CONFIG_VALUES[_0x39cd4b(0xc6)],_0x1367f5=normalizeEnv(String(_0x148429)),_0x481d8d=isDaily(_0x1367f5)?'daily':isDev(_0x1367f5)?'development':_0x39cd4b(0x105),_0x420938=typeof _0x1be46a[_0x39cd4b(0xe2)]===_0x39cd4b(0xdd)?_0x1be46a[_0x39cd4b(0xe2)]:undefined,_0xc0e2b6=env(_0x39cd4b(0xe6)),_0x3bf245=_0x325e0d?undefined:_0xcc1c5a[_0x39cd4b(0xe2)]||_0xcc1c5a[_0x39cd4b(0xff)]||undefined,_0xad8d33=_0x325e0d||(_0x3bf245?undefined:_0x2d4b80),_0x46ae46=resolveLocalAppAliasCode(_0xcc1c5a,_0xad8d33),_0x4e5e97=resolveCachedAppCode(_0xad8d33,_0x481d8d,_0x3f81ef),_0x797070=_0x420938||_0xc0e2b6||_0x3bf245||_0x46ae46||_0x4e5e97||undefined,_0x48df84=_0x420938?_0x39cd4b(0xcf):_0xc0e2b6?_0x39cd4b(0xc6):_0x3bf245?_0x39cd4b(0xe4):_0x46ae46?_0x39cd4b(0xe0):_0x4e5e97?_0x39cd4b(0xec):undefined,_0x52c075=_0xcc1c5a[_0x39cd4b(0xe5)]||DEFAULT_CONFIG_VALUES[_0x39cd4b(0xe5)],_0x13dcad=undefined,_0x375948=_0x1be46a['format']||env(_0x39cd4b(0xf3))||_0xcc1c5a[_0x39cd4b(0xfd)],_0x42606c=normalizeLegacyOutputFormat(_0x375948),_0x54c2ad=env(_0x39cd4b(0xdf))||_0xcc1c5a['pageSize'],_0x5d9c0f=_0x54c2ad?Number(_0x54c2ad)||undefined:undefined,_0x206d30=_0xcc1c5a[_0x39cd4b(0x10e)]||_0xcc1c5a[_0x39cd4b(0xc3)],_0x3f0b30=_0x206d30===_0x39cd4b(0xdc)||_0x206d30==='write'||_0x206d30===_0x39cd4b(0xc7)?_0x206d30:DEFAULT_CONFIG_VALUES[_0x39cd4b(0x10e)],_0x5b365c=env(_0x39cd4b(0x103)),_0x12ae39=_0x5b365c==='1'||_0x5b365c===_0x39cd4b(0xed);return{'appCode':typeof _0x797070===_0x39cd4b(0xdd)&&_0x797070['trim']()?_0x797070[_0x39cd4b(0xeb)]():undefined,'appCodeSource':_0x48df84,'env':_0x481d8d,'locale':_0x52c075,'cookie':_0x13dcad,'accessKey':_0x3f81ef,'format':_0x42606c,'pageSize':_0x5d9c0f,'riskLevel':_0x3f0b30,'verbose':_0x12ae39,'defaultApp':_0x2d4b80,'currentApp':typeof _0x4fbc0f===_0x39cd4b(0xdd)?_0x4fbc0f:undefined,'raw':_0xcc1c5a};}function env(_0x31c363){return productEnv(_0x31c363);}async function buildAuth(_0x184a5d){const _0x6ec7f2=a99_0x4229ec,_0x7b9125='',_0x44288c=!!_0x184a5d[_0x6ec7f2(0x104)];return{'cookie':_0x7b9125,'isLoggedIn':_0x44288c,async 'getOrLogin'(){const _0x4b4ed9=_0x6ec7f2;if(_0x44288c)return _0x7b9125;throw CliErrors[_0x4b4ed9(0xf2)]();}};}
|
|
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']();}};}
|