import { i as getProjectCliClient, n as ProjectCliClientOptions, r as getGlobalCliClient, t as GlobalCliClientOptions } from "../apiClient-DXlF5ZV3.js";
import { c as UserViteConfig, i as ConfigStore, n as AppVisibility, r as CliConfig, t as APP_VISIBILITIES } from "../cliConfig-BZgn8ge1.js";
import { t as ProjectRootResult } from "../recursivelyResolveProjectRoot-BE54uEP6.js";
import { n as ConsentInformation, r as TelemetryUserProperties, t as CLITelemetryStore } from "../types-ZNH3prAd.js";
import { n as RequireProps, r as SanityOrgUser, t as Output } from "../types-CwJLTYDj.js";
import { SanityCommand, SanityCommandInterface } from "../SanityCommand.js";
import { t as mockBrowserEnvironment } from "../mockBrowserEnvironment-BjFQPb2W.js";
import { _ as CliTokenInfo, a as getStudioWorkspaces, c as findProjectRoot, d as getCliConfigUncached, f as getCliToken, g as setCliUserConfig, h as getUserConfig, i as isStudioConfig, l as getCliConfigSync, m as getCliUserConfig, n as tryFindStudioConfigPath, o as getStudioConfig, p as getCliTokenInfo, r as findPathForFiles, s as findProjectRootSync, t as findStudioConfigPath, u as getCliConfig, v as clearCliTokenCache } from "../findStudioConfigPath-B35la6W9.js";
import { n as isWorkbenchApp, t as ApplicationType } from "../workbenchApp-DFUFhE7a.js";
import { a as getSanityDataDir, i as getSanityConfigDir, n as getSanityUrl, r as getSanityEnvVar, t as getWorkspace } from "../getWorkspace-CU32E6Uo.js";
import { debug, subdebug } from "./debug.js";
import { t as NonInteractiveError } from "../NonInteractiveError-CSLT5y93.js";
import { i as isNotFoundError, n as isProjectRootNotFoundError, r as NotFoundError, t as ProjectRootNotFoundError } from "../ProjectRootNotFoundError-RgthN9uy.js";
import { exitCodes } from "../exitCodes.js";
import { n as createStudioWorker, r as studioWorkerTask, t as tsxWorkerTask } from "../tsxWorkerTask-cAuOb_uk.js";
import { a as getCliTelemetry, i as clearCliTelemetry, n as getTelemetryBaseInfo, o as reportCliTraceError, r as CLI_TELEMETRY_SYMBOL, s as setCliTelemetry, t as noopLogger } from "../noopTelemetry-BJRIvASI.js";
import { a as isCi, i as isInteractive, n as normalizePath, o as importModule, r as isStaging, s as doImport, t as safeStructuredClone } from "../safeStructuredClone-DAFcnqtc.js";
import { a as getLocalPackageVersion, i as getLocalPackageDir, n as resolveLocalPackageFrom, r as resolveLocalPackagePath, t as resolveLocalPackage } from "../resolveLocalPackage-Dr-TNTyk.js";
import { n as ReadPackageJsonOptions, r as readPackageJson, t as PackageJson } from "../readPackageJson-Cr_lbjVR.js";
import { n as colorizeJson, t as getTimer } from "../timer-Dwu2TIgB.js";
import { i as studioManifestSchema, n as StudioManifest, r as coreAppManifestSchema, t as CoreAppManifest } from "../schemas-CCgh6idL.js";
import { WorkerOptions } from "node:worker_threads";
interface PromisifyWorkerOptions extends WorkerOptions {
  /**
   * Whether to forcibly terminate the worker after settling. Disable this for
   * workers that host native addons (e.g. rolldown via Vite 8) whose threads
   * must tear down with the process: terminating such a worker while native
   * threads are live can abort the whole process with a silent SIGABRT. A
   * disabled worker is unrefed and may continue running until the process
   * exits, including after a timeout.
   */
  terminateOnSettle?: boolean;
  /** Optional timeout in milliseconds. If the worker does not respond within this time, the promise is rejected. */
  timeout?: number;
}
/**
 * Creates a Node.js Worker from the given file path and options, and wraps it
 * in a Promise that resolves with the first message the worker sends, and
 * rejects on error, message deserialization failure, or non-zero exit code.
 * By default, the worker is terminated after a message or error is received.
 * Callers can instead unref it and allow natural process teardown.
 *
 * @param filePath - URL to the worker file
 * @param options - Options to pass to the Worker constructor
 * @returns A promise that resolves with the first message from the worker
 * @throws If the worker emits an error, a message deserialization error, or exits with a non-zero code
 * @internal
 */
declare function promisifyWorker<T = unknown>(filePath: URL, options?: PromisifyWorkerOptions): Promise<T>;
export { APP_VISIBILITIES, type AppVisibility, type ApplicationType, type CLITelemetryStore, CLI_TELEMETRY_SYMBOL, type CliConfig, type CliTokenInfo, type ConfigStore, type ConsentInformation, type CoreAppManifest, type GlobalCliClientOptions, NonInteractiveError, NotFoundError, type Output, type PackageJson, type ProjectCliClientOptions, ProjectRootNotFoundError, type ProjectRootResult, type ReadPackageJsonOptions, type RequireProps, SanityCommand, type SanityCommandInterface, type SanityOrgUser, type StudioManifest, type TelemetryUserProperties, type UserViteConfig, clearCliTelemetry, clearCliTokenCache, colorizeJson, coreAppManifestSchema, createStudioWorker, debug, doImport, exitCodes, findPathForFiles, findProjectRoot, findProjectRootSync, findStudioConfigPath, getCliConfig, getCliConfigSync, getCliConfigUncached, getCliTelemetry, getCliToken, getCliTokenInfo, getCliUserConfig, getGlobalCliClient, getLocalPackageDir, getLocalPackageVersion, getProjectCliClient, getSanityConfigDir, getSanityDataDir, getSanityEnvVar, getSanityUrl, getStudioConfig, getStudioWorkspaces, getTelemetryBaseInfo, getTimer, getUserConfig, getWorkspace, importModule, isCi, isInteractive, isNotFoundError, isProjectRootNotFoundError, isStaging, isStudioConfig, isWorkbenchApp, mockBrowserEnvironment, noopLogger, normalizePath, promisifyWorker, readPackageJson, reportCliTraceError, resolveLocalPackage, resolveLocalPackageFrom, resolveLocalPackagePath, safeStructuredClone, setCliTelemetry, setCliUserConfig, studioManifestSchema, studioWorkerTask, subdebug, tryFindStudioConfigPath, tsxWorkerTask };
//# sourceMappingURL=index.d.ts.map