azure-pipelines-task-lib 4.17.0 → 4.17.1

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 CHANGED
@@ -61,7 +61,7 @@ function _truncateBeforeSensitiveKeyword(str, sensitiveKeywordsPattern) {
61
61
  if (index <= 0) {
62
62
  return str;
63
63
  }
64
- return str.substring(0, index) + "...";
64
+ return "".concat(str.substring(0, index), "...");
65
65
  }
66
66
  exports._truncateBeforeSensitiveKeyword = _truncateBeforeSensitiveKeyword;
67
67
  //-----------------------------------------------------
@@ -210,10 +210,10 @@ function _loc(key) {
210
210
  }
211
211
  else {
212
212
  if (Object.keys(_resourceFiles).length <= 0) {
213
- _warning("Resource file haven't been set, can't find loc string for key: " + key, IssueSource.TaskInternal);
213
+ _warning("Resource file haven't been set, can't find loc string for key: ".concat(key), IssueSource.TaskInternal);
214
214
  }
215
215
  else {
216
- _warning("Can't find loc string for key: " + key);
216
+ _warning("Can't find loc string for key: ".concat(key));
217
217
  }
218
218
  locString = key;
219
219
  }
@@ -369,7 +369,7 @@ function _which(tool, check) {
369
369
  }
370
370
  }
371
371
  }
372
- _debug("which '" + tool + "'");
372
+ _debug("which '".concat(tool, "'"));
373
373
  try {
374
374
  // build the list of extensions to try
375
375
  var extensions = [];
@@ -385,7 +385,7 @@ function _which(tool, check) {
385
385
  if (_isRooted(tool)) {
386
386
  var filePath = _tryGetExecutablePath(tool, extensions);
387
387
  if (filePath) {
388
- _debug("found: '" + filePath + "'");
388
+ _debug("found: '".concat(filePath, "'"));
389
389
  return filePath;
390
390
  }
391
391
  _debug('not found');
@@ -416,7 +416,7 @@ function _which(tool, check) {
416
416
  var directory = directories_1[_d];
417
417
  var filePath = _tryGetExecutablePath(directory + path.sep + tool, extensions);
418
418
  if (filePath) {
419
- _debug("found: '" + filePath + "'");
419
+ _debug("found: '".concat(filePath, "'"));
420
420
  return filePath;
421
421
  }
422
422
  }
@@ -460,7 +460,7 @@ function _tryGetExecutablePath(filePath, extensions) {
460
460
  }
461
461
  catch (err) {
462
462
  if (err.code != 'ENOENT') {
463
- _debug("Unexpected error attempting to determine if executable file exists '" + filePath + "': " + err);
463
+ _debug("Unexpected error attempting to determine if executable file exists '".concat(filePath, "': ").concat(err));
464
464
  }
465
465
  }
466
466
  // try each extension
@@ -486,7 +486,7 @@ function _tryGetExecutablePath(filePath, extensions) {
486
486
  }
487
487
  }
488
488
  catch (err) {
489
- _debug("Unexpected error attempting to determine the actual case of the file '" + filePath_1 + "': " + err);
489
+ _debug("Unexpected error attempting to determine the actual case of the file '".concat(filePath_1, "': ").concat(err));
490
490
  }
491
491
  return filePath_1;
492
492
  }
@@ -499,7 +499,7 @@ function _tryGetExecutablePath(filePath, extensions) {
499
499
  }
500
500
  catch (err) {
501
501
  if (err.code != 'ENOENT') {
502
- _debug("Unexpected error attempting to determine if executable file exists '" + filePath_1 + "': " + err);
502
+ _debug("Unexpected error attempting to determine if executable file exists '".concat(filePath_1, "': ").concat(err));
503
503
  }
504
504
  }
505
505
  }
@@ -518,7 +518,7 @@ function _legacyFindFiles_convertPatternToRegExp(pattern) {
518
518
  .replace(/\\\*\\\*/g, '.*') // replace remaining globstars with a wildcard that can span directory separators, e.g. /hello/**dll
519
519
  .replace(/\\\*/g, '[^\/]*') // replace asterisks with a wildcard that cannot span directory separators, e.g. /hello/*.dll
520
520
  .replace(/\\\?/g, '[^\/]'); // replace single character wildcards, e.g. /hello/log?.dll
521
- pattern = "^" + pattern + "$";
521
+ pattern = "^".concat(pattern, "$");
522
522
  var flags = process.platform == 'win32' ? 'i' : '';
523
523
  return new RegExp(pattern, flags);
524
524
  }
package/mock-answer.d.ts CHANGED
@@ -53,7 +53,7 @@ export interface TaskLibAnswers {
53
53
  [key: string]: string;
54
54
  };
55
55
  }
56
- export declare type MockedCommand = keyof TaskLibAnswers;
56
+ export type MockedCommand = keyof TaskLibAnswers;
57
57
  export declare class MockAnswers {
58
58
  private _answers;
59
59
  initialize(answers: TaskLibAnswers): void;
package/mock-answer.js CHANGED
@@ -11,12 +11,12 @@ var MockAnswers = /** @class */ (function () {
11
11
  this._answers = answers;
12
12
  };
13
13
  MockAnswers.prototype.getResponse = function (cmd, key, debug) {
14
- debug("looking up mock answers for " + JSON.stringify(cmd) + ", key '" + JSON.stringify(key) + "'");
14
+ debug("looking up mock answers for ".concat(JSON.stringify(cmd), ", key '").concat(JSON.stringify(key), "'"));
15
15
  if (!this._answers) {
16
16
  throw new Error('Must initialize');
17
17
  }
18
18
  if (!this._answers[cmd]) {
19
- debug("no mock responses registered for " + JSON.stringify(cmd));
19
+ debug("no mock responses registered for ".concat(JSON.stringify(cmd)));
20
20
  return null;
21
21
  }
22
22
  var cmd_answer = this._answers[cmd];
package/mock-task.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import Q = require('q');
3
4
  import fs = require('fs');
4
5
  import task = require('./task');
package/mock-task.js CHANGED
@@ -273,7 +273,7 @@ function cp(source, dest) {
273
273
  }
274
274
  exports.cp = cp;
275
275
  function retry(func, args, retryOptions) {
276
- module.exports.debug("trying to execute " + (func === null || func === void 0 ? void 0 : func.name) + "(" + args.toString() + ") with " + retryOptions.retryCount + " retries");
276
+ module.exports.debug("trying to execute ".concat(func === null || func === void 0 ? void 0 : func.name, "(").concat(args.toString(), ") with ").concat(retryOptions.retryCount, " retries"));
277
277
  }
278
278
  exports.retry = retry;
279
279
  function find(findPath) {
package/mock-test.js CHANGED
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -191,7 +191,7 @@ var MockTestRunner = /** @class */ (function () {
191
191
  // don't print task.debug commands to console - too noisy.
192
192
  // otherwise omit command details - can interfere during CI.
193
193
  else if (cmd && cmd.command != 'task.debug') {
194
- console.log(cmd.command + " details omitted");
194
+ console.log("".concat(cmd.command, " details omitted"));
195
195
  }
196
196
  }
197
197
  });
@@ -378,7 +378,7 @@ var MockTestRunner = /** @class */ (function () {
378
378
  originalCwd = process.cwd();
379
379
  process.chdir(downloadDestination);
380
380
  try {
381
- cp.execSync("tar -xzf \"" + path.join(downloadDestination, tarGzName) + "\"");
381
+ cp.execSync("tar -xzf \"".concat(path.join(downloadDestination, tarGzName), "\""));
382
382
  }
383
383
  catch (_b) {
384
384
  throw new Error('Failed to unzip node tar.gz from ' + url);
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import Q = require('q');
3
4
  import events = require('events');
4
5
  import ma = require('./mock-answer');
@@ -7,6 +7,8 @@ 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");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  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": "4.17.0",
3
+ "version": "4.17.1",
4
4
  "description": "Azure Pipelines Task SDK",
5
5
  "main": "./task.js",
6
6
  "typings": "./task.d.ts",
package/task.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import Q = require('q');
3
4
  import fs = require('fs');
4
5
  import im = require('./internal');