Compare commits

...

193 Commits

Author SHA1 Message Date
Juan Picado @jotadeveloper
dd754d1298 chore(release): 4.3.5 2019-11-21 17:26:14 +01:00
Juan Picado @jotadeveloper
4aeebd5be1 chore: update lock file 2019-11-21 17:02:57 +01:00
Juan Picado @jotadeveloper
04d660a90c chore: add nvm file for development 2019-11-21 17:02:21 +01:00
Snyk bot
2f3ba93c87 fix: package.json to reduce vulnerabilities (#1583)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-HANDLEBARS-534478
- https://snyk.io/vuln/SNYK-JS-HANDLEBARS-534988
2019-11-21 16:45:15 +01:00
Juan Picado @jotadeveloper
28f1a94329 chore: update readme 2019-11-19 08:36:47 +01:00
dependabot-preview[bot]
2d0d34c4f2 build(deps): [security] bump https-proxy-agent from 2.2.2 to 2.2.4 (#1582)
Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.2 to 2.2.4. **This update includes security fixes.**
- [Release notes](https://github.com/TooTallNate/node-https-proxy-agent/releases)
- [Commits](https://github.com/TooTallNate/node-https-proxy-agent/compare/2.2.2...2.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-19 06:03:01 +01:00
dependabot-preview[bot]
399421e609 build(deps-dev): bump @types/semver from 6.0.2 to 6.2.0 (#1574)
Bumps [@types/semver](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver) from 6.0.2 to 6.2.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/semver)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-17 11:55:48 +01:00
dependabot-preview[bot]
c416febbb6 build(deps-dev): bump @types/lodash from 4.14.141 to 4.14.148 (#1579)
Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.141 to 4.14.148.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-17 07:03:01 +01:00
dependabot-preview[bot]
0106811061 build(deps-dev): bump cross-env from 5.2.1 to 6.0.3 (#1570)
Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 5.2.1 to 6.0.3.
- [Release notes](https://github.com/kentcdodds/cross-env/releases)
- [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kentcdodds/cross-env/compare/v5.2.1...v6.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-17 07:02:33 +01:00
Juan Picado @jotadeveloper
086c45b6e2 chore: add babe.js as oss user 2019-11-16 13:39:42 +01:00
dependabot-preview[bot]
f7c7d167b1 build(deps-dev): bump detect-secrets from 1.0.4 to 1.0.5 (#1575)
Bumps [detect-secrets](https://github.com/lirantal/detect-secrets) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/lirantal/detect-secrets/releases)
- [Commits](https://github.com/lirantal/detect-secrets/compare/v1.0.4...v1.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-16 13:26:32 +01:00
dependabot-preview[bot]
4e5b6e8d3f build(deps-dev): bump @types/jest from 24.0.22 to 24.0.23 (#1576)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.0.22 to 24.0.23.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-16 13:22:30 +01:00
Snyk bot
e459881be5 fix: package.json to reduce vulnerabilities (#1577)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-HANDLEBARS-534478
2019-11-16 13:21:23 +01:00
dependabot-preview[bot]
b7757f898b build(deps-dev): bump @types/async from 3.0.2 to 3.0.3 (#1561)
Bumps [@types/async](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/async) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/async)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 19:36:18 +01:00
dependabot-preview[bot]
a774d4e1c4 build(deps-dev): bump @types/jest from 24.0.18 to 24.0.22 (#1560)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.0.18 to 24.0.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 19:35:50 +01:00
dependabot-preview[bot]
e801d01a0c build(deps): bump dayjs from 1.8.16 to 1.8.17 (#1562)
Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.8.16 to 1.8.17.
- [Release notes](https://github.com/iamkun/dayjs/releases)
- [Changelog](https://github.com/iamkun/dayjs/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/iamkun/dayjs/compare/v1.8.16...v1.8.17)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 19:35:24 +01:00
dependabot-preview[bot]
e982033013 build(deps-dev): bump verdaccio-auth-memory from 8.2.0 to 8.3.0 (#1559)
Bumps [verdaccio-auth-memory](https://github.com/verdaccio/monorepo/tree/HEAD/plugins/auth-memory) from 8.2.0 to 8.3.0.
- [Release notes](https://github.com/verdaccio/monorepo/releases)
- [Changelog](https://github.com/verdaccio/monorepo/blob/master/plugins/auth-memory/CHANGELOG.md)
- [Commits](https://github.com/verdaccio/monorepo/commits/v8.3.0/plugins/auth-memory)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 08:48:04 +01:00
dependabot-preview[bot]
c6e80b58a7 build(deps-dev): bump jest-junit from 8.0.0 to 9.0.0 (#1556)
Bumps [jest-junit](https://github.com/jest-community/jest-junit) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/jest-community/jest-junit/releases)
- [Commits](https://github.com/jest-community/jest-junit/compare/v8.0.0...v9.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-08 06:48:31 +01:00
dependabot-preview[bot]
4cd4a7155f build(deps): [security] bump eslint-utils from 1.4.0 to 1.4.3 (#1554)
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.3. **This update includes security fixes.**
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.4.0...v1.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 18:38:36 +01:00
dependabot-preview[bot]
241b0e51f7 build(deps): bump @verdaccio/commons-api from 8.2.0 to 8.3.0 (#1555)
Bumps [@verdaccio/commons-api](https://github.com/verdaccio/monorepo/tree/HEAD/core/commons-api) from 8.2.0 to 8.3.0.
- [Release notes](https://github.com/verdaccio/monorepo/releases)
- [Changelog](https://github.com/verdaccio/monorepo/blob/master/core/commons-api/CHANGELOG.md)
- [Commits](https://github.com/verdaccio/monorepo/commits/v8.3.0/core/commons-api)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 18:29:32 +01:00
Snyk bot
cd8228baed fix: package.json to reduce vulnerabilities (#1552)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-HANDLEBARS-480388
2019-11-07 07:24:25 +01:00
Shreynik
b06b305b59 refactor: removes ts ignore comments (#1541) 2019-11-02 11:18:37 +01:00
Anix
cbea2edecb fix: changed the exit code for info flag (#1537)
* fix: changed the exit code for info flag

* fix: changed the exit code for info
2019-10-30 08:33:05 +01:00
Juan Picado @jotadeveloper
0aba1c36d9 chore: update Typescript 3.7.1-rc (#1536)
* chore: update typescript@3.7.0-beta

* chore: update to typescript@3.7.1-rc
2019-10-26 13:03:25 +02:00
Juan Picado @jotadeveloper
c70be6ec82 chore: update typescript@3.7.0-beta (#1507) 2019-10-26 12:48:35 +02:00
Juan Picado @jotadeveloper
b6abc00da9 chore(release): 4.3.4 2019-10-23 20:52:12 +02:00
Juan Picado @jotadeveloper
2ac7770459 fix: security vulnerability at readme in dompurify dep (#1532)
Fix Cross-site Scripting (XSS) in @verdaccio/readme
2019-10-23 20:49:36 +02:00
Juan Picado @jotadeveloper
44c79ad708 chore: update readme url 2019-10-22 07:08:54 +02:00
Juan Picado @jotadeveloper
073bcb0982 chore: add video to readme 2019-10-22 07:06:46 +02:00
TJ
a7d6a9c560 chore: removes 3x unnecessary @ts-ignore comments (#1524) 2019-10-19 08:42:17 +02:00
James George
35f816bf5c fix: minor grammatical tweak (#1513) 2019-10-07 07:45:25 +02:00
welling guzmán
549f4743d0 fix: minor typos, formatting, and docs (#1512) 2019-10-06 20:07:36 +02:00
Sergio Hg
1d1a6829db ci(circleci): store test results in junit format (#1497) 2019-10-05 16:29:49 +02:00
Sergio Herrera Guzmán
5415d17e44 ci(github): run ci and publish test on PRs 2019-10-03 11:18:43 +02:00
Juan Picado @jotadeveloper
b1b0c25212 chore(release): 4.3.3 2019-10-03 08:30:23 +02:00
Juan Picado @jotadeveloper
65d6a935b5 fix: allow add to request agentOptions (#1506)
Follow up of https://github.com/verdaccio/verdaccio/pull/1332
Documented here https://github.com/verdaccio/website/pull/126
2019-10-03 08:23:08 +02:00
Juan Picado @jotadeveloper
52130704ec chore(release): 4.3.2 2019-10-02 21:19:05 +02:00
polemius
02aee3a879 fix: fixing the lint issues (#1503) 2019-10-02 21:18:00 +02:00
polemius
72314e48df fix: fixing typos in comments (#1504) 2019-10-02 21:14:19 +02:00
Juan Picado @jotadeveloper
4e997ce806 chore: fix wrong property to check 2019-10-02 20:59:39 +02:00
Juan Picado @jotadeveloper
3438b7596a fix: comment out experiments from configuration files (#1505) 2019-10-02 20:56:50 +02:00
Sergio Hg
214f4645f8 ci(circleci): use CircleCI 2.1 syntax improvements (#1496)
* ci(circleci): create common commands

* ci(circleci): migrate executors from aliases

* ci(circleci): move default_executor from aliases to executors
2019-10-02 06:34:35 +02:00
Juan Picado @jotadeveloper
147137c3ce chore(release): 4.3.1 2019-10-01 22:37:24 +02:00
Sergio Hg
c5df28951f ci(circleci): remove deprecated versions, improve names and coverage (#1495) 2019-10-01 22:31:22 +02:00
Sergio Hg
6c3ca20903 ci(github): add a CI workflow using Github Actions (#1494) 2019-10-01 22:08:40 +02:00
Sergio Hg
fe7ad21fa5 ci(github): migrate docker-publish-pre-check from old syntax (#1493) 2019-10-01 21:54:26 +02:00
Sergio Hg
ef25af5f5d ci(github): migrate release workflow from old syntax (#1492) 2019-10-01 21:38:55 +02:00
Sergio Hg
74fc18fc41 Merge pull request #1501 from verdaccio/core-team-daniel
chore(core): daniel ruf to core team
2019-10-01 21:02:16 +02:00
Juan Picado @jotadeveloper
1076d14bb0 chore(core): daniel ruf to core team
I have to tell, I've been willing this for a while, Daniel has been helping us since more than one year ago, constantly helping on different areas and would be a pleasure you will be part of our virtual team.

So, I guess only Daniel can approve this PR.
2019-10-01 20:52:25 +02:00
Sergio Hg
bc6b084edd fix: remove jwt from docker config (#1500) 2019-10-01 20:02:45 +02:00
Sergio Hg
e9616f9e7a fix: remove jwt from default config (#1499) 2019-10-01 20:02:09 +02:00
Sergio Hg
9b45342511 Merge pull request #1498 from jamesgeorge007/feat/update-docs
[Docs]: minor tweak
2019-10-01 13:48:08 +02:00
jamesgeorge007
cab5e608b6 update docs 2019-10-01 16:12:26 +05:30
jjangga0214
eaf3556e3d docs(readme): fix broken link (#1491)
replace old link toward docs directory to direct external link to docs website.
2019-10-01 07:46:22 +02:00
Juan Picado @jotadeveloper
c6314928ca chore(release): 4.3.0 2019-09-30 23:06:33 +02:00
Sergio Hg
a1aefae0f4 chore(deps): update verdaccio-audit to fix express version (#1490) 2019-09-30 22:59:42 +02:00
Juan Picado @jotadeveloper
9d68816bde chore: update dependencies (#1485) 2019-09-30 20:54:10 +02:00
Snyk bot
b1cd0704b9 fix: package.json to reduce vulnerabilities (#1474)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-DOMPURIFY-468981
2019-09-27 04:45:28 +02:00
Juan Picado @jotadeveloper
e081a580c4 feat(docker): Node.js update to 10.16.3 (#1473) 2019-09-26 20:27:46 +02:00
Juan Picado @jotadeveloper
b486a9df1a chore: update dependencies (#1472) 2019-09-26 19:40:23 +02:00
Juan Picado @jotadeveloper
5612c13e9e chore: fix eslint warnings (#1471) 2019-09-26 18:22:14 +02:00
Juan Picado @jotadeveloper
9006aefea7 chore: update readme 2019-09-08 00:53:32 +02:00
Juan Picado @jotadeveloper
dbf20175dc feat: npm token command support (#1427)
* feat: support for npm token

This is an effor of:

This commit intent to provide npm token support.

https: //github.com/verdaccio/verdaccio/issues/541
https: //github.com/verdaccio/verdaccio/pull/1271
https: //github.com/verdaccio/local-storage/pull/168
Co-Authored-By: Manuel Spigolon <behemoth89@gmail.com>
Co-Authored-By: Juan Gabriel Jiménez <juangabreil@gmail.com>

* chore: update secrets baselines

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update lock file

* chore: add logger mock methods

* chore: update @verdaccio/types

* refactor: unit test was flacky

adapt the pkg access to the new configuration setup

* refactor: add plugin methods validation

* test: add test for aesEncrypt

* chore: update local-storage dependency

* chore: add support for experimetns

token will be part of the experiment lists

* chore: increase timeout

* chore: increase timeout threshold

* chore: update nock

* chore: update dependencies

* chore: update eslint config

* chore: update dependencies

* test: add unit test for npm token

* chore: update readme
2019-09-07 15:46:50 -07:00
Marc Udoff
962d5d529a feat: ensure every log file has at least one record (#1414) 2019-09-06 22:14:28 -07:00
Juan Picado @jotadeveloper
d5303f407b feat: browse web package version (#1457)
* feat: allow endpoint to query by version

* chore: update @verdaccio/ui-theme

* test: add unit test for sidebar endpoint by version
2019-09-05 12:12:10 -07:00
Juan Picado @jotadeveloper
06f659c331 chore: add homepage 2019-08-26 07:01:48 +02:00
Juan Picado @jotadeveloper
e7b75646de chore(release): 4.2.2 2019-08-25 19:20:02 +02:00
Juan Picado @jotadeveloper
37530ac0fd build: update dependencies (#1452)
* build: update dependencies

* chore: update dependencies

* chore: update dependencies

* chore: update dependencies

* chore: allow ts-ignore

we will remove this in the future, warn for now

* chore: eslint rules as warning

this is due the update, we will address this later
2019-08-25 10:16:43 -07:00
Juan Picado @jotadeveloper
423371423a fix: update @verdaccio/ui-theme@0.2.3 (#1451)
https://github.com/verdaccio/ui/blob/master/CHANGELOG.md#023-2019-08-25

missing headers on search endpoint with token (#121) (ac58730)
refactoring version page / fix issue not found page #100 (#117) (97e8448)
remove ToReplaceByVerdaccio #108 (#122) (5a9bd60)
api: correctly handle responses with missing content-type header (2049022)
2019-08-25 09:41:04 -07:00
Liran Tal
9b0b0bfac3 build: Lint the lockfile for security policies (#1444)
* feat: lint lockfiles

* fix: update secrets baseline
2019-08-25 09:37:25 -07:00
Alex Dixon
7d71b060c4 docs: show usage without setting registry globally (#1440) 2019-08-20 20:19:13 +02:00
Juan Picado @jotadeveloper
7fa23577ae refactor: replace flow comments by ts-ignore
ts-ignore is not harmfull in specs files, since we try to force to test with values are not allowed by the types
2019-08-18 07:59:28 +02:00
Juan Picado @jotadeveloper
8b03637b63 chore(docker): use yarn lock file 2019-08-18 07:50:42 +02:00
Juan Picado @jotadeveloper
87c3a29bd5 Merge pull request #1438 from guitarrapc/fix/cloudformation_template_for_second_ec2launch
fix: mkdir failed and ec2 infinitely re-launch
2019-08-15 18:40:29 +02:00
Ikiru Yoshizaki
9006146a59 fix: use test + mkdir for strict dir check 2019-08-14 23:38:34 +09:00
Daniel Ruf
60e0c55544 chore: add missing word in lock comment (#1437) 2019-08-13 20:46:16 +02:00
Ikiru Yoshizaki
342d284568 fix: mkdir failed and ec2 infinitely re-launch
no-problem with first launch, but could not recover after 2nd launch.
cloud-init error message indicate mkdir failed.

$ sudo cat /var/log/cloud-init-output.log
mkdir: cannot create directory '/verdaccio/conf': File exists
2019-08-13 16:22:37 +09:00
Juan Picado @jotadeveloper
621ebfeb1a chore(release): 4.2.1 2019-08-10 13:51:14 +02:00
Juan Picado @jotadeveloper
ac6c138309 Merge pull request #1432 from devnill/create-correct-user-groups
fix: fixed user creation endpoint to properly import groups
2019-08-10 13:48:09 +02:00
Juan Picado @jotadeveloper
97a3f14dd0 chore: update secrets baseline 2019-08-10 13:41:26 +02:00
Juan Picado @jotadeveloper
68476e5f0f chore: remove flow header 2019-08-10 13:39:57 +02:00
Juan Picado @jotadeveloper
c264f944fb fix: unpublish and add or remove star colision (#1434)
* fix: unpublish and add or remove star colision

The issue was the npm star use a similar payload, but we did not check properly the shape of the payload, this fix and allow unpublish correctly.

Improve unit testing for publishing and unpublishing
Add new code documentation for future changes.

* chore: update secrets baseline

* chore: add missing type

this will requires update types in the future
2019-08-10 13:38:06 +02:00
Matthew Curtis
8d51856dbf chore: update language in README's Donations section (#1433)
The Donations section of the README had a couple of typos, so I tidied it up a little bit.
2019-08-08 19:25:20 +02:00
Dan Singer
50e115f52a fix: fixed user creation endpoint to properly import groups 2019-08-06 10:01:47 -06:00
Juan Picado @jotadeveloper
4fb20efe60 Merge pull request #1418 from jamesgeorge007/hotfix/remove-stub-definition
fix(chore): remove stub type definition for handlebars
2019-08-01 18:41:40 +02:00
jamesgeorge007
19b9af3401 update yarn.lock 2019-08-01 13:54:13 +05:30
Juan Picado @jotadeveloper
6aa3bdc514 Merge pull request #1417 from jamesgeorge007/feat/minor-refactor
chore: minor refactor to eliminate code redundancy
2019-07-31 22:25:44 +02:00
Juan Picado @jotadeveloper
8028913157 Merge pull request #1421 from zkochan/master
fix(deps): add missing prod dependency
2019-07-31 21:58:30 +02:00
Zoltan Kochan
849f5bccb4 fix(deps): add missing prod dependency
http-errors needs to be a prod dependency
as it is used in code.
2019-07-31 19:08:32 +03:00
jamesgeorge007
de8dc43161 fix: remove stub type definition for handlebars 2019-07-30 14:06:16 +05:30
jamesgeorge007
e233a578a9 Minor refactor to eliminate code redundancy 2019-07-30 13:58:45 +05:30
Juan Picado @jotadeveloper
c1672f7e32 chore(release): 4.2.0 2019-07-29 20:27:48 +02:00
Juan Picado @jotadeveloper
20427797f7 Merge pull request #1415 from verdaccio/feat-update-theme
feat: update to @verdaccio/ui-theme@0.2.2
2019-07-29 20:24:31 +02:00
Juan Picado @jotadeveloper
9dd1c8f400 feat: update to @verdaccio/ui-theme@0.2.2
- fix: https://github.com/verdaccio/ui/issues/76
- fix: https://github.com/verdaccio/ui/issues/75
- fix: https://github.com/verdaccio/ui/pull/106
- feat: https://github.com/verdaccio/ui/pull/47

Co-Authored-By: Priscila Oliveira <priscilawebdev@gmail.com>
Co-Authored-By: Sergio Hg <sergiohgz@users.noreply.github.com>
Co-Authored-By: Griffith <griffithtp@users.noreply.github.com>
2019-07-29 20:12:00 +02:00
Juan Picado @jotadeveloper
22a122e5b8 chore: fix typo 2019-07-29 11:04:32 +02:00
Juan Picado @jotadeveloper
e03003f95b chore: update readme 2019-07-29 11:03:06 +02:00
Juan Picado @jotadeveloper
168e57fdd2 Merge pull request #1412 from verdaccio/update-deps-audit
feat: add new prop to audit middleware
2019-07-29 10:28:43 +02:00
Juan Picado @jotadeveloper
d93e76b366 feat: add new prop to audit middleware
- context: https://github.com/verdaccio/verdaccio-audit/pull/12
- related https://github.com/verdaccio/verdaccio/issues/1293

Co-Authored-By: Danny Frencham <dfrencham@users.noreply.github.com>
2019-07-29 10:12:29 +02:00
Juan Picado @jotadeveloper
b176b2f271 Merge pull request #1411 from verdaccio/docker-update
feat: docker image bump to node.js 10.16
2019-07-29 00:01:52 +02:00
Juan Picado @jotadeveloper
802c796881 feat: docker image bump to node.js 10.16 2019-07-28 23:32:43 +02:00
Juan Picado @jotadeveloper
ecec954b76 chore: updated feature request 2019-07-28 23:25:17 +02:00
Juan Picado @jotadeveloper
e35d8d99db Merge pull request #1409 from verdaccio/fix-1400
fix: allows pkg names that starts with dash
2019-07-28 23:11:03 +02:00
Juan Picado @jotadeveloper
fcd8a7f7bf chore: remove unused parameter 2019-07-28 11:44:28 +02:00
Juan Picado @jotadeveloper
be8fed50d9 refactor: add generatePackageMetadata utility
- Tests suites must be independent each other, this is a refactor that allow star endpoint to be fully independent.
- Add putPackage utility to put new packages
2019-07-27 23:48:00 +02:00
Juan Picado @jotadeveloper
e319435d73 fix: allows pkg names that start with dash
Description

In sinopia 9f662a69e1 (diff-50e3aa130a4f97a42ee2cf111c7b1d9d) a validation name for packages that start with dashs was added due this pattern is reserved by couchdb, but npmjs allows that now. I guess this is not a restriction anymore.

fix: https://github.com/verdaccio/verdaccio/issues/1400
2019-07-27 18:28:41 +02:00
Juan Picado @jotadeveloper
54e62fbb53 chore: add supertest link 2019-07-27 13:01:58 +02:00
Juan Picado @jotadeveloper
851cacf5af chore: update readme test 2019-07-27 12:58:48 +02:00
Juan Picado @jotadeveloper
ea633eb977 chore: update js to ts extensions 2019-07-27 12:55:20 +02:00
Juan Picado @jotadeveloper
9f7bb80d45 Merge branch 'master' of github.com:verdaccio/verdaccio 2019-07-27 12:50:43 +02:00
Juan Picado @jotadeveloper
bae88f42f8 Merge pull request #1408 from lirantal/fix/detect-secrets-hook-soften
chore(deps): bump detect-secrets for enhanced dev workflow
2019-07-27 12:50:25 +02:00
Juan Picado @jotadeveloper
138748830b chore: fix typo 2019-07-27 12:49:34 +02:00
Juan Picado @jotadeveloper
ffe7b699f2 chore: update readme for tests 2019-07-27 12:44:27 +02:00
Liran Tal
c9f1124fda chore(deps): bump detect-secrets for enhanced dev workflow 2019-07-27 13:32:11 +03:00
Juan Picado @jotadeveloper
293132772f chore: organize readme sections 2019-07-27 09:23:58 +02:00
Juan Picado @jotadeveloper
37f48aa1ce chore: add debug info about run the unit test 2019-07-27 08:51:38 +02:00
Juan Picado @jotadeveloper
b96445f0c7 chore: fix typo 2019-07-27 08:38:56 +02:00
Juan Picado @jotadeveloper
be7bbe9e60 chore: increase unit testing documentation 2019-07-27 08:37:33 +02:00
Juan Picado @jotadeveloper
aa94aa9b0c chore: remove ununsed prop in storage spec config file 2019-07-27 07:21:45 +02:00
Juan Picado @jotadeveloper
85a1fbe96e chore: add extra timeout for some heavy test 2019-07-27 07:20:30 +02:00
Juan Picado @jotadeveloper
7aef6d8a59 chore: organize block unit test
add some extra context
2019-07-27 07:17:08 +02:00
Juan Picado @jotadeveloper
71a0a43343 Merge pull request #1406 from verdaccio/refactor-logging
chore: refactor logging
2019-07-27 05:30:04 +02:00
Juan Picado @jotadeveloper
489be805e3 chore: remove empty file 2019-07-26 20:13:08 +02:00
Juan Picado @jotadeveloper
f4e7149806 refactor: add formatters 2019-07-26 09:35:19 +02:00
Juan Picado @jotadeveloper
263f051507 refactor: add levels file 2019-07-26 09:34:16 +02:00
Juan Picado @jotadeveloper
3beb57f7f6 test: add unit test for parser logger strings 2019-07-26 09:33:17 +02:00
Juan Picado @jotadeveloper
81d02f6f4f Merge pull request #1373 from lirantal/feat/detect-secrets
feat: prevent secrets from leaking to source control
2019-07-24 07:40:40 +02:00
Liran Tal
2b218ce0de fix(security): add secrets baseline 2019-07-19 08:02:08 +03:00
Liran Tal
aa8f1d3318 fix: upgrade to 1.0.2 which solves the docker issue 2019-07-19 06:39:22 +03:00
Liran Tal
9ef6808d4e feat: prevent secrets from leaking to source control 2019-07-19 06:39:20 +03:00
Juan Picado @jotadeveloper
4f87750c18 Merge pull request #1360 from verdaccio/feat-error-code
feat: storage plugins can throw http status codes
2019-07-16 19:08:04 +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
dependabot[bot]
b453681082 build(deps): bump lodash.template from 4.4.0 to 4.5.0 (#1384)
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.4.0...4.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-11 20:52:15 +02:00
Juan Picado @jotadeveloper
d4e16051fa chore: update bug report content 2019-07-10 10:29:20 +02:00
Juan Picado @jotadeveloper
8d906ead47 chore: remove duplicated template 2019-07-10 10:09:26 +02:00
James George
495bb0afee build: update issue templates for use info new flag (#1377) 2019-07-08 17:39:34 +02:00
Juan Picado @jotadeveloper
274bb1a9b9 chore(release): 4.1.0 2019-07-08 09:47:28 +02:00
Juan Picado @jotadeveloper
44c1610791 chore: restore @verdaccio/ui-theme@0.1.11
due to https://github.com/verdaccio/ui/issues/89
2019-07-08 09:40:38 +02:00
Juan Picado @jotadeveloper
45b8a7658b Merge pull request #1376 from verdaccio/update-dependencies
chore: update dependencies
2019-07-08 09:36:24 +02:00
Juan Picado @jotadeveloper
a0cf98546b chore: update dependencies
regular maintenance
2019-07-08 09:23:07 +02:00
Juan Picado @jotadeveloper
0061e380c3 Merge pull request #1313 from verdaccio/4.1.x
4.1.x
2019-07-08 09:07:22 +02:00
Juan Picado @jotadeveloper
318f868720 chore: update readme add angular cli 2019-07-06 08:37:35 +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
6ff356b312 Merge remote-tracking branch 'origin/master' into 4.1.x 2019-06-30 12:49:31 +02:00
Juan Picado @jotadeveloper
acf5a791f6 chore: update lock settings 2019-06-29 11:38:22 +02:00
Juan Picado @jotadeveloper
41310ca0fb chore: update stale config
Inspired by gatsby community adding this message
2019-06-29 10:18:12 +02:00
Juan Picado @jotadeveloper
20bc433d5a Merge pull request #1363 from jamesgeorge007/feat/update-docs
docs: minor tweaks
2019-06-29 08:24:02 +02:00
James George
0177241504 Minor tweaks
typo fix and grammar
2019-06-29 09:43:45 +05:30
Jason Cooke
a6a4eee66b docs: fix typo (#1362) 2019-06-27 06:01:31 +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
b38ef9608f Merge remote-tracking branch 'origin/master' into 4.1.x 2019-06-20 23:21:10 +02:00
Juan Picado @jotadeveloper
1aa9b4d4a5 chore(release): 4.0.4 2019-06-20 22:41:26 +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
e40083a6be chore: remove step frm GitHub actions 2019-06-14 07:18:13 +02:00
Juan Picado @jotadeveloper
1d6eb945c9 chore(release): 4.0.3 2019-06-14 06:43:32 +02:00
Juan Picado @jotadeveloper
9f5f563a3b Merge branch '4.1.x' of github.com:verdaccio/verdaccio into 4.1.x 2019-06-13 22:16:59 +02:00
Juan Picado @jotadeveloper
e3da67fad9 chore: avoid template test case is being run 2019-06-13 22:16:40 +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
f242d1b261 chore(docs): add testing development notes (#1343)
* chore: add testing notes

co-contributions by:
@lirantal @DanielRuf 

This PR aims to add on boarding proccess for new contributors to test verdaccio, update test or add new features.

* chore: add new sections

* chore: add functional test notes

* chore: fix typos

Co-Authored-By: Daniel Ruf <danielruf@users.noreply.github.com>

* chore: add functional test block

Co-Authored-By: Daniel Ruf <danielruf@users.noreply.github.com>

* chore: add before commit guide

Co-Authored-By: Daniel Ruf <danielruf@users.noreply.github.com>

* chore: add ci notes

Co-Authored-By: Daniel Ruf <danielruf@users.noreply.github.com>

* chore: extend notes

Co-Authored-By: Daniel Ruf <danielruf@users.noreply.github.com>

* chore: update ci notes

Co-Authored-By: Daniel Ruf <danielruf@users.noreply.github.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>

* chore: update test/README.md

Co-Authored-By: Liran Tal <liran.tal@gmail.com>
2019-06-13 18:28:43 +02:00
Juan Picado @jotadeveloper
e77ffb4c31 chore(release): 4.0.2 2019-06-13 07:03:25 +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
Juan Picado @jotadeveloper
192fb77169 fix(ui): failed to load all packages after login
more details https://github.com/verdaccio/ui/issues/72
2019-06-13 06:49:40 +02:00
Juan Picado @jotadeveloper
e5816342a6 fix: update dependencies
fix #1339 dayjs warning on yarn installation
2019-06-13 06:42:39 +02:00
Juan Picado @jotadeveloper
b6a1adca4e chore: update policy
display PGP public key as a code block
2019-06-12 10:06:09 +02:00
Liran Tal
ddcd89da33 fix: update security policy details (#1342) 2019-06-08 10:40:00 +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
Juan Picado @jotadeveloper
390d0d6066 Merge branch 'master' into 4.1.x 2019-05-29 06:50:24 +02:00
Juan Picado @jotadeveloper
f0b8673ecf Merge branch 'master' into 4.1.x 2019-05-26 12:59:53 +02:00
Juan Picado @jotadeveloper
cb20169c02 Merge branch 'master' into 4.1.x 2019-05-26 07:12:36 +02:00
Juan Picado @jotadeveloper
995350f27e Merge branch 'master' into 4.1.x 2019-05-25 15:22:24 +02:00
Juan Picado @jotadeveloper
01a48af7d7 Merge branch 'master' into 4.1.x 2019-05-23 23:01:41 +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
Juan Picado @jotadeveloper
197095efe3 Merge branch 'master' into 4.1.x 2019-05-20 13:05:38 -07:00
Juan Picado @jotadeveloper
134a738a47 Merge branch 'master' into 4.1.x 2019-05-20 12:06:54 -07:00
Juan Picado @jotadeveloper
8786a3740e test: relocate api spec test 2019-05-20 08:47:52 +02:00
Juan Picado @jotadeveloper
4bf6b3b844 test: fix broken test for validate parameters 2019-05-20 08:29:17 +02:00
Juan Picado @jotadeveloper
b1eb7c6278 test: relocate unit test cli, proxy, utils 2019-05-20 07:53:47 +02:00
Juan Picado @jotadeveloper
ca2e23cf9d test: relocate unit test 2019-05-20 07:41:12 +02:00
Juan Picado @jotadeveloper
596c727a35 test: relocate notification test 2019-05-20 07:33:39 +02:00
Juan Picado @jotadeveloper
e7400cef71 test: relocate plugin storage 2019-05-20 07:26:40 +02:00
Juan Picado @jotadeveloper
3929633f7e test: relocate test 2019-05-19 23:07:17 +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
d052bcef89 test: relocate helpers 2019-05-19 21:03:45 +02:00
Juan Picado @jotadeveloper
cb7b695896 chore: update lock file 2019-05-17 21:01:13 +02:00
Juan Picado @jotadeveloper
26c5e2d670 Merge branch 'master' into 4.1.x 2019-05-17 08:04:13 -07:00
Juan Picado @jotadeveloper
5c6b515712 Merge pull request #1161 from mlucool/filters
Filter packages
2019-05-16 04:42:21 -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
297 changed files with 13400 additions and 60629 deletions

View File

@@ -1,3 +1,3 @@
{
"presets": [["@verdaccio", {"flow": true}]]
"presets": [["@verdaccio"]]
}

View File

@@ -1,36 +1,26 @@
version: 2
version: 2.1
executors:
node_latest_browser:
docker:
- image: circleci/node:latest-browsers
node_latest:
docker:
- image: circleci/node:latest
node_lts:
docker:
- image: circleci/node:lts
default_executor: node_latest
aliases:
- &repo_path
~/verdaccio
- &defaults
working_directory: ~/verdaccio
- &node8_executor
docker:
- image: circleci/node:8
- &node12_browser_executor
docker:
- image: circleci/node:12-browsers
- &node10_executor
docker:
- image: circleci/node:10
- &node11_executor
docker:
- image: circleci/node:11
- &node12_executor
docker:
- image: circleci/node:12
- &default_executor
<<: *node12_executor
- &repo_key
repo-{{ .Branch }}-{{ .Revision }}
- &coverage_key
coverage-{{ .Branch }}-{{ .Revision }}
- &base_config_key
base-config-{{ .Branch }}-{{ .Revision }}
working_directory: *repo_path
- &yarn_cache_key
yarn-sha-{{ checksum "yarn.lock" }}
- &restore_repo
attach_workspace:
at: ~/verdaccio
- &coverage_key
coverage-{{ .Branch }}-{{ .Revision }}
- &ignore_non_dev_branches
filters:
tags:
@@ -41,19 +31,35 @@ aliases:
- l10n_master
- /release\/.*/
commands:
restore_repo:
description: Restore repository from workspace
steps:
- attach_workspace:
at: *repo_path
run_test:
description: Run test and functional test
steps:
- run:
name: Test
command: yarn run test
- run:
name: Functional test
command: yarn test:functional
- store_test_results:
path: reports/
jobs:
prepare:
<<: *defaults
<<: *default_executor
executor: default_executor
steps:
- checkout
- restore_cache:
key: *base_config_key
- restore_cache:
key: *yarn_cache_key
- run:
name: Install Js dependencies
command: yarn install --no-progress --registry https://registry.verdaccio.org
name: Install dependencies
command: yarn install --no-progress --pure-lockfile
- run:
name: Prepare CI
command: yarn run pre:ci
@@ -67,79 +73,49 @@ jobs:
- ~/.cache/yarn
- node_modules
- persist_to_workspace:
root: ~/verdaccio
root: *repo_path
paths:
- ./*
test_node8:
test_node_latest:
<<: *defaults
<<: *node8_executor
executor: node_latest
steps:
- *restore_repo
- run:
name: Test with Node 8
command: |
yarn test
yarn test:functional
test_node10:
<<: *defaults
<<: *node10_executor
steps:
- *restore_repo
- run:
name: Test with Node 10
command: |
yarn run test
yarn test:functional
- restore_repo
- run_test
- save_cache:
key: *coverage_key
paths:
- coverage
test_node11:
test_node_lts:
<<: *defaults
<<: *node11_executor
executor: node_lts
steps:
- *restore_repo
- run:
name: Test with Node 11
command: |
yarn run test
yarn test:functional
test_node12:
<<: *defaults
<<: *node12_executor
steps:
- *restore_repo
- run:
name: Test with Node 12
command: |
yarn run test
yarn test:functional
- restore_repo
- run_test
test_e2e:
<<: *defaults
<<: *node12_browser_executor
executor: node_latest_browser
steps:
- *restore_repo
- restore_repo
- run:
name: Test End-to-End
command: yarn run test:e2e
coverage:
<<: *defaults
<<: *default_executor
executor: default_executor
steps:
- *restore_repo
- restore_repo
- restore_cache:
key: *coverage_key
- run:
name: Publish coverage
command: yarn run coverage:publish
- store_artifacts:
path: coverage/clover.xml
prefix: tests
- store_artifacts:
path: coverage
prefix: coverage
- store_test_results:
path: coverage/clover.xml
workflows:
version: 2
@@ -147,31 +123,19 @@ workflows:
jobs:
- prepare:
<<: *ignore_non_dev_branches
- test_node8:
- test_node_latest:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node10:
- test_node_lts:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node11:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node12:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_e2e:
requires:
- prepare
<<: *ignore_non_dev_branches
- coverage:
requires:
- test_node8
- test_node10
- test_node11
- test_node12
- test_e2e
- test_node_latest
<<: *ignore_non_dev_branches

View File

@@ -14,4 +14,6 @@ Dockerfile
*.scss
*.png
*.jpg
*.sh
test/unit/partials/
types/custom.d.ts

View File

@@ -1,58 +1,17 @@
{
"plugins": [
"babel",
"flowtype",
"jest",
"verdaccio",
"jsx-a11y"
],
"extends": [
"eslint:recommended",
"google",
"plugin:flowtype/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended",
"plugin:verdaccio/recommended",
"plugin:jsx-a11y/recommended"
"@verdaccio"
],
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 7,
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"globals": {
"__APP_VERSION__": true
},
"rules": {
"babel/no-invalid-this": 1,
"prettier/prettier": ["error", null, "@prettier"],
"semi": ["error"],
"comma-dangle": ["error"],
"camelcase": 0,
"no-useless-escape": ["error"],
"no-invalid-this": 0,
"handle-callback-err": ["error"],
"no-fallthrough": ["error"],
"no-new-require": ["error"],
"max-len": ["error", 160],
"require-jsdoc": 0,
"valid-jsdoc": 0,
"prefer-spread": 1,
"prefer-rest-params": 1,
"linebreak-style": 0,
"quote-props":["error", "as-needed"],
"verdaccio/jsx-no-style": ["warn"],
"verdaccio/jsx-spread": ["warn"],
"jest/expect-expect": 0
"@typescript-eslint/no-var-requires": ["warn"],
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/no-inferrable-types": ["warn"],
"@typescript-eslint/no-empty-function": ["warn"],
"@typescript-eslint/no-this-alias": ["warn"],
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/array-type": ["warn"],
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/indent": 0,
"@typescript-eslint/interface-name-prefix": 0
}
}

View File

@@ -1,25 +0,0 @@
[ignore]
.*/node_modules/.*
.*/test/**/*.json
.*/static/.*
.*/test/unit/partials/.*
.*/.nyc_output/.*
.*/coverage/.*
.*/.vscode/.*
.*/build/.*
.*/docs/.*
.*/scripts/.*
.*/assets/.*
.*/bin/.*
.*/systemd/.*
.*/website/.*
.*/wiki/.*
.*/docs/.*
.*/tools/.*
[libs]
node_modules/@verdaccio/types/lib/
[options]
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
module.ignore_non_literal_requires=true

View File

@@ -1,37 +1,66 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Docker || Kubernetes (please complete the following information):**
- Docker verdaccio tag: [e.g. verdaccio:beta]
- Docker commands [e.g. docker pull ...]
- Docker Version [e.g. v18.05.0-ce-rc1]
**Configuration File (cat ~/.config/verdaccio/config.yaml)**
**Debugging output**
- `$ NODE_DEBUG=request verdaccio` display request calls (verdaccio <--> uplinks)
- `$ DEBUG=express:* verdaccio` enable extreme verdaccio debug mode (verdaccio api)
- `$ npm -ddd` prints:
- `$ npm config get registry` prints:
**Additional context**
Add any other context about the problem here.
---
name: Bug report
about: Create a report to help us improve
---
<!--
Hi folk, please read carefully the following points, all this information is what you need to share and make the process efficient
so everybody can understand your issue, please notice if you don't fill any of this points our friendly boot will remind you to do it or
close automatically the issue. Removing the sections you consider are irrelevant for your issue is totally ok.
If you have questions, you might rather join use over Discord https://chat.verdaccio.org
As reminder, we have code of conduct all of us we must follow https://github.com/verdaccio/verdaccio/blob/master/CODE_OF_CONDUCT.md
-->
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
**To Reproduce**
<!-- How to reproduce the issue -->
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Docker || Kubernetes (please complete the following information):**
- Docker verdaccio tag: [e.g. verdaccio:4.x]
- Docker commands [e.g. docker pull ...]
- Docker Version [e.g. v18.05.0-ce-rc1]
**Configuration File (cat ~/.config/verdaccio/config.yaml)**
<!-- Please be careful do not leak any sensitive information, remove tokens -->
**Environment information**
<!--
Please paste the results of `verdaccio --info` here (only if you are using >4.0.0).
Share, Node.js, node package manager used (npm, yarn or pnpm) and the version.
The verdaccio version is really important, run `verdaccio --version` if you don't know it.
-->
**Debugging output**
<!-- If you are contributing and need to share internal stuff, here some useful commands to get more verbose output -->
- `$ NODE_DEBUG=request verdaccio` display request calls (verdaccio <--> uplinks)
- `$ DEBUG=express:* verdaccio` enable extreme verdaccio debug mode (verdaccio api)
- `$ npm -ddd` prints:
- `$ npm config get registry` prints:
**Additional context**
<!--
If there is something else to share, screenshots, log files, or link references to other tickets.
IMPORTANT: please do not attach log files, rather copy the content so is indexable for future search.
-->

View File

@@ -1,17 +1,29 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
---
name: Feature request
about: Suggest an idea for this project
---
<!--
Verdaccio is a project addressed for voluntaries, if you appreciate this project consider to donate.
1$/month - minimal contribution
5$/month - nice contribution
500$ - help to promote this project, marketing, stickers.
2000$/year - sponsor status, your company logo will be in our readme, meetups talks and your request will have high priority
https://opencollective.com/verdaccio
As reminder, the Open Source must be sustainable.
-->
**Is your feature request related to a problem?**
Please describe a clear and concise description of what the problem is. E.g. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -1,32 +0,0 @@
<!--
First of all, please read this section
https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md#reporting-a-bug
Some advices before file an issue
* Give a brief explanation of the issue, suggestion or feature to request.
* If the issue is a question, provide as much information you have available.
* How can I do in order to reproduce it? What environment?
* Define which version the issue happens and whether previous version the behaviour is correct.
* Provide your config file is really helpful. Please be aware to hide sensisive data (passwords, server IP, etc) before post.
-->
#### My reason:
#### Steps to reproduce:
#### App Version:
#### Config file:
#### Additional information:
- `$ NODE_DEBUG=request verdaccio` display request calls (verdaccio <--> uplinks)
- `$ DEBUG=express:* verdaccio` enable extreme verdaccio debug mode (verdaccio api)
- `$ npm -ddd` prints:
- `$ npm config get registry` prints:
- Verdaccio terminal output
- Which (Windows, OS X/macOS, or Linux) environment are you running verdaccio?:
- Verdaccio configuration file, eg: `cat ~/.config/verdaccio/config.yaml`
- Container Options:
- Docker?:
- Kubernetes?:
#### Additional verbose log:

16
.github/lock.yml vendored
View File

@@ -1,7 +1,7 @@
# Configuration for lock-threads - https://github.com/dessant/lock-threads
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 200
daysUntilLock: 90
# Issues and pull requests with these labels will not be locked. Set to `[]` to disable
exemptLabels: []
@@ -11,9 +11,15 @@ lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
🤖This thread has been automatically locked 🔒 since there has not been
any recent activity after it was closed.
We lock tickets after 90 days with the idea to encourage you to open a ticket with new fresh data
and to provide you better feedback 🤝and better visibility 👀.
If you consider, you can attach this ticket 📨 to the new one as a reference for better context.
Thanks for being a part of the Verdaccio community! 💘
# Limit to only `issues` or `pulls`
# only: issues
@@ -25,4 +31,4 @@ issues:
lockLabel: outdated
pulls:
daysUntilLock: 90
daysUntilLock: 10

103
.github/main.workflow vendored
View File

@@ -1,103 +0,0 @@
workflow "Docker && Publish Pre-check" {
resolves = [
"Docker build health check",
"Test Publish Verdaccio",
]
on = "push"
}
action "Docker build health check" {
uses = "actions/docker/cli@8cdf801b322af5f369e00d85e9cf3a7122f49108"
args = "build ."
env = {
VERDACCIO_BUILD_REGISTRY = "https://registry.verdaccio.org"
}
}
action "Test Publish Verdaccio" {
uses = "verdaccio/github-actions/publish@v0.1.0"
needs = ["Docker build health check"]
args = "-d"
}
workflow "release" {
resolves = [
"github-release",
"release:lint",
"release:build",
]
on = "push"
}
action "release:tag-filter" {
uses = "actions/bin/filter@master"
args = "tag v*"
}
action "release:install" {
uses = "docker://node:10"
needs = ["release:tag-filter"]
args = "yarn install --frozen-lockfile"
}
action "release:build" {
uses = "docker://node:10"
needs = ["release:install"]
args = "yarn run code:build"
}
action "release:lint" {
uses = "docker://node:10"
needs = ["release:install"]
args = "yarn run lint"
}
action "release:test" {
uses = "docker://node:10"
needs = ["release:build"]
args = "sh scripts/puppeteer-setup-ci.sh"
}
action "release:publish" {
needs = ["release:test"]
uses = "docker://node:10"
args = "sh scripts/publish.sh"
secrets = [
"REGISTRY_AUTH_TOKEN",
]
env = {
REGISTRY_URL = "registry.npmjs.org"
}
}
action "github-release" {
needs = ["release:publish"]
uses = "docker://node:10"
args = "sh scripts/github-release.sh"
secrets = [
"GITHUB_TOKEN",
]
}
action "branch-filter" {
uses = "actions/bin/filter@master"
args = "branch"
}
action "install" {
needs = ["branch-filter"]
uses = "docker://node:10"
args = "yarn install --frozen-lockfile"
}
action "build" {
uses = "docker://node:10"
needs = ["install"]
args = "yarn run code:build"
}
action "lint" {
uses = "docker://node:10"
needs = ["install"]
args = "yarn run lint"
}

16
.github/stale.yml vendored
View File

@@ -1,7 +1,7 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
daysUntilStale: 15
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 5
daysUntilClose: 10
# Issues with these labels will never be considered stale
exemptLabels:
- dev: high priority
@@ -13,8 +13,14 @@ exemptLabels:
staleLabel: issue: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
Hi pal 👋🏼!
This issue has gone quiet 😶.
We get a lot of issues, so we currently close issues after 25 days of inactivity. Its been at least 15 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add/suggest the label "discuss" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out [https://github.com/verdaccio/contributing](https://github.com/verdaccio/contributing) for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Verdaccio community! 💘
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

29
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: CI
on: [push, pull_request]
jobs:
ci:
name: Node ${{ matrix.node_version }}
strategy:
fail-fast: false
matrix:
node_version: [10, 12]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node_version: ${{ matrix.node_version }}
- name: Install
run: yarn install --pure-lockfile
- name: Build
run: yarn code:build
- name: Lint
run: yarn lint
- name: Test
run: yarn test

View File

@@ -0,0 +1,24 @@
name: Docker & Publish Pre-check
on: [push, pull_request]
jobs:
testDocker:
name: Test Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build
run: docker build .
env:
VERDACCIO_BUILD_REGISTRY: https://registry.verdaccio.org
testVerdaccio:
name: Test Verdaccio Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Publish
uses: verdaccio/github-actions/publish@v0.1.0
with:
args: -d

32
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Release
on:
push:
tags:
- '*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node (latest)
uses: actions/setup-node@v1
with:
node_version: 12
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn code:build
- name: Lint
run: yarn lint
- name: Publish
run: sh scripts/publish.sh
env:
REGISTRY_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
REGISTRY_URL: registry.npmjs.org
- name: Create release notes
run: sh scripts/github-release.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

3
.gitignore vendored
View File

@@ -6,6 +6,7 @@ build/
### Test
test/unit/partials/store/test-*-storage/*
test/unit/partials/store/*-storage/*
test/unit/partials/store/storage_default_storage/*
.verdaccio-db.json
.sinopia-db.json
@@ -22,6 +23,7 @@ yarn-error.log
# Istanbul
reports/
coverage/
.nyc*
@@ -35,4 +37,3 @@ __tests__
# Compiled script
static/*

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
always-auth = true

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
13

View File

@@ -8,5 +8,5 @@
"jsxBracketSameLine": true,
"trailingComma": "es5",
"semi": true,
"parser": "flow"
"parser": "typescript"
}

2977
.secrets-baseline Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,175 @@
# Change Log
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [4.3.5](https://github.com/verdaccio/verdaccio/compare/v4.3.4...v4.3.5) (2019-11-21)
### Bug Fixes
* changed the exit code for info flag ([#1537](https://github.com/verdaccio/verdaccio/issues/1537)) ([cbea2ed](https://github.com/verdaccio/verdaccio/commit/cbea2ed))
* package.json to reduce vulnerabilities ([#1552](https://github.com/verdaccio/verdaccio/issues/1552)) ([cd8228b](https://github.com/verdaccio/verdaccio/commit/cd8228b))
* package.json to reduce vulnerabilities ([#1577](https://github.com/verdaccio/verdaccio/issues/1577)) ([e459881](https://github.com/verdaccio/verdaccio/commit/e459881))
* package.json to reduce vulnerabilities ([#1583](https://github.com/verdaccio/verdaccio/issues/1583)) ([2f3ba93](https://github.com/verdaccio/verdaccio/commit/2f3ba93))
### [4.3.4](https://github.com/verdaccio/verdaccio/compare/v4.3.3...v4.3.4) (2019-10-23)
### Bug Fixes
* minor grammatical tweak ([#1513](https://github.com/verdaccio/verdaccio/issues/1513)) ([35f816b](https://github.com/verdaccio/verdaccio/commit/35f816b))
* minor typos, formatting, and docs ([#1512](https://github.com/verdaccio/verdaccio/issues/1512)) ([549f474](https://github.com/verdaccio/verdaccio/commit/549f474))
* security vulnerability at readme in dompurify dep ([#1532](https://github.com/verdaccio/verdaccio/issues/1532)) ([2ac7770](https://github.com/verdaccio/verdaccio/commit/2ac7770))
### [4.3.3](https://github.com/verdaccio/verdaccio/compare/v4.3.2...v4.3.3) (2019-10-03)
### Bug Fixes
* allow add to request agentOptions ([#1506](https://github.com/verdaccio/verdaccio/issues/1506)) ([65d6a93](https://github.com/verdaccio/verdaccio/commit/65d6a93))
### [4.3.2](https://github.com/verdaccio/verdaccio/compare/v4.3.1...v4.3.2) (2019-10-02)
### Bug Fixes
* comment out experiments from configuration files ([#1505](https://github.com/verdaccio/verdaccio/issues/1505)) ([3438b75](https://github.com/verdaccio/verdaccio/commit/3438b75))
* fixing the lint issues ([#1503](https://github.com/verdaccio/verdaccio/issues/1503)) ([02aee3a](https://github.com/verdaccio/verdaccio/commit/02aee3a))
* fixing typos in comments ([#1504](https://github.com/verdaccio/verdaccio/issues/1504)) ([72314e4](https://github.com/verdaccio/verdaccio/commit/72314e4))
### [4.3.1](https://github.com/verdaccio/verdaccio/compare/v4.3.0...v4.3.1) (2019-10-01)
### Bug Fixes
* remove jwt from default config ([#1499](https://github.com/verdaccio/verdaccio/issues/1499)) ([e9616f9](https://github.com/verdaccio/verdaccio/commit/e9616f9))
* remove jwt from docker config ([#1500](https://github.com/verdaccio/verdaccio/issues/1500)) ([bc6b084](https://github.com/verdaccio/verdaccio/commit/bc6b084))
## [4.3.0](https://github.com/verdaccio/verdaccio/compare/v4.2.2...v4.3.0) (2019-09-30)
### Bug Fixes
* package.json to reduce vulnerabilities ([#1474](https://github.com/verdaccio/verdaccio/issues/1474)) ([b1cd070](https://github.com/verdaccio/verdaccio/commit/b1cd070))
### Features
* browse web package version ([#1457](https://github.com/verdaccio/verdaccio/issues/1457)) ([d5303f4](https://github.com/verdaccio/verdaccio/commit/d5303f4))
* ensure every log file has at least one record ([#1414](https://github.com/verdaccio/verdaccio/issues/1414)) ([962d5d5](https://github.com/verdaccio/verdaccio/commit/962d5d5))
* npm token command support ([#1427](https://github.com/verdaccio/verdaccio/issues/1427)) ([dbf2017](https://github.com/verdaccio/verdaccio/commit/dbf2017))
* **docker:** Node.js update to 10.16.3 ([#1473](https://github.com/verdaccio/verdaccio/issues/1473)) ([e081a58](https://github.com/verdaccio/verdaccio/commit/e081a58))
### [4.2.2](https://github.com/verdaccio/verdaccio/compare/v4.2.1...v4.2.2) (2019-08-25)
### Bug Fixes
* mkdir failed and ec2 infinitely re-launch ([342d284](https://github.com/verdaccio/verdaccio/commit/342d284))
* update @verdaccio/ui-theme@0.2.3 ([#1451](https://github.com/verdaccio/verdaccio/issues/1451))
* use test + mkdir for strict dir check ([9006146](https://github.com/verdaccio/verdaccio/commit/9006146))
### [4.2.1](https://github.com/verdaccio/verdaccio/compare/v4.2.0...v4.2.1) (2019-08-10)
### Bug Fixes
* fixed user creation endpoint to properly import groups ([50e115f](https://github.com/verdaccio/verdaccio/commit/50e115f))
* remove stub type definition for handlebars ([de8dc43](https://github.com/verdaccio/verdaccio/commit/de8dc43))
* unpublish and add or remove star collision ([#1434](https://github.com/verdaccio/verdaccio/issues/1434)) ([c264f94](https://github.com/verdaccio/verdaccio/commit/c264f94))
* **deps:** add missing prod dependency ([849f5bc](https://github.com/verdaccio/verdaccio/commit/849f5bc))
## [4.2.0](https://github.com/verdaccio/verdaccio/compare/v4.1.0...v4.2.0) (2019-07-29)
### Bug Fixes
* **security:** add secrets baseline ([2b218ce](https://github.com/verdaccio/verdaccio/commit/2b218ce))
* allows pkg names that start with dash ([e319435](https://github.com/verdaccio/verdaccio/commit/e319435)), closes [/github.com/rlidwka/sinopia/commit/9f662a69e19a15dd90f568fc3a3ebf65b33cbd80#diff-50e3aa130a4f97a42ee2cf111c7b1d9](https://github.com/verdaccio/verdaccio/issues/diff-50e3aa130a4f97a42ee2cf111c7b1d9)
* upgrade to 1.0.2 which solves the docker issue ([aa8f1d3](https://github.com/verdaccio/verdaccio/commit/aa8f1d3))
### Build System
* **deps:** bump lodash.template from 4.4.0 to 4.5.0 ([#1384](https://github.com/verdaccio/verdaccio/issues/1384)) ([b453681](https://github.com/verdaccio/verdaccio/commit/b453681))
* fix semver missing type on build with docker ([12b60f6](https://github.com/verdaccio/verdaccio/commit/12b60f6))
* update issue templates for use info new flag ([#1377](https://github.com/verdaccio/verdaccio/issues/1377)) ([495bb0a](https://github.com/verdaccio/verdaccio/commit/495bb0a))
### Features
* add new prop to audit middleware ([d93e76b](https://github.com/verdaccio/verdaccio/commit/d93e76b))
* convert project to typescript ([#1374](https://github.com/verdaccio/verdaccio/issues/1374)) ([66f4197](https://github.com/verdaccio/verdaccio/commit/66f4197))
* docker image bump to node.js 10.16 ([802c796](https://github.com/verdaccio/verdaccio/commit/802c796))
* plugins can throw http status codes ([3c53997](https://github.com/verdaccio/verdaccio/commit/3c53997))
* prevent secrets from leaking to source control ([9ef6808](https://github.com/verdaccio/verdaccio/commit/9ef6808))
* update to @verdaccio/ui-theme@0.2.2 ([9dd1c8f](https://github.com/verdaccio/verdaccio/commit/9dd1c8f))
### Tests
* add unit test for parser logger strings ([3beb57f](https://github.com/verdaccio/verdaccio/commit/3beb57f))
## [4.1.0](https://github.com/verdaccio/verdaccio/compare/v4.0.4...v4.1.0) (2019-07-08)
### Features
* parse YAML/JSON/JS config file ([#1258](https://github.com/verdaccio/verdaccio/issues/1258)) ([95d134b](https://github.com/verdaccio/verdaccio/commit/95d134b))
* plugin support to filter packages ([b9ffac5](https://github.com/verdaccio/verdaccio/commit/b9ffac5)), closes [#818](https://github.com/verdaccio/verdaccio/issues/818)
* **chore:** Included provision to show up local environment information ([#1365](https://github.com/verdaccio/verdaccio/issues/1365)) ([eb6bf51](https://github.com/verdaccio/verdaccio/commit/eb6bf51)), closes [#1364](https://github.com/verdaccio/verdaccio/issues/1364)
### Tests
* increase usage of constants ([2f3ec2c](https://github.com/verdaccio/verdaccio/commit/2f3ec2c))
* fix broken test for validate parameters ([4bf6b3b](https://github.com/verdaccio/verdaccio/commit/4bf6b3b))
* relocate api spec test ([8786a37](https://github.com/verdaccio/verdaccio/commit/8786a37))
* relocate helpers ([d052bce](https://github.com/verdaccio/verdaccio/commit/d052bce))
* relocate notification test ([596c727](https://github.com/verdaccio/verdaccio/commit/596c727))
* relocate plugin storage ([e7400ce](https://github.com/verdaccio/verdaccio/commit/e7400ce))
* relocate spec test ([b4c42c1](https://github.com/verdaccio/verdaccio/commit/b4c42c1))
* relocate test ([3929633](https://github.com/verdaccio/verdaccio/commit/3929633))
* relocate unit test ([ca2e23c](https://github.com/verdaccio/verdaccio/commit/ca2e23c))
* relocate unit test cli, proxy, utils ([b1eb7c6](https://github.com/verdaccio/verdaccio/commit/b1eb7c6))
## [4.0.4](https://github.com/verdaccio/verdaccio/compare/v4.0.3...v4.0.4) (2019-06-20)
### Bug Fixes
* correctly check the keepAliveTimeout value, fixes [#1352](https://github.com/verdaccio/verdaccio/issues/1352) ([#1353](https://github.com/verdaccio/verdaccio/issues/1353)) ([a92bd5f](https://github.com/verdaccio/verdaccio/commit/a92bd5f))
## [4.0.3](https://github.com/verdaccio/verdaccio/compare/v4.0.2...v4.0.3) (2019-06-14)
### Bug Fixes
* **api:** return 503 to npm/yarn on uplink connection timeout ([#1331](https://github.com/verdaccio/verdaccio/issues/1331)) ([eb7a8e3](https://github.com/verdaccio/verdaccio/commit/eb7a8e3)), closes [#1328](https://github.com/verdaccio/verdaccio/issues/1328) [#720](https://github.com/verdaccio/verdaccio/issues/720) [#1328](https://github.com/verdaccio/verdaccio/issues/1328) [#720](https://github.com/verdaccio/verdaccio/issues/720)
## [4.0.2](https://github.com/verdaccio/verdaccio/compare/v4.0.1...v4.0.2) (2019-06-13)
### Bug Fixes
* correctly check if the proxy setting evaluates to false ([#1336](https://github.com/verdaccio/verdaccio/issues/1336)) ([df834f4](https://github.com/verdaccio/verdaccio/commit/df834f4))
* update dependencies ([e581634](https://github.com/verdaccio/verdaccio/commit/e581634)), closes [#1339](https://github.com/verdaccio/verdaccio/issues/1339)
* update security policy details ([#1342](https://github.com/verdaccio/verdaccio/issues/1342)) ([ddcd89d](https://github.com/verdaccio/verdaccio/commit/ddcd89d))
* **api:** force authenticate on login ([#1347](https://github.com/verdaccio/verdaccio/issues/1347)) ([85c1bd1](https://github.com/verdaccio/verdaccio/commit/85c1bd1))
* **ui:** failed to load all packages after login ([192fb77](https://github.com/verdaccio/verdaccio/commit/192fb77))
## [4.0.1](https://github.com/verdaccio/verdaccio/compare/v4.0.0...v4.0.1) (2019-05-28)

View File

@@ -156,10 +156,9 @@ fix: xxxxxxxxxx
```
Commits types such as as `docs:`,`style:`,`refactor:`,`perf:`,`test:`
and `chore:` are valid but have no effect on versioning. **It would be great
if you use them.**
and `chore:` are valid but have no effect on versioning. **It would be great if you use them.**
Use `npm run commitmsg` to check your commit message format.
All commits message are going to be validated when they are created using husky hooks.
**PRs that do not follow the commit message guidelines will not be merged.**

View File

@@ -1,7 +1,7 @@
FROM node:10.15.3-alpine as builder
FROM node:10.16.3-alpine as builder
ENV NODE_ENV=production \
VERDACCIO_BUILD_REGISTRY=https://registry.npmjs.org
VERDACCIO_BUILD_REGISTRY=https://registry.verdaccio.org
RUN apk --no-cache add openssl ca-certificates wget && \
apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python && \
@@ -13,15 +13,15 @@ WORKDIR /opt/verdaccio-build
COPY . .
RUN yarn config set registry $VERDACCIO_BUILD_REGISTRY && \
yarn install --production=false --no-lockfile && \
yarn install --production=false && \
yarn lint && \
yarn code:docker-build && \
yarn cache clean && \
yarn install --production=true --no-lockfile
yarn install --production=true
FROM node:10.15.3-alpine
FROM node:10.16.3-alpine
LABEL maintainer="https://github.com/verdaccio/verdaccio"
ENV VERDACCIO_APPDIR=/opt/verdaccio \

View File

@@ -23,7 +23,7 @@ Google Cloud Storage** or create your own plugin.
[![codecov](https://img.shields.io/codecov/c/github/verdaccio/verdaccio/master.svg)](https://codecov.io/gh/verdaccio/verdaccio)
[![discord](https://img.shields.io/discord/388674437219745793.svg)](http://chat.verdaccio.org/)
[![node](https://img.shields.io/node/v/verdaccio/latest.svg)](https://www.npmjs.com/package/verdaccio)
![MIT](https://img.shields.io/github/license/mashape/apistatus.svg)
[![MIT](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/verdaccio/localized.svg)](https://crowdin.com/project/verdaccio)
@@ -39,6 +39,13 @@ Install with npm:
npm install --global verdaccio
```
## Donations
Verdaccio is run by **volunteers**; nobody is working full-time on it. If you find this project to be useful and would like to support its development, consider making a donation - **your logo might end up in this readme.** 😉
**[Donate](https://opencollective.com/verdaccio)** 💵👍🏻 starting from *$1/month* or just one single contribution.
## What does Verdaccio do for me?
### Use private packages
@@ -57,13 +64,18 @@ If you use multiples registries in your organization and need to fetch packages
### Override public packages
If you want to use a modified version of some 3rd-party package (for example, you found a bug, but maintainer didn't accept pull request yet), you can publish your version locally under the same name. See in detail each of these [use cases](https://github.com/verdaccio/verdaccio/tree/master/docs/use-cases.md).
If you want to use a modified version of some 3rd-party package (for example, you found a bug, but maintainer didn't accept pull request yet), you can publish your version locally under the same name. See in detail [here](https://verdaccio.org/docs/en/best#override-public-packages).
### E2E Testing
Verdaccio has proved to be a lightweight registry that can be
booted in a couple of seconds, fast enough for any CI. Many open source projects use verdaccio for end to end testing, to mention some examples, **create-react-app**, **mozilla neutrino**, **pnpm**, **storybook**, **alfresco** or **eclipse theia**. You can read more in dedicated article to E2E in our blog.
## Talks
Do not miss our talk (Introduction to Verdaccio) with [@priscilawebdev](https://twitter.com/priscilawebdev) and [@jotadeveloper](https://twitter.com/jotadeveloper) on stage.
[![viennajs-meetup](https://cdn.verdaccio.dev/readme/youtube_meetup_viennajs.png?source=readme)](https://www.youtube.com/watch?v=hDIFKzmoCaA)
## Get Started
@@ -79,6 +91,11 @@ You would need set some npm configuration, this is optional.
$ npm set registry http://localhost:4873/
```
For one-off commands or to avoid setting the registry globally:
```bash
NPM_CONFIG_REGISTRY=http://localhost:4873 npm i
```
Now you can navigate to [http://localhost:4873/](http://localhost:4873/) where your local packages will be listed and can be searched.
> Warning: Verdaccio [does not currently support PM2's cluster mode](https://github.com/verdaccio/verdaccio/issues/1301#issuecomment-489302298), running it with cluster mode may cause unknown behavior.
@@ -108,7 +125,7 @@ This will prompt you for user credentials which will be saved on the `verdaccio`
## Docker
Below are the most commonly needed informations,
Below are the most commonly needed information,
every aspect of Docker and verdaccio is [documented separately](https://www.verdaccio.org/docs/en/docker.html)
@@ -152,7 +169,7 @@ Verdaccio aims to support all features of a standard npm client that make sense
- Registering new users (npm adduser {newuser}) - **supported**
- Change password (npm profile set password) - **supported**
- Transferring ownership (npm owner add {user} {pkg}) - not supported, *PR-welcome*
- Token (npm token) - wip [#1271](https://github.com/verdaccio/verdaccio/pull/1271)
- Token (npm token) - (more info [#1427](https://github.com/verdaccio/verdaccio/pull/1427)) - **supported**
### Miscellany
@@ -170,35 +187,38 @@ If you want to report a security vulnerability, please follow the steps which we
## Core Team
The core team is the responsable for drive this project, team is ordered by antiquity and areas of responsability.
The core team is responsible for driving this project ahead, team is ordered by antiquity and areas of responsibility.
| [Juan Picado](https://github.com/juanpicado) | [Ayush Sharma](https://github.com/ayusharma) | [Sergio Hg](https://github.com/sergiohgz) | [Priscila Oliveria](https://github.com/priscilawebdev) |
|---|---|---|---|
| ![jotadeveloper](https://avatars3.githubusercontent.com/u/558752?s=120&v=4) | ![ayusharma](https://avatars2.githubusercontent.com/u/6918450?s=120&v=4) | ![sergiohgz](https://avatars2.githubusercontent.com/u/14012309?s=120&v=4) | ![priscilawebdev](https://avatars2.githubusercontent.com/u/29228205?s=120&v=4) |
| [@jotadeveloper](https://twitter.com/jotadeveloper) | [@ayusharma_](https://twitter.com/ayusharma_) | [@sergiohgz](https://twitter.com/sergiohgz) | [@priscilawebdev](https://twitter.com/priscilawebdev) |
| All areas | All areas | Docker,Builds,Stack | UI, Stack |
| [Juan Picado](https://github.com/juanpicado) | [Ayush Sharma](https://github.com/ayusharma) | [Sergio Hg](https://github.com/sergiohgz) |
|---|---|---|
| ![jotadeveloper](https://avatars3.githubusercontent.com/u/558752?s=120&v=4) | ![ayusharma](https://avatars2.githubusercontent.com/u/6918450?s=120&v=4) | ![sergiohgz](https://avatars2.githubusercontent.com/u/14012309?s=120&v=4) |
| [@jotadeveloper](https://twitter.com/jotadeveloper) | [@ayusharma_](https://twitter.com/ayusharma_) | [@sergiohgz](https://twitter.com/sergiohgz) |
| All areas | All areas | Docker,Builds,Stack, Monorepo |
| [Priscila Oliveria](https://github.com/priscilawebdev) | [Daniel Ruf](https://github.com/DanielRuf) |
| ![priscilawebdev](https://avatars2.githubusercontent.com/u/29228205?s=120&v=4) | ![DanielRuf](https://avatars3.githubusercontent.com/u/827205?s=120&v=4) |
| [@priscilawebdev](https://twitter.com/priscilawebdev) | [@DanielRufde](https://twitter.com/DanielRufde) |
| UI, Stack | All areas |
You can find and chat with then over Discord, click [here](http://chat.verdaccio.org) or follow them at *Twitter*.
## Who is using Verdaccio?
* [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#contributing-to-e2e-end-to-end-tests) *(+67k ⭐️)*
* [Storybook](https://github.com/storybooks/storybook) *(+37k ⭐️)*
* [Gatsby](https://github.com/gatsbyjs/gatsby) *(+34k ⭐️)*
* [Uppy](https://github.com/transloadit/uppy) *(+19k ⭐️)*
* [Aurelia Framework](https://github.com/aurelia) *(+11k ⭐️)*
* [bit](https://github.com/teambit/bit) *(+6k ⭐️)*
* [pnpm](https://github.com/pnpm/pnpm) *(+5k ⭐️)*
* [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#contributing-to-e2e-end-to-end-tests) *(+73.5k ⭐️)*
* [Storybook](https://github.com/storybooks/storybook) *(+44k ⭐️)*
* [Gatsby](https://github.com/gatsbyjs/gatsby) *(+40k ⭐️)*
* [Babel.js](https://github.com/babel/babel) *(+35k ⭐️)*
* [Angular CLI](https://github.com/angular/angular-cli) *(+21k ⭐️)*
* [Uppy](https://github.com/transloadit/uppy) *(+21k ⭐️)*
* [Aurelia Framework](https://github.com/aurelia) *(+12k ⭐️)*
* [bit](https://github.com/teambit/bit) *(+9k ⭐️)*
* [ethereum/web3.js](https://github.com/ethereum/web3.js) *(+8k ⭐️)*
* [pnpm](https://github.com/pnpm/pnpm) *(+6k ⭐️)*
* [Mozilla Neutrino](https://github.com/neutrinojs/neutrino) *(+3k ⭐️)*
* [Hyperledger Composer](https://github.com/hyperledger/composer) *(+1.6k ⭐️)*
* [webiny-js](https://github.com/Webiny/webiny-js) *(+1k ⭐️)*
🤓 Don't be shy, you also can be in [the list](https://github.com/verdaccio/website/blob/master/docs/who-is-using.md).
## Sponsorship
If you are a *company/project* and you 😍 Verdaccio and FOSS, your **logo can be here** 😉 if you support our activities. [Donate](https://opencollective.com/verdaccio).
## Open Collective Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/verdaccio#sponsor)]
@@ -232,7 +252,7 @@ Thanks to the following companies to help us to achieve our goals providing free
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
[![contrubitors](https://opencollective.com/verdaccio/contributors.svg?width=890&button=true)](../../graphs/contributors)
[![contributors](https://opencollective.com/verdaccio/contributors.svg?width=890&button=true)](../../graphs/contributors)
### FAQ / Contact / Troubleshoot

View File

@@ -1,30 +1,73 @@
# Security Policy
## Supported Versions
## Supported versions
Use this section to tell people about which versions of your project are
currently being supported with security updates.
The following table describes the versions of this project that are currently supported with security updates:
| Version | Supported |
| ------- | ------------------ |
| 2.x | :x: |
| 3.x | :white_check_mark: |
| 4.x | :white_check_mark: |
| 2.x | :x: |
| 3.x | :white_check_mark: |
| 4.x | :white_check_mark: |
## Reporting a Vulnerability
## Responsible disclosure security policy
At Verdaccio, we consider the security of our systems a top priority. But no matter how much effort we put into system security, there can still be vulnerabilities present. If you've discovered a vulnerability, please follow the guidelines below to report it to our team:
A responsible disclosure policy helps protect users of the project from publicly disclosed security vulnerabilities without a fix by employing a process where vulnerabilities are first triaged in a private manner, and only publicly disclosed after a reasonable time period that allows patching the vulnerability and provides an upgrade path for users.
* Report it either [Snyk Security Team](https://snyk.io/vulnerability-disclosure/) or [npmjs Security Team](https://www.npmjs.com/advisories/report?package=verdaccio), they will be in contact with us in case of confirming the vulnerability.
* E-mail your findings to [verdaccio@pm.me](mailto:verdaccio@pm.me). If the report contains highly sensitive information, please consider encrypting your findings using our [PGP key](https://verdaccio.nyc3.digitaloceanspaces.com/gpg/publickey.verdaccio@pm.me.asc).
When contacting us directly via email, we will do our best efforts to respond in a reasonable time to resolve the issue. When contacting a security program their disclosure policy will provide details on timeframe, processes and paid bounties.
Please follow these rules when testing/reporting vulnerabilities:
* Do not take advantage of the vulnerability you have discovered, for example by downloading more data than is necessary to demonstrate the vulnerability.
* Do not read, modify or delete data that isn't your own.
* We ask that you do not disclose the findings to third parties until it has been resolved.
We kindly ask you to refrain from malicious acts that put our users, the project, or any of the projects team members at risk.
What we promise:
* We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date.
* We will keep you informed during all stages of resolving the problem.
* To show our appreciation for your effort and cooperation during the report, we will list your name and a link to a personal website/social network profile on the page below so that the public can know you've helped keep Verdaccio secure.
## Reporting a security issue
At Verdaccio, we consider the security of our systems a top priority. But no matter how much effort we put into system security, there can still be vulnerabilities present.
If you discover a security vulnerability, please use one of the following means of communications to report it to us:
* Report the security issue to the Node.js Security WG through the [HackerOne program](https://hackerone.com/nodejs-ecosystem) for ecosystem modules on npm, or to [Snyk Security Team](https://snyk.io/vulnerability-disclosure). They will help triage the security issue and work with all involved parties to remediate and release a fix.
Note that time-frame and processes are subject to each programs own policy.
* Report the security issue to the project maintainers directly at verdaccio@pm.me. If the report contains highly sensitive information, please be advised to encrypt your findings using our [PGP key](https://verdaccio.nyc3.digitaloceanspaces.com/gpg/publickey.verdaccio@pm.me.asc) which is also available in this document.
Your efforts to responsibly disclose your findings are sincerely appreciated and will be taken into account to acknowledge your contributions.
## PGP key
The following is this projects PGP key which should be used to encrypt any sensitive information shared on unsecured medium such as e-mails:
```
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v4.5.1
Comment: https://openpgpjs.org
xsBNBFzm3asBCACxnJDv1r6dxiM2e8iqS6B7fxY2I3X1Rc+3m8mhXOwVwRG4
AOrQ417oSzsVLf4iocg+DWrtxzY79odTLJEovVt79rxwqIIl4y96tH+29kLB
ao7eaYZacfstonVkBAmxBLaYv1x7cqWuukm6sBCOxapW1X9BcbR3vOghDziY
/1AwNjupAOPvKNMtghjrdh3w0iMfZS1hw28zjM1oCeezEil+CTjgQDN+69qS
UFG/BInJ7CVn9TvhU85inSwpxVa576fkhvFoNUrGvFvYRWtXRJndbRdBodVj
C9At/Gb2IeNf7xqXH2KloZ1yaVNVSzLX4jqrMWeF+9Z12SjUyL6G9TwDABEB
AAHNIXZlcmRhY2Npb0BwbS5tZSA8dmVyZGFjY2lvQHBtLm1lPsLAdQQQAQgA
HwUCXObdqwYLCQcIAwIEFQgKAgMWAgECGQECGwMCHgEACgkQpSvoGbwFJYhn
2wf+JF+yLQXh1EFMih6lpbx243hvglgOWmcigYVRh5mSfULcdW2pmkPQXqhE
DW73qqwN9G9piiPnGMw7sKoB7XJVuFKyvHOYKtem5UQVRvs2rTxnSc5qFcUJ
0w3Tw/pZ9B3fYAEYti2B/GsSOzaECfBKCFOg15xXGAdwfgff5FsorN1Gb6MG
eCO9c8faSF/+fQUCfokwMDVzxXQFZEMx3q/rHVJ/Fm+XelZ+00c9fdyiuPW5
dM9gATle7lz0iPtxaUDGLW8QZ/7b6O8IJ1kle0tL4AE++bXsVWxNdzhlNohH
Hn09sIdFnG4ySTz4YJjiDd70ZdQjOGEGvutymEIN1xcNq87ATQRc5t2rAQgA
yX2ZhUCtrz7lzK0992yveB+duVF//yo9Pei2ra9Z3GNmA+oWlRH1FTWpAmVH
uDdUchTnxAwaKntabt3Mb1AgEZwrdiG4LuHFbdx2ls93BJ5lXdp7vB6pVf3N
IrhHKyQ/Y5L5kMSj/GjrhO19zmj6mPPEgb3M3ZIZjQUF4pro0pExuAPA9Wxe
awn5+0BUYFs4mZQDtTdiVuz5tWA0fNtt1aBfOPA97tmn18y4b1b0iQIJQpep
BVVnFLeAZOevDcBJFbmQOdAjufWSSgpzX+FZ3rx6RVwwKxUiVQyUuwSQkKh5
RufZ5zE0y7Fe/YlWXbKoj4zNJqYtjPSPngQRWf7UpwARAQABwsBfBBgBCAAJ
BQJc5t2rAhsMAAoJEKUr6Bm8BSWIoYQH+QDw0Z84tZK4N1lh49hYyohs6vNU
9kG69nKLQA5NymPtTxh8YOJhdJL697FkvKI4OGEO2FXUmcJS3CBJ2nBVKMq2
1biDRKC4OhIU2RgFhS6bHy6VOn24EYs77T+zX8YXpz8ulYVln2b0QZCubN0Z
L50tEC8HnuVMVN+/pqITdD3FjzwGZgHdW8qkKgD6qhObHCl8/cW2buCsaIAY
eZWVPgPY1S1U0V608qYNtUCkrmUW5Sl6YLvz7JTvTsaym5mzyFXF3ErAURgI
/v4XaWmRgNGIxbIxsFGuEs+KIKBQDJmtvJCVpBNS5IYnFf5h/LA5cfkwMKJt
wXhyE0b/iDs60ZM=
=QWXs
-----END PGP PUBLIC KEY BLOCK-----
```

View File

@@ -4,6 +4,6 @@ This directory host the default configuration file, but you can find more here:
* [https://verdaccio.org/docs/en/installation](https://verdaccio.org/docs/en/installation)
* [Chat with us](http://chat.verdaccio.org) <- You need a Discord account
* [Follou us on Twitter](https://twitter.com/verdaccio_npm)
* [Follow us on Twitter](https://twitter.com/verdaccio_npm)
Enjoy Verdaccio !

View File

@@ -25,17 +25,6 @@ auth:
# You can set this to -1 to disable registration.
# max_users: 1000
security:
api:
jwt:
sign:
expiresIn: 60d
notBefore: 1
web:
sign:
expiresIn: 7d
notBefore: 1
# a list of other known repositories we can talk to
uplinks:
npmjs:
@@ -65,9 +54,9 @@ packages:
# if package is not available locally, proxy requests to 'npmjs' registry
proxy: npmjs
# You can specify HTTP/1.1 server keep alive timeout in seconds for incomming connections.
# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enought.
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
server:
keepAliveTimeout: 60
@@ -79,4 +68,6 @@ middlewares:
logs:
- { type: stdout, format: pretty, level: http }
#- {type: file, path: verdaccio.log, level: info}
#experiments:
# # support for npm token command
# token: false

View File

@@ -31,17 +31,6 @@ auth:
# You can set this to -1 to disable registration.
# max_users: 1000
security:
api:
jwt:
sign:
expiresIn: 60d
notBefore: 1
web:
sign:
expiresIn: 7d
notBefore: 1
# a list of other known repositories we can talk to
uplinks:
npmjs:
@@ -79,3 +68,6 @@ middlewares:
logs:
- { type: stdout, format: pretty, level: http }
#- {type: file, path: verdaccio.log, level: info}
#experiments:
# # support for npm token command
# token: false

View File

@@ -159,7 +159,7 @@ Resources:
mount -a -t efs defaults
# Create/update the config & password files.
mkdir "$BASE/conf"
[[ -d "$BASE/conf" ]] || mkdir "$BASE/conf"
curl -o "$BASE/conf/htpasswd" "${VerdaccioHtpasswdUrl}"
curl -o "$BASE/conf/config.yaml" "${VerdaccioConfigUrl}"

4
debug/bootstrap.js vendored
View File

@@ -1,4 +1,6 @@
// this file aims to help local debugging with hot transpilation
// it requires BABEL_ENV=registry set as env variable
require('@babel/register')();
require('@babel/register')({
extensions: [".ts", ".js"]
});
require('../src/lib/cli');

View File

@@ -1,38 +0,0 @@
// flow-typed signature: ce23ecafd4a8df99e8eab3d7417dea83
// flow-typed version: <<STUB>>/@material-ui/core/Avatar_v3.1.0/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* '@material-ui/core/Avatar'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module '@material-ui/core/Avatar' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module '@material-ui/core/Avatar/Avatar' {
declare module.exports: any;
}
// Filename aliases
declare module '@material-ui/core/Avatar/Avatar.js' {
declare module.exports: $Exports<'@material-ui/core/Avatar/Avatar'>;
}
declare module '@material-ui/core/Avatar/index' {
declare module.exports: $Exports<'@material-ui/core/Avatar'>;
}
declare module '@material-ui/core/Avatar/index.js' {
declare module.exports: $Exports<'@material-ui/core/Avatar'>;
}

View File

@@ -1,38 +0,0 @@
// flow-typed signature: bc8a4aaaeb1e738c5006d06072a9b064
// flow-typed version: <<STUB>>/@material-ui/core/InputAdornment_v3.1.0/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* '@material-ui/core/InputAdornment'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module '@material-ui/core/InputAdornment' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module '@material-ui/core/InputAdornment/InputAdornment' {
declare module.exports: any;
}
// Filename aliases
declare module '@material-ui/core/InputAdornment/index' {
declare module.exports: $Exports<'@material-ui/core/InputAdornment'>;
}
declare module '@material-ui/core/InputAdornment/index.js' {
declare module.exports: $Exports<'@material-ui/core/InputAdornment'>;
}
declare module '@material-ui/core/InputAdornment/InputAdornment.js' {
declare module.exports: $Exports<'@material-ui/core/InputAdornment/InputAdornment'>;
}

View File

@@ -1,38 +0,0 @@
// flow-typed signature: fd8dc668544eb744d5267a667187804b
// flow-typed version: <<STUB>>/@material-ui/core/MenuItem_v3.1.0/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* '@material-ui/core/MenuItem'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module '@material-ui/core/MenuItem' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module '@material-ui/core/MenuItem/MenuItem' {
declare module.exports: any;
}
// Filename aliases
declare module '@material-ui/core/MenuItem/index' {
declare module.exports: $Exports<'@material-ui/core/MenuItem'>;
}
declare module '@material-ui/core/MenuItem/index.js' {
declare module.exports: $Exports<'@material-ui/core/MenuItem'>;
}
declare module '@material-ui/core/MenuItem/MenuItem.js' {
declare module.exports: $Exports<'@material-ui/core/MenuItem/MenuItem'>;
}

View File

@@ -1,38 +0,0 @@
// flow-typed signature: 1ac90635766a00f883f3d21d79c9f12e
// flow-typed version: <<STUB>>/@material-ui/core/Paper_v3.1.0/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* '@material-ui/core/Paper'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module '@material-ui/core/Paper' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module '@material-ui/core/Paper/Paper' {
declare module.exports: any;
}
// Filename aliases
declare module '@material-ui/core/Paper/index' {
declare module.exports: $Exports<'@material-ui/core/Paper'>;
}
declare module '@material-ui/core/Paper/index.js' {
declare module.exports: $Exports<'@material-ui/core/Paper'>;
}
declare module '@material-ui/core/Paper/Paper.js' {
declare module.exports: $Exports<'@material-ui/core/Paper/Paper'>;
}

View File

@@ -1,38 +0,0 @@
// flow-typed signature: 864619754dd206242d851f1d47ddb63f
// flow-typed version: <<STUB>>/@material-ui/core/TextField_v3.0.1/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* '@material-ui/core/TextField'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module '@material-ui/core/TextField' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module '@material-ui/core/TextField/TextField' {
declare module.exports: any;
}
// Filename aliases
declare module '@material-ui/core/TextField/index' {
declare module.exports: $Exports<'@material-ui/core/TextField'>;
}
declare module '@material-ui/core/TextField/index.js' {
declare module.exports: $Exports<'@material-ui/core/TextField'>;
}
declare module '@material-ui/core/TextField/TextField.js' {
declare module.exports: $Exports<'@material-ui/core/TextField/TextField'>;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,199 +0,0 @@
// flow-typed signature: 12a8262920099086254f18882b49d862
// flow-typed version: <<STUB>>/JSONStream_v1.3.2/flow_v0.64.0
/**
* This is an autogenerated libdef stub for:
*
* 'JSONStream'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'JSONStream' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'JSONStream/bin' {
declare module.exports: any;
}
declare module 'JSONStream/examples/all_docs' {
declare module.exports: any;
}
declare module 'JSONStream/test/bool' {
declare module.exports: any;
}
declare module 'JSONStream/test/browser' {
declare module.exports: any;
}
declare module 'JSONStream/test/destroy_missing' {
declare module.exports: any;
}
declare module 'JSONStream/test/disabled/doubledot1' {
declare module.exports: any;
}
declare module 'JSONStream/test/disabled/doubledot2' {
declare module.exports: any;
}
declare module 'JSONStream/test/empty' {
declare module.exports: any;
}
declare module 'JSONStream/test/error_contents' {
declare module.exports: any;
}
declare module 'JSONStream/test/fn' {
declare module.exports: any;
}
declare module 'JSONStream/test/gen' {
declare module.exports: any;
}
declare module 'JSONStream/test/header_footer' {
declare module.exports: any;
}
declare module 'JSONStream/test/issues' {
declare module.exports: any;
}
declare module 'JSONStream/test/keys' {
declare module.exports: any;
}
declare module 'JSONStream/test/map' {
declare module.exports: any;
}
declare module 'JSONStream/test/multiple_objects_error' {
declare module.exports: any;
}
declare module 'JSONStream/test/multiple_objects' {
declare module.exports: any;
}
declare module 'JSONStream/test/null' {
declare module.exports: any;
}
declare module 'JSONStream/test/parsejson' {
declare module.exports: any;
}
declare module 'JSONStream/test/stringify_object' {
declare module.exports: any;
}
declare module 'JSONStream/test/stringify' {
declare module.exports: any;
}
declare module 'JSONStream/test/test' {
declare module.exports: any;
}
declare module 'JSONStream/test/test2' {
declare module.exports: any;
}
declare module 'JSONStream/test/two-ways' {
declare module.exports: any;
}
// Filename aliases
declare module 'JSONStream/bin.js' {
declare module.exports: $Exports<'JSONStream/bin'>;
}
declare module 'JSONStream/examples/all_docs.js' {
declare module.exports: $Exports<'JSONStream/examples/all_docs'>;
}
declare module 'JSONStream/index' {
declare module.exports: $Exports<'JSONStream'>;
}
declare module 'JSONStream/index.js' {
declare module.exports: $Exports<'JSONStream'>;
}
declare module 'JSONStream/test/bool.js' {
declare module.exports: $Exports<'JSONStream/test/bool'>;
}
declare module 'JSONStream/test/browser.js' {
declare module.exports: $Exports<'JSONStream/test/browser'>;
}
declare module 'JSONStream/test/destroy_missing.js' {
declare module.exports: $Exports<'JSONStream/test/destroy_missing'>;
}
declare module 'JSONStream/test/disabled/doubledot1.js' {
declare module.exports: $Exports<'JSONStream/test/disabled/doubledot1'>;
}
declare module 'JSONStream/test/disabled/doubledot2.js' {
declare module.exports: $Exports<'JSONStream/test/disabled/doubledot2'>;
}
declare module 'JSONStream/test/empty.js' {
declare module.exports: $Exports<'JSONStream/test/empty'>;
}
declare module 'JSONStream/test/error_contents.js' {
declare module.exports: $Exports<'JSONStream/test/error_contents'>;
}
declare module 'JSONStream/test/fn.js' {
declare module.exports: $Exports<'JSONStream/test/fn'>;
}
declare module 'JSONStream/test/gen.js' {
declare module.exports: $Exports<'JSONStream/test/gen'>;
}
declare module 'JSONStream/test/header_footer.js' {
declare module.exports: $Exports<'JSONStream/test/header_footer'>;
}
declare module 'JSONStream/test/issues.js' {
declare module.exports: $Exports<'JSONStream/test/issues'>;
}
declare module 'JSONStream/test/keys.js' {
declare module.exports: $Exports<'JSONStream/test/keys'>;
}
declare module 'JSONStream/test/map.js' {
declare module.exports: $Exports<'JSONStream/test/map'>;
}
declare module 'JSONStream/test/multiple_objects_error.js' {
declare module.exports: $Exports<'JSONStream/test/multiple_objects_error'>;
}
declare module 'JSONStream/test/multiple_objects.js' {
declare module.exports: $Exports<'JSONStream/test/multiple_objects'>;
}
declare module 'JSONStream/test/null.js' {
declare module.exports: $Exports<'JSONStream/test/null'>;
}
declare module 'JSONStream/test/parsejson.js' {
declare module.exports: $Exports<'JSONStream/test/parsejson'>;
}
declare module 'JSONStream/test/stringify_object.js' {
declare module.exports: $Exports<'JSONStream/test/stringify_object'>;
}
declare module 'JSONStream/test/stringify.js' {
declare module.exports: $Exports<'JSONStream/test/stringify'>;
}
declare module 'JSONStream/test/test.js' {
declare module.exports: $Exports<'JSONStream/test/test'>;
}
declare module 'JSONStream/test/test2.js' {
declare module.exports: $Exports<'JSONStream/test/test2'>;
}
declare module 'JSONStream/test/two-ways.js' {
declare module.exports: $Exports<'JSONStream/test/two-ways'>;
}

View File

@@ -1,67 +0,0 @@
// flow-typed signature: b7109b7e394ff03ed211118d5af4cff8
// flow-typed version: <<STUB>>/asciidoctor.js_v1.5.6/flow_v0.69.0
/**
* This is an autogenerated libdef stub for:
*
* 'asciidoctor.js'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'asciidoctor.js' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'asciidoctor.js/dist/asciidoctor' {
declare module.exports: any;
}
declare module 'asciidoctor.js/dist/asciidoctor.min' {
declare module.exports: any;
}
declare module 'asciidoctor.js/dist/browser/asciidoctor' {
declare module.exports: any;
}
declare module 'asciidoctor.js/dist/nashorn/asciidoctor' {
declare module.exports: any;
}
declare module 'asciidoctor.js/dist/node/asciidoctor' {
declare module.exports: any;
}
declare module 'asciidoctor.js/dist/umd/asciidoctor' {
declare module.exports: any;
}
// Filename aliases
declare module 'asciidoctor.js/dist/asciidoctor.js' {
declare module.exports: $Exports<'asciidoctor.js/dist/asciidoctor'>;
}
declare module 'asciidoctor.js/dist/asciidoctor.min.js' {
declare module.exports: $Exports<'asciidoctor.js/dist/asciidoctor.min'>;
}
declare module 'asciidoctor.js/dist/browser/asciidoctor.js' {
declare module.exports: $Exports<'asciidoctor.js/dist/browser/asciidoctor'>;
}
declare module 'asciidoctor.js/dist/nashorn/asciidoctor.js' {
declare module.exports: $Exports<'asciidoctor.js/dist/nashorn/asciidoctor'>;
}
declare module 'asciidoctor.js/dist/node/asciidoctor.js' {
declare module.exports: $Exports<'asciidoctor.js/dist/node/asciidoctor'>;
}
declare module 'asciidoctor.js/dist/umd/asciidoctor.js' {
declare module.exports: $Exports<'asciidoctor.js/dist/umd/asciidoctor'>;
}

View File

@@ -1,913 +0,0 @@
// flow-typed signature: 9f4aa70155d93ad082ea38137cded473
// flow-typed version: <<STUB>>/async_v2.6.0/flow_v0.64.0
/**
* This is an autogenerated libdef stub for:
*
* 'async'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'async' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'async/all' {
declare module.exports: any;
}
declare module 'async/allLimit' {
declare module.exports: any;
}
declare module 'async/allSeries' {
declare module.exports: any;
}
declare module 'async/any' {
declare module.exports: any;
}
declare module 'async/anyLimit' {
declare module.exports: any;
}
declare module 'async/anySeries' {
declare module.exports: any;
}
declare module 'async/apply' {
declare module.exports: any;
}
declare module 'async/applyEach' {
declare module.exports: any;
}
declare module 'async/applyEachSeries' {
declare module.exports: any;
}
declare module 'async/asyncify' {
declare module.exports: any;
}
declare module 'async/auto' {
declare module.exports: any;
}
declare module 'async/autoInject' {
declare module.exports: any;
}
declare module 'async/cargo' {
declare module.exports: any;
}
declare module 'async/compose' {
declare module.exports: any;
}
declare module 'async/concat' {
declare module.exports: any;
}
declare module 'async/concatLimit' {
declare module.exports: any;
}
declare module 'async/concatSeries' {
declare module.exports: any;
}
declare module 'async/constant' {
declare module.exports: any;
}
declare module 'async/detect' {
declare module.exports: any;
}
declare module 'async/detectLimit' {
declare module.exports: any;
}
declare module 'async/detectSeries' {
declare module.exports: any;
}
declare module 'async/dir' {
declare module.exports: any;
}
declare module 'async/dist/async' {
declare module.exports: any;
}
declare module 'async/dist/async.min' {
declare module.exports: any;
}
declare module 'async/doDuring' {
declare module.exports: any;
}
declare module 'async/doUntil' {
declare module.exports: any;
}
declare module 'async/doWhilst' {
declare module.exports: any;
}
declare module 'async/during' {
declare module.exports: any;
}
declare module 'async/each' {
declare module.exports: any;
}
declare module 'async/eachLimit' {
declare module.exports: any;
}
declare module 'async/eachOf' {
declare module.exports: any;
}
declare module 'async/eachOfLimit' {
declare module.exports: any;
}
declare module 'async/eachOfSeries' {
declare module.exports: any;
}
declare module 'async/eachSeries' {
declare module.exports: any;
}
declare module 'async/ensureAsync' {
declare module.exports: any;
}
declare module 'async/every' {
declare module.exports: any;
}
declare module 'async/everyLimit' {
declare module.exports: any;
}
declare module 'async/everySeries' {
declare module.exports: any;
}
declare module 'async/filter' {
declare module.exports: any;
}
declare module 'async/filterLimit' {
declare module.exports: any;
}
declare module 'async/filterSeries' {
declare module.exports: any;
}
declare module 'async/find' {
declare module.exports: any;
}
declare module 'async/findLimit' {
declare module.exports: any;
}
declare module 'async/findSeries' {
declare module.exports: any;
}
declare module 'async/foldl' {
declare module.exports: any;
}
declare module 'async/foldr' {
declare module.exports: any;
}
declare module 'async/forEach' {
declare module.exports: any;
}
declare module 'async/forEachLimit' {
declare module.exports: any;
}
declare module 'async/forEachOf' {
declare module.exports: any;
}
declare module 'async/forEachOfLimit' {
declare module.exports: any;
}
declare module 'async/forEachOfSeries' {
declare module.exports: any;
}
declare module 'async/forEachSeries' {
declare module.exports: any;
}
declare module 'async/forever' {
declare module.exports: any;
}
declare module 'async/groupBy' {
declare module.exports: any;
}
declare module 'async/groupByLimit' {
declare module.exports: any;
}
declare module 'async/groupBySeries' {
declare module.exports: any;
}
declare module 'async/inject' {
declare module.exports: any;
}
declare module 'async/internal/applyEach' {
declare module.exports: any;
}
declare module 'async/internal/breakLoop' {
declare module.exports: any;
}
declare module 'async/internal/consoleFunc' {
declare module.exports: any;
}
declare module 'async/internal/createTester' {
declare module.exports: any;
}
declare module 'async/internal/doLimit' {
declare module.exports: any;
}
declare module 'async/internal/doParallel' {
declare module.exports: any;
}
declare module 'async/internal/doParallelLimit' {
declare module.exports: any;
}
declare module 'async/internal/DoublyLinkedList' {
declare module.exports: any;
}
declare module 'async/internal/eachOfLimit' {
declare module.exports: any;
}
declare module 'async/internal/filter' {
declare module.exports: any;
}
declare module 'async/internal/findGetResult' {
declare module.exports: any;
}
declare module 'async/internal/getIterator' {
declare module.exports: any;
}
declare module 'async/internal/initialParams' {
declare module.exports: any;
}
declare module 'async/internal/iterator' {
declare module.exports: any;
}
declare module 'async/internal/map' {
declare module.exports: any;
}
declare module 'async/internal/notId' {
declare module.exports: any;
}
declare module 'async/internal/once' {
declare module.exports: any;
}
declare module 'async/internal/onlyOnce' {
declare module.exports: any;
}
declare module 'async/internal/parallel' {
declare module.exports: any;
}
declare module 'async/internal/queue' {
declare module.exports: any;
}
declare module 'async/internal/reject' {
declare module.exports: any;
}
declare module 'async/internal/setImmediate' {
declare module.exports: any;
}
declare module 'async/internal/slice' {
declare module.exports: any;
}
declare module 'async/internal/withoutIndex' {
declare module.exports: any;
}
declare module 'async/internal/wrapAsync' {
declare module.exports: any;
}
declare module 'async/log' {
declare module.exports: any;
}
declare module 'async/map' {
declare module.exports: any;
}
declare module 'async/mapLimit' {
declare module.exports: any;
}
declare module 'async/mapSeries' {
declare module.exports: any;
}
declare module 'async/mapValues' {
declare module.exports: any;
}
declare module 'async/mapValuesLimit' {
declare module.exports: any;
}
declare module 'async/mapValuesSeries' {
declare module.exports: any;
}
declare module 'async/memoize' {
declare module.exports: any;
}
declare module 'async/nextTick' {
declare module.exports: any;
}
declare module 'async/parallel' {
declare module.exports: any;
}
declare module 'async/parallelLimit' {
declare module.exports: any;
}
declare module 'async/priorityQueue' {
declare module.exports: any;
}
declare module 'async/queue' {
declare module.exports: any;
}
declare module 'async/race' {
declare module.exports: any;
}
declare module 'async/reduce' {
declare module.exports: any;
}
declare module 'async/reduceRight' {
declare module.exports: any;
}
declare module 'async/reflect' {
declare module.exports: any;
}
declare module 'async/reflectAll' {
declare module.exports: any;
}
declare module 'async/reject' {
declare module.exports: any;
}
declare module 'async/rejectLimit' {
declare module.exports: any;
}
declare module 'async/rejectSeries' {
declare module.exports: any;
}
declare module 'async/retry' {
declare module.exports: any;
}
declare module 'async/retryable' {
declare module.exports: any;
}
declare module 'async/select' {
declare module.exports: any;
}
declare module 'async/selectLimit' {
declare module.exports: any;
}
declare module 'async/selectSeries' {
declare module.exports: any;
}
declare module 'async/seq' {
declare module.exports: any;
}
declare module 'async/series' {
declare module.exports: any;
}
declare module 'async/setImmediate' {
declare module.exports: any;
}
declare module 'async/some' {
declare module.exports: any;
}
declare module 'async/someLimit' {
declare module.exports: any;
}
declare module 'async/someSeries' {
declare module.exports: any;
}
declare module 'async/sortBy' {
declare module.exports: any;
}
declare module 'async/timeout' {
declare module.exports: any;
}
declare module 'async/times' {
declare module.exports: any;
}
declare module 'async/timesLimit' {
declare module.exports: any;
}
declare module 'async/timesSeries' {
declare module.exports: any;
}
declare module 'async/transform' {
declare module.exports: any;
}
declare module 'async/tryEach' {
declare module.exports: any;
}
declare module 'async/unmemoize' {
declare module.exports: any;
}
declare module 'async/until' {
declare module.exports: any;
}
declare module 'async/waterfall' {
declare module.exports: any;
}
declare module 'async/whilst' {
declare module.exports: any;
}
declare module 'async/wrapSync' {
declare module.exports: any;
}
// Filename aliases
declare module 'async/all.js' {
declare module.exports: $Exports<'async/all'>;
}
declare module 'async/allLimit.js' {
declare module.exports: $Exports<'async/allLimit'>;
}
declare module 'async/allSeries.js' {
declare module.exports: $Exports<'async/allSeries'>;
}
declare module 'async/any.js' {
declare module.exports: $Exports<'async/any'>;
}
declare module 'async/anyLimit.js' {
declare module.exports: $Exports<'async/anyLimit'>;
}
declare module 'async/anySeries.js' {
declare module.exports: $Exports<'async/anySeries'>;
}
declare module 'async/apply.js' {
declare module.exports: $Exports<'async/apply'>;
}
declare module 'async/applyEach.js' {
declare module.exports: $Exports<'async/applyEach'>;
}
declare module 'async/applyEachSeries.js' {
declare module.exports: $Exports<'async/applyEachSeries'>;
}
declare module 'async/asyncify.js' {
declare module.exports: $Exports<'async/asyncify'>;
}
declare module 'async/auto.js' {
declare module.exports: $Exports<'async/auto'>;
}
declare module 'async/autoInject.js' {
declare module.exports: $Exports<'async/autoInject'>;
}
declare module 'async/cargo.js' {
declare module.exports: $Exports<'async/cargo'>;
}
declare module 'async/compose.js' {
declare module.exports: $Exports<'async/compose'>;
}
declare module 'async/concat.js' {
declare module.exports: $Exports<'async/concat'>;
}
declare module 'async/concatLimit.js' {
declare module.exports: $Exports<'async/concatLimit'>;
}
declare module 'async/concatSeries.js' {
declare module.exports: $Exports<'async/concatSeries'>;
}
declare module 'async/constant.js' {
declare module.exports: $Exports<'async/constant'>;
}
declare module 'async/detect.js' {
declare module.exports: $Exports<'async/detect'>;
}
declare module 'async/detectLimit.js' {
declare module.exports: $Exports<'async/detectLimit'>;
}
declare module 'async/detectSeries.js' {
declare module.exports: $Exports<'async/detectSeries'>;
}
declare module 'async/dir.js' {
declare module.exports: $Exports<'async/dir'>;
}
declare module 'async/dist/async.js' {
declare module.exports: $Exports<'async/dist/async'>;
}
declare module 'async/dist/async.min.js' {
declare module.exports: $Exports<'async/dist/async.min'>;
}
declare module 'async/doDuring.js' {
declare module.exports: $Exports<'async/doDuring'>;
}
declare module 'async/doUntil.js' {
declare module.exports: $Exports<'async/doUntil'>;
}
declare module 'async/doWhilst.js' {
declare module.exports: $Exports<'async/doWhilst'>;
}
declare module 'async/during.js' {
declare module.exports: $Exports<'async/during'>;
}
declare module 'async/each.js' {
declare module.exports: $Exports<'async/each'>;
}
declare module 'async/eachLimit.js' {
declare module.exports: $Exports<'async/eachLimit'>;
}
declare module 'async/eachOf.js' {
declare module.exports: $Exports<'async/eachOf'>;
}
declare module 'async/eachOfLimit.js' {
declare module.exports: $Exports<'async/eachOfLimit'>;
}
declare module 'async/eachOfSeries.js' {
declare module.exports: $Exports<'async/eachOfSeries'>;
}
declare module 'async/eachSeries.js' {
declare module.exports: $Exports<'async/eachSeries'>;
}
declare module 'async/ensureAsync.js' {
declare module.exports: $Exports<'async/ensureAsync'>;
}
declare module 'async/every.js' {
declare module.exports: $Exports<'async/every'>;
}
declare module 'async/everyLimit.js' {
declare module.exports: $Exports<'async/everyLimit'>;
}
declare module 'async/everySeries.js' {
declare module.exports: $Exports<'async/everySeries'>;
}
declare module 'async/filter.js' {
declare module.exports: $Exports<'async/filter'>;
}
declare module 'async/filterLimit.js' {
declare module.exports: $Exports<'async/filterLimit'>;
}
declare module 'async/filterSeries.js' {
declare module.exports: $Exports<'async/filterSeries'>;
}
declare module 'async/find.js' {
declare module.exports: $Exports<'async/find'>;
}
declare module 'async/findLimit.js' {
declare module.exports: $Exports<'async/findLimit'>;
}
declare module 'async/findSeries.js' {
declare module.exports: $Exports<'async/findSeries'>;
}
declare module 'async/foldl.js' {
declare module.exports: $Exports<'async/foldl'>;
}
declare module 'async/foldr.js' {
declare module.exports: $Exports<'async/foldr'>;
}
declare module 'async/forEach.js' {
declare module.exports: $Exports<'async/forEach'>;
}
declare module 'async/forEachLimit.js' {
declare module.exports: $Exports<'async/forEachLimit'>;
}
declare module 'async/forEachOf.js' {
declare module.exports: $Exports<'async/forEachOf'>;
}
declare module 'async/forEachOfLimit.js' {
declare module.exports: $Exports<'async/forEachOfLimit'>;
}
declare module 'async/forEachOfSeries.js' {
declare module.exports: $Exports<'async/forEachOfSeries'>;
}
declare module 'async/forEachSeries.js' {
declare module.exports: $Exports<'async/forEachSeries'>;
}
declare module 'async/forever.js' {
declare module.exports: $Exports<'async/forever'>;
}
declare module 'async/groupBy.js' {
declare module.exports: $Exports<'async/groupBy'>;
}
declare module 'async/groupByLimit.js' {
declare module.exports: $Exports<'async/groupByLimit'>;
}
declare module 'async/groupBySeries.js' {
declare module.exports: $Exports<'async/groupBySeries'>;
}
declare module 'async/index' {
declare module.exports: $Exports<'async'>;
}
declare module 'async/index.js' {
declare module.exports: $Exports<'async'>;
}
declare module 'async/inject.js' {
declare module.exports: $Exports<'async/inject'>;
}
declare module 'async/internal/applyEach.js' {
declare module.exports: $Exports<'async/internal/applyEach'>;
}
declare module 'async/internal/breakLoop.js' {
declare module.exports: $Exports<'async/internal/breakLoop'>;
}
declare module 'async/internal/consoleFunc.js' {
declare module.exports: $Exports<'async/internal/consoleFunc'>;
}
declare module 'async/internal/createTester.js' {
declare module.exports: $Exports<'async/internal/createTester'>;
}
declare module 'async/internal/doLimit.js' {
declare module.exports: $Exports<'async/internal/doLimit'>;
}
declare module 'async/internal/doParallel.js' {
declare module.exports: $Exports<'async/internal/doParallel'>;
}
declare module 'async/internal/doParallelLimit.js' {
declare module.exports: $Exports<'async/internal/doParallelLimit'>;
}
declare module 'async/internal/DoublyLinkedList.js' {
declare module.exports: $Exports<'async/internal/DoublyLinkedList'>;
}
declare module 'async/internal/eachOfLimit.js' {
declare module.exports: $Exports<'async/internal/eachOfLimit'>;
}
declare module 'async/internal/filter.js' {
declare module.exports: $Exports<'async/internal/filter'>;
}
declare module 'async/internal/findGetResult.js' {
declare module.exports: $Exports<'async/internal/findGetResult'>;
}
declare module 'async/internal/getIterator.js' {
declare module.exports: $Exports<'async/internal/getIterator'>;
}
declare module 'async/internal/initialParams.js' {
declare module.exports: $Exports<'async/internal/initialParams'>;
}
declare module 'async/internal/iterator.js' {
declare module.exports: $Exports<'async/internal/iterator'>;
}
declare module 'async/internal/map.js' {
declare module.exports: $Exports<'async/internal/map'>;
}
declare module 'async/internal/notId.js' {
declare module.exports: $Exports<'async/internal/notId'>;
}
declare module 'async/internal/once.js' {
declare module.exports: $Exports<'async/internal/once'>;
}
declare module 'async/internal/onlyOnce.js' {
declare module.exports: $Exports<'async/internal/onlyOnce'>;
}
declare module 'async/internal/parallel.js' {
declare module.exports: $Exports<'async/internal/parallel'>;
}
declare module 'async/internal/queue.js' {
declare module.exports: $Exports<'async/internal/queue'>;
}
declare module 'async/internal/reject.js' {
declare module.exports: $Exports<'async/internal/reject'>;
}
declare module 'async/internal/setImmediate.js' {
declare module.exports: $Exports<'async/internal/setImmediate'>;
}
declare module 'async/internal/slice.js' {
declare module.exports: $Exports<'async/internal/slice'>;
}
declare module 'async/internal/withoutIndex.js' {
declare module.exports: $Exports<'async/internal/withoutIndex'>;
}
declare module 'async/internal/wrapAsync.js' {
declare module.exports: $Exports<'async/internal/wrapAsync'>;
}
declare module 'async/log.js' {
declare module.exports: $Exports<'async/log'>;
}
declare module 'async/map.js' {
declare module.exports: $Exports<'async/map'>;
}
declare module 'async/mapLimit.js' {
declare module.exports: $Exports<'async/mapLimit'>;
}
declare module 'async/mapSeries.js' {
declare module.exports: $Exports<'async/mapSeries'>;
}
declare module 'async/mapValues.js' {
declare module.exports: $Exports<'async/mapValues'>;
}
declare module 'async/mapValuesLimit.js' {
declare module.exports: $Exports<'async/mapValuesLimit'>;
}
declare module 'async/mapValuesSeries.js' {
declare module.exports: $Exports<'async/mapValuesSeries'>;
}
declare module 'async/memoize.js' {
declare module.exports: $Exports<'async/memoize'>;
}
declare module 'async/nextTick.js' {
declare module.exports: $Exports<'async/nextTick'>;
}
declare module 'async/parallel.js' {
declare module.exports: $Exports<'async/parallel'>;
}
declare module 'async/parallelLimit.js' {
declare module.exports: $Exports<'async/parallelLimit'>;
}
declare module 'async/priorityQueue.js' {
declare module.exports: $Exports<'async/priorityQueue'>;
}
declare module 'async/queue.js' {
declare module.exports: $Exports<'async/queue'>;
}
declare module 'async/race.js' {
declare module.exports: $Exports<'async/race'>;
}
declare module 'async/reduce.js' {
declare module.exports: $Exports<'async/reduce'>;
}
declare module 'async/reduceRight.js' {
declare module.exports: $Exports<'async/reduceRight'>;
}
declare module 'async/reflect.js' {
declare module.exports: $Exports<'async/reflect'>;
}
declare module 'async/reflectAll.js' {
declare module.exports: $Exports<'async/reflectAll'>;
}
declare module 'async/reject.js' {
declare module.exports: $Exports<'async/reject'>;
}
declare module 'async/rejectLimit.js' {
declare module.exports: $Exports<'async/rejectLimit'>;
}
declare module 'async/rejectSeries.js' {
declare module.exports: $Exports<'async/rejectSeries'>;
}
declare module 'async/retry.js' {
declare module.exports: $Exports<'async/retry'>;
}
declare module 'async/retryable.js' {
declare module.exports: $Exports<'async/retryable'>;
}
declare module 'async/select.js' {
declare module.exports: $Exports<'async/select'>;
}
declare module 'async/selectLimit.js' {
declare module.exports: $Exports<'async/selectLimit'>;
}
declare module 'async/selectSeries.js' {
declare module.exports: $Exports<'async/selectSeries'>;
}
declare module 'async/seq.js' {
declare module.exports: $Exports<'async/seq'>;
}
declare module 'async/series.js' {
declare module.exports: $Exports<'async/series'>;
}
declare module 'async/setImmediate.js' {
declare module.exports: $Exports<'async/setImmediate'>;
}
declare module 'async/some.js' {
declare module.exports: $Exports<'async/some'>;
}
declare module 'async/someLimit.js' {
declare module.exports: $Exports<'async/someLimit'>;
}
declare module 'async/someSeries.js' {
declare module.exports: $Exports<'async/someSeries'>;
}
declare module 'async/sortBy.js' {
declare module.exports: $Exports<'async/sortBy'>;
}
declare module 'async/timeout.js' {
declare module.exports: $Exports<'async/timeout'>;
}
declare module 'async/times.js' {
declare module.exports: $Exports<'async/times'>;
}
declare module 'async/timesLimit.js' {
declare module.exports: $Exports<'async/timesLimit'>;
}
declare module 'async/timesSeries.js' {
declare module.exports: $Exports<'async/timesSeries'>;
}
declare module 'async/transform.js' {
declare module.exports: $Exports<'async/transform'>;
}
declare module 'async/tryEach.js' {
declare module.exports: $Exports<'async/tryEach'>;
}
declare module 'async/unmemoize.js' {
declare module.exports: $Exports<'async/unmemoize'>;
}
declare module 'async/until.js' {
declare module.exports: $Exports<'async/until'>;
}
declare module 'async/waterfall.js' {
declare module.exports: $Exports<'async/waterfall'>;
}
declare module 'async/whilst.js' {
declare module.exports: $Exports<'async/whilst'>;
}
declare module 'async/wrapSync.js' {
declare module.exports: $Exports<'async/wrapSync'>;
}

View File

@@ -1,33 +0,0 @@
// flow-typed signature: f4ce515b9395f4f0279d388b18ef59b5
// flow-typed version: <<STUB>>/autosuggest-highlight/match_v3.1.1/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* 'autosuggest-highlight/match'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'autosuggest-highlight/match' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'autosuggest-highlight/match/index' {
declare module.exports: $Exports<'autosuggest-highlight/match'>;
}
declare module 'autosuggest-highlight/match/index.js' {
declare module.exports: $Exports<'autosuggest-highlight/match'>;
}

View File

@@ -1,33 +0,0 @@
// flow-typed signature: 7df3e3914baffd57187e87617a708990
// flow-typed version: <<STUB>>/autosuggest-highlight/parse_v3.1.1/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* 'autosuggest-highlight/parse'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'autosuggest-highlight/parse' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'autosuggest-highlight/parse/index' {
declare module.exports: $Exports<'autosuggest-highlight/parse'>;
}
declare module 'autosuggest-highlight/parse/index.js' {
declare module.exports: $Exports<'autosuggest-highlight/parse'>;
}

View File

@@ -1,46 +0,0 @@
// flow-typed signature: bac0ee66e0653772d037dc47b51a5e1f
// flow-typed version: da30fe6876/body-parser_v1.x.x/flow_>=v0.25.x
import type { Middleware, $Request, $Response } from "express";
declare type bodyParser$Options = {
inflate?: boolean,
limit?: number | string,
type?: string | string[] | ((req: $Request) => any),
verify?: (
req: $Request,
res: $Response,
buf: Buffer,
encoding: string
) => void
};
declare type bodyParser$OptionsText = bodyParser$Options & {
reviver?: (key: string, value: any) => any,
strict?: boolean
};
declare type bodyParser$OptionsJson = bodyParser$Options & {
reviver?: (key: string, value: any) => any,
strict?: boolean
};
declare type bodyParser$OptionsUrlencoded = bodyParser$Options & {
extended?: boolean,
parameterLimit?: number
};
declare module "body-parser" {
declare type Options = bodyParser$Options;
declare type OptionsText = bodyParser$OptionsText;
declare type OptionsJson = bodyParser$OptionsJson;
declare type OptionsUrlencoded = bodyParser$OptionsUrlencoded;
declare function json(options?: OptionsJson): Middleware;
declare function raw(options?: Options): Middleware;
declare function text(options?: OptionsText): Middleware;
declare function urlencoded(options?: OptionsUrlencoded): Middleware;
}

View File

@@ -1,156 +0,0 @@
// flow-typed signature: b3827b7e37fa457f58d7a6656d830369
// flow-typed version: da30fe6876/bunyan_v1.x.x/flow_>=v0.25.x
declare module "bunyan" {
declare var TRACE: 10;
declare var DEBUG: 20;
declare var INFO: 30;
declare var WARN: 40;
declare var ERROR: 50;
declare var FATAL: 60;
declare type BunyanLogLevels =
| 60 // fatal
| 50 // error
| 40 // warn
| 30 // info
| 20 // debug
| 10; // info
declare type BunyanRecord = {
v: number,
level: BunyanLogLevels,
name: string,
hostname: string,
pid: string,
time: Date,
msg: string,
src: string,
err?: {
message: string,
name: string,
code: any,
signal: any,
stack: string
},
[key: string]: any
};
declare type Writable = {
write(rec: BunyanRecord): void
};
declare class Logger extends events$EventEmitter {
constructor(options: LoggerOptions): any;
addStream(stream: Stream): void;
addSerializers(serializers: Serializers): void;
child(opts?: LoggerOptions, simple?: boolean): Logger;
reopenFileStreams(): void;
level(): string | number;
level(value: number | string): void;
levels(name: number | string, value: number | string): void;
trace(...params: Array<void>): boolean;
trace(error: Error, format?: any, ...params: Array<any>): void;
trace(buffer: Buffer, format?: any, ...params: Array<any>): void;
trace(obj: Object, format?: any, ...params: Array<any>): void;
trace(format: string, ...params: Array<any>): void;
debug(...params: Array<void>): boolean;
debug(error: Error, format?: any, ...params: Array<any>): void;
debug(buffer: Buffer, format?: any, ...params: Array<any>): void;
debug(obj: Object, format?: any, ...params: Array<any>): void;
debug(format: string, ...params: Array<any>): void;
info(...params: Array<void>): boolean;
info(error: Error, format?: any, ...params: Array<any>): void;
info(buffer: Buffer, format?: any, ...params: Array<any>): void;
info(obj: Object, format?: any, ...params: Array<any>): void;
info(format: string, ...params: Array<any>): void;
warn(...params: Array<void>): boolean;
warn(error: Error, format?: any, ...params: Array<any>): void;
warn(buffer: Buffer, format?: any, ...params: Array<any>): void;
warn(obj: Object, format?: any, ...params: Array<any>): void;
warn(format: string, ...params: Array<any>): void;
error(...params: Array<void>): boolean;
error(error: Error, format?: any, ...params: Array<any>): void;
error(buffer: Buffer, format?: any, ...params: Array<any>): void;
error(obj: Object, format?: any, ...params: Array<any>): void;
error(format: string, ...params: Array<any>): void;
fatal(...params: Array<void>): boolean;
fatal(error: Error, format?: any, ...params: Array<any>): void;
fatal(buffer: Buffer, format?: any, ...params: Array<any>): void;
fatal(obj: Object, format?: any, ...params: Array<any>): void;
fatal(format: string, ...params: Array<any>): void;
static stdSerializers: {
req: (
req: http$ClientRequest
) => {
method: string,
url: string,
headers: mixed,
remoteAddress: string,
remotePort: number
},
res: (
res: http$IncomingMessage
) => { statusCode: number, header: string },
err: (
err: Error
) => {
message: string,
name: string,
stack: string,
code: string,
signal: string
}
};
}
declare interface LoggerOptions {
streams?: Array<Stream>;
level?: BunyanLogLevels | string;
stream?: stream$Writable;
serializers?: Serializers;
src?: boolean;
}
declare type Serializers = {
[key: string]: (input: any) => mixed
};
declare type Stream = {
type?: string,
level?: number | string,
path?: string,
stream?: stream$Writable | tty$WriteStream | Stream | Writable,
closeOnExit?: boolean,
period?: string,
count?: number
};
declare var stdSerializers: Serializers;
declare function resolveLevel(value: number | string): number;
declare function createLogger(
options: LoggerOptions & { name: string }
): Logger;
declare class RingBuffer extends events$EventEmitter {
constructor(options: RingBufferOptions): any;
writable: boolean;
records: Array<any>;
write(record: BunyanRecord): void;
end(record?: any): void;
destroy(): void;
destroySoon(): void;
}
declare interface RingBufferOptions {
limit: number;
}
declare function safeCycles(): (key: string, value: any) => any;
declare class ConsoleRawStream {
write(rec: BunyanRecord): void;
}
declare var levelFromName: {
trace: typeof TRACE,
debug: typeof DEBUG,
info: typeof INFO,
warn: typeof WARN,
error: typeof ERROR,
fatal: typeof FATAL
};
declare var nameFromLevel: {
[key: BunyanLogLevels]: string
};
declare var VERSION: string;
declare var LOG_VERSION: string;
}

View File

@@ -1,281 +0,0 @@
// flow-typed signature: 9a1fb3feac221b50aab621209bf8ca9c
// flow-typed version: 94e9f7e0a4/commander_v2.x.x/flow_>=v0.28.x
declare module "commander" {
declare class Command extends events$EventEmitter {
/**
* Initialize a new `Command`.
*
* @param {String} name
* @api public
*/
constructor(name?: string): Command;
/**
* Add command `name`.
*
* The `.action()` callback is invoked when the
* command `name` is specified via __ARGV__,
* and the remaining arguments are applied to the
* function for access.
*
* When the `name` is "*" an un-matched command
* will be passed as the first arg, followed by
* the rest of __ARGV__ remaining.
*
* Examples:
*
* program
* .version('0.0.1')
* .option('-C, --chdir <path>', 'change the working directory')
* .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
* .option('-T, --no-tests', 'ignore test hook')
*
* program
* .command('setup')
* .description('run remote setup commands')
* .action(function(){
* console.log('setup');
* });
*
* program
* .command('exec <cmd>')
* .description('run the given remote command')
* .action(function(cmd){
* console.log('exec "%s"', cmd);
* });
*
* program
* .command('*')
* .description('deploy the given env')
* .action(function(env){
* console.log('deploying "%s"', env);
* });
*
* program.parse(process.argv);
*
* @param {String} name
* @param {String} [desc]
* @param {Mixed} [opts]
* @return {Command} the new command
* @api public
*/
command(
name: string,
desc?: string,
opts?: { isDefault: boolean, noHelp: boolean }
): Command;
/**
* Parse expected `args`.
*
* For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
*
* @param {Array} args
* @return {Command} for chaining
* @api public
*/
parseExpectedArgs(args: Array<string>): this;
/**
* Register callback `fn` for the command.
*
* Examples:
*
* program
* .command('help')
* .description('display verbose help')
* .action(function(){
* // output help here
* });
*
* @param {Function} fn
* @return {Command} for chaining
* @api public
*/
action(fn: (...args: Array<any>) => mixed): this;
/**
* Define option with `flags`, `description` and optional
* coercion `fn`.
*
* The `flags` string should contain both the short and long flags,
* separated by comma, a pipe or space. The following are all valid
* all will output this way when `--help` is used.
*
* "-p, --pepper"
* "-p|--pepper"
* "-p --pepper"
*
* Examples:
*
* // simple boolean defaulting to false
* program.option('-p, --pepper', 'add pepper');
*
* --pepper
* program.pepper
* // => Boolean
*
* // simple boolean defaulting to true
* program.option('-C, --no-cheese', 'remove cheese');
*
* program.cheese
* // => true
*
* --no-cheese
* program.cheese
* // => false
*
* // required argument
* program.option('-C, --chdir <path>', 'change the working directory');
*
* --chdir /tmp
* program.chdir
* // => "/tmp"
*
* // optional argument
* program.option('-c, --cheese [type]', 'add cheese [marble]');
*
* @param {String} flags
* @param {String} description
* @param {Function|Mixed} fn or default
* @param {Mixed} defaultValue
* @return {Command} for chaining
* @api public
*/
option(flags: string, description?: string, fn?: ((val: any, memo: any) => mixed) | RegExp, defaultValue?: mixed): this;
option(flags: string, description?: string, defaultValue?: mixed): this;
/**
* Allow unknown options on the command line.
*
* @param {Boolean} arg if `true` or omitted, no error will be thrown
* for unknown options.
* @api public
*/
allowUnknownOption(arg?: boolean): this;
/**
* Parse `argv`, settings options and invoking commands when defined.
*
* @param {Array} argv
* @return {Command} for chaining
* @api public
*/
parse(argv: Array<string>): this;
/**
* Parse options from `argv` returning `argv`
* void of these options.
*
* @param {Array} argv
* @return {Array}
* @api public
*/
parseOptions(argv: Array<string>): { args: Array<string>, unknown: Array<string> };
/**
* Define argument syntax for the top-level command.
*
* @api public
*/
arguments(desc: string): this;
/**
* Return an object containing options as key-value pairs
*
* @return {Object}
* @api public
*/
opts(): { [key: string]: any };
/**
* Set the program version to `str`.
*
* This method auto-registers the "-V, --version" flag
* which will print the version number when passed.
*
* @param {String} str
* @param {String} flags
* @return {Command} for chaining
* @api public
*/
version(str: string, flags?: string): this;
/**
* Set the description to `str`.
*
* @param {String} str
* @return {String|Command}
* @api public
*/
description(str: string): this;
description(): string;
/**
* Set an alias for the command
*
* @param {String} alias
* @return {String|Command}
* @api public
*/
alias(alias: string): this;
alias(): string;
/**
* Set / get the command usage `str`.
*
* @param {String} str
* @return {String|Command}
* @api public
*/
usage(str: string): this;
usage(): string;
/**
* Get the name of the command
*
* @param {String} name
* @return {String|Command}
* @api public
*/
name(): string;
/**
* Output help information for this command
*
* @api public
*/
outputHelp(): void;
/**
* Output help information and exit.
*
* @api public
*/
help(): void;
}
declare class Option {
/**
* Initialize a new `Option` with the given `flags` and `description`.
*
* @param {String} flags
* @param {String} description
* @api public
*/
constructor(flags: string, description?: string): Option;
flags: string;
required: boolean;
optional: boolean;
bool: boolean;
short?: string;
long: string;
description: string;
}
declare module.exports: Command & {
Command: Command,
Option: Option
};
}

View File

@@ -1,33 +0,0 @@
// flow-typed signature: 80c21b4a25778a0faefd532204b78050
// flow-typed version: <<STUB>>/compression_v1.7.2/flow_v0.67.1
/**
* This is an autogenerated libdef stub for:
*
* 'compression'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'compression' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'compression/index' {
declare module.exports: $Exports<'compression'>;
}
declare module 'compression/index.js' {
declare module.exports: $Exports<'compression'>;
}

View File

@@ -1,33 +0,0 @@
// flow-typed signature: dd32612579acfe0d3fb825468a81fc4a
// flow-typed version: <<STUB>>/cookies_v0.7.1/flow_v0.64.0
/**
* This is an autogenerated libdef stub for:
*
* 'cookies'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'cookies' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'cookies/index' {
declare module.exports: $Exports<'cookies'>;
}
declare module 'cookies/index.js' {
declare module.exports: $Exports<'cookies'>;
}

View File

@@ -1,88 +0,0 @@
// flow-typed signature: d369e8a6411b1ce4fcd5339b6d41e441
// flow-typed version: <<STUB>>/cors_v2.8.4/flow_v0.67.1
/**
* This is an autogenerated libdef stub for:
*
* 'cors'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'cors' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'cors/lib/index' {
declare module.exports: any;
}
declare module 'cors/test/basic-auth' {
declare module.exports: any;
}
declare module 'cors/test/body-events' {
declare module.exports: any;
}
declare module 'cors/test/cors' {
declare module.exports: any;
}
declare module 'cors/test/error-response' {
declare module.exports: any;
}
declare module 'cors/test/example-app' {
declare module.exports: any;
}
declare module 'cors/test/issue-2' {
declare module.exports: any;
}
declare module 'cors/test/issue-31' {
declare module.exports: any;
}
declare module 'cors/test/support/env' {
declare module.exports: any;
}
// Filename aliases
declare module 'cors/lib/index.js' {
declare module.exports: $Exports<'cors/lib/index'>;
}
declare module 'cors/test/basic-auth.js' {
declare module.exports: $Exports<'cors/test/basic-auth'>;
}
declare module 'cors/test/body-events.js' {
declare module.exports: $Exports<'cors/test/body-events'>;
}
declare module 'cors/test/cors.js' {
declare module.exports: $Exports<'cors/test/cors'>;
}
declare module 'cors/test/error-response.js' {
declare module.exports: $Exports<'cors/test/error-response'>;
}
declare module 'cors/test/example-app.js' {
declare module.exports: $Exports<'cors/test/example-app'>;
}
declare module 'cors/test/issue-2.js' {
declare module.exports: $Exports<'cors/test/issue-2'>;
}
declare module 'cors/test/issue-31.js' {
declare module.exports: $Exports<'cors/test/issue-31'>;
}
declare module 'cors/test/support/env.js' {
declare module.exports: $Exports<'cors/test/support/env'>;
}

View File

@@ -1,127 +0,0 @@
// flow-typed signature: 02db3523747059d89e87d4dec6873edf
// flow-typed version: 62a0c60689/enzyme_v3.x.x/flow_>=v0.53.x
import * as React from "react";
declare module "enzyme" {
declare type PredicateFunction<T: Wrapper> = (
wrapper: T,
index: number
) => boolean;
declare type NodeOrNodes = React.Node | Array<React.Node>;
declare type EnzymeSelector = string | Class<React.Component<*, *>> | Object;
// CheerioWrapper is a type alias for an actual cheerio instance
// TODO: Reference correct type from cheerio's type declarations
declare type CheerioWrapper = any;
declare class Wrapper {
find(selector: EnzymeSelector): this,
findWhere(predicate: PredicateFunction<this>): this,
filter(selector: EnzymeSelector): this,
filterWhere(predicate: PredicateFunction<this>): this,
hostNodes(): this,
contains(nodeOrNodes: NodeOrNodes): boolean,
containsMatchingElement(node: React.Node): boolean,
containsAllMatchingElements(nodes: NodeOrNodes): boolean,
containsAnyMatchingElements(nodes: NodeOrNodes): boolean,
dive(option?: { context?: Object }): this,
exists(): boolean,
isEmptyRender(): boolean,
matchesElement(node: React.Node): boolean,
hasClass(className: string): boolean,
is(selector: EnzymeSelector): boolean,
isEmpty(): boolean,
not(selector: EnzymeSelector): this,
children(selector?: EnzymeSelector): this,
childAt(index: number): this,
parents(selector?: EnzymeSelector): this,
parent(): this,
closest(selector: EnzymeSelector): this,
render(): CheerioWrapper,
unmount(): this,
text(): string,
html(): string,
get(index: number): React.Node,
getNodes(): Array<React.Node>,
getDOMNode(): HTMLElement | HTMLInputElement,
at(index: number): this,
first(): this,
last(): this,
state(key?: string): any,
context(key?: string): any,
props(): Object,
prop(key: string): any,
key(): string,
simulate(event: string, ...args: Array<any>): this,
setState(state: {}, callback?: Function): this,
setProps(props: {}): this,
setContext(context: Object): this,
instance(): React.Component<*, *>,
update(): this,
debug(): string,
type(): string | Function | null,
name(): string,
forEach(fn: (node: this, index: number) => mixed): this,
map<T>(fn: (node: this, index: number) => T): Array<T>,
reduce<T>(
fn: (value: T, node: this, index: number) => T,
initialValue?: T
): Array<T>,
reduceRight<T>(
fn: (value: T, node: this, index: number) => T,
initialValue?: T
): Array<T>,
some(selector: EnzymeSelector): boolean,
someWhere(predicate: PredicateFunction<this>): boolean,
every(selector: EnzymeSelector): boolean,
everyWhere(predicate: PredicateFunction<this>): boolean,
length: number
}
declare class ReactWrapper extends Wrapper {
constructor(nodes: NodeOrNodes, root: any, options?: ?Object): ReactWrapper,
mount(): this,
ref(refName: string): this,
detach(): void
}
declare class ShallowWrapper extends Wrapper {
constructor(
nodes: NodeOrNodes,
root: any,
options?: ?Object
): ShallowWrapper,
equals(node: React.Node): boolean,
shallow(options?: { context?: Object }): ShallowWrapper
}
declare function shallow(
node: React.Node,
options?: { context?: Object, disableLifecycleMethods?: boolean }
): ShallowWrapper;
declare function mount(
node: React.Node,
options?: {
context?: Object,
attachTo?: HTMLElement,
childContextTypes?: Object
}
): ReactWrapper;
declare function render(
node: React.Node,
options?: { context?: Object }
): CheerioWrapper;
declare module.exports: {
configure(options: {
Adapter?: any,
disableLifecycleMethods?: boolean
}): void,
render: typeof render,
mount: typeof mount,
shallow: typeof shallow,
ShallowWrapper: typeof ShallowWrapper,
ReactWrapper: typeof ReactWrapper
};
}

View File

@@ -1,304 +0,0 @@
// flow-typed signature: cc24a4e737d9dfb8e1381c3bd4ebaa65
// flow-typed version: d11eab7bb5/express_v4.16.x/flow_>=v0.32.x
import type { Server } from "http";
import type { Socket } from "net";
declare type express$RouterOptions = {
caseSensitive?: boolean,
mergeParams?: boolean,
strict?: boolean
};
declare class express$RequestResponseBase {
app: express$Application;
get(field: string): string | void;
}
declare type express$RequestParams = {
[param: string]: string
};
declare class express$Request extends http$IncomingMessage mixins express$RequestResponseBase {
baseUrl: string;
body: mixed;
cookies: { [cookie: string]: string };
connection: Socket;
fresh: boolean;
hostname: string;
ip: string;
ips: Array<string>;
method: string;
originalUrl: string;
params: express$RequestParams;
path: string;
protocol: "https" | "http";
query: { [name: string]: string | Array<string> };
route: string;
secure: boolean;
signedCookies: { [signedCookie: string]: string };
stale: boolean;
subdomains: Array<string>;
xhr: boolean;
accepts(types: string): string | false;
accepts(types: Array<string>): string | false;
acceptsCharsets(...charsets: Array<string>): string | false;
acceptsEncodings(...encoding: Array<string>): string | false;
acceptsLanguages(...lang: Array<string>): string | false;
header(field: string): string | void;
is(type: string): boolean;
param(name: string, defaultValue?: string): string | void;
}
declare type express$CookieOptions = {
domain?: string,
encode?: (value: string) => string,
expires?: Date,
httpOnly?: boolean,
maxAge?: number,
path?: string,
secure?: boolean,
signed?: boolean
};
declare type express$Path = string | RegExp;
declare type express$RenderCallback = (
err: Error | null,
html?: string
) => mixed;
declare type express$SendFileOptions = {
maxAge?: number,
root?: string,
lastModified?: boolean,
headers?: { [name: string]: string },
dotfiles?: "allow" | "deny" | "ignore"
};
declare class express$Response extends http$ServerResponse mixins express$RequestResponseBase {
headersSent: boolean;
locals: { [name: string]: mixed };
append(field: string, value?: string): this;
attachment(filename?: string): this;
cookie(name: string, value: string, options?: express$CookieOptions): this;
clearCookie(name: string, options?: express$CookieOptions): this;
download(
path: string,
filename?: string,
callback?: (err?: ?Error) => void
): this;
format(typesObject: { [type: string]: Function }): this;
json(body?: mixed): this;
jsonp(body?: mixed): this;
links(links: { [name: string]: string }): this;
location(path: string): this;
redirect(url: string, ...args: Array<void>): this;
redirect(status: number, url: string, ...args: Array<void>): this;
render(
view: string,
locals?: { [name: string]: mixed },
callback?: express$RenderCallback
): this;
send(body?: mixed): this;
sendFile(
path: string,
options?: express$SendFileOptions,
callback?: (err?: ?Error) => mixed
): this;
sendStatus(statusCode: number): this;
header(field: string, value?: string): this;
header(headers: { [name: string]: string }): this;
set(field: string, value?: string | string[]): this;
set(headers: { [name: string]: string }): this;
status(statusCode: number): this;
type(type: string): this;
vary(field: string): this;
req: express$Request;
}
declare type express$NextFunction = (err?: ?Error | "route") => mixed;
declare type express$Middleware =
| ((
req: $Subtype<express$Request>,
res: express$Response,
next: express$NextFunction
) => mixed)
| ((
error: Error,
req: $Subtype<express$Request>,
res: express$Response,
next: express$NextFunction
) => mixed);
declare interface express$RouteMethodType<T> {
(middleware: express$Middleware): T;
(...middleware: Array<express$Middleware>): T;
(
path: express$Path | express$Path[],
...middleware: Array<express$Middleware>
): T;
}
declare class express$Route {
all: express$RouteMethodType<this>;
get: express$RouteMethodType<this>;
post: express$RouteMethodType<this>;
put: express$RouteMethodType<this>;
head: express$RouteMethodType<this>;
delete: express$RouteMethodType<this>;
options: express$RouteMethodType<this>;
trace: express$RouteMethodType<this>;
copy: express$RouteMethodType<this>;
lock: express$RouteMethodType<this>;
mkcol: express$RouteMethodType<this>;
move: express$RouteMethodType<this>;
purge: express$RouteMethodType<this>;
propfind: express$RouteMethodType<this>;
proppatch: express$RouteMethodType<this>;
unlock: express$RouteMethodType<this>;
report: express$RouteMethodType<this>;
mkactivity: express$RouteMethodType<this>;
checkout: express$RouteMethodType<this>;
merge: express$RouteMethodType<this>;
// @TODO Missing 'm-search' but get flow illegal name error.
notify: express$RouteMethodType<this>;
subscribe: express$RouteMethodType<this>;
unsubscribe: express$RouteMethodType<this>;
patch: express$RouteMethodType<this>;
search: express$RouteMethodType<this>;
connect: express$RouteMethodType<this>;
}
declare class express$Router extends express$Route {
constructor(options?: express$RouterOptions): void;
route(path: string): express$Route;
static (options?: express$RouterOptions): express$Router;
use(middleware: express$Middleware): this;
use(...middleware: Array<express$Middleware>): this;
use(
path: express$Path | express$Path[],
...middleware: Array<express$Middleware>
): this;
use(path: string, router: express$Router): this;
handle(
req: http$IncomingMessage,
res: http$ServerResponse,
next: express$NextFunction
): void;
param(
param: string,
callback: (
req: $Subtype<express$Request>,
res: express$Response,
next: express$NextFunction,
id: string
) => mixed
): void;
(
req: http$IncomingMessage,
res: http$ServerResponse,
next?: ?express$NextFunction
): void;
}
/*
With flow-bin ^0.59, express app.listen() is deemed to return any and fails flow type coverage.
Which is ironic because https://github.com/facebook/flow/blob/master/Changelog.md#misc-2 (release notes for 0.59)
says "Improves typings for Node.js HTTP server listen() function." See that? IMPROVES!
To work around this issue, we changed Server to ?Server here, so that our invocations of express.listen() will
not be deemed to lack type coverage.
*/
declare class express$Application extends express$Router mixins events$EventEmitter {
constructor(): void;
locals: { [name: string]: mixed };
mountpath: string;
listen(
port: number,
hostname?: string,
backlog?: number,
callback?: (err?: ?Error) => mixed
): ?Server;
listen(
port: number,
hostname?: string,
callback?: (err?: ?Error) => mixed
): ?Server;
listen(port: number, callback?: (err?: ?Error) => mixed): ?Server;
listen(path: string, callback?: (err?: ?Error) => mixed): ?Server;
listen(handle: Object, callback?: (err?: ?Error) => mixed): ?Server;
disable(name: string): void;
disabled(name: string): boolean;
enable(name: string): express$Application;
enabled(name: string): boolean;
engine(name: string, callback: Function): void;
/**
* Mixed will not be taken as a value option. Issue around using the GET http method name and the get for settings.
*/
// get(name: string): mixed;
set(name: string, value: mixed): mixed;
render(
name: string,
optionsOrFunction: { [name: string]: mixed },
callback: express$RenderCallback
): void;
handle(
req: http$IncomingMessage,
res: http$ServerResponse,
next?: ?express$NextFunction
): void;
// callable signature is not inherited
(
req: http$IncomingMessage,
res: http$ServerResponse,
next?: ?express$NextFunction
): void;
}
declare type JsonOptions = {
inflate?: boolean,
limit?: string | number,
reviver?: (key: string, value: mixed) => mixed,
strict?: boolean,
type?: string | Array<string> | ((req: express$Request) => boolean),
verify?: (
req: express$Request,
res: express$Response,
buf: Buffer,
encoding: string
) => mixed
};
declare type express$UrlEncodedOptions = {
extended?: boolean,
inflate?: boolean,
limit?: string | number,
parameterLimit?: number,
type?: string | Array<string> | ((req: express$Request) => boolean),
verify?: (
req: express$Request,
res: express$Response,
buf: Buffer,
encoding: string
) => mixed,
}
declare module "express" {
declare export type RouterOptions = express$RouterOptions;
declare export type CookieOptions = express$CookieOptions;
declare export type Middleware = express$Middleware;
declare export type NextFunction = express$NextFunction;
declare export type RequestParams = express$RequestParams;
declare export type $Response = express$Response;
declare export type $Request = express$Request;
declare export type $Application = express$Application;
declare module.exports: {
(): express$Application, // If you try to call like a function, it will use this signature
json: (opts: ?JsonOptions) => express$Middleware,
static: (root: string, options?: Object) => express$Middleware, // `static` property on the function
Router: typeof express$Router, // `Router` property on the function
urlencoded: (opts: ?express$UrlEncodedOptions) => express$Middleware,
};
}

View File

@@ -1,6 +0,0 @@
// flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583
// flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x
declare module "flow-bin" {
declare module.exports: string;
}

View File

@@ -1,18 +0,0 @@
// flow-typed signature: cda964a8fd1ee8efbd11f88eb4c5c4df
// flow-typed version: <<STUB>>/github-markdown-css_v2.10.0/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* 'github-markdown-css'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'github-markdown-css' {
declare module.exports: any;
}

View File

@@ -1,59 +0,0 @@
// flow-typed signature: 573c576fe34eb3c3c65dd7a9c90a46d2
// flow-typed version: b43dff3e0e/http-errors_v1.x.x/flow_>=v0.25.x
declare module 'http-errors' {
declare class SpecialHttpError extends HttpError {
constructor(): SpecialHttpError;
}
declare class HttpError extends Error {
expose: bool;
message: string;
status: number;
statusCode: number;
}
declare module.exports: {
(status?: number, message?: string, props?: Object): HttpError;
HttpError: typeof HttpError;
BadRequest: typeof SpecialHttpError;
Unauthorized: typeof SpecialHttpError;
PaymentRequired: typeof SpecialHttpError;
Forbidden: typeof SpecialHttpError;
NotFound: typeof SpecialHttpError;
MethodNotAllowed: typeof SpecialHttpError;
NotAcceptable: typeof SpecialHttpError;
ProxyAuthenticationRequired: typeof SpecialHttpError;
RequestTimeout: typeof SpecialHttpError;
Conflict: typeof SpecialHttpError;
Gone: typeof SpecialHttpError;
LengthRequired: typeof SpecialHttpError;
PreconditionFailed: typeof SpecialHttpError;
PayloadTooLarge: typeof SpecialHttpError;
URITooLong: typeof SpecialHttpError;
UnsupportedMediaType: typeof SpecialHttpError;
RangeNotStatisfiable: typeof SpecialHttpError;
ExpectationFailed: typeof SpecialHttpError;
ImATeapot: typeof SpecialHttpError;
MisdirectedRequest: typeof SpecialHttpError;
UnprocessableEntity: typeof SpecialHttpError;
Locked: typeof SpecialHttpError;
FailedDependency: typeof SpecialHttpError;
UnorderedCollection: typeof SpecialHttpError;
UpgradeRequired: typeof SpecialHttpError;
PreconditionRequired: typeof SpecialHttpError;
TooManyRequests: typeof SpecialHttpError;
RequestHeaderFieldsTooLarge: typeof SpecialHttpError;
UnavailableForLegalReasons: typeof SpecialHttpError;
InternalServerError: typeof SpecialHttpError;
NotImplemented: typeof SpecialHttpError;
BadGateway: typeof SpecialHttpError;
ServiceUnavailable: typeof SpecialHttpError;
GatewayTimeout: typeof SpecialHttpError;
HTTPVersionNotSupported: typeof SpecialHttpError;
VariantAlsoNegotiates: typeof SpecialHttpError;
InsufficientStorage: typeof SpecialHttpError;
LoopDetected: typeof SpecialHttpError;
BandwidthLimitExceeded: typeof SpecialHttpError;
NotExtended: typeof SpecialHttpError;
NetworkAuthenticationRequired: typeof SpecialHttpError;
}
}

View File

@@ -1,32 +0,0 @@
// flow-typed signature: 76121323ae40fcb28bee1398717ee06c
// flow-typed version: <<STUB>>/jest-environment-node_v22.x.x/flow_v0.69.0
/**
* This is an autogenerated libdef stub for:
*
* 'jest-environment-node'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'jest-environment-node' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'jest-environment-node/build/index' {
declare module.exports: any;
}
// Filename aliases
declare module 'jest-environment-node/build/index.js' {
declare module.exports: $Exports<'jest-environment-node/build/index'>;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,255 +0,0 @@
// flow-typed signature: 10998829754884cf0b6f5fe169611a08
// flow-typed version: <<STUB>>/js-yaml_v3.10.0/flow_v0.64.0
/**
* This is an autogenerated libdef stub for:
*
* 'js-yaml'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'js-yaml' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'js-yaml/bin/js-yaml' {
declare module.exports: any;
}
declare module 'js-yaml/dist/js-yaml' {
declare module.exports: any;
}
declare module 'js-yaml/dist/js-yaml.min' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/common' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/dumper' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/exception' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/loader' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/mark' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/schema' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/schema/core' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/schema/default_full' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/schema/default_safe' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/schema/failsafe' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/schema/json' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/binary' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/bool' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/float' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/int' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/js/function' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/js/regexp' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/js/undefined' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/map' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/merge' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/null' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/omap' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/pairs' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/seq' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/set' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/str' {
declare module.exports: any;
}
declare module 'js-yaml/lib/js-yaml/type/timestamp' {
declare module.exports: any;
}
// Filename aliases
declare module 'js-yaml/bin/js-yaml.js' {
declare module.exports: $Exports<'js-yaml/bin/js-yaml'>;
}
declare module 'js-yaml/dist/js-yaml.js' {
declare module.exports: $Exports<'js-yaml/dist/js-yaml'>;
}
declare module 'js-yaml/dist/js-yaml.min.js' {
declare module.exports: $Exports<'js-yaml/dist/js-yaml.min'>;
}
declare module 'js-yaml/index' {
declare module.exports: $Exports<'js-yaml'>;
}
declare module 'js-yaml/index.js' {
declare module.exports: $Exports<'js-yaml'>;
}
declare module 'js-yaml/lib/js-yaml.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml'>;
}
declare module 'js-yaml/lib/js-yaml/common.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/common'>;
}
declare module 'js-yaml/lib/js-yaml/dumper.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/dumper'>;
}
declare module 'js-yaml/lib/js-yaml/exception.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/exception'>;
}
declare module 'js-yaml/lib/js-yaml/loader.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/loader'>;
}
declare module 'js-yaml/lib/js-yaml/mark.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/mark'>;
}
declare module 'js-yaml/lib/js-yaml/schema.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/schema'>;
}
declare module 'js-yaml/lib/js-yaml/schema/core.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/schema/core'>;
}
declare module 'js-yaml/lib/js-yaml/schema/default_full.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/schema/default_full'>;
}
declare module 'js-yaml/lib/js-yaml/schema/default_safe.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/schema/default_safe'>;
}
declare module 'js-yaml/lib/js-yaml/schema/failsafe.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/schema/failsafe'>;
}
declare module 'js-yaml/lib/js-yaml/schema/json.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/schema/json'>;
}
declare module 'js-yaml/lib/js-yaml/type.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type'>;
}
declare module 'js-yaml/lib/js-yaml/type/binary.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/binary'>;
}
declare module 'js-yaml/lib/js-yaml/type/bool.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/bool'>;
}
declare module 'js-yaml/lib/js-yaml/type/float.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/float'>;
}
declare module 'js-yaml/lib/js-yaml/type/int.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/int'>;
}
declare module 'js-yaml/lib/js-yaml/type/js/function.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/js/function'>;
}
declare module 'js-yaml/lib/js-yaml/type/js/regexp.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/js/regexp'>;
}
declare module 'js-yaml/lib/js-yaml/type/js/undefined.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/js/undefined'>;
}
declare module 'js-yaml/lib/js-yaml/type/map.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/map'>;
}
declare module 'js-yaml/lib/js-yaml/type/merge.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/merge'>;
}
declare module 'js-yaml/lib/js-yaml/type/null.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/null'>;
}
declare module 'js-yaml/lib/js-yaml/type/omap.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/omap'>;
}
declare module 'js-yaml/lib/js-yaml/type/pairs.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/pairs'>;
}
declare module 'js-yaml/lib/js-yaml/type/seq.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/seq'>;
}
declare module 'js-yaml/lib/js-yaml/type/set.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/set'>;
}
declare module 'js-yaml/lib/js-yaml/type/str.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/str'>;
}
declare module 'js-yaml/lib/js-yaml/type/timestamp.js' {
declare module.exports: $Exports<'js-yaml/lib/js-yaml/type/timestamp'>;
}

View File

@@ -1,80 +0,0 @@
// flow-typed signature: 4ec026fce9b8a945dbac93217027085d
// flow-typed version: <<STUB>>/jsonwebtoken_v8.1.1/flow_v0.64.0
/**
* This is an autogenerated libdef stub for:
*
* 'jsonwebtoken'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'jsonwebtoken' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'jsonwebtoken/decode' {
declare module.exports: any;
}
declare module 'jsonwebtoken/lib/JsonWebTokenError' {
declare module.exports: any;
}
declare module 'jsonwebtoken/lib/NotBeforeError' {
declare module.exports: any;
}
declare module 'jsonwebtoken/lib/timespan' {
declare module.exports: any;
}
declare module 'jsonwebtoken/lib/TokenExpiredError' {
declare module.exports: any;
}
declare module 'jsonwebtoken/sign' {
declare module.exports: any;
}
declare module 'jsonwebtoken/verify' {
declare module.exports: any;
}
// Filename aliases
declare module 'jsonwebtoken/decode.js' {
declare module.exports: $Exports<'jsonwebtoken/decode'>;
}
declare module 'jsonwebtoken/index' {
declare module.exports: $Exports<'jsonwebtoken'>;
}
declare module 'jsonwebtoken/index.js' {
declare module.exports: $Exports<'jsonwebtoken'>;
}
declare module 'jsonwebtoken/lib/JsonWebTokenError.js' {
declare module.exports: $Exports<'jsonwebtoken/lib/JsonWebTokenError'>;
}
declare module 'jsonwebtoken/lib/NotBeforeError.js' {
declare module.exports: $Exports<'jsonwebtoken/lib/NotBeforeError'>;
}
declare module 'jsonwebtoken/lib/timespan.js' {
declare module.exports: $Exports<'jsonwebtoken/lib/timespan'>;
}
declare module 'jsonwebtoken/lib/TokenExpiredError.js' {
declare module.exports: $Exports<'jsonwebtoken/lib/TokenExpiredError'>;
}
declare module 'jsonwebtoken/sign.js' {
declare module.exports: $Exports<'jsonwebtoken/sign'>;
}
declare module 'jsonwebtoken/verify.js' {
declare module.exports: $Exports<'jsonwebtoken/verify'>;
}

View File

@@ -1,33 +0,0 @@
// flow-typed signature: 27250091946c7286334b6d8e332b126f
// flow-typed version: <<STUB>>/kleur_v3.0.3/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* 'kleur'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'kleur' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'kleur/index' {
declare module.exports: $Exports<'kleur'>;
}
declare module 'kleur/index.js' {
declare module.exports: $Exports<'kleur'>;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,74 +0,0 @@
// flow-typed signature: f588bf5982dc1140e97108be62b860db
// flow-typed version: <<STUB>>/lunr-mutable-indexes_v2.3.1/flow_v0.77.0
/**
* This is an autogenerated libdef stub for:
*
* 'lunr-mutable-indexes'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'lunr-mutable-indexes' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'lunr-mutable-indexes/lib/lunr_mutable' {
declare module.exports: any;
}
declare module 'lunr-mutable-indexes/lib/mutable_builder' {
declare module.exports: any;
}
declare module 'lunr-mutable-indexes/lib/mutable_index' {
declare module.exports: any;
}
declare module 'lunr-mutable-indexes/lunr-mutable' {
declare module.exports: any;
}
declare module 'lunr-mutable-indexes/test/mutable_serialization_test' {
declare module.exports: any;
}
declare module 'lunr-mutable-indexes/test/mutable_sugar_test' {
declare module.exports: any;
}
declare module 'lunr-mutable-indexes/test/mutable_test' {
declare module.exports: any;
}
// Filename aliases
declare module 'lunr-mutable-indexes/lib/lunr_mutable.js' {
declare module.exports: $Exports<'lunr-mutable-indexes/lib/lunr_mutable'>;
}
declare module 'lunr-mutable-indexes/lib/mutable_builder.js' {
declare module.exports: $Exports<'lunr-mutable-indexes/lib/mutable_builder'>;
}
declare module 'lunr-mutable-indexes/lib/mutable_index.js' {
declare module.exports: $Exports<'lunr-mutable-indexes/lib/mutable_index'>;
}
declare module 'lunr-mutable-indexes/lunr-mutable.js' {
declare module.exports: $Exports<'lunr-mutable-indexes/lunr-mutable'>;
}
declare module 'lunr-mutable-indexes/test/mutable_serialization_test.js' {
declare module.exports: $Exports<'lunr-mutable-indexes/test/mutable_serialization_test'>;
}
declare module 'lunr-mutable-indexes/test/mutable_sugar_test.js' {
declare module.exports: $Exports<'lunr-mutable-indexes/test/mutable_sugar_test'>;
}
declare module 'lunr-mutable-indexes/test/mutable_test.js' {
declare module.exports: $Exports<'lunr-mutable-indexes/test/mutable_test'>;
}

View File

@@ -1,163 +0,0 @@
// flow-typed signature: 85ea5a515c42c00188d893614f410655
// flow-typed version: 72fe9c1b53/marked_v0.3.x/flow_>=v0.28.x
type marked$AlignFlag = 'left' | 'right' | 'center'
type marked$NodeCallback<T> = (e: ?Error, d: ?T) => void
class marked$Renderer {
options: marked$MarkedOptions;
code: (c: string, l: string) => string;
blockquote: (q: string) => string;
html: (h: string) => string;
heading: (t: string, l: number) => string;
hr: () => string;
list: (b: string, o: boolean) => string;
listitem: (t: string) => string;
paragraph: (t: string) => string;
table: (h: string, b: string) => string;
tablerow: (c: string) => string;
tablecell: (c: string, f: ?marked$AlignFlag) => string;
heading: (t: string, l: number) => string;
strong: (t: string) => string;
em: (t: string) => string;
codespan: (c: string) => string;
br: () => string;
del: (t: string) => string;
link: (h: string, ti: string, te: string) => string;
image: (h: string, ti: string, te: string) => string;
text: (t: string) => string;
constructor(o?: marked$MarkedOptions): marked$Renderer {
return this;
}
}
type marked$HighlightFunction =
((c: string, l: string, cb: marked$NodeCallback<string>) => void)
| ((c: string, cb: marked$NodeCallback<string>) => void)
| ((c: string, l?: string) => string)
type marked$MarkedOptions = {
highlight?: marked$HighlightFunction;
renderer?: marked$Renderer;
gfm?: boolean;
tables?: boolean;
breaks?: boolean;
pedantic?: boolean;
sanitize?: boolean;
smartLists?: boolean;
smartypants?: boolean;
}
/*
* marked$Tokens
*/
type marked$Space = { type: 'space'; }
type marked$Code = { type: 'code'; text: string; lang?: string; }
type marked$Heading = { type: 'heading'; depth: number; text: string; }
type marked$Table = { type: 'table'; header: string; align: Array<marked$AlignFlag> ; cells: Array<Array<string>> }
type marked$Hr = { type: 'hr'; }
type marked$BlockquoteStart = { type: 'blockquote_start' }
type marked$BlockquoteEnd = { type: 'blockquote_end' }
type marked$ListStart = { type: 'list_start' }
type marked$ListEnd = { type: 'list_end' }
type marked$Paragraph = { type: 'paragraph'; pre: boolean; text: string; }
type marked$Html = { type: 'paragraph'; pre: boolean; text: string; }
type marked$Text = { type: 'text'; text: string; }
type marked$Token =
marked$Space
| marked$Code
| marked$Heading
| marked$Table
| marked$Hr
| marked$BlockquoteStart
| marked$BlockquoteEnd
| marked$ListStart
| marked$ListEnd
| marked$Paragraph
| marked$Html
| marked$Text
type marked$Link = {
title: ?string;
href: string;
}
type marked$Tokens = { links: Array<marked$Link> } & Array<marked$Token>;
type marked$NoopRule = {
(i: mixed): void;
exec: (i: mixed) => void;
}
type marked$Rule = RegExp | marked$NoopRule
type marked$lex = (t: string) => marked$Tokens;
class marked$Lexer {
static lexer: (t: string, o?: marked$MarkedOptions) => marked$Tokens;
static rules: { [key: string]: marked$Rule };
rules: { [key: string]: marked$Rule };
lex: marked$lex;
tokens: marked$Tokens;
options: marked$MarkedOptions;
constructor(o?: marked$MarkedOptions): marked$Lexer {
return this;
}
}
class marked$Parser {
static parse: (t: marked$Tokens, o?: marked$MarkedOptions) => string;
parse: (t: marked$Tokens) => string;
next: () => marked$Token;
peek: () => marked$Token;
parsemarked$Text: () => string;
tok: () => string;
tokens: marked$Tokens;
token: ?marked$Token;
options: marked$MarkedOptions;
renderer: marked$Renderer;
constructor(o?: marked$MarkedOptions): marked$Parser {
return this;
}
}
class marked$InlineLexer {
static rules: Array<marked$Rule>;
static output: (s: string, l: Array<marked$Link>, o?: marked$MarkedOptions) => string;
output: (s: string) => string;
outputmarked$Link: (c: Array<string>, l: marked$Link) => string;
smartypants: (t: string) => string;
mangle: (t: string) => string;
options: marked$MarkedOptions;
links: Array<marked$Link>;
rules: Array<marked$Rule>;
renderer: marked$Renderer;
constructor(l: Array<marked$Link>, o?: marked$MarkedOptions): marked$InlineLexer {
return this;
}
}
type marked$Marked = {
(md: string, o: marked$MarkedOptions, cb: marked$NodeCallback<string>): void;
(md: string, cb: marked$NodeCallback<string>): void;
(md: string, o?: marked$MarkedOptions): string;
setOptions: (o: marked$MarkedOptions) => void;
defaults: marked$MarkedOptions;
Parser: typeof marked$Parser;
parser: typeof marked$Parser.parse;
Lexer: typeof marked$Lexer;
lexer: typeof marked$Lexer.lexer;
InlineLexer: typeof marked$InlineLexer;
inlinelexer: marked$InlineLexer.output;
Renderer: typeof marked$Renderer;
parse: marked$Marked;
}
declare module marked {
declare export default marked$Marked;
}

View File

@@ -1,66 +0,0 @@
// flow-typed signature: 56b4e33a3df0ef57946fd42834d344b8
// flow-typed version: <<STUB>>/mime_v2.2.0/flow_v0.67.1
/**
* This is an autogenerated libdef stub for:
*
* 'mime'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'mime' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'mime/cli' {
declare module.exports: any;
}
declare module 'mime/lite' {
declare module.exports: any;
}
declare module 'mime/Mime' {
declare module.exports: any;
}
declare module 'mime/src/build' {
declare module.exports: any;
}
declare module 'mime/src/test' {
declare module.exports: any;
}
// Filename aliases
declare module 'mime/cli.js' {
declare module.exports: $Exports<'mime/cli'>;
}
declare module 'mime/index' {
declare module.exports: $Exports<'mime'>;
}
declare module 'mime/index.js' {
declare module.exports: $Exports<'mime'>;
}
declare module 'mime/lite.js' {
declare module.exports: $Exports<'mime/lite'>;
}
declare module 'mime/Mime.js' {
declare module.exports: $Exports<'mime/Mime'>;
}
declare module 'mime/src/build.js' {
declare module.exports: $Exports<'mime/src/build'>;
}
declare module 'mime/src/test.js' {
declare module.exports: $Exports<'mime/src/test'>;
}

View File

@@ -1,53 +0,0 @@
// flow-typed signature: bc0af4a44bb8631039f713b1afba6988
// flow-typed version: d42cbef63c/minimatch_v3.x.x/flow_>=v0.25.x
type $npm$minimatch$Options = {
debug?: boolean,
nobrace?: boolean,
noglobstar?: boolean,
dot?: boolean,
noext?: boolean,
nocase?: boolean,
nonull?: boolean,
matchBase?: boolean,
nocomment?: boolean,
nonegate?: boolean,
flipNegate?: boolean
};
declare module "minimatch" {
declare class Minimatch {
constructor(pattern: string, options?: $npm$minimatch$Options): Minimatch,
set: Array<Array<string | RegExp>>,
regexp: null | RegExp, // null until .makeRe() is called
negate: boolean,
comment: boolean,
empty: boolean,
makeRe(): RegExp | false,
match(name: string): boolean,
matchOne(
fileArray: Array<string>,
patternArray: Array<string>,
partial?: boolean
): boolean
}
declare class MinimatchModule {
Minimatch: Class<Minimatch>,
(name: string, pattern: string, options?: $npm$minimatch$Options): boolean,
filter(
pattern: string,
options?: $npm$minimatch$Options
): (value: string) => boolean,
match(
list: Array<string>,
pattern: string,
options?: $npm$minimatch$Options
): Array<string>
}
declare module.exports: MinimatchModule;
}

View File

@@ -1,13 +0,0 @@
// flow-typed signature: 82aa0feffc2bbd64dce3bec492f5d601
// flow-typed version: 3315d89a00/mkdirp_v0.5.x/flow_>=v0.25.0
declare module 'mkdirp' {
declare type Options = number | { mode?: number; fs?: mixed };
declare type Callback = (err: ?Error, path: ?string) => void;
declare module.exports: {
(path: string, options?: Options | Callback, callback?: Callback): void;
sync(path: string, options?: Options): void;
};
}

View File

@@ -1,109 +0,0 @@
// flow-typed signature: 0c37b93b28df38b46c7edb9bc9d278ad
// flow-typed version: <<STUB>>/node-mocks-http_v1.6.7/flow_v0.64.0
/**
* This is an autogenerated libdef stub for:
*
* 'node-mocks-http'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'node-mocks-http' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'node-mocks-http/lib/express/mock-application' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/express/mock-express' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/express/mock-request' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/express/utils/define-getter' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/http-mock' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/mockEventEmitter' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/mockRequest' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/mockResponse' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/mockWritableStream' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/node/_http_incoming' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/node/_http_server' {
declare module.exports: any;
}
declare module 'node-mocks-http/lib/node/http' {
declare module.exports: any;
}
// Filename aliases
declare module 'node-mocks-http/lib/express/mock-application.js' {
declare module.exports: $Exports<'node-mocks-http/lib/express/mock-application'>;
}
declare module 'node-mocks-http/lib/express/mock-express.js' {
declare module.exports: $Exports<'node-mocks-http/lib/express/mock-express'>;
}
declare module 'node-mocks-http/lib/express/mock-request.js' {
declare module.exports: $Exports<'node-mocks-http/lib/express/mock-request'>;
}
declare module 'node-mocks-http/lib/express/utils/define-getter.js' {
declare module.exports: $Exports<'node-mocks-http/lib/express/utils/define-getter'>;
}
declare module 'node-mocks-http/lib/http-mock.js' {
declare module.exports: $Exports<'node-mocks-http/lib/http-mock'>;
}
declare module 'node-mocks-http/lib/mockEventEmitter.js' {
declare module.exports: $Exports<'node-mocks-http/lib/mockEventEmitter'>;
}
declare module 'node-mocks-http/lib/mockRequest.js' {
declare module.exports: $Exports<'node-mocks-http/lib/mockRequest'>;
}
declare module 'node-mocks-http/lib/mockResponse.js' {
declare module.exports: $Exports<'node-mocks-http/lib/mockResponse'>;
}
declare module 'node-mocks-http/lib/mockWritableStream.js' {
declare module.exports: $Exports<'node-mocks-http/lib/mockWritableStream'>;
}
declare module 'node-mocks-http/lib/node/_http_incoming.js' {
declare module.exports: $Exports<'node-mocks-http/lib/node/_http_incoming'>;
}
declare module 'node-mocks-http/lib/node/_http_server.js' {
declare module.exports: $Exports<'node-mocks-http/lib/node/_http_server'>;
}
declare module 'node-mocks-http/lib/node/http.js' {
declare module.exports: $Exports<'node-mocks-http/lib/node/http'>;
}

View File

@@ -1,9 +0,0 @@
// flow-typed signature: b0a8c8851219a1c2a933509d842e0bc8
// flow-typed version: 4a2d036a51/normalize.css_v7.x.x/flow_>=v0.34.x
// normalize.css may be imported for side-effects,
// e.g. to force webpack to bundle it alongside CSS modules
declare module "normalize.css" {
declare export default empty
}

View File

@@ -1,81 +0,0 @@
// flow-typed signature: 5ea2cb6aa83979de9573ab3e3723be3f
// flow-typed version: <<STUB>>/pkginfo_v0.4.1/flow_v0.67.1
/**
* This is an autogenerated libdef stub for:
*
* 'pkginfo'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'pkginfo' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'pkginfo/examples/all-properties' {
declare module.exports: any;
}
declare module 'pkginfo/examples/array-argument' {
declare module.exports: any;
}
declare module 'pkginfo/examples/multiple-properties' {
declare module.exports: any;
}
declare module 'pkginfo/examples/object-argument' {
declare module.exports: any;
}
declare module 'pkginfo/examples/single-property' {
declare module.exports: any;
}
declare module 'pkginfo/examples/target-dir' {
declare module.exports: any;
}
declare module 'pkginfo/lib/pkginfo' {
declare module.exports: any;
}
declare module 'pkginfo/test/pkginfo-test' {
declare module.exports: any;
}
// Filename aliases
declare module 'pkginfo/examples/all-properties.js' {
declare module.exports: $Exports<'pkginfo/examples/all-properties'>;
}
declare module 'pkginfo/examples/array-argument.js' {
declare module.exports: $Exports<'pkginfo/examples/array-argument'>;
}
declare module 'pkginfo/examples/multiple-properties.js' {
declare module.exports: $Exports<'pkginfo/examples/multiple-properties'>;
}
declare module 'pkginfo/examples/object-argument.js' {
declare module.exports: $Exports<'pkginfo/examples/object-argument'>;
}
declare module 'pkginfo/examples/single-property.js' {
declare module.exports: $Exports<'pkginfo/examples/single-property'>;
}
declare module 'pkginfo/examples/target-dir.js' {
declare module.exports: $Exports<'pkginfo/examples/target-dir'>;
}
declare module 'pkginfo/lib/pkginfo.js' {
declare module.exports: $Exports<'pkginfo/lib/pkginfo'>;
}
declare module 'pkginfo/test/pkginfo-test.js' {
declare module.exports: $Exports<'pkginfo/test/pkginfo-test'>;
}

View File

@@ -1,690 +0,0 @@
// flow-typed signature: 269daa88cf96222ec337ad11f33aeff0
// flow-typed version: <<STUB>>/polished_v2.3.0/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* 'polished'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'polished' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'polished/babel.config' {
declare module.exports: any;
}
declare module 'polished/dist/polished.es' {
declare module.exports: any;
}
declare module 'polished/dist/polished' {
declare module.exports: any;
}
declare module 'polished/dist/polished.min' {
declare module.exports: any;
}
declare module 'polished/docs/assets/anchor' {
declare module.exports: any;
}
declare module 'polished/docs/assets/docs' {
declare module.exports: any;
}
declare module 'polished/docs/assets/highlight.pack' {
declare module.exports: any;
}
declare module 'polished/docs/assets/polished' {
declare module.exports: any;
}
declare module 'polished/docs/assets/script' {
declare module.exports: any;
}
declare module 'polished/lib/color/adjustHue' {
declare module.exports: any;
}
declare module 'polished/lib/color/complement' {
declare module.exports: any;
}
declare module 'polished/lib/color/darken' {
declare module.exports: any;
}
declare module 'polished/lib/color/desaturate' {
declare module.exports: any;
}
declare module 'polished/lib/color/getLuminance' {
declare module.exports: any;
}
declare module 'polished/lib/color/grayscale' {
declare module.exports: any;
}
declare module 'polished/lib/color/hsl' {
declare module.exports: any;
}
declare module 'polished/lib/color/hsla' {
declare module.exports: any;
}
declare module 'polished/lib/color/invert' {
declare module.exports: any;
}
declare module 'polished/lib/color/lighten' {
declare module.exports: any;
}
declare module 'polished/lib/color/mix' {
declare module.exports: any;
}
declare module 'polished/lib/color/opacify' {
declare module.exports: any;
}
declare module 'polished/lib/color/parseToHsl' {
declare module.exports: any;
}
declare module 'polished/lib/color/parseToRgb' {
declare module.exports: any;
}
declare module 'polished/lib/color/readableColor' {
declare module.exports: any;
}
declare module 'polished/lib/color/rgb' {
declare module.exports: any;
}
declare module 'polished/lib/color/rgba' {
declare module.exports: any;
}
declare module 'polished/lib/color/saturate' {
declare module.exports: any;
}
declare module 'polished/lib/color/setHue' {
declare module.exports: any;
}
declare module 'polished/lib/color/setLightness' {
declare module.exports: any;
}
declare module 'polished/lib/color/setSaturation' {
declare module.exports: any;
}
declare module 'polished/lib/color/shade' {
declare module.exports: any;
}
declare module 'polished/lib/color/tint' {
declare module.exports: any;
}
declare module 'polished/lib/color/toColorString' {
declare module.exports: any;
}
declare module 'polished/lib/color/transparentize' {
declare module.exports: any;
}
declare module 'polished/lib/helpers/directionalProperty' {
declare module.exports: any;
}
declare module 'polished/lib/helpers/em' {
declare module.exports: any;
}
declare module 'polished/lib/helpers/getValueAndUnit' {
declare module.exports: any;
}
declare module 'polished/lib/helpers/modularScale' {
declare module.exports: any;
}
declare module 'polished/lib/helpers/rem' {
declare module.exports: any;
}
declare module 'polished/lib/helpers/stripUnit' {
declare module.exports: any;
}
declare module 'polished/lib/index' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_capitalizeString' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_curry' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_endsWith' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_guard' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_hslToHex' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_hslToRgb' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_nameToHex' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_numberToHex' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_pxto' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_reduceHexValue' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_rgbToHsl' {
declare module.exports: any;
}
declare module 'polished/lib/internalHelpers/_statefulSelectors' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/between' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/clearFix' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/cover' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/ellipsis' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/fluidRange' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/fontFace' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/hideText' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/hideVisually' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/hiDPI' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/normalize' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/placeholder' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/radialGradient' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/retinaImage' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/selection' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/timingFunctions' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/triangle' {
declare module.exports: any;
}
declare module 'polished/lib/mixins/wordWrap' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/animation' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/backgroundImages' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/backgrounds' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/border' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/borderColor' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/borderRadius' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/borderStyle' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/borderWidth' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/buttons' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/margin' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/padding' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/position' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/size' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/textInputs' {
declare module.exports: any;
}
declare module 'polished/lib/shorthands/transitions' {
declare module.exports: any;
}
declare module 'polished/lib/types/color' {
declare module.exports: any;
}
declare module 'polished/lib/types/fluidRangeConfiguration' {
declare module.exports: any;
}
declare module 'polished/lib/types/fontFaceConfiguration' {
declare module.exports: any;
}
declare module 'polished/lib/types/interactionState' {
declare module.exports: any;
}
declare module 'polished/lib/types/modularScaleRatio' {
declare module.exports: any;
}
declare module 'polished/lib/types/radialGradientConfiguration' {
declare module.exports: any;
}
declare module 'polished/lib/types/sideKeyword' {
declare module.exports: any;
}
declare module 'polished/lib/types/style' {
declare module.exports: any;
}
declare module 'polished/lib/types/timingFunction' {
declare module.exports: any;
}
declare module 'polished/lib/types/triangleConfiguration' {
declare module.exports: any;
}
// Filename aliases
declare module 'polished/babel.config.js' {
declare module.exports: $Exports<'polished/babel.config'>;
}
declare module 'polished/dist/polished.es.js' {
declare module.exports: $Exports<'polished/dist/polished.es'>;
}
declare module 'polished/dist/polished.js' {
declare module.exports: $Exports<'polished/dist/polished'>;
}
declare module 'polished/dist/polished.min.js' {
declare module.exports: $Exports<'polished/dist/polished.min'>;
}
declare module 'polished/docs/assets/anchor.js' {
declare module.exports: $Exports<'polished/docs/assets/anchor'>;
}
declare module 'polished/docs/assets/docs.js' {
declare module.exports: $Exports<'polished/docs/assets/docs'>;
}
declare module 'polished/docs/assets/highlight.pack.js' {
declare module.exports: $Exports<'polished/docs/assets/highlight.pack'>;
}
declare module 'polished/docs/assets/polished.js' {
declare module.exports: $Exports<'polished/docs/assets/polished'>;
}
declare module 'polished/docs/assets/script.js' {
declare module.exports: $Exports<'polished/docs/assets/script'>;
}
declare module 'polished/lib/color/adjustHue.js' {
declare module.exports: $Exports<'polished/lib/color/adjustHue'>;
}
declare module 'polished/lib/color/complement.js' {
declare module.exports: $Exports<'polished/lib/color/complement'>;
}
declare module 'polished/lib/color/darken.js' {
declare module.exports: $Exports<'polished/lib/color/darken'>;
}
declare module 'polished/lib/color/desaturate.js' {
declare module.exports: $Exports<'polished/lib/color/desaturate'>;
}
declare module 'polished/lib/color/getLuminance.js' {
declare module.exports: $Exports<'polished/lib/color/getLuminance'>;
}
declare module 'polished/lib/color/grayscale.js' {
declare module.exports: $Exports<'polished/lib/color/grayscale'>;
}
declare module 'polished/lib/color/hsl.js' {
declare module.exports: $Exports<'polished/lib/color/hsl'>;
}
declare module 'polished/lib/color/hsla.js' {
declare module.exports: $Exports<'polished/lib/color/hsla'>;
}
declare module 'polished/lib/color/invert.js' {
declare module.exports: $Exports<'polished/lib/color/invert'>;
}
declare module 'polished/lib/color/lighten.js' {
declare module.exports: $Exports<'polished/lib/color/lighten'>;
}
declare module 'polished/lib/color/mix.js' {
declare module.exports: $Exports<'polished/lib/color/mix'>;
}
declare module 'polished/lib/color/opacify.js' {
declare module.exports: $Exports<'polished/lib/color/opacify'>;
}
declare module 'polished/lib/color/parseToHsl.js' {
declare module.exports: $Exports<'polished/lib/color/parseToHsl'>;
}
declare module 'polished/lib/color/parseToRgb.js' {
declare module.exports: $Exports<'polished/lib/color/parseToRgb'>;
}
declare module 'polished/lib/color/readableColor.js' {
declare module.exports: $Exports<'polished/lib/color/readableColor'>;
}
declare module 'polished/lib/color/rgb.js' {
declare module.exports: $Exports<'polished/lib/color/rgb'>;
}
declare module 'polished/lib/color/rgba.js' {
declare module.exports: $Exports<'polished/lib/color/rgba'>;
}
declare module 'polished/lib/color/saturate.js' {
declare module.exports: $Exports<'polished/lib/color/saturate'>;
}
declare module 'polished/lib/color/setHue.js' {
declare module.exports: $Exports<'polished/lib/color/setHue'>;
}
declare module 'polished/lib/color/setLightness.js' {
declare module.exports: $Exports<'polished/lib/color/setLightness'>;
}
declare module 'polished/lib/color/setSaturation.js' {
declare module.exports: $Exports<'polished/lib/color/setSaturation'>;
}
declare module 'polished/lib/color/shade.js' {
declare module.exports: $Exports<'polished/lib/color/shade'>;
}
declare module 'polished/lib/color/tint.js' {
declare module.exports: $Exports<'polished/lib/color/tint'>;
}
declare module 'polished/lib/color/toColorString.js' {
declare module.exports: $Exports<'polished/lib/color/toColorString'>;
}
declare module 'polished/lib/color/transparentize.js' {
declare module.exports: $Exports<'polished/lib/color/transparentize'>;
}
declare module 'polished/lib/helpers/directionalProperty.js' {
declare module.exports: $Exports<'polished/lib/helpers/directionalProperty'>;
}
declare module 'polished/lib/helpers/em.js' {
declare module.exports: $Exports<'polished/lib/helpers/em'>;
}
declare module 'polished/lib/helpers/getValueAndUnit.js' {
declare module.exports: $Exports<'polished/lib/helpers/getValueAndUnit'>;
}
declare module 'polished/lib/helpers/modularScale.js' {
declare module.exports: $Exports<'polished/lib/helpers/modularScale'>;
}
declare module 'polished/lib/helpers/rem.js' {
declare module.exports: $Exports<'polished/lib/helpers/rem'>;
}
declare module 'polished/lib/helpers/stripUnit.js' {
declare module.exports: $Exports<'polished/lib/helpers/stripUnit'>;
}
declare module 'polished/lib/index.js' {
declare module.exports: $Exports<'polished/lib/index'>;
}
declare module 'polished/lib/internalHelpers/_capitalizeString.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_capitalizeString'>;
}
declare module 'polished/lib/internalHelpers/_curry.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_curry'>;
}
declare module 'polished/lib/internalHelpers/_endsWith.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_endsWith'>;
}
declare module 'polished/lib/internalHelpers/_guard.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_guard'>;
}
declare module 'polished/lib/internalHelpers/_hslToHex.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_hslToHex'>;
}
declare module 'polished/lib/internalHelpers/_hslToRgb.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_hslToRgb'>;
}
declare module 'polished/lib/internalHelpers/_nameToHex.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_nameToHex'>;
}
declare module 'polished/lib/internalHelpers/_numberToHex.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_numberToHex'>;
}
declare module 'polished/lib/internalHelpers/_pxto.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_pxto'>;
}
declare module 'polished/lib/internalHelpers/_reduceHexValue.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_reduceHexValue'>;
}
declare module 'polished/lib/internalHelpers/_rgbToHsl.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_rgbToHsl'>;
}
declare module 'polished/lib/internalHelpers/_statefulSelectors.js' {
declare module.exports: $Exports<'polished/lib/internalHelpers/_statefulSelectors'>;
}
declare module 'polished/lib/mixins/between.js' {
declare module.exports: $Exports<'polished/lib/mixins/between'>;
}
declare module 'polished/lib/mixins/clearFix.js' {
declare module.exports: $Exports<'polished/lib/mixins/clearFix'>;
}
declare module 'polished/lib/mixins/cover.js' {
declare module.exports: $Exports<'polished/lib/mixins/cover'>;
}
declare module 'polished/lib/mixins/ellipsis.js' {
declare module.exports: $Exports<'polished/lib/mixins/ellipsis'>;
}
declare module 'polished/lib/mixins/fluidRange.js' {
declare module.exports: $Exports<'polished/lib/mixins/fluidRange'>;
}
declare module 'polished/lib/mixins/fontFace.js' {
declare module.exports: $Exports<'polished/lib/mixins/fontFace'>;
}
declare module 'polished/lib/mixins/hideText.js' {
declare module.exports: $Exports<'polished/lib/mixins/hideText'>;
}
declare module 'polished/lib/mixins/hideVisually.js' {
declare module.exports: $Exports<'polished/lib/mixins/hideVisually'>;
}
declare module 'polished/lib/mixins/hiDPI.js' {
declare module.exports: $Exports<'polished/lib/mixins/hiDPI'>;
}
declare module 'polished/lib/mixins/normalize.js' {
declare module.exports: $Exports<'polished/lib/mixins/normalize'>;
}
declare module 'polished/lib/mixins/placeholder.js' {
declare module.exports: $Exports<'polished/lib/mixins/placeholder'>;
}
declare module 'polished/lib/mixins/radialGradient.js' {
declare module.exports: $Exports<'polished/lib/mixins/radialGradient'>;
}
declare module 'polished/lib/mixins/retinaImage.js' {
declare module.exports: $Exports<'polished/lib/mixins/retinaImage'>;
}
declare module 'polished/lib/mixins/selection.js' {
declare module.exports: $Exports<'polished/lib/mixins/selection'>;
}
declare module 'polished/lib/mixins/timingFunctions.js' {
declare module.exports: $Exports<'polished/lib/mixins/timingFunctions'>;
}
declare module 'polished/lib/mixins/triangle.js' {
declare module.exports: $Exports<'polished/lib/mixins/triangle'>;
}
declare module 'polished/lib/mixins/wordWrap.js' {
declare module.exports: $Exports<'polished/lib/mixins/wordWrap'>;
}
declare module 'polished/lib/shorthands/animation.js' {
declare module.exports: $Exports<'polished/lib/shorthands/animation'>;
}
declare module 'polished/lib/shorthands/backgroundImages.js' {
declare module.exports: $Exports<'polished/lib/shorthands/backgroundImages'>;
}
declare module 'polished/lib/shorthands/backgrounds.js' {
declare module.exports: $Exports<'polished/lib/shorthands/backgrounds'>;
}
declare module 'polished/lib/shorthands/border.js' {
declare module.exports: $Exports<'polished/lib/shorthands/border'>;
}
declare module 'polished/lib/shorthands/borderColor.js' {
declare module.exports: $Exports<'polished/lib/shorthands/borderColor'>;
}
declare module 'polished/lib/shorthands/borderRadius.js' {
declare module.exports: $Exports<'polished/lib/shorthands/borderRadius'>;
}
declare module 'polished/lib/shorthands/borderStyle.js' {
declare module.exports: $Exports<'polished/lib/shorthands/borderStyle'>;
}
declare module 'polished/lib/shorthands/borderWidth.js' {
declare module.exports: $Exports<'polished/lib/shorthands/borderWidth'>;
}
declare module 'polished/lib/shorthands/buttons.js' {
declare module.exports: $Exports<'polished/lib/shorthands/buttons'>;
}
declare module 'polished/lib/shorthands/margin.js' {
declare module.exports: $Exports<'polished/lib/shorthands/margin'>;
}
declare module 'polished/lib/shorthands/padding.js' {
declare module.exports: $Exports<'polished/lib/shorthands/padding'>;
}
declare module 'polished/lib/shorthands/position.js' {
declare module.exports: $Exports<'polished/lib/shorthands/position'>;
}
declare module 'polished/lib/shorthands/size.js' {
declare module.exports: $Exports<'polished/lib/shorthands/size'>;
}
declare module 'polished/lib/shorthands/textInputs.js' {
declare module.exports: $Exports<'polished/lib/shorthands/textInputs'>;
}
declare module 'polished/lib/shorthands/transitions.js' {
declare module.exports: $Exports<'polished/lib/shorthands/transitions'>;
}
declare module 'polished/lib/types/color.js' {
declare module.exports: $Exports<'polished/lib/types/color'>;
}
declare module 'polished/lib/types/fluidRangeConfiguration.js' {
declare module.exports: $Exports<'polished/lib/types/fluidRangeConfiguration'>;
}
declare module 'polished/lib/types/fontFaceConfiguration.js' {
declare module.exports: $Exports<'polished/lib/types/fontFaceConfiguration'>;
}
declare module 'polished/lib/types/interactionState.js' {
declare module.exports: $Exports<'polished/lib/types/interactionState'>;
}
declare module 'polished/lib/types/modularScaleRatio.js' {
declare module.exports: $Exports<'polished/lib/types/modularScaleRatio'>;
}
declare module 'polished/lib/types/radialGradientConfiguration.js' {
declare module.exports: $Exports<'polished/lib/types/radialGradientConfiguration'>;
}
declare module 'polished/lib/types/sideKeyword.js' {
declare module.exports: $Exports<'polished/lib/types/sideKeyword'>;
}
declare module 'polished/lib/types/style.js' {
declare module.exports: $Exports<'polished/lib/types/style'>;
}
declare module 'polished/lib/types/timingFunction.js' {
declare module.exports: $Exports<'polished/lib/types/timingFunction'>;
}
declare module 'polished/lib/types/triangleConfiguration.js' {
declare module.exports: $Exports<'polished/lib/types/triangleConfiguration'>;
}

View File

@@ -1,34 +0,0 @@
// flow-typed signature: 3eaa1f24c7397b78a7481992d2cddcb2
// flow-typed version: a1a20d4928/prop-types_v15.x.x/flow_>=v0.41.x
type $npm$propTypes$ReactPropsCheckType = (
props: any,
propName: string,
componentName: string,
href?: string) => ?Error;
declare module 'prop-types' {
declare var array: React$PropType$Primitive<Array<any>>;
declare var bool: React$PropType$Primitive<boolean>;
declare var func: React$PropType$Primitive<Function>;
declare var number: React$PropType$Primitive<number>;
declare var object: React$PropType$Primitive<Object>;
declare var string: React$PropType$Primitive<string>;
declare var any: React$PropType$Primitive<any>;
declare var arrayOf: React$PropType$ArrayOf;
declare var element: React$PropType$Primitive<any>; /* TODO */
declare var instanceOf: React$PropType$InstanceOf;
declare var node: React$PropType$Primitive<any>; /* TODO */
declare var objectOf: React$PropType$ObjectOf;
declare var oneOf: React$PropType$OneOf;
declare var oneOfType: React$PropType$OneOfType;
declare var shape: React$PropType$Shape;
declare function checkPropTypes<V>(
propTypes: $Subtype<{[_: $Keys<V>]: $npm$propTypes$ReactPropsCheckType}>,
values: V,
location: string,
componentName: string,
getStack: ?(() => ?string)
) : void;
}

View File

@@ -1,60 +0,0 @@
// flow-typed signature: 844045a071365b8f4e9d7d1aac302959
// flow-typed version: <<STUB>>/react-autosuggest_v9.4.2/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-autosuggest'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'react-autosuggest' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'react-autosuggest/dist/Autosuggest' {
declare module.exports: any;
}
declare module 'react-autosuggest/dist/index' {
declare module.exports: any;
}
declare module 'react-autosuggest/dist/standalone/autosuggest' {
declare module.exports: any;
}
declare module 'react-autosuggest/dist/standalone/autosuggest.min' {
declare module.exports: any;
}
declare module 'react-autosuggest/dist/theme' {
declare module.exports: any;
}
// Filename aliases
declare module 'react-autosuggest/dist/Autosuggest.js' {
declare module.exports: $Exports<'react-autosuggest/dist/Autosuggest'>;
}
declare module 'react-autosuggest/dist/index.js' {
declare module.exports: $Exports<'react-autosuggest/dist/index'>;
}
declare module 'react-autosuggest/dist/standalone/autosuggest.js' {
declare module.exports: $Exports<'react-autosuggest/dist/standalone/autosuggest'>;
}
declare module 'react-autosuggest/dist/standalone/autosuggest.min.js' {
declare module.exports: $Exports<'react-autosuggest/dist/standalone/autosuggest.min'>;
}
declare module 'react-autosuggest/dist/theme.js' {
declare module.exports: $Exports<'react-autosuggest/dist/theme'>;
}

View File

@@ -1,60 +0,0 @@
// flow-typed signature: 70c6c9c1a5de74b9254304a0f8d6f61e
// flow-typed version: <<STUB>>/react-emotion_v9.x.x/flow_v0.77.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-emotion'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'react-emotion' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'react-emotion/dist/emotion.umd.min' {
declare module.exports: any;
}
declare module 'react-emotion/dist/index.cjs' {
declare module.exports: any;
}
declare module 'react-emotion/dist/index.esm' {
declare module.exports: any;
}
declare module 'react-emotion/macro' {
declare module.exports: any;
}
declare module 'react-emotion/src/index' {
declare module.exports: any;
}
// Filename aliases
declare module 'react-emotion/dist/emotion.umd.min.js' {
declare module.exports: $Exports<'react-emotion/dist/emotion.umd.min'>;
}
declare module 'react-emotion/dist/index.cjs.js' {
declare module.exports: $Exports<'react-emotion/dist/index.cjs'>;
}
declare module 'react-emotion/dist/index.esm.js' {
declare module.exports: $Exports<'react-emotion/dist/index.esm'>;
}
declare module 'react-emotion/macro.js' {
declare module.exports: $Exports<'react-emotion/macro'>;
}
declare module 'react-emotion/src/index.js' {
declare module.exports: $Exports<'react-emotion/src/index'>;
}

View File

@@ -1,158 +0,0 @@
// flow-typed signature: 7ef7e99bfa7953a438470755d51dc345
// flow-typed version: 107feb8c45/react-router-dom_v4.x.x/flow_>=v0.53.x
declare module "react-router-dom" {
declare export class BrowserRouter extends React$Component<{
basename?: string,
forceRefresh?: boolean,
getUserConfirmation?: GetUserConfirmation,
keyLength?: number,
children?: React$Node
}> {}
declare export class HashRouter extends React$Component<{
basename?: string,
getUserConfirmation?: GetUserConfirmation,
hashType?: "slash" | "noslash" | "hashbang",
children?: React$Node
}> {}
declare export class Link extends React$Component<{
to: string | LocationShape,
replace?: boolean,
children?: React$Node
}> {}
declare export class NavLink extends React$Component<{
to: string | LocationShape,
activeClassName?: string,
className?: string,
activeStyle?: Object,
style?: Object,
isActive?: (match: Match, location: Location) => boolean,
children?: React$Node,
exact?: boolean,
strict?: boolean
}> {}
// NOTE: Below are duplicated from react-router. If updating these, please
// update the react-router and react-router-native types as well.
declare export type Location = {
pathname: string,
search: string,
hash: string,
state?: any,
key?: string
};
declare export type LocationShape = {
pathname?: string,
search?: string,
hash?: string,
state?: any
};
declare export type HistoryAction = "PUSH" | "REPLACE" | "POP";
declare export type RouterHistory = {
length: number,
location: Location,
action: HistoryAction,
listen(
callback: (location: Location, action: HistoryAction) => void
): () => void,
push(path: string | LocationShape, state?: any): void,
replace(path: string | LocationShape, state?: any): void,
go(n: number): void,
goBack(): void,
goForward(): void,
canGo?: (n: number) => boolean,
block(
callback: (location: Location, action: HistoryAction) => boolean
): void,
// createMemoryHistory
index?: number,
entries?: Array<Location>
};
declare export type Match = {
params: { [key: string]: ?string },
isExact: boolean,
path: string,
url: string
};
declare export type ContextRouter = {|
history: RouterHistory,
location: Location,
match: Match
|};
declare export type GetUserConfirmation = (
message: string,
callback: (confirmed: boolean) => void
) => void;
declare type StaticRouterContext = {
url?: string
};
declare export class StaticRouter extends React$Component<{
basename?: string,
location?: string | Location,
context: StaticRouterContext,
children?: React$Node
}> {}
declare export class MemoryRouter extends React$Component<{
initialEntries?: Array<LocationShape | string>,
initialIndex?: number,
getUserConfirmation?: GetUserConfirmation,
keyLength?: number,
children?: React$Node
}> {}
declare export class Router extends React$Component<{
history: RouterHistory,
children?: React$Node
}> {}
declare export class Prompt extends React$Component<{
message: string | ((location: Location) => string | boolean),
when?: boolean
}> {}
declare export class Redirect extends React$Component<{
to: string | LocationShape,
push?: boolean
}> {}
declare export class Route extends React$Component<{
component?: React$ComponentType<*>,
render?: (router: ContextRouter) => React$Node,
children?: React$ComponentType<ContextRouter> | React$Node,
path?: string,
exact?: boolean,
strict?: boolean
}> {}
declare export class Switch extends React$Component<{
children?: React$Node
}> {}
declare export function withRouter<P>(
Component: React$ComponentType<{| ...ContextRouter, ...P |}>
): React$ComponentType<P>;
declare type MatchPathOptions = {
path?: string,
exact?: boolean,
sensitive?: boolean,
strict?: boolean
};
declare export function matchPath(
pathname: string,
options?: MatchPathOptions | string
): null | Match;
}

View File

@@ -1,199 +0,0 @@
// flow-typed signature: 4fb3dfe55b5d1711432e74df5fa80adc
// flow-typed version: <<STUB>>/react-router_v4.3.1/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* 'react-router'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'react-router' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'react-router/es/generatePath' {
declare module.exports: any;
}
declare module 'react-router/es/index' {
declare module.exports: any;
}
declare module 'react-router/es/matchPath' {
declare module.exports: any;
}
declare module 'react-router/es/MemoryRouter' {
declare module.exports: any;
}
declare module 'react-router/es/Prompt' {
declare module.exports: any;
}
declare module 'react-router/es/Redirect' {
declare module.exports: any;
}
declare module 'react-router/es/Route' {
declare module.exports: any;
}
declare module 'react-router/es/Router' {
declare module.exports: any;
}
declare module 'react-router/es/RouterContext' {
declare module.exports: any;
}
declare module 'react-router/es/StaticRouter' {
declare module.exports: any;
}
declare module 'react-router/es/Switch' {
declare module.exports: any;
}
declare module 'react-router/es/withRouter' {
declare module.exports: any;
}
declare module 'react-router/generatePath' {
declare module.exports: any;
}
declare module 'react-router/matchPath' {
declare module.exports: any;
}
declare module 'react-router/MemoryRouter' {
declare module.exports: any;
}
declare module 'react-router/Prompt' {
declare module.exports: any;
}
declare module 'react-router/Redirect' {
declare module.exports: any;
}
declare module 'react-router/Route' {
declare module.exports: any;
}
declare module 'react-router/Router' {
declare module.exports: any;
}
declare module 'react-router/StaticRouter' {
declare module.exports: any;
}
declare module 'react-router/Switch' {
declare module.exports: any;
}
declare module 'react-router/umd/react-router' {
declare module.exports: any;
}
declare module 'react-router/umd/react-router.min' {
declare module.exports: any;
}
declare module 'react-router/withRouter' {
declare module.exports: any;
}
// Filename aliases
declare module 'react-router/es/generatePath.js' {
declare module.exports: $Exports<'react-router/es/generatePath'>;
}
declare module 'react-router/es/index.js' {
declare module.exports: $Exports<'react-router/es/index'>;
}
declare module 'react-router/es/matchPath.js' {
declare module.exports: $Exports<'react-router/es/matchPath'>;
}
declare module 'react-router/es/MemoryRouter.js' {
declare module.exports: $Exports<'react-router/es/MemoryRouter'>;
}
declare module 'react-router/es/Prompt.js' {
declare module.exports: $Exports<'react-router/es/Prompt'>;
}
declare module 'react-router/es/Redirect.js' {
declare module.exports: $Exports<'react-router/es/Redirect'>;
}
declare module 'react-router/es/Route.js' {
declare module.exports: $Exports<'react-router/es/Route'>;
}
declare module 'react-router/es/Router.js' {
declare module.exports: $Exports<'react-router/es/Router'>;
}
declare module 'react-router/es/RouterContext.js' {
declare module.exports: $Exports<'react-router/es/RouterContext'>;
}
declare module 'react-router/es/StaticRouter.js' {
declare module.exports: $Exports<'react-router/es/StaticRouter'>;
}
declare module 'react-router/es/Switch.js' {
declare module.exports: $Exports<'react-router/es/Switch'>;
}
declare module 'react-router/es/withRouter.js' {
declare module.exports: $Exports<'react-router/es/withRouter'>;
}
declare module 'react-router/generatePath.js' {
declare module.exports: $Exports<'react-router/generatePath'>;
}
declare module 'react-router/index' {
declare module.exports: $Exports<'react-router'>;
}
declare module 'react-router/index.js' {
declare module.exports: $Exports<'react-router'>;
}
declare module 'react-router/matchPath.js' {
declare module.exports: $Exports<'react-router/matchPath'>;
}
declare module 'react-router/MemoryRouter.js' {
declare module.exports: $Exports<'react-router/MemoryRouter'>;
}
declare module 'react-router/Prompt.js' {
declare module.exports: $Exports<'react-router/Prompt'>;
}
declare module 'react-router/Redirect.js' {
declare module.exports: $Exports<'react-router/Redirect'>;
}
declare module 'react-router/Route.js' {
declare module.exports: $Exports<'react-router/Route'>;
}
declare module 'react-router/Router.js' {
declare module.exports: $Exports<'react-router/Router'>;
}
declare module 'react-router/StaticRouter.js' {
declare module.exports: $Exports<'react-router/StaticRouter'>;
}
declare module 'react-router/Switch.js' {
declare module.exports: $Exports<'react-router/Switch'>;
}
declare module 'react-router/umd/react-router.js' {
declare module.exports: $Exports<'react-router/umd/react-router'>;
}
declare module 'react-router/umd/react-router.min.js' {
declare module.exports: $Exports<'react-router/umd/react-router.min'>;
}
declare module 'react-router/withRouter.js' {
declare module.exports: $Exports<'react-router/withRouter'>;
}

View File

@@ -1,108 +0,0 @@
// flow-typed signature: fce684fdcdf9c74363f2c0bf136dbf88
// flow-typed version: <<STUB>>/request_v2.83.0/flow_v0.64.0
/**
* This is an autogenerated libdef stub for:
*
* 'request'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'request' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'request/lib/auth' {
declare module.exports: any;
}
declare module 'request/lib/cookies' {
declare module.exports: any;
}
declare module 'request/lib/getProxyFromURI' {
declare module.exports: any;
}
declare module 'request/lib/har' {
declare module.exports: any;
}
declare module 'request/lib/helpers' {
declare module.exports: any;
}
declare module 'request/lib/multipart' {
declare module.exports: any;
}
declare module 'request/lib/oauth' {
declare module.exports: any;
}
declare module 'request/lib/querystring' {
declare module.exports: any;
}
declare module 'request/lib/redirect' {
declare module.exports: any;
}
declare module 'request/lib/tunnel' {
declare module.exports: any;
}
declare module 'request/request' {
declare module.exports: any;
}
// Filename aliases
declare module 'request/index' {
declare module.exports: $Exports<'request'>;
}
declare module 'request/index.js' {
declare module.exports: $Exports<'request'>;
}
declare module 'request/lib/auth.js' {
declare module.exports: $Exports<'request/lib/auth'>;
}
declare module 'request/lib/cookies.js' {
declare module.exports: $Exports<'request/lib/cookies'>;
}
declare module 'request/lib/getProxyFromURI.js' {
declare module.exports: $Exports<'request/lib/getProxyFromURI'>;
}
declare module 'request/lib/har.js' {
declare module.exports: $Exports<'request/lib/har'>;
}
declare module 'request/lib/helpers.js' {
declare module.exports: $Exports<'request/lib/helpers'>;
}
declare module 'request/lib/multipart.js' {
declare module.exports: $Exports<'request/lib/multipart'>;
}
declare module 'request/lib/oauth.js' {
declare module.exports: $Exports<'request/lib/oauth'>;
}
declare module 'request/lib/querystring.js' {
declare module.exports: $Exports<'request/lib/querystring'>;
}
declare module 'request/lib/redirect.js' {
declare module.exports: $Exports<'request/lib/redirect'>;
}
declare module 'request/lib/tunnel.js' {
declare module.exports: $Exports<'request/lib/tunnel'>;
}
declare module 'request/request.js' {
declare module.exports: $Exports<'request/request'>;
}

View File

@@ -1,18 +0,0 @@
// flow-typed signature: 1dff23447d5e18f5ac2b05aaec7cfb74
// flow-typed version: a453e98ea2/rimraf_v2.x.x/flow_>=v0.25.0
declare module 'rimraf' {
declare type Options = {
maxBusyTries?: number,
emfileWait?: number,
glob?: boolean,
disableGlob?: boolean
};
declare type Callback = (err: ?Error, path: ?string) => void;
declare module.exports: {
(f: string, opts?: Options | Callback, callback?: Callback): void;
sync(path: string, opts?: Options): void;
};
}

View File

@@ -1,198 +0,0 @@
// flow-typed signature: dc381ee55406f66b7272c6343db0834b
// flow-typed version: da30fe6876/semver_v5.1.x/flow_>=v0.25.x
declare module "semver" {
declare type Release =
| "major"
| "premajor"
| "minor"
| "preminor"
| "patch"
| "prepatch"
| "prerelease";
// The supported comparators are taken from the source here:
// https://github.com/npm/node-semver/blob/8bd070b550db2646362c9883c8d008d32f66a234/semver.js#L623
declare type Operator =
| "==="
| "!=="
| "=="
| "="
| "" // Not sure why you would want this, but whatever.
| "!="
| ">"
| ">="
| "<"
| "<=";
declare class SemVer {
build: Array<string>;
loose: ?boolean;
major: number;
minor: number;
patch: number;
prerelease: Array<string | number>;
raw: string;
version: string;
constructor(version: string | SemVer, loose?: boolean): SemVer;
compare(other: string | SemVer): -1 | 0 | 1;
compareMain(other: string | SemVer): -1 | 0 | 1;
comparePre(other: string | SemVer): -1 | 0 | 1;
format(): string;
inc(release: Release, identifier: string): this;
}
declare class Comparator {
loose?: boolean;
operator: Operator;
semver: SemVer;
value: string;
constructor(comp: string | Comparator, loose?: boolean): Comparator;
parse(comp: string): void;
test(version: string): boolean;
}
declare class Range {
loose: ?boolean;
raw: string;
set: Array<Array<Comparator>>;
constructor(range: string | Range, loose?: boolean): Range;
format(): string;
parseRange(range: string): Array<Comparator>;
test(version: string): boolean;
toString(): string;
}
declare var SEMVER_SPEC_VERSION: string;
declare var re: Array<RegExp>;
declare var src: Array<string>;
// Functions
declare function valid(v: string | SemVer, loose?: boolean): string | null;
declare function clean(v: string | SemVer, loose?: boolean): string | null;
declare function inc(
v: string | SemVer,
release: Release,
loose?: boolean,
identifier?: string
): string | null;
declare function inc(
v: string | SemVer,
release: Release,
identifier: string
): string | null;
declare function major(v: string | SemVer, loose?: boolean): number;
declare function minor(v: string | SemVer, loose?: boolean): number;
declare function patch(v: string | SemVer, loose?: boolean): number;
// Comparison
declare function gt(
v1: string | SemVer,
v2: string | SemVer,
loose?: boolean
): boolean;
declare function gte(
v1: string | SemVer,
v2: string | SemVer,
loose?: boolean
): boolean;
declare function lt(
v1: string | SemVer,
v2: string | SemVer,
loose?: boolean
): boolean;
declare function lte(
v1: string | SemVer,
v2: string | SemVer,
loose?: boolean
): boolean;
declare function eq(
v1: string | SemVer,
v2: string | SemVer,
loose?: boolean
): boolean;
declare function neq(
v1: string | SemVer,
v2: string | SemVer,
loose?: boolean
): boolean;
declare function cmp(
v1: string | SemVer,
comparator: Operator,
v2: string | SemVer,
loose?: boolean
): boolean;
declare function compare(
v1: string | SemVer,
v2: string | SemVer,
loose?: boolean
): -1 | 0 | 1;
declare function rcompare(
v1: string | SemVer,
v2: string | SemVer,
loose?: boolean
): -1 | 0 | 1;
declare function compareLoose(
v1: string | SemVer,
v2: string | SemVer
): -1 | 0 | 1;
declare function diff(v1: string | SemVer, v2: string | SemVer): ?Release;
declare function sort(
list: Array<string | SemVer>,
loose?: boolean
): Array<string | SemVer>;
declare function rsort(
list: Array<string | SemVer>,
loose?: boolean
): Array<string | SemVer>;
declare function compareIdentifiers(
v1: string | SemVer,
v2: string | SemVer
): -1 | 0 | 1;
declare function rcompareIdentifiers(
v1: string | SemVer,
v2: string | SemVer
): -1 | 0 | 1;
// Ranges
declare function validRange(
range: string | Range,
loose?: boolean
): string | null;
declare function satisfies(
version: string | SemVer,
range: string | Range,
loose?: boolean
): boolean;
declare function maxSatisfying(
versions: Array<string | SemVer>,
range: string | Range,
loose?: boolean
): string | SemVer | null;
declare function gtr(
version: string | SemVer,
range: string | Range,
loose?: boolean
): boolean;
declare function ltr(
version: string | SemVer,
range: string | Range,
loose?: boolean
): boolean;
declare function outside(
version: string | SemVer,
range: string | Range,
hilo: ">" | "<",
loose?: boolean
): boolean;
// Not explicitly documented, or deprecated
declare function parse(version: string, loose?: boolean): ?SemVer;
declare function toComparators(
range: string | Range,
loose?: boolean
): Array<Array<string>>;
}

View File

@@ -1,52 +0,0 @@
// flow-typed signature: 92c970084ff90673c82c72604aa26f27
// flow-typed version: <<STUB>>/supertest_v3.x.x/flow_v0.69.0
/**
* This is an autogenerated libdef stub for:
*
* 'supertest'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'supertest' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'supertest/lib/agent' {
declare module.exports: any;
}
declare module 'supertest/lib/test' {
declare module.exports: any;
}
declare module 'supertest/test/supertest' {
declare module.exports: any;
}
// Filename aliases
declare module 'supertest/index' {
declare module.exports: $Exports<'supertest'>;
}
declare module 'supertest/index.js' {
declare module.exports: $Exports<'supertest'>;
}
declare module 'supertest/lib/agent.js' {
declare module.exports: $Exports<'supertest/lib/agent'>;
}
declare module 'supertest/lib/test.js' {
declare module.exports: $Exports<'supertest/lib/test'>;
}
declare module 'supertest/test/supertest.js' {
declare module.exports: $Exports<'supertest/test/supertest'>;
}

View File

@@ -4,10 +4,15 @@ module.exports = {
name: 'verdaccio-unit-jest',
verbose: true,
collectCoverage: true,
reporters: ["default", ["jest-junit", { outputDirectory: 'reports' }]],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
testURL: 'http://localhost',
testRegex: '(test/unit.*\\.spec|test/unit/webui/.*\\.spec)\\.js',
// Some unit tests rely on data folders that look like packages. This confuses jest-hast-map
// when it tries to scan for package.json files.
testRegex: '(test/unit.*\\.spec)\\.ts',
// Some unit tests rely on data folders that look like packages. This confuses jest-hast-map
// when it tries to scan for package.json files.
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest'
},
modulePathIgnorePatterns: [
'<rootDir>/test/unit/partials/mock-store/.*/package.json',
'<rootDir>/test/functional/store/.*/package.json',

View File

@@ -1,6 +1,6 @@
{
"name": "verdaccio",
"version": "4.0.1",
"version": "4.3.5",
"description": "A lightweight private npm proxy registry",
"author": {
"name": "Verdaccio Maintainers",
@@ -10,76 +10,86 @@
"type": "git",
"url": "git://github.com/verdaccio/verdaccio"
},
"homepage": "https://verdaccio.org",
"main": "build/index.js",
"bin": {
"verdaccio": "./bin/verdaccio"
},
"dependencies": {
"@verdaccio/local-storage": "2.1.0",
"@verdaccio/streams": "2.0.0",
"@verdaccio/readme": "1.0.3",
"@verdaccio/ui-theme": "0.1.10",
"@verdaccio/commons-api": "8.3.0",
"@verdaccio/local-storage": "8.2.0",
"@verdaccio/readme": "8.2.0",
"@verdaccio/streams": "8.2.0",
"@verdaccio/ui-theme": "0.3.2",
"JSONStream": "1.3.5",
"async": "3.0.1-0",
"async": "3.1.0",
"body-parser": "1.19.0",
"bunyan": "1.8.12",
"commander": "2.20.0",
"commander": "3.0.2",
"compression": "1.7.4",
"cookies": "0.7.3",
"cors": "2.8.5",
"dayjs": "1.8.13",
"express": "4.16.4",
"handlebars": "4.1.2",
"http-errors": "1.7.2",
"dayjs": "1.8.17",
"envinfo": "7.4.0",
"express": "4.17.1",
"handlebars": "4.5.3",
"http-errors": "1.7.3",
"js-yaml": "3.13.1",
"jsonwebtoken": "8.5.1",
"kleur": "3.0.3",
"lodash": "4.17.11",
"lockfile-lint": "2.0.1",
"lodash": "4.17.15",
"lunr-mutable-indexes": "2.3.2",
"marked": "0.6.2",
"mime": "2.4.2",
"marked": "0.7.0",
"mime": "2.4.4",
"minimatch": "3.0.4",
"mkdirp": "0.5.1",
"mv": "2.1.1",
"pkginfo": "0.4.1",
"request": "2.87.0",
"semver": "6.0.0",
"verdaccio-audit": "1.2.0",
"verdaccio-htpasswd": "2.0.0"
"semver": "6.3.0",
"verdaccio-audit": "8.1.4",
"verdaccio-htpasswd": "8.2.0"
},
"devDependencies": {
"@commitlint/cli": "7.5.2",
"@commitlint/config-conventional": "7.5.0",
"@octokit/rest": "16.25.0",
"@verdaccio/babel-preset": "0.1.0",
"@verdaccio/types": "5.0.0-beta.4",
"codecov": "3.3.0",
"cross-env": "5.2.0",
"@commitlint/cli": "8.2.0",
"@commitlint/config-conventional": "8.2.0",
"@octokit/rest": "16.28.9",
"@types/async": "3.0.3",
"@types/bunyan": "1.8.6",
"@types/express": "4.17.1",
"@types/http-errors": "1.6.2",
"@types/jest": "24.0.23",
"@types/lodash": "4.14.148",
"@types/mime": "2.0.1",
"@types/minimatch": "3.0.3",
"@types/node": "12.7.8",
"@types/request": "2.48.3",
"@types/semver": "6.2.0",
"@typescript-eslint/eslint-plugin": "2.1.0",
"@verdaccio/babel-preset": "8.1.0",
"@verdaccio/eslint-config": "8.1.0",
"@verdaccio/types": "8.1.0",
"codecov": "3.5.0",
"cross-env": "6.0.3",
"detect-secrets": "1.0.5",
"eslint": "5.16.0",
"eslint-config-google": "0.12.0",
"eslint-config-prettier": "4.2.0",
"eslint-plugin-babel": "5.3.0",
"eslint-plugin-flowtype": "3.6.1",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-verdaccio": "0.0.5",
"flow-bin": "0.81.0",
"flow-runtime": "0.17.0",
"get-stdin": "7.0.0",
"husky": "2.1.0",
"husky": "2.7.0",
"in-publish": "2.0.0",
"jest": "24.7.1",
"jest-environment-node": "24.7.1",
"lint-staged": "8.1.5",
"prettier": "1.17.0",
"jest": "24.9.0",
"jest-environment-node": "24.9.0",
"jest-junit": "9.0.0",
"lint-staged": "8.2.1",
"nock": "11.3.3",
"prettier": "1.18.2",
"puppeteer": "1.8.0",
"rimraf": "2.6.3",
"standard-version": "5.0.2",
"rimraf": "3.0.0",
"standard-version": "7.0.0",
"supertest": "4.0.2",
"verdaccio-auth-memory": "0.0.4",
"verdaccio-memory": "2.0.0"
"typescript": "3.7.1-rc",
"verdaccio-auth-memory": "8.3.0",
"verdaccio-memory": "8.2.0"
},
"keywords": [
"private",
@@ -95,7 +105,8 @@
"scripts": {
"release": "standard-version -a -s",
"prepublish": "in-publish && npm run code:build || not-in-publish",
"flow": "flow check",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch",
"pretest": "npm run code:build",
"test": "npm run test:unit",
"test:clean": "npx jest --clearCache",
@@ -105,12 +116,14 @@
"test:all": "npm run test && npm run test:functional && npm run test:e2e",
"pre:ci": "npm run lint",
"coverage:publish": "codecov",
"lint": "npm run flow && npm run lint:js",
"lint:js": "eslint .",
"dev:start": "cross-env BABEL_ENV=registry babel-node src/lib/cli",
"code:build": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files",
"code:docker-build": "cross-env BABEL_ENV=registry-docker babel src/ --out-dir build/ --copy-files",
"build:docker": "docker build -t verdaccio . --no-cache"
"lint": "npm run type-check && npm run lint:ts && npm run lint:lockfile",
"lint:ts": "eslint . --ext .js,.ts",
"lint:lockfile": "lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts verdaccio npm yarn",
"format": "prettier --single-quote --trailing-comma none --write \"{src,test}/**/*.ts\"",
"dev:start": "cross-env BABEL_ENV=registry babel-node --extensions \".ts,.tsx\" src/lib/cli",
"code:build": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps inline",
"code:docker-build": "cross-env BABEL_ENV=registry-docker babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\"",
"build:docker": "docker build -t verdaccio/verdaccio:local . --no-cache"
},
"engines": {
"node": ">=8",
@@ -124,14 +137,17 @@
}
},
"lint-staged": {
"relative": true,
"linters": {
"*.yaml": [
"prettier --parser yaml --no-config --single-quote --write",
"detect-secrets-launcher --baseline .secrets-baseline",
"git add"
],
"*": [
"eslint .",
"prettier --write",
"detect-secrets-launcher --baseline .secrets-baseline",
"git add"
]
},

View File

@@ -1,15 +1,10 @@
/**
* @prettier
* @flow
*/
import _ from 'lodash';
import type { $Application } from 'express';
import type { $ResponseExtend, $RequestExtend, $NextFunctionVer } from '../../../types';
import { Application } from 'express';
import { $ResponseExtend, $RequestExtend, $NextFunctionVer } from '../../../types';
export default (app: $Application, selfPath: string) => {
export default (app: Application, selfPath: string): void => {
// Hook for tests only
app.get('/-/_debug', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
app.get('/-/_debug', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const doGarbabeCollector = _.isNil(global.gc) === false;
if (doGarbabeCollector) {
@@ -18,6 +13,7 @@ export default (app: $Application, selfPath: string) => {
next({
pid: process.pid,
// @ts-ignore
main: process.mainModule.filename,
conf: selfPath,
mem: process.memoryUsage(),

View File

@@ -1,25 +1,22 @@
/**
* @prettier
* @flow
*/
import mime from 'mime';
import _ from 'lodash';
import { media, allow } from '../../middleware';
import type { Router } from 'express';
import type { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import{ Router } from 'express';
import{ IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import { API_MESSAGE, HTTP_STATUS, DIST_TAGS } from '../../../lib/constants';
import { VerdaccioError } from '@verdaccio/commons-api';
import { Package } from '@verdaccio/types';
export default function(route: Router, auth: IAuth, storage: IStorageHandler) {
export default function(route: Router, auth: IAuth, storage: IStorageHandler): void {
const can = allow(auth);
const tag_package_version = function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
const tag_package_version = function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): $NextFunctionVer {
if (_.isString(req.body) === false) {
return next('route');
}
const tags = {};
tags[req.params.tag] = req.body;
storage.mergeTags(req.params.package, tags, function(err) {
storage.mergeTags(req.params.package, tags, function(err: Error): $NextFunctionVer {
if (err) {
return next(err);
}
@@ -35,10 +32,10 @@ export default function(route: Router, auth: IAuth, storage: IStorageHandler) {
route.put('/-/package/:package/dist-tags/:tag', can('publish'), media(mime.getType('json')), tag_package_version);
route.delete('/-/package/:package/dist-tags/:tag', can('publish'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
route.delete('/-/package/:package/dist-tags/:tag', can('publish'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const tags = {};
tags[req.params.tag] = null;
storage.mergeTags(req.params.package, tags, function(err) {
storage.mergeTags(req.params.package, tags, function(err: VerdaccioError): $NextFunctionVer {
if (err) {
return next(err);
}
@@ -49,12 +46,12 @@ export default function(route: Router, auth: IAuth, storage: IStorageHandler) {
});
});
route.get('/-/package/:package/dist-tags', can('access'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
route.get('/-/package/:package/dist-tags', can('access'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
storage.getPackage({
name: req.params.package,
uplinksLook: true,
req,
callback: function(err, info) {
callback: function(err: VerdaccioError, info: Package): $NextFunctionVer {
if (err) {
return next(err);
}
@@ -64,8 +61,8 @@ export default function(route: Router, auth: IAuth, storage: IStorageHandler) {
});
});
route.post('/-/package/:package/dist-tags', can('publish'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
storage.mergeTags(req.params.package, req.body, function(err) {
route.post('/-/package/:package/dist-tags', can('publish'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
storage.mergeTags(req.params.package, req.body, function(err: VerdaccioError): $NextFunctionVer {
if (err) {
return next(err);
}

View File

@@ -1,23 +1,19 @@
/**
* @prettier
* @flow
*/
import _ from 'lodash';
import { allow } from '../../middleware';
import { convertDistRemoteToLocalTarballUrls, getVersion, ErrorCode } from '../../../lib/utils';
import { HEADERS, DIST_TAGS, API_ERROR } from '../../../lib/constants';
import type { Router } from 'express';
import type { Config } from '@verdaccio/types';
import type { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import { Router } from 'express';
import { Config, Package } from '@verdaccio/types';
import { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
const downloadStream = (packageName: string, filename: string, storage: any, req: $RequestExtend, res: $ResponseExtend) => {
const downloadStream = (packageName: string, filename: string, storage: any, req: $RequestExtend, res: $ResponseExtend): void => {
const stream = storage.getTarball(packageName, filename);
stream.on('content-length', function(content) {
stream.on('content-length', function(content): void {
res.header('Content-Length', content);
});
stream.on('error', function(err) {
stream.on('error', function(err): void {
return res.report_error(err);
});
@@ -25,11 +21,11 @@ const downloadStream = (packageName: string, filename: string, storage: any, req
stream.pipe(res);
};
export default function(route: Router, auth: IAuth, storage: IStorageHandler, config: Config) {
export default function(route: Router, auth: IAuth, storage: IStorageHandler, config: Config): void {
const can = allow(auth);
// TODO: anonymous user?
route.get('/:package/:version?', can('access'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
const getPackageMetaCallback = function(err, metadata) {
route.get('/:package/:version?', can('access'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const getPackageMetaCallback = function(err, metadata: Package): void {
if (err) {
return next(err);
}
@@ -65,13 +61,13 @@ export default function(route: Router, auth: IAuth, storage: IStorageHandler, co
});
});
route.get('/:scopedPackage/-/:scope/:filename', can('access'), function(req: $RequestExtend, res: $ResponseExtend) {
route.get('/:scopedPackage/-/:scope/:filename', can('access'), function(req: $RequestExtend, res: $ResponseExtend): void {
const { scopedPackage, filename } = req.params;
downloadStream(scopedPackage, filename, storage, req, res);
});
route.get('/:package/-/:filename', can('access'), function(req: $RequestExtend, res: $ResponseExtend) {
route.get('/:package/-/:filename', can('access'), function(req: $RequestExtend, res: $ResponseExtend): void {
downloadStream(req.params.package, req.params.filename, storage, req, res);
});
}

View File

@@ -1,13 +0,0 @@
/**
* @prettier
* @flow
*/
import type { Router } from 'express';
import type { $RequestExtend, $ResponseExtend, $NextFunctionVer } from '../../../../types';
export default function(route: Router) {
route.get('/-/ping', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
next({});
});
}

View File

@@ -0,0 +1,13 @@
/**
* @prettier
* @flow
*/
import { Router } from 'express';
import { $RequestExtend, $ResponseExtend, $NextFunctionVer } from '../../../../types';
export default function(route: Router): void {
route.get('/-/ping', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
next({});
});
}

View File

@@ -1,30 +1,91 @@
/**
* @prettier
* @flow
*/
import _ from 'lodash';
import Path from 'path';
import mime from 'mime';
import { API_MESSAGE, HEADERS, DIST_TAGS, API_ERROR, HTTP_STATUS } from '../../../lib/constants';
import { validateMetadata, isObject, ErrorCode } from '../../../lib/utils';
import {validateMetadata, isObject, ErrorCode, hasDiffOneKey} from '../../../lib/utils';
import { media, expectJson, allow } from '../../middleware';
import { notify } from '../../../lib/notify';
import star from './star';
import type { Router } from 'express';
import type { Config, Callback, MergeTags, Version } from '@verdaccio/types';
import type { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import logger from '../../../lib/logger';
import { Router } from 'express';
import { Config, Callback, MergeTags, Version, Package } from '@verdaccio/types';
import { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import { logger } from '../../../lib/logger';
import {isPublishablePackage} from "../../../lib/storage-utils";
export default function publish(router: Router, auth: IAuth, storage: IStorageHandler, config: Config) {
export default function publish(router: Router, auth: IAuth, storage: IStorageHandler, config: Config): void {
const can = allow(auth);
// publishing a package
router.put('/:package/:_rev?/:revision?', can('publish'), media(mime.getType('json')), expectJson, publishPackage(storage, config));
/**
* Publish a package / update package / un/start a package
*
* There are multiples scenarios here to be considered:
*
* 1. Publish scenario
*
* Publish a package consist of at least 1 step (PUT) with a metadata payload.
* When a package is published, an _attachment property is present that contains the data
* of the tarball.
*
* Example flow of publish.
*
* npm http fetch PUT 201 http://localhost:4873/@scope%2ftest1 9627ms
npm info lifecycle @scope/test1@1.0.1~publish: @scope/test1@1.0.1
npm info lifecycle @scope/test1@1.0.1~postpublish: @scope/test1@1.0.1
+ @scope/test1@1.0.1
npm verb exit [ 0, true ]
*
*
* 2. Unpublish scenario
*
* Unpublish consist in 3 steps.
* 1. Try to fetch metadata -> if it fails, return 404
* 2. Compute metadata locally (client side) and send a mutate payload excluding the version to be unpublished
* eg: if metadata reflects 1.0.1, 1.0.2 and 1.0.3, the computed metadata won't include 1.0.3.
* 3. Once the second step has been successfully finished, delete the tarball.
*
* All these steps are consecutive and required, there is no transacions here, if step 3 fails, metadata might
* get corrupted.
*
* Note the unpublish call will suffix in the url a /-rev/14-5d500cfce92f90fd revision number, this not
* used internally.
*
*
* Example flow of unpublish.
*
* npm http fetch GET 200 http://localhost:4873/@scope%2ftest1?write=true 1680ms
npm http fetch PUT 201 http://localhost:4873/@scope%2ftest1/-rev/14-5d500cfce92f90fd 956606ms attempt #2
npm http fetch GET 200 http://localhost:4873/@scope%2ftest1?write=true 1601ms
npm http fetch DELETE 201 http://localhost:4873/@scope%2ftest1/-/test1-1.0.3.tgz/-rev/16-e11c8db282b2d992 19ms
*
* 3. Star a package
*
* Permissions: start a package depends of the publish and unpublish permissions, there is no specific flag for star or un start.
* The URL for star is similar to the unpublish (change package format)
*
* npm has no enpoint for star a package, rather mutate the metadata and acts as, the difference is the
* users property which is part of the payload and the body only includes
*
* {
"_id": pkgName,
"_rev": "3-b0cdaefc9bdb77c8",
"users": {
[username]: boolean value (true, false)
}
}
*
*/
router.put('/:package/:_rev?/:revision?', can('publish'), media(mime.getType('json')), expectJson, publishPackage(storage, config, auth));
// un-publishing an entire package
/**
* Un-publishing an entire package.
*
* This scenario happens when the first call detect there is only one version remaining
* in the metadata, then the client decides to DELETE the resource
* npm http fetch GET 304 http://localhost:4873/@scope%2ftest1?write=true 1076ms (from cache)
npm http fetch DELETE 201 http://localhost:4873/@scope%2ftest1/-rev/18-d8ebe3020bd4ac9c 22ms
*/
router.delete('/:package/-rev/*', can('unpublish'), unPublishPackage(storage));
// removing a tarball
@@ -40,14 +101,17 @@ export default function publish(router: Router, auth: IAuth, storage: IStorageHa
/**
* Publish a package
*/
export function publishPackage(storage: IStorageHandler, config: Config) {
export function publishPackage(storage: IStorageHandler, config: Config, auth: IAuth): any {
const starApi = star(storage);
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const packageName = req.params.package;
logger.debug({packageName} , `publishing or updating a new version for @{packageName}`);
/**
* Write tarball of stream data from package clients.
*/
const createTarball = function(filename: string, data, cb: Callback) {
const createTarball = function(filename: string, data, cb: Callback): void {
const stream = storage.addTarball(packageName, filename);
stream.on('error', function(err) {
cb(err);
@@ -64,22 +128,23 @@ export function publishPackage(storage: IStorageHandler, config: Config) {
/**
* Add new package version in storage
*/
const createVersion = function(version: string, metadata: Version, cb: Callback) {
const createVersion = function(version: string, metadata: Version, cb: Callback): void {
storage.addVersion(packageName, version, metadata, null, cb);
};
/**
* Add new tags in storage
*/
const addTags = function(tags: MergeTags, cb: Callback) {
const addTags = function(tags: MergeTags, cb: Callback): void {
storage.mergeTags(packageName, tags, cb);
};
const afterChange = function(error, okMessage, metadata) {
const metadataCopy = { ...metadata };
const afterChange = function(error, okMessage, metadata): void {
const metadataCopy: Package = { ...metadata };
const { _attachments, versions } = metadataCopy;
// old npm behavior, if there is no attachments
// if the is no attachments, it is change, it is a new package.
if (_.isNil(_attachments)) {
if (error) {
return next(error);
@@ -94,10 +159,14 @@ export function publishPackage(storage: IStorageHandler, config: Config) {
// npm-registry-client 0.3+ embeds tarball into the json upload
// https://github.com/isaacs/npm-registry-client/commit/e9fbeb8b67f249394f735c74ef11fe4720d46ca0
// issue https://github.com/rlidwka/sinopia/issues/31, dealing with it here:
if (isObject(_attachments) === false || Object.keys(_attachments).length !== 1 || isObject(versions) === false || Object.keys(versions).length !== 1) {
const isInvalidBodyFormat = isObject(_attachments) === false || hasDiffOneKey(_attachments) ||
isObject(versions) === false || hasDiffOneKey(versions);
if (isInvalidBodyFormat) {
// npm is doing something strange again
// if this happens in normal circumstances, report it as a bug
return next(ErrorCode.getBadRequest('unsupported registry call'));
logger.info({ packageName }, `wrong package format on publish a package @{packageName}`);
return next(ErrorCode.getBadRequest(API_ERROR.UNSUPORTED_REGISTRY_CALL));
}
if (error && error.status !== HTTP_STATUS.CONFLICT) {
@@ -105,7 +174,7 @@ export function publishPackage(storage: IStorageHandler, config: Config) {
}
// at this point document is either created or existed before
const firstAttachmentKey = Object.keys(_attachments)[0];
const [firstAttachmentKey] = Object.keys(_attachments);
createTarball(Path.basename(firstAttachmentKey), _attachments[firstAttachmentKey], function(error) {
if (error) {
@@ -129,7 +198,7 @@ export function publishPackage(storage: IStorageHandler, config: Config) {
try {
await notify(metadataCopy, config, req.remote_user, `${metadataCopy.name}@${versionToPublish}`);
} catch (error) {
logger.logger.error({ error }, 'notify batch service has failed: @{error}');
logger.error({ error }, 'notify batch service has failed: @{error}');
}
res.status(HTTP_STATUS.CREATED);
@@ -139,22 +208,34 @@ export function publishPackage(storage: IStorageHandler, config: Config) {
});
};
if (Object.prototype.hasOwnProperty.call(req.body, '_rev') && isObject(req.body.users)) {
if (isPublishablePackage(req.body) === false && isObject(req.body.users)) {
return starApi(req, res, next);
}
try {
const metadata = validateMetadata(req.body, packageName);
if (req.params._rev) {
storage.changePackage(packageName, metadata, req.params.revision, function(error) {
afterChange(error, API_MESSAGE.PKG_CHANGED, metadata);
logger.debug({packageName} , `updating a new version for @{packageName}`);
// we check unpublish permissions, an update is basically remove versions
const remote = req.remote_user;
auth.allow_unpublish({packageName}, remote, (error) => {
if (error) {
logger.debug({packageName} , `not allowed to unpublish a version for @{packageName}`);
return next(error);
}
storage.changePackage(packageName, metadata, req.params.revision, function(error) {
afterChange(error, API_MESSAGE.PKG_CHANGED, metadata);
});
});
} else {
logger.debug({packageName} , `adding a new version for @{packageName}`);
storage.addPackage(packageName, metadata, function(error) {
afterChange(error, API_MESSAGE.PKG_CREATED, metadata);
});
}
} catch (error) {
logger.error({packageName}, 'error on publish, bad package data for @{packageName}');
return next(ErrorCode.getBadData(API_ERROR.BAD_PACKAGE_DATA));
}
};
@@ -164,8 +245,11 @@ export function publishPackage(storage: IStorageHandler, config: Config) {
* un-publish a package
*/
export function unPublishPackage(storage: IStorageHandler) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
storage.removePackage(req.params.package, function(err) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const packageName = req.params.package;
logger.debug({packageName} , `unpublishing @{packageName}`);
storage.removePackage(packageName, function(err) {
if (err) {
return next(err);
}
@@ -179,12 +263,18 @@ export function unPublishPackage(storage: IStorageHandler) {
* Delete tarball
*/
export function removeTarball(storage: IStorageHandler) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
storage.removeTarball(req.params.package, req.params.filename, req.params.revision, function(err) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const packageName = req.params.package;
const {filename, revision} = req.params;
logger.debug({packageName, filename, revision} , `removing a tarball for @{packageName}-@{tarballName}-@{revision}`);
storage.removeTarball(packageName, filename, revision, function(err) {
if (err) {
return next(err);
}
res.status(HTTP_STATUS.CREATED);
logger.debug({packageName, filename, revision} , `success remove tarball for @{packageName}-@{tarballName}-@{revision}`);
return next({ ok: API_MESSAGE.TARBALL_REMOVED });
});
};
@@ -193,7 +283,7 @@ export function removeTarball(storage: IStorageHandler) {
* Adds a new version
*/
export function addVersion(storage: IStorageHandler) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const { version, tag } = req.params;
const packageName = req.params.package;
@@ -214,7 +304,7 @@ export function addVersion(storage: IStorageHandler) {
* uploadPackageTarball
*/
export function uploadPackageTarball(storage: IStorageHandler) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const packageName = req.params.package;
const stream = storage.addTarball(packageName, req.params.filename);
req.pipe(stream);

View File

@@ -2,7 +2,7 @@
* @prettier
*/
export default function(route, auth, storage) {
export default function(route, auth, storage): void {
// searching packages
route.get('/-/all(/since)?', function(req, res) {
let received_end = false;
@@ -32,7 +32,7 @@ export default function(route, auth, storage) {
*/
const respShouldBeArray = req.path.endsWith('/since');
res.set('Date', 'Mon, 10 Oct 1983 00:12:48 GMT');
const check_finish = function() {
const check_finish = function(): void {
if (!received_end) {
return;
}
@@ -89,7 +89,7 @@ export default function(route, auth, storage) {
});
});
stream.on('error', function(_err) {
stream.on('error', function() {
res.socket.destroy();
});

View File

@@ -1,64 +1,66 @@
// @flow
import { USERS, HTTP_STATUS } from '../../../lib/constants';
import type {$Response} from 'express';
import type {$RequestExtend, $NextFunctionVer, IStorageHandler} from '../../../../types';
import _ from 'lodash';
export default function(storage: IStorageHandler) {
const validateInputs = (newUsers, localUsers, username, isStar) => {
const isExistlocalUsers = _.isNil(localUsers[username]) === false;
if (isStar && isExistlocalUsers && localUsers[username]) {
return true;
} else if (!isStar && isExistlocalUsers) {
return false;
} else if (!isStar && !isExistlocalUsers) {
return true;
} else {
return false;
}
};
return (req: $RequestExtend, res: $Response, next: $NextFunctionVer): void => {
const name = req.params.package;
const afterChangePackage = function(err) {
if (err) {
return next(err);
}
res.status(HTTP_STATUS.OK);
next({
success: true,
});
};
storage.getPackage({
name,
req,
callback: function(err, info) {
if (err) {
return next(err);
}
const newStarUser = req.body[USERS];
const remoteUsername = req.remote_user.name;
const localStarUsers = info[USERS];
// Check is star or unstar
const isStar = Object.keys(newStarUser).includes(remoteUsername);
if (_.isNil(localStarUsers) === false && validateInputs(newStarUser, localStarUsers, remoteUsername, isStar)) {
return afterChangePackage();
}
const users = isStar ? {
...localStarUsers,
[remoteUsername]: true,
} : _.reduce(localStarUsers, (users, value, key) => {
if (key !== remoteUsername) {
users[key] = value;
}
return users;
}, {});
storage.changePackage(name, { ...info, users}, req.body._rev, function(err) {
afterChangePackage(err);
});
},
});
};
}
// @flow
import { USERS, HTTP_STATUS } from '../../../lib/constants';
import {Response} from 'express';
import {$RequestExtend, $NextFunctionVer, IStorageHandler} from '../../../../types';
import _ from 'lodash';
import { logger } from '../../../lib/logger';
export default function(storage: IStorageHandler): (req: $RequestExtend, res: Response, next: $NextFunctionVer) => void {
const validateInputs = (newUsers, localUsers, username, isStar): boolean => {
const isExistlocalUsers = _.isNil(localUsers[username]) === false;
if (isStar && isExistlocalUsers && localUsers[username]) {
return true;
} else if (!isStar && isExistlocalUsers) {
return false;
} else if (!isStar && !isExistlocalUsers) {
return true;
} else {
return false;
}
};
return (req: $RequestExtend, res: Response, next: $NextFunctionVer): void => {
const name = req.params.package;
logger.debug({name}, 'starring a package for @{name}');
const afterChangePackage = function(err?: Error) {
if (err) {
return next(err);
}
res.status(HTTP_STATUS.OK);
next({
success: true,
});
};
storage.getPackage({
name,
req,
callback: function(err, info) {
if (err) {
return next(err);
}
const newStarUser = req.body[USERS];
const remoteUsername = req.remote_user.name;
const localStarUsers = info[USERS];
// Check is star or unstar
const isStar = Object.keys(newStarUser).includes(remoteUsername);
if (_.isNil(localStarUsers) === false && validateInputs(newStarUser, localStarUsers, remoteUsername, isStar)) {
return afterChangePackage();
}
const users = isStar ? {
...localStarUsers,
[remoteUsername]: true,
} : _.reduce(localStarUsers, (users, value, key) => {
if (key !== remoteUsername) {
users[key] = value;
}
return users;
}, {});
storage.changePackage(name, { ...info, users}, req.body._rev, function(err) {
afterChangePackage(err);
});
},
});
};
}

View File

@@ -1,32 +0,0 @@
/**
* @prettier
* @flow
*/
import { USERS, HTTP_STATUS } from '../../../lib/constants';
import type { $Response, Router } from 'express';
import type { $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import type { Package } from '@verdaccio/types';
export default function(route: Router, storage: IStorageHandler) {
route.get(
'/-/_view/starredByUser',
(req: $RequestExtend, res: $Response, next: $NextFunctionVer): void => {
const remoteUsername = req.remote_user.name;
storage.getLocalDatabase((err, localPackages: Package[]) => {
if (err) {
return next(err);
}
const filteredPackages = localPackages.filter(localPackage =>
localPackage[USERS] ? Object.keys(localPackage[USERS]).indexOf(remoteUsername) >= 0 : false
);
res.status(HTTP_STATUS.OK);
next({
rows: filteredPackages.map(filteredPackage => ({
value: filteredPackage.name,
})),
});
});
}
);
}

View File

@@ -0,0 +1,34 @@
/**
* @prettier
*/
import _ from 'lodash';
import { USERS, HTTP_STATUS } from '../../../lib/constants';
import { Response, Router } from 'express';
import { $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import { Package } from '@verdaccio/types';
type Packages = Package[];
export default function(route: Router, storage: IStorageHandler): void {
route.get('/-/_view/starredByUser', (req: $RequestExtend, res: Response, next: $NextFunctionVer): void => {
const remoteUsername = req.remote_user.name;
storage.getLocalDatabase((err, localPackages: Packages) => {
if (err) {
return next(err);
}
const filteredPackages: Packages = localPackages.filter((localPackage: Package) =>
localPackage[USERS] ? _.keys(localPackage[USERS]).indexOf(remoteUsername) >= 0 : false
);
res.status(HTTP_STATUS.OK);
next({
rows: filteredPackages.map((filteredPackage: Package) => ({
value: filteredPackage.name,
})),
});
});
});
}

View File

@@ -1,38 +1,43 @@
/**
* @prettier
* @flow
*/
import _ from 'lodash';
import Cookies from 'cookies';
import { ErrorCode } from '../../../lib/utils';
import { API_ERROR, API_MESSAGE, HTTP_STATUS } from '../../../lib/constants';
import { createSessionToken, getApiToken, getAuthenticatedMessage, validatePassword } from '../../../lib/auth-utils';
import { createRemoteUser, createSessionToken, getApiToken, getAuthenticatedMessage, validatePassword } from '../../../lib/auth-utils';
import { logger } from '../../../lib/logger';
import type { Config } from '@verdaccio/types';
import type { $Response, Router } from 'express';
import type { $RequestExtend, $ResponseExtend, $NextFunctionVer, IAuth } from '../../../../types';
import { Config, RemoteUser } from '@verdaccio/types';
import { Response, Router } from 'express';
import { $RequestExtend, $ResponseExtend, $NextFunctionVer, IAuth } from '../../../../types';
export default function(route: Router, auth: IAuth, config: Config) {
route.get('/-/user/:org_couchdb_user', function(req: $RequestExtend, res: $Response, next: $NextFunctionVer) {
export default function(route: Router, auth: IAuth, config: Config): void {
route.get('/-/user/:org_couchdb_user', function(req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
res.status(HTTP_STATUS.OK);
next({
ok: getAuthenticatedMessage(req.remote_user.name),
});
});
route.put('/-/user/:org_couchdb_user/:_rev?/:revision?', async function(req: $RequestExtend, res: $Response, next: $NextFunctionVer) {
route.put('/-/user/:org_couchdb_user/:_rev?/:revision?', function(req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
const { name, password } = req.body;
const remoteName = req.remote_user.name;
if (_.isNil(req.remote_user.name) === false) {
const token = name && password ? await getApiToken(auth, config, req.remote_user, password) : undefined;
if (_.isNil(remoteName) === false && _.isNil(name) === false && remoteName === name) {
auth.authenticate(name, password, async function callbackAuthenticate(err, user): Promise<void> {
if (err) {
logger.trace({ name, err }, 'authenticating for user @{username} failed. Error: @{err.message}');
return next(ErrorCode.getCode(HTTP_STATUS.UNAUTHORIZED, API_ERROR.BAD_USERNAME_PASSWORD));
}
res.status(HTTP_STATUS.CREATED);
const restoredRemoteUser: RemoteUser = createRemoteUser(name, user.groups || []);
const token = await getApiToken(auth, config, restoredRemoteUser, password);
return next({
ok: getAuthenticatedMessage(req.remote_user.name),
token,
res.status(HTTP_STATUS.CREATED);
return next({
ok: getAuthenticatedMessage(req.remote_user.name),
token,
});
});
} else {
if (validatePassword(password) === false) {
@@ -40,7 +45,7 @@ export default function(route: Router, auth: IAuth, config: Config) {
return next(ErrorCode.getCode(HTTP_STATUS.BAD_REQUEST, API_ERROR.PASSWORD_SHORT()));
}
auth.add_user(name, password, async function(err, user) {
auth.add_user(name, password, async function(err, user): Promise<void> {
if (err) {
if (err.status >= HTTP_STATUS.BAD_REQUEST && err.status < HTTP_STATUS.INTERNAL_ERROR) {
// With npm registering is the same as logging in,
@@ -63,7 +68,7 @@ export default function(route: Router, auth: IAuth, config: Config) {
}
});
route.delete('/-/user/token/*', function(req: $RequestExtend, res: $Response, next: $NextFunctionVer) {
route.delete('/-/user/token/*', function(req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
res.status(HTTP_STATUS.OK);
next({
ok: API_MESSAGE.LOGGED_OUT,
@@ -72,7 +77,7 @@ export default function(route: Router, auth: IAuth, config: Config) {
// placeholder 'cause npm require to be authenticated to publish
// we do not do any real authentication yet
route.post('/_session', Cookies.express(), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
route.post('/_session', Cookies.express(), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
res.cookies.set('AuthSession', String(Math.random()), createSessionToken());
next({

View File

@@ -1,30 +1,37 @@
/**
* @prettier
*/
// @flow
import _ from 'lodash';
import { API_ERROR, APP_ERROR, HTTP_STATUS, SUPPORT_ERRORS } from '../../../../lib/constants';
import { ErrorCode } from '../../../../lib/utils';
import { validatePassword } from '../../../../lib/auth-utils';
import type { $Response, Router } from 'express';
import type { $NextFunctionVer, $RequestExtend, IAuth } from '../../../../../types';
import { Response, Router } from 'express';
import { $NextFunctionVer, $RequestExtend, IAuth } from '../../../../../types';
export default function(route: Router, auth: IAuth) {
const buildProfile = name => ({
tfa: false,
name,
email: '',
email_verified: false,
created: '',
updated: '',
cidr_whitelist: null,
fullname: '',
});
export interface Profile {
tfa: boolean;
name: string;
email: string;
email_verified: boolean;
created: string;
updated: string;
cidr_whitelist: string[] | null;
fullname: string;
}
route.get('/-/npm/v1/user', function(req: $RequestExtend, res: $Response, next: $NextFunctionVer) {
export default function(route: Router, auth: IAuth): void {
function buildProfile(name: string): Profile {
return {
tfa: false,
name,
email: '',
email_verified: false,
created: '',
updated: '',
cidr_whitelist: null,
fullname: '',
};
}
route.get('/-/npm/v1/user', function(req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
if (_.isNil(req.remote_user.name) === false) {
return next(buildProfile(req.remote_user.name));
}
@@ -35,7 +42,7 @@ export default function(route: Router, auth: IAuth) {
});
});
route.post('/-/npm/v1/user', function(req: $RequestExtend, res: $Response, next: $NextFunctionVer) {
route.post('/-/npm/v1/user', function(req: $RequestExtend, res: Response, next: $NextFunctionVer): void {
if (_.isNil(req.remote_user.name)) {
res.status(HTTP_STATUS.UNAUTHORIZED);
return next({
@@ -53,17 +60,22 @@ export default function(route: Router, auth: IAuth) {
/* eslint new-cap:off */
}
auth.changePassword(name, password.old, password.new, (err, isUpdated) => {
if (_.isNull(err) === false) {
return next(ErrorCode.getCode(err.status, err.message) || ErrorCode.getConflict(err.message));
}
auth.changePassword(
name,
password.old,
password.new,
(err, isUpdated): $NextFunctionVer => {
if (_.isNull(err) === false) {
return next(ErrorCode.getCode(err.status, err.message) || ErrorCode.getConflict(err.message));
}
if (isUpdated) {
return next(buildProfile(req.remote_user.name));
} else {
return next(ErrorCode.getInternalError(API_ERROR.INTERNAL_SERVER_ERROR));
if (isUpdated) {
return next(buildProfile(req.remote_user.name));
} else {
return next(ErrorCode.getInternalError(API_ERROR.INTERNAL_SERVER_ERROR));
}
}
});
);
} else if (_.isNil(tfa) === false) {
return next(ErrorCode.getCode(HTTP_STATUS.SERVICE_UNAVAILABLE, SUPPORT_ERRORS.TFA_DISABLED));
} else {

View File

@@ -0,0 +1,125 @@
import _ from 'lodash';
import { HTTP_STATUS, SUPPORT_ERRORS } from '../../../../lib/constants';
import {ErrorCode, mask} from '../../../../lib/utils';
import { getApiToken } from '../../../../lib/auth-utils';
import { stringToMD5 } from '../../../../lib/crypto-utils';
import { logger } from '../../../../lib/logger';
import { Response, Router } from 'express';
import {$NextFunctionVer, $RequestExtend, IAuth, IStorageHandler} from '../../../../../types';
import { Config, RemoteUser, Token } from '@verdaccio/types';
export type NormalizeToken = Token & {
created: string;
};
function normalizeToken(token: Token): NormalizeToken {
return {
...token,
created: new Date(token.created).toISOString(),
};
};
// https://github.com/npm/npm-profile/blob/latest/lib/index.js
export default function(route: Router, auth: IAuth, storage: IStorageHandler, config: Config): void {
route.get('/-/npm/v1/tokens', async function(req: $RequestExtend, res: Response, next: $NextFunctionVer) {
const { name } = req.remote_user;
if (_.isNil(name) === false) {
try {
const tokens = await storage.readTokens({user: name});
const totalTokens = tokens.length;
logger.debug({totalTokens}, 'token list retrieved: @{totalTokens}');
res.status(HTTP_STATUS.OK);
return next({
objects: tokens.map(normalizeToken),
urls: {
next: '', // TODO: pagination?
},
});
} catch (error) {
logger.error({ error: error.msg }, 'token list has failed: @{error}');
return next(ErrorCode.getCode(HTTP_STATUS.INTERNAL_ERROR, error.message));
}
} else {
return next(ErrorCode.getUnauthorized());
}
});
route.post('/-/npm/v1/tokens', function(req: $RequestExtend, res: Response, next: $NextFunctionVer) {
const { password, readonly, cidr_whitelist } = req.body;
const { name } = req.remote_user;
if (!_.isBoolean(readonly) || !_.isArray(cidr_whitelist)) {
return next(ErrorCode.getCode(HTTP_STATUS.BAD_DATA, SUPPORT_ERRORS.PARAMETERS_NOT_VALID));
}
auth.authenticate(name, password, async (err, user: RemoteUser) => {
if (err) {
const errorCode = err.message ? HTTP_STATUS.UNAUTHORIZED : HTTP_STATUS.INTERNAL_ERROR;
return next(ErrorCode.getCode(errorCode, err.message));
} else {
req.remote_user = user;
if (!_.isFunction(storage.saveToken)) {
return next(ErrorCode.getCode(HTTP_STATUS.NOT_IMPLEMENTED, SUPPORT_ERRORS.STORAGE_NOT_IMPLEMENT));
}
try {
const token = await getApiToken(auth, config, user, password);
const key = stringToMD5(token);
// TODO: use a utility here
const maskedToken = mask(token, 5);
const created = new Date().getTime();
/**
* cidr_whitelist: is not being used, we pass it through
* token: we do not store the real token (it is generated once and retrieved to the user), just a mask of it.
*/
const saveToken: Token = {
user: name,
token: maskedToken,
key,
cidr: cidr_whitelist,
readonly,
created,
};
await storage.saveToken(saveToken);
logger.debug({ key, name }, 'token @{key} was created for user @{name}');
return next(normalizeToken({
token,
user: name,
key: saveToken.key,
cidr: cidr_whitelist,
readonly,
created: saveToken.created,
}));
} catch (error) {
logger.error({ error: error.msg }, 'token creation has failed: @{error}');
return next(ErrorCode.getCode(HTTP_STATUS.INTERNAL_ERROR, error.message));
}
}
});
});
route.delete('/-/npm/v1/tokens/token/:tokenKey', async (req: $RequestExtend, res: Response, next: $NextFunctionVer) => {
const { params: { tokenKey }} = req;
const { name } = req.remote_user;
if (_.isNil(name) === false) {
logger.debug({name}, '@{name} has requested remove a token');
try {
await storage.deleteToken(name, tokenKey);
logger.info({ tokenKey, name }, 'token id @{tokenKey} was revoked for user @{name}');
return next({});
} catch(error) {
logger.error({ error: error.msg }, 'token creation has failed: @{error}');
return next(ErrorCode.getCode(HTTP_STATUS.INTERNAL_ERROR, error.message));
}
} else {
return next(ErrorCode.getUnauthorized());
}
});
}

View File

@@ -1,27 +0,0 @@
/**
* @prettier
* @flow
*/
import type { $Response, Router } from 'express';
import type { $RequestExtend, $NextFunctionVer } from '../../../../types';
export default function(route: Router) {
route.get(
'/whoami',
(req: $RequestExtend, res: $Response, next: $NextFunctionVer): void => {
if (req.headers.referer === 'whoami') {
next({ username: req.remote_user.name });
} else {
next('route');
}
}
);
route.get(
'/-/whoami',
(req: $RequestExtend, res: $Response, next: $NextFunctionVer): mixed => {
next({ username: req.remote_user.name });
}
);
}

View File

@@ -0,0 +1,22 @@
import { Response, Router } from 'express';
import { $RequestExtend, $NextFunctionVer } from '../../../../types';
export default function(route: Router): void {
route.get(
'/whoami',
(req: $RequestExtend, res: Response, next: $NextFunctionVer): void => {
if (req.headers.referer === 'whoami') {
next({ username: req.remote_user.name });
} else {
next('route');
}
}
);
route.get(
'/-/whoami',
(req: $RequestExtend, res: Response, next: $NextFunctionVer): any => {
next({ username: req.remote_user.name });
}
);
}

View File

@@ -1,10 +1,6 @@
/**
* @prettier
* @flow
*/
import type { IAuth, IStorageHandler } from '../../../types';
import type { Config } from '@verdaccio/types';
import { IAuth, IStorageHandler } from '../../../types';
import { Config } from '@verdaccio/types';
import _ from 'lodash';
import express from 'express';
import bodyParser from 'body-parser';
@@ -17,6 +13,7 @@ import search from './api/search';
import pkg from './api/package';
import stars from './api/stars';
import profile from './api/v1/profile';
import token from './api/v1/token';
const { match, validateName, validatePackage, encodeScopePackage, antiLoop } = require('../middleware');
@@ -57,6 +54,8 @@ export default function(config: Config, auth: IAuth, storage: IStorageHandler) {
publish(app, auth, storage, config);
ping(app);
stars(app, storage);
if (_.get(config, 'experiments.token') === true) {
token(app, auth, storage, config);
}
return app;
}

View File

@@ -1,12 +1,8 @@
/**
* @prettier
* @flow
*/
import _ from 'lodash';
import express from 'express';
import express, { Application } from 'express';
import compression from 'compression';
import cors from 'cors';
import { HttpError } from 'http-errors';
import Storage from '../lib/storage';
import loadPlugin from '../lib/plugin-loader';
import hookDebug from './debug';
@@ -17,16 +13,14 @@ import { API_ERROR, HTTP_STATUS } from '../lib/constants';
import AppConfig from '../lib/config';
import webAPI from './web/api';
import web from './web';
import type { $Application } from 'express';
import type { $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler, IAuth } from '../../types';
import type { Config as IConfig, IPluginMiddleware } from '@verdaccio/types';
import { $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler, IAuth } from '../../types';
import { Config as IConfig, IPluginMiddleware, IPluginStorageFilter } from '@verdaccio/types';
import { setup, logger } from '../lib/logger';
import { log, final, errorReportingMiddleware } from './middleware';
const defineAPI = function(config: IConfig, storage: IStorageHandler) {
const defineAPI = function(config: IConfig, storage: IStorageHandler): any {
const auth: IAuth = new Auth(config);
const app: $Application = express();
const app: Application = express();
// run in production mode by default, just in case
// it shouldn't make any difference anyway
app.set('env', process.env.NODE_ENV || 'production');
@@ -35,14 +29,14 @@ const defineAPI = function(config: IConfig, storage: IStorageHandler) {
// Router setup
app.use(log);
app.use(errorReportingMiddleware);
app.use(function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
app.use(function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
res.setHeader('X-Powered-By', config.user_agent);
next();
});
app.use(compression());
app.get('/favicon.ico', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
app.get('/favicon.ico', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
req.url = '/-/static/favicon.png';
next();
});
@@ -57,10 +51,11 @@ const defineAPI = function(config: IConfig, storage: IStorageHandler) {
config: config,
logger: logger,
};
const plugins = loadPlugin(config, config.middlewares, plugin_params, function(plugin: IPluginMiddleware) {
const plugins: IPluginMiddleware<IConfig>[] = loadPlugin(config, config.middlewares, plugin_params, function(plugin: IPluginMiddleware<IConfig>) {
return plugin.register_middlewares;
});
plugins.forEach(plugin => {
plugins.forEach((plugin: IPluginMiddleware<IConfig>) => {
plugin.register_middlewares(app, auth, storage);
});
@@ -82,7 +77,7 @@ const defineAPI = function(config: IConfig, storage: IStorageHandler) {
next(ErrorCode.getNotFound(API_ERROR.FILE_NOT_FOUND));
});
app.use(function(err, req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
app.use(function(err: HttpError, req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
if (_.isError(err)) {
if (err.code === 'ECONNABORT' && res.statusCode === HTTP_STATUS.NOT_MODIFIED) {
return next();
@@ -104,11 +99,17 @@ const defineAPI = function(config: IConfig, storage: IStorageHandler) {
return app;
};
export default (async function(configHash: any) {
export default (async function(configHash: any): Promise<any> {
setup(configHash.logs);
const config: IConfig = new AppConfig(_.cloneDeep(configHash));
// register middleware plugins
const plugin_params = {
config: config,
logger: logger,
};
const filters = loadPlugin(config, config.filters || {}, plugin_params, (plugin: IPluginStorageFilter<IConfig>) => plugin.filter_metadata);
const storage: IStorageHandler = new Storage(config);
// waits until init calls have been initialized
await storage.init(config);
await storage.init(config, filters);
return defineAPI(config, storage);
});

View File

@@ -1,19 +1,15 @@
/**
* @prettier
* @flow
*/
import _ from 'lodash';
import { validateName as utilValidateName, validatePackage as utilValidatePackage, getVersionFromTarball, isObject, ErrorCode } from '../lib/utils';
import { API_ERROR, HEADER_TYPE, HEADERS, HTTP_STATUS, TOKEN_BASIC, TOKEN_BEARER } from '../lib/constants';
import { stringToMD5 } from '../lib/crypto-utils';
import type { $ResponseExtend, $RequestExtend, $NextFunctionVer, IAuth } from '../../types';
import type { Config } from '@verdaccio/types';
import { $ResponseExtend, $RequestExtend, $NextFunctionVer, IAuth } from '../../types';
import { Config, Package, RemoteUser } from '@verdaccio/types';
import { logger } from '../lib/logger';
import { VerdaccioError } from '@verdaccio/commons-api';
export function match(regexp: RegExp) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer, value: string) {
export function match(regexp: RegExp): any {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer, value: string): void {
if (regexp.exec(value)) {
next();
} else {
@@ -22,7 +18,7 @@ export function match(regexp: RegExp) {
};
}
export function setSecurityWebHeaders(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export function setSecurityWebHeaders(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
// disable loading in frames (clickjacking, etc.)
res.header(HEADERS.FRAMES_OPTIONS, 'deny');
// avoid stablish connections outside of domain
@@ -36,7 +32,7 @@ export function setSecurityWebHeaders(req: $RequestExtend, res: $ResponseExtend,
// flow: express does not match properly
// flow info https://github.com/flowtype/flow-typed/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+express
export function validateName(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer, value: string, name: string) {
export function validateName(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer, value: string, name: string): void {
if (value.charAt(0) === '-') {
// special case in couchdb usually
next('route');
@@ -49,7 +45,7 @@ export function validateName(req: $RequestExtend, res: $ResponseExtend, next: $N
// flow: express does not match properly
// flow info https://github.com/flowtype/flow-typed/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+express
export function validatePackage(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer, value: string, name: string) {
export function validatePackage(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer, value: string, name: string): void {
if (value.charAt(0) === '-') {
// special case in couchdb usually
next('route');
@@ -60,8 +56,8 @@ export function validatePackage(req: $RequestExtend, res: $ResponseExtend, next:
}
}
export function media(expect: string) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export function media(expect: string | null): any {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
if (req.headers[HEADER_TYPE.CONTENT_TYPE] !== expect) {
next(ErrorCode.getCode(HTTP_STATUS.UNSUPPORTED_MEDIA, 'wrong content-type, expect: ' + expect + ', got: ' + req.headers[HEADER_TYPE.CONTENT_TYPE]));
} else {
@@ -70,7 +66,7 @@ export function media(expect: string) {
};
}
export function encodeScopePackage(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export function encodeScopePackage(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
if (req.url.indexOf('@') !== -1) {
// e.g.: /@org/pkg/1.2.3 -> /@org%2Fpkg/1.2.3, /@org%2Fpkg/1.2.3 -> /@org%2Fpkg/1.2.3
req.url = req.url.replace(/^(\/@[^\/%]+)\/(?!$)/, '$1%2F');
@@ -78,15 +74,15 @@ export function encodeScopePackage(req: $RequestExtend, res: $ResponseExtend, ne
next();
}
export function expectJson(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export function expectJson(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
if (!isObject(req.body)) {
return next(ErrorCode.getBadRequest("can't parse incoming json"));
}
next();
}
export function antiLoop(config: Config) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export function antiLoop(config: Config): Function {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
if (req.headers.via != null) {
const arr = req.headers.via.split(',');
@@ -101,15 +97,16 @@ export function antiLoop(config: Config) {
};
}
export function allow(auth: IAuth) {
return function(action: string) {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export function allow(auth: IAuth): Function {
return function(action: string): Function {
return function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
req.pause();
const packageName = req.params.scope ? `@${req.params.scope}/${req.params.package}` : req.params.package;
const packageVersion = req.params.filename ? getVersionFromTarball(req.params.filename) : undefined;
const remote: RemoteUser = req.remote_user;
logger.trace({ action, user: remote.name }, `[middleware/allow][@{action}] allow for @{user}`);
// $FlowFixMe
auth['allow_' + action]({ packageName, packageVersion }, req.remote_user, function(error, allowed) {
auth['allow_' + action]({ packageName, packageVersion }, remote, function(error, allowed): void {
req.resume();
if (error) {
next(error);
@@ -125,7 +122,13 @@ export function allow(auth: IAuth) {
};
}
export function final(body: any, req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export interface MiddlewareError {
error: string;
}
export type FinalBody = Package | MiddlewareError | string;
export function final(body: FinalBody, req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
if (res.statusCode === HTTP_STATUS.UNAUTHORIZED && !res.getHeader(HEADERS.WWW_AUTH)) {
// they say it's required for 401, so...
res.header(HEADERS.WWW_AUTH, `${TOKEN_BASIC}, ${TOKEN_BEARER}`);
@@ -138,15 +141,15 @@ export function final(body: any, req: $RequestExtend, res: $ResponseExtend, next
}
if (typeof body === 'object' && _.isNil(body) === false) {
if (typeof body.error === 'string') {
res._verdaccio_error = body.error;
if (typeof (body as MiddlewareError).error === 'string') {
res._verdaccio_error = (body as MiddlewareError).error;
}
body = JSON.stringify(body, undefined, ' ') + '\n';
}
// don't send etags with errors
if (!res.statusCode || (res.statusCode >= 200 && res.statusCode < 300)) {
res.header(HEADERS.ETAG, '"' + stringToMD5(body) + '"');
if (!res.statusCode || (res.statusCode >= HTTP_STATUS.OK && res.statusCode < HTTP_STATUS.MULTIPLE_CHOICES)) {
res.header(HEADERS.ETAG, '"' + stringToMD5(body as string) + '"');
}
} else {
// send(null), send(204), etc.
@@ -168,7 +171,11 @@ export function final(body: any, req: $RequestExtend, res: $ResponseExtend, next
res.send(body);
}
export function log(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export const LOG_STATUS_MESSAGE = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'";
export const LOG_VERDACCIO_ERROR = `${LOG_STATUS_MESSAGE}, error: @{!error}`;
export const LOG_VERDACCIO_BYTES = `${LOG_STATUS_MESSAGE}, bytes: @{bytes.in}/@{bytes.out}`;
export function log(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
// logger
req.log = logger.child({ sub: 'in' });
@@ -195,27 +202,30 @@ export function log(req: $RequestExtend, res: $ResponseExtend, next: $NextFuncti
}
let bytesin = 0;
req.on('data', function(chunk) {
req.on('data', function(chunk): void {
bytesin += chunk.length;
});
let bytesout = 0;
const _write = res.write;
res.write = function(buf) {
// FIXME: res.write should return boolean
// @ts-ignore
res.write = function(buf): boolean {
bytesout += buf.length;
/* eslint prefer-rest-params: "off" */
// @ts-ignore
_write.apply(res, arguments);
};
const log = function() {
const log = function(): void {
const forwardedFor = req.headers['x-forwarded-for'];
const remoteAddress = req.connection.remoteAddress;
const remoteIP = forwardedFor ? `${forwardedFor} via ${remoteAddress}` : remoteAddress;
let message = "@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'";
let message;
if (res._verdaccio_error) {
message += ', error: @{!error}';
message = LOG_VERDACCIO_ERROR;
} else {
message += ', bytes: @{bytes.in}/@{bytes.out}';
message = LOG_VERDACCIO_BYTES;
}
req.url = req.originalUrl;
@@ -240,16 +250,17 @@ export function log(req: $RequestExtend, res: $ResponseExtend, next: $NextFuncti
req.originalUrl = req.url;
};
req.on('close', function() {
req.on('close', function(): void {
log();
});
const _end = res.end;
res.end = function(buf) {
res.end = function(buf): void {
if (buf) {
bytesout += buf.length;
}
/* eslint prefer-rest-params: "off" */
// @ts-ignore
_end.apply(res, arguments);
log();
};
@@ -257,10 +268,10 @@ export function log(req: $RequestExtend, res: $ResponseExtend, next: $NextFuncti
}
// Middleware
export function errorReportingMiddleware(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
export function errorReportingMiddleware(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
res.report_error =
res.report_error ||
function(err) {
function(err: VerdaccioError): void {
if (err.status && err.status >= HTTP_STATUS.BAD_REQUEST && err.status < 600) {
if (_.isNil(res.headersSent) === false) {
res.status(err.status);

View File

@@ -1,8 +1,3 @@
/**
* @prettier
* @flow
*/
import { Router } from 'express';
import bodyParser from 'body-parser';
import addUserAuthApi from './endpoint/user';
@@ -11,15 +6,15 @@ import addSearchWebApi from './endpoint/search';
import Search from '../../lib/search';
import { match, validateName, validatePackage, setSecurityWebHeaders } from '../middleware';
import type { Config } from '@verdaccio/types';
import type { IAuth, IStorageHandler } from '../../../types';
import { Config } from '@verdaccio/types';
import { IAuth, IStorageHandler } from '../../../types';
const route = Router(); /* eslint new-cap: 0 */
/*
This file include all verdaccio only API(Web UI), for npm API please see ../endpoint/
*/
export default function(config: Config, auth: IAuth, storage: IStorageHandler) {
export default function(config: Config, auth: IAuth, storage: IStorageHandler): Router {
Search.configureStorage(storage);
// validate all of these params as a package name

View File

@@ -1,48 +1,61 @@
/**
* @prettier
* @flow
*/
import _ from 'lodash';
import { addScope, addGravatarSupport, deleteProperties, sortByName, parseReadme, formatAuthor, convertDistRemoteToLocalTarballUrls } from '../../../lib/utils';
import {
addScope,
addGravatarSupport,
deleteProperties,
sortByName,
parseReadme,
formatAuthor,
convertDistRemoteToLocalTarballUrls,
isVersionValid
} from '../../../lib/utils';
import { allow } from '../../middleware';
import { DIST_TAGS, HEADER_TYPE, HEADERS, HTTP_STATUS } from '../../../lib/constants';
import { generateGravatarUrl } from '../../../utils/user';
import logger from '../../../lib/logger';
import type { Router } from 'express';
import type { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler, $SidebarPackage } from '../../../../types';
import type { Config } from '@verdaccio/types';
import { logger } from '../../../lib/logger';
import { Router } from 'express';
import { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler, $SidebarPackage } from '../../../../types';
import { Config, Package } from '@verdaccio/types';
const getOrder = (order = 'asc') => {
return order === 'asc';
};
function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth, config: Config) {
export type PackcageAuthor = Package & { author: any };
function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth, config: Config): void {
const can = allow(auth);
const checkAllow = (name, remoteUser) =>
new Promise((resolve, reject) => {
try {
auth.allow_access({ packageName: name }, remoteUser, (err, allowed) => {
if (err) {
resolve(false);
} else {
resolve(allowed);
}
});
} catch (err) {
reject(err);
const checkAllow = (name, remoteUser): Promise<boolean> =>
new Promise(
(resolve, reject): void => {
try {
auth.allow_access(
{ packageName: name },
remoteUser,
(err, allowed): void => {
if (err) {
resolve(false);
} else {
resolve(allowed);
}
}
);
} catch (err) {
reject(err);
}
}
});
);
// Get list of all visible package
route.get('/packages', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
storage.getLocalDatabase(async function(err, packages) {
route.get('/packages', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
storage.getLocalDatabase(async function(err, packages): Promise<void> {
if (err) {
throw err;
}
async function processPermissionsPackages(packages = []) {
const permissions = [];
async function processPermissionsPackages(packages: PackcageAuthor[] = []): Promise<any> {
const permissions: PackcageAuthor[] = [];
const packgesCopy = packages.slice();
for (const pkg of packgesCopy) {
const pkgCopy = { ...pkg };
@@ -64,7 +77,7 @@ function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth,
}
const { web } = config;
// $FlowFixMe
// @ts-ignore
const order: boolean = config.web ? getOrder(web.sort_packages) : true;
next(sortByName(await processPermissionsPackages(packages), order));
@@ -72,14 +85,14 @@ function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth,
});
// Get package readme
route.get('/package/readme/(@:scope/)?:package/:version?', can('access'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
route.get('/package/readme/(@:scope/)?:package/:version?', can('access'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const packageName = req.params.scope ? addScope(req.params.scope, req.params.package) : req.params.package;
storage.getPackage({
name: packageName,
uplinksLook: true,
req,
callback: function(err, info) {
callback: function(err, info): void {
if (err) {
return next(err);
}
@@ -90,7 +103,7 @@ function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth,
});
});
route.get('/sidebar/(@:scope/)?:package', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
route.get('/sidebar/(@:scope/)?:package', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const packageName: string = req.params.scope ? addScope(req.params.scope, req.params.package) : req.params.package;
storage.getPackage({
@@ -98,24 +111,30 @@ function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth,
uplinksLook: true,
keepUpLinkData: true,
req,
callback: function(err: Error, info: $SidebarPackage) {
callback: function(err: Error, info: $SidebarPackage): void {
if (_.isNil(err)) {
const {v} = req.query;
let sideBarInfo: any = _.clone(info);
sideBarInfo.versions = convertDistRemoteToLocalTarballUrls(info, req, config.url_prefix).versions;
sideBarInfo.latest = sideBarInfo.versions[info[DIST_TAGS].latest];
sideBarInfo.latest.author = formatAuthor(sideBarInfo.latest.author);
sideBarInfo = deleteProperties(['readme', '_attachments', '_rev', 'name'], sideBarInfo);
if (config.web) {
sideBarInfo = addGravatarSupport(sideBarInfo, config.web.gravatar);
if (isVersionValid(info, v)) {
sideBarInfo.latest = sideBarInfo.versions[v];
sideBarInfo.latest.author = formatAuthor(sideBarInfo.latest.author);
} else {
sideBarInfo.latest = sideBarInfo.versions[info[DIST_TAGS].latest];
sideBarInfo.latest.author = formatAuthor(sideBarInfo.latest.author);
}
sideBarInfo = deleteProperties(['readme', '_attachments', '_rev', 'name'], sideBarInfo);
if (config.web) {
sideBarInfo = addGravatarSupport(sideBarInfo, config.web.gravatar);
} else {
sideBarInfo = addGravatarSupport(sideBarInfo);
}
next(sideBarInfo);
} else {
sideBarInfo = addGravatarSupport(sideBarInfo);
res.status(HTTP_STATUS.NOT_FOUND);
res.end();
}
next(sideBarInfo);
} else {
res.status(HTTP_STATUS.NOT_FOUND);
res.end();
}
},
});
});
}

View File

@@ -5,22 +5,24 @@
import Search from '../../../lib/search';
import { DIST_TAGS } from '../../../lib/constants';
import type { Router } from 'express';
import type { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import { Router } from 'express';
import { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
import { Package } from '@verdaccio/types';
function addSearchWebApi(route: Router, storage: IStorageHandler, auth: IAuth) {
function addSearchWebApi(route: Router, storage: IStorageHandler, auth: IAuth): void {
// Search package
route.get('/search/:anything', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
route.get('/search/:anything', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
const results: any = Search.query(req.params.anything);
const packages = [];
// FUTURE: figure out here the correct type
const packages: any[] = [];
const getPackageInfo = function(i) {
const getPackageInfo = function(i): void {
storage.getPackage({
name: results[i].ref,
uplinksLook: false,
callback: (err, entry) => {
callback: (err, entry: Package): void => {
if (!err && entry) {
auth.allow_access({ packageName: entry.name }, req.remote_user, function(err, allowed) {
auth.allow_access({ packageName: entry.name }, req.remote_user, function(err, allowed): void {
if (err || !allowed) {
return;
}

View File

@@ -6,33 +6,37 @@
import _ from 'lodash';
import { API_ERROR, APP_ERROR, HTTP_STATUS } from '../../../lib/constants';
import type { Router } from 'express';
import type { Config, RemoteUser, JWTSignOptions } from '@verdaccio/types';
import type { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer } from '../../../../types';
import { Router, Response, Request } from 'express';
import { Config, RemoteUser, JWTSignOptions } from '@verdaccio/types';
import { IAuth, $NextFunctionVer } from '../../../../types';
import { ErrorCode } from '../../../lib/utils';
import { getSecurity, validatePassword } from '../../../lib/auth-utils';
function addUserAuthApi(route: Router, auth: IAuth, config: Config) {
route.post('/login', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
function addUserAuthApi(route: Router, auth: IAuth, config: Config): void {
route.post('/login', function(req: Request, res: Response, next: $NextFunctionVer): void {
const { username, password } = req.body;
auth.authenticate(username, password, async (err, user: RemoteUser) => {
if (err) {
const errorCode = err.message ? HTTP_STATUS.UNAUTHORIZED : HTTP_STATUS.INTERNAL_ERROR;
next(ErrorCode.getCode(errorCode, err.message));
} else {
req.remote_user = user;
const jWTSignOptions: JWTSignOptions = getSecurity(config).web.sign;
auth.authenticate(
username,
password,
async (err, user: RemoteUser): Promise<void> => {
if (err) {
const errorCode = err.message ? HTTP_STATUS.UNAUTHORIZED : HTTP_STATUS.INTERNAL_ERROR;
next(ErrorCode.getCode(errorCode, err.message));
} else {
req.remote_user = user;
const jWTSignOptions: JWTSignOptions = getSecurity(config).web.sign;
next({
token: await auth.jwtEncrypt(user, jWTSignOptions),
username: req.remote_user.name,
});
next({
token: await auth.jwtEncrypt(user, jWTSignOptions),
username: req.remote_user.name,
});
}
}
});
);
});
route.put('/reset_password', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer) {
route.put('/reset_password', function(req: Request, res: Response, next: $NextFunctionVer): void {
if (_.isNil(req.remote_user.name)) {
res.status(HTTP_STATUS.UNAUTHORIZED);
return next({
@@ -45,7 +49,7 @@ function addUserAuthApi(route: Router, auth: IAuth, config: Config) {
const { name } = req.remote_user;
if (validatePassword(password.new) === false) {
auth.changePassword(name, password.old, password.new, (err, isUpdated) => {
auth.changePassword(name as string, password.old, password.new, (err, isUpdated): void => {
if (_.isNil(err) && isUpdated) {
next({
ok: true,

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