0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-27 22:59:51 -05:00
Commit graph

779 commits

Author SHA1 Message Date
Juan Picado @jotadeveloper
3beb57f7f6
test: add unit test for parser logger strings 2019-07-26 09:33:17 +02:00
Juan Picado @jotadeveloper
12b60f6cb7
build: fix semver missing type on build with docker
it seems the @types/semver do not handle a legitimate method named 'compareLoose'
2019-07-16 18:27:58 +02:00
Juan Picado @jotadeveloper
b71df94897
Merge remote-tracking branch 'origin/master' into feat-error-code
# Conflicts:
#	src/lib/local-storage.ts
2019-07-16 17:38:25 +02:00
Juan Picado @jotadeveloper
66f4197236
feat: convert project to typescript (#1374)
* chore: test

* chore: add

* chore: more progress

* chore: progress in migration, fix prettier parser

* chore: reduce tsc errors

* chore: refactor storage utils types

* chore: refactor utils types

* chore: refactor local storage types

* chore: refactor config utils types

* chore: refactor tsc types

* refactor: apply eslint fix, tabs etc

* chore: fix lint errors

* test: update unit test conf to typescript setup

few test refactored to typescript

* chore: enable more unit test

migrate to typescript

* chore: migrate storage test to tsc

* chore: migrate up storage test to tsc

* refactor: enable plugin and auth test

* chore: migrate plugin loader test

* chore: update dependencies

* chore: migrate functional test to typescript

* chore: add codecove

* chore: update express

* chore: downgrade puppeteer

The latest version does not seems to work properly fine.

* chore: update dependencies
2019-07-16 08:40:01 +02:00
James George
eb6bf5168b feat(chore): Included provision to show up local environment information (#1365)
* feat: adds provision to show up environment information

Fixes #1364

* feat: include docker info

* fix: pin envinfo

* fix: lock file

* fix: docker config

* fix: minor refactor

handle async behaviour

* feat: add short version for info
2019-06-30 18:17:25 +02:00
Juan Picado @jotadeveloper
3c539975c3
feat: plugins can throw http status codes
This feature aims to fix a unfair and missleading situation with storage plugins. Until now they were forced to throw Node error codes https://nodejs.org/api/errors.html#nodejs-error-codes when a resource is not found or a file exist already.

Error codes as EEXISTS or ENOENT does not exist in environments where storage is a database or cloud api, thus must be mock.

This PR has backward compability and plugins can safely migrate to new error http codes.
2019-06-23 22:57:46 +02:00
Juan Picado @jotadeveloper
d252e66588
Merge remote-tracking branch 'origin/master' into 4.1.x
# Conflicts:
#	test/unit/modules/cli/cli.spec.js
2019-06-20 15:10:26 +02:00
Daniel Ruf
a92bd5f633 fix: correctly check the keepAliveTimeout value, fixes #1352 (#1353)
* fix: correctly check the keepAliveTimeout value, fixes #1352

* test: check keepAliveTimeout configurations using the CLI
2019-06-19 09:00:48 +02:00
Juan Picado @jotadeveloper
0fa26293a8
Merge remote-tracking branch 'origin/master' into 4.1.x 2019-06-13 22:04:35 +02:00
Will Smythe
eb7a8e3528 fix(api): return 503 to npm/yarn on uplink connection timeout (#1331)
fix  #1328 and #720

Type: bug

The following has been addressed in the PR:

Instead of returning a 404 (Not Found) when npm, yarn, etc requests a package and the package cannot be acquired from an uplink due to a connection timeout, socket timeout, or connection reset problem, a 503 (service unavailable) is returned by Verdaccio instead. In limited testing of a few versions of npm and yarn, both of these clients correctly attempt to retry the request when a 503 is returned.

Added functional tests to verify the behavior (this adds a dev dependency on nock, which provides HTTP request mocking

Description:

This resolves issue #1328 and #720, and ensures npm/yarn install commands don't fail immediately when there is an intermittent network timeout problem with an uplink. Instead Verdaccio will appropriately respond to the client with a 503. A 404 response (current behavior) incorrectly tells the client that the package does not exist (which may or may not be true) and to not try again.
2019-06-13 21:42:01 +02:00
Juan Picado @jotadeveloper
85c1bd1f76
fix(api): force authenticate on login (#1347)
When a user has a valid token and tries to login with other credentials the endpoint returns 201.

The reason was if another user logged previously and had a valid token stored in the terminal. We must authenticate any user that tries to log in even if the token stored is valid.

We must check credentials again and return a new token, if the credentials are wrong we reject the login. Furthermore, the new token will update the list of groups.
2019-06-13 06:58:43 +02:00
Daniel Ruf
94e735ad39 chore: remove update-banner code (#1333) 2019-06-04 09:40:15 +02:00
Daniel Ruf
df834f4836 fix: correctly check if the proxy setting evaluates to false (#1336) 2019-06-04 07:17:01 +02:00
Honza Hommer
de0446376d fix(web): fix sidebar tarball protocol (#1326)
fix: #1320 https://github.com/verdaccio/verdaccio/issues/1320
2019-05-28 22:24:40 +02:00
Juan Picado @jotadeveloper
63695e2f2b
Merge branch 'master' into 4.1.x 2019-05-21 22:54:25 -07:00
Honza Hommer
95d134bdfd feat: parse YAML/JSON/JS config file (#1258)
* Parse JSON/YAML config file.

* fix missing export

* fix: typos

* test(config): remove JSON test

* feat: better config error handling, tests

* fix: detect YAML config file via extension

* docs: https://github.com/verdaccio/website/pull/99
2019-05-21 22:50:14 -07:00
Liming Jin
3ac038fd8b
fix: warning text is hard to read when running under root 2019-05-21 11:53:00 +08:00
Juan Picado @jotadeveloper
197095efe3
Merge branch 'master' into 4.1.x 2019-05-20 13:05:38 -07:00
Juan Picado @jotadeveloper
8cf3966d5c
fix: add missing pkg version and name on start up 2019-05-20 21:30:51 +02:00
Juan Picado @jotadeveloper
b4c42c1a78
test: relocate spec test 2019-05-19 22:23:12 +02:00
Juan Picado @jotadeveloper
2f3ec2ce42
test: increase usage of constants 2019-05-19 21:37:43 +02:00
Juan Picado @jotadeveloper
26c5e2d670
Merge branch 'master' into 4.1.x 2019-05-17 08:04:13 -07:00
Juan Picado @jotadeveloper
7686417f29
feat: update readme v4 (#1312)
* feat: update readme v4

* chore: update @verdaccio/ui-theme@0.1.9

* chore: update @verdaccio/ui-theme@0.1.10
2019-05-17 08:03:58 -07:00
Marc Udoff
b9ffac5d1b feat: plugin support to filter packages
Add a plugin that can filter all package metadata before being returned.
This enables blocking of packages from verdaccio.

IPluginStorageFilter are loaded like other plugins from the config.
Verdaccio will look for plugins in config.filters and pass this to
storage.init. This is the same design as other plugins and will be
dynamically found with the same rules. These plugins must impliment
a filter_metadata method, which is called serially (in the order
loaded from the config) for every metadata request. It gets a current
copy of a package metadata and may choose to modify it as required.
For example, this may be used to block a bad version of a package or
add a time delay from when new packages can be used from your
registry. Errors in a filter will cause a 404, similar to upLinkErrors
as it is not safe to recover gracefully from them. Note: When version
is removed, be careful about updating tags.

Fixes: #818
2019-05-15 20:04:41 -04:00
Ayush Sharma
a588588cf3 chore: removes verdaccio update banner (#1309) 2019-05-12 10:38:32 -07:00
Juan Picado @jotadeveloper
01f8da6366
fix: routing is aware of reverse proxy directory #1297 2019-05-02 21:56:14 +02:00
Juan Picado @jotadeveloper
615db0affb
feat: add some security headers for web UI (#1295) @juanpicado
* feat: add some security headers for web UI

The idea behind this is have more control over the content is rendered mostly via README.

* chore: rename header for frame options

* chore: rename method better name
2019-04-30 23:46:36 +02:00
Daniel Ruf
ff71640e8a feat: replace chalk with kleur (#1289) @DanielRuf
* chore: replace chalk with kleur

* build: add updated lockfile

* chore: add flow-typed stub for kleur 3.0.3

* chore: remove unnecessary whitespace

* test: update snapshot for update-banner.js

* chore: migrate logger.js from chalk to kleur

* chore: use import instead of require
2019-04-29 08:44:29 +02:00
Daniel Ruf
f637efdd68
chore: replace date-fns with dayjs 2019-04-28 21:45:35 +02:00
Liming Jin
8e5203be9e
test: add unit test for the HTTP protocol check 2019-04-27 00:35:39 +08:00
Juan Picado @jotadeveloper
4af7b88919
Merge branch 'master' into fix-logo 2019-04-25 22:03:43 +02:00
Jamie Kyle
9f8a054f88 feat: accept web.primary_color as config option and inject into webui (#1282) 2019-04-25 21:50:35 +02:00
Liming Jin
56c70d4b0e
fix: logo field in configuration cannot use the local file 2019-04-19 21:52:28 +08:00
Juan Picado @jotadeveloper
86a6e5eb7f
fix: all static files are captured by the router 2019-04-16 19:11:40 +02:00
Juan Picado @jotadeveloper
8760e1821c
fix: update @verdaccio/ui-theme@0.0.13 2019-04-14 00:54:02 +02:00
Juan Picado @jotadeveloper
f730e7ac9c
chore: update dependencies 2019-04-06 14:58:02 +02:00
Juan Picado @jotadeveloper
c3c62021e5
feat: theme as plugin (#1252)
* chore: remove ui

* chore: remove size step

* chore: update theme plugin

* chore: update lock file

* Update main.workflow

* chore: update js-yaml dep

* chore: @verdaccio/ui-theme@0.0.4

* feat: allows theme as a plugin

* chore: update package description
2019-04-06 08:35:38 +02:00
Juan Picado @jotadeveloper
265849eaa9
fix: potential issue on sign new jwt tokens
If the user was already loged, we were unwraping the token and signing a new token, passing through previous payload props to new token, this might causes https://github.com/auth0/node-jsonwebtoken/issues/326#issuecomment-288124020
This commit ensure the new token will be based on sign options defined on config file.
2019-03-30 09:42:46 +01:00
Juan Picado @jotadeveloper
672969c4eb
test: add scenario for new detail page tab 2019-03-27 22:27:46 +01:00
Juan Picado @jotadeveloper
d5e7f752aa
test: add scenario to handle 404 page 2019-03-27 20:24:34 +01:00
Juan Picado @jotadeveloper
446fc9fd32
chore: remove dolar sign that is being copied 2019-03-27 07:16:32 +01:00
Juan Picado @jotadeveloper
40500ad899
Merge branch 'master' of github.com:verdaccio/verdaccio 2019-03-24 23:21:47 +01:00
Juan Picado @jotadeveloper
4da21c1490
fix: add not found if package is missing 2019-03-24 23:20:30 +01:00
Juan Picado @jotadeveloper
54d73eb9a3
chore: add access middleware 2019-03-17 21:26:21 +01:00
Juan Picado @jotadeveloper
87203f2cdf
fix: add new enpoind that allow download tarballs according the standard 2019-03-17 21:23:13 +01:00
vip30
75c0e1e4ec feat: add stars api 2019-03-11 23:37:17 +08:00
vip30
1ab7c504ec feat: add star and unstar api for 4.x 2019-03-09 11:16:44 +08:00
Juan Picado @jotadeveloper
70d8e5f624
chore: fix e2e test for package list 2019-03-04 22:19:49 +01:00
Ayush Sharma
5aff7bc1a8 refactor: package list 2019-03-03 21:53:25 +01:00
Ayush Sharma
c9858c85e3 refactor: package list [WIP] 2019-03-03 20:01:41 +01:00