azure-pipelines-task-lib 3.3.1 → 4.0.1-preview

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/lib.json CHANGED
@@ -1,37 +1,37 @@
1
- {
2
- "messages": {
3
- "LIB_UnhandledEx": "Unhandled: %s",
4
- "LIB_FailOnCode": "Failure return code: %d",
5
- "LIB_MkdirFailed": "Unable to create directory '%s'. %s",
6
- "LIB_MkdirFailedFileExists": "Unable to create directory '%s'. Conflicting file exists: '%s'",
7
- "LIB_MkdirFailedInvalidDriveRoot": "Unable to create directory '%s'. Root directory does not exist: '%s'",
8
- "LIB_MkdirFailedInvalidShare": "Unable to create directory '%s'. Unable to verify the directory exists: '%s'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share.",
9
- "LIB_MultilineSecret": "Secrets cannot contain multiple lines",
10
- "LIB_ProcessError": "There was an error when attempting to execute the process '%s'. This may indicate the process failed to start. Error: %s",
11
- "LIB_ProcessExitCode": "The process '%s' failed with exit code %s",
12
- "LIB_ProcessStderr": "The process '%s' failed because one or more lines were written to the STDERR stream",
13
- "LIB_ReturnCode": "Return code: %d",
14
- "LIB_ResourceFileNotExist": "Resource file doesn\\'t exist: %s",
15
- "LIB_ResourceFileAlreadySet": "Resource file has already set to: %s",
16
- "LIB_ResourceFileNotSet": "Resource file haven\\'t set, can\\'t find loc string for key: %s",
17
- "LIB_StdioNotClosed": "The STDIO streams did not close within %s seconds of the exit event from process '%s'. This may indicate a child process inherited the STDIO streams and has not yet exited.",
18
- "LIB_WhichNotFound_Linux": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.",
19
- "LIB_WhichNotFound_Win": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.",
20
- "LIB_LocStringNotFound": "Can\\'t find loc string for key: %s",
21
- "LIB_ParameterIsRequired": "%s not supplied",
22
- "LIB_InputRequired": "Input required: %s",
23
- "LIB_InvalidPattern": "Invalid pattern: '%s'",
24
- "LIB_EndpointNotExist": "Endpoint not present: %s",
25
- "LIB_EndpointDataNotExist": "Endpoint data parameter %s not present: %s",
26
- "LIB_EndpointAuthNotExist": "Endpoint auth data not present: %s",
27
- "LIB_InvalidEndpointAuth": "Invalid endpoint auth: %s",
28
- "LIB_InvalidSecureFilesInput": "Invalid secure file input: %s",
29
- "LIB_PathNotFound": "Not found %s: %s",
30
- "LIB_PathHasNullByte": "Path cannot contain null bytes",
31
- "LIB_OperationFailed": "Failed %s: %s",
32
- "LIB_UseFirstGlobMatch": "Multiple workspace matches. using first.",
33
- "LIB_MergeTestResultNotSupported": "Merging test results from multiple files to one test run is not supported on this version of build agent for OSX/Linux, each test result file will be published as a separate test run in VSO/TFS.",
34
- "LIB_PlatformNotSupported": "Platform not supported: %s",
35
- "LIB_CopyFileFailed": "Error while copying the file. Attempts left: %s"
36
- }
37
- }
1
+ {
2
+ "messages": {
3
+ "LIB_UnhandledEx": "Unhandled: %s",
4
+ "LIB_FailOnCode": "Failure return code: %d",
5
+ "LIB_MkdirFailed": "Unable to create directory '%s'. %s",
6
+ "LIB_MkdirFailedFileExists": "Unable to create directory '%s'. Conflicting file exists: '%s'",
7
+ "LIB_MkdirFailedInvalidDriveRoot": "Unable to create directory '%s'. Root directory does not exist: '%s'",
8
+ "LIB_MkdirFailedInvalidShare": "Unable to create directory '%s'. Unable to verify the directory exists: '%s'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share.",
9
+ "LIB_MultilineSecret": "Secrets cannot contain multiple lines",
10
+ "LIB_ProcessError": "There was an error when attempting to execute the process '%s'. This may indicate the process failed to start. Error: %s",
11
+ "LIB_ProcessExitCode": "The process '%s' failed with exit code %s",
12
+ "LIB_ProcessStderr": "The process '%s' failed because one or more lines were written to the STDERR stream",
13
+ "LIB_ReturnCode": "Return code: %d",
14
+ "LIB_ResourceFileNotExist": "Resource file doesn\\'t exist: %s",
15
+ "LIB_ResourceFileAlreadySet": "Resource file has already set to: %s",
16
+ "LIB_ResourceFileNotSet": "Resource file haven\\'t set, can\\'t find loc string for key: %s",
17
+ "LIB_StdioNotClosed": "The STDIO streams did not close within %s seconds of the exit event from process '%s'. This may indicate a child process inherited the STDIO streams and has not yet exited.",
18
+ "LIB_WhichNotFound_Linux": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.",
19
+ "LIB_WhichNotFound_Win": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.",
20
+ "LIB_LocStringNotFound": "Can\\'t find loc string for key: %s",
21
+ "LIB_ParameterIsRequired": "%s not supplied",
22
+ "LIB_InputRequired": "Input required: %s",
23
+ "LIB_InvalidPattern": "Invalid pattern: '%s'",
24
+ "LIB_EndpointNotExist": "Endpoint not present: %s",
25
+ "LIB_EndpointDataNotExist": "Endpoint data parameter %s not present: %s",
26
+ "LIB_EndpointAuthNotExist": "Endpoint auth data not present: %s",
27
+ "LIB_InvalidEndpointAuth": "Invalid endpoint auth: %s",
28
+ "LIB_InvalidSecureFilesInput": "Invalid secure file input: %s",
29
+ "LIB_PathNotFound": "Not found %s: %s",
30
+ "LIB_PathHasNullByte": "Path cannot contain null bytes",
31
+ "LIB_OperationFailed": "Failed %s: %s",
32
+ "LIB_UseFirstGlobMatch": "Multiple workspace matches. using first.",
33
+ "LIB_MergeTestResultNotSupported": "Merging test results from multiple files to one test run is not supported on this version of build agent for OSX/Linux, each test result file will be published as a separate test run in VSO/TFS.",
34
+ "LIB_PlatformNotSupported": "Platform not supported: %s",
35
+ "LIB_CopyFileFailed": "Error while copying the file. Attempts left: %s"
36
+ }
37
+ }
package/mock-test.js CHANGED
@@ -126,20 +126,17 @@ var MockTestRunner = /** @class */ (function () {
126
126
  var version = nodeVersion || this.getNodeVersion();
127
127
  var downloadVersion;
128
128
  switch (version) {
129
- case 5:
130
- downloadVersion = 'v5.10.1';
131
- break;
132
129
  case 6:
133
130
  downloadVersion = 'v6.17.1';
134
131
  break;
135
132
  case 10:
136
133
  downloadVersion = 'v10.21.0';
137
134
  break;
138
- case 14:
139
- downloadVersion = 'v14.11.0';
135
+ case 16:
136
+ downloadVersion = 'v16.13.0';
140
137
  break;
141
138
  default:
142
- throw new Error('Invalid node version, must be 5, 6, 10, or 14 (received ' + version + ')');
139
+ throw new Error('Invalid node version, must be 6, 10, or 16 (received ' + version + ')');
143
140
  }
144
141
  // Install node in home directory if it isn't already there.
145
142
  var downloadDestination = path.join(downloadDirectory, 'node' + version);
@@ -151,12 +148,12 @@ var MockTestRunner = /** @class */ (function () {
151
148
  return this.downloadNode(downloadVersion, downloadDestination);
152
149
  }
153
150
  };
154
- // Determines the correct version of node to use based on the contents of the task's task.json. Defaults to Node 14.
151
+ // Determines the correct version of node to use based on the contents of the task's task.json. Defaults to Node 16.
155
152
  MockTestRunner.prototype.getNodeVersion = function () {
156
153
  var taskJsonPath = this.getTaskJsonPath();
157
154
  if (!taskJsonPath) {
158
- console.warn('Unable to find task.json, defaulting to use Node 14');
159
- return 10;
155
+ console.warn('Unable to find task.json, defaulting to use Node 16');
156
+ return 16;
160
157
  }
161
158
  var taskJsonContents = fs.readFileSync(taskJsonPath, { encoding: 'utf-8' });
162
159
  var taskJson = JSON.parse(taskJsonContents);
@@ -166,9 +163,9 @@ var MockTestRunner = /** @class */ (function () {
166
163
  || taskJson['postjobexecution']);
167
164
  var keys = Object.keys(execution);
168
165
  for (var i = 0; i < keys.length; i++) {
169
- if (keys[i].toLowerCase() == 'node14') {
170
- // Prefer node 14 and return immediately.
171
- return 14;
166
+ if (keys[i].toLowerCase() == 'node16') {
167
+ // Prefer node 16 and return immediately.
168
+ return 16;
172
169
  }
173
170
  else if (keys[i].toLowerCase() == 'node10') {
174
171
  // Prefer node 10 and return immediately.
@@ -179,8 +176,8 @@ var MockTestRunner = /** @class */ (function () {
179
176
  }
180
177
  }
181
178
  if (!nodeVersionFound) {
182
- console.warn('Unable to determine execution type from task.json, defaulting to use Node 10');
183
- return 10;
179
+ console.warn('Unable to determine execution type from task.json, defaulting to use Node 16');
180
+ return 16;
184
181
  }
185
182
  return 6;
186
183
  };
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
- {
2
- "name": "azure-pipelines-task-lib",
3
- "version": "3.3.1",
4
- "description": "Azure Pipelines Task SDK",
5
- "main": "./task.js",
6
- "typings": "./task.d.ts",
7
- "scripts": {
8
- "build": "node make.js build",
9
- "test": "node make.js test"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/Microsoft/azure-pipelines-task-lib"
14
- },
15
- "keywords": [
16
- "azure-pipelines",
17
- "agent",
18
- "build",
19
- "release",
20
- "ci-cd",
21
- "task"
22
- ],
23
- "author": "Microsoft",
24
- "license": "MIT",
25
- "bugs": {
26
- "url": "https://github.com/Microsoft/azure-pipelines-task-lib/issues"
27
- },
28
- "homepage": "https://github.com/Microsoft/azure-pipelines-task-lib",
29
- "dependencies": {
30
- "minimatch": "3.0.5",
31
- "mockery": "^1.7.0",
32
- "q": "^1.5.1",
33
- "semver": "^5.1.0",
34
- "shelljs": "^0.8.5",
35
- "sync-request": "6.1.0",
36
- "uuid": "^3.0.1"
37
- },
38
- "devDependencies": {
39
- "@types/minimatch": "3.0.3",
40
- "@types/mocha": "^5.0.0",
41
- "@types/mockery": "^1.4.29",
42
- "@types/node": "^10.17.0",
43
- "@types/q": "^1.5.4",
44
- "@types/semver": "^7.3.4",
45
- "@types/shelljs": "^0.8.8",
46
- "mocha": "5.2.0",
47
- "typescript": "^4.0.0"
48
- }
49
- }
1
+ {
2
+ "name": "azure-pipelines-task-lib",
3
+ "version": "4.0.1-preview",
4
+ "description": "Azure Pipelines Task SDK",
5
+ "main": "./task.js",
6
+ "typings": "./task.d.ts",
7
+ "scripts": {
8
+ "build": "node make.js build",
9
+ "test": "node make.js test"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Microsoft/azure-pipelines-task-lib"
14
+ },
15
+ "keywords": [
16
+ "azure-pipelines",
17
+ "agent",
18
+ "build",
19
+ "release",
20
+ "ci-cd",
21
+ "task"
22
+ ],
23
+ "author": "Microsoft",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/Microsoft/azure-pipelines-task-lib/issues"
27
+ },
28
+ "homepage": "https://github.com/Microsoft/azure-pipelines-task-lib",
29
+ "dependencies": {
30
+ "minimatch": "3.0.5",
31
+ "mockery": "^1.7.0",
32
+ "q": "^1.5.1",
33
+ "semver": "^5.1.0",
34
+ "shelljs": "^0.8.5",
35
+ "sync-request": "6.1.0",
36
+ "uuid": "^3.0.1"
37
+ },
38
+ "devDependencies": {
39
+ "@types/minimatch": "3.0.3",
40
+ "@types/mockery": "^1.4.29",
41
+ "@types/mocha": "^9.1.1",
42
+ "@types/node": "^16.11.39",
43
+ "@types/q": "^1.5.4",
44
+ "@types/semver": "^7.3.4",
45
+ "@types/shelljs": "^0.8.8",
46
+ "mocha": "^9.2.2",
47
+ "typescript": "^4.0.0"
48
+ }
49
+ }
package/toolrunner.js CHANGED
@@ -509,6 +509,7 @@ var ToolRunner = /** @class */ (function (_super) {
509
509
  };
510
510
  ToolRunner.prototype._getSpawnSyncOptions = function (options) {
511
511
  var result = {};
512
+ result.maxBuffer = 1024 * 1024 * 1024;
512
513
  result.cwd = options.cwd;
513
514
  result.env = options.env;
514
515
  result.shell = options.shell;
package/vault.js CHANGED
@@ -52,7 +52,7 @@ var Vault = /** @class */ (function () {
52
52
  var iv = ivDataBuffer.slice(0, 16);
53
53
  var encryptedText = ivDataBuffer.slice(16);
54
54
  var decipher = crypto.createDecipheriv(algorithm, key, iv);
55
- var dec = decipher.update(encryptedText, encryptEncoding, unencryptedEncoding);
55
+ var dec = decipher.update(encryptedText);
56
56
  var decFinal = decipher.final(unencryptedEncoding);
57
57
  secret = dec + decFinal;
58
58
  }