
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
chrome-remote-debug-protocol
Advanced tools
Auto generated crdp.d.ts typings from protocol.json files used by Chrome Remote Debugging Protocol
This package is purely a typings typescript d.ts interface that is automatically generated.
It has scripts to download the latest protocol.json files from the Chromium repo, verify structural integrity based on protocol.d.ts and generate a crdp.d.ts typescript interface.
Travis CI runs a nightly job to check that protocol.json from google doesn't have structural breaks. Thanks to this project, a few have already been detected and fixed.
crdp.d.ts is a JsonRpc2 compliant interface. It is meant to be used with noice-json-rpc package.
Rather than callbacks, noice-json-rpc returns Promises. This means it can be used async-await style.
noice-json-rpc also provides a .api()
to return an ES6 proxy which provides a clean api.Domain.function() calls.
Checkout this project. Install the dependencies (see .travis.yml) and run
npm run download-protocols
npm run generate-crdp
import fs from 'fs'
import Crdp from 'chrome-remote-debug-protocol'
import {Client} from 'noice-json-rpc'
// run connects to `node --inspect --debug-brk` process, and profiles the execution of a script
async function run() {
try {
// We want the api to be a CrdpClient
const api:Crdp.CrdpClient = new Client(new WebSocket("ws://localhost:8080"), {logConsole: true}).api()
// Initialize debugging
await Promise.all([
api.Runtime.enable(),
api.Debugger.enable(),
api.Profiler.enable(),
api.Runtime.run(),
])
// Wait until the script finishes
await new Promise((resolve) => api.Runtime.onExecutionContextDestroyed(resolve))
// Get the cpuProfile back
const cpuProfile = await api.Profiler.stop()
// Save it to a file
fs.writeFileSync("profile.cpuProfile", JSON.stringify(cpuProfile), 'utf-8')
} catch (e) {
console.error(e)
}
}
run()
FAQs
Auto generated crdp.d.ts typings from protocol.json files used by Chrome Remote Debugging Protocol
The npm package chrome-remote-debug-protocol receives a total of 2,045 weekly downloads. As such, chrome-remote-debug-protocol popularity was classified as popular.
We found that chrome-remote-debug-protocol demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.