rimecms 1.4.1 → 1.4.2

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.
@@ -20,8 +20,10 @@ function logResponse(event, status) {
20
20
  function createCMSHandler(rime) {
21
21
  const handleCMS = async ({ event, resolve }) => {
22
22
  event.locals.rime = rime.createRimeContext(event);
23
- // Once per process: every `$url` page missing an address gets one.
24
- if (!building)
23
+ // Once per process: every `$url` page missing an address gets one. A sub-request, an
24
+ // `event.fetch` of one of the app's own routes, skips it: it runs inside a request that is
25
+ // already awaiting it, so a `beforeRead` hook that fetches would otherwise wait on itself.
26
+ if (!building && !event.isSubRequest)
25
27
  await ensureAddresses(event);
26
28
  const response = await resolve(event).catch((err) => {
27
29
  // Thrown by a later handle step, as handleAuth does: SvelteKit answers it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimecms",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "homepage": "https://github.com/bienbiendev/rime",
5
5
  "packageManager": "bun@1.3.0",
6
6
  "scripts": {