node-red-contrib-web-worldmap 4.6.1 → 4.6.3

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 (173) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +6 -3
  3. package/node_modules/body-parser/HISTORY.md +8 -0
  4. package/node_modules/body-parser/README.md +11 -10
  5. package/node_modules/body-parser/lib/types/json.js +15 -4
  6. package/node_modules/body-parser/package.json +8 -8
  7. package/node_modules/call-bind/.eslintrc +0 -1
  8. package/node_modules/call-bind/.nycrc +0 -4
  9. package/node_modules/call-bind/CHANGELOG.md +51 -0
  10. package/node_modules/call-bind/README.md +63 -1
  11. package/node_modules/call-bind/index.js +11 -23
  12. package/node_modules/call-bind/package.json +38 -23
  13. package/node_modules/call-bind/test/callBound.js +0 -1
  14. package/node_modules/call-bind/test/index.js +18 -4
  15. package/node_modules/content-type/HISTORY.md +5 -0
  16. package/node_modules/content-type/README.md +21 -19
  17. package/node_modules/content-type/index.js +12 -9
  18. package/node_modules/content-type/package.json +13 -11
  19. package/node_modules/define-data-property/.eslintrc +24 -0
  20. package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
  21. package/node_modules/define-data-property/.nycrc +13 -0
  22. package/node_modules/define-data-property/CHANGELOG.md +70 -0
  23. package/node_modules/define-data-property/LICENSE +21 -0
  24. package/node_modules/define-data-property/README.md +67 -0
  25. package/node_modules/define-data-property/index.d.ts +12 -0
  26. package/node_modules/define-data-property/index.js +56 -0
  27. package/node_modules/define-data-property/package.json +106 -0
  28. package/node_modules/define-data-property/test/index.js +392 -0
  29. package/node_modules/define-data-property/tsconfig.json +59 -0
  30. package/node_modules/es-define-property/.eslintrc +13 -0
  31. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  32. package/node_modules/es-define-property/.nycrc +9 -0
  33. package/node_modules/es-define-property/CHANGELOG.md +15 -0
  34. package/node_modules/es-define-property/LICENSE +21 -0
  35. package/node_modules/es-define-property/README.md +49 -0
  36. package/node_modules/es-define-property/index.d.ts +3 -0
  37. package/node_modules/es-define-property/index.js +16 -0
  38. package/node_modules/es-define-property/package.json +81 -0
  39. package/node_modules/es-define-property/test/index.js +55 -0
  40. package/node_modules/es-define-property/tsconfig.json +50 -0
  41. package/node_modules/es-errors/.eslintrc +5 -0
  42. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  43. package/node_modules/es-errors/CHANGELOG.md +40 -0
  44. package/node_modules/es-errors/LICENSE +21 -0
  45. package/node_modules/es-errors/README.md +55 -0
  46. package/node_modules/es-errors/eval.d.ts +3 -0
  47. package/node_modules/es-errors/eval.js +4 -0
  48. package/node_modules/es-errors/index.d.ts +3 -0
  49. package/node_modules/es-errors/index.js +4 -0
  50. package/node_modules/es-errors/package.json +80 -0
  51. package/node_modules/es-errors/range.d.ts +3 -0
  52. package/node_modules/es-errors/range.js +4 -0
  53. package/node_modules/es-errors/ref.d.ts +3 -0
  54. package/node_modules/es-errors/ref.js +4 -0
  55. package/node_modules/es-errors/syntax.d.ts +3 -0
  56. package/node_modules/es-errors/syntax.js +4 -0
  57. package/node_modules/es-errors/test/index.js +19 -0
  58. package/node_modules/es-errors/tsconfig.json +49 -0
  59. package/node_modules/es-errors/type.d.ts +3 -0
  60. package/node_modules/es-errors/type.js +4 -0
  61. package/node_modules/es-errors/uri.d.ts +3 -0
  62. package/node_modules/es-errors/uri.js +4 -0
  63. package/node_modules/express/History.md +14 -5
  64. package/node_modules/express/Readme.md +1 -1
  65. package/node_modules/express/lib/router/index.js +1 -1
  66. package/node_modules/express/lib/router/route.js +7 -2
  67. package/node_modules/express/lib/utils.js +3 -4
  68. package/node_modules/express/package.json +5 -6
  69. package/node_modules/function-bind/.eslintrc +11 -5
  70. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  71. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  72. package/node_modules/function-bind/.nycrc +13 -0
  73. package/node_modules/function-bind/CHANGELOG.md +136 -0
  74. package/node_modules/function-bind/README.md +25 -27
  75. package/node_modules/function-bind/implementation.js +44 -12
  76. package/node_modules/function-bind/package.json +38 -14
  77. package/node_modules/get-intrinsic/.eslintrc +1 -0
  78. package/node_modules/get-intrinsic/CHANGELOG.md +45 -0
  79. package/node_modules/get-intrinsic/index.js +41 -16
  80. package/node_modules/get-intrinsic/package.json +20 -18
  81. package/node_modules/get-intrinsic/test/GetIntrinsic.js +1 -1
  82. package/node_modules/gopd/.eslintrc +16 -0
  83. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  84. package/node_modules/gopd/CHANGELOG.md +25 -0
  85. package/node_modules/gopd/LICENSE +21 -0
  86. package/node_modules/gopd/README.md +40 -0
  87. package/node_modules/gopd/index.js +16 -0
  88. package/node_modules/gopd/package.json +71 -0
  89. package/node_modules/gopd/test/index.js +35 -0
  90. package/node_modules/has-property-descriptors/.eslintrc +13 -0
  91. package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
  92. package/node_modules/has-property-descriptors/.nycrc +9 -0
  93. package/node_modules/has-property-descriptors/CHANGELOG.md +35 -0
  94. package/node_modules/has-property-descriptors/LICENSE +21 -0
  95. package/node_modules/has-property-descriptors/README.md +43 -0
  96. package/node_modules/has-property-descriptors/index.js +22 -0
  97. package/node_modules/has-property-descriptors/package.json +77 -0
  98. package/node_modules/has-property-descriptors/test/index.js +57 -0
  99. package/node_modules/has-proto/.eslintrc +5 -0
  100. package/node_modules/has-proto/.github/FUNDING.yml +12 -0
  101. package/node_modules/has-proto/CHANGELOG.md +38 -0
  102. package/node_modules/has-proto/LICENSE +21 -0
  103. package/node_modules/has-proto/README.md +38 -0
  104. package/node_modules/has-proto/index.d.ts +3 -0
  105. package/node_modules/has-proto/index.js +15 -0
  106. package/node_modules/has-proto/package.json +78 -0
  107. package/node_modules/has-proto/test/index.js +19 -0
  108. package/node_modules/has-proto/tsconfig.json +49 -0
  109. package/node_modules/hasown/.eslintrc +5 -0
  110. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  111. package/node_modules/hasown/.nycrc +13 -0
  112. package/node_modules/hasown/CHANGELOG.md +28 -0
  113. package/node_modules/hasown/LICENSE +21 -0
  114. package/node_modules/hasown/README.md +40 -0
  115. package/node_modules/hasown/index.d.ts +3 -0
  116. package/node_modules/hasown/index.js +8 -0
  117. package/node_modules/hasown/package.json +89 -0
  118. package/node_modules/hasown/tsconfig.json +49 -0
  119. package/node_modules/http-parser-js/README.md +43 -0
  120. package/node_modules/http-parser-js/http-parser.d.ts +175 -0
  121. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/http-parser.js +12 -7
  122. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/package.json +4 -2
  123. package/node_modules/object-inspect/CHANGELOG.md +29 -0
  124. package/node_modules/object-inspect/index.js +18 -6
  125. package/node_modules/object-inspect/package.json +13 -8
  126. package/node_modules/object-inspect/test/global.js +17 -0
  127. package/node_modules/raw-body/HISTORY.md +5 -0
  128. package/node_modules/raw-body/README.md +1 -1
  129. package/node_modules/raw-body/index.js +7 -0
  130. package/node_modules/raw-body/package.json +7 -7
  131. package/node_modules/set-function-length/.eslintrc +27 -0
  132. package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
  133. package/node_modules/set-function-length/.nycrc +13 -0
  134. package/node_modules/set-function-length/CHANGELOG.md +59 -0
  135. package/node_modules/set-function-length/LICENSE +21 -0
  136. package/node_modules/set-function-length/README.md +56 -0
  137. package/node_modules/set-function-length/env.d.ts +6 -0
  138. package/node_modules/set-function-length/env.d.ts.map +1 -0
  139. package/node_modules/set-function-length/env.js +24 -0
  140. package/node_modules/set-function-length/index.d.ts +7 -0
  141. package/node_modules/set-function-length/index.d.ts.map +1 -0
  142. package/node_modules/set-function-length/index.js +44 -0
  143. package/node_modules/set-function-length/package.json +104 -0
  144. package/node_modules/set-function-length/tsconfig.json +59 -0
  145. package/node_modules/{function-bind → side-channel}/.editorconfig +3 -14
  146. package/node_modules/side-channel/.eslintrc +1 -1
  147. package/node_modules/side-channel/CHANGELOG.md +30 -0
  148. package/node_modules/side-channel/index.d.ts +27 -0
  149. package/node_modules/side-channel/index.js +25 -20
  150. package/node_modules/side-channel/package.json +36 -19
  151. package/node_modules/side-channel/test/index.js +6 -1
  152. package/node_modules/side-channel/tsconfig.json +50 -0
  153. package/package.json +1 -1
  154. package/worldmap/index.html +2 -2
  155. package/worldmap/worldmap.js +4 -2
  156. package/worldmap.js +2 -2
  157. package/node_modules/function-bind/.jscs.json +0 -176
  158. package/node_modules/function-bind/.npmignore +0 -22
  159. package/node_modules/function-bind/.travis.yml +0 -168
  160. package/node_modules/has/LICENSE-MIT +0 -22
  161. package/node_modules/has/README.md +0 -18
  162. package/node_modules/has/package.json +0 -48
  163. package/node_modules/has/src/index.js +0 -5
  164. package/node_modules/has/test/index.js +0 -10
  165. package/node_modules/side-channel/.eslintignore +0 -1
  166. package/node_modules/websocket-driver/node_modules/http-parser-js/CHANGELOG.md +0 -14
  167. package/node_modules/websocket-driver/node_modules/http-parser-js/README.md +0 -31
  168. /package/node_modules/{compression/node_modules/bytes → bytes}/History.md +0 -0
  169. /package/node_modules/{compression/node_modules/bytes → bytes}/LICENSE +0 -0
  170. /package/node_modules/{compression/node_modules/bytes → bytes}/Readme.md +0 -0
  171. /package/node_modules/{compression/node_modules/bytes → bytes}/index.js +0 -0
  172. /package/node_modules/{compression/node_modules/bytes → bytes}/package.json +0 -0
  173. /package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/LICENSE.md +0 -0
@@ -0,0 +1,49 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+
7
+ /* Language and Environment */
8
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
9
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
10
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
11
+ "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
12
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
13
+
14
+ /* Modules */
15
+ "module": "commonjs", /* Specify what module code is generated. */
16
+ // "rootDir": "./", /* Specify the root folder within your source files. */
17
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
18
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
19
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
20
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
21
+ "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
22
+ "resolveJsonModule": true, /* Enable importing .json files. */
23
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
24
+
25
+ /* JavaScript Support */
26
+ "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
27
+ "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
28
+ "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
29
+
30
+ /* Emit */
31
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
32
+ "declarationMap": true, /* Create sourcemaps for d.ts files. */
33
+ "noEmit": true, /* Disable emitting files from a compilation. */
34
+
35
+ /* Interop Constraints */
36
+ "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
37
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
38
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
39
+
40
+ /* Type Checking */
41
+ "strict": true, /* Enable all strict type-checking options. */
42
+
43
+ /* Completeness */
44
+ //"skipLibCheck": true /* Skip type checking all .d.ts files. */
45
+ },
46
+ "exclude": [
47
+ "coverage"
48
+ ]
49
+ }
@@ -0,0 +1,43 @@
1
+ ![Node](https://github.com/creationix/http-parser-js/workflows/Node/badge.svg)
2
+ ![Node-v12](https://github.com/creationix/http-parser-js/workflows/Node-v12/badge.svg)
3
+
4
+ # HTTP Parser
5
+
6
+ This library parses HTTP protocol for requests and responses.
7
+ It was created to replace `http_parser.c` since calling C++ functions from JS is really slow in V8.
8
+ However, it is now primarily useful in having a more flexible/tolerant HTTP parser when dealing with legacy services that do not meet the strict HTTP parsing rules Node's parser follows.
9
+
10
+ This is packaged as a standalone npm module.
11
+ To use in node, monkeypatch HTTPParser.
12
+
13
+ ```js
14
+ // Monkey patch before you require http for the first time.
15
+ process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser;
16
+
17
+ var http = require('http');
18
+ // ...
19
+ ```
20
+
21
+ ## Testing
22
+
23
+ Simply run `npm test`.
24
+ The tests are copied from node and mscedex/io.js, with some modifcations.
25
+
26
+ ## Status
27
+
28
+ This should now be usable in any node application, it now supports (nearly) everything `http_parser.c` does while still being tolerant with corrupted headers, and other kinds of malformed data.
29
+
30
+ ### Node versions
31
+
32
+ `http-parser-js` should work via monkey-patching on Node v6-v11, and v13-14.
33
+
34
+ Node v12.x renamed the internal http parser, and did not expose it for monkey-patching, so to be able to monkey-patch on Node v12, you must run `node --http-parser=legacy file.js` to opt in to the old, monkey-patchable http_parser binding.
35
+
36
+ ## Standalone usage
37
+
38
+ While this module is intended to be used as a replacement for the internal Node.js parser, it can be used as a standalone parser. The [`standalone-example.js`](standalone-example.js) demonstrates how to use the somewhat awkward API (coming from compatibility with the Node.js internals) to parse HTTP from raw Buffers.
39
+
40
+ ## License
41
+
42
+ MIT.
43
+ See [LICENSE.md](LICENSE.md)
@@ -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 = Array<string>
52
+ type noop<T = void> = ()=> T
53
+
54
+ type HeaderInfo<HEADER = HeaderObject> = {
55
+ versionMajor: number
56
+ versionMinor: number
57
+ headers: HEADER
58
+ method: number
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 | void
67
+ : (
68
+ versionMajor: number,
69
+ versionMinor: number,
70
+ headers: HEADER,
71
+ method: number,
72
+ url: string,
73
+ statusCode: number,
74
+ statusMessage: string,
75
+ upgrade: boolean,
76
+ shouldKeepAlive: boolean,
77
+ )=> number | void
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[]
@@ -10,6 +10,7 @@ function HTTPParser(type) {
10
10
  } else {
11
11
  this.initialize(type);
12
12
  }
13
+ this.maxHeaderSize=HTTPParser.maxHeaderSize
13
14
  }
14
15
  HTTPParser.prototype.initialize = function (type, async_resource) {
15
16
  assert.ok(type === HTTPParser.REQUEST || type === HTTPParser.RESPONSE);
@@ -33,10 +34,13 @@ HTTPParser.encoding = 'ascii';
33
34
  HTTPParser.maxHeaderSize = 80 * 1024; // maxHeaderSize (in bytes) is configurable, but 80kb by default;
34
35
  HTTPParser.REQUEST = 'REQUEST';
35
36
  HTTPParser.RESPONSE = 'RESPONSE';
36
- var kOnHeaders = HTTPParser.kOnHeaders = 0;
37
- var kOnHeadersComplete = HTTPParser.kOnHeadersComplete = 1;
38
- var kOnBody = HTTPParser.kOnBody = 2;
39
- var kOnMessageComplete = HTTPParser.kOnMessageComplete = 3;
37
+
38
+ // Note: *not* starting with kOnHeaders=0 line the Node parser, because any
39
+ // newly added constants (kOnTimeout in Node v12.19.0) will overwrite 0!
40
+ var kOnHeaders = HTTPParser.kOnHeaders = 1;
41
+ var kOnHeadersComplete = HTTPParser.kOnHeadersComplete = 2;
42
+ var kOnBody = HTTPParser.kOnBody = 3;
43
+ var kOnMessageComplete = HTTPParser.kOnMessageComplete = 4;
40
44
 
41
45
  // Some handler stubs, needed for compatibility
42
46
  HTTPParser.prototype[kOnHeaders] =
@@ -49,7 +53,7 @@ Object.defineProperty(HTTPParser, 'kOnExecute', {
49
53
  get: function () {
50
54
  // hack for backward compatibility
51
55
  compatMode0_12 = false;
52
- return 4;
56
+ return 99;
53
57
  }
54
58
  });
55
59
 
@@ -86,7 +90,8 @@ var methods = exports.methods = HTTPParser.methods = [
86
90
  'PURGE',
87
91
  'MKCALENDAR',
88
92
  'LINK',
89
- 'UNLINK'
93
+ 'UNLINK',
94
+ 'SOURCE',
90
95
  ];
91
96
  var method_connect = methods.indexOf('CONNECT');
92
97
  HTTPParser.prototype.reinitialize = HTTPParser;
@@ -132,7 +137,7 @@ HTTPParser.prototype.execute = function (chunk, start, length) {
132
137
  length = this.offset - start;
133
138
  if (headerState[this.state]) {
134
139
  this.headerSize += length;
135
- if (this.headerSize > HTTPParser.maxHeaderSize) {
140
+ if (this.headerSize > (this.maxHeaderSize||HTTPParser.maxHeaderSize)) {
136
141
  return new Error('max header size exceeded');
137
142
  }
138
143
  }
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "http-parser-js",
3
- "version": "0.5.2",
3
+ "version": "0.5.8",
4
4
  "description": "A pure JS HTTP parser for node.",
5
5
  "main": "http-parser.js",
6
+ "types": "http-parser.d.ts",
6
7
  "scripts": {
7
8
  "test": "python tests/test.py && node tests/iojs/test-http-parser-durability.js",
8
9
  "testv12": "python tests/test.py --node-args=\"--http-parser=legacy\" && node --http-parser=legacy tests/iojs/test-http-parser-durability.js"
@@ -12,7 +13,8 @@
12
13
  "url": "git://github.com/creationix/http-parser-js.git"
13
14
  },
14
15
  "files": [
15
- "http-parser.js"
16
+ "http-parser.js",
17
+ "http-parser.d.ts"
16
18
  ],
17
19
  "keywords": [
18
20
  "http"
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v1.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19
9
+
10
+ ### Commits
11
+
12
+ - [Fix] in IE 8, global can !== window despite them being prototypes of each other [`30d0859`](https://github.com/inspect-js/object-inspect/commit/30d0859dc4606cf75c2410edcd5d5c6355f8d372)
13
+
14
+ ## [v1.13.0](https://github.com/inspect-js/object-inspect/compare/v1.12.3...v1.13.0) - 2023-10-14
15
+
16
+ ### Commits
17
+
18
+ - [New] add special handling for the global object [`431bab2`](https://github.com/inspect-js/object-inspect/commit/431bab21a490ee51d35395966a504501e8c685da)
19
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`fd4f619`](https://github.com/inspect-js/object-inspect/commit/fd4f6193562b4b0e95dcf5c0201b4e8cbbc4f58d)
20
+ - [Dev Deps] update `mock-property`, `tape` [`b453f6c`](https://github.com/inspect-js/object-inspect/commit/b453f6ceeebf8a1b738a1029754092e0367a4134)
21
+ - [Dev Deps] update `error-cause` [`e8ffc57`](https://github.com/inspect-js/object-inspect/commit/e8ffc577d73b92bb6a4b00c44f14e3319e374888)
22
+ - [Dev Deps] update `tape` [`054b8b9`](https://github.com/inspect-js/object-inspect/commit/054b8b9b98633284cf989e582450ebfbbe53503c)
23
+ - [Dev Deps] temporarily remove `aud` due to breaking change in transitive deps [`2476845`](https://github.com/inspect-js/object-inspect/commit/2476845e0678dd290c541c81cd3dec8420782c52)
24
+ - [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` [`383fa5e`](https://github.com/inspect-js/object-inspect/commit/383fa5eebc0afd705cc778a4b49d8e26452e49a8)
25
+ - [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm &lt; 6 [`68c244c`](https://github.com/inspect-js/object-inspect/commit/68c244c5174cdd877e5dcb8ee90aa3f44b2f25be)
26
+
27
+ ## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12
28
+
29
+ ### Commits
30
+
31
+ - [Fix] in eg FF 24, collections lack forEach [`75fc226`](https://github.com/inspect-js/object-inspect/commit/75fc22673c82d45f28322b1946bb0eb41b672b7f)
32
+ - [actions] update rebase action to use reusable workflow [`250a277`](https://github.com/inspect-js/object-inspect/commit/250a277a095e9dacc029ab8454dcfc15de549dcd)
33
+ - [Dev Deps] update `aud`, `es-value-fixtures`, `tape` [`66a19b3`](https://github.com/inspect-js/object-inspect/commit/66a19b3209ccc3c5ef4b34c3cb0160e65d1ce9d5)
34
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `error-cause` [`c43d332`](https://github.com/inspect-js/object-inspect/commit/c43d3324b48384a16fd3dc444e5fc589d785bef3)
35
+ - [Tests] add `@pkgjs/support` to `postlint` [`e2618d2`](https://github.com/inspect-js/object-inspect/commit/e2618d22a7a3fa361b6629b53c1752fddc9c4d80)
36
+
8
37
  ## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26
9
38
 
10
39
  ### Commits
@@ -202,16 +202,20 @@ module.exports = function inspect_(obj, options, depth, seen) {
202
202
  }
203
203
  if (isMap(obj)) {
204
204
  var mapParts = [];
205
- mapForEach.call(obj, function (value, key) {
206
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
207
- });
205
+ if (mapForEach) {
206
+ mapForEach.call(obj, function (value, key) {
207
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
208
+ });
209
+ }
208
210
  return collectionOf('Map', mapSize.call(obj), mapParts, indent);
209
211
  }
210
212
  if (isSet(obj)) {
211
213
  var setParts = [];
212
- setForEach.call(obj, function (value) {
213
- setParts.push(inspect(value, obj));
214
- });
214
+ if (setForEach) {
215
+ setForEach.call(obj, function (value) {
216
+ setParts.push(inspect(value, obj));
217
+ });
218
+ }
215
219
  return collectionOf('Set', setSize.call(obj), setParts, indent);
216
220
  }
217
221
  if (isWeakMap(obj)) {
@@ -235,6 +239,14 @@ module.exports = function inspect_(obj, options, depth, seen) {
235
239
  if (isString(obj)) {
236
240
  return markBoxed(inspect(String(obj)));
237
241
  }
242
+ // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
243
+ /* eslint-env browser */
244
+ if (typeof window !== 'undefined' && obj === window) {
245
+ return '{ [object Window] }';
246
+ }
247
+ if (obj === global) {
248
+ return '{ [object globalThis] }';
249
+ }
238
250
  if (!isDate(obj) && !isRegExp(obj)) {
239
251
  var ys = arrObjKeys(obj, inspect);
240
252
  var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
@@ -1,34 +1,39 @@
1
1
  {
2
2
  "name": "object-inspect",
3
- "version": "1.12.2",
3
+ "version": "1.13.1",
4
4
  "description": "string representations of objects in node and the browser",
5
5
  "main": "index.js",
6
6
  "sideEffects": false,
7
7
  "devDependencies": {
8
- "@ljharb/eslint-config": "^21.0.0",
9
- "aud": "^2.0.0",
8
+ "@ljharb/eslint-config": "^21.1.0",
9
+ "@pkgjs/support": "^0.0.6",
10
10
  "auto-changelog": "^2.4.0",
11
11
  "core-js": "^2.6.12",
12
- "error-cause": "^1.0.4",
13
- "es-value-fixtures": "^1.4.1",
12
+ "error-cause": "^1.0.6",
13
+ "es-value-fixtures": "^1.4.2",
14
14
  "eslint": "=8.8.0",
15
15
  "for-each": "^0.3.3",
16
16
  "functions-have-names": "^1.2.3",
17
+ "glob": "=10.3.7",
18
+ "globalthis": "^1.0.3",
17
19
  "has-tostringtag": "^1.0.0",
20
+ "in-publish": "^2.0.1",
21
+ "jackspeak": "=2.1.1",
18
22
  "make-arrow-function": "^1.2.0",
19
- "mock-property": "^1.0.0",
23
+ "mock-property": "^1.0.2",
20
24
  "npmignore": "^0.3.0",
21
25
  "nyc": "^10.3.2",
22
26
  "safe-publish-latest": "^2.0.0",
23
27
  "string.prototype.repeat": "^1.0.0",
24
- "tape": "^5.5.3"
28
+ "tape": "^5.7.1"
25
29
  },
26
30
  "scripts": {
27
31
  "prepack": "npmignore --auto --commentLines=autogenerated",
28
32
  "prepublish": "not-in-publish || npm run prepublishOnly",
29
33
  "prepublishOnly": "safe-publish-latest",
30
34
  "pretest": "npm run lint",
31
- "lint": "eslint .",
35
+ "lint": "eslint --ext=js,mjs .",
36
+ "postlint": "npx @pkgjs/support validate",
32
37
  "test": "npm run tests-only && npm run test:corejs",
33
38
  "tests-only": "nyc tape 'test/*.js'",
34
39
  "test:corejs": "nyc tape test-core-js.js 'test/*.js'",
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var inspect = require('../');
4
+
5
+ var test = require('tape');
6
+ var globalThis = require('globalthis')();
7
+
8
+ test('global object', function (t) {
9
+ /* eslint-env browser */
10
+ var expected = typeof window === 'undefined' ? 'globalThis' : 'Window';
11
+ t.equal(
12
+ inspect([globalThis]),
13
+ '[ { [object ' + expected + '] } ]'
14
+ );
15
+
16
+ t.end();
17
+ });
@@ -1,3 +1,8 @@
1
+ 2.5.2 / 2023-02-21
2
+ ==================
3
+
4
+ * Fix error message for non-stream argument
5
+
1
6
  2.5.1 / 2022-02-28
2
7
  ==================
3
8
 
@@ -219,5 +219,5 @@ server.listen(3000);
219
219
  [coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master
220
220
  [downloads-image]: https://img.shields.io/npm/dm/raw-body.svg
221
221
  [downloads-url]: https://npmjs.org/package/raw-body
222
- [github-actions-ci-image]: https://img.shields.io/github/workflow/status/stream-utils/raw-body/ci/master?label=ci
222
+ [github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/stream-utils/raw-body/ci.yml?branch=master&label=ci
223
223
  [github-actions-ci-url]: https://github.com/jshttp/stream-utils/raw-body?query=workflow%3Aci
@@ -69,6 +69,13 @@ function getRawBody (stream, options, callback) {
69
69
  var done = callback
70
70
  var opts = options || {}
71
71
 
72
+ // light validation
73
+ if (stream === undefined) {
74
+ throw new TypeError('argument stream is required')
75
+ } else if (typeof stream !== 'object' || stream === null || typeof stream.on !== 'function') {
76
+ throw new TypeError('argument stream must be a stream')
77
+ }
78
+
72
79
  if (options === true || typeof options === 'string') {
73
80
  // short cut for encoding
74
81
  opts = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "raw-body",
3
3
  "description": "Get and validate the raw body of a readable stream.",
4
- "version": "2.5.1",
4
+ "version": "2.5.2",
5
5
  "author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
6
6
  "contributors": [
7
7
  "Douglas Christopher Wilson <doug@somethingdoug.com>",
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "bluebird": "3.7.2",
20
- "eslint": "7.32.0",
21
- "eslint-config-standard": "14.1.1",
22
- "eslint-plugin-import": "2.25.4",
23
- "eslint-plugin-markdown": "2.2.1",
20
+ "eslint": "8.34.0",
21
+ "eslint-config-standard": "15.0.1",
22
+ "eslint-plugin-import": "2.27.5",
23
+ "eslint-plugin-markdown": "3.0.0",
24
24
  "eslint-plugin-node": "11.1.0",
25
- "eslint-plugin-promise": "5.2.0",
25
+ "eslint-plugin-promise": "6.1.1",
26
26
  "eslint-plugin-standard": "4.1.0",
27
- "mocha": "9.2.1",
27
+ "mocha": "10.2.0",
28
28
  "nyc": "15.1.0",
29
29
  "readable-stream": "2.3.7",
30
30
  "safe-buffer": "5.2.1"
@@ -0,0 +1,27 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "rules": {
7
+ "id-length": "off",
8
+ "new-cap": ["error", {
9
+ "capIsNewExceptions": [
10
+ "GetIntrinsic"
11
+ ],
12
+ }],
13
+ "no-extra-parens": "off",
14
+ },
15
+
16
+ "overrides": [
17
+ {
18
+ "files": ["test/**/*.js"],
19
+ "rules": {
20
+ "id-length": "off",
21
+ "max-lines-per-function": "off",
22
+ "multiline-comment-style": "off",
23
+ "no-empty-function": "off",
24
+ },
25
+ },
26
+ ],
27
+ }
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [ljharb]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: npm/set-function-name
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with a single custom sponsorship URL
@@ -0,0 +1,13 @@
1
+ {
2
+ "all": true,
3
+ "check-coverage": false,
4
+ "reporter": ["text-summary", "text", "html", "json"],
5
+ "lines": 86,
6
+ "statements": 85.93,
7
+ "functions": 82.43,
8
+ "branches": 76.06,
9
+ "exclude": [
10
+ "coverage",
11
+ "test"
12
+ ]
13
+ }