@fedify/vocab-runtime 2.4.0-dev.1634 → 2.4.0-pr.934.40

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.
Files changed (37) hide show
  1. package/deno.json +1 -1
  2. package/dist/{docloader-C_dir7Xb.d.ts → docloader-DnUMWHaJ.d.cts} +0 -2
  3. package/dist/{docloader-D2DTRiyA.d.cts → docloader-xRGn1azD.d.ts} +0 -2
  4. package/dist/internal/jsonld-cache.cjs +1 -1
  5. package/dist/internal/jsonld-cache.d.cts +1 -1
  6. package/dist/internal/jsonld-cache.d.ts +1 -1
  7. package/dist/internal/jsonld-cache.js +1 -1
  8. package/dist/mod.cjs +6 -14
  9. package/dist/mod.d.cts +2 -10
  10. package/dist/mod.d.ts +2 -10
  11. package/dist/mod.js +7 -13
  12. package/dist/tests/decimal.test.cjs +2 -2
  13. package/dist/tests/decimal.test.mjs +2 -2
  14. package/dist/tests/{docloader-CTd4XwqK.cjs → docloader-BFedvemb.cjs} +6 -12
  15. package/dist/tests/{docloader-CNzoXrLM.mjs → docloader-Xi61Le8w.mjs} +6 -12
  16. package/dist/tests/docloader.test.cjs +3 -3
  17. package/dist/tests/docloader.test.mjs +3 -3
  18. package/dist/tests/jsonld-cache.test.cjs +1 -1
  19. package/dist/tests/jsonld-cache.test.mjs +1 -1
  20. package/dist/tests/{request-BWDludWb.mjs → request-BOS-hNaf.mjs} +1 -1
  21. package/dist/tests/{request-Zpjq9m-W.cjs → request-cCPgOxYG.cjs} +1 -1
  22. package/dist/tests/request.test.cjs +1 -1
  23. package/dist/tests/request.test.mjs +1 -1
  24. package/dist/tests/{url-CsOV_B_P.cjs → url-BvjYQdxL.cjs} +0 -26
  25. package/dist/tests/{url-Du7RQQgP.mjs → url-a2D8NAgh.mjs} +1 -15
  26. package/dist/tests/url.test.cjs +1 -18
  27. package/dist/tests/url.test.mjs +1 -18
  28. package/dist/{url-DD4F0ULf.cjs → url-Ck3dGEwH.cjs} +0 -26
  29. package/dist/{url-DGVbSVVi.js → url-m1YxGNZ0.js} +1 -15
  30. package/package.json +1 -1
  31. package/src/contexts/security-data-integrity-v1.json +4 -0
  32. package/src/contexts.ts +0 -2
  33. package/src/docloader.ts +0 -2
  34. package/src/mod.ts +0 -2
  35. package/src/url.test.ts +0 -23
  36. package/src/url.ts +0 -23
  37. package/src/contexts/fep-ef61.json +0 -10
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab-runtime",
3
- "version": "2.4.0-dev.1634+3b4bfbb6",
3
+ "version": "2.4.0-pr.934.40+3331d302",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts",
@@ -184,10 +184,8 @@ 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>
188
187
  * - <https://www.w3.org/ns/did/v1>
189
188
  * - <https://w3id.org/security/multikey/v1>
190
- * - <https://w3id.org/fep/ef61>
191
189
  * - <https://purl.archive.org/socialweb/webfinger>
192
190
  * - <http://schema.org/>
193
191
  * @param options Options for the document loader.
@@ -184,10 +184,8 @@ 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>
188
187
  * - <https://www.w3.org/ns/did/v1>
189
188
  * - <https://w3id.org/security/multikey/v1>
190
- * - <https://w3id.org/fep/ef61>
191
189
  * - <https://purl.archive.org/socialweb/webfinger>
192
190
  * - <http://schema.org/>
193
191
  * @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-DD4F0ULf.cjs");
3
+ const require_url = require("../url-Ck3dGEwH.cjs");
4
4
  const require_jsonld = require("../jsonld.cjs");
5
5
  //#region src/internal/jsonld-cache.ts
6
6
  const noJsonLdContext = Symbol("noJsonLdContext");
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as DocumentLoader } from "../docloader-D2DTRiyA.cjs";
2
+ import { n as DocumentLoader } from "../docloader-DnUMWHaJ.cjs";
3
3
 
4
4
  //#region src/internal/jsonld-cache.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as DocumentLoader } from "../docloader-C_dir7Xb.js";
2
+ import { n as DocumentLoader } from "../docloader-xRGn1azD.js";
3
3
 
4
4
  //#region src/internal/jsonld-cache.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
 
2
- import { a as formatIri, c as haveSameIriOrigin, s as haveSameFe34Origin } from "../url-DGVbSVVi.js";
2
+ import { a as formatIri, c as haveSameIriOrigin, s as haveSameFe34Origin } from "../url-m1YxGNZ0.js";
3
3
  import jsonld_default from "../jsonld.js";
4
4
  //#region src/internal/jsonld-cache.ts
5
5
  const noJsonLdContext = Symbol("noJsonLdContext");
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-DD4F0ULf.cjs");
4
+ const require_url = require("./url-Ck3dGEwH.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,6 +469,10 @@ 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
+ },
472
476
  "proof": {
473
477
  "@id": "https://w3id.org/security#proof",
474
478
  "@type": "@id",
@@ -4305,14 +4309,6 @@ const preloadedContexts = {
4305
4309
  "@type": "@id"
4306
4310
  }
4307
4311
  } },
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
- } },
4316
4312
  "https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
4317
4313
  "as": "https://www.w3.org/ns/activitystreams#",
4318
4314
  "lemmy": "https://join-lemmy.org/ns#",
@@ -4371,7 +4367,7 @@ const preloadedContexts = {
4371
4367
  //#endregion
4372
4368
  //#region deno.json
4373
4369
  var name = "@fedify/vocab-runtime";
4374
- var version = "2.4.0-dev.1634+3b4bfbb6";
4370
+ var version = "2.4.0-pr.934.40+3331d302";
4375
4371
  //#endregion
4376
4372
  //#region src/link.ts
4377
4373
  const parametersNeedLowerCase = ["rel", "type"];
@@ -4802,10 +4798,8 @@ async function getRemoteDocument(url, response, fetch) {
4802
4798
  * - <https://www.w3.org/ns/activitystreams>
4803
4799
  * - <https://w3id.org/security/v1>
4804
4800
  * - <https://w3id.org/security/data-integrity/v1>
4805
- * - <https://w3id.org/security/data-integrity/v2>
4806
4801
  * - <https://www.w3.org/ns/did/v1>
4807
4802
  * - <https://w3id.org/security/multikey/v1>
4808
- * - <https://w3id.org/fep/ef61>
4809
4803
  * - <https://purl.archive.org/socialweb/webfinger>
4810
4804
  * - <http://schema.org/>
4811
4805
  * @param options Options for the document loader.
@@ -5581,13 +5575,11 @@ exports.importPem = importPem;
5581
5575
  exports.importPkcs1 = importPkcs1;
5582
5576
  exports.importSpki = importSpki;
5583
5577
  exports.isDecimal = isDecimal;
5584
- exports.isGatewayUrl = require_url.isGatewayUrl;
5585
5578
  exports.isValidPublicIPv4Address = require_url.isValidPublicIPv4Address;
5586
5579
  exports.isValidPublicIPv6Address = require_url.isValidPublicIPv6Address;
5587
5580
  exports.logRequest = logRequest;
5588
5581
  exports.parseDecimal = parseDecimal;
5589
5582
  exports.parseDidKeyVerificationMethod = parseDidKeyVerificationMethod;
5590
- exports.parseGatewayUrl = require_url.parseGatewayUrl;
5591
5583
  exports.parseIri = require_url.parseIri;
5592
5584
  exports.parseJsonLdId = require_url.parseJsonLdId;
5593
5585
  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-D2DTRiyA.cjs";
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-DnUMWHaJ.cjs";
3
3
  import { TracerProvider } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/contexts.d.ts
@@ -375,14 +375,6 @@ declare function haveSameFe34Origin(left: string | URL, right: string | URL): bo
375
375
  */
376
376
  declare function haveSameIriOrigin(left: URL, right: URL): boolean;
377
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
- /**
386
378
  * Validates a URL to prevent SSRF attacks.
387
379
  */
388
380
  declare function validatePublicUrl(url: string): Promise<void>;
@@ -390,4 +382,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
390
382
  declare function isValidPublicIPv6Address(address: string): boolean;
391
383
  declare function expandIPv6Address(address: string): string;
392
384
  //#endregion
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 };
385
+ 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, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, 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-C_dir7Xb.js";
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-xRGn1azD.js";
3
3
  import { TracerProvider } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/contexts.d.ts
@@ -375,14 +375,6 @@ declare function haveSameFe34Origin(left: string | URL, right: string | URL): bo
375
375
  */
376
376
  declare function haveSameIriOrigin(left: URL, right: URL): boolean;
377
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
- /**
386
378
  * Validates a URL to prevent SSRF attacks.
387
379
  */
388
380
  declare function validatePublicUrl(url: string): Promise<void>;
@@ -390,4 +382,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
390
382
  declare function isValidPublicIPv6Address(address: string): boolean;
391
383
  declare function expandIPv6Address(address: string): string;
392
384
  //#endregion
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 };
385
+ 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, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseIri, parseJsonLdId, preloadedContexts, validatePublicUrl };
package/dist/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
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";
2
+ import { a as formatIri, c as haveSameIriOrigin, d as parseIri, f as parseJsonLdId, i as expandIPv6Address, l as isValidPublicIPv4Address, n as arePortableUrisEqual, o as getFe34Origin, p as validatePublicUrl, r as canonicalizePortableUri, s as haveSameFe34Origin, t as UrlError, u as isValidPublicIPv6Address } from "./url-m1YxGNZ0.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,6 +465,10 @@ 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
+ },
468
472
  "proof": {
469
473
  "@id": "https://w3id.org/security#proof",
470
474
  "@type": "@id",
@@ -4301,14 +4305,6 @@ const preloadedContexts = {
4301
4305
  "@type": "@id"
4302
4306
  }
4303
4307
  } },
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
- } },
4312
4308
  "https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
4313
4309
  "as": "https://www.w3.org/ns/activitystreams#",
4314
4310
  "lemmy": "https://join-lemmy.org/ns#",
@@ -4367,7 +4363,7 @@ const preloadedContexts = {
4367
4363
  //#endregion
4368
4364
  //#region deno.json
4369
4365
  var name = "@fedify/vocab-runtime";
4370
- var version = "2.4.0-dev.1634+3b4bfbb6";
4366
+ var version = "2.4.0-pr.934.40+3331d302";
4371
4367
  //#endregion
4372
4368
  //#region src/link.ts
4373
4369
  const parametersNeedLowerCase = ["rel", "type"];
@@ -4798,10 +4794,8 @@ async function getRemoteDocument(url, response, fetch) {
4798
4794
  * - <https://www.w3.org/ns/activitystreams>
4799
4795
  * - <https://w3id.org/security/v1>
4800
4796
  * - <https://w3id.org/security/data-integrity/v1>
4801
- * - <https://w3id.org/security/data-integrity/v2>
4802
4797
  * - <https://www.w3.org/ns/did/v1>
4803
4798
  * - <https://w3id.org/security/multikey/v1>
4804
- * - <https://w3id.org/fep/ef61>
4805
4799
  * - <https://purl.archive.org/socialweb/webfinger>
4806
4800
  * - <http://schema.org/>
4807
4801
  * @param options Options for the document loader.
@@ -5550,4 +5544,4 @@ LanguageString.prototype[Symbol.for("nodejs.util.inspect.custom")] = function(_d
5550
5544
  return `<${this.locale.baseName}> ${inspect(this.toString(), options)}`;
5551
5545
  };
5552
5546
  //#endregion
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 };
5547
+ 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, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, parseDecimal, parseDidKeyVerificationMethod, parseIri, parseJsonLdId, preloadedContexts, validatePublicUrl };
@@ -1,6 +1,6 @@
1
1
  require("./chunk-C2EiDwsr.cjs");
2
- require("./docloader-CTd4XwqK.cjs");
3
- require("./url-CsOV_B_P.cjs");
2
+ require("./docloader-BFedvemb.cjs");
3
+ require("./url-BvjYQdxL.cjs");
4
4
  require("./key-_wXwomh_.cjs");
5
5
  require("./multibase-Bz_UUDtL.cjs");
6
6
  require("./langstr-CbAxaeEZ.cjs");
@@ -1,5 +1,5 @@
1
- import "./docloader-CNzoXrLM.mjs";
2
- import "./url-Du7RQQgP.mjs";
1
+ import "./docloader-Xi61Le8w.mjs";
2
+ import "./url-a2D8NAgh.mjs";
3
3
  import "./key-CDGDH_vC.mjs";
4
4
  import "./multibase-B4bvakyA.mjs";
5
5
  import "./langstr-Di5AvKpB.mjs";
@@ -1,7 +1,7 @@
1
1
  require("./chunk-C2EiDwsr.cjs");
2
- const require_request = require("./request-Zpjq9m-W.cjs");
2
+ const require_request = require("./request-cCPgOxYG.cjs");
3
3
  const require_link = require("./link-FguCydMA.cjs");
4
- const require_url = require("./url-CsOV_B_P.cjs");
4
+ const require_url = require("./url-BvjYQdxL.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let _opentelemetry_api = require("@opentelemetry/api");
7
7
  //#endregion
@@ -460,6 +460,10 @@ 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
+ },
463
467
  "proof": {
464
468
  "@id": "https://w3id.org/security#proof",
465
469
  "@type": "@id",
@@ -4296,14 +4300,6 @@ const preloadedContexts = {
4296
4300
  "@type": "@id"
4297
4301
  }
4298
4302
  } },
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
- } },
4307
4303
  "https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
4308
4304
  "as": "https://www.w3.org/ns/activitystreams#",
4309
4305
  "lemmy": "https://join-lemmy.org/ns#",
@@ -4538,10 +4534,8 @@ async function getRemoteDocument(url, response, fetch) {
4538
4534
  * - <https://www.w3.org/ns/activitystreams>
4539
4535
  * - <https://w3id.org/security/v1>
4540
4536
  * - <https://w3id.org/security/data-integrity/v1>
4541
- * - <https://w3id.org/security/data-integrity/v2>
4542
4537
  * - <https://www.w3.org/ns/did/v1>
4543
4538
  * - <https://w3id.org/security/multikey/v1>
4544
- * - <https://w3id.org/fep/ef61>
4545
4539
  * - <https://purl.archive.org/socialweb/webfinger>
4546
4540
  * - <http://schema.org/>
4547
4541
  * @param options Options for the document loader.
@@ -1,6 +1,6 @@
1
- import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-BWDludWb.mjs";
1
+ import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-BOS-hNaf.mjs";
2
2
  import { t as HttpHeaderLink } from "./link-NUUWCdnK.mjs";
3
- import { h as validatePublicUrl, t as UrlError } from "./url-Du7RQQgP.mjs";
3
+ import { p as validatePublicUrl, t as UrlError } from "./url-a2D8NAgh.mjs";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
6
6
  //#endregion
@@ -459,6 +459,10 @@ 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
+ },
462
466
  "proof": {
463
467
  "@id": "https://w3id.org/security#proof",
464
468
  "@type": "@id",
@@ -4295,14 +4299,6 @@ const preloadedContexts = {
4295
4299
  "@type": "@id"
4296
4300
  }
4297
4301
  } },
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
- } },
4306
4302
  "https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
4307
4303
  "as": "https://www.w3.org/ns/activitystreams#",
4308
4304
  "lemmy": "https://join-lemmy.org/ns#",
@@ -4537,10 +4533,8 @@ async function getRemoteDocument(url, response, fetch) {
4537
4533
  * - <https://www.w3.org/ns/activitystreams>
4538
4534
  * - <https://w3id.org/security/v1>
4539
4535
  * - <https://w3id.org/security/data-integrity/v1>
4540
- * - <https://w3id.org/security/data-integrity/v2>
4541
4536
  * - <https://www.w3.org/ns/did/v1>
4542
4537
  * - <https://w3id.org/security/multikey/v1>
4543
- * - <https://w3id.org/fep/ef61>
4544
4538
  * - <https://purl.archive.org/socialweb/webfinger>
4545
4539
  * - <http://schema.org/>
4546
4540
  * @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-CTd4XwqK.cjs");
3
- const require_request = require("./request-Zpjq9m-W.cjs");
4
- const require_url = require("./url-CsOV_B_P.cjs");
2
+ const require_docloader = require("./docloader-BFedvemb.cjs");
3
+ const require_request = require("./request-cCPgOxYG.cjs");
4
+ const require_url = require("./url-BvjYQdxL.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-CNzoXrLM.mjs";
2
- import { t as FetchError } from "./request-BWDludWb.mjs";
3
- import { t as UrlError } from "./url-Du7RQQgP.mjs";
1
+ import { n as getRemoteDocument, r as preloadedContexts, t as getDocumentLoader } from "./docloader-Xi61Le8w.mjs";
2
+ import { t as FetchError } from "./request-BOS-hNaf.mjs";
3
+ import { t as UrlError } from "./url-a2D8NAgh.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-CsOV_B_P.cjs");
2
+ const require_url = require("./url-BvjYQdxL.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");
@@ -1,4 +1,4 @@
1
- import { a as formatIri, c as haveSameIriOrigin, p as parseIri, s as haveSameFe34Origin } from "./url-Du7RQQgP.mjs";
1
+ import { a as formatIri, c as haveSameIriOrigin, d as parseIri, s as haveSameFe34Origin } from "./url-a2D8NAgh.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";
@@ -1,7 +1,7 @@
1
1
  import process from "node:process";
2
2
  //#region deno.json
3
3
  var name = "@fedify/vocab-runtime";
4
- var version = "2.4.0-dev.1634+3b4bfbb6";
4
+ var version = "2.4.0-pr.934.40+3331d302";
5
5
  //#endregion
6
6
  //#region src/request.ts
7
7
  /**
@@ -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.1634+3b4bfbb6";
6
+ var version = "2.4.0-pr.934.40+3331d302";
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-Zpjq9m-W.cjs");
2
+ const require_request = require("./request-cCPgOxYG.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-BWDludWb.mjs";
1
+ import { o as version, r as getUserAgent } from "./request-BOS-hNaf.mjs";
2
2
  import { deepStrictEqual } from "node:assert";
3
3
  import { test } from "node:test";
4
4
  import process from "node:process";
@@ -211,20 +211,6 @@ function parseAtUri(uri) {
211
211
  return new URL("at://" + encodeURIComponent(authority) + path);
212
212
  }
213
213
  /**
214
- * Checks whether the URL is an FEP-ef61 gateway base URI.
215
- */
216
- function isGatewayUrl(url) {
217
- return (url.protocol === "http:" || url.protocol === "https:") && url.username === "" && url.password === "" && url.pathname === "/" && url.search === "" && url.hash === "";
218
- }
219
- /**
220
- * Parses and validates an FEP-ef61 gateway base URI.
221
- */
222
- function parseGatewayUrl(url) {
223
- const parsed = parseIri(url);
224
- if (!isGatewayUrl(parsed)) throw new TypeError("FEP-ef61 gateways must be HTTP(S) base URIs with no credentials, path, query, or fragment.");
225
- return parsed;
226
- }
227
- /**
228
214
  * Validates a URL to prevent SSRF attacks.
229
215
  */
230
216
  async function validatePublicUrl(url) {
@@ -438,12 +424,6 @@ Object.defineProperty(exports, "haveSameIriOrigin", {
438
424
  return haveSameIriOrigin;
439
425
  }
440
426
  });
441
- Object.defineProperty(exports, "isGatewayUrl", {
442
- enumerable: true,
443
- get: function() {
444
- return isGatewayUrl;
445
- }
446
- });
447
427
  Object.defineProperty(exports, "isValidPublicIPv4Address", {
448
428
  enumerable: true,
449
429
  get: function() {
@@ -456,12 +436,6 @@ Object.defineProperty(exports, "isValidPublicIPv6Address", {
456
436
  return isValidPublicIPv6Address;
457
437
  }
458
438
  });
459
- Object.defineProperty(exports, "parseGatewayUrl", {
460
- enumerable: true,
461
- get: function() {
462
- return parseGatewayUrl;
463
- }
464
- });
465
439
  Object.defineProperty(exports, "parseIri", {
466
440
  enumerable: true,
467
441
  get: function() {
@@ -210,20 +210,6 @@ function parseAtUri(uri) {
210
210
  return new URL("at://" + encodeURIComponent(authority) + path);
211
211
  }
212
212
  /**
213
- * Checks whether the URL is an FEP-ef61 gateway base URI.
214
- */
215
- function isGatewayUrl(url) {
216
- return (url.protocol === "http:" || url.protocol === "https:") && url.username === "" && url.password === "" && url.pathname === "/" && url.search === "" && url.hash === "";
217
- }
218
- /**
219
- * Parses and validates an FEP-ef61 gateway base URI.
220
- */
221
- function parseGatewayUrl(url) {
222
- const parsed = parseIri(url);
223
- if (!isGatewayUrl(parsed)) throw new TypeError("FEP-ef61 gateways must be HTTP(S) base URIs with no credentials, path, query, or fragment.");
224
- return parsed;
225
- }
226
- /**
227
213
  * Validates a URL to prevent SSRF attacks.
228
214
  */
229
215
  async function validatePublicUrl(url) {
@@ -389,4 +375,4 @@ function matchesIPv6Prefix(address, prefixWords, prefixLength) {
389
375
  return true;
390
376
  }
391
377
  //#endregion
392
- export { formatIri as a, haveSameIriOrigin as c, isValidPublicIPv6Address as d, parseGatewayUrl as f, validatePublicUrl as h, expandIPv6Address as i, isGatewayUrl as l, parseJsonLdId as m, arePortableUrisEqual as n, getFe34Origin as o, parseIri as p, canonicalizePortableUri as r, haveSameFe34Origin as s, UrlError as t, isValidPublicIPv4Address as u };
378
+ export { formatIri as a, haveSameIriOrigin as c, parseIri as d, parseJsonLdId as f, expandIPv6Address as i, isValidPublicIPv4Address as l, arePortableUrisEqual as n, getFe34Origin as o, validatePublicUrl as p, canonicalizePortableUri as r, haveSameFe34Origin as s, UrlError as t, isValidPublicIPv6Address as u };
@@ -1,5 +1,5 @@
1
1
  require("./chunk-C2EiDwsr.cjs");
2
- const require_url = require("./url-CsOV_B_P.cjs");
2
+ const require_url = require("./url-BvjYQdxL.cjs");
3
3
  let node_assert = require("node:assert");
4
4
  let node_test = require("node:test");
5
5
  //#region src/url.test.ts
@@ -228,23 +228,6 @@ let node_test = require("node:test");
228
228
  (0, node_assert.deepStrictEqual)(parsed, new URL("ap+ef61://did%3Aweb%3Aexample.com%2500/u/1"));
229
229
  (0, node_assert.deepStrictEqual)(require_url.formatIri(parsed), "ap+ef61://did:web:example.com%00/u/1");
230
230
  });
231
- (0, node_test.test)("parseGatewayUrl() accepts only HTTP(S) base URIs", () => {
232
- for (const url of ["https://server.example/", "http://server.example/"]) {
233
- (0, node_assert.deepStrictEqual)(require_url.parseGatewayUrl(url), new URL(url));
234
- (0, node_assert.ok)(require_url.isGatewayUrl(new URL(url)));
235
- }
236
- for (const url of [
237
- "ftp://server.example/",
238
- "https://user:pass@server.example/",
239
- "https://user@server.example/",
240
- "https://server.example/path",
241
- "https://server.example/?x=1",
242
- "https://server.example/#fragment"
243
- ]) {
244
- (0, node_assert.throws)(() => require_url.parseGatewayUrl(url), TypeError);
245
- (0, node_assert.ok)(!require_url.isGatewayUrl(new URL(url)));
246
- }
247
- });
248
231
  (0, node_test.test)("validatePublicUrl()", async () => {
249
232
  await (0, node_assert.rejects)(() => require_url.validatePublicUrl("ftp://localhost"), require_url.UrlError);
250
233
  await (0, node_assert.rejects)(() => require_url.validatePublicUrl("data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="), require_url.UrlError);
@@ -1,4 +1,4 @@
1
- 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-Du7RQQgP.mjs";
1
+ import { a as formatIri, c as haveSameIriOrigin, d as parseIri, f as parseJsonLdId, i as expandIPv6Address, l as isValidPublicIPv4Address, n as arePortableUrisEqual, o as getFe34Origin, p as validatePublicUrl, r as canonicalizePortableUri, s as haveSameFe34Origin, t as UrlError, u as isValidPublicIPv6Address } from "./url-a2D8NAgh.mjs";
2
2
  import { deepStrictEqual, ok, rejects, throws } from "node:assert";
3
3
  import { test } from "node:test";
4
4
  //#region src/url.test.ts
@@ -227,23 +227,6 @@ test("parseIri() preserves encoded percent signs while decoding delimiters", ()
227
227
  deepStrictEqual(parsed, new URL("ap+ef61://did%3Aweb%3Aexample.com%2500/u/1"));
228
228
  deepStrictEqual(formatIri(parsed), "ap+ef61://did:web:example.com%00/u/1");
229
229
  });
230
- test("parseGatewayUrl() accepts only HTTP(S) base URIs", () => {
231
- for (const url of ["https://server.example/", "http://server.example/"]) {
232
- deepStrictEqual(parseGatewayUrl(url), new URL(url));
233
- ok(isGatewayUrl(new URL(url)));
234
- }
235
- for (const url of [
236
- "ftp://server.example/",
237
- "https://user:pass@server.example/",
238
- "https://user@server.example/",
239
- "https://server.example/path",
240
- "https://server.example/?x=1",
241
- "https://server.example/#fragment"
242
- ]) {
243
- throws(() => parseGatewayUrl(url), TypeError);
244
- ok(!isGatewayUrl(new URL(url)));
245
- }
246
- });
247
230
  test("validatePublicUrl()", async () => {
248
231
  await rejects(() => validatePublicUrl("ftp://localhost"), UrlError);
249
232
  await rejects(() => validatePublicUrl("data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="), UrlError);
@@ -212,20 +212,6 @@ function parseAtUri(uri) {
212
212
  return new URL("at://" + encodeURIComponent(authority) + path);
213
213
  }
214
214
  /**
215
- * Checks whether the URL is an FEP-ef61 gateway base URI.
216
- */
217
- function isGatewayUrl(url) {
218
- return (url.protocol === "http:" || url.protocol === "https:") && url.username === "" && url.password === "" && url.pathname === "/" && url.search === "" && url.hash === "";
219
- }
220
- /**
221
- * Parses and validates an FEP-ef61 gateway base URI.
222
- */
223
- function parseGatewayUrl(url) {
224
- const parsed = parseIri(url);
225
- if (!isGatewayUrl(parsed)) throw new TypeError("FEP-ef61 gateways must be HTTP(S) base URIs with no credentials, path, query, or fragment.");
226
- return parsed;
227
- }
228
- /**
229
215
  * Validates a URL to prevent SSRF attacks.
230
216
  */
231
217
  async function validatePublicUrl(url) {
@@ -439,12 +425,6 @@ Object.defineProperty(exports, "haveSameIriOrigin", {
439
425
  return haveSameIriOrigin;
440
426
  }
441
427
  });
442
- Object.defineProperty(exports, "isGatewayUrl", {
443
- enumerable: true,
444
- get: function() {
445
- return isGatewayUrl;
446
- }
447
- });
448
428
  Object.defineProperty(exports, "isValidPublicIPv4Address", {
449
429
  enumerable: true,
450
430
  get: function() {
@@ -457,12 +437,6 @@ Object.defineProperty(exports, "isValidPublicIPv6Address", {
457
437
  return isValidPublicIPv6Address;
458
438
  }
459
439
  });
460
- Object.defineProperty(exports, "parseGatewayUrl", {
461
- enumerable: true,
462
- get: function() {
463
- return parseGatewayUrl;
464
- }
465
- });
466
440
  Object.defineProperty(exports, "parseIri", {
467
441
  enumerable: true,
468
442
  get: function() {
@@ -211,20 +211,6 @@ function parseAtUri(uri) {
211
211
  return new URL("at://" + encodeURIComponent(authority) + path);
212
212
  }
213
213
  /**
214
- * Checks whether the URL is an FEP-ef61 gateway base URI.
215
- */
216
- function isGatewayUrl(url) {
217
- return (url.protocol === "http:" || url.protocol === "https:") && url.username === "" && url.password === "" && url.pathname === "/" && url.search === "" && url.hash === "";
218
- }
219
- /**
220
- * Parses and validates an FEP-ef61 gateway base URI.
221
- */
222
- function parseGatewayUrl(url) {
223
- const parsed = parseIri(url);
224
- if (!isGatewayUrl(parsed)) throw new TypeError("FEP-ef61 gateways must be HTTP(S) base URIs with no credentials, path, query, or fragment.");
225
- return parsed;
226
- }
227
- /**
228
214
  * Validates a URL to prevent SSRF attacks.
229
215
  */
230
216
  async function validatePublicUrl(url) {
@@ -390,4 +376,4 @@ function matchesIPv6Prefix(address, prefixWords, prefixLength) {
390
376
  return true;
391
377
  }
392
378
  //#endregion
393
- export { formatIri as a, haveSameIriOrigin as c, isValidPublicIPv6Address as d, parseGatewayUrl as f, validatePublicUrl as h, expandIPv6Address as i, isGatewayUrl as l, parseJsonLdId as m, arePortableUrisEqual as n, getFe34Origin as o, parseIri as p, canonicalizePortableUri as r, haveSameFe34Origin as s, UrlError as t, isValidPublicIPv4Address as u };
379
+ export { formatIri as a, haveSameIriOrigin as c, parseIri as d, parseJsonLdId as f, expandIPv6Address as i, isValidPublicIPv4Address as l, arePortableUrisEqual as n, getFe34Origin as o, validatePublicUrl as p, canonicalizePortableUri as r, haveSameFe34Origin as s, UrlError as t, isValidPublicIPv6Address as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab-runtime",
3
- "version": "2.4.0-dev.1634+3b4bfbb6",
3
+ "version": "2.4.0-pr.934.40+3331d302",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -3,6 +3,10 @@
3
3
  "id": "@id",
4
4
  "type": "@type",
5
5
  "@protected": true,
6
+ "digestMultibase": {
7
+ "@id": "https://w3id.org/security#digestMultibase",
8
+ "@type": "https://w3id.org/security#multibase"
9
+ },
6
10
  "proof": {
7
11
  "@id": "https://w3id.org/security#proof",
8
12
  "@type": "@id",
package/src/contexts.ts CHANGED
@@ -8,7 +8,6 @@ import activitystreams from "./contexts/activitystreams.json" with {
8
8
  import didV1 from "./contexts/did-v1.json" with { type: "json" };
9
9
  import fep5711 from "./contexts/fep-5711.json" with { type: "json" };
10
10
  import fep7aa9 from "./contexts/fep-7aa9.json" with { type: "json" };
11
- import fepEf61 from "./contexts/fep-ef61.json" with { type: "json" };
12
11
  import gotosocial from "./contexts/gotosocial.json" with { type: "json" };
13
12
  import identityV1 from "./contexts/identity-v1.json" with { type: "json" };
14
13
  import joinLemmyContext from "./contexts/join-lemmy.json" with { type: "json" };
@@ -38,7 +37,6 @@ const preloadedContexts: Record<string, unknown> = {
38
37
  "https://gotosocial.org/ns": gotosocial,
39
38
  "https://w3id.org/fep/5711": fep5711,
40
39
  "https://w3id.org/fep/7aa9": fep7aa9,
41
- "https://w3id.org/fep/ef61": fepEf61,
42
40
 
43
41
  // Lemmy's context document is served as application/json without the JSON-LD
44
42
  // context Link header. The default document loader treats that as a regular
package/src/docloader.ts CHANGED
@@ -351,10 +351,8 @@ export interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
351
351
  * - <https://www.w3.org/ns/activitystreams>
352
352
  * - <https://w3id.org/security/v1>
353
353
  * - <https://w3id.org/security/data-integrity/v1>
354
- * - <https://w3id.org/security/data-integrity/v2>
355
354
  * - <https://www.w3.org/ns/did/v1>
356
355
  * - <https://w3id.org/security/multikey/v1>
357
- * - <https://w3id.org/fep/ef61>
358
356
  * - <https://purl.archive.org/socialweb/webfinger>
359
357
  * - <http://schema.org/>
360
358
  * @param options Options for the document loader.
package/src/mod.ts CHANGED
@@ -61,10 +61,8 @@ export {
61
61
  getFe34Origin,
62
62
  haveSameFe34Origin,
63
63
  haveSameIriOrigin,
64
- isGatewayUrl,
65
64
  isValidPublicIPv4Address,
66
65
  isValidPublicIPv6Address,
67
- parseGatewayUrl,
68
66
  parseIri,
69
67
  parseJsonLdId,
70
68
  UrlError,
package/src/url.test.ts CHANGED
@@ -8,10 +8,8 @@ import {
8
8
  getFe34Origin,
9
9
  haveSameFe34Origin,
10
10
  haveSameIriOrigin,
11
- isGatewayUrl,
12
11
  isValidPublicIPv4Address,
13
12
  isValidPublicIPv6Address,
14
- parseGatewayUrl,
15
13
  parseIri,
16
14
  parseJsonLdId,
17
15
  UrlError,
@@ -640,27 +638,6 @@ test("parseIri() preserves encoded percent signs while decoding delimiters", ()
640
638
  );
641
639
  });
642
640
 
643
- test("parseGatewayUrl() accepts only HTTP(S) base URIs", () => {
644
- for (const url of ["https://server.example/", "http://server.example/"]) {
645
- deepStrictEqual(parseGatewayUrl(url), new URL(url));
646
- ok(isGatewayUrl(new URL(url)));
647
- }
648
-
649
- for (
650
- const url of [
651
- "ftp://server.example/",
652
- "https://user:pass@server.example/",
653
- "https://user@server.example/",
654
- "https://server.example/path",
655
- "https://server.example/?x=1",
656
- "https://server.example/#fragment",
657
- ]
658
- ) {
659
- throws(() => parseGatewayUrl(url), TypeError);
660
- ok(!isGatewayUrl(new URL(url)));
661
- }
662
- });
663
-
664
641
  test("validatePublicUrl()", async () => {
665
642
  await rejects(() => validatePublicUrl("ftp://localhost"), UrlError);
666
643
  await rejects(
package/src/url.ts CHANGED
@@ -323,29 +323,6 @@ function parseAtUri(uri: string): URL {
323
323
  return new URL("at://" + encodeURIComponent(authority) + path);
324
324
  }
325
325
 
326
- /**
327
- * Checks whether the URL is an FEP-ef61 gateway base URI.
328
- */
329
- export function isGatewayUrl(url: URL): boolean {
330
- return (url.protocol === "http:" || url.protocol === "https:") &&
331
- url.username === "" && url.password === "" &&
332
- url.pathname === "/" && url.search === "" && url.hash === "";
333
- }
334
-
335
- /**
336
- * Parses and validates an FEP-ef61 gateway base URI.
337
- */
338
- export function parseGatewayUrl(url: string): URL {
339
- const parsed = parseIri(url);
340
- if (!isGatewayUrl(parsed)) {
341
- throw new TypeError(
342
- "FEP-ef61 gateways must be HTTP(S) base URIs with no credentials, " +
343
- "path, query, or fragment.",
344
- );
345
- }
346
- return parsed;
347
- }
348
-
349
326
  /**
350
327
  * Validates a URL to prevent SSRF attacks.
351
328
  */
@@ -1,10 +0,0 @@
1
- {
2
- "@context": {
3
- "gateways": {
4
- "@id": "https://w3id.org/fep/ef61/gateways",
5
- "@type": "@id",
6
- "@container": "@list"
7
- },
8
- "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
9
- }
10
- }