@fedify/fedify 1.8.1-pr.315.1090 → 1.8.1-pr.315.1275
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 -10
- package/dist/{actor-BX-pKSuT.js → actor-B9oI1pGu.js} +2 -5
- package/dist/{actor-1rvS-py8.d.ts → actor-CYyhXZHp.d.ts} +3 -3
- package/dist/{actor-C02Getjh.js → actor-Cg2FBINf.js} +189 -189
- package/dist/{assert-DwEa6glZ.js → assert-MZs1qjMx.js} +2 -2
- package/dist/{assert_equals-C5gKCm6A.js → assert_equals-DSbWqCm3.js} +9 -9
- package/dist/{assert_instance_of-C9QtN-X9.js → assert_instance_of-DHz7EHNU.js} +2 -2
- package/dist/{assert_is_error-DQdKoRgb.js → assert_is_error-BPGph1Jx.js} +2 -2
- package/dist/{assert_not_equals-7pyUM3Ib.js → assert_not_equals-f3m3epl3.js} +2 -2
- package/dist/{assert_rejects-DceVjUlD.js → assert_rejects-DiIiJbZn.js} +4 -4
- package/dist/{assert_throws-DTDC_gwN.js → assert_throws-BOO88avQ.js} +3 -3
- package/dist/{authdocloader-BbVFhkcz.js → authdocloader-0urt38S6.js} +4 -4
- package/dist/{authdocloader-BZs3nvC8.js → authdocloader-BkwhwBf_.js} +4 -5
- package/dist/{builder-DuW8p2S3.js → builder-B-wZuoFJ.js} +75 -6
- package/dist/{client-DK4qnXK0.d.ts → client-B_KFjN3D.d.ts} +4 -4
- package/dist/{client-BD0mI7gk.js → client-Cr3DvU-q.js} +3 -3
- package/dist/{collection-Dfb0TPno.js → collection-CSzG2j1P.js} +1 -1
- package/dist/compat/mod.d.ts +12 -12
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +25 -32
- package/dist/{context-BhO5LP_t.d.ts → context-BRl3Ndz3.d.ts} +286 -73
- package/dist/{denokv-QWKsIqML.js → denokv-2x6-IpXO.js} +1 -1
- package/dist/{docloader-umQd797n.js → docloader-BLgRerm3.js} +41 -40
- package/dist/{docloader-DtGccyuM.d.ts → docloader-DJT1UZH4.d.ts} +5 -2
- package/dist/{esm-d-9EVGaP.js → esm-CRotYXVH.js} +15 -15
- package/dist/federation/builder.test.js +35 -21
- package/dist/federation/collection.test.js +13 -11
- package/dist/federation/handler.test.js +341 -40
- package/dist/federation/inbox.test.js +8 -12
- package/dist/federation/keycache.test.js +9 -12
- package/dist/federation/kv.test.js +13 -11
- package/dist/federation/middleware.test.js +65 -42
- package/dist/federation/mod.d.ts +12 -12
- package/dist/federation/mod.js +12 -12
- package/dist/federation/mq.test.js +15 -13
- package/dist/federation/retry.test.js +7 -5
- package/dist/federation/router.test.js +12 -11
- package/dist/federation/send.test.js +19 -25
- package/dist/{federation-C44ekWNP.js → federation-CMX7WzeL.js} +2 -2
- package/dist/{http-D59x3pzl.js → http-BkzChfDi.js} +5 -5
- package/dist/{http-Cp-0z2Ja.d.ts → http-CMfQwn0N.d.ts} +6 -6
- package/dist/{http-CkS9JLmm.js → http-g01-ecph.js} +6 -5
- package/dist/{inbox-BjyNe-HL.js → inbox-CpONbSbQ.js} +2 -4
- package/dist/{key-jxin-rRq.js → key-B9Yg9Nqz.js} +4 -5
- package/dist/{key-Btkh3AwY.js → key-C3aLobhY.js} +4 -4
- package/dist/{key-Cf8lNopw.js → key-DdT7xoLD.js} +4 -4
- package/dist/key-RnJPgo1m.js +10 -0
- package/dist/{keycache-BC5bL06g.js → keycache-BvyhLLHV.js} +2 -2
- package/dist/{keys-Dfntfi5m.js → keys-BRSTnUlp.js} +2 -2
- package/dist/{kv-DDdb1hMa.d.ts → kv-C7sopW2E.d.ts} +2 -2
- package/dist/{kv-D7Yt6pnB.js → kv-CRZrzyXm.js} +1 -1
- package/dist/{ld-DwoZFwEd.js → ld-i6KANj32.js} +3 -5
- package/dist/{lookup-CAXRxPZ3.js → lookup-BGA_VdZm.js} +115 -8
- package/dist/{lookup-gQIU9tXW.js → lookup-D5NvwwsS.js} +2 -2
- package/dist/{lookup-m3U6KA0u.d.ts → lookup-DXPWo3Hz.d.ts} +3 -3
- package/dist/{middleware-BOHju0mN.js → middleware-BdFHk7bB.js} +629 -24
- package/dist/{middleware-cN6r9o1m.js → middleware-Chh21-S_.js} +563 -32
- package/dist/middleware-DEwSbDYQ.js +26 -0
- package/dist/middleware-DyY-_2Np.js +17 -0
- package/dist/{mod-c1I-Ydch.d.ts → mod-Cozftwmt.d.ts} +4 -4
- package/dist/{mod-yPzXIjJX.d.ts → mod-DHoWcUrW.d.ts} +6 -6
- package/dist/{mod-nlVEnYuj.d.ts → mod-DyY7EVjn.d.ts} +6 -6
- package/dist/{mod-BqCBztub.d.ts → mod-DyvbAsBu.d.ts} +6 -6
- package/dist/mod.d.ts +15 -15
- package/dist/mod.js +12 -12
- package/dist/{mq-DYKDDJmp.d.ts → mq-CRGm1e_F.d.ts} +1 -1
- package/dist/nodeinfo/client.test.js +15 -15
- package/dist/nodeinfo/handler.test.js +30 -39
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +13 -11
- package/dist/nodeinfo/types.test.js +14 -12
- package/dist/{owner-BK4eWKBp.d.ts → owner-CfnEgfAc.d.ts} +4 -4
- package/dist/{owner-BrSLT3By.js → owner-DSr0c3Yp.js} +3 -4
- package/dist/{proof-u4rhYX_R.js → proof-B83O-qBN.js} +4 -6
- package/dist/{proof-BDYegzwN.js → proof-a4fXDkG3.js} +7 -7
- package/dist/{retry-BiIhZWgD.js → retry-D4GJ670a.js} +1 -1
- package/dist/runtime/authdocloader.test.js +18 -24
- package/dist/runtime/docloader.test.js +14 -15
- package/dist/runtime/key.test.js +14 -19
- package/dist/runtime/langstr.test.js +12 -11
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +12 -11
- package/dist/runtime/url.test.js +8 -7
- package/dist/{semver-DWClQt_5.js → semver-dArNLkR9.js} +1 -1
- package/dist/{send-DRDKgORs.js → send-QRloWueE.js} +3 -3
- package/dist/sig/http.test.js +40 -23
- package/dist/sig/key.test.js +15 -21
- package/dist/sig/ld.test.js +13 -19
- package/dist/sig/mod.d.ts +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +16 -23
- package/dist/sig/proof.test.js +16 -22
- package/dist/{std__assert-B3iAixc-.js → std__assert-X-_kMxKM.js} +6 -6
- package/dist/testing/docloader.test.js +12 -11
- package/dist/testing/mod.d.ts +8622 -2
- package/dist/testing/mod.js +4 -2
- package/dist/testing-A4u9tSVX.js +302 -0
- package/dist/{transformers-ghwJuzGY.js → transformers-Dna8Fg7k.js} +4 -4
- package/dist/{vocab-C4cyrUaT.js → type-DHDlfpLg.js} +5246 -185
- package/dist/{types-C7C_l-jz.js → types-BIgY6c-l.js} +2 -2
- package/dist/{types-D1lhruqy.js → types-DbFIDnXK.js} +4 -4
- package/dist/vocab/actor.test.js +143 -149
- package/dist/vocab/lookup.test.js +37 -20
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +5 -9
- package/dist/vocab/vocab.test.js +54 -58
- package/dist/{vocab-BaWeqg9y.js → vocab-DN6Plgg2.js} +6 -6
- package/dist/{vocab-B52eQhpN.d.ts → vocab-KgaI50mH.d.ts} +3 -3
- package/dist/webfinger/handler.test.js +30 -39
- package/dist/webfinger/lookup.test.js +13 -14
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +3 -3
- package/dist/x/cfworkers.js +1 -1
- package/dist/x/cfworkers.test.js +13 -11
- package/dist/x/hono.d.ts +16 -16
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.d.ts +13 -13
- package/dist/x/sveltekit.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-HsBuZ-b2.js +0 -41
- package/dist/context-V7yd31ov.js +0 -108
- package/dist/docloader-Bh-sDknx.js +0 -68
- package/dist/docloader-D5BOqs-9.js +0 -4514
- package/dist/key-DqZKjPjH.js +0 -16
- package/dist/langstr-DbWheeIS.js +0 -33
- package/dist/lookup-DvfZUKur.js +0 -133
- package/dist/middleware-31SyXabg.js +0 -33
- package/dist/middleware-CGl-YyTa.js +0 -17
- package/dist/multibase-DeCHcK8L.js +0 -316
- package/dist/router-D3UybECj.js +0 -118
- package/dist/testing-BZ0dJ4qn.js +0 -143
- package/dist/type-D2s5lmbZ.js +0 -14
- package/dist/url-kTAI6_KP.js +0 -68
- /package/dist/{vocab → src/vocab}/accept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/activity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/add.yaml +0 -0
- /package/dist/{vocab → src/vocab}/announce.yaml +0 -0
- /package/dist/{vocab → src/vocab}/application.yaml +0 -0
- /package/dist/{vocab → src/vocab}/arrive.yaml +0 -0
- /package/dist/{vocab → src/vocab}/article.yaml +0 -0
- /package/dist/{vocab → src/vocab}/audio.yaml +0 -0
- /package/dist/{vocab → src/vocab}/block.yaml +0 -0
- /package/dist/{vocab → src/vocab}/chatmessage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/create.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dataintegrityproof.yaml +0 -0
- /package/dist/{vocab → src/vocab}/delete.yaml +0 -0
- /package/dist/{vocab → src/vocab}/didservice.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dislike.yaml +0 -0
- /package/dist/{vocab → src/vocab}/document.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emoji.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emojireact.yaml +0 -0
- /package/dist/{vocab → src/vocab}/endpoints.yaml +0 -0
- /package/dist/{vocab → src/vocab}/event.yaml +0 -0
- /package/dist/{vocab → src/vocab}/export.yaml +0 -0
- /package/dist/{vocab → src/vocab}/flag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/follow.yaml +0 -0
- /package/dist/{vocab → src/vocab}/group.yaml +0 -0
- /package/dist/{vocab → src/vocab}/hashtag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/ignore.yaml +0 -0
- /package/dist/{vocab → src/vocab}/image.yaml +0 -0
- /package/dist/{vocab → src/vocab}/intransitiveactivity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/invite.yaml +0 -0
- /package/dist/{vocab → src/vocab}/join.yaml +0 -0
- /package/dist/{vocab → src/vocab}/key.yaml +0 -0
- /package/dist/{vocab → src/vocab}/leave.yaml +0 -0
- /package/dist/{vocab → src/vocab}/like.yaml +0 -0
- /package/dist/{vocab → src/vocab}/link.yaml +0 -0
- /package/dist/{vocab → src/vocab}/listen.yaml +0 -0
- /package/dist/{vocab → src/vocab}/mention.yaml +0 -0
- /package/dist/{vocab → src/vocab}/move.yaml +0 -0
- /package/dist/{vocab → src/vocab}/multikey.yaml +0 -0
- /package/dist/{vocab → src/vocab}/note.yaml +0 -0
- /package/dist/{vocab → src/vocab}/object.yaml +0 -0
- /package/dist/{vocab → src/vocab}/offer.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/organization.yaml +0 -0
- /package/dist/{vocab → src/vocab}/page.yaml +0 -0
- /package/dist/{vocab → src/vocab}/person.yaml +0 -0
- /package/dist/{vocab → src/vocab}/place.yaml +0 -0
- /package/dist/{vocab → src/vocab}/profile.yaml +0 -0
- /package/dist/{vocab → src/vocab}/propertyvalue.yaml +0 -0
- /package/dist/{vocab → src/vocab}/question.yaml +0 -0
- /package/dist/{vocab → src/vocab}/read.yaml +0 -0
- /package/dist/{vocab → src/vocab}/reject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/relationship.yaml +0 -0
- /package/dist/{vocab → src/vocab}/remove.yaml +0 -0
- /package/dist/{vocab → src/vocab}/service.yaml +0 -0
- /package/dist/{vocab → src/vocab}/source.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativeaccept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativereject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tombstone.yaml +0 -0
- /package/dist/{vocab → src/vocab}/travel.yaml +0 -0
- /package/dist/{vocab → src/vocab}/undo.yaml +0 -0
- /package/dist/{vocab → src/vocab}/update.yaml +0 -0
- /package/dist/{vocab → src/vocab}/video.yaml +0 -0
- /package/dist/{vocab → src/vocab}/view.yaml +0 -0
|
@@ -10,22 +10,23 @@ import { isIP } from "node:net";
|
|
|
10
10
|
|
|
11
11
|
//#region deno.json
|
|
12
12
|
var name = "@fedify/fedify";
|
|
13
|
-
var version = "1.8.1-pr.315.
|
|
13
|
+
var version = "1.8.1-pr.315.1275+37d811f6";
|
|
14
14
|
var license = "MIT";
|
|
15
15
|
var exports = {
|
|
16
|
-
".": "./mod.ts",
|
|
17
|
-
"./compat": "./compat/mod.ts",
|
|
18
|
-
"./federation": "./federation/mod.ts",
|
|
19
|
-
"./nodeinfo": "./nodeinfo/mod.ts",
|
|
20
|
-
"./runtime": "./runtime/mod.ts",
|
|
21
|
-
"./sig": "./sig/mod.ts",
|
|
22
|
-
"./
|
|
23
|
-
"./
|
|
24
|
-
"./
|
|
25
|
-
"./x/
|
|
26
|
-
"./x/
|
|
27
|
-
"./x/
|
|
28
|
-
"./x/
|
|
16
|
+
".": "./src/mod.ts",
|
|
17
|
+
"./compat": "./src/compat/mod.ts",
|
|
18
|
+
"./federation": "./src/federation/mod.ts",
|
|
19
|
+
"./nodeinfo": "./src/nodeinfo/mod.ts",
|
|
20
|
+
"./runtime": "./src/runtime/mod.ts",
|
|
21
|
+
"./sig": "./src/sig/mod.ts",
|
|
22
|
+
"./testing": "./src/testing/mod.ts",
|
|
23
|
+
"./vocab": "./src/vocab/mod.ts",
|
|
24
|
+
"./webfinger": "./src/webfinger/mod.ts",
|
|
25
|
+
"./x/cfworkers": "./src/x/cfworkers.ts",
|
|
26
|
+
"./x/denokv": "./src/x/denokv.ts",
|
|
27
|
+
"./x/fresh": "./src/x/fresh.ts",
|
|
28
|
+
"./x/hono": "./src/x/hono.ts",
|
|
29
|
+
"./x/sveltekit": "./src/x/sveltekit.ts"
|
|
29
30
|
};
|
|
30
31
|
var imports = {
|
|
31
32
|
"@cfworker/json-schema": "npm:@cfworker/json-schema@^4.1.1",
|
|
@@ -50,33 +51,33 @@ var imports = {
|
|
|
50
51
|
"uri-template-router": "npm:uri-template-router@^0.0.17",
|
|
51
52
|
"url-template": "npm:url-template@^3.1.1"
|
|
52
53
|
};
|
|
53
|
-
var include = ["vocab/vocab.ts"];
|
|
54
|
+
var include = ["src/vocab/vocab.ts"];
|
|
54
55
|
var exclude = [
|
|
55
56
|
".test-report.xml",
|
|
56
57
|
"apidoc/",
|
|
57
|
-
"cfworkers/dist/",
|
|
58
|
-
"cfworkers/fixtures/",
|
|
59
|
-
"cfworkers/imports.ts",
|
|
60
|
-
"cfworkers/README.md",
|
|
61
|
-
"cfworkers/server.ts",
|
|
62
|
-
"cfworkers/server.js",
|
|
63
|
-
"cfworkers/server.js.map",
|
|
64
|
-
"codegen/schema.yaml",
|
|
65
58
|
"dist/",
|
|
66
59
|
"node_modules/",
|
|
67
60
|
"npm/",
|
|
68
61
|
"pnpm-lock.yaml",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
62
|
+
"src/cfworkers/dist/",
|
|
63
|
+
"src/cfworkers/fixtures/",
|
|
64
|
+
"src/cfworkers/imports.ts",
|
|
65
|
+
"src/cfworkers/README.md",
|
|
66
|
+
"src/cfworkers/server.ts",
|
|
67
|
+
"src/cfworkers/server.js",
|
|
68
|
+
"src/cfworkers/server.js.map",
|
|
69
|
+
"src/codegen/schema.yaml",
|
|
70
|
+
"src/vocab/*.yaml",
|
|
71
|
+
"!src/vocab/vocab.ts"
|
|
71
72
|
];
|
|
72
73
|
var tasks = {
|
|
73
|
-
"codegen": "deno run --allow-read --allow-write --check codegen/main.ts vocab/ ../runtime/
|
|
74
|
+
"codegen": "GENPATH=vocab-$(deno eval \"console.log(crypto.randomUUID());\").ts && deno run --allow-read --allow-write --check src/codegen/main.ts src/vocab/ ../runtime/ src/vocab/$GENPATH && deno fmt src/vocab/$GENPATH && mv src/vocab/$GENPATH src/vocab/vocab.ts && deno cache src/vocab/vocab.ts && deno check src/vocab/vocab.ts",
|
|
74
75
|
"cache": {
|
|
75
|
-
"command": "deno cache mod.ts",
|
|
76
|
+
"command": "deno cache src/mod.ts",
|
|
76
77
|
"dependencies": ["codegen"]
|
|
77
78
|
},
|
|
78
79
|
"check": {
|
|
79
|
-
"command": "deno fmt --check && deno lint && deno check
|
|
80
|
+
"command": "deno fmt --check && deno lint && deno check src/**/*.ts",
|
|
80
81
|
"dependencies": ["codegen"]
|
|
81
82
|
},
|
|
82
83
|
"test": {
|
|
@@ -89,7 +90,7 @@ var tasks = {
|
|
|
89
90
|
"dependencies": ["codegen"]
|
|
90
91
|
},
|
|
91
92
|
"apidoc": {
|
|
92
|
-
"command": "deno doc --html --name=Fedify --output=apidoc/ mod.ts",
|
|
93
|
+
"command": "deno doc --html --name=Fedify --output=apidoc/ src/mod.ts",
|
|
93
94
|
"dependencies": ["codegen"]
|
|
94
95
|
},
|
|
95
96
|
"publish": {
|
|
@@ -110,7 +111,7 @@ var tasks = {
|
|
|
110
111
|
"dependencies": ["pnpm:build"]
|
|
111
112
|
},
|
|
112
113
|
"test:cfworkers": {
|
|
113
|
-
"command": "pnpm exec wrangler deploy --dry-run --outdir cfworkers && node --import=tsx cfworkers/client.ts",
|
|
114
|
+
"command": "pnpm exec wrangler deploy --dry-run --outdir src/cfworkers && node --import=tsx src/cfworkers/client.ts",
|
|
114
115
|
"dependencies": ["pnpm:build"]
|
|
115
116
|
},
|
|
116
117
|
"test-all": { "dependencies": [
|
|
@@ -133,7 +134,7 @@ var deno_default = {
|
|
|
133
134
|
};
|
|
134
135
|
|
|
135
136
|
//#endregion
|
|
136
|
-
//#region runtime/contexts.ts
|
|
137
|
+
//#region src/runtime/contexts.ts
|
|
137
138
|
const preloadedContexts = {
|
|
138
139
|
"https://www.w3.org/ns/activitystreams": { "@context": {
|
|
139
140
|
"@vocab": "_:",
|
|
@@ -4244,7 +4245,7 @@ const preloadedContexts = {
|
|
|
4244
4245
|
var contexts_default = preloadedContexts;
|
|
4245
4246
|
|
|
4246
4247
|
//#endregion
|
|
4247
|
-
//#region runtime/url.ts
|
|
4248
|
+
//#region src/runtime/url.ts
|
|
4248
4249
|
var UrlError = class extends Error {
|
|
4249
4250
|
constructor(message) {
|
|
4250
4251
|
super(message);
|
|
@@ -4303,7 +4304,7 @@ function expandIPv6Address(address) {
|
|
|
4303
4304
|
}
|
|
4304
4305
|
|
|
4305
4306
|
//#endregion
|
|
4306
|
-
//#region runtime/docloader.ts
|
|
4307
|
+
//#region src/runtime/docloader.ts
|
|
4307
4308
|
const logger = getLogger([
|
|
4308
4309
|
"fedify",
|
|
4309
4310
|
"runtime",
|
|
@@ -4464,8 +4465,8 @@ async function getRemoteDocument(url, response, fetch$1) {
|
|
|
4464
4465
|
* @since 1.3.0
|
|
4465
4466
|
*/
|
|
4466
4467
|
function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAgent } = {}) {
|
|
4467
|
-
async function load(url,
|
|
4468
|
-
|
|
4468
|
+
async function load(url, options) {
|
|
4469
|
+
options?.signal?.throwIfAborted();
|
|
4469
4470
|
if (!skipPreloadedContexts && url in contexts_default) {
|
|
4470
4471
|
logger.debug("Using preloaded context: {url}.", { url });
|
|
4471
4472
|
return {
|
|
@@ -4487,9 +4488,9 @@ function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAge
|
|
|
4487
4488
|
logRequest(request);
|
|
4488
4489
|
const response = await fetch(request, {
|
|
4489
4490
|
redirect: "manual",
|
|
4490
|
-
signal:
|
|
4491
|
+
signal: options?.signal
|
|
4491
4492
|
});
|
|
4492
|
-
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) return load(response.headers.get("Location"),
|
|
4493
|
+
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) return load(response.headers.get("Location"), options);
|
|
4493
4494
|
return getRemoteDocument(url, response, load);
|
|
4494
4495
|
}
|
|
4495
4496
|
return load;
|
|
@@ -4525,9 +4526,9 @@ function kvCache({ loader, kv, prefix, rules }) {
|
|
|
4525
4526
|
}
|
|
4526
4527
|
return null;
|
|
4527
4528
|
}
|
|
4528
|
-
return async (url,
|
|
4529
|
+
return async (url, options) => {
|
|
4529
4530
|
const match = matchRule(url);
|
|
4530
|
-
if (match == null) return await loader(url);
|
|
4531
|
+
if (match == null) return await loader(url, options);
|
|
4531
4532
|
const key = [...keyPrefix, url];
|
|
4532
4533
|
let cache = void 0;
|
|
4533
4534
|
try {
|
|
@@ -4539,7 +4540,7 @@ function kvCache({ loader, kv, prefix, rules }) {
|
|
|
4539
4540
|
});
|
|
4540
4541
|
}
|
|
4541
4542
|
if (cache == null) {
|
|
4542
|
-
const remoteDoc = await loader(url);
|
|
4543
|
+
const remoteDoc = await loader(url, options);
|
|
4543
4544
|
try {
|
|
4544
4545
|
await kv.set(key, remoteDoc, { ttl: match });
|
|
4545
4546
|
} catch (error) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { KvKey, KvStore } from "./kv-
|
|
3
|
+
import { KvKey, KvStore } from "./kv-C7sopW2E.js";
|
|
4
4
|
|
|
5
|
-
//#region runtime/docloader.d.ts
|
|
5
|
+
//#region src/runtime/docloader.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* A remote JSON-LD document and its context fetched by
|
|
8
8
|
* a {@link DocumentLoader}.
|
|
@@ -26,6 +26,9 @@ interface RemoteDocument {
|
|
|
26
26
|
* @since 1.8.0
|
|
27
27
|
*/
|
|
28
28
|
interface DocumentLoaderOptions {
|
|
29
|
+
/**
|
|
30
|
+
* An `AbortSignal` for cancellation.
|
|
31
|
+
*/
|
|
29
32
|
signal?: AbortSignal;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { __commonJS, __toESM } from "./
|
|
6
|
+
import { __commonJS, __toESM } from "./type-DHDlfpLg.js";
|
|
7
7
|
|
|
8
|
-
//#region
|
|
9
|
-
var require_glob_to_regexp = __commonJS({ "
|
|
8
|
+
//#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
9
|
+
var require_glob_to_regexp = __commonJS({ "../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js"(exports, module) {
|
|
10
10
|
module.exports = function(glob$1, opts) {
|
|
11
11
|
if (typeof glob$1 !== "string") throw new TypeError("Expected a string");
|
|
12
12
|
var str = String(glob$1);
|
|
@@ -83,7 +83,7 @@ var require_glob_to_regexp = __commonJS({ "../node_modules/.pnpm/glob-to-regexp@
|
|
|
83
83
|
} });
|
|
84
84
|
|
|
85
85
|
//#endregion
|
|
86
|
-
//#region
|
|
86
|
+
//#region ../../node_modules/.pnpm/regexparam@3.0.0/node_modules/regexparam/dist/index.mjs
|
|
87
87
|
/**
|
|
88
88
|
* @param {string|RegExp} input The route pattern
|
|
89
89
|
* @param {boolean} [loose] Allow open-ended matching. Ignored with `RegExp` input.
|
|
@@ -115,7 +115,7 @@ function parse(input, loose) {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
//#endregion
|
|
118
|
-
//#region
|
|
118
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/TypeDescriptor.js
|
|
119
119
|
const valueTypes = new Set([
|
|
120
120
|
"boolean",
|
|
121
121
|
"number",
|
|
@@ -207,7 +207,7 @@ var TypeDescriptor = class TypeDescriptor {
|
|
|
207
207
|
};
|
|
208
208
|
|
|
209
209
|
//#endregion
|
|
210
|
-
//#region
|
|
210
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/IsSubsetOf.js
|
|
211
211
|
const allowedTypes = new Set([
|
|
212
212
|
"array",
|
|
213
213
|
"object",
|
|
@@ -303,7 +303,7 @@ isSubsetOf.structural = function(subset, superset, visited = []) {
|
|
|
303
303
|
};
|
|
304
304
|
|
|
305
305
|
//#endregion
|
|
306
|
-
//#region
|
|
306
|
+
//#region ../../node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.mjs
|
|
307
307
|
var has = Object.prototype.hasOwnProperty;
|
|
308
308
|
function find(iter, tar, key) {
|
|
309
309
|
for (key of iter.keys()) if (dequal(key, tar)) return key;
|
|
@@ -366,7 +366,7 @@ function dequal(foo, bar) {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
//#endregion
|
|
369
|
-
//#region
|
|
369
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/RequestUtils.js
|
|
370
370
|
const absoluteUrlRX = new RegExp("^[a-z]+://|^data:", "i");
|
|
371
371
|
const protocolRelativeUrlRX = new RegExp("^//", "i");
|
|
372
372
|
function hasCredentialsInUrl(url) {
|
|
@@ -444,7 +444,7 @@ function normalizeHeaders(headers) {
|
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
//#endregion
|
|
447
|
-
//#region
|
|
447
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/Matchers.js
|
|
448
448
|
var import_glob_to_regexp = __toESM(require_glob_to_regexp(), 1);
|
|
449
449
|
const isUrlMatcher = (matcher) => matcher instanceof RegExp || typeof matcher === "string" || typeof matcher === "object" && "href" in matcher;
|
|
450
450
|
const isFunctionMatcher = (matcher) => typeof matcher === "function";
|
|
@@ -627,7 +627,7 @@ const builtInMatchers = [
|
|
|
627
627
|
];
|
|
628
628
|
|
|
629
629
|
//#endregion
|
|
630
|
-
//#region
|
|
630
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/StatusTextMap.js
|
|
631
631
|
const statusTextMap = {
|
|
632
632
|
100: "Continue",
|
|
633
633
|
101: "Switching Protocols",
|
|
@@ -695,7 +695,7 @@ const statusTextMap = {
|
|
|
695
695
|
var StatusTextMap_default = statusTextMap;
|
|
696
696
|
|
|
697
697
|
//#endregion
|
|
698
|
-
//#region
|
|
698
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/Route.js
|
|
699
699
|
var __classPrivateFieldSet = void 0 && (void 0).__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
|
700
700
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
701
701
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -829,7 +829,7 @@ builtInMatchers.forEach(Route.defineMatcher);
|
|
|
829
829
|
var Route_default = Route;
|
|
830
830
|
|
|
831
831
|
//#endregion
|
|
832
|
-
//#region
|
|
832
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/Router.js
|
|
833
833
|
const responseConfigProps = [
|
|
834
834
|
"body",
|
|
835
835
|
"headers",
|
|
@@ -1002,7 +1002,7 @@ var Router = class {
|
|
|
1002
1002
|
};
|
|
1003
1003
|
|
|
1004
1004
|
//#endregion
|
|
1005
|
-
//#region
|
|
1005
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/CallHistory.js
|
|
1006
1006
|
const isName = (filter) => typeof filter === "string" && /^[\da-zA-Z-]+$/.test(filter) && !["matched", "unmatched"].includes(filter);
|
|
1007
1007
|
const isMatchedOrUnmatched = (filter) => typeof filter === "boolean" || ["matched", "unmatched"].includes(filter);
|
|
1008
1008
|
var CallHistory = class {
|
|
@@ -1087,7 +1087,7 @@ var CallHistory = class {
|
|
|
1087
1087
|
var CallHistory_default = CallHistory;
|
|
1088
1088
|
|
|
1089
1089
|
//#endregion
|
|
1090
|
-
//#region
|
|
1090
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/FetchMock.js
|
|
1091
1091
|
const defaultFetchMockConfig = {
|
|
1092
1092
|
includeContentLength: true,
|
|
1093
1093
|
matchPartialBody: false,
|
|
@@ -1220,7 +1220,7 @@ const fetchMock = new FetchMock({ ...defaultFetchMockConfig });
|
|
|
1220
1220
|
var FetchMock_default = fetchMock;
|
|
1221
1221
|
|
|
1222
1222
|
//#endregion
|
|
1223
|
-
//#region
|
|
1223
|
+
//#region ../../node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/index.js
|
|
1224
1224
|
var esm_default = FetchMock_default;
|
|
1225
1225
|
|
|
1226
1226
|
//#endregion
|
|
@@ -3,28 +3,23 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import {
|
|
16
|
-
import "../
|
|
17
|
-
import "../
|
|
18
|
-
import "../
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import { assertExists } from "../std__assert-B3iAixc-.js";
|
|
22
|
-
import "../assert_rejects-DceVjUlD.js";
|
|
23
|
-
import "../assert_is_error-DQdKoRgb.js";
|
|
24
|
-
import "../assert_not_equals-7pyUM3Ib.js";
|
|
25
|
-
import "../assert_throws-DTDC_gwN.js";
|
|
6
|
+
import { Activity, Note, Person } from "../type-DHDlfpLg.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
+
import { parseSemVer } from "../semver-dArNLkR9.js";
|
|
12
|
+
import "../lookup-BGA_VdZm.js";
|
|
13
|
+
import "../inbox-CpONbSbQ.js";
|
|
14
|
+
import { createFederationBuilder } from "../builder-B-wZuoFJ.js";
|
|
15
|
+
import { test } from "../testing-A4u9tSVX.js";
|
|
16
|
+
import { assertExists } from "../std__assert-X-_kMxKM.js";
|
|
17
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
18
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
19
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
20
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
26
21
|
|
|
27
|
-
//#region federation/builder.test.ts
|
|
22
|
+
//#region src/federation/builder.test.ts
|
|
28
23
|
test("FederationBuilder", async (t) => {
|
|
29
24
|
await t.step("should build a Federation object with registered components", async () => {
|
|
30
25
|
const builder = createFederationBuilder();
|
|
@@ -155,6 +150,25 @@ test("FederationBuilder", async (t) => {
|
|
|
155
150
|
assertEquals(personRoute?.name, `object:${Person.typeId.href}`);
|
|
156
151
|
assertEquals(personRoute?.values.id, "abc");
|
|
157
152
|
});
|
|
153
|
+
await t.step("should handle symbol names uniquely in custom collection dispatchers", () => {
|
|
154
|
+
const builder = createFederationBuilder();
|
|
155
|
+
const unnamedSymbol1 = Symbol();
|
|
156
|
+
const unnamedSymbol2 = Symbol();
|
|
157
|
+
const namedSymbol1 = Symbol.for("");
|
|
158
|
+
const namedSymbol2 = Symbol.for("");
|
|
159
|
+
const strId = String(unnamedSymbol1);
|
|
160
|
+
const dispatcher = (_ctx, _params) => ({ items: [] });
|
|
161
|
+
builder.setCollectionDispatcher(unnamedSymbol1, Note, "/unnamed-symbol1/{id}", dispatcher);
|
|
162
|
+
assertThrows(() => {
|
|
163
|
+
builder.setCollectionDispatcher(unnamedSymbol1, Note, "/unnamed-symbol1-duplicate/{id}", dispatcher);
|
|
164
|
+
}, Error, "Collection dispatcher for Symbol() already set.");
|
|
165
|
+
builder.setCollectionDispatcher(unnamedSymbol2, Note, "/unnamed-symbol2/{id}", dispatcher);
|
|
166
|
+
builder.setCollectionDispatcher(namedSymbol1, Note, "/named-symbol/{id}", dispatcher);
|
|
167
|
+
assertThrows(() => {
|
|
168
|
+
builder.setCollectionDispatcher(namedSymbol2, Note, "/named-symbol/{id}", dispatcher);
|
|
169
|
+
});
|
|
170
|
+
builder.setCollectionDispatcher(strId, Note, "/string-id/{id}", dispatcher);
|
|
171
|
+
});
|
|
158
172
|
});
|
|
159
173
|
|
|
160
174
|
//#endregion
|
|
@@ -3,19 +3,21 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
6
|
+
import "../type-DHDlfpLg.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../lookup-BGA_VdZm.js";
|
|
11
|
+
import { buildCollectionSynchronizationHeader, digest } from "../collection-CSzG2j1P.js";
|
|
12
|
+
import { test } from "../testing-A4u9tSVX.js";
|
|
13
|
+
import "../std__assert-X-_kMxKM.js";
|
|
14
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
15
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
16
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
17
|
+
import "../assert_throws-BOO88avQ.js";
|
|
16
18
|
import { decodeHex } from "byte-encodings/hex";
|
|
17
19
|
|
|
18
|
-
//#region federation/collection.test.ts
|
|
20
|
+
//#region src/federation/collection.test.ts
|
|
19
21
|
test("digest()", async () => {
|
|
20
22
|
const uris = [
|
|
21
23
|
new URL("https://testing.example.org/users/1"),
|