mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-26 09:20:35 +01:00
Regenerate dist
This commit is contained in:
parent
2bbd28e8bb
commit
9c05cb9999
1 changed files with 81 additions and 28 deletions
109
dist/index.js
generated
vendored
109
dist/index.js
generated
vendored
|
@ -47866,7 +47866,7 @@ module.exports = (options = {}, connect = tls.connect) => new Promise((resolve,
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 1538:
|
/***/ 4438:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
;(function (sax) { // wrapper for non-node envs
|
;(function (sax) { // wrapper for non-node envs
|
||||||
|
@ -47942,6 +47942,12 @@ module.exports = (options = {}, connect = tls.connect) => new Promise((resolve,
|
||||||
parser.ns = Object.create(rootNS)
|
parser.ns = Object.create(rootNS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// disallow unquoted attribute values if not otherwise configured
|
||||||
|
// and strict mode is true
|
||||||
|
if (parser.opt.unquotedAttributeValues === undefined) {
|
||||||
|
parser.opt.unquotedAttributeValues = !strict;
|
||||||
|
}
|
||||||
|
|
||||||
// mostly just for error reporting
|
// mostly just for error reporting
|
||||||
parser.trackPosition = parser.opt.position !== false
|
parser.trackPosition = parser.opt.position !== false
|
||||||
if (parser.trackPosition) {
|
if (parser.trackPosition) {
|
||||||
|
@ -48961,15 +48967,22 @@ module.exports = (options = {}, connect = tls.connect) => new Promise((resolve,
|
||||||
continue
|
continue
|
||||||
|
|
||||||
case S.SGML_DECL:
|
case S.SGML_DECL:
|
||||||
if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
|
if (parser.sgmlDecl + c === '--') {
|
||||||
|
parser.state = S.COMMENT
|
||||||
|
parser.comment = ''
|
||||||
|
parser.sgmlDecl = ''
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parser.doctype && parser.doctype !== true && parser.sgmlDecl) {
|
||||||
|
parser.state = S.DOCTYPE_DTD
|
||||||
|
parser.doctype += '<!' + parser.sgmlDecl + c
|
||||||
|
parser.sgmlDecl = ''
|
||||||
|
} else if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
|
||||||
emitNode(parser, 'onopencdata')
|
emitNode(parser, 'onopencdata')
|
||||||
parser.state = S.CDATA
|
parser.state = S.CDATA
|
||||||
parser.sgmlDecl = ''
|
parser.sgmlDecl = ''
|
||||||
parser.cdata = ''
|
parser.cdata = ''
|
||||||
} else if (parser.sgmlDecl + c === '--') {
|
|
||||||
parser.state = S.COMMENT
|
|
||||||
parser.comment = ''
|
|
||||||
parser.sgmlDecl = ''
|
|
||||||
} else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
|
} else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
|
||||||
parser.state = S.DOCTYPE
|
parser.state = S.DOCTYPE
|
||||||
if (parser.doctype || parser.sawRoot) {
|
if (parser.doctype || parser.sawRoot) {
|
||||||
|
@ -49023,12 +49036,18 @@ module.exports = (options = {}, connect = tls.connect) => new Promise((resolve,
|
||||||
continue
|
continue
|
||||||
|
|
||||||
case S.DOCTYPE_DTD:
|
case S.DOCTYPE_DTD:
|
||||||
parser.doctype += c
|
|
||||||
if (c === ']') {
|
if (c === ']') {
|
||||||
|
parser.doctype += c
|
||||||
parser.state = S.DOCTYPE
|
parser.state = S.DOCTYPE
|
||||||
|
} else if (c === '<') {
|
||||||
|
parser.state = S.OPEN_WAKA
|
||||||
|
parser.startTagPosition = parser.position
|
||||||
} else if (isQuote(c)) {
|
} else if (isQuote(c)) {
|
||||||
|
parser.doctype += c
|
||||||
parser.state = S.DOCTYPE_DTD_QUOTED
|
parser.state = S.DOCTYPE_DTD_QUOTED
|
||||||
parser.q = c
|
parser.q = c
|
||||||
|
} else {
|
||||||
|
parser.doctype += c
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -49069,6 +49088,8 @@ module.exports = (options = {}, connect = tls.connect) => new Promise((resolve,
|
||||||
// which is a comment of " blah -- bloo "
|
// which is a comment of " blah -- bloo "
|
||||||
parser.comment += '--' + c
|
parser.comment += '--' + c
|
||||||
parser.state = S.COMMENT
|
parser.state = S.COMMENT
|
||||||
|
} else if (parser.doctype && parser.doctype !== true) {
|
||||||
|
parser.state = S.DOCTYPE_DTD
|
||||||
} else {
|
} else {
|
||||||
parser.state = S.TEXT
|
parser.state = S.TEXT
|
||||||
}
|
}
|
||||||
|
@ -49236,7 +49257,9 @@ module.exports = (options = {}, connect = tls.connect) => new Promise((resolve,
|
||||||
parser.q = c
|
parser.q = c
|
||||||
parser.state = S.ATTRIB_VALUE_QUOTED
|
parser.state = S.ATTRIB_VALUE_QUOTED
|
||||||
} else {
|
} else {
|
||||||
strictFail(parser, 'Unquoted attribute value')
|
if (!parser.opt.unquotedAttributeValues) {
|
||||||
|
error(parser, 'Unquoted attribute value')
|
||||||
|
}
|
||||||
parser.state = S.ATTRIB_VALUE_UNQUOTED
|
parser.state = S.ATTRIB_VALUE_UNQUOTED
|
||||||
parser.attribValue = c
|
parser.attribValue = c
|
||||||
}
|
}
|
||||||
|
@ -49354,13 +49377,13 @@ module.exports = (options = {}, connect = tls.connect) => new Promise((resolve,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c === ';') {
|
if (c === ';') {
|
||||||
if (parser.opt.unparsedEntities) {
|
var parsedEntity = parseEntity(parser)
|
||||||
var parsedEntity = parseEntity(parser)
|
if (parser.opt.unparsedEntities && !Object.values(sax.XML_ENTITIES).includes(parsedEntity)) {
|
||||||
parser.entity = ''
|
parser.entity = ''
|
||||||
parser.state = returnState
|
parser.state = returnState
|
||||||
parser.write(parsedEntity)
|
parser.write(parsedEntity)
|
||||||
} else {
|
} else {
|
||||||
parser[buffer] += parseEntity(parser)
|
parser[buffer] += parsedEntity
|
||||||
parser.entity = ''
|
parser.entity = ''
|
||||||
parser.state = returnState
|
parser.state = returnState
|
||||||
}
|
}
|
||||||
|
@ -77490,7 +77513,7 @@ module.exports.implForWrapper = function (wrapper) {
|
||||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||||
hasProp = {}.hasOwnProperty;
|
hasProp = {}.hasOwnProperty;
|
||||||
|
|
||||||
sax = __nccwpck_require__(1538);
|
sax = __nccwpck_require__(4438);
|
||||||
|
|
||||||
events = __nccwpck_require__(2361);
|
events = __nccwpck_require__(2361);
|
||||||
|
|
||||||
|
@ -94066,7 +94089,7 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
||||||
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: external "node:zlib"
|
;// CONCATENATED MODULE: external "node:zlib"
|
||||||
const external_node_zlib_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("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@a089656286a58dc6767247181b5280826f20473a_q6benjgi5pgerrbnqocqupyoxq/node_modules/detsys-ts/dist/index.js
|
;// CONCATENATED MODULE: ./node_modules/.pnpm/github.com+DeterminateSystems+detsys-ts@5fcb0532d85556ebc2de286e483885976531339d_uqngfub4ls4loys67iy653x57e/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)
|
||||||
|
@ -94374,6 +94397,7 @@ function hashEnvironmentVariables(prefix, variables) {
|
||||||
var inputs_exports = {};
|
var inputs_exports = {};
|
||||||
__export(inputs_exports, {
|
__export(inputs_exports, {
|
||||||
getArrayOfStrings: () => getArrayOfStrings,
|
getArrayOfStrings: () => getArrayOfStrings,
|
||||||
|
getArrayOfStringsOrNull: () => getArrayOfStringsOrNull,
|
||||||
getBool: () => getBool,
|
getBool: () => getBool,
|
||||||
getMultilineStringOrNull: () => getMultilineStringOrNull,
|
getMultilineStringOrNull: () => getMultilineStringOrNull,
|
||||||
getNumberOrNull: () => getNumberOrNull,
|
getNumberOrNull: () => getNumberOrNull,
|
||||||
|
@ -94390,6 +94414,14 @@ var getArrayOfStrings = (name, separator) => {
|
||||||
const original = getString(name);
|
const original = getString(name);
|
||||||
return handleString(original, separator);
|
return handleString(original, separator);
|
||||||
};
|
};
|
||||||
|
var getArrayOfStringsOrNull = (name, separator) => {
|
||||||
|
const original = getStringOrNull(name);
|
||||||
|
if (original === null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return handleString(original, separator);
|
||||||
|
}
|
||||||
|
};
|
||||||
var handleString = (input, separator) => {
|
var handleString = (input, separator) => {
|
||||||
const sepChar = separator === "comma" ? "," : /\s+/;
|
const sepChar = separator === "comma" ? "," : /\s+/;
|
||||||
const trimmed = input.trim();
|
const trimmed = input.trim();
|
||||||
|
@ -94521,6 +94553,19 @@ function noisilyGetInput(suffix, legacyPrefix) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// src/errors.ts
|
||||||
|
function stringifyError(e) {
|
||||||
|
if (e instanceof Error) {
|
||||||
|
return e.message;
|
||||||
|
} else if (typeof e === "string") {
|
||||||
|
return e;
|
||||||
|
} else {
|
||||||
|
return JSON.stringify(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// src/index.ts
|
||||||
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";
|
||||||
|
@ -94528,6 +94573,7 @@ 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 EVENT_ARTIFACT_CACHE_PERSIST = "artifact_cache_persist";
|
||||||
var EVENT_PREFLIGHT_REQUIRE_NIX_DENIED = "preflight-require-nix-denied";
|
var EVENT_PREFLIGHT_REQUIRE_NIX_DENIED = "preflight-require-nix-denied";
|
||||||
|
var FACT_ARTIFACT_FETCHED_FROM_CACHE = "artifact_fetched_from_cache";
|
||||||
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_OS = "$os";
|
var FACT_OS = "$os";
|
||||||
|
@ -94542,6 +94588,7 @@ var FACT_NIX_STORE_CHECK_ERROR = "nix_store_check_error";
|
||||||
var STATE_KEY_EXECUTION_PHASE = "detsys_action_execution_phase";
|
var STATE_KEY_EXECUTION_PHASE = "detsys_action_execution_phase";
|
||||||
var STATE_KEY_NIX_NOT_FOUND = "detsys_action_nix_not_found";
|
var STATE_KEY_NIX_NOT_FOUND = "detsys_action_nix_not_found";
|
||||||
var STATE_NOT_FOUND = "not-found";
|
var STATE_NOT_FOUND = "not-found";
|
||||||
|
var DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 3e4;
|
||||||
var DetSysAction = class {
|
var DetSysAction = class {
|
||||||
determineExecutionPhase() {
|
determineExecutionPhase() {
|
||||||
const currentPhase = core.getState(STATE_KEY_EXECUTION_PHASE);
|
const currentPhase = core.getState(STATE_KEY_EXECUTION_PHASE);
|
||||||
|
@ -94607,7 +94654,7 @@ var DetSysAction = class {
|
||||||
}
|
}
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
core.debug(
|
core.debug(
|
||||||
`Failure getting platform details: ${stringifyError(e)}`
|
`Failure getting platform details: ${stringifyError2(e)}`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -94724,7 +94771,7 @@ var DetSysAction = class {
|
||||||
this.addFact(FACT_ENDED_WITH_EXCEPTION, false);
|
this.addFact(FACT_ENDED_WITH_EXCEPTION, false);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.addFact(FACT_ENDED_WITH_EXCEPTION, true);
|
this.addFact(FACT_ENDED_WITH_EXCEPTION, true);
|
||||||
const reportable = stringifyError(e);
|
const reportable = stringifyError2(e);
|
||||||
this.addFact(FACT_FINAL_EXCEPTION, reportable);
|
this.addFact(FACT_FINAL_EXCEPTION, reportable);
|
||||||
if (this.isPost) {
|
if (this.isPost) {
|
||||||
core.warning(reportable);
|
core.warning(reportable);
|
||||||
|
@ -94744,7 +94791,7 @@ var DetSysAction = class {
|
||||||
} catch (innerError) {
|
} catch (innerError) {
|
||||||
exceptionContext.set(
|
exceptionContext.set(
|
||||||
`staple_failure_${attachmentLabel}`,
|
`staple_failure_${attachmentLabel}`,
|
||||||
stringifyError(innerError)
|
stringifyError2(innerError)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94754,8 +94801,11 @@ var DetSysAction = class {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fetch an artifact, such as a tarball, from the URL determined by the
|
* Fetch an artifact, such as a tarball, from the location determined by the
|
||||||
* `source-*` inputs.
|
* `source-*` inputs. If `source-binary` is specified, this will return a path
|
||||||
|
* to a binary on disk; otherwise, the artifact will be downloaded from the
|
||||||
|
* URL determined by the other `source-*` inputs (`source-url`, `source-pr`,
|
||||||
|
* etc.).
|
||||||
*/
|
*/
|
||||||
async fetchArtifact() {
|
async fetchArtifact() {
|
||||||
const sourceBinary = getStringOrNull("source-binary");
|
const sourceBinary = getStringOrNull("source-binary");
|
||||||
|
@ -94783,12 +94833,12 @@ var DetSysAction = class {
|
||||||
);
|
);
|
||||||
const cached = await this.getCachedVersion(v);
|
const cached = await this.getCachedVersion(v);
|
||||||
if (cached) {
|
if (cached) {
|
||||||
this.facts["artifact_fetched_from_cache"] = true;
|
this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = true;
|
||||||
core.debug(`Tool cache hit.`);
|
core.debug(`Tool cache hit.`);
|
||||||
return cached;
|
return cached;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.facts["artifact_fetched_from_cache"] = false;
|
this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = false;
|
||||||
core.debug(
|
core.debug(
|
||||||
`No match from the cache, re-fetching from the redirect: ${versionCheckup.url}`
|
`No match from the cache, re-fetching from the redirect: ${versionCheckup.url}`
|
||||||
);
|
);
|
||||||
|
@ -94806,7 +94856,7 @@ var DetSysAction = class {
|
||||||
try {
|
try {
|
||||||
await this.saveCachedVersion(v, destFile);
|
await this.saveCachedVersion(v, destFile);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.debug(`Error caching the artifact: ${stringifyError(e)}`);
|
core.debug(`Error caching the artifact: ${stringifyError2(e)}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return destFile;
|
return destFile;
|
||||||
|
@ -94985,7 +95035,7 @@ var DetSysAction = class {
|
||||||
}
|
}
|
||||||
this.addFact(FACT_NIX_STORE_VERSION, JSON.stringify(parsed.version));
|
this.addFact(FACT_NIX_STORE_VERSION, JSON.stringify(parsed.version));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.addFact(FACT_NIX_STORE_CHECK_ERROR, stringifyError(e));
|
this.addFact(FACT_NIX_STORE_CHECK_ERROR, stringifyError2(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async submitEvents() {
|
async submitEvents() {
|
||||||
|
@ -95003,17 +95053,20 @@ var DetSysAction = class {
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
await this.client.post(this.actionOptions.diagnosticsUrl, {
|
await this.client.post(this.actionOptions.diagnosticsUrl, {
|
||||||
json: batch
|
json: batch,
|
||||||
|
timeout: {
|
||||||
|
request: DIAGNOSTIC_ENDPOINT_TIMEOUT_MS
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.debug(
|
core.debug(
|
||||||
`Error submitting diagnostics event: ${stringifyError(e)}`
|
`Error submitting diagnostics event: ${stringifyError2(e)}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
this.events = [];
|
this.events = [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function stringifyError(error2) {
|
function stringifyError2(error2) {
|
||||||
return error2 instanceof Error || typeof error2 == "string" ? error2.toString() : JSON.stringify(error2);
|
return error2 instanceof Error || typeof error2 == "string" ? error2.toString() : JSON.stringify(error2);
|
||||||
}
|
}
|
||||||
function makeOptionsConfident(actionOptions) {
|
function makeOptionsConfident(actionOptions) {
|
||||||
|
@ -95051,7 +95104,7 @@ function determineDiagnosticsUrl(idsProjectName, urlOption) {
|
||||||
return mungeDiagnosticEndpoint(new URL(providedDiagnosticEndpoint));
|
return mungeDiagnosticEndpoint(new URL(providedDiagnosticEndpoint));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.info(
|
core.info(
|
||||||
`User-provided diagnostic endpoint ignored: not a valid URL: ${stringifyError(e)}`
|
`User-provided diagnostic endpoint ignored: not a valid URL: ${stringifyError2(e)}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95063,7 +95116,7 @@ function determineDiagnosticsUrl(idsProjectName, urlOption) {
|
||||||
return diagnosticUrl;
|
return diagnosticUrl;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.info(
|
core.info(
|
||||||
`Generated diagnostic endpoint ignored: not a valid URL: ${stringifyError(e)}`
|
`Generated diagnostic endpoint ignored: not a valid URL: ${stringifyError2(e)}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return void 0;
|
return void 0;
|
||||||
|
@ -95085,7 +95138,7 @@ function mungeDiagnosticEndpoint(inputUrl) {
|
||||||
return inputUrl;
|
return inputUrl;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.info(
|
core.info(
|
||||||
`Default or overridden IDS host isn't a valid URL: ${stringifyError(e)}`
|
`Default or overridden IDS host isn't a valid URL: ${stringifyError2(e)}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return inputUrl;
|
return inputUrl;
|
||||||
|
|
Loading…
Reference in a new issue