diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-05-23 22:26:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 23:26:23 +0200 |
commit | 959739f609dddacde3bbe9ecede2f409214fb34c (patch) | |
tree | 04d1776efbd3561205829f78288d26b6e14c3429 /tests/util/server/src/npm.rs | |
parent | 5de30c53239ac74843725d981afc0bb8c45bdf16 (diff) |
FUTURE: initial support for .npmrc file (#23560)
This commit adds initial support for ".npmrc" files.
Currently we only discover ".npmrc" files next to "package.json" files
and discovering these files in user home dir is left for a follow up.
This pass supports "_authToken" and "_auth" configuration
for providing authentication.
LSP support has been left for a follow up PR.
Towards https://github.com/denoland/deno/issues/16105
Diffstat (limited to 'tests/util/server/src/npm.rs')
-rw-r--r-- | tests/util/server/src/npm.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/util/server/src/npm.rs b/tests/util/server/src/npm.rs index 7cb6a04f2..363a45d7e 100644 --- a/tests/util/server/src/npm.rs +++ b/tests/util/server/src/npm.rs @@ -30,7 +30,6 @@ pub static PUBLIC_TEST_NPM_REGISTRY: Lazy<TestNpmRegistry> = Lazy::new(|| { ) }); -// TODO: rewrite to use config pub static PRIVATE_TEST_NPM_REGISTRY_1: Lazy<TestNpmRegistry> = Lazy::new(|| { TestNpmRegistry::new( @@ -43,6 +42,18 @@ pub static PRIVATE_TEST_NPM_REGISTRY_1: Lazy<TestNpmRegistry> = ) }); +pub static PRIVATE_TEST_NPM_REGISTRY_2: Lazy<TestNpmRegistry> = + Lazy::new(|| { + TestNpmRegistry::new( + NpmRegistryKind::Private, + &format!( + "http://localhost:{}", + crate::servers::PRIVATE_NPM_REGISTRY_2_PORT + ), + "npm-private2", + ) + }); + pub enum NpmRegistryKind { Public, Private, |