@fedify/vocab 2.5.0-dev.2446 → 2.5.0-dev.2492
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/mod.cjs +115 -5
- package/dist/mod.d.cts +110 -1
- package/dist/mod.d.ts +110 -1
- package/dist/mod.js +116 -7
- package/dist-tests/{actor-C89Bex4F.mjs → actor-BjUFWXfi.mjs} +6 -4
- package/dist-tests/actor.test.mjs +4 -3
- package/dist-tests/{esm-DtAfYdqR.mjs → esm-BIqRhjGA.mjs} +1 -1
- package/dist-tests/gateway.test.mjs +4 -4
- package/dist-tests/license.test.mjs +2 -2
- package/dist-tests/{lookup-BehNGq4X.mjs → lookup-BQqIkZ5j.mjs} +38 -6
- package/dist-tests/lookup.test.mjs +134 -15
- package/dist-tests/portable-lookup.test.mjs +52 -13
- package/dist-tests/rolldown-runtime-BWJg4WE8.mjs +37 -0
- package/dist-tests/signed-representation.test.mjs +1 -1
- package/dist-tests/{src-fpZm9WyF.mjs → src-DQiQQv6h.mjs} +3 -3
- package/dist-tests/translation.test.mjs +2 -2
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/undici-D88PC0XH.mjs +22898 -0
- package/dist-tests/{vocab-jHKm_LJ6.mjs → vocab-BMEyHiOV.mjs} +77 -34
- package/dist-tests/vocab.test.mjs +6064 -8
- package/package.json +5 -5
- package/src/actor.ts +4 -0
- package/src/gateway.test.ts +1 -1
- package/src/lookup.test.ts +161 -12
- package/src/lookup.ts +67 -7
- package/src/portable-lookup.test.ts +72 -7
- package/src/vocab.test.ts +40 -5
package/deno.json
CHANGED
package/dist/mod.cjs
CHANGED
|
@@ -36,7 +36,7 @@ let _fedify_vocab_runtime_temporal = require("@fedify/vocab-runtime/temporal");
|
|
|
36
36
|
let es_toolkit = require("es-toolkit");
|
|
37
37
|
//#region deno.json
|
|
38
38
|
var name = "@fedify/vocab";
|
|
39
|
-
var version = "2.5.0-dev.
|
|
39
|
+
var version = "2.5.0-dev.2492+4648c04e";
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/type.ts
|
|
42
42
|
function getTypeId(object) {
|
|
@@ -3941,6 +3941,11 @@ var Object$1 = class Object$1 {
|
|
|
3941
3941
|
get _warning() {
|
|
3942
3942
|
return this.#warning;
|
|
3943
3943
|
}
|
|
3944
|
+
/**
|
|
3945
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
3946
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
3947
|
+
* accessor name and its getter/setter semantics stable.
|
|
3948
|
+
*/
|
|
3944
3949
|
get _cachedJsonLd() {
|
|
3945
3950
|
return this.#cachedJsonLd;
|
|
3946
3951
|
}
|
|
@@ -17625,6 +17630,11 @@ var PropertyValue = class {
|
|
|
17625
17630
|
get _warning() {
|
|
17626
17631
|
return this.#warning;
|
|
17627
17632
|
}
|
|
17633
|
+
/**
|
|
17634
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
17635
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
17636
|
+
* accessor name and its getter/setter semantics stable.
|
|
17637
|
+
*/
|
|
17628
17638
|
get _cachedJsonLd() {
|
|
17629
17639
|
return this.#cachedJsonLd;
|
|
17630
17640
|
}
|
|
@@ -18002,6 +18012,11 @@ var Measure = class {
|
|
|
18002
18012
|
get _warning() {
|
|
18003
18013
|
return this.#warning;
|
|
18004
18014
|
}
|
|
18015
|
+
/**
|
|
18016
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
18017
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
18018
|
+
* accessor name and its getter/setter semantics stable.
|
|
18019
|
+
*/
|
|
18005
18020
|
get _cachedJsonLd() {
|
|
18006
18021
|
return this.#cachedJsonLd;
|
|
18007
18022
|
}
|
|
@@ -19400,6 +19415,11 @@ var InteractionPolicy = class {
|
|
|
19400
19415
|
get _warning() {
|
|
19401
19416
|
return this.#warning;
|
|
19402
19417
|
}
|
|
19418
|
+
/**
|
|
19419
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
19420
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
19421
|
+
* accessor name and its getter/setter semantics stable.
|
|
19422
|
+
*/
|
|
19403
19423
|
get _cachedJsonLd() {
|
|
19404
19424
|
return this.#cachedJsonLd;
|
|
19405
19425
|
}
|
|
@@ -19913,6 +19933,11 @@ var InteractionRule = class {
|
|
|
19913
19933
|
get _warning() {
|
|
19914
19934
|
return this.#warning;
|
|
19915
19935
|
}
|
|
19936
|
+
/**
|
|
19937
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
19938
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
19939
|
+
* accessor name and its getter/setter semantics stable.
|
|
19940
|
+
*/
|
|
19916
19941
|
get _cachedJsonLd() {
|
|
19917
19942
|
return this.#cachedJsonLd;
|
|
19918
19943
|
}
|
|
@@ -23389,6 +23414,11 @@ var Translation = class {
|
|
|
23389
23414
|
get _warning() {
|
|
23390
23415
|
return this.#warning;
|
|
23391
23416
|
}
|
|
23417
|
+
/**
|
|
23418
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
23419
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
23420
|
+
* accessor name and its getter/setter semantics stable.
|
|
23421
|
+
*/
|
|
23392
23422
|
get _cachedJsonLd() {
|
|
23393
23423
|
return this.#cachedJsonLd;
|
|
23394
23424
|
}
|
|
@@ -31074,6 +31104,11 @@ var DidService = class {
|
|
|
31074
31104
|
get _warning() {
|
|
31075
31105
|
return this.#warning;
|
|
31076
31106
|
}
|
|
31107
|
+
/**
|
|
31108
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
31109
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
31110
|
+
* accessor name and its getter/setter semantics stable.
|
|
31111
|
+
*/
|
|
31077
31112
|
get _cachedJsonLd() {
|
|
31078
31113
|
return this.#cachedJsonLd;
|
|
31079
31114
|
}
|
|
@@ -31590,6 +31625,11 @@ var DataIntegrityProof = class {
|
|
|
31590
31625
|
get _warning() {
|
|
31591
31626
|
return this.#warning;
|
|
31592
31627
|
}
|
|
31628
|
+
/**
|
|
31629
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
31630
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
31631
|
+
* accessor name and its getter/setter semantics stable.
|
|
31632
|
+
*/
|
|
31593
31633
|
get _cachedJsonLd() {
|
|
31594
31634
|
return this.#cachedJsonLd;
|
|
31595
31635
|
}
|
|
@@ -32281,6 +32321,11 @@ var CryptographicKey = class {
|
|
|
32281
32321
|
get _warning() {
|
|
32282
32322
|
return this.#warning;
|
|
32283
32323
|
}
|
|
32324
|
+
/**
|
|
32325
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
32326
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
32327
|
+
* accessor name and its getter/setter semantics stable.
|
|
32328
|
+
*/
|
|
32284
32329
|
get _cachedJsonLd() {
|
|
32285
32330
|
return this.#cachedJsonLd;
|
|
32286
32331
|
}
|
|
@@ -32953,6 +32998,11 @@ var Multikey = class {
|
|
|
32953
32998
|
get _warning() {
|
|
32954
32999
|
return this.#warning;
|
|
32955
33000
|
}
|
|
33001
|
+
/**
|
|
33002
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
33003
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
33004
|
+
* accessor name and its getter/setter semantics stable.
|
|
33005
|
+
*/
|
|
32956
33006
|
get _cachedJsonLd() {
|
|
32957
33007
|
return this.#cachedJsonLd;
|
|
32958
33008
|
}
|
|
@@ -34025,6 +34075,11 @@ var Commitment = class {
|
|
|
34025
34075
|
get _warning() {
|
|
34026
34076
|
return this.#warning;
|
|
34027
34077
|
}
|
|
34078
|
+
/**
|
|
34079
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
34080
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
34081
|
+
* accessor name and its getter/setter semantics stable.
|
|
34082
|
+
*/
|
|
34028
34083
|
get _cachedJsonLd() {
|
|
34029
34084
|
return this.#cachedJsonLd;
|
|
34030
34085
|
}
|
|
@@ -34416,6 +34471,11 @@ var Intent = class {
|
|
|
34416
34471
|
get _warning() {
|
|
34417
34472
|
return this.#warning;
|
|
34418
34473
|
}
|
|
34474
|
+
/**
|
|
34475
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
34476
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
34477
|
+
* accessor name and its getter/setter semantics stable.
|
|
34478
|
+
*/
|
|
34419
34479
|
get _cachedJsonLd() {
|
|
34420
34480
|
return this.#cachedJsonLd;
|
|
34421
34481
|
}
|
|
@@ -45840,6 +45900,11 @@ var Endpoints = class {
|
|
|
45840
45900
|
get _warning() {
|
|
45841
45901
|
return this.#warning;
|
|
45842
45902
|
}
|
|
45903
|
+
/**
|
|
45904
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
45905
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
45906
|
+
* accessor name and its getter/setter semantics stable.
|
|
45907
|
+
*/
|
|
45843
45908
|
get _cachedJsonLd() {
|
|
45844
45909
|
return this.#cachedJsonLd;
|
|
45845
45910
|
}
|
|
@@ -52621,6 +52686,11 @@ var Link = class Link {
|
|
|
52621
52686
|
get _warning() {
|
|
52622
52687
|
return this.#warning;
|
|
52623
52688
|
}
|
|
52689
|
+
/**
|
|
52690
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
52691
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
52692
|
+
* accessor name and its getter/setter semantics stable.
|
|
52693
|
+
*/
|
|
52624
52694
|
get _cachedJsonLd() {
|
|
52625
52695
|
return this.#cachedJsonLd;
|
|
52626
52696
|
}
|
|
@@ -78741,6 +78811,11 @@ var Source = class {
|
|
|
78741
78811
|
get _warning() {
|
|
78742
78812
|
return this.#warning;
|
|
78743
78813
|
}
|
|
78814
|
+
/**
|
|
78815
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
78816
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
78817
|
+
* accessor name and its getter/setter semantics stable.
|
|
78818
|
+
*/
|
|
78744
78819
|
get _cachedJsonLd() {
|
|
78745
78820
|
return this.#cachedJsonLd;
|
|
78746
78821
|
}
|
|
@@ -81373,7 +81448,8 @@ async function getPortableActorHandle(actor, actorId, options) {
|
|
|
81373
81448
|
const result = await (0, _fedify_webfinger.lookupWebFinger)(handle, {
|
|
81374
81449
|
userAgent: options.userAgent,
|
|
81375
81450
|
tracerProvider: options.tracerProvider,
|
|
81376
|
-
meterProvider: options.meterProvider
|
|
81451
|
+
meterProvider: options.meterProvider,
|
|
81452
|
+
allowPrivateAddress: "allowPrivateAddress" in options && options.allowPrivateAddress === true
|
|
81377
81453
|
});
|
|
81378
81454
|
if (result == null || !linksToPortableActor(result, canonicalId)) throw new ActorHandleNotFoundError();
|
|
81379
81455
|
const subject = result.subject?.match(/^acct:([^@]+)@([^@]+)$/);
|
|
@@ -81381,7 +81457,8 @@ async function getPortableActorHandle(actor, actorId, options) {
|
|
|
81381
81457
|
const subjectResult = await (0, _fedify_webfinger.lookupWebFinger)(result.subject, {
|
|
81382
81458
|
userAgent: options.userAgent,
|
|
81383
81459
|
tracerProvider: options.tracerProvider,
|
|
81384
|
-
meterProvider: options.meterProvider
|
|
81460
|
+
meterProvider: options.meterProvider,
|
|
81461
|
+
allowPrivateAddress: "allowPrivateAddress" in options && options.allowPrivateAddress === true
|
|
81385
81462
|
});
|
|
81386
81463
|
if (subjectResult != null && linksToPortableActor(subjectResult, canonicalId)) return normalizeActorHandle(`@${subject[1]}@${subject[2]}`, options);
|
|
81387
81464
|
}
|
|
@@ -81571,6 +81648,20 @@ const logger = (0, _logtape_logtape.getLogger)([
|
|
|
81571
81648
|
"lookup"
|
|
81572
81649
|
]);
|
|
81573
81650
|
/**
|
|
81651
|
+
* Options for the {@link lookupObject} function.
|
|
81652
|
+
*
|
|
81653
|
+
* @since 0.2.0
|
|
81654
|
+
*/
|
|
81655
|
+
/**
|
|
81656
|
+
* The key of the {@link LookupObjectOptions} property that observes how
|
|
81657
|
+
* {@link lookupObject} selects the object it returns.
|
|
81658
|
+
*
|
|
81659
|
+
* @internal Technically exported for other Fedify packages, but not part of
|
|
81660
|
+
* the public API contract. This is not considered public API for Semantic
|
|
81661
|
+
* Versioning decisions.
|
|
81662
|
+
*/
|
|
81663
|
+
const lookupObserver = Symbol.for("@fedify/vocab/lookupObserver");
|
|
81664
|
+
/**
|
|
81574
81665
|
* The maximum number of requests to FEP-ef61 gateways that a single
|
|
81575
81666
|
* {@link lookupObject} call makes for portable objects. Gateways come from
|
|
81576
81667
|
* possibly untrusted WebFinger responses and location hints, so they are
|
|
@@ -81690,8 +81781,13 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
|
81690
81781
|
remoteDoc = await documentLoader(identifier.href, { signal: options.signal });
|
|
81691
81782
|
} catch (error) {
|
|
81692
81783
|
logger.debug("Failed to fetch remote document:\n{error}", { error });
|
|
81784
|
+
options[lookupObserver]?.failed?.({
|
|
81785
|
+
operation: "fetch",
|
|
81786
|
+
error
|
|
81787
|
+
});
|
|
81693
81788
|
}
|
|
81694
81789
|
}
|
|
81790
|
+
if (remoteDoc == null && options[lookupObserver]?.webFinger === false) return null;
|
|
81695
81791
|
if (remoteDoc == null) {
|
|
81696
81792
|
const jrd = await (0, _fedify_webfinger.lookupWebFinger)(identifier, {
|
|
81697
81793
|
userAgent: options.userAgent,
|
|
@@ -81736,7 +81832,7 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
|
81736
81832
|
}
|
|
81737
81833
|
}
|
|
81738
81834
|
if (remoteDoc == null) return null;
|
|
81739
|
-
const snapshot = options.verifyPortableObject == null ? null : (0, _fedify_vocab_runtime_internal_portable_dereference.createSnapshotContextLoader)(options.contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)({ userAgent: options.userAgent }));
|
|
81835
|
+
const snapshot = options.verifyPortableObject == null && options[lookupObserver] == null ? null : (0, _fedify_vocab_runtime_internal_portable_dereference.createSnapshotContextLoader)(options.contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)({ userAgent: options.userAgent }));
|
|
81740
81836
|
try {
|
|
81741
81837
|
let object;
|
|
81742
81838
|
let documentUrl;
|
|
@@ -81750,6 +81846,10 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
|
81750
81846
|
baseUrl: documentUrl
|
|
81751
81847
|
});
|
|
81752
81848
|
} catch (error) {
|
|
81849
|
+
options[lookupObserver]?.failed?.({
|
|
81850
|
+
operation: "parse",
|
|
81851
|
+
error
|
|
81852
|
+
});
|
|
81753
81853
|
if (error instanceof TypeError) {
|
|
81754
81854
|
logger.debug("Failed to parse JSON-LD document: {error}\n{document}", {
|
|
81755
81855
|
...remoteDoc,
|
|
@@ -81759,7 +81859,7 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
|
81759
81859
|
}
|
|
81760
81860
|
throw error;
|
|
81761
81861
|
}
|
|
81762
|
-
if (snapshot != null) {
|
|
81862
|
+
if (options.verifyPortableObject != null && snapshot != null) {
|
|
81763
81863
|
const claim = (0, _fedify_vocab_runtime_internal_portable_dereference.getPortableResponseClaim)(remoteDoc.documentUrl, object.id);
|
|
81764
81864
|
if (claim === null) {
|
|
81765
81865
|
logger.debug("Refusing the document {documentUrl}, as it claims to be a portable object with a malformed compatible identifier.", { documentUrl: remoteDoc.documentUrl });
|
|
@@ -81778,8 +81878,16 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
|
81778
81878
|
...remoteDoc,
|
|
81779
81879
|
objectId: object.id.href
|
|
81780
81880
|
});
|
|
81881
|
+
options[lookupObserver]?.failed?.({ operation: "origin" });
|
|
81781
81882
|
return null;
|
|
81782
81883
|
}
|
|
81884
|
+
if (!await (0, _fedify_vocab_runtime_internal_portable_dereference.acceptCandidate)(options[lookupObserver], {
|
|
81885
|
+
document: remoteDoc.document,
|
|
81886
|
+
documentUrl: remoteDoc.documentUrl,
|
|
81887
|
+
baseUrl: documentUrl,
|
|
81888
|
+
contextLoader: snapshot?.loader ?? options.contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)({ userAgent: options.userAgent }),
|
|
81889
|
+
object
|
|
81890
|
+
})) return null;
|
|
81783
81891
|
return object;
|
|
81784
81892
|
} finally {
|
|
81785
81893
|
snapshot?.release();
|
|
@@ -81893,6 +82001,7 @@ async function dereference({ options, documentLoader }, id, inferredGateways, ga
|
|
|
81893
82001
|
verifyPortableObject: options.verifyPortableObject,
|
|
81894
82002
|
crossOrigin: options.crossOrigin === "throw" ? "throw" : "ignore",
|
|
81895
82003
|
signal: options.signal,
|
|
82004
|
+
observer: options[lookupObserver],
|
|
81896
82005
|
parse: (document, { contextLoader, baseUrl }) => Object$1.fromJsonLd(document, {
|
|
81897
82006
|
documentLoader,
|
|
81898
82007
|
contextLoader,
|
|
@@ -82043,6 +82152,7 @@ exports.isActor = isActor;
|
|
|
82043
82152
|
exports.isEntityType = isEntityType;
|
|
82044
82153
|
exports.isFediverseHandle = isFediverseHandle;
|
|
82045
82154
|
exports.lookupObject = lookupObject;
|
|
82155
|
+
exports.lookupObserver = lookupObserver;
|
|
82046
82156
|
exports.normalizeActorHandle = normalizeActorHandle;
|
|
82047
82157
|
exports.normalizeLinkToImage = normalizeLinkToImage;
|
|
82048
82158
|
exports.parseFediverseHandle = parseFediverseHandle;
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { Decimal, Decimal as Decimal$1, DocumentLoader, DocumentLoader as DocumentLoader$1, DocumentLoaderOptions, GetUserAgentOptions, GetUserAgentOptions as GetUserAgentOptions$1, Json, LanguageString, LanguageString as LanguageString$1, PortableObjectReferrer, PortableObjectVerification, PortableObjectVerifier, PortableObjectVerifier as PortableObjectVerifier$1, PortableObjectVerifierOptions, PropertyPreprocessor, PropertyPreprocessor as PropertyPreprocessor$1, PropertyPreprocessorContext, RemoteDocument } from "@fedify/vocab-runtime";
|
|
3
3
|
import { MeterProvider, Span, TracerProvider } from "@opentelemetry/api";
|
|
4
|
+
import { DereferenceObserver } from "@fedify/vocab-runtime/internal/portable-dereference";
|
|
4
5
|
|
|
5
6
|
//#region src/vocab.d.ts
|
|
6
7
|
/** Describes an object of any kind. The Object type serves as the base type for
|
|
@@ -21,6 +22,11 @@ declare class Object$1 {
|
|
|
21
22
|
message: string;
|
|
22
23
|
values?: Record<string, unknown>;
|
|
23
24
|
} | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
27
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
28
|
+
* accessor name and its getter/setter semantics stable.
|
|
29
|
+
*/
|
|
24
30
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
25
31
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
26
32
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -2849,6 +2855,11 @@ declare class PropertyValue {
|
|
|
2849
2855
|
message: string;
|
|
2850
2856
|
values?: Record<string, unknown>;
|
|
2851
2857
|
} | undefined;
|
|
2858
|
+
/**
|
|
2859
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
2860
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
2861
|
+
* accessor name and its getter/setter semantics stable.
|
|
2862
|
+
*/
|
|
2852
2863
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
2853
2864
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
2854
2865
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -2977,6 +2988,11 @@ declare class Measure {
|
|
|
2977
2988
|
message: string;
|
|
2978
2989
|
values?: Record<string, unknown>;
|
|
2979
2990
|
} | undefined;
|
|
2991
|
+
/**
|
|
2992
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
2993
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
2994
|
+
* accessor name and its getter/setter semantics stable.
|
|
2995
|
+
*/
|
|
2980
2996
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
2981
2997
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
2982
2998
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -3643,6 +3659,11 @@ declare class InteractionPolicy {
|
|
|
3643
3659
|
message: string;
|
|
3644
3660
|
values?: Record<string, unknown>;
|
|
3645
3661
|
} | undefined;
|
|
3662
|
+
/**
|
|
3663
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
3664
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
3665
|
+
* accessor name and its getter/setter semantics stable.
|
|
3666
|
+
*/
|
|
3646
3667
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
3647
3668
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
3648
3669
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -3818,6 +3839,11 @@ declare class InteractionRule {
|
|
|
3818
3839
|
message: string;
|
|
3819
3840
|
values?: Record<string, unknown>;
|
|
3820
3841
|
} | undefined;
|
|
3842
|
+
/**
|
|
3843
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
3844
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
3845
|
+
* accessor name and its getter/setter semantics stable.
|
|
3846
|
+
*/
|
|
3821
3847
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
3822
3848
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
3823
3849
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -5551,6 +5577,11 @@ declare class Translation {
|
|
|
5551
5577
|
message: string;
|
|
5552
5578
|
values?: Record<string, unknown>;
|
|
5553
5579
|
} | undefined;
|
|
5580
|
+
/**
|
|
5581
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
5582
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
5583
|
+
* accessor name and its getter/setter semantics stable.
|
|
5584
|
+
*/
|
|
5554
5585
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
5555
5586
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
5556
5587
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -7717,6 +7748,11 @@ declare class DidService {
|
|
|
7717
7748
|
message: string;
|
|
7718
7749
|
values?: Record<string, unknown>;
|
|
7719
7750
|
} | undefined;
|
|
7751
|
+
/**
|
|
7752
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
7753
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
7754
|
+
* accessor name and its getter/setter semantics stable.
|
|
7755
|
+
*/
|
|
7720
7756
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
7721
7757
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
7722
7758
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -7953,6 +7989,11 @@ declare class DataIntegrityProof {
|
|
|
7953
7989
|
message: string;
|
|
7954
7990
|
values?: Record<string, unknown>;
|
|
7955
7991
|
} | undefined;
|
|
7992
|
+
/**
|
|
7993
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
7994
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
7995
|
+
* accessor name and its getter/setter semantics stable.
|
|
7996
|
+
*/
|
|
7956
7997
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
7957
7998
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
7958
7999
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -8132,6 +8173,11 @@ declare class CryptographicKey {
|
|
|
8132
8173
|
message: string;
|
|
8133
8174
|
values?: Record<string, unknown>;
|
|
8134
8175
|
} | undefined;
|
|
8176
|
+
/**
|
|
8177
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
8178
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
8179
|
+
* accessor name and its getter/setter semantics stable.
|
|
8180
|
+
*/
|
|
8135
8181
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
8136
8182
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
8137
8183
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -8290,6 +8336,11 @@ declare class Multikey {
|
|
|
8290
8336
|
message: string;
|
|
8291
8337
|
values?: Record<string, unknown>;
|
|
8292
8338
|
} | undefined;
|
|
8339
|
+
/**
|
|
8340
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
8341
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
8342
|
+
* accessor name and its getter/setter semantics stable.
|
|
8343
|
+
*/
|
|
8293
8344
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
8294
8345
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
8295
8346
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -8688,6 +8739,11 @@ declare class Commitment {
|
|
|
8688
8739
|
message: string;
|
|
8689
8740
|
values?: Record<string, unknown>;
|
|
8690
8741
|
} | undefined;
|
|
8742
|
+
/**
|
|
8743
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
8744
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
8745
|
+
* accessor name and its getter/setter semantics stable.
|
|
8746
|
+
*/
|
|
8691
8747
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
8692
8748
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
8693
8749
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -8823,6 +8879,11 @@ declare class Intent {
|
|
|
8823
8879
|
message: string;
|
|
8824
8880
|
values?: Record<string, unknown>;
|
|
8825
8881
|
} | undefined;
|
|
8882
|
+
/**
|
|
8883
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
8884
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
8885
|
+
* accessor name and its getter/setter semantics stable.
|
|
8886
|
+
*/
|
|
8826
8887
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
8827
8888
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
8828
8889
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -13600,6 +13661,11 @@ declare class Endpoints {
|
|
|
13600
13661
|
message: string;
|
|
13601
13662
|
values?: Record<string, unknown>;
|
|
13602
13663
|
} | undefined;
|
|
13664
|
+
/**
|
|
13665
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
13666
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
13667
|
+
* accessor name and its getter/setter semantics stable.
|
|
13668
|
+
*/
|
|
13603
13669
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
13604
13670
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
13605
13671
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -15416,6 +15482,11 @@ declare class Link {
|
|
|
15416
15482
|
message: string;
|
|
15417
15483
|
values?: Record<string, unknown>;
|
|
15418
15484
|
} | undefined;
|
|
15485
|
+
/**
|
|
15486
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
15487
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
15488
|
+
* accessor name and its getter/setter semantics stable.
|
|
15489
|
+
*/
|
|
15419
15490
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
15420
15491
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
15421
15492
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -23391,6 +23462,11 @@ declare class Source {
|
|
|
23391
23462
|
message: string;
|
|
23392
23463
|
values?: Record<string, unknown>;
|
|
23393
23464
|
} | undefined;
|
|
23465
|
+
/**
|
|
23466
|
+
* Internal cross-package contract with @fedify/testing, which copies this
|
|
23467
|
+
* cache when attaching document loaders to an activity clone. Keep this
|
|
23468
|
+
* accessor name and its getter/setter semantics stable.
|
|
23469
|
+
*/
|
|
23394
23470
|
protected get _cachedJsonLd(): unknown | undefined;
|
|
23395
23471
|
protected set _cachedJsonLd(value: unknown | undefined);
|
|
23396
23472
|
protected get _baseUrl(): URL | undefined;
|
|
@@ -25673,6 +25749,34 @@ type ObjectLookupKind = "actor" | "object" | "other";
|
|
|
25673
25749
|
*
|
|
25674
25750
|
* @since 0.2.0
|
|
25675
25751
|
*/
|
|
25752
|
+
/**
|
|
25753
|
+
* The key of the {@link LookupObjectOptions} property that observes how
|
|
25754
|
+
* {@link lookupObject} selects the object it returns.
|
|
25755
|
+
*
|
|
25756
|
+
* @internal Technically exported for other Fedify packages, but not part of
|
|
25757
|
+
* the public API contract. This is not considered public API for Semantic
|
|
25758
|
+
* Versioning decisions.
|
|
25759
|
+
*/
|
|
25760
|
+
declare const lookupObserver: unique symbol;
|
|
25761
|
+
/**
|
|
25762
|
+
* Observes how {@link lookupObject} selects the object it returns: each
|
|
25763
|
+
* candidate is offered to {@link DereferenceObserver.accept} at the boundary
|
|
25764
|
+
* that would otherwise return it, both for ordinary documents and for
|
|
25765
|
+
* FEP-ef61 portable objects, and each failure that does not propagate is
|
|
25766
|
+
* reported to {@link DereferenceObserver.failed}. The observer is not passed
|
|
25767
|
+
* on to the returned object.
|
|
25768
|
+
*
|
|
25769
|
+
* @internal Technically exported for other Fedify packages, but not part of
|
|
25770
|
+
* the public API contract. This is not considered public API for Semantic
|
|
25771
|
+
* Versioning decisions.
|
|
25772
|
+
*/
|
|
25773
|
+
interface LookupObserver extends DereferenceObserver<Object$1> {
|
|
25774
|
+
/**
|
|
25775
|
+
* Whether to fall back to WebFinger when an HTTP(S) URL cannot be fetched.
|
|
25776
|
+
* Defaults to `true`.
|
|
25777
|
+
*/
|
|
25778
|
+
readonly webFinger?: boolean;
|
|
25779
|
+
}
|
|
25676
25780
|
interface LookupObjectOptions {
|
|
25677
25781
|
/**
|
|
25678
25782
|
* The document loader for loading remote JSON-LD documents.
|
|
@@ -25768,6 +25872,11 @@ interface LookupObjectOptions {
|
|
|
25768
25872
|
* @since 2.4.0
|
|
25769
25873
|
*/
|
|
25770
25874
|
verifyPortableObject?: PortableObjectVerifier$1;
|
|
25875
|
+
/**
|
|
25876
|
+
* See {@link LookupObserver}.
|
|
25877
|
+
* @internal
|
|
25878
|
+
*/
|
|
25879
|
+
[lookupObserver]?: LookupObserver;
|
|
25771
25880
|
}
|
|
25772
25881
|
/**
|
|
25773
25882
|
* Looks up an ActivityStreams object by its URI (including `acct:` URIs)
|
|
@@ -25992,4 +26101,4 @@ declare function getTypeId(object: Object$1 | Link | null): URL | null;
|
|
|
25992
26101
|
*/
|
|
25993
26102
|
declare function getTypeId(object: Object$1 | Link | null | undefined): URL | null | undefined;
|
|
25994
26103
|
//#endregion
|
|
25995
|
-
export { $EntityType, Accept, Activity, Actor, ActorDiscoveryResult, ActorTypeName, Add, Agreement, Announce, AnnounceAuthorization, AnnounceRequest, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Commitment, Create, CryptographicKey, DataIntegrityProof, type Decimal, Delete, DidService, Dislike, Document, type DocumentLoader, type DocumentLoaderOptions, Emoji, EmojiReact, Endpoints, Event, Export, FeatureAuthorization, FeatureRequest, FeaturedCollection, FeaturedItem, FediverseHandle, Flag, Follow, GetActorHandleOptions, type GetUserAgentOptions, Group, Hashtag, Ignore, Image, Intent, InteractionPolicy, InteractionRule, IntransitiveActivity, Invite, Join, type Json, LanguageString, Leave, Like, LikeAuthorization, LikeRequest, Link, Listen, LookupObjectOptions, Measure, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectLookupKind, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, Profile, type PropertyPreprocessor, type PropertyPreprocessorContext, PropertyValue, Proposal, Question, QuoteAuthorization, QuoteRequest, Read, Recipient, Reject, Relationship, type RemoteDocument, Remove, ReplyAuthorization, ReplyRequest, Service, Source, TentativeAccept, TentativeReject, Tombstone, Translation, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getEntityTypeById, getTypeId, isActor, isEntityType, isFediverseHandle, lookupObject, normalizeActorHandle, normalizeLinkToImage, parseFediverseHandle, toAcctUrl, traverseCollection };
|
|
26104
|
+
export { $EntityType, Accept, Activity, Actor, ActorDiscoveryResult, ActorTypeName, Add, Agreement, Announce, AnnounceAuthorization, AnnounceRequest, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Commitment, Create, CryptographicKey, DataIntegrityProof, type Decimal, Delete, DidService, Dislike, Document, type DocumentLoader, type DocumentLoaderOptions, Emoji, EmojiReact, Endpoints, Event, Export, FeatureAuthorization, FeatureRequest, FeaturedCollection, FeaturedItem, FediverseHandle, Flag, Follow, GetActorHandleOptions, type GetUserAgentOptions, Group, Hashtag, Ignore, Image, Intent, InteractionPolicy, InteractionRule, IntransitiveActivity, Invite, Join, type Json, LanguageString, Leave, Like, LikeAuthorization, LikeRequest, Link, Listen, LookupObjectOptions, LookupObserver, Measure, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectLookupKind, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, Profile, type PropertyPreprocessor, type PropertyPreprocessorContext, PropertyValue, Proposal, Question, QuoteAuthorization, QuoteRequest, Read, Recipient, Reject, Relationship, type RemoteDocument, Remove, ReplyAuthorization, ReplyRequest, Service, Source, TentativeAccept, TentativeReject, Tombstone, Translation, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getEntityTypeById, getTypeId, isActor, isEntityType, isFediverseHandle, lookupObject, lookupObserver, normalizeActorHandle, normalizeLinkToImage, parseFediverseHandle, toAcctUrl, traverseCollection };
|