bookish-press 0.9.3 → 0.9.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/README.md +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,6 +50,22 @@ The content lives in `scripts/demo-book.js` and the images are drawn by `scripts
|
|
|
50
50
|
|
|
51
51
|
It uses the offset emulator ports from `firebase.test.json`, so it doesn't collide with another project's emulators on the default ports, and it builds the app rather than running `vite dev` — the reader route's server render pulls the chapter model through a module cycle that Vite's dev SSR evaluator can't order, though the production build resolves it fine.
|
|
52
52
|
|
|
53
|
+
## Storage CORS
|
|
54
|
+
|
|
55
|
+
Book images live in Firebase Storage and are fetched by the browser when
|
|
56
|
+
building an EPUB, which requires the bucket to send CORS headers. It does not
|
|
57
|
+
by default, and without them every image is silently dropped from the export.
|
|
58
|
+
`cors.json` holds the policy; apply it to a project's bucket with:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
gcloud storage buckets update gs://<project>.appspot.com --cors-file=cors.json --project <project>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
It is applied to both `bookish-prod` and `bookish-dev-21ac3`. The objects are
|
|
65
|
+
already world-readable — the thumbnail function calls `makePublic()` on upload —
|
|
66
|
+
so allowing `GET` from any origin grants nothing that a plain HTTP request
|
|
67
|
+
couldn't already do.
|
|
68
|
+
|
|
53
69
|
## Deployment notes
|
|
54
70
|
|
|
55
71
|
There are two major components to Bookish: the authoring platform and the reading front end. Changes to the authoring platform that do not affect reading can be verified and deployed to Firebase without any other coordination. However, changes to the reading experience have downstream dependencies that need to be managed. Here's the general deployment workflow, which I'm currently using as reminders for myself:
|