Compare commits

..

57 Commits

Author SHA1 Message Date
Juan Picado
f07fd5d525 chore: update versions (6-next) (#3961)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-08 08:11:41 +02:00
renovate[bot]
4acc4a46ec chore(deps): update dependency msw to v0.49.3 (#3963)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 08:11:14 +02:00
verdacciobot
ce9f49d897 chore: updated static data 2023-08-07 00:14:08 +00:00
Juan Picado
0a6412ca97 feat: refactor upstream proxy and hooks with got v12 (#3946)
* feat: proxy with got v12

* fix tests

* refactor hooks module
2023-08-06 17:42:20 +02:00
verdacciobot
ab09f03b63 chore: updated static data 2023-08-03 00:14:09 +00:00
renovate[bot]
00b393f012 chore(deps): update dependency @orama/orama to v1.1.1 (#3955) 2023-08-02 17:11:14 +02:00
renovate[bot]
90a65d404c chore(deps): update github/codeql-action digest to 0ba4244 (#3954)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-31 21:55:07 +02:00
renovate[bot]
8ade7e5ddf chore(deps): update dependency @types/lodash to v4.14.196 (#3956)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-31 21:54:59 +02:00
dependabot[bot]
92622bbbfc chore(deps): bump github/codeql-action from 2.21.0 to 2.21.2 (#3958)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.0 to 2.21.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1813ca74c3...0ba4244466)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-31 21:54:49 +02:00
dependabot[bot]
ce3621d43b chore(deps): bump pnpm/action-setup from 2.2.4 to 2.4.0 (#3959)
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 2.2.4 to 2.4.0.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](c3b53f6a16...d882d12c64)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-31 21:54:42 +02:00
renovate[bot]
ef058beadf chore(deps): update dependency js-base64 to v3.7.5 (#3957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-31 21:54:29 +02:00
verdacciobot
623a774888 chore: updated static data 2023-07-31 00:14:11 +00:00
verdacciobot
54232a2115 chore: updated static data 2023-07-27 00:13:54 +00:00
renovate[bot]
842ad8c12d chore(deps): update dependency html-webpack-plugin to v5.5.3 (#3950)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-26 21:16:40 +02:00
renovate[bot]
a90c3115a4 chore(deps): update dependency @types/node to v16.18.39 (#3948)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-25 09:24:59 +02:00
renovate[bot]
5174d7dba7 chore(deps): update dependency @types/testing-library__jest-dom to v5.14.9 (#3949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-25 09:24:50 +02:00
dependabot[bot]
99d65ecbee chore(deps): bump marocchino/sticky-pull-request-comment (#3951)
Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](f61b6cf21e...f6a2580ed5)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-25 09:24:42 +02:00
verdacciobot
b49d932507 chore: updated static data 2023-07-24 00:15:07 +00:00
renovate[bot]
d18d227af4 chore(deps): update github/codeql-action digest to 1813ca7 (#3938)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-21 00:34:25 +02:00
verdacciobot
202e07aa15 chore: updated static data 2023-07-20 00:13:48 +00:00
renovate[bot]
2cb6b1df9d chore(deps): update dependency @orama/orama to v1.1.0 (#3939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-19 21:42:42 +02:00
dependabot[bot]
cfa86929ca chore(deps): bump github/codeql-action from 2.20.3 to 2.20.4 (#3940)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.3 to 2.20.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](46ed16ded9...489225d82a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 21:50:56 +02:00
verdacciobot
af8cbf48cf chore: updated static data 2023-07-17 00:16:24 +00:00
Juan Picado
7e48d714b9 chore: update versions (6-next) (#3935) 2023-07-15 20:46:04 +02:00
Juan Picado
ae93e039da fix: expose middleware methods #3915 (#3934)
* fix: expose middleware methods #3915

* remove body-parser dep

* fix 404 issue
2023-07-15 20:38:43 +02:00
verdacciobot
80b1038a76 chore: updated static data 2023-07-13 00:15:50 +00:00
dependabot[bot]
fe18df4cec chore(deps): bump actions/setup-node from 3.6.0 to 3.7.0 (#3929)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](64ed1c7eab...e33196f742)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 10:11:56 +02:00
renovate[bot]
75d3526b66 chore(deps): update dependency @types/webpack-env to v1.18.1 (#3928) 2023-07-10 21:07:37 +02:00
renovate[bot]
beb10af1e7 chore(deps): update dependency @types/testing-library__jest-dom to v5.14.7 (#3927) 2023-07-10 21:07:22 +02:00
renovate[bot]
7e2ad88eb8 chore(deps): update dependency @orama/orama to v1.0.9 (#3926)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-10 14:39:47 +02:00
verdacciobot
834513b56d chore: updated static data 2023-07-10 00:15:36 +00:00
Juan Picado
5486cb8260 chore: update versions (6-next) (#3920)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-09 10:42:04 +02:00
Juan Picado
f859d2b1ae fix: official package - cannot be synced (#3919)
* fix: official package - cannot be synced

* coverage
2023-07-08 19:06:03 +02:00
renovate[bot]
979f2ff210 fix(deps): update dependency semver to v7.5.4 (#3917) 2023-07-08 14:06:15 +02:00
renovate[bot]
ee642ff639 fix(deps): update material-ui monorepo to v5.13.7 (master) (#3893)
* fix(deps): update material-ui monorepo to v5.13.7

* fix types

* fix types

* lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2023-07-08 13:00:53 +02:00
renovate[bot]
26842fab70 chore(deps): update dependency @changesets/get-dependents-graph to v1.3.6 (#3909)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-08 10:53:03 +02:00
renovate[bot]
767a981819 chore(deps): update dependency @orama/orama to v1.0.8 (#3901)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-08 10:49:23 +02:00
renovate[bot]
bea7a67c8b chore(deps): update dependency @types/node to v16.18.38 (#3910)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-08 10:49:12 +02:00
renovate[bot]
ff1e8f5cf8 chore(deps): update github/codeql-action digest to 46ed16d (#3900)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-08 10:47:06 +02:00
Juan Picado
318b1dc5f2 chore: restore settings gh action 2023-07-07 08:04:23 +02:00
dependabot[bot]
4bb80b76ae chore(deps): bump github/codeql-action from 2.20.1 to 2.20.2 (#3911)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.1 to 2.20.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f6e388ebf0...004c5de30b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-07 07:50:02 +02:00
Raz Luvaton
147acc5044 docs: update e2e.md (#3912) 2023-07-07 07:49:43 +02:00
verdacciobot
c7507df68f chore: updated static data 2023-07-06 00:16:03 +00:00
verdacciobot
0e5b00b670 chore: updated static data 2023-07-03 00:15:36 +00:00
verdacciobot
556609dfbb chore: updated static data 2023-06-29 00:16:47 +00:00
dependabot[bot]
1029c1993b chore(deps): bump github/codeql-action from 2.20.0 to 2.20.1 (#3902) 2023-06-28 00:49:31 +08:00
verdacciobot
4c123927b7 chore: updated static data 2023-06-26 00:15:51 +00:00
verdacciobot
7f59f3e439 chore: updated static data 2023-06-22 00:14:31 +00:00
renovate[bot]
e2cd8108fe fix(deps): update dependency clipanion to v3.2.1 (#3892)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-21 07:42:35 +08:00
renovate[bot]
a76530b31d chore(deps): update dependency @orama/orama to v1.0.7 (#3888)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-19 12:45:44 +08:00
renovate[bot]
6aa85db22b chore(deps): update github/codeql-action digest to 6c089f5 (#3887)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-19 12:45:24 +08:00
renovate[bot]
67a966a971 chore(deps): update dependency @types/node to v16.18.36 (#3889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-19 12:45:11 +08:00
renovate[bot]
68c889fb10 chore(deps): update dependency @types/validator to v13.7.17 (#3890) 2023-06-19 11:27:06 +08:00
verdacciobot
61fa46bb17 chore: updated static data 2023-06-19 00:15:15 +00:00
Yassine KLILICH
22159cfc49 fix(website): wrong spelling "depenging" to "depending" in documentation (#3886) 2023-06-18 22:42:15 +08:00
verdacciobot
7401fc72d6 chore: updated static data 2023-06-15 00:15:07 +00:00
renovate[bot]
bd16bcc248 fix(deps): update dependency npm to v9.7.1 (#3872) 2023-06-13 09:46:45 +08:00
123 changed files with 2248 additions and 1967 deletions

View File

@@ -0,0 +1,7 @@
---
'@verdaccio/api': minor
'@verdaccio/middleware': minor
'@verdaccio/server': minor
---
fix: expose middleware methods

View File

@@ -81,6 +81,7 @@
"dull-monkeys-search",
"early-jokes-nail",
"eight-bottles-own",
"eight-clouds-look",
"eighty-snails-admire",
"eleven-brooms-hunt",
"eleven-spoons-matter",
@@ -144,12 +145,15 @@
"red-chefs-float",
"red-yaks-sell",
"rich-badgers-begin",
"rich-bananas-chew",
"rich-ghosts-rule",
"shaggy-carrots-unite",
"shaggy-parrots-smash",
"shiny-chefs-heal",
"shy-ducks-cover",
"silly-moose-watch",
"silver-needles-drum",
"silver-spoons-nail",
"six-boats-sparkle",
"slimy-eggs-explain",
"slow-carrots-relate",

View File

@@ -0,0 +1,7 @@
---
'@verdaccio/api': patch
'@verdaccio/core': patch
'@verdaccio/middleware': patch
---
fix: official package "-" cannot be synced

View File

@@ -0,0 +1,9 @@
---
'@verdaccio/core': patch
'@verdaccio/hooks': patch
'@verdaccio/proxy': patch
'@verdaccio/store': patch
'@verdaccio/web': patch
---
refactor: got instead undici

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/proxy': minor
'@verdaccio/store': minor
---
feat: refactor proxy with got v12

View File

@@ -25,7 +25,7 @@ jobs:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
env:

View File

@@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
@@ -49,7 +49,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
@@ -73,7 +73,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
@@ -102,7 +102,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version: ${{ matrix.node_version }}
- name: Install pnpm
@@ -127,7 +127,7 @@ jobs:
name: UI Test E2E
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm

View File

@@ -29,7 +29,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
@@ -56,7 +56,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
@@ -81,7 +81,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
@@ -111,7 +111,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version: ${{ matrix.node_version }}
- name: Install pnpm
@@ -138,7 +138,7 @@ jobs:
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm

View File

@@ -34,7 +34,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # v2
uses: github/codeql-action/init@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2
# Override language selection by uncommenting this and choosing your languages
# with:
@@ -42,7 +42,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a # v2
uses: github/codeql-action/autobuild@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -56,4 +56,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # v2
uses: github/codeql-action/analyze@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2

View File

@@ -21,7 +21,7 @@ jobs:
run: docker-compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" up -d --build
- name: Install node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: 18
- name: verdaccio cli

View File

@@ -18,7 +18,7 @@ jobs:
run: docker-compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" up -d --build
- name: Install node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: 18
- name: npm setup

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
@@ -41,7 +41,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node 16
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
@@ -84,7 +84,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version: ${{ matrix.node }}
- name: Install pnpm

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm

View File

@@ -23,7 +23,7 @@ jobs:
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version: 18.x
- name: install pnpm

View File

@@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version-file: '.nvmrc'
@@ -65,7 +65,7 @@ jobs:
build-dir: './packages/ui-components/storybook-static'
- name: 🤖 Deploy Preview UI Components Netlify
if: github.repository == 'verdaccio/verdaccio'
uses: verdaccio/action-netlify-deploy@1c086d59169edeec9254672c7de17d2ceac3928f # v2.0.0
uses: semoal/action-netlify-deploy@1a53f098745bf78555d11b436f5ee3af87e6b566
id: netlify_preview_ui
with:
draft: true

View File

@@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Use Node 16
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag=v3
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # tag=v3
with:
node-version: 16
@@ -40,7 +40,7 @@ jobs:
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # tag=v2.4.0
with:
version: latest-8
run_install: |
@@ -134,7 +134,7 @@ jobs:
- name: Add comment to PR
if: github.repository == 'verdaccio/verdaccio'
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@f61b6cf21ef2fcc468f4345cdfcc9bda741d2343 # v2
uses: marocchino/sticky-pull-request-comment@f6a2580ed520ae15da6076e7410b088d1c5dddd9 # v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}

View File

@@ -5,8 +5,8 @@
"main": "./build/index.js",
"types": "./build/index.d.ts",
"devDependencies": {
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"debug": "4.3.4",
"fs-extra": "10.1.0",
@@ -14,7 +14,7 @@
"js-yaml": "4.1.0",
"get-port": "5.1.1",
"lodash": "4.17.21",
"verdaccio": "workspace:6.0.0-6-next.72"
"verdaccio": "workspace:6.0.0-6-next.75"
},
"scripts": {
"test": "jest",

View File

@@ -4,7 +4,7 @@
"version": "1.0.1-6-next.7",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.7",
"npm": "9.6.6"
"npm": "9.7.1"
},
"scripts": {
"test": "jest"

View File

@@ -4,7 +4,7 @@
"version": "1.0.1-6-next.7",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.7",
"npm": "9.6.6"
"npm": "9.7.1"
},
"scripts": {
"test": "jest"

View File

@@ -4,7 +4,7 @@
"version": "1.0.1-6-next.7",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.7",
"npm": "9.6.6"
"npm": "9.7.1"
},
"scripts": {
"test": "jest"

View File

@@ -4,7 +4,7 @@
"version": "1.0.1-6-next.7",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.7",
"npm": "9.6.6"
"npm": "9.7.1"
},
"scripts": {
"test": "jest"

View File

@@ -3,9 +3,9 @@
"name": "@verdaccio/e2e-ui",
"version": "2.0.0-6-next.4",
"devDependencies": {
"verdaccio": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"verdaccio": "workspace:6.0.0-6-next.75",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.8",
"debug": "4.3.4",
"cypress": "^11.2.0",

View File

@@ -41,7 +41,7 @@
"@babel/runtime": "7.21.5",
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.24.4",
"@changesets/get-dependents-graph": "1.3.5",
"@changesets/get-dependents-graph": "1.3.6",
"@crowdin/cli": "3.10.1",
"@dianmora/contributors": "5.0.0",
"@emotion/react": "11.10.6",
@@ -60,10 +60,10 @@
"@types/http-errors": "1.8.2",
"@types/jest": "27.5.2",
"@types/jsonwebtoken": "8.5.9",
"@types/lodash": "4.14.195",
"@types/lodash": "4.14.196",
"@types/mime": "2.0.3",
"@types/minimatch": "3.0.5",
"@types/node": "16.18.35",
"@types/node": "16.18.39",
"@types/node-fetch": "2.6.4",
"@types/qs": "6.9.7",
"@types/range-parser": "1.2.4",
@@ -73,14 +73,14 @@
"@types/react-virtualized": "9.21.21",
"@types/redux": "3.6.0",
"@types/request": "2.48.8",
"@types/semver": "7.3.13",
"@types/semver": "7.5.0",
"@types/serve-static": "1.13.10",
"@types/superagent": "4.1.18",
"@types/supertest": "2.0.12",
"@types/testing-library__jest-dom": "5.14.6",
"@types/validator": "13.7.12",
"@types/testing-library__jest-dom": "5.14.9",
"@types/validator": "13.7.17",
"@types/webpack": "5.28.1",
"@types/webpack-env": "1.18.0",
"@types/webpack-env": "1.18.1",
"@typescript-eslint/eslint-plugin": "5.59.8",
"@typescript-eslint/parser": "5.59.8",
"@verdaccio/crowdin-translations": "workspace:*",

View File

@@ -1,5 +1,50 @@
# @verdaccio/api
## 6.0.0-6-next.58
### Patch Changes
- Updated dependencies [0a6412ca9]
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/store@6.0.0-6-next.55
- @verdaccio/auth@6.0.0-6-next.54
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/middleware@6.0.0-6-next.54
- @verdaccio/utils@6.0.0-6-next.43
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.57
### Minor Changes
- ae93e039d: fix: expose middleware methods
### Patch Changes
- Updated dependencies [ae93e039d]
- @verdaccio/middleware@6.0.0-6-next.53
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/auth@6.0.0-6-next.53
- @verdaccio/store@6.0.0-6-next.54
- @verdaccio/utils@6.0.0-6-next.42
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.56
### Patch Changes
- f859d2b1a: fix: official package "-" cannot be synced
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/middleware@6.0.0-6-next.52
- @verdaccio/auth@6.0.0-6-next.52
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/store@6.0.0-6-next.53
- @verdaccio/utils@6.0.0-6-next.41
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.55
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/api",
"version": "6.0.0-6-next.55",
"version": "6.0.0-6-next.58",
"description": "loaders logic",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -39,13 +39,13 @@
},
"license": "MIT",
"dependencies": {
"@verdaccio/auth": "workspace:6.0.0-6-next.51",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/middleware": "workspace:6.0.0-6-next.51",
"@verdaccio/store": "workspace:6.0.0-6-next.52",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/auth": "workspace:6.0.0-6-next.54",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"@verdaccio/middleware": "workspace:6.0.0-6-next.54",
"@verdaccio/store": "workspace:6.0.0-6-next.55",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"abortcontroller-polyfill": "1.7.5",
"cookies": "0.8.0",
"debug": "4.3.4",
@@ -53,11 +53,10 @@
"express": "4.18.2",
"lodash": "4.17.21",
"mime": "2.6.0",
"semver": "7.5.0"
"semver": "7.5.4"
},
"devDependencies": {
"@types/node": "16.18.35",
"@verdaccio/server": "workspace:6.0.0-6-next.61",
"@verdaccio/server": "workspace:6.0.0-6-next.64",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.8",
"supertest": "6.3.3",

View File

@@ -1,4 +1,3 @@
import bodyParser from 'body-parser';
import express, { Router } from 'express';
import { Auth } from '@verdaccio/auth';
@@ -43,24 +42,22 @@ export default function (config: Config, auth: Auth, storage: Storage): Router {
app.param('_rev', match(/^-rev$/));
app.param('org_couchdb_user', match(/^org\.couchdb\.user:/));
app.use(auth.apiJWTmiddleware());
app.use(bodyParser.json({ strict: false, limit: config.max_body_size || '10mb' }));
app.use(express.json({ strict: false, limit: config.max_body_size || '10mb' }));
// @ts-ignore
app.use(antiLoop(config));
// encode / in a scoped package name to be matched as a single parameter in routes
app.use(encodeScopePackage);
// for "npm whoami"
whoami(app);
pkg(app, auth, storage);
profile(app, auth, config);
// @deprecated endpoint, 404 by default
search(app);
user(app, auth, config);
distTags(app, auth, storage);
publish(app, auth, storage);
ping(app);
stars(app, storage);
// @ts-ignore
v1Search(app, auth, storage);
token(app, auth, storage, config);
pkg(app, auth, storage);
return app;
}

View File

@@ -1,5 +1,43 @@
# @verdaccio/auth
## 6.0.0-6-next.54
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/loaders@6.0.0-6-next.44
- verdaccio-htpasswd@11.0.0-6-next.45
- @verdaccio/utils@6.0.0-6-next.43
- @verdaccio/signature@6.0.0-6-next.2
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.53
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/loaders@6.0.0-6-next.43
- verdaccio-htpasswd@11.0.0-6-next.44
- @verdaccio/utils@6.0.0-6-next.42
- @verdaccio/signature@6.0.0-6-next.2
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.52
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/loaders@6.0.0-6-next.42
- verdaccio-htpasswd@11.0.0-6-next.43
- @verdaccio/utils@6.0.0-6-next.41
- @verdaccio/signature@6.0.0-6-next.2
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.51
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/auth",
"version": "6.0.0-6-next.51",
"version": "6.0.0-6-next.54",
"description": "logger",
"main": "./build/index.js",
"types": "./build/index.d.ts",
@@ -39,16 +39,16 @@
},
"license": "MIT",
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/loaders": "workspace:6.0.0-6-next.41",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/loaders": "workspace:6.0.0-6-next.44",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"@verdaccio/signature": "workspace:6.0.0-6-next.2",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"debug": "4.3.4",
"express": "4.18.2",
"lodash": "4.17.21",
"verdaccio-htpasswd": "workspace:11.0.0-6-next.42"
"verdaccio-htpasswd": "workspace:11.0.0-6-next.45"
},
"devDependencies": {
"@verdaccio/types": "workspace:11.0.0-6-next.25"

View File

@@ -1,5 +1,34 @@
# @verdaccio/cli
## 6.0.0-6-next.75
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/node-api@6.0.0-6-next.75
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.74
### Patch Changes
- @verdaccio/node-api@6.0.0-6-next.74
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.73
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/node-api@6.0.0-6-next.73
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.72
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/cli",
"version": "6.0.0-6-next.72",
"version": "6.0.0-6-next.75",
"author": {
"name": "Juan Picado",
"email": "juanpicado19@gmail.com"
@@ -44,14 +44,14 @@
"start": "ts-node src/index.ts"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/node-api": "workspace:6.0.0-6-next.72",
"clipanion": "3.2.0",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"@verdaccio/node-api": "workspace:6.0.0-6-next.75",
"clipanion": "3.2.1",
"envinfo": "7.8.1",
"kleur": "4.1.5",
"semver": "7.5.0"
"semver": "7.5.4"
},
"devDependencies": {
"ts-node": "10.9.1"

View File

@@ -1,5 +1,28 @@
# @verdaccio/config
## 6.0.0-6-next.75
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/utils@6.0.0-6-next.43
## 6.0.0-6-next.74
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/utils@6.0.0-6-next.42
## 6.0.0-6-next.73
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/utils@6.0.0-6-next.41
## 6.0.0-6-next.72
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/config",
"version": "6.0.0-6-next.72",
"version": "6.0.0-6-next.75",
"description": "logger",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -38,8 +38,8 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"debug": "4.3.4",
"js-yaml": "4.1.0",
"lodash": "4.17.21",

View File

@@ -1,5 +1,19 @@
# @verdaccio/core
## 6.0.0-6-next.75
### Patch Changes
- 0a6412ca9: refactor: got instead undici
## 6.0.0-6-next.74
## 6.0.0-6-next.73
### Patch Changes
- f859d2b1a: fix: official package "-" cannot be synced
## 6.0.0-6-next.72
## 6.0.0-6-next.71

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/core",
"version": "6.0.0-6-next.72",
"version": "6.0.0-6-next.75",
"description": "core utilities",
"keywords": [
"private",
@@ -35,7 +35,7 @@
"dependencies": {
"http-errors": "2.0.0",
"http-status-codes": "2.2.0",
"semver": "7.5.0",
"semver": "7.5.4",
"ajv": "8.12.0",
"process-warning": "1.0.0",
"core-js": "3.30.2"

View File

@@ -29,6 +29,7 @@ export const API_ERROR = {
REGISTRATION_DISABLED: 'user registration disabled',
UNAUTHORIZED_ACCESS: 'unauthorized access',
BAD_STATUS_CODE: 'bad status code',
SERVER_TIME_OUT: 'looks like the server is taking to long to respond',
PACKAGE_EXIST: 'this package is already present',
BAD_AUTH_HEADER: 'bad authorization header',
WEB_DISABLED: 'Web interface is disabled in the config file',

View File

@@ -10,6 +10,10 @@ import {
describe('validatePackage', () => {
test('should validate package names', () => {
expect(validatePackage('-')).toBeTruthy();
expect(validatePackage('--')).toBeTruthy();
expect(validatePackage('a')).toBeTruthy();
expect(validatePackage('a-')).toBeTruthy();
expect(validatePackage('package-name')).toBeTruthy();
expect(validatePackage('@scope/package-name')).toBeTruthy();
});
@@ -21,6 +25,7 @@ describe('validatePackage', () => {
expect(validatePackage('node_modules')).toBeFalsy();
expect(validatePackage('__proto__')).toBeFalsy();
expect(validatePackage('favicon.ico')).toBeFalsy();
expect(validatePackage('%')).toBeFalsy();
});
});
@@ -75,6 +80,7 @@ describe('validateName', () => {
test('good ones', () => {
expect(validateName('verdaccio')).toBeTruthy();
expect(validateName('some.weird.package-zzz')).toBeTruthy();
expect(validateName('--0.0.1.tgz')).toBeTruthy();
expect(validateName('old-package@0.1.2.tgz')).toBeTruthy();
// fix https://github.com/verdaccio/verdaccio/issues/1400
expect(validateName('-build-infra')).toBeTruthy();

View File

@@ -1,5 +1,31 @@
# Change Log
## 11.0.0-6-next.44
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/url@11.0.0-6-next.41
- @verdaccio/utils@6.0.0-6-next.43
## 11.0.0-6-next.43
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/url@11.0.0-6-next.40
- @verdaccio/utils@6.0.0-6-next.42
## 11.0.0-6-next.42
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/url@11.0.0-6-next.39
- @verdaccio/utils@6.0.0-6-next.41
## 11.0.0-6-next.41
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/tarball",
"version": "11.0.0-6-next.41",
"version": "11.0.0-6-next.44",
"description": "tarball utilities resolver",
"keywords": [
"private",
@@ -34,9 +34,9 @@
},
"dependencies": {
"debug": "4.3.4",
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/url": "workspace:11.0.0-6-next.38",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/url": "workspace:11.0.0-6-next.41",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"lodash": "4.17.21"
},
"devDependencies": {

View File

@@ -40,7 +40,6 @@
"build": "echo 0"
},
"devDependencies": {
"@types/node": "16.18.35",
"typedoc": "0.23.25"
},
"typedoc": {

View File

@@ -1,5 +1,25 @@
# Change Log
## 11.0.0-6-next.41
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
## 11.0.0-6-next.40
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
## 11.0.0-6-next.39
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
## 11.0.0-6-next.38
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/url",
"version": "11.0.0-6-next.38",
"version": "11.0.0-6-next.41",
"description": "url utilities resolver",
"keywords": [
"private",
@@ -33,7 +33,7 @@
"access": "public"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"debug": "4.3.4",
"lodash": "4.17.21",
"validator": "13.9.0"

View File

@@ -1,5 +1,29 @@
# @verdaccio/hooks
## 6.0.0-6-next.45
### Patch Changes
- 0a6412ca9: refactor: got instead undici
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.44
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.43
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.42
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/hooks",
"version": "6.0.0-6-next.42",
"version": "6.0.0-6-next.45",
"description": "loaders logic",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -26,21 +26,21 @@
"verdaccio"
],
"engines": {
"node": ">=16"
"node": ">=12"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"core-js": "3.30.2",
"debug": "4.3.4",
"handlebars": "4.7.7",
"undici": "4.16.0"
"got-cjs": "12.5.4"
},
"devDependencies": {
"@types/node": "16.18.35",
"@verdaccio/auth": "workspace:6.0.0-6-next.51",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/types": "workspace:11.0.0-6-next.25"
"@verdaccio/auth": "workspace:6.0.0-6-next.54",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"nock": "13.2.9"
},
"scripts": {
"clean": "rimraf ./build",

View File

@@ -1,5 +1,5 @@
import buildDebug from 'debug';
import { fetch } from 'undici';
import got from 'got-cjs';
import { HTTP_STATUS } from '@verdaccio/core';
import { logger } from '@verdaccio/logger';
@@ -16,7 +16,7 @@ export async function notifyRequest(url: string, options: FetchOptions): Promise
let response;
try {
debug('uri %o', url);
response = await fetch(url, {
response = got.post(url, {
body: JSON.stringify(options.body),
method: 'POST',
headers: { 'Content-Type': 'application/json' },

View File

@@ -1,4 +1,4 @@
import { MockAgent, setGlobalDispatcher } from 'undici';
import nock from 'nock';
import { createRemoteUser, parseConfigFile } from '@verdaccio/config';
import { setup } from '@verdaccio/logger';
@@ -21,26 +21,21 @@ const domain = 'http://slack-service';
const options = {
path: '/foo?auth_token=mySecretToken',
method: 'POST',
};
describe('Notifications:: notifyRequest', () => {
beforeEach(() => {
nock.cleanAll();
});
test('when sending a empty notification', async () => {
const mockAgent = new MockAgent({ connections: 1 });
setGlobalDispatcher(mockAgent);
const mockClient = mockAgent.get(domain);
mockClient.intercept(options).reply(200, { body: 'test' });
nock(domain).post(options.path).reply(200, { body: 'test' });
const notificationResponse = await notify({}, {}, createRemoteUser('foo', []), 'bar');
expect(notificationResponse).toEqual([false]);
});
test('when sending a single notification', async () => {
const mockAgent = new MockAgent({ connections: 1 });
setGlobalDispatcher(mockAgent);
const mockClient = mockAgent.get(domain);
mockClient.intercept(options).reply(200, { body: 'test' });
nock(domain).post(options.path).reply(200, { body: 'test' });
const notificationResponse = await notify(
{},
singleHeaderNotificationConfig,
@@ -48,14 +43,10 @@ describe('Notifications:: notifyRequest', () => {
'bar'
);
expect(notificationResponse).toEqual([true]);
await mockClient.close();
});
test('when notification endpoint is missing', async () => {
const mockAgent = new MockAgent({ connections: 1 });
setGlobalDispatcher(mockAgent);
const mockClient = mockAgent.get(domain);
mockClient.intercept(options).reply(200, { body: 'test' });
nock(domain).post(options.path).reply(200, { body: 'test' });
const name = 'package';
const config: Partial<Config> = {
// @ts-ignore
@@ -70,16 +61,22 @@ describe('Notifications:: notifyRequest', () => {
});
test('when multiple notifications', async () => {
const mockAgent = new MockAgent({ connections: 1 });
setGlobalDispatcher(mockAgent);
const mockClient = mockAgent.get(domain);
mockClient.intercept(options).reply(200, { body: 'test' });
mockClient.intercept(options).reply(400, {});
mockClient.intercept(options).reply(500, { message: 'Something bad happened' });
nock(domain)
.post(options.path)
.once()
.reply(200, { body: 'test' })
.post(options.path)
.once()
.reply(400, {})
.post(options.path)
.once()
.reply(500, { message: 'Something bad happened' });
// mockClient.intercept(options).reply(200, { body: 'test' });
// mockClient.intercept(options).reply(400, {});
// mockClient.intercept(options).reply(500, { message: 'Something bad happened' });
const name = 'package';
const responses = await notify({ name }, multiNotificationConfig, { name: 'foo' }, 'bar');
expect(responses).toEqual([true, false, false]);
await mockClient.close();
});
});

View File

@@ -1,5 +1,23 @@
# @verdaccio/loaders
## 6.0.0-6-next.44
### Patch Changes
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.43
### Patch Changes
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.42
### Patch Changes
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.41
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/loaders",
"version": "6.0.0-6-next.41",
"version": "6.0.0-6-next.44",
"description": "loaders logic",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -13,13 +13,13 @@
"url": "https://github.com/verdaccio/verdaccio"
},
"dependencies": {
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"debug": "4.3.4",
"lodash": "4.17.21"
},
"devDependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@verdaccio-scope/verdaccio-auth-foo": "0.0.2",
"verdaccio-auth-memory": "workspace:*",

View File

@@ -1,5 +1,23 @@
# @verdaccio/logger-7
## 6.0.0-6-next.20
### Patch Changes
- @verdaccio/logger-commons@6.0.0-6-next.43
## 6.0.0-6-next.19
### Patch Changes
- @verdaccio/logger-commons@6.0.0-6-next.42
## 6.0.0-6-next.18
### Patch Changes
- @verdaccio/logger-commons@6.0.0-6-next.41
## 6.0.0-6-next.17
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/logger-7",
"version": "6.0.0-6-next.17",
"version": "6.0.0-6-next.20",
"description": "logger for verdaccio 5.x version",
"main": "./build/index.js",
"types": "./build/index.d.ts",
@@ -38,7 +38,7 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/logger-commons": "workspace:6.0.0-6-next.40",
"@verdaccio/logger-commons": "workspace:6.0.0-6-next.43",
"pino": "7.11.0"
},
"devDependencies": {

View File

@@ -1,5 +1,25 @@
# @verdaccio/logger-commons
## 6.0.0-6-next.43
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
## 6.0.0-6-next.42
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
## 6.0.0-6-next.41
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
## 6.0.0-6-next.40
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/logger-commons",
"version": "6.0.0-6-next.40",
"version": "6.0.0-6-next.43",
"description": "logger",
"main": "./build/index.js",
"types": "./build/index.d.ts",
@@ -38,7 +38,7 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/logger-prettify": "workspace:6.0.0-6-next.10",
"debug": "4.3.4",
"colorette": "2.0.20"

View File

@@ -1,5 +1,23 @@
# @verdaccio/logger
## 6.0.0-6-next.43
### Patch Changes
- @verdaccio/logger-commons@6.0.0-6-next.43
## 6.0.0-6-next.42
### Patch Changes
- @verdaccio/logger-commons@6.0.0-6-next.42
## 6.0.0-6-next.41
### Patch Changes
- @verdaccio/logger-commons@6.0.0-6-next.41
## 6.0.0-6-next.40
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/logger",
"version": "6.0.0-6-next.40",
"version": "6.0.0-6-next.43",
"description": "logger",
"main": "./build/index.js",
"types": "./build/index.d.ts",
@@ -38,7 +38,7 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/logger-commons": "workspace:6.0.0-6-next.40",
"@verdaccio/logger-commons": "workspace:6.0.0-6-next.43",
"pino": "8.14.1"
},
"devDependencies": {

View File

@@ -1,5 +1,39 @@
# @verdaccio/middleware
## 6.0.0-6-next.54
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/url@11.0.0-6-next.41
- @verdaccio/utils@6.0.0-6-next.43
## 6.0.0-6-next.53
### Minor Changes
- ae93e039d: fix: expose middleware methods
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/url@11.0.0-6-next.40
- @verdaccio/utils@6.0.0-6-next.42
## 6.0.0-6-next.52
### Patch Changes
- f859d2b1a: fix: official package "-" cannot be synced
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/url@11.0.0-6-next.39
- @verdaccio/utils@6.0.0-6-next.41
## 6.0.0-6-next.51
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/middleware",
"version": "6.0.0-6-next.51",
"version": "6.0.0-6-next.54",
"description": "express middleware utils",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -38,10 +38,10 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/url": "workspace:11.0.0-6-next.38",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/url": "workspace:11.0.0-6-next.41",
"debug": "4.3.4",
"lru-cache": "7.18.3",
"express": "4.18.2",
@@ -54,7 +54,7 @@
"url": "https://opencollective.com/verdaccio"
},
"devDependencies": {
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"body-parser": "1.20.2",
"supertest": "6.3.3"
}

View File

@@ -9,7 +9,7 @@ export { final } from './middlewares/final';
export { allow } from './middlewares/allow';
export { rateLimit } from './middlewares/rate-limit';
export { userAgent } from './middlewares/user-agent';
export { webMiddleware } from './middlewares/web';
export { webMiddleware, renderWebMiddleware } from './middlewares/web';
export { errorReportingMiddleware, handleError } from './middlewares/error';
export {
log,

View File

@@ -1,27 +1,31 @@
import { errorUtils } from '@verdaccio/core';
import {
validateName as utilValidateName,
validatePackage as utilValidatePackage,
} from '@verdaccio/utils';
import { NextFunction, Request, Response } from 'express';
export function validateName(_req, _res, next, value: string, name: string) {
if (value === '-') {
// special case in couchdb usually
next('route');
} else if (utilValidateName(value)) {
import { errorUtils, validationUtils } from '@verdaccio/core';
export function validateName(
_req: Request,
_res: Response,
next: NextFunction,
value: string,
name: string
) {
if (validationUtils.validateName(value)) {
next();
} else {
next(errorUtils.getForbidden('invalid ' + name));
next(errorUtils.getBadRequest('invalid ' + name));
}
}
export function validatePackage(_req, _res, next, value: string, name: string) {
if (value === '-') {
// special case in couchdb usually
next('route');
} else if (utilValidatePackage(value)) {
export function validatePackage(
_req: Request,
_res,
next: NextFunction,
value: string,
name: string
) {
if (validationUtils.validatePackage(value)) {
next();
} else {
next(errorUtils.getForbidden('invalid ' + name));
next(errorUtils.getBadRequest('invalid ' + name));
}
}

View File

@@ -1 +1,4 @@
export { default as webMiddleware } from './web-middleware';
export { webAPIMiddleware } from './web-api';
export { setSecurityWebHeaders } from './security';
export { renderWebMiddleware } from './render-web';

View File

@@ -1,10 +1,13 @@
import express from 'express';
import { Router } from 'express';
import { RequestHandler, Router } from 'express';
import { validateName, validatePackage } from '../validation';
import { setSecurityWebHeaders } from './security';
export function webMiddleware(tokenMiddleware, webEndpointsApi) {
export function webAPIMiddleware(
tokenMiddleware: RequestHandler,
webEndpointsApi: RequestHandler
): Router {
// eslint-disable-next-line new-cap
const route = Router();
// validate all of these params as a package name
@@ -13,15 +16,15 @@ export function webMiddleware(tokenMiddleware, webEndpointsApi) {
route.param('filename', validateName);
route.param('version', validateName);
route.use(express.urlencoded({ extended: false }));
route.use(setSecurityWebHeaders);
if (typeof tokenMiddleware === 'function') {
route.use(tokenMiddleware);
}
route.use(setSecurityWebHeaders);
if (webEndpointsApi) {
if (typeof webEndpointsApi === 'function') {
route.use(webEndpointsApi);
}
return route;
}

View File

@@ -1,7 +1,7 @@
import express from 'express';
import { renderWebMiddleware } from './render-web';
import { webMiddleware } from './web-api';
import { webAPIMiddleware } from './web-api';
export default (config, middlewares, pluginOptions): any => {
// eslint-disable-next-line new-cap
@@ -10,6 +10,6 @@ export default (config, middlewares, pluginOptions): any => {
// render web
router.use('/', renderWebMiddleware(config, tokenMiddleware, pluginOptions));
// web endpoints, search, packages, etc
router.use('/-/verdaccio/', webMiddleware(tokenMiddleware, webEndpointsApi));
router.use('/-/verdaccio/', webAPIMiddleware(tokenMiddleware, webEndpointsApi));
return router;
};

View File

@@ -1,4 +1,3 @@
import bodyParser from 'body-parser';
import express from 'express';
import request from 'supertest';
@@ -6,6 +5,8 @@ import { HEADERS, HTTP_STATUS } from '@verdaccio/core';
import { final } from '../src';
const bodyParser = express;
test('handle error as object', async () => {
const app = express();
app.use(bodyParser.json({ strict: false, limit: '10mb' }));

View File

@@ -1,4 +1,4 @@
import bodyParser from 'body-parser';
import express from 'express';
import request from 'supertest';
import { HEADERS, HTTP_STATUS } from '@verdaccio/core';
@@ -8,7 +8,7 @@ import { getApp } from './helper';
test('body is json', async () => {
const app = getApp([]);
app.use(bodyParser.json({ strict: false, limit: '10mb' }));
app.use(express.json({ strict: false, limit: '10mb' }));
// @ts-ignore
app.put('/json', expectJson, (req, res) => {
res.status(HTTP_STATUS.OK).json({});

View File

@@ -2,55 +2,9 @@ import request from 'supertest';
import { HTTP_STATUS } from '@verdaccio/core';
import { match, validateName, validatePackage } from '../src';
import { match } from '../src';
import { getApp } from './helper';
describe('validate params', () => {
test('should validate package name', async () => {
const app = getApp([]);
// @ts-ignore
app.param('package', validatePackage);
app.get('/pkg/:package', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/pkg/react').expect(HTTP_STATUS.OK);
});
test('should fails validate package name', async () => {
const app = getApp([]);
// @ts-ignore
app.param('package', validatePackage);
app.get('/pkg/:package', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/pkg/node_modules').expect(HTTP_STATUS.FORBIDDEN);
});
test('should fails file name package name', async () => {
const app = getApp([]);
// @ts-ignore
app.param('filename', validateName);
app.get('/file/:filename', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/file/__proto__').expect(HTTP_STATUS.FORBIDDEN);
});
test('should validate file name package name', async () => {
const app = getApp([]);
// @ts-ignore
app.param('filename', validateName);
app.get('/file/:filename', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/file/react.tar.gz').expect(HTTP_STATUS.OK);
});
});
describe('match', () => {
test('should not match middleware', async () => {
const app = getApp([]);

View File

@@ -0,0 +1,92 @@
import request from 'supertest';
import { HTTP_STATUS } from '@verdaccio/core';
import { validateName, validatePackage } from '../src';
import { getApp } from './helper';
describe('validate package name middleware', () => {
test.each(['jquery', '-'])('%s should be valid package name', (pkg) => {
const app = getApp([]);
app.param('pkg', validatePackage);
app.get('/:pkg', (_req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get(`/${pkg}`).expect(HTTP_STATUS.OK);
});
test.each(['node_modules', '%'])('%s should be invalid package name', (pkg) => {
const app = getApp([]);
app.param('pkg', validatePackage);
app.get('/:pkg', (_req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get(`/${pkg}`).expect(HTTP_STATUS.BAD_REQUEST);
});
test('should validate package name double level', async () => {
const app = getApp([]);
// @ts-ignore
app.param('package', validatePackage);
app.get('/pkg/:package', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/pkg/react').expect(HTTP_STATUS.OK);
});
test('should fails validate package name double level', async () => {
const app = getApp([]);
// @ts-ignore
app.param('package', validatePackage);
app.get('/pkg/:package', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/pkg/node_modules').expect(HTTP_STATUS.BAD_REQUEST);
});
});
describe('validate file name name middleware', () => {
test.each(['old-package@0.1.2.tgz', '--0.0.1.tgz'])('%s should be valid file name', (pkg) => {
const app = getApp([]);
app.param('pkg', validateName);
app.get('/:pkg', (_req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get(`/${pkg}`).expect(HTTP_STATUS.OK);
});
test.each(['some%2Fthing', '.bin'])('%s should be invalid package name', (pkg) => {
const app = getApp([]);
app.param('pkg', validateName);
app.get('/:pkg', (_req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get(`/${pkg}`).expect(HTTP_STATUS.BAD_REQUEST);
});
test('should fails file name package name', async () => {
const app = getApp([]);
app.param('filename', validateName);
app.get('/file/:filename', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/file/__proto__').expect(HTTP_STATUS.BAD_REQUEST);
});
test('should validate file name package name', async () => {
const app = getApp([]);
app.param('filename', validateName);
app.get('/file/:filename', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/file/react.tar.gz').expect(HTTP_STATUS.OK);
});
});

View File

@@ -1,5 +1,38 @@
# @verdaccio/node-api
## 6.0.0-6-next.75
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/server@6.0.0-6-next.64
- @verdaccio/server-fastify@6.0.0-6-next.56
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.74
### Patch Changes
- Updated dependencies [ae93e039d]
- @verdaccio/server@6.0.0-6-next.63
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/server-fastify@6.0.0-6-next.55
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.73
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/server@6.0.0-6-next.62
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/server-fastify@6.0.0-6-next.54
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.72
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/node-api",
"version": "6.0.0-6-next.72",
"version": "6.0.0-6-next.75",
"description": "node API",
"main": "build/index.js",
"types": "build/index.d.ts",
@@ -39,19 +39,17 @@
},
"license": "MIT",
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/server": "workspace:6.0.0-6-next.61",
"@verdaccio/server-fastify": "workspace:6.0.0-6-next.53",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"@verdaccio/server": "workspace:6.0.0-6-next.64",
"@verdaccio/server-fastify": "workspace:6.0.0-6-next.56",
"core-js": "3.30.2",
"debug": "4.3.4",
"lodash": "4.17.21"
},
"devDependencies": {
"@types/node": "16.18.35",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"jest-mock-process": "1.5.1",
"selfsigned": "1.10.14",
"supertest": "6.3.3"
},

View File

@@ -1,5 +1,28 @@
# Change Log
## 11.0.0-6-next.38
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/config@6.0.0-6-next.75
## 11.0.0-6-next.37
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
## 11.0.0-6-next.36
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/config@6.0.0-6-next.73
## 11.0.0-6-next.35
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-audit",
"version": "11.0.0-6-next.35",
"version": "11.0.0-6-next.38",
"description": "Verdaccio Middleware plugin to bypass npmjs audit",
"keywords": [
"private",
@@ -30,16 +30,16 @@
"node": ">=12"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"express": "4.18.2",
"https-proxy-agent": "5.0.1",
"node-fetch": "cjs"
},
"devDependencies": {
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@verdaccio/auth": "workspace:6.0.0-6-next.51",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/auth": "workspace:6.0.0-6-next.54",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"nock": "13.2.9",
"supertest": "6.3.3"
},

View File

@@ -1,5 +1,25 @@
# Change Log
## 11.0.0-6-next.40
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
## 11.0.0-6-next.39
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
## 11.0.0-6-next.38
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
## 11.0.0-6-next.37
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-auth-memory",
"version": "11.0.0-6-next.37",
"version": "11.0.0-6-next.40",
"description": "Auth plugin for Verdaccio that keeps users in memory",
"keywords": [
"private",
@@ -31,12 +31,12 @@
"npm": ">=6"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"debug": "4.3.4"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/types": "workspace:11.0.0-6-next.25"
},
"scripts": {

View File

@@ -1,5 +1,25 @@
# Change Log
## 11.0.0-6-next.45
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
## 11.0.0-6-next.44
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
## 11.0.0-6-next.43
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
## 11.0.0-6-next.42
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-htpasswd",
"version": "11.0.0-6-next.42",
"version": "11.0.0-6-next.45",
"description": "htpasswd auth plugin for Verdaccio",
"keywords": [
"private",
@@ -34,7 +34,7 @@
"npm": ">=6"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/file-locking": "workspace:11.0.0-6-next.7",
"apache-md5": "1.1.8",
"bcryptjs": "2.4.3",
@@ -46,8 +46,8 @@
"devDependencies": {
"@types/bcryptjs": "2.4.2",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"mockdate": "3.0.5"
},
"scripts": {

View File

@@ -1,5 +1,28 @@
# Change Log
## 11.0.0-6-next.45
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/utils@6.0.0-6-next.43
## 11.0.0-6-next.44
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/utils@6.0.0-6-next.42
## 11.0.0-6-next.43
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/utils@6.0.0-6-next.41
## 11.0.0-6-next.42
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/local-storage",
"version": "11.0.0-6-next.42",
"version": "11.0.0-6-next.45",
"description": "Local storage implementation",
"keywords": [
"private",
@@ -37,9 +37,9 @@
"npm": ">=7"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/file-locking": "workspace:11.0.0-6-next.7",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"core-js": "3.30.2",
"debug": "4.3.4",
"globby": "11.1.0",
@@ -52,8 +52,8 @@
"devDependencies": {
"@types/minimatch": "3.0.5",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.8",
"minimatch": "3.1.2"
},

View File

@@ -1,5 +1,25 @@
# Change Log
## 11.0.0-6-next.42
### Patch Changes
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
## 11.0.0-6-next.41
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
## 11.0.0-6-next.40
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
## 11.0.0-6-next.39
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-memory",
"version": "11.0.0-6-next.39",
"version": "11.0.0-6-next.42",
"description": "Storage implementation in memory",
"keywords": [
"private",
@@ -31,15 +31,15 @@
"npm": ">=6"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"memory-fs": "0.5.0",
"debug": "4.3.4",
"memfs": "3.5.1"
},
"devDependencies": {
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/logger": "workspace:6.0.0-6-next.40"
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/logger": "workspace:6.0.0-6-next.43"
},
"scripts": {
"clean": "rimraf ./build",

View File

@@ -1,5 +1,11 @@
# @verdaccio/ui-theme
## 6.0.0-6-next.75
## 6.0.0-6-next.74
## 6.0.0-6-next.73
## 6.0.0-6-next.72
## 6.0.0-6-next.71

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/ui-theme",
"version": "6.0.0-6-next.72",
"version": "6.0.0-6-next.75",
"description": "Verdaccio User Interface",
"author": {
"name": "Verdaccio Contributors",
@@ -18,16 +18,16 @@
"@emotion/jest": "11.10.5",
"@emotion/react": "11.10.6",
"@emotion/styled": "11.10.6",
"@mui/icons-material": "5.11.16",
"@mui/material": "5.13.3",
"@mui/styles": "5.13.2",
"@mui/icons-material": "5.13.7",
"@mui/material": "5.13.7",
"@mui/styles": "5.13.7",
"@rematch/core": "2.2.0",
"@rematch/loading": "2.1.2",
"@rematch/persist": "2.1.2",
"@testing-library/dom": "8.19.1",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@verdaccio/node-api": "workspace:6.0.0-6-next.72",
"@verdaccio/node-api": "workspace:6.0.0-6-next.75",
"@verdaccio/types": "workspace:*",
"@verdaccio/ui-components": "workspace:2.0.0-6-next.10",
"babel-loader": "8.3.0",
@@ -41,16 +41,16 @@
"harmony-reflect": "1.6.2",
"highlight.js": "11.7.0",
"history": "4.10.1",
"html-webpack-plugin": "5.5.1",
"html-webpack-plugin": "5.5.3",
"i18next": "20.6.1",
"in-publish": "2.0.1",
"js-base64": "3.7.3",
"js-base64": "3.7.5",
"js-yaml": "4.1.0",
"localstorage-memory": "1.0.3",
"lodash": "4.17.21",
"marked": "4.3.0",
"mini-css-extract-plugin": "2.7.2",
"msw": "0.49.2",
"msw": "0.49.3",
"mutationobserver-shim": "0.3.7",
"node-mocks-http": "1.12.1",
"normalize.css": "8.0.1",

View File

@@ -195,10 +195,6 @@
"username": "markpeterfejes",
"id": 7912231
},
{
"username": "dschaller",
"id": 1004789
},
{
"username": "semoal",
"id": 22656541
@@ -271,6 +267,10 @@
"username": "rmkanda",
"id": 38713281
},
{
"username": "rluvaton",
"id": 16746759
},
{
"username": "kuoruan",
"id": 8685618
@@ -407,10 +407,6 @@
"username": "mysiar",
"id": 13708162
},
{
"username": "rluvaton",
"id": 16746759
},
{
"username": "innosatyam",
"id": 85342175
@@ -699,6 +695,10 @@
"username": "deg",
"id": 90383
},
{
"username": "dschaller",
"id": 1004789
},
{
"username": "dafanasiev",
"id": 5094703
@@ -1035,6 +1035,10 @@
"username": "yannickcr",
"id": 13209
},
{
"username": "yassine-klilich",
"id": 24640070
},
{
"username": "yogevyuval",
"id": 962869

View File

@@ -1,5 +1,40 @@
# @verdaccio/proxy
## 6.0.0-6-next.53
### Minor Changes
- 0a6412ca9: feat: refactor proxy with got v12
### Patch Changes
- 0a6412ca9: refactor: got instead undici
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/utils@6.0.0-6-next.43
## 6.0.0-6-next.52
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/local-storage@11.0.0-6-next.44
- @verdaccio/utils@6.0.0-6-next.42
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.51
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/local-storage@11.0.0-6-next.43
- @verdaccio/utils@6.0.0-6-next.41
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.50
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/proxy",
"version": "6.0.0-6-next.50",
"version": "6.0.0-6-next.53",
"description": "verdaccio proxy fetcher",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -26,8 +26,7 @@
"verdaccio"
],
"engines": {
"node": ">=16",
"npm": ">=6"
"node": ">=12"
},
"scripts": {
"clean": "rimraf ./build",
@@ -39,26 +38,23 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/local-storage": "workspace:11.0.0-6-next.42",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"JSONStream": "1.3.5",
"debug": "4.3.4",
"lodash": "4.17.21",
"got": "11.8.6",
"got-cjs": "12.5.4",
"hpagent": "1.2.0",
"undici": "4.16.0"
"lodash": "4.17.21"
},
"devDependencies": {
"@types/node": "16.18.35",
"p-cancelable": "2.1.1",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"get-stream": "^6.0.1",
"nock": "13.2.9",
"node-mocks-http": "1.12.1",
"semver": "7.5.0"
"p-cancelable": "2.1.1",
"semver": "7.5.4"
},
"funding": {
"type": "opencollective",

View File

@@ -1,4 +1,4 @@
import { Agents } from 'got';
import { Agents } from 'got-cjs';
import { HttpProxyAgent, HttpsProxyAgent } from 'hpagent';
import { Agent as HttpAgent, AgentOptions as HttpAgentOptions } from 'http';
import { Agent as HttpsAgent, AgentOptions as HttpsAgentOptions } from 'https';

View File

@@ -1,10 +1,15 @@
import JSONStream from 'JSONStream';
import buildDebug from 'debug';
import got, { RequiredRetryOptions, Headers as gotHeaders } from 'got';
import type { Agents, Options } from 'got';
import got, {
Agents,
Delays,
Options,
RequestError,
RetryOptions,
Headers as gotHeaders,
} from 'got-cjs';
import _ from 'lodash';
import Stream, { PassThrough, Readable } from 'stream';
import { Headers, fetch as undiciFetch } from 'undici';
import { URL } from 'url';
import {
@@ -24,8 +29,6 @@ import { buildToken } from '@verdaccio/utils';
import CustomAgents, { AgentOptionsConf } from './agent';
import { parseInterval } from './proxy-utils';
const LoggerApi = require('@verdaccio/logger');
const debug = buildDebug('verdaccio:proxy');
const encode = function (thing): string {
@@ -51,10 +54,11 @@ export interface ProxyList {
}
export type ProxySearchParams = {
headers?: Headers;
url: string;
query?: searchUtils.SearchQuery;
abort: AbortController;
query?: searchUtils.SearchQuery;
headers?: Headers;
retry?: Partial<RetryOptions>;
};
export interface IProxy {
config: UpLinkConfLocal;
@@ -65,15 +69,18 @@ export interface IProxy {
server_id: string;
url: URL;
maxage: number;
timeout: number;
timeout: Delays;
max_fails: number;
fail_timeout: number;
upname: string;
search(options: ProxySearchParams): Promise<Stream.Readable>;
getRemoteMetadata(name: string, options: ISyncUplinksOptions): Promise<[Manifest, string]>;
getRemoteMetadata(
name: string,
options: Partial<ISyncUplinksOptions>
): Promise<[Manifest, string]>;
fetchTarball(
url: string,
options: Pick<ISyncUplinksOptions, 'remoteAddress' | 'etag' | 'retry'>
options: Partial<Pick<ISyncUplinksOptions, 'remoteAddress' | 'etag' | 'retry'>>
): PassThrough;
}
@@ -99,7 +106,7 @@ class ProxyStorage implements IProxy {
public server_id: string;
public url: URL;
public maxage: number;
public timeout: number;
public timeout: Delays;
public max_fails: number;
public fail_timeout: number;
public agent_options: AgentOptionsConf;
@@ -111,14 +118,14 @@ class ProxyStorage implements IProxy {
// @ts-ignore
public last_request_time: number | null;
public strict_ssl: boolean;
private retry: Partial<RequiredRetryOptions> | number;
private retry: Partial<RetryOptions>;
public constructor(config: UpLinkConfLocal, mainConfig: Config, agent?: Agents) {
public constructor(config: UpLinkConfLocal, mainConfig: Config, logger: Logger, agent?: Agents) {
this.config = config;
this.failed_requests = 0;
this.userAgent = mainConfig.user_agent ?? 'hidden';
this.ca = config.ca;
this.logger = LoggerApi.logger.child({ sub: 'out' });
this.logger = logger;
this.server_id = mainConfig.server_id;
this.agent_options = setConfig(this.config, 'agent_options', {
keepAlive: true,
@@ -145,7 +152,10 @@ class ProxyStorage implements IProxy {
// a bunch of different configurable timers
this.maxage = parseInterval(setConfig(this.config, 'maxage', '2m'));
// https://github.com/sindresorhus/got/blob/main/documentation/6-timeout.md
this.timeout = parseInterval(setConfig(this.config, 'timeout', '30s'));
this.timeout = {
request: parseInterval(setConfig(this.config, 'timeout', '30s')),
};
debug('set timeout %s', this.timeout);
this.max_fails = Number(setConfig(this.config, 'max_fails', this.config.max_fails ?? 2));
this.fail_timeout = parseInterval(setConfig(this.config, 'fail_timeout', '5m'));
this.strict_ssl = Boolean(setConfig(this.config, 'strict_ssl', true));
@@ -162,7 +172,7 @@ class ProxyStorage implements IProxy {
}
}
public getHeadersNext(headers = {}): gotHeaders {
public getHeaders(headers = {}): gotHeaders {
const accept = HEADERS.ACCEPT;
const acceptEncoding = HEADERS.ACCEPT_ENCODING;
const userAgent = HEADERS.USER_AGENT;
@@ -296,15 +306,15 @@ class ProxyStorage implements IProxy {
public async getRemoteMetadata(
name: string,
options: ISyncUplinksOptions
options: Partial<ISyncUplinksOptions>
): Promise<[Manifest, string]> {
if (this._ifRequestFailure()) {
throw errorUtils.getInternalError(API_ERROR.UPLINK_OFFLINE);
}
// FUTURE: allow mix headers that comes from the client
debug('get metadata for %s', name);
let headers = this.getHeadersNext(options?.headers);
debug('getting metadata for package %s', name);
let headers = this.getHeaders(options?.headers);
headers = this.addProxyHeaders(headers, options.remoteAddress);
headers = this.applyUplinkHeaders(headers);
// the following headers cannot be overwritten
@@ -314,25 +324,24 @@ class ProxyStorage implements IProxy {
}
const method = options.method || 'GET';
const uri = this.config.url + `/${encode(name)}`;
debug('request uri for %s retry %s', uri);
debug('set retry limit is %s', this.retry.limit);
let response;
let responseLength = 0;
try {
const retry = options?.retry ?? this.retry;
debug('retry times %s for %s', retry, uri);
debug('retry initial count %s', retry);
response = await got(uri, {
headers,
responseType: 'json',
method,
agent: this.agent,
retry,
// @ts-ignore
timeout: { request: options?.timeout ?? this.timeout },
timeout: this.timeout,
hooks: {
afterResponse: [
(afterResponse) => {
const code = afterResponse.statusCode;
debug('code response %s', code);
debug('after response code is %s', code);
if (code >= HTTP_STATUS.OK && code < HTTP_STATUS.MULTIPLE_CHOICES) {
if (this.failed_requests >= this.max_fails) {
this.failed_requests = 0;
@@ -349,8 +358,8 @@ class ProxyStorage implements IProxy {
},
],
beforeRetry: [
// FUTURE: got 12.0.0, the option arg should be removed
(_options, error: any, count) => {
(error: RequestError, count: number) => {
debug('retry %s count: %s', uri, count);
this.failed_requests = count ?? 0;
this.logger.info(
{
@@ -378,7 +387,7 @@ class ProxyStorage implements IProxy {
.on('request', () => {
this.last_request_time = Date.now();
})
.on('response', (eventResponse) => {
.on<any>('response', (eventResponse) => {
const message = "@{!status}, req: '@{request.method} @{request.url}' (streaming)";
this.logger.http(
{
@@ -422,9 +431,10 @@ class ProxyStorage implements IProxy {
);
return [data, etag];
} catch (err: any) {
debug('uri %s fail', uri);
debug('error %s on uri %s', err.code, uri);
if (err.code === 'ERR_NON_2XX_3XX_RESPONSE') {
const code = err.response.statusCode;
debug('error code %s', code);
if (code === HTTP_STATUS.NOT_FOUND) {
throw errorUtils.getNotFound(errorUtils.API_ERROR.NOT_PACKAGE_UPLINK);
}
@@ -437,6 +447,15 @@ class ProxyStorage implements IProxy {
error.remoteStatus = code;
throw error;
}
} else if (err.code === 'ETIMEDOUT') {
debug('error code timeout');
const code = err.code;
const error = errorUtils.getInternalError(
`${errorUtils.API_ERROR.SERVER_TIME_OUT}: ${code}`
);
// we need this code to identify outside which status code triggered the error
error.remoteStatus = code;
throw error;
}
throw err;
}
@@ -449,7 +468,7 @@ class ProxyStorage implements IProxy {
): any {
debug('fetching url for %s', url);
const options = { ...this.config, ...overrideOptions };
let headers = this.getHeadersNext(options?.headers);
let headers = this.getHeaders(options?.headers);
headers = this.addProxyHeaders(headers, options.remoteAddress);
headers = this.applyUplinkHeaders(headers);
// the following headers cannot be overwritten
@@ -482,37 +501,31 @@ class ProxyStorage implements IProxy {
* @param {*} options request options
* @return {Stream}
*/
public async search({ url, abort }: ProxySearchParams): Promise<Stream.Readable> {
debug('search url %o', url);
let response;
public async search({ url, abort, retry }: ProxySearchParams): Promise<Stream.Readable> {
try {
const fullURL = new URL(`${this.url}${url}`);
// FIXME: a better way to remove duplicate slashes?
const uri = fullURL.href.replace(/([^:]\/)\/+/g, '$1');
this.logger.http({ uri, uplink: this.upname }, 'search request to uplink @{uplink} - @{uri}');
response = await undiciFetch(uri, {
method: 'GET',
// FUTURE: whitelist domains what we are sending not need it headers, security check
// headers: new Headers({
// ...headers,
// connection: 'keep-alive',
// }),
signal: abort?.signal,
debug('searching on %s', uri);
const response = got(uri, {
signal: abort ? abort.signal : {},
agent: this.agent,
timeout: this.timeout,
retry: retry ?? this.retry,
});
debug('response.status %o', response.status);
if (response.status >= HTTP_STATUS.BAD_REQUEST) {
throw errorUtils.getInternalError(`bad status code ${response.status} from uplink`);
}
const streamSearch = new PassThrough({ objectMode: true });
const res = await response.text();
const streamSearch = new PassThrough({ objectMode: true });
const streamResponse = Readable.from(res);
// objects is one of the properties on the body, it ignores date and total
streamResponse.pipe(JSONStream.parse('objects')).pipe(streamSearch, { end: true });
return streamSearch;
} catch (err: any) {
debug('search error %s', err);
if (err.response.statusCode === 409) {
throw errorUtils.getInternalError(`bad status code ${err.response.statusCode} from uplink`);
}
this.logger.error(
{ errorMessage: err?.message, name: this.upname },
'proxy uplink @{name} search error: @{errorMessage}'

View File

@@ -1,11 +1,23 @@
import { DEFAULT_REGISTRY } from '@verdaccio/config';
import { HEADERS, TOKEN_BASIC, TOKEN_BEARER, constants } from '@verdaccio/core';
import { setup } from '@verdaccio/logger';
import { Logger } from '@verdaccio/types';
import { buildToken } from '@verdaccio/utils';
import { ProxyStorage } from '../src';
setup();
const mockDebug = jest.fn();
const mockInfo = jest.fn();
const mockHttp = jest.fn();
const mockError = jest.fn();
const mockWarn = jest.fn();
const logger = {
debug: mockDebug,
info: mockInfo,
http: mockHttp,
error: mockError,
warn: mockWarn,
} as unknown as Logger;
function createUplink(config) {
const defaultConfig = {
@@ -13,12 +25,12 @@ function createUplink(config) {
};
const mergeConfig = Object.assign({}, defaultConfig, config);
// @ts-ignore
return new ProxyStorage(mergeConfig, {});
return new ProxyStorage(mergeConfig, {}, logger);
}
function setHeadersNext(config: unknown = {}, headers: any = {}) {
const uplink = createUplink(config);
return uplink.getHeadersNext({ ...headers });
return uplink.getHeaders({ ...headers });
}
describe('setHeadersNext', () => {

View File

@@ -1,11 +1,13 @@
import { logger, setup } from '@verdaccio/logger';
import { ProxyStorage } from '../src';
require('@verdaccio/logger').setup([]);
setup({});
function getProxyInstance(host, uplinkConf, appConfig) {
uplinkConf.url = host;
return new ProxyStorage(uplinkConf, appConfig);
return new ProxyStorage(uplinkConf, appConfig, logger);
}
describe('Use proxy', () => {

View File

@@ -4,6 +4,7 @@ import { setTimeout } from 'timers/promises';
import { Config, parseConfigFile } from '@verdaccio/config';
import { API_ERROR, errorUtils } from '@verdaccio/core';
import { Logger } from '@verdaccio/types';
import { ProxyStorage } from '../src';
@@ -15,6 +16,14 @@ const mockHttp = jest.fn();
const mockError = jest.fn();
const mockWarn = jest.fn();
const logger = {
debug: mockDebug,
info: mockInfo,
http: mockHttp,
error: mockError,
warn: mockWarn,
} as unknown as Logger;
// mock to get the headers fixed value
jest.mock('crypto', () => {
return {
@@ -31,22 +40,6 @@ jest.mock('crypto', () => {
};
});
jest.mock('@verdaccio/logger', () => {
const originalLogger = jest.requireActual('@verdaccio/logger');
return {
...originalLogger,
logger: {
child: () => ({
debug: (arg, msg) => mockDebug(arg, msg),
info: (arg, msg) => mockInfo(arg, msg),
http: (arg, msg) => mockHttp(arg, msg),
error: (arg, msg) => mockError(arg, msg),
warn: (arg, msg) => mockWarn(arg, msg),
}),
},
};
});
const domain = 'https://registry.npmjs.org';
describe('proxy', () => {
@@ -77,7 +70,7 @@ describe('proxy', () => {
})
.get('/jquery')
.reply(200, { body: 'test' });
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
const [manifest] = await prox1.getRemoteMetadata('jquery', {
remoteAddress: '127.0.0.1',
});
@@ -103,7 +96,7 @@ describe('proxy', () => {
etag: () => `_ref_4444`,
}
);
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
const [manifest, etag] = await prox1.getRemoteMetadata('jquery', {
remoteAddress: '127.0.0.1',
});
@@ -130,7 +123,7 @@ describe('proxy', () => {
etag: () => `_ref_4444`,
}
);
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
const [manifest, etag] = await prox1.getRemoteMetadata('jquery', {
etag: 'foo',
remoteAddress: '127.0.0.1',
@@ -145,7 +138,7 @@ describe('proxy', () => {
nock(domain)
.get('/jquery')
.reply(200, { body: { name: 'foo', version: '1.0.0' } }, {});
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await prox1.getRemoteMetadata('jquery', {
remoteAddress: '127.0.0.1',
});
@@ -174,7 +167,7 @@ describe('proxy', () => {
describe('error handling', () => {
test('proxy call with 304', async () => {
nock(domain).get('/jquery').reply(304);
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await expect(prox1.getRemoteMetadata('jquery', { etag: 'rev_3333' })).rejects.toThrow(
'no data'
);
@@ -182,7 +175,7 @@ describe('proxy', () => {
test('reply with error', async () => {
nock(domain).get('/jquery').replyWithError('something awful happened');
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await expect(
prox1.getRemoteMetadata('jquery', {
remoteAddress: '127.0.0.1',
@@ -192,15 +185,15 @@ describe('proxy', () => {
test('reply with 409 error', async () => {
nock(domain).get('/jquery').reply(409);
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
await expect(prox1.getRemoteMetadata('jquery', { retry: 0 })).rejects.toThrow(
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await expect(prox1.getRemoteMetadata('jquery', { retry: { limit: 0 } })).rejects.toThrow(
new Error('bad status code: 409')
);
});
test('reply with bad body json format', async () => {
nock(domain).get('/jquery').reply(200, 'some-text');
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await expect(
prox1.getRemoteMetadata('jquery', {
remoteAddress: '127.0.0.1',
@@ -214,7 +207,7 @@ describe('proxy', () => {
test('400 error proxy call', async () => {
nock(domain).get('/jquery').reply(409);
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await expect(
prox1.getRemoteMetadata('jquery', {
remoteAddress: '127.0.0.1',
@@ -226,7 +219,7 @@ describe('proxy', () => {
test('proxy not found', async () => {
nock(domain).get('/jquery').reply(404);
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await expect(
prox1.getRemoteMetadata('jquery', {
remoteAddress: '127.0.0.1',
@@ -253,7 +246,7 @@ describe('proxy', () => {
.once()
.reply(200, { body: { name: 'foo', version: '1.0.0' } });
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
const [manifest] = await prox1.getRemoteMetadata('jquery', {
retry: { limit: 2 },
});
@@ -269,10 +262,10 @@ describe('proxy', () => {
);
});
test('retry is exceded and uplink goes offline with logging activity', async () => {
test('retry count is exceded and uplink goes offline with logging activity', async () => {
nock(domain).get('/jquery').times(10).reply(500);
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await expect(
prox1.getRemoteMetadata('jquery', {
remoteAddress: '127.0.0.1',
@@ -307,7 +300,8 @@ describe('proxy', () => {
const prox1 = new ProxyStorage(
{ ...defaultRequestOptions, fail_timeout: '1s', max_fails: 1 },
conf
conf,
logger
);
// force retry
await expect(
@@ -350,5 +344,127 @@ describe('proxy', () => {
);
}, 10000);
});
describe('timeout', () => {
test('fail for timeout (2 seconds)', async () => {
nock(domain)
.get('/jquery')
.times(10)
.delayConnection(6000)
.reply(200, { body: { name: 'foo', version: '1.0.0' } });
const confTimeout = { ...defaultRequestOptions };
// @ts-expect-error
confTimeout.timeout = '2s';
const prox1 = new ProxyStorage(confTimeout, conf, logger);
await expect(
prox1.getRemoteMetadata('jquery', {
retry: { limit: 0 },
})
).rejects.toThrow('ETIMEDOUT');
}, 10000);
test('fail for one failure and timeout (2 seconds)', async () => {
nock(domain)
.get('/jquery')
.times(1)
.reply(500)
.get('/jquery')
.delayConnection(4000)
.reply(200, { body: { name: 'foo', version: '1.0.0' } });
const confTimeout = { ...defaultRequestOptions };
// @ts-expect-error
confTimeout.timeout = '2s';
const prox1 = new ProxyStorage(confTimeout, conf, logger);
await expect(
prox1.getRemoteMetadata('jquery', {
retry: { limit: 1 },
})
).rejects.toThrow('ETIMEDOUT');
}, 10000);
// test('retry count is exceded and uplink goes offline with logging activity', async () => {
// nock(domain).get('/jquery').times(10).reply(500);
// const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
// await expect(
// prox1.getRemoteMetadata('jquery', {
// remoteAddress: '127.0.0.1',
// retry: { limit: 2 },
// })
// ).rejects.toThrow();
// await expect(
// prox1.getRemoteMetadata('jquery', {
// remoteAddress: '127.0.0.1',
// retry: { limit: 2 },
// })
// ).rejects.toThrow(errorUtils.getInternalError(errorUtils.API_ERROR.UPLINK_OFFLINE));
// expect(mockWarn).toHaveBeenCalledTimes(1);
// expect(mockWarn).toHaveBeenLastCalledWith(
// {
// host: 'registry.npmjs.org',
// },
// 'host @{host} is now offline'
// );
// });
// test('fails calls and recover with 200 with log online activity', async () => {
// // This unit test is designed to verify if the uplink goes to offline
// // and recover after the fail_timeout has expired.
// nock(domain)
// .get('/jquery')
// .thrice()
// .reply(500, 'some-text')
// .get('/jquery')
// .once()
// .reply(200, { body: { name: 'foo', version: '1.0.0' } });
// const prox1 = new ProxyStorage(
// { ...defaultRequestOptions, fail_timeout: '1s', max_fails: 1 },
// conf,
// logger
// );
// // force retry
// await expect(
// prox1.getRemoteMetadata('jquery', {
// remoteAddress: '127.0.0.1',
// retry: { limit: 2 },
// })
// ).rejects.toThrow();
// // display offline error on exausted retry
// await expect(
// prox1.getRemoteMetadata('jquery', {
// remoteAddress: '127.0.0.1',
// retry: { limit: 2 },
// })
// ).rejects.toThrow(errorUtils.getInternalError(errorUtils.API_ERROR.UPLINK_OFFLINE));
// expect(mockWarn).toHaveBeenCalledTimes(2);
// expect(mockWarn).toHaveBeenLastCalledWith(
// {
// host: 'registry.npmjs.org',
// },
// 'host @{host} is now offline'
// );
// expect(mockWarn).toHaveBeenLastCalledWith(
// {
// host: 'registry.npmjs.org',
// },
// 'host @{host} is now offline'
// );
// // this is based on max_fails, if change that also change here acordingly
// await setTimeout(3000);
// const [manifest] = await prox1.getRemoteMetadata('jquery', {
// retry: { limit: 2 },
// });
// expect(manifest).toEqual({ body: { name: 'foo', version: '1.0.0' } });
// expect(mockWarn).toHaveBeenLastCalledWith(
// {
// host: 'registry.npmjs.org',
// },
// 'host @{host} is now online'
// );
// }, 10000);
});
});
});

View File

@@ -2,37 +2,30 @@
/* global AbortController */
import getStream from 'get-stream';
import nock from 'nock';
import path from 'path';
import { MockAgent, setGlobalDispatcher } from 'undici';
import { Config, parseConfigFile } from '@verdaccio/config';
import { streamUtils } from '@verdaccio/core';
import { Logger } from '@verdaccio/types';
import { ProxyStorage } from '../src';
const getConf = (name) => path.join(__dirname, '/conf', name);
// TODO: we can mock this globally maybe
const mockDebug = jest.fn();
const mockInfo = jest.fn();
const mockHttp = jest.fn();
const mockError = jest.fn();
const mockWarn = jest.fn();
jest.mock('@verdaccio/logger', () => {
const originalLogger = jest.requireActual('@verdaccio/logger');
return {
...originalLogger,
logger: {
child: () => ({
debug: (arg) => mockDebug(arg),
info: (arg) => mockInfo(arg),
http: (arg) => mockHttp(arg),
error: (arg) => mockError(arg),
warn: (arg) => mockWarn(arg),
}),
},
};
});
const logger = {
debug: mockDebug,
info: mockInfo,
http: mockHttp,
error: mockError,
warn: mockWarn,
} as unknown as Logger;
const domain = 'https://registry.npmjs.org';
@@ -44,20 +37,13 @@ describe('proxy', () => {
const proxyPath = getConf('proxy1.yaml');
const conf = new Config(parseConfigFile(proxyPath));
const options = {
path: '/-/v1/search?maintenance=1&popularity=1&quality=1&size=10&text=verdaccio',
method: 'GET',
};
describe('search', () => {
test('get response from endpoint', async () => {
const response = require('./partials/search-v1.json');
const mockAgent = new MockAgent({ connections: 1 });
mockAgent.disableNetConnect();
setGlobalDispatcher(mockAgent);
const mockClient = mockAgent.get(domain);
mockClient.intercept(options).reply(200, JSON.stringify(response));
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
nock(domain)
.get('/-/v1/search?maintenance=1&popularity=1&quality=1&size=10&text=verdaccio')
.reply(200, response);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
const abort = new AbortController();
const stream = await prox1.search({
abort,
@@ -69,13 +55,11 @@ describe('proxy', () => {
});
test('handle bad response 409', async () => {
const mockAgent = new MockAgent({ connections: 1 });
mockAgent.disableNetConnect();
setGlobalDispatcher(mockAgent);
const mockClient = mockAgent.get(domain);
mockClient.intercept(options).reply(409, {});
nock(domain)
.get('/-/v1/search?maintenance=1&popularity=1&quality=1&size=10&text=verdaccio')
.reply(409);
const abort = new AbortController();
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
await expect(
prox1.search({
abort,
@@ -84,26 +68,26 @@ describe('proxy', () => {
).rejects.toThrow('bad status code 409 from uplink');
});
test.todo('abort search from endpoint');
// test.todo('abort search from endpoint');
// TODO: we should test the gzip deflate here, but is hard to test
// fix me if you can deal with Incorrect Header Check issue
test.todo('get file from endpoint with gzip headers');
// // TODO: we should test the gzip deflate here, but is hard to test
// // fix me if you can deal with Incorrect Header Check issue
// test.todo('get file from endpoint with gzip headers');
test('search endpoint fails', async () => {
const mockAgent = new MockAgent({ connections: 1 });
mockAgent.disableNetConnect();
setGlobalDispatcher(mockAgent);
const mockClient = mockAgent.get(domain);
mockClient.intercept(options).reply(500, {});
const abort = new AbortController();
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
await expect(
prox1.search({
abort,
url: queryUrl,
})
).rejects.toThrow('bad status code 500 from uplink');
});
// test('search endpoint fails', async () => {
// const mockAgent = new MockAgent({ connections: 1 });
// mockAgent.disableNetConnect();
// setGlobalDispatcher(mockAgent);
// const mockClient = mockAgent.get(domain);
// mockClient.intercept(options).reply(500, {});
// const abort = new AbortController();
// const prox1 = new ProxyStorage(defaultRequestOptions, conf);
// await expect(
// prox1.search({
// abort,
// url: queryUrl,
// })
// ).rejects.toThrow('bad status code 500 from uplink');
// });
});
});

View File

@@ -2,7 +2,7 @@ import nock from 'nock';
import path from 'path';
import { Config, parseConfigFile } from '@verdaccio/config';
import { setup } from '@verdaccio/logger';
import { logger, setup } from '@verdaccio/logger';
import { ProxyStorage } from '../src';
@@ -44,7 +44,7 @@ describe('tarball proxy', () => {
nock('https://registry.verdaccio.org')
.get('/jquery/-/jquery-0.0.1.tgz')
.replyWithFile(201, path.join(__dirname, 'partials/jquery-0.0.1.tgz'));
const prox1 = new ProxyStorage(defaultRequestOptions, conf);
const prox1 = new ProxyStorage(defaultRequestOptions, conf, logger);
const stream = prox1.fetchTarball(
'https://registry.verdaccio.org/jquery/-/jquery-0.0.1.tgz',
{}

View File

@@ -38,9 +38,8 @@
"build": "esbuild src/index.ts --bundle --outfile=build/dist.js --platform=node --target=node12 && pnpm run build:types"
},
"devDependencies": {
"@types/node": "16.18.35",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@orama/orama": "1.0.6",
"@orama/orama": "1.1.1",
"debug": "4.3.4",
"esbuild": "0.14.10"
},

View File

@@ -1,5 +1,61 @@
# @verdaccio/server
## 6.0.0-6-next.64
### Patch Changes
- Updated dependencies [0a6412ca9]
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/store@6.0.0-6-next.55
- @verdaccio/web@6.0.0-6-next.62
- @verdaccio/api@6.0.0-6-next.58
- @verdaccio/auth@6.0.0-6-next.54
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/loaders@6.0.0-6-next.44
- @verdaccio/middleware@6.0.0-6-next.54
- verdaccio-audit@11.0.0-6-next.38
- @verdaccio/utils@6.0.0-6-next.43
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.63
### Minor Changes
- ae93e039d: fix: expose middleware methods
### Patch Changes
- Updated dependencies [ae93e039d]
- @verdaccio/api@6.0.0-6-next.57
- @verdaccio/middleware@6.0.0-6-next.53
- @verdaccio/web@6.0.0-6-next.61
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/auth@6.0.0-6-next.53
- @verdaccio/loaders@6.0.0-6-next.43
- verdaccio-audit@11.0.0-6-next.37
- @verdaccio/store@6.0.0-6-next.54
- @verdaccio/utils@6.0.0-6-next.42
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.62
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/api@6.0.0-6-next.56
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/middleware@6.0.0-6-next.52
- @verdaccio/web@6.0.0-6-next.60
- @verdaccio/auth@6.0.0-6-next.52
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/loaders@6.0.0-6-next.42
- verdaccio-audit@11.0.0-6-next.36
- @verdaccio/store@6.0.0-6-next.53
- @verdaccio/utils@6.0.0-6-next.41
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.61
### Patch Changes

View File

@@ -4,7 +4,7 @@ module.exports = Object.assign({}, config, {
coverageThreshold: {
global: {
// FIXME: increase to 90
lines: 85,
lines: 84,
},
},
});

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/server",
"version": "6.0.0-6-next.61",
"version": "6.0.0-6-next.64",
"description": "server logic",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -30,17 +30,17 @@
"npm": ">=6"
},
"dependencies": {
"@verdaccio/api": "workspace:6.0.0-6-next.55",
"@verdaccio/auth": "workspace:6.0.0-6-next.51",
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/loaders": "workspace:6.0.0-6-next.41",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/middleware": "workspace:6.0.0-6-next.51",
"@verdaccio/store": "workspace:6.0.0-6-next.52",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/web": "workspace:6.0.0-6-next.59",
"verdaccio-audit": "workspace:11.0.0-6-next.35",
"@verdaccio/api": "workspace:6.0.0-6-next.58",
"@verdaccio/auth": "workspace:6.0.0-6-next.54",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/loaders": "workspace:6.0.0-6-next.44",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"@verdaccio/middleware": "workspace:6.0.0-6-next.54",
"@verdaccio/store": "workspace:6.0.0-6-next.55",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"@verdaccio/web": "workspace:6.0.0-6-next.62",
"verdaccio-audit": "workspace:11.0.0-6-next.38",
"compression": "1.7.4",
"cors": "2.8.5",
"debug": "4.3.4",
@@ -48,8 +48,7 @@
"lodash": "4.17.21"
},
"devDependencies": {
"@types/node": "16.18.35",
"@verdaccio/proxy": "workspace:6.0.0-6-next.50",
"@verdaccio/proxy": "workspace:6.0.0-6-next.53",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.8",
"http-errors": "2.0.0"
},

View File

@@ -89,7 +89,8 @@ const defineAPI = async function (config: IConfig, storage: Storage): Promise<an
res.locals.app_version = version ?? '';
next();
});
app.use(await webMiddleware(config, auth, storage));
const middleware = await webMiddleware(config, auth, storage);
app.use(middleware);
} else {
app.get('/', function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
next(errorUtils.getNotFound(API_ERROR.WEB_DISABLED));

View File

@@ -1,5 +1,44 @@
# @verdaccio/server-fastify
## 6.0.0-6-next.56
### Patch Changes
- Updated dependencies [0a6412ca9]
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/store@6.0.0-6-next.55
- @verdaccio/auth@6.0.0-6-next.54
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/tarball@11.0.0-6-next.44
- @verdaccio/utils@6.0.0-6-next.43
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.55
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/auth@6.0.0-6-next.53
- @verdaccio/tarball@11.0.0-6-next.43
- @verdaccio/store@6.0.0-6-next.54
- @verdaccio/utils@6.0.0-6-next.42
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.54
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/auth@6.0.0-6-next.52
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/tarball@11.0.0-6-next.42
- @verdaccio/store@6.0.0-6-next.53
- @verdaccio/utils@6.0.0-6-next.41
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.53
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/server-fastify",
"version": "6.0.0-6-next.53",
"version": "6.0.0-6-next.56",
"description": "fastify server api implementation",
"keywords": [
"private",
@@ -34,13 +34,13 @@
"access": "public"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/auth": "workspace:6.0.0-6-next.51",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/store": "workspace:6.0.0-6-next.52",
"@verdaccio/tarball": "workspace:11.0.0-6-next.41",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/auth": "workspace:6.0.0-6-next.54",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"@verdaccio/store": "workspace:6.0.0-6-next.55",
"@verdaccio/tarball": "workspace:11.0.0-6-next.44",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"core-js": "3.30.2",
"debug": "4.3.4",
"fastify": "4.17.0",
@@ -48,7 +48,6 @@
"lodash": "4.17.21"
},
"devDependencies": {
"@types/node": "16.18.35",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"ts-node": "10.9.1"
},

View File

@@ -43,7 +43,7 @@
"lodash": "4.17.21"
},
"devDependencies": {
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/types": "workspace:11.0.0-6-next.25"
},
"funding": {

View File

@@ -32,8 +32,8 @@
"homepage": "https://verdaccio.org",
"license": "MIT",
"devDependencies": {
"@verdaccio/cli": "workspace:6.0.0-6-next.72",
"@verdaccio/ui-theme": "workspace:6.0.0-6-next.72",
"@verdaccio/cli": "workspace:6.0.0-6-next.75",
"@verdaccio/ui-theme": "workspace:6.0.0-6-next.75",
"fs-extra": "10.1.0",
"webpack": "5.82.1",
"webpack-bundle-analyzer": "4.7.0",

View File

@@ -1,5 +1,58 @@
# @verdaccio/store
## 6.0.0-6-next.55
### Minor Changes
- 0a6412ca9: feat: refactor proxy with got v12
### Patch Changes
- 0a6412ca9: refactor: got instead undici
- Updated dependencies [0a6412ca9]
- Updated dependencies [0a6412ca9]
- @verdaccio/core@6.0.0-6-next.75
- @verdaccio/hooks@6.0.0-6-next.45
- @verdaccio/proxy@6.0.0-6-next.53
- @verdaccio/config@6.0.0-6-next.75
- @verdaccio/tarball@11.0.0-6-next.44
- @verdaccio/url@11.0.0-6-next.41
- @verdaccio/loaders@6.0.0-6-next.44
- @verdaccio/local-storage@11.0.0-6-next.45
- @verdaccio/utils@6.0.0-6-next.43
- @verdaccio/logger@6.0.0-6-next.43
## 6.0.0-6-next.54
### Patch Changes
- @verdaccio/core@6.0.0-6-next.74
- @verdaccio/config@6.0.0-6-next.74
- @verdaccio/tarball@11.0.0-6-next.43
- @verdaccio/url@11.0.0-6-next.40
- @verdaccio/hooks@6.0.0-6-next.44
- @verdaccio/loaders@6.0.0-6-next.43
- @verdaccio/local-storage@11.0.0-6-next.44
- @verdaccio/proxy@6.0.0-6-next.52
- @verdaccio/utils@6.0.0-6-next.42
- @verdaccio/logger@6.0.0-6-next.42
## 6.0.0-6-next.53
### Patch Changes
- Updated dependencies [f859d2b1a]
- @verdaccio/core@6.0.0-6-next.73
- @verdaccio/config@6.0.0-6-next.73
- @verdaccio/tarball@11.0.0-6-next.42
- @verdaccio/url@11.0.0-6-next.39
- @verdaccio/hooks@6.0.0-6-next.43
- @verdaccio/loaders@6.0.0-6-next.42
- @verdaccio/local-storage@11.0.0-6-next.43
- @verdaccio/proxy@6.0.0-6-next.51
- @verdaccio/utils@6.0.0-6-next.41
- @verdaccio/logger@6.0.0-6-next.41
## 6.0.0-6-next.52
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/store",
"version": "6.0.0-6-next.52",
"version": "6.0.0-6-next.55",
"description": "loaders logic",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -39,27 +39,25 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/config": "workspace:6.0.0-6-next.72",
"@verdaccio/core": "workspace:6.0.0-6-next.72",
"@verdaccio/hooks": "workspace:6.0.0-6-next.42",
"@verdaccio/loaders": "workspace:6.0.0-6-next.41",
"@verdaccio/local-storage": "workspace:11.0.0-6-next.42",
"@verdaccio/logger": "workspace:6.0.0-6-next.40",
"@verdaccio/proxy": "workspace:6.0.0-6-next.50",
"@verdaccio/url": "workspace:11.0.0-6-next.38",
"@verdaccio/utils": "workspace:6.0.0-6-next.40",
"@verdaccio/tarball": "workspace:11.0.0-6-next.41",
"@verdaccio/config": "workspace:6.0.0-6-next.75",
"@verdaccio/core": "workspace:6.0.0-6-next.75",
"@verdaccio/hooks": "workspace:6.0.0-6-next.45",
"@verdaccio/loaders": "workspace:6.0.0-6-next.44",
"@verdaccio/local-storage": "workspace:11.0.0-6-next.45",
"@verdaccio/logger": "workspace:6.0.0-6-next.43",
"@verdaccio/proxy": "workspace:6.0.0-6-next.53",
"@verdaccio/url": "workspace:11.0.0-6-next.41",
"@verdaccio/utils": "workspace:6.0.0-6-next.43",
"@verdaccio/tarball": "workspace:11.0.0-6-next.44",
"JSONStream": "1.3.5",
"debug": "4.3.4",
"lodash": "4.17.21",
"merge2": "1.4.1",
"semver": "7.5.0"
"semver": "7.5.4"
},
"devDependencies": {
"@types/node": "16.18.35",
"@verdaccio/types": "workspace:11.0.0-6-next.25",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.8",
"undici": "4.16.0",
"nock": "13.2.9",
"node-mocks-http": "1.12.1",
"mockdate": "3.0.5"

View File

@@ -1,3 +1,4 @@
import { logger } from '@verdaccio/logger';
import { IProxy, ProxyStorage } from '@verdaccio/proxy';
import { Config, Manifest } from '@verdaccio/types';
@@ -14,7 +15,7 @@ export function setupUpLinks(config: Config): ProxyInstanceList {
for (const uplinkName in config.uplinks) {
if (Object.prototype.hasOwnProperty.call(config.uplinks, uplinkName)) {
// instance for each up-link definition
const proxy: IProxy = new ProxyStorage(config.uplinks[uplinkName], config);
const proxy: IProxy = new ProxyStorage(config.uplinks[uplinkName], config, logger);
// TODO: review this can be inside ProxyStorage
proxy.upname = uplinkName;

Some files were not shown because too many files have changed in this diff Show More