diff options
-rw-r--r-- | cli/diagnostics.rs | 1 | ||||
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 14 | ||||
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 17 | ||||
-rw-r--r-- | runtime/ops/os.rs | 1 |
4 files changed, 14 insertions, 19 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs index c15832869..d947aaa2b 100644 --- a/cli/diagnostics.rs +++ b/cli/diagnostics.rs @@ -40,7 +40,6 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[ "createHttpClient", "futime", "futimeSync", - "hostname", "kill", "listen", "listenDatagram", diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index f3e6b1376..a9de9abe0 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -161,6 +161,20 @@ declare namespace Deno { */ export function memoryUsage(): MemoryUsage; + /** + * Get the `hostname` of the machine the Deno process is running on. + * + * ```ts + * console.log(Deno.hostname()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function hostname(): string; + /** Reflects the `NO_COLOR` environment variable at program start. * * See: https://no-color.org/ diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 54b328196..98cae94a4 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -942,23 +942,6 @@ declare namespace Deno { /** **UNSTABLE**: New API, yet to be vetted. * - * Get the `hostname` of the machine the Deno process is running on. - * - * ```ts - * console.log(Deno.hostname()); - * ``` - * - * Requires `allow-sys` permission. - * Additional consideration is still necessary around the permissions - * required. - * - * @tags allow-sys - * @category Runtime Environment - */ - export function hostname(): string; - - /** **UNSTABLE**: New API, yet to be vetted. - * * A custom HttpClient for use with `fetch`. * * ```ts diff --git a/runtime/ops/os.rs b/runtime/ops/os.rs index 0e51e3120..0c171d710 100644 --- a/runtime/ops/os.rs +++ b/runtime/ops/os.rs @@ -173,7 +173,6 @@ fn op_loadavg(state: &mut OpState) -> Result<(f64, f64, f64), AnyError> { #[op] fn op_hostname(state: &mut OpState) -> Result<String, AnyError> { - super::check_unstable(state, "Deno.hostname"); state .borrow_mut::<Permissions>() .sys |