Skip to content

Commit

Permalink
docs: turn bare URLs into clickable links (denoland#15347)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlafeldt committed Jul 30, 2022
1 parent 9e91783 commit 3f0dcd3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
78 changes: 39 additions & 39 deletions cli/cdp.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

/// https://chromedevtools.github.io/devtools-protocol/tot/
/// <https://chromedevtools.github.io/devtools-protocol/tot/>
use deno_core::serde_json;
use deno_core::serde_json::Value;
use serde::Deserialize;
use serde::Deserializer;
use serde::Serialize;

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct AwaitPromiseArgs {
Expand All @@ -18,15 +18,15 @@ pub struct AwaitPromiseArgs {
pub generate_preview: Option<bool>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AwaitPromiseResponse {
pub result: RemoteObject,
pub exception_details: Option<ExceptionDetails>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CallFunctionOnArgs {
Expand All @@ -53,15 +53,15 @@ pub struct CallFunctionOnArgs {
pub throw_on_side_effect: Option<bool>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CallFunctionOnResponse {
pub result: RemoteObject,
pub exception_details: Option<ExceptionDetails>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CompileScriptArgs {
Expand All @@ -72,15 +72,15 @@ pub struct CompileScriptArgs {
pub execution_context_id: Option<ExecutionContextId>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CompileScriptResponse {
pub script_id: Option<ScriptId>,
pub exception_details: Option<ExceptionDetails>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct EvaluateArgs {
Expand Down Expand Up @@ -119,15 +119,15 @@ pub struct EvaluateArgs {
pub unique_context_id: Option<String>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EvaluateResponse {
pub result: RemoteObject,
pub exception_details: Option<ExceptionDetails>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getProperties
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getProperties>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GetPropertiesArgs {
Expand All @@ -142,7 +142,7 @@ pub struct GetPropertiesArgs {
pub non_indexed_properties_only: Option<bool>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getProperties
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getProperties>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GetPropertiesResponse {
Expand All @@ -152,22 +152,22 @@ pub struct GetPropertiesResponse {
pub exception_details: Option<ExceptionDetails>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GlobalLexicalScopeNamesArgs {
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_context_id: Option<ExecutionContextId>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GlobalLexicalScopeNamesResponse {
pub names: Vec<String>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-queryObjects
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-queryObjects>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct QueryObjectsArgs {
Expand All @@ -176,28 +176,28 @@ pub struct QueryObjectsArgs {
pub object_group: Option<String>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-queryObjects
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-queryObjects>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct QueryObjectsResponse {
pub objects: RemoteObject,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObject
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObject>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ReleaseObjectArgs {
pub object_id: RemoteObjectId,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObjectGroup
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObjectGroup>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ReleaseObjectGroupArgs {
pub object_group: String,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct RunScriptArgs {
Expand All @@ -221,15 +221,15 @@ pub struct RunScriptArgs {
pub await_promise: Option<bool>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RunScriptResponse {
pub result: RemoteObject,
pub exception_details: Option<ExceptionDetails>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-setAsyncCallStackDepth
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-setAsyncCallStackDepth>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SetAsyncCallStackDepthArgs {
Expand All @@ -238,7 +238,7 @@ pub struct SetAsyncCallStackDepthArgs {

// types

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RemoteObject {
Expand All @@ -265,7 +265,7 @@ where
Deserialize::deserialize(deserializer).map(Some)
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ObjectPreview
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ObjectPreview>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObjectPreview {
Expand All @@ -278,7 +278,7 @@ pub struct ObjectPreview {
pub entries: Option<Vec<EntryPreview>>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PropertyPreview
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PropertyPreview>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PropertyPreview {
Expand All @@ -290,23 +290,23 @@ pub struct PropertyPreview {
pub subtype: Option<String>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-EntryPreview
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-EntryPreview>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EntryPreview {
pub key: Option<ObjectPreview>,
pub value: ObjectPreview,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CustomPreview
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CustomPreview>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CustomPreview {
pub header: String,
pub body_getter_id: RemoteObjectId,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExceptionDetails
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExceptionDetails>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ExceptionDetails {
Expand All @@ -322,7 +322,7 @@ pub struct ExceptionDetails {
pub exception_meta_data: Option<serde_json::Map<String, Value>>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-StackTrace
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-StackTrace>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct StackTrace {
Expand All @@ -332,7 +332,7 @@ pub struct StackTrace {
pub parent_id: Option<StackTraceId>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallFrame
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallFrame>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CallFrame {
Expand All @@ -343,15 +343,15 @@ pub struct CallFrame {
pub column_number: u64,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-StackTraceId
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-StackTraceId>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct StackTraceId {
pub id: String,
pub debugger_id: Option<UniqueDebuggerId>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallArgument
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallArgument>
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct CallArgument {
Expand All @@ -373,7 +373,7 @@ impl From<&RemoteObject> for CallArgument {
}
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-InternalPropertyDescriptor
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-InternalPropertyDescriptor>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PropertyDescriptor {
Expand All @@ -389,15 +389,15 @@ pub struct PropertyDescriptor {
pub symbol: Option<RemoteObject>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-InternalPropertyDescriptor
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-InternalPropertyDescriptor>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct InternalPropertyDescriptor {
pub name: String,
pub value: Option<RemoteObject>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PrivatePropertyDescriptor
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PrivatePropertyDescriptor>
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PrivatePropertyDescriptor {
Expand All @@ -407,20 +407,20 @@ pub struct PrivatePropertyDescriptor {
pub set: Option<RemoteObject>,
}

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObjectId
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObjectId>
pub type RemoteObjectId = String;

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExecutionContextId
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExecutionContextId>
pub type ExecutionContextId = u64;

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ScriptId
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ScriptId>
pub type ScriptId = String;

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-TimeDelta
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-TimeDelta>
pub type TimeDelta = u64;

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UnserializableValue
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UnserializableValue>
pub type UnserializableValue = String;

/// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UniqueDebuggerId
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UniqueDebuggerId>
pub type UniqueDebuggerId = String;
2 changes: 1 addition & 1 deletion cli/http_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub type HeadersMap = HashMap<String, String>;
/// A structure used to determine if a entity in the http cache can be used.
///
/// This is heavily influenced by
/// https://github.com/kornelski/rusty-http-cache-semantics which is BSD
/// <https://github.com/kornelski/rusty-http-cache-semantics> which is BSD
/// 2-Clause Licensed and copyright Kornel Lesiński
pub struct CacheSemantics {
cache_control: CacheControl,
Expand Down

0 comments on commit 3f0dcd3

Please sign in to comment.