@replayio/protocol
Advanced tools
Comparing version 0.46.0 to 0.48.0
@@ -14,3 +14,3 @@ import { mayDisconnect, willDisconnect } from "../../protocol/Connection"; | ||
import { getCapabilitiesParameters, convertLocationToFunctionOffsetParameters, convertFunctionOffsetToLocationParameters, convertFunctionOffsetsToLocationsParameters, getStepOffsetsParameters, getHTMLSourceParameters, getFunctionsInRangeParameters, getSourceMapURLParameters, getSheetSourceMapURLParameters, getCurrentMessageContentsParameters, countStackFramesParameters, getStackFunctionIDsParameters, currentGeneratorIdParameters, topFrameLocationParameters, getCurrentNetworkRequestEventParameters, getCurrentNetworkStreamDataParameters, getPossibleBreakpointsForMultipleSourcesParameters, evaluatePrivilegedParameters } from "../../protocol/Target"; | ||
import { createRecordingParameters, setRecordingMetadataParameters, addRecordingDataParameters, finishRecordingParameters, beginRecordingResourceUploadParameters, endRecordingResourceUploadParameters, echoParameters, reportCrashParameters } from "../../protocol/Internal"; | ||
import { createRecordingParameters, uploadRecordingParameters, setRecordingMetadataParameters, addRecordingDataParameters, finishRecordingParameters, beginRecordingResourceUploadParameters, endRecordingResourceUploadParameters, echoParameters, reportCrashParameters } from "../../protocol/Internal"; | ||
import { GenericProtocolClient } from "../generic"; | ||
@@ -825,2 +825,6 @@ export declare class ProtocolClient { | ||
/** | ||
* Upload a recording | ||
*/ | ||
uploadRecording: (parameters: uploadRecordingParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Internal").uploadRecordingResult>; | ||
/** | ||
* Adds metadata that is associated with the entire recording in question, | ||
@@ -827,0 +831,0 @@ * as identified by the id field in the recordingData field. This includes things |
@@ -1063,2 +1063,8 @@ "use strict"; | ||
/** | ||
* Upload a recording | ||
*/ | ||
uploadRecording: function (parameters, sessionId, pauseId) { | ||
return _this.genericClient.sendCommand("Internal.uploadRecording", parameters, sessionId, pauseId); | ||
}, | ||
/** | ||
* Adds metadata that is associated with the entire recording in question, | ||
@@ -1065,0 +1071,0 @@ * as identified by the id field in the recordingData field. This includes things |
@@ -28,3 +28,3 @@ export * from "./Connection"; | ||
import { getCapabilitiesParameters, getCapabilitiesResult, 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, getPossibleBreakpointsForMultipleSourcesParameters, getPossibleBreakpointsForMultipleSourcesResult, evaluatePrivilegedParameters, evaluatePrivilegedResult } from "./Target"; | ||
import { createRecordingParameters, createRecordingResult, setRecordingMetadataParameters, setRecordingMetadataResult, addRecordingDataParameters, addRecordingDataResult, finishRecordingParameters, finishRecordingResult, beginRecordingResourceUploadParameters, beginRecordingResourceUploadResult, endRecordingResourceUploadParameters, endRecordingResourceUploadResult, echoParameters, echoResult, reportCrashParameters, reportCrashResult } from "./Internal"; | ||
import { createRecordingParameters, createRecordingResult, uploadRecordingParameters, uploadRecordingResult, setRecordingMetadataParameters, setRecordingMetadataResult, addRecordingDataParameters, addRecordingDataResult, finishRecordingParameters, finishRecordingResult, beginRecordingResourceUploadParameters, beginRecordingResourceUploadResult, endRecordingResourceUploadParameters, endRecordingResourceUploadResult, echoParameters, echoResult, reportCrashParameters, reportCrashResult } from "./Internal"; | ||
interface Events { | ||
@@ -1392,2 +1392,12 @@ /** | ||
/** | ||
* Upload a recording | ||
*/ | ||
"Internal.uploadRecording": { | ||
parameters: uploadRecordingParameters; | ||
result: uploadRecordingResult; | ||
sessionId: false; | ||
pauseId: false; | ||
binary: false; | ||
}; | ||
/** | ||
* Adds metadata that is associated with the entire recording in question, | ||
@@ -1394,0 +1404,0 @@ * as identified by the id field in the recordingData field. This includes things |
@@ -52,2 +52,29 @@ import { RecordingId, BuildId } from "./Recording"; | ||
} | ||
export interface uploadRecordingParameters { | ||
/** | ||
* Build Id of the software which produced the recording. | ||
*/ | ||
buildId: BuildId; | ||
/** | ||
* For integrity purposes, it's useful to know how much data will be in | ||
* the finished recording. | ||
*/ | ||
recordingSize: number; | ||
/** | ||
* Identifier for the recording. Must be a version 4 UUID. If not specified, | ||
* a new ID will be created. | ||
*/ | ||
recordingId?: RecordingId; | ||
} | ||
export interface uploadRecordingResult { | ||
/** | ||
* Identifier for the recording. Matches the input `recordingId` if it was | ||
* specified. | ||
*/ | ||
recordingId: RecordingId; | ||
/** | ||
* A URL to upload the recording data to. | ||
*/ | ||
uploadLink: string; | ||
} | ||
export interface setRecordingMetadataParameters { | ||
@@ -54,0 +81,0 @@ recordingData: RecordingData; |
@@ -113,2 +113,28 @@ import { Location, EventHandlerType, PointDescription } from "./Debugger"; | ||
/** | ||
* A preload expression is an expression that will be evaluated in the global | ||
* scope and then used by an evaluation. This allows us to perform a few | ||
* optimizations to make evaluation faster. | ||
* | ||
* If 'shareProcesses' is not enabled, this primarily allows things to be slightly | ||
* faster by allowing us to amortize parsing costs for large expression, | ||
* because while we still need to evaluate it at every point, we can load/parse | ||
* the expression ahead of time. | ||
* | ||
* If 'shareProcesses' is enabled, we're also able to evaluate the preload | ||
* a single time and reused that value across multiple points. We guarantee that | ||
* an evaluated preload will always be used for a contiguous monotonic sequence of | ||
* the input points, but we make no guarantees about how many of these independent | ||
* sequences there will be, or how each sequnce will be determined. | ||
*/ | ||
export interface RunEvaluationPreload { | ||
/** | ||
* The name to expose in the evaluation scope. | ||
*/ | ||
name: string; | ||
/** | ||
* An expression to evaluate to get a value. | ||
*/ | ||
expression: string; | ||
} | ||
/** | ||
* Defines the possible bias values for the focus window request. | ||
@@ -279,2 +305,47 @@ */ | ||
fullReturnedPropertyPreview?: boolean; | ||
/** | ||
* By default, evaluations are executed in independent processes, | ||
* so the results will be similar to what you'd expect calling | ||
* <code>Session.findPoints</code> and then indiviually creating Pause | ||
* objects at each point. This is guaranteed to be safe, but means that | ||
* evaluations can be quite slow on large numbers of points. | ||
* | ||
* This flag switches our evaluation infrastructure to instead perform | ||
* the evaluations inline as a process runs forward, which can be | ||
* significantly faster, however this comes with much stricter expectations | ||
* around what operations the evaluations may perform. | ||
* | ||
* In practice, this primarily means that evaluations must not have any | ||
* side-effects that would cause the recorded process to behave differently | ||
* from how it behaved when it was recorded. | ||
* The difficulty here is that it is often quite hard to know ahead of | ||
* time what things do and do not cause divergences in behavior, because | ||
* replay recordings at a very low level. As such it is very hard for | ||
* us to make any guarantees about behavior when using this flag. | ||
* | ||
* As a good rule of thumb, evaluations performed with this flag enabled | ||
* should aim to consider the entire JS environment as read-only except | ||
* for code loaded by the evaluated expressions. Thus | ||
* | ||
* 1. Only mutate properties if the object was explicitly created by the | ||
* evaluated expressions themselves, and never trigger getter properties. | ||
* 2. Only call functions created by the evaluated expressions themselves. | ||
* 3. Never directly or indirectly call global libraries provided | ||
* by the browser, like 'console.log' or 'new Date', which may internally | ||
* mutate browser state held outside the JS engine. | ||
* | ||
* These restrictions also apply during generation of the full protocol | ||
* response PauseData values, so clients should either limit their result | ||
* values to primitive types, or ensure that objects in the result | ||
* are not at risk of triggerig the above cases when generating previews. | ||
* | ||
* NOTE: This flag is not presently supported consistently across our | ||
* target runtimes and will be ignored in those contexts. | ||
*/ | ||
shareProcesses?: boolean; | ||
/** | ||
* An array of expression preloads to expose for this evaluation. | ||
* See <code>Session.RunEvaluationPreload</code> for more info. | ||
*/ | ||
preloadExpressions?: RunEvaluationPreload[]; | ||
} | ||
@@ -281,0 +352,0 @@ export interface runEvaluationResult { |
{ | ||
"name": "@replayio/protocol", | ||
"version": "0.46.0", | ||
"version": "0.48.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
524830
12188