@fedify/vocab 2.3.15-dev.2482 → 2.3.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab",
3
- "version": "2.3.15-dev.2482+41d364a2",
3
+ "version": "2.3.15",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts"
package/dist/mod.cjs CHANGED
@@ -33,7 +33,7 @@ let _fedify_vocab_runtime_temporal = require("@fedify/vocab-runtime/temporal");
33
33
  let es_toolkit = require("es-toolkit");
34
34
  //#region deno.json
35
35
  var name = "@fedify/vocab";
36
- var version = "2.3.15-dev.2482+41d364a2";
36
+ var version = "2.3.15";
37
37
  //#endregion
38
38
  //#region src/type.ts
39
39
  function getTypeId(object) {
@@ -116,6 +116,11 @@ var Object$1 = class Object$1 {
116
116
  get _warning() {
117
117
  return this.#warning;
118
118
  }
119
+ /**
120
+ * Internal cross-package contract with @fedify/testing, which copies this
121
+ * cache when attaching document loaders to an activity clone. Keep this
122
+ * accessor name and its getter/setter semantics stable.
123
+ */
119
124
  get _cachedJsonLd() {
120
125
  return this.#cachedJsonLd;
121
126
  }
@@ -9879,6 +9884,11 @@ var PropertyValue = class {
9879
9884
  get _warning() {
9880
9885
  return this.#warning;
9881
9886
  }
9887
+ /**
9888
+ * Internal cross-package contract with @fedify/testing, which copies this
9889
+ * cache when attaching document loaders to an activity clone. Keep this
9890
+ * accessor name and its getter/setter semantics stable.
9891
+ */
9882
9892
  get _cachedJsonLd() {
9883
9893
  return this.#cachedJsonLd;
9884
9894
  }
@@ -10183,6 +10193,11 @@ var Measure = class {
10183
10193
  get _warning() {
10184
10194
  return this.#warning;
10185
10195
  }
10196
+ /**
10197
+ * Internal cross-package contract with @fedify/testing, which copies this
10198
+ * cache when attaching document loaders to an activity clone. Keep this
10199
+ * accessor name and its getter/setter semantics stable.
10200
+ */
10186
10201
  get _cachedJsonLd() {
10187
10202
  return this.#cachedJsonLd;
10188
10203
  }
@@ -11196,6 +11211,11 @@ var InteractionPolicy = class {
11196
11211
  get _warning() {
11197
11212
  return this.#warning;
11198
11213
  }
11214
+ /**
11215
+ * Internal cross-package contract with @fedify/testing, which copies this
11216
+ * cache when attaching document loaders to an activity clone. Keep this
11217
+ * accessor name and its getter/setter semantics stable.
11218
+ */
11199
11219
  get _cachedJsonLd() {
11200
11220
  return this.#cachedJsonLd;
11201
11221
  }
@@ -11577,6 +11597,11 @@ var InteractionRule = class {
11577
11597
  get _warning() {
11578
11598
  return this.#warning;
11579
11599
  }
11600
+ /**
11601
+ * Internal cross-package contract with @fedify/testing, which copies this
11602
+ * cache when attaching document loaders to an activity clone. Keep this
11603
+ * accessor name and its getter/setter semantics stable.
11604
+ */
11580
11605
  get _cachedJsonLd() {
11581
11606
  return this.#cachedJsonLd;
11582
11607
  }
@@ -14041,6 +14066,11 @@ var DidService = class {
14041
14066
  get _warning() {
14042
14067
  return this.#warning;
14043
14068
  }
14069
+ /**
14070
+ * Internal cross-package contract with @fedify/testing, which copies this
14071
+ * cache when attaching document loaders to an activity clone. Keep this
14072
+ * accessor name and its getter/setter semantics stable.
14073
+ */
14044
14074
  get _cachedJsonLd() {
14045
14075
  return this.#cachedJsonLd;
14046
14076
  }
@@ -14431,6 +14461,11 @@ var DataIntegrityProof = class {
14431
14461
  get _warning() {
14432
14462
  return this.#warning;
14433
14463
  }
14464
+ /**
14465
+ * Internal cross-package contract with @fedify/testing, which copies this
14466
+ * cache when attaching document loaders to an activity clone. Keep this
14467
+ * accessor name and its getter/setter semantics stable.
14468
+ */
14434
14469
  get _cachedJsonLd() {
14435
14470
  return this.#cachedJsonLd;
14436
14471
  }
@@ -14942,6 +14977,11 @@ var CryptographicKey = class {
14942
14977
  get _warning() {
14943
14978
  return this.#warning;
14944
14979
  }
14980
+ /**
14981
+ * Internal cross-package contract with @fedify/testing, which copies this
14982
+ * cache when attaching document loaders to an activity clone. Keep this
14983
+ * accessor name and its getter/setter semantics stable.
14984
+ */
14945
14985
  get _cachedJsonLd() {
14946
14986
  return this.#cachedJsonLd;
14947
14987
  }
@@ -15444,6 +15484,11 @@ var Multikey = class {
15444
15484
  get _warning() {
15445
15485
  return this.#warning;
15446
15486
  }
15487
+ /**
15488
+ * Internal cross-package contract with @fedify/testing, which copies this
15489
+ * cache when attaching document loaders to an activity clone. Keep this
15490
+ * accessor name and its getter/setter semantics stable.
15491
+ */
15447
15492
  get _cachedJsonLd() {
15448
15493
  return this.#cachedJsonLd;
15449
15494
  }
@@ -16278,6 +16323,11 @@ var Commitment = class {
16278
16323
  get _warning() {
16279
16324
  return this.#warning;
16280
16325
  }
16326
+ /**
16327
+ * Internal cross-package contract with @fedify/testing, which copies this
16328
+ * cache when attaching document loaders to an activity clone. Keep this
16329
+ * accessor name and its getter/setter semantics stable.
16330
+ */
16281
16331
  get _cachedJsonLd() {
16282
16332
  return this.#cachedJsonLd;
16283
16333
  }
@@ -16596,6 +16646,11 @@ var Intent = class {
16596
16646
  get _warning() {
16597
16647
  return this.#warning;
16598
16648
  }
16649
+ /**
16650
+ * Internal cross-package contract with @fedify/testing, which copies this
16651
+ * cache when attaching document loaders to an activity clone. Keep this
16652
+ * accessor name and its getter/setter semantics stable.
16653
+ */
16599
16654
  get _cachedJsonLd() {
16600
16655
  return this.#cachedJsonLd;
16601
16656
  }
@@ -27203,6 +27258,11 @@ var Endpoints = class {
27203
27258
  get _warning() {
27204
27259
  return this.#warning;
27205
27260
  }
27261
+ /**
27262
+ * Internal cross-package contract with @fedify/testing, which copies this
27263
+ * cache when attaching document loaders to an activity clone. Keep this
27264
+ * accessor name and its getter/setter semantics stable.
27265
+ */
27206
27266
  get _cachedJsonLd() {
27207
27267
  return this.#cachedJsonLd;
27208
27268
  }
@@ -31782,6 +31842,11 @@ var Link = class Link {
31782
31842
  get _warning() {
31783
31843
  return this.#warning;
31784
31844
  }
31845
+ /**
31846
+ * Internal cross-package contract with @fedify/testing, which copies this
31847
+ * cache when attaching document loaders to an activity clone. Keep this
31848
+ * accessor name and its getter/setter semantics stable.
31849
+ */
31785
31850
  get _cachedJsonLd() {
31786
31851
  return this.#cachedJsonLd;
31787
31852
  }
@@ -50096,6 +50161,11 @@ var Source = class {
50096
50161
  get _warning() {
50097
50162
  return this.#warning;
50098
50163
  }
50164
+ /**
50165
+ * Internal cross-package contract with @fedify/testing, which copies this
50166
+ * cache when attaching document loaders to an activity clone. Keep this
50167
+ * accessor name and its getter/setter semantics stable.
50168
+ */
50099
50169
  get _cachedJsonLd() {
50100
50170
  return this.#cachedJsonLd;
50101
50171
  }
package/dist/mod.d.cts CHANGED
@@ -20,6 +20,11 @@ declare class Object$1 {
20
20
  message: string;
21
21
  values?: Record<string, unknown>;
22
22
  } | undefined;
23
+ /**
24
+ * Internal cross-package contract with @fedify/testing, which copies this
25
+ * cache when attaching document loaders to an activity clone. Keep this
26
+ * accessor name and its getter/setter semantics stable.
27
+ */
23
28
  protected get _cachedJsonLd(): unknown | undefined;
24
29
  protected set _cachedJsonLd(value: unknown | undefined);
25
30
  protected get _baseUrl(): URL | undefined;
@@ -1925,6 +1930,11 @@ declare class PropertyValue {
1925
1930
  message: string;
1926
1931
  values?: Record<string, unknown>;
1927
1932
  } | undefined;
1933
+ /**
1934
+ * Internal cross-package contract with @fedify/testing, which copies this
1935
+ * cache when attaching document loaders to an activity clone. Keep this
1936
+ * accessor name and its getter/setter semantics stable.
1937
+ */
1928
1938
  protected get _cachedJsonLd(): unknown | undefined;
1929
1939
  protected set _cachedJsonLd(value: unknown | undefined);
1930
1940
  protected get _baseUrl(): URL | undefined;
@@ -2024,6 +2034,11 @@ declare class Measure {
2024
2034
  message: string;
2025
2035
  values?: Record<string, unknown>;
2026
2036
  } | undefined;
2037
+ /**
2038
+ * Internal cross-package contract with @fedify/testing, which copies this
2039
+ * cache when attaching document loaders to an activity clone. Keep this
2040
+ * accessor name and its getter/setter semantics stable.
2041
+ */
2027
2042
  protected get _cachedJsonLd(): unknown | undefined;
2028
2043
  protected set _cachedJsonLd(value: unknown | undefined);
2029
2044
  protected get _baseUrl(): URL | undefined;
@@ -2567,6 +2582,11 @@ declare class InteractionPolicy {
2567
2582
  message: string;
2568
2583
  values?: Record<string, unknown>;
2569
2584
  } | undefined;
2585
+ /**
2586
+ * Internal cross-package contract with @fedify/testing, which copies this
2587
+ * cache when attaching document loaders to an activity clone. Keep this
2588
+ * accessor name and its getter/setter semantics stable.
2589
+ */
2570
2590
  protected get _cachedJsonLd(): unknown | undefined;
2571
2591
  protected set _cachedJsonLd(value: unknown | undefined);
2572
2592
  protected get _baseUrl(): URL | undefined;
@@ -2705,6 +2725,11 @@ declare class InteractionRule {
2705
2725
  message: string;
2706
2726
  values?: Record<string, unknown>;
2707
2727
  } | undefined;
2728
+ /**
2729
+ * Internal cross-package contract with @fedify/testing, which copies this
2730
+ * cache when attaching document loaders to an activity clone. Keep this
2731
+ * accessor name and its getter/setter semantics stable.
2732
+ */
2708
2733
  protected get _cachedJsonLd(): unknown | undefined;
2709
2734
  protected set _cachedJsonLd(value: unknown | undefined);
2710
2735
  protected get _baseUrl(): URL | undefined;
@@ -4124,6 +4149,11 @@ declare class DidService {
4124
4149
  message: string;
4125
4150
  values?: Record<string, unknown>;
4126
4151
  } | undefined;
4152
+ /**
4153
+ * Internal cross-package contract with @fedify/testing, which copies this
4154
+ * cache when attaching document loaders to an activity clone. Keep this
4155
+ * accessor name and its getter/setter semantics stable.
4156
+ */
4127
4157
  protected get _cachedJsonLd(): unknown | undefined;
4128
4158
  protected set _cachedJsonLd(value: unknown | undefined);
4129
4159
  protected get _baseUrl(): URL | undefined;
@@ -4303,6 +4333,11 @@ declare class DataIntegrityProof {
4303
4333
  message: string;
4304
4334
  values?: Record<string, unknown>;
4305
4335
  } | undefined;
4336
+ /**
4337
+ * Internal cross-package contract with @fedify/testing, which copies this
4338
+ * cache when attaching document loaders to an activity clone. Keep this
4339
+ * accessor name and its getter/setter semantics stable.
4340
+ */
4306
4341
  protected get _cachedJsonLd(): unknown | undefined;
4307
4342
  protected set _cachedJsonLd(value: unknown | undefined);
4308
4343
  protected get _baseUrl(): URL | undefined;
@@ -4438,6 +4473,11 @@ declare class CryptographicKey {
4438
4473
  message: string;
4439
4474
  values?: Record<string, unknown>;
4440
4475
  } | undefined;
4476
+ /**
4477
+ * Internal cross-package contract with @fedify/testing, which copies this
4478
+ * cache when attaching document loaders to an activity clone. Keep this
4479
+ * accessor name and its getter/setter semantics stable.
4480
+ */
4441
4481
  protected get _cachedJsonLd(): unknown | undefined;
4442
4482
  protected set _cachedJsonLd(value: unknown | undefined);
4443
4483
  protected get _baseUrl(): URL | undefined;
@@ -4552,6 +4592,11 @@ declare class Multikey {
4552
4592
  message: string;
4553
4593
  values?: Record<string, unknown>;
4554
4594
  } | undefined;
4595
+ /**
4596
+ * Internal cross-package contract with @fedify/testing, which copies this
4597
+ * cache when attaching document loaders to an activity clone. Keep this
4598
+ * accessor name and its getter/setter semantics stable.
4599
+ */
4555
4600
  protected get _cachedJsonLd(): unknown | undefined;
4556
4601
  protected set _cachedJsonLd(value: unknown | undefined);
4557
4602
  protected get _baseUrl(): URL | undefined;
@@ -4874,6 +4919,11 @@ declare class Commitment {
4874
4919
  message: string;
4875
4920
  values?: Record<string, unknown>;
4876
4921
  } | undefined;
4922
+ /**
4923
+ * Internal cross-package contract with @fedify/testing, which copies this
4924
+ * cache when attaching document loaders to an activity clone. Keep this
4925
+ * accessor name and its getter/setter semantics stable.
4926
+ */
4877
4927
  protected get _cachedJsonLd(): unknown | undefined;
4878
4928
  protected set _cachedJsonLd(value: unknown | undefined);
4879
4929
  protected get _baseUrl(): URL | undefined;
@@ -4980,6 +5030,11 @@ declare class Intent {
4980
5030
  message: string;
4981
5031
  values?: Record<string, unknown>;
4982
5032
  } | undefined;
5033
+ /**
5034
+ * Internal cross-package contract with @fedify/testing, which copies this
5035
+ * cache when attaching document loaders to an activity clone. Keep this
5036
+ * accessor name and its getter/setter semantics stable.
5037
+ */
4983
5038
  protected get _cachedJsonLd(): unknown | undefined;
4984
5039
  protected set _cachedJsonLd(value: unknown | undefined);
4985
5040
  protected get _baseUrl(): URL | undefined;
@@ -9217,6 +9272,11 @@ declare class Endpoints {
9217
9272
  message: string;
9218
9273
  values?: Record<string, unknown>;
9219
9274
  } | undefined;
9275
+ /**
9276
+ * Internal cross-package contract with @fedify/testing, which copies this
9277
+ * cache when attaching document loaders to an activity clone. Keep this
9278
+ * accessor name and its getter/setter semantics stable.
9279
+ */
9220
9280
  protected get _cachedJsonLd(): unknown | undefined;
9221
9281
  protected set _cachedJsonLd(value: unknown | undefined);
9222
9282
  protected get _baseUrl(): URL | undefined;
@@ -10553,6 +10613,11 @@ declare class Link {
10553
10613
  message: string;
10554
10614
  values?: Record<string, unknown>;
10555
10615
  } | undefined;
10616
+ /**
10617
+ * Internal cross-package contract with @fedify/testing, which copies this
10618
+ * cache when attaching document loaders to an activity clone. Keep this
10619
+ * accessor name and its getter/setter semantics stable.
10620
+ */
10556
10621
  protected get _cachedJsonLd(): unknown | undefined;
10557
10622
  protected set _cachedJsonLd(value: unknown | undefined);
10558
10623
  protected get _baseUrl(): URL | undefined;
@@ -16810,6 +16875,11 @@ declare class Source {
16810
16875
  message: string;
16811
16876
  values?: Record<string, unknown>;
16812
16877
  } | undefined;
16878
+ /**
16879
+ * Internal cross-package contract with @fedify/testing, which copies this
16880
+ * cache when attaching document loaders to an activity clone. Keep this
16881
+ * accessor name and its getter/setter semantics stable.
16882
+ */
16813
16883
  protected get _cachedJsonLd(): unknown | undefined;
16814
16884
  protected set _cachedJsonLd(value: unknown | undefined);
16815
16885
  protected get _baseUrl(): URL | undefined;
package/dist/mod.d.ts CHANGED
@@ -20,6 +20,11 @@ declare class Object$1 {
20
20
  message: string;
21
21
  values?: Record<string, unknown>;
22
22
  } | undefined;
23
+ /**
24
+ * Internal cross-package contract with @fedify/testing, which copies this
25
+ * cache when attaching document loaders to an activity clone. Keep this
26
+ * accessor name and its getter/setter semantics stable.
27
+ */
23
28
  protected get _cachedJsonLd(): unknown | undefined;
24
29
  protected set _cachedJsonLd(value: unknown | undefined);
25
30
  protected get _baseUrl(): URL | undefined;
@@ -1925,6 +1930,11 @@ declare class PropertyValue {
1925
1930
  message: string;
1926
1931
  values?: Record<string, unknown>;
1927
1932
  } | undefined;
1933
+ /**
1934
+ * Internal cross-package contract with @fedify/testing, which copies this
1935
+ * cache when attaching document loaders to an activity clone. Keep this
1936
+ * accessor name and its getter/setter semantics stable.
1937
+ */
1928
1938
  protected get _cachedJsonLd(): unknown | undefined;
1929
1939
  protected set _cachedJsonLd(value: unknown | undefined);
1930
1940
  protected get _baseUrl(): URL | undefined;
@@ -2024,6 +2034,11 @@ declare class Measure {
2024
2034
  message: string;
2025
2035
  values?: Record<string, unknown>;
2026
2036
  } | undefined;
2037
+ /**
2038
+ * Internal cross-package contract with @fedify/testing, which copies this
2039
+ * cache when attaching document loaders to an activity clone. Keep this
2040
+ * accessor name and its getter/setter semantics stable.
2041
+ */
2027
2042
  protected get _cachedJsonLd(): unknown | undefined;
2028
2043
  protected set _cachedJsonLd(value: unknown | undefined);
2029
2044
  protected get _baseUrl(): URL | undefined;
@@ -2567,6 +2582,11 @@ declare class InteractionPolicy {
2567
2582
  message: string;
2568
2583
  values?: Record<string, unknown>;
2569
2584
  } | undefined;
2585
+ /**
2586
+ * Internal cross-package contract with @fedify/testing, which copies this
2587
+ * cache when attaching document loaders to an activity clone. Keep this
2588
+ * accessor name and its getter/setter semantics stable.
2589
+ */
2570
2590
  protected get _cachedJsonLd(): unknown | undefined;
2571
2591
  protected set _cachedJsonLd(value: unknown | undefined);
2572
2592
  protected get _baseUrl(): URL | undefined;
@@ -2705,6 +2725,11 @@ declare class InteractionRule {
2705
2725
  message: string;
2706
2726
  values?: Record<string, unknown>;
2707
2727
  } | undefined;
2728
+ /**
2729
+ * Internal cross-package contract with @fedify/testing, which copies this
2730
+ * cache when attaching document loaders to an activity clone. Keep this
2731
+ * accessor name and its getter/setter semantics stable.
2732
+ */
2708
2733
  protected get _cachedJsonLd(): unknown | undefined;
2709
2734
  protected set _cachedJsonLd(value: unknown | undefined);
2710
2735
  protected get _baseUrl(): URL | undefined;
@@ -4124,6 +4149,11 @@ declare class DidService {
4124
4149
  message: string;
4125
4150
  values?: Record<string, unknown>;
4126
4151
  } | undefined;
4152
+ /**
4153
+ * Internal cross-package contract with @fedify/testing, which copies this
4154
+ * cache when attaching document loaders to an activity clone. Keep this
4155
+ * accessor name and its getter/setter semantics stable.
4156
+ */
4127
4157
  protected get _cachedJsonLd(): unknown | undefined;
4128
4158
  protected set _cachedJsonLd(value: unknown | undefined);
4129
4159
  protected get _baseUrl(): URL | undefined;
@@ -4303,6 +4333,11 @@ declare class DataIntegrityProof {
4303
4333
  message: string;
4304
4334
  values?: Record<string, unknown>;
4305
4335
  } | undefined;
4336
+ /**
4337
+ * Internal cross-package contract with @fedify/testing, which copies this
4338
+ * cache when attaching document loaders to an activity clone. Keep this
4339
+ * accessor name and its getter/setter semantics stable.
4340
+ */
4306
4341
  protected get _cachedJsonLd(): unknown | undefined;
4307
4342
  protected set _cachedJsonLd(value: unknown | undefined);
4308
4343
  protected get _baseUrl(): URL | undefined;
@@ -4438,6 +4473,11 @@ declare class CryptographicKey {
4438
4473
  message: string;
4439
4474
  values?: Record<string, unknown>;
4440
4475
  } | undefined;
4476
+ /**
4477
+ * Internal cross-package contract with @fedify/testing, which copies this
4478
+ * cache when attaching document loaders to an activity clone. Keep this
4479
+ * accessor name and its getter/setter semantics stable.
4480
+ */
4441
4481
  protected get _cachedJsonLd(): unknown | undefined;
4442
4482
  protected set _cachedJsonLd(value: unknown | undefined);
4443
4483
  protected get _baseUrl(): URL | undefined;
@@ -4552,6 +4592,11 @@ declare class Multikey {
4552
4592
  message: string;
4553
4593
  values?: Record<string, unknown>;
4554
4594
  } | undefined;
4595
+ /**
4596
+ * Internal cross-package contract with @fedify/testing, which copies this
4597
+ * cache when attaching document loaders to an activity clone. Keep this
4598
+ * accessor name and its getter/setter semantics stable.
4599
+ */
4555
4600
  protected get _cachedJsonLd(): unknown | undefined;
4556
4601
  protected set _cachedJsonLd(value: unknown | undefined);
4557
4602
  protected get _baseUrl(): URL | undefined;
@@ -4874,6 +4919,11 @@ declare class Commitment {
4874
4919
  message: string;
4875
4920
  values?: Record<string, unknown>;
4876
4921
  } | undefined;
4922
+ /**
4923
+ * Internal cross-package contract with @fedify/testing, which copies this
4924
+ * cache when attaching document loaders to an activity clone. Keep this
4925
+ * accessor name and its getter/setter semantics stable.
4926
+ */
4877
4927
  protected get _cachedJsonLd(): unknown | undefined;
4878
4928
  protected set _cachedJsonLd(value: unknown | undefined);
4879
4929
  protected get _baseUrl(): URL | undefined;
@@ -4980,6 +5030,11 @@ declare class Intent {
4980
5030
  message: string;
4981
5031
  values?: Record<string, unknown>;
4982
5032
  } | undefined;
5033
+ /**
5034
+ * Internal cross-package contract with @fedify/testing, which copies this
5035
+ * cache when attaching document loaders to an activity clone. Keep this
5036
+ * accessor name and its getter/setter semantics stable.
5037
+ */
4983
5038
  protected get _cachedJsonLd(): unknown | undefined;
4984
5039
  protected set _cachedJsonLd(value: unknown | undefined);
4985
5040
  protected get _baseUrl(): URL | undefined;
@@ -9217,6 +9272,11 @@ declare class Endpoints {
9217
9272
  message: string;
9218
9273
  values?: Record<string, unknown>;
9219
9274
  } | undefined;
9275
+ /**
9276
+ * Internal cross-package contract with @fedify/testing, which copies this
9277
+ * cache when attaching document loaders to an activity clone. Keep this
9278
+ * accessor name and its getter/setter semantics stable.
9279
+ */
9220
9280
  protected get _cachedJsonLd(): unknown | undefined;
9221
9281
  protected set _cachedJsonLd(value: unknown | undefined);
9222
9282
  protected get _baseUrl(): URL | undefined;
@@ -10553,6 +10613,11 @@ declare class Link {
10553
10613
  message: string;
10554
10614
  values?: Record<string, unknown>;
10555
10615
  } | undefined;
10616
+ /**
10617
+ * Internal cross-package contract with @fedify/testing, which copies this
10618
+ * cache when attaching document loaders to an activity clone. Keep this
10619
+ * accessor name and its getter/setter semantics stable.
10620
+ */
10556
10621
  protected get _cachedJsonLd(): unknown | undefined;
10557
10622
  protected set _cachedJsonLd(value: unknown | undefined);
10558
10623
  protected get _baseUrl(): URL | undefined;
@@ -16810,6 +16875,11 @@ declare class Source {
16810
16875
  message: string;
16811
16876
  values?: Record<string, unknown>;
16812
16877
  } | undefined;
16878
+ /**
16879
+ * Internal cross-package contract with @fedify/testing, which copies this
16880
+ * cache when attaching document loaders to an activity clone. Keep this
16881
+ * accessor name and its getter/setter semantics stable.
16882
+ */
16813
16883
  protected get _cachedJsonLd(): unknown | undefined;
16814
16884
  protected set _cachedJsonLd(value: unknown | undefined);
16815
16885
  protected get _baseUrl(): URL | undefined;
package/dist/mod.js CHANGED
@@ -9,7 +9,7 @@ import { isTemporalDuration, isTemporalInstant } from "@fedify/vocab-runtime/tem
9
9
  import { delay } from "es-toolkit";
10
10
  //#region deno.json
11
11
  var name = "@fedify/vocab";
12
- var version = "2.3.15-dev.2482+41d364a2";
12
+ var version = "2.3.15";
13
13
  //#endregion
14
14
  //#region src/type.ts
15
15
  function getTypeId(object) {
@@ -92,6 +92,11 @@ var Object$1 = class Object$1 {
92
92
  get _warning() {
93
93
  return this.#warning;
94
94
  }
95
+ /**
96
+ * Internal cross-package contract with @fedify/testing, which copies this
97
+ * cache when attaching document loaders to an activity clone. Keep this
98
+ * accessor name and its getter/setter semantics stable.
99
+ */
95
100
  get _cachedJsonLd() {
96
101
  return this.#cachedJsonLd;
97
102
  }
@@ -9855,6 +9860,11 @@ var PropertyValue = class {
9855
9860
  get _warning() {
9856
9861
  return this.#warning;
9857
9862
  }
9863
+ /**
9864
+ * Internal cross-package contract with @fedify/testing, which copies this
9865
+ * cache when attaching document loaders to an activity clone. Keep this
9866
+ * accessor name and its getter/setter semantics stable.
9867
+ */
9858
9868
  get _cachedJsonLd() {
9859
9869
  return this.#cachedJsonLd;
9860
9870
  }
@@ -10159,6 +10169,11 @@ var Measure = class {
10159
10169
  get _warning() {
10160
10170
  return this.#warning;
10161
10171
  }
10172
+ /**
10173
+ * Internal cross-package contract with @fedify/testing, which copies this
10174
+ * cache when attaching document loaders to an activity clone. Keep this
10175
+ * accessor name and its getter/setter semantics stable.
10176
+ */
10162
10177
  get _cachedJsonLd() {
10163
10178
  return this.#cachedJsonLd;
10164
10179
  }
@@ -11172,6 +11187,11 @@ var InteractionPolicy = class {
11172
11187
  get _warning() {
11173
11188
  return this.#warning;
11174
11189
  }
11190
+ /**
11191
+ * Internal cross-package contract with @fedify/testing, which copies this
11192
+ * cache when attaching document loaders to an activity clone. Keep this
11193
+ * accessor name and its getter/setter semantics stable.
11194
+ */
11175
11195
  get _cachedJsonLd() {
11176
11196
  return this.#cachedJsonLd;
11177
11197
  }
@@ -11553,6 +11573,11 @@ var InteractionRule = class {
11553
11573
  get _warning() {
11554
11574
  return this.#warning;
11555
11575
  }
11576
+ /**
11577
+ * Internal cross-package contract with @fedify/testing, which copies this
11578
+ * cache when attaching document loaders to an activity clone. Keep this
11579
+ * accessor name and its getter/setter semantics stable.
11580
+ */
11556
11581
  get _cachedJsonLd() {
11557
11582
  return this.#cachedJsonLd;
11558
11583
  }
@@ -14017,6 +14042,11 @@ var DidService = class {
14017
14042
  get _warning() {
14018
14043
  return this.#warning;
14019
14044
  }
14045
+ /**
14046
+ * Internal cross-package contract with @fedify/testing, which copies this
14047
+ * cache when attaching document loaders to an activity clone. Keep this
14048
+ * accessor name and its getter/setter semantics stable.
14049
+ */
14020
14050
  get _cachedJsonLd() {
14021
14051
  return this.#cachedJsonLd;
14022
14052
  }
@@ -14407,6 +14437,11 @@ var DataIntegrityProof = class {
14407
14437
  get _warning() {
14408
14438
  return this.#warning;
14409
14439
  }
14440
+ /**
14441
+ * Internal cross-package contract with @fedify/testing, which copies this
14442
+ * cache when attaching document loaders to an activity clone. Keep this
14443
+ * accessor name and its getter/setter semantics stable.
14444
+ */
14410
14445
  get _cachedJsonLd() {
14411
14446
  return this.#cachedJsonLd;
14412
14447
  }
@@ -14918,6 +14953,11 @@ var CryptographicKey = class {
14918
14953
  get _warning() {
14919
14954
  return this.#warning;
14920
14955
  }
14956
+ /**
14957
+ * Internal cross-package contract with @fedify/testing, which copies this
14958
+ * cache when attaching document loaders to an activity clone. Keep this
14959
+ * accessor name and its getter/setter semantics stable.
14960
+ */
14921
14961
  get _cachedJsonLd() {
14922
14962
  return this.#cachedJsonLd;
14923
14963
  }
@@ -15420,6 +15460,11 @@ var Multikey = class {
15420
15460
  get _warning() {
15421
15461
  return this.#warning;
15422
15462
  }
15463
+ /**
15464
+ * Internal cross-package contract with @fedify/testing, which copies this
15465
+ * cache when attaching document loaders to an activity clone. Keep this
15466
+ * accessor name and its getter/setter semantics stable.
15467
+ */
15423
15468
  get _cachedJsonLd() {
15424
15469
  return this.#cachedJsonLd;
15425
15470
  }
@@ -16254,6 +16299,11 @@ var Commitment = class {
16254
16299
  get _warning() {
16255
16300
  return this.#warning;
16256
16301
  }
16302
+ /**
16303
+ * Internal cross-package contract with @fedify/testing, which copies this
16304
+ * cache when attaching document loaders to an activity clone. Keep this
16305
+ * accessor name and its getter/setter semantics stable.
16306
+ */
16257
16307
  get _cachedJsonLd() {
16258
16308
  return this.#cachedJsonLd;
16259
16309
  }
@@ -16572,6 +16622,11 @@ var Intent = class {
16572
16622
  get _warning() {
16573
16623
  return this.#warning;
16574
16624
  }
16625
+ /**
16626
+ * Internal cross-package contract with @fedify/testing, which copies this
16627
+ * cache when attaching document loaders to an activity clone. Keep this
16628
+ * accessor name and its getter/setter semantics stable.
16629
+ */
16575
16630
  get _cachedJsonLd() {
16576
16631
  return this.#cachedJsonLd;
16577
16632
  }
@@ -27179,6 +27234,11 @@ var Endpoints = class {
27179
27234
  get _warning() {
27180
27235
  return this.#warning;
27181
27236
  }
27237
+ /**
27238
+ * Internal cross-package contract with @fedify/testing, which copies this
27239
+ * cache when attaching document loaders to an activity clone. Keep this
27240
+ * accessor name and its getter/setter semantics stable.
27241
+ */
27182
27242
  get _cachedJsonLd() {
27183
27243
  return this.#cachedJsonLd;
27184
27244
  }
@@ -31758,6 +31818,11 @@ var Link = class Link {
31758
31818
  get _warning() {
31759
31819
  return this.#warning;
31760
31820
  }
31821
+ /**
31822
+ * Internal cross-package contract with @fedify/testing, which copies this
31823
+ * cache when attaching document loaders to an activity clone. Keep this
31824
+ * accessor name and its getter/setter semantics stable.
31825
+ */
31761
31826
  get _cachedJsonLd() {
31762
31827
  return this.#cachedJsonLd;
31763
31828
  }
@@ -50072,6 +50137,11 @@ var Source = class {
50072
50137
  get _warning() {
50073
50138
  return this.#warning;
50074
50139
  }
50140
+ /**
50141
+ * Internal cross-package contract with @fedify/testing, which copies this
50142
+ * cache when attaching document loaders to an activity clone. Keep this
50143
+ * accessor name and its getter/setter semantics stable.
50144
+ */
50075
50145
  get _cachedJsonLd() {
50076
50146
  return this.#cachedJsonLd;
50077
50147
  }
@@ -1,6 +1,6 @@
1
1
  import "@js-temporal/polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { B as __commonJSMin, E as Person, H as __toESM, P as Service, T as Organization, a as Application, m as Group } from "./vocab-CDOex_0g.mjs";
3
+ import { B as __commonJSMin, E as Person, H as __toESM, P as Service, T as Organization, a as Application, m as Group } from "./vocab-DHuK2moR.mjs";
4
4
  import { t as getTypeId } from "./type-Cf-vxmre.mjs";
5
5
  import { lookupWebFinger } from "@fedify/webfinger";
6
6
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1206,7 +1206,7 @@ var esm_default = new class FetchMock {
1206
1206
  //#endregion
1207
1207
  //#region deno.json
1208
1208
  var name = "@fedify/vocab";
1209
- var version = "2.3.15-dev.2482+41d364a2";
1209
+ var version = "2.3.15";
1210
1210
  //#endregion
1211
1211
  //#region src/actor.ts
1212
1212
  const ACTOR_DISCOVERY_HISTOGRAM_BUCKETS = [
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { E as Person, P as Service, T as Organization, V as __exportAll, a as Application, m as Group } from "./vocab-CDOex_0g.mjs";
4
- import { a as normalizeActorHandle, c as esm_default, i as isActor, n as getActorHandle, r as getActorTypeName, t as getActorClassByTypeName } from "./actor-CwuPqbu1.mjs";
3
+ import { E as Person, P as Service, T as Organization, V as __exportAll, a as Application, m as Group } from "./vocab-DHuK2moR.mjs";
4
+ import { a as normalizeActorHandle, c as esm_default, i as isActor, n as getActorHandle, r as getActorTypeName, t as getActorClassByTypeName } from "./actor-pD1GaHgZ.mjs";
5
5
  import { createTestMeterProvider, test } from "@fedify/fixture";
6
6
  import { deepStrictEqual, ok, rejects, strictEqual, throws } from "node:assert/strict";
7
7
  //#region ../../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { E as Person, S as Object$1, o as Collection, x as Note } from "./vocab-CDOex_0g.mjs";
4
- import { c as esm_default, i as isActor, o as name, s as version } from "./actor-CwuPqbu1.mjs";
3
+ import { E as Person, S as Object$1, o as Collection, x as Note } from "./vocab-DHuK2moR.mjs";
4
+ import { c as esm_default, i as isActor, o as name, s as version } from "./actor-pD1GaHgZ.mjs";
5
5
  import { t as getTypeId } from "./type-Cf-vxmre.mjs";
6
6
  import { t as assertInstanceOf } from "./utils-CE8Dk5hm.mjs";
7
7
  import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -263,10 +263,12 @@ async function* traverseCollection(collection, options = {}) {
263
263
  }
264
264
  //#endregion
265
265
  //#region src/lookup.test.ts
266
+ const allowPrivateAddress = { allowPrivateAddress: true };
266
267
  test("lookupObject()", {
267
268
  sanitizeResources: false,
268
269
  sanitizeOps: false
269
270
  }, async (t) => {
271
+ const responseTimers = [];
270
272
  esm_default.spyGlobal();
271
273
  esm_default.get("begin:https://example.com/.well-known/webfinger", {
272
274
  subject: "acct:johndoe@example.com",
@@ -290,7 +292,8 @@ test("lookupObject()", {
290
292
  });
291
293
  const options = {
292
294
  documentLoader: mockDocumentLoader,
293
- contextLoader: mockDocumentLoader
295
+ contextLoader: mockDocumentLoader,
296
+ ...allowPrivateAddress
294
297
  };
295
298
  await t.step("actor", async () => {
296
299
  const person = await lookupObject("@johndoe@example.com", options);
@@ -329,7 +332,7 @@ test("lookupObject()", {
329
332
  });
330
333
  esm_default.removeRoutes({ includeFallback: false });
331
334
  esm_default.get("begin:https://example.com/.well-known/webfinger", () => new Promise((resolve) => {
332
- setTimeout(() => {
335
+ responseTimers.push(setTimeout(() => {
333
336
  resolve({
334
337
  subject: "acct:johndoe@example.com",
335
338
  links: [{
@@ -338,7 +341,7 @@ test("lookupObject()", {
338
341
  type: "application/activity+json"
339
342
  }]
340
343
  });
341
- }, 1e3);
344
+ }, 1e3));
342
345
  }));
343
346
  await t.step("request cancellation", async () => {
344
347
  const controller = new AbortController();
@@ -369,7 +372,7 @@ test("lookupObject()", {
369
372
  });
370
373
  esm_default.removeRoutes({ includeFallback: false });
371
374
  esm_default.get("begin:https://example.com/.well-known/webfinger", () => new Promise((resolve) => {
372
- setTimeout(() => {
375
+ responseTimers.push(setTimeout(() => {
373
376
  resolve({
374
377
  subject: "acct:johndoe@example.com",
375
378
  links: [{
@@ -378,7 +381,7 @@ test("lookupObject()", {
378
381
  type: "application/activity+json"
379
382
  }]
380
383
  });
381
- }, 500);
384
+ }, 500));
382
385
  }));
383
386
  await t.step("cancellation with immediate abort", async () => {
384
387
  const controller = new AbortController();
@@ -390,7 +393,7 @@ test("lookupObject()", {
390
393
  });
391
394
  esm_default.removeRoutes({ includeFallback: false });
392
395
  esm_default.get("https://example.com/slow-object", () => new Promise((resolve) => {
393
- setTimeout(() => {
396
+ responseTimers.push(setTimeout(() => {
394
397
  resolve({
395
398
  status: 200,
396
399
  headers: { "Content-Type": "application/activity+json" },
@@ -400,7 +403,7 @@ test("lookupObject()", {
400
403
  content: "Slow response"
401
404
  }
402
405
  });
403
- }, 1e3);
406
+ }, 1e3));
404
407
  }));
405
408
  await t.step("direct object fetch cancellation", async () => {
406
409
  const controller = new AbortController();
@@ -411,6 +414,7 @@ test("lookupObject()", {
411
414
  controller.abort();
412
415
  deepStrictEqual(await promise, null);
413
416
  });
417
+ for (const timer of responseTimers) clearTimeout(timer);
414
418
  esm_default.hardReset();
415
419
  esm_default.removeRoutes();
416
420
  });
@@ -581,15 +585,18 @@ test("FEP-fe34: lookupObject() cross-origin security", {
581
585
  throw new Error(`Unexpected URL: ${url}`);
582
586
  };
583
587
  deepStrictEqual(await lookupObject("@user@example.com", {
588
+ ...allowPrivateAddress,
584
589
  documentLoader: webfingerDocumentLoader,
585
590
  contextLoader: mockDocumentLoader
586
591
  }), null);
587
592
  await rejects(() => lookupObject("@user@example.com", {
593
+ ...allowPrivateAddress,
588
594
  documentLoader: webfingerDocumentLoader,
589
595
  contextLoader: mockDocumentLoader,
590
596
  crossOrigin: "throw"
591
597
  }), Error, "The object's @id (https://malicious.com/fake-actor) has a different origin than the document URL (https://different-origin.com/actor)");
592
598
  const result2 = await lookupObject("@user@example.com", {
599
+ ...allowPrivateAddress,
593
600
  documentLoader: webfingerDocumentLoader,
594
601
  contextLoader: mockDocumentLoader,
595
602
  crossOrigin: "trust"
@@ -660,11 +667,20 @@ test("FEP-fe34: lookupObject() cross-origin security", {
660
667
  const errorDocumentLoader = async (_url) => {
661
668
  throw new Error("Network error");
662
669
  };
663
- deepStrictEqual(await lookupObject("https://example.com/note", {
664
- documentLoader: errorDocumentLoader,
665
- contextLoader: mockDocumentLoader,
666
- crossOrigin: "throw"
667
- }), null);
670
+ esm_default.spyGlobal();
671
+ esm_default.get("begin:https://example.com/.well-known/webfinger", 404);
672
+ let result;
673
+ try {
674
+ result = await lookupObject("https://example.com/note", {
675
+ ...allowPrivateAddress,
676
+ documentLoader: errorDocumentLoader,
677
+ contextLoader: mockDocumentLoader,
678
+ crossOrigin: "throw"
679
+ });
680
+ } finally {
681
+ esm_default.hardReset();
682
+ }
683
+ deepStrictEqual(result, null);
668
684
  });
669
685
  await t.step("malformed JSON handling with cross-origin policy", async () => {
670
686
  const malformedJsonDocumentLoader = async (url) => {
@@ -729,6 +745,7 @@ test("lookupObject() records activitypub.object.lookup counter", {
729
745
  await t.step("records kind=actor for an actor result", async () => {
730
746
  const [meterProvider, recorder] = createTestMeterProvider();
731
747
  assertInstanceOf(await lookupObject("@johndoe@example.com", {
748
+ ...allowPrivateAddress,
732
749
  documentLoader: mockDocumentLoader,
733
750
  contextLoader: mockDocumentLoader,
734
751
  meterProvider
@@ -782,6 +799,7 @@ test("lookupObject() records activitypub.object.lookup counter", {
782
799
  });
783
800
  const [meterProvider, recorder] = createTestMeterProvider();
784
801
  deepStrictEqual(await lookupObject("janedoe@example.com", {
802
+ ...allowPrivateAddress,
785
803
  documentLoader: mockDocumentLoader,
786
804
  contextLoader: mockDocumentLoader,
787
805
  meterProvider
@@ -811,6 +829,7 @@ test("lookupObject() records activitypub.object.lookup counter", {
811
829
  });
812
830
  const [meterProvider, recorder] = createTestMeterProvider();
813
831
  await lookupObject("@johndoe@example.com", {
832
+ ...allowPrivateAddress,
814
833
  documentLoader: mockDocumentLoader,
815
834
  contextLoader: mockDocumentLoader,
816
835
  meterProvider
@@ -832,6 +851,7 @@ test("lookupObject() records activitypub.object.lookup counter", {
832
851
  });
833
852
  const [meterProvider, recorder] = createTestMeterProvider();
834
853
  await lookupObject(new URL("acct:johndoe@example.com"), {
854
+ ...allowPrivateAddress,
835
855
  documentLoader: mockDocumentLoader,
836
856
  contextLoader: mockDocumentLoader,
837
857
  meterProvider
@@ -1,6 +1,6 @@
1
1
  import "@js-temporal/polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { E as Person, L as getEntityTypeById, R as isEntityType, y as Link } from "./vocab-CDOex_0g.mjs";
3
+ import { E as Person, L as getEntityTypeById, R as isEntityType, y as Link } from "./vocab-DHuK2moR.mjs";
4
4
  import { t as getTypeId } from "./type-Cf-vxmre.mjs";
5
5
  import { test } from "@fedify/fixture";
6
6
  import { deepStrictEqual } from "node:assert/strict";
@@ -197,6 +197,11 @@ var Object$1 = class Object$1 {
197
197
  get _warning() {
198
198
  return this.#warning;
199
199
  }
200
+ /**
201
+ * Internal cross-package contract with @fedify/testing, which copies this
202
+ * cache when attaching document loaders to an activity clone. Keep this
203
+ * accessor name and its getter/setter semantics stable.
204
+ */
200
205
  get _cachedJsonLd() {
201
206
  return this.#cachedJsonLd;
202
207
  }
@@ -9960,6 +9965,11 @@ var PropertyValue = class {
9960
9965
  get _warning() {
9961
9966
  return this.#warning;
9962
9967
  }
9968
+ /**
9969
+ * Internal cross-package contract with @fedify/testing, which copies this
9970
+ * cache when attaching document loaders to an activity clone. Keep this
9971
+ * accessor name and its getter/setter semantics stable.
9972
+ */
9963
9973
  get _cachedJsonLd() {
9964
9974
  return this.#cachedJsonLd;
9965
9975
  }
@@ -10264,6 +10274,11 @@ var Measure = class {
10264
10274
  get _warning() {
10265
10275
  return this.#warning;
10266
10276
  }
10277
+ /**
10278
+ * Internal cross-package contract with @fedify/testing, which copies this
10279
+ * cache when attaching document loaders to an activity clone. Keep this
10280
+ * accessor name and its getter/setter semantics stable.
10281
+ */
10267
10282
  get _cachedJsonLd() {
10268
10283
  return this.#cachedJsonLd;
10269
10284
  }
@@ -11277,6 +11292,11 @@ var InteractionPolicy = class {
11277
11292
  get _warning() {
11278
11293
  return this.#warning;
11279
11294
  }
11295
+ /**
11296
+ * Internal cross-package contract with @fedify/testing, which copies this
11297
+ * cache when attaching document loaders to an activity clone. Keep this
11298
+ * accessor name and its getter/setter semantics stable.
11299
+ */
11280
11300
  get _cachedJsonLd() {
11281
11301
  return this.#cachedJsonLd;
11282
11302
  }
@@ -11658,6 +11678,11 @@ var InteractionRule = class {
11658
11678
  get _warning() {
11659
11679
  return this.#warning;
11660
11680
  }
11681
+ /**
11682
+ * Internal cross-package contract with @fedify/testing, which copies this
11683
+ * cache when attaching document loaders to an activity clone. Keep this
11684
+ * accessor name and its getter/setter semantics stable.
11685
+ */
11661
11686
  get _cachedJsonLd() {
11662
11687
  return this.#cachedJsonLd;
11663
11688
  }
@@ -14122,6 +14147,11 @@ var DidService = class {
14122
14147
  get _warning() {
14123
14148
  return this.#warning;
14124
14149
  }
14150
+ /**
14151
+ * Internal cross-package contract with @fedify/testing, which copies this
14152
+ * cache when attaching document loaders to an activity clone. Keep this
14153
+ * accessor name and its getter/setter semantics stable.
14154
+ */
14125
14155
  get _cachedJsonLd() {
14126
14156
  return this.#cachedJsonLd;
14127
14157
  }
@@ -14512,6 +14542,11 @@ var DataIntegrityProof = class {
14512
14542
  get _warning() {
14513
14543
  return this.#warning;
14514
14544
  }
14545
+ /**
14546
+ * Internal cross-package contract with @fedify/testing, which copies this
14547
+ * cache when attaching document loaders to an activity clone. Keep this
14548
+ * accessor name and its getter/setter semantics stable.
14549
+ */
14515
14550
  get _cachedJsonLd() {
14516
14551
  return this.#cachedJsonLd;
14517
14552
  }
@@ -15023,6 +15058,11 @@ var CryptographicKey = class {
15023
15058
  get _warning() {
15024
15059
  return this.#warning;
15025
15060
  }
15061
+ /**
15062
+ * Internal cross-package contract with @fedify/testing, which copies this
15063
+ * cache when attaching document loaders to an activity clone. Keep this
15064
+ * accessor name and its getter/setter semantics stable.
15065
+ */
15026
15066
  get _cachedJsonLd() {
15027
15067
  return this.#cachedJsonLd;
15028
15068
  }
@@ -15525,6 +15565,11 @@ var Multikey = class {
15525
15565
  get _warning() {
15526
15566
  return this.#warning;
15527
15567
  }
15568
+ /**
15569
+ * Internal cross-package contract with @fedify/testing, which copies this
15570
+ * cache when attaching document loaders to an activity clone. Keep this
15571
+ * accessor name and its getter/setter semantics stable.
15572
+ */
15528
15573
  get _cachedJsonLd() {
15529
15574
  return this.#cachedJsonLd;
15530
15575
  }
@@ -16359,6 +16404,11 @@ var Commitment = class {
16359
16404
  get _warning() {
16360
16405
  return this.#warning;
16361
16406
  }
16407
+ /**
16408
+ * Internal cross-package contract with @fedify/testing, which copies this
16409
+ * cache when attaching document loaders to an activity clone. Keep this
16410
+ * accessor name and its getter/setter semantics stable.
16411
+ */
16362
16412
  get _cachedJsonLd() {
16363
16413
  return this.#cachedJsonLd;
16364
16414
  }
@@ -16677,6 +16727,11 @@ var Intent = class {
16677
16727
  get _warning() {
16678
16728
  return this.#warning;
16679
16729
  }
16730
+ /**
16731
+ * Internal cross-package contract with @fedify/testing, which copies this
16732
+ * cache when attaching document loaders to an activity clone. Keep this
16733
+ * accessor name and its getter/setter semantics stable.
16734
+ */
16680
16735
  get _cachedJsonLd() {
16681
16736
  return this.#cachedJsonLd;
16682
16737
  }
@@ -27284,6 +27339,11 @@ var Endpoints = class {
27284
27339
  get _warning() {
27285
27340
  return this.#warning;
27286
27341
  }
27342
+ /**
27343
+ * Internal cross-package contract with @fedify/testing, which copies this
27344
+ * cache when attaching document loaders to an activity clone. Keep this
27345
+ * accessor name and its getter/setter semantics stable.
27346
+ */
27287
27347
  get _cachedJsonLd() {
27288
27348
  return this.#cachedJsonLd;
27289
27349
  }
@@ -31863,6 +31923,11 @@ var Link = class Link {
31863
31923
  get _warning() {
31864
31924
  return this.#warning;
31865
31925
  }
31926
+ /**
31927
+ * Internal cross-package contract with @fedify/testing, which copies this
31928
+ * cache when attaching document loaders to an activity clone. Keep this
31929
+ * accessor name and its getter/setter semantics stable.
31930
+ */
31866
31931
  get _cachedJsonLd() {
31867
31932
  return this.#cachedJsonLd;
31868
31933
  }
@@ -50177,6 +50242,11 @@ var Source = class {
50177
50242
  get _warning() {
50178
50243
  return this.#warning;
50179
50244
  }
50245
+ /**
50246
+ * Internal cross-package contract with @fedify/testing, which copies this
50247
+ * cache when attaching document loaders to an activity clone. Keep this
50248
+ * accessor name and its getter/setter semantics stable.
50249
+ */
50180
50250
  get _cachedJsonLd() {
50181
50251
  return this.#cachedJsonLd;
50182
50252
  }
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { A as Question, C as Offer, D as Place, E as Person, F as Source, I as Tombstone, M as QuoteRequest, N as Reject, O as PropertyValue, S as Object$1, _ as InteractionPolicy, b as Measure, c as Create, d as Document, f as Endpoints, g as Intent, h as Hashtag, i as Announce, j as QuoteAuthorization, k as Proposal, l as CryptographicKey, n as Activity, o as Collection, p as Follow, r as Agreement, s as Commitment, t as Accept, u as Delete, v as InteractionRule, w as OrderedCollectionPage, x as Note, y as Link, z as vocab_exports } from "./vocab-CDOex_0g.mjs";
3
+ import { A as Question, C as Offer, D as Place, E as Person, F as Source, I as Tombstone, M as QuoteRequest, N as Reject, O as PropertyValue, S as Object$1, _ as InteractionPolicy, b as Measure, c as Create, d as Document, f as Endpoints, g as Intent, h as Hashtag, i as Announce, j as QuoteAuthorization, k as Proposal, l as CryptographicKey, n as Activity, o as Collection, p as Follow, r as Agreement, s as Commitment, t as Accept, u as Delete, v as InteractionRule, w as OrderedCollectionPage, x as Note, y as Link, z as vocab_exports } from "./vocab-DHuK2moR.mjs";
4
4
  import { t as assertInstanceOf } from "./utils-CE8Dk5hm.mjs";
5
5
  import { mockDocumentLoader, test } from "@fedify/fixture";
6
6
  import { deepStrictEqual, notDeepStrictEqual, ok, rejects, strictEqual, throws } from "node:assert/strict";
@@ -424,7 +424,11 @@ test({
424
424
  }
425
425
  }
426
426
  });
427
- deepStrictEqual(await new Activity({ object: new URL("https://example.com/not-found") }).getObject({ suppressError: true }), null);
427
+ deepStrictEqual(await new Activity({ object: new URL("https://example.com/not-found") }).getObject({
428
+ documentLoader: mockDocumentLoader,
429
+ contextLoader: mockDocumentLoader,
430
+ suppressError: true
431
+ }), null);
428
432
  const object3 = await (await Activity.fromJsonLd({
429
433
  "@context": "https://www.w3.org/ns/activitystreams",
430
434
  type: "Create",
@@ -461,7 +465,11 @@ test({
461
465
  assertInstanceOf(objects[1], Object$1);
462
466
  deepStrictEqual(objects[1].name, "Second object");
463
467
  const activity2 = new Activity({ objects: [new URL("https://example.com/not-found"), new Object$1({ name: "Second object" })] });
464
- const objects2 = await Array.fromAsync(activity2.getObjects({ suppressError: true }));
468
+ const objects2 = await Array.fromAsync(activity2.getObjects({
469
+ documentLoader: mockDocumentLoader,
470
+ contextLoader: mockDocumentLoader,
471
+ suppressError: true
472
+ }));
465
473
  deepStrictEqual(objects2.length, 1);
466
474
  assertInstanceOf(objects2[0], Object$1);
467
475
  deepStrictEqual(objects2[0].name, "Second object");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab",
3
- "version": "2.3.15-dev.2482+41d364a2",
3
+ "version": "2.3.15",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,14 +41,14 @@
41
41
  "@js-temporal/polyfill": "^0.5.1",
42
42
  "@multiformats/base-x": "^4.0.1",
43
43
  "@logtape/logtape": "^2.2.0",
44
- "@opentelemetry/api": "^1.9.1",
44
+ "@opentelemetry/api": "~1.9.1",
45
45
  "asn1js": "^3.0.10",
46
46
  "es-toolkit": "1.46.1",
47
47
  "jsonld": "^9.0.0",
48
48
  "pkijs": "^3.3.3",
49
- "@fedify/vocab-tools": "2.3.15-dev.2482+41d364a2",
50
- "@fedify/webfinger": "2.3.15-dev.2482+41d364a2",
51
- "@fedify/vocab-runtime": "2.3.15-dev.2482+41d364a2"
49
+ "@fedify/vocab-runtime": "2.3.15",
50
+ "@fedify/vocab-tools": "2.3.15",
51
+ "@fedify/webfinger": "2.3.15"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^22.17.0",
@@ -10,10 +10,17 @@ import { lookupObject, traverseCollection } from "./lookup.ts";
10
10
  import { assertInstanceOf } from "./utils.ts";
11
11
  import { Collection, Note, Object, Person } from "./vocab.ts";
12
12
 
13
+ // lookupObject() accepts this option without declaring it, since Fedify's
14
+ // Context passes it. It makes WebFinger lookups use the global fetch()
15
+ // (fetch-mock here) without resolving hostnames, so that the tests do not
16
+ // depend on the real DNS:
17
+ const allowPrivateAddress = { allowPrivateAddress: true };
18
+
13
19
  test("lookupObject()", {
14
20
  sanitizeResources: false,
15
21
  sanitizeOps: false,
16
22
  }, async (t) => {
23
+ const responseTimers: ReturnType<typeof setTimeout>[] = [];
17
24
  fetchMock.spyGlobal();
18
25
 
19
26
  fetchMock.get(
@@ -43,6 +50,7 @@ test("lookupObject()", {
43
50
  const options = {
44
51
  documentLoader: mockDocumentLoader,
45
52
  contextLoader: mockDocumentLoader,
53
+ ...allowPrivateAddress,
46
54
  };
47
55
 
48
56
  await t.step("actor", async () => {
@@ -106,7 +114,7 @@ test("lookupObject()", {
106
114
  "begin:https://example.com/.well-known/webfinger",
107
115
  () =>
108
116
  new Promise((resolve) => {
109
- setTimeout(() => {
117
+ responseTimers.push(setTimeout(() => {
110
118
  resolve({
111
119
  subject: "acct:johndoe@example.com",
112
120
  links: [
@@ -117,7 +125,7 @@ test("lookupObject()", {
117
125
  },
118
126
  ],
119
127
  });
120
- }, 1000);
128
+ }, 1000));
121
129
  }),
122
130
  );
123
131
 
@@ -162,7 +170,7 @@ test("lookupObject()", {
162
170
  "begin:https://example.com/.well-known/webfinger",
163
171
  () =>
164
172
  new Promise((resolve) => {
165
- setTimeout(() => {
173
+ responseTimers.push(setTimeout(() => {
166
174
  resolve({
167
175
  subject: "acct:johndoe@example.com",
168
176
  links: [
@@ -173,7 +181,7 @@ test("lookupObject()", {
173
181
  },
174
182
  ],
175
183
  });
176
- }, 500);
184
+ }, 500));
177
185
  }),
178
186
  );
179
187
 
@@ -193,7 +201,7 @@ test("lookupObject()", {
193
201
  "https://example.com/slow-object",
194
202
  () =>
195
203
  new Promise((resolve) => {
196
- setTimeout(() => {
204
+ responseTimers.push(setTimeout(() => {
197
205
  resolve({
198
206
  status: 200,
199
207
  headers: { "Content-Type": "application/activity+json" },
@@ -203,7 +211,7 @@ test("lookupObject()", {
203
211
  content: "Slow response",
204
212
  },
205
213
  });
206
- }, 1000);
214
+ }, 1000));
207
215
  }),
208
216
  );
209
217
 
@@ -218,6 +226,7 @@ test("lookupObject()", {
218
226
  deepStrictEqual(await promise, null);
219
227
  });
220
228
 
229
+ for (const timer of responseTimers) clearTimeout(timer);
221
230
  fetchMock.hardReset();
222
231
  fetchMock.removeRoutes();
223
232
  });
@@ -480,6 +489,7 @@ test("FEP-fe34: lookupObject() cross-origin security", {
480
489
 
481
490
  // Default behavior should return null
482
491
  const result1 = await lookupObject("@user@example.com", {
492
+ ...allowPrivateAddress,
483
493
  documentLoader: webfingerDocumentLoader,
484
494
  contextLoader: mockDocumentLoader,
485
495
  });
@@ -489,6 +499,7 @@ test("FEP-fe34: lookupObject() cross-origin security", {
489
499
  await rejects(
490
500
  () =>
491
501
  lookupObject("@user@example.com", {
502
+ ...allowPrivateAddress,
492
503
  documentLoader: webfingerDocumentLoader,
493
504
  contextLoader: mockDocumentLoader,
494
505
  crossOrigin: "throw",
@@ -499,6 +510,7 @@ test("FEP-fe34: lookupObject() cross-origin security", {
499
510
 
500
511
  // With crossOrigin: trust, should return the object
501
512
  const result2 = await lookupObject("@user@example.com", {
513
+ ...allowPrivateAddress,
502
514
  documentLoader: webfingerDocumentLoader,
503
515
  contextLoader: mockDocumentLoader,
504
516
  crossOrigin: "trust",
@@ -598,12 +610,22 @@ test("FEP-fe34: lookupObject() cross-origin security", {
598
610
  throw new Error("Network error");
599
611
  };
600
612
 
613
+ // The WebFinger fallback must not reach the network:
614
+ fetchMock.spyGlobal();
615
+ fetchMock.get("begin:https://example.com/.well-known/webfinger", 404);
616
+
601
617
  // Network errors should not be confused with cross-origin errors
602
- const result = await lookupObject("https://example.com/note", {
603
- documentLoader: errorDocumentLoader,
604
- contextLoader: mockDocumentLoader,
605
- crossOrigin: "throw",
606
- });
618
+ let result;
619
+ try {
620
+ result = await lookupObject("https://example.com/note", {
621
+ ...allowPrivateAddress,
622
+ documentLoader: errorDocumentLoader,
623
+ contextLoader: mockDocumentLoader,
624
+ crossOrigin: "throw",
625
+ });
626
+ } finally {
627
+ fetchMock.hardReset();
628
+ }
607
629
 
608
630
  // Should return null because the document loader failed,
609
631
  // not because of cross-origin policy
@@ -721,6 +743,7 @@ test("lookupObject() records activitypub.object.lookup counter", {
721
743
  await t.step("records kind=actor for an actor result", async () => {
722
744
  const [meterProvider, recorder] = createTestMeterProvider();
723
745
  const person = await lookupObject("@johndoe@example.com", {
746
+ ...allowPrivateAddress,
724
747
  documentLoader: mockDocumentLoader,
725
748
  contextLoader: mockDocumentLoader,
726
749
  meterProvider,
@@ -807,6 +830,7 @@ test("lookupObject() records activitypub.object.lookup counter", {
807
830
  });
808
831
  const [meterProvider, recorder] = createTestMeterProvider();
809
832
  const result = await lookupObject("janedoe@example.com", {
833
+ ...allowPrivateAddress,
810
834
  documentLoader: mockDocumentLoader,
811
835
  contextLoader: mockDocumentLoader,
812
836
  meterProvider,
@@ -858,6 +882,7 @@ test("lookupObject() records activitypub.object.lookup counter", {
858
882
  );
859
883
  const [meterProvider, recorder] = createTestMeterProvider();
860
884
  await lookupObject("@johndoe@example.com", {
885
+ ...allowPrivateAddress,
861
886
  documentLoader: mockDocumentLoader,
862
887
  contextLoader: mockDocumentLoader,
863
888
  meterProvider,
@@ -891,6 +916,7 @@ test("lookupObject() records activitypub.object.lookup counter", {
891
916
  });
892
917
  const [meterProvider, recorder] = createTestMeterProvider();
893
918
  await lookupObject(new URL("acct:johndoe@example.com"), {
919
+ ...allowPrivateAddress,
894
920
  documentLoader: mockDocumentLoader,
895
921
  contextLoader: mockDocumentLoader,
896
922
  meterProvider,
package/src/vocab.test.ts CHANGED
@@ -631,7 +631,14 @@ test({
631
631
  const activity2 = new Activity({
632
632
  object: new URL("https://example.com/not-found"),
633
633
  });
634
- deepStrictEqual(await activity2.getObject({ suppressError: true }), null);
634
+ deepStrictEqual(
635
+ await activity2.getObject({
636
+ documentLoader: mockDocumentLoader,
637
+ contextLoader: mockDocumentLoader,
638
+ suppressError: true,
639
+ }),
640
+ null,
641
+ );
635
642
 
636
643
  const activity3 = await Activity.fromJsonLd({
637
644
  "@context": "https://www.w3.org/ns/activitystreams",
@@ -686,7 +693,11 @@ test({
686
693
  ],
687
694
  });
688
695
  const objects2 = await Array.fromAsync(
689
- activity2.getObjects({ suppressError: true }),
696
+ activity2.getObjects({
697
+ documentLoader: mockDocumentLoader,
698
+ contextLoader: mockDocumentLoader,
699
+ suppressError: true,
700
+ }),
690
701
  );
691
702
  deepStrictEqual(objects2.length, 1);
692
703
  assertInstanceOf(objects2[0], Object);