step-node-agent 3.29.1 → 3.29.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/node_modules/har-validator/node_modules/ajv/README.md +14 -6
  2. package/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js +23 -11
  3. package/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js +2 -2
  4. package/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js.map +1 -1
  5. package/node_modules/har-validator/node_modules/ajv/lib/ajv.d.ts +5 -0
  6. package/node_modules/har-validator/node_modules/ajv/lib/compile/index.js +8 -6
  7. package/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst +15 -4
  8. package/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js +14 -4
  9. package/node_modules/har-validator/node_modules/ajv/package.json +2 -1
  10. package/node_modules/har-validator/node_modules/ajv/scripts/info +0 -0
  11. package/node_modules/har-validator/node_modules/ajv/scripts/prepare-tests +0 -0
  12. package/node_modules/har-validator/node_modules/ajv/scripts/publish-built-version +0 -0
  13. package/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages +0 -0
  14. package/node_modules/minimatch/README.md +37 -0
  15. package/node_modules/minimatch/minimatch.js +160 -102
  16. package/node_modules/minimatch/package.json +2 -2
  17. package/node_modules/qs/.editorconfig +1 -1
  18. package/node_modules/qs/.github/SECURITY.md +11 -0
  19. package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
  20. package/node_modules/qs/CHANGELOG.md +22 -0
  21. package/node_modules/qs/README.md +11 -4
  22. package/node_modules/qs/dist/qs.js +24 -24
  23. package/node_modules/qs/eslint.config.mjs +56 -0
  24. package/node_modules/qs/lib/parse.js +90 -47
  25. package/node_modules/qs/lib/utils.js +83 -11
  26. package/node_modules/qs/package.json +9 -8
  27. package/node_modules/qs/test/parse.js +245 -9
  28. package/node_modules/qs/test/stringify.js +7 -3
  29. package/node_modules/qs/test/utils.js +135 -0
  30. package/node_modules/request/node_modules/qs/CHANGELOG.md +12 -0
  31. package/node_modules/request/node_modules/qs/README.md +9 -3
  32. package/node_modules/request/node_modules/qs/dist/qs.js +10 -10
  33. package/node_modules/request/node_modules/qs/lib/parse.js +4 -4
  34. package/node_modules/request/node_modules/qs/lib/utils.js +6 -6
  35. package/node_modules/request/node_modules/qs/package.json +13 -4
  36. package/node_modules/request/node_modules/qs/test/parse.js +9 -0
  37. package/node_modules/request/node_modules/qs/test/stringify.js +6 -0
  38. package/node_modules/send/HISTORY.md +7 -0
  39. package/node_modules/send/package.json +5 -5
  40. package/node_modules/serve-static/HISTORY.md +6 -0
  41. package/node_modules/serve-static/package.json +2 -2
  42. package/node_modules/underscore/amd/_setup.js +1 -1
  43. package/node_modules/underscore/amd/pipe.js +13 -0
  44. package/node_modules/underscore/cjs/_setup.js +1 -1
  45. package/node_modules/underscore/cjs/pipe.js +12 -0
  46. package/node_modules/underscore/modules/_flatten.js +20 -18
  47. package/node_modules/underscore/modules/_setup.js +1 -1
  48. package/node_modules/underscore/modules/index.js +2 -2
  49. package/node_modules/underscore/modules/isEqual.js +108 -93
  50. package/node_modules/underscore/modules/package.json +1 -1
  51. package/node_modules/underscore/package.json +1 -1
  52. package/node_modules/underscore/underscore-esm-min.js +3 -3
  53. package/node_modules/underscore/underscore-esm-min.js.map +1 -1
  54. package/node_modules/underscore/underscore-esm.js +132 -115
  55. package/node_modules/underscore/underscore-esm.js.map +1 -1
  56. package/node_modules/underscore/underscore-min.js +3 -3
  57. package/node_modules/underscore/underscore-min.js.map +1 -1
  58. package/node_modules/underscore/underscore-node-f.cjs +132 -115
  59. package/node_modules/underscore/underscore-node-f.cjs.map +1 -1
  60. package/node_modules/underscore/underscore-node.cjs +2 -2
  61. package/node_modules/underscore/underscore-node.mjs +2 -2
  62. package/node_modules/underscore/underscore-umd-min.js +3 -3
  63. package/node_modules/underscore/underscore-umd-min.js.map +1 -1
  64. package/node_modules/underscore/underscore-umd.js +132 -115
  65. package/node_modules/underscore/underscore-umd.js.map +1 -1
  66. package/node_modules/underscore/underscore.js +132 -115
  67. package/package.json +1 -1
  68. package/node_modules/qs/.eslintrc +0 -39
  69. package/node_modules/request/node_modules/qs/bower.json +0 -21
  70. package/node_modules/request/node_modules/qs/component.json +0 -15
  71. package/node_modules/send/node_modules/http-errors/HISTORY.md +0 -180
  72. package/node_modules/send/node_modules/http-errors/LICENSE +0 -23
  73. package/node_modules/send/node_modules/http-errors/README.md +0 -169
  74. package/node_modules/send/node_modules/http-errors/index.js +0 -289
  75. package/node_modules/send/node_modules/http-errors/package.json +0 -50
  76. package/node_modules/send/node_modules/statuses/HISTORY.md +0 -82
  77. package/node_modules/send/node_modules/statuses/LICENSE +0 -23
  78. package/node_modules/send/node_modules/statuses/README.md +0 -136
  79. package/node_modules/send/node_modules/statuses/codes.json +0 -65
  80. package/node_modules/send/node_modules/statuses/index.js +0 -146
  81. package/node_modules/send/node_modules/statuses/package.json +0 -49
  82. package/node_modules/serve-static/node_modules/http-errors/HISTORY.md +0 -180
  83. package/node_modules/serve-static/node_modules/http-errors/LICENSE +0 -23
  84. package/node_modules/serve-static/node_modules/http-errors/README.md +0 -169
  85. package/node_modules/serve-static/node_modules/http-errors/index.js +0 -289
  86. package/node_modules/serve-static/node_modules/http-errors/package.json +0 -50
  87. package/node_modules/serve-static/node_modules/ms/index.js +0 -162
  88. package/node_modules/serve-static/node_modules/ms/license.md +0 -21
  89. package/node_modules/serve-static/node_modules/ms/package.json +0 -38
  90. package/node_modules/serve-static/node_modules/ms/readme.md +0 -59
  91. package/node_modules/serve-static/node_modules/send/HISTORY.md +0 -526
  92. package/node_modules/serve-static/node_modules/send/LICENSE +0 -23
  93. package/node_modules/serve-static/node_modules/send/README.md +0 -327
  94. package/node_modules/serve-static/node_modules/send/SECURITY.md +0 -24
  95. package/node_modules/serve-static/node_modules/send/index.js +0 -1142
  96. package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/HISTORY.md +0 -14
  97. package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/LICENSE +0 -22
  98. package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/README.md +0 -128
  99. package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/index.js +0 -60
  100. package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/package.json +0 -40
  101. package/node_modules/serve-static/node_modules/send/package.json +0 -62
  102. package/node_modules/serve-static/node_modules/statuses/HISTORY.md +0 -82
  103. package/node_modules/serve-static/node_modules/statuses/LICENSE +0 -23
  104. package/node_modules/serve-static/node_modules/statuses/README.md +0 -136
  105. package/node_modules/serve-static/node_modules/statuses/codes.json +0 -65
  106. package/node_modules/serve-static/node_modules/statuses/index.js +0 -146
  107. package/node_modules/serve-static/node_modules/statuses/package.json +0 -49
  108. package/node_modules/underscore/amd/_set.js +0 -21
  109. package/node_modules/underscore/amd/set.js +0 -15
  110. package/node_modules/underscore/cjs/_set.js +0 -21
  111. package/node_modules/underscore/cjs/set.js +0 -15
@@ -1,14 +0,0 @@
1
- 1.0.2 / 2018-01-21
2
- ==================
3
-
4
- * Fix encoding `%` as last character
5
-
6
- 1.0.1 / 2016-06-09
7
- ==================
8
-
9
- * Fix encoding unpaired surrogates at start/end of string
10
-
11
- 1.0.0 / 2016-06-08
12
- ==================
13
-
14
- * Initial release
@@ -1,22 +0,0 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2016 Douglas Christopher Wilson
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- 'Software'), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,128 +0,0 @@
1
- # encodeurl
2
-
3
- [![NPM Version][npm-image]][npm-url]
4
- [![NPM Downloads][downloads-image]][downloads-url]
5
- [![Node.js Version][node-version-image]][node-version-url]
6
- [![Build Status][travis-image]][travis-url]
7
- [![Test Coverage][coveralls-image]][coveralls-url]
8
-
9
- Encode a URL to a percent-encoded form, excluding already-encoded sequences
10
-
11
- ## Installation
12
-
13
- This is a [Node.js](https://nodejs.org/en/) module available through the
14
- [npm registry](https://www.npmjs.com/). Installation is done using the
15
- [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
16
-
17
- ```sh
18
- $ npm install encodeurl
19
- ```
20
-
21
- ## API
22
-
23
- ```js
24
- var encodeUrl = require('encodeurl')
25
- ```
26
-
27
- ### encodeUrl(url)
28
-
29
- Encode a URL to a percent-encoded form, excluding already-encoded sequences.
30
-
31
- This function will take an already-encoded URL and encode all the non-URL
32
- code points (as UTF-8 byte sequences). This function will not encode the
33
- "%" character unless it is not part of a valid sequence (`%20` will be
34
- left as-is, but `%foo` will be encoded as `%25foo`).
35
-
36
- This encode is meant to be "safe" and does not throw errors. It will try as
37
- hard as it can to properly encode the given URL, including replacing any raw,
38
- unpaired surrogate pairs with the Unicode replacement character prior to
39
- encoding.
40
-
41
- This function is _similar_ to the intrinsic function `encodeURI`, except it
42
- will not encode the `%` character if that is part of a valid sequence, will
43
- not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired
44
- surrogate pairs with the Unicode replacement character (instead of throwing).
45
-
46
- ## Examples
47
-
48
- ### Encode a URL containing user-controled data
49
-
50
- ```js
51
- var encodeUrl = require('encodeurl')
52
- var escapeHtml = require('escape-html')
53
-
54
- http.createServer(function onRequest (req, res) {
55
- // get encoded form of inbound url
56
- var url = encodeUrl(req.url)
57
-
58
- // create html message
59
- var body = '<p>Location ' + escapeHtml(url) + ' not found</p>'
60
-
61
- // send a 404
62
- res.statusCode = 404
63
- res.setHeader('Content-Type', 'text/html; charset=UTF-8')
64
- res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
65
- res.end(body, 'utf-8')
66
- })
67
- ```
68
-
69
- ### Encode a URL for use in a header field
70
-
71
- ```js
72
- var encodeUrl = require('encodeurl')
73
- var escapeHtml = require('escape-html')
74
- var url = require('url')
75
-
76
- http.createServer(function onRequest (req, res) {
77
- // parse inbound url
78
- var href = url.parse(req)
79
-
80
- // set new host for redirect
81
- href.host = 'localhost'
82
- href.protocol = 'https:'
83
- href.slashes = true
84
-
85
- // create location header
86
- var location = encodeUrl(url.format(href))
87
-
88
- // create html message
89
- var body = '<p>Redirecting to new site: ' + escapeHtml(location) + '</p>'
90
-
91
- // send a 301
92
- res.statusCode = 301
93
- res.setHeader('Content-Type', 'text/html; charset=UTF-8')
94
- res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8')))
95
- res.setHeader('Location', location)
96
- res.end(body, 'utf-8')
97
- })
98
- ```
99
-
100
- ## Testing
101
-
102
- ```sh
103
- $ npm test
104
- $ npm run lint
105
- ```
106
-
107
- ## References
108
-
109
- - [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986]
110
- - [WHATWG URL Living Standard][whatwg-url]
111
-
112
- [rfc-3986]: https://tools.ietf.org/html/rfc3986
113
- [whatwg-url]: https://url.spec.whatwg.org/
114
-
115
- ## License
116
-
117
- [MIT](LICENSE)
118
-
119
- [npm-image]: https://img.shields.io/npm/v/encodeurl.svg
120
- [npm-url]: https://npmjs.org/package/encodeurl
121
- [node-version-image]: https://img.shields.io/node/v/encodeurl.svg
122
- [node-version-url]: https://nodejs.org/en/download
123
- [travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg
124
- [travis-url]: https://travis-ci.org/pillarjs/encodeurl
125
- [coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg
126
- [coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master
127
- [downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg
128
- [downloads-url]: https://npmjs.org/package/encodeurl
@@ -1,60 +0,0 @@
1
- /*!
2
- * encodeurl
3
- * Copyright(c) 2016 Douglas Christopher Wilson
4
- * MIT Licensed
5
- */
6
-
7
- 'use strict'
8
-
9
- /**
10
- * Module exports.
11
- * @public
12
- */
13
-
14
- module.exports = encodeUrl
15
-
16
- /**
17
- * RegExp to match non-URL code points, *after* encoding (i.e. not including "%")
18
- * and including invalid escape sequences.
19
- * @private
20
- */
21
-
22
- var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g
23
-
24
- /**
25
- * RegExp to match unmatched surrogate pair.
26
- * @private
27
- */
28
-
29
- var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g
30
-
31
- /**
32
- * String to replace unmatched surrogate pair with.
33
- * @private
34
- */
35
-
36
- var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2'
37
-
38
- /**
39
- * Encode a URL to a percent-encoded form, excluding already-encoded sequences.
40
- *
41
- * This function will take an already-encoded URL and encode all the non-URL
42
- * code points. This function will not encode the "%" character unless it is
43
- * not part of a valid sequence (`%20` will be left as-is, but `%foo` will
44
- * be encoded as `%25foo`).
45
- *
46
- * This encode is meant to be "safe" and does not throw errors. It will try as
47
- * hard as it can to properly encode the given URL, including replacing any raw,
48
- * unpaired surrogate pairs with the Unicode replacement character prior to
49
- * encoding.
50
- *
51
- * @param {string} url
52
- * @return {string}
53
- * @public
54
- */
55
-
56
- function encodeUrl (url) {
57
- return String(url)
58
- .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE)
59
- .replace(ENCODE_CHARS_REGEXP, encodeURI)
60
- }
@@ -1,40 +0,0 @@
1
- {
2
- "name": "encodeurl",
3
- "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences",
4
- "version": "1.0.2",
5
- "contributors": [
6
- "Douglas Christopher Wilson <doug@somethingdoug.com>"
7
- ],
8
- "license": "MIT",
9
- "keywords": [
10
- "encode",
11
- "encodeurl",
12
- "url"
13
- ],
14
- "repository": "pillarjs/encodeurl",
15
- "devDependencies": {
16
- "eslint": "3.19.0",
17
- "eslint-config-standard": "10.2.1",
18
- "eslint-plugin-import": "2.8.0",
19
- "eslint-plugin-node": "5.2.1",
20
- "eslint-plugin-promise": "3.6.0",
21
- "eslint-plugin-standard": "3.0.1",
22
- "istanbul": "0.4.5",
23
- "mocha": "2.5.3"
24
- },
25
- "files": [
26
- "LICENSE",
27
- "HISTORY.md",
28
- "README.md",
29
- "index.js"
30
- ],
31
- "engines": {
32
- "node": ">= 0.8"
33
- },
34
- "scripts": {
35
- "lint": "eslint .",
36
- "test": "mocha --reporter spec --bail --check-leaks test/",
37
- "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
38
- "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
39
- }
40
- }
@@ -1,62 +0,0 @@
1
- {
2
- "name": "send",
3
- "description": "Better streaming static file server with Range and conditional-GET support",
4
- "version": "0.19.0",
5
- "author": "TJ Holowaychuk <tj@vision-media.ca>",
6
- "contributors": [
7
- "Douglas Christopher Wilson <doug@somethingdoug.com>",
8
- "James Wyatt Cready <jcready@gmail.com>",
9
- "Jesús Leganés Combarro <piranna@gmail.com>"
10
- ],
11
- "license": "MIT",
12
- "repository": "pillarjs/send",
13
- "keywords": [
14
- "static",
15
- "file",
16
- "server"
17
- ],
18
- "dependencies": {
19
- "debug": "2.6.9",
20
- "depd": "2.0.0",
21
- "destroy": "1.2.0",
22
- "encodeurl": "~1.0.2",
23
- "escape-html": "~1.0.3",
24
- "etag": "~1.8.1",
25
- "fresh": "0.5.2",
26
- "http-errors": "2.0.0",
27
- "mime": "1.6.0",
28
- "ms": "2.1.3",
29
- "on-finished": "2.4.1",
30
- "range-parser": "~1.2.1",
31
- "statuses": "2.0.1"
32
- },
33
- "devDependencies": {
34
- "after": "0.8.2",
35
- "eslint": "7.32.0",
36
- "eslint-config-standard": "14.1.1",
37
- "eslint-plugin-import": "2.25.4",
38
- "eslint-plugin-markdown": "2.2.1",
39
- "eslint-plugin-node": "11.1.0",
40
- "eslint-plugin-promise": "5.2.0",
41
- "eslint-plugin-standard": "4.1.0",
42
- "mocha": "9.2.2",
43
- "nyc": "15.1.0",
44
- "supertest": "6.2.2"
45
- },
46
- "files": [
47
- "HISTORY.md",
48
- "LICENSE",
49
- "README.md",
50
- "SECURITY.md",
51
- "index.js"
52
- ],
53
- "engines": {
54
- "node": ">= 0.8.0"
55
- },
56
- "scripts": {
57
- "lint": "eslint .",
58
- "test": "mocha --check-leaks --reporter spec --bail",
59
- "test-ci": "nyc --reporter=lcov --reporter=text npm test",
60
- "test-cov": "nyc --reporter=html --reporter=text npm test"
61
- }
62
- }
@@ -1,82 +0,0 @@
1
- 2.0.1 / 2021-01-03
2
- ==================
3
-
4
- * Fix returning values from `Object.prototype`
5
-
6
- 2.0.0 / 2020-04-19
7
- ==================
8
-
9
- * Drop support for Node.js 0.6
10
- * Fix messaging casing of `418 I'm a Teapot`
11
- * Remove code 306
12
- * Remove `status[code]` exports; use `status.message[code]`
13
- * Remove `status[msg]` exports; use `status.code[msg]`
14
- * Rename `425 Unordered Collection` to standard `425 Too Early`
15
- * Rename `STATUS_CODES` export to `message`
16
- * Return status message for `statuses(code)` when given code
17
-
18
- 1.5.0 / 2018-03-27
19
- ==================
20
-
21
- * Add `103 Early Hints`
22
-
23
- 1.4.0 / 2017-10-20
24
- ==================
25
-
26
- * Add `STATUS_CODES` export
27
-
28
- 1.3.1 / 2016-11-11
29
- ==================
30
-
31
- * Fix return type in JSDoc
32
-
33
- 1.3.0 / 2016-05-17
34
- ==================
35
-
36
- * Add `421 Misdirected Request`
37
- * perf: enable strict mode
38
-
39
- 1.2.1 / 2015-02-01
40
- ==================
41
-
42
- * Fix message for status 451
43
- - `451 Unavailable For Legal Reasons`
44
-
45
- 1.2.0 / 2014-09-28
46
- ==================
47
-
48
- * Add `208 Already Repored`
49
- * Add `226 IM Used`
50
- * Add `306 (Unused)`
51
- * Add `415 Unable For Legal Reasons`
52
- * Add `508 Loop Detected`
53
-
54
- 1.1.1 / 2014-09-24
55
- ==================
56
-
57
- * Add missing 308 to `codes.json`
58
-
59
- 1.1.0 / 2014-09-21
60
- ==================
61
-
62
- * Add `codes.json` for universal support
63
-
64
- 1.0.4 / 2014-08-20
65
- ==================
66
-
67
- * Package cleanup
68
-
69
- 1.0.3 / 2014-06-08
70
- ==================
71
-
72
- * Add 308 to `.redirect` category
73
-
74
- 1.0.2 / 2014-03-13
75
- ==================
76
-
77
- * Add `.retry` category
78
-
79
- 1.0.1 / 2014-03-12
80
- ==================
81
-
82
- * Initial release
@@ -1,23 +0,0 @@
1
-
2
- The MIT License (MIT)
3
-
4
- Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
5
- Copyright (c) 2016 Douglas Christopher Wilson <doug@somethingdoug.com>
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- THE SOFTWARE.
@@ -1,136 +0,0 @@
1
- # statuses
2
-
3
- [![NPM Version][npm-version-image]][npm-url]
4
- [![NPM Downloads][npm-downloads-image]][npm-url]
5
- [![Node.js Version][node-version-image]][node-version-url]
6
- [![Build Status][ci-image]][ci-url]
7
- [![Test Coverage][coveralls-image]][coveralls-url]
8
-
9
- HTTP status utility for node.
10
-
11
- This module provides a list of status codes and messages sourced from
12
- a few different projects:
13
-
14
- * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)
15
- * The [Node.js project](https://nodejs.org/)
16
- * The [NGINX project](https://www.nginx.com/)
17
- * The [Apache HTTP Server project](https://httpd.apache.org/)
18
-
19
- ## Installation
20
-
21
- This is a [Node.js](https://nodejs.org/en/) module available through the
22
- [npm registry](https://www.npmjs.com/). Installation is done using the
23
- [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
24
-
25
- ```sh
26
- $ npm install statuses
27
- ```
28
-
29
- ## API
30
-
31
- <!-- eslint-disable no-unused-vars -->
32
-
33
- ```js
34
- var status = require('statuses')
35
- ```
36
-
37
- ### status(code)
38
-
39
- Returns the status message string for a known HTTP status code. The code
40
- may be a number or a string. An error is thrown for an unknown status code.
41
-
42
- <!-- eslint-disable no-undef -->
43
-
44
- ```js
45
- status(403) // => 'Forbidden'
46
- status('403') // => 'Forbidden'
47
- status(306) // throws
48
- ```
49
-
50
- ### status(msg)
51
-
52
- Returns the numeric status code for a known HTTP status message. The message
53
- is case-insensitive. An error is thrown for an unknown status message.
54
-
55
- <!-- eslint-disable no-undef -->
56
-
57
- ```js
58
- status('forbidden') // => 403
59
- status('Forbidden') // => 403
60
- status('foo') // throws
61
- ```
62
-
63
- ### status.codes
64
-
65
- Returns an array of all the status codes as `Integer`s.
66
-
67
- ### status.code[msg]
68
-
69
- Returns the numeric status code for a known status message (in lower-case),
70
- otherwise `undefined`.
71
-
72
- <!-- eslint-disable no-undef, no-unused-expressions -->
73
-
74
- ```js
75
- status['not found'] // => 404
76
- ```
77
-
78
- ### status.empty[code]
79
-
80
- Returns `true` if a status code expects an empty body.
81
-
82
- <!-- eslint-disable no-undef, no-unused-expressions -->
83
-
84
- ```js
85
- status.empty[200] // => undefined
86
- status.empty[204] // => true
87
- status.empty[304] // => true
88
- ```
89
-
90
- ### status.message[code]
91
-
92
- Returns the string message for a known numeric status code, otherwise
93
- `undefined`. This object is the same format as the
94
- [Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes).
95
-
96
- <!-- eslint-disable no-undef, no-unused-expressions -->
97
-
98
- ```js
99
- status.message[404] // => 'Not Found'
100
- ```
101
-
102
- ### status.redirect[code]
103
-
104
- Returns `true` if a status code is a valid redirect status.
105
-
106
- <!-- eslint-disable no-undef, no-unused-expressions -->
107
-
108
- ```js
109
- status.redirect[200] // => undefined
110
- status.redirect[301] // => true
111
- ```
112
-
113
- ### status.retry[code]
114
-
115
- Returns `true` if you should retry the rest.
116
-
117
- <!-- eslint-disable no-undef, no-unused-expressions -->
118
-
119
- ```js
120
- status.retry[501] // => undefined
121
- status.retry[503] // => true
122
- ```
123
-
124
- ## License
125
-
126
- [MIT](LICENSE)
127
-
128
- [ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci
129
- [ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci
130
- [coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master
131
- [coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
132
- [node-version-image]: https://badgen.net/npm/node/statuses
133
- [node-version-url]: https://nodejs.org/en/download
134
- [npm-downloads-image]: https://badgen.net/npm/dm/statuses
135
- [npm-url]: https://npmjs.org/package/statuses
136
- [npm-version-image]: https://badgen.net/npm/v/statuses
@@ -1,65 +0,0 @@
1
- {
2
- "100": "Continue",
3
- "101": "Switching Protocols",
4
- "102": "Processing",
5
- "103": "Early Hints",
6
- "200": "OK",
7
- "201": "Created",
8
- "202": "Accepted",
9
- "203": "Non-Authoritative Information",
10
- "204": "No Content",
11
- "205": "Reset Content",
12
- "206": "Partial Content",
13
- "207": "Multi-Status",
14
- "208": "Already Reported",
15
- "226": "IM Used",
16
- "300": "Multiple Choices",
17
- "301": "Moved Permanently",
18
- "302": "Found",
19
- "303": "See Other",
20
- "304": "Not Modified",
21
- "305": "Use Proxy",
22
- "307": "Temporary Redirect",
23
- "308": "Permanent Redirect",
24
- "400": "Bad Request",
25
- "401": "Unauthorized",
26
- "402": "Payment Required",
27
- "403": "Forbidden",
28
- "404": "Not Found",
29
- "405": "Method Not Allowed",
30
- "406": "Not Acceptable",
31
- "407": "Proxy Authentication Required",
32
- "408": "Request Timeout",
33
- "409": "Conflict",
34
- "410": "Gone",
35
- "411": "Length Required",
36
- "412": "Precondition Failed",
37
- "413": "Payload Too Large",
38
- "414": "URI Too Long",
39
- "415": "Unsupported Media Type",
40
- "416": "Range Not Satisfiable",
41
- "417": "Expectation Failed",
42
- "418": "I'm a Teapot",
43
- "421": "Misdirected Request",
44
- "422": "Unprocessable Entity",
45
- "423": "Locked",
46
- "424": "Failed Dependency",
47
- "425": "Too Early",
48
- "426": "Upgrade Required",
49
- "428": "Precondition Required",
50
- "429": "Too Many Requests",
51
- "431": "Request Header Fields Too Large",
52
- "451": "Unavailable For Legal Reasons",
53
- "500": "Internal Server Error",
54
- "501": "Not Implemented",
55
- "502": "Bad Gateway",
56
- "503": "Service Unavailable",
57
- "504": "Gateway Timeout",
58
- "505": "HTTP Version Not Supported",
59
- "506": "Variant Also Negotiates",
60
- "507": "Insufficient Storage",
61
- "508": "Loop Detected",
62
- "509": "Bandwidth Limit Exceeded",
63
- "510": "Not Extended",
64
- "511": "Network Authentication Required"
65
- }