@fedify/fedify 2.4.0-dev.2054 → 2.4.0-dev.2063
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/{builder-C86Z3BKs.mjs → builder-BzS4brdy.mjs} +8 -2
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-BcZqTCwy.mjs → compound-proof-BrSXP5so.mjs} +1 -1
- package/dist/{context-BJPHhBmD.d.ts → context-D_gg4M0n.d.ts} +102 -1
- package/dist/{context-Bh_mJfbD.d.cts → context-b36TpPoG.d.cts} +102 -1
- package/dist/{deno-Bz6KTcon.mjs → deno-CVZgG4sc.mjs} +1 -1
- package/dist/{docloader-DS54zLD1.mjs → docloader-DBb8z7_l.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/hashlink-media.test.d.mts +2 -0
- package/dist/federation/hashlink-media.test.mjs +422 -0
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +7 -7
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +5 -5
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/router.test.mjs +2 -152
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-su1OEWsM.cjs → federation-BrsIzNK5.cjs} +139 -21
- package/dist/{http-C3WGK1dL.js → http-99KVDtMr.js} +1 -1
- package/dist/{http-LmUsMjK_.cjs → http-CVjwUCCu.cjs} +1 -1
- package/dist/{http-Ty805y3A.mjs → http-znjq5j6a.mjs} +3 -3
- package/dist/{key-BMc-2eW0.mjs → key-BnMA6vpl.mjs} +2 -2
- package/dist/{kv-cache-BhPPtHg7.mjs → kv-cache--REpvHgG.mjs} +1 -1
- package/dist/{kv-cache-CuaZnk6r.cjs → kv-cache-D2O0JspA.cjs} +1 -1
- package/dist/{kv-cache-BcHCmrC8.js → kv-cache-aijDx_jN.js} +1 -1
- package/dist/{ld-OpXWt-80.mjs → ld-BBVP8ock.mjs} +3 -3
- package/dist/{metrics-CTAe8lYz.mjs → metrics-B5spFq82.mjs} +1 -1
- package/dist/{middleware-C-JLcqy7.mjs → middleware-ClrGS1xy.mjs} +1 -1
- package/dist/{middleware-BtwW3G41.mjs → middleware-Cw8EWwAT.mjs} +145 -33
- package/dist/{middleware-_CMav1o7.js → middleware-CzYM4cJI.js} +140 -22
- package/dist/{mod-DU8aVzQJ.d.cts → mod-Bfenkg_c.d.cts} +1 -1
- package/dist/{mod-BofpDIcU.d.ts → mod-BhMvsgdF.d.ts} +1 -1
- package/dist/{mod-CNRAxXEb.d.ts → mod-Dhm7SqyE.d.ts} +150 -2
- package/dist/{mod-CVQFWefn.d.cts → mod-pLbeNwcC.d.cts} +150 -2
- package/dist/mod.cjs +6 -5
- package/dist/mod.d.cts +5 -5
- package/dist/mod.d.ts +5 -5
- package/dist/mod.js +6 -6
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-Bcm4pLXw.cjs → owner-CHBQ0sSj.cjs} +34 -2
- package/dist/{owner-B-TLr-1I.js → owner-Cu_KMvQN.js} +29 -3
- package/dist/{owner-RxB_eQpU.mjs → owner-Hc0hvbbX.mjs} +2 -2
- package/dist/{proof-CVf2XbEa.mjs → proof-B69bJaSn.mjs} +32 -6
- package/dist/router-u5O5KCQr.mjs +156 -0
- package/dist/{send-DF9KzhJH.mjs → send-BB5rBhvN.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +2 -2
- package/dist/sig/compound-proof.test.mjs +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +4 -2
- package/dist/sig/mod.d.cts +2 -2
- package/dist/sig/mod.d.ts +2 -2
- package/dist/sig/mod.js +4 -3
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.d.mts +2 -0
- package/dist/sig/portable-collection.test.mjs +971 -0
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/sig-B8WDBV-h.js +401 -0
- package/dist/sig-dut4BzEW.cjs +405 -0
- package/dist/{temporal-B6U3fEUW.mjs → temporal-CcRkOx3C.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +101 -0
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import "temporal-polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { getLogger } from "@logtape/logtape";
|
|
5
|
+
import { Router, RouterError, assertPath, isPath } from "@fedify/uri-template";
|
|
6
|
+
//#region src/federation/router.ts
|
|
7
|
+
const logger = getLogger([
|
|
8
|
+
"fedify",
|
|
9
|
+
"federation",
|
|
10
|
+
"router",
|
|
11
|
+
"deprecated"
|
|
12
|
+
]);
|
|
13
|
+
let deprecationWarned = false;
|
|
14
|
+
function warnDeprecated() {
|
|
15
|
+
if (deprecationWarned) return;
|
|
16
|
+
deprecationWarned = true;
|
|
17
|
+
logger.warn("The `Router` and `RouterError` classes from `@fedify/fedify` are deprecated. Please use `Router` from `@fedify/uri-template` instead.");
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* URL router and constructor based on URI Template
|
|
21
|
+
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
22
|
+
*
|
|
23
|
+
* @deprecated Import `Router` from `@fedify/uri-template` instead. This class
|
|
24
|
+
* remains only for compatibility with older Fedify code. The
|
|
25
|
+
* `@fedify/uri-template` router is the replacement implementation
|
|
26
|
+
* and should be used directly in new code.
|
|
27
|
+
*/
|
|
28
|
+
var Router$1 = class Router$1 {
|
|
29
|
+
#router;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new {@link Router}.
|
|
32
|
+
* @param options Options for the router.
|
|
33
|
+
* @deprecated Use `new Router(options)` from `@fedify/uri-template`
|
|
34
|
+
* instead.
|
|
35
|
+
*/
|
|
36
|
+
constructor(options) {
|
|
37
|
+
this.#router = convertRouterError(() => new Router(options));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Whether to ignore trailing slashes when matching paths.
|
|
41
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. This
|
|
42
|
+
* accessor forwards to the underlying `@fedify/uri-template`
|
|
43
|
+
* router so that post-construction mutation keeps working as
|
|
44
|
+
* in older Fedify code.
|
|
45
|
+
*/
|
|
46
|
+
get trailingSlashInsensitive() {
|
|
47
|
+
return this.#router.trailingSlashInsensitive;
|
|
48
|
+
}
|
|
49
|
+
set trailingSlashInsensitive(value) {
|
|
50
|
+
this.#router.trailingSlashInsensitive = value;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Clones this router.
|
|
54
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
55
|
+
*/
|
|
56
|
+
clone() {
|
|
57
|
+
return convertRouterError(() => {
|
|
58
|
+
const clone = new Router$1();
|
|
59
|
+
clone.#router = this.#router.clone();
|
|
60
|
+
return clone;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Checks if a path name exists in the router.
|
|
65
|
+
* @param name The name of the path.
|
|
66
|
+
* @returns `true` if the path name exists, otherwise `false`.
|
|
67
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
68
|
+
*/
|
|
69
|
+
has(name) {
|
|
70
|
+
return convertRouterError(() => this.#router.has(name));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Adds a new path rule to the router.
|
|
74
|
+
* @param template The path pattern.
|
|
75
|
+
* @param name The name of the path.
|
|
76
|
+
* @returns The names of the variables in the path pattern.
|
|
77
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. In this
|
|
78
|
+
* compatibility class, `add()` both registers the route and
|
|
79
|
+
* returns the variables in the path pattern. In
|
|
80
|
+
* `@fedify/uri-template`, these two responsibilities are split:
|
|
81
|
+
* `router.add(template, name)` registers the route and returns
|
|
82
|
+
* `void`, while the pure static method
|
|
83
|
+
* `Router.variables(template)` returns the variable names. To
|
|
84
|
+
* migrate, call `Router.variables(template)` when variables are
|
|
85
|
+
* needed, then call `router.add(template, name)` to register the
|
|
86
|
+
* route.
|
|
87
|
+
*/
|
|
88
|
+
add(template, name) {
|
|
89
|
+
return convertRouterError(() => {
|
|
90
|
+
assertPath(template);
|
|
91
|
+
this.#router.add(template, name);
|
|
92
|
+
return Router.variables(template);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Resolves a path name and values from a URL, if any match.
|
|
97
|
+
* @param url The URL to resolve.
|
|
98
|
+
* @returns The name of the path and its values, if any match. Otherwise,
|
|
99
|
+
* `null`.
|
|
100
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead. Unlike the
|
|
101
|
+
* stricter `@fedify/uri-template` router, this compatibility
|
|
102
|
+
* method keeps the old Fedify 2.x contract of returning `null`
|
|
103
|
+
* (rather than throwing) for inputs that are not router paths.
|
|
104
|
+
*/
|
|
105
|
+
route(url) {
|
|
106
|
+
return convertRouterError(() => {
|
|
107
|
+
if (!isPath(url)) return null;
|
|
108
|
+
return this.#router.route(url);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Constructs a URL/path from a path name and values.
|
|
113
|
+
* @param name The name of the path.
|
|
114
|
+
* @param values The values to expand the path with.
|
|
115
|
+
* @returns The URL/path, if the name exists. Otherwise, `null`.
|
|
116
|
+
* @deprecated Use `Router` from `@fedify/uri-template` instead.
|
|
117
|
+
*/
|
|
118
|
+
build(name, values) {
|
|
119
|
+
return convertRouterError(() => this.#router.build(name, values));
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* An error thrown by the {@link Router}.
|
|
124
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
125
|
+
*/
|
|
126
|
+
var RouterError$1 = class extends RouterError {
|
|
127
|
+
/**
|
|
128
|
+
* Treats every `RouterError` from `@fedify/uri-template` as an instance of
|
|
129
|
+
* this deprecated class.
|
|
130
|
+
*
|
|
131
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
132
|
+
*/
|
|
133
|
+
static [Symbol.hasInstance](instance) {
|
|
134
|
+
return instance instanceof RouterError;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Create a new {@link RouterError}.
|
|
138
|
+
* @param message The error message.
|
|
139
|
+
* @deprecated Import `RouterError` from `@fedify/uri-template` instead.
|
|
140
|
+
*/
|
|
141
|
+
constructor(message) {
|
|
142
|
+
super(message);
|
|
143
|
+
warnDeprecated();
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
function convertRouterError(func) {
|
|
147
|
+
try {
|
|
148
|
+
warnDeprecated();
|
|
149
|
+
return func();
|
|
150
|
+
} catch (error) {
|
|
151
|
+
if (error instanceof RouterError) throw new RouterError$1(error.message);
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
export { RouterError$1 as n, Router$1 as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-
|
|
6
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { n as version, t as name } from "./deno-CVZgG4sc.mjs";
|
|
5
|
+
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-B5spFq82.mjs";
|
|
6
|
+
import { n as doubleKnock } from "./http-znjq5j6a.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { FetchError, UrlError, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
|
-
import { i as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-
|
|
6
|
+
import { i as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-BrSXP5so.mjs";
|
|
7
7
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/sig/compound-proof-discovery.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
|
-
import { i as inspectCompoundPortableObjectApplicability, r as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-
|
|
6
|
+
import { i as inspectCompoundPortableObjectApplicability, r as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-BrSXP5so.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
//#region src/sig/compound-proof-producer.test.ts
|
|
9
9
|
const portableId = "ap+ef61://did:key:z6MkAlice/objects/1";
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
6
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
7
|
-
import { i as verifyMapLocalProof, s as verifyPortableObjectProofPolicy } from "../proof-
|
|
8
|
-
import { a as verifyCompoundPortableObjectProofs, o as verifyCompoundProofDocuments } from "../compound-proof-
|
|
7
|
+
import { i as verifyMapLocalProof, s as verifyPortableObjectProofPolicy } from "../proof-B69bJaSn.mjs";
|
|
8
|
+
import { a as verifyCompoundPortableObjectProofs, o as verifyCompoundProofDocuments } from "../compound-proof-BrSXP5so.mjs";
|
|
9
9
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
10
10
|
import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -7,8 +7,8 @@ import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
|
7
7
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
8
8
|
import { n as preloadedOnlyDocumentLoader } from "../public-audience--klBIOk1.mjs";
|
|
9
9
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import { o as verifyCompoundProofDocuments } from "../compound-proof-
|
|
10
|
+
import { l as verifyProof, r as signObject } from "../proof-B69bJaSn.mjs";
|
|
11
|
+
import { o as verifyCompoundProofDocuments } from "../compound-proof-BrSXP5so.mjs";
|
|
12
12
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
13
13
|
import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note, Question } from "@fedify/vocab";
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -11,8 +11,8 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
|
11
11
|
import "../std__assert-DvMDRPes.mjs";
|
|
12
12
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
13
13
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
14
|
-
import { t as exportJwk } from "../key-
|
|
15
|
-
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-
|
|
14
|
+
import { t as exportJwk } from "../key-BnMA6vpl.mjs";
|
|
15
|
+
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-znjq5j6a.mjs";
|
|
16
16
|
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
17
17
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
18
18
|
import { FetchError, exportSpki } from "@fedify/vocab-runtime";
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-
|
|
9
|
+
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-BnMA6vpl.mjs";
|
|
10
10
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
11
11
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
12
12
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -8,9 +8,9 @@ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
9
9
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
11
|
+
import { a as generateCryptoKeyPair } from "../key-BnMA6vpl.mjs";
|
|
12
12
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-
|
|
13
|
+
import { a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-BBVP8ock.mjs";
|
|
14
14
|
import { CryptographicKey } from "@fedify/vocab";
|
|
15
15
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
16
|
import { encodeBase64 } from "byte-encodings/base64";
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_http = require("../http-
|
|
4
|
-
const require_owner = require("../owner-
|
|
3
|
+
const require_http = require("../http-CVjwUCCu.cjs");
|
|
4
|
+
const require_owner = require("../owner-CHBQ0sSj.cjs");
|
|
5
|
+
const require_sig = require("../sig-dut4BzEW.cjs");
|
|
5
6
|
exports.attachSignature = require_owner.attachSignature;
|
|
6
7
|
exports.createProof = require_owner.createProof;
|
|
7
8
|
exports.createSignature = require_owner.createSignature;
|
|
@@ -24,6 +25,7 @@ exports.signRequest = require_http.signRequest;
|
|
|
24
25
|
exports.validateAcceptSignature = require_http.validateAcceptSignature;
|
|
25
26
|
exports.verifyJsonLd = require_owner.verifyJsonLd;
|
|
26
27
|
exports.verifyObject = require_owner.verifyObject;
|
|
28
|
+
exports.verifyPortableObject = require_sig.verifyPortableObject;
|
|
27
29
|
exports.verifyPortableObjectProof = require_owner.verifyPortableObjectProof;
|
|
28
30
|
exports.verifyProof = require_owner.verifyProof;
|
|
29
31
|
exports.verifyRequest = require_http.verifyRequest;
|
package/dist/sig/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "../http-CP-7OdSq.cjs";
|
|
3
3
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "../owner-BF0L9cMt.cjs";
|
|
4
|
-
import { C as verifyJsonLd,
|
|
5
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
4
|
+
import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "../mod-pLbeNwcC.cjs";
|
|
5
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "../http-65PYi9jY.js";
|
|
3
3
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "../owner-BSzr5-I8.js";
|
|
4
|
-
import { C as verifyJsonLd,
|
|
5
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
4
|
+
import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "../mod-Dhm7SqyE.js";
|
|
5
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/mod.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { F as validateAcceptSignature, M as formatAcceptSignature, N as fulfillAcceptSignature, P as parseAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, i as verifyRequest, l as fetchKeyDetailed, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "../http-
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { F as validateAcceptSignature, M as formatAcceptSignature, N as fulfillAcceptSignature, P as parseAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, i as verifyRequest, l as fetchKeyDetailed, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "../http-99KVDtMr.js";
|
|
4
|
+
import { C as signJsonLd, E as verifySignature, T as verifyJsonLd, _ as detachSignature, a as signObject, b as hasSignatureLike, c as verifyPortableObjectProof, d as verifyProof, g as createSignature, i as hasProofLike, m as attachSignature, n as getKeyOwner, r as createProof, s as verifyObject, t as doesActorOwnKey } from "../owner-Cu_KMvQN.js";
|
|
5
|
+
import { t as verifyPortableObject } from "../sig-B8WDBV-h.js";
|
|
6
|
+
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/owner.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
8
|
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
9
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-Hc0hvbbX.mjs";
|
|
10
10
|
import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
|
|
11
11
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
//#region src/sig/owner.test.ts
|