/* eslint-disable no-restricted-syntax -- Allow top-level await */ import { createDebug } from "@nomicfoundation/hardhat-utils/debug"; import { captureMessage, close, captureException } from "@sentry/core"; import { Anonymizer } from "./anonymizer.js"; import { init } from "./init.js"; import { createHttpTransport, sendEnvelopeToSentryBackend, } from "./transport.js"; const log = createDebug("hardhat:core:cli:telemetry:sentry:subprocess"); const serializedEnvelope = process.argv[2]; const configPath = process.argv[3] !== "" ? process.argv[3] : undefined; const dsn = process.argv[4]; const release = process.argv[5]; const environment = process.argv[6]; if (process.argv.length !== 7) { console.error( "Invalid number of arguments. Expected [