@fedify/fedify 2.0.0-pr.433.1603 → 2.0.0-pr.434.1659
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/dist/actor-BODH8--e.cjs +37786 -0
- package/dist/{actor-CY-MF2fp.js → actor-DJS2ne1f.js} +200 -200
- package/dist/actor-DMgu-ZjT.d.cts +128 -0
- package/dist/{actor-DFlEHCQA.js → actor-WgMDAZc5.js} +1 -1
- package/dist/{assert_rejects-7UF4R_Qs.js → assert_rejects-DiIiJbZn.js} +1 -1
- package/dist/{assert_throws-53_pKeP3.js → assert_throws-BOO88avQ.js} +1 -1
- package/dist/authdocloader-C8Eqv2Kg.cjs +58 -0
- package/dist/{authdocloader-CQBXQkJb.js → authdocloader-FA-VNPvw.js} +3 -3
- package/dist/{authdocloader-Dh8orZQs.js → authdocloader-SW1oQJ7q.js} +6 -6
- package/dist/{builder-Cmx9eExq.js → builder-Cp2PpvmH.js} +4 -4
- package/dist/chunk-DqRYRqnO.cjs +34 -0
- package/dist/client-CegPX0Rn.d.cts +222 -0
- package/dist/{client-DXKgLzk4.js → client-D_BQdihX.js} +1 -1
- package/dist/compat/mod.cjs +10 -0
- package/dist/compat/mod.d.cts +13 -0
- package/dist/compat/mod.d.ts +2 -2
- package/dist/compat/mod.js +5 -5
- package/dist/compat/transformers.test.js +18 -17
- package/dist/compat-DmDDELst.cjs +4 -0
- package/dist/compat-nxUqe4Z-.js +4 -0
- package/dist/{context-CDSZdQHD.d.ts → context-CQsAT7xk.d.ts} +0 -1
- package/dist/context-tVOQ76fi.d.cts +2254 -0
- package/dist/docloader-D-MrRyHl.d.cts +219 -0
- package/dist/{docloader-D4sbvvPM.js → docloader-DrPHprgh.js} +188 -8
- package/dist/docloader-dZO9fPIT.cjs +4861 -0
- package/dist/{esm-D6i4YQ2_.js → esm-CjcCcZ6s.js} +1 -1
- package/dist/federation/builder.test.js +10 -10
- package/dist/federation/collection.test.js +8 -8
- package/dist/federation/handler.test.js +26 -145
- package/dist/federation/inbox.test.js +6 -6
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +9 -8
- package/dist/federation/middleware.test.js +255 -38
- package/dist/federation/mod.cjs +29 -0
- package/dist/federation/mod.d.cts +13 -0
- package/dist/federation/mod.d.ts +1 -1
- package/dist/federation/mod.js +15 -15
- package/dist/federation/mq.test.js +10 -10
- package/dist/federation/negotiation.test.d.ts +3 -0
- package/dist/federation/negotiation.test.js +28 -0
- package/dist/federation/retry.test.js +5 -5
- package/dist/federation/router.test.js +8 -8
- package/dist/federation/send.test.js +15 -15
- package/dist/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
- package/dist/federation-H2_En3j5.cjs +244 -0
- package/dist/{http-mimmGwH8.js → http-BPkuNd26.js} +2 -2
- package/dist/http-BS6766zs.d.cts +253 -0
- package/dist/{http-az-I4DFF.js → http-BgQ07Ja_.js} +6 -6
- package/dist/http-CZJRJ0Pv.cjs +826 -0
- package/dist/{inbox--bLOiwUO.js → inbox-CCB1CbWJ.js} +1 -1
- package/dist/{key-DaaSDiCV.js → key-B_P3wH2F.js} +5 -5
- package/dist/{key-Gjnnnh5S.js → key-BstbqwrH.js} +3 -3
- package/dist/{key-C6ojpFqZ.js → key-C0k2A_bI.js} +2 -2
- package/dist/key-C8TOf6mh.cjs +290 -0
- package/dist/key-CtA7xiw_.js +10 -0
- package/dist/key-hknDPZ-z.cjs +10 -0
- package/dist/{keycache-DZnNO-JV.js → keycache-DvDW8JPA.js} +1 -1
- package/dist/{keys-BU2fip9w.js → keys-DzXrG_sX.js} +1 -1
- package/dist/kv-63Cil1MD.d.cts +81 -0
- package/dist/{ld-tLocOQ6q.js → ld-BcKcM_o9.js} +2 -2
- package/dist/{lookup-DG0T7i6q.js → lookup-C3BC8XO-.js} +4 -4
- package/dist/lookup-C3BGNQTz.cjs +137 -0
- package/dist/{lookup-1CBMmJ3_.js → lookup-DbTBDJcT.js} +1 -1
- package/dist/{middleware-BJn2g4ay.js → middleware-B3crRaK-.js} +50 -81
- package/dist/middleware-BWXHJSkY.cjs +17 -0
- package/dist/middleware-C4A4GTtX.cjs +4204 -0
- package/dist/middleware-CGlIdSyy.js +17 -0
- package/dist/middleware-CUWXMbGt.js +26 -0
- package/dist/{middleware-CU2GpLYi.js → middleware-CXRqw8n4.js} +49 -144
- package/dist/{mod-RI3-KvUI.d.ts → mod-B26zRlH1.d.ts} +1 -1
- package/dist/mod-BClfg3ej.d.cts +266 -0
- package/dist/mod-C2tOeRkN.d.cts +1 -0
- package/dist/mod-DBQAI4v9.d.cts +80 -0
- package/dist/mod-Dc_-mf8s.d.cts +102 -0
- package/dist/mod-FZd39qVq.d.cts +1 -0
- package/dist/mod-evzlRVZq.d.cts +289 -0
- package/dist/mod-jQ4OODsl.d.cts +113 -0
- package/dist/mod.cjs +150 -0
- package/dist/mod.d.cts +17 -0
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +20 -20
- package/dist/mq-B7R1Q-M5.d.cts +140 -0
- package/dist/negotiation-5NPJL6zp.js +71 -0
- package/dist/nodeinfo/client.test.js +10 -10
- package/dist/nodeinfo/handler.test.js +23 -22
- package/dist/nodeinfo/mod.cjs +11 -0
- package/dist/nodeinfo/mod.d.cts +5 -0
- package/dist/nodeinfo/mod.js +6 -6
- package/dist/nodeinfo/types.test.js +8 -8
- package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
- package/dist/nodeinfo-DfycQ8Wf.js +4 -0
- package/dist/owner-B-7Ptt_m.d.cts +67 -0
- package/dist/{owner-qDh_g_5C.js → owner-BcEciLTD.js} +2 -2
- package/dist/{proof-aGjI96QA.js → proof-DAEfR6xA.js} +6 -6
- package/dist/proof-ZBmKo2zb.cjs +673 -0
- package/dist/{proof-DimUFDOB.js → proof-vGquXXR6.js} +2 -2
- package/dist/runtime/authdocloader.test.js +14 -14
- package/dist/runtime/docloader.test.js +9 -9
- package/dist/runtime/key.test.js +10 -10
- package/dist/runtime/langstr.test.js +8 -8
- package/dist/runtime/link.test.d.ts +3 -0
- package/dist/runtime/link.test.js +61 -0
- package/dist/runtime/mod.cjs +25 -0
- package/dist/runtime/mod.d.cts +6 -0
- package/dist/runtime/mod.js +10 -10
- package/dist/runtime/multibase/multibase.test.js +8 -8
- package/dist/runtime/url.test.js +5 -5
- package/dist/runtime-C58AJWSv.cjs +4 -0
- package/dist/runtime-DPYEDf-o.js +4 -0
- package/dist/{send-BDoLPO28.js → send-svmMjAUr.js} +2 -2
- package/dist/sig/http.test.js +13 -13
- package/dist/sig/key.test.js +11 -11
- package/dist/sig/ld.test.js +10 -10
- package/dist/sig/mod.cjs +30 -0
- package/dist/sig/mod.d.cts +8 -0
- package/dist/sig/mod.js +10 -10
- package/dist/sig/owner.test.js +12 -12
- package/dist/sig/proof.test.js +12 -12
- package/dist/sig-ByHXzqUi.cjs +4 -0
- package/dist/sig-Cj3tk-ig.js +4 -0
- package/dist/testing/docloader.test.js +8 -8
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-BtAnu4dJ.js → testing-y9ueu9Aj.js} +2 -2
- package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
- package/dist/transformers-CoBS-oFG.cjs +116 -0
- package/dist/{type-CGIBxLsG.js → type-9o78PXlX.js} +381 -201
- package/dist/{types-DiMJWG0f.js → types-DTCqX5HE.js} +4 -4
- package/dist/types-K5btoOl6.cjs +315 -0
- package/dist/vocab/actor.test.js +10 -10
- package/dist/vocab/lookup.test.js +9 -9
- package/dist/vocab/mod.cjs +87 -0
- package/dist/vocab/mod.d.cts +6 -0
- package/dist/vocab/mod.js +7 -7
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +45 -10
- package/dist/vocab-CJ0jQMQV.cjs +282 -0
- package/dist/{vocab-Br3OfNTW.js → vocab-C_Pm3NG3.js} +6 -6
- package/dist/vocab-DJTYMqyU.d.cts +14632 -0
- package/dist/webfinger/handler.test.js +23 -22
- package/dist/webfinger/lookup.test.js +9 -9
- package/dist/webfinger/mod.cjs +9 -0
- package/dist/webfinger/mod.d.cts +4 -0
- package/dist/webfinger/mod.js +6 -6
- package/dist/webfinger-BjOEdFPs.cjs +4 -0
- package/dist/webfinger-De_bU0iE.js +4 -0
- package/dist/x/cfworkers.cjs +100 -0
- package/dist/x/cfworkers.d.cts +59 -0
- package/dist/x/cfworkers.js +3 -3
- package/dist/x/cfworkers.test.js +8 -8
- package/dist/x/hono.cjs +61 -0
- package/dist/x/hono.d.cts +54 -0
- package/dist/x/hono.d.ts +1 -1
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.cjs +69 -0
- package/dist/x/sveltekit.d.cts +46 -0
- package/dist/x/sveltekit.d.ts +1 -1
- package/dist/x/sveltekit.js +3 -3
- package/package.json +68 -13
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/key-BFfeDCSU.js +0 -10
- package/dist/middleware-aYHOiG0n.js +0 -17
- package/dist/middleware-u5BtkYWm.js +0 -25
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/webfinger-C3GIyXIg.js +0 -4
- /package/dist/{assert_is_error-B035L3om.js → assert_is_error-BPGph1Jx.js} +0 -0
- /package/dist/{assert_not_equals-C80BG-_5.js → assert_not_equals-f3m3epl3.js} +0 -0
- /package/dist/{denokv-jZ0Z2h0M.js → denokv-Bv33Xxea.js} +0 -0
- /package/dist/{retry-CfF8Gn4d.js → retry-D4GJ670a.js} +0 -0
- /package/dist/{std__assert-DWivtrGR.js → std__assert-X-_kMxKM.js} +0 -0
@@ -0,0 +1,282 @@
|
|
1
|
+
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
4
|
+
|
5
|
+
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
6
|
+
const require_docloader = require('./docloader-dZO9fPIT.cjs');
|
7
|
+
const require_actor = require('./actor-BODH8--e.cjs');
|
8
|
+
const require_lookup = require('./lookup-C3BGNQTz.cjs');
|
9
|
+
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
10
|
+
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
11
|
+
const es_toolkit = require_chunk.__toESM(require("es-toolkit"));
|
12
|
+
|
13
|
+
//#region src/vocab/handle.ts
|
14
|
+
/**
|
15
|
+
* Regular expression to match a fediverse handle in the format `@user@server`
|
16
|
+
* or `user@server`. The `user` part can contain alphanumeric characters and
|
17
|
+
* some special characters except `@`. The `server` part is all characters
|
18
|
+
* after the `@` symbol in the middle.
|
19
|
+
*/
|
20
|
+
const handleRegexp = /^@?((?:[-A-Za-z0-9._~!$&'()*+,;=]|%[A-Fa-f0-9]{2})+)@([^@]+)$/;
|
21
|
+
/**
|
22
|
+
* Parses a fediverse handle in the format `@user@server` or `user@server`.
|
23
|
+
* The `user` part can contain alphanumeric characters and some special
|
24
|
+
* characters except `@`. The `server` part is all characters after the `@`
|
25
|
+
* symbol in the middle.
|
26
|
+
*
|
27
|
+
* @example
|
28
|
+
* ```typescript
|
29
|
+
* const handle = parseFediverseHandle("@username@example.com");
|
30
|
+
* console.log(handle?.username); // "username"
|
31
|
+
* console.log(handle?.host); // "example.com"
|
32
|
+
* ```
|
33
|
+
*
|
34
|
+
* @param handle - The fediverse handle string to parse.
|
35
|
+
* @returns A {@link FediverseHandle} object with `username` and `host`
|
36
|
+
* if the input is valid; otherwise `null`.
|
37
|
+
* @since 1.8.0
|
38
|
+
*/
|
39
|
+
function parseFediverseHandle(handle) {
|
40
|
+
const match = handleRegexp.exec(handle);
|
41
|
+
if (match) return {
|
42
|
+
username: match[1],
|
43
|
+
host: match[2]
|
44
|
+
};
|
45
|
+
return null;
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* Checks if a string is a valid fediverse handle in the format `@user@server`
|
49
|
+
* or `user@server`. The `user` part can contain alphanumeric characters and
|
50
|
+
* some special characters except `@`. The `server` part is all characters
|
51
|
+
* after the `@` symbol in the middle.
|
52
|
+
*
|
53
|
+
* @example
|
54
|
+
* ```typescript
|
55
|
+
* console.log(isFediverseHandle("@username@example.com")); // true
|
56
|
+
* console.log(isFediverseHandle("username@example.com")); // true
|
57
|
+
* console.log(isFediverseHandle("@username@")); // false
|
58
|
+
* ```
|
59
|
+
*
|
60
|
+
* @param handle - The string to test as a fediverse handle.
|
61
|
+
* @returns `true` if the string matches the fediverse handle pattern;
|
62
|
+
* otherwise `false`.
|
63
|
+
* @since 1.8.0
|
64
|
+
*/
|
65
|
+
function isFediverseHandle(handle) {
|
66
|
+
return handleRegexp.test(handle);
|
67
|
+
}
|
68
|
+
/**
|
69
|
+
* Converts a fediverse handle in the format `@user@server` or `user@server`
|
70
|
+
* to an `acct:` URI, which is a URL-like identifier for ActivityPub actors.
|
71
|
+
*
|
72
|
+
* @example
|
73
|
+
* ```typescript
|
74
|
+
* const identifier = toAcctUrl("@username@example.com");
|
75
|
+
* console.log(identifier?.href); // "acct:username@example.com"
|
76
|
+
* ```
|
77
|
+
*
|
78
|
+
* @param handle - The fediverse handle string to convert.
|
79
|
+
* @returns A `URL` object representing the `acct:` URI if conversion succeeds;
|
80
|
+
* otherwise `null`.
|
81
|
+
* @since 1.8.0
|
82
|
+
*/
|
83
|
+
function toAcctUrl(handle) {
|
84
|
+
const parsed = parseFediverseHandle(handle);
|
85
|
+
if (!parsed) return null;
|
86
|
+
const identifier = new URL(`acct:${parsed.username}@${parsed.host}`);
|
87
|
+
return identifier;
|
88
|
+
}
|
89
|
+
|
90
|
+
//#endregion
|
91
|
+
//#region src/vocab/lookup.ts
|
92
|
+
const logger = (0, __logtape_logtape.getLogger)([
|
93
|
+
"fedify",
|
94
|
+
"vocab",
|
95
|
+
"lookup"
|
96
|
+
]);
|
97
|
+
/**
|
98
|
+
* Looks up an ActivityStreams object by its URI (including `acct:` URIs)
|
99
|
+
* or a fediverse handle (e.g., `@user@server` or `user@server`).
|
100
|
+
*
|
101
|
+
* @example
|
102
|
+
* ``` typescript
|
103
|
+
* // Look up an actor by its fediverse handle:
|
104
|
+
* await lookupObject("@hongminhee@fosstodon.org");
|
105
|
+
* // returning a `Person` object.
|
106
|
+
*
|
107
|
+
* // A fediverse handle can omit the leading '@':
|
108
|
+
* await lookupObject("hongminhee@fosstodon.org");
|
109
|
+
* // returning a `Person` object.
|
110
|
+
*
|
111
|
+
* // A `acct:` URI can be used as well:
|
112
|
+
* await lookupObject("acct:hongminhee@fosstodon.org");
|
113
|
+
* // returning a `Person` object.
|
114
|
+
*
|
115
|
+
* // Look up an object by its URI:
|
116
|
+
* await lookupObject("https://todon.eu/@hongminhee/112060633798771581");
|
117
|
+
* // returning a `Note` object.
|
118
|
+
*
|
119
|
+
* // It can be a `URL` object as well:
|
120
|
+
* await lookupObject(new URL("https://todon.eu/@hongminhee/112060633798771581"));
|
121
|
+
* // returning a `Note` object.
|
122
|
+
* ```
|
123
|
+
*
|
124
|
+
* @param identifier The URI or fediverse handle to look up.
|
125
|
+
* @param options Lookup options.
|
126
|
+
* @returns The object, or `null` if not found.
|
127
|
+
* @since 0.2.0
|
128
|
+
*/
|
129
|
+
async function lookupObject(identifier, options = {}) {
|
130
|
+
const tracerProvider = options.tracerProvider ?? __opentelemetry_api.trace.getTracerProvider();
|
131
|
+
const tracer = tracerProvider.getTracer(require_docloader.deno_default.name, require_docloader.deno_default.version);
|
132
|
+
return await tracer.startActiveSpan("activitypub.lookup_object", async (span) => {
|
133
|
+
try {
|
134
|
+
const result = await lookupObjectInternal(identifier, options);
|
135
|
+
if (result == null) span.setStatus({ code: __opentelemetry_api.SpanStatusCode.ERROR });
|
136
|
+
else {
|
137
|
+
if (result.id != null) span.setAttribute("activitypub.object.id", result.id.href);
|
138
|
+
span.setAttribute("activitypub.object.type", require_actor.getTypeId(result).href);
|
139
|
+
if (result.replyTargetIds.length > 0) span.setAttribute("activitypub.object.in_reply_to", result.replyTargetIds.map((id) => id.href));
|
140
|
+
}
|
141
|
+
return result;
|
142
|
+
} catch (error) {
|
143
|
+
span.setStatus({
|
144
|
+
code: __opentelemetry_api.SpanStatusCode.ERROR,
|
145
|
+
message: String(error)
|
146
|
+
});
|
147
|
+
throw error;
|
148
|
+
} finally {
|
149
|
+
span.end();
|
150
|
+
}
|
151
|
+
});
|
152
|
+
}
|
153
|
+
async function lookupObjectInternal(identifier, options = {}) {
|
154
|
+
const documentLoader = options.documentLoader ?? require_docloader.getDocumentLoader({ userAgent: options.userAgent });
|
155
|
+
if (typeof identifier === "string") identifier = toAcctUrl(identifier) ?? new URL(identifier);
|
156
|
+
let document = null;
|
157
|
+
if (identifier.protocol === "http:" || identifier.protocol === "https:") try {
|
158
|
+
const remoteDoc = await documentLoader(identifier.href, { signal: options.signal });
|
159
|
+
document = remoteDoc.document;
|
160
|
+
} catch (error) {
|
161
|
+
logger.debug("Failed to fetch remote document:\n{error}", { error });
|
162
|
+
}
|
163
|
+
if (document == null) {
|
164
|
+
const jrd = await require_lookup.lookupWebFinger(identifier, {
|
165
|
+
userAgent: options.userAgent,
|
166
|
+
tracerProvider: options.tracerProvider,
|
167
|
+
allowPrivateAddress: "allowPrivateAddress" in options && options.allowPrivateAddress === true,
|
168
|
+
signal: options.signal
|
169
|
+
});
|
170
|
+
if (jrd?.links == null) return null;
|
171
|
+
for (const l of jrd.links) {
|
172
|
+
if (l.type !== "application/activity+json" && !l.type?.match(/application\/ld\+json;\s*profile="https:\/\/www.w3.org\/ns\/activitystreams"/) || l.rel !== "self" || l.href == null) continue;
|
173
|
+
try {
|
174
|
+
const remoteDoc = await documentLoader(l.href, { signal: options.signal });
|
175
|
+
document = remoteDoc.document;
|
176
|
+
break;
|
177
|
+
} catch (error) {
|
178
|
+
logger.debug("Failed to fetch remote document:\n{error}", { error });
|
179
|
+
continue;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
if (document == null) return null;
|
184
|
+
try {
|
185
|
+
return await require_actor.Object.fromJsonLd(document, {
|
186
|
+
documentLoader,
|
187
|
+
contextLoader: options.contextLoader,
|
188
|
+
tracerProvider: options.tracerProvider
|
189
|
+
});
|
190
|
+
} catch (error) {
|
191
|
+
if (error instanceof TypeError) {
|
192
|
+
logger.debug("Failed to parse JSON-LD document: {error}\n{document}", {
|
193
|
+
error,
|
194
|
+
document
|
195
|
+
});
|
196
|
+
return null;
|
197
|
+
}
|
198
|
+
throw error;
|
199
|
+
}
|
200
|
+
}
|
201
|
+
/**
|
202
|
+
* Traverses a collection, yielding each item in the collection.
|
203
|
+
* If the collection is paginated, it will fetch the next page
|
204
|
+
* automatically.
|
205
|
+
*
|
206
|
+
* @example
|
207
|
+
* ``` typescript
|
208
|
+
* const collection = await lookupObject(collectionUrl);
|
209
|
+
* if (collection instanceof Collection) {
|
210
|
+
* for await (const item of traverseCollection(collection)) {
|
211
|
+
* console.log(item.id?.href);
|
212
|
+
* }
|
213
|
+
* }
|
214
|
+
* ```
|
215
|
+
*
|
216
|
+
* @param collection The collection to traverse.
|
217
|
+
* @param options Options for traversing the collection.
|
218
|
+
* @returns An async iterable of each item in the collection.
|
219
|
+
* @since 1.1.0
|
220
|
+
*/
|
221
|
+
async function* traverseCollection(collection, options = {}) {
|
222
|
+
if (collection.firstId == null) for await (const item of collection.getItems(options)) yield item;
|
223
|
+
else {
|
224
|
+
const interval = Temporal.Duration.from(options.interval ?? { seconds: 0 }).total("millisecond");
|
225
|
+
let page = await collection.getFirst(options);
|
226
|
+
while (page != null) {
|
227
|
+
for await (const item of page.getItems(options)) yield item;
|
228
|
+
if (interval > 0) await (0, es_toolkit.delay)(interval);
|
229
|
+
page = await page.getNext(options);
|
230
|
+
}
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
//#endregion
|
235
|
+
//#region src/vocab/constants.ts
|
236
|
+
/**
|
237
|
+
* The special public collection for [public addressing]. *Do not mutate this
|
238
|
+
* object.*
|
239
|
+
*
|
240
|
+
* [public addressing]: https://www.w3.org/TR/activitypub/#public-addressing
|
241
|
+
*
|
242
|
+
* @since 0.7.0
|
243
|
+
*/
|
244
|
+
const PUBLIC_COLLECTION = new URL("https://www.w3.org/ns/activitystreams#Public");
|
245
|
+
|
246
|
+
//#endregion
|
247
|
+
Object.defineProperty(exports, 'PUBLIC_COLLECTION', {
|
248
|
+
enumerable: true,
|
249
|
+
get: function () {
|
250
|
+
return PUBLIC_COLLECTION;
|
251
|
+
}
|
252
|
+
});
|
253
|
+
Object.defineProperty(exports, 'isFediverseHandle', {
|
254
|
+
enumerable: true,
|
255
|
+
get: function () {
|
256
|
+
return isFediverseHandle;
|
257
|
+
}
|
258
|
+
});
|
259
|
+
Object.defineProperty(exports, 'lookupObject', {
|
260
|
+
enumerable: true,
|
261
|
+
get: function () {
|
262
|
+
return lookupObject;
|
263
|
+
}
|
264
|
+
});
|
265
|
+
Object.defineProperty(exports, 'parseFediverseHandle', {
|
266
|
+
enumerable: true,
|
267
|
+
get: function () {
|
268
|
+
return parseFediverseHandle;
|
269
|
+
}
|
270
|
+
});
|
271
|
+
Object.defineProperty(exports, 'toAcctUrl', {
|
272
|
+
enumerable: true,
|
273
|
+
get: function () {
|
274
|
+
return toAcctUrl;
|
275
|
+
}
|
276
|
+
});
|
277
|
+
Object.defineProperty(exports, 'traverseCollection', {
|
278
|
+
enumerable: true,
|
279
|
+
get: function () {
|
280
|
+
return traverseCollection;
|
281
|
+
}
|
282
|
+
});
|
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
6
|
-
import { Object as Object$1, getTypeId } from "./actor-
|
7
|
-
import { lookupWebFinger } from "./lookup-
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-DrPHprgh.js";
|
6
|
+
import { Object as Object$1, getTypeId } from "./actor-DJS2ne1f.js";
|
7
|
+
import { lookupWebFinger } from "./lookup-C3BC8XO-.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { delay } from "es-toolkit";
|