tdepend 0.2.0 → 0.3.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.
Files changed (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +212 -116
  3. package/dist/api/analyze.d.ts +8 -68
  4. package/dist/api/analyze.js +33 -108
  5. package/dist/api/analyze.js.map +1 -1
  6. package/dist/api/explain.d.ts +22 -0
  7. package/dist/api/explain.js +38 -0
  8. package/dist/api/explain.js.map +1 -0
  9. package/dist/api/export.d.ts +4 -47
  10. package/dist/api/export.js +6 -45
  11. package/dist/api/export.js.map +1 -1
  12. package/dist/api/serialization.d.ts +6 -26
  13. package/dist/api/serialization.js +68 -58
  14. package/dist/api/serialization.js.map +1 -1
  15. package/dist/cli/index.js +11 -129
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/cli/run.d.ts +12 -0
  18. package/dist/cli/run.js +112 -0
  19. package/dist/cli/run.js.map +1 -0
  20. package/dist/config/loadConfig.d.ts +10 -10
  21. package/dist/config/loadConfig.js +73 -36
  22. package/dist/config/loadConfig.js.map +1 -1
  23. package/dist/config/schema.d.ts +59 -29
  24. package/dist/config/schema.js +45 -51
  25. package/dist/config/schema.js.map +1 -1
  26. package/dist/errors.d.ts +9 -0
  27. package/dist/errors.js +21 -0
  28. package/dist/errors.js.map +1 -0
  29. package/dist/files/collectFiles.d.ts +21 -0
  30. package/dist/files/collectFiles.js +189 -0
  31. package/dist/files/collectFiles.js.map +1 -0
  32. package/dist/fs.d.ts +16 -0
  33. package/dist/fs.js +50 -0
  34. package/dist/fs.js.map +1 -0
  35. package/dist/graph/buildFileGraph.d.ts +33 -0
  36. package/dist/graph/buildFileGraph.js +163 -0
  37. package/dist/graph/buildFileGraph.js.map +1 -0
  38. package/dist/graph/fileGraph.d.ts +20 -0
  39. package/dist/graph/fileGraph.js +75 -0
  40. package/dist/graph/fileGraph.js.map +1 -0
  41. package/dist/index.d.ts +10 -21
  42. package/dist/index.js +6 -29
  43. package/dist/index.js.map +1 -1
  44. package/dist/output/analyzeText.d.ts +7 -0
  45. package/dist/output/analyzeText.js +91 -0
  46. package/dist/output/analyzeText.js.map +1 -0
  47. package/dist/parser/extractSites.d.ts +3 -0
  48. package/dist/parser/extractSites.js +704 -0
  49. package/dist/parser/extractSites.js.map +1 -0
  50. package/dist/parser/loadsTarget.d.ts +10 -0
  51. package/dist/parser/loadsTarget.js +304 -0
  52. package/dist/parser/loadsTarget.js.map +1 -0
  53. package/dist/parser/types.d.ts +30 -0
  54. package/dist/{types/graph.js → parser/types.js} +1 -1
  55. package/dist/parser/types.js.map +1 -0
  56. package/dist/project/discoverProject.d.ts +2 -0
  57. package/dist/project/discoverProject.js +477 -0
  58. package/dist/project/discoverProject.js.map +1 -0
  59. package/dist/project/gitignore.d.ts +13 -0
  60. package/dist/project/gitignore.js +138 -0
  61. package/dist/project/gitignore.js.map +1 -0
  62. package/dist/project/types.d.ts +44 -0
  63. package/dist/{types/parser.js → project/types.js} +1 -1
  64. package/dist/project/types.js.map +1 -0
  65. package/dist/resolver/createResolver.d.ts +4 -0
  66. package/dist/resolver/createResolver.js +276 -0
  67. package/dist/resolver/createResolver.js.map +1 -0
  68. package/dist/resolver/types.d.ts +28 -0
  69. package/dist/resolver/types.js +3 -0
  70. package/dist/resolver/types.js.map +1 -0
  71. package/dist/resolver/workspaceHost.d.ts +12 -0
  72. package/dist/resolver/workspaceHost.js +253 -0
  73. package/dist/resolver/workspaceHost.js.map +1 -0
  74. package/dist/types/api.d.ts +71 -64
  75. package/package.json +24 -25
  76. package/dist/analysis/reporter.d.ts +0 -22
  77. package/dist/analysis/reporter.js +0 -116
  78. package/dist/analysis/reporter.js.map +0 -1
  79. package/dist/graph/cycleDetector.d.ts +0 -2
  80. package/dist/graph/cycleDetector.js +0 -56
  81. package/dist/graph/cycleDetector.js.map +0 -1
  82. package/dist/graph/dependencyGraph.d.ts +0 -10
  83. package/dist/graph/dependencyGraph.js +0 -41
  84. package/dist/graph/dependencyGraph.js.map +0 -1
  85. package/dist/metrics/abstractness.d.ts +0 -2
  86. package/dist/metrics/abstractness.js +0 -10
  87. package/dist/metrics/abstractness.js.map +0 -1
  88. package/dist/metrics/distance.d.ts +0 -1
  89. package/dist/metrics/distance.js +0 -7
  90. package/dist/metrics/distance.js.map +0 -1
  91. package/dist/metrics/index.d.ts +0 -4
  92. package/dist/metrics/index.js +0 -30
  93. package/dist/metrics/index.js.map +0 -1
  94. package/dist/metrics/instability.d.ts +0 -1
  95. package/dist/metrics/instability.js +0 -8
  96. package/dist/metrics/instability.js.map +0 -1
  97. package/dist/parser/fileScanner.d.ts +0 -8
  98. package/dist/parser/fileScanner.js +0 -22
  99. package/dist/parser/fileScanner.js.map +0 -1
  100. package/dist/parser/tsParser.d.ts +0 -18
  101. package/dist/parser/tsParser.js +0 -158
  102. package/dist/parser/tsParser.js.map +0 -1
  103. package/dist/types/graph.d.ts +0 -14
  104. package/dist/types/graph.js.map +0 -1
  105. package/dist/types/parser.d.ts +0 -26
  106. package/dist/types/parser.js.map +0 -1
  107. package/dist/utils/deepMerge.d.ts +0 -1
  108. package/dist/utils/deepMerge.js +0 -23
  109. package/dist/utils/deepMerge.js.map +0 -1
  110. package/dist/utils/log.d.ts +0 -2
  111. package/dist/utils/log.js +0 -9
  112. package/dist/utils/log.js.map +0 -1
  113. package/dist/utils/pathUtils.d.ts +0 -12
  114. package/dist/utils/pathUtils.js +0 -27
  115. package/dist/utils/pathUtils.js.map +0 -1
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scanFiles = scanFiles;
4
- const glob_1 = require("glob");
5
- const pathUtils_1 = require("../utils/pathUtils");
6
- /**
7
- * Scan files based on include/exclude patterns from config
8
- *
9
- * @param config - TDepend configuration with include/exclude patterns
10
- * @returns Array of normalized absolute file paths
11
- */
12
- async function scanFiles(config) {
13
- const { include, exclude } = config;
14
- // Scan files matching include patterns
15
- const files = await (0, glob_1.glob)(include, {
16
- ignore: exclude,
17
- absolute: true,
18
- nodir: true,
19
- });
20
- return files.map((file) => (0, pathUtils_1.normalizePath)(file));
21
- }
22
- //# sourceMappingURL=fileScanner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fileScanner.js","sourceRoot":"","sources":["../../src/parser/fileScanner.ts"],"names":[],"mappings":";;AAWA,8BAWC;AAtBD,+BAA4B;AAG5B,kDAAmD;AAEnD;;;;;GAKG;AACI,KAAK,UAAU,SAAS,CAAC,MAAqB;IACnD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAEpC,uCAAuC;IACvC,MAAM,KAAK,GAAG,MAAM,IAAA,WAAI,EAAC,OAAO,EAAE;QAChC,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,yBAAa,EAAC,IAAI,CAAC,CAAC,CAAC;AAClD,CAAC"}
@@ -1,18 +0,0 @@
1
- import { Project } from 'ts-morph';
2
- import type { ParsedModule } from '../types/parser';
3
- /**
4
- * Parse multiple TypeScript files in a project
5
- *
6
- * @param filePaths - Array of file paths to parse
7
- * @param tsConfigPath - Optional path to tsconfig.json
8
- * @returns Array of ParsedModule objects
9
- */
10
- export declare function parseProject(filePaths: string[], tsConfigPath?: string): ParsedModule[];
11
- /**
12
- * Parse a single TypeScript file
13
- *
14
- * @param filePath - Path to the file to parse
15
- * @param project - Optional ts-morph Project instance
16
- * @returns ParsedModule with extracted information
17
- */
18
- export declare function parseFile(filePath: string, project?: Project): ParsedModule;
@@ -1,158 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseProject = parseProject;
4
- exports.parseFile = parseFile;
5
- const node_path_1 = require("node:path");
6
- const ts_morph_1 = require("ts-morph");
7
- const pathUtils_1 = require("../utils/pathUtils");
8
- function extractImports(sourceFile, filePath) {
9
- const imports = [];
10
- const importDeclarations = sourceFile.getImportDeclarations();
11
- for (const importDecl of importDeclarations) {
12
- const moduleSpecifier = importDecl.getModuleSpecifierValue();
13
- if ((0, pathUtils_1.isRelativeImport)(moduleSpecifier)) {
14
- const resolvedPath = resolveImportPath(moduleSpecifier, filePath);
15
- if (resolvedPath) {
16
- imports.push(resolvedPath);
17
- }
18
- }
19
- else if (!(0, pathUtils_1.isExternalModule)(moduleSpecifier)) {
20
- // Handle absolute imports (potential path aliases)
21
- // For now, we'll skip these - full path alias resolution needs tsconfig
22
- // This will be enhanced if needed
23
- }
24
- }
25
- return imports;
26
- }
27
- function extractClasses(sourceFile, filePath) {
28
- const classes = [];
29
- const exports = [];
30
- const classDeclarations = sourceFile.getClasses();
31
- for (const classDecl of classDeclarations) {
32
- const name = classDecl.getName();
33
- if (name) {
34
- const isAbstract = classDecl.isAbstract();
35
- const isExported = classDecl.isExported();
36
- classes.push({
37
- name,
38
- isAbstract,
39
- isExported,
40
- filePath,
41
- });
42
- if (isExported) {
43
- exports.push(name);
44
- }
45
- }
46
- }
47
- return { classes, exports };
48
- }
49
- function extractInterfaces(sourceFile) {
50
- const exports = [];
51
- let interfaces = 0;
52
- const interfaceDeclarations = sourceFile.getInterfaces();
53
- for (const interfaceDecl of interfaceDeclarations) {
54
- const name = interfaceDecl.getName();
55
- if (interfaceDecl.isExported()) {
56
- exports.push(name);
57
- interfaces++;
58
- }
59
- else {
60
- interfaces++;
61
- }
62
- }
63
- return { interfaces, exports };
64
- }
65
- function extractNamespaces(sourceFile, filePath) {
66
- const namespaces = [];
67
- const exports = [];
68
- const namespaceDeclarations = sourceFile.getModules();
69
- for (const namespaceDecl of namespaceDeclarations) {
70
- const name = namespaceDecl.getName();
71
- namespaces.push({
72
- name,
73
- filePath,
74
- });
75
- if (namespaceDecl.isExported()) {
76
- exports.push(name);
77
- }
78
- }
79
- return { namespaces, exports };
80
- }
81
- function extractOtherExports(sourceFile, existingExports) {
82
- const otherExports = [];
83
- const exportedDeclarations = sourceFile.getExportedDeclarations();
84
- for (const [name, declarations] of exportedDeclarations) {
85
- if (existingExports.includes(name)) {
86
- continue;
87
- }
88
- if (declarations.length > 0) {
89
- otherExports.push(name);
90
- }
91
- }
92
- return otherExports;
93
- }
94
- function parseSourceFile(sourceFile) {
95
- const filePath = (0, pathUtils_1.normalizePath)(sourceFile.getFilePath());
96
- const imports = extractImports(sourceFile, filePath);
97
- const { classes, exports: classExports } = extractClasses(sourceFile, filePath);
98
- const { interfaces, exports: interfaceExports } = extractInterfaces(sourceFile);
99
- const { namespaces, exports: namespaceExports } = extractNamespaces(sourceFile, filePath);
100
- const allExports = [...classExports, ...interfaceExports, ...namespaceExports];
101
- const otherExports = extractOtherExports(sourceFile, allExports);
102
- const exports = [...allExports, ...otherExports];
103
- const totalTypes = classes.length + interfaces;
104
- return {
105
- filePath,
106
- imports,
107
- exports,
108
- classes,
109
- namespaces,
110
- interfaces,
111
- totalTypes,
112
- };
113
- }
114
- function resolveImportPath(importSpecifier, fromFile) {
115
- const dir = (0, node_path_1.dirname)(fromFile);
116
- // Resolve relative to the importing file
117
- const resolvedPath = (0, node_path_1.resolve)(dir, importSpecifier);
118
- // Try .ts as default extension for TypeScript projects
119
- const pathWithTs = resolvedPath + '.ts';
120
- return (0, pathUtils_1.normalizePath)(pathWithTs);
121
- }
122
- /**
123
- * Parse multiple TypeScript files in a project
124
- *
125
- * @param filePaths - Array of file paths to parse
126
- * @param tsConfigPath - Optional path to tsconfig.json
127
- * @returns Array of ParsedModule objects
128
- */
129
- function parseProject(filePaths, tsConfigPath) {
130
- const project = new ts_morph_1.Project({
131
- tsConfigFilePath: tsConfigPath,
132
- skipAddingFilesFromTsConfig: true,
133
- });
134
- // Add all files to the project
135
- for (const filePath of filePaths) {
136
- project.addSourceFileAtPath(filePath);
137
- }
138
- const modules = [];
139
- const sourceFiles = project.getSourceFiles();
140
- for (const sourceFile of sourceFiles) {
141
- const parsedModule = parseSourceFile(sourceFile);
142
- modules.push(parsedModule);
143
- }
144
- return modules;
145
- }
146
- /**
147
- * Parse a single TypeScript file
148
- *
149
- * @param filePath - Path to the file to parse
150
- * @param project - Optional ts-morph Project instance
151
- * @returns ParsedModule with extracted information
152
- */
153
- function parseFile(filePath, project) {
154
- const proj = project || new ts_morph_1.Project();
155
- const sourceFile = proj.addSourceFileAtPath(filePath);
156
- return parseSourceFile(sourceFile);
157
- }
158
- //# sourceMappingURL=tsParser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsParser.js","sourceRoot":"","sources":["../../src/parser/tsParser.ts"],"names":[],"mappings":";;AAkKA,oCAoBC;AASD,8BAIC;AAnMD,yCAA6C;AAC7C,uCAAoD;AAGpD,kDAAuF;AAEvF,SAAS,cAAc,CAAC,UAAsB,EAAE,QAAgB;IAC9D,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,kBAAkB,GAAG,UAAU,CAAC,qBAAqB,EAAE,CAAC;IAE9D,KAAK,MAAM,UAAU,IAAI,kBAAkB,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,UAAU,CAAC,uBAAuB,EAAE,CAAC;QAE7D,IAAI,IAAA,4BAAgB,EAAC,eAAe,CAAC,EAAE,CAAC;YACtC,MAAM,YAAY,GAAG,iBAAiB,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;YAClE,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;aAAM,IAAI,CAAC,IAAA,4BAAgB,EAAC,eAAe,CAAC,EAAE,CAAC;YAC9C,mDAAmD;YACnD,wEAAwE;YACxE,kCAAkC;QACpC,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,cAAc,CAAC,UAAsB,EAAE,QAAgB;IAI9D,MAAM,OAAO,GAAkB,EAAE,CAAC;IAClC,MAAM,OAAO,GAAa,EAAE,CA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,EAAE,CAAC;IAE7C,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,MAAM,YAAY,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,QAAgB,EAAE,OAAiB;IAC3D,MAAM,IAAI,GAAG,OAAO,IAAI,IAAI,kBAAO,EAAE,CAAC;IACtC,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtD,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;AACrC,CAAC"}
@@ -1,14 +0,0 @@
1
- export interface DependencyNode {
2
- filePath: string;
3
- dependencies: Set<string>;
4
- dependents: Set<string>;
5
- }
6
- export interface ModuleMetrics {
7
- filePath: string;
8
- Ca: number;
9
- Ce: number;
10
- cycles: string[][];
11
- abstractness: number;
12
- instability: number;
13
- distance: number;
14
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../src/types/graph.ts"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- export interface ParsedClass {
2
- name: string;
3
- isAbstract: boolean;
4
- isExported: boolean;
5
- filePath: string;
6
- }
7
- export interface ParsedNamespace {
8
- name: string;
9
- filePath: string;
10
- }
11
- export interface ParsedModule {
12
- /** Normalized absolute path to the module file */
13
- filePath: string;
14
- /** Resolved import paths (normalized file paths) */
15
- imports: string[];
16
- /** Names of exported symbols */
17
- exports: string[];
18
- /** Parsed classes in this module */
19
- classes: ParsedClass[];
20
- /** Parsed namespaces in this module */
21
- namespaces: ParsedNamespace[];
22
- /** Count of interfaces (for abstractness calculation) */
23
- interfaces: number;
24
- /** Total count of types (classes + interfaces) */
25
- totalTypes: number;
26
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/types/parser.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export declare function deepMerge<T extends Record<string, unknown>>(target: T, source: Partial<T>): T;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deepMerge = deepMerge;
4
- function deepMerge(target, source) {
5
- const result = { ...target };
6
- for (const key in source) {
7
- const sourceValue = source[key];
8
- const targetValue = result[key];
9
- if (sourceValue &&
10
- typeof sourceValue === 'object' &&
11
- !Array.isArray(sourceValue) &&
12
- targetValue &&
13
- typeof targetValue === 'object' &&
14
- !Array.isArray(targetValue)) {
15
- result[key] = deepMerge(targetValue, sourceValue);
16
- }
17
- else if (sourceValue !== undefined) {
18
- result[key] = sourceValue;
19
- }
20
- }
21
- return result;
22
- }
23
- //# sourceMappingURL=deepMerge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deepMerge.js","sourceRoot":"","sources":["../../src/utils/deepMerge.ts"],"names":[],"mappings":";;AAAA,8BAyBC;AAzBD,SAAgB,SAAS,CAAoC,MAAS,EAAE,MAAkB;IACxF,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IAE7B,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAEhC,IACE,WAAW;YACX,OAAO,WAAW,KAAK,QAAQ;YAC/B,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;YAC3B,WAAW;YACX,OAAO,WAAW,KAAK,QAAQ;YAC/B,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAC3B,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CACrB,WAAsC,EACtC,WAAsC,CACR,CAAC;QACnC,CAAC;aAAM,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YACrC,MAAM,CAAC,GAAG,CAAC,GAAG,WAA0C,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,2 +0,0 @@
1
- import { TDependConfig } from "../config/schema";
2
- export declare function log(config: TDependConfig, message: string): void;
package/dist/utils/log.js DELETED
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.log = log;
4
- function log(config, message) {
5
- if (config.ci.outputFormat !== 'json') {
6
- console.log(message);
7
- }
8
- }
9
- //# sourceMappingURL=log.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/utils/log.ts"],"names":[],"mappings":";;AAEA,kBAIC;AAJD,SAAgB,GAAG,CAAC,MAAqB,EAAE,OAAe;IACxD,IAAI,MAAM,CAAC,EAAE,CAAC,YAAY,KAAK,MAAM,EAAE,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Normalize a file path to an absolute, cross-platform path
3
- */
4
- export declare function normalizePath(filePath: string): string;
5
- /**
6
- * Check if an import specifier is a relative import
7
- */
8
- export declare function isRelativeImport(importSpecifier: string): boolean;
9
- /**
10
- * Check if an import specifier is an external module
11
- */
12
- export declare function isExternalModule(importSpecifier: string): boolean;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizePath = normalizePath;
4
- exports.isRelativeImport = isRelativeImport;
5
- exports.isExternalModule = isExternalModule;
6
- const node_path_1 = require("node:path");
7
- /**
8
- * Normalize a file path to an absolute, cross-platform path
9
- */
10
- function normalizePath(filePath) {
11
- const absolutePath = (0, node_path_1.isAbsolute)(filePath) ? filePath : (0, node_path_1.resolve)(filePath);
12
- return (0, node_path_1.normalize)(absolutePath);
13
- }
14
- /**
15
- * Check if an import specifier is a relative import
16
- */
17
- function isRelativeImport(importSpecifier) {
18
- return importSpecifier.startsWith('./') || importSpecifier.startsWith('../');
19
- }
20
- /**
21
- * Check if an import specifier is an external module
22
- */
23
- function isExternalModule(importSpecifier) {
24
- // External if it doesn't start with . or /
25
- return !importSpecifier.startsWith('.') && !importSpecifier.startsWith('/');
26
- }
27
- //# sourceMappingURL=pathUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pathUtils.js","sourceRoot":"","sources":["../../src/utils/pathUtils.ts"],"names":[],"mappings":";;AAKA,sCAGC;AAKD,4CAEC;AAKD,4CAGC;AAvBD,yCAA2D;AAE3D;;GAEG;AACH,SAAgB,aAAa,CAAC,QAAgB;IAC5C,MAAM,YAAY,GAAG,IAAA,sBAAU,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,mBAAO,EAAC,QAAQ,CAAC,CAAC;IACzE,OAAO,IAAA,qBAAS,EAAC,YAAY,CAAC,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,eAAuB;IACtD,OAAO,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,eAAuB;IACtD,2CAA2C;IAC3C,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC9E,CAAC"}