mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 16:19:12 -05:00
fix: remove leftover Deno.spawn references (#17524)
This commit is contained in:
parent
b71d224d11
commit
83642976bf
5 changed files with 9 additions and 81 deletions
|
@ -202,7 +202,7 @@ itest!(_044_bad_resource {
|
||||||
exit_code: 1,
|
exit_code: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
|
// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
|
||||||
itest!(_045_proxy {
|
itest!(_045_proxy {
|
||||||
args: "run -L debug --unstable --allow-net --allow-env --allow-run --allow-read --reload --quiet run/045_proxy_test.ts",
|
args: "run -L debug --unstable --allow-net --allow-env --allow-run --allow-read --reload --quiet run/045_proxy_test.ts",
|
||||||
output: "run/045_proxy_test.ts.out",
|
output: "run/045_proxy_test.ts.out",
|
||||||
|
@ -537,7 +537,7 @@ itest!(_088_dynamic_import_already_evaluating {
|
||||||
output: "run/088_dynamic_import_already_evaluating.ts.out",
|
output: "run/088_dynamic_import_already_evaluating.ts.out",
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
|
// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
|
||||||
itest!(_089_run_allow_list {
|
itest!(_089_run_allow_list {
|
||||||
args: "run --unstable --allow-run=curl run/089_run_allow_list.ts",
|
args: "run --unstable --allow-run=curl run/089_run_allow_list.ts",
|
||||||
output: "run/089_run_allow_list.ts.out",
|
output: "run/089_run_allow_list.ts.out",
|
||||||
|
@ -625,7 +625,7 @@ itest!(private_field_presence_no_check {
|
||||||
output: "run/private_field_presence.ts.out",
|
output: "run/private_field_presence.ts.out",
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
|
// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
|
||||||
itest!(lock_write_fetch {
|
itest!(lock_write_fetch {
|
||||||
args:
|
args:
|
||||||
"run --quiet --allow-read --allow-write --allow-env --allow-run --unstable run/lock_write_fetch/main.ts",
|
"run --quiet --allow-read --allow-write --allow-env --allow-run --unstable run/lock_write_fetch/main.ts",
|
||||||
|
@ -1916,7 +1916,7 @@ fn dont_cache_on_check_fail() {
|
||||||
mod permissions {
|
mod permissions {
|
||||||
use test_util as util;
|
use test_util as util;
|
||||||
|
|
||||||
// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
|
// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
|
||||||
#[test]
|
#[test]
|
||||||
fn with_allow() {
|
fn with_allow() {
|
||||||
for permission in &util::PERMISSION_VARIANTS {
|
for permission in &util::PERMISSION_VARIANTS {
|
||||||
|
@ -1935,7 +1935,7 @@ mod permissions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
|
// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
|
||||||
#[test]
|
#[test]
|
||||||
fn without_allow() {
|
fn without_allow() {
|
||||||
for permission in &util::PERMISSION_VARIANTS {
|
for permission in &util::PERMISSION_VARIANTS {
|
||||||
|
|
|
@ -29,12 +29,8 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[
|
||||||
"removeSignalListener",
|
"removeSignalListener",
|
||||||
"shutdown",
|
"shutdown",
|
||||||
"umask",
|
"umask",
|
||||||
"spawnChild",
|
|
||||||
"Child",
|
"Child",
|
||||||
"ChildProcess",
|
"ChildProcess",
|
||||||
"spawn",
|
|
||||||
"spawnSync",
|
|
||||||
"SpawnOptions",
|
|
||||||
"ChildStatus",
|
"ChildStatus",
|
||||||
"SpawnOutput",
|
"SpawnOutput",
|
||||||
"command",
|
"command",
|
||||||
|
|
67
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
67
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -1407,71 +1407,6 @@ declare namespace Deno {
|
||||||
*/
|
*/
|
||||||
export function upgradeHttpRaw(request: Request): [Deno.Conn, Uint8Array];
|
export function upgradeHttpRaw(request: Request): [Deno.Conn, Uint8Array];
|
||||||
|
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
|
||||||
*
|
|
||||||
* @deprecated Use the Deno.Command API instead.
|
|
||||||
*
|
|
||||||
* Options which can be set when calling {@linkcode Deno.spawn},
|
|
||||||
* {@linkcode Deno.spawnSync}, and {@linkcode Deno.spawnChild}.
|
|
||||||
*
|
|
||||||
* @category Sub Process
|
|
||||||
*/
|
|
||||||
export interface SpawnOptions {
|
|
||||||
/** Arguments to pass to the process. */
|
|
||||||
args?: string[];
|
|
||||||
/**
|
|
||||||
* The working directory of the process.
|
|
||||||
*
|
|
||||||
* If not specified, the `cwd` of the parent process is used.
|
|
||||||
*/
|
|
||||||
cwd?: string | URL;
|
|
||||||
/**
|
|
||||||
* Clear environmental variables from parent process.
|
|
||||||
*
|
|
||||||
* Doesn't guarantee that only `env` variables are present, as the OS may
|
|
||||||
* set environmental variables for processes.
|
|
||||||
*
|
|
||||||
* @default {false}
|
|
||||||
*/
|
|
||||||
clearEnv?: boolean;
|
|
||||||
/** Environmental variables to pass to the subprocess. */
|
|
||||||
env?: Record<string, string>;
|
|
||||||
/**
|
|
||||||
* Sets the child process’s user ID. This translates to a setuid call in the
|
|
||||||
* child process. Failure in the set uid call will cause the spawn to fail.
|
|
||||||
*/
|
|
||||||
uid?: number;
|
|
||||||
/** Similar to `uid`, but sets the group ID of the child process. */
|
|
||||||
gid?: number;
|
|
||||||
/**
|
|
||||||
* An {@linkcode AbortSignal} that allows closing the process using the
|
|
||||||
* corresponding {@linkcode AbortController} by sending the process a
|
|
||||||
* SIGTERM signal.
|
|
||||||
*
|
|
||||||
* Not supported in {@linkcode Deno.spawnSync}.
|
|
||||||
*/
|
|
||||||
signal?: AbortSignal;
|
|
||||||
|
|
||||||
/** How `stdin` of the spawned process should be handled.
|
|
||||||
*
|
|
||||||
* Defaults to `"null"`. */
|
|
||||||
stdin?: "piped" | "inherit" | "null";
|
|
||||||
/** How `stdout` of the spawned process should be handled.
|
|
||||||
*
|
|
||||||
* Defaults to `"piped". */
|
|
||||||
stdout?: "piped" | "inherit" | "null";
|
|
||||||
/** How `stderr` of the spawned process should be handled.
|
|
||||||
*
|
|
||||||
* Defaults to `"piped"`. */
|
|
||||||
stderr?: "piped" | "inherit" | "null";
|
|
||||||
|
|
||||||
/** Skips quoting and escaping of the arguments on windows. This option
|
|
||||||
* is ignored on non-windows platforms.
|
|
||||||
*
|
|
||||||
* @default {false} */
|
|
||||||
windowsRawArguments?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
/** **UNSTABLE**: New API, yet to be vetted.
|
||||||
*
|
*
|
||||||
* Create a child process.
|
* Create a child process.
|
||||||
|
@ -1634,7 +1569,7 @@ declare namespace Deno {
|
||||||
* corresponding {@linkcode AbortController} by sending the process a
|
* corresponding {@linkcode AbortController} by sending the process a
|
||||||
* SIGTERM signal.
|
* SIGTERM signal.
|
||||||
*
|
*
|
||||||
* Not supported in {@linkcode Deno.spawnSync}.
|
* Not supported in {@linkcode Deno.Command.outputSync}.
|
||||||
*/
|
*/
|
||||||
signal?: AbortSignal;
|
signal?: AbortSignal;
|
||||||
|
|
||||||
|
|
|
@ -146,9 +146,6 @@
|
||||||
funlockSync: __bootstrap.fs.funlockSync,
|
funlockSync: __bootstrap.fs.funlockSync,
|
||||||
Child: __bootstrap.spawn.Child,
|
Child: __bootstrap.spawn.Child,
|
||||||
ChildProcess: __bootstrap.spawn.ChildProcess,
|
ChildProcess: __bootstrap.spawn.ChildProcess,
|
||||||
spawnChild: __bootstrap.spawn.spawnChild,
|
|
||||||
spawn: __bootstrap.spawn.spawn,
|
|
||||||
spawnSync: __bootstrap.spawn.spawnSync,
|
|
||||||
Command: __bootstrap.spawn.Command,
|
Command: __bootstrap.spawn.Command,
|
||||||
serve: __bootstrap.flash.serve,
|
serve: __bootstrap.flash.serve,
|
||||||
upgradeHttp: __bootstrap.http.upgradeHttp,
|
upgradeHttp: __bootstrap.http.upgradeHttp,
|
||||||
|
|
|
@ -193,7 +193,7 @@ fn create_command(
|
||||||
args: SpawnArgs,
|
args: SpawnArgs,
|
||||||
api_name: &str,
|
api_name: &str,
|
||||||
) -> Result<std::process::Command, AnyError> {
|
) -> Result<std::process::Command, AnyError> {
|
||||||
super::check_unstable(state, "Deno.spawn");
|
super::check_unstable(state, "Deno.Command");
|
||||||
state
|
state
|
||||||
.borrow_mut::<PermissionsContainer>()
|
.borrow_mut::<PermissionsContainer>()
|
||||||
.check_run(&args.cmd, api_name)?;
|
.check_run(&args.cmd, api_name)?;
|
||||||
|
@ -223,12 +223,12 @@ fn create_command(
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
if let Some(gid) = args.gid {
|
if let Some(gid) = args.gid {
|
||||||
super::check_unstable(state, "Deno.spawn.gid");
|
super::check_unstable(state, "Deno.CommandOptions.gid");
|
||||||
command.gid(gid);
|
command.gid(gid);
|
||||||
}
|
}
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
if let Some(uid) = args.uid {
|
if let Some(uid) = args.uid {
|
||||||
super::check_unstable(state, "Deno.spawn.uid");
|
super::check_unstable(state, "Deno.CommandOptions.uid");
|
||||||
command.uid(uid);
|
command.uid(uid);
|
||||||
}
|
}
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
|
Loading…
Reference in a new issue