node-red-contrib-web-worldmap 2.23.2 → 2.24.0
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 +28 -0
- package/README.md +15 -23
- package/node_modules/body-parser/HISTORY.md +15 -0
- package/node_modules/body-parser/README.md +25 -12
- package/node_modules/body-parser/package.json +32 -35
- package/node_modules/{body-parser/node_modules/bytes → bytes}/History.md +5 -0
- package/node_modules/{body-parser/node_modules/bytes → bytes}/LICENSE +0 -0
- package/node_modules/{raw-body/node_modules/bytes → bytes}/Readme.md +42 -16
- package/node_modules/{raw-body/node_modules/bytes → bytes}/index.js +5 -1
- package/node_modules/{raw-body/node_modules/bytes → bytes}/package.json +20 -21
- package/node_modules/content-disposition/HISTORY.md +5 -0
- package/node_modules/content-disposition/README.md +3 -9
- package/node_modules/content-disposition/index.js +1 -1
- package/node_modules/content-disposition/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/content-disposition/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/content-disposition/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/content-disposition/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/content-disposition/node_modules/safe-buffer/package.json +76 -0
- package/node_modules/content-disposition/package.json +25 -28
- package/node_modules/cookie/HISTORY.md +5 -0
- package/node_modules/cookie/README.md +4 -0
- package/node_modules/cookie/index.js +5 -1
- package/node_modules/cookie/package.json +20 -23
- package/node_modules/express/History.md +33 -0
- package/node_modules/express/Readme.md +8 -5
- package/node_modules/express/lib/application.js +1 -1
- package/node_modules/express/lib/request.js +1 -1
- package/node_modules/express/lib/response.js +16 -11
- package/node_modules/express/lib/router/index.js +6 -0
- package/node_modules/express/lib/utils.js +2 -6
- package/node_modules/express/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/express/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/express/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/express/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/express/node_modules/safe-buffer/package.json +76 -0
- package/node_modules/express/package.json +35 -36
- package/node_modules/faye-websocket/CHANGELOG.md +5 -0
- package/node_modules/faye-websocket/LICENSE.md +1 -1
- package/node_modules/faye-websocket/README.md +13 -13
- package/node_modules/faye-websocket/lib/faye/websocket/api.js +10 -8
- package/node_modules/faye-websocket/lib/faye/websocket/client.js +4 -4
- package/node_modules/faye-websocket/lib/faye/websocket.js +1 -1
- package/node_modules/faye-websocket/package.json +14 -17
- package/node_modules/forwarded/HISTORY.md +5 -0
- package/node_modules/forwarded/README.md +3 -3
- package/node_modules/forwarded/index.js +15 -1
- package/node_modules/forwarded/package.json +25 -26
- package/node_modules/http-errors/HISTORY.md +16 -0
- package/node_modules/http-errors/README.md +12 -6
- package/node_modules/http-errors/index.js +35 -2
- package/node_modules/http-errors/package.json +28 -31
- package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/LICENSE.md +0 -0
- package/node_modules/http-parser-js/README.md +39 -0
- package/node_modules/http-parser-js/http-parser.d.ts +175 -0
- package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/http-parser.js +8 -5
- package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/package.json +17 -19
- package/node_modules/inherits/inherits.js +2 -0
- package/node_modules/inherits/inherits_browser.js +18 -14
- package/node_modules/inherits/package.json +15 -18
- package/node_modules/ipaddr.js/README.md +1 -1
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +6 -9
- package/node_modules/ipaddr.js/package.json +15 -17
- package/node_modules/proxy-addr/HISTORY.md +11 -0
- package/node_modules/proxy-addr/README.md +3 -19
- package/node_modules/proxy-addr/index.js +1 -1
- package/node_modules/proxy-addr/package.json +28 -31
- package/node_modules/qs/.editorconfig +9 -0
- package/node_modules/qs/.eslintignore +2 -1
- package/node_modules/qs/.eslintrc +15 -1
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +103 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +34 -0
- package/node_modules/qs/dist/qs.js +117 -67
- package/node_modules/qs/lib/formats.js +9 -4
- package/node_modules/qs/lib/parse.js +29 -14
- package/node_modules/qs/lib/stringify.js +55 -46
- package/node_modules/qs/lib/utils.js +23 -2
- package/node_modules/qs/package.json +39 -31
- package/node_modules/qs/test/parse.js +97 -1
- package/node_modules/qs/test/stringify.js +115 -1
- package/node_modules/qs/test/utils.js +1 -1
- package/node_modules/raw-body/HISTORY.md +14 -0
- package/node_modules/raw-body/README.md +3 -5
- package/node_modules/raw-body/package.json +30 -33
- package/node_modules/send/HISTORY.md +10 -0
- package/node_modules/send/README.md +4 -6
- package/node_modules/send/index.js +7 -3
- package/node_modules/send/node_modules/ms/index.js +3 -3
- package/node_modules/send/node_modules/ms/license.md +1 -1
- package/node_modules/send/node_modules/ms/package.json +19 -21
- package/node_modules/send/node_modules/ms/readme.md +1 -2
- package/node_modules/send/package.json +28 -31
- package/node_modules/serve-static/HISTORY.md +8 -0
- package/node_modules/serve-static/README.md +9 -11
- package/node_modules/serve-static/package.json +28 -31
- package/node_modules/setprototypeof/README.md +1 -1
- package/node_modules/setprototypeof/index.js +1 -1
- package/node_modules/setprototypeof/package.json +17 -18
- package/node_modules/sockjs/Changelog +12 -0
- package/node_modules/sockjs/lib/transport.js +1 -1
- package/node_modules/sockjs/package.json +14 -16
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/README.md +3 -3
- package/node_modules/toidentifier/index.js +2 -0
- package/node_modules/toidentifier/package.json +28 -27
- package/node_modules/uuid/CHANGELOG.md +154 -44
- package/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/uuid/LICENSE.md +4 -16
- package/node_modules/uuid/README.md +384 -155
- package/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/uuid/{lib/md5-browser.js → dist/esm-browser/md5.js} +70 -71
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/node_modules/uuid/{v1.js → dist/esm-browser/v1.js} +36 -50
- package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/uuid/dist/rng-browser.js +26 -0
- package/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/uuid/dist/stringify.js +39 -0
- package/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/uuid/dist/v35.js +78 -0
- package/node_modules/uuid/dist/v4.js +37 -0
- package/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/uuid/package.json +116 -55
- package/node_modules/uuid/wrapper.mjs +10 -0
- package/package.json +3 -3
- package/worldmap/index.html +1 -0
- package/worldmap/leaflet/leaflet-arc.min.js +1 -0
- package/worldmap/worldmap.js +49 -25
- package/worldmap.html +1 -1
- package/worldmap.js +2 -2
- package/node_modules/body-parser/node_modules/bytes/Readme.md +0 -126
- package/node_modules/body-parser/node_modules/bytes/index.js +0 -162
- package/node_modules/body-parser/node_modules/bytes/package.json +0 -86
- package/node_modules/qs/LICENSE +0 -28
- package/node_modules/qs/test/.eslintrc +0 -17
- package/node_modules/qs/test/index.js +0 -7
- package/node_modules/raw-body/node_modules/bytes/History.md +0 -87
- package/node_modules/raw-body/node_modules/bytes/LICENSE +0 -23
- package/node_modules/uuid/AUTHORS +0 -5
- package/node_modules/uuid/bin/uuid +0 -65
- package/node_modules/uuid/index.js +0 -8
- package/node_modules/uuid/lib/bytesToUuid.js +0 -26
- package/node_modules/uuid/lib/md5.js +0 -25
- package/node_modules/uuid/lib/rng-browser.js +0 -34
- package/node_modules/uuid/lib/rng.js +0 -8
- package/node_modules/uuid/lib/sha1-browser.js +0 -89
- package/node_modules/uuid/lib/sha1.js +0 -25
- package/node_modules/uuid/lib/v35.js +0 -57
- package/node_modules/uuid/v3.js +0 -4
- package/node_modules/uuid/v4.js +0 -29
- package/node_modules/uuid/v5.js +0 -3
- package/node_modules/websocket-driver/node_modules/http-parser-js/CHANGELOG.md +0 -14
- package/node_modules/websocket-driver/node_modules/http-parser-js/README.md +0 -31
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
type ParserType =
|
|
2
|
+
| 'REQUEST'
|
|
3
|
+
| 'RESPONSE'
|
|
4
|
+
|
|
5
|
+
type RequestMethod =
|
|
6
|
+
| 'DELETE'
|
|
7
|
+
| 'GET'
|
|
8
|
+
| 'HEAD'
|
|
9
|
+
| 'POST'
|
|
10
|
+
| 'PUT'
|
|
11
|
+
| 'CONNECT'
|
|
12
|
+
| 'OPTIONS'
|
|
13
|
+
| 'TRACE'
|
|
14
|
+
| 'COPY'
|
|
15
|
+
| 'LOCK'
|
|
16
|
+
| 'MKCOL'
|
|
17
|
+
| 'MOVE'
|
|
18
|
+
| 'PROPFIND'
|
|
19
|
+
| 'PROPPATCH'
|
|
20
|
+
| 'SEARCH'
|
|
21
|
+
| 'UNLOCK'
|
|
22
|
+
| 'BIND'
|
|
23
|
+
| 'REBIND'
|
|
24
|
+
| 'UNBIND'
|
|
25
|
+
| 'ACL'
|
|
26
|
+
| 'REPORT'
|
|
27
|
+
| 'MKACTIVITY'
|
|
28
|
+
| 'CHECKOUT'
|
|
29
|
+
| 'MERGE'
|
|
30
|
+
| 'M-SEARCH'
|
|
31
|
+
| 'NOTIFY'
|
|
32
|
+
| 'SUBSCRIBE'
|
|
33
|
+
| 'UNSUBSCRIBE'
|
|
34
|
+
| 'PATCH'
|
|
35
|
+
| 'PURGE'
|
|
36
|
+
| 'MKCALENDAR'
|
|
37
|
+
| 'LINK'
|
|
38
|
+
| 'UNLINK'
|
|
39
|
+
| string
|
|
40
|
+
|
|
41
|
+
type StateHeaderKey =
|
|
42
|
+
| 'REQUEST_LINE'
|
|
43
|
+
| 'RESPONSE_LINE'
|
|
44
|
+
| 'HEADER'
|
|
45
|
+
|
|
46
|
+
type StateFinishAllowedKey =
|
|
47
|
+
| 'REQUEST_LINE'
|
|
48
|
+
| 'RESPONSE_LINE'
|
|
49
|
+
| 'BODY_RAW'
|
|
50
|
+
|
|
51
|
+
type HeaderObject = Record<string, string>
|
|
52
|
+
type noop<T = void> = ()=> T
|
|
53
|
+
|
|
54
|
+
type HeaderInfo<HEADER = HeaderObject> = {
|
|
55
|
+
versionMajor: number
|
|
56
|
+
versionMinor: number
|
|
57
|
+
headers: HEADER
|
|
58
|
+
method: RequestMethod
|
|
59
|
+
url: string
|
|
60
|
+
statusCode: number
|
|
61
|
+
statusMessage: string
|
|
62
|
+
upgrade: boolean
|
|
63
|
+
shouldKeepAlive: boolean
|
|
64
|
+
}
|
|
65
|
+
export type OnHeadersCompleteParser<HEADER = HeaderObject, Mode_0_12 extends boolean = true> = Mode_0_12 extends true
|
|
66
|
+
? (info: HeaderInfo<HEADER>)=> number
|
|
67
|
+
: (
|
|
68
|
+
versionMajor: number,
|
|
69
|
+
versionMinor: number,
|
|
70
|
+
headers: HEADER,
|
|
71
|
+
method: RequestMethod,
|
|
72
|
+
url: string,
|
|
73
|
+
statusCode: number,
|
|
74
|
+
statusMessage: string,
|
|
75
|
+
upgrade: boolean,
|
|
76
|
+
shouldKeepAlive: boolean,
|
|
77
|
+
)=> number
|
|
78
|
+
export type OnBodyParser = (chunk: Buffer, offset: number, length: number)=> void
|
|
79
|
+
// Only called in the slow case where slow means
|
|
80
|
+
// that the request headers were either fragmented
|
|
81
|
+
// across multiple TCP packets or too large to be
|
|
82
|
+
// processed in a single run. This method is also
|
|
83
|
+
// called to process trailing HTTP headers.
|
|
84
|
+
export type OnHeadersParser = (headers: string[], url: string)=> void
|
|
85
|
+
|
|
86
|
+
declare class HTTPParserJS {
|
|
87
|
+
initialize(type: ParserType, async_resource?: unknown): void
|
|
88
|
+
|
|
89
|
+
// Some handler stubs, needed for compatibility
|
|
90
|
+
[HTTPParser.kOnHeaders]: OnHeadersParser
|
|
91
|
+
[HTTPParser.kOnHeadersComplete]: OnHeadersCompleteParser
|
|
92
|
+
[HTTPParser.kOnBody]: OnBodyParser
|
|
93
|
+
[HTTPParser.kOnMessageComplete]: noop
|
|
94
|
+
|
|
95
|
+
reinitialize: HTTPParserConstructor
|
|
96
|
+
close: noop
|
|
97
|
+
pause: noop
|
|
98
|
+
resume: noop
|
|
99
|
+
free: noop
|
|
100
|
+
private _compatMode0_11: false | boolean
|
|
101
|
+
getAsyncId: noop<0>
|
|
102
|
+
|
|
103
|
+
execute(chunk: Buffer, start?: number, length?: number): number | Error
|
|
104
|
+
finish(): void | Error
|
|
105
|
+
|
|
106
|
+
// These three methods are used for an internal speed optimization, and it also
|
|
107
|
+
// works if theses are noops. Basically consume() asks us to read the bytes
|
|
108
|
+
// ourselves, but if we don't do it we get them through execute().
|
|
109
|
+
consume: noop
|
|
110
|
+
unconsume: noop
|
|
111
|
+
getCurrentBuffer: noop
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* For correct error handling - see HTTPParser#execute
|
|
115
|
+
* @example this.userCall()(userFunction('arg'));
|
|
116
|
+
*/
|
|
117
|
+
userCall<T = unknown>(): (ret?: T)=> T
|
|
118
|
+
private nextRequest: noop
|
|
119
|
+
private consumeLine: noop<string|void>
|
|
120
|
+
parseHeader(line: string, headers: string[]): void
|
|
121
|
+
private REQUEST_LINE: noop
|
|
122
|
+
private RESPONSE_LINE: noop
|
|
123
|
+
shouldKeepAlive(): boolean
|
|
124
|
+
/**
|
|
125
|
+
* For older versions of node (v6.x and older?), that return `skipBody=1` or `skipBody=true`, need this `return true;` if it's an upgrade request.
|
|
126
|
+
*/
|
|
127
|
+
private HEADER(): void | boolean
|
|
128
|
+
private BODY_CHUNKHEAD(): void
|
|
129
|
+
private BODY_CHUNK(): void
|
|
130
|
+
private BODY_CHUNKEMPTYLINE(): void
|
|
131
|
+
private BODY_CHUNKTRAILERS(): void
|
|
132
|
+
private BODY_RAW(): void
|
|
133
|
+
private BODY_SIZED(): void
|
|
134
|
+
|
|
135
|
+
get onHeaders(): OnHeadersParser
|
|
136
|
+
set onHeaders(to: OnHeadersParser)
|
|
137
|
+
|
|
138
|
+
get onHeadersComplete(): OnHeadersCompleteParser
|
|
139
|
+
set onHeadersComplete(to: OnHeadersCompleteParser)
|
|
140
|
+
|
|
141
|
+
get onBody(): OnBodyParser
|
|
142
|
+
set onBody(to: OnBodyParser)
|
|
143
|
+
|
|
144
|
+
get onMessageComplete(): noop
|
|
145
|
+
set onMessageComplete(to: noop)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
interface HTTPParserConstructor extends Function {
|
|
149
|
+
new(type?: ParserType): HTTPParserJS
|
|
150
|
+
(type?: ParserType): void
|
|
151
|
+
|
|
152
|
+
readonly prototype: HTTPParserJS
|
|
153
|
+
|
|
154
|
+
readonly REQUEST: 'REQUEST'
|
|
155
|
+
readonly RESPONSE: 'RESPONSE'
|
|
156
|
+
readonly methods: RequestMethod[]
|
|
157
|
+
|
|
158
|
+
encoding: 'ascii'|string
|
|
159
|
+
/**
|
|
160
|
+
* maxHeaderSize (in bytes) is configurable, but 80kb by default;
|
|
161
|
+
* @default 80 * 1024 = 80kb
|
|
162
|
+
*/
|
|
163
|
+
maxHeaderSize: 81920|number
|
|
164
|
+
|
|
165
|
+
// Note: *not* starting with kOnHeaders=0 line the Node parser, because any
|
|
166
|
+
// newly added constants (kOnTimeout in Node v12.19.0) will overwrite 0!
|
|
167
|
+
readonly kOnHeaders: 1
|
|
168
|
+
readonly kOnHeadersComplete: 2
|
|
169
|
+
readonly kOnBody: 3
|
|
170
|
+
readonly kOnMessageComplete: 4
|
|
171
|
+
|
|
172
|
+
kOnExecute(): void
|
|
173
|
+
}
|
|
174
|
+
export const HTTPParser: HTTPParserConstructor
|
|
175
|
+
export const methods: RequestMethod[]
|
package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/http-parser.js
RENAMED
|
@@ -33,10 +33,13 @@ HTTPParser.encoding = 'ascii';
|
|
|
33
33
|
HTTPParser.maxHeaderSize = 80 * 1024; // maxHeaderSize (in bytes) is configurable, but 80kb by default;
|
|
34
34
|
HTTPParser.REQUEST = 'REQUEST';
|
|
35
35
|
HTTPParser.RESPONSE = 'RESPONSE';
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var
|
|
36
|
+
|
|
37
|
+
// Note: *not* starting with kOnHeaders=0 line the Node parser, because any
|
|
38
|
+
// newly added constants (kOnTimeout in Node v12.19.0) will overwrite 0!
|
|
39
|
+
var kOnHeaders = HTTPParser.kOnHeaders = 1;
|
|
40
|
+
var kOnHeadersComplete = HTTPParser.kOnHeadersComplete = 2;
|
|
41
|
+
var kOnBody = HTTPParser.kOnBody = 3;
|
|
42
|
+
var kOnMessageComplete = HTTPParser.kOnMessageComplete = 4;
|
|
40
43
|
|
|
41
44
|
// Some handler stubs, needed for compatibility
|
|
42
45
|
HTTPParser.prototype[kOnHeaders] =
|
|
@@ -49,7 +52,7 @@ Object.defineProperty(HTTPParser, 'kOnExecute', {
|
|
|
49
52
|
get: function () {
|
|
50
53
|
// hack for backward compatibility
|
|
51
54
|
compatMode0_12 = false;
|
|
52
|
-
return
|
|
55
|
+
return 99;
|
|
53
56
|
}
|
|
54
57
|
});
|
|
55
58
|
|
package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/package.json
RENAMED
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"http-parser-js@0.5.2",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "http-parser-js@0.5.2",
|
|
9
|
-
"_id": "http-parser-js@0.5.2",
|
|
2
|
+
"_from": "http-parser-js@>=0.5.1",
|
|
3
|
+
"_id": "http-parser-js@0.5.5",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-
|
|
12
|
-
"_location": "/
|
|
5
|
+
"_integrity": "sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA==",
|
|
6
|
+
"_location": "/http-parser-js",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
15
|
-
"type": "
|
|
9
|
+
"type": "range",
|
|
16
10
|
"registry": true,
|
|
17
|
-
"raw": "http-parser-js
|
|
11
|
+
"raw": "http-parser-js@>=0.5.1",
|
|
18
12
|
"name": "http-parser-js",
|
|
19
13
|
"escapedName": "http-parser-js",
|
|
20
|
-
"rawSpec": "0.5.
|
|
14
|
+
"rawSpec": ">=0.5.1",
|
|
21
15
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "0.5.
|
|
16
|
+
"fetchSpec": ">=0.5.1"
|
|
23
17
|
},
|
|
24
18
|
"_requiredBy": [
|
|
25
19
|
"/websocket-driver"
|
|
26
20
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.
|
|
28
|
-
"
|
|
29
|
-
"
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz",
|
|
22
|
+
"_shasum": "d7c30d5d3c90d865b4a2e870181f9d6f22ac7ac5",
|
|
23
|
+
"_spec": "http-parser-js@>=0.5.1",
|
|
24
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/websocket-driver",
|
|
30
25
|
"author": {
|
|
31
26
|
"name": "Tim Caswell",
|
|
32
27
|
"url": "https://github.com/creationix"
|
|
@@ -34,6 +29,7 @@
|
|
|
34
29
|
"bugs": {
|
|
35
30
|
"url": "https://github.com/creationix/http-parser-js/issues"
|
|
36
31
|
},
|
|
32
|
+
"bundleDependencies": false,
|
|
37
33
|
"contributors": [
|
|
38
34
|
{
|
|
39
35
|
"name": "Jimb Esser",
|
|
@@ -52,9 +48,11 @@
|
|
|
52
48
|
"url": "https://github.com/paulrutter"
|
|
53
49
|
}
|
|
54
50
|
],
|
|
51
|
+
"deprecated": false,
|
|
55
52
|
"description": "A pure JS HTTP parser for node.",
|
|
56
53
|
"files": [
|
|
57
|
-
"http-parser.js"
|
|
54
|
+
"http-parser.js",
|
|
55
|
+
"http-parser.d.ts"
|
|
58
56
|
],
|
|
59
57
|
"homepage": "https://github.com/creationix/http-parser-js#readme",
|
|
60
58
|
"keywords": [
|
|
@@ -71,5 +69,5 @@
|
|
|
71
69
|
"test": "python tests/test.py && node tests/iojs/test-http-parser-durability.js",
|
|
72
70
|
"testv12": "python tests/test.py --node-args=\"--http-parser=legacy\" && node --http-parser=legacy tests/iojs/test-http-parser-durability.js"
|
|
73
71
|
},
|
|
74
|
-
"version": "0.5.
|
|
72
|
+
"version": "0.5.5"
|
|
75
73
|
}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
if (typeof Object.create === 'function') {
|
|
2
2
|
// implementation from standard node.js 'util' module
|
|
3
3
|
module.exports = function inherits(ctor, superCtor) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
if (superCtor) {
|
|
5
|
+
ctor.super_ = superCtor
|
|
6
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
7
|
+
constructor: {
|
|
8
|
+
value: ctor,
|
|
9
|
+
enumerable: false,
|
|
10
|
+
writable: true,
|
|
11
|
+
configurable: true
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
}
|
|
13
15
|
};
|
|
14
16
|
} else {
|
|
15
17
|
// old school shim for old browsers
|
|
16
18
|
module.exports = function inherits(ctor, superCtor) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
if (superCtor) {
|
|
20
|
+
ctor.super_ = superCtor
|
|
21
|
+
var TempCtor = function () {}
|
|
22
|
+
TempCtor.prototype = superCtor.prototype
|
|
23
|
+
ctor.prototype = new TempCtor()
|
|
24
|
+
ctor.prototype.constructor = ctor
|
|
25
|
+
}
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -1,39 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"inherits@2.0.3",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "inherits@2.0.3",
|
|
9
|
-
"_id": "inherits@2.0.3",
|
|
2
|
+
"_from": "inherits@2.0.4",
|
|
3
|
+
"_id": "inherits@2.0.4",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "
|
|
5
|
+
"_integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
|
12
6
|
"_location": "/inherits",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
15
9
|
"type": "version",
|
|
16
10
|
"registry": true,
|
|
17
|
-
"raw": "inherits@2.0.
|
|
11
|
+
"raw": "inherits@2.0.4",
|
|
18
12
|
"name": "inherits",
|
|
19
13
|
"escapedName": "inherits",
|
|
20
|
-
"rawSpec": "2.0.
|
|
14
|
+
"rawSpec": "2.0.4",
|
|
21
15
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "2.0.
|
|
16
|
+
"fetchSpec": "2.0.4"
|
|
23
17
|
},
|
|
24
18
|
"_requiredBy": [
|
|
25
19
|
"/http-errors"
|
|
26
20
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.
|
|
28
|
-
"
|
|
29
|
-
"
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
|
22
|
+
"_shasum": "0fa2c64f932917c3433a0ded55363aae37416b7c",
|
|
23
|
+
"_spec": "inherits@2.0.4",
|
|
24
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/http-errors",
|
|
30
25
|
"browser": "./inherits_browser.js",
|
|
31
26
|
"bugs": {
|
|
32
27
|
"url": "https://github.com/isaacs/inherits/issues"
|
|
33
28
|
},
|
|
29
|
+
"bundleDependencies": false,
|
|
30
|
+
"deprecated": false,
|
|
34
31
|
"description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
|
|
35
32
|
"devDependencies": {
|
|
36
|
-
"tap": "^
|
|
33
|
+
"tap": "^14.2.4"
|
|
37
34
|
},
|
|
38
35
|
"files": [
|
|
39
36
|
"inherits.js",
|
|
@@ -58,7 +55,7 @@
|
|
|
58
55
|
"url": "git://github.com/isaacs/inherits.git"
|
|
59
56
|
},
|
|
60
57
|
"scripts": {
|
|
61
|
-
"test": "
|
|
58
|
+
"test": "tap"
|
|
62
59
|
},
|
|
63
|
-
"version": "2.0.
|
|
60
|
+
"version": "2.0.4"
|
|
64
61
|
}
|
|
@@ -173,7 +173,7 @@ addr.octets // => [192, 168, 1, 1]
|
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
`prefixLengthFromSubnetMask()` will return a CIDR prefix length for a valid IPv4 netmask or
|
|
176
|
-
|
|
176
|
+
null if the netmask is not valid.
|
|
177
177
|
|
|
178
178
|
```js
|
|
179
179
|
ipaddr.IPv4.parse('255.255.255.240').prefixLengthFromSubnetMask() == 28
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
1
|
declare module "ipaddr.js" {
|
|
4
|
-
|
|
5
2
|
type IPv4Range = 'unicast' | 'unspecified' | 'broadcast' | 'multicast' | 'linkLocal' | 'loopback' | 'carrierGradeNat' | 'private' | 'reserved';
|
|
6
3
|
type IPv6Range = 'unicast' | 'unspecified' | 'linkLocal' | 'multicast' | 'loopback' | 'uniqueLocal' | 'ipv4Mapped' | 'rfc6145' | 'rfc6052' | '6to4' | 'teredo' | 'reserved';
|
|
7
4
|
|
|
@@ -9,23 +6,20 @@ declare module "ipaddr.js" {
|
|
|
9
6
|
[name: string]: [T, number] | [T, number][];
|
|
10
7
|
}
|
|
11
8
|
|
|
12
|
-
|
|
13
9
|
// Common methods/properties for IPv4 and IPv6 classes.
|
|
14
10
|
class IP {
|
|
15
|
-
|
|
16
|
-
prefixLengthFromSubnetMask(): number | false;
|
|
11
|
+
prefixLengthFromSubnetMask(): number | null;
|
|
17
12
|
toByteArray(): number[];
|
|
18
13
|
toNormalizedString(): string;
|
|
19
14
|
toString(): string;
|
|
20
15
|
}
|
|
21
16
|
|
|
22
17
|
namespace Address {
|
|
23
|
-
|
|
24
18
|
export function isValid(addr: string): boolean;
|
|
25
19
|
export function fromByteArray(bytes: number[]): IPv4 | IPv6;
|
|
26
20
|
export function parse(addr: string): IPv4 | IPv6;
|
|
27
21
|
export function parseCIDR(mask: string): [IPv4 | IPv6, number];
|
|
28
|
-
export function process(
|
|
22
|
+
export function process(addr: string): IPv4 | IPv6;
|
|
29
23
|
export function subnetMatch(addr: IPv4, rangeList: RangeList<IPv4>, defaultName?: string): string;
|
|
30
24
|
export function subnetMatch(addr: IPv6, rangeList: RangeList<IPv6>, defaultName?: string): string;
|
|
31
25
|
|
|
@@ -39,6 +33,7 @@ declare module "ipaddr.js" {
|
|
|
39
33
|
static parseCIDR(addr: string): [IPv4, number];
|
|
40
34
|
static subnetMaskFromPrefixLength(prefix: number): IPv4;
|
|
41
35
|
constructor(octets: number[]);
|
|
36
|
+
octets: number[]
|
|
42
37
|
|
|
43
38
|
kind(): 'ipv4';
|
|
44
39
|
match(addr: IPv4, bits: number): boolean;
|
|
@@ -55,7 +50,9 @@ declare module "ipaddr.js" {
|
|
|
55
50
|
static parse(addr: string): IPv6;
|
|
56
51
|
static parseCIDR(addr: string): [IPv6, number];
|
|
57
52
|
static subnetMaskFromPrefixLength(prefix: number): IPv6;
|
|
58
|
-
constructor(
|
|
53
|
+
constructor(parts: number[]);
|
|
54
|
+
parts: number[]
|
|
55
|
+
zoneId?: string
|
|
59
56
|
|
|
60
57
|
isIPv4MappedAddress(): boolean;
|
|
61
58
|
kind(): 'ipv6';
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"ipaddr.js@1.9.0",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "ipaddr.js@1.9.0",
|
|
9
|
-
"_id": "ipaddr.js@1.9.0",
|
|
2
|
+
"_from": "ipaddr.js@1.9.1",
|
|
3
|
+
"_id": "ipaddr.js@1.9.1",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
|
12
6
|
"_location": "/ipaddr.js",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
15
9
|
"type": "version",
|
|
16
10
|
"registry": true,
|
|
17
|
-
"raw": "ipaddr.js@1.9.
|
|
11
|
+
"raw": "ipaddr.js@1.9.1",
|
|
18
12
|
"name": "ipaddr.js",
|
|
19
13
|
"escapedName": "ipaddr.js",
|
|
20
|
-
"rawSpec": "1.9.
|
|
14
|
+
"rawSpec": "1.9.1",
|
|
21
15
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "1.9.
|
|
16
|
+
"fetchSpec": "1.9.1"
|
|
23
17
|
},
|
|
24
18
|
"_requiredBy": [
|
|
25
19
|
"/proxy-addr"
|
|
26
20
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.
|
|
28
|
-
"
|
|
29
|
-
"
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
|
22
|
+
"_shasum": "bff38543eeb8984825079ff3a2a8e6cbd46781b3",
|
|
23
|
+
"_spec": "ipaddr.js@1.9.1",
|
|
24
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/proxy-addr",
|
|
30
25
|
"author": {
|
|
31
26
|
"name": "whitequark",
|
|
32
27
|
"email": "whitequark@whitequark.org"
|
|
@@ -34,11 +29,13 @@
|
|
|
34
29
|
"bugs": {
|
|
35
30
|
"url": "https://github.com/whitequark/ipaddr.js/issues"
|
|
36
31
|
},
|
|
32
|
+
"bundleDependencies": false,
|
|
37
33
|
"dependencies": {},
|
|
34
|
+
"deprecated": false,
|
|
38
35
|
"description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.",
|
|
39
36
|
"devDependencies": {
|
|
40
37
|
"coffee-script": "~1.12.6",
|
|
41
|
-
"nodeunit": "
|
|
38
|
+
"nodeunit": "^0.11.3",
|
|
42
39
|
"uglify-js": "~3.0.19"
|
|
43
40
|
},
|
|
44
41
|
"directories": {
|
|
@@ -49,6 +46,7 @@
|
|
|
49
46
|
},
|
|
50
47
|
"files": [
|
|
51
48
|
"lib/",
|
|
49
|
+
"LICENSE",
|
|
52
50
|
"ipaddr.min.js"
|
|
53
51
|
],
|
|
54
52
|
"homepage": "https://github.com/whitequark/ipaddr.js#readme",
|
|
@@ -68,5 +66,5 @@
|
|
|
68
66
|
"test": "cake build test"
|
|
69
67
|
},
|
|
70
68
|
"types": "./lib/ipaddr.js.d.ts",
|
|
71
|
-
"version": "1.9.
|
|
69
|
+
"version": "1.9.1"
|
|
72
70
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[![NPM Version][npm-version-image]][npm-url]
|
|
4
4
|
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
5
5
|
[![Node.js Version][node-image]][node-url]
|
|
6
|
-
[![Build Status][
|
|
6
|
+
[![Build Status][ci-image]][ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
8
|
|
|
9
9
|
Determine address of proxied request
|
|
@@ -20,8 +20,6 @@ $ npm install proxy-addr
|
|
|
20
20
|
|
|
21
21
|
## API
|
|
22
22
|
|
|
23
|
-
<!-- eslint-disable no-unused-vars -->
|
|
24
|
-
|
|
25
23
|
```js
|
|
26
24
|
var proxyaddr = require('proxy-addr')
|
|
27
25
|
```
|
|
@@ -34,8 +32,6 @@ The `trust` argument is a function that returns `true` if you trust
|
|
|
34
32
|
the address, `false` if you don't. The closest untrusted address is
|
|
35
33
|
returned.
|
|
36
34
|
|
|
37
|
-
<!-- eslint-disable no-undef -->
|
|
38
|
-
|
|
39
35
|
```js
|
|
40
36
|
proxyaddr(req, function (addr) { return addr === '127.0.0.1' })
|
|
41
37
|
proxyaddr(req, function (addr, i) { return i < 1 })
|
|
@@ -45,8 +41,6 @@ The `trust` arugment may also be a single IP address string or an
|
|
|
45
41
|
array of trusted addresses, as plain IP addresses, CIDR-formatted
|
|
46
42
|
strings, or IP/netmask strings.
|
|
47
43
|
|
|
48
|
-
<!-- eslint-disable no-undef -->
|
|
49
|
-
|
|
50
44
|
```js
|
|
51
45
|
proxyaddr(req, '127.0.0.1')
|
|
52
46
|
proxyaddr(req, ['127.0.0.0/8', '10.0.0.0/8'])
|
|
@@ -56,8 +50,6 @@ proxyaddr(req, ['127.0.0.0/255.0.0.0', '192.168.0.0/255.255.0.0'])
|
|
|
56
50
|
This module also supports IPv6. Your IPv6 addresses will be normalized
|
|
57
51
|
automatically (i.e. `fe80::00ed:1` equals `fe80:0:0:0:0:0:ed:1`).
|
|
58
52
|
|
|
59
|
-
<!-- eslint-disable no-undef -->
|
|
60
|
-
|
|
61
53
|
```js
|
|
62
54
|
proxyaddr(req, '::1')
|
|
63
55
|
proxyaddr(req, ['::1/128', 'fe80::/10'])
|
|
@@ -70,8 +62,6 @@ not have to specify both `::ffff:a00:1` and `10.0.0.1`.
|
|
|
70
62
|
As a convenience, this module also takes certain pre-defined names
|
|
71
63
|
in addition to IP addresses, which expand into IP addresses:
|
|
72
64
|
|
|
73
|
-
<!-- eslint-disable no-undef -->
|
|
74
|
-
|
|
75
65
|
```js
|
|
76
66
|
proxyaddr(req, 'loopback')
|
|
77
67
|
proxyaddr(req, ['loopback', 'fc00:ac:1ab5:fff::1/64'])
|
|
@@ -96,8 +86,6 @@ Return all the addresses of the request, optionally stopping at the
|
|
|
96
86
|
first untrusted. This array is ordered from closest to furthest
|
|
97
87
|
(i.e. `arr[0] === req.connection.remoteAddress`).
|
|
98
88
|
|
|
99
|
-
<!-- eslint-disable no-undef -->
|
|
100
|
-
|
|
101
89
|
```js
|
|
102
90
|
proxyaddr.all(req)
|
|
103
91
|
```
|
|
@@ -105,8 +93,6 @@ proxyaddr.all(req)
|
|
|
105
93
|
The optional `trust` argument takes the same arguments as `trust`
|
|
106
94
|
does in `proxyaddr(req, trust)`.
|
|
107
95
|
|
|
108
|
-
<!-- eslint-disable no-undef -->
|
|
109
|
-
|
|
110
96
|
```js
|
|
111
97
|
proxyaddr.all(req, 'loopback')
|
|
112
98
|
```
|
|
@@ -117,8 +103,6 @@ Compiles argument `val` into a `trust` function. This function takes
|
|
|
117
103
|
the same arguments as `trust` does in `proxyaddr(req, trust)` and
|
|
118
104
|
returns a function suitable for `proxyaddr(req, trust)`.
|
|
119
105
|
|
|
120
|
-
<!-- eslint-disable no-undef, no-unused-vars -->
|
|
121
|
-
|
|
122
106
|
```js
|
|
123
107
|
var trust = proxyaddr.compile('loopback')
|
|
124
108
|
var addr = proxyaddr(req, trust)
|
|
@@ -144,6 +128,8 @@ $ npm run-script bench
|
|
|
144
128
|
|
|
145
129
|
[MIT](LICENSE)
|
|
146
130
|
|
|
131
|
+
[ci-image]: https://badgen.net/github/checks/jshttp/proxy-addr/master?label=ci
|
|
132
|
+
[ci-url]: https://github.com/jshttp/proxy-addr/actions?query=workflow%3Aci
|
|
147
133
|
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/proxy-addr/master
|
|
148
134
|
[coveralls-url]: https://coveralls.io/r/jshttp/proxy-addr?branch=master
|
|
149
135
|
[node-image]: https://badgen.net/npm/node/proxy-addr
|
|
@@ -151,5 +137,3 @@ $ npm run-script bench
|
|
|
151
137
|
[npm-downloads-image]: https://badgen.net/npm/dm/proxy-addr
|
|
152
138
|
[npm-url]: https://npmjs.org/package/proxy-addr
|
|
153
139
|
[npm-version-image]: https://badgen.net/npm/v/proxy-addr
|
|
154
|
-
[travis-image]: https://badgen.net/travis/jshttp/proxy-addr/master
|
|
155
|
-
[travis-url]: https://travis-ci.org/jshttp/proxy-addr
|