@living-architecture/riviere-extract-ts 0.1.32 → 0.2.0

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 (56) hide show
  1. package/dist/domain/component-extraction/extractor.d.ts +14 -0
  2. package/dist/domain/component-extraction/extractor.d.ts.map +1 -0
  3. package/dist/{extractor.js → domain/component-extraction/extractor.js} +8 -17
  4. package/dist/{errors.d.ts → domain/config-resolution/config-resolution-errors.d.ts} +1 -1
  5. package/dist/domain/config-resolution/config-resolution-errors.d.ts.map +1 -0
  6. package/dist/domain/config-resolution/resolve-config.d.ts +4 -0
  7. package/dist/domain/config-resolution/resolve-config.d.ts.map +1 -0
  8. package/dist/{resolve-config.js → domain/config-resolution/resolve-config.js} +1 -7
  9. package/dist/domain/predicate-evaluation/evaluate-predicate.d.ts +4 -0
  10. package/dist/domain/predicate-evaluation/evaluate-predicate.d.ts.map +1 -0
  11. package/dist/{predicates → domain/predicate-evaluation}/evaluate-predicate.js +0 -6
  12. package/dist/domain/value-extraction/evaluate-extraction-rule-generic.d.ts.map +1 -0
  13. package/dist/{extraction-rules → domain/value-extraction}/evaluate-extraction-rule-generic.js +2 -2
  14. package/dist/domain/value-extraction/evaluate-extraction-rule-method.d.ts.map +1 -0
  15. package/dist/{extraction-rules → domain/value-extraction}/evaluate-extraction-rule-method.js +2 -2
  16. package/dist/domain/value-extraction/evaluate-extraction-rule.d.ts.map +1 -0
  17. package/dist/{extraction-rules → domain/value-extraction}/evaluate-extraction-rule.js +2 -2
  18. package/dist/{extraction-rules → domain/value-extraction}/index.d.ts +2 -2
  19. package/dist/domain/value-extraction/index.d.ts.map +1 -0
  20. package/dist/{extraction-rules → domain/value-extraction}/index.js +2 -2
  21. package/dist/{extraction-rules → platform/domain/ast-literals}/literal-detection.d.ts +0 -11
  22. package/dist/platform/domain/ast-literals/literal-detection.d.ts.map +1 -0
  23. package/dist/{extraction-rules → platform/domain/ast-literals}/literal-detection.js +0 -11
  24. package/dist/{extraction-rules → platform/domain/string-transforms}/transforms.d.ts +0 -24
  25. package/dist/platform/domain/string-transforms/transforms.d.ts.map +1 -0
  26. package/dist/{extraction-rules → platform/domain/string-transforms}/transforms.js +0 -24
  27. package/dist/platform/infra/glob-matching/minimatch-glob.d.ts +2 -0
  28. package/dist/platform/infra/glob-matching/minimatch-glob.d.ts.map +1 -0
  29. package/dist/platform/infra/glob-matching/minimatch-glob.js +4 -0
  30. package/dist/shell/index.d.ts +7 -0
  31. package/dist/shell/index.d.ts.map +1 -0
  32. package/dist/shell/index.js +6 -0
  33. package/package.json +9 -9
  34. package/dist/errors.d.ts.map +0 -1
  35. package/dist/extraction-rules/evaluate-extraction-rule-generic.d.ts.map +0 -1
  36. package/dist/extraction-rules/evaluate-extraction-rule-method.d.ts.map +0 -1
  37. package/dist/extraction-rules/evaluate-extraction-rule.d.ts.map +0 -1
  38. package/dist/extraction-rules/index.d.ts.map +0 -1
  39. package/dist/extraction-rules/literal-detection.d.ts.map +0 -1
  40. package/dist/extraction-rules/transforms.d.ts.map +0 -1
  41. package/dist/extractor.d.ts +0 -22
  42. package/dist/extractor.d.ts.map +0 -1
  43. package/dist/index.d.ts +0 -6
  44. package/dist/index.d.ts.map +0 -1
  45. package/dist/index.js +0 -5
  46. package/dist/predicates/evaluate-predicate.d.ts +0 -10
  47. package/dist/predicates/evaluate-predicate.d.ts.map +0 -1
  48. package/dist/predicates/index.d.ts +0 -2
  49. package/dist/predicates/index.d.ts.map +0 -1
  50. package/dist/predicates/index.js +0 -1
  51. package/dist/resolve-config.d.ts +0 -11
  52. package/dist/resolve-config.d.ts.map +0 -1
  53. /package/dist/{errors.js → domain/config-resolution/config-resolution-errors.js} +0 -0
  54. /package/dist/{extraction-rules → domain/value-extraction}/evaluate-extraction-rule-generic.d.ts +0 -0
  55. /package/dist/{extraction-rules → domain/value-extraction}/evaluate-extraction-rule-method.d.ts +0 -0
  56. /package/dist/{extraction-rules → domain/value-extraction}/evaluate-extraction-rule.d.ts +0 -0
@@ -0,0 +1,14 @@
1
+ import type { Project } from 'ts-morph';
2
+ import type { ResolvedExtractionConfig } from '@living-architecture/riviere-extract-config';
3
+ export type GlobMatcher = (path: string, pattern: string) => boolean;
4
+ export interface DraftComponent {
5
+ type: string;
6
+ name: string;
7
+ location: {
8
+ file: string;
9
+ line: number;
10
+ };
11
+ domain: string;
12
+ }
13
+ export declare function extractComponents(project: Project, sourceFilePaths: string[], config: ResolvedExtractionConfig, globMatcher: GlobMatcher, configDir?: string): DraftComponent[];
14
+ //# sourceMappingURL=extractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../src/domain/component-extraction/extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,OAAO,EAER,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EACV,wBAAwB,EAIzB,MAAM,6CAA6C,CAAA;AAGpD,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAA;AAEpE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,MAAM,EAAE,MAAM,CAAA;CACf;AA4BD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,MAAM,EAAE,EACzB,MAAM,EAAE,wBAAwB,EAChC,WAAW,EAAE,WAAW,EACxB,SAAS,CAAC,EAAE,MAAM,GACjB,cAAc,EAAE,CAIlB"}
@@ -1,6 +1,5 @@
1
- import { minimatch } from 'minimatch';
2
1
  import { posix } from 'node:path';
3
- import { evaluatePredicate } from './predicates';
2
+ import { evaluatePredicate } from '../predicate-evaluation/evaluate-predicate';
4
3
  const COMPONENT_TYPES = [
5
4
  'api',
6
5
  'useCase',
@@ -23,23 +22,15 @@ function isDetectionRule(rule) {
23
22
  }
24
23
  return typeof rule.find === 'string' && FIND_TARGETS.includes(rule.find);
25
24
  }
26
- /**
27
- * Extracts architectural components from source files.
28
- * @param project - ts-morph Project instance.
29
- * @param sourceFilePaths - Paths to source files to extract from.
30
- * @param config - Resolved extraction config with detection rules.
31
- * @param configDir - Optional base directory for resolving relative module paths.
32
- * @returns Array of extracted draft components.
33
- */
34
- export function extractComponents(project, sourceFilePaths, config, configDir) {
35
- return sourceFilePaths.flatMap((filePath) => extractFromFile(project, filePath, config, configDir));
25
+ export function extractComponents(project, sourceFilePaths, config, globMatcher, configDir) {
26
+ return sourceFilePaths.flatMap((filePath) => extractFromFile(project, filePath, config, globMatcher, configDir));
36
27
  }
37
- function extractFromFile(project, filePath, config, configDir) {
28
+ function extractFromFile(project, filePath, config, globMatcher, configDir) {
38
29
  const sourceFile = project.getSourceFile(filePath);
39
30
  if (sourceFile === undefined) {
40
31
  return [];
41
32
  }
42
- const matchingModule = findMatchingModule(filePath, config.modules, configDir);
33
+ const matchingModule = findMatchingModule(filePath, config.modules, globMatcher, configDir);
43
34
  if (matchingModule === undefined) {
44
35
  return [];
45
36
  }
@@ -144,12 +135,12 @@ function createFunctionComponent(func, filePath, domain, componentType) {
144
135
  },
145
136
  ];
146
137
  }
147
- function findMatchingModule(filePath, modules, configDir) {
138
+ function findMatchingModule(filePath, modules, globMatcher, configDir) {
148
139
  const normalized = filePath.replaceAll(/\\+/g, '/');
149
140
  if (configDir === undefined) {
150
- return modules.find((m) => minimatch(normalized, m.path));
141
+ return modules.find((m) => globMatcher(normalized, m.path));
151
142
  }
152
143
  const normalizedConfigDir = configDir.replaceAll(/\\+/g, '/');
153
144
  const pathToMatch = posix.relative(normalizedConfigDir, normalized);
154
- return modules.find((m) => minimatch(pathToMatch, m.path));
145
+ return modules.find((m) => globMatcher(pathToMatch, m.path));
155
146
  }
@@ -7,4 +7,4 @@ export declare class MissingComponentRuleError extends Error {
7
7
  readonly ruleName: string;
8
8
  constructor(moduleName: string, ruleName: string);
9
9
  }
10
- //# sourceMappingURL=errors.d.ts.map
10
+ //# sourceMappingURL=config-resolution-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-resolution-errors.d.ts","sourceRoot":"","sources":["../../../src/domain/config-resolution/config-resolution-errors.ts"],"names":[],"mappings":"AAAA,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;gBAEf,UAAU,EAAE,MAAM;CAK/B;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;gBAEb,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CASjD"}
@@ -0,0 +1,4 @@
1
+ import type { ExtractionConfig, ResolvedExtractionConfig, Module } from '@living-architecture/riviere-extract-config';
2
+ export type ConfigLoader = (source: string) => Module;
3
+ export declare function resolveConfig(config: ExtractionConfig, loader?: ConfigLoader): ResolvedExtractionConfig;
4
+ //# sourceMappingURL=resolve-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-config.d.ts","sourceRoot":"","sources":["../../../src/domain/config-resolution/resolve-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,MAAM,EAGP,MAAM,6CAA6C,CAAA;AAKpD,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;AAErD,wBAAgB,aAAa,CAC3B,MAAM,EAAE,gBAAgB,EACxB,MAAM,CAAC,EAAE,YAAY,GACpB,wBAAwB,CAK1B"}
@@ -1,10 +1,4 @@
1
- import { ConfigLoaderRequiredError, MissingComponentRuleError } from './errors';
2
- /**
3
- * Resolves an extraction config by expanding extends references.
4
- * @param config - The extraction config with optional extends.
5
- * @param loader - Optional loader for resolving extends references.
6
- * @returns Fully resolved config with all modules complete.
7
- */
1
+ import { ConfigLoaderRequiredError, MissingComponentRuleError } from './config-resolution-errors';
8
2
  export function resolveConfig(config, loader) {
9
3
  return {
10
4
  ...config,
@@ -0,0 +1,4 @@
1
+ import type { Node } from 'ts-morph';
2
+ import type { Predicate } from '@living-architecture/riviere-extract-config';
3
+ export declare function evaluatePredicate(node: Node, predicate: Predicate): boolean;
4
+ //# sourceMappingURL=evaluate-predicate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-predicate.d.ts","sourceRoot":"","sources":["../../../src/domain/predicate-evaluation/evaluate-predicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,IAAI,EACL,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AA4B5E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CA+B3E"}
@@ -12,12 +12,6 @@ function isNameableNode(node) {
12
12
  TsMorphNode.isMethodDeclaration(node) ||
13
13
  TsMorphNode.isFunctionDeclaration(node));
14
14
  }
15
- /**
16
- * Evaluates a predicate against an AST node.
17
- * @param node - The AST node to test.
18
- * @param predicate - The predicate to evaluate.
19
- * @returns True if the node matches the predicate.
20
- */
21
15
  export function evaluatePredicate(node, predicate) {
22
16
  if ('hasDecorator' in predicate) {
23
17
  return evaluateHasDecorator(node, predicate.hasDecorator.name, predicate.hasDecorator.from);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-extraction-rule-generic.d.ts","sourceRoot":"","sources":["../../../src/domain/value-extraction/evaluate-extraction-rule-generic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAA;AAC/F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAKhD,KAAK,uBAAuB,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AA+BlD,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,4BAA4B,EAClC,SAAS,EAAE,gBAAgB,GAC1B,uBAAuB,CAqDzB"}
@@ -1,6 +1,6 @@
1
1
  import { SyntaxKind } from 'ts-morph';
2
- import { applyTransforms } from './transforms';
3
- import { ExtractionError } from './literal-detection';
2
+ import { applyTransforms } from '../../platform/domain/string-transforms/transforms';
3
+ import { ExtractionError } from '../../platform/domain/ast-literals/literal-detection';
4
4
  function getInterfaceTypeArgs(classDecl, interfaceName) {
5
5
  const implementsClause = classDecl.getImplements();
6
6
  for (const impl of implementsClause) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-extraction-rule-method.d.ts","sourceRoot":"","sources":["../../../src/domain/value-extraction/evaluate-extraction-rule-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,mCAAmC,EACnC,+BAA+B,EAChC,MAAM,6CAA6C,CAAA;AACpD,OAAO,KAAK,EACV,gBAAgB,EAAE,iBAAiB,EACpC,MAAM,UAAU,CAAA;AAIjB,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,qBAAqB,GAAG,MAAM,GAAG,aAAa,EAAE,GAAG,eAAe,CAAA;AAEvE,MAAM,MAAM,sBAAsB,GAAG;IAAE,KAAK,EAAE,qBAAqB,CAAA;CAAE,CAAA;AAUrE,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,iCAAiC,EACxC,UAAU,EAAE,iBAAiB,GAC5B,sBAAsB,CAUxB;AAED,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,mCAAmC,EAC1C,SAAS,EAAE,gBAAgB,GAC1B,sBAAsB,CAQxB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,+BAA+B,EACrC,UAAU,EAAE,iBAAiB,GAC5B,sBAAsB,CAuBxB"}
@@ -1,5 +1,5 @@
1
- import { applyTransforms } from './transforms';
2
- import { ExtractionError } from './literal-detection';
1
+ import { applyTransforms } from '../../platform/domain/string-transforms/transforms';
2
+ import { ExtractionError } from '../../platform/domain/ast-literals/literal-detection';
3
3
  function extractParameterInfo(param) {
4
4
  const typeNode = param.getTypeNode();
5
5
  return {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluate-extraction-rule.d.ts","sourceRoot":"","sources":["../../../src/domain/value-extraction/evaluate-extraction-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,6CAA6C,CAAA;AAEpD,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAC7B,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,KAAK,EACV,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAC/C,MAAM,UAAU,CAAA;AAQjB,MAAM,MAAM,iBAAiB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpD,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,CAAA;AAMzD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,GAAG,gBAAgB,CAEjF;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,2BAA2B,EACjC,SAAS,EAAE,gBAAgB,GAC1B,gBAAgB,CAalB;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,4BAA4B,EAClC,UAAU,EAAE,iBAAiB,GAC5B,gBAAgB,CAalB;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,0BAA0B,EAChC,QAAQ,EAAE,MAAM,GACf,gBAAgB,CA6BlB;AAkCD,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,0BAA0B,EAChC,SAAS,EAAE,gBAAgB,GAC1B,gBAAgB,CAgClB;AA8GD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,8BAA8B,EACpC,SAAS,EAAE,SAAS,GACnB,gBAAgB,CAelB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,+BAA+B,EACrC,SAAS,EAAE,SAAS,GACnB,gBAAgB,CAkBlB"}
@@ -1,8 +1,8 @@
1
1
  export { evaluateFromMethodSignatureRule, evaluateFromConstructorParamsRule, evaluateFromParameterTypeRule, } from './evaluate-extraction-rule-method';
2
2
  export { evaluateFromGenericArgRule } from './evaluate-extraction-rule-generic';
3
3
  import { SyntaxKind } from 'ts-morph';
4
- import { applyTransforms } from './transforms';
5
- import { ExtractionError, extractLiteralValue } from './literal-detection';
4
+ import { applyTransforms } from '../../platform/domain/string-transforms/transforms';
5
+ import { ExtractionError, extractLiteralValue, } from '../../platform/domain/ast-literals/literal-detection';
6
6
  function literal(value) {
7
7
  return { value };
8
8
  }
@@ -1,4 +1,4 @@
1
1
  export { evaluateLiteralRule, evaluateFromClassNameRule, evaluateFromMethodNameRule, evaluateFromFilePathRule, evaluateFromPropertyRule, evaluateFromDecoratorArgRule, evaluateFromDecoratorNameRule, evaluateFromGenericArgRule, evaluateFromMethodSignatureRule, evaluateFromConstructorParamsRule, evaluateFromParameterTypeRule, type ExtractionContext, type ExtractionResult, type ParameterInfo, type MethodSignature, } from './evaluate-extraction-rule';
2
- export { applyTransforms } from './transforms';
3
- export { ExtractionError } from './literal-detection';
2
+ export { applyTransforms } from '../../platform/domain/string-transforms/transforms';
3
+ export { ExtractionError } from '../../platform/domain/ast-literals/literal-detection';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/value-extraction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAC7B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAA;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAA"}
@@ -1,3 +1,3 @@
1
1
  export { evaluateLiteralRule, evaluateFromClassNameRule, evaluateFromMethodNameRule, evaluateFromFilePathRule, evaluateFromPropertyRule, evaluateFromDecoratorArgRule, evaluateFromDecoratorNameRule, evaluateFromGenericArgRule, evaluateFromMethodSignatureRule, evaluateFromConstructorParamsRule, evaluateFromParameterTypeRule, } from './evaluate-extraction-rule';
2
- export { applyTransforms } from './transforms';
3
- export { ExtractionError } from './literal-detection';
2
+ export { applyTransforms } from '../../platform/domain/string-transforms/transforms';
3
+ export { ExtractionError } from '../../platform/domain/ast-literals/literal-detection';
@@ -1,5 +1,4 @@
1
1
  import type { Expression } from 'ts-morph';
2
- /** Error thrown when extraction fails due to invalid input or unsupported value type. */
3
2
  export declare class ExtractionError extends Error {
4
3
  readonly location: {
5
4
  file: string;
@@ -7,14 +6,9 @@ export declare class ExtractionError extends Error {
7
6
  };
8
7
  constructor(message: string, file: string, line: number);
9
8
  }
10
- /** Internal error thrown when test fixture setup fails. */
11
9
  export declare class TestFixtureError extends Error {
12
10
  constructor(message: string);
13
11
  }
14
- /**
15
- * Checks if an AST expression is an extractable literal value.
16
- * Only string, number, and boolean literals are extractable.
17
- */
18
12
  export declare function isLiteralValue(expression: Expression | undefined): boolean;
19
13
  export type LiteralResult = {
20
14
  kind: 'string';
@@ -26,10 +20,5 @@ export type LiteralResult = {
26
20
  kind: 'boolean';
27
21
  value: boolean;
28
22
  };
29
- /**
30
- * Extracts a literal value from an AST expression.
31
- * Returns a discriminated union to satisfy sonarjs/function-return-type.
32
- * @throws ExtractionError if the expression is not a literal.
33
- */
34
23
  export declare function extractLiteralValue(expression: Expression | undefined, file: string, line: number): LiteralResult;
35
24
  //# sourceMappingURL=literal-detection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literal-detection.d.ts","sourceRoot":"","sources":["../../../../src/platform/domain/ast-literals/literal-detection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAG1C,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,QAAQ,EAAE;QACjB,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;gBAEW,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAQxD;AAED,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAY1E;AAED,MAAM,MAAM,aAAa,GACrB;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd,GACC;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd,GACC;IACA,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAmDH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,aAAa,CAWf"}
@@ -1,5 +1,4 @@
1
1
  import { SyntaxKind } from 'ts-morph';
2
- /** Error thrown when extraction fails due to invalid input or unsupported value type. */
3
2
  export class ExtractionError extends Error {
4
3
  location;
5
4
  constructor(message, file, line) {
@@ -11,17 +10,12 @@ export class ExtractionError extends Error {
11
10
  };
12
11
  }
13
12
  }
14
- /** Internal error thrown when test fixture setup fails. */
15
13
  export class TestFixtureError extends Error {
16
14
  constructor(message) {
17
15
  super(message);
18
16
  this.name = 'TestFixtureError';
19
17
  }
20
18
  }
21
- /**
22
- * Checks if an AST expression is an extractable literal value.
23
- * Only string, number, and boolean literals are extractable.
24
- */
25
19
  export function isLiteralValue(expression) {
26
20
  if (expression === undefined) {
27
21
  return false;
@@ -71,11 +65,6 @@ function throwMissingInitializer(file, line) {
71
65
  function throwNonLiteralValue(expression, file, line) {
72
66
  throw new ExtractionError(`Non-literal value detected (${expression.getKindName()}): ${expression.getText()}. Only inline literals (strings, numbers, booleans) are supported`, file, line);
73
67
  }
74
- /**
75
- * Extracts a literal value from an AST expression.
76
- * Returns a discriminated union to satisfy sonarjs/function-return-type.
77
- * @throws ExtractionError if the expression is not a literal.
78
- */
79
68
  export function extractLiteralValue(expression, file, line) {
80
69
  if (expression === undefined) {
81
70
  throwMissingInitializer(file, line);
@@ -1,33 +1,9 @@
1
1
  import type { Transform } from '@living-architecture/riviere-extract-config';
2
- /**
3
- * Removes a suffix from a string if present.
4
- */
5
2
  export declare function stripSuffix(value: string, suffix: string): string;
6
- /**
7
- * Removes a prefix from a string if present.
8
- */
9
3
  export declare function stripPrefix(value: string, prefix: string): string;
10
- /**
11
- * Converts a string to lowercase.
12
- */
13
4
  export declare function toLowerCase(value: string): string;
14
- /**
15
- * Converts a string to uppercase.
16
- */
17
5
  export declare function toUpperCase(value: string): string;
18
- /**
19
- * Converts kebab-case to PascalCase.
20
- * @example 'order-placed' -> 'OrderPlaced'
21
- */
22
6
  export declare function kebabToPascal(value: string): string;
23
- /**
24
- * Converts PascalCase to kebab-case.
25
- * @example 'OrderPlaced' -> 'order-placed'
26
- */
27
7
  export declare function pascalToKebab(value: string): string;
28
- /**
29
- * Applies transforms to a value in order defined in the Transform object.
30
- * Transforms execute top-to-bottom in YAML order.
31
- */
32
8
  export declare function applyTransforms(value: string, transform: Transform): string;
33
9
  //# sourceMappingURL=transforms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transforms.d.ts","sourceRoot":"","sources":["../../../../src/platform/domain/string-transforms/transforms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAE5E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKnD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAID,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAyB3E"}
@@ -1,55 +1,31 @@
1
- /**
2
- * Removes a suffix from a string if present.
3
- */
4
1
  export function stripSuffix(value, suffix) {
5
2
  if (value.endsWith(suffix)) {
6
3
  return value.slice(0, -suffix.length);
7
4
  }
8
5
  return value;
9
6
  }
10
- /**
11
- * Removes a prefix from a string if present.
12
- */
13
7
  export function stripPrefix(value, prefix) {
14
8
  if (value.startsWith(prefix)) {
15
9
  return value.slice(prefix.length);
16
10
  }
17
11
  return value;
18
12
  }
19
- /**
20
- * Converts a string to lowercase.
21
- */
22
13
  export function toLowerCase(value) {
23
14
  return value.toLowerCase();
24
15
  }
25
- /**
26
- * Converts a string to uppercase.
27
- */
28
16
  export function toUpperCase(value) {
29
17
  return value.toUpperCase();
30
18
  }
31
- /**
32
- * Converts kebab-case to PascalCase.
33
- * @example 'order-placed' -> 'OrderPlaced'
34
- */
35
19
  export function kebabToPascal(value) {
36
20
  return value
37
21
  .split('-')
38
22
  .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
39
23
  .join('');
40
24
  }
41
- /**
42
- * Converts PascalCase to kebab-case.
43
- * @example 'OrderPlaced' -> 'order-placed'
44
- */
45
25
  export function pascalToKebab(value) {
46
26
  const transformed = value.replaceAll(/([A-Z])/g, '-$1').toLowerCase();
47
27
  return transformed.startsWith('-') ? transformed.slice(1) : transformed;
48
28
  }
49
- /**
50
- * Applies transforms to a value in order defined in the Transform object.
51
- * Transforms execute top-to-bottom in YAML order.
52
- */
53
29
  export function applyTransforms(value, transform) {
54
30
  const transformers = [];
55
31
  if (transform.stripSuffix !== undefined) {
@@ -0,0 +1,2 @@
1
+ export declare function matchesGlob(path: string, pattern: string): boolean;
2
+ //# sourceMappingURL=minimatch-glob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minimatch-glob.d.ts","sourceRoot":"","sources":["../../../../src/platform/infra/glob-matching/minimatch-glob.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAElE"}
@@ -0,0 +1,4 @@
1
+ import { minimatch } from 'minimatch';
2
+ export function matchesGlob(path, pattern) {
3
+ return minimatch(path, pattern);
4
+ }
@@ -0,0 +1,7 @@
1
+ export { extractComponents, type DraftComponent, type GlobMatcher, } from '../domain/component-extraction/extractor';
2
+ export { evaluatePredicate } from '../domain/predicate-evaluation/evaluate-predicate';
3
+ export { resolveConfig, type ConfigLoader } from '../domain/config-resolution/resolve-config';
4
+ export { ConfigLoaderRequiredError, MissingComponentRuleError, } from '../domain/config-resolution/config-resolution-errors';
5
+ export { evaluateLiteralRule, evaluateFromClassNameRule, evaluateFromMethodNameRule, evaluateFromFilePathRule, evaluateFromPropertyRule, evaluateFromDecoratorArgRule, evaluateFromDecoratorNameRule, evaluateFromGenericArgRule, evaluateFromMethodSignatureRule, evaluateFromConstructorParamsRule, evaluateFromParameterTypeRule, applyTransforms, ExtractionError, type ExtractionContext, type ExtractionResult, type ParameterInfo, type MethodSignature, } from '../domain/value-extraction';
6
+ export { matchesGlob } from '../platform/infra/glob-matching/minimatch-glob';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,GACjB,MAAM,0CAA0C,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAA;AACrF,OAAO,EACL,aAAa,EAAE,KAAK,YAAY,EACjC,MAAM,4CAA4C,CAAA;AACnD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAA"}
@@ -0,0 +1,6 @@
1
+ export { extractComponents, } from '../domain/component-extraction/extractor';
2
+ export { evaluatePredicate } from '../domain/predicate-evaluation/evaluate-predicate';
3
+ export { resolveConfig } from '../domain/config-resolution/resolve-config';
4
+ export { ConfigLoaderRequiredError, MissingComponentRuleError, } from '../domain/config-resolution/config-resolution-errors';
5
+ export { evaluateLiteralRule, evaluateFromClassNameRule, evaluateFromMethodNameRule, evaluateFromFilePathRule, evaluateFromPropertyRule, evaluateFromDecoratorArgRule, evaluateFromDecoratorNameRule, evaluateFromGenericArgRule, evaluateFromMethodSignatureRule, evaluateFromConstructorParamsRule, evaluateFromParameterTypeRule, applyTransforms, ExtractionError, } from '../domain/value-extraction';
6
+ export { matchesGlob } from '../platform/infra/glob-matching/minimatch-glob';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@living-architecture/riviere-extract-ts",
3
- "version": "0.1.32",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "main": "./dist/index.js",
9
- "module": "./dist/index.js",
10
- "types": "./dist/index.d.ts",
8
+ "main": "./dist/shell/index.js",
9
+ "module": "./dist/shell/index.js",
10
+ "types": "./dist/shell/index.d.ts",
11
11
  "exports": {
12
12
  "./package.json": "./package.json",
13
13
  ".": {
14
- "@living-architecture/source": "./src/index.ts",
15
- "types": "./dist/index.d.ts",
16
- "import": "./dist/index.js",
17
- "default": "./dist/index.js"
14
+ "@living-architecture/source": "./src/shell/index.ts",
15
+ "types": "./dist/shell/index.d.ts",
16
+ "import": "./dist/shell/index.js",
17
+ "default": "./dist/shell/index.js"
18
18
  }
19
19
  },
20
20
  "files": [
@@ -24,6 +24,6 @@
24
24
  "dependencies": {
25
25
  "minimatch": "^10.0.1",
26
26
  "ts-morph": "^24.0.0",
27
- "@living-architecture/riviere-extract-config": "0.3.9"
27
+ "@living-architecture/riviere-extract-config": "0.4.0"
28
28
  }
29
29
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;gBAEf,UAAU,EAAE,MAAM;CAK/B;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;gBAEb,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CASjD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"evaluate-extraction-rule-generic.d.ts","sourceRoot":"","sources":["../../src/extraction-rules/evaluate-extraction-rule-generic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAA;AAC/F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAKhD,KAAK,uBAAuB,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AA+BlD,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,4BAA4B,EAClC,SAAS,EAAE,gBAAgB,GAC1B,uBAAuB,CAqDzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"evaluate-extraction-rule-method.d.ts","sourceRoot":"","sources":["../../src/extraction-rules/evaluate-extraction-rule-method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,mCAAmC,EACnC,+BAA+B,EAChC,MAAM,6CAA6C,CAAA;AACpD,OAAO,KAAK,EACV,gBAAgB,EAAE,iBAAiB,EACpC,MAAM,UAAU,CAAA;AAIjB,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,qBAAqB,GAAG,MAAM,GAAG,aAAa,EAAE,GAAG,eAAe,CAAA;AAEvE,MAAM,MAAM,sBAAsB,GAAG;IAAE,KAAK,EAAE,qBAAqB,CAAA;CAAE,CAAA;AAUrE,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,iCAAiC,EACxC,UAAU,EAAE,iBAAiB,GAC5B,sBAAsB,CAUxB;AAED,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,mCAAmC,EAC1C,SAAS,EAAE,gBAAgB,GAC1B,sBAAsB,CAQxB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,+BAA+B,EACrC,UAAU,EAAE,iBAAiB,GAC5B,sBAAsB,CAuBxB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"evaluate-extraction-rule.d.ts","sourceRoot":"","sources":["../../src/extraction-rules/evaluate-extraction-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,6CAA6C,CAAA;AAEpD,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAC7B,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,KAAK,EACV,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAC/C,MAAM,UAAU,CAAA;AAOjB,MAAM,MAAM,iBAAiB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpD,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,CAAA;AAMzD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,GAAG,gBAAgB,CAEjF;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,2BAA2B,EACjC,SAAS,EAAE,gBAAgB,GAC1B,gBAAgB,CAalB;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,4BAA4B,EAClC,UAAU,EAAE,iBAAiB,GAC5B,gBAAgB,CAalB;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,0BAA0B,EAChC,QAAQ,EAAE,MAAM,GACf,gBAAgB,CA6BlB;AAkCD,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,0BAA0B,EAChC,SAAS,EAAE,gBAAgB,GAC1B,gBAAgB,CAgClB;AA8GD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,8BAA8B,EACpC,SAAS,EAAE,SAAS,GACnB,gBAAgB,CAelB;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,+BAA+B,EACrC,SAAS,EAAE,SAAS,GACnB,gBAAgB,CAkBlB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extraction-rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAC7B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"literal-detection.d.ts","sourceRoot":"","sources":["../../src/extraction-rules/literal-detection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAG1C,yFAAyF;AACzF,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,QAAQ,EAAE;QACjB,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;gBAEW,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAQxD;AAED,2DAA2D;AAC3D,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAY1E;AAED,MAAM,MAAM,aAAa,GACrB;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd,GACC;IACA,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd,GACC;IACA,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAmDH;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,aAAa,CAWf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"transforms.d.ts","sourceRoot":"","sources":["../../src/extraction-rules/transforms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AAE5E;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAID;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAyB3E"}
@@ -1,22 +0,0 @@
1
- import type { Project } from 'ts-morph';
2
- import type { ResolvedExtractionConfig } from '@living-architecture/riviere-extract-config';
3
- /** An extracted component before connection detection. */
4
- export interface DraftComponent {
5
- type: string;
6
- name: string;
7
- location: {
8
- file: string;
9
- line: number;
10
- };
11
- domain: string;
12
- }
13
- /**
14
- * Extracts architectural components from source files.
15
- * @param project - ts-morph Project instance.
16
- * @param sourceFilePaths - Paths to source files to extract from.
17
- * @param config - Resolved extraction config with detection rules.
18
- * @param configDir - Optional base directory for resolving relative module paths.
19
- * @returns Array of extracted draft components.
20
- */
21
- export declare function extractComponents(project: Project, sourceFilePaths: string[], config: ResolvedExtractionConfig, configDir?: string): DraftComponent[];
22
- //# sourceMappingURL=extractor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../src/extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,OAAO,EAER,MAAM,UAAU,CAAA;AAGjB,OAAO,KAAK,EACV,wBAAwB,EAIzB,MAAM,6CAA6C,CAAA;AAGpD,0DAA0D;AAC1D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,MAAM,EAAE,MAAM,CAAA;CACf;AA4BD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,MAAM,EAAE,EACzB,MAAM,EAAE,wBAAwB,EAChC,SAAS,CAAC,EAAE,MAAM,GACjB,cAAc,EAAE,CAIlB"}
package/dist/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { extractComponents, type DraftComponent } from './extractor';
2
- export { evaluatePredicate } from './predicates';
3
- export { resolveConfig, type ConfigLoader } from './resolve-config';
4
- export { ConfigLoaderRequiredError, MissingComponentRuleError } from './errors';
5
- export { evaluateLiteralRule, evaluateFromClassNameRule, evaluateFromMethodNameRule, evaluateFromFilePathRule, evaluateFromPropertyRule, evaluateFromDecoratorArgRule, evaluateFromDecoratorNameRule, evaluateFromGenericArgRule, evaluateFromMethodSignatureRule, evaluateFromConstructorParamsRule, evaluateFromParameterTypeRule, applyTransforms, ExtractionError, type ExtractionContext, type ExtractionResult, type ParameterInfo, type MethodSignature, } from './extraction-rules';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAAE,KAAK,cAAc,EACvC,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EACL,aAAa,EAAE,KAAK,YAAY,EACjC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,yBAAyB,EAAE,yBAAyB,EACrD,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAA"}
package/dist/index.js DELETED
@@ -1,5 +0,0 @@
1
- export { extractComponents } from './extractor';
2
- export { evaluatePredicate } from './predicates';
3
- export { resolveConfig } from './resolve-config';
4
- export { ConfigLoaderRequiredError, MissingComponentRuleError } from './errors';
5
- export { evaluateLiteralRule, evaluateFromClassNameRule, evaluateFromMethodNameRule, evaluateFromFilePathRule, evaluateFromPropertyRule, evaluateFromDecoratorArgRule, evaluateFromDecoratorNameRule, evaluateFromGenericArgRule, evaluateFromMethodSignatureRule, evaluateFromConstructorParamsRule, evaluateFromParameterTypeRule, applyTransforms, ExtractionError, } from './extraction-rules';
@@ -1,10 +0,0 @@
1
- import type { Node } from 'ts-morph';
2
- import type { Predicate } from '@living-architecture/riviere-extract-config';
3
- /**
4
- * Evaluates a predicate against an AST node.
5
- * @param node - The AST node to test.
6
- * @param predicate - The predicate to evaluate.
7
- * @returns True if the node matches the predicate.
8
- */
9
- export declare function evaluatePredicate(node: Node, predicate: Predicate): boolean;
10
- //# sourceMappingURL=evaluate-predicate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"evaluate-predicate.d.ts","sourceRoot":"","sources":["../../src/predicates/evaluate-predicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,IAAI,EACL,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AA4B5E;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CA+B3E"}
@@ -1,2 +0,0 @@
1
- export { evaluatePredicate } from './evaluate-predicate';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/predicates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA"}
@@ -1 +0,0 @@
1
- export { evaluatePredicate } from './evaluate-predicate';
@@ -1,11 +0,0 @@
1
- import type { ExtractionConfig, ResolvedExtractionConfig, Module } from '@living-architecture/riviere-extract-config';
2
- /** Function that loads a base module config from a source path. */
3
- export type ConfigLoader = (source: string) => Module;
4
- /**
5
- * Resolves an extraction config by expanding extends references.
6
- * @param config - The extraction config with optional extends.
7
- * @param loader - Optional loader for resolving extends references.
8
- * @returns Fully resolved config with all modules complete.
9
- */
10
- export declare function resolveConfig(config: ExtractionConfig, loader?: ConfigLoader): ResolvedExtractionConfig;
11
- //# sourceMappingURL=resolve-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-config.d.ts","sourceRoot":"","sources":["../src/resolve-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,MAAM,EAGP,MAAM,6CAA6C,CAAA;AAKpD,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;AAErD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,gBAAgB,EACxB,MAAM,CAAC,EAAE,YAAY,GACpB,wBAAwB,CAK1B"}