npm update

This commit is contained in:
Jeff Dickey 2024-02-08 16:04:21 -06:00
parent 5173b58ce8
commit e1f00a0bf8
No known key found for this signature in database
GPG key ID: 584DADE86724B407
5 changed files with 634 additions and 383 deletions

130
dist/cache-save/index.js generated vendored
View file

@ -319,7 +319,8 @@ function createHttpClient() {
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
}
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
const components = paths;
// don't pass changes upstream
const components = paths.slice();
// Add compression method to cache version to restore
// compressed cache as per compression method
if (compressionMethod) {
@ -608,10 +609,9 @@ function resolvePaths(patterns) {
implicitDescendants: false
});
try {
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a;) {
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
_c = _g.value;
_e = false;
try {
const file = _c;
const relativeFile = path
.relative(workspace, file)
@ -626,10 +626,6 @@ function resolvePaths(patterns) {
paths.push(`${relativeFile}`);
}
}
finally {
_e = true;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
@ -711,7 +707,10 @@ function assertDefined(name, value) {
exports.assertDefined = assertDefined;
function isGhes() {
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
const isGitHubHost = hostname === 'GITHUB.COM';
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
return !isGitHubHost && !isGheHost;
}
exports.isGhes = isGhes;
//# sourceMappingURL=cacheUtils.js.map
@ -729,7 +728,7 @@ var CacheFilename;
(function (CacheFilename) {
CacheFilename["Gzip"] = "cache.tgz";
CacheFilename["Zstd"] = "cache.tzst";
})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {}));
})(CacheFilename || (exports.CacheFilename = CacheFilename = {}));
var CompressionMethod;
(function (CompressionMethod) {
CompressionMethod["Gzip"] = "gzip";
@ -737,12 +736,12 @@ var CompressionMethod;
// This enum is for earlier version of zstd that does not have --long support
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
CompressionMethod["Zstd"] = "zstd";
})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {}));
})(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));
var ArchiveToolType;
(function (ArchiveToolType) {
ArchiveToolType["GNU"] = "gnu";
ArchiveToolType["BSD"] = "bsd";
})(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {}));
})(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));
// The default number of retry attempts.
exports.DefaultRetryAttempts = 2;
// The default delay in milliseconds between retry attempts.
@ -6745,6 +6744,18 @@ class AzureKeyCredential {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* Tests an object to determine whether it implements KeyCredential.
*
* @param credential - The assumed KeyCredential to be tested.
*/
function isKeyCredential(credential) {
return coreUtil.isObjectWithProperties(credential, ["key"]) && typeof credential.key === "string";
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* A static name/key-based credential that supports updating
* the underlying name and key values.
@ -6805,6 +6816,7 @@ function isNamedKeyCredential(credential) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* A static-signature-based credential that supports updating
* the underlying signature value.
@ -6874,6 +6886,7 @@ function isTokenCredential(credential) {
exports.AzureKeyCredential = AzureKeyCredential;
exports.AzureNamedKeyCredential = AzureNamedKeyCredential;
exports.AzureSASCredential = AzureSASCredential;
exports.isKeyCredential = isKeyCredential;
exports.isNamedKeyCredential = isNamedKeyCredential;
exports.isSASCredential = isSASCredential;
exports.isTokenCredential = isTokenCredential;
@ -13535,10 +13548,10 @@ exports["default"] = _default;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var logger$1 = __nccwpck_require__(3233);
var abortController = __nccwpck_require__(2557);
var coreUtil = __nccwpck_require__(1333);
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* The `@azure/logger` configuration for this package.
* @internal
@ -13557,6 +13570,7 @@ const POLL_INTERVAL_IN_MS = 2000;
const terminalStates = ["succeeded", "canceled", "failed"];
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* Deserializes the state
*/
@ -13720,6 +13734,7 @@ async function pollOperation(inputs) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
function getOperationLocationPollingUrl(inputs) {
const { azureAsyncOperation, operationLocation } = inputs;
return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation;
@ -13861,7 +13876,7 @@ function parseRetryAfter({ rawResponse }) {
return undefined;
}
function getErrorFromResponse(response) {
const error = response.flatResponse.error;
const error = accessBodyProperty(response, "error");
if (!error) {
logger.warning(`The long-running operation failed but there is no error property in the response's body`);
return;
@ -13957,12 +13972,14 @@ function getOperationStatus({ rawResponse }, state) {
throw new Error(`Internal error: Unexpected operation mode: ${mode}`);
}
}
function getResourceLocation({ flatResponse }, state) {
if (typeof flatResponse === "object") {
const resourceLocation = flatResponse.resourceLocation;
if (resourceLocation !== undefined) {
state.config.resourceLocation = resourceLocation;
function accessBodyProperty({ flatResponse, rawResponse }, prop) {
var _a, _b;
return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop];
}
function getResourceLocation(res, state) {
const loc = accessBodyProperty(res, "resourceLocation");
if (loc && typeof loc === "string") {
state.config.resourceLocation = loc;
}
return state.config.resourceLocation;
}
@ -13997,6 +14014,7 @@ async function pollHttpOperation(inputs) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
const createStateProxy$1 = () => ({
/**
* The state at this point is created to be of type OperationState<TResult>.
@ -14048,7 +14066,7 @@ function buildCreatePoller(inputs) {
setErrorAsResult: !resolveOnUnsuccessful,
});
let resultPromise;
const abortController$1 = new abortController.AbortController();
const abortController = new AbortController();
const handlers = new Map();
const handleProgressEvents = async () => handlers.forEach((h) => h(state));
const cancelErrMsg = "Operation was canceled";
@ -14059,7 +14077,7 @@ function buildCreatePoller(inputs) {
isDone: () => ["succeeded", "failed", "canceled"].includes(state.status),
isStopped: () => resultPromise === undefined,
stopPolling: () => {
abortController$1.abort();
abortController.abort();
},
toString: () => JSON.stringify({
state,
@ -14071,9 +14089,18 @@ function buildCreatePoller(inputs) {
},
pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => {
const { abortSignal: inputAbortSignal } = pollOptions || {};
const { signal: abortSignal } = inputAbortSignal
? new abortController.AbortController([inputAbortSignal, abortController$1.signal])
: abortController$1;
// In the future we can use AbortSignal.any() instead
function abortListener() {
abortController.abort();
}
const abortSignal = abortController.signal;
if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) {
abortController.abort();
}
else if (!abortSignal.aborted) {
inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true });
}
try {
if (!poller.isDone()) {
await poller.poll({ abortSignal });
while (!poller.isDone()) {
@ -14081,6 +14108,10 @@ function buildCreatePoller(inputs) {
await poller.poll({ abortSignal });
}
}
}
finally {
inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener);
}
if (resolveOnUnsuccessful) {
return poller.getResult();
}
@ -14150,6 +14181,7 @@ function buildCreatePoller(inputs) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* Creates a poller that can be used to poll a long-running operation.
* @param lro - Description of the long-running operation
@ -14191,6 +14223,7 @@ async function createHttpPoller(lro, options) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
const createStateProxy = () => ({
initState: (config) => ({ config, isStarted: true }),
setCanceled: (state) => (state.isCancelled = true),
@ -14669,6 +14702,7 @@ class Poller {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* The LRO Engine, a class that performs polling.
*/
@ -15047,7 +15081,9 @@ exports.setSpanContext = setSpanContext;
"use strict";
var abortController = __nccwpck_require__(2557);
Object.defineProperty(exports, "__esModule", ({ value: true }));
var abortController = __nccwpck_require__(4200);
var crypto = __nccwpck_require__(6113);
// Copyright (c) Microsoft Corporation.
@ -15119,7 +15155,7 @@ function delay(timeInMs, options) {
*/
async function cancelablePromiseRace(abortablePromiseBuilders, options) {
var _a, _b;
const aborter = new abortController.AbortController();
const aborter = new AbortController();
function abortHandler() {
aborter.abort();
}
@ -15404,6 +15440,47 @@ exports.uint8ArrayToString = uint8ArrayToString;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 4200:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
class AbortError extends Error {
constructor(message) {
super(message);
this.name = "AbortError";
}
}
exports.AbortError = AbortError;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 3233:
@ -63417,6 +63494,9 @@ function httpRedirectFetch (fetchParams, response) {
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
request.headersList.delete('authorization')
// https://fetch.spec.whatwg.org/#authentication-entries
request.headersList.delete('proxy-authorization', true)
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
request.headersList.delete('cookie')
request.headersList.delete('host')

2
dist/cache-save/index.js.map generated vendored

File diff suppressed because one or more lines are too long

130
dist/index.js generated vendored
View file

@ -319,7 +319,8 @@ function createHttpClient() {
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
}
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
const components = paths;
// don't pass changes upstream
const components = paths.slice();
// Add compression method to cache version to restore
// compressed cache as per compression method
if (compressionMethod) {
@ -608,10 +609,9 @@ function resolvePaths(patterns) {
implicitDescendants: false
});
try {
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a;) {
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
_c = _g.value;
_e = false;
try {
const file = _c;
const relativeFile = path
.relative(workspace, file)
@ -626,10 +626,6 @@ function resolvePaths(patterns) {
paths.push(`${relativeFile}`);
}
}
finally {
_e = true;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
@ -711,7 +707,10 @@ function assertDefined(name, value) {
exports.assertDefined = assertDefined;
function isGhes() {
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
const isGitHubHost = hostname === 'GITHUB.COM';
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
return !isGitHubHost && !isGheHost;
}
exports.isGhes = isGhes;
//# sourceMappingURL=cacheUtils.js.map
@ -729,7 +728,7 @@ var CacheFilename;
(function (CacheFilename) {
CacheFilename["Gzip"] = "cache.tgz";
CacheFilename["Zstd"] = "cache.tzst";
})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {}));
})(CacheFilename || (exports.CacheFilename = CacheFilename = {}));
var CompressionMethod;
(function (CompressionMethod) {
CompressionMethod["Gzip"] = "gzip";
@ -737,12 +736,12 @@ var CompressionMethod;
// This enum is for earlier version of zstd that does not have --long support
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
CompressionMethod["Zstd"] = "zstd";
})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {}));
})(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));
var ArchiveToolType;
(function (ArchiveToolType) {
ArchiveToolType["GNU"] = "gnu";
ArchiveToolType["BSD"] = "bsd";
})(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {}));
})(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));
// The default number of retry attempts.
exports.DefaultRetryAttempts = 2;
// The default delay in milliseconds between retry attempts.
@ -7937,6 +7936,18 @@ class AzureKeyCredential {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* Tests an object to determine whether it implements KeyCredential.
*
* @param credential - The assumed KeyCredential to be tested.
*/
function isKeyCredential(credential) {
return coreUtil.isObjectWithProperties(credential, ["key"]) && typeof credential.key === "string";
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* A static name/key-based credential that supports updating
* the underlying name and key values.
@ -7997,6 +8008,7 @@ function isNamedKeyCredential(credential) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* A static-signature-based credential that supports updating
* the underlying signature value.
@ -8066,6 +8078,7 @@ function isTokenCredential(credential) {
exports.AzureKeyCredential = AzureKeyCredential;
exports.AzureNamedKeyCredential = AzureNamedKeyCredential;
exports.AzureSASCredential = AzureSASCredential;
exports.isKeyCredential = isKeyCredential;
exports.isNamedKeyCredential = isNamedKeyCredential;
exports.isSASCredential = isSASCredential;
exports.isTokenCredential = isTokenCredential;
@ -14727,10 +14740,10 @@ exports["default"] = _default;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var logger$1 = __nccwpck_require__(3233);
var abortController = __nccwpck_require__(2557);
var coreUtil = __nccwpck_require__(1333);
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* The `@azure/logger` configuration for this package.
* @internal
@ -14749,6 +14762,7 @@ const POLL_INTERVAL_IN_MS = 2000;
const terminalStates = ["succeeded", "canceled", "failed"];
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* Deserializes the state
*/
@ -14912,6 +14926,7 @@ async function pollOperation(inputs) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
function getOperationLocationPollingUrl(inputs) {
const { azureAsyncOperation, operationLocation } = inputs;
return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation;
@ -15053,7 +15068,7 @@ function parseRetryAfter({ rawResponse }) {
return undefined;
}
function getErrorFromResponse(response) {
const error = response.flatResponse.error;
const error = accessBodyProperty(response, "error");
if (!error) {
logger.warning(`The long-running operation failed but there is no error property in the response's body`);
return;
@ -15149,12 +15164,14 @@ function getOperationStatus({ rawResponse }, state) {
throw new Error(`Internal error: Unexpected operation mode: ${mode}`);
}
}
function getResourceLocation({ flatResponse }, state) {
if (typeof flatResponse === "object") {
const resourceLocation = flatResponse.resourceLocation;
if (resourceLocation !== undefined) {
state.config.resourceLocation = resourceLocation;
function accessBodyProperty({ flatResponse, rawResponse }, prop) {
var _a, _b;
return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop];
}
function getResourceLocation(res, state) {
const loc = accessBodyProperty(res, "resourceLocation");
if (loc && typeof loc === "string") {
state.config.resourceLocation = loc;
}
return state.config.resourceLocation;
}
@ -15189,6 +15206,7 @@ async function pollHttpOperation(inputs) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
const createStateProxy$1 = () => ({
/**
* The state at this point is created to be of type OperationState<TResult>.
@ -15240,7 +15258,7 @@ function buildCreatePoller(inputs) {
setErrorAsResult: !resolveOnUnsuccessful,
});
let resultPromise;
const abortController$1 = new abortController.AbortController();
const abortController = new AbortController();
const handlers = new Map();
const handleProgressEvents = async () => handlers.forEach((h) => h(state));
const cancelErrMsg = "Operation was canceled";
@ -15251,7 +15269,7 @@ function buildCreatePoller(inputs) {
isDone: () => ["succeeded", "failed", "canceled"].includes(state.status),
isStopped: () => resultPromise === undefined,
stopPolling: () => {
abortController$1.abort();
abortController.abort();
},
toString: () => JSON.stringify({
state,
@ -15263,9 +15281,18 @@ function buildCreatePoller(inputs) {
},
pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => {
const { abortSignal: inputAbortSignal } = pollOptions || {};
const { signal: abortSignal } = inputAbortSignal
? new abortController.AbortController([inputAbortSignal, abortController$1.signal])
: abortController$1;
// In the future we can use AbortSignal.any() instead
function abortListener() {
abortController.abort();
}
const abortSignal = abortController.signal;
if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) {
abortController.abort();
}
else if (!abortSignal.aborted) {
inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true });
}
try {
if (!poller.isDone()) {
await poller.poll({ abortSignal });
while (!poller.isDone()) {
@ -15273,6 +15300,10 @@ function buildCreatePoller(inputs) {
await poller.poll({ abortSignal });
}
}
}
finally {
inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener);
}
if (resolveOnUnsuccessful) {
return poller.getResult();
}
@ -15342,6 +15373,7 @@ function buildCreatePoller(inputs) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* Creates a poller that can be used to poll a long-running operation.
* @param lro - Description of the long-running operation
@ -15383,6 +15415,7 @@ async function createHttpPoller(lro, options) {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
const createStateProxy = () => ({
initState: (config) => ({ config, isStarted: true }),
setCanceled: (state) => (state.isCancelled = true),
@ -15861,6 +15894,7 @@ class Poller {
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* The LRO Engine, a class that performs polling.
*/
@ -16239,7 +16273,9 @@ exports.setSpanContext = setSpanContext;
"use strict";
var abortController = __nccwpck_require__(2557);
Object.defineProperty(exports, "__esModule", ({ value: true }));
var abortController = __nccwpck_require__(4200);
var crypto = __nccwpck_require__(6113);
// Copyright (c) Microsoft Corporation.
@ -16311,7 +16347,7 @@ function delay(timeInMs, options) {
*/
async function cancelablePromiseRace(abortablePromiseBuilders, options) {
var _a, _b;
const aborter = new abortController.AbortController();
const aborter = new AbortController();
function abortHandler() {
aborter.abort();
}
@ -16596,6 +16632,47 @@ exports.uint8ArrayToString = uint8ArrayToString;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 4200:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
* This error is thrown when an asynchronous operation has been aborted.
* Check for this error by testing the `name` that the name property of the
* error matches `"AbortError"`.
*
* @example
* ```ts
* const controller = new AbortController();
* controller.abort();
* try {
* doAsyncWork(controller.signal)
* } catch (e) {
* if (e.name === 'AbortError') {
* // handle abort error here.
* }
* }
* ```
*/
class AbortError extends Error {
constructor(message) {
super(message);
this.name = "AbortError";
}
}
exports.AbortError = AbortError;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 3233:
@ -64609,6 +64686,9 @@ function httpRedirectFetch (fetchParams, response) {
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
request.headersList.delete('authorization')
// https://fetch.spec.whatwg.org/#authentication-entries
request.headersList.delete('proxy-authorization', true)
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
request.headersList.delete('cookie')
request.headersList.delete('host')

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

689
package-lock.json generated

File diff suppressed because it is too large Load diff