Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
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 56,576 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.