@fedify/fedify 2.0.0-dev.12 → 2.0.0-dev.148
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/LICENSE +1 -1
- package/README.md +32 -21
- package/dist/{actor-_9UN5RVT.cjs → actor-C9zpoWaz.cjs} +185 -185
- package/dist/{actor-rOm0sXHU.js → actor-CDJsk2cL.js} +4 -1
- package/dist/{actor-C-FuEZU4.js → actor-CN7b3VNC.js} +185 -185
- package/dist/{assert-MZs1qjMx.js → assert-Dp5_aoAs.js} +1 -1
- package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-D1m8F7x0.js} +1 -1
- package/dist/{assert_not_equals-C80BG-_5.js → assert_not_equals-B2R_8p36.js} +1 -1
- package/dist/{assert_rejects-Ce45JcFg.js → assert_rejects-BoKYY0g1.js} +2 -2
- package/dist/{assert_throws-BNXdRGWP.js → assert_throws-DjkXin1a.js} +1 -1
- package/dist/{builder-hArjoWjW.js → builder-sNAekxA0.js} +5 -3
- package/dist/chunk-HsBuZ-b2.js +41 -0
- package/dist/{client-pY7-3icS.js → client-CD87uCL_.js} +1 -1
- package/dist/compat/mod.d.cts +3 -3
- package/dist/compat/mod.d.ts +3 -3
- package/dist/compat/transformers.test.js +29 -24
- package/dist/context-By1PvkXu.js +109 -0
- package/dist/{context-PxGADCsD.d.cts → context-DBQ7nMCw.d.cts} +1 -1
- package/dist/{context-V-XS2_6O.d.ts → context-mM0Nu5yo.d.ts} +1 -1
- package/dist/deno-4flJ39CF.js +131 -0
- package/dist/{testing-D-nLIHkh.js → dist-lStjlyET.js} +73 -113
- package/dist/{docloader-CE1lRhEV.js → docloader-56fs8u4N.js} +3 -3
- package/dist/{esm-BEFbR5eN.js → esm-B52TuumP.js} +1 -1
- package/dist/federation/builder.test.js +15 -12
- package/dist/federation/collection.test.js +9 -10
- package/dist/federation/handler.test.js +35 -30
- package/dist/federation/idempotency.test.js +34 -29
- package/dist/federation/inbox.test.js +7 -5
- package/dist/federation/keycache.test.js +7 -7
- package/dist/federation/kv.test.js +63 -10
- package/dist/federation/middleware.test.js +38 -33
- package/dist/federation/mod.cjs +8 -8
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +8 -8
- package/dist/federation/mq.test.js +12 -13
- package/dist/federation/negotiation.test.js +9 -10
- package/dist/federation/retry.test.js +4 -5
- package/dist/federation/router.test.js +9 -9
- package/dist/federation/send.test.js +19 -17
- package/dist/{federation-CRpdnOMS.cjs → federation-CoW-KDKv.cjs} +22 -0
- package/dist/{federation-jcR8-ZxP.js → federation-D0hkM4T7.js} +22 -0
- package/dist/{http-Bmx7ea3F.js → http-Zo_IIAIm.js} +3 -2
- package/dist/{http-Q_l4fCEE.js → http-df2tmadG.js} +2 -2
- package/dist/{http-So5V_Tgv.cjs → http-ntobMx1O.cjs} +2 -2
- package/dist/{inbox-B9PjFn2S.js → inbox-EbZ68wVh.js} +3 -1
- package/dist/{key-khQpfFdw.js → key-CVwsdpBG.js} +4 -3
- package/dist/{keycache-BU3fsZFa.js → keycache-Brygl5RE.js} +1 -1
- package/dist/{keys-BaMFfIdL.js → keys-CFhJaqfk.js} +1 -1
- package/dist/{kv-BKNZ-Tb-.d.ts → kv-BpJND1Hr.d.ts} +30 -1
- package/dist/{kv-CRZrzyXm.js → kv-DaWUKuhD.js} +22 -0
- package/dist/{kv-Bxr0Q87_.d.cts → kv-cD_d4hg-.d.cts} +30 -1
- package/dist/{kv-cache-DN9pfMBe.js → kv-cache-C6NrTtII.js} +14 -1
- package/dist/{kv-cache-X2ggcnHI.cjs → kv-cache-C8wVlF6T.cjs} +1 -1
- package/dist/{kv-cache-R1oW382l.js → kv-cache-CWZfiB_6.js} +1 -1
- package/dist/{ld-BLMebnep.js → ld-BCG9onip.js} +5 -3
- package/dist/{lookup-CtC3x1M6.js → lookup-BW_NBcFP.js} +12 -10
- package/dist/lookup-DHL4lalh.js +133 -0
- package/dist/{lookup-CLaDFNx1.cjs → lookup-Dyt4n8ZN.cjs} +12 -10
- package/dist/lookup-wr524AFq.js +230 -0
- package/dist/middleware-B0GQ0wYj.js +31 -0
- package/dist/middleware-D1eO1L5w.js +15 -0
- package/dist/{middleware-DFLterpx.cjs → middleware-DPMTGtOK.cjs} +7 -7
- package/dist/{middleware-C3ml59Hp.js → middleware-De9qUrT0.js} +23 -18
- package/dist/{middleware-Bda2JO66.js → middleware-DluCN-U-.js} +7 -7
- package/dist/middleware-DwZlzo7h.cjs +15 -0
- package/dist/{mod-aAE2wOWV.d.ts → mod-CAdoBu0x.d.ts} +1 -1
- package/dist/{mod-BoRKfJPE.d.cts → mod-Dy2fJtmN.d.cts} +1 -1
- package/dist/{mod-Cdo6SYlJ.d.ts → mod-GetHzY6F.d.ts} +1 -1
- package/dist/{mod-DMpuiKXi.d.cts → mod-fxr25Gv7.d.cts} +1 -1
- package/dist/mod.cjs +8 -8
- package/dist/mod.d.cts +5 -5
- package/dist/mod.d.ts +5 -5
- package/dist/mod.js +8 -8
- package/dist/nodeinfo/client.test.js +10 -11
- package/dist/nodeinfo/handler.test.js +34 -28
- package/dist/nodeinfo/types.test.js +9 -10
- package/dist/otel/exporter.test.js +899 -0
- package/dist/otel/mod.cjs +262 -0
- package/dist/otel/mod.d.cts +230 -0
- package/dist/otel/mod.d.ts +232 -0
- package/dist/otel/mod.js +261 -0
- package/dist/{owner-XzzTSr4S.js → owner-gQW9WlbQ.js} +3 -2
- package/dist/{proof-C9sfVit1.js → proof-BCEIPcIs.js} +4 -2
- package/dist/{proof-B-qOSAuQ.js → proof-DTQVwGH4.js} +3 -3
- package/dist/{proof-BzJkFBBF.cjs → proof-DashjJxi.cjs} +3 -3
- package/dist/router-CVRQXlZi.js +118 -0
- package/dist/{send-yEkZlxzW.js → send-DUnZeDiy.js} +2 -2
- package/dist/sig/http.test.js +17 -14
- package/dist/sig/key.test.js +15 -12
- package/dist/sig/ld.test.js +13 -10
- package/dist/sig/mod.cjs +4 -4
- package/dist/sig/mod.js +4 -4
- package/dist/sig/owner.test.js +17 -14
- package/dist/sig/proof.test.js +16 -13
- package/dist/{std__assert-DWivtrGR.js → std__assert-Cm-MfI66.js} +1 -1
- package/dist/testing/mod.d.ts +2 -7
- package/dist/testing/mod.js +9 -3
- package/dist/type-BSNcIxTd.js +14 -0
- package/dist/utils/docloader.test.js +18 -15
- package/dist/utils/kv-cache.test.js +5 -3
- package/dist/utils/mod.cjs +4 -4
- package/dist/utils/mod.d.cts +2 -2
- package/dist/utils/mod.d.ts +2 -2
- package/dist/utils/mod.js +4 -4
- package/dist/vocab/actor.test.js +15 -11
- package/dist/vocab/lookup.test.js +14 -11
- package/dist/vocab/mod.cjs +3 -3
- package/dist/vocab/mod.js +3 -3
- package/dist/vocab/type.test.js +4 -3
- package/dist/vocab/vocab.test.js +166 -165
- package/dist/{vocab-axlR_8k0.js → vocab-B3OHEs0d.js} +2 -2
- package/dist/{lookup-C7SSHgK7.js → vocab-DAAAeCmt.js} +188 -800
- package/dist/{vocab-C96aggZM.cjs → vocab-Dli8kmX2.cjs} +2 -2
- package/dist/webfinger/handler.test.js +34 -28
- package/dist/webfinger/lookup.test.js +11 -10
- package/dist/webfinger/mod.cjs +1 -1
- package/dist/webfinger/mod.js +1 -1
- package/package.json +22 -13
- package/dist/fixtures/activitypub.academy/users/brauca_darradiul.json +0 -83
- package/dist/fixtures/example.com/announce.json +0 -6
- package/dist/fixtures/example.com/collection.json +0 -19
- package/dist/fixtures/example.com/create.json +0 -6
- package/dist/fixtures/example.com/cross-origin-actor.json +0 -6
- package/dist/fixtures/example.com/hong-gildong.json +0 -11
- package/dist/fixtures/example.com/invite.json +0 -7
- package/dist/fixtures/example.com/key.json +0 -7
- package/dist/fixtures/example.com/key2.json +0 -6
- package/dist/fixtures/example.com/object.json +0 -6
- package/dist/fixtures/example.com/orderedcollectionpage.json +0 -24
- package/dist/fixtures/example.com/paged/a.json +0 -13
- package/dist/fixtures/example.com/paged/b.json +0 -16
- package/dist/fixtures/example.com/paged-collection.json +0 -6
- package/dist/fixtures/example.com/person.json +0 -22
- package/dist/fixtures/example.com/person2.json +0 -40
- package/dist/fixtures/example.com/test.json +0 -5
- package/dist/fixtures/example.com/users/handle.json +0 -16
- package/dist/fixtures/example.com/wrong-type.json +0 -3
- package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +0 -6
- package/dist/fixtures/oeee.cafe/ap/users/3609fd4e-d51d-4db8-9f04-4189815864dd.json +0 -24
- package/dist/fixtures/remote.domain/users/bob.json +0 -20
- package/dist/fixtures/server.example/users/alice.json +0 -20
- package/dist/fixtures/w3id.org/identity/v1.json +0 -152
- package/dist/fixtures/w3id.org/security/data-integrity/v1.json +0 -74
- package/dist/fixtures/w3id.org/security/multikey/v1.json +0 -35
- package/dist/fixtures/w3id.org/security/v1.json +0 -50
- package/dist/fixtures/wizard.casa/users/hongminhee.json +0 -69
- package/dist/fixtures/www.w3.org/ns/activitystreams.json +0 -379
- package/dist/fixtures/www.w3.org/ns/did/v1.json +0 -58
- package/dist/middleware-BYBwqvTv.cjs +0 -15
- package/dist/middleware-DC7h2qq-.js +0 -26
- package/dist/middleware-mQR2SM7T.js +0 -15
- package/dist/otel-1BmGPuZc.js +0 -64
- package/dist/src/vocab/accept.yaml +0 -15
- package/dist/src/vocab/activity.yaml +0 -98
- package/dist/src/vocab/add.yaml +0 -16
- package/dist/src/vocab/announce.yaml +0 -30
- package/dist/src/vocab/application.yaml +0 -324
- package/dist/src/vocab/arrive.yaml +0 -15
- package/dist/src/vocab/article.yaml +0 -46
- package/dist/src/vocab/audio.yaml +0 -11
- package/dist/src/vocab/block.yaml +0 -16
- package/dist/src/vocab/chatmessage.yaml +0 -50
- package/dist/src/vocab/collection.yaml +0 -154
- package/dist/src/vocab/collectionpage.yaml +0 -55
- package/dist/src/vocab/create.yaml +0 -28
- package/dist/src/vocab/dataintegrityproof.yaml +0 -56
- package/dist/src/vocab/delete.yaml +0 -27
- package/dist/src/vocab/didservice.yaml +0 -22
- package/dist/src/vocab/dislike.yaml +0 -14
- package/dist/src/vocab/document.yaml +0 -31
- package/dist/src/vocab/emoji.yaml +0 -12
- package/dist/src/vocab/emojireact.yaml +0 -17
- package/dist/src/vocab/endpoints.yaml +0 -85
- package/dist/src/vocab/event.yaml +0 -11
- package/dist/src/vocab/export.yaml +0 -9
- package/dist/src/vocab/flag.yaml +0 -15
- package/dist/src/vocab/follow.yaml +0 -19
- package/dist/src/vocab/group.yaml +0 -324
- package/dist/src/vocab/hashtag.yaml +0 -14
- package/dist/src/vocab/ignore.yaml +0 -14
- package/dist/src/vocab/image.yaml +0 -9
- package/dist/src/vocab/intransitiveactivity.yaml +0 -15
- package/dist/src/vocab/invite.yaml +0 -14
- package/dist/src/vocab/join.yaml +0 -14
- package/dist/src/vocab/key.yaml +0 -28
- package/dist/src/vocab/leave.yaml +0 -14
- package/dist/src/vocab/like.yaml +0 -16
- package/dist/src/vocab/link.yaml +0 -101
- package/dist/src/vocab/listen.yaml +0 -12
- package/dist/src/vocab/mention.yaml +0 -9
- package/dist/src/vocab/move.yaml +0 -15
- package/dist/src/vocab/multikey.yaml +0 -36
- package/dist/src/vocab/note.yaml +0 -48
- package/dist/src/vocab/object.yaml +0 -404
- package/dist/src/vocab/offer.yaml +0 -15
- package/dist/src/vocab/orderedcollection.yaml +0 -39
- package/dist/src/vocab/orderedcollectionpage.yaml +0 -50
- package/dist/src/vocab/organization.yaml +0 -324
- package/dist/src/vocab/page.yaml +0 -11
- package/dist/src/vocab/person.yaml +0 -324
- package/dist/src/vocab/place.yaml +0 -75
- package/dist/src/vocab/profile.yaml +0 -26
- package/dist/src/vocab/propertyvalue.yaml +0 -32
- package/dist/src/vocab/question.yaml +0 -103
- package/dist/src/vocab/read.yaml +0 -13
- package/dist/src/vocab/reject.yaml +0 -14
- package/dist/src/vocab/relationship.yaml +0 -52
- package/dist/src/vocab/remove.yaml +0 -14
- package/dist/src/vocab/service.yaml +0 -324
- package/dist/src/vocab/source.yaml +0 -26
- package/dist/src/vocab/tentativeaccept.yaml +0 -14
- package/dist/src/vocab/tentativereject.yaml +0 -14
- package/dist/src/vocab/tombstone.yaml +0 -24
- package/dist/src/vocab/travel.yaml +0 -16
- package/dist/src/vocab/undo.yaml +0 -26
- package/dist/src/vocab/update.yaml +0 -58
- package/dist/src/vocab/video.yaml +0 -11
- package/dist/src/vocab/view.yaml +0 -13
- package/dist/testing/docloader.test.js +0 -22
- /package/dist/{assert_equals-DSbWqCm3.js → assert_equals-Gbplq4lg.js} +0 -0
- /package/dist/{collection-BzWsN9pB.js → collection-CrkRM5Ep.js} +0 -0
- /package/dist/{negotiation-C4nFufNk.js → negotiation-B4NJHk1f.js} +0 -0
- /package/dist/{testing/docloader.test.d.ts → otel/exporter.test.d.ts} +0 -0
- /package/dist/{retry-CfF8Gn4d.js → retry-Bz5pP75o.js} +0 -0
- /package/dist/{types-C2XVl6gj.js → types-D2jhK2VG.js} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { AssertionError } from "./assert_equals-
|
|
6
|
+
import { AssertionError } from "./assert_equals-Gbplq4lg.js";
|
|
7
7
|
|
|
8
8
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { AssertionError } from "./assert_equals-
|
|
6
|
+
import { AssertionError } from "./assert_equals-Gbplq4lg.js";
|
|
7
7
|
|
|
8
8
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { AssertionError, equal } from "./assert_equals-
|
|
6
|
+
import { AssertionError, equal } from "./assert_equals-Gbplq4lg.js";
|
|
7
7
|
|
|
8
8
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js
|
|
9
9
|
/**
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { AssertionError } from "./assert_equals-
|
|
7
|
-
import { assertIsError } from "./assert_throws-
|
|
6
|
+
import { AssertionError } from "./assert_equals-Gbplq4lg.js";
|
|
7
|
+
import { assertIsError } from "./assert_throws-DjkXin1a.js";
|
|
8
8
|
|
|
9
9
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js
|
|
10
10
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { AssertionError, stripAnsiCode } from "./assert_equals-
|
|
6
|
+
import { AssertionError, stripAnsiCode } from "./assert_equals-Gbplq4lg.js";
|
|
7
7
|
|
|
8
8
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js
|
|
9
9
|
/**
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { deno_default } from "./deno-4flJ39CF.js";
|
|
7
|
+
import { Router, RouterError } from "./router-CVRQXlZi.js";
|
|
8
|
+
import { getTypeId } from "./type-BSNcIxTd.js";
|
|
9
|
+
import { InboxListenerSet } from "./inbox-EbZ68wVh.js";
|
|
8
10
|
import { getLogger } from "@logtape/logtape";
|
|
9
11
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
12
|
|
|
@@ -42,7 +44,7 @@ var FederationBuilderImpl = class {
|
|
|
42
44
|
this.collectionTypeIds = {};
|
|
43
45
|
}
|
|
44
46
|
async build(options) {
|
|
45
|
-
const { FederationImpl } = await import("./middleware-
|
|
47
|
+
const { FederationImpl } = await import("./middleware-B0GQ0wYj.js");
|
|
46
48
|
const f = new FederationImpl(options);
|
|
47
49
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
48
50
|
f.router = this.router.clone();
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
|
|
8
|
+
//#region rolldown:runtime
|
|
9
|
+
var __create = Object.create;
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
14
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
+
var __commonJS = (cb, mod) => function() {
|
|
16
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
+
};
|
|
18
|
+
var __export = (target, all) => {
|
|
19
|
+
for (var name in all) __defProp(target, name, {
|
|
20
|
+
get: all[name],
|
|
21
|
+
enumerable: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
26
|
+
key = keys[i];
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
28
|
+
get: ((k) => from[k]).bind(null, key),
|
|
29
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return to;
|
|
33
|
+
};
|
|
34
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
35
|
+
value: mod,
|
|
36
|
+
enumerable: true
|
|
37
|
+
}) : target, mod));
|
|
38
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { __commonJS, __export, __require, __toESM };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { getUserAgent } from "@fedify/vocab-runtime";
|
|
7
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
|
+
import { getUserAgent } from "@fedify/vocab-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/nodeinfo/client.ts
|
|
10
10
|
const logger = getLogger([
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import "../http-M8k5mKc0.cjs";
|
|
|
5
5
|
import "../owner-B4HbyP8s.cjs";
|
|
6
6
|
import "../mod-BxRCHTz-.cjs";
|
|
7
7
|
import "../mod-C58MZ7Wx.cjs";
|
|
8
|
-
import { ActivityTransformer } from "../context-
|
|
9
|
-
import "../kv-
|
|
10
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-
|
|
8
|
+
import { ActivityTransformer } from "../context-DBQ7nMCw.cjs";
|
|
9
|
+
import "../kv-cD_d4hg-.cjs";
|
|
10
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-Dy2fJtmN.cjs";
|
|
11
11
|
export { ActivityTransformer, actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
package/dist/compat/mod.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import "../http-BbO0ejuk.js";
|
|
|
7
7
|
import "../owner-kQRGVXG1.js";
|
|
8
8
|
import "../mod-BlVovdcy.js";
|
|
9
9
|
import "../mod-Ds0mpFZU.js";
|
|
10
|
-
import { ActivityTransformer } from "../context-
|
|
11
|
-
import "../kv-
|
|
12
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-
|
|
10
|
+
import { ActivityTransformer } from "../context-mM0Nu5yo.js";
|
|
11
|
+
import "../kv-BpJND1Hr.js";
|
|
12
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-GetHzY6F.js";
|
|
13
13
|
export { ActivityTransformer, actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
|
@@ -3,30 +3,35 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
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
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import "../
|
|
18
|
-
import "../
|
|
19
|
-
import "../
|
|
20
|
-
import "../
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import
|
|
6
|
+
import { test } from "../dist-lStjlyET.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-Gbplq4lg.js";
|
|
8
|
+
import { assert } from "../assert-Dp5_aoAs.js";
|
|
9
|
+
import { assertInstanceOf } from "../assert_instance_of-D1m8F7x0.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-DaWUKuhD.js";
|
|
11
|
+
import "../deno-4flJ39CF.js";
|
|
12
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-De9qUrT0.js";
|
|
13
|
+
import "../client-CD87uCL_.js";
|
|
14
|
+
import "../router-CVRQXlZi.js";
|
|
15
|
+
import "../types-D2jhK2VG.js";
|
|
16
|
+
import { Follow, Person } from "../vocab-DAAAeCmt.js";
|
|
17
|
+
import "../lookup-DHL4lalh.js";
|
|
18
|
+
import "../type-BSNcIxTd.js";
|
|
19
|
+
import "../actor-CDJsk2cL.js";
|
|
20
|
+
import "../key-CVwsdpBG.js";
|
|
21
|
+
import "../http-Zo_IIAIm.js";
|
|
22
|
+
import "../ld-BCG9onip.js";
|
|
23
|
+
import "../owner-gQW9WlbQ.js";
|
|
24
|
+
import "../proof-BCEIPcIs.js";
|
|
25
|
+
import "../docloader-56fs8u4N.js";
|
|
26
|
+
import "../kv-cache-C6NrTtII.js";
|
|
27
|
+
import "../lookup-wr524AFq.js";
|
|
28
|
+
import "../inbox-EbZ68wVh.js";
|
|
29
|
+
import "../builder-sNAekxA0.js";
|
|
30
|
+
import "../collection-CrkRM5Ep.js";
|
|
31
|
+
import "../keycache-Brygl5RE.js";
|
|
32
|
+
import "../negotiation-B4NJHk1f.js";
|
|
33
|
+
import "../retry-Bz5pP75o.js";
|
|
34
|
+
import "../send-DUnZeDiy.js";
|
|
30
35
|
|
|
31
36
|
//#region src/compat/transformers.test.ts
|
|
32
37
|
const federation = new FederationImpl({ kv: new MemoryKvStore() });
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
import { mockDocumentLoader } from "./dist-lStjlyET.js";
|
|
7
|
+
import { RouterError } from "./router-CVRQXlZi.js";
|
|
8
|
+
import { lookupWebFinger } from "./lookup-DHL4lalh.js";
|
|
9
|
+
import { lookupObject, traverseCollection } from "./lookup-wr524AFq.js";
|
|
10
|
+
import { trace } from "@opentelemetry/api";
|
|
11
|
+
|
|
12
|
+
//#region src/testing/context.ts
|
|
13
|
+
function createContext(values) {
|
|
14
|
+
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getCollectionUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity } = values;
|
|
15
|
+
function throwRouteError() {
|
|
16
|
+
throw new RouterError("Not implemented");
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
federation,
|
|
20
|
+
data,
|
|
21
|
+
origin: url.origin,
|
|
22
|
+
canonicalOrigin: canonicalOrigin ?? url.origin,
|
|
23
|
+
host: url.host,
|
|
24
|
+
hostname: url.hostname,
|
|
25
|
+
documentLoader: documentLoader ?? mockDocumentLoader,
|
|
26
|
+
contextLoader: contextLoader ?? mockDocumentLoader,
|
|
27
|
+
tracerProvider: tracerProvider ?? trace.getTracerProvider(),
|
|
28
|
+
clone: clone ?? ((data$1) => createContext({
|
|
29
|
+
...values,
|
|
30
|
+
data: data$1
|
|
31
|
+
})),
|
|
32
|
+
getNodeInfoUri: getNodeInfoUri ?? throwRouteError,
|
|
33
|
+
getActorUri: getActorUri ?? throwRouteError,
|
|
34
|
+
getObjectUri: getObjectUri ?? throwRouteError,
|
|
35
|
+
getCollectionUri: getCollectionUri ?? throwRouteError,
|
|
36
|
+
getOutboxUri: getOutboxUri ?? throwRouteError,
|
|
37
|
+
getInboxUri: getInboxUri ?? throwRouteError,
|
|
38
|
+
getFollowingUri: getFollowingUri ?? throwRouteError,
|
|
39
|
+
getFollowersUri: getFollowersUri ?? throwRouteError,
|
|
40
|
+
getLikedUri: getLikedUri ?? throwRouteError,
|
|
41
|
+
getFeaturedUri: getFeaturedUri ?? throwRouteError,
|
|
42
|
+
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError,
|
|
43
|
+
parseUri: parseUri ?? ((_uri) => {
|
|
44
|
+
throw new Error("Not implemented");
|
|
45
|
+
}),
|
|
46
|
+
getDocumentLoader: getDocumentLoader ?? ((_params) => {
|
|
47
|
+
throw new Error("Not implemented");
|
|
48
|
+
}),
|
|
49
|
+
getActorKeyPairs: getActorKeyPairs ?? ((_handle) => Promise.resolve([])),
|
|
50
|
+
lookupObject: lookupObject$1 ?? ((uri, options = {}) => {
|
|
51
|
+
return lookupObject(uri, {
|
|
52
|
+
documentLoader: options.documentLoader ?? documentLoader ?? mockDocumentLoader,
|
|
53
|
+
contextLoader: options.contextLoader ?? contextLoader ?? mockDocumentLoader
|
|
54
|
+
});
|
|
55
|
+
}),
|
|
56
|
+
traverseCollection: traverseCollection$1 ?? ((collection, options = {}) => {
|
|
57
|
+
return traverseCollection(collection, {
|
|
58
|
+
documentLoader: options.documentLoader ?? documentLoader ?? mockDocumentLoader,
|
|
59
|
+
contextLoader: options.contextLoader ?? contextLoader ?? mockDocumentLoader
|
|
60
|
+
});
|
|
61
|
+
}),
|
|
62
|
+
lookupNodeInfo: lookupNodeInfo ?? ((_params) => {
|
|
63
|
+
throw new Error("Not implemented");
|
|
64
|
+
}),
|
|
65
|
+
lookupWebFinger: lookupWebFinger$1 ?? ((resource, options = {}) => {
|
|
66
|
+
return lookupWebFinger(resource, options);
|
|
67
|
+
}),
|
|
68
|
+
sendActivity: sendActivity ?? ((_params) => {
|
|
69
|
+
throw new Error("Not implemented");
|
|
70
|
+
}),
|
|
71
|
+
routeActivity: routeActivity ?? ((_params) => {
|
|
72
|
+
throw new Error("Not implemented");
|
|
73
|
+
})
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function createRequestContext(args) {
|
|
77
|
+
return {
|
|
78
|
+
...createContext(args),
|
|
79
|
+
clone: args.clone ?? ((data) => createRequestContext({
|
|
80
|
+
...args,
|
|
81
|
+
data
|
|
82
|
+
})),
|
|
83
|
+
request: args.request ?? new Request(args.url),
|
|
84
|
+
url: args.url,
|
|
85
|
+
getActor: args.getActor ?? (() => Promise.resolve(null)),
|
|
86
|
+
getObject: args.getObject ?? (() => Promise.resolve(null)),
|
|
87
|
+
getSignedKey: args.getSignedKey ?? (() => Promise.resolve(null)),
|
|
88
|
+
getSignedKeyOwner: args.getSignedKeyOwner ?? (() => Promise.resolve(null)),
|
|
89
|
+
sendActivity: args.sendActivity ?? ((_params) => {
|
|
90
|
+
throw new Error("Not implemented");
|
|
91
|
+
})
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function createInboxContext(args) {
|
|
95
|
+
return {
|
|
96
|
+
...createContext(args),
|
|
97
|
+
clone: args.clone ?? ((data) => createInboxContext({
|
|
98
|
+
...args,
|
|
99
|
+
data
|
|
100
|
+
})),
|
|
101
|
+
recipient: args.recipient ?? null,
|
|
102
|
+
forwardActivity: args.forwardActivity ?? ((_params) => {
|
|
103
|
+
throw new Error("Not implemented");
|
|
104
|
+
})
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
//#endregion
|
|
109
|
+
export { createInboxContext, createRequestContext };
|
|
@@ -5,7 +5,7 @@ import { HttpMessageSignaturesSpec } from "./http-M8k5mKc0.cjs";
|
|
|
5
5
|
import { GetKeyOwnerOptions } from "./owner-B4HbyP8s.cjs";
|
|
6
6
|
import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-BxRCHTz-.cjs";
|
|
7
7
|
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "./mod-C58MZ7Wx.cjs";
|
|
8
|
-
import { KvKey, KvStore } from "./kv-
|
|
8
|
+
import { KvKey, KvStore } from "./kv-cD_d4hg-.cjs";
|
|
9
9
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
10
10
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ import { HttpMessageSignaturesSpec } from "./http-BbO0ejuk.js";
|
|
|
7
7
|
import { GetKeyOwnerOptions } from "./owner-kQRGVXG1.js";
|
|
8
8
|
import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-BlVovdcy.js";
|
|
9
9
|
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "./mod-Ds0mpFZU.js";
|
|
10
|
-
import { KvKey, KvStore } from "./kv-
|
|
10
|
+
import { KvKey, KvStore } from "./kv-BpJND1Hr.js";
|
|
11
11
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
12
12
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
13
13
|
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
//#region deno.json
|
|
7
|
+
var name = "@fedify/fedify";
|
|
8
|
+
var version = "2.0.0-dev.148+9725d152";
|
|
9
|
+
var license = "MIT";
|
|
10
|
+
var exports = {
|
|
11
|
+
".": "./src/mod.ts",
|
|
12
|
+
"./compat": "./src/compat/mod.ts",
|
|
13
|
+
"./federation": "./src/federation/mod.ts",
|
|
14
|
+
"./nodeinfo": "./src/nodeinfo/mod.ts",
|
|
15
|
+
"./otel": "./src/otel/mod.ts",
|
|
16
|
+
"./sig": "./src/sig/mod.ts",
|
|
17
|
+
"./vocab": "./src/vocab/mod.ts",
|
|
18
|
+
"./utils": "./src/utils/mod.ts",
|
|
19
|
+
"./webfinger": "./src/webfinger/mod.ts"
|
|
20
|
+
};
|
|
21
|
+
var imports = {
|
|
22
|
+
"@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",
|
|
23
|
+
"@opentelemetry/core": "npm:@opentelemetry/core@^2.0.0",
|
|
24
|
+
"@opentelemetry/sdk-trace-base": "npm:@opentelemetry/sdk-trace-base@^2.0.0",
|
|
25
|
+
"@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
|
|
26
|
+
"@std/assert": "jsr:@std/assert@^0.226.0",
|
|
27
|
+
"@std/url": "jsr:@std/url@^0.225.1",
|
|
28
|
+
"asn1js": "npm:asn1js@^3.0.7",
|
|
29
|
+
"fast-check": "npm:fast-check@^3.22.0",
|
|
30
|
+
"fetch-mock": "npm:fetch-mock@^12.5.2",
|
|
31
|
+
"json-canon": "npm:json-canon@^1.0.1",
|
|
32
|
+
"jsonld": "npm:jsonld@^9.0.0",
|
|
33
|
+
"multicodec": "npm:multicodec@^3.2.1",
|
|
34
|
+
"pkijs": "npm:pkijs@^3.3.3",
|
|
35
|
+
"structured-field-values": "npm:structured-field-values@^2.0.4",
|
|
36
|
+
"uri-template-router": "npm:uri-template-router@^1.0.0",
|
|
37
|
+
"url-template": "npm:url-template@^3.1.1"
|
|
38
|
+
};
|
|
39
|
+
var include = ["src/vocab/vocab.ts"];
|
|
40
|
+
var exclude = [
|
|
41
|
+
".test-report.xml",
|
|
42
|
+
"apidoc/",
|
|
43
|
+
"dist/",
|
|
44
|
+
"node_modules/",
|
|
45
|
+
"npm/",
|
|
46
|
+
"pnpm-lock.yaml",
|
|
47
|
+
"src/cfworkers/dist/",
|
|
48
|
+
"src/cfworkers/fixtures/",
|
|
49
|
+
"src/cfworkers/imports.ts",
|
|
50
|
+
"src/cfworkers/README.md",
|
|
51
|
+
"src/cfworkers/server.ts",
|
|
52
|
+
"src/cfworkers/server.js",
|
|
53
|
+
"src/cfworkers/server.js.map",
|
|
54
|
+
"src/vocab/*.yaml",
|
|
55
|
+
"!src/vocab/vocab.ts"
|
|
56
|
+
];
|
|
57
|
+
var publish = { "exclude": ["**/*.test.ts", "src/testing/"] };
|
|
58
|
+
var tasks = {
|
|
59
|
+
"codegen": "deno run --allow-read --allow-write --allow-env --check scripts/codegen.ts && deno fmt src/vocab/vocab.ts && deno cache src/vocab/vocab.ts && deno check src/vocab/vocab.ts",
|
|
60
|
+
"cache": {
|
|
61
|
+
"command": "deno cache src/mod.ts",
|
|
62
|
+
"dependencies": ["codegen"]
|
|
63
|
+
},
|
|
64
|
+
"check": {
|
|
65
|
+
"command": "deno fmt --check && deno lint && deno check src/**/*.ts",
|
|
66
|
+
"dependencies": ["codegen"]
|
|
67
|
+
},
|
|
68
|
+
"test": {
|
|
69
|
+
"command": "deno test --check --doc --allow-read --allow-write --allow-env --unstable-kv --trace-leaks --parallel",
|
|
70
|
+
"dependencies": ["codegen"]
|
|
71
|
+
},
|
|
72
|
+
"coverage": "deno task test --clean --coverage && deno coverage --html coverage",
|
|
73
|
+
"bench": {
|
|
74
|
+
"command": "deno bench --allow-read --allow-write --allow-net --allow-env --allow-run --unstable-kv",
|
|
75
|
+
"dependencies": ["codegen"]
|
|
76
|
+
},
|
|
77
|
+
"apidoc": {
|
|
78
|
+
"command": "deno doc --html --name=Fedify --output=apidoc/ src/mod.ts",
|
|
79
|
+
"dependencies": ["codegen"]
|
|
80
|
+
},
|
|
81
|
+
"publish": {
|
|
82
|
+
"command": "deno publish",
|
|
83
|
+
"dependencies": ["codegen"]
|
|
84
|
+
},
|
|
85
|
+
"pnpm:install": "pnpm install --silent",
|
|
86
|
+
"pnpm:build": {
|
|
87
|
+
"command": "pnpm exec tsdown",
|
|
88
|
+
"dependencies": [
|
|
89
|
+
"codegen",
|
|
90
|
+
"pnpm:install",
|
|
91
|
+
"pnpm:build-vocab",
|
|
92
|
+
"pnpm:build-fixture"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"pnpm:build-vocab-runtime": { "command": "cd ../vocab-runtime && pnpm build" },
|
|
96
|
+
"pnpm:build-vocab-tools": { "command": "cd ../vocab-tools && pnpm build" },
|
|
97
|
+
"pnpm:build-vocab": { "dependencies": ["pnpm:build-vocab-runtime", "pnpm:build-vocab-tools"] },
|
|
98
|
+
"test:node": {
|
|
99
|
+
"command": "cd dist/ && node --test",
|
|
100
|
+
"dependencies": ["pnpm:build"]
|
|
101
|
+
},
|
|
102
|
+
"test:bun": {
|
|
103
|
+
"command": "cd dist/ && bun test --timeout 60000",
|
|
104
|
+
"dependencies": ["pnpm:build"]
|
|
105
|
+
},
|
|
106
|
+
"test:cfworkers": {
|
|
107
|
+
"command": "pnpm exec wrangler deploy --dry-run --outdir src/cfworkers && node --import=tsx src/cfworkers/client.ts",
|
|
108
|
+
"dependencies": ["pnpm:build"]
|
|
109
|
+
},
|
|
110
|
+
"test-all": { "dependencies": [
|
|
111
|
+
"check",
|
|
112
|
+
"test",
|
|
113
|
+
"test:node",
|
|
114
|
+
"test:bun",
|
|
115
|
+
"test:cfworkers"
|
|
116
|
+
] }
|
|
117
|
+
};
|
|
118
|
+
var deno_default = {
|
|
119
|
+
name,
|
|
120
|
+
version,
|
|
121
|
+
license,
|
|
122
|
+
exports,
|
|
123
|
+
imports,
|
|
124
|
+
include,
|
|
125
|
+
exclude,
|
|
126
|
+
publish,
|
|
127
|
+
tasks
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
//#endregion
|
|
131
|
+
export { deno_default };
|