filegrc 0.12.0 → 0.12.1

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/model/index.js CHANGED
@@ -55,9 +55,22 @@ export function loadModel(version = ACTIVE_MODEL_VERSION) {
55
55
  expandRegistryReference(model, field, `${objectType}.${name}`);
56
56
  }
57
57
  }
58
+ validateCollectionReviewPopulationRelations(model);
58
59
  return model;
59
60
  }
60
61
 
62
+ function validateCollectionReviewPopulationRelations(model) {
63
+ const field = model.resources["collection-review"]?.fields?.populationResourceIds;
64
+ if (!field) return;
65
+ const allowedTypes = new Set(field.relation || []);
66
+ const missingTypes = Object.keys(model.collectionReviews || {}).filter((type) => !allowedTypes.has(type));
67
+ if (missingTypes.length) {
68
+ throw new Error(
69
+ `Collection Review population relationships do not allow configured resource types: ${missingTypes.join(", ")}.`
70
+ );
71
+ }
72
+ }
73
+
61
74
  function expandRegistryReference(model, field, path) {
62
75
  if (!field.registry) return;
63
76
  const registry = model[field.registry];
package/model/v10.json CHANGED
@@ -7615,7 +7615,7 @@
7615
7615
  "populationResourceIds": {
7616
7616
  "type": "array",
7617
7617
  "items": "id",
7618
- "relationGroup": "obligation-scope",
7618
+ "relationGroup": "collection-review-population",
7619
7619
  "label": "Reviewed population"
7620
7620
  }
7621
7621
  },
@@ -9371,6 +9371,17 @@
9371
9371
  "team",
9372
9372
  "appointment"
9373
9373
  ],
9374
+ "collection-review-population": [
9375
+ "person",
9376
+ "framework",
9377
+ "vendor",
9378
+ "system",
9379
+ "complementary-control",
9380
+ "component",
9381
+ "classification",
9382
+ "information-type",
9383
+ "retention-schedule-item"
9384
+ ],
9374
9385
  "appointment-scope": [
9375
9386
  "workspace",
9376
9387
  "person",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filegrc",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Zero-dependency Git-native GRC engine",
5
5
  "license": "MIT",
6
6
  "repository": {