import type { Nuxt } from '@nuxt/schema';
import type { SentryNuxtModuleOptions } from '../common/types';
/**
 * Gets the major version of the Nitro package used by the app's Nuxt installation.
 * Returns 2 as the default if the version cannot be determined.
 *
 * Nitro v2 is published as `nitropack`, v3 as `nitro`. Resolving `nitro` directly is
 * unreliable: module resolution walks up the directory tree, so in a monorepo an
 * unrelated `nitro` v3 above the app wins even when the app's Nuxt uses `nitropack` v2.
 * Instead, follow the dependency chain Nuxt itself imports Nitro through:
 * `nuxt` -> (`@nuxt/nitro-server` ->) `nitro` | `nitropack`.
 */
export declare function getNitroMajorVersion(rootDir: string): Promise<number>;
/**
 *  Find the default SDK init file for the given type (client or server).
 *  The sentry.server.config file is prioritized over the instrument.server file.
 */
export declare function findDefaultSdkInitFile(type: 'server' | 'client', nuxt?: Nuxt, options?: SentryNuxtModuleOptions): Promise<string | undefined>;
/**
 *  Extracts the filename from a node command with a path.
 */
export declare function getFilenameFromNodeStartCommand(nodeCommand: string): string | null;
export declare const SENTRY_WRAPPED_ENTRY = "?sentry-query-wrapped-entry";
export declare const SENTRY_WRAPPED_FUNCTIONS = "?sentry-query-wrapped-functions=";
export declare const SENTRY_REEXPORTED_FUNCTIONS = "?sentry-query-reexported-functions=";
export declare const QUERY_END_INDICATOR = "SENTRY-QUERY-END";
/**
 * Strips the Sentry query part from a path.
 * Example: example/path?sentry-query-wrapped-entry?sentry-query-functions-reexport=foo,SENTRY-QUERY-END -> /example/path
 *
 * Only exported for testing.
 */
export declare function removeSentryQueryFromPath(url: string): string;
/**
 * Extracts and sanitizes function re-export and function wrap query parameters from a query string.
 * If it is a default export, it is not considered for re-exporting.
 *
 * Only exported for testing.
 */
export declare function extractFunctionReexportQueryParameters(query: string): {
    wrap: string[];
    reexport: string[];
};
/**
 *  Constructs a comma-separated string with all functions that need to be re-exported later from the server entry.
 *  It uses Rollup's `exportedBindings` to determine the functions to re-export. Functions which should be wrapped
 *  (e.g. serverless handlers) are wrapped by Sentry.
 */
export declare function constructWrappedFunctionExportQuery(exportedBindings: Record<string, string[]> | null, entrypointWrappedFunctions: string[], debug?: boolean): string;
/**
 * Constructs a code snippet with function reexports (can be used in Rollup plugins as a return value for `load()`)
 */
export declare function constructFunctionReExport(pathWithQuery: string, entryId: string): string;
/**
 * `load()` emits `file://` specifiers because Node's ESM loader rejects bare Windows
 * paths (`ERR_UNSUPPORTED_ESM_URL_SCHEME`), but Rollup's resolver only understands
 * filesystem paths. Returns `undefined` for a malformed `file://` URL.
 *
 * Only exported for testing.
 */
export declare function toResolvablePath(source: string): {
    path: string;
    wasFileUrl: boolean;
} | undefined;
/**
 * Sets up alias to work around OpenTelemetry's incomplete ESM imports.
 * https://github.com/getsentry/sentry-javascript/issues/15204
 *
 * OpenTelemetry's @opentelemetry/resources package has incomplete imports missing
 * the .js file extensions (like execAsync for machine-id detection). This causes module resolution
 * errors in certain Nuxt configurations, particularly when local Nuxt modules in Nuxt 4 are present.
 *
 * @see https://nuxt.com/docs/guide/concepts/esm#aliasing-libraries
 */
export declare function addOTelCommonJSImportAlias(nuxt: Nuxt, isNitroV3?: boolean): void;
