@aneuhold/core-ts-lib 2.2.6 → 2.2.7
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/lib/index.d.ts +3 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/index.ts +5 -7
- package/lib/interfaces/ITracer.d.ts.map +1 -1
- package/lib/interfaces/ITracer.js.map +1 -1
- package/lib/interfaces/ITracer.ts +8 -2
- package/lib/services/ArrayService.d.ts.map +1 -1
- package/lib/services/ArrayService.js.map +1 -1
- package/lib/services/ArrayService.ts +4 -1
- package/lib/services/DateService/DateService.d.ts.map +1 -1
- package/lib/services/DateService/DateService.js +3 -1
- package/lib/services/DateService/DateService.js.map +1 -1
- package/lib/services/DateService/DateService.spec.ts +98 -0
- package/lib/services/DateService/DateService.ts +25 -7
- package/lib/services/DependencyService.d.ts.map +1 -1
- package/lib/services/DependencyService.js +3 -1
- package/lib/services/DependencyService.js.map +1 -1
- package/lib/services/DependencyService.ts +32 -10
- package/lib/services/FileSystemService/FileSystemService.d.ts +12 -38
- package/lib/services/FileSystemService/FileSystemService.d.ts.map +1 -1
- package/lib/services/FileSystemService/FileSystemService.js +26 -83
- package/lib/services/FileSystemService/FileSystemService.js.map +1 -1
- package/lib/services/FileSystemService/FileSystemService.spec.ts +133 -0
- package/lib/services/FileSystemService/FileSystemService.ts +53 -138
- package/lib/services/PackageService.d.ts +4 -60
- package/lib/services/PackageService.d.ts.map +1 -1
- package/lib/services/PackageService.js +43 -182
- package/lib/services/PackageService.js.map +1 -1
- package/lib/services/PackageService.ts +119 -241
- package/lib/utils/ErrorUtils.d.ts.map +1 -1
- package/lib/utils/ErrorUtils.js.map +1 -1
- package/lib/utils/ErrorUtils.ts +3 -1
- package/package.json +1 -1
- package/lib/services/FileSystemService/GlobMatchingService.d.ts +0 -48
- package/lib/services/FileSystemService/GlobMatchingService.d.ts.map +0 -1
- package/lib/services/FileSystemService/GlobMatchingService.js +0 -129
- package/lib/services/FileSystemService/GlobMatchingService.js.map +0 -1
- package/lib/services/FileSystemService/GlobMatchingService.ts +0 -153
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
/**
|
|
3
|
-
* A service for handling glob-like pattern matching operations.
|
|
4
|
-
* Supports common glob patterns like **, *, and exact matches.
|
|
5
|
-
*
|
|
6
|
-
* Inspired by the isaacs/node-glob library (ISC License)
|
|
7
|
-
* but simplified for basic use cases.
|
|
8
|
-
*/
|
|
9
|
-
export default class GlobMatchingService {
|
|
10
|
-
/**
|
|
11
|
-
* Gets files matching the include patterns while excluding those that match exclude patterns.
|
|
12
|
-
* Uses simple glob-like matching for common patterns.
|
|
13
|
-
*
|
|
14
|
-
* @param allFiles Array of all file paths to filter
|
|
15
|
-
* @param rootPath The root directory path for computing relative paths
|
|
16
|
-
* @param includePatterns Array of glob-like patterns to include
|
|
17
|
-
* @param excludePatterns Array of glob-like patterns to exclude
|
|
18
|
-
*/
|
|
19
|
-
static getMatchingFiles(allFiles, rootPath, includePatterns, excludePatterns) {
|
|
20
|
-
return allFiles.filter((filePath) => {
|
|
21
|
-
const relativePath = path.relative(rootPath, filePath);
|
|
22
|
-
// Check if file matches any exclude pattern
|
|
23
|
-
if (excludePatterns.some((pattern) => this.matchesPattern(relativePath, pattern))) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
// Check if file matches any include pattern
|
|
27
|
-
return includePatterns.some((pattern) => this.matchesPattern(relativePath, pattern));
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Simple glob-like pattern matching for common use cases.
|
|
32
|
-
* Supports:
|
|
33
|
-
* - ** for any number of directories (globstar)
|
|
34
|
-
* - * for any characters except path separators
|
|
35
|
-
* - Exact matches
|
|
36
|
-
*
|
|
37
|
-
* @param filePath The file path to test
|
|
38
|
-
* @param pattern The pattern to match against
|
|
39
|
-
*/
|
|
40
|
-
static matchesPattern(filePath, pattern) {
|
|
41
|
-
// Normalize path separators to forward slashes
|
|
42
|
-
const normalizedPath = filePath.replace(/\\/g, '/');
|
|
43
|
-
const normalizedPattern = pattern.replace(/\\/g, '/');
|
|
44
|
-
// Handle special case of **/* which should match everything
|
|
45
|
-
if (normalizedPattern === '**/*') {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
// Split into segments for more precise matching
|
|
49
|
-
const pathSegments = normalizedPath.split('/');
|
|
50
|
-
const patternSegments = normalizedPattern.split('/');
|
|
51
|
-
return this.matchSegments(pathSegments, patternSegments);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Match path segments against pattern segments with support for globstar (**).
|
|
55
|
-
*
|
|
56
|
-
* The idea is that each segment doesn't cross path separators. It should
|
|
57
|
-
* be split by '/' and then matched segment by segment.
|
|
58
|
-
*
|
|
59
|
-
* @param pathSegments Array of path segments
|
|
60
|
-
* @param patternSegments Array of pattern segments
|
|
61
|
-
*/
|
|
62
|
-
static matchSegments(pathSegments, patternSegments) {
|
|
63
|
-
let pathIndex = 0;
|
|
64
|
-
let patternIndex = 0;
|
|
65
|
-
while (pathIndex < pathSegments.length && patternIndex < patternSegments.length) {
|
|
66
|
-
const pathSegment = pathSegments[pathIndex];
|
|
67
|
-
const patternSegment = patternSegments[patternIndex];
|
|
68
|
-
if (patternSegment === '**') {
|
|
69
|
-
// Handle globstar - it can match zero or more segments
|
|
70
|
-
patternIndex++;
|
|
71
|
-
// If ** is the last segment, it matches everything remaining
|
|
72
|
-
if (patternIndex >= patternSegments.length) {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
// Try to match the rest of the pattern against remaining path segments
|
|
76
|
-
const remainingPattern = patternSegments.slice(patternIndex);
|
|
77
|
-
// Try matching from current position onwards
|
|
78
|
-
for (let i = pathIndex; i <= pathSegments.length; i++) {
|
|
79
|
-
const remainingPath = pathSegments.slice(i);
|
|
80
|
-
if (this.matchSegments(remainingPath, remainingPattern)) {
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
else if (this.matchSingleSegment(pathSegment, patternSegment)) {
|
|
87
|
-
// Regular segment match
|
|
88
|
-
pathIndex++;
|
|
89
|
-
patternIndex++;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
// Check if we've consumed both path and pattern completely
|
|
96
|
-
// or if remaining pattern segments are only globstars
|
|
97
|
-
const remainingPattern = patternSegments.slice(patternIndex);
|
|
98
|
-
const pathConsumed = pathIndex >= pathSegments.length;
|
|
99
|
-
const patternConsumed = patternIndex >= patternSegments.length;
|
|
100
|
-
if (pathConsumed && patternConsumed) {
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
if (pathConsumed && remainingPattern.every((seg) => seg === '**')) {
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
return false;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Match a single segment with support for * wildcard
|
|
110
|
-
*
|
|
111
|
-
* @param pathSegment Single path segment
|
|
112
|
-
* @param patternSegment Single pattern segment
|
|
113
|
-
*/
|
|
114
|
-
static matchSingleSegment(pathSegment, patternSegment) {
|
|
115
|
-
if (patternSegment === '*') {
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
if (patternSegment === pathSegment) {
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
// Convert pattern to regex for more complex matching
|
|
122
|
-
const regexPattern = patternSegment
|
|
123
|
-
.replace(/\./g, '\\.') // Escape dots
|
|
124
|
-
.replace(/\*/g, '[^/]*'); // * matches anything except slashes
|
|
125
|
-
const regex = new RegExp(`^${regexPattern}$`);
|
|
126
|
-
return regex.test(pathSegment);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
//# sourceMappingURL=GlobMatchingService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GlobMatchingService.js","sourceRoot":"","sources":["../../../src/services/FileSystemService/GlobMatchingService.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC;;;;;;;;OAQG;IACH,MAAM,CAAC,gBAAgB,CACrB,QAAkB,EAClB,QAAgB,EAChB,eAAyB,EACzB,eAAyB;QAEzB,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE;YAClC,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAEvD,4CAA4C;YAC5C,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;gBAClF,OAAO,KAAK,CAAC;YACf,CAAC;YAED,4CAA4C;YAC5C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;QACvF,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,cAAc,CAAC,QAAgB,EAAE,OAAe;QACrD,+CAA+C;QAC/C,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACpD,MAAM,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEtD,4DAA4D;QAC5D,IAAI,iBAAiB,KAAK,MAAM,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,gDAAgD;QAChD,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/C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supports common glob patterns like **, *, and exact matches.
|
|
6
|
-
*
|
|
7
|
-
* Inspired by the isaacs/node-glob library (ISC License)
|
|
8
|
-
* but simplified for basic use cases.
|
|
9
|
-
*/
|
|
10
|
-
export default class GlobMatchingService {
|
|
11
|
-
/**
|
|
12
|
-
* Gets files matching the include patterns while excluding those that match exclude patterns.
|
|
13
|
-
* Uses simple glob-like matching for common patterns.
|
|
14
|
-
*
|
|
15
|
-
* @param allFiles Array of all file paths to filter
|
|
16
|
-
* @param rootPath The root directory path for computing relative paths
|
|
17
|
-
* @param includePatterns Array of glob-like patterns to include
|
|
18
|
-
* @param excludePatterns Array of glob-like patterns to exclude
|
|
19
|
-
*/
|
|
20
|
-
static getMatchingFiles(
|
|
21
|
-
allFiles: string[],
|
|
22
|
-
rootPath: string,
|
|
23
|
-
includePatterns: string[],
|
|
24
|
-
excludePatterns: string[]
|
|
25
|
-
): string[] {
|
|
26
|
-
return allFiles.filter((filePath) => {
|
|
27
|
-
const relativePath = path.relative(rootPath, filePath);
|
|
28
|
-
|
|
29
|
-
// Check if file matches any exclude pattern
|
|
30
|
-
if (excludePatterns.some((pattern) => this.matchesPattern(relativePath, pattern))) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Check if file matches any include pattern
|
|
35
|
-
return includePatterns.some((pattern) => this.matchesPattern(relativePath, pattern));
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Simple glob-like pattern matching for common use cases.
|
|
41
|
-
* Supports:
|
|
42
|
-
* - ** for any number of directories (globstar)
|
|
43
|
-
* - * for any characters except path separators
|
|
44
|
-
* - Exact matches
|
|
45
|
-
*
|
|
46
|
-
* @param filePath The file path to test
|
|
47
|
-
* @param pattern The pattern to match against
|
|
48
|
-
*/
|
|
49
|
-
static matchesPattern(filePath: string, pattern: string): boolean {
|
|
50
|
-
// Normalize path separators to forward slashes
|
|
51
|
-
const normalizedPath = filePath.replace(/\\/g, '/');
|
|
52
|
-
const normalizedPattern = pattern.replace(/\\/g, '/');
|
|
53
|
-
|
|
54
|
-
// Handle special case of **/* which should match everything
|
|
55
|
-
if (normalizedPattern === '**/*') {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Split into segments for more precise matching
|
|
60
|
-
const pathSegments = normalizedPath.split('/');
|
|
61
|
-
const patternSegments = normalizedPattern.split('/');
|
|
62
|
-
|
|
63
|
-
return this.matchSegments(pathSegments, patternSegments);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Match path segments against pattern segments with support for globstar (**).
|
|
68
|
-
*
|
|
69
|
-
* The idea is that each segment doesn't cross path separators. It should
|
|
70
|
-
* be split by '/' and then matched segment by segment.
|
|
71
|
-
*
|
|
72
|
-
* @param pathSegments Array of path segments
|
|
73
|
-
* @param patternSegments Array of pattern segments
|
|
74
|
-
*/
|
|
75
|
-
private static matchSegments(pathSegments: string[], patternSegments: string[]): boolean {
|
|
76
|
-
let pathIndex = 0;
|
|
77
|
-
let patternIndex = 0;
|
|
78
|
-
|
|
79
|
-
while (pathIndex < pathSegments.length && patternIndex < patternSegments.length) {
|
|
80
|
-
const pathSegment = pathSegments[pathIndex];
|
|
81
|
-
const patternSegment = patternSegments[patternIndex];
|
|
82
|
-
|
|
83
|
-
if (patternSegment === '**') {
|
|
84
|
-
// Handle globstar - it can match zero or more segments
|
|
85
|
-
patternIndex++;
|
|
86
|
-
|
|
87
|
-
// If ** is the last segment, it matches everything remaining
|
|
88
|
-
if (patternIndex >= patternSegments.length) {
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Try to match the rest of the pattern against remaining path segments
|
|
93
|
-
const remainingPattern = patternSegments.slice(patternIndex);
|
|
94
|
-
|
|
95
|
-
// Try matching from current position onwards
|
|
96
|
-
for (let i = pathIndex; i <= pathSegments.length; i++) {
|
|
97
|
-
const remainingPath = pathSegments.slice(i);
|
|
98
|
-
if (this.matchSegments(remainingPath, remainingPattern)) {
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return false;
|
|
104
|
-
} else if (this.matchSingleSegment(pathSegment, patternSegment)) {
|
|
105
|
-
// Regular segment match
|
|
106
|
-
pathIndex++;
|
|
107
|
-
patternIndex++;
|
|
108
|
-
} else {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// Check if we've consumed both path and pattern completely
|
|
114
|
-
// or if remaining pattern segments are only globstars
|
|
115
|
-
const remainingPattern = patternSegments.slice(patternIndex);
|
|
116
|
-
const pathConsumed = pathIndex >= pathSegments.length;
|
|
117
|
-
const patternConsumed = patternIndex >= patternSegments.length;
|
|
118
|
-
|
|
119
|
-
if (pathConsumed && patternConsumed) {
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (pathConsumed && remainingPattern.every((seg) => seg === '**')) {
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Match a single segment with support for * wildcard
|
|
132
|
-
*
|
|
133
|
-
* @param pathSegment Single path segment
|
|
134
|
-
* @param patternSegment Single pattern segment
|
|
135
|
-
*/
|
|
136
|
-
private static matchSingleSegment(pathSegment: string, patternSegment: string): boolean {
|
|
137
|
-
if (patternSegment === '*') {
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (patternSegment === pathSegment) {
|
|
142
|
-
return true;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Convert pattern to regex for more complex matching
|
|
146
|
-
const regexPattern = patternSegment
|
|
147
|
-
.replace(/\./g, '\\.') // Escape dots
|
|
148
|
-
.replace(/\*/g, '[^/]*'); // * matches anything except slashes
|
|
149
|
-
|
|
150
|
-
const regex = new RegExp(`^${regexPattern}$`);
|
|
151
|
-
return regex.test(pathSegment);
|
|
152
|
-
}
|
|
153
|
-
}
|