diff --git a/dist/client.cjs b/dist/client.cjs index 52c8b04..bef943b 100644 --- a/dist/client.cjs +++ b/dist/client.cjs @@ -796,7 +796,9 @@ var PubSubApiClient = class { } catch (error) { let replayId; try { - replayId = decodeReplayId(event.replayId); + if (event.replayId) { + replayId = decodeReplayId(event.replayId); + } } catch (error2) { } const message = replayId ? `Failed to parse event with replay ID ${replayId}` : `Failed to parse event with unknown replay ID (latest replay ID was ${latestReplayId})`; diff --git a/dist/client.d.ts.map b/dist/client.d.ts.map index 26fe683..b7502b0 100644 --- a/dist/client.d.ts.map +++ b/dist/client.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.js"],"names":[],"mappings":"AA6GA;;;;GAIG;AACH;IA+BI;;;;OAIG;IACH,oBAHW,aAAa,WACb,MAAM,EAehB;IAED;;;;;OAKG;IACH,WAHa,OAAO,CAAC,IAAI,CAAC,CAkEzB;IAED;;;;OAIG;IACH,wBAHa,OAAO,CAAC,iBAAiB,CAAC,CAKtC;IAED;;;;;;OAMG;IACH,sCALW,MAAM,qBACN,iBAAiB,iBACjB,MAAM,GAAG,IAAI,QAgBvB;IAED;;;;;;;OAOG;IACH,iCANW,MAAM,qBACN,iBAAiB,gBACjB,MAAM,GAAG,IAAI,YACb,MAAM,QAkBhB;IAED;;;;;;OAMG;IACH,qBALW,MAAM,qBACN,iBAAiB,iBACjB,MAAM,GAAG,IAAI,QAWvB;IAmND;;;;OAIG;IACH,mCAHW,MAAM,gBACN,MAAM,QAqBhB;IAED;;;;;;;OAOG;IACH,mBANW,MAAM,iCAEN,MAAM,GACJ,OAAO,CAAC,aAAa,CAAC,CA4ClC;IAED;;;OAGG;IACH,cAMC;;CAkFJ;;cAzoBa,MAAM;oBACN,MAAM;;+CAMT,gBAAgB,gBAChB,qBAAqB;;UAOlB,gBAAgB;;uBAEhB,iBAAiB;;;eAMjB,MAAM;yBACN,MAAM;wBACN,MAAM;kBACN,MAAM;;;cAMN,QAAQ;oBACR,MAAM;cACN,MAAM;cACN,MAAM;cACN,MAAM;eACN,MAAM;cACN,MAAM;kBACN,MAAM;gBACN,MAAM;iBACN,MAAM;iBACN,MAAM;oBACN,MAAM;;;;;;;;;eAeN,MAAM;kBACN,MAAM;mBACN,MAAM;eACN,MAAM;;kCA1Fc,eAAe;8BAKT,0BAA0B;;;;6BAWxD,MAAM;;;;;;;;;yBAXwB,0BAA0B"} \ No newline at end of file +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.js"],"names":[],"mappings":"AA6GA;;;;GAIG;AACH;IA+BI;;;;OAIG;IACH,oBAHW,aAAa,WACb,MAAM,EAehB;IAED;;;;;OAKG;IACH,WAHa,OAAO,CAAC,IAAI,CAAC,CAkEzB;IAED;;;;OAIG;IACH,wBAHa,OAAO,CAAC,iBAAiB,CAAC,CAKtC;IAED;;;;;;OAMG;IACH,sCALW,MAAM,qBACN,iBAAiB,iBACjB,MAAM,GAAG,IAAI,QAgBvB;IAED;;;;;;;OAOG;IACH,iCANW,MAAM,qBACN,iBAAiB,gBACjB,MAAM,GAAG,IAAI,YACb,MAAM,QAkBhB;IAED;;;;;;OAMG;IACH,qBALW,MAAM,qBACN,iBAAiB,iBACjB,MAAM,GAAG,IAAI,QAWvB;IAqND;;;;OAIG;IACH,mCAHW,MAAM,gBACN,MAAM,QAqBhB;IAED;;;;;;;OAOG;IACH,mBANW,MAAM,iCAEN,MAAM,GACJ,OAAO,CAAC,aAAa,CAAC,CA4ClC;IAED;;;OAGG;IACH,cAMC;;CAkFJ;;cA3oBa,MAAM;oBACN,MAAM;;+CAMT,gBAAgB,gBAChB,qBAAqB;;UAOlB,gBAAgB;;uBAEhB,iBAAiB;;;eAMjB,MAAM;yBACN,MAAM;wBACN,MAAM;kBACN,MAAM;;;cAMN,QAAQ;oBACR,MAAM;cACN,MAAM;cACN,MAAM;cACN,MAAM;eACN,MAAM;cACN,MAAM;kBACN,MAAM;gBACN,MAAM;iBACN,MAAM;iBACN,MAAM;oBACN,MAAM;;;;;;;;;eAeN,MAAM;kBACN,MAAM;mBACN,MAAM;eACN,MAAM;;kCA1Fc,eAAe;8BAKT,0BAA0B;;;;6BAWxD,MAAM;;;;;;;;;yBAXwB,0BAA0B"} \ No newline at end of file diff --git a/dist/client.js b/dist/client.js index 270a1a4..8f4200b 100644 --- a/dist/client.js +++ b/dist/client.js @@ -763,7 +763,9 @@ var PubSubApiClient = class { } catch (error) { let replayId; try { - replayId = decodeReplayId(event.replayId); + if (event.replayId) { + replayId = decodeReplayId(event.replayId); + } } catch (error2) { } const message = replayId ? `Failed to parse event with replay ID ${replayId}` : `Failed to parse event with unknown replay ID (latest replay ID was ${latestReplayId})`; diff --git a/package-lock.json b/package-lock.json index 3f016a9..8beaff7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "salesforce-pubsub-api-client", - "version": "5.0.2", + "version": "5.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "salesforce-pubsub-api-client", - "version": "5.0.2", + "version": "5.0.3", "license": "CC0-1.0", "dependencies": { "@grpc/grpc-js": "^1.12.2", "@grpc/proto-loader": "^0.7.13", "avro-js": "^1.12.0", "certifi": "^14.5.15", - "jsforce": "^3.6.2", + "jsforce": "^3.6.3", "undici": "^6.21.0" }, "devDependencies": { @@ -24,9 +24,9 @@ "husky": "^9.1.7", "jasmine": "^5.4.0", "lint-staged": "^15.2.10", - "prettier": "^3.3.3", + "prettier": "^3.4.1", "tsup": "^8.3.5", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2828,9 +2828,9 @@ } }, "node_modules/jsforce": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/jsforce/-/jsforce-3.6.2.tgz", - "integrity": "sha512-+3viDi+2o9mEldGpXh0N30VFDmx8uCkmnfzH5Are80Likaf29vXWOhXM21uXHGaNQjWm1duJAvMqNKw7s08jfQ==", + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/jsforce/-/jsforce-3.6.3.tgz", + "integrity": "sha512-OZ2kOo9J6xrkFx7l8mgVmWhQ+fjJTisEMle7wFihCd1SS8pdiIZQZnFgU0q/RyLSzihuU5AbwdVM634er45vpw==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.1", @@ -3635,10 +3635,11 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -4361,9 +4362,9 @@ } }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index d7d3f61..ccd678a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salesforce-pubsub-api-client", - "version": "5.0.2", + "version": "5.0.3", "type": "module", "description": "A node client for the Salesforce Pub/Sub API", "author": "pozil", @@ -28,7 +28,7 @@ "@grpc/proto-loader": "^0.7.13", "avro-js": "^1.12.0", "certifi": "^14.5.15", - "jsforce": "^3.6.2", + "jsforce": "^3.6.3", "undici": "^6.21.0" }, "devDependencies": { @@ -39,9 +39,9 @@ "husky": "^9.1.7", "jasmine": "^5.4.0", "lint-staged": "^15.2.10", - "prettier": "^3.3.3", + "prettier": "^3.4.1", "tsup": "^8.3.5", - "typescript": "^5.6.3" + "typescript": "^5.7.2" }, "lint-staged": { "**/*.{css,html,js,json,md,yaml,yml}": [