Compare commits

..

19 Commits

Author SHA1 Message Date
Juan Picado
56713db9a3 chore: update versions (next-7) (#4536)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-10 18:50:50 +01:00
Juan Picado
cce258e4d4 refactor: search package bump up 2024-03-10 18:21:03 +01:00
Juan Picado
87c16127b4 refactor: search package (#4489)
* refactor: search package

refactor: search package

* update deps

* refactor

* refactor tests

* add tests
2024-03-10 17:58:39 +01:00
Timo Peters
bed68b2ceb docs: fix typos in different areas (#4535) 2024-03-07 12:24:52 +01:00
verdacciobot
5328b6cb05 chore: updated static data 2024-03-07 00:10:56 +00:00
dependabot[bot]
16954c3b85 chore(deps): bump github/codeql-action from 3.24.5 to 3.24.6 (#4533)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.5 to 3.24.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](47b3d888fe...8a470fddaf)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 20:53:14 +01:00
dependabot[bot]
1e63e05dc0 chore(deps): bump actions/cache from 3.3.3 to 4.0.1 (#4532)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.3 to 4.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](e12d46a63a...ab5e6d0c87)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 20:53:06 +01:00
verdacciobot
8ecf7adf29 chore: updated static data 2024-03-04 00:12:49 +00:00
Juan Picado
2c9fe963ff chore: update versions (next-7) (#4525)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-03 19:22:16 +01:00
renovate[bot]
31844e2e77 fix(deps): update dependency semver to v7.6.0 (#4524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-03 19:13:10 +01:00
dependabot[bot]
605cff9099 chore(deps): bump github/codeql-action from 3.24.0 to 3.24.5 (#4520)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.0 to 3.24.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e8893c57a1...47b3d888fe)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 19:08:15 +01:00
Juan Picado
c9962fe1d5 feat: forbidden user interface (#4523)
* feat: forbidden user interface

* Delete App.stories.tsx

* Update package.json

* Delete package.svg

* fix
2024-03-03 19:06:39 +01:00
Juan Picado
4a81ed791a Delete .netlify directory 2024-03-03 14:09:03 +01:00
Juan Picado
8783e3a88a chore: update website deployment (#4320)
* test

* Update website.yml

* Update website.yml

* test2

* Update package.json

* Update package.json

* Update package.json

* clean up

* Update website.yml

* remove dependency
2024-03-03 13:49:00 +01:00
Gweesin Chan
7034c358d5 docs: fix typos in CONTRIBUTING (#4521) 2024-03-02 10:40:51 +01:00
verdacciobot
f09f30cada chore: updated static data 2024-02-29 00:12:05 +00:00
verdacciobot
03acf73a56 chore: updated static data 2024-02-26 00:12:56 +00:00
Juan Picado
dabf77d32d website: update banners url 2024-02-24 20:52:02 +01:00
verdacciobot
fbcc36fbb6 chore: updated static data 2024-02-22 00:12:51 +00:00
163 changed files with 2371 additions and 2012 deletions

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/search': patch
'@verdaccio/search-indexer': patch
---
refactor: search package

View File

@@ -0,0 +1,7 @@
---
'@verdaccio/ui-theme': minor
'@verdaccio/ui-components': minor
'@verdaccio/config': minor
---
feat: forbidden user interface

View File

@@ -39,7 +39,7 @@
"verdaccio-memory": "11.0.0",
"@verdaccio/ui-theme": "6.0.0",
"@verdaccio/proxy": "6.0.0",
"@verdaccio/search": "6.0.0",
"@verdaccio/search-indexer": "6.0.0",
"@verdaccio/server": "6.0.0",
"@verdaccio/server-fastify": "6.0.0",
"@verdaccio/signature": "6.0.0",
@@ -55,17 +55,20 @@
"verdaccio": "6.0.0",
"@verdaccio/web": "6.0.0",
"@verdaccio/website": "5.20.2",
"@verdaccio/local-publish": "0.0.1"
"@verdaccio/local-publish": "0.0.1",
"@verdaccio/search": "7.0.0-next.0"
},
"changesets": [
"angry-trees-tie",
"breezy-mayflies-pull",
"chilled-carrots-guess",
"eight-squids-judge",
"good-cups-train",
"long-jars-collect",
"old-turkeys-heal",
"olive-bananas-wink",
"perfect-chairs-act",
"pink-apples-nail",
"real-socks-vanish",
"shiny-worms-retire",
"shy-carrots-compare",

View File

@@ -36,7 +36,7 @@ jobs:
- name: Install
run: pnpm install --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -54,7 +54,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@latest-8 -g
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -78,7 +78,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@latest-8 -g
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -107,7 +107,7 @@ jobs:
node-version: ${{ matrix.node_version }}
- name: Install pnpm
run: npm i pnpm@latest-8 -g
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -132,7 +132,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@latest-8 -g
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}

View File

@@ -43,7 +43,7 @@ jobs:
- name: Install
run: pnpm install --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -63,7 +63,7 @@ jobs:
run: |
corepack enable
corepack install
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -88,7 +88,7 @@ jobs:
run: |
corepack enable
corepack install
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -118,7 +118,7 @@ jobs:
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -145,7 +145,7 @@ jobs:
run: |
corepack enable
corepack install
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}

View File

@@ -34,7 +34,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v2
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # 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@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v2
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # 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@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v2
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v2

View File

@@ -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@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
@@ -53,7 +53,7 @@ jobs:
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # 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@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
id: cache-packages
with:
path: ./packages/
@@ -105,7 +105,7 @@ jobs:
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # 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@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ./packages/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
@@ -195,7 +195,7 @@ jobs:
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
@@ -204,7 +204,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@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ./packages/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}

View File

@@ -28,7 +28,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Cache pnpm modules
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
env:
cache-name: cache-pnpm-modules
with:

View File

@@ -2,13 +2,6 @@ name: Verdaccio Website CI
on:
workflow_dispatch:
pull_request:
branches-ignore:
- 'renovate/*'
- 'dependabot/*'
paths:
- 'website/**'
- './.github/workflows/website.yml'
schedule:
- cron: '0 0 * * *'
@@ -51,7 +44,7 @@ jobs:
- name: Install
run: pnpm install --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -62,94 +55,21 @@ jobs:
- name: Build Translations percentage
run: pnpm --filter @verdaccio/crowdin-translations build
- name: Cache Docusaurus Build
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3
with:
path: website/node_modules/.cache/webpack
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: cache/webpack-${{github.ref}}
# Will deploy to production on:
# 1st: When a push occurs on master branch
# 2nd: When we force the worflow dispatch through the UI
- name: Build Production
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.event_name == 'workflow_dispatch'
env:
CROWDIN_VERDACCIO_API_KEY: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
CONTEXT: production
run: pnpm --filter @verdaccio/website netlify:build:production
- name: 🔥 Deploy Production Netlify
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
uses: semoal/action-netlify-deploy@1a53f098745bf78555d11b436f5ee3af87e6b566
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
build-dir: './website/build'
# Will deploy to Preview URL, only when a pull request is open with changes on the website
- name: Build Deployment Preview
run: pnpm --filter @verdaccio/website netlify:build
- name: Deploy to Netlify
env:
CONTEXT: deploy-preview
run: pnpm --filter ...@verdaccio/website netlify:build:deployPreview
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: pnpm --filter ...@verdaccio/website netlify:deploy
- name: 🤖 Deploy Preview Netlify
if: github.repository == 'verdaccio/verdaccio'
uses: semoal/action-netlify-deploy@1a53f098745bf78555d11b436f5ee3af87e6b566
id: netlify_preview
with:
draft: true
comment-on-pull-request: true
github-deployment-is-production: false
github-deployment-is-transient: true
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
build-dir: './website/build'
- name: Audit preview URL with Lighthouse
if: github.repository == 'verdaccio/verdaccio'
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@1b0e7c33270fbba31a18a0fbb1de7cc5256b6d39 # tag=11.4.0
with:
urls: |
${{ steps.netlify_preview.outputs.preview-url }}
uploadArtifacts: true
temporaryPublicStorage: true
- name: Format lighthouse score
id: format_lighthouse_score
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const result = ${{ steps.lighthouse_audit.outputs.manifest }}[0].summary
const links = ${{ steps.lighthouse_audit.outputs.links }}
const formatResult = (res) => Math.round((res * 100))
Object.keys(result).forEach(key => result[key] = formatResult(result[key]))
const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴'
const comment = [
`⚡️ [Lighthouse report](${Object.values(links)[0]}) for the changes in this PR:`,
'| Category | Score |',
'| --- | --- |',
`| ${score(result.performance)} Performance | ${result.performance} |`,
`| ${score(result.accessibility)} Accessibility | ${result.accessibility} |`,
`| ${score(result['best-practices'])} Best practices | ${result['best-practices']} |`,
`| ${score(result.seo)} SEO | ${result.seo} |`,
' ',
`*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*`
].join('\n')
core.setOutput("comment", comment);
- name: Add comment to PR
if: github.repository == 'verdaccio/verdaccio'
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}
delete: true
header: lighthouse
message: |
${{ steps.format_lighthouse_score.outputs.comment }}

View File

@@ -1,10 +0,0 @@
module.exports = {
onPreBuild: async ({ utils: { build, run } }) => {
try {
await run.command("npm install -g pnpm")
await run.command("pnpm install --ignore-scripts --frozen-lockfile")
} catch (error) {
return build.failBuild(error)
}
}
}

View File

@@ -1,2 +0,0 @@
name: netlify-plugin-pnpm
inputs: []

View File

@@ -78,14 +78,14 @@ pnpm build
pnpm test
```
Verdaccio is a mono repository. To run the tests for for a specific package:
Verdaccio is a mono repository. To run the tests for a specific package:
```shell
cd packages/store
pnpm test
```
or an specific test in that package:
or a specific test in that package:
```shell
pnpm test test/merge.dist.tags.spec.ts
@@ -129,7 +129,7 @@ The user interface is split in two packages, the `/packages/plugins/ui-theme` an
Go to `/packages/ui-component` and run `pnpm watch` to enable _babel_ in watch mode, every change on the components will be hot reloaded in combination with the `pnpm start` command.
Any change on the server packages, must be build independently (server do not has hot reload, `pnpm start` should be triggered again).
Any change on the server packages, must be build independently (server does not have hot reload, `pnpm start` should be triggered again).
Any interaction with the server should be done through the port `8000` eg: `npm login --registry http://localhost:8000` .
@@ -142,7 +142,7 @@ Any interaction with the server should be done through the port `8000` eg: `npm
#### Debugging compiled code {#debugging-compiled-code}
Currently you can only run pre-compiled packages in debug mode. To enable debug
Currently, you can only run pre-compiled packages in debug mode. To enable debug
while running add the `verdaccio` namespace using the `DEBUG` environment
variable, like this:
@@ -164,7 +164,7 @@ of the output is sent to the logger module.
#### Testing your changes in a local registry {#testing-local-registry}
Once you have perform your changes in the code base, the build and tests passes you can publish a local version:
Once you have performed your changes in the code base, the build and tests passes you can publish a local version:
- Ensure you have built all modules by running `pnpm build` (or the one you have modified)
- Run `pnpm local:publish:release` to launch a local registry and publish all packages into it. This command will be alive until server is killed (Control Key + C)
@@ -181,7 +181,7 @@ npm i -g verdaccio --registry=http://localhost:4873
verdaccio
```
If you perform more changes in the source code, repeat this process, there is not _hot reloading_ support.
If you perform more changes in the source code, repeat this process, there is no _hot reloading_ support.
## Feature Request {#feature-request}
@@ -208,7 +208,7 @@ a report in our [issue tracker](https://github.com/verdaccio/verdaccio/issues),
> **NOTE: Verdaccio still does not support all npm commands. Some were not
> considered important and others have not been requested yet.**
### What's is not considered a bug?
### What is not considered a bug?
- _Third party integrations_: proxies integrations, external plugins
- _Package managers_: If a package manager does not support a specific command
@@ -272,7 +272,7 @@ information on [rebasing](https://git-scm.com/book/en/v2/Git-Branching-Rebasing)
#### Caveats
Feel free to commit as much times you want in your branch, but keep on mind on
Feel free to commit as many times you want in your branch, but keep on mind on
this repository we `git squash` on merge by default, as we like to maintain a
clean git history.
@@ -359,7 +359,7 @@ The last step is to confirm your changeset or abort the operation:
🦋 info /Users/user/verdaccio.clone/.changeset/light-scissors-smell.md
```
Once the changeset is added (all will have an unique name) you can freely edit
Once the changeset is added (all will have a unique name) you can freely edit
using markdown, adding additional information, code snippets or whatever else
you consider to be relevant.
@@ -395,7 +395,7 @@ For adding a new **language** on the UI follow these steps:
1. Ensure the **language** has been enabled, must be visible in the `crowdin` platform.
2. Find in the explorer the file `en.US.json` in the path `packages/plugins/ui-theme/src/i18n/crowdin/ui.json` and complete the translations, **not need to find approval on this**.
3. Into the project, add a new field into `packages/plugins/ui-theme/src/i18n/crowdin/ui.json` file, in the section `lng`, the new language, eg: `{ lng: {korean:"Korean"}}`. (This file is English based, once the PR has been merged, this string will be available in crowdin for translate to the targeted language).
4. Add the language, [flag icon](https://www.npmjs.com/package/country-flag-icons), and the menu key fort he new language eg: `menuKey: 'lng.korean'` to the file `packages/plugins/ui-theme/src/i18n/enabledLanguages.ts`.
4. Add the language, [flag icon](https://www.npmjs.com/package/country-flag-icons), and the menu key for the new language eg: `menuKey: 'lng.korean'` to the file `packages/plugins/ui-theme/src/i18n/enabledLanguages.ts`.
5. For local testing, read `packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md`.
6. Add a `changeset` file, see more info below.

View File

@@ -1,4 +1,4 @@
[![BannerUK](https://cdn.verdaccio.dev/readme/banner-uk.svg)](https://donate.redcrossredcrescent.org/ua/donate/~my-donation?_cv=1)
[![BannerHelp](https://cdn.verdaccio.dev/readme/banner-uk.svg)](https://u24.gov.ua)
> Verdaccio stands for **peace**, stop the war, we will be yellow / blue 🇺🇦 until that happens.

View File

@@ -88,7 +88,7 @@ packages:
# and three keywords: "$all", "$anonymous", "$authenticated"
access: $all
# allow all known users to publish/publish packages
# allow all known users to publish/unpublish packages
# (anyone can register by default, remember?)
publish: $authenticated
unpublish: $authenticated

View File

@@ -90,7 +90,7 @@ packages:
# and three keywords: "$all", "$anonymous", "$authenticated"
access: $all
# allow all known users to publish/publish packages
# allow all known users to publish/unpublish packages
# (anyone can register by default, remember?)
publish: $authenticated
unpublish: $authenticated

View File

@@ -88,7 +88,7 @@ packages:
# and three keywords: "$all", "$anonymous", "$authenticated"
access: $all
# allow all known users to publish/publish packages
# allow all known users to publish/unpublish packages
# (anyone can register by default, remember?)
publish: $authenticated
unpublish: $authenticated

View File

@@ -90,7 +90,7 @@ packages:
# and three keywords: "$all", "$anonymous", "$authenticated"
access: $all
# allow all known users to publish/publish packages
# allow all known users to publish/unpublish packages
# (anyone can register by default, remember?)
publish: $authenticated
unpublish: $authenticated

View File

@@ -5,8 +5,8 @@
"main": "./build/index.js",
"types": "./build/index.d.ts",
"devDependencies": {
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@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.10"
"verdaccio": "workspace:7.0.0-next-7.12"
},
"scripts": {
"test": "jest",

View File

@@ -3,9 +3,9 @@
"name": "@verdaccio/e2e-ui",
"version": "2.0.0",
"devDependencies": {
"verdaccio": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"verdaccio": "workspace:7.0.0-next-7.12",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/test-helper": "workspace:3.0.0-next-7.2",
"debug": "4.3.4",
"cypress": "^13.6.0",

View File

@@ -1,23 +1,3 @@
[build]
command = "pnpm build"
publish = "build/"
[build.environment]
NPM_FLAGS="--prefix=/dev/null"
NODE_VERSION = "14"
[context.production]
command = "pnpm netlify:build:production"
[context.deploy-preview]
command = "pnpm netlify:build:deployPreview"
[context.branch-deploy]
command = "pnpm netlify:build:deployPreview"
[[plugins]]
package = "../.netlify/netlify-plugin-pnpm"
[[headers]]
for = "/*"
[headers.values]

View File

@@ -137,7 +137,7 @@
"docker": "docker build -t verdaccio/verdaccio:local . --no-cache",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
"lint": "eslint --max-warnings 100 \"**/*.{js,jsx,ts,tsx}\"",
"lint": "eslint --max-warnings 70 \"**/*.{js,jsx,ts,tsx}\"",
"test": "pnpm --filter \"./packages/**\" test",
"test:e2e:cli": "pnpm --filter ...@verdaccio/e2e-cli-* test -- --coverage=false",
"test:e2e:ui": "pnpm --filter ...@verdaccio/e2e-ui test",

View File

@@ -1,5 +1,30 @@
# @verdaccio/api
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/store@7.0.0-next-7.12
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/config@7.0.0-next-7.12
- @verdaccio/auth@7.0.0-next-7.12
- @verdaccio/middleware@7.0.0-next-7.12
- @verdaccio/utils@7.0.0-next-7.12
- @verdaccio/logger@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- Updated dependencies [c9962fe]
- @verdaccio/config@7.0.0-next-7.11
- @verdaccio/auth@7.0.0-next-7.11
- @verdaccio/middleware@7.0.0-next-7.11
- @verdaccio/store@7.0.0-next-7.11
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/utils@7.0.0-next-7.11
- @verdaccio/logger@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/api",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/middleware": "workspace:7.0.0-next-7.10",
"@verdaccio/store": "workspace:7.0.0-next-7.10",
"@verdaccio/utils": "workspace:7.0.0-next-7.10",
"@verdaccio/auth": "workspace:7.0.0-next-7.12",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"@verdaccio/middleware": "workspace:7.0.0-next-7.12",
"@verdaccio/store": "workspace:7.0.0-next-7.12",
"@verdaccio/utils": "workspace:7.0.0-next-7.12",
"abortcontroller-polyfill": "1.7.5",
"body-parser": "1.20.2",
"cookies": "0.9.0",
@@ -52,7 +52,7 @@
"express": "4.18.2",
"lodash": "4.17.21",
"mime": "2.6.0",
"semver": "7.5.4"
"semver": "7.6.0"
},
"devDependencies": {
"@verdaccio/test-helper": "workspace:3.0.0-next-7.2",

View File

@@ -67,7 +67,7 @@ export default function (route: Router, auth: Auth, storage: Storage): void {
const { package: pkgName, filename } = req.params;
const abort = new AbortController();
try {
const stream = (await storage.getTarballNext(pkgName, filename, {
const stream = (await storage.getTarball(pkgName, filename, {
signal: abort.signal,
// TODO: review why this param
// enableRemote: true,

View File

@@ -50,12 +50,13 @@ export default function (route, auth: Auth, storage: Storage): void {
from = parseInt(from, 10) || 0;
try {
debug('storage search initiated');
data = await storage.search({
query,
url,
abort,
});
debug('stream finish');
debug('storage items tota: %o', data.length);
const checkAccessPromises: searchUtils.SearchItemPkg[] = await Promise.all(
data.map((pkgItem) => {
return checkAccess(pkgItem, auth, req.remote_user);

View File

@@ -10,7 +10,7 @@ auth:
uplinks:
ver:
url: https://registry.verdaccio.org
url: https://registry.npmjs.org
security:
api:

View File

@@ -7,7 +7,7 @@ web:
uplinks:
ver:
url: https://registry.verdaccio.org
url: https://registry.npmjs.org
log: { type: stdout, format: pretty, level: trace }

View File

@@ -1,5 +1,30 @@
# @verdaccio/auth
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/config@7.0.0-next-7.12
- @verdaccio/loaders@7.0.0-next-7.12
- verdaccio-htpasswd@12.0.0-next-7.12
- @verdaccio/utils@7.0.0-next-7.12
- @verdaccio/signature@7.0.0-next.3
- @verdaccio/logger@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- Updated dependencies [c9962fe]
- @verdaccio/config@7.0.0-next-7.11
- @verdaccio/loaders@7.0.0-next-7.11
- verdaccio-htpasswd@12.0.0-next-7.11
- @verdaccio/signature@7.0.0-next.3
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/utils@7.0.0-next-7.11
- @verdaccio/logger@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/auth",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"@verdaccio/loaders": "workspace:7.0.0-next-7.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/loaders": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"@verdaccio/signature": "workspace:7.0.0-next.3",
"@verdaccio/utils": "workspace:7.0.0-next-7.10",
"@verdaccio/utils": "workspace:7.0.0-next-7.12",
"debug": "4.3.4",
"lodash": "4.17.21",
"verdaccio-htpasswd": "workspace:12.0.0-next-7.10"
"verdaccio-htpasswd": "workspace:12.0.0-next-7.12"
},
"devDependencies": {
"express": "4.18.2",
"supertest": "6.3.4",
"@verdaccio/middleware": "workspace:7.0.0-next-7.10",
"@verdaccio/middleware": "workspace:7.0.0-next-7.12",
"@verdaccio/types": "workspace:12.0.0-next.2"
},
"funding": {

View File

@@ -558,9 +558,10 @@ describe('AuthTest', () => {
const getServer = async function (auth) {
const app = express();
app.use(express.json({ strict: false, limit: '10mb' }));
app.use(auth.apiJWTmiddleware());
// @ts-expect-error
app.use(errorReportingMiddleware(logger));
app.use(auth.apiJWTmiddleware());
app.get('/*', (req, res, next) => {
if ((req as $RequestExtend).remote_user.error) {
next(new Error((req as $RequestExtend).remote_user.error));
@@ -575,6 +576,7 @@ describe('AuthTest', () => {
app.use(final);
return app;
};
describe('legacy signature', () => {
describe('error cases', () => {
test('should handle invalid auth token', async () => {

View File

@@ -1,5 +1,24 @@
# @verdaccio/cli
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/node-api@7.0.0-next-7.12
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/config@7.0.0-next-7.12
- @verdaccio/logger@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- Updated dependencies [c9962fe]
- @verdaccio/config@7.0.0-next-7.11
- @verdaccio/node-api@7.0.0-next-7.11
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/logger@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/cli",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/node-api": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"@verdaccio/node-api": "workspace:7.0.0-next-7.12",
"clipanion": "3.2.1",
"envinfo": "7.11.0",
"kleur": "4.1.5",
"semver": "7.5.4"
"semver": "7.6.0"
},
"devDependencies": {
"ts-node": "10.9.2"

View File

@@ -1,5 +1,23 @@
# @verdaccio/config
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/utils@7.0.0-next-7.12
## 7.0.0-next-7.11
### Minor Changes
- c9962fe: feat: forbidden user interface
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/utils@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/config",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/utils": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/utils": "workspace:7.0.0-next-7.12",
"debug": "4.3.4",
"js-yaml": "4.1.0",
"lodash": "4.17.21",

View File

@@ -82,7 +82,7 @@ packages:
# and three keywords: "$all", "$anonymous", "$authenticated"
access: $all
# allow all known users to publish/publish packages
# allow all known users to publish/unpublish packages
# (anyone can register by default, remember?)
publish: $authenticated
unpublish: $authenticated

View File

@@ -86,7 +86,7 @@ packages:
# and three keywords: "$all", "$anonymous", "$authenticated"
access: $all
# Allow all known users to publish/publish packages
# Allow all known users to publish/unpublish packages
# (anyone can register by default, remember?)
publish: $authenticated
unpublish: $authenticated

View File

@@ -1,9 +1,12 @@
import assert from 'assert';
import buildDebug from 'debug';
import _ from 'lodash';
import { errorUtils } from '@verdaccio/core';
import { PackageAccess } from '@verdaccio/types';
const debug = buildDebug('verdaccio:config:utils');
export interface LegacyPackageList {
[key: string]: PackageAccess;
}
@@ -61,6 +64,7 @@ export function normalisePackageAccess(packages: LegacyPackageList): LegacyPacka
for (const pkg in packages) {
if (Object.prototype.hasOwnProperty.call(packages, pkg)) {
const packageAccess = packages[pkg];
debug('package access %s for %s ', packageAccess, pkg);
const isInvalid = _.isObject(packageAccess) && _.isArray(packageAccess) === false;
assert(isInvalid, `CONFIG: bad "'${pkg}'" package description (object expected)`);

View File

@@ -1,5 +1,9 @@
# @verdaccio/core
## 7.0.0-next-7.12
## 7.0.0-next-7.11
## 7.0.0-next-7.10
## 7.0.0-next-7.9

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/core",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"description": "core utilities",
"keywords": [
"private",
@@ -35,7 +35,7 @@
"dependencies": {
"http-errors": "2.0.0",
"http-status-codes": "2.3.0",
"semver": "7.5.4",
"semver": "7.6.0",
"ajv": "8.12.0",
"process-warning": "1.0.0",
"core-js": "3.35.0"

View File

@@ -1,5 +1,21 @@
# Change Log
## 12.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/url@12.0.0-next-7.12
- @verdaccio/utils@7.0.0-next-7.12
## 12.0.0-next-7.11
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/url@12.0.0-next-7.11
- @verdaccio/utils@7.0.0-next-7.11
## 12.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/tarball",
"version": "12.0.0-next-7.10",
"version": "12.0.0-next-7.12",
"description": "tarball utilities resolver",
"keywords": [
"private",
@@ -34,9 +34,9 @@
},
"dependencies": {
"debug": "4.3.4",
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/url": "workspace:12.0.0-next-7.10",
"@verdaccio/utils": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/url": "workspace:12.0.0-next-7.12",
"@verdaccio/utils": "workspace:7.0.0-next-7.12",
"lodash": "4.17.21"
},
"devDependencies": {

View File

@@ -1,5 +1,17 @@
# Change Log
## 12.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
## 12.0.0-next-7.11
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
## 12.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/url",
"version": "12.0.0-next-7.10",
"version": "12.0.0-next-7.12",
"description": "url utilities resolver",
"keywords": [
"private",
@@ -33,7 +33,7 @@
"access": "public"
},
"dependencies": {
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"debug": "4.3.4",
"lodash": "4.17.21",
"validator": "13.11.0"

View File

@@ -1,5 +1,19 @@
# @verdaccio/hooks
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/logger@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/logger@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/hooks",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"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.10",
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"@verdaccio/auth": "workspace:7.0.0-next-7.12",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/types": "workspace:12.0.0-next.2",
"nock": "13.5.1"
},

View File

@@ -1,5 +1,17 @@
# @verdaccio/loaders
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/logger@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- @verdaccio/logger@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/loaders",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"debug": "4.3.4",
"lodash": "4.17.21"
},
"devDependencies": {
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/types": "workspace:12.0.0-next.2",
"@verdaccio-scope/verdaccio-auth-foo": "0.0.2",
"verdaccio-auth-memory": "workspace:*",

View File

@@ -1,5 +1,17 @@
# @verdaccio/logger-7
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/logger-commons@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- @verdaccio/logger-commons@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/logger-7",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/logger-commons": "workspace:7.0.0-next-7.12",
"pino": "7.11.0"
},
"devDependencies": {

View File

@@ -1,5 +1,17 @@
# @verdaccio/logger-commons
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/logger-commons",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/logger-prettify": "workspace:7.0.0-next.1",
"debug": "4.3.4",
"colorette": "2.0.20"

View File

@@ -1,5 +1,17 @@
# @verdaccio/logger
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/logger-commons@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- @verdaccio/logger-commons@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/logger",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/logger-commons": "workspace:7.0.0-next-7.12",
"pino": "8.17.2"
},
"devDependencies": {

View File

@@ -1,5 +1,24 @@
# @verdaccio/middleware
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/config@7.0.0-next-7.12
- @verdaccio/url@12.0.0-next-7.12
- @verdaccio/utils@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- Updated dependencies [c9962fe]
- @verdaccio/config@7.0.0-next-7.11
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/url@12.0.0-next-7.11
- @verdaccio/utils@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/middleware",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/utils": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"@verdaccio/url": "workspace:12.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/utils": "workspace:7.0.0-next-7.12",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/url": "workspace:12.0.0-next-7.12",
"debug": "4.3.4",
"lru-cache": "7.18.3",
"express": "4.18.2",
@@ -54,7 +54,7 @@
"url": "https://opencollective.com/verdaccio"
},
"devDependencies": {
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"body-parser": "1.20.2",
"supertest": "6.3.4"
}

View File

@@ -1,5 +1,26 @@
# @verdaccio/node-api
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/server@7.0.0-next-7.12
- @verdaccio/server-fastify@7.0.0-next-7.12
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/config@7.0.0-next-7.12
- @verdaccio/logger@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- Updated dependencies [c9962fe]
- @verdaccio/config@7.0.0-next-7.11
- @verdaccio/server@7.0.0-next-7.11
- @verdaccio/server-fastify@7.0.0-next-7.11
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/logger@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/node-api",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/server": "workspace:7.0.0-next-7.10",
"@verdaccio/server-fastify": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"@verdaccio/server": "workspace:7.0.0-next-7.12",
"@verdaccio/server-fastify": "workspace:7.0.0-next-7.12",
"core-js": "3.35.0",
"debug": "4.3.4",
"lodash": "4.17.21"

View File

@@ -1,5 +1,20 @@
# Change Log
## 12.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/config@7.0.0-next-7.12
## 12.0.0-next-7.11
### Patch Changes
- Updated dependencies [c9962fe]
- @verdaccio/config@7.0.0-next-7.11
- @verdaccio/core@7.0.0-next-7.11
## 12.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-audit",
"version": "12.0.0-next-7.10",
"version": "12.0.0-next-7.12",
"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.10",
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"express": "4.18.2",
"https-proxy-agent": "5.0.1",
"node-fetch": "cjs"
},
"devDependencies": {
"@verdaccio/auth": "workspace:7.0.0-next-7.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/auth": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"@verdaccio/types": "workspace:12.0.0-next.2",
"nock": "13.5.1",
"supertest": "6.3.4"

View File

@@ -1,5 +1,17 @@
# Change Log
## 12.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
## 12.0.0-next-7.11
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
## 12.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-auth-memory",
"version": "12.0.0-next-7.10",
"version": "12.0.0-next-7.12",
"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.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"debug": "4.3.4"
},
"devDependencies": {
"@types/debug": "^4.1.12",
"@verdaccio/config": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/types": "workspace:12.0.0-next.2"
},
"scripts": {

View File

@@ -1,5 +1,17 @@
# Change Log
## 12.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
## 12.0.0-next-7.11
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
## 12.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-htpasswd",
"version": "12.0.0-next-7.10",
"version": "12.0.0-next-7.12",
"description": "htpasswd auth plugin for Verdaccio",
"keywords": [
"private",
@@ -33,7 +33,7 @@
"node": ">=12"
},
"dependencies": {
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@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.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"mockdate": "3.0.5"
},
"scripts": {

View File

@@ -1,5 +1,19 @@
# Change Log
## 12.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/utils@7.0.0-next-7.12
## 12.0.0-next-7.11
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/utils@7.0.0-next-7.11
## 12.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/local-storage",
"version": "12.0.0-next-7.10",
"version": "12.0.0-next-7.12",
"description": "Local storage implementation",
"keywords": [
"private",
@@ -36,9 +36,9 @@
"node": ">=18"
},
"dependencies": {
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/file-locking": "workspace:12.0.0-next.1",
"@verdaccio/utils": "workspace:7.0.0-next-7.10",
"@verdaccio/utils": "workspace:7.0.0-next-7.12",
"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.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"@verdaccio/test-helper": "workspace:3.0.0-next-7.2",
"@verdaccio/types": "workspace:12.0.0-next.2",
"minimatch": "9.0.3"

View File

@@ -64,12 +64,6 @@ export async function searchOnStorage(
): Promise<searchUtils.SearchItemPkg[]> {
const matchedStorages = Array.from(storages);
const storageFolders = Array.from(storages.keys());
// const getScopedFolders = async (pkgName) => {
// const scopedPackages = await getFolders(join(storagePath, pkgName), '*');
// const listScoped = scopedPackages.map((scoped) => ({
// name: `${pkgName}/${scoped}`,
// }));
// };
debug('search on %o', storagePath);
debug('storage folders %o', matchedStorages.length);
let results: searchUtils.SearchItemPkg[] = [];

View File

@@ -136,13 +136,17 @@ class LocalDatabase extends pluginUtils.Plugin<{}> implements Storage {
});
}
/**
*
* @param query
* @returns
*/
public async search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]> {
debug('search query to %o', query.text);
const results: searchUtils.SearchItem[] = [];
const storagePath = this.getStoragePath();
const packagesOnStorage = await this.filterByQuery(
await searchOnStorage(storagePath, this.storages),
query
);
const localResults = await searchOnStorage(storagePath, this.storages);
const packagesOnStorage = await this.filterByQuery(localResults, query);
debug('packages found %o', packagesOnStorage.length);
for (let storage of packagesOnStorage) {
// check if package is listed on the cache private database

View File

@@ -45,7 +45,6 @@ describe('searchOnFolders', () => {
{
name: 'pkg1',
},
{
name: 'pkg2',
},

View File

@@ -1,5 +1,17 @@
# Change Log
## 12.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
## 12.0.0-next-7.11
### Patch Changes
- @verdaccio/core@7.0.0-next-7.11
## 12.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio-memory",
"version": "12.0.0-next-7.10",
"version": "12.0.0-next-7.12",
"description": "Storage implementation in memory",
"keywords": [
"private",
@@ -30,15 +30,15 @@
"node": ">=18"
},
"dependencies": {
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"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.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.10"
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12"
},
"scripts": {
"clean": "rimraf ./build",

View File

@@ -1,5 +1,13 @@
# @verdaccio/ui-theme
## 7.0.0-next-7.12
## 7.0.0-next-7.11
### Minor Changes
- c9962fe: feat: forbidden user interface
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/ui-theme",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"description": "Verdaccio User Interface",
"author": {
"name": "Verdaccio Contributors",
@@ -27,9 +27,9 @@
"@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.10",
"@verdaccio/node-api": "workspace:7.0.0-next-7.12",
"@verdaccio/types": "workspace:*",
"@verdaccio/ui-components": "workspace:3.0.0-next-7.4",
"@verdaccio/ui-components": "workspace:3.0.0-next-7.5",
"babel-loader": "8.3.0",
"babel-plugin-dynamic-import-node": "2.3.3",
"country-flag-icons": "1.5.9",

View File

@@ -631,10 +631,6 @@
"username": "Tiny-Fendy",
"id": 8954107
},
{
"username": "tomcoonen",
"id": 988013
},
{
"username": "oltodo",
"id": 483842
@@ -699,10 +695,6 @@
"username": "RodrigoBalest",
"id": 4810463
},
{
"username": "grrowl",
"id": 907140
},
{
"username": "iketiunn",
"id": 10249208
@@ -783,6 +775,14 @@
"username": "melodyVoid",
"id": 26846212
},
{
"username": "tomcoonen",
"id": 988013
},
{
"username": "grrowl",
"id": 907140
},
{
"username": "tlvince",
"id": 323761
@@ -936,8 +936,8 @@
"id": 20465797
},
{
"username": "Mearman",
"id": 1331872
"username": "einfallstoll",
"id": 619048
},
{
"username": "hedocode",
@@ -1023,6 +1023,10 @@
"username": "bchenSyd",
"id": 8207081
},
{
"username": "Mearman",
"id": 1331872
},
{
"username": "patroclos",
"id": 5959583
@@ -1091,10 +1095,6 @@
"username": "morrain",
"id": 9381634
},
{
"username": "einfallstoll",
"id": 619048
},
{
"username": "felipeplets",
"id": 119980
@@ -1119,6 +1119,10 @@
"username": "gecruz",
"id": 29457476
},
{
"username": "gweesin",
"id": 42909374
},
{
"username": "iztsv",
"id": 3539802

View File

@@ -147,9 +147,11 @@
"error": {
"unspecific": "Something went wrong.",
"404": {
"page-not-found": "404 - Page not found",
"sorry-we-could-not-find-it": "Sorry, we couldn't find it..."
},
"401": {
"sorry-no-access": "Sorry, you need credentials access to see this page."
},
"app-context-not-correct-used": "The app context was not used correctly",
"theme-context-not-correct-used": "The theme context was not used correctly",
"package-meta-is-required-at-detail-context": "packageMeta is required at DetailContext"

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { useSelector } from 'react-redux';
import { Loading, NotFound, RootState, VersionLayout } from '@verdaccio/ui-components';
import { Forbidden, Loading, NotFound, RootState, VersionLayout } from '@verdaccio/ui-components';
const Version: React.FC = () => {
const manifestStore = useSelector((state: RootState) => state.manifest);
@@ -11,10 +11,13 @@ const Version: React.FC = () => {
return <Loading />;
}
if (manifestStore.forbidden) {
return <Forbidden />;
}
if (manifestStore.hasNotBeenFound) {
return <NotFound />;
}
return <VersionLayout />;
};

View File

@@ -1,5 +1,22 @@
# @verdaccio/proxy
## 7.0.0-next-7.12
### Patch Changes
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/config@7.0.0-next-7.12
- @verdaccio/utils@7.0.0-next-7.12
## 7.0.0-next-7.11
### Patch Changes
- Updated dependencies [c9962fe]
- @verdaccio/config@7.0.0-next-7.11
- @verdaccio/core@7.0.0-next-7.11
- @verdaccio/utils@7.0.0-next-7.11
## 7.0.0-next-7.10
### Patch Changes

View File

@@ -4,9 +4,9 @@ module.exports = Object.assign({}, config, {
coverageThreshold: {
global: {
branches: 79,
functions: 94,
lines: 87,
statements: 87,
functions: 90,
lines: 86,
statements: 86,
},
},
});

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/proxy",
"version": "7.0.0-next-7.10",
"version": "7.0.0-next-7.12",
"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.10",
"@verdaccio/core": "workspace:7.0.0-next-7.10",
"@verdaccio/utils": "workspace:7.0.0-next-7.10",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/utils": "workspace:7.0.0-next-7.12",
"JSONStream": "1.3.5",
"debug": "4.3.4",
"got-cjs": "12.5.4",
@@ -48,13 +48,13 @@
"lodash": "4.17.21"
},
"devDependencies": {
"@verdaccio/logger": "workspace:7.0.0-next-7.10",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"@verdaccio/types": "workspace:12.0.0-next.2",
"get-stream": "^6.0.1",
"nock": "13.5.1",
"node-mocks-http": "1.14.1",
"p-cancelable": "2.1.1",
"semver": "7.5.4"
"semver": "7.6.0"
},
"funding": {
"type": "opencollective",

View File

@@ -1 +1,2 @@
export * from './proxy';
export * from './uplink-util';

View File

@@ -1,15 +1,15 @@
import { logger } from '@verdaccio/logger';
import { IProxy, ProxyStorage } from '@verdaccio/proxy';
import { Config, Manifest } from '@verdaccio/types';
import { Config, Logger, Manifest } from '@verdaccio/types';
import { IProxy, ProxyStorage } from './index';
export interface ProxyInstanceList {
[key: string]: IProxy;
}
/**
* Set up the Up Storage for each link.
* Set up uplinks for each proxy configuration.
*/
export function setupUpLinks(config: Config): ProxyInstanceList {
export function setupUpLinks(config: Config, logger: Logger): ProxyInstanceList {
const uplinks: ProxyInstanceList = {};
for (const uplinkName in config.uplinks) {
@@ -38,5 +38,5 @@ export function updateVersionsHiddenUpLinkNext(manifest: Manifest, upLink: IProx
versions[version][Symbol.for('__verdaccio_uplink')] = upLink.upname;
}
return { ...manifest, versions: versions };
return { ...manifest, versions };
}

View File

@@ -0,0 +1,3 @@
{
"extends": "../../.babelrc"
}

View File

@@ -0,0 +1,7 @@
# @verdaccio/search-indexer
## 7.0.0-next-7.1
### Patch Changes
- cce258e: refactor: search package

View File

@@ -0,0 +1,12 @@
const config = require('../../jest/config');
module.exports = Object.assign({}, config, {
coverageThreshold: {
global: {
branches: 79,
functions: 94,
lines: 87,
statements: 87,
},
},
});

View File

@@ -0,0 +1,49 @@
{
"name": "@verdaccio/search-indexer",
"version": "7.0.0-next-7.1",
"description": "verdaccio search indexer",
"main": "./build/dist.js",
"types": "build/index.d.ts",
"author": {
"name": "Juan Picado",
"email": "juanpicado19@gmail.com"
},
"repository": {
"type": "https",
"url": "https://github.com/verdaccio/verdaccio"
},
"license": "MIT",
"homepage": "https://verdaccio.org",
"keywords": [
"private",
"package",
"repository",
"registry",
"enterprise",
"modules",
"proxy",
"server",
"verdaccio"
],
"engines": {
"node": ">=18"
},
"scripts": {
"clean": "rimraf ./build",
"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",
"build": "esbuild src/index.ts --bundle --outfile=build/dist.js --platform=node --target=node12 && pnpm run build:types"
},
"devDependencies": {
"@verdaccio/types": "workspace:12.0.0-next.2",
"@orama/orama": "1.2.4",
"debug": "4.3.4",
"esbuild": "0.14.10"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/verdaccio"
}
}

View File

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

View File

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

View File

@@ -0,0 +1,23 @@
{
"extends": "../../tsconfig.reference.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./build",
"noImplicitAny": false
},
"include": ["src/**/*.ts", "types/*.d.ts"],
"references": [
{
"path": "../config"
},
{
"path": "../core/core"
},
{
"path": "../logger/logger"
},
{
"path": "../utils"
}
]
}

View File

@@ -1,763 +1,11 @@
# @verdaccio/proxy
# @verdaccio/search
## 7.0.0-next.2
### Major Changes
- e7ebccb61: update major dependencies, remove old nodejs support
### Minor Changes
- daceb6d87: restore legacy support
## 7.0.0-next.1
## 7.0.0-next-7.1
### Patch Changes
- 35cc57b79: fix: keyword undefined errors
## 7.0.0-next.0
### Major Changes
- feat!: bump to v7
## 6.0.0
### Minor Changes
- 15e58d988: feat: add search package utilities
## 6.0.0-6-next.2
### Minor Changes
- 15e58d98: feat: add search package utilities
## 6.0.0-6-next.46
### Patch Changes
- @verdaccio/core@6.0.0-6-next.68
- @verdaccio/config@6.0.0-6-next.68
- @verdaccio/local-storage@11.0.0-6-next.38
- @verdaccio/utils@6.0.0-6-next.36
- @verdaccio/logger@6.0.0-6-next.36
## 6.0.0-6-next.45
### Patch Changes
- Updated dependencies [16e38df8]
- @verdaccio/config@6.0.0-6-next.67
- @verdaccio/core@6.0.0-6-next.67
- @verdaccio/local-storage@11.0.0-6-next.37
- @verdaccio/utils@6.0.0-6-next.35
- @verdaccio/logger@6.0.0-6-next.35
## 6.0.0-6-next.44
### Patch Changes
- @verdaccio/core@6.0.0-6-next.66
- @verdaccio/logger@6.0.0-6-next.34
- @verdaccio/local-storage@11.0.0-6-next.36
- @verdaccio/config@6.0.0-6-next.66
- @verdaccio/utils@6.0.0-6-next.34
## 6.0.0-6-next.43
### Patch Changes
- Updated dependencies [a1da1130]
- @verdaccio/core@6.0.0-6-next.65
- @verdaccio/config@6.0.0-6-next.65
- @verdaccio/local-storage@11.0.0-6-next.35
- @verdaccio/utils@6.0.0-6-next.33
- @verdaccio/logger@6.0.0-6-next.33
## 6.0.0-6-next.42
### Patch Changes
- Updated dependencies [974cd8c1]
- @verdaccio/core@6.0.0-6-next.64
- @verdaccio/config@6.0.0-6-next.64
- @verdaccio/local-storage@11.0.0-6-next.34
- @verdaccio/utils@6.0.0-6-next.32
- @verdaccio/logger@6.0.0-6-next.32
## 6.0.0-6-next.41
### Patch Changes
- Updated dependencies [ddb6a223]
- Updated dependencies [dc571aab]
- @verdaccio/config@6.0.0-6-next.63
- @verdaccio/core@6.0.0-6-next.63
- @verdaccio/local-storage@11.0.0-6-next.33
- @verdaccio/utils@6.0.0-6-next.31
- @verdaccio/logger@6.0.0-6-next.31
## 6.0.0-6-next.40
### Patch Changes
- Updated dependencies [378e907d]
- @verdaccio/core@6.0.0-6-next.62
- @verdaccio/logger@6.0.0-6-next.30
- @verdaccio/local-storage@11.0.0-6-next.32
- @verdaccio/config@6.0.0-6-next.62
- @verdaccio/utils@6.0.0-6-next.30
## 6.0.0-6-next.39
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/config@6.0.0-6-next.61
- @verdaccio/local-storage@11.0.0-6-next.31
- @verdaccio/core@6.0.0-6-next.61
- @verdaccio/utils@6.0.0-6-next.29
- @verdaccio/logger@6.0.0-6-next.29
## 6.0.0-6-next.38
### Minor Changes
- 45c03819: refactor: render html middleware
### Patch Changes
- Updated dependencies [45c03819]
- @verdaccio/config@6.0.0-6-next.60
- @verdaccio/local-storage@11.0.0-6-next.30
- @verdaccio/core@6.0.0-6-next.60
- @verdaccio/logger@6.0.0-6-next.28
- @verdaccio/utils@6.0.0-6-next.28
## 6.0.0-6-next.37
### Patch Changes
- Updated dependencies [65f88b82]
- @verdaccio/logger@6.0.0-6-next.27
- @verdaccio/local-storage@11.0.0-6-next.29
- @verdaccio/core@6.0.0-6-next.59
- @verdaccio/config@6.0.0-6-next.59
- @verdaccio/utils@6.0.0-6-next.27
## 6.0.0-6-next.36
### Patch Changes
- @verdaccio/core@6.0.0-6-next.58
- @verdaccio/config@6.0.0-6-next.58
- @verdaccio/local-storage@11.0.0-6-next.28
- @verdaccio/utils@6.0.0-6-next.26
- @verdaccio/logger@6.0.0-6-next.26
## 6.0.0-6-next.35
### Patch Changes
- @verdaccio/local-storage@11.0.0-6-next.27
- @verdaccio/core@6.0.0-6-next.57
- @verdaccio/config@6.0.0-6-next.57
- @verdaccio/logger@6.0.0-6-next.25
- @verdaccio/utils@6.0.0-6-next.25
## 6.0.0-6-next.34
### Patch Changes
- Updated dependencies [a1986e09]
- @verdaccio/utils@6.0.0-6-next.24
- @verdaccio/config@6.0.0-6-next.56
- @verdaccio/local-storage@11.0.0-6-next.26
- @verdaccio/core@6.0.0-6-next.56
- @verdaccio/logger@6.0.0-6-next.24
## 6.0.0-6-next.33
### Patch Changes
- Updated dependencies [9718e033]
- @verdaccio/config@6.0.0-6-next.55
- @verdaccio/core@6.0.0-6-next.55
- @verdaccio/utils@6.0.0-6-next.23
- @verdaccio/local-storage@11.0.0-6-next.25
- @verdaccio/logger@6.0.0-6-next.23
## 6.0.0-6-next.32
### Patch Changes
- Updated dependencies [ef88da3b]
- @verdaccio/config@6.0.0-6-next.54
- @verdaccio/core@6.0.0-6-next.54
- @verdaccio/logger@6.0.0-6-next.22
- @verdaccio/local-storage@11.0.0-6-next.24
- @verdaccio/utils@6.0.0-6-next.22
## 6.0.0-6-next.31
### Patch Changes
- @verdaccio/core@6.0.0-6-next.53
- @verdaccio/logger@6.0.0-6-next.21
- @verdaccio/local-storage@11.0.0-6-next.23
- @verdaccio/config@6.0.0-6-next.53
- @verdaccio/utils@6.0.0-6-next.21
## 6.0.0-6-next.30
### Patch Changes
- @verdaccio/core@6.0.0-6-next.52
- @verdaccio/config@6.0.0-6-next.52
- @verdaccio/logger@6.0.0-6-next.20
- @verdaccio/local-storage@11.0.0-6-next.22
- @verdaccio/utils@6.0.0-6-next.20
## 6.0.0-6-next.29
### Patch Changes
- Updated dependencies [4b29d715]
- @verdaccio/config@6.0.0-6-next.51
- @verdaccio/core@6.0.0-6-next.51
- @verdaccio/local-storage@11.0.0-6-next.21
- @verdaccio/logger@6.0.0-6-next.19
- @verdaccio/utils@6.0.0-6-next.19
## 6.0.0-6-next.28
### Patch Changes
- @verdaccio/core@6.0.0-6-next.50
- @verdaccio/config@6.0.0-6-next.50
- @verdaccio/logger@6.0.0-6-next.18
- @verdaccio/local-storage@11.0.0-6-next.20
- @verdaccio/utils@6.0.0-6-next.18
## 6.0.0-6-next.27
### Patch Changes
- @verdaccio/local-storage@11.0.0-6-next.19
- @verdaccio/core@6.0.0-6-next.49
- @verdaccio/config@6.0.0-6-next.49
- @verdaccio/logger@6.0.0-6-next.17
- @verdaccio/utils@6.0.0-6-next.17
## 6.0.0-6-next.26
### Patch Changes
- Updated dependencies [43f32687]
- Updated dependencies [9fc2e796]
- Updated dependencies [62c24b63]
- @verdaccio/core@6.0.0-6-next.48
- @verdaccio/config@6.0.0-6-next.48
- @verdaccio/local-storage@11.0.0-6-next.18
- @verdaccio/utils@6.0.0-6-next.16
- @verdaccio/logger@6.0.0-6-next.16
## 6.0.0-6-next.25
### Patch Changes
- @verdaccio/core@6.0.0-6-next.47
- @verdaccio/config@6.0.0-6-next.47
- @verdaccio/logger@6.0.0-6-next.15
- @verdaccio/local-storage@11.0.0-6-next.17
- @verdaccio/utils@6.0.0-6-next.15
## 6.0.0-6-next.24
### Patch Changes
- Updated dependencies [b849128d]
- @verdaccio/core@6.0.0-6-next.8
- @verdaccio/config@6.0.0-6-next.17
- @verdaccio/logger@6.0.0-6-next.14
- @verdaccio/local-storage@11.0.0-6-next.16
- @verdaccio/utils@6.0.0-6-next.14
## 6.0.0-6-next.23
### Patch Changes
- 351aeeaa: fix(deps): @verdaccio/utils should be a prod dep of local-storage
- Updated dependencies [351aeeaa]
- @verdaccio/core@6.0.0-6-next.7
- @verdaccio/logger@6.0.0-6-next.13
- @verdaccio/local-storage@11.0.0-6-next.15
- @verdaccio/config@6.0.0-6-next.16
- @verdaccio/utils@6.0.0-6-next.13
## 6.0.0-6-next.22
### Patch Changes
- Updated dependencies [37274e4c]
- @verdaccio/local-storage@11.0.0-6-next.14
- @verdaccio/core@6.0.0-6-next.6
- @verdaccio/logger@6.0.0-6-next.12
## 6.0.0-6-next.21
### Major Changes
- 292c0a37: feat!: replace deprecated request dependency by got
This is a big refactoring of the core, fetching dependencies, improve code, more tests and better stability. This is essential for the next release, will take some time but would allow modularize more the core.
## Notes
- Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
- Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
- Refactor with promises instead callback wherever is possible
- ~Document the API~
- Improve testing, integration tests
- Bugfix
- Clean up old validations
- Improve performance
## 💥 Breaking changes
- Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
- Write Tarball, Read Tarball methods parameters change, a new set of options like `AbortController` signals are being provided to the `addAbortSignal` can be internally used with Streams when a request is aborted. eg: `addAbortSignal(signal, fs.createReadStream(pathName));`
- `@verdaccio/streams` stream abort support is legacy is being deprecated removed
- Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
### Patch Changes
- Updated dependencies [292c0a37]
- Updated dependencies [a3a209b5]
- Updated dependencies [00d1d2a1]
- @verdaccio/config@6.0.0-6-next.15
- @verdaccio/core@6.0.0-6-next.6
- @verdaccio/logger@6.0.0-6-next.12
- @verdaccio/local-storage@11.0.0-6-next.13
- @verdaccio/utils@6.0.0-6-next.12
## 6.0.0-6-next.20
### Patch Changes
- Updated dependencies [d43894e8]
- Updated dependencies [d08fe29d]
- @verdaccio/config@6.0.0-6-next.14
- @verdaccio/local-storage@11.0.0-6-next.12
- @verdaccio/core@6.0.0-6-next.5
- @verdaccio/streams@11.0.0-6-next.5
- @verdaccio/logger@6.0.0-6-next.11
## 6.0.0-6-next.19
### Major Changes
- 82cb0f2b: feat!: config.logs throw an error, logging config not longer accept array or logs property
### 💥 Breaking change
This is valid
```yaml
log: { type: stdout, format: pretty, level: http }
```
This is invalid
```yaml
logs: { type: stdout, format: pretty, level: http }
```
or
```yaml
logs:
- [{ type: stdout, format: pretty, level: http }]
```
### Minor Changes
- 5167bb52: feat: ui search support for remote, local and private packages
The command `npm search` search globally and return all matches, with this improvement the user interface
is powered with the same capabilities.
The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
### Patch Changes
- Updated dependencies [82cb0f2b]
- Updated dependencies [5167bb52]
- @verdaccio/config@6.0.0-6-next.13
- @verdaccio/core@6.0.0-6-next.5
- @verdaccio/logger@6.0.0-6-next.11
- @verdaccio/local-storage@11.0.0-6-next.12
- @verdaccio/utils@6.0.0-6-next.11
- @verdaccio/streams@11.0.0-6-next.5
## 6.0.0-6-next.18
### Patch Changes
- Updated dependencies [b78f3525]
- @verdaccio/logger@6.0.0-6-next.10
## 6.0.0-6-next.17
### Patch Changes
- Updated dependencies [730b5d8c]
- @verdaccio/logger@6.0.0-6-next.9
## 6.0.0-6-next.16
### Patch Changes
- Updated dependencies [a828271d]
- Updated dependencies [24b9be02]
- Updated dependencies [e75c0a3b]
- Updated dependencies [b13a3fef]
- @verdaccio/local-storage@11.0.0-6-next.11
- @verdaccio/utils@6.0.0-6-next.10
- @verdaccio/core@6.0.0-6-next.4
- @verdaccio/logger@6.0.0-6-next.8
- @verdaccio/config@6.0.0-6-next.12
- @verdaccio/streams@11.0.0-6-next.5
## 6.0.0-6-next.15
### Patch Changes
- Updated dependencies [f86c31ed]
- @verdaccio/utils@6.0.0-6-next.9
- @verdaccio/config@6.0.0-6-next.11
- @verdaccio/local-storage@11.0.0-6-next.10
## 6.0.0-6-next.14
### Patch Changes
- Updated dependencies [6c1eb021]
- @verdaccio/core@6.0.0-6-next.3
- @verdaccio/logger@6.0.0-6-next.7
- @verdaccio/config@6.0.0-6-next.10
- @verdaccio/local-storage@11.0.0-6-next.10
- @verdaccio/utils@6.0.0-6-next.8
## 6.0.0-6-next.13
### Minor Changes
- b702ea36: abort search request support for proxy
- 154b2ecd: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
### Patch Changes
- Updated dependencies [794af76c]
- Updated dependencies [154b2ecd]
- @verdaccio/config@6.0.0-6-next.9
- @verdaccio/core@6.0.0-6-next.2
- @verdaccio/streams@11.0.0-6-next.5
- @verdaccio/logger@6.0.0-6-next.6
- @verdaccio/utils@6.0.0-6-next.7
- @verdaccio/local-storage@11.0.0-6-next.9
## 6.0.0-6-next.12
### Patch Changes
- Updated dependencies [2c594910]
- @verdaccio/logger@6.0.0-6-next.5
## 6.0.0-6-next.11
### Major Changes
- 459b6fa7: refactor: search v1 endpoint and local-database
- refactor search `api v1` endpoint, improve performance
- remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
- refactor method storage class
- create new module `core` to reduce the ammount of modules with utilities
- use `undici` instead `node-fetch`
- use `fastify` instead `express` for functional test
### Breaking changes
- plugin storage API changes
- remove old search endpoint (return 404)
- filter local private packages at plugin level
The storage api changes for methods `get`, `add`, `remove` as promise base. The `search` methods also changes and recieves a `query` object that contains all query params from the client.
```ts
export interface IPluginStorage<T> extends IPlugin {
add(name: string): Promise<void>;
remove(name: string): Promise<void>;
get(): Promise<any>;
init(): Promise<void>;
getSecret(): Promise<string>;
setSecret(secret: string): Promise<any>;
getPackageStorage(packageInfo: string): IPackageStorage;
search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
saveToken(token: Token): Promise<any>;
deleteToken(user: string, tokenKey: string): Promise<any>;
readTokens(filter: TokenFilter): Promise<Token[]>;
}
```
### Patch Changes
- Updated dependencies [459b6fa7]
- @verdaccio/config@6.0.0-6-next.8
- @verdaccio/commons-api@11.0.0-6-next.4
- @verdaccio/core@6.0.0-6-next.1
- @verdaccio/local-storage@11.0.0-6-next.8
- @verdaccio/streams@11.0.0-6-next.4
- @verdaccio/utils@6.0.0-6-next.6
- @verdaccio/logger@6.0.0-6-next.4
## 6.0.0-6-next.10
### Patch Changes
- Updated dependencies [df0da3d6]
- @verdaccio/local-storage@11.0.0-6-next.7
## 6.0.0-6-next.9
### Patch Changes
- Updated dependencies [d2c65da9]
- @verdaccio/utils@6.0.0-6-next.5
- @verdaccio/config@6.0.0-6-next.7
## 6.0.0-6-next.8
### Patch Changes
- Updated dependencies [1b217fd3]
- @verdaccio/config@6.0.0-6-next.6
- @verdaccio/local-storage@11.0.0-6-next.6
## 6.0.0-6-next.7
### Patch Changes
- Updated dependencies [1810ed0d]
- Updated dependencies [648575aa]
- @verdaccio/config@6.0.0-6-next.5
- @verdaccio/utils@6.0.0-6-next.4
## 6.0.0-6-next.6
### Patch Changes
- Updated dependencies [5c5057fc]
- @verdaccio/config@6.0.0-6-next.4
- @verdaccio/logger@6.0.0-6-next.4
- @verdaccio/local-storage@11.0.0-6-next.5
- @verdaccio/streams@11.0.0-alpha.3
## 6.0.0-6-next.5
### Patch Changes
- Updated dependencies [cb2281a5]
- @verdaccio/local-storage@11.0.0-6-next.5
## 5.0.0-alpha.4
### Patch Changes
- fecbb9be: chore: add release step to private regisry on merge changeset pr
- Updated dependencies [fecbb9be]
- @verdaccio/local-storage@10.0.0-alpha.4
- @verdaccio/config@5.0.0-alpha.3
- @verdaccio/commons-api@10.0.0-alpha.3
- @verdaccio/streams@10.0.0-alpha.3
- @verdaccio/logger@5.0.0-alpha.3
- @verdaccio/utils@5.0.0-alpha.3
## 5.0.0-alpha.3
### Minor Changes
- 54c58d1e: feat: add server rate limit protection to all request
To modify custom values, use the server settings property.
```markdown
server:
## https://www.npmjs.com/package/express-rate-limit#configuration-options
rateLimit:
windowMs: 1000
max: 10000
```
The values are intended to be high, if you want to improve security of your server consider
using different values.
### Patch Changes
- Updated dependencies [54c58d1e]
- @verdaccio/config@5.0.0-alpha.2
- @verdaccio/commons-api@10.0.0-alpha.2
- @verdaccio/local-storage@10.0.0-alpha.3
- @verdaccio/streams@10.0.0-alpha.2
- @verdaccio/logger@5.0.0-alpha.2
- @verdaccio/utils@5.0.0-alpha.2
## 5.0.0-alpha.2
### Patch Changes
- Updated dependencies [2a327c4b]
- @verdaccio/local-storage@10.0.0-alpha.2
## 5.0.0-alpha.1
### Major Changes
- d87fa026: feat!: experiments config renamed to flags
- The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
```js
flags: token: false;
search: false;
```
- The `self_path` property from the config file is being removed in favor of `config_file` full path.
- Refactor `config` module, better types and utilities
- da1ee9c8: - Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
- Introduce environment variables for legacy tokens
### Code Improvements
- Add debug library for improve developer experience
### Breaking change
- The new signature invalidates all previous tokens generated by Verdaccio 4 or previous versions.
- The secret key must have 32 characters long.
### New environment variables
- `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
- `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
### Minor Changes
- 26b494cb: feat: add typescript project references settings
Reading https://ebaytech.berlin/optimizing-multi-package-apps-with-typescript-project-references-d5c57a3b4440 I realized I can use project references to solve the issue to pre-compile modules on develop mode.
It allows to navigate (IDE) trough the packages without need compile the packages.
Add two `tsconfig`, one using the previous existing configuration that is able to produce declaration files (`tsconfig.build`) and a new one `tsconfig` which is enables [_projects references_](https://www.typescriptlang.org/docs/handbook/project-references.html).
### Patch Changes
- ae52ba35: refactor: migrate request to node-fetch at hooks package
- b57b4338: Enable prerelease mode with **changesets**
- 31af0164: ESLint Warnings Fixed
Related to issue #1461
- max-len: most of the sensible max-len errors are fixed
- no-unused-vars: most of these types of errors are fixed by deleting not needed declarations
- @typescript-eslint/no-unused-vars: same as above
- Updated dependencies [d87fa026]
- Updated dependencies [da1ee9c8]
- Updated dependencies [26b494cb]
- Updated dependencies [b57b4338]
- Updated dependencies [add778d5]
- Updated dependencies [31af0164]
- @verdaccio/config@5.0.0-alpha.1
- @verdaccio/commons-api@10.0.0-alpha.1
- @verdaccio/local-storage@10.0.0-alpha.1
- @verdaccio/streams@10.0.0-alpha.1
- @verdaccio/logger@5.0.0-alpha.1
- @verdaccio/utils@5.0.0-alpha.1
## 5.0.0-alpha.1
### Major Changes
- d87fa0268: feat!: experiments config renamed to flags
- The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
```js
flags: token: false;
search: false;
```
- The `self_path` property from the config file is being removed in favor of `config_file` full path.
- Refactor `config` module, better types and utilities
- da1ee9c82: - Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
- Introduce environment variables for legacy tokens
### Code Improvements
- Add debug library for improve developer experience
### Breaking change
- The new signature invalidates all previous tokens generated by Verdaccio 4 or previous versions.
- The secret key must have 32 characters long.
### New environment variables
- `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
- `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
### Minor Changes
- 26b494cbd: feat: add typescript project references settings
Reading https://ebaytech.berlin/optimizing-multi-package-apps-with-typescript-project-references-d5c57a3b4440 I realized I can use project references to solve the issue to pre-compile modules on develop mode.
It allows to navigate (IDE) trough the packages without need compile the packages.
Add two `tsconfig`, one using the previous existing configuration that is able to produce declaration files (`tsconfig.build`) and a new one `tsconfig` which is enables [_projects references_](https://www.typescriptlang.org/docs/handbook/project-references.html).
### Patch Changes
- ae52ba352: refactor: migrate request to node-fetch at hooks package
- b57b43388: Enable prerelease mode with **changesets**
- 31af01641: ESLint Warnings Fixed
Related to issue #1461
- max-len: most of the sensible max-len errors are fixed
- no-unused-vars: most of these types of errors are fixed by deleting not needed declarations
- @typescript-eslint/no-unused-vars: same as above
- Updated dependencies [d87fa0268]
- Updated dependencies [da1ee9c82]
- Updated dependencies [26b494cbd]
- Updated dependencies [b57b43388]
- Updated dependencies [add778d55]
- Updated dependencies [31af01641]
- @verdaccio/config@5.0.0-alpha.1
- @verdaccio/commons-api@10.0.0-alpha.0
- @verdaccio/local-storage@10.0.0-alpha.0
- @verdaccio/streams@10.0.0-alpha.0
- @verdaccio/logger@5.0.0-alpha.1
- @verdaccio/utils@5.0.0-alpha.1
- cce258e: refactor: search package
- @verdaccio/core@7.0.0-next-7.12
- @verdaccio/config@7.0.0-next-7.12
- @verdaccio/proxy@7.0.0-next-7.12
- @verdaccio/logger@7.0.0-next-7.12

View File

@@ -3,10 +3,9 @@ const config = require('../../jest/config');
module.exports = Object.assign({}, config, {
coverageThreshold: {
global: {
branches: 79,
functions: 94,
lines: 87,
statements: 87,
branches: 0,
functions: 0,
lines: 0,
},
},
});

View File

@@ -1,8 +1,8 @@
{
"name": "@verdaccio/search",
"version": "7.0.0-next.2",
"description": "verdaccio search utitlity tools",
"main": "./build/dist.js",
"version": "7.0.0-next-7.1",
"description": "verdaccio search proxy",
"main": "./build/index.js",
"types": "build/index.d.ts",
"author": {
"name": "Juan Picado",
@@ -26,21 +26,30 @@
"verdaccio"
],
"engines": {
"node": ">=12"
"node": ">=18"
},
"scripts": {
"clean": "rimraf ./build",
"test": "vitest run",
"test": "jest",
"type-check": "tsc --noEmit -p tsconfig.build.json",
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
"build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
"build": "esbuild src/index.ts --bundle --outfile=build/dist.js --platform=node --target=node12 && pnpm run build:types"
"watch": "pnpm build:js -- --watch",
"build": "pnpm run build:js && pnpm run build:types"
},
"dependencies": {
"debug": "4.3.4",
"lodash": "4.17.21",
"@verdaccio/config": "workspace:7.0.0-next-7.12",
"@verdaccio/core": "workspace:7.0.0-next-7.12",
"@verdaccio/logger": "workspace:7.0.0-next-7.12",
"@verdaccio/proxy": "workspace:7.0.0-next-7.12"
},
"devDependencies": {
"@verdaccio/types": "workspace:12.0.0-next.2",
"@orama/orama": "1.2.4",
"debug": "4.3.4",
"esbuild": "0.14.10"
"mockdate": "3.0.5",
"nock": "13.5.1",
"node-mocks-http": "1.14.1"
},
"funding": {
"type": "opencollective",

View File

@@ -1 +1,2 @@
export { default as SearchMemoryIndexer } from './indexer';
export { Search as default } from './search';
export * from './search-utils';

View File

@@ -0,0 +1,15 @@
import { orderBy } from 'lodash';
import { searchUtils } from '@verdaccio/core';
export function removeDuplicates(results: searchUtils.SearchPackageItem[]) {
const pkgNames: any[] = [];
const orderByResults = orderBy(results, ['verdaccioPrivate', 'asc']);
return orderByResults.filter((pkg) => {
if (pkgNames.includes(pkg?.package?.name)) {
return false;
}
pkgNames.push(pkg?.package?.name);
return true;
});
}

View File

@@ -0,0 +1,104 @@
import buildDebug from 'debug';
import _ from 'lodash';
import { PassThrough } from 'stream';
import { searchUtils } from '@verdaccio/core';
import { IProxy, ProxyInstanceList, ProxySearchParams, setupUpLinks } from '@verdaccio/proxy';
import { Config, Logger } from '@verdaccio/types';
import { removeDuplicates } from './search-utils';
const debug = buildDebug('verdaccio:search');
class Search {
public readonly uplinks: ProxyInstanceList;
public readonly logger: Logger;
constructor(config: Config, logger: Logger) {
this.logger = logger.child({ module: 'proxy' });
this.uplinks = setupUpLinks(config, this.logger);
}
private getProxyList() {
const uplinksList = Object.keys(this.uplinks);
return uplinksList;
}
/**
* Handle search on packages and proxies.
* Iterate all proxies configured and search in all endpoints in v2 and pipe all responses
* to a stream, once the proxies request has finished search in local storage for all packages
* (privated and cached).
*/
public async search(options: ProxySearchParams): Promise<searchUtils.SearchPackageItem[]> {
const results: searchUtils.SearchPackageItem[] = [];
const upLinkList = this.getProxyList();
// const transformResults = new TransFormResults({ objectMode: true });
const streamPassThrough = new PassThrough({ objectMode: true });
debug('uplinks found %s', upLinkList.length);
const searchUplinksStreams = upLinkList.map((uplinkId: string) => {
const uplink = this.uplinks[uplinkId];
if (!uplink) {
// this line should never happens
this.logger.error({ uplinkId }, 'uplink @upLinkId not found');
}
return this.consumeSearchStream(uplinkId, uplink, options, streamPassThrough);
});
try {
debug('searching on %s uplinks...', searchUplinksStreams?.length);
// only process those streams end successfully, if all request fails
// just include local storage results (if local fails then return 500)
await Promise.allSettled([...searchUplinksStreams]);
streamPassThrough.end();
for await (const chunk of streamPassThrough) {
if (_.isArray(chunk)) {
(chunk as searchUtils.SearchItem[])
.filter((pkgItem) => {
debug(`streaming remote pkg name ${pkgItem?.package?.name}`);
return true;
})
.forEach((pkgItem) => {
// @ts-ignore
return results.push({
...pkgItem,
verdaccioPkgCached: false,
verdaccioPrivate: false,
});
});
}
}
debug('searching all uplinks done');
} catch (err: any) {
this.logger.error({ err: err?.message }, ' error on uplinks search @{err}');
throw err;
}
return removeDuplicates(results);
}
/**
* Consume the upstream and pipe it to a transformable stream.
*/
private consumeSearchStream(
uplinkId: string,
uplink: IProxy,
options: ProxySearchParams,
searchPassThrough: PassThrough
): Promise<any> {
return uplink.search({ ...options }).then((bodyStream) => {
bodyStream.pipe(searchPassThrough, { end: false });
bodyStream.on('error', (err: any): void => {
this.logger.error(
{ uplinkId, err: err },
'search error for uplink @{uplinkId}: @{err?.message}'
);
searchPassThrough.end();
});
return new Promise((resolve) => bodyStream.on('end', resolve));
});
}
}
export { Search };

View File

@@ -0,0 +1,273 @@
{
"objects": [
{
"package": {
"name": "verdaccio",
"scope": "unscoped",
"version": "5.29.2",
"description": "A lightweight private npm proxy registry",
"keywords": [
"private",
"package",
"repository",
"registry",
"enterprise",
"modules",
"proxy",
"server",
"verdaccio"
],
"date": "2024-02-21T19:56:45.379Z",
"links": {
"npm": "https://www.npmjs.com/package/verdaccio",
"homepage": "https://verdaccio.org",
"repository": "https://github.com/verdaccio/verdaccio",
"bugs": "https://github.com/verdaccio/verdaccio/issues"
},
"author": {
"name": "Verdaccio Maintainers",
"email": "test@test.com",
"username": "verdaccio.npm"
},
"publisher": { "username": "verdaccio.npm", "email": "test@test.com" },
"maintainers": [
{ "username": "jotadeveloper", "email": "test@test.com" },
{ "username": "ayusharma", "email": "test@test.com" },
{ "username": "trentearl", "email": "test@test.com" },
{ "username": "jmwilkinson", "email": "test@test.com" },
{ "username": "sergiohgz", "email": "test@test.com" },
{ "username": "verdaccio.npm", "email": "test@test.com" }
]
},
"flags": { "insecure": 0 },
"score": {
"final": 0.28923397536716566,
"detail": {
"quality": 0.39403701233442867,
"popularity": 0.1553034428576298,
"maintenance": 0.3333333333333333
}
},
"searchScore": 100000.26
},
{
"package": {
"name": "@verdaccio/file-locking",
"scope": "verdaccio",
"version": "10.3.1",
"description": "library that handle file locking",
"keywords": ["verdaccio", "lock", "fs"],
"date": "2023-03-29T18:48:01.509Z",
"links": {
"npm": "https://www.npmjs.com/package/%40verdaccio%2Ffile-locking",
"homepage": "https://verdaccio.org",
"repository": "https://github.com/verdaccio/monorepo",
"bugs": "https://github.com/verdaccio/monorepo/issues"
},
"author": {
"name": "Juan Picado",
"email": "test@test.com",
"username": "jotadeveloper"
},
"publisher": { "username": "verdaccio.npm", "email": "test@test.com" },
"maintainers": [
{ "username": "sergiohgz", "email": "test@test.com" },
{ "username": "verdaccio.npm", "email": "test@test.com" },
{ "username": "jotadeveloper", "email": "test@test.com" },
{ "username": "ayusharma", "email": "test@test.com" }
]
},
"flags": { "insecure": 0 },
"score": {
"final": 0.4347300973147867,
"detail": {
"quality": 0.8773185907360584,
"popularity": 0.15732960498192844,
"maintenance": 0.33276902385798346
}
},
"searchScore": 0.0010177421
},
{
"package": {
"name": "verdaccio-service-construct",
"scope": "unscoped",
"version": "0.0.602",
"keywords": ["cdk"],
"date": "2024-03-09T01:14:46.812Z",
"links": { "npm": "https://www.npmjs.com/package/verdaccio-service-construct" },
"author": {
"name": "Ayush Goyal",
"email": "ayush987goyal@gmail.com",
"username": "ayush987goyal"
},
"publisher": { "username": "ayush987goyal", "email": "ayush987goyal@gmail.com" },
"maintainers": [{ "username": "ayush987goyal", "email": "ayush987goyal@gmail.com" }]
},
"flags": { "insecure": 0, "unstable": true },
"score": {
"final": 0.22683523291517088,
"detail": {
"quality": 0.32276139168703444,
"popularity": 0.038114710692553955,
"maintenance": 0.3333333333333333
}
},
"searchScore": 3.968321e-8
},
{
"package": {
"name": "verdaccio-theme-hilio",
"scope": "unscoped",
"version": "1.14.5",
"description": "Verdaccio User Interface",
"keywords": ["verdaccio", "verdaccio-plugin", "verdaccio-theme"],
"date": "2021-01-12T05:48:12.643Z",
"links": {
"npm": "https://www.npmjs.com/package/verdaccio-theme-hilio",
"homepage": "https://verdaccio.org",
"repository": "https://github.com/verdaccio/ui",
"bugs": "https://github.com/verdaccio/ui/issues"
},
"author": { "name": "Verdaccio Core Team", "email": "test@test.com" },
"publisher": { "username": "joebnb", "email": "joebnb@qq.com" },
"maintainers": [{ "username": "joebnb", "email": "joebnb@qq.com" }]
},
"flags": { "insecure": 0 },
"score": {
"final": 0.20823236027862208,
"detail": {
"quality": 0.6388395536236707,
"popularity": 0.022545843955562445,
"maintenance": 0.02482699659164002
}
},
"searchScore": 3.8766167e-8
},
{
"package": {
"name": "@hamstudy/verdaccio-aws-s3-storage-sse",
"scope": "hamstudy",
"version": "10.3.2",
"description": "AWS S3 storage implementation for Verdaccio - fork that adds support for SSE-C, SSE-S3, and AWS:KMS",
"keywords": ["verdaccio", "plugin", "storage", "aws"],
"date": "2022-10-04T21:39:04.907Z",
"links": {
"npm": "https://www.npmjs.com/package/%40hamstudy%2Fverdaccio-aws-s3-storage-sse",
"homepage": "https://verdaccio.org",
"repository": "https://github.com/taxilian/verdaccio-monorepo",
"bugs": "https://github.com/verdaccio/monorepo/issues"
},
"author": {
"name": "Richard Bateman",
"email": "taxilian@gmail.com",
"username": "taxilian"
},
"publisher": { "username": "taxilian", "email": "taxilian@gmail.com" },
"maintainers": [
{ "username": "rumbcam", "email": "kd7rmx@batemansr.us" },
{ "username": "taxilian", "email": "taxilian@gmail.com" },
{ "username": "bloveridge", "email": "bloveridge@gmail.com" }
]
},
"flags": { "insecure": 0 },
"score": {
"final": 0.220856041974831,
"detail": {
"quality": 0.6217078604565084,
"popularity": 0.0008629747032998004,
"maintenance": 0.09726183626206726
}
},
"searchScore": 3.8267025e-8
},
{
"package": {
"name": "testing-verdaccio",
"scope": "unscoped",
"version": "1.1.2",
"description": "this is just for Assignment puropse",
"date": "2023-03-20T07:58:49.325Z",
"links": { "npm": "https://www.npmjs.com/package/testing-verdaccio" },
"publisher": { "username": "samyak3009", "email": "samyak3009@gmail.com" },
"maintainers": [{ "username": "samyak3009", "email": "samyak3009@gmail.com" }]
},
"flags": { "insecure": 0 },
"score": {
"final": 0.23106132265338952,
"detail": {
"quality": 0.39172042177373956,
"popularity": 0.0012551184665870981,
"maintenance": 0.3231597275941777
}
},
"searchScore": 3.383671e-8
},
{
"package": {
"name": "verdaccio-staryauthgroup",
"scope": "unscoped",
"version": "0.0.1",
"description": "A verdaccio plugin to control auth group",
"keywords": ["verdaccio,auth,plugin,verdaccio-]"],
"date": "2023-07-12T01:59:29.928Z",
"links": { "npm": "https://www.npmjs.com/package/verdaccio-staryauthgroup" },
"author": { "name": "weihuago4", "email": "weihuago4@gmail.com" },
"publisher": { "username": "liuweihua", "email": "weihualau@126.com" },
"maintainers": [{ "username": "liuweihua", "email": "weihualau@126.com" }]
},
"flags": { "insecure": 0, "unstable": true },
"score": {
"final": 0.2222439493540912,
"detail": {
"quality": 0.4337548917356935,
"popularity": 0.0006994438979026641,
"maintenance": 0.262493361340335
}
},
"searchScore": 3.2598397e-8
},
{
"package": {
"name": "verdaccio-auth-gitlab",
"scope": "unscoped",
"version": "2.0.0-beta.11",
"description": "Verdaccio authentication plugin by gitlab personal access token or oauth token or ci job token.",
"keywords": [
"verdaccio",
"authentication",
"auth",
"plugin",
"gitlab",
"personal",
"access",
"oauth",
"ci",
"job",
"token"
],
"date": "2022-12-07T11:00:06.767Z",
"links": {
"npm": "https://www.npmjs.com/package/verdaccio-auth-gitlab",
"homepage": "https://github.com/pfdgithub/verdaccio-auth-gitlab",
"repository": "https://github.com/pfdgithub/verdaccio-auth-gitlab",
"bugs": "https://github.com/pfdgithub/verdaccio-auth-gitlab/issues"
},
"publisher": { "username": "pfdnpm", "email": "pfdfree@gmail.com" },
"maintainers": [{ "username": "pfdnpm", "email": "pfdfree@gmail.com" }]
},
"flags": { "insecure": 0 },
"score": {
"final": 0.2194863817767726,
"detail": {
"quality": 0.4542787957560298,
"popularity": 0.0025512045517420002,
"maintenance": 0.2351709184481542
}
},
"searchScore": 2.5283079e-8
}
],
"total": 351,
"time": "Sat Mar 09 2024 15:20:36 GMT+0000 (Coordinated Universal Time)"
}

View File

@@ -0,0 +1,102 @@
import nock from 'nock';
import { Config, getDefaultConfig } from '@verdaccio/config';
import { logger, setup } from '@verdaccio/logger';
import { Search } from '../src/search';
setup({});
const domain = 'https://registry.npmjs.org';
describe('search', () => {
const response = require('./partials/search.json');
test('search', async () => {
nock(domain).get('/-/v1/search').reply(200, response);
const abort = new AbortController();
const config = new Config(getDefaultConfig());
const searchInstance = new Search(config, logger);
const results = await searchInstance.search({
query: { text: 'verdaccio', maintenance: 0, popularity: 0, quality: 0, size: 0 },
abort,
url: '/-/v1/search',
});
expect(results).toHaveLength(8);
expect(results[0]).toEqual({
package: {
name: 'verdaccio',
scope: 'unscoped',
version: '5.29.2',
description: 'A lightweight private npm proxy registry',
keywords: [
'private',
'package',
'repository',
'registry',
'enterprise',
'modules',
'proxy',
'server',
'verdaccio',
],
date: '2024-02-21T19:56:45.379Z',
links: {
npm: 'https://www.npmjs.com/package/verdaccio',
homepage: 'https://verdaccio.org',
repository: 'https://github.com/verdaccio/verdaccio',
bugs: 'https://github.com/verdaccio/verdaccio/issues',
},
author: {
name: 'Verdaccio Maintainers',
email: 'test@test.com',
username: 'verdaccio.npm',
},
publisher: {
username: 'verdaccio.npm',
email: 'test@test.com',
},
maintainers: [
{
username: 'jotadeveloper',
email: 'test@test.com',
},
{
username: 'ayusharma',
email: 'test@test.com',
},
{
username: 'trentearl',
email: 'test@test.com',
},
{
username: 'jmwilkinson',
email: 'test@test.com',
},
{
username: 'sergiohgz',
email: 'test@test.com',
},
{
username: 'verdaccio.npm',
email: 'test@test.com',
},
],
},
flags: {
insecure: 0,
},
score: {
final: 0.28923397536716566,
detail: {
quality: 0.39403701233442867,
popularity: 0.1553034428576298,
maintenance: 0.3333333333333333,
},
},
searchScore: 100000.26,
verdaccioPkgCached: false,
verdaccioPrivate: false,
});
});
});

View File

@@ -10,12 +10,6 @@
{
"path": "../config"
},
{
"path": "../core/core"
},
{
"path": "../logger/logger"
},
{
"path": "../utils"
}

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