New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@replayio/replay

Package Overview
Dependencies
Maintainers
7
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@replayio/replay - npm Package Compare versions

Comparing version 0.0.0-experimental-53e0a221 to 0.0.0-experimental-6ca7d6b6

16

metadata/index.d.ts
import { Options } from "../src/types";
import * as test from "./test";
import * as source from "./source";
import { UnstructuredMetadata } from "./types";
declare function sanitize(metadata: UnstructuredMetadata, opts?: Options): UnstructuredMetadata;
export { sanitize, test };
/**
* Adds unstructured metadata to the local recordings database.
*
* New metadata will be merged with existing data. If the same key is used by
* multiple entries, the most recent entry's value will be used.
*
* Metadata is not validated until the recording is uploaded so arbitrary keys
* may be used here to manage recordings before upload.
*
* @param recordingId UUID of the recording
* @param metadata Recording metadata
*/
declare function add(recordingId: string, metadata: Record<string, unknown>): void;
export { add, sanitize, source, test };
//# sourceMappingURL=index.d.ts.map

@@ -25,4 +25,9 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.test = exports.sanitize = void 0;
exports.test = exports.source = exports.sanitize = exports.add = void 0;
const fs_1 = require("fs");
const path_1 = __importDefault(require("path"));
const utils_1 = require("../src/utils");

@@ -32,2 +37,3 @@ const test = __importStar(require("./test"));

const source = __importStar(require("./source"));
exports.source = source;
// Each known metadata block should have a sanitizer that will check the contents before the upload

@@ -69,2 +75,24 @@ const handlers = {

exports.sanitize = sanitize;
/**
* Adds unstructured metadata to the local recordings database.
*
* New metadata will be merged with existing data. If the same key is used by
* multiple entries, the most recent entry's value will be used.
*
* Metadata is not validated until the recording is uploaded so arbitrary keys
* may be used here to manage recordings before upload.
*
* @param recordingId UUID of the recording
* @param metadata Recording metadata
*/
function add(recordingId, metadata) {
const entry = {
id: recordingId,
kind: "addMetadata",
metadata,
timestamp: Date.now(),
};
(0, fs_1.appendFileSync)(path_1.default.join((0, utils_1.getDirectory)(), "recordings.log"), `\n${JSON.stringify(entry)}\n`);
}
exports.add = add;
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "@replayio/replay",
"version": "0.0.0-experimental-53e0a221",
"version": "0.0.0-experimental-6ca7d6b6",
"description": "CLI tool for uploading and managing recordings",

@@ -37,3 +37,3 @@ "bin": {

},
"gitHead": "53e0a221b829fbb8b30248cab5482ed0a41662d4",
"gitHead": "6ca7d6b62051ae3c3f4e0f62c4a530650453207b",
"devDependencies": {

@@ -40,0 +40,0 @@ "@types/ws": "^8.5.3",

@@ -25,3 +25,4 @@ import { ensurePuppeteerBrowsersInstalled, ensurePlaywrightBrowsersInstalled, getPlaywrightBrowserPath, getPuppeteerBrowserPath, updateBrowsers } from "./install";

declare function removeAllRecordings(opts?: {}): void;
export { listAllRecordings, uploadRecording, processRecording, uploadAllRecordings, viewRecording, viewLatestRecording, removeRecording, removeAllRecordings, updateBrowsers, ensurePlaywrightBrowsersInstalled, ensurePuppeteerBrowsersInstalled, getPlaywrightBrowserPath, getPuppeteerBrowserPath, };
declare function addLocalRecordingMetadata(recordingId: string, metadata: Record<string, unknown>): void;
export { addLocalRecordingMetadata, listAllRecordings, uploadRecording, processRecording, uploadAllRecordings, viewRecording, viewLatestRecording, removeRecording, removeAllRecordings, updateBrowsers, ensurePlaywrightBrowsersInstalled, ensurePuppeteerBrowsersInstalled, getPlaywrightBrowserPath, getPuppeteerBrowserPath, };
//# sourceMappingURL=main.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getPuppeteerBrowserPath = exports.getPlaywrightBrowserPath = exports.ensurePuppeteerBrowsersInstalled = exports.ensurePlaywrightBrowsersInstalled = exports.updateBrowsers = exports.removeAllRecordings = exports.removeRecording = exports.viewLatestRecording = exports.viewRecording = exports.uploadAllRecordings = exports.processRecording = exports.uploadRecording = exports.listAllRecordings = void 0;
exports.getPuppeteerBrowserPath = exports.getPlaywrightBrowserPath = exports.ensurePuppeteerBrowsersInstalled = exports.ensurePlaywrightBrowsersInstalled = exports.updateBrowsers = exports.removeAllRecordings = exports.removeRecording = exports.viewLatestRecording = exports.viewRecording = exports.uploadAllRecordings = exports.processRecording = exports.uploadRecording = exports.listAllRecordings = exports.addLocalRecordingMetadata = void 0;
const fs_1 = __importDefault(require("fs"));

@@ -19,2 +19,3 @@ const path_1 = __importDefault(require("path"));

const child_process_1 = require("child_process");
const metadata_1 = require("../metadata");
function getRecordingsFile(dir) {

@@ -468,2 +469,6 @@ return path_1.default.join(dir, "recordings.log");

exports.removeAllRecordings = removeAllRecordings;
function addLocalRecordingMetadata(recordingId, metadata) {
(0, metadata_1.add)(recordingId, metadata);
}
exports.addLocalRecordingMetadata = addLocalRecordingMetadata;
//# sourceMappingURL=main.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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