11 lines
406 B
TypeScript
11 lines
406 B
TypeScript
import type { MonitorIMessageOpts } from "./types.js";
|
|
import { createNonExitingRuntime, type RuntimeEnv } from "../../runtime.js";
|
|
|
|
export function resolveRuntime(opts: MonitorIMessageOpts): RuntimeEnv {
|
|
return opts.runtime ?? createNonExitingRuntime();
|
|
}
|
|
|
|
export function normalizeAllowList(list?: Array<string | number>) {
|
|
return (list ?? []).map((entry) => String(entry).trim()).filter(Boolean);
|
|
}
|