{"version":3,"file":"env-classification.cjs","names":[],"sources":["../src/env-classification.ts"],"sourcesContent":["/**\n * Vite's default `envPrefix`. Used when a project does not configure its own\n * `envPrefix`; mirrors Vite's own default so classification stays in sync.\n */\nexport const DEFAULT_ENV_PREFIXES: readonly string[] = ['VITE_']\n\n/**\n * Returns `true` if the given environment variable is permitted on the client side.\n * A variable is client-permitted when it carries one of the configured env\n * prefixes (`VITE_` by default, which Vite exposes through `import.meta.env`) or\n * when it appears in the explicit allowlist provided by the user.\n *\n * @param envVarName - The name of the environment variable to classify.\n * @param allowClientAccess - The set of variable names explicitly allowed on the client.\n * @param envPrefixes - Prefixes Vite exposes to the client (resolved `envPrefix`).\n *   Defaults to {@link DEFAULT_ENV_PREFIXES} (`VITE_`).\n * @returns `true` if the variable may be accessed from client-side code.\n */\nexport function isClientPermittedEnvVar(\n  envVarName: string,\n  allowClientAccess: Set<string>,\n  envPrefixes: readonly string[] = DEFAULT_ENV_PREFIXES\n): boolean {\n  return envPrefixes.some((prefix) => envVarName.startsWith(prefix)) || allowClientAccess.has(envVarName)\n}\n"],"mappings":";;;;;;AAIA,MAAa,uBAA0C,CAAC,QAAQ;;;;;;;;;;;;;AAchE,SAAgB,wBACd,YACA,mBACA,cAAiC,sBACxB;AACT,QAAO,YAAY,MAAM,WAAW,WAAW,WAAW,OAAO,CAAC,IAAI,kBAAkB,IAAI,WAAW"}