@recordreplay/protocol
Advanced tools
Comparing version 0.3.0 to 0.4.0
import { metadataChange, uploadedData, sessionError, getDescriptionParameters, getMetadataParameters, setMetadataParameters, metadataStartListeningParameters, metadataStopListeningParameters, createSessionParameters, releaseSessionParameters, processRecordingParameters } from "../../protocol/Recording"; | ||
import { setAccessTokenParameters } from "../../protocol/Authentication"; | ||
import { missingRegions, unprocessedRegions, mouseEvents, ensureProcessedParameters, findMouseEventsParameters, getEndpointParameters, createPauseParameters, releasePauseParameters } from "../../protocol/Session"; | ||
import { missingRegions, unprocessedRegions, mouseEvents, loadedRegions, ensureProcessedParameters, findMouseEventsParameters, getEndpointParameters, createPauseParameters, releasePauseParameters, listenForLoadChangesParameters, loadRegionParameters, unloadRegionParameters } from "../../protocol/Session"; | ||
import { paintPoints, findPaintsParameters, getPaintContentsParameters, getDevicePixelRatioParameters } from "../../protocol/Graphics"; | ||
@@ -116,2 +116,7 @@ import { newSource, findSourcesParameters, getSourceContentsParameters, getPossibleBreakpointsParameters, getMappedLocationParameters, setBreakpointParameters, removeBreakpointParameters, findResumeTargetParameters, findRewindTargetParameters, findReverseStepOverTargetParameters, findStepOverTargetParameters, findStepInTargetParameters, findStepOutTargetParameters, blackboxSourceParameters, unblackboxSourceParameters } from "../../protocol/Debugger"; | ||
/** | ||
* Describes the regions of the recording which are loading or loaded. | ||
*/ | ||
addLoadedRegionsListener: (listener: (parameters: loadedRegions) => void) => void; | ||
removeLoadedRegionsListener: () => void | undefined; | ||
/** | ||
* Does not return until the recording is fully processed. Before returning, | ||
@@ -143,2 +148,19 @@ * <code>missingRegions</code> and <code>unprocessedRegions</code> events will | ||
releasePause: (parameters: releasePauseParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Session").releasePauseResult>; | ||
/** | ||
* Listen for changes in the loading status of parts of the recording. | ||
* Does not return until the session has been released. Before returning, | ||
* <code>loadedRegions</code> events will be emitted when their status changes. | ||
* By default, the entire recording is loaded. If the recording is long enough, | ||
* earlier loaded regions may be unloaded to reduce backend resource usage. | ||
* Pauses cannot be created or used in unloaded parts of the recording. | ||
*/ | ||
listenForLoadChanges: (parameters: listenForLoadChangesParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Session").listenForLoadChangesResult>; | ||
/** | ||
* Request that an unloaded part of the recording start loading. | ||
*/ | ||
loadRegion: (parameters: loadRegionParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Session").loadRegionResult>; | ||
/** | ||
* Request that part of the recording be unloaded. | ||
*/ | ||
unloadRegion: (parameters: unloadRegionParameters, sessionId?: string | undefined, pauseId?: string | undefined) => Promise<import("../../protocol/Session").unloadRegionResult>; | ||
}; | ||
@@ -145,0 +167,0 @@ /** |
@@ -137,2 +137,9 @@ "use strict"; | ||
/** | ||
* Describes the regions of the recording which are loading or loaded. | ||
*/ | ||
addLoadedRegionsListener: function (listener) { | ||
return _this.genericClient.addEventListener("Session.loadedRegions", listener); | ||
}, | ||
removeLoadedRegionsListener: function () { var _a, _b; return (_b = (_a = _this.genericClient).removeEventListener) === null || _b === void 0 ? void 0 : _b.call(_a, "Session.loadedRegions"); }, | ||
/** | ||
* Does not return until the recording is fully processed. Before returning, | ||
@@ -174,2 +181,25 @@ * <code>missingRegions</code> and <code>unprocessedRegions</code> events will | ||
}, | ||
/** | ||
* Listen for changes in the loading status of parts of the recording. | ||
* Does not return until the session has been released. Before returning, | ||
* <code>loadedRegions</code> events will be emitted when their status changes. | ||
* By default, the entire recording is loaded. If the recording is long enough, | ||
* earlier loaded regions may be unloaded to reduce backend resource usage. | ||
* Pauses cannot be created or used in unloaded parts of the recording. | ||
*/ | ||
listenForLoadChanges: function (parameters, sessionId, pauseId) { | ||
return _this.genericClient.sendCommand("Session.listenForLoadChanges", parameters, sessionId, pauseId); | ||
}, | ||
/** | ||
* Request that an unloaded part of the recording start loading. | ||
*/ | ||
loadRegion: function (parameters, sessionId, pauseId) { | ||
return _this.genericClient.sendCommand("Session.loadRegion", parameters, sessionId, pauseId); | ||
}, | ||
/** | ||
* Request that part of the recording be unloaded. | ||
*/ | ||
unloadRegion: function (parameters, sessionId, pauseId) { | ||
return _this.genericClient.sendCommand("Session.unloadRegion", parameters, sessionId, pauseId); | ||
}, | ||
}; | ||
@@ -176,0 +206,0 @@ /** |
@@ -15,3 +15,3 @@ export * from "./Recording"; | ||
import { setAccessTokenParameters, setAccessTokenResult } from "./Authentication"; | ||
import { missingRegions, unprocessedRegions, mouseEvents, ensureProcessedParameters, ensureProcessedResult, findMouseEventsParameters, findMouseEventsResult, getEndpointParameters, getEndpointResult, createPauseParameters, createPauseResult, releasePauseParameters, releasePauseResult } from "./Session"; | ||
import { missingRegions, unprocessedRegions, mouseEvents, loadedRegions, ensureProcessedParameters, ensureProcessedResult, findMouseEventsParameters, findMouseEventsResult, getEndpointParameters, getEndpointResult, createPauseParameters, createPauseResult, releasePauseParameters, releasePauseResult, listenForLoadChangesParameters, listenForLoadChangesResult, loadRegionParameters, loadRegionResult, unloadRegionParameters, unloadRegionResult } from "./Session"; | ||
import { paintPoints, findPaintsParameters, findPaintsResult, getPaintContentsParameters, getPaintContentsResult, getDevicePixelRatioParameters, getDevicePixelRatioResult } from "./Graphics"; | ||
@@ -70,2 +70,9 @@ import { newSource, findSourcesParameters, findSourcesResult, getSourceContentsParameters, getSourceContentsResult, getPossibleBreakpointsParameters, getPossibleBreakpointsResult, getMappedLocationParameters, getMappedLocationResult, setBreakpointParameters, setBreakpointResult, removeBreakpointParameters, removeBreakpointResult, findResumeTargetParameters, findResumeTargetResult, findRewindTargetParameters, findRewindTargetResult, findReverseStepOverTargetParameters, findReverseStepOverTargetResult, findStepOverTargetParameters, findStepOverTargetResult, findStepInTargetParameters, findStepInTargetResult, findStepOutTargetParameters, findStepOutTargetResult, blackboxSourceParameters, blackboxSourceResult, unblackboxSourceParameters, unblackboxSourceResult } from "./Debugger"; | ||
/** | ||
* Describes the regions of the recording which are loading or loaded. | ||
*/ | ||
"Session.loadedRegions": { | ||
parameters: loadedRegions; | ||
sessionId: true; | ||
}; | ||
/** | ||
* Describes some points in the recording at which paints occurred. No paint | ||
@@ -277,2 +284,37 @@ * will occur for the recording's beginning execution point. | ||
/** | ||
* Listen for changes in the loading status of parts of the recording. | ||
* Does not return until the session has been released. Before returning, | ||
* <code>loadedRegions</code> events will be emitted when their status changes. | ||
* By default, the entire recording is loaded. If the recording is long enough, | ||
* earlier loaded regions may be unloaded to reduce backend resource usage. | ||
* Pauses cannot be created or used in unloaded parts of the recording. | ||
*/ | ||
"Session.listenForLoadChanges": { | ||
parameters: listenForLoadChangesParameters; | ||
result: listenForLoadChangesResult; | ||
sessionId: true; | ||
pauseId: false; | ||
binary: false; | ||
}; | ||
/** | ||
* Request that an unloaded part of the recording start loading. | ||
*/ | ||
"Session.loadRegion": { | ||
parameters: loadRegionParameters; | ||
result: loadRegionResult; | ||
sessionId: true; | ||
pauseId: false; | ||
binary: false; | ||
}; | ||
/** | ||
* Request that part of the recording be unloaded. | ||
*/ | ||
"Session.unloadRegion": { | ||
parameters: unloadRegionParameters; | ||
result: unloadRegionResult; | ||
sessionId: true; | ||
pauseId: false; | ||
binary: false; | ||
}; | ||
/** | ||
* Find all points in the recording at which paints occurred. Does not return | ||
@@ -279,0 +321,0 @@ * until the recording is fully processed. Before returning, |
@@ -60,2 +60,22 @@ import { TimeRange, MouseEvent, TimeStampedPoint, ExecutionPoint } from "./Recording"; | ||
} | ||
export interface listenForLoadChangesParameters { | ||
} | ||
export interface listenForLoadChangesResult { | ||
} | ||
export interface loadRegionParameters { | ||
/** | ||
* Region to load. | ||
*/ | ||
region: TimeRange; | ||
} | ||
export interface loadRegionResult { | ||
} | ||
export interface unloadRegionParameters { | ||
/** | ||
* Region to unload. | ||
*/ | ||
region: TimeRange; | ||
} | ||
export interface unloadRegionResult { | ||
} | ||
/** | ||
@@ -90,1 +110,15 @@ * Event describing regions of the recording that have not been uploaded. | ||
} | ||
/** | ||
* Describes the regions of the recording which are loading or loaded. | ||
*/ | ||
export interface loadedRegions { | ||
/** | ||
* Regions which are fully loaded. | ||
*/ | ||
loaded: TimeRange[]; | ||
/** | ||
* Regions which are in the process of loading. Pauses in these regions | ||
* can still be used, but will be slower. | ||
*/ | ||
loading: TimeRange[]; | ||
} |
{ | ||
"name": "@recordreplay/protocol", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Definition of the protocol used by the Record Replay web service", | ||
@@ -5,0 +5,0 @@ "author": "", |
@@ -1,2 +0,12 @@ | ||
# protocol | ||
# Protocol | ||
Definition of the protocol used by the Record Replay web service | ||
## Publishing | ||
Publishing a new version of the protocol to NPM is as simple as bumping the version, logging in, and publishing. | ||
``` | ||
cd packages/protocol | ||
npm login | ||
npm publish | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
188199
4916
13
1