@living-architecture/riviere-builder 0.2.2 → 0.2.3

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/builder.d.ts CHANGED
@@ -21,7 +21,7 @@ interface BuilderGraph extends Omit<RiviereGraph, 'metadata' | 'externalLinks'>
21
21
  * import { RiviereBuilder } from '@living-architecture/riviere-builder'
22
22
  *
23
23
  * const builder = RiviereBuilder.new({
24
- * sources: [{ type: 'git', url: 'https://github.com/org/repo' }],
24
+ * sources: [{ type: 'git', url: 'https://github.com/your-org/your-repo' }],
25
25
  * domains: { orders: { description: 'Order management' } }
26
26
  * })
27
27
  *
@@ -70,7 +70,7 @@ export declare class RiviereBuilder {
70
70
  * ```typescript
71
71
  * const builder = RiviereBuilder.new({
72
72
  * name: 'My System',
73
- * sources: [{ type: 'git', url: 'https://github.com/org/repo' }],
73
+ * sources: [{ type: 'git', url: 'https://github.com/your-org/your-repo' }],
74
74
  * domains: {
75
75
  * orders: { description: 'Order management' },
76
76
  * users: { description: 'User accounts' }
@@ -88,7 +88,7 @@ export declare class RiviereBuilder {
88
88
  * ```typescript
89
89
  * builder.addSource({
90
90
  * type: 'git',
91
- * url: 'https://github.com/org/another-repo'
91
+ * url: 'https://github.com/your-org/another-repo'
92
92
  * })
93
93
  * ```
94
94
  */
@@ -1 +1 @@
1
- {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EAEZ,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,gBAAgB,EACjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAMxF,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd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B;;;;;;;;;;;;;;;OAeG;IACH,KAAK,IAAI,YAAY;IASrB;;;;;;;;;;;;OAYG;IACG,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcvC,OAAO,CAAC,mBAAmB;CAG5B"}
package/dist/builder.js CHANGED
@@ -5,7 +5,7 @@ import { calculateStats, findOrphans, findWarnings, toRiviereGraph, validateGrap
5
5
  import { assertCustomTypeExists, assertDomainExists, assertRequiredPropertiesProvided } from './builder-assertions';
6
6
  import { ComponentId } from '@living-architecture/riviere-schema';
7
7
  import { createSourceNotFoundError, findNearMatches } from './component-suggestion';
8
- import { DuplicateComponentError, DuplicateDomainError, InvalidEnrichmentTargetError } from './errors';
8
+ import { CustomTypeAlreadyDefinedError, DuplicateComponentError, DuplicateDomainError, InvalidEnrichmentTargetError, } from './errors';
9
9
  /**
10
10
  * Programmatically construct Rivière architecture graphs.
11
11
  *
@@ -17,7 +17,7 @@ import { DuplicateComponentError, DuplicateDomainError, InvalidEnrichmentTargetE
17
17
  * import { RiviereBuilder } from '@living-architecture/riviere-builder'
18
18
  *
19
19
  * const builder = RiviereBuilder.new({
20
- * sources: [{ type: 'git', url: 'https://github.com/org/repo' }],
20
+ * sources: [{ type: 'git', url: 'https://github.com/your-org/your-repo' }],
21
21
  * domains: { orders: { description: 'Order management' } }
22
22
  * })
23
23
  *
@@ -84,7 +84,7 @@ export class RiviereBuilder {
84
84
  * ```typescript
85
85
  * const builder = RiviereBuilder.new({
86
86
  * name: 'My System',
87
- * sources: [{ type: 'git', url: 'https://github.com/org/repo' }],
87
+ * sources: [{ type: 'git', url: 'https://github.com/your-org/your-repo' }],
88
88
  * domains: {
89
89
  * orders: { description: 'Order management' },
90
90
  * users: { description: 'User accounts' }
@@ -123,7 +123,7 @@ export class RiviereBuilder {
123
123
  * ```typescript
124
124
  * builder.addSource({
125
125
  * type: 'git',
126
- * url: 'https://github.com/org/another-repo'
126
+ * url: 'https://github.com/your-org/another-repo'
127
127
  * })
128
128
  * ```
129
129
  */
@@ -393,7 +393,7 @@ export class RiviereBuilder {
393
393
  defineCustomType(input) {
394
394
  const customTypes = this.graph.metadata.customTypes;
395
395
  if (customTypes[input.name]) {
396
- throw new Error(`Custom type '${input.name}' already defined`);
396
+ throw new CustomTypeAlreadyDefinedError(input.name);
397
397
  }
398
398
  customTypes[input.name] = {
399
399
  ...(input.requiredProperties !== undefined && { requiredProperties: input.requiredProperties }),
package/dist/errors.d.ts CHANGED
@@ -25,4 +25,8 @@ export declare class InvalidEnrichmentTargetError extends Error {
25
25
  readonly componentType: string;
26
26
  constructor(componentId: string, componentType: string);
27
27
  }
28
+ export declare class CustomTypeAlreadyDefinedError extends Error {
29
+ readonly typeName: string;
30
+ constructor(typeName: string);
31
+ }
28
32
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;gBAEf,UAAU,EAAE,MAAM;CAK/B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;gBAEf,UAAU,EAAE,MAAM;CAK/B;AAED,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAA;gBAEnB,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE;CAU3D;AAED,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;gBAEhB,WAAW,EAAE,MAAM;CAKhC;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM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AA8B,SAAQ,KAAK;IACtD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;gBAEb,QAAQ,EAAE,MAAM;CAK7B"}
package/dist/errors.js CHANGED
@@ -57,3 +57,11 @@ export class InvalidEnrichmentTargetError extends Error {
57
57
  this.componentType = componentType;
58
58
  }
59
59
  }
60
+ export class CustomTypeAlreadyDefinedError extends Error {
61
+ typeName;
62
+ constructor(typeName) {
63
+ super(`Custom type '${typeName}' already defined`);
64
+ this.name = 'CustomTypeAlreadyDefinedError';
65
+ this.typeName = typeName;
66
+ }
67
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@living-architecture/riviere-builder",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "tslib": "^2.3.0",
26
- "@living-architecture/riviere-query": "0.2.2",
27
- "@living-architecture/riviere-schema": "0.2.0"
26
+ "@living-architecture/riviere-query": "0.2.3",
27
+ "@living-architecture/riviere-schema": "0.2.1"
28
28
  }
29
29
  }