Skip to content

Commit

Permalink
Add allowRun parameter for compile
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyd committed Oct 17, 2022
1 parent e3ef528 commit b270c4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-deno",
"version": "0.0.3",
"version": "0.0.4",
"description": "Invoke Deno from Node",
"main": "dist/cjs/index.js",
"browser": "dist/esm/index.js",
Expand Down
4 changes: 4 additions & 0 deletions src/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface CompileOptions {
target: CompilationTarget;
entrypoint: string | string[];
allowRead?: boolean;
allowRun?: boolean;
allowNet?: boolean | string[];
allowEnv?: boolean | string[];
noPrompt?: boolean;
Expand All @@ -34,6 +35,9 @@ export function compile(options: CompileOptions) {
if (options.allowRead) {
args.push('--allow-read');
}
if (options.allowRun) {
args.push('--allow-run');
}
if (!!options.allowNet) {
if (Array.isArray(options.allowNet)) {
args.push(`--allow-net=${options.allowNet.join(',')}`);
Expand Down

0 comments on commit b270c4e

Please sign in to comment.