import { V as dismissSecretStripNotice, aH as readSecretStripNotice, H as createLogger } from './src-CidJbygh.js';
import { g as getState } from './state-fxN45gBp.js';
import { d as getRequestId, r as requireAdmin, k as jsonResponse, e as errorResponse } from './helpers-kzwksNq1.js';
import './chunk-CLZ62Ad-.js';
import 'node:module';
import './provider-constants-DPrj3yBX.js';
import './dist-DOFcG0Zp.js';
import 'node:fs';
import 'node:path';
import 'buffer';
import 'fs';
import 'path';
import 'node:child_process';
import 'node:url';
import 'node:crypto';
import 'events';
import 'node:events';
import 'node:stream';
import 'node:string_decoder';
import 'assert';
import 'zlib';
import 'node:assert';
import 'node:fs/promises';
import 'node:os';
import './endpoints-UdQGgKsR.js';

//#region src/routes/admin/secret-notice/+server.ts
var logger = createLogger("secret-notice");
/**
* #502 — one-time notice that secret-looking keys were removed from stack.env.
* The strip itself is correct per the secret-boundary contract; this surfaces
* it so the user knows where their value went and how to re-add it.
*/
var GET = async (event) => {
	const requestId = getRequestId(event);
	const authError = requireAdmin(event, requestId);
	if (authError) return authError;
	const state = getState();
	try {
		return jsonResponse(200, {
			ok: true,
			notice: readSecretStripNotice(state)
		}, requestId);
	} catch (e) {
		return errorResponse(500, "secret_notice_failed", e instanceof Error ? e.message : String(e), {}, requestId);
	}
};
/** Dismiss the one-time notice. */
var DELETE = async (event) => {
	const requestId = getRequestId(event);
	const authError = requireAdmin(event, requestId);
	if (authError) return authError;
	const state = getState();
	try {
		dismissSecretStripNotice(state);
		logger.info("secret-strip notice dismissed", { requestId });
		return jsonResponse(200, { ok: true }, requestId);
	} catch (e) {
		return errorResponse(500, "secret_notice_dismiss_failed", e instanceof Error ? e.message : String(e), {}, requestId);
	}
};

export { DELETE, GET };
//# sourceMappingURL=_server.ts-0OeQ0WW1.js.map
