Compare commits

..

57 Commits

Author SHA1 Message Date
Juan Picado
28244477d2 changeset 2025-03-16 11:24:35 +01:00
Juan Picado
1b6115f2d6 Update index.spec.ts 2025-03-16 11:17:16 +01:00
Juan Picado
6ade2de358 fix: auth plugin callback types 2025-03-16 11:17:16 +01:00
Marc Bernard
ef6864c832 chore(deps): update webpack-dev-server to v5 (#5133) 2025-03-13 20:29:40 +01:00
Marc Bernard
e4a153955e chore: package.json maintenance (#5134) 2025-03-13 20:26:54 +01:00
Marc Bernard
8209042ee7 fix: bluesky logo and links on website (#5135) 2025-03-13 20:23:26 +01:00
Marc Bernard
d675459d73 fix: warnings when building website (#5136)
* fix: warnings when building website

* fix blog entry
2025-03-13 20:23:01 +01:00
Marc Bernard
c166a12b8b fix: start command for storybook (#5137) 2025-03-13 20:22:31 +01:00
verdacciobot
d82d07405a chore: updated static data 2025-03-13 00:15:18 +00:00
verdacciobot
54899d969c chore: updated static data 2025-03-10 00:13:20 +00:00
Juan Picado
e85648f017 chore: update versions (next-8) (#5129)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-09 15:15:16 +01:00
Marc Bernard
95ac1242dc chore: add package parameter to storage plugin interface (#5127) 2025-03-09 12:37:24 +01:00
Juan Picado
00c142f480 chore: update versions (next-8) (#5105)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-09 11:51:41 +01:00
Marc Bernard
411087391a chore(middleware): improve loop detection (#5111)
* chore(middleware): improve loop detection

* rename loop > antiloop.spec

* replace regex
2025-03-09 11:12:17 +01:00
renovate[bot]
016f0c2bcd chore(deps): update babel monorepo to v7.26.9 (#5118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-09 10:56:26 +01:00
Marc Bernard
85e0e135aa fix: internal error for unpublished tarball (#5119) 2025-03-09 10:56:00 +01:00
Marc Bernard
13e0fdef08 fix(proxy): validate protocol of proxy settings (#5125)
* fix(proxy): validate protocol of proxy settings

* Update docs
2025-03-09 10:42:11 +01:00
Marc Bernard
83dbde5154 fix(store): internal error when checking manifest (#5123) 2025-03-08 14:39:53 +01:00
Marc Bernard
7e48ac6cde fix(store): update deprecate state (#5121) 2025-03-08 14:36:46 +01:00
Marc Bernard
d1dcb2ccc3 chore: sort package.json (#5122) 2025-03-08 13:35:07 +01:00
Marc Bernard
66bc2843e1 chore: middleware package update (#5126) 2025-03-08 13:34:36 +01:00
verdacciobot
dd2fa34e1f chore: updated static data 2025-03-06 00:15:32 +00:00
Juan Picado
0bd3e8e7e7 Update changesets-pr.yml 2025-03-04 17:09:34 +01:00
renovate[bot]
dc89fa0269 chore(deps): update all build dependencies (#5117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-03 12:33:28 +01:00
verdacciobot
ae9944ebf8 chore: updated static data 2025-03-03 00:15:32 +00:00
Juan Picado
fc9447e805 chore: update ci 2025-03-02 18:26:07 +01:00
Juan Picado
12712f5547 Update ui-components.yml 2025-03-02 18:19:01 +01:00
Juan Picado
e33f8446af chore: ui-component ci 2025-03-02 18:13:54 +01:00
verdacciobot
c7d0290127 chore: updated static data 2025-03-02 16:25:25 +00:00
Juan Picado
9fbae9a5c7 chore: fix msw local development (#5116)
* chore: fix msw local development

* Create changesets-pr.yml

* Update changesets-pr.yml

* Update changesets-pr.yml

* Update changesets-pr.yml

* Update changesets-pr.yml
2025-03-02 17:21:15 +01:00
Juan Picado
b6e9f4606e chore: update ui-i18n package settings 2025-03-02 13:12:55 +01:00
Juan Picado
3b72253c9c chore: update ui-components workflow 2025-03-02 13:10:15 +01:00
Juan Picado
f6a4f9f582 Update pnpm-lock.yaml 2025-03-02 13:06:15 +01:00
Juan Picado
4166b31540 chore: fix changesets 2025-03-02 13:04:37 +01:00
Juan Picado
a7c1f36ec1 Update pre.json 2025-03-02 12:54:58 +01:00
Juan Picado
c256b1d97e Update changesets.yml 2025-03-02 12:51:17 +01:00
Juan Picado
92c128f735 Update changesets.yml 2025-03-02 12:50:47 +01:00
Juan Picado
e78686e961 Update changesets.yml 2025-03-02 12:43:39 +01:00
Juan Picado
d4225867df chore: improve ci 2025-03-02 12:37:35 +01:00
Juan Picado
8d30c50c89 chore: remove test files 2025-03-02 12:32:03 +01:00
Juan Picado
be28e6cc1b Update .gitignore 2025-03-02 12:30:53 +01:00
Juan Picado
d9e8da40c4 chore: add ui translation package (#5115)
* chore: add ui translation package

* Update package.json

* Create itchy-glasses-end.md
2025-03-02 12:07:36 +01:00
Marc Bernard
6260eae1e8 fix(ui-components): remove test warnings (#5113) 2025-03-02 11:39:04 +01:00
Marc Bernard
8eb8975d66 fix: notification/alert box formatting (#5112) 2025-03-02 10:54:40 +01:00
Marc Bernard
96fdf89d20 fix(web): anonymous user handling (#5114)
* fix(web): "??" operator warning

* fix(web): anonymous user handling

* remove duplicate changeset
2025-03-02 10:50:56 +01:00
dependabot[bot]
cd61cd4dab chore(deps): bump actions/cache from 4.2.0 to 4.2.2 (#5108)
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.0 to 4.2.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](1bd1e32a3b...d4323d4df1)

---
updated-dependencies:
- dependency-name: actions/cache
  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>
2025-03-01 13:26:41 +01:00
dependabot[bot]
e1ceeb051c chore(deps): bump github/codeql-action from 3.28.8 to 3.28.10 (#5107)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.8 to 3.28.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](dd746615b3...b56ba49b26)

---
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>
2025-03-01 13:26:34 +01:00
dependabot[bot]
ace32e1dd9 chore(deps): bump docker/setup-qemu-action from 3.3.0 to 3.6.0 (#5109)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.3.0 to 3.6.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](53851d1459...29109295f8)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  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>
2025-03-01 13:26:25 +01:00
dependabot[bot]
bcd90863f1 chore(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1 (#5110)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](65c4c4a1dd...4cec3d8aa0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2025-03-01 13:26:03 +01:00
Juan Picado
add1b7674b chore: fix dependency reference 2025-03-01 11:50:43 +01:00
Juan Picado
0823c446aa chore: corepack inside dockerfile 2025-03-01 11:35:10 +01:00
Juan Picado
ffcf865ba8 chore: update pnpm command 2025-03-01 11:33:17 +01:00
Juan Picado
150ac6e231 chore: update pnm10 (#5106)
* chore: update pnm10

* Update e2e-ci.yml

* Update e2e-ci.yml

* Update e2e-ci.yml
2025-03-01 11:31:32 +01:00
Marc Bernard
02f28e928e fix(ui-components): typings for vitest/jest-dom (#5103) 2025-03-01 10:26:35 +01:00
Marc Bernard
a85a6c58d6 fix: set eol default (#5104) 2025-03-01 09:51:47 +01:00
verdacciobot
ea6b31a4e5 chore: updated static data 2025-02-27 00:15:24 +00:00
verdacciobot
1d4972bf93 chore: updated static data 2025-02-24 00:15:02 +00:00
217 changed files with 27135 additions and 18969 deletions

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/ui-theme': patch
'@verdaccio/ui-components': patch
---
chore(deps): update webpack-dev-server to v5

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/store': patch
---
fix(store): internal error when checking manifest

View File

@@ -13,6 +13,7 @@
]
],
"ignoredPackages": [
"@verdaccio/local-publish",
"docusaurus-plugin-downloads",
"docusaurus-plugin-contributors",
"@verdaccio/test-cli-commons",

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/middleware': patch
---
chore(middleware): improve loop detection

View File

@@ -0,0 +1,7 @@
---
'verdaccio': patch
'@verdaccio/store': patch
'@verdaccio/utils': patch
---
fix: internal error for unpublished tarball

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/proxy': patch
'@verdaccio/website': patch
---
fix(proxy): validate protocol of proxy settings

View File

@@ -0,0 +1,7 @@
---
'verdaccio-auth-memory': minor
'@verdaccio/core': minor
'@verdaccio/auth': minor
---
fix: auth callback types

View File

@@ -0,0 +1,7 @@
---
'@verdaccio/ui-theme': minor
'@verdaccio/ui-components': minor
'@verdaccio/ui-i18n': minor
---
feat: new i18n package for ui

View File

@@ -0,0 +1,42 @@
---
'generator-verdaccio-plugin': patch
'@verdaccio/logger-prettify': patch
'@verdaccio/logger-commons': patch
'@verdaccio/local-storage': patch
'@verdaccio/local-publish': patch
'@verdaccio/local-scripts': patch
'@verdaccio/file-locking': patch
'verdaccio-htpasswd': patch
'@verdaccio/ui-theme': patch
'verdaccio-memory': patch
'@verdaccio/search-indexer': patch
'@verdaccio/server': patch
'@verdaccio/server-fastify': patch
'@verdaccio/logger': patch
'@verdaccio/test-helper': patch
'@verdaccio/ui-components': patch
'@verdaccio/tarball': patch
'@verdaccio/eslint-config': patch
'@verdaccio/types': patch
'@verdaccio/middleware': patch
'@verdaccio/cli-standalone': patch
'@verdaccio/core': patch
'@verdaccio/ui-i18n': patch
'@verdaccio/signature': patch
'verdaccio': patch
'@verdaccio/url': patch
'@verdaccio/node-api': patch
'@verdaccio/loaders': patch
'@verdaccio/config': patch
'@verdaccio/search': patch
'@verdaccio/hooks': patch
'@verdaccio/proxy': patch
'@verdaccio/store': patch
'@verdaccio/utils': patch
'@verdaccio/auth': patch
'@verdaccio/api': patch
'@verdaccio/cli': patch
'@verdaccio/web': patch
---
chore: package.json maintenance

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/ui-components': patch
---
fix(ui-components): remove test warnings

View File

@@ -14,6 +14,7 @@
"@verdaccio/e2e-cli-yarn3": "1.0.1",
"@verdaccio/e2e-cli-yarn4": "1.0.1",
"@verdaccio/e2e-ui": "2.0.0",
"@verdaccio/ui-i18n": "8.0.0",
"@verdaccio/api": "7.0.0",
"@verdaccio/auth": "7.0.0",
"@verdaccio/cli": "7.0.0",
@@ -48,7 +49,6 @@
"@verdaccio/eslint-config": "3.0.0",
"generator-verdaccio-plugin": "5.0.0",
"@verdaccio/test-helper": "3.0.0",
"@verdaccio/local-publish": "0.0.2",
"@verdaccio/local-scripts": "1.0.0",
"customprefix-auth": "2.0.0",
"@verdaccio/ui-components": "3.0.0",
@@ -59,7 +59,8 @@
"@verdaccio/e2e-cli-npm-common": "1.0.0",
"@verdaccio/e2e-cli-pnpm-common": "1.0.2-next-8.0",
"@verdaccio/e2e-cli-pnpm10": "1.0.0",
"docusaurus-plugin-downloads": "2.0.0"
"docusaurus-plugin-downloads": "2.0.0",
"@verdaccio/local-publish": "0.0.2"
},
"changesets": [
"angry-doors-tan",
@@ -68,15 +69,19 @@
"breezy-geckos-search",
"bright-bobcats-ring",
"brown-planets-approve",
"calm-mangos-compare",
"chatty-apricots-report",
"clean-beds-wash",
"clever-bees-happen",
"cool-seals-watch",
"curly-mirrors-smile",
"curvy-rockets-camp",
"cyan-snakes-kiss",
"early-eyes-float",
"eleven-rocks-dream",
"fifty-falcons-design",
"forty-hounds-matter",
"funny-fireants-tan",
"gentle-stingrays-repeat",
"gold-squids-watch",
"green-eagles-boil",
@@ -84,11 +89,15 @@
"healthy-zoos-lie",
"hip-eggs-serve",
"hot-crews-live",
"itchy-glasses-end",
"long-eyes-drum",
"long-singers-drive",
"lucky-crabs-enjoy",
"nine-countries-remember",
"ninety-geese-do",
"popular-trees-grin",
"proud-houses-switch",
"quick-avocados-type",
"quick-seas-deny",
"real-seahorses-change",
"rotten-melons-notice",
@@ -107,7 +116,11 @@
"sweet-crabs-deliver",
"thirty-comics-trade",
"tricky-impalas-shake",
"tricky-knives-end",
"violet-baboons-beg",
"violet-bobcats-allow",
"violet-boxes-float",
"weak-cherries-serve"
"weak-cherries-serve",
"wet-cats-behave"
]
}

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/web': patch
---
fix(web): anonymous user handling

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/ui-components': patch
---
fix(ui-components): typings for vitest/jest-dom

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/store': patch
---
fix(store): update deprecate state

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/middleware': patch
'@verdaccio/web': patch
---
chore: middleware package update

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/core': patch
'@verdaccio/store': patch
---
chore: add package parameter to storage plugin interface

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/ui-i18n': patch
---
fix: ignore duplicted files

View File

@@ -1,3 +1,4 @@
assets/**/*
**/fixtures/**
**/mock/store/**
**/partials/**

5
.gitattributes vendored
View File

@@ -13,7 +13,7 @@
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=lf
* text eol=lf
# Source code
*.bash text eol=lf
@@ -197,3 +197,6 @@ Procfile text eol=lf
# Ignore files (like .npmignore or .gitignore)
*.*ignore text eol=lf
# Test Snapshots
*.snap text eol=lf

36
.github/workflows/changesets-pr.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Changesets Publish Test
on:
pull_request:
concurrency:
group: changeset-pr-${{ github.ref }}
cancel-in-progress: true
jobs:
version:
if: github.event.pull_request.head.repo.fork == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
- name: crowdin download
env:
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
CONTEXT: production
run: pnpm crowdin:download
- name: build
run: pnpm build
- name: Docker test
run: |
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:6
- name: login
run: npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873
- name: Prepare
# to allow local snapshot
run: rm .changeset/pre.json
- name: Create snapshot
run: pnpm local:snapshots
- name: Changeset version
run: pnpm local:publish

View File

@@ -1,9 +1,7 @@
name: Changesets
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
push:
branches:
- master
@@ -19,41 +17,16 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio'
steps:
- name: checkout code repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.nvmrc'
env:
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
- name: Install pnpm
run: |
npm install --global corepack@latest
corepack enable
corepack install
- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: setup pnpm config registry
run: pnpm config set registry https://registry.npmjs.org
- name: install dependencies
run: pnpm install
env:
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
- name: crowdin download
env:
env:
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
CONTEXT: production
run: pnpm crowdin:download
run: pnpm crowdin:download
- name: build
run: pnpm build
- name: create versions
uses: changesets/action@master
with:

View File

@@ -68,7 +68,9 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
node_version: [18, 20, 21, 22, 23]
## updated according official maintained releases
## https://nodejs.org/en/about/previous-releases
node_version: [18, 20, 22, 23]
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
runs-on: ${{ matrix.os }}
steps:
@@ -94,7 +96,7 @@ jobs:
npm install --global corepack@latest
corepack enable
corepack install
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}

View File

@@ -37,7 +37,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with:
config: |
paths-ignore:
@@ -50,7 +50,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@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
uses: github/codeql-action/autobuild@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -64,4 +64,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10

View File

@@ -25,7 +25,7 @@ jobs:
if: github.repository == 'verdaccio/verdaccio'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host

View File

@@ -45,7 +45,7 @@ jobs:
npm9,
npm10
]
node: [18, 23]
node: [22]
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
@@ -59,7 +59,7 @@ jobs:
- name: Restore cache pnpm store
uses: ./.github/actions/cache-packages
- name: Test CLI
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
run: cd e2e/cli/e2e-${{matrix.pkg}} && NODE_ENV=production pnpm test
e2e-cli-pnpm:
needs: [prepare, build]
@@ -72,7 +72,7 @@ jobs:
pnpm9,
pnpm10,
]
node: [18, 23]
node: [22]
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
@@ -86,7 +86,7 @@ jobs:
- name: Restore cache pnpm store
uses: ./.github/actions/cache-packages
- name: Test CLI
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
run: cd e2e/cli/e2e-${{matrix.pkg}} && NODE_ENV=production pnpm test
e2e-cli-yarn:
needs: [prepare, build]
strategy:
@@ -99,7 +99,7 @@ jobs:
yarn3,
yarn4
]
node: [18, 23]
node: [22]
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
@@ -113,5 +113,5 @@ jobs:
- name: Restore cache pnpm store
uses: ./.github/actions/cache-packages
- name: Test CLI
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
run: cd e2e/cli/e2e-${{matrix.pkg}} && NODE_ENV=production pnpm test

View File

@@ -26,7 +26,7 @@ jobs:
node-version: 20
- name: Test UI
run: pnpm test:e2e:ui
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: videos
path: /home/runner/work/verdaccio/verdaccio/e2e/ui/cypress/videos

View File

@@ -24,7 +24,7 @@ jobs:
if: github.repository == 'verdaccio/verdaccio'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host

View File

@@ -1,41 +1,36 @@
name: UI Components
on:
# pull_request:
# Disabled temporary
# push:
# branches:
# - master
workflow_dispatch:
# schedule:
# - cron: '0 0 * * *'
concurrency:
group: ui-deploy-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
env:
DEBUG: verdaccio*
contents: read
jobs:
deploy:
permissions:
contents: read # to fetch code (actions/checkout)
deployments: write
pull-requests: write # to comment on pull-requests
runs-on: ubuntu-latest
if: github.repository == 'verdaccio/verdaccio'
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
- name: Install pnpm
run: |
npm install --global corepack@latest
corepack enable
corepack install
- name: Install
run: pnpm install
- name: crowdin download
env:
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
CONTEXT: production
run: pnpm crowdin:download
- name: Build modules
run: pnpm build
- name: Build storybook
run: pnpm ui:storybook:build
- name: Copy public content

View File

@@ -39,7 +39,7 @@ jobs:
- name: Build Translations percentage
run: pnpm --filter @verdaccio/local-scripts build
- name: Cache Docusaurus Build
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: website/node_modules/.cache/webpack
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}

View File

@@ -1,6 +1,6 @@
on:
workflow_call:
jobs:
yarn:
name: 'yarn:jest example'
@@ -132,7 +132,7 @@ jobs:
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
yarn jest module.test.js
npm10:
name: 'npm10:jest example'
runs-on: ubuntu-latest
@@ -145,7 +145,7 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 10'
run: npm i -g npm@next-10
run: npm i -g npm@next-10
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
@@ -165,7 +165,7 @@ jobs:
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
yarn jest module.test.js
pnpm8:
name: 'pnpm8:jest example'
runs-on: ubuntu-latest
@@ -178,7 +178,7 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-8
run: npm i -g pnpm@10.5.2
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
@@ -211,7 +211,7 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-9
run: npm i -g pnpm@10.5.2
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'

5
.gitignore vendored
View File

@@ -17,6 +17,10 @@ test-storage*
# docker examples
docker-examples/v5/reverse_proxy/nginx/relative_path/storage/*
docker-examples/v5/**/storage/*
docker-examples/v4/**/storage/*
docker-examples/v6/**/storage/*
docker-examples/v7/**/storage/*
docker-examples/v8/**/storage/*
# jest
reports/
@@ -36,6 +40,7 @@ packages/standalone/dist/
packages/plugins/ui-theme/static
/packages/plugins/ui-theme/src/i18n/download_translations/
!/packages/plugins/ui-theme/src/i18n/crowdin/ui.json
/packages/core/**/download_translations/
## ui tests
!/packages/ui-components/vitest/api/*.tgz

View File

@@ -1,4 +1,5 @@
.cache/
assets/**/*
**/corrupted-package/package.json
**/corrupted.json
**/invalid.js

View File

@@ -11,12 +11,13 @@ RUN apk --no-cache add openssl ca-certificates wget && \
WORKDIR /opt/verdaccio-build
COPY . .
RUN npm -g i pnpm@8.9.0 && \
RUN npm -g i corepack && \
corepack install && \
pnpm config set registry $VERDACCIO_BUILD_REGISTRY && \
pnpm install --frozen-lockfile --ignore-scripts && \
rm -Rf test && \
pnpm run build
# FIXME: need to remove devDependencies from the build
# FIXME: need to remove devDependencies from the build
# NODE_ENV=production pnpm install --frozen-lockfile --ignore-scripts
# RUN pnpm install --prod --ignore-scripts

Binary file not shown.

View File

@@ -6,6 +6,8 @@ api_token_env: CROWDIN_VERDACCIO_API_KEY
preserve_hierarchy: true
files:
- source: /packages/core/i18n/src/crowdin/*.json
translation: '/packages/core/i18n/src/download_translations/%locale%/%original_file_name%'
- source: /packages/plugins/ui-theme/src/i18n/crowdin/*.json
translation: '/packages/plugins/ui-theme/src/i18n/download_translations/%locale%/%original_file_name%'
- source: /website/i18n/en/**/*
@@ -16,4 +18,3 @@ files:
- source: /website/versioned_docs/**/*
translation: /website/i18n/%locale%/docusaurus-plugin-content-docs/**/%original_file_name%
ignore: [/website/versioned_docs/version-6.x/api/**/*]

View File

@@ -4,8 +4,8 @@
"version": "2.0.0-next-8.0",
"main": "src/index.ts",
"devDependencies": {
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/types": "workspace:13.0.0-next-8.3",
"debug": "4.4.0",
"fs-extra": "11.2.0",
@@ -13,7 +13,7 @@
"got": "11.8.6",
"js-yaml": "4.1.0",
"lodash": "4.17.21",
"verdaccio": "workspace:8.0.0-next-8.10"
"verdaccio": "workspace:8.0.0-next-8.12"
},
"scripts": {
"test": "echo no test",

View File

@@ -3,9 +3,9 @@
"name": "@verdaccio/e2e-ui",
"version": "2.0.0",
"devDependencies": {
"verdaccio": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"verdaccio": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/test-helper": "workspace:4.0.0-next-8.3",
"debug": "4.4.0",
"cypress": "^13.6.0",

View File

@@ -16,7 +16,7 @@
},
"devDependencies": {
"@babel/cli": "7.26.4",
"@babel/core": "7.26.7",
"@babel/core": "7.26.9",
"@babel/eslint-parser": "7.25.9",
"@babel/node": "7.26.0",
"@babel/plugin-proposal-decorators": "7.25.9",
@@ -33,12 +33,12 @@
"@babel/plugin-transform-numeric-separator": "7.25.9",
"@babel/plugin-transform-object-rest-spread": "7.25.9",
"@babel/plugin-transform-optional-chaining": "7.25.9",
"@babel/plugin-transform-runtime": "7.25.9",
"@babel/preset-env": "7.26.7",
"@babel/plugin-transform-runtime": "7.26.9",
"@babel/preset-env": "7.26.9",
"@babel/preset-react": "7.26.3",
"@babel/preset-typescript": "7.24.7",
"@babel/register": "7.25.9",
"@babel/runtime": "7.26.7",
"@babel/runtime": "7.26.9",
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.12",
"@changesets/get-dependents-graph": "2.1.2",
@@ -58,10 +58,10 @@
"@types/express": "4.17.21",
"@types/express-serve-static-core": "4.19.5",
"@types/http-errors": "2.0.4",
"@types/jest": "29.5.14",
"@types/jsonwebtoken": "9.0.6",
"@types/lodash": "4.17.7",
"@types/mime": "3.0.4",
"@types/jest": "29.5.14",
"@types/minimatch": "5.1.2",
"@types/node": "20.14.12",
"@types/node-fetch": "2.6.11",
@@ -84,8 +84,8 @@
"@types/yeoman-test": "4.0.6",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"@verdaccio/local-scripts": "workspace:*",
"@verdaccio/eslint-config": "workspace:*",
"@verdaccio/local-scripts": "workspace:*",
"@verdaccio/types": "workspace:*",
"@verdaccio/ui-theme": "workspace:*",
"@vitest/coverage-v8": "3.0.4",
@@ -112,11 +112,11 @@
"react-dom": "18.3.1",
"rimraf": "5.0.10",
"selfsigned": "2.4.1",
"semver": "^7.6.3",
"supertest": "7.0.0",
"ts-node": "10.9.2",
"typescript": "5.3.3",
"undici-types": "5.28.4",
"semver": "^7.6.3",
"update-ts-references": "3.6.0",
"verdaccio-audit": "workspace:*",
"verdaccio-auth-memory": "workspace:*",
@@ -157,7 +157,7 @@
"ts:ref": "update-ts-references --discardComments",
"website": "pnpm --filter ...@verdaccio/website build",
"ui:storybook:build": "pnpm --filter ...@verdaccio/ui-components build-storybook",
"ui:storybook": "pnpm --filter ...@verdaccio/ui-components storybook",
"ui:storybook": "pnpm --filter ...@verdaccio/ui-components start",
"translations": "local-crowdin-api translations",
"crowdin:upload": "crowdin upload sources --auto-update --config ./crowdin.yaml",
"crowdin:download": "crowdin download --verbose --config ./crowdin.yaml",
@@ -176,5 +176,5 @@
"*.{js,jsx,ts,tsx,json,yml,yaml,md}": "prettier --write",
"*.{js,jsx,ts,tsx}": "eslint --cache --fix"
},
"packageManager": "pnpm@8.14.0+sha256.9cebf61abd83f68177b29484da72da9751390eaad46dfc3072d266bfbb1ba7bf"
"packageManager": "pnpm@10.5.2"
}

View File

@@ -1,5 +1,35 @@
# @verdaccio/api
## 8.1.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/store@8.0.0-next-8.12
- @verdaccio/auth@8.0.0-next-8.12
- @verdaccio/config@8.0.0-next-8.12
- @verdaccio/middleware@8.0.0-next-8.12
- @verdaccio/utils@8.1.0-next-8.12
- @verdaccio/logger@8.0.0-next-8.12
## 8.1.0-next-8.11
### Patch Changes
- Updated dependencies [83dbde5]
- Updated dependencies [4110873]
- Updated dependencies [85e0e13]
- Updated dependencies [7e48ac6]
- Updated dependencies [66bc284]
- @verdaccio/store@8.0.0-next-8.11
- @verdaccio/middleware@8.0.0-next-8.11
- @verdaccio/utils@8.1.0-next-8.11
- @verdaccio/auth@8.0.0-next-8.11
- @verdaccio/config@8.0.0-next-8.11
- @verdaccio/core@8.0.0-next-8.11
- @verdaccio/logger@8.0.0-next-8.11
## 8.1.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/api",
"version": "8.1.0-next-8.10",
"description": "loaders logic",
"version": "8.1.0-next-8.12",
"description": "Verdaccio Registry API",
"main": "./build/index.js",
"types": "build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/api"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"homepage": "https://verdaccio.org",
"keywords": [
@@ -38,13 +42,13 @@
},
"license": "MIT",
"dependencies": {
"@verdaccio/auth": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/middleware": "workspace:8.0.0-next-8.10",
"@verdaccio/store": "workspace:8.0.0-next-8.10",
"@verdaccio/utils": "workspace:8.1.0-next-8.10",
"@verdaccio/auth": "workspace:8.0.0-next-8.12",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"@verdaccio/middleware": "workspace:8.0.0-next-8.12",
"@verdaccio/store": "workspace:8.0.0-next-8.12",
"@verdaccio/utils": "workspace:8.1.0-next-8.12",
"abortcontroller-polyfill": "1.7.8",
"body-parser": "1.20.3",
"cookies": "0.9.1",

View File

@@ -1,5 +1,29 @@
# @verdaccio/auth
## 8.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/config@8.0.0-next-8.12
- @verdaccio/loaders@8.0.0-next-8.4
- verdaccio-htpasswd@13.0.0-next-8.12
- @verdaccio/utils@8.1.0-next-8.12
- @verdaccio/signature@8.0.0-next-8.4
## 8.0.0-next-8.11
### Patch Changes
- Updated dependencies [85e0e13]
- @verdaccio/utils@8.1.0-next-8.11
- @verdaccio/config@8.0.0-next-8.11
- @verdaccio/loaders@8.0.0-next-8.4
- verdaccio-htpasswd@13.0.0-next-8.11
- @verdaccio/signature@8.0.0-next-8.3
- @verdaccio/core@8.0.0-next-8.11
## 8.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/auth",
"version": "8.0.0-next-8.10",
"description": "logger",
"version": "8.0.0-next-8.12",
"description": "Verdaccio Authentication",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/auth"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"homepage": "https://verdaccio.org",
"keywords": [
@@ -38,19 +42,19 @@
},
"license": "MIT",
"dependencies": {
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/loaders": "workspace:8.0.0-next-8.4",
"@verdaccio/signature": "workspace:8.0.0-next-8.2",
"@verdaccio/utils": "workspace:8.1.0-next-8.10",
"@verdaccio/signature": "workspace:8.0.0-next-8.4",
"@verdaccio/utils": "workspace:8.1.0-next-8.12",
"debug": "4.4.0",
"lodash": "4.17.21",
"verdaccio-htpasswd": "workspace:13.0.0-next-8.10"
"verdaccio-htpasswd": "workspace:13.0.0-next-8.12"
},
"devDependencies": {
"@verdaccio/middleware": "workspace:8.0.0-next-8.10",
"@verdaccio/middleware": "workspace:8.0.0-next-8.12",
"@verdaccio/types": "workspace:13.0.0-next-8.3",
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"express": "4.21.2",
"supertest": "7.0.0"
},

View File

@@ -191,7 +191,7 @@ class Auth implements IAuthMiddleware, TokenEncryption, pluginUtils.IBasicAuth {
plugin.authenticate(username, password, function (err: VerdaccioError | null, groups): void {
if (err) {
debug('authenticating for user %o failed. Error: %o', username, err?.message);
return cb(err);
return cb(err, undefined);
}
// Expect: SKIP if groups is falsey and not an array
@@ -201,7 +201,7 @@ class Auth implements IAuthMiddleware, TokenEncryption, pluginUtils.IBasicAuth {
// Caveat: STRING (if valid) will pass successfully
// bug give unexpected results
// Info: Cannot use `== false to check falsey values`
if (!!groups && groups.length !== 0) {
if (!!groups && groups?.length !== 0) {
// TODO: create a better understanding of expectations
if (_.isString(groups)) {
throw new TypeError('plugin group error: invalid type for function');
@@ -212,7 +212,7 @@ class Auth implements IAuthMiddleware, TokenEncryption, pluginUtils.IBasicAuth {
}
debug('authentication for user %o was successfully. Groups: %o', username, groups);
return cb(err, createRemoteUser(username, groups));
return cb(err, createRemoteUser(username, groups as string[]));
}
next();
});

View File

@@ -161,7 +161,7 @@ export function getDefaultPlugins(logger: Logger): pluginUtils.Auth<Config> {
return {
authenticate(_user: string, _password: string, cb: pluginUtils.AuthCallback): void {
debug('triggered default authenticate method');
cb(errorUtils.getForbidden(API_ERROR.BAD_USERNAME_PASSWORD));
cb(errorUtils.getForbidden(API_ERROR.BAD_USERNAME_PASSWORD), undefined);
},
adduser(_user: string, _password: string, cb: pluginUtils.AuthUserCallback): void {

View File

@@ -4,7 +4,14 @@ import supertest from 'supertest';
import { describe, expect, test, vi } from 'vitest';
import { Config as AppConfig, ROLES, createRemoteUser, getDefaultConfig } from '@verdaccio/config';
import { HEADERS, HTTP_STATUS, SUPPORT_ERRORS, TOKEN_BEARER, errorUtils } from '@verdaccio/core';
import {
API_ERROR,
HEADERS,
HTTP_STATUS,
SUPPORT_ERRORS,
TOKEN_BEARER,
errorUtils,
} from '@verdaccio/core';
import { logger, setup } from '@verdaccio/logger';
import { errorReportingMiddleware, final, handleError } from '@verdaccio/middleware';
import { Config } from '@verdaccio/types';
@@ -96,7 +103,7 @@ describe('AuthTest', () => {
});
});
test('should be a fail on login', async () => {
test('should be a fail on login due plugin failure', async () => {
const config: Config = new AppConfig(authPluginFailureConf);
config.checkSecretKey('12345');
const auth: Auth = new Auth(config, logger);
@@ -107,7 +114,7 @@ describe('AuthTest', () => {
auth.authenticate('foo', 'bar', callback);
expect(callback).toHaveBeenCalledTimes(1);
expect(callback).toHaveBeenCalledWith(errorUtils.getInternalError());
expect(callback).toHaveBeenCalledWith(errorUtils.getInternalError(), undefined);
});
});
@@ -131,6 +138,7 @@ describe('AuthTest', () => {
auth.authenticate(null, value, callback);
const call = callback.mock.calls[index++];
expect(call[0]).toBeDefined();
expect(call[0]).toEqual(errorUtils.getForbidden(API_ERROR.BAD_USERNAME_PASSWORD));
expect(call[1]).toBeUndefined();
}
});

View File

@@ -1,5 +1,24 @@
# @verdaccio/cli
## 8.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/config@8.0.0-next-8.12
- @verdaccio/node-api@8.0.0-next-8.12
- @verdaccio/logger@8.0.0-next-8.12
## 8.0.0-next-8.11
### Patch Changes
- @verdaccio/config@8.0.0-next-8.11
- @verdaccio/node-api@8.0.0-next-8.11
- @verdaccio/core@8.0.0-next-8.11
- @verdaccio/logger@8.0.0-next-8.11
## 8.0.0-next-8.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/cli",
"version": "8.0.0-next-8.10",
"version": "8.0.0-next-8.12",
"author": {
"name": "Juan Picado",
"email": "juanpicado19@gmail.com"
@@ -11,7 +11,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/cli"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"homepage": "https://verdaccio.org",
"keywords": [
@@ -28,7 +32,7 @@
"engines": {
"node": ">=18"
},
"description": "verdaccio CLI",
"description": "Verdaccio CLI",
"license": "MIT",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -43,10 +47,10 @@
"start": "ts-node src/index.ts"
},
"dependencies": {
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/node-api": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"@verdaccio/node-api": "workspace:8.0.0-next-8.12",
"clipanion": "4.0.0-rc.4",
"envinfo": "7.14.0",
"kleur": "4.1.5",

View File

@@ -1,5 +1,21 @@
# @verdaccio/config
## 8.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/utils@8.1.0-next-8.12
## 8.0.0-next-8.11
### Patch Changes
- Updated dependencies [85e0e13]
- @verdaccio/utils@8.1.0-next-8.11
- @verdaccio/core@8.0.0-next-8.11
## 8.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/config",
"version": "8.0.0-next-8.10",
"description": "logger",
"version": "8.0.0-next-8.12",
"description": "Verdaccio Configuration",
"main": "./build/index.js",
"types": "build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/config"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"license": "MIT",
"homepage": "https://verdaccio.org",
@@ -38,8 +42,8 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/utils": "workspace:8.1.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/utils": "workspace:8.1.0-next-8.12",
"debug": "4.4.0",
"js-yaml": "4.1.0",
"lodash": "4.17.21",

View File

@@ -1,5 +1,13 @@
# @verdaccio/core
## 8.0.0-next-8.12
### Patch Changes
- 95ac124: chore: add package parameter to storage plugin interface
## 8.0.0-next-8.11
## 8.0.0-next-8.10
## 8.0.0-next-8.9

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/core",
"version": "8.0.0-next-8.10",
"description": "core utilities",
"version": "8.0.0-next-8.12",
"description": "Verdaccio Core Components",
"keywords": [
"private",
"package",

View File

@@ -28,6 +28,7 @@ export {
PLUGIN_CATEGORY,
HtpasswdHashAlgorithm,
} from './constants';
export * from './plugin-utils';
const validationUtils = validatioUtils;
export {
fileUtils,

View File

@@ -51,7 +51,7 @@ export class Plugin<PluginConfig> {
export interface StorageHandler {
logger: Logger;
deletePackage(fileName: string): Promise<void>;
removePackage(): Promise<void>;
removePackage(packageName: string): Promise<void>;
// next packages migration (this list is meant to replace the callback parent functions)
updatePackage(
packageName: string,
@@ -65,7 +65,7 @@ export interface StorageHandler {
// verify if tarball exist in the storage
hasTarball(fileName: string): Promise<boolean>;
// verify if package exist in the storage
hasPackage(): Promise<boolean>;
hasPackage(packageName: string): Promise<boolean>;
}
/**
@@ -98,7 +98,7 @@ export interface Storage<PluginConfig> extends Plugin<PluginConfig> {
*
* ```ts
* import express, { Request, Response } from 'express';
*
*
* class Middleware extends Plugin {
* // instances of auth and storage are injected
* register_middlewares(app, auth, storage) {
@@ -119,7 +119,10 @@ export interface ExpressMiddleware<PluginConfig, Storage, Auth> extends Plugin<P
// --- AUTH PLUGIN ---
export type AuthCallback = (error: VerdaccioError | null, groups?: string[] | false) => void;
export type AuthCallback = (
error: VerdaccioError | null,
user: string[] | false | undefined
) => void;
export type AuthAccessCallback = (error: VerdaccioError | null, access?: boolean) => void;
export type AuthUserCallback = (error: VerdaccioError | null, access?: boolean | string) => void;
@@ -147,7 +150,7 @@ export interface Auth<T> extends Plugin<T> {
return done(errorUtils.getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD));
}
// always return an array of users
return done(null, [user]);
return done(null, [user]);
* }
* ```
*/
@@ -161,7 +164,7 @@ export interface Auth<T> extends Plugin<T> {
return done(errorUtils.getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD));
}
// return boolean
return done(null, true);
return done(null, true);
* }
* ```
*/

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/file-locking",
"version": "13.0.0-next-8.2",
"description": "library that handle file locking",
"description": "Verdaccio File Locking Library",
"keywords": [
"private",
"package",

View File

@@ -0,0 +1,14 @@
{
"extends": "../../../.babelrc",
"presets": [
[
"@babel/env",
{
"targets": {
"node": 18
}
}
],
"@babel/typescript"
]
}

View File

@@ -0,0 +1,6 @@
node_modules
coverage/
lib/
.nyc_output
tests-report/
build/

View File

@@ -0,0 +1,5 @@
{
"rules": {
"@typescript-eslint/no-use-before-define": "off"
}
}

View File

@@ -0,0 +1 @@
src/*

View File

@@ -0,0 +1,7 @@
# @verdaccio/ui-i18n
## 8.0.0-next-8.11
### Patch Changes
- b6e9f46: fix: ignore duplicted files

View File

@@ -0,0 +1,47 @@
{
"name": "@verdaccio/ui-i18n",
"version": "8.0.0-next-8.11",
"description": "Verdaccio UI Internationalization (i18n)",
"keywords": [
"private",
"package",
"repository",
"registry",
"enterprise",
"modules",
"proxy",
"server",
"verdaccio"
],
"main": "./build/index.js",
"types": "./build/index.d.ts",
"author": "Juan Picado <juanpicado19@gmail.com>",
"license": "MIT",
"homepage": "https://verdaccio.org",
"engines": {
"node": ">=18"
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/core/i18n"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rimraf ./build",
"test": "echo \"Error: no test specified\"",
"type-check": "tsc --noEmit -p tsconfig.build.json",
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
"build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
"build": "pnpm run build:js && pnpm run build:types"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/verdaccio"
}
}

View File

@@ -0,0 +1 @@
export { loadTranslationFile as default } from './loadTranslationFile';

View File

@@ -0,0 +1,9 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./build"
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"]
}

View File

@@ -0,0 +1,9 @@
{
"extends": "../../../tsconfig.reference.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./build"
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"]
}

View File

@@ -1,5 +1,23 @@
# Change Log
## 13.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/url@13.0.0-next-8.12
- @verdaccio/utils@8.1.0-next-8.12
## 13.0.0-next-8.11
### Patch Changes
- Updated dependencies [85e0e13]
- @verdaccio/utils@8.1.0-next-8.11
- @verdaccio/core@8.0.0-next-8.11
- @verdaccio/url@13.0.0-next-8.11
## 13.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/tarball",
"version": "13.0.0-next-8.10",
"description": "tarball utilities resolver",
"version": "13.0.0-next-8.12",
"description": "Verdaccio Tarball Utilities",
"keywords": [
"private",
"package",
@@ -33,9 +33,9 @@
"access": "public"
},
"dependencies": {
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/url": "workspace:13.0.0-next-8.10",
"@verdaccio/utils": "workspace:8.1.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/url": "workspace:13.0.0-next-8.12",
"@verdaccio/utils": "workspace:8.1.0-next-8.12",
"debug": "4.4.0",
"gunzip-maybe": "^1.4.2",
"lodash": "4.17.21",

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/types",
"version": "13.0.0-next-8.3",
"description": "verdaccio types definitions",
"description": "Verdaccio Type Definitions",
"keywords": [
"private",
"package",

View File

@@ -1,5 +1,18 @@
# Change Log
## 13.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
## 13.0.0-next-8.11
### Patch Changes
- @verdaccio/core@8.0.0-next-8.11
## 13.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/url",
"version": "13.0.0-next-8.10",
"description": "url utilities resolver",
"version": "13.0.0-next-8.12",
"description": "Verdaccio URL Utilities",
"keywords": [
"private",
"package",
@@ -24,7 +24,7 @@
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/core/url-resolver"
"directory": "packages/core/url"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
@@ -33,7 +33,7 @@
"access": "public"
},
"dependencies": {
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"debug": "4.4.0",
"lodash": "4.17.21",
"validator": "13.12.0"

View File

@@ -1,5 +1,20 @@
# @verdaccio/hooks
## 8.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/logger@8.0.0-next-8.12
## 8.0.0-next-8.11
### Patch Changes
- @verdaccio/core@8.0.0-next-8.11
- @verdaccio/logger@8.0.0-next-8.11
## 8.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/hooks",
"version": "8.0.0-next-8.10",
"description": "loaders logic",
"version": "8.0.0-next-8.12",
"description": "Verdaccio Hooks",
"main": "./build/index.js",
"types": "build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/hooks"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"license": "MIT",
"homepage": "https://verdaccio.org",
@@ -29,16 +33,16 @@
"node": ">=18"
},
"dependencies": {
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"core-js": "3.40.0",
"debug": "4.4.0",
"got-cjs": "12.5.4",
"handlebars": "4.7.8"
},
"devDependencies": {
"@verdaccio/auth": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/auth": "workspace:8.0.0-next-8.12",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/types": "workspace:13.0.0-next-8.3"
},
"scripts": {

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/loaders",
"version": "8.0.0-next-8.4",
"description": "loaders logic",
"description": "Verdaccio Loader Logic",
"main": "./build/index.js",
"types": "build/index.d.ts",
"author": {
@@ -10,20 +10,24 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/loaders"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"dependencies": {
"debug": "4.4.0",
"lodash": "4.17.21"
},
"devDependencies": {
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/types": "workspace:13.0.0-next-8.3",
"@verdaccio-scope/verdaccio-auth-foo": "0.0.2",
"verdaccio-auth-memory": "workspace:*",
"customprefix-auth": "2.0.0"
"customprefix-auth": "workspace:2.0.0"
},
"homepage": "https://verdaccio.org",
"keywords": [

View File

@@ -1,5 +1,18 @@
# @verdaccio/logger-commons
## 8.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
## 8.0.0-next-8.11
### Patch Changes
- @verdaccio/core@8.0.0-next-8.11
## 8.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/logger-commons",
"version": "8.0.0-next-8.10",
"description": "logger",
"version": "8.0.0-next-8.12",
"description": "Verdaccio Logger Commons",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/logger/logger-commons"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"license": "MIT",
"homepage": "https://verdaccio.org",
@@ -38,7 +42,7 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/logger-prettify": "workspace:8.0.0-next-8.1",
"debug": "4.4.0",
"colorette": "2.0.20"

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/logger-prettify",
"version": "8.0.0-next-8.1",
"description": "logger",
"description": "Verdaccio Logger Prettify",
"main": "./build/index.js",
"types": "build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/logger/logger-prettify"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"license": "MIT",
"homepage": "https://verdaccio.org",

View File

@@ -1,5 +1,17 @@
# @verdaccio/logger
## 8.0.0-next-8.12
### Patch Changes
- @verdaccio/logger-commons@8.0.0-next-8.12
## 8.0.0-next-8.11
### Patch Changes
- @verdaccio/logger-commons@8.0.0-next-8.11
## 8.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/logger",
"version": "8.0.0-next-8.10",
"description": "logger",
"version": "8.0.0-next-8.12",
"description": "Verdaccio Logger",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/logger/logger"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"license": "MIT",
"homepage": "https://verdaccio.org",
@@ -38,7 +42,7 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/logger-commons": "workspace:8.0.0-next-8.10",
"@verdaccio/logger-commons": "workspace:8.0.0-next-8.12",
"pino": "9.6.0"
},
"devDependencies": {

View File

@@ -1,5 +1,27 @@
# @verdaccio/middleware
## 8.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/config@8.0.0-next-8.12
- @verdaccio/url@13.0.0-next-8.12
- @verdaccio/utils@8.1.0-next-8.12
## 8.0.0-next-8.11
### Patch Changes
- 4110873: chore(middleware): improve loop detection
- 66bc284: chore: middleware package update
- Updated dependencies [85e0e13]
- @verdaccio/utils@8.1.0-next-8.11
- @verdaccio/config@8.0.0-next-8.11
- @verdaccio/core@8.0.0-next-8.11
- @verdaccio/url@13.0.0-next-8.11
## 8.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/middleware",
"version": "8.0.0-next-8.10",
"description": "express middleware utils",
"version": "8.0.0-next-8.12",
"description": "Verdaccio Express Middleware",
"main": "./build/index.js",
"types": "build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/middleware"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"license": "MIT",
"homepage": "https://verdaccio.org",
@@ -38,10 +42,10 @@
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/url": "workspace:13.0.0-next-8.10",
"@verdaccio/utils": "workspace:8.1.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/url": "workspace:13.0.0-next-8.12",
"@verdaccio/utils": "workspace:8.1.0-next-8.12",
"debug": "4.4.0",
"express": "4.21.2",
"express-rate-limit": "5.5.1",
@@ -54,7 +58,7 @@
"url": "https://opencollective.com/verdaccio"
},
"devDependencies": {
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"body-parser": "1.20.3",
"supertest": "7.0.0",
"jsdom": "25.0.1"

View File

@@ -14,13 +14,24 @@ export function antiLoop(config: Config) {
const arr = req.get('via')?.split(',');
if (Array.isArray(arr)) {
for (let i = 0; i < arr.length; i++) {
// the "via" header must contains an specific headers, this has to be on sync
// the "via" header must contain a specific value, this has to be in sync
// with the proxy request
// match eg: Server 1 or Server 2
// TODO: improve this RegEX
const m = arr[i].trim().match(/\s*(\S+)\s+(\S+)/);
if (m && m[2] === config.server_id) {
return next(errorUtils.getCode(HTTP_STATUS.LOOP_DETECTED, 'loop detected'));
// RFC 7230: Via = 1*( "," OWS Via-value )
// Via-value = received-protocol RWS received-by [ RWS comment ]
// received-protocol = [ protocol-name "/" ] protocol-version
// received-by = ( uri-host [ ":" port ] ) / pseudonym
// Split the trimmed header value into parts
const parts = arr[i].trim().split(/\s+/);
// Check if we have at least protocol/version and received-by parts
if (parts.length >= 2) {
// Get the received-by value (server id), removing any comment
const serverId = parts[1].split('(')[0].trim();
if (serverId === config.server_id) {
return next(errorUtils.getCode(HTTP_STATUS.LOOP_DETECTED, 'loop detected'));
}
}
}
}

View File

@@ -8,6 +8,7 @@ import { isURLhasValidProtocol } from '@verdaccio/url';
import { setSecurityWebHeaders } from './security';
import renderHTML from './utils/renderHTML';
import { WebUrlsNamespace } from './web-urls';
const debug = buildDebug('verdaccio:web:render');
@@ -35,7 +36,7 @@ export function renderWebMiddleware(config, tokenMiddleware, pluginOptions) {
router.use(setSecurityWebHeaders);
// any match within the static is routed to the file system
router.get('/-/static/*', function (req, res, next) {
router.get(WebUrlsNamespace.static + '*', function (req, res, next) {
const filename = req.params[0];
let file = `${staticPath}/${filename}`;
if (filename === 'favicon.ico' && config?.web?.favicon) {
@@ -64,7 +65,7 @@ export function renderWebMiddleware(config, tokenMiddleware, pluginOptions) {
) {
// Note: `path.join` will break on Windows, because it transforms `/` to `\`
// Use POSIX version `path.posix.join` instead.
logo = path.posix.join('/-/static/', path.basename(logo));
logo = path.posix.join(WebUrlsNamespace.static, path.basename(logo));
router.get(logo, function (_req, res, next) {
// @ts-ignore
debug('serve custom logo web:%s - local:%s', logo, absoluteLocalFile);
@@ -92,12 +93,12 @@ export function renderWebMiddleware(config, tokenMiddleware, pluginOptions) {
config.web.logoDark = logoDark;
}
router.get('/-/web/:section/*', function (req, res) {
router.get(WebUrlsNamespace.web + ':section/*', function (req, res) {
renderHTML(config, manifest, manifestFiles, req, res);
debug('render html section');
});
router.get('/', function (req, res) {
router.get(WebUrlsNamespace.root, function (req, res) {
renderHTML(config, manifest, manifestFiles, req, res);
debug('render root');
});

View File

@@ -2,14 +2,15 @@ import express from 'express';
import { renderWebMiddleware } from './render-web';
import { webAPIMiddleware } from './web-api';
import { WebUrlsNamespace } from './web-urls';
export default (config, middlewares, pluginOptions): any => {
// eslint-disable-next-line new-cap
const router = express.Router();
const { tokenMiddleware, webEndpointsApi } = middlewares;
// render web
router.use('/', renderWebMiddleware(config, tokenMiddleware, pluginOptions));
// web endpoints, search, packages, etc
router.use('/-/verdaccio/', webAPIMiddleware(tokenMiddleware, webEndpointsApi));
router.use(WebUrlsNamespace.root, renderWebMiddleware(config, tokenMiddleware, pluginOptions));
// web endpoints: search, packages, readme, sidebar, etc
router.use(WebUrlsNamespace.endpoints, webAPIMiddleware(tokenMiddleware, webEndpointsApi));
return router;
};

View File

@@ -16,7 +16,10 @@ export enum WebUrls {
* Enum for web urls namespace, used on the web middleware
*/
export enum WebUrlsNamespace {
root = '/-/verdaccio/',
root = '/',
static = '/-/static/',
endpoints = '/-/verdaccio/',
web = '/-/web/',
data = '/data/',
sec = '/sec/',
}

View File

@@ -0,0 +1,90 @@
import request from 'supertest';
import { test } from 'vitest';
import { HTTP_STATUS } from '@verdaccio/core';
import { antiLoop } from '../src';
import { getApp } from './helper';
test('should not be a loop', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/sec').set('via', 'Server 2').expect(HTTP_STATUS.OK);
});
test('should be a loop', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app)
.get('/sec')
.set('via', 'Server 1, Server 2')
.expect(HTTP_STATUS.LOOP_DETECTED);
});
test('should detect loop with protocol name in via header', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/sec').set('via', 'HTTP/1.1 1').expect(HTTP_STATUS.LOOP_DETECTED);
});
test('should detect loop with comment in via header', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/sec').set('via', '1.1 1 (Verdaccio)').expect(HTTP_STATUS.LOOP_DETECTED);
});
test('should detect loop in multiple via entries', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app)
.get('/sec')
.set('via', '1.1 server-a, 1.1 1, 1.1 server-b')
.expect(HTTP_STATUS.LOOP_DETECTED);
});
test('should handle malformed via header gracefully', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/sec').set('via', 'malformed-header').expect(HTTP_STATUS.OK);
});
test('should handle via header with unexpected format', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/sec').set('via', 'unexpected format').expect(HTTP_STATUS.OK);
});

View File

@@ -1,32 +0,0 @@
import request from 'supertest';
import { test } from 'vitest';
import { HTTP_STATUS } from '@verdaccio/core';
import { antiLoop } from '../src';
import { getApp } from './helper';
test('should not be a loop', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app).get('/sec').set('via', 'Server 2').expect(HTTP_STATUS.OK);
});
test('should be a loop', async () => {
const app = getApp([]);
// @ts-ignore
app.use(antiLoop({ server_id: '1' }));
app.get('/sec', (req, res) => {
res.status(HTTP_STATUS.OK).json({});
});
return request(app)
.get('/sec')
.set('via', 'Server 1, Server 2')
.expect(HTTP_STATUS.LOOP_DETECTED);
});

View File

@@ -1,5 +1,26 @@
# @verdaccio/node-api
## 8.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/config@8.0.0-next-8.12
- @verdaccio/server@8.0.0-next-8.12
- @verdaccio/server-fastify@8.0.0-next-8.12
- @verdaccio/logger@8.0.0-next-8.12
## 8.0.0-next-8.11
### Patch Changes
- @verdaccio/server@8.0.0-next-8.11
- @verdaccio/server-fastify@8.0.0-next-8.11
- @verdaccio/config@8.0.0-next-8.11
- @verdaccio/core@8.0.0-next-8.11
- @verdaccio/logger@8.0.0-next-8.11
## 8.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/node-api",
"version": "8.0.0-next-8.10",
"description": "node API",
"version": "8.0.0-next-8.12",
"description": "Verdaccio Node API",
"main": "build/index.js",
"types": "build/index.d.ts",
"author": {
@@ -10,7 +10,11 @@
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/node-api"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
},
"homepage": "https://verdaccio.org",
"keywords": [
@@ -38,11 +42,11 @@
},
"license": "MIT",
"dependencies": {
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/server": "workspace:8.0.0-next-8.10",
"@verdaccio/server-fastify": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"@verdaccio/server": "workspace:8.0.0-next-8.12",
"@verdaccio/server-fastify": "workspace:8.0.0-next-8.12",
"core-js": "3.40.0",
"debug": "4.4.0",
"lodash": "4.17.21"

View File

@@ -1,7 +1,7 @@
{
"name": "@verdaccio/active-directory",
"version": "11.0.0-6-next.8",
"description": "Active Directory authentication plugin for Verdaccio",
"description": "Active Directory Authentication Plugin for Verdaccio",
"keywords": [
"private",
"package",

View File

@@ -1,5 +1,20 @@
# Change Log
## 13.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/config@8.0.0-next-8.12
## 13.0.0-next-8.11
### Patch Changes
- @verdaccio/config@8.0.0-next-8.11
- @verdaccio/core@8.0.0-next-8.11
## 13.0.0-next-8.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-audit",
"version": "13.0.0-next-8.10",
"version": "13.0.0-next-8.12",
"description": "Verdaccio Middleware plugin to bypass npmjs audit",
"keywords": [
"private",
@@ -30,15 +30,15 @@
"node": ">=18"
},
"dependencies": {
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"express": "4.21.2",
"https-proxy-agent": "5.0.1",
"node-fetch": "cjs"
},
"devDependencies": {
"@verdaccio/auth": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/auth": "workspace:8.0.0-next-8.12",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"@verdaccio/types": "workspace:13.0.0-next-8.3",
"supertest": "7.0.0"
},

View File

@@ -1,5 +1,18 @@
# Change Log
## 13.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
## 13.0.0-next-8.11
### Patch Changes
- @verdaccio/core@8.0.0-next-8.11
## 13.0.0-next-8.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-auth-memory",
"version": "13.0.0-next-8.10",
"version": "13.0.0-next-8.12",
"description": "Auth plugin for Verdaccio that keeps users in memory",
"keywords": [
"private",
@@ -30,12 +30,12 @@
"node": ">=18"
},
"dependencies": {
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"debug": "4.4.0"
},
"devDependencies": {
"@types/debug": "^4.1.12",
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/types": "workspace:13.0.0-next-8.3"
},
"scripts": {

View File

@@ -32,14 +32,14 @@ export default class Memory
if (!userCredentials) {
debug('user %o does not exist', user);
return cb(null, false);
return cb(errorUtils.getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD), undefined);
}
if (password !== userCredentials.password) {
const err = errorUtils.getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD);
debug('password invalid for: %o', user);
return cb(err);
return cb(err, undefined);
}
// authentication succeeded!

View File

@@ -1,7 +1,7 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';
import { Config, getDefaultConfig } from '@verdaccio/config';
import { pluginUtils } from '@verdaccio/core';
import { API_ERROR, errorUtils, pluginUtils } from '@verdaccio/core';
import Memory from '../src/index';
import { Users, VerdaccioMemoryConfig } from '../src/types';
@@ -307,8 +307,8 @@ describe('Memory', function () {
test('fails if user does not exist', function () {
return new Promise((done) => {
auth.authenticate('john', 'secret', function (err, groups) {
expect(err).toBeNull();
expect(groups).toBeFalsy();
expect(err).toEqual(errorUtils.getUnauthorized(API_ERROR.BAD_USERNAME_PASSWORD));
expect(groups).toBeUndefined();
done(true);
});
});

View File

@@ -1,5 +1,18 @@
# Change Log
## 13.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
## 13.0.0-next-8.11
### Patch Changes
- @verdaccio/core@8.0.0-next-8.11
## 13.0.0-next-8.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "verdaccio-htpasswd",
"version": "13.0.0-next-8.10",
"description": "htpasswd auth plugin for Verdaccio",
"version": "13.0.0-next-8.12",
"description": "Htpasswd Authentication Plugin for Verdaccio",
"keywords": [
"private",
"package",
@@ -19,7 +19,7 @@
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio",
"directory": "packages/core/htpasswd"
"directory": "packages/plugins/htpasswd"
},
"bugs": {
"url": "https://github.com/verdaccio/verdaccio/issues"
@@ -33,7 +33,7 @@
"node": ">=18"
},
"dependencies": {
"@verdaccio/core": "workspace:8.0.0-next-8.10",
"@verdaccio/core": "workspace:8.0.0-next-8.12",
"@verdaccio/file-locking": "workspace:13.0.0-next-8.2",
"apache-md5": "1.1.8",
"bcryptjs": "2.4.3",
@@ -45,8 +45,8 @@
"devDependencies": {
"@types/bcryptjs": "2.4.6",
"@verdaccio/types": "workspace:13.0.0-next-8.3",
"@verdaccio/config": "workspace:8.0.0-next-8.10",
"@verdaccio/logger": "workspace:8.0.0-next-8.10",
"@verdaccio/config": "workspace:8.0.0-next-8.12",
"@verdaccio/logger": "workspace:8.0.0-next-8.12",
"mockdate": "3.0.5"
},
"scripts": {

View File

@@ -1,5 +1,21 @@
# Change Log
## 13.0.0-next-8.12
### Patch Changes
- Updated dependencies [95ac124]
- @verdaccio/core@8.0.0-next-8.12
- @verdaccio/utils@8.1.0-next-8.12
## 13.0.0-next-8.11
### Patch Changes
- Updated dependencies [85e0e13]
- @verdaccio/utils@8.1.0-next-8.11
- @verdaccio/core@8.0.0-next-8.11
## 13.0.0-next-8.10
### Patch Changes

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