PolicyWorker: mock Deno.env

This commit is contained in:
Alex Gleason 2024-09-11 14:34:41 -05:00
parent a1585d81aa
commit 6b66e61ee9
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -6,6 +6,9 @@ import * as Comlink from 'comlink';
import { DittoDB } from '@/db/DittoDB.ts'; import { DittoDB } from '@/db/DittoDB.ts';
import { EventsDB } from '@/storages/EventsDB.ts'; import { EventsDB } from '@/storages/EventsDB.ts';
// @ts-ignore Don't try to access the env from this worker.
Deno.env = new Map<string, string>();
/** Serializable object the worker can use to set up the state. */ /** Serializable object the worker can use to set up the state. */
interface PolicyInit { interface PolicyInit {
/** Path to the policy module (https, jsr, file, etc) */ /** Path to the policy module (https, jsr, file, etc) */