diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 074ac65..921de01 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,4 +17,3 @@ updates: npm-deps: patterns: - '*' - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0d76a6..0aa18ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,23 +9,30 @@ on: jobs: checks: name: Run all checks - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - uses: DeterminateSystems/determinate-nix-action@v3 - uses: DeterminateSystems/flakehub-cache-action@main + + - name: Check Nix formatting + run: git ls-files '*.nix' | xargs nix develop --command nixfmt --check + - name: Install pnpm dependencies run: nix develop --command pnpm install - - name: Check formatting - run: nix develop --command pnpm run check-fmt + - name: Lint run: nix develop --command pnpm run lint + - name: Run test suite run: nix develop --command pnpm run test + - name: Build run: nix develop --command pnpm run build + - name: Check git status run: git status --porcelain=v1 + - name: Ensure no staged changes run: git diff --exit-code diff --git a/dist/chunk-CTAAG5j7.js b/dist/chunk-CTAAG5j7.js new file mode 100644 index 0000000..be39ef9 --- /dev/null +++ b/dist/chunk-CTAAG5j7.js @@ -0,0 +1,13 @@ +//#region rolldown:runtime +var __defProp = Object.defineProperty; +var __export = (all) => { + let target = {}; + for (var name in all) __defProp(target, name, { + get: all[name], + enumerable: true + }); + return target; +}; + +//#endregion +export { __export }; \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index 90bdd07..01adf5c 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,90 +1,94 @@ -import { Got } from 'got'; -import { UUID } from 'node:crypto'; +import { UUID } from "node:crypto"; +import { Got } from "got"; +//#region src/check-in.d.ts type CheckIn = { - status: StatusSummary | null; - options: { - [k: string]: Feature; - }; + status: StatusSummary | null; + options: { + [k: string]: Feature; + }; }; type StatusSummary = { - page: Page; - incidents: Incident[]; - scheduled_maintenances: Maintenance[]; + page: Page; + incidents: Incident[]; + scheduled_maintenances: Maintenance[]; }; type Page = { - name: string; - url: string; + name: string; + url: string; }; type Incident = { - name: string; - status: string; - impact: string; - shortlink: string; + name: string; + status: string; + impact: string; + shortlink: string; }; type Maintenance = { - name: string; - status: string; - impact: string; - shortlink: string; - scheduled_for: string; - scheduled_until: string; + name: string; + status: string; + impact: string; + shortlink: string; + scheduled_for: string; + scheduled_until: string; }; type Feature = { - variant: boolean | string; - payload?: string; + variant: boolean | string; + payload?: string; }; - +//#endregion +//#region src/correlation.d.ts /** * JSON sent to server. */ type AnonymizedCorrelationHashes = { - $anon_distinct_id: string; - $groups: Record; - $session_id?: string; - correlation_source: string; - github_repository_hash?: string; - github_workflow_hash?: string; - github_workflow_job_hash?: string; - github_workflow_run_differentiator_hash?: string; - github_workflow_run_hash?: string; - is_ci: boolean; + $anon_distinct_id: string; + $groups: Record; + $session_id?: string; + correlation_source: string; + github_repository_hash?: string; + github_workflow_hash?: string; + github_workflow_job_hash?: string; + github_workflow_run_differentiator_hash?: string; + github_workflow_run_hash?: string; + is_ci: boolean; }; - +//#endregion +//#region src/errors.d.ts /** * Coerce a value of type `unknown` into a string. */ declare function stringifyError(e: unknown): string; - +//#endregion +//#region src/ids-host.d.ts /** * Host information for install.determinate.systems. */ declare class IdsHost { - private idsProjectName; - private diagnosticsSuffix?; - private runtimeDiagnosticsUrl?; - private prioritizedURLs?; - private client?; - constructor(idsProjectName: string, diagnosticsSuffix: string | undefined, runtimeDiagnosticsUrl: string | undefined); - getGot(recordFailoverCallback?: (incitingError: unknown, prevUrl: URL, nextUrl: URL) => void): Promise; - markCurrentHostBroken(): void; - setPrioritizedUrls(urls: URL[]): void; - isUrlSubjectToDynamicUrls(url: URL): boolean; - getDynamicRootUrl(): Promise; - getRootUrl(): Promise; - getDiagnosticsUrl(): Promise; - private getUrlsByPreference; + private idsProjectName; + private diagnosticsSuffix?; + private runtimeDiagnosticsUrl?; + private prioritizedURLs?; + private client?; + constructor(idsProjectName: string, diagnosticsSuffix: string | undefined, runtimeDiagnosticsUrl: string | undefined); + getGot(recordFailoverCallback?: (incitingError: unknown, prevUrl: URL, nextUrl: URL) => void): Promise; + markCurrentHostBroken(): void; + setPrioritizedUrls(urls: URL[]): void; + isUrlSubjectToDynamicUrls(url: URL): boolean; + getDynamicRootUrl(): Promise; + getRootUrl(): Promise; + getDiagnosticsUrl(): Promise; + private getUrlsByPreference; } - +//#endregion +//#region src/sourcedef.d.ts type SourceDef = { - path?: string; - url?: string; - tag?: string; - pr?: string; - branch?: string; - revision?: string; + path?: string; + url?: string; + tag?: string; + pr?: string; + branch?: string; + revision?: string; }; - /** * Get a Boolean input from the Action's configuration by name. */ @@ -127,22 +131,6 @@ declare const getStringOrNull: (name: string) => string | null; * Get a string input from the Action's configuration by name or return `undefined` if not set. */ declare const getStringOrUndefined: (name: string) => string | undefined; - -type inputs_Separator = Separator; -declare const inputs_getArrayOfStrings: typeof getArrayOfStrings; -declare const inputs_getArrayOfStringsOrNull: typeof getArrayOfStringsOrNull; -declare const inputs_getBool: typeof getBool; -declare const inputs_getBoolOrUndefined: typeof getBoolOrUndefined; -declare const inputs_getMultilineStringOrNull: typeof getMultilineStringOrNull; -declare const inputs_getNumberOrNull: typeof getNumberOrNull; -declare const inputs_getString: typeof getString; -declare const inputs_getStringOrNull: typeof getStringOrNull; -declare const inputs_getStringOrUndefined: typeof getStringOrUndefined; -declare const inputs_handleString: typeof handleString; -declare namespace inputs { - export { type inputs_Separator as Separator, inputs_getArrayOfStrings as getArrayOfStrings, inputs_getArrayOfStringsOrNull as getArrayOfStringsOrNull, inputs_getBool as getBool, inputs_getBoolOrUndefined as getBoolOrUndefined, inputs_getMultilineStringOrNull as getMultilineStringOrNull, inputs_getNumberOrNull as getNumberOrNull, inputs_getString as getString, inputs_getStringOrNull as getStringOrNull, inputs_getStringOrUndefined as getStringOrUndefined, inputs_handleString as handleString }; -} - /** * Get the current architecture plus OS. Examples include `X64-Linux` and `ARM64-macOS`. */ @@ -151,13 +139,8 @@ declare function getArchOs(): string; * Get the current Nix system. Examples include `x86_64-linux` and `aarch64-darwin`. */ declare function getNixPlatform(archOs: string): string; - -declare const platform_getArchOs: typeof getArchOs; -declare const platform_getNixPlatform: typeof getNixPlatform; -declare namespace platform { - export { platform_getArchOs as getArchOs, platform_getNixPlatform as getNixPlatform }; -} - +//#endregion +//#region src/index.d.ts /** * An enum for describing different "fetch suffixes" for i.d.s. * @@ -189,138 +172,139 @@ type NixRequirementHandling = "fail" | "warn" | "ignore"; */ type NixStoreTrust = "trusted" | "untrusted" | "unknown"; type ActionOptions = { - name: string; - idsProjectName?: string; - eventPrefix?: string; - fetchStyle: FetchSuffixStyle; - legacySourcePrefix?: string; - requireNix: NixRequirementHandling; - diagnosticsSuffix?: string; - binaryNamePrefixes?: string[]; - binaryNamesDenyList?: string[]; + name: string; + idsProjectName?: string; + eventPrefix?: string; + fetchStyle: FetchSuffixStyle; + legacySourcePrefix?: string; + requireNix: NixRequirementHandling; + diagnosticsSuffix?: string; + binaryNamePrefixes?: string[]; + binaryNamesDenyList?: string[]; }; /** * A confident version of Options, where defaults have been resolved into final values. */ type ConfidentActionOptions = { - name: string; - idsProjectName: string; - eventPrefix: string; - fetchStyle: FetchSuffixStyle; - legacySourcePrefix?: string; - requireNix: NixRequirementHandling; - providedDiagnosticsUrl?: URL; - binaryNamePrefixes: string[]; - binaryNamesDenyList: string[]; + name: string; + idsProjectName: string; + eventPrefix: string; + fetchStyle: FetchSuffixStyle; + legacySourcePrefix?: string; + requireNix: NixRequirementHandling; + providedDiagnosticsUrl?: URL; + binaryNamePrefixes: string[]; + binaryNamesDenyList: string[]; }; /** * An event to send to the diagnostic endpoint of i.d.s. */ type DiagnosticEvent = { - name: string; - distinct_id?: string; - uuid: UUID; - timestamp: Date; - properties: Record; + name: string; + distinct_id?: string; + uuid: UUID; + timestamp: Date; + properties: Record; }; declare abstract class DetSysAction { - nixStoreTrust: NixStoreTrust; - strictMode: boolean; - private actionOptions; - private exceptionAttachments; - private archOs; - private executionPhase; - private nixSystem; - private architectureFetchSuffix; - private sourceParameters; - private facts; - private events; - private identity; - private idsHost; - private features; - private featureEventMetadata; - private determineExecutionPhase; - constructor(actionOptions: ActionOptions); - /** - * 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: string, location: string): void; - /** - * The main execution phase. - */ - abstract main(): Promise; - /** - * The post execution phase. - */ - abstract post(): Promise; - /** - * Execute the Action as defined. - */ - execute(): void; - getTemporaryName(): string; - addFact(key: string, value: string | boolean | number): void; - getDiagnosticsUrl(): Promise; - getUniqueId(): string; - getCrossPhaseId(): string; - getCorrelationHashes(): AnonymizedCorrelationHashes; - recordEvent(eventName: string, context?: Record): void; - /** - * Unpacks the closure returned by `fetchArtifact()`, imports the - * contents into the Nix store, and returns the path of the executable at - * `/nix/store/STORE_PATH/bin/${bin}`. - */ - unpackClosure(bin: string): Promise; - /** - * Fetches the executable at the URL determined by the `source-*` inputs and - * other facts, `chmod`s it, and returns the path to the executable on disk. - */ - fetchExecutable(): Promise; - private get isMain(); - private get isPost(); - private executeAsync; - getClient(): Promise; - private checkIn; - getFeature(name: string): Feature | undefined; - /** - * Check in to install.determinate.systems, to accomplish three things: - * - * 1. Preflight the server selected from IdsHost, to increase the chances of success. - * 2. Fetch any incidents and maintenance events to let users know in case things are weird. - * 3. Get feature flag data so we can gently roll out new features. - */ - private requestCheckIn; - private recordPlausibleTimeout; - /** - * Fetch an artifact, such as a tarball, from the location determined by the - * `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.). - */ - private fetchArtifact; - /** - * A helper function for failing on error only if strict mode is enabled. - * This is intended only for CI environments testing Actions themselves. - */ - failOnError(msg: string): void; - private downloadFile; - private complete; - private getCheckInUrl; - private getSourceUrl; - private cacheKey; - private getCachedVersion; - private saveCachedVersion; - private collectBacktraceSetup; - private collectBacktraces; - private preflightRequireNix; - private preflightNixStoreInfo; - private preflightNixVersion; - private submitEvents; + nixStoreTrust: NixStoreTrust; + strictMode: boolean; + private actionOptions; + private exceptionAttachments; + private archOs; + private executionPhase; + private nixSystem; + private architectureFetchSuffix; + private sourceParameters; + private facts; + private events; + private identity; + private idsHost; + private features; + private featureEventMetadata; + private determineExecutionPhase; + constructor(actionOptions: ActionOptions); + /** + * 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: string, location: string): void; + /** + * The main execution phase. + */ + abstract main(): Promise; + /** + * The post execution phase. + */ + abstract post(): Promise; + /** + * Execute the Action as defined. + */ + execute(): void; + getTemporaryName(): string; + addFact(key: string, value: string | boolean | number): void; + getDiagnosticsUrl(): Promise; + getUniqueId(): string; + getCrossPhaseId(): string; + getCorrelationHashes(): AnonymizedCorrelationHashes; + recordEvent(eventName: string, context?: Record): void; + /** + * Unpacks the closure returned by `fetchArtifact()`, imports the + * contents into the Nix store, and returns the path of the executable at + * `/nix/store/STORE_PATH/bin/${bin}`. + */ + unpackClosure(bin: string): Promise; + /** + * Fetches the executable at the URL determined by the `source-*` inputs and + * other facts, `chmod`s it, and returns the path to the executable on disk. + */ + fetchExecutable(): Promise; + private get isMain(); + private get isPost(); + private executeAsync; + getClient(): Promise; + private checkIn; + getFeature(name: string): Feature | undefined; + /** + * Check in to install.determinate.systems, to accomplish three things: + * + * 1. Preflight the server selected from IdsHost, to increase the chances of success. + * 2. Fetch any incidents and maintenance events to let users know in case things are weird. + * 3. Get feature flag data so we can gently roll out new features. + */ + private requestCheckIn; + private recordPlausibleTimeout; + /** + * Fetch an artifact, such as a tarball, from the location determined by the + * `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.). + */ + private fetchArtifact; + /** + * A helper function for failing on error only if strict mode is enabled. + * This is intended only for CI environments testing Actions themselves. + */ + failOnError(msg: string): void; + private downloadFile; + private complete; + private getCheckInUrl; + private getSourceUrl; + private cacheKey; + private getCachedVersion; + private saveCachedVersion; + private collectBacktraceSetup; + private collectBacktraces; + private preflightRequireNix; + private preflightNixStoreInfo; + private preflightNixVersion; + private submitEvents; } - -export { type ActionOptions, type AnonymizedCorrelationHashes, type CheckIn, type ConfidentActionOptions, DetSysAction, type DiagnosticEvent, type ExecutionPhase, type Feature, type FetchSuffixStyle, IdsHost, type Incident, type Maintenance, type NixRequirementHandling, type NixStoreTrust, type Page, type SourceDef, type StatusSummary, inputs, platform, stringifyError }; +//#endregion +export { ActionOptions, type AnonymizedCorrelationHashes, type CheckIn, ConfidentActionOptions, DetSysAction, DiagnosticEvent, ExecutionPhase, type Feature, FetchSuffixStyle, IdsHost, type Incident, type Maintenance, NixRequirementHandling, NixStoreTrust, type Page, type SourceDef, type StatusSummary, inputs_d_exports as inputs, platform_d_exports as platform, stringifyError }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index cc54fe3..3ee1b7a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,1711 +1,1352 @@ -var __defProp = Object.defineProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; +import { __export } from "./chunk-CTAAG5j7.js"; +import * as fs$1 from "node:fs"; +import { constants, createWriteStream, readFileSync } from "node:fs"; +import * as os$1 from "node:os"; +import { tmpdir } from "node:os"; +import { promisify } from "node:util"; +import * as actionsCore from "@actions/core"; +import * as exec$1 from "@actions/exec"; +import os from "os"; +import fs, { chmod, copyFile, mkdir, readFile, readdir, stat } from "node:fs/promises"; +import { gzip } from "node:zlib"; +import { createHash, randomUUID } from "node:crypto"; +import { TimeoutError, got } from "got"; +import { resolveSrv } from "node:dns/promises"; +import * as actionsCache from "@actions/cache"; +import { exec } from "node:child_process"; +import * as path from "node:path"; -// src/linux-release-info.ts -import * as fs from "fs"; -import * as os from "os"; -import { promisify } from "util"; -var readFileAsync = promisify(fs.readFile); -var linuxReleaseInfoOptionsDefaults = { - mode: "async", - customFile: null, - debug: false +//#region src/linux-release-info.ts +const readFileAsync = promisify(fs$1.readFile); +const linuxReleaseInfoOptionsDefaults = { + mode: "async", + customFile: null, + debug: false }; +/** +* Get OS release info from 'os-release' file and from native os module +* on Windows or Darwin it only returns common os module info +* (uses native fs module) +* @returns {object} info from the current os +*/ function releaseInfo(infoOptions) { - const options = { ...linuxReleaseInfoOptionsDefaults, ...infoOptions }; - const searchOsReleaseFileList = osReleaseFileList( - options.customFile - ); - if (os.type() !== "Linux") { - if (options.mode === "sync") { - return getOsInfo(); - } else { - return Promise.resolve(getOsInfo()); - } - } - if (options.mode === "sync") { - return readSyncOsreleaseFile(searchOsReleaseFileList, options); - } else { - return Promise.resolve( - readAsyncOsReleaseFile(searchOsReleaseFileList, options) - ); - } + const options = { + ...linuxReleaseInfoOptionsDefaults, + ...infoOptions + }; + const searchOsReleaseFileList = osReleaseFileList(options.customFile); + if (os$1.type() !== "Linux") if (options.mode === "sync") return getOsInfo(); + else return Promise.resolve(getOsInfo()); + if (options.mode === "sync") return readSyncOsreleaseFile(searchOsReleaseFileList, options); + else return Promise.resolve(readAsyncOsReleaseFile(searchOsReleaseFileList, options)); } +/** +* Format file data: convert data to object keys/values +* +* @param {object} sourceData Source object to be appended +* @param {string} srcParseData Input file data to be parsed +* @returns {object} Formated object +*/ function formatFileData(sourceData, srcParseData) { - const lines = srcParseData.split("\n"); - for (const line of lines) { - const lineData = line.split("="); - if (lineData.length === 2) { - lineData[1] = lineData[1].replace(/["'\r]/gi, ""); - Object.defineProperty(sourceData, lineData[0].toLowerCase(), { - value: lineData[1], - writable: true, - enumerable: true, - configurable: true - }); - } - } - return sourceData; + const lines = srcParseData.split("\n"); + for (const line of lines) { + const lineData = line.split("="); + if (lineData.length === 2) { + lineData[1] = lineData[1].replace(/["'\r]/gi, ""); + Object.defineProperty(sourceData, lineData[0].toLowerCase(), { + value: lineData[1], + writable: true, + enumerable: true, + configurable: true + }); + } + } + return sourceData; } +/** +* Export a list of os-release files +* +* @param {string} customFile optional custom complete filepath +* @returns {array} list of os-release files +*/ function osReleaseFileList(customFile) { - const DEFAULT_OS_RELEASE_FILES = ["/etc/os-release", "/usr/lib/os-release"]; - if (!customFile) { - return DEFAULT_OS_RELEASE_FILES; - } else { - return Array(customFile); - } + const DEFAULT_OS_RELEASE_FILES = ["/etc/os-release", "/usr/lib/os-release"]; + if (!customFile) return DEFAULT_OS_RELEASE_FILES; + else return Array(customFile); } +/** +* Get OS Basic Info +* (uses node 'os' native module) +* +* @returns {OsInfo} os basic info +*/ function getOsInfo() { - return { - type: os.type(), - platform: os.platform(), - hostname: os.hostname(), - arch: os.arch(), - release: os.release() - }; + return { + type: os$1.type(), + platform: os$1.platform(), + hostname: os$1.hostname(), + arch: os$1.arch(), + release: os$1.release() + }; } async function readAsyncOsReleaseFile(fileList, options) { - let fileData = null; - for (const osReleaseFile of fileList) { - try { - if (options.debug) { - console.log(`Trying to read '${osReleaseFile}'...`); - } - fileData = await readFileAsync(osReleaseFile, "binary"); - if (options.debug) { - console.log(`Read data: -${fileData}`); - } - break; - } catch (error3) { - if (options.debug) { - console.error(error3); - } - } - } - if (fileData === null) { - throw new Error("Cannot read os-release file!"); - } - return formatFileData(getOsInfo(), fileData); + let fileData = null; + for (const osReleaseFile of fileList) try { + if (options.debug) console.log(`Trying to read '${osReleaseFile}'...`); + fileData = await readFileAsync(osReleaseFile, "binary"); + if (options.debug) console.log(`Read data:\n${fileData}`); + break; + } catch (error) { + if (options.debug) console.error(error); + } + if (fileData === null) throw new Error("Cannot read os-release file!"); + return formatFileData(getOsInfo(), fileData); } function readSyncOsreleaseFile(releaseFileList, options) { - let fileData = null; - for (const osReleaseFile of releaseFileList) { - try { - if (options.debug) { - console.log(`Trying to read '${osReleaseFile}'...`); - } - fileData = fs.readFileSync(osReleaseFile, "binary"); - if (options.debug) { - console.log(`Read data: -${fileData}`); - } - break; - } catch (error3) { - if (options.debug) { - console.error(error3); - } - } - } - if (fileData === null) { - throw new Error("Cannot read os-release file!"); - } - return formatFileData(getOsInfo(), fileData); + let fileData = null; + for (const osReleaseFile of releaseFileList) try { + if (options.debug) console.log(`Trying to read '${osReleaseFile}'...`); + fileData = fs$1.readFileSync(osReleaseFile, "binary"); + if (options.debug) console.log(`Read data:\n${fileData}`); + break; + } catch (error) { + if (options.debug) console.error(error); + } + if (fileData === null) throw new Error("Cannot read os-release file!"); + return formatFileData(getOsInfo(), fileData); } -// src/actions-core-platform.ts -import * as actionsCore from "@actions/core"; -import * as exec from "@actions/exec"; -import os2 from "os"; -var getWindowsInfo = async () => { - const { stdout: version } = await exec.getExecOutput( - 'powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', - void 0, - { - silent: true - } - ); - const { stdout: name } = await exec.getExecOutput( - 'powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', - void 0, - { - silent: true - } - ); - return { - name: name.trim(), - version: version.trim() - }; +//#endregion +//#region src/actions-core-platform.ts +/** +* Get the name and version of the current Windows system. +*/ +const getWindowsInfo = async () => { + const { stdout: version } = await exec$1.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"", void 0, { silent: true }); + const { stdout: name } = await exec$1.getExecOutput("powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"", void 0, { silent: true }); + return { + name: name.trim(), + version: version.trim() + }; }; -var getMacOsInfo = async () => { - const { stdout } = await exec.getExecOutput("sw_vers", void 0, { - silent: true - }); - const version = stdout.match(/ProductVersion:\s*(.+)/)?.[1] ?? ""; - const name = stdout.match(/ProductName:\s*(.+)/)?.[1] ?? ""; - return { - name, - version - }; +/** +* Get the name and version of the current macOS system. +*/ +const getMacOsInfo = async () => { + const { stdout } = await exec$1.getExecOutput("sw_vers", void 0, { silent: true }); + const version = stdout.match(/ProductVersion:\s*(.+)/)?.[1] ?? ""; + return { + name: stdout.match(/ProductName:\s*(.+)/)?.[1] ?? "", + version + }; }; -var getLinuxInfo = async () => { - let data = {}; - try { - data = releaseInfo({ mode: "sync" }); - actionsCore.debug(`Identified release info: ${JSON.stringify(data)}`); - } catch (e) { - actionsCore.debug(`Error collecting release info: ${e}`); - } - return { - name: getPropertyViaWithDefault( - data, - ["id", "name", "pretty_name", "id_like"], - "unknown" - ), - version: getPropertyViaWithDefault( - data, - ["version_id", "version", "version_codename"], - "unknown" - ) - }; +/** +* Get the name and version of the current Linux system. +*/ +const getLinuxInfo = async () => { + let data = {}; + try { + data = releaseInfo({ mode: "sync" }); + actionsCore.debug(`Identified release info: ${JSON.stringify(data)}`); + } catch (e) { + actionsCore.debug(`Error collecting release info: ${e}`); + } + return { + name: getPropertyViaWithDefault(data, [ + "id", + "name", + "pretty_name", + "id_like" + ], "unknown"), + version: getPropertyViaWithDefault(data, [ + "version_id", + "version", + "version_codename" + ], "unknown") + }; }; function getPropertyViaWithDefault(data, names, defaultValue) { - for (const name of names) { - const ret = getPropertyWithDefault(data, name, defaultValue); - if (ret !== defaultValue) { - return ret; - } - } - return defaultValue; + for (const name of names) { + const ret = getPropertyWithDefault(data, name, defaultValue); + if (ret !== defaultValue) return ret; + } + return defaultValue; } function getPropertyWithDefault(data, name, defaultValue) { - if (!data.hasOwnProperty(name)) { - return defaultValue; - } - const value = data[name]; - if (typeof value !== typeof defaultValue) { - return defaultValue; - } - return value; + if (!data.hasOwnProperty(name)) return defaultValue; + const value = data[name]; + if (typeof value !== typeof defaultValue) return defaultValue; + return value; } -var platform2 = os2.platform(); -var arch2 = os2.arch(); -var isWindows = platform2 === "win32"; -var isMacOS = platform2 === "darwin"; -var isLinux = platform2 === "linux"; +/** +* The Action runner's platform. +*/ +const platform = os.platform(); +/** +* The Action runner's architecture. +*/ +const arch = os.arch(); +/** +* Whether the Action runner is a Windows system. +*/ +const isWindows = platform === "win32"; +/** +* Whether the Action runner is a macOS system. +*/ +const isMacOS = platform === "darwin"; +/** +* Whether the Action runner is a Linux system. +*/ +const isLinux = platform === "linux"; +/** +* Get system-level information about the current host (platform, architecture, etc.). +*/ async function getDetails() { - return { - ...await (isWindows ? getWindowsInfo() : isMacOS ? getMacOsInfo() : getLinuxInfo()), - platform: platform2, - arch: arch2, - isWindows, - isMacOS, - isLinux - }; + return { + ...await (isWindows ? getWindowsInfo() : isMacOS ? getMacOsInfo() : getLinuxInfo()), + platform, + arch, + isWindows, + isMacOS, + isLinux + }; } -// src/errors.ts +//#endregion +//#region src/errors.ts +/** +* Coerce a value of type `unknown` into a string. +*/ function stringifyError(e) { - if (e instanceof Error) { - return e.message; - } else if (typeof e === "string") { - return e; - } else { - return JSON.stringify(e); - } + if (e instanceof Error) return e.message; + else if (typeof e === "string") return e; + else return JSON.stringify(e); } -// src/backtrace.ts -import * as actionsCore2 from "@actions/core"; -import * as exec2 from "@actions/exec"; -import { readFile as readFile2, readdir, stat } from "fs/promises"; -import { promisify as promisify2 } from "util"; -import { gzip } from "zlib"; -var START_SLOP_SECONDS = 5; +//#endregion +//#region src/backtrace.ts +const START_SLOP_SECONDS = 5; async function collectBacktraces(prefixes, programNameDenyList, startTimestampMs) { - if (isMacOS) { - return await collectBacktracesMacOS( - prefixes, - programNameDenyList, - startTimestampMs - ); - } - if (isLinux) { - return await collectBacktracesSystemd( - prefixes, - programNameDenyList, - startTimestampMs - ); - } - return /* @__PURE__ */ new Map(); + if (isMacOS) return await collectBacktracesMacOS(prefixes, programNameDenyList, startTimestampMs); + if (isLinux) return await collectBacktracesSystemd(prefixes, programNameDenyList, startTimestampMs); + return /* @__PURE__ */ new Map(); } async function collectBacktracesMacOS(prefixes, programNameDenyList, startTimestampMs) { - const backtraces = /* @__PURE__ */ new Map(); - try { - const { stdout: logJson } = await exec2.getExecOutput( - "log", - [ - "show", - "--style", - "json", - "--last", - // Note we collect the last 1m only, because it should only take a few seconds to write the crash log. - // Therefore, any crashes before this 1m should be long done by now. - "1m", - "--no-info", - "--predicate", - "sender = 'ReportCrash'" - ], - { - silent: true - } - ); - const sussyArray = JSON.parse(logJson); - if (!Array.isArray(sussyArray)) { - throw new Error(`Log json isn't an array: ${logJson}`); - } - if (sussyArray.length > 0) { - actionsCore2.info(`Collecting crash data...`); - const delay = async (ms) => new Promise((resolve) => setTimeout(resolve, ms)); - await delay(5e3); - } - } catch { - actionsCore2.debug( - "Failed to check logs for in-progress crash dumps; now proceeding with the assumption that all crash dumps completed." - ); - } - const dirs = [ - ["system", "/Library/Logs/DiagnosticReports/"], - ["user", `${process.env["HOME"]}/Library/Logs/DiagnosticReports/`] - ]; - for (const [source, dir] of dirs) { - const fileNames = (await readdir(dir)).filter((fileName) => { - return prefixes.some((prefix) => fileName.startsWith(prefix)); - }).filter((fileName) => { - return !programNameDenyList.some( - (programName) => fileName.startsWith(programName) - ); - }).filter((fileName) => { - return !fileName.endsWith(".diag"); - }); - const doGzip = promisify2(gzip); - for (const fileName of fileNames) { - try { - if ((await stat(`${dir}/${fileName}`)).ctimeMs >= startTimestampMs) { - const logText = await readFile2(`${dir}/${fileName}`); - const buf = await doGzip(logText); - backtraces.set( - `backtrace_value_${source}_${fileName}`, - buf.toString("base64") - ); - } - } catch (innerError) { - backtraces.set( - `backtrace_failure_${source}_${fileName}`, - stringifyError(innerError) - ); - } - } - } - return backtraces; + const backtraces = /* @__PURE__ */ new Map(); + try { + const { stdout: logJson } = await exec$1.getExecOutput("log", [ + "show", + "--style", + "json", + "--last", + "1m", + "--no-info", + "--predicate", + "sender = 'ReportCrash'" + ], { silent: true }); + const sussyArray = JSON.parse(logJson); + if (!Array.isArray(sussyArray)) throw new Error(`Log json isn't an array: ${logJson}`); + if (sussyArray.length > 0) { + actionsCore.info(`Collecting crash data...`); + const delay = async (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + await delay(5e3); + } + } catch { + actionsCore.debug("Failed to check logs for in-progress crash dumps; now proceeding with the assumption that all crash dumps completed."); + } + const dirs = [["system", "/Library/Logs/DiagnosticReports/"], ["user", `${process.env["HOME"]}/Library/Logs/DiagnosticReports/`]]; + for (const [source, dir] of dirs) { + const fileNames = (await readdir(dir)).filter((fileName) => { + return prefixes.some((prefix) => fileName.startsWith(prefix)); + }).filter((fileName) => { + return !programNameDenyList.some((programName) => fileName.startsWith(programName)); + }).filter((fileName) => { + return !fileName.endsWith(".diag"); + }); + const doGzip = promisify(gzip); + for (const fileName of fileNames) try { + if ((await stat(`${dir}/${fileName}`)).ctimeMs >= startTimestampMs) { + const logText = await readFile(`${dir}/${fileName}`); + const buf = await doGzip(logText); + backtraces.set(`backtrace_value_${source}_${fileName}`, buf.toString("base64")); + } + } catch (innerError) { + backtraces.set(`backtrace_failure_${source}_${fileName}`, stringifyError(innerError)); + } + } + return backtraces; } async function collectBacktracesSystemd(prefixes, programNameDenyList, startTimestampMs) { - const sinceSeconds = Math.ceil((Date.now() - startTimestampMs) / 1e3) + START_SLOP_SECONDS; - const backtraces = /* @__PURE__ */ new Map(); - const coredumps = []; - try { - const { stdout: coredumpjson } = await exec2.getExecOutput( - "coredumpctl", - ["--json=pretty", "list", "--since", `${sinceSeconds} seconds ago`], - { - silent: true - } - ); - const sussyArray = JSON.parse(coredumpjson); - if (!Array.isArray(sussyArray)) { - throw new Error(`Coredump isn't an array: ${coredumpjson}`); - } - for (const sussyObject of sussyArray) { - const keys = Object.keys(sussyObject); - if (keys.includes("exe") && keys.includes("pid")) { - if (typeof sussyObject.exe == "string" && typeof sussyObject.pid == "number") { - const execParts = sussyObject.exe.split("/"); - const binaryName = execParts[execParts.length - 1]; - if (prefixes.some((prefix) => binaryName.startsWith(prefix)) && !programNameDenyList.includes(binaryName)) { - coredumps.push({ - exe: sussyObject.exe, - pid: sussyObject.pid - }); - } - } else { - actionsCore2.debug( - `Mysterious coredump entry missing exe string and/or pid number: ${JSON.stringify(sussyObject)}` - ); - } - } else { - actionsCore2.debug( - `Mysterious coredump entry missing exe value and/or pid value: ${JSON.stringify(sussyObject)}` - ); - } - } - } catch (innerError) { - actionsCore2.debug( - `Cannot collect backtraces: ${stringifyError(innerError)}` - ); - return backtraces; - } - const doGzip = promisify2(gzip); - for (const coredump of coredumps) { - try { - const { stdout: logText } = await exec2.getExecOutput( - "coredumpctl", - ["info", `${coredump.pid}`], - { - silent: true - } - ); - const buf = await doGzip(logText); - backtraces.set(`backtrace_value_${coredump.pid}`, buf.toString("base64")); - } catch (innerError) { - backtraces.set( - `backtrace_failure_${coredump.pid}`, - stringifyError(innerError) - ); - } - } - return backtraces; + const sinceSeconds = Math.ceil((Date.now() - startTimestampMs) / 1e3) + START_SLOP_SECONDS; + const backtraces = /* @__PURE__ */ new Map(); + const coredumps = []; + try { + const { stdout: coredumpjson } = await exec$1.getExecOutput("coredumpctl", [ + "--json=pretty", + "list", + "--since", + `${sinceSeconds} seconds ago` + ], { silent: true }); + const sussyArray = JSON.parse(coredumpjson); + if (!Array.isArray(sussyArray)) throw new Error(`Coredump isn't an array: ${coredumpjson}`); + for (const sussyObject of sussyArray) { + const keys = Object.keys(sussyObject); + if (keys.includes("exe") && keys.includes("pid")) if (typeof sussyObject.exe == "string" && typeof sussyObject.pid == "number") { + const execParts = sussyObject.exe.split("/"); + const binaryName = execParts[execParts.length - 1]; + if (prefixes.some((prefix) => binaryName.startsWith(prefix)) && !programNameDenyList.includes(binaryName)) coredumps.push({ + exe: sussyObject.exe, + pid: sussyObject.pid + }); + } else actionsCore.debug(`Mysterious coredump entry missing exe string and/or pid number: ${JSON.stringify(sussyObject)}`); + else actionsCore.debug(`Mysterious coredump entry missing exe value and/or pid value: ${JSON.stringify(sussyObject)}`); + } + } catch (innerError) { + actionsCore.debug(`Cannot collect backtraces: ${stringifyError(innerError)}`); + return backtraces; + } + const doGzip = promisify(gzip); + for (const coredump of coredumps) try { + const { stdout: logText } = await exec$1.getExecOutput("coredumpctl", ["info", `${coredump.pid}`], { silent: true }); + const buf = await doGzip(logText); + backtraces.set(`backtrace_value_${coredump.pid}`, buf.toString("base64")); + } catch (innerError) { + backtraces.set(`backtrace_failure_${coredump.pid}`, stringifyError(innerError)); + } + return backtraces; } -// src/correlation.ts -import * as actionsCore3 from "@actions/core"; -import { createHash, randomUUID } from "crypto"; -var OPTIONAL_VARIABLES = ["INVOCATION_ID"]; +//#endregion +//#region src/correlation.ts +const OPTIONAL_VARIABLES = ["INVOCATION_ID"]; function identify() { - const repository = hashEnvironmentVariables("GHR", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID" - ]); - const run_differentiator = hashEnvironmentVariables("GHWJA", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID", - "GITHUB_WORKFLOW", - "GITHUB_JOB", - "GITHUB_RUN_ID", - "GITHUB_RUN_NUMBER", - "GITHUB_RUN_ATTEMPT", - "INVOCATION_ID" - ]); - const ident = { - $anon_distinct_id: process.env["RUNNER_TRACKING_ID"] || randomUUID(), - correlation_source: "github-actions", - github_repository_hash: repository, - github_workflow_hash: hashEnvironmentVariables("GHW", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID", - "GITHUB_WORKFLOW" - ]), - github_workflow_job_hash: hashEnvironmentVariables("GHWJ", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID", - "GITHUB_WORKFLOW", - "GITHUB_JOB" - ]), - github_workflow_run_hash: hashEnvironmentVariables("GHWJR", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID", - "GITHUB_REPOSITORY", - "GITHUB_REPOSITORY_ID", - "GITHUB_WORKFLOW", - "GITHUB_JOB", - "GITHUB_RUN_ID" - ]), - github_workflow_run_differentiator_hash: run_differentiator, - $session_id: run_differentiator, - $groups: { - github_repository: repository, - github_organization: hashEnvironmentVariables("GHO", [ - "GITHUB_SERVER_URL", - "GITHUB_REPOSITORY_OWNER", - "GITHUB_REPOSITORY_OWNER_ID" - ]) - }, - is_ci: true - }; - actionsCore3.debug("Correlation data:"); - actionsCore3.debug(JSON.stringify(ident, null, 2)); - return ident; + const repository = hashEnvironmentVariables("GHR", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID" + ]); + const run_differentiator = hashEnvironmentVariables("GHWJA", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID", + "GITHUB_WORKFLOW", + "GITHUB_JOB", + "GITHUB_RUN_ID", + "GITHUB_RUN_NUMBER", + "GITHUB_RUN_ATTEMPT", + "INVOCATION_ID" + ]); + const ident = { + $anon_distinct_id: process.env["RUNNER_TRACKING_ID"] || randomUUID(), + correlation_source: "github-actions", + github_repository_hash: repository, + github_workflow_hash: hashEnvironmentVariables("GHW", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID", + "GITHUB_WORKFLOW" + ]), + github_workflow_job_hash: hashEnvironmentVariables("GHWJ", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID", + "GITHUB_WORKFLOW", + "GITHUB_JOB" + ]), + github_workflow_run_hash: hashEnvironmentVariables("GHWJR", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID", + "GITHUB_REPOSITORY", + "GITHUB_REPOSITORY_ID", + "GITHUB_WORKFLOW", + "GITHUB_JOB", + "GITHUB_RUN_ID" + ]), + github_workflow_run_differentiator_hash: run_differentiator, + $session_id: run_differentiator, + $groups: { + github_repository: repository, + github_organization: hashEnvironmentVariables("GHO", [ + "GITHUB_SERVER_URL", + "GITHUB_REPOSITORY_OWNER", + "GITHUB_REPOSITORY_OWNER_ID" + ]) + }, + is_ci: true + }; + actionsCore.debug("Correlation data:"); + actionsCore.debug(JSON.stringify(ident, null, 2)); + return ident; } function hashEnvironmentVariables(prefix, variables) { - const hash = createHash("sha256"); - for (const varName of variables) { - let value = process.env[varName]; - if (value === void 0) { - if (OPTIONAL_VARIABLES.includes(varName)) { - actionsCore3.debug( - `Optional environment variable not set: ${varName} -- substituting with the variable name` - ); - value = varName; - } else { - actionsCore3.debug( - `Environment variable not set: ${varName} -- can't generate the requested identity` - ); - return void 0; - } - } - hash.update(value); - hash.update("\0"); - } - return `${prefix}-${hash.digest("hex")}`; + const hash = createHash("sha256"); + for (const varName of variables) { + let value = process.env[varName]; + if (value === void 0) if (OPTIONAL_VARIABLES.includes(varName)) { + actionsCore.debug(`Optional environment variable not set: ${varName} -- substituting with the variable name`); + value = varName; + } else { + actionsCore.debug(`Environment variable not set: ${varName} -- can't generate the requested identity`); + return; + } + hash.update(value); + hash.update("\0"); + } + return `${prefix}-${hash.digest("hex")}`; } -// src/ids-host.ts -import * as actionsCore4 from "@actions/core"; -import { got } from "got"; -import { resolveSrv } from "dns/promises"; -var DEFAULT_LOOKUP = "_detsys_ids._tcp.install.determinate.systems."; -var ALLOWED_SUFFIXES = [ - ".install.determinate.systems", - ".install.detsys.dev" -]; -var DEFAULT_IDS_HOST = "https://install.determinate.systems"; -var LOOKUP = process.env["IDS_LOOKUP"] ?? DEFAULT_LOOKUP; -var DEFAULT_TIMEOUT = 1e4; +//#endregion +//#region src/ids-host.ts +const DEFAULT_LOOKUP = "_detsys_ids._tcp.install.determinate.systems."; +const ALLOWED_SUFFIXES = [".install.determinate.systems", ".install.detsys.dev"]; +const DEFAULT_IDS_HOST = "https://install.determinate.systems"; +const LOOKUP = process.env["IDS_LOOKUP"] ?? DEFAULT_LOOKUP; +const DEFAULT_TIMEOUT = 1e4; +/** +* Host information for install.determinate.systems. +*/ var IdsHost = class { - constructor(idsProjectName, diagnosticsSuffix, runtimeDiagnosticsUrl) { - this.idsProjectName = idsProjectName; - this.diagnosticsSuffix = diagnosticsSuffix; - this.runtimeDiagnosticsUrl = runtimeDiagnosticsUrl; - this.client = void 0; - } - async getGot(recordFailoverCallback) { - if (this.client === void 0) { - this.client = got.extend({ - timeout: { - request: DEFAULT_TIMEOUT - }, - retry: { - limit: Math.max((await this.getUrlsByPreference()).length, 3), - methods: ["GET", "HEAD"] - }, - hooks: { - beforeRetry: [ - async (error3, retryCount) => { - const prevUrl = await this.getRootUrl(); - this.markCurrentHostBroken(); - const nextUrl = await this.getRootUrl(); - if (recordFailoverCallback !== void 0) { - recordFailoverCallback(error3, prevUrl, nextUrl); - } - actionsCore4.info( - `Retrying after error ${error3.code}, retry #: ${retryCount}` - ); - } - ], - beforeRequest: [ - async (options) => { - const currentUrl = options.url; - if (this.isUrlSubjectToDynamicUrls(currentUrl)) { - const newUrl = new URL(currentUrl); - const url = await this.getRootUrl(); - newUrl.host = url.host; - options.url = newUrl; - actionsCore4.debug(`Transmuted ${currentUrl} into ${newUrl}`); - } else { - actionsCore4.debug(`No transmutations on ${currentUrl}`); - } - } - ] - } - }); - } - return this.client; - } - markCurrentHostBroken() { - this.prioritizedURLs?.shift(); - } - setPrioritizedUrls(urls) { - this.prioritizedURLs = urls; - } - isUrlSubjectToDynamicUrls(url) { - if (url.origin === DEFAULT_IDS_HOST) { - return true; - } - for (const suffix of ALLOWED_SUFFIXES) { - if (url.host.endsWith(suffix)) { - return true; - } - } - return false; - } - async getDynamicRootUrl() { - const idsHost = process.env["IDS_HOST"]; - if (idsHost !== void 0) { - try { - return new URL(idsHost); - } catch (err) { - actionsCore4.error( - `IDS_HOST environment variable is not a valid URL. Ignoring. ${stringifyError(err)}` - ); - } - } - let url = void 0; - try { - const urls = await this.getUrlsByPreference(); - url = urls[0]; - } catch (err) { - actionsCore4.error( - `Error collecting IDS URLs by preference: ${stringifyError(err)}` - ); - } - if (url === void 0) { - return void 0; - } else { - return new URL(url); - } - } - async getRootUrl() { - const url = await this.getDynamicRootUrl(); - if (url === void 0) { - return new URL(DEFAULT_IDS_HOST); - } - return url; - } - async getDiagnosticsUrl() { - if (this.runtimeDiagnosticsUrl === "") { - return void 0; - } - if (this.runtimeDiagnosticsUrl !== "-" && this.runtimeDiagnosticsUrl !== void 0) { - try { - return new URL(this.runtimeDiagnosticsUrl); - } catch (err) { - actionsCore4.info( - `User-provided diagnostic endpoint ignored: not a valid URL: ${stringifyError(err)}` - ); - } - } - try { - const diagnosticUrl = await this.getRootUrl(); - diagnosticUrl.pathname += "events/batch"; - return diagnosticUrl; - } catch (err) { - actionsCore4.info( - `Generated diagnostic endpoint ignored, and diagnostics are disabled: not a valid URL: ${stringifyError(err)}` - ); - return void 0; - } - } - async getUrlsByPreference() { - if (this.prioritizedURLs === void 0) { - this.prioritizedURLs = orderRecordsByPriorityWeight( - await discoverServiceRecords() - ).flatMap((record) => recordToUrl(record) || []); - } - return this.prioritizedURLs; - } + constructor(idsProjectName, diagnosticsSuffix, runtimeDiagnosticsUrl) { + this.idsProjectName = idsProjectName; + this.diagnosticsSuffix = diagnosticsSuffix; + this.runtimeDiagnosticsUrl = runtimeDiagnosticsUrl; + this.client = void 0; + } + async getGot(recordFailoverCallback) { + if (this.client === void 0) this.client = got.extend({ + timeout: { request: DEFAULT_TIMEOUT }, + retry: { + limit: Math.max((await this.getUrlsByPreference()).length, 3), + methods: ["GET", "HEAD"] + }, + hooks: { + beforeRetry: [async (error, retryCount) => { + const prevUrl = await this.getRootUrl(); + this.markCurrentHostBroken(); + const nextUrl = await this.getRootUrl(); + if (recordFailoverCallback !== void 0) recordFailoverCallback(error, prevUrl, nextUrl); + actionsCore.info(`Retrying after error ${error.code}, retry #: ${retryCount}`); + }], + beforeRequest: [async (options) => { + const currentUrl = options.url; + if (this.isUrlSubjectToDynamicUrls(currentUrl)) { + const newUrl = new URL(currentUrl); + newUrl.host = (await this.getRootUrl()).host; + options.url = newUrl; + actionsCore.debug(`Transmuted ${currentUrl} into ${newUrl}`); + } else actionsCore.debug(`No transmutations on ${currentUrl}`); + }] + } + }); + return this.client; + } + markCurrentHostBroken() { + this.prioritizedURLs?.shift(); + } + setPrioritizedUrls(urls) { + this.prioritizedURLs = urls; + } + isUrlSubjectToDynamicUrls(url) { + if (url.origin === DEFAULT_IDS_HOST) return true; + for (const suffix of ALLOWED_SUFFIXES) if (url.host.endsWith(suffix)) return true; + return false; + } + async getDynamicRootUrl() { + const idsHost = process.env["IDS_HOST"]; + if (idsHost !== void 0) try { + return new URL(idsHost); + } catch (err) { + actionsCore.error(`IDS_HOST environment variable is not a valid URL. Ignoring. ${stringifyError(err)}`); + } + let url = void 0; + try { + url = (await this.getUrlsByPreference())[0]; + } catch (err) { + actionsCore.error(`Error collecting IDS URLs by preference: ${stringifyError(err)}`); + } + if (url === void 0) return; + else return new URL(url); + } + async getRootUrl() { + const url = await this.getDynamicRootUrl(); + if (url === void 0) return new URL(DEFAULT_IDS_HOST); + return url; + } + async getDiagnosticsUrl() { + if (this.runtimeDiagnosticsUrl === "") return; + if (this.runtimeDiagnosticsUrl !== "-" && this.runtimeDiagnosticsUrl !== void 0) try { + return new URL(this.runtimeDiagnosticsUrl); + } catch (err) { + actionsCore.info(`User-provided diagnostic endpoint ignored: not a valid URL: ${stringifyError(err)}`); + } + try { + const diagnosticUrl = await this.getRootUrl(); + diagnosticUrl.pathname += "events/batch"; + return diagnosticUrl; + } catch (err) { + actionsCore.info(`Generated diagnostic endpoint ignored, and diagnostics are disabled: not a valid URL: ${stringifyError(err)}`); + return; + } + } + async getUrlsByPreference() { + if (this.prioritizedURLs === void 0) this.prioritizedURLs = orderRecordsByPriorityWeight(await discoverServiceRecords()).flatMap((record) => recordToUrl(record) || []); + return this.prioritizedURLs; + } }; function recordToUrl(record) { - const urlStr = `https://${record.name}:${record.port}`; - try { - return new URL(urlStr); - } catch (err) { - actionsCore4.debug( - `Record ${JSON.stringify(record)} produced an invalid URL: ${urlStr} (${err})` - ); - return void 0; - } + const urlStr = `https://${record.name}:${record.port}`; + try { + return new URL(urlStr); + } catch (err) { + actionsCore.debug(`Record ${JSON.stringify(record)} produced an invalid URL: ${urlStr} (${err})`); + return; + } } async function discoverServiceRecords() { - return await discoverServicesStub(resolveSrv(LOOKUP), 1e3); + return await discoverServicesStub(resolveSrv(LOOKUP), 1e3); } async function discoverServicesStub(lookup, timeout) { - const defaultFallback = new Promise( - (resolve, _reject) => { - setTimeout(resolve, timeout, []); - } - ); - let records; - try { - records = await Promise.race([lookup, defaultFallback]); - } catch (reason) { - actionsCore4.debug(`Error resolving SRV records: ${stringifyError(reason)}`); - records = []; - } - const acceptableRecords = records.filter((record) => { - for (const suffix of ALLOWED_SUFFIXES) { - if (record.name.endsWith(suffix)) { - return true; - } - } - actionsCore4.debug( - `Unacceptable domain due to an invalid suffix: ${record.name}` - ); - return false; - }); - if (acceptableRecords.length === 0) { - actionsCore4.debug(`No records found for ${LOOKUP}`); - } else { - actionsCore4.debug( - `Resolved ${LOOKUP} to ${JSON.stringify(acceptableRecords)}` - ); - } - return acceptableRecords; + const defaultFallback = new Promise((resolve, _reject) => { + setTimeout(resolve, timeout, []); + }); + let records; + try { + records = await Promise.race([lookup, defaultFallback]); + } catch (reason) { + actionsCore.debug(`Error resolving SRV records: ${stringifyError(reason)}`); + records = []; + } + const acceptableRecords = records.filter((record) => { + for (const suffix of ALLOWED_SUFFIXES) if (record.name.endsWith(suffix)) return true; + actionsCore.debug(`Unacceptable domain due to an invalid suffix: ${record.name}`); + return false; + }); + if (acceptableRecords.length === 0) actionsCore.debug(`No records found for ${LOOKUP}`); + else actionsCore.debug(`Resolved ${LOOKUP} to ${JSON.stringify(acceptableRecords)}`); + return acceptableRecords; } function orderRecordsByPriorityWeight(records) { - const byPriorityWeight = /* @__PURE__ */ new Map(); - for (const record of records) { - const existing = byPriorityWeight.get(record.priority); - if (existing) { - existing.push(record); - } else { - byPriorityWeight.set(record.priority, [record]); - } - } - const prioritizedRecords = []; - const keys = Array.from(byPriorityWeight.keys()).sort( - (a, b) => a - b - ); - for (const priority of keys) { - const recordsByPrio = byPriorityWeight.get(priority); - if (recordsByPrio === void 0) { - continue; - } - prioritizedRecords.push(...weightedRandom(recordsByPrio)); - } - return prioritizedRecords; + const byPriorityWeight = /* @__PURE__ */ new Map(); + for (const record of records) { + const existing = byPriorityWeight.get(record.priority); + if (existing) existing.push(record); + else byPriorityWeight.set(record.priority, [record]); + } + const prioritizedRecords = []; + const keys = Array.from(byPriorityWeight.keys()).sort((a, b) => a - b); + for (const priority of keys) { + const recordsByPrio = byPriorityWeight.get(priority); + if (recordsByPrio === void 0) continue; + prioritizedRecords.push(...weightedRandom(recordsByPrio)); + } + return prioritizedRecords; } function weightedRandom(records) { - const scratchRecords = records.slice(); - const result = []; - while (scratchRecords.length > 0) { - const weights = []; - { - for (let i = 0; i < scratchRecords.length; i++) { - weights.push( - scratchRecords[i].weight + (i > 0 ? scratchRecords[i - 1].weight : 0) - ); - } - } - const point = Math.random() * weights[weights.length - 1]; - for (let selectedIndex = 0; selectedIndex < weights.length; selectedIndex++) { - if (weights[selectedIndex] > point) { - result.push(scratchRecords.splice(selectedIndex, 1)[0]); - break; - } - } - } - return result; + const scratchRecords = records.slice(); + const result = []; + while (scratchRecords.length > 0) { + const weights = []; + for (let i = 0; i < scratchRecords.length; i++) weights.push(scratchRecords[i].weight + (i > 0 ? scratchRecords[i - 1].weight : 0)); + const point = Math.random() * weights[weights.length - 1]; + for (let selectedIndex = 0; selectedIndex < weights.length; selectedIndex++) if (weights[selectedIndex] > point) { + result.push(scratchRecords.splice(selectedIndex, 1)[0]); + break; + } + } + return result; } -// src/inputs.ts -var inputs_exports = {}; -__export(inputs_exports, { - getArrayOfStrings: () => getArrayOfStrings, - getArrayOfStringsOrNull: () => getArrayOfStringsOrNull, - getBool: () => getBool, - getBoolOrUndefined: () => getBoolOrUndefined, - getMultilineStringOrNull: () => getMultilineStringOrNull, - getNumberOrNull: () => getNumberOrNull, - getString: () => getString, - getStringOrNull: () => getStringOrNull, - getStringOrUndefined: () => getStringOrUndefined, - handleString: () => handleString +//#endregion +//#region src/inputs.ts +var inputs_exports = __export({ + getArrayOfStrings: () => getArrayOfStrings, + getArrayOfStringsOrNull: () => getArrayOfStringsOrNull, + getBool: () => getBool, + getBoolOrUndefined: () => getBoolOrUndefined, + getMultilineStringOrNull: () => getMultilineStringOrNull, + getNumberOrNull: () => getNumberOrNull, + getString: () => getString, + getStringOrNull: () => getStringOrNull, + getStringOrUndefined: () => getStringOrUndefined, + handleString: () => handleString }); -import * as actionsCore5 from "@actions/core"; -var getBool = (name) => { - return actionsCore5.getBooleanInput(name); +/** +* Get a Boolean input from the Action's configuration by name. +*/ +const getBool = (name) => { + return actionsCore.getBooleanInput(name); }; -var getBoolOrUndefined = (name) => { - if (getStringOrUndefined(name) === void 0) { - return void 0; - } - return actionsCore5.getBooleanInput(name); +/** +* Get a Boolean input from the Action's configuration by name, or undefined if it is unset. +*/ +const getBoolOrUndefined = (name) => { + if (getStringOrUndefined(name) === void 0) return; + return actionsCore.getBooleanInput(name); }; -var getArrayOfStrings = (name, separator) => { - const original = getString(name); - return handleString(original, separator); +/** +* Convert a comma-separated string input into an array of strings. If `comma` is selected, +* all whitespace is removed from the string before converting to an array. +*/ +const getArrayOfStrings = (name, separator) => { + const original = getString(name); + return handleString(original, separator); }; -var getArrayOfStringsOrNull = (name, separator) => { - const original = getStringOrNull(name); - if (original === null) { - return null; - } else { - return handleString(original, separator); - } +/** +* Convert a string input into an array of strings or `null` if no value is set. +*/ +const getArrayOfStringsOrNull = (name, separator) => { + const original = getStringOrNull(name); + if (original === null) return null; + else 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()); +const 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 = actionsCore5.getMultilineInput(name); - if (value.length === 0) { - return null; - } else { - return value; - } +/** +* Get a multi-line string input from the Action's configuration by name or return `null` if not set. +*/ +const getMultilineStringOrNull = (name) => { + const value = actionsCore.getMultilineInput(name); + if (value.length === 0) return null; + else return value; }; -var getNumberOrNull = (name) => { - const value = actionsCore5.getInput(name); - if (value === "") { - return null; - } else { - return Number(value); - } +/** +* Get a number input from the Action's configuration by name or return `null` if not set. +*/ +const getNumberOrNull = (name) => { + const value = actionsCore.getInput(name); + if (value === "") return null; + else return Number(value); }; -var getString = (name) => { - return actionsCore5.getInput(name); +/** +* Get a string input from the Action's configuration. +*/ +const getString = (name) => { + return actionsCore.getInput(name); }; -var getStringOrNull = (name) => { - const value = actionsCore5.getInput(name); - if (value === "") { - return null; - } else { - return value; - } +/** +* Get a string input from the Action's configuration by name or return `null` if not set. +*/ +const getStringOrNull = (name) => { + const value = actionsCore.getInput(name); + if (value === "") return null; + else return value; }; -var getStringOrUndefined = (name) => { - const value = actionsCore5.getInput(name); - if (value === "") { - return void 0; - } else { - return value; - } +/** +* Get a string input from the Action's configuration by name or return `undefined` if not set. +*/ +const getStringOrUndefined = (name) => { + const value = actionsCore.getInput(name); + if (value === "") return; + else return value; }; -// src/platform.ts -var platform_exports = {}; -__export(platform_exports, { - getArchOs: () => getArchOs, - getNixPlatform: () => getNixPlatform +//#endregion +//#region src/platform.ts +var platform_exports = __export({ + getArchOs: () => getArchOs, + getNixPlatform: () => getNixPlatform }); -import * as actionsCore6 from "@actions/core"; +/** +* Get the current architecture plus OS. Examples include `X64-Linux` and `ARM64-macOS`. +*/ function getArchOs() { - const envArch = process.env.RUNNER_ARCH; - const envOs = process.env.RUNNER_OS; - if (envArch && envOs) { - return `${envArch}-${envOs}`; - } else { - actionsCore6.error( - `Can't identify the platform: RUNNER_ARCH or RUNNER_OS undefined (${envArch}-${envOs})` - ); - throw new Error("RUNNER_ARCH and/or RUNNER_OS is not defined"); - } + const envArch = process.env.RUNNER_ARCH; + const envOs = process.env.RUNNER_OS; + if (envArch && envOs) return `${envArch}-${envOs}`; + else { + actionsCore.error(`Can't identify the platform: RUNNER_ARCH or RUNNER_OS undefined (${envArch}-${envOs})`); + throw new Error("RUNNER_ARCH and/or RUNNER_OS is not defined"); + } } +/** +* Get the current Nix system. Examples include `x86_64-linux` and `aarch64-darwin`. +*/ function getNixPlatform(archOs) { - const archOsMap = /* @__PURE__ */ new Map([ - ["X64-macOS", "x86_64-darwin"], - ["ARM64-macOS", "aarch64-darwin"], - ["X64-Linux", "x86_64-linux"], - ["ARM64-Linux", "aarch64-linux"] - ]); - const mappedTo = archOsMap.get(archOs); - if (mappedTo) { - return mappedTo; - } else { - actionsCore6.error( - `ArchOs (${archOs}) doesn't map to a supported Nix platform.` - ); - throw new Error( - `Cannot convert ArchOs (${archOs}) to a supported Nix platform.` - ); - } + const mappedTo = new Map([ + ["X64-macOS", "x86_64-darwin"], + ["ARM64-macOS", "aarch64-darwin"], + ["X64-Linux", "x86_64-linux"], + ["ARM64-Linux", "aarch64-linux"] + ]).get(archOs); + if (mappedTo) return mappedTo; + else { + actionsCore.error(`ArchOs (${archOs}) doesn't map to a supported Nix platform.`); + throw new Error(`Cannot convert ArchOs (${archOs}) to a supported Nix platform.`); + } } -// src/sourcedef.ts -import * as actionsCore7 from "@actions/core"; +//#endregion +//#region src/sourcedef.ts function constructSourceParameters(legacyPrefix) { - return { - path: noisilyGetInput("path", legacyPrefix), - url: noisilyGetInput("url", legacyPrefix), - tag: noisilyGetInput("tag", legacyPrefix), - pr: noisilyGetInput("pr", legacyPrefix), - branch: noisilyGetInput("branch", legacyPrefix), - revision: noisilyGetInput("revision", legacyPrefix) - }; + return { + path: noisilyGetInput("path", legacyPrefix), + url: noisilyGetInput("url", legacyPrefix), + tag: noisilyGetInput("tag", legacyPrefix), + pr: noisilyGetInput("pr", legacyPrefix), + branch: noisilyGetInput("branch", legacyPrefix), + revision: noisilyGetInput("revision", legacyPrefix) + }; } function noisilyGetInput(suffix, legacyPrefix) { - const preferredInput = getStringOrUndefined(`source-${suffix}`); - if (!legacyPrefix) { - return preferredInput; - } - const legacyInput = getStringOrUndefined(`${legacyPrefix}-${suffix}`); - if (preferredInput && legacyInput) { - actionsCore7.warning( - `The supported option source-${suffix} and the legacy option ${legacyPrefix}-${suffix} are both set. Preferring source-${suffix}. Please stop setting ${legacyPrefix}-${suffix}.` - ); - return preferredInput; - } else if (legacyInput) { - actionsCore7.warning( - `The legacy option ${legacyPrefix}-${suffix} is set. Please migrate to source-${suffix}.` - ); - return legacyInput; - } else { - return preferredInput; - } + const preferredInput = getStringOrUndefined(`source-${suffix}`); + if (!legacyPrefix) return preferredInput; + const legacyInput = getStringOrUndefined(`${legacyPrefix}-${suffix}`); + if (preferredInput && legacyInput) { + actionsCore.warning(`The supported option source-${suffix} and the legacy option ${legacyPrefix}-${suffix} are both set. Preferring source-${suffix}. Please stop setting ${legacyPrefix}-${suffix}.`); + return preferredInput; + } else if (legacyInput) { + actionsCore.warning(`The legacy option ${legacyPrefix}-${suffix} is set. Please migrate to source-${suffix}.`); + return legacyInput; + } else return preferredInput; } -// src/index.ts -import * as actionsCache from "@actions/cache"; -import * as actionsCore8 from "@actions/core"; -import * as actionsExec from "@actions/exec"; -import { TimeoutError } from "got"; -import { exec as exec4 } from "child_process"; -import { randomUUID as randomUUID2 } from "crypto"; -import { - createWriteStream, - readFileSync as readFileSync2 -} from "fs"; -import fs2, { chmod, copyFile, mkdir } from "fs/promises"; -import * as os3 from "os"; -import { tmpdir } from "os"; -import * as path from "path"; -import { promisify as promisify3 } from "util"; -import { gzip as gzip2 } from "zlib"; -var pkgVersion = "1.0"; -var EVENT_BACKTRACES = "backtrace"; -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 EVENT_PREFLIGHT_REQUIRE_NIX_DENIED = "preflight-require-nix-denied"; -var EVENT_STORE_IDENTITY_FAILED = "store_identity_failed"; -var FACT_ARTIFACT_FETCHED_FROM_CACHE = "artifact_fetched_from_cache"; -var FACT_ENDED_WITH_EXCEPTION = "ended_with_exception"; -var FACT_FINAL_EXCEPTION = "final_exception"; -var FACT_OS = "$os"; -var FACT_OS_VERSION = "$os_version"; -var FACT_SOURCE_URL = "source_url"; -var FACT_SOURCE_URL_ETAG = "source_url_etag"; -var FACT_NIX_VERSION = "nix_version"; -var FACT_NIX_LOCATION = "nix_location"; -var FACT_NIX_STORE_TRUST = "nix_store_trusted"; -var FACT_NIX_STORE_VERSION = "nix_store_version"; -var FACT_NIX_STORE_CHECK_METHOD = "nix_store_check_method"; -var FACT_NIX_STORE_CHECK_ERROR = "nix_store_check_error"; -var STATE_KEY_EXECUTION_PHASE = "detsys_action_execution_phase"; -var STATE_KEY_NIX_NOT_FOUND = "detsys_action_nix_not_found"; -var STATE_NOT_FOUND = "not-found"; -var STATE_KEY_CROSS_PHASE_ID = "detsys_cross_phase_id"; -var STATE_BACKTRACE_START_TIMESTAMP = "detsys_backtrace_start_timestamp"; -var DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 1e4; -var CHECK_IN_ENDPOINT_TIMEOUT_MS = 1e3; -var PROGRAM_NAME_CRASH_DENY_LIST = [ - "nix-expr-tests", - "nix-store-tests", - "nix-util-tests" +//#endregion +//#region src/index.ts +const pkgVersion = "1.0"; +const EVENT_BACKTRACES = "backtrace"; +const EVENT_EXCEPTION = "exception"; +const EVENT_ARTIFACT_CACHE_HIT = "artifact_cache_hit"; +const EVENT_ARTIFACT_CACHE_MISS = "artifact_cache_miss"; +const EVENT_ARTIFACT_CACHE_PERSIST = "artifact_cache_persist"; +const EVENT_PREFLIGHT_REQUIRE_NIX_DENIED = "preflight-require-nix-denied"; +const EVENT_STORE_IDENTITY_FAILED = "store_identity_failed"; +const FACT_ARTIFACT_FETCHED_FROM_CACHE = "artifact_fetched_from_cache"; +const FACT_ENDED_WITH_EXCEPTION = "ended_with_exception"; +const FACT_FINAL_EXCEPTION = "final_exception"; +const FACT_OS = "$os"; +const FACT_OS_VERSION = "$os_version"; +const FACT_SOURCE_URL = "source_url"; +const FACT_SOURCE_URL_ETAG = "source_url_etag"; +const FACT_NIX_VERSION = "nix_version"; +const FACT_NIX_LOCATION = "nix_location"; +const FACT_NIX_STORE_TRUST = "nix_store_trusted"; +const FACT_NIX_STORE_VERSION = "nix_store_version"; +const FACT_NIX_STORE_CHECK_METHOD = "nix_store_check_method"; +const FACT_NIX_STORE_CHECK_ERROR = "nix_store_check_error"; +const STATE_KEY_EXECUTION_PHASE = "detsys_action_execution_phase"; +const STATE_KEY_NIX_NOT_FOUND = "detsys_action_nix_not_found"; +const STATE_NOT_FOUND = "not-found"; +const STATE_KEY_CROSS_PHASE_ID = "detsys_cross_phase_id"; +const STATE_BACKTRACE_START_TIMESTAMP = "detsys_backtrace_start_timestamp"; +const DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 1e4; +const CHECK_IN_ENDPOINT_TIMEOUT_MS = 1e3; +const PROGRAM_NAME_CRASH_DENY_LIST = [ + "nix-expr-tests", + "nix-store-tests", + "nix-util-tests" ]; -var determinateStateDir = "/var/lib/determinate"; -var determinateIdentityFile = path.join(determinateStateDir, "identity.json"); -var isRoot = os3.userInfo().uid === 0; +const determinateStateDir = "/var/lib/determinate"; +const determinateIdentityFile = path.join(determinateStateDir, "identity.json"); +const isRoot = os$1.userInfo().uid === 0; +/** Create the Determinate state directory by escalating via sudo */ async function sudoEnsureDeterminateStateDir() { - const code = await actionsExec.exec("sudo", [ - "mkdir", - "-p", - determinateStateDir - ]); - if (code !== 0) { - throw new Error(`sudo mkdir -p exit: ${code}`); - } + const code = await exec$1.exec("sudo", [ + "mkdir", + "-p", + determinateStateDir + ]); + if (code !== 0) throw new Error(`sudo mkdir -p exit: ${code}`); } +/** Ensures the Determinate state directory exists, escalating if necessary */ async function ensureDeterminateStateDir() { - if (isRoot) { - await mkdir(determinateStateDir, { recursive: true }); - } else { - return sudoEnsureDeterminateStateDir(); - } + if (isRoot) await mkdir(determinateStateDir, { recursive: true }); + else return sudoEnsureDeterminateStateDir(); } +/** Writes correlation hashes to the Determinate state directory by writing to a `sudo tee` pipe */ async function sudoWriteCorrelationHashes(hashes) { - const buffer = Buffer.from(hashes); - const code = await actionsExec.exec( - "sudo", - ["tee", determinateIdentityFile], - { - input: buffer, - // Ignore output from tee - outStream: createWriteStream("/dev/null") - } - ); - if (code !== 0) { - throw new Error(`sudo tee exit: ${code}`); - } + const buffer = Buffer.from(hashes); + const code = await exec$1.exec("sudo", ["tee", determinateIdentityFile], { + input: buffer, + outStream: createWriteStream("/dev/null") + }); + if (code !== 0) throw new Error(`sudo tee exit: ${code}`); } +/** Writes correlation hashes to the Determinate state directory, escalating if necessary */ async function writeCorrelationHashes(hashes) { - await ensureDeterminateStateDir(); - if (isRoot) { - await fs2.writeFile(determinateIdentityFile, hashes, "utf-8"); - } else { - return sudoWriteCorrelationHashes(hashes); - } + await ensureDeterminateStateDir(); + if (isRoot) await fs.writeFile(determinateIdentityFile, hashes, "utf-8"); + else return sudoWriteCorrelationHashes(hashes); } var DetSysAction = class { - determineExecutionPhase() { - const currentPhase = actionsCore8.getState(STATE_KEY_EXECUTION_PHASE); - if (currentPhase === "") { - actionsCore8.saveState(STATE_KEY_EXECUTION_PHASE, "post"); - return "main"; - } else { - return "post"; - } - } - constructor(actionOptions) { - this.actionOptions = makeOptionsConfident(actionOptions); - this.idsHost = new IdsHost( - this.actionOptions.idsProjectName, - actionOptions.diagnosticsSuffix, - // Note: we don't use actionsCore.getInput('diagnostic-endpoint') on purpose: - // getInput silently converts absent data to an empty string. - process.env["INPUT_DIAGNOSTIC-ENDPOINT"] - ); - this.exceptionAttachments = /* @__PURE__ */ new Map(); - this.nixStoreTrust = "unknown"; - this.strictMode = getBool("_internal-strict-mode"); - if (getBoolOrUndefined( - "_internal-obliterate-actions-id-token-request-variables" - ) === true) { - process.env["ACTIONS_ID_TOKEN_REQUEST_URL"] = void 0; - process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"] = void 0; - } - this.features = {}; - this.featureEventMetadata = {}; - this.events = []; - this.getCrossPhaseId(); - this.collectBacktraceSetup(); - this.facts = { - $lib: "idslib", - $lib_version: pkgVersion, - project: this.actionOptions.name, - ids_project: this.actionOptions.idsProjectName - }; - const params = [ - ["github_action_ref", "GITHUB_ACTION_REF"], - ["github_action_repository", "GITHUB_ACTION_REPOSITORY"], - ["github_event_name", "GITHUB_EVENT_NAME"], - ["$os", "RUNNER_OS"], - ["arch", "RUNNER_ARCH"] - ]; - for (const [target, env] of params) { - const value = process.env[env]; - if (value) { - this.facts[target] = value; - } - } - this.identity = identify(); - this.archOs = getArchOs(); - this.nixSystem = getNixPlatform(this.archOs); - this.facts.$app_name = `${this.actionOptions.name}/action`; - this.facts.arch_os = this.archOs; - this.facts.nix_system = this.nixSystem; - { - getDetails().then((details) => { - if (details.name !== "unknown") { - this.addFact(FACT_OS, details.name); - } - if (details.version !== "unknown") { - this.addFact(FACT_OS_VERSION, details.version); - } - }).catch((e) => { - actionsCore8.debug( - `Failure getting platform details: ${stringifyError2(e)}` - ); - }); - } - this.executionPhase = this.determineExecutionPhase(); - this.facts.execution_phase = this.executionPhase; - if (this.actionOptions.fetchStyle === "gh-env-style") { - this.architectureFetchSuffix = this.archOs; - } else if (this.actionOptions.fetchStyle === "nix-style") { - this.architectureFetchSuffix = this.nixSystem; - } else if (this.actionOptions.fetchStyle === "universal") { - this.architectureFetchSuffix = "universal"; - } else { - throw new Error( - `fetchStyle ${this.actionOptions.fetchStyle} is not a valid style` - ); - } - this.sourceParameters = constructSourceParameters( - this.actionOptions.legacySourcePrefix - ); - 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); - } - /** - * Execute the Action as defined. - */ - execute() { - this.executeAsync().catch((error3) => { - console.log(error3); - process.exitCode = 1; - }); - } - getTemporaryName() { - const tmpDir = process.env["RUNNER_TEMP"] || tmpdir(); - return path.join(tmpDir, `${this.actionOptions.name}-${randomUUID2()}`); - } - addFact(key, value) { - this.facts[key] = value; - } - async getDiagnosticsUrl() { - return await this.idsHost.getDiagnosticsUrl(); - } - getUniqueId() { - return this.identity.github_workflow_run_differentiator_hash || process.env.RUNNER_TRACKING_ID || randomUUID2(); - } - // This ID will be saved in the action's state, to be persisted across phase steps - getCrossPhaseId() { - let crossPhaseId = actionsCore8.getState(STATE_KEY_CROSS_PHASE_ID); - if (crossPhaseId === "") { - crossPhaseId = randomUUID2(); - actionsCore8.saveState(STATE_KEY_CROSS_PHASE_ID, crossPhaseId); - } - return crossPhaseId; - } - getCorrelationHashes() { - return this.identity; - } - recordEvent(eventName, context = {}) { - const prefixedName = eventName === "$feature_flag_called" ? eventName : `${this.actionOptions.eventPrefix}${eventName}`; - this.events.push({ - name: prefixedName, - // Use the anon distinct ID as the distinct ID until we actually have a distinct ID in the future - distinct_id: this.identity.$anon_distinct_id, - // distinct_id - uuid: randomUUID2(), - timestamp: /* @__PURE__ */ new Date(), - properties: { - ...context, - ...this.identity, - ...this.facts, - ...Object.fromEntries( - Object.entries(this.featureEventMetadata).map(([name, variant]) => [`$feature/${name}`, variant]) - ) - } - }); - } - /** - * Unpacks the closure returned by `fetchArtifact()`, imports the - * contents into the Nix store, and returns the path of the executable at - * `/nix/store/STORE_PATH/bin/${bin}`. - */ - async unpackClosure(bin) { - const artifact = await this.fetchArtifact(); - const { stdout } = await promisify3(exec4)( - `cat "${artifact}" | xz -d | nix-store --import` - ); - const paths = stdout.split(os3.EOL); - const lastPath = paths.at(-2); - return `${lastPath}/bin/${bin}`; - } - /** - * Fetches the executable at the URL determined by the `source-*` inputs and - * other facts, `chmod`s it, and returns the path to the executable on disk. - */ - async fetchExecutable() { - const binaryPath = await this.fetchArtifact(); - await chmod(binaryPath, fs2.constants.S_IXUSR | fs2.constants.S_IXGRP); - return binaryPath; - } - get isMain() { - return this.executionPhase === "main"; - } - get isPost() { - return this.executionPhase === "post"; - } - async executeAsync() { - try { - await this.checkIn(); - const correlationHashes = JSON.stringify(this.getCorrelationHashes()); - process.env.DETSYS_CORRELATION = correlationHashes; - try { - await writeCorrelationHashes(correlationHashes); - } catch (error3) { - this.recordEvent(EVENT_STORE_IDENTITY_FAILED, { error: String(error3) }); - } - if (!await this.preflightRequireNix()) { - this.recordEvent(EVENT_PREFLIGHT_REQUIRE_NIX_DENIED); - return; - } else { - await this.preflightNixStoreInfo(); - await this.preflightNixVersion(); - this.addFact(FACT_NIX_STORE_TRUST, this.nixStoreTrust); - } - if (this.isMain) { - await this.main(); - await this.preflightNixVersion(); - } else if (this.isPost) { - await this.post(); - } - this.addFact(FACT_ENDED_WITH_EXCEPTION, false); - } catch (e) { - this.addFact(FACT_ENDED_WITH_EXCEPTION, true); - const reportable = stringifyError2(e); - this.addFact(FACT_FINAL_EXCEPTION, reportable); - if (this.isPost) { - actionsCore8.warning(reportable); - } else { - actionsCore8.setFailed(reportable); - } - const doGzip = promisify3(gzip2); - const exceptionContext = /* @__PURE__ */ new Map(); - for (const [attachmentLabel, filePath] of this.exceptionAttachments) { - try { - const logText = readFileSync2(filePath); - const buf = await doGzip(logText); - exceptionContext.set( - `staple_value_${attachmentLabel}`, - buf.toString("base64") - ); - } catch (innerError) { - exceptionContext.set( - `staple_failure_${attachmentLabel}`, - stringifyError2(innerError) - ); - } - } - this.recordEvent(EVENT_EXCEPTION, Object.fromEntries(exceptionContext)); - } finally { - if (this.isPost) { - await this.collectBacktraces(); - } - await this.complete(); - } - } - async getClient() { - return await this.idsHost.getGot( - (incitingError, prevUrl, nextUrl) => { - this.recordPlausibleTimeout(incitingError); - this.recordEvent("ids-failover", { - previousUrl: prevUrl.toString(), - nextUrl: nextUrl.toString() - }); - } - ); - } - async checkIn() { - const checkin = await this.requestCheckIn(); - if (checkin === void 0) { - return; - } - this.features = checkin.options; - for (const [key, feature] of Object.entries(this.features)) { - this.featureEventMetadata[key] = feature.variant; - } - const impactSymbol = /* @__PURE__ */ new Map([ - ["none", "\u26AA"], - ["maintenance", "\u{1F6E0}\uFE0F"], - ["minor", "\u{1F7E1}"], - ["major", "\u{1F7E0}"], - ["critical", "\u{1F534}"] - ]); - const defaultImpactSymbol = "\u{1F535}"; - if (checkin.status !== null) { - const summaries = []; - for (const incident of checkin.status.incidents) { - summaries.push( - `${impactSymbol.get(incident.impact) || defaultImpactSymbol} ${incident.status.replace("_", " ")}: ${incident.name} (${incident.shortlink})` - ); - } - for (const maintenance of checkin.status.scheduled_maintenances) { - summaries.push( - `${impactSymbol.get(maintenance.impact) || defaultImpactSymbol} ${maintenance.status.replace("_", " ")}: ${maintenance.name} (${maintenance.shortlink})` - ); - } - if (summaries.length > 0) { - actionsCore8.info( - // Bright red, Bold, Underline - `${"\x1B[0;31m"}${"\x1B[1m"}${"\x1B[4m"}${checkin.status.page.name} Status` - ); - for (const notice of summaries) { - actionsCore8.info(notice); - } - actionsCore8.info(`See: ${checkin.status.page.url}`); - actionsCore8.info(``); - } - } - } - getFeature(name) { - if (!this.features.hasOwnProperty(name)) { - return void 0; - } - const result = this.features[name]; - if (result === void 0) { - return void 0; - } - this.recordEvent("$feature_flag_called", { - $feature_flag: name, - $feature_flag_response: result.variant - }); - return result; - } - /** - * Check in to install.determinate.systems, to accomplish three things: - * - * 1. Preflight the server selected from IdsHost, to increase the chances of success. - * 2. Fetch any incidents and maintenance events to let users know in case things are weird. - * 3. Get feature flag data so we can gently roll out new features. - */ - async requestCheckIn() { - for (let attemptsRemaining = 5; attemptsRemaining > 0; attemptsRemaining--) { - const checkInUrl = await this.getCheckInUrl(); - if (checkInUrl === void 0) { - return void 0; - } - try { - actionsCore8.debug(`Preflighting via ${checkInUrl}`); - const props = { - // Use a distinct_id when we actually have one - distinct_id: this.identity.$anon_distinct_id, - anon_distinct_id: this.identity.$anon_distinct_id, - groups: this.identity.$groups, - person_properties: { - ci: "github", - ...this.identity, - ...this.facts - } - }; - return await (await this.getClient()).post(checkInUrl, { - json: props, - timeout: { - request: CHECK_IN_ENDPOINT_TIMEOUT_MS - } - }).json(); - } catch (e) { - this.recordPlausibleTimeout(e); - actionsCore8.debug(`Error checking in: ${stringifyError2(e)}`); - this.idsHost.markCurrentHostBroken(); - } - } - return void 0; - } - recordPlausibleTimeout(e) { - if (e instanceof TimeoutError && "timings" in e && "request" in e) { - const reportContext = { - url: e.request.requestUrl?.toString(), - retry_count: e.request.retryCount - }; - for (const [key, value] of Object.entries(e.timings.phases)) { - if (Number.isFinite(value)) { - reportContext[`timing_phase_${key}`] = value; - } - } - this.recordEvent("timeout", reportContext); - } - } - /** - * Fetch an artifact, such as a tarball, from the location determined by the - * `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() { - const sourceBinary = getStringOrNull("source-binary"); - if (sourceBinary !== null && sourceBinary !== "") { - actionsCore8.debug(`Using the provided source binary at ${sourceBinary}`); - return sourceBinary; - } - actionsCore8.startGroup( - `Downloading ${this.actionOptions.name} for ${this.architectureFetchSuffix}` - ); - try { - actionsCore8.info(`Fetching from ${await this.getSourceUrl()}`); - const correlatedUrl = await this.getSourceUrl(); - correlatedUrl.searchParams.set("ci", "github"); - correlatedUrl.searchParams.set( - "correlation", - JSON.stringify(this.identity) - ); - const versionCheckup = await (await this.getClient()).head(correlatedUrl); - if (versionCheckup.headers.etag) { - const v = versionCheckup.headers.etag; - this.addFact(FACT_SOURCE_URL_ETAG, v); - actionsCore8.debug( - `Checking the tool cache for ${await this.getSourceUrl()} at ${v}` - ); - const cached = await this.getCachedVersion(v); - if (cached) { - this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = true; - actionsCore8.debug(`Tool cache hit.`); - return cached; - } - } - this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = false; - actionsCore8.debug( - `No match from the cache, re-fetching from the redirect: ${versionCheckup.url}` - ); - const destFile = this.getTemporaryName(); - const fetchStream = await this.downloadFile( - new URL(versionCheckup.url), - destFile - ); - if (fetchStream.response?.headers.etag) { - const v = fetchStream.response.headers.etag; - try { - await this.saveCachedVersion(v, destFile); - } catch (e) { - actionsCore8.debug(`Error caching the artifact: ${stringifyError2(e)}`); - } - } - return destFile; - } catch (e) { - this.recordPlausibleTimeout(e); - throw e; - } finally { - actionsCore8.endGroup(); - } - } - /** - * A helper function for failing on error only if strict mode is enabled. - * This is intended only for CI environments testing Actions themselves. - */ - failOnError(msg) { - if (this.strictMode) { - actionsCore8.setFailed(`strict mode failure: ${msg}`); - } - } - async downloadFile(url, destination) { - const client = await this.getClient(); - return new Promise((resolve, reject) => { - let writeStream; - let failed = false; - const retry = (stream) => { - if (writeStream) { - writeStream.destroy(); - } - writeStream = createWriteStream(destination, { - encoding: "binary", - mode: 493 - }); - writeStream.once("error", (error3) => { - failed = true; - reject(error3); - }); - writeStream.on("finish", () => { - if (!failed) { - resolve(stream); - } - }); - stream.once("retry", (_count, _error, createRetryStream) => { - retry(createRetryStream()); - }); - stream.pipe(writeStream); - }; - retry(client.stream(url)); - }); - } - async complete() { - this.recordEvent(`complete_${this.executionPhase}`); - await this.submitEvents(); - } - async getCheckInUrl() { - const checkInUrl = await this.idsHost.getDynamicRootUrl(); - if (checkInUrl === void 0) { - return void 0; - } - checkInUrl.pathname += "check-in"; - return checkInUrl; - } - async getSourceUrl() { - const p = this.sourceParameters; - if (p.url) { - this.addFact(FACT_SOURCE_URL, p.url); - return new URL(p.url); - } - const fetchUrl = await this.idsHost.getRootUrl(); - fetchUrl.pathname += this.actionOptions.idsProjectName; - if (p.tag) { - fetchUrl.pathname += `/tag/${p.tag}`; - } else if (p.pr) { - fetchUrl.pathname += `/pr/${p.pr}`; - } else if (p.branch) { - fetchUrl.pathname += `/branch/${p.branch}`; - } else if (p.revision) { - fetchUrl.pathname += `/rev/${p.revision}`; - } else { - fetchUrl.pathname += `/stable`; - } - fetchUrl.pathname += `/${this.architectureFetchSuffix}`; - this.addFact(FACT_SOURCE_URL, fetchUrl.toString()); - return fetchUrl; - } - cacheKey(version) { - const cleanedVersion = version.replace(/[^a-zA-Z0-9-+.]/g, ""); - return `determinatesystem-${this.actionOptions.name}-${this.architectureFetchSuffix}-${cleanedVersion}`; - } - async getCachedVersion(version) { - const startCwd = process.cwd(); - try { - const tempDir = this.getTemporaryName(); - await mkdir(tempDir); - process.chdir(tempDir); - process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; - delete process.env.GITHUB_WORKSPACE; - if (await actionsCache.restoreCache( - [this.actionOptions.name], - this.cacheKey(version), - [], - void 0, - true - )) { - this.recordEvent(EVENT_ARTIFACT_CACHE_HIT); - return `${tempDir}/${this.actionOptions.name}`; - } - this.recordEvent(EVENT_ARTIFACT_CACHE_MISS); - return void 0; - } finally { - process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; - delete process.env.GITHUB_WORKSPACE_BACKUP; - process.chdir(startCwd); - } - } - async saveCachedVersion(version, toolPath) { - const startCwd = process.cwd(); - try { - const tempDir = this.getTemporaryName(); - await mkdir(tempDir); - process.chdir(tempDir); - await copyFile(toolPath, `${tempDir}/${this.actionOptions.name}`); - process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; - delete process.env.GITHUB_WORKSPACE; - await actionsCache.saveCache( - [this.actionOptions.name], - this.cacheKey(version), - void 0, - true - ); - this.recordEvent(EVENT_ARTIFACT_CACHE_PERSIST); - } finally { - process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; - delete process.env.GITHUB_WORKSPACE_BACKUP; - process.chdir(startCwd); - } - } - collectBacktraceSetup() { - if (!process.env.DETSYS_BACKTRACE_COLLECTOR) { - actionsCore8.exportVariable( - "DETSYS_BACKTRACE_COLLECTOR", - this.getCrossPhaseId() - ); - actionsCore8.saveState(STATE_BACKTRACE_START_TIMESTAMP, Date.now()); - } - } - async collectBacktraces() { - try { - if (process.env.DETSYS_BACKTRACE_COLLECTOR !== this.getCrossPhaseId()) { - return; - } - const backtraces = await collectBacktraces( - this.actionOptions.binaryNamePrefixes, - this.actionOptions.binaryNamesDenyList, - parseInt(actionsCore8.getState(STATE_BACKTRACE_START_TIMESTAMP)) - ); - actionsCore8.debug(`Backtraces identified: ${backtraces.size}`); - if (backtraces.size > 0) { - this.recordEvent(EVENT_BACKTRACES, Object.fromEntries(backtraces)); - } - } catch (innerError) { - actionsCore8.debug( - `Error collecting backtraces: ${stringifyError2(innerError)}` - ); - } - } - async preflightRequireNix() { - let nixLocation; - const pathParts = (process.env["PATH"] || "").split(":"); - for (const location of pathParts) { - const candidateNix = path.join(location, "nix"); - try { - await fs2.access(candidateNix, fs2.constants.X_OK); - actionsCore8.debug(`Found Nix at ${candidateNix}`); - nixLocation = candidateNix; - break; - } catch { - actionsCore8.debug(`Nix not at ${candidateNix}`); - } - } - this.addFact(FACT_NIX_LOCATION, nixLocation || ""); - if (this.actionOptions.requireNix === "ignore") { - return true; - } - const currentNotFoundState = actionsCore8.getState(STATE_KEY_NIX_NOT_FOUND); - if (currentNotFoundState === STATE_NOT_FOUND) { - return false; - } - if (nixLocation !== void 0) { - return true; - } - actionsCore8.saveState(STATE_KEY_NIX_NOT_FOUND, STATE_NOT_FOUND); - switch (this.actionOptions.requireNix) { - case "fail": - actionsCore8.setFailed( - [ - "This action can only be used when Nix is installed.", - "Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow." - ].join(" ") - ); - break; - case "warn": - actionsCore8.warning( - [ - "This action is in no-op mode because Nix is not installed.", - "Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow." - ].join(" ") - ); - break; - } - return false; - } - async preflightNixStoreInfo() { - let output = ""; - const options = {}; - options.silent = true; - options.listeners = { - stdout: (data) => { - output += data.toString(); - } - }; - try { - output = ""; - await actionsExec.exec("nix", ["store", "info", "--json"], options); - this.addFact(FACT_NIX_STORE_CHECK_METHOD, "info"); - } catch { - try { - output = ""; - await actionsExec.exec("nix", ["store", "ping", "--json"], options); - this.addFact(FACT_NIX_STORE_CHECK_METHOD, "ping"); - } catch { - this.addFact(FACT_NIX_STORE_CHECK_METHOD, "none"); - return; - } - } - try { - const parsed = JSON.parse(output); - if (parsed.trusted === 1) { - this.nixStoreTrust = "trusted"; - } else if (parsed.trusted === 0) { - this.nixStoreTrust = "untrusted"; - } else if (parsed.trusted !== void 0) { - this.addFact( - FACT_NIX_STORE_CHECK_ERROR, - `Mysterious trusted value: ${JSON.stringify(parsed.trusted)}` - ); - } - this.addFact(FACT_NIX_STORE_VERSION, JSON.stringify(parsed.version)); - } catch (e) { - this.addFact(FACT_NIX_STORE_CHECK_ERROR, stringifyError2(e)); - } - } - async preflightNixVersion() { - let output = "unknown"; - try { - ({ stdout: output } = await actionsExec.getExecOutput( - "nix", - ["--version"], - { - silent: true - } - )); - output = output.trim() || "unknown"; - } catch { - } - this.addFact(FACT_NIX_VERSION, output); - } - async submitEvents() { - const diagnosticsUrl = await this.idsHost.getDiagnosticsUrl(); - if (diagnosticsUrl === void 0) { - actionsCore8.debug( - "Diagnostics are disabled. Not sending the following events:" - ); - actionsCore8.debug(JSON.stringify(this.events, void 0, 2)); - return; - } - const batch = { - sent_at: /* @__PURE__ */ new Date(), - batch: this.events - }; - try { - await (await this.getClient()).post(diagnosticsUrl, { - json: batch, - timeout: { - request: DIAGNOSTIC_ENDPOINT_TIMEOUT_MS - } - }); - } catch (err) { - this.recordPlausibleTimeout(err); - actionsCore8.debug( - `Error submitting diagnostics event to ${diagnosticsUrl}: ${stringifyError2(err)}` - ); - } - this.events = []; - } + determineExecutionPhase() { + if (actionsCore.getState(STATE_KEY_EXECUTION_PHASE) === "") { + actionsCore.saveState(STATE_KEY_EXECUTION_PHASE, "post"); + return "main"; + } else return "post"; + } + constructor(actionOptions) { + this.actionOptions = makeOptionsConfident(actionOptions); + this.idsHost = new IdsHost(this.actionOptions.idsProjectName, actionOptions.diagnosticsSuffix, process.env["INPUT_DIAGNOSTIC-ENDPOINT"]); + this.exceptionAttachments = /* @__PURE__ */ new Map(); + this.nixStoreTrust = "unknown"; + this.strictMode = getBool("_internal-strict-mode"); + if (getBoolOrUndefined("_internal-obliterate-actions-id-token-request-variables") === true) { + process.env["ACTIONS_ID_TOKEN_REQUEST_URL"] = void 0; + process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"] = void 0; + } + this.features = {}; + this.featureEventMetadata = {}; + this.events = []; + this.getCrossPhaseId(); + this.collectBacktraceSetup(); + this.facts = { + $lib: "idslib", + $lib_version: pkgVersion, + project: this.actionOptions.name, + ids_project: this.actionOptions.idsProjectName + }; + const params = [ + ["github_action_ref", "GITHUB_ACTION_REF"], + ["github_action_repository", "GITHUB_ACTION_REPOSITORY"], + ["github_event_name", "GITHUB_EVENT_NAME"], + ["$os", "RUNNER_OS"], + ["arch", "RUNNER_ARCH"] + ]; + for (const [target, env] of params) { + const value = process.env[env]; + if (value) this.facts[target] = value; + } + this.identity = identify(); + this.archOs = getArchOs(); + this.nixSystem = getNixPlatform(this.archOs); + this.facts.$app_name = `${this.actionOptions.name}/action`; + this.facts.arch_os = this.archOs; + this.facts.nix_system = this.nixSystem; + getDetails().then((details) => { + if (details.name !== "unknown") this.addFact(FACT_OS, details.name); + if (details.version !== "unknown") this.addFact(FACT_OS_VERSION, details.version); + }).catch((e) => { + actionsCore.debug(`Failure getting platform details: ${stringifyError$1(e)}`); + }); + this.executionPhase = this.determineExecutionPhase(); + this.facts.execution_phase = this.executionPhase; + if (this.actionOptions.fetchStyle === "gh-env-style") this.architectureFetchSuffix = this.archOs; + else if (this.actionOptions.fetchStyle === "nix-style") this.architectureFetchSuffix = this.nixSystem; + else if (this.actionOptions.fetchStyle === "universal") this.architectureFetchSuffix = "universal"; + else throw new Error(`fetchStyle ${this.actionOptions.fetchStyle} is not a valid style`); + this.sourceParameters = constructSourceParameters(this.actionOptions.legacySourcePrefix); + 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); + } + /** + * Execute the Action as defined. + */ + execute() { + this.executeAsync().catch((error) => { + console.log(error); + process.exitCode = 1; + }); + } + getTemporaryName() { + const tmpDir = process.env["RUNNER_TEMP"] || tmpdir(); + return path.join(tmpDir, `${this.actionOptions.name}-${randomUUID()}`); + } + addFact(key, value) { + this.facts[key] = value; + } + async getDiagnosticsUrl() { + return await this.idsHost.getDiagnosticsUrl(); + } + getUniqueId() { + return this.identity.github_workflow_run_differentiator_hash || process.env.RUNNER_TRACKING_ID || randomUUID(); + } + getCrossPhaseId() { + let crossPhaseId = actionsCore.getState(STATE_KEY_CROSS_PHASE_ID); + if (crossPhaseId === "") { + crossPhaseId = randomUUID(); + actionsCore.saveState(STATE_KEY_CROSS_PHASE_ID, crossPhaseId); + } + return crossPhaseId; + } + getCorrelationHashes() { + return this.identity; + } + recordEvent(eventName, context = {}) { + const prefixedName = eventName === "$feature_flag_called" ? eventName : `${this.actionOptions.eventPrefix}${eventName}`; + this.events.push({ + name: prefixedName, + distinct_id: this.identity.$anon_distinct_id, + uuid: randomUUID(), + timestamp: /* @__PURE__ */ new Date(), + properties: { + ...context, + ...this.identity, + ...this.facts, + ...Object.fromEntries(Object.entries(this.featureEventMetadata).map(([name, variant]) => [`$feature/${name}`, variant])) + } + }); + } + /** + * Unpacks the closure returned by `fetchArtifact()`, imports the + * contents into the Nix store, and returns the path of the executable at + * `/nix/store/STORE_PATH/bin/${bin}`. + */ + async unpackClosure(bin) { + const artifact = await this.fetchArtifact(); + const { stdout } = await promisify(exec)(`cat "${artifact}" | xz -d | nix-store --import`); + return `${stdout.split(os$1.EOL).at(-2)}/bin/${bin}`; + } + /** + * Fetches the executable at the URL determined by the `source-*` inputs and + * other facts, `chmod`s it, and returns the path to the executable on disk. + */ + async fetchExecutable() { + const binaryPath = await this.fetchArtifact(); + await chmod(binaryPath, constants.S_IXUSR | constants.S_IXGRP); + return binaryPath; + } + get isMain() { + return this.executionPhase === "main"; + } + get isPost() { + return this.executionPhase === "post"; + } + async executeAsync() { + try { + await this.checkIn(); + const correlationHashes = JSON.stringify(this.getCorrelationHashes()); + process.env.DETSYS_CORRELATION = correlationHashes; + try { + await writeCorrelationHashes(correlationHashes); + } catch (error) { + this.recordEvent(EVENT_STORE_IDENTITY_FAILED, { error: String(error) }); + } + if (!await this.preflightRequireNix()) { + this.recordEvent(EVENT_PREFLIGHT_REQUIRE_NIX_DENIED); + return; + } else { + await this.preflightNixStoreInfo(); + await this.preflightNixVersion(); + this.addFact(FACT_NIX_STORE_TRUST, this.nixStoreTrust); + } + if (this.isMain) { + await this.main(); + await this.preflightNixVersion(); + } else if (this.isPost) await this.post(); + this.addFact(FACT_ENDED_WITH_EXCEPTION, false); + } catch (e) { + this.addFact(FACT_ENDED_WITH_EXCEPTION, true); + const reportable = stringifyError$1(e); + this.addFact(FACT_FINAL_EXCEPTION, reportable); + if (this.isPost) actionsCore.warning(reportable); + else actionsCore.setFailed(reportable); + const doGzip = promisify(gzip); + const exceptionContext = /* @__PURE__ */ new Map(); + for (const [attachmentLabel, filePath] of this.exceptionAttachments) try { + const logText = readFileSync(filePath); + const buf = await doGzip(logText); + exceptionContext.set(`staple_value_${attachmentLabel}`, buf.toString("base64")); + } catch (innerError) { + exceptionContext.set(`staple_failure_${attachmentLabel}`, stringifyError$1(innerError)); + } + this.recordEvent(EVENT_EXCEPTION, Object.fromEntries(exceptionContext)); + } finally { + if (this.isPost) await this.collectBacktraces(); + await this.complete(); + } + } + async getClient() { + return await this.idsHost.getGot((incitingError, prevUrl, nextUrl) => { + this.recordPlausibleTimeout(incitingError); + this.recordEvent("ids-failover", { + previousUrl: prevUrl.toString(), + nextUrl: nextUrl.toString() + }); + }); + } + async checkIn() { + const checkin = await this.requestCheckIn(); + if (checkin === void 0) return; + this.features = checkin.options; + for (const [key, feature] of Object.entries(this.features)) this.featureEventMetadata[key] = feature.variant; + const impactSymbol = new Map([ + ["none", "⚪"], + ["maintenance", "🛠️"], + ["minor", "🟡"], + ["major", "🟠"], + ["critical", "🔴"] + ]); + const defaultImpactSymbol = "🔵"; + if (checkin.status !== null) { + const summaries = []; + for (const incident of checkin.status.incidents) summaries.push(`${impactSymbol.get(incident.impact) || defaultImpactSymbol} ${incident.status.replace("_", " ")}: ${incident.name} (${incident.shortlink})`); + for (const maintenance of checkin.status.scheduled_maintenances) summaries.push(`${impactSymbol.get(maintenance.impact) || defaultImpactSymbol} ${maintenance.status.replace("_", " ")}: ${maintenance.name} (${maintenance.shortlink})`); + if (summaries.length > 0) { + actionsCore.info(`${checkin.status.page.name} Status`); + for (const notice of summaries) actionsCore.info(notice); + actionsCore.info(`See: ${checkin.status.page.url}`); + actionsCore.info(``); + } + } + } + getFeature(name) { + if (!this.features.hasOwnProperty(name)) return; + const result = this.features[name]; + if (result === void 0) return; + this.recordEvent("$feature_flag_called", { + $feature_flag: name, + $feature_flag_response: result.variant + }); + return result; + } + /** + * Check in to install.determinate.systems, to accomplish three things: + * + * 1. Preflight the server selected from IdsHost, to increase the chances of success. + * 2. Fetch any incidents and maintenance events to let users know in case things are weird. + * 3. Get feature flag data so we can gently roll out new features. + */ + async requestCheckIn() { + for (let attemptsRemaining = 5; attemptsRemaining > 0; attemptsRemaining--) { + const checkInUrl = await this.getCheckInUrl(); + if (checkInUrl === void 0) return; + try { + actionsCore.debug(`Preflighting via ${checkInUrl}`); + const props = { + distinct_id: this.identity.$anon_distinct_id, + anon_distinct_id: this.identity.$anon_distinct_id, + groups: this.identity.$groups, + person_properties: { + ci: "github", + ...this.identity, + ...this.facts + } + }; + return await (await this.getClient()).post(checkInUrl, { + json: props, + timeout: { request: CHECK_IN_ENDPOINT_TIMEOUT_MS } + }).json(); + } catch (e) { + this.recordPlausibleTimeout(e); + actionsCore.debug(`Error checking in: ${stringifyError$1(e)}`); + this.idsHost.markCurrentHostBroken(); + } + } + } + recordPlausibleTimeout(e) { + if (e instanceof TimeoutError && "timings" in e && "request" in e) { + const reportContext = { + url: e.request.requestUrl?.toString(), + retry_count: e.request.retryCount + }; + for (const [key, value] of Object.entries(e.timings.phases)) if (Number.isFinite(value)) reportContext[`timing_phase_${key}`] = value; + this.recordEvent("timeout", reportContext); + } + } + /** + * Fetch an artifact, such as a tarball, from the location determined by the + * `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() { + const sourceBinary = getStringOrNull("source-binary"); + if (sourceBinary !== null && sourceBinary !== "") { + actionsCore.debug(`Using the provided source binary at ${sourceBinary}`); + return sourceBinary; + } + actionsCore.startGroup(`Downloading ${this.actionOptions.name} for ${this.architectureFetchSuffix}`); + try { + actionsCore.info(`Fetching from ${await this.getSourceUrl()}`); + const correlatedUrl = await this.getSourceUrl(); + correlatedUrl.searchParams.set("ci", "github"); + correlatedUrl.searchParams.set("correlation", JSON.stringify(this.identity)); + const versionCheckup = await (await this.getClient()).head(correlatedUrl); + if (versionCheckup.headers.etag) { + const v = versionCheckup.headers.etag; + this.addFact(FACT_SOURCE_URL_ETAG, v); + actionsCore.debug(`Checking the tool cache for ${await this.getSourceUrl()} at ${v}`); + const cached = await this.getCachedVersion(v); + if (cached) { + this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = true; + actionsCore.debug(`Tool cache hit.`); + return cached; + } + } + this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = false; + actionsCore.debug(`No match from the cache, re-fetching from the redirect: ${versionCheckup.url}`); + const destFile = this.getTemporaryName(); + const fetchStream = await this.downloadFile(new URL(versionCheckup.url), destFile); + if (fetchStream.response?.headers.etag) { + const v = fetchStream.response.headers.etag; + try { + await this.saveCachedVersion(v, destFile); + } catch (e) { + actionsCore.debug(`Error caching the artifact: ${stringifyError$1(e)}`); + } + } + return destFile; + } catch (e) { + this.recordPlausibleTimeout(e); + throw e; + } finally { + actionsCore.endGroup(); + } + } + /** + * A helper function for failing on error only if strict mode is enabled. + * This is intended only for CI environments testing Actions themselves. + */ + failOnError(msg) { + if (this.strictMode) actionsCore.setFailed(`strict mode failure: ${msg}`); + } + async downloadFile(url, destination) { + const client = await this.getClient(); + return new Promise((resolve, reject) => { + let writeStream; + let failed = false; + const retry = (stream) => { + if (writeStream) writeStream.destroy(); + writeStream = createWriteStream(destination, { + encoding: "binary", + mode: 493 + }); + writeStream.once("error", (error) => { + failed = true; + reject(error); + }); + writeStream.on("finish", () => { + if (!failed) resolve(stream); + }); + stream.once("retry", (_count, _error, createRetryStream) => { + retry(createRetryStream()); + }); + stream.pipe(writeStream); + }; + retry(client.stream(url)); + }); + } + async complete() { + this.recordEvent(`complete_${this.executionPhase}`); + await this.submitEvents(); + } + async getCheckInUrl() { + const checkInUrl = await this.idsHost.getDynamicRootUrl(); + if (checkInUrl === void 0) return; + checkInUrl.pathname += "check-in"; + return checkInUrl; + } + async getSourceUrl() { + const p = this.sourceParameters; + if (p.url) { + this.addFact(FACT_SOURCE_URL, p.url); + return new URL(p.url); + } + const fetchUrl = await this.idsHost.getRootUrl(); + fetchUrl.pathname += this.actionOptions.idsProjectName; + if (p.tag) fetchUrl.pathname += `/tag/${p.tag}`; + else if (p.pr) fetchUrl.pathname += `/pr/${p.pr}`; + else if (p.branch) fetchUrl.pathname += `/branch/${p.branch}`; + else if (p.revision) fetchUrl.pathname += `/rev/${p.revision}`; + else fetchUrl.pathname += `/stable`; + fetchUrl.pathname += `/${this.architectureFetchSuffix}`; + this.addFact(FACT_SOURCE_URL, fetchUrl.toString()); + return fetchUrl; + } + cacheKey(version) { + const cleanedVersion = version.replace(/[^a-zA-Z0-9-+.]/g, ""); + return `determinatesystem-${this.actionOptions.name}-${this.architectureFetchSuffix}-${cleanedVersion}`; + } + async getCachedVersion(version) { + const startCwd = process.cwd(); + try { + const tempDir = this.getTemporaryName(); + await mkdir(tempDir); + process.chdir(tempDir); + process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; + delete process.env.GITHUB_WORKSPACE; + if (await actionsCache.restoreCache([this.actionOptions.name], this.cacheKey(version), [], void 0, true)) { + this.recordEvent(EVENT_ARTIFACT_CACHE_HIT); + return `${tempDir}/${this.actionOptions.name}`; + } + this.recordEvent(EVENT_ARTIFACT_CACHE_MISS); + return; + } finally { + process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; + delete process.env.GITHUB_WORKSPACE_BACKUP; + process.chdir(startCwd); + } + } + async saveCachedVersion(version, toolPath) { + const startCwd = process.cwd(); + try { + const tempDir = this.getTemporaryName(); + await mkdir(tempDir); + process.chdir(tempDir); + await copyFile(toolPath, `${tempDir}/${this.actionOptions.name}`); + process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE; + delete process.env.GITHUB_WORKSPACE; + await actionsCache.saveCache([this.actionOptions.name], this.cacheKey(version), void 0, true); + this.recordEvent(EVENT_ARTIFACT_CACHE_PERSIST); + } finally { + process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP; + delete process.env.GITHUB_WORKSPACE_BACKUP; + process.chdir(startCwd); + } + } + collectBacktraceSetup() { + if (!process.env.DETSYS_BACKTRACE_COLLECTOR) { + actionsCore.exportVariable("DETSYS_BACKTRACE_COLLECTOR", this.getCrossPhaseId()); + actionsCore.saveState(STATE_BACKTRACE_START_TIMESTAMP, Date.now()); + } + } + async collectBacktraces() { + try { + if (process.env.DETSYS_BACKTRACE_COLLECTOR !== this.getCrossPhaseId()) return; + const backtraces = await collectBacktraces(this.actionOptions.binaryNamePrefixes, this.actionOptions.binaryNamesDenyList, parseInt(actionsCore.getState(STATE_BACKTRACE_START_TIMESTAMP))); + actionsCore.debug(`Backtraces identified: ${backtraces.size}`); + if (backtraces.size > 0) this.recordEvent(EVENT_BACKTRACES, Object.fromEntries(backtraces)); + } catch (innerError) { + actionsCore.debug(`Error collecting backtraces: ${stringifyError$1(innerError)}`); + } + } + async preflightRequireNix() { + let nixLocation; + const pathParts = (process.env["PATH"] || "").split(":"); + for (const location of pathParts) { + const candidateNix = path.join(location, "nix"); + try { + await fs.access(candidateNix, fs.constants.X_OK); + actionsCore.debug(`Found Nix at ${candidateNix}`); + nixLocation = candidateNix; + break; + } catch { + actionsCore.debug(`Nix not at ${candidateNix}`); + } + } + this.addFact(FACT_NIX_LOCATION, nixLocation || ""); + if (this.actionOptions.requireNix === "ignore") return true; + if (actionsCore.getState(STATE_KEY_NIX_NOT_FOUND) === STATE_NOT_FOUND) return false; + if (nixLocation !== void 0) return true; + actionsCore.saveState(STATE_KEY_NIX_NOT_FOUND, STATE_NOT_FOUND); + switch (this.actionOptions.requireNix) { + case "fail": + actionsCore.setFailed(["This action can only be used when Nix is installed.", "Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow."].join(" ")); + break; + case "warn": + actionsCore.warning(["This action is in no-op mode because Nix is not installed.", "Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow."].join(" ")); + break; + } + return false; + } + async preflightNixStoreInfo() { + let output = ""; + const options = {}; + options.silent = true; + options.listeners = { stdout: (data) => { + output += data.toString(); + } }; + try { + output = ""; + await exec$1.exec("nix", [ + "store", + "info", + "--json" + ], options); + this.addFact(FACT_NIX_STORE_CHECK_METHOD, "info"); + } catch { + try { + output = ""; + await exec$1.exec("nix", [ + "store", + "ping", + "--json" + ], options); + this.addFact(FACT_NIX_STORE_CHECK_METHOD, "ping"); + } catch { + this.addFact(FACT_NIX_STORE_CHECK_METHOD, "none"); + return; + } + } + try { + const parsed = JSON.parse(output); + if (parsed.trusted === 1) this.nixStoreTrust = "trusted"; + else if (parsed.trusted === 0) this.nixStoreTrust = "untrusted"; + else if (parsed.trusted !== void 0) this.addFact(FACT_NIX_STORE_CHECK_ERROR, `Mysterious trusted value: ${JSON.stringify(parsed.trusted)}`); + this.addFact(FACT_NIX_STORE_VERSION, JSON.stringify(parsed.version)); + } catch (e) { + this.addFact(FACT_NIX_STORE_CHECK_ERROR, stringifyError$1(e)); + } + } + async preflightNixVersion() { + let output = "unknown"; + try { + ({stdout: output} = await exec$1.getExecOutput("nix", ["--version"], { silent: true })); + output = output.trim() || "unknown"; + } catch {} + this.addFact(FACT_NIX_VERSION, output); + } + async submitEvents() { + const diagnosticsUrl = await this.idsHost.getDiagnosticsUrl(); + if (diagnosticsUrl === void 0) { + actionsCore.debug("Diagnostics are disabled. Not sending the following events:"); + actionsCore.debug(JSON.stringify(this.events, void 0, 2)); + return; + } + const batch = { + sent_at: /* @__PURE__ */ new Date(), + batch: this.events + }; + try { + await (await this.getClient()).post(diagnosticsUrl, { + json: batch, + timeout: { request: DIAGNOSTIC_ENDPOINT_TIMEOUT_MS } + }); + } catch (err) { + this.recordPlausibleTimeout(err); + actionsCore.debug(`Error submitting diagnostics event to ${diagnosticsUrl}: ${stringifyError$1(err)}`); + } + this.events = []; + } }; -function stringifyError2(error3) { - return error3 instanceof Error || typeof error3 == "string" ? error3.toString() : JSON.stringify(error3); +function stringifyError$1(error) { + return error instanceof Error || typeof error == "string" ? error.toString() : JSON.stringify(error); } function makeOptionsConfident(actionOptions) { - const idsProjectName = actionOptions.idsProjectName ?? actionOptions.name; - const finalOpts = { - name: actionOptions.name, - idsProjectName, - eventPrefix: actionOptions.eventPrefix || "action:", - fetchStyle: actionOptions.fetchStyle, - legacySourcePrefix: actionOptions.legacySourcePrefix, - requireNix: actionOptions.requireNix, - binaryNamePrefixes: actionOptions.binaryNamePrefixes ?? [ - "nix", - "determinate-nixd", - actionOptions.name - ], - binaryNamesDenyList: actionOptions.binaryNamePrefixes ?? PROGRAM_NAME_CRASH_DENY_LIST - }; - actionsCore8.debug("idslib options:"); - actionsCore8.debug(JSON.stringify(finalOpts, void 0, 2)); - return finalOpts; + const idsProjectName = actionOptions.idsProjectName ?? actionOptions.name; + const finalOpts = { + name: actionOptions.name, + idsProjectName, + eventPrefix: actionOptions.eventPrefix || "action:", + fetchStyle: actionOptions.fetchStyle, + legacySourcePrefix: actionOptions.legacySourcePrefix, + requireNix: actionOptions.requireNix, + binaryNamePrefixes: actionOptions.binaryNamePrefixes ?? [ + "nix", + "determinate-nixd", + actionOptions.name + ], + binaryNamesDenyList: actionOptions.binaryNamePrefixes ?? PROGRAM_NAME_CRASH_DENY_LIST + }; + actionsCore.debug("idslib options:"); + actionsCore.debug(JSON.stringify(finalOpts, void 0, 2)); + return finalOpts; } -export { - DetSysAction, - IdsHost, - inputs_exports as inputs, - platform_exports as platform, - stringifyError -}; -/*! - * linux-release-info - * Get Linux release info (distribution name, version, arch, release, etc.) - * from '/etc/os-release' or '/usr/lib/os-release' files and from native os - * module. On Windows and Darwin platforms it only returns common node os module - * info (platform, hostname, release, and arch) - * - * Licensed under MIT - * Copyright (c) 2018-2020 [Samuel Carreira] - */ + +//#endregion +export { DetSysAction, IdsHost, inputs_exports as inputs, platform_exports as platform, stringifyError }; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index cb0ed76..6e6b0a6 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/linux-release-info.ts","../src/actions-core-platform.ts","../src/errors.ts","../src/backtrace.ts","../src/correlation.ts","../src/ids-host.ts","../src/inputs.ts","../src/platform.ts","../src/sourcedef.ts","../src/index.ts"],"sourcesContent":["/*!\n * linux-release-info\n * Get Linux release info (distribution name, version, arch, release, etc.)\n * from '/etc/os-release' or '/usr/lib/os-release' files and from native os\n * module. On Windows and Darwin platforms it only returns common node os module\n * info (platform, hostname, release, and arch)\n *\n * Licensed under MIT\n * Copyright (c) 2018-2020 [Samuel Carreira]\n */\n// NOTE: we depend on this directly to get around some un-fun issues with mixing CommonJS\n// and ESM in the bundle. We've modified the original logic to improve things like typing\n// and fixing ESLint issues. Originally drawn from:\n// https://github.com/samuelcarreira/linux-release-info/blob/84a91aa5442b47900da03020c590507545d3dc74/src/index.ts\nimport * as fs from \"node:fs\";\nimport * as os from \"node:os\";\nimport { promisify } from \"node:util\";\n\nconst readFileAsync = promisify(fs.readFile);\n\nexport interface LinuxReleaseInfoOptions {\n /**\n * read mode, possible values: 'async' and 'sync'\n *\n * @default 'async'\n */\n mode?: \"async\" | \"sync\";\n /**\n * custom complete file path with os info default null/none\n * if not provided the system will search on the '/etc/os-release'\n * and '/usr/lib/os-release' files\n *\n * @default null\n */\n customFile?: string | null | undefined;\n /**\n * if true, show console debug messages\n *\n * @default false\n */\n debug?: boolean;\n}\n\nconst linuxReleaseInfoOptionsDefaults: LinuxReleaseInfoOptions = {\n mode: \"async\",\n customFile: null,\n debug: false,\n};\n\n/**\n * Get OS release info from 'os-release' file and from native os module\n * on Windows or Darwin it only returns common os module info\n * (uses native fs module)\n * @returns {object} info from the current os\n */\nexport function releaseInfo(infoOptions: LinuxReleaseInfoOptions): object {\n const options = { ...linuxReleaseInfoOptionsDefaults, ...infoOptions };\n\n const searchOsReleaseFileList: string[] = osReleaseFileList(\n options.customFile,\n );\n\n if (os.type() !== \"Linux\") {\n if (options.mode === \"sync\") {\n return getOsInfo();\n } else {\n return Promise.resolve(getOsInfo());\n }\n }\n\n if (options.mode === \"sync\") {\n return readSyncOsreleaseFile(searchOsReleaseFileList, options);\n } else {\n return Promise.resolve(\n readAsyncOsReleaseFile(searchOsReleaseFileList, options),\n );\n }\n}\n\n/**\n * Format file data: convert data to object keys/values\n *\n * @param {object} sourceData Source object to be appended\n * @param {string} srcParseData Input file data to be parsed\n * @returns {object} Formated object\n */\nfunction formatFileData(sourceData: OsInfo, srcParseData: string): OsInfo {\n const lines: string[] = srcParseData.split(\"\\n\");\n\n for (const line of lines) {\n const lineData = line.split(\"=\");\n\n if (lineData.length === 2) {\n lineData[1] = lineData[1].replace(/[\"'\\r]/gi, \"\"); // remove quotes and return character\n\n Object.defineProperty(sourceData, lineData[0].toLowerCase(), {\n value: lineData[1],\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n\n return sourceData;\n}\n\n/**\n * Export a list of os-release files\n *\n * @param {string} customFile optional custom complete filepath\n * @returns {array} list of os-release files\n */\nfunction osReleaseFileList(customFile: string | null | undefined): string[] {\n const DEFAULT_OS_RELEASE_FILES = [\"/etc/os-release\", \"/usr/lib/os-release\"];\n\n if (!customFile) {\n return DEFAULT_OS_RELEASE_FILES;\n } else {\n return Array(customFile);\n }\n}\n\n/**\n * Operating system info.\n */\ntype OsInfo = {\n type: string;\n platform: string;\n hostname: string;\n arch: string;\n release: string;\n};\n\n/**\n * Get OS Basic Info\n * (uses node 'os' native module)\n *\n * @returns {OsInfo} os basic info\n */\nfunction getOsInfo(): OsInfo {\n return {\n type: os.type(),\n platform: os.platform(),\n hostname: os.hostname(),\n arch: os.arch(),\n release: os.release(),\n };\n}\n\n/* Helper functions */\n\nasync function readAsyncOsReleaseFile(\n fileList: string[],\n options: LinuxReleaseInfoOptions,\n): Promise {\n let fileData = null;\n\n for (const osReleaseFile of fileList) {\n try {\n if (options.debug) {\n /* eslint-disable no-console */\n console.log(`Trying to read '${osReleaseFile}'...`);\n }\n\n fileData = await readFileAsync(osReleaseFile, \"binary\");\n\n if (options.debug) {\n console.log(`Read data:\\n${fileData}`);\n }\n\n break;\n } catch (error) {\n if (options.debug) {\n console.error(error);\n }\n }\n }\n\n if (fileData === null) {\n throw new Error(\"Cannot read os-release file!\");\n //return getOsInfo();\n }\n\n return formatFileData(getOsInfo(), fileData);\n}\n\nfunction readSyncOsreleaseFile(\n releaseFileList: string[],\n options: LinuxReleaseInfoOptions,\n): OsInfo {\n let fileData = null;\n\n for (const osReleaseFile of releaseFileList) {\n try {\n if (options.debug) {\n console.log(`Trying to read '${osReleaseFile}'...`);\n }\n\n fileData = fs.readFileSync(osReleaseFile, \"binary\");\n\n if (options.debug) {\n console.log(`Read data:\\n${fileData}`);\n }\n\n break;\n } catch (error) {\n if (options.debug) {\n console.error(error);\n }\n }\n }\n\n if (fileData === null) {\n throw new Error(\"Cannot read os-release file!\");\n //return getOsInfo();\n }\n\n return formatFileData(getOsInfo(), fileData);\n}\n","// MIT, mostly lifted from https://github.com/actions/toolkit/blob/5a736647a123ecf8582376bdaee833fbae5b3847/packages/core/src/platform.ts\n// since it isn't in @actions/core 1.10.1 which is their current release as 2024-04-19.\n// Changes: Replaced the lsb_release call in Linux with `linux-release-info` to parse the os-release file directly.\nimport { releaseInfo } from \"./linux-release-info.js\";\nimport * as actionsCore from \"@actions/core\";\nimport * as exec from \"@actions/exec\";\nimport os from \"os\";\n\n/**\n * The name and version of the Action runner's system.\n */\ntype SystemInfo = {\n name: string;\n version: string;\n};\n\n/**\n * Get the name and version of the current Windows system.\n */\nconst getWindowsInfo = async (): Promise => {\n const { stdout: version } = await exec.getExecOutput(\n 'powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"',\n undefined,\n {\n silent: true,\n },\n );\n\n const { stdout: name } = await exec.getExecOutput(\n 'powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"',\n undefined,\n {\n silent: true,\n },\n );\n\n return {\n name: name.trim(),\n version: version.trim(),\n };\n};\n\n/**\n * Get the name and version of the current macOS system.\n */\nconst getMacOsInfo = async (): Promise => {\n const { stdout } = await exec.getExecOutput(\"sw_vers\", undefined, {\n silent: true,\n });\n\n const version = stdout.match(/ProductVersion:\\s*(.+)/)?.[1] ?? \"\";\n const name = stdout.match(/ProductName:\\s*(.+)/)?.[1] ?? \"\";\n\n return {\n name,\n version,\n };\n};\n\n/**\n * Get the name and version of the current Linux system.\n */\nconst getLinuxInfo = async (): Promise => {\n let data: object = {};\n\n try {\n data = releaseInfo({ mode: \"sync\" });\n actionsCore.debug(`Identified release info: ${JSON.stringify(data)}`);\n } catch (e) {\n actionsCore.debug(`Error collecting release info: ${e}`);\n }\n\n return {\n name: getPropertyViaWithDefault(\n data,\n [\"id\", \"name\", \"pretty_name\", \"id_like\"],\n \"unknown\",\n ),\n version: getPropertyViaWithDefault(\n data,\n [\"version_id\", \"version\", \"version_codename\"],\n \"unknown\",\n ),\n };\n};\n\nfunction getPropertyViaWithDefault(\n data: object,\n names: Property[],\n defaultValue: T,\n): T {\n for (const name of names) {\n const ret: T = getPropertyWithDefault(data, name, defaultValue);\n\n if (ret !== defaultValue) {\n return ret;\n }\n }\n\n return defaultValue;\n}\n\nfunction getPropertyWithDefault(\n data: object,\n name: Property,\n defaultValue: T,\n): T {\n if (!data.hasOwnProperty(name)) {\n return defaultValue;\n }\n\n const value = (data as { [K in Property]: T })[name];\n\n // NB. this check won't work for object instances\n if (typeof value !== typeof defaultValue) {\n return defaultValue;\n }\n\n return value;\n}\n\n/**\n * The Action runner's platform.\n */\nexport const platform = os.platform();\n\n/**\n * The Action runner's architecture.\n */\nexport const arch = os.arch();\n\n/**\n * Whether the Action runner is a Windows system.\n */\nexport const isWindows = platform === \"win32\";\n\n/**\n * Whether the Action runner is a macOS system.\n */\nexport const isMacOS = platform === \"darwin\";\n\n/**\n * Whether the Action runner is a Linux system.\n */\nexport const isLinux = platform === \"linux\";\n\n/**\n * System-level information about the current host (platform, architecture, etc.).\n */\ntype SystemDetails = {\n name: string;\n platform: string;\n arch: string;\n version: string;\n isWindows: boolean;\n isMacOS: boolean;\n isLinux: boolean;\n};\n\n/**\n * Get system-level information about the current host (platform, architecture, etc.).\n */\nexport async function getDetails(): Promise {\n return {\n ...(await (isWindows\n ? getWindowsInfo()\n : isMacOS\n ? getMacOsInfo()\n : getLinuxInfo())),\n platform,\n arch,\n isWindows,\n isMacOS,\n isLinux,\n };\n}\n","/**\n * Coerce a value of type `unknown` into a string.\n */\nexport function stringifyError(e: unknown): string {\n if (e instanceof Error) {\n return e.message;\n } else if (typeof e === \"string\") {\n return e;\n } else {\n return JSON.stringify(e);\n }\n}\n","/**\n * @packageDocumentation\n * Collects backtraces for executables for diagnostics\n */\nimport { isLinux, isMacOS } from \"./actions-core-platform.js\";\nimport { stringifyError } from \"./errors.js\";\nimport * as actionsCore from \"@actions/core\";\nimport * as exec from \"@actions/exec\";\nimport { readFile, readdir, stat } from \"node:fs/promises\";\nimport { promisify } from \"node:util\";\nimport { gzip } from \"node:zlib\";\n\n// Give a few seconds buffer, capturing traces that happened a few seconds earlier.\nconst START_SLOP_SECONDS = 5;\n\nexport async function collectBacktraces(\n prefixes: string[],\n programNameDenyList: string[],\n startTimestampMs: number,\n): Promise> {\n if (isMacOS) {\n return await collectBacktracesMacOS(\n prefixes,\n programNameDenyList,\n startTimestampMs,\n );\n }\n if (isLinux) {\n return await collectBacktracesSystemd(\n prefixes,\n programNameDenyList,\n startTimestampMs,\n );\n }\n\n return new Map();\n}\n\nexport async function collectBacktracesMacOS(\n prefixes: string[],\n programNameDenyList: string[],\n startTimestampMs: number,\n): Promise> {\n const backtraces: Map = new Map();\n\n try {\n const { stdout: logJson } = await exec.getExecOutput(\n \"log\",\n [\n \"show\",\n \"--style\",\n \"json\",\n \"--last\",\n // Note we collect the last 1m only, because it should only take a few seconds to write the crash log.\n // Therefore, any crashes before this 1m should be long done by now.\n \"1m\",\n \"--no-info\",\n \"--predicate\",\n \"sender = 'ReportCrash'\",\n ],\n {\n silent: true,\n },\n );\n\n const sussyArray: unknown = JSON.parse(logJson);\n if (!Array.isArray(sussyArray)) {\n throw new Error(`Log json isn't an array: ${logJson}`);\n }\n\n if (sussyArray.length > 0) {\n actionsCore.info(`Collecting crash data...`);\n const delay = async (ms: number): Promise =>\n new Promise((resolve) => setTimeout(resolve, ms));\n await delay(5000);\n }\n } catch {\n actionsCore.debug(\n \"Failed to check logs for in-progress crash dumps; now proceeding with the assumption that all crash dumps completed.\",\n );\n }\n\n const dirs = [\n [\"system\", \"/Library/Logs/DiagnosticReports/\"],\n [\"user\", `${process.env[\"HOME\"]}/Library/Logs/DiagnosticReports/`],\n ];\n\n for (const [source, dir] of dirs) {\n const fileNames = (await readdir(dir))\n .filter((fileName) => {\n return prefixes.some((prefix) => fileName.startsWith(prefix));\n })\n .filter((fileName) => {\n return !programNameDenyList.some((programName) =>\n fileName.startsWith(programName),\n );\n })\n .filter((fileName) => {\n // macOS creates .diag files periodically, which are called \"microstackshots\".\n // We don't necessarily want those, and they're definitely not crashes.\n // See: https://patents.google.com/patent/US20140237219A1/en\n return !fileName.endsWith(\".diag\");\n });\n\n const doGzip = promisify(gzip);\n for (const fileName of fileNames) {\n try {\n if ((await stat(`${dir}/${fileName}`)).ctimeMs >= startTimestampMs) {\n const logText = await readFile(`${dir}/${fileName}`);\n const buf = await doGzip(logText);\n backtraces.set(\n `backtrace_value_${source}_${fileName}`,\n buf.toString(\"base64\"),\n );\n }\n } catch (innerError: unknown) {\n backtraces.set(\n `backtrace_failure_${source}_${fileName}`,\n stringifyError(innerError),\n );\n }\n }\n }\n\n return backtraces;\n}\n\ntype SystemdCoreDumpInfo = {\n exe: string;\n pid: number;\n};\n\nexport async function collectBacktracesSystemd(\n prefixes: string[],\n programNameDenyList: string[],\n startTimestampMs: number,\n): Promise> {\n const sinceSeconds =\n Math.ceil((Date.now() - startTimestampMs) / 1000) + START_SLOP_SECONDS;\n const backtraces: Map = new Map();\n\n const coredumps: SystemdCoreDumpInfo[] = [];\n\n try {\n const { stdout: coredumpjson } = await exec.getExecOutput(\n \"coredumpctl\",\n [\"--json=pretty\", \"list\", \"--since\", `${sinceSeconds} seconds ago`],\n {\n silent: true,\n },\n );\n\n const sussyArray: unknown = JSON.parse(coredumpjson);\n if (!Array.isArray(sussyArray)) {\n throw new Error(`Coredump isn't an array: ${coredumpjson}`);\n }\n\n for (const sussyObject of sussyArray) {\n const keys = Object.keys(sussyObject);\n\n if (keys.includes(\"exe\") && keys.includes(\"pid\")) {\n if (\n typeof sussyObject.exe == \"string\" &&\n typeof sussyObject.pid == \"number\"\n ) {\n const execParts = sussyObject.exe.split(\"/\");\n const binaryName = execParts[execParts.length - 1];\n\n if (\n prefixes.some((prefix) => binaryName.startsWith(prefix)) &&\n !programNameDenyList.includes(binaryName)\n ) {\n coredumps.push({\n exe: sussyObject.exe,\n pid: sussyObject.pid,\n });\n }\n } else {\n actionsCore.debug(\n `Mysterious coredump entry missing exe string and/or pid number: ${JSON.stringify(sussyObject)}`,\n );\n }\n } else {\n actionsCore.debug(\n `Mysterious coredump entry missing exe value and/or pid value: ${JSON.stringify(sussyObject)}`,\n );\n }\n }\n } catch (innerError: unknown) {\n actionsCore.debug(\n `Cannot collect backtraces: ${stringifyError(innerError)}`,\n );\n\n return backtraces;\n }\n\n const doGzip = promisify(gzip);\n for (const coredump of coredumps) {\n try {\n const { stdout: logText } = await exec.getExecOutput(\n \"coredumpctl\",\n [\"info\", `${coredump.pid}`],\n {\n silent: true,\n },\n );\n\n const buf = await doGzip(logText);\n backtraces.set(`backtrace_value_${coredump.pid}`, buf.toString(\"base64\"));\n } catch (innerError: unknown) {\n backtraces.set(\n `backtrace_failure_${coredump.pid}`,\n stringifyError(innerError),\n );\n }\n }\n\n return backtraces;\n}\n","import * as actionsCore from \"@actions/core\";\nimport { createHash, randomUUID } from \"node:crypto\";\n\nconst OPTIONAL_VARIABLES = [\"INVOCATION_ID\"];\n\n/* eslint-disable camelcase */\n/**\n * JSON sent to server.\n */\nexport type AnonymizedCorrelationHashes = {\n $anon_distinct_id: string;\n $groups: Record;\n $session_id?: string;\n correlation_source: string;\n github_repository_hash?: string;\n github_workflow_hash?: string;\n github_workflow_job_hash?: string;\n github_workflow_run_differentiator_hash?: string;\n github_workflow_run_hash?: string;\n is_ci: boolean;\n};\n\nexport function identify(): AnonymizedCorrelationHashes {\n const repository = hashEnvironmentVariables(\"GHR\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n ]);\n\n const run_differentiator = hashEnvironmentVariables(\"GHWJA\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n \"GITHUB_WORKFLOW\",\n \"GITHUB_JOB\",\n \"GITHUB_RUN_ID\",\n \"GITHUB_RUN_NUMBER\",\n \"GITHUB_RUN_ATTEMPT\",\n \"INVOCATION_ID\",\n ]);\n\n const ident: AnonymizedCorrelationHashes = {\n $anon_distinct_id: process.env[\"RUNNER_TRACKING_ID\"] || randomUUID(),\n\n correlation_source: \"github-actions\",\n\n github_repository_hash: repository,\n github_workflow_hash: hashEnvironmentVariables(\"GHW\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n \"GITHUB_WORKFLOW\",\n ]),\n github_workflow_job_hash: hashEnvironmentVariables(\"GHWJ\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n \"GITHUB_WORKFLOW\",\n \"GITHUB_JOB\",\n ]),\n github_workflow_run_hash: hashEnvironmentVariables(\"GHWJR\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n \"GITHUB_WORKFLOW\",\n \"GITHUB_JOB\",\n \"GITHUB_RUN_ID\",\n ]),\n github_workflow_run_differentiator_hash: run_differentiator,\n $session_id: run_differentiator,\n $groups: {\n github_repository: repository,\n github_organization: hashEnvironmentVariables(\"GHO\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n ]),\n },\n is_ci: true,\n };\n\n actionsCore.debug(\"Correlation data:\");\n actionsCore.debug(JSON.stringify(ident, null, 2));\n\n return ident;\n}\n\nfunction hashEnvironmentVariables(\n prefix: string,\n variables: string[],\n): undefined | string {\n const hash = createHash(\"sha256\");\n\n for (const varName of variables) {\n let value = process.env[varName];\n\n if (value === undefined) {\n if (OPTIONAL_VARIABLES.includes(varName)) {\n actionsCore.debug(\n `Optional environment variable not set: ${varName} -- substituting with the variable name`,\n );\n value = varName;\n } else {\n actionsCore.debug(\n `Environment variable not set: ${varName} -- can't generate the requested identity`,\n );\n return undefined;\n }\n }\n\n hash.update(value);\n hash.update(\"\\0\");\n }\n\n return `${prefix}-${hash.digest(\"hex\")}`;\n}\n","/**\n * @packageDocumentation\n * Identifies and discovers backend servers for install.determinate.systems\n */\nimport { stringifyError } from \"./errors.js\";\nimport * as actionsCore from \"@actions/core\";\nimport { Got, got } from \"got\";\nimport type { SrvRecord } from \"node:dns\";\nimport { resolveSrv } from \"node:dns/promises\";\n\nconst DEFAULT_LOOKUP = \"_detsys_ids._tcp.install.determinate.systems.\";\nconst ALLOWED_SUFFIXES = [\n \".install.determinate.systems\",\n \".install.detsys.dev\",\n];\n\nconst DEFAULT_IDS_HOST = \"https://install.determinate.systems\";\nconst LOOKUP = process.env[\"IDS_LOOKUP\"] ?? DEFAULT_LOOKUP;\n\nconst DEFAULT_TIMEOUT = 10_000; // 10 seconds in ms\n\n/**\n * Host information for install.determinate.systems.\n */\nexport class IdsHost {\n private idsProjectName: string;\n private diagnosticsSuffix?: string;\n private runtimeDiagnosticsUrl?: string;\n private prioritizedURLs?: URL[];\n private client?: Got;\n\n constructor(\n idsProjectName: string,\n diagnosticsSuffix: string | undefined,\n runtimeDiagnosticsUrl: string | undefined,\n ) {\n this.idsProjectName = idsProjectName;\n this.diagnosticsSuffix = diagnosticsSuffix;\n this.runtimeDiagnosticsUrl = runtimeDiagnosticsUrl;\n this.client = undefined;\n }\n\n async getGot(\n recordFailoverCallback?: (\n incitingError: unknown,\n prevUrl: URL,\n nextUrl: URL,\n ) => void,\n ): Promise {\n if (this.client === undefined) {\n this.client = got.extend({\n timeout: {\n request: DEFAULT_TIMEOUT,\n },\n\n retry: {\n limit: Math.max((await this.getUrlsByPreference()).length, 3),\n methods: [\"GET\", \"HEAD\"],\n },\n\n hooks: {\n beforeRetry: [\n async (error, retryCount) => {\n const prevUrl = await this.getRootUrl();\n this.markCurrentHostBroken();\n const nextUrl = await this.getRootUrl();\n\n if (recordFailoverCallback !== undefined) {\n recordFailoverCallback(error, prevUrl, nextUrl);\n }\n\n actionsCore.info(\n `Retrying after error ${error.code}, retry #: ${retryCount}`,\n );\n },\n ],\n\n beforeRequest: [\n async (options) => {\n // The getter always returns a URL, even though the setter accepts a string\n const currentUrl: URL = options.url as URL;\n\n if (this.isUrlSubjectToDynamicUrls(currentUrl)) {\n const newUrl: URL = new URL(currentUrl);\n\n const url: URL = await this.getRootUrl();\n newUrl.host = url.host;\n\n options.url = newUrl;\n actionsCore.debug(`Transmuted ${currentUrl} into ${newUrl}`);\n } else {\n actionsCore.debug(`No transmutations on ${currentUrl}`);\n }\n },\n ],\n },\n });\n }\n\n return this.client;\n }\n\n markCurrentHostBroken(): void {\n this.prioritizedURLs?.shift();\n }\n\n setPrioritizedUrls(urls: URL[]): void {\n this.prioritizedURLs = urls;\n }\n\n isUrlSubjectToDynamicUrls(url: URL): boolean {\n if (url.origin === DEFAULT_IDS_HOST) {\n return true;\n }\n\n for (const suffix of ALLOWED_SUFFIXES) {\n if (url.host.endsWith(suffix)) {\n return true;\n }\n }\n\n return false;\n }\n\n async getDynamicRootUrl(): Promise {\n const idsHost = process.env[\"IDS_HOST\"];\n if (idsHost !== undefined) {\n try {\n return new URL(idsHost);\n } catch (err: unknown) {\n actionsCore.error(\n `IDS_HOST environment variable is not a valid URL. Ignoring. ${stringifyError(err)}`,\n );\n }\n }\n\n let url: URL | undefined = undefined;\n try {\n const urls = await this.getUrlsByPreference();\n url = urls[0];\n } catch (err: unknown) {\n actionsCore.error(\n `Error collecting IDS URLs by preference: ${stringifyError(err)}`,\n );\n }\n\n if (url === undefined) {\n return undefined;\n } else {\n // This is a load-bearing `new URL(url)` so that callers can't mutate\n // getRootUrl's return value.\n return new URL(url);\n }\n }\n\n async getRootUrl(): Promise {\n const url = await this.getDynamicRootUrl();\n\n if (url === undefined) {\n return new URL(DEFAULT_IDS_HOST);\n }\n\n return url;\n }\n\n async getDiagnosticsUrl(): Promise {\n if (this.runtimeDiagnosticsUrl === \"\") {\n // User specifically set the diagnostics URL to an empty string\n // so disable diagnostics\n return undefined;\n }\n\n if (\n this.runtimeDiagnosticsUrl !== \"-\" &&\n this.runtimeDiagnosticsUrl !== undefined\n ) {\n try {\n // Caller specified a specific diagnostics URL\n return new URL(this.runtimeDiagnosticsUrl);\n } catch (err: unknown) {\n actionsCore.info(\n `User-provided diagnostic endpoint ignored: not a valid URL: ${stringifyError(err)}`,\n );\n }\n }\n\n try {\n const diagnosticUrl = await this.getRootUrl();\n diagnosticUrl.pathname += \"events/batch\";\n return diagnosticUrl;\n } catch (err: unknown) {\n actionsCore.info(\n `Generated diagnostic endpoint ignored, and diagnostics are disabled: not a valid URL: ${stringifyError(err)}`,\n );\n return undefined;\n }\n }\n\n private async getUrlsByPreference(): Promise {\n if (this.prioritizedURLs === undefined) {\n this.prioritizedURLs = orderRecordsByPriorityWeight(\n await discoverServiceRecords(),\n ).flatMap((record) => recordToUrl(record) || []);\n }\n\n return this.prioritizedURLs;\n }\n}\n\nexport function recordToUrl(record: SrvRecord): URL | undefined {\n const urlStr = `https://${record.name}:${record.port}`;\n try {\n return new URL(urlStr);\n } catch (err: unknown) {\n actionsCore.debug(\n `Record ${JSON.stringify(record)} produced an invalid URL: ${urlStr} (${err})`,\n );\n return undefined;\n }\n}\n\nasync function discoverServiceRecords(): Promise {\n return await discoverServicesStub(resolveSrv(LOOKUP), 1_000);\n}\n\nexport async function discoverServicesStub(\n lookup: Promise,\n timeout: number,\n): Promise {\n const defaultFallback: Promise = new Promise(\n (resolve, _reject) => {\n setTimeout(resolve, timeout, []);\n },\n );\n\n let records: SrvRecord[];\n\n try {\n records = await Promise.race([lookup, defaultFallback]);\n } catch (reason: unknown) {\n actionsCore.debug(`Error resolving SRV records: ${stringifyError(reason)}`);\n records = [];\n }\n\n const acceptableRecords = records.filter((record: SrvRecord): boolean => {\n for (const suffix of ALLOWED_SUFFIXES) {\n if (record.name.endsWith(suffix)) {\n return true;\n }\n }\n\n actionsCore.debug(\n `Unacceptable domain due to an invalid suffix: ${record.name}`,\n );\n\n return false;\n });\n\n if (acceptableRecords.length === 0) {\n actionsCore.debug(`No records found for ${LOOKUP}`);\n } else {\n actionsCore.debug(\n `Resolved ${LOOKUP} to ${JSON.stringify(acceptableRecords)}`,\n );\n }\n\n return acceptableRecords;\n}\n\nexport function orderRecordsByPriorityWeight(\n records: SrvRecord[],\n): SrvRecord[] {\n const byPriorityWeight: Map = new Map();\n for (const record of records) {\n const existing = byPriorityWeight.get(record.priority);\n if (existing) {\n existing.push(record);\n } else {\n byPriorityWeight.set(record.priority, [record]);\n }\n }\n\n const prioritizedRecords: SrvRecord[] = [];\n const keys: number[] = Array.from(byPriorityWeight.keys()).sort(\n (a, b) => a - b,\n );\n\n for (const priority of keys) {\n const recordsByPrio = byPriorityWeight.get(priority);\n if (recordsByPrio === undefined) {\n continue;\n }\n\n prioritizedRecords.push(...weightedRandom(recordsByPrio));\n }\n\n return prioritizedRecords;\n}\n\nexport function weightedRandom(records: SrvRecord[]): SrvRecord[] {\n // Duplicate records so we don't accidentally change our caller's data\n const scratchRecords: SrvRecord[] = records.slice();\n const result: SrvRecord[] = [];\n\n while (scratchRecords.length > 0) {\n const weights: number[] = [];\n\n {\n for (let i = 0; i < scratchRecords.length; i++) {\n weights.push(\n scratchRecords[i].weight + (i > 0 ? scratchRecords[i - 1].weight : 0),\n );\n }\n }\n\n const point = Math.random() * weights[weights.length - 1];\n\n for (\n let selectedIndex = 0;\n selectedIndex < weights.length;\n selectedIndex++\n ) {\n if (weights[selectedIndex] > point) {\n // Remove our selected record and add it to the result\n result.push(scratchRecords.splice(selectedIndex, 1)[0]);\n break;\n }\n }\n }\n\n return result;\n}\n","/**\n * @packageDocumentation\n * Helpers for getting values from an Action's configuration.\n */\nimport * as actionsCore from \"@actions/core\";\n\n/**\n * Get a Boolean input from the Action's configuration by name.\n */\nconst getBool = (name: string): boolean => {\n return actionsCore.getBooleanInput(name);\n};\n\n/**\n * Get a Boolean input from the Action's configuration by name, or undefined if it is unset.\n */\nconst getBoolOrUndefined = (name: string): boolean | undefined => {\n if (getStringOrUndefined(name) === undefined) {\n return undefined;\n }\n\n return actionsCore.getBooleanInput(name);\n};\n\n/**\n * The character used to separate values in the input string.\n */\nexport type Separator = \"space\" | \"comma\";\n\n/**\n * Convert a comma-separated string input into an array of strings. If `comma` is selected,\n * all whitespace is removed from the string before converting to an array.\n */\nconst getArrayOfStrings = (name: string, separator: Separator): string[] => {\n const original = getString(name);\n return handleString(original, separator);\n};\n\n/**\n * Convert a string input into an array of strings or `null` if no value is set.\n */\nconst getArrayOfStringsOrNull = (\n name: string,\n separator: Separator,\n): string[] | null => {\n const original = getStringOrNull(name);\n if (original === null) {\n return null;\n } else {\n return handleString(original, separator);\n }\n};\n\n// Split out this function for use in testing\nexport const handleString = (input: string, separator: Separator): string[] => {\n const sepChar = separator === \"comma\" ? \",\" : /\\s+/;\n const trimmed = input.trim(); // Remove whitespace at the beginning and end\n if (trimmed === \"\") {\n return [];\n }\n\n return trimmed.split(sepChar).map((s: string) => s.trim());\n};\n\n/**\n * Get a multi-line string input from the Action's configuration by name or return `null` if not set.\n */\nconst getMultilineStringOrNull = (name: string): string[] | null => {\n const value = actionsCore.getMultilineInput(name);\n if (value.length === 0) {\n return null;\n } else {\n return value;\n }\n};\n\n/**\n * Get a number input from the Action's configuration by name or return `null` if not set.\n */\nconst getNumberOrNull = (name: string): number | null => {\n const value = actionsCore.getInput(name);\n if (value === \"\") {\n return null;\n } else {\n return Number(value);\n }\n};\n\n/**\n * Get a string input from the Action's configuration.\n */\nconst getString = (name: string): string => {\n return actionsCore.getInput(name);\n};\n\n/**\n * Get a string input from the Action's configuration by name or return `null` if not set.\n */\nconst getStringOrNull = (name: string): string | null => {\n const value = actionsCore.getInput(name);\n if (value === \"\") {\n return null;\n } else {\n return value;\n }\n};\n\n/**\n * Get a string input from the Action's configuration by name or return `undefined` if not set.\n */\nconst getStringOrUndefined = (name: string): string | undefined => {\n const value = actionsCore.getInput(name);\n if (value === \"\") {\n return undefined;\n } else {\n return value;\n }\n};\n\nexport {\n getBool,\n getBoolOrUndefined,\n getArrayOfStrings,\n getArrayOfStringsOrNull,\n getMultilineStringOrNull,\n getNumberOrNull,\n getString,\n getStringOrNull,\n getStringOrUndefined,\n};\n","/**\n * @packageDocumentation\n * Helpers for determining system attributes of the current runner.\n */\nimport * as actionsCore from \"@actions/core\";\n\n/**\n * Get the current architecture plus OS. Examples include `X64-Linux` and `ARM64-macOS`.\n */\nexport function getArchOs(): string {\n const envArch = process.env.RUNNER_ARCH;\n const envOs = process.env.RUNNER_OS;\n\n if (envArch && envOs) {\n return `${envArch}-${envOs}`;\n } else {\n actionsCore.error(\n `Can't identify the platform: RUNNER_ARCH or RUNNER_OS undefined (${envArch}-${envOs})`,\n );\n throw new Error(\"RUNNER_ARCH and/or RUNNER_OS is not defined\");\n }\n}\n\n/**\n * Get the current Nix system. Examples include `x86_64-linux` and `aarch64-darwin`.\n */\nexport function getNixPlatform(archOs: string): string {\n const archOsMap: Map = new Map([\n [\"X64-macOS\", \"x86_64-darwin\"],\n [\"ARM64-macOS\", \"aarch64-darwin\"],\n [\"X64-Linux\", \"x86_64-linux\"],\n [\"ARM64-Linux\", \"aarch64-linux\"],\n ]);\n\n const mappedTo = archOsMap.get(archOs);\n if (mappedTo) {\n return mappedTo;\n } else {\n actionsCore.error(\n `ArchOs (${archOs}) doesn't map to a supported Nix platform.`,\n );\n throw new Error(\n `Cannot convert ArchOs (${archOs}) to a supported Nix platform.`,\n );\n }\n}\n","import { getStringOrUndefined } from \"./inputs.js\";\nimport * as actionsCore from \"@actions/core\";\n\nexport type SourceDef = {\n path?: string;\n url?: string;\n tag?: string;\n pr?: string;\n branch?: string;\n revision?: string;\n};\n\nexport function constructSourceParameters(legacyPrefix?: string): SourceDef {\n return {\n path: noisilyGetInput(\"path\", legacyPrefix),\n url: noisilyGetInput(\"url\", legacyPrefix),\n tag: noisilyGetInput(\"tag\", legacyPrefix),\n pr: noisilyGetInput(\"pr\", legacyPrefix),\n branch: noisilyGetInput(\"branch\", legacyPrefix),\n revision: noisilyGetInput(\"revision\", legacyPrefix),\n };\n}\n\nfunction noisilyGetInput(\n suffix: string,\n legacyPrefix: string | undefined,\n): string | undefined {\n const preferredInput = getStringOrUndefined(`source-${suffix}`);\n\n if (!legacyPrefix) {\n return preferredInput;\n }\n\n // Remaining is for handling cases where the legacy prefix\n // should be examined.\n const legacyInput = getStringOrUndefined(`${legacyPrefix}-${suffix}`);\n\n if (preferredInput && legacyInput) {\n actionsCore.warning(\n `The supported option source-${suffix} and the legacy option ${legacyPrefix}-${suffix} are both set. Preferring source-${suffix}. Please stop setting ${legacyPrefix}-${suffix}.`,\n );\n return preferredInput;\n } else if (legacyInput) {\n actionsCore.warning(\n `The legacy option ${legacyPrefix}-${suffix} is set. Please migrate to source-${suffix}.`,\n );\n return legacyInput;\n } else {\n return preferredInput;\n }\n}\n","/**\n * @packageDocumentation\n * Determinate Systems' TypeScript library for creating GitHub Actions logic.\n */\n// import { version as pkgVersion } from \"../package.json\";\nimport * as ghActionsCorePlatform from \"./actions-core-platform.js\";\nimport { collectBacktraces } from \"./backtrace.js\";\nimport { CheckIn, Feature } from \"./check-in.js\";\nimport * as correlation from \"./correlation.js\";\nimport { IdsHost } from \"./ids-host.js\";\nimport { getBool, getBoolOrUndefined, getStringOrNull } from \"./inputs.js\";\nimport * as platform from \"./platform.js\";\nimport { SourceDef, constructSourceParameters } from \"./sourcedef.js\";\nimport * as actionsCache from \"@actions/cache\";\nimport * as actionsCore from \"@actions/core\";\nimport * as actionsExec from \"@actions/exec\";\nimport { Got, Request, TimeoutError } from \"got\";\nimport { exec } from \"node:child_process\";\nimport { UUID, randomUUID } from \"node:crypto\";\nimport {\n PathLike,\n WriteStream,\n createWriteStream,\n readFileSync,\n} from \"node:fs\";\nimport fs, { chmod, copyFile, mkdir } from \"node:fs/promises\";\nimport * as os from \"node:os\";\nimport { tmpdir } from \"node:os\";\nimport * as path from \"node:path\";\nimport { promisify } from \"node:util\";\nimport { gzip } from \"node:zlib\";\n\nconst pkgVersion = \"1.0\";\n\nconst EVENT_BACKTRACES = \"backtrace\";\nconst EVENT_EXCEPTION = \"exception\";\nconst EVENT_ARTIFACT_CACHE_HIT = \"artifact_cache_hit\";\nconst EVENT_ARTIFACT_CACHE_MISS = \"artifact_cache_miss\";\nconst EVENT_ARTIFACT_CACHE_PERSIST = \"artifact_cache_persist\";\nconst EVENT_PREFLIGHT_REQUIRE_NIX_DENIED = \"preflight-require-nix-denied\";\nconst EVENT_STORE_IDENTITY_FAILED = \"store_identity_failed\";\n\nconst FACT_ARTIFACT_FETCHED_FROM_CACHE = \"artifact_fetched_from_cache\";\nconst FACT_ENDED_WITH_EXCEPTION = \"ended_with_exception\";\nconst FACT_FINAL_EXCEPTION = \"final_exception\";\nconst FACT_OS = \"$os\";\nconst FACT_OS_VERSION = \"$os_version\";\nconst FACT_SOURCE_URL = \"source_url\";\nconst FACT_SOURCE_URL_ETAG = \"source_url_etag\";\nconst FACT_NIX_VERSION = \"nix_version\";\n\nconst FACT_NIX_LOCATION = \"nix_location\";\nconst FACT_NIX_STORE_TRUST = \"nix_store_trusted\";\nconst FACT_NIX_STORE_VERSION = \"nix_store_version\";\nconst FACT_NIX_STORE_CHECK_METHOD = \"nix_store_check_method\";\nconst FACT_NIX_STORE_CHECK_ERROR = \"nix_store_check_error\";\n\nconst STATE_KEY_EXECUTION_PHASE = \"detsys_action_execution_phase\";\nconst STATE_KEY_NIX_NOT_FOUND = \"detsys_action_nix_not_found\";\nconst STATE_NOT_FOUND = \"not-found\";\nconst STATE_KEY_CROSS_PHASE_ID = \"detsys_cross_phase_id\";\nconst STATE_BACKTRACE_START_TIMESTAMP = \"detsys_backtrace_start_timestamp\";\n\nconst DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 10_000; // 10 seconds in ms\nconst CHECK_IN_ENDPOINT_TIMEOUT_MS = 1_000; // 1 second in ms\nconst PROGRAM_NAME_CRASH_DENY_LIST = [\n \"nix-expr-tests\",\n \"nix-store-tests\",\n \"nix-util-tests\",\n];\n\n/**\n * An enum for describing different \"fetch suffixes\" for i.d.s.\n *\n * - `nix-style` means that system names like `x86_64-linux` and `aarch64-darwin` are used\n * - `gh-env-style` means that names like `X64-Linux` and `ARM64-macOS` are used\n * - `universal` means that the suffix is the static `universal` (for non-system-specific things)\n */\nexport type FetchSuffixStyle = \"nix-style\" | \"gh-env-style\" | \"universal\";\n\n/**\n * GitHub Actions has two possible execution phases: `main` and `post`.\n */\nexport type ExecutionPhase = \"main\" | \"post\";\n\n/**\n * How to handle whether Nix is currently installed on the runner.\n *\n * - `fail` means that the workflow fails if Nix isn't installed\n * - `warn` means that a warning is logged if Nix isn't installed\n * - `ignore` means that Nix will not be checked\n */\nexport type NixRequirementHandling = \"fail\" | \"warn\" | \"ignore\";\n\n/**\n * Whether the Nix store on the runner is trusted.\n *\n * - `trusted` means yes\n * - `untrusted` means no\n * - `unknown` means that the status couldn't be determined\n *\n * This is determined via the output of `nix store info --json`.\n */\nexport type NixStoreTrust = \"trusted\" | \"untrusted\" | \"unknown\";\n\nexport type ActionOptions = {\n // Name of the project generally, and the name of the binary on disk.\n name: string;\n\n // Defaults to `name`, Corresponds to the ProjectHost entry on i.d.s.\n idsProjectName?: string;\n\n // Defaults to `action:`\n eventPrefix?: string;\n\n // The \"architecture\" URL component expected by I.D.S. for the ProjectHost.\n fetchStyle: FetchSuffixStyle;\n\n // IdsToolbox assumes the GitHub Action exposes source overrides, like branch/pr/etc. to be named `source-*`.\n // This prefix adds a fallback name, prefixed by `${legacySourcePrefix}-`.\n // Users who configure legacySourcePrefix will get warnings asking them to change to `source-*`.\n legacySourcePrefix?: string;\n\n // Check if Nix is installed before running this action.\n // If Nix isn't installed, this action will not fail, and will instead do nothing.\n // The action will emit a user-visible warning instructing them to install Nix.\n requireNix: NixRequirementHandling;\n\n // The URL suffix to send diagnostics events to.\n //\n // The final URL is constructed via IDS_HOST/idsProjectName/diagnosticsSuffix.\n //\n // Default: `diagnostics`.\n diagnosticsSuffix?: string;\n\n // Collect backtraces from segfaults and other failures from binaries that start with these names.\n //\n // Default: `[ \"nix\", \"determinate-nixd\", ActionOptions.name ]`.\n binaryNamePrefixes?: string[];\n\n // Do NOT collect backtraces from segfaults and other failures from binaries with exact these names.\n //\n // Default: `[ \"nix-expr-tests\" ]`.\n binaryNamesDenyList?: string[];\n};\n\n/**\n * A confident version of Options, where defaults have been resolved into final values.\n */\nexport type ConfidentActionOptions = {\n name: string;\n idsProjectName: string;\n eventPrefix: string;\n fetchStyle: FetchSuffixStyle;\n legacySourcePrefix?: string;\n requireNix: NixRequirementHandling;\n providedDiagnosticsUrl?: URL;\n binaryNamePrefixes: string[];\n binaryNamesDenyList: string[];\n};\n\n/**\n * An event to send to the diagnostic endpoint of i.d.s.\n */\nexport type DiagnosticEvent = {\n // Note: putting a Map in here won't serialize to json properly.\n // It'll just be {} on serialization.\n name: string;\n distinct_id?: string;\n uuid: UUID;\n timestamp: Date;\n\n properties: Record;\n};\n\nconst determinateStateDir = \"/var/lib/determinate\";\nconst determinateIdentityFile = path.join(determinateStateDir, \"identity.json\");\n\nconst isRoot = os.userInfo().uid === 0;\n\n/** Create the Determinate state directory by escalating via sudo */\nasync function sudoEnsureDeterminateStateDir(): Promise {\n const code = await actionsExec.exec(\"sudo\", [\n \"mkdir\",\n \"-p\",\n determinateStateDir,\n ]);\n\n if (code !== 0) {\n throw new Error(`sudo mkdir -p exit: ${code}`);\n }\n}\n\n/** Ensures the Determinate state directory exists, escalating if necessary */\nasync function ensureDeterminateStateDir(): Promise {\n if (isRoot) {\n await mkdir(determinateStateDir, { recursive: true });\n } else {\n return sudoEnsureDeterminateStateDir();\n }\n}\n\n/** Writes correlation hashes to the Determinate state directory by writing to a `sudo tee` pipe */\nasync function sudoWriteCorrelationHashes(hashes: string): Promise {\n const buffer = Buffer.from(hashes);\n\n const code = await actionsExec.exec(\n \"sudo\",\n [\"tee\", determinateIdentityFile],\n {\n input: buffer,\n\n // Ignore output from tee\n outStream: createWriteStream(\"/dev/null\"),\n },\n );\n\n if (code !== 0) {\n throw new Error(`sudo tee exit: ${code}`);\n }\n}\n\n/** Writes correlation hashes to the Determinate state directory, escalating if necessary */\nasync function writeCorrelationHashes(hashes: string): Promise {\n await ensureDeterminateStateDir();\n\n if (isRoot) {\n await fs.writeFile(determinateIdentityFile, hashes, \"utf-8\");\n } else {\n return sudoWriteCorrelationHashes(hashes);\n }\n}\n\nexport abstract class DetSysAction {\n nixStoreTrust: NixStoreTrust;\n strictMode: boolean;\n\n private actionOptions: ConfidentActionOptions;\n private exceptionAttachments: Map;\n private archOs: string;\n private executionPhase: ExecutionPhase;\n private nixSystem: string;\n private architectureFetchSuffix: string;\n private sourceParameters: SourceDef;\n private facts: Record;\n private events: DiagnosticEvent[];\n private identity: correlation.AnonymizedCorrelationHashes;\n private idsHost: IdsHost;\n private features: { [k: string]: Feature };\n private featureEventMetadata: { [k: string]: string | boolean };\n\n private determineExecutionPhase(): ExecutionPhase {\n const currentPhase = actionsCore.getState(STATE_KEY_EXECUTION_PHASE);\n if (currentPhase === \"\") {\n actionsCore.saveState(STATE_KEY_EXECUTION_PHASE, \"post\");\n return \"main\";\n } else {\n return \"post\";\n }\n }\n\n constructor(actionOptions: ActionOptions) {\n this.actionOptions = makeOptionsConfident(actionOptions);\n this.idsHost = new IdsHost(\n this.actionOptions.idsProjectName,\n actionOptions.diagnosticsSuffix,\n // Note: we don't use actionsCore.getInput('diagnostic-endpoint') on purpose:\n // getInput silently converts absent data to an empty string.\n process.env[\"INPUT_DIAGNOSTIC-ENDPOINT\"],\n );\n this.exceptionAttachments = new Map();\n this.nixStoreTrust = \"unknown\";\n this.strictMode = getBool(\"_internal-strict-mode\");\n\n if (\n getBoolOrUndefined(\n \"_internal-obliterate-actions-id-token-request-variables\",\n ) === true\n ) {\n process.env[\"ACTIONS_ID_TOKEN_REQUEST_URL\"] = undefined;\n process.env[\"ACTIONS_ID_TOKEN_REQUEST_TOKEN\"] = undefined;\n }\n\n this.features = {};\n this.featureEventMetadata = {};\n this.events = [];\n\n this.getCrossPhaseId();\n this.collectBacktraceSetup();\n\n // JSON sent to server\n /* eslint-disable camelcase */\n this.facts = {\n $lib: \"idslib\",\n $lib_version: pkgVersion,\n project: this.actionOptions.name,\n ids_project: this.actionOptions.idsProjectName,\n };\n\n const params = [\n [\"github_action_ref\", \"GITHUB_ACTION_REF\"],\n [\"github_action_repository\", \"GITHUB_ACTION_REPOSITORY\"],\n [\"github_event_name\", \"GITHUB_EVENT_NAME\"],\n [\"$os\", \"RUNNER_OS\"],\n [\"arch\", \"RUNNER_ARCH\"],\n ];\n for (const [target, env] of params) {\n const value = process.env[env];\n if (value) {\n this.facts[target] = value;\n }\n }\n\n this.identity = correlation.identify();\n this.archOs = platform.getArchOs();\n this.nixSystem = platform.getNixPlatform(this.archOs);\n\n this.facts.$app_name = `${this.actionOptions.name}/action`;\n this.facts.arch_os = this.archOs;\n this.facts.nix_system = this.nixSystem;\n\n {\n ghActionsCorePlatform\n .getDetails()\n // eslint-disable-next-line github/no-then\n .then((details) => {\n if (details.name !== \"unknown\") {\n this.addFact(FACT_OS, details.name);\n }\n if (details.version !== \"unknown\") {\n this.addFact(FACT_OS_VERSION, details.version);\n }\n })\n // eslint-disable-next-line github/no-then\n .catch((e: unknown) => {\n actionsCore.debug(\n `Failure getting platform details: ${stringifyError(e)}`,\n );\n });\n }\n\n this.executionPhase = this.determineExecutionPhase();\n this.facts.execution_phase = this.executionPhase;\n\n if (this.actionOptions.fetchStyle === \"gh-env-style\") {\n this.architectureFetchSuffix = this.archOs;\n } else if (this.actionOptions.fetchStyle === \"nix-style\") {\n this.architectureFetchSuffix = this.nixSystem;\n } else if (this.actionOptions.fetchStyle === \"universal\") {\n this.architectureFetchSuffix = \"universal\";\n } else {\n throw new Error(\n `fetchStyle ${this.actionOptions.fetchStyle} is not a valid style`,\n );\n }\n\n this.sourceParameters = constructSourceParameters(\n this.actionOptions.legacySourcePrefix,\n );\n\n this.recordEvent(`begin_${this.executionPhase}`);\n }\n\n /**\n * Attach a file to the diagnostics data in error conditions.\n *\n * The file at `location` doesn't need to exist when stapleFile is called.\n *\n * 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}`.\n * If the file is readable, the file's contents will be stored in a context value at `staple_value_{name}`.\n */\n stapleFile(name: string, location: string): void {\n this.exceptionAttachments.set(name, location);\n }\n\n /**\n * The main execution phase.\n */\n abstract main(): Promise;\n\n /**\n * The post execution phase.\n */\n abstract post(): Promise;\n\n /**\n * Execute the Action as defined.\n */\n execute(): void {\n // eslint-disable-next-line github/no-then\n this.executeAsync().catch((error: Error) => {\n // eslint-disable-next-line no-console\n console.log(error);\n process.exitCode = 1;\n });\n }\n\n getTemporaryName(): string {\n const tmpDir = process.env[\"RUNNER_TEMP\"] || tmpdir();\n return path.join(tmpDir, `${this.actionOptions.name}-${randomUUID()}`);\n }\n\n addFact(key: string, value: string | boolean | number): void {\n this.facts[key] = value;\n }\n\n async getDiagnosticsUrl(): Promise {\n return await this.idsHost.getDiagnosticsUrl();\n }\n\n getUniqueId(): string {\n return (\n this.identity.github_workflow_run_differentiator_hash ||\n process.env.RUNNER_TRACKING_ID ||\n randomUUID()\n );\n }\n\n // This ID will be saved in the action's state, to be persisted across phase steps\n getCrossPhaseId(): string {\n let crossPhaseId = actionsCore.getState(STATE_KEY_CROSS_PHASE_ID);\n\n if (crossPhaseId === \"\") {\n crossPhaseId = randomUUID();\n actionsCore.saveState(STATE_KEY_CROSS_PHASE_ID, crossPhaseId);\n }\n\n return crossPhaseId;\n }\n\n getCorrelationHashes(): correlation.AnonymizedCorrelationHashes {\n return this.identity;\n }\n\n recordEvent(\n eventName: string,\n context: Record = {},\n ): void {\n const prefixedName =\n eventName === \"$feature_flag_called\"\n ? eventName\n : `${this.actionOptions.eventPrefix}${eventName}`;\n\n this.events.push({\n name: prefixedName,\n\n // Use the anon distinct ID as the distinct ID until we actually have a distinct ID in the future\n distinct_id: this.identity.$anon_distinct_id,\n\n // distinct_id\n uuid: randomUUID(),\n timestamp: new Date(),\n\n properties: {\n ...context,\n ...this.identity,\n ...this.facts,\n ...Object.fromEntries(\n Object.entries(this.featureEventMetadata).map<\n [string, string | boolean]\n >(([name, variant]) => [`$feature/${name}`, variant]),\n ),\n },\n });\n }\n\n /**\n * Unpacks the closure returned by `fetchArtifact()`, imports the\n * contents into the Nix store, and returns the path of the executable at\n * `/nix/store/STORE_PATH/bin/${bin}`.\n */\n async unpackClosure(bin: string): Promise {\n const artifact = await this.fetchArtifact();\n const { stdout } = await promisify(exec)(\n `cat \"${artifact}\" | xz -d | nix-store --import`,\n );\n const paths = stdout.split(os.EOL);\n const lastPath = paths.at(-2);\n return `${lastPath}/bin/${bin}`;\n }\n\n /**\n * Fetches the executable at the URL determined by the `source-*` inputs and\n * other facts, `chmod`s it, and returns the path to the executable on disk.\n */\n async fetchExecutable(): Promise {\n const binaryPath = await this.fetchArtifact();\n await chmod(binaryPath, fs.constants.S_IXUSR | fs.constants.S_IXGRP);\n return binaryPath;\n }\n\n private get isMain(): boolean {\n return this.executionPhase === \"main\";\n }\n\n private get isPost(): boolean {\n return this.executionPhase === \"post\";\n }\n\n private async executeAsync(): Promise {\n try {\n await this.checkIn();\n\n const correlationHashes = JSON.stringify(this.getCorrelationHashes());\n process.env.DETSYS_CORRELATION = correlationHashes;\n try {\n await writeCorrelationHashes(correlationHashes);\n } catch (error) {\n this.recordEvent(EVENT_STORE_IDENTITY_FAILED, { error: String(error) });\n }\n\n if (!(await this.preflightRequireNix())) {\n this.recordEvent(EVENT_PREFLIGHT_REQUIRE_NIX_DENIED);\n return;\n } else {\n await this.preflightNixStoreInfo();\n await this.preflightNixVersion();\n this.addFact(FACT_NIX_STORE_TRUST, this.nixStoreTrust);\n }\n\n if (this.isMain) {\n await this.main();\n\n // Run the preflight of the nix version a second time so our \"shutdown\" events have updated version info.\n await this.preflightNixVersion();\n } else if (this.isPost) {\n await this.post();\n }\n this.addFact(FACT_ENDED_WITH_EXCEPTION, false);\n } catch (e: unknown) {\n this.addFact(FACT_ENDED_WITH_EXCEPTION, true);\n\n const reportable = stringifyError(e);\n\n this.addFact(FACT_FINAL_EXCEPTION, reportable);\n\n if (this.isPost) {\n actionsCore.warning(reportable);\n } else {\n actionsCore.setFailed(reportable);\n }\n\n const doGzip = promisify(gzip);\n\n const exceptionContext: Map = new Map();\n for (const [attachmentLabel, filePath] of this.exceptionAttachments) {\n try {\n const logText = readFileSync(filePath);\n const buf = await doGzip(logText);\n exceptionContext.set(\n `staple_value_${attachmentLabel}`,\n buf.toString(\"base64\"),\n );\n } catch (innerError: unknown) {\n exceptionContext.set(\n `staple_failure_${attachmentLabel}`,\n stringifyError(innerError),\n );\n }\n }\n\n this.recordEvent(EVENT_EXCEPTION, Object.fromEntries(exceptionContext));\n } finally {\n if (this.isPost) {\n await this.collectBacktraces();\n }\n\n await this.complete();\n }\n }\n\n async getClient(): Promise {\n return await this.idsHost.getGot(\n (incitingError: unknown, prevUrl: URL, nextUrl: URL) => {\n this.recordPlausibleTimeout(incitingError);\n\n this.recordEvent(\"ids-failover\", {\n previousUrl: prevUrl.toString(),\n nextUrl: nextUrl.toString(),\n });\n },\n );\n }\n\n private async checkIn(): Promise {\n const checkin = await this.requestCheckIn();\n if (checkin === undefined) {\n return;\n }\n\n this.features = checkin.options;\n for (const [key, feature] of Object.entries(this.features)) {\n this.featureEventMetadata[key] = feature.variant;\n }\n\n const impactSymbol: Map = new Map([\n [\"none\", \"⚪\"],\n [\"maintenance\", \"🛠️\"],\n [\"minor\", \"🟡\"],\n [\"major\", \"🟠\"],\n [\"critical\", \"🔴\"],\n ]);\n const defaultImpactSymbol = \"🔵\";\n\n if (checkin.status !== null) {\n const summaries: string[] = [];\n\n for (const incident of checkin.status.incidents) {\n summaries.push(\n `${impactSymbol.get(incident.impact) || defaultImpactSymbol} ${incident.status.replace(\"_\", \" \")}: ${incident.name} (${incident.shortlink})`,\n );\n }\n\n for (const maintenance of checkin.status.scheduled_maintenances) {\n summaries.push(\n `${impactSymbol.get(maintenance.impact) || defaultImpactSymbol} ${maintenance.status.replace(\"_\", \" \")}: ${maintenance.name} (${maintenance.shortlink})`,\n );\n }\n\n if (summaries.length > 0) {\n actionsCore.info(\n // Bright red, Bold, Underline\n `${\"\\u001b[0;31m\"}${\"\\u001b[1m\"}${\"\\u001b[4m\"}${checkin.status.page.name} Status`,\n );\n for (const notice of summaries) {\n actionsCore.info(notice);\n }\n actionsCore.info(`See: ${checkin.status.page.url}`);\n actionsCore.info(``);\n }\n }\n }\n\n getFeature(name: string): Feature | undefined {\n if (!this.features.hasOwnProperty(name)) {\n return undefined;\n }\n\n const result = this.features[name];\n if (result === undefined) {\n return undefined;\n }\n\n this.recordEvent(\"$feature_flag_called\", {\n $feature_flag: name,\n $feature_flag_response: result.variant,\n });\n\n return result;\n }\n\n /**\n * Check in to install.determinate.systems, to accomplish three things:\n *\n * 1. Preflight the server selected from IdsHost, to increase the chances of success.\n * 2. Fetch any incidents and maintenance events to let users know in case things are weird.\n * 3. Get feature flag data so we can gently roll out new features.\n */\n private async requestCheckIn(): Promise {\n for (\n let attemptsRemaining = 5;\n attemptsRemaining > 0;\n attemptsRemaining--\n ) {\n const checkInUrl = await this.getCheckInUrl();\n if (checkInUrl === undefined) {\n return undefined;\n }\n\n try {\n actionsCore.debug(`Preflighting via ${checkInUrl}`);\n\n const props = {\n // Use a distinct_id when we actually have one\n distinct_id: this.identity.$anon_distinct_id,\n anon_distinct_id: this.identity.$anon_distinct_id,\n groups: this.identity.$groups,\n person_properties: {\n ci: \"github\",\n\n ...this.identity,\n ...this.facts,\n },\n };\n\n return await (\n await this.getClient()\n )\n .post(checkInUrl, {\n json: props,\n timeout: {\n request: CHECK_IN_ENDPOINT_TIMEOUT_MS,\n },\n })\n .json();\n } catch (e: unknown) {\n this.recordPlausibleTimeout(e);\n actionsCore.debug(`Error checking in: ${stringifyError(e)}`);\n this.idsHost.markCurrentHostBroken();\n }\n }\n\n return undefined;\n }\n\n private recordPlausibleTimeout(e: unknown): void {\n // see: https://github.com/sindresorhus/got/blob/895e463fa699d6f2e4b2fc01ceb3b2bb9e157f4c/documentation/8-errors.md\n if (e instanceof TimeoutError && \"timings\" in e && \"request\" in e) {\n const reportContext: {\n [index: string]: string | number | undefined;\n } = {\n url: e.request.requestUrl?.toString(),\n retry_count: e.request.retryCount,\n };\n\n for (const [key, value] of Object.entries(e.timings.phases)) {\n if (Number.isFinite(value)) {\n reportContext[`timing_phase_${key}`] = value;\n }\n }\n\n this.recordEvent(\"timeout\", reportContext);\n }\n }\n\n /**\n * Fetch an artifact, such as a tarball, from the location determined by the\n * `source-*` inputs. If `source-binary` is specified, this will return a path\n * to a binary on disk; otherwise, the artifact will be downloaded from the\n * URL determined by the other `source-*` inputs (`source-url`, `source-pr`,\n * etc.).\n */\n private async fetchArtifact(): Promise {\n const sourceBinary = getStringOrNull(\"source-binary\");\n\n // If source-binary is set, use that. Otherwise fall back to the source-* parameters.\n if (sourceBinary !== null && sourceBinary !== \"\") {\n actionsCore.debug(`Using the provided source binary at ${sourceBinary}`);\n return sourceBinary;\n }\n\n actionsCore.startGroup(\n `Downloading ${this.actionOptions.name} for ${this.architectureFetchSuffix}`,\n );\n\n try {\n actionsCore.info(`Fetching from ${await this.getSourceUrl()}`);\n\n const correlatedUrl = await this.getSourceUrl();\n correlatedUrl.searchParams.set(\"ci\", \"github\");\n correlatedUrl.searchParams.set(\n \"correlation\",\n JSON.stringify(this.identity),\n );\n\n const versionCheckup = await (await this.getClient()).head(correlatedUrl);\n if (versionCheckup.headers.etag) {\n const v = versionCheckup.headers.etag;\n this.addFact(FACT_SOURCE_URL_ETAG, v);\n\n actionsCore.debug(\n `Checking the tool cache for ${await this.getSourceUrl()} at ${v}`,\n );\n const cached = await this.getCachedVersion(v);\n if (cached) {\n this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = true;\n actionsCore.debug(`Tool cache hit.`);\n return cached;\n }\n }\n\n this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = false;\n\n actionsCore.debug(\n `No match from the cache, re-fetching from the redirect: ${versionCheckup.url}`,\n );\n\n const destFile = this.getTemporaryName();\n\n const fetchStream = await this.downloadFile(\n new URL(versionCheckup.url),\n destFile,\n );\n\n if (fetchStream.response?.headers.etag) {\n const v = fetchStream.response.headers.etag;\n\n try {\n await this.saveCachedVersion(v, destFile);\n } catch (e: unknown) {\n actionsCore.debug(`Error caching the artifact: ${stringifyError(e)}`);\n }\n }\n\n return destFile;\n } catch (e: unknown) {\n this.recordPlausibleTimeout(e);\n throw e;\n } finally {\n actionsCore.endGroup();\n }\n }\n\n /**\n * A helper function for failing on error only if strict mode is enabled.\n * This is intended only for CI environments testing Actions themselves.\n */\n failOnError(msg: string): void {\n if (this.strictMode) {\n actionsCore.setFailed(`strict mode failure: ${msg}`);\n }\n }\n\n private async downloadFile(\n url: URL,\n destination: PathLike,\n ): Promise {\n const client = await this.getClient();\n\n return new Promise((resolve, reject) => {\n // Current stream handle\n let writeStream: WriteStream | undefined;\n\n // Sentinel condition in case we want to abort retrying due to FS issues\n let failed = false;\n\n const retry = (stream: Request): void => {\n if (writeStream) {\n writeStream.destroy();\n }\n\n writeStream = createWriteStream(destination, {\n encoding: \"binary\",\n mode: 0o755,\n });\n\n writeStream.once(\"error\", (error) => {\n // Set failed here since promise rejections don't impact control flow\n failed = true;\n reject(error);\n });\n\n writeStream.on(\"finish\", () => {\n if (!failed) {\n resolve(stream);\n }\n });\n\n stream.once(\"retry\", (_count, _error, createRetryStream) => {\n // Optional: check `failed' here in case you want to stop retrying\n retry(createRetryStream());\n });\n\n // Now that all the handlers have been set up we can pipe from the HTTP\n // stream to disk\n stream.pipe(writeStream);\n };\n\n // Begin the retry logic by giving it a fresh got.Request\n retry(client.stream(url));\n });\n }\n\n private async complete(): Promise {\n this.recordEvent(`complete_${this.executionPhase}`);\n await this.submitEvents();\n }\n\n private async getCheckInUrl(): Promise {\n const checkInUrl = await this.idsHost.getDynamicRootUrl();\n\n if (checkInUrl === undefined) {\n return undefined;\n }\n\n checkInUrl.pathname += \"check-in\";\n return checkInUrl;\n }\n\n private async getSourceUrl(): Promise {\n const p = this.sourceParameters;\n\n if (p.url) {\n this.addFact(FACT_SOURCE_URL, p.url);\n return new URL(p.url);\n }\n\n const fetchUrl = await this.idsHost.getRootUrl();\n fetchUrl.pathname += this.actionOptions.idsProjectName;\n\n if (p.tag) {\n fetchUrl.pathname += `/tag/${p.tag}`;\n } else if (p.pr) {\n fetchUrl.pathname += `/pr/${p.pr}`;\n } else if (p.branch) {\n fetchUrl.pathname += `/branch/${p.branch}`;\n } else if (p.revision) {\n fetchUrl.pathname += `/rev/${p.revision}`;\n } else {\n fetchUrl.pathname += `/stable`;\n }\n\n fetchUrl.pathname += `/${this.architectureFetchSuffix}`;\n\n this.addFact(FACT_SOURCE_URL, fetchUrl.toString());\n\n return fetchUrl;\n }\n\n private cacheKey(version: string): string {\n const cleanedVersion = version.replace(/[^a-zA-Z0-9-+.]/g, \"\");\n return `determinatesystem-${this.actionOptions.name}-${this.architectureFetchSuffix}-${cleanedVersion}`;\n }\n\n private async getCachedVersion(version: string): Promise {\n const startCwd = process.cwd();\n\n try {\n const tempDir = this.getTemporaryName();\n await mkdir(tempDir);\n process.chdir(tempDir);\n\n // extremely evil shit right here:\n process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE;\n delete process.env.GITHUB_WORKSPACE;\n\n if (\n await actionsCache.restoreCache(\n [this.actionOptions.name],\n this.cacheKey(version),\n [],\n undefined,\n true,\n )\n ) {\n this.recordEvent(EVENT_ARTIFACT_CACHE_HIT);\n return `${tempDir}/${this.actionOptions.name}`;\n }\n\n this.recordEvent(EVENT_ARTIFACT_CACHE_MISS);\n return undefined;\n } finally {\n process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP;\n delete process.env.GITHUB_WORKSPACE_BACKUP;\n process.chdir(startCwd);\n }\n }\n\n private async saveCachedVersion(\n version: string,\n toolPath: string,\n ): Promise {\n const startCwd = process.cwd();\n\n try {\n const tempDir = this.getTemporaryName();\n await mkdir(tempDir);\n process.chdir(tempDir);\n await copyFile(toolPath, `${tempDir}/${this.actionOptions.name}`);\n\n // extremely evil shit right here:\n process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE;\n delete process.env.GITHUB_WORKSPACE;\n\n await actionsCache.saveCache(\n [this.actionOptions.name],\n this.cacheKey(version),\n undefined,\n true,\n );\n this.recordEvent(EVENT_ARTIFACT_CACHE_PERSIST);\n } finally {\n process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP;\n delete process.env.GITHUB_WORKSPACE_BACKUP;\n process.chdir(startCwd);\n }\n }\n\n private collectBacktraceSetup(): void {\n if (!process.env.DETSYS_BACKTRACE_COLLECTOR) {\n actionsCore.exportVariable(\n \"DETSYS_BACKTRACE_COLLECTOR\",\n this.getCrossPhaseId(),\n );\n\n actionsCore.saveState(STATE_BACKTRACE_START_TIMESTAMP, Date.now());\n }\n }\n\n private async collectBacktraces(): Promise {\n try {\n if (process.env.DETSYS_BACKTRACE_COLLECTOR !== this.getCrossPhaseId()) {\n return;\n }\n\n const backtraces = await collectBacktraces(\n this.actionOptions.binaryNamePrefixes,\n this.actionOptions.binaryNamesDenyList,\n parseInt(actionsCore.getState(STATE_BACKTRACE_START_TIMESTAMP)),\n );\n actionsCore.debug(`Backtraces identified: ${backtraces.size}`);\n if (backtraces.size > 0) {\n this.recordEvent(EVENT_BACKTRACES, Object.fromEntries(backtraces));\n }\n } catch (innerError: unknown) {\n actionsCore.debug(\n `Error collecting backtraces: ${stringifyError(innerError)}`,\n );\n }\n }\n\n private async preflightRequireNix(): Promise {\n let nixLocation: string | undefined;\n\n const pathParts = (process.env[\"PATH\"] || \"\").split(\":\");\n for (const location of pathParts) {\n const candidateNix = path.join(location, \"nix\");\n\n try {\n await fs.access(candidateNix, fs.constants.X_OK);\n actionsCore.debug(`Found Nix at ${candidateNix}`);\n nixLocation = candidateNix;\n break;\n } catch {\n actionsCore.debug(`Nix not at ${candidateNix}`);\n }\n }\n this.addFact(FACT_NIX_LOCATION, nixLocation || \"\");\n\n if (this.actionOptions.requireNix === \"ignore\") {\n return true;\n }\n\n const currentNotFoundState = actionsCore.getState(STATE_KEY_NIX_NOT_FOUND);\n if (currentNotFoundState === STATE_NOT_FOUND) {\n // It was previously not found, so don't run subsequent actions\n return false;\n }\n\n if (nixLocation !== undefined) {\n return true;\n }\n actionsCore.saveState(STATE_KEY_NIX_NOT_FOUND, STATE_NOT_FOUND);\n\n switch (this.actionOptions.requireNix) {\n case \"fail\":\n actionsCore.setFailed(\n [\n \"This action can only be used when Nix is installed.\",\n \"Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow.\",\n ].join(\" \"),\n );\n break;\n case \"warn\":\n actionsCore.warning(\n [\n \"This action is in no-op mode because Nix is not installed.\",\n \"Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow.\",\n ].join(\" \"),\n );\n break;\n }\n\n return false;\n }\n\n private async preflightNixStoreInfo(): Promise {\n let output = \"\";\n\n const options: actionsExec.ExecOptions = {};\n options.silent = true;\n options.listeners = {\n stdout: (data) => {\n output += data.toString();\n },\n };\n\n try {\n output = \"\";\n await actionsExec.exec(\"nix\", [\"store\", \"info\", \"--json\"], options);\n this.addFact(FACT_NIX_STORE_CHECK_METHOD, \"info\");\n } catch {\n try {\n // reset output\n output = \"\";\n await actionsExec.exec(\"nix\", [\"store\", \"ping\", \"--json\"], options);\n this.addFact(FACT_NIX_STORE_CHECK_METHOD, \"ping\");\n } catch {\n this.addFact(FACT_NIX_STORE_CHECK_METHOD, \"none\");\n return;\n }\n }\n\n try {\n const parsed = JSON.parse(output);\n if (parsed.trusted === 1) {\n this.nixStoreTrust = \"trusted\";\n } else if (parsed.trusted === 0) {\n this.nixStoreTrust = \"untrusted\";\n } else if (parsed.trusted !== undefined) {\n this.addFact(\n FACT_NIX_STORE_CHECK_ERROR,\n `Mysterious trusted value: ${JSON.stringify(parsed.trusted)}`,\n );\n }\n\n this.addFact(FACT_NIX_STORE_VERSION, JSON.stringify(parsed.version));\n } catch (e: unknown) {\n this.addFact(FACT_NIX_STORE_CHECK_ERROR, stringifyError(e));\n }\n }\n\n private async preflightNixVersion(): Promise {\n let output = \"unknown\";\n\n try {\n ({ stdout: output } = await actionsExec.getExecOutput(\n \"nix\",\n [\"--version\"],\n {\n silent: true,\n },\n ));\n output = output.trim() || \"unknown\";\n } catch {\n // That's fine.\n }\n\n this.addFact(FACT_NIX_VERSION, output);\n }\n\n private async submitEvents(): Promise {\n const diagnosticsUrl = await this.idsHost.getDiagnosticsUrl();\n if (diagnosticsUrl === undefined) {\n actionsCore.debug(\n \"Diagnostics are disabled. Not sending the following events:\",\n );\n actionsCore.debug(JSON.stringify(this.events, undefined, 2));\n return;\n }\n\n const batch = {\n sent_at: new Date(),\n batch: this.events,\n };\n\n try {\n await (\n await this.getClient()\n ).post(diagnosticsUrl, {\n json: batch,\n timeout: {\n request: DIAGNOSTIC_ENDPOINT_TIMEOUT_MS,\n },\n });\n } catch (err: unknown) {\n this.recordPlausibleTimeout(err);\n\n actionsCore.debug(\n `Error submitting diagnostics event to ${diagnosticsUrl}: ${stringifyError(err)}`,\n );\n }\n this.events = [];\n }\n}\n\nfunction stringifyError(error: unknown): string {\n return error instanceof Error || typeof error == \"string\"\n ? error.toString()\n : JSON.stringify(error);\n}\n\nfunction makeOptionsConfident(\n actionOptions: ActionOptions,\n): ConfidentActionOptions {\n const idsProjectName = actionOptions.idsProjectName ?? actionOptions.name;\n\n const finalOpts: ConfidentActionOptions = {\n name: actionOptions.name,\n idsProjectName,\n eventPrefix: actionOptions.eventPrefix || \"action:\",\n fetchStyle: actionOptions.fetchStyle,\n legacySourcePrefix: actionOptions.legacySourcePrefix,\n requireNix: actionOptions.requireNix,\n binaryNamePrefixes: actionOptions.binaryNamePrefixes ?? [\n \"nix\",\n \"determinate-nixd\",\n actionOptions.name,\n ],\n binaryNamesDenyList:\n actionOptions.binaryNamePrefixes ?? PROGRAM_NAME_CRASH_DENY_LIST,\n };\n\n actionsCore.debug(\"idslib options:\");\n actionsCore.debug(JSON.stringify(finalOpts, undefined, 2));\n\n return finalOpts;\n}\n\n// Public exports from other files\nexport {\n CheckIn,\n Feature,\n Incident,\n Maintenance,\n Page,\n StatusSummary,\n} from \"./check-in.js\";\nexport { AnonymizedCorrelationHashes } from \"./correlation.js\";\nexport { stringifyError } from \"./errors.js\";\nexport { IdsHost } from \"./ids-host.js\";\nexport { SourceDef } from \"./sourcedef.js\";\nexport * as inputs from \"./inputs.js\";\nexport * as platform from \"./platform.js\";\n"],"mappings":";;;;;;;AAcA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,SAAS,iBAAiB;AAE1B,IAAM,gBAAgB,UAAa,WAAQ;AAyB3C,IAAM,kCAA2D;AAAA,EAC/D,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,OAAO;AACT;AAQO,SAAS,YAAY,aAA8C;AACxE,QAAM,UAAU,EAAE,GAAG,iCAAiC,GAAG,YAAY;AAErE,QAAM,0BAAoC;AAAA,IACxC,QAAQ;AAAA,EACV;AAEA,MAAO,QAAK,MAAM,SAAS;AACzB,QAAI,QAAQ,SAAS,QAAQ;AAC3B,aAAO,UAAU;AAAA,IACnB,OAAO;AACL,aAAO,QAAQ,QAAQ,UAAU,CAAC;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,QAAQ,SAAS,QAAQ;AAC3B,WAAO,sBAAsB,yBAAyB,OAAO;AAAA,EAC/D,OAAO;AACL,WAAO,QAAQ;AAAA,MACb,uBAAuB,yBAAyB,OAAO;AAAA,IACzD;AAAA,EACF;AACF;AASA,SAAS,eAAe,YAAoB,cAA8B;AACxE,QAAM,QAAkB,aAAa,MAAM,IAAI;AAE/C,aAAW,QAAQ,OAAO;AACxB,UAAM,WAAW,KAAK,MAAM,GAAG;AAE/B,QAAI,SAAS,WAAW,GAAG;AACzB,eAAS,CAAC,IAAI,SAAS,CAAC,EAAE,QAAQ,YAAY,EAAE;AAEhD,aAAO,eAAe,YAAY,SAAS,CAAC,EAAE,YAAY,GAAG;AAAA,QAC3D,OAAO,SAAS,CAAC;AAAA,QACjB,UAAU;AAAA,QACV,YAAY;AAAA,QACZ,cAAc;AAAA,M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MAAY,mBAAM,KAAK,UAAU,KAAK,QAAQ,QAAW,CAAC,CAAC;AAC3D;AAAA,IACF;AAEA,UAAM,QAAQ;AAAA,MACZ,SAAS,oBAAI,KAAK;AAAA,MAClB,OAAO,KAAK;AAAA,IACd;AAEA,QAAI;AACF,aACE,MAAM,KAAK,UAAU,GACrB,KAAK,gBAAgB;AAAA,QACrB,MAAM;AAAA,QACN,SAAS;AAAA,UACP,SAAS;AAAA,QACX;AAAA,MACF,CAAC;AAAA,IACH,SAAS,KAAc;AACrB,WAAK,uBAAuB,GAAG;AAE/B,MAAY;AAAA,QACV,yCAAyC,cAAc,KAAKA,gBAAe,GAAG,CAAC;AAAA,MACjF;AAAA,IACF;AACA,SAAK,SAAS,CAAC;AAAA,EACjB;AACF;AAEA,SAASA,gBAAeC,QAAwB;AAC9C,SAAOA,kBAAiB,SAAS,OAAOA,UAAS,WAC7CA,OAAM,SAAS,IACf,KAAK,UAAUA,MAAK;AAC1B;AAEA,SAAS,qBACP,eACwB;AACxB,QAAM,iBAAiB,cAAc,kBAAkB,cAAc;AAErE,QAAM,YAAoC;AAAA,IACxC,MAAM,cAAc;AAAA,IACpB;AAAA,IACA,aAAa,cAAc,eAAe;AAAA,IAC1C,YAAY,cAAc;AAAA,IAC1B,oBAAoB,cAAc;AAAA,IAClC,YAAY,cAAc;AAAA,IAC1B,oBAAoB,cAAc,sBAAsB;AAAA,MACtD;AAAA,MACA;AAAA,MACA,cAAc;AAAA,IAChB;AAAA,IACA,qBACE,cAAc,sBAAsB;AAAA,EACxC;AAEA,EAAY,mBAAM,iBAAiB;AACnC,EAAY,mBAAM,KAAK,UAAU,WAAW,QAAW,CAAC,CAAC;AAEzD,SAAO;AACT;","names":["error","os","platform","arch","actionsCore","exec","readFile","promisify","actionsCore","actionsCore","error","actionsCore","actionsCore","actionsCore","actionsCore","exec","randomUUID","readFileSync","fs","os","promisify","gzip","fs","stringifyError","error","randomUUID","promisify","exec","gzip","readFileSync"]} \ No newline at end of file +{"version":3,"file":"index.js","names":["fs","linuxReleaseInfoOptionsDefaults: LinuxReleaseInfoOptions","searchOsReleaseFileList: string[]","os","lines: string[]","exec","data: object","ret: T","backtraces: Map","exec","sussyArray: unknown","innerError: unknown","coredumps: SystemdCoreDumpInfo[]","ident: AnonymizedCorrelationHashes","currentUrl: URL","newUrl: URL","err: unknown","url: URL | undefined","defaultFallback: Promise","records: SrvRecord[]","reason: unknown","byPriorityWeight: Map","prioritizedRecords: SrvRecord[]","keys: number[]","scratchRecords: SrvRecord[]","result: SrvRecord[]","weights: number[]","os","actionsExec","correlation.identify","platform.getArchOs","platform.getNixPlatform","stringifyError","fsConstants","e: unknown","exceptionContext: Map","innerError: unknown","impactSymbol: Map","summaries: string[]","reportContext: {\n [index: string]: string | number | undefined;\n }","writeStream: WriteStream | undefined","nixLocation: string | undefined","options: actionsExec.ExecOptions","err: unknown","finalOpts: ConfidentActionOptions"],"sources":["../src/linux-release-info.ts","../src/actions-core-platform.ts","../src/errors.ts","../src/backtrace.ts","../src/correlation.ts","../src/ids-host.ts","../src/inputs.ts","../src/platform.ts","../src/sourcedef.ts","../src/index.ts"],"sourcesContent":["/*!\n * linux-release-info\n * Get Linux release info (distribution name, version, arch, release, etc.)\n * from '/etc/os-release' or '/usr/lib/os-release' files and from native os\n * module. On Windows and Darwin platforms it only returns common node os module\n * info (platform, hostname, release, and arch)\n *\n * Licensed under MIT\n * Copyright (c) 2018-2020 [Samuel Carreira]\n */\n// NOTE: we depend on this directly to get around some un-fun issues with mixing CommonJS\n// and ESM in the bundle. We've modified the original logic to improve things like typing\n// and fixing ESLint issues. Originally drawn from:\n// https://github.com/samuelcarreira/linux-release-info/blob/84a91aa5442b47900da03020c590507545d3dc74/src/index.ts\nimport * as fs from \"node:fs\";\nimport * as os from \"node:os\";\nimport { promisify } from \"node:util\";\n\nconst readFileAsync = promisify(fs.readFile);\n\nexport interface LinuxReleaseInfoOptions {\n /**\n * read mode, possible values: 'async' and 'sync'\n *\n * @default 'async'\n */\n mode?: \"async\" | \"sync\";\n /**\n * custom complete file path with os info default null/none\n * if not provided the system will search on the '/etc/os-release'\n * and '/usr/lib/os-release' files\n *\n * @default null\n */\n customFile?: string | null | undefined;\n /**\n * if true, show console debug messages\n *\n * @default false\n */\n debug?: boolean;\n}\n\nconst linuxReleaseInfoOptionsDefaults: LinuxReleaseInfoOptions = {\n mode: \"async\",\n customFile: null,\n debug: false,\n};\n\n/**\n * Get OS release info from 'os-release' file and from native os module\n * on Windows or Darwin it only returns common os module info\n * (uses native fs module)\n * @returns {object} info from the current os\n */\nexport function releaseInfo(infoOptions: LinuxReleaseInfoOptions): object {\n const options = { ...linuxReleaseInfoOptionsDefaults, ...infoOptions };\n\n const searchOsReleaseFileList: string[] = osReleaseFileList(\n options.customFile,\n );\n\n if (os.type() !== \"Linux\") {\n if (options.mode === \"sync\") {\n return getOsInfo();\n } else {\n return Promise.resolve(getOsInfo());\n }\n }\n\n if (options.mode === \"sync\") {\n return readSyncOsreleaseFile(searchOsReleaseFileList, options);\n } else {\n return Promise.resolve(\n readAsyncOsReleaseFile(searchOsReleaseFileList, options),\n );\n }\n}\n\n/**\n * Format file data: convert data to object keys/values\n *\n * @param {object} sourceData Source object to be appended\n * @param {string} srcParseData Input file data to be parsed\n * @returns {object} Formated object\n */\nfunction formatFileData(sourceData: OsInfo, srcParseData: string): OsInfo {\n const lines: string[] = srcParseData.split(\"\\n\");\n\n for (const line of lines) {\n const lineData = line.split(\"=\");\n\n if (lineData.length === 2) {\n lineData[1] = lineData[1].replace(/[\"'\\r]/gi, \"\"); // remove quotes and return character\n\n Object.defineProperty(sourceData, lineData[0].toLowerCase(), {\n value: lineData[1],\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n\n return sourceData;\n}\n\n/**\n * Export a list of os-release files\n *\n * @param {string} customFile optional custom complete filepath\n * @returns {array} list of os-release files\n */\nfunction osReleaseFileList(customFile: string | null | undefined): string[] {\n const DEFAULT_OS_RELEASE_FILES = [\"/etc/os-release\", \"/usr/lib/os-release\"];\n\n if (!customFile) {\n return DEFAULT_OS_RELEASE_FILES;\n } else {\n return Array(customFile);\n }\n}\n\n/**\n * Operating system info.\n */\ntype OsInfo = {\n type: string;\n platform: string;\n hostname: string;\n arch: string;\n release: string;\n};\n\n/**\n * Get OS Basic Info\n * (uses node 'os' native module)\n *\n * @returns {OsInfo} os basic info\n */\nfunction getOsInfo(): OsInfo {\n return {\n type: os.type(),\n platform: os.platform(),\n hostname: os.hostname(),\n arch: os.arch(),\n release: os.release(),\n };\n}\n\n/* Helper functions */\n\nasync function readAsyncOsReleaseFile(\n fileList: string[],\n options: LinuxReleaseInfoOptions,\n): Promise {\n let fileData = null;\n\n for (const osReleaseFile of fileList) {\n try {\n if (options.debug) {\n /* eslint-disable no-console */\n console.log(`Trying to read '${osReleaseFile}'...`);\n }\n\n fileData = await readFileAsync(osReleaseFile, \"binary\");\n\n if (options.debug) {\n console.log(`Read data:\\n${fileData}`);\n }\n\n break;\n } catch (error) {\n if (options.debug) {\n console.error(error);\n }\n }\n }\n\n if (fileData === null) {\n throw new Error(\"Cannot read os-release file!\");\n //return getOsInfo();\n }\n\n return formatFileData(getOsInfo(), fileData);\n}\n\nfunction readSyncOsreleaseFile(\n releaseFileList: string[],\n options: LinuxReleaseInfoOptions,\n): OsInfo {\n let fileData = null;\n\n for (const osReleaseFile of releaseFileList) {\n try {\n if (options.debug) {\n console.log(`Trying to read '${osReleaseFile}'...`);\n }\n\n fileData = fs.readFileSync(osReleaseFile, \"binary\");\n\n if (options.debug) {\n console.log(`Read data:\\n${fileData}`);\n }\n\n break;\n } catch (error) {\n if (options.debug) {\n console.error(error);\n }\n }\n }\n\n if (fileData === null) {\n throw new Error(\"Cannot read os-release file!\");\n //return getOsInfo();\n }\n\n return formatFileData(getOsInfo(), fileData);\n}\n","// MIT, mostly lifted from https://github.com/actions/toolkit/blob/5a736647a123ecf8582376bdaee833fbae5b3847/packages/core/src/platform.ts\n// since it isn't in @actions/core 1.10.1 which is their current release as 2024-04-19.\n// Changes: Replaced the lsb_release call in Linux with `linux-release-info` to parse the os-release file directly.\nimport { releaseInfo } from \"./linux-release-info.js\";\nimport * as actionsCore from \"@actions/core\";\nimport * as exec from \"@actions/exec\";\nimport os from \"os\";\n\n/**\n * The name and version of the Action runner's system.\n */\ntype SystemInfo = {\n name: string;\n version: string;\n};\n\n/**\n * Get the name and version of the current Windows system.\n */\nconst getWindowsInfo = async (): Promise => {\n const { stdout: version } = await exec.getExecOutput(\n 'powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"',\n undefined,\n {\n silent: true,\n },\n );\n\n const { stdout: name } = await exec.getExecOutput(\n 'powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"',\n undefined,\n {\n silent: true,\n },\n );\n\n return {\n name: name.trim(),\n version: version.trim(),\n };\n};\n\n/**\n * Get the name and version of the current macOS system.\n */\nconst getMacOsInfo = async (): Promise => {\n const { stdout } = await exec.getExecOutput(\"sw_vers\", undefined, {\n silent: true,\n });\n\n const version = stdout.match(/ProductVersion:\\s*(.+)/)?.[1] ?? \"\";\n const name = stdout.match(/ProductName:\\s*(.+)/)?.[1] ?? \"\";\n\n return {\n name,\n version,\n };\n};\n\n/**\n * Get the name and version of the current Linux system.\n */\nconst getLinuxInfo = async (): Promise => {\n let data: object = {};\n\n try {\n data = releaseInfo({ mode: \"sync\" });\n actionsCore.debug(`Identified release info: ${JSON.stringify(data)}`);\n } catch (e) {\n actionsCore.debug(`Error collecting release info: ${e}`);\n }\n\n return {\n name: getPropertyViaWithDefault(\n data,\n [\"id\", \"name\", \"pretty_name\", \"id_like\"],\n \"unknown\",\n ),\n version: getPropertyViaWithDefault(\n data,\n [\"version_id\", \"version\", \"version_codename\"],\n \"unknown\",\n ),\n };\n};\n\nfunction getPropertyViaWithDefault(\n data: object,\n names: Property[],\n defaultValue: T,\n): T {\n for (const name of names) {\n const ret: T = getPropertyWithDefault(data, name, defaultValue);\n\n if (ret !== defaultValue) {\n return ret;\n }\n }\n\n return defaultValue;\n}\n\nfunction getPropertyWithDefault(\n data: object,\n name: Property,\n defaultValue: T,\n): T {\n if (!data.hasOwnProperty(name)) {\n return defaultValue;\n }\n\n const value = (data as { [K in Property]: T })[name];\n\n // NB. this check won't work for object instances\n if (typeof value !== typeof defaultValue) {\n return defaultValue;\n }\n\n return value;\n}\n\n/**\n * The Action runner's platform.\n */\nexport const platform = os.platform();\n\n/**\n * The Action runner's architecture.\n */\nexport const arch = os.arch();\n\n/**\n * Whether the Action runner is a Windows system.\n */\nexport const isWindows = platform === \"win32\";\n\n/**\n * Whether the Action runner is a macOS system.\n */\nexport const isMacOS = platform === \"darwin\";\n\n/**\n * Whether the Action runner is a Linux system.\n */\nexport const isLinux = platform === \"linux\";\n\n/**\n * System-level information about the current host (platform, architecture, etc.).\n */\ntype SystemDetails = {\n name: string;\n platform: string;\n arch: string;\n version: string;\n isWindows: boolean;\n isMacOS: boolean;\n isLinux: boolean;\n};\n\n/**\n * Get system-level information about the current host (platform, architecture, etc.).\n */\nexport async function getDetails(): Promise {\n return {\n ...(await (isWindows\n ? getWindowsInfo()\n : isMacOS\n ? getMacOsInfo()\n : getLinuxInfo())),\n platform,\n arch,\n isWindows,\n isMacOS,\n isLinux,\n };\n}\n","/**\n * Coerce a value of type `unknown` into a string.\n */\nexport function stringifyError(e: unknown): string {\n if (e instanceof Error) {\n return e.message;\n } else if (typeof e === \"string\") {\n return e;\n } else {\n return JSON.stringify(e);\n }\n}\n","/**\n * @packageDocumentation\n * Collects backtraces for executables for diagnostics\n */\nimport { isLinux, isMacOS } from \"./actions-core-platform.js\";\nimport { stringifyError } from \"./errors.js\";\nimport * as actionsCore from \"@actions/core\";\nimport * as exec from \"@actions/exec\";\nimport { readFile, readdir, stat } from \"node:fs/promises\";\nimport { promisify } from \"node:util\";\nimport { gzip } from \"node:zlib\";\n\n// Give a few seconds buffer, capturing traces that happened a few seconds earlier.\nconst START_SLOP_SECONDS = 5;\n\nexport async function collectBacktraces(\n prefixes: string[],\n programNameDenyList: string[],\n startTimestampMs: number,\n): Promise> {\n if (isMacOS) {\n return await collectBacktracesMacOS(\n prefixes,\n programNameDenyList,\n startTimestampMs,\n );\n }\n if (isLinux) {\n return await collectBacktracesSystemd(\n prefixes,\n programNameDenyList,\n startTimestampMs,\n );\n }\n\n return new Map();\n}\n\nexport async function collectBacktracesMacOS(\n prefixes: string[],\n programNameDenyList: string[],\n startTimestampMs: number,\n): Promise> {\n const backtraces: Map = new Map();\n\n try {\n const { stdout: logJson } = await exec.getExecOutput(\n \"log\",\n [\n \"show\",\n \"--style\",\n \"json\",\n \"--last\",\n // Note we collect the last 1m only, because it should only take a few seconds to write the crash log.\n // Therefore, any crashes before this 1m should be long done by now.\n \"1m\",\n \"--no-info\",\n \"--predicate\",\n \"sender = 'ReportCrash'\",\n ],\n {\n silent: true,\n },\n );\n\n const sussyArray: unknown = JSON.parse(logJson);\n if (!Array.isArray(sussyArray)) {\n throw new Error(`Log json isn't an array: ${logJson}`);\n }\n\n if (sussyArray.length > 0) {\n actionsCore.info(`Collecting crash data...`);\n const delay = async (ms: number): Promise =>\n new Promise((resolve) => setTimeout(resolve, ms));\n await delay(5000);\n }\n } catch {\n actionsCore.debug(\n \"Failed to check logs for in-progress crash dumps; now proceeding with the assumption that all crash dumps completed.\",\n );\n }\n\n const dirs = [\n [\"system\", \"/Library/Logs/DiagnosticReports/\"],\n [\"user\", `${process.env[\"HOME\"]}/Library/Logs/DiagnosticReports/`],\n ];\n\n for (const [source, dir] of dirs) {\n const fileNames = (await readdir(dir))\n .filter((fileName) => {\n return prefixes.some((prefix) => fileName.startsWith(prefix));\n })\n .filter((fileName) => {\n return !programNameDenyList.some((programName) =>\n fileName.startsWith(programName),\n );\n })\n .filter((fileName) => {\n // macOS creates .diag files periodically, which are called \"microstackshots\".\n // We don't necessarily want those, and they're definitely not crashes.\n // See: https://patents.google.com/patent/US20140237219A1/en\n return !fileName.endsWith(\".diag\");\n });\n\n const doGzip = promisify(gzip);\n for (const fileName of fileNames) {\n try {\n if ((await stat(`${dir}/${fileName}`)).ctimeMs >= startTimestampMs) {\n const logText = await readFile(`${dir}/${fileName}`);\n const buf = await doGzip(logText);\n backtraces.set(\n `backtrace_value_${source}_${fileName}`,\n buf.toString(\"base64\"),\n );\n }\n } catch (innerError: unknown) {\n backtraces.set(\n `backtrace_failure_${source}_${fileName}`,\n stringifyError(innerError),\n );\n }\n }\n }\n\n return backtraces;\n}\n\ntype SystemdCoreDumpInfo = {\n exe: string;\n pid: number;\n};\n\nexport async function collectBacktracesSystemd(\n prefixes: string[],\n programNameDenyList: string[],\n startTimestampMs: number,\n): Promise> {\n const sinceSeconds =\n Math.ceil((Date.now() - startTimestampMs) / 1000) + START_SLOP_SECONDS;\n const backtraces: Map = new Map();\n\n const coredumps: SystemdCoreDumpInfo[] = [];\n\n try {\n const { stdout: coredumpjson } = await exec.getExecOutput(\n \"coredumpctl\",\n [\"--json=pretty\", \"list\", \"--since\", `${sinceSeconds} seconds ago`],\n {\n silent: true,\n },\n );\n\n const sussyArray: unknown = JSON.parse(coredumpjson);\n if (!Array.isArray(sussyArray)) {\n throw new Error(`Coredump isn't an array: ${coredumpjson}`);\n }\n\n for (const sussyObject of sussyArray) {\n const keys = Object.keys(sussyObject);\n\n if (keys.includes(\"exe\") && keys.includes(\"pid\")) {\n if (\n typeof sussyObject.exe == \"string\" &&\n typeof sussyObject.pid == \"number\"\n ) {\n const execParts = sussyObject.exe.split(\"/\");\n const binaryName = execParts[execParts.length - 1];\n\n if (\n prefixes.some((prefix) => binaryName.startsWith(prefix)) &&\n !programNameDenyList.includes(binaryName)\n ) {\n coredumps.push({\n exe: sussyObject.exe,\n pid: sussyObject.pid,\n });\n }\n } else {\n actionsCore.debug(\n `Mysterious coredump entry missing exe string and/or pid number: ${JSON.stringify(sussyObject)}`,\n );\n }\n } else {\n actionsCore.debug(\n `Mysterious coredump entry missing exe value and/or pid value: ${JSON.stringify(sussyObject)}`,\n );\n }\n }\n } catch (innerError: unknown) {\n actionsCore.debug(\n `Cannot collect backtraces: ${stringifyError(innerError)}`,\n );\n\n return backtraces;\n }\n\n const doGzip = promisify(gzip);\n for (const coredump of coredumps) {\n try {\n const { stdout: logText } = await exec.getExecOutput(\n \"coredumpctl\",\n [\"info\", `${coredump.pid}`],\n {\n silent: true,\n },\n );\n\n const buf = await doGzip(logText);\n backtraces.set(`backtrace_value_${coredump.pid}`, buf.toString(\"base64\"));\n } catch (innerError: unknown) {\n backtraces.set(\n `backtrace_failure_${coredump.pid}`,\n stringifyError(innerError),\n );\n }\n }\n\n return backtraces;\n}\n","import * as actionsCore from \"@actions/core\";\nimport { createHash, randomUUID } from \"node:crypto\";\n\nconst OPTIONAL_VARIABLES = [\"INVOCATION_ID\"];\n\n/* eslint-disable camelcase */\n/**\n * JSON sent to server.\n */\nexport type AnonymizedCorrelationHashes = {\n $anon_distinct_id: string;\n $groups: Record;\n $session_id?: string;\n correlation_source: string;\n github_repository_hash?: string;\n github_workflow_hash?: string;\n github_workflow_job_hash?: string;\n github_workflow_run_differentiator_hash?: string;\n github_workflow_run_hash?: string;\n is_ci: boolean;\n};\n\nexport function identify(): AnonymizedCorrelationHashes {\n const repository = hashEnvironmentVariables(\"GHR\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n ]);\n\n const run_differentiator = hashEnvironmentVariables(\"GHWJA\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n \"GITHUB_WORKFLOW\",\n \"GITHUB_JOB\",\n \"GITHUB_RUN_ID\",\n \"GITHUB_RUN_NUMBER\",\n \"GITHUB_RUN_ATTEMPT\",\n \"INVOCATION_ID\",\n ]);\n\n const ident: AnonymizedCorrelationHashes = {\n $anon_distinct_id: process.env[\"RUNNER_TRACKING_ID\"] || randomUUID(),\n\n correlation_source: \"github-actions\",\n\n github_repository_hash: repository,\n github_workflow_hash: hashEnvironmentVariables(\"GHW\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n \"GITHUB_WORKFLOW\",\n ]),\n github_workflow_job_hash: hashEnvironmentVariables(\"GHWJ\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n \"GITHUB_WORKFLOW\",\n \"GITHUB_JOB\",\n ]),\n github_workflow_run_hash: hashEnvironmentVariables(\"GHWJR\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n \"GITHUB_REPOSITORY\",\n \"GITHUB_REPOSITORY_ID\",\n \"GITHUB_WORKFLOW\",\n \"GITHUB_JOB\",\n \"GITHUB_RUN_ID\",\n ]),\n github_workflow_run_differentiator_hash: run_differentiator,\n $session_id: run_differentiator,\n $groups: {\n github_repository: repository,\n github_organization: hashEnvironmentVariables(\"GHO\", [\n \"GITHUB_SERVER_URL\",\n \"GITHUB_REPOSITORY_OWNER\",\n \"GITHUB_REPOSITORY_OWNER_ID\",\n ]),\n },\n is_ci: true,\n };\n\n actionsCore.debug(\"Correlation data:\");\n actionsCore.debug(JSON.stringify(ident, null, 2));\n\n return ident;\n}\n\nfunction hashEnvironmentVariables(\n prefix: string,\n variables: string[],\n): undefined | string {\n const hash = createHash(\"sha256\");\n\n for (const varName of variables) {\n let value = process.env[varName];\n\n if (value === undefined) {\n if (OPTIONAL_VARIABLES.includes(varName)) {\n actionsCore.debug(\n `Optional environment variable not set: ${varName} -- substituting with the variable name`,\n );\n value = varName;\n } else {\n actionsCore.debug(\n `Environment variable not set: ${varName} -- can't generate the requested identity`,\n );\n return undefined;\n }\n }\n\n hash.update(value);\n hash.update(\"\\0\");\n }\n\n return `${prefix}-${hash.digest(\"hex\")}`;\n}\n","/**\n * @packageDocumentation\n * Identifies and discovers backend servers for install.determinate.systems\n */\nimport { stringifyError } from \"./errors.js\";\nimport * as actionsCore from \"@actions/core\";\nimport { Got, got } from \"got\";\nimport type { SrvRecord } from \"node:dns\";\nimport { resolveSrv } from \"node:dns/promises\";\n\nconst DEFAULT_LOOKUP = \"_detsys_ids._tcp.install.determinate.systems.\";\nconst ALLOWED_SUFFIXES = [\n \".install.determinate.systems\",\n \".install.detsys.dev\",\n];\n\nconst DEFAULT_IDS_HOST = \"https://install.determinate.systems\";\nconst LOOKUP = process.env[\"IDS_LOOKUP\"] ?? DEFAULT_LOOKUP;\n\nconst DEFAULT_TIMEOUT = 10_000; // 10 seconds in ms\n\n/**\n * Host information for install.determinate.systems.\n */\nexport class IdsHost {\n private idsProjectName: string;\n private diagnosticsSuffix?: string;\n private runtimeDiagnosticsUrl?: string;\n private prioritizedURLs?: URL[];\n private client?: Got;\n\n constructor(\n idsProjectName: string,\n diagnosticsSuffix: string | undefined,\n runtimeDiagnosticsUrl: string | undefined,\n ) {\n this.idsProjectName = idsProjectName;\n this.diagnosticsSuffix = diagnosticsSuffix;\n this.runtimeDiagnosticsUrl = runtimeDiagnosticsUrl;\n this.client = undefined;\n }\n\n async getGot(\n recordFailoverCallback?: (\n incitingError: unknown,\n prevUrl: URL,\n nextUrl: URL,\n ) => void,\n ): Promise {\n if (this.client === undefined) {\n this.client = got.extend({\n timeout: {\n request: DEFAULT_TIMEOUT,\n },\n\n retry: {\n limit: Math.max((await this.getUrlsByPreference()).length, 3),\n methods: [\"GET\", \"HEAD\"],\n },\n\n hooks: {\n beforeRetry: [\n async (error, retryCount) => {\n const prevUrl = await this.getRootUrl();\n this.markCurrentHostBroken();\n const nextUrl = await this.getRootUrl();\n\n if (recordFailoverCallback !== undefined) {\n recordFailoverCallback(error, prevUrl, nextUrl);\n }\n\n actionsCore.info(\n `Retrying after error ${error.code}, retry #: ${retryCount}`,\n );\n },\n ],\n\n beforeRequest: [\n async (options) => {\n // The getter always returns a URL, even though the setter accepts a string\n const currentUrl: URL = options.url as URL;\n\n if (this.isUrlSubjectToDynamicUrls(currentUrl)) {\n const newUrl: URL = new URL(currentUrl);\n\n const url: URL = await this.getRootUrl();\n newUrl.host = url.host;\n\n options.url = newUrl;\n actionsCore.debug(`Transmuted ${currentUrl} into ${newUrl}`);\n } else {\n actionsCore.debug(`No transmutations on ${currentUrl}`);\n }\n },\n ],\n },\n });\n }\n\n return this.client;\n }\n\n markCurrentHostBroken(): void {\n this.prioritizedURLs?.shift();\n }\n\n setPrioritizedUrls(urls: URL[]): void {\n this.prioritizedURLs = urls;\n }\n\n isUrlSubjectToDynamicUrls(url: URL): boolean {\n if (url.origin === DEFAULT_IDS_HOST) {\n return true;\n }\n\n for (const suffix of ALLOWED_SUFFIXES) {\n if (url.host.endsWith(suffix)) {\n return true;\n }\n }\n\n return false;\n }\n\n async getDynamicRootUrl(): Promise {\n const idsHost = process.env[\"IDS_HOST\"];\n if (idsHost !== undefined) {\n try {\n return new URL(idsHost);\n } catch (err: unknown) {\n actionsCore.error(\n `IDS_HOST environment variable is not a valid URL. Ignoring. ${stringifyError(err)}`,\n );\n }\n }\n\n let url: URL | undefined = undefined;\n try {\n const urls = await this.getUrlsByPreference();\n url = urls[0];\n } catch (err: unknown) {\n actionsCore.error(\n `Error collecting IDS URLs by preference: ${stringifyError(err)}`,\n );\n }\n\n if (url === undefined) {\n return undefined;\n } else {\n // This is a load-bearing `new URL(url)` so that callers can't mutate\n // getRootUrl's return value.\n return new URL(url);\n }\n }\n\n async getRootUrl(): Promise {\n const url = await this.getDynamicRootUrl();\n\n if (url === undefined) {\n return new URL(DEFAULT_IDS_HOST);\n }\n\n return url;\n }\n\n async getDiagnosticsUrl(): Promise {\n if (this.runtimeDiagnosticsUrl === \"\") {\n // User specifically set the diagnostics URL to an empty string\n // so disable diagnostics\n return undefined;\n }\n\n if (\n this.runtimeDiagnosticsUrl !== \"-\" &&\n this.runtimeDiagnosticsUrl !== undefined\n ) {\n try {\n // Caller specified a specific diagnostics URL\n return new URL(this.runtimeDiagnosticsUrl);\n } catch (err: unknown) {\n actionsCore.info(\n `User-provided diagnostic endpoint ignored: not a valid URL: ${stringifyError(err)}`,\n );\n }\n }\n\n try {\n const diagnosticUrl = await this.getRootUrl();\n diagnosticUrl.pathname += \"events/batch\";\n return diagnosticUrl;\n } catch (err: unknown) {\n actionsCore.info(\n `Generated diagnostic endpoint ignored, and diagnostics are disabled: not a valid URL: ${stringifyError(err)}`,\n );\n return undefined;\n }\n }\n\n private async getUrlsByPreference(): Promise {\n if (this.prioritizedURLs === undefined) {\n this.prioritizedURLs = orderRecordsByPriorityWeight(\n await discoverServiceRecords(),\n ).flatMap((record) => recordToUrl(record) || []);\n }\n\n return this.prioritizedURLs;\n }\n}\n\nexport function recordToUrl(record: SrvRecord): URL | undefined {\n const urlStr = `https://${record.name}:${record.port}`;\n try {\n return new URL(urlStr);\n } catch (err: unknown) {\n actionsCore.debug(\n `Record ${JSON.stringify(record)} produced an invalid URL: ${urlStr} (${err})`,\n );\n return undefined;\n }\n}\n\nasync function discoverServiceRecords(): Promise {\n return await discoverServicesStub(resolveSrv(LOOKUP), 1_000);\n}\n\nexport async function discoverServicesStub(\n lookup: Promise,\n timeout: number,\n): Promise {\n const defaultFallback: Promise = new Promise(\n (resolve, _reject) => {\n setTimeout(resolve, timeout, []);\n },\n );\n\n let records: SrvRecord[];\n\n try {\n records = await Promise.race([lookup, defaultFallback]);\n } catch (reason: unknown) {\n actionsCore.debug(`Error resolving SRV records: ${stringifyError(reason)}`);\n records = [];\n }\n\n const acceptableRecords = records.filter((record: SrvRecord): boolean => {\n for (const suffix of ALLOWED_SUFFIXES) {\n if (record.name.endsWith(suffix)) {\n return true;\n }\n }\n\n actionsCore.debug(\n `Unacceptable domain due to an invalid suffix: ${record.name}`,\n );\n\n return false;\n });\n\n if (acceptableRecords.length === 0) {\n actionsCore.debug(`No records found for ${LOOKUP}`);\n } else {\n actionsCore.debug(\n `Resolved ${LOOKUP} to ${JSON.stringify(acceptableRecords)}`,\n );\n }\n\n return acceptableRecords;\n}\n\nexport function orderRecordsByPriorityWeight(\n records: SrvRecord[],\n): SrvRecord[] {\n const byPriorityWeight: Map = new Map();\n for (const record of records) {\n const existing = byPriorityWeight.get(record.priority);\n if (existing) {\n existing.push(record);\n } else {\n byPriorityWeight.set(record.priority, [record]);\n }\n }\n\n const prioritizedRecords: SrvRecord[] = [];\n const keys: number[] = Array.from(byPriorityWeight.keys()).sort(\n (a, b) => a - b,\n );\n\n for (const priority of keys) {\n const recordsByPrio = byPriorityWeight.get(priority);\n if (recordsByPrio === undefined) {\n continue;\n }\n\n prioritizedRecords.push(...weightedRandom(recordsByPrio));\n }\n\n return prioritizedRecords;\n}\n\nexport function weightedRandom(records: SrvRecord[]): SrvRecord[] {\n // Duplicate records so we don't accidentally change our caller's data\n const scratchRecords: SrvRecord[] = records.slice();\n const result: SrvRecord[] = [];\n\n while (scratchRecords.length > 0) {\n const weights: number[] = [];\n\n {\n for (let i = 0; i < scratchRecords.length; i++) {\n weights.push(\n scratchRecords[i].weight + (i > 0 ? scratchRecords[i - 1].weight : 0),\n );\n }\n }\n\n const point = Math.random() * weights[weights.length - 1];\n\n for (\n let selectedIndex = 0;\n selectedIndex < weights.length;\n selectedIndex++\n ) {\n if (weights[selectedIndex] > point) {\n // Remove our selected record and add it to the result\n result.push(scratchRecords.splice(selectedIndex, 1)[0]);\n break;\n }\n }\n }\n\n return result;\n}\n","/**\n * @packageDocumentation\n * Helpers for getting values from an Action's configuration.\n */\nimport * as actionsCore from \"@actions/core\";\n\n/**\n * Get a Boolean input from the Action's configuration by name.\n */\nconst getBool = (name: string): boolean => {\n return actionsCore.getBooleanInput(name);\n};\n\n/**\n * Get a Boolean input from the Action's configuration by name, or undefined if it is unset.\n */\nconst getBoolOrUndefined = (name: string): boolean | undefined => {\n if (getStringOrUndefined(name) === undefined) {\n return undefined;\n }\n\n return actionsCore.getBooleanInput(name);\n};\n\n/**\n * The character used to separate values in the input string.\n */\nexport type Separator = \"space\" | \"comma\";\n\n/**\n * Convert a comma-separated string input into an array of strings. If `comma` is selected,\n * all whitespace is removed from the string before converting to an array.\n */\nconst getArrayOfStrings = (name: string, separator: Separator): string[] => {\n const original = getString(name);\n return handleString(original, separator);\n};\n\n/**\n * Convert a string input into an array of strings or `null` if no value is set.\n */\nconst getArrayOfStringsOrNull = (\n name: string,\n separator: Separator,\n): string[] | null => {\n const original = getStringOrNull(name);\n if (original === null) {\n return null;\n } else {\n return handleString(original, separator);\n }\n};\n\n// Split out this function for use in testing\nexport const handleString = (input: string, separator: Separator): string[] => {\n const sepChar = separator === \"comma\" ? \",\" : /\\s+/;\n const trimmed = input.trim(); // Remove whitespace at the beginning and end\n if (trimmed === \"\") {\n return [];\n }\n\n return trimmed.split(sepChar).map((s: string) => s.trim());\n};\n\n/**\n * Get a multi-line string input from the Action's configuration by name or return `null` if not set.\n */\nconst getMultilineStringOrNull = (name: string): string[] | null => {\n const value = actionsCore.getMultilineInput(name);\n if (value.length === 0) {\n return null;\n } else {\n return value;\n }\n};\n\n/**\n * Get a number input from the Action's configuration by name or return `null` if not set.\n */\nconst getNumberOrNull = (name: string): number | null => {\n const value = actionsCore.getInput(name);\n if (value === \"\") {\n return null;\n } else {\n return Number(value);\n }\n};\n\n/**\n * Get a string input from the Action's configuration.\n */\nconst getString = (name: string): string => {\n return actionsCore.getInput(name);\n};\n\n/**\n * Get a string input from the Action's configuration by name or return `null` if not set.\n */\nconst getStringOrNull = (name: string): string | null => {\n const value = actionsCore.getInput(name);\n if (value === \"\") {\n return null;\n } else {\n return value;\n }\n};\n\n/**\n * Get a string input from the Action's configuration by name or return `undefined` if not set.\n */\nconst getStringOrUndefined = (name: string): string | undefined => {\n const value = actionsCore.getInput(name);\n if (value === \"\") {\n return undefined;\n } else {\n return value;\n }\n};\n\nexport {\n getBool,\n getBoolOrUndefined,\n getArrayOfStrings,\n getArrayOfStringsOrNull,\n getMultilineStringOrNull,\n getNumberOrNull,\n getString,\n getStringOrNull,\n getStringOrUndefined,\n};\n","/**\n * @packageDocumentation\n * Helpers for determining system attributes of the current runner.\n */\nimport * as actionsCore from \"@actions/core\";\n\n/**\n * Get the current architecture plus OS. Examples include `X64-Linux` and `ARM64-macOS`.\n */\nexport function getArchOs(): string {\n const envArch = process.env.RUNNER_ARCH;\n const envOs = process.env.RUNNER_OS;\n\n if (envArch && envOs) {\n return `${envArch}-${envOs}`;\n } else {\n actionsCore.error(\n `Can't identify the platform: RUNNER_ARCH or RUNNER_OS undefined (${envArch}-${envOs})`,\n );\n throw new Error(\"RUNNER_ARCH and/or RUNNER_OS is not defined\");\n }\n}\n\n/**\n * Get the current Nix system. Examples include `x86_64-linux` and `aarch64-darwin`.\n */\nexport function getNixPlatform(archOs: string): string {\n const archOsMap: Map = new Map([\n [\"X64-macOS\", \"x86_64-darwin\"],\n [\"ARM64-macOS\", \"aarch64-darwin\"],\n [\"X64-Linux\", \"x86_64-linux\"],\n [\"ARM64-Linux\", \"aarch64-linux\"],\n ]);\n\n const mappedTo = archOsMap.get(archOs);\n if (mappedTo) {\n return mappedTo;\n } else {\n actionsCore.error(\n `ArchOs (${archOs}) doesn't map to a supported Nix platform.`,\n );\n throw new Error(\n `Cannot convert ArchOs (${archOs}) to a supported Nix platform.`,\n );\n }\n}\n","import { getStringOrUndefined } from \"./inputs.js\";\nimport * as actionsCore from \"@actions/core\";\n\nexport type SourceDef = {\n path?: string;\n url?: string;\n tag?: string;\n pr?: string;\n branch?: string;\n revision?: string;\n};\n\nexport function constructSourceParameters(legacyPrefix?: string): SourceDef {\n return {\n path: noisilyGetInput(\"path\", legacyPrefix),\n url: noisilyGetInput(\"url\", legacyPrefix),\n tag: noisilyGetInput(\"tag\", legacyPrefix),\n pr: noisilyGetInput(\"pr\", legacyPrefix),\n branch: noisilyGetInput(\"branch\", legacyPrefix),\n revision: noisilyGetInput(\"revision\", legacyPrefix),\n };\n}\n\nfunction noisilyGetInput(\n suffix: string,\n legacyPrefix: string | undefined,\n): string | undefined {\n const preferredInput = getStringOrUndefined(`source-${suffix}`);\n\n if (!legacyPrefix) {\n return preferredInput;\n }\n\n // Remaining is for handling cases where the legacy prefix\n // should be examined.\n const legacyInput = getStringOrUndefined(`${legacyPrefix}-${suffix}`);\n\n if (preferredInput && legacyInput) {\n actionsCore.warning(\n `The supported option source-${suffix} and the legacy option ${legacyPrefix}-${suffix} are both set. Preferring source-${suffix}. Please stop setting ${legacyPrefix}-${suffix}.`,\n );\n return preferredInput;\n } else if (legacyInput) {\n actionsCore.warning(\n `The legacy option ${legacyPrefix}-${suffix} is set. Please migrate to source-${suffix}.`,\n );\n return legacyInput;\n } else {\n return preferredInput;\n }\n}\n","/**\n * @packageDocumentation\n * Determinate Systems' TypeScript library for creating GitHub Actions logic.\n */\n// import { version as pkgVersion } from \"../package.json\";\nimport * as ghActionsCorePlatform from \"./actions-core-platform.js\";\nimport { collectBacktraces } from \"./backtrace.js\";\nimport type { CheckIn, Feature } from \"./check-in.js\";\nimport * as correlation from \"./correlation.js\";\nimport { IdsHost } from \"./ids-host.js\";\nimport { getBool, getBoolOrUndefined, getStringOrNull } from \"./inputs.js\";\nimport * as platform from \"./platform.js\";\nimport type { SourceDef } from \"./sourcedef.js\";\nimport { constructSourceParameters } from \"./sourcedef.js\";\nimport * as actionsCache from \"@actions/cache\";\nimport * as actionsCore from \"@actions/core\";\nimport * as actionsExec from \"@actions/exec\";\nimport { type Got, type Request, TimeoutError } from \"got\";\nimport { exec } from \"node:child_process\";\nimport type { UUID } from \"node:crypto\";\nimport { randomUUID } from \"node:crypto\";\nimport {\n PathLike,\n WriteStream,\n createWriteStream,\n constants as fsConstants,\n readFileSync,\n} from \"node:fs\";\nimport fs, { chmod, copyFile, mkdir } from \"node:fs/promises\";\nimport * as os from \"node:os\";\nimport { tmpdir } from \"node:os\";\nimport * as path from \"node:path\";\nimport { promisify } from \"node:util\";\nimport { gzip } from \"node:zlib\";\n\nconst pkgVersion = \"1.0\";\n\nconst EVENT_BACKTRACES = \"backtrace\";\nconst EVENT_EXCEPTION = \"exception\";\nconst EVENT_ARTIFACT_CACHE_HIT = \"artifact_cache_hit\";\nconst EVENT_ARTIFACT_CACHE_MISS = \"artifact_cache_miss\";\nconst EVENT_ARTIFACT_CACHE_PERSIST = \"artifact_cache_persist\";\nconst EVENT_PREFLIGHT_REQUIRE_NIX_DENIED = \"preflight-require-nix-denied\";\nconst EVENT_STORE_IDENTITY_FAILED = \"store_identity_failed\";\n\nconst FACT_ARTIFACT_FETCHED_FROM_CACHE = \"artifact_fetched_from_cache\";\nconst FACT_ENDED_WITH_EXCEPTION = \"ended_with_exception\";\nconst FACT_FINAL_EXCEPTION = \"final_exception\";\nconst FACT_OS = \"$os\";\nconst FACT_OS_VERSION = \"$os_version\";\nconst FACT_SOURCE_URL = \"source_url\";\nconst FACT_SOURCE_URL_ETAG = \"source_url_etag\";\nconst FACT_NIX_VERSION = \"nix_version\";\n\nconst FACT_NIX_LOCATION = \"nix_location\";\nconst FACT_NIX_STORE_TRUST = \"nix_store_trusted\";\nconst FACT_NIX_STORE_VERSION = \"nix_store_version\";\nconst FACT_NIX_STORE_CHECK_METHOD = \"nix_store_check_method\";\nconst FACT_NIX_STORE_CHECK_ERROR = \"nix_store_check_error\";\n\nconst STATE_KEY_EXECUTION_PHASE = \"detsys_action_execution_phase\";\nconst STATE_KEY_NIX_NOT_FOUND = \"detsys_action_nix_not_found\";\nconst STATE_NOT_FOUND = \"not-found\";\nconst STATE_KEY_CROSS_PHASE_ID = \"detsys_cross_phase_id\";\nconst STATE_BACKTRACE_START_TIMESTAMP = \"detsys_backtrace_start_timestamp\";\n\nconst DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 10_000; // 10 seconds in ms\nconst CHECK_IN_ENDPOINT_TIMEOUT_MS = 1_000; // 1 second in ms\nconst PROGRAM_NAME_CRASH_DENY_LIST = [\n \"nix-expr-tests\",\n \"nix-store-tests\",\n \"nix-util-tests\",\n];\n\n/**\n * An enum for describing different \"fetch suffixes\" for i.d.s.\n *\n * - `nix-style` means that system names like `x86_64-linux` and `aarch64-darwin` are used\n * - `gh-env-style` means that names like `X64-Linux` and `ARM64-macOS` are used\n * - `universal` means that the suffix is the static `universal` (for non-system-specific things)\n */\nexport type FetchSuffixStyle = \"nix-style\" | \"gh-env-style\" | \"universal\";\n\n/**\n * GitHub Actions has two possible execution phases: `main` and `post`.\n */\nexport type ExecutionPhase = \"main\" | \"post\";\n\n/**\n * How to handle whether Nix is currently installed on the runner.\n *\n * - `fail` means that the workflow fails if Nix isn't installed\n * - `warn` means that a warning is logged if Nix isn't installed\n * - `ignore` means that Nix will not be checked\n */\nexport type NixRequirementHandling = \"fail\" | \"warn\" | \"ignore\";\n\n/**\n * Whether the Nix store on the runner is trusted.\n *\n * - `trusted` means yes\n * - `untrusted` means no\n * - `unknown` means that the status couldn't be determined\n *\n * This is determined via the output of `nix store info --json`.\n */\nexport type NixStoreTrust = \"trusted\" | \"untrusted\" | \"unknown\";\n\nexport type ActionOptions = {\n // Name of the project generally, and the name of the binary on disk.\n name: string;\n\n // Defaults to `name`, Corresponds to the ProjectHost entry on i.d.s.\n idsProjectName?: string;\n\n // Defaults to `action:`\n eventPrefix?: string;\n\n // The \"architecture\" URL component expected by I.D.S. for the ProjectHost.\n fetchStyle: FetchSuffixStyle;\n\n // IdsToolbox assumes the GitHub Action exposes source overrides, like branch/pr/etc. to be named `source-*`.\n // This prefix adds a fallback name, prefixed by `${legacySourcePrefix}-`.\n // Users who configure legacySourcePrefix will get warnings asking them to change to `source-*`.\n legacySourcePrefix?: string;\n\n // Check if Nix is installed before running this action.\n // If Nix isn't installed, this action will not fail, and will instead do nothing.\n // The action will emit a user-visible warning instructing them to install Nix.\n requireNix: NixRequirementHandling;\n\n // The URL suffix to send diagnostics events to.\n //\n // The final URL is constructed via IDS_HOST/idsProjectName/diagnosticsSuffix.\n //\n // Default: `diagnostics`.\n diagnosticsSuffix?: string;\n\n // Collect backtraces from segfaults and other failures from binaries that start with these names.\n //\n // Default: `[ \"nix\", \"determinate-nixd\", ActionOptions.name ]`.\n binaryNamePrefixes?: string[];\n\n // Do NOT collect backtraces from segfaults and other failures from binaries with exact these names.\n //\n // Default: `[ \"nix-expr-tests\" ]`.\n binaryNamesDenyList?: string[];\n};\n\n/**\n * A confident version of Options, where defaults have been resolved into final values.\n */\nexport type ConfidentActionOptions = {\n name: string;\n idsProjectName: string;\n eventPrefix: string;\n fetchStyle: FetchSuffixStyle;\n legacySourcePrefix?: string;\n requireNix: NixRequirementHandling;\n providedDiagnosticsUrl?: URL;\n binaryNamePrefixes: string[];\n binaryNamesDenyList: string[];\n};\n\n/**\n * An event to send to the diagnostic endpoint of i.d.s.\n */\nexport type DiagnosticEvent = {\n // Note: putting a Map in here won't serialize to json properly.\n // It'll just be {} on serialization.\n name: string;\n distinct_id?: string;\n uuid: UUID;\n timestamp: Date;\n\n properties: Record;\n};\n\nconst determinateStateDir = \"/var/lib/determinate\";\nconst determinateIdentityFile = path.join(determinateStateDir, \"identity.json\");\n\nconst isRoot = os.userInfo().uid === 0;\n\n/** Create the Determinate state directory by escalating via sudo */\nasync function sudoEnsureDeterminateStateDir(): Promise {\n const code = await actionsExec.exec(\"sudo\", [\n \"mkdir\",\n \"-p\",\n determinateStateDir,\n ]);\n\n if (code !== 0) {\n throw new Error(`sudo mkdir -p exit: ${code}`);\n }\n}\n\n/** Ensures the Determinate state directory exists, escalating if necessary */\nasync function ensureDeterminateStateDir(): Promise {\n if (isRoot) {\n await mkdir(determinateStateDir, { recursive: true });\n } else {\n return sudoEnsureDeterminateStateDir();\n }\n}\n\n/** Writes correlation hashes to the Determinate state directory by writing to a `sudo tee` pipe */\nasync function sudoWriteCorrelationHashes(hashes: string): Promise {\n const buffer = Buffer.from(hashes);\n\n const code = await actionsExec.exec(\n \"sudo\",\n [\"tee\", determinateIdentityFile],\n {\n input: buffer,\n\n // Ignore output from tee\n outStream: createWriteStream(\"/dev/null\"),\n },\n );\n\n if (code !== 0) {\n throw new Error(`sudo tee exit: ${code}`);\n }\n}\n\n/** Writes correlation hashes to the Determinate state directory, escalating if necessary */\nasync function writeCorrelationHashes(hashes: string): Promise {\n await ensureDeterminateStateDir();\n\n if (isRoot) {\n await fs.writeFile(determinateIdentityFile, hashes, \"utf-8\");\n } else {\n return sudoWriteCorrelationHashes(hashes);\n }\n}\n\nexport abstract class DetSysAction {\n nixStoreTrust: NixStoreTrust;\n strictMode: boolean;\n\n private actionOptions: ConfidentActionOptions;\n private exceptionAttachments: Map;\n private archOs: string;\n private executionPhase: ExecutionPhase;\n private nixSystem: string;\n private architectureFetchSuffix: string;\n private sourceParameters: SourceDef;\n private facts: Record;\n private events: DiagnosticEvent[];\n private identity: correlation.AnonymizedCorrelationHashes;\n private idsHost: IdsHost;\n private features: { [k: string]: Feature };\n private featureEventMetadata: { [k: string]: string | boolean };\n\n private determineExecutionPhase(): ExecutionPhase {\n const currentPhase = actionsCore.getState(STATE_KEY_EXECUTION_PHASE);\n if (currentPhase === \"\") {\n actionsCore.saveState(STATE_KEY_EXECUTION_PHASE, \"post\");\n return \"main\";\n } else {\n return \"post\";\n }\n }\n\n constructor(actionOptions: ActionOptions) {\n this.actionOptions = makeOptionsConfident(actionOptions);\n this.idsHost = new IdsHost(\n this.actionOptions.idsProjectName,\n actionOptions.diagnosticsSuffix,\n // Note: we don't use actionsCore.getInput('diagnostic-endpoint') on purpose:\n // getInput silently converts absent data to an empty string.\n process.env[\"INPUT_DIAGNOSTIC-ENDPOINT\"],\n );\n this.exceptionAttachments = new Map();\n this.nixStoreTrust = \"unknown\";\n this.strictMode = getBool(\"_internal-strict-mode\");\n\n if (\n getBoolOrUndefined(\n \"_internal-obliterate-actions-id-token-request-variables\",\n ) === true\n ) {\n process.env[\"ACTIONS_ID_TOKEN_REQUEST_URL\"] = undefined;\n process.env[\"ACTIONS_ID_TOKEN_REQUEST_TOKEN\"] = undefined;\n }\n\n this.features = {};\n this.featureEventMetadata = {};\n this.events = [];\n\n this.getCrossPhaseId();\n this.collectBacktraceSetup();\n\n // JSON sent to server\n /* eslint-disable camelcase */\n this.facts = {\n $lib: \"idslib\",\n $lib_version: pkgVersion,\n project: this.actionOptions.name,\n ids_project: this.actionOptions.idsProjectName,\n };\n\n const params = [\n [\"github_action_ref\", \"GITHUB_ACTION_REF\"],\n [\"github_action_repository\", \"GITHUB_ACTION_REPOSITORY\"],\n [\"github_event_name\", \"GITHUB_EVENT_NAME\"],\n [\"$os\", \"RUNNER_OS\"],\n [\"arch\", \"RUNNER_ARCH\"],\n ];\n for (const [target, env] of params) {\n const value = process.env[env];\n if (value) {\n this.facts[target] = value;\n }\n }\n\n this.identity = correlation.identify();\n this.archOs = platform.getArchOs();\n this.nixSystem = platform.getNixPlatform(this.archOs);\n\n this.facts.$app_name = `${this.actionOptions.name}/action`;\n this.facts.arch_os = this.archOs;\n this.facts.nix_system = this.nixSystem;\n\n {\n ghActionsCorePlatform\n .getDetails()\n // eslint-disable-next-line github/no-then\n .then((details) => {\n if (details.name !== \"unknown\") {\n this.addFact(FACT_OS, details.name);\n }\n if (details.version !== \"unknown\") {\n this.addFact(FACT_OS_VERSION, details.version);\n }\n })\n // eslint-disable-next-line github/no-then\n .catch((e: unknown) => {\n actionsCore.debug(\n `Failure getting platform details: ${stringifyError(e)}`,\n );\n });\n }\n\n this.executionPhase = this.determineExecutionPhase();\n this.facts.execution_phase = this.executionPhase;\n\n if (this.actionOptions.fetchStyle === \"gh-env-style\") {\n this.architectureFetchSuffix = this.archOs;\n } else if (this.actionOptions.fetchStyle === \"nix-style\") {\n this.architectureFetchSuffix = this.nixSystem;\n } else if (this.actionOptions.fetchStyle === \"universal\") {\n this.architectureFetchSuffix = \"universal\";\n } else {\n throw new Error(\n `fetchStyle ${this.actionOptions.fetchStyle} is not a valid style`,\n );\n }\n\n this.sourceParameters = constructSourceParameters(\n this.actionOptions.legacySourcePrefix,\n );\n\n this.recordEvent(`begin_${this.executionPhase}`);\n }\n\n /**\n * Attach a file to the diagnostics data in error conditions.\n *\n * The file at `location` doesn't need to exist when stapleFile is called.\n *\n * 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}`.\n * If the file is readable, the file's contents will be stored in a context value at `staple_value_{name}`.\n */\n stapleFile(name: string, location: string): void {\n this.exceptionAttachments.set(name, location);\n }\n\n /**\n * The main execution phase.\n */\n abstract main(): Promise;\n\n /**\n * The post execution phase.\n */\n abstract post(): Promise;\n\n /**\n * Execute the Action as defined.\n */\n execute(): void {\n // eslint-disable-next-line github/no-then\n this.executeAsync().catch((error: Error) => {\n // eslint-disable-next-line no-console\n console.log(error);\n process.exitCode = 1;\n });\n }\n\n getTemporaryName(): string {\n const tmpDir = process.env[\"RUNNER_TEMP\"] || tmpdir();\n return path.join(tmpDir, `${this.actionOptions.name}-${randomUUID()}`);\n }\n\n addFact(key: string, value: string | boolean | number): void {\n this.facts[key] = value;\n }\n\n async getDiagnosticsUrl(): Promise {\n return await this.idsHost.getDiagnosticsUrl();\n }\n\n getUniqueId(): string {\n return (\n this.identity.github_workflow_run_differentiator_hash ||\n process.env.RUNNER_TRACKING_ID ||\n randomUUID()\n );\n }\n\n // This ID will be saved in the action's state, to be persisted across phase steps\n getCrossPhaseId(): string {\n let crossPhaseId = actionsCore.getState(STATE_KEY_CROSS_PHASE_ID);\n\n if (crossPhaseId === \"\") {\n crossPhaseId = randomUUID();\n actionsCore.saveState(STATE_KEY_CROSS_PHASE_ID, crossPhaseId);\n }\n\n return crossPhaseId;\n }\n\n getCorrelationHashes(): correlation.AnonymizedCorrelationHashes {\n return this.identity;\n }\n\n recordEvent(\n eventName: string,\n context: Record = {},\n ): void {\n const prefixedName =\n eventName === \"$feature_flag_called\"\n ? eventName\n : `${this.actionOptions.eventPrefix}${eventName}`;\n\n this.events.push({\n name: prefixedName,\n\n // Use the anon distinct ID as the distinct ID until we actually have a distinct ID in the future\n distinct_id: this.identity.$anon_distinct_id,\n\n // distinct_id\n uuid: randomUUID(),\n timestamp: new Date(),\n\n properties: {\n ...context,\n ...this.identity,\n ...this.facts,\n ...Object.fromEntries(\n Object.entries(this.featureEventMetadata).map<\n [string, string | boolean]\n >(([name, variant]) => [`$feature/${name}`, variant]),\n ),\n },\n });\n }\n\n /**\n * Unpacks the closure returned by `fetchArtifact()`, imports the\n * contents into the Nix store, and returns the path of the executable at\n * `/nix/store/STORE_PATH/bin/${bin}`.\n */\n async unpackClosure(bin: string): Promise {\n const artifact = await this.fetchArtifact();\n const { stdout } = await promisify(exec)(\n `cat \"${artifact}\" | xz -d | nix-store --import`,\n );\n const paths = stdout.split(os.EOL);\n const lastPath = paths.at(-2);\n return `${lastPath}/bin/${bin}`;\n }\n\n /**\n * Fetches the executable at the URL determined by the `source-*` inputs and\n * other facts, `chmod`s it, and returns the path to the executable on disk.\n */\n async fetchExecutable(): Promise {\n const binaryPath = await this.fetchArtifact();\n await chmod(binaryPath, fsConstants.S_IXUSR | fsConstants.S_IXGRP);\n return binaryPath;\n }\n\n private get isMain(): boolean {\n return this.executionPhase === \"main\";\n }\n\n private get isPost(): boolean {\n return this.executionPhase === \"post\";\n }\n\n private async executeAsync(): Promise {\n try {\n await this.checkIn();\n\n const correlationHashes = JSON.stringify(this.getCorrelationHashes());\n process.env.DETSYS_CORRELATION = correlationHashes;\n try {\n await writeCorrelationHashes(correlationHashes);\n } catch (error) {\n this.recordEvent(EVENT_STORE_IDENTITY_FAILED, { error: String(error) });\n }\n\n if (!(await this.preflightRequireNix())) {\n this.recordEvent(EVENT_PREFLIGHT_REQUIRE_NIX_DENIED);\n return;\n } else {\n await this.preflightNixStoreInfo();\n await this.preflightNixVersion();\n this.addFact(FACT_NIX_STORE_TRUST, this.nixStoreTrust);\n }\n\n if (this.isMain) {\n await this.main();\n\n // Run the preflight of the nix version a second time so our \"shutdown\" events have updated version info.\n await this.preflightNixVersion();\n } else if (this.isPost) {\n await this.post();\n }\n this.addFact(FACT_ENDED_WITH_EXCEPTION, false);\n } catch (e: unknown) {\n this.addFact(FACT_ENDED_WITH_EXCEPTION, true);\n\n const reportable = stringifyError(e);\n\n this.addFact(FACT_FINAL_EXCEPTION, reportable);\n\n if (this.isPost) {\n actionsCore.warning(reportable);\n } else {\n actionsCore.setFailed(reportable);\n }\n\n const doGzip = promisify(gzip);\n\n const exceptionContext: Map = new Map();\n for (const [attachmentLabel, filePath] of this.exceptionAttachments) {\n try {\n const logText = readFileSync(filePath);\n const buf = await doGzip(logText);\n exceptionContext.set(\n `staple_value_${attachmentLabel}`,\n buf.toString(\"base64\"),\n );\n } catch (innerError: unknown) {\n exceptionContext.set(\n `staple_failure_${attachmentLabel}`,\n stringifyError(innerError),\n );\n }\n }\n\n this.recordEvent(EVENT_EXCEPTION, Object.fromEntries(exceptionContext));\n } finally {\n if (this.isPost) {\n await this.collectBacktraces();\n }\n\n await this.complete();\n }\n }\n\n async getClient(): Promise {\n return await this.idsHost.getGot(\n (incitingError: unknown, prevUrl: URL, nextUrl: URL) => {\n this.recordPlausibleTimeout(incitingError);\n\n this.recordEvent(\"ids-failover\", {\n previousUrl: prevUrl.toString(),\n nextUrl: nextUrl.toString(),\n });\n },\n );\n }\n\n private async checkIn(): Promise {\n const checkin = await this.requestCheckIn();\n if (checkin === undefined) {\n return;\n }\n\n this.features = checkin.options;\n for (const [key, feature] of Object.entries(this.features)) {\n this.featureEventMetadata[key] = feature.variant;\n }\n\n const impactSymbol: Map = new Map([\n [\"none\", \"⚪\"],\n [\"maintenance\", \"🛠️\"],\n [\"minor\", \"🟡\"],\n [\"major\", \"🟠\"],\n [\"critical\", \"🔴\"],\n ]);\n const defaultImpactSymbol = \"🔵\";\n\n if (checkin.status !== null) {\n const summaries: string[] = [];\n\n for (const incident of checkin.status.incidents) {\n summaries.push(\n `${impactSymbol.get(incident.impact) || defaultImpactSymbol} ${incident.status.replace(\"_\", \" \")}: ${incident.name} (${incident.shortlink})`,\n );\n }\n\n for (const maintenance of checkin.status.scheduled_maintenances) {\n summaries.push(\n `${impactSymbol.get(maintenance.impact) || defaultImpactSymbol} ${maintenance.status.replace(\"_\", \" \")}: ${maintenance.name} (${maintenance.shortlink})`,\n );\n }\n\n if (summaries.length > 0) {\n actionsCore.info(\n // Bright red, Bold, Underline\n `${\"\\u001b[0;31m\"}${\"\\u001b[1m\"}${\"\\u001b[4m\"}${checkin.status.page.name} Status`,\n );\n for (const notice of summaries) {\n actionsCore.info(notice);\n }\n actionsCore.info(`See: ${checkin.status.page.url}`);\n actionsCore.info(``);\n }\n }\n }\n\n getFeature(name: string): Feature | undefined {\n if (!this.features.hasOwnProperty(name)) {\n return undefined;\n }\n\n const result = this.features[name];\n if (result === undefined) {\n return undefined;\n }\n\n this.recordEvent(\"$feature_flag_called\", {\n $feature_flag: name,\n $feature_flag_response: result.variant,\n });\n\n return result;\n }\n\n /**\n * Check in to install.determinate.systems, to accomplish three things:\n *\n * 1. Preflight the server selected from IdsHost, to increase the chances of success.\n * 2. Fetch any incidents and maintenance events to let users know in case things are weird.\n * 3. Get feature flag data so we can gently roll out new features.\n */\n private async requestCheckIn(): Promise {\n for (\n let attemptsRemaining = 5;\n attemptsRemaining > 0;\n attemptsRemaining--\n ) {\n const checkInUrl = await this.getCheckInUrl();\n if (checkInUrl === undefined) {\n return undefined;\n }\n\n try {\n actionsCore.debug(`Preflighting via ${checkInUrl}`);\n\n const props = {\n // Use a distinct_id when we actually have one\n distinct_id: this.identity.$anon_distinct_id,\n anon_distinct_id: this.identity.$anon_distinct_id,\n groups: this.identity.$groups,\n person_properties: {\n ci: \"github\",\n\n ...this.identity,\n ...this.facts,\n },\n };\n\n return await (\n await this.getClient()\n )\n .post(checkInUrl, {\n json: props,\n timeout: {\n request: CHECK_IN_ENDPOINT_TIMEOUT_MS,\n },\n })\n .json();\n } catch (e: unknown) {\n this.recordPlausibleTimeout(e);\n actionsCore.debug(`Error checking in: ${stringifyError(e)}`);\n this.idsHost.markCurrentHostBroken();\n }\n }\n\n return undefined;\n }\n\n private recordPlausibleTimeout(e: unknown): void {\n // see: https://github.com/sindresorhus/got/blob/895e463fa699d6f2e4b2fc01ceb3b2bb9e157f4c/documentation/8-errors.md\n if (e instanceof TimeoutError && \"timings\" in e && \"request\" in e) {\n const reportContext: {\n [index: string]: string | number | undefined;\n } = {\n url: e.request.requestUrl?.toString(),\n retry_count: e.request.retryCount,\n };\n\n for (const [key, value] of Object.entries(e.timings.phases)) {\n if (Number.isFinite(value)) {\n reportContext[`timing_phase_${key}`] = value;\n }\n }\n\n this.recordEvent(\"timeout\", reportContext);\n }\n }\n\n /**\n * Fetch an artifact, such as a tarball, from the location determined by the\n * `source-*` inputs. If `source-binary` is specified, this will return a path\n * to a binary on disk; otherwise, the artifact will be downloaded from the\n * URL determined by the other `source-*` inputs (`source-url`, `source-pr`,\n * etc.).\n */\n private async fetchArtifact(): Promise {\n const sourceBinary = getStringOrNull(\"source-binary\");\n\n // If source-binary is set, use that. Otherwise fall back to the source-* parameters.\n if (sourceBinary !== null && sourceBinary !== \"\") {\n actionsCore.debug(`Using the provided source binary at ${sourceBinary}`);\n return sourceBinary;\n }\n\n actionsCore.startGroup(\n `Downloading ${this.actionOptions.name} for ${this.architectureFetchSuffix}`,\n );\n\n try {\n actionsCore.info(`Fetching from ${await this.getSourceUrl()}`);\n\n const correlatedUrl = await this.getSourceUrl();\n correlatedUrl.searchParams.set(\"ci\", \"github\");\n correlatedUrl.searchParams.set(\n \"correlation\",\n JSON.stringify(this.identity),\n );\n\n const versionCheckup = await (await this.getClient()).head(correlatedUrl);\n if (versionCheckup.headers.etag) {\n const v = versionCheckup.headers.etag;\n this.addFact(FACT_SOURCE_URL_ETAG, v);\n\n actionsCore.debug(\n `Checking the tool cache for ${await this.getSourceUrl()} at ${v}`,\n );\n const cached = await this.getCachedVersion(v);\n if (cached) {\n this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = true;\n actionsCore.debug(`Tool cache hit.`);\n return cached;\n }\n }\n\n this.facts[FACT_ARTIFACT_FETCHED_FROM_CACHE] = false;\n\n actionsCore.debug(\n `No match from the cache, re-fetching from the redirect: ${versionCheckup.url}`,\n );\n\n const destFile = this.getTemporaryName();\n\n const fetchStream = await this.downloadFile(\n new URL(versionCheckup.url),\n destFile,\n );\n\n if (fetchStream.response?.headers.etag) {\n const v = fetchStream.response.headers.etag;\n\n try {\n await this.saveCachedVersion(v, destFile);\n } catch (e: unknown) {\n actionsCore.debug(`Error caching the artifact: ${stringifyError(e)}`);\n }\n }\n\n return destFile;\n } catch (e: unknown) {\n this.recordPlausibleTimeout(e);\n throw e;\n } finally {\n actionsCore.endGroup();\n }\n }\n\n /**\n * A helper function for failing on error only if strict mode is enabled.\n * This is intended only for CI environments testing Actions themselves.\n */\n failOnError(msg: string): void {\n if (this.strictMode) {\n actionsCore.setFailed(`strict mode failure: ${msg}`);\n }\n }\n\n private async downloadFile(\n url: URL,\n destination: PathLike,\n ): Promise {\n const client = await this.getClient();\n\n return new Promise((resolve, reject) => {\n // Current stream handle\n let writeStream: WriteStream | undefined;\n\n // Sentinel condition in case we want to abort retrying due to FS issues\n let failed = false;\n\n const retry = (stream: Request): void => {\n if (writeStream) {\n writeStream.destroy();\n }\n\n writeStream = createWriteStream(destination, {\n encoding: \"binary\",\n mode: 0o755,\n });\n\n writeStream.once(\"error\", (error) => {\n // Set failed here since promise rejections don't impact control flow\n failed = true;\n reject(error);\n });\n\n writeStream.on(\"finish\", () => {\n if (!failed) {\n resolve(stream);\n }\n });\n\n stream.once(\"retry\", (_count, _error, createRetryStream) => {\n // Optional: check `failed' here in case you want to stop retrying\n retry(createRetryStream());\n });\n\n // Now that all the handlers have been set up we can pipe from the HTTP\n // stream to disk\n stream.pipe(writeStream);\n };\n\n // Begin the retry logic by giving it a fresh got.Request\n retry(client.stream(url));\n });\n }\n\n private async complete(): Promise {\n this.recordEvent(`complete_${this.executionPhase}`);\n await this.submitEvents();\n }\n\n private async getCheckInUrl(): Promise {\n const checkInUrl = await this.idsHost.getDynamicRootUrl();\n\n if (checkInUrl === undefined) {\n return undefined;\n }\n\n checkInUrl.pathname += \"check-in\";\n return checkInUrl;\n }\n\n private async getSourceUrl(): Promise {\n const p = this.sourceParameters;\n\n if (p.url) {\n this.addFact(FACT_SOURCE_URL, p.url);\n return new URL(p.url);\n }\n\n const fetchUrl = await this.idsHost.getRootUrl();\n fetchUrl.pathname += this.actionOptions.idsProjectName;\n\n if (p.tag) {\n fetchUrl.pathname += `/tag/${p.tag}`;\n } else if (p.pr) {\n fetchUrl.pathname += `/pr/${p.pr}`;\n } else if (p.branch) {\n fetchUrl.pathname += `/branch/${p.branch}`;\n } else if (p.revision) {\n fetchUrl.pathname += `/rev/${p.revision}`;\n } else {\n fetchUrl.pathname += `/stable`;\n }\n\n fetchUrl.pathname += `/${this.architectureFetchSuffix}`;\n\n this.addFact(FACT_SOURCE_URL, fetchUrl.toString());\n\n return fetchUrl;\n }\n\n private cacheKey(version: string): string {\n const cleanedVersion = version.replace(/[^a-zA-Z0-9-+.]/g, \"\");\n return `determinatesystem-${this.actionOptions.name}-${this.architectureFetchSuffix}-${cleanedVersion}`;\n }\n\n private async getCachedVersion(version: string): Promise {\n const startCwd = process.cwd();\n\n try {\n const tempDir = this.getTemporaryName();\n await mkdir(tempDir);\n process.chdir(tempDir);\n\n // extremely evil shit right here:\n process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE;\n delete process.env.GITHUB_WORKSPACE;\n\n if (\n await actionsCache.restoreCache(\n [this.actionOptions.name],\n this.cacheKey(version),\n [],\n undefined,\n true,\n )\n ) {\n this.recordEvent(EVENT_ARTIFACT_CACHE_HIT);\n return `${tempDir}/${this.actionOptions.name}`;\n }\n\n this.recordEvent(EVENT_ARTIFACT_CACHE_MISS);\n return undefined;\n } finally {\n process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP;\n delete process.env.GITHUB_WORKSPACE_BACKUP;\n process.chdir(startCwd);\n }\n }\n\n private async saveCachedVersion(\n version: string,\n toolPath: string,\n ): Promise {\n const startCwd = process.cwd();\n\n try {\n const tempDir = this.getTemporaryName();\n await mkdir(tempDir);\n process.chdir(tempDir);\n await copyFile(toolPath, `${tempDir}/${this.actionOptions.name}`);\n\n // extremely evil shit right here:\n process.env.GITHUB_WORKSPACE_BACKUP = process.env.GITHUB_WORKSPACE;\n delete process.env.GITHUB_WORKSPACE;\n\n await actionsCache.saveCache(\n [this.actionOptions.name],\n this.cacheKey(version),\n undefined,\n true,\n );\n this.recordEvent(EVENT_ARTIFACT_CACHE_PERSIST);\n } finally {\n process.env.GITHUB_WORKSPACE = process.env.GITHUB_WORKSPACE_BACKUP;\n delete process.env.GITHUB_WORKSPACE_BACKUP;\n process.chdir(startCwd);\n }\n }\n\n private collectBacktraceSetup(): void {\n if (!process.env.DETSYS_BACKTRACE_COLLECTOR) {\n actionsCore.exportVariable(\n \"DETSYS_BACKTRACE_COLLECTOR\",\n this.getCrossPhaseId(),\n );\n\n actionsCore.saveState(STATE_BACKTRACE_START_TIMESTAMP, Date.now());\n }\n }\n\n private async collectBacktraces(): Promise {\n try {\n if (process.env.DETSYS_BACKTRACE_COLLECTOR !== this.getCrossPhaseId()) {\n return;\n }\n\n const backtraces = await collectBacktraces(\n this.actionOptions.binaryNamePrefixes,\n this.actionOptions.binaryNamesDenyList,\n parseInt(actionsCore.getState(STATE_BACKTRACE_START_TIMESTAMP)),\n );\n actionsCore.debug(`Backtraces identified: ${backtraces.size}`);\n if (backtraces.size > 0) {\n this.recordEvent(EVENT_BACKTRACES, Object.fromEntries(backtraces));\n }\n } catch (innerError: unknown) {\n actionsCore.debug(\n `Error collecting backtraces: ${stringifyError(innerError)}`,\n );\n }\n }\n\n private async preflightRequireNix(): Promise {\n let nixLocation: string | undefined;\n\n const pathParts = (process.env[\"PATH\"] || \"\").split(\":\");\n for (const location of pathParts) {\n const candidateNix = path.join(location, \"nix\");\n\n try {\n await fs.access(candidateNix, fs.constants.X_OK);\n actionsCore.debug(`Found Nix at ${candidateNix}`);\n nixLocation = candidateNix;\n break;\n } catch {\n actionsCore.debug(`Nix not at ${candidateNix}`);\n }\n }\n this.addFact(FACT_NIX_LOCATION, nixLocation || \"\");\n\n if (this.actionOptions.requireNix === \"ignore\") {\n return true;\n }\n\n const currentNotFoundState = actionsCore.getState(STATE_KEY_NIX_NOT_FOUND);\n if (currentNotFoundState === STATE_NOT_FOUND) {\n // It was previously not found, so don't run subsequent actions\n return false;\n }\n\n if (nixLocation !== undefined) {\n return true;\n }\n actionsCore.saveState(STATE_KEY_NIX_NOT_FOUND, STATE_NOT_FOUND);\n\n switch (this.actionOptions.requireNix) {\n case \"fail\":\n actionsCore.setFailed(\n [\n \"This action can only be used when Nix is installed.\",\n \"Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow.\",\n ].join(\" \"),\n );\n break;\n case \"warn\":\n actionsCore.warning(\n [\n \"This action is in no-op mode because Nix is not installed.\",\n \"Add `- uses: DeterminateSystems/determinate-nix-action@v3` earlier in your workflow.\",\n ].join(\" \"),\n );\n break;\n }\n\n return false;\n }\n\n private async preflightNixStoreInfo(): Promise {\n let output = \"\";\n\n const options: actionsExec.ExecOptions = {};\n options.silent = true;\n options.listeners = {\n stdout: (data) => {\n output += data.toString();\n },\n };\n\n try {\n output = \"\";\n await actionsExec.exec(\"nix\", [\"store\", \"info\", \"--json\"], options);\n this.addFact(FACT_NIX_STORE_CHECK_METHOD, \"info\");\n } catch {\n try {\n // reset output\n output = \"\";\n await actionsExec.exec(\"nix\", [\"store\", \"ping\", \"--json\"], options);\n this.addFact(FACT_NIX_STORE_CHECK_METHOD, \"ping\");\n } catch {\n this.addFact(FACT_NIX_STORE_CHECK_METHOD, \"none\");\n return;\n }\n }\n\n try {\n const parsed = JSON.parse(output);\n if (parsed.trusted === 1) {\n this.nixStoreTrust = \"trusted\";\n } else if (parsed.trusted === 0) {\n this.nixStoreTrust = \"untrusted\";\n } else if (parsed.trusted !== undefined) {\n this.addFact(\n FACT_NIX_STORE_CHECK_ERROR,\n `Mysterious trusted value: ${JSON.stringify(parsed.trusted)}`,\n );\n }\n\n this.addFact(FACT_NIX_STORE_VERSION, JSON.stringify(parsed.version));\n } catch (e: unknown) {\n this.addFact(FACT_NIX_STORE_CHECK_ERROR, stringifyError(e));\n }\n }\n\n private async preflightNixVersion(): Promise {\n let output = \"unknown\";\n\n try {\n ({ stdout: output } = await actionsExec.getExecOutput(\n \"nix\",\n [\"--version\"],\n {\n silent: true,\n },\n ));\n output = output.trim() || \"unknown\";\n } catch {\n // That's fine.\n }\n\n this.addFact(FACT_NIX_VERSION, output);\n }\n\n private async submitEvents(): Promise {\n const diagnosticsUrl = await this.idsHost.getDiagnosticsUrl();\n if (diagnosticsUrl === undefined) {\n actionsCore.debug(\n \"Diagnostics are disabled. Not sending the following events:\",\n );\n actionsCore.debug(JSON.stringify(this.events, undefined, 2));\n return;\n }\n\n const batch = {\n sent_at: new Date(),\n batch: this.events,\n };\n\n try {\n await (\n await this.getClient()\n ).post(diagnosticsUrl, {\n json: batch,\n timeout: {\n request: DIAGNOSTIC_ENDPOINT_TIMEOUT_MS,\n },\n });\n } catch (err: unknown) {\n this.recordPlausibleTimeout(err);\n\n actionsCore.debug(\n `Error submitting diagnostics event to ${diagnosticsUrl}: ${stringifyError(err)}`,\n );\n }\n this.events = [];\n }\n}\n\nfunction stringifyError(error: unknown): string {\n return error instanceof Error || typeof error == \"string\"\n ? error.toString()\n : JSON.stringify(error);\n}\n\nfunction makeOptionsConfident(\n actionOptions: ActionOptions,\n): ConfidentActionOptions {\n const idsProjectName = actionOptions.idsProjectName ?? actionOptions.name;\n\n const finalOpts: ConfidentActionOptions = {\n name: actionOptions.name,\n idsProjectName,\n eventPrefix: actionOptions.eventPrefix || \"action:\",\n fetchStyle: actionOptions.fetchStyle,\n legacySourcePrefix: actionOptions.legacySourcePrefix,\n requireNix: actionOptions.requireNix,\n binaryNamePrefixes: actionOptions.binaryNamePrefixes ?? [\n \"nix\",\n \"determinate-nixd\",\n actionOptions.name,\n ],\n binaryNamesDenyList:\n actionOptions.binaryNamePrefixes ?? PROGRAM_NAME_CRASH_DENY_LIST,\n };\n\n actionsCore.debug(\"idslib options:\");\n actionsCore.debug(JSON.stringify(finalOpts, undefined, 2));\n\n return finalOpts;\n}\n\n// Public exports from other files\nexport type {\n CheckIn,\n Feature,\n Incident,\n Maintenance,\n Page,\n StatusSummary,\n} from \"./check-in.js\";\nexport type { AnonymizedCorrelationHashes } from \"./correlation.js\";\nexport { stringifyError } from \"./errors.js\";\nexport { IdsHost } from \"./ids-host.js\";\nexport type { SourceDef } from \"./sourcedef.js\";\nexport * as inputs from \"./inputs.js\";\nexport * as platform from \"./platform.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,MAAM,gBAAgB,UAAUA,KAAG,SAAS;AAyB5C,MAAMC,kCAA2D;CAC/D,MAAM;CACN,YAAY;CACZ,OAAO;CACR;;;;;;;AAQD,SAAgB,YAAY,aAA8C;CACxE,MAAM,UAAU;EAAE,GAAG;EAAiC,GAAG;EAAa;CAEtE,MAAMC,0BAAoC,kBACxC,QAAQ,WACT;AAED,KAAIC,KAAG,MAAM,KAAK,QAChB,KAAI,QAAQ,SAAS,OACnB,QAAO,WAAW;KAElB,QAAO,QAAQ,QAAQ,WAAW,CAAC;AAIvC,KAAI,QAAQ,SAAS,OACnB,QAAO,sBAAsB,yBAAyB,QAAQ;KAE9D,QAAO,QAAQ,QACb,uBAAuB,yBAAyB,QAAQ,CACzD;;;;;;;;;AAWL,SAAS,eAAe,YAAoB,cAA8B;CACxE,MAAMC,QAAkB,aAAa,MAAM,KAAK;AAEhD,MAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,WAAW,KAAK,MAAM,IAAI;AAEhC,MAAI,SAAS,WA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Ac;CAErE,MAAMY,YAAoC;EACxC,MAAM,cAAc;EACpB;EACA,aAAa,cAAc,eAAe;EAC1C,YAAY,cAAc;EAC1B,oBAAoB,cAAc;EAClC,YAAY,cAAc;EAC1B,oBAAoB,cAAc,sBAAsB;GACtD;GACA;GACA,cAAc;GACf;EACD,qBACE,cAAc,sBAAsB;EACvC;AAED,aAAY,MAAM,kBAAkB;AACpC,aAAY,MAAM,KAAK,UAAU,WAAW,QAAW,EAAE,CAAC;AAE1D,QAAO"} \ No newline at end of file diff --git a/flake.lock b/flake.lock index d730717..1c25e2f 100644 --- a/flake.lock +++ b/flake.lock @@ -11,21 +11,21 @@ }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz" + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/0.1" } }, "nixpkgs": { "locked": { - "lastModified": 1745526057, - "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", - "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", - "revCount": 789333, + "lastModified": 1757244434, + "narHash": "sha256-AeqTqY0Y95K1Fgs6wuT1LafBNcmKxcOkWnm4alD9pqM=", + "rev": "092c565d333be1e17b4779ac22104338941d913f", + "revCount": 809550, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.789333%2Brev-f771eb401a46846c1aebd20552521b233dd7e18b/0196700d-bbc8-7163-b0e7-e264f34c251e/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.809550%2Brev-092c565d333be1e17b4779ac22104338941d913f/01992879-0346-7c7e-8e0b-99e6d3f6c244/source.tar.gz" }, "original": { "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz" + "url": "https://flakehub.com/f/NixOS/nixpkgs/0" } }, "root": { diff --git a/flake.nix b/flake.nix index becae80..825e773 100644 --- a/flake.nix +++ b/flake.nix @@ -2,30 +2,48 @@ description = "Development environment for detsys-ts"; inputs = { - flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz"; - nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz"; + flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/0.1"; + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0"; }; - outputs = { self, flake-schemas, nixpkgs }: + outputs = + { + self, + ... + }@inputs: let - supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; - forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { - pkgs = import nixpkgs { inherit system; }; - }); + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forEachSupportedSystem = + f: + inputs.nixpkgs.lib.genAttrs supportedSystems ( + system: + f { + inherit system; + pkgs = import inputs.nixpkgs { inherit system; }; + } + ); in { - schemas = flake-schemas.schemas; + inherit (inputs.flake-schemas) schemas; + + formatter = forEachSupportedSystem ({ pkgs, ... }: pkgs.nixfmt-rfc-style); - devShells = forEachSupportedSystem ({ pkgs }: { - default = pkgs.mkShell { - packages = with pkgs; [ - nodejs_latest - nodePackages.typescript-language-server - nodePackages.vscode-langservers-extracted - nodePackages_latest.pnpm - nixpkgs-fmt - ]; - }; - }); + devShells = forEachSupportedSystem ( + { pkgs, system }: + { + default = pkgs.mkShellNoCC { + packages = with pkgs; [ + nodejs_latest + nodePackages_latest.pnpm + self.formatter.${system} + ]; + }; + } + ); }; } diff --git a/package.json b/package.json index fda7e03..629416d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "types": "./dist/index.d.ts", "type": "module", "scripts": { - "build": "tsup", + "build": "tsdown", "check-fmt": "prettier --check .", "format": "prettier --write .", "lint": "eslint src/**/*.ts", @@ -35,19 +35,19 @@ }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^5.2.2", - "@types/node": "^22.18.0", - "@typescript-eslint/eslint-plugin": "^8.42.0", - "eslint": "^9.34.0", + "@types/node": "^22.18.1", + "@typescript-eslint/eslint-plugin": "^8.43.0", + "eslint": "^9.35.0", "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-github": "^6.0.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-prettier": "^5.5.4", - "globals": "^16.3.0", + "globals": "^16.4.0", "prettier": "^3.6.2", - "tsup": "^8.5.0", + "tsdown": "^0.14.2", "typedoc": "^0.28.12", "typescript": "^5.9.2", - "typescript-eslint": "^8.42.0", + "typescript-eslint": "^8.43.0", "vitest": "^3.2.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 808d922..99d7a57 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,35 +28,35 @@ importers: specifier: ^5.2.2 version: 5.2.2(prettier@3.6.2) '@types/node': - specifier: ^22.18.0 - version: 22.18.0 + specifier: ^22.18.1 + version: 22.18.1 '@typescript-eslint/eslint-plugin': - specifier: ^8.42.0 - version: 8.42.0(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint@9.34.0)(typescript@5.9.2) + specifier: ^8.43.0 + version: 8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) eslint: - specifier: ^9.34.0 - version: 9.34.0 + specifier: ^9.35.0 + version: 9.35.0(jiti@2.5.1) eslint-import-resolver-typescript: specifier: ^4.4.4 - version: 4.4.4(eslint-plugin-import@2.32.0)(eslint@9.34.0) + version: 4.4.4(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)) eslint-plugin-github: specifier: ^6.0.0 - version: 6.0.0(eslint-import-resolver-typescript@4.4.4)(eslint@9.34.0) + version: 6.0.0(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)) eslint-plugin-import: specifier: ^2.32.0 - version: 2.32.0(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.34.0) + version: 2.32.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)) eslint-plugin-prettier: specifier: ^5.5.4 - version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.34.0))(eslint@9.34.0)(prettier@3.6.2) + version: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1))(prettier@3.6.2) globals: - specifier: ^16.3.0 - version: 16.3.0 + specifier: ^16.4.0 + version: 16.4.0 prettier: specifier: ^3.6.2 version: 3.6.2 - tsup: - specifier: ^8.5.0 - version: 8.5.0(postcss@8.5.6)(typescript@5.9.2)(yaml@2.8.1) + tsdown: + specifier: ^0.14.2 + version: 0.14.2(typescript@5.9.2) typedoc: specifier: ^0.28.12 version: 0.28.12(typescript@5.9.2) @@ -64,11 +64,11 @@ importers: specifier: ^5.9.2 version: 5.9.2 typescript-eslint: - specifier: ^8.42.0 - version: 8.42.0(eslint@9.34.0)(typescript@5.9.2) + specifier: ^8.43.0 + version: 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) vitest: specifier: ^3.2.4 - version: 3.2.4(@types/node@22.18.0)(yaml@2.8.1) + version: 3.2.4(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1) packages: @@ -98,17 +98,17 @@ packages: resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} engines: {node: '>=18.0.0'} - '@azure/core-auth@1.10.0': - resolution: {integrity: sha512-88Djs5vBvGbHQHf5ZZcaoNHo6Y8BKZkt3cw2iuJIQzLEgH4Ox6Tm4hjFhbqOxyYsgIG/eJbFEHpxRIfEEWv5Ow==} + '@azure/core-auth@1.10.1': + resolution: {integrity: sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==} engines: {node: '>=20.0.0'} - '@azure/core-client@1.10.0': - resolution: {integrity: sha512-O4aP3CLFNodg8eTHXECaH3B3CjicfzkxVtnrfLkOq0XNP7TIECGfHpK/C6vADZkWP75wzmdBnsIA8ksuJMk18g==} + '@azure/core-client@1.10.1': + resolution: {integrity: sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==} engines: {node: '>=20.0.0'} - '@azure/core-http-compat@2.3.0': - resolution: {integrity: sha512-qLQujmUypBBG0gxHd0j6/Jdmul6ttl24c8WGiLXIk7IHXdBlfoBqW27hyz3Xn6xbfdyVSarl1Ttbk0AwnZBYCw==} - engines: {node: '>=18.0.0'} + '@azure/core-http-compat@2.3.1': + resolution: {integrity: sha512-az9BkXND3/d5VgdRRQVkiJb2gOmDU8Qcq4GvjtBmDICNiQ9udFmDk4ZpSB5Qq1OmtDJGlQAfBaS4palFsazQ5g==} + engines: {node: '>=20.0.0'} '@azure/core-lro@2.7.2': resolution: {integrity: sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==} @@ -118,16 +118,16 @@ packages: resolution: {integrity: sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==} engines: {node: '>=18.0.0'} - '@azure/core-rest-pipeline@1.22.0': - resolution: {integrity: sha512-OKHmb3/Kpm06HypvB3g6Q3zJuvyXcpxDpCS1PnU8OV6AJgSFaee/covXBcPbWc6XDDxtEPlbi3EMQ6nUiPaQtw==} + '@azure/core-rest-pipeline@1.22.1': + resolution: {integrity: sha512-UVZlVLfLyz6g3Hy7GNDpooMQonUygH7ghdiSASOOHy97fKj/mPLqgDX7aidOijn+sCMU+WU8NjlPlNTgnvbcGA==} engines: {node: '>=20.0.0'} - '@azure/core-tracing@1.3.0': - resolution: {integrity: sha512-+XvmZLLWPe67WXNZo9Oc9CrPj/Tm8QnHR92fFAFdnbzwNdCH1h+7UdpaQgRSBsMY+oW1kHXNUZQLdZ1gHX3ROw==} + '@azure/core-tracing@1.3.1': + resolution: {integrity: sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==} engines: {node: '>=20.0.0'} - '@azure/core-util@1.13.0': - resolution: {integrity: sha512-o0psW8QWQ58fq3i24Q1K2XfS/jYTxr7O1HRcyUE9bV9NttLU+kYOH82Ixj8DGlMTOWgxm1Sss2QAfKK5UkSPxw==} + '@azure/core-util@1.13.1': + resolution: {integrity: sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==} engines: {node: '>=20.0.0'} '@azure/core-xml@1.5.0': @@ -169,8 +169,8 @@ packages: resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} - '@babel/parser@7.28.3': - resolution: {integrity: sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA==} + '@babel/parser@7.28.4': + resolution: {integrity: sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==} engines: {node: '>=6.0.0'} hasBin: true @@ -178,12 +178,12 @@ packages: resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.28.3': - resolution: {integrity: sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ==} + '@babel/traverse@7.28.4': + resolution: {integrity: sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==} engines: {node: '>=6.9.0'} - '@babel/types@7.28.2': - resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} + '@babel/types@7.28.4': + resolution: {integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==} engines: {node: '>=6.9.0'} '@emnapi/core@1.5.0': @@ -351,8 +351,8 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.8.0': - resolution: {integrity: sha512-MJQFqrZgcW0UNYLGOuQpey/oTN59vyWwplvCGZztn1cKz9agZPPYpJB7h2OMmuu7VLqkvEjN8feFZJmxNF9D+Q==} + '@eslint-community/eslint-utils@4.9.0': + resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -386,8 +386,8 @@ packages: resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.34.0': - resolution: {integrity: sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==} + '@eslint/js@9.35.0': + resolution: {integrity: sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': @@ -402,8 +402,8 @@ packages: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} - '@gerrit0/mini-shiki@3.12.1': - resolution: {integrity: sha512-qA9/VGm7No0kxb7k0oKFT0DSJ6BtuMMtC7JQdZn9ElMALE9hjbyoaS13Y8OWr0qHwzh07KHt3Wbw34az/FLsrg==} + '@gerrit0/mini-shiki@3.12.2': + resolution: {integrity: sha512-HKZPmO8OSSAAo20H2B3xgJdxZaLTwtlMwxg0967scnrDlPwe6j5+ULGHyIqwgTbFCn9yv/ff8CmfWZLE9YKBzA==} '@github/browserslist-config@1.0.0': resolution: {integrity: sha512-gIhjdJp/c2beaIWWIlsXdqXVRUz3r2BxBCpfz/F3JXHvSAQ1paMYjLH+maEATtENg+k5eLV7gA+9yPp762ieuw==} @@ -424,10 +424,6 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -438,12 +434,15 @@ packages: '@jridgewell/sourcemap-codec@1.5.5': resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - '@jridgewell/trace-mapping@0.3.30': - resolution: {integrity: sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==} + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} + '@napi-rs/wasm-runtime@1.0.4': + resolution: {integrity: sha512-+ZEtJPp8EF8h4kN6rLQECRor00H7jtDgBVtttIUoxuDkXLiQMaSBqju3LV/IEsMvqVG5pviUvR4jYhIA1xNm8w==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -456,9 +455,12 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} + '@oxc-project/runtime@0.87.0': + resolution: {integrity: sha512-ky2Hqi2q/uGX36UfY79zxMbUqiNIl1RyKKVJfFenG70lbn+/fcaKBVTbhmUwn8a2wPyv2gNtDQxuDytbKX9giQ==} + engines: {node: '>=6.9.0'} + + '@oxc-project/types@0.87.0': + resolution: {integrity: sha512-ipZFWVGE9fADBVXXWJWY/cxpysc41Gt5upKDeb32F6WMgFyO7XETUMVq8UuREKCih+Km5E6p2VhEvf6Fuhey6g==} '@pkgr/core@0.2.9': resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} @@ -470,108 +472,197 @@ packages: '@protobuf-ts/runtime@2.11.1': resolution: {integrity: sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ==} - '@rollup/rollup-android-arm-eabi@4.50.0': - resolution: {integrity: sha512-lVgpeQyy4fWN5QYebtW4buT/4kn4p4IJ+kDNB4uYNT5b8c8DLJDg6titg20NIg7E8RWwdWZORW6vUFfrLyG3KQ==} + '@quansync/fs@0.1.5': + resolution: {integrity: sha512-lNS9hL2aS2NZgNW7BBj+6EBl4rOf8l+tQ0eRY6JWCI8jI2kc53gSoqbjojU0OnAWhzoXiOjFyGsHcDGePB3lhA==} + + '@rolldown/binding-android-arm64@1.0.0-beta.37': + resolution: {integrity: sha512-Pdr3USGBdoYzcygfJTSATHd7x476vVF3rnQ6SuUAh4YjhgGoNaI/ZycQ0RsonptwwU5NmQRWxfWv+aUPL6JlJg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.0.0-beta.37': + resolution: {integrity: sha512-iDdmatSgbWhTYOq51G2CkJXwFayiuQpv/ywG7Bv3wKqy31L7d0LltUhWqAdfCl7eBG3gybfUm/iEXiTldH3jYA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.0-beta.37': + resolution: {integrity: sha512-LQPpi3YJDtIprj6mwMbVM1gLM4BV2m9oqe9h3Y1UwAd20xs+imnzWJqWFpm4Hw9SiFmefIf3q4EPx2k6Nj2K7A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.0-beta.37': + resolution: {integrity: sha512-9JnfSWfYd/YrZOu4Sj3rb2THBrCj70nJB/2FOSdg0O9ZoRrdTeB8b7Futo6N7HLWZM5uqqnJBX6VTpA0RZD+ow==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.37': + resolution: {integrity: sha512-eEmQTpvefEtHxc0vg5sOnWCqBcGQB/SIDlPkkzKR9ESKq9BsjQfHxssJWuNMyQ+rpr9CYaogddyQtZ9GHkp8vA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.37': + resolution: {integrity: sha512-Ekv4OjDzQUl0X9kHM7M23N9hVRiYCYr89neLBNITCp7P4IHs1f6SNZiCIvvBVy6NIFzO1w9LZJGEeJYK5cQBVQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.37': + resolution: {integrity: sha512-z8Aa5Kar5mhh0RVZEL+zKJwNz1cgcDISmwUMcTk0w986T8JZJOJCfJ/u9e8pqUTIJjxdM8SZq9/24nMgMlx5ng==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.37': + resolution: {integrity: sha512-e+fNseKhfE/socjOw6VrQcXrbNKfi2V/KZ+ssuLnmeaYNGuJWqPhvML56oYhGb3IgROEEc61lzr3Riy5BIqoMA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@rolldown/binding-linux-x64-musl@1.0.0-beta.37': + resolution: {integrity: sha512-dPZfB396PMIasd19X0ikpdCvjK/7SaJFO8y5/TxnozJEy70vOf4GESe/oKcsJPav/MSTWBYsHjJSO6vX0oAW8g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@rolldown/binding-openharmony-arm64@1.0.0-beta.37': + resolution: {integrity: sha512-rFjLXoHpRqxJqkSBXHuyt6bhyiIFnvLD9X2iPmCYlfpEkdTbrY1AXg4ZbF8UMO5LM7DAAZm/7vPYPO1TKTA7Sg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.37': + resolution: {integrity: sha512-oQAe3lMaBGX6q0GSic0l3Obmd6/rX8R6eHLnRC8kyy/CvPLiCMV82MPGT8fxpPTo/ULFGrupSu2nV1zmOFBt/w==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.37': + resolution: {integrity: sha512-ucO6CiZhpkNRiVAk7ybvA9pZaMreCtfHej3BtJcBL5S3aYmp4h0g6TvaXLD5YRJx5sXobp/9A//xU4wPMul3Bg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.37': + resolution: {integrity: sha512-Ya9DBWJe1EGHwil7ielI8CdE0ELCg6KyDvDQqIFllnTJEYJ1Rb74DK6mvlZo273qz6Mw8WrMm26urfDeZhCc3Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.37': + resolution: {integrity: sha512-r+RI+wMReoTIF/uXqQWJcD8xGWXzCzUyGdpLmQ8FC+MCyPHlkjEsFRv8OFIYI6HhiGAmbfWVYEGf+aeLJzkHGw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.0-beta.37': + resolution: {integrity: sha512-0taU1HpxFzrukvWIhLRI4YssJX2wOW5q1MxPXWztltsQ13TE51/larZIwhFdpyk7+K43TH7x6GJ8oEqAo+vDbA==} + + '@rollup/rollup-android-arm-eabi@4.50.1': + resolution: {integrity: sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.50.0': - resolution: {integrity: sha512-2O73dR4Dc9bp+wSYhviP6sDziurB5/HCym7xILKifWdE9UsOe2FtNcM+I4xZjKrfLJnq5UR8k9riB87gauiQtw==} + '@rollup/rollup-android-arm64@4.50.1': + resolution: {integrity: sha512-PZlsJVcjHfcH53mOImyt3bc97Ep3FJDXRpk9sMdGX0qgLmY0EIWxCag6EigerGhLVuL8lDVYNnSo8qnTElO4xw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.50.0': - resolution: {integrity: sha512-vwSXQN8T4sKf1RHr1F0s98Pf8UPz7pS6P3LG9NSmuw0TVh7EmaE+5Ny7hJOZ0M2yuTctEsHHRTMi2wuHkdS6Hg==} + '@rollup/rollup-darwin-arm64@4.50.1': + resolution: {integrity: sha512-xc6i2AuWh++oGi4ylOFPmzJOEeAa2lJeGUGb4MudOtgfyyjr4UPNK+eEWTPLvmPJIY/pgw6ssFIox23SyrkkJw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.50.0': - resolution: {integrity: sha512-cQp/WG8HE7BCGyFVuzUg0FNmupxC+EPZEwWu2FCGGw5WDT1o2/YlENbm5e9SMvfDFR6FRhVCBePLqj0o8MN7Vw==} + '@rollup/rollup-darwin-x64@4.50.1': + resolution: {integrity: sha512-2ofU89lEpDYhdLAbRdeyz/kX3Y2lpYc6ShRnDjY35bZhd2ipuDMDi6ZTQ9NIag94K28nFMofdnKeHR7BT0CATw==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.50.0': - resolution: {integrity: sha512-UR1uTJFU/p801DvvBbtDD7z9mQL8J80xB0bR7DqW7UGQHRm/OaKzp4is7sQSdbt2pjjSS72eAtRh43hNduTnnQ==} + '@rollup/rollup-freebsd-arm64@4.50.1': + resolution: {integrity: sha512-wOsE6H2u6PxsHY/BeFHA4VGQN3KUJFZp7QJBmDYI983fgxq5Th8FDkVuERb2l9vDMs1D5XhOrhBrnqcEY6l8ZA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.50.0': - resolution: {integrity: sha512-G/DKyS6PK0dD0+VEzH/6n/hWDNPDZSMBmqsElWnCRGrYOb2jC0VSupp7UAHHQ4+QILwkxSMaYIbQ72dktp8pKA==} + '@rollup/rollup-freebsd-x64@4.50.1': + resolution: {integrity: sha512-A/xeqaHTlKbQggxCqispFAcNjycpUEHP52mwMQZUNqDUJFFYtPHCXS1VAG29uMlDzIVr+i00tSFWFLivMcoIBQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.50.0': - resolution: {integrity: sha512-u72Mzc6jyJwKjJbZZcIYmd9bumJu7KNmHYdue43vT1rXPm2rITwmPWF0mmPzLm9/vJWxIRbao/jrQmxTO0Sm9w==} + '@rollup/rollup-linux-arm-gnueabihf@4.50.1': + resolution: {integrity: sha512-54v4okehwl5TaSIkpp97rAHGp7t3ghinRd/vyC1iXqXMfjYUTm7TfYmCzXDoHUPTTf36L8pr0E7YsD3CfB3ZDg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.50.0': - resolution: {integrity: sha512-S4UefYdV0tnynDJV1mdkNawp0E5Qm2MtSs330IyHgaccOFrwqsvgigUD29uT+B/70PDY1eQ3t40+xf6wIvXJyg==} + '@rollup/rollup-linux-arm-musleabihf@4.50.1': + resolution: {integrity: sha512-p/LaFyajPN/0PUHjv8TNyxLiA7RwmDoVY3flXHPSzqrGcIp/c2FjwPPP5++u87DGHtw+5kSH5bCJz0mvXngYxw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.50.0': - resolution: {integrity: sha512-1EhkSvUQXJsIhk4msxP5nNAUWoB4MFDHhtc4gAYvnqoHlaL9V3F37pNHabndawsfy/Tp7BPiy/aSa6XBYbaD1g==} + '@rollup/rollup-linux-arm64-gnu@4.50.1': + resolution: {integrity: sha512-2AbMhFFkTo6Ptna1zO7kAXXDLi7H9fGTbVaIq2AAYO7yzcAsuTNWPHhb2aTA6GPiP+JXh85Y8CiS54iZoj4opw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.50.0': - resolution: {integrity: sha512-EtBDIZuDtVg75xIPIK1l5vCXNNCIRM0OBPUG+tbApDuJAy9mKago6QxX+tfMzbCI6tXEhMuZuN1+CU8iDW+0UQ==} + '@rollup/rollup-linux-arm64-musl@4.50.1': + resolution: {integrity: sha512-Cgef+5aZwuvesQNw9eX7g19FfKX5/pQRIyhoXLCiBOrWopjo7ycfB292TX9MDcDijiuIJlx1IzJz3IoCPfqs9w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.50.0': - resolution: {integrity: sha512-BGYSwJdMP0hT5CCmljuSNx7+k+0upweM2M4YGfFBjnFSZMHOLYR0gEEj/dxyYJ6Zc6AiSeaBY8dWOa11GF/ppQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.50.1': + resolution: {integrity: sha512-RPhTwWMzpYYrHrJAS7CmpdtHNKtt2Ueo+BlLBjfZEhYBhK00OsEqM08/7f+eohiF6poe0YRDDd8nAvwtE/Y62Q==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.50.0': - resolution: {integrity: sha512-I1gSMzkVe1KzAxKAroCJL30hA4DqSi+wGc5gviD0y3IL/VkvcnAqwBf4RHXHyvH66YVHxpKO8ojrgc4SrWAnLg==} + '@rollup/rollup-linux-ppc64-gnu@4.50.1': + resolution: {integrity: sha512-eSGMVQw9iekut62O7eBdbiccRguuDgiPMsw++BVUg+1K7WjZXHOg/YOT9SWMzPZA+w98G+Fa1VqJgHZOHHnY0Q==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.50.0': - resolution: {integrity: sha512-bSbWlY3jZo7molh4tc5dKfeSxkqnf48UsLqYbUhnkdnfgZjgufLS/NTA8PcP/dnvct5CCdNkABJ56CbclMRYCA==} + '@rollup/rollup-linux-riscv64-gnu@4.50.1': + resolution: {integrity: sha512-S208ojx8a4ciIPrLgazF6AgdcNJzQE4+S9rsmOmDJkusvctii+ZvEuIC4v/xFqzbuP8yDjn73oBlNDgF6YGSXQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.50.0': - resolution: {integrity: sha512-LSXSGumSURzEQLT2e4sFqFOv3LWZsEF8FK7AAv9zHZNDdMnUPYH3t8ZlaeYYZyTXnsob3htwTKeWtBIkPV27iQ==} + '@rollup/rollup-linux-riscv64-musl@4.50.1': + resolution: {integrity: sha512-3Ag8Ls1ggqkGUvSZWYcdgFwriy2lWo+0QlYgEFra/5JGtAd6C5Hw59oojx1DeqcA2Wds2ayRgvJ4qxVTzCHgzg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.50.0': - resolution: {integrity: sha512-CxRKyakfDrsLXiCyucVfVWVoaPA4oFSpPpDwlMcDFQvrv3XY6KEzMtMZrA+e/goC8xxp2WSOxHQubP8fPmmjOQ==} + '@rollup/rollup-linux-s390x-gnu@4.50.1': + resolution: {integrity: sha512-t9YrKfaxCYe7l7ldFERE1BRg/4TATxIg+YieHQ966jwvo7ddHJxPj9cNFWLAzhkVsbBvNA4qTbPVNsZKBO4NSg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.50.0': - resolution: {integrity: sha512-8PrJJA7/VU8ToHVEPu14FzuSAqVKyo5gg/J8xUerMbyNkWkO9j2ExBho/68RnJsMGNJq4zH114iAttgm7BZVkA==} + '@rollup/rollup-linux-x64-gnu@4.50.1': + resolution: {integrity: sha512-MCgtFB2+SVNuQmmjHf+wfI4CMxy3Tk8XjA5Z//A0AKD7QXUYFMQcns91K6dEHBvZPCnhJSyDWLApk40Iq/H3tA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.50.0': - resolution: {integrity: sha512-SkE6YQp+CzpyOrbw7Oc4MgXFvTw2UIBElvAvLCo230pyxOLmYwRPwZ/L5lBe/VW/qT1ZgND9wJfOsdy0XptRvw==} + '@rollup/rollup-linux-x64-musl@4.50.1': + resolution: {integrity: sha512-nEvqG+0jeRmqaUMuwzlfMKwcIVffy/9KGbAGyoa26iu6eSngAYQ512bMXuqqPrlTyfqdlB9FVINs93j534UJrg==} cpu: [x64] os: [linux] - '@rollup/rollup-openharmony-arm64@4.50.0': - resolution: {integrity: sha512-PZkNLPfvXeIOgJWA804zjSFH7fARBBCpCXxgkGDRjjAhRLOR8o0IGS01ykh5GYfod4c2yiiREuDM8iZ+pVsT+Q==} + '@rollup/rollup-openharmony-arm64@4.50.1': + resolution: {integrity: sha512-RDsLm+phmT3MJd9SNxA9MNuEAO/J2fhW8GXk62G/B4G7sLVumNFbRwDL6v5NrESb48k+QMqdGbHgEtfU0LCpbA==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.50.0': - resolution: {integrity: sha512-q7cIIdFvWQoaCbLDUyUc8YfR3Jh2xx3unO8Dn6/TTogKjfwrax9SyfmGGK6cQhKtjePI7jRfd7iRYcxYs93esg==} + '@rollup/rollup-win32-arm64-msvc@4.50.1': + resolution: {integrity: sha512-hpZB/TImk2FlAFAIsoElM3tLzq57uxnGYwplg6WDyAxbYczSi8O2eQ+H2Lx74504rwKtZ3N2g4bCUkiamzS6TQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.50.0': - resolution: {integrity: sha512-XzNOVg/YnDOmFdDKcxxK410PrcbcqZkBmz+0FicpW5jtjKQxcW1BZJEQOF0NJa6JO7CZhett8GEtRN/wYLYJuw==} + '@rollup/rollup-win32-ia32-msvc@4.50.1': + resolution: {integrity: sha512-SXjv8JlbzKM0fTJidX4eVsH+Wmnp0/WcD8gJxIZyR6Gay5Qcsmdbi9zVtnbkGPG8v2vMR1AD06lGWy5FLMcG7A==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.50.0': - resolution: {integrity: sha512-xMmiWRR8sp72Zqwjgtf3QbZfF1wdh8X2ABu3EaozvZcyHJeU0r+XAnXdKgs4cCAp6ORoYoCygipYP1mjmbjrsg==} + '@rollup/rollup-win32-x64-msvc@4.50.1': + resolution: {integrity: sha512-StxAO/8ts62KZVRAm4JZYq9+NqNsV7RvimNK+YM7ry//zebEH6meuugqW/P5OFUCjyQgui+9fUxT6d5NShvMvA==} cpu: [x64] os: [win32] @@ -620,8 +711,8 @@ packages: svelte: optional: true - '@tybys/wasm-util@0.10.0': - resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==} + '@tybys/wasm-util@0.10.1': + resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} '@types/chai@5.2.2': resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} @@ -644,73 +735,73 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/node@22.18.0': - resolution: {integrity: sha512-m5ObIqwsUp6BZzyiy4RdZpzWGub9bqLJMvZDD0QMXhxjqMHMENlj+SqF5QxoUwaQNFe+8kz8XM8ZQhqkQPTgMQ==} + '@types/node@22.18.1': + resolution: {integrity: sha512-rzSDyhn4cYznVG+PCzGe1lwuMYJrcBS1fc3JqSa2PvtABwWo+dZ1ij5OVok3tqfpEBCBoaR4d7upFJk73HRJDw==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.42.0': - resolution: {integrity: sha512-Aq2dPqsQkxHOLfb2OPv43RnIvfj05nw8v/6n3B2NABIPpHnjQnaLo9QGMTvml+tv4korl/Cjfrb/BYhoL8UUTQ==} + '@typescript-eslint/eslint-plugin@8.43.0': + resolution: {integrity: sha512-8tg+gt7ENL7KewsKMKDHXR1vm8tt9eMxjJBYINf6swonlWgkYn5NwyIgXpbbDxTNU5DgpDFfj95prcTq2clIQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.42.0 + '@typescript-eslint/parser': ^8.43.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/parser@8.42.0': - resolution: {integrity: sha512-r1XG74QgShUgXph1BYseJ+KZd17bKQib/yF3SR+demvytiRXrwd12Blnz5eYGm8tXaeRdd4x88MlfwldHoudGg==} + '@typescript-eslint/parser@8.43.0': + resolution: {integrity: sha512-B7RIQiTsCBBmY+yW4+ILd6mF5h1FUwJsVvpqkrgpszYifetQ2Ke+Z4u6aZh0CblkUGIdR59iYVyXqqZGkZ3aBw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/project-service@8.42.0': - resolution: {integrity: sha512-vfVpLHAhbPjilrabtOSNcUDmBboQNrJUiNAGoImkZKnMjs2TIcWG33s4Ds0wY3/50aZmTMqJa6PiwkwezaAklg==} + '@typescript-eslint/project-service@8.43.0': + resolution: {integrity: sha512-htB/+D/BIGoNTQYffZw4uM4NzzuolCoaA/BusuSIcC8YjmBYQioew5VUZAYdAETPjeed0hqCaW7EHg+Robq8uw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/scope-manager@8.42.0': - resolution: {integrity: sha512-51+x9o78NBAVgQzOPd17DkNTnIzJ8T/O2dmMBLoK9qbY0Gm52XJcdJcCl18ExBMiHo6jPMErUQWUv5RLE51zJw==} + '@typescript-eslint/scope-manager@8.43.0': + resolution: {integrity: sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.42.0': - resolution: {integrity: sha512-kHeFUOdwAJfUmYKjR3CLgZSglGHjbNTi1H8sTYRYV2xX6eNz4RyJ2LIgsDLKf8Yi0/GL1WZAC/DgZBeBft8QAQ==} + '@typescript-eslint/tsconfig-utils@8.43.0': + resolution: {integrity: sha512-ALC2prjZcj2YqqL5X/bwWQmHA2em6/94GcbB/KKu5SX3EBDOsqztmmX1kMkvAJHzxk7TazKzJfFiEIagNV3qEA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/type-utils@8.42.0': - resolution: {integrity: sha512-9KChw92sbPTYVFw3JLRH1ockhyR3zqqn9lQXol3/YbI6jVxzWoGcT3AsAW0mu1MY0gYtsXnUGV/AKpkAj5tVlQ==} + '@typescript-eslint/type-utils@8.43.0': + resolution: {integrity: sha512-qaH1uLBpBuBBuRf8c1mLJ6swOfzCXryhKND04Igr4pckzSEW9JX5Aw9AgW00kwfjWJF0kk0ps9ExKTfvXfw4Qg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/types@8.42.0': - resolution: {integrity: sha512-LdtAWMiFmbRLNP7JNeY0SqEtJvGMYSzfiWBSmx+VSZ1CH+1zyl8Mmw1TT39OrtsRvIYShjJWzTDMPWZJCpwBlw==} + '@typescript-eslint/types@8.43.0': + resolution: {integrity: sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.42.0': - resolution: {integrity: sha512-ku/uYtT4QXY8sl9EDJETD27o3Ewdi72hcXg1ah/kkUgBvAYHLwj2ofswFFNXS+FL5G+AGkxBtvGt8pFBHKlHsQ==} + '@typescript-eslint/typescript-estree@8.43.0': + resolution: {integrity: sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/utils@8.42.0': - resolution: {integrity: sha512-JnIzu7H3RH5BrKC4NoZqRfmjqCIS1u3hGZltDYJgkVdqAezl4L9d1ZLw+36huCujtSBSAirGINF/S4UxOcR+/g==} + '@typescript-eslint/utils@8.43.0': + resolution: {integrity: sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' - '@typescript-eslint/visitor-keys@8.42.0': - resolution: {integrity: sha512-3WbiuzoEowaEn8RSnhJBrxSwX8ULYE9CXaPepS2C2W3NSA5NNIvBaslpBSBElPq0UGr0xVJlXFWOAKIkyylydQ==} + '@typescript-eslint/visitor-keys@8.43.0': + resolution: {integrity: sha512-T+S1KqRD4sg/bHfLwrpF/K3gQLBM1n7Rp7OjjikjTEssI2YJzQpi5WXoynOaQ93ERIuq3O8RBTOUYDKszUCEHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typespec/ts-http-runtime@0.3.0': - resolution: {integrity: sha512-sOx1PKSuFwnIl7z4RN0Ls7N9AQawmR9r66eI5rFCzLDIs8HTIYrIpH9QjYWoX0lkgGrkLxXhi4QnK7MizPRrIg==} + '@typespec/ts-http-runtime@0.3.1': + resolution: {integrity: sha512-SnbaqayTVFEA6/tYumdF0UmybY0KHyKwGPBXnyckFlrrKdhWFrL3a2HIPXHjht5ZOElKGcXfD2D63P36btb+ww==} engines: {node: '>=20.0.0'} '@unrs/resolver-binding-android-arm-eabi@1.11.1': @@ -858,24 +949,13 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.2.0: - resolution: {integrity: sha512-TKY5pyBkHyADOPYlRT9Lx6F544mPl0vS5Ew7BJ45hA08Q+t3GjbueLliBWN3sMICk6+y7HdyxSzC4bWS8baBdg==} - engines: {node: '>=12'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} - engines: {node: '>=12'} - - any-promise@1.3.0: - resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + ansis@4.1.0: + resolution: {integrity: sha512-BGcItUBWSMRgOCe+SVZJ+S7yTRG0eGt9cXAHev72yuGcY23hnLA7Bky5L/xLyPINoSN95geovfBkqoTlNZYa7w==} + engines: {node: '>=14'} argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -912,6 +992,10 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + ast-kit@2.1.2: + resolution: {integrity: sha512-cl76xfBQM6pztbrFWRnxbrDm9EOqDr1BF6+qQnnDZG2Co2LjyUktkN9GTJfBAfdae+DbT2nJf2nCGAdDDN7W2g==} + engines: {node: '>=20.18.0'} + ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} @@ -937,6 +1021,9 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + birpc@2.5.0: + resolution: {integrity: sha512-VSWO/W6nNQdyP520F1mhf+Lc2f8pjGQOtoHHm7Ze8Go1kX7akpVIrtTa0fn+HB0QJEDVacl6aO08YE0PgXfdnQ==} + brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -952,12 +1039,6 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - bundle-require@5.1.0: - resolution: {integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - peerDependencies: - esbuild: '>=0.18' - cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -986,8 +1067,8 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001739: - resolution: {integrity: sha512-y+j60d6ulelrNSwpPyrHdl+9mJnQzHBr08xm48Qno0nSk4h3Qojh+ziv2qE6rXf4k3tadF4o1J/1tAbVm1NtnA==} + caniuse-lite@1.0.30001741: + resolution: {integrity: sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==} chai@5.3.3: resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} @@ -1016,20 +1097,9 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} - commander@4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} - engines: {node: '>= 6'} - concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - confbox@0.1.8: - resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} - - consola@3.4.2: - resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} - engines: {node: ^14.18.0 || >=16.10.0} - cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -1089,30 +1159,44 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + diff@8.0.2: + resolution: {integrity: sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg==} + engines: {node: '>=0.3.1'} + doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + dts-resolver@2.1.2: + resolution: {integrity: sha512-xeXHBQkn2ISSXxbJWD828PFjtyg+/UrMDo7W4Ffcs7+YWCquxU8YjV1KoxuiL+eJ5pg3ll+bC6flVv61L3LKZg==} + engines: {node: '>=20.18.0'} + peerDependencies: + oxc-resolver: '>=11.0.0' + peerDependenciesMeta: + oxc-resolver: + optional: true + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - electron-to-chromium@1.5.213: - resolution: {integrity: sha512-xr9eRzSLNa4neDO0xVFrkXu3vyIzG4Ay08dApecw42Z1NbmCt+keEpXdvlYGVe0wtvY5dhW0Ay0lY0IOfsCg0Q==} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + electron-to-chromium@1.5.218: + resolution: {integrity: sha512-uwwdN0TUHs8u6iRgN8vKeWZMRll4gBkz+QMqdS7DDe49uiK68/UX92lFb61oiFPrpYZNeZIqa4bA7O6Aiasnzg==} emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + empathic@2.0.0: + resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} + engines: {node: '>=14'} + entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -1294,8 +1378,8 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.34.0: - resolution: {integrity: sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==} + eslint@9.35.0: + resolution: {integrity: sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1383,9 +1467,6 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - fix-dts-default-cjs-exports@1.0.1: - resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} - flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -1397,10 +1478,6 @@ packages: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} - foreground-child@3.3.1: - resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} - engines: {node: '>=14'} - form-data-encoder@4.1.0: resolution: {integrity: sha512-G6NsmEW15s0Uw9XnCg+33H3ViYRyiM0hMrMhhqQOR8NFc5GhYrI+6I3u7OTw7b91J2g8rtvMBZJDbcGb2YUniw==} engines: {node: '>= 18'} @@ -1451,16 +1528,12 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@10.4.5: - resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} - hasBin: true - globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@16.3.0: - resolution: {integrity: sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==} + globals@16.4.0: + resolution: {integrity: sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==} engines: {node: '>=18'} globalthis@1.0.4: @@ -1505,6 +1578,9 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + http-cache-semantics@4.2.0: resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} @@ -1583,10 +1659,6 @@ packages: resolution: {integrity: sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==} engines: {node: '>= 0.4'} - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - is-generator-function@1.1.0: resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==} engines: {node: '>= 0.4'} @@ -1657,15 +1729,12 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - javascript-natural-sort@0.7.1: resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} - joycon@3.1.1: - resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} - engines: {node: '>=10'} + jiti@2.5.1: + resolution: {integrity: sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==} + hasBin: true js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1713,20 +1782,9 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - lilconfig@3.1.3: - resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} - engines: {node: '>=14'} - - lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - load-tsconfig@0.2.5: - resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -1743,9 +1801,6 @@ packages: lodash.snakecase@4.1.1: resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} - lodash.sortby@4.7.0: - resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} - lodash.upperfirst@4.3.1: resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} @@ -1759,14 +1814,11 @@ packages: resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} - magic-string@0.30.18: - resolution: {integrity: sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==} + magic-string@0.30.19: + resolution: {integrity: sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==} markdown-it@14.1.0: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} @@ -1813,19 +1865,9 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@7.1.2: - resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} - engines: {node: '>=16 || 14 >=14.17'} - - mlly@1.8.0: - resolution: {integrity: sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - mz@2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - nanoid@3.3.11: resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -1848,17 +1890,13 @@ packages: encoding: optional: true - node-releases@2.0.19: - resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} + node-releases@2.0.21: + resolution: {integrity: sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==} - normalize-url@8.0.2: - resolution: {integrity: sha512-Ee/R3SyN4BuynXcnTaekmaVdbDAEiNrHqjQIA37mHU8G9pf7aaAD4ZX3XjBLo6rsdcxA/gtkcNYZLt30ACgynw==} + normalize-url@8.1.0: + resolution: {integrity: sha512-X06Mfd/5aKsRHc0O0J5CUedwnPmnDtLF2+nq+KN9KSDlJHkPuh0JUviWjEWMe0SW/9TDdSLVPuk7L5gGTIA1/w==} engines: {node: '>=14.16'} - object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - object-inspect@1.13.4: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} @@ -1903,9 +1941,6 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -1921,10 +1956,6 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -1943,35 +1974,10 @@ packages: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} - pirates@4.0.7: - resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} - engines: {node: '>= 6'} - - pkg-types@1.3.1: - resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} - possible-typed-array-names@1.1.0: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} - postcss-load-config@6.0.1: - resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} - engines: {node: '>= 18'} - peerDependencies: - jiti: '>=1.21.0' - postcss: '>=8.0.9' - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - jiti: - optional: true - postcss: - optional: true - tsx: - optional: true - yaml: - optional: true - postcss@8.5.6: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} @@ -1997,6 +2003,9 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + quansync@0.2.11: + resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -2023,10 +2032,6 @@ packages: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} @@ -2043,8 +2048,29 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.50.0: - resolution: {integrity: sha512-/Zl4D8zPifNmyGzJS+3kVoyXeDeT/GrsJM94sACNg9RtUE0hrHa1bNPtRSrfHTMH5HjRzce6K7rlTh3Khiw+pw==} + rolldown-plugin-dts@0.15.10: + resolution: {integrity: sha512-8cPVAVQUo9tYAoEpc3jFV9RxSil13hrRRg8cHC9gLXxRMNtWPc1LNMSDXzjyD+5Vny49sDZH77JlXp/vlc4I3g==} + engines: {node: '>=20.18.0'} + peerDependencies: + '@typescript/native-preview': '>=7.0.0-dev.20250601.1' + rolldown: ^1.0.0-beta.9 + typescript: ^5.0.0 + vue-tsc: ~3.0.3 + peerDependenciesMeta: + '@typescript/native-preview': + optional: true + typescript: + optional: true + vue-tsc: + optional: true + + rolldown@1.0.0-beta.37: + resolution: {integrity: sha512-KiTU6z1kHGaLvqaYjgsrv2LshHqNBn74waRZivlK8WbfN1obZeScVkQPKYunB66E/mxZWv/zyZlCv3xF2t0WOQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + rollup@4.50.1: + resolution: {integrity: sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2117,19 +2143,10 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} - source-map@0.8.0-beta.0: - resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} - engines: {node: '>= 8'} - deprecated: The work that was done in this beta branch won't be included in future versions - stable-hash-x@0.2.0: resolution: {integrity: sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==} engines: {node: '>=12.0.0'} @@ -2144,14 +2161,6 @@ packages: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - string.prototype.includes@2.0.1: resolution: {integrity: sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==} engines: {node: '>= 0.4'} @@ -2168,14 +2177,6 @@ packages: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} engines: {node: '>= 0.4'} - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} - strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -2190,11 +2191,6 @@ packages: strnum@2.1.1: resolution: {integrity: sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==} - sucrase@3.35.0: - resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} - engines: {node: '>=16 || 14 >=14.17'} - hasBin: true - supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -2210,21 +2206,17 @@ packages: resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==} engines: {node: ^14.18.0 || >=16.0.0} - thenify-all@1.6.0: - resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} - engines: {node: '>=0.8'} - - thenify@3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyglobby@0.2.14: - resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + tinyexec@1.0.1: + resolution: {integrity: sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==} + + tinyglobby@0.2.15: + resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} tinypool@1.1.1: @@ -2246,9 +2238,6 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - tr46@1.0.1: - resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} - tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true @@ -2259,36 +2248,36 @@ packages: peerDependencies: typescript: '>=4.8.4' - ts-interface-checker@0.1.13: - resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - - tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - - tsup@8.5.0: - resolution: {integrity: sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ==} - engines: {node: '>=18'} + tsdown@0.14.2: + resolution: {integrity: sha512-6ThtxVZoTlR5YJov5rYvH8N1+/S/rD/pGfehdCLGznGgbxz+73EASV1tsIIZkLw2n+SXcERqHhcB/OkyxdKv3A==} + engines: {node: '>=20.19.0'} hasBin: true peerDependencies: - '@microsoft/api-extractor': ^7.36.0 - '@swc/core': ^1 - postcss: ^8.4.12 - typescript: '>=4.5.0' + '@arethetypeswrong/core': ^0.18.1 + publint: ^0.3.0 + typescript: ^5.0.0 + unplugin-lightningcss: ^0.4.0 + unplugin-unused: ^0.5.0 peerDependenciesMeta: - '@microsoft/api-extractor': - optional: true - '@swc/core': + '@arethetypeswrong/core': optional: true - postcss: + publint: optional: true typescript: optional: true + unplugin-lightningcss: + optional: true + unplugin-unused: + optional: true + + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} tunnel@0.0.6: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} @@ -2325,8 +2314,8 @@ packages: peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x - typescript-eslint@8.42.0: - resolution: {integrity: sha512-ozR/rQn+aQXQxh1YgbCzQWDFrsi9mcg+1PM3l/z5o1+20P7suOIaNg515bpr/OYt6FObz/NHcBstydDLHWeEKg==} + typescript-eslint@8.43.0: + resolution: {integrity: sha512-FyRGJKUGvcFekRRcBKFBlAhnp4Ng8rhe8tuvvkR9OiU0gfd4vyvTRQHEckO6VDlH57jbeUQem2IpqPq9kLJH+w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2340,13 +2329,13 @@ packages: uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - ufo@1.6.1: - resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} - unbox-primitive@1.1.0: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} + unconfig@7.3.3: + resolution: {integrity: sha512-QCkQoOnJF8L107gxfHL0uavn7WD9b3dpBcFX6HtfQYmjw2YzWxGuFQ0N0J6tE9oguCBJn9KOvfqYDCMPHIZrBA==} + undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} @@ -2375,8 +2364,8 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@7.1.4: - resolution: {integrity: sha512-X5QFK4SGynAeeIt+A7ZWnApdUyHYm+pzv/8/A57LqSGcI88U6R6ipOs3uCesdc6yl7nl+zNO0t8LmqAdXcQihw==} + vite@7.1.5: + resolution: {integrity: sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2446,15 +2435,9 @@ packages: webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - webidl-conversions@4.0.2: - resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} - whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - whatwg-url@7.1.0: - resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} @@ -2485,14 +2468,6 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - xml2js@0.5.0: resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} engines: {node: '>=4.0.0'} @@ -2557,38 +2532,38 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/core-auth@1.10.0': + '@azure/core-auth@1.10.1': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.13.0 + '@azure/core-util': 1.13.1 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-client@1.10.0': + '@azure/core-client@1.10.1': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.0 - '@azure/core-rest-pipeline': 1.22.0 - '@azure/core-tracing': 1.3.0 - '@azure/core-util': 1.13.0 + '@azure/core-auth': 1.10.1 + '@azure/core-rest-pipeline': 1.22.1 + '@azure/core-tracing': 1.3.1 + '@azure/core-util': 1.13.1 '@azure/logger': 1.3.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-http-compat@2.3.0': + '@azure/core-http-compat@2.3.1': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-client': 1.10.0 - '@azure/core-rest-pipeline': 1.22.0 + '@azure/core-client': 1.10.1 + '@azure/core-rest-pipeline': 1.22.1 transitivePeerDependencies: - supports-color '@azure/core-lro@2.7.2': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-util': 1.13.0 + '@azure/core-util': 1.13.1 '@azure/logger': 1.3.0 tslib: 2.8.1 transitivePeerDependencies: @@ -2598,26 +2573,26 @@ snapshots: dependencies: tslib: 2.8.1 - '@azure/core-rest-pipeline@1.22.0': + '@azure/core-rest-pipeline@1.22.1': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.0 - '@azure/core-tracing': 1.3.0 - '@azure/core-util': 1.13.0 + '@azure/core-auth': 1.10.1 + '@azure/core-tracing': 1.3.1 + '@azure/core-util': 1.13.1 '@azure/logger': 1.3.0 - '@typespec/ts-http-runtime': 0.3.0 + '@typespec/ts-http-runtime': 0.3.1 tslib: 2.8.1 transitivePeerDependencies: - supports-color - '@azure/core-tracing@1.3.0': + '@azure/core-tracing@1.3.1': dependencies: tslib: 2.8.1 - '@azure/core-util@1.13.0': + '@azure/core-util@1.13.1': dependencies: '@azure/abort-controller': 2.1.2 - '@typespec/ts-http-runtime': 0.3.0 + '@typespec/ts-http-runtime': 0.3.1 tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -2629,14 +2604,14 @@ snapshots: '@azure/logger@1.3.0': dependencies: - '@typespec/ts-http-runtime': 0.3.0 + '@typespec/ts-http-runtime': 0.3.1 tslib: 2.8.1 transitivePeerDependencies: - supports-color '@azure/ms-rest-js@2.7.0': dependencies: - '@azure/core-auth': 1.10.0 + '@azure/core-auth': 1.10.1 abort-controller: 3.0.0 form-data: 2.5.5 node-fetch: 2.7.0 @@ -2651,14 +2626,14 @@ snapshots: '@azure/storage-blob@12.28.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.0 - '@azure/core-client': 1.10.0 - '@azure/core-http-compat': 2.3.0 + '@azure/core-auth': 1.10.1 + '@azure/core-client': 1.10.1 + '@azure/core-http-compat': 2.3.1 '@azure/core-lro': 2.7.2 '@azure/core-paging': 1.6.2 - '@azure/core-rest-pipeline': 1.22.0 - '@azure/core-tracing': 1.3.0 - '@azure/core-util': 1.13.0 + '@azure/core-rest-pipeline': 1.22.1 + '@azure/core-tracing': 1.3.1 + '@azure/core-util': 1.13.1 '@azure/core-xml': 1.5.0 '@azure/logger': 1.3.0 '@azure/storage-common': 12.0.0 @@ -2670,11 +2645,11 @@ snapshots: '@azure/storage-common@12.0.0': dependencies: '@azure/abort-controller': 2.1.2 - '@azure/core-auth': 1.10.0 - '@azure/core-http-compat': 2.3.0 - '@azure/core-rest-pipeline': 1.22.0 - '@azure/core-tracing': 1.3.0 - '@azure/core-util': 1.13.0 + '@azure/core-auth': 1.10.1 + '@azure/core-http-compat': 2.3.1 + '@azure/core-rest-pipeline': 1.22.1 + '@azure/core-tracing': 1.3.1 + '@azure/core-util': 1.13.1 '@azure/logger': 1.3.0 events: 3.3.0 tslib: 2.8.1 @@ -2689,10 +2664,10 @@ snapshots: '@babel/generator@7.28.3': dependencies: - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.4 + '@babel/types': 7.28.4 '@jridgewell/gen-mapping': 0.3.13 - '@jridgewell/trace-mapping': 0.3.30 + '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 '@babel/helper-globals@7.28.0': {} @@ -2701,29 +2676,29 @@ snapshots: '@babel/helper-validator-identifier@7.27.1': {} - '@babel/parser@7.28.3': + '@babel/parser@7.28.4': dependencies: - '@babel/types': 7.28.2 + '@babel/types': 7.28.4 '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 - '@babel/parser': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.4 + '@babel/types': 7.28.4 - '@babel/traverse@7.28.3': + '@babel/traverse@7.28.4': dependencies: '@babel/code-frame': 7.27.1 '@babel/generator': 7.28.3 '@babel/helper-globals': 7.28.0 - '@babel/parser': 7.28.3 + '@babel/parser': 7.28.4 '@babel/template': 7.27.2 - '@babel/types': 7.28.2 + '@babel/types': 7.28.4 debug: 4.4.1 transitivePeerDependencies: - supports-color - '@babel/types@7.28.2': + '@babel/types@7.28.4': dependencies: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 @@ -2822,16 +2797,16 @@ snapshots: '@esbuild/win32-x64@0.25.9': optional: true - '@eslint-community/eslint-utils@4.8.0(eslint@9.34.0)': + '@eslint-community/eslint-utils@4.9.0(eslint@9.35.0(jiti@2.5.1))': dependencies: - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/compat@1.3.2(eslint@9.34.0)': + '@eslint/compat@1.3.2(eslint@9.35.0(jiti@2.5.1))': optionalDependencies: - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) '@eslint/config-array@0.21.0': dependencies: @@ -2861,7 +2836,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.34.0': {} + '@eslint/js@9.35.0': {} '@eslint/object-schema@2.1.6': {} @@ -2872,7 +2847,7 @@ snapshots: '@fastify/busboy@2.1.1': {} - '@gerrit0/mini-shiki@3.12.1': + '@gerrit0/mini-shiki@3.12.2': dependencies: '@shikijs/engine-oniguruma': 3.12.2 '@shikijs/langs': 3.12.2 @@ -2893,25 +2868,16 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.1.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 - '@jridgewell/trace-mapping': 0.3.30 + '@jridgewell/trace-mapping': 0.3.31 '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/sourcemap-codec@1.5.5': {} - '@jridgewell/trace-mapping@0.3.30': + '@jridgewell/trace-mapping@0.3.31': dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 @@ -2920,7 +2886,14 @@ snapshots: dependencies: '@emnapi/core': 1.5.0 '@emnapi/runtime': 1.5.0 - '@tybys/wasm-util': 0.10.0 + '@tybys/wasm-util': 0.10.1 + optional: true + + '@napi-rs/wasm-runtime@1.0.4': + dependencies: + '@emnapi/core': 1.5.0 + '@emnapi/runtime': 1.5.0 + '@tybys/wasm-util': 0.10.1 optional: true '@nodelib/fs.scandir@2.1.5': @@ -2935,8 +2908,9 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 - '@pkgjs/parseargs@0.11.0': - optional: true + '@oxc-project/runtime@0.87.0': {} + + '@oxc-project/types@0.87.0': {} '@pkgr/core@0.2.9': {} @@ -2946,67 +2920,117 @@ snapshots: '@protobuf-ts/runtime@2.11.1': {} - '@rollup/rollup-android-arm-eabi@4.50.0': + '@quansync/fs@0.1.5': + dependencies: + quansync: 0.2.11 + + '@rolldown/binding-android-arm64@1.0.0-beta.37': + optional: true + + '@rolldown/binding-darwin-arm64@1.0.0-beta.37': + optional: true + + '@rolldown/binding-darwin-x64@1.0.0-beta.37': + optional: true + + '@rolldown/binding-freebsd-x64@1.0.0-beta.37': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.37': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.37': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.37': optional: true - '@rollup/rollup-android-arm64@4.50.0': + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.37': optional: true - '@rollup/rollup-darwin-arm64@4.50.0': + '@rolldown/binding-linux-x64-musl@1.0.0-beta.37': optional: true - '@rollup/rollup-darwin-x64@4.50.0': + '@rolldown/binding-openharmony-arm64@1.0.0-beta.37': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.0-beta.37': + dependencies: + '@napi-rs/wasm-runtime': 1.0.4 optional: true - '@rollup/rollup-freebsd-arm64@4.50.0': + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.37': optional: true - '@rollup/rollup-freebsd-x64@4.50.0': + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.37': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.0-beta.37': + optional: true + + '@rolldown/pluginutils@1.0.0-beta.37': {} + + '@rollup/rollup-android-arm-eabi@4.50.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.50.0': + '@rollup/rollup-android-arm64@4.50.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.50.0': + '@rollup/rollup-darwin-arm64@4.50.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.50.0': + '@rollup/rollup-darwin-x64@4.50.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.50.0': + '@rollup/rollup-freebsd-arm64@4.50.1': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.50.0': + '@rollup/rollup-freebsd-x64@4.50.1': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.50.0': + '@rollup/rollup-linux-arm-gnueabihf@4.50.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.50.0': + '@rollup/rollup-linux-arm-musleabihf@4.50.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.50.0': + '@rollup/rollup-linux-arm64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.50.0': + '@rollup/rollup-linux-arm64-musl@4.50.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.50.0': + '@rollup/rollup-linux-loongarch64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-x64-musl@4.50.0': + '@rollup/rollup-linux-ppc64-gnu@4.50.1': optional: true - '@rollup/rollup-openharmony-arm64@4.50.0': + '@rollup/rollup-linux-riscv64-gnu@4.50.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.50.0': + '@rollup/rollup-linux-riscv64-musl@4.50.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.50.0': + '@rollup/rollup-linux-s390x-gnu@4.50.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.50.0': + '@rollup/rollup-linux-x64-gnu@4.50.1': + optional: true + + '@rollup/rollup-linux-x64-musl@4.50.1': + optional: true + + '@rollup/rollup-openharmony-arm64@4.50.1': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.50.1': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.50.1': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.50.1': optional: true '@rtsao/scc@1.1.0': {} @@ -3042,16 +3066,16 @@ snapshots: '@trivago/prettier-plugin-sort-imports@5.2.2(prettier@3.6.2)': dependencies: '@babel/generator': 7.28.3 - '@babel/parser': 7.28.3 - '@babel/traverse': 7.28.3 - '@babel/types': 7.28.2 + '@babel/parser': 7.28.4 + '@babel/traverse': 7.28.4 + '@babel/types': 7.28.4 javascript-natural-sort: 0.7.1 lodash: 4.17.21 prettier: 3.6.2 transitivePeerDependencies: - supports-color - '@tybys/wasm-util@0.10.0': + '@tybys/wasm-util@0.10.1': dependencies: tslib: 2.8.1 optional: true @@ -3074,21 +3098,21 @@ snapshots: '@types/json5@0.0.29': {} - '@types/node@22.18.0': + '@types/node@22.18.1': dependencies: undici-types: 6.21.0 '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.42.0(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint@9.34.0)(typescript@5.9.2)': + '@typescript-eslint/eslint-plugin@8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.42.0(eslint@9.34.0)(typescript@5.9.2) - '@typescript-eslint/scope-manager': 8.42.0 - '@typescript-eslint/type-utils': 8.42.0(eslint@9.34.0)(typescript@5.9.2) - '@typescript-eslint/utils': 8.42.0(eslint@9.34.0)(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 8.42.0 - eslint: 9.34.0 + '@typescript-eslint/parser': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/scope-manager': 8.43.0 + '@typescript-eslint/type-utils': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/utils': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.43.0 + eslint: 9.35.0(jiti@2.5.1) graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 @@ -3097,56 +3121,56 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2)': + '@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: - '@typescript-eslint/scope-manager': 8.42.0 - '@typescript-eslint/types': 8.42.0 - '@typescript-eslint/typescript-estree': 8.42.0(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 8.42.0 + '@typescript-eslint/scope-manager': 8.43.0 + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2) + '@typescript-eslint/visitor-keys': 8.43.0 debug: 4.4.1 - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.42.0(typescript@5.9.2)': + '@typescript-eslint/project-service@8.43.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.42.0(typescript@5.9.2) - '@typescript-eslint/types': 8.42.0 + '@typescript-eslint/tsconfig-utils': 8.43.0(typescript@5.9.2) + '@typescript-eslint/types': 8.43.0 debug: 4.4.1 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.42.0': + '@typescript-eslint/scope-manager@8.43.0': dependencies: - '@typescript-eslint/types': 8.42.0 - '@typescript-eslint/visitor-keys': 8.42.0 + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/visitor-keys': 8.43.0 - '@typescript-eslint/tsconfig-utils@8.42.0(typescript@5.9.2)': + '@typescript-eslint/tsconfig-utils@8.43.0(typescript@5.9.2)': dependencies: typescript: 5.9.2 - '@typescript-eslint/type-utils@8.42.0(eslint@9.34.0)(typescript@5.9.2)': + '@typescript-eslint/type-utils@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: - '@typescript-eslint/types': 8.42.0 - '@typescript-eslint/typescript-estree': 8.42.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.42.0(eslint@9.34.0)(typescript@5.9.2) + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) debug: 4.4.1 - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) ts-api-utils: 2.1.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.42.0': {} + '@typescript-eslint/types@8.43.0': {} - '@typescript-eslint/typescript-estree@8.42.0(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.43.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/project-service': 8.42.0(typescript@5.9.2) - '@typescript-eslint/tsconfig-utils': 8.42.0(typescript@5.9.2) - '@typescript-eslint/types': 8.42.0 - '@typescript-eslint/visitor-keys': 8.42.0 + '@typescript-eslint/project-service': 8.43.0(typescript@5.9.2) + '@typescript-eslint/tsconfig-utils': 8.43.0(typescript@5.9.2) + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/visitor-keys': 8.43.0 debug: 4.4.1 fast-glob: 3.3.3 is-glob: 4.0.3 @@ -3157,23 +3181,23 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.42.0(eslint@9.34.0)(typescript@5.9.2)': + '@typescript-eslint/utils@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.8.0(eslint@9.34.0) - '@typescript-eslint/scope-manager': 8.42.0 - '@typescript-eslint/types': 8.42.0 - '@typescript-eslint/typescript-estree': 8.42.0(typescript@5.9.2) - eslint: 9.34.0 + '@eslint-community/eslint-utils': 4.9.0(eslint@9.35.0(jiti@2.5.1)) + '@typescript-eslint/scope-manager': 8.43.0 + '@typescript-eslint/types': 8.43.0 + '@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2) + eslint: 9.35.0(jiti@2.5.1) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.42.0': + '@typescript-eslint/visitor-keys@8.43.0': dependencies: - '@typescript-eslint/types': 8.42.0 + '@typescript-eslint/types': 8.43.0 eslint-visitor-keys: 4.2.1 - '@typespec/ts-http-runtime@0.3.0': + '@typespec/ts-http-runtime@0.3.1': dependencies: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 @@ -3248,13 +3272,13 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@7.1.4(@types/node@22.18.0)(yaml@2.8.1))': + '@vitest/mocker@3.2.4(vite@7.1.5(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 - magic-string: 0.30.18 + magic-string: 0.30.19 optionalDependencies: - vite: 7.1.4(@types/node@22.18.0)(yaml@2.8.1) + vite: 7.1.5(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1) '@vitest/pretty-format@3.2.4': dependencies: @@ -3269,7 +3293,7 @@ snapshots: '@vitest/snapshot@3.2.4': dependencies: '@vitest/pretty-format': 3.2.4 - magic-string: 0.30.18 + magic-string: 0.30.19 pathe: 2.0.3 '@vitest/spy@3.2.4': @@ -3301,17 +3325,11 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ansi-regex@5.0.1: {} - - ansi-regex@6.2.0: {} - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - ansi-styles@6.2.1: {} - - any-promise@1.3.0: {} + ansis@4.1.0: {} argparse@2.0.1: {} @@ -3369,6 +3387,11 @@ snapshots: assertion-error@2.0.1: {} + ast-kit@2.1.2: + dependencies: + '@babel/parser': 7.28.4 + pathe: 2.0.3 + ast-types-flow@0.0.8: {} async-function@1.0.0: {} @@ -3385,6 +3408,8 @@ snapshots: balanced-match@1.0.2: {} + birpc@2.5.0: {} + brace-expansion@1.1.12: dependencies: balanced-match: 1.0.2 @@ -3400,16 +3425,11 @@ snapshots: browserslist@4.25.4: dependencies: - caniuse-lite: 1.0.30001739 - electron-to-chromium: 1.5.213 - node-releases: 2.0.19 + caniuse-lite: 1.0.30001741 + electron-to-chromium: 1.5.218 + node-releases: 2.0.21 update-browserslist-db: 1.1.3(browserslist@4.25.4) - bundle-require@5.1.0(esbuild@0.25.9): - dependencies: - esbuild: 0.25.9 - load-tsconfig: 0.2.5 - cac@6.7.14: {} cacheable-lookup@7.0.0: {} @@ -3421,7 +3441,7 @@ snapshots: http-cache-semantics: 4.2.0 keyv: 4.5.4 mimic-response: 4.0.0 - normalize-url: 8.0.2 + normalize-url: 8.1.0 responselike: 3.0.0 call-bind-apply-helpers@1.0.2: @@ -3443,7 +3463,7 @@ snapshots: callsites@3.1.0: {} - caniuse-lite@1.0.30001739: {} + caniuse-lite@1.0.30001741: {} chai@5.3.3: dependencies: @@ -3474,14 +3494,8 @@ snapshots: dependencies: delayed-stream: 1.0.0 - commander@4.1.1: {} - concat-map@0.0.1: {} - confbox@0.1.8: {} - - consola@3.4.2: {} - cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -3538,26 +3552,30 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + defu@6.1.4: {} + delayed-stream@1.0.0: {} + diff@8.0.2: {} + doctrine@2.1.0: dependencies: esutils: 2.0.3 + dts-resolver@2.1.2: {} + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 es-errors: 1.3.0 gopd: 1.2.0 - eastasianwidth@0.2.0: {} - - electron-to-chromium@1.5.213: {} - - emoji-regex@8.0.0: {} + electron-to-chromium@1.5.218: {} emoji-regex@9.2.2: {} + empathic@2.0.0: {} + entities@4.5.0: {} es-abstract@1.24.0: @@ -3679,9 +3697,9 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@10.1.8(eslint@9.34.0): + eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.5.1)): dependencies: - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) eslint-import-context@0.1.9(unrs-resolver@1.11.1): dependencies: @@ -3698,88 +3716,88 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@4.4.4(eslint-plugin-import@2.32.0)(eslint@9.34.0): + eslint-import-resolver-typescript@4.4.4(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)): dependencies: debug: 4.4.1 - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) get-tsconfig: 4.10.1 is-bun-module: 2.0.0 stable-hash-x: 0.2.0 - tinyglobby: 0.2.14 + tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.34.0) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.34.0): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.42.0(eslint@9.34.0)(typescript@5.9.2) - eslint: 9.34.0 + '@typescript-eslint/parser': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) + eslint: 9.35.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import@2.32.0)(eslint@9.34.0) + eslint-import-resolver-typescript: 4.4.4(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-plugin-escompat@3.11.4(eslint@9.34.0): + eslint-plugin-escompat@3.11.4(eslint@9.35.0(jiti@2.5.1)): dependencies: browserslist: 4.25.4 - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) - eslint-plugin-eslint-comments@3.2.0(eslint@9.34.0): + eslint-plugin-eslint-comments@3.2.0(eslint@9.35.0(jiti@2.5.1)): dependencies: escape-string-regexp: 1.0.5 - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) ignore: 5.3.2 - eslint-plugin-filenames@1.3.2(eslint@9.34.0): + eslint-plugin-filenames@1.3.2(eslint@9.35.0(jiti@2.5.1)): dependencies: - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) lodash.camelcase: 4.3.0 lodash.kebabcase: 4.1.1 lodash.snakecase: 4.1.1 lodash.upperfirst: 4.3.1 - eslint-plugin-github@6.0.0(eslint-import-resolver-typescript@4.4.4)(eslint@9.34.0): + eslint-plugin-github@6.0.0(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)): dependencies: - '@eslint/compat': 1.3.2(eslint@9.34.0) + '@eslint/compat': 1.3.2(eslint@9.35.0(jiti@2.5.1)) '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.34.0 + '@eslint/js': 9.35.0 '@github/browserslist-config': 1.0.0 - '@typescript-eslint/eslint-plugin': 8.42.0(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint@9.34.0)(typescript@5.9.2) - '@typescript-eslint/parser': 8.42.0(eslint@9.34.0)(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) aria-query: 5.3.2 - eslint: 9.34.0 - eslint-config-prettier: 10.1.8(eslint@9.34.0) - eslint-plugin-escompat: 3.11.4(eslint@9.34.0) - eslint-plugin-eslint-comments: 3.2.0(eslint@9.34.0) - eslint-plugin-filenames: 1.3.2(eslint@9.34.0) - eslint-plugin-i18n-text: 1.0.1(eslint@9.34.0) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.34.0) - eslint-plugin-jsx-a11y: 6.10.2(eslint@9.34.0) + eslint: 9.35.0(jiti@2.5.1) + eslint-config-prettier: 10.1.8(eslint@9.35.0(jiti@2.5.1)) + eslint-plugin-escompat: 3.11.4(eslint@9.35.0(jiti@2.5.1)) + eslint-plugin-eslint-comments: 3.2.0(eslint@9.35.0(jiti@2.5.1)) + eslint-plugin-filenames: 1.3.2(eslint@9.35.0(jiti@2.5.1)) + eslint-plugin-i18n-text: 1.0.1(eslint@9.35.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)) + eslint-plugin-jsx-a11y: 6.10.2(eslint@9.35.0(jiti@2.5.1)) eslint-plugin-no-only-tests: 3.3.0 - eslint-plugin-prettier: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.34.0))(eslint@9.34.0)(prettier@3.6.2) + eslint-plugin-prettier: 5.5.4(eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1))(prettier@3.6.2) eslint-rule-documentation: 1.0.23 - globals: 16.3.0 + globals: 16.4.0 jsx-ast-utils: 3.3.5 prettier: 3.6.2 svg-element-attributes: 1.3.1 typescript: 5.9.2 - typescript-eslint: 8.42.0(eslint@9.34.0)(typescript@5.9.2) + typescript-eslint: 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) transitivePeerDependencies: - '@types/eslint' - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-i18n-text@1.0.1(eslint@9.34.0): + eslint-plugin-i18n-text@1.0.1(eslint@9.35.0(jiti@2.5.1)): dependencies: - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.34.0): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -3788,9 +3806,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.34.0) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.4)(eslint@9.35.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -3802,13 +3820,13 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.42.0(eslint@9.34.0)(typescript@5.9.2) + '@typescript-eslint/parser': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.10.2(eslint@9.34.0): + eslint-plugin-jsx-a11y@6.10.2(eslint@9.35.0(jiti@2.5.1)): dependencies: aria-query: 5.3.2 array-includes: 3.1.9 @@ -3818,7 +3836,7 @@ snapshots: axobject-query: 4.1.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -3829,14 +3847,14 @@ snapshots: eslint-plugin-no-only-tests@3.3.0: {} - eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.34.0))(eslint@9.34.0)(prettier@3.6.2): + eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1))(prettier@3.6.2): dependencies: - eslint: 9.34.0 + eslint: 9.35.0(jiti@2.5.1) prettier: 3.6.2 prettier-linter-helpers: 1.0.0 synckit: 0.11.11 optionalDependencies: - eslint-config-prettier: 10.1.8(eslint@9.34.0) + eslint-config-prettier: 10.1.8(eslint@9.35.0(jiti@2.5.1)) eslint-rule-documentation@1.0.23: {} @@ -3849,15 +3867,15 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.34.0: + eslint@9.35.0(jiti@2.5.1): dependencies: - '@eslint-community/eslint-utils': 4.8.0(eslint@9.34.0) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.35.0(jiti@2.5.1)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.21.0 '@eslint/config-helpers': 0.3.1 '@eslint/core': 0.15.2 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.34.0 + '@eslint/js': 9.35.0 '@eslint/plugin-kit': 0.3.5 '@humanfs/node': 0.16.7 '@humanwhocodes/module-importer': 1.0.1 @@ -3886,6 +3904,8 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 + optionalDependencies: + jiti: 2.5.1 transitivePeerDependencies: - supports-color @@ -3958,12 +3978,6 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - fix-dts-default-cjs-exports@1.0.1: - dependencies: - magic-string: 0.30.18 - mlly: 1.8.0 - rollup: 4.50.0 - flat-cache@4.0.1: dependencies: flatted: 3.3.3 @@ -3975,11 +3989,6 @@ snapshots: dependencies: is-callable: 1.2.7 - foreground-child@3.3.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - form-data-encoder@4.1.0: {} form-data@2.5.5: @@ -4048,18 +4057,9 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@10.4.5: - dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.5 - minipass: 7.1.2 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - globals@14.0.0: {} - globals@16.3.0: {} + globals@16.4.0: {} globalthis@1.0.4: dependencies: @@ -4106,6 +4106,8 @@ snapshots: dependencies: function-bind: 1.1.2 + hookable@5.5.3: {} + http-cache-semantics@4.2.0: {} http-proxy-agent@7.0.2: @@ -4194,8 +4196,6 @@ snapshots: dependencies: call-bound: 1.0.4 - is-fullwidth-code-point@3.0.0: {} - is-generator-function@1.1.0: dependencies: call-bound: 1.0.4 @@ -4263,15 +4263,9 @@ snapshots: isexe@2.0.0: {} - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - javascript-natural-sort@0.7.1: {} - joycon@3.1.1: {} + jiti@2.5.1: {} js-tokens@4.0.0: {} @@ -4315,16 +4309,10 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - lilconfig@3.1.3: {} - - lines-and-columns@1.2.4: {} - linkify-it@5.0.0: dependencies: uc.micro: 2.1.0 - load-tsconfig@0.2.5: {} - locate-path@6.0.0: dependencies: p-locate: 5.0.0 @@ -4337,8 +4325,6 @@ snapshots: lodash.snakecase@4.1.1: {} - lodash.sortby@4.7.0: {} - lodash.upperfirst@4.3.1: {} lodash@4.17.21: {} @@ -4347,11 +4333,9 @@ snapshots: lowercase-keys@3.0.0: {} - lru-cache@10.4.3: {} - lunr@2.3.9: {} - magic-string@0.30.18: + magic-string@0.30.19: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -4395,23 +4379,8 @@ snapshots: minimist@1.2.8: {} - minipass@7.1.2: {} - - mlly@1.8.0: - dependencies: - acorn: 8.15.0 - pathe: 2.0.3 - pkg-types: 1.3.1 - ufo: 1.6.1 - ms@2.1.3: {} - mz@2.7.0: - dependencies: - any-promise: 1.3.0 - object-assign: 4.1.1 - thenify-all: 1.6.0 - nanoid@3.3.11: {} napi-postinstall@0.3.3: {} @@ -4422,11 +4391,9 @@ snapshots: dependencies: whatwg-url: 5.0.0 - node-releases@2.0.19: {} + node-releases@2.0.21: {} - normalize-url@8.0.2: {} - - object-assign@4.1.1: {} + normalize-url@8.1.0: {} object-inspect@1.13.4: {} @@ -4486,8 +4453,6 @@ snapshots: dependencies: p-limit: 3.1.0 - package-json-from-dist@1.0.1: {} - parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -4498,11 +4463,6 @@ snapshots: path-parse@1.0.7: {} - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.2 - pathe@2.0.3: {} pathval@2.0.1: {} @@ -4513,23 +4473,8 @@ snapshots: picomatch@4.0.3: {} - pirates@4.0.7: {} - - pkg-types@1.3.1: - dependencies: - confbox: 0.1.8 - mlly: 1.8.0 - pathe: 2.0.3 - possible-typed-array-names@1.1.0: {} - postcss-load-config@6.0.1(postcss@8.5.6)(yaml@2.8.1): - dependencies: - lilconfig: 3.1.3 - optionalDependencies: - postcss: 8.5.6 - yaml: 2.8.1 - postcss@8.5.6: dependencies: nanoid: 3.3.11 @@ -4548,6 +4493,8 @@ snapshots: punycode@2.3.1: {} + quansync@0.2.11: {} + queue-microtask@1.2.3: {} quick-lru@5.1.1: {} @@ -4578,8 +4525,6 @@ snapshots: resolve-from@4.0.0: {} - resolve-from@5.0.0: {} - resolve-pkg-maps@1.0.0: {} resolve@1.22.10: @@ -4594,31 +4539,70 @@ snapshots: reusify@1.1.0: {} - rollup@4.50.0: + rolldown-plugin-dts@0.15.10(rolldown@1.0.0-beta.37)(typescript@5.9.2): + dependencies: + '@babel/generator': 7.28.3 + '@babel/parser': 7.28.4 + '@babel/types': 7.28.4 + ast-kit: 2.1.2 + birpc: 2.5.0 + debug: 4.4.1 + dts-resolver: 2.1.2 + get-tsconfig: 4.10.1 + rolldown: 1.0.0-beta.37 + optionalDependencies: + typescript: 5.9.2 + transitivePeerDependencies: + - oxc-resolver + - supports-color + + rolldown@1.0.0-beta.37: + dependencies: + '@oxc-project/runtime': 0.87.0 + '@oxc-project/types': 0.87.0 + '@rolldown/pluginutils': 1.0.0-beta.37 + ansis: 4.1.0 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.0-beta.37 + '@rolldown/binding-darwin-arm64': 1.0.0-beta.37 + '@rolldown/binding-darwin-x64': 1.0.0-beta.37 + '@rolldown/binding-freebsd-x64': 1.0.0-beta.37 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.37 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.37 + '@rolldown/binding-linux-arm64-musl': 1.0.0-beta.37 + '@rolldown/binding-linux-x64-gnu': 1.0.0-beta.37 + '@rolldown/binding-linux-x64-musl': 1.0.0-beta.37 + '@rolldown/binding-openharmony-arm64': 1.0.0-beta.37 + '@rolldown/binding-wasm32-wasi': 1.0.0-beta.37 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.37 + '@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.37 + '@rolldown/binding-win32-x64-msvc': 1.0.0-beta.37 + + rollup@4.50.1: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.50.0 - '@rollup/rollup-android-arm64': 4.50.0 - '@rollup/rollup-darwin-arm64': 4.50.0 - '@rollup/rollup-darwin-x64': 4.50.0 - '@rollup/rollup-freebsd-arm64': 4.50.0 - '@rollup/rollup-freebsd-x64': 4.50.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.50.0 - '@rollup/rollup-linux-arm-musleabihf': 4.50.0 - '@rollup/rollup-linux-arm64-gnu': 4.50.0 - '@rollup/rollup-linux-arm64-musl': 4.50.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.50.0 - '@rollup/rollup-linux-ppc64-gnu': 4.50.0 - '@rollup/rollup-linux-riscv64-gnu': 4.50.0 - '@rollup/rollup-linux-riscv64-musl': 4.50.0 - '@rollup/rollup-linux-s390x-gnu': 4.50.0 - '@rollup/rollup-linux-x64-gnu': 4.50.0 - '@rollup/rollup-linux-x64-musl': 4.50.0 - '@rollup/rollup-openharmony-arm64': 4.50.0 - '@rollup/rollup-win32-arm64-msvc': 4.50.0 - '@rollup/rollup-win32-ia32-msvc': 4.50.0 - '@rollup/rollup-win32-x64-msvc': 4.50.0 + '@rollup/rollup-android-arm-eabi': 4.50.1 + '@rollup/rollup-android-arm64': 4.50.1 + '@rollup/rollup-darwin-arm64': 4.50.1 + '@rollup/rollup-darwin-x64': 4.50.1 + '@rollup/rollup-freebsd-arm64': 4.50.1 + '@rollup/rollup-freebsd-x64': 4.50.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.50.1 + '@rollup/rollup-linux-arm-musleabihf': 4.50.1 + '@rollup/rollup-linux-arm64-gnu': 4.50.1 + '@rollup/rollup-linux-arm64-musl': 4.50.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.50.1 + '@rollup/rollup-linux-ppc64-gnu': 4.50.1 + '@rollup/rollup-linux-riscv64-gnu': 4.50.1 + '@rollup/rollup-linux-riscv64-musl': 4.50.1 + '@rollup/rollup-linux-s390x-gnu': 4.50.1 + '@rollup/rollup-linux-x64-gnu': 4.50.1 + '@rollup/rollup-linux-x64-musl': 4.50.1 + '@rollup/rollup-openharmony-arm64': 4.50.1 + '@rollup/rollup-win32-arm64-msvc': 4.50.1 + '@rollup/rollup-win32-ia32-msvc': 4.50.1 + '@rollup/rollup-win32-x64-msvc': 4.50.1 fsevents: 2.3.3 run-parallel@1.2.0: @@ -4710,14 +4694,8 @@ snapshots: siginfo@2.0.0: {} - signal-exit@4.1.0: {} - source-map-js@1.2.1: {} - source-map@0.8.0-beta.0: - dependencies: - whatwg-url: 7.1.0 - stable-hash-x@0.2.0: {} stackback@0.0.2: {} @@ -4729,18 +4707,6 @@ snapshots: es-errors: 1.3.0 internal-slot: 1.1.0 - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.1.0 - string.prototype.includes@2.0.1: dependencies: call-bind: 1.0.8 @@ -4770,14 +4736,6 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.1.1 - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.1.0: - dependencies: - ansi-regex: 6.2.0 - strip-bom@3.0.0: {} strip-json-comments@3.1.1: {} @@ -4788,16 +4746,6 @@ snapshots: strnum@2.1.1: {} - sucrase@3.35.0: - dependencies: - '@jridgewell/gen-mapping': 0.3.13 - commander: 4.1.1 - glob: 10.4.5 - lines-and-columns: 1.2.4 - mz: 2.7.0 - pirates: 4.0.7 - ts-interface-checker: 0.1.13 - supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -4810,19 +4758,13 @@ snapshots: dependencies: '@pkgr/core': 0.2.9 - thenify-all@1.6.0: - dependencies: - thenify: 3.3.1 - - thenify@3.3.1: - dependencies: - any-promise: 1.3.0 - tinybench@2.9.0: {} tinyexec@0.3.2: {} - tinyglobby@0.2.14: + tinyexec@1.0.1: {} + + tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 @@ -4839,18 +4781,12 @@ snapshots: tr46@0.0.3: {} - tr46@1.0.1: - dependencies: - punycode: 2.3.1 - tree-kill@1.2.2: {} ts-api-utils@2.1.0(typescript@5.9.2): dependencies: typescript: 5.9.2 - ts-interface-checker@0.1.13: {} - tsconfig-paths@3.15.0: dependencies: '@types/json5': 0.0.29 @@ -4858,37 +4794,33 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tslib@1.14.1: {} - - tslib@2.8.1: {} - - tsup@8.5.0(postcss@8.5.6)(typescript@5.9.2)(yaml@2.8.1): + tsdown@0.14.2(typescript@5.9.2): dependencies: - bundle-require: 5.1.0(esbuild@0.25.9) + ansis: 4.1.0 cac: 6.7.14 chokidar: 4.0.3 - consola: 3.4.2 debug: 4.4.1 - esbuild: 0.25.9 - fix-dts-default-cjs-exports: 1.0.1 - joycon: 3.1.1 - picocolors: 1.1.1 - postcss-load-config: 6.0.1(postcss@8.5.6)(yaml@2.8.1) - resolve-from: 5.0.0 - rollup: 4.50.0 - source-map: 0.8.0-beta.0 - sucrase: 3.35.0 - tinyexec: 0.3.2 - tinyglobby: 0.2.14 + diff: 8.0.2 + empathic: 2.0.0 + hookable: 5.5.3 + rolldown: 1.0.0-beta.37 + rolldown-plugin-dts: 0.15.10(rolldown@1.0.0-beta.37)(typescript@5.9.2) + semver: 7.7.2 + tinyexec: 1.0.1 + tinyglobby: 0.2.15 tree-kill: 1.2.2 + unconfig: 7.3.3 optionalDependencies: - postcss: 8.5.6 typescript: 5.9.2 transitivePeerDependencies: - - jiti + - '@typescript/native-preview' + - oxc-resolver - supports-color - - tsx - - yaml + - vue-tsc + + tslib@1.14.1: {} + + tslib@2.8.1: {} tunnel@0.0.6: {} @@ -4933,20 +4865,20 @@ snapshots: typedoc@0.28.12(typescript@5.9.2): dependencies: - '@gerrit0/mini-shiki': 3.12.1 + '@gerrit0/mini-shiki': 3.12.2 lunr: 2.3.9 markdown-it: 14.1.0 minimatch: 9.0.5 typescript: 5.9.2 yaml: 2.8.1 - typescript-eslint@8.42.0(eslint@9.34.0)(typescript@5.9.2): + typescript-eslint@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.42.0(@typescript-eslint/parser@8.42.0(eslint@9.34.0)(typescript@5.9.2))(eslint@9.34.0)(typescript@5.9.2) - '@typescript-eslint/parser': 8.42.0(eslint@9.34.0)(typescript@5.9.2) - '@typescript-eslint/typescript-estree': 8.42.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.42.0(eslint@9.34.0)(typescript@5.9.2) - eslint: 9.34.0 + '@typescript-eslint/eslint-plugin': 8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/parser': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.43.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.9.2) + eslint: 9.35.0(jiti@2.5.1) typescript: 5.9.2 transitivePeerDependencies: - supports-color @@ -4955,8 +4887,6 @@ snapshots: uc.micro@2.1.0: {} - ufo@1.6.1: {} - unbox-primitive@1.1.0: dependencies: call-bound: 1.0.4 @@ -4964,6 +4894,13 @@ snapshots: has-symbols: 1.1.0 which-boxed-primitive: 1.1.1 + unconfig@7.3.3: + dependencies: + '@quansync/fs': 0.1.5 + defu: 6.1.4 + jiti: 2.5.1 + quansync: 0.2.11 + undici-types@6.21.0: {} undici@5.29.0: @@ -5006,13 +4943,13 @@ snapshots: uuid@8.3.2: {} - vite-node@3.2.4(@types/node@22.18.0)(yaml@2.8.1): + vite-node@3.2.4(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.1.4(@types/node@22.18.0)(yaml@2.8.1) + vite: 7.1.5(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -5027,24 +4964,25 @@ snapshots: - tsx - yaml - vite@7.1.4(@types/node@22.18.0)(yaml@2.8.1): + vite@7.1.5(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 - rollup: 4.50.0 - tinyglobby: 0.2.14 + rollup: 4.50.1 + tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 22.18.0 + '@types/node': 22.18.1 fsevents: 2.3.3 + jiti: 2.5.1 yaml: 2.8.1 - vitest@3.2.4(@types/node@22.18.0)(yaml@2.8.1): + vitest@3.2.4(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.1.4(@types/node@22.18.0)(yaml@2.8.1)) + '@vitest/mocker': 3.2.4(vite@7.1.5(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -5053,20 +4991,20 @@ snapshots: chai: 5.3.3 debug: 4.4.1 expect-type: 1.2.2 - magic-string: 0.30.18 + magic-string: 0.30.19 pathe: 2.0.3 picomatch: 4.0.3 std-env: 3.9.0 tinybench: 2.9.0 tinyexec: 0.3.2 - tinyglobby: 0.2.14 + tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.1.4(@types/node@22.18.0)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@22.18.0)(yaml@2.8.1) + vite: 7.1.5(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1) + vite-node: 3.2.4(@types/node@22.18.1)(jiti@2.5.1)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.18.0 + '@types/node': 22.18.1 transitivePeerDependencies: - jiti - less @@ -5083,19 +5021,11 @@ snapshots: webidl-conversions@3.0.1: {} - webidl-conversions@4.0.2: {} - whatwg-url@5.0.0: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - whatwg-url@7.1.0: - dependencies: - lodash.sortby: 4.7.0 - tr46: 1.0.1 - webidl-conversions: 4.0.2 - which-boxed-primitive@1.1.1: dependencies: is-bigint: 1.1.0 @@ -5148,18 +5078,6 @@ snapshots: word-wrap@1.2.5: {} - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.1 - string-width: 5.1.2 - strip-ansi: 7.1.0 - xml2js@0.5.0: dependencies: sax: 1.4.1 diff --git a/src/index.ts b/src/index.ts index 50583bb..ff14a38 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,22 +5,25 @@ // import { version as pkgVersion } from "../package.json"; import * as ghActionsCorePlatform from "./actions-core-platform.js"; import { collectBacktraces } from "./backtrace.js"; -import { CheckIn, Feature } from "./check-in.js"; +import type { CheckIn, Feature } from "./check-in.js"; import * as correlation from "./correlation.js"; import { IdsHost } from "./ids-host.js"; import { getBool, getBoolOrUndefined, getStringOrNull } from "./inputs.js"; import * as platform from "./platform.js"; -import { SourceDef, constructSourceParameters } from "./sourcedef.js"; +import type { SourceDef } from "./sourcedef.js"; +import { constructSourceParameters } from "./sourcedef.js"; import * as actionsCache from "@actions/cache"; import * as actionsCore from "@actions/core"; import * as actionsExec from "@actions/exec"; -import { Got, Request, TimeoutError } from "got"; +import { type Got, type Request, TimeoutError } from "got"; import { exec } from "node:child_process"; -import { UUID, randomUUID } from "node:crypto"; +import type { UUID } from "node:crypto"; +import { randomUUID } from "node:crypto"; import { PathLike, WriteStream, createWriteStream, + constants as fsConstants, readFileSync, } from "node:fs"; import fs, { chmod, copyFile, mkdir } from "node:fs/promises"; @@ -485,7 +488,7 @@ export abstract class DetSysAction { */ async fetchExecutable(): Promise { const binaryPath = await this.fetchArtifact(); - await chmod(binaryPath, fs.constants.S_IXUSR | fs.constants.S_IXGRP); + await chmod(binaryPath, fsConstants.S_IXUSR | fsConstants.S_IXGRP); return binaryPath; } @@ -1198,7 +1201,7 @@ function makeOptionsConfident( } // Public exports from other files -export { +export type { CheckIn, Feature, Incident, @@ -1206,9 +1209,9 @@ export { Page, StatusSummary, } from "./check-in.js"; -export { AnonymizedCorrelationHashes } from "./correlation.js"; +export type { AnonymizedCorrelationHashes } from "./correlation.js"; export { stringifyError } from "./errors.js"; export { IdsHost } from "./ids-host.js"; -export { SourceDef } from "./sourcedef.js"; +export type { SourceDef } from "./sourcedef.js"; export * as inputs from "./inputs.js"; export * as platform from "./platform.js"; diff --git a/tsconfig.json b/tsconfig.json index 22ca949..608c23b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, - "module": "Node16", + "module": "NodeNext", "moduleResolution": "NodeNext", "outDir": "./dist", "resolveJsonModule": true, diff --git a/tsup.config.ts b/tsdown.config.ts similarity index 72% rename from tsup.config.ts rename to tsdown.config.ts index ef7c9fe..8c1b3a7 100644 --- a/tsup.config.ts +++ b/tsdown.config.ts @@ -1,15 +1,13 @@ -import { defineConfig } from "tsup"; +import { defineConfig } from "tsdown"; export default defineConfig({ name: "detsys-ts", entry: ["src/index.ts"], format: ["esm"], target: "node20", - bundle: true, - splitting: false, sourcemap: true, - clean: true, dts: { resolve: false, }, + clean: true, });