@fedify/fedify 1.8.1-pr.328.1165 → 1.8.1-pr.329.1205
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 +1 -4
- package/dist/{actor-BvUN9QgD.js → actor-BR3M3Bg3.js} +179 -179
- package/dist/{actor-6WfgEEM7.js → actor-CMQ_Gxax.js} +4 -1
- package/dist/{assert_rejects-AjlKk-Vo.js → assert_rejects-DceVjUlD.js} +1 -1
- package/dist/{assert_throws-CqMKbTh_.js → assert_throws-DTDC_gwN.js} +1 -1
- package/dist/{authdocloader-BxpW2l0x.js → authdocloader-AvrLkCka.js} +3 -3
- package/dist/{authdocloader-DlQKiAuj.js → authdocloader-CNt1UkcL.js} +4 -3
- package/dist/{builder-Bql0U6IX.js → builder-ZewotViE.js} +5 -4
- package/dist/chunk-HsBuZ-b2.js +41 -0
- package/dist/{client-CI4TcEtW.js → client-C2F5RZOv.js} +2 -2
- package/dist/compat/transformers.test.js +27 -20
- package/dist/context-Cc5Prh-p.js +108 -0
- package/dist/docloader-09nVWLAZ.js +68 -0
- package/dist/{docloader-B6dtEu0e.js → docloader-DaZu_7K2.js} +1 -2
- package/dist/docloader-Dj3ESYni.js +4526 -0
- package/dist/{esm-80CEOYyg.js → esm-d-9EVGaP.js} +1 -1
- package/dist/federation/builder.test.js +16 -11
- package/dist/federation/collection.test.js +7 -9
- package/dist/federation/handler.test.js +35 -26
- package/dist/federation/inbox.test.js +10 -6
- package/dist/federation/keycache.test.js +7 -4
- package/dist/federation/kv.test.js +6 -8
- package/dist/federation/middleware.test.js +35 -27
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +8 -10
- package/dist/federation/retry.test.js +3 -5
- package/dist/federation/router.test.js +7 -8
- package/dist/federation/send.test.js +21 -15
- package/dist/{http-Cdm4poZb.js → http-3Bbxlpky.js} +3 -2
- package/dist/{http-epXQkoos.js → http-D3F6HGUu.js} +3 -3
- package/dist/{inbox-ClBcgVPg.js → inbox-DKd5F3DT.js} +3 -1
- package/dist/{key-Cl_Xlkrv.js → key-BcO5OTYc.js} +2 -2
- package/dist/{key-B2Vg4tVB.js → key-BduQHf38.js} +4 -4
- package/dist/key-DwQrog_Y.js +16 -0
- package/dist/{key-D2T-GDYd.js → key-wb9EWpSb.js} +3 -2
- package/dist/{keycache-M-zWLLCU.js → keycache-DnA7Ub23.js} +1 -1
- package/dist/{keys-qx88le-G.js → keys-BRV40NP0.js} +1 -1
- package/dist/langstr-DbWheeIS.js +33 -0
- package/dist/{ld-ZkyR7ab4.js → ld-viIK1KF8.js} +4 -2
- package/dist/{lookup-BlMMBOS2.js → lookup-B21lQ9pb.js} +1 -1
- package/dist/{lookup-BH2SgpoS.js → lookup-B9AWrAUf.js} +6 -113
- package/dist/lookup-sc6ms_6o.js +132 -0
- package/dist/{middleware-0TQ_tx1T.js → middleware-BSmfCdQG.js} +21 -17
- package/dist/middleware-C6bO8pt_.js +17 -0
- package/dist/middleware-CavVW6ka.js +33 -0
- package/dist/{middleware-Cye6GERQ.js → middleware-y21POb8Y.js} +11 -11
- package/dist/mod.js +10 -10
- package/dist/multibase-DeCHcK8L.js +316 -0
- package/dist/nodeinfo/client.test.js +11 -11
- package/dist/nodeinfo/handler.test.js +34 -25
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +7 -9
- package/dist/nodeinfo/types.test.js +8 -10
- package/dist/{owner-C_vL0hRG.js → owner-DGNtApEB.js} +3 -2
- package/dist/{proof-CiYpiavN.js → proof-Be4Tmi-k.js} +3 -3
- package/dist/{proof-Dz3Yq7kI.js → proof-X397Edu9.js} +4 -2
- package/dist/router-D3UybECj.js +118 -0
- package/dist/runtime/authdocloader.test.js +20 -14
- package/dist/runtime/docloader.test.js +10 -9
- package/dist/runtime/key.test.js +15 -10
- package/dist/runtime/langstr.test.js +7 -8
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +7 -8
- package/dist/runtime/url.test.js +4 -5
- package/dist/{send-CDQXxlmm.js → send-MctFltyI.js} +2 -2
- package/dist/sig/http.test.js +19 -13
- package/dist/sig/key.test.js +17 -11
- package/dist/sig/ld.test.js +16 -10
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +19 -12
- package/dist/sig/proof.test.js +18 -12
- package/dist/testing/docloader.test.js +7 -8
- package/dist/testing/mod.d.ts +1 -8387
- package/dist/testing/mod.js +2 -4
- package/dist/testing-BZ0dJ4qn.js +143 -0
- package/dist/type-D2s5lmbZ.js +14 -0
- package/dist/{types-E0EOd3en.js → types-BlaDGaMP.js} +1 -1
- package/dist/{types-n7HI7VFr.js → types-C7C_l-jz.js} +1 -1
- package/dist/url-kTAI6_KP.js +68 -0
- package/dist/vocab/actor.test.js +16 -10
- package/dist/vocab/lookup.test.js +16 -9
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +7 -3
- package/dist/vocab/vocab.test.js +13 -9
- package/dist/{vocab-fVvi4e5m.js → vocab-CMem4Z8B.js} +3 -3
- package/dist/{type-BvQGw6hv.js → vocab-CpXP4iIV.js} +183 -5255
- package/dist/webfinger/handler.test.js +34 -25
- package/dist/webfinger/lookup.test.js +10 -9
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +6 -8
- package/package.json +1 -1
- package/dist/key-CE5RdobB.js +0 -10
- package/dist/middleware-DPQqiqLu.js +0 -26
- package/dist/middleware-Dh8xaPyd.js +0 -17
- package/dist/testing-COl4JbdC.js +0 -301
- /package/dist/{assert_is_error-CeVBLPsZ.js → assert_is_error-DQdKoRgb.js} +0 -0
- /package/dist/{assert_not_equals-D2R2nl5h.js → assert_not_equals-7pyUM3Ib.js} +0 -0
- /package/dist/{collection-D5V3UzU3.js → collection-Dfb0TPno.js} +0 -0
- /package/dist/{denokv-DK9P5Jq7.js → denokv-QWKsIqML.js} +0 -0
- /package/dist/{retry-BnpVRGFC.js → retry-BiIhZWgD.js} +0 -0
- /package/dist/{semver-DCqorrj5.js → semver-DWClQt_5.js} +0 -0
- /package/dist/{std__assert-BQdmxyzF.js → std__assert-B3iAixc-.js} +0 -0
package/dist/testing/mod.js
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../
|
|
7
|
-
import "../lookup-BH2SgpoS.js";
|
|
8
|
-
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-COl4JbdC.js";
|
|
6
|
+
import { test, testDefinitions } from "../testing-BZ0dJ4qn.js";
|
|
9
7
|
|
|
10
|
-
export {
|
|
8
|
+
export { test, testDefinitions };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
import { __require } from "./chunk-HsBuZ-b2.js";
|
|
7
|
+
import { configure, getConsoleSink, reset } from "@logtape/logtape";
|
|
8
|
+
|
|
9
|
+
//#region testing/mod.ts
|
|
10
|
+
const testDefinitions = [];
|
|
11
|
+
function test(name, options, fn) {
|
|
12
|
+
const def = typeof name === "string" ? typeof options === "function" ? {
|
|
13
|
+
name,
|
|
14
|
+
fn: options
|
|
15
|
+
} : {
|
|
16
|
+
name,
|
|
17
|
+
...options,
|
|
18
|
+
fn
|
|
19
|
+
} : name;
|
|
20
|
+
testDefinitions.push(def);
|
|
21
|
+
if ("Deno" in globalThis) {
|
|
22
|
+
const func = def.fn;
|
|
23
|
+
Deno.test({
|
|
24
|
+
...def,
|
|
25
|
+
async fn(t) {
|
|
26
|
+
const records = [];
|
|
27
|
+
await configure({
|
|
28
|
+
sinks: {
|
|
29
|
+
buffer(record) {
|
|
30
|
+
if (record.category.length > 1 && record.category[0] === "logtape" && record.category[1] === "meta") return;
|
|
31
|
+
records.push(record);
|
|
32
|
+
},
|
|
33
|
+
console: getConsoleSink()
|
|
34
|
+
},
|
|
35
|
+
filters: {},
|
|
36
|
+
loggers: [{
|
|
37
|
+
category: [],
|
|
38
|
+
sinks: [Deno.env.get("LOG") === "always" ? "console" : "buffer"]
|
|
39
|
+
}]
|
|
40
|
+
});
|
|
41
|
+
try {
|
|
42
|
+
await func(t);
|
|
43
|
+
} catch (e) {
|
|
44
|
+
const consoleSink = getConsoleSink();
|
|
45
|
+
for (const record of records) consoleSink(record);
|
|
46
|
+
throw e;
|
|
47
|
+
} finally {
|
|
48
|
+
await reset();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
} else if ("Bun" in globalThis) {
|
|
53
|
+
let failed = void 0;
|
|
54
|
+
async function step(defOrNameOrFn, fn$2) {
|
|
55
|
+
let def$1;
|
|
56
|
+
if (typeof defOrNameOrFn === "string") def$1 = {
|
|
57
|
+
name: defOrNameOrFn,
|
|
58
|
+
fn: fn$2
|
|
59
|
+
};
|
|
60
|
+
else if (typeof defOrNameOrFn === "function") def$1 = {
|
|
61
|
+
name: defOrNameOrFn.name,
|
|
62
|
+
fn: defOrNameOrFn
|
|
63
|
+
};
|
|
64
|
+
else def$1 = defOrNameOrFn;
|
|
65
|
+
if (def$1.ignore) return true;
|
|
66
|
+
try {
|
|
67
|
+
await def$1.fn({
|
|
68
|
+
name: def$1.name,
|
|
69
|
+
origin: "",
|
|
70
|
+
step
|
|
71
|
+
});
|
|
72
|
+
} catch (e) {
|
|
73
|
+
failed ??= e;
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
const ctx = {
|
|
79
|
+
name: def.name,
|
|
80
|
+
origin: "",
|
|
81
|
+
step
|
|
82
|
+
};
|
|
83
|
+
async function fn$1() {
|
|
84
|
+
await def.fn(ctx);
|
|
85
|
+
if (failed) throw failed;
|
|
86
|
+
}
|
|
87
|
+
const bunTest = Bun.jest(caller()).test;
|
|
88
|
+
if (def.ignore) bunTest.skip(def.name, fn$1);
|
|
89
|
+
else if (def.only) bunTest.only(def.name, fn$1);
|
|
90
|
+
else bunTest(def.name, fn$1);
|
|
91
|
+
} else try {
|
|
92
|
+
const { test: nodeTest } = __require("node:test");
|
|
93
|
+
nodeTest(def.name, {
|
|
94
|
+
only: def.only,
|
|
95
|
+
skip: def.ignore
|
|
96
|
+
}, async (t) => {
|
|
97
|
+
await def.fn(intoDenoTestContext(def.name, t));
|
|
98
|
+
});
|
|
99
|
+
} catch {}
|
|
100
|
+
}
|
|
101
|
+
function intoDenoTestContext(name, ctx) {
|
|
102
|
+
async function step(defOrNameOrFn, fn) {
|
|
103
|
+
let def;
|
|
104
|
+
if (typeof defOrNameOrFn === "string") def = {
|
|
105
|
+
name: defOrNameOrFn,
|
|
106
|
+
fn
|
|
107
|
+
};
|
|
108
|
+
else if (typeof defOrNameOrFn === "function") def = {
|
|
109
|
+
name: defOrNameOrFn.name,
|
|
110
|
+
fn: defOrNameOrFn
|
|
111
|
+
};
|
|
112
|
+
else def = defOrNameOrFn;
|
|
113
|
+
let failed = false;
|
|
114
|
+
await ctx.test(def.name, async (ctx2) => {
|
|
115
|
+
try {
|
|
116
|
+
await def.fn(intoDenoTestContext(def.name, ctx2));
|
|
117
|
+
} catch (e) {
|
|
118
|
+
failed = true;
|
|
119
|
+
throw e;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
return failed;
|
|
123
|
+
}
|
|
124
|
+
const denoCtx = {
|
|
125
|
+
name,
|
|
126
|
+
origin: ctx.filePath ?? "",
|
|
127
|
+
step
|
|
128
|
+
};
|
|
129
|
+
return denoCtx;
|
|
130
|
+
}
|
|
131
|
+
/** Retrieve caller test file. */
|
|
132
|
+
function caller() {
|
|
133
|
+
const Trace = Error;
|
|
134
|
+
const _ = Trace.prepareStackTrace;
|
|
135
|
+
Trace.prepareStackTrace = (_$1, stack$1) => stack$1;
|
|
136
|
+
const { stack } = /* @__PURE__ */ new Error();
|
|
137
|
+
Trace.prepareStackTrace = _;
|
|
138
|
+
const caller$1 = stack[2];
|
|
139
|
+
return caller$1.getFileName().replaceAll("\\", "/");
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
//#endregion
|
|
143
|
+
export { test, testDefinitions };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
//#region vocab/type.ts
|
|
7
|
+
function getTypeId(object) {
|
|
8
|
+
if (object == null) return object;
|
|
9
|
+
const cls = object.constructor;
|
|
10
|
+
return cls.typeId;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { getTypeId };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { getUserAgent } from "./docloader-
|
|
5
|
+
import { getUserAgent } from "./docloader-DaZu_7K2.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
|
|
8
8
|
//#region nodeinfo/semver.ts
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
import { lookup } from "node:dns/promises";
|
|
7
|
+
import { isIP } from "node:net";
|
|
8
|
+
|
|
9
|
+
//#region runtime/url.ts
|
|
10
|
+
var UrlError = class extends Error {
|
|
11
|
+
constructor(message) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.name = "UrlError";
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Validates a URL to prevent SSRF attacks.
|
|
18
|
+
*/
|
|
19
|
+
async function validatePublicUrl(url) {
|
|
20
|
+
const parsed = new URL(url);
|
|
21
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new UrlError(`Unsupported protocol: ${parsed.protocol}`);
|
|
22
|
+
let hostname = parsed.hostname;
|
|
23
|
+
if (hostname.startsWith("[") && hostname.endsWith("]")) hostname = hostname.substring(1, hostname.length - 2);
|
|
24
|
+
if (hostname === "localhost") throw new UrlError("Localhost is not allowed");
|
|
25
|
+
if ("Deno" in globalThis && !isIP(hostname)) {
|
|
26
|
+
const netPermission = await Deno.permissions.query({ name: "net" });
|
|
27
|
+
if (netPermission.state !== "granted") return;
|
|
28
|
+
}
|
|
29
|
+
if ("Bun" in globalThis) {
|
|
30
|
+
if (hostname === "example.com" || hostname.endsWith(".example.com")) return;
|
|
31
|
+
else if (hostname === "fedify-test.internal") throw new UrlError("Invalid or private address: fedify-test.internal");
|
|
32
|
+
}
|
|
33
|
+
let addresses;
|
|
34
|
+
try {
|
|
35
|
+
addresses = await lookup(hostname, { all: true });
|
|
36
|
+
} catch {
|
|
37
|
+
addresses = [];
|
|
38
|
+
}
|
|
39
|
+
for (const { address, family } of addresses) if (family === 4 && !isValidPublicIPv4Address(address) || family === 6 && !isValidPublicIPv6Address(address) || family < 4 || family === 5 || family > 6) throw new UrlError(`Invalid or private address: ${address}`);
|
|
40
|
+
}
|
|
41
|
+
function isValidPublicIPv4Address(address) {
|
|
42
|
+
const parts = address.split(".");
|
|
43
|
+
const first = parseInt(parts[0]);
|
|
44
|
+
if (first === 0 || first === 10 || first === 127) return false;
|
|
45
|
+
const second = parseInt(parts[1]);
|
|
46
|
+
if (first === 169 && second === 254) return false;
|
|
47
|
+
if (first === 172 && second >= 16 && second <= 31) return false;
|
|
48
|
+
if (first === 192 && second === 168) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
function isValidPublicIPv6Address(address) {
|
|
52
|
+
address = expandIPv6Address(address);
|
|
53
|
+
if (address.at(4) !== ":") return false;
|
|
54
|
+
const firstWord = parseInt(address.substring(0, 4), 16);
|
|
55
|
+
return !(firstWord >= 64512 && firstWord <= 65023 || firstWord >= 65152 && firstWord <= 65215 || firstWord === 0 || firstWord >= 65280);
|
|
56
|
+
}
|
|
57
|
+
function expandIPv6Address(address) {
|
|
58
|
+
address = address.toLowerCase();
|
|
59
|
+
if (address === "::") return "0000:0000:0000:0000:0000:0000:0000:0000";
|
|
60
|
+
if (address.startsWith("::")) address = "0000" + address;
|
|
61
|
+
if (address.endsWith("::")) address = address + "0000";
|
|
62
|
+
address = address.replace("::", ":0000".repeat(8 - (address.match(/:/g) || []).length) + ":");
|
|
63
|
+
const parts = address.split(":");
|
|
64
|
+
return parts.map((part) => part.padStart(4, "0")).join(":");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
export { UrlError, expandIPv6Address, isValidPublicIPv4Address, isValidPublicIPv6Address, validatePublicUrl };
|
package/dist/vocab/actor.test.js
CHANGED
|
@@ -3,19 +3,25 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { __export } from "../chunk-HsBuZ-b2.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
8
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
9
|
import "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
-
import "../
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
10
|
+
import "../docloader-Dj3ESYni.js";
|
|
11
|
+
import "../url-kTAI6_KP.js";
|
|
12
|
+
import "../multibase-DeCHcK8L.js";
|
|
13
|
+
import { Application, Group, Organization, Person, Service } from "../vocab-CpXP4iIV.js";
|
|
14
|
+
import "../langstr-DbWheeIS.js";
|
|
15
|
+
import "../lookup-sc6ms_6o.js";
|
|
16
|
+
import "../type-D2s5lmbZ.js";
|
|
17
|
+
import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-CMQ_Gxax.js";
|
|
18
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
|
19
|
+
import { assertStrictEquals } from "../std__assert-B3iAixc-.js";
|
|
20
|
+
import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
|
|
21
|
+
import "../assert_is_error-DQdKoRgb.js";
|
|
22
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
|
23
|
+
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
|
24
|
+
import { esm_default } from "../esm-d-9EVGaP.js";
|
|
19
25
|
|
|
20
26
|
//#region ../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js
|
|
21
27
|
var PreconditionFailure = class PreconditionFailure extends Error {
|
|
@@ -3,18 +3,25 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Collection, Note, Object as Object$1, Person } from "../type-BvQGw6hv.js";
|
|
7
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
7
|
import "../assert-DwEa6glZ.js";
|
|
9
8
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import {
|
|
9
|
+
import "../docloader-Dj3ESYni.js";
|
|
10
|
+
import "../url-kTAI6_KP.js";
|
|
11
|
+
import "../multibase-DeCHcK8L.js";
|
|
12
|
+
import { Collection, Note, Object as Object$1, Person } from "../vocab-CpXP4iIV.js";
|
|
13
|
+
import "../langstr-DbWheeIS.js";
|
|
14
|
+
import "../lookup-sc6ms_6o.js";
|
|
15
|
+
import "../type-D2s5lmbZ.js";
|
|
16
|
+
import { lookupObject, traverseCollection } from "../lookup-B9AWrAUf.js";
|
|
17
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
|
18
|
+
import "../std__assert-B3iAixc-.js";
|
|
19
|
+
import "../assert_rejects-DceVjUlD.js";
|
|
20
|
+
import "../assert_is_error-DQdKoRgb.js";
|
|
21
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
|
22
|
+
import "../assert_throws-DTDC_gwN.js";
|
|
23
|
+
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
|
24
|
+
import { esm_default } from "../esm-d-9EVGaP.js";
|
|
18
25
|
|
|
19
26
|
//#region vocab/lookup.test.ts
|
|
20
27
|
test("lookupObject()", async (t) => {
|
package/dist/vocab/mod.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../docloader-
|
|
6
|
-
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-
|
|
7
|
-
import "../lookup-
|
|
8
|
-
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-
|
|
5
|
+
import "../docloader-DaZu_7K2.js";
|
|
6
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-BR3M3Bg3.js";
|
|
7
|
+
import "../lookup-B21lQ9pb.js";
|
|
8
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-CMem4Z8B.js";
|
|
9
9
|
|
|
10
10
|
export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
|
package/dist/vocab/type.test.js
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Person, getTypeId } from "../type-BvQGw6hv.js";
|
|
7
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
7
|
+
import "../docloader-Dj3ESYni.js";
|
|
8
|
+
import "../url-kTAI6_KP.js";
|
|
9
|
+
import "../multibase-DeCHcK8L.js";
|
|
10
|
+
import { Person } from "../vocab-CpXP4iIV.js";
|
|
11
|
+
import "../langstr-DbWheeIS.js";
|
|
12
|
+
import { getTypeId } from "../type-D2s5lmbZ.js";
|
|
13
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
|
10
14
|
|
|
11
15
|
//#region vocab/type.test.ts
|
|
12
16
|
test("getTypeId()", () => {
|
package/dist/vocab/vocab.test.js
CHANGED
|
@@ -3,18 +3,22 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, LanguageString, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, decode, vocab_exports } from "../type-BvQGw6hv.js";
|
|
7
6
|
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
|
8
7
|
import { assert } from "../assert-DwEa6glZ.js";
|
|
9
8
|
import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
|
|
10
|
-
import "../
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import {
|
|
14
|
-
import "../
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
9
|
+
import "../docloader-Dj3ESYni.js";
|
|
10
|
+
import "../url-kTAI6_KP.js";
|
|
11
|
+
import { decode } from "../multibase-DeCHcK8L.js";
|
|
12
|
+
import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "../vocab-CpXP4iIV.js";
|
|
13
|
+
import { LanguageString } from "../langstr-DbWheeIS.js";
|
|
14
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
|
15
|
+
import "../std__assert-B3iAixc-.js";
|
|
16
|
+
import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
|
|
17
|
+
import "../assert_is_error-DQdKoRgb.js";
|
|
18
|
+
import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
|
|
19
|
+
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
|
20
|
+
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
|
21
|
+
import { ed25519PublicKey, rsaPublicKey1 } from "../keys-BRV40NP0.js";
|
|
18
22
|
import { pascalCase } from "es-toolkit";
|
|
19
23
|
import { parseLanguageTag } from "@phensley/language-tag";
|
|
20
24
|
import { Validator } from "@cfworker/json-schema";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
|
6
|
-
import { Object as Object$1, getTypeId } from "./actor-
|
|
7
|
-
import { lookupWebFinger } from "./lookup-
|
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-DaZu_7K2.js";
|
|
6
|
+
import { Object as Object$1, getTypeId } from "./actor-BR3M3Bg3.js";
|
|
7
|
+
import { lookupWebFinger } from "./lookup-B21lQ9pb.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { delay } from "es-toolkit";
|