@fedify/fedify 1.5.0-dev.699 → 1.5.0-dev.714
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/CHANGES.md +61 -1
- package/esm/deno.js +1 -2
- package/esm/runtime/key.js +1 -1
- package/esm/runtime/multibase/base.js +30 -0
- package/esm/runtime/multibase/constants.js +78 -0
- package/esm/runtime/multibase/index.js +59 -0
- package/esm/runtime/multibase/rfc4648.js +79 -0
- package/esm/runtime/multibase/util.js +13 -0
- package/esm/runtime/url.js +7 -2
- package/esm/vocab/actor.js +2 -2
- package/esm/vocab/vocab.js +177 -177
- package/esm/webfinger/handler.js +2 -2
- package/package.json +2 -2
- package/types/deno.d.ts +0 -1
- package/types/runtime/multibase/base.d.ts +15 -0
- package/types/runtime/multibase/base.d.ts.map +1 -0
- package/types/runtime/multibase/constants.d.ts +5 -0
- package/types/runtime/multibase/constants.d.ts.map +1 -0
- package/types/runtime/multibase/index.d.ts +24 -0
- package/types/runtime/multibase/index.d.ts.map +1 -0
- package/types/runtime/multibase/rfc4648.d.ts +6 -0
- package/types/runtime/multibase/rfc4648.d.ts.map +1 -0
- package/types/runtime/multibase/util.d.ts +4 -0
- package/types/runtime/multibase/util.d.ts.map +1 -0
- package/types/runtime/url.d.ts.map +1 -1
package/esm/webfinger/handler.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { getLogger } from "@logtape/logtape";
|
2
2
|
import { SpanKind, SpanStatusCode } from "@opentelemetry/api";
|
3
|
-
import {
|
3
|
+
import { domainToASCII } from "node:url";
|
4
4
|
import { Link as LinkObject } from "../vocab/mod.js";
|
5
5
|
const logger = getLogger(["fedify", "webfinger", "server"]);
|
6
6
|
/**
|
@@ -85,7 +85,7 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
|
|
85
85
|
}
|
86
86
|
}
|
87
87
|
else {
|
88
|
-
const resourceHost =
|
88
|
+
const resourceHost = domainToASCII(match[2].toLowerCase());
|
89
89
|
if (resourceHost != context.url.host && resourceHost != host) {
|
90
90
|
return await onNotFound(request);
|
91
91
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fedify/fedify",
|
3
|
-
"version": "1.5.0-dev.
|
3
|
+
"version": "1.5.0-dev.714+56abdd05",
|
4
4
|
"description": "An ActivityPub server framework",
|
5
5
|
"keywords": [
|
6
6
|
"ActivityPub",
|
@@ -96,13 +96,13 @@
|
|
96
96
|
"dependencies": {
|
97
97
|
"@hugoalh/http-header-link": "^1.0.2",
|
98
98
|
"@logtape/logtape": "^0.8.2",
|
99
|
+
"@multiformats/base-x": "^4.0.1",
|
99
100
|
"@opentelemetry/api": "^1.9.0",
|
100
101
|
"@opentelemetry/semantic-conventions": "^1.27.0",
|
101
102
|
"@phensley/language-tag": "^1.9.0",
|
102
103
|
"asn1js": "^3.0.5",
|
103
104
|
"json-canon": "^1.0.1",
|
104
105
|
"jsonld": "^8.3.2",
|
105
|
-
"multibase": "^4.0.6",
|
106
106
|
"multicodec": "^3.2.1",
|
107
107
|
"pkijs": "^3.2.4",
|
108
108
|
"uri-template-router": "^0.0.16",
|
package/types/deno.d.ts
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { BaseCode, BaseName, Codec, CodecFactory } from "./types";
|
2
|
+
/**
|
3
|
+
* Class to encode/decode in the supported Bases
|
4
|
+
*/
|
5
|
+
export declare class Base {
|
6
|
+
name: BaseName;
|
7
|
+
private code;
|
8
|
+
private alphabet;
|
9
|
+
codeBuf: Uint8Array;
|
10
|
+
codec: Codec;
|
11
|
+
constructor(name: BaseName, code: BaseCode, factory: CodecFactory, alphabet: string);
|
12
|
+
encode(buf: Uint8Array): string;
|
13
|
+
decode(string: string): Uint8Array;
|
14
|
+
}
|
15
|
+
//# sourceMappingURL=base.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE;;GAEG;AACH,qBAAa,IAAI;IAKN,IAAI,EAAE,QAAQ;IACrB,OAAO,CAAC,IAAI;IAEZ,OAAO,CAAC,QAAQ;IAPX,OAAO,EAAE,UAAU,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;gBAGJ,IAAI,EAAE,QAAQ,EACb,IAAI,EAAE,QAAQ,EACtB,OAAO,EAAE,YAAY,EACb,QAAQ,EAAE,MAAM;IAO1B,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM;IAI/B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU;CAQnC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAsEhE,eAAO,MAAM,KAAK,wBAMjB,CAAC;AAEF,eAAO,MAAM,KAAK,wBAMjB,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import type { BaseNameOrCode } from "./types";
|
2
|
+
import type { Base } from "./base.js";
|
3
|
+
/**
|
4
|
+
* Encode data with the specified base and add the multibase prefix.
|
5
|
+
*
|
6
|
+
* @throws {Error} Will throw if the encoding is not supported
|
7
|
+
*/
|
8
|
+
export declare function encode(nameOrCode: BaseNameOrCode, buf: Uint8Array): Uint8Array;
|
9
|
+
/**
|
10
|
+
* Takes a Uint8Array or string encoded with multibase header, decodes it and
|
11
|
+
* returns the decoded buffer
|
12
|
+
*
|
13
|
+
* @throws {Error} Will throw if the encoding is not supported
|
14
|
+
*/
|
15
|
+
export declare function decode(data: Uint8Array | string): Uint8Array;
|
16
|
+
/**
|
17
|
+
* Get encoding from data
|
18
|
+
*
|
19
|
+
* @param {string|Uint8Array} data
|
20
|
+
* @returns {Base}
|
21
|
+
* @throws {Error} Will throw if the encoding is not supported
|
22
|
+
*/
|
23
|
+
export declare function encodingFromData(data: string | Uint8Array): Base;
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,UAAU,EAAE,cAAc,EAC1B,GAAG,EAAE,UAAU,GACd,UAAU,CAKZ;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,CAgB5D;AA0BD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAMhE"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rfc4648.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/rfc4648.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA0F5C;;GAEG;AACH,eAAO,MAAM,OAAO,gBAAiB,MAAM,KAAG,YAS7C,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/runtime/multibase/util.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,UAAW,QAAQ,GAAG,UAAU,KAAG,MAC/B,CAAC;AAG5B,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,UAChB,CAAC;AAE3B,wBAAgB,MAAM,CACpB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAC9B,MAAM,EAAE,MAAM,GACb,UAAU,CAUZ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/runtime/url.ts"],"names":[],"mappings":"AAKA,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/runtime/url.ts"],"names":[],"mappings":"AAKA,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ClE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CASjE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,WASvD;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWzD"}
|