summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml6
-rw-r--r--cli/dts/lib.deno.ns.d.ts18
-rw-r--r--cli/dts/lib.deno.shared_globals.d.ts4
-rw-r--r--cli/dts/lib.deno.unstable.d.ts254
4 files changed, 139 insertions, 143 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index df493950a..25967eb4e 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -56,9 +56,9 @@ byteorder = "1.4.3"
clap = "2.33.3"
data-url = "0.1.0"
dissimilar = "1.0.2"
-dprint-plugin-json = "0.12.3"
-dprint-plugin-markdown = "0.9.6"
-dprint-plugin-typescript = "0.53.0"
+dprint-plugin-json = "0.13.0"
+dprint-plugin-markdown = "0.10.0"
+dprint-plugin-typescript = "0.54.0"
encoding_rs = "0.8.28"
env_logger = "0.8.4"
fancy-regex = "0.7.1"
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index 5e013466b..6a5b73112 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -54,7 +54,7 @@ declare interface PerformanceMeasureOptions {
detail?: any;
/** Timestamp to be used as the start time or string to be used as start
- * mark.*/
+ * mark. */
start?: string | number;
/** Duration between the start and end times. */
@@ -121,7 +121,7 @@ declare namespace Deno {
* `only` set to true and fail the test suite. */
only?: boolean;
/** Check that the number of async completed ops after the test is the same
- * as number of dispatched ops. Defaults to true.*/
+ * as number of dispatched ops. Defaults to true. */
sanitizeOps?: boolean;
/** Ensure the test case does not "leak" resources - ie. the resource table
* after the test has exactly the same contents as before the test. Defaults
@@ -183,7 +183,7 @@ declare namespace Deno {
* assertEquals(decoder.decode(data), "Hello world");
* });
* ```
- * */
+ */
export function test(name: string, fn: () => void | Promise<void>): void;
/** Exit the Deno process with optional exit code. If no exit code is supplied
@@ -295,7 +295,6 @@ declare namespace Deno {
export function linkSync(oldpath: string, newpath: string): void;
/**
- *
* Creates `newpath` as a hard link to `oldpath`.
*
* ```ts
@@ -866,7 +865,7 @@ declare namespace Deno {
* any write calls on it will overwrite its contents, by default without
* truncating it. */
write?: boolean;
- /**Sets the option for the append mode. This option, when `true`, means that
+ /** Sets the option for the append mode. This option, when `true`, means that
* writes will append to a file instead of overwriting previous contents.
* Note that setting `{ write: true, append: true }` has the same effect as
* setting only `{ append: true }`. */
@@ -901,7 +900,6 @@ declare namespace Deno {
}
/**
- *
* Check if a given resource id (`rid`) is a TTY.
*
* ```ts
@@ -1536,7 +1534,7 @@ declare namespace Deno {
*
* Requires `allow-read` permission for the target path.
* Also requires `allow-read` permission for the CWD if the target path is
- * relative.*/
+ * relative. */
export function realPathSync(path: string | URL): string;
/** Resolves to the absolute normalized path, with symbolic links resolved.
@@ -1552,7 +1550,7 @@ declare namespace Deno {
*
* Requires `allow-read` permission for the target path.
* Also requires `allow-read` permission for the CWD if the target path is
- * relative.*/
+ * relative. */
export function realPath(path: string | URL): Promise<string>;
export interface DirEntry {
@@ -1914,7 +1912,7 @@ declare namespace Deno {
* console.log(">>>> event", event);
* // { kind: "create", paths: [ "/foo.txt" ] }
* }
- *```
+ * ```
*
* Requires `allow-read` permission.
*
@@ -1968,7 +1966,7 @@ declare namespace Deno {
* ]);
* p.close();
* ```
- **/
+ */
status(): Promise<ProcessStatus>;
/** Buffer the stdout until EOF and return it as `Uint8Array`.
*
diff --git a/cli/dts/lib.deno.shared_globals.d.ts b/cli/dts/lib.deno.shared_globals.d.ts
index 26e3d1d5b..b550173d8 100644
--- a/cli/dts/lib.deno.shared_globals.d.ts
+++ b/cli/dts/lib.deno.shared_globals.d.ts
@@ -111,7 +111,7 @@ declare namespace WebAssembly {
/**
* Given a `Module` and string, returns a copy of the contents of all custom sections in the
* module with the given string name.
- * */
+ */
static customSections(
moduleObject: Module,
sectionName: string,
@@ -494,7 +494,7 @@ declare interface PerformanceMeasureOptions {
detail?: any;
/** Timestamp to be used as the start time or string to be used as start
- * mark.*/
+ * mark. */
start?: string | number;
/** Duration between the start and end times. */
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index 3ee628a8b..d991196cb 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -64,7 +64,6 @@ declare namespace Deno {
* ```
*
* Requires `allow-env` permission.
- *
*/
export function osRelease(): string;
@@ -80,7 +79,6 @@ declare namespace Deno {
* ```
*
* Requires `allow-env` permission.
- *
*/
export function systemMemoryInfo(): SystemMemoryInfo;
@@ -958,137 +956,137 @@ declare namespace Deno {
* Set this to "none" to revoke all permissions.
*
* Defaults to "inherit".
- */
+ */
permissions?: "inherit" | "none" | {
/** Specifies if the `net` permission should be requested or revoked.
- * If set to `"inherit"`, the current `env` permission will be inherited.
- * If set to `true`, the global `net` permission will be requested.
- * If set to `false`, the global `net` permission will be revoked.
- *
- * Defaults to "inherit".
- */
+ * If set to `"inherit"`, the current `env` permission will be inherited.
+ * If set to `true`, the global `net` permission will be requested.
+ * If set to `false`, the global `net` permission will be revoked.
+ *
+ * Defaults to "inherit".
+ */
env?: "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.
- * If set to `false`, the global `hrtime` permission will be revoked.
- *
- * Defaults to "inherit".
- */
+ * If set to `"inherit"`, the current `hrtime` permission will be inherited.
+ * If set to `true`, the global `hrtime` permission will be requested.
+ * If set to `false`, the global `hrtime` permission will be revoked.
+ *
+ * Defaults to "inherit".
+ */
hrtime?: "inherit" | boolean;
/** Specifies if the `net` permission should be requested or revoked.
- * if set to `"inherit"`, the current `net` permission will be inherited.
- * if set to `true`, the global `net` permission will be requested.
- * if set to `false`, the global `net` permission will be revoked.
- * if set to `string[]`, the `net` permission will be requested with the
- * specified host strings with the format `"<host>[:<port>]`.
- *
- * Defaults to "inherit".
- *
- * Examples:
- *
- * ```ts
- * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
- *
- * Deno.test({
- * name: "inherit",
- * permissions: {
- * net: "inherit",
- * },
- * async fn() {
- * const status = await Deno.permissions.query({ name: "net" })
- * assertEquals(status.state, "granted");
- * },
- * });
- * ```
- *
- * ```ts
- * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
- *
- * Deno.test({
- * name: "true",
- * permissions: {
- * net: true,
- * },
- * async fn() {
- * const status = await Deno.permissions.query({ name: "net" });
- * assertEquals(status.state, "granted");
- * },
- * });
- * ```
- *
- * ```ts
- * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
- *
- * Deno.test({
- * name: "false",
- * permissions: {
- * net: false,
- * },
- * async fn() {
- * const status = await Deno.permissions.query({ name: "net" });
- * assertEquals(status.state, "denied");
- * },
- * });
- * ```
- *
- * ```ts
- * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
- *
- * Deno.test({
- * name: "localhost:8080",
- * permissions: {
- * net: ["localhost:8080"],
- * },
- * async fn() {
- * const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" });
- * assertEquals(status.state, "granted");
- * },
- * });
- * ```
- */
+ * if set to `"inherit"`, the current `net` permission will be inherited.
+ * if set to `true`, the global `net` permission will be requested.
+ * if set to `false`, the global `net` permission will be revoked.
+ * if set to `string[]`, the `net` permission will be requested with the
+ * specified host strings with the format `"<host>[:<port>]`.
+ *
+ * Defaults to "inherit".
+ *
+ * Examples:
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "inherit",
+ * permissions: {
+ * net: "inherit",
+ * },
+ * async fn() {
+ * const status = await Deno.permissions.query({ name: "net" })
+ * assertEquals(status.state, "granted");
+ * },
+ * });
+ * ```
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "true",
+ * permissions: {
+ * net: true,
+ * },
+ * async fn() {
+ * const status = await Deno.permissions.query({ name: "net" });
+ * assertEquals(status.state, "granted");
+ * },
+ * });
+ * ```
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "false",
+ * permissions: {
+ * net: false,
+ * },
+ * async fn() {
+ * const status = await Deno.permissions.query({ name: "net" });
+ * assertEquals(status.state, "denied");
+ * },
+ * });
+ * ```
+ *
+ * ```ts
+ * import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "localhost:8080",
+ * permissions: {
+ * net: ["localhost:8080"],
+ * },
+ * async fn() {
+ * const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" });
+ * assertEquals(status.state, "granted");
+ * },
+ * });
+ * ```
+ */
net?: "inherit" | boolean | string[];
/** Specifies if the `ffi` permission should be requested or revoked.
- * If set to `"inherit"`, the current `ffi` permission will be inherited.
- * If set to `true`, the global `ffi` permission will be requested.
- * If set to `false`, the global `ffi` permission will be revoked.
- *
- * Defaults to "inherit".
- */
+ * If set to `"inherit"`, the current `ffi` permission will be inherited.
+ * If set to `true`, the global `ffi` permission will be requested.
+ * If set to `false`, the global `ffi` permission will be revoked.
+ *
+ * Defaults to "inherit".
+ */
ffi?: "inherit" | boolean;
/** Specifies if the `read` permission should be requested or revoked.
- * If set to `"inherit"`, the current `read` permission will be inherited.
- * If set to `true`, the global `read` permission will be requested.
- * If set to `false`, the global `read` permission will be revoked.
- * If set to `Array<string | URL>`, the `read` permission will be requested with the
- * specified file paths.
- *
- * Defaults to "inherit".
- */
+ * If set to `"inherit"`, the current `read` permission will be inherited.
+ * If set to `true`, the global `read` permission will be requested.
+ * If set to `false`, the global `read` permission will be revoked.
+ * If set to `Array<string | URL>`, the `read` permission will be requested with the
+ * specified file paths.
+ *
+ * Defaults to "inherit".
+ */
read?: "inherit" | boolean | Array<string | URL>;
/** Specifies if the `run` permission should be requested or revoked.
- * If set to `"inherit"`, the current `run` permission will be inherited.
- * If set to `true`, the global `run` permission will be requested.
- * If set to `false`, the global `run` permission will be revoked.
- *
- * Defaults to "inherit".
- */
+ * If set to `"inherit"`, the current `run` permission will be inherited.
+ * If set to `true`, the global `run` permission will be requested.
+ * If set to `false`, the global `run` permission will be revoked.
+ *
+ * Defaults to "inherit".
+ */
run?: "inherit" | boolean | Array<string | URL>;
/** Specifies if the `write` permission should be requested or revoked.
- * If set to `"inherit"`, the current `write` permission will be inherited.
- * If set to `true`, the global `write` permission will be requested.
- * If set to `false`, the global `write` permission will be revoked.
- * If set to `Array<string | URL>`, the `write` permission will be requested with the
- * specified file paths.
- *
- * Defaults to "inherit".
- */
+ * If set to `"inherit"`, the current `write` permission will be inherited.
+ * If set to `true`, the global `write` permission will be requested.
+ * If set to `false`, the global `write` permission will be revoked.
+ * If set to `Array<string | URL>`, the `write` permission will be requested with the
+ * specified file paths.
+ *
+ * Defaults to "inherit".
+ */
write?: "inherit" | boolean | Array<string | URL>;
};
}
@@ -1335,27 +1333,27 @@ declare namespace Deno {
}
/** **UNSTABLE** New API, yet to be vetted.
- *
- * Create a TLS connection with an attached client certificate.
- *
- * ```ts
- * const conn = await Deno.connectTls({
- * hostname: "deno.land",
- * port: 443,
- * certChain: "---- BEGIN CERTIFICATE ----\n ...",
- * privateKey: "---- BEGIN PRIVATE KEY ----\n ...",
- * });
- * ```
- *
- * Requires `allow-net` permission.
- */
+ *
+ * Create a TLS connection with an attached client certificate.
+ *
+ * ```ts
+ * const conn = await Deno.connectTls({
+ * hostname: "deno.land",
+ * port: 443,
+ * certChain: "---- BEGIN CERTIFICATE ----\n ...",
+ * privateKey: "---- BEGIN PRIVATE KEY ----\n ...",
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ */
export function connectTls(
options: ConnectTlsOptions & ConnectTlsClientCertOptions,
): Promise<Conn>;
export interface StartTlsOptions {
/** A literal IP address or host name that can be resolved to an IP address.
- * If not specified, defaults to `127.0.0.1`. */
+ * If not specified, defaults to `127.0.0.1`. */
hostname?: string;
/** Server certificate file. */
certFile?: string;