diff options
Diffstat (limited to 'cli/dts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 24 | ||||
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 28 |
2 files changed, 38 insertions, 14 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 97d3fed04..095ae139a 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -183,6 +183,15 @@ declare namespace Deno { */ env?: "inherit" | boolean | string[]; + /** Specifies if the `sys` permission should be requested or revoked. + * If set to `"inherit"`, the current `sys` permission will be inherited. + * If set to `true`, the global `sys` permission will be requested. + * If set to `false`, the global `sys` permission will be revoked. + * + * Defaults to `false`. + */ + sys?: "inherit" | boolean | string[]; + /** Specifies if the `hrtime` permission should be requested or revoked. * If set to `"inherit"`, the current `hrtime` permission will be inherited. * If set to `true`, the global `hrtime` permission will be requested. @@ -2913,6 +2922,7 @@ declare namespace Deno { | "write" | "net" | "env" + | "sys" | "ffi" | "hrtime"; @@ -2958,6 +2968,19 @@ declare namespace Deno { } /** @category Permissions */ + export interface SysPermissionDescriptor { + name: "sys"; + kind?: + | "loadavg" + | "hostname" + | "systemMemoryInfo" + | "networkInterfaces" + | "osRelease" + | "getUid" + | "getGid"; + } + + /** @category Permissions */ export interface FfiPermissionDescriptor { name: "ffi"; path?: string | URL; @@ -2979,6 +3002,7 @@ declare namespace Deno { | WritePermissionDescriptor | NetPermissionDescriptor | EnvPermissionDescriptor + | SysPermissionDescriptor | FfiPermissionDescriptor | HrtimePermissionDescriptor; diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index ec87fa9ca..6cb062396 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -255,11 +255,11 @@ declare namespace Deno { * console.log(Deno.loadavg()); // e.g. [ 0.71, 0.44, 0.44 ] * ``` * - * Requires `allow-env` permission. + * Requires `allow-sys` permission. * There are questions around which permission this needs. And maybe should be * renamed (loadAverage?). * - * @tags allow-env + * @tags allow-sys * @category Observability */ export function loadavg(): number[]; @@ -272,11 +272,11 @@ declare namespace Deno { * console.log(Deno.osRelease()); * ``` * - * Requires `allow-env` permission. + * Requires `allow-sys` permission. * Under consideration to possibly move to Deno.build or Deno.versions and if * it should depend sys-info, which may not be desirable. * - * @tags allow-env + * @tags allow-sys * @category Runtime Environment */ export function osRelease(): string; @@ -292,9 +292,9 @@ declare namespace Deno { * console.log(Deno.systemMemoryInfo()); * ``` * - * Requires `allow-env` permission. + * Requires `allow-sys` permission. * - * @tags allow-env + * @tags allow-sys * @category Runtime Environment */ export function systemMemoryInfo(): SystemMemoryInfo; @@ -355,9 +355,9 @@ declare namespace Deno { * console.log(Deno.networkInterfaces()); * ``` * - * Requires `allow-env` permission. + * Requires `allow-sys` permission. * - * @tags allow-env + * @tags allow-sys * @category Network */ export function networkInterfaces(): NetworkInterfaceInfo[]; @@ -370,9 +370,9 @@ declare namespace Deno { * console.log(Deno.getUid()); * ``` * - * Requires `allow-env` permission. + * Requires `allow-sys` permission. * - * @tags allow-env + * @tags allow-sys * @category Runtime Environment */ export function getUid(): number | null; @@ -385,9 +385,9 @@ declare namespace Deno { * console.log(Deno.getGid()); * ``` * - * Requires `allow-env` permission. + * Requires `allow-sys` permission. * - * @tags allow-env + * @tags allow-sys * @category Runtime Environment */ export function getGid(): number | null; @@ -980,11 +980,11 @@ declare namespace Deno { * console.log(Deno.hostname()); * ``` * - * Requires `allow-env` permission. + * Requires `allow-sys` permission. * Additional consideration is still necessary around the permissions * required. * - * @tags allow-env + * @tags allow-sys * @category Runtime Environment */ export function hostname(): string; |