@octokit/core
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -10,3 +10,3 @@ 'use strict'; | ||
const VERSION = "1.4.0"; | ||
const VERSION = "1.5.0"; | ||
@@ -13,0 +13,0 @@ function withAuthorizationPrefix(authorization) { |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "1.4.0"; | ||
export const VERSION = "1.5.0"; |
@@ -9,3 +9,3 @@ import { HookCollection } from "before-after-hook"; | ||
[key: string]: any; | ||
request: import("@octokit/request/dist-types/types").request; | ||
request: import("@octokit/types").RequestInterface; | ||
graphql: import("@octokit/graphql/dist-types/types").graphql; | ||
@@ -26,3 +26,3 @@ log: { | ||
[key: string]: any; | ||
request: import("@octokit/request/dist-types/types").request; | ||
request: import("@octokit/types").RequestInterface; | ||
graphql: import("@octokit/graphql/dist-types/types").graphql; | ||
@@ -47,3 +47,3 @@ log: { | ||
[key: string]: any; | ||
request: import("@octokit/request/dist-types/types").request; | ||
request: import("@octokit/types").RequestInterface; | ||
graphql: import("@octokit/graphql/dist-types/types").graphql; | ||
@@ -63,3 +63,3 @@ log: { | ||
[key: string]: any; | ||
request: import("@octokit/request/dist-types/types").request; | ||
request: import("@octokit/types").RequestInterface; | ||
graphql: import("@octokit/graphql/dist-types/types").graphql; | ||
@@ -66,0 +66,0 @@ log: { |
@@ -1,106 +0,10 @@ | ||
/// <reference types="node" /> | ||
import { Agent } from "http"; | ||
import { request as Request } from "@octokit/request"; | ||
import * as OctokitTypes from "@octokit/types"; | ||
import { Octokit } from "."; | ||
export declare type RequestParameters = OctokitTypes.RequestParameters; | ||
export declare type OctokitOptions = { | ||
auth?: string | AutenticationHook; | ||
request?: OctokitRequestOptions; | ||
auth?: string | OctokitTypes.AuthInterface; | ||
request?: OctokitTypes.RequestRequestOptions; | ||
timeZone?: string; | ||
[option: string]: any; | ||
}; | ||
interface AutenticationHook { | ||
(options?: any): any; | ||
hook: (request: typeof Request, options: Endpoint) => ReturnType<typeof Request>; | ||
} | ||
export declare type Plugin = (octokit: Octokit, options: OctokitOptions) => void; | ||
/** | ||
* Endpoint parameters | ||
*/ | ||
export declare type Parameters = { | ||
/** | ||
* Base URL to be used when a relative URL is passed, such as `/orgs/:org`. | ||
* If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request | ||
* will be sent to `https://enterprise.acme-inc.com/api/v3/orgs/:org`. | ||
*/ | ||
baseUrl?: string; | ||
/** | ||
* HTTP headers. Use lowercase keys. | ||
*/ | ||
headers?: RequestHeaders; | ||
/** | ||
* Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} | ||
*/ | ||
mediaType?: { | ||
/** | ||
* `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint | ||
*/ | ||
format?: string; | ||
/** | ||
* Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix. | ||
* Example for single preview: `['squirrel-girl']`. | ||
* Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. | ||
*/ | ||
previews?: string[]; | ||
}; | ||
/** | ||
* Pass custom meta information for the request. The `request` object will be returned as is. | ||
*/ | ||
request?: OctokitRequestOptions; | ||
/** | ||
* Any additional parameter will be passed as follows | ||
* 1. URL parameter if `':parameter'` or `{parameter}` is part of `url` | ||
* 2. Query parameter if `method` is `'GET'` or `'HEAD'` | ||
* 3. Request body if `parameter` is `'data'` | ||
* 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'` | ||
*/ | ||
[parameter: string]: any; | ||
}; | ||
/** | ||
* Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` | ||
*/ | ||
export declare type Url = string; | ||
/** | ||
* Request method | ||
*/ | ||
export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; | ||
export declare type Endpoint = Parameters & { | ||
method: Method; | ||
url: Url; | ||
}; | ||
export declare type RequestHeaders = { | ||
/** | ||
* Avoid setting `accept`, use `mediaFormat.{format|previews}` instead. | ||
*/ | ||
accept?: string; | ||
/** | ||
* Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` | ||
*/ | ||
authorization?: string; | ||
/** | ||
* `user-agent` is set do a default and can be overwritten as needed. | ||
*/ | ||
"user-agent"?: string; | ||
[header: string]: string | number | undefined; | ||
}; | ||
export declare type Fetch = any; | ||
export declare type Signal = any; | ||
export declare type OctokitRequestOptions = { | ||
/** | ||
* Node only. Useful for custom proxy, certificate, or dns lookup. | ||
*/ | ||
agent?: Agent; | ||
/** | ||
* Custom replacement for built-in fetch method. Useful for testing or request hooks. | ||
*/ | ||
fetch?: Fetch; | ||
/** | ||
* Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. | ||
*/ | ||
signal?: Signal; | ||
/** | ||
* Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead. | ||
*/ | ||
timeout?: number; | ||
[option: string]: any; | ||
}; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "1.4.0"; | ||
export declare const VERSION = "1.5.0"; |
@@ -6,3 +6,3 @@ import { getUserAgent } from 'universal-user-agent'; | ||
const VERSION = "1.4.0"; | ||
const VERSION = "1.5.0"; | ||
@@ -9,0 +9,0 @@ function withAuthorizationPrefix(authorization) { |
{ | ||
"name": "@octokit/core", | ||
"description": "Extendable client for GitHub's REST & GraphQL APIs", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"license": "MIT", | ||
@@ -21,4 +21,5 @@ "files": [ | ||
"dependencies": { | ||
"@octokit/graphql": "^4.2.0", | ||
"@octokit/request": "^5.1.0", | ||
"@octokit/graphql": "^4.3.0", | ||
"@octokit/request": "^5.3.0", | ||
"@octokit/types": "^1.1.0", | ||
"before-after-hook": "^2.1.0", | ||
@@ -55,3 +56,3 @@ "universal-user-agent": "^4.0.0" | ||
"main": "dist-node/index.js", | ||
"deno": "dist-web/index.js" | ||
"module": "dist-web/index.js" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39931
5
365
+ Added@octokit/types@^1.1.0
+ Added@octokit/types@1.1.0(transitive)
+ Added@types/node@12.20.55(transitive)
Updated@octokit/graphql@^4.3.0
Updated@octokit/request@^5.3.0