@contrast/agent-bundle 5.46.0 → 5.47.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 (178) hide show
  1. package/README.md +1 -1
  2. package/node_modules/@contrast/agent/README.md +1 -1
  3. package/node_modules/@contrast/agent/package.json +12 -12
  4. package/node_modules/@contrast/agentify/package.json +15 -15
  5. package/node_modules/@contrast/architecture-components/package.json +5 -5
  6. package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/common.js +1 -1
  7. package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/handlers.js +23 -10
  8. package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/index.js +6 -4
  9. package/node_modules/@contrast/assess/lib/configuration-analysis/install/apollo-server.js +92 -0
  10. package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/express-session.js +2 -2
  11. package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/fastify-cookie.js +2 -2
  12. package/node_modules/@contrast/assess/lib/configuration-analysis/install/graphql-yoga.js +90 -0
  13. package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/hapi.js +2 -2
  14. package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/koa.js +3 -3
  15. package/node_modules/@contrast/assess/lib/dataflow/propagation/install/string/substring.js +1 -1
  16. package/node_modules/@contrast/assess/lib/dataflow/sources/handler.js +9 -2
  17. package/node_modules/@contrast/assess/lib/dataflow/sources/index.js +2 -0
  18. package/node_modules/@contrast/assess/lib/dataflow/sources/install/fastify-websocket.js +63 -0
  19. package/node_modules/@contrast/assess/lib/dataflow/sources/install/http.js +42 -38
  20. package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/index.js +1 -1
  21. package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-bodyparsers.js +76 -48
  22. package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-multer.js +1 -1
  23. package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-routers.js +2 -2
  24. package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/{koa2.js → koa.js} +3 -3
  25. package/node_modules/@contrast/assess/lib/dataflow/sources/install/socket.io.js +80 -0
  26. package/node_modules/@contrast/assess/lib/index.d.ts +4 -3
  27. package/node_modules/@contrast/assess/lib/index.js +1 -1
  28. package/node_modules/@contrast/assess/lib/policy.js +2 -2
  29. package/node_modules/@contrast/assess/package.json +12 -12
  30. package/node_modules/@contrast/common/lib/constants.d.ts +12 -4
  31. package/node_modules/@contrast/common/lib/constants.js +16 -7
  32. package/node_modules/@contrast/common/lib/types.d.ts +5 -1
  33. package/node_modules/@contrast/common/package.json +1 -1
  34. package/node_modules/@contrast/config/lib/common.js +1 -0
  35. package/node_modules/@contrast/config/lib/options.js +7 -1
  36. package/node_modules/@contrast/config/package.json +3 -3
  37. package/node_modules/@contrast/core/package.json +5 -5
  38. package/node_modules/@contrast/deadzones/package.json +5 -5
  39. package/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +2 -2
  40. package/node_modules/@contrast/dep-hooks/lib/package-finder.js +3 -2
  41. package/node_modules/@contrast/dep-hooks/package.json +4 -4
  42. package/node_modules/@contrast/esm-hooks/README.md +2 -2
  43. package/node_modules/@contrast/esm-hooks/package.json +6 -6
  44. package/node_modules/@contrast/instrumentation/package.json +5 -5
  45. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +149 -149
  46. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/index.js +2 -11
  47. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/utils.js +2 -0
  48. package/node_modules/@contrast/library-analysis/lib/install/library-usage/index.js +3 -1
  49. package/node_modules/@contrast/library-analysis/lib/util.js +0 -2
  50. package/node_modules/@contrast/library-analysis/package.json +4 -4
  51. package/node_modules/@contrast/logger/package.json +3 -3
  52. package/node_modules/@contrast/metrics/package.json +6 -6
  53. package/node_modules/@contrast/patcher/package.json +2 -2
  54. package/node_modules/@contrast/protect/lib/error-handlers/index.js +1 -1
  55. package/node_modules/@contrast/protect/lib/error-handlers/install/{koa2.js → koa.js} +4 -4
  56. package/node_modules/@contrast/protect/lib/index.d.ts +1 -1
  57. package/node_modules/@contrast/protect/lib/input-analysis/index.js +2 -3
  58. package/node_modules/@contrast/protect/lib/input-analysis/install/koa-bodyparsers.js +92 -0
  59. package/node_modules/@contrast/protect/lib/input-analysis/install/{koa2.js → koa.js} +5 -5
  60. package/node_modules/@contrast/protect/package.json +11 -11
  61. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +6 -10
  62. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/routes-observed.js +4 -0
  63. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.d.ts +1 -1
  64. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +1 -1
  65. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.d.ts +1 -1
  66. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +22 -9
  67. package/node_modules/@contrast/reporter/lib/reporters/file.js +1 -1
  68. package/node_modules/@contrast/reporter/package.json +6 -6
  69. package/node_modules/@contrast/rewriter/package.json +5 -5
  70. package/node_modules/@contrast/route-coverage/lib/index.d.ts +0 -2
  71. package/node_modules/@contrast/route-coverage/lib/index.js +10 -1
  72. package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +16 -1
  73. package/node_modules/@contrast/route-coverage/lib/install/fastify.js +25 -15
  74. package/node_modules/@contrast/route-coverage/lib/install/graphql.js +6 -1
  75. package/node_modules/@contrast/route-coverage/lib/install/koa.js +1 -1
  76. package/node_modules/@contrast/route-coverage/lib/install/socket.io.js +127 -0
  77. package/node_modules/@contrast/route-coverage/package.json +8 -8
  78. package/node_modules/@contrast/scopes/package.json +5 -5
  79. package/node_modules/@contrast/sec-obs/package.json +9 -9
  80. package/node_modules/@contrast/sources/lib/index.js +65 -22
  81. package/node_modules/@contrast/sources/lib/index.test.js +78 -33
  82. package/node_modules/@contrast/sources/lib/source-info.js +1 -10
  83. package/node_modules/@contrast/sources/package.json +3 -3
  84. package/node_modules/@contrast/telemetry/package.json +5 -5
  85. package/node_modules/@types/node/README.md +1 -1
  86. package/node_modules/@types/node/assert.d.ts +37 -2
  87. package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  88. package/node_modules/@types/node/buffer.d.ts +8 -4
  89. package/node_modules/@types/node/child_process.d.ts +65 -42
  90. package/node_modules/@types/node/cluster.d.ts +4 -5
  91. package/node_modules/@types/node/crypto.d.ts +1079 -338
  92. package/node_modules/@types/node/dgram.d.ts +9 -8
  93. package/node_modules/@types/node/diagnostics_channel.d.ts +0 -2
  94. package/node_modules/@types/node/dns.d.ts +1 -1
  95. package/node_modules/@types/node/events.d.ts +1 -1
  96. package/node_modules/@types/node/fs/promises.d.ts +39 -21
  97. package/node_modules/@types/node/fs.d.ts +104 -87
  98. package/node_modules/@types/node/globals.d.ts +2 -0
  99. package/node_modules/@types/node/globals.typedarray.d.ts +19 -0
  100. package/node_modules/@types/node/http.d.ts +66 -27
  101. package/node_modules/@types/node/http2.d.ts +178 -52
  102. package/node_modules/@types/node/https.d.ts +91 -62
  103. package/node_modules/@types/node/index.d.ts +2 -0
  104. package/node_modules/@types/node/inspector.d.ts +24 -0
  105. package/node_modules/@types/node/inspector.generated.d.ts +181 -0
  106. package/node_modules/@types/node/net.d.ts +12 -11
  107. package/node_modules/@types/node/os.d.ts +14 -3
  108. package/node_modules/@types/node/package.json +3 -3
  109. package/node_modules/@types/node/perf_hooks.d.ts +6 -8
  110. package/node_modules/@types/node/process.d.ts +12 -23
  111. package/node_modules/@types/node/readline/promises.d.ts +1 -1
  112. package/node_modules/@types/node/sea.d.ts +9 -0
  113. package/node_modules/@types/node/sqlite.d.ts +119 -10
  114. package/node_modules/@types/node/stream/consumers.d.ts +2 -2
  115. package/node_modules/@types/node/stream/web.d.ts +6 -55
  116. package/node_modules/@types/node/stream.d.ts +38 -23
  117. package/node_modules/@types/node/string_decoder.d.ts +2 -2
  118. package/node_modules/@types/node/test.d.ts +29 -3
  119. package/node_modules/@types/node/tls.d.ts +90 -66
  120. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  121. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
  122. package/node_modules/@types/node/ts5.6/index.d.ts +2 -0
  123. package/node_modules/@types/node/ts5.7/index.d.ts +2 -0
  124. package/node_modules/@types/node/url.d.ts +2 -2
  125. package/node_modules/@types/node/util.d.ts +12 -3
  126. package/node_modules/@types/node/v8.d.ts +38 -5
  127. package/node_modules/@types/node/vm.d.ts +169 -88
  128. package/node_modules/@types/node/wasi.d.ts +1 -1
  129. package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  130. package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  131. package/node_modules/@types/node/worker_threads.d.ts +76 -1
  132. package/node_modules/@types/node/zlib.d.ts +25 -24
  133. package/node_modules/axios/CHANGELOG.md +403 -357
  134. package/node_modules/axios/README.md +80 -49
  135. package/node_modules/axios/dist/axios.js +121 -46
  136. package/node_modules/axios/dist/axios.js.map +1 -1
  137. package/node_modules/axios/dist/axios.min.js +2 -2
  138. package/node_modules/axios/dist/axios.min.js.map +1 -1
  139. package/node_modules/axios/dist/browser/axios.cjs +126 -57
  140. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  141. package/node_modules/axios/dist/esm/axios.js +126 -57
  142. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  143. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  144. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  145. package/node_modules/axios/dist/node/axios.cjs +346 -97
  146. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  147. package/node_modules/axios/index.d.cts +4 -0
  148. package/node_modules/axios/index.d.ts +4 -0
  149. package/node_modules/axios/lib/adapters/adapters.js +85 -40
  150. package/node_modules/axios/lib/adapters/fetch.js +1 -1
  151. package/node_modules/axios/lib/adapters/http.js +220 -42
  152. package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
  153. package/node_modules/axios/lib/core/mergeConfig.js +4 -4
  154. package/node_modules/axios/lib/env/data.js +1 -1
  155. package/node_modules/axios/lib/helpers/HttpStatusCode.js +6 -0
  156. package/node_modules/axios/lib/helpers/bind.js +7 -0
  157. package/node_modules/axios/lib/helpers/cookies.js +24 -13
  158. package/node_modules/axios/package.json +9 -4
  159. package/node_modules/detect-libc/lib/filesystem.js +1 -1
  160. package/node_modules/detect-libc/package.json +3 -1
  161. package/node_modules/node-abi/abi_registry.json +12 -2
  162. package/node_modules/node-abi/package.json +3 -6
  163. package/node_modules/semver/classes/range.js +1 -0
  164. package/node_modules/semver/classes/semver.js +19 -5
  165. package/node_modules/semver/internal/identifiers.js +4 -0
  166. package/node_modules/semver/package.json +3 -3
  167. package/node_modules/undici-types/agent.d.ts +1 -0
  168. package/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
  169. package/node_modules/undici-types/errors.d.ts +5 -15
  170. package/node_modules/undici-types/eventsource.d.ts +6 -1
  171. package/node_modules/undici-types/index.d.ts +4 -1
  172. package/node_modules/undici-types/interceptors.d.ts +5 -0
  173. package/node_modules/undici-types/package.json +1 -1
  174. package/node_modules/undici-types/snapshot-agent.d.ts +5 -3
  175. package/node_modules/undici-types/webidl.d.ts +82 -21
  176. package/package.json +3 -3
  177. package/node_modules/@contrast/protect/lib/input-analysis/install/koa-body5.js +0 -63
  178. package/node_modules/@contrast/protect/lib/input-analysis/install/koa-bodyparser4.js +0 -64
@@ -5,27 +5,38 @@ export default platform.hasStandardBrowserEnv ?
5
5
 
6
6
  // Standard browser envs support document.cookie
7
7
  {
8
- write(name, value, expires, path, domain, secure) {
9
- const cookie = [name + '=' + encodeURIComponent(value)];
10
-
11
- utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
12
-
13
- utils.isString(path) && cookie.push('path=' + path);
14
-
15
- utils.isString(domain) && cookie.push('domain=' + domain);
16
-
17
- secure === true && cookie.push('secure');
8
+ write(name, value, expires, path, domain, secure, sameSite) {
9
+ if (typeof document === 'undefined') return;
10
+
11
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
12
+
13
+ if (utils.isNumber(expires)) {
14
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
15
+ }
16
+ if (utils.isString(path)) {
17
+ cookie.push(`path=${path}`);
18
+ }
19
+ if (utils.isString(domain)) {
20
+ cookie.push(`domain=${domain}`);
21
+ }
22
+ if (secure === true) {
23
+ cookie.push('secure');
24
+ }
25
+ if (utils.isString(sameSite)) {
26
+ cookie.push(`SameSite=${sameSite}`);
27
+ }
18
28
 
19
29
  document.cookie = cookie.join('; ');
20
30
  },
21
31
 
22
32
  read(name) {
23
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
24
- return (match ? decodeURIComponent(match[3]) : null);
33
+ if (typeof document === 'undefined') return null;
34
+ const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
35
+ return match ? decodeURIComponent(match[1]) : null;
25
36
  },
26
37
 
27
38
  remove(name) {
28
- this.write(name, '', Date.now() - 86400000);
39
+ this.write(name, '', Date.now() - 86400000, '/');
29
40
  }
30
41
  }
31
42
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axios",
3
- "version": "1.12.2",
3
+ "version": "1.13.1",
4
4
  "description": "Promise based HTTP client for the browser and node.js",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -80,7 +80,12 @@
80
80
  "http",
81
81
  "ajax",
82
82
  "promise",
83
- "node"
83
+ "node",
84
+ "browser",
85
+ "fetch",
86
+ "rest",
87
+ "api",
88
+ "client"
84
89
  ],
85
90
  "author": "Matt Zabriskie",
86
91
  "license": "MIT",
@@ -141,11 +146,11 @@
141
146
  "rollup-plugin-auto-external": "^2.0.0",
142
147
  "rollup-plugin-bundle-size": "^1.0.3",
143
148
  "rollup-plugin-terser": "^7.0.2",
149
+ "selfsigned": "^3.0.1",
144
150
  "sinon": "^4.5.0",
145
151
  "stream-throttle": "^0.1.3",
146
152
  "string-replace-async": "^3.0.2",
147
153
  "tar-stream": "^3.1.7",
148
- "terser-webpack-plugin": "^4.2.3",
149
154
  "typescript": "^4.9.5"
150
155
  },
151
156
  "browser": {
@@ -185,7 +190,7 @@
185
190
  "Remco Haszing (https://github.com/remcohaszing)",
186
191
  "Rikki Gibson (https://github.com/RikkiGibson)",
187
192
  "Willian Agostini (https://github.com/WillianAgostini)",
188
- "Yasu Flores (https://github.com/yasuf)"
193
+ "Ben Carp (https://github.com/carpben)"
189
194
  ],
190
195
  "sideEffects": false,
191
196
  "release-it": {
@@ -19,7 +19,7 @@ const readFileSync = (path) => {
19
19
  const fd = fs.openSync(path, 'r');
20
20
  const buffer = Buffer.alloc(MAX_LENGTH);
21
21
  const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
22
- fs.close(fd);
22
+ fs.close(fd, () => {});
23
23
  return buffer.subarray(0, bytesRead);
24
24
  };
25
25
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "detect-libc",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Node.js module to detect the C standard library (libc) implementation family and version",
5
5
  "main": "lib/detect-libc.js",
6
6
  "files": [
@@ -9,6 +9,7 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js",
12
+ "changelog": "conventional-changelog -i CHANGELOG.md -s",
12
13
  "bench": "node benchmark/detect-libc",
13
14
  "bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js"
14
15
  },
@@ -30,6 +31,7 @@
30
31
  "devDependencies": {
31
32
  "ava": "^2.4.0",
32
33
  "benchmark": "^2.1.4",
34
+ "conventional-changelog-cli": "^5.0.0",
33
35
  "eslint-config-standard": "^13.0.1",
34
36
  "nyc": "^15.1.0",
35
37
  "proxyquire": "^2.1.3",
@@ -122,8 +122,18 @@
122
122
  "runtime": "node",
123
123
  "target": "25.0.0",
124
124
  "lts": false,
125
+ "future": false,
126
+ "abi": "141"
127
+ },
128
+ {
129
+ "runtime": "node",
130
+ "target": "26.0.0",
131
+ "lts": [
132
+ "2026-10-28",
133
+ "2027-10-20"
134
+ ],
125
135
  "future": true,
126
- "abi": "138"
136
+ "abi": "142"
127
137
  },
128
138
  {
129
139
  "abi": "70",
@@ -400,7 +410,7 @@
400
410
  },
401
411
  {
402
412
  "abi": "140",
403
- "future": true,
413
+ "future": false,
404
414
  "lts": false,
405
415
  "runtime": "electron",
406
416
  "target": "39.0.0-alpha.1"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-abi",
3
- "version": "4.14.0",
3
+ "version": "4.16.0",
4
4
  "description": "Get the Node ABI for a given target and runtime, and vice versa.",
5
5
  "type": "module",
6
6
  "exports": "./index.js",
@@ -30,10 +30,6 @@
30
30
  "url": "https://github.com/electron/node-abi/issues"
31
31
  },
32
32
  "homepage": "https://github.com/electron/node-abi#readme",
33
- "devDependencies": {
34
- "@semantic-release/npm": "13.0.0-alpha.15",
35
- "semantic-release": "^24.2.7"
36
- },
37
33
  "dependencies": {
38
34
  "semver": "^7.6.3"
39
35
  },
@@ -42,5 +38,6 @@
42
38
  },
43
39
  "publishConfig": {
44
40
  "provenance": true
45
- }
41
+ },
42
+ "packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
46
43
  }
@@ -255,6 +255,7 @@ const isSatisfiable = (comparators, options) => {
255
255
  // already replaced the hyphen ranges
256
256
  // turn into a set of JUST comparators.
257
257
  const parseComparator = (comp, options) => {
258
+ comp = comp.replace(re[t.BUILD], '')
258
259
  debug('comp', comp, options)
259
260
  comp = replaceCarets(comp, options)
260
261
  debug('caret', comp)
@@ -111,11 +111,25 @@ class SemVer {
111
111
  other = new SemVer(other, this.options)
112
112
  }
113
113
 
114
- return (
115
- compareIdentifiers(this.major, other.major) ||
116
- compareIdentifiers(this.minor, other.minor) ||
117
- compareIdentifiers(this.patch, other.patch)
118
- )
114
+ if (this.major < other.major) {
115
+ return -1
116
+ }
117
+ if (this.major > other.major) {
118
+ return 1
119
+ }
120
+ if (this.minor < other.minor) {
121
+ return -1
122
+ }
123
+ if (this.minor > other.minor) {
124
+ return 1
125
+ }
126
+ if (this.patch < other.patch) {
127
+ return -1
128
+ }
129
+ if (this.patch > other.patch) {
130
+ return 1
131
+ }
132
+ return 0
119
133
  }
120
134
 
121
135
  comparePre (other) {
@@ -2,6 +2,10 @@
2
2
 
3
3
  const numeric = /^[0-9]+$/
4
4
  const compareIdentifiers = (a, b) => {
5
+ if (typeof a === 'number' && typeof b === 'number') {
6
+ return a === b ? 0 : a < b ? -1 : 1
7
+ }
8
+
5
9
  const anum = numeric.test(a)
6
10
  const bnum = numeric.test(b)
7
11
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semver",
3
- "version": "7.7.2",
3
+ "version": "7.7.3",
4
4
  "description": "The semantic version parser used by npm.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@npmcli/eslint-config": "^5.0.0",
18
- "@npmcli/template-oss": "4.24.3",
18
+ "@npmcli/template-oss": "4.25.1",
19
19
  "benchmark": "^2.1.4",
20
20
  "tap": "^16.0.0"
21
21
  },
@@ -52,7 +52,7 @@
52
52
  "author": "GitHub Inc.",
53
53
  "templateOSS": {
54
54
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
55
- "version": "4.24.3",
55
+ "version": "4.25.1",
56
56
  "engines": ">=10",
57
57
  "distPaths": [
58
58
  "classes/",
@@ -24,6 +24,7 @@ declare namespace Agent {
24
24
  factory?(origin: string | URL, opts: Object): Dispatcher;
25
25
 
26
26
  interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
27
+ maxOrigins?: number
27
28
  }
28
29
 
29
30
  export interface DispatchOptions extends Dispatcher.DispatchOptions {
@@ -16,7 +16,6 @@ declare namespace DiagnosticsChannel {
16
16
  statusText: string;
17
17
  headers: Array<Buffer>;
18
18
  }
19
- type Error = unknown
20
19
  interface ConnectParams {
21
20
  host: URL['host'];
22
21
  hostname: URL['hostname'];
@@ -49,21 +49,6 @@ declare namespace Errors {
49
49
  headers: IncomingHttpHeaders | string[] | null
50
50
  }
51
51
 
52
- export class ResponseStatusCodeError extends UndiciError {
53
- constructor (
54
- message?: string,
55
- statusCode?: number,
56
- headers?: IncomingHttpHeaders | string[] | null,
57
- body?: null | Record<string, any> | string
58
- )
59
- name: 'ResponseStatusCodeError'
60
- code: 'UND_ERR_RESPONSE_STATUS_CODE'
61
- body: null | Record<string, any> | string
62
- status: number
63
- statusCode: number
64
- headers: IncomingHttpHeaders | string[] | null
65
- }
66
-
67
52
  /** Passed an invalid argument. */
68
53
  export class InvalidArgumentError extends UndiciError {
69
54
  name: 'InvalidArgumentError'
@@ -168,4 +153,9 @@ declare namespace Errors {
168
153
  name: 'SecureProxyConnectionError'
169
154
  code: 'UND_ERR_PRX_TLS'
170
155
  }
156
+
157
+ class MaxOriginsReachedError extends UndiciError {
158
+ name: 'MaxOriginsReachedError'
159
+ code: 'UND_ERR_MAX_ORIGINS_REACHED'
160
+ }
171
161
  }
@@ -56,6 +56,11 @@ export declare const EventSource: {
56
56
  }
57
57
 
58
58
  interface EventSourceInit {
59
- withCredentials?: boolean,
59
+ withCredentials?: boolean
60
+ // @deprecated use `node.dispatcher` instead
60
61
  dispatcher?: Dispatcher
62
+ node?: {
63
+ dispatcher?: Dispatcher
64
+ reconnectionTime?: number
65
+ }
61
66
  }
@@ -34,7 +34,9 @@ export * from './content-type'
34
34
  export * from './cache'
35
35
  export { Interceptable } from './mock-interceptor'
36
36
 
37
- export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient }
37
+ declare function globalThisInstall (): void
38
+
39
+ export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
38
40
  export default Undici
39
41
 
40
42
  declare namespace Undici {
@@ -74,4 +76,5 @@ declare namespace Undici {
74
76
  MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore,
75
77
  SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore
76
78
  }
79
+ const install: typeof globalThisInstall
77
80
  }
@@ -9,6 +9,10 @@ declare namespace Interceptors {
9
9
  export type DumpInterceptorOpts = { maxSize?: number }
10
10
  export type RetryInterceptorOpts = RetryHandler.RetryOptions
11
11
  export type RedirectInterceptorOpts = { maxRedirections?: number }
12
+ export type DecompressInterceptorOpts = {
13
+ skipErrorResponses?: boolean
14
+ skipStatusCodes?: number[]
15
+ }
12
16
 
13
17
  export type ResponseErrorInterceptorOpts = { throwOnError: boolean }
14
18
  export type CacheInterceptorOpts = CacheHandler.CacheOptions
@@ -28,6 +32,7 @@ declare namespace Interceptors {
28
32
  export function dump (opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
29
33
  export function retry (opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
30
34
  export function redirect (opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
35
+ export function decompress (opts?: DecompressInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
31
36
  export function responseError (opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
32
37
  export function dns (opts?: DNSInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
33
38
  export function cache (opts?: CacheInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "7.13.0",
3
+ "version": "7.16.0",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
@@ -18,9 +18,11 @@ declare class SnapshotRecorder {
18
18
  }
19
19
 
20
20
  declare namespace SnapshotRecorder {
21
+ type SnapshotRecorderMode = 'record' | 'playback' | 'update'
22
+
21
23
  export interface Options {
22
24
  snapshotPath?: string
23
- mode?: 'record' | 'playback' | 'update'
25
+ mode?: SnapshotRecorderMode
24
26
  maxSnapshots?: number
25
27
  autoFlush?: boolean
26
28
  flushInterval?: number
@@ -77,7 +79,7 @@ declare class SnapshotAgent extends MockAgent {
77
79
  saveSnapshots (filePath?: string): Promise<void>
78
80
  loadSnapshots (filePath?: string): Promise<void>
79
81
  getRecorder (): SnapshotRecorder
80
- getMode (): 'record' | 'playback' | 'update'
82
+ getMode (): SnapshotRecorder.SnapshotRecorderMode
81
83
  clearSnapshots (): void
82
84
  resetCallCounts (): void
83
85
  deleteSnapshot (requestOpts: any): boolean
@@ -87,7 +89,7 @@ declare class SnapshotAgent extends MockAgent {
87
89
 
88
90
  declare namespace SnapshotAgent {
89
91
  export interface Options extends MockAgent.Options {
90
- mode?: 'record' | 'playback' | 'update'
92
+ mode?: SnapshotRecorder.SnapshotRecorderMode
91
93
  snapshotPath?: string
92
94
  maxSnapshots?: number
93
95
  autoFlush?: boolean
@@ -10,11 +10,6 @@ type SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) =>
10
10
 
11
11
  type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V>
12
12
 
13
- interface ConvertToIntOpts {
14
- clamp?: boolean
15
- enforceRange?: boolean
16
- }
17
-
18
13
  interface WebidlErrors {
19
14
  /**
20
15
  * @description Instantiate an error
@@ -74,7 +69,7 @@ interface WebidlUtil {
74
69
  V: unknown,
75
70
  bitLength: number,
76
71
  signedness: 'signed' | 'unsigned',
77
- opts?: ConvertToIntOpts
72
+ flags?: number
78
73
  ): number
79
74
 
80
75
  /**
@@ -94,15 +89,17 @@ interface WebidlUtil {
94
89
  * This is only effective in some newer Node.js versions.
95
90
  */
96
91
  markAsUncloneable (V: any): void
92
+
93
+ IsResizableArrayBuffer (V: ArrayBufferLike): boolean
94
+
95
+ HasFlag (flag: number, attributes: number): boolean
97
96
  }
98
97
 
99
98
  interface WebidlConverters {
100
99
  /**
101
100
  * @see https://webidl.spec.whatwg.org/#es-DOMString
102
101
  */
103
- DOMString (V: unknown, prefix: string, argument: string, opts?: {
104
- legacyNullToEmptyString: boolean
105
- }): string
102
+ DOMString (V: unknown, prefix: string, argument: string, flags?: number): string
106
103
 
107
104
  /**
108
105
  * @see https://webidl.spec.whatwg.org/#es-ByteString
@@ -142,39 +139,78 @@ interface WebidlConverters {
142
139
  /**
143
140
  * @see https://webidl.spec.whatwg.org/#es-unsigned-short
144
141
  */
145
- ['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number
142
+ ['unsigned short'] (V: unknown, flags?: number): number
146
143
 
147
144
  /**
148
145
  * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer
149
146
  */
150
- ArrayBuffer (V: unknown): ArrayBufferLike
151
- ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer
147
+ ArrayBuffer (
148
+ V: unknown,
149
+ prefix: string,
150
+ argument: string,
151
+ options?: { allowResizable: boolean }
152
+ ): ArrayBuffer
153
+
154
+ /**
155
+ * @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer
156
+ */
157
+ SharedArrayBuffer (
158
+ V: unknown,
159
+ prefix: string,
160
+ argument: string,
161
+ options?: { allowResizable: boolean }
162
+ ): SharedArrayBuffer
152
163
 
153
164
  /**
154
165
  * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
155
166
  */
156
167
  TypedArray (
157
168
  V: unknown,
158
- TypedArray: NodeJS.TypedArray | ArrayBufferLike
159
- ): NodeJS.TypedArray | ArrayBufferLike
160
- TypedArray (
169
+ T: new () => NodeJS.TypedArray,
170
+ prefix: string,
171
+ argument: string,
172
+ flags?: number
173
+ ): NodeJS.TypedArray
174
+
175
+ /**
176
+ * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
177
+ */
178
+ DataView (
161
179
  V: unknown,
162
- TypedArray: NodeJS.TypedArray | ArrayBufferLike,
163
- opts?: { allowShared: false }
164
- ): NodeJS.TypedArray | ArrayBuffer
180
+ prefix: string,
181
+ argument: string,
182
+ flags?: number
183
+ ): DataView
165
184
 
166
185
  /**
167
186
  * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
168
187
  */
169
- DataView (V: unknown, opts?: { allowShared: boolean }): DataView
188
+ ArrayBufferView (
189
+ V: unknown,
190
+ prefix: string,
191
+ argument: string,
192
+ flags?: number
193
+ ): NodeJS.ArrayBufferView
170
194
 
171
195
  /**
172
196
  * @see https://webidl.spec.whatwg.org/#BufferSource
173
197
  */
174
198
  BufferSource (
175
199
  V: unknown,
176
- opts?: { allowShared: boolean }
177
- ): NodeJS.TypedArray | ArrayBufferLike | DataView
200
+ prefix: string,
201
+ argument: string,
202
+ flags?: number
203
+ ): ArrayBuffer | NodeJS.ArrayBufferView
204
+
205
+ /**
206
+ * @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource
207
+ */
208
+ AllowSharedBufferSource (
209
+ V: unknown,
210
+ prefix: string,
211
+ argument: string,
212
+ flags?: number
213
+ ): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView
178
214
 
179
215
  ['sequence<ByteString>']: SequenceConverter<string>
180
216
 
@@ -192,6 +228,13 @@ interface WebidlConverters {
192
228
  */
193
229
  RequestInit (V: unknown): undici.RequestInit
194
230
 
231
+ /**
232
+ * @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull
233
+ */
234
+ EventHandlerNonNull (V: unknown): Function | null
235
+
236
+ WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string
237
+
195
238
  [Key: string]: (...args: any[]) => unknown
196
239
  }
197
240
 
@@ -210,6 +253,10 @@ interface WebidlIs {
210
253
  AbortSignal: WebidlIsFunction<AbortSignal>
211
254
  MessagePort: WebidlIsFunction<MessagePort>
212
255
  USVString: WebidlIsFunction<string>
256
+ /**
257
+ * @see https://webidl.spec.whatwg.org/#BufferSource
258
+ */
259
+ BufferSource: WebidlIsFunction<ArrayBuffer | NodeJS.TypedArray>
213
260
  }
214
261
 
215
262
  export interface Webidl {
@@ -217,6 +264,7 @@ export interface Webidl {
217
264
  util: WebidlUtil
218
265
  converters: WebidlConverters
219
266
  is: WebidlIs
267
+ attributes: WebIDLExtendedAttributes
220
268
 
221
269
  /**
222
270
  * @description Performs a brand-check on {@param V} to ensure it is a
@@ -278,3 +326,16 @@ export interface Webidl {
278
326
 
279
327
  argumentLengthCheck (args: { length: number }, min: number, context: string): void
280
328
  }
329
+
330
+ interface WebIDLExtendedAttributes {
331
+ /** https://webidl.spec.whatwg.org/#Clamp */
332
+ Clamp: number
333
+ /** https://webidl.spec.whatwg.org/#EnforceRange */
334
+ EnforceRange: number
335
+ /** https://webidl.spec.whatwg.org/#AllowShared */
336
+ AllowShared: number
337
+ /** https://webidl.spec.whatwg.org/#AllowResizable */
338
+ AllowResizable: number
339
+ /** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */
340
+ LegacyNullToEmptyString: number
341
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/agent-bundle",
3
- "version": "5.46.0",
3
+ "version": "5.47.0",
4
4
  "description": "Contrast Security Node.js Agent bundle with all dependencies included",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -21,13 +21,13 @@
21
21
  "main": "./lib/index.js",
22
22
  "engines": {
23
23
  "npm": ">=6.13.7 <7 || >= 8.3.1",
24
- "node": ">=18.7.0 <19 || >=20.6.0 <21 || >= 22.5.1 <23 || >= 24.0.1 <25"
24
+ "node": ">=18.7.0 <19 || >=20.9.0 <21 || >= 22.5.1 <23 || >= 24.0.1 <25"
25
25
  },
26
26
  "scripts": {
27
27
  "test": "bash ../scripts/test.sh"
28
28
  },
29
29
  "dependencies": {
30
- "@contrast/agent": "5.46.0"
30
+ "@contrast/agent": "5.47.0"
31
31
  },
32
32
  "bundleDependencies": [
33
33
  "@contrast/agent"