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

Wr/deploy #390

Merged
merged 8 commits into from
Apr 2, 2021
Merged

Wr/deploy #390

merged 8 commits into from
Apr 2, 2021

Conversation

@@ -160,6 +169,13 @@ export class Connection extends JSForceConnection {
return conn;
}

private static createReadStreamFromBuffer(buffer: Buffer): fs.ReadStream {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not do this...

Why not just do something like:

import { Readable } from 'stream';
...
Readable.from(buffer);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried transforming the buffer into a ReadableStream just about every way that I could find without any working. The api seems to only accept types of fs.ReadStream. I'm very open to pairing and showing you what I tried and the results they produce

'Sforce-Call-Options': 'client=sfdx-core',
};
const url = `${this.baseUrl()}/metadata/deployRequest`;
const request = Transport.prototype._getHttpRequestModule();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugg, we should keep this in mind with jsforce v2. I know we want this in jsforce but it would be nice to make this better for people trying to extend jsforce.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this and the above Buffer to fs.ReadStream are the two big things I don't like about how we're doing it. I wasn't sure what the best way to do the request was here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants