azure-pipelines-task-lib 3.1.7 → 3.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.
- package/README.md +1 -1
- package/internal.js +2 -2
- package/mock-answer.js +2 -1
- package/mock-toolrunner.js +0 -2
- package/package.json +2 -2
- package/task.d.ts +1 -1
- package/task.js +3 -4
- package/toolrunner.js +0 -2
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Guidance: [Finding Files](docs/findingfiles.md), [Minimum agent version](docs/mi
|
|
|
20
20
|
## Node 10 Upgrade Notice
|
|
21
21
|
|
|
22
22
|
Azure DevOps is currently working to establish Node 10 as the new preferred runtime for tasks, upgrading from Node 6.
|
|
23
|
-
Relevant work is happening in the `master
|
|
23
|
+
Relevant work is happening in the `master` branch and the major version should be used with Node 10 is 3.
|
|
24
24
|
Previous major version is stored in the `releases/2.x`
|
|
25
25
|
|
|
26
26
|
### Upgrading to Node 10
|
package/internal.js
CHANGED
|
@@ -185,10 +185,10 @@ function _loc(key) {
|
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
187
187
|
if (Object.keys(_resourceFiles).length <= 0) {
|
|
188
|
-
_warning(
|
|
188
|
+
_warning("Resource file haven't been set, can't find loc string for key: " + key);
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
191
|
-
_warning(
|
|
191
|
+
_warning("Can't find loc string for key: " + key);
|
|
192
192
|
}
|
|
193
193
|
locString = key;
|
|
194
194
|
}
|
package/mock-answer.js
CHANGED
|
@@ -20,7 +20,8 @@ var MockAnswers = /** @class */ (function () {
|
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
var cmd_answer = this._answers[cmd];
|
|
23
|
-
|
|
23
|
+
//use this construction to avoid falsy zero
|
|
24
|
+
if (cmd_answer[key] != null) {
|
|
24
25
|
debug('found mock response');
|
|
25
26
|
return cmd_answer[key];
|
|
26
27
|
}
|
package/mock-toolrunner.js
CHANGED
|
@@ -7,8 +7,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
10
|
extendStatics(d, b);
|
|
13
11
|
function __() { this.constructor = d; }
|
|
14
12
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azure-pipelines-task-lib",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Azure Pipelines Task SDK",
|
|
5
5
|
"main": "./task.js",
|
|
6
6
|
"typings": "./task.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"mockery": "^1.7.0",
|
|
32
32
|
"q": "^1.5.1",
|
|
33
33
|
"semver": "^5.1.0",
|
|
34
|
-
"shelljs": "^0.8.
|
|
34
|
+
"shelljs": "^0.8.5",
|
|
35
35
|
"sync-request": "6.1.0",
|
|
36
36
|
"uuid": "^3.0.1"
|
|
37
37
|
},
|
package/task.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ export interface EndpointAuthorization {
|
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
198
198
|
* Gets the authorization details for a service endpoint
|
|
199
|
-
* If the authorization was not set and is not optional, it will
|
|
199
|
+
* If the authorization was not set and is not optional, it will set the task result to Failed.
|
|
200
200
|
*
|
|
201
201
|
* @param id name of the service endpoint
|
|
202
202
|
* @param optional whether the url is optional
|
package/task.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mv = exports.cp = exports.ls = exports.which = exports.resolve = exports.mkdirP = exports.popd = exports.pushd = exports.cd = exports.checkPath = exports.cwd = exports.getPlatform = exports.osType = exports.writeFile = exports.exist = exports.stats = exports.debug = exports.error = exports.warning = exports.command = exports.setTaskVariable = exports.getTaskVariable = exports.getSecureFileTicket = exports.getSecureFileName = exports.getEndpointAuthorization = exports.getEndpointAuthorizationParameter = exports.getEndpointAuthorizationScheme = exports.getEndpointDataParameter = exports.getEndpointUrl = exports.getPathInput = exports.filePathSupplied = exports.getDelimitedInput = exports.getBoolInput = exports.getInput = exports.setSecret = exports.setVariable = exports.getVariables = exports.assertAgent = exports.getVariable = exports.loc = exports.setResourcePath = exports.setResult = exports.setErrStream = exports.setStdStream = exports.Platform = exports.FieldType = exports.ArtifactType = exports.IssueType = exports.TaskState = exports.TaskResult = void 0;
|
|
4
|
-
exports.updateReleaseName = exports.addBuildTag = exports.updateBuildNumber = exports.uploadBuildLog = exports.associateArtifact = exports.uploadArtifact = exports.logIssue = exports.logDetail = exports.setProgress = exports.setEndpoint = exports.addAttachment = exports.uploadSummary = exports.prependPath = exports.uploadFile = exports.CodeCoverageEnabler = exports.CodeCoveragePublisher = exports.TestPublisher = exports.getHttpCertConfiguration = exports.getHttpProxyConfiguration = exports.findMatch = exports.filter = exports.match = exports.tool = exports.execSync = exports.exec = exports.rmRF = exports.legacyFindFiles = exports.find = exports.retry = void 0;
|
|
3
|
+
exports.updateReleaseName = exports.addBuildTag = exports.updateBuildNumber = exports.uploadBuildLog = exports.associateArtifact = exports.uploadArtifact = exports.logIssue = exports.logDetail = exports.setProgress = exports.setEndpoint = exports.addAttachment = exports.uploadSummary = exports.prependPath = exports.uploadFile = exports.CodeCoverageEnabler = exports.CodeCoveragePublisher = exports.TestPublisher = exports.getHttpCertConfiguration = exports.getHttpProxyConfiguration = exports.findMatch = exports.filter = exports.match = exports.tool = exports.execSync = exports.exec = exports.rmRF = exports.legacyFindFiles = exports.find = exports.retry = exports.mv = exports.cp = exports.ls = exports.which = exports.resolve = exports.mkdirP = exports.popd = exports.pushd = exports.cd = exports.checkPath = exports.cwd = exports.getPlatform = exports.osType = exports.writeFile = exports.exist = exports.stats = exports.debug = exports.error = exports.warning = exports.command = exports.setTaskVariable = exports.getTaskVariable = exports.getSecureFileTicket = exports.getSecureFileName = exports.getEndpointAuthorization = exports.getEndpointAuthorizationParameter = exports.getEndpointAuthorizationScheme = exports.getEndpointDataParameter = exports.getEndpointUrl = exports.getPathInput = exports.filePathSupplied = exports.getDelimitedInput = exports.getBoolInput = exports.getInput = exports.setSecret = exports.setVariable = exports.getVariables = exports.assertAgent = exports.getVariable = exports.loc = exports.setResourcePath = exports.setResult = exports.setErrStream = exports.setStdStream = exports.Platform = exports.FieldType = exports.ArtifactType = exports.IssueType = exports.TaskState = exports.TaskResult = void 0;
|
|
5
4
|
var shell = require("shelljs");
|
|
6
5
|
var childProcess = require("child_process");
|
|
7
6
|
var fs = require("fs");
|
|
@@ -362,7 +361,7 @@ function getEndpointAuthorizationParameter(id, key, optional) {
|
|
|
362
361
|
exports.getEndpointAuthorizationParameter = getEndpointAuthorizationParameter;
|
|
363
362
|
/**
|
|
364
363
|
* Gets the authorization details for a service endpoint
|
|
365
|
-
* If the authorization was not set and is not optional, it will
|
|
364
|
+
* If the authorization was not set and is not optional, it will set the task result to Failed.
|
|
366
365
|
*
|
|
367
366
|
* @param id name of the service endpoint
|
|
368
367
|
* @param optional whether the url is optional
|
|
@@ -373,7 +372,7 @@ function getEndpointAuthorization(id, optional) {
|
|
|
373
372
|
if (!optional && !aval) {
|
|
374
373
|
setResult(TaskResult.Failed, exports.loc('LIB_EndpointAuthNotExist', id));
|
|
375
374
|
}
|
|
376
|
-
exports.debug(id + ' exists ' + (aval
|
|
375
|
+
exports.debug(id + ' exists ' + (!!aval));
|
|
377
376
|
var auth;
|
|
378
377
|
try {
|
|
379
378
|
if (aval) {
|
package/toolrunner.js
CHANGED
|
@@ -7,8 +7,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
10
|
extendStatics(d, b);
|
|
13
11
|
function __() { this.constructor = d; }
|
|
14
12
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|