@living-architecture/riviere-cli 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.
Files changed (95) hide show
  1. package/dist/bin.js +24428 -0
  2. package/dist/index.js +24444 -7
  3. package/package.json +2 -2
  4. package/dist/cli.d.ts +0 -8
  5. package/dist/cli.d.ts.map +0 -1
  6. package/dist/cli.js +0 -65
  7. package/dist/command-test-fixtures.d.ts +0 -110
  8. package/dist/command-test-fixtures.d.ts.map +0 -1
  9. package/dist/command-test-fixtures.js +0 -184
  10. package/dist/commands/builder/add-component.d.ts +0 -4
  11. package/dist/commands/builder/add-component.d.ts.map +0 -1
  12. package/dist/commands/builder/add-component.js +0 -204
  13. package/dist/commands/builder/add-domain.d.ts +0 -3
  14. package/dist/commands/builder/add-domain.d.ts.map +0 -1
  15. package/dist/commands/builder/add-domain.js +0 -56
  16. package/dist/commands/builder/add-source.d.ts +0 -3
  17. package/dist/commands/builder/add-source.d.ts.map +0 -1
  18. package/dist/commands/builder/add-source.js +0 -28
  19. package/dist/commands/builder/check-consistency.d.ts +0 -3
  20. package/dist/commands/builder/check-consistency.d.ts.map +0 -1
  21. package/dist/commands/builder/check-consistency.js +0 -27
  22. package/dist/commands/builder/component-checklist.d.ts +0 -3
  23. package/dist/commands/builder/component-checklist.d.ts.map +0 -1
  24. package/dist/commands/builder/component-checklist.js +0 -43
  25. package/dist/commands/builder/component-summary.d.ts +0 -3
  26. package/dist/commands/builder/component-summary.d.ts.map +0 -1
  27. package/dist/commands/builder/component-summary.js +0 -23
  28. package/dist/commands/builder/enrich.d.ts +0 -3
  29. package/dist/commands/builder/enrich.d.ts.map +0 -1
  30. package/dist/commands/builder/enrich.js +0 -85
  31. package/dist/commands/builder/finalize.d.ts +0 -3
  32. package/dist/commands/builder/finalize.d.ts.map +0 -1
  33. package/dist/commands/builder/finalize.js +0 -37
  34. package/dist/commands/builder/init.d.ts +0 -3
  35. package/dist/commands/builder/init.d.ts.map +0 -1
  36. package/dist/commands/builder/init.js +0 -100
  37. package/dist/commands/builder/link-external.d.ts +0 -3
  38. package/dist/commands/builder/link-external.d.ts.map +0 -1
  39. package/dist/commands/builder/link-external.js +0 -70
  40. package/dist/commands/builder/link-http.d.ts +0 -3
  41. package/dist/commands/builder/link-http.d.ts.map +0 -1
  42. package/dist/commands/builder/link-http.js +0 -130
  43. package/dist/commands/builder/link-infrastructure.d.ts +0 -7
  44. package/dist/commands/builder/link-infrastructure.d.ts.map +0 -1
  45. package/dist/commands/builder/link-infrastructure.js +0 -41
  46. package/dist/commands/builder/link.d.ts +0 -3
  47. package/dist/commands/builder/link.d.ts.map +0 -1
  48. package/dist/commands/builder/link.js +0 -73
  49. package/dist/commands/builder/validate.d.ts +0 -3
  50. package/dist/commands/builder/validate.d.ts.map +0 -1
  51. package/dist/commands/builder/validate.js +0 -29
  52. package/dist/commands/query/component-output.d.ts +0 -9
  53. package/dist/commands/query/component-output.d.ts.map +0 -1
  54. package/dist/commands/query/component-output.js +0 -8
  55. package/dist/commands/query/components.d.ts +0 -3
  56. package/dist/commands/query/components.d.ts.map +0 -1
  57. package/dist/commands/query/components.js +0 -45
  58. package/dist/commands/query/domains.d.ts +0 -3
  59. package/dist/commands/query/domains.d.ts.map +0 -1
  60. package/dist/commands/query/domains.js +0 -22
  61. package/dist/commands/query/entry-points.d.ts +0 -3
  62. package/dist/commands/query/entry-points.d.ts.map +0 -1
  63. package/dist/commands/query/entry-points.js +0 -22
  64. package/dist/commands/query/load-graph.d.ts +0 -16
  65. package/dist/commands/query/load-graph.d.ts.map +0 -1
  66. package/dist/commands/query/load-graph.js +0 -50
  67. package/dist/commands/query/orphans.d.ts +0 -3
  68. package/dist/commands/query/orphans.d.ts.map +0 -1
  69. package/dist/commands/query/orphans.js +0 -22
  70. package/dist/commands/query/search.d.ts +0 -3
  71. package/dist/commands/query/search.d.ts.map +0 -1
  72. package/dist/commands/query/search.js +0 -25
  73. package/dist/commands/query/trace.d.ts +0 -3
  74. package/dist/commands/query/trace.d.ts.map +0 -1
  75. package/dist/commands/query/trace.js +0 -41
  76. package/dist/component-types.d.ts +0 -15
  77. package/dist/component-types.d.ts.map +0 -1
  78. package/dist/component-types.js +0 -39
  79. package/dist/error-codes.d.ts +0 -15
  80. package/dist/error-codes.d.ts.map +0 -1
  81. package/dist/error-codes.js +0 -15
  82. package/dist/file-existence.d.ts +0 -2
  83. package/dist/file-existence.d.ts.map +0 -1
  84. package/dist/file-existence.js +0 -16
  85. package/dist/graph-path.d.ts +0 -3
  86. package/dist/graph-path.d.ts.map +0 -1
  87. package/dist/graph-path.js +0 -8
  88. package/dist/index.d.ts +0 -5
  89. package/dist/index.d.ts.map +0 -1
  90. package/dist/output.d.ts +0 -17
  91. package/dist/output.d.ts.map +0 -1
  92. package/dist/output.js +0 -7
  93. package/dist/validation.d.ts +0 -12
  94. package/dist/validation.d.ts.map +0 -1
  95. package/dist/validation.js +0 -51
@@ -1,8 +0,0 @@
1
- import { join } from 'node:path';
2
- const DEFAULT_GRAPH_PATH = '.riviere/graph.json';
3
- export function resolveGraphPath(customPath) {
4
- return customPath ?? join(process.cwd(), DEFAULT_GRAPH_PATH);
5
- }
6
- export function getDefaultGraphPathDescription() {
7
- return `Custom graph file path (default: ${DEFAULT_GRAPH_PATH})`;
8
- }
package/dist/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- export * from './cli';
3
- export * from './error-codes';
4
- export * from './output';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAGA,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC"}
package/dist/output.d.ts DELETED
@@ -1,17 +0,0 @@
1
- import { CliErrorCode } from './error-codes';
2
- export interface SuccessOutput<T> {
3
- success: true;
4
- data: T;
5
- warnings: string[];
6
- }
7
- export interface ErrorOutput {
8
- success: false;
9
- error: {
10
- code: string;
11
- message: string;
12
- suggestions: string[];
13
- };
14
- }
15
- export declare function formatSuccess<T>(data: T, warnings?: string[]): SuccessOutput<T>;
16
- export declare function formatError(code: CliErrorCode, message: string, suggestions?: string[]): ErrorOutput;
17
- //# sourceMappingURL=output.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;CACH;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,GAAE,MAAM,EAAO,GAAG,aAAa,CAAC,CAAC,CAAC,CAEnF;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,EAAO,GACzB,WAAW,CAEb"}
package/dist/output.js DELETED
@@ -1,7 +0,0 @@
1
- import { CliErrorCode } from './error-codes';
2
- export function formatSuccess(data, warnings = []) {
3
- return { success: true, data, warnings };
4
- }
5
- export function formatError(code, message, suggestions = []) {
6
- return { success: false, error: { code, message, suggestions } };
7
- }
@@ -1,12 +0,0 @@
1
- import type { HttpMethod } from '@living-architecture/riviere-schema';
2
- export interface ValidationResult {
3
- valid: boolean;
4
- errorJson?: string;
5
- }
6
- export declare function validateComponentType(componentType: string): ValidationResult;
7
- export declare function validateLinkType(linkType: string | undefined): ValidationResult;
8
- export declare function validateSystemType(systemType: string): ValidationResult;
9
- export declare const VALID_HTTP_METHODS: readonly HttpMethod[];
10
- export declare function isValidHttpMethod(value: string): value is HttpMethod;
11
- export declare function validateHttpMethod(method: string | undefined): ValidationResult;
12
- //# sourceMappingURL=validation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAYtE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,gBAAgB,CAa7E;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,CAa/E;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAavE;AAED,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EAAiE,CAAC;AAEtH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAEpE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,CAa/E"}
@@ -1,51 +0,0 @@
1
- import { isValidComponentType, isValidLinkType, isValidSystemType, VALID_COMPONENT_TYPES, VALID_LINK_TYPES, VALID_SYSTEM_TYPES, } from './component-types';
2
- import { formatError } from './output';
3
- import { CliErrorCode } from './error-codes';
4
- export function validateComponentType(componentType) {
5
- if (isValidComponentType(componentType)) {
6
- return { valid: true };
7
- }
8
- return {
9
- valid: false,
10
- errorJson: JSON.stringify(formatError(CliErrorCode.ValidationError, `Invalid component type: ${componentType}`, [
11
- `Valid types: ${VALID_COMPONENT_TYPES.join(', ')}`,
12
- ])),
13
- };
14
- }
15
- export function validateLinkType(linkType) {
16
- if (linkType === undefined || isValidLinkType(linkType)) {
17
- return { valid: true };
18
- }
19
- return {
20
- valid: false,
21
- errorJson: JSON.stringify(formatError(CliErrorCode.ValidationError, `Invalid link type: ${linkType}`, [
22
- `Valid types: ${VALID_LINK_TYPES.join(', ')}`,
23
- ])),
24
- };
25
- }
26
- export function validateSystemType(systemType) {
27
- if (isValidSystemType(systemType)) {
28
- return { valid: true };
29
- }
30
- return {
31
- valid: false,
32
- errorJson: JSON.stringify(formatError(CliErrorCode.ValidationError, `Invalid system type: ${systemType}`, [
33
- `Valid types: ${VALID_SYSTEM_TYPES.join(', ')}`,
34
- ])),
35
- };
36
- }
37
- export const VALID_HTTP_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'];
38
- export function isValidHttpMethod(value) {
39
- return VALID_HTTP_METHODS.some((m) => m === value.toUpperCase());
40
- }
41
- export function validateHttpMethod(method) {
42
- if (method === undefined || isValidHttpMethod(method)) {
43
- return { valid: true };
44
- }
45
- return {
46
- valid: false,
47
- errorJson: JSON.stringify(formatError(CliErrorCode.ValidationError, `Invalid HTTP method: ${method}`, [
48
- `Valid methods: ${VALID_HTTP_METHODS.join(', ')}`,
49
- ])),
50
- };
51
- }