azure-pipelines-task-lib 4.9.1 → 4.10.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/internal.js +8 -2
- package/package.json +1 -1
package/internal.js
CHANGED
|
@@ -20,6 +20,7 @@ var crypto = require("crypto");
|
|
|
20
20
|
* 3) to know the real variable name and not just the formatted env var name.
|
|
21
21
|
*/
|
|
22
22
|
exports._knownVariableMap = {};
|
|
23
|
+
var _taskSdkToken;
|
|
23
24
|
//-----------------------------------------------------
|
|
24
25
|
// Enums
|
|
25
26
|
//-----------------------------------------------------
|
|
@@ -268,11 +269,13 @@ function _command(command, properties, message) {
|
|
|
268
269
|
}
|
|
269
270
|
exports._command = _command;
|
|
270
271
|
function _warning(message, source) {
|
|
271
|
-
|
|
272
|
+
if (source === void 0) { source = IssueSource.TaskInternal; }
|
|
273
|
+
_command('task.issue', { 'type': 'warning', 'source': source, 'token': _taskSdkToken }, message);
|
|
272
274
|
}
|
|
273
275
|
exports._warning = _warning;
|
|
274
276
|
function _error(message, source) {
|
|
275
|
-
|
|
277
|
+
if (source === void 0) { source = IssueSource.TaskInternal; }
|
|
278
|
+
_command('task.issue', { 'type': 'error', 'source': source, 'token': _taskSdkToken }, message);
|
|
276
279
|
}
|
|
277
280
|
exports._error = _error;
|
|
278
281
|
function _debug(message) {
|
|
@@ -661,6 +664,9 @@ function _loadData() {
|
|
|
661
664
|
}
|
|
662
665
|
}
|
|
663
666
|
_debug('loaded ' + loaded);
|
|
667
|
+
var token = process.env["TASK_SDK_COMMAND_TOKEN"];
|
|
668
|
+
delete process.env["TASK_SDK_COMMAND_TOKEN"];
|
|
669
|
+
_taskSdkToken = token ? String(token) : "";
|
|
664
670
|
// store public variable metadata
|
|
665
671
|
var names;
|
|
666
672
|
try {
|