@contrast/agent 4.5.2 → 4.6.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.
Files changed (121) hide show
  1. package/lib/assess/policy/propagators.json +20 -0
  2. package/lib/assess/policy/signatures.json +10 -0
  3. package/lib/core/config/options.js +3 -2
  4. package/lib/core/stacktrace.js +2 -1
  5. package/lib/hooks/frameworks/base.js +8 -2
  6. package/lib/hooks/frameworks/http.js +23 -16
  7. package/lib/hooks/frameworks/http2.js +73 -0
  8. package/lib/hooks/frameworks/index.js +8 -3
  9. package/lib/hooks/http.js +112 -128
  10. package/lib/hooks/require.js +16 -22
  11. package/lib/instrumentation.js +0 -3
  12. package/package.json +12 -15
  13. package/lib/hooks/frameworks/https.js +0 -42
  14. package/node_modules/bindings/LICENSE.md +0 -22
  15. package/node_modules/bindings/README.md +0 -98
  16. package/node_modules/bindings/bindings.js +0 -221
  17. package/node_modules/bindings/package.json +0 -32
  18. package/node_modules/file-uri-to-path/.npmignore +0 -1
  19. package/node_modules/file-uri-to-path/.travis.yml +0 -30
  20. package/node_modules/file-uri-to-path/History.md +0 -21
  21. package/node_modules/file-uri-to-path/LICENSE +0 -20
  22. package/node_modules/file-uri-to-path/README.md +0 -74
  23. package/node_modules/file-uri-to-path/index.d.ts +0 -2
  24. package/node_modules/file-uri-to-path/index.js +0 -66
  25. package/node_modules/file-uri-to-path/package.json +0 -36
  26. package/node_modules/file-uri-to-path/test/test.js +0 -24
  27. package/node_modules/file-uri-to-path/test/tests.json +0 -13
  28. package/node_modules/glossy/LICENSE +0 -19
  29. package/node_modules/glossy/README.md +0 -129
  30. package/node_modules/glossy/index.js +0 -12
  31. package/node_modules/glossy/lib/glossy/parse.js +0 -520
  32. package/node_modules/glossy/lib/glossy/produce.js +0 -459
  33. package/node_modules/glossy/package.json +0 -47
  34. package/node_modules/glossy/test/decide.js +0 -7
  35. package/node_modules/glossy/test/decode_pri.js +0 -24
  36. package/node_modules/glossy/test/parse_3164.js +0 -104
  37. package/node_modules/glossy/test/parse_5424.js +0 -106
  38. package/node_modules/glossy/test/parse_5848.js +0 -40
  39. package/node_modules/glossy/test/parse_8601.js +0 -14
  40. package/node_modules/glossy/test/parse_rfc3339.js +0 -9
  41. package/node_modules/glossy/test/produce.js +0 -162
  42. package/node_modules/glossy/test/runner.js +0 -40
  43. package/node_modules/glossy/test/structure_data.js +0 -24
  44. package/node_modules/nan/CHANGELOG.md +0 -537
  45. package/node_modules/nan/LICENSE.md +0 -13
  46. package/node_modules/nan/README.md +0 -455
  47. package/node_modules/nan/doc/asyncworker.md +0 -146
  48. package/node_modules/nan/doc/buffers.md +0 -54
  49. package/node_modules/nan/doc/callback.md +0 -76
  50. package/node_modules/nan/doc/converters.md +0 -41
  51. package/node_modules/nan/doc/errors.md +0 -226
  52. package/node_modules/nan/doc/json.md +0 -62
  53. package/node_modules/nan/doc/maybe_types.md +0 -583
  54. package/node_modules/nan/doc/methods.md +0 -664
  55. package/node_modules/nan/doc/new.md +0 -147
  56. package/node_modules/nan/doc/node_misc.md +0 -123
  57. package/node_modules/nan/doc/object_wrappers.md +0 -263
  58. package/node_modules/nan/doc/persistent.md +0 -296
  59. package/node_modules/nan/doc/scopes.md +0 -73
  60. package/node_modules/nan/doc/script.md +0 -38
  61. package/node_modules/nan/doc/string_bytes.md +0 -62
  62. package/node_modules/nan/doc/v8_internals.md +0 -199
  63. package/node_modules/nan/doc/v8_misc.md +0 -85
  64. package/node_modules/nan/include_dirs.js +0 -1
  65. package/node_modules/nan/nan.h +0 -2898
  66. package/node_modules/nan/nan_callbacks.h +0 -88
  67. package/node_modules/nan/nan_callbacks_12_inl.h +0 -514
  68. package/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -520
  69. package/node_modules/nan/nan_converters.h +0 -72
  70. package/node_modules/nan/nan_converters_43_inl.h +0 -68
  71. package/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
  72. package/node_modules/nan/nan_define_own_property_helper.h +0 -29
  73. package/node_modules/nan/nan_implementation_12_inl.h +0 -430
  74. package/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
  75. package/node_modules/nan/nan_json.h +0 -166
  76. package/node_modules/nan/nan_maybe_43_inl.h +0 -356
  77. package/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
  78. package/node_modules/nan/nan_new.h +0 -340
  79. package/node_modules/nan/nan_object_wrap.h +0 -156
  80. package/node_modules/nan/nan_persistent_12_inl.h +0 -132
  81. package/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
  82. package/node_modules/nan/nan_private.h +0 -73
  83. package/node_modules/nan/nan_string_bytes.h +0 -305
  84. package/node_modules/nan/nan_typedarray_contents.h +0 -96
  85. package/node_modules/nan/nan_weak.h +0 -437
  86. package/node_modules/nan/package.json +0 -41
  87. package/node_modules/nan/tools/1to2.js +0 -412
  88. package/node_modules/nan/tools/README.md +0 -14
  89. package/node_modules/nan/tools/package.json +0 -19
  90. package/node_modules/unix-dgram/LICENSE +0 -13
  91. package/node_modules/unix-dgram/README.md +0 -107
  92. package/node_modules/unix-dgram/binding.gyp +0 -20
  93. package/node_modules/unix-dgram/build/Makefile +0 -324
  94. package/node_modules/unix-dgram/build/Release/.deps/Release/obj.target/unix_dgram/src/unix_dgram.o.d +0 -58
  95. package/node_modules/unix-dgram/build/Release/.deps/Release/obj.target/unix_dgram.node.d +0 -1
  96. package/node_modules/unix-dgram/build/Release/.deps/Release/unix_dgram.node.d +0 -1
  97. package/node_modules/unix-dgram/build/Release/obj.target/unix_dgram/src/unix_dgram.o +0 -0
  98. package/node_modules/unix-dgram/build/Release/obj.target/unix_dgram.node +0 -0
  99. package/node_modules/unix-dgram/build/Release/unix_dgram.node +0 -0
  100. package/node_modules/unix-dgram/build/binding.Makefile +0 -6
  101. package/node_modules/unix-dgram/build/config.gypi +0 -213
  102. package/node_modules/unix-dgram/build/unix_dgram.target.mk +0 -159
  103. package/node_modules/unix-dgram/lib/unix_dgram.js +0 -168
  104. package/node_modules/unix-dgram/package.json +0 -36
  105. package/node_modules/unix-dgram/src/unix_dgram.cc +0 -404
  106. package/node_modules/unix-dgram/src/win_dummy.cc +0 -7
  107. package/node_modules/unix-dgram/test/test-connect-callback.js +0 -68
  108. package/node_modules/unix-dgram/test/test-connect.js +0 -53
  109. package/node_modules/unix-dgram/test/test-dgram-unix.js +0 -58
  110. package/node_modules/unix-dgram/test/test-send-error.js +0 -26
  111. package/node_modules/winston-syslog/.eslintrc +0 -7
  112. package/node_modules/winston-syslog/.travis.yml +0 -14
  113. package/node_modules/winston-syslog/CHANGELOG.md +0 -9
  114. package/node_modules/winston-syslog/LICENSE +0 -20
  115. package/node_modules/winston-syslog/README.md +0 -135
  116. package/node_modules/winston-syslog/lib/utils.js +0 -26
  117. package/node_modules/winston-syslog/lib/winston-syslog.js +0 -385
  118. package/node_modules/winston-syslog/package.json +0 -56
  119. package/node_modules/winston-syslog/test/format-test.js +0 -122
  120. package/node_modules/winston-syslog/test/syslog-test.js +0 -95
  121. package/node_modules/winston-syslog/test/unix-connect-test.js +0 -133
@@ -1,66 +0,0 @@
1
-
2
- /**
3
- * Module dependencies.
4
- */
5
-
6
- var sep = require('path').sep || '/';
7
-
8
- /**
9
- * Module exports.
10
- */
11
-
12
- module.exports = fileUriToPath;
13
-
14
- /**
15
- * File URI to Path function.
16
- *
17
- * @param {String} uri
18
- * @return {String} path
19
- * @api public
20
- */
21
-
22
- function fileUriToPath (uri) {
23
- if ('string' != typeof uri ||
24
- uri.length <= 7 ||
25
- 'file://' != uri.substring(0, 7)) {
26
- throw new TypeError('must pass in a file:// URI to convert to a file path');
27
- }
28
-
29
- var rest = decodeURI(uri.substring(7));
30
- var firstSlash = rest.indexOf('/');
31
- var host = rest.substring(0, firstSlash);
32
- var path = rest.substring(firstSlash + 1);
33
-
34
- // 2. Scheme Definition
35
- // As a special case, <host> can be the string "localhost" or the empty
36
- // string; this is interpreted as "the machine from which the URL is
37
- // being interpreted".
38
- if ('localhost' == host) host = '';
39
-
40
- if (host) {
41
- host = sep + sep + host;
42
- }
43
-
44
- // 3.2 Drives, drive letters, mount points, file system root
45
- // Drive letters are mapped into the top of a file URI in various ways,
46
- // depending on the implementation; some applications substitute
47
- // vertical bar ("|") for the colon after the drive letter, yielding
48
- // "file:///c|/tmp/test.txt". In some cases, the colon is left
49
- // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
50
- // colon is simply omitted, as in "file:///c/tmp/test.txt".
51
- path = path.replace(/^(.+)\|/, '$1:');
52
-
53
- // for Windows, we need to invert the path separators from what a URI uses
54
- if (sep == '\\') {
55
- path = path.replace(/\//g, '\\');
56
- }
57
-
58
- if (/^.+\:/.test(path)) {
59
- // has Windows drive at beginning of path
60
- } else {
61
- // unix path…
62
- path = sep + path;
63
- }
64
-
65
- return host + path;
66
- }
@@ -1,36 +0,0 @@
1
- {
2
- "name": "file-uri-to-path",
3
- "version": "1.0.0",
4
- "description": "Convert a file: URI to a file path",
5
- "main": "index.js",
6
- "types": "index.d.ts",
7
- "directories": {
8
- "test": "test"
9
- },
10
- "scripts": {
11
- "test": "mocha --reporter spec"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git://github.com/TooTallNate/file-uri-to-path.git"
16
- },
17
- "keywords": [
18
- "file",
19
- "uri",
20
- "convert",
21
- "path"
22
- ],
23
- "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
24
- "license": "MIT",
25
- "bugs": {
26
- "url": "https://github.com/TooTallNate/file-uri-to-path/issues"
27
- },
28
- "homepage": "https://github.com/TooTallNate/file-uri-to-path",
29
- "devDependencies": {
30
- "mocha": "3"
31
- }
32
-
33
- ,"_resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz"
34
- ,"_integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
35
- ,"_from": "file-uri-to-path@1.0.0"
36
- }
@@ -1,24 +0,0 @@
1
-
2
- var sep = require('path').sep || '/';
3
- var assert = require('assert');
4
- var uri2path = require('../');
5
- var tests = require('./tests.json');
6
-
7
- describe('file-uri-to-path', function () {
8
-
9
- Object.keys(tests).forEach(function (uri) {
10
-
11
- // the test cases were generated from Windows' PathCreateFromUrlA() function.
12
- // On Unix, we have to replace the path separator with the Unix one instead of
13
- // the Windows one.
14
- var expected = tests[uri].replace(/\\/g, sep);
15
-
16
- it('should convert ' + JSON.stringify(uri) + ' to ' + JSON.stringify(expected),
17
- function () {
18
- var actual = uri2path(uri);
19
- assert.equal(actual, expected);
20
- });
21
-
22
- });
23
-
24
- });
@@ -1,13 +0,0 @@
1
- {
2
- "file://host/path": "\\\\host\\path",
3
- "file://localhost/etc/fstab": "\\etc\\fstab",
4
- "file:///etc/fstab": "\\etc\\fstab",
5
- "file:///c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
6
- "file://localhost/c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
7
- "file:///c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
8
- "file://localhost/c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
9
- "file://hostname/path/to/the%20file.txt": "\\\\hostname\\path\\to\\the file.txt",
10
- "file:///c:/path/to/the%20file.txt": "c:\\path\\to\\the file.txt",
11
- "file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc": "C:\\Documents and Settings\\davris\\FileSchemeURIs.doc",
12
- "file:///C:/caf%C3%A9/%C3%A5r/d%C3%BCnn/%E7%89%9B%E9%93%83/Ph%E1%BB%9F/%F0%9F%98%B5.exe": "C:\\café\\år\\dünn\\牛铃\\Phở\\😵.exe"
13
- }
@@ -1,19 +0,0 @@
1
- Copyright (c) 2010, Squeeks.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
@@ -1,129 +0,0 @@
1
- glossy
2
- ===========
3
-
4
- glossy aims to be a very generic yet powerful library for both producing and
5
- also parsing raw syslog messages. The library aims to be capable of adhearing to
6
- RFC 3164, RFC 5424 and RFC 5848 and by itself does no network interactions, it's
7
- up to you to use this library as a syslog producer, a consumer, relay or
8
- something else entirely. In addition, glossy has no dependencies and can be
9
- bootstrapped to operate in browser or other non-node.js environments.
10
-
11
-
12
- Parsing
13
- -------
14
-
15
- var syslogParser = require('glossy').Parse; // or wherever your glossy libs are
16
-
17
- parsedMessage = syslogParser.parse(message);
18
-
19
- parsedMessage will return an object containing as many parsed values as
20
- possible, as well as the original message. The date value will be a Date object.
21
- Structured data will return as an object. Alternatively, you can give it a
22
- callback as your second argument:
23
-
24
- syslogParser.parse(message, function(parsedMessage){
25
- console.log(parsedMessage);
26
- });
27
-
28
-
29
- Producing
30
- -------
31
- Unless you stipulate for BSD/RFC 3164 style messages, it will default to
32
- generating all messages as newer, RFC 5424 format. This might break consumers or
33
- relays not expecting it.
34
-
35
- var syslogProducer = require('glossy').Produce; // or wherever glossy lives
36
-
37
- var msg = syslogProducer.produce({
38
- facility: 'local4', // these can either be a valid integer,
39
- severity: 'error', // or a relevant string
40
- host: 'localhost',
41
- appName: 'sudo',
42
- pid: '123',
43
- date: new Date(Date()),
44
- message: 'Nice, Neat, New, Oh Wow'
45
- });
46
-
47
- Again, you can specify a callback for the second argument.
48
-
49
- var msg = syslogProducer.produce({
50
- facility: 'ntp',
51
- severity: 'info',
52
- host: 'localhost',
53
- date: new Date(Date()),
54
- message: 'Lunch Time!'
55
- }, function(syslogMsg){
56
- console.log(syslogMsg);
57
- });
58
-
59
- In addition, you can also predefined most of the values when you create the
60
- object, to save having to repeat yourself:
61
-
62
- var syslogProducer = new require('glossy').Produce({
63
- type: 'BSD',
64
- facility: 'ftp',
65
- pid: 42,
66
- host: '::1'
67
- });
68
-
69
- For RFC5424 messages, you can also include structured data. Keys should comply
70
- with the definition in [Section 7, RFC5424](http://tools.ietf.org/html/rfc5424#section-7)
71
- regarding names - keep them unique and your own custom keys should have at least
72
- an @ sign.
73
-
74
- var msg = syslogProducer.produce({
75
- facility: 'local4',
76
- severity: 'error',
77
- host: 'localhost',
78
- appName: 'starman',
79
- pid: '123',
80
- date: new Date(Date()),
81
- message: 'ACHTUNG!',
82
- structuredData: {
83
- 'plack@host': {
84
- status: 'broken',
85
- hasTried: 'not really'
86
- }
87
- }
88
- });
89
-
90
- Finally, we expose all the severities as functions themselves:
91
-
92
- var infoMsg = glossy.info({
93
- message: 'Info Message',
94
- });
95
-
96
- Function names facilitating this are named debug, info, notice, warn, crit,
97
- alert and emergency.
98
-
99
- Parsing Example
100
- -------
101
- Handle incoming syslog messages coming in on UDP port 514:
102
-
103
- var syslogParser = require('glossy').Parse; // or wherever your glossy libs are
104
- var dgram = require("dgram");
105
- var server = dgram.createSocket("udp4");
106
-
107
- server.on("message", function(rawMessage) {
108
- syslogParser.parse(rawMessage.toString('utf8', 0), function(parsedMessage){
109
- console.log(parsedMessage.host + ' - ' + parsedMessage.message);
110
- });
111
- });
112
-
113
- server.on("listening", function() {
114
- var address = server.address();
115
- console.log("Server now listening at " +
116
- address.address + ":" + address.port);
117
- });
118
-
119
- server.bind(514); // Remember ports < 1024 need suid
120
-
121
-
122
- Author
123
- -------
124
- Squeeks - privacymyass@gmail.com
125
-
126
- License
127
- -------
128
- This is free software licensed under the MIT License - see the LICENSE file that
129
- should be included with this package.
@@ -1,12 +0,0 @@
1
- /*
2
- * Imports
3
- */
4
-
5
- var producer = require('./lib/glossy/produce.js');
6
- var parser = require('./lib/glossy/parse.js');
7
-
8
- /*
9
- * Exports
10
- */
11
- exports.Produce = producer;
12
- exports.Parse = parser;