@fedify/fedify 1.8.1-pr.339.1223 → 1.8.1-pr.339.1267
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 +14 -11
- package/dist/{actor-B4TBtqRP.d.ts → actor-C2nhWp6O.d.ts} +3 -3
- package/dist/{actor-CB79AEUc.js → actor-CmkL94HP.js} +2 -2
- package/dist/{actor-DzraO78i.js → actor-aW87k6YP.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-CeVBLPsZ.js → assert_is_error-BPGph1Jx.js} +2 -2
- package/dist/{assert_not_equals-D2R2nl5h.js → assert_not_equals-f3m3epl3.js} +2 -2
- package/dist/{assert_rejects-AjlKk-Vo.js → assert_rejects-DiIiJbZn.js} +4 -4
- package/dist/{assert_throws-CqMKbTh_.js → assert_throws-BOO88avQ.js} +3 -3
- package/dist/{authdocloader-9w4UWFGu.js → authdocloader-CSdMJ3OD.js} +4 -4
- package/dist/{authdocloader-CZbt-zus.js → authdocloader-CfZzF6aW.js} +4 -4
- package/dist/{builder-DqeW2NfK.js → builder-KOoy-ITr.js} +6 -6
- package/dist/{client-BQ4AQGKo.d.ts → client-D2tgjFk3.d.ts} +4 -4
- package/dist/{client-D8ECiMRC.js → client-DfttEsJO.js} +3 -3
- package/dist/{collection-D5V3UzU3.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 -25
- package/dist/{context-Csbv_Ssv.d.ts → context-BBD2ZH_P.d.ts} +95 -95
- package/dist/{denokv-DK9P5Jq7.js → denokv-2x6-IpXO.js} +1 -1
- package/dist/{docloader-Dko90hhf.js → docloader-BCgyiRag.js} +34 -34
- package/dist/{docloader-BeCtcTOJ.d.ts → docloader-Bz56sKV5.d.ts} +2 -2
- package/dist/{esm-BcNnrbSt.js → esm-BwBAFDMZ.js} +15 -15
- package/dist/federation/builder.test.js +16 -16
- package/dist/federation/collection.test.js +13 -13
- package/dist/federation/handler.test.js +31 -31
- package/dist/federation/inbox.test.js +8 -8
- package/dist/federation/keycache.test.js +9 -9
- package/dist/federation/kv.test.js +13 -13
- package/dist/federation/middleware.test.js +34 -34
- package/dist/federation/mod.d.ts +11 -11
- package/dist/federation/mod.js +12 -12
- package/dist/federation/mq.test.js +15 -15
- package/dist/federation/retry.test.js +7 -7
- package/dist/federation/router.test.js +12 -12
- package/dist/federation/send.test.js +19 -19
- package/dist/{federation-C44ekWNP.js → federation-CMX7WzeL.js} +2 -2
- package/dist/{http-DJZoomhf.js → http-B1ff1viM.js} +4 -4
- package/dist/{http-DtRd__2b.js → http-BUhvpgNR.js} +3 -3
- package/dist/{http-BL6S1G0j.d.ts → http-l4uEvaAw.d.ts} +5 -5
- package/dist/{inbox-BkgXcbh1.js → inbox-CJoj4ew9.js} +2 -2
- package/dist/{key-BrnILBxz.js → key-B9HDRSYF.js} +4 -4
- package/dist/{key-Crm3TsZ2.js → key-Bycq40gh.js} +4 -4
- package/dist/{key-Bax5Sopu.js → key-D-lyguVw.js} +3 -3
- package/dist/{key-CFc9faD4.js → key-Dytvox0s.js} +4 -4
- package/dist/{keycache-CYB-S-yN.js → keycache-DRL-euZL.js} +2 -2
- package/dist/{keys-DH4KqO28.js → keys-3qmW6xNM.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-BFU5cPI-.js → ld-DCy3fb6F.js} +3 -3
- package/dist/{lookup-tAXRzrWm.js → lookup-B0kqr1YK.js} +4 -4
- package/dist/{lookup-J_m4YZg0.d.ts → lookup-BJelGpWr.d.ts} +3 -3
- package/dist/{lookup-DVKVaXLA.js → lookup-gra7DAIV.js} +2 -2
- package/dist/middleware-B8IJYZA9.js +17 -0
- package/dist/{middleware-Cv5Hwaiq.js → middleware-CAzmuaK9.js} +53 -53
- package/dist/{middleware-C7VFLIDZ.js → middleware-CWKaURv5.js} +51 -51
- package/dist/middleware-D8Av026r.js +26 -0
- package/dist/{mod-BFwgZ7_K.d.ts → mod-D79SaXL-.d.ts} +6 -6
- package/dist/{mod-Dc_fDCtK.d.ts → mod-DDwnlIlm.d.ts} +6 -6
- package/dist/{mod-D8-liXFY.d.ts → mod-DM7ZpXF4.d.ts} +4 -4
- package/dist/{mod-j0OCtlRW.d.ts → mod-DwquBB1g.d.ts} +6 -6
- package/dist/mod.d.ts +14 -14
- 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 -30
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +13 -13
- package/dist/nodeinfo/types.test.js +14 -14
- package/dist/{owner-C9J9KW9l.js → owner-DExszVkD.js} +3 -3
- package/dist/{owner-CEv_PfyK.d.ts → owner-fFqUg4lq.d.ts} +4 -4
- package/dist/{proof-BWeV09ZD.js → proof-Cnxcwp1a.js} +4 -4
- package/dist/{proof-BZywF9va.js → proof-DY_ZcCZq.js} +7 -7
- package/dist/{retry-BnpVRGFC.js → retry-D4GJ670a.js} +1 -1
- package/dist/runtime/authdocloader.test.js +18 -18
- package/dist/runtime/docloader.test.js +14 -14
- package/dist/runtime/key.test.js +14 -14
- package/dist/runtime/langstr.test.js +12 -12
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +12 -12
- package/dist/runtime/url.test.js +8 -8
- package/dist/{semver-DCqorrj5.js → semver-dArNLkR9.js} +1 -1
- package/dist/{send-C3Es32HL.js → send-ovNk9TQg.js} +3 -3
- package/dist/sig/http.test.js +17 -17
- package/dist/sig/key.test.js +15 -15
- package/dist/sig/ld.test.js +13 -13
- package/dist/sig/mod.d.ts +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +16 -16
- package/dist/sig/proof.test.js +16 -16
- package/dist/{std__assert-BQdmxyzF.js → std__assert-X-_kMxKM.js} +6 -6
- package/dist/testing/docloader.test.js +12 -12
- package/dist/testing/mod.d.ts +90 -90
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-CYMIJPbF.js → testing-Ddk8H2Ez.js} +5 -5
- package/dist/{transformers-ghwJuzGY.js → transformers-Dna8Fg7k.js} +4 -4
- package/dist/{type-Cv-2McVu.js → type-C4M92j6x.js} +221 -221
- package/dist/{types-n7HI7VFr.js → types-BIgY6c-l.js} +2 -2
- package/dist/{types-DNJjUEG0.js → types-C0RmUAha.js} +4 -4
- package/dist/vocab/actor.test.js +143 -143
- package/dist/vocab/lookup.test.js +13 -13
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +5 -5
- package/dist/vocab/vocab.test.js +54 -54
- package/dist/{vocab-By6mpzr-.d.ts → vocab-CA7YwVEz.d.ts} +3 -3
- package/dist/{vocab-C6a42Zlb.js → vocab-DyLqaidG.js} +6 -6
- package/dist/webfinger/handler.test.js +30 -30
- package/dist/webfinger/lookup.test.js +13 -13
- 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 -13
- 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/middleware-BtixRKu5.js +0 -17
- package/dist/middleware-DRVxz0CE.js +0 -26
- /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
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { __commonJS, __toESM } from "./type-
|
|
6
|
+
import { __commonJS, __toESM } from "./type-C4M92j6x.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,23 +3,23 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Note, Person } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import { parseSemVer } from "../semver-
|
|
12
|
-
import "../lookup-
|
|
13
|
-
import "../inbox-
|
|
14
|
-
import { createFederationBuilder } from "../builder-
|
|
15
|
-
import { test } from "../testing-
|
|
16
|
-
import { assertExists } from "../std__assert-
|
|
17
|
-
import "../assert_rejects-
|
|
18
|
-
import "../assert_is_error-
|
|
19
|
-
import "../assert_not_equals-
|
|
20
|
-
import { assertThrows } from "../assert_throws-
|
|
6
|
+
import { Activity, Note, Person } from "../type-C4M92j6x.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-B0kqr1YK.js";
|
|
13
|
+
import "../inbox-CJoj4ew9.js";
|
|
14
|
+
import { createFederationBuilder } from "../builder-KOoy-ITr.js";
|
|
15
|
+
import { test } from "../testing-Ddk8H2Ez.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";
|
|
21
21
|
|
|
22
|
-
//#region federation/builder.test.ts
|
|
22
|
+
//#region src/federation/builder.test.ts
|
|
23
23
|
test("FederationBuilder", async (t) => {
|
|
24
24
|
await t.step("should build a Federation object with registered components", async () => {
|
|
25
25
|
const builder = createFederationBuilder();
|
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { buildCollectionSynchronizationHeader, digest } from "../collection-
|
|
12
|
-
import { test } from "../testing-
|
|
13
|
-
import "../std__assert-
|
|
14
|
-
import "../assert_rejects-
|
|
15
|
-
import "../assert_is_error-
|
|
16
|
-
import "../assert_not_equals-
|
|
17
|
-
import "../assert_throws-
|
|
6
|
+
import "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../lookup-B0kqr1YK.js";
|
|
11
|
+
import { buildCollectionSynchronizationHeader, digest } from "../collection-CSzG2j1P.js";
|
|
12
|
+
import { test } from "../testing-Ddk8H2Ez.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";
|
|
18
18
|
import { decodeHex } from "byte-encodings/hex";
|
|
19
19
|
|
|
20
|
-
//#region federation/collection.test.ts
|
|
20
|
+
//#region src/federation/collection.test.ts
|
|
21
21
|
test("digest()", async () => {
|
|
22
22
|
const uris = [
|
|
23
23
|
new URL("https://testing.example.org/users/1"),
|
|
@@ -3,38 +3,38 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Create, Note, Person } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
|
12
|
-
import "../semver-
|
|
13
|
-
import "../client-
|
|
14
|
-
import "../lookup-
|
|
15
|
-
import "../types-
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import { signRequest } from "../http-
|
|
19
|
-
import "../authdocloader-
|
|
20
|
-
import "../ld-
|
|
21
|
-
import "../owner-
|
|
22
|
-
import "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
25
|
-
import "../collection-
|
|
26
|
-
import "../keycache-
|
|
27
|
-
import "../retry-
|
|
28
|
-
import "../send-
|
|
29
|
-
import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-
|
|
30
|
-
import "../std__assert-
|
|
31
|
-
import { assertFalse } from "../assert_rejects-
|
|
32
|
-
import "../assert_is_error-
|
|
33
|
-
import "../assert_not_equals-
|
|
34
|
-
import "../assert_throws-
|
|
35
|
-
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
|
6
|
+
import { Create, Note, Person } from "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
+
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-CAzmuaK9.js";
|
|
12
|
+
import "../semver-dArNLkR9.js";
|
|
13
|
+
import "../client-DfttEsJO.js";
|
|
14
|
+
import "../lookup-B0kqr1YK.js";
|
|
15
|
+
import "../types-BIgY6c-l.js";
|
|
16
|
+
import "../actor-CmkL94HP.js";
|
|
17
|
+
import "../key-Dytvox0s.js";
|
|
18
|
+
import { signRequest } from "../http-BUhvpgNR.js";
|
|
19
|
+
import "../authdocloader-CfZzF6aW.js";
|
|
20
|
+
import "../ld-DCy3fb6F.js";
|
|
21
|
+
import "../owner-DExszVkD.js";
|
|
22
|
+
import "../proof-Cnxcwp1a.js";
|
|
23
|
+
import "../inbox-CJoj4ew9.js";
|
|
24
|
+
import "../builder-KOoy-ITr.js";
|
|
25
|
+
import "../collection-CSzG2j1P.js";
|
|
26
|
+
import "../keycache-DRL-euZL.js";
|
|
27
|
+
import "../retry-D4GJ670a.js";
|
|
28
|
+
import "../send-ovNk9TQg.js";
|
|
29
|
+
import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-Ddk8H2Ez.js";
|
|
30
|
+
import "../std__assert-X-_kMxKM.js";
|
|
31
|
+
import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
|
|
32
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
33
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
34
|
+
import "../assert_throws-BOO88avQ.js";
|
|
35
|
+
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-3qmW6xNM.js";
|
|
36
36
|
|
|
37
|
-
//#region federation/handler.test.ts
|
|
37
|
+
//#region src/federation/handler.test.ts
|
|
38
38
|
test("acceptsJsonLd()", () => {
|
|
39
39
|
assert(acceptsJsonLd(new Request("https://example.com/", { headers: { Accept: "application/activity+json" } })));
|
|
40
40
|
assert(acceptsJsonLd(new Request("https://example.com/", { headers: { Accept: "application/ld+json" } })));
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Create, Invite, Offer, Update } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../lookup-
|
|
9
|
-
import { InboxListenerSet } from "../inbox-
|
|
10
|
-
import { test } from "../testing-
|
|
11
|
-
import "../assert_is_error-
|
|
12
|
-
import { assertThrows } from "../assert_throws-
|
|
6
|
+
import { Activity, Create, Invite, Offer, Update } from "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../lookup-B0kqr1YK.js";
|
|
9
|
+
import { InboxListenerSet } from "../inbox-CJoj4ew9.js";
|
|
10
|
+
import { test } from "../testing-Ddk8H2Ez.js";
|
|
11
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
12
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
13
13
|
|
|
14
|
-
//#region federation/inbox.test.ts
|
|
14
|
+
//#region src/federation/inbox.test.ts
|
|
15
15
|
test("InboxListenerSet", () => {
|
|
16
16
|
const listeners = new InboxListenerSet();
|
|
17
17
|
const activity = new Activity({});
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import { assertInstanceOf } from "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { KvKeyCache } from "../keycache-
|
|
13
|
-
import { test } from "../testing-
|
|
6
|
+
import { CryptographicKey, Multikey } from "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
+
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
+
import "../lookup-B0kqr1YK.js";
|
|
12
|
+
import { KvKeyCache } from "../keycache-DRL-euZL.js";
|
|
13
|
+
import { test } from "../testing-Ddk8H2Ez.js";
|
|
14
14
|
|
|
15
|
-
//#region federation/keycache.test.ts
|
|
15
|
+
//#region src/federation/keycache.test.ts
|
|
16
16
|
test("KvKeyCache.set()", async () => {
|
|
17
17
|
const kv = new MemoryKvStore();
|
|
18
18
|
const cache = new KvKeyCache(kv, ["pk"]);
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { test } from "../testing-
|
|
13
|
-
import "../std__assert-
|
|
14
|
-
import "../assert_rejects-
|
|
15
|
-
import "../assert_is_error-
|
|
16
|
-
import "../assert_not_equals-
|
|
17
|
-
import "../assert_throws-
|
|
6
|
+
import "../type-C4M92j6x.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 "../lookup-B0kqr1YK.js";
|
|
12
|
+
import { test } from "../testing-Ddk8H2Ez.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";
|
|
18
18
|
|
|
19
|
-
//#region federation/kv.test.ts
|
|
19
|
+
//#region src/federation/kv.test.ts
|
|
20
20
|
test("MemoryKvStore", async (t) => {
|
|
21
21
|
const store = new MemoryKvStore();
|
|
22
22
|
await t.step("set() & get()", async () => {
|
|
@@ -3,39 +3,39 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import { assertInstanceOf } from "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-
|
|
12
|
-
import "../semver-
|
|
13
|
-
import "../client-
|
|
14
|
-
import { RouterError, lookupObject } from "../lookup-
|
|
15
|
-
import "../types-
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import { signRequest, verifyRequest } from "../http-
|
|
19
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
|
20
|
-
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-
|
|
21
|
-
import { doesActorOwnKey } from "../owner-
|
|
22
|
-
import { signObject, verifyObject } from "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
25
|
-
import "../collection-
|
|
26
|
-
import "../keycache-
|
|
27
|
-
import "../retry-
|
|
28
|
-
import "../send-
|
|
29
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
30
|
-
import { assertStrictEquals } from "../std__assert-
|
|
31
|
-
import { assertFalse, assertRejects } from "../assert_rejects-
|
|
32
|
-
import "../assert_is_error-
|
|
33
|
-
import { assertNotEquals } from "../assert_not_equals-
|
|
34
|
-
import { assertThrows } from "../assert_throws-
|
|
35
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
|
36
|
-
import { esm_default } from "../esm-
|
|
6
|
+
import { Activity, Announce, Create, FetchError, Invite, Multikey, Note, Object as Object$1, Offer, Person, fetchDocumentLoader, getTypeId } from "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
+
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-CAzmuaK9.js";
|
|
12
|
+
import "../semver-dArNLkR9.js";
|
|
13
|
+
import "../client-DfttEsJO.js";
|
|
14
|
+
import { RouterError, lookupObject } from "../lookup-B0kqr1YK.js";
|
|
15
|
+
import "../types-BIgY6c-l.js";
|
|
16
|
+
import "../actor-CmkL94HP.js";
|
|
17
|
+
import "../key-Dytvox0s.js";
|
|
18
|
+
import { signRequest, verifyRequest } from "../http-BUhvpgNR.js";
|
|
19
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-CfZzF6aW.js";
|
|
20
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-DCy3fb6F.js";
|
|
21
|
+
import { doesActorOwnKey } from "../owner-DExszVkD.js";
|
|
22
|
+
import { signObject, verifyObject } from "../proof-Cnxcwp1a.js";
|
|
23
|
+
import "../inbox-CJoj4ew9.js";
|
|
24
|
+
import "../builder-KOoy-ITr.js";
|
|
25
|
+
import "../collection-CSzG2j1P.js";
|
|
26
|
+
import "../keycache-DRL-euZL.js";
|
|
27
|
+
import "../retry-D4GJ670a.js";
|
|
28
|
+
import "../send-ovNk9TQg.js";
|
|
29
|
+
import { mockDocumentLoader, test } from "../testing-Ddk8H2Ez.js";
|
|
30
|
+
import { assertStrictEquals } from "../std__assert-X-_kMxKM.js";
|
|
31
|
+
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
32
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
33
|
+
import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
|
|
34
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
35
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-3qmW6xNM.js";
|
|
36
|
+
import { esm_default } from "../esm-BwBAFDMZ.js";
|
|
37
37
|
|
|
38
|
-
//#region testing/fixtures/example.com/person.json
|
|
38
|
+
//#region src/testing/fixtures/example.com/person.json
|
|
39
39
|
var __context$1 = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"];
|
|
40
40
|
var id$1 = "https://example.com/person";
|
|
41
41
|
var type$1 = "Person";
|
|
@@ -59,7 +59,7 @@ var person_default = {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
//#endregion
|
|
62
|
-
//#region testing/fixtures/example.com/person2.json
|
|
62
|
+
//#region src/testing/fixtures/example.com/person2.json
|
|
63
63
|
var __context = [
|
|
64
64
|
"https://www.w3.org/ns/activitystreams",
|
|
65
65
|
"https://w3id.org/security/v1",
|
|
@@ -102,7 +102,7 @@ var person2_default = {
|
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
//#endregion
|
|
105
|
-
//#region federation/middleware.test.ts
|
|
105
|
+
//#region src/federation/middleware.test.ts
|
|
106
106
|
test("createFederation()", async (t) => {
|
|
107
107
|
const kv = new MemoryKvStore();
|
|
108
108
|
await t.step("allowPrivateAddress", () => {
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "../kv-
|
|
4
|
-
import "../docloader-
|
|
5
|
-
import "../client-
|
|
6
|
-
import "../vocab-
|
|
7
|
-
import "../actor-
|
|
8
|
-
import "../http-
|
|
9
|
-
import "../owner-
|
|
10
|
-
import "../mod-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-
|
|
13
|
-
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "../mq-
|
|
3
|
+
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "../kv-C7sopW2E.js";
|
|
4
|
+
import "../docloader-Bz56sKV5.js";
|
|
5
|
+
import "../client-D2tgjFk3.js";
|
|
6
|
+
import "../vocab-CA7YwVEz.js";
|
|
7
|
+
import "../actor-C2nhWp6O.js";
|
|
8
|
+
import "../http-l4uEvaAw.js";
|
|
9
|
+
import "../owner-fFqUg4lq.js";
|
|
10
|
+
import "../mod-D79SaXL-.js";
|
|
11
|
+
import "../lookup-BJelGpWr.js";
|
|
12
|
+
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-BBD2ZH_P.js";
|
|
13
|
+
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "../mq-CRGm1e_F.js";
|
|
14
14
|
import "../mod-g0xFzAP9.js";
|
|
15
15
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../transformers-
|
|
6
|
-
import "../docloader-
|
|
7
|
-
import "../actor-
|
|
8
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
|
9
|
-
import "../lookup-
|
|
10
|
-
import "../key-
|
|
11
|
-
import "../http-
|
|
12
|
-
import "../proof-
|
|
13
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-
|
|
14
|
-
import "../types-
|
|
15
|
-
import "../authdocloader-
|
|
16
|
-
import "../vocab-
|
|
5
|
+
import "../transformers-Dna8Fg7k.js";
|
|
6
|
+
import "../docloader-BCgyiRag.js";
|
|
7
|
+
import "../actor-aW87k6YP.js";
|
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-CWKaURv5.js";
|
|
9
|
+
import "../lookup-gra7DAIV.js";
|
|
10
|
+
import "../key-B9HDRSYF.js";
|
|
11
|
+
import "../http-B1ff1viM.js";
|
|
12
|
+
import "../proof-DY_ZcCZq.js";
|
|
13
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-CMX7WzeL.js";
|
|
14
|
+
import "../types-C0RmUAha.js";
|
|
15
|
+
import "../authdocloader-CSdMJ3OD.js";
|
|
16
|
+
import "../vocab-DyLqaidG.js";
|
|
17
17
|
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import { assert } from "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
12
|
-
import { assertGreater, assertGreaterOrEqual } from "../std__assert-
|
|
13
|
-
import { assertFalse } from "../assert_rejects-
|
|
14
|
-
import "../assert_is_error-
|
|
15
|
-
import "../assert_not_equals-
|
|
16
|
-
import "../assert_throws-
|
|
6
|
+
import "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../lookup-B0kqr1YK.js";
|
|
11
|
+
import { test } from "../testing-Ddk8H2Ez.js";
|
|
12
|
+
import { assertGreater, assertGreaterOrEqual } from "../std__assert-X-_kMxKM.js";
|
|
13
|
+
import { assertFalse } from "../assert_rejects-DiIiJbZn.js";
|
|
14
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
15
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
16
|
+
import "../assert_throws-BOO88avQ.js";
|
|
17
17
|
import { delay } from "es-toolkit";
|
|
18
18
|
|
|
19
|
-
//#region federation/mq.ts
|
|
19
|
+
//#region src/federation/mq.ts
|
|
20
20
|
/**
|
|
21
21
|
* A message queue that processes messages in the same process.
|
|
22
22
|
* Do not use this in production as it does neither persist messages nor
|
|
@@ -169,7 +169,7 @@ var ParallelMessageQueue = class ParallelMessageQueue {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
//#endregion
|
|
172
|
-
//#region federation/mq.test.ts
|
|
172
|
+
//#region src/federation/mq.test.ts
|
|
173
173
|
test("InProcessMessageQueue", async (t) => {
|
|
174
174
|
const mq = new InProcessMessageQueue();
|
|
175
175
|
await t.step("nativeRetrial property", () => {
|
|
@@ -227,7 +227,7 @@ test("InProcessMessageQueue", async (t) => {
|
|
|
227
227
|
});
|
|
228
228
|
test("MessageQueue.nativeRetrial", async (t) => {
|
|
229
229
|
if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") await t.step("DenoKvMessageQueue", async () => {
|
|
230
|
-
const { DenoKvMessageQueue } = await import("../denokv-
|
|
230
|
+
const { DenoKvMessageQueue } = await import("../denokv-2x6-IpXO.js");
|
|
231
231
|
const mq = new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
|
232
232
|
assert(mq.nativeRetrial);
|
|
233
233
|
if (Symbol.dispose in mq) {
|
|
@@ -266,7 +266,7 @@ test("MessageQueue.nativeRetrial", async (t) => {
|
|
|
266
266
|
});
|
|
267
267
|
const queues = { InProcessMessageQueue: () => Promise.resolve(new InProcessMessageQueue()) };
|
|
268
268
|
if ("Deno" in globalThis && "openKv" in globalThis.Deno && typeof globalThis.Deno.openKv === "function") {
|
|
269
|
-
const { DenoKvMessageQueue } = await import("../denokv-
|
|
269
|
+
const { DenoKvMessageQueue } = await import("../denokv-2x6-IpXO.js");
|
|
270
270
|
queues.DenoKvMessageQueue = async () => new DenoKvMessageQueue(await globalThis.Deno.openKv(":memory:"));
|
|
271
271
|
}
|
|
272
272
|
for (const mqName in queues) test({
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { AssertionError, assertEquals } from "../assert_equals-
|
|
8
|
-
import "../lookup-
|
|
9
|
-
import { createExponentialBackoffPolicy } from "../retry-
|
|
10
|
-
import { test } from "../testing-
|
|
11
|
-
import { assertNotEquals } from "../assert_not_equals-
|
|
6
|
+
import "../type-C4M92j6x.js";
|
|
7
|
+
import { AssertionError, assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../lookup-B0kqr1YK.js";
|
|
9
|
+
import { createExponentialBackoffPolicy } from "../retry-D4GJ670a.js";
|
|
10
|
+
import { test } from "../testing-Ddk8H2Ez.js";
|
|
11
|
+
import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
|
|
12
12
|
|
|
13
|
-
//#region federation/retry.test.ts
|
|
13
|
+
//#region src/federation/retry.test.ts
|
|
14
14
|
test("createExponentialBackoffPolicy()", () => {
|
|
15
15
|
const policy = createExponentialBackoffPolicy({ maxAttempts: 4 });
|
|
16
16
|
const noMatter = Temporal.Duration.from({ seconds: 0 });
|