mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 07:16:56 -05:00
fixes Deno.permissions.query({name:"imports"}) is not supported #27050
This commit is contained in:
parent
2a6ed4cde9
commit
d3e4150c88
3 changed files with 16 additions and 3 deletions
15
cli/tsc/dts/lib.deno.ns.d.ts
vendored
15
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -4042,6 +4042,18 @@ declare namespace Deno {
|
|||
variable?: string;
|
||||
}
|
||||
|
||||
/** Specifies if the import permission should be requested or revoked.
|
||||
* If set to "inherit" the current import permission will be inherited.
|
||||
* If set to true, the global import permission will be requested.
|
||||
* If set to false, the global import permission will be revoked.
|
||||
* If set to Array<string>, the import permissions will be requested with the specified domains.
|
||||
*
|
||||
* @category Permissions */
|
||||
export interface ImportPermissionDescriptor {
|
||||
name: "import";
|
||||
variable?: string;
|
||||
}
|
||||
|
||||
/** The permission descriptor for the `allow-sys` and `deny-sys` permissions, which controls
|
||||
* access to sensitive host system information, which malicious code might
|
||||
* attempt to exploit. The option `kind` allows scoping the permission to a
|
||||
|
@ -4096,7 +4108,8 @@ declare namespace Deno {
|
|||
| NetPermissionDescriptor
|
||||
| EnvPermissionDescriptor
|
||||
| SysPermissionDescriptor
|
||||
| FfiPermissionDescriptor;
|
||||
| FfiPermissionDescriptor
|
||||
| ImportPermissionDescriptor;
|
||||
|
||||
/** The interface which defines what event types are supported by
|
||||
* {@linkcode PermissionStatus} instances.
|
||||
|
|
|
@ -32,6 +32,5 @@ export const appendFile = fsPromises.appendFile;
|
|||
export const readFile = fsPromises.readFile;
|
||||
export const watch = fsPromises.watch;
|
||||
export const cp = fsPromises.cp;
|
||||
export const sync = fsPromises.sync;
|
||||
|
||||
export default fsPromises;
|
||||
|
|
|
@ -37,7 +37,7 @@ const illegalConstructorKey = Symbol("illegalConstructorKey");
|
|||
* @property {boolean} partial
|
||||
*/
|
||||
|
||||
/** @type {ReadonlyArray<"read" | "write" | "net" | "env" | "sys" | "run" | "ffi">} */
|
||||
/** @type {ReadonlyArray<"read" | "write" | "net" | "env" | "sys" | "run" | "ffi" | "import">} */
|
||||
const permissionNames = [
|
||||
"read",
|
||||
"write",
|
||||
|
@ -46,6 +46,7 @@ const permissionNames = [
|
|||
"sys",
|
||||
"run",
|
||||
"ffi",
|
||||
"import",
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue