step-node-agent 3.18.0 → 3.18.1
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.
- package/node_modules/accepts/HISTORY.md +7 -0
- package/node_modules/accepts/README.md +3 -5
- package/node_modules/accepts/package.json +18 -18
- package/node_modules/negotiator/HISTORY.md +5 -0
- package/node_modules/negotiator/README.md +3 -3
- package/node_modules/negotiator/index.js +4 -46
- package/node_modules/negotiator/lib/language.js +3 -3
- package/node_modules/negotiator/package.json +11 -11
- package/node_modules/signal-exit/index.js +4 -2
- package/node_modules/signal-exit/package.json +4 -4
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[![NPM Version][npm-version-image]][npm-url]
|
|
4
4
|
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
5
5
|
[![Node.js Version][node-version-image]][node-version-url]
|
|
6
|
-
[![Build Status][
|
|
6
|
+
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
8
|
|
|
9
9
|
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
|
|
@@ -29,8 +29,6 @@ $ npm install accepts
|
|
|
29
29
|
|
|
30
30
|
## API
|
|
31
31
|
|
|
32
|
-
<!-- eslint-disable no-unused-vars -->
|
|
33
|
-
|
|
34
32
|
```js
|
|
35
33
|
var accepts = require('accepts')
|
|
36
34
|
```
|
|
@@ -133,10 +131,10 @@ curl -I -H'Accept: text/html' http://localhost:3000/
|
|
|
133
131
|
|
|
134
132
|
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
|
|
135
133
|
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
|
|
134
|
+
[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
|
|
135
|
+
[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
|
|
136
136
|
[node-version-image]: https://badgen.net/npm/node/accepts
|
|
137
137
|
[node-version-url]: https://nodejs.org/en/download
|
|
138
138
|
[npm-downloads-image]: https://badgen.net/npm/dm/accepts
|
|
139
139
|
[npm-url]: https://npmjs.org/package/accepts
|
|
140
140
|
[npm-version-image]: https://badgen.net/npm/v/accepts
|
|
141
|
-
[travis-image]: https://badgen.net/travis/jshttp/accepts/master
|
|
142
|
-
[travis-url]: https://travis-ci.org/jshttp/accepts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "accepts",
|
|
3
3
|
"description": "Higher-level content negotiation",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.8",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
@@ -9,20 +9,20 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": "jshttp/accepts",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"mime-types": "~2.1.
|
|
13
|
-
"negotiator": "0.6.
|
|
12
|
+
"mime-types": "~2.1.34",
|
|
13
|
+
"negotiator": "0.6.3"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"deep-equal": "1.0.1",
|
|
17
|
-
"eslint": "
|
|
18
|
-
"eslint-config-standard": "
|
|
19
|
-
"eslint-plugin-import": "2.
|
|
20
|
-
"eslint-plugin-markdown": "
|
|
21
|
-
"eslint-plugin-node": "
|
|
22
|
-
"eslint-plugin-promise": "4.
|
|
23
|
-
"eslint-plugin-standard": "4.
|
|
24
|
-
"mocha": "
|
|
25
|
-
"nyc": "
|
|
17
|
+
"eslint": "7.32.0",
|
|
18
|
+
"eslint-config-standard": "14.1.1",
|
|
19
|
+
"eslint-plugin-import": "2.25.4",
|
|
20
|
+
"eslint-plugin-markdown": "2.2.1",
|
|
21
|
+
"eslint-plugin-node": "11.1.0",
|
|
22
|
+
"eslint-plugin-promise": "4.3.1",
|
|
23
|
+
"eslint-plugin-standard": "4.1.0",
|
|
24
|
+
"mocha": "9.2.0",
|
|
25
|
+
"nyc": "15.1.0"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"LICENSE",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"node": ">= 0.6"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
|
-
"lint": "eslint
|
|
36
|
+
"lint": "eslint .",
|
|
37
37
|
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
38
|
-
"test-
|
|
39
|
-
"test-
|
|
38
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
39
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
40
40
|
},
|
|
41
41
|
"keywords": [
|
|
42
42
|
"content",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"accepts"
|
|
46
46
|
]
|
|
47
47
|
|
|
48
|
-
,"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.
|
|
49
|
-
,"_integrity": "sha512-
|
|
50
|
-
,"_from": "accepts@1.3.
|
|
48
|
+
,"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz"
|
|
49
|
+
,"_integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw=="
|
|
50
|
+
,"_from": "accepts@1.3.8"
|
|
51
51
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[![NPM Version][npm-image]][npm-url]
|
|
4
4
|
[![NPM Downloads][downloads-image]][downloads-url]
|
|
5
5
|
[![Node.js Version][node-version-image]][node-version-url]
|
|
6
|
-
[![Build Status][
|
|
6
|
+
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
8
|
|
|
9
9
|
An HTTP content negotiator for Node.js
|
|
@@ -195,9 +195,9 @@ and more.
|
|
|
195
195
|
[npm-url]: https://npmjs.org/package/negotiator
|
|
196
196
|
[node-version-image]: https://img.shields.io/node/v/negotiator.svg
|
|
197
197
|
[node-version-url]: https://nodejs.org/en/download/
|
|
198
|
-
[travis-image]: https://img.shields.io/travis/jshttp/negotiator/master.svg
|
|
199
|
-
[travis-url]: https://travis-ci.org/jshttp/negotiator
|
|
200
198
|
[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg
|
|
201
199
|
[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master
|
|
202
200
|
[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg
|
|
203
201
|
[downloads-url]: https://npmjs.org/package/negotiator
|
|
202
|
+
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/negotiator/ci/master?label=ci
|
|
203
|
+
[github-actions-ci-url]: https://github.com/jshttp/negotiator/actions/workflows/ci.yml
|
|
@@ -8,12 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var modules = Object.create(null);
|
|
11
|
+
var preferredCharsets = require('./lib/charset')
|
|
12
|
+
var preferredEncodings = require('./lib/encoding')
|
|
13
|
+
var preferredLanguages = require('./lib/language')
|
|
14
|
+
var preferredMediaTypes = require('./lib/mediaType')
|
|
17
15
|
|
|
18
16
|
/**
|
|
19
17
|
* Module exports.
|
|
@@ -43,7 +41,6 @@ Negotiator.prototype.charset = function charset(available) {
|
|
|
43
41
|
};
|
|
44
42
|
|
|
45
43
|
Negotiator.prototype.charsets = function charsets(available) {
|
|
46
|
-
var preferredCharsets = loadModule('charset').preferredCharsets;
|
|
47
44
|
return preferredCharsets(this.request.headers['accept-charset'], available);
|
|
48
45
|
};
|
|
49
46
|
|
|
@@ -53,7 +50,6 @@ Negotiator.prototype.encoding = function encoding(available) {
|
|
|
53
50
|
};
|
|
54
51
|
|
|
55
52
|
Negotiator.prototype.encodings = function encodings(available) {
|
|
56
|
-
var preferredEncodings = loadModule('encoding').preferredEncodings;
|
|
57
53
|
return preferredEncodings(this.request.headers['accept-encoding'], available);
|
|
58
54
|
};
|
|
59
55
|
|
|
@@ -63,7 +59,6 @@ Negotiator.prototype.language = function language(available) {
|
|
|
63
59
|
};
|
|
64
60
|
|
|
65
61
|
Negotiator.prototype.languages = function languages(available) {
|
|
66
|
-
var preferredLanguages = loadModule('language').preferredLanguages;
|
|
67
62
|
return preferredLanguages(this.request.headers['accept-language'], available);
|
|
68
63
|
};
|
|
69
64
|
|
|
@@ -73,7 +68,6 @@ Negotiator.prototype.mediaType = function mediaType(available) {
|
|
|
73
68
|
};
|
|
74
69
|
|
|
75
70
|
Negotiator.prototype.mediaTypes = function mediaTypes(available) {
|
|
76
|
-
var preferredMediaTypes = loadModule('mediaType').preferredMediaTypes;
|
|
77
71
|
return preferredMediaTypes(this.request.headers.accept, available);
|
|
78
72
|
};
|
|
79
73
|
|
|
@@ -86,39 +80,3 @@ Negotiator.prototype.preferredLanguage = Negotiator.prototype.language;
|
|
|
86
80
|
Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages;
|
|
87
81
|
Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType;
|
|
88
82
|
Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Load the given module.
|
|
92
|
-
* @private
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
function loadModule(moduleName) {
|
|
96
|
-
var module = modules[moduleName];
|
|
97
|
-
|
|
98
|
-
if (module !== undefined) {
|
|
99
|
-
return module;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// This uses a switch for static require analysis
|
|
103
|
-
switch (moduleName) {
|
|
104
|
-
case 'charset':
|
|
105
|
-
module = require('./lib/charset');
|
|
106
|
-
break;
|
|
107
|
-
case 'encoding':
|
|
108
|
-
module = require('./lib/encoding');
|
|
109
|
-
break;
|
|
110
|
-
case 'language':
|
|
111
|
-
module = require('./lib/language');
|
|
112
|
-
break;
|
|
113
|
-
case 'mediaType':
|
|
114
|
-
module = require('./lib/mediaType');
|
|
115
|
-
break;
|
|
116
|
-
default:
|
|
117
|
-
throw new Error('Cannot find module \'' + moduleName + '\'');
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// Store to prevent invoking require()
|
|
121
|
-
modules[moduleName] = module;
|
|
122
|
-
|
|
123
|
-
return module;
|
|
124
|
-
}
|
|
@@ -54,9 +54,9 @@ function parseLanguage(str, i) {
|
|
|
54
54
|
var match = simpleLanguageRegExp.exec(str);
|
|
55
55
|
if (!match) return null;
|
|
56
56
|
|
|
57
|
-
var prefix = match[1]
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
var prefix = match[1]
|
|
58
|
+
var suffix = match[2]
|
|
59
|
+
var full = prefix
|
|
60
60
|
|
|
61
61
|
if (suffix) full += "-" + suffix;
|
|
62
62
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "negotiator",
|
|
3
3
|
"description": "HTTP content negotiation",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.3",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Federico Romero <federico.romero@outboxlabs.com>",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
],
|
|
19
19
|
"repository": "jshttp/negotiator",
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"eslint": "
|
|
22
|
-
"eslint-plugin-markdown": "
|
|
23
|
-
"mocha": "
|
|
24
|
-
"nyc": "
|
|
21
|
+
"eslint": "7.32.0",
|
|
22
|
+
"eslint-plugin-markdown": "2.2.1",
|
|
23
|
+
"mocha": "9.1.3",
|
|
24
|
+
"nyc": "15.1.0"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"lib/",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"node": ">= 0.6"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"lint": "eslint
|
|
37
|
+
"lint": "eslint .",
|
|
38
38
|
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
39
|
-
"test-
|
|
40
|
-
"test-
|
|
39
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
40
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
,"_resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.
|
|
44
|
-
,"_integrity": "sha512
|
|
45
|
-
,"_from": "negotiator@0.6.
|
|
43
|
+
,"_resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz"
|
|
44
|
+
,"_integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
|
|
45
|
+
,"_from": "negotiator@0.6.3"
|
|
46
46
|
}
|
|
@@ -19,7 +19,9 @@ const processOk = function (process) {
|
|
|
19
19
|
// some kind of non-node environment, just no-op
|
|
20
20
|
/* istanbul ignore if */
|
|
21
21
|
if (!processOk(process)) {
|
|
22
|
-
module.exports = function () {
|
|
22
|
+
module.exports = function () {
|
|
23
|
+
return function () {}
|
|
24
|
+
}
|
|
23
25
|
} else {
|
|
24
26
|
var assert = require('assert')
|
|
25
27
|
var signals = require('./signals.js')
|
|
@@ -52,7 +54,7 @@ if (!processOk(process)) {
|
|
|
52
54
|
module.exports = function (cb, opts) {
|
|
53
55
|
/* istanbul ignore if */
|
|
54
56
|
if (!processOk(global.process)) {
|
|
55
|
-
return
|
|
57
|
+
return function () {}
|
|
56
58
|
}
|
|
57
59
|
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
|
|
58
60
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signal-exit",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "when you want to fire an event no matter how a process exits.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"tap": "^15.1.1"
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
,"_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.
|
|
40
|
-
,"_integrity": "sha512-
|
|
41
|
-
,"_from": "signal-exit@3.0.
|
|
39
|
+
,"_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz"
|
|
40
|
+
,"_integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
|
41
|
+
,"_from": "signal-exit@3.0.7"
|
|
42
42
|
}
|