@fastly/hono-fastly-compute 0.3.4 → 0.3.6
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 +15 -1
- package/build/fire.d.ts +2 -2
- package/build/fire.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.6] - 2025-10-19
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Within `fire()`, run a dummy `match()` against the router, forcing it to build any caches during the pre-wizer step.
|
|
15
|
+
|
|
16
|
+
## [0.3.5] - 2025-10-19
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Fixed incorrect type on FireFn overload
|
|
21
|
+
|
|
10
22
|
## [0.3.4] - 2025-10-17
|
|
11
23
|
|
|
12
24
|
### Added
|
|
@@ -48,7 +60,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
48
60
|
|
|
49
61
|
- Initial public release
|
|
50
62
|
|
|
51
|
-
[unreleased]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.
|
|
63
|
+
[unreleased]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.6...HEAD
|
|
64
|
+
[0.3.6]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.5...v0.3.6
|
|
65
|
+
[0.3.5]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.4...v0.3.5
|
|
52
66
|
[0.3.4]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.3...v0.3.4
|
|
53
67
|
[0.3.3]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.2...v0.3.3
|
|
54
68
|
[0.3.2]: https://github.com/fastly/hono-fastly-compute/compare/v0.3.1...v0.3.2
|
package/build/fire.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Schema } from 'hono';
|
|
2
2
|
import type { HonoBase } from 'hono/hono-base';
|
|
3
|
-
import type { BindingsDefs
|
|
3
|
+
import type { BindingsDefs } from '@fastly/compute-js-context';
|
|
4
4
|
import { type BindingsWithClientInfo, type HandleOptions } from './handler.js';
|
|
5
5
|
/**
|
|
6
6
|
* Registers a Hono app to handle fetch events in Fastly Compute.
|
|
@@ -29,7 +29,7 @@ type FireFn<D extends BindingsDefs> = {
|
|
|
29
29
|
<V extends {
|
|
30
30
|
Variables?: object;
|
|
31
31
|
}, S extends Schema, BasePath extends string>(app: HonoBase<{
|
|
32
|
-
Bindings:
|
|
32
|
+
Bindings: BindingsWithClientInfo<D>;
|
|
33
33
|
} & V, S, BasePath>, options?: HandleOptions): void;
|
|
34
34
|
/**
|
|
35
35
|
* The inferred bindings type, derived from the defs passed to `buildFire()`.
|
package/build/fire.js
CHANGED
|
@@ -40,6 +40,9 @@ import { handle } from './handler.js';
|
|
|
40
40
|
*/
|
|
41
41
|
export function buildFire(bindingsDefs) {
|
|
42
42
|
const fireFn = ((app, options = { fetch: undefined, }) => {
|
|
43
|
+
// Run a dummy match() against the router.
|
|
44
|
+
// This forces the router (for example, RegExpRouter) to build any caches in the pre-wizer step.
|
|
45
|
+
app.router.match('', '');
|
|
43
46
|
addEventListener('fetch', handle(app, bindingsDefs, options));
|
|
44
47
|
});
|
|
45
48
|
fireFn._defs = bindingsDefs;
|