New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript definition of protocol #18

Closed
paulirish opened this Issue May 18, 2017 · 11 comments

Comments

Projects
None yet
7 participants
@paulirish
Member

paulirish commented May 18, 2017

I've seen a number of developers interested in this.

Currently, there is no officially maintained typescript definition file. We have no immediate plans to begin offering one, but I wanted to point at a great alternative from the community.

I recommend looking at these two projects:
➡️ @krisselden's chrome-debugging-client (see tot.ts)
➡️ @nojvek's chrome-remote-debug-protocol (see crdp.d.ts). (a fork by @roblourens is currently more maintained)

Comment edited March 2018

@JustinRyanH

This comment has been minimized.

Show comment
Hide comment
@JustinRyanH

JustinRyanH May 19, 2017

I'm working on project to solve this. I'm open to forking off the section relating to Type definitions to it's own repo and collaborating. https://github.com/MajorHard/Enz/tree/proto_types

JustinRyanH commented May 19, 2017

I'm working on project to solve this. I'm open to forking off the section relating to Type definitions to it's own repo and collaborating. https://github.com/MajorHard/Enz/tree/proto_types

@krisselden

This comment has been minimized.

Show comment
Hide comment
@krisselden

krisselden May 19, 2017

https://github.com/krisselden/chrome-debugging-client already works well for automating Chrome, can run headless chrome just fine, just call spawn with additional --headless arg.

@paulirish what's missing? just an example of running a test?

krisselden commented May 19, 2017

https://github.com/krisselden/chrome-debugging-client already works well for automating Chrome, can run headless chrome just fine, just call spawn with additional --headless arg.

@paulirish what's missing? just an example of running a test?

@paulirish

This comment has been minimized.

Show comment
Hide comment
@paulirish

paulirish May 19, 2017

Member

@krisselden nothings really missing for me! was just sending folks your way for now.

Member

paulirish commented May 19, 2017

@krisselden nothings really missing for me! was just sending folks your way for now.

@krisselden

This comment has been minimized.

Show comment
Hide comment
@krisselden

krisselden May 19, 2017

@paulirish I updated the tests on travis to use headless instead of the x virtual frame buffer https://travis-ci.org/krisselden/chrome-debugging-client and added it to the README example.

krisselden commented May 19, 2017

@paulirish I updated the tests on travis to use headless instead of the x virtual frame buffer https://travis-ci.org/krisselden/chrome-debugging-client and added it to the README example.

@JustinRyanH

This comment has been minimized.

Show comment
Hide comment
@JustinRyanH

JustinRyanH May 19, 2017

@krisselden I think I've confused chrome-debugg-protocol with your repo. Use the current work as a learning experience.

JustinRyanH commented May 19, 2017

@krisselden I think I've confused chrome-debugg-protocol with your repo. Use the current work as a learning experience.

@auchenberg

This comment has been minimized.

Show comment
Hide comment
@auchenberg
Contributor

auchenberg commented Jul 21, 2017

@nojvek

This comment has been minimized.

Show comment
Hide comment
@nojvek

nojvek Jul 21, 2017

Contributor

I built a project a while ago that pulls in the protocol.json files from v8 and chrome repos and automatically generate crdp.d.ts files.

The generator lives here: https://github.com/nojvek/chrome-remote-debug-protocol/blob/master/src/protocolToCrdp.ts

@roblourens has a fork that pulls in specific versions of protocol.json and builds version specific crdp.d.ts for use in vscode chrome debugger and node inspector. https://github.com/roblourens/chrome-remote-debug-protocol/blob/master/src/main.ts

crdp.d.ts is promise based and works great with async await: https://github.com/nojvek/chrome-remote-debug-protocol/blob/master/lib/crdp.d.ts

Do note that chrome debugging protocol changes quite a bit, maintaining by hand will quickly get out of hand.

Contributor

nojvek commented Jul 21, 2017

I built a project a while ago that pulls in the protocol.json files from v8 and chrome repos and automatically generate crdp.d.ts files.

The generator lives here: https://github.com/nojvek/chrome-remote-debug-protocol/blob/master/src/protocolToCrdp.ts

@roblourens has a fork that pulls in specific versions of protocol.json and builds version specific crdp.d.ts for use in vscode chrome debugger and node inspector. https://github.com/roblourens/chrome-remote-debug-protocol/blob/master/src/main.ts

crdp.d.ts is promise based and works great with async await: https://github.com/nojvek/chrome-remote-debug-protocol/blob/master/lib/crdp.d.ts

Do note that chrome debugging protocol changes quite a bit, maintaining by hand will quickly get out of hand.

@Bnaya

This comment has been minimized.

Show comment
Hide comment
@Bnaya

Bnaya Jul 29, 2017

It will be very useful to have @types package with the protocol declarations so all of the projects as chrome-remote-interface will depend on to create their own declarations.

What would be the name of such package?

Bnaya commented Jul 29, 2017

It will be very useful to have @types package with the protocol declarations so all of the projects as chrome-remote-interface will depend on to create their own declarations.

What would be the name of such package?

@bbrzoska

This comment has been minimized.

Show comment
Hide comment
@bbrzoska

bbrzoska Aug 10, 2017

@Bnaya @types packages have to map to actual NPM packages.

bbrzoska commented Aug 10, 2017

@Bnaya @types packages have to map to actual NPM packages.

@nojvek

This comment has been minimized.

Show comment
Hide comment
@nojvek

nojvek Aug 10, 2017

Contributor
Contributor

nojvek commented Aug 10, 2017

@paulirish paulirish referenced this issue Sep 14, 2017

Open

FAQ #55

@paulirish

This comment has been minimized.

Show comment
Hide comment
@paulirish

paulirish Apr 3, 2018

Member

This has been contributed to the repo in #90

It's shipped in the npm package devtools-protocol@0.0.547074

Thanks @nojvek !

Member

paulirish commented Apr 3, 2018

This has been contributed to the repo in #90

It's shipped in the npm package devtools-protocol@0.0.547074

Thanks @nojvek !

@paulirish paulirish closed this Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment