@elisra-devops/docgen-data-provider 1.21.0 → 1.23.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.
- package/bin/helpers/helper.js.map +1 -1
- package/bin/helpers/test/tfs.test.d.ts +1 -0
- package/bin/helpers/test/tfs.test.js +613 -0
- package/bin/helpers/test/tfs.test.js.map +1 -0
- package/bin/helpers/tfs.js +4 -8
- package/bin/helpers/tfs.js.map +1 -1
- package/bin/modules/GitDataProvider.js.map +1 -1
- package/bin/modules/PipelinesDataProvider.js +3 -2
- package/bin/modules/PipelinesDataProvider.js.map +1 -1
- package/bin/modules/ResultDataProvider.d.ts +199 -17
- package/bin/modules/ResultDataProvider.js +611 -195
- package/bin/modules/ResultDataProvider.js.map +1 -1
- package/bin/modules/TestDataProvider.js +7 -7
- package/bin/modules/TestDataProvider.js.map +1 -1
- package/bin/modules/TicketsDataProvider.d.ts +1 -1
- package/bin/modules/TicketsDataProvider.js +3 -2
- package/bin/modules/TicketsDataProvider.js.map +1 -1
- package/bin/modules/test/JfrogDataProvider.test.d.ts +1 -0
- package/bin/modules/test/JfrogDataProvider.test.js +110 -0
- package/bin/modules/test/JfrogDataProvider.test.js.map +1 -0
- package/bin/modules/test/ResultDataProvider.test.d.ts +1 -0
- package/bin/modules/test/ResultDataProvider.test.js +478 -0
- package/bin/modules/test/ResultDataProvider.test.js.map +1 -0
- package/bin/modules/test/gitDataProvider.test.js +424 -120
- package/bin/modules/test/gitDataProvider.test.js.map +1 -1
- package/bin/modules/test/managmentDataProvider.test.js +283 -28
- package/bin/modules/test/managmentDataProvider.test.js.map +1 -1
- package/bin/modules/test/pipelineDataProvider.test.js +229 -45
- package/bin/modules/test/pipelineDataProvider.test.js.map +1 -1
- package/bin/modules/test/testDataProvider.test.js +225 -81
- package/bin/modules/test/testDataProvider.test.js.map +1 -1
- package/bin/modules/test/ticketsDataProvider.test.js +310 -82
- package/bin/modules/test/ticketsDataProvider.test.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/helper.ts +16 -14
- package/src/helpers/test/tfs.test.ts +748 -0
- package/src/helpers/tfs.ts +4 -8
- package/src/modules/GitDataProvider.ts +10 -10
- package/src/modules/PipelinesDataProvider.ts +2 -2
- package/src/modules/ResultDataProvider.ts +815 -260
- package/src/modules/TestDataProvider.ts +8 -8
- package/src/modules/TicketsDataProvider.ts +5 -9
- package/src/modules/test/JfrogDataProvider.test.ts +171 -0
- package/src/modules/test/ResultDataProvider.test.ts +581 -0
- package/src/modules/test/gitDataProvider.test.ts +671 -187
- package/src/modules/test/managmentDataProvider.test.ts +386 -26
- package/src/modules/test/pipelineDataProvider.test.ts +281 -52
- package/src/modules/test/testDataProvider.test.ts +307 -105
- package/src/modules/test/ticketsDataProvider.test.ts +425 -129
package/src/helpers/tfs.ts
CHANGED
|
@@ -7,12 +7,12 @@ export class TFSServices {
|
|
|
7
7
|
httpAgent: new (require('http').Agent)({
|
|
8
8
|
keepAlive: true,
|
|
9
9
|
maxSockets: 50, // Allow more connections
|
|
10
|
-
keepAliveMsecs:
|
|
10
|
+
keepAliveMsecs: 300000, // Keep connections alive longer
|
|
11
11
|
}),
|
|
12
12
|
httpsAgent: new (require('https').Agent)({
|
|
13
13
|
keepAlive: true,
|
|
14
14
|
maxSockets: 50,
|
|
15
|
-
keepAliveMsecs:
|
|
15
|
+
keepAliveMsecs: 300000,
|
|
16
16
|
}),
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -28,7 +28,6 @@ export class TFSServices {
|
|
|
28
28
|
url: url,
|
|
29
29
|
headers: { 'Content-Type': 'application/zip' },
|
|
30
30
|
auth: { username: '', password: pat },
|
|
31
|
-
timeout: 15000, // Increased timeout for large files
|
|
32
31
|
});
|
|
33
32
|
return res;
|
|
34
33
|
} catch (e) {
|
|
@@ -51,7 +50,6 @@ export class TFSServices {
|
|
|
51
50
|
auth: { username: '', password: pat },
|
|
52
51
|
data: data,
|
|
53
52
|
responseType: 'arraybuffer', // Important for binary data
|
|
54
|
-
timeout: 8000, // Increased timeout for images
|
|
55
53
|
};
|
|
56
54
|
|
|
57
55
|
return this.executeWithRetry(url, config, printError, (response) => {
|
|
@@ -79,7 +77,7 @@ export class TFSServices {
|
|
|
79
77
|
method: requestMethod,
|
|
80
78
|
auth: { username: '', password: pat },
|
|
81
79
|
data: data,
|
|
82
|
-
timeout: 10000, // More reasonable timeout
|
|
80
|
+
timeout: requestMethod.toLocaleLowerCase() === 'get' ? 10000 : undefined, // More reasonable timeout
|
|
83
81
|
};
|
|
84
82
|
|
|
85
83
|
return this.executeWithRetry(cleanUrl, config, printError, (response) => {
|
|
@@ -93,7 +91,6 @@ export class TFSServices {
|
|
|
93
91
|
url: url,
|
|
94
92
|
method: 'GET',
|
|
95
93
|
headers: header,
|
|
96
|
-
timeout: 8000, // Reasonable timeout,
|
|
97
94
|
};
|
|
98
95
|
|
|
99
96
|
try {
|
|
@@ -118,7 +115,6 @@ export class TFSServices {
|
|
|
118
115
|
method: requestMethod,
|
|
119
116
|
auth: { username: '', password: pat },
|
|
120
117
|
data: data,
|
|
121
|
-
timeout: 10000, // More reasonable timeout
|
|
122
118
|
};
|
|
123
119
|
|
|
124
120
|
try {
|
|
@@ -154,7 +150,7 @@ export class TFSServices {
|
|
|
154
150
|
// Handle not found errors
|
|
155
151
|
if (errorMessage.includes('could not be found')) {
|
|
156
152
|
logger.info(`File does not exist, or you do not have permissions to read it.`);
|
|
157
|
-
|
|
153
|
+
throw new Error(`File not found or insufficient permissions: ${url}`);
|
|
158
154
|
}
|
|
159
155
|
|
|
160
156
|
// Check if we should retry
|
|
@@ -475,17 +475,17 @@ export default class GitDataProvider {
|
|
|
475
475
|
let body =
|
|
476
476
|
specificItemPath === ''
|
|
477
477
|
? {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
478
|
+
itemVersion,
|
|
479
|
+
compareVersion,
|
|
480
|
+
includeWorkItems: true,
|
|
481
|
+
}
|
|
482
482
|
: {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
483
|
+
itemVersion,
|
|
484
|
+
compareVersion,
|
|
485
|
+
includeWorkItems: true,
|
|
486
|
+
itemPath: specificItemPath,
|
|
487
|
+
historyMode: 'fullHistory',
|
|
488
|
+
};
|
|
489
489
|
|
|
490
490
|
let url = `${gitUrl}/commitsbatch?$skip=${skipping}&$top=${chunkSize}&api-version=5.1`;
|
|
491
491
|
let commitsResponse = await TFSServices.postRequest(url, this.token, undefined, body);
|
|
@@ -97,9 +97,9 @@ export default class PipelinesDataProvider {
|
|
|
97
97
|
searchPrevPipelineFromDifferentCommit: boolean
|
|
98
98
|
): boolean {
|
|
99
99
|
const fromRepo =
|
|
100
|
-
fromPipeline.resources.repositories[0]
|
|
100
|
+
fromPipeline.resources.repositories[0]?.self || fromPipeline.resources.repositories.__designer_repo;
|
|
101
101
|
const targetRepo =
|
|
102
|
-
targetPipeline.resources.repositories[0]
|
|
102
|
+
targetPipeline.resources.repositories[0]?.self || targetPipeline.resources.repositories.__designer_repo;
|
|
103
103
|
|
|
104
104
|
if (fromRepo.repository.id !== targetRepo.repository.id) {
|
|
105
105
|
return false;
|