/**
 * Compatibility presets for Cloudflare Workers
 *
 * These presets provide common sets of compatibility flags to avoid
 * users having to remember which flags they need for common use cases.
 */
/**
 * Mapping of compatibility presets to their respective compatibility flags
 */
export const COMPATIBILITY_PRESETS = {
    /**
     * Node.js compatibility preset
     * Enables Node.js APIs and runtime compatibility
     */
    node: ["nodejs_compat", "nodejs_compat_populate_process_env"],
};
/**
 * Union preset compatibility flags with user-provided flags
 */
export function unionCompatibilityFlags(preset, userFlags = []) {
    if (!preset) {
        return userFlags;
    }
    const presetFlags = COMPATIBILITY_PRESETS[preset];
    return Array.from(new Set([...presetFlags, ...userFlags]));
}
//# sourceMappingURL=compatibility-presets.js.map