@fedify/fedify 0.15.4 → 0.15.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/CHANGES.md +21 -0
- package/esm/runtime/docloader.js +7 -6
- package/esm/runtime/key.js +1 -1
- package/esm/sig/http.js +1 -1
- package/package.json +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/concat.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/copy.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/ends_with.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/equals.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/includes_needle.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/index_of_needle.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/last_index_of_needle.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/repeat.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/starts_with.d.ts.map +1 -1
- package/types/runtime/docloader.d.ts.map +1 -1
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/concat.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/copy.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/ends_with.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/equals.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/includes_needle.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/index_of_needle.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/last_index_of_needle.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/mod.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/repeat.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/starts_with.js +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/concat.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/copy.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/ends_with.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/equals.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/includes_needle.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/index_of_needle.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/last_index_of_needle.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/mod.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/repeat.d.ts +0 -0
- /package/types/deps/jsr.io/@std/bytes/{1.0.2 → 1.0.3}/starts_with.d.ts +0 -0
package/CHANGES.md
CHANGED
@@ -3,6 +3,27 @@
|
|
3
3
|
Fedify changelog
|
4
4
|
================
|
5
5
|
|
6
|
+
Version 0.15.6
|
7
|
+
--------------
|
8
|
+
|
9
|
+
Released on November 12, 2024.
|
10
|
+
|
11
|
+
- Fixed a bug where default document loaders had thrown a `TypeError`
|
12
|
+
with a message <q>Body is unusable: Body has already been read</q> or
|
13
|
+
<q>Body already consumed</q> when the content type of the response was
|
14
|
+
an HTML document and there's no link to a JSON-LD document.
|
15
|
+
|
16
|
+
|
17
|
+
Version 0.15.5
|
18
|
+
--------------
|
19
|
+
|
20
|
+
Released on October 30, 2024.
|
21
|
+
|
22
|
+
- Fixed a bug where `fetchDocumentLoader()` function had disallowed
|
23
|
+
redirecting to a private network address when the second parameter,
|
24
|
+
a `boolean` value to allow private network addresses, was `true`.
|
25
|
+
|
26
|
+
|
6
27
|
Version 0.15.4
|
7
28
|
--------------
|
8
29
|
|
package/esm/runtime/docloader.js
CHANGED
@@ -86,6 +86,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
86
86
|
}
|
87
87
|
}
|
88
88
|
}
|
89
|
+
let document;
|
89
90
|
if (!jsonLd &&
|
90
91
|
(contentType === "text/html" || contentType?.startsWith("text/html;") ||
|
91
92
|
contentType === "application/xhtml+xml" ||
|
@@ -113,17 +114,17 @@ async function getRemoteDocument(url, response, fetch) {
|
|
113
114
|
return await fetch(new URL(attribs.href, docUrl).href);
|
114
115
|
}
|
115
116
|
}
|
117
|
+
document = JSON.parse(html);
|
118
|
+
}
|
119
|
+
else {
|
120
|
+
document = await response.json();
|
116
121
|
}
|
117
122
|
logger.debug("Fetched document: {status} {url} {headers}", {
|
118
123
|
status: response.status,
|
119
124
|
url: documentUrl,
|
120
125
|
headers: Object.fromEntries(response.headers.entries()),
|
121
126
|
});
|
122
|
-
return {
|
123
|
-
contextUrl,
|
124
|
-
document: await response.json(),
|
125
|
-
documentUrl,
|
126
|
-
};
|
127
|
+
return { contextUrl, document, documentUrl };
|
127
128
|
}
|
128
129
|
/**
|
129
130
|
* A JSON-LD document loader that utilizes the browser's `fetch` API.
|
@@ -171,7 +172,7 @@ export async function fetchDocumentLoader(url, allowPrivateAddress = false) {
|
|
171
172
|
// Follow redirects manually to get the final URL:
|
172
173
|
if (response.status >= 300 && response.status < 400 &&
|
173
174
|
response.headers.has("Location")) {
|
174
|
-
return fetchDocumentLoader(response.headers.get("Location"));
|
175
|
+
return fetchDocumentLoader(response.headers.get("Location"), allowPrivateAddress);
|
175
176
|
}
|
176
177
|
return getRemoteDocument(url, response, (url) => fetchDocumentLoader(url, allowPrivateAddress));
|
177
178
|
}
|
package/esm/runtime/key.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as dntShim from "../_dnt.shims.js";
|
2
2
|
import { createPublicKey } from "node:crypto";
|
3
|
-
import { concat } from "../deps/jsr.io/@std/bytes/1.0.
|
3
|
+
import { concat } from "../deps/jsr.io/@std/bytes/1.0.3/concat.js";
|
4
4
|
import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.224.3/base64.js";
|
5
5
|
import { decodeBase64Url } from "../deps/jsr.io/@std/encoding/0.224.3/base64url.js";
|
6
6
|
import { decodeHex } from "../deps/jsr.io/@std/encoding/0.224.3/hex.js";
|
package/esm/sig/http.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as dntShim from "../_dnt.shims.js";
|
2
2
|
import { getLogger } from "@logtape/logtape";
|
3
|
-
import { equals } from "../deps/jsr.io/@std/bytes/1.0.
|
3
|
+
import { equals } from "../deps/jsr.io/@std/bytes/1.0.3/mod.js";
|
4
4
|
import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.224.3/base64.js";
|
5
5
|
import { CryptographicKey } from "../vocab/vocab.js";
|
6
6
|
import { fetchKey, validateCryptoKey } from "./key.js";
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/concat.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAaxD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/copy.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,SAAI,GAAG,MAAM,CAQzE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ends_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"ends_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/ends_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAWxE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/equals.ts"],"names":[],"mappings":"AA6DA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAQ5D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"includes_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"includes_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/includes_needle.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,SAAI,GACR,OAAO,CAET"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/index_of_needle.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,SAAI,GACR,MAAM,CAqBR"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"last_index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"last_index_of_needle.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/last_index_of_needle.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,GAAE,MAA0B,GAChC,MAAM,CAuBR"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/repeat.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAapE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"starts_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.
|
1
|
+
{"version":3,"file":"starts_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.3/starts_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAS1E"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"docloader.d.ts","sourceRoot":"","sources":["../../src/runtime/docloader.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAG5C,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAQ1D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;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EpB;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC;;OAEG;IACH,GAAG,EAAE,GAAG,CAAC;IAET;;;;;OAKG;gBACS,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAKhD;AAoID;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,EACX,mBAAmB,GAAE,OAAe,GACnC,OAAO,CAAC,cAAc,CAAC,CA0CzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,SAAS,CAAA;CAAE,EACvD,mBAAmB,GAAE,OAAe,GACnC,cAAc,CAgChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;IAEZ;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;IAEf;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;CAC1E;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAC/C,cAAc,CA2ChB"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|