mirror of
https://github.com/DeterminateSystems/nix-installer-action.git
synced 2024-12-23 13:32:06 +01:00
Fix merge conflicts with main
This commit is contained in:
commit
9243e9b760
5 changed files with 1132 additions and 2587 deletions
BIN
dist/amd64.tar.gz
generated
vendored
Normal file
BIN
dist/amd64.tar.gz
generated
vendored
Normal file
Binary file not shown.
BIN
dist/arm64.tar.gz
generated
vendored
Normal file
BIN
dist/arm64.tar.gz
generated
vendored
Normal file
Binary file not shown.
72
dist/index.js
generated
vendored
72
dist/index.js
generated
vendored
|
@ -71491,7 +71491,7 @@ const {
|
|||
staticPropertyDescriptors,
|
||||
readOperation,
|
||||
fireAProgressEvent
|
||||
} = __nccwpck_require__(5579)
|
||||
} = __nccwpck_require__(2882)
|
||||
const {
|
||||
kState,
|
||||
kError,
|
||||
|
@ -71935,7 +71935,7 @@ module.exports = {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5579:
|
||||
/***/ 2882:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
|
||||
|
@ -96376,7 +96376,9 @@ const got = source_create(defaults);
|
|||
|
||||
;// CONCATENATED MODULE: external "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 __export = (target, all) => {
|
||||
for (var name in all)
|
||||
|
@ -96722,22 +96724,30 @@ function getNixPlatform(archOs) {
|
|||
// src/inputs.ts
|
||||
var inputs_exports = {};
|
||||
__export(inputs_exports, {
|
||||
getArrayOfStrings: () => getArrayOfStrings,
|
||||
getBool: () => getBool,
|
||||
getCommaSeparatedArrayOfStrings: () => getCommaSeparatedArrayOfStrings,
|
||||
getMultilineStringOrNull: () => getMultilineStringOrNull,
|
||||
getNumberOrNull: () => getNumberOrNull,
|
||||
getString: () => getString,
|
||||
getStringOrNull: () => getStringOrNull,
|
||||
getStringOrUndefined: () => getStringOrUndefined
|
||||
getStringOrUndefined: () => getStringOrUndefined,
|
||||
handleString: () => handleString
|
||||
});
|
||||
|
||||
var getBool = (name) => {
|
||||
return core.getBooleanInput(name);
|
||||
};
|
||||
var getCommaSeparatedArrayOfStrings = (name, stripWhitespace) => {
|
||||
const strip = stripWhitespace ?? false;
|
||||
var getArrayOfStrings = (name, separator) => {
|
||||
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) => {
|
||||
const value = core.getMultilineInput(name);
|
||||
|
@ -96818,18 +96828,24 @@ function constructSourceParameters(legacyPrefix) {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
var DEFAULT_IDS_HOST = "https://install.determinate.systems";
|
||||
var IDS_HOST = process.env["IDS_HOST"] ?? DEFAULT_IDS_HOST;
|
||||
var EVENT_EXCEPTION = "exception";
|
||||
var EVENT_ARTIFACT_CACHE_HIT = "artifact_cache_hit";
|
||||
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_FINAL_EXCEPTION = "final_exception";
|
||||
var FACT_SOURCE_URL = "source_url";
|
||||
var FACT_SOURCE_URL_ETAG = "source_url_etag";
|
||||
var IdsToolbox = class {
|
||||
constructor(actionOptions) {
|
||||
this.actionOptions = makeOptionsConfident(actionOptions);
|
||||
this.hookMain = void 0;
|
||||
this.hookPost = void 0;
|
||||
this.exceptionAttachments = /* @__PURE__ */ new Map();
|
||||
this.events = [];
|
||||
this.client = got_dist_source.extend({
|
||||
retry: {
|
||||
|
@ -96908,6 +96924,17 @@ var IdsToolbox = class {
|
|||
);
|
||||
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) {
|
||||
this.hookMain = callback;
|
||||
}
|
||||
|
@ -96920,6 +96947,9 @@ var IdsToolbox = class {
|
|||
process.exitCode = 1;
|
||||
});
|
||||
}
|
||||
stringifyError(error2) {
|
||||
return error2 instanceof Error || typeof error2 == "string" ? error2.toString() : JSON.stringify(error2);
|
||||
}
|
||||
async executeAsync() {
|
||||
try {
|
||||
process.env.DETSYS_CORRELATION = JSON.stringify(
|
||||
|
@ -96937,14 +96967,31 @@ var IdsToolbox = class {
|
|||
this.addFact(FACT_ENDED_WITH_EXCEPTION, false);
|
||||
} catch (error2) {
|
||||
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);
|
||||
if (this.executionPhase === "post") {
|
||||
core.warning(reportable);
|
||||
} else {
|
||||
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 {
|
||||
await this.complete();
|
||||
}
|
||||
|
@ -96986,6 +97033,7 @@ var IdsToolbox = class {
|
|||
const versionCheckup = await this.client.head(correlatedUrl);
|
||||
if (versionCheckup.headers.etag) {
|
||||
const v = versionCheckup.headers.etag;
|
||||
this.addFact(FACT_SOURCE_URL_ETAG, v);
|
||||
core.debug(
|
||||
`Checking the tool cache for ${this.getUrl()} at ${v}`
|
||||
);
|
||||
|
@ -97034,6 +97082,7 @@ var IdsToolbox = class {
|
|||
getUrl() {
|
||||
const p = this.sourceParameters;
|
||||
if (p.url) {
|
||||
this.addFact(FACT_SOURCE_URL, p.url);
|
||||
return new URL(p.url);
|
||||
}
|
||||
const fetchUrl = new URL(IDS_HOST);
|
||||
|
@ -97050,6 +97099,7 @@ var IdsToolbox = class {
|
|||
fetchUrl.pathname += `/stable`;
|
||||
}
|
||||
fetchUrl.pathname += `/${this.architectureFetchSuffix}`;
|
||||
this.addFact(FACT_SOURCE_URL, fetchUrl.toString());
|
||||
return fetchUrl;
|
||||
}
|
||||
cacheKey(version2) {
|
||||
|
@ -97097,7 +97147,7 @@ var IdsToolbox = class {
|
|||
void 0,
|
||||
true
|
||||
);
|
||||
this.recordEvent(EVENT_ARTIFACT_CACHE_HIT);
|
||||
this.recordEvent(EVENT_ARTIFACT_CACHE_PERSIST);
|
||||
} finally {
|
||||
process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP;
|
||||
delete process.env.GITHUB_WORKSPACE_BACKUP;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/node": "^20.12.8",
|
||||
"@types/node": "^20.12.11",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
|
|
3585
pnpm-lock.yaml
3585
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue