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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# statuses
|
|
2
2
|
|
|
3
|
-
[![NPM Version][npm-image]][npm-url]
|
|
4
|
-
[![NPM Downloads][downloads-image]][
|
|
3
|
+
[![NPM Version][npm-version-image]][npm-url]
|
|
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][ci-image]][ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
8
|
|
|
9
9
|
HTTP status utility for node.
|
|
@@ -34,74 +34,80 @@ $ npm install statuses
|
|
|
34
34
|
var status = require('statuses')
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### status(code)
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
Returns the status message string for a known HTTP status code. The code
|
|
40
|
+
may be a number or a string. An error is thrown for an unknown status code.
|
|
41
41
|
|
|
42
42
|
<!-- eslint-disable no-undef -->
|
|
43
43
|
|
|
44
44
|
```js
|
|
45
|
-
status(403) // =>
|
|
46
|
-
status('403') // =>
|
|
47
|
-
status(
|
|
48
|
-
status('Forbidden') // => 403
|
|
49
|
-
status(306) // throws, as it's not supported by node.js
|
|
45
|
+
status(403) // => 'Forbidden'
|
|
46
|
+
status('403') // => 'Forbidden'
|
|
47
|
+
status(306) // throws
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
### status
|
|
50
|
+
### status(msg)
|
|
51
|
+
|
|
52
|
+
Returns the numeric status code for a known HTTP status message. The message
|
|
53
|
+
is case-insensitive. An error is thrown for an unknown status message.
|
|
54
|
+
|
|
55
|
+
<!-- eslint-disable no-undef -->
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
```js
|
|
58
|
+
status('forbidden') // => 403
|
|
59
|
+
status('Forbidden') // => 403
|
|
60
|
+
status('foo') // throws
|
|
61
|
+
```
|
|
57
62
|
|
|
58
63
|
### status.codes
|
|
59
64
|
|
|
60
65
|
Returns an array of all the status codes as `Integer`s.
|
|
61
66
|
|
|
62
|
-
###
|
|
67
|
+
### status.code[msg]
|
|
63
68
|
|
|
64
|
-
|
|
69
|
+
Returns the numeric status code for a known status message (in lower-case),
|
|
70
|
+
otherwise `undefined`.
|
|
65
71
|
|
|
66
72
|
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
67
73
|
|
|
68
74
|
```js
|
|
69
|
-
status[
|
|
75
|
+
status['not found'] // => 404
|
|
70
76
|
```
|
|
71
77
|
|
|
72
|
-
###
|
|
78
|
+
### status.empty[code]
|
|
73
79
|
|
|
74
|
-
|
|
75
|
-
lower-cased. `undefined` for invalid `status message`s.
|
|
80
|
+
Returns `true` if a status code expects an empty body.
|
|
76
81
|
|
|
77
82
|
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
78
83
|
|
|
79
84
|
```js
|
|
80
|
-
status[
|
|
81
|
-
status[
|
|
85
|
+
status.empty[200] // => undefined
|
|
86
|
+
status.empty[204] // => true
|
|
87
|
+
status.empty[304] // => true
|
|
82
88
|
```
|
|
83
89
|
|
|
84
|
-
### status.
|
|
90
|
+
### status.message[code]
|
|
85
91
|
|
|
86
|
-
Returns
|
|
92
|
+
Returns the string message for a known numeric status code, otherwise
|
|
93
|
+
`undefined`. This object is the same format as the
|
|
94
|
+
[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes).
|
|
87
95
|
|
|
88
96
|
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
89
97
|
|
|
90
98
|
```js
|
|
91
|
-
status.
|
|
92
|
-
status.redirect[301] // => true
|
|
99
|
+
status.message[404] // => 'Not Found'
|
|
93
100
|
```
|
|
94
101
|
|
|
95
|
-
### status.
|
|
102
|
+
### status.redirect[code]
|
|
96
103
|
|
|
97
|
-
Returns `true` if a status code
|
|
104
|
+
Returns `true` if a status code is a valid redirect status.
|
|
98
105
|
|
|
99
106
|
<!-- eslint-disable no-undef, no-unused-expressions -->
|
|
100
107
|
|
|
101
108
|
```js
|
|
102
|
-
status.
|
|
103
|
-
status.
|
|
104
|
-
status.empty[304] // => true
|
|
109
|
+
status.redirect[200] // => undefined
|
|
110
|
+
status.redirect[301] // => true
|
|
105
111
|
```
|
|
106
112
|
|
|
107
113
|
### status.retry[code]
|
|
@@ -115,13 +121,16 @@ status.retry[501] // => undefined
|
|
|
115
121
|
status.retry[503] // => true
|
|
116
122
|
```
|
|
117
123
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
[
|
|
121
|
-
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[coveralls-image]: https://
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
[MIT](LICENSE)
|
|
127
|
+
|
|
128
|
+
[ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci
|
|
129
|
+
[ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci
|
|
130
|
+
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master
|
|
125
131
|
[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
|
|
126
|
-
[
|
|
127
|
-
[
|
|
132
|
+
[node-version-image]: https://badgen.net/npm/node/statuses
|
|
133
|
+
[node-version-url]: https://nodejs.org/en/download
|
|
134
|
+
[npm-downloads-image]: https://badgen.net/npm/dm/statuses
|
|
135
|
+
[npm-url]: https://npmjs.org/package/statuses
|
|
136
|
+
[npm-version-image]: https://badgen.net/npm/v/statuses
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"303": "See Other",
|
|
20
20
|
"304": "Not Modified",
|
|
21
21
|
"305": "Use Proxy",
|
|
22
|
-
"306": "(Unused)",
|
|
23
22
|
"307": "Temporary Redirect",
|
|
24
23
|
"308": "Permanent Redirect",
|
|
25
24
|
"400": "Bad Request",
|
|
@@ -40,12 +39,12 @@
|
|
|
40
39
|
"415": "Unsupported Media Type",
|
|
41
40
|
"416": "Range Not Satisfiable",
|
|
42
41
|
"417": "Expectation Failed",
|
|
43
|
-
"418": "I'm a
|
|
42
|
+
"418": "I'm a Teapot",
|
|
44
43
|
"421": "Misdirected Request",
|
|
45
44
|
"422": "Unprocessable Entity",
|
|
46
45
|
"423": "Locked",
|
|
47
46
|
"424": "Failed Dependency",
|
|
48
|
-
"425": "
|
|
47
|
+
"425": "Too Early",
|
|
49
48
|
"426": "Upgrade Required",
|
|
50
49
|
"428": "Precondition Required",
|
|
51
50
|
"429": "Too Many Requests",
|
|
@@ -22,10 +22,13 @@ var codes = require('./codes.json')
|
|
|
22
22
|
module.exports = status
|
|
23
23
|
|
|
24
24
|
// status code to message map
|
|
25
|
-
status.
|
|
25
|
+
status.message = codes
|
|
26
|
+
|
|
27
|
+
// status message (lower-case) to code map
|
|
28
|
+
status.code = createMessageToStatusCodeMap(codes)
|
|
26
29
|
|
|
27
30
|
// array of status codes
|
|
28
|
-
status.codes =
|
|
31
|
+
status.codes = createStatusCodeList(codes)
|
|
29
32
|
|
|
30
33
|
// status codes for redirects
|
|
31
34
|
status.redirect = {
|
|
@@ -53,27 +56,61 @@ status.retry = {
|
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
/**
|
|
56
|
-
*
|
|
59
|
+
* Create a map of message to status code.
|
|
57
60
|
* @private
|
|
58
61
|
*/
|
|
59
62
|
|
|
60
|
-
function
|
|
61
|
-
var
|
|
63
|
+
function createMessageToStatusCodeMap (codes) {
|
|
64
|
+
var map = {}
|
|
62
65
|
|
|
63
66
|
Object.keys(codes).forEach(function forEachCode (code) {
|
|
64
67
|
var message = codes[code]
|
|
65
68
|
var status = Number(code)
|
|
66
69
|
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
// populate map
|
|
71
|
+
map[message.toLowerCase()] = status
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
return map
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Create a list of all status codes.
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
function createStatusCodeList (codes) {
|
|
83
|
+
return Object.keys(codes).map(function mapCode (code) {
|
|
84
|
+
return Number(code)
|
|
74
85
|
})
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Get the status code for given message.
|
|
90
|
+
* @private
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
function getStatusCode (message) {
|
|
94
|
+
var msg = message.toLowerCase()
|
|
95
|
+
|
|
96
|
+
if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {
|
|
97
|
+
throw new Error('invalid status message: "' + message + '"')
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return status.code[msg]
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Get the status message for given code.
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
function getStatusMessage (code) {
|
|
109
|
+
if (!Object.prototype.hasOwnProperty.call(status.message, code)) {
|
|
110
|
+
throw new Error('invalid status code: ' + code)
|
|
111
|
+
}
|
|
75
112
|
|
|
76
|
-
return
|
|
113
|
+
return status.message[code]
|
|
77
114
|
}
|
|
78
115
|
|
|
79
116
|
/**
|
|
@@ -92,8 +129,7 @@ function populateStatusesMap (statuses, codes) {
|
|
|
92
129
|
|
|
93
130
|
function status (code) {
|
|
94
131
|
if (typeof code === 'number') {
|
|
95
|
-
|
|
96
|
-
return code
|
|
132
|
+
return getStatusMessage(code)
|
|
97
133
|
}
|
|
98
134
|
|
|
99
135
|
if (typeof code !== 'string') {
|
|
@@ -103,11 +139,8 @@ function status (code) {
|
|
|
103
139
|
// '403'
|
|
104
140
|
var n = parseInt(code, 10)
|
|
105
141
|
if (!isNaN(n)) {
|
|
106
|
-
|
|
107
|
-
return n
|
|
142
|
+
return getStatusMessage(n)
|
|
108
143
|
}
|
|
109
144
|
|
|
110
|
-
|
|
111
|
-
if (!n) throw new Error('invalid status message: "' + code + '"')
|
|
112
|
-
return n
|
|
145
|
+
return getStatusCode(code)
|
|
113
146
|
}
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"statuses@1.5.0",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "statuses@1.5.0",
|
|
9
|
-
"_id": "statuses@1.5.0",
|
|
2
|
+
"_from": "statuses@2.0.1",
|
|
3
|
+
"_id": "statuses@2.0.1",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "
|
|
5
|
+
"_integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
|
12
6
|
"_location": "/statuses",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
15
9
|
"type": "version",
|
|
16
10
|
"registry": true,
|
|
17
|
-
"raw": "statuses@
|
|
11
|
+
"raw": "statuses@2.0.1",
|
|
18
12
|
"name": "statuses",
|
|
19
13
|
"escapedName": "statuses",
|
|
20
|
-
"rawSpec": "
|
|
14
|
+
"rawSpec": "2.0.1",
|
|
21
15
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "
|
|
16
|
+
"fetchSpec": "2.0.1"
|
|
23
17
|
},
|
|
24
18
|
"_requiredBy": [
|
|
25
19
|
"/express",
|
|
@@ -27,12 +21,14 @@
|
|
|
27
21
|
"/http-errors",
|
|
28
22
|
"/send"
|
|
29
23
|
],
|
|
30
|
-
"_resolved": "https://registry.npmjs.org/statuses/-/statuses-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
24
|
+
"_resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
|
25
|
+
"_shasum": "55cb000ccf1d48728bd23c685a063998cf1a1b63",
|
|
26
|
+
"_spec": "statuses@2.0.1",
|
|
27
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/express",
|
|
33
28
|
"bugs": {
|
|
34
29
|
"url": "https://github.com/jshttp/statuses/issues"
|
|
35
30
|
},
|
|
31
|
+
"bundleDependencies": false,
|
|
36
32
|
"contributors": [
|
|
37
33
|
{
|
|
38
34
|
"name": "Douglas Christopher Wilson",
|
|
@@ -44,23 +40,24 @@
|
|
|
44
40
|
"url": "http://jongleberry.com"
|
|
45
41
|
}
|
|
46
42
|
],
|
|
43
|
+
"deprecated": false,
|
|
47
44
|
"description": "HTTP status utility",
|
|
48
45
|
"devDependencies": {
|
|
49
|
-
"csv-parse": "
|
|
50
|
-
"eslint": "
|
|
51
|
-
"eslint-config-standard": "
|
|
52
|
-
"eslint-plugin-import": "2.
|
|
53
|
-
"eslint-plugin-markdown": "1.0.
|
|
54
|
-
"eslint-plugin-node": "
|
|
55
|
-
"eslint-plugin-promise": "
|
|
56
|
-
"eslint-plugin-standard": "
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"raw-body": "2.
|
|
46
|
+
"csv-parse": "4.14.2",
|
|
47
|
+
"eslint": "7.17.0",
|
|
48
|
+
"eslint-config-standard": "14.1.1",
|
|
49
|
+
"eslint-plugin-import": "2.22.1",
|
|
50
|
+
"eslint-plugin-markdown": "1.0.2",
|
|
51
|
+
"eslint-plugin-node": "11.1.0",
|
|
52
|
+
"eslint-plugin-promise": "4.2.1",
|
|
53
|
+
"eslint-plugin-standard": "4.1.0",
|
|
54
|
+
"mocha": "8.2.1",
|
|
55
|
+
"nyc": "15.1.0",
|
|
56
|
+
"raw-body": "2.4.1",
|
|
60
57
|
"stream-to-array": "2.3.0"
|
|
61
58
|
},
|
|
62
59
|
"engines": {
|
|
63
|
-
"node": ">= 0.
|
|
60
|
+
"node": ">= 0.8"
|
|
64
61
|
},
|
|
65
62
|
"files": [
|
|
66
63
|
"HISTORY.md",
|
|
@@ -85,9 +82,10 @@
|
|
|
85
82
|
"fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js",
|
|
86
83
|
"lint": "eslint --plugin markdown --ext js,md .",
|
|
87
84
|
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
88
|
-
"test-ci": "
|
|
89
|
-
"test-cov": "
|
|
90
|
-
"update": "npm run fetch && npm run build"
|
|
85
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
86
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
87
|
+
"update": "npm run fetch && npm run build",
|
|
88
|
+
"version": "node scripts/version-history.js && git add HISTORY.md"
|
|
91
89
|
},
|
|
92
|
-
"version": "
|
|
90
|
+
"version": "2.0.1"
|
|
93
91
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_args": [
|
|
3
|
-
[
|
|
4
|
-
"unpipe@1.0.0",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
2
|
"_from": "unpipe@1.0.0",
|
|
9
3
|
"_id": "unpipe@1.0.0",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "
|
|
5
|
+
"_integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
|
12
6
|
"_location": "/unpipe",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
@@ -22,12 +16,14 @@
|
|
|
22
16
|
"fetchSpec": "1.0.0"
|
|
23
17
|
},
|
|
24
18
|
"_requiredBy": [
|
|
19
|
+
"/body-parser",
|
|
25
20
|
"/finalhandler",
|
|
26
21
|
"/raw-body"
|
|
27
22
|
],
|
|
28
23
|
"_resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
24
|
+
"_shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec",
|
|
25
|
+
"_spec": "unpipe@1.0.0",
|
|
26
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/body-parser",
|
|
31
27
|
"author": {
|
|
32
28
|
"name": "Douglas Christopher Wilson",
|
|
33
29
|
"email": "doug@somethingdoug.com"
|
|
@@ -35,6 +31,8 @@
|
|
|
35
31
|
"bugs": {
|
|
36
32
|
"url": "https://github.com/stream-utils/unpipe/issues"
|
|
37
33
|
},
|
|
34
|
+
"bundleDependencies": false,
|
|
35
|
+
"deprecated": false,
|
|
38
36
|
"description": "Unpipe a stream from all destinations",
|
|
39
37
|
"devDependencies": {
|
|
40
38
|
"istanbul": "0.3.15",
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_args": [
|
|
3
|
-
[
|
|
4
|
-
"utils-merge@1.0.1",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
2
|
"_from": "utils-merge@1.0.1",
|
|
9
3
|
"_id": "utils-merge@1.0.1",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "
|
|
5
|
+
"_integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
|
12
6
|
"_location": "/utils-merge",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
@@ -25,8 +19,9 @@
|
|
|
25
19
|
"/express"
|
|
26
20
|
],
|
|
27
21
|
"_resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
22
|
+
"_shasum": "9f95710f50a267947b2ccc124741c1028427e713",
|
|
23
|
+
"_spec": "utils-merge@1.0.1",
|
|
24
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/express",
|
|
30
25
|
"author": {
|
|
31
26
|
"name": "Jared Hanson",
|
|
32
27
|
"email": "jaredhanson@gmail.com",
|
|
@@ -35,7 +30,9 @@
|
|
|
35
30
|
"bugs": {
|
|
36
31
|
"url": "http://github.com/jaredhanson/utils-merge/issues"
|
|
37
32
|
},
|
|
33
|
+
"bundleDependencies": false,
|
|
38
34
|
"dependencies": {},
|
|
35
|
+
"deprecated": false,
|
|
39
36
|
"description": "merge() utility function",
|
|
40
37
|
"devDependencies": {
|
|
41
38
|
"chai": "1.x.x",
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-web-worldmap",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.2",
|
|
4
4
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@turf/bezier-spline": "~6.5.0",
|
|
7
7
|
"cgi": "0.3.1",
|
|
8
8
|
"compression": "^1.7.4",
|
|
9
|
-
"express": "^4.18.
|
|
9
|
+
"express": "^4.18.2",
|
|
10
10
|
"sockjs": "~0.3.24"
|
|
11
11
|
},
|
|
12
12
|
"bundledDependencies": [
|
package/worldmap/worldmap.js
CHANGED
|
@@ -33,6 +33,7 @@ var drawingColour = "#910000";
|
|
|
33
33
|
var sendDrawing;
|
|
34
34
|
var colorControl;
|
|
35
35
|
var sendRoute;
|
|
36
|
+
var oldBounds = {ne:{lat:0,lng:0},sw:{lat:0,lng:0}};
|
|
36
37
|
|
|
37
38
|
var iconSz = {
|
|
38
39
|
"Team/Crew": 24,
|
|
@@ -337,10 +338,7 @@ else {
|
|
|
337
338
|
// map.locate({setView:true, maxZoom:16});
|
|
338
339
|
// }, "Locate me").addTo(map);
|
|
339
340
|
|
|
340
|
-
|
|
341
|
-
rulerButton.addTo(map);
|
|
342
|
-
|
|
343
|
-
// Create the clear heatmap button
|
|
341
|
+
// Create the clear heatmap button
|
|
344
342
|
var clrHeat = L.easyButton( 'fa-eraser', function() {
|
|
345
343
|
console.log("Reset heatmap");
|
|
346
344
|
heat.setLatLngs([]);
|
|
@@ -360,6 +358,7 @@ document.getElementById('menu').innerHTML = helpMenu;
|
|
|
360
358
|
|
|
361
359
|
// Add graticule
|
|
362
360
|
var showGrid = false;
|
|
361
|
+
var showRuler = false;
|
|
363
362
|
var Lgrid = L.latlngGraticule({
|
|
364
363
|
font: "Verdana",
|
|
365
364
|
fontColor: "#666",
|
|
@@ -671,12 +670,16 @@ map.on('zoomend', function() {
|
|
|
671
670
|
showMapCurrentZoom();
|
|
672
671
|
window.localStorage.setItem("lastzoom", map.getZoom());
|
|
673
672
|
var b = map.getBounds();
|
|
673
|
+
oldBounds = {sw:{lat:b._southWest.lat,lng:b._southWest.lng},ne:{lat:b._northEast.lat,lng:b._northEast.lng}};
|
|
674
674
|
ws.send(JSON.stringify({action:"bounds", south:b._southWest.lat, west:b._southWest.lng, north:b._northEast.lat, east:b._northEast.lng, zoom:map.getZoom() }));
|
|
675
675
|
});
|
|
676
676
|
map.on('moveend', function() {
|
|
677
677
|
window.localStorage.setItem("lastpos",JSON.stringify(map.getCenter()));
|
|
678
678
|
var b = map.getBounds();
|
|
679
|
-
|
|
679
|
+
if (b._southWest.lat !== oldBounds.sw.lat && b._southWest.lng !== oldBounds.sw.lng && b._northEast.lat !== oldBounds.ne.lat && b._northEast.lng !== oldBounds.ne.lng) {
|
|
680
|
+
ws.send(JSON.stringify({action:"bounds", south:b._southWest.lat, west:b._southWest.lng, north:b._northEast.lat, east:b._northEast.lng, zoom:map.getZoom() }));
|
|
681
|
+
oldBounds = {sw:{lat:b._southWest.lat,lng:b._southWest.lng},ne:{lat:b._northEast.lat,lng:b._northEast.lng}};
|
|
682
|
+
}
|
|
680
683
|
});
|
|
681
684
|
map.on('locationfound', onLocationFound);
|
|
682
685
|
map.on('locationerror', onLocationError);
|
|
@@ -2170,8 +2173,8 @@ function doCommand(cmd) {
|
|
|
2170
2173
|
if ((cmd.grid.showgrid == "false" || cmd.grid.showgrid == false ) && showGrid) { changed = true; }
|
|
2171
2174
|
if (changed) {
|
|
2172
2175
|
showGrid = !showGrid;
|
|
2173
|
-
if (showGrid) { Lgrid.addTo(map);
|
|
2174
|
-
else { Lgrid.removeFrom(map);
|
|
2176
|
+
if (showGrid) { Lgrid.addTo(map);}
|
|
2177
|
+
else { Lgrid.removeFrom(map);}
|
|
2175
2178
|
}
|
|
2176
2179
|
}
|
|
2177
2180
|
if (cmd.grid.hasOwnProperty("opt")) {
|
|
@@ -2182,6 +2185,18 @@ function doCommand(cmd) {
|
|
|
2182
2185
|
}
|
|
2183
2186
|
}
|
|
2184
2187
|
}
|
|
2188
|
+
if (cmd.hasOwnProperty("ruler")) {
|
|
2189
|
+
if (cmd.ruler.hasOwnProperty("showruler")) {
|
|
2190
|
+
var changed = false;
|
|
2191
|
+
if ((cmd.ruler.showruler == "true" || cmd.ruler.showruler == true ) && !showRuler) { changed = true; }
|
|
2192
|
+
if ((cmd.ruler.showruler == "false" || cmd.ruler.showruler == false ) && showRuler) { changed = true; }
|
|
2193
|
+
if (changed) {
|
|
2194
|
+
showRuler = !showRuler;
|
|
2195
|
+
if (showRuler) { rulerButton.addTo(map); }
|
|
2196
|
+
else { rulerButton.remove(); }
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2185
2200
|
if (cmd.hasOwnProperty("button")) {
|
|
2186
2201
|
if (!Array.isArray(cmd.button)) { cmd.button = [cmd.button]; }
|
|
2187
2202
|
cmd.button.forEach(function(b) {
|
package/worldmap.html
CHANGED
|
@@ -93,6 +93,13 @@
|
|
|
93
93
|
<option value="true">Visible</option>
|
|
94
94
|
</select>
|
|
95
95
|
</div>
|
|
96
|
+
<div class="form-row">
|
|
97
|
+
<label for="node-input-showruler"><i class="fa fa-window-minimize"></i> Ruler</label>
|
|
98
|
+
<select id="node-input-showruler" style="width:101px;">
|
|
99
|
+
<option value="false">Not shown</option>
|
|
100
|
+
<option value="true">Visible</option>
|
|
101
|
+
</select>
|
|
102
|
+
</div>
|
|
96
103
|
<div class="form-row">
|
|
97
104
|
<label for="node-input-path"><i class="fa fa-globe"></i> Web Path</label>
|
|
98
105
|
<input type="text" id="node-input-path" placeholder="worldmap" style="width:30%;">
|
|
@@ -252,6 +259,13 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
|
|
|
252
259
|
<option value="true">Visible</option>
|
|
253
260
|
</select>
|
|
254
261
|
</div>
|
|
262
|
+
<div class="form-row">
|
|
263
|
+
<label for="node-input-showruler"><i class="fa fa-window-minimize"></i> Ruler</label>
|
|
264
|
+
<select id="node-input-showruler" style="width:101px;">
|
|
265
|
+
<option value="false">Not shown</option>
|
|
266
|
+
<option value="true">Visible</option>
|
|
267
|
+
</select>
|
|
268
|
+
</div>
|
|
255
269
|
<div class="form-row">
|
|
256
270
|
<label for="node-input-path"><i class="fa fa-globe"></i> Web Path</label>
|
|
257
271
|
<input type="text" id="node-input-path" placeholder="worldmap" style="width:30%;">
|
|
@@ -364,6 +378,7 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
|
|
|
364
378
|
hiderightclick: {value:"false"},
|
|
365
379
|
coords: {value:"false"},
|
|
366
380
|
showgrid: {value:"false"},
|
|
381
|
+
showruler: {value:"false"},
|
|
367
382
|
allowFileDrop: {value:"false"},
|
|
368
383
|
path: {value:"/worldmap"},
|
|
369
384
|
overlist: {value:"DR,CO,RA,DN,HM"},
|
|
@@ -477,6 +492,7 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
|
|
|
477
492
|
hiderightclick: {value:"true"},
|
|
478
493
|
coords: {value:"false"},
|
|
479
494
|
showgrid: {value:"false"},
|
|
495
|
+
showruler: {value:"false"},
|
|
480
496
|
allowFileDrop: {value:"false"},
|
|
481
497
|
path: {value:"/worldmap"},
|
|
482
498
|
overlist: {value:"DR,CO,RA,DN,HM"},
|
|
@@ -522,7 +538,7 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
|
|
|
522
538
|
options: olist
|
|
523
539
|
}]});
|
|
524
540
|
$("#node-input-maplist").on('change', function(event, type, value) {
|
|
525
|
-
if (value.indexOf("MB3d") > -1) {
|
|
541
|
+
if (value && value.indexOf("MB3d") > -1) {
|
|
526
542
|
mshort = [{ value:"MB3d", label:"Mapbox 3D" }];
|
|
527
543
|
$('#node-input-maplist option').prop('selected', false);
|
|
528
544
|
$("#node-input-maplist").val("MB3d");
|