Skip to content

Commit 8cbe1be

Browse files
tunc-dCopilot
andcommitted
Bump @actions/artifact to 6.3.1
Regenerate upload and merge bundles and refresh dependency license metadata. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 043fb46 commit 8cbe1be

7 files changed

Lines changed: 140 additions & 127 deletions

File tree

‎.licenses/npm/@actions/artifact.dep.yml‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@actions/core.dep.yml‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.licenses/npm/@actions/github.dep.yml‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/merge/index.js‎

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79219,7 +79219,7 @@ module.exports = index;
7921979219
/***/ 2822:
7922079220
/***/ ((module) => {
7922179221

79222-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/artifact","version":"6.2.0","preview":true,"description":"Actions artifact lib","keywords":["github","actions","artifact"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/artifact","license":"MIT","type":"module","main":"lib/artifact.js","types":"lib/artifact.d.ts","exports":{".":{"types":"./lib/artifact.d.ts","import":"./lib/artifact.js"}},"directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/artifact"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"cd ../../ && npm run test ./packages/artifact","bootstrap":"cd ../../ && npm run bootstrap","tsc-run":"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/","tsc":"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^3.0.0","@actions/github":"^9.0.0","@actions/http-client":"^4.0.0","@azure/storage-blob":"^12.30.0","@octokit/core":"^7.0.6","@octokit/plugin-request-log":"^6.0.0","@octokit/plugin-retry":"^8.0.0","@octokit/request":"^10.0.7","@octokit/request-error":"^7.1.0","@protobuf-ts/plugin":"^2.2.3-alpha.1","@protobuf-ts/runtime":"^2.9.4","archiver":"^7.0.1","jwt-decode":"^4.0.0","unzip-stream":"^0.3.1"},"devDependencies":{"@types/archiver":"^7.0.0","@types/unzip-stream":"^0.3.4","typedoc":"^0.28.16","typedoc-plugin-markdown":"^4.9.0","typescript":"^5.9.3"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}');
79222+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/artifact","version":"6.3.1","preview":true,"description":"Actions artifact lib","keywords":["github","actions","artifact"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/artifact","license":"MIT","type":"module","main":"lib/artifact.js","types":"lib/artifact.d.ts","exports":{".":{"types":"./lib/artifact.d.ts","import":"./lib/artifact.js"}},"directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/artifact"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"cd ../../ && npm run test ./packages/artifact","bootstrap":"cd ../../ && npm run bootstrap","tsc-run":"tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/","tsc":"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^3.0.1","@actions/github":"^9.1.1","@actions/http-client":"^4.0.1","@azure/storage-blob":"^12.31.0","@octokit/core":"^7.0.6","@octokit/plugin-request-log":"^6.0.0","@octokit/plugin-retry":"^8.1.0","@octokit/request":"^10.0.8","@octokit/request-error":"^7.1.0","@protobuf-ts/runtime":"^2.11.1","@protobuf-ts/runtime-rpc":"^2.11.1","archiver":"^7.0.1","jwt-decode":"^4.0.0","unzip-stream":"^0.3.1"},"devDependencies":{"@protobuf-ts/plugin":"^2.11.1","@types/archiver":"^7.0.0","@types/unzip-stream":"^0.3.4","typedoc":"^0.28.19","typedoc-plugin-markdown":"^4.11.0","typescript":"^5.9.3"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}');
7922379223

7922479224
/***/ })
7922579225

@@ -86690,7 +86690,7 @@ NetworkError.isNetworkErrorCode = (code) => {
8669086690
};
8669186691
class UsageError extends Error {
8669286692
constructor() {
86693-
const message = `Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`;
86693+
const message = `Artifact storage quota has been hit. Unable to upload any new artifacts.\nMore info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`;
8669486694
super(message);
8669586695
this.name = 'UsageError';
8669686696
}
@@ -86900,8 +86900,9 @@ var artifact_twirp_client_awaiter = (undefined && undefined.__awaiter) || functi
8690086900
class ArtifactHttpClient {
8690186901
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
8690286902
this.maxAttempts = 5;
86903-
this.baseRetryIntervalMilliseconds = 3000;
86903+
this.baseRetryIntervalMilliseconds = 8000;
8690486904
this.retryMultiplier = 1.5;
86905+
this.retryTimeoutMilliseconds = 120000;
8690586906
const token = getRuntimeToken();
8690686907
this.baseUrl = getResultsServiceUrl();
8690786908
if (maxAttempts) {
@@ -86940,11 +86941,16 @@ class ArtifactHttpClient {
8694086941
let attempt = 0;
8694186942
let errorMessage = '';
8694286943
let rawBody = '';
86944+
let totalRetryWaitMilliseconds = 0;
8694386945
while (attempt < this.maxAttempts) {
8694486946
let isRetryable = false;
86947+
let retryAfterSeconds;
8694586948
try {
8694686949
const response = yield operation();
8694786950
const statusCode = response.message.statusCode;
86951+
if (statusCode === HttpCodes.TooManyRequests) {
86952+
retryAfterSeconds = this.getRetryAfterSeconds(response);
86953+
}
8694886954
rawBody = yield response.readBody();
8694986955
core_debug(`[Response] - ${response.message.statusCode}`);
8695086956
core_debug(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
@@ -86982,9 +86988,16 @@ class ArtifactHttpClient {
8698286988
if (attempt + 1 === this.maxAttempts) {
8698386989
throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`);
8698486990
}
86985-
const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt);
86991+
const retryTimeMilliseconds = retryAfterSeconds !== undefined
86992+
? retryAfterSeconds * 1000
86993+
: this.getExponentialRetryTimeMilliseconds(attempt);
86994+
if (totalRetryWaitMilliseconds + retryTimeMilliseconds >
86995+
this.retryTimeoutMilliseconds) {
86996+
throw new Error(`Retry wait of ${retryTimeMilliseconds} ms would exceed the maximum total retry wait of ${this.retryTimeoutMilliseconds} ms: ${errorMessage}`);
86997+
}
8698686998
info(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`);
8698786999
yield this.sleep(retryTimeMilliseconds);
87000+
totalRetryWaitMilliseconds += retryTimeMilliseconds;
8698887001
attempt++;
8698987002
}
8699087003
throw new Error(`Request failed`);
@@ -87007,6 +87020,17 @@ class ArtifactHttpClient {
8700787020
];
8700887021
return retryableStatusCodes.includes(statusCode);
8700987022
}
87023+
// Only positive integer seconds are supported, not HTTP-date values.
87024+
getRetryAfterSeconds(response) {
87025+
var _a;
87026+
const header = response.message.headers['retry-after'];
87027+
const value = (_a = (Array.isArray(header) ? header[0] : header)) === null || _a === void 0 ? void 0 : _a.trim();
87028+
if (value === undefined || !/^\d+$/.test(value)) {
87029+
return undefined;
87030+
}
87031+
const parsed = parseInt(value, 10);
87032+
return !isNaN(parsed) && parsed > 0 ? parsed : undefined;
87033+
}
8701087034
sleep(milliseconds) {
8701187035
return artifact_twirp_client_awaiter(this, void 0, void 0, function* () {
8701287036
return new Promise(resolve => setTimeout(resolve, milliseconds));
@@ -126828,6 +126852,19 @@ function getProxyFetch(destinationUrl) {
126828126852
function getApiBaseUrl() {
126829126853
return process.env['GITHUB_API_URL'] || 'https://api.github.com';
126830126854
}
126855+
function getUserAgentWithOrchestrationId(baseUserAgent) {
126856+
var _a;
126857+
const orchId = (_a = process.env['ACTIONS_ORCHESTRATION_ID']) === null || _a === void 0 ? void 0 : _a.trim();
126858+
if (orchId) {
126859+
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
126860+
const tag = `actions_orchestration_id/${sanitizedId}`;
126861+
if (baseUserAgent === null || baseUserAgent === void 0 ? void 0 : baseUserAgent.includes(tag))
126862+
return baseUserAgent;
126863+
const ua = baseUserAgent ? `${baseUserAgent} ` : '';
126864+
return `${ua}${tag}`;
126865+
}
126866+
return baseUserAgent;
126867+
}
126831126868
//# sourceMappingURL=utils.js.map
126832126869
;// CONCATENATED MODULE: ./node_modules/universal-user-agent/index.js
126833126870
function getUserAgent() {
@@ -130924,6 +130961,7 @@ const utils_defaults = {
130924130961
}
130925130962
};
130926130963
const GitHub = Octokit.plugin(restEndpointMethods, paginateRest).defaults(utils_defaults);
130964+
130927130965
/**
130928130966
* Convience function to correctly format Octokit Options to pass into the constructor.
130929130967
*
@@ -130937,6 +130975,11 @@ function getOctokitOptions(token, options) {
130937130975
if (auth) {
130938130976
opts.auth = auth;
130939130977
}
130978+
// Orchestration ID
130979+
const userAgent = getUserAgentWithOrchestrationId(opts.userAgent);
130980+
if (userAgent) {
130981+
opts.userAgent = userAgent;
130982+
}
130940130983
return opts;
130941130984
}
130942130985
//# sourceMappingURL=utils.js.map
@@ -131038,13 +131081,17 @@ function streamExtractExternal(url_1, directory_1) {
131038131081
mimeType === 'application/zip-compressed' ||
131039131082
urlEndsWithZip;
131040131083
// Extract filename from Content-Disposition header
131084+
// Prefer filename* (RFC 5987) which supports UTF-8 encoded filenames,
131085+
// fall back to filename which may contain ASCII-only replacements
131041131086
const contentDisposition = response.message.headers['content-disposition'] || '';
131042131087
let fileName = 'artifact';
131043-
const filenameMatch = contentDisposition.match(/filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?/i);
131044-
if (filenameMatch && filenameMatch[1]) {
131088+
const filenameStar = contentDisposition.match(/filename\*\s*=\s*UTF-8''([^;\r\n]*)/i);
131089+
const filenamePlain = contentDisposition.match(/(?<!\*)filename\s*=\s*['"]?([^;\r\n"']*)['"]?/i);
131090+
const rawName = (filenameStar === null || filenameStar === void 0 ? void 0 : filenameStar[1]) || (filenamePlain === null || filenamePlain === void 0 ? void 0 : filenamePlain[1]);
131091+
if (rawName) {
131045131092
// Sanitize fileName to prevent path traversal attacks
131046131093
// Use path.basename to extract only the filename component
131047-
fileName = external_path_.basename(decodeURIComponent(filenameMatch[1].trim()));
131094+
fileName = external_path_.basename(decodeURIComponent(rawName.trim()));
131048131095
}
131049131096
core_debug(`Content-Type: ${contentType}, mimeType: ${mimeType}, urlEndsWithZip: ${urlEndsWithZip}, isZip: ${isZip}, skipDecompress: ${skipDecompress}`);
131050131097
core_debug(`Content-Disposition: ${contentDisposition}, fileName: ${fileName}`);

0 commit comments

Comments
 (0)