@fedify/fedify 1.5.0-dev.745 → 1.5.0-dev.750

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/CHANGES.md CHANGED
@@ -67,6 +67,15 @@ To be released.
67
67
  - Added an optional method `enqueueMany()` to `MessageQueue` interface
68
68
  for sending multiple activities at once.
69
69
 
70
+ - Updated *@js-temporal/polyfill* to 0.5.0 for Node.js and Bun. On Deno,
71
+ there is no change because the polyfill is not used.
72
+
73
+ - Updated *uri-template-router* to 0.0.17 which fixes bundler errors on
74
+ Rollup. [[#221]]
75
+
76
+ - Improved error handling and logging for document loader when KV store
77
+ operations fail. [[#223] by Revath S Kumar]
78
+
70
79
  - Fixed a bug of the `fedify inbox` command where it had failed to render
71
80
  the web interface when the `fedify` command was installed using
72
81
  `deno install` command from JSR.
@@ -91,6 +100,8 @@ To be released.
91
100
  [#211]: https://github.com/fedify-dev/fedify/issues/211
92
101
  [#215]: https://github.com/fedify-dev/fedify/pull/215
93
102
  [#220]: https://github.com/fedify-dev/fedify/issues/220
103
+ [#221]: https://github.com/fedify-dev/fedify/issues/221
104
+ [#223]: https://github.com/fedify-dev/fedify/pull/223
94
105
  [multibase]: https://github.com/multiformats/js-multibase
95
106
 
96
107
 
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.5.0-dev.745+3feb71c5",
3
+ "version": "1.5.0-dev.750+47e9826f",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./mod.ts",
@@ -42,7 +42,7 @@ export default {
42
42
  "mock_fetch": "jsr:@hongminhee/deno-mock-fetch@^0.3.2",
43
43
  "multicodec": "npm:multicodec@^3.2.1",
44
44
  "pkijs": "npm:pkijs@^3.2.4",
45
- "uri-template-router": "npm:uri-template-router@^0.0.16",
45
+ "uri-template-router": "npm:uri-template-router@^0.0.17",
46
46
  "url-template": "npm:url-template@^3.1.1"
47
47
  },
48
48
  "include": [
@@ -310,10 +310,23 @@ export function kvCache({ loader, kv, prefix, rules }) {
310
310
  if (match == null)
311
311
  return await loader(url);
312
312
  const key = [...keyPrefix, url];
313
- const cache = await kv.get(key);
313
+ let cache = undefined;
314
+ try {
315
+ cache = await kv.get(key);
316
+ }
317
+ catch (error) {
318
+ if (error instanceof Error) {
319
+ logger.warn("Failed to get the document of {url} from the KV cache: {error}", { url, error });
320
+ }
321
+ }
314
322
  if (cache == null) {
315
323
  const remoteDoc = await loader(url);
316
- await kv.set(key, remoteDoc, { ttl: match });
324
+ try {
325
+ await kv.set(key, remoteDoc, { ttl: match });
326
+ }
327
+ catch (error) {
328
+ logger.warn("Failed to save the document of {url} to the KV cache: {error}", { url, error });
329
+ }
317
330
  return remoteDoc;
318
331
  }
319
332
  return cache;