@alwaysmeticulous/sdk-bundles-api 2.244.2 → 2.246.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/record/middleware.d.ts +26 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cookie, HarRequest, HarResponse, StorageEntry, WebSocketConnectionData } from "@alwaysmeticulous/api";
|
|
1
|
+
import { Cookie, HarRequest, HarResponse, StorageEntry, ExpiringImage, WebSocketConnectionData, EventSourceConnectionData } from "@alwaysmeticulous/api";
|
|
2
2
|
/**
|
|
3
3
|
* Transformations that are applied to a recorder payload before it is sent to Meticulous's servers. This is
|
|
4
4
|
* useful for redacting sensitive information from the payload before it is sent.
|
|
@@ -103,6 +103,18 @@ export interface RecorderMiddleware {
|
|
|
103
103
|
* See JSDoc for {@link RecorderMiddleware} before implementing.
|
|
104
104
|
*/
|
|
105
105
|
transformNetworkResponse?: (response: HarResponse, metadata: NetworkResponseMetadata) => HarResponse;
|
|
106
|
+
/**
|
|
107
|
+
* Transforms expiring image resources before they are sent to Meticulous's servers.
|
|
108
|
+
*
|
|
109
|
+
* Expiring images are images that are not publicly accessible and require authentication to access. eg. an S3 url with a presigned url.
|
|
110
|
+
*
|
|
111
|
+
* Meticulous captures a compressed and blurred version of the image at record time, and replaces this image with this placeholder during replay.
|
|
112
|
+
*
|
|
113
|
+
* Returning null will cause the image to be dropped from the payload.
|
|
114
|
+
*
|
|
115
|
+
* See JSDoc for {@link RecorderMiddleware} before implementing.
|
|
116
|
+
*/
|
|
117
|
+
transformExpiringImage?: (resource: ExpiringImage) => ExpiringImage | null;
|
|
106
118
|
/**
|
|
107
119
|
* Transforms WebSocket messages before they are sent to Meticulous's servers.
|
|
108
120
|
*
|
|
@@ -116,6 +128,19 @@ export interface RecorderMiddleware {
|
|
|
116
128
|
* See JSDoc for {@link RecorderMiddleware} before implementing.
|
|
117
129
|
*/
|
|
118
130
|
transformWebSocketConnectionData?: (entry: Omit<WebSocketConnectionData, "id">) => Omit<WebSocketConnectionData, "id"> | null;
|
|
131
|
+
/**
|
|
132
|
+
* Transforms EventSource messages before they are sent to Meticulous's servers.
|
|
133
|
+
*
|
|
134
|
+
* Returning null will cause the data to be dropped from the payload.
|
|
135
|
+
*
|
|
136
|
+
* Please note that the messages received from a connection to a single URL may be split across multiple payloads.
|
|
137
|
+
*
|
|
138
|
+
* Note: we pass the EventSourceConnectionData to your middleware without the id field, and re-add the id field after
|
|
139
|
+
* you return the transformed data.
|
|
140
|
+
*
|
|
141
|
+
* See JSDoc for {@link RecorderMiddleware} before implementing.
|
|
142
|
+
*/
|
|
143
|
+
transformEventSourceConnectionData?: (entry: Omit<EventSourceConnectionData, "id">) => Omit<EventSourceConnectionData, "id"> | null;
|
|
119
144
|
/**
|
|
120
145
|
* Defaults to true. Set to false if transformNetworkRequest only transforms the headers and not the URL or body of the request,
|
|
121
146
|
* and transformNetworkRequest never returns null. Setting to false when not required improves replay performance.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/sdk-bundles-api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.246.0",
|
|
4
4
|
"description": "Meticulous common types",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"depcheck": "depcheck --ignore-patterns=dist"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@alwaysmeticulous/api": "^2.
|
|
22
|
+
"@alwaysmeticulous/api": "^2.246.0"
|
|
23
23
|
},
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "The Meticulous Team",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"bugs": {
|
|
39
39
|
"url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "43f341e9b61e2d86371de98ef4fb3dbb07c19707"
|
|
42
42
|
}
|