mirror of
https://github.com/denoland/deno.git
synced 2024-11-15 16:43:44 -05:00
6abf126c2a
This removes the std folder from the tree. Various parts of the tests are pretty tightly dependent on std (47 direct imports and 75 indirect imports, not counting the cli tests that use them as fixtures) so I've added std as a submodule for now.
13 lines
326 B
JavaScript
13 lines
326 B
JavaScript
import { fromFileUrl } from "../../../test_util/std/path/mod.ts";
|
|
|
|
onmessage = async ({ data }) => {
|
|
const { state } = await Deno.permissions.query({
|
|
name: "read",
|
|
path: fromFileUrl(new URL(data.route, import.meta.url)),
|
|
});
|
|
|
|
postMessage({
|
|
hasPermission: state === "granted",
|
|
index: data.index,
|
|
});
|
|
};
|