Skip to content

Commit

Permalink
update to electron@3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jan 25, 2019
1 parent 5ac435e commit 6089c69
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
target "3.1.0"
target "3.1.2"
runtime "electron"
6 changes: 3 additions & 3 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"git": {
"name": "libchromiumcontent",
"repositoryUrl": "https://github.com/electron/libchromiumcontent",
"commitHash": "29e02cd4c37777734f97d00b5a538d7c7acfa67a"
"commitHash": "7ea271f92018b1eeb8e70ec6de8c29f9758a0c05"
}
},
"isOnlyProductionDependency": true,
Expand All @@ -73,12 +73,12 @@
"git": {
"name": "electron",
"repositoryUrl": "https://github.com/electron/electron",
"commitHash": "4913fc81d1dab21f4b15c4cb682a218072447fed"
"commitHash": "bb28fa8e8e797db249a66405146ad0501eaf411a"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "3.1.0"
"version": "3.1.2"
},
{
"component": {
Expand Down
57 changes: 51 additions & 6 deletions src/typings/electron.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for Electron 3.1.0
// Type definitions for Electron 3.1.2
// Project: http://electronjs.org/
// Definitions by: The Electron Team <https://github.com/electron/electron>
// Definitions: https://github.com/electron/electron-typescript-definitions
Expand Down Expand Up @@ -2794,7 +2794,9 @@ declare namespace Electron {
* registered shortcut is pressed by the user. When the accelerator is already
* taken by other applications, this call will silently fail. This behavior is
* intended by operating systems, since they don't want applications to fight for
* global shortcuts.
* global shortcuts. The following accelerators will not be registered successfully
* on macOS 10.14 Mojave unless the app has been authorized as a trusted
* accessibility client:
*/
register(accelerator: Accelerator, callback: Function): void;
/**
Expand Down Expand Up @@ -6307,14 +6309,14 @@ declare namespace Electron {
* connection is made to the server, but before any http data is sent. The callback
* has to be called with an response object.
*/
onBeforeSendHeaders(filter: OnBeforeSendHeadersFilter, listener: Function): void;
onBeforeSendHeaders(filter: OnBeforeSendHeadersFilter, listener: (details: OnBeforeSendHeadersDetails, callback: (response: OnBeforeSendHeadersResponse) => void) => void): void;
/**
* The listener will be called with listener(details, callback) before sending an
* HTTP request, once the request headers are available. This may occur after a TCP
* connection is made to the server, but before any http data is sent. The callback
* has to be called with an response object.
*/
onBeforeSendHeaders(listener: Function): void;
onBeforeSendHeaders(listener: (details: OnBeforeSendHeadersDetails, callback: (response: OnBeforeSendHeadersResponse) => void) => void): void;
/**
* The listener will be called with listener(details) when a request is completed.
*/
Expand All @@ -6336,13 +6338,13 @@ declare namespace Electron {
* headers of a request have been received. The callback has to be called with an
* response object.
*/
onHeadersReceived(filter: OnHeadersReceivedFilter, listener: Function): void;
onHeadersReceived(filter: OnHeadersReceivedFilter, listener: (details: OnHeadersReceivedDetails, callback: (response: OnHeadersReceivedResponse) => void) => void): void;
/**
* The listener will be called with listener(details, callback) when HTTP response
* headers of a request have been received. The callback has to be called with an
* response object.
*/
onHeadersReceived(listener: Function): void;
onHeadersReceived(listener: (details: OnHeadersReceivedDetails, callback: (response: OnHeadersReceivedResponse) => void) => void): void;
/**
* The listener will be called with listener(details) when first byte of the
* response body is received. For HTTP requests, this means that the status line
Expand Down Expand Up @@ -8054,6 +8056,16 @@ declare namespace Electron {
urls: string[];
}

interface OnBeforeSendHeadersDetails {
id: number;
url: string;
method: string;
webContentsId?: number;
resourceType: string;
timestamp: number;
requestHeaders: RequestHeaders;
}

interface OnBeforeSendHeadersFilter {
/**
* Array of URL patterns that will be used to filter out the requests that do not
Expand All @@ -8062,6 +8074,14 @@ declare namespace Electron {
urls: string[];
}

interface OnBeforeSendHeadersResponse {
cancel?: boolean;
/**
* When provided, request will be made with these headers.
*/
requestHeaders?: RequestHeaders;
}

interface OnCompletedDetails {
id: number;
url: string;
Expand Down Expand Up @@ -8105,6 +8125,18 @@ declare namespace Electron {
urls: string[];
}

interface OnHeadersReceivedDetails {
id: number;
url: string;
method: string;
webContentsId?: number;
resourceType: string;
timestamp: number;
statusLine: string;
statusCode: number;
responseHeaders: ResponseHeaders;
}

interface OnHeadersReceivedFilter {
/**
* Array of URL patterns that will be used to filter out the requests that do not
Expand All @@ -8113,6 +8145,19 @@ declare namespace Electron {
urls: string[];
}

interface OnHeadersReceivedResponse {
cancel: boolean;
/**
* When provided, the server is assumed to have responded with these headers.
*/
responseHeaders?: ResponseHeaders;
/**
* Should be provided when overriding responseHeaders to change header status
* otherwise original response header's status will be used.
*/
statusLine?: string;
}

interface OnResponseStartedDetails {
id: number;
url: string;
Expand Down
2 changes: 1 addition & 1 deletion test/smoke/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@types/webdriverio": "4.6.1",
"concurrently": "^3.5.1",
"cpx": "^1.5.0",
"electron": "3.1.0",
"electron": "3.1.2",
"htmlparser2": "^3.9.2",
"mkdirp": "^0.5.1",
"mocha": "^5.2.0",
Expand Down
8 changes: 4 additions & 4 deletions test/smoke/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,10 @@ electron-download@^4.1.0:
semver "^5.4.1"
sumchecker "^2.0.2"

electron@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-3.1.0.tgz#5e36ba4c24926c7cf80eccf6f8361b3cad409f17"
integrity sha512-FnHH3T7aQGAjw5h8//9BNLZBByP/gnEGP3sQH5if7HVe6Znz5KcsRbIdxLYVH9DXJFoJ2SArP+UiAAYQIdVQJQ==
electron@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/electron/-/electron-3.1.2.tgz#e410b976c56fc2f783c3b0fb6d757e02eaeab902"
integrity sha512-B/mXRCN8jGBBx8dvtIgLyW+nE8i9y7K9G6wijU+cLoneqF5al9BgZA1l5xgZEiUrwTtt0cgXIWNwhStt7EDoQQ==
dependencies:
"@types/node" "^8.0.24"
electron-download "^4.1.0"
Expand Down

0 comments on commit 6089c69

Please sign in to comment.