@hello-bill/node 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/express/index.d.cts +1 -1
- package/dist/express/index.d.ts +1 -1
- package/dist/express/index.js +29 -3
- package/dist/express/index.js.map +1 -1
- package/dist/express/index.mjs +29 -3
- package/dist/express/index.mjs.map +1 -1
- package/dist/hono/index.d.cts +1 -1
- package/dist/hono/index.d.ts +1 -1
- package/dist/hono/index.js +28 -12
- package/dist/hono/index.js.map +1 -1
- package/dist/hono/index.mjs +28 -12
- package/dist/hono/index.mjs.map +1 -1
- package/dist/{index-EXetQn1f.d.ts → index-C2MzlH64.d.ts} +11 -1
- package/dist/{index-BrfG82zs.d.cts → index-YlknV1_H.d.cts} +11 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/dist/koa/index.d.cts +1 -1
- package/dist/koa/index.d.ts +1 -1
- package/dist/koa/index.js +28 -11
- package/dist/koa/index.js.map +1 -1
- package/dist/koa/index.mjs +28 -11
- package/dist/koa/index.mjs.map +1 -1
- package/dist/next/index.d.cts +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +19 -4
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +19 -4
- package/dist/next/index.mjs.map +1 -1
- package/dist/webhook/index.d.cts +1 -1
- package/dist/webhook/index.d.ts +1 -1
- package/dist/webhook/index.js +14 -2
- package/dist/webhook/index.js.map +1 -1
- package/dist/webhook/index.mjs +14 -3
- package/dist/webhook/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to `@hello-bill/node` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.3] - 2026-05-29
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Lockstep version bump with `@hello-bill/sdk` 1.0.3 (no functional change to
|
|
13
|
+
`@hello-bill/node`). The session middleware already forwards the partner's
|
|
14
|
+
`gmaps_key` to the embed.
|
|
15
|
+
|
|
8
16
|
## [0.0.1] - 2026-05-16
|
|
9
17
|
|
|
10
18
|
### Added
|
package/dist/express/index.d.cts
CHANGED
package/dist/express/index.d.ts
CHANGED
package/dist/express/index.js
CHANGED
|
@@ -392,8 +392,16 @@ var InMemoryWebhookDedupeStore = class {
|
|
|
392
392
|
};
|
|
393
393
|
|
|
394
394
|
// src/webhook/handler.ts
|
|
395
|
+
var UnknownWebhookEventError = class extends Error {
|
|
396
|
+
code = "webhook.unknown_event_type";
|
|
397
|
+
constructor(eventType) {
|
|
398
|
+
super(`Unhandled webhook event type: ${eventType}`);
|
|
399
|
+
this.name = "UnknownWebhookEventError";
|
|
400
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
401
|
+
}
|
|
402
|
+
};
|
|
395
403
|
function assertNever(x) {
|
|
396
|
-
throw new
|
|
404
|
+
throw new UnknownWebhookEventError(x.type ?? JSON.stringify(x));
|
|
397
405
|
}
|
|
398
406
|
var noopLogger = {
|
|
399
407
|
debug: () => {
|
|
@@ -558,7 +566,10 @@ function createWebhookHandler(opts) {
|
|
|
558
566
|
safeLogger.error("hellobill.webhook.handler_error", {
|
|
559
567
|
event_id: event.id,
|
|
560
568
|
event_type: event.type,
|
|
561
|
-
message: err.message
|
|
569
|
+
message: err.message,
|
|
570
|
+
// Include the typed error code when present so partners can identify
|
|
571
|
+
// known error classes (e.g. unknown event type) in log aggregation.
|
|
572
|
+
...err != null && typeof err === "object" && "code" in err ? { code: err.code } : {}
|
|
562
573
|
});
|
|
563
574
|
});
|
|
564
575
|
};
|
|
@@ -930,6 +941,21 @@ function createHellobillHandler(opts) {
|
|
|
930
941
|
}
|
|
931
942
|
return result;
|
|
932
943
|
}
|
|
944
|
+
|
|
945
|
+
// src/_internal/normalise-headers.ts
|
|
946
|
+
function normaliseHeaders(raw) {
|
|
947
|
+
const out = { ...raw };
|
|
948
|
+
for (const [k, v] of Object.entries(raw)) {
|
|
949
|
+
if (k.toLowerCase() === "hellobill-signature") {
|
|
950
|
+
if (out["x-hellobill-signature"] === void 0) {
|
|
951
|
+
out["x-hellobill-signature"] = v;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
return out;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// src/express/index.ts
|
|
933
959
|
function loadExpress() {
|
|
934
960
|
try {
|
|
935
961
|
const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)));
|
|
@@ -946,7 +972,7 @@ function toHellobillRequest(req) {
|
|
|
946
972
|
url: req.url,
|
|
947
973
|
query: req.query,
|
|
948
974
|
body: req.body,
|
|
949
|
-
headers: req.headers,
|
|
975
|
+
headers: normaliseHeaders(req.headers),
|
|
950
976
|
params: req.params,
|
|
951
977
|
rawBody: req.rawBody
|
|
952
978
|
};
|