Compare commits
116 Commits
@verdaccio
...
@verdaccio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce1c642312 | ||
|
|
93c53a4d5a | ||
|
|
a77074d0a8 | ||
|
|
71028d5ce4 | ||
|
|
e907171bfb | ||
|
|
7ef2ed6959 | ||
|
|
d573444910 | ||
|
|
829c908e45 | ||
|
|
ed6c794d2d | ||
|
|
b03e8b9dd6 | ||
|
|
b167f9d323 | ||
|
|
a05a7d8a13 | ||
|
|
3f46ff0107 | ||
|
|
7c9f3cf15e | ||
|
|
e8de53bcdf | ||
|
|
f48f19dfe9 | ||
|
|
4793270a3e | ||
|
|
b64c7d4660 | ||
|
|
c63655b6f2 | ||
|
|
97947ebb3d | ||
|
|
60b263f23d | ||
|
|
6576ea7a5b | ||
|
|
303c659bfc | ||
|
|
4769ddf1ba | ||
|
|
8b9f8a6f80 | ||
|
|
06f68eb0e7 | ||
|
|
1f75a416f2 | ||
|
|
477f9bcba4 | ||
|
|
0c7b19b192 | ||
|
|
79c1fedc1b | ||
|
|
29b1c39169 | ||
|
|
0ab8fd92bd | ||
|
|
07f5cf2799 | ||
|
|
f59268b225 | ||
|
|
5513e2f8a2 | ||
|
|
fb239e39c3 | ||
|
|
c7a7b1ded9 | ||
|
|
d3f4146bc7 | ||
|
|
5c561f7d1a | ||
|
|
0119daaba9 | ||
|
|
d7332e6122 | ||
|
|
02058672e6 | ||
|
|
a82be2d8a8 | ||
|
|
527f39988f | ||
|
|
4d3435001a | ||
|
|
8c10a3ec31 | ||
|
|
8ef7a285e5 | ||
|
|
45c6b70ebc | ||
|
|
fd7ed45064 | ||
|
|
79e76d9c72 | ||
|
|
947f43e7e6 | ||
|
|
591a699597 | ||
|
|
08c49460d5 | ||
|
|
489631bda9 | ||
|
|
112f1d60b8 | ||
|
|
e87b29885b | ||
|
|
ccc7bd1df5 | ||
|
|
3c6e6b9af7 | ||
|
|
096d634917 | ||
|
|
87fa9270a5 | ||
|
|
dc2cd48a78 | ||
|
|
4c54c0c67d | ||
|
|
6bed536f80 | ||
|
|
1f4fa441ae | ||
|
|
c5f5e75818 | ||
|
|
b3f52486f7 | ||
|
|
bbfb4118bf | ||
|
|
6c5f7a4fa0 | ||
|
|
2274e483ac | ||
|
|
d0dacd75c5 | ||
|
|
5bcfd7e2e2 | ||
|
|
71fcd2de91 | ||
|
|
39f7fd6057 | ||
|
|
96b28575a3 | ||
|
|
6249cbf562 | ||
|
|
136e992bb9 | ||
|
|
2ee690638d | ||
|
|
c31aec8336 | ||
|
|
5a0c23f900 | ||
|
|
19df355e3c | ||
|
|
39f71f5d7d | ||
|
|
a985ddc246 | ||
|
|
2a6ee33071 | ||
|
|
919795c804 | ||
|
|
d60bf44c43 | ||
|
|
6626e77766 | ||
|
|
03a903d924 | ||
|
|
6ee0afb13a | ||
|
|
016812b12c | ||
|
|
3b3cf86b54 | ||
|
|
5a77414eb6 | ||
|
|
da6d8e5f38 | ||
|
|
c7ba6b95f6 | ||
|
|
744a806411 | ||
|
|
1deb734b3e | ||
|
|
9caca4b573 | ||
|
|
fec5a46b22 | ||
|
|
6aa850a8b4 | ||
|
|
85ef861cab | ||
|
|
3bc24bc4a7 | ||
|
|
26eeb022bb | ||
|
|
4c41982d9c | ||
|
|
88c2885cb6 | ||
|
|
e0ffae411d | ||
|
|
693b57c949 | ||
|
|
10dd81f473 | ||
|
|
2ee28c0988 | ||
|
|
533abbd6e3 | ||
|
|
33e25d2876 | ||
|
|
7d4adac1fc | ||
|
|
0f94336a9e | ||
|
|
36feb886ee | ||
|
|
e54fc76f8e | ||
|
|
8be0d4882e | ||
|
|
0905d04801 | ||
|
|
e7517acff9 |
6
.babelrc
6
.babelrc
@@ -10,9 +10,5 @@
|
||||
],
|
||||
"@babel/typescript"
|
||||
],
|
||||
"ignore": ["**/*.d.ts"],
|
||||
"plugins": [
|
||||
"@babel/plugin-proposal-optional-chaining",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator"
|
||||
]
|
||||
"ignore": ["**/*.d.ts"]
|
||||
}
|
||||
|
||||
5
.changeset/cuddly-camels-relax.md
Normal file
5
.changeset/cuddly-camels-relax.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/middleware': patch
|
||||
---
|
||||
|
||||
fix(middleware): custom favicon
|
||||
10
.changeset/dirty-dolphins-try.md
Normal file
10
.changeset/dirty-dolphins-try.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
'@verdaccio/ui-components': minor
|
||||
'@verdaccio/ui-theme': patch
|
||||
'@verdaccio/types': patch
|
||||
'@verdaccio/middleware': patch
|
||||
'@verdaccio/config': patch
|
||||
'@verdaccio/cli': patch
|
||||
---
|
||||
|
||||
feat: complete overhaul of web user interface
|
||||
6
.changeset/dirty-islands-push.md
Normal file
6
.changeset/dirty-islands-push.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/ui-components': patch
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
chore: fix type for country flags
|
||||
5
.changeset/dry-mirrors-roll.md
Normal file
5
.changeset/dry-mirrors-roll.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-theme': patch
|
||||
---
|
||||
|
||||
fix: enable irish language on ui
|
||||
5
.changeset/fluffy-onions-act.md
Normal file
5
.changeset/fluffy-onions-act.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/middleware': patch
|
||||
---
|
||||
|
||||
fix(middleware): link to favicon in template
|
||||
5
.changeset/good-lions-rush.md
Normal file
5
.changeset/good-lions-rush.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-components': patch
|
||||
---
|
||||
|
||||
chore: sync dependency defs between ui-components and ui-theme
|
||||
5
.changeset/many-bees-tickle.md
Normal file
5
.changeset/many-bees-tickle.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'verdaccio-audit': minor
|
||||
---
|
||||
|
||||
feat: verdaccio-audit support timeout option
|
||||
6
.changeset/mighty-gorillas-fail.md
Normal file
6
.changeset/mighty-gorillas-fail.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/middleware': patch
|
||||
'@verdaccio/url': patch
|
||||
---
|
||||
|
||||
fix(middleware): link to favicon in template
|
||||
5
.changeset/moody-mugs-pay.md
Normal file
5
.changeset/moody-mugs-pay.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/config': patch
|
||||
---
|
||||
|
||||
chore: improve debug code and refactor code
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"mode": "pre",
|
||||
"tag": "next-7",
|
||||
"tag": "next-8",
|
||||
"initialVersions": {
|
||||
"@verdaccio/test-cli-commons": "1.1.0",
|
||||
"@verdaccio/e2e-cli-npm6": "1.0.1",
|
||||
@@ -66,15 +66,24 @@
|
||||
"breezy-mayflies-pull",
|
||||
"chilled-carrots-guess",
|
||||
"chilly-rivers-chew",
|
||||
"cuddly-camels-relax",
|
||||
"dirty-dolphins-try",
|
||||
"dirty-islands-push",
|
||||
"dry-mirrors-roll",
|
||||
"dry-shoes-report",
|
||||
"eight-icons-heal",
|
||||
"eight-squids-judge",
|
||||
"eighty-lobsters-study",
|
||||
"fluffy-onions-act",
|
||||
"good-cups-train",
|
||||
"good-lions-rush",
|
||||
"grumpy-pots-watch",
|
||||
"itchy-mangos-wink",
|
||||
"long-jars-collect",
|
||||
"long-moles-attend",
|
||||
"many-bees-tickle",
|
||||
"mighty-gorillas-fail",
|
||||
"moody-mugs-pay",
|
||||
"nervous-fireants-design",
|
||||
"old-turkeys-heal",
|
||||
"olive-bananas-wink",
|
||||
@@ -94,6 +103,10 @@
|
||||
"spicy-birds-flow",
|
||||
"strange-points-repair",
|
||||
"stupid-dancers-relate",
|
||||
"swift-rabbits-vanish",
|
||||
"ten-kids-tan",
|
||||
"thick-avocados-provide",
|
||||
"thin-snails-flow",
|
||||
"thirty-toes-swim",
|
||||
"twenty-queens-protect",
|
||||
"unlucky-cycles-sparkle",
|
||||
@@ -102,6 +115,7 @@
|
||||
"wicked-kiwis-check",
|
||||
"wicked-worms-wash",
|
||||
"wild-otters-talk",
|
||||
"witty-meals-nail",
|
||||
"young-donuts-own"
|
||||
]
|
||||
}
|
||||
|
||||
5
.changeset/swift-rabbits-vanish.md
Normal file
5
.changeset/swift-rabbits-vanish.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/config': patch
|
||||
---
|
||||
|
||||
fix(config): test runs on Windows
|
||||
5
.changeset/ten-kids-tan.md
Normal file
5
.changeset/ten-kids-tan.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/ui-components': patch
|
||||
---
|
||||
|
||||
chore(ui): update babel dependencies
|
||||
13
.changeset/thick-avocados-provide.md
Normal file
13
.changeset/thick-avocados-provide.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
'@verdaccio/local-storage': patch
|
||||
'@verdaccio/server': patch
|
||||
'@verdaccio/core': patch
|
||||
'@verdaccio/node-api': patch
|
||||
'@verdaccio/loaders': patch
|
||||
'@verdaccio/store': patch
|
||||
'@verdaccio/auth': patch
|
||||
'@verdaccio/cli': patch
|
||||
'@verdaccio/web': patch
|
||||
---
|
||||
|
||||
chore: improve startup logging
|
||||
6
.changeset/thin-snails-flow.md
Normal file
6
.changeset/thin-snails-flow.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@verdaccio/config': patch
|
||||
'@verdaccio/website': patch
|
||||
---
|
||||
|
||||
fix: typo in config docs regarding check_owners
|
||||
5
.changeset/witty-meals-nail.md
Normal file
5
.changeset/witty-meals-nail.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@verdaccio/api': patch
|
||||
---
|
||||
|
||||
chore(api): update comment about route parameters
|
||||
@@ -22,7 +22,6 @@ jest
|
||||
docs
|
||||
contrib
|
||||
docker-examples
|
||||
website
|
||||
systemd
|
||||
|
||||
# output from test runs and similar things
|
||||
|
||||
@@ -18,21 +18,23 @@ jobs:
|
||||
env:
|
||||
NODE_ENV: production
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm@latest-8 -g
|
||||
run: |
|
||||
corepack enable
|
||||
corepack install
|
||||
- name: set store
|
||||
run: |
|
||||
mkdir ~/.pnpm-store
|
||||
pnpm config set store-dir ~/.pnpm-store
|
||||
- name: Install
|
||||
run: pnpm install --registry http://localhost:4873
|
||||
run: pnpm install --registry http://localhost:4873
|
||||
- name: Cache .pnpm-store
|
||||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -43,14 +45,14 @@ jobs:
|
||||
name: Lint
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 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@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -67,14 +69,14 @@ jobs:
|
||||
name: Format
|
||||
needs: prepare
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 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@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -96,14 +98,14 @@ jobs:
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 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@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
@@ -122,13 +124,13 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
name: UI Test E2E
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 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@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
4
.github/disabled/docker-plugins-e2e.yml
vendored
4
.github/disabled/docker-plugins-e2e.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Start containers
|
||||
run: docker-compose -f "./e2e/docker/docker-build-install-plugin/docker-compose.yaml" up -d --build
|
||||
run: docker compose -f "./e2e/docker/docker-build-install-plugin/docker-compose.yaml" up -d --build
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
@@ -36,4 +36,4 @@ jobs:
|
||||
|
||||
- name: Stop containers
|
||||
if: always()
|
||||
run: docker-compose -f "./e2e/docker/docker-build-install-plugin/docker-compose.yaml" down
|
||||
run: docker compose -f "./e2e/docker/docker-build-install-plugin/docker-compose.yaml" down
|
||||
|
||||
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@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
env:
|
||||
|
||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- name: Install pnpm
|
||||
@@ -141,7 +141,7 @@ jobs:
|
||||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio') || github.event_name == 'workflow_dispatch'
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
|
||||
10
.github/workflows/codeql-analysis.yml
vendored
10
.github/workflows/codeql-analysis.yml
vendored
@@ -11,6 +11,10 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: code-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
permissions:
|
||||
@@ -34,7 +38,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v2
|
||||
uses: github/codeql-action/init@be8b74c09c1778bcdbea38e1a45efea2cb73e18c # v2
|
||||
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
@@ -42,7 +46,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@f079b8493333aace61c81488f8bd40919487bd9f # v2
|
||||
uses: github/codeql-action/autobuild@be8b74c09c1778bcdbea38e1a45efea2cb73e18c # v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -56,4 +60,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v2
|
||||
uses: github/codeql-action/analyze@be8b74c09c1778bcdbea38e1a45efea2cb73e18c # v2
|
||||
|
||||
12
.github/workflows/docker-proxy-apache-e2e.yml
vendored
12
.github/workflows/docker-proxy-apache-e2e.yml
vendored
@@ -1,5 +1,9 @@
|
||||
name: E2E Docker Proxy Apache Test
|
||||
|
||||
concurrency:
|
||||
group: docker-apache-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
@@ -11,7 +15,7 @@ on:
|
||||
jobs:
|
||||
docker:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
@@ -19,10 +23,10 @@ jobs:
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
|
||||
- name: Start containers
|
||||
run: docker-compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" up -d --build
|
||||
run: docker compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" up -d --build
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: npm setup
|
||||
@@ -42,4 +46,4 @@ jobs:
|
||||
|
||||
- name: Stop containers
|
||||
if: always()
|
||||
run: docker-compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" down
|
||||
run: docker compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" down
|
||||
|
||||
13
.github/workflows/docker-proxy-nginx-e2e.yml
vendored
13
.github/workflows/docker-proxy-nginx-e2e.yml
vendored
@@ -1,5 +1,10 @@
|
||||
name: E2E Docker Proxy Nginx Test
|
||||
|
||||
concurrency:
|
||||
group: docker-nginx-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
@@ -8,7 +13,7 @@ on:
|
||||
jobs:
|
||||
docker:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
@@ -16,10 +21,10 @@ jobs:
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
|
||||
- name: Start containers
|
||||
run: docker-compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" up -d --build
|
||||
run: docker compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" up -d --build
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: npm setup
|
||||
@@ -39,4 +44,4 @@ jobs:
|
||||
|
||||
- name: Stop containers
|
||||
if: always()
|
||||
run: docker-compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" down
|
||||
run: docker compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" down
|
||||
|
||||
4
.github/workflows/docker-publish.yml
vendored
4
.github/workflows/docker-publish.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
if: github.repository == 'verdaccio/verdaccio'
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # tag=v1
|
||||
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # tag=v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
driver-opts: network=host
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
{{major}}
|
||||
{{major}}.{{minor}}
|
||||
- name: Build & Push
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
|
||||
10
.github/workflows/e2e-ci.yml
vendored
10
.github/workflows/e2e-ci.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node 16
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: Install pnpm
|
||||
@@ -142,7 +142,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: Install pnpm
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: Install pnpm
|
||||
|
||||
4
.github/workflows/e2e-ui.yml
vendored
4
.github/workflows/e2e-ui.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
run: pnpm build
|
||||
- name: Test UI
|
||||
run: pnpm test:e2e:ui
|
||||
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v3
|
||||
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
|
||||
with:
|
||||
name: videos
|
||||
path: /home/runner/work/verdaccio/verdaccio/e2e/ui/cypress/videos
|
||||
|
||||
52
.github/workflows/plugin-generator-e2e.yaml
vendored
Normal file
52
.github/workflows/plugin-generator-e2e.yaml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: E2E Generator Verdaccio Plugin
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
concurrency:
|
||||
group: generator-plugin-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
e2e-plugin-generator:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18,20, 21]
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install pnpm
|
||||
run: |
|
||||
corepack enable
|
||||
corepack install
|
||||
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: install
|
||||
run: pnpm install
|
||||
- name: build
|
||||
run: pnpm build
|
||||
- name: install verdaccio
|
||||
run: npm install -g verdaccio@5
|
||||
- name: Start server
|
||||
run: verdaccio -c e2e/docker/generator-e2e/generator.yaml &
|
||||
- name: ping server
|
||||
run: curl http://localhost:4873/-/ping
|
||||
- name: login
|
||||
run: npx npm-cli-login -u test -p test -e test@domain.test -r http://localhost:4873
|
||||
- name: publish
|
||||
run: pnpm local:publish
|
||||
- name: install yeoman
|
||||
run: npm install -g yo@4 --loglevel=info
|
||||
- name: install generator
|
||||
run: npm install -g generator-verdaccio-plugin --loglevel=info --registry http://localhost:4873
|
||||
# Future: add a test to verify the plugin is working with prompt
|
||||
2
.github/workflows/static-data.yml
vendored
2
.github/workflows/static-data.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- name: install pnpm
|
||||
|
||||
2
.github/workflows/ui-components.yml
vendored
2
.github/workflows/ui-components.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
|
||||
- name: Use Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
|
||||
14
.github/workflows/website.yml
vendored
14
.github/workflows/website.yml
vendored
@@ -6,6 +6,10 @@ on:
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
concurrency:
|
||||
group: website-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
@@ -22,14 +26,14 @@ jobs:
|
||||
ports:
|
||||
- 4873:4873
|
||||
env:
|
||||
NODE_ENV: production
|
||||
NODE_ENV: production
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
steps:
|
||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
||||
|
||||
- name: Node
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- name: Install pnpm
|
||||
@@ -48,8 +52,8 @@ jobs:
|
||||
path: ~/.pnpm-store
|
||||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
pnpm-
|
||||
- name: Build
|
||||
pnpm-
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
- name: Build Translations percentage
|
||||
run: pnpm --filter @verdaccio/crowdin-translations build
|
||||
@@ -71,5 +75,5 @@ jobs:
|
||||
env:
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
run: pnpm --filter ...@verdaccio/website netlify:deploy
|
||||
run: pnpm --filter ...@verdaccio/website netlify:deploy
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:21-alpine as builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:21-alpine AS builder
|
||||
|
||||
ENV NODE_ENV=development \
|
||||
VERDACCIO_BUILD_REGISTRY=https://registry.npmjs.org
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Docs based on https://github.com/xlts-dev/verdaccio-prometheus-middleware#installation
|
||||
# Docker multi-stage build - https://docs.docker.com/develop/develop-images/multistage-build/
|
||||
# Use an alpine node image to install the plugin
|
||||
FROM node:lts-alpine as builder
|
||||
FROM node:lts-alpine AS builder
|
||||
|
||||
RUN mkdir -p /verdaccio/plugins
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Docker multi-stage build - https://docs.docker.com/develop/develop-images/multistage-build/
|
||||
# Use an alpine node image to install the plugin
|
||||
FROM node:lts-alpine as builder
|
||||
FROM node:lts-alpine AS builder
|
||||
|
||||
# Install the metrics middleware plugin
|
||||
# npm docs
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Docs based on https://github.com/xlts-dev/verdaccio-prometheus-middleware#installation
|
||||
# Docker multi-stage build - https://docs.docker.com/develop/develop-images/multistage-build/
|
||||
# Use an alpine node image to install the plugin
|
||||
FROM node:lts-alpine as builder
|
||||
FROM node:lts-alpine AS builder
|
||||
|
||||
RUN mkdir -p /verdaccio/plugins
|
||||
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
"devDependencies": {
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.4",
|
||||
"debug": "4.3.4",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.5",
|
||||
"debug": "4.3.6",
|
||||
"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:7.0.0-next-7.17"
|
||||
"verdaccio": "workspace:7.0.0-next-8.21"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0",
|
||||
"npm": "10.5.0"
|
||||
"npm": "10.8.2"
|
||||
},
|
||||
"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.1"
|
||||
"@yarnpkg/cli-dist": "3.8.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "@verdaccio/e2e-cli-yarn4",
|
||||
"version": "1.0.1",
|
||||
"dependencies": {
|
||||
"@yarnpkg/cli-dist": "4.1.1",
|
||||
"@yarnpkg/cli-dist": "4.4.0",
|
||||
"@verdaccio/test-cli-commons": "workspace:1.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
43
e2e/docker/generator-e2e/generator.yaml
Normal file
43
e2e/docker/generator-e2e/generator.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
storage: ./storage
|
||||
|
||||
web:
|
||||
title: Verdaccio E2E Local
|
||||
auth:
|
||||
htpasswd:
|
||||
file: ./htpasswd
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
packages:
|
||||
'@verdaccio/*':
|
||||
access: $all
|
||||
publish: $all
|
||||
unpublish: $all
|
||||
'@*/*':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
proxy: npmjs
|
||||
'verdaccio-*':
|
||||
access: $all
|
||||
publish: $all
|
||||
unpublish: $all
|
||||
'generator-verdaccio-plugin':
|
||||
access: $all
|
||||
publish: $all
|
||||
unpublish: $all
|
||||
'verdaccio':
|
||||
access: $all
|
||||
publish: $all
|
||||
unpublish: $all
|
||||
'**':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
proxy: npmjs
|
||||
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: false
|
||||
|
||||
log: { type: stdout, format: json, level: http }
|
||||
@@ -3,11 +3,11 @@
|
||||
"name": "@verdaccio/e2e-ui",
|
||||
"version": "2.0.0",
|
||||
"devDependencies": {
|
||||
"verdaccio": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.17",
|
||||
"verdaccio": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/test-helper": "workspace:3.0.0-next-7.2",
|
||||
"debug": "4.3.4",
|
||||
"debug": "4.3.6",
|
||||
"cypress": "^13.6.0",
|
||||
"get-port": "5.1.1"
|
||||
},
|
||||
|
||||
124
package.json
124
package.json
@@ -15,92 +15,90 @@
|
||||
"url": "https://opencollective.com/verdaccio"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.23.9",
|
||||
"@babel/core": "7.23.9",
|
||||
"@babel/eslint-parser": "7.23.3",
|
||||
"@babel/node": "7.23.9",
|
||||
"@babel/plugin-proposal-class-properties": "7.18.6",
|
||||
"@babel/plugin-proposal-decorators": "7.23.9",
|
||||
"@babel/plugin-proposal-export-namespace-from": "7.18.9",
|
||||
"@babel/plugin-proposal-function-sent": "7.23.3",
|
||||
"@babel/plugin-proposal-json-strings": "7.18.6",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
|
||||
"@babel/plugin-proposal-numeric-separator": "7.18.6",
|
||||
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
|
||||
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
||||
"@babel/plugin-proposal-throw-expressions": "7.23.3",
|
||||
"@babel/cli": "7.24.8",
|
||||
"@babel/core": "7.24.9",
|
||||
"@babel/eslint-parser": "7.25.1",
|
||||
"@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/plugin-syntax-dynamic-import": "7.8.3",
|
||||
"@babel/plugin-syntax-import-meta": "7.10.4",
|
||||
"@babel/plugin-transform-async-to-generator": "7.23.3",
|
||||
"@babel/plugin-transform-classes": "7.23.8",
|
||||
"@babel/plugin-transform-runtime": "7.23.9",
|
||||
"@babel/preset-env": "7.23.9",
|
||||
"@babel/preset-react": "7.23.3",
|
||||
"@babel/preset-typescript": "7.23.3",
|
||||
"@babel/register": "7.23.7",
|
||||
"@babel/runtime": "7.23.9",
|
||||
"@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/preset-typescript": "7.24.7",
|
||||
"@babel/register": "7.24.6",
|
||||
"@babel/runtime": "7.25.0",
|
||||
"@changesets/changelog-github": "0.5.0",
|
||||
"@changesets/cli": "2.27.1",
|
||||
"@changesets/get-dependents-graph": "1.3.6",
|
||||
"@crowdin/cli": "3.16.1",
|
||||
"@changesets/cli": "2.27.7",
|
||||
"@changesets/get-dependents-graph": "2.1.1",
|
||||
"@crowdin/cli": "4.1.1",
|
||||
"@dianmora/contributors": "5.0.0",
|
||||
"@emotion/react": "11.10.6",
|
||||
"@emotion/styled": "11.10.6",
|
||||
"@testing-library/dom": "9.3.4",
|
||||
"@testing-library/jest-dom": "6.4.2",
|
||||
"@testing-library/dom": "10.4.0",
|
||||
"@testing-library/jest-dom": "6.4.8",
|
||||
"@testing-library/react": "16.0.0",
|
||||
"@testing-library/user-event": "14.5.2",
|
||||
"aria-query": "5.1.3",
|
||||
"@testing-library/react": "14.2.1",
|
||||
"@trivago/prettier-plugin-sort-imports": "4.3.0",
|
||||
"@types/body-parser": "1.19.5",
|
||||
"@types/connect": "3.4.38",
|
||||
"@types/cookiejar": "2.1.5",
|
||||
"@types/debug": "4.1.12",
|
||||
"@types/express": "4.17.21",
|
||||
"@types/express-serve-static-core": "4.17.42",
|
||||
"@types/express-serve-static-core": "4.19.5",
|
||||
"@types/http-errors": "2.0.4",
|
||||
"@types/jest": "29.5.11",
|
||||
"@types/jsonwebtoken": "9.0.5",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/jsonwebtoken": "9.0.6",
|
||||
"@types/lodash": "4.17.7",
|
||||
"@types/mime": "3.0.4",
|
||||
"@types/minimatch": "5.1.2",
|
||||
"@types/node": "20.14.12",
|
||||
"@types/node-fetch": "2.6.11",
|
||||
"@types/qs": "6.9.15",
|
||||
"@types/range-parser": "1.2.7",
|
||||
"@types/react": "18.3.3",
|
||||
"@types/react-dom": "18.3.0",
|
||||
"@types/react-router-dom": "5.3.3",
|
||||
"@types/react-virtualized": "9.21.30",
|
||||
"@types/semver": "7.5.8",
|
||||
"@types/send": "0.17.4",
|
||||
"@types/serve-static": "1.15.7",
|
||||
"@types/superagent": "4.1.24",
|
||||
"@types/supertest": "2.0.16",
|
||||
"@types/validator": "13.12.0",
|
||||
"@types/webpack": "5.28.5",
|
||||
"@types/webpack-env": "1.18.5",
|
||||
"@types/yeoman-environment": "2.10.11",
|
||||
"@types/yeoman-generator": "5.2.14",
|
||||
"@types/yeoman-test": "4.0.6",
|
||||
"@types/lodash": "4.14.202",
|
||||
"@types/mime": "3.0.4",
|
||||
"@types/minimatch": "5.1.2",
|
||||
"@types/node": "20.11.7",
|
||||
"@types/node-fetch": "2.6.11",
|
||||
"@types/qs": "6.9.11",
|
||||
"@types/range-parser": "1.2.7",
|
||||
"@types/react": "18.2.48",
|
||||
"@types/react-dom": "18.2.18",
|
||||
"@types/react-router-dom": "5.3.3",
|
||||
"@types/react-virtualized": "9.21.29",
|
||||
"@types/redux": "3.6.0",
|
||||
"@types/semver": "7.5.6",
|
||||
"@types/send": "0.17.4",
|
||||
"@types/serve-static": "1.15.5",
|
||||
"@types/superagent": "4.1.24",
|
||||
"@types/supertest": "2.0.16",
|
||||
"@types/testing-library__jest-dom": "6.0.0",
|
||||
"@types/validator": "13.11.8",
|
||||
"@types/webpack": "5.28.5",
|
||||
"@types/webpack-env": "1.18.4",
|
||||
"@typescript-eslint/eslint-plugin": "6.19.1",
|
||||
"@typescript-eslint/parser": "6.19.1",
|
||||
"@typescript-eslint/eslint-plugin": "6.21.0",
|
||||
"@typescript-eslint/parser": "6.21.0",
|
||||
"@verdaccio/crowdin-translations": "workspace:*",
|
||||
"@verdaccio/eslint-config": "workspace:*",
|
||||
"@verdaccio/types": "workspace:*",
|
||||
"@verdaccio/ui-theme": "workspace:*",
|
||||
"@vitest/coverage-v8": "0.34.6",
|
||||
"@vitest/coverage-v8": "2.0.5",
|
||||
"aria-query": "5.1.3",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-jest": "29.7.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.4",
|
||||
"debug": "4.3.6",
|
||||
"detect-secrets": "1.0.6",
|
||||
"eslint": "8.56.0",
|
||||
"eslint": "8.57.0",
|
||||
"fs-extra": "11.2.0",
|
||||
"got": "11.8.6",
|
||||
"husky": "8.0.3",
|
||||
@@ -116,21 +114,21 @@
|
||||
"nock": "13.5.1",
|
||||
"nodemon": "3.0.3",
|
||||
"npm-run-all2": "5.0.2",
|
||||
"prettier": "3.2.2",
|
||||
"prettier": "3.3.3",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"rimraf": "5.0.5",
|
||||
"rimraf": "5.0.10",
|
||||
"selfsigned": "2.4.1",
|
||||
"supertest": "6.3.4",
|
||||
"supertest": "7.0.0",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.3.3",
|
||||
"undici-types": "5.28.2",
|
||||
"update-ts-references": "3.2.1",
|
||||
"update-ts-references": "3.3.0",
|
||||
"verdaccio-audit": "workspace:*",
|
||||
"verdaccio-auth-memory": "workspace:*",
|
||||
"verdaccio-htpasswd": "workspace:*",
|
||||
"verdaccio-memory": "workspace:*",
|
||||
"vitest": "1.6.0"
|
||||
"vitest": "2.0.4"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "husky install",
|
||||
|
||||
@@ -1,5 +1,62 @@
|
||||
# @verdaccio/api
|
||||
|
||||
## 7.0.0-next-8.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8c10a3e]
|
||||
- Updated dependencies [a05a7d8]
|
||||
- Updated dependencies [7c9f3cf]
|
||||
- @verdaccio/config@7.0.0-next-8.21
|
||||
- @verdaccio/core@7.0.0-next-8.21
|
||||
- @verdaccio/store@7.0.0-next-8.21
|
||||
- @verdaccio/auth@7.0.0-next-8.21
|
||||
- @verdaccio/middleware@7.0.0-next-8.21
|
||||
- @verdaccio/utils@7.0.0-next-8.21
|
||||
- @verdaccio/logger@7.0.0-next-8.21
|
||||
|
||||
## 7.0.0-next-7.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ccc7bd1]
|
||||
- @verdaccio/middleware@7.0.0-next-7.20
|
||||
- @verdaccio/auth@7.0.0-next-7.20
|
||||
- @verdaccio/store@7.0.0-next-7.20
|
||||
- @verdaccio/core@7.0.0-next-7.20
|
||||
- @verdaccio/config@7.0.0-next-7.20
|
||||
- @verdaccio/utils@7.0.0-next-7.20
|
||||
- @verdaccio/logger@7.0.0-next-7.20
|
||||
|
||||
## 7.0.0-next-7.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 19df355: chore(api): update comment about route parameters
|
||||
- Updated dependencies [2a6ee33]
|
||||
- Updated dependencies [6c5f7a4]
|
||||
- Updated dependencies [c31aec8]
|
||||
- @verdaccio/middleware@7.0.0-next-7.19
|
||||
- @verdaccio/config@7.0.0-next-7.19
|
||||
- @verdaccio/auth@7.0.0-next-7.19
|
||||
- @verdaccio/store@7.0.0-next-7.19
|
||||
- @verdaccio/core@7.0.0-next-7.19
|
||||
- @verdaccio/utils@7.0.0-next-7.19
|
||||
- @verdaccio/logger@7.0.0-next-7.19
|
||||
|
||||
## 7.0.0-next-7.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [10dd81f]
|
||||
- @verdaccio/middleware@7.0.0-next-7.18
|
||||
- @verdaccio/config@7.0.0-next-7.18
|
||||
- @verdaccio/auth@7.0.0-next-7.18
|
||||
- @verdaccio/core@7.0.0-next-7.18
|
||||
- @verdaccio/logger@7.0.0-next-7.18
|
||||
- @verdaccio/store@7.0.0-next-7.18
|
||||
- @verdaccio/utils@7.0.0-next-7.18
|
||||
|
||||
## 7.0.0-next-7.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {});
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/api",
|
||||
"version": "7.0.0-next-7.17",
|
||||
"version": "7.0.0-next-8.21",
|
||||
"description": "loaders logic",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
"test": "jest",
|
||||
"test": "vitest run",
|
||||
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
||||
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
|
||||
"build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||
@@ -38,28 +38,28 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/store": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/auth": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/store": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-8.21",
|
||||
"abortcontroller-polyfill": "1.7.5",
|
||||
"body-parser": "1.20.2",
|
||||
"cookies": "0.9.0",
|
||||
"debug": "4.3.4",
|
||||
"debug": "4.3.6",
|
||||
"express": "4.19.2",
|
||||
"lodash": "4.17.21",
|
||||
"mime": "2.6.0",
|
||||
"semver": "7.6.2"
|
||||
"semver": "7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/test-helper": "workspace:3.0.0-next-7.2",
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.4",
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.5",
|
||||
"mockdate": "3.0.5",
|
||||
"nock": "13.5.1",
|
||||
"supertest": "6.3.4"
|
||||
"supertest": "7.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
||||
@@ -37,10 +37,11 @@ export default function (config: Config, auth: Auth, storage: Storage): Router {
|
||||
app.param('revision', validateName);
|
||||
app.param('token', validateName);
|
||||
|
||||
// these can't be safely put into express url for some reason
|
||||
// TODO: For some reason? what reason?
|
||||
// Express route parameter names must be valid JavaScript identifiers, which means
|
||||
// they cannot start with a hyphen (-) or contain special characters like dots (.)
|
||||
app.param('_rev', match(/^-rev$/));
|
||||
app.param('org_couchdb_user', match(/^org\.couchdb\.user:/));
|
||||
|
||||
app.use(auth.apiJWTmiddleware());
|
||||
app.use(express.json({ strict: false, limit: config.max_body_size || '10mb' }));
|
||||
app.use(antiLoop(config));
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Application } from 'express';
|
||||
import _ from 'lodash';
|
||||
import path from 'path';
|
||||
import supertest from 'supertest';
|
||||
import { expect } from 'vitest';
|
||||
|
||||
import { parseConfigFile } from '@verdaccio/config';
|
||||
import { HEADERS, HEADER_TYPE, HTTP_STATUS, TOKEN_BEARER } from '@verdaccio/core';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import supertest from 'supertest';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
import { API_MESSAGE, HEADERS, HEADER_TYPE, HTTP_STATUS } from '@verdaccio/core';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* eslint-disable jest/no-commented-out-tests */
|
||||
import nock from 'nock';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { HTTP_STATUS } from '@verdaccio/core';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import supertest from 'supertest';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
import { DIST_TAGS, HEADERS, HEADER_TYPE, HTTP_STATUS } from '@verdaccio/core';
|
||||
import { Storage } from '@verdaccio/store';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import supertest from 'supertest';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { HEADERS, HEADER_TYPE, HTTP_STATUS } from '@verdaccio/core';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import supertest from 'supertest';
|
||||
import { describe, test } from 'vitest';
|
||||
|
||||
import { HEADERS, HEADER_TYPE, HTTP_STATUS, TOKEN_BEARER } from '@verdaccio/core';
|
||||
import { buildToken } from '@verdaccio/utils';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import nock from 'nock';
|
||||
import { basename } from 'path';
|
||||
import supertest from 'supertest';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { HTTP_STATUS } from '@verdaccio/core';
|
||||
import { API_ERROR, API_MESSAGE, HEADERS, HEADER_TYPE } from '@verdaccio/core';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import MockDate from 'mockdate';
|
||||
import supertest from 'supertest';
|
||||
import { beforeEach, describe, expect, test } from 'vitest';
|
||||
|
||||
import { HEADERS, HEADER_TYPE, HTTP_STATUS } from '@verdaccio/core';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import nock from 'nock';
|
||||
import supertest from 'supertest';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { HTTP_STATUS } from '@verdaccio/core';
|
||||
import { HEADERS, HEADER_TYPE } from '@verdaccio/core';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
import supertest from 'supertest';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import {
|
||||
API_ERROR,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import supertest from 'supertest';
|
||||
import { describe, expect, test, vi } from 'vitest';
|
||||
|
||||
import { API_ERROR, HEADERS, HEADER_TYPE, HTTP_STATUS, TOKEN_BEARER } from '@verdaccio/core';
|
||||
import { buildToken } from '@verdaccio/utils';
|
||||
@@ -7,7 +8,7 @@ import { createUser, getPackage, initializeServer } from './_helper';
|
||||
|
||||
const FORBIDDEN_VUE = 'authorization required to access package vue';
|
||||
|
||||
jest.setTimeout(20000);
|
||||
vi.setConfig({ testTimeout: 20000 });
|
||||
|
||||
describe('token', () => {
|
||||
describe('basics', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import supertest from 'supertest';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { HEADERS, HTTP_STATUS, TOKEN_BEARER } from '@verdaccio/core';
|
||||
import { buildToken } from '@verdaccio/utils';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// ensure that all arguments are validated
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
/**
|
||||
* Validate.
|
||||
|
||||
@@ -1,5 +1,59 @@
|
||||
# @verdaccio/auth
|
||||
|
||||
## 7.0.0-next-8.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7c9f3cf: chore: improve startup logging
|
||||
- Updated dependencies [8c10a3e]
|
||||
- Updated dependencies [a05a7d8]
|
||||
- Updated dependencies [7c9f3cf]
|
||||
- @verdaccio/config@7.0.0-next-8.21
|
||||
- @verdaccio/core@7.0.0-next-8.21
|
||||
- @verdaccio/loaders@7.0.0-next-8.21
|
||||
- verdaccio-htpasswd@12.0.0-next-8.21
|
||||
- @verdaccio/signature@7.0.0-next-7.5
|
||||
- @verdaccio/utils@7.0.0-next-8.21
|
||||
- @verdaccio/logger@7.0.0-next-8.21
|
||||
|
||||
## 7.0.0-next-7.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.20
|
||||
- @verdaccio/config@7.0.0-next-7.20
|
||||
- @verdaccio/loaders@7.0.0-next-7.20
|
||||
- verdaccio-htpasswd@12.0.0-next-7.20
|
||||
- @verdaccio/utils@7.0.0-next-7.20
|
||||
- @verdaccio/signature@7.0.0-next-7.5
|
||||
- @verdaccio/logger@7.0.0-next-7.20
|
||||
|
||||
## 7.0.0-next-7.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c31aec8]
|
||||
- @verdaccio/config@7.0.0-next-7.19
|
||||
- @verdaccio/loaders@7.0.0-next-7.19
|
||||
- verdaccio-htpasswd@12.0.0-next-7.19
|
||||
- @verdaccio/signature@7.0.0-next-7.5
|
||||
- @verdaccio/core@7.0.0-next-7.19
|
||||
- @verdaccio/utils@7.0.0-next-7.19
|
||||
- @verdaccio/logger@7.0.0-next-7.19
|
||||
|
||||
## 7.0.0-next-7.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [10dd81f]
|
||||
- @verdaccio/config@7.0.0-next-7.18
|
||||
- @verdaccio/core@7.0.0-next-7.18
|
||||
- @verdaccio/loaders@7.0.0-next-7.18
|
||||
- @verdaccio/logger@7.0.0-next-7.18
|
||||
- verdaccio-htpasswd@12.0.0-next-7.18
|
||||
- @verdaccio/signature@7.0.0-next-7.5
|
||||
- @verdaccio/utils@7.0.0-next-7.18
|
||||
|
||||
## 7.0.0-next-7.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/auth",
|
||||
"version": "7.0.0-next-7.17",
|
||||
"version": "7.0.0-next-8.21",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
@@ -38,21 +38,21 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/loaders": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/loaders": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/signature": "workspace:7.0.0-next-7.5",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.17",
|
||||
"debug": "4.3.4",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-8.21",
|
||||
"debug": "4.3.6",
|
||||
"lodash": "4.17.21",
|
||||
"verdaccio-htpasswd": "workspace:12.0.0-next-7.17"
|
||||
"verdaccio-htpasswd": "workspace:12.0.0-next-8.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.5",
|
||||
"express": "4.19.2",
|
||||
"supertest": "6.3.4",
|
||||
"@verdaccio/middleware": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.4"
|
||||
"supertest": "7.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
||||
@@ -5,6 +5,7 @@ import { HTPasswd } from 'verdaccio-htpasswd';
|
||||
import { createAnonymousRemoteUser, createRemoteUser } from '@verdaccio/config';
|
||||
import {
|
||||
API_ERROR,
|
||||
PLUGIN_CATEGORY,
|
||||
SUPPORT_ERRORS,
|
||||
TOKEN_BASIC,
|
||||
TOKEN_BEARER,
|
||||
@@ -116,7 +117,8 @@ class Auth implements IAuthMiddleware, TokenEncryption, pluginUtils.IBasicAuth {
|
||||
typeof allow_publish !== 'undefined'
|
||||
);
|
||||
},
|
||||
this.config?.serverSettings?.pluginPrefix
|
||||
this.config?.serverSettings?.pluginPrefix,
|
||||
PLUGIN_CATEGORY.AUTHENTICATION
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,48 @@
|
||||
# @verdaccio/cli
|
||||
|
||||
## 7.0.0-next-8.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7c9f3cf: chore: improve startup logging
|
||||
- Updated dependencies [8c10a3e]
|
||||
- Updated dependencies [a05a7d8]
|
||||
- Updated dependencies [7c9f3cf]
|
||||
- @verdaccio/config@7.0.0-next-8.21
|
||||
- @verdaccio/core@7.0.0-next-8.21
|
||||
- @verdaccio/node-api@7.0.0-next-8.21
|
||||
- @verdaccio/logger@7.0.0-next-8.21
|
||||
|
||||
## 7.0.0-next-7.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/node-api@7.0.0-next-7.20
|
||||
- @verdaccio/core@7.0.0-next-7.20
|
||||
- @verdaccio/config@7.0.0-next-7.20
|
||||
- @verdaccio/logger@7.0.0-next-7.20
|
||||
|
||||
## 7.0.0-next-7.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c31aec8]
|
||||
- @verdaccio/config@7.0.0-next-7.19
|
||||
- @verdaccio/node-api@7.0.0-next-7.19
|
||||
- @verdaccio/core@7.0.0-next-7.19
|
||||
- @verdaccio/logger@7.0.0-next-7.19
|
||||
|
||||
## 7.0.0-next-7.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 10dd81f: feat: complete overhaul of web user interface
|
||||
- Updated dependencies [10dd81f]
|
||||
- @verdaccio/config@7.0.0-next-7.18
|
||||
- @verdaccio/core@7.0.0-next-7.18
|
||||
- @verdaccio/logger@7.0.0-next-7.18
|
||||
- @verdaccio/node-api@7.0.0-next-7.18
|
||||
|
||||
## 7.0.0-next-7.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/cli",
|
||||
"version": "7.0.0-next-7.17",
|
||||
"version": "7.0.0-next-8.21",
|
||||
"author": {
|
||||
"name": "Juan Picado",
|
||||
"email": "juanpicado19@gmail.com"
|
||||
@@ -43,14 +43,14 @@
|
||||
"start": "ts-node src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/node-api": "workspace:7.0.0-next-7.17",
|
||||
"clipanion": "3.2.1",
|
||||
"envinfo": "7.11.0",
|
||||
"@verdaccio/config": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/logger": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/node-api": "workspace:7.0.0-next-8.21",
|
||||
"clipanion": "4.0.0-rc.3",
|
||||
"envinfo": "7.13.0",
|
||||
"kleur": "4.1.5",
|
||||
"semver": "7.6.2"
|
||||
"semver": "7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ts-node": "10.9.2"
|
||||
|
||||
@@ -59,7 +59,6 @@ export class InitCommand extends Command {
|
||||
const configParsed = parseConfigFile(configPathLocation);
|
||||
this.initLogger(configParsed);
|
||||
logger.info({ file: configPathLocation }, 'using config file: @{file}');
|
||||
logger.info('log level: %s', configParsed.log?.level || 'default');
|
||||
const { web } = configParsed;
|
||||
|
||||
process.title = web?.title || DEFAULT_PROCESS_NAME;
|
||||
@@ -67,6 +66,9 @@ export class InitCommand extends Command {
|
||||
const { version, name } = require('../../package.json');
|
||||
|
||||
await initServer(configParsed, this.port as string, version, name);
|
||||
|
||||
const logLevel = configParsed.log?.level || 'default';
|
||||
logger.info({ logLevel }, 'log level: @{logLevel}');
|
||||
logger.info('server started');
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
# @verdaccio/config
|
||||
|
||||
## 7.0.0-next-8.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8c10a3e: chore: improve debug code and refactor code
|
||||
- a05a7d8: fix(config): test runs on Windows
|
||||
- Updated dependencies [7c9f3cf]
|
||||
- @verdaccio/core@7.0.0-next-8.21
|
||||
- @verdaccio/utils@7.0.0-next-8.21
|
||||
|
||||
## 7.0.0-next-7.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.20
|
||||
- @verdaccio/utils@7.0.0-next-7.20
|
||||
|
||||
## 7.0.0-next-7.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c31aec8: fix: typo in config docs regarding check_owners
|
||||
- @verdaccio/core@7.0.0-next-7.19
|
||||
- @verdaccio/utils@7.0.0-next-7.19
|
||||
|
||||
## 7.0.0-next-7.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 10dd81f: feat: complete overhaul of web user interface
|
||||
- @verdaccio/core@7.0.0-next-7.18
|
||||
- @verdaccio/utils@7.0.0-next-7.18
|
||||
|
||||
## 7.0.0-next-7.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
const config = require('../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
lines: 90,
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/config",
|
||||
"version": "7.0.0-next-7.17",
|
||||
"version": "7.0.0-next-8.21",
|
||||
"description": "logger",
|
||||
"main": "./build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
@@ -26,11 +26,11 @@
|
||||
"verdaccio"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=14"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
"test": "jest",
|
||||
"test": "vitest run",
|
||||
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
||||
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
|
||||
"build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||
@@ -38,17 +38,15 @@
|
||||
"build": "pnpm run build:js && pnpm run build:types"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.17",
|
||||
"debug": "4.3.4",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-8.21",
|
||||
"debug": "4.3.6",
|
||||
"js-yaml": "4.1.0",
|
||||
"lodash": "4.17.21",
|
||||
"minimatch": "7.4.6",
|
||||
"yup": "0.32.11"
|
||||
"minimatch": "7.4.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/minimatch": "5.1.2",
|
||||
"@types/yup": "0.32.0"
|
||||
"@types/minimatch": "5.1.2"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
||||
@@ -18,6 +18,12 @@ storage: ./storage
|
||||
# https://verdaccio.org/docs/webui
|
||||
web:
|
||||
title: Verdaccio
|
||||
# custom colors for header background and font
|
||||
# primaryColor: "#4b5e40"
|
||||
# custom logos and favicon
|
||||
# logo: ./path/to/logo.png
|
||||
# logoDark: ./path/to/logoDark.png
|
||||
# favicon: ./path/to/favicon.ico
|
||||
# comment out to disable gravatar support
|
||||
# gravatar: false
|
||||
# by default packages are ordercer ascendant (asc|desc)
|
||||
@@ -35,6 +41,7 @@ web:
|
||||
# showSearch: true
|
||||
# showRaw: true
|
||||
# showDownloadTarball: true
|
||||
# showUplinks: true
|
||||
# HTML tags injected after manifest <scripts/>
|
||||
# scriptsBodyAfter:
|
||||
# - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
|
||||
@@ -113,7 +120,7 @@ server:
|
||||
# https://verdaccio.org/docs/configuration#offline-publish
|
||||
# publish:
|
||||
# allow_offline: false
|
||||
# check_owner: false
|
||||
# check_owners: false
|
||||
|
||||
# https://verdaccio.org/docs/configuration#url-prefix
|
||||
# url_prefix: /verdaccio/
|
||||
@@ -180,6 +187,7 @@ server:
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
# timeout: 10000
|
||||
|
||||
# https://verdaccio.org/docs/logger
|
||||
# log settings
|
||||
|
||||
@@ -21,6 +21,12 @@ plugins: /verdaccio/plugins
|
||||
# https://verdaccio.org/docs/webui
|
||||
web:
|
||||
title: Verdaccio
|
||||
# custom colors for header background and font
|
||||
# primaryColor: "#4b5e40"
|
||||
# custom logos and favicon
|
||||
# logo: ./path/to/logo.png
|
||||
# logoDark: ./path/to/logoDark.png
|
||||
# favicon: ./path/to/favicon.ico
|
||||
# Comment out to disable gravatar support
|
||||
# gravatar: false
|
||||
# By default packages are ordered ascendant (asc|desc)
|
||||
@@ -38,6 +44,7 @@ web:
|
||||
# showSearch: true
|
||||
# showRaw: true
|
||||
# showDownloadTarball: true
|
||||
# showUplinks: true
|
||||
# HTML tags injected after manifest <scripts/>
|
||||
# scriptsBodyAfter:
|
||||
# - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
|
||||
@@ -119,7 +126,7 @@ server:
|
||||
# https://verdaccio.org/docs/configuration#offline-publish
|
||||
# publish:
|
||||
# allow_offline: false
|
||||
# check_owner: false
|
||||
# check_owners: false
|
||||
|
||||
# https://verdaccio.org/docs/configuration#url-prefix
|
||||
# url_prefix: /verdaccio/
|
||||
@@ -186,6 +193,7 @@ server:
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
# timeout: 10000
|
||||
|
||||
# https://verdaccio.org/docs/logger
|
||||
# log settings
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import buildDebug from 'debug';
|
||||
import fs from 'fs';
|
||||
import _ from 'lodash';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
import { CHARACTER_ENCODING } from '@verdaccio/core';
|
||||
|
||||
import { fileExists, folderExists } from './config-utils';
|
||||
|
||||
const CONFIG_FILE = 'config.yaml';
|
||||
const XDG = 'xdg';
|
||||
const WIN = 'win';
|
||||
const WIN32 = 'win32';
|
||||
// eslint-disable-next-line
|
||||
const pkgJSON = {
|
||||
name: 'verdaccio',
|
||||
@@ -18,23 +15,27 @@ const pkgJSON = {
|
||||
|
||||
export type SetupDirectory = {
|
||||
path: string;
|
||||
type: string;
|
||||
type: 'xdg' | 'win' | 'win32' | 'def' | 'old';
|
||||
};
|
||||
|
||||
const debug = buildDebug('verdaccio:config');
|
||||
const debug = buildDebug('verdaccio:config:config-path');
|
||||
|
||||
/**
|
||||
* Find and get the first config file that match.
|
||||
* @return {String} the config file path
|
||||
*/
|
||||
function findConfigFile(configPath?: string): string {
|
||||
debug('searching for config file %o', configPath);
|
||||
if (typeof configPath !== 'undefined') {
|
||||
return path.resolve(configPath);
|
||||
const configLocation = path.resolve(configPath);
|
||||
debug('custom location %s', configLocation);
|
||||
return configLocation;
|
||||
}
|
||||
|
||||
const configPaths: SetupDirectory[] = getConfigPaths();
|
||||
debug('%o posible locations found', configPaths.length);
|
||||
if (_.isEmpty(configPaths)) {
|
||||
if (configPaths.length === 0) {
|
||||
debug('no configuration files can be processed');
|
||||
// this should never happens
|
||||
throw new Error('no configuration files can be processed');
|
||||
}
|
||||
@@ -45,12 +46,12 @@ function findConfigFile(configPath?: string): string {
|
||||
);
|
||||
|
||||
if (typeof primaryConf !== 'undefined') {
|
||||
debug('previous location exist already %s', primaryConf?.path);
|
||||
debug('at least one primary location detected at %s', primaryConf?.path);
|
||||
return primaryConf.path;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
return createConfigFile(_.head(configPaths)).path;
|
||||
debug('no previous location found, creating a new one');
|
||||
debug('generating the first match path location %s', configPaths[0].path);
|
||||
return createConfigFile(configPaths[0]).path;
|
||||
}
|
||||
|
||||
function createConfigFile(configLocation: SetupDirectory): SetupDirectory {
|
||||
@@ -63,25 +64,37 @@ function createConfigFile(configLocation: SetupDirectory): SetupDirectory {
|
||||
return configLocation;
|
||||
}
|
||||
|
||||
export function readDefaultConfig(): Buffer {
|
||||
export function readDefaultConfig(): string {
|
||||
const pathDefaultConf: string = path.resolve(__dirname, 'conf/default.yaml');
|
||||
try {
|
||||
debug('default configuration file %s', pathDefaultConf);
|
||||
debug('the path of default config used from %s', pathDefaultConf);
|
||||
fs.accessSync(pathDefaultConf, fs.constants.R_OK);
|
||||
debug('configuration file has enough permissions for reading');
|
||||
} catch {
|
||||
debug('configuration file does not have enough permissions for reading');
|
||||
throw new TypeError('configuration file does not have enough permissions for reading');
|
||||
}
|
||||
// @ts-ignore
|
||||
return fs.readFileSync(pathDefaultConf, CHARACTER_ENCODING.UTF8);
|
||||
|
||||
return fs.readFileSync(pathDefaultConf, 'utf8');
|
||||
}
|
||||
|
||||
function createConfigFolder(configLocation): void {
|
||||
fs.mkdirSync(path.dirname(configLocation.path), { recursive: true });
|
||||
debug(`Creating default config file in %o`, configLocation?.path);
|
||||
const folder = path.dirname(configLocation.path);
|
||||
debug(`creating default config file folder at %o`, folder);
|
||||
fs.mkdirSync(folder, { recursive: true });
|
||||
debug(`folder %o created`, folder);
|
||||
}
|
||||
|
||||
function updateStorageLinks(configLocation, defaultConfig): string {
|
||||
/**
|
||||
* Update the storage links to the new location if it is necessary.
|
||||
* @param configLocation
|
||||
* @param defaultConfig
|
||||
* @returns
|
||||
*/
|
||||
function updateStorageLinks(configLocation: SetupDirectory, defaultConfig: string): string {
|
||||
debug('checking storage links for %s and type %s', configLocation.path, configLocation.type);
|
||||
if (configLocation.type !== XDG) {
|
||||
debug(`skip storage override for %s`, configLocation.type);
|
||||
return defaultConfig;
|
||||
}
|
||||
|
||||
@@ -114,7 +127,11 @@ function getConfigPaths(): SetupDirectory[] {
|
||||
|
||||
return listPaths.reduce(function (acc, currentValue: SetupDirectory | void): SetupDirectory[] {
|
||||
if (typeof currentValue !== 'undefined') {
|
||||
debug('directory detected path %s for type %s', currentValue?.path, currentValue.type);
|
||||
debug(
|
||||
'posible directory path generated %s for type %s',
|
||||
currentValue?.path,
|
||||
currentValue.type
|
||||
);
|
||||
acc.push(currentValue);
|
||||
}
|
||||
return acc;
|
||||
@@ -123,11 +140,22 @@ function getConfigPaths(): SetupDirectory[] {
|
||||
|
||||
/**
|
||||
* Get XDG_CONFIG_HOME or HOME location (usually unix)
|
||||
*
|
||||
* The XDG_CONFIG_HOME environment variable is also part of the XDG Base Directory Specification,
|
||||
* which aims to standardize the locations where applications store configuration files and other
|
||||
* user-specific data on Unix-like operating systems.
|
||||
*
|
||||
*
|
||||
*
|
||||
* https://specifications.freedesktop.org/basedir-spec/latest/
|
||||
*
|
||||
*
|
||||
* @returns
|
||||
*/
|
||||
const getXDGDirectory = (): SetupDirectory | void => {
|
||||
const xDGConfigPath =
|
||||
process.env.XDG_CONFIG_HOME || (process.env.HOME && path.join(process.env.HOME, '.config'));
|
||||
debug('XDGConfig folder path %s', xDGConfigPath);
|
||||
if (xDGConfigPath && folderExists(xDGConfigPath)) {
|
||||
debug('XDGConfig folder path %s', xDGConfigPath);
|
||||
return {
|
||||
@@ -143,11 +171,11 @@ const getXDGDirectory = (): SetupDirectory | void => {
|
||||
* @returns
|
||||
*/
|
||||
const getWindowsDirectory = (): SetupDirectory | void => {
|
||||
if (process.platform === WIN32 && process.env.APPDATA && folderExists(process.env.APPDATA)) {
|
||||
debug('is windows appdata: %s', process.env.APPDATA);
|
||||
if (os.platform() === 'win32' && process.env.APPDATA && folderExists(process.env.APPDATA)) {
|
||||
debug('windows appdata folder path %s', process.env.APPDATA);
|
||||
return {
|
||||
path: path.resolve(path.join(process.env.APPDATA, pkgJSON.name, CONFIG_FILE)),
|
||||
type: WIN,
|
||||
type: 'win',
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -158,8 +186,10 @@ const getWindowsDirectory = (): SetupDirectory | void => {
|
||||
* @returns
|
||||
*/
|
||||
const getRelativeDefaultDirectory = (): SetupDirectory => {
|
||||
const relativePath = path.resolve(path.join('.', pkgJSON.name, CONFIG_FILE));
|
||||
debug('relative folder path %s', relativePath);
|
||||
return {
|
||||
path: path.resolve(path.join('.', pkgJSON.name, CONFIG_FILE)),
|
||||
path: relativePath,
|
||||
type: 'def',
|
||||
};
|
||||
};
|
||||
@@ -169,8 +199,10 @@ const getRelativeDefaultDirectory = (): SetupDirectory => {
|
||||
* @returns
|
||||
*/
|
||||
const getOldDirectory = (): SetupDirectory => {
|
||||
const oldPath = path.resolve(path.join('.', CONFIG_FILE));
|
||||
debug('old folder path %s', oldPath);
|
||||
return {
|
||||
path: path.resolve(path.join('.', CONFIG_FILE)),
|
||||
path: oldPath,
|
||||
type: 'old',
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import buildDebug from 'debug';
|
||||
import fs from 'fs';
|
||||
|
||||
const debug = buildDebug('verdaccio:config:config-utils');
|
||||
|
||||
/**
|
||||
* Check whether the path already exist.
|
||||
* @param {String} path
|
||||
@@ -7,9 +10,13 @@ import fs from 'fs';
|
||||
*/
|
||||
export function folderExists(path: string): boolean {
|
||||
try {
|
||||
debug('check folder exist', path);
|
||||
const stat = fs.statSync(path);
|
||||
return stat.isDirectory();
|
||||
const isDirectory = stat.isDirectory();
|
||||
debug('folder exist', isDirectory);
|
||||
return isDirectory;
|
||||
} catch (_: any) {
|
||||
debug('folder %s does not exist', path);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -21,9 +28,13 @@ export function folderExists(path: string): boolean {
|
||||
*/
|
||||
export function fileExists(path: string): boolean {
|
||||
try {
|
||||
debug('check file exist', path);
|
||||
const stat = fs.statSync(path);
|
||||
return stat.isFile();
|
||||
const isFile = stat.isFile();
|
||||
debug('file exist', isFile);
|
||||
return isFile;
|
||||
} catch (_: any) {
|
||||
debug('file %s does not exist', path);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Config builder should create a configuration file as yaml 1`] = `
|
||||
exports[`Config builder > should create a configuration file as yaml 1`] = `
|
||||
"uplinks:
|
||||
upstream:
|
||||
url: https://registry.verdaccio.org
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`parse fromJStoYAML basic conversion roundtrip 1`] = `
|
||||
exports[`parse > fromJStoYAML > basic conversion roundtrip 1`] = `
|
||||
"storage: ./storage_default_storage
|
||||
uplinks:
|
||||
npmjs:
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { getUserAgent } from '../src';
|
||||
|
||||
describe('getUserAgent', () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { ConfigBuilder } from '../src';
|
||||
|
||||
describe('Config builder', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { fileUtils } from '@verdaccio/core';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import path from 'path';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { fileExists, folderExists } from '../src/config-utils';
|
||||
|
||||
|
||||
@@ -1,76 +1,105 @@
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
|
||||
|
||||
import { findConfigFile } from '../src/config-path';
|
||||
|
||||
const mockmkDir = jest.fn();
|
||||
const mockaccessSync = jest.fn();
|
||||
const mockwriteFile = jest.fn();
|
||||
|
||||
jest.mock('fs', () => {
|
||||
const fsOri = jest.requireActual('fs');
|
||||
return {
|
||||
...fsOri,
|
||||
statSync: (path) => ({
|
||||
isDirectory: () => {
|
||||
if (path.match(/fail/)) {
|
||||
throw Error('file does not exist');
|
||||
}
|
||||
return true;
|
||||
},
|
||||
}),
|
||||
accessSync: (a) => mockaccessSync(a),
|
||||
mkdirSync: (a) => mockmkDir(a),
|
||||
writeFileSync: (a) => mockwriteFile(a),
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('fs');
|
||||
|
||||
describe('config-path', () => {
|
||||
let statSyncMock;
|
||||
let mkdirSyncMock;
|
||||
let writeFileSyncMock;
|
||||
let accessSyncMock;
|
||||
let fakeStats = {
|
||||
isDirectory: vi.fn().mockReturnValue(true),
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
jest.resetAllMocks();
|
||||
// Mock only statSync method
|
||||
statSyncMock = vi.spyOn(fs, 'statSync');
|
||||
mkdirSyncMock = vi.spyOn(fs, 'mkdirSync');
|
||||
writeFileSyncMock = vi.spyOn(fs, 'writeFileSync');
|
||||
accessSyncMock = vi.spyOn(fs, 'accessSync');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
// Restore the original implementation after each test
|
||||
statSyncMock.mockRestore();
|
||||
vi.unstubAllEnvs();
|
||||
});
|
||||
|
||||
function platformPath(path: string): string {
|
||||
return path.replace(/\//g, os.platform() === 'win32' ? '\\' : '/');
|
||||
}
|
||||
|
||||
describe('findConfigFile', () => {
|
||||
if (os.platform() !== 'win32') {
|
||||
describe('using defiled location from arguments', () => {
|
||||
test('with custom location', () => {
|
||||
expect(findConfigFile('/home/user/custom/location/config.yaml')).toEqual(
|
||||
'/home/user/custom/location/config.yaml'
|
||||
);
|
||||
expect(mockwriteFile).not.toHaveBeenCalled();
|
||||
expect(mockmkDir).not.toHaveBeenCalled();
|
||||
});
|
||||
describe('using file location from arguments', () => {
|
||||
test('with custom location', () => {
|
||||
// mock
|
||||
statSyncMock.mockReturnValue(fakeStats);
|
||||
mkdirSyncMock.mockReturnValue(true);
|
||||
writeFileSyncMock.mockReturnValue(undefined);
|
||||
// Note: on Windows, path contains drive letter
|
||||
expect(findConfigFile('/home/user/custom/location/config.yaml')).toMatch(
|
||||
platformPath('/home/user/custom/location/config.yaml')
|
||||
);
|
||||
expect(writeFileSyncMock).not.toHaveBeenCalled();
|
||||
expect(mkdirSyncMock).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('with env variables', () => {
|
||||
test('the env XDG_CONFIG_HOME is defined and the directory exist but config file is missing', async () => {
|
||||
// mock
|
||||
statSyncMock.mockReturnValue(fakeStats);
|
||||
mkdirSyncMock.mockReturnValue(true);
|
||||
writeFileSyncMock.mockReturnValue(undefined);
|
||||
// node env variable
|
||||
vi.stubEnv('XDG_CONFIG_HOME', '/home/user');
|
||||
|
||||
expect(findConfigFile()).toEqual(platformPath('/home/user/verdaccio/config.yaml'));
|
||||
expect(writeFileSyncMock).toHaveBeenCalledWith(
|
||||
platformPath('/home/user/verdaccio/config.yaml'),
|
||||
expect.stringContaining('packages')
|
||||
);
|
||||
});
|
||||
|
||||
describe('whith env variables', () => {
|
||||
test('with XDG_CONFIG_HOME if directory exist but config file is missing', () => {
|
||||
process.env.XDG_CONFIG_HOME = '/home/user';
|
||||
expect(findConfigFile()).toEqual('/home/user/verdaccio/config.yaml');
|
||||
expect(mockwriteFile).toHaveBeenCalledWith('/home/user/verdaccio/config.yaml');
|
||||
expect(mockmkDir).toHaveBeenCalledWith('/home/user/verdaccio');
|
||||
});
|
||||
test('with HOME if directory exist but config file is missing', () => {
|
||||
// mock
|
||||
statSyncMock.mockReturnValue(fakeStats);
|
||||
mkdirSyncMock.mockReturnValue(true);
|
||||
writeFileSyncMock.mockReturnValue(undefined);
|
||||
vi.stubEnv('XDG_CONFIG_HOME', '');
|
||||
vi.stubEnv('HOME', '/home/user');
|
||||
expect(findConfigFile()).toEqual(platformPath('/home/user/.config/verdaccio/config.yaml'));
|
||||
expect(writeFileSyncMock).toHaveBeenCalledWith(
|
||||
platformPath('/home/user/.config/verdaccio/config.yaml'),
|
||||
expect.stringContaining('packages')
|
||||
);
|
||||
expect(mkdirSyncMock).toHaveBeenCalledWith(
|
||||
platformPath('/home/user/.config/verdaccio'),
|
||||
expect.anything()
|
||||
);
|
||||
});
|
||||
|
||||
test('with HOME if directory exist but config file is missing', () => {
|
||||
delete process.env.XDG_CONFIG_HOME;
|
||||
process.env.HOME = '/home/user';
|
||||
expect(findConfigFile()).toEqual('/home/user/.config/verdaccio/config.yaml');
|
||||
expect(mockwriteFile).toHaveBeenCalledWith('/home/user/.config/verdaccio/config.yaml');
|
||||
expect(mockmkDir).toHaveBeenCalledWith('/home/user/.config/verdaccio');
|
||||
});
|
||||
|
||||
describe('error handling', () => {
|
||||
test('XDG_CONFIG_HOME is not directory fallback to default', () => {
|
||||
process.env.XDG_CONFIG_HOME = '/home/user/fail';
|
||||
mockaccessSync.mockImplementation(() => {});
|
||||
mockwriteFile.mockImplementation(() => {});
|
||||
expect(findConfigFile()).toMatch('packages/config/verdaccio/config.yaml');
|
||||
describe('error handling', () => {
|
||||
test('XDG_CONFIG_HOME is not directory fallback to default', () => {
|
||||
// mock
|
||||
statSyncMock.mockReturnValue({
|
||||
isDirectory: vi.fn().mockReturnValue(false),
|
||||
});
|
||||
mkdirSyncMock.mockReturnValue(true);
|
||||
writeFileSyncMock.mockReturnValue(undefined);
|
||||
// node env variable
|
||||
vi.stubEnv('XDG_CONFIG_HOME', '/home/user/fail');
|
||||
|
||||
expect(findConfigFile()).toMatch(platformPath('packages/config/verdaccio/config.yaml'));
|
||||
});
|
||||
|
||||
// Does not work on Windows
|
||||
if (os.platform() !== 'win32') {
|
||||
test('no permissions on read default config file', () => {
|
||||
process.env.XDG_CONFIG_HOME = '/home/user';
|
||||
mockaccessSync.mockImplementation(() => {
|
||||
vi.stubEnv('XDG_CONFIG_HOME', '/home/user');
|
||||
accessSyncMock.mockImplementation(() => {
|
||||
throw new Error('error on write file');
|
||||
});
|
||||
|
||||
@@ -78,29 +107,28 @@ describe('config-path', () => {
|
||||
findConfigFile();
|
||||
}).toThrow(/configuration file does not have enough permissions for reading/);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('with no env variables', () => {
|
||||
// Note: Trying to mock Windows platform leads to different results (incorrect slashes)
|
||||
if (os.platform() === 'win32') {
|
||||
describe('with Windows env variables', () => {
|
||||
test('with relative location', () => {
|
||||
mockaccessSync.mockImplementation(() => {});
|
||||
delete process.env.XDG_CONFIG_HOME;
|
||||
delete process.env.HOME;
|
||||
process.env.APPDATA = '/app/data/';
|
||||
expect(findConfigFile()).toMatch('packages/config/verdaccio/config.yaml');
|
||||
expect(mockwriteFile).toHaveBeenCalled();
|
||||
expect(mockmkDir).toHaveBeenCalled();
|
||||
// mock
|
||||
statSyncMock.mockReturnValue(fakeStats);
|
||||
mkdirSyncMock.mockReturnValue(true);
|
||||
writeFileSyncMock.mockReturnValue(undefined);
|
||||
accessSyncMock.mockImplementation(() => {});
|
||||
// delete process.env.XDG_CONFIG_HOME;
|
||||
vi.stubEnv('XDG_CONFIG_HOME', '');
|
||||
vi.stubEnv('HOME', '');
|
||||
vi.stubEnv('APPDATA', 'C:\\Users\\Tester\\AppData\\');
|
||||
expect(findConfigFile()).toEqual('C:\\Users\\Tester\\AppData\\verdaccio\\config.yaml');
|
||||
expect(writeFileSyncMock).toHaveBeenCalled();
|
||||
expect(mkdirSyncMock).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
test('with windows as directory exist but config file is missing', () => {
|
||||
delete process.env.XDG_CONFIG_HOME;
|
||||
delete process.env.HOME;
|
||||
process.env.APPDATA = '/app/data/';
|
||||
expect(findConfigFile()).toMatch('\\app\\data\\verdaccio\\config.yaml');
|
||||
expect(mockwriteFile).toHaveBeenCalled();
|
||||
expect(mockmkDir).toHaveBeenCalled();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
import path from 'path';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import {
|
||||
Config,
|
||||
@@ -22,7 +23,7 @@ const resolveConf = (conf) => {
|
||||
return path.join(__dirname, `../src/conf/${name}${ext.startsWith('.') ? ext : '.yaml'}`);
|
||||
};
|
||||
|
||||
const itif = (condition) => (condition ? it : it.skip);
|
||||
const itif = (condition) => (condition ? test : test.skip);
|
||||
|
||||
const checkDefaultUplink = (config) => {
|
||||
expect(_.isObject(config.uplinks[DEFAULT_UPLINK])).toBeTruthy();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { parseConfigFile } from '../src';
|
||||
import { PACKAGE_ACCESS, normalisePackageAccess, normalizeUserList } from '../src/package-access';
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { expect, test } from 'vitest';
|
||||
|
||||
import { TOKEN_VALID_LENGTH, generateRandomSecretKey } from '../src/token';
|
||||
|
||||
test('token test valid length', () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { normalisePackageAccess, parseConfigFile } from '../src';
|
||||
import { hasProxyTo, sanityCheckUplinksProps, uplinkSanityCheck } from '../src/uplinks';
|
||||
import { parseConfigurationFile } from './utils';
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { ROLES, createAnonymousRemoteUser, createRemoteUser } from '../src';
|
||||
|
||||
describe('createRemoteUser and createAnonymousRemoteUser', () => {
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @verdaccio/core
|
||||
|
||||
## 7.0.0-next-8.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7c9f3cf: chore: improve startup logging
|
||||
|
||||
## 7.0.0-next-7.20
|
||||
|
||||
## 7.0.0-next-7.19
|
||||
|
||||
## 7.0.0-next-7.18
|
||||
|
||||
## 7.0.0-next-7.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
const config = require('../../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {});
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/core",
|
||||
"version": "7.0.0-next-7.17",
|
||||
"version": "7.0.0-next-8.21",
|
||||
"description": "core utilities",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -19,7 +19,7 @@
|
||||
"license": "MIT",
|
||||
"homepage": "https://verdaccio.org",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=14"
|
||||
},
|
||||
"repository": {
|
||||
"type": "https",
|
||||
@@ -33,22 +33,22 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": "8.17.1",
|
||||
"core-js": "3.37.1",
|
||||
"http-errors": "2.0.0",
|
||||
"http-status-codes": "2.3.0",
|
||||
"semver": "7.6.2",
|
||||
"ajv": "8.12.0",
|
||||
"process-warning": "1.0.0",
|
||||
"core-js": "3.35.0"
|
||||
"semver": "7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.5",
|
||||
"lodash": "4.17.21",
|
||||
"typedoc": "0.23.25",
|
||||
"typedoc-plugin-missing-exports": "latest",
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.4"
|
||||
"typedoc-plugin-missing-exports": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
"test": "jest",
|
||||
"test": "vitest run",
|
||||
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
||||
"build:docs": "typedoc --options ./typedoc.json --tsconfig tsconfig.build.json",
|
||||
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
|
||||
|
||||
@@ -119,3 +119,11 @@ export enum HtpasswdHashAlgorithm {
|
||||
crypt = 'crypt',
|
||||
bcrypt = 'bcrypt',
|
||||
}
|
||||
|
||||
export const PLUGIN_CATEGORY = {
|
||||
AUTHENTICATION: 'authentication',
|
||||
MIDDLEWARE: 'middleware',
|
||||
STORAGE: 'storage',
|
||||
FILTER: 'filter',
|
||||
THEME: 'theme',
|
||||
};
|
||||
|
||||
@@ -24,6 +24,7 @@ export {
|
||||
DEFAULT_USER,
|
||||
USERS,
|
||||
MAINTAINERS,
|
||||
PLUGIN_CATEGORY,
|
||||
HtpasswdHashAlgorithm,
|
||||
} from './constants';
|
||||
const validationUtils = validatioUtils;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { HTTP_STATUS } from '../src/constants';
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { mergeVersions, semverSort } from '../src/pkg-utils';
|
||||
|
||||
describe('Storage._merge_versions versions', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Stream } from 'stream';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { readableToString } from '../src/stream-utils';
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { DIST_TAGS, pkgUtils } from '../src';
|
||||
|
||||
describe('pkg-utils', () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { stringUtils } from '../src';
|
||||
|
||||
describe('string-utils', () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { DEFAULT_PASSWORD_VALIDATION, DIST_TAGS } from '../src/constants';
|
||||
import { validatePublishSingleVersion } from '../src/schemes/publish-manifest';
|
||||
import {
|
||||
@@ -62,10 +64,9 @@ describe('normalizeMetadata', () => {
|
||||
|
||||
test('should fails the assertions is name does not match', () => {
|
||||
expect(function () {
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
normalizeMetadata({}, 'no-name');
|
||||
// @ts-ignore
|
||||
}).toThrow(expect.hasAssertions());
|
||||
}).toThrowError();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"lockfile": "1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.4"
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.5"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
# Change Log
|
||||
|
||||
## 12.0.0-next-8.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7c9f3cf]
|
||||
- @verdaccio/core@7.0.0-next-8.21
|
||||
- @verdaccio/url@12.0.0-next-8.21
|
||||
- @verdaccio/utils@7.0.0-next-8.21
|
||||
|
||||
## 12.0.0-next-7.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ccc7bd1]
|
||||
- @verdaccio/url@12.0.0-next-7.20
|
||||
- @verdaccio/core@7.0.0-next-7.20
|
||||
- @verdaccio/utils@7.0.0-next-7.20
|
||||
|
||||
## 12.0.0-next-7.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.19
|
||||
- @verdaccio/url@12.0.0-next-7.19
|
||||
- @verdaccio/utils@7.0.0-next-7.19
|
||||
|
||||
## 12.0.0-next-7.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @verdaccio/core@7.0.0-next-7.18
|
||||
- @verdaccio/url@12.0.0-next-7.18
|
||||
- @verdaccio/utils@7.0.0-next-7.18
|
||||
|
||||
## 12.0.0-next-7.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
const config = require('../../../jest/config');
|
||||
|
||||
module.exports = Object.assign({}, config, {});
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@verdaccio/tarball",
|
||||
"version": "12.0.0-next-7.17",
|
||||
"version": "12.0.0-next-8.21",
|
||||
"description": "tarball utilities resolver",
|
||||
"keywords": [
|
||||
"private",
|
||||
@@ -19,7 +19,7 @@
|
||||
"license": "MIT",
|
||||
"homepage": "https://verdaccio.org",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=14"
|
||||
},
|
||||
"repository": {
|
||||
"type": "https",
|
||||
@@ -33,21 +33,21 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@verdaccio/core": "workspace:7.0.0-next-7.17",
|
||||
"@verdaccio/url": "workspace:12.0.0-next-7.17",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-7.17",
|
||||
"debug": "4.3.4",
|
||||
"@verdaccio/core": "workspace:7.0.0-next-8.21",
|
||||
"@verdaccio/url": "workspace:12.0.0-next-8.21",
|
||||
"@verdaccio/utils": "workspace:7.0.0-next-8.21",
|
||||
"debug": "4.3.6",
|
||||
"gunzip-maybe": "^1.4.2",
|
||||
"lodash": "4.17.21",
|
||||
"tar-stream": "^3.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.4",
|
||||
"@verdaccio/types": "workspace:12.0.0-next-7.5",
|
||||
"node-mocks-http": "1.14.1"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf ./build",
|
||||
"test": "jest",
|
||||
"test": "vitest run",
|
||||
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
||||
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
|
||||
"build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as httpMocks from 'node-mocks-http';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
|
||||
import { HEADERS } from '@verdaccio/core';
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user