@gitgov/core 2.6.0 → 2.7.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/dist/src/fs.js CHANGED
@@ -740,6 +740,9 @@ var DIR_TO_TYPE = {
740
740
  "actors": "actor",
741
741
  "agents": "agent"
742
742
  };
743
+ Object.fromEntries(
744
+ Object.entries(DIR_TO_TYPE).map(([dir, type]) => [type, dir])
745
+ );
743
746
  var VALID_DIRS = Object.keys(DIR_TO_TYPE);
744
747
  function extractRecordIdFromPath(filePath) {
745
748
  const parts = filePath.split("/");
@@ -1795,20 +1798,10 @@ var embedded_metadata_schema_default = {
1795
1798
  "execution",
1796
1799
  "changelog",
1797
1800
  "feedback",
1798
- "cycle",
1799
- "custom"
1801
+ "cycle"
1800
1802
  ],
1801
1803
  description: "The type of the record contained in the payload."
1802
1804
  },
1803
- schemaUrl: {
1804
- type: "string",
1805
- description: "Optional URL to a custom schema for the payload."
1806
- },
1807
- schemaChecksum: {
1808
- type: "string",
1809
- pattern: "^[a-fA-F0-9]{64}$",
1810
- description: "Optional SHA-256 checksum of the custom schema."
1811
- },
1812
1805
  payloadChecksum: {
1813
1806
  type: "string",
1814
1807
  pattern: "^[a-fA-F0-9]{64}$",
@@ -2032,32 +2025,6 @@ var embedded_metadata_schema_default = {
2032
2025
  }
2033
2026
  },
2034
2027
  else: false
2035
- },
2036
- {
2037
- if: {
2038
- properties: {
2039
- header: {
2040
- type: "object",
2041
- properties: {
2042
- type: {
2043
- const: "custom"
2044
- }
2045
- }
2046
- }
2047
- }
2048
- },
2049
- then: {
2050
- properties: {
2051
- header: {
2052
- type: "object",
2053
- required: [
2054
- "schemaUrl",
2055
- "schemaChecksum"
2056
- ]
2057
- }
2058
- }
2059
- },
2060
- else: false
2061
2028
  }
2062
2029
  ],
2063
2030
  examples: [
@@ -3548,6 +3515,12 @@ var FsLintModule = class {
3548
3515
  lintRecord(record, context) {
3549
3516
  return this.lintModule.lintRecord(record, context);
3550
3517
  }
3518
+ /**
3519
+ * Delegates to LintModule.lintRecordReferences() for prefix validation.
3520
+ */
3521
+ lintRecordReferences(record, context) {
3522
+ return this.lintModule.lintRecordReferences(record, context);
3523
+ }
3551
3524
  /**
3552
3525
  * Delegates to LintModule.fixRecord() for pure fix.
3553
3526
  */
@@ -3800,6 +3773,14 @@ var FsLintModule = class {
3800
3773
  const namingResults = this.validateFileNaming(record, recordId, filePath, entityType);
3801
3774
  results.push(...namingResults);
3802
3775
  }
3776
+ if (options.validateReferences) {
3777
+ const refResults = this.lintModule.lintRecordReferences(record, {
3778
+ recordId,
3779
+ entityType,
3780
+ filePath
3781
+ });
3782
+ results.push(...refResults);
3783
+ }
3803
3784
  } catch (error) {
3804
3785
  if (error instanceof DetailedValidationError) {
3805
3786
  const hasAdditionalProperties = error.errors.some(