mirror of
https://github.com/denoland/deno.git
synced 2024-12-18 13:22:55 -05:00
b729bf0ad9
This commit adds support for suffix wildcard for `--allow-env` flag. Specifying flag like `--allow-env=DENO_*` will enable access to all environmental variables starting with `DENO_*`. Closes #24847 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: David Sherret <dsherret@gmail.com>
12 lines
283 B
JavaScript
12 lines
283 B
JavaScript
console.log("main1", Deno.env.get("DENO_HELLO"));
|
|
console.log("main2", Deno.env.get("DENO_BYE"));
|
|
console.log("main3", Deno.env.get("AWS_HELLO"));
|
|
|
|
new Worker(import.meta.resolve("./worker.js"), {
|
|
type: "module",
|
|
deno: {
|
|
permissions: {
|
|
env: ["DENO_*"],
|
|
},
|
|
},
|
|
});
|