Fix merge conflicts with main

This commit is contained in:
Luc Perkins 2024-05-15 17:16:08 -03:00
commit 9243e9b760
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
5 changed files with 1132 additions and 2587 deletions

BIN
dist/amd64.tar.gz generated vendored Normal file

Binary file not shown.

BIN
dist/arm64.tar.gz generated vendored Normal file

Binary file not shown.

72
dist/index.js generated vendored
View file

@ -71491,7 +71491,7 @@ const {
staticPropertyDescriptors, staticPropertyDescriptors,
readOperation, readOperation,
fireAProgressEvent fireAProgressEvent
} = __nccwpck_require__(5579) } = __nccwpck_require__(2882)
const { const {
kState, kState,
kError, kError,
@ -71935,7 +71935,7 @@ module.exports = {
/***/ }), /***/ }),
/***/ 5579: /***/ 2882:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
@ -96376,7 +96376,9 @@ const got = source_create(defaults);
;// CONCATENATED MODULE: external "node:stream/promises" ;// CONCATENATED MODULE: external "node:stream/promises"
const external_node_stream_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream/promises"); const external_node_stream_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream/promises");
;// CONCATENATED MODULE: ./node_modules/.pnpm/github.com+DeterminateSystems+detsys-ts@cd38b227c4d6faca10aed591b1f8863ef7b93dce_nckxvs7jbq6qb4vr5xhgyxcrgy/node_modules/detsys-ts/dist/index.js ;// CONCATENATED MODULE: external "node:zlib"
const external_node_zlib_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib");
;// CONCATENATED MODULE: ./node_modules/.pnpm/github.com+DeterminateSystems+detsys-ts@2391ba1ef3d22027cd4d9ecce147007a88f63643_is35d24tynybsms6zejuqsabhi/node_modules/detsys-ts/dist/index.js
var __defProp = Object.defineProperty; var __defProp = Object.defineProperty;
var __export = (target, all) => { var __export = (target, all) => {
for (var name in all) for (var name in all)
@ -96722,22 +96724,30 @@ function getNixPlatform(archOs) {
// src/inputs.ts // src/inputs.ts
var inputs_exports = {}; var inputs_exports = {};
__export(inputs_exports, { __export(inputs_exports, {
getArrayOfStrings: () => getArrayOfStrings,
getBool: () => getBool, getBool: () => getBool,
getCommaSeparatedArrayOfStrings: () => getCommaSeparatedArrayOfStrings,
getMultilineStringOrNull: () => getMultilineStringOrNull, getMultilineStringOrNull: () => getMultilineStringOrNull,
getNumberOrNull: () => getNumberOrNull, getNumberOrNull: () => getNumberOrNull,
getString: () => getString, getString: () => getString,
getStringOrNull: () => getStringOrNull, getStringOrNull: () => getStringOrNull,
getStringOrUndefined: () => getStringOrUndefined getStringOrUndefined: () => getStringOrUndefined,
handleString: () => handleString
}); });
var getBool = (name) => { var getBool = (name) => {
return core.getBooleanInput(name); return core.getBooleanInput(name);
}; };
var getCommaSeparatedArrayOfStrings = (name, stripWhitespace) => { var getArrayOfStrings = (name, separator) => {
const strip = stripWhitespace ?? false;
const original = getString(name); const original = getString(name);
return (strip ? original.replace(/\s+/g, "") : original).split(","); return handleString(original, separator);
};
var handleString = (input, separator) => {
const sepChar = separator === "comma" ? "," : /\s+/;
const trimmed = input.trim();
if (trimmed === "") {
return [];
}
return trimmed.split(sepChar).map((s) => s.trim());
}; };
var getMultilineStringOrNull = (name) => { var getMultilineStringOrNull = (name) => {
const value = core.getMultilineInput(name); const value = core.getMultilineInput(name);
@ -96818,18 +96828,24 @@ function constructSourceParameters(legacyPrefix) {
var DEFAULT_IDS_HOST = "https://install.determinate.systems"; var DEFAULT_IDS_HOST = "https://install.determinate.systems";
var IDS_HOST = process.env["IDS_HOST"] ?? DEFAULT_IDS_HOST; var IDS_HOST = process.env["IDS_HOST"] ?? DEFAULT_IDS_HOST;
var EVENT_EXCEPTION = "exception"; var EVENT_EXCEPTION = "exception";
var EVENT_ARTIFACT_CACHE_HIT = "artifact_cache_hit"; var EVENT_ARTIFACT_CACHE_HIT = "artifact_cache_hit";
var EVENT_ARTIFACT_CACHE_MISS = "artifact_cache_miss"; var EVENT_ARTIFACT_CACHE_MISS = "artifact_cache_miss";
var EVENT_ARTIFACT_CACHE_PERSIST = "artifact_cache_persist";
var FACT_ENDED_WITH_EXCEPTION = "ended_with_exception"; var FACT_ENDED_WITH_EXCEPTION = "ended_with_exception";
var FACT_FINAL_EXCEPTION = "final_exception"; var FACT_FINAL_EXCEPTION = "final_exception";
var FACT_SOURCE_URL = "source_url";
var FACT_SOURCE_URL_ETAG = "source_url_etag";
var IdsToolbox = class { var IdsToolbox = class {
constructor(actionOptions) { constructor(actionOptions) {
this.actionOptions = makeOptionsConfident(actionOptions); this.actionOptions = makeOptionsConfident(actionOptions);
this.hookMain = void 0; this.hookMain = void 0;
this.hookPost = void 0; this.hookPost = void 0;
this.exceptionAttachments = /* @__PURE__ */ new Map();
this.events = []; this.events = [];
this.client = got_dist_source.extend({ this.client = got_dist_source.extend({
retry: { retry: {
@ -96908,6 +96924,17 @@ var IdsToolbox = class {
); );
this.recordEvent(`begin_${this.executionPhase}`); this.recordEvent(`begin_${this.executionPhase}`);
} }
/**
* Attach a file to the diagnostics data in error conditions.
*
* The file at `location` doesn't need to exist when stapleFile is called.
*
* If the file doesn't exist or is unreadable when trying to staple the attachments, the JS error will be stored in a context value at `staple_failure_{name}`.
* If the file is readable, the file's contents will be stored in a context value at `staple_value_{name}`.
*/
stapleFile(name, location) {
this.exceptionAttachments.set(name, location);
}
onMain(callback) { onMain(callback) {
this.hookMain = callback; this.hookMain = callback;
} }
@ -96920,6 +96947,9 @@ var IdsToolbox = class {
process.exitCode = 1; process.exitCode = 1;
}); });
} }
stringifyError(error2) {
return error2 instanceof Error || typeof error2 == "string" ? error2.toString() : JSON.stringify(error2);
}
async executeAsync() { async executeAsync() {
try { try {
process.env.DETSYS_CORRELATION = JSON.stringify( process.env.DETSYS_CORRELATION = JSON.stringify(
@ -96937,14 +96967,31 @@ var IdsToolbox = class {
this.addFact(FACT_ENDED_WITH_EXCEPTION, false); this.addFact(FACT_ENDED_WITH_EXCEPTION, false);
} catch (error2) { } catch (error2) {
this.addFact(FACT_ENDED_WITH_EXCEPTION, true); this.addFact(FACT_ENDED_WITH_EXCEPTION, true);
const reportable = error2 instanceof Error || typeof error2 == "string" ? error2.toString() : JSON.stringify(error2); const reportable = this.stringifyError(error2);
this.addFact(FACT_FINAL_EXCEPTION, reportable); this.addFact(FACT_FINAL_EXCEPTION, reportable);
if (this.executionPhase === "post") { if (this.executionPhase === "post") {
core.warning(reportable); core.warning(reportable);
} else { } else {
core.setFailed(reportable); core.setFailed(reportable);
} }
this.recordEvent(EVENT_EXCEPTION); const do_gzip = (0,external_node_util_.promisify)(external_node_zlib_namespaceObject.gzip);
const exceptionContext = /* @__PURE__ */ new Map();
for (const [attachmentLabel, filePath] of this.exceptionAttachments) {
try {
const logText = (0,external_node_fs_namespaceObject.readFileSync)(filePath);
const buf = await do_gzip(logText);
exceptionContext.set(
`staple_value_${attachmentLabel}`,
buf.toString("base64")
);
} catch (e) {
exceptionContext.set(
`staple_failure_${attachmentLabel}`,
this.stringifyError(e)
);
}
}
this.recordEvent(EVENT_EXCEPTION, Object.fromEntries(exceptionContext));
} finally { } finally {
await this.complete(); await this.complete();
} }
@ -96986,6 +97033,7 @@ var IdsToolbox = class {
const versionCheckup = await this.client.head(correlatedUrl); const versionCheckup = await this.client.head(correlatedUrl);
if (versionCheckup.headers.etag) { if (versionCheckup.headers.etag) {
const v = versionCheckup.headers.etag; const v = versionCheckup.headers.etag;
this.addFact(FACT_SOURCE_URL_ETAG, v);
core.debug( core.debug(
`Checking the tool cache for ${this.getUrl()} at ${v}` `Checking the tool cache for ${this.getUrl()} at ${v}`
); );
@ -97034,6 +97082,7 @@ var IdsToolbox = class {
getUrl() { getUrl() {
const p = this.sourceParameters; const p = this.sourceParameters;
if (p.url) { if (p.url) {
this.addFact(FACT_SOURCE_URL, p.url);
return new URL(p.url); return new URL(p.url);
} }
const fetchUrl = new URL(IDS_HOST); const fetchUrl = new URL(IDS_HOST);
@ -97050,6 +97099,7 @@ var IdsToolbox = class {
fetchUrl.pathname += `/stable`; fetchUrl.pathname += `/stable`;
} }
fetchUrl.pathname += `/${this.architectureFetchSuffix}`; fetchUrl.pathname += `/${this.architectureFetchSuffix}`;
this.addFact(FACT_SOURCE_URL, fetchUrl.toString());
return fetchUrl; return fetchUrl;
} }
cacheKey(version2) { cacheKey(version2) {
@ -97097,7 +97147,7 @@ var IdsToolbox = class {
void 0, void 0,
true true
); );
this.recordEvent(EVENT_ARTIFACT_CACHE_HIT); this.recordEvent(EVENT_ARTIFACT_CACHE_PERSIST);
} finally { } finally {
process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP;
delete process.env.GITHUB_WORKSPACE_BACKUP; delete process.env.GITHUB_WORKSPACE_BACKUP;

View file

@ -33,7 +33,7 @@
}, },
"devDependencies": { "devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0", "@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.12.8", "@types/node": "^20.12.11",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/eslint-plugin": "^7.8.0",
"@vercel/ncc": "^0.38.1", "@vercel/ncc": "^0.38.1",

File diff suppressed because it is too large Load diff