Skip to content

Commit

Permalink
fix(cli): replace --allow-plugin with --allow-ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Aug 13, 2021
1 parent b163313 commit ede926d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Usage: dzx [script] [args...]
--allow-env - Allow environment access. (Depends: --worker)
--allow-hrtime - Allow high resolution time measurement. (Depends: --worker)
--allow-net - Allow network access. (Depends: --worker)
--allow-plugin - Allow loading plugins. (Depends: --worker)
--allow-ffi - Allow loading dynamic libraries. (Depends: --worker)
--allow-read - Allow file system read access. (Depends: --worker)
--allow-run - Allow running subprocesses. (Depends: --worker)
--allow-write - Allow file system write access. (Depends: --worker)
Expand Down
2 changes: 1 addition & 1 deletion src/cli/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function compileCommand() {
.option("--allow-env [allow-env:string]", "Allow environment access.")
.option("--allow-hrtime", "Allow high resolution time measurement.")
.option("--allow-net [allow-net:string]", "Allow network access.")
.option("--allow-plugin", "Allow loading plugins.")
.option("--allow-ffi", "Allow loading dynamic libraries.")
.option(
"--allow-read [allow-read:string]",
"Allow file system read access.",
Expand Down
10 changes: 5 additions & 5 deletions src/cli/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export function dzx() {
"Allow network access.",
{ depends: ["worker"] },
)
.option<{ allowPlugin?: boolean }>(
"--allow-plugin",
"Allow loading plugins.",
.option<{ allowFfi?: boolean }>(
"--allow-ffi",
"Allow loading dynamic libraries.",
{ depends: ["worker"] },
)
.option<{ allowRead?: boolean }>(
Expand Down Expand Up @@ -121,7 +121,7 @@ export function dzx() {
permissions: {
env: perms.allowAll || perms.allowEnv,
hrtime: perms.allowAll || perms.allowHrtime,
plugin: perms.allowAll || perms.allowPlugin,
ffi: perms.allowAll || perms.allowFfi,
run: perms.allowAll || perms.allowRun,
write: perms.allowAll || perms.allowWrite,
net: perms.allowAll || perms.allowNet,
Expand Down Expand Up @@ -157,7 +157,7 @@ interface Permissions {
allowAll?: boolean;
allowEnv?: boolean;
allowHrtime?: boolean;
allowPlugin?: boolean;
allowFfi?: boolean;
allowRun?: boolean;
allowWrite?: boolean;
allowNet?: boolean;
Expand Down

0 comments on commit ede926d

Please sign in to comment.