Skip to content

Commit

Permalink
feat: v5 dist
Browse files Browse the repository at this point in the history
  • Loading branch information
pozil committed Oct 20, 2024
1 parent cdb9fd6 commit 4bb6b36
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
7 changes: 6 additions & 1 deletion dist/client.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ var SalesforceAuth = class {
*/
async #authWithJwtBearer() {
const { clientId, username, loginUrl, privateKey } = this.#config;
if (!privateKey.toString().trim().startsWith("-----BEGIN RSA PRIVATE KEY-----")) {
throw new Error(
`Private key is missing -----BEGIN RSA PRIVATE KEY----- header`
);
}
const header = JSON.stringify({ alg: "RS256" });
const claims = JSON.stringify({
iss: clientId,
Expand Down Expand Up @@ -949,7 +954,7 @@ var PubSubApiClient = class {
this.#logger.info("Clear subscriptions");
this.#subscriptions.clear();
this.#logger.info("Closing gRPC stream");
this.#client.close();
this.#client?.close();
}
/**
* Retrieves an event schema from the cache based on its ID.
Expand Down
2 changes: 1 addition & 1 deletion dist/client.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion dist/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ var SalesforceAuth = class {
*/
async #authWithJwtBearer() {
const { clientId, username, loginUrl, privateKey } = this.#config;
if (!privateKey.toString().trim().startsWith("-----BEGIN RSA PRIVATE KEY-----")) {
throw new Error(
`Private key is missing -----BEGIN RSA PRIVATE KEY----- header`
);
}
const header = JSON.stringify({ alg: "RS256" });
const claims = JSON.stringify({
iss: clientId,
Expand Down Expand Up @@ -916,7 +921,7 @@ var PubSubApiClient = class {
this.#logger.info("Clear subscriptions");
this.#subscriptions.clear();
this.#logger.info("Closing gRPC stream");
this.#client.close();
this.#client?.close();
}
/**
* Retrieves an event schema from the cache based on its ID.
Expand Down
2 changes: 1 addition & 1 deletion dist/utils/auth.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4bb6b36

Please sign in to comment.