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

@recordreplay/playwright-config

Package Overview
Dependencies
Maintainers
7
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@recordreplay/playwright-config - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

install.d.ts

9

index.d.ts

@@ -1,7 +0,7 @@

declare type BrowserName = 'chromium' | 'firefox' | 'webkit';
export declare function getExecutablePath(browserName: BrowserName): string | undefined;
import { BrowserName } from "@recordreplay/recordings-cli";
export declare function getExecutablePath(browserName: BrowserName): string | null;
export declare const devices: {
readonly "Replay Firefox": {
launchOptions: {
executablePath: string | undefined;
executablePath: string | null;
env: {

@@ -15,3 +15,3 @@ RECORD_ALL_CONTENT: number;

launchOptions: {
executablePath: string | undefined;
executablePath: string | null;
env: {

@@ -24,3 +24,2 @@ RECORD_ALL_CONTENT: number;

};
export {};
//# sourceMappingURL=index.d.ts.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.devices = exports.getExecutablePath = void 0;
const path_1 = __importDefault(require("path"));
const EXECUTABLE_PATHS = {
"darwin:firefox": ["firefox", "Nightly.app", "Contents", "MacOS", "firefox"],
"linux:chromium": ["chrome-linux", "chrome"],
"linux:firefox": ["firefox", "firefox"],
};
function getPlatformKey(browserName) {
const key = `${process.platform}:${browserName}`;
switch (key) {
case "darwin:firefox":
case "linux:firefox":
case "linux:chromium":
return key;
}
return undefined;
}
function getExecutablePath(browserName) {
// Override with replay specific browsers.
const replayDir = process.env.RECORD_REPLAY_DIRECTORY ||
path_1.default.join(process.env.HOME, ".replay");
const key = getPlatformKey(browserName);
if (!key) {
return;
}
return path_1.default.join(replayDir, "playwright", ...EXECUTABLE_PATHS[key]);
}
exports.getExecutablePath = getExecutablePath;
const recordings_cli_1 = require("@recordreplay/recordings-cli");
function getDeviceConfig(browserName) {
const executablePath = getExecutablePath(browserName);
const executablePath = (0, recordings_cli_1.getPlaywrightBrowserPath)(browserName);
if (!executablePath) {

@@ -43,3 +14,3 @@ console.warn(`${browserName} is not supported on this platform`);

env: {
RECORD_ALL_CONTENT: 1
RECORD_ALL_CONTENT: 1,
},

@@ -50,2 +21,6 @@ },

}
function getExecutablePath(browserName) {
return (0, recordings_cli_1.getPlaywrightBrowserPath)(browserName);
}
exports.getExecutablePath = getExecutablePath;
exports.devices = {

@@ -52,0 +27,0 @@ get "Replay Firefox"() {

{
"name": "@recordreplay/playwright-config",
"version": "0.1.1",
"version": "0.2.0",
"description": "Configuration utilities for using the Replay browsers with playwright",
"main": "index.js",
"scripts": {
"install": "node -e 'process.exit(require(\"fs\").existsSync(\"./install.js\") ? 1 : 0)' || node ./install.js",
"build": "tsc && cp package.json dist/",

@@ -14,3 +15,6 @@ "test": "echo \"Error: no test specified\" && exit 1"

"@types/node": "^17.0.21"
},
"dependencies": {
"@recordreplay/recordings-cli": "^0.10.1"
}
}

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