1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
Commit Graph

273 Commits

Author SHA1 Message Date
Juan Picado @jotadeveloper
a68d247a44
feat: add support for jwt on api (#896)
* feat: add support for jwt on api

* test: add unit test for sign token with jwt

add multiple scenarios with configuration file

* chore: add JWT verification on middleware

* chore: restore headless

* chore: restore middleware header validation

* refactor: fix login whether user exists

* refactor: JWT is signed asynchronously

* refactor: better structure and new naming convention

* test: add unit test for token signature

* test: add unit test for creating user with JWT enabled

#168

* docs: add security section jwt

* refactor: renable  web auth middleware

* test(auth): add legacy disabled scenario

* chore: update gitignore

* chore: add some es6 sugar

* feat: enable JWT token signature for new installations

* chore: add yaml files to git

I forgot add this before 😷

* chore: trace log on auth

in case we want more output
2018-08-21 08:05:34 +02:00
Juan Picado @jotadeveloper
26873682b8
refactor: add prettier for yaml files (#931) 2018-08-20 16:31:39 +02:00
Ayush Sharma
9cd3ccb408 fix: login without reload (#678) (#679) (#914)
* fix: login without reload (#678) (#679)

* fix: implements code review suggestions (#914)

* refactor: adds scope to the app

* refactor: handles null value from localstorage for username

* refactor: removes text type from <Input />

* refactor: replaces isNull with isNil

* refactor: improves makeLogin method

* refactor: adds error from api constant

* fix: updates error using API_ERROR constant in tests

* refactor: updates regex for moduleMapper in jest config
2018-08-20 16:29:47 +02:00
Priscila
1602840ed1 feat: replaced lunr by lunr-mutable (#915) 2018-08-17 12:14:23 +02:00
Juan Picado @jotadeveloper
0ba1ccfabb
Merge remote-tracking branch 'origin/master' into 4.x 2018-08-13 18:18:34 +02:00
Juan Picado @jotadeveloper
231cf5a581
Merge branch 'master' into master 2018-08-13 07:20:20 +02:00
Ashish Surana
fd6769850a fix(webui): search crash on ' ' as a value #898 (#902)
* fix(webui): search crash on ' ' as a value #898

* chore(test): add unit test cases for Home component

  - test case for handleSearchInput function
2018-08-12 22:25:47 +02:00
jeremy
2e5a4096f4 fix: abort the stream to prevent overwriting existing tarbal 2018-08-02 12:44:59 -07:00
Diego Louzán
4862acdc0e
refactor(docker): multistage build / support for running as random uid
- refactor docker image to use builder multistage pattern
- separate storage directories
- verdaccio code directories are not user writeable
- add generic support for random user uid on environments where the startup
  user for docker is randomized (e.g. openshift)
2018-08-02 20:23:25 +02:00
Ayush Sharma
dc9460ff07
refactor: header component test (#878)
* refactor: improves <Header /> component test cases

* refactor: adds destructuring for state in render block
2018-08-01 15:00:39 +02:00
Juan Picado @jotadeveloper
8b98302985
Merge branch 'master' into feat-webui-scope 2018-07-30 18:59:27 +02:00
Peter Cools
7c3a617d79 feat: adds option to set scope in webui instructions header
If you're using this registry for a specific module scope, specify that scope to set it in the webui instructions header e.g. npm set @coolsp:registry http://localhost:4873.
Added as webui.scope option in .yaml.
> Note: in .yaml, escape @ with \\@.

See also feature request #593.
Update unit test for added scope
2018-07-29 19:11:43 +02:00
Juan Picado @jotadeveloper
5e9b593bd5
refactor: some es6 sugar 2018-07-29 16:03:09 +02:00
Juan Picado @jotadeveloper
bef6df6e1b
test(storage): add unit test for merge test 2018-07-29 15:26:22 +02:00
Juan Picado @jotadeveloper
b65b79bc09
test(storage): add checks for addVersion 2018-07-29 13:58:04 +02:00
Juan Picado @jotadeveloper
25c62f09ea
test(storage): add better test for changePackage 2018-07-29 10:28:28 +02:00
ayusharma
4df6b3b252 feat: adds gravatar support for maintainers 2018-07-29 00:45:02 +02:00
Juan Picado @jotadeveloper
ddf491740c
Merge pull request #859 from verdaccio/update-dependencies
chore: update dependencies
2018-07-28 17:14:35 +02:00
Juan Picado @jotadeveloper
b0b631af76
chore: add unit test for #857 scenario 2018-07-28 08:45:10 +02:00
Juan Picado @jotadeveloper
f75e213399
chore: update dependencies 2018-07-27 20:59:51 +02:00
Juan Picado @jotadeveloper
62e3adf0db
chore: update devDependencies 2018-07-27 20:37:13 +02:00
ayusharma
263b0f78a9 refactor: <Package /> , <Footer /> and package sidebar code refactoring
refactor: variable naming
2018-07-22 21:22:51 +02:00
Juan Picado @jotadeveloper
61e33f0a30
refactor: use plugins type on loadPlugin 2018-07-18 07:52:54 +02:00
Juan Picado @jotadeveloper
7ce6abf3b2
chore: update flow to 0.75.0 2018-07-18 07:52:39 +02:00
ayusharma
d6dd2f647b refactor: removes un-necessary 'src' from webui path 2018-07-17 22:03:06 +02:00
Juan Picado @jotadeveloper
91a6c202ff
chore: more unit test for config utils 2018-07-04 07:31:51 +02:00
Juan Picado @jotadeveloper
39651bb6b3
chore: add unit test for package access normalize 2018-07-04 00:15:09 +02:00
Juan Picado @jotadeveloper
dd3a937ac9
refactor: config file using flow 2018-07-04 00:15:07 +02:00
Juan Picado @jotadeveloper
957b71e8bb
refactor: user agent on config
remove logic users prop is not longer supported
67c63892d3 (diff-574051ef1fbe43a2746c5cd241d631c7)
2018-07-04 00:15:03 +02:00
Juan Picado @jotadeveloper
946d195431
refactor: pkg.access unit test
migrate more constants
2018-07-04 00:15:01 +02:00
Juan Picado @jotadeveloper
050f857fb6
refactor: add new constants 2018-07-04 00:15:00 +02:00
Juan Picado @jotadeveloper
2e157fb134
refactor: config unit test
match package access normalise
2018-07-04 00:14:59 +02:00
ayusharma
98abac4dec refactor: adds method to load verdaccio logo 2018-07-01 15:45:26 +02:00
ayusharma
4f6fd66bf3 refactor: adds tesURL for test cases 2018-07-01 15:45:26 +02:00
ayusharma
5c95551e8f refactor: unit tests and api service
refactor: fixes login api success call

refactor: fixes login respose for success case
2018-06-30 12:22:07 +02:00
Juan Picado @jotadeveloper
83b64bd798
refactor: unit test parse listeners 2018-06-28 22:17:38 +02:00
Juan Picado @jotadeveloper
45110ddb7b
refactor: migration assert to expect 2018-06-28 18:33:37 +02:00
Juan Picado @jotadeveloper
6239606ce1
chore: storage test path fix 2018-06-28 08:26:07 +02:00
Juan Picado @jotadeveloper
c6740feec3
chore: remove test folder from coverage report 2018-06-27 21:19:48 +02:00
Juan Picado @jotadeveloper
ccb73404a8
refactor: get rid of jest warnings 2018-06-27 08:52:52 +02:00
Juan Picado @jotadeveloper
88996e92a5
refactor: enable request test 2018-06-26 06:15:10 +02:00
Juan Picado @jotadeveloper
1fd50cc53e
refactor: add more constants 2018-06-26 06:15:09 +02:00
Juan Picado @jotadeveloper
57f0fa7610
refactor: unit test goes offline 2018-06-26 06:15:06 +02:00
Juan Picado @jotadeveloper
e12dc5b477
refactor: add custom store
for unit testing to avoid require connection on development
2018-06-26 06:15:05 +02:00
Juan Picado @jotadeveloper
3f5a5c2345
refactor: improve code with es6 style 2018-06-24 10:11:52 +02:00
Juan Picado @jotadeveloper
32e64c0fe3
chore: update functional script name 2018-06-23 21:02:55 +02:00
Juan Picado @jotadeveloper
2c74133dfc
refactor: get rid of personal emails
metadata should no have any personal email
2018-06-23 20:59:34 +02:00
Juan Picado @jotadeveloper
690b92a652
refactor: mirror and anti-loop 2018-06-23 20:59:27 +02:00
Juan Picado @jotadeveloper
d8455dd15a
refactor: using constants
relocate uplink token test to unit test
2018-06-23 20:57:20 +02:00
Juan Picado @jotadeveloper
3d19f22ba0
refactor: test tokens
more usage of constants for tokens
2018-06-23 20:57:19 +02:00
Juan Picado @jotadeveloper
0de1e7efd4
test: restore snapshot unit test 2018-06-23 20:57:17 +02:00
Juan Picado @jotadeveloper
9242d498d7
refactor: functional testing
* server now are executed in the jest setup phase
* disable one snapshot
2018-06-23 20:57:16 +02:00
Juan Picado @jotadeveloper
b113aa3a55
refactor: jest config files relocation
still pending unit config file
2018-06-23 20:57:15 +02:00
Juan Picado @jotadeveloper
49c6191bb5
refactor: relocate unit test
no logic change, just path updates
2018-06-23 20:57:12 +02:00
ayusharma
be3968f5e2 fix: improves regex for ascii and test (#461)
fix: file name in unit test

fix: updates snapshots

fix: updates snapshots
2018-06-23 19:53:05 +02:00
ayusharma
29bb57ad5f feat: adds support for ascii-doc preview in readme (#464) 2018-06-20 00:15:25 +02:00
Juan Picado @jotadeveloper
c01cc4b851
test: add unit test merge time method 2018-06-15 07:55:30 +02:00
Juan Picado @jotadeveloper
3717ad49ee
fix: normalize package was broken #758 2018-06-14 22:44:06 +02:00
Juan Picado @jotadeveloper
92e1eb00ca
chore: update unit test sidebar 2018-06-12 08:22:23 +02:00
Juan Picado @jotadeveloper
73324a2971
refactor: convertDistRemoteToLocalTarballUrls method
add unit test
improve readbility
2018-06-05 21:03:27 +02:00
Juan Picado @jotadeveloper
d5f4b54a41
refactor: renaming validate name method 2018-06-04 23:08:50 +02:00
Juan Picado @jotadeveloper
c920fa335c
fix: skip problematic unit test
we need to dive into the reason, it fails randomnly
2018-05-31 09:50:16 +02:00
Juan Picado @jotadeveloper
55c2333e88
test: intent to fix race condition on unit test 2018-05-30 21:48:33 +02:00
Juan Picado @jotadeveloper
08f6a64063
fix: avoid issues with missing token #693
also refactor other parts as string and constants
2018-05-14 20:08:49 +02:00
Juan Picado @jotadeveloper
101fd78b0d
refactor: add constant file
starting with json headers common usage
2018-04-30 15:41:04 +02:00
Juan Picado @jotadeveloper
3f6eeb4d7d
fix: update uplinks auth header
* increases unit test coverage
* remove dead code
* update documentation
* light refactoring

fix #670
2018-04-29 21:50:10 +02:00
Juan Picado @jotadeveloper
de61e469ed
refactor: storage utilities
relocate methods, no logic change
2018-04-22 22:14:21 +02:00
Juan Picado @jotadeveloper
e5caa71d35
refactor: storage is async
allows storage to initalize whether a async call is required on start up.
2018-04-21 18:36:06 +02:00
Juan Picado @jotadeveloper
848e004eb5
refactor: local database methods are async 2018-04-20 19:40:48 +02:00
Juan Picado @jotadeveloper
6491db4191
fix: api login use case when user already exist
It adds a new use case based on the plugin update. 409 in case user exists already and 201 when new user has been created.
2018-04-03 07:08:44 +02:00
Christopher Kelley
5c5af275ab
fix: correct linter errors and warnings 2018-03-26 13:51:14 -04:00
Christopher Kelley
78bb95c0c2
Merge branch 'master' into 628-auth-user-zero 2018-03-26 09:21:33 -04:00
Christopher Kelley
8bbedc933b
[Close #628] Test and correct auth plugin values 2018-03-26 09:20:12 -04:00
Juan Picado @jotadeveloper
b9a6edf9b0
chore: update verdaccio-memory dep 2018-03-24 09:07:36 +01:00
Juan Picado @jotadeveloper
4f395500b6
test: disable test 2018-03-20 17:46:20 +01:00
Juan Picado @jotadeveloper
011f5bf55b
test: disable test 2018-03-20 17:01:40 +01:00
Juan Picado @jotadeveloper
d9e6e87702
test: add unit test for login web ui 2018-03-18 13:41:36 +01:00
Juan Picado @jotadeveloper
f0d2e8592f
test: add test for web ui endpoints
packages, sidebar and search
2018-03-18 08:46:02 +01:00
Juan Picado @jotadeveloper
37d2aa8d49
test: add unit test for utilities 2018-03-17 18:28:54 +01:00
Juan Picado @jotadeveloper
7237ab340f
refactor: add flow support on publish endpoint 2018-03-17 11:54:57 +01:00
Juan Picado @jotadeveloper
036120b777
fix: add teardown for unit test 2018-03-11 19:25:13 +01:00
Juan Picado @jotadeveloper
547da379e9
test: add test for proxy access
the test will check whether avoiding proxy on uplink configuration avoid proxy access
2018-03-11 18:55:19 +01:00
Juan Picado @jotadeveloper
d200bf4507
refactor: remove use strict 2018-03-11 00:19:47 +01:00
Juan Picado @jotadeveloper
c2619854dd
refactor: migrate imports to es6 2018-03-10 23:13:26 +01:00
Juan Picado @jotadeveloper
76fe6cb5d7
refactor: apply flow and imports es6 2018-03-10 21:09:04 +01:00
Ayush Sharma
2de47454bf test: updates verdaccio-htpasswd tests
bumps verdaccio-htpasswd to 0.1.4
2018-03-04 22:14:29 +05:30
Juan Picado @jotadeveloper
0167de508c
refactor: move specific flow types into the project 2018-02-26 21:28:09 +01:00
Juan Picado @jotadeveloper
50288e79e7
fix: allow uplink comparison for https protocol
fix #571
2018-02-24 21:20:17 +01:00
Juan Picado @jotadeveloper
18ef37393e
test: add unit test for isUplinkValid #571 2018-02-24 20:50:00 +01:00
Juan Picado @jotadeveloper
199c98314d
refactor: add types to new files
pluging-loader and auth
2018-02-24 20:31:03 +01:00
Juan Picado @jotadeveloper
afd1b6e2dd
test: refactor and add small test for auth class 2018-02-24 20:31:02 +01:00
Juan Picado @jotadeveloper
d086073069
fix(flow): fix flow definitions 2018-02-24 20:31:00 +01:00
Juan Picado @jotadeveloper
9807e21dee
test: add e2e support 2018-02-09 08:42:34 +01:00
Juan Picado @jotadeveloper
f7414e9bb2
chore(flow): update flow definitions for proxy 2018-02-04 14:15:51 +01:00
Juan Picado @jotadeveloper
42f23da363
refactor: methods to camel case 2018-02-03 22:36:28 +01:00
Juan Picado @jotadeveloper
bee4d1cf4f
test(unit): add test for uplink offline, refactor proxy 2018-02-03 22:21:23 +01:00
Juan Picado @jotadeveloper
885345f4cf
test(unit): add unit test for publish and unpublish 2018-01-28 20:25:19 +01:00
Juan Picado @jotadeveloper
c08f257bf1
test(unit): add unit test for basic searc 2018-01-28 18:58:51 +01:00
Juan Picado @jotadeveloper
234299fe2a
test(dist-tag): add unit test for dist-tag 2018-01-28 14:51:51 +01:00
Juan Picado @jotadeveloper
ec36521ab8
fix(dist-tag): fix #411 latest tag is incorrect 2018-01-28 11:53:49 +01:00
Juan Picado @jotadeveloper
819f06015e
test(unit): add unit test for packages endpoint 2018-01-28 11:38:22 +01:00
Juan Picado @jotadeveloper
5140b57efb
refactor(test): remove deprecate auth support, fix all test 2018-01-28 02:47:54 +01:00
Juan Picado @jotadeveloper
aa3101ef9a
test(unit): add test for add_user and login 2018-01-26 18:16:51 +01:00
Juan Picado @jotadeveloper
a5ac23ef14
test(unit): relocate unit test 2018-01-25 23:31:47 +01:00
Juan Picado @jotadeveloper
d9a008e881
test(unit): add unit test for add user 2018-01-25 23:14:03 +01:00
Juan Picado @jotadeveloper
eaa0e3f8bd
test(unit): add unit test for ping and whoiam 2018-01-25 21:37:37 +01:00
Juan Picado @jotadeveloper
7d9736eaba
fix: wrong import reference 2018-01-18 07:03:21 +01:00
Juan Picado @jotadeveloper
046e8b1ae1
feat: add node api to launch verdaccio programmatically 2018-01-18 07:03:12 +01:00
Juan Picado @jotadeveloper
84b810e68a fix: add storage es6 plugin suport and fix plugin logic 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
d352c6c63f refactor: load storage as plugin and as fallback use LocalStorage 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
c602a4c9e7 test: add unit test for up-storage, getRemoteMetadata, fetchTarball 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
9d82eb8820 test: add unit test for up-storage 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
ce5af8a004 fix: flow lint errors 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
b494d47eeb test: add additonal unit test for local-storage 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
d0e97cf076 test: add some unit test for local-storage 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
e0d3223968 refactor: fix code review suggestions 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
0c9e504d1a refactor: clean scripts and dependencies 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
037095f851 refactor: functional testing with jest set up 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
86d92e96d2 chore: add unit test for smart request 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
31c2bd48a0 refactor: migrate unit test to Jest 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
4c0733ca32 refactor: These files will be migrated to another repository 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
112cee789e refactor: remove local-storage in favor of the new dependency 2018-01-07 07:59:36 +00:00
Juan Picado @jotadeveloper
23bcf6fb86
test: Increase coverage for local-data storage 2017-08-26 07:44:18 +02:00
Juan Picado @jotadeveloper
2c3a8f9d42
test: Add unit test for a scenario when the database is corrupted 2017-08-26 07:44:17 +02:00
Juan Picado @jotadeveloper
d7e6bae469
refactor: move stream tarball helper as a dependency 2017-08-06 22:52:30 +02:00
Juan Picado @jotadeveloper
8b93b579d3
refactor: naming clean up, relocation, organize by category 2017-08-06 21:54:15 +02:00
Juan Picado @jotadeveloper
d53ce9750b
refactor: rename unit test clean up 2017-08-05 10:34:31 +02:00
Juan Picado @jotadeveloper
644c0981db
fix: configuration files inconsistencies, add unit test 2017-08-02 20:46:06 +02:00
Juan Picado @jotadeveloper
cda92ac5ab
refactor: relocate unit test 2017-08-02 20:45:21 +02:00
Meeeeow
7fef14c322
refactor: directory structure 2017-07-18 21:08:10 +02:00
Juan Picado @jotadeveloper
b3a82bc294
Refactor web, relocate files to web folder 2017-07-18 21:02:05 +02:00
Juan Picado @jotadeveloper
6e91aa88be
(test): Refactor and add documentation some unit test, relocate storages 2017-07-02 00:05:58 +02:00
Juan Picado @jotadeveloper
2ee4f38743
Refactor Storage, move local storage to inner folder.
Refactor methods to camelCase
Relocate utilities
2017-06-10 23:41:24 +02:00
Juan Picado @jotadeveloper
1307181005
Refactor streams, removed not needed dependency 2017-06-10 18:48:20 +02:00
cklein
7018fc99a2 [GH-131] add cache option to uplinks 2017-06-08 17:59:28 +02:00
Ryan Graham
64c3ea445b
don't blindly clobber local dist-tags
If packages are being published to verdaccio as well as upstream to
npmjs.org, then when the cache is updated from npmjs.org it uses the
dist-tags from the upstream even if the locally published version is
actually newer. This makes it very difficult to use verdaccio as a
staging registry for testing out potential releases.

This change partially reverts a change in behaviour that was introduced
in #8 which caused a regression for the staging style workflow that was
supported by sinopia.
2017-06-01 13:59:56 -07:00
Juan Picado
92df8bd178
Fix uppercase lint warning, streams use lowercase function name 2017-05-09 10:11:09 +02:00
Juan Picado
90328d5faf
Fix config.js new shape 2017-04-27 06:54:53 +02:00
Juan Picado
3457e0925d
rebase from master branch 2017-04-23 22:28:35 +02:00
Juan Picado
f282941075
Apply partially new eslint rules, upgrade es6 and replace octal literals by chalk colors 2017-04-23 22:19:31 +02:00
Juan Picado
b05050da5b
Update unit test es6 2017-04-23 21:28:40 +02:00
Juan Picado
d79f12d45a
Migrate Storages to classes 2017-04-23 21:25:24 +02:00
jotadeveloper
d824821b7a Merge pull request #163 from Meeeeow/fix_search
Fix search feature
2017-04-22 10:42:42 +02:00
Juan Picado
580d3e77f7
Fix undefined path value 2017-04-22 09:31:12 +02:00
Juan Picado
7df6962f43
Add unit test for plugin-loader 2017-04-22 08:23:16 +02:00
Meeeeow
38518baf44 fix: search leak private package and ui bug
- Check permission in search API
- Fix author's name not show in search result
2017-04-21 11:53:05 +08:00
Juan Picado
18d52a4103
Add unit test Search indexer 2017-04-12 21:17:28 +02:00
Madison Grubb
a7c4285a68 renaming 'sinopia' to verdaccio. 2016-11-07 12:15:38 -05:00
trent.earl
b31198f685 Tests should check for presence of title with "Verdaccio" not "Sinopia" 2016-08-20 12:07:52 -05:00
steve-p-com
dfdcaa893e Change the way package distribution tags are processed and stored 2016-04-18 20:53:00 +01:00