zarro 1.216.0 → 1.216.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/gulp-tasks/build.js +4 -1
- package/gulp-tasks/dotnet-publish.js +1 -1
- package/gulp-tasks/modules/alter-package-json-version.js +1 -1
- package/gulp-tasks/modules/defaults.js +1 -1
- package/gulp-tasks/modules/dotnet-cli.js +4 -2
- package/gulp-tasks/modules/exec.js +11 -15
- package/gulp-tasks/modules/fetch-github-release/dist-copy/fetchRelease.js +56 -68
- package/gulp-tasks/modules/fetch-github-release/dist-copy/getAssetDefault.js +1 -2
- package/gulp-tasks/modules/fetch-github-release/dist-copy/isUpdateAvailable.js +16 -32
- package/gulp-tasks/modules/fetch-github-release/dist-copy/util.js +10 -19
- package/gulp-tasks/modules/fetch-github-release/tsconfig.json +2 -1
- package/gulp-tasks/modules/gulp-dotnet-cli.js +23 -13
- package/gulp-tasks/modules/gulp-dotnetcover.js +2 -2
- package/gulp-tasks/modules/gulp-xbuild.js +1 -1
- package/gulp-tasks/modules/nuget-cli.js +5 -2
- package/gulp-tasks/modules/nuget-update-self.js +2 -1
- package/gulp-tasks/modules/parse-bool.js +1 -2
- package/gulp-tasks/modules/register-environment-variables.js +2 -2
- package/gulp-tasks/modules/resolve-nuget-api-key.js +9 -2
- package/gulp-tasks/modules/temporary-environment.js +1 -1
- package/gulp-tasks/modules/test-dotnet-logic.js +3 -3
- package/gulp-tasks/modules/version-reading-shared.js +1 -2
- package/package.json +10 -10
- package/tsconfig.json +3 -2
package/gulp-tasks/build.js
CHANGED
|
@@ -107,7 +107,10 @@ If the error looks transient, I suggest setting the environment
|
|
|
107
107
|
};
|
|
108
108
|
if (env.resolveFlag("BUILD_SHOW_INFO")) {
|
|
109
109
|
const buildRetries = env.resolveNumber(env.BUILD_RETRIES), retryMessage = buildRetries > 0 ? `yes (${buildRetries})` : `no`;
|
|
110
|
-
logConfig(
|
|
110
|
+
logConfig({
|
|
111
|
+
...config,
|
|
112
|
+
buildRetries: retryMessage
|
|
113
|
+
}, {
|
|
111
114
|
toolsVersion: "Tools version",
|
|
112
115
|
targets: "Build targets",
|
|
113
116
|
configuration: "Build configuration",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
framework: env.resolve(env.DOTNET_PUBLISH_FRAMEWORK),
|
|
44
44
|
noBuild: env.resolveFlag(env.DOTNET_PUBLISH_NO_BUILD),
|
|
45
45
|
noRestore: env.resolveFlag(env.DOTNET_PUBLISH_NO_RESTORE),
|
|
46
|
-
target: "[ not set ]",
|
|
46
|
+
target: "[ not set ]", // intentional: piping through gulp will set this, per project
|
|
47
47
|
verbosity: env.resolve(env.DOTNET_PUBLISH_VERBOSITY),
|
|
48
48
|
msbuildProperties: env.resolveMap(env.MSBUILD_PROPERTIES),
|
|
49
49
|
publishContainer: env.resolveFlag(env.DOTNET_PUBLISH_CONTAINER, anyContainerOptionsSet),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(function () {
|
|
3
3
|
module.exports = function defaults(config, fallback) {
|
|
4
|
-
const result =
|
|
4
|
+
const result = { ...config };
|
|
5
5
|
Object.keys(fallback || {}).forEach(k => {
|
|
6
6
|
if (result[k] === undefined) {
|
|
7
7
|
result[k] = fallback[k];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
}
|
|
6
6
|
const { system } = require("system-wrapper");
|
|
7
7
|
const realDotnetCli = require("dotnet-cli");
|
|
8
|
-
const dotnetCli =
|
|
8
|
+
const dotnetCli = { ...realDotnetCli };
|
|
9
9
|
const decoratedClearCaches = dotnetCli.clearCaches;
|
|
10
10
|
decoratedClearCaches.httpCache = dotnetCli.DotNetCache.httpCache;
|
|
11
11
|
decoratedClearCaches.temp = dotnetCli.DotNetCache.temp;
|
|
@@ -26,5 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
module.exports =
|
|
29
|
+
module.exports = {
|
|
30
|
+
...dotnetCli
|
|
31
|
+
};
|
|
30
32
|
})();
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
(function () {
|
|
14
3
|
// this is a convenient wrapper around system()
|
|
15
4
|
const { fileExists, folderExists } = require("yafs"), path = require("path"), quoteIfRequired = requireModule("quote-if-required"), failAfter = requireModule("fail-after"), isWindows = requireModule("is-windows"), system = require("system-wrapper"), debug = requireModule("debug")(__filename), which = requireModule("which"), ZarroError = requireModule("zarro-error");
|
|
@@ -37,7 +26,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
37
26
|
// intentionally blank
|
|
38
27
|
}
|
|
39
28
|
async function doSystemWin32(cmd, args, opts, handlers) {
|
|
40
|
-
const
|
|
29
|
+
const { cwd, ...optsWithoutCwd } = (opts || {}), systemOpts = {
|
|
30
|
+
...optsWithoutCwd,
|
|
31
|
+
cwd: `${cwd}`
|
|
32
|
+
};
|
|
41
33
|
return await isBatchFile(cmd)
|
|
42
34
|
? runBatchFile(cmd, args, systemOpts, handlers)
|
|
43
35
|
: doSystem(cmd, args, systemOpts, handlers);
|
|
@@ -80,17 +72,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
80
72
|
const stderrHandler = (_a = handlers === null || handlers === void 0 ? void 0 : handlers.stderr) !== null && _a !== void 0 ? _a : noop;
|
|
81
73
|
const stdoutHandler = (_b = handlers === null || handlers === void 0 ? void 0 : handlers.stdout) !== null && _b !== void 0 ? _b : noop;
|
|
82
74
|
try {
|
|
83
|
-
await system.system(cmd, args,
|
|
75
|
+
await system.system(cmd, args, {
|
|
76
|
+
...opts,
|
|
77
|
+
stdout: (s) => {
|
|
84
78
|
result.push(s);
|
|
85
79
|
stdout.push(s);
|
|
86
80
|
originalStdOut(s);
|
|
87
81
|
tryDo(() => stdoutHandler(s));
|
|
88
|
-
},
|
|
82
|
+
},
|
|
83
|
+
stderr: (s) => {
|
|
89
84
|
result.push(s);
|
|
90
85
|
stderr.push(s);
|
|
91
86
|
originalStdErr(s);
|
|
92
87
|
tryDo(() => stderrHandler(s));
|
|
93
|
-
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
94
90
|
return result.join("\n");
|
|
95
91
|
}
|
|
96
92
|
catch (e) {
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
14
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
6
|
+
exports.fetchReleaseByTag = fetchReleaseByTag;
|
|
7
|
+
exports.fetchLatestRelease = fetchLatestRelease;
|
|
16
8
|
const yafs_1 = require("yafs");
|
|
17
9
|
const path_1 = __importDefault(require("path"));
|
|
18
10
|
const rest_1 = require("@octokit/rest");
|
|
@@ -43,81 +35,77 @@ function determineFilenameFrom(response) {
|
|
|
43
35
|
return "release.zip";
|
|
44
36
|
}
|
|
45
37
|
}
|
|
46
|
-
function download(url, destination) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
38
|
+
async function download(url, destination) {
|
|
39
|
+
const fetch = bent(url);
|
|
40
|
+
try {
|
|
41
|
+
const response = await fetch();
|
|
42
|
+
const data = await response.arrayBuffer();
|
|
43
|
+
const filename = determineFilenameFrom(response);
|
|
44
|
+
await (0, yafs_1.writeFile)(path_1.default.join(destination, filename), data);
|
|
45
|
+
return determineFilenameFrom(response);
|
|
46
|
+
}
|
|
47
|
+
catch (e) {
|
|
48
|
+
const err = e;
|
|
49
|
+
if (err.statusCode === undefined) {
|
|
50
|
+
throw err;
|
|
55
51
|
}
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
throw err;
|
|
52
|
+
if (err.statusCode === 301 || err.statusCode === 302) {
|
|
53
|
+
const next = err.headers["location"];
|
|
54
|
+
if (!next) {
|
|
55
|
+
throw new Error(`No location provided for http response ${err.statusCode}`);
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
const next = err.headers["location"];
|
|
63
|
-
if (!next) {
|
|
64
|
-
throw new Error(`No location provided for http response ${err.statusCode}`);
|
|
65
|
-
}
|
|
66
|
-
return download(next, destination);
|
|
67
|
-
}
|
|
68
|
-
throw err;
|
|
57
|
+
return download(next, destination);
|
|
69
58
|
}
|
|
70
|
-
|
|
59
|
+
throw err;
|
|
60
|
+
}
|
|
71
61
|
}
|
|
72
|
-
function fetchRelease(options) {
|
|
62
|
+
async function fetchRelease(options) {
|
|
73
63
|
var _a;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return [downloadPath];
|
|
96
|
-
});
|
|
64
|
+
const { owner, repo, getRelease, getAsset = getAssetDefault_1.getAssetDefault, destination = constants_1.PACKAGE_DATA_DIR, shouldExtract = true, } = options;
|
|
65
|
+
if (!owner) {
|
|
66
|
+
throw new Error('Required "owner" option is missing');
|
|
67
|
+
}
|
|
68
|
+
if (!repo) {
|
|
69
|
+
throw new Error('Required "repo" option is missing');
|
|
70
|
+
}
|
|
71
|
+
const { data: { assets, tag_name: version }, } = await getRelease(owner, repo);
|
|
72
|
+
const downloadUrl = (_a = getAsset(version, assets)) === null || _a === void 0 ? void 0 : _a.browser_download_url;
|
|
73
|
+
if (!downloadUrl) {
|
|
74
|
+
throw new Error('Unable to find download URL');
|
|
75
|
+
}
|
|
76
|
+
await (0, util_1.ensureDirExist)(destination);
|
|
77
|
+
const filename = await download(downloadUrl, destination);
|
|
78
|
+
const downloadPath = path_1.default.join(destination, filename);
|
|
79
|
+
if (shouldExtract) {
|
|
80
|
+
const files = await (0, decompress_1.default)(downloadPath, destination);
|
|
81
|
+
await (0, yafs_1.rm)(downloadPath);
|
|
82
|
+
return files.map((file) => path_1.default.join(destination, file.path));
|
|
83
|
+
}
|
|
84
|
+
return [downloadPath];
|
|
97
85
|
}
|
|
98
86
|
/**
|
|
99
87
|
* Downloads and extract release for the specified tag from Github to the destination.
|
|
100
88
|
*
|
|
101
89
|
* await fetchLatestRelease({ owner: 'smallstep', repo: 'cli', tag: '1.0.0' })
|
|
102
90
|
*/
|
|
103
|
-
function fetchReleaseByTag(options) {
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
91
|
+
async function fetchReleaseByTag(options) {
|
|
92
|
+
return fetchRelease({
|
|
93
|
+
...options,
|
|
94
|
+
getRelease: (owner, repo) => new rest_1.Octokit({ auth: options.accessToken }).repos.getReleaseByTag({
|
|
95
|
+
owner,
|
|
96
|
+
repo,
|
|
97
|
+
tag: options.tag,
|
|
98
|
+
}),
|
|
110
99
|
});
|
|
111
100
|
}
|
|
112
|
-
exports.fetchReleaseByTag = fetchReleaseByTag;
|
|
113
101
|
/**
|
|
114
102
|
* Downloads and extract latest release from Github to the destination.
|
|
115
103
|
*
|
|
116
104
|
* await fetchLatestRelease({ owner: 'smallstep', repo: 'cli' })
|
|
117
105
|
*/
|
|
118
|
-
function fetchLatestRelease(options) {
|
|
119
|
-
return
|
|
120
|
-
|
|
106
|
+
async function fetchLatestRelease(options) {
|
|
107
|
+
return fetchRelease({
|
|
108
|
+
...options,
|
|
109
|
+
getRelease: (owner, repo) => new rest_1.Octokit({ auth: options.accessToken }).repos.getLatestRelease({ owner, repo }),
|
|
121
110
|
});
|
|
122
111
|
}
|
|
123
|
-
exports.fetchLatestRelease = fetchLatestRelease;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAssetDefault =
|
|
3
|
+
exports.getAssetDefault = getAssetDefault;
|
|
4
4
|
function getPlatformIdentifier() {
|
|
5
5
|
switch (process.platform) {
|
|
6
6
|
case 'win32':
|
|
@@ -31,4 +31,3 @@ function getAssetDefault(version, assets) {
|
|
|
31
31
|
}
|
|
32
32
|
return archAsset;
|
|
33
33
|
}
|
|
34
|
-
exports.getAssetDefault = getAssetDefault;
|
|
@@ -1,41 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
3
|
+
exports.isUpdateAvailable = isUpdateAvailable;
|
|
4
|
+
exports.fetchLatestReleaseInfo = fetchLatestReleaseInfo;
|
|
5
|
+
exports.listReleases = listReleases;
|
|
6
|
+
exports.newerVersion = newerVersion;
|
|
13
7
|
const rest_1 = require("@octokit/rest");
|
|
14
8
|
const semver_1 = require("semver");
|
|
15
|
-
function isUpdateAvailable(options) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return newerVersion(latestVersion, currentVersion);
|
|
20
|
-
});
|
|
9
|
+
async function isUpdateAvailable(options) {
|
|
10
|
+
const { repo, owner, currentVersion, accessToken } = options;
|
|
11
|
+
const { data: { tag_name: latestVersion }, } = await new rest_1.Octokit({ auth: accessToken }).repos.getLatestRelease({ owner, repo });
|
|
12
|
+
return newerVersion(latestVersion, currentVersion);
|
|
21
13
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const result = yield new rest_1.Octokit({ auth: accessToken }).repos.getLatestRelease({ owner, repo });
|
|
27
|
-
return result.data;
|
|
28
|
-
});
|
|
14
|
+
async function fetchLatestReleaseInfo(opts) {
|
|
15
|
+
const { repo, owner, accessToken } = opts;
|
|
16
|
+
const result = await new rest_1.Octokit({ auth: accessToken }).repos.getLatestRelease({ owner, repo });
|
|
17
|
+
return result.data;
|
|
29
18
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const result = yield new rest_1.Octokit({ auth: accessToken }).repos.listReleases({ owner, repo });
|
|
35
|
-
return result.data;
|
|
36
|
-
});
|
|
19
|
+
async function listReleases(opts) {
|
|
20
|
+
const { repo, owner, accessToken } = opts;
|
|
21
|
+
const result = await new rest_1.Octokit({ auth: accessToken }).repos.listReleases({ owner, repo });
|
|
22
|
+
return result.data;
|
|
37
23
|
}
|
|
38
|
-
exports.listReleases = listReleases;
|
|
39
24
|
function newerVersion(latestVersion, currentVersion) {
|
|
40
25
|
if (!latestVersion) {
|
|
41
26
|
return false;
|
|
@@ -47,4 +32,3 @@ function newerVersion(latestVersion, currentVersion) {
|
|
|
47
32
|
const normalizedCurrentVersion = currentVersion.replace(/^v/, "");
|
|
48
33
|
return (0, semver_1.gt)(normalizedLatestVersion, normalizedCurrentVersion);
|
|
49
34
|
}
|
|
50
|
-
exports.newerVersion = newerVersion;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -15,25 +6,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
6
|
exports.ensureDirExist = exports.mkdir = exports.exists = void 0;
|
|
16
7
|
const fs_1 = __importDefault(require("fs"));
|
|
17
8
|
const path_1 = __importDefault(require("path"));
|
|
18
|
-
const exists = (filePath) =>
|
|
9
|
+
const exists = async (filePath) => {
|
|
19
10
|
try {
|
|
20
|
-
|
|
11
|
+
await fs_1.default.promises.access(filePath);
|
|
21
12
|
return true;
|
|
22
13
|
}
|
|
23
14
|
catch (_a) {
|
|
24
15
|
return false;
|
|
25
16
|
}
|
|
26
|
-
}
|
|
17
|
+
};
|
|
27
18
|
exports.exists = exists;
|
|
28
|
-
const mkdir = (dirname) =>
|
|
29
|
-
const isExist =
|
|
19
|
+
const mkdir = async (dirname) => {
|
|
20
|
+
const isExist = await (0, exports.exists)(dirname);
|
|
30
21
|
if (!isExist) {
|
|
31
|
-
|
|
22
|
+
await fs_1.default.promises.mkdir(dirname, { recursive: true });
|
|
32
23
|
}
|
|
33
|
-
}
|
|
24
|
+
};
|
|
34
25
|
exports.mkdir = mkdir;
|
|
35
|
-
const ensureDirExist = (filePath) =>
|
|
26
|
+
const ensureDirExist = async (filePath) => {
|
|
36
27
|
const dirname = path_1.default.dirname(filePath);
|
|
37
|
-
|
|
38
|
-
}
|
|
28
|
+
await (0, exports.mkdir)(dirname);
|
|
29
|
+
};
|
|
39
30
|
exports.ensureDirExist = ensureDirExist;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const dotnetCli = __importStar(require("dotnet-cli"));
|
|
27
37
|
(function () {
|
|
@@ -44,42 +54,42 @@ const dotnetCli = __importStar(require("dotnet-cli"));
|
|
|
44
54
|
}
|
|
45
55
|
function build(opts) {
|
|
46
56
|
return streamify(wrap(dotnetCli.build), f => {
|
|
47
|
-
const copy =
|
|
57
|
+
const copy = { ...opts };
|
|
48
58
|
copy.target = f.path;
|
|
49
59
|
return copy;
|
|
50
60
|
}, "gulp-dotnet-cli-build", "building project or solution");
|
|
51
61
|
}
|
|
52
62
|
function clean(opts) {
|
|
53
63
|
return streamify(wrap(dotnetCli.clean), f => {
|
|
54
|
-
const copy =
|
|
64
|
+
const copy = { ...opts };
|
|
55
65
|
copy.target = f.path;
|
|
56
66
|
return copy;
|
|
57
67
|
}, "gulp-dotnet-cli-clean", "cleaning project or solution");
|
|
58
68
|
}
|
|
59
69
|
function test(opts) {
|
|
60
70
|
return streamify(wrap(dotnetCli.test), f => {
|
|
61
|
-
const copy =
|
|
71
|
+
const copy = { ...opts };
|
|
62
72
|
copy.target = f.path;
|
|
63
73
|
return copy;
|
|
64
74
|
}, "gulp-dotnet-cli-pack", "creating nuget package");
|
|
65
75
|
}
|
|
66
76
|
function pack(opts) {
|
|
67
77
|
return streamify(wrap(dotnetCli.pack), async (f) => {
|
|
68
|
-
const copy =
|
|
78
|
+
const copy = { ...opts };
|
|
69
79
|
copy.target = f.path;
|
|
70
80
|
return copy;
|
|
71
81
|
}, "gulp-dotnet-cli-pack", "creating nuget package");
|
|
72
82
|
}
|
|
73
83
|
function nugetPush(opts) {
|
|
74
84
|
return streamify(wrap(dotnetCli.nugetPush), f => {
|
|
75
|
-
const copy =
|
|
85
|
+
const copy = { ...opts };
|
|
76
86
|
copy.target = f.path;
|
|
77
87
|
return copy;
|
|
78
88
|
}, "gulp-dotnet-cli-nuget-push", "pushing nuget package");
|
|
79
89
|
}
|
|
80
90
|
function publish(opts) {
|
|
81
91
|
return streamify(wrap(dotnetCli.publish), async (f) => {
|
|
82
|
-
const copy =
|
|
92
|
+
const copy = { ...opts };
|
|
83
93
|
copy.target = f.path;
|
|
84
94
|
if (copy.publishContainer) {
|
|
85
95
|
const containerOpts = await dotnetCli.resolveContainerOptions(copy), nameOpt = definitelyFind(containerOpts, "containerImageName"), tagOpt = definitelyFind(containerOpts, "containerImageTag"), registryOpt = definitelyFind(containerOpts, "containerRegistry");
|
|
@@ -391,9 +391,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
391
391
|
const result = [
|
|
392
392
|
`"-target:${nunit}"`,
|
|
393
393
|
`"-targetargs:${nunitOptions}"`,
|
|
394
|
-
`"-targetdir:${process.cwd()}"`,
|
|
394
|
+
`"-targetdir:${process.cwd()}"`, // TODO: test me please
|
|
395
395
|
`"-output:${options.coverageReportBase + ".xml"}"`,
|
|
396
|
-
`-filter:"+[*]* ${excludeFilter}"`,
|
|
396
|
+
`-filter:"+[*]* ${excludeFilter}"`, // TODO: embetterment
|
|
397
397
|
`-register`,
|
|
398
398
|
`-mergebyhash`,
|
|
399
399
|
`"-searchdirs:${getUniqueDirsFrom(testAssemblies)}"`
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
nologo: false
|
|
11
11
|
}, gutil = requireModule("gulp-util"), es = require("event-stream");
|
|
12
12
|
function gulpXBuild(options) {
|
|
13
|
-
options =
|
|
13
|
+
options = { ...defaultOptions, ...options };
|
|
14
14
|
const args = prepareArgsFrom(options);
|
|
15
15
|
const promise = Promise.resolve();
|
|
16
16
|
return es.through(function write(file) {
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
if (!`${options.packageId}`.trim()) {
|
|
12
12
|
throw new Error(`no nuget packageId provided`);
|
|
13
13
|
}
|
|
14
|
-
const opts =
|
|
14
|
+
const opts = {
|
|
15
|
+
...defaultInstallOptions,
|
|
16
|
+
...options
|
|
17
|
+
};
|
|
15
18
|
if (opts.outputDirectory) {
|
|
16
19
|
await mkdir(opts.outputDirectory);
|
|
17
20
|
}
|
|
@@ -37,7 +40,7 @@
|
|
|
37
40
|
pushFlag(args, opts.preRelease, "-Prerelease");
|
|
38
41
|
pushFlag(args, opts.requireConsent, "-RequireConsent");
|
|
39
42
|
pushFlag(args, opts.forceEnglishOutput, "-ForceEnglishOutput");
|
|
40
|
-
const systemOpts =
|
|
43
|
+
const systemOpts = { ...opts.systemOptions };
|
|
41
44
|
systemOpts.suppressOutput = systemOpts.suppressOutput === undefined
|
|
42
45
|
? !!opts.nonInteractive
|
|
43
46
|
: systemOpts.suppressOutput;
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
const ext = path.extname(nugetPath);
|
|
28
28
|
const mono = which("mono");
|
|
29
29
|
if (!mono) {
|
|
30
|
-
|
|
30
|
+
updating = undefined;
|
|
31
|
+
return reject(new Error(`To run nuget.exe on this platform, you must install mono`));
|
|
31
32
|
}
|
|
32
33
|
try {
|
|
33
34
|
if (ext) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseBool =
|
|
3
|
+
exports.parseBool = parseBool;
|
|
4
4
|
const ZarroError = requireModule("zarro-error");
|
|
5
5
|
const truthy = [
|
|
6
6
|
"1",
|
|
@@ -23,4 +23,3 @@ function parseBool(value, strict) {
|
|
|
23
23
|
}
|
|
24
24
|
return !!value;
|
|
25
25
|
}
|
|
26
|
-
exports.parseBool = parseBool;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
});
|
|
57
57
|
env.register({
|
|
58
58
|
name: "MAX_CONCURRENCY",
|
|
59
|
-
default: `${Math.floor(os.cpus().length / 2)}`,
|
|
59
|
+
default: `${Math.floor(os.cpus().length / 2)}`, // in the age of hyperthreading, loading all logical cores can starve the host
|
|
60
60
|
help: "Overrides other concurrency settings (BUILD_MAX_CPU_COUNT, MAX_NUNIT_AGENTS)"
|
|
61
61
|
});
|
|
62
62
|
env.register({
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
});
|
|
132
132
|
env.register({
|
|
133
133
|
name: "MAX_NUNIT_AGENTS",
|
|
134
|
-
default: `${os.cpus().length - 1}`,
|
|
134
|
+
default: `${os.cpus().length - 1}`, // in the age of hyperthreading, loading all logical cores can starve tests
|
|
135
135
|
help: "How many NUNit agents to use for testing (net framework)",
|
|
136
136
|
overriddenBy: "MAX_CONCURRENCY",
|
|
137
137
|
when: overrideWhenSmaller
|
|
@@ -18,10 +18,17 @@
|
|
|
18
18
|
}
|
|
19
19
|
const result = generateDefaultKeyContainer(defaultKey);
|
|
20
20
|
return defaultSource
|
|
21
|
-
?
|
|
21
|
+
? {
|
|
22
|
+
...result,
|
|
23
|
+
[defaultSource]: defaultKey
|
|
24
|
+
}
|
|
25
|
+
: result;
|
|
22
26
|
}
|
|
23
27
|
if (!!blob.match(/{+.*:+/)) {
|
|
24
|
-
return
|
|
28
|
+
return {
|
|
29
|
+
...generateDefaultKeyContainer(defaultKey),
|
|
30
|
+
...JSON.parse(blob)
|
|
31
|
+
};
|
|
25
32
|
}
|
|
26
33
|
else {
|
|
27
34
|
return generateDefaultKeyContainer(blob);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
this.replaceExistingEnvironment = existingEnvironment !== null && existingEnvironment !== void 0 ? existingEnvironment : false;
|
|
10
10
|
}
|
|
11
11
|
async run(fn) {
|
|
12
|
-
const oldEnv =
|
|
12
|
+
const oldEnv = { ...process.env };
|
|
13
13
|
try {
|
|
14
14
|
if (this.replaceExistingEnvironment) {
|
|
15
15
|
replaceEnv(this.env);
|
|
@@ -380,7 +380,7 @@ Test Run Summary
|
|
|
380
380
|
}
|
|
381
381
|
async function testOneDotNetCoreProject(target, configuration, verbosity, testResults, runningInParallel, forceBuild, suppressOutput, label) {
|
|
382
382
|
const quackersState = {
|
|
383
|
-
inSummary: false,
|
|
383
|
+
inSummary: false, // gather summary info into test results
|
|
384
384
|
inFailureSummary: false,
|
|
385
385
|
inSlowSummary: false,
|
|
386
386
|
inTotalsSummary: false,
|
|
@@ -415,7 +415,7 @@ Test Run Summary
|
|
|
415
415
|
stderr,
|
|
416
416
|
stdout,
|
|
417
417
|
suppressOutput,
|
|
418
|
-
suppressErrors: true,
|
|
418
|
+
suppressErrors: true, // we want to collect the errors later, not die when one happens
|
|
419
419
|
env: testEnvironment,
|
|
420
420
|
label
|
|
421
421
|
});
|
|
@@ -618,7 +618,7 @@ Test Run Summary
|
|
|
618
618
|
if (prefix) {
|
|
619
619
|
quackersVars.QUACKERS_TEST_NAME_PREFIX = prefix;
|
|
620
620
|
}
|
|
621
|
-
return
|
|
621
|
+
return { ...process.env, ...quackersVars };
|
|
622
622
|
}
|
|
623
623
|
function isDistinctFile(filePath, seenFiles) {
|
|
624
624
|
const basename = path.basename(filePath), result = seenFiles.indexOf(basename) === -1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tryReadVersionFrom =
|
|
3
|
+
exports.tryReadVersionFrom = tryReadVersionFrom;
|
|
4
4
|
function readTextFrom(node) {
|
|
5
5
|
return node
|
|
6
6
|
? node[0]
|
|
@@ -9,4 +9,3 @@ function readTextFrom(node) {
|
|
|
9
9
|
function tryReadVersionFrom(groups, nodeName) {
|
|
10
10
|
return groups.reduce((acc, cur) => acc || readTextFrom(cur[nodeName]), undefined);
|
|
11
11
|
}
|
|
12
|
-
exports.tryReadVersionFrom = tryReadVersionFrom;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zarro",
|
|
3
|
-
"version": "1.216.
|
|
3
|
+
"version": "1.216.1",
|
|
4
4
|
"description": "Some glue to make gulp easier, perhaps even zero- or close-to-zero-conf",
|
|
5
5
|
"bin": {
|
|
6
6
|
"zarro": "index.js"
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"event-stream": "^4.0.1",
|
|
69
69
|
"exec-step": "^0.21.0",
|
|
70
70
|
"fancy-log": "^1.3.3",
|
|
71
|
-
"gulp": "^5.0.
|
|
71
|
+
"gulp": "^5.0.1",
|
|
72
72
|
"gulp-debug": "^4.0.0",
|
|
73
73
|
"gulp-dotnet-cli": "^1.1.0",
|
|
74
74
|
"gulp-edit-xml": "^3.1.1",
|
|
75
75
|
"gulp-filter": "^6.0.0",
|
|
76
|
-
"gulp-msbuild": "
|
|
76
|
+
"gulp-msbuild": "0.11.0",
|
|
77
77
|
"heredoc-ts": "^1.0.0",
|
|
78
78
|
"lodash.kebabcase": "^4.1.1",
|
|
79
79
|
"node-nuget-client": "^0.12.0",
|
|
@@ -82,17 +82,17 @@
|
|
|
82
82
|
"readline": "^1.3.0",
|
|
83
83
|
"request": "^2.88.2",
|
|
84
84
|
"require-dir": "^1.2.0",
|
|
85
|
-
"rimraf": "^
|
|
85
|
+
"rimraf": "^6.1.4",
|
|
86
86
|
"run-sequence": "^2.2.1",
|
|
87
87
|
"sax": "^1.2.4",
|
|
88
88
|
"semver": "^7.5.4",
|
|
89
|
-
"simple-git": "^4.0
|
|
89
|
+
"simple-git": "^4.1.0",
|
|
90
90
|
"system-wrapper": "^1.8.0",
|
|
91
91
|
"temp": "^0.9.4",
|
|
92
|
-
"through2": "^
|
|
92
|
+
"through2": "^4.0.2",
|
|
93
93
|
"undertaker-forward-reference": "^2.0.0",
|
|
94
94
|
"unfetch": "^5.0.0",
|
|
95
|
-
"vinyl": "^
|
|
95
|
+
"vinyl": "^3.0.1",
|
|
96
96
|
"which": "^2.0.2",
|
|
97
97
|
"xml2js": "^0.6.2",
|
|
98
98
|
"yafs": "^1.48.0",
|
|
@@ -135,13 +135,13 @@
|
|
|
135
135
|
"debugger-is-attached": "^1.2.0",
|
|
136
136
|
"expect-even-more-jest": "^1.19.0",
|
|
137
137
|
"filesystem-sandbox": "^1.20.0",
|
|
138
|
-
"ioredis": "^
|
|
138
|
+
"ioredis": "^6.0.0",
|
|
139
139
|
"jest": "^29.6.2",
|
|
140
140
|
"nodemon": "^3.0.1",
|
|
141
141
|
"proxyquire": "^2.1.3",
|
|
142
142
|
"redlock": "^5.0.0-beta.2",
|
|
143
|
-
"ts-jest": "^29.
|
|
144
|
-
"typescript": "^
|
|
143
|
+
"ts-jest": "^29.4.15",
|
|
144
|
+
"typescript": "^6.0.3",
|
|
145
145
|
"yargs": "^18.2.0"
|
|
146
146
|
}
|
|
147
147
|
}
|
package/tsconfig.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
/* Basic Options */
|
|
4
4
|
// "incremental": true, /* Enable incremental compilation */
|
|
5
|
-
"target": "
|
|
5
|
+
"target": "es2018",
|
|
6
6
|
/* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
7
7
|
"module": "commonjs",
|
|
8
8
|
/* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
19
19
|
// "composite": true, /* Enable project compilation */
|
|
20
20
|
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
21
|
+
"skipLibCheck": true, /* @types/vinyl does not type-check under TS 6 */
|
|
21
22
|
"removeComments": false,
|
|
22
23
|
/* Emit comments to output: let's make the js as friendly to consume as possible */
|
|
23
24
|
// "noEmit": true, /* Do not emit outputs. */
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
/* Module Resolution Options */
|
|
54
55
|
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
55
56
|
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
56
|
-
|
|
57
|
+
"paths": { "redlock": ["./node_modules/redlock/dist/index.d.ts"] }, /* redlock's package "exports" has no "types" condition, so TS cannot find its declarations */
|
|
57
58
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
58
59
|
// "typeRoots": [ "node_modules/@types", "./" ], /* List of folders to include type definitions from. */
|
|
59
60
|
// "types": [], /* Type declaration files to be included in compilation. */
|