Complete the code to create a lock file when running a Deno script.
deno run --lock=[1] script.tsThe default lock file name in Deno is deno.lock. Using --lock=deno.lock tells Deno to use this file for dependency integrity.
Complete the command to create or update the lock file with all dependencies.
deno run --lock=[1] --lock-write script.tsUsing --lock=deno.lock with --lock-write tells Deno to create or update the deno.lock file with the current dependencies.
Fix the error in the command to run a script using the lock file without updating it.
deno run --lock=[1] script.tsTo run a script using the lock file without updating it, use --lock=deno.lock but do not include --lock-write. The presence of --lock-write updates the lock file, which is not desired here.
Fill both blanks to import a remote module and ensure its integrity with a lock file.
import [1] from "https://deno.land/std@0.177.0/fs/[2].ts";
The correct function name is copyFile and the file name in the URL is copy_file.ts. This matches the Deno standard library naming.
Fill all three blanks to run a Deno script with a lock file, check integrity, and specify permissions.
deno run [1] [2] [3] script.ts
Use --lock=deno.lock to specify the lock file, --lock-only to check dependencies without running, and --allow-read to grant read permissions.
