azure-pipelines-task-lib 4.11.0 → 4.12.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.d.ts CHANGED
@@ -16,6 +16,10 @@ export declare enum IssueSource {
16
16
  CustomerScript = "CustomerScript",
17
17
  TaskInternal = "TaskInternal"
18
18
  }
19
+ export declare enum IssueAuditAction {
20
+ Unknown = 0,
21
+ ShellTasksValidation = 1
22
+ }
19
23
  export declare function _startsWith(str: string, start: string): boolean;
20
24
  export declare function _endsWith(str: string, end: string): boolean;
21
25
  export declare function _truncateBeforeSensitiveKeyword(str: string, sensitiveKeywordsPattern: RegExp): string;
@@ -56,8 +60,8 @@ export interface _KnownVariableInfo {
56
60
  secret: boolean;
57
61
  }
58
62
  export declare function _command(command: string, properties: any, message: string): void;
59
- export declare function _warning(message: string, source?: IssueSource): void;
60
- export declare function _error(message: string, source?: IssueSource): void;
63
+ export declare function _warning(message: string, source?: IssueSource, auditAction?: IssueAuditAction): void;
64
+ export declare function _error(message: string, source?: IssueSource, auditAction?: IssueAuditAction): void;
61
65
  export declare function _debug(message: string): void;
62
66
  /**
63
67
  * Returns whether a path exists.
package/internal.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._exposeCertSettings = exports._exposeProxySettings = exports._normalizeSeparators = exports._isRooted = exports._getDirectoryName = exports._ensureRooted = exports._isUncPath = exports._loadData = exports._ensurePatternRooted = exports._getFindInfoFromPattern = exports._cloneMatchOptions = exports._legacyFindFiles_convertPatternToRegExp = exports._which = exports._checkPath = exports._exist = exports._debug = exports._error = exports._warning = exports._command = exports._getVariableKey = exports._getVariable = exports._loc = exports._setResourcePath = exports._setErrStream = exports._setStdStream = exports._writeLine = exports._truncateBeforeSensitiveKeyword = exports._endsWith = exports._startsWith = exports.IssueSource = exports._vault = exports._knownVariableMap = void 0;
3
+ exports._exposeCertSettings = exports._exposeProxySettings = exports._normalizeSeparators = exports._isRooted = exports._getDirectoryName = exports._ensureRooted = exports._isUncPath = exports._loadData = exports._ensurePatternRooted = exports._getFindInfoFromPattern = exports._cloneMatchOptions = exports._legacyFindFiles_convertPatternToRegExp = exports._which = exports._checkPath = exports._exist = exports._debug = exports._error = exports._warning = exports._command = exports._getVariableKey = exports._getVariable = exports._loc = exports._setResourcePath = exports._setErrStream = exports._setStdStream = exports._writeLine = exports._truncateBeforeSensitiveKeyword = exports._endsWith = exports._startsWith = exports.IssueAuditAction = exports.IssueSource = exports._vault = exports._knownVariableMap = void 0;
4
4
  var fs = require("fs");
5
5
  var path = require("path");
6
6
  var os = require("os");
@@ -29,6 +29,11 @@ var IssueSource;
29
29
  IssueSource["CustomerScript"] = "CustomerScript";
30
30
  IssueSource["TaskInternal"] = "TaskInternal";
31
31
  })(IssueSource = exports.IssueSource || (exports.IssueSource = {}));
32
+ var IssueAuditAction;
33
+ (function (IssueAuditAction) {
34
+ IssueAuditAction[IssueAuditAction["Unknown"] = 0] = "Unknown";
35
+ IssueAuditAction[IssueAuditAction["ShellTasksValidation"] = 1] = "ShellTasksValidation";
36
+ })(IssueAuditAction = exports.IssueAuditAction || (exports.IssueAuditAction = {}));
32
37
  //-----------------------------------------------------
33
38
  // Validation Checks
34
39
  //-----------------------------------------------------
@@ -268,14 +273,24 @@ function _command(command, properties, message) {
268
273
  _writeLine(taskCmd.toString());
269
274
  }
270
275
  exports._command = _command;
271
- function _warning(message, source) {
276
+ function _warning(message, source, auditAction) {
272
277
  if (source === void 0) { source = IssueSource.TaskInternal; }
273
- _command('task.issue', { 'type': 'warning', 'source': source, 'correlationId': _commandCorrelationId }, message);
278
+ _command('task.issue', {
279
+ 'type': 'warning',
280
+ 'source': source,
281
+ 'correlationId': _commandCorrelationId,
282
+ 'auditAction': auditAction
283
+ }, message);
274
284
  }
275
285
  exports._warning = _warning;
276
- function _error(message, source) {
286
+ function _error(message, source, auditAction) {
277
287
  if (source === void 0) { source = IssueSource.TaskInternal; }
278
- _command('task.issue', { 'type': 'error', 'source': source, 'correlationId': _commandCorrelationId }, message);
288
+ _command('task.issue', {
289
+ 'type': 'error',
290
+ 'source': source,
291
+ 'correlationId': _commandCorrelationId,
292
+ 'auditAction': auditAction
293
+ }, message);
279
294
  }
280
295
  exports._error = _error;
281
296
  function _debug(message) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azure-pipelines-task-lib",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "description": "Azure Pipelines Task SDK",
5
5
  "main": "./task.js",
6
6
  "typings": "./task.d.ts",