Compare commits
88 Commits
@verdaccio
...
@verdaccio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b091c256ea | ||
|
|
5ca87c34b4 | ||
|
|
058860593a | ||
|
|
7fb6950996 | ||
|
|
16aba09ab2 | ||
|
|
4247cb1d3b | ||
|
|
ab427ffda5 | ||
|
|
8ed867a7f9 | ||
|
|
6714686111 | ||
|
|
1f90ef1ca3 | ||
|
|
9d91368b46 | ||
|
|
71a0b06e31 | ||
|
|
5bc3951fb8 | ||
|
|
e1b0c9bb9a | ||
|
|
69f2e66b92 | ||
|
|
4b16136a05 | ||
|
|
72afb98a62 | ||
|
|
d8eaf85a32 | ||
|
|
eb4a24b2fc | ||
|
|
3935e2f0a9 | ||
|
|
05d3e78083 | ||
|
|
b11cd7d11a | ||
|
|
31c9ec48b0 | ||
|
|
b6fa1a9a8f | ||
|
|
735a378917 | ||
|
|
f1477cc4f4 | ||
|
|
da6afe3098 | ||
|
|
fce79e9d40 | ||
|
|
a461a2e4cf | ||
|
|
36b8930f0e | ||
|
|
0ae636da09 | ||
|
|
ca91b9af48 | ||
|
|
3ab6b670cb | ||
|
|
d6718a671b | ||
|
|
b3a1499223 | ||
|
|
8289cc67b8 | ||
|
|
49dde15fc8 | ||
|
|
a34f761e44 | ||
|
|
768b5b10ce | ||
|
|
8e9850bc93 | ||
|
|
3ff441b881 | ||
|
|
73ae57996f | ||
|
|
f3c88bae03 | ||
|
|
98d808bcd1 | ||
|
|
061e9a9dee | ||
|
|
0539b40182 | ||
|
|
12e91aa3cd | ||
|
|
2ab3f41bb1 | ||
|
|
46b1238bc0 | ||
|
|
c5e174cdc5 | ||
|
|
4b16eb2c35 | ||
|
|
d771aabf09 | ||
|
|
4b787046d2 | ||
|
|
4340227775 | ||
|
|
b46dd013b1 | ||
|
|
ba23a2d26d | ||
|
|
82ea8eb3e0 | ||
|
|
1be1f20629 | ||
|
|
f1ce900afa | ||
|
|
319b3847f3 | ||
|
|
2255a38ea2 | ||
|
|
7c0577733b | ||
|
|
738b656096 | ||
|
|
e2f81fc0f6 | ||
|
|
c288c18535 | ||
|
|
19918ae956 | ||
|
|
d9e9bc048c | ||
|
|
4f1818471f | ||
|
|
fe8d16fde4 | ||
|
|
f06881f4bb | ||
|
|
dd3fcbd416 | ||
|
|
fde3e2440b | ||
|
|
c7325acf3c | ||
|
|
e9a3b95cff | ||
|
|
6cb3c52830 | ||
|
|
970e0c9157 | ||
|
|
b2c6d3a769 | ||
|
|
a7afdc73e8 | ||
|
|
b745c8246f | ||
|
|
589ea7fc3f | ||
|
|
5a91448653 | ||
|
|
139861eb08 | ||
|
|
f26fb5187a | ||
|
|
4640fc3d42 | ||
|
|
fbd763267d | ||
|
|
fe4c4f3b21 | ||
|
|
827d36582c | ||
|
|
68bc817479 |
9
.changeset/breezy-geckos-search.md
Normal file
9
.changeset/breezy-geckos-search.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
'@verdaccio/tarball': patch
|
||||
'@verdaccio/core': patch
|
||||
'@verdaccio/utils': patch
|
||||
'@verdaccio/middleware': patch
|
||||
'@verdaccio/store': patch
|
||||
---
|
||||
|
||||
chore: move tarball utils to core
|
||||
5
.changeset/bright-bobcats-ring.md
Normal file
5
.changeset/bright-bobcats-ring.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-components': patch
|
||||
---
|
||||
|
||||
fix(ui): sort versions
|
||||
7
.changeset/brown-planets-approve.md
Normal file
7
.changeset/brown-planets-approve.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@verdaccio/config': patch
|
||||
'@verdaccio/types': patch
|
||||
'@verdaccio/website': patch
|
||||
---
|
||||
|
||||
chore: `keep_readmes` docs
|
||||
@@ -13,7 +13,10 @@
|
||||
]
|
||||
],
|
||||
"ignoredPackages": [
|
||||
"docusaurus-plugin-downloads",
|
||||
"docusaurus-plugin-contributors",
|
||||
"@verdaccio/test-cli-commons",
|
||||
"@verdaccio/local-scripts",
|
||||
"@verdaccio/e2e-cli-npm6",
|
||||
"@verdaccio/e2e-cli-npm7",
|
||||
"@verdaccio/e2e-cli-npm8",
|
||||
|
||||
5
.changeset/eleven-rocks-dream.md
Normal file
5
.changeset/eleven-rocks-dream.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'verdaccio': patch
|
||||
---
|
||||
|
||||
chore: bump user agent
|
||||
@@ -49,7 +49,7 @@
|
||||
"generator-verdaccio-plugin": "5.0.0",
|
||||
"@verdaccio/test-helper": "3.0.0",
|
||||
"@verdaccio/local-publish": "0.0.2",
|
||||
"@verdaccio/crowdin-translations": "1.0.0",
|
||||
"@verdaccio/local-scripts": "1.0.0",
|
||||
"customprefix-auth": "2.0.0",
|
||||
"@verdaccio/ui-components": "3.0.0",
|
||||
"@verdaccio/utils": "7.0.0",
|
||||
@@ -58,12 +58,16 @@
|
||||
"@verdaccio/website": "6.0.0",
|
||||
"@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"
|
||||
"@verdaccio/e2e-cli-pnpm10": "1.0.0",
|
||||
"docusaurus-plugin-downloads": "2.0.0"
|
||||
},
|
||||
"changesets": [
|
||||
"angry-doors-tan",
|
||||
"beige-lions-type",
|
||||
"blue-paws-cheer",
|
||||
"breezy-geckos-search",
|
||||
"bright-bobcats-ring",
|
||||
"brown-planets-approve",
|
||||
"chatty-apricots-report",
|
||||
"clean-beds-wash",
|
||||
"clever-bees-happen",
|
||||
@@ -71,6 +75,7 @@
|
||||
"curvy-rockets-camp",
|
||||
"cyan-snakes-kiss",
|
||||
"early-eyes-float",
|
||||
"eleven-rocks-dream",
|
||||
"fifty-falcons-design",
|
||||
"gentle-stingrays-repeat",
|
||||
"gold-squids-watch",
|
||||
@@ -84,11 +89,18 @@
|
||||
"lucky-crabs-enjoy",
|
||||
"nine-countries-remember",
|
||||
"quick-seas-deny",
|
||||
"real-seahorses-change",
|
||||
"rotten-melons-notice",
|
||||
"rotton-readers-shave",
|
||||
"rude-birds-design",
|
||||
"rude-socks-walk",
|
||||
"serious-apes-rule",
|
||||
"short-mails-smoke",
|
||||
"silent-bags-listen",
|
||||
"silver-houses-remain",
|
||||
"slow-cars-guess",
|
||||
"smooth-games-share",
|
||||
"strange-pants-chew",
|
||||
"stupid-camels-build",
|
||||
"sweet-crabs-deliver",
|
||||
"thirty-comics-trade",
|
||||
|
||||
5
.changeset/real-seahorses-change.md
Normal file
5
.changeset/real-seahorses-change.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-components': minor
|
||||
---
|
||||
|
||||
update hover background color of package list
|
||||
6
.changeset/rotton-readers-shave.md
Normal file
6
.changeset/rotton-readers-shave.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/types': patch
|
||||
'@verdaccio/config': patch
|
||||
---
|
||||
|
||||
fix: config builder `addLogger`
|
||||
5
.changeset/short-mails-smoke.md
Normal file
5
.changeset/short-mails-smoke.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-components': patch
|
||||
---
|
||||
|
||||
chore(deps): upgrade storybook to v8
|
||||
5
.changeset/silver-houses-remain.md
Normal file
5
.changeset/silver-houses-remain.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-components': patch
|
||||
---
|
||||
|
||||
fix: ui-component vitest api
|
||||
5
.changeset/slow-cars-guess.md
Normal file
5
.changeset/slow-cars-guess.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-components': minor
|
||||
---
|
||||
|
||||
support packages with multiple module types
|
||||
11
.changeset/smooth-games-share.md
Normal file
11
.changeset/smooth-games-share.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
'@verdaccio/server': patch
|
||||
'verdaccio-audit': patch
|
||||
'@verdaccio/test-helper': patch
|
||||
'@verdaccio/middleware': patch
|
||||
'@verdaccio/auth': patch
|
||||
'@verdaccio/api': patch
|
||||
'@verdaccio/web': patch
|
||||
---
|
||||
|
||||
fix: crashes with path-to-regexp v0.1.12 express
|
||||
5
.changeset/strange-pants-chew.md
Normal file
5
.changeset/strange-pants-chew.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/web': patch
|
||||
---
|
||||
|
||||
feat: show version-specific readmes in web ui
|
||||
2
.github/actions/cache-packages/action.yml
vendored
2
.github/actions/cache-packages/action.yml
vendored
@@ -6,7 +6,7 @@ runs:
|
||||
steps:
|
||||
- name: Cache Packages
|
||||
id: cache-packages
|
||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
||||
with:
|
||||
path: ./packages/
|
||||
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
|
||||
2
.github/actions/cache-store/action.yml
vendored
2
.github/actions/cache-store/action.yml
vendored
@@ -6,7 +6,7 @@ runs:
|
||||
steps:
|
||||
- name: Cache .pnpm-store
|
||||
id: cache-npm
|
||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.event.pull_request.number }}-${{ runner.os }}
|
||||
|
||||
2
.github/actions/install-app-node/action.yml
vendored
2
.github/actions/install-app-node/action.yml
vendored
@@ -22,7 +22,7 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
- name: Install pnpm
|
||||
|
||||
2
.github/actions/install-app/action.yml
vendored
2
.github/actions/install-app/action.yml
vendored
@@ -15,7 +15,7 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
|
||||
2
.github/workflows/changesets.yml
vendored
2
.github/workflows/changesets.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup node.js
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
env:
|
||||
|
||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -86,14 +86,14 @@ jobs:
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio') || github.event_name == 'workflow_dispatch'
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
run: |
|
||||
corepack enable
|
||||
corepack install
|
||||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
||||
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
|
||||
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
|
||||
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@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
|
||||
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
|
||||
|
||||
# ℹ️ 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@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
|
||||
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
|
||||
|
||||
@@ -15,7 +15,7 @@ on:
|
||||
jobs:
|
||||
docker:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
run: docker compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" up -d --build
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: npm setup
|
||||
|
||||
4
.github/workflows/docker-proxy-nginx-e2e.yml
vendored
4
.github/workflows/docker-proxy-nginx-e2e.yml
vendored
@@ -13,7 +13,7 @@ on:
|
||||
jobs:
|
||||
docker:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
run: docker compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" up -d --build
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: npm setup
|
||||
|
||||
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
|
||||
- uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
2
.github/workflows/e2e-ui.yml
vendored
2
.github/workflows/e2e-ui.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
node-version: 20
|
||||
- name: Test UI
|
||||
run: pnpm test:e2e:ui
|
||||
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
||||
with:
|
||||
name: videos
|
||||
path: /home/runner/work/verdaccio/verdaccio/e2e/ui/cypress/videos
|
||||
|
||||
8
.github/workflows/plugin-generator-e2e.yaml
vendored
8
.github/workflows/plugin-generator-e2e.yaml
vendored
@@ -1,11 +1,11 @@
|
||||
name: E2E Generator Verdaccio Plugin
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
# pull_request:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
# push:
|
||||
# branches:
|
||||
# - 'master'
|
||||
|
||||
concurrency:
|
||||
group: generator-plugin-${{ github.ref }}
|
||||
|
||||
2
.github/workflows/shared-docker-publish.yml
vendored
2
.github/workflows/shared-docker-publish.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
|
||||
- uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
driver-opts: network=host
|
||||
|
||||
14
.github/workflows/static-data.yml
vendored
14
.github/workflows/static-data.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
# pull_request:
|
||||
schedule:
|
||||
# twice peer week
|
||||
- cron: '0 0 * * 1,4'
|
||||
- cron: "0 0 * * 1,4"
|
||||
# for now, scheduled, we can enable on push master but not make much sense now
|
||||
# push:
|
||||
# branches:
|
||||
@@ -29,8 +29,16 @@ jobs:
|
||||
uses: ./.github/actions/install-app
|
||||
with:
|
||||
reporter: 'default'
|
||||
- name: Build Translations percentage
|
||||
run: pnpm --filter @verdaccio/crowdin-translations build
|
||||
- name: Build package
|
||||
run: pnpm --filter @verdaccio/local-scripts run build
|
||||
- name: Get npmjs downloads
|
||||
run: pnpm --filter @verdaccio/local-scripts run downloads:npmjs
|
||||
- name: Get docker downloads
|
||||
run: pnpm --filter @verdaccio/local-scripts run pull:docker
|
||||
- name: Get npmjs monhtly downloads
|
||||
run: pnpm --filter @verdaccio/local-scripts run downloads:mounthly
|
||||
- name: Get npmjs year downloads
|
||||
run: pnpm --filter @verdaccio/local-scripts run downloads:yearly
|
||||
- name: update contributors
|
||||
run: pnpm run contributors
|
||||
env:
|
||||
|
||||
2
.github/workflows/ui-components.yml
vendored
2
.github/workflows/ui-components.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
- name: Install pnpm
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare
|
||||
corepack install
|
||||
- name: Install
|
||||
run: pnpm install
|
||||
- name: Build storybook
|
||||
|
||||
6
.github/workflows/website.yml
vendored
6
.github/workflows/website.yml
vendored
@@ -2,6 +2,8 @@ name: Verdaccio Website CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 2 * * 0' # every Sunday at 2am UTC (10pm EST)
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
@@ -35,9 +37,9 @@ jobs:
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Build Translations percentage
|
||||
run: pnpm --filter @verdaccio/crowdin-translations build
|
||||
run: pnpm --filter @verdaccio/local-scripts build
|
||||
- name: Cache Docusaurus Build
|
||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
|
||||
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
|
||||
with:
|
||||
path: website/node_modules/.cache/webpack
|
||||
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest npm'
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest npm 9'
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest npm 10'
|
||||
|
||||
2
.github/workflows/x-e2e-audit-workflow.yml
vendored
2
.github/workflows/x-e2e-audit-workflow.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest npm 10'
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install npm 9'
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install npm 10'
|
||||
|
||||
14
.github/workflows/x-e2e-jest-workflow.yml
vendored
14
.github/workflows/x-e2e-jest-workflow.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install Dependencies
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install Dependencies
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest npm'
|
||||
@@ -108,7 +108,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest npm 9'
|
||||
@@ -141,7 +141,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest npm 10'
|
||||
@@ -174,7 +174,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest pnpm'
|
||||
@@ -207,7 +207,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: 'install latest pnpm'
|
||||
|
||||
2
.github/workflows/x-release-snapshot.yml
vendored
2
.github/workflows/x-release-snapshot.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Use Node (latest)
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install
|
||||
|
||||
2
.github/workflows/x-release.yml
vendored
2
.github/workflows/x-release.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Use Node (latest)
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install
|
||||
|
||||
2
.github/workflows/x-smok-test-docker.yml
vendored
2
.github/workflows/x-smok-test-docker.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Docker test
|
||||
|
||||
2
.github/workflows/x-smok-test-module.yml
vendored
2
.github/workflows/x-smok-test-module.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Use Node (latest)
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Docker test
|
||||
|
||||
2
.github/workflows/yarn-ci-lint.yml
vendored
2
.github/workflows/yarn-ci-lint.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install
|
||||
|
||||
2
.github/workflows/yarn-ci.yml
vendored
2
.github/workflows/yarn-ci.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Use Node ${{ inputs.node_version }}
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version: ${{ inputs.node_version }}
|
||||
- name: Install
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -37,6 +37,8 @@ packages/plugins/ui-theme/static
|
||||
/packages/plugins/ui-theme/src/i18n/download_translations/
|
||||
!/packages/plugins/ui-theme/src/i18n/crowdin/ui.json
|
||||
|
||||
## ui tests
|
||||
!/packages/ui-components/vitest/api/*.tgz
|
||||
|
||||
# CI Pnpm cache
|
||||
.pnpm-store/
|
||||
|
||||
@@ -25,7 +25,7 @@ The Verdaccio project is split into several areas, the first three hosted in the
|
||||
- **User Interface**: The [user Interface](https://github.com/verdaccio/ui) is based in **react** and **material-ui** and looking for front-end contributors.
|
||||
- **Kubernetes and Helm**: Ts the official repository for the [**Helm chart**](https://github.com/verdaccio/charts).
|
||||
|
||||
> There are other areas to contribute, like [documentation](https://github.com/verdaccio/verdaccio/tree/master/website/docs) or [translations](#translations}).
|
||||
> There are other areas to contribute, like [documentation](https://github.com/verdaccio/verdaccio/tree/master/website/docs) or translations.
|
||||
|
||||
## Prepare local setup {#local-setup}
|
||||
|
||||
@@ -379,7 +379,7 @@ If you need help with how testing works, please [refer to the following guide
|
||||
**If you are introducing new features, you MUST include new tests. PRs for
|
||||
features without tests will not be merged.**
|
||||
|
||||
## Translations {#translations}
|
||||
## Translations
|
||||
|
||||
All translations are provided by the **[crowdin](http://crowdin.com)** platform,
|
||||
[https://translate.verdaccio.org/](https://translate.verdaccio.org/)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:21-alpine AS builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:22-alpine AS builder
|
||||
|
||||
ENV NODE_ENV=development \
|
||||
VERDACCIO_BUILD_REGISTRY=https://registry.npmjs.org
|
||||
@@ -20,7 +20,7 @@ RUN npm -g i pnpm@8.9.0 && \
|
||||
# NODE_ENV=production pnpm install --frozen-lockfile --ignore-scripts
|
||||
# RUN pnpm install --prod --ignore-scripts
|
||||
|
||||
FROM node:21-alpine
|
||||
FROM node:22-alpine
|
||||
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
||||
|
||||
ENV VERDACCIO_APPDIR=/opt/verdaccio \
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Verdaccio contributors
|
||||
Copyright (c) 2025 Verdaccio contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -88,7 +88,7 @@ npm install -g generator-verdaccio-plugin
|
||||
|
||||
Learn more [here](https://verdaccio.org/docs/dev-plugins) how to develop plugins. Share your plugins with the community.
|
||||
|
||||
## Integration Tests
|
||||
## End to End Testing
|
||||
|
||||
In our compatibility testing project, we're dedicated to ensuring that your favorite commands work seamlessly across different versions of npm, pnpm, and Yarn. From publishing packages to managing dependencies.
|
||||
Our goal is to give you the confidence to use your preferred package manager without any issues. So dive in, check out our matrix, and see how your commands fare across the board!
|
||||
@@ -299,12 +299,12 @@ Thanks to the following companies to help us to achieve our goals providing free
|
||||
| [Juan Picado](https://github.com/juanpicado) | [Ayush Sharma](https://github.com/ayusharma) | [Sergio Hg](https://github.com/sergiohgz) |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
|
||||
|  |  |  |
|
||||
| [@jotadeveloper](https://twitter.com/jotadeveloper) | [@ayusharma\_](https://twitter.com/ayusharma_) | [@sergiohgz](https://twitter.com/sergiohgz) |
|
||||
| | [@ayusharma\_](https://twitter.com/ayusharma_) | [@sergiohgz](https://twitter.com/sergiohgz) |
|
||||
| [Priscila Oliveria](https://github.com/priscilawebdev) | [Daniel Ruf](https://github.com/DanielRuf) |
|
||||
|  |  |
|
||||
| [@priscilawebdev](https://twitter.com/priscilawebdev) | [@DanielRufde](https://twitter.com/DanielRufde) |
|
||||
|
||||
You can find and chat with them over Discord, click [here](http://chat.verdaccio.org) or follow them at _Twitter_.
|
||||
You can find and chat with them over Discord, click [here](http://chat.verdaccio.org).
|
||||
|
||||
## Who is using Verdaccio?
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Supported versions
|
||||
|
||||
You can find details about the supported versions of Verdaccio in the [version history](VERSIONS.md).
|
||||
You can find details about the supported versions of Verdaccio in the [version history](https://github.com/verdaccio/verdaccio/blob/master/VERSIONS.md).
|
||||
|
||||
## Responsible disclosure security policy
|
||||
|
||||
|
||||
33
VERSIONS.md
33
VERSIONS.md
@@ -2,13 +2,26 @@
|
||||
|
||||
The following table describes the versions of this project:
|
||||
|
||||
| Version | Supported | Minimum Node.js | Branch | Npm Tag | Docker Images | Helm Charts |
|
||||
| ---------------- | ------------------ | --------------- | ------ | ---------------- | ----------------------- | ----------- |
|
||||
| 4.x | :x: (deprecated) | 10 | 4.x | latest-4 | 4, 4.x, 4.x.x, 4.x-next | 3.x |
|
||||
| 5.x previous | :x: (deprecated) | 14 | 5.x | latest-5 | 5, 5.x, 5.x.x, 5.x-next | 4.0 - 4.18 |
|
||||
| 6.x current | :white_check_mark: | 18 | 6.x | latest-6, latest | 6, 6.x, 6.x.x, 6.x-next | 4.19 - ... |
|
||||
| 7.x next | :x: | 18 | 7.x | next-7 | 7.x-next | n/a |
|
||||
| 8.x experimental | :x: | 18 | master | next-8 | nightly-master | n/a |
|
||||
| Version | Supported | Minimum Node.js | Branch | Npm Tag | Docker Images | Helm Charts | E2E Tests |
|
||||
| ---------------- | ------------------ | --------------- | ------ | ---------------- | ----------------------- | ----------- | ------------------------------------------------------------------ |
|
||||
| 4.x | :x: (deprecated) | 10 | 4.x | latest-4 | 4, 4.x, 4.x.x, 4.x-next | 3.x | ❌ |
|
||||
| 5.x previous | :x: (deprecated) | 14 | 5.x | latest-5 | 5, 5.x, 5.x.x, 5.x-next | 4.0 - 4.18 | ❌ |
|
||||
| 6.x current | :white_check_mark: | 18 | 6.x | latest-6, latest | 6, 6.x, 6.x.x, 6.x-next | 4.19 - ... | [e2e-tests/main](https://github.com/verdaccio/e2e-tests/tree/main) |
|
||||
| 7.x next | :x: | 18 | 7.x | next-7 | 7.x-next | n/a | [e2e-tests/6.x](https://github.com/verdaccio/e2e-tests/tree/6.x) |
|
||||
| 8.x experimental | :x: | 18 | master | next-8 | nightly-master | n/a | master branch |
|
||||
|
||||
## Migration Guide
|
||||
|
||||
The migration from Verdaccio v5/v6 to v7 contains breaking changes. Refer to the priliminary [migration guide](https://github.com/verdaccio/verdaccio/blob/master/docs/migration-v5-to-v6.md) for more information.
|
||||
|
||||
For migrations from older versions to v5/6 refer to the [v5 migration guide](https://verdaccio.org/blog/2021/04/14/verdaccio-5-migration-guide/).
|
||||
|
||||
### Deprecated Versions
|
||||
|
||||
Deprecated versions aren’t supported anymore and shouldn’t be used in production. They don’t get updates—including security fixes—and we don’t run E2E tests on them.
|
||||
Once the deprecation period is over, the source code will be archived and won’t be maintained anymore.
|
||||
|
||||
We try to keep things as backward-compatible as possible, but sometimes deprecating old versions is necessary to keep the project moving forward.
|
||||
|
||||
## Npm Registry
|
||||
|
||||
@@ -21,3 +34,9 @@ The official Verdaccio Docker Images are found at https://hub.docker.com/r/verda
|
||||
## Helms Charts
|
||||
|
||||
The official Verdaccio Helm Charts are found at https://artifacthub.io/packages/helm/verdaccio/verdaccio.
|
||||
|
||||
## E2E Tests
|
||||
|
||||
The e2e test are set of basic test running on each release to ensure the basic functionality of Verdaccio. The tests are located at
|
||||
different branches, depending on the version. For versions `6.x` and `7.x` the tests are located at the [e2e-test](https://github.com/verdaccio/e2e-tests) and everything else on this repository.
|
||||
For more details what's being tested, please refer to the [readme file](https://github.com/verdaccio/verdaccio?tab=readme-ov-file#integration-tests) on this repository.
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
# Environment variables
|
||||
|
||||
A full list of available environment variables that allow override
|
||||
internal features.
|
||||
|
||||
#### VERDACCIO_LEGACY_ALGORITHM
|
||||
|
||||
Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`. The algorithm must be supported by `crypto.createCipheriv` and `crypto.createDecipheriv`.
|
||||
Read more here: https://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
|
||||
|
||||
#### VERDACCIO_LEGACY_ENCRYPTION_KEY
|
||||
|
||||
By default, the token stores in the database, but using this variable allows to get it from memory, the length must be 32 characters otherwise will throw an error.
|
||||
Read more here: https://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
|
||||
|
||||
#### VERDACCIO_PUBLIC_URL
|
||||
|
||||
Define a specific public url for your server, it overrules the `Host` and `X-Forwarded-Proto` header if a reverse proxy is being used, it takes in account the `url_prefix` if is defined.
|
||||
|
||||
This is handy in such situations where a dynamic url is required.
|
||||
|
||||
eg:
|
||||
|
||||
```
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
url_prefix: '/my_prefix'
|
||||
|
||||
// url -> https://somedomain.org/my_prefix/
|
||||
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
url_prefix: '/'
|
||||
|
||||
// url -> https://somedomain.org/
|
||||
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix';
|
||||
url_prefix: '/second_prefix'
|
||||
|
||||
// url -> https://somedomain.org/second_prefix/'
|
||||
```
|
||||
|
||||
#### VERDACCIO_FORWARDED_PROTO
|
||||
|
||||
The default header to identify the protocol is `X-Forwarded-Proto`, but there are some environments which [uses something different](https://github.com/verdaccio/verdaccio/issues/990), to change it use the variable `VERDACCIO_FORWARDED_PROTO`
|
||||
|
||||
```
|
||||
$ VERDACCIO_FORWARDED_PROTO=CloudFront-Forwarded-Proto verdaccio --listen 5000
|
||||
```
|
||||
|
||||
#### VERDACCIO_STORAGE_PATH
|
||||
|
||||
By default, the storage is taken from config file, but using this variable allows to set it from environment variable.
|
||||
|
||||
#### VERDACCIO_STORAGE_NAME
|
||||
|
||||
The database name for `@verdaccio/local-storage` is by default `.verdaccio-db.json`, but this can be update by using this variable.
|
||||
@@ -1,4 +1,4 @@
|
||||
# Migration Guide from Verdaccio 5 to Verdaccio 6
|
||||
# Migration Guide from Verdaccio v5 and v6 to Verdaccio v7
|
||||
|
||||
Notes regarding breaking changes for next major release.
|
||||
|
||||
@@ -79,8 +79,15 @@ for more details.
|
||||
|
||||
Introduce environment variables for legacy tokens.
|
||||
|
||||
- `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
|
||||
- `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
|
||||
- `VERDACCIO_LEGACY_ALGORITHM`:
|
||||
|
||||
Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`. The algorithm must be supported by `crypto.createCipheriv` and `crypto.createDecipheriv`.
|
||||
|
||||
- `VERDACCIO_LEGACY_ENCRYPTION_KEY`:
|
||||
|
||||
By default, the token are stored in the database, but using this variable allows to get tokens from memory. The length of the key must be 32 characters otherwise will throw an error.
|
||||
|
||||
Read more on [nodejs.org](https://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options).
|
||||
|
||||
#### @verdaccio/commons-api migration
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
## Developing plugins
|
||||
|
||||
TBA
|
||||
@@ -2,29 +2,44 @@
|
||||
|
||||
## VERWAR001
|
||||
|
||||
Verdaccio doesn't need superuser privileges. Don't run it under root.
|
||||
`Verdaccio doesn't need superuser privileges. Don't run it under root.`
|
||||
|
||||
## VERWAR002
|
||||
|
||||
logger is not defined
|
||||
`The configuration property "logs" has been deprecated, please rename to "log" for future compatibility`
|
||||
|
||||
## VERWAR003
|
||||
|
||||
'rotating-file type is not longer supported, consider use [logrotate] instead'
|
||||
`rotating-file type is not longer supported, consider use [logrotate] instead`
|
||||
|
||||
## VERWAR004
|
||||
|
||||
invalid address - xxxxxx, we expect a port (e.g. "4873"),
|
||||
`invalid address - %s, we expect a port (e.g. "4873"), host:port (e.g. "localhost:4873") or full url '(e.g. "http://localhost:4873/")`
|
||||
|
||||
Learn more at https://verdaccio.org/docs/en/configuration#listen-port
|
||||
|
||||
## VERWAR005
|
||||
|
||||
`n/a`
|
||||
|
||||
## VERWAR006
|
||||
|
||||
`the auth plugin method "add_user" in the auth plugin is deprecated and will be removed in next major release, rename to "adduser"`
|
||||
|
||||
## VERWAR007
|
||||
|
||||
`the secret length is too long, it must be 32 characters long, please consider generate a new one`
|
||||
|
||||
Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db
|
||||
|
||||
## VERDEP001
|
||||
|
||||
'config.logs is deprecated, rename configuration to "config.log" in singular'
|
||||
> Changed to VERWAR002 (see above)
|
||||
|
||||
## VERDEP002
|
||||
|
||||
> After version `verdaccio@6.0.0-6-next.38` this is not longer a warning and
|
||||
> will crash your application
|
||||
> After version `verdaccio@6.0.0-6-next.38` this is not longer a warning and will crash your application
|
||||
|
||||
## VERDEP003
|
||||
|
||||
'multiple addresses will be deprecated in the next major, only use one'
|
||||
`multiple addresses will be deprecated in the next major, only use one`
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
"version": "2.0.0-next-8.0",
|
||||
"main": "src/index.ts",
|
||||
"devDependencies": {
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.2",
|
||||
"debug": "4.3.7",
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.3",
|
||||
"debug": "4.4.0",
|
||||
"fs-extra": "11.2.0",
|
||||
"get-port": "5.1.1",
|
||||
"got": "11.8.6",
|
||||
"js-yaml": "4.1.0",
|
||||
"lodash": "4.17.21",
|
||||
"verdaccio": "workspace:8.0.0-next-8.6"
|
||||
"verdaccio": "workspace:8.0.0-next-8.8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo no test",
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
"name": "@verdaccio/e2e-ui",
|
||||
"version": "2.0.0",
|
||||
"devDependencies": {
|
||||
"verdaccio": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/test-helper": "workspace:4.0.0-next-8.2",
|
||||
"debug": "4.3.7",
|
||||
"verdaccio": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/test-helper": "workspace:4.0.0-next-8.3",
|
||||
"debug": "4.4.0",
|
||||
"cypress": "^13.6.0",
|
||||
"get-port": "5.1.1"
|
||||
},
|
||||
|
||||
65
package.json
65
package.json
@@ -15,40 +15,40 @@
|
||||
"url": "https://opencollective.com/verdaccio"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.24.8",
|
||||
"@babel/core": "7.24.9",
|
||||
"@babel/cli": "7.26.4",
|
||||
"@babel/core": "7.26.7",
|
||||
"@babel/eslint-parser": "7.25.9",
|
||||
"@babel/node": "7.25.0",
|
||||
"@babel/plugin-proposal-decorators": "7.24.7",
|
||||
"@babel/plugin-proposal-function-sent": "7.24.7",
|
||||
"@babel/plugin-proposal-throw-expressions": "7.24.7",
|
||||
"@babel/node": "7.26.0",
|
||||
"@babel/plugin-proposal-decorators": "7.25.9",
|
||||
"@babel/plugin-proposal-function-sent": "7.25.9",
|
||||
"@babel/plugin-proposal-throw-expressions": "7.25.9",
|
||||
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
||||
"@babel/plugin-syntax-import-meta": "7.10.4",
|
||||
"@babel/plugin-transform-async-to-generator": "7.24.7",
|
||||
"@babel/plugin-transform-class-properties": "7.24.7",
|
||||
"@babel/plugin-transform-classes": "7.25.0",
|
||||
"@babel/plugin-transform-export-namespace-from": "7.24.7",
|
||||
"@babel/plugin-transform-json-strings": "7.24.7",
|
||||
"@babel/plugin-transform-nullish-coalescing-operator": "7.24.7",
|
||||
"@babel/plugin-transform-numeric-separator": "7.24.7",
|
||||
"@babel/plugin-transform-object-rest-spread": "7.24.7",
|
||||
"@babel/plugin-transform-optional-chaining": "7.24.8",
|
||||
"@babel/plugin-transform-runtime": "7.24.7",
|
||||
"@babel/preset-env": "7.25.0",
|
||||
"@babel/preset-react": "7.24.7",
|
||||
"@babel/plugin-transform-async-to-generator": "7.25.9",
|
||||
"@babel/plugin-transform-class-properties": "7.25.9",
|
||||
"@babel/plugin-transform-classes": "7.25.9",
|
||||
"@babel/plugin-transform-export-namespace-from": "7.25.9",
|
||||
"@babel/plugin-transform-json-strings": "7.25.9",
|
||||
"@babel/plugin-transform-nullish-coalescing-operator": "7.26.6",
|
||||
"@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/preset-react": "7.26.3",
|
||||
"@babel/preset-typescript": "7.24.7",
|
||||
"@babel/register": "7.24.6",
|
||||
"@babel/runtime": "7.25.0",
|
||||
"@babel/register": "7.25.9",
|
||||
"@babel/runtime": "7.26.7",
|
||||
"@changesets/changelog-github": "0.5.0",
|
||||
"@changesets/cli": "2.27.10",
|
||||
"@changesets/cli": "2.27.11",
|
||||
"@changesets/get-dependents-graph": "2.1.2",
|
||||
"@crowdin/cli": "4.4.1",
|
||||
"@dianmora/contributors": "5.0.0",
|
||||
"@emotion/react": "11.10.6",
|
||||
"@emotion/styled": "11.10.6",
|
||||
"@testing-library/dom": "10.4.0",
|
||||
"@testing-library/jest-dom": "6.4.8",
|
||||
"@testing-library/react": "16.0.0",
|
||||
"@testing-library/jest-dom": "6.6.3",
|
||||
"@testing-library/react": "16.1.0",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"@trivago/prettier-plugin-sort-imports": "4.3.0",
|
||||
"@types/body-parser": "1.19.5",
|
||||
@@ -84,18 +84,18 @@
|
||||
"@types/yeoman-test": "4.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "6.21.0",
|
||||
"@typescript-eslint/parser": "6.21.0",
|
||||
"@verdaccio/crowdin-translations": "workspace:*",
|
||||
"@verdaccio/local-scripts": "workspace:*",
|
||||
"@verdaccio/eslint-config": "workspace:*",
|
||||
"@verdaccio/types": "workspace:*",
|
||||
"@verdaccio/ui-theme": "workspace:*",
|
||||
"@vitest/coverage-v8": "2.0.5",
|
||||
"@vitest/coverage-v8": "3.0.4",
|
||||
"aria-query": "5.1.3",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||
"babel-plugin-emotion": "11.0.0",
|
||||
"concurrently": "8.2.2",
|
||||
"cross-env": "7.0.3",
|
||||
"debug": "4.3.7",
|
||||
"debug": "4.4.0",
|
||||
"detect-secrets": "1.0.6",
|
||||
"eslint": "8.57.1",
|
||||
"fs-extra": "11.2.0",
|
||||
@@ -104,24 +104,25 @@
|
||||
"in-publish": "2.0.1",
|
||||
"kleur": "4.1.5",
|
||||
"lint-staged": "11.2.6",
|
||||
"nock": "13.5.1",
|
||||
"nock": "13.5.6",
|
||||
"nodemon": "3.0.3",
|
||||
"npm-run-all2": "5.0.2",
|
||||
"prettier": "3.3.3",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"prettier": "3.4.2",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"rimraf": "5.0.10",
|
||||
"selfsigned": "2.4.1",
|
||||
"supertest": "7.0.0",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.3.3",
|
||||
"undici-types": "5.28.2",
|
||||
"update-ts-references": "3.3.0",
|
||||
"semver": "^7.6.3",
|
||||
"update-ts-references": "3.6.0",
|
||||
"verdaccio-audit": "workspace:*",
|
||||
"verdaccio-auth-memory": "workspace:*",
|
||||
"verdaccio-htpasswd": "workspace:*",
|
||||
"verdaccio-memory": "workspace:*",
|
||||
"vitest": "2.1.2"
|
||||
"vitest": "3.0.4"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "husky install",
|
||||
|
||||
@@ -1,5 +1,34 @@
|
||||
# @verdaccio/api
|
||||
|
||||
## 8.1.0-next-8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0588605]
|
||||
- Updated dependencies [ca91b9a]
|
||||
- @verdaccio/config@8.0.0-next-8.8
|
||||
- @verdaccio/auth@8.0.0-next-8.8
|
||||
- @verdaccio/middleware@8.0.0-next-8.8
|
||||
- @verdaccio/store@8.0.0-next-8.8
|
||||
- @verdaccio/core@8.0.0-next-8.8
|
||||
- @verdaccio/logger@8.0.0-next-8.8
|
||||
- @verdaccio/utils@8.1.0-next-8.8
|
||||
|
||||
## 8.1.0-next-8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 139861e: fix: crashes with path-to-regexp v0.1.12 express
|
||||
- Updated dependencies [589ea7f]
|
||||
- Updated dependencies [139861e]
|
||||
- @verdaccio/core@8.0.0-next-8.7
|
||||
- @verdaccio/utils@8.1.0-next-8.7
|
||||
- @verdaccio/middleware@8.0.0-next-8.7
|
||||
- @verdaccio/store@8.0.0-next-8.7
|
||||
- @verdaccio/auth@8.0.0-next-8.7
|
||||
- @verdaccio/config@8.0.0-next-8.7
|
||||
- @verdaccio/logger@8.0.0-next-8.7
|
||||
|
||||
## 8.1.0-next-8.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
[](https://crowdin.com/project/verdaccio)
|
||||
[](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)
|
||||
|
||||
[](https://twitter.com/verdaccio_npm)
|
||||
[](https://github.com/verdaccio/verdaccio/stargazers)
|
||||
|
||||
## Donations
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/api",
|
||||
"version": "8.1.0-next-8.6",
|
||||
"version": "8.1.0-next-8.8",
|
||||
"description": "loaders logic",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -38,27 +38,26 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/auth": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/logger": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/middleware": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/store": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/utils": "workspace:8.1.0-next-8.6",
|
||||
"abortcontroller-polyfill": "1.7.6",
|
||||
"@verdaccio/auth": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/logger": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/middleware": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/store": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/utils": "workspace:8.1.0-next-8.8",
|
||||
"abortcontroller-polyfill": "1.7.8",
|
||||
"body-parser": "1.20.3",
|
||||
"cookies": "0.9.1",
|
||||
"debug": "4.3.7",
|
||||
"debug": "4.4.0",
|
||||
"express": "4.21.2",
|
||||
"lodash": "4.17.21",
|
||||
"mime": "2.6.0",
|
||||
"semver": "7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/test-helper": "workspace:4.0.0-next-8.2",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.2",
|
||||
"@verdaccio/test-helper": "workspace:4.0.0-next-8.3",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.3",
|
||||
"mockdate": "3.0.5",
|
||||
"nock": "13.5.1",
|
||||
"supertest": "7.0.0"
|
||||
},
|
||||
"funding": {
|
||||
|
||||
@@ -5,6 +5,7 @@ import mime from 'mime';
|
||||
import { Auth } from '@verdaccio/auth';
|
||||
import { constants, errorUtils } from '@verdaccio/core';
|
||||
import { allow, media } from '@verdaccio/middleware';
|
||||
import { DIST_TAGS_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
import { Storage } from '@verdaccio/store';
|
||||
import { Logger } from '@verdaccio/types';
|
||||
|
||||
@@ -39,21 +40,21 @@ export default function (route: Router, auth: Auth, storage: Storage, logger: Lo
|
||||
|
||||
// tagging a package.
|
||||
route.put(
|
||||
'/:package/:tag',
|
||||
DIST_TAGS_API_ENDPOINTS.tagging,
|
||||
can('publish'),
|
||||
media(mime.getType('json')),
|
||||
addTagPackageVersionMiddleware
|
||||
);
|
||||
|
||||
route.put(
|
||||
'/-/package/:package/dist-tags/:tag',
|
||||
DIST_TAGS_API_ENDPOINTS.tagging_package,
|
||||
can('publish'),
|
||||
media(mime.getType('json')),
|
||||
addTagPackageVersionMiddleware
|
||||
);
|
||||
|
||||
route.delete(
|
||||
'/-/package/:package/dist-tags/:tag',
|
||||
DIST_TAGS_API_ENDPOINTS.tagging_package,
|
||||
can('publish'),
|
||||
async function (
|
||||
req: $RequestExtend,
|
||||
@@ -75,7 +76,7 @@ export default function (route: Router, auth: Auth, storage: Storage, logger: Lo
|
||||
);
|
||||
|
||||
route.get(
|
||||
'/-/package/:package/dist-tags',
|
||||
DIST_TAGS_API_ENDPOINTS.get_dist_tags,
|
||||
can('access'),
|
||||
async function (
|
||||
req: $RequestExtend,
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Router } from 'express';
|
||||
import { Auth } from '@verdaccio/auth';
|
||||
import { HEADERS, HEADER_TYPE, stringUtils } from '@verdaccio/core';
|
||||
import { allow } from '@verdaccio/middleware';
|
||||
import { PACKAGE_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
import { Storage } from '@verdaccio/store';
|
||||
import { Logger } from '@verdaccio/types';
|
||||
|
||||
@@ -17,7 +18,7 @@ export default function (route: Router, auth: Auth, storage: Storage, logger: Lo
|
||||
afterAll: (a, b) => logger.trace(a, b),
|
||||
});
|
||||
route.get(
|
||||
'/:package/:version?',
|
||||
PACKAGE_API_ENDPOINTS.get_package_by_version,
|
||||
can('access'),
|
||||
async function (
|
||||
req: $RequestExtend,
|
||||
@@ -76,7 +77,7 @@ export default function (route: Router, auth: Auth, storage: Storage, logger: Lo
|
||||
);
|
||||
|
||||
route.get(
|
||||
'/:package/-/:filename',
|
||||
PACKAGE_API_ENDPOINTS.get_package_tarball,
|
||||
can('access'),
|
||||
async function (req: $RequestExtend, res: $ResponseExtend, next): Promise<void> {
|
||||
const { package: pkgName, filename } = req.params;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { Router } from 'express';
|
||||
|
||||
import { PING_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
|
||||
import { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types/custom';
|
||||
|
||||
export default function (route: Router): void {
|
||||
route.get(
|
||||
'/-/ping',
|
||||
PING_API_ENDPOINTS.ping,
|
||||
function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
|
||||
next({});
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ import mime from 'mime';
|
||||
import { Auth } from '@verdaccio/auth';
|
||||
import { API_MESSAGE, HTTP_STATUS } from '@verdaccio/core';
|
||||
import { allow, expectJson, media } from '@verdaccio/middleware';
|
||||
// import star from './star';
|
||||
import { PUBLISH_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
import { Storage } from '@verdaccio/store';
|
||||
import { Logger } from '@verdaccio/types';
|
||||
|
||||
import { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types/custom';
|
||||
|
||||
// import star from './star';
|
||||
|
||||
const debug = buildDebug('verdaccio:api:publish');
|
||||
|
||||
/**
|
||||
@@ -120,7 +120,7 @@ export default function publish(
|
||||
afterAll: (a, b) => logger.trace(a, b),
|
||||
});
|
||||
router.put(
|
||||
'/:package',
|
||||
PUBLISH_API_ENDPOINTS.add_package,
|
||||
can('publish'),
|
||||
media(mime.getType('json')),
|
||||
expectJson,
|
||||
@@ -128,7 +128,7 @@ export default function publish(
|
||||
);
|
||||
|
||||
router.put(
|
||||
'/:package/-rev/:revision',
|
||||
PUBLISH_API_ENDPOINTS.publish_package,
|
||||
can('unpublish'),
|
||||
media(mime.getType('json')),
|
||||
expectJson,
|
||||
@@ -143,7 +143,7 @@ export default function publish(
|
||||
* - no version is specified in the unpublish call
|
||||
* - all versions are removed npm unpublish package@*
|
||||
* - there is no versions on the metadata
|
||||
|
||||
|
||||
* then the client decides to DELETE the resource
|
||||
* Example:
|
||||
* Get fresh manifest (write=true is a flag to get the latest revision)
|
||||
@@ -153,7 +153,7 @@ export default function publish(
|
||||
* npm http fetch DELETE 201 http://localhost:4873/package-name/-rev/18-d8ebe3020bd4ac9c 22ms
|
||||
*/
|
||||
router.delete(
|
||||
'/:package/-rev/:revision',
|
||||
PUBLISH_API_ENDPOINTS.publish_package,
|
||||
can('unpublish'),
|
||||
async function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
|
||||
const packageName = req.params.package;
|
||||
@@ -177,7 +177,7 @@ export default function publish(
|
||||
npm http fetch DELETE 201 http://localhost:4873/package-name/-rev/18-d8ebe3020bd4ac9c 22ms
|
||||
*/
|
||||
router.delete(
|
||||
'/:package/-/:filename/-rev/:revision',
|
||||
PUBLISH_API_ENDPOINTS.remove_tarball,
|
||||
can('unpublish'),
|
||||
can('publish'),
|
||||
async function (
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { HTTP_STATUS } from '@verdaccio/core';
|
||||
import { SEARCH_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
import { Logger } from '@verdaccio/types';
|
||||
|
||||
export default function (route, logger: Logger): void {
|
||||
// TODO: next major version, remove this
|
||||
route.get('/-/all(/since)?', function (_req, res) {
|
||||
route.get(SEARCH_API_ENDPOINTS.deprecated_search, function (_req, res) {
|
||||
logger.warn('search endpoint has been removed, please use search v1');
|
||||
res.status(HTTP_STATUS.NOT_FOUND);
|
||||
res.json({ error: 'not found, endpoint was removed' });
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Response, Router } from 'express';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { HTTP_STATUS, USERS, errorUtils } from '@verdaccio/core';
|
||||
import { STARS_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
import { Storage } from '@verdaccio/store';
|
||||
import { Version } from '@verdaccio/types';
|
||||
|
||||
@@ -9,7 +10,7 @@ import { $NextFunctionVer, $RequestExtend } from '../types/custom';
|
||||
|
||||
export default function (route: Router, storage: Storage): void {
|
||||
route.get(
|
||||
'/-/_view/starredByUser',
|
||||
STARS_API_ENDPOINTS.get_user_starred_packages,
|
||||
async (req: $RequestExtend, res: Response, next: $NextFunctionVer): Promise<void> => {
|
||||
const query: { key: string } = req.query;
|
||||
if (typeof query?.key !== 'string') {
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
errorUtils,
|
||||
validatioUtils,
|
||||
} from '@verdaccio/core';
|
||||
import { PROFILE_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
import { rateLimit } from '@verdaccio/middleware';
|
||||
import { Config } from '@verdaccio/types';
|
||||
|
||||
@@ -41,7 +42,7 @@ export default function (route: Router, auth: Auth, config: Config): void {
|
||||
}
|
||||
|
||||
route.get(
|
||||
'/-/npm/v1/user',
|
||||
PROFILE_API_ENDPOINTS.get_profile,
|
||||
rateLimit(config?.userRateLimit),
|
||||
function (req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
|
||||
if (_.isNil(req.remote_user.name) === false) {
|
||||
@@ -56,7 +57,7 @@ export default function (route: Router, auth: Auth, config: Config): void {
|
||||
);
|
||||
|
||||
route.post(
|
||||
'/-/npm/v1/user',
|
||||
PROFILE_API_ENDPOINTS.get_profile,
|
||||
rateLimit(config?.userRateLimit),
|
||||
function (req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
|
||||
if (_.isNil(req.remote_user.name)) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import _ from 'lodash';
|
||||
|
||||
import { Auth } from '@verdaccio/auth';
|
||||
import { HTTP_STATUS, searchUtils } from '@verdaccio/core';
|
||||
import { SEARCH_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
import { Storage } from '@verdaccio/store';
|
||||
import { Manifest } from '@verdaccio/types';
|
||||
import { Logger } from '@verdaccio/types';
|
||||
@@ -35,7 +36,7 @@ export default function (route, auth: Auth, storage: Storage, logger: Logger): v
|
||||
});
|
||||
}
|
||||
|
||||
route.get('/-/v1/search', async (req, res, next) => {
|
||||
route.get(SEARCH_API_ENDPOINTS.search, async (req, res, next) => {
|
||||
const { query, url } = req;
|
||||
let [size, from] = ['size', 'from'].map((k) => query[k]);
|
||||
let data;
|
||||
|
||||
@@ -5,6 +5,7 @@ import { getApiToken } from '@verdaccio/auth';
|
||||
import { Auth } from '@verdaccio/auth';
|
||||
import { HEADERS, HTTP_STATUS, SUPPORT_ERRORS, errorUtils } from '@verdaccio/core';
|
||||
import { rateLimit } from '@verdaccio/middleware';
|
||||
import { TOKEN_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
import { Storage } from '@verdaccio/store';
|
||||
import { Config, RemoteUser, Token } from '@verdaccio/types';
|
||||
import { Logger } from '@verdaccio/types';
|
||||
@@ -32,7 +33,7 @@ export default function (
|
||||
logger: Logger
|
||||
): void {
|
||||
route.get(
|
||||
'/-/npm/v1/tokens',
|
||||
TOKEN_API_ENDPOINTS.get_tokens,
|
||||
rateLimit(config?.userRateLimit),
|
||||
async function (req: $RequestExtend, res: Response, next: $NextFunctionVer) {
|
||||
const { name } = req.remote_user;
|
||||
@@ -60,7 +61,7 @@ export default function (
|
||||
);
|
||||
|
||||
route.post(
|
||||
'/-/npm/v1/tokens',
|
||||
TOKEN_API_ENDPOINTS.get_tokens,
|
||||
rateLimit(config?.userRateLimit),
|
||||
function (req: $RequestExtend, res: Response, next: $NextFunctionVer) {
|
||||
const { password, readonly, cidr_whitelist } = req.body;
|
||||
@@ -131,7 +132,7 @@ export default function (
|
||||
);
|
||||
|
||||
route.delete(
|
||||
'/-/npm/v1/tokens/token/:tokenKey',
|
||||
TOKEN_API_ENDPOINTS.delete_token,
|
||||
rateLimit(config?.userRateLimit),
|
||||
async (req: $RequestExtend, res: Response, next: $NextFunctionVer) => {
|
||||
const {
|
||||
|
||||
@@ -2,21 +2,25 @@ import buildDebug from 'debug';
|
||||
import { Response, Router } from 'express';
|
||||
|
||||
import { errorUtils } from '@verdaccio/core';
|
||||
import { USER_API_ENDPOINTS } from '@verdaccio/middleware';
|
||||
|
||||
import { $NextFunctionVer, $RequestExtend } from '../types/custom';
|
||||
|
||||
const debug = buildDebug('verdaccio:api:user');
|
||||
|
||||
export default function (route: Router): void {
|
||||
route.get('/-/whoami', (req: $RequestExtend, _res: Response, next: $NextFunctionVer): any => {
|
||||
// remote_user is set by the auth middleware
|
||||
const username = req?.remote_user?.name;
|
||||
if (!username) {
|
||||
debug('whoami: user not found');
|
||||
return next(errorUtils.getUnauthorized('Unauthorized'));
|
||||
}
|
||||
route.get(
|
||||
USER_API_ENDPOINTS.whoami,
|
||||
(req: $RequestExtend, _res: Response, next: $NextFunctionVer): any => {
|
||||
// remote_user is set by the auth middleware
|
||||
const username = req?.remote_user?.name;
|
||||
if (!username) {
|
||||
debug('whoami: user not found');
|
||||
return next(errorUtils.getUnauthorized('Unauthorized'));
|
||||
}
|
||||
|
||||
debug('whoami: response %o', username);
|
||||
return next({ username: username });
|
||||
});
|
||||
debug('whoami: response %o', username);
|
||||
return next({ username: username });
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
# @verdaccio/auth
|
||||
|
||||
## 8.0.0-next-8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0588605]
|
||||
- Updated dependencies [ca91b9a]
|
||||
- @verdaccio/config@8.0.0-next-8.8
|
||||
- @verdaccio/loaders@8.0.0-next-8.4
|
||||
- verdaccio-htpasswd@13.0.0-next-8.8
|
||||
- @verdaccio/signature@8.0.0-next-8.1
|
||||
- @verdaccio/core@8.0.0-next-8.8
|
||||
- @verdaccio/utils@8.1.0-next-8.8
|
||||
|
||||
## 8.0.0-next-8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 139861e: fix: crashes with path-to-regexp v0.1.12 express
|
||||
- Updated dependencies [589ea7f]
|
||||
- @verdaccio/core@8.0.0-next-8.7
|
||||
- @verdaccio/utils@8.1.0-next-8.7
|
||||
- @verdaccio/config@8.0.0-next-8.7
|
||||
- @verdaccio/loaders@8.0.0-next-8.4
|
||||
- verdaccio-htpasswd@13.0.0-next-8.7
|
||||
- @verdaccio/signature@8.0.0-next-8.1
|
||||
|
||||
## 8.0.0-next-8.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
[](https://crowdin.com/project/verdaccio)
|
||||
[](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)
|
||||
|
||||
[](https://twitter.com/verdaccio_npm)
|
||||
[](https://github.com/verdaccio/verdaccio/stargazers)
|
||||
|
||||
## Donations
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/auth",
|
||||
"version": "8.0.0-next-8.6",
|
||||
"version": "8.0.0-next-8.8",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
@@ -38,20 +38,20 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/loaders": "workspace:8.0.0-next-8.4",
|
||||
"@verdaccio/signature": "workspace:8.0.0-next-8.1",
|
||||
"@verdaccio/utils": "workspace:8.1.0-next-8.6",
|
||||
"debug": "4.3.7",
|
||||
"@verdaccio/utils": "workspace:8.1.0-next-8.8",
|
||||
"debug": "4.4.0",
|
||||
"lodash": "4.17.21",
|
||||
"verdaccio-htpasswd": "workspace:13.0.0-next-8.6"
|
||||
"verdaccio-htpasswd": "workspace:13.0.0-next-8.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/middleware": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.2",
|
||||
"@verdaccio/logger": "workspace:8.0.0-next-8.6",
|
||||
"express": "4.21.1",
|
||||
"@verdaccio/middleware": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.3",
|
||||
"@verdaccio/logger": "workspace:8.0.0-next-8.8",
|
||||
"express": "4.21.2",
|
||||
"supertest": "7.0.0"
|
||||
},
|
||||
"funding": {
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# @verdaccio/cli
|
||||
|
||||
## 8.0.0-next-8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0588605]
|
||||
- Updated dependencies [ca91b9a]
|
||||
- @verdaccio/config@8.0.0-next-8.8
|
||||
- @verdaccio/node-api@8.0.0-next-8.8
|
||||
- @verdaccio/core@8.0.0-next-8.8
|
||||
- @verdaccio/logger@8.0.0-next-8.8
|
||||
|
||||
## 8.0.0-next-8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [589ea7f]
|
||||
- @verdaccio/core@8.0.0-next-8.7
|
||||
- @verdaccio/config@8.0.0-next-8.7
|
||||
- @verdaccio/node-api@8.0.0-next-8.7
|
||||
- @verdaccio/logger@8.0.0-next-8.7
|
||||
|
||||
## 8.0.0-next-8.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
[](https://crowdin.com/project/verdaccio)
|
||||
[](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)
|
||||
|
||||
[](https://twitter.com/verdaccio_npm)
|
||||
[](https://github.com/verdaccio/verdaccio/stargazers)
|
||||
|
||||
## Donations
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/cli",
|
||||
"version": "8.0.0-next-8.6",
|
||||
"version": "8.0.0-next-8.8",
|
||||
"author": {
|
||||
"name": "Juan Picado",
|
||||
"email": "juanpicado19@gmail.com"
|
||||
@@ -43,12 +43,12 @@
|
||||
"start": "ts-node src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/logger": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/node-api": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/config": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/logger": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/node-api": "workspace:8.0.0-next-8.8",
|
||||
"clipanion": "4.0.0-rc.4",
|
||||
"envinfo": "7.13.0",
|
||||
"envinfo": "7.14.0",
|
||||
"kleur": "4.1.5",
|
||||
"semver": "7.6.3"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# @verdaccio/config
|
||||
|
||||
## 8.0.0-next-8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0588605: chore: `keep_readmes` docs
|
||||
- ca91b9a: fix: config builder `addLogger`
|
||||
- @verdaccio/core@8.0.0-next-8.8
|
||||
- @verdaccio/utils@8.1.0-next-8.8
|
||||
|
||||
## 8.0.0-next-8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [589ea7f]
|
||||
- @verdaccio/core@8.0.0-next-8.7
|
||||
- @verdaccio/utils@8.1.0-next-8.7
|
||||
|
||||
## 8.0.0-next-8.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/config",
|
||||
"version": "8.0.0-next-8.6",
|
||||
"version": "8.0.0-next-8.8",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -38,9 +38,9 @@
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/utils": "workspace:8.1.0-next-8.6",
|
||||
"debug": "4.3.7",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/utils": "workspace:8.1.0-next-8.8",
|
||||
"debug": "4.4.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"lodash": "4.17.21",
|
||||
"minimatch": "7.4.6"
|
||||
|
||||
@@ -3,7 +3,7 @@ import { merge } from 'lodash';
|
||||
import {
|
||||
AuthConf,
|
||||
ConfigYaml,
|
||||
LoggerConfItem,
|
||||
LoggerConfigItem,
|
||||
PackageAccessYaml,
|
||||
Security,
|
||||
UpLinkConf,
|
||||
@@ -47,7 +47,7 @@ export default class ConfigBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public addLogger(log: LoggerConfItem) {
|
||||
public addLogger(log: LoggerConfigItem) {
|
||||
this.config.log = log;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,5 @@ This directory host the default configuration file, but you can find more here:
|
||||
|
||||
- [https://verdaccio.org/docs/en/installation](https://verdaccio.org/docs/en/installation)
|
||||
- [Chat with us](http://chat.verdaccio.org) <- You need a Discord account
|
||||
- [Follow us on Twitter](https://twitter.com/verdaccio_npm)
|
||||
|
||||
Enjoy Verdaccio !
|
||||
|
||||
@@ -121,6 +121,7 @@ server:
|
||||
# publish:
|
||||
# allow_offline: false
|
||||
# check_owners: false
|
||||
# keep_readmes: 'latest' | 'tagged' | 'all'
|
||||
|
||||
# https://verdaccio.org/docs/configuration#url-prefix
|
||||
# url_prefix: /verdaccio/
|
||||
@@ -143,11 +144,11 @@ server:
|
||||
# expiresIn: 29d
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
# web:
|
||||
# sign:
|
||||
# expiresIn: 1h # 1 hour by default
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
# web:
|
||||
# sign:
|
||||
# expiresIn: 1h # 1 hour by default
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
|
||||
# https://verdaccio.org/docs/configuration#user-rate-limit
|
||||
# userRateLimit:
|
||||
|
||||
@@ -127,6 +127,7 @@ server:
|
||||
# publish:
|
||||
# allow_offline: false
|
||||
# check_owners: false
|
||||
# keep_readmes: 'latest' | 'tagged' | 'all'
|
||||
|
||||
# https://verdaccio.org/docs/configuration#url-prefix
|
||||
# url_prefix: /verdaccio/
|
||||
@@ -149,11 +150,11 @@ server:
|
||||
# expiresIn: 29d
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
# web:
|
||||
# sign:
|
||||
# expiresIn: 1h # 1 hour by default
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
# web:
|
||||
# sign:
|
||||
# expiresIn: 1h # 1 hour by default
|
||||
# verify:
|
||||
# someProp: [value]
|
||||
|
||||
# https://verdaccio.org/docs/configuration#user-rate-limit
|
||||
# userRateLimit:
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
[](https://crowdin.com/project/verdaccio)
|
||||
[](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)
|
||||
|
||||
[](https://twitter.com/verdaccio_npm)
|
||||
[](https://github.com/verdaccio/verdaccio/stargazers)
|
||||
|
||||
## Donations
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @verdaccio/core
|
||||
|
||||
## 8.0.0-next-8.8
|
||||
|
||||
## 8.0.0-next-8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 589ea7f: chore: move tarball utils to core
|
||||
|
||||
## 8.0.0-next-8.6
|
||||
|
||||
## 8.0.0-next-8.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/core",
|
||||
"version": "8.0.0-next-8.6",
|
||||
"version": "8.0.0-next-8.8",
|
||||
"description": "core utilities",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -41,7 +41,7 @@
|
||||
"semver": "7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.2",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.3",
|
||||
"lodash": "4.17.21",
|
||||
"typedoc": "0.23.25",
|
||||
"typedoc-plugin-missing-exports": "latest"
|
||||
|
||||
@@ -6,6 +6,7 @@ import * as pluginUtils from './plugin-utils';
|
||||
import * as searchUtils from './search-utils';
|
||||
import * as streamUtils from './stream-utils';
|
||||
import * as stringUtils from './string-utils';
|
||||
import * as tarballUtils from './tarball-utils';
|
||||
import * as validatioUtils from './validation-utils';
|
||||
import * as warningUtils from './warning-utils';
|
||||
|
||||
@@ -41,4 +42,5 @@ export {
|
||||
constants,
|
||||
pluginUtils,
|
||||
warningUtils,
|
||||
tarballUtils,
|
||||
};
|
||||
|
||||
@@ -1,22 +1,9 @@
|
||||
import semver from 'semver';
|
||||
import { URL } from 'url';
|
||||
|
||||
import { Manifest } from '@verdaccio/types';
|
||||
|
||||
import { DIST_TAGS } from './constants';
|
||||
|
||||
/**
|
||||
* Extract the tarball name from a registry dist url
|
||||
* 'https://registry.npmjs.org/test/-/test-0.0.2.tgz'
|
||||
* @param tarball tarball url
|
||||
* @returns tarball filename
|
||||
*/
|
||||
export function extractTarballName(tarball: string) {
|
||||
const urlObject: any = new URL(tarball);
|
||||
const filename = urlObject.pathname.replace(/^.*\//, '');
|
||||
return filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function filters out bad semver versions and sorts the array.
|
||||
* @return {Array} sorted Array
|
||||
|
||||
43
packages/core/core/src/tarball-utils.ts
Normal file
43
packages/core/core/src/tarball-utils.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { URL } from 'url';
|
||||
|
||||
/**
|
||||
* Return package version from tarball name
|
||||
*
|
||||
* test-1.2.4.tgz -> 1.2.4
|
||||
* @param {String} fileName
|
||||
* @returns {String}
|
||||
*/
|
||||
export function getVersionFromTarball(fileName: string): string | void {
|
||||
const groups = fileName.replace(/\.tgz$/, '').match(/^[^/]+-(\d+\.\d+\.\d+.*)/);
|
||||
|
||||
return groups !== null ? groups[1] : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the tarball name from a registry dist url
|
||||
*
|
||||
* https://registry.npmjs.org/test/-/test-0.0.2.tgz -> test-0.0.2.tgz
|
||||
* @param tarball tarball url
|
||||
* @returns tarball filename
|
||||
*/
|
||||
export function extractTarballFromUrl(url: string): string {
|
||||
const urlObject = new URL(url);
|
||||
return urlObject.pathname.replace(/^.*\//, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the tarball filename from paackage name and version
|
||||
*
|
||||
* test, 1.2.4 -> test-1.2.4.tgz
|
||||
* @scope/name, 1.2.4 -> name-1.2.4.tgz
|
||||
* @param name package name
|
||||
* @param version package version
|
||||
* @returns tarball filename
|
||||
*/
|
||||
export function composeTarballFromPackage(name: string, version: string): string {
|
||||
if (name.includes('/')) {
|
||||
return `${name.split('/')[1]}-${version}.tgz`;
|
||||
} else {
|
||||
return `${name}-${version}.tgz`;
|
||||
}
|
||||
}
|
||||
@@ -3,22 +3,6 @@ import { describe, expect, test } from 'vitest';
|
||||
import { DIST_TAGS, pkgUtils } from '../src';
|
||||
|
||||
describe('pkg-utils', () => {
|
||||
test('extractTarballName', () => {
|
||||
expect(pkgUtils.extractTarballName('https://registry.npmjs.org/test/-/test-0.0.2.tgz')).toBe(
|
||||
'test-0.0.2.tgz'
|
||||
);
|
||||
});
|
||||
|
||||
test('extractTarballName with no tarball should not fails', () => {
|
||||
expect(pkgUtils.extractTarballName('https://registry.npmjs.org/')).toBe('');
|
||||
});
|
||||
|
||||
test('extractTarballName fails', () => {
|
||||
expect(() =>
|
||||
pkgUtils.extractTarballName('xxxxregistry.npmjs.org/test/-/test-0.0.2.tgz')
|
||||
).toThrow();
|
||||
});
|
||||
|
||||
test('getLatest fails if no versions', () => {
|
||||
expect(() =>
|
||||
// @ts-expect-error
|
||||
|
||||
81
packages/core/core/test/tarball-utils.spec.ts
Normal file
81
packages/core/core/test/tarball-utils.spec.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import {
|
||||
composeTarballFromPackage,
|
||||
extractTarballFromUrl,
|
||||
getVersionFromTarball,
|
||||
} from '../src/tarball-utils';
|
||||
|
||||
describe('Utilities', () => {
|
||||
describe('getVersionFromTarball', () => {
|
||||
test('should get the right version', () => {
|
||||
const simpleName = 'test-name-4.2.12.tgz';
|
||||
const complexName = 'test-5.6.4-beta.2.tgz';
|
||||
const otherComplexName = 'test-3.5.0-6.tgz';
|
||||
expect(getVersionFromTarball(simpleName)).toEqual('4.2.12');
|
||||
expect(getVersionFromTarball(complexName)).toEqual('5.6.4-beta.2');
|
||||
expect(getVersionFromTarball(otherComplexName)).toEqual('3.5.0-6');
|
||||
});
|
||||
|
||||
test('should fail at incorrect tarball name', () => {
|
||||
expect(getVersionFromTarball('incorrectName')).toBeUndefined();
|
||||
expect(getVersionFromTarball('test-1.2.tgz')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('extractTarballFromUrl', () => {
|
||||
const metadata: any = {
|
||||
name: 'npm_test',
|
||||
versions: {
|
||||
'1.0.0': {
|
||||
dist: {
|
||||
tarball: 'http://registry.org/npm_test/-/npm_test-1.0.0.tgz',
|
||||
},
|
||||
},
|
||||
'1.0.1': {
|
||||
dist: {
|
||||
tarball: 'https://localhost:4873/npm_test/-/npm_test-1.0.1.tgz',
|
||||
},
|
||||
},
|
||||
'1.0.2': {
|
||||
dist: {
|
||||
tarball: 'https://localhost/npm_test-1.0.2.tgz',
|
||||
},
|
||||
},
|
||||
'1.0.3': {
|
||||
dist: {
|
||||
tarball: 'http://registry.org/@org/npm_test/-/npm_test-1.0.3.tgz',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test('should return only name of tarball', () => {
|
||||
expect(extractTarballFromUrl(metadata.versions['1.0.0'].dist.tarball)).toEqual(
|
||||
'npm_test-1.0.0.tgz'
|
||||
);
|
||||
expect(extractTarballFromUrl(metadata.versions['1.0.1'].dist.tarball)).toEqual(
|
||||
'npm_test-1.0.1.tgz'
|
||||
);
|
||||
expect(extractTarballFromUrl(metadata.versions['1.0.2'].dist.tarball)).toEqual(
|
||||
'npm_test-1.0.2.tgz'
|
||||
);
|
||||
expect(extractTarballFromUrl(metadata.versions['1.0.3'].dist.tarball)).toEqual(
|
||||
'npm_test-1.0.3.tgz'
|
||||
);
|
||||
});
|
||||
|
||||
test('without tarball should not fails', () => {
|
||||
expect(extractTarballFromUrl('https://registry.npmjs.org/')).toBe('');
|
||||
});
|
||||
|
||||
test('fails with incomplete URL', () => {
|
||||
expect(() => extractTarballFromUrl('xxxxregistry.npmjs.org/test/-/test-0.0.2.tgz')).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
test('composeTarballFromPackage - should return filename of tarball', () => {
|
||||
expect(composeTarballFromPackage('npm_test', '1.0.0')).toEqual('npm_test-1.0.0.tgz');
|
||||
expect(composeTarballFromPackage('@mbtools/npm_test', '1.0.1')).toEqual('npm_test-1.0.1.tgz');
|
||||
});
|
||||
@@ -17,5 +17,4 @@ This an utility to lock and unlock files
|
||||

|
||||
[](https://crowdin.com/project/verdaccio)
|
||||
|
||||
[](https://twitter.com/verdaccio_npm)
|
||||
[](https://github.com/verdaccio/verdaccio/stargazers)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"lockfile": "1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.2"
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.3"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# Change Log
|
||||
|
||||
## 13.0.0-next-8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@8.0.0-next-8.8
|
||||
- @verdaccio/url@13.0.0-next-8.8
|
||||
- @verdaccio/utils@8.1.0-next-8.8
|
||||
|
||||
## 13.0.0-next-8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 589ea7f: chore: move tarball utils to core
|
||||
- Updated dependencies [589ea7f]
|
||||
- @verdaccio/core@8.0.0-next-8.7
|
||||
- @verdaccio/utils@8.1.0-next-8.7
|
||||
- @verdaccio/url@13.0.0-next-8.7
|
||||
|
||||
## 13.0.0-next-8.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/tarball",
|
||||
"version": "13.0.0-next-8.6",
|
||||
"version": "13.0.0-next-8.8",
|
||||
"description": "tarball utilities resolver",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -33,16 +33,16 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.6",
|
||||
"@verdaccio/url": "workspace:13.0.0-next-8.6",
|
||||
"@verdaccio/utils": "workspace:8.1.0-next-8.6",
|
||||
"debug": "4.3.7",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.8",
|
||||
"@verdaccio/url": "workspace:13.0.0-next-8.8",
|
||||
"@verdaccio/utils": "workspace:8.1.0-next-8.8",
|
||||
"debug": "4.4.0",
|
||||
"gunzip-maybe": "^1.4.2",
|
||||
"lodash": "4.17.21",
|
||||
"tar-stream": "^3.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.2",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.3",
|
||||
"node-mocks-http": "1.14.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
import buildDebug from 'debug';
|
||||
import URL from 'url';
|
||||
|
||||
import { tarballUtils } from '@verdaccio/core';
|
||||
import { RequestOptions } from '@verdaccio/url';
|
||||
import { getPublicUrl } from '@verdaccio/url';
|
||||
|
||||
const debug = buildDebug('verdaccio:core:url');
|
||||
const debug = buildDebug('verdaccio:core:tarball');
|
||||
|
||||
export function extractTarballFromUrl(url: string): string {
|
||||
// @ts-ignore
|
||||
return URL.parse(url).pathname.replace(/^.*\//, '');
|
||||
}
|
||||
/**
|
||||
* Filter a tarball url.
|
||||
* @param {*} uri
|
||||
@@ -26,7 +22,7 @@ export function getLocalRegistryTarballUri(
|
||||
if (!currentHost) {
|
||||
return uri;
|
||||
}
|
||||
const tarballName = extractTarballFromUrl(uri);
|
||||
const tarballName = tarballUtils.extractTarballFromUrl(uri);
|
||||
debug('tarball name %o', tarballName);
|
||||
// header only set with proxy that setup with HTTPS
|
||||
const domainRegistry = getPublicUrl(urlPrefix || '', requestOptions);
|
||||
|
||||
@@ -4,7 +4,7 @@ export {
|
||||
convertDistRemoteToLocalTarballUrls,
|
||||
convertDistVersionToLocalTarballsUrl,
|
||||
} from './convertDistRemoteToLocalTarballUrls';
|
||||
export { extractTarballFromUrl, getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';
|
||||
export { getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';
|
||||
export { getTarballDetails, TarballDetails } from './getTarballDetails';
|
||||
|
||||
export { RequestOptions };
|
||||
|
||||
@@ -1,46 +1,52 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { extractTarballFromUrl } from '../src';
|
||||
import { getLocalRegistryTarballUri } from '../src/getLocalRegistryTarballUri';
|
||||
|
||||
describe('extractTarballFromUrl', () => {
|
||||
const metadata: any = {
|
||||
name: 'npm_test',
|
||||
versions: {
|
||||
'1.0.0': {
|
||||
dist: {
|
||||
tarball: 'http://registry.org/npm_test/-/npm_test-1.0.0.tgz',
|
||||
},
|
||||
describe('getLocalRegistryTarballUri', () => {
|
||||
test('should return the right tarball uri', () => {
|
||||
const uri = 'http://registry.org/npm_test/-/npm_test-1.0.0.tgz';
|
||||
const pkgName = 'npm_test';
|
||||
const requestOptions = {
|
||||
host: 'localhost:4873',
|
||||
protocol: 'http',
|
||||
headers: {
|
||||
host: 'localhost:4873',
|
||||
},
|
||||
'1.0.1': {
|
||||
dist: {
|
||||
tarball: 'npm_test-1.0.1.tgz',
|
||||
},
|
||||
},
|
||||
'1.0.2': {
|
||||
dist: {
|
||||
tarball: 'https://localhost/npm_test-1.0.2.tgz',
|
||||
},
|
||||
},
|
||||
'1.0.3': {
|
||||
dist: {
|
||||
tarball: 'http://registry.org/@org/npm_test/-/npm_test-1.0.3.tgz',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
const urlPrefix = '/';
|
||||
expect(getLocalRegistryTarballUri(uri, pkgName, requestOptions, urlPrefix)).toEqual(
|
||||
'http://localhost:4873/npm_test/-/npm_test-1.0.0.tgz'
|
||||
);
|
||||
});
|
||||
|
||||
test('should return only name of tarball', () => {
|
||||
expect(extractTarballFromUrl(metadata.versions['1.0.0'].dist.tarball)).toEqual(
|
||||
'npm_test-1.0.0.tgz'
|
||||
test('should return the right tarball uri with prefix', () => {
|
||||
const uri = 'http://registry.org/npm_test/-/npm_test-1.0.0.tgz';
|
||||
const pkgName = 'npm_test';
|
||||
const requestOptions = {
|
||||
host: 'localhost:4873',
|
||||
protocol: 'http',
|
||||
headers: {
|
||||
host: 'localhost:4873',
|
||||
},
|
||||
};
|
||||
const urlPrefix = '/local/';
|
||||
expect(getLocalRegistryTarballUri(uri, pkgName, requestOptions, urlPrefix)).toEqual(
|
||||
'http://localhost:4873/local/npm_test/-/npm_test-1.0.0.tgz'
|
||||
);
|
||||
expect(extractTarballFromUrl(metadata.versions['1.0.1'].dist.tarball)).toEqual(
|
||||
'npm_test-1.0.1.tgz'
|
||||
);
|
||||
expect(extractTarballFromUrl(metadata.versions['1.0.2'].dist.tarball)).toEqual(
|
||||
'npm_test-1.0.2.tgz'
|
||||
);
|
||||
expect(extractTarballFromUrl(metadata.versions['1.0.3'].dist.tarball)).toEqual(
|
||||
'npm_test-1.0.3.tgz'
|
||||
});
|
||||
|
||||
test('should return the right tarball uri without prefix', () => {
|
||||
const uri = 'http://registry.org/npm_test/-/npm_test-1.0.0.tgz';
|
||||
const pkgName = 'npm_test';
|
||||
const requestOptions = {
|
||||
host: 'localhost:4873',
|
||||
protocol: 'http',
|
||||
headers: {
|
||||
host: 'localhost:4873',
|
||||
},
|
||||
};
|
||||
expect(getLocalRegistryTarballUri(uri, pkgName, requestOptions, undefined)).toEqual(
|
||||
'http://localhost:4873/npm_test/-/npm_test-1.0.0.tgz'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Change Log
|
||||
|
||||
## 13.0.0-next-8.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0588605: chore: `keep_readmes` docs
|
||||
- ca91b9a: fix: config builder `addLogger`
|
||||
|
||||
## 13.0.0-next-8.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/types",
|
||||
"version": "13.0.0-next-8.2",
|
||||
"version": "13.0.0-next-8.3",
|
||||
"description": "verdaccio types definitions",
|
||||
"keywords": [
|
||||
"private",
|
||||
|
||||
@@ -40,12 +40,6 @@ export interface PackageAccessYaml {
|
||||
unpublish?: string;
|
||||
}
|
||||
|
||||
export interface LoggerConfItem {
|
||||
type: LoggerType;
|
||||
format: LoggerFormat;
|
||||
level: LoggerLevel;
|
||||
}
|
||||
|
||||
export interface Headers {
|
||||
[key: string]: string;
|
||||
}
|
||||
@@ -202,11 +196,11 @@ export interface Security {
|
||||
api: APITokenOptions;
|
||||
}
|
||||
|
||||
export type ReadmeOptions = 'latest' | 'tagged' | 'all' | undefined;
|
||||
export type ReadmeOptions = 'latest' | 'tagged' | 'all';
|
||||
|
||||
export interface PublishOptions {
|
||||
allow_offline: boolean;
|
||||
keep_readmes: ReadmeOptions;
|
||||
keep_readmes?: ReadmeOptions;
|
||||
check_owners: boolean;
|
||||
}
|
||||
|
||||
@@ -262,9 +256,9 @@ export interface ConfigYaml {
|
||||
storage?: string | void;
|
||||
packages: PackageList;
|
||||
uplinks: UpLinksConfList;
|
||||
log?: LoggerConfItem;
|
||||
log?: LoggerConfigItem;
|
||||
// @deprecated deprecation path from 5.x
|
||||
logs?: LoggerConfItem;
|
||||
logs?: LoggerConfigItem;
|
||||
web?: WebConf;
|
||||
auth?: AuthConf;
|
||||
security: Security;
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# Change Log
|
||||
|
||||
## 13.0.0-next-8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@8.0.0-next-8.8
|
||||
|
||||
## 13.0.0-next-8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [589ea7f]
|
||||
- @verdaccio/core@8.0.0-next-8.7
|
||||
|
||||
## 13.0.0-next-8.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/url",
|
||||
"version": "13.0.0-next-8.6",
|
||||
"version": "13.0.0-next-8.8",
|
||||
"description": "url utilities resolver",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -33,13 +33,13 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.6",
|
||||
"debug": "4.3.7",
|
||||
"@verdaccio/core": "workspace:8.0.0-next-8.8",
|
||||
"debug": "4.4.0",
|
||||
"lodash": "4.17.21",
|
||||
"validator": "13.12.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.2",
|
||||
"@verdaccio/types": "workspace:13.0.0-next-8.3",
|
||||
"node-mocks-http": "1.14.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @verdaccio/hooks
|
||||
|
||||
## 8.0.0-next-8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@8.0.0-next-8.8
|
||||
- @verdaccio/logger@8.0.0-next-8.8
|
||||
|
||||
## 8.0.0-next-8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [589ea7f]
|
||||
- @verdaccio/core@8.0.0-next-8.7
|
||||
- @verdaccio/logger@8.0.0-next-8.7
|
||||
|
||||
## 8.0.0-next-8.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user