Compare commits

..

74 Commits

Author SHA1 Message Date
Juan Picado
ad151964bf chore: update versions (6-next) (#3670)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-07 22:29:33 +01:00
Juan Picado
a1da11308f fix: minor typo on warning message 2023-03-07 22:15:42 +01:00
Juan Picado
854b810afb Update .npmignore 2023-03-07 22:08:43 +01:00
Juan Picado
0d171f29db chore: update versions (6-next) (#3669)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-07 21:56:20 +01:00
Juan Picado
974cd8c19c fix: startup messages improved and logs support on types (#3667)
* fix: startup messages improved and logs support on types

* Create blue-cobras-study.md

* add npmignore
2023-03-07 21:49:56 +01:00
renovate[bot]
612470544c fix(deps): update dependency react-markdown to v8.0.5 (#3663)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-06 20:30:06 +01:00
renovate[bot]
042746fe49 fix(deps): update dependency dompurify to v2.4.5 (#3661)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-06 20:29:54 +01:00
verdacciobot
9f2c7978d3 chore: updated static data 2023-03-06 00:14:24 +00:00
Juan Picado
4a6e682395 format code 2023-03-05 07:57:12 +01:00
Tom Coonen
7563bb37aa docs: add correct link to s3 plugin (#3192)
* Add correct link to s3 plugin

* Update plugin-storage.md

* Update plugin-storage.md

Changed link to AWS S3 plugin to monorepo.

---------

Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2023-03-04 12:26:48 +01:00
renovate[bot]
a206f476b0 fix(deps): update dependency npm to v9.6.0 (#3660)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-03 21:36:23 +01:00
verdacciobot
b86f4d51c7 chore: updated static data 2023-03-02 00:15:21 +00:00
dependabot[bot]
2910200126 chore(deps): bump github/codeql-action from 2.2.4 to 2.2.5 (#3657)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](17573ee1cc...32dc499307)

---
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>
2023-03-01 08:07:04 +01:00
dependabot[bot]
1651ef2f80 chore(deps): bump actions/cache from 3.2.5 to 3.2.6 (#3656)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](6998d139dd...69d9d449ac)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-28 06:31:29 +01:00
Juan Picado
ec3b79aa6d chore: update versions (6-next) (#3654)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-27 21:03:54 +01:00
verdacciobot
824cd8584f chore: updated static data 2023-02-27 06:24:48 +00:00
Juan Picado
d3a4695d5d Update static-data.yml 2023-02-27 07:21:14 +01:00
Juan Picado
dc571aabd2 feat: add forceEnhancedLegacySignature (#3655)
* feat: add forceEnhancedLegacySignature

* Create rare-planets-travel.md

* Update run-server.spec.ts

* Update run-server.spec.ts
2023-02-26 22:24:00 +01:00
Juan Picado
ddb6a22396 feat: signature package (#3653)
* feat: signature package

* feat: signature package
2023-02-26 13:19:22 +01:00
renovate[bot]
399cf9c47c chore(deps): update dependency got to v11.8.6 (#3651) 2023-02-26 08:19:41 +01:00
profanis
819d865fb9 fix: typo in config.yaml file (#3652)
I found a typo where instead of `publish/unpublish` it says `publish/publish`
2023-02-25 21:08:19 +01:00
renovate[bot]
3384862846 fix(deps): update dependency npm to v9.5.1 (#3650)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-25 09:15:17 +01:00
Juan Picado
a237700f6a chore: update lock file 2023-02-25 08:09:25 +01:00
Juan Picado
ce23833d47 chore: enable pnpm8 on e2e 2023-02-25 08:03:46 +01:00
Juan Picado
3588b8d96b chore: add pnpm 8 e2e 2023-02-25 08:02:13 +01:00
Juan Picado
c9bd22dcaa chore: update versions (6-next) (#3620)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-23 13:13:33 +01:00
薄涛
378e907d53 fix(core): fix bug about isObject function (#3647) 2023-02-23 11:24:26 +01:00
renovate[bot]
1641dc3325 fix(deps): update dependency marked to v4.2.12 (#3645) 2023-02-22 08:59:37 +01:00
Juan Picado
30a967a62b disable workflow, to review 2023-02-20 19:49:47 +01:00
Juan Picado
e0fb074464 chore: fix docker tests 2023-02-20 19:44:49 +01:00
Juan Picado
83f2d654e0 fix config docker issue 2023-02-20 07:24:44 +01:00
Juan Picado
59af78d439 docker upgrade base image from 16 to 18 2023-02-20 07:19:47 +01:00
Juan Picado
d92cffadad add e2e for docker images
increse
2023-02-20 07:16:35 +01:00
Juan Picado
7fe57531ea docker add linux/arm64 build 2023-02-19 23:22:37 +01:00
renovate[bot]
80b93b9d99 fix(deps): update dependency validator to v13.9.0 (#3640)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 22:44:41 +01:00
renovate[bot]
4ee90e4124 fix(deps): update dependency lru-cache to v7.16.1 (#3639)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 22:29:16 +01:00
renovate[bot]
e7b9c78508 fix(deps): update dependency fastify to v4.13.0 (#3638)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 21:34:10 +01:00
renovate[bot]
989d64a6f0 fix(deps): update dependency typedoc to v0.23.25 (#3637) 2023-02-19 13:30:54 +01:00
renovate[bot]
a52594f54b fix(deps): update dependency redux to v4.2.1 (#3635) 2023-02-19 11:43:39 +01:00
Juan Picado
4fc21146ab fix: missing logo on header (#3636) 2023-02-19 11:43:28 +01:00
renovate[bot]
3dc0fd41f4 fix(deps): update dependency @crowdin/crowdin-api-client to v1.21.2 (#3634)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 09:28:57 +01:00
renovate[bot]
038756fd9c fix(deps): update docusaurus monorepo to v2.3.1 (#3633)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 09:00:46 +01:00
renovate[bot]
762692341a fix(deps): update dependency core-js to v3.28.0 (#3632)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 08:12:57 +01:00
renovate[bot]
871646da4e fix(deps): update dependency dompurify to v2.4.4 (#3631) 2023-02-19 01:55:16 +01:00
renovate[bot]
59be6bc170 fix(deps): update dependency @yarnpkg/cli-dist to v3.4.1 (#3629)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 01:16:11 +01:00
renovate[bot]
44f8674061 fix(deps): update dependency clipanion to v3.2.0 (#3630)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 01:15:06 +01:00
renovate[bot]
a1c8652eb1 fix(deps): update dependency npm to v8.19.4 (#3627)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 00:39:37 +01:00
renovate[bot]
9e3abf9830 fix(deps): update dependency npm to v9.5.0 (#3628)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 00:39:27 +01:00
renovate[bot]
08ff0aef3c fix(deps): update dependency pino to v8.10.0 (#3626)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-19 00:17:10 +01:00
renovate[bot]
35408cfc42 fix(deps): update material-ui monorepo to v5.11.9 (#3625)
* fix(deps): update material-ui monorepo to v5.11.9

* Update Search.test.tsx.snap

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2023-02-19 00:16:59 +01:00
Juan Picado
76c4aa1d43 Update renovate.json 2023-02-18 22:49:30 +01:00
Juan Picado
4d4d63c2b1 Update renovate.json 2023-02-18 22:47:48 +01:00
Juan Picado
be8367ef38 chore: update dependencies (#3621)
* chore: update deps

* Update pnpm-lock.yaml
2023-02-18 22:44:45 +01:00
Juan Picado
0ad69d58c9 Update renovate.json 2023-02-18 19:54:45 +01:00
Juan Picado
8d4f4fffef Update renovate.json 2023-02-18 19:53:54 +01:00
renovate[bot]
1096aa9fc6 fix(deps): update all linting dependencies (major) (#3622)
* fix(deps): update all linting dependencies

* fix lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2023-02-18 19:52:31 +01:00
Juan Picado
83e4669aba fix website build 2023-02-18 16:42:05 +01:00
Juan Picado
c827e6b57a Update renovate.json 2023-02-18 16:10:26 +01:00
Juan Picado
8c444df1b9 Update renovate.json 2023-02-18 16:03:08 +01:00
Juan Picado
b152256692 Update renovate.json 2023-02-18 15:44:58 +01:00
Juan Picado
781ac9ac25 docs: add docs for theme and filter plugins (#3619)
* docs: add docs for theme and filter plugins

* typos

* typos

* Create strong-socks-type.md

* Update plugins.md

* typos
2023-02-18 15:42:19 +01:00
Juan Picado
4f711109df Update renovate.json 2023-02-18 15:40:49 +01:00
renovate[bot]
35fa14eb66 fix(deps): update all linting dependencies (#3618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-18 15:29:57 +01:00
Juan Picado
0a37a9808a chore: update versions (6-next) (#3611)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-14 21:58:20 +01:00
Juan Picado
d167f92e18 rollback yaml support old nodejs versions (#3610) 2023-02-14 21:44:08 +01:00
Juan Picado
a931cb6646 chore: update versions (6-next) (#3604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-14 17:35:58 +01:00
dependabot[bot]
7ad320a444 chore(deps): bump marocchino/sticky-pull-request-comment (#3606)
Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2.3.1 to 2.5.0.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](fcf6fe9e4a...3d60a5b2da)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 08:30:56 +01:00
dependabot[bot]
d1e190e067 chore(deps): bump actions/cache from 3.2.4 to 3.2.5 (#3605)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](627f0f41f6...6998d139dd)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 08:30:42 +01:00
dependabot[bot]
ae391a73f1 chore(deps): bump github/codeql-action from 2.2.1 to 2.2.4 (#3607)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.1 to 2.2.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3ebbd71c74...17573ee1cc)

---
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>
2023-02-14 08:30:29 +01:00
Juan Picado
45c03819e2 refactor: html render middleware improvements (#3603)
* refactor: render middleware

* refactor: render middleware
2023-02-12 20:26:18 +01:00
Juan Picado
1b38fb2d30 improve storage documentation 2023-02-09 20:48:01 +01:00
verdacciobot
ee5e5d55e6 chore: updated static data 2023-02-09 01:02:58 +00:00
dependabot[bot]
a12e825345 chore(deps): bump docker/build-push-action from 2 to 4 (#3597)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  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>
2023-02-06 21:57:38 +01:00
dependabot[bot]
d2614d6869 chore(deps): bump actions/cache from 3.2.3 to 3.2.4 (#3598)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](58c146cc91...627f0f41f6)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 20:19:17 +01:00
277 changed files with 6974 additions and 8604 deletions

View File

@@ -0,0 +1,8 @@
---
'@verdaccio/cli': minor
'@verdaccio/ui-components': minor
'@verdaccio/core': minor
'@verdaccio/types': minor
---
fix: startup messages improved and logs support on types

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/core': patch
---
fix: minor typo on warning message

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/test-cli-commons': minor
'@verdaccio/config': minor
---
chore: rollback yaml dep support old nodejs versions

View File

@@ -0,0 +1,8 @@
---
'@verdaccio/auth': minor
'@verdaccio/config': minor
'@verdaccio/signature': minor
'@verdaccio/ui-components': minor
---
feat: signature package

View File

@@ -0,0 +1,8 @@
---
'@verdaccio/types': patch
'@verdaccio/middleware': patch
'@verdaccio/ui-theme': patch
'@verdaccio/web': patch
---
fix: missing logo on header

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/core': patch
---
fix(core): fix `isObject` function.`isObject(true)` should return false.

View File

@@ -56,13 +56,16 @@
"customprefix-auth": "0.0.1",
"@verdaccio/crowdin-translations": "1.0.0",
"@verdaccio/logger-7": "6.0.0-6-next.1",
"@verdaccio/logger-commons": "6.0.0-6-next.25"
"@verdaccio/logger-commons": "6.0.0-6-next.25",
"@verdaccio/e2e-cli-pnpm8": "1.0.1-6-next.6",
"@verdaccio/signature": "6.0.0-6-next.1"
},
"changesets": [
"afraid-mice-obey",
"angry-nails-appear",
"big-lobsters-sin",
"big-years-repair",
"blue-cobras-study",
"brave-seahorses-press",
"bright-poems-obey",
"brown-cycles-laugh",
@@ -92,6 +95,8 @@
"fuzzy-onions-draw",
"gentle-parrots-lay",
"gentle-trains-switch",
"giant-apples-laugh",
"giant-years-trade",
"gold-vans-tease",
"green-yaks-divide",
"healthy-bikes-behave",
@@ -100,6 +105,7 @@
"heavy-ravens-lay",
"hip-hounds-destroy",
"kind-bears-nail",
"kind-ladybugs-admire",
"late-adults-love",
"late-parents-act",
"light-pumas-brake",
@@ -113,6 +119,7 @@
"moody-clocks-roll",
"neat-toes-report",
"neat-toys-float",
"old-apples-fail",
"olive-candles-speak",
"orange-cows-pull",
"orange-flowers-cover",
@@ -122,9 +129,11 @@
"plenty-news-remember",
"plenty-spiders-melt",
"plenty-tables-refuse",
"poor-suns-film",
"pretty-hounds-tap",
"proud-jeans-walk",
"proud-jobs-hope",
"rare-planets-travel",
"red-chefs-float",
"red-yaks-sell",
"rich-badgers-begin",
@@ -144,6 +153,7 @@
"spicy-radios-remain",
"spicy-snakes-sip",
"strange-ladybugs-nail",
"strong-socks-type",
"swift-pumpkins-knock",
"ten-parents-breathe",
"tender-bags-call",
@@ -157,6 +167,7 @@
"twelve-crabs-guess",
"two-dolls-check",
"unlucky-hairs-wonder",
"weak-mangos-taste",
"wild-jokes-beam",
"witty-ties-speak"
]

View File

@@ -0,0 +1,9 @@
---
'@verdaccio/config': minor
'@verdaccio/core': minor
'@verdaccio/types': minor
'@verdaccio/signature': minor
'@verdaccio/test-helper': minor
---
feat: add forceEnhancedLegacySignature

View File

@@ -0,0 +1,7 @@
---
'@verdaccio/ui-theme': major
'@verdaccio/ui-components': major
'@verdaccio/web': major
---
fix package configuration issues

View File

@@ -0,0 +1,15 @@
---
'@verdaccio/api': minor
'@verdaccio/config': minor
'@verdaccio/types': minor
'@verdaccio/hooks': minor
'@verdaccio/middleware': minor
'verdaccio-audit': minor
'@verdaccio/proxy': minor
'@verdaccio/server': minor
'@verdaccio/store': minor
'@verdaccio/web': minor
'@verdaccio/ui-theme': minor
---
refactor: render html middleware

39
.github/disabled/docker-plugins-e2e.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: E2E Docker Proxy Plugins Test
on:
workflow_dispatch:
push:
branches:
- 'master'
schedule:
# run every sunday
- cron: '0 0 * * 0'
jobs:
docker:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Start containers
run: docker-compose -f "./e2e/docker/docker-build-install-plugin/docker-compose.yaml" up -d --build
- name: Install node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: 18
- name: verdaccio cli
run: npm install -g verdaccio --registry=http://localhost:4873
- name: gastby cli
run: npm install -g gatsby-cli --registry http://localhost:4873
- name: netlify cli
run: npm install -g netlify-cli --registry http://localhost:4873
- name: angular cli
run: npm install -g @angular/cli --registry http://localhost:4873
- name: Stop containers
if: always()
run: docker-compose -f "./e2e/docker/docker-build-install-plugin/docker-compose.yaml" down

View File

@@ -32,7 +32,7 @@ jobs:
- name: Install
run: pnpm recursive install --frozen-lockfile --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -50,7 +50,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -70,7 +70,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -95,7 +95,7 @@ jobs:
node-version: ${{ matrix.node_version }}
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -116,7 +116,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}

View File

@@ -43,7 +43,7 @@ jobs:
- name: Install
run: pnpm recursive install --frozen-lockfile --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -63,7 +63,7 @@ jobs:
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -85,7 +85,7 @@ jobs:
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -112,7 +112,7 @@ jobs:
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
@@ -136,7 +136,7 @@ jobs:
run: |
corepack enable
corepack prepare --activate pnpm@6.32.15
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # 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@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # tag=v2
uses: github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 # tag=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@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # tag=v2
uses: github/codeql-action/autobuild@32dc499307d133bb5085bae78498c0ac2cf762d5 # tag=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@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # tag=v2
uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # tag=v2

View File

@@ -0,0 +1,38 @@
name: E2E Docker Proxy Apache Test
on:
workflow_dispatch:
push:
branches:
- 'master'
schedule:
# run every sunday
- cron: '0 0 * * 0'
jobs:
docker:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Start containers
run: docker-compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" up -d --build
- name: Install node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: 18
- name: verdaccio cli
run: npm install -g verdaccio --registry http://localhost
- name: gastby cli
run: npm install -g gatsby-cli --registry http://localhost
- name: netlify cli
run: npm install -g netlify-cli --registry http://localhost
- name: angular cli
run: npm install -g @angular/cli --registry http://localhost
- name: Stop containers
if: always()
run: docker-compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" down

View File

@@ -0,0 +1,41 @@
name: E2E Docker Proxy Nginx Test
on:
workflow_dispatch:
push:
branches:
- 'master'
jobs:
docker:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Start containers
run: docker-compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" up -d --build
- name: Install node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: 18
- name: npm setup
run: |
npm config set fetch-retries="5"
npm config set fetch-retry-factor="50"
npm config set fetch-retry-mintimeout="20000"
npm config set fetch-retry-maxtimeout="80000"
- name: verdaccio cli
run: npm install -g verdaccio --registry http://localhost
- name: gastby cli
run: npm install -g gatsby-cli --registry http://localhost
- name: netlify cli
run: npm install -g netlify-cli --registry http://localhost
- name: angular cli
run: npm install -g @angular/cli --registry http://localhost
- name: Stop containers
if: always()
run: docker-compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" down

View File

@@ -45,11 +45,11 @@ jobs:
{{major}}
{{major}}.{{minor}}
- name: Build & Push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

View File

@@ -29,7 +29,7 @@ jobs:
- name: Install
run: pnpm recursive install --frozen-lockfile --reporter=silence --ignore-scripts --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
@@ -46,7 +46,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
@@ -55,7 +55,7 @@ jobs:
- name: build
run: pnpm build
- name: Cache packages
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
id: cache-packages
with:
path: ./packages/
@@ -75,7 +75,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pkg: [npm6, npm7, npm8, npm9, pnpm6, pnpm7, yarn1, yarn2, yarn3, yarn4]
pkg: [npm6, npm7, npm8, npm9, pnpm6, pnpm7, pnpm8, yarn1, yarn2, yarn3, yarn4]
node: [16, 18, 19]
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
runs-on: ubuntu-latest
@@ -86,13 +86,13 @@ jobs:
node-version: ${{ matrix.node }}
- name: Install pnpm
run: npm i pnpm@6.32.15 -g
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: Install
run: pnpm recursive install --offline --frozen-lockfile --reporter=silence --ignore-scripts --registry http://localhost:4873
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: ./packages/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}

View File

@@ -28,12 +28,6 @@ jobs:
node-version: 18.x
- name: install pnpm
run: sudo npm i pnpm@latest-6 -g
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: setup pnpm config registry
run: pnpm config set registry https://registry.verdaccio.org
- name: install dependencies
run: pnpm install
- name: Build Translations percentage

View File

@@ -35,7 +35,7 @@ jobs:
node-version-file: '.nvmrc'
- name: Cache pnpm modules
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
env:
cache-name: cache-pnpm-modules
with:

View File

@@ -31,7 +31,7 @@ jobs:
node-version: 16
- name: Cache pnpm modules
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
env:
cache-name: cache-pnpm-modules
with:
@@ -51,7 +51,7 @@ jobs:
- name: Build Translations percentage
run: pnpm build --filter "@verdaccio/crowdin-translations"
- name: Cache Docusaurus Build
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: website/node_modules/.cache/webpack
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -134,7 +134,7 @@ jobs:
- name: Add comment to PR
if: github.repository == 'verdaccio/verdaccio'
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@fcf6fe9e4a0409cd9316a5011435be0f3327f1e1 # tag=v2
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd # tag=v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}

View File

@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:16-alpine as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:18-alpine as builder
ENV NODE_ENV=development \
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
@@ -20,7 +20,7 @@ RUN npm -g i pnpm@6.32.15 && \
# FIXME: need to remove devDependencies from the build
# RUN pnpm install --prod --ignore-scripts
FROM node:16-alpine
FROM node:18-alpine
LABEL maintainer="https://github.com/verdaccio/verdaccio"
ENV VERDACCIO_APPDIR=/opt/verdaccio \

View File

@@ -10,18 +10,18 @@
### Commands Tested
| cmd | npm6 | npm7 | npm8 | npm9 | pnpm6 | pnpm7 | yarn1 | yarn2 | yarn3 | yarn4 |
| --------- | ---- | ---- | ---- | ---- | ----- | ----- | ----- | ----- | ----- | ----- |
| publish | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| info | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| audit | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| install | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| deprecate | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| ping | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| search | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| star | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| stars | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| dist-tag | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| cmd | npm6 | npm7 | npm8 | npm9 | pnpm6 | pnpm7 | pnpm8 | yarn1 | yarn2 | yarn3 | yarn4 |
| --------- | ---- | ---- | ---- | ---- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
| publish | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| info | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| audit | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| install | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| deprecate | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| ping | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| search | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| star | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| stars | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| dist-tag | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
> notes:
>

View File

@@ -1,5 +1,11 @@
# @verdaccio/test-cli-commons
## 1.1.0-6-next.6
### Minor Changes
- d167f92e: chore: rollback yaml dep support old nodejs versions
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,19 +1,19 @@
{
"private": true,
"name": "@verdaccio/test-cli-commons",
"version": "1.0.1-6-next.5",
"version": "1.1.0-6-next.6",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"devDependencies": {
"verdaccio": "workspace:6.0.0-6-next.59",
"@verdaccio/core": "workspace:6.0.0-6-next.59",
"@verdaccio/config": "workspace:6.0.0-6-next.59",
"@verdaccio/types": "workspace:11.0.0-6-next.19",
"yaml": "2.2.0",
"@verdaccio/config": "workspace:6.0.0-6-next.65",
"@verdaccio/core": "workspace:6.0.0-6-next.65",
"@verdaccio/types": "workspace:11.0.0-6-next.23",
"debug": "4.3.4",
"fs-extra": "10.1.0",
"got": "11.8.6",
"lodash": "4.17.21"
"js-yaml": "4.1.0",
"lodash": "4.17.21",
"verdaccio": "workspace:6.0.0-6-next.65"
},
"scripts": {
"test": "jest",

View File

@@ -1,7 +1,7 @@
import { cp, writeFile } from 'fs/promises';
import YAML from 'js-yaml';
import { join } from 'path';
import { URL } from 'url';
import YAML from 'yaml';
import { Dependencies } from '@verdaccio/types';
@@ -25,7 +25,7 @@ export function createYamlConfig(registry: string, token?: string) {
};
}
return YAML.stringify(defaultYaml);
return YAML.dump(defaultYaml);
}
export async function prepareYarnModernProject(

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-npm6
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,9 +1,9 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-npm6",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"npm": "6.14.18"
},
"scripts": {

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-npm7
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,9 +1,9 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-npm7",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"npm": "7.24.2"
},
"scripts": {

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-npm8
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,10 +1,10 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-npm8",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"npm": "8.19.3"
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"npm": "8.19.4"
},
"scripts": {
"test": "jest"

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-npm9
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,10 +1,10 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-npm9",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"npm": "9.2.0"
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"npm": "9.6.0"
},
"scripts": {
"test": "jest"

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-pnpm6
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,10 +1,10 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-pnpm6",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"pnpm": "latest-6"
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"pnpm": "^6.35.1"
},
"scripts": {
"test": "jest"

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-pnpm7
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,10 +1,10 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-pnpm7",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"pnpm": "next-7"
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"pnpm": "^7.27.1"
},
"scripts": {
"test": "jest"

View File

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

View File

@@ -0,0 +1,7 @@
{
"rules": {
"no-console": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/explicit-member-accessibility": 0
}
}

View File

@@ -0,0 +1,46 @@
# @verdaccio/e2e-cli-pnpm7
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes
- @verdaccio/test-cli-commons@1.0.1-6-next.5
## 1.0.1-6-next.4
### Patch Changes
- @verdaccio/test-cli-commons@1.0.1-6-next.4
## 1.0.1-6-next.3
### Patch Changes
- 351aeeaa: fix(deps): @verdaccio/utils should be a prod dep of local-storage
- Updated dependencies [351aeeaa]
- @verdaccio/test-cli-commons@1.0.1-6-next.3
## 1.0.1-6-next.2
### Patch Changes
- @verdaccio/test-cli-commons@1.0.1-6-next.2
## 1.0.1-6-next.1
### Patch Changes
- @verdaccio/test-cli-commons@1.0.1-6-next.1
## 1.0.1-6-next.0
### Patch Changes
- @verdaccio/test-cli-commons@1.0.1-6-next.0

View File

@@ -0,0 +1,45 @@
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('install a package', () => {
jest.setTimeout(10000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['verdaccio-memory', '@verdaccio/cli']])(
'should audit a package %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl(),
{ jquery: '3.6.1' }
);
// install is required to create package lock file
await pnpm({ cwd: tempFolder }, 'install', ...addRegistry(registry.getRegistryUrl()));
const resp = await pnpm(
{ cwd: tempFolder },
'audit',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.metadata).toBeDefined();
expect(parsedBody.actions).toBeDefined();
expect(parsedBody.advisories).toBeDefined();
expect(parsedBody.muted).toBeDefined();
}
);
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,115 @@
import {
addRegistry,
initialSetup,
pnpmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('deprecate a package', () => {
jest.setTimeout(20000);
let registry;
async function deprecate(tempFolder, packageVersion, registry, message) {
await pnpm(
{ cwd: tempFolder },
'deprecate',
packageVersion,
message,
'--json',
...addRegistry(registry.getRegistryUrl())
);
}
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@verdaccio/deprecated-1']])(
'should deprecate a single package %s',
async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
// deprecate one version
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, message);
// verify is deprecated
const infoBody = await pnpmUtils.getInfoVersions(pnpm, `${pkgName}`, registry);
expect(infoBody.name).toEqual(pkgName);
expect(infoBody.deprecated).toEqual(message);
}
);
test.each([['@verdaccio/deprecated-2']])('should un-deprecate a package %s', async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
// deprecate one version
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, message);
// verify is deprecated
const infoBody = await pnpmUtils.getInfoVersions(pnpm, `${pkgName}`, registry);
expect(infoBody.deprecated).toEqual(message);
// empty string is same as undeprecate
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, '');
const infoBody2 = await pnpmUtils.getInfoVersions(pnpm, `${pkgName}`, registry);
expect(infoBody2.deprecated).toBeUndefined();
});
test.each([['@verdaccio/deprecated-3']])(
'should deprecate a multiple packages %s',
async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
// publish 1.0.0
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
// publish 1.1.0
await pnpmUtils.bumbUp(pnpm, tempFolder, registry);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
// publish 1.2.0
await pnpmUtils.bumbUp(pnpm, tempFolder, registry);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
// publish 1.3.0
await pnpmUtils.bumbUp(pnpm, tempFolder, registry);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
// // deprecate all version
await deprecate(tempFolder, pkgName, registry, message);
// verify is deprecated
for (let v of ['1.0.0', '1.1.0', '1.2.0', '1.3.0']) {
const infoResp = await pnpmUtils.getInfoVersions(pnpm, `${pkgName}@${v}`, registry);
expect(infoResp.deprecated).toEqual(message);
}
// publish normal version
// publish 1.4.0
await pnpmUtils.bumbUp(pnpm, tempFolder, registry);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
const infoResp = await pnpmUtils.getInfoVersions(pnpm, `${pkgName}@1.4.0`, registry);
// must be not deprecated
expect(infoResp.deprecated).toBeUndefined();
}
);
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,91 @@
import {
addRegistry,
initialSetup,
pnpmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('publish a package', () => {
jest.setTimeout(20000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@foo/foo', 'foo']])('should list dist-tags for %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
await pnpmUtils.bumbUp(pnpm, tempFolder, registry);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry, ['--tag', 'beta']);
const resp2 = await pnpm(
{ cwd: tempFolder },
'dist-tag',
'ls',
'--json',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual('beta: 1.1.0latest: 1.0.0');
});
test.each([['@verdaccio/bar']])('should remove tag with dist-tags for %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
await pnpmUtils.bumbUp(pnpm, tempFolder, registry);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry, ['--tag', 'beta']);
const resp2 = await pnpm(
{ cwd: tempFolder },
'dist-tag',
'rm',
`${pkgName}@1.1.0`,
'beta',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual('-beta: @verdaccio/bar@1.1.0');
});
test.each([['@verdaccio/five']])(
'should add tag to package and version with dist-tags for %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
await pnpmUtils.bumbUp(pnpm, tempFolder, registry);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
const resp2 = await pnpm(
{ cwd: tempFolder },
'dist-tag',
'add',
`${pkgName}@1.1.0`,
'alfa',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual(`+alfa: ${pkgName}@1.1.0`);
}
);
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,31 @@
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('install a package', () => {
jest.setTimeout(10000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should run pnpm info json body', async () => {
const resp = await pnpm(
{},
'info',
'verdaccio',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.name).toEqual('verdaccio');
expect(parsedBody.dependencies).toBeDefined();
});
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,36 @@
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('install a project packages', () => {
jest.setTimeout(80000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should run npm install json body', async () => {
const { tempFolder } = await prepareGenericEmptyProject(
'something',
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl(),
{ react: '18.2.0' }
);
const resp = await pnpm(
{ cwd: tempFolder },
'install',
'--reporter=default',
...addRegistry(registry.getRegistryUrl())
);
expect(resp.stdout).toMatch(/react/);
});
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,3 @@
const config = require('../jest.config');
module.exports = { ...config };

View File

@@ -0,0 +1,12 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-pnpm8",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"pnpm": "^8.0.0-alpha.0"
},
"scripts": {
"test": "jest"
}
}

View File

@@ -0,0 +1,24 @@
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('ping registry', () => {
jest.setTimeout(10000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should ping registry', async () => {
const resp = await pnpm({}, 'ping', '--json', ...addRegistry(registry.getRegistryUrl()));
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.registry).toEqual(registry.getRegistryUrl() + '/');
});
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,41 @@
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('install a package', () => {
jest.setTimeout(10000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['verdaccio-memory', 'verdaccio', '@verdaccio/foo', '@verdaccio/some-foo']])(
'should publish a package %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
const resp = await pnpm(
{ cwd: tempFolder },
'publish',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.name).toEqual(pkgName);
expect(parsedBody.files).toBeDefined();
expect(parsedBody.files).toBeDefined();
}
);
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,33 @@
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('search a package', () => {
jest.setTimeout(10000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should search a package', async () => {
const resp = await pnpm(
{},
'search',
'@verdaccio/cli',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
const pkgFind = parsedBody.find((item) => {
return item.name === '@verdaccio/cli';
});
expect(pkgFind.name).toEqual('@verdaccio/cli');
});
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,89 @@
import {
addRegistry,
initialSetup,
pnpmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
import { pnpm } from './utils';
describe('star a package', () => {
jest.setTimeout(20000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@verdaccio/foo']])('should star a package %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
const resp = await pnpm(
{ cwd: tempFolder },
'star',
pkgName,
...addRegistry(registry.getRegistryUrl())
);
expect(resp.stdout).toEqual(`${pkgName}`);
});
test.each([['@verdaccio/bar']])('should unstar a package %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
const resp = await pnpm(
{ cwd: tempFolder },
'star',
pkgName,
...addRegistry(registry.getRegistryUrl())
);
expect(resp.stdout).toEqual(`${pkgName}`);
const resp1 = await pnpm(
{ cwd: tempFolder },
'unstar',
pkgName,
...addRegistry(registry.getRegistryUrl())
);
expect(resp1.stdout).toEqual(`${pkgName}`);
});
test('should list stars of a user %s', async () => {
const pkgName = '@verdaccio/stars';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await pnpmUtils.publish(pnpm, tempFolder, pkgName, registry);
await pnpm({ cwd: tempFolder }, 'star', pkgName, ...addRegistry(registry.getRegistryUrl()));
const resp = await pnpm(
{ cwd: tempFolder },
'stars',
...addRegistry(registry.getRegistryUrl())
);
// side effects: this result is affected the the package published in the previous step
expect(resp.stdout).toEqual(`@verdaccio/foo@verdaccio/stars`);
});
afterAll(async () => {
registry.stop();
});
});

View File

@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.reference.json",
"references": [
{
"path": "../cli-commons"
}
]
}

View File

@@ -0,0 +1,12 @@
import { SpawnOptions } from 'child_process';
import { join } from 'path';
import { exec } from '@verdaccio/test-cli-commons';
function getCommand() {
return join(__dirname, './node_modules/.bin/pnpm');
}
export function pnpm(options: SpawnOptions, ...args: string[]) {
return exec(options, getCommand(), args);
}

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-yarn1
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,9 +1,9 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-yarn1",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"yarn": "1.22.19"
},
"scripts": {

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-yarn2
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,9 +1,9 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-yarn2",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"@yarnpkg/cli-dist": "2.4.2"
},
"scripts": {

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-yarn3
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

View File

@@ -1,10 +1,10 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-yarn3",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5",
"@yarnpkg/cli-dist": "3.3.1"
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6",
"@yarnpkg/cli-dist": "3.4.1"
},
"scripts": {
"test": "jest"

View File

@@ -1,5 +1,12 @@
# @verdaccio/e2e-cli-yarn4
## 1.0.1-6-next.6
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/test-cli-commons@1.1.0-6-next.6
## 1.0.1-6-next.5
### Patch Changes

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,10 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-yarn4",
"version": "1.0.1-6-next.5",
"version": "1.0.1-6-next.6",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:1.0.1-6-next.5"
"@yarnpkg/cli-dist": "4.0.0-rc.39",
"@verdaccio/test-cli-commons": "workspace:1.1.0-6-next.6"
},
"scripts": {
"test": "jest"

View File

@@ -7,10 +7,7 @@ export function getCommand(projectFolder) {
}
export function getYarnCommand() {
// FUTURE: yarn 4 rc still not available via registry
// tags: https://repo.yarnpkg.com/tags
// download binary: https://repo.yarnpkg.com/4.0.0-rc.14/packages/yarnpkg-cli/bin/yarn.js
return join(__dirname, './bin/yarn-4.0.0-rc.14.cjs');
return join(__dirname, './node_modules/@yarnpkg/cli-dist/bin/yarn.js');
}
export function yarn(projectFolder, ...args: string[]) {

View File

@@ -0,0 +1,6 @@
FROM eboraas/apache
LABEL Juan Picado <jotadeveloper@gmail.com>
# http://pierrecaserta.com/apache-proxy-one-docker-server-many-domains/
RUN a2enmod proxy
COPY ./conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
COPY ./conf/env.load /etc/apache2/mods-enabled/env.load

View File

@@ -0,0 +1,17 @@
ServerName localhost:80
ServerAdmin admin@localhost
<VirtualHost *:80>
ServerName localhost
<Proxy *>
Allow from localhost
</Proxy>
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
ProxyPass / http://verdaccio:4873/ nocanon
ProxyPassReverse / http://verdaccio:4873/
CustomLog /var/log/apache2/verdaccio-access.log combined
ErrorLog /var/log/apache2/verdaccio-error.log
</VirtualHost>

View File

@@ -0,0 +1,4 @@
LoadModule env_module /usr/lib/apache2/modules/mod_env.so
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule socache_shmcb_module /usr/lib/apache2/modules/mod_socache_shmcb.so

View File

@@ -0,0 +1,23 @@
version: '2'
services:
verdaccio:
image: verdaccio/verdaccio:nightly-master
container_name: verdaccio
ports:
- '4873:4873'
volumes:
- verdaccio:/verdaccio
apacheproxy:
build: apache_proxy/
links:
- verdaccio
ports:
- '80:80'
volumes_from:
- verdaccio
volumes:
verdaccio:
driver: local

View File

@@ -0,0 +1,9 @@
FROM verdaccio/verdaccio:nightly-master
LABEL Juan Picado <jotadeveloper@gmail.com>
ADD docker.yaml /verdaccio/conf/config.yaml
USER root
RUN npm install --global verdaccio-static-token \
# && npm install --global verdaccio-memory@6-next \
&& npm install --global verdaccio-auth-memory@6-next
USER $VERDACCIO_USER_UID

View File

@@ -0,0 +1,12 @@
version: '2'
services:
verdaccio:
build: .
ports:
- '4873:4873'
volumes:
- verdaccio:/verdaccio
volumes:
verdaccio:
driver: local

View File

@@ -0,0 +1,46 @@
# store:
# memory:
# limit: 1000
storage: ./storage
plugins: /verdaccio/plugins
web:
title: Verdaccio Publish Config Test
auth:
auth-memory:
users:
foo:
name: foo
password: s3cret
bar:
name: bar
password: s3cret
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@*/*':
access: $all
publish: $authenticated
unpublish: $authenticated
proxy: npmjs
'**':
access: $all
publish: $authenticated
unpublish: $authenticated
proxy: npmjs
server:
keepAliveTimeout: 60
middlewares:
audit:
enabled: true
static-token:
- token: mySecureToken
user: systemUser
password: systemPassword
- token: ABCD1234
user: uncle
password: tom
log: { type: stdout, format: pretty, level: http }

View File

@@ -0,0 +1,3 @@
FROM verdaccio/verdaccio:nightly-master
LABEL Juan Picado <jotadeveloper@gmail.com>
ADD docker.yaml /verdaccio/conf/config.yaml

View File

@@ -0,0 +1,12 @@
version: '2'
services:
verdaccio:
build: .
ports:
- '4873:4873'
volumes:
- verdaccio:/verdaccio
volumes:
verdaccio:
driver: local

View File

@@ -0,0 +1,37 @@
storage: /verdaccio/storage/data
plugins: /verdaccio/plugins
web:
enable: true
title: verdaccio-server-e2e
login: true
auth:
htpasswd:
file: /verdaccio/storage/htpasswd
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@verdaccio/*':
access: $all
publish: $authenticated
'@*/*':
access: $all
publish: $authenticated
unpublish: $authenticated
proxy: npmjs
'**':
access: $all
publish: $authenticated
unpublish: $authenticated
proxy: npmjs
middlewares:
audit:
enabled: true
log: { type: stdout, format: json, level: info }

View File

@@ -0,0 +1,3 @@
FROM tutum/nginx
RUN rm /etc/nginx/sites-enabled/default
ADD sites-enabled /etc/nginx/sites-enabled

View File

@@ -0,0 +1,14 @@
server {
listen 80 default_server;
access_log /var/log/nginx/verdaccio.log;
charset utf-8;
location / {
proxy_pass http://verdaccio:4873/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
}
}

View File

@@ -0,0 +1,26 @@
version: '2'
services:
verdaccio:
image: verdaccio/verdaccio:nightly-master
container_name: verdaccio_root_path
ports:
- '4873:4873'
volumes:
- verdaccio:/verdaccio
nginx:
restart: always
build: conf/nginx
ports:
- '80:80'
volumes:
- /www/public
volumes_from:
- verdaccio
links:
- verdaccio:verdaccio
volumes:
verdaccio:
driver: local

View File

@@ -3,10 +3,10 @@
"name": "@verdaccio/e2e-ui",
"version": "2.0.0-6-next.3",
"devDependencies": {
"verdaccio": "workspace:6.0.0-6-next.59",
"@verdaccio/core": "workspace:6.0.0-6-next.59",
"@verdaccio/config": "workspace:6.0.0-6-next.59",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.7",
"verdaccio": "workspace:6.0.0-6-next.65",
"@verdaccio/core": "workspace:6.0.0-6-next.65",
"@verdaccio/config": "workspace:6.0.0-6-next.65",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.8",
"debug": "4.3.4",
"cypress": "11.2.0"
},

View File

@@ -38,74 +38,73 @@
"@babel/preset-typescript": "7.18.6",
"@babel/register": "7.18.9",
"@babel/runtime": "7.20.7",
"@dianmora/contributors": "5.0.0",
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.24.4",
"@changesets/get-dependents-graph": "1.3.5",
"@crowdin/cli": "3.9.1",
"@dianmora/contributors": "5.0.0",
"@emotion/react": "11.10.5",
"@emotion/styled": "11.10.5",
"@testing-library/dom": "8.19.1",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "12.1.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"@trivago/prettier-plugin-sort-imports": "3.4.0",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"@types/async": "3.2.16",
"@types/express": "4.17.15",
"@types/http-errors": "1.8.2",
"@types/jest": "27.5.2",
"@types/jsonwebtoken": "8.5.9",
"@types/lodash": "4.14.191",
"@types/mime": "2.0.3",
"@types/minimatch": "3.0.5",
"@types/redux": "3.6.0",
"@types/node": "16.18.10",
"@types/jsonwebtoken": "8.5.9",
"@types/request": "2.48.8",
"@types/semver": "7.3.13",
"@types/node-fetch": "2.6.2",
"@types/supertest": "2.0.12",
"@types/testing-library__jest-dom": "5.14.5",
"@types/validator": "13.7.10",
"@types/webpack": "5.28.0",
"@types/webpack-env": "1.18.0",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
"@types/react-router-dom": "5.3.3",
"@types/react-virtualized": "9.21.21",
"@typescript-eslint/eslint-plugin": "5.49.0",
"@typescript-eslint/parser": "5.49.0",
"@types/redux": "3.6.0",
"@types/request": "2.48.8",
"@types/semver": "7.3.13",
"@types/supertest": "2.0.12",
"@types/testing-library__jest-dom": "5.14.5",
"@types/validator": "13.7.12",
"@types/webpack": "5.28.0",
"@types/webpack-env": "1.18.0",
"@typescript-eslint/eslint-plugin": "5.52.0",
"@typescript-eslint/parser": "5.52.0",
"@verdaccio/crowdin-translations": "workspace:*",
"@verdaccio/eslint-config": "workspace:*",
"@verdaccio/types": "workspace:*",
"@verdaccio/ui-theme": "workspace:*",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.1.0",
"babel-jest": "29.3.1",
"babel-jest": "29.4.3",
"babel-plugin-dynamic-import-node": "2.3.3",
"babel-plugin-emotion": "10.2.2",
"concurrently": "6.5.1",
"core-js": "3.27.0",
"cross-env": "7.0.3",
"debug": "4.3.4",
"detect-secrets": "1.0.6",
"jest-diff": "29.3.1",
"eslint": "8.33.0",
"eslint": "8.34.0",
"fs-extra": "10.1.0",
"got": "11.8.6",
"husky": "7.0.4",
"in-publish": "2.0.1",
"jest": "29.3.1",
"jest-environment-jsdom": "29.3.1",
"jest": "29.4.3",
"jest-diff": "29.4.3",
"jest-environment-jsdom": "29.4.3",
"jest-environment-jsdom-global": "3.1.2",
"jest-environment-node": "29.3.1",
"jest-junit": "12.3.0",
"kleur": "3.0.3",
"lint-staged": "11.2.6",
"got": "11.8.6",
"nock": "13.2.9",
"nodemon": "2.0.20",
"npm-run-all": "4.1.5",
"prettier": "2.8.3",
"prettier": "2.8.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"rimraf": "3.0.2",
"selfsigned": "1.10.14",
"supertest": "6.3.3",

View File

@@ -1,5 +1,89 @@
# @verdaccio/api
## 6.0.0-6-next.48
### Patch Changes
- Updated dependencies [a1da1130]
- @verdaccio/core@6.0.0-6-next.65
- @verdaccio/auth@6.0.0-6-next.44
- @verdaccio/config@6.0.0-6-next.65
- @verdaccio/middleware@6.0.0-6-next.44
- @verdaccio/store@6.0.0-6-next.45
- @verdaccio/utils@6.0.0-6-next.33
- @verdaccio/logger@6.0.0-6-next.33
## 6.0.0-6-next.47
### Patch Changes
- Updated dependencies [974cd8c1]
- @verdaccio/core@6.0.0-6-next.64
- @verdaccio/auth@6.0.0-6-next.43
- @verdaccio/config@6.0.0-6-next.64
- @verdaccio/middleware@6.0.0-6-next.43
- @verdaccio/store@6.0.0-6-next.44
- @verdaccio/utils@6.0.0-6-next.32
- @verdaccio/logger@6.0.0-6-next.32
## 6.0.0-6-next.46
### Patch Changes
- Updated dependencies [ddb6a223]
- Updated dependencies [dc571aab]
- @verdaccio/auth@6.0.0-6-next.42
- @verdaccio/config@6.0.0-6-next.63
- @verdaccio/core@6.0.0-6-next.63
- @verdaccio/middleware@6.0.0-6-next.42
- @verdaccio/store@6.0.0-6-next.43
- @verdaccio/utils@6.0.0-6-next.31
- @verdaccio/logger@6.0.0-6-next.31
## 6.0.0-6-next.45
### Patch Changes
- Updated dependencies [4fc21146]
- Updated dependencies [378e907d]
- @verdaccio/middleware@6.0.0-6-next.41
- @verdaccio/core@6.0.0-6-next.62
- @verdaccio/auth@6.0.0-6-next.41
- @verdaccio/logger@6.0.0-6-next.30
- @verdaccio/store@6.0.0-6-next.42
- @verdaccio/config@6.0.0-6-next.62
- @verdaccio/utils@6.0.0-6-next.30
## 6.0.0-6-next.44
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/config@6.0.0-6-next.61
- @verdaccio/auth@6.0.0-6-next.40
- @verdaccio/middleware@6.0.0-6-next.40
- @verdaccio/store@6.0.0-6-next.41
- @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.43
### Minor Changes
- 45c03819: refactor: render html middleware
### Patch Changes
- Updated dependencies [45c03819]
- @verdaccio/config@6.0.0-6-next.60
- @verdaccio/middleware@6.0.0-6-next.39
- @verdaccio/store@6.0.0-6-next.40
- @verdaccio/auth@6.0.0-6-next.39
- @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.42
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/api",
"version": "6.0.0-6-next.42",
"version": "6.0.0-6-next.48",
"description": "loaders logic",
"main": "./build/index.js",
"types": "build/index.d.ts",
@@ -39,13 +39,13 @@
},
"license": "MIT",
"dependencies": {
"@verdaccio/auth": "workspace:6.0.0-6-next.38",
"@verdaccio/config": "workspace:6.0.0-6-next.59",
"@verdaccio/core": "workspace:6.0.0-6-next.59",
"@verdaccio/logger": "workspace:6.0.0-6-next.27",
"@verdaccio/middleware": "workspace:6.0.0-6-next.38",
"@verdaccio/store": "workspace:6.0.0-6-next.39",
"@verdaccio/utils": "workspace:6.0.0-6-next.27",
"@verdaccio/auth": "workspace:6.0.0-6-next.44",
"@verdaccio/config": "workspace:6.0.0-6-next.65",
"@verdaccio/core": "workspace:6.0.0-6-next.65",
"@verdaccio/logger": "workspace:6.0.0-6-next.33",
"@verdaccio/middleware": "workspace:6.0.0-6-next.44",
"@verdaccio/store": "workspace:6.0.0-6-next.45",
"@verdaccio/utils": "workspace:6.0.0-6-next.33",
"abortcontroller-polyfill": "1.7.5",
"cookies": "0.8.0",
"debug": "4.3.4",
@@ -57,9 +57,9 @@
},
"devDependencies": {
"@types/node": "16.18.10",
"@verdaccio/server": "workspace:6.0.0-6-next.48",
"@verdaccio/types": "workspace:11.0.0-6-next.19",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.7",
"@verdaccio/server": "workspace:6.0.0-6-next.54",
"@verdaccio/types": "workspace:11.0.0-6-next.23",
"@verdaccio/test-helper": "workspace:2.0.0-6-next.8",
"supertest": "6.3.3",
"nock": "13.2.9",
"mockdate": "3.0.5"

View File

@@ -13,6 +13,7 @@ import {
validatioUtils,
} from '@verdaccio/core';
import { logger } from '@verdaccio/logger';
import { rateLimit } from '@verdaccio/middleware';
import { Config, RemoteUser } from '@verdaccio/types';
import { getAuthenticatedMessage, mask } from '@verdaccio/utils';
@@ -23,6 +24,7 @@ const debug = buildDebug('verdaccio:api:user');
export default function (route: Router, auth: Auth, config: Config): void {
route.get(
'/-/user/:org_couchdb_user',
rateLimit(config?.userRateLimit),
function (req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
debug('verifying user');
const message = getAuthenticatedMessage(req.remote_user.name);
@@ -53,6 +55,7 @@ export default function (route: Router, auth: Auth, config: Config): void {
*/
route.put(
'/-/user/:org_couchdb_user/:_rev?/:revision?',
rateLimit(config?.userRateLimit),
function (req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
const { name, password } = req.body;
debug('login or adduser');

View File

@@ -10,6 +10,7 @@ import {
errorUtils,
validatioUtils,
} from '@verdaccio/core';
import { rateLimit } from '@verdaccio/middleware';
import { Config } from '@verdaccio/types';
import { $NextFunctionVer, $RequestExtend } from '../../types/custom';
@@ -41,6 +42,7 @@ export default function (route: Router, auth: Auth, config: Config): void {
route.get(
'/-/npm/v1/user',
rateLimit(config?.userRateLimit),
function (req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
if (_.isNil(req.remote_user.name) === false) {
return next(buildProfile(req.remote_user.name));
@@ -55,6 +57,7 @@ export default function (route: Router, auth: Auth, config: Config): void {
route.post(
'/-/npm/v1/user',
rateLimit(config?.userRateLimit),
function (req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
if (_.isNil(req.remote_user.name)) {
res.status(HTTP_STATUS.UNAUTHORIZED);

View File

@@ -5,6 +5,7 @@ import { getApiToken } from '@verdaccio/auth';
import { Auth } from '@verdaccio/auth';
import { HEADERS, HTTP_STATUS, SUPPORT_ERRORS, errorUtils } from '@verdaccio/core';
import { logger } from '@verdaccio/logger';
import { rateLimit } from '@verdaccio/middleware';
import { Storage } from '@verdaccio/store';
import { Config, RemoteUser, Token } from '@verdaccio/types';
import { mask, stringToMD5 } from '@verdaccio/utils';
@@ -26,6 +27,7 @@ function normalizeToken(token: Token): NormalizeToken {
export default function (route: Router, auth: Auth, storage: Storage, config: Config): void {
route.get(
'/-/npm/v1/tokens',
rateLimit(config?.userRateLimit),
async function (req: $RequestExtend, res: Response, next: $NextFunctionVer) {
const { name } = req.remote_user;
@@ -53,6 +55,7 @@ export default function (route: Router, auth: Auth, storage: Storage, config: Co
route.post(
'/-/npm/v1/tokens',
rateLimit(config?.userRateLimit),
function (req: $RequestExtend, res: Response, next: $NextFunctionVer) {
const { password, readonly, cidr_whitelist } = req.body;
const { name } = req.remote_user;
@@ -123,6 +126,7 @@ export default function (route: Router, auth: Auth, storage: Storage, config: Co
route.delete(
'/-/npm/v1/tokens/token/:tokenKey',
rateLimit(config?.userRateLimit),
async (req: $RequestExtend, res: Response, next: $NextFunctionVer) => {
const {
params: { tokenKey },

View File

@@ -1,5 +1,85 @@
# @verdaccio/auth
## 6.0.0-6-next.44
### Patch Changes
- Updated dependencies [a1da1130]
- @verdaccio/core@6.0.0-6-next.65
- @verdaccio/config@6.0.0-6-next.65
- @verdaccio/loaders@6.0.0-6-next.34
- verdaccio-htpasswd@11.0.0-6-next.35
- @verdaccio/utils@6.0.0-6-next.33
- @verdaccio/signature@6.0.0-6-next.2
- @verdaccio/logger@6.0.0-6-next.33
## 6.0.0-6-next.43
### Patch Changes
- Updated dependencies [974cd8c1]
- @verdaccio/core@6.0.0-6-next.64
- @verdaccio/config@6.0.0-6-next.64
- @verdaccio/loaders@6.0.0-6-next.33
- verdaccio-htpasswd@11.0.0-6-next.34
- @verdaccio/utils@6.0.0-6-next.32
- @verdaccio/logger@6.0.0-6-next.32
- @verdaccio/signature@6.0.0-6-next.2
## 6.0.0-6-next.42
### Minor Changes
- ddb6a223: feat: signature package
### Patch Changes
- Updated dependencies [ddb6a223]
- Updated dependencies [dc571aab]
- @verdaccio/config@6.0.0-6-next.63
- @verdaccio/signature@6.0.0-6-next.2
- @verdaccio/core@6.0.0-6-next.63
- @verdaccio/loaders@6.0.0-6-next.32
- verdaccio-htpasswd@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.41
### Patch Changes
- Updated dependencies [378e907d]
- @verdaccio/core@6.0.0-6-next.62
- @verdaccio/loaders@6.0.0-6-next.31
- @verdaccio/logger@6.0.0-6-next.30
- verdaccio-htpasswd@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.40
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/config@6.0.0-6-next.61
- @verdaccio/loaders@6.0.0-6-next.30
- verdaccio-htpasswd@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.39
### Patch Changes
- Updated dependencies [45c03819]
- @verdaccio/config@6.0.0-6-next.60
- @verdaccio/loaders@6.0.0-6-next.29
- verdaccio-htpasswd@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.38
### Patch Changes

View File

@@ -4,7 +4,7 @@ module.exports = Object.assign({}, config, {
coverageThreshold: {
global: {
// FIXME: increase to 90
lines: 42,
lines: 30,
},
},
});

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/auth",
"version": "6.0.0-6-next.38",
"version": "6.0.0-6-next.44",
"description": "logger",
"main": "./build/index.js",
"types": "./build/index.d.ts",
@@ -39,19 +39,19 @@
},
"license": "MIT",
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.59",
"@verdaccio/config": "workspace:6.0.0-6-next.59",
"@verdaccio/loaders": "workspace:6.0.0-6-next.28",
"@verdaccio/logger": "workspace:6.0.0-6-next.27",
"@verdaccio/utils": "workspace:6.0.0-6-next.27",
"@verdaccio/core": "workspace:6.0.0-6-next.65",
"@verdaccio/config": "workspace:6.0.0-6-next.65",
"@verdaccio/loaders": "workspace:6.0.0-6-next.34",
"@verdaccio/logger": "workspace:6.0.0-6-next.33",
"@verdaccio/signature": "workspace:6.0.0-6-next.2",
"@verdaccio/utils": "workspace:6.0.0-6-next.33",
"debug": "4.3.4",
"express": "4.18.2",
"jsonwebtoken": "9.0.0",
"lodash": "4.17.21",
"verdaccio-htpasswd": "workspace:11.0.0-6-next.29"
"verdaccio-htpasswd": "workspace:11.0.0-6-next.35"
},
"devDependencies": {
"@verdaccio/types": "workspace:11.0.0-6-next.19"
"@verdaccio/types": "workspace:11.0.0-6-next.23"
},
"funding": {
"type": "opencollective",

View File

@@ -15,6 +15,7 @@ import {
} from '@verdaccio/core';
import { asyncLoadPlugin } from '@verdaccio/loaders';
import { logger } from '@verdaccio/logger';
import { aesEncrypt, parseBasicPayload, signPayload } from '@verdaccio/signature';
import {
AllowAccess,
Callback,
@@ -27,9 +28,6 @@ import {
} from '@verdaccio/types';
import { getMatchedPackagesSpec, isFunction, isNil } from '@verdaccio/utils';
import { signPayload } from './jwt-token';
import { aesEncrypt } from './legacy-token';
import { parseBasicPayload } from './token';
import {
convertPayloadToBase64,
getDefaultPlugins,
@@ -47,6 +45,7 @@ export interface TokenEncryption {
aesEncrypt(buf: string): string | void;
}
// remove
export interface AESPayload {
user: string;
password: string;

View File

@@ -1,5 +1,2 @@
export { Auth, TokenEncryption } from './auth';
export { Auth } from './auth';
export * from './utils';
export * from './legacy-token';
export * from './jwt-token';
export * from './token';

View File

@@ -11,12 +11,10 @@ import {
errorUtils,
pluginUtils,
} from '@verdaccio/core';
import { aesDecrypt, parseBasicPayload, verifyPayload } from '@verdaccio/signature';
import { AuthPackageAllow, Config, Logger, RemoteUser, Security } from '@verdaccio/types';
import { AESPayload, TokenEncryption } from './auth';
import { verifyPayload } from './jwt-token';
import { aesDecrypt } from './legacy-token';
import { parseBasicPayload } from './token';
const debug = buildDebug('verdaccio:auth:utils');

View File

@@ -17,24 +17,22 @@ import {
errorUtils,
} from '@verdaccio/core';
import { setup } from '@verdaccio/logger';
import { aesDecrypt, signPayload, verifyPayload } from '@verdaccio/signature';
import { Config, RemoteUser, Security } from '@verdaccio/types';
import { buildToken, buildUserBuffer, getAuthenticatedMessage } from '@verdaccio/utils';
import type { AllowActionCallbackResponse } from '@verdaccio/utils';
import {
ActionsAllowed,
AllowActionCallbackResponse,
Auth,
aesDecrypt,
allow_action,
getApiToken,
getDefaultPlugins,
getMiddlewareCredentials,
signPayload,
verifyJWTPayload,
verifyPayload,
} from '../src';
setup([]);
setup({});
const parseConfigurationFile = (conf) => {
const { name, ext } = path.parse(conf);
@@ -452,6 +450,7 @@ describe('Auth utilities', () => {
const config: Config = getConfig('security-legacy', secret);
const auth: Auth = new Auth(config);
await auth.init();
// @ts-expect-error
const token = auth.aesEncrypt(null);
const security: Security = config.security;
const credentials = getMiddlewareCredentials(

View File

@@ -19,6 +19,9 @@
{
"path": "../loaders"
},
{
"path": "../signature"
},
{
"path": "../logger/logger"
},

View File

@@ -1,5 +1,70 @@
# @verdaccio/cli
## 6.0.0-6-next.65
### Patch Changes
- Updated dependencies [a1da1130]
- @verdaccio/core@6.0.0-6-next.65
- @verdaccio/config@6.0.0-6-next.65
- @verdaccio/node-api@6.0.0-6-next.65
- @verdaccio/logger@6.0.0-6-next.33
## 6.0.0-6-next.64
### Minor Changes
- 974cd8c1: fix: startup messages improved and logs support on types
### Patch Changes
- Updated dependencies [974cd8c1]
- @verdaccio/core@6.0.0-6-next.64
- @verdaccio/config@6.0.0-6-next.64
- @verdaccio/node-api@6.0.0-6-next.64
- @verdaccio/logger@6.0.0-6-next.32
## 6.0.0-6-next.63
### 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/node-api@6.0.0-6-next.63
- @verdaccio/logger@6.0.0-6-next.31
## 6.0.0-6-next.62
### Patch Changes
- Updated dependencies [378e907d]
- @verdaccio/core@6.0.0-6-next.62
- @verdaccio/logger@6.0.0-6-next.30
- @verdaccio/node-api@6.0.0-6-next.62
- @verdaccio/config@6.0.0-6-next.62
## 6.0.0-6-next.61
### Patch Changes
- Updated dependencies [d167f92e]
- @verdaccio/config@6.0.0-6-next.61
- @verdaccio/node-api@6.0.0-6-next.61
- @verdaccio/core@6.0.0-6-next.61
- @verdaccio/logger@6.0.0-6-next.29
## 6.0.0-6-next.60
### Patch Changes
- Updated dependencies [45c03819]
- @verdaccio/config@6.0.0-6-next.60
- @verdaccio/node-api@6.0.0-6-next.60
- @verdaccio/core@6.0.0-6-next.60
- @verdaccio/logger@6.0.0-6-next.28
## 6.0.0-6-next.59
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/cli",
"version": "6.0.0-6-next.59",
"version": "6.0.0-6-next.65",
"author": {
"name": "Juan Picado",
"email": "juanpicado19@gmail.com"
@@ -44,11 +44,11 @@
"start": "ts-node src/index.ts"
},
"dependencies": {
"@verdaccio/core": "workspace:6.0.0-6-next.59",
"@verdaccio/config": "workspace:6.0.0-6-next.59",
"@verdaccio/logger": "workspace:6.0.0-6-next.27",
"@verdaccio/node-api": "workspace:6.0.0-6-next.59",
"clipanion": "3.1.0",
"@verdaccio/core": "workspace:6.0.0-6-next.65",
"@verdaccio/config": "workspace:6.0.0-6-next.65",
"@verdaccio/logger": "workspace:6.0.0-6-next.33",
"@verdaccio/node-api": "workspace:6.0.0-6-next.65",
"clipanion": "3.2.0",
"envinfo": "7.8.1",
"kleur": "3.0.3",
"semver": "7.3.8"

View File

@@ -46,9 +46,7 @@ export class InitCommand extends Command {
});
private initLogger(logConfig: ConfigYaml) {
// @ts-expect-error
if (logConfig.logs) {
// @ts-expect-error
logConfig.log = logConfig.logs;
warningUtils.emit(warningUtils.Codes.VERWAR002);
}

View File

@@ -1,5 +1,64 @@
# @verdaccio/config
## 6.0.0-6-next.65
### Patch Changes
- Updated dependencies [a1da1130]
- @verdaccio/core@6.0.0-6-next.65
- @verdaccio/utils@6.0.0-6-next.33
## 6.0.0-6-next.64
### Patch Changes
- Updated dependencies [974cd8c1]
- @verdaccio/core@6.0.0-6-next.64
- @verdaccio/utils@6.0.0-6-next.32
## 6.0.0-6-next.63
### Minor Changes
- ddb6a223: feat: signature package
- dc571aab: feat: add forceEnhancedLegacySignature
### Patch Changes
- Updated dependencies [dc571aab]
- @verdaccio/core@6.0.0-6-next.63
- @verdaccio/utils@6.0.0-6-next.31
## 6.0.0-6-next.62
### Patch Changes
- Updated dependencies [378e907d]
- @verdaccio/core@6.0.0-6-next.62
- @verdaccio/utils@6.0.0-6-next.30
## 6.0.0-6-next.61
### Minor Changes
- d167f92e: chore: rollback yaml dep support old nodejs versions
### Patch Changes
- @verdaccio/core@6.0.0-6-next.61
- @verdaccio/utils@6.0.0-6-next.29
## 6.0.0-6-next.60
### Minor Changes
- 45c03819: refactor: render html middleware
### Patch Changes
- @verdaccio/core@6.0.0-6-next.60
- @verdaccio/utils@6.0.0-6-next.28
## 6.0.0-6-next.59
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@verdaccio/config",
"version": "6.0.0-6-next.59",
"version": "6.0.0-6-next.65",
"description": "logger",
"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:6.0.0-6-next.59",
"@verdaccio/utils": "workspace:6.0.0-6-next.27",
"@verdaccio/core": "workspace:6.0.0-6-next.65",
"@verdaccio/utils": "workspace:6.0.0-6-next.33",
"debug": "4.3.4",
"yaml": "2.2.0",
"js-yaml": "4.1.0",
"lodash": "4.17.21",
"minimatch": "3.1.2",
"yup": "0.32.11"

View File

@@ -1,5 +1,17 @@
const pkgVersion = require('../package.json').version;
import _ from 'lodash';
export function getUserAgent(): string {
return `verdaccio/${pkgVersion}`;
export function getUserAgent(
customUserAgent?: boolean | string,
version?: string,
name?: string
): string {
if (customUserAgent === true) {
return `${name}/${version}`;
} else if (_.isString(customUserAgent) && _.isEmpty(customUserAgent) === false) {
return customUserAgent;
} else if (customUserAgent === false) {
return 'hidden';
}
return `${name}/${version}`;
}

View File

@@ -28,7 +28,6 @@ const debug = buildDebug('verdaccio:config');
* @return {String} the config file path
*/
function findConfigFile(configPath?: string): string {
// console.log(process.env);
if (typeof configPath !== 'undefined') {
return path.resolve(configPath);
}

View File

@@ -2,7 +2,8 @@ import assert from 'assert';
import buildDebug from 'debug';
import _ from 'lodash';
import { APP_ERROR } from '@verdaccio/core';
import { APP_ERROR, warningUtils } from '@verdaccio/core';
import { Codes } from '@verdaccio/core/build/warning-utils';
import {
Config as AppConfig,
AuthConf,
@@ -10,6 +11,7 @@ import {
FlagsConfig,
PackageAccess,
PackageList,
RateLimit,
Security,
ServerSettingsConf,
} from '@verdaccio/types';
@@ -28,19 +30,27 @@ const debug = buildDebug('verdaccio:config');
export const WEB_TITLE = 'Verdaccio';
// we limit max 1000 request per 15 minutes on user endpoints
export const defaultUserRateLimiting = {
windowMs: 15 * 60 * 1000, // 15 minutes
max: 1000,
};
/**
* Coordinates the application configuration
*/
class Config implements AppConfig {
public user_agent: string;
public user_agent: string | undefined;
public uplinks: any;
public packages: PackageList;
public users: any;
public auth: AuthConf;
public server_id: string;
// @deprecated use configPath instead
public config_path: string;
public configPath: string;
/**
* @deprecated use configPath or config.getConfigPath();
*/
public self_path: string;
public storage: string | void;
public plugins: string | void | null;
@@ -49,15 +59,25 @@ class Config implements AppConfig {
// @ts-ignore
public secret: string;
public flags: FlagsConfig;
public constructor(config: ConfigYaml & { config_path: string }) {
public userRateLimit: RateLimit;
private configOptions: { forceEnhancedLegacySignature: boolean };
public constructor(
config: ConfigYaml & { config_path: string },
configOptions = { forceEnhancedLegacySignature: true }
) {
const self = this;
this.configOptions = configOptions;
this.storage = process.env.VERDACCIO_STORAGE_PATH || config.storage;
if (!config.configPath) {
throw new Error('config_path is required');
// backport self_path for previous to version 6
// @ts-expect-error
config.configPath = config.config_path ?? config.self_path;
if (!config.configPath) {
throw new Error('configPath property is required');
}
}
this.config_path = config.config_path ?? (config.configPath as string);
this.configPath = config.configPath;
this.self_path = this.configPath;
debug('config path: %s', this.configPath);
this.plugins = config.plugins;
this.security = _.merge(defaultSecurity, config.security);
@@ -65,6 +85,7 @@ class Config implements AppConfig {
this.flags = {
searchRemote: config.flags?.searchRemote ?? true,
};
this.user_agent = config.user_agent;
for (const configProp in config) {
if (self[configProp] == null) {
@@ -72,11 +93,14 @@ class Config implements AppConfig {
}
}
// @ts-ignore
if (_.isNil(this.user_agent)) {
this.user_agent = getUserAgent();
if (typeof this.user_agent === 'undefined') {
// by default user agent is hidden
debug('set default user agent');
this.user_agent = getUserAgent(false);
}
this.userRateLimit = { ...defaultUserRateLimiting, ...config?.userRateLimit };
// some weird shell scripts are valid yaml files parsed as string
assert(_.isObject(config), APP_ERROR.CONFIG_NOT_VALID);
@@ -106,6 +130,10 @@ class Config implements AppConfig {
}
}
public getConfigPath() {
return this.configPath;
}
/**
* Check for package spec
*/
@@ -116,18 +144,35 @@ class Config implements AppConfig {
/**
* Store or create whether receive a secret key
* @secret external secret key
*/
public checkSecretKey(secret?: string): string {
debug('check secret key');
if (_.isString(secret) && _.isEmpty(secret) === false) {
if (typeof secret === 'string' && _.isEmpty(secret) === false) {
this.secret = secret;
debug('reusing previous key');
return secret;
}
// it generates a secret key
// generate a new a secret key
// FUTURE: this might be an external secret key, perhaps within config file?
debug('generate a new key');
this.secret = generateRandomSecretKey();
//
if (this.configOptions.forceEnhancedLegacySignature) {
this.secret = generateRandomSecretKey();
} else {
this.secret =
this.security.enhancedLegacySignature === true
? generateRandomSecretKey()
: generateRandomHexString(32);
// set this to false allow use old token signature and is not recommended
// only use for migration reasons, major release will remove this property and
// set it by default
if (this.security.enhancedLegacySignature === false) {
warningUtils.emit(Codes.VERWAR005);
}
}
debug('generated a new secret key %s', this.secret?.length);
return this.secret;
}
}

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