@fedify/vocab-runtime 2.4.0-dev.1599 → 2.4.0-dev.1634
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/deno.json +1 -1
- package/dist/{docloader-DnUMWHaJ.d.cts → docloader-C_dir7Xb.d.ts} +2 -0
- package/dist/{docloader-xRGn1azD.d.ts → docloader-D2DTRiyA.d.cts} +2 -0
- package/dist/internal/jsonld-cache.cjs +2 -2
- package/dist/internal/jsonld-cache.d.cts +1 -1
- package/dist/internal/jsonld-cache.d.ts +1 -1
- package/dist/internal/jsonld-cache.js +2 -2
- package/dist/mod.cjs +16 -6
- package/dist/mod.d.cts +28 -2
- package/dist/mod.d.ts +28 -2
- package/dist/mod.js +13 -7
- package/dist/tests/decimal.test.cjs +2 -2
- package/dist/tests/decimal.test.mjs +2 -2
- package/dist/tests/{docloader-CDde_fhH.mjs → docloader-CNzoXrLM.mjs} +12 -6
- package/dist/tests/{docloader-BiSxywul.cjs → docloader-CTd4XwqK.cjs} +12 -6
- package/dist/tests/docloader.test.cjs +3 -3
- package/dist/tests/docloader.test.mjs +3 -3
- package/dist/tests/jsonld-cache.test.cjs +2 -2
- package/dist/tests/jsonld-cache.test.mjs +2 -2
- package/dist/tests/{request-BBw3lNNz.mjs → request-BWDludWb.mjs} +1 -1
- package/dist/tests/{request-C9VKqYdG.cjs → request-Zpjq9m-W.cjs} +1 -1
- package/dist/tests/request.test.cjs +1 -1
- package/dist/tests/request.test.mjs +1 -1
- package/dist/tests/{url-CtKcX6ma.cjs → url-CsOV_B_P.cjs} +90 -3
- package/dist/tests/{url-D7ay_5pk.mjs → url-Du7RQQgP.mjs} +67 -4
- package/dist/tests/url.test.cjs +62 -3
- package/dist/tests/url.test.mjs +62 -3
- package/dist/{url-BMDN9GnE.cjs → url-DD4F0ULf.cjs} +90 -3
- package/dist/{url-BlFta-Eh.js → url-DGVbSVVi.js} +67 -4
- package/package.json +1 -1
- package/src/contexts/fep-ef61.json +10 -0
- package/src/contexts/security-data-integrity-v1.json +0 -4
- package/src/contexts.ts +2 -0
- package/src/docloader.ts +2 -0
- package/src/internal/jsonld-cache.ts +3 -2
- package/src/mod.ts +4 -0
- package/src/url.test.ts +152 -2
- package/src/url.ts +88 -3
package/deno.json
CHANGED
|
@@ -184,8 +184,10 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
184
184
|
* - <https://www.w3.org/ns/activitystreams>
|
|
185
185
|
* - <https://w3id.org/security/v1>
|
|
186
186
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
187
|
+
* - <https://w3id.org/security/data-integrity/v2>
|
|
187
188
|
* - <https://www.w3.org/ns/did/v1>
|
|
188
189
|
* - <https://w3id.org/security/multikey/v1>
|
|
190
|
+
* - <https://w3id.org/fep/ef61>
|
|
189
191
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
190
192
|
* - <http://schema.org/>
|
|
191
193
|
* @param options Options for the document loader.
|
|
@@ -184,8 +184,10 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
184
184
|
* - <https://www.w3.org/ns/activitystreams>
|
|
185
185
|
* - <https://w3id.org/security/v1>
|
|
186
186
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
187
|
+
* - <https://w3id.org/security/data-integrity/v2>
|
|
187
188
|
* - <https://www.w3.org/ns/did/v1>
|
|
188
189
|
* - <https://w3id.org/security/multikey/v1>
|
|
190
|
+
* - <https://w3id.org/fep/ef61>
|
|
189
191
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
190
192
|
* - <http://schema.org/>
|
|
191
193
|
* @param options Options for the document loader.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_url = require("../url-
|
|
3
|
+
const require_url = require("../url-DD4F0ULf.cjs");
|
|
4
4
|
const require_jsonld = require("../jsonld.cjs");
|
|
5
5
|
//#region src/internal/jsonld-cache.ts
|
|
6
6
|
const noJsonLdContext = Symbol("noJsonLdContext");
|
|
@@ -12,7 +12,7 @@ const noJsonLdContext = Symbol("noJsonLdContext");
|
|
|
12
12
|
* Semantic Versioning decisions.
|
|
13
13
|
*/
|
|
14
14
|
function isTrustedIriOrigin(options, left, right) {
|
|
15
|
-
return options.crossOrigin === "trust" || left == null || right != null && require_url.haveSameIriOrigin(left, right);
|
|
15
|
+
return options.crossOrigin === "trust" || left == null || right != null && (require_url.haveSameIriOrigin(left, right) || require_url.haveSameFe34Origin(left, right));
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Normalizes portable IRIs in JSON-LD cache data.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as formatIri,
|
|
2
|
+
import { a as formatIri, c as haveSameIriOrigin, s as haveSameFe34Origin } from "../url-DGVbSVVi.js";
|
|
3
3
|
import jsonld_default from "../jsonld.js";
|
|
4
4
|
//#region src/internal/jsonld-cache.ts
|
|
5
5
|
const noJsonLdContext = Symbol("noJsonLdContext");
|
|
@@ -11,7 +11,7 @@ const noJsonLdContext = Symbol("noJsonLdContext");
|
|
|
11
11
|
* Semantic Versioning decisions.
|
|
12
12
|
*/
|
|
13
13
|
function isTrustedIriOrigin(options, left, right) {
|
|
14
|
-
return options.crossOrigin === "trust" || left == null || right != null && haveSameIriOrigin(left, right);
|
|
14
|
+
return options.crossOrigin === "trust" || left == null || right != null && (haveSameIriOrigin(left, right) || haveSameFe34Origin(left, right));
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Normalizes portable IRIs in JSON-LD cache data.
|
package/dist/mod.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_chunk = require("./chunk-M78iaK0I.cjs");
|
|
4
|
-
const require_url = require("./url-
|
|
4
|
+
const require_url = require("./url-DD4F0ULf.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
7
7
|
let node_process = require("node:process");
|
|
@@ -469,10 +469,6 @@ const preloadedContexts = {
|
|
|
469
469
|
"id": "@id",
|
|
470
470
|
"type": "@type",
|
|
471
471
|
"@protected": true,
|
|
472
|
-
"digestMultibase": {
|
|
473
|
-
"@id": "https://w3id.org/security#digestMultibase",
|
|
474
|
-
"@type": "https://w3id.org/security#multibase"
|
|
475
|
-
},
|
|
476
472
|
"proof": {
|
|
477
473
|
"@id": "https://w3id.org/security#proof",
|
|
478
474
|
"@type": "@id",
|
|
@@ -4309,6 +4305,14 @@ const preloadedContexts = {
|
|
|
4309
4305
|
"@type": "@id"
|
|
4310
4306
|
}
|
|
4311
4307
|
} },
|
|
4308
|
+
"https://w3id.org/fep/ef61": { "@context": {
|
|
4309
|
+
"gateways": {
|
|
4310
|
+
"@id": "https://w3id.org/fep/ef61/gateways",
|
|
4311
|
+
"@type": "@id",
|
|
4312
|
+
"@container": "@list"
|
|
4313
|
+
},
|
|
4314
|
+
"digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
|
|
4315
|
+
} },
|
|
4312
4316
|
"https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
|
|
4313
4317
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4314
4318
|
"lemmy": "https://join-lemmy.org/ns#",
|
|
@@ -4367,7 +4371,7 @@ const preloadedContexts = {
|
|
|
4367
4371
|
//#endregion
|
|
4368
4372
|
//#region deno.json
|
|
4369
4373
|
var name = "@fedify/vocab-runtime";
|
|
4370
|
-
var version = "2.4.0-dev.
|
|
4374
|
+
var version = "2.4.0-dev.1634+3b4bfbb6";
|
|
4371
4375
|
//#endregion
|
|
4372
4376
|
//#region src/link.ts
|
|
4373
4377
|
const parametersNeedLowerCase = ["rel", "type"];
|
|
@@ -4798,8 +4802,10 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4798
4802
|
* - <https://www.w3.org/ns/activitystreams>
|
|
4799
4803
|
* - <https://w3id.org/security/v1>
|
|
4800
4804
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4805
|
+
* - <https://w3id.org/security/data-integrity/v2>
|
|
4801
4806
|
* - <https://www.w3.org/ns/did/v1>
|
|
4802
4807
|
* - <https://w3id.org/security/multikey/v1>
|
|
4808
|
+
* - <https://w3id.org/fep/ef61>
|
|
4803
4809
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
4804
4810
|
* - <http://schema.org/>
|
|
4805
4811
|
* @param options Options for the document loader.
|
|
@@ -5564,8 +5570,10 @@ exports.exportMultibaseKey = exportMultibaseKey;
|
|
|
5564
5570
|
exports.exportSpki = exportSpki;
|
|
5565
5571
|
exports.formatIri = require_url.formatIri;
|
|
5566
5572
|
exports.getDocumentLoader = getDocumentLoader;
|
|
5573
|
+
exports.getFe34Origin = require_url.getFe34Origin;
|
|
5567
5574
|
exports.getRemoteDocument = getRemoteDocument;
|
|
5568
5575
|
exports.getUserAgent = getUserAgent;
|
|
5576
|
+
exports.haveSameFe34Origin = require_url.haveSameFe34Origin;
|
|
5569
5577
|
exports.haveSameIriOrigin = require_url.haveSameIriOrigin;
|
|
5570
5578
|
exports.importDidKey = importDidKey;
|
|
5571
5579
|
exports.importMultibaseKey = importMultibaseKey;
|
|
@@ -5573,11 +5581,13 @@ exports.importPem = importPem;
|
|
|
5573
5581
|
exports.importPkcs1 = importPkcs1;
|
|
5574
5582
|
exports.importSpki = importSpki;
|
|
5575
5583
|
exports.isDecimal = isDecimal;
|
|
5584
|
+
exports.isGatewayUrl = require_url.isGatewayUrl;
|
|
5576
5585
|
exports.isValidPublicIPv4Address = require_url.isValidPublicIPv4Address;
|
|
5577
5586
|
exports.isValidPublicIPv6Address = require_url.isValidPublicIPv6Address;
|
|
5578
5587
|
exports.logRequest = logRequest;
|
|
5579
5588
|
exports.parseDecimal = parseDecimal;
|
|
5580
5589
|
exports.parseDidKeyVerificationMethod = parseDidKeyVerificationMethod;
|
|
5590
|
+
exports.parseGatewayUrl = require_url.parseGatewayUrl;
|
|
5581
5591
|
exports.parseIri = require_url.parseIri;
|
|
5582
5592
|
exports.parseJsonLdId = require_url.parseJsonLdId;
|
|
5583
5593
|
exports.preloadedContexts = preloadedContexts;
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { a as DocumentLoaderOptions, c as getDocumentLoader, d as FetchError, f as GetUserAgentOptions, h as logRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as getUserAgent, n as DocumentLoader, o as GetDocumentLoaderOptions, p as createActivityPubRequest, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as CreateRequestOptions } from "./docloader-
|
|
2
|
+
import { a as DocumentLoaderOptions, c as getDocumentLoader, d as FetchError, f as GetUserAgentOptions, h as logRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as getUserAgent, n as DocumentLoader, o as GetDocumentLoaderOptions, p as createActivityPubRequest, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as CreateRequestOptions } from "./docloader-D2DTRiyA.cjs";
|
|
3
3
|
import { TracerProvider } from "@opentelemetry/api";
|
|
4
4
|
|
|
5
5
|
//#region src/contexts.d.ts
|
|
@@ -353,10 +353,36 @@ declare function canonicalizePortableUri(input: string): string;
|
|
|
353
353
|
*/
|
|
354
354
|
declare function arePortableUrisEqual(left: string, right: string): boolean;
|
|
355
355
|
/**
|
|
356
|
+
* Computes an IRI's FEP-fe34 origin.
|
|
357
|
+
*
|
|
358
|
+
* HTTP(S) IRIs use their web origin. FEP-ef61 portable ActivityPub IRIs and
|
|
359
|
+
* DID URLs use their DID as a cryptographic origin.
|
|
360
|
+
*
|
|
361
|
+
* @throws {TypeError} If the IRI does not have a supported FEP-fe34 origin.
|
|
362
|
+
* @since 2.4.0
|
|
363
|
+
*/
|
|
364
|
+
declare function getFe34Origin(input: string | URL): string;
|
|
365
|
+
/**
|
|
366
|
+
* Checks whether two IRIs have the same FEP-fe34 origin.
|
|
367
|
+
*
|
|
368
|
+
* Malformed or unsupported IRIs are treated as non-matching.
|
|
369
|
+
*
|
|
370
|
+
* @since 2.4.0
|
|
371
|
+
*/
|
|
372
|
+
declare function haveSameFe34Origin(left: string | URL, right: string | URL): boolean;
|
|
373
|
+
/**
|
|
356
374
|
* Checks whether two IRIs have the same origin.
|
|
357
375
|
*/
|
|
358
376
|
declare function haveSameIriOrigin(left: URL, right: URL): boolean;
|
|
359
377
|
/**
|
|
378
|
+
* Checks whether the URL is an FEP-ef61 gateway base URI.
|
|
379
|
+
*/
|
|
380
|
+
declare function isGatewayUrl(url: URL): boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Parses and validates an FEP-ef61 gateway base URI.
|
|
383
|
+
*/
|
|
384
|
+
declare function parseGatewayUrl(url: string): URL;
|
|
385
|
+
/**
|
|
360
386
|
* Validates a URL to prevent SSRF attacks.
|
|
361
387
|
*/
|
|
362
388
|
declare function validatePublicUrl(url: string): Promise<void>;
|
|
@@ -364,4 +390,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
|
|
|
364
390
|
declare function isValidPublicIPv6Address(address: string): boolean;
|
|
365
391
|
declare function expandIPv6Address(address: string): string;
|
|
366
392
|
//#endregion
|
|
367
|
-
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, getRemoteDocument, getUserAgent, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseIri, parseJsonLdId, preloadedContexts, validatePublicUrl };
|
|
393
|
+
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, getFe34Origin, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseGatewayUrl, parseIri, parseJsonLdId, preloadedContexts, validatePublicUrl };
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { a as DocumentLoaderOptions, c as getDocumentLoader, d as FetchError, f as GetUserAgentOptions, h as logRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as getUserAgent, n as DocumentLoader, o as GetDocumentLoaderOptions, p as createActivityPubRequest, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as CreateRequestOptions } from "./docloader-
|
|
2
|
+
import { a as DocumentLoaderOptions, c as getDocumentLoader, d as FetchError, f as GetUserAgentOptions, h as logRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as getUserAgent, n as DocumentLoader, o as GetDocumentLoaderOptions, p as createActivityPubRequest, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as CreateRequestOptions } from "./docloader-C_dir7Xb.js";
|
|
3
3
|
import { TracerProvider } from "@opentelemetry/api";
|
|
4
4
|
|
|
5
5
|
//#region src/contexts.d.ts
|
|
@@ -353,10 +353,36 @@ declare function canonicalizePortableUri(input: string): string;
|
|
|
353
353
|
*/
|
|
354
354
|
declare function arePortableUrisEqual(left: string, right: string): boolean;
|
|
355
355
|
/**
|
|
356
|
+
* Computes an IRI's FEP-fe34 origin.
|
|
357
|
+
*
|
|
358
|
+
* HTTP(S) IRIs use their web origin. FEP-ef61 portable ActivityPub IRIs and
|
|
359
|
+
* DID URLs use their DID as a cryptographic origin.
|
|
360
|
+
*
|
|
361
|
+
* @throws {TypeError} If the IRI does not have a supported FEP-fe34 origin.
|
|
362
|
+
* @since 2.4.0
|
|
363
|
+
*/
|
|
364
|
+
declare function getFe34Origin(input: string | URL): string;
|
|
365
|
+
/**
|
|
366
|
+
* Checks whether two IRIs have the same FEP-fe34 origin.
|
|
367
|
+
*
|
|
368
|
+
* Malformed or unsupported IRIs are treated as non-matching.
|
|
369
|
+
*
|
|
370
|
+
* @since 2.4.0
|
|
371
|
+
*/
|
|
372
|
+
declare function haveSameFe34Origin(left: string | URL, right: string | URL): boolean;
|
|
373
|
+
/**
|
|
356
374
|
* Checks whether two IRIs have the same origin.
|
|
357
375
|
*/
|
|
358
376
|
declare function haveSameIriOrigin(left: URL, right: URL): boolean;
|
|
359
377
|
/**
|
|
378
|
+
* Checks whether the URL is an FEP-ef61 gateway base URI.
|
|
379
|
+
*/
|
|
380
|
+
declare function isGatewayUrl(url: URL): boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Parses and validates an FEP-ef61 gateway base URI.
|
|
383
|
+
*/
|
|
384
|
+
declare function parseGatewayUrl(url: string): URL;
|
|
385
|
+
/**
|
|
360
386
|
* Validates a URL to prevent SSRF attacks.
|
|
361
387
|
*/
|
|
362
388
|
declare function validatePublicUrl(url: string): Promise<void>;
|
|
@@ -364,4 +390,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
|
|
|
364
390
|
declare function isValidPublicIPv6Address(address: string): boolean;
|
|
365
391
|
declare function expandIPv6Address(address: string): string;
|
|
366
392
|
//#endregion
|
|
367
|
-
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, getRemoteDocument, getUserAgent, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseIri, parseJsonLdId, preloadedContexts, validatePublicUrl };
|
|
393
|
+
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, getFe34Origin, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseGatewayUrl, parseIri, parseJsonLdId, preloadedContexts, validatePublicUrl };
|
package/dist/mod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as formatIri, c as
|
|
2
|
+
import { a as formatIri, c as haveSameIriOrigin, d as isValidPublicIPv6Address, f as parseGatewayUrl, h as validatePublicUrl, i as expandIPv6Address, l as isGatewayUrl, m as parseJsonLdId, n as arePortableUrisEqual, o as getFe34Origin, p as parseIri, r as canonicalizePortableUri, s as haveSameFe34Origin, t as UrlError, u as isValidPublicIPv4Address } from "./url-DGVbSVVi.js";
|
|
3
3
|
import { getLogger } from "@logtape/logtape";
|
|
4
4
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
5
5
|
import process from "node:process";
|
|
@@ -465,10 +465,6 @@ const preloadedContexts = {
|
|
|
465
465
|
"id": "@id",
|
|
466
466
|
"type": "@type",
|
|
467
467
|
"@protected": true,
|
|
468
|
-
"digestMultibase": {
|
|
469
|
-
"@id": "https://w3id.org/security#digestMultibase",
|
|
470
|
-
"@type": "https://w3id.org/security#multibase"
|
|
471
|
-
},
|
|
472
468
|
"proof": {
|
|
473
469
|
"@id": "https://w3id.org/security#proof",
|
|
474
470
|
"@type": "@id",
|
|
@@ -4305,6 +4301,14 @@ const preloadedContexts = {
|
|
|
4305
4301
|
"@type": "@id"
|
|
4306
4302
|
}
|
|
4307
4303
|
} },
|
|
4304
|
+
"https://w3id.org/fep/ef61": { "@context": {
|
|
4305
|
+
"gateways": {
|
|
4306
|
+
"@id": "https://w3id.org/fep/ef61/gateways",
|
|
4307
|
+
"@type": "@id",
|
|
4308
|
+
"@container": "@list"
|
|
4309
|
+
},
|
|
4310
|
+
"digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
|
|
4311
|
+
} },
|
|
4308
4312
|
"https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
|
|
4309
4313
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4310
4314
|
"lemmy": "https://join-lemmy.org/ns#",
|
|
@@ -4363,7 +4367,7 @@ const preloadedContexts = {
|
|
|
4363
4367
|
//#endregion
|
|
4364
4368
|
//#region deno.json
|
|
4365
4369
|
var name = "@fedify/vocab-runtime";
|
|
4366
|
-
var version = "2.4.0-dev.
|
|
4370
|
+
var version = "2.4.0-dev.1634+3b4bfbb6";
|
|
4367
4371
|
//#endregion
|
|
4368
4372
|
//#region src/link.ts
|
|
4369
4373
|
const parametersNeedLowerCase = ["rel", "type"];
|
|
@@ -4794,8 +4798,10 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4794
4798
|
* - <https://www.w3.org/ns/activitystreams>
|
|
4795
4799
|
* - <https://w3id.org/security/v1>
|
|
4796
4800
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4801
|
+
* - <https://w3id.org/security/data-integrity/v2>
|
|
4797
4802
|
* - <https://www.w3.org/ns/did/v1>
|
|
4798
4803
|
* - <https://w3id.org/security/multikey/v1>
|
|
4804
|
+
* - <https://w3id.org/fep/ef61>
|
|
4799
4805
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
4800
4806
|
* - <http://schema.org/>
|
|
4801
4807
|
* @param options Options for the document loader.
|
|
@@ -5544,4 +5550,4 @@ LanguageString.prototype[Symbol.for("nodejs.util.inspect.custom")] = function(_d
|
|
|
5544
5550
|
return `<${this.locale.baseName}> ${inspect(this.toString(), options)}`;
|
|
5545
5551
|
};
|
|
5546
5552
|
//#endregion
|
|
5547
|
-
export { FetchError, LanguageString, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, getRemoteDocument, getUserAgent, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseIri, parseJsonLdId, preloadedContexts, validatePublicUrl };
|
|
5553
|
+
export { FetchError, LanguageString, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, createActivityPubRequest, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, getFe34Origin, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseGatewayUrl, parseIri, parseJsonLdId, preloadedContexts, validatePublicUrl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require("./chunk-C2EiDwsr.cjs");
|
|
2
|
-
require("./docloader-
|
|
3
|
-
require("./url-
|
|
2
|
+
require("./docloader-CTd4XwqK.cjs");
|
|
3
|
+
require("./url-CsOV_B_P.cjs");
|
|
4
4
|
require("./key-_wXwomh_.cjs");
|
|
5
5
|
require("./multibase-Bz_UUDtL.cjs");
|
|
6
6
|
require("./langstr-CbAxaeEZ.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-
|
|
1
|
+
import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-BWDludWb.mjs";
|
|
2
2
|
import { t as HttpHeaderLink } from "./link-NUUWCdnK.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { h as validatePublicUrl, t as UrlError } from "./url-Du7RQQgP.mjs";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
6
6
|
//#endregion
|
|
@@ -459,10 +459,6 @@ const preloadedContexts = {
|
|
|
459
459
|
"id": "@id",
|
|
460
460
|
"type": "@type",
|
|
461
461
|
"@protected": true,
|
|
462
|
-
"digestMultibase": {
|
|
463
|
-
"@id": "https://w3id.org/security#digestMultibase",
|
|
464
|
-
"@type": "https://w3id.org/security#multibase"
|
|
465
|
-
},
|
|
466
462
|
"proof": {
|
|
467
463
|
"@id": "https://w3id.org/security#proof",
|
|
468
464
|
"@type": "@id",
|
|
@@ -4299,6 +4295,14 @@ const preloadedContexts = {
|
|
|
4299
4295
|
"@type": "@id"
|
|
4300
4296
|
}
|
|
4301
4297
|
} },
|
|
4298
|
+
"https://w3id.org/fep/ef61": { "@context": {
|
|
4299
|
+
"gateways": {
|
|
4300
|
+
"@id": "https://w3id.org/fep/ef61/gateways",
|
|
4301
|
+
"@type": "@id",
|
|
4302
|
+
"@container": "@list"
|
|
4303
|
+
},
|
|
4304
|
+
"digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
|
|
4305
|
+
} },
|
|
4302
4306
|
"https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
|
|
4303
4307
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4304
4308
|
"lemmy": "https://join-lemmy.org/ns#",
|
|
@@ -4533,8 +4537,10 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4533
4537
|
* - <https://www.w3.org/ns/activitystreams>
|
|
4534
4538
|
* - <https://w3id.org/security/v1>
|
|
4535
4539
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4540
|
+
* - <https://w3id.org/security/data-integrity/v2>
|
|
4536
4541
|
* - <https://www.w3.org/ns/did/v1>
|
|
4537
4542
|
* - <https://w3id.org/security/multikey/v1>
|
|
4543
|
+
* - <https://w3id.org/fep/ef61>
|
|
4538
4544
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
4539
4545
|
* - <http://schema.org/>
|
|
4540
4546
|
* @param options Options for the document loader.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require("./chunk-C2EiDwsr.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-Zpjq9m-W.cjs");
|
|
3
3
|
const require_link = require("./link-FguCydMA.cjs");
|
|
4
|
-
const require_url = require("./url-
|
|
4
|
+
const require_url = require("./url-CsOV_B_P.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
7
7
|
//#endregion
|
|
@@ -460,10 +460,6 @@ const preloadedContexts = {
|
|
|
460
460
|
"id": "@id",
|
|
461
461
|
"type": "@type",
|
|
462
462
|
"@protected": true,
|
|
463
|
-
"digestMultibase": {
|
|
464
|
-
"@id": "https://w3id.org/security#digestMultibase",
|
|
465
|
-
"@type": "https://w3id.org/security#multibase"
|
|
466
|
-
},
|
|
467
463
|
"proof": {
|
|
468
464
|
"@id": "https://w3id.org/security#proof",
|
|
469
465
|
"@type": "@id",
|
|
@@ -4300,6 +4296,14 @@ const preloadedContexts = {
|
|
|
4300
4296
|
"@type": "@id"
|
|
4301
4297
|
}
|
|
4302
4298
|
} },
|
|
4299
|
+
"https://w3id.org/fep/ef61": { "@context": {
|
|
4300
|
+
"gateways": {
|
|
4301
|
+
"@id": "https://w3id.org/fep/ef61/gateways",
|
|
4302
|
+
"@type": "@id",
|
|
4303
|
+
"@container": "@list"
|
|
4304
|
+
},
|
|
4305
|
+
"digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
|
|
4306
|
+
} },
|
|
4303
4307
|
"https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
|
|
4304
4308
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4305
4309
|
"lemmy": "https://join-lemmy.org/ns#",
|
|
@@ -4534,8 +4538,10 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4534
4538
|
* - <https://www.w3.org/ns/activitystreams>
|
|
4535
4539
|
* - <https://w3id.org/security/v1>
|
|
4536
4540
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4541
|
+
* - <https://w3id.org/security/data-integrity/v2>
|
|
4537
4542
|
* - <https://www.w3.org/ns/did/v1>
|
|
4538
4543
|
* - <https://w3id.org/security/multikey/v1>
|
|
4544
|
+
* - <https://w3id.org/fep/ef61>
|
|
4539
4545
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
4540
4546
|
* - <http://schema.org/>
|
|
4541
4547
|
* @param options Options for the document loader.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C2EiDwsr.cjs");
|
|
2
|
-
const require_docloader = require("./docloader-
|
|
3
|
-
const require_request = require("./request-
|
|
4
|
-
const require_url = require("./url-
|
|
2
|
+
const require_docloader = require("./docloader-CTd4XwqK.cjs");
|
|
3
|
+
const require_request = require("./request-Zpjq9m-W.cjs");
|
|
4
|
+
const require_url = require("./url-CsOV_B_P.cjs");
|
|
5
5
|
let node_assert = require("node:assert");
|
|
6
6
|
let node_test = require("node:test");
|
|
7
7
|
//#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as getRemoteDocument, r as preloadedContexts, t as getDocumentLoader } from "./docloader-
|
|
2
|
-
import { t as FetchError } from "./request-
|
|
3
|
-
import { t as UrlError } from "./url-
|
|
1
|
+
import { n as getRemoteDocument, r as preloadedContexts, t as getDocumentLoader } from "./docloader-CNzoXrLM.mjs";
|
|
2
|
+
import { t as FetchError } from "./request-BWDludWb.mjs";
|
|
3
|
+
import { t as UrlError } from "./url-Du7RQQgP.mjs";
|
|
4
4
|
import { deepStrictEqual, ok, rejects } from "node:assert";
|
|
5
5
|
import { test } from "node:test";
|
|
6
6
|
//#region \0rolldown/runtime.js
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C2EiDwsr.cjs");
|
|
2
|
-
const require_url = require("./url-
|
|
2
|
+
const require_url = require("./url-CsOV_B_P.cjs");
|
|
3
3
|
let node_assert = require("node:assert");
|
|
4
4
|
let node_test = require("node:test");
|
|
5
5
|
let jsonld_dist_jsonld_esm_js = require("jsonld/dist/jsonld.esm.js");
|
|
@@ -17,7 +17,7 @@ const noJsonLdContext = Symbol("noJsonLdContext");
|
|
|
17
17
|
* Semantic Versioning decisions.
|
|
18
18
|
*/
|
|
19
19
|
function isTrustedIriOrigin(options, left, right) {
|
|
20
|
-
return options.crossOrigin === "trust" || left == null || right != null && require_url.haveSameIriOrigin(left, right);
|
|
20
|
+
return options.crossOrigin === "trust" || left == null || right != null && (require_url.haveSameIriOrigin(left, right) || require_url.haveSameFe34Origin(left, right));
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Normalizes portable IRIs in JSON-LD cache data.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as formatIri,
|
|
1
|
+
import { a as formatIri, c as haveSameIriOrigin, p as parseIri, s as haveSameFe34Origin } from "./url-Du7RQQgP.mjs";
|
|
2
2
|
import { deepStrictEqual, ok, strictEqual } from "node:assert";
|
|
3
3
|
import { test } from "node:test";
|
|
4
4
|
import jsonld from "jsonld/dist/jsonld.esm.js";
|
|
@@ -15,7 +15,7 @@ const noJsonLdContext = Symbol("noJsonLdContext");
|
|
|
15
15
|
* Semantic Versioning decisions.
|
|
16
16
|
*/
|
|
17
17
|
function isTrustedIriOrigin(options, left, right) {
|
|
18
|
-
return options.crossOrigin === "trust" || left == null || right != null && haveSameIriOrigin(left, right);
|
|
18
|
+
return options.crossOrigin === "trust" || left == null || right != null && (haveSameIriOrigin(left, right) || haveSameFe34Origin(left, right));
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Normalizes portable IRIs in JSON-LD cache data.
|
|
@@ -3,7 +3,7 @@ let node_process = require("node:process");
|
|
|
3
3
|
node_process = require_chunk.__toESM(node_process, 1);
|
|
4
4
|
//#region deno.json
|
|
5
5
|
var name = "@fedify/vocab-runtime";
|
|
6
|
-
var version = "2.4.0-dev.
|
|
6
|
+
var version = "2.4.0-dev.1634+3b4bfbb6";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/request.ts
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C2EiDwsr.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-Zpjq9m-W.cjs");
|
|
3
3
|
let node_assert = require("node:assert");
|
|
4
4
|
let node_test = require("node:test");
|
|
5
5
|
let node_process = require("node:process");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as version, r as getUserAgent } from "./request-
|
|
1
|
+
import { o as version, r as getUserAgent } from "./request-BWDludWb.mjs";
|
|
2
2
|
import { deepStrictEqual } from "node:assert";
|
|
3
3
|
import { test } from "node:test";
|
|
4
4
|
import process from "node:process";
|