@fireemu/darwin-arm64 0.14.0 → 0.16.0
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/README.md +1 -1
- package/bin/fireemu +0 -0
- package/bin/runner-node/index.mjs +14 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @fireemu/darwin-arm64
|
|
2
2
|
|
|
3
3
|
The [fireemu](https://www.npmjs.com/package/fireemu) daemon built for `darwin-arm64`
|
|
4
|
-
(Rust target `aarch64-apple-darwin`), version 0.
|
|
4
|
+
(Rust target `aarch64-apple-darwin`), version 0.16.0.
|
|
5
5
|
|
|
6
6
|
macOS 13 or newer on Apple silicon.
|
|
7
7
|
|
package/bin/fireemu
CHANGED
|
Binary file
|
|
@@ -1508,11 +1508,22 @@ async function invoke(functions, manifest, msg) {
|
|
|
1508
1508
|
await fn({ ...msg.event, data: storageObjectInRecordedOrder(msg.event.data) });
|
|
1509
1509
|
return;
|
|
1510
1510
|
case "pubsub":
|
|
1511
|
-
// A custom event reaches the handler as the CloudEvent itself, exactly as the official
|
|
1512
|
-
// Eventarc emulator POSTs it to the functions emulator.
|
|
1513
|
-
case "eventarc":
|
|
1514
1511
|
await fn(msg.event);
|
|
1515
1512
|
return;
|
|
1513
|
+
case "eventarc": {
|
|
1514
|
+
// Eventarc Standard delivers binary CloudEvents. The production JSON body parser
|
|
1515
|
+
// admits objects and arrays before invoking the function; the emulator sends a
|
|
1516
|
+
// structured envelope instead. Strict conversion omits datacontenttype for JSON.
|
|
1517
|
+
const contentType = msg.event.datacontenttype;
|
|
1518
|
+
const jsonBody = contentType === undefined ||
|
|
1519
|
+
(typeof contentType === "string" && /^application\/json(?:\s*;|$)/i.test(contentType.trim()));
|
|
1520
|
+
if (strictProfile() && jsonBody && Object.hasOwn(msg.event, "data") &&
|
|
1521
|
+
(msg.event.data === null || typeof msg.event.data !== "object")) {
|
|
1522
|
+
throw new SyntaxError("Eventarc binary JSON body must be an object or array");
|
|
1523
|
+
}
|
|
1524
|
+
await fn(msg.event);
|
|
1525
|
+
return;
|
|
1526
|
+
}
|
|
1516
1527
|
case "auth":
|
|
1517
1528
|
throw new Error("Auth user events are delivered to v1 auth.user() handlers only");
|
|
1518
1529
|
default:
|