UNPKG

@coursebuilder/core

Version:

Core package for Course Builder

41 lines (39 loc) 998 B
import { MissingAdapterMethods } from "./chunk-F32UWPXN.js"; import { __name } from "./chunk-VLQXSCFN.js"; // src/lib/utils/assert.ts var hasTranscript = false; var warned = false; function assertConfig(request, options) { const { url } = request; const warnings = []; if (!warned && options.debug) warnings.push("debug-enabled"); for (const p of options.providers) { const provider = typeof p === "function" ? p() : p; if (provider.type === "transcription") { hasTranscript = true; } } const { adapter } = options; let requiredMethods = []; if (hasTranscript) { } if (adapter) { const missing = requiredMethods.filter((m) => !(m in adapter)); if (missing.length) { return new MissingAdapterMethods(`Required adapter methods were missing: ${missing.join(", ")}`); } } if (!warned) warned = true; return warnings; } __name(assertConfig, "assertConfig"); export { assertConfig }; //# sourceMappingURL=chunk-L5Z3CNIX.js.map