summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/dts/lib.deno.ns.d.ts28
-rw-r--r--cli/dts/lib.deno.unstable.d.ts32
-rw-r--r--runtime/js/90_deno_ns.js4
-rw-r--r--runtime/ops/os/mod.rs4
4 files changed, 30 insertions, 38 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index 43c46754b..623f0d848 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -4950,4 +4950,32 @@ declare namespace Deno {
* @category Timers
*/
export function unrefTimer(id: number): void;
+
+ /**
+ * Returns the user id of the process on POSIX platforms. Returns null on Windows.
+ *
+ * ```ts
+ * console.log(Deno.uid());
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ *
+ * @tags allow-sys
+ * @category Runtime Environment
+ */
+ export function uid(): number | null;
+
+ /**
+ * Returns the group id of the process on POSIX platforms. Returns null on windows.
+ *
+ * ```ts
+ * console.log(Deno.gid());
+ * ```
+ *
+ * Requires `allow-sys` permission.
+ *
+ * @tags allow-sys
+ * @category Runtime Environment
+ */
+ export function gid(): number | null;
}
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 94fc0b5d6..ad3176804 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -271,38 +271,6 @@ declare namespace Deno {
/** **UNSTABLE**: New API, yet to be vetted.
*
- * Returns the user id of the Deno process on POSIX platforms. Returns `null`
- * on Windows.
- *
- * ```ts
- * console.log(Deno.uid());
- * ```
- *
- * Requires `allow-sys` permission.
- *
- * @tags allow-sys
- * @category Runtime Environment
- */
- export function uid(): number | null;
-
- /** **UNSTABLE**: New API, yet to be vetted.
- *
- * Returns the group id of the process on POSIX platforms. Returns `null` on
- * Windows.
- *
- * ```ts
- * console.log(Deno.gid());
- * ```
- *
- * Requires `allow-sys` permission.
- *
- * @tags allow-sys
- * @category Runtime Environment
- */
- export function gid(): number | null;
-
- /** **UNSTABLE**: New API, yet to be vetted.
- *
* All plain number types for interfacing with foreign functions.
*
* @category FFI
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index 8111698be..64653d469 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -124,12 +124,12 @@
systemMemoryInfo: __bootstrap.os.systemMemoryInfo,
networkInterfaces: __bootstrap.os.networkInterfaces,
consoleSize: __bootstrap.tty.consoleSize,
+ gid: __bootstrap.os.gid,
+ uid: __bootstrap.os.uid,
};
__bootstrap.denoNsUnstable = {
DiagnosticCategory: __bootstrap.diagnostics.DiagnosticCategory,
- gid: __bootstrap.os.gid,
- uid: __bootstrap.os.uid,
listenDatagram: __bootstrap.net.listenDatagram,
umask: __bootstrap.fs.umask,
HttpClient: __bootstrap.fetch.HttpClient,
diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs
index 1bc140d44..a46f5740a 100644
--- a/runtime/ops/os/mod.rs
+++ b/runtime/ops/os/mod.rs
@@ -255,7 +255,6 @@ fn op_system_memory_info(
#[cfg(not(windows))]
#[op]
fn op_gid(state: &mut OpState) -> Result<Option<u32>, AnyError> {
- super::check_unstable(state, "Deno.gid");
state
.borrow_mut::<Permissions>()
.sys
@@ -270,7 +269,6 @@ fn op_gid(state: &mut OpState) -> Result<Option<u32>, AnyError> {
#[cfg(windows)]
#[op]
fn op_gid(state: &mut OpState) -> Result<Option<u32>, AnyError> {
- super::check_unstable(state, "Deno.gid");
state
.borrow_mut::<Permissions>()
.sys
@@ -281,7 +279,6 @@ fn op_gid(state: &mut OpState) -> Result<Option<u32>, AnyError> {
#[cfg(not(windows))]
#[op]
fn op_uid(state: &mut OpState) -> Result<Option<u32>, AnyError> {
- super::check_unstable(state, "Deno.uid");
state
.borrow_mut::<Permissions>()
.sys
@@ -296,7 +293,6 @@ fn op_uid(state: &mut OpState) -> Result<Option<u32>, AnyError> {
#[cfg(windows)]
#[op]
fn op_uid(state: &mut OpState) -> Result<Option<u32>, AnyError> {
- super::check_unstable(state, "Deno.uid");
state
.borrow_mut::<Permissions>()
.sys