Skip to content

Commit

Permalink
fix: artifact url bug with deno hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohe-Am committed Dec 16, 2024
1 parent b4be657 commit 7826044
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/typegate/src/runtimes/deno/hooks/worker.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0.
// SPDX-License-Identifier: MPL-2.0

import { toFileUrl } from "@std/path/to-file-url";

self.onmessage = async ({ data }: MessageEvent<{ import: string }>) => {
try {
await import(data.import);
await import(toFileUrl(data.import).toString());
self.postMessage({ success: true });
} catch (error) {
self.postMessage({ error });
}

self.close();
};


0 comments on commit 7826044

Please sign in to comment.