node-red-contrib-web-worldmap 4.6.2 → 4.6.4
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 +2 -0
- package/README.md +3 -8
- package/node_modules/body-parser/HISTORY.md +8 -0
- package/node_modules/body-parser/README.md +11 -10
- package/node_modules/body-parser/lib/types/json.js +15 -4
- package/node_modules/body-parser/package.json +8 -8
- package/node_modules/call-bind/.eslintrc +0 -1
- package/node_modules/call-bind/.nycrc +0 -4
- package/node_modules/call-bind/CHANGELOG.md +51 -0
- package/node_modules/call-bind/README.md +63 -1
- package/node_modules/call-bind/index.js +11 -23
- package/node_modules/call-bind/package.json +38 -23
- package/node_modules/call-bind/test/callBound.js +0 -1
- package/node_modules/call-bind/test/index.js +18 -4
- package/node_modules/content-type/HISTORY.md +5 -0
- package/node_modules/content-type/README.md +21 -19
- package/node_modules/content-type/index.js +12 -9
- package/node_modules/content-type/package.json +13 -11
- package/node_modules/define-data-property/.eslintrc +24 -0
- package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
- package/node_modules/define-data-property/.nycrc +13 -0
- package/node_modules/define-data-property/CHANGELOG.md +70 -0
- package/node_modules/define-data-property/LICENSE +21 -0
- package/node_modules/define-data-property/README.md +67 -0
- package/node_modules/define-data-property/index.d.ts +12 -0
- package/node_modules/define-data-property/index.js +56 -0
- package/node_modules/define-data-property/package.json +106 -0
- package/node_modules/define-data-property/test/index.js +392 -0
- package/node_modules/define-data-property/tsconfig.json +59 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +15 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +16 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +55 -0
- package/node_modules/es-define-property/tsconfig.json +50 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/express/History.md +14 -5
- package/node_modules/express/Readme.md +1 -1
- package/node_modules/express/lib/router/index.js +1 -1
- package/node_modules/express/lib/router/route.js +7 -2
- package/node_modules/express/lib/utils.js +3 -4
- package/node_modules/express/package.json +5 -6
- package/node_modules/function-bind/.eslintrc +11 -5
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/README.md +25 -27
- package/node_modules/function-bind/implementation.js +44 -12
- package/node_modules/function-bind/package.json +38 -14
- package/node_modules/get-intrinsic/.eslintrc +1 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +45 -0
- package/node_modules/get-intrinsic/index.js +41 -16
- package/node_modules/get-intrinsic/package.json +20 -18
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +1 -1
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +25 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/index.js +16 -0
- package/node_modules/gopd/package.json +71 -0
- package/node_modules/gopd/test/index.js +35 -0
- package/node_modules/has-property-descriptors/.eslintrc +13 -0
- package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
- package/node_modules/has-property-descriptors/.nycrc +9 -0
- package/node_modules/has-property-descriptors/CHANGELOG.md +35 -0
- package/node_modules/has-property-descriptors/LICENSE +21 -0
- package/node_modules/has-property-descriptors/README.md +43 -0
- package/node_modules/has-property-descriptors/index.js +22 -0
- package/node_modules/has-property-descriptors/package.json +77 -0
- package/node_modules/has-property-descriptors/test/index.js +57 -0
- package/node_modules/has-proto/.eslintrc +5 -0
- package/node_modules/has-proto/.github/FUNDING.yml +12 -0
- package/node_modules/has-proto/CHANGELOG.md +38 -0
- package/node_modules/has-proto/LICENSE +21 -0
- package/node_modules/has-proto/README.md +38 -0
- package/node_modules/has-proto/index.d.ts +3 -0
- package/node_modules/has-proto/index.js +15 -0
- package/node_modules/has-proto/package.json +78 -0
- package/node_modules/has-proto/test/index.js +19 -0
- package/node_modules/has-proto/tsconfig.json +49 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +40 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/http-parser-js/README.md +43 -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 +12 -7
- package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/package.json +4 -2
- package/node_modules/object-inspect/CHANGELOG.md +29 -0
- package/node_modules/object-inspect/index.js +18 -6
- package/node_modules/object-inspect/package.json +13 -8
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/raw-body/HISTORY.md +5 -0
- package/node_modules/raw-body/README.md +1 -1
- package/node_modules/raw-body/index.js +7 -0
- package/node_modules/raw-body/package.json +7 -7
- package/node_modules/set-function-length/.eslintrc +27 -0
- package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
- package/node_modules/set-function-length/.nycrc +13 -0
- package/node_modules/set-function-length/CHANGELOG.md +70 -0
- package/node_modules/set-function-length/LICENSE +21 -0
- package/node_modules/set-function-length/README.md +56 -0
- package/node_modules/set-function-length/env.d.ts +9 -0
- package/node_modules/set-function-length/env.js +25 -0
- package/node_modules/set-function-length/index.d.ts +7 -0
- package/node_modules/set-function-length/index.js +42 -0
- package/node_modules/set-function-length/package.json +102 -0
- package/node_modules/set-function-length/tsconfig.json +9 -0
- package/node_modules/{function-bind → side-channel}/.editorconfig +3 -14
- package/node_modules/side-channel/.eslintrc +1 -1
- package/node_modules/side-channel/CHANGELOG.md +30 -0
- package/node_modules/side-channel/index.d.ts +27 -0
- package/node_modules/side-channel/index.js +25 -20
- package/node_modules/side-channel/package.json +36 -19
- package/node_modules/side-channel/test/index.js +6 -1
- package/node_modules/side-channel/tsconfig.json +50 -0
- package/package.json +1 -1
- package/worldmap/index.html +2 -2
- package/worldmap/leaflet/milsymbol.js +6 -6
- package/worldmap/worldmap.js +4 -0
- package/worldmap.js +32 -4
- package/node_modules/function-bind/.jscs.json +0 -176
- package/node_modules/function-bind/.npmignore +0 -22
- package/node_modules/function-bind/.travis.yml +0 -168
- package/node_modules/has/LICENSE-MIT +0 -22
- package/node_modules/has/README.md +0 -18
- package/node_modules/has/package.json +0 -48
- package/node_modules/has/src/index.js +0 -5
- package/node_modules/has/test/index.js +0 -10
- package/node_modules/side-channel/.eslintignore +0 -1
- 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
- package/worldmap/ml3d.html +0 -3377
- /package/node_modules/{compression/node_modules/bytes → bytes}/History.md +0 -0
- /package/node_modules/{compression/node_modules/bytes → bytes}/LICENSE +0 -0
- /package/node_modules/{compression/node_modules/bytes → bytes}/Readme.md +0 -0
- /package/node_modules/{compression/node_modules/bytes → bytes}/index.js +0 -0
- /package/node_modules/{compression/node_modules/bytes → bytes}/package.json +0 -0
- /package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/LICENSE.md +0 -0
package/worldmap/worldmap.js
CHANGED
|
@@ -545,13 +545,16 @@ function doTidyUp(l) {
|
|
|
545
545
|
if (typeof polygons[m+"_"] != "undefined") {
|
|
546
546
|
layers[polygons[m+"_"].lay].removeLayer(polygons[m+"_"]);
|
|
547
547
|
delete polygons[m+"_"];
|
|
548
|
+
delete allData[m+"_"];
|
|
548
549
|
}
|
|
549
550
|
if (typeof polygons[m] != "undefined") {
|
|
550
551
|
layers[markers[m].lay].removeLayer(polygons[m]);
|
|
551
552
|
delete polygons[m];
|
|
553
|
+
delete allData[m];
|
|
552
554
|
}
|
|
553
555
|
layers[markers[m].lay].removeLayer(markers[m]);
|
|
554
556
|
delete markers[m];
|
|
557
|
+
delete allData[m];
|
|
555
558
|
}
|
|
556
559
|
}
|
|
557
560
|
}
|
|
@@ -2645,6 +2648,7 @@ function doCommand(cmd) {
|
|
|
2645
2648
|
for (var a=0; a < cmd.map.delete.length; a++) {
|
|
2646
2649
|
if (basemaps.hasOwnProperty(cmd.map.delete[a])) { delete basemaps[cmd.map.delete[a]]; }
|
|
2647
2650
|
if (overlays.hasOwnProperty(cmd.map.delete[a])) { delete overlays[cmd.map.delete[a]]; }
|
|
2651
|
+
doTidyUp(cmd.map.delete[a]);
|
|
2648
2652
|
}
|
|
2649
2653
|
if (showLayerMenu) {
|
|
2650
2654
|
map.removeControl(layercontrol);
|
package/worldmap.js
CHANGED
|
@@ -200,6 +200,21 @@ module.exports = function(RED) {
|
|
|
200
200
|
if (msg.payload.ttl && msg.payload.ttl < t) { t = msg.payload.ttl; }
|
|
201
201
|
allPoints[msg.payload.name].tout = setTimeout( function() { delete allPoints[msg.payload.name] }, t * 1000 );
|
|
202
202
|
}
|
|
203
|
+
|
|
204
|
+
if (msg?.payload?.command?.map?.delete) {
|
|
205
|
+
var ddd = msg.payload.command.map.delete;
|
|
206
|
+
if (!Array.isArray(ddd)) { ddd = [cmd.map.delete]; }
|
|
207
|
+
for (let a=0; a < ddd.length; a++) {
|
|
208
|
+
for (let p in allPoints) {
|
|
209
|
+
if (allPoints.hasOwnProperty(p)) {
|
|
210
|
+
if (allPoints[p].layer === ddd[a]) {
|
|
211
|
+
delete allPoints[p];
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
203
218
|
});
|
|
204
219
|
node.on("close", function() {
|
|
205
220
|
for (var c in clients) {
|
|
@@ -306,7 +321,7 @@ module.exports = function(RED) {
|
|
|
306
321
|
var WorldMapIn = function(n) {
|
|
307
322
|
RED.nodes.createNode(this,n);
|
|
308
323
|
this.path = n.path || "/worldmap";
|
|
309
|
-
this.events = n.events || "connect,disconnect,point,bounds,files,draw,other";
|
|
324
|
+
this.events = n.events || "connect,disconnect,point,layer,bounds,files,draw,other";
|
|
310
325
|
if (this.path.charAt(0) != "/") { this.path = "/" + this.path; }
|
|
311
326
|
if (!sockets[this.path]) {
|
|
312
327
|
var libPath = path.posix.join(RED.settings.httpNodeRoot, this.path, 'leaflet', 'sockjs.min.js');
|
|
@@ -345,7 +360,7 @@ module.exports = function(RED) {
|
|
|
345
360
|
if ((node.events.indexOf("draw")!==-1) && ((message.action === "draw")||(message.action === "drawdelete"))) {
|
|
346
361
|
setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id, _sessionip:sessionip})});
|
|
347
362
|
}
|
|
348
|
-
if (node.events.indexOf("other")!==-1 && "connected,point,delete,move,draw,drawdelete,files,bounds".indexOf(message.action) === -1) {
|
|
363
|
+
if (node.events.indexOf("other")!==-1 && "connected,point,addlayer,dellayer,delete,move,draw,drawdelete,files,bounds".indexOf(message.action) === -1) {
|
|
349
364
|
setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id, _sessionip:sessionip})});
|
|
350
365
|
}
|
|
351
366
|
}
|
|
@@ -463,8 +478,21 @@ module.exports = function(RED) {
|
|
|
463
478
|
node.send(newmsg); // send the track
|
|
464
479
|
}
|
|
465
480
|
}
|
|
466
|
-
if (msg
|
|
467
|
-
|
|
481
|
+
if (msg?.payload?.command?.map?.delete) {
|
|
482
|
+
var ddd = msg.payload.command.map.delete;
|
|
483
|
+
if (!Array.isArray(ddd)) { ddd = [cmd.map.delete]; }
|
|
484
|
+
for (let a=0; a < ddd.length; a++) {
|
|
485
|
+
for (let p in node.pointsarray) {
|
|
486
|
+
if (node.pointsarray.hasOwnProperty(p)) {
|
|
487
|
+
if (node.pointsarray[p][0].layer === ddd[a]) {
|
|
488
|
+
delete node.pointsarray[p];
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
if (msg?.payload?.command?.clear) {
|
|
495
|
+
for (let p in node.pointsarray) {
|
|
468
496
|
if (node.pointsarray.hasOwnProperty(p)) {
|
|
469
497
|
if (node.pointsarray[p][0].layer === msg.payload.command.clear) {
|
|
470
498
|
delete node.pointsarray[p];
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"es3": true,
|
|
3
|
-
|
|
4
|
-
"additionalRules": [],
|
|
5
|
-
|
|
6
|
-
"requireSemicolons": true,
|
|
7
|
-
|
|
8
|
-
"disallowMultipleSpaces": true,
|
|
9
|
-
|
|
10
|
-
"disallowIdentifierNames": [],
|
|
11
|
-
|
|
12
|
-
"requireCurlyBraces": {
|
|
13
|
-
"allExcept": [],
|
|
14
|
-
"keywords": ["if", "else", "for", "while", "do", "try", "catch"]
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
|
|
18
|
-
|
|
19
|
-
"disallowSpaceAfterKeywords": [],
|
|
20
|
-
|
|
21
|
-
"disallowSpaceBeforeComma": true,
|
|
22
|
-
"disallowSpaceAfterComma": false,
|
|
23
|
-
"disallowSpaceBeforeSemicolon": true,
|
|
24
|
-
|
|
25
|
-
"disallowNodeTypes": [
|
|
26
|
-
"DebuggerStatement",
|
|
27
|
-
"ForInStatement",
|
|
28
|
-
"LabeledStatement",
|
|
29
|
-
"SwitchCase",
|
|
30
|
-
"SwitchStatement",
|
|
31
|
-
"WithStatement"
|
|
32
|
-
],
|
|
33
|
-
|
|
34
|
-
"requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
|
|
35
|
-
|
|
36
|
-
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
|
|
37
|
-
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
|
|
38
|
-
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
|
|
39
|
-
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
|
|
40
|
-
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
|
|
41
|
-
|
|
42
|
-
"requireSpaceBetweenArguments": true,
|
|
43
|
-
|
|
44
|
-
"disallowSpacesInsideParentheses": true,
|
|
45
|
-
|
|
46
|
-
"disallowSpacesInsideArrayBrackets": true,
|
|
47
|
-
|
|
48
|
-
"disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
|
|
49
|
-
|
|
50
|
-
"disallowSpaceAfterObjectKeys": true,
|
|
51
|
-
|
|
52
|
-
"requireCommaBeforeLineBreak": true,
|
|
53
|
-
|
|
54
|
-
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
|
|
55
|
-
"requireSpaceAfterPrefixUnaryOperators": [],
|
|
56
|
-
|
|
57
|
-
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
|
58
|
-
"requireSpaceBeforePostfixUnaryOperators": [],
|
|
59
|
-
|
|
60
|
-
"disallowSpaceBeforeBinaryOperators": [],
|
|
61
|
-
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
|
|
62
|
-
|
|
63
|
-
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
|
|
64
|
-
"disallowSpaceAfterBinaryOperators": [],
|
|
65
|
-
|
|
66
|
-
"disallowImplicitTypeConversion": ["binary", "string"],
|
|
67
|
-
|
|
68
|
-
"disallowKeywords": ["with", "eval"],
|
|
69
|
-
|
|
70
|
-
"requireKeywordsOnNewLine": [],
|
|
71
|
-
"disallowKeywordsOnNewLine": ["else"],
|
|
72
|
-
|
|
73
|
-
"requireLineFeedAtFileEnd": true,
|
|
74
|
-
|
|
75
|
-
"disallowTrailingWhitespace": true,
|
|
76
|
-
|
|
77
|
-
"disallowTrailingComma": true,
|
|
78
|
-
|
|
79
|
-
"excludeFiles": ["node_modules/**", "vendor/**"],
|
|
80
|
-
|
|
81
|
-
"disallowMultipleLineStrings": true,
|
|
82
|
-
|
|
83
|
-
"requireDotNotation": { "allExcept": ["keywords"] },
|
|
84
|
-
|
|
85
|
-
"requireParenthesesAroundIIFE": true,
|
|
86
|
-
|
|
87
|
-
"validateLineBreaks": "LF",
|
|
88
|
-
|
|
89
|
-
"validateQuoteMarks": {
|
|
90
|
-
"escape": true,
|
|
91
|
-
"mark": "'"
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
"disallowOperatorBeforeLineBreak": [],
|
|
95
|
-
|
|
96
|
-
"requireSpaceBeforeKeywords": [
|
|
97
|
-
"do",
|
|
98
|
-
"for",
|
|
99
|
-
"if",
|
|
100
|
-
"else",
|
|
101
|
-
"switch",
|
|
102
|
-
"case",
|
|
103
|
-
"try",
|
|
104
|
-
"catch",
|
|
105
|
-
"finally",
|
|
106
|
-
"while",
|
|
107
|
-
"with",
|
|
108
|
-
"return"
|
|
109
|
-
],
|
|
110
|
-
|
|
111
|
-
"validateAlignedFunctionParameters": {
|
|
112
|
-
"lineBreakAfterOpeningBraces": true,
|
|
113
|
-
"lineBreakBeforeClosingBraces": true
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
"requirePaddingNewLinesBeforeExport": true,
|
|
117
|
-
|
|
118
|
-
"validateNewlineAfterArrayElements": {
|
|
119
|
-
"maximum": 8
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
"requirePaddingNewLinesAfterUseStrict": true,
|
|
123
|
-
|
|
124
|
-
"disallowArrowFunctions": true,
|
|
125
|
-
|
|
126
|
-
"disallowMultiLineTernary": true,
|
|
127
|
-
|
|
128
|
-
"validateOrderInObjectKeys": "asc-insensitive",
|
|
129
|
-
|
|
130
|
-
"disallowIdenticalDestructuringNames": true,
|
|
131
|
-
|
|
132
|
-
"disallowNestedTernaries": { "maxLevel": 1 },
|
|
133
|
-
|
|
134
|
-
"requireSpaceAfterComma": { "allExcept": ["trailing"] },
|
|
135
|
-
"requireAlignedMultilineParams": false,
|
|
136
|
-
|
|
137
|
-
"requireSpacesInGenerator": {
|
|
138
|
-
"afterStar": true
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
"disallowSpacesInGenerator": {
|
|
142
|
-
"beforeStar": true
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
"disallowVar": false,
|
|
146
|
-
|
|
147
|
-
"requireArrayDestructuring": false,
|
|
148
|
-
|
|
149
|
-
"requireEnhancedObjectLiterals": false,
|
|
150
|
-
|
|
151
|
-
"requireObjectDestructuring": false,
|
|
152
|
-
|
|
153
|
-
"requireEarlyReturn": false,
|
|
154
|
-
|
|
155
|
-
"requireCapitalizedConstructorsNew": {
|
|
156
|
-
"allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
"requireImportAlphabetized": false,
|
|
160
|
-
|
|
161
|
-
"requireSpaceBeforeObjectValues": true,
|
|
162
|
-
"requireSpaceBeforeDestructuredValues": true,
|
|
163
|
-
|
|
164
|
-
"disallowSpacesInsideTemplateStringPlaceholders": true,
|
|
165
|
-
|
|
166
|
-
"disallowArrayDestructuringReturn": false,
|
|
167
|
-
|
|
168
|
-
"requireNewlineBeforeSingleStatementsInIf": false,
|
|
169
|
-
|
|
170
|
-
"disallowUnusedVariables": true,
|
|
171
|
-
|
|
172
|
-
"requireSpacesInsideImportedObjectBraces": true,
|
|
173
|
-
|
|
174
|
-
"requireUseStrict": true
|
|
175
|
-
}
|
|
176
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# gitignore
|
|
2
|
-
.DS_Store
|
|
3
|
-
.monitor
|
|
4
|
-
.*.swp
|
|
5
|
-
.nodemonignore
|
|
6
|
-
releases
|
|
7
|
-
*.log
|
|
8
|
-
*.err
|
|
9
|
-
fleet.json
|
|
10
|
-
public/browserify
|
|
11
|
-
bin/*.json
|
|
12
|
-
.bin
|
|
13
|
-
build
|
|
14
|
-
compile
|
|
15
|
-
.lock-wscript
|
|
16
|
-
coverage
|
|
17
|
-
node_modules
|
|
18
|
-
|
|
19
|
-
# Only apps should have lockfiles
|
|
20
|
-
npm-shrinkwrap.json
|
|
21
|
-
package-lock.json
|
|
22
|
-
yarn.lock
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
language: node_js
|
|
2
|
-
os:
|
|
3
|
-
- linux
|
|
4
|
-
node_js:
|
|
5
|
-
- "8.4"
|
|
6
|
-
- "7.10"
|
|
7
|
-
- "6.11"
|
|
8
|
-
- "5.12"
|
|
9
|
-
- "4.8"
|
|
10
|
-
- "iojs-v3.3"
|
|
11
|
-
- "iojs-v2.5"
|
|
12
|
-
- "iojs-v1.8"
|
|
13
|
-
- "0.12"
|
|
14
|
-
- "0.10"
|
|
15
|
-
- "0.8"
|
|
16
|
-
before_install:
|
|
17
|
-
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
|
|
18
|
-
- 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi'
|
|
19
|
-
install:
|
|
20
|
-
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
|
|
21
|
-
script:
|
|
22
|
-
- 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi'
|
|
23
|
-
- 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi'
|
|
24
|
-
- 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
|
|
25
|
-
- 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
|
|
26
|
-
sudo: false
|
|
27
|
-
env:
|
|
28
|
-
- TEST=true
|
|
29
|
-
matrix:
|
|
30
|
-
fast_finish: true
|
|
31
|
-
include:
|
|
32
|
-
- node_js: "node"
|
|
33
|
-
env: PRETEST=true
|
|
34
|
-
- node_js: "4"
|
|
35
|
-
env: COVERAGE=true
|
|
36
|
-
- node_js: "8.3"
|
|
37
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
38
|
-
- node_js: "8.2"
|
|
39
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
40
|
-
- node_js: "8.1"
|
|
41
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
42
|
-
- node_js: "8.0"
|
|
43
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
44
|
-
- node_js: "7.9"
|
|
45
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
46
|
-
- node_js: "7.8"
|
|
47
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
48
|
-
- node_js: "7.7"
|
|
49
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
50
|
-
- node_js: "7.6"
|
|
51
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
52
|
-
- node_js: "7.5"
|
|
53
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
54
|
-
- node_js: "7.4"
|
|
55
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
56
|
-
- node_js: "7.3"
|
|
57
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
58
|
-
- node_js: "7.2"
|
|
59
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
60
|
-
- node_js: "7.1"
|
|
61
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
62
|
-
- node_js: "7.0"
|
|
63
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
64
|
-
- node_js: "6.10"
|
|
65
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
66
|
-
- node_js: "6.9"
|
|
67
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
68
|
-
- node_js: "6.8"
|
|
69
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
70
|
-
- node_js: "6.7"
|
|
71
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
72
|
-
- node_js: "6.6"
|
|
73
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
74
|
-
- node_js: "6.5"
|
|
75
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
76
|
-
- node_js: "6.4"
|
|
77
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
78
|
-
- node_js: "6.3"
|
|
79
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
80
|
-
- node_js: "6.2"
|
|
81
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
82
|
-
- node_js: "6.1"
|
|
83
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
84
|
-
- node_js: "6.0"
|
|
85
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
86
|
-
- node_js: "5.11"
|
|
87
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
88
|
-
- node_js: "5.10"
|
|
89
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
90
|
-
- node_js: "5.9"
|
|
91
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
92
|
-
- node_js: "5.8"
|
|
93
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
94
|
-
- node_js: "5.7"
|
|
95
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
96
|
-
- node_js: "5.6"
|
|
97
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
98
|
-
- node_js: "5.5"
|
|
99
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
100
|
-
- node_js: "5.4"
|
|
101
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
102
|
-
- node_js: "5.3"
|
|
103
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
104
|
-
- node_js: "5.2"
|
|
105
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
106
|
-
- node_js: "5.1"
|
|
107
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
108
|
-
- node_js: "5.0"
|
|
109
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
110
|
-
- node_js: "4.7"
|
|
111
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
112
|
-
- node_js: "4.6"
|
|
113
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
114
|
-
- node_js: "4.5"
|
|
115
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
116
|
-
- node_js: "4.4"
|
|
117
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
118
|
-
- node_js: "4.3"
|
|
119
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
120
|
-
- node_js: "4.2"
|
|
121
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
122
|
-
- node_js: "4.1"
|
|
123
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
124
|
-
- node_js: "4.0"
|
|
125
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
126
|
-
- node_js: "iojs-v3.2"
|
|
127
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
128
|
-
- node_js: "iojs-v3.1"
|
|
129
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
130
|
-
- node_js: "iojs-v3.0"
|
|
131
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
132
|
-
- node_js: "iojs-v2.4"
|
|
133
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
134
|
-
- node_js: "iojs-v2.3"
|
|
135
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
136
|
-
- node_js: "iojs-v2.2"
|
|
137
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
138
|
-
- node_js: "iojs-v2.1"
|
|
139
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
140
|
-
- node_js: "iojs-v2.0"
|
|
141
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
142
|
-
- node_js: "iojs-v1.7"
|
|
143
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
144
|
-
- node_js: "iojs-v1.6"
|
|
145
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
146
|
-
- node_js: "iojs-v1.5"
|
|
147
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
148
|
-
- node_js: "iojs-v1.4"
|
|
149
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
150
|
-
- node_js: "iojs-v1.3"
|
|
151
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
152
|
-
- node_js: "iojs-v1.2"
|
|
153
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
154
|
-
- node_js: "iojs-v1.1"
|
|
155
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
156
|
-
- node_js: "iojs-v1.0"
|
|
157
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
158
|
-
- node_js: "0.11"
|
|
159
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
160
|
-
- node_js: "0.9"
|
|
161
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
162
|
-
- node_js: "0.6"
|
|
163
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
164
|
-
- node_js: "0.4"
|
|
165
|
-
env: TEST=true ALLOW_FAILURE=true
|
|
166
|
-
allow_failures:
|
|
167
|
-
- os: osx
|
|
168
|
-
- env: TEST=true ALLOW_FAILURE=true
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2013 Thiago de Arruda
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person
|
|
4
|
-
obtaining a copy of this software and associated documentation
|
|
5
|
-
files (the "Software"), to deal in the Software without
|
|
6
|
-
restriction, including without limitation the rights to use,
|
|
7
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
copies of the Software, and to permit persons to whom the
|
|
9
|
-
Software is furnished to do so, subject to the following
|
|
10
|
-
conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be
|
|
13
|
-
included in all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
17
|
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
19
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# has
|
|
2
|
-
|
|
3
|
-
> Object.prototype.hasOwnProperty.call shortcut
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
npm install --save has
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
var has = require('has');
|
|
15
|
-
|
|
16
|
-
has({}, 'hasOwnProperty'); // false
|
|
17
|
-
has(Object.prototype, 'hasOwnProperty'); // true
|
|
18
|
-
```
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "has",
|
|
3
|
-
"description": "Object.prototype.hasOwnProperty.call shortcut",
|
|
4
|
-
"version": "1.0.3",
|
|
5
|
-
"homepage": "https://github.com/tarruda/has",
|
|
6
|
-
"author": {
|
|
7
|
-
"name": "Thiago de Arruda",
|
|
8
|
-
"email": "tpadilha84@gmail.com"
|
|
9
|
-
},
|
|
10
|
-
"contributors": [
|
|
11
|
-
{
|
|
12
|
-
"name": "Jordan Harband",
|
|
13
|
-
"email": "ljharb@gmail.com",
|
|
14
|
-
"url": "http://ljharb.codes"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git://github.com/tarruda/has.git"
|
|
20
|
-
},
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/tarruda/has/issues"
|
|
23
|
-
},
|
|
24
|
-
"license": "MIT",
|
|
25
|
-
"licenses": [
|
|
26
|
-
{
|
|
27
|
-
"type": "MIT",
|
|
28
|
-
"url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"main": "./src",
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"function-bind": "^1.1.1"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@ljharb/eslint-config": "^12.2.1",
|
|
37
|
-
"eslint": "^4.19.1",
|
|
38
|
-
"tape": "^4.9.0"
|
|
39
|
-
},
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">= 0.4.0"
|
|
42
|
-
},
|
|
43
|
-
"scripts": {
|
|
44
|
-
"lint": "eslint .",
|
|
45
|
-
"pretest": "npm run lint",
|
|
46
|
-
"test": "tape test"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('tape');
|
|
4
|
-
var has = require('../');
|
|
5
|
-
|
|
6
|
-
test('has', function (t) {
|
|
7
|
-
t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"');
|
|
8
|
-
t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"');
|
|
9
|
-
t.end();
|
|
10
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
coverage/
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# HTTP Parser
|
|
2
|
-
|
|
3
|
-
## 0.4.4
|
|
4
|
-
|
|
5
|
-
Made 'maxHeaderSize' configurable.
|
|
6
|
-
|
|
7
|
-
```js
|
|
8
|
-
// Monkey patch before you require http for the first time.
|
|
9
|
-
process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser;
|
|
10
|
-
require('http-parser-js').HTTPParser.maxHeaderSize = 1024 * 1024; // 1MB instead of 80kb
|
|
11
|
-
|
|
12
|
-
var http = require('http');
|
|
13
|
-
// ...
|
|
14
|
-
```
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# HTTP Parser
|
|
2
|
-
|
|
3
|
-
This library parses HTTP protocol for requests and responses. It was created to replace `http_parser.c` since calling C++ function from JS is really slow in V8. 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.
|
|
4
|
-
|
|
5
|
-
This is packaged as a standalone npm module. To use in node, monkeypatch HTTPParser.
|
|
6
|
-
|
|
7
|
-
```js
|
|
8
|
-
// Monkey patch before you require http for the first time.
|
|
9
|
-
process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser;
|
|
10
|
-
|
|
11
|
-
var http = require('http');
|
|
12
|
-
// ...
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Testing
|
|
16
|
-
|
|
17
|
-
Simply do `npm test`. The tests are copied from node and mscedex/io.js, with some modifcations.
|
|
18
|
-
|
|
19
|
-
## Status
|
|
20
|
-
|
|
21
|
-
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.
|
|
22
|
-
|
|
23
|
-
### Node Versions
|
|
24
|
-
|
|
25
|
-
`http-parser-js` should work via monkey-patching on Node v6-v11, and v13.
|
|
26
|
-
|
|
27
|
-
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.
|
|
28
|
-
|
|
29
|
-
## License
|
|
30
|
-
|
|
31
|
-
MIT. See LICENSE.md
|