@fedify/vocab-tools 2.5.0-dev.2619 → 2.5.0-dev.2687

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/src/codec.ts CHANGED
@@ -137,13 +137,7 @@ export async function* generateEncoder(
137
137
  yield "retainedSignedValueRef(v, signedValues.scope) ?? (";
138
138
  yield "v instanceof URL ? formatIri(v) : ";
139
139
  }
140
- const encoders = getEncoders(
141
- property.range,
142
- types,
143
- "v",
144
- "options",
145
- true,
146
- );
140
+ const encoders = getEncoders(property.range, types, "v", "options", true);
147
141
  for (const code of encoders) yield code;
148
142
  if (!areAllScalarTypes(property.range, types)) yield ")";
149
143
  yield `
@@ -188,10 +182,10 @@ export async function* generateEncoder(
188
182
  }
189
183
  yield `
190
184
  ${
191
- type.typeless
192
- ? ""
193
- : `result["type"] = ${JSON.stringify(type.compactName ?? type.uri)};`
194
- }
185
+ type.typeless
186
+ ? ""
187
+ : `result["type"] = ${JSON.stringify(type.compactName ?? type.uri)};`
188
+ }
195
189
  if (this.id != null) result["id"] = formatIri(this.id);
196
190
  result["@context"] = ${JSON.stringify(type.defaultContext)};
197
191
  return signedValues.owner
@@ -290,7 +284,7 @@ export async function* generateEncoder(
290
284
  ${JSON.stringify(type.defaultContext)};
291
285
  `;
292
286
  const hasExtraContexts = Object.values(types).some((t) =>
293
- t.properties.some((p) => p.extraContext != null)
287
+ t.properties.some((p) => p.extraContext != null),
294
288
  );
295
289
  if (hasExtraContexts) {
296
290
  yield `
@@ -567,9 +561,10 @@ export async function* generateDecoder(
567
561
  const variable = await getFieldName(property.uri, "");
568
562
  yield await generateField(property, types, "const ");
569
563
  const arrayVariable = `${variable}__array`;
570
- const propertyValues = property.uri === "https://w3id.org/fep/ef61/gateways"
571
- ? "getPortableActorGateways(values) as typeof values[string]"
572
- : `values[${JSON.stringify(property.uri)}]`;
564
+ const propertyValues =
565
+ property.uri === "https://w3id.org/fep/ef61/gateways"
566
+ ? "getPortableActorGateways(values) as typeof values[string]"
567
+ : `values[${JSON.stringify(property.uri)}]`;
573
568
  yield `
574
569
  let ${arrayVariable} = ${propertyValues};
575
570
  `;
@@ -582,13 +577,10 @@ export async function* generateDecoder(
582
577
  `;
583
578
  }
584
579
  }
585
- let itemsExpression =
586
- `${arrayVariable}.length === 1 && "@list" in ${arrayVariable}[0]
580
+ let itemsExpression = `${arrayVariable}.length === 1 && "@list" in ${arrayVariable}[0]
587
581
  ? ${arrayVariable}[0]["@list"]
588
582
  : ${arrayVariable}`;
589
- if (
590
- isNonFunctionalProperty(property) && property.container === "graph"
591
- ) {
583
+ if (isNonFunctionalProperty(property) && property.container === "graph") {
592
584
  itemsExpression = `(${itemsExpression}).flatMap((item: unknown) =>
593
585
  item != null && typeof item === "object" && "@graph" in item &&
594
586
  Array.isArray((item as { "@graph": unknown })["@graph"])
@@ -625,8 +617,8 @@ export async function* generateDecoder(
625
617
  yield `
626
618
  const decoded =
627
619
  `;
628
- const lenient = property.range.length == 1 &&
629
- skipsUnparsable(property.range[0]);
620
+ const lenient =
621
+ property.range.length == 1 && skipsUnparsable(property.range[0]);
630
622
  if (property.range.length == 1) {
631
623
  if (lenient) {
632
624
  yield getDataCheck(property.range[0], types, "v");
@@ -22,9 +22,10 @@ function generateParameterType(
22
22
  );
23
23
  } else {
24
24
  code.push(
25
- `${property.singularName}?: ${
26
- getTypeNames(range, types)
27
- } | URL | null;`,
25
+ `${property.singularName}?: ${getTypeNames(
26
+ range,
27
+ types,
28
+ )} | URL | null;`,
28
29
  );
29
30
  }
30
31
  }
@@ -53,12 +54,12 @@ async function* generateParametersType(
53
54
  if (type.extends == null) {
54
55
  yield `id?: URL | null;\n`;
55
56
  } else {
56
- for await (
57
- const code of generateParametersType(type.extends, types, false, [
58
- ...excludeProperties,
59
- ...type.properties.map((p) => p.singularName),
60
- ])
61
- ) {
57
+ for await (const code of generateParametersType(
58
+ type.extends,
59
+ types,
60
+ false,
61
+ [...excludeProperties, ...type.properties.map((p) => p.singularName)],
62
+ )) {
62
63
  yield code;
63
64
  }
64
65
  }
@@ -74,7 +75,8 @@ function generateValidatedArrayCopy(
74
75
  typeNames: string,
75
76
  typeGuards: string,
76
77
  ): string {
77
- return `
78
+ return (
79
+ `
78
80
  let copied!: (${typeNames})[];
79
81
  let valid = false;
80
82
  if (Array.isArray(values.${name})) {
@@ -100,7 +102,8 @@ function generateValidatedArrayCopy(
100
102
  }
101
103
  }
102
104
  if (valid) {
103
- `.trimEnd() + "\n";
105
+ `.trimEnd() + "\n"
106
+ );
104
107
  }
105
108
 
106
109
  export async function* generateConstructor(
@@ -164,8 +167,7 @@ export async function* generateConstructor(
164
167
  let typeNames = getTypeNames(property.range, types);
165
168
  const scalar = areAllScalarTypes(property.range, types);
166
169
  if (!scalar) {
167
- typeGuards =
168
- `${typeGuards} || values.${property.singularName} instanceof URL`;
170
+ typeGuards = `${typeGuards} || values.${property.singularName} instanceof URL`;
169
171
  typeNames = `${typeNames} | URL`;
170
172
  }
171
173
  yield `
@@ -323,8 +325,7 @@ export async function* generateCloner(
323
325
  let typeNames = getTypeNames(property.range, types);
324
326
  const scalar = areAllScalarTypes(property.range, types);
325
327
  if (!scalar) {
326
- typeGuards =
327
- `${typeGuards} || values.${property.singularName} instanceof URL`;
328
+ typeGuards = `${typeGuards} || values.${property.singularName} instanceof URL`;
328
329
  typeNames = `${typeNames} | URL`;
329
330
  }
330
331
  yield `
@@ -397,10 +398,12 @@ export async function* generateCloner(
397
398
  `;
398
399
  }
399
400
  }
400
- yield `
401
+ yield (
402
+ `
401
403
  return clone;
402
404
  }
403
- `.trimEnd() + "\n";
405
+ `.trimEnd() + "\n"
406
+ );
404
407
  }
405
408
 
406
409
  export async function* generateDeepCloner(
package/src/deep-clone.ts CHANGED
@@ -6,8 +6,9 @@ function needsCopy(
6
6
  property: PropertySchema,
7
7
  types: Record<string, TypeSchema>,
8
8
  ): boolean {
9
- return property.range.some((uri) =>
10
- uri in types || ["URL", "Uint8Array"].includes(getTypeName(uri, types))
9
+ return property.range.some(
10
+ (uri) =>
11
+ uri in types || ["URL", "Uint8Array"].includes(getTypeName(uri, types)),
11
12
  );
12
13
  }
13
14
 
package/src/field.ts CHANGED
@@ -22,9 +22,11 @@ export async function generateField(
22
22
  ): Promise<string> {
23
23
  const fieldName = await getFieldName(property.uri, prefix);
24
24
  if (areAllScalarTypes(property.range, types)) {
25
- return `${fieldName}: (${
26
- getTypeNames(property.range, types, true)
27
- })[] = [];\n`;
25
+ return `${fieldName}: (${getTypeNames(
26
+ property.range,
27
+ types,
28
+ true,
29
+ )})[] = [];\n`;
28
30
  } else {
29
31
  const typeNames = getTypeNames(property.range, types);
30
32
  const trustFieldName = await getFieldName(property.uri, `${prefix}_trust`);
package/src/inspector.ts CHANGED
@@ -9,9 +9,10 @@ export async function* generateInspector(
9
9
  ): AsyncIterable<string> {
10
10
  const type = types[typeUri];
11
11
  yield `
12
- protected ${
13
- emitOverride(typeUri, types)
14
- } _getCustomInspectProxy(): Record<string, unknown> {
12
+ protected ${emitOverride(
13
+ typeUri,
14
+ types,
15
+ )} _getCustomInspectProxy(): Record<string, unknown> {
15
16
  `;
16
17
  if (type.extends == null) {
17
18
  yield `
package/src/property.ts CHANGED
@@ -41,9 +41,10 @@ async function* generateProperty(
41
41
  if (areAllScalarTypes(property.range, types)) {
42
42
  if (hasSingularAccessor(property)) {
43
43
  yield doc;
44
- yield `${override} get ${property.singularName}(): (${
45
- getTypeNames(property.range, types)
46
- } | null) {
44
+ yield `${override} get ${property.singularName}(): (${getTypeNames(
45
+ property.range,
46
+ types,
47
+ )} | null) {
47
48
  if (this._warning != null) {
48
49
  getLogger(this._warning.category).warn(
49
50
  this._warning.message,
@@ -57,9 +58,11 @@ async function* generateProperty(
57
58
  }
58
59
  if (isNonFunctionalProperty(property)) {
59
60
  yield doc;
60
- yield `get ${property.pluralName}(): (${
61
- getTypeNames(property.range, types, true)
62
- })[] {
61
+ yield `get ${property.pluralName}(): (${getTypeNames(
62
+ property.range,
63
+ types,
64
+ true,
65
+ )})[] {
63
66
  return this.${await getFieldName(property.uri)};
64
67
  }
65
68
  `;
@@ -308,10 +311,7 @@ async function* generateProperty(
308
311
  const baseUrl = options.baseUrl;
309
312
  const verifyPortableObject = options.verifyPortableObject;
310
313
  `;
311
- if (
312
- property.preprocessors != null &&
313
- property.preprocessors.length > 0
314
- ) {
314
+ if (property.preprocessors != null && property.preprocessors.length > 0) {
315
315
  yield `
316
316
  if (jsonLd != null && typeof jsonLd === "object") {
317
317
  const _expanded = await jsonld.expand(jsonLd, {
@@ -331,9 +331,9 @@ async function* generateProperty(
331
331
  }
332
332
  yield `
333
333
  {
334
- const _result = await ${varName}[${
335
- JSON.stringify(pp.function)
336
- }](_pp_obj, {
334
+ const _result = await ${varName}[${JSON.stringify(
335
+ pp.function,
336
+ )}](_pp_obj, {
337
337
  documentLoader,
338
338
  contextLoader,
339
339
  tracerProvider,
@@ -341,9 +341,10 @@ async function* generateProperty(
341
341
  baseUrl,
342
342
  });
343
343
  if (_result instanceof Error) throw _result;
344
- if (_result !== undefined) return _result as ${
345
- getTypeNames(property.range, types)
346
- };
344
+ if (_result !== undefined) return _result as ${getTypeNames(
345
+ property.range,
346
+ types,
347
+ )};
347
348
  }
348
349
  `;
349
350
  }
@@ -443,15 +444,15 @@ async function* generateProperty(
443
444
  let v = this.${await getFieldName(property.uri)}[0];
444
445
  if (!(v instanceof URL) &&
445
446
  !(0 < (this.${await getFieldName(
446
- property.uri,
447
- "#_trust",
448
- )}[vocabTrustPrefix] ?? 0) ||
447
+ property.uri,
448
+ "#_trust",
449
+ )}[vocabTrustPrefix] ?? 0) ||
449
450
  this.${await getFieldName(property.uri, "#_trust")}.has(0))) {
450
451
  if (v.id == null) {
451
452
  if (isUnsecuredPortableObject(this)) {
452
- warnUnverifiableEmbeddedObject(this, ${
453
- JSON.stringify(property.uri)
454
- });
453
+ warnUnverifiableEmbeddedObject(this, ${JSON.stringify(
454
+ property.uri,
455
+ )});
455
456
  return null;
456
457
  }
457
458
  } else if (
@@ -472,9 +473,9 @@ async function* generateProperty(
472
473
  this.${await getFieldName(property.uri)}[0] = fetched;
473
474
  this.${await getFieldName(property.uri, "#_trust")}.add(0);
474
475
  this._cachedJsonLd = undefined;
475
- recordPortableReferrer(this, fetched, ${
476
- JSON.stringify(property.uri)
477
- });
476
+ recordPortableReferrer(this, fetched, ${JSON.stringify(
477
+ property.uri,
478
+ )});
478
479
  return fetched;
479
480
  }
480
481
  `;
@@ -512,25 +513,25 @@ async function* generateProperty(
512
513
  yield `
513
514
  if (v?.id != null &&
514
515
  ((${
515
- type.trustEmbeddedObjects === false ? "" : "this.id != null && "
516
- }!isTrustedIriOrigin(options, v.id, ${trustOwner})) ||
516
+ type.trustEmbeddedObjects === false ? "" : "this.id != null && "
517
+ }!isTrustedIriOrigin(options, v.id, ${trustOwner})) ||
517
518
  isUnsecuredPortableObject(this) ||
518
519
  mustDereferencePortableObject(
519
520
  this, ${trustOwner}, v.id, options,
520
521
  )) &&
521
522
  !(0 < (this.${await getFieldName(
522
- property.uri,
523
- "#_trust",
524
- )}[vocabTrustPrefix] ?? 0) ||
523
+ property.uri,
524
+ "#_trust",
525
+ )}[vocabTrustPrefix] ?? 0) ||
525
526
  this.${await getFieldName(property.uri, "#_trust")}.has(0))) {
526
527
  if (options.crossOrigin === "throw") {
527
528
  throw new Error(
528
529
  "The property object's @id (" + v.id.href + ") has a different " +
529
530
  "origin than the property owner's @id (" + ${
530
- type.trustEmbeddedObjects === false
531
- ? '"untrusted metadata"'
532
- : "(this.id?.href ?? null)"
533
- } + "); " +
531
+ type.trustEmbeddedObjects === false
532
+ ? '"untrusted metadata"'
533
+ : "(this.id?.href ?? null)"
534
+ } + "); " +
534
535
  "refusing to return the object. If you want to bypass this " +
535
536
  "check and are aware of the security implications, set the " +
536
537
  'crossOrigin option to "trust".'
@@ -543,10 +544,10 @@ async function* generateProperty(
543
544
  "aware of the security implications, set the crossOrigin option " +
544
545
  'to "trust".',
545
546
  { objectId: v.id.href, parentObjectId: ${
546
- type.trustEmbeddedObjects === false
547
- ? '"untrusted metadata"'
548
- : "(this.id?.href ?? null)"
549
- } },
547
+ type.trustEmbeddedObjects === false
548
+ ? '"untrusted metadata"'
549
+ : "(this.id?.href ?? null)"
550
+ } },
550
551
  );
551
552
  return null;
552
553
  }
@@ -620,15 +621,15 @@ async function* generateProperty(
620
621
  let v = vs[i];
621
622
  if (!(v instanceof URL) &&
622
623
  !(i < (this.${await getFieldName(
623
- property.uri,
624
- "#_trust",
625
- )}[vocabTrustPrefix] ?? 0) ||
624
+ property.uri,
625
+ "#_trust",
626
+ )}[vocabTrustPrefix] ?? 0) ||
626
627
  this.${await getFieldName(property.uri, "#_trust")}.has(i))) {
627
628
  if (v.id == null) {
628
629
  if (isUnsecuredPortableObject(this)) {
629
- warnUnverifiableEmbeddedObject(this, ${
630
- JSON.stringify(property.uri)
631
- });
630
+ warnUnverifiableEmbeddedObject(this, ${JSON.stringify(
631
+ property.uri,
632
+ )});
632
633
  continue;
633
634
  }
634
635
  } else if (
@@ -652,9 +653,9 @@ async function* generateProperty(
652
653
  vs[i] = fetched;
653
654
  this.${await getFieldName(property.uri, "#_trust")}.add(i);
654
655
  this._cachedJsonLd = undefined;
655
- recordPortableReferrer(this, fetched, ${
656
- JSON.stringify(property.uri)
657
- });
656
+ recordPortableReferrer(this, fetched, ${JSON.stringify(
657
+ property.uri,
658
+ )});
658
659
  yield fetched;
659
660
  continue;
660
661
  }
@@ -682,9 +683,9 @@ async function* generateProperty(
682
683
  if (!options.suppressError) throw error;
683
684
  getLogger(["fedify", "vocab"]).debug(
684
685
  "Failed to parse embedded value of {property} at index {index}: {error}",
685
- { property: ${
686
- JSON.stringify(property.uri)
687
- }, index: i, error },
686
+ { property: ${JSON.stringify(
687
+ property.uri,
688
+ )}, index: i, error },
688
689
  );
689
690
  continue;
690
691
  }
@@ -695,25 +696,25 @@ async function* generateProperty(
695
696
  yield `
696
697
  if (v?.id != null &&
697
698
  ((${
698
- type.trustEmbeddedObjects === false ? "" : "this.id != null && "
699
- }!isTrustedIriOrigin(options, v.id, ${trustOwner})) ||
699
+ type.trustEmbeddedObjects === false ? "" : "this.id != null && "
700
+ }!isTrustedIriOrigin(options, v.id, ${trustOwner})) ||
700
701
  isUnsecuredPortableObject(this) ||
701
702
  mustDereferencePortableObject(
702
703
  this, ${trustOwner}, v.id, options,
703
704
  )) &&
704
705
  !(i < (this.${await getFieldName(
705
- property.uri,
706
- "#_trust",
707
- )}[vocabTrustPrefix] ?? 0) ||
706
+ property.uri,
707
+ "#_trust",
708
+ )}[vocabTrustPrefix] ?? 0) ||
708
709
  this.${await getFieldName(property.uri, "#_trust")}.has(i))) {
709
710
  if (options.crossOrigin === "throw") {
710
711
  throw new Error(
711
712
  "The property object's @id (" + v.id.href + ") has a different " +
712
713
  "origin than the property owner's @id (" + ${
713
- type.trustEmbeddedObjects === false
714
- ? '"untrusted metadata"'
715
- : "(this.id?.href ?? null)"
716
- } + "); " +
714
+ type.trustEmbeddedObjects === false
715
+ ? '"untrusted metadata"'
716
+ : "(this.id?.href ?? null)"
717
+ } + "); " +
717
718
  "refusing to return the object. If you want to bypass this " +
718
719
  "check and are aware of the security implications, set the " +
719
720
  'crossOrigin option to "trust".'
@@ -726,10 +727,10 @@ async function* generateProperty(
726
727
  "aware of the security implications, set the crossOrigin " +
727
728
  'option to "trust".',
728
729
  { objectId: v.id.href, parentObjectId: ${
729
- type.trustEmbeddedObjects === false
730
- ? '"untrusted metadata"'
731
- : "(this.id?.href ?? null)"
732
- } },
730
+ type.trustEmbeddedObjects === false
731
+ ? '"untrusted metadata"'
732
+ : "(this.id?.href ?? null)"
733
+ } },
733
734
  );
734
735
  continue;
735
736
  }
@@ -15,8 +15,7 @@ import {
15
15
  } from "./schema.ts";
16
16
 
17
17
  test(
18
- "isNonFunctionalProperty: " +
19
- "returns true for non-functional property",
18
+ "isNonFunctionalProperty: " + "returns true for non-functional property",
20
19
  () => {
21
20
  const property: PropertySchema = {
22
21
  singularName: "name",
@@ -172,28 +171,25 @@ test("Type guard combinations: non-functional property with container", () => {
172
171
  }
173
172
  });
174
173
 
175
- test(
176
- "Type guard combinations: non-functional property with graph container",
177
- () => {
178
- const property: PropertySchema = {
179
- singularName: "member",
180
- pluralName: "members",
181
- uri: "https://example.com/member",
182
- description: "Graph of members",
183
- range: ["https://example.com/Member"] as [TypeUri],
184
- functional: false,
185
- container: "graph",
186
- };
174
+ test("Type guard combinations: non-functional property with graph container", () => {
175
+ const property: PropertySchema = {
176
+ singularName: "member",
177
+ pluralName: "members",
178
+ uri: "https://example.com/member",
179
+ description: "Graph of members",
180
+ range: ["https://example.com/Member"] as [TypeUri],
181
+ functional: false,
182
+ container: "graph",
183
+ };
187
184
 
188
- ok(isNonFunctionalProperty(property));
189
- ok(!hasSingularAccessor(property));
185
+ ok(isNonFunctionalProperty(property));
186
+ ok(!hasSingularAccessor(property));
190
187
 
191
- // Type narrowing test
192
- if (isNonFunctionalProperty(property)) {
193
- deepStrictEqual(property.container, "graph");
194
- }
195
- },
196
- );
188
+ // Type narrowing test
189
+ if (isNonFunctionalProperty(property)) {
190
+ deepStrictEqual(property.container, "graph");
191
+ }
192
+ });
197
193
 
198
194
  test("Type guard combinations: untyped property", () => {
199
195
  const property: PropertySchema = {
@@ -288,21 +284,21 @@ test("loadSchemaFiles validates redundant properties on both property kinds", as
288
284
  policy,
289
285
  );
290
286
  }
291
- for (
292
- const invalid of [
293
- { redundantPropertiesWrite: "merge" },
294
- { redundantPropertiesWrite: 42 },
295
- { redundantProperties: "alias" },
296
- { redundantProperties: [{}] },
297
- { redundantProperties: [{ uri: 42 }] },
298
- {
299
- redundantProperties: [{
287
+ for (const invalid of [
288
+ { redundantPropertiesWrite: "merge" },
289
+ { redundantPropertiesWrite: 42 },
290
+ { redundantProperties: "alias" },
291
+ { redundantProperties: [{}] },
292
+ { redundantProperties: [{ uri: 42 }] },
293
+ {
294
+ redundantProperties: [
295
+ {
300
296
  uri: "https://example.com/alias",
301
297
  compactName: 42,
302
- }],
303
- },
304
- ]
305
- ) {
298
+ },
299
+ ],
300
+ },
301
+ ]) {
306
302
  await writeFile(
307
303
  join(dir, "fixture.yaml"),
308
304
  stringify({
@@ -340,12 +336,14 @@ test("loadSchemaFiles validates context container terms", async () => {
340
336
  "@container": container,
341
337
  });
342
338
  const types = await loadSchemaFiles(dir);
343
- deepStrictEqual(types[uri].defaultContext, [{
344
- term: {
345
- "@id": "toot:attributionDomains",
346
- "@container": container,
339
+ deepStrictEqual(types[uri].defaultContext, [
340
+ {
341
+ term: {
342
+ "@id": "toot:attributionDomains",
343
+ "@container": container,
344
+ },
347
345
  },
348
- }]);
346
+ ]);
349
347
  }
350
348
 
351
349
  await writeTerm({
@@ -354,34 +352,34 @@ test("loadSchemaFiles validates context container terms", async () => {
354
352
  "@container": "@set",
355
353
  });
356
354
  const withType = await loadSchemaFiles(dir);
357
- deepStrictEqual(withType[uri].defaultContext, [{
358
- term: {
359
- "@id": "toot:attributionDomains",
360
- "@type": "@id",
361
- "@container": "@set",
355
+ deepStrictEqual(withType[uri].defaultContext, [
356
+ {
357
+ term: {
358
+ "@id": "toot:attributionDomains",
359
+ "@type": "@id",
360
+ "@container": "@set",
361
+ },
362
362
  },
363
- }]);
363
+ ]);
364
364
 
365
365
  // The pre-existing object term shape must keep validating:
366
366
  await writeTerm({ "@type": "@id" });
367
367
  await loadSchemaFiles(dir);
368
368
 
369
- for (
370
- const invalid of [
371
- { "@id": "toot:attributionDomains", "@container": "@id" },
372
- {
373
- "@id": "toot:attributionDomains",
374
- "@container": "https://example.com/bogus",
375
- },
376
- { "@id": "toot:attributionDomains", "@container": "@bogus" },
377
- {
378
- "@id": "toot:attributionDomains",
379
- "@container": "@set",
380
- "@unknown": "@set",
381
- },
382
- { "@container": "@set" },
383
- ]
384
- ) {
369
+ for (const invalid of [
370
+ { "@id": "toot:attributionDomains", "@container": "@id" },
371
+ {
372
+ "@id": "toot:attributionDomains",
373
+ "@container": "https://example.com/bogus",
374
+ },
375
+ { "@id": "toot:attributionDomains", "@container": "@bogus" },
376
+ {
377
+ "@id": "toot:attributionDomains",
378
+ "@container": "@set",
379
+ "@unknown": "@set",
380
+ },
381
+ { "@container": "@set" },
382
+ ]) {
385
383
  await writeTerm(invalid);
386
384
  await rejects(loadSchemaFiles(dir), AggregateError);
387
385
  }