@fedify/fedify 0.14.3 → 0.14.5
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/CHANGES.md +29 -0
- package/esm/federation/middleware.js +9 -0
- package/esm/vocab/vocab.js +293 -89
- package/package.json +1 -1
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/vocab/vocab.d.ts +63 -0
- package/types/vocab/vocab.d.ts.map +1 -1
package/esm/vocab/vocab.js
CHANGED
@@ -2780,15 +2780,7 @@ export class Object {
|
|
2780
2780
|
...options,
|
2781
2781
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
2782
2782
|
};
|
2783
|
-
if (options.format == null &&
|
2784
|
-
(this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz == null ||
|
2785
|
-
this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz.length < 1) &&
|
2786
|
-
(this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav == null ||
|
2787
|
-
this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav.length < 1) &&
|
2788
|
-
(this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1 == null ||
|
2789
|
-
this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1.length < 1) &&
|
2790
|
-
(this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8 == null ||
|
2791
|
-
this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8.length < 1)) {
|
2783
|
+
if (options.format == null && this.isCompactable()) {
|
2792
2784
|
const result = {};
|
2793
2785
|
// deno-lint-ignore no-unused-vars
|
2794
2786
|
let compactItems;
|
@@ -3642,6 +3634,21 @@ export class Object {
|
|
3642
3634
|
}
|
3643
3635
|
return compacted;
|
3644
3636
|
}
|
3637
|
+
isCompactable() {
|
3638
|
+
if (this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz != null &&
|
3639
|
+
this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz.length > 0)
|
3640
|
+
return false;
|
3641
|
+
if (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav != null &&
|
3642
|
+
this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav.length > 0)
|
3643
|
+
return false;
|
3644
|
+
if (this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1 != null &&
|
3645
|
+
this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1.length > 0)
|
3646
|
+
return false;
|
3647
|
+
if (this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8 != null &&
|
3648
|
+
this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8.length > 0)
|
3649
|
+
return false;
|
3650
|
+
return true;
|
3651
|
+
}
|
3645
3652
|
/**
|
3646
3653
|
* Converts a JSON-LD structure to an object of this type.
|
3647
3654
|
* @param json The JSON-LD structure to convert.
|
@@ -4703,7 +4710,8 @@ export class Object {
|
|
4703
4710
|
if (v == null)
|
4704
4711
|
continue;
|
4705
4712
|
const decoded = typeof v === "object" && "@id" in v &&
|
4706
|
-
typeof v["@id"] === "string"
|
4713
|
+
typeof v["@id"] === "string" &&
|
4714
|
+
v["@id"] !== "" && v["@id"] !== "/"
|
4707
4715
|
? new URL(v["@id"])
|
4708
4716
|
: typeof v === "object" && "@type" in v &&
|
4709
4717
|
Array.isArray(v["@type"]) &&
|
@@ -5356,7 +5364,7 @@ export class Emoji extends Object {
|
|
5356
5364
|
...options,
|
5357
5365
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
5358
5366
|
};
|
5359
|
-
if (options.format == null) {
|
5367
|
+
if (options.format == null && this.isCompactable()) {
|
5360
5368
|
const result = await super.toJsonLd({
|
5361
5369
|
...options,
|
5362
5370
|
format: undefined,
|
@@ -5409,6 +5417,9 @@ export class Emoji extends Object {
|
|
5409
5417
|
}
|
5410
5418
|
return compacted;
|
5411
5419
|
}
|
5420
|
+
isCompactable() {
|
5421
|
+
return super.isCompactable();
|
5422
|
+
}
|
5412
5423
|
/**
|
5413
5424
|
* Converts a JSON-LD structure to an object of this type.
|
5414
5425
|
* @param json The JSON-LD structure to convert.
|
@@ -5539,7 +5550,7 @@ export class ChatMessage extends Object {
|
|
5539
5550
|
...options,
|
5540
5551
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
5541
5552
|
};
|
5542
|
-
if (options.format == null) {
|
5553
|
+
if (options.format == null && this.isCompactable()) {
|
5543
5554
|
const result = await super.toJsonLd({
|
5544
5555
|
...options,
|
5545
5556
|
format: undefined,
|
@@ -5602,6 +5613,9 @@ export class ChatMessage extends Object {
|
|
5602
5613
|
}
|
5603
5614
|
return compacted;
|
5604
5615
|
}
|
5616
|
+
isCompactable() {
|
5617
|
+
return super.isCompactable();
|
5618
|
+
}
|
5605
5619
|
/**
|
5606
5620
|
* Converts a JSON-LD structure to an object of this type.
|
5607
5621
|
* @param json The JSON-LD structure to convert.
|
@@ -5805,11 +5819,7 @@ export class PropertyValue {
|
|
5805
5819
|
...options,
|
5806
5820
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
5807
5821
|
};
|
5808
|
-
if (options.format == null &&
|
5809
|
-
(this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav == null ||
|
5810
|
-
this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav.length < 1) &&
|
5811
|
-
(this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx == null ||
|
5812
|
-
this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx.length < 1)) {
|
5822
|
+
if (options.format == null && this.isCompactable()) {
|
5813
5823
|
const result = {};
|
5814
5824
|
// deno-lint-ignore no-unused-vars
|
5815
5825
|
let compactItems;
|
@@ -5894,6 +5904,15 @@ export class PropertyValue {
|
|
5894
5904
|
}
|
5895
5905
|
return compacted;
|
5896
5906
|
}
|
5907
|
+
isCompactable() {
|
5908
|
+
if (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav != null &&
|
5909
|
+
this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav.length > 0)
|
5910
|
+
return false;
|
5911
|
+
if (this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx != null &&
|
5912
|
+
this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx.length > 0)
|
5913
|
+
return false;
|
5914
|
+
return true;
|
5915
|
+
}
|
5897
5916
|
/**
|
5898
5917
|
* Converts a JSON-LD structure to an object of this type.
|
5899
5918
|
* @param json The JSON-LD structure to convert.
|
@@ -6385,6 +6404,9 @@ export class DataIntegrityProof {
|
|
6385
6404
|
}
|
6386
6405
|
return compacted;
|
6387
6406
|
}
|
6407
|
+
isCompactable() {
|
6408
|
+
return true;
|
6409
|
+
}
|
6388
6410
|
/**
|
6389
6411
|
* Converts a JSON-LD structure to an object of this type.
|
6390
6412
|
* @param json The JSON-LD structure to convert.
|
@@ -6803,7 +6825,7 @@ export class CryptographicKey {
|
|
6803
6825
|
...options,
|
6804
6826
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
6805
6827
|
};
|
6806
|
-
if (options.format == null) {
|
6828
|
+
if (options.format == null && this.isCompactable()) {
|
6807
6829
|
const result = {};
|
6808
6830
|
// deno-lint-ignore no-unused-vars
|
6809
6831
|
let compactItems;
|
@@ -6908,6 +6930,9 @@ export class CryptographicKey {
|
|
6908
6930
|
}
|
6909
6931
|
return compacted;
|
6910
6932
|
}
|
6933
|
+
isCompactable() {
|
6934
|
+
return true;
|
6935
|
+
}
|
6911
6936
|
/**
|
6912
6937
|
* Converts a JSON-LD structure to an object of this type.
|
6913
6938
|
* @param json The JSON-LD structure to convert.
|
@@ -7285,7 +7310,7 @@ export class Multikey {
|
|
7285
7310
|
...options,
|
7286
7311
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
7287
7312
|
};
|
7288
|
-
if (options.format == null) {
|
7313
|
+
if (options.format == null && this.isCompactable()) {
|
7289
7314
|
const result = {};
|
7290
7315
|
// deno-lint-ignore no-unused-vars
|
7291
7316
|
let compactItems;
|
@@ -7393,6 +7418,9 @@ export class Multikey {
|
|
7393
7418
|
}
|
7394
7419
|
return compacted;
|
7395
7420
|
}
|
7421
|
+
isCompactable() {
|
7422
|
+
return true;
|
7423
|
+
}
|
7396
7424
|
/**
|
7397
7425
|
* Converts a JSON-LD structure to an object of this type.
|
7398
7426
|
* @param json The JSON-LD structure to convert.
|
@@ -8475,7 +8503,7 @@ export class Activity extends Object {
|
|
8475
8503
|
...options,
|
8476
8504
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
8477
8505
|
};
|
8478
|
-
if (options.format == null) {
|
8506
|
+
if (options.format == null && this.isCompactable()) {
|
8479
8507
|
const result = await super.toJsonLd({
|
8480
8508
|
...options,
|
8481
8509
|
format: undefined,
|
@@ -8714,6 +8742,9 @@ export class Activity extends Object {
|
|
8714
8742
|
}
|
8715
8743
|
return compacted;
|
8716
8744
|
}
|
8745
|
+
isCompactable() {
|
8746
|
+
return super.isCompactable();
|
8747
|
+
}
|
8717
8748
|
/**
|
8718
8749
|
* Converts a JSON-LD structure to an object of this type.
|
8719
8750
|
* @param json The JSON-LD structure to convert.
|
@@ -9156,7 +9187,7 @@ export class Accept extends Activity {
|
|
9156
9187
|
...options,
|
9157
9188
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
9158
9189
|
};
|
9159
|
-
if (options.format == null) {
|
9190
|
+
if (options.format == null && this.isCompactable()) {
|
9160
9191
|
const result = await super.toJsonLd({
|
9161
9192
|
...options,
|
9162
9193
|
format: undefined,
|
@@ -9209,6 +9240,9 @@ export class Accept extends Activity {
|
|
9209
9240
|
}
|
9210
9241
|
return compacted;
|
9211
9242
|
}
|
9243
|
+
isCompactable() {
|
9244
|
+
return super.isCompactable();
|
9245
|
+
}
|
9212
9246
|
/**
|
9213
9247
|
* Converts a JSON-LD structure to an object of this type.
|
9214
9248
|
* @param json The JSON-LD structure to convert.
|
@@ -9341,7 +9375,7 @@ export class Add extends Activity {
|
|
9341
9375
|
...options,
|
9342
9376
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
9343
9377
|
};
|
9344
|
-
if (options.format == null) {
|
9378
|
+
if (options.format == null && this.isCompactable()) {
|
9345
9379
|
const result = await super.toJsonLd({
|
9346
9380
|
...options,
|
9347
9381
|
format: undefined,
|
@@ -9394,6 +9428,9 @@ export class Add extends Activity {
|
|
9394
9428
|
}
|
9395
9429
|
return compacted;
|
9396
9430
|
}
|
9431
|
+
isCompactable() {
|
9432
|
+
return super.isCompactable();
|
9433
|
+
}
|
9397
9434
|
/**
|
9398
9435
|
* Converts a JSON-LD structure to an object of this type.
|
9399
9436
|
* @param json The JSON-LD structure to convert.
|
@@ -9522,7 +9559,7 @@ export class Announce extends Activity {
|
|
9522
9559
|
...options,
|
9523
9560
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
9524
9561
|
};
|
9525
|
-
if (options.format == null) {
|
9562
|
+
if (options.format == null && this.isCompactable()) {
|
9526
9563
|
const result = await super.toJsonLd({
|
9527
9564
|
...options,
|
9528
9565
|
format: undefined,
|
@@ -9589,6 +9626,9 @@ export class Announce extends Activity {
|
|
9589
9626
|
}
|
9590
9627
|
return compacted;
|
9591
9628
|
}
|
9629
|
+
isCompactable() {
|
9630
|
+
return super.isCompactable();
|
9631
|
+
}
|
9592
9632
|
/**
|
9593
9633
|
* Converts a JSON-LD structure to an object of this type.
|
9594
9634
|
* @param json The JSON-LD structure to convert.
|
@@ -11103,9 +11143,7 @@ export class Application extends Object {
|
|
11103
11143
|
...options,
|
11104
11144
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
11105
11145
|
};
|
11106
|
-
if (options.format == null &&
|
11107
|
-
(this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf == null ||
|
11108
|
-
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length < 1)) {
|
11146
|
+
if (options.format == null && this.isCompactable()) {
|
11109
11147
|
const result = await super.toJsonLd({
|
11110
11148
|
...options,
|
11111
11149
|
format: undefined,
|
@@ -11642,6 +11680,12 @@ export class Application extends Object {
|
|
11642
11680
|
}
|
11643
11681
|
return compacted;
|
11644
11682
|
}
|
11683
|
+
isCompactable() {
|
11684
|
+
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf != null &&
|
11685
|
+
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length > 0)
|
11686
|
+
return false;
|
11687
|
+
return super.isCompactable();
|
11688
|
+
}
|
11645
11689
|
/**
|
11646
11690
|
* Converts a JSON-LD structure to an object of this type.
|
11647
11691
|
* @param json The JSON-LD structure to convert.
|
@@ -12313,7 +12357,7 @@ export class IntransitiveActivity extends Activity {
|
|
12313
12357
|
...options,
|
12314
12358
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
12315
12359
|
};
|
12316
|
-
if (options.format == null) {
|
12360
|
+
if (options.format == null && this.isCompactable()) {
|
12317
12361
|
const result = await super.toJsonLd({
|
12318
12362
|
...options,
|
12319
12363
|
format: undefined,
|
@@ -12368,6 +12412,9 @@ export class IntransitiveActivity extends Activity {
|
|
12368
12412
|
}
|
12369
12413
|
return compacted;
|
12370
12414
|
}
|
12415
|
+
isCompactable() {
|
12416
|
+
return super.isCompactable();
|
12417
|
+
}
|
12371
12418
|
/**
|
12372
12419
|
* Converts a JSON-LD structure to an object of this type.
|
12373
12420
|
* @param json The JSON-LD structure to convert.
|
@@ -12541,6 +12588,9 @@ export class Arrive extends IntransitiveActivity {
|
|
12541
12588
|
}
|
12542
12589
|
return compacted;
|
12543
12590
|
}
|
12591
|
+
isCompactable() {
|
12592
|
+
return super.isCompactable();
|
12593
|
+
}
|
12544
12594
|
/**
|
12545
12595
|
* Converts a JSON-LD structure to an object of this type.
|
12546
12596
|
* @param json The JSON-LD structure to convert.
|
@@ -12667,7 +12717,7 @@ export class Article extends Object {
|
|
12667
12717
|
...options,
|
12668
12718
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
12669
12719
|
};
|
12670
|
-
if (options.format == null) {
|
12720
|
+
if (options.format == null && this.isCompactable()) {
|
12671
12721
|
const result = await super.toJsonLd({
|
12672
12722
|
...options,
|
12673
12723
|
format: undefined,
|
@@ -12732,6 +12782,9 @@ export class Article extends Object {
|
|
12732
12782
|
}
|
12733
12783
|
return compacted;
|
12734
12784
|
}
|
12785
|
+
isCompactable() {
|
12786
|
+
return super.isCompactable();
|
12787
|
+
}
|
12735
12788
|
/**
|
12736
12789
|
* Converts a JSON-LD structure to an object of this type.
|
12737
12790
|
* @param json The JSON-LD structure to convert.
|
@@ -12922,7 +12975,7 @@ export class Document extends Object {
|
|
12922
12975
|
...options,
|
12923
12976
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
12924
12977
|
};
|
12925
|
-
if (options.format == null) {
|
12978
|
+
if (options.format == null && this.isCompactable()) {
|
12926
12979
|
const result = await super.toJsonLd({
|
12927
12980
|
...options,
|
12928
12981
|
format: undefined,
|
@@ -13019,6 +13072,9 @@ export class Document extends Object {
|
|
13019
13072
|
}
|
13020
13073
|
return compacted;
|
13021
13074
|
}
|
13075
|
+
isCompactable() {
|
13076
|
+
return super.isCompactable();
|
13077
|
+
}
|
13022
13078
|
/**
|
13023
13079
|
* Converts a JSON-LD structure to an object of this type.
|
13024
13080
|
* @param json The JSON-LD structure to convert.
|
@@ -13205,7 +13261,7 @@ export class Audio extends Document {
|
|
13205
13261
|
...options,
|
13206
13262
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
13207
13263
|
};
|
13208
|
-
if (options.format == null) {
|
13264
|
+
if (options.format == null && this.isCompactable()) {
|
13209
13265
|
const result = await super.toJsonLd({
|
13210
13266
|
...options,
|
13211
13267
|
format: undefined,
|
@@ -13258,6 +13314,9 @@ export class Audio extends Document {
|
|
13258
13314
|
}
|
13259
13315
|
return compacted;
|
13260
13316
|
}
|
13317
|
+
isCompactable() {
|
13318
|
+
return super.isCompactable();
|
13319
|
+
}
|
13261
13320
|
/**
|
13262
13321
|
* Converts a JSON-LD structure to an object of this type.
|
13263
13322
|
* @param json The JSON-LD structure to convert.
|
@@ -13385,7 +13444,7 @@ export class Ignore extends Activity {
|
|
13385
13444
|
...options,
|
13386
13445
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
13387
13446
|
};
|
13388
|
-
if (options.format == null) {
|
13447
|
+
if (options.format == null && this.isCompactable()) {
|
13389
13448
|
const result = await super.toJsonLd({
|
13390
13449
|
...options,
|
13391
13450
|
format: undefined,
|
@@ -13438,6 +13497,9 @@ export class Ignore extends Activity {
|
|
13438
13497
|
}
|
13439
13498
|
return compacted;
|
13440
13499
|
}
|
13500
|
+
isCompactable() {
|
13501
|
+
return super.isCompactable();
|
13502
|
+
}
|
13441
13503
|
/**
|
13442
13504
|
* Converts a JSON-LD structure to an object of this type.
|
13443
13505
|
* @param json The JSON-LD structure to convert.
|
@@ -13570,7 +13632,7 @@ export class Block extends Ignore {
|
|
13570
13632
|
...options,
|
13571
13633
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
13572
13634
|
};
|
13573
|
-
if (options.format == null) {
|
13635
|
+
if (options.format == null && this.isCompactable()) {
|
13574
13636
|
const result = await super.toJsonLd({
|
13575
13637
|
...options,
|
13576
13638
|
format: undefined,
|
@@ -13623,6 +13685,9 @@ export class Block extends Ignore {
|
|
13623
13685
|
}
|
13624
13686
|
return compacted;
|
13625
13687
|
}
|
13688
|
+
isCompactable() {
|
13689
|
+
return super.isCompactable();
|
13690
|
+
}
|
13626
13691
|
/**
|
13627
13692
|
* Converts a JSON-LD structure to an object of this type.
|
13628
13693
|
* @param json The JSON-LD structure to convert.
|
@@ -14109,7 +14174,7 @@ export class Collection extends Object {
|
|
14109
14174
|
...options,
|
14110
14175
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
14111
14176
|
};
|
14112
|
-
if (options.format == null) {
|
14177
|
+
if (options.format == null && this.isCompactable()) {
|
14113
14178
|
const result = await super.toJsonLd({
|
14114
14179
|
...options,
|
14115
14180
|
format: undefined,
|
@@ -14306,6 +14371,9 @@ export class Collection extends Object {
|
|
14306
14371
|
}
|
14307
14372
|
return compacted;
|
14308
14373
|
}
|
14374
|
+
isCompactable() {
|
14375
|
+
return super.isCompactable();
|
14376
|
+
}
|
14309
14377
|
/**
|
14310
14378
|
* Converts a JSON-LD structure to an object of this type.
|
14311
14379
|
* @param json The JSON-LD structure to convert.
|
@@ -14887,7 +14955,7 @@ export class CollectionPage extends Collection {
|
|
14887
14955
|
...options,
|
14888
14956
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
14889
14957
|
};
|
14890
|
-
if (options.format == null) {
|
14958
|
+
if (options.format == null && this.isCompactable()) {
|
14891
14959
|
const result = await super.toJsonLd({
|
14892
14960
|
...options,
|
14893
14961
|
format: undefined,
|
@@ -15027,6 +15095,9 @@ export class CollectionPage extends Collection {
|
|
15027
15095
|
}
|
15028
15096
|
return compacted;
|
15029
15097
|
}
|
15098
|
+
isCompactable() {
|
15099
|
+
return super.isCompactable();
|
15100
|
+
}
|
15030
15101
|
/**
|
15031
15102
|
* Converts a JSON-LD structure to an object of this type.
|
15032
15103
|
* @param json The JSON-LD structure to convert.
|
@@ -15244,7 +15315,7 @@ export class Create extends Activity {
|
|
15244
15315
|
...options,
|
15245
15316
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
15246
15317
|
};
|
15247
|
-
if (options.format == null) {
|
15318
|
+
if (options.format == null && this.isCompactable()) {
|
15248
15319
|
const result = await super.toJsonLd({
|
15249
15320
|
...options,
|
15250
15321
|
format: undefined,
|
@@ -15313,6 +15384,9 @@ export class Create extends Activity {
|
|
15313
15384
|
}
|
15314
15385
|
return compacted;
|
15315
15386
|
}
|
15387
|
+
isCompactable() {
|
15388
|
+
return super.isCompactable();
|
15389
|
+
}
|
15316
15390
|
/**
|
15317
15391
|
* Converts a JSON-LD structure to an object of this type.
|
15318
15392
|
* @param json The JSON-LD structure to convert.
|
@@ -15440,7 +15514,7 @@ export class Delete extends Activity {
|
|
15440
15514
|
...options,
|
15441
15515
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
15442
15516
|
};
|
15443
|
-
if (options.format == null) {
|
15517
|
+
if (options.format == null && this.isCompactable()) {
|
15444
15518
|
const result = await super.toJsonLd({
|
15445
15519
|
...options,
|
15446
15520
|
format: undefined,
|
@@ -15509,6 +15583,9 @@ export class Delete extends Activity {
|
|
15509
15583
|
}
|
15510
15584
|
return compacted;
|
15511
15585
|
}
|
15586
|
+
isCompactable() {
|
15587
|
+
return super.isCompactable();
|
15588
|
+
}
|
15512
15589
|
/**
|
15513
15590
|
* Converts a JSON-LD structure to an object of this type.
|
15514
15591
|
* @param json The JSON-LD structure to convert.
|
@@ -15635,7 +15712,7 @@ export class Dislike extends Activity {
|
|
15635
15712
|
...options,
|
15636
15713
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
15637
15714
|
};
|
15638
|
-
if (options.format == null) {
|
15715
|
+
if (options.format == null && this.isCompactable()) {
|
15639
15716
|
const result = await super.toJsonLd({
|
15640
15717
|
...options,
|
15641
15718
|
format: undefined,
|
@@ -15688,6 +15765,9 @@ export class Dislike extends Activity {
|
|
15688
15765
|
}
|
15689
15766
|
return compacted;
|
15690
15767
|
}
|
15768
|
+
isCompactable() {
|
15769
|
+
return super.isCompactable();
|
15770
|
+
}
|
15691
15771
|
/**
|
15692
15772
|
* Converts a JSON-LD structure to an object of this type.
|
15693
15773
|
* @param json The JSON-LD structure to convert.
|
@@ -16034,7 +16114,7 @@ export class Endpoints {
|
|
16034
16114
|
...options,
|
16035
16115
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
16036
16116
|
};
|
16037
|
-
if (options.format == null) {
|
16117
|
+
if (options.format == null && this.isCompactable()) {
|
16038
16118
|
const result = {};
|
16039
16119
|
// deno-lint-ignore no-unused-vars
|
16040
16120
|
let compactItems;
|
@@ -16176,6 +16256,9 @@ export class Endpoints {
|
|
16176
16256
|
}
|
16177
16257
|
return compacted;
|
16178
16258
|
}
|
16259
|
+
isCompactable() {
|
16260
|
+
return true;
|
16261
|
+
}
|
16179
16262
|
/**
|
16180
16263
|
* Converts a JSON-LD structure to an object of this type.
|
16181
16264
|
* @param json The JSON-LD structure to convert.
|
@@ -16444,7 +16527,7 @@ export class Event extends Object {
|
|
16444
16527
|
...options,
|
16445
16528
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
16446
16529
|
};
|
16447
|
-
if (options.format == null) {
|
16530
|
+
if (options.format == null && this.isCompactable()) {
|
16448
16531
|
const result = await super.toJsonLd({
|
16449
16532
|
...options,
|
16450
16533
|
format: undefined,
|
@@ -16497,6 +16580,9 @@ export class Event extends Object {
|
|
16497
16580
|
}
|
16498
16581
|
return compacted;
|
16499
16582
|
}
|
16583
|
+
isCompactable() {
|
16584
|
+
return super.isCompactable();
|
16585
|
+
}
|
16500
16586
|
/**
|
16501
16587
|
* Converts a JSON-LD structure to an object of this type.
|
16502
16588
|
* @param json The JSON-LD structure to convert.
|
@@ -16625,7 +16711,7 @@ export class Flag extends Activity {
|
|
16625
16711
|
...options,
|
16626
16712
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
16627
16713
|
};
|
16628
|
-
if (options.format == null) {
|
16714
|
+
if (options.format == null && this.isCompactable()) {
|
16629
16715
|
const result = await super.toJsonLd({
|
16630
16716
|
...options,
|
16631
16717
|
format: undefined,
|
@@ -16678,6 +16764,9 @@ export class Flag extends Activity {
|
|
16678
16764
|
}
|
16679
16765
|
return compacted;
|
16680
16766
|
}
|
16767
|
+
isCompactable() {
|
16768
|
+
return super.isCompactable();
|
16769
|
+
}
|
16681
16770
|
/**
|
16682
16771
|
* Converts a JSON-LD structure to an object of this type.
|
16683
16772
|
* @param json The JSON-LD structure to convert.
|
@@ -16807,7 +16896,7 @@ export class Follow extends Activity {
|
|
16807
16896
|
...options,
|
16808
16897
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
16809
16898
|
};
|
16810
|
-
if (options.format == null) {
|
16899
|
+
if (options.format == null && this.isCompactable()) {
|
16811
16900
|
const result = await super.toJsonLd({
|
16812
16901
|
...options,
|
16813
16902
|
format: undefined,
|
@@ -16860,6 +16949,9 @@ export class Follow extends Activity {
|
|
16860
16949
|
}
|
16861
16950
|
return compacted;
|
16862
16951
|
}
|
16952
|
+
isCompactable() {
|
16953
|
+
return super.isCompactable();
|
16954
|
+
}
|
16863
16955
|
/**
|
16864
16956
|
* Converts a JSON-LD structure to an object of this type.
|
16865
16957
|
* @param json The JSON-LD structure to convert.
|
@@ -18374,9 +18466,7 @@ export class Group extends Object {
|
|
18374
18466
|
...options,
|
18375
18467
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
18376
18468
|
};
|
18377
|
-
if (options.format == null &&
|
18378
|
-
(this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf == null ||
|
18379
|
-
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length < 1)) {
|
18469
|
+
if (options.format == null && this.isCompactable()) {
|
18380
18470
|
const result = await super.toJsonLd({
|
18381
18471
|
...options,
|
18382
18472
|
format: undefined,
|
@@ -18913,6 +19003,12 @@ export class Group extends Object {
|
|
18913
19003
|
}
|
18914
19004
|
return compacted;
|
18915
19005
|
}
|
19006
|
+
isCompactable() {
|
19007
|
+
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf != null &&
|
19008
|
+
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length > 0)
|
19009
|
+
return false;
|
19010
|
+
return super.isCompactable();
|
19011
|
+
}
|
18916
19012
|
/**
|
18917
19013
|
* Converts a JSON-LD structure to an object of this type.
|
18918
19014
|
* @param json The JSON-LD structure to convert.
|
@@ -19991,9 +20087,7 @@ export class Link {
|
|
19991
20087
|
...options,
|
19992
20088
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
19993
20089
|
};
|
19994
|
-
if (options.format == null &&
|
19995
|
-
(this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav == null ||
|
19996
|
-
this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav.length < 1)) {
|
20090
|
+
if (options.format == null && this.isCompactable()) {
|
19997
20091
|
const result = {};
|
19998
20092
|
// deno-lint-ignore no-unused-vars
|
19999
20093
|
let compactItems;
|
@@ -20200,6 +20294,12 @@ export class Link {
|
|
20200
20294
|
}
|
20201
20295
|
return compacted;
|
20202
20296
|
}
|
20297
|
+
isCompactable() {
|
20298
|
+
if (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav != null &&
|
20299
|
+
this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav.length > 0)
|
20300
|
+
return false;
|
20301
|
+
return true;
|
20302
|
+
}
|
20203
20303
|
/**
|
20204
20304
|
* Converts a JSON-LD structure to an object of this type.
|
20205
20305
|
* @param json The JSON-LD structure to convert.
|
@@ -20622,7 +20722,7 @@ export class Hashtag extends Link {
|
|
20622
20722
|
...options,
|
20623
20723
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
20624
20724
|
};
|
20625
|
-
if (options.format == null) {
|
20725
|
+
if (options.format == null && this.isCompactable()) {
|
20626
20726
|
const result = await super.toJsonLd({
|
20627
20727
|
...options,
|
20628
20728
|
format: undefined,
|
@@ -20660,6 +20760,9 @@ export class Hashtag extends Link {
|
|
20660
20760
|
}
|
20661
20761
|
return compacted;
|
20662
20762
|
}
|
20763
|
+
isCompactable() {
|
20764
|
+
return super.isCompactable();
|
20765
|
+
}
|
20663
20766
|
/**
|
20664
20767
|
* Converts a JSON-LD structure to an object of this type.
|
20665
20768
|
* @param json The JSON-LD structure to convert.
|
@@ -20786,7 +20889,7 @@ export class Image extends Document {
|
|
20786
20889
|
...options,
|
20787
20890
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
20788
20891
|
};
|
20789
|
-
if (options.format == null) {
|
20892
|
+
if (options.format == null && this.isCompactable()) {
|
20790
20893
|
const result = await super.toJsonLd({
|
20791
20894
|
...options,
|
20792
20895
|
format: undefined,
|
@@ -20833,6 +20936,9 @@ export class Image extends Document {
|
|
20833
20936
|
}
|
20834
20937
|
return compacted;
|
20835
20938
|
}
|
20939
|
+
isCompactable() {
|
20940
|
+
return super.isCompactable();
|
20941
|
+
}
|
20836
20942
|
/**
|
20837
20943
|
* Converts a JSON-LD structure to an object of this type.
|
20838
20944
|
* @param json The JSON-LD structure to convert.
|
@@ -20961,7 +21067,7 @@ export class Offer extends Activity {
|
|
20961
21067
|
...options,
|
20962
21068
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
20963
21069
|
};
|
20964
|
-
if (options.format == null) {
|
21070
|
+
if (options.format == null && this.isCompactable()) {
|
20965
21071
|
const result = await super.toJsonLd({
|
20966
21072
|
...options,
|
20967
21073
|
format: undefined,
|
@@ -21014,6 +21120,9 @@ export class Offer extends Activity {
|
|
21014
21120
|
}
|
21015
21121
|
return compacted;
|
21016
21122
|
}
|
21123
|
+
isCompactable() {
|
21124
|
+
return super.isCompactable();
|
21125
|
+
}
|
21017
21126
|
/**
|
21018
21127
|
* Converts a JSON-LD structure to an object of this type.
|
21019
21128
|
* @param json The JSON-LD structure to convert.
|
@@ -21144,7 +21253,7 @@ export class Invite extends Offer {
|
|
21144
21253
|
...options,
|
21145
21254
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
21146
21255
|
};
|
21147
|
-
if (options.format == null) {
|
21256
|
+
if (options.format == null && this.isCompactable()) {
|
21148
21257
|
const result = await super.toJsonLd({
|
21149
21258
|
...options,
|
21150
21259
|
format: undefined,
|
@@ -21197,6 +21306,9 @@ export class Invite extends Offer {
|
|
21197
21306
|
}
|
21198
21307
|
return compacted;
|
21199
21308
|
}
|
21309
|
+
isCompactable() {
|
21310
|
+
return super.isCompactable();
|
21311
|
+
}
|
21200
21312
|
/**
|
21201
21313
|
* Converts a JSON-LD structure to an object of this type.
|
21202
21314
|
* @param json The JSON-LD structure to convert.
|
@@ -21324,7 +21436,7 @@ export class Join extends Activity {
|
|
21324
21436
|
...options,
|
21325
21437
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
21326
21438
|
};
|
21327
|
-
if (options.format == null) {
|
21439
|
+
if (options.format == null && this.isCompactable()) {
|
21328
21440
|
const result = await super.toJsonLd({
|
21329
21441
|
...options,
|
21330
21442
|
format: undefined,
|
@@ -21377,6 +21489,9 @@ export class Join extends Activity {
|
|
21377
21489
|
}
|
21378
21490
|
return compacted;
|
21379
21491
|
}
|
21492
|
+
isCompactable() {
|
21493
|
+
return super.isCompactable();
|
21494
|
+
}
|
21380
21495
|
/**
|
21381
21496
|
* Converts a JSON-LD structure to an object of this type.
|
21382
21497
|
* @param json The JSON-LD structure to convert.
|
@@ -21504,7 +21619,7 @@ export class Leave extends Activity {
|
|
21504
21619
|
...options,
|
21505
21620
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
21506
21621
|
};
|
21507
|
-
if (options.format == null) {
|
21622
|
+
if (options.format == null && this.isCompactable()) {
|
21508
21623
|
const result = await super.toJsonLd({
|
21509
21624
|
...options,
|
21510
21625
|
format: undefined,
|
@@ -21557,6 +21672,9 @@ export class Leave extends Activity {
|
|
21557
21672
|
}
|
21558
21673
|
return compacted;
|
21559
21674
|
}
|
21675
|
+
isCompactable() {
|
21676
|
+
return super.isCompactable();
|
21677
|
+
}
|
21560
21678
|
/**
|
21561
21679
|
* Converts a JSON-LD structure to an object of this type.
|
21562
21680
|
* @param json The JSON-LD structure to convert.
|
@@ -21684,7 +21802,7 @@ export class Like extends Activity {
|
|
21684
21802
|
...options,
|
21685
21803
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
21686
21804
|
};
|
21687
|
-
if (options.format == null) {
|
21805
|
+
if (options.format == null && this.isCompactable()) {
|
21688
21806
|
const result = await super.toJsonLd({
|
21689
21807
|
...options,
|
21690
21808
|
format: undefined,
|
@@ -21737,6 +21855,9 @@ export class Like extends Activity {
|
|
21737
21855
|
}
|
21738
21856
|
return compacted;
|
21739
21857
|
}
|
21858
|
+
isCompactable() {
|
21859
|
+
return super.isCompactable();
|
21860
|
+
}
|
21740
21861
|
/**
|
21741
21862
|
* Converts a JSON-LD structure to an object of this type.
|
21742
21863
|
* @param json The JSON-LD structure to convert.
|
@@ -21863,7 +21984,7 @@ export class Listen extends Activity {
|
|
21863
21984
|
...options,
|
21864
21985
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
21865
21986
|
};
|
21866
|
-
if (options.format == null) {
|
21987
|
+
if (options.format == null && this.isCompactable()) {
|
21867
21988
|
const result = await super.toJsonLd({
|
21868
21989
|
...options,
|
21869
21990
|
format: undefined,
|
@@ -21916,6 +22037,9 @@ export class Listen extends Activity {
|
|
21916
22037
|
}
|
21917
22038
|
return compacted;
|
21918
22039
|
}
|
22040
|
+
isCompactable() {
|
22041
|
+
return super.isCompactable();
|
22042
|
+
}
|
21919
22043
|
/**
|
21920
22044
|
* Converts a JSON-LD structure to an object of this type.
|
21921
22045
|
* @param json The JSON-LD structure to convert.
|
@@ -22042,7 +22166,7 @@ export class Mention extends Link {
|
|
22042
22166
|
...options,
|
22043
22167
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
22044
22168
|
};
|
22045
|
-
if (options.format == null) {
|
22169
|
+
if (options.format == null && this.isCompactable()) {
|
22046
22170
|
const result = await super.toJsonLd({
|
22047
22171
|
...options,
|
22048
22172
|
format: undefined,
|
@@ -22078,6 +22202,9 @@ export class Mention extends Link {
|
|
22078
22202
|
}
|
22079
22203
|
return compacted;
|
22080
22204
|
}
|
22205
|
+
isCompactable() {
|
22206
|
+
return super.isCompactable();
|
22207
|
+
}
|
22081
22208
|
/**
|
22082
22209
|
* Converts a JSON-LD structure to an object of this type.
|
22083
22210
|
* @param json The JSON-LD structure to convert.
|
@@ -22206,7 +22333,7 @@ export class Move extends Activity {
|
|
22206
22333
|
...options,
|
22207
22334
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
22208
22335
|
};
|
22209
|
-
if (options.format == null) {
|
22336
|
+
if (options.format == null && this.isCompactable()) {
|
22210
22337
|
const result = await super.toJsonLd({
|
22211
22338
|
...options,
|
22212
22339
|
format: undefined,
|
@@ -22259,6 +22386,9 @@ export class Move extends Activity {
|
|
22259
22386
|
}
|
22260
22387
|
return compacted;
|
22261
22388
|
}
|
22389
|
+
isCompactable() {
|
22390
|
+
return super.isCompactable();
|
22391
|
+
}
|
22262
22392
|
/**
|
22263
22393
|
* Converts a JSON-LD structure to an object of this type.
|
22264
22394
|
* @param json The JSON-LD structure to convert.
|
@@ -22386,7 +22516,7 @@ export class Note extends Object {
|
|
22386
22516
|
...options,
|
22387
22517
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
22388
22518
|
};
|
22389
|
-
if (options.format == null) {
|
22519
|
+
if (options.format == null && this.isCompactable()) {
|
22390
22520
|
const result = await super.toJsonLd({
|
22391
22521
|
...options,
|
22392
22522
|
format: undefined,
|
@@ -22451,6 +22581,9 @@ export class Note extends Object {
|
|
22451
22581
|
}
|
22452
22582
|
return compacted;
|
22453
22583
|
}
|
22584
|
+
isCompactable() {
|
22585
|
+
return super.isCompactable();
|
22586
|
+
}
|
22454
22587
|
/**
|
22455
22588
|
* Converts a JSON-LD structure to an object of this type.
|
22456
22589
|
* @param json The JSON-LD structure to convert.
|
@@ -22665,7 +22798,7 @@ export class OrderedCollection extends Collection {
|
|
22665
22798
|
...options,
|
22666
22799
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
22667
22800
|
};
|
22668
|
-
if (options.format == null) {
|
22801
|
+
if (options.format == null && this.isCompactable()) {
|
22669
22802
|
const result = await super.toJsonLd({
|
22670
22803
|
...options,
|
22671
22804
|
format: undefined,
|
@@ -22767,6 +22900,9 @@ export class OrderedCollection extends Collection {
|
|
22767
22900
|
}
|
22768
22901
|
return compacted;
|
22769
22902
|
}
|
22903
|
+
isCompactable() {
|
22904
|
+
return super.isCompactable();
|
22905
|
+
}
|
22770
22906
|
/**
|
22771
22907
|
* Converts a JSON-LD structure to an object of this type.
|
22772
22908
|
* @param json The JSON-LD structure to convert.
|
@@ -23115,7 +23251,7 @@ export class OrderedCollectionPage extends CollectionPage {
|
|
23115
23251
|
...options,
|
23116
23252
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
23117
23253
|
};
|
23118
|
-
if (options.format == null) {
|
23254
|
+
if (options.format == null && this.isCompactable()) {
|
23119
23255
|
const result = await super.toJsonLd({
|
23120
23256
|
...options,
|
23121
23257
|
format: undefined,
|
@@ -23239,6 +23375,9 @@ export class OrderedCollectionPage extends CollectionPage {
|
|
23239
23375
|
}
|
23240
23376
|
return compacted;
|
23241
23377
|
}
|
23378
|
+
isCompactable() {
|
23379
|
+
return super.isCompactable();
|
23380
|
+
}
|
23242
23381
|
/**
|
23243
23382
|
* Converts a JSON-LD structure to an object of this type.
|
23244
23383
|
* @param json The JSON-LD structure to convert.
|
@@ -24878,9 +25017,7 @@ export class Organization extends Object {
|
|
24878
25017
|
...options,
|
24879
25018
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
24880
25019
|
};
|
24881
|
-
if (options.format == null &&
|
24882
|
-
(this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf == null ||
|
24883
|
-
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length < 1)) {
|
25020
|
+
if (options.format == null && this.isCompactable()) {
|
24884
25021
|
const result = await super.toJsonLd({
|
24885
25022
|
...options,
|
24886
25023
|
format: undefined,
|
@@ -25417,6 +25554,12 @@ export class Organization extends Object {
|
|
25417
25554
|
}
|
25418
25555
|
return compacted;
|
25419
25556
|
}
|
25557
|
+
isCompactable() {
|
25558
|
+
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf != null &&
|
25559
|
+
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length > 0)
|
25560
|
+
return false;
|
25561
|
+
return super.isCompactable();
|
25562
|
+
}
|
25420
25563
|
/**
|
25421
25564
|
* Converts a JSON-LD structure to an object of this type.
|
25422
25565
|
* @param json The JSON-LD structure to convert.
|
@@ -26086,7 +26229,7 @@ export class Page extends Document {
|
|
26086
26229
|
...options,
|
26087
26230
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
26088
26231
|
};
|
26089
|
-
if (options.format == null) {
|
26232
|
+
if (options.format == null && this.isCompactable()) {
|
26090
26233
|
const result = await super.toJsonLd({
|
26091
26234
|
...options,
|
26092
26235
|
format: undefined,
|
@@ -26139,6 +26282,9 @@ export class Page extends Document {
|
|
26139
26282
|
}
|
26140
26283
|
return compacted;
|
26141
26284
|
}
|
26285
|
+
isCompactable() {
|
26286
|
+
return super.isCompactable();
|
26287
|
+
}
|
26142
26288
|
/**
|
26143
26289
|
* Converts a JSON-LD structure to an object of this type.
|
26144
26290
|
* @param json The JSON-LD structure to convert.
|
@@ -27653,9 +27799,7 @@ export class Person extends Object {
|
|
27653
27799
|
...options,
|
27654
27800
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
27655
27801
|
};
|
27656
|
-
if (options.format == null &&
|
27657
|
-
(this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf == null ||
|
27658
|
-
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length < 1)) {
|
27802
|
+
if (options.format == null && this.isCompactable()) {
|
27659
27803
|
const result = await super.toJsonLd({
|
27660
27804
|
...options,
|
27661
27805
|
format: undefined,
|
@@ -28192,6 +28336,12 @@ export class Person extends Object {
|
|
28192
28336
|
}
|
28193
28337
|
return compacted;
|
28194
28338
|
}
|
28339
|
+
isCompactable() {
|
28340
|
+
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf != null &&
|
28341
|
+
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length > 0)
|
28342
|
+
return false;
|
28343
|
+
return super.isCompactable();
|
28344
|
+
}
|
28195
28345
|
/**
|
28196
28346
|
* Converts a JSON-LD structure to an object of this type.
|
28197
28347
|
* @param json The JSON-LD structure to convert.
|
@@ -29051,7 +29201,7 @@ export class Place extends Object {
|
|
29051
29201
|
...options,
|
29052
29202
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
29053
29203
|
};
|
29054
|
-
if (options.format == null) {
|
29204
|
+
if (options.format == null && this.isCompactable()) {
|
29055
29205
|
const result = await super.toJsonLd({
|
29056
29206
|
...options,
|
29057
29207
|
format: undefined,
|
@@ -29239,6 +29389,9 @@ export class Place extends Object {
|
|
29239
29389
|
}
|
29240
29390
|
return compacted;
|
29241
29391
|
}
|
29392
|
+
isCompactable() {
|
29393
|
+
return super.isCompactable();
|
29394
|
+
}
|
29242
29395
|
/**
|
29243
29396
|
* Converts a JSON-LD structure to an object of this type.
|
29244
29397
|
* @param json The JSON-LD structure to convert.
|
@@ -29365,7 +29518,8 @@ export class Place extends Object {
|
|
29365
29518
|
v["@value"] == "m" || v["@value"] == "miles")
|
29366
29519
|
? v["@value"]
|
29367
29520
|
: typeof v === "object" && "@id" in v &&
|
29368
|
-
typeof v["@id"] === "string"
|
29521
|
+
typeof v["@id"] === "string" &&
|
29522
|
+
v["@id"] !== "" && v["@id"] !== "/"
|
29369
29523
|
? new URL(v["@id"])
|
29370
29524
|
: undefined;
|
29371
29525
|
if (typeof decoded === "undefined")
|
@@ -29602,7 +29756,7 @@ export class Profile extends Object {
|
|
29602
29756
|
...options,
|
29603
29757
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
29604
29758
|
};
|
29605
|
-
if (options.format == null) {
|
29759
|
+
if (options.format == null && this.isCompactable()) {
|
29606
29760
|
const result = await super.toJsonLd({
|
29607
29761
|
...options,
|
29608
29762
|
format: undefined,
|
@@ -29680,6 +29834,9 @@ export class Profile extends Object {
|
|
29680
29834
|
}
|
29681
29835
|
return compacted;
|
29682
29836
|
}
|
29837
|
+
isCompactable() {
|
29838
|
+
return super.isCompactable();
|
29839
|
+
}
|
29683
29840
|
/**
|
29684
29841
|
* Converts a JSON-LD structure to an object of this type.
|
29685
29842
|
* @param json The JSON-LD structure to convert.
|
@@ -30062,7 +30219,7 @@ export class Question extends IntransitiveActivity {
|
|
30062
30219
|
...options,
|
30063
30220
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
30064
30221
|
};
|
30065
|
-
if (options.format == null) {
|
30222
|
+
if (options.format == null && this.isCompactable()) {
|
30066
30223
|
const result = await super.toJsonLd({
|
30067
30224
|
...options,
|
30068
30225
|
format: undefined,
|
@@ -30225,6 +30382,9 @@ export class Question extends IntransitiveActivity {
|
|
30225
30382
|
}
|
30226
30383
|
return compacted;
|
30227
30384
|
}
|
30385
|
+
isCompactable() {
|
30386
|
+
return super.isCompactable();
|
30387
|
+
}
|
30228
30388
|
/**
|
30229
30389
|
* Converts a JSON-LD structure to an object of this type.
|
30230
30390
|
* @param json The JSON-LD structure to convert.
|
@@ -30471,7 +30631,7 @@ export class Read extends Activity {
|
|
30471
30631
|
...options,
|
30472
30632
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
30473
30633
|
};
|
30474
|
-
if (options.format == null) {
|
30634
|
+
if (options.format == null && this.isCompactable()) {
|
30475
30635
|
const result = await super.toJsonLd({
|
30476
30636
|
...options,
|
30477
30637
|
format: undefined,
|
@@ -30524,6 +30684,9 @@ export class Read extends Activity {
|
|
30524
30684
|
}
|
30525
30685
|
return compacted;
|
30526
30686
|
}
|
30687
|
+
isCompactable() {
|
30688
|
+
return super.isCompactable();
|
30689
|
+
}
|
30527
30690
|
/**
|
30528
30691
|
* Converts a JSON-LD structure to an object of this type.
|
30529
30692
|
* @param json The JSON-LD structure to convert.
|
@@ -30651,7 +30814,7 @@ export class Reject extends Activity {
|
|
30651
30814
|
...options,
|
30652
30815
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
30653
30816
|
};
|
30654
|
-
if (options.format == null) {
|
30817
|
+
if (options.format == null && this.isCompactable()) {
|
30655
30818
|
const result = await super.toJsonLd({
|
30656
30819
|
...options,
|
30657
30820
|
format: undefined,
|
@@ -30704,6 +30867,9 @@ export class Reject extends Activity {
|
|
30704
30867
|
}
|
30705
30868
|
return compacted;
|
30706
30869
|
}
|
30870
|
+
isCompactable() {
|
30871
|
+
return super.isCompactable();
|
30872
|
+
}
|
30707
30873
|
/**
|
30708
30874
|
* Converts a JSON-LD structure to an object of this type.
|
30709
30875
|
* @param json The JSON-LD structure to convert.
|
@@ -31193,7 +31359,7 @@ export class Relationship extends Object {
|
|
31193
31359
|
...options,
|
31194
31360
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
31195
31361
|
};
|
31196
|
-
if (options.format == null) {
|
31362
|
+
if (options.format == null && this.isCompactable()) {
|
31197
31363
|
const result = await super.toJsonLd({
|
31198
31364
|
...options,
|
31199
31365
|
format: undefined,
|
@@ -31321,6 +31487,9 @@ export class Relationship extends Object {
|
|
31321
31487
|
}
|
31322
31488
|
return compacted;
|
31323
31489
|
}
|
31490
|
+
isCompactable() {
|
31491
|
+
return super.isCompactable();
|
31492
|
+
}
|
31324
31493
|
/**
|
31325
31494
|
* Converts a JSON-LD structure to an object of this type.
|
31326
31495
|
* @param json The JSON-LD structure to convert.
|
@@ -31545,7 +31714,7 @@ export class Remove extends Activity {
|
|
31545
31714
|
...options,
|
31546
31715
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
31547
31716
|
};
|
31548
|
-
if (options.format == null) {
|
31717
|
+
if (options.format == null && this.isCompactable()) {
|
31549
31718
|
const result = await super.toJsonLd({
|
31550
31719
|
...options,
|
31551
31720
|
format: undefined,
|
@@ -31598,6 +31767,9 @@ export class Remove extends Activity {
|
|
31598
31767
|
}
|
31599
31768
|
return compacted;
|
31600
31769
|
}
|
31770
|
+
isCompactable() {
|
31771
|
+
return super.isCompactable();
|
31772
|
+
}
|
31601
31773
|
/**
|
31602
31774
|
* Converts a JSON-LD structure to an object of this type.
|
31603
31775
|
* @param json The JSON-LD structure to convert.
|
@@ -33112,9 +33284,7 @@ export class Service extends Object {
|
|
33112
33284
|
...options,
|
33113
33285
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
33114
33286
|
};
|
33115
|
-
if (options.format == null &&
|
33116
|
-
(this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf == null ||
|
33117
|
-
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length < 1)) {
|
33287
|
+
if (options.format == null && this.isCompactable()) {
|
33118
33288
|
const result = await super.toJsonLd({
|
33119
33289
|
...options,
|
33120
33290
|
format: undefined,
|
@@ -33651,6 +33821,12 @@ export class Service extends Object {
|
|
33651
33821
|
}
|
33652
33822
|
return compacted;
|
33653
33823
|
}
|
33824
|
+
isCompactable() {
|
33825
|
+
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf != null &&
|
33826
|
+
this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf.length > 0)
|
33827
|
+
return false;
|
33828
|
+
return super.isCompactable();
|
33829
|
+
}
|
33654
33830
|
/**
|
33655
33831
|
* Converts a JSON-LD structure to an object of this type.
|
33656
33832
|
* @param json The JSON-LD structure to convert.
|
@@ -34434,9 +34610,7 @@ export class Source {
|
|
34434
34610
|
...options,
|
34435
34611
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
34436
34612
|
};
|
34437
|
-
if (options.format == null &&
|
34438
|
-
(this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz == null ||
|
34439
|
-
this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz.length < 1)) {
|
34613
|
+
if (options.format == null && this.isCompactable()) {
|
34440
34614
|
const result = {};
|
34441
34615
|
// deno-lint-ignore no-unused-vars
|
34442
34616
|
let compactItems;
|
@@ -34507,6 +34681,12 @@ export class Source {
|
|
34507
34681
|
}
|
34508
34682
|
return compacted;
|
34509
34683
|
}
|
34684
|
+
isCompactable() {
|
34685
|
+
if (this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz != null &&
|
34686
|
+
this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz.length > 0)
|
34687
|
+
return false;
|
34688
|
+
return true;
|
34689
|
+
}
|
34510
34690
|
/**
|
34511
34691
|
* Converts a JSON-LD structure to an object of this type.
|
34512
34692
|
* @param json The JSON-LD structure to convert.
|
@@ -34695,7 +34875,7 @@ export class TentativeAccept extends Accept {
|
|
34695
34875
|
...options,
|
34696
34876
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
34697
34877
|
};
|
34698
|
-
if (options.format == null) {
|
34878
|
+
if (options.format == null && this.isCompactable()) {
|
34699
34879
|
const result = await super.toJsonLd({
|
34700
34880
|
...options,
|
34701
34881
|
format: undefined,
|
@@ -34748,6 +34928,9 @@ export class TentativeAccept extends Accept {
|
|
34748
34928
|
}
|
34749
34929
|
return compacted;
|
34750
34930
|
}
|
34931
|
+
isCompactable() {
|
34932
|
+
return super.isCompactable();
|
34933
|
+
}
|
34751
34934
|
/**
|
34752
34935
|
* Converts a JSON-LD structure to an object of this type.
|
34753
34936
|
* @param json The JSON-LD structure to convert.
|
@@ -34875,7 +35058,7 @@ export class TentativeReject extends Reject {
|
|
34875
35058
|
...options,
|
34876
35059
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
34877
35060
|
};
|
34878
|
-
if (options.format == null) {
|
35061
|
+
if (options.format == null && this.isCompactable()) {
|
34879
35062
|
const result = await super.toJsonLd({
|
34880
35063
|
...options,
|
34881
35064
|
format: undefined,
|
@@ -34928,6 +35111,9 @@ export class TentativeReject extends Reject {
|
|
34928
35111
|
}
|
34929
35112
|
return compacted;
|
34930
35113
|
}
|
35114
|
+
isCompactable() {
|
35115
|
+
return super.isCompactable();
|
35116
|
+
}
|
34931
35117
|
/**
|
34932
35118
|
* Converts a JSON-LD structure to an object of this type.
|
34933
35119
|
* @param json The JSON-LD structure to convert.
|
@@ -35086,7 +35272,7 @@ export class Tombstone extends Object {
|
|
35086
35272
|
...options,
|
35087
35273
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
35088
35274
|
};
|
35089
|
-
if (options.format == null) {
|
35275
|
+
if (options.format == null && this.isCompactable()) {
|
35090
35276
|
const result = await super.toJsonLd({
|
35091
35277
|
...options,
|
35092
35278
|
format: undefined,
|
@@ -35161,6 +35347,9 @@ export class Tombstone extends Object {
|
|
35161
35347
|
}
|
35162
35348
|
return compacted;
|
35163
35349
|
}
|
35350
|
+
isCompactable() {
|
35351
|
+
return super.isCompactable();
|
35352
|
+
}
|
35164
35353
|
/**
|
35165
35354
|
* Converts a JSON-LD structure to an object of this type.
|
35166
35355
|
* @param json The JSON-LD structure to convert.
|
@@ -35314,7 +35503,7 @@ export class Travel extends IntransitiveActivity {
|
|
35314
35503
|
...options,
|
35315
35504
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
35316
35505
|
};
|
35317
|
-
if (options.format == null) {
|
35506
|
+
if (options.format == null && this.isCompactable()) {
|
35318
35507
|
const result = await super.toJsonLd({
|
35319
35508
|
...options,
|
35320
35509
|
format: undefined,
|
@@ -35367,6 +35556,9 @@ export class Travel extends IntransitiveActivity {
|
|
35367
35556
|
}
|
35368
35557
|
return compacted;
|
35369
35558
|
}
|
35559
|
+
isCompactable() {
|
35560
|
+
return super.isCompactable();
|
35561
|
+
}
|
35370
35562
|
/**
|
35371
35563
|
* Converts a JSON-LD structure to an object of this type.
|
35372
35564
|
* @param json The JSON-LD structure to convert.
|
@@ -35499,7 +35691,7 @@ export class Undo extends Activity {
|
|
35499
35691
|
...options,
|
35500
35692
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
35501
35693
|
};
|
35502
|
-
if (options.format == null) {
|
35694
|
+
if (options.format == null && this.isCompactable()) {
|
35503
35695
|
const result = await super.toJsonLd({
|
35504
35696
|
...options,
|
35505
35697
|
format: undefined,
|
@@ -35552,6 +35744,9 @@ export class Undo extends Activity {
|
|
35552
35744
|
}
|
35553
35745
|
return compacted;
|
35554
35746
|
}
|
35747
|
+
isCompactable() {
|
35748
|
+
return super.isCompactable();
|
35749
|
+
}
|
35555
35750
|
/**
|
35556
35751
|
* Converts a JSON-LD structure to an object of this type.
|
35557
35752
|
* @param json The JSON-LD structure to convert.
|
@@ -35682,7 +35877,7 @@ export class Update extends Activity {
|
|
35682
35877
|
...options,
|
35683
35878
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
35684
35879
|
};
|
35685
|
-
if (options.format == null) {
|
35880
|
+
if (options.format == null && this.isCompactable()) {
|
35686
35881
|
const result = await super.toJsonLd({
|
35687
35882
|
...options,
|
35688
35883
|
format: undefined,
|
@@ -35751,6 +35946,9 @@ export class Update extends Activity {
|
|
35751
35946
|
}
|
35752
35947
|
return compacted;
|
35753
35948
|
}
|
35949
|
+
isCompactable() {
|
35950
|
+
return super.isCompactable();
|
35951
|
+
}
|
35754
35952
|
/**
|
35755
35953
|
* Converts a JSON-LD structure to an object of this type.
|
35756
35954
|
* @param json The JSON-LD structure to convert.
|
@@ -35877,7 +36075,7 @@ export class Video extends Document {
|
|
35877
36075
|
...options,
|
35878
36076
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
35879
36077
|
};
|
35880
|
-
if (options.format == null) {
|
36078
|
+
if (options.format == null && this.isCompactable()) {
|
35881
36079
|
const result = await super.toJsonLd({
|
35882
36080
|
...options,
|
35883
36081
|
format: undefined,
|
@@ -35930,6 +36128,9 @@ export class Video extends Document {
|
|
35930
36128
|
}
|
35931
36129
|
return compacted;
|
35932
36130
|
}
|
36131
|
+
isCompactable() {
|
36132
|
+
return super.isCompactable();
|
36133
|
+
}
|
35933
36134
|
/**
|
35934
36135
|
* Converts a JSON-LD structure to an object of this type.
|
35935
36136
|
* @param json The JSON-LD structure to convert.
|
@@ -36056,7 +36257,7 @@ export class View extends Activity {
|
|
36056
36257
|
...options,
|
36057
36258
|
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
36058
36259
|
};
|
36059
|
-
if (options.format == null) {
|
36260
|
+
if (options.format == null && this.isCompactable()) {
|
36060
36261
|
const result = await super.toJsonLd({
|
36061
36262
|
...options,
|
36062
36263
|
format: undefined,
|
@@ -36109,6 +36310,9 @@ export class View extends Activity {
|
|
36109
36310
|
}
|
36110
36311
|
return compacted;
|
36111
36312
|
}
|
36313
|
+
isCompactable() {
|
36314
|
+
return super.isCompactable();
|
36315
|
+
}
|
36112
36316
|
/**
|
36113
36317
|
* Converts a JSON-LD structure to an object of this type.
|
36114
36318
|
* @param json The JSON-LD structure to convert.
|