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.
Files changed (188) hide show
  1. package/.github/FUNDING.yml +13 -0
  2. package/CHANGELOG.md +6 -2
  3. package/README.md +4 -10
  4. package/node_modules/array-flatten/package.json +6 -9
  5. package/node_modules/body-parser/HISTORY.md +18 -0
  6. package/node_modules/body-parser/README.md +9 -1
  7. package/node_modules/body-parser/SECURITY.md +25 -0
  8. package/node_modules/body-parser/lib/read.js +26 -2
  9. package/node_modules/body-parser/lib/types/json.js +10 -4
  10. package/node_modules/body-parser/package.json +24 -20
  11. package/node_modules/call-bind/.eslintignore +1 -0
  12. package/node_modules/call-bind/.eslintrc +17 -0
  13. package/node_modules/call-bind/.github/FUNDING.yml +12 -0
  14. package/node_modules/call-bind/.nycrc +13 -0
  15. package/node_modules/call-bind/CHANGELOG.md +42 -0
  16. package/node_modules/call-bind/LICENSE +21 -0
  17. package/node_modules/call-bind/README.md +2 -0
  18. package/node_modules/call-bind/callBound.js +15 -0
  19. package/node_modules/call-bind/index.js +47 -0
  20. package/node_modules/call-bind/package.json +108 -0
  21. package/node_modules/call-bind/test/callBound.js +55 -0
  22. package/node_modules/call-bind/test/index.js +66 -0
  23. package/node_modules/cookie/HISTORY.md +8 -0
  24. package/node_modules/cookie/README.md +50 -34
  25. package/node_modules/cookie/SECURITY.md +25 -0
  26. package/node_modules/cookie/index.js +83 -15
  27. package/node_modules/cookie/package.json +17 -15
  28. package/node_modules/cookie-signature/package.json +6 -9
  29. package/node_modules/depd/History.md +7 -0
  30. package/node_modules/depd/LICENSE +1 -1
  31. package/node_modules/depd/Readme.md +8 -8
  32. package/node_modules/depd/index.js +29 -13
  33. package/node_modules/depd/package.json +25 -24
  34. package/node_modules/destroy/LICENSE +1 -0
  35. package/node_modules/destroy/README.md +15 -12
  36. package/node_modules/destroy/index.js +147 -13
  37. package/node_modules/destroy/package.json +29 -20
  38. package/node_modules/ee-first/package.json +6 -9
  39. package/node_modules/encodeurl/package.json +11 -14
  40. package/node_modules/escape-html/package.json +11 -14
  41. package/node_modules/etag/package.json +11 -14
  42. package/node_modules/express/History.md +54 -0
  43. package/node_modules/express/Readme.md +39 -31
  44. package/node_modules/express/lib/application.js +18 -1
  45. package/node_modules/express/lib/response.js +40 -18
  46. package/node_modules/express/lib/router/index.js +20 -15
  47. package/node_modules/express/lib/router/route.js +9 -0
  48. package/node_modules/express/lib/utils.js +1 -0
  49. package/node_modules/express/lib/view.js +1 -1
  50. package/node_modules/express/package.json +25 -26
  51. package/node_modules/finalhandler/HISTORY.md +8 -0
  52. package/node_modules/finalhandler/LICENSE +1 -1
  53. package/node_modules/finalhandler/README.md +5 -6
  54. package/node_modules/finalhandler/SECURITY.md +25 -0
  55. package/node_modules/finalhandler/index.js +8 -3
  56. package/node_modules/finalhandler/package.json +30 -32
  57. package/node_modules/fresh/package.json +6 -9
  58. package/node_modules/function-bind/.editorconfig +20 -0
  59. package/node_modules/function-bind/.eslintrc +15 -0
  60. package/node_modules/function-bind/.jscs.json +176 -0
  61. package/node_modules/function-bind/.npmignore +22 -0
  62. package/node_modules/function-bind/.travis.yml +168 -0
  63. package/node_modules/function-bind/LICENSE +20 -0
  64. package/node_modules/function-bind/README.md +48 -0
  65. package/node_modules/function-bind/implementation.js +52 -0
  66. package/node_modules/function-bind/index.js +5 -0
  67. package/node_modules/function-bind/package.json +96 -0
  68. package/node_modules/function-bind/test/.eslintrc +9 -0
  69. package/node_modules/function-bind/test/index.js +252 -0
  70. package/node_modules/get-intrinsic/.eslintrc +37 -0
  71. package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  72. package/node_modules/get-intrinsic/.nycrc +9 -0
  73. package/node_modules/get-intrinsic/CHANGELOG.md +98 -0
  74. package/node_modules/get-intrinsic/LICENSE +21 -0
  75. package/node_modules/get-intrinsic/README.md +71 -0
  76. package/node_modules/get-intrinsic/index.js +334 -0
  77. package/node_modules/get-intrinsic/package.json +120 -0
  78. package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  79. package/node_modules/has/LICENSE-MIT +22 -0
  80. package/node_modules/has/README.md +18 -0
  81. package/node_modules/has/package.json +73 -0
  82. package/node_modules/has/src/index.js +5 -0
  83. package/node_modules/has/test/index.js +10 -0
  84. package/node_modules/has-symbols/.eslintrc +11 -0
  85. package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  86. package/node_modules/has-symbols/.nycrc +9 -0
  87. package/node_modules/has-symbols/CHANGELOG.md +75 -0
  88. package/node_modules/has-symbols/LICENSE +21 -0
  89. package/node_modules/has-symbols/README.md +46 -0
  90. package/node_modules/has-symbols/index.js +13 -0
  91. package/node_modules/has-symbols/package.json +126 -0
  92. package/node_modules/has-symbols/shams.js +42 -0
  93. package/node_modules/has-symbols/test/index.js +22 -0
  94. package/node_modules/has-symbols/test/shams/core-js.js +28 -0
  95. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
  96. package/node_modules/has-symbols/test/tests.js +56 -0
  97. package/node_modules/http-errors/HISTORY.md +15 -0
  98. package/node_modules/http-errors/README.md +2 -2
  99. package/node_modules/http-errors/index.js +15 -25
  100. package/node_modules/http-errors/package.json +22 -20
  101. package/node_modules/media-typer/package.json +6 -9
  102. package/node_modules/merge-descriptors/package.json +6 -9
  103. package/node_modules/methods/package.json +11 -14
  104. package/node_modules/object-inspect/.eslintrc +53 -0
  105. package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
  106. package/node_modules/object-inspect/.nycrc +13 -0
  107. package/node_modules/object-inspect/CHANGELOG.md +360 -0
  108. package/node_modules/object-inspect/LICENSE +21 -0
  109. package/node_modules/object-inspect/example/all.js +23 -0
  110. package/node_modules/object-inspect/example/circular.js +6 -0
  111. package/node_modules/object-inspect/example/fn.js +5 -0
  112. package/node_modules/object-inspect/example/inspect.js +10 -0
  113. package/node_modules/object-inspect/index.js +512 -0
  114. package/node_modules/object-inspect/package-support.json +20 -0
  115. package/node_modules/object-inspect/package.json +122 -0
  116. package/node_modules/object-inspect/readme.markdown +86 -0
  117. package/node_modules/object-inspect/test/bigint.js +58 -0
  118. package/node_modules/object-inspect/test/browser/dom.js +15 -0
  119. package/node_modules/object-inspect/test/circular.js +16 -0
  120. package/node_modules/object-inspect/test/deep.js +12 -0
  121. package/node_modules/object-inspect/test/element.js +53 -0
  122. package/node_modules/object-inspect/test/err.js +48 -0
  123. package/node_modules/object-inspect/test/fakes.js +29 -0
  124. package/node_modules/object-inspect/test/fn.js +76 -0
  125. package/node_modules/object-inspect/test/has.js +15 -0
  126. package/node_modules/object-inspect/test/holes.js +15 -0
  127. package/node_modules/object-inspect/test/indent-option.js +271 -0
  128. package/node_modules/object-inspect/test/inspect.js +139 -0
  129. package/node_modules/object-inspect/test/lowbyte.js +12 -0
  130. package/node_modules/object-inspect/test/number.js +58 -0
  131. package/node_modules/object-inspect/test/quoteStyle.js +17 -0
  132. package/node_modules/object-inspect/test/toStringTag.js +40 -0
  133. package/node_modules/object-inspect/test/undef.js +12 -0
  134. package/node_modules/object-inspect/test/values.js +211 -0
  135. package/node_modules/object-inspect/test-core-js.js +26 -0
  136. package/node_modules/object-inspect/util.inspect.js +1 -0
  137. package/node_modules/on-finished/HISTORY.md +10 -0
  138. package/node_modules/on-finished/README.md +28 -20
  139. package/node_modules/on-finished/index.js +51 -13
  140. package/node_modules/on-finished/package.json +25 -20
  141. package/node_modules/path-to-regexp/package.json +6 -9
  142. package/node_modules/qs/CHANGELOG.md +22 -5
  143. package/node_modules/qs/README.md +7 -0
  144. package/node_modules/qs/dist/qs.js +1207 -5
  145. package/node_modules/qs/lib/parse.js +6 -0
  146. package/node_modules/qs/lib/stringify.js +33 -3
  147. package/node_modules/qs/package.json +16 -13
  148. package/node_modules/qs/test/parse.js +9 -0
  149. package/node_modules/qs/test/stringify.js +62 -1
  150. package/node_modules/raw-body/HISTORY.md +14 -0
  151. package/node_modules/raw-body/LICENSE +1 -1
  152. package/node_modules/raw-body/README.md +4 -0
  153. package/node_modules/raw-body/SECURITY.md +24 -0
  154. package/node_modules/raw-body/index.js +45 -2
  155. package/node_modules/raw-body/package.json +16 -15
  156. package/node_modules/send/HISTORY.md +15 -0
  157. package/node_modules/send/LICENSE +1 -1
  158. package/node_modules/send/README.md +2 -2
  159. package/node_modules/send/SECURITY.md +24 -0
  160. package/node_modules/send/index.js +37 -27
  161. package/node_modules/send/package.json +22 -21
  162. package/node_modules/serve-static/HISTORY.md +12 -0
  163. package/node_modules/serve-static/README.md +1 -1
  164. package/node_modules/serve-static/package.json +16 -16
  165. package/node_modules/side-channel/.eslintignore +1 -0
  166. package/node_modules/side-channel/.eslintrc +11 -0
  167. package/node_modules/side-channel/.github/FUNDING.yml +12 -0
  168. package/node_modules/side-channel/.nycrc +13 -0
  169. package/node_modules/side-channel/CHANGELOG.md +65 -0
  170. package/node_modules/side-channel/LICENSE +21 -0
  171. package/node_modules/side-channel/README.md +2 -0
  172. package/node_modules/side-channel/index.js +124 -0
  173. package/node_modules/side-channel/package.json +95 -0
  174. package/node_modules/side-channel/test/index.js +78 -0
  175. package/node_modules/statuses/HISTORY.md +17 -0
  176. package/node_modules/statuses/README.md +51 -42
  177. package/node_modules/statuses/codes.json +2 -3
  178. package/node_modules/statuses/index.js +52 -19
  179. package/node_modules/statuses/package.json +29 -31
  180. package/node_modules/unpipe/package.json +7 -9
  181. package/node_modules/utils-merge/package.json +6 -9
  182. package/package.json +2 -2
  183. package/worldmap/worldmap.js +22 -7
  184. package/worldmap.html +17 -1
  185. package/worldmap.js +553 -551
  186. package/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
  187. package/node_modules/depd/lib/compat/event-listener-count.js +0 -22
  188. package/node_modules/depd/lib/compat/index.js +0 -79
@@ -1,9 +1,9 @@
1
- # Statuses
1
+ # statuses
2
2
 
3
- [![NPM Version][npm-image]][npm-url]
4
- [![NPM Downloads][downloads-image]][downloads-url]
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][travis-image]][travis-url]
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
- ### var code = status(Integer || String)
37
+ ### status(code)
38
38
 
39
- If `Integer` or `String` is a valid HTTP code or status message, then the
40
- appropriate `code` will be returned. Otherwise, an error will be thrown.
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) // => 403
46
- status('403') // => 403
47
- status('forbidden') // => 403
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.STATUS_CODES
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
- Returns an object which maps status codes to status messages, in
55
- the same format as the
56
- [Node.js http module](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes).
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
- ### var msg = status[code]
67
+ ### status.code[msg]
63
68
 
64
- Map of `code` to `status message`. `undefined` for invalid `code`s.
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[404] // => 'Not Found'
75
+ status['not found'] // => 404
70
76
  ```
71
77
 
72
- ### var code = status[msg]
78
+ ### status.empty[code]
73
79
 
74
- Map of `status message` to `code`. `msg` can either be title-cased or
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['not found'] // => 404
81
- status['Not Found'] // => 404
85
+ status.empty[200] // => undefined
86
+ status.empty[204] // => true
87
+ status.empty[304] // => true
82
88
  ```
83
89
 
84
- ### status.redirect[code]
90
+ ### status.message[code]
85
91
 
86
- Returns `true` if a status code is a valid redirect status.
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.redirect[200] // => undefined
92
- status.redirect[301] // => true
99
+ status.message[404] // => 'Not Found'
93
100
  ```
94
101
 
95
- ### status.empty[code]
102
+ ### status.redirect[code]
96
103
 
97
- Returns `true` if a status code expects an empty body.
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.empty[200] // => undefined
103
- status.empty[204] // => true
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
- [npm-image]: https://img.shields.io/npm/v/statuses.svg
119
- [npm-url]: https://npmjs.org/package/statuses
120
- [node-version-image]: https://img.shields.io/node/v/statuses.svg
121
- [node-version-url]: https://nodejs.org/en/download
122
- [travis-image]: https://img.shields.io/travis/jshttp/statuses.svg
123
- [travis-url]: https://travis-ci.org/jshttp/statuses
124
- [coveralls-image]: https://img.shields.io/coveralls/jshttp/statuses.svg
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
- [downloads-image]: https://img.shields.io/npm/dm/statuses.svg
127
- [downloads-url]: https://npmjs.org/package/statuses
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 teapot",
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": "Unordered Collection",
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.STATUS_CODES = codes
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 = populateStatusesMap(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
- * Populate the statuses map for given codes.
59
+ * Create a map of message to status code.
57
60
  * @private
58
61
  */
59
62
 
60
- function populateStatusesMap (statuses, codes) {
61
- var arr = []
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
- // Populate properties
68
- statuses[status] = message
69
- statuses[message] = status
70
- statuses[message.toLowerCase()] = status
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
- // Add to array
73
- arr.push(status)
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 arr
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
- if (!status[code]) throw new Error('invalid status code: ' + code)
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
- if (!status[n]) throw new Error('invalid status code: ' + n)
107
- return n
142
+ return getStatusMessage(n)
108
143
  }
109
144
 
110
- n = status[code.toLowerCase()]
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
- "_args": [
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": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
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@1.5.0",
11
+ "raw": "statuses@2.0.1",
18
12
  "name": "statuses",
19
13
  "escapedName": "statuses",
20
- "rawSpec": "1.5.0",
14
+ "rawSpec": "2.0.1",
21
15
  "saveSpec": null,
22
- "fetchSpec": "1.5.0"
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-1.5.0.tgz",
31
- "_spec": "1.5.0",
32
- "_where": "/Users/conway/Projects/worldmap",
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": "1.2.4",
50
- "eslint": "4.19.1",
51
- "eslint-config-standard": "11.0.0",
52
- "eslint-plugin-import": "2.9.0",
53
- "eslint-plugin-markdown": "1.0.0-beta.6",
54
- "eslint-plugin-node": "6.0.1",
55
- "eslint-plugin-promise": "3.7.0",
56
- "eslint-plugin-standard": "3.0.1",
57
- "istanbul": "0.4.5",
58
- "mocha": "1.21.5",
59
- "raw-body": "2.3.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.6"
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": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
89
- "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
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": "1.5.0"
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": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
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
- "_spec": "1.0.0",
30
- "_where": "/Users/conway/Projects/worldmap",
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": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
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
- "_spec": "1.0.1",
29
- "_where": "/Users/conway/Projects/worldmap",
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.29.0",
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.1",
9
+ "express": "^4.18.2",
10
10
  "sockjs": "~0.3.24"
11
11
  },
12
12
  "bundledDependencies": [
@@ -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
- // Add the measure/ruler button
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
- 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() }));
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); rulerButton.addTo(map); }
2174
- else { Lgrid.removeFrom(map); rulerButton.remove(); }
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");