Compare commits
44 Commits
@verdaccio
...
@verdaccio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14032d160b | ||
|
|
b6d565209f | ||
|
|
4b4a37c07b | ||
|
|
24bec8ded0 | ||
|
|
b0946b2a3b | ||
|
|
3293c9a281 | ||
|
|
6a83040351 | ||
|
|
253cc1348f | ||
|
|
1367f02897 | ||
|
|
dc8be6df8b | ||
|
|
6cf165b405 | ||
|
|
da50542de1 | ||
|
|
1bae121dc2 | ||
|
|
4ac3aead4f | ||
|
|
86283342f9 | ||
|
|
40c004c234 | ||
|
|
e8b016aca5 | ||
|
|
42f226e6b3 | ||
|
|
2520a74ac3 | ||
|
|
dbade09407 | ||
|
|
4dc62a8365 | ||
|
|
eb9bbb4313 | ||
|
|
d411c20570 | ||
|
|
86a99684a3 | ||
|
|
2bf41a480e | ||
|
|
824b43fb43 | ||
|
|
c1385d7655 | ||
|
|
f967a69ad3 | ||
|
|
d5d96f0868 | ||
|
|
386f19753f | ||
|
|
a0e4fc9fa0 | ||
|
|
c9e7c141e8 | ||
|
|
17cf072329 | ||
|
|
1456bdd4a7 | ||
|
|
ffb6de3777 | ||
|
|
e32e737018 | ||
|
|
a0b65a82d0 | ||
|
|
717fe79fe0 | ||
|
|
1ae8f23110 | ||
|
|
3d9847736a | ||
|
|
31a927a236 | ||
|
|
af3f7c4797 | ||
|
|
542f9d3760 | ||
|
|
c20adc8ae5 |
6
.changeset/itchy-mangos-wink.md
Normal file
6
.changeset/itchy-mangos-wink.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/middleware': patch
|
||||
'@verdaccio/url': patch
|
||||
---
|
||||
|
||||
Improved TS types for renderHTML() and related functions (by @tobbe in #4605)
|
||||
5
.changeset/long-moles-attend.md
Normal file
5
.changeset/long-moles-attend.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/search-indexer': patch
|
||||
---
|
||||
|
||||
fix: remove node engine restriction
|
||||
5
.changeset/pink-balloons-leave.md
Normal file
5
.changeset/pink-balloons-leave.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/local-storage': patch
|
||||
---
|
||||
|
||||
chore: reduce log to info if database is not found
|
||||
@@ -66,12 +66,17 @@
|
||||
"eight-squids-judge",
|
||||
"eighty-lobsters-study",
|
||||
"good-cups-train",
|
||||
"itchy-mangos-wink",
|
||||
"long-jars-collect",
|
||||
"long-moles-attend",
|
||||
"old-turkeys-heal",
|
||||
"olive-bananas-wink",
|
||||
"perfect-chairs-act",
|
||||
"pink-apples-nail",
|
||||
"pink-balloons-leave",
|
||||
"quick-buses-scream",
|
||||
"real-socks-vanish",
|
||||
"sharp-wolves-carry",
|
||||
"shiny-worms-retire",
|
||||
"shy-carrots-compare",
|
||||
"shy-garlics-cry",
|
||||
@@ -80,7 +85,10 @@
|
||||
"spicy-birds-flow",
|
||||
"strange-points-repair",
|
||||
"thirty-toes-swim",
|
||||
"unlucky-cycles-sparkle",
|
||||
"weak-fans-explain",
|
||||
"wicked-kiwis-check",
|
||||
"wicked-worms-wash",
|
||||
"wild-otters-talk",
|
||||
"young-donuts-own"
|
||||
]
|
||||
|
||||
5
.changeset/quick-buses-scream.md
Normal file
5
.changeset/quick-buses-scream.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/store': patch
|
||||
---
|
||||
|
||||
fix: avoid warning "time for version x already exists"
|
||||
5
.changeset/sharp-wolves-carry.md
Normal file
5
.changeset/sharp-wolves-carry.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/signature': minor
|
||||
---
|
||||
|
||||
support for createCipher backward compatible
|
||||
5
.changeset/unlucky-cycles-sparkle.md
Normal file
5
.changeset/unlucky-cycles-sparkle.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/local-storage': patch
|
||||
---
|
||||
|
||||
fix: error when writing tarball (missing folder)
|
||||
5
.changeset/wicked-kiwis-check.md
Normal file
5
.changeset/wicked-kiwis-check.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/auth': patch
|
||||
---
|
||||
|
||||
fix: adduser error message grammar (@tobbe in #4586)
|
||||
6
.changeset/wicked-worms-wash.md
Normal file
6
.changeset/wicked-worms-wash.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/store': patch
|
||||
'@verdaccio/tarball': patch
|
||||
---
|
||||
|
||||
feat: add tarball details for published packages
|
||||
2
.github/workflows/changesets.yml
vendored
2
.github/workflows/changesets.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- name: checkout code repository
|
||||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
24
.github/workflows/ci-windows.yml
vendored
24
.github/workflows/ci-windows.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
env:
|
||||
NODE_ENV: production
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
@@ -29,14 +29,10 @@ jobs:
|
||||
run: |
|
||||
mkdir ~/.pnpm-store
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: set store
|
||||
run: |
|
||||
mkdir ~/.pnpm-store
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: Install
|
||||
run: pnpm install --registry http://localhost:4873
|
||||
- name: Cache .pnpm-store
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -47,14 +43,14 @@ jobs:
|
||||
name: Lint
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@latest-8 -g
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -71,14 +67,14 @@ jobs:
|
||||
name: Format
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@latest-8 -g
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -100,14 +96,14 @@ jobs:
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@latest-8 -g
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -126,13 +122,13 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
name: UI Test E2E
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@latest-8 -g
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
env:
|
||||
NODE_ENV: production
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
- name: Install
|
||||
run: pnpm install --registry http://localhost:4873
|
||||
- name: Cache .pnpm-store
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
name: Lint
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
run: |
|
||||
corepack enable
|
||||
corepack install
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
name: Format
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
run: |
|
||||
corepack enable
|
||||
corepack install
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -112,7 +112,7 @@ jobs:
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -138,9 +138,9 @@ jobs:
|
||||
needs: [test]
|
||||
runs-on: ubuntu-latest
|
||||
name: synchronize translations
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio') || github.event_name == 'workflow_dispatch'
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
@@ -148,7 +148,7 @@ jobs:
|
||||
run: |
|
||||
corepack enable
|
||||
corepack install
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@3ab4101902695724f9365a384f86c1074d94e18c # v2
|
||||
uses: github/codeql-action/init@c7f9125735019aa87cfc361530512d50ea439c71 # v2
|
||||
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@3ab4101902695724f9365a384f86c1074d94e18c # v2
|
||||
uses: github/codeql-action/autobuild@c7f9125735019aa87cfc361530512d50ea439c71 # v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -56,4 +56,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@3ab4101902695724f9365a384f86c1074d94e18c # v2
|
||||
uses: github/codeql-action/analyze@c7f9125735019aa87cfc361530512d50ea439c71 # v2
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
|
||||
- name: Start containers
|
||||
run: docker-compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" up -d --build
|
||||
|
||||
2
.github/workflows/docker-proxy-nginx-e2e.yml
vendored
2
.github/workflows/docker-proxy-nginx-e2e.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
|
||||
- name: Start containers
|
||||
run: docker-compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" up -d --build
|
||||
|
||||
3
.github/workflows/docker-publish.yml
vendored
3
.github/workflows/docker-publish.yml
vendored
@@ -22,8 +22,9 @@ permissions:
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # tag=v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
|
||||
28
.github/workflows/e2e-ci.yml
vendored
28
.github/workflows/e2e-ci.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
env:
|
||||
NODE_ENV: production
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
- name: Install
|
||||
run: pnpm install --reporter=silence --ignore-scripts --registry http://localhost:4873
|
||||
- name: Cache .pnpm-store
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
needs: [prepare]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: Cache packages
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
id: cache-packages
|
||||
with:
|
||||
path: ./packages/
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: Install
|
||||
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ./packages/
|
||||
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
@@ -141,7 +141,7 @@ jobs:
|
||||
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
@@ -149,7 +149,7 @@ jobs:
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
@@ -158,7 +158,7 @@ jobs:
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: Install
|
||||
run: pnpm install --loglevel debug --ignore-scripts --registry http://localhost:4873
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ./packages/
|
||||
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
@@ -186,7 +186,7 @@ jobs:
|
||||
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
@@ -194,7 +194,7 @@ jobs:
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
@@ -203,7 +203,7 @@ jobs:
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: Install
|
||||
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
|
||||
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ./packages/
|
||||
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
|
||||
|
||||
4
.github/workflows/e2e-ui.yml
vendored
4
.github/workflows/e2e-ui.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
env:
|
||||
NODE_ENV: production
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
run: pnpm build
|
||||
- name: Test UI
|
||||
run: pnpm test:e2e:ui
|
||||
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
|
||||
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v3
|
||||
with:
|
||||
name: videos
|
||||
path: /home/runner/work/verdaccio/verdaccio/e2e/ui/cypress/videos
|
||||
|
||||
5
.github/workflows/static-data.yml
vendored
5
.github/workflows/static-data.yml
vendored
@@ -18,8 +18,9 @@ jobs:
|
||||
prepare:
|
||||
name: Run script
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
@@ -45,7 +46,7 @@ jobs:
|
||||
- name: format
|
||||
run: pnpm format
|
||||
- name: Commit & Push changes
|
||||
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 # tag=v1.4
|
||||
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # tag=v1.5
|
||||
with:
|
||||
github_token: ${{ secrets.TOKEN_VERDACCIOBOT_GITHUB }}
|
||||
message: "chore: updated static data"
|
||||
|
||||
5
.github/workflows/ui-components.yml
vendored
5
.github/workflows/ui-components.yml
vendored
@@ -19,10 +19,11 @@ jobs:
|
||||
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@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
@@ -30,7 +31,7 @@ jobs:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Cache pnpm modules
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
env:
|
||||
cache-name: cache-pnpm-modules
|
||||
with:
|
||||
|
||||
7
.github/workflows/website.yml
vendored
7
.github/workflows/website.yml
vendored
@@ -16,6 +16,7 @@ jobs:
|
||||
pull-requests: write # to comment on pull-requests
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
name: setup verdaccio
|
||||
services:
|
||||
verdaccio:
|
||||
@@ -27,7 +28,7 @@ jobs:
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
@@ -44,7 +45,7 @@ jobs:
|
||||
- name: Install
|
||||
run: pnpm install --registry http://localhost:4873
|
||||
- name: Cache .pnpm-store
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -55,7 +56,7 @@ jobs:
|
||||
- name: Build Translations percentage
|
||||
run: pnpm --filter @verdaccio/crowdin-translations build
|
||||
- name: Cache Docusaurus Build
|
||||
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
|
||||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: website/node_modules/.cache/webpack
|
||||
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
|
||||
@@ -43,7 +43,7 @@ Google Cloud Storage** or create your own plugin.
|
||||
Install with npm:
|
||||
|
||||
```bash
|
||||
npm install --location=global verdaccio@next
|
||||
npm install -g verdaccio@next
|
||||
```
|
||||
|
||||
With `yarn`
|
||||
@@ -79,8 +79,8 @@ Furthermore, you can read the [**Debugging Guidelines**](https://github.com/verd
|
||||
You can develop your own [plugins](https://verdaccio.org/docs/plugins) with the [verdaccio generator](https://github.com/verdaccio/generator-verdaccio-plugin). Installing [Yeoman](https://yeoman.io/) is required.
|
||||
|
||||
```
|
||||
npm install --location=global yo
|
||||
npm install --location=global generator-verdaccio-plugin
|
||||
npm install -g yo
|
||||
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.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
"devDependencies": {
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
"debug": "4.3.4",
|
||||
"fs-extra": "11.2.0",
|
||||
@@ -14,7 +14,7 @@
|
||||
"got": "11.8.6",
|
||||
"js-yaml": "4.1.0",
|
||||
"lodash": "4.17.21",
|
||||
"verdaccio": "workspace:7.0.0-next-7.13"
|
||||
"verdaccio": "workspace:7.0.0-next-7.14"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0",
|
||||
"npm": "10.4.0"
|
||||
"npm": "10.5.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0",
|
||||
"npm": "9.9.2"
|
||||
"npm": "9.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0",
|
||||
"npm": "9.9.2"
|
||||
"npm": "9.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0",
|
||||
"npm": "9.9.2"
|
||||
"npm": "9.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0",
|
||||
"npm": "9.9.2"
|
||||
"npm": "9.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0",
|
||||
"yarn": "1.22.21"
|
||||
"yarn": "1.22.22"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0",
|
||||
"@yarnpkg/cli-dist": "3.8.0"
|
||||
"@yarnpkg/cli-dist": "3.8.1"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "@verdaccio/e2e-cli-yarn4",
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@yarnpkg/cli-dist": "4.1.0",
|
||||
"@yarnpkg/cli-dist": "4.1.1",
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
"name": "@verdaccio/e2e-ui",
|
||||
"version": "2.0.0",
|
||||
"devDependencies": {
|
||||
"verdaccio": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"verdaccio": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/test-helper": "workspace:3.0.0-next-7.2",
|
||||
"debug": "4.3.4",
|
||||
"cypress": "^13.6.0",
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# @verdaccio/api
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b0946b2]
|
||||
- Updated dependencies [f967a69]
|
||||
- Updated dependencies [4dc62a8]
|
||||
- Updated dependencies [253cc13]
|
||||
- @verdaccio/middleware@7.0.0-next-7.14
|
||||
- @verdaccio/store@7.0.0-next-7.14
|
||||
- @verdaccio/auth@7.0.0-next-7.14
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/api",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "loaders logic",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -38,13 +38,13 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/store": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/store": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"abortcontroller-polyfill": "1.7.5",
|
||||
"body-parser": "1.20.2",
|
||||
"cookies": "0.9.0",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @verdaccio/auth
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4dc62a8: fix: adduser error message grammar (@tobbe in #4586)
|
||||
- Updated dependencies [b6d5652]
|
||||
- @verdaccio/signature@7.0.0-next-7.4
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/loaders@7.0.0-next-7.14
|
||||
- verdaccio-htpasswd@12.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/auth",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
@@ -38,20 +38,20 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/loaders": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/signature": "workspace:7.0.0-next.3",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/loaders": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/signature": "workspace:7.0.0-next-7.4",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"debug": "4.3.4",
|
||||
"lodash": "4.17.21",
|
||||
"verdaccio-htpasswd": "workspace:12.0.0-next-7.13"
|
||||
"verdaccio-htpasswd": "workspace:12.0.0-next-7.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"express": "4.18.3",
|
||||
"supertest": "6.3.4",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2"
|
||||
},
|
||||
"funding": {
|
||||
|
||||
@@ -239,7 +239,7 @@ class Auth implements IAuthMiddleware, TokenEncryption, pluginUtils.IBasicAuth {
|
||||
password,
|
||||
function (err: VerdaccioError | null, ok?: boolean | string): void {
|
||||
if (err) {
|
||||
debug('the user %o could not being added. Error: %o', user, err?.message);
|
||||
debug('the user %o could not be added. Error: %o', user, err?.message);
|
||||
return cb(err);
|
||||
}
|
||||
if (ok) {
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @verdaccio/cli
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/node-api@7.0.0-next-7.14
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/cli",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"author": {
|
||||
"name": "Juan Picado",
|
||||
"email": "juanpicado19@gmail.com"
|
||||
@@ -43,10 +43,10 @@
|
||||
"start": "ts-node src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/node-api": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/node-api": "workspace:7.0.0-next-7.14",
|
||||
"clipanion": "3.2.1",
|
||||
"envinfo": "7.11.0",
|
||||
"kleur": "4.1.5",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @verdaccio/config
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/config",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -38,8 +38,8 @@
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"debug": "4.3.4",
|
||||
"js-yaml": "4.1.0",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @verdaccio/core
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
## 7.0.0-next-7.12
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/core",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "core utilities",
|
||||
"keywords": [
|
||||
"private",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# Change Log
|
||||
|
||||
## 12.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 253cc13: feat: add tarball details for published packages
|
||||
- Updated dependencies [b0946b2]
|
||||
- @verdaccio/url@12.0.0-next-7.14
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
|
||||
## 12.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/tarball",
|
||||
"version": "12.0.0-next-7.13",
|
||||
"version": "12.0.0-next-7.14",
|
||||
"description": "tarball utilities resolver",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -24,7 +24,7 @@
|
||||
"repository": {
|
||||
"type": "https",
|
||||
"url": "https://github.com/verdaccio/verdaccio",
|
||||
"directory": "packages/core/url-resolver"
|
||||
"directory": "packages/core/tarball"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/verdaccio/verdaccio/issues"
|
||||
@@ -33,11 +33,13 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/url": "workspace:12.0.0-next-7.14",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"debug": "4.3.4",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/url": "workspace:12.0.0-next-7.13",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"lodash": "4.17.21"
|
||||
"gunzip-maybe": "^1.4.2",
|
||||
"lodash": "4.17.21",
|
||||
"tar-stream": "^3.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
|
||||
34
packages/core/tarball/src/getTarballDetails.ts
Normal file
34
packages/core/tarball/src/getTarballDetails.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import gunzipMaybe from 'gunzip-maybe';
|
||||
import { Readable } from 'stream';
|
||||
import * as tarStream from 'tar-stream';
|
||||
|
||||
export type TarballDetails = {
|
||||
fileCount: number;
|
||||
unpackedSize: number; // in bytes
|
||||
};
|
||||
|
||||
export async function getTarballDetails(readable: Readable): Promise<TarballDetails> {
|
||||
let fileCount = 0;
|
||||
let unpackedSize = 0;
|
||||
|
||||
const unpack = tarStream.extract();
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
readable
|
||||
.pipe(gunzipMaybe())
|
||||
.pipe(unpack)
|
||||
.on('entry', (header, stream, next) => {
|
||||
fileCount++;
|
||||
unpackedSize += Number(header.size);
|
||||
stream.resume(); // important to ensure that "entry" events keep firing
|
||||
next();
|
||||
})
|
||||
.on('finish', () => {
|
||||
resolve({
|
||||
fileCount,
|
||||
unpackedSize,
|
||||
});
|
||||
})
|
||||
.on('error', reject);
|
||||
});
|
||||
}
|
||||
@@ -5,5 +5,6 @@ export {
|
||||
convertDistVersionToLocalTarballsUrl,
|
||||
} from './convertDistRemoteToLocalTarballUrls';
|
||||
export { extractTarballFromUrl, getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';
|
||||
export { TarballDetails, getTarballDetails } from './getTarballDetails';
|
||||
|
||||
export { RequestOptions };
|
||||
|
||||
BIN
packages/core/tarball/tests/assets/tarball.tar
Normal file
BIN
packages/core/tarball/tests/assets/tarball.tar
Normal file
Binary file not shown.
BIN
packages/core/tarball/tests/assets/tarball.tgz
Normal file
BIN
packages/core/tarball/tests/assets/tarball.tgz
Normal file
Binary file not shown.
37
packages/core/tarball/tests/getTarballDetails.spec.ts
Normal file
37
packages/core/tarball/tests/getTarballDetails.spec.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { Readable } from 'stream';
|
||||
|
||||
import { getTarballDetails } from '../src/getTarballDetails.ts';
|
||||
|
||||
const getFilePath = (filename: string): string => {
|
||||
return path.resolve(__dirname, `assets/${filename}`);
|
||||
};
|
||||
|
||||
const getFileBuffer = async (filename: string): Promise<Buffer> => {
|
||||
return fs.promises.readFile(getFilePath(filename));
|
||||
};
|
||||
|
||||
describe('getTarballDetails', () => {
|
||||
test('should return stats of tarball (gzipped)', async () => {
|
||||
const buffer = await getFileBuffer('tarball.tgz');
|
||||
const readable = Readable.from(buffer);
|
||||
const details = await getTarballDetails(readable);
|
||||
expect(details.fileCount).toBe(2);
|
||||
expect(details.unpackedSize).toBe(1280);
|
||||
});
|
||||
|
||||
test('should return stats of tarball (uncompressed)', async () => {
|
||||
const buffer = await getFileBuffer('tarball.tar');
|
||||
const readable = Readable.from(buffer);
|
||||
const details = await getTarballDetails(readable);
|
||||
expect(details.fileCount).toBe(2);
|
||||
expect(details.unpackedSize).toBe(1280);
|
||||
});
|
||||
|
||||
test('should throw an error if the buffer is corrupt', async () => {
|
||||
const corruptBuffer = Buffer.from('this is not a tarball');
|
||||
const readable = Readable.from(corruptBuffer);
|
||||
await expect(getTarballDetails(readable)).rejects.toThrow();
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,12 @@
|
||||
# Change Log
|
||||
|
||||
## 12.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b0946b2: Improved TS types for renderHTML() and related functions (by @tobbe in #4605)
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
|
||||
## 12.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/url",
|
||||
"version": "12.0.0-next-7.13",
|
||||
"version": "12.0.0-next-7.14",
|
||||
"description": "url utilities resolver",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -33,7 +33,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"debug": "4.3.4",
|
||||
"lodash": "4.17.21",
|
||||
"validator": "13.11.0"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import buildDebug from 'debug';
|
||||
import type { IncomingHttpHeaders } from 'node:http';
|
||||
import { URL } from 'url';
|
||||
import validator from 'validator';
|
||||
|
||||
@@ -31,7 +32,7 @@ export function isHost(url: string = '', options = {}): boolean {
|
||||
/**
|
||||
* Detect running protocol (http or https)
|
||||
*/
|
||||
export function getWebProtocol(headerProtocol: string | void, protocol: string): string {
|
||||
export function getWebProtocol(headerProtocol: string | undefined, protocol: string): string {
|
||||
let returnProtocol;
|
||||
const [, defaultProtocol] = validProtocols;
|
||||
// HAProxy variant might return http,http with X-Forwarded-Proto
|
||||
@@ -101,7 +102,7 @@ export type RequestOptions = {
|
||||
/**
|
||||
* Request headers.
|
||||
*/
|
||||
headers: { [key: string]: string };
|
||||
headers: IncomingHttpHeaders;
|
||||
remoteAddress?: string;
|
||||
/**
|
||||
* Logged username the request, usually after token verification.
|
||||
@@ -119,10 +120,13 @@ export function getPublicUrl(url_prefix: string = '', requestOptions: RequestOpt
|
||||
if (!isHost(host)) {
|
||||
throw new Error('invalid host');
|
||||
}
|
||||
const protoHeader =
|
||||
|
||||
const protoHeader: string =
|
||||
process.env.VERDACCIO_FORWARDED_PROTO?.toLocaleLowerCase() ??
|
||||
HEADERS.FORWARDED_PROTO.toLowerCase();
|
||||
const protocol = getWebProtocol(requestOptions.headers[protoHeader], requestOptions.protocol);
|
||||
const forwardedProtocolHeaderValue = requestOptions.headers[protoHeader] as string | undefined;
|
||||
|
||||
const protocol = getWebProtocol(forwardedProtocolHeaderValue, requestOptions.protocol);
|
||||
const combinedUrl = combineBaseUrl(protocol, host, url_prefix);
|
||||
debug('public url by request %o', combinedUrl);
|
||||
return combinedUrl;
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @verdaccio/hooks
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/hooks",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "loaders logic",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -29,16 +29,16 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"core-js": "3.35.0",
|
||||
"debug": "4.3.4",
|
||||
"got-cjs": "12.5.4",
|
||||
"handlebars": "4.7.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
"nock": "13.5.1"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @verdaccio/loaders
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/loaders",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "loaders logic",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -13,13 +13,13 @@
|
||||
"url": "https://github.com/verdaccio/verdaccio"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"debug": "4.3.4",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
"@verdaccio-scope/verdaccio-auth-foo": "0.0.2",
|
||||
"verdaccio-auth-memory": "workspace:*",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @verdaccio/logger-7
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/logger-commons@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/logger-7",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "logger for verdaccio 5.x version",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
@@ -38,7 +38,7 @@
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/logger-commons": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger-commons": "workspace:7.0.0-next-7.14",
|
||||
"pino": "7.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @verdaccio/logger-commons
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/logger-commons",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
@@ -38,7 +38,7 @@
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger-prettify": "workspace:7.0.0-next-7.2",
|
||||
"debug": "4.3.4",
|
||||
"colorette": "2.0.20"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @verdaccio/logger
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/logger-commons@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/logger",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
@@ -38,7 +38,7 @@
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/logger-commons": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger-commons": "workspace:7.0.0-next-7.14",
|
||||
"pino": "8.17.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @verdaccio/middleware
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b0946b2: Improved TS types for renderHTML() and related functions (by @tobbe in #4605)
|
||||
- Updated dependencies [b0946b2]
|
||||
- @verdaccio/url@12.0.0-next-7.14
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/middleware",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "express middleware utils",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -38,10 +38,10 @@
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/url": "workspace:12.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/url": "workspace:12.0.0-next-7.14",
|
||||
"debug": "4.3.4",
|
||||
"lru-cache": "7.18.3",
|
||||
"express": "4.18.3",
|
||||
@@ -54,7 +54,7 @@
|
||||
"url": "https://opencollective.com/verdaccio"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"body-parser": "1.20.2",
|
||||
"supertest": "6.3.4"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import buildDebug from 'debug';
|
||||
import type { Response } from 'express';
|
||||
import LRU from 'lru-cache';
|
||||
import path from 'path';
|
||||
import { URL } from 'url';
|
||||
@@ -6,10 +7,12 @@ import { URL } from 'url';
|
||||
import { WEB_TITLE } from '@verdaccio/config';
|
||||
import { HEADERS } from '@verdaccio/core';
|
||||
import { ConfigYaml, TemplateUIOptions } from '@verdaccio/types';
|
||||
import { isURLhasValidProtocol } from '@verdaccio/url';
|
||||
import { getPublicUrl } from '@verdaccio/url';
|
||||
import type { RequestOptions } from '@verdaccio/url';
|
||||
import { getPublicUrl, isURLhasValidProtocol } from '@verdaccio/url';
|
||||
|
||||
import type { Manifest } from './manifest';
|
||||
import renderTemplate from './template';
|
||||
import type { WebpackManifest } from './template';
|
||||
import { hasLogin, validatePrimaryColor } from './web-utils';
|
||||
|
||||
const DEFAULT_LANGUAGE = 'es-US';
|
||||
@@ -17,19 +20,20 @@ const cache = new LRU({ max: 500, ttl: 1000 * 60 * 60 });
|
||||
|
||||
const debug = buildDebug('verdaccio:web:render');
|
||||
|
||||
const defaultManifestFiles = {
|
||||
const defaultManifestFiles: Manifest = {
|
||||
js: ['runtime.js', 'vendors.js', 'main.js'],
|
||||
ico: 'favicon.ico',
|
||||
css: [],
|
||||
};
|
||||
|
||||
export function resolveLogo(config: ConfigYaml, req) {
|
||||
export function resolveLogo(config: ConfigYaml, requestOptions: RequestOptions) {
|
||||
if (typeof config?.web?.logo !== 'string') {
|
||||
return '';
|
||||
}
|
||||
const isLocalFile = config?.web?.logo && !isURLhasValidProtocol(config?.web?.logo);
|
||||
|
||||
if (isLocalFile) {
|
||||
return `${getPublicUrl(config?.url_prefix, req)}-/static/${path.basename(config?.web?.logo)}`;
|
||||
return `${getPublicUrl(config?.url_prefix, requestOptions)}-/static/${path.basename(config?.web?.logo)}`;
|
||||
} else if (isURLhasValidProtocol(config?.web?.logo)) {
|
||||
return config?.web?.logo;
|
||||
} else {
|
||||
@@ -37,9 +41,15 @@ export function resolveLogo(config: ConfigYaml, req) {
|
||||
}
|
||||
}
|
||||
|
||||
export default function renderHTML(config: ConfigYaml, manifest, manifestFiles, req, res) {
|
||||
export default function renderHTML(
|
||||
config: ConfigYaml,
|
||||
manifest: WebpackManifest,
|
||||
manifestFiles: Manifest | null | undefined,
|
||||
requestOptions: RequestOptions,
|
||||
res: Response
|
||||
) {
|
||||
const { url_prefix } = config;
|
||||
const base = getPublicUrl(config?.url_prefix, req);
|
||||
const base = getPublicUrl(config?.url_prefix, requestOptions);
|
||||
const basename = new URL(base).pathname;
|
||||
const language = config?.i18n?.web ?? DEFAULT_LANGUAGE;
|
||||
const hideDeprecatedVersions = config?.web?.hideDeprecatedVersions ?? false;
|
||||
@@ -51,7 +61,7 @@ export default function renderHTML(config: ConfigYaml, manifest, manifestFiles,
|
||||
const title = config?.web?.title ?? WEB_TITLE;
|
||||
const login = hasLogin(config);
|
||||
const scope = config?.web?.scope ?? '';
|
||||
const logo = resolveLogo(config, req);
|
||||
const logo = resolveLogo(config, requestOptions);
|
||||
const pkgManagers = config?.web?.pkgManagers ?? ['yarn', 'pnpm', 'npm'];
|
||||
const version = res.locals.app_version ?? '';
|
||||
const flags = {
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @verdaccio/node-api
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/server@7.0.0-next-7.14
|
||||
- @verdaccio/server-fastify@7.0.0-next-7.14
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/node-api",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "node API",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -38,11 +38,11 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/server": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/server-fastify": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/server": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/server-fastify": "workspace:7.0.0-next-7.14",
|
||||
"core-js": "3.35.0",
|
||||
"debug": "4.3.4",
|
||||
"lodash": "4.17.21"
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Change Log
|
||||
|
||||
## 12.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
|
||||
## 12.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "verdaccio-audit",
|
||||
"version": "12.0.0-next-7.13",
|
||||
"version": "12.0.0-next-7.14",
|
||||
"description": "Verdaccio Middleware plugin to bypass npmjs audit",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -30,15 +30,15 @@
|
||||
"node": ">=12"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"express": "4.18.3",
|
||||
"https-proxy-agent": "5.0.1",
|
||||
"node-fetch": "cjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
"nock": "13.5.1",
|
||||
"supertest": "6.3.4"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
## 12.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
|
||||
## 12.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "verdaccio-auth-memory",
|
||||
"version": "12.0.0-next-7.13",
|
||||
"version": "12.0.0-next-7.14",
|
||||
"description": "Auth plugin for Verdaccio that keeps users in memory",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -30,12 +30,12 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"debug": "4.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/debug": "^4.1.12",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
## 12.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
|
||||
## 12.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "verdaccio-htpasswd",
|
||||
"version": "12.0.0-next-7.13",
|
||||
"version": "12.0.0-next-7.14",
|
||||
"description": "htpasswd auth plugin for Verdaccio",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -33,7 +33,7 @@
|
||||
"node": ">=12"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/file-locking": "workspace:12.0.0-next.1",
|
||||
"apache-md5": "1.1.8",
|
||||
"bcryptjs": "2.4.3",
|
||||
@@ -45,8 +45,8 @@
|
||||
"devDependencies": {
|
||||
"@types/bcryptjs": "2.4.6",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"mockdate": "3.0.5"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# Change Log
|
||||
|
||||
## 12.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4ac3aea: chore: reduce log to info if database is not found
|
||||
- 1bae121: fix: error when writing tarball (missing folder)
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
|
||||
## 12.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/local-storage",
|
||||
"version": "12.0.0-next-7.13",
|
||||
"version": "12.0.0-next-7.14",
|
||||
"description": "Local storage implementation",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -36,9 +36,9 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/file-locking": "workspace:12.0.0-next.1",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"core-js": "3.35.0",
|
||||
"debug": "4.3.4",
|
||||
"globby": "11.1.0",
|
||||
@@ -50,8 +50,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/minimatch": "5.1.2",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/test-helper": "workspace:3.0.0-next-7.2",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
"minimatch": "9.0.3"
|
||||
|
||||
@@ -287,7 +287,7 @@ class LocalDatabase extends pluginUtils.Plugin<{}> implements Storage {
|
||||
} catch (err: any) {
|
||||
// readFileSync is platform specific, macOS, Linux and Windows thrown an error
|
||||
// Only recreate if file not found to prevent data loss
|
||||
this.logger.warn(
|
||||
this.logger.info(
|
||||
{ path: this.path },
|
||||
'no private database found, recreating new one on @{path}'
|
||||
);
|
||||
|
||||
@@ -237,6 +237,7 @@ export default class LocalFS implements ILocalFSPackageManager {
|
||||
public async writeTarball(fileName: string, { signal }): Promise<Writable> {
|
||||
debug('write a tarball %o', fileName);
|
||||
const pathName: string = this._getStorage(fileName);
|
||||
await this.checkCreateFolder(pathName);
|
||||
// create a temporary file to avoid conflicts or prev corruption files
|
||||
const temporalName = path.join(
|
||||
this.path,
|
||||
@@ -352,8 +353,8 @@ export default class LocalFS implements ILocalFSPackageManager {
|
||||
private async writeTempFileAndRename(dest: string, fileContent: string): Promise<any> {
|
||||
const tempFilePath = tempFile(dest);
|
||||
try {
|
||||
// write file on temp locatio
|
||||
// TODO: we need to handle when directory does not exist
|
||||
// write file on temp location
|
||||
await this.checkCreateFolder(tempFilePath);
|
||||
await writeFilePromise(tempFilePath, fileContent);
|
||||
debug('creating a new file:: %o', dest);
|
||||
// rename tmp file to original
|
||||
@@ -370,10 +371,7 @@ export default class LocalFS implements ILocalFSPackageManager {
|
||||
debug('write file success %s', destiny);
|
||||
} catch (err: any) {
|
||||
if (err && err.code === noSuchFile) {
|
||||
const dir = path.dirname(destiny);
|
||||
// if fails, we create the folder for the package
|
||||
debug('write file has failed, creating folder %s', dir);
|
||||
await mkdirPromise(dir, { recursive: true });
|
||||
await this.checkCreateFolder(destiny);
|
||||
// we try again create the temp file
|
||||
debug('writing a temp file %s', destiny);
|
||||
await this.writeTempFileAndRename(destiny, fileContent);
|
||||
@@ -385,6 +383,23 @@ export default class LocalFS implements ILocalFSPackageManager {
|
||||
}
|
||||
}
|
||||
|
||||
private async checkCreateFolder(pathName: string): Promise<void> {
|
||||
// Check if folder exists and create it if not
|
||||
const dir = path.dirname(pathName);
|
||||
try {
|
||||
await accessPromise(dir);
|
||||
} catch (err: any) {
|
||||
if (err.code === noSuchFile) {
|
||||
debug('folder does not exist %o', dir);
|
||||
await mkdirPromise(dir, { recursive: true });
|
||||
debug('folder %o created', dir);
|
||||
} else {
|
||||
debug('error on check folder %o', dir);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async _lockAndReadJSON(name: string): Promise<Manifest> {
|
||||
const fileName: string = this._getStorage(name);
|
||||
debug('lock and read a file %o', fileName);
|
||||
|
||||
@@ -93,6 +93,21 @@ describe('Local FS test', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('writeTarballNextNoFolder', () => {
|
||||
test('should write a tarball even if folder does not exist', (done) => {
|
||||
const abort = new AbortController();
|
||||
const tmp = path.join(localTempStorage, 'local-fs-write-tarball-new-folder');
|
||||
const localFs = new LocalDriver(tmp, logger);
|
||||
const readableStream = Readable.from('foooo');
|
||||
localFs.writeTarball('juan-1.0.0.tgz', { signal: abort.signal }).then((stream) => {
|
||||
stream.on('finish', () => {
|
||||
done();
|
||||
});
|
||||
readableStream.pipe(stream);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('readTarballNext', () => {
|
||||
test('should read a tarball', (done) => {
|
||||
const abort = new AbortController();
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
## 12.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
|
||||
## 12.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "verdaccio-memory",
|
||||
"version": "12.0.0-next-7.13",
|
||||
"version": "12.0.0-next-7.14",
|
||||
"description": "Storage implementation in memory",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -30,15 +30,15 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"memory-fs": "0.5.0",
|
||||
"debug": "4.3.4",
|
||||
"memfs": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13"
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# @verdaccio/ui-theme
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/ui-theme",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "Verdaccio User Interface",
|
||||
"author": {
|
||||
"name": "Verdaccio Contributors",
|
||||
@@ -27,7 +27,7 @@
|
||||
"@testing-library/dom": "9.3.4",
|
||||
"@testing-library/jest-dom": "6.3.0",
|
||||
"@testing-library/react": "14.1.2",
|
||||
"@verdaccio/node-api": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/node-api": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:*",
|
||||
"@verdaccio/ui-components": "workspace:3.0.0-next-7.6",
|
||||
"babel-loader": "8.3.0",
|
||||
@@ -47,7 +47,7 @@
|
||||
"js-yaml": "4.1.0",
|
||||
"localstorage-memory": "1.0.3",
|
||||
"lodash": "4.17.21",
|
||||
"marked": "11.1.1",
|
||||
"marked": "11.2.0",
|
||||
"mini-css-extract-plugin": "2.7.7",
|
||||
"msw": "0.49.3",
|
||||
"mutationobserver-shim": "0.3.7",
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
"username": "dianmorales",
|
||||
"id": 558740
|
||||
},
|
||||
{
|
||||
"username": "anikethsaha",
|
||||
"id": 26347874
|
||||
},
|
||||
{
|
||||
"username": "mbtools",
|
||||
"id": 59966492
|
||||
},
|
||||
{
|
||||
"username": "anikethsaha",
|
||||
"id": 26347874
|
||||
},
|
||||
{
|
||||
"username": "kgrubb",
|
||||
"id": 8471701
|
||||
@@ -435,14 +435,14 @@
|
||||
"username": "marnel",
|
||||
"id": 3189424
|
||||
},
|
||||
{
|
||||
"username": "MasterOdin",
|
||||
"id": 1845314
|
||||
},
|
||||
{
|
||||
"username": "kba",
|
||||
"id": 273367
|
||||
},
|
||||
{
|
||||
"username": "MasterOdin",
|
||||
"id": 1845314
|
||||
},
|
||||
{
|
||||
"username": "aledbf",
|
||||
"id": 161571
|
||||
@@ -563,6 +563,10 @@
|
||||
"username": "todpunk",
|
||||
"id": 1166358
|
||||
},
|
||||
{
|
||||
"username": "fhp",
|
||||
"id": 374671
|
||||
},
|
||||
{
|
||||
"username": "simon-lorenz",
|
||||
"id": 34041551
|
||||
@@ -591,14 +595,6 @@
|
||||
"username": "rostislav-simonik",
|
||||
"id": 25525736
|
||||
},
|
||||
{
|
||||
"username": "hedocode",
|
||||
"id": 22884999
|
||||
},
|
||||
{
|
||||
"username": "fhp",
|
||||
"id": 374671
|
||||
},
|
||||
{
|
||||
"username": "stephanebachelier",
|
||||
"id": 172615
|
||||
@@ -635,6 +631,10 @@
|
||||
"username": "Tiny-Fendy",
|
||||
"id": 8954107
|
||||
},
|
||||
{
|
||||
"username": "Tobbe",
|
||||
"id": 30793
|
||||
},
|
||||
{
|
||||
"username": "oltodo",
|
||||
"id": 483842
|
||||
@@ -699,6 +699,10 @@
|
||||
"username": "RodrigoBalest",
|
||||
"id": 4810463
|
||||
},
|
||||
{
|
||||
"username": "tomcoonen",
|
||||
"id": 988013
|
||||
},
|
||||
{
|
||||
"username": "iketiunn",
|
||||
"id": 10249208
|
||||
@@ -779,10 +783,6 @@
|
||||
"username": "melodyVoid",
|
||||
"id": 26846212
|
||||
},
|
||||
{
|
||||
"username": "tomcoonen",
|
||||
"id": 988013
|
||||
},
|
||||
{
|
||||
"username": "grrowl",
|
||||
"id": 907140
|
||||
@@ -867,6 +867,10 @@
|
||||
"username": "dasmikko",
|
||||
"id": 4254869
|
||||
},
|
||||
{
|
||||
"username": "divdavem",
|
||||
"id": 1152706
|
||||
},
|
||||
{
|
||||
"username": "iambrandonn",
|
||||
"id": 1644549
|
||||
@@ -944,8 +948,12 @@
|
||||
"id": 20465797
|
||||
},
|
||||
{
|
||||
"username": "einfallstoll",
|
||||
"id": 619048
|
||||
"username": "Joon",
|
||||
"id": 94231
|
||||
},
|
||||
{
|
||||
"username": "hedocode",
|
||||
"id": 22884999
|
||||
},
|
||||
{
|
||||
"username": "itsabdelrahman",
|
||||
@@ -1007,6 +1015,10 @@
|
||||
"username": "hafffe",
|
||||
"id": 3322693
|
||||
},
|
||||
{
|
||||
"username": "sethidden",
|
||||
"id": 5359825
|
||||
},
|
||||
{
|
||||
"username": "BarthV",
|
||||
"id": 1901955
|
||||
@@ -1099,6 +1111,10 @@
|
||||
"username": "morrain",
|
||||
"id": 9381634
|
||||
},
|
||||
{
|
||||
"username": "einfallstoll",
|
||||
"id": 619048
|
||||
},
|
||||
{
|
||||
"username": "felipeplets",
|
||||
"id": 119980
|
||||
@@ -1135,6 +1151,10 @@
|
||||
"username": "inyong37",
|
||||
"id": 20737479
|
||||
},
|
||||
{
|
||||
"username": "ItamarGronich",
|
||||
"id": 14963977
|
||||
},
|
||||
{
|
||||
"username": "jrussellsmyth",
|
||||
"id": 2998207
|
||||
@@ -1171,10 +1191,6 @@
|
||||
"username": "jondlm",
|
||||
"id": 3290587
|
||||
},
|
||||
{
|
||||
"username": "Joon",
|
||||
"id": 94231
|
||||
},
|
||||
{
|
||||
"username": "notsag",
|
||||
"id": 674589
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @verdaccio/proxy
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/proxy",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "verdaccio proxy fetcher",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -38,9 +38,9 @@
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"JSONStream": "1.3.5",
|
||||
"debug": "4.3.4",
|
||||
"got-cjs": "12.5.4",
|
||||
@@ -48,7 +48,7 @@
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
"get-stream": "^6.0.1",
|
||||
"nock": "13.5.1",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @verdaccio/search-indexer
|
||||
|
||||
## 7.0.0-next-7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 542f9d3: fix: remove node engine restriction
|
||||
|
||||
## 7.0.0-next-7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/search-indexer",
|
||||
"version": "7.0.0-next-7.1",
|
||||
"version": "7.0.0-next-7.2",
|
||||
"description": "verdaccio search indexer",
|
||||
"main": "./build/dist.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -26,7 +26,7 @@
|
||||
"verdaccio"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @verdaccio/search
|
||||
|
||||
## 7.0.0-next-7.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/proxy@7.0.0-next-7.14
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/search",
|
||||
"version": "7.0.0-next-7.2",
|
||||
"version": "7.0.0-next-7.3",
|
||||
"description": "verdaccio search proxy",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -40,10 +40,10 @@
|
||||
"dependencies": {
|
||||
"debug": "4.3.4",
|
||||
"lodash": "4.17.21",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/proxy": "workspace:7.0.0-next-7.13"
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/proxy": "workspace:7.0.0-next-7.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2",
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# @verdaccio/server
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b0946b2]
|
||||
- Updated dependencies [f967a69]
|
||||
- Updated dependencies [4dc62a8]
|
||||
- Updated dependencies [253cc13]
|
||||
- @verdaccio/middleware@7.0.0-next-7.14
|
||||
- @verdaccio/store@7.0.0-next-7.14
|
||||
- @verdaccio/auth@7.0.0-next-7.14
|
||||
- @verdaccio/api@7.0.0-next-7.14
|
||||
- @verdaccio/web@7.0.0-next-7.14
|
||||
- verdaccio-audit@12.0.0-next-7.14
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/loaders@7.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/server",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "server logic",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -29,17 +29,17 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/api": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/loaders": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/store": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/web": "workspace:7.0.0-next-7.13",
|
||||
"verdaccio-audit": "workspace:12.0.0-next-7.13",
|
||||
"@verdaccio/api": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/loaders": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/store": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/web": "workspace:7.0.0-next-7.14",
|
||||
"verdaccio-audit": "workspace:12.0.0-next-7.14",
|
||||
"compression": "1.7.4",
|
||||
"cors": "2.8.5",
|
||||
"debug": "4.3.4",
|
||||
@@ -47,7 +47,7 @@
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/proxy": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/proxy": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/test-helper": "workspace:3.0.0-next-7.2",
|
||||
"http-errors": "2.0.0"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @verdaccio/server-fastify
|
||||
|
||||
## 7.0.0-next-7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [f967a69]
|
||||
- Updated dependencies [4dc62a8]
|
||||
- Updated dependencies [253cc13]
|
||||
- @verdaccio/store@7.0.0-next-7.14
|
||||
- @verdaccio/auth@7.0.0-next-7.14
|
||||
- @verdaccio/tarball@12.0.0-next-7.14
|
||||
- @verdaccio/core@7.0.0-next-7.14
|
||||
- @verdaccio/config@7.0.0-next-7.14
|
||||
- @verdaccio/utils@7.0.0-next-7.14
|
||||
- @verdaccio/logger@7.0.0-next-7.14
|
||||
|
||||
## 7.0.0-next-7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/server-fastify",
|
||||
"version": "7.0.0-next-7.13",
|
||||
"version": "7.0.0-next-7.14",
|
||||
"description": "fastify server api implementation",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -33,13 +33,13 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/store": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/tarball": "workspace:12.0.0-next-7.13",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/store": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/tarball": "workspace:12.0.0-next-7.14",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.14",
|
||||
"core-js": "3.35.0",
|
||||
"debug": "4.3.4",
|
||||
"fastify": "4.25.2",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @verdaccio/signature
|
||||
|
||||
## 7.0.0-next-7.4
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- b6d5652: support for createCipher backward compatible
|
||||
|
||||
## 7.0.0-next.3
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/signature",
|
||||
"version": "7.0.0-next.3",
|
||||
"version": "7.0.0-next-7.4",
|
||||
"description": "verdaccio signature utils",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -26,7 +26,7 @@
|
||||
"verdaccio"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=14"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
@@ -39,10 +39,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonwebtoken": "9.0.2",
|
||||
"evp_bytestokey": "1.0.3",
|
||||
"debug": "4.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.13",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.14",
|
||||
"@verdaccio/types": "workspace:12.0.0-next.2"
|
||||
},
|
||||
"funding": {
|
||||
|
||||
@@ -2,7 +2,10 @@ export {
|
||||
aesDecryptDeprecated,
|
||||
aesEncryptDeprecated,
|
||||
generateRandomSecretKeyDeprecated,
|
||||
aesDecryptDeprecatedBackwardCompatible,
|
||||
aesEncryptDeprecatedBackwardCompatible,
|
||||
} from './legacy-signature';
|
||||
|
||||
export { aesDecrypt, aesEncrypt } from './signature';
|
||||
export { signPayload, verifyPayload, SignOptionsSignature } from './jwt-token';
|
||||
export * as utils from './utils';
|
||||
|
||||
@@ -1,50 +1,13 @@
|
||||
import { createCipher, createDecipher } from 'crypto';
|
||||
|
||||
import { generateRandomHexString } from '../utils';
|
||||
|
||||
export const defaultAlgorithm = 'aes192';
|
||||
export const defaultTarballHashAlgorithm = 'sha1';
|
||||
|
||||
/**
|
||||
*
|
||||
* @param buf
|
||||
* @param secret
|
||||
* @returns
|
||||
*/
|
||||
export function aesEncryptDeprecated(buf: Buffer, secret: string): Buffer {
|
||||
// deprecated (it will be removed in Verdaccio 6), it is a breaking change
|
||||
// https://nodejs.org/api/crypto.html#crypto_crypto_createcipher_algorithm_password_options
|
||||
// https://www.grainger.xyz/changing-from-cipher-to-cipheriv/
|
||||
const c = createCipher(defaultAlgorithm, secret);
|
||||
const b1 = c.update(buf);
|
||||
const b2 = c.final();
|
||||
return Buffer.concat([b1, b2]);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param buf
|
||||
* @param secret
|
||||
* @returns
|
||||
*/
|
||||
export function aesDecryptDeprecated(buf: Buffer, secret: string): Buffer {
|
||||
try {
|
||||
// https://nodejs.org/api/crypto.html#crypto_crypto_createdecipher_algorithm_password_options
|
||||
// https://www.grainger.xyz/changing-from-cipher-to-cipheriv/
|
||||
const c = createDecipher(defaultAlgorithm, secret);
|
||||
const b1 = c.update(buf);
|
||||
const b2 = c.final();
|
||||
return Buffer.concat([b1, b2]);
|
||||
} catch (_) {
|
||||
return Buffer.alloc(0);
|
||||
}
|
||||
}
|
||||
|
||||
export const TOKEN_VALID_LENGTH_DEPRECATED = 64;
|
||||
|
||||
/**
|
||||
* Generate a secret key of 64 characters.
|
||||
*/
|
||||
export function generateRandomSecretKeyDeprecated(): string {
|
||||
return generateRandomHexString(6);
|
||||
}
|
||||
export {
|
||||
aesDecryptDeprecated,
|
||||
aesEncryptDeprecated,
|
||||
generateRandomSecretKeyDeprecated,
|
||||
TOKEN_VALID_LENGTH_DEPRECATED,
|
||||
defaultAlgorithm,
|
||||
defaultTarballHashAlgorithm,
|
||||
} from './legacy-crypto';
|
||||
// Temporary export to keep backward compatibility with Node.js >= 22
|
||||
export {
|
||||
aesDecryptDeprecatedBackwardCompatible,
|
||||
aesEncryptDeprecatedBackwardCompatible,
|
||||
} from './legacy-backward-compatible';
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* eslint-disable new-cap */
|
||||
import { createCipheriv, createDecipheriv } from 'crypto';
|
||||
import EVP_BytesToKey from 'evp_bytestokey';
|
||||
|
||||
export const defaultAlgorithm = 'aes192';
|
||||
const KEY_SIZE = 24;
|
||||
|
||||
export function aesDecryptDeprecatedBackwardCompatible(text, secret: string) {
|
||||
const result = EVP_BytesToKey(
|
||||
secret,
|
||||
null,
|
||||
KEY_SIZE * 8, // byte to bit size
|
||||
16
|
||||
);
|
||||
|
||||
let decipher = createDecipheriv(defaultAlgorithm, result.key, result.iv);
|
||||
let decrypted = decipher.update(text, 'hex', 'utf8') + decipher.final('utf8');
|
||||
return decrypted.toString();
|
||||
}
|
||||
|
||||
export function aesEncryptDeprecatedBackwardCompatible(text, secret: string) {
|
||||
const result = EVP_BytesToKey(
|
||||
secret,
|
||||
null,
|
||||
KEY_SIZE * 8, // byte to bit size
|
||||
16
|
||||
);
|
||||
|
||||
const cipher = createCipheriv(defaultAlgorithm, result.key, result.iv);
|
||||
const encrypted = cipher.update(text, 'utf8', 'hex') + cipher.final('hex');
|
||||
return encrypted.toString();
|
||||
}
|
||||
50
packages/signature/src/legacy-signature/legacy-crypto.ts
Normal file
50
packages/signature/src/legacy-signature/legacy-crypto.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { createCipher, createDecipher } from 'crypto';
|
||||
|
||||
import { generateRandomHexString } from '../utils';
|
||||
|
||||
export const defaultAlgorithm = 'aes192';
|
||||
export const defaultTarballHashAlgorithm = 'sha1';
|
||||
|
||||
/**
|
||||
* Deprecated version usage of crypto.createCipher, only useful for node.js versions < 22.
|
||||
* @param buf
|
||||
* @param secret
|
||||
* @returns
|
||||
*/
|
||||
export function aesEncryptDeprecated(buf: Buffer, secret: string): Buffer {
|
||||
// deprecated (it will be removed in Verdaccio 6), it is a breaking change
|
||||
// https://nodejs.org/api/crypto.html#crypto_crypto_createcipher_algorithm_password_options
|
||||
// https://www.grainger.xyz/changing-from-cipher-to-cipheriv/
|
||||
const c = createCipher(defaultAlgorithm, secret);
|
||||
const b1 = c.update(buf);
|
||||
const b2 = c.final();
|
||||
return Buffer.concat([b1, b2]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated version usage of crypto.createCipher, only useful for node.js versions < 22.
|
||||
* @param buf
|
||||
* @param secret
|
||||
* @returns
|
||||
*/
|
||||
export function aesDecryptDeprecated(buf: Buffer, secret: string): Buffer {
|
||||
try {
|
||||
// https://nodejs.org/api/crypto.html#crypto_crypto_createdecipher_algorithm_password_options
|
||||
// https://www.grainger.xyz/changing-from-cipher-to-cipheriv/
|
||||
const c = createDecipher(defaultAlgorithm, secret);
|
||||
const b1 = c.update(buf);
|
||||
const b2 = c.final();
|
||||
return Buffer.concat([b1, b2]);
|
||||
} catch (_) {
|
||||
return Buffer.alloc(0);
|
||||
}
|
||||
}
|
||||
|
||||
export const TOKEN_VALID_LENGTH_DEPRECATED = 64;
|
||||
|
||||
/**
|
||||
* Generate a secret key of 64 characters.
|
||||
*/
|
||||
export function generateRandomSecretKeyDeprecated(): string {
|
||||
return generateRandomHexString(6);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user