mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
66 Commits
v41.0.0-ni
...
v40.0.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b7e37c8dc | ||
|
|
d2ae9ed69f | ||
|
|
7eb6ff95e4 | ||
|
|
9ec95c0c02 | ||
|
|
718bddb407 | ||
|
|
488b96b18a | ||
|
|
0812f7ee86 | ||
|
|
cf7a19805e | ||
|
|
23ef7bc703 | ||
|
|
8dbc6c14e5 | ||
|
|
3209d817ca | ||
|
|
f8d3e0f3cd | ||
|
|
d9446924dc | ||
|
|
d1d6befcf1 | ||
|
|
fe32528c50 | ||
|
|
ef8fad7d8e | ||
|
|
bb9c867f23 | ||
|
|
e8e41a28dd | ||
|
|
fd1db6a8b6 | ||
|
|
fb62a5873a | ||
|
|
b62a97805a | ||
|
|
135f127db8 | ||
|
|
6b797a84a8 | ||
|
|
57bbcd5233 | ||
|
|
4c042506fe | ||
|
|
ebd173afea | ||
|
|
58328779f7 | ||
|
|
7a5e34e6ca | ||
|
|
0c4f0cf729 | ||
|
|
e2606bbe48 | ||
|
|
543f1670fe | ||
|
|
fa764f7328 | ||
|
|
ac7992b801 | ||
|
|
499bb039a4 | ||
|
|
b0041fdb60 | ||
|
|
c229e274a0 | ||
|
|
16f4655981 | ||
|
|
9e6546da7c | ||
|
|
c05b5e98c4 | ||
|
|
8bb0f146ea | ||
|
|
45cc8dd600 | ||
|
|
fe396ef002 | ||
|
|
6876eb2fe9 | ||
|
|
ec84ba6b6c | ||
|
|
2e7fdde0fc | ||
|
|
018876adde | ||
|
|
59b0747676 | ||
|
|
d4d89cdd48 | ||
|
|
1b3ce5d74a | ||
|
|
2ce7bd99c4 | ||
|
|
bb52517054 | ||
|
|
c4d9d9645a | ||
|
|
6396c12401 | ||
|
|
3397626653 | ||
|
|
dd662db5d6 | ||
|
|
11191f23b1 | ||
|
|
e1dadaa6a0 | ||
|
|
887294ab5c | ||
|
|
1265eccf43 | ||
|
|
23792bc7ed | ||
|
|
4138dfeb19 | ||
|
|
709a9f5f20 | ||
|
|
a2bb5069a5 | ||
|
|
2b99c7645d | ||
|
|
3c8714a940 | ||
|
|
a01b4becfa |
4
.github/workflows/archaeologist-dig.yml
vendored
4
.github/workflows/archaeologist-dig.yml
vendored
@@ -13,13 +13,13 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node.js/npm
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
|
||||
with:
|
||||
node-version: 22.21.x
|
||||
node-version: 20.19.x
|
||||
- name: Setting Up Dig Site
|
||||
run: |
|
||||
echo "remote: ${{ github.event.pull_request.head.repo.clone_url }}"
|
||||
|
||||
13
.github/workflows/audit-branch-ci.yml
vendored
13
.github/workflows/audit-branch-ci.yml
vendored
@@ -19,22 +19,12 @@ jobs:
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: 22.17.x
|
||||
- name: Sparse checkout repository
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.
|
||||
.github
|
||||
.yarn
|
||||
- run: yarn workspaces focus @electron/gha-workflows
|
||||
- run: npm install @actions/cache@4.0.3 @electron/fiddle-core@2.0.1
|
||||
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
id: audit-errors
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const { chdir } = require('node:process');
|
||||
chdir('${{ github.workspace }}/.github/workflows');
|
||||
|
||||
const cache = require('@actions/cache');
|
||||
const { ElectronVersions } = require('@electron/fiddle-core');
|
||||
|
||||
@@ -84,7 +74,6 @@ jobs:
|
||||
!message.startsWith("Process completed with exit code") &&
|
||||
!message.startsWith("Response status code does not indicate success") &&
|
||||
!message.startsWith("The hosted runner lost communication with the server") &&
|
||||
!message.startsWith("Dependabot encountered an error performing the update") &&
|
||||
!/Unable to make request/.test(message) &&
|
||||
!/The requested URL returned error/.test(message),
|
||||
)
|
||||
|
||||
6
.github/workflows/build-git-cache.yml
vendored
6
.github/workflows/build-git-cache.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
TARGET_OS: 'win'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
||||
build-image-sha: ${{ steps.set-output.outputs.build-image-sha }}
|
||||
docs-only: ${{ steps.set-output.outputs.docs-only }}
|
||||
steps:
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -156,7 +156,7 @@ jobs:
|
||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -188,7 +188,7 @@ jobs:
|
||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
2
.github/workflows/issue-labeled.yml
vendored
2
.github/workflows/issue-labeled.yml
vendored
@@ -75,7 +75,7 @@ jobs:
|
||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||
- name: Create comment
|
||||
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
|
||||
uses: actions-cool/issues-helper@9861779a695cf1898bd984c727f685f351cfc372 # v3.7.2
|
||||
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3.6.2
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
20
.github/workflows/issue-opened.yml
vendored
20
.github/workflows/issue-opened.yml
vendored
@@ -37,14 +37,7 @@ jobs:
|
||||
with:
|
||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||
org: electron
|
||||
- name: Sparse checkout repository
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.
|
||||
.github
|
||||
.yarn
|
||||
- run: yarn workspaces focus @electron/gha-workflows
|
||||
- run: npm install @electron/fiddle-core@1.3.3 mdast-util-from-markdown@2.0.0 unist-util-select@5.1.0 semver@7.6.0
|
||||
- name: Add labels
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
id: add-labels
|
||||
@@ -53,12 +46,9 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ steps.generate-token.outputs.token }}
|
||||
script: |
|
||||
const { chdir } = require('node:process');
|
||||
chdir('${{ github.workspace }}/.github/workflows');
|
||||
|
||||
const { fromMarkdown } = require('mdast-util-from-markdown');
|
||||
const { select } = require('unist-util-select');
|
||||
const semver = require('semver');
|
||||
const { fromMarkdown } = await import('${{ github.workspace }}/node_modules/mdast-util-from-markdown/index.js');
|
||||
const { select } = await import('${{ github.workspace }}/node_modules/unist-util-select/index.js');
|
||||
const semver = await import('${{ github.workspace }}/node_modules/semver/index.js');
|
||||
|
||||
const [ owner, repo ] = '${{ github.repository }}'.split('/');
|
||||
const issue_number = ${{ github.event.issue.number }};
|
||||
@@ -146,7 +136,7 @@ jobs:
|
||||
}
|
||||
- name: Create unsupported major comment
|
||||
if: ${{ steps.add-labels.outputs.unsupportedMajor }}
|
||||
uses: actions-cool/issues-helper@9861779a695cf1898bd984c727f685f351cfc372 # v3.7.2
|
||||
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3.6.2
|
||||
with:
|
||||
actions: 'create-comment'
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
2
.github/workflows/linux-publish.yml
vendored
2
.github/workflows/linux-publish.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
2
.github/workflows/macos-publish.yml
vendored
2
.github/workflows/macos-publish.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
13
.github/workflows/package.json
vendored
13
.github/workflows/package.json
vendored
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "@electron/gha-workflows",
|
||||
"version": "0.0.0-development",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^4.0.3",
|
||||
"@electron/fiddle-core": "^2.0.1",
|
||||
"mdast-util-from-markdown": "^2.0.0",
|
||||
"semver": "^7.7.2",
|
||||
"unist-util-select": "^5.1.0"
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
with:
|
||||
target-platform: linux
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
2
.github/workflows/pipeline-electron-lint.yml
vendored
2
.github/workflows/pipeline-electron-lint.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
run: |
|
||||
mkdir src
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
|
||||
with:
|
||||
node-version: 22.21.x
|
||||
node-version: 20.19.x
|
||||
cache: yarn
|
||||
cache-dependency-path: src/electron/yarn.lock
|
||||
- name: Install Dependencies
|
||||
@@ -163,7 +163,7 @@ jobs:
|
||||
if: ${{ inputs.target-platform == 'linux' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.check-container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
|
||||
with:
|
||||
node-version: 22.21.x
|
||||
node-version: 20.19.x
|
||||
- name: Add TCC permissions on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: |
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: sudo xcode-select --switch /Applications/Xcode_16.4.app
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.test-container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.test-container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -138,10 +138,16 @@ jobs:
|
||||
unzip -:o dist.zip
|
||||
- name: Setup Linux for Headless Testing
|
||||
run: sh -e /etc/init.d/xvfb start
|
||||
- name: Add Clang problem matcher
|
||||
shell: bash
|
||||
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
|
||||
- name: Run Nan Tests
|
||||
run: |
|
||||
cd src
|
||||
node electron/script/nan-spec-runner.js
|
||||
- name: Remove Clang problem matcher
|
||||
shell: bash
|
||||
run: echo "::remove-matcher owner=clang::"
|
||||
- name: Wait for active SSH sessions
|
||||
shell: bash
|
||||
if: always() && !cancelled()
|
||||
|
||||
4
.github/workflows/scorecards.yml
vendored
4
.github/workflows/scorecards.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
@@ -50,6 +50,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v3.29.5
|
||||
uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
2
.github/workflows/windows-publish.yml
vendored
2
.github/workflows/windows-publish.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
build-image-sha: ${{ inputs.build-image-sha }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
2
DEPS
2
DEPS
@@ -12,7 +12,7 @@ vars = {
|
||||
'reactiveobjc_version':
|
||||
'74ab5baccc6f7202c8ac69a8d1e152c29dc1ea76',
|
||||
'mantle_version':
|
||||
'2a8e2123a3931038179ee06105c9e6ec336b12ea',
|
||||
'78d3966b3c331292ea29ec38661b25df0a245948',
|
||||
'engflow_reclient_configs_version':
|
||||
'955335c30a752e9ef7bff375baab5e0819b6c00d',
|
||||
|
||||
|
||||
@@ -565,9 +565,8 @@ and subscribing to the `ready` event if the app is not ready yet.
|
||||
* `steal` boolean _macOS_ - Make the receiver the active app even if another app is
|
||||
currently active.
|
||||
|
||||
On macOS, makes the application the active app. On Windows, focuses on the application's
|
||||
first window. On Linux, either focuses on the first visible window (X11) or requests
|
||||
focus but may instead show a notification or flash the app icon (Wayland).
|
||||
On Linux, focuses on the first visible window. On macOS, makes the application
|
||||
the active app. On Windows, focuses on the application's first window.
|
||||
|
||||
You should seek to use the `steal` option as sparingly as possible.
|
||||
|
||||
|
||||
@@ -140,10 +140,6 @@ state is `hidden` in order to minimize power consumption.
|
||||
move.
|
||||
* On Linux the type of modal windows will be changed to `dialog`.
|
||||
* On Linux many desktop environments do not support hiding a modal window.
|
||||
* On Wayland (Linux) it is generally not possible to programmatically resize windows
|
||||
after creation, or to position, move, focus, or blur windows without user input.
|
||||
If your app needs these capabilities, run it in Xwayland by appending the flag
|
||||
`--ozone-platform=x11`.
|
||||
|
||||
## Class: BrowserWindow extends `BaseWindow`
|
||||
|
||||
@@ -660,15 +656,10 @@ the [close event](#event-close).
|
||||
|
||||
Focuses on the window.
|
||||
|
||||
On Wayland (Linux), the desktop environment may show a notification or flash
|
||||
the app icon if the window or app is not already focused.
|
||||
|
||||
#### `win.blur()`
|
||||
|
||||
Removes focus from the window.
|
||||
|
||||
Not supported on Wayland (Linux).
|
||||
|
||||
#### `win.isFocused()`
|
||||
|
||||
Returns `boolean` - Whether the window is focused.
|
||||
@@ -685,8 +676,6 @@ Shows and gives focus to the window.
|
||||
|
||||
Shows the window but doesn't focus on it.
|
||||
|
||||
Not supported on Wayland (Linux).
|
||||
|
||||
#### `win.hide()`
|
||||
|
||||
Hides the window.
|
||||
@@ -835,8 +824,6 @@ Closes the currently open [Quick Look][quick-look] panel.
|
||||
|
||||
Resizes and moves the window to the supplied bounds. Any properties that are not supplied will default to their current values.
|
||||
|
||||
On Wayland (Linux), has the same limitations as `setSize` and `setPosition`.
|
||||
|
||||
```js
|
||||
const { BrowserWindow } = require('electron')
|
||||
|
||||
@@ -879,8 +866,6 @@ See [Setting `backgroundColor`](#setting-the-backgroundcolor-property).
|
||||
Resizes and moves the window's client area (e.g. the web page) to
|
||||
the supplied bounds.
|
||||
|
||||
On Wayland (Linux), has the same limitations as `setContentSize` and `setPosition`.
|
||||
|
||||
#### `win.getContentBounds()`
|
||||
|
||||
Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window's client area as `Object`.
|
||||
@@ -910,8 +895,6 @@ Returns `boolean` - whether the window is enabled.
|
||||
|
||||
Resizes the window to `width` and `height`. If `width` or `height` are below any set minimum size constraints the window will snap to its minimum size.
|
||||
|
||||
On Wayland (Linux), may not work as some window managers restrict programmatic window resizing.
|
||||
|
||||
#### `win.getSize()`
|
||||
|
||||
Returns `Integer[]` - Contains the window's width and height.
|
||||
@@ -924,8 +907,6 @@ Returns `Integer[]` - Contains the window's width and height.
|
||||
|
||||
Resizes the window's client area (e.g. the web page) to `width` and `height`.
|
||||
|
||||
On Wayland (Linux), may not work as some window managers restrict programmatic window resizing.
|
||||
|
||||
#### `win.getContentSize()`
|
||||
|
||||
Returns `Integer[]` - Contains the window's client area's width and height.
|
||||
@@ -1063,16 +1044,12 @@ this method throws an error.
|
||||
|
||||
#### `win.moveTop()`
|
||||
|
||||
Moves window to top(z-order) regardless of focus.
|
||||
|
||||
Not supported on Wayland (Linux).
|
||||
Moves window to top(z-order) regardless of focus
|
||||
|
||||
#### `win.center()`
|
||||
|
||||
Moves window to the center of the screen.
|
||||
|
||||
Not supported on Wayland (Linux).
|
||||
|
||||
#### `win.setPosition(x, y[, animate])`
|
||||
|
||||
* `x` Integer
|
||||
@@ -1081,8 +1058,6 @@ Not supported on Wayland (Linux).
|
||||
|
||||
Moves window to `x` and `y`.
|
||||
|
||||
Not supported on Wayland (Linux).
|
||||
|
||||
#### `win.getPosition()`
|
||||
|
||||
Returns `Integer[]` - Contains the window's current position.
|
||||
|
||||
@@ -49,10 +49,6 @@ Disables the disk cache for HTTP requests.
|
||||
|
||||
Disable HTTP/2 and SPDY/3.1 protocols.
|
||||
|
||||
### --disable-geolocation _macOS_
|
||||
|
||||
Disables the Geolocation API. Permission requests for geolocation will be denied internally regardless of the decision made by a handler set via `session.setPermissionRequestHandler`. This functionality is currently implemented only for macOS. Has no effect on other platforms.
|
||||
|
||||
### --disable-renderer-backgrounding
|
||||
|
||||
Prevents Chromium from lowering the priority of invisible pages' renderer
|
||||
|
||||
@@ -2,15 +2,10 @@
|
||||
|
||||
## Class: Menu
|
||||
|
||||
> Create application menus and context menus.
|
||||
> Create native application menus and context menus.
|
||||
|
||||
Process: [Main](../glossary.md#main-process)
|
||||
|
||||
The presentation of menus varies depending on the operating system:
|
||||
|
||||
- Under Windows and Linux, menus are visually similar to Chromium.
|
||||
- Under macOS, these will be native menus.
|
||||
|
||||
> [!TIP]
|
||||
> See also: [A detailed guide about how to implement menus in your application](../tutorial/menus.md).
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* `bgra` - 32bpp BGRA (byte-order), 1 plane.
|
||||
* `rgba` - 32bpp RGBA (byte-order), 1 plane.
|
||||
* `rgbaf16` - Half float RGBA, 1 plane.
|
||||
* `nv12` - 12bpp with Y plane followed by a 2x2 interleaved UV plane.
|
||||
* `colorSpace` [ColorSpace](color-space.md) (optional) - The color space of the texture.
|
||||
* `codedSize` [Size](size.md) - The full dimensions of the shared texture.
|
||||
* `visibleRect` [Rectangle](rectangle.md) (optional) - A subsection of [0, 0, codedSize.width, codedSize.height]. In common cases, it is the full section area.
|
||||
|
||||
@@ -110,10 +110,4 @@ the item is a Markdown file located in the root of the project:
|
||||
|
||||

|
||||
|
||||
## Dragging files into your app
|
||||
|
||||
You can use the standard
|
||||
[Drag and Drop web API](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API)
|
||||
for dragging and dropping files into your app.
|
||||
|
||||
[`contextBridge`]: ../api/context-bridge.md
|
||||
|
||||
@@ -194,8 +194,6 @@ filenames = {
|
||||
"shell/common/api/electron_api_clipboard_mac.mm",
|
||||
"shell/common/api/electron_api_native_image_mac.mm",
|
||||
"shell/common/asar/archive_mac.mm",
|
||||
"shell/common/asar/integrity_digest.h",
|
||||
"shell/common/asar/integrity_digest.mm",
|
||||
"shell/common/application_info_mac.mm",
|
||||
"shell/common/language_util_mac.mm",
|
||||
"shell/common/mac/main_application_bundle.h",
|
||||
@@ -458,6 +456,7 @@ filenames = {
|
||||
"shell/browser/net/system_network_context_manager.h",
|
||||
"shell/browser/net/url_loader_network_observer.cc",
|
||||
"shell/browser/net/url_loader_network_observer.h",
|
||||
"shell/browser/net/web_request_api_interface.h",
|
||||
"shell/browser/network_hints_handler_impl.cc",
|
||||
"shell/browser/network_hints_handler_impl.h",
|
||||
"shell/browser/notifications/notification.cc",
|
||||
|
||||
@@ -428,8 +428,9 @@ export class ClientRequest extends Writable implements Electron.ClientRequest {
|
||||
this._started = true;
|
||||
const stringifyValues = (obj: Record<string, { name: string, value: string | string[] }>) => {
|
||||
const ret: Record<string, string> = {};
|
||||
for (const { name, value } of Object.values(obj)) {
|
||||
ret[name] = value.toString();
|
||||
for (const k of Object.keys(obj)) {
|
||||
const kv = obj[k];
|
||||
ret[kv.name] = kv.value.toString();
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"devDependencies": {
|
||||
"@azure/storage-blob": "^12.28.0",
|
||||
"@datadog/datadog-ci": "^4.1.2",
|
||||
"@electron/asar": "^4.0.1",
|
||||
"@electron/asar": "^3.2.13",
|
||||
"@electron/docs-parser": "^2.0.0",
|
||||
"@electron/fiddle-core": "^1.3.4",
|
||||
"@electron/github-app-auth": "^2.2.1",
|
||||
@@ -142,7 +142,6 @@
|
||||
},
|
||||
"packageManager": "yarn@4.11.0",
|
||||
"workspaces": [
|
||||
".github/workflows",
|
||||
"spec",
|
||||
"spec/fixtures/native-addon/*"
|
||||
],
|
||||
|
||||
1
patches/Mantle/.patches
Normal file
1
patches/Mantle/.patches
Normal file
@@ -0,0 +1 @@
|
||||
remove_mtlmanagedobjectadapter_h.patch
|
||||
22
patches/Mantle/remove_mtlmanagedobjectadapter_h.patch
Normal file
22
patches/Mantle/remove_mtlmanagedobjectadapter_h.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Mon, 7 Dec 2020 17:34:08 -0800
|
||||
Subject: Remove MTLManagedObjectAdapter.h
|
||||
|
||||
We are using an outdated version of Mantle which leverages NSConfinementConcurrencyType,
|
||||
an enum which has been deprecated with no replacement as of macOS 10.11.
|
||||
The actual solution to this problem is to upgrade Mantle, but for now
|
||||
we just stop building the offending adapter.
|
||||
|
||||
diff --git a/Mantle/Mantle.h b/Mantle/Mantle.h
|
||||
index ebd74e7e435ef008ef29e94d406246c1f7b07a12..81abff872bd597ce6d21bb43be4d19ddc7253088 100644
|
||||
--- a/Mantle/Mantle.h
|
||||
+++ b/Mantle/Mantle.h
|
||||
@@ -15,7 +15,6 @@ FOUNDATION_EXPORT double MantleVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char MantleVersionString[];
|
||||
|
||||
#import <Mantle/MTLJSONAdapter.h>
|
||||
-#import <Mantle/MTLManagedObjectAdapter.h>
|
||||
#import <Mantle/MTLModel.h>
|
||||
#import <Mantle/MTLModel+NSCoding.h>
|
||||
#import <Mantle/MTLValueTransformer.h>
|
||||
@@ -141,4 +141,3 @@ allow_electron_to_depend_on_components_os_crypt_sync.patch
|
||||
expose_referrerscriptinfo_hostdefinedoptionsindex.patch
|
||||
chore_disable_protocol_handler_dcheck.patch
|
||||
fix_check_for_file_existence_before_setting_mtime.patch
|
||||
fix_linux_tray_id.patch
|
||||
|
||||
@@ -8,10 +8,10 @@ electron objects that extend gin::Wrappable and gets
|
||||
allocated on the cpp heap
|
||||
|
||||
diff --git a/gin/public/wrappable_pointer_tags.h b/gin/public/wrappable_pointer_tags.h
|
||||
index 573bcb2e56068a2ade6d8ab28964b077487874fd..0321ca6d3c7e1ed541cc1beffb20b1db3d03a0c8 100644
|
||||
index 573bcb2e56068a2ade6d8ab28964b077487874fd..93bf3814b38f8093e39f1a0548a43dfb347e49b3 100644
|
||||
--- a/gin/public/wrappable_pointer_tags.h
|
||||
+++ b/gin/public/wrappable_pointer_tags.h
|
||||
@@ -74,7 +74,14 @@ enum WrappablePointerTag : uint16_t {
|
||||
@@ -74,7 +74,13 @@ enum WrappablePointerTag : uint16_t {
|
||||
kTextInputControllerBindings, // content::TextInputControllerBindings
|
||||
kWebAXObjectProxy, // content::WebAXObjectProxy
|
||||
kWrappedExceptionHandler, // extensions::WrappedExceptionHandler
|
||||
@@ -22,8 +22,7 @@ index 573bcb2e56068a2ade6d8ab28964b077487874fd..0321ca6d3c7e1ed541cc1beffb20b1db
|
||||
+ kElectronMenu, // electron::api::Menu
|
||||
+ kElectronNetLog, // electron::api::NetLog
|
||||
+ kElectronSession, // electron::api::Session
|
||||
+ kElectronWebRequest, // electron::api::WebRequest
|
||||
+ kLastPointerTag = kElectronWebRequest,
|
||||
+ kLastPointerTag = kElectronSession,
|
||||
};
|
||||
|
||||
static_assert(kLastPointerTag <
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Damglador <vse.stopchanskyi@gmail.com>
|
||||
Date: Mon, 27 Oct 2025 23:35:43 +0100
|
||||
Subject: fix: allow setting tray id
|
||||
|
||||
This is needed to allow setting custom tray id when initializing a tray icon.
|
||||
With current behaviour all programs get chrome_status_icon_1 as their id in tray.
|
||||
So tray can't tell apart Electron apps,
|
||||
which introduces issues like https://bugs.kde.org/show_bug.cgi?id=470840.
|
||||
|
||||
This patch can be removed after being upstreamed. See discussion at
|
||||
https://github.com/electron/electron/pull/48675#issuecomment-3452781711
|
||||
for more info.
|
||||
|
||||
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
index 72a61f80eb5dfafe2609ec9e3f8f34c7c84f7abe..c5c3092607b4dc0e1fa7f7fc39b8f7e82d59ffd7 100644
|
||||
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
@@ -133,8 +133,8 @@ int NextServiceId() {
|
||||
return ++status_icon_count;
|
||||
}
|
||||
|
||||
-std::string PropertyIdFromId(int service_id) {
|
||||
- return "chrome_status_icon_" + base::NumberToString(service_id);
|
||||
+std::string PropertyIdFromId(int service_id, const std::string_view app_name) {
|
||||
+ return base::StrCat({ app_name, "_status_icon_", base::NumberToString(service_id) });
|
||||
}
|
||||
|
||||
using DbusImage = std::tuple</*width=*/int32_t,
|
||||
@@ -224,12 +224,13 @@ base::FilePath WriteIconFile(size_t icon_file_id,
|
||||
|
||||
} // namespace
|
||||
|
||||
-StatusIconLinuxDbus::StatusIconLinuxDbus()
|
||||
+StatusIconLinuxDbus::StatusIconLinuxDbus(const std::string_view app_name)
|
||||
: bus_(dbus_thread_linux::GetSharedSessionBus()),
|
||||
should_write_icon_to_file_(ShouldWriteIconToFile()),
|
||||
icon_task_runner_(base::ThreadPool::CreateSequencedTaskRunner(
|
||||
{base::MayBlock(), base::TaskPriority::USER_VISIBLE,
|
||||
- base::TaskShutdownBehavior::BLOCK_SHUTDOWN})) {
|
||||
+ base::TaskShutdownBehavior::BLOCK_SHUTDOWN})),
|
||||
+ app_name_(app_name) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
CheckStatusNotifierWatcherHasOwner();
|
||||
}
|
||||
@@ -405,7 +406,7 @@ void StatusIconLinuxDbus::OnHostRegisteredResponse(
|
||||
properties_->SetProperty<"s">(kInterfaceStatusNotifierItem, kPropertyCategory,
|
||||
kPropertyValueCategory, false);
|
||||
properties_->SetProperty<"s">(kInterfaceStatusNotifierItem, kPropertyId,
|
||||
- PropertyIdFromId(service_id_), false);
|
||||
+ PropertyIdFromId(service_id_, app_name_), false);
|
||||
properties_->SetProperty<"s">(kInterfaceStatusNotifierItem,
|
||||
kPropertyOverlayIconName, "", false);
|
||||
properties_->SetProperty<"s">(kInterfaceStatusNotifierItem, kPropertyStatus,
|
||||
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
index 5457f98158a094a5b8768352d2868e3005afd395..13ac4e51019ea68fdccd17aac8a4855bde50964b 100644
|
||||
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
@@ -37,7 +37,7 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
|
||||
public ui::SimpleMenuModel::Delegate,
|
||||
public base::RefCounted<StatusIconLinuxDbus> {
|
||||
public:
|
||||
- StatusIconLinuxDbus();
|
||||
+ StatusIconLinuxDbus(const std::string_view app_name = "chrome");
|
||||
|
||||
StatusIconLinuxDbus(const StatusIconLinuxDbus&) = delete;
|
||||
StatusIconLinuxDbus& operator=(const StatusIconLinuxDbus&) = delete;
|
||||
@@ -135,6 +135,8 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
|
||||
size_t icon_file_id_ = 0;
|
||||
base::FilePath icon_file_;
|
||||
|
||||
+ std::string app_name_;
|
||||
+
|
||||
base::WeakPtrFactory<StatusIconLinuxDbus> weak_factory_{this};
|
||||
};
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
{ "patch_dir": "src/electron/patches/nan", "repo": "src/third_party/nan" },
|
||||
{ "patch_dir": "src/electron/patches/perfetto", "repo": "src/third_party/perfetto" },
|
||||
{ "patch_dir": "src/electron/patches/squirrel.mac", "repo": "src/third_party/squirrel.mac" },
|
||||
{ "patch_dir": "src/electron/patches/Mantle", "repo": "src/third_party/squirrel.mac/vendor/Mantle" },
|
||||
{ "patch_dir": "src/electron/patches/ReactiveObjC", "repo": "src/third_party/squirrel.mac/vendor/ReactiveObjC" },
|
||||
{ "patch_dir": "src/electron/patches/webrtc", "repo": "src/third_party/webrtc" },
|
||||
{ "patch_dir": "src/electron/patches/reclient-configs", "repo": "src/third_party/engflow-reclient-configs" },
|
||||
|
||||
@@ -23,10 +23,10 @@ index 89c499e451ecb48655cfd42b01ffa1da56998c2e..98f80aad43a87ed75ca1660ad6a178db
|
||||
+vendor
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a02e5f54d923513fd0676e91a99b8913bad6a57e
|
||||
index 0000000000000000000000000000000000000000..68beb3d10580cdb747a78407c7f5bbb205825c4b
|
||||
--- /dev/null
|
||||
+++ b/BUILD.gn
|
||||
@@ -0,0 +1,250 @@
|
||||
@@ -0,0 +1,242 @@
|
||||
+assert(is_mac)
|
||||
+
|
||||
+import("//build/config/mac/rules.gni")
|
||||
@@ -48,16 +48,12 @@ index 0000000000000000000000000000000000000000..a02e5f54d923513fd0676e91a99b8913
|
||||
+ "Resources",
|
||||
+ ]
|
||||
+ info_plist = "vendor/Mantle/Mantle/Info.plist"
|
||||
+ extra_substitutions = [
|
||||
+ "CURRENT_PROJECT_VERSION=0.0.0",
|
||||
+ "PRODUCT_BUNDLE_IDENTIFIER=com.electron.mantle",
|
||||
+ ]
|
||||
+ extra_substitutions = [ "CURRENT_PROJECT_VERSION=0.0.0" ]
|
||||
+
|
||||
+ configs -= [
|
||||
+ "//build/config/compiler:chromium_code",
|
||||
+ "//build/config/gcc:symbol_visibility_hidden",
|
||||
+ ]
|
||||
+
|
||||
+ configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
+ public_deps = [ ":mantle_headers" ]
|
||||
+ deps = []
|
||||
@@ -70,8 +66,6 @@ index 0000000000000000000000000000000000000000..a02e5f54d923513fd0676e91a99b8913
|
||||
+ include_dirs = [
|
||||
+ "vendor/Mantle/Mantle",
|
||||
+ "vendor/Mantle/Mantle/extobjc",
|
||||
+ "vendor/Mantle/Mantle/extobjc/include",
|
||||
+ "vendor/Mantle/Mantle/include",
|
||||
+ ]
|
||||
+
|
||||
+ cflags_objc = [
|
||||
@@ -202,7 +196,6 @@ index 0000000000000000000000000000000000000000..a02e5f54d923513fd0676e91a99b8913
|
||||
+ cflags_objc = [
|
||||
+ "-fobjc-weak",
|
||||
+ "-Wno-unknown-warning-option",
|
||||
+ "-Wno-deprecated-declarations",
|
||||
+ "-Wno-block-capture-autoreleasing",
|
||||
+ "-fobjc-arc",
|
||||
+ ]
|
||||
@@ -269,7 +262,6 @@ index 0000000000000000000000000000000000000000..a02e5f54d923513fd0676e91a99b8913
|
||||
+ cflags_objc = [
|
||||
+ "-fobjc-weak",
|
||||
+ "-fobjc-arc",
|
||||
+ "-Wno-deprecated-declarations",
|
||||
+ "-Wno-block-capture-autoreleasing",
|
||||
+ ]
|
||||
+
|
||||
@@ -542,10 +534,10 @@ index 0000000000000000000000000000000000000000..a7aeeb7d3e187bd91ef12ed860d1e37e
|
||||
+ sys.exit(e.returncode)
|
||||
diff --git a/filenames.gni b/filenames.gni
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..cee305c80588ffe2234bfadd5c211a9c301fe589
|
||||
index 0000000000000000000000000000000000000000..3672153140b74fe948e7102b5e1ffad49341163d
|
||||
--- /dev/null
|
||||
+++ b/filenames.gni
|
||||
@@ -0,0 +1,249 @@
|
||||
@@ -0,0 +1,243 @@
|
||||
+squirrel_filenames = {
|
||||
+ headers = [
|
||||
+ "Squirrel/NSBundle+SQRLVersionExtensions.h",
|
||||
@@ -590,25 +582,22 @@ index 0000000000000000000000000000000000000000..cee305c80588ffe2234bfadd5c211a9c
|
||||
+
|
||||
+mantle_filenames = {
|
||||
+ headers = [
|
||||
+ "vendor/Mantle/Mantle/MTLJSONAdapter.h",
|
||||
+ "vendor/Mantle/Mantle/MTLModel+NSCoding.h",
|
||||
+ "vendor/Mantle/Mantle/MTLModel.h",
|
||||
+ "vendor/Mantle/Mantle/MTLReflection.h",
|
||||
+ "vendor/Mantle/Mantle/MTLValueTransformer.h",
|
||||
+ "vendor/Mantle/Mantle/Mantle.h",
|
||||
+ "vendor/Mantle/Mantle/NSArray+MTLManipulationAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/NSError+MTLModelException.h",
|
||||
+ "vendor/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h",
|
||||
+ "vendor/Mantle/Mantle/include/MTLJSONAdapter.h",
|
||||
+ "vendor/Mantle/Mantle/include/MTLModel+NSCoding.h",
|
||||
+ "vendor/Mantle/Mantle/include/MTLModel.h",
|
||||
+ "vendor/Mantle/Mantle/include/MTLTransformerErrorHandling.h",
|
||||
+ "vendor/Mantle/Mantle/include/MTLValueTransformer.h",
|
||||
+ "vendor/Mantle/Mantle/include/Mantle.h",
|
||||
+ "vendor/Mantle/Mantle/include/NSArray+MTLManipulationAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/include/NSDictionary+MTLMappingAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/include/NSDictionary+MTLManipulationAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/include/NSObject+MTLComparisonAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/include/NSValueTransformer+MTLInversionAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/include/NSValueTransformer+MTLPredefinedTransformerAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/extobjc/include/MTLEXTKeyPathCoding.h",
|
||||
+ "vendor/Mantle/Mantle/extobjc/include/MTLEXTRuntimeExtensions.h",
|
||||
+ "vendor/Mantle/Mantle/extobjc/include/MTLEXTScope.h",
|
||||
+ "vendor/Mantle/Mantle/extobjc/include/MTLMetamacros.h",
|
||||
+ "vendor/Mantle/Mantle/NSObject+MTLComparisonAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h",
|
||||
+ "vendor/Mantle/Mantle/extobjc/MTLEXTKeyPathCoding.h",
|
||||
+ "vendor/Mantle/Mantle/extobjc/MTLEXTRuntimeExtensions.h",
|
||||
+ "vendor/Mantle/Mantle/extobjc/MTLEXTScope.h",
|
||||
+ "vendor/Mantle/Mantle/extobjc/metamacros.h",
|
||||
+ ]
|
||||
+
|
||||
+ sources = [
|
||||
@@ -616,12 +605,9 @@ index 0000000000000000000000000000000000000000..cee305c80588ffe2234bfadd5c211a9c
|
||||
+ "vendor/Mantle/Mantle/MTLModel+NSCoding.m",
|
||||
+ "vendor/Mantle/Mantle/MTLModel.m",
|
||||
+ "vendor/Mantle/Mantle/MTLReflection.m",
|
||||
+ "vendor/Mantle/Mantle/MTLTransformerErrorHandling.m",
|
||||
+ "vendor/Mantle/Mantle/MTLValueTransformer.m",
|
||||
+ "vendor/Mantle/Mantle/NSArray+MTLManipulationAdditions.m",
|
||||
+ "vendor/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.m",
|
||||
+ "vendor/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.m",
|
||||
+ "vendor/Mantle/Mantle/NSDictionary+MTLMappingAdditions.m",
|
||||
+ "vendor/Mantle/Mantle/NSError+MTLModelException.m",
|
||||
+ "vendor/Mantle/Mantle/NSObject+MTLComparisonAdditions.m",
|
||||
+ "vendor/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.m",
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: Use UTType class instead of deprecated UTTypeConformsTo
|
||||
macOS 12 removed support for the deprecated UTTypeConformsTo function. Its replacement is the dedicated UTType class in the Uniform Type Identifiers framework.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index a02e5f54d923513fd0676e91a99b8913bad6a57e..6f32c4b203a0efa2ccd515e3754494deef5b39f0 100644
|
||||
index 68beb3d10580cdb747a78407c7f5bbb205825c4b..b9e871a0292eeda1f0e738329d0b510bdc3e34a0 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -234,6 +234,7 @@ mac_framework_bundle("squirrel_framework") {
|
||||
@@ -227,6 +227,7 @@ mac_framework_bundle("squirrel_framework") {
|
||||
"IOKit.framework",
|
||||
"Security.framework",
|
||||
"ServiceManagement.framework",
|
||||
|
||||
@@ -153,7 +153,7 @@ const LINTERS = [{
|
||||
}, {
|
||||
key: 'javascript',
|
||||
roots: ['build', 'default_app', 'lib', 'npm', 'script', 'spec'],
|
||||
ignoreRoots: ['.github/workflows/node_modules', 'spec/node_modules', 'spec/fixtures/native-addon'],
|
||||
ignoreRoots: ['spec/node_modules', 'spec/fixtures/native-addon'],
|
||||
test: filename => filename.endsWith('.js') || filename.endsWith('.ts') || filename.endsWith('.mjs'),
|
||||
run: async (opts, filenames) => {
|
||||
const eslint = new ESLint({
|
||||
@@ -282,7 +282,7 @@ const LINTERS = [{
|
||||
}, {
|
||||
key: 'md',
|
||||
roots: ['.'],
|
||||
ignoreRoots: ['.git', '.github/workflows/node_modules', 'node_modules', 'spec/node_modules', 'spec/fixtures/native-addon'],
|
||||
ignoreRoots: ['.git', 'node_modules', 'spec/node_modules', 'spec/fixtures/native-addon'],
|
||||
test: filename => filename.endsWith('.md'),
|
||||
run: async (opts, filenames) => {
|
||||
const { getCodeBlocks } = await import('@electron/lint-roller/dist/lib/markdown.js');
|
||||
|
||||
@@ -133,7 +133,12 @@ async function main () {
|
||||
|
||||
const DISABLED_TESTS = new Set([
|
||||
'nannew-test.js',
|
||||
'buffer-test.js'
|
||||
'buffer-test.js',
|
||||
// These two are incompatible with crrev.com/c/4733273
|
||||
// They are disabled upstream starting in "Node.js 24" (note: the incompatible change above
|
||||
// landed in V8 v13.7), so we can remove them from this list once we upgrade Node.js to 24.
|
||||
'weak-test.js',
|
||||
'weak2-test.js'
|
||||
]);
|
||||
const testsToRun = fs.readdirSync(path.resolve(NAN_DIR, 'test', 'js'))
|
||||
.filter(test => !DISABLED_TESTS.has(test))
|
||||
|
||||
@@ -157,7 +157,8 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
|
||||
if (rightmostMenuPoint > screenRight)
|
||||
position.x = position.x - [menu size].width;
|
||||
|
||||
[popup_controllers_[window_id] setCloseCallback:std::move(close_callback)];
|
||||
[popup_controllers_[window_id]
|
||||
setPopupCloseCallback:std::move(close_callback)];
|
||||
|
||||
if (frame && frame->render_frame_host()) {
|
||||
auto* rfh = frame->render_frame_host()->GetOutermostMainFrameOrEmbedder();
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/scoped_observation.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/types/pass_key.h"
|
||||
#include "base/uuid.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/predictors/predictors_traffic_annotations.h" // nogncheck
|
||||
@@ -886,24 +885,6 @@ void Session::SetPermissionRequestHandler(v8::Local<v8::Value> val,
|
||||
blink::PermissionType permission_type,
|
||||
ElectronPermissionManager::StatusCallback callback,
|
||||
const base::Value& details) {
|
||||
#if (BUILDFLAG(IS_MAC))
|
||||
if (permission_type == blink::PermissionType::GEOLOCATION) {
|
||||
if (ElectronPermissionManager::
|
||||
IsGeolocationDisabledViaCommandLine()) {
|
||||
auto original_callback = std::move(callback);
|
||||
callback = base::BindOnce(
|
||||
[](ElectronPermissionManager::StatusCallback callback,
|
||||
content::PermissionResult /*ignored_result*/) {
|
||||
// Always deny regardless of what
|
||||
// content::PermissionResult is passed here
|
||||
std::move(callback).Run(content::PermissionResult(
|
||||
blink::mojom::PermissionStatus::DENIED,
|
||||
content::PermissionStatusSource::UNSPECIFIED));
|
||||
},
|
||||
std::move(original_callback));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
handler->Run(web_contents, permission_type, std::move(callback),
|
||||
details);
|
||||
},
|
||||
@@ -1378,17 +1359,23 @@ v8::Local<v8::Value> Session::ServiceWorkerContext(v8::Isolate* isolate) {
|
||||
return service_worker_context_.Get(isolate);
|
||||
}
|
||||
|
||||
WebRequest* Session::WebRequest(v8::Isolate* isolate) {
|
||||
if (!web_request_)
|
||||
web_request_ = WebRequest::Create(isolate, base::PassKey<Session>{});
|
||||
return web_request_;
|
||||
v8::Local<v8::Value> Session::WebRequest(v8::Isolate* isolate) {
|
||||
if (web_request_.IsEmptyThreadSafe()) {
|
||||
auto handle = WebRequest::Create(isolate, browser_context());
|
||||
web_request_.Reset(isolate, handle.ToV8());
|
||||
}
|
||||
return web_request_.Get(isolate);
|
||||
}
|
||||
|
||||
NetLog* Session::NetLog(v8::Isolate* isolate) {
|
||||
v8::Local<v8::Value> Session::NetLog(v8::Isolate* isolate) {
|
||||
if (!net_log_) {
|
||||
net_log_ = NetLog::Create(isolate, browser_context());
|
||||
}
|
||||
return net_log_;
|
||||
|
||||
v8::Local<v8::Object> wrapper;
|
||||
return net_log_->GetWrapper(isolate).ToLocal(&wrapper)
|
||||
? wrapper.As<v8::Value>()
|
||||
: v8::Null(isolate);
|
||||
}
|
||||
|
||||
static void StartPreconnectOnUI(ElectronBrowserContext* browser_context,
|
||||
@@ -1702,17 +1689,8 @@ gin::WeakCell<Session>* Session::FromBrowserContext(
|
||||
}
|
||||
|
||||
// static
|
||||
Session* Session::FromOrCreate(v8::Isolate* isolate,
|
||||
content::BrowserContext* context) {
|
||||
if (ElectronBrowserContext::IsValidContext(context))
|
||||
return FromOrCreate(isolate, static_cast<ElectronBrowserContext*>(context));
|
||||
DCHECK(false);
|
||||
return {};
|
||||
}
|
||||
|
||||
// static
|
||||
Session* Session::FromOrCreate(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
Session* Session::CreateFrom(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
gin::WeakCell<Session>* existing = FromBrowserContext(browser_context);
|
||||
if (existing && existing->Get()) {
|
||||
return existing->Get();
|
||||
@@ -1753,7 +1731,7 @@ Session* Session::FromPartition(v8::Isolate* isolate,
|
||||
browser_context =
|
||||
ElectronBrowserContext::From(partition, true, std::move(options));
|
||||
}
|
||||
return FromOrCreate(isolate, browser_context);
|
||||
return CreateFrom(isolate, browser_context);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1774,7 +1752,7 @@ Session* Session::FromPath(gin::Arguments* args,
|
||||
browser_context =
|
||||
ElectronBrowserContext::FromPath(std::move(path), std::move(options));
|
||||
|
||||
return FromOrCreate(args->isolate(), browser_context);
|
||||
return CreateFrom(args->isolate(), browser_context);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1899,24 +1877,47 @@ namespace {
|
||||
|
||||
using electron::api::Session;
|
||||
|
||||
Session* FromPartition(const std::string& partition, gin::Arguments* args) {
|
||||
v8::Local<v8::Value> FromPartition(const std::string& partition,
|
||||
gin::Arguments* args) {
|
||||
if (!electron::Browser::Get()->is_ready()) {
|
||||
args->ThrowTypeError("Session can only be received when app is ready");
|
||||
return {};
|
||||
return v8::Null(args->isolate());
|
||||
}
|
||||
base::Value::Dict options;
|
||||
args->GetNext(&options);
|
||||
return Session::FromPartition(args->isolate(), partition, std::move(options));
|
||||
Session* session =
|
||||
Session::FromPartition(args->isolate(), partition, std::move(options));
|
||||
|
||||
if (session) {
|
||||
v8::Local<v8::Object> wrapper;
|
||||
if (!session->GetWrapper(args->isolate()).ToLocal(&wrapper)) {
|
||||
return v8::Null(args->isolate());
|
||||
}
|
||||
return wrapper;
|
||||
} else {
|
||||
return v8::Null(args->isolate());
|
||||
}
|
||||
}
|
||||
|
||||
Session* FromPath(const base::FilePath& path, gin::Arguments* args) {
|
||||
v8::Local<v8::Value> FromPath(const base::FilePath& path,
|
||||
gin::Arguments* args) {
|
||||
if (!electron::Browser::Get()->is_ready()) {
|
||||
args->ThrowTypeError("Session can only be received when app is ready");
|
||||
return {};
|
||||
return v8::Null(args->isolate());
|
||||
}
|
||||
base::Value::Dict options;
|
||||
args->GetNext(&options);
|
||||
return Session::FromPath(args, path, std::move(options));
|
||||
Session* session = Session::FromPath(args, path, std::move(options));
|
||||
|
||||
if (session) {
|
||||
v8::Local<v8::Object> wrapper;
|
||||
if (!session->GetWrapper(args->isolate()).ToLocal(&wrapper)) {
|
||||
return v8::Null(args->isolate());
|
||||
}
|
||||
return wrapper;
|
||||
} else {
|
||||
return v8::Null(args->isolate());
|
||||
}
|
||||
}
|
||||
|
||||
void Initialize(v8::Local<v8::Object> exports,
|
||||
|
||||
@@ -61,7 +61,6 @@ struct PreloadScript;
|
||||
namespace api {
|
||||
|
||||
class NetLog;
|
||||
class WebRequest;
|
||||
|
||||
class Session final : public gin::Wrappable<Session>,
|
||||
public gin_helper::Constructible<Session>,
|
||||
@@ -74,14 +73,8 @@ class Session final : public gin::Wrappable<Session>,
|
||||
private content::DownloadManager::Observer {
|
||||
public:
|
||||
// Gets or creates Session from the |browser_context|.
|
||||
static Session* FromOrCreate(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
// Convenience wrapper around the previous method: Checks that
|
||||
// |browser_context| is an ElectronBrowserContext before downcasting.
|
||||
static Session* FromOrCreate(v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context);
|
||||
|
||||
static Session* CreateFrom(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context);
|
||||
static void New(); // Dummy, do not use!
|
||||
|
||||
static gin::WeakCell<Session>* FromBrowserContext(
|
||||
@@ -170,8 +163,8 @@ class Session final : public gin::Wrappable<Session>,
|
||||
v8::Local<v8::Value> Extensions(v8::Isolate* isolate);
|
||||
v8::Local<v8::Value> Protocol(v8::Isolate* isolate);
|
||||
v8::Local<v8::Value> ServiceWorkerContext(v8::Isolate* isolate);
|
||||
WebRequest* WebRequest(v8::Isolate* isolate);
|
||||
api::NetLog* NetLog(v8::Isolate* isolate);
|
||||
v8::Local<v8::Value> WebRequest(v8::Isolate* isolate);
|
||||
v8::Local<v8::Value> NetLog(v8::Isolate* isolate);
|
||||
void Preconnect(const gin_helper::Dictionary& options, gin::Arguments* args);
|
||||
v8::Local<v8::Promise> CloseAllConnections();
|
||||
v8::Local<v8::Value> GetPath(v8::Isolate* isolate);
|
||||
@@ -218,7 +211,7 @@ class Session final : public gin::Wrappable<Session>,
|
||||
v8::TracedReference<v8::Value> protocol_;
|
||||
cppgc::Member<api::NetLog> net_log_;
|
||||
v8::TracedReference<v8::Value> service_worker_context_;
|
||||
cppgc::Member<api::WebRequest> web_request_;
|
||||
v8::TracedReference<v8::Value> web_request_;
|
||||
|
||||
raw_ptr<v8::Isolate> isolate_;
|
||||
|
||||
|
||||
@@ -754,7 +754,7 @@ WebContents::WebContents(v8::Isolate* isolate,
|
||||
script_executor_ = std::make_unique<extensions::ScriptExecutor>(web_contents);
|
||||
#endif
|
||||
|
||||
session_ = Session::FromOrCreate(isolate, GetBrowserContext());
|
||||
session_ = Session::CreateFrom(isolate, GetBrowserContext());
|
||||
|
||||
SetUserAgent(GetBrowserContext()->GetUserAgent());
|
||||
|
||||
@@ -776,7 +776,7 @@ WebContents::WebContents(v8::Isolate* isolate,
|
||||
{
|
||||
DCHECK(type != Type::kRemote)
|
||||
<< "Can't take ownership of a remote WebContents";
|
||||
session_ = Session::FromOrCreate(isolate, GetBrowserContext());
|
||||
session_ = Session::CreateFrom(isolate, GetBrowserContext());
|
||||
InitWithSessionAndOptions(isolate, std::move(web_contents),
|
||||
session_->browser_context(),
|
||||
gin::Dictionary::CreateEmpty(isolate));
|
||||
|
||||
@@ -5,14 +5,12 @@
|
||||
#include "shell/browser/api/electron_api_web_request.h"
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
#include "base/containers/fixed_flat_map.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/values.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -22,13 +20,11 @@
|
||||
#include "gin/converter.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "gin/persistent.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_web_frame_main.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/javascript_environment.h"
|
||||
#include "shell/browser/login_handler.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/frame_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
@@ -76,6 +72,14 @@ namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
const char kUserDataKey[] = "WebRequest";
|
||||
|
||||
// BrowserContext <=> WebRequest relationship.
|
||||
struct UserData : public base::SupportsUserData::Data {
|
||||
explicit UserData(WebRequest* data) : data(data) {}
|
||||
raw_ptr<WebRequest> data;
|
||||
};
|
||||
|
||||
extensions::WebRequestResourceType ParseResourceType(std::string_view value) {
|
||||
if (auto iter = ResourceTypes.find(value); iter != ResourceTypes.end())
|
||||
return iter->second;
|
||||
@@ -104,7 +108,7 @@ v8::Local<v8::Value> HttpResponseHeadersToV8(
|
||||
|
||||
// Overloaded by multiple types to fill the |details| object.
|
||||
void ToDictionary(gin_helper::Dictionary* details,
|
||||
const extensions::WebRequestInfo* info) {
|
||||
extensions::WebRequestInfo* info) {
|
||||
details->Set("id", info->id);
|
||||
details->Set("url", info->url);
|
||||
details->Set("method", info->method);
|
||||
@@ -205,8 +209,7 @@ CalculateOnBeforeSendHeadersDelta(const net::HttpRequestHeaders* old_headers,
|
||||
|
||||
} // namespace
|
||||
|
||||
const gin::WrapperInfo WebRequest::kWrapperInfo = {{gin::kEmbedderNativeGin},
|
||||
gin::kElectronWebRequest};
|
||||
gin::DeprecatedWrapperInfo WebRequest::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
WebRequest::RequestFilter::RequestFilter(
|
||||
std::set<URLPattern> include_url_patterns,
|
||||
@@ -252,7 +255,7 @@ bool WebRequest::RequestFilter::MatchesType(
|
||||
}
|
||||
|
||||
bool WebRequest::RequestFilter::MatchesRequest(
|
||||
const extensions::WebRequestInfo* info) const {
|
||||
extensions::WebRequestInfo* info) const {
|
||||
// Matches URL and type, and does not match exclude URL.
|
||||
return MatchesURL(info->url, include_url_patterns_) &&
|
||||
!MatchesURL(info->url, exclude_url_patterns_) &&
|
||||
@@ -284,10 +287,6 @@ struct WebRequest::BlockedRequest {
|
||||
net::CompletionOnceCallback callback;
|
||||
// Only used for onBeforeSendHeaders.
|
||||
BeforeSendHeadersCallback before_send_headers_callback;
|
||||
// The callback to invoke for auth. If |auth_callback.is_null()| is false,
|
||||
// |callback| must be NULL.
|
||||
// Only valid for OnAuthRequired.
|
||||
AuthCallback auth_callback;
|
||||
// Only used for onBeforeSendHeaders.
|
||||
raw_ptr<net::HttpRequestHeaders> request_headers = nullptr;
|
||||
// Only used for onHeadersReceived.
|
||||
@@ -298,8 +297,6 @@ struct WebRequest::BlockedRequest {
|
||||
std::string status_line;
|
||||
// Only used for onBeforeRequest.
|
||||
raw_ptr<GURL> new_url = nullptr;
|
||||
// Owns the LoginHandler while waiting for auth credentials.
|
||||
std::unique_ptr<LoginHandler> login_handler;
|
||||
};
|
||||
|
||||
WebRequest::SimpleListenerInfo::SimpleListenerInfo(RequestFilter filter_,
|
||||
@@ -315,12 +312,20 @@ WebRequest::ResponseListenerInfo::ResponseListenerInfo(
|
||||
WebRequest::ResponseListenerInfo::ResponseListenerInfo() = default;
|
||||
WebRequest::ResponseListenerInfo::~ResponseListenerInfo() = default;
|
||||
|
||||
WebRequest::WebRequest(base::PassKey<Session>) {}
|
||||
WebRequest::~WebRequest() = default;
|
||||
WebRequest::WebRequest(v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context)
|
||||
: browser_context_(browser_context) {
|
||||
browser_context_->SetUserData(kUserDataKey, std::make_unique<UserData>(this));
|
||||
}
|
||||
|
||||
WebRequest::~WebRequest() {
|
||||
browser_context_->RemoveUserData(kUserDataKey);
|
||||
}
|
||||
|
||||
gin::ObjectTemplateBuilder WebRequest::GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) {
|
||||
return gin::Wrappable<WebRequest>::GetObjectTemplateBuilder(isolate)
|
||||
return gin_helper::DeprecatedWrappable<WebRequest>::GetObjectTemplateBuilder(
|
||||
isolate)
|
||||
.SetMethod(
|
||||
"onBeforeRequest",
|
||||
&WebRequest::SetResponseListener<ResponseEvent::kOnBeforeRequest>)
|
||||
@@ -343,17 +348,8 @@ gin::ObjectTemplateBuilder WebRequest::GetObjectTemplateBuilder(
|
||||
&WebRequest::SetSimpleListener<SimpleEvent::kOnCompleted>);
|
||||
}
|
||||
|
||||
const gin::WrapperInfo* WebRequest::wrapper_info() const {
|
||||
return &kWrapperInfo;
|
||||
}
|
||||
|
||||
const char* WebRequest::GetHumanReadableName() const {
|
||||
return "Electron / WebRequest";
|
||||
}
|
||||
|
||||
void WebRequest::Trace(cppgc::Visitor* visitor) const {
|
||||
gin::Wrappable<WebRequest>::Trace(visitor);
|
||||
visitor->Trace(weak_factory_);
|
||||
const char* WebRequest::GetTypeName() {
|
||||
return GetClassName();
|
||||
}
|
||||
|
||||
bool WebRequest::HasListener() const {
|
||||
@@ -391,22 +387,20 @@ int WebRequest::HandleOnBeforeRequestResponseEvent(
|
||||
gin_helper::Dictionary details(isolate, v8::Object::New(isolate));
|
||||
FillDetails(&details, request_info, request, *new_url);
|
||||
|
||||
auto& allocation_handle = isolate->GetCppHeap()->GetAllocationHandle();
|
||||
ResponseCallback response = base::BindOnce(
|
||||
&WebRequest::OnBeforeRequestListenerResult,
|
||||
gin::WrapPersistent(weak_factory_.GetWeakCell(allocation_handle)),
|
||||
request_info->id);
|
||||
ResponseCallback response =
|
||||
base::BindOnce(&WebRequest::OnBeforeRequestListenerResult,
|
||||
base::Unretained(this), request_info->id);
|
||||
info.listener.Run(gin::ConvertToV8(isolate, details), std::move(response));
|
||||
return net::ERR_IO_PENDING;
|
||||
}
|
||||
|
||||
void WebRequest::OnBeforeRequestListenerResult(uint64_t id,
|
||||
v8::Local<v8::Value> response) {
|
||||
auto nh = blocked_requests_.extract(id);
|
||||
if (!nh)
|
||||
const auto iter = blocked_requests_.find(id);
|
||||
if (iter == std::end(blocked_requests_))
|
||||
return;
|
||||
|
||||
auto& request = nh.mapped();
|
||||
auto& request = iter->second;
|
||||
|
||||
int result = net::OK;
|
||||
if (response->IsObject()) {
|
||||
@@ -424,6 +418,7 @@ void WebRequest::OnBeforeRequestListenerResult(uint64_t id,
|
||||
|
||||
base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(std::move(request.callback), result));
|
||||
blocked_requests_.erase(iter);
|
||||
}
|
||||
|
||||
int WebRequest::OnBeforeSendHeaders(extensions::WebRequestInfo* info,
|
||||
@@ -468,11 +463,11 @@ int WebRequest::HandleOnBeforeSendHeadersResponseEvent(
|
||||
void WebRequest::OnBeforeSendHeadersListenerResult(
|
||||
uint64_t id,
|
||||
v8::Local<v8::Value> response) {
|
||||
auto nh = blocked_requests_.extract(id);
|
||||
if (!nh)
|
||||
const auto iter = blocked_requests_.find(id);
|
||||
if (iter == std::end(blocked_requests_))
|
||||
return;
|
||||
|
||||
auto& request = nh.mapped();
|
||||
auto& request = iter->second;
|
||||
|
||||
net::HttpRequestHeaders* old_headers = request.request_headers;
|
||||
net::HttpRequestHeaders new_headers;
|
||||
@@ -510,6 +505,7 @@ void WebRequest::OnBeforeSendHeadersListenerResult(
|
||||
FROM_HERE,
|
||||
base::BindOnce(std::move(request.before_send_headers_callback),
|
||||
updated_headers.first, updated_headers.second, result));
|
||||
blocked_requests_.erase(iter);
|
||||
}
|
||||
|
||||
int WebRequest::OnHeadersReceived(
|
||||
@@ -561,11 +557,11 @@ int WebRequest::HandleOnHeadersReceivedResponseEvent(
|
||||
void WebRequest::OnHeadersReceivedListenerResult(
|
||||
uint64_t id,
|
||||
v8::Local<v8::Value> response) {
|
||||
auto nh = blocked_requests_.extract(id);
|
||||
if (!nh)
|
||||
const auto iter = blocked_requests_.find(id);
|
||||
if (iter == std::end(blocked_requests_))
|
||||
return;
|
||||
|
||||
auto& request = nh.mapped();
|
||||
auto& request = iter->second;
|
||||
|
||||
int result = net::OK;
|
||||
bool user_modified_headers = false;
|
||||
@@ -598,6 +594,7 @@ void WebRequest::OnHeadersReceivedListenerResult(
|
||||
|
||||
base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(std::move(request.callback), result));
|
||||
blocked_requests_.erase(iter);
|
||||
}
|
||||
|
||||
void WebRequest::OnSendHeaders(extensions::WebRequestInfo* info,
|
||||
@@ -606,36 +603,6 @@ void WebRequest::OnSendHeaders(extensions::WebRequestInfo* info,
|
||||
HandleSimpleEvent(SimpleEvent::kOnSendHeaders, info, request, headers);
|
||||
}
|
||||
|
||||
WebRequest::AuthRequiredResponse WebRequest::OnAuthRequired(
|
||||
const extensions::WebRequestInfo* request_info,
|
||||
const net::AuthChallengeInfo& auth_info,
|
||||
WebRequest::AuthCallback callback,
|
||||
net::AuthCredentials* credentials) {
|
||||
content::RenderFrameHost* rfh = content::RenderFrameHost::FromID(
|
||||
request_info->render_process_id, request_info->frame_routing_id);
|
||||
content::WebContents* web_contents = nullptr;
|
||||
if (rfh)
|
||||
web_contents = content::WebContents::FromRenderFrameHost(rfh);
|
||||
|
||||
BlockedRequest blocked_request;
|
||||
blocked_request.auth_callback = std::move(callback);
|
||||
blocked_requests_[request_info->id] = std::move(blocked_request);
|
||||
|
||||
auto login_callback =
|
||||
base::BindOnce(&WebRequest::OnLoginAuthResult, base::Unretained(this),
|
||||
request_info->id, credentials);
|
||||
|
||||
scoped_refptr<net::HttpResponseHeaders> response_headers =
|
||||
request_info->response_headers;
|
||||
blocked_requests_[request_info->id].login_handler =
|
||||
std::make_unique<LoginHandler>(
|
||||
auth_info, web_contents,
|
||||
static_cast<base::ProcessId>(request_info->render_process_id),
|
||||
request_info->url, response_headers, std::move(login_callback));
|
||||
|
||||
return AuthRequiredResponse::AUTH_REQUIRED_RESPONSE_IO_PENDING;
|
||||
}
|
||||
|
||||
void WebRequest::OnBeforeRedirect(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
const GURL& new_location) {
|
||||
@@ -765,35 +732,44 @@ void WebRequest::HandleSimpleEvent(SimpleEvent event,
|
||||
info.listener.Run(gin::ConvertToV8(isolate, details));
|
||||
}
|
||||
|
||||
void WebRequest::OnLoginAuthResult(
|
||||
uint64_t id,
|
||||
net::AuthCredentials* credentials,
|
||||
const std::optional<net::AuthCredentials>& maybe_creds) {
|
||||
auto nh = blocked_requests_.extract(id);
|
||||
CHECK(nh);
|
||||
|
||||
AuthRequiredResponse action =
|
||||
AuthRequiredResponse::AUTH_REQUIRED_RESPONSE_NO_ACTION;
|
||||
if (maybe_creds.has_value()) {
|
||||
*credentials = maybe_creds.value();
|
||||
action = AuthRequiredResponse::AUTH_REQUIRED_RESPONSE_SET_AUTH;
|
||||
// static
|
||||
gin_helper::Handle<WebRequest> WebRequest::FromOrCreate(
|
||||
v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context) {
|
||||
gin_helper::Handle<WebRequest> handle = From(isolate, browser_context);
|
||||
if (handle.IsEmpty()) {
|
||||
// Make sure the |Session| object has the |webRequest| property created.
|
||||
v8::Local<v8::Value> web_request =
|
||||
Session::CreateFrom(
|
||||
isolate, static_cast<ElectronBrowserContext*>(browser_context))
|
||||
->WebRequest(isolate);
|
||||
gin::ConvertFromV8(isolate, web_request, &handle);
|
||||
}
|
||||
|
||||
base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(std::move(nh.mapped().auth_callback), action));
|
||||
DCHECK(!handle.IsEmpty());
|
||||
return handle;
|
||||
}
|
||||
|
||||
// static
|
||||
WebRequest* WebRequest::FromOrCreate(v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context) {
|
||||
return Session::FromOrCreate(isolate, browser_context)->WebRequest(isolate);
|
||||
gin_helper::Handle<WebRequest> WebRequest::Create(
|
||||
v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context) {
|
||||
DCHECK(From(isolate, browser_context).IsEmpty())
|
||||
<< "WebRequest already created";
|
||||
return gin_helper::CreateHandle(isolate,
|
||||
new WebRequest(isolate, browser_context));
|
||||
}
|
||||
|
||||
// static
|
||||
WebRequest* WebRequest::Create(v8::Isolate* isolate,
|
||||
base::PassKey<Session> passkey) {
|
||||
return cppgc::MakeGarbageCollected<WebRequest>(
|
||||
isolate->GetCppHeap()->GetAllocationHandle(), std::move(passkey));
|
||||
gin_helper::Handle<WebRequest> WebRequest::From(
|
||||
v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context) {
|
||||
if (!browser_context)
|
||||
return {};
|
||||
auto* user_data =
|
||||
static_cast<UserData*>(browser_context->GetUserData(kUserDataKey));
|
||||
if (!user_data)
|
||||
return {};
|
||||
return gin_helper::CreateHandle(isolate, user_data->data.get());
|
||||
}
|
||||
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -7,13 +7,10 @@
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "base/types/pass_key.h"
|
||||
#include "gin/weak_cell.h"
|
||||
#include "gin/wrappable.h"
|
||||
#include "net/base/completion_once_callback.h"
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "shell/browser/net/web_request_api_interface.h"
|
||||
#include "shell/common/gin_helper/wrappable.h"
|
||||
|
||||
class URLPattern;
|
||||
|
||||
@@ -22,7 +19,6 @@ class BrowserContext;
|
||||
}
|
||||
|
||||
namespace extensions {
|
||||
struct WebRequestInfo;
|
||||
enum class WebRequestResourceType : uint8_t;
|
||||
} // namespace extensions
|
||||
|
||||
@@ -37,96 +33,72 @@ class Handle;
|
||||
|
||||
namespace electron::api {
|
||||
|
||||
class Session;
|
||||
|
||||
class WebRequest final : public gin::Wrappable<WebRequest> {
|
||||
class WebRequest final : public gin_helper::DeprecatedWrappable<WebRequest>,
|
||||
public WebRequestAPI {
|
||||
public:
|
||||
using BeforeSendHeadersCallback =
|
||||
base::OnceCallback<void(const std::set<std::string>& removed_headers,
|
||||
const std::set<std::string>& set_headers,
|
||||
int error_code)>;
|
||||
// Return the WebRequest object attached to |browser_context|, create if there
|
||||
// is no one.
|
||||
// Note that the lifetime of WebRequest object is managed by Session, instead
|
||||
// of the caller.
|
||||
static gin_helper::Handle<WebRequest> FromOrCreate(
|
||||
v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context);
|
||||
|
||||
// AuthRequiredResponse indicates how an OnAuthRequired call is handled.
|
||||
enum class AuthRequiredResponse {
|
||||
// No credentials were provided.
|
||||
AUTH_REQUIRED_RESPONSE_NO_ACTION,
|
||||
// AuthCredentials is filled in with a username and password, which should
|
||||
// be used in a response to the provided auth challenge.
|
||||
AUTH_REQUIRED_RESPONSE_SET_AUTH,
|
||||
// The request should be canceled.
|
||||
AUTH_REQUIRED_RESPONSE_CANCEL_AUTH,
|
||||
// The action will be decided asynchronously. |callback| will be invoked
|
||||
// when the decision is made, and one of the other AuthRequiredResponse
|
||||
// values will be passed in with the same semantics as described above.
|
||||
AUTH_REQUIRED_RESPONSE_IO_PENDING,
|
||||
};
|
||||
// Return a new WebRequest object, this should only be called by Session.
|
||||
static gin_helper::Handle<WebRequest> Create(
|
||||
v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context);
|
||||
|
||||
using AuthCallback = base::OnceCallback<void(AuthRequiredResponse)>;
|
||||
|
||||
// Convenience wrapper around api::Session::FromOrCreate()->WebRequest().
|
||||
// Creates the Session and WebRequest if they don't already exist.
|
||||
// Note that the WebRequest is owned by the session, not by the caller.
|
||||
static WebRequest* FromOrCreate(v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context);
|
||||
|
||||
// Return a new WebRequest object. This can only be called by api::Session.
|
||||
static WebRequest* Create(v8::Isolate* isolate, base::PassKey<Session>);
|
||||
|
||||
// Make public for cppgc::MakeGarbageCollected.
|
||||
explicit WebRequest(base::PassKey<Session>);
|
||||
~WebRequest() override;
|
||||
|
||||
// disable copy
|
||||
WebRequest(const WebRequest&) = delete;
|
||||
WebRequest& operator=(const WebRequest&) = delete;
|
||||
// Find the WebRequest object attached to |browser_context|.
|
||||
static gin_helper::Handle<WebRequest> From(
|
||||
v8::Isolate* isolate,
|
||||
content::BrowserContext* browser_context);
|
||||
|
||||
static const char* GetClassName() { return "WebRequest"; }
|
||||
|
||||
// gin::Wrappable:
|
||||
static const gin::WrapperInfo kWrapperInfo;
|
||||
void Trace(cppgc::Visitor*) const override;
|
||||
const gin::WrapperInfo* wrapper_info() const override;
|
||||
const char* GetHumanReadableName() const override;
|
||||
// gin_helper::Wrappable:
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
bool HasListener() const;
|
||||
// WebRequestAPI:
|
||||
bool HasListener() const override;
|
||||
int OnBeforeRequest(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
net::CompletionOnceCallback callback,
|
||||
GURL* new_url);
|
||||
GURL* new_url) override;
|
||||
int OnBeforeSendHeaders(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
BeforeSendHeadersCallback callback,
|
||||
net::HttpRequestHeaders* headers);
|
||||
net::HttpRequestHeaders* headers) override;
|
||||
int OnHeadersReceived(
|
||||
extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
net::CompletionOnceCallback callback,
|
||||
const net::HttpResponseHeaders* original_response_headers,
|
||||
scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
|
||||
GURL* allowed_unsafe_redirect_url);
|
||||
GURL* allowed_unsafe_redirect_url) override;
|
||||
void OnSendHeaders(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
const net::HttpRequestHeaders& headers);
|
||||
AuthRequiredResponse OnAuthRequired(const extensions::WebRequestInfo* info,
|
||||
const net::AuthChallengeInfo& auth_info,
|
||||
AuthCallback callback,
|
||||
net::AuthCredentials* credentials);
|
||||
const net::HttpRequestHeaders& headers) override;
|
||||
void OnBeforeRedirect(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
const GURL& new_location);
|
||||
const GURL& new_location) override;
|
||||
void OnResponseStarted(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request);
|
||||
const network::ResourceRequest& request) override;
|
||||
void OnErrorOccurred(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
int net_error);
|
||||
int net_error) override;
|
||||
void OnCompleted(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
int net_error);
|
||||
void OnRequestWillBeDestroyed(extensions::WebRequestInfo* info);
|
||||
int net_error) override;
|
||||
void OnRequestWillBeDestroyed(extensions::WebRequestInfo* info) override;
|
||||
|
||||
private:
|
||||
WebRequest(v8::Isolate* isolate, content::BrowserContext* browser_context);
|
||||
~WebRequest() override;
|
||||
|
||||
// Contains info about requests that are blocked waiting for a response from
|
||||
// the user.
|
||||
struct BlockedRequest;
|
||||
@@ -185,12 +157,6 @@ class WebRequest final : public gin::Wrappable<WebRequest> {
|
||||
v8::Local<v8::Value> response);
|
||||
void OnHeadersReceivedListenerResult(uint64_t id,
|
||||
v8::Local<v8::Value> response);
|
||||
// Callback invoked by LoginHandler when auth credentials are supplied via
|
||||
// the unified 'login' event. Bridges back into WebRequest's AuthCallback.
|
||||
void OnLoginAuthResult(
|
||||
uint64_t id,
|
||||
net::AuthCredentials* credentials,
|
||||
const std::optional<net::AuthCredentials>& maybe_creds);
|
||||
|
||||
class RequestFilter {
|
||||
public:
|
||||
@@ -208,7 +174,7 @@ class WebRequest final : public gin::Wrappable<WebRequest> {
|
||||
bool is_match_pattern = true);
|
||||
void AddType(extensions::WebRequestResourceType type);
|
||||
|
||||
bool MatchesRequest(const extensions::WebRequestInfo* info) const;
|
||||
bool MatchesRequest(extensions::WebRequestInfo* info) const;
|
||||
|
||||
private:
|
||||
bool MatchesURL(const GURL& url,
|
||||
@@ -242,7 +208,8 @@ class WebRequest final : public gin::Wrappable<WebRequest> {
|
||||
std::map<ResponseEvent, ResponseListenerInfo> response_listeners_;
|
||||
std::map<uint64_t, BlockedRequest> blocked_requests_;
|
||||
|
||||
gin::WeakCellFactory<WebRequest> weak_factory_{this};
|
||||
// Weak-ref, it manages us.
|
||||
raw_ptr<content::BrowserContext> browser_context_;
|
||||
};
|
||||
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -543,9 +543,6 @@ v8::Local<v8::Promise> Browser::DockShow(v8::Isolate* isolate) {
|
||||
gin_helper::Promise<void> promise(isolate);
|
||||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
for (auto* const& window : WindowList::GetWindows())
|
||||
[window->GetNativeWindow().GetNativeNSWindow() setCanHide:YES];
|
||||
|
||||
BOOL active = [[NSRunningApplication currentApplication] isActive];
|
||||
ProcessSerialNumber psn = {0, kCurrentProcess};
|
||||
if (active) {
|
||||
|
||||
@@ -1272,11 +1272,11 @@ bool ElectronBrowserClient::WillInterceptWebSocket(
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
auto* browser_context = frame->GetProcess()->GetBrowserContext();
|
||||
auto* web_request = api::WebRequest::FromOrCreate(isolate, browser_context);
|
||||
auto web_request = api::WebRequest::FromOrCreate(isolate, browser_context);
|
||||
|
||||
// NOTE: Some unit test environments do not initialize
|
||||
// BrowserContextKeyedAPI factories for e.g. WebRequest.
|
||||
if (!web_request)
|
||||
if (!web_request.get())
|
||||
return false;
|
||||
|
||||
bool has_listener = web_request->HasListener();
|
||||
@@ -1304,8 +1304,8 @@ void ElectronBrowserClient::CreateWebSocket(
|
||||
v8::HandleScope scope(isolate);
|
||||
auto* browser_context = frame->GetProcess()->GetBrowserContext();
|
||||
|
||||
auto* web_request = api::WebRequest::FromOrCreate(isolate, browser_context);
|
||||
DCHECK(web_request);
|
||||
auto web_request = api::WebRequest::FromOrCreate(isolate, browser_context);
|
||||
DCHECK(web_request.get());
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
if (!web_request->HasListener()) {
|
||||
@@ -1322,7 +1322,7 @@ void ElectronBrowserClient::CreateWebSocket(
|
||||
#endif
|
||||
|
||||
ProxyingWebSocket::StartProxying(
|
||||
web_request, std::move(factory), url, site_for_cookies, user_agent,
|
||||
web_request.get(), std::move(factory), url, site_for_cookies, user_agent,
|
||||
std::move(handshake_client), true, frame->GetProcess()->GetDeprecatedID(),
|
||||
frame->GetRoutingID(), frame->GetLastCommittedOrigin(), browser_context,
|
||||
&next_id_);
|
||||
@@ -1346,9 +1346,8 @@ void ElectronBrowserClient::WillCreateURLLoaderFactory(
|
||||
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
auto* const web_request =
|
||||
api::WebRequest::FromOrCreate(isolate, browser_context);
|
||||
DCHECK(web_request);
|
||||
auto web_request = api::WebRequest::FromOrCreate(isolate, browser_context);
|
||||
DCHECK(web_request.get());
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
if (!web_request->HasListener()) {
|
||||
@@ -1389,18 +1388,13 @@ void ElectronBrowserClient::WillCreateURLLoaderFactory(
|
||||
|
||||
auto* protocol_registry =
|
||||
ProtocolRegistry::FromBrowserContext(browser_context);
|
||||
new ProxyingURLLoaderFactory{
|
||||
web_request,
|
||||
protocol_registry->intercept_handlers(),
|
||||
new ProxyingURLLoaderFactory(
|
||||
web_request.get(), protocol_registry->intercept_handlers(),
|
||||
render_process_id,
|
||||
frame_host ? frame_host->GetRoutingID() : IPC::mojom::kRoutingIdNone,
|
||||
&next_id_,
|
||||
std::move(navigation_ui_data),
|
||||
std::move(navigation_id),
|
||||
std::move(proxied_receiver),
|
||||
std::move(target_factory_remote),
|
||||
std::move(header_client_receiver),
|
||||
type};
|
||||
&next_id_, std::move(navigation_ui_data), std::move(navigation_id),
|
||||
std::move(proxied_receiver), std::move(target_factory_remote),
|
||||
std::move(header_client_receiver), type);
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "services/device/public/cpp/geolocation/geolocation_system_permission_manager.h"
|
||||
#include "services/device/public/cpp/geolocation/system_geolocation_source_apple.h"
|
||||
#include "shell/browser/browser_process_impl.h"
|
||||
#include "shell/browser/electron_permission_manager.h"
|
||||
#include "shell/browser/mac/electron_application.h"
|
||||
#include "shell/browser/mac/electron_application_delegate.h"
|
||||
#include "ui/base/l10n/l10n_util_mac.h"
|
||||
@@ -33,13 +32,7 @@ void ElectronBrowserMainParts::PreCreateMainMessageLoop() {
|
||||
setObject:@"NO"
|
||||
forKey:@"NSTreatUnknownArgumentsAsOpen"];
|
||||
|
||||
const bool geolocationDisabled =
|
||||
ElectronPermissionManager::IsGeolocationDisabledViaCommandLine();
|
||||
|
||||
// Check if geolocation api is NOT disabled via command line before
|
||||
// CreateGeolocationSystemPermissionManager is called
|
||||
if (!geolocationDisabled &&
|
||||
!device::GeolocationSystemPermissionManager::GetInstance()) {
|
||||
if (!device::GeolocationSystemPermissionManager::GetInstance()) {
|
||||
device::GeolocationSystemPermissionManager::SetInstance(
|
||||
device::SystemGeolocationSourceApple::
|
||||
CreateGeolocationSystemPermissionManager());
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/containers/to_vector.h"
|
||||
#include "base/values.h"
|
||||
#include "content/browser/permissions/permission_util.h" // nogncheck
|
||||
@@ -147,17 +146,6 @@ void ElectronPermissionManager::SetBluetoothPairingHandler(
|
||||
bluetooth_pairing_handler_ = handler;
|
||||
}
|
||||
|
||||
// static
|
||||
bool ElectronPermissionManager::IsGeolocationDisabledViaCommandLine() {
|
||||
// Remove platform check once flag is extended to other platforms
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
return command_line->HasSwitch("disable-geolocation");
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ElectronPermissionManager::HasPermissionRequestHandler() const {
|
||||
return !request_handler_.is_null();
|
||||
}
|
||||
@@ -232,16 +220,9 @@ void ElectronPermissionManager::RequestPermissionsWithDetails(
|
||||
->GrantSendMidiSysExMessage(
|
||||
render_frame_host->GetProcess()->GetDeprecatedID());
|
||||
} else if (permission_type == blink::PermissionType::GEOLOCATION) {
|
||||
if (IsGeolocationDisabledViaCommandLine()) {
|
||||
results.push_back(content::PermissionResult(
|
||||
blink::mojom::PermissionStatus::DENIED,
|
||||
content::PermissionStatusSource::UNSPECIFIED));
|
||||
continue;
|
||||
} else {
|
||||
ElectronBrowserMainParts::Get()
|
||||
->GetGeolocationControl()
|
||||
->UserDidOptIntoLocationServices();
|
||||
}
|
||||
ElectronBrowserMainParts::Get()
|
||||
->GetGeolocationControl()
|
||||
->UserDidOptIntoLocationServices();
|
||||
}
|
||||
results.push_back(content::PermissionResult(
|
||||
blink::mojom::PermissionStatus::GRANTED,
|
||||
@@ -350,10 +331,6 @@ bool ElectronPermissionManager::CheckPermissionWithDetails(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
base::Value::Dict details) const {
|
||||
if (permission == blink::PermissionType::GEOLOCATION &&
|
||||
IsGeolocationDisabledViaCommandLine())
|
||||
return false;
|
||||
|
||||
if (check_handler_.is_null()) {
|
||||
if (permission == blink::PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ) {
|
||||
return false;
|
||||
@@ -391,10 +368,6 @@ bool ElectronPermissionManager::CheckDevicePermission(
|
||||
const url::Origin& origin,
|
||||
const base::Value& device,
|
||||
ElectronBrowserContext* browser_context) const {
|
||||
if (permission == blink::PermissionType::GEOLOCATION &&
|
||||
IsGeolocationDisabledViaCommandLine())
|
||||
return false;
|
||||
|
||||
if (device_permission_handler_.is_null())
|
||||
return browser_context->CheckDevicePermission(origin, device, permission);
|
||||
|
||||
|
||||
@@ -66,8 +66,6 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate {
|
||||
using BluetoothPairingHandler =
|
||||
base::RepeatingCallback<void(gin_helper::Dictionary, PairCallback)>;
|
||||
|
||||
static bool IsGeolocationDisabledViaCommandLine();
|
||||
|
||||
void RequestPermissionWithDetails(
|
||||
blink::mojom::PermissionDescriptorPtr permission,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
|
||||
@@ -33,7 +33,8 @@ void ExtensionActionAPI::Observer::OnExtensionActionAPIShuttingDown() {}
|
||||
// ExtensionActionAPI
|
||||
//
|
||||
|
||||
ExtensionActionAPI::ExtensionActionAPI(content::BrowserContext*) {}
|
||||
ExtensionActionAPI::ExtensionActionAPI(content::BrowserContext* context)
|
||||
: browser_context_(context), extension_prefs_(nullptr) {}
|
||||
|
||||
// static
|
||||
BrowserContextKeyedAPIFactory<ExtensionActionAPI>*
|
||||
@@ -48,6 +49,10 @@ ExtensionActionAPI* ExtensionActionAPI::Get(content::BrowserContext* context) {
|
||||
return BrowserContextKeyedAPIFactory<ExtensionActionAPI>::Get(context);
|
||||
}
|
||||
|
||||
ExtensionPrefs* ExtensionActionAPI::GetExtensionPrefs() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ExtensionActionAPI::Shutdown() {}
|
||||
|
||||
//
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
|
||||
#define SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "extensions/browser/browser_context_keyed_api_factory.h"
|
||||
#include "extensions/browser/extension_action.h"
|
||||
#include "extensions/browser/extension_function.h"
|
||||
@@ -69,10 +70,16 @@ class ExtensionActionAPI : public BrowserContextKeyedAPI {
|
||||
private:
|
||||
friend class BrowserContextKeyedAPIFactory<ExtensionActionAPI>;
|
||||
|
||||
ExtensionPrefs* GetExtensionPrefs();
|
||||
|
||||
// BrowserContextKeyedAPI implementation.
|
||||
void Shutdown() override;
|
||||
static const char* service_name() { return "ExtensionActionAPI"; }
|
||||
static const bool kServiceRedirectedInIncognito = true;
|
||||
|
||||
raw_ptr<content::BrowserContext> browser_context_;
|
||||
|
||||
raw_ptr<ExtensionPrefs> extension_prefs_;
|
||||
};
|
||||
|
||||
// Implementation of the browserAction and pageAction APIs.
|
||||
|
||||
@@ -145,9 +145,8 @@ void ElectronExtensionLoader::FinishExtensionLoad(
|
||||
if (extension) {
|
||||
extension_registrar_->AddExtension(extension);
|
||||
|
||||
// Write extension install time to ExtensionPrefs.
|
||||
// This is required by extensions::WebRequestAPI
|
||||
// which calls extensions::ExtensionPrefs::GetInstallTime.
|
||||
// Write extension install time to ExtensionPrefs. This is required by
|
||||
// WebRequestAPI which calls extensions::ExtensionPrefs::GetInstallTime.
|
||||
//
|
||||
// Implementation for writing the pref was based on
|
||||
// PreferenceAPIBase::SetExtensionControlledPref.
|
||||
|
||||
@@ -42,23 +42,6 @@ LoginHandler::LoginHandler(
|
||||
response_headers, first_auth_attempt));
|
||||
}
|
||||
|
||||
LoginHandler::LoginHandler(
|
||||
const net::AuthChallengeInfo& auth_info,
|
||||
content::WebContents* web_contents,
|
||||
base::ProcessId process_id,
|
||||
const GURL& url,
|
||||
scoped_refptr<net::HttpResponseHeaders> response_headers,
|
||||
content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback)
|
||||
: LoginHandler(auth_info,
|
||||
web_contents,
|
||||
/*is_request_for_primary_main_frame=*/false,
|
||||
/*is_request_for_navigation=*/false,
|
||||
process_id,
|
||||
url,
|
||||
std::move(response_headers),
|
||||
/*first_auth_attempt=*/false,
|
||||
std::move(auth_required_callback)) {}
|
||||
|
||||
void LoginHandler::EmitEvent(
|
||||
net::AuthChallengeInfo auth_info,
|
||||
content::WebContents* web_contents,
|
||||
|
||||
@@ -32,13 +32,6 @@ class LoginHandler : public content::LoginDelegate {
|
||||
scoped_refptr<net::HttpResponseHeaders> response_headers,
|
||||
bool first_auth_attempt,
|
||||
content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback);
|
||||
LoginHandler(
|
||||
const net::AuthChallengeInfo& auth_info,
|
||||
content::WebContents* web_contents,
|
||||
base::ProcessId process_id,
|
||||
const GURL& url,
|
||||
scoped_refptr<net::HttpResponseHeaders> response_headers,
|
||||
content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback);
|
||||
~LoginHandler() override;
|
||||
|
||||
// disable copy
|
||||
|
||||
@@ -88,7 +88,7 @@ ProxyingURLLoaderFactory::InProgressRequest::~InProgressRequest() {
|
||||
// This is important to ensure that no outstanding blocking requests continue
|
||||
// to reference state owned by this object.
|
||||
if (info_) {
|
||||
factory_->web_request_->OnRequestWillBeDestroyed(&info_.value());
|
||||
factory_->web_request_api()->OnRequestWillBeDestroyed(&info_.value());
|
||||
}
|
||||
if (on_before_send_headers_callback_) {
|
||||
std::move(on_before_send_headers_callback_)
|
||||
@@ -147,7 +147,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::RestartInternal() {
|
||||
weak_factory_.GetWeakPtr());
|
||||
}
|
||||
redirect_url_ = GURL();
|
||||
int result = factory_->web_request_->OnBeforeRequest(
|
||||
int result = factory_->web_request_api()->OnBeforeRequest(
|
||||
&info_.value(), request_, continuation, &redirect_url_);
|
||||
if (result == net::ERR_BLOCKED_BY_CLIENT) {
|
||||
// The request was cancelled synchronously. Dispatch an error notification
|
||||
@@ -293,8 +293,8 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnComplete(
|
||||
}
|
||||
|
||||
target_client_->OnComplete(status);
|
||||
factory_->web_request_->OnCompleted(&info_.value(), request_,
|
||||
status.error_code);
|
||||
factory_->web_request_api()->OnCompleted(&info_.value(), request_,
|
||||
status.error_code);
|
||||
|
||||
// Deletes |this|.
|
||||
factory_->RemoveRequest(network_service_request_id_, request_id_);
|
||||
@@ -442,7 +442,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToBeforeSendHeaders(
|
||||
auto continuation = base::BindRepeating(
|
||||
&InProgressRequest::ContinueToSendHeaders, weak_factory_.GetWeakPtr());
|
||||
// Note: In Electron onBeforeSendHeaders is called for all protocols.
|
||||
int result = factory_->web_request_->OnBeforeSendHeaders(
|
||||
int result = factory_->web_request_api()->OnBeforeSendHeaders(
|
||||
&info_.value(), request_, continuation, &request_.headers);
|
||||
|
||||
if (result == net::ERR_BLOCKED_BY_CLIENT) {
|
||||
@@ -556,8 +556,8 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToSendHeaders(
|
||||
proxied_client_receiver_.Resume();
|
||||
|
||||
// Note: In Electron onSendHeaders is called for all protocols.
|
||||
factory_->web_request_->OnSendHeaders(&info_.value(), request_,
|
||||
request_.headers);
|
||||
factory_->web_request_api()->OnSendHeaders(&info_.value(), request_,
|
||||
request_.headers);
|
||||
|
||||
if (!current_request_uses_header_client_)
|
||||
ContinueToStartRequest(net::OK);
|
||||
@@ -599,8 +599,8 @@ void ProxyingURLLoaderFactory::InProgressRequest::
|
||||
if (info_->response_code == net::HTTP_PROXY_AUTHENTICATION_REQUIRED)
|
||||
return;
|
||||
// We notify the completion here, and delete |this|.
|
||||
factory_->web_request_->OnResponseStarted(&info_.value(), request_);
|
||||
factory_->web_request_->OnCompleted(&info_.value(), request_, net::OK);
|
||||
factory_->web_request_api()->OnResponseStarted(&info_.value(), request_);
|
||||
factory_->web_request_api()->OnCompleted(&info_.value(), request_, net::OK);
|
||||
|
||||
factory_->RemoveRequest(network_service_request_id_, request_id_);
|
||||
return;
|
||||
@@ -654,7 +654,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToResponseStarted(
|
||||
|
||||
proxied_client_receiver_.Resume();
|
||||
|
||||
factory_->web_request_->OnResponseStarted(&info_.value(), request_);
|
||||
factory_->web_request_api()->OnResponseStarted(&info_.value(), request_);
|
||||
target_client_->OnReceiveResponse(current_response_.Clone(),
|
||||
std::move(current_body_),
|
||||
std::move(current_cached_metadata_));
|
||||
@@ -673,8 +673,8 @@ void ProxyingURLLoaderFactory::InProgressRequest::ContinueToBeforeRedirect(
|
||||
if (proxied_client_receiver_.is_bound())
|
||||
proxied_client_receiver_.Resume();
|
||||
|
||||
factory_->web_request_->OnBeforeRedirect(&info_.value(), request_,
|
||||
redirect_info.new_url);
|
||||
factory_->web_request_api()->OnBeforeRedirect(&info_.value(), request_,
|
||||
redirect_info.new_url);
|
||||
target_client_->OnReceiveRedirect(redirect_info, current_response_.Clone());
|
||||
request_.url = redirect_info.new_url;
|
||||
request_.method = redirect_info.new_method;
|
||||
@@ -697,7 +697,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::
|
||||
|
||||
auto callback_pair = base::SplitOnceCallback(std::move(continuation));
|
||||
DCHECK(info_.has_value());
|
||||
int result = factory_->web_request_->OnHeadersReceived(
|
||||
int result = factory_->web_request_api()->OnHeadersReceived(
|
||||
&info_.value(), request_, std::move(callback_pair.first),
|
||||
current_response_->headers.get(), &override_headers_, &redirect_url_);
|
||||
if (result == net::ERR_BLOCKED_BY_CLIENT) {
|
||||
@@ -725,15 +725,15 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnRequestError(
|
||||
const network::URLLoaderCompletionStatus& status) {
|
||||
if (target_client_)
|
||||
target_client_->OnComplete(status);
|
||||
factory_->web_request_->OnErrorOccurred(&info_.value(), request_,
|
||||
status.error_code);
|
||||
factory_->web_request_api()->OnErrorOccurred(&info_.value(), request_,
|
||||
status.error_code);
|
||||
|
||||
// Deletes |this|.
|
||||
factory_->RemoveRequest(network_service_request_id_, request_id_);
|
||||
}
|
||||
|
||||
ProxyingURLLoaderFactory::ProxyingURLLoaderFactory(
|
||||
api::WebRequest* web_request,
|
||||
WebRequestAPI* web_request_api,
|
||||
const HandlersMap& intercepted_handlers,
|
||||
int render_process_id,
|
||||
int frame_routing_id,
|
||||
@@ -745,7 +745,7 @@ ProxyingURLLoaderFactory::ProxyingURLLoaderFactory(
|
||||
mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient>
|
||||
header_client_receiver,
|
||||
content::ContentBrowserClient::URLLoaderFactoryType loader_factory_type)
|
||||
: web_request_{web_request},
|
||||
: web_request_api_(web_request_api),
|
||||
intercepted_handlers_(intercepted_handlers),
|
||||
render_process_id_(render_process_id),
|
||||
frame_routing_id_(frame_routing_id),
|
||||
@@ -825,7 +825,7 @@ void ProxyingURLLoaderFactory::CreateLoaderAndStart(
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_request_->HasListener()) {
|
||||
if (!web_request_api()->HasListener()) {
|
||||
// Pass-through to the original factory.
|
||||
target_factory_->CreateLoaderAndStart(std::move(loader), request_id,
|
||||
options, request, std::move(client),
|
||||
|
||||
@@ -31,10 +31,9 @@
|
||||
#include "services/network/public/mojom/url_loader_factory.mojom.h"
|
||||
#include "services/network/public/mojom/url_response_head.mojom-forward.h"
|
||||
#include "services/network/url_loader_factory.h"
|
||||
#include "shell/browser/api/electron_api_web_request.h"
|
||||
#include "shell/browser/net/electron_url_loader_factory.h"
|
||||
#include "shell/browser/net/web_request_api_interface.h"
|
||||
#include "url/gurl.h"
|
||||
#include "v8/include/cppgc/persistent.h"
|
||||
|
||||
namespace mojo {
|
||||
template <typename T>
|
||||
@@ -200,7 +199,7 @@ class ProxyingURLLoaderFactory
|
||||
};
|
||||
|
||||
ProxyingURLLoaderFactory(
|
||||
api::WebRequest* web_request,
|
||||
WebRequestAPI* web_request_api,
|
||||
const HandlersMap& intercepted_handlers,
|
||||
int render_process_id,
|
||||
int frame_routing_id,
|
||||
@@ -242,6 +241,8 @@ class ProxyingURLLoaderFactory
|
||||
mojo::PendingReceiver<network::mojom::TrustedHeaderClient> receiver)
|
||||
override;
|
||||
|
||||
WebRequestAPI* web_request_api() { return web_request_api_; }
|
||||
|
||||
bool IsForServiceWorkerScript() const;
|
||||
|
||||
private:
|
||||
@@ -252,7 +253,8 @@ class ProxyingURLLoaderFactory
|
||||
|
||||
bool ShouldIgnoreConnectionsLimit(const network::ResourceRequest& request);
|
||||
|
||||
const cppgc::WeakPersistent<api::WebRequest> web_request_;
|
||||
// Passed from api::WebRequest.
|
||||
raw_ptr<WebRequestAPI> web_request_api_;
|
||||
|
||||
// This is passed from api::Protocol.
|
||||
//
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
namespace electron {
|
||||
|
||||
ProxyingWebSocket::ProxyingWebSocket(
|
||||
api::WebRequest* web_request,
|
||||
WebRequestAPI* web_request_api,
|
||||
WebSocketFactory factory,
|
||||
const network::ResourceRequest& request,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
@@ -27,7 +27,7 @@ ProxyingWebSocket::ProxyingWebSocket(
|
||||
int render_frame_id,
|
||||
content::BrowserContext* browser_context,
|
||||
uint64_t* request_id_generator)
|
||||
: web_request_{web_request},
|
||||
: web_request_api_(web_request_api),
|
||||
request_(request),
|
||||
factory_(std::move(factory)),
|
||||
forwarding_handshake_client_(std::move(handshake_client)),
|
||||
@@ -70,8 +70,8 @@ void ProxyingWebSocket::Start() {
|
||||
weak_factory_.GetWeakPtr());
|
||||
}
|
||||
|
||||
int result = web_request_->OnBeforeRequest(&info_, request_, continuation,
|
||||
&redirect_url_);
|
||||
int result = web_request_api_->OnBeforeRequest(&info_, request_, continuation,
|
||||
&redirect_url_);
|
||||
|
||||
if (result == net::ERR_BLOCKED_BY_CLIENT) {
|
||||
OnError(result);
|
||||
@@ -97,7 +97,7 @@ void ProxyingWebSocket::ContinueToHeadersReceived() {
|
||||
base::BindRepeating(&ProxyingWebSocket::OnHeadersReceivedComplete,
|
||||
weak_factory_.GetWeakPtr());
|
||||
info_.AddResponseInfoFromResourceResponse(*response_);
|
||||
int result = web_request_->OnHeadersReceived(
|
||||
int result = web_request_api_->OnHeadersReceived(
|
||||
&info_, request_, continuation, response_->headers.get(),
|
||||
&override_headers_, &redirect_url_);
|
||||
|
||||
@@ -152,7 +152,7 @@ void ProxyingWebSocket::OnConnectionEstablished(
|
||||
void ProxyingWebSocket::ContinueToCompleted() {
|
||||
DCHECK(forwarding_handshake_client_);
|
||||
DCHECK(is_done_);
|
||||
web_request_->OnCompleted(&info_, request_, net::ERR_WS_UPGRADE);
|
||||
web_request_api_->OnCompleted(&info_, request_, net::ERR_WS_UPGRADE);
|
||||
forwarding_handshake_client_->OnConnectionEstablished(
|
||||
std::move(websocket_), std::move(client_receiver_),
|
||||
std::move(handshake_response_), std::move(readable_),
|
||||
@@ -180,7 +180,7 @@ void ProxyingWebSocket::OnAuthRequired(
|
||||
base::BindRepeating(&ProxyingWebSocket::OnHeadersReceivedCompleteForAuth,
|
||||
weak_factory_.GetWeakPtr(), auth_info);
|
||||
info_.AddResponseInfoFromResourceResponse(*response_);
|
||||
int result = web_request_->OnHeadersReceived(
|
||||
int result = web_request_api_->OnHeadersReceived(
|
||||
&info_, request_, continuation, response_->headers.get(),
|
||||
&override_headers_, &redirect_url_);
|
||||
|
||||
@@ -221,7 +221,7 @@ void ProxyingWebSocket::OnHeadersReceived(
|
||||
}
|
||||
|
||||
void ProxyingWebSocket::StartProxying(
|
||||
api::WebRequest* web_request,
|
||||
WebRequestAPI* web_request_api,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
@@ -244,7 +244,7 @@ void ProxyingWebSocket::StartProxying(
|
||||
request.request_initiator = origin;
|
||||
|
||||
auto* proxy = new ProxyingWebSocket(
|
||||
web_request, std::move(factory), request, std::move(handshake_client),
|
||||
web_request_api, std::move(factory), request, std::move(handshake_client),
|
||||
has_extra_headers, process_id, render_frame_id, browser_context,
|
||||
request_id_generator);
|
||||
proxy->Start();
|
||||
@@ -264,8 +264,8 @@ void ProxyingWebSocket::OnBeforeRequestComplete(int error_code) {
|
||||
weak_factory_.GetWeakPtr());
|
||||
|
||||
info_.AddResponseInfoFromResourceResponse(*response_);
|
||||
int result = web_request_->OnBeforeSendHeaders(&info_, request_, continuation,
|
||||
&request_headers_);
|
||||
int result = web_request_api_->OnBeforeSendHeaders(
|
||||
&info_, request_, continuation, &request_headers_);
|
||||
|
||||
if (result == net::ERR_BLOCKED_BY_CLIENT) {
|
||||
OnError(result);
|
||||
@@ -298,7 +298,7 @@ void ProxyingWebSocket::OnBeforeSendHeadersComplete(
|
||||
}
|
||||
|
||||
info_.AddResponseInfoFromResourceResponse(*response_);
|
||||
web_request_->OnSendHeaders(&info_, request_, request_headers_);
|
||||
web_request_api_->OnSendHeaders(&info_, request_, request_headers_);
|
||||
|
||||
if (!receiver_as_header_client_.is_bound())
|
||||
ContinueToStartRequest(net::OK);
|
||||
@@ -368,29 +368,25 @@ void ProxyingWebSocket::OnHeadersReceivedComplete(int error_code) {
|
||||
|
||||
ResumeIncomingMethodCallProcessing();
|
||||
info_.AddResponseInfoFromResourceResponse(*response_);
|
||||
web_request_->OnResponseStarted(&info_, request_);
|
||||
web_request_api_->OnResponseStarted(&info_, request_);
|
||||
|
||||
if (!receiver_as_header_client_.is_bound())
|
||||
ContinueToCompleted();
|
||||
}
|
||||
|
||||
void ProxyingWebSocket::OnAuthRequiredComplete(
|
||||
api::WebRequest::AuthRequiredResponse rv) {
|
||||
void ProxyingWebSocket::OnAuthRequiredComplete(AuthRequiredResponse rv) {
|
||||
CHECK(auth_required_callback_);
|
||||
ResumeIncomingMethodCallProcessing();
|
||||
switch (rv) {
|
||||
case api::WebRequest::AuthRequiredResponse::
|
||||
AUTH_REQUIRED_RESPONSE_NO_ACTION:
|
||||
case api::WebRequest::AuthRequiredResponse::
|
||||
AUTH_REQUIRED_RESPONSE_CANCEL_AUTH:
|
||||
case AuthRequiredResponse::kNoAction:
|
||||
case AuthRequiredResponse::kCancelAuth:
|
||||
std::move(auth_required_callback_).Run(std::nullopt);
|
||||
break;
|
||||
|
||||
case api::WebRequest::AuthRequiredResponse::AUTH_REQUIRED_RESPONSE_SET_AUTH:
|
||||
case AuthRequiredResponse::kSetAuth:
|
||||
std::move(auth_required_callback_).Run(auth_credentials_);
|
||||
break;
|
||||
case api::WebRequest::AuthRequiredResponse::
|
||||
AUTH_REQUIRED_RESPONSE_IO_PENDING:
|
||||
case AuthRequiredResponse::kIoPending:
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
@@ -407,13 +403,8 @@ void ProxyingWebSocket::OnHeadersReceivedCompleteForAuth(
|
||||
|
||||
auto continuation = base::BindRepeating(
|
||||
&ProxyingWebSocket::OnAuthRequiredComplete, weak_factory_.GetWeakPtr());
|
||||
auto auth_rv = web_request_->OnAuthRequired(
|
||||
&info_, auth_info, std::move(continuation), &auth_credentials_);
|
||||
auto auth_rv = AuthRequiredResponse::kCancelAuth;
|
||||
PauseIncomingMethodCallProcessing();
|
||||
if (auth_rv == api::WebRequest::AuthRequiredResponse::
|
||||
AUTH_REQUIRED_RESPONSE_IO_PENDING) {
|
||||
return;
|
||||
}
|
||||
|
||||
OnAuthRequiredComplete(auth_rv);
|
||||
}
|
||||
@@ -435,7 +426,7 @@ void ProxyingWebSocket::ResumeIncomingMethodCallProcessing() {
|
||||
void ProxyingWebSocket::OnError(int error_code) {
|
||||
if (!is_done_) {
|
||||
is_done_ = true;
|
||||
web_request_->OnErrorOccurred(&info_, request_, error_code);
|
||||
web_request_api_->OnErrorOccurred(&info_, request_, error_code);
|
||||
}
|
||||
|
||||
// Deletes |this|.
|
||||
|
||||
@@ -20,10 +20,9 @@
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
#include "services/network/public/mojom/network_context.mojom.h"
|
||||
#include "services/network/public/mojom/websocket.mojom.h"
|
||||
#include "shell/browser/api/electron_api_web_request.h"
|
||||
#include "shell/browser/net/web_request_api_interface.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
#include "v8/include/cppgc/persistent.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
@@ -38,8 +37,23 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
|
||||
public:
|
||||
using WebSocketFactory = content::ContentBrowserClient::WebSocketFactory;
|
||||
|
||||
// AuthRequiredResponse indicates how an OnAuthRequired call is handled.
|
||||
enum class AuthRequiredResponse {
|
||||
// No credentials were provided.
|
||||
kNoAction,
|
||||
// AuthCredentials is filled in with a username and password, which should
|
||||
// be used in a response to the provided auth challenge.
|
||||
kSetAuth,
|
||||
// The request should be canceled.
|
||||
kCancelAuth,
|
||||
// The action will be decided asynchronously. |callback| will be invoked
|
||||
// when the decision is made, and one of the other AuthRequiredResponse
|
||||
// values will be passed in with the same semantics as described above.
|
||||
kIoPending,
|
||||
};
|
||||
|
||||
ProxyingWebSocket(
|
||||
api::WebRequest* web_request,
|
||||
WebRequestAPI* web_request_api,
|
||||
WebSocketFactory factory,
|
||||
const network::ResourceRequest& request,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
@@ -85,7 +99,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
|
||||
OnHeadersReceivedCallback callback) override;
|
||||
|
||||
static void StartProxying(
|
||||
api::WebRequest* web_request,
|
||||
WebRequestAPI* web_request_api,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
@@ -107,7 +121,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
|
||||
void ContinueToStartRequest(int error_code);
|
||||
void OnHeadersReceivedComplete(int error_code);
|
||||
void ContinueToHeadersReceived();
|
||||
void OnAuthRequiredComplete(api::WebRequest::AuthRequiredResponse rv);
|
||||
void OnAuthRequiredComplete(AuthRequiredResponse rv);
|
||||
void OnHeadersReceivedCompleteForAuth(const net::AuthChallengeInfo& auth_info,
|
||||
int rv);
|
||||
void ContinueToCompleted();
|
||||
@@ -124,7 +138,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
|
||||
void OnMojoConnectionError();
|
||||
|
||||
// Passed from api::WebRequest.
|
||||
const cppgc::WeakPersistent<api::WebRequest> web_request_;
|
||||
raw_ptr<WebRequestAPI> web_request_api_;
|
||||
|
||||
// Saved to feed the api::WebRequest.
|
||||
network::ResourceRequest request_;
|
||||
|
||||
65
shell/browser/net/web_request_api_interface.h
Normal file
65
shell/browser/net/web_request_api_interface.h
Normal file
@@ -0,0 +1,65 @@
|
||||
// Copyright (c) 2020 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_
|
||||
#define ELECTRON_SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "net/base/completion_once_callback.h"
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
|
||||
namespace extensions {
|
||||
struct WebRequestInfo;
|
||||
} // namespace extensions
|
||||
|
||||
namespace electron {
|
||||
|
||||
// Defines the interface for WebRequest API, implemented by api::WebRequestNS.
|
||||
class WebRequestAPI {
|
||||
public:
|
||||
virtual ~WebRequestAPI() = default;
|
||||
|
||||
using BeforeSendHeadersCallback =
|
||||
base::OnceCallback<void(const std::set<std::string>& removed_headers,
|
||||
const std::set<std::string>& set_headers,
|
||||
int error_code)>;
|
||||
|
||||
virtual bool HasListener() const = 0;
|
||||
virtual int OnBeforeRequest(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
net::CompletionOnceCallback callback,
|
||||
GURL* new_url) = 0;
|
||||
virtual int OnBeforeSendHeaders(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
BeforeSendHeadersCallback callback,
|
||||
net::HttpRequestHeaders* headers) = 0;
|
||||
virtual int OnHeadersReceived(
|
||||
extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
net::CompletionOnceCallback callback,
|
||||
const net::HttpResponseHeaders* original_response_headers,
|
||||
scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
|
||||
GURL* allowed_unsafe_redirect_url) = 0;
|
||||
virtual void OnSendHeaders(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
const net::HttpRequestHeaders& headers) = 0;
|
||||
virtual void OnBeforeRedirect(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
const GURL& new_location) = 0;
|
||||
virtual void OnResponseStarted(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request) = 0;
|
||||
virtual void OnErrorOccurred(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
int net_error) = 0;
|
||||
virtual void OnCompleted(extensions::WebRequestInfo* info,
|
||||
const network::ResourceRequest& request,
|
||||
int net_error) = 0;
|
||||
virtual void OnRequestWillBeDestroyed(extensions::WebRequestInfo* info) = 0;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_
|
||||
@@ -28,7 +28,7 @@ class ElectronMenuModel;
|
||||
NSMenu* __strong menu_;
|
||||
BOOL isMenuOpen_;
|
||||
BOOL useDefaultAccelerator_;
|
||||
base::OnceClosure closeCallback;
|
||||
base::OnceClosure popupCloseCallback;
|
||||
}
|
||||
|
||||
// Builds a NSMenu from the pre-built model (must not be nil). Changes made
|
||||
@@ -36,7 +36,7 @@ class ElectronMenuModel;
|
||||
- (id)initWithModel:(electron::ElectronMenuModel*)model
|
||||
useDefaultAccelerator:(BOOL)use;
|
||||
|
||||
- (void)setCloseCallback:(base::OnceClosure)callback;
|
||||
- (void)setPopupCloseCallback:(base::OnceClosure)callback;
|
||||
|
||||
// Populate current NSMenu with |model|.
|
||||
- (void)populateWithModel:(electron::ElectronMenuModel*)model;
|
||||
|
||||
@@ -186,8 +186,8 @@ NSArray* ConvertSharingItemToNS(const SharingItem& item) {
|
||||
model_ = nullptr;
|
||||
}
|
||||
|
||||
- (void)setCloseCallback:(base::OnceClosure)callback {
|
||||
closeCallback = std::move(callback);
|
||||
- (void)setPopupCloseCallback:(base::OnceClosure)callback {
|
||||
popupCloseCallback = std::move(callback);
|
||||
}
|
||||
|
||||
- (void)populateWithModel:(electron::ElectronMenuModel*)model {
|
||||
@@ -221,9 +221,9 @@ NSArray* ConvertSharingItemToNS(const SharingItem& item) {
|
||||
isMenuOpen_ = NO;
|
||||
if (model_)
|
||||
model_->MenuWillClose();
|
||||
if (!closeCallback.is_null()) {
|
||||
content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
|
||||
std::move(closeCallback));
|
||||
if (!popupCloseCallback.is_null()) {
|
||||
content::GetUIThreadTaskRunner({})->PostTask(
|
||||
FROM_HERE, std::move(popupCloseCallback));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -567,18 +567,25 @@ NSArray* ConvertSharingItemToNS(const SharingItem& item) {
|
||||
if (!isMenuOpen_)
|
||||
return;
|
||||
|
||||
// We should only respond to the top-level menu's close event.
|
||||
if (menu != menu_)
|
||||
return;
|
||||
bool has_close_cb = !popupCloseCallback.is_null();
|
||||
|
||||
// There are two scenarios where we should emit menu-did-close:
|
||||
// 1. It's a popup and the top level menu is closed.
|
||||
// 2. It's an application menu, and the current menu's supermenu
|
||||
// is the top-level menu.
|
||||
if (menu != menu_) {
|
||||
if (has_close_cb || menu.supermenu != menu_)
|
||||
return;
|
||||
}
|
||||
|
||||
isMenuOpen_ = NO;
|
||||
if (model_)
|
||||
model_->MenuWillClose();
|
||||
// Post async task so that itemSelected runs before the close callback
|
||||
// deletes the controller from the map which deallocates it
|
||||
if (!closeCallback.is_null()) {
|
||||
// deletes the controller from the map which deallocates it.
|
||||
if (has_close_cb) {
|
||||
content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
|
||||
std::move(closeCallback));
|
||||
std::move(popupCloseCallback));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/ui/status_icon_gtk.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/gfx/image/image_skia_rep.h"
|
||||
@@ -33,7 +32,7 @@ gfx::ImageSkia GetBestImageRep(const gfx::ImageSkia& image) {
|
||||
} // namespace
|
||||
|
||||
TrayIconLinux::TrayIconLinux()
|
||||
: status_icon_dbus_(new StatusIconLinuxDbus(Browser::Get()->GetName())),
|
||||
: status_icon_dbus_(new StatusIconLinuxDbus),
|
||||
status_icon_type_(StatusIconType::kDbus) {
|
||||
status_icon_dbus_->SetDelegate(this);
|
||||
}
|
||||
|
||||
@@ -126,8 +126,6 @@ std::string TransferVideoPixelFormatToString(media::VideoPixelFormat format) {
|
||||
return "rgba";
|
||||
case media::PIXEL_FORMAT_RGBAF16:
|
||||
return "rgbaf16";
|
||||
case media::PIXEL_FORMAT_NV12:
|
||||
return "nv12";
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -568,8 +566,6 @@ struct Converter<ImportSharedTextureInfo> {
|
||||
out->pixel_format = media::PIXEL_FORMAT_ABGR;
|
||||
else if (pixel_format_str == "rgbaf16")
|
||||
out->pixel_format = media::PIXEL_FORMAT_RGBAF16;
|
||||
else if (pixel_format_str == "nv12")
|
||||
out->pixel_format = media::PIXEL_FORMAT_NV12;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@@ -734,14 +730,6 @@ v8::Local<v8::Value> ImportSharedTexture(v8::Isolate* isolate,
|
||||
shared_image_usage, "SharedTextureVideoFrame"},
|
||||
std::move(gmb_handle));
|
||||
|
||||
if (!si) {
|
||||
gin_helper::ErrorThrower(isolate).ThrowTypeError(
|
||||
"Failed to create shared image from shared texture handle. Texture "
|
||||
"format or dimension might not be supported on current device or "
|
||||
"platform.");
|
||||
return v8::Null(isolate);
|
||||
}
|
||||
|
||||
ImportedSharedTexture* imported = new ImportedSharedTexture();
|
||||
imported->pixel_format = shared_texture.pixel_format;
|
||||
imported->coded_size = shared_texture.coded_size;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "shell/common/asar/asar_util.h"
|
||||
#include "shell/common/asar/integrity_digest.h"
|
||||
|
||||
namespace asar {
|
||||
|
||||
@@ -40,9 +39,6 @@ std::optional<IntegrityPayload> Archive::HeaderIntegrity() const {
|
||||
NSDictionary* integrity = [[NSBundle mainBundle]
|
||||
objectForInfoDictionaryKey:@"ElectronAsarIntegrity"];
|
||||
|
||||
if (!IsIntegrityDictionaryValid(integrity))
|
||||
return std::nullopt;
|
||||
|
||||
// Integrity not provided
|
||||
if (!integrity)
|
||||
return std::nullopt;
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
// Copyright (c) 2025 Noah Gregory
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_COMMON_ASAR_INTEGRITY_DIGEST_H_
|
||||
#define ELECTRON_SHELL_COMMON_ASAR_INTEGRITY_DIGEST_H_
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
namespace asar {
|
||||
|
||||
bool IsIntegrityDictionaryValid(NSDictionary* integrity_dict);
|
||||
|
||||
} // namespace asar
|
||||
|
||||
#endif // ELECTRON_SHELL_COMMON_ASAR_INTEGRITY_DIGEST_H_
|
||||
@@ -1,74 +0,0 @@
|
||||
// Copyright (c) 2025 Noah Gregory
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/common/asar/integrity_digest.h"
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <span>
|
||||
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "crypto/hash.h"
|
||||
|
||||
namespace asar {
|
||||
|
||||
constexpr crypto::hash::HashKind kIntegrityDictionaryHashKind =
|
||||
crypto::hash::HashKind::kSha256;
|
||||
|
||||
constexpr size_t kIntegrityDictionaryDigestSize =
|
||||
DigestSizeForHashKind(kIntegrityDictionaryHashKind);
|
||||
constexpr char kIntegrityDictionaryDigestSentinel[] =
|
||||
"AGbevlPCksUGKNL8TSn7wGmJEuJsXb2A";
|
||||
|
||||
struct IntegrityDictionaryDigestSlot {
|
||||
uint8_t sentinel[sizeof(kIntegrityDictionaryDigestSentinel) - 1];
|
||||
uint8_t used;
|
||||
uint8_t version;
|
||||
uint8_t digest[kIntegrityDictionaryDigestSize];
|
||||
};
|
||||
|
||||
constexpr IntegrityDictionaryDigestSlot MakeDigestSlot(
|
||||
const char (&sentinel)[33]) {
|
||||
IntegrityDictionaryDigestSlot slot{};
|
||||
std::span<uint8_t, 32> slot_sentinel_span(slot.sentinel);
|
||||
std::copy_n(sentinel, slot_sentinel_span.size(), slot_sentinel_span.begin());
|
||||
slot.used = false; // to be set at package-time
|
||||
slot.version = 0; // to be set at package-time
|
||||
return slot;
|
||||
}
|
||||
|
||||
__attribute__((section("__DATA_CONST,__asar_integrity"), used))
|
||||
const volatile IntegrityDictionaryDigestSlot kIntegrityDictionaryDigest =
|
||||
MakeDigestSlot(kIntegrityDictionaryDigestSentinel);
|
||||
|
||||
bool IsIntegrityDictionaryValid(NSDictionary* integrity) {
|
||||
if (kIntegrityDictionaryDigest.used == false)
|
||||
return true; // No digest to validate against, fail open
|
||||
if (kIntegrityDictionaryDigest.version != 1)
|
||||
return false; // Unknown version, fail closed
|
||||
crypto::hash::Hasher integrity_hasher(kIntegrityDictionaryHashKind);
|
||||
for (NSString *relative_path_key in
|
||||
[[integrity allKeys] sortedArrayUsingComparator:^NSComparisonResult(
|
||||
NSString* s1, NSString* s2) {
|
||||
return [s1 compare:s2 options:NSLiteralSearch];
|
||||
}]) {
|
||||
NSDictionary* file_integrity = [integrity objectForKey:relative_path_key];
|
||||
NSString* algorithm = [file_integrity objectForKey:@"algorithm"];
|
||||
NSString* hash = [file_integrity objectForKey:@"hash"];
|
||||
integrity_hasher.Update(base::SysNSStringToUTF8(relative_path_key));
|
||||
integrity_hasher.Update(base::SysNSStringToUTF8(algorithm));
|
||||
integrity_hasher.Update(base::SysNSStringToUTF8(hash));
|
||||
}
|
||||
std::array<uint8_t, kIntegrityDictionaryDigestSize> digest;
|
||||
integrity_hasher.Finish(digest);
|
||||
if (!std::equal(digest.begin(), digest.end(),
|
||||
kIntegrityDictionaryDigest.digest)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace asar
|
||||
@@ -11,7 +11,7 @@ namespace gin_helper::internal {
|
||||
v8::Local<v8::Value> CallMethodWithArgs(
|
||||
v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> obj,
|
||||
const std::string_view method,
|
||||
const char* method,
|
||||
const base::span<v8::Local<v8::Value>> args) {
|
||||
v8::EscapableHandleScope handle_scope{isolate};
|
||||
|
||||
@@ -27,9 +27,8 @@ v8::Local<v8::Value> CallMethodWithArgs(
|
||||
v8::MicrotasksScope::kRunMicrotasks);
|
||||
|
||||
// node::MakeCallback will also run pending tasks in Node.js.
|
||||
v8::MaybeLocal<v8::Value> ret =
|
||||
node::MakeCallback(isolate, obj, gin::StringToV8(isolate, method),
|
||||
args.size(), args.data(), {0, 0});
|
||||
v8::MaybeLocal<v8::Value> ret = node::MakeCallback(
|
||||
isolate, obj, method, args.size(), args.data(), {0, 0});
|
||||
|
||||
// If the JS function throws an exception (doesn't return a value) the result
|
||||
// of MakeCallback will be empty and therefore ToLocal will be false, in this
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#define ELECTRON_SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_CALLER_H_
|
||||
|
||||
#include <array>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
@@ -21,17 +20,17 @@ namespace internal {
|
||||
|
||||
v8::Local<v8::Value> CallMethodWithArgs(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> obj,
|
||||
std::string_view method,
|
||||
const char* method,
|
||||
base::span<v8::Local<v8::Value>> args);
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// obj.emit(name, args...);
|
||||
// The caller is responsible of allocating a HandleScope.
|
||||
template <typename... Args>
|
||||
template <typename StringType, typename... Args>
|
||||
v8::Local<v8::Value> EmitEvent(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> obj,
|
||||
const std::string_view name,
|
||||
const StringType& name,
|
||||
Args&&... args) {
|
||||
v8::EscapableHandleScope scope{isolate};
|
||||
std::array<v8::Local<v8::Value>, 1U + sizeof...(args)> converted_args = {
|
||||
@@ -46,7 +45,7 @@ v8::Local<v8::Value> EmitEvent(v8::Isolate* isolate,
|
||||
template <typename... Args>
|
||||
v8::Local<v8::Value> CustomEmit(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> object,
|
||||
const std::string_view custom_emit,
|
||||
const char* custom_emit,
|
||||
Args&&... args) {
|
||||
v8::EscapableHandleScope scope{isolate};
|
||||
std::array<v8::Local<v8::Value>, sizeof...(args)> converted_args = {
|
||||
@@ -59,7 +58,7 @@ v8::Local<v8::Value> CustomEmit(v8::Isolate* isolate,
|
||||
template <typename T, typename... Args>
|
||||
v8::Local<v8::Value> CallMethod(v8::Isolate* isolate,
|
||||
gin_helper::DeprecatedWrappable<T>* object,
|
||||
const std::string_view method_name,
|
||||
const char* method_name,
|
||||
Args&&... args) {
|
||||
v8::EscapableHandleScope scope(isolate);
|
||||
v8::Local<v8::Object> v8_object;
|
||||
@@ -72,7 +71,7 @@ v8::Local<v8::Value> CallMethod(v8::Isolate* isolate,
|
||||
|
||||
template <typename T, typename... Args>
|
||||
v8::Local<v8::Value> CallMethod(gin_helper::DeprecatedWrappable<T>* object,
|
||||
const std::string_view method_name,
|
||||
const char* method_name,
|
||||
Args&&... args) {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
return CallMethod(isolate, object, method_name, std::forward<Args>(args)...);
|
||||
@@ -81,7 +80,7 @@ v8::Local<v8::Value> CallMethod(gin_helper::DeprecatedWrappable<T>* object,
|
||||
template <typename T, typename... Args>
|
||||
v8::Local<v8::Value> CallMethod(v8::Isolate* isolate,
|
||||
gin::Wrappable<T>* object,
|
||||
const std::string_view method_name,
|
||||
const char* method_name,
|
||||
Args&&... args) {
|
||||
v8::EscapableHandleScope scope(isolate);
|
||||
v8::Local<v8::Object> v8_object;
|
||||
@@ -94,7 +93,7 @@ v8::Local<v8::Value> CallMethod(v8::Isolate* isolate,
|
||||
|
||||
template <typename T, typename... Args>
|
||||
v8::Local<v8::Value> CallMethod(gin::Wrappable<T>* object,
|
||||
const std::string_view method_name,
|
||||
const char* method_name,
|
||||
Args&&... args) {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
return CallMethod(isolate, object, method_name, std::forward<Args>(args)...);
|
||||
|
||||
@@ -2,10 +2,16 @@
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifdef UNSAFE_BUFFERS_BUILD
|
||||
// TODO(crbug.com/351564777): Remove FD_ZERO and convert code to safer
|
||||
// constructs.
|
||||
#pragma allow_unsafe_buffers
|
||||
#endif
|
||||
|
||||
#include "shell/common/node_bindings_mac.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <poll.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
@@ -17,18 +23,24 @@ NodeBindingsMac::NodeBindingsMac(BrowserEnvironment browser_env)
|
||||
|
||||
void NodeBindingsMac::PollEvents() {
|
||||
auto* const event_loop = uv_loop();
|
||||
// uv_backend_timeout returns milliseconds or -1 for infinite wait.
|
||||
const int backend_fd = uv_backend_fd(event_loop);
|
||||
const int timeout_ms = uv_backend_timeout(event_loop); // -1 => infinite
|
||||
|
||||
struct pollfd pfd;
|
||||
pfd.fd = backend_fd;
|
||||
pfd.events = POLLIN;
|
||||
pfd.revents = 0;
|
||||
struct timeval tv;
|
||||
int timeout = uv_backend_timeout(event_loop);
|
||||
if (timeout != -1) {
|
||||
tv.tv_sec = timeout / 1000;
|
||||
tv.tv_usec = (timeout % 1000) * 1000;
|
||||
}
|
||||
|
||||
fd_set readset;
|
||||
int fd = uv_backend_fd(event_loop);
|
||||
FD_ZERO(&readset);
|
||||
FD_SET(fd, &readset);
|
||||
|
||||
// Wait for new libuv events.
|
||||
int r;
|
||||
do {
|
||||
r = poll(&pfd, 1, timeout_ms);
|
||||
r = select(fd + 1, &readset, nullptr, nullptr,
|
||||
timeout == -1 ? nullptr : &tv);
|
||||
} while (r == -1 && errno == EINTR);
|
||||
}
|
||||
|
||||
|
||||
@@ -733,80 +733,5 @@ describe('webRequest module', () => {
|
||||
expect(reqHeaders['/websocket'].foo).to.equal('bar');
|
||||
expect(reqHeaders['/'].foo).to.equal('bar');
|
||||
});
|
||||
|
||||
it('authenticates a WebSocket via login event', async () => {
|
||||
const authServer = http.createServer();
|
||||
const wssAuth = new WebSocket.Server({ noServer: true });
|
||||
const expected = 'Basic ' + Buffer.from('user:pass').toString('base64');
|
||||
|
||||
wssAuth.on('connection', ws => {
|
||||
ws.send('Authenticated!');
|
||||
});
|
||||
|
||||
authServer.on('upgrade', (req, socket, head) => {
|
||||
const auth = req.headers.authorization || '';
|
||||
if (auth !== expected) {
|
||||
socket.write(
|
||||
'HTTP/1.1 401 Unauthorized\r\n' +
|
||||
'WWW-Authenticate: Basic realm="Test"\r\n' +
|
||||
'Content-Length: 0\r\n' +
|
||||
'\r\n'
|
||||
);
|
||||
socket.destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
wssAuth.handleUpgrade(req, socket as Socket, head, ws => {
|
||||
wssAuth.emit('connection', ws, req);
|
||||
});
|
||||
});
|
||||
|
||||
const { port } = await listen(authServer);
|
||||
const ses = session.fromPartition(`WebRequestWSAuth-${Date.now()}`);
|
||||
|
||||
const contents = (webContents as typeof ElectronInternal.WebContents).create({
|
||||
session: ses,
|
||||
sandbox: true
|
||||
});
|
||||
|
||||
defer(() => {
|
||||
contents.destroy();
|
||||
authServer.close();
|
||||
wssAuth.close();
|
||||
});
|
||||
|
||||
ses.webRequest.onBeforeRequest({ urls: ['ws://*/*'] }, (details, callback) => {
|
||||
callback({});
|
||||
});
|
||||
|
||||
contents.on('login', (event, details: any, _: any, callback: (u: string, p: string) => void) => {
|
||||
if (details?.url?.startsWith(`ws://localhost:${port}`)) {
|
||||
event.preventDefault();
|
||||
callback('user', 'pass');
|
||||
}
|
||||
});
|
||||
|
||||
await contents.loadFile(path.join(fixturesPath, 'blank.html'));
|
||||
|
||||
const message = await contents.executeJavaScript(`new Promise((resolve, reject) => {
|
||||
let attempts = 0;
|
||||
function connect() {
|
||||
attempts++;
|
||||
const ws = new WebSocket('ws://localhost:${port}');
|
||||
ws.onmessage = e => resolve(e.data);
|
||||
ws.onerror = () => {
|
||||
if (attempts < 3) {
|
||||
setTimeout(connect, 50);
|
||||
} else {
|
||||
reject(new Error('WebSocket auth failed'));
|
||||
}
|
||||
};
|
||||
}
|
||||
connect();
|
||||
setTimeout(() => reject(new Error('timeout')), 5000);
|
||||
});`);
|
||||
|
||||
expect(message).to.equal('Authenticated!');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -898,72 +898,6 @@ describe('chromium features', () => {
|
||||
expect(position).to.have.property('coords');
|
||||
expect(position).to.have.property('timestamp');
|
||||
});
|
||||
|
||||
ifdescribe(process.platform === 'darwin')('with --disable-geolocation', () => {
|
||||
const testSwitchBehavior = (handlerAction: 'allow' | 'deny' | 'none') => async () => {
|
||||
const rc = await startRemoteControlApp([
|
||||
'--disable-geolocation',
|
||||
`--boot-eval=fixturesPath=${JSON.stringify(fixturesPath)}`
|
||||
]);
|
||||
|
||||
const result = await rc.remotely(async (action: typeof handlerAction) => {
|
||||
const { session, BrowserWindow } = require('electron');
|
||||
const path = require('node:path');
|
||||
|
||||
// Isolate each test's permissions to prevent permission state leaks between the test variations
|
||||
const testSession = session.fromPartition(`geolocation-disable-${action}`);
|
||||
|
||||
if (action !== 'none') {
|
||||
// Make the PermissionRequestHandler behave according to action variable passed for this test
|
||||
testSession.setPermissionRequestHandler((_wc: Electron.WebContents, permission: string, callback: (allow: boolean) => void) => {
|
||||
if (permission === 'geolocation') {
|
||||
if (action === 'allow') callback(true);
|
||||
else if (action === 'deny') callback(false);
|
||||
else callback(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const w = new BrowserWindow({
|
||||
show: false,
|
||||
webPreferences: {
|
||||
session: testSession,
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false
|
||||
}
|
||||
});
|
||||
|
||||
await w.loadFile(path.join(fixturesPath, 'pages', 'blank.html'));
|
||||
|
||||
const permissionState = await w.webContents.executeJavaScript(`
|
||||
navigator.permissions.query({ name: 'geolocation' })
|
||||
.then(status => status.state)
|
||||
.catch(() => 'error')
|
||||
`);
|
||||
|
||||
const geoResult = await w.webContents.executeJavaScript(`
|
||||
new Promise(resolve => {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
() => resolve('allowed'),
|
||||
err => resolve(err.code)
|
||||
);
|
||||
})
|
||||
`);
|
||||
|
||||
return { permissionState, geoResult };
|
||||
}, handlerAction);
|
||||
|
||||
// Always expect status to be denied regardless of the decision made by a handler set via `session.setPermissionRequestHandler`
|
||||
expect(result.permissionState).to.equal('denied', `Unexpected permission state for ${handlerAction} handler`);
|
||||
|
||||
// 1 = PERMISSION_DENIED
|
||||
expect(result.geoResult).to.equal(1, `Unexpected API result for ${handlerAction} handler`);
|
||||
};
|
||||
|
||||
it('denies geolocation when permission request handler would allow', testSwitchBehavior('allow'));
|
||||
it('denies geolocation when permission request handler would deny', testSwitchBehavior('deny'));
|
||||
it('denies geolocation with no permission request handler', testSwitchBehavior('none'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('File System API,', () => {
|
||||
|
||||
614
yarn.lock
614
yarn.lock
@@ -5,70 +5,6 @@ __metadata:
|
||||
version: 8
|
||||
cacheKey: 10c0
|
||||
|
||||
"@actions/cache@npm:^4.0.3":
|
||||
version: 4.1.0
|
||||
resolution: "@actions/cache@npm:4.1.0"
|
||||
dependencies:
|
||||
"@actions/core": "npm:^1.11.1"
|
||||
"@actions/exec": "npm:^1.0.1"
|
||||
"@actions/glob": "npm:^0.1.0"
|
||||
"@actions/http-client": "npm:^2.1.1"
|
||||
"@actions/io": "npm:^1.0.1"
|
||||
"@azure/abort-controller": "npm:^1.1.0"
|
||||
"@azure/ms-rest-js": "npm:^2.6.0"
|
||||
"@azure/storage-blob": "npm:^12.13.0"
|
||||
"@protobuf-ts/runtime-rpc": "npm:^2.11.1"
|
||||
semver: "npm:^6.3.1"
|
||||
checksum: 10c0/2e4716bd929bac9e79b11b2165c4b3799a8fe2b9a89277e76c60d1321392734dbcfa3c250a1443b07da377040af8f38a97b2cf76049d81a0f5c8a5806f0f3c43
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/core@npm:^1.11.1, @actions/core@npm:^1.2.6":
|
||||
version: 1.11.1
|
||||
resolution: "@actions/core@npm:1.11.1"
|
||||
dependencies:
|
||||
"@actions/exec": "npm:^1.1.1"
|
||||
"@actions/http-client": "npm:^2.0.1"
|
||||
checksum: 10c0/9aa30b397d8d0dbc74e69fe46b23fb105cab989beb420c57eacbfc51c6804abe8da0f46973ca9f639d532ea4c096d0f4d37da0223fbe94f304fa3c5f53537c30
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/exec@npm:^1.0.1, @actions/exec@npm:^1.1.1":
|
||||
version: 1.1.1
|
||||
resolution: "@actions/exec@npm:1.1.1"
|
||||
dependencies:
|
||||
"@actions/io": "npm:^1.0.1"
|
||||
checksum: 10c0/4a09f6bdbe50ce68b5cf8a7254d176230d6a74bccf6ecc3857feee209a8c950ba9adec87cc5ecceb04110182d1c17117234e45557d72fde6229b7fd3a395322a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/glob@npm:^0.1.0":
|
||||
version: 0.1.2
|
||||
resolution: "@actions/glob@npm:0.1.2"
|
||||
dependencies:
|
||||
"@actions/core": "npm:^1.2.6"
|
||||
minimatch: "npm:^3.0.4"
|
||||
checksum: 10c0/7431cb85da7df2bab8dac54885410cbd695ae70b516a70b642d59df3e444030e4bbc8b103226e8c98130ee81f024739aefbec3bf20dff8a280724c4fae8be492
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/http-client@npm:^2.0.1, @actions/http-client@npm:^2.1.1":
|
||||
version: 2.2.3
|
||||
resolution: "@actions/http-client@npm:2.2.3"
|
||||
dependencies:
|
||||
tunnel: "npm:^0.0.6"
|
||||
undici: "npm:^5.25.4"
|
||||
checksum: 10c0/13141b66a42aa4afd8c50f7479e13a5cdb5084ccb3c73ec48894b8029743389a3d2bf8cdc18e23fb70cd33995740526dd308815613907571e897c3aa1e5eada6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/io@npm:^1.0.1":
|
||||
version: 1.1.3
|
||||
resolution: "@actions/io@npm:1.1.3"
|
||||
checksum: 10c0/5b8751918e5bf0bebd923ba917fb1c0e294401e7ff0037f32c92a4efa4215550df1f6633c63fd4efb2bdaae8711e69b9e36925857db1f38935ff62a5c92ec29e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@antfu/install-pkg@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "@antfu/install-pkg@npm:1.1.0"
|
||||
@@ -88,15 +24,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/abort-controller@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "@azure/abort-controller@npm:1.1.0"
|
||||
dependencies:
|
||||
tslib: "npm:^2.2.0"
|
||||
checksum: 10c0/bb79f0faaa9e9c1ae3c4ec2523ea23ee0879cc491abb4b3ac2dd56c2cc2dfe4b7e8522ffa866d39c7145c0dd61387711368afe0d4eb6534daba7b67ed0a2a730
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/abort-controller@npm:^2.0.0, @azure/abort-controller@npm:^2.1.2":
|
||||
version: 2.1.2
|
||||
resolution: "@azure/abort-controller@npm:2.1.2"
|
||||
@@ -106,17 +33,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/core-auth@npm:^1.1.4":
|
||||
version: 1.10.1
|
||||
resolution: "@azure/core-auth@npm:1.10.1"
|
||||
dependencies:
|
||||
"@azure/abort-controller": "npm:^2.1.2"
|
||||
"@azure/core-util": "npm:^1.13.0"
|
||||
tslib: "npm:^2.6.2"
|
||||
checksum: 10c0/83fd96e43cf8ca3e1cf6c7677915ca1433d6e331cb7352b64a3f93d9fd71dcddf77e8b46f2bb2a5db49ce87016ed30ebaca88034a0acf321e86ba17c0eb3329e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/core-auth@npm:^1.4.0, @azure/core-auth@npm:^1.8.0, @azure/core-auth@npm:^1.9.0":
|
||||
version: 1.10.0
|
||||
resolution: "@azure/core-auth@npm:1.10.0"
|
||||
@@ -220,17 +136,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/core-util@npm:^1.13.0":
|
||||
version: 1.13.1
|
||||
resolution: "@azure/core-util@npm:1.13.1"
|
||||
dependencies:
|
||||
"@azure/abort-controller": "npm:^2.1.2"
|
||||
"@typespec/ts-http-runtime": "npm:^0.3.0"
|
||||
tslib: "npm:^2.6.2"
|
||||
checksum: 10c0/37067621cdac933c51775c26648fdcea315f07b08bd875cff4610e403eabf9c12532525f0bf094e258dadc03a55d35f12c9242f662526847b32c85cdcc2d6603
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/core-xml@npm:^1.4.5":
|
||||
version: 1.5.0
|
||||
resolution: "@azure/core-xml@npm:1.5.0"
|
||||
@@ -251,44 +156,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/ms-rest-js@npm:^2.6.0":
|
||||
version: 2.7.0
|
||||
resolution: "@azure/ms-rest-js@npm:2.7.0"
|
||||
dependencies:
|
||||
"@azure/core-auth": "npm:^1.1.4"
|
||||
abort-controller: "npm:^3.0.0"
|
||||
form-data: "npm:^2.5.0"
|
||||
node-fetch: "npm:^2.6.7"
|
||||
tslib: "npm:^1.10.0"
|
||||
tunnel: "npm:0.0.6"
|
||||
uuid: "npm:^8.3.2"
|
||||
xml2js: "npm:^0.5.0"
|
||||
checksum: 10c0/c2fec3ca38b66da148015ffb47e45a331c9b85a298fdfa94d1a497a3e7d584b4b643baee7b40563747027642ab1ef20e4d8e1dcd1bf8e23b2ff6accf03807c3c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/storage-blob@npm:^12.13.0":
|
||||
version: 12.29.1
|
||||
resolution: "@azure/storage-blob@npm:12.29.1"
|
||||
dependencies:
|
||||
"@azure/abort-controller": "npm:^2.1.2"
|
||||
"@azure/core-auth": "npm:^1.9.0"
|
||||
"@azure/core-client": "npm:^1.9.3"
|
||||
"@azure/core-http-compat": "npm:^2.2.0"
|
||||
"@azure/core-lro": "npm:^2.2.0"
|
||||
"@azure/core-paging": "npm:^1.6.2"
|
||||
"@azure/core-rest-pipeline": "npm:^1.19.1"
|
||||
"@azure/core-tracing": "npm:^1.2.0"
|
||||
"@azure/core-util": "npm:^1.11.0"
|
||||
"@azure/core-xml": "npm:^1.4.5"
|
||||
"@azure/logger": "npm:^1.1.4"
|
||||
"@azure/storage-common": "npm:^12.1.1"
|
||||
events: "npm:^3.0.0"
|
||||
tslib: "npm:^2.8.1"
|
||||
checksum: 10c0/01173ca8a05d27dcf44f7eb5f30cc74d591de07c808cfe031917b1e905dc659165c9fd981113e778bbe52a4e8ed16269d3f9cf0bb006007c79ef3b5a8257aa8a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/storage-blob@npm:^12.28.0":
|
||||
version: 12.28.0
|
||||
resolution: "@azure/storage-blob@npm:12.28.0"
|
||||
@@ -328,23 +195,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@azure/storage-common@npm:^12.1.1":
|
||||
version: 12.1.1
|
||||
resolution: "@azure/storage-common@npm:12.1.1"
|
||||
dependencies:
|
||||
"@azure/abort-controller": "npm:^2.1.2"
|
||||
"@azure/core-auth": "npm:^1.9.0"
|
||||
"@azure/core-http-compat": "npm:^2.2.0"
|
||||
"@azure/core-rest-pipeline": "npm:^1.19.1"
|
||||
"@azure/core-tracing": "npm:^1.2.0"
|
||||
"@azure/core-util": "npm:^1.11.0"
|
||||
"@azure/logger": "npm:^1.1.4"
|
||||
events: "npm:^3.3.0"
|
||||
tslib: "npm:^2.8.1"
|
||||
checksum: 10c0/6ccbdd95305592876b65cc76d114c076ad3b8289d2df1f5ccff6cb29283b572c560eb1e1b12a19158d26675df4ef58e51bd5890e44e59c3e45e2276fee6498b0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@babel/code-frame@npm:^7.21.4":
|
||||
version: 7.25.7
|
||||
resolution: "@babel/code-frame@npm:7.25.7"
|
||||
@@ -641,19 +491,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@electron/asar@npm:^4.0.0, @electron/asar@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "@electron/asar@npm:4.0.1"
|
||||
dependencies:
|
||||
commander: "npm:^13.1.0"
|
||||
glob: "npm:^11.0.1"
|
||||
minimatch: "npm:^10.0.1"
|
||||
bin:
|
||||
asar: bin/asar.mjs
|
||||
checksum: 10c0/4071dfce3d3d53e17baac023b1c38dfc83b5975b68b708943692bd1525a08b02c6717c334fefaeb3aaa860c5495842047a06a044351b652455653f762d13f850
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@electron/docs-parser@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "@electron/docs-parser@npm:2.0.0"
|
||||
@@ -692,25 +529,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@electron/fiddle-core@npm:^2.0.1":
|
||||
version: 2.0.1
|
||||
resolution: "@electron/fiddle-core@npm:2.0.1"
|
||||
dependencies:
|
||||
"@electron/asar": "npm:^4.0.0"
|
||||
"@electron/get": "npm:^4.0.0"
|
||||
debug: "npm:^4.3.3"
|
||||
env-paths: "npm:^3.0.0"
|
||||
extract-zip: "npm:^2.0.1"
|
||||
getos: "npm:^3.2.1"
|
||||
graceful-fs: "npm:^4.2.11"
|
||||
semver: "npm:^7.3.5"
|
||||
simple-git: "npm:^3.5.0"
|
||||
bin:
|
||||
fiddle-core: dist/cli.js
|
||||
checksum: 10c0/6aee5ff636f0cb7a0ee0e8097925da60952607870018d46fea11faf5c97a5ee7e1b21ae018f17c59dd2b489c7cec67fb53e3dca294601a44513324e6e34f230b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@electron/fuses@npm:^1.8.0":
|
||||
version: 1.8.0
|
||||
resolution: "@electron/fuses@npm:1.8.0"
|
||||
@@ -762,37 +580,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@electron/get@npm:^4.0.0":
|
||||
version: 4.0.2
|
||||
resolution: "@electron/get@npm:4.0.2"
|
||||
dependencies:
|
||||
debug: "npm:^4.1.1"
|
||||
env-paths: "npm:^3.0.0"
|
||||
global-agent: "npm:^3.0.0"
|
||||
got: "npm:^14.4.5"
|
||||
graceful-fs: "npm:^4.2.11"
|
||||
progress: "npm:^2.0.3"
|
||||
semver: "npm:^7.6.3"
|
||||
sumchecker: "npm:^3.0.1"
|
||||
dependenciesMeta:
|
||||
global-agent:
|
||||
optional: true
|
||||
checksum: 10c0/21c6fd66f552a66c5ac2b8e06c684be2a1cfc2124c9e60f2708dfbdf32d719013946b5492d755d9830c833b421b61ba9d56a800abc3bae2fbd3fabfd80b33d14
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@electron/gha-workflows@workspace:.github/workflows":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@electron/gha-workflows@workspace:.github/workflows"
|
||||
dependencies:
|
||||
"@actions/cache": "npm:^4.0.3"
|
||||
"@electron/fiddle-core": "npm:^2.0.1"
|
||||
mdast-util-from-markdown: "npm:^2.0.0"
|
||||
semver: "npm:^7.7.2"
|
||||
unist-util-select: "npm:^5.1.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@electron/github-app-auth@npm:^2.2.1":
|
||||
version: 2.2.1
|
||||
resolution: "@electron/github-app-auth@npm:2.2.1"
|
||||
@@ -994,13 +781,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@fastify/busboy@npm:^2.0.0":
|
||||
version: 2.1.1
|
||||
resolution: "@fastify/busboy@npm:2.1.1"
|
||||
checksum: 10c0/6f8027a8cba7f8f7b736718b013f5a38c0476eea67034c94a0d3c375e2b114366ad4419e6a6fa7ffc2ef9c6d3e0435d76dd584a7a1cbac23962fda7650b579e3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@humanwhocodes/config-array@npm:^0.13.0":
|
||||
version: 0.13.0
|
||||
resolution: "@humanwhocodes/config-array@npm:0.13.0"
|
||||
@@ -1041,22 +821,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@isaacs/balanced-match@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "@isaacs/balanced-match@npm:4.0.1"
|
||||
checksum: 10c0/7da011805b259ec5c955f01cee903da72ad97c5e6f01ca96197267d3f33103d5b2f8a1af192140f3aa64526c593c8d098ae366c2b11f7f17645d12387c2fd420
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@isaacs/brace-expansion@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "@isaacs/brace-expansion@npm:5.0.0"
|
||||
dependencies:
|
||||
"@isaacs/balanced-match": "npm:^4.0.1"
|
||||
checksum: 10c0/b4d4812f4be53afc2c5b6c545001ff7a4659af68d4484804e9d514e183d20269bb81def8682c01a22b17c4d6aed14292c8494f7d2ac664e547101c1a905aa977
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@isaacs/cliui@npm:^8.0.2":
|
||||
version: 8.0.2
|
||||
resolution: "@isaacs/cliui@npm:8.0.2"
|
||||
@@ -1139,13 +903,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@keyv/serialize@npm:^1.1.1":
|
||||
version: 1.1.1
|
||||
resolution: "@keyv/serialize@npm:1.1.1"
|
||||
checksum: 10c0/b0008cae4a54400c3abf587b8cc2474c6f528ee58969ce6cf9cb07a04006f80c73c85971d6be6544408318a2bc40108236a19a82aea0a6de95aae49533317374
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@kwsites/file-exists@npm:^1.1.1":
|
||||
version: 1.1.1
|
||||
resolution: "@kwsites/file-exists@npm:1.1.1"
|
||||
@@ -1726,22 +1483,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@protobuf-ts/runtime-rpc@npm:^2.11.1":
|
||||
version: 2.11.1
|
||||
resolution: "@protobuf-ts/runtime-rpc@npm:2.11.1"
|
||||
dependencies:
|
||||
"@protobuf-ts/runtime": "npm:^2.11.1"
|
||||
checksum: 10c0/20337ea721a619a93c3888fbbe768c8334a8ed67a759a33aefb2a5c587fff690ca8fcb8dc97f9b7590012d9f4c43a6b9020f72dd2fc57f004c26eeca93a51982
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@protobuf-ts/runtime@npm:^2.11.1":
|
||||
version: 2.11.1
|
||||
resolution: "@protobuf-ts/runtime@npm:2.11.1"
|
||||
checksum: 10c0/6071c0373251e915cebb449fb7bf3254e946534edf4c4eb6e89933989a3ab5dcb148ed82cc0ea844bbc2f4346d0dc76f852c2b5f900a6bdaa35e5fb2cb4666f9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rtsao/scc@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "@rtsao/scc@npm:1.1.0"
|
||||
@@ -1749,13 +1490,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sec-ant/readable-stream@npm:^0.4.1":
|
||||
version: 0.4.1
|
||||
resolution: "@sec-ant/readable-stream@npm:0.4.1"
|
||||
checksum: 10c0/64e9e9cf161e848067a5bf60cdc04d18495dc28bb63a8d9f8993e4dd99b91ad34e4b563c85de17d91ffb177ec17a0664991d2e115f6543e73236a906068987af
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sindresorhus/is@npm:^4.0.0":
|
||||
version: 4.6.0
|
||||
resolution: "@sindresorhus/is@npm:4.6.0"
|
||||
@@ -1763,13 +1497,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sindresorhus/is@npm:^7.0.1":
|
||||
version: 7.1.1
|
||||
resolution: "@sindresorhus/is@npm:7.1.1"
|
||||
checksum: 10c0/96f021b8c5680e0687ceba5619c2e56fe6b089b190b3149280a1e418e6315c66839e3f1519cf1c89f7a888b5a0017a0ef1db17436d783ee398b7d5a515caa3ef
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sindresorhus/merge-streams@npm:^2.1.0":
|
||||
version: 2.3.0
|
||||
resolution: "@sindresorhus/merge-streams@npm:2.3.0"
|
||||
@@ -2033,13 +1760,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/http-cache-semantics@npm:^4.0.4":
|
||||
version: 4.0.4
|
||||
resolution: "@types/http-cache-semantics@npm:4.0.4"
|
||||
checksum: 10c0/51b72568b4b2863e0fe8d6ce8aad72a784b7510d72dc866215642da51d84945a9459fa89f49ec48f1e9a1752e6a78e85a4cda0ded06b1c73e727610c925f9ce6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/http-errors@npm:*":
|
||||
version: 2.0.5
|
||||
resolution: "@types/http-errors@npm:2.0.5"
|
||||
@@ -2829,15 +2549,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"abort-controller@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "abort-controller@npm:3.0.0"
|
||||
dependencies:
|
||||
event-target-shim: "npm:^5.0.0"
|
||||
checksum: 10c0/90ccc50f010250152509a344eb2e71977fbf8db0ab8f1061197e3275ddf6c61a41a6edfd7b9409c664513131dd96e962065415325ef23efa5db931b382d24ca5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"abstract-socket@github:deepak1556/node-abstractsocket#928cc591decd12aff7dad96449da8afc29832c19":
|
||||
version: 2.1.1
|
||||
resolution: "abstract-socket@https://github.com/deepak1556/node-abstractsocket.git#commit=928cc591decd12aff7dad96449da8afc29832c19"
|
||||
@@ -3507,13 +3218,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"boolbase@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "boolbase@npm:1.0.0"
|
||||
checksum: 10c0/e4b53deb4f2b85c52be0e21a273f2045c7b6a6ea002b0e139c744cb6f95e9ec044439a52883b0d74dedd1ff3da55ed140cfdddfed7fb0cccbed373de5dce1bcf
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"boolean@npm:^3.0.1":
|
||||
version: 3.2.0
|
||||
resolution: "boolean@npm:3.2.0"
|
||||
@@ -3657,13 +3361,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"byte-counter@npm:^0.1.0":
|
||||
version: 0.1.0
|
||||
resolution: "byte-counter@npm:0.1.0"
|
||||
checksum: 10c0/2e7b9cf902d06a6601f8ab893964a8b6b9e2b2dfc60fcee0d340e50b95aa3dc77c4d34ddf3e63cc374b4e5b1d0d694a942de6fbe8ee95d39418f3fdff666b6a4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"bytes@npm:3.1.2":
|
||||
version: 3.1.2
|
||||
resolution: "bytes@npm:3.1.2"
|
||||
@@ -3698,28 +3395,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"cacheable-lookup@npm:^7.0.0":
|
||||
version: 7.0.0
|
||||
resolution: "cacheable-lookup@npm:7.0.0"
|
||||
checksum: 10c0/63a9c144c5b45cb5549251e3ea774c04d63063b29e469f7584171d059d3a88f650f47869a974e2d07de62116463d742c287a81a625e791539d987115cb081635
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"cacheable-request@npm:^13.0.12":
|
||||
version: 13.0.15
|
||||
resolution: "cacheable-request@npm:13.0.15"
|
||||
dependencies:
|
||||
"@types/http-cache-semantics": "npm:^4.0.4"
|
||||
get-stream: "npm:^9.0.1"
|
||||
http-cache-semantics: "npm:^4.2.0"
|
||||
keyv: "npm:^5.5.4"
|
||||
mimic-response: "npm:^4.0.0"
|
||||
normalize-url: "npm:^8.1.0"
|
||||
responselike: "npm:^4.0.2"
|
||||
checksum: 10c0/8cd2932ff3df591c27a9e34557743c7b5d4d843665b2a5e704a37ed5a3f7509ef24529ea81a7d51715fb21036ae7f8580398605b88c0f441524ada3201ddf2b4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"cacheable-request@npm:^7.0.2":
|
||||
version: 7.0.2
|
||||
resolution: "cacheable-request@npm:7.0.2"
|
||||
@@ -4264,13 +3939,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"commander@npm:^13.1.0":
|
||||
version: 13.1.0
|
||||
resolution: "commander@npm:13.1.0"
|
||||
checksum: 10c0/7b8c5544bba704fbe84b7cab2e043df8586d5c114a4c5b607f83ae5060708940ed0b5bd5838cf8ce27539cde265c1cbd59ce3c8c6b017ed3eec8943e3a415164
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"commander@npm:^14.0.0":
|
||||
version: 14.0.0
|
||||
resolution: "commander@npm:14.0.0"
|
||||
@@ -4404,7 +4072,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6":
|
||||
"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
|
||||
version: 7.0.6
|
||||
resolution: "cross-spawn@npm:7.0.6"
|
||||
dependencies:
|
||||
@@ -4422,13 +4090,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"css-selector-parser@npm:^3.0.0":
|
||||
version: 3.2.0
|
||||
resolution: "css-selector-parser@npm:3.2.0"
|
||||
checksum: 10c0/6619166babf75abfe84ae42c620bceb413771a0aafd463b45c73b2a3aa504810c27f2300de107fd6bc3e3a88083c0fe6298a877f572038ab175219ef08328c9a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dashdash@npm:^1.12.0":
|
||||
version: 1.14.1
|
||||
resolution: "dashdash@npm:1.14.1"
|
||||
@@ -4621,15 +4282,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"decompress-response@npm:^10.0.0":
|
||||
version: 10.0.0
|
||||
resolution: "decompress-response@npm:10.0.0"
|
||||
dependencies:
|
||||
mimic-response: "npm:^4.0.0"
|
||||
checksum: 10c0/e8ce13b3f790fbac1e75a7be9ce4f77be62a6e5fcccfd9bd73e9d8b48b9a3b6c1b7b918ecd321095f3839b3bc9b6f6af2b1bd9c905eeddc0d1177d297b073232
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"decompress-response@npm:^4.2.0":
|
||||
version: 4.2.1
|
||||
resolution: "decompress-response@npm:4.2.1"
|
||||
@@ -5007,7 +4659,7 @@ __metadata:
|
||||
dependencies:
|
||||
"@azure/storage-blob": "npm:^12.28.0"
|
||||
"@datadog/datadog-ci": "npm:^4.1.2"
|
||||
"@electron/asar": "npm:^4.0.1"
|
||||
"@electron/asar": "npm:^3.2.13"
|
||||
"@electron/docs-parser": "npm:^2.0.0"
|
||||
"@electron/fiddle-core": "npm:^1.3.4"
|
||||
"@electron/github-app-auth": "npm:^2.2.1"
|
||||
@@ -5170,13 +4822,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"env-paths@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "env-paths@npm:3.0.0"
|
||||
checksum: 10c0/76dec878cee47f841103bacd7fae03283af16f0702dad65102ef0a556f310b98a377885e0f32943831eb08b5ab37842a323d02529f3dfd5d0a40ca71b01b435f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"envinfo@npm:^7.14.0":
|
||||
version: 7.19.0
|
||||
resolution: "envinfo@npm:7.19.0"
|
||||
@@ -6080,13 +5725,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"event-target-shim@npm:^5.0.0":
|
||||
version: 5.0.1
|
||||
resolution: "event-target-shim@npm:5.0.1"
|
||||
checksum: 10c0/0255d9f936215fd206156fd4caa9e8d35e62075d720dc7d847e89b417e5e62cf1ce6c9b4e0a1633a9256de0efefaf9f8d26924b1f3c8620cffb9db78e7d3076b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eventemitter3@npm:^5.0.1":
|
||||
version: 5.0.1
|
||||
resolution: "eventemitter3@npm:5.0.1"
|
||||
@@ -6498,37 +6136,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"foreground-child@npm:^3.3.1":
|
||||
version: 3.3.1
|
||||
resolution: "foreground-child@npm:3.3.1"
|
||||
dependencies:
|
||||
cross-spawn: "npm:^7.0.6"
|
||||
signal-exit: "npm:^4.0.1"
|
||||
checksum: 10c0/8986e4af2430896e65bc2788d6679067294d6aee9545daefc84923a0a4b399ad9c7a3ea7bd8c0b2b80fdf4a92de4c69df3f628233ff3224260e9c1541a9e9ed3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"form-data-encoder@npm:^4.0.2":
|
||||
version: 4.1.0
|
||||
resolution: "form-data-encoder@npm:4.1.0"
|
||||
checksum: 10c0/cbd655aa8ffff6f7c2733b1d8e95fa9a2fe8a88a90bde29fb54b8e02c9406e51f32a014bfe8297d67fbac9f77614d14a8b4bbc4fd0352838e67e97a881d06332
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"form-data@npm:^2.5.0":
|
||||
version: 2.5.5
|
||||
resolution: "form-data@npm:2.5.5"
|
||||
dependencies:
|
||||
asynckit: "npm:^0.4.0"
|
||||
combined-stream: "npm:^1.0.8"
|
||||
es-set-tostringtag: "npm:^2.1.0"
|
||||
hasown: "npm:^2.0.2"
|
||||
mime-types: "npm:^2.1.35"
|
||||
safe-buffer: "npm:^5.2.1"
|
||||
checksum: 10c0/7fb70447849fc9bce4d01fe9a626f6587441f85779a2803b67f803e1ab52b0bd78db0a7acd80d944c665f68ca90936c327f1244b730719b638a0219e98b20488
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"form-data@npm:^4.0.4":
|
||||
version: 4.0.4
|
||||
resolution: "form-data@npm:4.0.4"
|
||||
@@ -6841,16 +6448,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-stream@npm:^9.0.1":
|
||||
version: 9.0.1
|
||||
resolution: "get-stream@npm:9.0.1"
|
||||
dependencies:
|
||||
"@sec-ant/readable-stream": "npm:^0.4.1"
|
||||
is-stream: "npm:^4.0.1"
|
||||
checksum: 10c0/d70e73857f2eea1826ac570c3a912757dcfbe8a718a033fa0c23e12ac8e7d633195b01710e0559af574cbb5af101009b42df7b6f6b29ceec8dbdf7291931b948
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-symbol-description@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "get-symbol-description@npm:1.0.0"
|
||||
@@ -6969,22 +6566,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"glob@npm:^11.0.1":
|
||||
version: 11.0.3
|
||||
resolution: "glob@npm:11.0.3"
|
||||
dependencies:
|
||||
foreground-child: "npm:^3.3.1"
|
||||
jackspeak: "npm:^4.1.1"
|
||||
minimatch: "npm:^10.0.3"
|
||||
minipass: "npm:^7.1.2"
|
||||
package-json-from-dist: "npm:^1.0.0"
|
||||
path-scurry: "npm:^2.0.0"
|
||||
bin:
|
||||
glob: dist/esm/bin.mjs
|
||||
checksum: 10c0/7d24457549ec2903920dfa3d8e76850e7c02aa709122f0164b240c712f5455c0b457e6f2a1eee39344c6148e39895be8094ae8cfef7ccc3296ed30bce250c661
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"glob@npm:^7.1.3, glob@npm:^7.1.6":
|
||||
version: 7.2.0
|
||||
resolution: "glob@npm:7.2.0"
|
||||
@@ -7124,26 +6705,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"got@npm:^14.4.5":
|
||||
version: 14.6.4
|
||||
resolution: "got@npm:14.6.4"
|
||||
dependencies:
|
||||
"@sindresorhus/is": "npm:^7.0.1"
|
||||
byte-counter: "npm:^0.1.0"
|
||||
cacheable-lookup: "npm:^7.0.0"
|
||||
cacheable-request: "npm:^13.0.12"
|
||||
decompress-response: "npm:^10.0.0"
|
||||
form-data-encoder: "npm:^4.0.2"
|
||||
http2-wrapper: "npm:^2.2.1"
|
||||
keyv: "npm:^5.5.3"
|
||||
lowercase-keys: "npm:^3.0.0"
|
||||
p-cancelable: "npm:^4.0.1"
|
||||
responselike: "npm:^4.0.2"
|
||||
type-fest: "npm:^4.26.1"
|
||||
checksum: 10c0/ee8980feb842db876cffa42fa27da6d90cc1a9cfe2a38942f4b319cbb37c000e34919a7e5dea017a0fa53b0535c02d00426abbbf528d6a4e89c6eb07b2bde977
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6":
|
||||
version: 4.2.11
|
||||
resolution: "graceful-fs@npm:4.2.11"
|
||||
@@ -7377,7 +6938,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"http-cache-semantics@npm:^4.1.1, http-cache-semantics@npm:^4.2.0":
|
||||
"http-cache-semantics@npm:^4.1.1":
|
||||
version: 4.2.0
|
||||
resolution: "http-cache-semantics@npm:4.2.0"
|
||||
checksum: 10c0/45b66a945cf13ec2d1f29432277201313babf4a01d9e52f44b31ca923434083afeca03f18417f599c9ab3d0e7b618ceb21257542338b57c54b710463b4a53e37
|
||||
@@ -7417,16 +6978,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"http2-wrapper@npm:^2.2.1":
|
||||
version: 2.2.1
|
||||
resolution: "http2-wrapper@npm:2.2.1"
|
||||
dependencies:
|
||||
quick-lru: "npm:^5.1.1"
|
||||
resolve-alpn: "npm:^1.2.0"
|
||||
checksum: 10c0/7207201d3c6e53e72e510c9b8912e4f3e468d3ecc0cf3bf52682f2aac9cd99358b896d1da4467380adc151cf97c412bedc59dc13dae90c523f42053a7449eedb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"https-proxy-agent@npm:^5.0.0":
|
||||
version: 5.0.1
|
||||
resolution: "https-proxy-agent@npm:5.0.1"
|
||||
@@ -8161,13 +7712,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-stream@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "is-stream@npm:4.0.1"
|
||||
checksum: 10c0/2706c7f19b851327ba374687bc4a3940805e14ca496dc672b9629e744d143b1ad9c6f1b162dece81c7bfbc0f83b32b61ccc19ad2e05aad2dd7af347408f60c7f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-string@npm:^1.0.5, is-string@npm:^1.0.7":
|
||||
version: 1.0.7
|
||||
resolution: "is-string@npm:1.0.7"
|
||||
@@ -8356,15 +7900,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"jackspeak@npm:^4.1.1":
|
||||
version: 4.1.1
|
||||
resolution: "jackspeak@npm:4.1.1"
|
||||
dependencies:
|
||||
"@isaacs/cliui": "npm:^8.0.2"
|
||||
checksum: 10c0/84ec4f8e21d6514db24737d9caf65361511f75e5e424980eebca4199f400874f45e562ac20fa8aeb1dd20ca2f3f81f0788b6e9c3e64d216a5794fd6f30e0e042
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"jest-worker@npm:^27.4.5":
|
||||
version: 27.5.1
|
||||
resolution: "jest-worker@npm:27.5.1"
|
||||
@@ -8620,15 +8155,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"keyv@npm:^5.5.3, keyv@npm:^5.5.4":
|
||||
version: 5.5.4
|
||||
resolution: "keyv@npm:5.5.4"
|
||||
dependencies:
|
||||
"@keyv/serialize": "npm:^1.1.1"
|
||||
checksum: 10c0/8dad7f61022c6348c4c691a19468b7c238198252edbd3cc08277d95253c137af7ce5ffd763b6ffded4a75cbe03dc3134f1adcd3dd26c5767c2c9c254e3b39001
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"kind-of@npm:^6.0.2":
|
||||
version: 6.0.3
|
||||
resolution: "kind-of@npm:6.0.3"
|
||||
@@ -8925,13 +8451,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lowercase-keys@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "lowercase-keys@npm:3.0.0"
|
||||
checksum: 10c0/ef62b9fa5690ab0a6e4ef40c94efce68e3ed124f583cc3be38b26ff871da0178a28b9a84ce0c209653bb25ca135520ab87fea7cd411a54ac4899cb2f30501430
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lru-cache@npm:^10.0.1":
|
||||
version: 10.4.3
|
||||
resolution: "lru-cache@npm:10.4.3"
|
||||
@@ -8946,13 +8465,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lru-cache@npm:^11.0.0":
|
||||
version: 11.2.2
|
||||
resolution: "lru-cache@npm:11.2.2"
|
||||
checksum: 10c0/72d7831bbebc85e2bdefe01047ee5584db69d641c48d7a509e86f66f6ee111b30af7ec3bd68a967d47b69a4b1fa8bbf3872630bd06a63b6735e6f0a5f1c8e83d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lru-cache@npm:^6.0.0":
|
||||
version: 6.0.0
|
||||
resolution: "lru-cache@npm:6.0.0"
|
||||
@@ -9733,7 +9245,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:^2.1.35, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34":
|
||||
"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34":
|
||||
version: 2.1.35
|
||||
resolution: "mime-types@npm:2.1.35"
|
||||
dependencies:
|
||||
@@ -9786,13 +9298,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"mimic-response@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "mimic-response@npm:4.0.0"
|
||||
checksum: 10c0/761d788d2668ae9292c489605ffd4fad220f442fbae6832adce5ebad086d691e906a6d5240c290293c7a11e99fbdbbef04abbbed498bf8699a4ee0f31315e3fb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:7.4.6":
|
||||
version: 7.4.6
|
||||
resolution: "minimatch@npm:7.4.6"
|
||||
@@ -9802,15 +9307,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^10.0.1, minimatch@npm:^10.0.3":
|
||||
version: 10.1.1
|
||||
resolution: "minimatch@npm:10.1.1"
|
||||
dependencies:
|
||||
"@isaacs/brace-expansion": "npm:^5.0.0"
|
||||
checksum: 10c0/c85d44821c71973d636091fddbfbffe62370f5ee3caf0241c5b60c18cd289e916200acb2361b7e987558cd06896d153e25d505db9fc1e43e6b4b6752e2702902
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.2":
|
||||
version: 3.1.2
|
||||
resolution: "minimatch@npm:3.1.2"
|
||||
@@ -10283,13 +9779,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"normalize-url@npm:^8.1.0":
|
||||
version: 8.1.0
|
||||
resolution: "normalize-url@npm:8.1.0"
|
||||
checksum: 10c0/e9b68db5f0264ce74fc083e2120b4a40fb3248e5dceec5f795bddcee0311b3613f858c9a65f258614fac2776b8e9957023bea8fe7299db1496b3cd1c75976cfe
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"npm-install-checks@npm:^6.0.0":
|
||||
version: 6.3.0
|
||||
resolution: "npm-install-checks@npm:6.3.0"
|
||||
@@ -10342,15 +9831,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"nth-check@npm:^2.0.0":
|
||||
version: 2.1.1
|
||||
resolution: "nth-check@npm:2.1.1"
|
||||
dependencies:
|
||||
boolbase: "npm:^1.0.0"
|
||||
checksum: 10c0/5fee7ff309727763689cfad844d979aedd2204a817fbaaf0e1603794a7c20db28548d7b024692f953557df6ce4a0ee4ae46cd8ebd9b36cfb300b9226b567c479
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"null-loader@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "null-loader@npm:4.0.1"
|
||||
@@ -10626,13 +10106,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"p-cancelable@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "p-cancelable@npm:4.0.1"
|
||||
checksum: 10c0/12636623f46784ba962b6fe7a1f34d021f1d9a2cc12c43e270baa715ea872d5c8c7d9f086ed420b8b9817e91d9bbe92c14c90e5dddd4a9968c81a2a7aef7089d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"p-limit@npm:^1.1.0":
|
||||
version: 1.3.0
|
||||
resolution: "p-limit@npm:1.3.0"
|
||||
@@ -10947,16 +10420,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"path-scurry@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "path-scurry@npm:2.0.0"
|
||||
dependencies:
|
||||
lru-cache: "npm:^11.0.0"
|
||||
minipass: "npm:^7.1.2"
|
||||
checksum: 10c0/3da4adedaa8e7ef8d6dc4f35a0ff8f05a9b4d8365f2b28047752b62d4c1ad73eec21e37b1579ef2d075920157856a3b52ae8309c480a6f1a8bbe06ff8e52b33c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"path-to-regexp@npm:0.1.12":
|
||||
version: 0.1.12
|
||||
resolution: "path-to-regexp@npm:0.1.12"
|
||||
@@ -12301,7 +11764,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve-alpn@npm:^1.0.0, resolve-alpn@npm:^1.2.0":
|
||||
"resolve-alpn@npm:^1.0.0":
|
||||
version: 1.2.1
|
||||
resolution: "resolve-alpn@npm:1.2.1"
|
||||
checksum: 10c0/b70b29c1843bc39781ef946c8cd4482e6d425976599c0f9c138cec8209e4e0736161bf39319b01676a847000085dfdaf63583c6fb4427bf751a10635bd2aa0c4
|
||||
@@ -12469,15 +11932,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"responselike@npm:^4.0.2":
|
||||
version: 4.0.2
|
||||
resolution: "responselike@npm:4.0.2"
|
||||
dependencies:
|
||||
lowercase-keys: "npm:^3.0.0"
|
||||
checksum: 10c0/8366407fc7f12466dd52682483a31dd6ca892481365caadea9a380196d8a6238650e064531087bebd25d7e9393f491efc2dad723fadc54db7a2b442dba8ef588
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"restore-cursor@npm:^3.1.0":
|
||||
version: 3.1.0
|
||||
resolution: "restore-cursor@npm:3.1.0"
|
||||
@@ -12621,7 +12075,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0":
|
||||
"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:~5.2.0":
|
||||
version: 5.2.1
|
||||
resolution: "safe-buffer@npm:5.2.1"
|
||||
checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3
|
||||
@@ -12741,7 +12195,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:^7.1.3, semver@npm:^7.7.2":
|
||||
"semver@npm:^7.1.3":
|
||||
version: 7.7.3
|
||||
resolution: "semver@npm:7.7.3"
|
||||
bin:
|
||||
@@ -13967,13 +13421,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:^1.10.0":
|
||||
version: 1.14.1
|
||||
resolution: "tslib@npm:1.14.1"
|
||||
checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:^1.9.0":
|
||||
version: 1.10.0
|
||||
resolution: "tslib@npm:1.10.0"
|
||||
@@ -13988,13 +13435,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tunnel@npm:0.0.6, tunnel@npm:^0.0.6":
|
||||
version: 0.0.6
|
||||
resolution: "tunnel@npm:0.0.6"
|
||||
checksum: 10c0/e27e7e896f2426c1c747325b5f54efebc1a004647d853fad892b46d64e37591ccd0b97439470795e5262b5c0748d22beb4489a04a0a448029636670bfd801b75
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0":
|
||||
version: 0.14.5
|
||||
resolution: "tweetnacl@npm:0.14.5"
|
||||
@@ -14067,13 +13507,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"type-fest@npm:^4.26.1":
|
||||
version: 4.41.0
|
||||
resolution: "type-fest@npm:4.41.0"
|
||||
checksum: 10c0/f5ca697797ed5e88d33ac8f1fec21921839871f808dc59345c9cf67345bfb958ce41bd821165dbf3ae591cedec2bf6fe8882098dfdd8dc54320b859711a2c1e4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"type-is@npm:~1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "type-is@npm:1.6.18"
|
||||
@@ -14272,15 +13705,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici@npm:^5.25.4":
|
||||
version: 5.29.0
|
||||
resolution: "undici@npm:5.29.0"
|
||||
dependencies:
|
||||
"@fastify/busboy": "npm:^2.0.0"
|
||||
checksum: 10c0/e4e4d631ca54ee0ad82d2e90e7798fa00a106e27e6c880687e445cc2f13b4bc87c5eba2a88c266c3eecffb18f26e227b778412da74a23acc374fca7caccec49b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"unicorn-magic@npm:^0.3.0":
|
||||
version: 0.3.0
|
||||
resolution: "unicorn-magic@npm:0.3.0"
|
||||
@@ -14422,19 +13846,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"unist-util-select@npm:^5.1.0":
|
||||
version: 5.1.0
|
||||
resolution: "unist-util-select@npm:5.1.0"
|
||||
dependencies:
|
||||
"@types/unist": "npm:^3.0.0"
|
||||
css-selector-parser: "npm:^3.0.0"
|
||||
devlop: "npm:^1.1.0"
|
||||
nth-check: "npm:^2.0.0"
|
||||
zwitch: "npm:^2.0.0"
|
||||
checksum: 10c0/2be09c8c146d92f606d7383faa3df0f905b67c0618ac8128f99f8b02cf980f0ee1035b12c598a79fe5aebfef9e10f1e9eb8eb26d605fc65122946f56332bd257
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"unist-util-stringify-position@npm:^2.0.0":
|
||||
version: 2.0.1
|
||||
resolution: "unist-util-stringify-position@npm:2.0.1"
|
||||
@@ -14582,15 +13993,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uuid@npm:^8.3.2":
|
||||
version: 8.3.2
|
||||
resolution: "uuid@npm:8.3.2"
|
||||
bin:
|
||||
uuid: dist/bin/uuid
|
||||
checksum: 10c0/bcbb807a917d374a49f475fae2e87fdca7da5e5530820ef53f65ba1d12131bd81a92ecf259cc7ce317cbe0f289e7d79fdfebcef9bfa3087c8c8a2fa304c9be54
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uuid@npm:^9.0.0":
|
||||
version: 9.0.1
|
||||
resolution: "uuid@npm:9.0.1"
|
||||
@@ -15151,7 +14553,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"xml2js@npm:0.5.0, xml2js@npm:^0.5.0":
|
||||
"xml2js@npm:0.5.0":
|
||||
version: 0.5.0
|
||||
resolution: "xml2js@npm:0.5.0"
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user