@living-architecture/riviere-cli 0.2.3 → 0.2.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.
Files changed (3) hide show
  1. package/dist/bin.js +10 -58
  2. package/dist/index.js +10 -58
  3. package/package.json +4 -4
package/dist/bin.js CHANGED
@@ -6954,11 +6954,6 @@ var riviere_schema_default = {
6954
6954
  },
6955
6955
  sourceLocation: {
6956
6956
  $ref: "#/definitions/sourceLocation"
6957
- },
6958
- metadata: {
6959
- type: "object",
6960
- description: "Extensible metadata for custom properties",
6961
- additionalProperties: true
6962
6957
  }
6963
6958
  }
6964
6959
  },
@@ -6973,7 +6968,6 @@ var riviere_schema_default = {
6973
6968
  module: { type: "string", minLength: 1 },
6974
6969
  description: { type: "string" },
6975
6970
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
6976
- metadata: { type: "object", additionalProperties: true },
6977
6971
  route: { type: "string", description: "URL route where UI component is rendered", minLength: 1 }
6978
6972
  },
6979
6973
  additionalProperties: false
@@ -6989,7 +6983,6 @@ var riviere_schema_default = {
6989
6983
  module: { type: "string", minLength: 1 },
6990
6984
  description: { type: "string" },
6991
6985
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
6992
- metadata: { type: "object", additionalProperties: true },
6993
6986
  apiType: { const: "REST" },
6994
6987
  httpMethod: { type: "string", enum: ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"] },
6995
6988
  path: { type: "string", description: "API path" }
@@ -7007,7 +7000,6 @@ var riviere_schema_default = {
7007
7000
  module: { type: "string", minLength: 1 },
7008
7001
  description: { type: "string" },
7009
7002
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7010
- metadata: { type: "object", additionalProperties: true },
7011
7003
  apiType: { const: "GraphQL" },
7012
7004
  operationName: { type: "string", description: "GraphQL operation name" }
7013
7005
  },
@@ -7024,7 +7016,6 @@ var riviere_schema_default = {
7024
7016
  module: { type: "string", minLength: 1 },
7025
7017
  description: { type: "string" },
7026
7018
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7027
- metadata: { type: "object", additionalProperties: true },
7028
7019
  apiType: { const: "other" }
7029
7020
  },
7030
7021
  additionalProperties: false
@@ -7039,8 +7030,7 @@ var riviere_schema_default = {
7039
7030
  domain: { type: "string", minLength: 1 },
7040
7031
  module: { type: "string", minLength: 1 },
7041
7032
  description: { type: "string" },
7042
- sourceLocation: { $ref: "#/definitions/sourceLocation" },
7043
- metadata: { type: "object", additionalProperties: true }
7033
+ sourceLocation: { $ref: "#/definitions/sourceLocation" }
7044
7034
  },
7045
7035
  additionalProperties: false
7046
7036
  },
@@ -7055,7 +7045,6 @@ var riviere_schema_default = {
7055
7045
  module: { type: "string", minLength: 1 },
7056
7046
  description: { type: "string" },
7057
7047
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7058
- metadata: { type: "object", additionalProperties: true },
7059
7048
  operationName: { type: "string", description: "Operation name" },
7060
7049
  entity: { type: "string", description: "Entity name" },
7061
7050
  signature: { $ref: "#/definitions/operationSignature" },
@@ -7076,7 +7065,6 @@ var riviere_schema_default = {
7076
7065
  module: { type: "string", minLength: 1 },
7077
7066
  description: { type: "string" },
7078
7067
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7079
- metadata: { type: "object", additionalProperties: true },
7080
7068
  eventName: { type: "string", description: "Event name" },
7081
7069
  eventSchema: { type: "string", description: "Event schema definition" }
7082
7070
  },
@@ -7093,7 +7081,6 @@ var riviere_schema_default = {
7093
7081
  module: { type: "string", minLength: 1 },
7094
7082
  description: { type: "string" },
7095
7083
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7096
- metadata: { type: "object", additionalProperties: true },
7097
7084
  subscribedEvents: { type: "array", items: { type: "string" }, description: "Events this handler subscribes to" }
7098
7085
  },
7099
7086
  additionalProperties: false
@@ -7109,7 +7096,6 @@ var riviere_schema_default = {
7109
7096
  module: { type: "string", minLength: 1 },
7110
7097
  description: { type: "string" },
7111
7098
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7112
- metadata: { type: "object", additionalProperties: true },
7113
7099
  customTypeName: { type: "string", description: "Name of the custom type (must match a key in metadata.customTypes)", minLength: 1 }
7114
7100
  },
7115
7101
  additionalProperties: false
@@ -7153,11 +7139,6 @@ var riviere_schema_default = {
7153
7139
  },
7154
7140
  sourceLocation: {
7155
7141
  $ref: "#/definitions/sourceLocation"
7156
- },
7157
- metadata: {
7158
- type: "object",
7159
- description: "Extensible metadata for custom properties",
7160
- additionalProperties: true
7161
7142
  }
7162
7143
  },
7163
7144
  additionalProperties: false
@@ -7191,11 +7172,6 @@ var riviere_schema_default = {
7191
7172
  },
7192
7173
  sourceLocation: {
7193
7174
  $ref: "#/definitions/sourceLocation"
7194
- },
7195
- metadata: {
7196
- type: "object",
7197
- description: "Extensible metadata for custom properties",
7198
- additionalProperties: true
7199
7175
  }
7200
7176
  },
7201
7177
  additionalProperties: false
@@ -7276,7 +7252,7 @@ var riviere_schema_default = {
7276
7252
  description: "Classification of domain's role in system"
7277
7253
  }
7278
7254
  },
7279
- additionalProperties: true
7255
+ additionalProperties: false
7280
7256
  },
7281
7257
  customTypeDefinition: {
7282
7258
  type: "object",
@@ -21523,22 +21499,6 @@ function validateCustomTypes(graph) {
21523
21499
  message: `Custom type '${customTypeName}' is not defined in metadata.customTypes`,
21524
21500
  code: "INVALID_TYPE"
21525
21501
  });
21526
- return;
21527
- }
21528
- const typeDefinition = customTypes[customTypeName];
21529
- const requiredProperties = typeDefinition?.requiredProperties;
21530
- const hasNoRequiredProperties = requiredProperties === void 0;
21531
- if (hasNoRequiredProperties)
21532
- return;
21533
- const requiredPropertyNames = Object.keys(requiredProperties);
21534
- const componentMetadata = component.metadata;
21535
- const missingProperties = componentMetadata ? requiredPropertyNames.filter((prop) => !(prop in componentMetadata)) : requiredPropertyNames;
21536
- if (missingProperties.length > 0) {
21537
- errors.push({
21538
- path: `/components/${index}`,
21539
- message: `Custom component is missing required properties for type '${customTypeName}': ${missingProperties.join(", ")}`,
21540
- code: "INVALID_TYPE"
21541
- });
21542
21502
  }
21543
21503
  });
21544
21504
  return errors;
@@ -22575,8 +22535,7 @@ var RiviereBuilder = class _RiviereBuilder {
22575
22535
  module: input.module,
22576
22536
  route: input.route,
22577
22537
  sourceLocation: input.sourceLocation,
22578
- ...input.description !== void 0 && { description: input.description },
22579
- ...input.metadata !== void 0 && { metadata: input.metadata }
22538
+ ...input.description !== void 0 && { description: input.description }
22580
22539
  };
22581
22540
  return this.registerComponent(component);
22582
22541
  }
@@ -22614,8 +22573,7 @@ var RiviereBuilder = class _RiviereBuilder {
22614
22573
  ...input.httpMethod !== void 0 && { httpMethod: input.httpMethod },
22615
22574
  ...input.path !== void 0 && { path: input.path },
22616
22575
  ...input.operationName !== void 0 && { operationName: input.operationName },
22617
- ...input.description !== void 0 && { description: input.description },
22618
- ...input.metadata !== void 0 && { metadata: input.metadata }
22576
+ ...input.description !== void 0 && { description: input.description }
22619
22577
  };
22620
22578
  return this.registerComponent(component);
22621
22579
  }
@@ -22646,8 +22604,7 @@ var RiviereBuilder = class _RiviereBuilder {
22646
22604
  domain: input.domain,
22647
22605
  module: input.module,
22648
22606
  sourceLocation: input.sourceLocation,
22649
- ...input.description !== void 0 && { description: input.description },
22650
- ...input.metadata !== void 0 && { metadata: input.metadata }
22607
+ ...input.description !== void 0 && { description: input.description }
22651
22608
  };
22652
22609
  return this.registerComponent(component);
22653
22610
  }
@@ -22689,8 +22646,7 @@ var RiviereBuilder = class _RiviereBuilder {
22689
22646
  ...input.behavior !== void 0 && { behavior: input.behavior },
22690
22647
  ...input.stateChanges !== void 0 && { stateChanges: input.stateChanges },
22691
22648
  ...input.businessRules !== void 0 && { businessRules: input.businessRules },
22692
- ...input.description !== void 0 && { description: input.description },
22693
- ...input.metadata !== void 0 && { metadata: input.metadata }
22649
+ ...input.description !== void 0 && { description: input.description }
22694
22650
  };
22695
22651
  return this.registerComponent(component);
22696
22652
  }
@@ -22724,8 +22680,7 @@ var RiviereBuilder = class _RiviereBuilder {
22724
22680
  eventName: input.eventName,
22725
22681
  sourceLocation: input.sourceLocation,
22726
22682
  ...input.eventSchema !== void 0 && { eventSchema: input.eventSchema },
22727
- ...input.description !== void 0 && { description: input.description },
22728
- ...input.metadata !== void 0 && { metadata: input.metadata }
22683
+ ...input.description !== void 0 && { description: input.description }
22729
22684
  };
22730
22685
  return this.registerComponent(component);
22731
22686
  }
@@ -22758,8 +22713,7 @@ var RiviereBuilder = class _RiviereBuilder {
22758
22713
  module: input.module,
22759
22714
  subscribedEvents: input.subscribedEvents,
22760
22715
  sourceLocation: input.sourceLocation,
22761
- ...input.description !== void 0 && { description: input.description },
22762
- ...input.metadata !== void 0 && { metadata: input.metadata }
22716
+ ...input.description !== void 0 && { description: input.description }
22763
22717
  };
22764
22718
  return this.registerComponent(component);
22765
22719
  }
@@ -22831,8 +22785,7 @@ var RiviereBuilder = class _RiviereBuilder {
22831
22785
  domain: input.domain,
22832
22786
  module: input.module,
22833
22787
  sourceLocation: input.sourceLocation,
22834
- ...input.description !== void 0 && { description: input.description },
22835
- ...input.metadata !== void 0 && { metadata: input.metadata }
22788
+ ...input.description !== void 0 && { description: input.description }
22836
22789
  };
22837
22790
  return this.registerComponent(component);
22838
22791
  }
@@ -22977,8 +22930,7 @@ var RiviereBuilder = class _RiviereBuilder {
22977
22930
  target: input.target,
22978
22931
  ...input.type !== void 0 && { type: input.type },
22979
22932
  ...input.description !== void 0 && { description: input.description },
22980
- ...input.sourceLocation !== void 0 && { sourceLocation: input.sourceLocation },
22981
- ...input.metadata !== void 0 && { metadata: input.metadata }
22933
+ ...input.sourceLocation !== void 0 && { sourceLocation: input.sourceLocation }
22982
22934
  };
22983
22935
  this.graph.externalLinks.push(externalLink);
22984
22936
  return externalLink;
package/dist/index.js CHANGED
@@ -6953,11 +6953,6 @@ var riviere_schema_default = {
6953
6953
  },
6954
6954
  sourceLocation: {
6955
6955
  $ref: "#/definitions/sourceLocation"
6956
- },
6957
- metadata: {
6958
- type: "object",
6959
- description: "Extensible metadata for custom properties",
6960
- additionalProperties: true
6961
6956
  }
6962
6957
  }
6963
6958
  },
@@ -6972,7 +6967,6 @@ var riviere_schema_default = {
6972
6967
  module: { type: "string", minLength: 1 },
6973
6968
  description: { type: "string" },
6974
6969
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
6975
- metadata: { type: "object", additionalProperties: true },
6976
6970
  route: { type: "string", description: "URL route where UI component is rendered", minLength: 1 }
6977
6971
  },
6978
6972
  additionalProperties: false
@@ -6988,7 +6982,6 @@ var riviere_schema_default = {
6988
6982
  module: { type: "string", minLength: 1 },
6989
6983
  description: { type: "string" },
6990
6984
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
6991
- metadata: { type: "object", additionalProperties: true },
6992
6985
  apiType: { const: "REST" },
6993
6986
  httpMethod: { type: "string", enum: ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"] },
6994
6987
  path: { type: "string", description: "API path" }
@@ -7006,7 +6999,6 @@ var riviere_schema_default = {
7006
6999
  module: { type: "string", minLength: 1 },
7007
7000
  description: { type: "string" },
7008
7001
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7009
- metadata: { type: "object", additionalProperties: true },
7010
7002
  apiType: { const: "GraphQL" },
7011
7003
  operationName: { type: "string", description: "GraphQL operation name" }
7012
7004
  },
@@ -7023,7 +7015,6 @@ var riviere_schema_default = {
7023
7015
  module: { type: "string", minLength: 1 },
7024
7016
  description: { type: "string" },
7025
7017
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7026
- metadata: { type: "object", additionalProperties: true },
7027
7018
  apiType: { const: "other" }
7028
7019
  },
7029
7020
  additionalProperties: false
@@ -7038,8 +7029,7 @@ var riviere_schema_default = {
7038
7029
  domain: { type: "string", minLength: 1 },
7039
7030
  module: { type: "string", minLength: 1 },
7040
7031
  description: { type: "string" },
7041
- sourceLocation: { $ref: "#/definitions/sourceLocation" },
7042
- metadata: { type: "object", additionalProperties: true }
7032
+ sourceLocation: { $ref: "#/definitions/sourceLocation" }
7043
7033
  },
7044
7034
  additionalProperties: false
7045
7035
  },
@@ -7054,7 +7044,6 @@ var riviere_schema_default = {
7054
7044
  module: { type: "string", minLength: 1 },
7055
7045
  description: { type: "string" },
7056
7046
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7057
- metadata: { type: "object", additionalProperties: true },
7058
7047
  operationName: { type: "string", description: "Operation name" },
7059
7048
  entity: { type: "string", description: "Entity name" },
7060
7049
  signature: { $ref: "#/definitions/operationSignature" },
@@ -7075,7 +7064,6 @@ var riviere_schema_default = {
7075
7064
  module: { type: "string", minLength: 1 },
7076
7065
  description: { type: "string" },
7077
7066
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7078
- metadata: { type: "object", additionalProperties: true },
7079
7067
  eventName: { type: "string", description: "Event name" },
7080
7068
  eventSchema: { type: "string", description: "Event schema definition" }
7081
7069
  },
@@ -7092,7 +7080,6 @@ var riviere_schema_default = {
7092
7080
  module: { type: "string", minLength: 1 },
7093
7081
  description: { type: "string" },
7094
7082
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7095
- metadata: { type: "object", additionalProperties: true },
7096
7083
  subscribedEvents: { type: "array", items: { type: "string" }, description: "Events this handler subscribes to" }
7097
7084
  },
7098
7085
  additionalProperties: false
@@ -7108,7 +7095,6 @@ var riviere_schema_default = {
7108
7095
  module: { type: "string", minLength: 1 },
7109
7096
  description: { type: "string" },
7110
7097
  sourceLocation: { $ref: "#/definitions/sourceLocation" },
7111
- metadata: { type: "object", additionalProperties: true },
7112
7098
  customTypeName: { type: "string", description: "Name of the custom type (must match a key in metadata.customTypes)", minLength: 1 }
7113
7099
  },
7114
7100
  additionalProperties: false
@@ -7152,11 +7138,6 @@ var riviere_schema_default = {
7152
7138
  },
7153
7139
  sourceLocation: {
7154
7140
  $ref: "#/definitions/sourceLocation"
7155
- },
7156
- metadata: {
7157
- type: "object",
7158
- description: "Extensible metadata for custom properties",
7159
- additionalProperties: true
7160
7141
  }
7161
7142
  },
7162
7143
  additionalProperties: false
@@ -7190,11 +7171,6 @@ var riviere_schema_default = {
7190
7171
  },
7191
7172
  sourceLocation: {
7192
7173
  $ref: "#/definitions/sourceLocation"
7193
- },
7194
- metadata: {
7195
- type: "object",
7196
- description: "Extensible metadata for custom properties",
7197
- additionalProperties: true
7198
7174
  }
7199
7175
  },
7200
7176
  additionalProperties: false
@@ -7275,7 +7251,7 @@ var riviere_schema_default = {
7275
7251
  description: "Classification of domain's role in system"
7276
7252
  }
7277
7253
  },
7278
- additionalProperties: true
7254
+ additionalProperties: false
7279
7255
  },
7280
7256
  customTypeDefinition: {
7281
7257
  type: "object",
@@ -21522,22 +21498,6 @@ function validateCustomTypes(graph) {
21522
21498
  message: `Custom type '${customTypeName}' is not defined in metadata.customTypes`,
21523
21499
  code: "INVALID_TYPE"
21524
21500
  });
21525
- return;
21526
- }
21527
- const typeDefinition = customTypes[customTypeName];
21528
- const requiredProperties = typeDefinition?.requiredProperties;
21529
- const hasNoRequiredProperties = requiredProperties === void 0;
21530
- if (hasNoRequiredProperties)
21531
- return;
21532
- const requiredPropertyNames = Object.keys(requiredProperties);
21533
- const componentMetadata = component.metadata;
21534
- const missingProperties = componentMetadata ? requiredPropertyNames.filter((prop) => !(prop in componentMetadata)) : requiredPropertyNames;
21535
- if (missingProperties.length > 0) {
21536
- errors.push({
21537
- path: `/components/${index}`,
21538
- message: `Custom component is missing required properties for type '${customTypeName}': ${missingProperties.join(", ")}`,
21539
- code: "INVALID_TYPE"
21540
- });
21541
21501
  }
21542
21502
  });
21543
21503
  return errors;
@@ -22574,8 +22534,7 @@ var RiviereBuilder = class _RiviereBuilder {
22574
22534
  module: input.module,
22575
22535
  route: input.route,
22576
22536
  sourceLocation: input.sourceLocation,
22577
- ...input.description !== void 0 && { description: input.description },
22578
- ...input.metadata !== void 0 && { metadata: input.metadata }
22537
+ ...input.description !== void 0 && { description: input.description }
22579
22538
  };
22580
22539
  return this.registerComponent(component);
22581
22540
  }
@@ -22613,8 +22572,7 @@ var RiviereBuilder = class _RiviereBuilder {
22613
22572
  ...input.httpMethod !== void 0 && { httpMethod: input.httpMethod },
22614
22573
  ...input.path !== void 0 && { path: input.path },
22615
22574
  ...input.operationName !== void 0 && { operationName: input.operationName },
22616
- ...input.description !== void 0 && { description: input.description },
22617
- ...input.metadata !== void 0 && { metadata: input.metadata }
22575
+ ...input.description !== void 0 && { description: input.description }
22618
22576
  };
22619
22577
  return this.registerComponent(component);
22620
22578
  }
@@ -22645,8 +22603,7 @@ var RiviereBuilder = class _RiviereBuilder {
22645
22603
  domain: input.domain,
22646
22604
  module: input.module,
22647
22605
  sourceLocation: input.sourceLocation,
22648
- ...input.description !== void 0 && { description: input.description },
22649
- ...input.metadata !== void 0 && { metadata: input.metadata }
22606
+ ...input.description !== void 0 && { description: input.description }
22650
22607
  };
22651
22608
  return this.registerComponent(component);
22652
22609
  }
@@ -22688,8 +22645,7 @@ var RiviereBuilder = class _RiviereBuilder {
22688
22645
  ...input.behavior !== void 0 && { behavior: input.behavior },
22689
22646
  ...input.stateChanges !== void 0 && { stateChanges: input.stateChanges },
22690
22647
  ...input.businessRules !== void 0 && { businessRules: input.businessRules },
22691
- ...input.description !== void 0 && { description: input.description },
22692
- ...input.metadata !== void 0 && { metadata: input.metadata }
22648
+ ...input.description !== void 0 && { description: input.description }
22693
22649
  };
22694
22650
  return this.registerComponent(component);
22695
22651
  }
@@ -22723,8 +22679,7 @@ var RiviereBuilder = class _RiviereBuilder {
22723
22679
  eventName: input.eventName,
22724
22680
  sourceLocation: input.sourceLocation,
22725
22681
  ...input.eventSchema !== void 0 && { eventSchema: input.eventSchema },
22726
- ...input.description !== void 0 && { description: input.description },
22727
- ...input.metadata !== void 0 && { metadata: input.metadata }
22682
+ ...input.description !== void 0 && { description: input.description }
22728
22683
  };
22729
22684
  return this.registerComponent(component);
22730
22685
  }
@@ -22757,8 +22712,7 @@ var RiviereBuilder = class _RiviereBuilder {
22757
22712
  module: input.module,
22758
22713
  subscribedEvents: input.subscribedEvents,
22759
22714
  sourceLocation: input.sourceLocation,
22760
- ...input.description !== void 0 && { description: input.description },
22761
- ...input.metadata !== void 0 && { metadata: input.metadata }
22715
+ ...input.description !== void 0 && { description: input.description }
22762
22716
  };
22763
22717
  return this.registerComponent(component);
22764
22718
  }
@@ -22830,8 +22784,7 @@ var RiviereBuilder = class _RiviereBuilder {
22830
22784
  domain: input.domain,
22831
22785
  module: input.module,
22832
22786
  sourceLocation: input.sourceLocation,
22833
- ...input.description !== void 0 && { description: input.description },
22834
- ...input.metadata !== void 0 && { metadata: input.metadata }
22787
+ ...input.description !== void 0 && { description: input.description }
22835
22788
  };
22836
22789
  return this.registerComponent(component);
22837
22790
  }
@@ -22976,8 +22929,7 @@ var RiviereBuilder = class _RiviereBuilder {
22976
22929
  target: input.target,
22977
22930
  ...input.type !== void 0 && { type: input.type },
22978
22931
  ...input.description !== void 0 && { description: input.description },
22979
- ...input.sourceLocation !== void 0 && { sourceLocation: input.sourceLocation },
22980
- ...input.metadata !== void 0 && { metadata: input.metadata }
22932
+ ...input.sourceLocation !== void 0 && { sourceLocation: input.sourceLocation }
22981
22933
  };
22982
22934
  this.graph.externalLinks.push(externalLink);
22983
22935
  return externalLink;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@living-architecture/riviere-cli",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "commander": "^14.0.2",
29
29
  "tslib": "^2.3.0",
30
- "@living-architecture/riviere-builder": "0.2.2",
31
- "@living-architecture/riviere-query": "0.2.2",
32
- "@living-architecture/riviere-schema": "0.2.0"
30
+ "@living-architecture/riviere-query": "0.2.4",
31
+ "@living-architecture/riviere-schema": "0.2.2",
32
+ "@living-architecture/riviere-builder": "0.2.4"
33
33
  }
34
34
  }