azure-pipelines-tasks-securefiles-common 2.262.0 → 2.269.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/Tests/L0.d.ts +0 -14
- package/Tests/L0.js +162 -65
- package/package.json +6 -6
- package/securefiles-common.js +23 -3
- package/Tests/utils.d.ts +0 -1
- package/Tests/utils.js +0 -19
package/Tests/L0.d.ts
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Writable } from "stream";
|
|
3
|
-
import { IRequestHandler } from "azure-devops-node-api/interfaces/common/VsoBaseInterfaces";
|
|
4
1
|
export declare const secureFileId: string;
|
|
5
|
-
declare class WebApi {
|
|
6
|
-
getTaskAgentApi(): Promise<unknown>;
|
|
7
|
-
}
|
|
8
|
-
export declare const nodeapiMock: {
|
|
9
|
-
WebApi: typeof WebApi;
|
|
10
|
-
getPersonalAccessTokenHandler(): IRequestHandler;
|
|
11
|
-
};
|
|
12
|
-
export declare const fsMock: {
|
|
13
|
-
createWriteStream(): Writable;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
package/Tests/L0.js
CHANGED
|
@@ -9,72 +9,86 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
const utils_1 = require("./utils");
|
|
12
|
+
exports.secureFileId = void 0;
|
|
14
13
|
const assert_1 = require("assert");
|
|
15
14
|
const stream_1 = require("stream");
|
|
16
|
-
const
|
|
15
|
+
const sinon = require("sinon");
|
|
16
|
+
const tl = require("azure-pipelines-task-lib/task");
|
|
17
|
+
const nodeApi = require("azure-devops-node-api");
|
|
18
|
+
const fs = require("fs");
|
|
19
|
+
const node_test_1 = require("node:test");
|
|
17
20
|
exports.secureFileId = Math.random().toString(36).slice(2, 7);
|
|
18
21
|
process.env['SECUREFILE_NAME_' + exports.secureFileId] = 'securefilename';
|
|
19
|
-
|
|
20
|
-
'
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
function createMockStream(options = {}) {
|
|
23
|
+
const { statusCode = 200, statusMessage = 'OK', contentType = 'application/octet-stream', data = 'data', emitError, } = options;
|
|
24
|
+
const rs = new stream_1.Readable();
|
|
25
|
+
rs._read = () => { };
|
|
26
|
+
rs.statusCode = statusCode;
|
|
27
|
+
rs.statusMessage = statusMessage;
|
|
28
|
+
rs.headers = { 'content-type': contentType };
|
|
29
|
+
if (emitError) {
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
rs.emit('error', emitError);
|
|
32
|
+
}, 10);
|
|
25
33
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const rs = new stream_1.Readable();
|
|
30
|
-
rs._read = () => { };
|
|
31
|
-
rs.push('data');
|
|
34
|
+
else {
|
|
35
|
+
if (data)
|
|
36
|
+
rs.push(data);
|
|
32
37
|
rs.push(null);
|
|
33
|
-
return rs;
|
|
34
38
|
}
|
|
39
|
+
return rs;
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
function createMockWriteStream() {
|
|
42
|
+
const ws = new stream_1.Writable();
|
|
43
|
+
ws._write = function (chunk, encoding, done) {
|
|
44
|
+
done();
|
|
45
|
+
};
|
|
46
|
+
return ws;
|
|
42
47
|
}
|
|
43
|
-
exports.nodeapiMock = {
|
|
44
|
-
WebApi,
|
|
45
|
-
getPersonalAccessTokenHandler() {
|
|
46
|
-
return {};
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
exports.fsMock = {
|
|
50
|
-
createWriteStream() {
|
|
51
|
-
const ws = new stream_1.Writable();
|
|
52
|
-
ws._write = function (chunk, encoding, done) {
|
|
53
|
-
done();
|
|
54
|
-
};
|
|
55
|
-
return ws;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
48
|
const getMaxRetries = (maxRetries) => maxRetries >= 0 ? maxRetries : 5;
|
|
59
|
-
describe("securefiles-common package suites", function () {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
(0, node_test_1.describe)("securefiles-common package suites", function () {
|
|
50
|
+
let sandbox;
|
|
51
|
+
let getVariableStub;
|
|
52
|
+
let getEndpointAuthorizationParameterStub;
|
|
53
|
+
let getSecureFileNameStub;
|
|
54
|
+
let getSecureFileTicketStub;
|
|
55
|
+
let resolveStub;
|
|
56
|
+
let existStub;
|
|
57
|
+
let rmRFStub;
|
|
58
|
+
let debugStub;
|
|
59
|
+
let getHttpProxyConfigurationStub;
|
|
60
|
+
let getPersonalAccessTokenHandlerStub;
|
|
61
|
+
let webApiStub;
|
|
62
|
+
let createWriteStreamStub;
|
|
63
|
+
(0, node_test_1.before)(() => {
|
|
64
|
+
sandbox = sinon.createSandbox();
|
|
65
65
|
});
|
|
66
|
-
after(() => {
|
|
67
|
-
|
|
68
|
-
mockery_1.disable();
|
|
66
|
+
(0, node_test_1.after)(() => {
|
|
67
|
+
sandbox.restore();
|
|
69
68
|
});
|
|
70
|
-
beforeEach(() => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
(0, node_test_1.beforeEach)(() => {
|
|
70
|
+
// Stub task lib functions
|
|
71
|
+
getVariableStub = sandbox.stub(tl, "getVariable").callsFake((variable) => {
|
|
72
|
+
if (variable.toLowerCase() === 'system.teamfoundationcollectionuri') {
|
|
73
|
+
return 'https://localhost/';
|
|
74
|
+
}
|
|
75
|
+
return variable;
|
|
76
|
+
});
|
|
77
|
+
getEndpointAuthorizationParameterStub = sandbox.stub(tl, "getEndpointAuthorizationParameter")
|
|
78
|
+
.callsFake((id, key, optional) => `${id}_${key}_${optional}`);
|
|
79
|
+
getSecureFileNameStub = sandbox.stub(tl, "getSecureFileName")
|
|
80
|
+
.callsFake((secureFileId) => secureFileId);
|
|
81
|
+
getSecureFileTicketStub = sandbox.stub(tl, "getSecureFileTicket").returns("ticket");
|
|
82
|
+
resolveStub = sandbox.stub(tl, "resolve").callsFake((...args) => args.join('/'));
|
|
83
|
+
existStub = sandbox.stub(tl, "exist").returns(true);
|
|
84
|
+
rmRFStub = sandbox.stub(tl, "rmRF");
|
|
85
|
+
debugStub = sandbox.stub(tl, "debug");
|
|
86
|
+
getHttpProxyConfigurationStub = sandbox.stub(tl, "getHttpProxyConfiguration").returns(null);
|
|
87
|
+
// Stub azure-devops-node-api
|
|
88
|
+
getPersonalAccessTokenHandlerStub = sandbox.stub(nodeApi, "getPersonalAccessTokenHandler").returns({});
|
|
74
89
|
});
|
|
75
|
-
afterEach(() => {
|
|
76
|
-
|
|
77
|
-
mockery_1.deregisterMock("fs");
|
|
90
|
+
(0, node_test_1.afterEach)(() => {
|
|
91
|
+
sandbox.restore();
|
|
78
92
|
});
|
|
79
93
|
const secureFilesHelpersProps = [
|
|
80
94
|
[10, 1000],
|
|
@@ -84,32 +98,115 @@ describe("securefiles-common package suites", function () {
|
|
|
84
98
|
];
|
|
85
99
|
secureFilesHelpersProps.forEach((args) => {
|
|
86
100
|
const [maxRetries, socketTimeout] = args;
|
|
87
|
-
it(`Check SecureFileHelpers instance properties with args: [${maxRetries}, ${socketTimeout}]`, () => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
(0, node_test_1.it)(`Check SecureFileHelpers instance properties with args: [${maxRetries}, ${socketTimeout}]`, () => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
// Stub WebApi constructor
|
|
103
|
+
const mockWebApi = {
|
|
104
|
+
options: {
|
|
105
|
+
maxRetries: getMaxRetries(maxRetries),
|
|
106
|
+
socketTimeout: socketTimeout
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
webApiStub = sandbox.stub(nodeApi, "WebApi").returns(mockWebApi);
|
|
88
110
|
const secureFiles = require("../securefiles-common");
|
|
89
111
|
const secureFileHelpers = new secureFiles.SecureFileHelpers(...args);
|
|
90
|
-
assert_1.strictEqual(secureFileHelpers.serverConnection.options.maxRetries, getMaxRetries(maxRetries), `Result should be equal ${maxRetries}`);
|
|
91
|
-
assert_1.strictEqual(secureFileHelpers.serverConnection.options.socketTimeout, socketTimeout, `Result should be equal ${socketTimeout}`);
|
|
112
|
+
(0, assert_1.strictEqual)(secureFileHelpers.serverConnection.options.maxRetries, getMaxRetries(maxRetries), `Result should be equal ${maxRetries}`);
|
|
113
|
+
(0, assert_1.strictEqual)(secureFileHelpers.serverConnection.options.socketTimeout, socketTimeout, `Result should be equal ${socketTimeout}`);
|
|
92
114
|
}));
|
|
93
115
|
});
|
|
94
|
-
it("Check downloadSecureFile", () => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
|
|
96
|
-
|
|
116
|
+
(0, node_test_1.it)("Check downloadSecureFile", () => __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const mockStream = createMockStream({
|
|
118
|
+
statusCode: 200,
|
|
119
|
+
statusMessage: 'OK',
|
|
120
|
+
contentType: 'application/octet-stream'
|
|
121
|
+
});
|
|
122
|
+
const mockAgentApi = {
|
|
123
|
+
downloadSecureFile: sandbox.stub().resolves(mockStream)
|
|
124
|
+
};
|
|
125
|
+
const mockWebApi = {
|
|
126
|
+
getTaskAgentApi: sandbox.stub().resolves(mockAgentApi),
|
|
127
|
+
options: { maxRetries: 5, socketTimeout: undefined }
|
|
128
|
+
};
|
|
129
|
+
webApiStub = sandbox.stub(nodeApi, "WebApi").returns(mockWebApi);
|
|
130
|
+
createWriteStreamStub = sandbox.stub(fs, "createWriteStream").returns(createMockWriteStream());
|
|
97
131
|
const secureFiles = require("../securefiles-common");
|
|
98
132
|
const secureFileHelpers = new secureFiles.SecureFileHelpers();
|
|
99
133
|
const secureFilePath = yield secureFileHelpers.downloadSecureFile(exports.secureFileId);
|
|
100
|
-
const pseudoResolvedPath =
|
|
101
|
-
assert_1.strictEqual(secureFilePath, pseudoResolvedPath, `Result should be equal to ${pseudoResolvedPath}`);
|
|
134
|
+
const pseudoResolvedPath = secureFileHelpers.getSecureFileTempDownloadPath(exports.secureFileId);
|
|
135
|
+
(0, assert_1.strictEqual)(secureFilePath, pseudoResolvedPath, `Result should be equal to ${pseudoResolvedPath}`);
|
|
102
136
|
}));
|
|
103
|
-
it("Check deleteSecureFile", () => __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
(0, node_test_1.it)("Check deleteSecureFile", () => __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const mockWebApi = {
|
|
139
|
+
options: { maxRetries: 5, socketTimeout: undefined }
|
|
140
|
+
};
|
|
141
|
+
webApiStub = sandbox.stub(nodeApi, "WebApi").returns(mockWebApi);
|
|
104
142
|
const secureFiles = require("../securefiles-common");
|
|
105
143
|
const secureFileHelpers = new secureFiles.SecureFileHelpers();
|
|
106
144
|
secureFileHelpers.deleteSecureFile(exports.secureFileId);
|
|
145
|
+
sinon.assert.called(rmRFStub);
|
|
107
146
|
}));
|
|
108
|
-
it("Check getSecureFileTempDownloadPath", () => __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
(0, node_test_1.it)("Check getSecureFileTempDownloadPath", () => __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
const mockWebApi = {
|
|
149
|
+
options: { maxRetries: 5, socketTimeout: undefined }
|
|
150
|
+
};
|
|
151
|
+
webApiStub = sandbox.stub(nodeApi, "WebApi").returns(mockWebApi);
|
|
109
152
|
const secureFiles = require("../securefiles-common");
|
|
110
153
|
const secureFileHelpers = new secureFiles.SecureFileHelpers();
|
|
111
154
|
const resolvedPath = secureFileHelpers.getSecureFileTempDownloadPath(exports.secureFileId);
|
|
112
|
-
|
|
113
|
-
assert_1.strictEqual(resolvedPath,
|
|
155
|
+
sinon.assert.calledWith(resolveStub, sinon.match.any, exports.secureFileId);
|
|
156
|
+
(0, assert_1.strictEqual)(typeof resolvedPath, 'string', 'Resolved path should be a string');
|
|
157
|
+
}));
|
|
158
|
+
(0, node_test_1.it)("Should handle HTTP error responses", () => __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const mockStream = createMockStream({
|
|
160
|
+
statusCode: 500,
|
|
161
|
+
statusMessage: 'Internal Server Error',
|
|
162
|
+
contentType: 'application/json',
|
|
163
|
+
data: '',
|
|
164
|
+
});
|
|
165
|
+
const mockAgentApi = {
|
|
166
|
+
downloadSecureFile: sandbox.stub().resolves(mockStream)
|
|
167
|
+
};
|
|
168
|
+
const mockWebApi = {
|
|
169
|
+
getTaskAgentApi: sandbox.stub().resolves(mockAgentApi),
|
|
170
|
+
options: { maxRetries: 5, socketTimeout: undefined }
|
|
171
|
+
};
|
|
172
|
+
webApiStub = sandbox.stub(nodeApi, "WebApi").returns(mockWebApi);
|
|
173
|
+
createWriteStreamStub = sandbox.stub(fs, "createWriteStream").returns(createMockWriteStream());
|
|
174
|
+
const secureFiles = require("../securefiles-common");
|
|
175
|
+
const secureFileHelpers = new secureFiles.SecureFileHelpers();
|
|
176
|
+
try {
|
|
177
|
+
yield secureFileHelpers.downloadSecureFile(exports.secureFileId);
|
|
178
|
+
throw new Error("Expected error was not thrown");
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
(0, assert_1.strictEqual)(error.message.includes("HTTP 500"), true, "Should contain HTTP error status");
|
|
182
|
+
(0, assert_1.strictEqual)(error.message.includes("Internal Server Error"), true, "Should contain HTTP error message");
|
|
183
|
+
}
|
|
184
|
+
}));
|
|
185
|
+
(0, node_test_1.it)("Should handle stream errors during download", () => __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
const mockStream = createMockStream({
|
|
187
|
+
statusCode: 200,
|
|
188
|
+
statusMessage: 'OK',
|
|
189
|
+
contentType: 'application/octet-stream',
|
|
190
|
+
emitError: new Error('Network connection lost')
|
|
191
|
+
});
|
|
192
|
+
const mockAgentApi = {
|
|
193
|
+
downloadSecureFile: sandbox.stub().resolves(mockStream)
|
|
194
|
+
};
|
|
195
|
+
const mockWebApi = {
|
|
196
|
+
getTaskAgentApi: sandbox.stub().resolves(mockAgentApi),
|
|
197
|
+
options: { maxRetries: 5, socketTimeout: undefined }
|
|
198
|
+
};
|
|
199
|
+
webApiStub = sandbox.stub(nodeApi, "WebApi").returns(mockWebApi);
|
|
200
|
+
createWriteStreamStub = sandbox.stub(fs, "createWriteStream").returns(createMockWriteStream());
|
|
201
|
+
const secureFiles = require("../securefiles-common");
|
|
202
|
+
const secureFileHelpers = new secureFiles.SecureFileHelpers();
|
|
203
|
+
try {
|
|
204
|
+
yield secureFileHelpers.downloadSecureFile(exports.secureFileId);
|
|
205
|
+
throw new Error("Expected error was not thrown");
|
|
206
|
+
}
|
|
207
|
+
catch (error) {
|
|
208
|
+
(0, assert_1.strictEqual)(error.message.includes("Failed to download secure file"), true, "Should handle stream errors");
|
|
209
|
+
(0, assert_1.strictEqual)(error.message.includes("Network connection lost"), true, "Should include original error message");
|
|
210
|
+
}
|
|
114
211
|
}));
|
|
115
212
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azure-pipelines-tasks-securefiles-common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.269.0",
|
|
4
4
|
"description": "Azure Pipelines tasks SecureFiles Common",
|
|
5
5
|
"main": "securefiles-common.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"homepage": "https://github.com/microsoft/azure-pipelines-tasks-common-packages#readme",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@types/mocha": "^5.2.7",
|
|
22
|
-
"@types/
|
|
23
|
-
"@types/node": "^10.17.0",
|
|
22
|
+
"@types/node": "^18.0.0",
|
|
24
23
|
"@types/q": "^1.5.4",
|
|
25
24
|
"azure-devops-node-api": "10.2.2",
|
|
26
|
-
"azure-pipelines-task-lib": "^
|
|
27
|
-
"mockery": "^2.1.0"
|
|
25
|
+
"azure-pipelines-task-lib": "^5.2.4"
|
|
28
26
|
},
|
|
29
27
|
"devDependencies": {
|
|
30
|
-
"
|
|
28
|
+
"@types/sinon": "^21.0.0",
|
|
29
|
+
"sinon": "^19.0.2",
|
|
30
|
+
"typescript": "^4.9.5"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/securefiles-common.js
CHANGED
|
@@ -18,7 +18,7 @@ class SecureFileHelpers {
|
|
|
18
18
|
constructor(retryCount, socketTimeout) {
|
|
19
19
|
const serverUrl = tl.getVariable('System.TeamFoundationCollectionUri');
|
|
20
20
|
const serverCreds = tl.getEndpointAuthorizationParameter('SYSTEMVSSCONNECTION', 'ACCESSTOKEN', false);
|
|
21
|
-
const authHandler = azure_devops_node_api_1.getPersonalAccessTokenHandler(serverCreds, true);
|
|
21
|
+
const authHandler = (0, azure_devops_node_api_1.getPersonalAccessTokenHandler)(serverCreds, true);
|
|
22
22
|
const maxRetries = retryCount && retryCount >= 0 ? retryCount : 5; // Default to 5 if not specified
|
|
23
23
|
tl.debug('Secure file retry count set to: ' + maxRetries);
|
|
24
24
|
const proxy = tl.getHttpProxyConfiguration();
|
|
@@ -41,18 +41,38 @@ class SecureFileHelpers {
|
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
const tempDownloadPath = this.getSecureFileTempDownloadPath(secureFileId);
|
|
43
43
|
tl.debug('Downloading secure file contents to: ' + tempDownloadPath);
|
|
44
|
-
const file = fs.createWriteStream(tempDownloadPath);
|
|
45
44
|
const agentApi = yield this.serverConnection.getTaskAgentApi();
|
|
46
45
|
const ticket = tl.getSecureFileTicket(secureFileId);
|
|
47
46
|
if (!ticket) {
|
|
48
47
|
// Workaround bug #7491. tl.loc only works if the consuming tasks define the resource string.
|
|
49
48
|
throw new Error(`Download ticket for SecureFileId ${secureFileId} not found.`);
|
|
50
49
|
}
|
|
51
|
-
|
|
50
|
+
tl.debug(`Starting secure file download for SecureFileId: ${secureFileId}`);
|
|
51
|
+
const response = yield agentApi.downloadSecureFile(tl.getVariable('SYSTEM.TEAMPROJECT'), secureFileId, ticket, false);
|
|
52
52
|
const defer = Q.defer();
|
|
53
|
+
response.on('error', (err) => {
|
|
54
|
+
defer.reject(new Error(`Failed to download secure file. ${err.message}`));
|
|
55
|
+
});
|
|
56
|
+
const httpResponse = response;
|
|
57
|
+
tl.debug(`HTTP Status: ${httpResponse.statusCode} ${httpResponse.statusMessage}`);
|
|
58
|
+
tl.debug(`Content-Type: ${httpResponse.headers['content-type'] || 'unknown'}`);
|
|
59
|
+
if (httpResponse.statusCode && httpResponse.statusCode != 200) {
|
|
60
|
+
let errorBody = '';
|
|
61
|
+
httpResponse.on('data', (chunk) => {
|
|
62
|
+
errorBody += chunk.toString();
|
|
63
|
+
});
|
|
64
|
+
httpResponse.on('end', () => {
|
|
65
|
+
defer.reject(new Error(`Failed to download secure file. HTTP ${httpResponse.statusCode}: ${httpResponse.statusMessage}. Error content: ${errorBody}`));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const file = fs.createWriteStream(tempDownloadPath);
|
|
69
|
+
const stream = response.pipe(file);
|
|
53
70
|
stream.on('finish', () => {
|
|
54
71
|
defer.resolve();
|
|
55
72
|
});
|
|
73
|
+
stream.on('error', (err) => {
|
|
74
|
+
defer.reject(new Error(`Error writing secure file to disk. ${err.message}`));
|
|
75
|
+
});
|
|
56
76
|
yield defer.promise;
|
|
57
77
|
tl.debug('Downloaded secure file contents to: ' + tempDownloadPath);
|
|
58
78
|
return tempDownloadPath;
|
package/Tests/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const tlClone: any;
|
package/Tests/utils.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tlClone = void 0;
|
|
4
|
-
const tl = require('azure-pipelines-task-lib/mock-task');
|
|
5
|
-
exports.tlClone = Object.assign({}, tl);
|
|
6
|
-
exports.tlClone.setStdStream({
|
|
7
|
-
write: (msg) => null
|
|
8
|
-
});
|
|
9
|
-
exports.tlClone.getVariable = variable => {
|
|
10
|
-
if (variable.toLowerCase() == 'system.teamfoundationcollectionuri') {
|
|
11
|
-
return 'https://localhost/';
|
|
12
|
-
}
|
|
13
|
-
return variable;
|
|
14
|
-
};
|
|
15
|
-
exports.tlClone.getEndpointAuthorizationParameter = (id, key, optional) => `${id}_${key}_${optional}`;
|
|
16
|
-
exports.tlClone.getSecureFileName = (secureFileId) => secureFileId;
|
|
17
|
-
exports.tlClone.getSecureFileTicket = () => {
|
|
18
|
-
return true;
|
|
19
|
-
};
|