node-red-contrib-web-worldmap 2.29.0 → 2.30.2
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/.github/FUNDING.yml +13 -0
- package/CHANGELOG.md +6 -2
- package/README.md +4 -10
- package/node_modules/array-flatten/package.json +6 -9
- package/node_modules/body-parser/HISTORY.md +18 -0
- package/node_modules/body-parser/README.md +9 -1
- package/node_modules/body-parser/SECURITY.md +25 -0
- package/node_modules/body-parser/lib/read.js +26 -2
- package/node_modules/body-parser/lib/types/json.js +10 -4
- package/node_modules/body-parser/package.json +24 -20
- package/node_modules/call-bind/.eslintignore +1 -0
- package/node_modules/call-bind/.eslintrc +17 -0
- package/node_modules/call-bind/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind/.nycrc +13 -0
- package/node_modules/call-bind/CHANGELOG.md +42 -0
- package/node_modules/call-bind/LICENSE +21 -0
- package/node_modules/call-bind/README.md +2 -0
- package/node_modules/call-bind/callBound.js +15 -0
- package/node_modules/call-bind/index.js +47 -0
- package/node_modules/call-bind/package.json +108 -0
- package/node_modules/call-bind/test/callBound.js +55 -0
- package/node_modules/call-bind/test/index.js +66 -0
- package/node_modules/cookie/HISTORY.md +8 -0
- package/node_modules/cookie/README.md +50 -34
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +83 -15
- package/node_modules/cookie/package.json +17 -15
- package/node_modules/cookie-signature/package.json +6 -9
- package/node_modules/depd/History.md +7 -0
- package/node_modules/depd/LICENSE +1 -1
- package/node_modules/depd/Readme.md +8 -8
- package/node_modules/depd/index.js +29 -13
- package/node_modules/depd/package.json +25 -24
- package/node_modules/destroy/LICENSE +1 -0
- package/node_modules/destroy/README.md +15 -12
- package/node_modules/destroy/index.js +147 -13
- package/node_modules/destroy/package.json +29 -20
- package/node_modules/ee-first/package.json +6 -9
- package/node_modules/encodeurl/package.json +11 -14
- package/node_modules/escape-html/package.json +11 -14
- package/node_modules/etag/package.json +11 -14
- package/node_modules/express/History.md +54 -0
- package/node_modules/express/Readme.md +39 -31
- package/node_modules/express/lib/application.js +18 -1
- package/node_modules/express/lib/response.js +40 -18
- package/node_modules/express/lib/router/index.js +20 -15
- package/node_modules/express/lib/router/route.js +9 -0
- package/node_modules/express/lib/utils.js +1 -0
- package/node_modules/express/lib/view.js +1 -1
- package/node_modules/express/package.json +25 -26
- package/node_modules/finalhandler/HISTORY.md +8 -0
- package/node_modules/finalhandler/LICENSE +1 -1
- package/node_modules/finalhandler/README.md +5 -6
- package/node_modules/finalhandler/SECURITY.md +25 -0
- package/node_modules/finalhandler/index.js +8 -3
- package/node_modules/finalhandler/package.json +30 -32
- package/node_modules/fresh/package.json +6 -9
- package/node_modules/function-bind/.editorconfig +20 -0
- package/node_modules/function-bind/.eslintrc +15 -0
- package/node_modules/function-bind/.jscs.json +176 -0
- package/node_modules/function-bind/.npmignore +22 -0
- package/node_modules/function-bind/.travis.yml +168 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +48 -0
- package/node_modules/function-bind/implementation.js +52 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +96 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +37 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +98 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +334 -0
- package/node_modules/get-intrinsic/package.json +120 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/has/LICENSE-MIT +22 -0
- package/node_modules/has/README.md +18 -0
- package/node_modules/has/package.json +73 -0
- package/node_modules/has/src/index.js +5 -0
- package/node_modules/has/test/index.js +10 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +75 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.js +13 -0
- package/node_modules/has-symbols/package.json +126 -0
- package/node_modules/has-symbols/shams.js +42 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +28 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
- package/node_modules/has-symbols/test/tests.js +56 -0
- package/node_modules/http-errors/HISTORY.md +15 -0
- package/node_modules/http-errors/README.md +2 -2
- package/node_modules/http-errors/index.js +15 -25
- package/node_modules/http-errors/package.json +22 -20
- package/node_modules/media-typer/package.json +6 -9
- package/node_modules/merge-descriptors/package.json +6 -9
- package/node_modules/methods/package.json +11 -14
- package/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/object-inspect/CHANGELOG.md +360 -0
- package/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/object-inspect/index.js +512 -0
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +122 -0
- package/node_modules/object-inspect/readme.markdown +86 -0
- package/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/object-inspect/test/has.js +15 -0
- package/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/object-inspect/test/inspect.js +139 -0
- package/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/object-inspect/test/quoteStyle.js +17 -0
- package/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/object-inspect/test/values.js +211 -0
- package/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/on-finished/HISTORY.md +10 -0
- package/node_modules/on-finished/README.md +28 -20
- package/node_modules/on-finished/index.js +51 -13
- package/node_modules/on-finished/package.json +25 -20
- package/node_modules/path-to-regexp/package.json +6 -9
- package/node_modules/qs/CHANGELOG.md +22 -5
- package/node_modules/qs/README.md +7 -0
- package/node_modules/qs/dist/qs.js +1207 -5
- package/node_modules/qs/lib/parse.js +6 -0
- package/node_modules/qs/lib/stringify.js +33 -3
- package/node_modules/qs/package.json +16 -13
- package/node_modules/qs/test/parse.js +9 -0
- package/node_modules/qs/test/stringify.js +62 -1
- package/node_modules/raw-body/HISTORY.md +14 -0
- package/node_modules/raw-body/LICENSE +1 -1
- package/node_modules/raw-body/README.md +4 -0
- package/node_modules/raw-body/SECURITY.md +24 -0
- package/node_modules/raw-body/index.js +45 -2
- package/node_modules/raw-body/package.json +16 -15
- package/node_modules/send/HISTORY.md +15 -0
- package/node_modules/send/LICENSE +1 -1
- package/node_modules/send/README.md +2 -2
- package/node_modules/send/SECURITY.md +24 -0
- package/node_modules/send/index.js +37 -27
- package/node_modules/send/package.json +22 -21
- package/node_modules/serve-static/HISTORY.md +12 -0
- package/node_modules/serve-static/README.md +1 -1
- package/node_modules/serve-static/package.json +16 -16
- package/node_modules/side-channel/.eslintignore +1 -0
- package/node_modules/side-channel/.eslintrc +11 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +65 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +2 -0
- package/node_modules/side-channel/index.js +124 -0
- package/node_modules/side-channel/package.json +95 -0
- package/node_modules/side-channel/test/index.js +78 -0
- package/node_modules/statuses/HISTORY.md +17 -0
- package/node_modules/statuses/README.md +51 -42
- package/node_modules/statuses/codes.json +2 -3
- package/node_modules/statuses/index.js +52 -19
- package/node_modules/statuses/package.json +29 -31
- package/node_modules/unpipe/package.json +7 -9
- package/node_modules/utils-merge/package.json +6 -9
- package/package.json +2 -2
- package/worldmap/worldmap.js +22 -7
- package/worldmap.html +17 -1
- package/worldmap.js +553 -551
- package/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
- package/node_modules/depd/lib/compat/event-listener-count.js +0 -22
- package/node_modules/depd/lib/compat/index.js +0 -79
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var callBound = require('../callBound');
|
|
6
|
+
|
|
7
|
+
test('callBound', function (t) {
|
|
8
|
+
// static primitive
|
|
9
|
+
t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
|
|
10
|
+
t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
|
|
11
|
+
|
|
12
|
+
// static non-function object
|
|
13
|
+
t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
|
|
14
|
+
t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
|
|
15
|
+
t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
|
|
16
|
+
t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
|
|
17
|
+
|
|
18
|
+
// static function
|
|
19
|
+
t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
|
|
20
|
+
t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
|
|
21
|
+
|
|
22
|
+
// prototype primitive
|
|
23
|
+
t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
|
|
24
|
+
t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
|
|
25
|
+
|
|
26
|
+
// prototype function
|
|
27
|
+
t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself');
|
|
28
|
+
t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself');
|
|
29
|
+
t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original');
|
|
30
|
+
t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original');
|
|
31
|
+
|
|
32
|
+
t['throws'](
|
|
33
|
+
function () { callBound('does not exist'); },
|
|
34
|
+
SyntaxError,
|
|
35
|
+
'nonexistent intrinsic throws'
|
|
36
|
+
);
|
|
37
|
+
t['throws'](
|
|
38
|
+
function () { callBound('does not exist', true); },
|
|
39
|
+
SyntaxError,
|
|
40
|
+
'allowMissing arg still throws for unknown intrinsic'
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
/* globals WeakRef: false */
|
|
44
|
+
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
|
|
45
|
+
st['throws'](
|
|
46
|
+
function () { callBound('WeakRef'); },
|
|
47
|
+
TypeError,
|
|
48
|
+
'real but absent intrinsic throws'
|
|
49
|
+
);
|
|
50
|
+
st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
|
|
51
|
+
st.end();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
t.end();
|
|
55
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var callBind = require('../');
|
|
4
|
+
var bind = require('function-bind');
|
|
5
|
+
|
|
6
|
+
var test = require('tape');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* older engines have length nonconfigurable
|
|
10
|
+
* in io.js v3, it is configurable except on bound functions, hence the .bind()
|
|
11
|
+
*/
|
|
12
|
+
var functionsHaveConfigurableLengths = !!(
|
|
13
|
+
Object.getOwnPropertyDescriptor
|
|
14
|
+
&& Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
test('callBind', function (t) {
|
|
18
|
+
var sentinel = { sentinel: true };
|
|
19
|
+
var func = function (a, b) {
|
|
20
|
+
// eslint-disable-next-line no-invalid-this
|
|
21
|
+
return [this, a, b];
|
|
22
|
+
};
|
|
23
|
+
t.equal(func.length, 2, 'original function length is 2');
|
|
24
|
+
t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
|
|
25
|
+
t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args');
|
|
26
|
+
t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args');
|
|
27
|
+
|
|
28
|
+
var bound = callBind(func);
|
|
29
|
+
t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
|
30
|
+
t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args');
|
|
31
|
+
t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args');
|
|
32
|
+
t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args');
|
|
33
|
+
|
|
34
|
+
var boundR = callBind(func, sentinel);
|
|
35
|
+
t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
|
36
|
+
t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args');
|
|
37
|
+
t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args');
|
|
38
|
+
t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args');
|
|
39
|
+
|
|
40
|
+
var boundArg = callBind(func, sentinel, 1);
|
|
41
|
+
t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
|
42
|
+
t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args');
|
|
43
|
+
t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
|
|
44
|
+
t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args');
|
|
45
|
+
|
|
46
|
+
t.test('callBind.apply', function (st) {
|
|
47
|
+
var aBound = callBind.apply(func);
|
|
48
|
+
st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args');
|
|
49
|
+
st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
|
|
50
|
+
st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
|
|
51
|
+
|
|
52
|
+
var aBoundArg = callBind.apply(func);
|
|
53
|
+
st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args');
|
|
54
|
+
st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
|
|
55
|
+
st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
|
|
56
|
+
|
|
57
|
+
var aBoundR = callBind.apply(func, sentinel);
|
|
58
|
+
st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args');
|
|
59
|
+
st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args');
|
|
60
|
+
st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args');
|
|
61
|
+
|
|
62
|
+
st.end();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
t.end();
|
|
66
|
+
});
|
|
@@ -112,9 +112,23 @@ so if both are set, they should point to the same date and time.
|
|
|
112
112
|
Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path
|
|
113
113
|
is considered the ["default path"][rfc-6265-5.1.4].
|
|
114
114
|
|
|
115
|
+
##### priority
|
|
116
|
+
|
|
117
|
+
Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1].
|
|
118
|
+
|
|
119
|
+
- `'low'` will set the `Priority` attribute to `Low`.
|
|
120
|
+
- `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
|
|
121
|
+
- `'high'` will set the `Priority` attribute to `High`.
|
|
122
|
+
|
|
123
|
+
More information about the different priority levels can be found in
|
|
124
|
+
[the specification][rfc-west-cookie-priority-00-4.1].
|
|
125
|
+
|
|
126
|
+
**note** This is an attribute that has not yet been fully standardized, and may change in the future.
|
|
127
|
+
This also means many clients may ignore this attribute until they understand it.
|
|
128
|
+
|
|
115
129
|
##### sameSite
|
|
116
130
|
|
|
117
|
-
Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-
|
|
131
|
+
Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Cookie` attribute][rfc-6265bis-09-5.4.7].
|
|
118
132
|
|
|
119
133
|
- `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
|
|
120
134
|
- `false` will not set the `SameSite` attribute.
|
|
@@ -123,7 +137,7 @@ Specifies the `boolean` or `string` to be the value for the [`SameSite` `Set-Coo
|
|
|
123
137
|
- `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
|
|
124
138
|
|
|
125
139
|
More information about the different enforcement levels can be found in
|
|
126
|
-
[the specification][rfc-6265bis-
|
|
140
|
+
[the specification][rfc-6265bis-09-5.4.7].
|
|
127
141
|
|
|
128
142
|
**note** This is an attribute that has not yet been fully standardized, and may change in the future.
|
|
129
143
|
This also means many clients may ignore this attribute until they understand it.
|
|
@@ -198,12 +212,12 @@ $ npm test
|
|
|
198
212
|
```
|
|
199
213
|
$ npm run bench
|
|
200
214
|
|
|
201
|
-
> cookie@0.4.
|
|
215
|
+
> cookie@0.4.2 bench
|
|
202
216
|
> node benchmark/index.js
|
|
203
217
|
|
|
204
|
-
node@16.
|
|
205
|
-
v8@9.4.146.24-node.
|
|
206
|
-
uv@1.
|
|
218
|
+
node@16.14.0
|
|
219
|
+
v8@9.4.146.24-node.20
|
|
220
|
+
uv@1.43.0
|
|
207
221
|
zlib@1.2.11
|
|
208
222
|
brotli@1.0.9
|
|
209
223
|
ares@1.18.1
|
|
@@ -211,11 +225,11 @@ $ npm run bench
|
|
|
211
225
|
nghttp2@1.45.1
|
|
212
226
|
napi@8
|
|
213
227
|
llhttp@6.0.4
|
|
214
|
-
openssl@1.1.
|
|
215
|
-
cldr@
|
|
216
|
-
icu@
|
|
217
|
-
tz@
|
|
218
|
-
unicode@
|
|
228
|
+
openssl@1.1.1m+quic
|
|
229
|
+
cldr@40.0
|
|
230
|
+
icu@70.1
|
|
231
|
+
tz@2021a3
|
|
232
|
+
unicode@14.0
|
|
219
233
|
ngtcp2@0.1.0-DEV
|
|
220
234
|
nghttp3@0.1.0-DEV
|
|
221
235
|
|
|
@@ -225,21 +239,22 @@ $ npm run bench
|
|
|
225
239
|
|
|
226
240
|
15 tests completed.
|
|
227
241
|
|
|
228
|
-
parse accounts.google.com x
|
|
229
|
-
parse apple.com x
|
|
230
|
-
parse cloudflare.com x
|
|
231
|
-
parse docs.google.com x
|
|
232
|
-
parse drive.google.com x
|
|
233
|
-
parse en.wikipedia.org x
|
|
234
|
-
parse linkedin.com x
|
|
235
|
-
parse maps.google.com x
|
|
236
|
-
parse microsoft.com x
|
|
237
|
-
parse play.google.com x
|
|
238
|
-
parse plus.google.com x
|
|
239
|
-
parse
|
|
240
|
-
parse
|
|
241
|
-
parse
|
|
242
|
-
parse
|
|
242
|
+
parse accounts.google.com x 2,421,245 ops/sec ±0.80% (188 runs sampled)
|
|
243
|
+
parse apple.com x 2,684,710 ops/sec ±0.59% (189 runs sampled)
|
|
244
|
+
parse cloudflare.com x 2,231,418 ops/sec ±0.76% (186 runs sampled)
|
|
245
|
+
parse docs.google.com x 2,316,357 ops/sec ±1.28% (187 runs sampled)
|
|
246
|
+
parse drive.google.com x 2,363,543 ops/sec ±0.49% (189 runs sampled)
|
|
247
|
+
parse en.wikipedia.org x 839,414 ops/sec ±0.53% (189 runs sampled)
|
|
248
|
+
parse linkedin.com x 553,797 ops/sec ±0.63% (190 runs sampled)
|
|
249
|
+
parse maps.google.com x 1,314,779 ops/sec ±0.72% (189 runs sampled)
|
|
250
|
+
parse microsoft.com x 153,783 ops/sec ±0.53% (190 runs sampled)
|
|
251
|
+
parse play.google.com x 2,249,574 ops/sec ±0.59% (187 runs sampled)
|
|
252
|
+
parse plus.google.com x 2,258,682 ops/sec ±0.60% (188 runs sampled)
|
|
253
|
+
parse sites.google.com x 2,247,069 ops/sec ±0.68% (189 runs sampled)
|
|
254
|
+
parse support.google.com x 1,456,840 ops/sec ±0.70% (187 runs sampled)
|
|
255
|
+
parse www.google.com x 1,046,028 ops/sec ±0.58% (188 runs sampled)
|
|
256
|
+
parse youtu.be x 937,428 ops/sec ±1.47% (190 runs sampled)
|
|
257
|
+
parse youtube.com x 963,878 ops/sec ±0.59% (190 runs sampled)
|
|
243
258
|
|
|
244
259
|
> node benchmark/parse.js
|
|
245
260
|
|
|
@@ -247,20 +262,21 @@ $ npm run bench
|
|
|
247
262
|
|
|
248
263
|
6 tests completed.
|
|
249
264
|
|
|
250
|
-
simple x
|
|
251
|
-
decode x
|
|
252
|
-
unquote x
|
|
253
|
-
duplicates x
|
|
254
|
-
10 cookies x
|
|
255
|
-
100 cookies x
|
|
265
|
+
simple x 2,745,604 ops/sec ±0.77% (185 runs sampled)
|
|
266
|
+
decode x 557,287 ops/sec ±0.60% (188 runs sampled)
|
|
267
|
+
unquote x 2,498,475 ops/sec ±0.55% (189 runs sampled)
|
|
268
|
+
duplicates x 868,591 ops/sec ±0.89% (187 runs sampled)
|
|
269
|
+
10 cookies x 306,745 ops/sec ±0.49% (190 runs sampled)
|
|
270
|
+
100 cookies x 22,414 ops/sec ±2.38% (182 runs sampled)
|
|
256
271
|
```
|
|
257
272
|
|
|
258
273
|
## References
|
|
259
274
|
|
|
260
275
|
- [RFC 6265: HTTP State Management Mechanism][rfc-6265]
|
|
261
|
-
- [Same-site Cookies][rfc-6265bis-
|
|
276
|
+
- [Same-site Cookies][rfc-6265bis-09-5.4.7]
|
|
262
277
|
|
|
263
|
-
[rfc-
|
|
278
|
+
[rfc-west-cookie-priority-00-4.1]: https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1
|
|
279
|
+
[rfc-6265bis-09-5.4.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7
|
|
264
280
|
[rfc-6265]: https://tools.ietf.org/html/rfc6265
|
|
265
281
|
[rfc-6265-5.1.4]: https://tools.ietf.org/html/rfc6265#section-5.1.4
|
|
266
282
|
[rfc-6265-5.2.1]: https://tools.ietf.org/html/rfc6265#section-5.2.1
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Security Policies and Procedures
|
|
2
|
+
|
|
3
|
+
## Reporting a Bug
|
|
4
|
+
|
|
5
|
+
The `cookie` team and community take all security bugs seriously. Thank
|
|
6
|
+
you for improving the security of the project. We appreciate your efforts and
|
|
7
|
+
responsible disclosure and will make every effort to acknowledge your
|
|
8
|
+
contributions.
|
|
9
|
+
|
|
10
|
+
Report security bugs by emailing the current owner(s) of `cookie`. This
|
|
11
|
+
information can be found in the npm registry using the command
|
|
12
|
+
`npm owner ls cookie`.
|
|
13
|
+
If unsure or unable to get the information from the above, open an issue
|
|
14
|
+
in the [project issue tracker](https://github.com/jshttp/cookie/issues)
|
|
15
|
+
asking for the current contact information.
|
|
16
|
+
|
|
17
|
+
To ensure the timely response to your report, please ensure that the entirety
|
|
18
|
+
of the report is contained within the email body and not solely behind a web
|
|
19
|
+
link or an attachment.
|
|
20
|
+
|
|
21
|
+
At least one owner will acknowledge your email within 48 hours, and will send a
|
|
22
|
+
more detailed response within 48 hours indicating the next steps in handling
|
|
23
|
+
your report. After the initial reply to your report, the owners will
|
|
24
|
+
endeavor to keep you informed of the progress towards a fix and full
|
|
25
|
+
announcement, and may ask for additional information or guidance.
|
|
@@ -20,8 +20,7 @@ exports.serialize = serialize;
|
|
|
20
20
|
* @private
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
var
|
|
24
|
-
var encode = encodeURIComponent;
|
|
23
|
+
var __toString = Object.prototype.toString
|
|
25
24
|
|
|
26
25
|
/**
|
|
27
26
|
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
@@ -52,31 +51,42 @@ function parse(str, options) {
|
|
|
52
51
|
|
|
53
52
|
var obj = {}
|
|
54
53
|
var opt = options || {};
|
|
55
|
-
var pairs = str.split(';')
|
|
56
54
|
var dec = opt.decode || decode;
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var
|
|
56
|
+
var index = 0
|
|
57
|
+
while (index < str.length) {
|
|
58
|
+
var eqIdx = str.indexOf('=', index)
|
|
61
59
|
|
|
62
|
-
//
|
|
63
|
-
if (
|
|
64
|
-
|
|
60
|
+
// no more cookie pairs
|
|
61
|
+
if (eqIdx === -1) {
|
|
62
|
+
break
|
|
65
63
|
}
|
|
66
64
|
|
|
67
|
-
var
|
|
65
|
+
var endIdx = str.indexOf(';', index)
|
|
66
|
+
|
|
67
|
+
if (endIdx === -1) {
|
|
68
|
+
endIdx = str.length
|
|
69
|
+
} else if (endIdx < eqIdx) {
|
|
70
|
+
// backtrack on prior semicolon
|
|
71
|
+
index = str.lastIndexOf(';', eqIdx - 1) + 1
|
|
72
|
+
continue
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
var key = str.slice(index, eqIdx).trim()
|
|
68
76
|
|
|
69
77
|
// only assign once
|
|
70
|
-
if (undefined
|
|
71
|
-
var val =
|
|
78
|
+
if (undefined === obj[key]) {
|
|
79
|
+
var val = str.slice(eqIdx + 1, endIdx).trim()
|
|
72
80
|
|
|
73
81
|
// quoted values
|
|
74
|
-
if (val
|
|
82
|
+
if (val.charCodeAt(0) === 0x22) {
|
|
75
83
|
val = val.slice(1, -1)
|
|
76
84
|
}
|
|
77
85
|
|
|
78
86
|
obj[key] = tryDecode(val, dec);
|
|
79
87
|
}
|
|
88
|
+
|
|
89
|
+
index = endIdx + 1
|
|
80
90
|
}
|
|
81
91
|
|
|
82
92
|
return obj;
|
|
@@ -145,11 +155,13 @@ function serialize(name, val, options) {
|
|
|
145
155
|
}
|
|
146
156
|
|
|
147
157
|
if (opt.expires) {
|
|
148
|
-
|
|
158
|
+
var expires = opt.expires
|
|
159
|
+
|
|
160
|
+
if (!isDate(expires) || isNaN(expires.valueOf())) {
|
|
149
161
|
throw new TypeError('option expires is invalid');
|
|
150
162
|
}
|
|
151
163
|
|
|
152
|
-
str += '; Expires=' +
|
|
164
|
+
str += '; Expires=' + expires.toUTCString()
|
|
153
165
|
}
|
|
154
166
|
|
|
155
167
|
if (opt.httpOnly) {
|
|
@@ -160,6 +172,26 @@ function serialize(name, val, options) {
|
|
|
160
172
|
str += '; Secure';
|
|
161
173
|
}
|
|
162
174
|
|
|
175
|
+
if (opt.priority) {
|
|
176
|
+
var priority = typeof opt.priority === 'string'
|
|
177
|
+
? opt.priority.toLowerCase()
|
|
178
|
+
: opt.priority
|
|
179
|
+
|
|
180
|
+
switch (priority) {
|
|
181
|
+
case 'low':
|
|
182
|
+
str += '; Priority=Low'
|
|
183
|
+
break
|
|
184
|
+
case 'medium':
|
|
185
|
+
str += '; Priority=Medium'
|
|
186
|
+
break
|
|
187
|
+
case 'high':
|
|
188
|
+
str += '; Priority=High'
|
|
189
|
+
break
|
|
190
|
+
default:
|
|
191
|
+
throw new TypeError('option priority is invalid')
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
163
195
|
if (opt.sameSite) {
|
|
164
196
|
var sameSite = typeof opt.sameSite === 'string'
|
|
165
197
|
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
@@ -185,6 +217,42 @@ function serialize(name, val, options) {
|
|
|
185
217
|
return str;
|
|
186
218
|
}
|
|
187
219
|
|
|
220
|
+
/**
|
|
221
|
+
* URL-decode string value. Optimized to skip native call when no %.
|
|
222
|
+
*
|
|
223
|
+
* @param {string} str
|
|
224
|
+
* @returns {string}
|
|
225
|
+
*/
|
|
226
|
+
|
|
227
|
+
function decode (str) {
|
|
228
|
+
return str.indexOf('%') !== -1
|
|
229
|
+
? decodeURIComponent(str)
|
|
230
|
+
: str
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* URL-encode value.
|
|
235
|
+
*
|
|
236
|
+
* @param {string} str
|
|
237
|
+
* @returns {string}
|
|
238
|
+
*/
|
|
239
|
+
|
|
240
|
+
function encode (val) {
|
|
241
|
+
return encodeURIComponent(val)
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Determine if value is a Date.
|
|
246
|
+
*
|
|
247
|
+
* @param {*} val
|
|
248
|
+
* @private
|
|
249
|
+
*/
|
|
250
|
+
|
|
251
|
+
function isDate (val) {
|
|
252
|
+
return __toString.call(val) === '[object Date]' ||
|
|
253
|
+
val instanceof Date
|
|
254
|
+
}
|
|
255
|
+
|
|
188
256
|
/**
|
|
189
257
|
* Try decoding a string using a decoding function.
|
|
190
258
|
*
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_from": "cookie@0.
|
|
3
|
-
"_id": "cookie@0.
|
|
2
|
+
"_from": "cookie@0.5.0",
|
|
3
|
+
"_id": "cookie@0.5.0",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
6
|
-
"_location": "/
|
|
5
|
+
"_integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
|
|
6
|
+
"_location": "/cookie",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
9
9
|
"type": "version",
|
|
10
10
|
"registry": true,
|
|
11
|
-
"raw": "cookie@0.
|
|
11
|
+
"raw": "cookie@0.5.0",
|
|
12
12
|
"name": "cookie",
|
|
13
13
|
"escapedName": "cookie",
|
|
14
|
-
"rawSpec": "0.
|
|
14
|
+
"rawSpec": "0.5.0",
|
|
15
15
|
"saveSpec": null,
|
|
16
|
-
"fetchSpec": "0.
|
|
16
|
+
"fetchSpec": "0.5.0"
|
|
17
17
|
},
|
|
18
18
|
"_requiredBy": [
|
|
19
|
-
"/
|
|
19
|
+
"/express"
|
|
20
20
|
],
|
|
21
|
-
"_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.
|
|
22
|
-
"_shasum": "
|
|
23
|
-
"_spec": "cookie@0.
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
|
|
22
|
+
"_shasum": "d1f5d71adec6558c58f389987c366aa47e994f8b",
|
|
23
|
+
"_spec": "cookie@0.5.0",
|
|
24
24
|
"_where": "/Users/conway/Projects/worldmap/node_modules/express",
|
|
25
25
|
"author": {
|
|
26
26
|
"name": "Roman Shtylman",
|
|
@@ -43,9 +43,10 @@
|
|
|
43
43
|
"benchmark": "2.1.4",
|
|
44
44
|
"eslint": "7.32.0",
|
|
45
45
|
"eslint-plugin-markdown": "2.2.1",
|
|
46
|
-
"mocha": "9.2.
|
|
46
|
+
"mocha": "9.2.2",
|
|
47
47
|
"nyc": "15.1.0",
|
|
48
|
-
"
|
|
48
|
+
"safe-buffer": "5.2.1",
|
|
49
|
+
"top-sites": "1.1.97"
|
|
49
50
|
},
|
|
50
51
|
"engines": {
|
|
51
52
|
"node": ">= 0.6"
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"HISTORY.md",
|
|
55
56
|
"LICENSE",
|
|
56
57
|
"README.md",
|
|
58
|
+
"SECURITY.md",
|
|
57
59
|
"index.js"
|
|
58
60
|
],
|
|
59
61
|
"homepage": "https://github.com/jshttp/cookie#readme",
|
|
@@ -70,11 +72,11 @@
|
|
|
70
72
|
"scripts": {
|
|
71
73
|
"bench": "node benchmark/index.js",
|
|
72
74
|
"lint": "eslint .",
|
|
73
|
-
"test": "mocha --reporter spec --bail --check-leaks
|
|
75
|
+
"test": "mocha --reporter spec --bail --check-leaks test/",
|
|
74
76
|
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
75
77
|
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
76
78
|
"update-bench": "node scripts/update-benchmark.js",
|
|
77
79
|
"version": "node scripts/version-history.js && git add HISTORY.md"
|
|
78
80
|
},
|
|
79
|
-
"version": "0.
|
|
81
|
+
"version": "0.5.0"
|
|
80
82
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_args": [
|
|
3
|
-
[
|
|
4
|
-
"cookie-signature@1.0.6",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
2
|
"_from": "cookie-signature@1.0.6",
|
|
9
3
|
"_id": "cookie-signature@1.0.6",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "
|
|
5
|
+
"_integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
|
|
12
6
|
"_location": "/cookie-signature",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
@@ -25,8 +19,9 @@
|
|
|
25
19
|
"/express"
|
|
26
20
|
],
|
|
27
21
|
"_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
22
|
+
"_shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c",
|
|
23
|
+
"_spec": "cookie-signature@1.0.6",
|
|
24
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/express",
|
|
30
25
|
"author": {
|
|
31
26
|
"name": "TJ Holowaychuk",
|
|
32
27
|
"email": "tj@learnboost.com"
|
|
@@ -34,7 +29,9 @@
|
|
|
34
29
|
"bugs": {
|
|
35
30
|
"url": "https://github.com/visionmedia/node-cookie-signature/issues"
|
|
36
31
|
},
|
|
32
|
+
"bundleDependencies": false,
|
|
37
33
|
"dependencies": {},
|
|
34
|
+
"deprecated": false,
|
|
38
35
|
"description": "Sign and unsign cookies",
|
|
39
36
|
"devDependencies": {
|
|
40
37
|
"mocha": "*",
|
|
@@ -267,14 +267,14 @@ deprecate.property(exports, 'oldprop', 'oldprop >= 0.10')
|
|
|
267
267
|
|
|
268
268
|
[MIT](LICENSE)
|
|
269
269
|
|
|
270
|
-
[
|
|
271
|
-
[npm-downloads-image]: https://img.shields.io/npm/dm/depd.svg
|
|
272
|
-
[npm-url]: https://npmjs.org/package/depd
|
|
273
|
-
[travis-image]: https://img.shields.io/travis/dougwilson/nodejs-depd/master.svg?label=linux
|
|
274
|
-
[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
|
|
275
|
-
[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/nodejs-depd/master.svg?label=windows
|
|
270
|
+
[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/nodejs-depd/master?label=windows
|
|
276
271
|
[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd
|
|
277
|
-
[coveralls-image]: https://
|
|
272
|
+
[coveralls-image]: https://badgen.net/coveralls/c/github/dougwilson/nodejs-depd/master
|
|
278
273
|
[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master
|
|
279
|
-
[node-image]: https://
|
|
274
|
+
[node-image]: https://badgen.net/npm/node/depd
|
|
280
275
|
[node-url]: https://nodejs.org/en/download/
|
|
276
|
+
[npm-downloads-image]: https://badgen.net/npm/dm/depd
|
|
277
|
+
[npm-url]: https://npmjs.org/package/depd
|
|
278
|
+
[npm-version-image]: https://badgen.net/npm/v/depd
|
|
279
|
+
[travis-image]: https://badgen.net/travis/dougwilson/nodejs-depd/master?label=linux
|
|
280
|
+
[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd
|