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

chrome-debugging-client

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-debugging-client - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

dist/chrome-debugging-client.d.ts

10

dist/index.d.ts

@@ -6,6 +6,6 @@ import { AttachMessageTransport } from "@tracerbench/message-transport";

import { RaceCancellation } from "race-cancellation";
export * from "@tracerbench/message-transport";
export * from "@tracerbench/protocol-connection/types";
export * from "@tracerbench/spawn/types";
export * from "@tracerbench/spawn-chrome/types";
export type { AttachMessageTransport, OnMessage, OnClose, SendMessage, } from "@tracerbench/message-transport";
export type { ProtocolConnection, RootConnection, SessionConnection, ProtocolConnectionBase, EventListener, EventEmitter, EventPredicate, NewEventEmitter, TargetID, TargetInfo, SessionID, Method, Event, EventMapping, RequestMapping, ResponseMapping, VoidRequestMethod, MappedRequestMethod, MaybeMappedRequestMethod, VoidResponseMethod, MappedResponseMethod, VoidRequestVoidResponseMethod, VoidRequestMappedResponseMethod, VoidEvent, MappedEvent, SessionIdentifier, } from "@tracerbench/protocol-connection/types";
export type { DebugCallback, Process, ProcessWithPipeMessageTransport, ProcessWithWebSocketUrl, Stdio, TransportMapping, Transport, } from "@tracerbench/spawn/types";
export type { ArgumentOptions, SpawnOptions, Chrome, } from "@tracerbench/spawn-chrome/types";
export declare function spawnChrome(options?: Partial<SpawnOptions>): ChromeWithPipeConnection;

@@ -15,3 +15,3 @@ export declare function spawnWithPipe(executable: string, args: string[], stdio?: Stdio): ProcessWithPipeConnection;

export declare function newProtocolConnection(attach: AttachMessageTransport, raceCancellation?: RaceCancellation): RootConnection;
export { default as openWebSocket, } from "@tracerbench/websocket-message-transport";
export { default as openWebSocket } from "@tracerbench/websocket-message-transport";
export { default as findChrome } from "@tracerbench/find-chrome";

@@ -18,0 +18,0 @@ export interface ChromeWithPipeConnection extends Chrome {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.newProtocolConnection = exports.spawnWithWebSocket = exports.spawnWithPipe = exports.spawnChrome = void 0;
const protocol_connection_1 = require("@tracerbench/protocol-connection");

@@ -33,5 +34,5 @@ const spawn_1 = require("@tracerbench/spawn");

var websocket_message_transport_2 = require("@tracerbench/websocket-message-transport");
exports.openWebSocket = websocket_message_transport_2.default;
Object.defineProperty(exports, "openWebSocket", { enumerable: true, get: function () { return websocket_message_transport_2.default; } });
var find_chrome_1 = require("@tracerbench/find-chrome");
exports.findChrome = find_chrome_1.default;
Object.defineProperty(exports, "findChrome", { enumerable: true, get: function () { return find_chrome_1.default; } });
function attachPipeTransport(process) {

@@ -38,0 +39,0 @@ const connection = newProtocolConnection(process.attach, process.raceExit);

{
"name": "chrome-debugging-client",
"version": "1.2.0",
"version": "1.3.0",
"description": "An async/await friendly Chrome debugging client with TypeScript support",

@@ -16,12 +16,13 @@ "license": "BSD-2-Clause",

"clean": "rm -rf dist tsconfig.tsbuildinfo",
"lint": "tslint -p tsconfig.json",
"fixlint": "eslint --ext .ts src --fix",
"lint": "eslint --ext .ts src",
"prepare": "yarn run build"
},
"dependencies": {
"@tracerbench/find-chrome": "^1.2.0",
"@tracerbench/message-transport": "^1.2.0",
"@tracerbench/protocol-connection": "^1.2.0",
"@tracerbench/spawn": "^1.2.0",
"@tracerbench/spawn-chrome": "^1.2.0",
"@tracerbench/websocket-message-transport": "^1.2.0",
"@tracerbench/find-chrome": "^1.3.0",
"@tracerbench/message-transport": "^1.3.0",
"@tracerbench/protocol-connection": "^1.3.0",
"@tracerbench/spawn": "^1.3.0",
"@tracerbench/spawn-chrome": "^1.3.0",
"@tracerbench/websocket-message-transport": "^1.3.0",
"debug": "^4.1.1",

@@ -32,7 +33,11 @@ "race-cancellation": "^0.4.1"

"@types/debug": "^4.1.5",
"@types/node": "^12.12.11",
"prettier": "^1.19.1",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"@types/node": "^14.0.5",
"@typescript-eslint/eslint-plugin": "^3.0.2",
"@typescript-eslint/parser": "^3.0.2",
"eslint": "^7.1.0",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-simple-import-sort": "^5.0.0",
"prettier": "^2.0.5",
"typescript": "^3.7.2"

@@ -43,3 +48,3 @@ },

},
"gitHead": "3318d9cdbd6bce276ebe8e2570bd64c1aaa16046"
"gitHead": "930bc11c8b01620e5095df9249f0647af68235b5"
}

@@ -42,3 +42,2 @@ # chrome-debugging-client

#!/usr/bin/env node
// @ts-check
const { writeFileSync } = require("fs");

@@ -95,3 +94,5 @@ const { spawnChrome } = require("chrome-debugging-client");

printToPDF(process.argv[2], process.argv[3]);
printToPDF(process.argv[2], process.argv[3]).catch((err) => {
console.log("print failed %o", err);
});

@@ -103,3 +104,3 @@ ```

```js file=examples/nodeDebug.js
// @ts-check
#!/usr/bin/env node
const { spawnWithWebSocket } = require("chrome-debugging-client");

@@ -153,3 +154,3 @@

console.log(`set breakpoint on line 3`);
connection.send("Debugger.setBreakpoint", {
await connection.send("Debugger.setBreakpoint", {
location: {

@@ -204,4 +205,6 @@ lineNumber: 3,

main();
main().catch((err) => {
console.log("print failed %o", err);
});
```

@@ -23,6 +23,50 @@ import { AttachMessageTransport } from "@tracerbench/message-transport";

export * from "@tracerbench/message-transport";
export * from "@tracerbench/protocol-connection/types";
export * from "@tracerbench/spawn/types";
export * from "@tracerbench/spawn-chrome/types";
export type {
AttachMessageTransport,
OnMessage,
OnClose,
SendMessage,
} from "@tracerbench/message-transport";
export type {
ProtocolConnection,
RootConnection,
SessionConnection,
ProtocolConnectionBase,
EventListener,
EventEmitter,
EventPredicate,
NewEventEmitter,
TargetID,
TargetInfo,
SessionID,
Method,
Event,
EventMapping,
RequestMapping,
ResponseMapping,
VoidRequestMethod,
MappedRequestMethod,
MaybeMappedRequestMethod,
VoidResponseMethod,
MappedResponseMethod,
VoidRequestVoidResponseMethod,
VoidRequestMappedResponseMethod,
VoidEvent,
MappedEvent,
SessionIdentifier,
} from "@tracerbench/protocol-connection/types";
export type {
DebugCallback,
Process,
ProcessWithPipeMessageTransport,
ProcessWithWebSocketUrl,
Stdio,
TransportMapping,
Transport,
} from "@tracerbench/spawn/types";
export type {
ArgumentOptions,
SpawnOptions,
Chrome,
} from "@tracerbench/spawn-chrome/types";

@@ -64,3 +108,3 @@ export function spawnChrome(

raceCancellation?: RaceCancellation,
) {
): RootConnection {
return _newProtocolConnection(

@@ -74,5 +118,3 @@ attach,

export {
default as openWebSocket,
} from "@tracerbench/websocket-message-transport";
export { default as openWebSocket } from "@tracerbench/websocket-message-transport";

@@ -90,3 +132,6 @@ export { default as findChrome } from "@tracerbench/find-chrome";

async function close(timeout?: number, raceCancellation?: RaceCancellation) {
async function close(
timeout?: number,
raceCancellation?: RaceCancellation,
): Promise<void> {
if (process.hasExited()) {

@@ -109,3 +154,3 @@ return;

async function sendBrowserClose() {
async function sendBrowserClose(): Promise<void> {
try {

@@ -112,0 +157,0 @@ await connection.send("Browser.close");

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