Skip to content
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

Streamed signing and archiving #40

Open
2 tasks
thom4parisot opened this issue Feb 6, 2015 · 1 comment
Open
2 tasks

Streamed signing and archiving #40

thom4parisot opened this issue Feb 6, 2015 · 1 comment
Labels
Milestone

Comments

@thom4parisot
Copy link
Owner

  • crypto.sign apparently accepts ReadableStream
  • generatePackage could return a stream instead of a Buffer object

The entire archive must have been fully read to generate a valid signature, and read again (?) to emit a signed stream.

new Crx().load('./dir').then(function(crx){
  crx.generatePackage().pipe(fs.createWriteStream('./dist/package.crx'));
});
@thom4parisot thom4parisot added this to the v4.0.0 milestone Feb 6, 2015
@thom4parisot thom4parisot removed this from the v4.0 milestone Feb 3, 2019
@ahwayakchih
Copy link
Collaborator

ahwayakchih commented Mar 30, 2019

@oncletom maybe something like i did here: https://github.com/ahwayakchih/crx3/blob/master/lib/crx3stream.js

In short: implement WriteStream, that simply updates sign and passes data to file (after leaving enough space for a header data), but at the end it finishes creating CRX header and writes it at the beginning of file.

@thom4parisot thom4parisot added this to the v5.1 milestone Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants