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

@wdio/repl

Package Overview
Dependencies
Maintainers
3
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/repl - npm Package Compare versions

Comparing version 7.20.7 to 8.0.0-alpha.213

9

build/constants.js

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_CONFIG = exports.INTRO_MESSAGE = exports.STATIC_RETURNS = void 0;
exports.STATIC_RETURNS = {
export const STATIC_RETURNS = {
driver: '[WebdriverIO REPL client]',

@@ -10,3 +7,3 @@ browser: '[WebdriverIO REPL client]',

};
exports.INTRO_MESSAGE = `
export const INTRO_MESSAGE = `
The execution has stopped!

@@ -16,3 +13,3 @@ You can now go into the browser or use the command line as REPL

`;
exports.DEFAULT_CONFIG = {
export const DEFAULT_CONFIG = {
commandTimeout: 5000,

@@ -19,0 +16,0 @@ prompt: '\u203A ',

@@ -33,4 +33,4 @@ /**

/// <reference types="node" />
import vm from 'vm';
import repl from 'repl';
import vm from 'node:vm';
import repl from 'node:repl';
export interface ReplConfig {

@@ -50,3 +50,3 @@ commandTimeout: number;

constructor(config?: ReplConfig);
eval(cmd: string, context: vm.Context, filename: string | undefined, callback: ReplCallback): void | Promise<any>;
eval(cmd: string, context: vm.Context, filename: string | undefined, callback: ReplCallback): void;
private _runCmd;

@@ -53,0 +53,0 @@ private _handleResult;

@@ -1,2 +0,1 @@

"use strict";
/**

@@ -32,14 +31,9 @@ *

*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const vm_1 = __importDefault(require("vm"));
const repl_1 = __importDefault(require("repl"));
const utils_1 = require("@wdio/utils");
const constants_1 = require("./constants");
class WDIORepl {
import vm from 'node:vm';
import repl from 'node:repl';
import { STATIC_RETURNS, INTRO_MESSAGE, DEFAULT_CONFIG } from './constants.js';
export default class WDIORepl {
constructor(config) {
this._isCommandRunning = false;
this._config = Object.assign(constants_1.DEFAULT_CONFIG, { eval: this.eval.bind(this) }, config);
this._config = Object.assign(DEFAULT_CONFIG, { eval: this.eval.bind(this) }, config);
}

@@ -50,11 +44,7 @@ eval(cmd, context, filename, callback) {

}
if (cmd && constants_1.STATIC_RETURNS[cmd.trim()]) {
return callback(null, constants_1.STATIC_RETURNS[cmd.trim()]);
if (cmd && STATIC_RETURNS[cmd.trim()]) {
return callback(null, STATIC_RETURNS[cmd.trim()]);
}
vm_1.default.createContext(context);
vm.createContext(context);
this._isCommandRunning = true;
/* istanbul ignore if */
if (utils_1.hasWdioSyncSupport) {
return (0, utils_1.runFnInFiberContext)(() => this._runCmd(cmd, context, callback))();
}
return this._runCmd(cmd, context, callback);

@@ -64,3 +54,3 @@ }

try {
const result = vm_1.default.runInContext(cmd, context);
const result = vm.runInContext(cmd, context);
return this._handleResult(result, callback);

@@ -119,3 +109,3 @@ }

}
this._replServer = repl_1.default.start(this._config);
this._replServer = repl.start(this._config);
return new Promise((resolve) => {

@@ -126,3 +116,2 @@ return this._replServer.on('exit', resolve);

}
exports.default = WDIORepl;
WDIORepl.introMessage = constants_1.INTRO_MESSAGE;
WDIORepl.introMessage = INTRO_MESSAGE;
{
"name": "@wdio/repl",
"version": "7.20.7",
"version": "8.0.0-alpha.213+c5fb6d57e",
"description": "A WDIO helper utility to provide a repl interface for WebdriverIO",

@@ -8,5 +8,4 @@ "author": "Christian Bromann <mail@bromann.dev>",

"license": "MIT",
"main": "./build/index",
"engines": {
"node": ">=12.0.0"
"node": "^16.13 || >=18"
},

@@ -26,11 +25,10 @@ "repository": {

},
"type": "module",
"exports": "./build/index.js",
"types": "./build/index.d.ts",
"typeScriptVersion": "3.8.3",
"dependencies": {
"@wdio/utils": "7.20.7"
},
"publishConfig": {
"access": "public"
},
"gitHead": "21b8b61453f4749d87eca3e4d7d6e5e2cb60f043"
"gitHead": "c5fb6d57e168d8bf939a5aa5c2ada5abaceec5eb"
}

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