node-red-contrib-web-worldmap 5.5.6 → 5.5.7
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/CHANGELOG.md +1 -0
- package/README.md +1 -0
- package/node_modules/@turf/bezier-spline/package.json +4 -4
- package/node_modules/@turf/helpers/package.json +2 -2
- package/node_modules/@turf/invariant/package.json +3 -3
- package/node_modules/body-parser/HISTORY.md +8 -0
- package/node_modules/body-parser/lib/types/urlencoded.js +2 -9
- package/node_modules/body-parser/package.json +9 -10
- package/node_modules/cookie/index.js +2 -1
- package/node_modules/cookie/package.json +1 -1
- package/node_modules/cookie-signature/History.md +5 -1
- package/node_modules/cookie-signature/index.js +6 -6
- package/node_modules/cookie-signature/package.json +2 -2
- package/node_modules/finalhandler/HISTORY.md +6 -0
- package/node_modules/finalhandler/package.json +3 -3
- package/node_modules/http-errors/HISTORY.md +6 -0
- package/node_modules/http-errors/index.js +4 -3
- package/node_modules/http-errors/package.json +12 -8
- package/node_modules/raw-body/package.json +5 -7
- package/node_modules/send/HISTORY.md +19 -7
- package/node_modules/send/package.json +6 -6
- package/node_modules/serve-static/HISTORY.md +6 -0
- package/node_modules/serve-static/package.json +2 -2
- package/node_modules/statuses/HISTORY.md +5 -0
- package/node_modules/statuses/README.md +3 -0
- package/node_modules/statuses/package.json +7 -7
- package/package.json +2 -2
- package/worldmap/worldmap.js +1 -1
- package/node_modules/body-parser/SECURITY.md +0 -25
- package/node_modules/cookie-signature/.npmignore +0 -4
- package/node_modules/raw-body/HISTORY.md +0 -308
- package/node_modules/raw-body/SECURITY.md +0 -24
- package/node_modules/send/node_modules/encodeurl/HISTORY.md +0 -14
- package/node_modules/send/node_modules/encodeurl/LICENSE +0 -22
- package/node_modules/send/node_modules/encodeurl/README.md +0 -128
- package/node_modules/send/node_modules/encodeurl/index.js +0 -60
- package/node_modules/send/node_modules/encodeurl/package.json +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v5.5.7 - Fix COG handling for built in icons, bump various libs for CVEs
|
|
3
4
|
- v5.5.4 - slight tweak to geojson property display as table
|
|
4
5
|
- v5.5.3 - ensure SOG gets picked up earlier in chain
|
|
5
6
|
- v5.5.2 - Slight improvement for on/offline choice of map
|
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ A <a href="https://nodered.org" target="mapinfo">Node-RED</a> node to provide a
|
|
|
10
10
|
|
|
11
11
|
### Updates
|
|
12
12
|
|
|
13
|
+
- v5.5.7 - Fix COG handling for built in icons, bump various libs for CVEs
|
|
13
14
|
- v5.5.4 - slight tweak to geojson property display as table
|
|
14
15
|
- v5.5.3 - ensure SOG gets picked up earlier in chain
|
|
15
16
|
- v5.5.2 - Slight improvement for on/offline choice of map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/bezier-spline",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "Smooths a line into a curve using Bézier splines, great for visualizing routes.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"write-json-file": "^6.0.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@turf/helpers": "7.3.
|
|
67
|
-
"@turf/invariant": "7.3.
|
|
66
|
+
"@turf/helpers": "7.3.4",
|
|
67
|
+
"@turf/invariant": "7.3.4",
|
|
68
68
|
"@types/geojson": "^7946.0.10",
|
|
69
69
|
"tslib": "^2.8.1"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "a0878648b801443f342aae692c60ab95a1da61a9"
|
|
72
72
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/helpers",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "Provides helper functions to create GeoJSON features, like points, lines, or areas on a map.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"@types/geojson": "^7946.0.10",
|
|
71
71
|
"tslib": "^2.8.1"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "a0878648b801443f342aae692c60ab95a1da61a9"
|
|
74
74
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/invariant",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.4",
|
|
4
4
|
"description": "Lightweight utility for input validation and data extraction in Turf.js. Ensures GeoJSON inputs are in the correct format and extracts specific components like coordinates or geometries.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"typescript": "^5.8.3"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@turf/helpers": "7.3.
|
|
67
|
+
"@turf/helpers": "7.3.4",
|
|
68
68
|
"@types/geojson": "^7946.0.10",
|
|
69
69
|
"tslib": "^2.8.1"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "a0878648b801443f342aae692c60ab95a1da61a9"
|
|
72
72
|
}
|
|
@@ -55,9 +55,6 @@ function urlencoded (options) {
|
|
|
55
55
|
: opts.limit
|
|
56
56
|
var type = opts.type || 'application/x-www-form-urlencoded'
|
|
57
57
|
var verify = opts.verify || false
|
|
58
|
-
var depth = typeof opts.depth !== 'number'
|
|
59
|
-
? Number(opts.depth || 32)
|
|
60
|
-
: opts.depth
|
|
61
58
|
|
|
62
59
|
if (verify !== false && typeof verify !== 'function') {
|
|
63
60
|
throw new TypeError('option verify must be function')
|
|
@@ -121,8 +118,7 @@ function urlencoded (options) {
|
|
|
121
118
|
encoding: charset,
|
|
122
119
|
inflate: inflate,
|
|
123
120
|
limit: limit,
|
|
124
|
-
verify: verify
|
|
125
|
-
depth: depth
|
|
121
|
+
verify: verify
|
|
126
122
|
})
|
|
127
123
|
}
|
|
128
124
|
}
|
|
@@ -137,10 +133,7 @@ function extendedparser (options) {
|
|
|
137
133
|
var parameterLimit = options.parameterLimit !== undefined
|
|
138
134
|
? options.parameterLimit
|
|
139
135
|
: 1000
|
|
140
|
-
|
|
141
|
-
var depth = typeof options.depth !== 'number'
|
|
142
|
-
? Number(options.depth || 32)
|
|
143
|
-
: options.depth
|
|
136
|
+
var depth = options.depth !== undefined ? options.depth : 32
|
|
144
137
|
var parse = parser('qs')
|
|
145
138
|
|
|
146
139
|
if (isNaN(parameterLimit) || parameterLimit < 1) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "body-parser",
|
|
3
3
|
"description": "Node.js body parsing middleware",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.4",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": "expressjs/body-parser",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"bytes": "3.1.2",
|
|
12
|
+
"bytes": "~3.1.2",
|
|
13
13
|
"content-type": "~1.0.5",
|
|
14
14
|
"debug": "2.6.9",
|
|
15
15
|
"depd": "2.0.0",
|
|
16
|
-
"destroy": "1.2.0",
|
|
17
|
-
"http-errors": "2.0.
|
|
18
|
-
"iconv-lite": "0.4.24",
|
|
19
|
-
"on-finished": "2.4.1",
|
|
20
|
-
"qs": "6.
|
|
21
|
-
"raw-body": "2.5.
|
|
16
|
+
"destroy": "~1.2.0",
|
|
17
|
+
"http-errors": "~2.0.1",
|
|
18
|
+
"iconv-lite": "~0.4.24",
|
|
19
|
+
"on-finished": "~2.4.1",
|
|
20
|
+
"qs": "~6.14.0",
|
|
21
|
+
"raw-body": "~2.5.3",
|
|
22
22
|
"type-is": "~1.6.18",
|
|
23
|
-
"unpipe": "1.0.0"
|
|
23
|
+
"unpipe": "~1.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"eslint": "8.34.0",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"lib/",
|
|
41
41
|
"LICENSE",
|
|
42
42
|
"HISTORY.md",
|
|
43
|
-
"SECURITY.md",
|
|
44
43
|
"index.js"
|
|
45
44
|
],
|
|
46
45
|
"engines": {
|
|
@@ -21,6 +21,7 @@ exports.serialize = serialize;
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
var __toString = Object.prototype.toString
|
|
24
|
+
var __hasOwnProperty = Object.prototype.hasOwnProperty
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
|
@@ -130,7 +131,7 @@ function parse(str, opt) {
|
|
|
130
131
|
var key = str.slice(keyStartIdx, keyEndIdx);
|
|
131
132
|
|
|
132
133
|
// only assign once
|
|
133
|
-
if (!
|
|
134
|
+
if (!__hasOwnProperty.call(obj, key)) {
|
|
134
135
|
var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
|
|
135
136
|
var valEndIdx = endIndex(str, endIdx, valStartIdx);
|
|
136
137
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
1.0.7 / 2023-04-12
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* backport the buffer support from the 1.2.x release branch (thanks @FadhiliNjagi!)
|
|
5
|
+
|
|
1
6
|
1.0.6 / 2015-02-03
|
|
2
7
|
==================
|
|
3
8
|
|
|
4
9
|
* use `npm test` instead of `make test` to run tests
|
|
5
10
|
* clearer assertion messages when checking input
|
|
6
11
|
|
|
7
|
-
|
|
8
12
|
1.0.5 / 2014-09-05
|
|
9
13
|
==================
|
|
10
14
|
|
|
@@ -8,14 +8,14 @@ var crypto = require('crypto');
|
|
|
8
8
|
* Sign the given `val` with `secret`.
|
|
9
9
|
*
|
|
10
10
|
* @param {String} val
|
|
11
|
-
* @param {String} secret
|
|
11
|
+
* @param {String|NodeJS.ArrayBufferView|crypto.KeyObject} secret
|
|
12
12
|
* @return {String}
|
|
13
13
|
* @api private
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
exports.sign = function(val, secret){
|
|
17
|
-
if ('string'
|
|
18
|
-
if (
|
|
17
|
+
if ('string' !== typeof val) throw new TypeError("Cookie value must be provided as a string.");
|
|
18
|
+
if (null == secret) throw new TypeError("Secret key must be provided.");
|
|
19
19
|
return val + '.' + crypto
|
|
20
20
|
.createHmac('sha256', secret)
|
|
21
21
|
.update(val)
|
|
@@ -28,14 +28,14 @@ exports.sign = function(val, secret){
|
|
|
28
28
|
* returning `false` if the signature is invalid.
|
|
29
29
|
*
|
|
30
30
|
* @param {String} val
|
|
31
|
-
* @param {String} secret
|
|
31
|
+
* @param {String|NodeJS.ArrayBufferView|crypto.KeyObject} secret
|
|
32
32
|
* @return {String|Boolean}
|
|
33
33
|
* @api private
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
exports.unsign = function(val, secret){
|
|
37
|
-
if ('string'
|
|
38
|
-
if (
|
|
37
|
+
if ('string' !== typeof val) throw new TypeError("Signed cookie string must be provided.");
|
|
38
|
+
if (null == secret) throw new TypeError("Secret key must be provided.");
|
|
39
39
|
var str = val.slice(0, val.lastIndexOf('.'))
|
|
40
40
|
, mac = exports.sign(str, secret);
|
|
41
41
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cookie-signature",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Sign and unsign cookies",
|
|
5
5
|
"keywords": ["cookie", "sign", "unsign"],
|
|
6
6
|
"author": "TJ Holowaychuk <tj@learnboost.com>",
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
"test": "mocha --require should --reporter spec"
|
|
16
16
|
},
|
|
17
17
|
"main": "index"
|
|
18
|
-
}
|
|
18
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "finalhandler",
|
|
3
3
|
"description": "Node.js final http responder",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "pillarjs/finalhandler",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"debug": "2.6.9",
|
|
10
10
|
"encodeurl": "~2.0.0",
|
|
11
11
|
"escape-html": "~1.0.3",
|
|
12
|
-
"on-finished": "2.4.1",
|
|
12
|
+
"on-finished": "~2.4.1",
|
|
13
13
|
"parseurl": "~1.3.3",
|
|
14
|
-
"statuses": "2.0.
|
|
14
|
+
"statuses": "~2.0.2",
|
|
15
15
|
"unpipe": "~1.0.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
@@ -279,11 +279,12 @@ function populateConstructorExports (exports, codes, HttpError) {
|
|
|
279
279
|
|
|
280
280
|
/**
|
|
281
281
|
* Get a class name from a name identifier.
|
|
282
|
+
*
|
|
283
|
+
* @param {string} name
|
|
284
|
+
* @returns {string}
|
|
282
285
|
* @private
|
|
283
286
|
*/
|
|
284
287
|
|
|
285
288
|
function toClassName (name) {
|
|
286
|
-
return name.
|
|
287
|
-
? name + 'Error'
|
|
288
|
-
: name
|
|
289
|
+
return name.slice(-5) === 'Error' ? name : name + 'Error'
|
|
289
290
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "http-errors",
|
|
3
3
|
"description": "Create HTTP error objects",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Alan Plum <me@pluma.io>",
|
|
@@ -9,17 +9,21 @@
|
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": "jshttp/http-errors",
|
|
12
|
+
"funding": {
|
|
13
|
+
"type": "opencollective",
|
|
14
|
+
"url": "https://opencollective.com/express"
|
|
15
|
+
},
|
|
12
16
|
"dependencies": {
|
|
13
|
-
"depd": "2.0.0",
|
|
14
|
-
"inherits": "2.0.4",
|
|
15
|
-
"setprototypeof": "1.2.0",
|
|
16
|
-
"statuses": "2.0.
|
|
17
|
-
"toidentifier": "1.0.1"
|
|
17
|
+
"depd": "~2.0.0",
|
|
18
|
+
"inherits": "~2.0.4",
|
|
19
|
+
"setprototypeof": "~1.2.0",
|
|
20
|
+
"statuses": "~2.0.2",
|
|
21
|
+
"toidentifier": "~1.0.1"
|
|
18
22
|
},
|
|
19
23
|
"devDependencies": {
|
|
20
24
|
"eslint": "7.32.0",
|
|
21
25
|
"eslint-config-standard": "14.1.1",
|
|
22
|
-
"eslint-plugin-import": "2.
|
|
26
|
+
"eslint-plugin-import": "2.32.0",
|
|
23
27
|
"eslint-plugin-markdown": "2.2.1",
|
|
24
28
|
"eslint-plugin-node": "11.1.0",
|
|
25
29
|
"eslint-plugin-promise": "5.2.0",
|
|
@@ -32,7 +36,7 @@
|
|
|
32
36
|
},
|
|
33
37
|
"scripts": {
|
|
34
38
|
"lint": "eslint . && node ./scripts/lint-readme-list.js",
|
|
35
|
-
"test": "mocha --reporter spec
|
|
39
|
+
"test": "mocha --reporter spec",
|
|
36
40
|
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
37
41
|
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
38
42
|
"version": "node scripts/version-history.js && git add HISTORY.md"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raw-body",
|
|
3
3
|
"description": "Get and validate the raw body of a readable stream.",
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.3",
|
|
5
5
|
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": "stream-utils/raw-body",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"bytes": "3.1.2",
|
|
14
|
-
"http-errors": "2.0.
|
|
15
|
-
"iconv-lite": "0.4.24",
|
|
16
|
-
"unpipe": "1.0.0"
|
|
13
|
+
"bytes": "~3.1.2",
|
|
14
|
+
"http-errors": "~2.0.1",
|
|
15
|
+
"iconv-lite": "~0.4.24",
|
|
16
|
+
"unpipe": "~1.0.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"bluebird": "3.7.2",
|
|
@@ -33,10 +33,8 @@
|
|
|
33
33
|
"node": ">= 0.8"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
|
-
"HISTORY.md",
|
|
37
36
|
"LICENSE",
|
|
38
37
|
"README.md",
|
|
39
|
-
"SECURITY.md",
|
|
40
38
|
"index.d.ts",
|
|
41
39
|
"index.js"
|
|
42
40
|
],
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
0.19.2 / 2025-12-15
|
|
2
|
+
===================
|
|
3
|
+
|
|
4
|
+
* deps: use tilde notation for dependencies
|
|
5
|
+
* deps: http-errors@~2.0.1
|
|
6
|
+
* deps: statuses@~2.0.2
|
|
7
|
+
|
|
8
|
+
0.19.1 / 2024-10-09
|
|
9
|
+
===================
|
|
10
|
+
|
|
11
|
+
* deps: encodeurl@~2.0.0
|
|
12
|
+
|
|
1
13
|
0.19.0 / 2024-09-10
|
|
2
14
|
===================
|
|
3
15
|
|
|
@@ -485,37 +497,37 @@
|
|
|
485
497
|
|
|
486
498
|
* update range-parser and fresh
|
|
487
499
|
|
|
488
|
-
0.1.4 / 2013-08-11
|
|
500
|
+
0.1.4 / 2013-08-11
|
|
489
501
|
==================
|
|
490
502
|
|
|
491
503
|
* update fresh
|
|
492
504
|
|
|
493
|
-
0.1.3 / 2013-07-08
|
|
505
|
+
0.1.3 / 2013-07-08
|
|
494
506
|
==================
|
|
495
507
|
|
|
496
508
|
* Revert "Fix fd leak"
|
|
497
509
|
|
|
498
|
-
0.1.2 / 2013-07-03
|
|
510
|
+
0.1.2 / 2013-07-03
|
|
499
511
|
==================
|
|
500
512
|
|
|
501
513
|
* Fix fd leak
|
|
502
514
|
|
|
503
|
-
0.1.0 / 2012-08-25
|
|
515
|
+
0.1.0 / 2012-08-25
|
|
504
516
|
==================
|
|
505
517
|
|
|
506
518
|
* add options parameter to send() that is passed to fs.createReadStream() [kanongil]
|
|
507
519
|
|
|
508
|
-
0.0.4 / 2012-08-16
|
|
520
|
+
0.0.4 / 2012-08-16
|
|
509
521
|
==================
|
|
510
522
|
|
|
511
523
|
* allow custom "Accept-Ranges" definition
|
|
512
524
|
|
|
513
|
-
0.0.3 / 2012-07-16
|
|
525
|
+
0.0.3 / 2012-07-16
|
|
514
526
|
==================
|
|
515
527
|
|
|
516
528
|
* fix normalization of the root directory. Closes #3
|
|
517
529
|
|
|
518
|
-
0.0.2 / 2012-07-09
|
|
530
|
+
0.0.2 / 2012-07-09
|
|
519
531
|
==================
|
|
520
532
|
|
|
521
533
|
* add passing of req explicitly for now (YUCK)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "send",
|
|
3
3
|
"description": "Better streaming static file server with Range and conditional-GET support",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.2",
|
|
5
5
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"debug": "2.6.9",
|
|
20
20
|
"depd": "2.0.0",
|
|
21
21
|
"destroy": "1.2.0",
|
|
22
|
-
"encodeurl": "~
|
|
22
|
+
"encodeurl": "~2.0.0",
|
|
23
23
|
"escape-html": "~1.0.3",
|
|
24
24
|
"etag": "~1.8.1",
|
|
25
|
-
"fresh": "0.5.2",
|
|
26
|
-
"http-errors": "2.0.
|
|
25
|
+
"fresh": "~0.5.2",
|
|
26
|
+
"http-errors": "~2.0.1",
|
|
27
27
|
"mime": "1.6.0",
|
|
28
28
|
"ms": "2.1.3",
|
|
29
|
-
"on-finished": "2.4.1",
|
|
29
|
+
"on-finished": "~2.4.1",
|
|
30
30
|
"range-parser": "~1.2.1",
|
|
31
|
-
"statuses": "2.0.
|
|
31
|
+
"statuses": "~2.0.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"after": "0.8.2",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "serve-static",
|
|
3
3
|
"description": "Serve static files",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.3",
|
|
5
5
|
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "expressjs/serve-static",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"encodeurl": "~2.0.0",
|
|
10
10
|
"escape-html": "~1.0.3",
|
|
11
11
|
"parseurl": "~1.3.3",
|
|
12
|
-
"send": "0.19.
|
|
12
|
+
"send": "~0.19.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"eslint": "7.32.0",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
[![Node.js Version][node-version-image]][node-version-url]
|
|
6
6
|
[![Build Status][ci-image]][ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
|
+
[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
|
|
8
9
|
|
|
9
10
|
HTTP status utility for node.
|
|
10
11
|
|
|
@@ -134,3 +135,5 @@ status.retry[503] // => true
|
|
|
134
135
|
[npm-downloads-image]: https://badgen.net/npm/dm/statuses
|
|
135
136
|
[npm-url]: https://npmjs.org/package/statuses
|
|
136
137
|
[npm-version-image]: https://badgen.net/npm/v/statuses
|
|
138
|
+
[ossf-scorecard-badge]: https://api.securityscorecards.dev/projects/github.com/jshttp/statuses/badge
|
|
139
|
+
[ossf-scorecard-visualizer]: https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/jshttp/statuses
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "statuses",
|
|
3
3
|
"description": "HTTP status utility",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"LICENSE"
|
|
21
21
|
],
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"csv-parse": "4.
|
|
24
|
-
"eslint": "7.
|
|
23
|
+
"csv-parse": "4.16.3",
|
|
24
|
+
"eslint": "7.19.0",
|
|
25
25
|
"eslint-config-standard": "14.1.1",
|
|
26
|
-
"eslint-plugin-import": "2.
|
|
26
|
+
"eslint-plugin-import": "2.31.0",
|
|
27
27
|
"eslint-plugin-markdown": "1.0.2",
|
|
28
28
|
"eslint-plugin-node": "11.1.0",
|
|
29
|
-
"eslint-plugin-promise": "4.
|
|
29
|
+
"eslint-plugin-promise": "4.3.1",
|
|
30
30
|
"eslint-plugin-standard": "4.1.0",
|
|
31
|
-
"mocha": "8.
|
|
31
|
+
"mocha": "8.4.0",
|
|
32
32
|
"nyc": "15.1.0",
|
|
33
|
-
"raw-body": "2.
|
|
33
|
+
"raw-body": "2.5.2",
|
|
34
34
|
"stream-to-array": "2.3.0"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-web-worldmap",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.7",
|
|
4
4
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@turf/bezier-spline": "~7.3.
|
|
6
|
+
"@turf/bezier-spline": "~7.3.4",
|
|
7
7
|
"cgi": "0.3.1",
|
|
8
8
|
"compression": "^1.8.1",
|
|
9
9
|
"express": "^4.22.1",
|
package/worldmap/worldmap.js
CHANGED
|
@@ -1833,7 +1833,7 @@ function setMarker(data) {
|
|
|
1833
1833
|
if (data.SOG) { data.speed = data.SOG * 0.514444; data.SOG = data.SOG + " kt"; } // SOG is in knots
|
|
1834
1834
|
|
|
1835
1835
|
if (data.hasOwnProperty("icon")) {
|
|
1836
|
-
var dir = parseFloat(data.track ?? data.hdg ?? data.heading ?? data.bearing ?? "0") + map.getBearing();
|
|
1836
|
+
var dir = parseFloat(data.track ?? data.hdg ?? data.heading ?? data.bearing ?? data.COG ?? data.cog ??"0") + map.getBearing();
|
|
1837
1837
|
var siz = 32;
|
|
1838
1838
|
var sizc = 16;
|
|
1839
1839
|
if (data?.iconSize && !isNaN(data.iconSize)) {
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Security Policies and Procedures
|
|
2
|
-
|
|
3
|
-
## Reporting a Bug
|
|
4
|
-
|
|
5
|
-
The Express team and community take all security bugs seriously. Thank you
|
|
6
|
-
for improving the security of Express. 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 `body-parser`. This
|
|
11
|
-
information can be found in the npm registry using the command
|
|
12
|
-
`npm owner ls body-parser`.
|
|
13
|
-
If unsure or unable to get the information from the above, open an issue
|
|
14
|
-
in the [project issue tracker](https://github.com/expressjs/body-parser/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.
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
2.5.2 / 2023-02-21
|
|
2
|
-
==================
|
|
3
|
-
|
|
4
|
-
* Fix error message for non-stream argument
|
|
5
|
-
|
|
6
|
-
2.5.1 / 2022-02-28
|
|
7
|
-
==================
|
|
8
|
-
|
|
9
|
-
* Fix error on early async hooks implementations
|
|
10
|
-
|
|
11
|
-
2.5.0 / 2022-02-21
|
|
12
|
-
==================
|
|
13
|
-
|
|
14
|
-
* Prevent loss of async hooks context
|
|
15
|
-
* Prevent hanging when stream is not readable
|
|
16
|
-
* deps: http-errors@2.0.0
|
|
17
|
-
- deps: depd@2.0.0
|
|
18
|
-
- deps: statuses@2.0.1
|
|
19
|
-
|
|
20
|
-
2.4.3 / 2022-02-14
|
|
21
|
-
==================
|
|
22
|
-
|
|
23
|
-
* deps: bytes@3.1.2
|
|
24
|
-
|
|
25
|
-
2.4.2 / 2021-11-16
|
|
26
|
-
==================
|
|
27
|
-
|
|
28
|
-
* deps: bytes@3.1.1
|
|
29
|
-
* deps: http-errors@1.8.1
|
|
30
|
-
- deps: setprototypeof@1.2.0
|
|
31
|
-
- deps: toidentifier@1.0.1
|
|
32
|
-
|
|
33
|
-
2.4.1 / 2019-06-25
|
|
34
|
-
==================
|
|
35
|
-
|
|
36
|
-
* deps: http-errors@1.7.3
|
|
37
|
-
- deps: inherits@2.0.4
|
|
38
|
-
|
|
39
|
-
2.4.0 / 2019-04-17
|
|
40
|
-
==================
|
|
41
|
-
|
|
42
|
-
* deps: bytes@3.1.0
|
|
43
|
-
- Add petabyte (`pb`) support
|
|
44
|
-
* deps: http-errors@1.7.2
|
|
45
|
-
- Set constructor name when possible
|
|
46
|
-
- deps: setprototypeof@1.1.1
|
|
47
|
-
- deps: statuses@'>= 1.5.0 < 2'
|
|
48
|
-
* deps: iconv-lite@0.4.24
|
|
49
|
-
- Added encoding MIK
|
|
50
|
-
|
|
51
|
-
2.3.3 / 2018-05-08
|
|
52
|
-
==================
|
|
53
|
-
|
|
54
|
-
* deps: http-errors@1.6.3
|
|
55
|
-
- deps: depd@~1.1.2
|
|
56
|
-
- deps: setprototypeof@1.1.0
|
|
57
|
-
- deps: statuses@'>= 1.3.1 < 2'
|
|
58
|
-
* deps: iconv-lite@0.4.23
|
|
59
|
-
- Fix loading encoding with year appended
|
|
60
|
-
- Fix deprecation warnings on Node.js 10+
|
|
61
|
-
|
|
62
|
-
2.3.2 / 2017-09-09
|
|
63
|
-
==================
|
|
64
|
-
|
|
65
|
-
* deps: iconv-lite@0.4.19
|
|
66
|
-
- Fix ISO-8859-1 regression
|
|
67
|
-
- Update Windows-1255
|
|
68
|
-
|
|
69
|
-
2.3.1 / 2017-09-07
|
|
70
|
-
==================
|
|
71
|
-
|
|
72
|
-
* deps: bytes@3.0.0
|
|
73
|
-
* deps: http-errors@1.6.2
|
|
74
|
-
- deps: depd@1.1.1
|
|
75
|
-
* perf: skip buffer decoding on overage chunk
|
|
76
|
-
|
|
77
|
-
2.3.0 / 2017-08-04
|
|
78
|
-
==================
|
|
79
|
-
|
|
80
|
-
* Add TypeScript definitions
|
|
81
|
-
* Use `http-errors` for standard emitted errors
|
|
82
|
-
* deps: bytes@2.5.0
|
|
83
|
-
* deps: iconv-lite@0.4.18
|
|
84
|
-
- Add support for React Native
|
|
85
|
-
- Add a warning if not loaded as utf-8
|
|
86
|
-
- Fix CESU-8 decoding in Node.js 8
|
|
87
|
-
- Improve speed of ISO-8859-1 encoding
|
|
88
|
-
|
|
89
|
-
2.2.0 / 2017-01-02
|
|
90
|
-
==================
|
|
91
|
-
|
|
92
|
-
* deps: iconv-lite@0.4.15
|
|
93
|
-
- Added encoding MS-31J
|
|
94
|
-
- Added encoding MS-932
|
|
95
|
-
- Added encoding MS-936
|
|
96
|
-
- Added encoding MS-949
|
|
97
|
-
- Added encoding MS-950
|
|
98
|
-
- Fix GBK/GB18030 handling of Euro character
|
|
99
|
-
|
|
100
|
-
2.1.7 / 2016-06-19
|
|
101
|
-
==================
|
|
102
|
-
|
|
103
|
-
* deps: bytes@2.4.0
|
|
104
|
-
* perf: remove double-cleanup on happy path
|
|
105
|
-
|
|
106
|
-
2.1.6 / 2016-03-07
|
|
107
|
-
==================
|
|
108
|
-
|
|
109
|
-
* deps: bytes@2.3.0
|
|
110
|
-
- Drop partial bytes on all parsed units
|
|
111
|
-
- Fix parsing byte string that looks like hex
|
|
112
|
-
|
|
113
|
-
2.1.5 / 2015-11-30
|
|
114
|
-
==================
|
|
115
|
-
|
|
116
|
-
* deps: bytes@2.2.0
|
|
117
|
-
* deps: iconv-lite@0.4.13
|
|
118
|
-
|
|
119
|
-
2.1.4 / 2015-09-27
|
|
120
|
-
==================
|
|
121
|
-
|
|
122
|
-
* Fix masking critical errors from `iconv-lite`
|
|
123
|
-
* deps: iconv-lite@0.4.12
|
|
124
|
-
- Fix CESU-8 decoding in Node.js 4.x
|
|
125
|
-
|
|
126
|
-
2.1.3 / 2015-09-12
|
|
127
|
-
==================
|
|
128
|
-
|
|
129
|
-
* Fix sync callback when attaching data listener causes sync read
|
|
130
|
-
- Node.js 0.10 compatibility issue
|
|
131
|
-
|
|
132
|
-
2.1.2 / 2015-07-05
|
|
133
|
-
==================
|
|
134
|
-
|
|
135
|
-
* Fix error stack traces to skip `makeError`
|
|
136
|
-
* deps: iconv-lite@0.4.11
|
|
137
|
-
- Add encoding CESU-8
|
|
138
|
-
|
|
139
|
-
2.1.1 / 2015-06-14
|
|
140
|
-
==================
|
|
141
|
-
|
|
142
|
-
* Use `unpipe` module for unpiping requests
|
|
143
|
-
|
|
144
|
-
2.1.0 / 2015-05-28
|
|
145
|
-
==================
|
|
146
|
-
|
|
147
|
-
* deps: iconv-lite@0.4.10
|
|
148
|
-
- Improved UTF-16 endianness detection
|
|
149
|
-
- Leading BOM is now removed when decoding
|
|
150
|
-
- The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails
|
|
151
|
-
|
|
152
|
-
2.0.2 / 2015-05-21
|
|
153
|
-
==================
|
|
154
|
-
|
|
155
|
-
* deps: bytes@2.1.0
|
|
156
|
-
- Slight optimizations
|
|
157
|
-
|
|
158
|
-
2.0.1 / 2015-05-10
|
|
159
|
-
==================
|
|
160
|
-
|
|
161
|
-
* Fix a false-positive when unpiping in Node.js 0.8
|
|
162
|
-
|
|
163
|
-
2.0.0 / 2015-05-08
|
|
164
|
-
==================
|
|
165
|
-
|
|
166
|
-
* Return a promise without callback instead of thunk
|
|
167
|
-
* deps: bytes@2.0.1
|
|
168
|
-
- units no longer case sensitive when parsing
|
|
169
|
-
|
|
170
|
-
1.3.4 / 2015-04-15
|
|
171
|
-
==================
|
|
172
|
-
|
|
173
|
-
* Fix hanging callback if request aborts during read
|
|
174
|
-
* deps: iconv-lite@0.4.8
|
|
175
|
-
- Add encoding alias UNICODE-1-1-UTF-7
|
|
176
|
-
|
|
177
|
-
1.3.3 / 2015-02-08
|
|
178
|
-
==================
|
|
179
|
-
|
|
180
|
-
* deps: iconv-lite@0.4.7
|
|
181
|
-
- Gracefully support enumerables on `Object.prototype`
|
|
182
|
-
|
|
183
|
-
1.3.2 / 2015-01-20
|
|
184
|
-
==================
|
|
185
|
-
|
|
186
|
-
* deps: iconv-lite@0.4.6
|
|
187
|
-
- Fix rare aliases of single-byte encodings
|
|
188
|
-
|
|
189
|
-
1.3.1 / 2014-11-21
|
|
190
|
-
==================
|
|
191
|
-
|
|
192
|
-
* deps: iconv-lite@0.4.5
|
|
193
|
-
- Fix Windows-31J and X-SJIS encoding support
|
|
194
|
-
|
|
195
|
-
1.3.0 / 2014-07-20
|
|
196
|
-
==================
|
|
197
|
-
|
|
198
|
-
* Fully unpipe the stream on error
|
|
199
|
-
- Fixes `Cannot switch to old mode now` error on Node.js 0.10+
|
|
200
|
-
|
|
201
|
-
1.2.3 / 2014-07-20
|
|
202
|
-
==================
|
|
203
|
-
|
|
204
|
-
* deps: iconv-lite@0.4.4
|
|
205
|
-
- Added encoding UTF-7
|
|
206
|
-
|
|
207
|
-
1.2.2 / 2014-06-19
|
|
208
|
-
==================
|
|
209
|
-
|
|
210
|
-
* Send invalid encoding error to callback
|
|
211
|
-
|
|
212
|
-
1.2.1 / 2014-06-15
|
|
213
|
-
==================
|
|
214
|
-
|
|
215
|
-
* deps: iconv-lite@0.4.3
|
|
216
|
-
- Added encodings UTF-16BE and UTF-16 with BOM
|
|
217
|
-
|
|
218
|
-
1.2.0 / 2014-06-13
|
|
219
|
-
==================
|
|
220
|
-
|
|
221
|
-
* Passing string as `options` interpreted as encoding
|
|
222
|
-
* Support all encodings from `iconv-lite`
|
|
223
|
-
|
|
224
|
-
1.1.7 / 2014-06-12
|
|
225
|
-
==================
|
|
226
|
-
|
|
227
|
-
* use `string_decoder` module from npm
|
|
228
|
-
|
|
229
|
-
1.1.6 / 2014-05-27
|
|
230
|
-
==================
|
|
231
|
-
|
|
232
|
-
* check encoding for old streams1
|
|
233
|
-
* support node.js < 0.10.6
|
|
234
|
-
|
|
235
|
-
1.1.5 / 2014-05-14
|
|
236
|
-
==================
|
|
237
|
-
|
|
238
|
-
* bump bytes
|
|
239
|
-
|
|
240
|
-
1.1.4 / 2014-04-19
|
|
241
|
-
==================
|
|
242
|
-
|
|
243
|
-
* allow true as an option
|
|
244
|
-
* bump bytes
|
|
245
|
-
|
|
246
|
-
1.1.3 / 2014-03-02
|
|
247
|
-
==================
|
|
248
|
-
|
|
249
|
-
* fix case when length=null
|
|
250
|
-
|
|
251
|
-
1.1.2 / 2013-12-01
|
|
252
|
-
==================
|
|
253
|
-
|
|
254
|
-
* be less strict on state.encoding check
|
|
255
|
-
|
|
256
|
-
1.1.1 / 2013-11-27
|
|
257
|
-
==================
|
|
258
|
-
|
|
259
|
-
* add engines
|
|
260
|
-
|
|
261
|
-
1.1.0 / 2013-11-27
|
|
262
|
-
==================
|
|
263
|
-
|
|
264
|
-
* add err.statusCode and err.type
|
|
265
|
-
* allow for encoding option to be true
|
|
266
|
-
* pause the stream instead of dumping on error
|
|
267
|
-
* throw if the stream's encoding is set
|
|
268
|
-
|
|
269
|
-
1.0.1 / 2013-11-19
|
|
270
|
-
==================
|
|
271
|
-
|
|
272
|
-
* dont support streams1, throw if dev set encoding
|
|
273
|
-
|
|
274
|
-
1.0.0 / 2013-11-17
|
|
275
|
-
==================
|
|
276
|
-
|
|
277
|
-
* rename `expected` option to `length`
|
|
278
|
-
|
|
279
|
-
0.2.0 / 2013-11-15
|
|
280
|
-
==================
|
|
281
|
-
|
|
282
|
-
* republish
|
|
283
|
-
|
|
284
|
-
0.1.1 / 2013-11-15
|
|
285
|
-
==================
|
|
286
|
-
|
|
287
|
-
* use bytes
|
|
288
|
-
|
|
289
|
-
0.1.0 / 2013-11-11
|
|
290
|
-
==================
|
|
291
|
-
|
|
292
|
-
* generator support
|
|
293
|
-
|
|
294
|
-
0.0.3 / 2013-10-10
|
|
295
|
-
==================
|
|
296
|
-
|
|
297
|
-
* update repo
|
|
298
|
-
|
|
299
|
-
0.0.2 / 2013-09-14
|
|
300
|
-
==================
|
|
301
|
-
|
|
302
|
-
* dump stream on bad headers
|
|
303
|
-
* listen to events after defining received and buffers
|
|
304
|
-
|
|
305
|
-
0.0.1 / 2013-09-14
|
|
306
|
-
==================
|
|
307
|
-
|
|
308
|
-
* Initial release
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Security Policies and Procedures
|
|
2
|
-
|
|
3
|
-
## Reporting a Bug
|
|
4
|
-
|
|
5
|
-
The `raw-body` team and community take all security bugs seriously. Thank you
|
|
6
|
-
for improving the security of Express. 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 owners of `raw-body`. This information
|
|
11
|
-
can be found in the npm registry using the command `npm owner ls raw-body`.
|
|
12
|
-
If unsure or unable to get the information from the above, open an issue
|
|
13
|
-
in the [project issue tracker](https://github.com/stream-utils/raw-body/issues)
|
|
14
|
-
asking for the current contact information.
|
|
15
|
-
|
|
16
|
-
To ensure the timely response to your report, please ensure that the entirety
|
|
17
|
-
of the report is contained within the email body and not solely behind a web
|
|
18
|
-
link or an attachment.
|
|
19
|
-
|
|
20
|
-
At least one owner will acknowledge your email within 48 hours, and will send a
|
|
21
|
-
more detailed response within 48 hours indicating the next steps in handling
|
|
22
|
-
your report. After the initial reply to your report, the owners will
|
|
23
|
-
endeavor to keep you informed of the progress towards a fix and full
|
|
24
|
-
announcement, and may ask for additional information or guidance.
|
|
@@ -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
|
-
}
|