@fastly/hono-compute-js-static-publish 0.5.4 → 0.5.5
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 +17 -10
- package/README.md +33 -0
- package/package.json +1 -1
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.5.5] - 2026-11-06
|
|
11
|
+
|
|
12
|
+
### Updated
|
|
13
|
+
|
|
14
|
+
- README: this package does not support `@fastly/compute-js-static-publish` v8.0, and will be deprecated when that package supports Hono directly. A workaround example for v8.0.
|
|
15
|
+
|
|
10
16
|
## [0.5.4] - 2026-02-13
|
|
11
17
|
|
|
12
18
|
### Updated
|
|
@@ -66,13 +72,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
66
72
|
|
|
67
73
|
- Initial public release
|
|
68
74
|
|
|
69
|
-
[unreleased]: https://github.com/
|
|
70
|
-
[0.5.
|
|
71
|
-
[0.5.
|
|
72
|
-
[0.5.
|
|
73
|
-
[0.5.
|
|
74
|
-
[0.5.
|
|
75
|
-
[0.
|
|
76
|
-
[0.
|
|
77
|
-
[0.
|
|
78
|
-
[0.1.
|
|
75
|
+
[unreleased]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.5.5...HEAD
|
|
76
|
+
[0.5.5]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.5.4...v0.5.5
|
|
77
|
+
[0.5.4]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.5.3...v0.5.4
|
|
78
|
+
[0.5.3]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.5.2...v0.5.3
|
|
79
|
+
[0.5.2]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.5.1...v0.5.2
|
|
80
|
+
[0.5.1]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.5.0...v0.5.1
|
|
81
|
+
[0.5.0]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.3.0...v0.5.0
|
|
82
|
+
[0.3.0]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.2.0...v0.3.0
|
|
83
|
+
[0.2.0]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.1.1...v0.2.0
|
|
84
|
+
[0.1.1]: https://github.com/fastly/hono-compute-js-static-publish/compare/v0.1.0...v0.1.1
|
|
85
|
+
[0.1.0]: https://github.com/fastly/hono-compute-js-static-publish/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -8,6 +8,39 @@ Works with:
|
|
|
8
8
|
* Hono v4.x
|
|
9
9
|
* [@fastly/compute-js-static-publish](https://www.npmjs.com/package/@fastly/compute-js-static-publish) v6.x and v7.x
|
|
10
10
|
|
|
11
|
+
> [!NOTE]
|
|
12
|
+
> This package does not support `@fastly/compute-js-static-publish` v8.0. A future version of `@fastly/compute-js-static-publish` will support Hono directly, and this package will be deprecated.
|
|
13
|
+
>
|
|
14
|
+
> As a workaround, you can serve the published files from a Hono app using `PublisherServer` directly:
|
|
15
|
+
>
|
|
16
|
+
> ```javascript
|
|
17
|
+
> import { Hono } from 'hono';
|
|
18
|
+
> import { fire } from '@fastly/hono-fastly-compute';
|
|
19
|
+
> import { PublisherServer } from '@fastly/compute-js-static-publish';
|
|
20
|
+
> import rc from '../static-publish.rc.js';
|
|
21
|
+
>
|
|
22
|
+
> const publisherServer = PublisherServer.fromStaticPublishRc(rc);
|
|
23
|
+
>
|
|
24
|
+
> const app = new Hono();
|
|
25
|
+
>
|
|
26
|
+
> // Your own routes go before the static files.
|
|
27
|
+
> app.get('/api/hello', (c) => c.json({ hello: 'world' }));
|
|
28
|
+
>
|
|
29
|
+
> // Serve the published files. serveRequest() also serves the SPA file or the
|
|
30
|
+
> // 404 page, so a route after this middleware does not get requests.
|
|
31
|
+
> app.use('*', async (c, next) => {
|
|
32
|
+
> const response = await publisherServer.serveRequest(c.req.raw);
|
|
33
|
+
> if (response != null) {
|
|
34
|
+
> return response;
|
|
35
|
+
> }
|
|
36
|
+
> await next();
|
|
37
|
+
> });
|
|
38
|
+
>
|
|
39
|
+
> fire(app);
|
|
40
|
+
> ```
|
|
41
|
+
>
|
|
42
|
+
> Install `hono` and `@fastly/hono-fastly-compute` in the app. With `@fastly/js-compute` v4, use `@fastly/hono-fastly-compute` v0.4.0 or later.
|
|
43
|
+
|
|
11
44
|
## Example
|
|
12
45
|
|
|
13
46
|
### compute-js-static-publish v7
|