@fedify/vocab-runtime 2.4.0-dev.2240 → 2.4.0-dev.2247
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/internal/jsonld-cache.cjs +1 -1
- package/dist/internal/jsonld-cache.js +1 -1
- package/dist/internal/portable-dereference.cjs +1 -1
- package/dist/internal/portable-dereference.js +1 -1
- package/dist/mod.cjs +2 -2
- package/dist/mod.d.cts +13 -0
- package/dist/mod.d.ts +13 -0
- package/dist/mod.js +2 -2
- package/dist/tests/{body-C00dWiYW.mjs → body-CVAgeOnY.mjs} +1 -1
- package/dist/tests/{body-DHk-vT0I.cjs → body-EkRcWtjc.cjs} +1 -1
- package/dist/tests/body.test.cjs +1 -1
- package/dist/tests/body.test.mjs +1 -1
- package/dist/tests/decimal.test.cjs +3 -3
- package/dist/tests/decimal.test.mjs +3 -3
- package/dist/tests/{docloader-Bi982uOa.mjs → docloader-Dh5FI5cc.mjs} +3 -3
- package/dist/tests/{docloader-gX-8knd3.cjs → docloader-Dqn63h7z.cjs} +3 -3
- package/dist/tests/docloader.test.cjs +3 -3
- package/dist/tests/docloader.test.mjs +3 -3
- package/dist/tests/internal/portable-dereference.test.cjs +3 -3
- package/dist/tests/internal/portable-dereference.test.mjs +3 -3
- package/dist/tests/{jsonld-cache-DzxT9IXH.cjs → jsonld-cache-ChlXnADf.cjs} +1 -1
- package/dist/tests/{jsonld-cache-CKfgtxPB.mjs → jsonld-cache-Clt08GtO.mjs} +1 -1
- package/dist/tests/jsonld-cache.test.cjs +2 -2
- package/dist/tests/jsonld-cache.test.mjs +2 -2
- package/dist/tests/{portable-dereference-C_cwGjz6.mjs → portable-dereference-BPUyWeZd.mjs} +2 -2
- package/dist/tests/{portable-dereference-CyFYTBnr.cjs → portable-dereference-CmEBkIwk.cjs} +2 -2
- package/dist/tests/{portable-media-B39cvJGK.cjs → portable-media-CJz3xZPL.cjs} +3 -3
- package/dist/tests/{portable-media-l0ET9Pq8.mjs → portable-media-Ch4q22fg.mjs} +3 -3
- package/dist/tests/portable-media.test.cjs +1 -1
- package/dist/tests/portable-media.test.mjs +1 -1
- package/dist/tests/portable-workers.test.cjs +2 -2
- package/dist/tests/portable-workers.test.mjs +2 -2
- package/dist/tests/{request-fo2l2yJS.cjs → request-Cemb1TON.cjs} +1 -1
- package/dist/tests/{request-BRPiDcmG.mjs → request-D9hlYelF.mjs} +1 -1
- package/dist/tests/request.test.cjs +1 -1
- package/dist/tests/request.test.mjs +1 -1
- package/dist/tests/{url-CWC-NI3a.mjs → url-ClVBNQup.mjs} +13 -0
- package/dist/tests/{url-DsMBGqCc.cjs → url-Ddeuv0sE.cjs} +13 -0
- package/dist/tests/url.test.cjs +1 -1
- package/dist/tests/url.test.mjs +1 -1
- package/dist/{url-CZm2-7ZO.js → url-Cr9lJ6cD.js} +13 -0
- package/dist/{url-BJMXv2kE.cjs → url-DKA6dTWV.cjs} +13 -0
- package/package.json +1 -1
- package/src/url.ts +13 -0
package/deno.json
CHANGED
|
@@ -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-DKA6dTWV.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
|
|
|
2
|
-
import { d as haveSameIriOrigin, o as formatIri, u as haveSameFe34Origin } from "../url-
|
|
2
|
+
import { d as haveSameIriOrigin, o as formatIri, u as haveSameFe34Origin } from "../url-Cr9lJ6cD.js";
|
|
3
3
|
import jsonld_default from "../jsonld.js";
|
|
4
4
|
//#region src/internal/jsonld-cache.ts
|
|
5
5
|
const noJsonLdContext = Symbol("noJsonLdContext");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_contexts = require("../contexts-BK1CqBR5.cjs");
|
|
4
|
-
const require_url = require("../url-
|
|
4
|
+
const require_url = require("../url-DKA6dTWV.cjs");
|
|
5
5
|
const require_jsonld = require("../jsonld.cjs");
|
|
6
6
|
const require_internal_jsonld_cache = require("./jsonld-cache.cjs");
|
|
7
7
|
let _logtape_logtape = require("@logtape/logtape");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { t as preloadedContexts } from "../contexts-DPuJ4UYL.js";
|
|
3
|
-
import { _ as parseIri, h as parseGatewayOrigin, i as canonicalizePortableUri, o as formatIri, s as fromCompatibleEf61Id, t as GATEWAY_HINT_PARAMETER, u as haveSameFe34Origin, y as toCompatibleEf61Id } from "../url-
|
|
3
|
+
import { _ as parseIri, h as parseGatewayOrigin, i as canonicalizePortableUri, o as formatIri, s as fromCompatibleEf61Id, t as GATEWAY_HINT_PARAMETER, u as haveSameFe34Origin, y as toCompatibleEf61Id } from "../url-Cr9lJ6cD.js";
|
|
4
4
|
import jsonld_default from "../jsonld.js";
|
|
5
5
|
import { createScopedContextLoader, registerDocumentLoaderWrapper, unwrapReleasedDocumentLoader } from "./jsonld-cache.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
package/dist/mod.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_rolldown_runtime = require("./rolldown-runtime-B7lfambq.cjs");
|
|
4
4
|
const require_contexts = require("./contexts-BK1CqBR5.cjs");
|
|
5
|
-
const require_url = require("./url-
|
|
5
|
+
const require_url = require("./url-DKA6dTWV.cjs");
|
|
6
6
|
let _logtape_logtape = require("@logtape/logtape");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
8
8
|
let node_process = require("node:process");
|
|
@@ -16,7 +16,7 @@ let _multiformats_base_x = require("@multiformats/base-x");
|
|
|
16
16
|
_multiformats_base_x = require_rolldown_runtime.__toESM(_multiformats_base_x, 1);
|
|
17
17
|
//#region deno.json
|
|
18
18
|
var name = "@fedify/vocab-runtime";
|
|
19
|
-
var version = "2.4.0-dev.
|
|
19
|
+
var version = "2.4.0-dev.2247+4fe1b8c3";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/request.ts
|
|
22
22
|
/**
|
package/dist/mod.d.cts
CHANGED
|
@@ -480,6 +480,13 @@ declare function parseIri(iri: string | URL, base?: string | URL): URL;
|
|
|
480
480
|
* Portable URI and FEP-ef61 compatible identifier strings with dot segments
|
|
481
481
|
* throw a `TypeError` because their paths cannot be represented by JavaScript
|
|
482
482
|
* `URL` without normalization.
|
|
483
|
+
*
|
|
484
|
+
* Portable IRIs are formatted with the `ap+ef61:` scheme and a decoded DID
|
|
485
|
+
* authority, even if they were parsed from `ap:` IRIs. FEP-ef61 currently
|
|
486
|
+
* recommends the `ap:` scheme, so a future major version of Fedify may change
|
|
487
|
+
* the scheme this function produces. Do not compare its results as strings to
|
|
488
|
+
* tell whether two portable IRIs identify the same object; use
|
|
489
|
+
* `arePortableUrisEqual()` instead.
|
|
483
490
|
*/
|
|
484
491
|
declare function formatIri(iri: string | URL): string;
|
|
485
492
|
/**
|
|
@@ -491,6 +498,12 @@ declare function formatIri(iri: string | URL): string;
|
|
|
491
498
|
* string, not a `URL` object, because JavaScript `URL` normalizes opaque path
|
|
492
499
|
* segments before Fedify can compare them.
|
|
493
500
|
*
|
|
501
|
+
* The `ap+ef61:` scheme of the result is a choice of Fedify's, whereas
|
|
502
|
+
* FEP-ef61 currently canonicalizes portable URIs with the `ap:` scheme.
|
|
503
|
+
* A future major version of Fedify may change the scheme of the result, so
|
|
504
|
+
* do not persist the result as the only copy of an identifier; keep the
|
|
505
|
+
* original URI, and canonicalize it again when comparing.
|
|
506
|
+
*
|
|
494
507
|
* @param input The raw portable ActivityPub URI string to canonicalize.
|
|
495
508
|
* @returns The canonical portable ActivityPub URI string.
|
|
496
509
|
* @throws {TypeError} If the input is not a valid portable ActivityPub IRI.
|
package/dist/mod.d.ts
CHANGED
|
@@ -479,6 +479,13 @@ declare function parseIri(iri: string | URL, base?: string | URL): URL;
|
|
|
479
479
|
* Portable URI and FEP-ef61 compatible identifier strings with dot segments
|
|
480
480
|
* throw a `TypeError` because their paths cannot be represented by JavaScript
|
|
481
481
|
* `URL` without normalization.
|
|
482
|
+
*
|
|
483
|
+
* Portable IRIs are formatted with the `ap+ef61:` scheme and a decoded DID
|
|
484
|
+
* authority, even if they were parsed from `ap:` IRIs. FEP-ef61 currently
|
|
485
|
+
* recommends the `ap:` scheme, so a future major version of Fedify may change
|
|
486
|
+
* the scheme this function produces. Do not compare its results as strings to
|
|
487
|
+
* tell whether two portable IRIs identify the same object; use
|
|
488
|
+
* `arePortableUrisEqual()` instead.
|
|
482
489
|
*/
|
|
483
490
|
declare function formatIri(iri: string | URL): string;
|
|
484
491
|
/**
|
|
@@ -490,6 +497,12 @@ declare function formatIri(iri: string | URL): string;
|
|
|
490
497
|
* string, not a `URL` object, because JavaScript `URL` normalizes opaque path
|
|
491
498
|
* segments before Fedify can compare them.
|
|
492
499
|
*
|
|
500
|
+
* The `ap+ef61:` scheme of the result is a choice of Fedify's, whereas
|
|
501
|
+
* FEP-ef61 currently canonicalizes portable URIs with the `ap:` scheme.
|
|
502
|
+
* A future major version of Fedify may change the scheme of the result, so
|
|
503
|
+
* do not persist the result as the only copy of an identifier; keep the
|
|
504
|
+
* original URI, and canonicalize it again when comparing.
|
|
505
|
+
*
|
|
493
506
|
* @param input The raw portable ActivityPub URI string to canonicalize.
|
|
494
507
|
* @returns The canonical portable ActivityPub URI string.
|
|
495
508
|
* @throws {TypeError} If the input is not a valid portable ActivityPub IRI.
|
package/dist/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { t as preloadedContexts } from "./contexts-DPuJ4UYL.js";
|
|
3
|
-
import { S as withoutGatewayHints, _ as parseIri, a as expandIPv6Address, b as validatePublicUrl, c as getFe34Origin, d as haveSameIriOrigin, f as isGatewayUrl, g as parseGatewayUrl, i as canonicalizePortableUri, l as getGatewayHints, m as isValidPublicIPv6Address, n as UrlError, o as formatIri, p as isValidPublicIPv4Address, r as arePortableUrisEqual, s as fromCompatibleEf61Id, u as haveSameFe34Origin, v as parseJsonLdId, x as withGatewayHints, y as toCompatibleEf61Id } from "./url-
|
|
3
|
+
import { S as withoutGatewayHints, _ as parseIri, a as expandIPv6Address, b as validatePublicUrl, c as getFe34Origin, d as haveSameIriOrigin, f as isGatewayUrl, g as parseGatewayUrl, i as canonicalizePortableUri, l as getGatewayHints, m as isValidPublicIPv6Address, n as UrlError, o as formatIri, p as isValidPublicIPv4Address, r as arePortableUrisEqual, s as fromCompatibleEf61Id, u as haveSameFe34Origin, v as parseJsonLdId, x as withGatewayHints, y as toCompatibleEf61Id } from "./url-Cr9lJ6cD.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
6
6
|
import process from "node:process";
|
|
@@ -12,7 +12,7 @@ import { PublicKeyInfo } from "pkijs";
|
|
|
12
12
|
import baseX from "@multiformats/base-x";
|
|
13
13
|
//#region deno.json
|
|
14
14
|
var name = "@fedify/vocab-runtime";
|
|
15
|
-
var version = "2.4.0-dev.
|
|
15
|
+
var version = "2.4.0-dev.2247+4fe1b8c3";
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/request.ts
|
|
18
18
|
/**
|
package/dist/tests/body.test.cjs
CHANGED
package/dist/tests/body.test.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as readBoundedText, t as BodyTooLargeError } from "./body-
|
|
1
|
+
import { i as readBoundedText, t as BodyTooLargeError } from "./body-CVAgeOnY.mjs";
|
|
2
2
|
import { deepStrictEqual, ok, rejects } from "node:assert/strict";
|
|
3
3
|
import { test } from "node:test";
|
|
4
4
|
import { gunzipSync, gzipSync } from "node:zlib";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require("./url-
|
|
2
|
-
require("./docloader-
|
|
1
|
+
require("./url-Ddeuv0sE.cjs");
|
|
2
|
+
require("./docloader-Dqn63h7z.cjs");
|
|
3
3
|
require("./key-C-AYkdJJ.cjs");
|
|
4
4
|
require("./multibase-B5Mea7Ip.cjs");
|
|
5
5
|
require("./digest-3FeH2Y-Q.cjs");
|
|
6
6
|
require("./langstr-C4Fl80ae.cjs");
|
|
7
|
-
require("./portable-media-
|
|
7
|
+
require("./portable-media-CJz3xZPL.cjs");
|
|
8
8
|
let node_test = require("node:test");
|
|
9
9
|
let node_assert = require("node:assert");
|
|
10
10
|
//#region src/decimal.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./url-
|
|
2
|
-
import "./docloader-
|
|
1
|
+
import "./url-ClVBNQup.mjs";
|
|
2
|
+
import "./docloader-Dh5FI5cc.mjs";
|
|
3
3
|
import "./key-C2Db_TAJ.mjs";
|
|
4
4
|
import "./multibase-BPnF_L4e.mjs";
|
|
5
5
|
import "./digest-COC7xDiQ.mjs";
|
|
6
6
|
import "./langstr-CQ26J_L7.mjs";
|
|
7
|
-
import "./portable-media-
|
|
7
|
+
import "./portable-media-Ch4q22fg.mjs";
|
|
8
8
|
import { test } from "node:test";
|
|
9
9
|
import { deepStrictEqual, throws } from "node:assert";
|
|
10
10
|
//#region src/decimal.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-
|
|
2
|
-
import { i as readBoundedText, n as MAX_BODY_SIZE, r as readBoundedBytes, t as BodyTooLargeError } from "./body-
|
|
1
|
+
import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-D9hlYelF.mjs";
|
|
2
|
+
import { i as readBoundedText, n as MAX_BODY_SIZE, r as readBoundedBytes, t as BodyTooLargeError } from "./body-CVAgeOnY.mjs";
|
|
3
3
|
import { t as preloadedContexts } from "./contexts-CIKsin4e.mjs";
|
|
4
4
|
import { t as HttpHeaderLink } from "./link-Cevmc87v.mjs";
|
|
5
|
-
import { n as UrlError, x as validatePublicUrl } from "./url-
|
|
5
|
+
import { n as UrlError, x as validatePublicUrl } from "./url-ClVBNQup.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
//#region src/docloader.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_request = require("./request-
|
|
2
|
-
const require_body = require("./body-
|
|
1
|
+
const require_request = require("./request-Cemb1TON.cjs");
|
|
2
|
+
const require_body = require("./body-EkRcWtjc.cjs");
|
|
3
3
|
const require_contexts = require("./contexts-DizzBjz4.cjs");
|
|
4
4
|
const require_link = require("./link-DlKm8bEr.cjs");
|
|
5
|
-
const require_url = require("./url-
|
|
5
|
+
const require_url = require("./url-Ddeuv0sE.cjs");
|
|
6
6
|
let _logtape_logtape = require("@logtape/logtape");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
8
8
|
//#region src/docloader.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-Cemb1TON.cjs");
|
|
3
3
|
const require_contexts = require("./contexts-DizzBjz4.cjs");
|
|
4
|
-
const require_url = require("./url-
|
|
5
|
-
const require_docloader = require("./docloader-
|
|
4
|
+
const require_url = require("./url-Ddeuv0sE.cjs");
|
|
5
|
+
const require_docloader = require("./docloader-Dqn63h7z.cjs");
|
|
6
6
|
let node_zlib = require("node:zlib");
|
|
7
7
|
let _logtape_logtape = require("@logtape/logtape");
|
|
8
8
|
let node_assert = require("node:assert");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as FetchError } from "./request-
|
|
1
|
+
import { t as FetchError } from "./request-D9hlYelF.mjs";
|
|
2
2
|
import { n as cid_v1_default, t as preloadedContexts } from "./contexts-CIKsin4e.mjs";
|
|
3
|
-
import { n as UrlError } from "./url-
|
|
4
|
-
import { i as withDocumentLoaderTimeout, n as getRemoteDocument, r as resolveDocumentLoaderTimeout, t as getDocumentLoader } from "./docloader-
|
|
3
|
+
import { n as UrlError } from "./url-ClVBNQup.mjs";
|
|
4
|
+
import { i as withDocumentLoaderTimeout, n as getRemoteDocument, r as resolveDocumentLoaderTimeout, t as getDocumentLoader } from "./docloader-Dh5FI5cc.mjs";
|
|
5
5
|
import { gzipSync } from "node:zlib";
|
|
6
6
|
import { configure, reset } from "@logtape/logtape";
|
|
7
7
|
import { deepStrictEqual, ok, rejects, throws } from "node:assert";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_url = require("../url-
|
|
2
|
-
const require_jsonld_cache = require("../jsonld-cache-
|
|
3
|
-
const require_portable_dereference = require("../portable-dereference-
|
|
1
|
+
const require_url = require("../url-Ddeuv0sE.cjs");
|
|
2
|
+
const require_jsonld_cache = require("../jsonld-cache-ChlXnADf.cjs");
|
|
3
|
+
const require_portable_dereference = require("../portable-dereference-CmEBkIwk.cjs");
|
|
4
4
|
let node_assert_strict = require("node:assert/strict");
|
|
5
5
|
let node_test = require("node:test");
|
|
6
6
|
//#region src/internal/portable-dereference.test.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as withGatewayHints, _ as parseIri } from "../url-
|
|
2
|
-
import { n as createScopedContextLoader } from "../jsonld-cache-
|
|
3
|
-
import { n as getPortableGatewayCandidates, r as isPortableIri, t as createSnapshotContextLoader } from "../portable-dereference-
|
|
1
|
+
import { S as withGatewayHints, _ as parseIri } from "../url-ClVBNQup.mjs";
|
|
2
|
+
import { n as createScopedContextLoader } from "../jsonld-cache-Clt08GtO.mjs";
|
|
3
|
+
import { n as getPortableGatewayCandidates, r as isPortableIri, t as createSnapshotContextLoader } from "../portable-dereference-BPUyWeZd.mjs";
|
|
4
4
|
import { deepStrictEqual, ok, throws } from "node:assert/strict";
|
|
5
5
|
import { test } from "node:test";
|
|
6
6
|
//#region src/internal/portable-dereference.test.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.cjs");
|
|
2
|
-
const require_url = require("./url-
|
|
2
|
+
const require_url = require("./url-Ddeuv0sE.cjs");
|
|
3
3
|
let jsonld_dist_jsonld_esm_js = require("jsonld/dist/jsonld.esm.js");
|
|
4
4
|
jsonld_dist_jsonld_esm_js = require_rolldown_runtime.__toESM(jsonld_dist_jsonld_esm_js, 1);
|
|
5
5
|
//#region src/jsonld.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as haveSameIriOrigin, o as formatIri, u as haveSameFe34Origin } from "./url-
|
|
1
|
+
import { d as haveSameIriOrigin, o as formatIri, u as haveSameFe34Origin } from "./url-ClVBNQup.mjs";
|
|
2
2
|
import jsonld from "jsonld/dist/jsonld.esm.js";
|
|
3
3
|
//#region src/jsonld.ts
|
|
4
4
|
var jsonld_default = jsonld;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_url = require("./url-
|
|
2
|
-
const require_jsonld_cache = require("./jsonld-cache-
|
|
1
|
+
const require_url = require("./url-Ddeuv0sE.cjs");
|
|
2
|
+
const require_jsonld_cache = require("./jsonld-cache-ChlXnADf.cjs");
|
|
3
3
|
let node_test = require("node:test");
|
|
4
4
|
let node_assert = require("node:assert");
|
|
5
5
|
//#region src/jsonld-cache.test.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as parseIri } from "./url-
|
|
2
|
-
import { a as normalizeJsonLdIris, c as jsonld_default, i as isTrustedIriOrigin, r as getJsonLdContext, t as compactJsonLdCache } from "./jsonld-cache-
|
|
1
|
+
import { _ as parseIri } from "./url-ClVBNQup.mjs";
|
|
2
|
+
import { a as normalizeJsonLdIris, c as jsonld_default, i as isTrustedIriOrigin, r as getJsonLdContext, t as compactJsonLdCache } from "./jsonld-cache-Clt08GtO.mjs";
|
|
3
3
|
import { test } from "node:test";
|
|
4
4
|
import { deepStrictEqual, ok, strictEqual } from "node:assert";
|
|
5
5
|
//#region src/jsonld-cache.test.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as preloadedContexts } from "./contexts-CIKsin4e.mjs";
|
|
2
|
-
import { h as parseGatewayOrigin, o as formatIri, t as GATEWAY_HINT_PARAMETER } from "./url-
|
|
3
|
-
import { o as registerDocumentLoaderWrapper, s as unwrapReleasedDocumentLoader } from "./jsonld-cache-
|
|
2
|
+
import { h as parseGatewayOrigin, o as formatIri, t as GATEWAY_HINT_PARAMETER } from "./url-ClVBNQup.mjs";
|
|
3
|
+
import { o as registerDocumentLoaderWrapper, s as unwrapReleasedDocumentLoader } from "./jsonld-cache-Clt08GtO.mjs";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import "@opentelemetry/api";
|
|
6
6
|
//#region src/internal/portable-dereference.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_contexts = require("./contexts-DizzBjz4.cjs");
|
|
2
|
-
const require_url = require("./url-
|
|
3
|
-
const require_jsonld_cache = require("./jsonld-cache-
|
|
2
|
+
const require_url = require("./url-Ddeuv0sE.cjs");
|
|
3
|
+
const require_jsonld_cache = require("./jsonld-cache-ChlXnADf.cjs");
|
|
4
4
|
let _logtape_logtape = require("@logtape/logtape");
|
|
5
5
|
require("@opentelemetry/api");
|
|
6
6
|
//#region src/internal/portable-dereference.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_request = require("./request-
|
|
2
|
-
const require_body = require("./body-
|
|
3
|
-
const require_url = require("./url-
|
|
1
|
+
const require_request = require("./request-Cemb1TON.cjs");
|
|
2
|
+
const require_body = require("./body-EkRcWtjc.cjs");
|
|
3
|
+
const require_url = require("./url-Ddeuv0sE.cjs");
|
|
4
4
|
const require_digest = require("./digest-3FeH2Y-Q.cjs");
|
|
5
5
|
//#region src/portable-media.ts
|
|
6
6
|
function resolveTimeout(value, fallback) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as getUserAgent } from "./request-
|
|
2
|
-
import { r as readBoundedBytes } from "./body-
|
|
3
|
-
import { g as parseGatewayUrl, x as validatePublicUrl } from "./url-
|
|
1
|
+
import { r as getUserAgent } from "./request-D9hlYelF.mjs";
|
|
2
|
+
import { r as readBoundedBytes } from "./body-CVAgeOnY.mjs";
|
|
3
|
+
import { g as parseGatewayUrl, x as validatePublicUrl } from "./url-ClVBNQup.mjs";
|
|
4
4
|
import { a as verifyDigestMultibase, i as parseHashlink, r as parseDigestMultibase } from "./digest-COC7xDiQ.mjs";
|
|
5
5
|
//#region src/portable-media.ts
|
|
6
6
|
function resolveTimeout(value, fallback) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_digest = require("./digest-3FeH2Y-Q.cjs");
|
|
2
|
-
const require_portable_media = require("./portable-media-
|
|
2
|
+
const require_portable_media = require("./portable-media-CJz3xZPL.cjs");
|
|
3
3
|
let node_assert_strict = require("node:assert/strict");
|
|
4
4
|
let node_test = require("node:test");
|
|
5
5
|
let node_http = require("node:http");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as createHashlink, t as computeDigestMultibase } from "./digest-COC7xDiQ.mjs";
|
|
2
|
-
import { t as fetchPortableMedia } from "./portable-media-
|
|
2
|
+
import { t as fetchPortableMedia } from "./portable-media-Ch4q22fg.mjs";
|
|
3
3
|
import { deepStrictEqual, equal, rejects } from "node:assert/strict";
|
|
4
4
|
import { test } from "node:test";
|
|
5
5
|
import { createServer } from "node:http";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_url = require("./url-
|
|
2
|
+
const require_url = require("./url-Ddeuv0sE.cjs");
|
|
3
3
|
const require_key = require("./key-C-AYkdJJ.cjs");
|
|
4
4
|
const require_digest = require("./digest-3FeH2Y-Q.cjs");
|
|
5
|
-
const require_portable_dereference = require("./portable-dereference-
|
|
5
|
+
const require_portable_dereference = require("./portable-dereference-CmEBkIwk.cjs");
|
|
6
6
|
let node_assert_strict = require("node:assert/strict");
|
|
7
7
|
let _fedify_fixture = require("@fedify/fixture");
|
|
8
8
|
//#region src/portable-workers.test.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as parseIri, i as canonicalizePortableUri, o as formatIri, s as fromCompatibleEf61Id, y as toCompatibleEf61Id } from "./url-
|
|
1
|
+
import { _ as parseIri, i as canonicalizePortableUri, o as formatIri, s as fromCompatibleEf61Id, y as toCompatibleEf61Id } from "./url-ClVBNQup.mjs";
|
|
2
2
|
import { i as importDidKey, t as exportDidKey } from "./key-C2Db_TAJ.mjs";
|
|
3
3
|
import { n as createHashlink, o as verifyHashlink, t as computeDigestMultibase } from "./digest-COC7xDiQ.mjs";
|
|
4
|
-
import { n as getPortableGatewayCandidates } from "./portable-dereference-
|
|
4
|
+
import { n as getPortableGatewayCandidates } from "./portable-dereference-BPUyWeZd.mjs";
|
|
5
5
|
import { deepStrictEqual, equal } from "node:assert/strict";
|
|
6
6
|
import { test, testDefinitions } from "@fedify/fixture";
|
|
7
7
|
//#region src/portable-workers.test.ts
|
|
@@ -3,7 +3,7 @@ let node_process = require("node:process");
|
|
|
3
3
|
node_process = require_rolldown_runtime.__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.2247+4fe1b8c3";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/request.ts
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-Cemb1TON.cjs");
|
|
3
3
|
let node_test = require("node:test");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createActivityPubRequest, o as version, r as getUserAgent } from "./request-
|
|
1
|
+
import { n as createActivityPubRequest, o as version, r as getUserAgent } from "./request-D9hlYelF.mjs";
|
|
2
2
|
import { test } from "node:test";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { deepStrictEqual } from "node:assert";
|
|
@@ -75,6 +75,13 @@ function parseIri(iri, base) {
|
|
|
75
75
|
* Portable URI and FEP-ef61 compatible identifier strings with dot segments
|
|
76
76
|
* throw a `TypeError` because their paths cannot be represented by JavaScript
|
|
77
77
|
* `URL` without normalization.
|
|
78
|
+
*
|
|
79
|
+
* Portable IRIs are formatted with the `ap+ef61:` scheme and a decoded DID
|
|
80
|
+
* authority, even if they were parsed from `ap:` IRIs. FEP-ef61 currently
|
|
81
|
+
* recommends the `ap:` scheme, so a future major version of Fedify may change
|
|
82
|
+
* the scheme this function produces. Do not compare its results as strings to
|
|
83
|
+
* tell whether two portable IRIs identify the same object; use
|
|
84
|
+
* `arePortableUrisEqual()` instead.
|
|
78
85
|
*/
|
|
79
86
|
function formatIri(iri) {
|
|
80
87
|
if (typeof iri === "string") assertPortablePathCanBeParsed(iri);
|
|
@@ -97,6 +104,12 @@ function formatIri(iri) {
|
|
|
97
104
|
* string, not a `URL` object, because JavaScript `URL` normalizes opaque path
|
|
98
105
|
* segments before Fedify can compare them.
|
|
99
106
|
*
|
|
107
|
+
* The `ap+ef61:` scheme of the result is a choice of Fedify's, whereas
|
|
108
|
+
* FEP-ef61 currently canonicalizes portable URIs with the `ap:` scheme.
|
|
109
|
+
* A future major version of Fedify may change the scheme of the result, so
|
|
110
|
+
* do not persist the result as the only copy of an identifier; keep the
|
|
111
|
+
* original URI, and canonicalize it again when comparing.
|
|
112
|
+
*
|
|
100
113
|
* @param input The raw portable ActivityPub URI string to canonicalize.
|
|
101
114
|
* @returns The canonical portable ActivityPub URI string.
|
|
102
115
|
* @throws {TypeError} If the input is not a valid portable ActivityPub IRI.
|
|
@@ -77,6 +77,13 @@ function parseIri(iri, base) {
|
|
|
77
77
|
* Portable URI and FEP-ef61 compatible identifier strings with dot segments
|
|
78
78
|
* throw a `TypeError` because their paths cannot be represented by JavaScript
|
|
79
79
|
* `URL` without normalization.
|
|
80
|
+
*
|
|
81
|
+
* Portable IRIs are formatted with the `ap+ef61:` scheme and a decoded DID
|
|
82
|
+
* authority, even if they were parsed from `ap:` IRIs. FEP-ef61 currently
|
|
83
|
+
* recommends the `ap:` scheme, so a future major version of Fedify may change
|
|
84
|
+
* the scheme this function produces. Do not compare its results as strings to
|
|
85
|
+
* tell whether two portable IRIs identify the same object; use
|
|
86
|
+
* `arePortableUrisEqual()` instead.
|
|
80
87
|
*/
|
|
81
88
|
function formatIri(iri) {
|
|
82
89
|
if (typeof iri === "string") assertPortablePathCanBeParsed(iri);
|
|
@@ -99,6 +106,12 @@ function formatIri(iri) {
|
|
|
99
106
|
* string, not a `URL` object, because JavaScript `URL` normalizes opaque path
|
|
100
107
|
* segments before Fedify can compare them.
|
|
101
108
|
*
|
|
109
|
+
* The `ap+ef61:` scheme of the result is a choice of Fedify's, whereas
|
|
110
|
+
* FEP-ef61 currently canonicalizes portable URIs with the `ap:` scheme.
|
|
111
|
+
* A future major version of Fedify may change the scheme of the result, so
|
|
112
|
+
* do not persist the result as the only copy of an identifier; keep the
|
|
113
|
+
* original URI, and canonicalize it again when comparing.
|
|
114
|
+
*
|
|
102
115
|
* @param input The raw portable ActivityPub URI string to canonicalize.
|
|
103
116
|
* @returns The canonical portable ActivityPub URI string.
|
|
104
117
|
* @throws {TypeError} If the input is not a valid portable ActivityPub IRI.
|
package/dist/tests/url.test.cjs
CHANGED
package/dist/tests/url.test.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as withoutGatewayHints, S as withGatewayHints, _ as parseIri, a as expandIPv6Address, b as validateLookupAddresses, c as getFe34Origin, d as haveSameIriOrigin, f as isGatewayUrl, g as parseGatewayUrl, i as canonicalizePortableUri, l as getGatewayHints, m as isValidPublicIPv6Address, n as UrlError, o as formatIri, p as isValidPublicIPv4Address, r as arePortableUrisEqual, s as fromCompatibleEf61Id, u as haveSameFe34Origin, v as parseJsonLdId, x as validatePublicUrl, y as toCompatibleEf61Id } from "./url-
|
|
1
|
+
import { C as withoutGatewayHints, S as withGatewayHints, _ as parseIri, a as expandIPv6Address, b as validateLookupAddresses, c as getFe34Origin, d as haveSameIriOrigin, f as isGatewayUrl, g as parseGatewayUrl, i as canonicalizePortableUri, l as getGatewayHints, m as isValidPublicIPv6Address, n as UrlError, o as formatIri, p as isValidPublicIPv4Address, r as arePortableUrisEqual, s as fromCompatibleEf61Id, u as haveSameFe34Origin, v as parseJsonLdId, x as validatePublicUrl, y as toCompatibleEf61Id } from "./url-ClVBNQup.mjs";
|
|
2
2
|
import { test } from "node:test";
|
|
3
3
|
import { deepStrictEqual, ok, rejects, strictEqual, throws } from "node:assert";
|
|
4
4
|
//#region src/url.test.ts
|
|
@@ -76,6 +76,13 @@ function parseIri(iri, base) {
|
|
|
76
76
|
* Portable URI and FEP-ef61 compatible identifier strings with dot segments
|
|
77
77
|
* throw a `TypeError` because their paths cannot be represented by JavaScript
|
|
78
78
|
* `URL` without normalization.
|
|
79
|
+
*
|
|
80
|
+
* Portable IRIs are formatted with the `ap+ef61:` scheme and a decoded DID
|
|
81
|
+
* authority, even if they were parsed from `ap:` IRIs. FEP-ef61 currently
|
|
82
|
+
* recommends the `ap:` scheme, so a future major version of Fedify may change
|
|
83
|
+
* the scheme this function produces. Do not compare its results as strings to
|
|
84
|
+
* tell whether two portable IRIs identify the same object; use
|
|
85
|
+
* `arePortableUrisEqual()` instead.
|
|
79
86
|
*/
|
|
80
87
|
function formatIri(iri) {
|
|
81
88
|
if (typeof iri === "string") assertPortablePathCanBeParsed(iri);
|
|
@@ -98,6 +105,12 @@ function formatIri(iri) {
|
|
|
98
105
|
* string, not a `URL` object, because JavaScript `URL` normalizes opaque path
|
|
99
106
|
* segments before Fedify can compare them.
|
|
100
107
|
*
|
|
108
|
+
* The `ap+ef61:` scheme of the result is a choice of Fedify's, whereas
|
|
109
|
+
* FEP-ef61 currently canonicalizes portable URIs with the `ap:` scheme.
|
|
110
|
+
* A future major version of Fedify may change the scheme of the result, so
|
|
111
|
+
* do not persist the result as the only copy of an identifier; keep the
|
|
112
|
+
* original URI, and canonicalize it again when comparing.
|
|
113
|
+
*
|
|
101
114
|
* @param input The raw portable ActivityPub URI string to canonicalize.
|
|
102
115
|
* @returns The canonical portable ActivityPub URI string.
|
|
103
116
|
* @throws {TypeError} If the input is not a valid portable ActivityPub IRI.
|
|
@@ -78,6 +78,13 @@ function parseIri(iri, base) {
|
|
|
78
78
|
* Portable URI and FEP-ef61 compatible identifier strings with dot segments
|
|
79
79
|
* throw a `TypeError` because their paths cannot be represented by JavaScript
|
|
80
80
|
* `URL` without normalization.
|
|
81
|
+
*
|
|
82
|
+
* Portable IRIs are formatted with the `ap+ef61:` scheme and a decoded DID
|
|
83
|
+
* authority, even if they were parsed from `ap:` IRIs. FEP-ef61 currently
|
|
84
|
+
* recommends the `ap:` scheme, so a future major version of Fedify may change
|
|
85
|
+
* the scheme this function produces. Do not compare its results as strings to
|
|
86
|
+
* tell whether two portable IRIs identify the same object; use
|
|
87
|
+
* `arePortableUrisEqual()` instead.
|
|
81
88
|
*/
|
|
82
89
|
function formatIri(iri) {
|
|
83
90
|
if (typeof iri === "string") assertPortablePathCanBeParsed(iri);
|
|
@@ -100,6 +107,12 @@ function formatIri(iri) {
|
|
|
100
107
|
* string, not a `URL` object, because JavaScript `URL` normalizes opaque path
|
|
101
108
|
* segments before Fedify can compare them.
|
|
102
109
|
*
|
|
110
|
+
* The `ap+ef61:` scheme of the result is a choice of Fedify's, whereas
|
|
111
|
+
* FEP-ef61 currently canonicalizes portable URIs with the `ap:` scheme.
|
|
112
|
+
* A future major version of Fedify may change the scheme of the result, so
|
|
113
|
+
* do not persist the result as the only copy of an identifier; keep the
|
|
114
|
+
* original URI, and canonicalize it again when comparing.
|
|
115
|
+
*
|
|
103
116
|
* @param input The raw portable ActivityPub URI string to canonicalize.
|
|
104
117
|
* @returns The canonical portable ActivityPub URI string.
|
|
105
118
|
* @throws {TypeError} If the input is not a valid portable ActivityPub IRI.
|
package/package.json
CHANGED
package/src/url.ts
CHANGED
|
@@ -125,6 +125,13 @@ export function parseIri(iri: string | URL, base?: string | URL): URL {
|
|
|
125
125
|
* Portable URI and FEP-ef61 compatible identifier strings with dot segments
|
|
126
126
|
* throw a `TypeError` because their paths cannot be represented by JavaScript
|
|
127
127
|
* `URL` without normalization.
|
|
128
|
+
*
|
|
129
|
+
* Portable IRIs are formatted with the `ap+ef61:` scheme and a decoded DID
|
|
130
|
+
* authority, even if they were parsed from `ap:` IRIs. FEP-ef61 currently
|
|
131
|
+
* recommends the `ap:` scheme, so a future major version of Fedify may change
|
|
132
|
+
* the scheme this function produces. Do not compare its results as strings to
|
|
133
|
+
* tell whether two portable IRIs identify the same object; use
|
|
134
|
+
* `arePortableUrisEqual()` instead.
|
|
128
135
|
*/
|
|
129
136
|
export function formatIri(iri: string | URL): string {
|
|
130
137
|
if (typeof iri === "string") assertPortablePathCanBeParsed(iri);
|
|
@@ -149,6 +156,12 @@ export function formatIri(iri: string | URL): string {
|
|
|
149
156
|
* string, not a `URL` object, because JavaScript `URL` normalizes opaque path
|
|
150
157
|
* segments before Fedify can compare them.
|
|
151
158
|
*
|
|
159
|
+
* The `ap+ef61:` scheme of the result is a choice of Fedify's, whereas
|
|
160
|
+
* FEP-ef61 currently canonicalizes portable URIs with the `ap:` scheme.
|
|
161
|
+
* A future major version of Fedify may change the scheme of the result, so
|
|
162
|
+
* do not persist the result as the only copy of an identifier; keep the
|
|
163
|
+
* original URI, and canonicalize it again when comparing.
|
|
164
|
+
*
|
|
152
165
|
* @param input The raw portable ActivityPub URI string to canonicalize.
|
|
153
166
|
* @returns The canonical portable ActivityPub URI string.
|
|
154
167
|
* @throws {TypeError} If the input is not a valid portable ActivityPub IRI.
|