Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@recordreplay/protocol

Package Overview
Dependencies
Maintainers
6
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@recordreplay/protocol - npm Package Compare versions

Comparing version 0.15.6 to 0.16.0

32

js/client/build/client.d.ts

@@ -12,4 +12,4 @@ import { uploadedData, awaitingSourcemaps, sessionError, getDescriptionParameters, createSessionParameters, releaseSessionParameters, processRecordingParameters, addSourceMapParameters, addOriginalSourceParameters } from "../../protocol/Recording";

import { analysisResult, analysisError, analysisPoints, createAnalysisParameters, addLocationParameters, addFunctionEntryPointsParameters, addRandomPointsParameters, addEventHandlerEntryPointsParameters, addExceptionPointsParameters, addPointsParameters, runAnalysisParameters, releaseAnalysisParameters, findAnalysisPointsParameters } from "../../protocol/Analysis";
import { requests, findRequestsParameters } from "../../protocol/Network";
import { convertLocationToFunctionOffsetParameters, convertFunctionOffsetToLocationParameters, convertFunctionOffsetsToLocationsParameters, getStepOffsetsParameters, getHTMLSourceParameters, getFunctionsInRangeParameters, getSourceMapURLParameters, getSheetSourceMapURLParameters, getCurrentMessageContentsParameters, countStackFramesParameters, getStackFunctionIDsParameters, currentGeneratorIdParameters, topFrameLocationParameters, getCurrentNetworkRequestEventParameters } from "../../protocol/Target";
import { requestBodyData, responseBodyData, requests, getRequestBodyParameters, getResponseBodyParameters, findRequestsParameters } from "../../protocol/Network";
import { convertLocationToFunctionOffsetParameters, convertFunctionOffsetToLocationParameters, convertFunctionOffsetsToLocationsParameters, getStepOffsetsParameters, getHTMLSourceParameters, getFunctionsInRangeParameters, getSourceMapURLParameters, getSheetSourceMapURLParameters, getCurrentMessageContentsParameters, countStackFramesParameters, getStackFunctionIDsParameters, currentGeneratorIdParameters, topFrameLocationParameters, getCurrentNetworkRequestEventParameters, getCurrentNetworkStreamDataParameters } from "../../protocol/Target";
import { createRecordingParameters, setRecordingMetadataParameters, addRecordingDataParameters, addRecordingDescriptionParameters, finishRecordingParameters, beginRecordingResourceUploadParameters, endRecordingResourceUploadParameters, echoParameters, reportCrashParameters } from "../../protocol/Internal";

@@ -589,2 +589,14 @@ import { GenericProtocolClient } from "../generic";

/**
* Emit data about a request body as it is processed.
* Parts are not guaranteed to be emitted in order.
*/
addRequestBodyDataListener: (listener: (parameters: requestBodyData) => void) => void;
removeRequestBodyDataListener: () => void | undefined;
/**
* Emit data about a response body as it is processed.
* Parts are not guaranteed to be emitted in order.
*/
addResponseBodyDataListener: (listener: (parameters: responseBodyData) => void) => void;
removeResponseBodyDataListener: () => void | undefined;
/**
* Describe some requests that were dispatched by the recording.

@@ -599,2 +611,14 @@ *

/**
* Query the recording for all of the parts of this request body.
* The server will emit 'requestBodyData' events for all parts, and
* this command will not complete until all parts have been sent.
*/
getRequestBody: (parameters: getRequestBodyParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Network").getRequestBodyResult>;
/**
* Query the recording for all of the parts of this response body.
* The server will emit 'responseBodyData' events for all parts, and
* this command will not complete until all parts have been sent.
*/
getResponseBody: (parameters: getResponseBodyParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Network").getResponseBodyResult>;
/**
* Query the recording for all network data that is available, returning once

@@ -678,2 +702,6 @@ * all 'Network.requests' events have been dispatched.

getCurrentNetworkRequestEvent: (parameters: getCurrentNetworkRequestEventParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Target").getCurrentNetworkRequestEventResult>;
/**
* Fetch the current data entry for a given driver OnNetworkStreamData call.
*/
getCurrentNetworkStreamData: (parameters: getCurrentNetworkStreamDataParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Target").getCurrentNetworkStreamDataResult>;
};

@@ -680,0 +708,0 @@ /**

@@ -767,2 +767,18 @@ "use strict";

/**
* Emit data about a request body as it is processed.
* Parts are not guaranteed to be emitted in order.
*/
addRequestBodyDataListener: function (listener) {
return _this.genericClient.addEventListener("Network.requestBodyData", listener);
},
removeRequestBodyDataListener: function () { var _a, _b; return (_b = (_a = _this.genericClient).removeEventListener) === null || _b === void 0 ? void 0 : _b.call(_a, "Network.requestBodyData"); },
/**
* Emit data about a response body as it is processed.
* Parts are not guaranteed to be emitted in order.
*/
addResponseBodyDataListener: function (listener) {
return _this.genericClient.addEventListener("Network.responseBodyData", listener);
},
removeResponseBodyDataListener: function () { var _a, _b; return (_b = (_a = _this.genericClient).removeEventListener) === null || _b === void 0 ? void 0 : _b.call(_a, "Network.responseBodyData"); },
/**
* Describe some requests that were dispatched by the recording.

@@ -779,2 +795,18 @@ *

/**
* Query the recording for all of the parts of this request body.
* The server will emit 'requestBodyData' events for all parts, and
* this command will not complete until all parts have been sent.
*/
getRequestBody: function (parameters, sessionId, pauseId) {
return _this.genericClient.sendCommand("Network.getRequestBody", parameters, sessionId, pauseId);
},
/**
* Query the recording for all of the parts of this response body.
* The server will emit 'responseBodyData' events for all parts, and
* this command will not complete until all parts have been sent.
*/
getResponseBody: function (parameters, sessionId, pauseId) {
return _this.genericClient.sendCommand("Network.getResponseBody", parameters, sessionId, pauseId);
},
/**
* Query the recording for all network data that is available, returning once

@@ -888,2 +920,8 @@ * all 'Network.requests' events have been dispatched.

},
/**
* Fetch the current data entry for a given driver OnNetworkStreamData call.
*/
getCurrentNetworkStreamData: function (parameters, sessionId, pauseId) {
return _this.genericClient.sendCommand("Target.getCurrentNetworkStreamData", parameters, sessionId, pauseId);
},
};

@@ -890,0 +928,0 @@ /**

@@ -26,4 +26,4 @@ export * from "./Recording";

import { analysisResult, analysisError, analysisPoints, createAnalysisParameters, createAnalysisResult, addLocationParameters, addLocationResult, addFunctionEntryPointsParameters, addFunctionEntryPointsResult, addRandomPointsParameters, addRandomPointsResult, addEventHandlerEntryPointsParameters, addEventHandlerEntryPointsResult, addExceptionPointsParameters, addExceptionPointsResult, addPointsParameters, addPointsResult, runAnalysisParameters, runAnalysisResult, releaseAnalysisParameters, releaseAnalysisResult, findAnalysisPointsParameters, findAnalysisPointsResult } from "./Analysis";
import { requests, findRequestsParameters, findRequestsResult } from "./Network";
import { convertLocationToFunctionOffsetParameters, convertLocationToFunctionOffsetResult, convertFunctionOffsetToLocationParameters, convertFunctionOffsetToLocationResult, convertFunctionOffsetsToLocationsParameters, convertFunctionOffsetsToLocationsResult, getStepOffsetsParameters, getStepOffsetsResult, getHTMLSourceParameters, getHTMLSourceResult, getFunctionsInRangeParameters, getFunctionsInRangeResult, getSourceMapURLParameters, getSourceMapURLResult, getSheetSourceMapURLParameters, getSheetSourceMapURLResult, getCurrentMessageContentsParameters, getCurrentMessageContentsResult, countStackFramesParameters, countStackFramesResult, getStackFunctionIDsParameters, getStackFunctionIDsResult, currentGeneratorIdParameters, currentGeneratorIdResult, topFrameLocationParameters, topFrameLocationResult, getCurrentNetworkRequestEventParameters, getCurrentNetworkRequestEventResult } from "./Target";
import { requestBodyData, responseBodyData, requests, getRequestBodyParameters, getRequestBodyResult, getResponseBodyParameters, getResponseBodyResult, findRequestsParameters, findRequestsResult } from "./Network";
import { convertLocationToFunctionOffsetParameters, convertLocationToFunctionOffsetResult, convertFunctionOffsetToLocationParameters, convertFunctionOffsetToLocationResult, convertFunctionOffsetsToLocationsParameters, convertFunctionOffsetsToLocationsResult, getStepOffsetsParameters, getStepOffsetsResult, getHTMLSourceParameters, getHTMLSourceResult, getFunctionsInRangeParameters, getFunctionsInRangeResult, getSourceMapURLParameters, getSourceMapURLResult, getSheetSourceMapURLParameters, getSheetSourceMapURLResult, getCurrentMessageContentsParameters, getCurrentMessageContentsResult, countStackFramesParameters, countStackFramesResult, getStackFunctionIDsParameters, getStackFunctionIDsResult, currentGeneratorIdParameters, currentGeneratorIdResult, topFrameLocationParameters, topFrameLocationResult, getCurrentNetworkRequestEventParameters, getCurrentNetworkRequestEventResult, getCurrentNetworkStreamDataParameters, getCurrentNetworkStreamDataResult } from "./Target";
import { createRecordingParameters, createRecordingResult, setRecordingMetadataParameters, setRecordingMetadataResult, addRecordingDataParameters, addRecordingDataResult, addRecordingDescriptionParameters, addRecordingDescriptionResult, finishRecordingParameters, finishRecordingResult, beginRecordingResourceUploadParameters, beginRecordingResourceUploadResult, endRecordingResourceUploadParameters, endRecordingResourceUploadResult, echoParameters, echoResult, reportCrashParameters, reportCrashResult } from "./Internal";

@@ -164,2 +164,18 @@ interface Events {

/**
* Emit data about a request body as it is processed.
* Parts are not guaranteed to be emitted in order.
*/
"Network.requestBodyData": {
parameters: requestBodyData;
sessionId: true;
};
/**
* Emit data about a response body as it is processed.
* Parts are not guaranteed to be emitted in order.
*/
"Network.responseBodyData": {
parameters: responseBodyData;
sessionId: true;
};
/**
* Describe some requests that were dispatched by the recording.

@@ -1011,2 +1027,26 @@ *

/**
* Query the recording for all of the parts of this request body.
* The server will emit 'requestBodyData' events for all parts, and
* this command will not complete until all parts have been sent.
*/
"Network.getRequestBody": {
parameters: getRequestBodyParameters;
result: getRequestBodyResult;
sessionId: true;
pauseId: false;
binary: false;
};
/**
* Query the recording for all of the parts of this response body.
* The server will emit 'responseBodyData' events for all parts, and
* this command will not complete until all parts have been sent.
*/
"Network.getResponseBody": {
parameters: getResponseBodyParameters;
result: getResponseBodyResult;
sessionId: true;
pauseId: false;
binary: false;
};
/**
* Query the recording for all network data that is available, returning once

@@ -1174,2 +1214,12 @@ * all 'Network.requests' events have been dispatched.

/**
* Fetch the current data entry for a given driver OnNetworkStreamData call.
*/
"Target.getCurrentNetworkStreamData": {
parameters: getCurrentNetworkStreamDataParameters;
result: getCurrentNetworkStreamDataResult;
sessionId: false;
pauseId: false;
binary: false;
};
/**
* Create a new recording.

@@ -1176,0 +1226,0 @@ */

import { TimeStampedPoint } from "./Recording";
/**
* The string id of a request.
*/
export declare type RequestId = string;
/**
* The range offsets within a request/response body.
*/
export interface BodyRange {
/**
* The inclusive start location of the data.
* Defaults to zero.
*/
start?: number;
/**
* The exclusive end location of the data.
* Defaults to the length of the data.
*/
end?: number;
}
/**
* A piece of request/response data. Currently only base64-encoded
* binary data, but may be expanded in the future to handle
* websockets and other data stream types.
*/
export interface BodyData {
/**
* The inclusive start location of the data.
*/
offset: number;
/**
* The length of the data.
*/
length: number;
/**
* A string containing the data.
*/
value: string;
}
/**
* A piece of data from the request body.
*/
export interface RequestBodyData extends BodyData {
/**
* The point where the this piece of request data was sent, for example
* if the request body was generated from a stream, or as many separate
* websocket messages.
*/
point?: TimeStampedPoint;
}
/**
* A piece of data from the response body.
*/
export interface ResponseBodyData extends BodyData {
}
/**
* The basic information about a request.

@@ -9,3 +63,3 @@ */

*/
id: string;
id: RequestId;
/**

@@ -25,3 +79,3 @@ * The point where the request was initiated. The same point may trigger

*/
id: string;
id: RequestId;
/**

@@ -53,3 +107,3 @@ * The time that the info appeared.

*/
export declare type RequestEvent = RequestOpenEvent | RequestRawHeaderEvent | RequestDestinationEvent | RequestResponseEvent | RequestResponseRawHeaderEvent | RequestDoneEvent | RequestFailedEvent;
export declare type RequestEvent = RequestOpenEvent | RequestRawHeaderEvent | RequestDestinationEvent | RequestResponseEvent | RequestResponseRawHeaderEvent | RequestDoneEvent | RequestFailedEvent | RequestResponseBody;
/**

@@ -62,3 +116,3 @@ * An event representing the beginning of a request.

*/
kind: any;
kind: "request";
/**

@@ -89,3 +143,3 @@ * The URL being loaded by the request.

*/
kind: any;
kind: "request-raw-headers";
/**

@@ -103,3 +157,3 @@ * The raw HTTP header that was sent with the request.

*/
kind: any;
kind: "request-destination";
/**

@@ -121,3 +175,3 @@ * The IP address of the destination.

*/
kind: any;
kind: "response";
/**

@@ -151,3 +205,3 @@ * The HTTP headers sent with the response.

*/
kind: any;
kind: "response-raw-headers";
/**

@@ -159,2 +213,13 @@ * The raw HTTP header that was sent with the response.

/**
* An event representing the presence of a response body for this
* request, indicating a Network.getResponseBody command will not
* throw an error for this request.
*/
export interface RequestResponseBody {
/**
* A tagged-union identifier for this event.
*/
kind: "response-body";
}
/**
* An event representing the request having completed.

@@ -166,3 +231,3 @@ */

*/
kind: any;
kind: "request-done";
/**

@@ -185,3 +250,3 @@ * The number of bytes transferred for the body.

*/
kind: any;
kind: "request-failed";
/**

@@ -192,2 +257,26 @@ * A short description of the cause of the failure.

}
export interface getRequestBodyParameters {
/**
* The id of the request to load.
*/
id: RequestId;
/**
* The range of data to fetch from the body.
*/
range?: BodyRange;
}
export interface getRequestBodyResult {
}
export interface getResponseBodyParameters {
/**
* The id of the request to load.
*/
id: RequestId;
/**
* The range of data to fetch from the body.
*/
range?: BodyRange;
}
export interface getResponseBodyResult {
}
export interface findRequestsParameters {

@@ -198,2 +287,30 @@ }

/**
* Emit data about a request body as it is processed.
* Parts are not guaranteed to be emitted in order.
*/
export interface requestBodyData {
/**
* The id of the request to the body belongs to.
*/
id: RequestId;
/**
* Pieces of data belonging to the request body.
*/
parts: RequestBodyData[];
}
/**
* Emit data about a response body as it is processed.
* Parts are not guaranteed to be emitted in order.
*/
export interface responseBodyData {
/**
* The id of the request to the body belongs to.
*/
id: RequestId;
/**
* Pieces of data belonging to the response body.
*/
parts: ResponseBodyData[];
}
/**
* Describe some requests that were dispatched by the recording.

@@ -200,0 +317,0 @@ *

@@ -5,2 +5,16 @@ import { Location, SourceId, SourceLocation } from "./Debugger";

import { RequestEvent } from "./Network";
/**
* Represents the data pieces returned from a network stream. Always "data" for now
* but we'll likely add more in the future to support Websockets.
*/
export interface NetworkStreamData {
/**
* A tagged-union identifier for this data type.
*/
kind: "data";
/**
* A string containing the data.
*/
value: string;
}
export interface convertLocationToFunctionOffsetParameters {

@@ -112,1 +126,17 @@ location: Location;

}
export interface getCurrentNetworkStreamDataParameters {
/**
* The start index within the value to fetch.
*/
index: number;
/**
* The amount of data to fetch.
*/
length: number;
}
export interface getCurrentNetworkStreamDataResult {
/**
* The stream data available at the current location.
*/
data: NetworkStreamData;
}

2

package.json
{
"name": "@recordreplay/protocol",
"version": "0.15.6",
"version": "0.16.0",
"description": "Definition of the protocol used by the Record Replay web service",

@@ -5,0 +5,0 @@ "author": "",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc