@fastly/hono-fastly-compute 0.3.3 → 0.3.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 CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [unreleased]
9
9
 
10
+ ## [0.3.4] - 2025-10-17
11
+
12
+ ### Added
13
+
14
+ - Improve `executionCtx` and `event` integration
15
+
10
16
  ## [0.3.3] - 2025-10-15
11
17
 
12
18
  ### Changed
@@ -42,7 +48,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42
48
 
43
49
  - Initial public release
44
50
 
45
- [unreleased]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.3...HEAD
51
+ [unreleased]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.4...HEAD
52
+ [0.3.4]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.3...v0.3.4
46
53
  [0.3.3]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.2...v0.3.3
47
54
  [0.3.2]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.1...v0.3.2
48
55
  [0.3.1]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.0...v0.3.1
package/README.md CHANGED
@@ -101,9 +101,18 @@ The returned `fire` function has two purposes:
101
101
  1. When called with a Hono app instance (`fire(app)`), it registers the app to handle fetch events.
102
102
  2. It exposes a `Bindings` type (`typeof fire.Bindings`) that you can use to define your Hono `Env`.
103
103
 
104
+ ### `fire(app, options)`
105
+
106
+ Registers your Hono app to handle fetch events. No user-defined bindings are
107
+ applied to `c.env`. Equivalent to the return value of `buildFire({})`.
108
+
109
+ ### Type `Bindings`
110
+
111
+ Default bindings which can be used when no user-defined bindings are present. Alias of `fire.Bindings`.
112
+
104
113
  ### `handle(app, bindingsDefs, options)`
105
114
 
106
- The core adapter function that connects Hono to the Fastly Compute `FetchEvent`. The `buildFire` function is a higher-level utility that uses `handle` internally.
115
+ The core adapter function that connects Hono to the Fastly Compute `FetchEvent`. The `fire` function is a higher-level utility that uses `handle` internally.
107
116
 
108
117
  - **`app`**: The Hono application instance.
109
118
  - **`bindingsDefs`**: The environment bindings definition.
package/build/handler.js CHANGED
@@ -17,13 +17,13 @@ export const handle = (app, envBindingsDefs, opts = {
17
17
  serverInfo: evt.server,
18
18
  };
19
19
  const env = buildContextProxyOn(envBase, envBindingsDefs);
20
- const res = await app.fetch(evt.request, env, {
21
- waitUntil: evt.waitUntil.bind(evt),
20
+ const executionCtx = Object.assign(evt, {
22
21
  passThroughOnException() {
23
22
  throw new Error('Not implemented');
24
23
  },
25
- props: undefined,
24
+ props: {},
26
25
  });
26
+ const res = await app.fetch(evt.request, env, executionCtx);
27
27
  if (opts.fetch && res.status === 404) {
28
28
  return await opts.fetch(evt.request);
29
29
  }
package/build/index.d.ts CHANGED
@@ -3,4 +3,10 @@ export * from './handler.js';
3
3
  export * from './utils.js';
4
4
  export * from './conninfo.js';
5
5
  export type { ResourceType, Context, ContextProxy, BindingsDefs, } from '@fastly/compute-js-context';
6
+ declare module 'hono/types' {
7
+ interface FetchEventLike {
8
+ readonly client: ClientInfo;
9
+ readonly server: ServerInfo;
10
+ }
11
+ }
6
12
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastly/hono-fastly-compute",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Helper utilities for using Hono with Fastly Compute",
5
5
  "license": "MIT",
6
6
  "repository": {