-
Notifications
You must be signed in to change notification settings - Fork 70
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
Conversation
src/connection.ts
Outdated
@@ -160,6 +169,13 @@ export class Connection extends JSForceConnection { | |||
return conn; | |||
} | |||
|
|||
private static createReadStreamFromBuffer(buffer: Buffer): fs.ReadStream { |
There was a problem hiding this comment.
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);
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@W-8943593@
see https://github.com/salesforcecli/toolbelt/blob/main/src/lib/core/force.ts#L727 and https://github.com/salesforcecli/toolbelt/blob/main/src/lib/core/force.ts#L712