diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..526a9935 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,137 @@ +# Contributing + +## Project Scope + +The Electron.NET project ultimately tries to provide a framework for developing cross-platform client applications on the basis of .NET and Electron. Anything that is related to this goal will be considered. The project aims to be as close to Electron with .NET as a basis as possible. If your contribution does not reflect that goal, the chances of accepting it are limited. + +## Code License + +This is an open source project falling under the [MIT License](../LICENSE). By using, distributing, or contributing to this project, you accept and agree that all code within the Electron.NET project and its libraries are licensed under MIT license. + +## Becoming a Contributor + +Usually appointing someone as a contributor follows this process: + +1. An individual contributes actively via discussions (reporting bugs, giving feedback to existing or opening new issues) and / or pull requests +2. The individual is either directly asked, invited or asks for contributor rights on the project +3. The individual uses the contribution rights to sustain or increase the active contributions + +Every contributor might have to sign the contributor's license agreement (CLA) to establish a legal trust between the project and its contributors. + +## Working on Electron.NET + +### Issue Discussion + +Discussion of issues should be placed transparently in the issue tracker here on GitHub. + +* [General issues, bugs, new features](https://github.com/ElectronNET/Electron.NET/issues) +* [General discussions, help, exchange of ideas](https://github.com/ElectronNET/Electron.NET/discussions) + +### Modifying the code + +Electron.NET and its libraries uses features from the latest versions of C# (e.g., C# 10). You will therefore need a C# compiler that is up for the job. + +1. Fork and clone the repo. +2. First try to build the ElectronNET.Core library and see if you get the tests running. +3. You will be required to resolve some dependencies via NuGet. + +The build system of Electron.NET uses NUKE. + +### Code Conventions + +Most parts in the Electron.NET project are fairly straight forward. Among these are: + +* Always use statement blocks for control statements, e.g., in a for-loop, if-condition, ... +* You may use a simple (throw) statement in case of enforcing contracts on argument +* Be explicit about modifiers (some files follow an older convention of the code base, but we settled on the explicit style) + +### Development Workflow + +1. If no issue already exists for the work you'll be doing, create one to document the problem(s) being solved and self-assign. +2. Otherwise please let us know that you are working on the problem. Regular status updates (e.g. "still in progress", "no time anymore", "practically done", "pull request issued") are highly welcome. +3. Create a new branch—please don't work in the `main` branch directly. It is reserved for releases. We recommend naming the branch to match the issue being addressed (`feature/#777` or `issue-777`). +4. Add failing tests for the change you want to make. Tests are crucial and should be taken from W3C (or other specification). +5. Fix stuff. Always go from edge case to edge case. +6. All tests should pass now. Also your new implementation should not break existing tests. +7. Update the documentation to reflect any changes. (or document such changes in the original issue) +8. Push to your fork or push your issue-specific branch to the main repository, then submit a pull request against `develop`. + +Just to illustrate the git workflow for Electron.NET a little bit more we've added the following graphs. + +Initially, Electron.NET starts at the `main` branch. This branch should contain the latest stable (or released) version. + +Here we now created a new branch called `develop`. This is the development branch. + +Now active work is supposed to be done. Therefore a new branch should be created. Let's create one: + +```sh +git checkout -b feature/#777 +``` + +There may be many of these feature branches. Most of them are also pushed to the server for discussion or synchronization. + +```sh +git push -u origin feature/#777 +``` + +Now feature branches may be closed when they are done. Here we simply merge with the feature branch(es). For instance the following command takes the `feature/#777` branch from the server and merges it with the `develop` branch. + +```sh +git checkout develop +git pull +git pull origin feature/#777 +git push +``` + +Finally, we may have all the features that are needed to release a new version of Electron.NET. Here we tag the release. For instance for the 1.0 release we use `v1.0`. + +```sh +git checkout main +git merge develop +git tag v1.0 +``` + +(The last part is automatically performed by our CI system. Don't tag manually.) + +### Versioning + +The rules of [semver](http://semver.org/) don't necessarily apply here, but we will try to stay quite close to them. + +Prior to version 1.0.0 we use the following scheme: + +1. MINOR versions for reaching a feature milestone potentially combined with dramatic API changes +2. PATCH versions for refinements (e.g. performance improvements, bug fixes) + +After releasing version 1.0.0 the scheme changes to become: + +1. MAJOR versions at maintainers' discretion following significant changes to the codebase (e.g., API changes) +2. MINOR versions for backwards-compatible enhancements (e.g., performance improvements) +3. PATCH versions for backwards-compatible bug fixes (e.g., spec compliance bugs, support issues) + +#### Code style + +Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.** In general most of the [C# coding guidelines from Microsoft](https://msdn.microsoft.com/en-us/library/ff926074.aspx) are followed. This project prefers type inference with `var` to explicitly stating (redundant) information. + +It is also important to keep a certain `async`-flow and to always use `ConfigureAwait(false)` in conjunction with an `await` expression. + +## Backwards Compatibility + +We always try to remain backwards compatible beyond the currently supported versions of .NET. + +For instance, in December 2025 there have been activity to remove .NET 6 support from the codebase. We rejected this. Key points: + +1. We have absolutely no need to drop `.net6` support. It doesn't hurt us in any way. +2. Many are still using `.net6`, including Electron.NET (non-Core) users. It doesn't make sense to force them to update two things at the same time (.NET + Electron.NET). +3. We MUST NOT and NEVER update `Microsoft.Build.Utilities.Core`. This will make Electron.NET stop working on older Visual Studio and MSBuild versions. There's are also no reasons to update it in the first place. + +It's important to note that the Microsoft label of "Out of support" on .NET has almost no practical meaning. We've rarely (if ever) seen any bugs fixed in the same .NET version which mattered. The bugs that all new .NET versions have are much worse than mature .NET versions which are declared as "out of support". Keep in mind that the LTS matters most for active development / ongoing supported projects. If, e.g., a TV has been released a decade ago it most likely won't be patched. Still, you might want to deploy applications to it, which then naturally would involve being based on "out of support" versions of the framework. + +TL;DR: Unless there is a technical reason (e.g., a crucial new API not being available) we should not drop "out of support" .NET versions. At the time of writing (December 2025) the minimum supported .NET version remains at `.net6`. + +## Timeline + +**All of this information is related to ElectronNET.Core pre-v1!** + +We pretty much release whenever we have something new (i.e., do fixes such as a 0.1.1, or add new features, such as a 0.2.0) quite quickly. + +We will go for a 1.0.0 release of this as early as ~mid of January 2026 (unless we find some critical things or want to extend the beta phase for ElectronNET.Core). This should be sufficient time to get some user input and have enough experience to call it stable. diff --git a/.github/workflows/ci.yml b/.github/workflows/Build and Publish.yml similarity index 63% rename from .github/workflows/ci.yml rename to .github/workflows/Build and Publish.yml index a9b81df7..17bd8ca0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/Build and Publish.yml @@ -1,33 +1,25 @@ -name: CI +name: Build and Publish -on: [push, pull_request] +on: [push] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} -jobs: - # linux: - # runs-on: ubuntu-latest - # timeout-minutes: 10 - - # steps: - # - uses: actions/checkout@v4 +concurrency: + group: build-publish-${{ github.ref }} + cancel-in-progress: true - # - name: Setup dotnet - # uses: actions/setup-dotnet@v4 - # with: - # dotnet-version: | - # 6.0.x - # 8.0.x - # 10.0.x - - # - name: Build - # run: ./build.sh +jobs: + Integration-Tests: + uses: ./.github/workflows/integration-tests.yml + name: '1' - windows: + Publish: + needs: [Integration-Tests] runs-on: windows-latest timeout-minutes: 10 + name: '2 / Publish' steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/PR Validation.yml b/.github/workflows/PR Validation.yml new file mode 100644 index 00000000..540db15b --- /dev/null +++ b/.github/workflows/PR Validation.yml @@ -0,0 +1,39 @@ +name: PR Validation + +on: [pull_request] + +concurrency: + group: pr-validation-${{ github.ref }} + cancel-in-progress: true + +jobs: + Whitespace-Check: + uses: ./.github/workflows/trailing-whitespace-check.yml + secrets: inherit + name: '1' + + Tests: + needs: Whitespace-Check + uses: ./.github/workflows/integration-tests.yml + secrets: inherit + name: '2' + + build: + needs: [Whitespace-Check, Tests] + runs-on: windows-latest + timeout-minutes: 10 + name: '3 / Build' + + steps: + - uses: actions/checkout@v4 + + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 6.0.x + 8.0.x + 10.0.x + + - name: Build + run: .\build.ps1 diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 00000000..89ad3c95 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,220 @@ +name: Tests + +on: + workflow_call: + +concurrency: + group: integration-tests-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + name: ${{ matrix.os }} API-${{ matrix.electronVersion }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, ubuntu-24.04, windows-2022, windows-2025, macos-14, macos-15-intel, macos-26] + electronVersion: ['30.4.0', '38.2.2'] + include: + - os: ubuntu-22.04 + rid: linux-x64 + - os: ubuntu-24.04 + rid: linux-x64 + - os: windows-2022 + rid: win-x64 + - os: windows-2025 + rid: win-x64 + - os: macos-14 + rid: osx-arm64 + - os: macos-15-intel + rid: osx-x64 + - os: macos-26 + rid: osx-arm64 + + env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_NOLOGO: 1 + CI: true + ELECTRON_ENABLE_LOGGING: 1 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Random delay (0-20 seconds) + shell: bash + run: | + DELAY=$((RANDOM % 21)) + echo "Waiting for $DELAY seconds..." + sleep $DELAY + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Restore + run: dotnet restore -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj + + - name: Build + run: dotnet build --no-restore -c Release -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj + + - name: Install Linux GUI dependencies + if: runner.os == 'Linux' + run: | + set -e + sudo apt-get update + . /etc/os-release + if [ "$VERSION_ID" = "24.04" ]; then ALSA_PKG=libasound2t64; else ALSA_PKG=libasound2; fi + echo "Using ALSA package: $ALSA_PKG" + sudo apt-get install -y xvfb \ + libgtk-3-0 libnss3 libgdk-pixbuf-2.0-0 libdrm2 libgbm1 libxss1 libxtst6 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libx11-xcb1 "$ALSA_PKG" + + - name: Run tests (Linux) + if: runner.os == 'Linux' + continue-on-error: true + run: | + mkdir -p test-results + xvfb-run -a dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj \ + -c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} \ + --logger "trx;LogFileName=${{ matrix.os }}-electron-${{ matrix.electronVersion }}.trx" \ + --logger "console;verbosity=detailed" \ + --results-directory test-results + + - name: Run tests (Windows) + if: runner.os == 'Windows' + continue-on-error: true + run: | + New-Item -ItemType Directory -Force -Path test-results | Out-Null + dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj -c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} --logger "trx;LogFileName=${{ matrix.os }}-electron-${{ matrix.electronVersion }}.trx" --logger "console;verbosity=detailed" --results-directory test-results + + - name: Run tests (macOS) + if: runner.os == 'macOS' + continue-on-error: true + run: | + mkdir -p test-results + dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj -c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} --logger "trx;LogFileName=${{ matrix.os }}-electron-${{ matrix.electronVersion }}.trx" --logger "console;verbosity=detailed" --results-directory test-results + + - name: Upload raw test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results-${{ matrix.os }}-electron-${{ matrix.electronVersion }} + path: test-results/*.trx + retention-days: 7 + + summary: + name: Test Results + runs-on: ubuntu-24.04 + if: always() + needs: [tests] + + permissions: + actions: read + contents: read + checks: write + pull-requests: write + + steps: + - name: Download all test results + uses: actions/download-artifact@v4 + with: + path: test-results + + - name: Setup .NET (for CTRF conversion) + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' + + - name: Install CTRF TRX→CTRF converter (dotnet tool) + run: | + dotnet new tool-manifest + dotnet tool install DotnetCtrfJsonReporter --local + + - name: Convert TRX → CTRF and clean names (filePath=OS|Electron X.Y.Z) + shell: bash + run: | + set -euo pipefail + mkdir -p ctrf + shopt -s globstar nullglob + conv=0 + for trx in test-results/**/*.trx; do + base="$(basename "$trx" .trx)" # e.g. ubuntu-22.04-electron-30.4.0 + os="${base%%-electron-*}" + electron="${base#*-electron-}" + label="$os|Electron $electron" + outdir="ctrf/${label}" + mkdir -p "$outdir" + out="${outdir}/ctrf-report.json" + + dotnet tool run DotnetCtrfJsonReporter -p "$trx" -d "$outdir" -f "ctrf-report.json" + + jq --arg fp "$label" '.results.tests |= map(.filePath = $fp)' "$out" > "${out}.tmp" && mv "${out}.tmp" "$out" + + echo "Converted & normalized $trx -> $out" + conv=$((conv+1)) + done + echo "Processed $conv TRX file(s)" + + - name: Publish Test Report + if: always() + uses: ctrf-io/github-test-reporter@v1 + with: + report-path: 'ctrf/**/*.json' + summary: true + pull-request: false + status-check: false + status-check-name: 'Integration Tests' + use-suite-name: true + update-comment: true + always-group-by: true + overwrite-comment: true + exit-on-fail: true + group-by: 'suite' + upload-artifact: true + fetch-previous-results: true + summary-report: false + summary-delta-report: true + github-report: true + test-report: false + test-list-report: false + failed-report: true + failed-folded-report: false + skipped-report: true + suite-folded-report: true + suite-list-report: false + file-report: true + previous-results-report: true + insights-report: true + flaky-report: true + flaky-rate-report: true + fail-rate-report: false + slowest-report: false + report-order: 'summary-delta-report,failed-report,skipped-report,suite-folded-report,file-report,previous-results-report,github-report' + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Save PR Number + if: github.event_name == 'pull_request' + run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV + + - name: Write PR Number to File + if: github.event_name == 'pull_request' + run: echo "$PR_NUMBER" > pr_number.txt + shell: bash + + - name: Upload PR Number Artifact + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: pr_number + path: pr_number.txt + + - name: Summary + run: echo "All matrix test jobs completed." diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml new file mode 100644 index 00000000..23dac1fc --- /dev/null +++ b/.github/workflows/pr-comment.yml @@ -0,0 +1,81 @@ +name: Create PR Comments + +on: + workflow_run: + workflows: [ "PR Validation" ] + types: [completed] + +permissions: + contents: read + actions: read + pull-requests: write + +jobs: + pr-comment: + name: Post Test Result as PR comment + runs-on: ubuntu-24.04 + if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'cancelled' + + steps: + - name: Download CTRF artifact + uses: dawidd6/action-download-artifact@v8 + with: + github_token: ${{ github.token }} + run_id: ${{ github.event.workflow_run.id }} + name: ctrf-report + path: ctrf + + - name: Download PR Number Artifact + uses: dawidd6/action-download-artifact@v8 + with: + github_token: ${{ github.token }} + run_id: ${{ github.event.workflow_run.id }} + name: pr_number + path: pr_number + + - name: Read PR Number + run: | + set -Eeuo pipefail + FILE='pr_number/pr_number.txt' + + # Ensure file exists + if [ ! -f "$FILE" ] || [ -L "$FILE" ]; then + echo "Error: $FILE is missing or is not a regular file." >&2 + exit 1 + fi + + # Chec file size + if [ "$(wc -c < "$FILE" | tr -d ' ')" -gt 200 ]; then + echo "Error: $FILE is too large." >&2 + exit 1 + fi + + # Read first line + PR_NUMBER="" + IFS= read -r PR_NUMBER < "$FILE" || true + + # Validate whether it's a number + if ! [[ "$PR_NUMBER" =~ ^[0-9]{1,10}$ ]]; then + echo "Error: PR_NUMBER is not a valid integer on the first line." >&2 + exit 1 + fi + + printf 'PR_NUMBER=%s\n' "$PR_NUMBER" >> "$GITHUB_ENV" + + - name: Post PR Comment + uses: ctrf-io/github-test-reporter@v1 + with: + report-path: 'ctrf/**/*.json' + issue: ${{ env.PR_NUMBER }} + + summary: true + pull-request: true + use-suite-name: true + update-comment: true + always-group-by: true + overwrite-comment: true + upload-artifact: false + + pull-request-report: true + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/retry-test-jobs.yml b/.github/workflows/retry-test-jobs.yml new file mode 100644 index 00000000..1fd0342c --- /dev/null +++ b/.github/workflows/retry-test-jobs.yml @@ -0,0 +1,50 @@ +name: Tests auto-rerun + +on: + workflow_run: + workflows: [ "PR Validation", "Build and Publish" ] + types: [ completed ] + +jobs: + rerun-failed-matrix-jobs-once: + if: > + ${{ + github.event.workflow_run.conclusion == 'failure' && + github.event.workflow_run.run_attempt == 1 + }} + runs-on: ubuntu-24.04 + + permissions: + actions: write + contents: read + + steps: + - name: Decide whether to rerun (only if matrix jobs failed) + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + RUN_ID: ${{ github.event.workflow_run.id }} + run: | + echo "Inspecting jobs of workflow run $RUN_ID in $REPO" + + jobs_json="$(gh api repos/$REPO/actions/runs/$RUN_ID/jobs)" + + echo "Jobs and conclusions:" + echo "$jobs_json" | jq '.jobs[] | {name: .name, conclusion: .conclusion}' + + failed_matrix_jobs=$(echo "$jobs_json" | jq ' + [ .jobs[] + | select(.conclusion == "failure" + and (.name | contains(" API-"))) + ] + | length + ') + + echo "Failed Integration Tests matrix jobs: $failed_matrix_jobs" + + if [ "$failed_matrix_jobs" -gt 0 ]; then + echo "Detected failing Integration Tests jobs – re-running failed jobs for this run." + gh run rerun "$RUN_ID" --failed + else + echo "Only non-matrix jobs (like Test Results) failed – not auto-rerunning." + fi diff --git a/.github/workflows/trailing-whitespace-check.yml b/.github/workflows/trailing-whitespace-check.yml new file mode 100644 index 00000000..9b8c7799 --- /dev/null +++ b/.github/workflows/trailing-whitespace-check.yml @@ -0,0 +1,84 @@ +name: Whitespace Check + +on: + workflow_call: + +jobs: + check-whitespace: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check for trailing whitespace + run: | + echo "Checking for trailing whitespace in changed files..." + + # Get the base branch + BASE_SHA="${{ github.event.pull_request.base.sha }}" + HEAD_SHA="${{ github.event.pull_request.head.sha }}" + + # Get list of changed files (excluding deleted files) + CHANGED_FILES=$(git diff --name-only --diff-filter=d "$BASE_SHA" "$HEAD_SHA") + + if [ -z "$CHANGED_FILES" ]; then + echo "No files to check." + exit 0 + fi + + # File patterns to check (text files) + PATTERNS="\.cs$|\.csproj$|\.sln$|\.ts$|\.html$|\.css$|\.scss$" + + # Directories and file patterns to exclude + EXCLUDE_PATTERNS="(^|\/)(\.|node_modules|bin|obj|artifacts|packages|\.vs|\.nuke\/temp)($|\/)" + + ERRORS_FOUND=0 + TEMP_FILE=$(mktemp) + + while IFS= read -r file; do + # Skip if file doesn't exist (shouldn't happen with --diff-filter=d, but just in case) + if [ ! -f "$file" ]; then + continue + fi + + # Check if file matches patterns to check + if ! echo "$file" | grep -qE "$PATTERNS"; then + continue + fi + + # Check if file should be excluded + if echo "$file" | grep -qE "$EXCLUDE_PATTERNS"; then + continue + fi + + # Find trailing whitespace lines, excluding XML doc placeholder lines that are exactly "/// " (one space) + MATCHES=$(grep -n '[[:space:]]$' "$file" | grep -vE '^[0-9]+:[[:space:]]*/// $' || true) + + if [ -n "$MATCHES" ]; then + echo "❌ Trailing whitespace found in: $file" + echo "$MATCHES" | head -10 + TOTAL=$(echo "$MATCHES" | wc -l) + if [ "$TOTAL" -gt 10 ]; then + echo " ... and $(($TOTAL - 10)) more lines" + fi + echo "1" >> "$TEMP_FILE" + fi + done <<< "$CHANGED_FILES" + + ERRORS_FOUND=$(wc -l < "$TEMP_FILE" 2>/dev/null || echo "0") + rm -f "$TEMP_FILE" + + if [ "$ERRORS_FOUND" -gt 0 ]; then + echo "" + echo "❌ Found trailing whitespace in $ERRORS_FOUND file(s)." + echo "Please remove trailing whitespace from the files listed above." + exit 1 + else + echo "✅ No trailing whitespace found in changed files." + exit 0 + fi diff --git a/Changelog.md b/Changelog.md index 560129ec..2859e7b5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,36 @@ +# 0.3.0 + +## ElectronNET.Core + +- Updated infrastructure (#937, #939) @softworkz +- Updated all model classes to Electron API 39.2 (#949) @softworkz +- Fixed output path for `electron-builder` (#942) @softworkz +- Fixed floating point display resolution (#944) @softworkz +- Fixed error in case of missing electron-host-hook (#978) +- Fixed previous API break using exposed `JsonElement` objects (#938) @softworkz +- Fixed and improved several test cases (#962) @softworkz +- Fixed startup of Electron.NET from VS Code Debug Adapter (#952) +- Fixed the `BrowserWindowOptions` (#945) @softworkz +- Fixed example for `AutoMenuHide` to reflect platform capabilities (#982) @markatosi +- Added several migration checks for publishing (#966) @softworkz +- Added more test runners for E2E tests (#950, #951) @agracio +- Added dynamic updates for tray menu (#973) @davidroth +- Added matrix tests with 6 runners and 2 electron version (#948) @softworkz +- Added additional APIs for WebContents (#958) @agracio +- Added documentation for MacOS package publish (#983) @markatosi +- Added sample application for `ElectronHostHook` (#967) @adityashirsatrao007 + +# 0.2.0 + +## ElectronNET.Core + +- Updated dependencies (#930) @softworkz +- Updated integration tests (#931) @softworkz +- Updated `ElectronNET.Host` (#935) @softworkz +- Removed transition period specific build configuration (#928) @softworkz +- Added `IsRunningBlazor` option to `BrowserWindowOptions` (#926) +- Added platform support attributes (#929) @softworkz + # 0.1.0 ## ElectronNET.Core diff --git a/README.md b/README.md index bbec26d1..c264e3be 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Build cross platform desktop applications with .NET 6/8/10 - from console apps t ## Wait - how does that work exactly? -Well... there are lots of different approaches how to get a X-plat desktop app running. Electron.NET provides a range of ways to build .NET based solutions using Electron at the side of presentation. +Well... there are lots of different approaches how to get a X-plat desktop app running. Electron.NET provides a range of ways to build .NET-based solutions using Electron at the side of presentation. -While the classic Electron.NET setup, using an ASP.NET host ran by the Electron side is still the primary way, there's more flexibility now: both, dotnet and Electron are now able to launch the other for better lifetime management, and when you don't need a local web server - like when running content from files or remote servers, you can drop the ASP.NET stack altogether and got with a lightweight console app instead. +While the classic Electron.NET setup (using an ASP.NET host run by the Electron side) is still the primary way, there's more flexibility now. Both .NET and Electron are now able to launch the other for better lifetime management, and when you don't need a local web server (like when running content from files or remote servers), you can drop the ASP.NET stack altogether and go with a lightweight console app instead. ## 📦 NuGet @@ -58,22 +58,22 @@ To do so, use the `UseElectron` extension method on a `WebApplicationBuilder`, a using ElectronNET.API; using ElectronNET.API.Entities; - public static void Main(string[] args) - { - WebHost.CreateDefaultBuilder(args) - .UseElectron(args, ElectronAppReady) - .UseStartup() - .Build() - .Run(); - } - - public static async Task ElectronAppReady() - { - var browserWindow = await Electron.WindowManager.CreateWindowAsync( - new BrowserWindowOptions { Show = false }); - - browserWindow.OnReadyToShow += () => browserWindow.Show(); - } +public static void Main(string[] args) +{ + WebHost.CreateDefaultBuilder(args) + .UseElectron(args, ElectronAppReady) + .UseStartup() + .Build() + .Run(); +} + +public static async Task ElectronAppReady() +{ + var browserWindow = await Electron.WindowManager.CreateWindowAsync( + new BrowserWindowOptions { Show = false }); + + browserWindow.OnReadyToShow += () => browserWindow.Show(); +} ``` ### Minimal API Example @@ -113,13 +113,64 @@ app.MapRazorPages(); app.Run(); ``` +### Blazor + +For a project with Blazor you can use: + +```cs +using ElectronNET.API; +using ElectronNET.API.Entities; + +var builder = WebApplication.CreateBuilder(args); + +builder.Services + .AddRazorComponents() + .AddInteractiveWebAssemblyComponents(); + +builder.Services.AddElectron(); // <-- might be useful to set up DI + +builder.UseElectron(args, async () => +{ + var options = new BrowserWindowOptions { + Show = false, + IsRunningBlazor = true, // <-- crucial + }; + if (OperatingSystem.IsWindows() || OperatingSystem.IsLinux()) + options.AutoHideMenuBar = true; + var browserWindow = await Electron.WindowManager.CreateWindowAsync(options); + browserWindow.OnReadyToShow += () => browserWindow.Show(); +}); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseWebAssemblyDebugging(); +} +else +{ + app.UseExceptionHandler("/Error", createScopeForErrors: true); +} + +app.UseStaticFiles(); +app.UseAntiforgery(); + +app.MapRazorComponents() + .AddInteractiveWebAssemblyRenderMode(); + +app.Run(); +``` + +The `IsRunningBlazor` option makes sure to set up the renderer in a way that Blazor can just run without any interference. This includes things such as HMR for development. + ## 🚀 Starting and Debugging the Application Just press `F5` in Visual Studio or use dotnet for debugging. ## 📔 Usage of the Electron API -A complete documentation is available on the Wiki. +Complete documentation is available on the Wiki. In this YouTube video, we show you how you can create a new project, use the Electron.NET API, debug a application and build an executable desktop app for Windows: [Electron.NET - Getting Started](https://www.youtube.com/watch?v=nuM6AojRFHk) diff --git a/docs/Core/Migration-Checks.md b/docs/Core/Migration-Checks.md new file mode 100644 index 00000000..4464e6b9 --- /dev/null +++ b/docs/Core/Migration-Checks.md @@ -0,0 +1,235 @@ +# Migration Checks + +Electron.NET includes automatic build-time validation checks that help users migrating from previous versions avoid common configuration issues. These checks run automatically during the build process and provide helpful guidance when problems are detected. + +## Overview + +When you build an Electron.NET project, the following validation checks are performed: + +| Code | Check | Description | +|------|-------|-------------| +| [ELECTRON001](#1-packagejson-not-allowed) | package.json not allowed | Ensures no package.json exists outside ElectronHostHook | +| [ELECTRON002](#2-electron-manifestjson-not-allowed) | electron-manifest.json not allowed | Detects deprecated manifest files | +| [ELECTRON003](#3-electron-builderjson-location) | electron-builder.json location | Verifies electron-builder.json exists in Properties folder | +| [ELECTRON004](#3-electron-builderjson-location) | electron-builder.json wrong location | Warns if electron-builder.json is found in incorrect locations | +| [ELECTRON005](#4-parent-paths-not-allowed-in-electron-builderjson) | Parent paths not allowed | Checks for `..` references in config | +| [ELECTRON006](#5-publish-profile-validation) | ASP.NET publish profile mismatch | Warns when ASP.NET projects have console-style profiles | +| [ELECTRON007](#5-publish-profile-validation) | Console publish profile mismatch | Warns when console projects have ASP.NET-style profiles | + +--- + +## 1. package.json not allowed + +**Warning Code:** `ELECTRON001` + +### What is checked + +The build system scans for `package.json` and `package-lock.json` files in your project directory. These files should not exist in the project root or subdirectories (with one exception). + +### Why this matters + +In previous versions of Electron.NET, a `package.json` file was required in the project. The new version generates this file automatically from MSBuild properties defined in your `.csproj` file. + +### Exception + +A `package.json` file **is allowed** in the `ElectronHostHook` folder if you're using custom host hooks. This is the only valid location for a manually maintained package.json. + +### How to fix + +1. **Open your project's `.csproj` file** +2. **Add the required properties** to a PropertyGroup with the label `ElectronNetCommon`: + +```xml + + my-electron-app + My Electron App + 1.0.0 + My awesome Electron.NET application + My Company + Copyright © 2025 + 30.0.9 + +``` + +3. **Delete the old `package.json`** file from your project root + +> **See also:** [Migration Guide](Migration-Guide.md) for complete migration instructions. + +--- + +## 2. electron-manifest.json not allowed + +**Warning Code:** `ELECTRON002` + +### What is checked + +The build system checks for the presence of `electron.manifest.json` or `electron-manifest.json` files in your project. + +### Why this matters + +The `electron.manifest.json` file format is deprecated. All configuration should now be specified using: +- MSBuild properties in your `.csproj` file (for application metadata) +- The `electron-builder.json` file in the `Properties` folder (for build configuration) + +### How to fix + +1. **Migrate application properties** to your `.csproj` file (see [Migration Guide](Migration-Guide.md)) +2. **Move the `build` section** from `electron.manifest.json` to `Properties/electron-builder.json` +3. **Delete the old `electron.manifest.json`** file + +**Example electron-builder.json:** +```json +{ + "compression": "maximum", + "win": { + "icon": "Assets/app.ico", + "target": ["nsis", "portable"] + }, + "linux": { + "icon": "Assets/app.png", + "target": ["AppImage", "deb"] + }, + "mac": { + "icon": "Assets/app.icns", + "target": ["dmg", "zip"] + } +} +``` + +--- + +## 3. electron-builder.json Location + +**Warning Codes:** `ELECTRON003`, `ELECTRON004` + +### What is checked + +- `ELECTRON003`: Verifies that an `electron-builder.json` file exists in the `Properties` folder +- `ELECTRON004`: Warns if `electron-builder.json` is found in incorrect locations + +### Why this matters + +The `electron-builder.json` file must be located in the `Properties` folder so it can be properly copied to the output directory during publishing. + +### How to fix + +1. **Create the Properties folder** if it doesn't exist +2. **Move or create** `electron-builder.json` in `Properties/electron-builder.json` +3. **Remove** any `electron-builder.json` files from other locations + +**Expected structure:** +``` +MyProject/ +├── Properties/ +│ ├── electron-builder.json ✅ Correct location +│ ├── launchSettings.json +│ └── PublishProfiles/ +├── MyProject.csproj +└── Program.cs +``` + +--- + +## 4. Parent paths not allowed in electron-builder.json + +**Warning Code:** `ELECTRON005` + +### What is checked + +The build system scans the `electron-builder.json` file for parent-path references (`..`). + +### Why this matters + +During the publish process, the `electron-builder.json` file is copied to the build output directory. Any relative paths in this file are resolved from that location, not from your project directory. Parent-path references (`../`) will not work correctly because they would point outside the published application. + +### How to fix + +1. **Move resource files** (icons, installers, etc.) inside your project folder structure +2. **Configure the files** to be copied to the output directory in your `.csproj`: + +```xml + + + PreserveNewest + + +``` + +3. **Update paths** in `electron-builder.json` to use relative paths without `..`: + +**Before (incorrect):** +```json +{ + "win": { + "icon": "../SharedAssets/app.ico" + } +} +``` + +**After (correct):** +```json +{ + "win": { + "icon": "Assets/app.ico" + } +} +``` + +--- + +## 5. Publish Profile Validation + +**Warning Codes:** `ELECTRON006`, `ELECTRON007` + +### What is checked + +The build system examines `.pubxml` files in the `Properties/PublishProfiles` folder and validates that they match the project type: + +- **ELECTRON006**: For **ASP.NET projects** (using `Microsoft.NET.Sdk.Web`), checks that publish profiles include `WebPublishMethod`. This property is required for proper ASP.NET publishing. + +- **ELECTRON007**: For **console/other projects** (not using the Web SDK), checks that publish profiles do NOT include the `WebPublishMethod` property. These ASP.NET-specific properties are incorrect for non-web applications. + +### Why this matters + +Electron.NET supports both ASP.NET and console application project types, each requiring different publish profile configurations: + +| Project Type | SDK | Expected Properties | +|--------------|-----|---------------------| +| ASP.NET (Razor Pages, MVC, Blazor) | `Microsoft.NET.Sdk.Web` | `WebPublishMethod`, no `PublishProtocol` | +| Console Application | `Microsoft.NET.Sdk` | `PublishProtocol`, no `WebPublishMethod` | + +Using the wrong publish profile type can lead to incomplete or broken builds. + +### How to fix + +1. **Delete existing publish profiles** from `Properties/PublishProfiles/` +2. **Create new publish profiles** using the Visual Studio Publishing Wizard: + - Right-click on the project in Solution Explorer + - Select **Publish...** + - Follow the wizard to create a **Folder** publish profile + +For correct publish profile examples for both ASP.NET and Console applications, see **[Package Building](../Using/Package-Building.md#step-1-create-publish-profiles)**. + +--- + +## Disabling Migration Checks + +If you need to disable specific migration checks (not recommended), you can set the following properties in your `.csproj` file: + +```xml + + + true + +``` + +> ⚠️ **Warning:** Disabling migration checks may result in build or runtime errors. Only disable checks if you fully understand the implications. + +--- + +## See Also + +- [Migration Guide](Migration-Guide.md) - Complete step-by-step migration instructions +- [Advanced Migration Topics](Advanced-Migration-Topics.md) - Complex migration scenarios +- [Configuration](../Using/Configuration.md) - Project configuration options +- [Package Building](../Using/Package-Building.md) - Building distributable packages diff --git a/docs/GettingStarted/Console-App.md b/docs/GettingStarted/Console-App.md index c848373c..1659e392 100644 --- a/docs/GettingStarted/Console-App.md +++ b/docs/GettingStarted/Console-App.md @@ -54,7 +54,7 @@ Add the Electron.NET configuration to your `.csproj` file: - + ``` diff --git a/docs/Using/Custom_main.md b/docs/Using/Custom_main.md new file mode 100644 index 00000000..dac300fb --- /dev/null +++ b/docs/Using/Custom_main.md @@ -0,0 +1,74 @@ +# Using custom_main.js + +This guide explains how to include and use a `custom_main.js` file in your Electron.NET application for advanced Electron/Node.js customization. + +## Why use custom_main.js? + +- Register custom protocol handlers (e.g., `myapp://`) — protocols must be registered before the app is fully initialized +- Integrate Node.js modules (e.g., telemetry, OS APIs) +- Control startup logic (abort, environment checks) +- Set up IPC messaging or preload scripts + +## Step-by-Step Process + +### 1. Create the custom_main.js file + +Place your custom logic in `electron/custom_main.js`: + +```javascript +module.exports.onStartup = function(host) { + // Example: Register a global shortcut for opening dev tools + const { app, globalShortcut, BrowserWindow } = require('electron'); + app.on('ready', () => { + const ret = globalShortcut.register('Control+Shift+I', () => { + BrowserWindow.getAllWindows().forEach(win => win.webContents.openDevTools()); + console.log('Ctrl+Shift+I is pressed: DevTools opened!'); + }); + }); + app.on('will-quit', () => { + globalShortcut.unregisterAll(); + }); + return true; +}; +``` + +### 2. Configure your .csproj to copy custom_main.js to output + +Add this to your `.csproj` file: + +```xml + + + PreserveNewest + .electron\custom_main.js + + +``` + +### 3. Build and run your app + +Use the standard build/run commands: + +```powershell +dotnet build +dotnet run +``` + +Electron.NET will automatically load and execute your `custom_main.js` before initializing the .NET backend. + +## Advanced Usage + +Use environment variables to control features: + + ```javascript + const env = process.env.ASPNETCORE_ENVIRONMENT || 'Production'; + if (env === 'Development') { /* enable dev features */ } + ``` + +## Notes + +- `custom_main.js` must use CommonJS syntax (`module.exports.onStartup = ...`). +- Place the file in your source directory and copy it to `.electron` using `.csproj`. +- Electron.NET will abort startup if `onStartup` returns `false`. + +### Complete example is available here [ElectronNetSampleApp](https://github.com/niteshsinghal85/ElectronNetSampleApp) \ No newline at end of file diff --git a/docs/Using/Package-Building.md b/docs/Using/Package-Building.md index 28385959..6b6325e5 100644 --- a/docs/Using/Package-Building.md +++ b/docs/Using/Package-Building.md @@ -26,12 +26,15 @@ Add publish profiles to `Properties/PublishProfiles/`: Release Any CPU - publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\ - FileSystem + true + FileSystem + publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\ + FileSystem + <_TargetId>Folder net10.0 win-x64 + 48eff821-2f4d-60cc-aa44-be0f1d6e5f35 true - false ``` @@ -46,12 +49,61 @@ Add publish profiles to `Properties/PublishProfiles/`: Release Any CPU - publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\ - FileSystem + true + FileSystem + publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\ + FileSystem + <_TargetId>Folder net10.0 linux-x64 + 48eff821-2f4d-60cc-aa44-be0f1d6e5f35 + true + + +``` + +#### ASP.NET Application Profile (macOS Apple Silicon ARM64) + +**osx-arm64.pubxml:** + +```xml + + + + Release + Any CPU + true + FileSystem + publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\ + FileSystem + <_TargetId>Folder + net10.0 + osx-arm64 + 48eff821-2f4d-60cc-aa44-be0f1d6e5f35 + true + + +``` + +#### ASP.NET Application Profile (macOS Intel x64) + +**osx-x64.pubxml:** + +```xml + + + + Release + Any CPU + true + FileSystem + publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\ + FileSystem + <_TargetId>Folder + net10.0 + osx-x64 + 48eff821-2f4d-60cc-aa44-be0f1d6e5f35 true - false ``` @@ -97,6 +149,46 @@ Add publish profiles to `Properties/PublishProfiles/`: ``` +#### Console Application Profile (macOS Apple Silicon ARM64) + +**osx-arm64.pubxml:** + +```xml + + + + Release + Any CPU + publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\ + FileSystem + net10.0 + osx-arm64 + false + false + + +``` + +#### Console Application Profile (macOS Intel x64) + +**osx-x64.pubxml:** + +```xml + + + + Release + Any CPU + publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\ + FileSystem + net10.0 + osx-x64 + false + false + + +``` + ### Step 2: Configure Electron Builder ElectronNET.Core automatically adds a default `electron-builder.json` file under `Properties\electron-builder.json`. diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md index 4f1db543..487f547f 100644 --- a/docs/_Sidebar.md +++ b/docs/_Sidebar.md @@ -9,6 +9,7 @@ - [What's new?](Core/What's-New.md) - [Migration Guide](Core/Migration-Guide.md) +- [Migration Checks](Core/Migration-Checks.md) - [Advanced Migration](Core/Advanced-Migration-Topics.md) # Getting Started @@ -23,6 +24,7 @@ - [Startup-Methods](Using/Startup-Methods.md) - [Debugging](Using/Debugging.md) - [Package Building](Using/Package-Building.md) +- [Adding a `custom_main.js`](Using/Custom_main.md) # API Reference diff --git a/nuke/ReleaseNotesParser.cs b/nuke/ReleaseNotesParser.cs index d449a53e..7b7f5f0b 100644 --- a/nuke/ReleaseNotesParser.cs +++ b/nuke/ReleaseNotesParser.cs @@ -85,7 +85,7 @@ private IReadOnlyList ParseComplexFormat(string[] lines) // Parse content. var notes = new List(); - + while (true) { // Sanity checks. diff --git a/nuke/_build.csproj b/nuke/_build.csproj index 3258f31e..47ebb0a1 100644 --- a/nuke/_build.csproj +++ b/nuke/_build.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 CS0649;CS0169 .. @@ -11,7 +11,9 @@ - + + + diff --git a/src/.editorconfig b/src/.editorconfig new file mode 100644 index 00000000..17389dfa --- /dev/null +++ b/src/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# CA1416: Validate platform compatibility +dotnet_diagnostic.CA1416.severity = error diff --git a/src/ElectronNET.API/API/ApiBase.cs b/src/ElectronNET.API/API/ApiBase.cs index ec63c743..96f68313 100644 --- a/src/ElectronNET.API/API/ApiBase.cs +++ b/src/ElectronNET.API/API/ApiBase.cs @@ -1,4 +1,5 @@ // ReSharper disable InconsistentNaming + namespace ElectronNET.API { using Common; @@ -17,6 +18,7 @@ protected enum SocketTaskEventNameTypes DashesLowerFirst, NoDashUpperFirst } + protected enum SocketTaskMessageNameTypes { DashesLowerFirst, @@ -29,15 +31,15 @@ protected enum SocketEventNameTypes CamelCase, } - private const int PropertyTimeout = 1000; + private static readonly TimeSpan InvocationTimeout = 1000.ms(); private readonly string objectName; - private readonly ConcurrentDictionary propertyGetters; - private readonly ConcurrentDictionary propertyEventNames = new(); - private readonly ConcurrentDictionary propertyMessageNames = new(); + private readonly ConcurrentDictionary invocators; + private readonly ConcurrentDictionary invocationEventNames = new(); + private readonly ConcurrentDictionary invocationMessageNames = new(); private readonly ConcurrentDictionary methodMessageNames = new(); private static readonly ConcurrentDictionary eventContainers = new(); - private static readonly ConcurrentDictionary> AllPropertyGetters = new(); + private static readonly ConcurrentDictionary> AllInvocators = new(); private readonly object objLock = new object(); @@ -58,7 +60,7 @@ protected set protected ApiBase() { this.objectName = this.GetType().Name.LowerFirst(); - propertyGetters = AllPropertyGetters.GetOrAdd(objectName, _ => new ConcurrentDictionary()); + this.invocators = AllInvocators.GetOrAdd(this.objectName, _ => new ConcurrentDictionary()); } protected void CallMethod0([CallerMemberName] string callerName = null) @@ -113,21 +115,26 @@ protected void CallMethod3(object val1, object val2, object val3, [CallerMemberN } } - protected Task GetPropertyAsync(object arg = null, [CallerMemberName] string callerName = null) + protected Task InvokeAsync(object arg = null, [CallerMemberName] string callerName = null) + { + return this.InvokeAsyncWithTimeout(InvocationTimeout, arg, callerName); + } + + protected Task InvokeAsyncWithTimeout(TimeSpan invocationTimeout, object arg = null, [CallerMemberName] string callerName = null) { Debug.Assert(callerName != null, nameof(callerName) + " != null"); lock (this.objLock) { - return this.propertyGetters.GetOrAdd(callerName, _ => + return this.invocators.GetOrAdd(callerName, _ => { - var getter = new PropertyGetter(this, callerName, PropertyTimeout, arg); + var getter = new Invocator(this, callerName, invocationTimeout, arg); getter.Task().ContinueWith(_ => { lock (this.objLock) { - return this.propertyGetters.TryRemove(callerName, out var _); + return this.invocators.TryRemove(callerName, out var _); } }); @@ -135,15 +142,15 @@ protected Task GetPropertyAsync(object arg = null, [CallerMemberName] stri }).Task(); } } - + protected void AddEvent(Action value, int? id = null, [CallerMemberName] string callerName = null) { Debug.Assert(callerName != null, nameof(callerName) + " != null"); - var eventName = EventName(callerName); - - var eventKey = EventKey(eventName, id); + var eventName = this.EventName(callerName); + + var eventKey = this.EventKey(eventName, id); - lock (objLock) + lock (this.objLock) { var container = eventContainers.GetOrAdd(eventKey, _ => { @@ -156,14 +163,14 @@ protected void AddEvent(Action value, int? id = null, [CallerMemberName] string container.Register(value); } } - + protected void RemoveEvent(Action value, int? id = null, [CallerMemberName] string callerName = null) { Debug.Assert(callerName != null, nameof(callerName) + " != null"); - var eventName = EventName(callerName); - var eventKey = EventKey(eventName, id); + var eventName = this.EventName(callerName); + var eventKey = this.EventKey(eventName, id); - lock (objLock) + lock (this.objLock) { if (eventContainers.TryGetValue(eventKey, out var container) && !container.Unregister(value)) { @@ -172,15 +179,15 @@ protected void RemoveEvent(Action value, int? id = null, [CallerMemberName] stri } } } - + protected void AddEvent(Action value, int? id = null, [CallerMemberName] string callerName = null) { Debug.Assert(callerName != null, nameof(callerName) + " != null"); - - var eventName = EventName(callerName); - var eventKey = EventKey(eventName, id); - lock (objLock) + var eventName = this.EventName(callerName); + var eventKey = this.EventKey(eventName, id); + + lock (this.objLock) { var container = eventContainers.GetOrAdd(eventKey, _ => { @@ -197,10 +204,10 @@ protected void AddEvent(Action value, int? id = null, [CallerMemberName] s protected void RemoveEvent(Action value, int? id = null, [CallerMemberName] string callerName = null) { Debug.Assert(callerName != null, nameof(callerName) + " != null"); - var eventName = EventName(callerName); - var eventKey = EventKey(eventName, id); + var eventName = this.EventName(callerName); + var eventKey = this.EventKey(eventName, id); - lock (objLock) + lock (this.objLock) { if (eventContainers.TryGetValue(eventKey, out var container) && !container.Unregister(value)) { @@ -212,33 +219,33 @@ protected void RemoveEvent(Action value, int? id = null, [CallerMemberName private string EventName(string callerName) { - switch (SocketEventNameType) + switch (this.SocketEventNameType) { case SocketEventNameTypes.DashedLower: - return $"{objectName}-{callerName.ToDashedEventName()}"; + return $"{this.objectName}-{callerName.ToDashedEventName()}"; case SocketEventNameTypes.CamelCase: - return $"{objectName}-{callerName.ToCamelCaseEventName()}"; + return $"{this.objectName}-{callerName.ToCamelCaseEventName()}"; default: throw new ArgumentOutOfRangeException(); } } - + private string EventKey(string eventName, int? id) { return string.Format(CultureInfo.InvariantCulture, "{0}{1:D}", eventName, id); } - internal abstract class PropertyGetter + internal abstract class Invocator { public abstract Task Task(); } - internal class PropertyGetter : PropertyGetter + internal class Invocator : Invocator { private readonly Task tcsTask; private TaskCompletionSource tcs; - public PropertyGetter(ApiBase apiBase, string callerName, int timeoutMs, object arg = null) + public Invocator(ApiBase apiBase, string callerName, TimeSpan timeout, object arg = null) { this.tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); this.tcsTask = this.tcs.Task; @@ -249,22 +256,22 @@ public PropertyGetter(ApiBase apiBase, string callerName, int timeoutMs, object switch (apiBase.SocketTaskEventNameType) { case SocketTaskEventNameTypes.DashesLowerFirst: - eventName = apiBase.propertyEventNames.GetOrAdd(callerName, s => $"{apiBase.objectName}-{s.StripAsync().LowerFirst()}-completed"); + eventName = apiBase.invocationEventNames.GetOrAdd(callerName, s => $"{apiBase.objectName}-{s.StripAsync().LowerFirst()}-completed"); break; case SocketTaskEventNameTypes.NoDashUpperFirst: - eventName = apiBase.propertyEventNames.GetOrAdd(callerName, s => $"{apiBase.objectName}{s.StripAsync()}Completed"); + eventName = apiBase.invocationEventNames.GetOrAdd(callerName, s => $"{apiBase.objectName}{s.StripAsync()}Completed"); break; default: throw new ArgumentOutOfRangeException(); } - + switch (apiBase.SocketTaskMessageNameType) { case SocketTaskMessageNameTypes.DashesLowerFirst: - messageName = apiBase.propertyMessageNames.GetOrAdd(callerName, s => $"{apiBase.objectName}-{s.StripAsync().LowerFirst()}"); + messageName = apiBase.invocationMessageNames.GetOrAdd(callerName, s => $"{apiBase.objectName}-{s.StripAsync().LowerFirst()}"); break; case SocketTaskMessageNameTypes.NoDashUpperFirst: - messageName = apiBase.propertyMessageNames.GetOrAdd(callerName, s => apiBase.objectName + s.StripAsync()); + messageName = apiBase.invocationMessageNames.GetOrAdd(callerName, s => apiBase.objectName + s.StripAsync()); break; default: throw new ArgumentOutOfRangeException(); @@ -289,17 +296,17 @@ public PropertyGetter(ApiBase apiBase, string callerName, int timeoutMs, object } } }); - + if (arg != null) { - _ = apiBase.Id >= 0 ? BridgeConnector.Socket.Emit(messageName, apiBase.Id, arg) : BridgeConnector.Socket.Emit(messageName, arg); + _ = apiBase.Id >= 0 ? BridgeConnector.Socket.Emit(messageName, apiBase.Id, arg) : BridgeConnector.Socket.Emit(messageName, arg); } else { - _ = apiBase.Id >= 0 ? BridgeConnector.Socket.Emit(messageName, apiBase.Id) : BridgeConnector.Socket.Emit(messageName); + _ = apiBase.Id >= 0 ? BridgeConnector.Socket.Emit(messageName, apiBase.Id) : BridgeConnector.Socket.Emit(messageName); } - System.Threading.Tasks.Task.Delay(PropertyTimeout).ContinueWith(_ => + System.Threading.Tasks.Task.Delay(timeout).ContinueWith(_ => { if (this.tcs != null) { @@ -307,7 +314,7 @@ public PropertyGetter(ApiBase apiBase, string callerName, int timeoutMs, object { if (this.tcs != null) { - var ex = new TimeoutException($"No response after {timeoutMs:D}ms trying to retrieve value {apiBase.objectName}.{callerName}()"); + var ex = new TimeoutException($"No response after {timeout:D}ms trying to retrieve value {apiBase.objectName}.{callerName}()"); this.tcs.TrySetException(ex); this.tcs = null; } @@ -321,7 +328,7 @@ public override Task Task() return this.tcsTask as Task; } } - + [SuppressMessage("ReSharper", "InconsistentlySynchronizedField")] private class EventContainer { @@ -330,44 +337,44 @@ private class EventContainer private Action GetEventActionT() { - return (Action)eventActionT; + return (Action)this.eventActionT; } private void SetEventActionT(Action actionT) { - eventActionT = actionT; + this.eventActionT = actionT; } - public void OnEventAction() => eventAction?.Invoke(); + public void OnEventAction() => this.eventAction?.Invoke(); - public void OnEventActionT(T p) => GetEventActionT()?.Invoke(p); + public void OnEventActionT(T p) => this.GetEventActionT()?.Invoke(p); public void Register(Action receiver) { - eventAction += receiver; + this.eventAction += receiver; } public void Register(Action receiver) { - var actionT = GetEventActionT(); + var actionT = this.GetEventActionT(); actionT += receiver; - SetEventActionT(actionT); + this.SetEventActionT(actionT); } public bool Unregister(Action receiver) { - eventAction -= receiver; + this.eventAction -= receiver; return this.eventAction != null; } public bool Unregister(Action receiver) { - var actionT = GetEventActionT(); + var actionT = this.GetEventActionT(); actionT -= receiver; - SetEventActionT(actionT); + this.SetEventActionT(actionT); return actionT != null; } } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/App.cs b/src/ElectronNET.API/API/App.cs index 5a27e758..a1843031 100644 --- a/src/ElectronNET.API/API/App.cs +++ b/src/ElectronNET.API/API/App.cs @@ -2,6 +2,7 @@ using ElectronNET.API.Extensions; using System; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -58,7 +59,7 @@ public event Action WindowAllClosed private event Action _windowAllClosed; /// - /// Emitted before the application starts closing its windows. + /// Emitted before the application starts closing its windows. /// /// Note: If application quit was initiated by then /// is emitted after emitting close event on all windows and closing them. @@ -259,6 +260,8 @@ public event Action WebContentsCreated /// screen readers, are enabled or disabled. See https://www.chromium.org/developers/design-documents/accessibility for more details. /// /// when Chrome's accessibility support is enabled, otherwise. + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public event Action AccessibilitySupportChanged { add => AddEvent(value, GetHashCode()); @@ -316,6 +319,7 @@ internal set /// /// On Windows, you have to parse the arguments using App.CommandLine to get the filepath. /// + [SupportedOSPlatform("macOS")] public event Action OpenFile { add => AddEvent(value, GetHashCode()); @@ -327,6 +331,7 @@ public event Action OpenFile /// Emitted when a MacOS user wants to open a URL with the application. Your application's Info.plist file must /// define the URL scheme within the CFBundleURLTypes key, and set NSPrincipalClass to AtomApplication. /// + [SupportedOSPlatform("macOS")] public event Action OpenUrl { add => AddEvent(value, GetHashCode()); @@ -366,7 +371,7 @@ public Task NameAsync { get { - return this.GetPropertyAsync(); + return this.InvokeAsync(); } } @@ -399,7 +404,6 @@ internal static App Instance private static object _syncRoot = new object(); - /// /// Try to close all windows. The event will be emitted first. If all windows are successfully /// closed, the event will be emitted and by default the application will terminate. This method @@ -482,6 +486,7 @@ public void Focus(FocusOptions focusOptions) /// /// Hides all application windows without minimizing them. /// + [SupportedOSPlatform("macOS")] public void Hide() { this.CallMethod0(); @@ -490,6 +495,7 @@ public void Hide() /// /// Shows application windows after they were hidden. Does not automatically focus them. /// + [SupportedOSPlatform("macOS")] public void Show() { this.CallMethod0(); @@ -501,7 +507,7 @@ public void Show() public async Task GetAppPathAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -533,7 +539,7 @@ public async Task GetPathAsync(PathName pathName, CancellationToken canc using (cancellationToken.Register(() => taskCompletionSource.TrySetCanceled())) { BridgeConnector.Socket.Once("appGetPathCompleted", taskCompletionSource.SetResult); - BridgeConnector.Socket.Emit("appGetPath", pathName.GetDescription()); + BridgeConnector.Socket.Emit("appGetPath", pathName); return await taskCompletionSource.Task .ConfigureAwait(false); @@ -554,18 +560,18 @@ public async Task GetPathAsync(PathName pathName, CancellationToken canc /// public void SetPath(PathName name, string path) { - this.CallMethod2(name.GetDescription(), path); + this.CallMethod2(name, path); } /// - /// The version of the loaded application. If no version is found in the application’s package.json file, + /// The version of the loaded application. If no version is found in the application’s package.json file, /// the version of the current bundle or executable is returned. /// /// The version of the loaded application. public async Task GetVersionAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -579,7 +585,7 @@ public async Task GetVersionAsync(CancellationToken cancellationToken = public async Task GetLocaleAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -587,6 +593,8 @@ public async Task GetLocaleAsync(CancellationToken cancellationToken = d /// list from the task bar, and on macOS you can visit it from dock menu. /// /// Path to add. + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void AddRecentDocument(string path) { this.CallMethod1(path); @@ -595,6 +603,8 @@ public void AddRecentDocument(string path) /// /// Clears the recent documents list. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void ClearRecentDocuments() { this.CallMethod0(); @@ -710,6 +720,8 @@ public async Task SetAsDefaultProtocolClientAsync(string protocol, string /// The name of your protocol, without ://. /// The cancellation token. /// Whether the call succeeded. + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public async Task RemoveAsDefaultProtocolClientAsync(string protocol, CancellationToken cancellationToken = default) { return await this.RemoveAsDefaultProtocolClientAsync(protocol, null, null, cancellationToken).ConfigureAwait(false); @@ -723,6 +735,8 @@ public async Task RemoveAsDefaultProtocolClientAsync(string protocol, Canc /// Defaults to process.execPath. /// The cancellation token. /// Whether the call succeeded. + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public async Task RemoveAsDefaultProtocolClientAsync(string protocol, string path, CancellationToken cancellationToken = default) { return await this.RemoveAsDefaultProtocolClientAsync(protocol, path, null, cancellationToken).ConfigureAwait(false); @@ -737,6 +751,8 @@ public async Task RemoveAsDefaultProtocolClientAsync(string protocol, stri /// Defaults to an empty array. /// The cancellation token. /// Whether the call succeeded. + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public async Task RemoveAsDefaultProtocolClientAsync(string protocol, string path, string[] args, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); @@ -827,6 +843,7 @@ public async Task IsDefaultProtocolClientAsync(string protocol, string pat /// Array of objects. /// The cancellation token. /// Whether the call succeeded. + [SupportedOSPlatform("Windows")] public async Task SetUserTasksAsync(UserTask[] userTasks, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); @@ -847,10 +864,11 @@ public async Task SetUserTasksAsync(UserTask[] userTasks, CancellationToke /// /// The cancellation token. /// Jump List settings. + [SupportedOSPlatform("Windows")] public async Task GetJumpListSettingsAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -869,6 +887,7 @@ public async Task GetJumpListSettingsAsync(CancellationToken c /// omitted from the Jump List. The list of removed items can be obtained using . /// /// Array of objects. + [SupportedOSPlatform("Windows")] public void SetJumpList(JumpListCategory[] categories) { this.CallMethod1(categories); @@ -941,7 +960,7 @@ public void ReleaseSingleInstanceLock() public async Task HasSingleInstanceLockAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -951,6 +970,7 @@ public async Task HasSingleInstanceLockAsync(CancellationToken cancellatio /// /// Uniquely identifies the activity. Maps to NSUserActivity.activityType. /// App-specific state to store for use by another device. + [SupportedOSPlatform("macOS")] public void SetUserActivity(string type, object userInfo) { SetUserActivity(type, userInfo, null); @@ -968,6 +988,7 @@ public void SetUserActivity(string type, object userInfo) /// /// The webpage to load in a browser if no suitable app is installed on the resuming device. The scheme must be http or https. /// + [SupportedOSPlatform("macOS")] public void SetUserActivity(string type, object userInfo, string webpageUrl) { this.CallMethod3(type, userInfo, webpageUrl); @@ -977,15 +998,17 @@ public void SetUserActivity(string type, object userInfo, string webpageUrl) /// The type of the currently running activity. /// /// The cancellation token. + [SupportedOSPlatform("macOS")] public async Task GetCurrentActivityTypeAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// /// Invalidates the current Handoff user activity. /// + [SupportedOSPlatform("macOS")] public void InvalidateCurrentActivity() { this.CallMethod0(); @@ -994,6 +1017,7 @@ public void InvalidateCurrentActivity() /// /// Marks the current Handoff user activity as inactive without invalidating it. /// + [SupportedOSPlatform("macOS")] public void ResignCurrentActivity() { this.CallMethod0(); @@ -1003,6 +1027,7 @@ public void ResignCurrentActivity() /// Changes the Application User Model ID to id. /// /// Model Id. + [SupportedOSPlatform("Windows")] public void SetAppUserModelId(string id) { this.CallMethod1(id); @@ -1017,6 +1042,7 @@ public void SetAppUserModelId(string id) /// /// The cancellation token. /// Result of import. Value of 0 indicates success. + [SupportedOSPlatform("Linux")] public async Task ImportCertificateAsync(ImportCertificateOptions options, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); @@ -1043,7 +1069,7 @@ public async Task ImportCertificateAsync(ImportCertificateOptions options, public async Task GetAppMetricsAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -1055,7 +1081,7 @@ public async Task GetAppMetricsAsync(CancellationToken cancella public async Task GetGpuFeatureStatusAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -1068,6 +1094,8 @@ public async Task GetGpuFeatureStatusAsync(CancellationToken c /// Counter badge. /// The cancellation token. /// Whether the call succeeded. + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] public async Task SetBadgeCountAsync(int count, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); @@ -1087,10 +1115,12 @@ public async Task SetBadgeCountAsync(int count, CancellationToken cancella /// The current value displayed in the counter badge. /// /// The cancellation token. + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] public async Task GetBadgeCountAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -1102,16 +1132,19 @@ public async Task GetBadgeCountAsync(CancellationToken cancellationToken = /// Whether the current desktop environment is Unity launcher. /// /// The cancellation token. + [SupportedOSPlatform("Linux")] public async Task IsUnityRunningAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// /// If you provided path and args options to then you need to pass the same /// arguments here for to be set correctly. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public async Task GetLoginItemSettingsAsync(CancellationToken cancellationToken = default) { return await this.GetLoginItemSettingsAsync(null, cancellationToken).ConfigureAwait(false); @@ -1123,6 +1156,8 @@ public async Task GetLoginItemSettingsAsync(CancellationToken /// /// /// The cancellation token. + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public async Task GetLoginItemSettingsAsync(LoginItemSettingsOptions options, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); @@ -1152,6 +1187,8 @@ public async Task GetLoginItemSettingsAsync(LoginItemSettings /// you'll want to set the launch path to Update.exe, and pass arguments that specify your application name. /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetLoginItemSettings(LoginSettings loginSettings) { this.CallMethod1(loginSettings); @@ -1163,10 +1200,12 @@ public void SetLoginItemSettings(LoginSettings loginSettings) /// See Chromium's accessibility docs for more details. /// /// if Chrome’s accessibility support is enabled, otherwise. + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public async Task IsAccessibilitySupportEnabledAsync(CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); - return await this.GetPropertyAsync().ConfigureAwait(false); + return await this.InvokeAsync().ConfigureAwait(false); } /// @@ -1179,6 +1218,8 @@ public async Task IsAccessibilitySupportEnabledAsync(CancellationToken can /// Note: Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default. /// /// Enable or disable accessibility tree rendering. + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetAccessibilitySupportEnabled(bool enabled) { this.CallMethod1(enabled); @@ -1245,7 +1286,7 @@ public Task UserAgentFallbackAsync return Task.Run(() => { var taskCompletionSource = new TaskCompletionSource(); - + BridgeConnector.Socket.Once("appGetUserAgentFallbackCompleted", taskCompletionSource.SetResult); BridgeConnector.Socket.Emit("appGetUserAgentFallback"); @@ -1295,4 +1336,4 @@ public void Once(string eventName, Action action) public async Task Once(string eventName, Action action) => await Events.Instance.Once(ModuleName, eventName, action).ConfigureAwait(false); } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/AutoUpdater.cs b/src/ElectronNET.API/API/AutoUpdater.cs index 0b5fd75f..d0b178b9 100644 --- a/src/ElectronNET.API/API/AutoUpdater.cs +++ b/src/ElectronNET.API/API/AutoUpdater.cs @@ -10,7 +10,7 @@ namespace ElectronNET.API /// /// Enable apps to automatically update themselves. Based on electron-updater. /// - public sealed class AutoUpdater: ApiBase + public sealed class AutoUpdater : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketTaskMessageNameTypes SocketTaskMessageNameType => SocketTaskMessageNameTypes.DashesLowerFirst; @@ -23,7 +23,7 @@ public bool AutoDownload { get { - return Task.Run(() => GetPropertyAsync()).Result; + return Task.Run(() => this.InvokeAsync()).Result; } set { @@ -40,7 +40,7 @@ public bool AutoInstallOnAppQuit { get { - return Task.Run(() => GetPropertyAsync()).Result; + return Task.Run(() => this.InvokeAsync()).Result; } set { @@ -49,7 +49,7 @@ public bool AutoInstallOnAppQuit } /// - /// *GitHub provider only.* Whether to allow update to pre-release versions. + /// *GitHub provider only.* Whether to allow update to pre-release versions. /// Defaults to "true" if application version contains prerelease components (e.g. "0.12.1-alpha.1", here "alpha" is a prerelease component), otherwise "false". /// /// If "true", downgrade will be allowed("allowDowngrade" will be set to "true"). @@ -58,7 +58,7 @@ public bool AllowPrerelease { get { - return Task.Run(() => GetPropertyAsync()).Result; + return Task.Run(() => this.InvokeAsync()).Result; } set { @@ -67,14 +67,14 @@ public bool AllowPrerelease } /// - /// *GitHub provider only.* + /// *GitHub provider only.* /// Get all release notes (from current version to latest), not just the latest (Default is false). /// public bool FullChangelog { get { - return Task.Run(() => GetPropertyAsync()).Result; + return Task.Run(() => this.InvokeAsync()).Result; } set { @@ -91,7 +91,7 @@ public bool AllowDowngrade { get { - return Task.Run(() => GetPropertyAsync()).Result; + return Task.Run(() => this.InvokeAsync()).Result; } set { @@ -106,7 +106,7 @@ public string UpdateConfigPath { get { - return Task.Run(() => GetPropertyAsync()).Result; + return Task.Run(() => this.InvokeAsync()).Result; } } @@ -117,12 +117,12 @@ public Task CurrentVersionAsync { get { - return Task.Run(() => GetPropertyAsync()); + return Task.Run(() => this.InvokeAsync()); } } /// - /// Get the update channel. Not applicable for GitHub. + /// Get the update channel. Not applicable for GitHub. /// Doesn’t return channel from the update configuration, only if was previously set. /// [Obsolete("Use the asynchronous version ChannelAsync instead")] @@ -135,19 +135,19 @@ public string Channel } /// - /// Get the update channel. Not applicable for GitHub. + /// Get the update channel. Not applicable for GitHub. /// Doesn’t return channel from the update configuration, only if was previously set. /// public Task ChannelAsync { get { - return Task.Run(() => GetPropertyAsync()); + return Task.Run(() => this.InvokeAsync()); } } /// - /// Set the update channel. Not applicable for GitHub. + /// Set the update channel. Not applicable for GitHub. /// public string SetChannel { @@ -165,7 +165,7 @@ public Task> RequestHeadersAsync { get { - return Task.Run(() => GetPropertyAsync>()); + return Task.Run(() => this.InvokeAsync>()); } } @@ -199,7 +199,7 @@ public event Action OnCheckingForUpdate } /// - /// Emitted when there is an available update. + /// Emitted when there is an available update. /// The update is downloaded automatically if AutoDownload is true. /// public event Action OnUpdateAvailable @@ -332,11 +332,11 @@ public Task CheckForUpdatesAndNotifyAsync() } /// - /// Restarts the app and installs the update after it has been downloaded. - /// It should only be called after `update-downloaded` has been emitted. - /// - /// Note: QuitAndInstall() will close all application windows first and only emit `before-quit` event on `app` after that. - /// This is different from the normal quit event sequence. + /// Restarts the app and installs the update after it has been downloaded. + /// It should only be called after `update-downloaded` has been emitted. + /// + /// Note: QuitAndInstall() will close all application windows first and only emit `before-quit` event on `app` after that. + /// This is different from the normal quit event sequence. /// /// *windows-only* Runs the installer in silent mode. Defaults to `false`. /// Run the app after finish even on silent install. Not applicable for macOS. Ignored if `isSilent` is set to `false`. @@ -374,9 +374,5 @@ public Task GetFeedURLAsync() return tcs.Task; } - - } -} - - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/BrowserView.cs b/src/ElectronNET.API/API/BrowserView.cs index 479d9712..21d393fe 100644 --- a/src/ElectronNET.API/API/BrowserView.cs +++ b/src/ElectronNET.API/API/BrowserView.cs @@ -8,10 +8,11 @@ namespace ElectronNET.API /// It is like a child window, except that it is positioned relative to its owning window. /// It is meant to be an alternative to the webview tag. /// - public class BrowserView: ApiBase + public class BrowserView : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketTaskMessageNameTypes SocketTaskMessageNameType => SocketTaskMessageNameTypes.DashesLowerFirst; + /// /// Gets the identifier. /// @@ -30,7 +31,7 @@ public Rectangle Bounds { get { - return Task.Run(() => GetPropertyAsync()).Result; + return Task.Run(() => this.InvokeAsync()).Result; } set { @@ -69,5 +70,4 @@ public void SetBackgroundColor(string color) BridgeConnector.Socket.Emit("browserView-setBackgroundColor", Id, color); } } -} - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/BrowserWindow.cs b/src/ElectronNET.API/API/BrowserWindow.cs index f4e7529f..bc863988 100644 --- a/src/ElectronNET.API/API/BrowserWindow.cs +++ b/src/ElectronNET.API/API/BrowserWindow.cs @@ -1,10 +1,11 @@ -using ElectronNET.API.Entities; -using ElectronNET.API.Extensions; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Threading.Tasks; +using ElectronNET.API.Entities; +using ElectronNET.API.Extensions; // ReSharper disable InconsistentNaming @@ -27,7 +28,7 @@ public class BrowserWindow : ApiBase public override int Id { get; protected set; } /// - /// Emitted when the web page has been rendered (while not being shown) and + /// Emitted when the web page has been rendered (while not being shown) and /// window can be displayed without a visual flash. /// public event Action OnReadyToShow @@ -55,8 +56,8 @@ public event Action OnClose } /// - /// Emitted when the window is closed. - /// After you have received this event you should remove the + /// Emitted when the window is closed. + /// After you have received this event you should remove the /// reference to the window and avoid using it any more. /// public event Action OnClosed @@ -68,6 +69,7 @@ public event Action OnClosed /// /// Emitted when window session is going to end due to force shutdown or machine restart or session log off. /// + [SupportedOSPlatform("Windows")] public event Action OnSessionEnd { add => AddEvent(value, Id); @@ -187,6 +189,8 @@ public event Action OnMove /// /// macOS: Emitted once when the window is moved to a new position. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public event Action OnMoved { add => AddEvent(value, Id); @@ -230,14 +234,16 @@ public event Action OnLeaveHtmlFullScreen } /// - /// Emitted when an App Command is invoked. These are typically related to - /// keyboard media keys or browser commands, as well as the “Back” button + /// Emitted when an App Command is invoked. These are typically related to + /// keyboard media keys or browser commands, as well as the “Back” button /// built into some mice on Windows. /// - /// Commands are lowercased, underscores are replaced with hyphens, - /// and the APPCOMMAND_ prefix is stripped off.e.g.APPCOMMAND_BROWSER_BACKWARD + /// Commands are lowercased, underscores are replaced with hyphens, + /// and the APPCOMMAND_ prefix is stripped off.e.g.APPCOMMAND_BROWSER_BACKWARD /// is emitted as browser-backward. /// + [SupportedOSPlatform("Windows")] + [SupportedOSPlatform("Linux")] public event Action OnAppCommand { add => AddEvent(value, Id); @@ -247,6 +253,7 @@ public event Action OnAppCommand /// /// Emitted on 3-finger swipe. Possible directions are up, right, down, left. /// + [SupportedOSPlatform("macOS")] public event Action OnSwipe { add => AddEvent(value, Id); @@ -256,6 +263,7 @@ public event Action OnSwipe /// /// Emitted when the window opens a sheet. /// + [SupportedOSPlatform("macOS")] public event Action OnSheetBegin { add => AddEvent(value, Id); @@ -265,6 +273,7 @@ public event Action OnSheetBegin /// /// Emitted when the window has closed a sheet. /// + [SupportedOSPlatform("macOS")] public event Action OnSheetEnd { add => AddEvent(value, Id); @@ -274,6 +283,7 @@ public event Action OnSheetEnd /// /// Emitted when the native new tab button is clicked. /// + [SupportedOSPlatform("macOS")] public event Action OnNewWindowForTab { add => AddEvent(value, Id); @@ -287,15 +297,15 @@ internal BrowserWindow(int id) } /// - /// Force closing the window, the unload and beforeunload event won’t be - /// emitted for the web page, and close event will also not be emitted + /// Force closing the window, the unload and beforeunload event won’t be + /// emitted for the web page, and close event will also not be emitted /// for this window, but it guarantees the closed event will be emitted. /// public void Destroy() => this.CallMethod0(); /// - /// Try to close the window. This has the same effect as a user manually - /// clicking the close button of the window. The web page may cancel the close though. + /// Try to close the window. This has the same effect as a user manually + /// clicking the close button of the window. The web page may cancel the close though. /// public void Close() => this.CallMethod0(); @@ -313,13 +323,13 @@ internal BrowserWindow(int id) /// Whether the window is focused. /// /// - public Task IsFocusedAsync() => this.GetPropertyAsync(); + public Task IsFocusedAsync() => this.InvokeAsync(); /// /// Whether the window is destroyed. /// /// - public Task IsDestroyedAsync() => this.GetPropertyAsync(); + public Task IsDestroyedAsync() => this.InvokeAsync(); /// /// Shows and gives focus to the window. @@ -340,13 +350,13 @@ internal BrowserWindow(int id) /// Whether the window is visible to the user. /// /// - public Task IsVisibleAsync() => this.GetPropertyAsync(); + public Task IsVisibleAsync() => this.InvokeAsync(); /// /// Whether current window is a modal window. /// /// - public Task IsModalAsync() => this.GetPropertyAsync(); + public Task IsModalAsync() => this.InvokeAsync(); /// /// Maximizes the window. This will also show (but not focus) the window if it isn’t being displayed already. @@ -362,7 +372,7 @@ internal BrowserWindow(int id) /// Whether the window is maximized. /// /// - public Task IsMaximizedAsync() => this.GetPropertyAsync(); + public Task IsMaximizedAsync() => this.InvokeAsync(); /// /// Minimizes the window. On some platforms the minimized window will be shown in the Dock. @@ -378,7 +388,7 @@ internal BrowserWindow(int id) /// Whether the window is minimized. /// /// - public Task IsMinimizedAsync() => this.GetPropertyAsync(); + public Task IsMinimizedAsync() => this.InvokeAsync(); /// /// Sets whether the window should be in fullscreen mode. @@ -390,10 +400,10 @@ internal BrowserWindow(int id) /// Whether the window is in fullscreen mode. /// /// - public Task IsFullScreenAsync() => this.GetPropertyAsync(); + public Task IsFullScreenAsync() => this.InvokeAsync(); /// - /// This will make a window maintain an aspect ratio. The extra size allows a developer to have space, + /// This will make a window maintain an aspect ratio. The extra size allows a developer to have space, /// specified in pixels, not included within the aspect ratio calculations. This API already takes into /// account the difference between a window’s size and its content size. /// @@ -401,7 +411,7 @@ internal BrowserWindow(int id) /// of controls on the left edge, 25 pixels of controls on the right edge and 50 pixels of controls below /// the player. In order to maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within /// the player itself we would call this function with arguments of 16/9 and[40, 50]. The second argument - /// doesn’t care where the extra width and height are within the content view–only that they exist. Just + /// doesn’t care where the extra width and height are within the content view–only that they exist. Just /// sum any extra width and height areas you have within the overall content view. /// /// The aspect ratio to maintain for some portion of the content view. @@ -410,7 +420,7 @@ public void SetAspectRatio(double aspectRatio, Size extraSize) => this.CallMethod2(aspectRatio, extraSize); /// - /// This will make a window maintain an aspect ratio. The extra size allows a developer to have space, + /// This will make a window maintain an aspect ratio. The extra size allows a developer to have space, /// specified in pixels, not included within the aspect ratio calculations. This API already takes into /// account the difference between a window’s size and its content size. /// @@ -418,7 +428,7 @@ public void SetAspectRatio(double aspectRatio, Size extraSize) => /// of controls on the left edge, 25 pixels of controls on the right edge and 50 pixels of controls below /// the player. In order to maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within /// the player itself we would call this function with arguments of 16/9 and[40, 50]. The second argument - /// doesn’t care where the extra width and height are within the content view–only that they exist. Just + /// doesn’t care where the extra width and height are within the content view–only that they exist. Just /// sum any extra width and height areas you have within the overall content view. /// /// The aspect ratio to maintain for some portion of the content view. @@ -429,24 +439,27 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// /// Uses Quick Look to preview a file at a given path. /// - /// The absolute path to the file to preview with QuickLook. This is important as - /// Quick Look uses the file name and file extension on the path to determine the content type of the + /// The absolute path to the file to preview with QuickLook. This is important as + /// Quick Look uses the file name and file extension on the path to determine the content type of the /// file to open. + [SupportedOSPlatform("macOS")] public void PreviewFile(string path) => this.CallMethod1(path); /// /// Uses Quick Look to preview a file at a given path. /// - /// The absolute path to the file to preview with QuickLook. This is important as - /// Quick Look uses the file name and file extension on the path to determine the content type of the + /// The absolute path to the file to preview with QuickLook. This is important as + /// Quick Look uses the file name and file extension on the path to determine the content type of the /// file to open. - /// The name of the file to display on the Quick Look modal view. This is + /// The name of the file to display on the Quick Look modal view. This is /// purely visual and does not affect the content type of the file. Defaults to path. + [SupportedOSPlatform("macOS")] public void PreviewFile(string path, string displayname) => this.CallMethod2(path, displayname); /// /// Closes the currently open Quick Look panel. /// + [SupportedOSPlatform("macOS")] public void CloseFilePreview() => this.CallMethod0(); /// @@ -466,7 +479,7 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// Gets the bounds asynchronous. /// /// - public Task GetBoundsAsync() => this.GetPropertyAsync(); + public Task GetBoundsAsync() => this.InvokeAsync(); /// /// Resizes and moves the window’s client area (e.g. the web page) to the supplied bounds. @@ -485,7 +498,7 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// Gets the content bounds asynchronous. /// /// - public Task GetContentBoundsAsync() => this.GetPropertyAsync(); + public Task GetContentBoundsAsync() => this.InvokeAsync(); /// /// Resizes the window to width and height. @@ -506,7 +519,7 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// Contains the window’s width and height. /// /// - public Task GetSizeAsync() => this.GetPropertyAsync(); + public Task GetSizeAsync() => this.InvokeAsync(); /// /// Resizes the window’s client area (e.g. the web page) to width and height. @@ -527,7 +540,7 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// Contains the window’s client area’s width and height. /// /// - public Task GetContentSizeAsync() => this.GetPropertyAsync(); + public Task GetContentSizeAsync() => this.InvokeAsync(); /// /// Sets the minimum size of window to width and height. @@ -540,7 +553,7 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// Contains the window’s minimum width and height. /// /// - public Task GetMinimumSizeAsync() => this.GetPropertyAsync(); + public Task GetMinimumSizeAsync() => this.InvokeAsync(); /// /// Sets the maximum size of window to width and height. @@ -553,7 +566,7 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// Contains the window’s maximum width and height. /// /// - public Task GetMaximumSizeAsync() => this.GetPropertyAsync(); + public Task GetMaximumSizeAsync() => this.InvokeAsync(); /// /// Sets whether the window can be manually resized by user. @@ -565,12 +578,14 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// Whether the window can be manually resized by user. /// /// - public Task IsResizableAsync() => this.GetPropertyAsync(); + public Task IsResizableAsync() => this.InvokeAsync(); /// /// Sets whether the window can be moved by user. On Linux does nothing. /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetMovable(bool movable) => this.CallMethod1(movable); /// @@ -579,12 +594,16 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// On Linux always returns true. /// /// On Linux always returns true. - public Task IsMovableAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] + public Task IsMovableAsync() => this.InvokeAsync(); /// /// Sets whether the window can be manually minimized by user. On Linux does nothing. /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetMinimizable(bool minimizable) => this.CallMethod1(minimizable); /// @@ -593,12 +612,16 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// On Linux always returns true. /// /// On Linux always returns true. - public Task IsMinimizableAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] + public Task IsMinimizableAsync() => this.InvokeAsync(); /// /// Sets whether the window can be manually maximized by user. On Linux does nothing. /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetMaximizable(bool maximizable) => this.CallMethod1(maximizable); /// @@ -607,7 +630,9 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// On Linux always returns true. /// /// On Linux always returns true. - public Task IsMaximizableAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] + public Task IsMaximizableAsync() => this.InvokeAsync(); /// /// Sets whether the maximize/zoom window button toggles fullscreen mode or maximizes the window. @@ -619,12 +644,14 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// Whether the maximize/zoom window button toggles fullscreen mode or maximizes the window. /// /// - public Task IsFullScreenableAsync() => this.GetPropertyAsync(); + public Task IsFullScreenableAsync() => this.InvokeAsync(); /// /// Sets whether the window can be manually closed by user. On Linux does nothing. /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetClosable(bool closable) => this.CallMethod1(closable); /// @@ -633,45 +660,47 @@ public void SetAspectRatio(int aspectRatio, Size extraSize) => /// On Linux always returns true. /// /// On Linux always returns true. - public Task IsClosableAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] + public Task IsClosableAsync() => this.InvokeAsync(); /// - /// Sets whether the window should show always on top of other windows. - /// After setting this, the window is still a normal window, not a toolbox + /// Sets whether the window should show always on top of other windows. + /// After setting this, the window is still a normal window, not a toolbox /// window which can not be focused on. /// /// public void SetAlwaysOnTop(bool flag) => this.CallMethod1(flag); /// - /// Sets whether the window should show always on top of other windows. - /// After setting this, the window is still a normal window, not a toolbox + /// Sets whether the window should show always on top of other windows. + /// After setting this, the window is still a normal window, not a toolbox /// window which can not be focused on. /// /// - /// Values include normal, floating, torn-off-menu, modal-panel, main-menu, - /// status, pop-up-menu and screen-saver. The default is floating. + /// Values include normal, floating, torn-off-menu, modal-panel, main-menu, + /// status, pop-up-menu and screen-saver. The default is floating. /// See the macOS docs - public void SetAlwaysOnTop(bool flag, OnTopLevel level) => this.CallMethod2(flag, level.GetDescription()); + public void SetAlwaysOnTop(bool flag, OnTopLevel level) => this.CallMethod2(flag, level); /// - /// Sets whether the window should show always on top of other windows. - /// After setting this, the window is still a normal window, not a toolbox + /// Sets whether the window should show always on top of other windows. + /// After setting this, the window is still a normal window, not a toolbox /// window which can not be focused on. /// /// - /// Values include normal, floating, torn-off-menu, modal-panel, main-menu, - /// status, pop-up-menu and screen-saver. The default is floating. + /// Values include normal, floating, torn-off-menu, modal-panel, main-menu, + /// status, pop-up-menu and screen-saver. The default is floating. /// See the macOS docs - /// The number of layers higher to set this window relative to the given level. + /// The number of layers higher to set this window relative to the given level. /// The default is 0. Note that Apple discourages setting levels higher than 1 above screen-saver. - public void SetAlwaysOnTop(bool flag, OnTopLevel level, int relativeLevel) => this.CallMethod3(flag, level.GetDescription(), relativeLevel); + public void SetAlwaysOnTop(bool flag, OnTopLevel level, int relativeLevel) => this.CallMethod3(flag, level, relativeLevel); /// /// Whether the window is always on top of other windows. /// /// - public Task IsAlwaysOnTopAsync() => this.GetPropertyAsync(); + public Task IsAlwaysOnTopAsync() => this.InvokeAsync(); /// /// Moves window to the center of the screen. @@ -721,7 +750,7 @@ private bool isWindows10() /// Contains the window’s current position. /// /// - public Task GetPositionAsync() => this.GetPropertyAsync(); + public Task GetPositionAsync() => this.InvokeAsync(); /// /// Changes the title of native window to title. @@ -735,23 +764,25 @@ private bool isWindows10() /// Note: The title of web page can be different from the title of the native window. /// /// - public Task GetTitleAsync() => this.GetPropertyAsync(); + public Task GetTitleAsync() => this.InvokeAsync(); /// - /// Changes the attachment point for sheets on macOS. - /// By default, sheets are attached just below the window frame, + /// Changes the attachment point for sheets on macOS. + /// By default, sheets are attached just below the window frame, /// but you may want to display them beneath a HTML-rendered toolbar. /// /// + [SupportedOSPlatform("macOS")] public void SetSheetOffset(float offsetY) => this.CallMethod1(offsetY); /// - /// Changes the attachment point for sheets on macOS. - /// By default, sheets are attached just below the window frame, + /// Changes the attachment point for sheets on macOS. + /// By default, sheets are attached just below the window frame, /// but you may want to display them beneath a HTML-rendered toolbar. /// /// /// + [SupportedOSPlatform("macOS")] public void SetSheetOffset(float offsetY, float offsetX) => this.CallMethod2(offsetY, offsetX); /// @@ -764,6 +795,8 @@ private bool isWindows10() /// Makes the window not show in the taskbar. /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetSkipTaskbar(bool skip) => this.CallMethod1(skip); /// @@ -776,39 +809,43 @@ private bool isWindows10() /// Whether the window is in kiosk mode. /// /// - public Task IsKioskAsync() => this.GetPropertyAsync(); + public Task IsKioskAsync() => this.InvokeAsync(); /// /// Returns the native type of the handle is HWND on Windows, NSView* on macOS, and Window (unsigned long) on Linux. /// /// string of the native handle obtained, HWND on Windows, NSView* on macOS, and Window (unsigned long) on Linux. - public Task GetNativeWindowHandle() => this.GetPropertyAsync(); + public Task GetNativeWindowHandle() => this.InvokeAsync(); /// - /// Sets the pathname of the file the window represents, + /// Sets the pathname of the file the window represents, /// and the icon of the file will show in window’s title bar. /// /// + [SupportedOSPlatform("macOS")] public void SetRepresentedFilename(string filename) => this.CallMethod1(filename); /// /// The pathname of the file the window represents. /// /// - public Task GetRepresentedFilenameAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + public Task GetRepresentedFilenameAsync() => this.InvokeAsync(); /// - /// Specifies whether the window’s document has been edited, + /// Specifies whether the window’s document has been edited, /// and the icon in title bar will become gray when set to true. /// /// + [SupportedOSPlatform("macOS")] public void SetDocumentEdited(bool edited) => this.CallMethod1(edited); /// /// Whether the window’s document has been edited. /// /// - public Task IsDocumentEditedAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + public Task IsDocumentEditedAsync() => this.InvokeAsync(); /// /// Focuses the on web view. @@ -821,14 +858,14 @@ private bool isWindows10() public void BlurWebView() => this.CallMethod0(); /// - /// The url can be a remote address (e.g. http://) or + /// The url can be a remote address (e.g. http://) or /// a path to a local HTML file using the file:// protocol. /// /// public void LoadURL(string url) => this.CallMethod1(url); /// - /// The url can be a remote address (e.g. http://) or + /// The url can be a remote address (e.g. http://) or /// a path to a local HTML file using the file:// protocol. /// /// @@ -857,10 +894,12 @@ public IReadOnlyCollection MenuItems private List _items = new List(); /// - /// Sets the menu as the window’s menu bar, + /// Sets the menu as the window’s menu bar, /// setting it to null will remove the menu bar. /// /// + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("Windows")] public void SetMenu(MenuItem[] menuItems) { menuItems.AddMenuItemsId(); @@ -878,6 +917,8 @@ public void SetMenu(MenuItem[] menuItems) /// /// Remove the window's menu bar. /// + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("Windows")] public void RemoveMenu() => this.CallMethod0(); /// @@ -920,7 +961,7 @@ public void SetProgressBar(double progress, ProgressBarOptions progressBarOption /// On Windows and Linux always returns true. /// /// - public Task HasShadowAsync() => this.GetPropertyAsync(); + public Task HasShadowAsync() => this.InvokeAsync(); /// /// Gets the thumbar buttons. @@ -939,17 +980,18 @@ public IReadOnlyCollection ThumbarButtons private List _thumbarButtons = new List(); /// - /// Add a thumbnail toolbar with a specified set of buttons to the thumbnail - /// image of a window in a taskbar button layout. Returns a Boolean object + /// Add a thumbnail toolbar with a specified set of buttons to the thumbnail + /// image of a window in a taskbar button layout. Returns a Boolean object /// indicates whether the thumbnail has been added successfully. /// - /// The number of buttons in thumbnail toolbar should be no greater than 7 due + /// The number of buttons in thumbnail toolbar should be no greater than 7 due /// to the limited room.Once you setup the thumbnail toolbar, the toolbar cannot /// be removed due to the platform’s limitation.But you can call the API with an /// empty array to clean the buttons. /// /// /// Whether the buttons were added successfully. + [SupportedOSPlatform("Windows")] public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons) { var tcs = new TaskCompletionSource(); @@ -977,55 +1019,67 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons) /// an empty region: {x: 0, y: 0, width: 0, height: 0}. /// /// + [SupportedOSPlatform("Windows")] public void SetThumbnailClip(Rectangle rectangle) => this.CallMethod1(rectangle); /// /// Sets the toolTip that is displayed when hovering over the window thumbnail in the taskbar. /// /// + [SupportedOSPlatform("Windows")] public void SetThumbnailToolTip(string tooltip) => this.CallMethod1(tooltip); /// /// Sets the properties for the window’s taskbar button. /// - /// Note: relaunchCommand and relaunchDisplayName must always be set together. + /// Note: relaunchCommand and relaunchDisplayName must always be set together. /// If one of those properties is not set, then neither will be used. /// /// + [SupportedOSPlatform("Windows")] public void SetAppDetails(AppDetailsOptions options) => this.CallMethod1(options); /// /// Same as webContents.showDefinitionForSelection(). /// + [SupportedOSPlatform("macOS")] public void ShowDefinitionForSelection() => this.CallMethod0(); /// - /// Sets whether the window menu bar should hide itself automatically. + /// Sets whether the window menu bar should hide itself automatically. /// Once set the menu bar will only show when users press the single Alt key. /// /// If the menu bar is already visible, calling setAutoHideMenuBar(true) won’t hide it immediately. /// /// + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("Windows")] public void SetAutoHideMenuBar(bool hide) => this.CallMethod1(hide); /// /// Whether menu bar automatically hides itself. /// /// - public Task IsMenuBarAutoHideAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("Windows")] + public Task IsMenuBarAutoHideAsync() => this.InvokeAsync(); /// /// Sets whether the menu bar should be visible. If the menu bar is auto-hide, /// users can still bring up the menu bar by pressing the single Alt key. /// /// + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("Windows")] public void SetMenuBarVisibility(bool visible) => this.CallMethod1(visible); /// /// Whether the menu bar is visible. /// /// - public Task IsMenuBarVisibleAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("Windows")] + public Task IsMenuBarVisibleAsync() => this.InvokeAsync(); /// /// Sets whether the window should be visible on all workspaces. @@ -1033,6 +1087,8 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons) /// Note: This API does nothing on Windows. /// /// + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] public void SetVisibleOnAllWorkspaces(bool visible) => this.CallMethod1(visible); /// @@ -1041,12 +1097,14 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons) /// Note: This API always returns false on Windows. /// /// - public Task IsVisibleOnAllWorkspacesAsync() => this.GetPropertyAsync(); + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] + public Task IsVisibleOnAllWorkspacesAsync() => this.InvokeAsync(); /// /// Makes the window ignore all mouse events. /// - /// All mouse events happened in this window will be passed to the window + /// All mouse events happened in this window will be passed to the window /// below this window, but if this window has focus, it will still receive keyboard events. /// /// @@ -1055,20 +1113,24 @@ public Task SetThumbarButtonsAsync(ThumbarButton[] thumbarButtons) /// /// Prevents the window contents from being captured by other apps. /// - /// On macOS it sets the NSWindow’s sharingType to NSWindowSharingNone. + /// On macOS it sets the NSWindow’s sharingType to NSWindowSharingNone. /// On Windows it calls SetWindowDisplayAffinity with WDA_MONITOR. /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetContentProtection(bool enable) => this.CallMethod1(enable); /// /// Changes whether the window can be focused. /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void SetFocusable(bool focusable) => this.CallMethod1(focusable); /// - /// Sets parent as current window’s parent window, + /// Sets parent as current window’s parent window, /// passing null will turn current window into a top-level window. /// /// @@ -1090,7 +1152,7 @@ public void SetParentWindow(BrowserWindow parent) /// public async Task GetParentWindowAsync() { - var browserWindowId = await this.GetPropertyAsync().ConfigureAwait(false); + var browserWindowId = await this.InvokeAsync().ConfigureAwait(false); var browserWindow = Electron.WindowManager.BrowserWindows.ToList().Single(x => x.Id == browserWindowId); return browserWindow; } @@ -1101,7 +1163,7 @@ public async Task GetParentWindowAsync() /// public async Task> GetChildWindowsAsync() { - var browserWindowIds = await this.GetPropertyAsync().ConfigureAwait(false); + var browserWindowIds = await this.InvokeAsync().ConfigureAwait(false); var browserWindows = new List(); foreach (var id in browserWindowIds) @@ -1117,16 +1179,18 @@ public async Task> GetChildWindowsAsync() /// Controls whether to hide cursor when typing. /// /// + [SupportedOSPlatform("macOS")] public void SetAutoHideCursor(bool autoHide) => this.CallMethod1(autoHide); /// - /// Adds a vibrancy effect to the browser window. + /// Adds a vibrancy effect to the browser window. /// Passing null or an empty string will remove the vibrancy effect on the window. /// - /// Can be appearance-based, light, dark, titlebar, selection, - /// menu, popover, sidebar, medium-light or ultra-dark. + /// Can be appearance-based, light, dark, titlebar, selection, + /// menu, popover, sidebar, medium-light or ultra-dark. /// See the macOS documentation for more details. - public void SetVibrancy(Vibrancy type) => this.CallMethod1(type.GetDescription()); + [SupportedOSPlatform("macOS")] + public void SetVibrancy(Vibrancy type) => this.CallMethod1(type); /// /// Render and control web pages. @@ -1134,8 +1198,8 @@ public async Task> GetChildWindowsAsync() public WebContents WebContents { get; internal set; } /// - /// A BrowserView can be used to embed additional web content into a BrowserWindow. - /// It is like a child window, except that it is positioned relative to its owning window. + /// A BrowserView can be used to embed additional web content into a BrowserWindow. + /// It is like a child window, except that it is positioned relative to its owning window. /// It is meant to be an alternative to the webview tag. /// /// @@ -1144,4 +1208,4 @@ public void SetBrowserView(BrowserView browserView) // This message name does not match the default ApiBase naming convention. BridgeConnector.Socket.Emit("browserWindow-setBrowserView", Id, browserView.Id); } -} \ No newline at end of file +} diff --git a/src/ElectronNET.API/API/Clipboard.cs b/src/ElectronNET.API/API/Clipboard.cs index 5d067f6a..c25e3dd5 100644 --- a/src/ElectronNET.API/API/Clipboard.cs +++ b/src/ElectronNET.API/API/Clipboard.cs @@ -1,7 +1,9 @@ using ElectronNET.API.Entities; using ElectronNET.API.Serialization; +using System.Runtime.Versioning; using System.Text.Json; using System.Threading.Tasks; + // ReSharper disable InconsistentNaming namespace ElectronNET.API @@ -9,7 +11,7 @@ namespace ElectronNET.API /// /// Perform copy and paste operations on the system clipboard. /// - public sealed class Clipboard: ApiBase + public sealed class Clipboard : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketTaskMessageNameTypes SocketTaskMessageNameType => SocketTaskMessageNameTypes.DashesLowerFirst; @@ -45,7 +47,7 @@ internal static Clipboard Instance /// /// /// The content in the clipboard as plain text. - public Task ReadTextAsync(string type = "") => GetPropertyAsync(type); + public Task ReadTextAsync(string type = "") => this.InvokeAsync(type); /// /// Writes the text into the clipboard as plain text. @@ -62,7 +64,7 @@ public void WriteText(string text, string type = "") /// /// /// - public Task ReadHTMLAsync(string type = "") => GetPropertyAsync(type); + public Task ReadHTMLAsync(string type = "") => this.InvokeAsync(type); /// /// Writes markup to the clipboard. @@ -79,7 +81,7 @@ public void WriteHTML(string markup, string type = "") /// /// /// - public Task ReadRTFAsync(string type = "") => GetPropertyAsync(type); + public Task ReadRTFAsync(string type = "") => this.InvokeAsync(type); /// /// Writes the text into the clipboard in RTF. @@ -92,23 +94,27 @@ public void WriteRTF(string text, string type = "") } /// - /// Returns an Object containing title and url keys representing - /// the bookmark in the clipboard. The title and url values will + /// Returns an Object containing title and url keys representing + /// the bookmark in the clipboard. The title and url values will /// be empty strings when the bookmark is unavailable. /// /// - public Task ReadBookmarkAsync() => GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] + public Task ReadBookmarkAsync() => this.InvokeAsync(); /// /// Writes the title and url into the clipboard as a bookmark. /// /// Note: Most apps on Windows don’t support pasting bookmarks - /// into them so you can use clipboard.write to write both a + /// into them so you can use clipboard.write to write both a /// bookmark and fallback text to the clipboard. /// /// /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public void WriteBookmark(string title, string url, string type = "") { BridgeConnector.Socket.Emit("clipboard-writeBookmark", title, url, type); @@ -120,13 +126,15 @@ public void WriteBookmark(string title, string url, string type = "") /// find pasteboard whenever the application is activated. /// /// - public Task ReadFindTextAsync() => GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + public Task ReadFindTextAsync() => this.InvokeAsync(); /// - /// macOS: Writes the text into the find pasteboard as plain text. This method uses + /// macOS: Writes the text into the find pasteboard as plain text. This method uses /// synchronous IPC when called from the renderer process. /// /// + [SupportedOSPlatform("macOS")] public void WriteFindText(string text) { BridgeConnector.Socket.Emit("clipboard-writeFindText", text); @@ -146,7 +154,7 @@ public void Clear(string type = "") /// /// /// - public Task AvailableFormatsAsync(string type = "") => GetPropertyAsync(type); + public Task AvailableFormatsAsync(string type = "") => this.InvokeAsync(type); /// /// Writes data to the clipboard. @@ -163,7 +171,7 @@ public void Write(Data data, string type = "") /// /// /// - public Task ReadImageAsync(string type = "") => GetPropertyAsync(type); + public Task ReadImageAsync(string type = "") => this.InvokeAsync(type); /// /// Writes an image to the clipboard. @@ -175,4 +183,4 @@ public void WriteImage(NativeImage image, string type = "") BridgeConnector.Socket.Emit("clipboard-writeImage", JsonSerializer.Serialize(image, ElectronJson.Options), type); } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Cookies.cs b/src/ElectronNET.API/API/Cookies.cs index 8540598d..dac0d2d0 100644 --- a/src/ElectronNET.API/API/Cookies.cs +++ b/src/ElectronNET.API/API/Cookies.cs @@ -59,7 +59,5 @@ public event Action OnChanged } private event Action _changed; - - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Dialog.cs b/src/ElectronNET.API/API/Dialog.cs index 933c6ea4..3b9739d5 100644 --- a/src/ElectronNET.API/API/Dialog.cs +++ b/src/ElectronNET.API/API/Dialog.cs @@ -1,5 +1,6 @@ using ElectronNET.API.Entities; using System; +using System.Runtime.Versioning; using System.Text.Json; using System.Threading.Tasks; @@ -37,8 +38,8 @@ internal static Dialog Instance } /// - /// Note: On Windows and Linux an open dialog can not be both a file selector - /// and a directory selector, so if you set properties to ['openFile', 'openDirectory'] + /// Note: On Windows and Linux an open dialog can not be both a file selector + /// and a directory selector, so if you set properties to ['openFile', 'openDirectory'] /// on these platforms, a directory selector will be shown. /// /// The browserWindow argument allows the dialog to attach itself to a parent window, making it modal. @@ -50,9 +51,9 @@ public Task ShowOpenDialogAsync(BrowserWindow browserWindow, OpenDialo var guid = Guid.NewGuid().ToString(); BridgeConnector.Socket.Once("showOpenDialogComplete" + guid, tcs.SetResult); - BridgeConnector.Socket.Emit("showOpenDialog", - browserWindow, - options, + BridgeConnector.Socket.Emit("showOpenDialog", + browserWindow, + options, guid); return tcs.Task; @@ -167,9 +168,9 @@ public Task ShowMessageBoxAsync(BrowserWindow browserWindow, M /// /// Displays a modal dialog that shows an error message. /// - /// This API can be called safely before the ready event the app module emits, - /// it is usually used to report errors in early stage of startup.If called - /// before the app readyevent on Linux, the message will be emitted to stderr, + /// This API can be called safely before the ready event the app module emits, + /// it is usually used to report errors in early stage of startup.If called + /// before the app readyevent on Linux, the message will be emitted to stderr, /// and no GUI dialog will appear. /// /// The title to display in the error box. @@ -181,11 +182,13 @@ public void ShowErrorBox(string title, string content) /// /// On macOS, this displays a modal dialog that shows a message and certificate information, - /// and gives the user the option of trusting/importing the certificate. If you provide a + /// and gives the user the option of trusting/importing the certificate. If you provide a /// browserWindow argument the dialog will be attached to the parent window, making it modal. /// /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public Task ShowCertificateTrustDialogAsync(CertificateTrustDialogOptions options) { return ShowCertificateTrustDialogAsync(null, options); @@ -193,18 +196,20 @@ public Task ShowCertificateTrustDialogAsync(CertificateTrustDialogOptions option /// /// On macOS, this displays a modal dialog that shows a message and certificate information, - /// and gives the user the option of trusting/importing the certificate. If you provide a + /// and gives the user the option of trusting/importing the certificate. If you provide a /// browserWindow argument the dialog will be attached to the parent window, making it modal. /// /// /// /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public Task ShowCertificateTrustDialogAsync(BrowserWindow browserWindow, CertificateTrustDialogOptions options) { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.Once("showCertificateTrustDialogComplete" + guid, () => tcs.SetResult(null)); + BridgeConnector.Socket.Once("showCertificateTrustDialogComplete" + guid, () => tcs.SetResult()); BridgeConnector.Socket.Emit("showCertificateTrustDialog", browserWindow, options, @@ -212,7 +217,5 @@ public Task ShowCertificateTrustDialogAsync(BrowserWindow browserWindow, Certifi return tcs.Task; } - - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Dock.cs b/src/ElectronNET.API/API/Dock.cs index 0a84b27d..e2577595 100644 --- a/src/ElectronNET.API/API/Dock.cs +++ b/src/ElectronNET.API/API/Dock.cs @@ -1,16 +1,16 @@ -using ElectronNET.API.Entities; -using ElectronNET.API.Extensions; -using ElectronNET.API.Serialization; using System.Collections.Generic; -using System.Text.Json; +using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; +using ElectronNET.API.Entities; +using ElectronNET.API.Extensions; namespace ElectronNET.API { /// /// Control your app in the macOS dock. /// + [SupportedOSPlatform("macOS")] public sealed class Dock { private static Dock _dock; @@ -57,7 +57,7 @@ public async Task BounceAsync(DockBounceType type, CancellationToken cancel using (cancellationToken.Register(() => tcs.TrySetCanceled())) { BridgeConnector.Socket.Once("dock-bounce-completed", tcs.SetResult); - BridgeConnector.Socket.Emit("dock-bounce", type.GetDescription()); + BridgeConnector.Socket.Emit("dock-bounce", type); return await tcs.Task .ConfigureAwait(false); @@ -208,7 +208,5 @@ public void SetIcon(string image) { BridgeConnector.Socket.Emit("dock-setIcon", image); } - - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Electron.cs b/src/ElectronNET.API/API/Electron.cs index 9148016a..2866c6e6 100644 --- a/src/ElectronNET.API/API/Electron.cs +++ b/src/ElectronNET.API/API/Electron.cs @@ -140,7 +140,7 @@ public static Clipboard Clipboard /// /// Allows you to execute native JavaScript/TypeScript code from the host process. /// - /// It is only possible if the Electron.NET CLI has previously added an + /// It is only possible if the Electron.NET CLI has previously added an /// ElectronHostHook directory: /// electronize add HostHook /// @@ -153,7 +153,7 @@ public static HostHook HostHook } /// - /// Allows you to execute native Lock and Unlock process. + /// Allows you to execute native Lock and Unlock process. /// public static PowerMonitor PowerMonitor { diff --git a/src/ElectronNET.API/API/Entities/AboutPanelOptions.cs b/src/ElectronNET.API/API/Entities/AboutPanelOptions.cs index 90aeb869..03bef1b6 100644 --- a/src/ElectronNET.API/API/Entities/AboutPanelOptions.cs +++ b/src/ElectronNET.API/API/Entities/AboutPanelOptions.cs @@ -1,8 +1,11 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// /// About panel options. /// + /// Up-to-date with Electron API 39.2 public class AboutPanelOptions { /// @@ -21,28 +24,35 @@ public class AboutPanelOptions public string Copyright { get; set; } /// - /// The app's build version number. + /// The app's build version number (macOS). /// + [SupportedOSPlatform("macos")] public string Version { get; set; } /// - /// Credit information. + /// Credit information (macOS, Windows). /// + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("windows")] public string Credits { get; set; } /// - /// List of app authors. + /// List of app authors (Linux). /// + [SupportedOSPlatform("linux")] public string[] Authors { get; set; } /// - /// The app's website. + /// The app's website (Linux). /// + [SupportedOSPlatform("linux")] public string Website { get; set; } /// - /// Path to the app's icon. On Linux, will be shown as 64x64 pixels while retaining aspect ratio. + /// Path to the app's icon in a JPEG or PNG file format. On Linux, will be shown as 64x64 pixels while retaining aspect ratio. On Windows, a 48x48 PNG will result in the best visual quality. /// + [SupportedOSPlatform("linux")] + [SupportedOSPlatform("windows")] public string IconPath { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/AddRepresentationOptions.cs b/src/ElectronNET.API/API/Entities/AddRepresentationOptions.cs index 96da0cb9..40338f0c 100644 --- a/src/ElectronNET.API/API/Entities/AddRepresentationOptions.cs +++ b/src/ElectronNET.API/API/Entities/AddRepresentationOptions.cs @@ -1,32 +1,35 @@ +using System.Text.Json.Serialization; + namespace ElectronNET.API.Entities { /// /// /// + /// Up-to-date with Electron API 39.2 public class AddRepresentationOptions { /// - /// Gets or sets the width + /// Gets or sets the width in pixels. Defaults to 0. Required if a bitmap buffer is specified as . /// public int? Width { get; set; } /// - /// Gets or sets the height + /// Gets or sets the height in pixels. Defaults to 0. Required if a bitmap buffer is specified as . /// public int? Height { get; set; } /// - /// Gets or sets the scalefactor + /// Gets or sets the image scale factor. Defaults to 1.0. /// public float ScaleFactor { get; set; } = 1.0f; /// - /// Gets or sets the buffer + /// Gets or sets the buffer containing the raw image data. /// public byte[] Buffer { get; set; } /// - /// Gets or sets the dataURL + /// Gets or sets the data URL containing a base 64 encoded PNG or JPEG image. /// public string DataUrl { get; set; } } diff --git a/src/ElectronNET.API/API/Entities/AppDetailsOptions.cs b/src/ElectronNET.API/API/Entities/AppDetailsOptions.cs index 55a92e91..bf2f12c6 100644 --- a/src/ElectronNET.API/API/Entities/AppDetailsOptions.cs +++ b/src/ElectronNET.API/API/Entities/AppDetailsOptions.cs @@ -1,32 +1,36 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// /// /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("windows")] public class AppDetailsOptions { /// - /// Window’s App User Model ID. It has to be set, otherwise the other options will have no effect. + /// Window's App User Model ID. It has to be set, otherwise the other options will have no effect. /// public string AppId { get; set; } /// - /// Window’s Relaunch Icon. + /// Window's relaunch icon resource path. /// public string AppIconPath { get; set; } /// - /// Index of the icon in appIconPath. Ignored when appIconPath is not set. Default is 0. + /// Index of the icon in . Ignored when is not set. Default is 0. /// public int AppIconIndex { get; set; } /// - /// Window’s Relaunch Command. + /// Window's relaunch command. /// public string RelaunchCommand { get; set; } /// - /// Window’s Relaunch Display Name. + /// Window's relaunch display name. /// public string RelaunchDisplayName { get; set; } } diff --git a/src/ElectronNET.API/API/Entities/AutoResizeOptions.cs b/src/ElectronNET.API/API/Entities/AutoResizeOptions.cs index 32289d43..2244a7d4 100644 --- a/src/ElectronNET.API/API/Entities/AutoResizeOptions.cs +++ b/src/ElectronNET.API/API/Entities/AutoResizeOptions.cs @@ -5,6 +5,7 @@ namespace ElectronNET.API.Entities /// /// /// + /// Up-to-date with Electron API 39.2 public class AutoResizeOptions { /// @@ -35,4 +36,4 @@ public class AutoResizeOptions [DefaultValue(false)] public bool Vertical { get; set; } = false; } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/BitmapOptions.cs b/src/ElectronNET.API/API/Entities/BitmapOptions.cs index d3aaebba..07d0c0ba 100644 --- a/src/ElectronNET.API/API/Entities/BitmapOptions.cs +++ b/src/ElectronNET.API/API/Entities/BitmapOptions.cs @@ -3,11 +3,12 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class BitmapOptions { /// - /// Gets or sets the scale factor + /// The image scale factor. Defaults to 1.0. /// public float ScaleFactor { get; set; } = 1.0f; } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Blob.cs b/src/ElectronNET.API/API/Entities/Blob.cs index e1a81b0d..3c7e3e81 100644 --- a/src/ElectronNET.API/API/Entities/Blob.cs +++ b/src/ElectronNET.API/API/Entities/Blob.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class Blob : IPostData { /// diff --git a/src/ElectronNET.API/API/Entities/BlockMapDataHolder.cs b/src/ElectronNET.API/API/Entities/BlockMapDataHolder.cs index 24b45f60..9260b7c8 100644 --- a/src/ElectronNET.API/API/Entities/BlockMapDataHolder.cs +++ b/src/ElectronNET.API/API/Entities/BlockMapDataHolder.cs @@ -28,4 +28,4 @@ public class BlockMapDataHolder /// public bool IsAdminRightsRequired { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/BrowserViewConstructorOptions.cs b/src/ElectronNET.API/API/Entities/BrowserViewConstructorOptions.cs index a0b3411e..346de4b6 100644 --- a/src/ElectronNET.API/API/Entities/BrowserViewConstructorOptions.cs +++ b/src/ElectronNET.API/API/Entities/BrowserViewConstructorOptions.cs @@ -3,23 +3,26 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class BrowserViewConstructorOptions { /// - /// See BrowserWindow. + /// Gets or sets the web preferences for the view (see WebPreferences). /// public WebPreferences WebPreferences { get; set; } /// - /// A proxy to set on creation in the format host:port. + /// Gets or sets a proxy to use on creation in the format host:port. /// The proxy can be alternatively set using the BrowserView.WebContents.SetProxyAsync function. /// + /// This is custom shortcut. Not part of the Electron API. public string Proxy { get; set; } /// - /// The credentials of the Proxy in the format username:password. + /// Gets or sets the credentials of the proxy in the format username:password. /// These will only be used if the Proxy field is also set. /// + /// This is custom shortcut. Not part of the Electron API. public string ProxyCredentials { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/BrowserWindowOptions.cs b/src/ElectronNET.API/API/Entities/BrowserWindowOptions.cs index 5f3e92fe..dec474e0 100644 --- a/src/ElectronNET.API/API/Entities/BrowserWindowOptions.cs +++ b/src/ElectronNET.API/API/Entities/BrowserWindowOptions.cs @@ -1,7 +1,7 @@ using ElectronNET.Converter; - using System.ComponentModel; using System.Text.Json.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { @@ -73,24 +73,32 @@ public class BrowserWindowOptions /// /// Whether window is movable. This is not implemented on Linux. Default is true. /// + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("windows")] [DefaultValue(true)] public bool Movable { get; set; } = true; /// /// Whether window is minimizable. This is not implemented on Linux. Default is true. /// + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("windows")] [DefaultValue(true)] public bool Minimizable { get; set; } = true; /// /// Whether window is maximizable. This is not implemented on Linux. Default is true. /// + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("windows")] [DefaultValue(true)] public bool Maximizable { get; set; } = true; /// /// Whether window is closable. This is not implemented on Linux. Default is true. /// + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("windows")] [DefaultValue(true)] public bool Closable { get; set; } = true; @@ -116,16 +124,24 @@ public class BrowserWindowOptions /// /// Whether the window can be put into fullscreen mode. On macOS, also whether the - /// maximize/zoom button should toggle full screen mode or maximize window.Default - /// is true. + /// maximize/zoom button should toggle full screen mode or maximize window. Default + /// is true (Electron default). /// - public bool Fullscreenable { get; set; } + [DefaultValue(true)] + public bool Fullscreenable { get; set; } = true; // FIX: previously defaulted to false in C# /// /// Whether to show the window in taskbar. Default is false. /// + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("windows")] public bool SkipTaskbar { get; set; } + /// + /// Determines if Blazor is used. Will disable "module" and "process" globals. Default is false. + /// + public bool IsRunningBlazor { get; set; } + /// /// The kiosk mode. Default is false. /// @@ -137,8 +153,7 @@ public class BrowserWindowOptions public string Title { get; set; } = "Electron.NET"; /// - /// The window icon. On Windows it is recommended to use ICO icons to get best - /// visual effects, you can also leave it undefined so the executable's icon will be used. + /// The window icon. Can be a NativeImage or a string path. On Windows it is recommended to use ICO icons; when undefined, the executable's icon will be used. /// public string Icon { get; set; } @@ -149,7 +164,7 @@ public class BrowserWindowOptions public bool Show { get; set; } = true; /// - /// Specify false to create a . Default is true. + /// Specify false to create a frameless window. Default is true. /// [DefaultValue(true)] public bool Frame { get; set; } = true; @@ -164,6 +179,7 @@ public class BrowserWindowOptions /// Whether the web view accepts a single mouse-down event that simultaneously /// activates the window.Default is false. /// + [SupportedOSPlatform("macos")] public bool AcceptFirstMouse { get; set; } /// @@ -174,28 +190,35 @@ public class BrowserWindowOptions /// /// Auto hide the menu bar unless the Alt key is pressed. Default is false. /// + [SupportedOSPlatform("windows")] + [SupportedOSPlatform("linux")] public bool AutoHideMenuBar { get; set; } /// /// Enable the window to be resized larger than screen. Default is false. /// + [SupportedOSPlatform("macos")] public bool EnableLargerThanScreen { get; set; } /// - /// Window's background color as Hexadecimal value, like #66CD00 or #FFF or - /// #80FFFFFF (alpha is supported). Default is #FFF (white). + /// The window's background color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. Alpha in #AARRGGBB format is supported if transparent is set to true. Default is #FFF (white). /// public string BackgroundColor { get; set; } /// - /// Whether window should have a shadow. This is only implemented on macOS. Default - /// is true. + /// Initial opacity of the window, between 0.0 (fully transparent) and 1.0 (fully opaque). Only implemented on Windows and macOS. + /// + [SupportedOSPlatform("windows")] + [SupportedOSPlatform("macos")] + public double? Opacity { get; set; } + + /// + /// Whether window should have a shadow. Default is true. /// public bool HasShadow { get; set; } /// - /// Forces using dark theme for the window, only works on some GTK+3 desktop - /// environments.Default is false. + /// Forces using dark theme for the window, only works on some GTK+3 desktop environments. Default is false. /// public bool DarkTheme { get; set; } @@ -215,6 +238,12 @@ public class BrowserWindowOptions /// public TitleBarStyle TitleBarStyle { get; set; } + /// + /// Set a custom position for the traffic light buttons in frameless windows (macOS). + /// + [SupportedOSPlatform("macos")] + public Point TrafficLightPosition { get; set; } + /// /// Configures the window's title bar overlay when using a frameless window. /// Can be either: @@ -228,9 +257,9 @@ public class BrowserWindowOptions public TitleBarOverlay TitleBarOverlay { get; set; } /// - /// Shows the title in the tile bar in full screen mode on macOS for all - /// titleBarStyle options.Default is false. + /// Shows the title in the title bar in full screen mode on macOS for all titleBarStyle options. Default is false. /// + /// Not documented by MCP base-window-options / browser-window-options. public bool FullscreenWindowTitle { get; set; } /// @@ -238,6 +267,7 @@ public class BrowserWindowOptions /// window frame.Setting it to false will remove window shadow and window /// animations. Default is true. /// + [SupportedOSPlatform("windows")] [DefaultValue(true)] public bool ThickFrame { get; set; } = true; @@ -247,14 +277,17 @@ public class BrowserWindowOptions /// Windows versions older than Windows 11 Build 22000 this property has no effect, and /// frameless windows will not have rounded corners. /// + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("windows")] [DefaultValue(true)] public bool RoundedCorners { get; set; } = true; /// /// Add a type of vibrancy effect to the window, only on macOS. Can be - /// appearance-based, light, dark, titlebar, selection, menu, popover, sidebar, - /// medium-light or ultra-dark. + /// appearance-based, titlebar, selection, menu, popover, sidebar, header, sheet, + /// window, hud, fullscreen-ui, tooltip, content, under-window, or under-page. /// + [SupportedOSPlatform("macos")] public Vibrancy Vibrancy { get; set; } /// @@ -264,6 +297,7 @@ public class BrowserWindowOptions /// it to zoom to the width of the screen.This will also affect the behavior when /// calling maximize() directly.Default is false. /// + [SupportedOSPlatform("macos")] public bool ZoomToPageWidth { get; set; } /// @@ -272,6 +306,7 @@ public class BrowserWindowOptions /// adds a native new tab button to your window's tab bar and allows your app and /// window to receive the new-window-for-tab event. /// + [SupportedOSPlatform("macos")] public string TabbingIdentifier { get; set; } /// @@ -283,16 +318,39 @@ public class BrowserWindowOptions /// A proxy to set on creation in the format host:port. /// The proxy can be alternatively set using the BrowserWindow.WebContents.SetProxyAsync function. /// + /// Not documented by MCP base-window-options / browser-window-options. public string Proxy { get; set; } /// /// The credentials of the Proxy in the format username:password. /// These will only be used if the Proxy field is also set. /// + /// Not documented by MCP base-window-options / browser-window-options. public string ProxyCredentials { get; set; } - } -} + /// + /// Gets or sets whether to use pre-Lion fullscreen on macOS. Default is false. + /// + [SupportedOSPlatform("macos")] + public bool SimpleFullscreen { get; set; } + /// + /// Gets or sets whether the window should be hidden when the user toggles into mission control (macOS). + /// + [SupportedOSPlatform("macos")] + public bool HiddenInMissionControl { get; set; } + /// + /// Gets or sets how the material appearance should reflect window activity state on macOS. Must be used with the vibrancy property. + /// Possible values: 'followWindow' (default), 'active', 'inactive'. + /// + [SupportedOSPlatform("macos")] + public string VisualEffectState { get; set; } + /// + /// Gets or sets the system-drawn background material on Windows. Can be 'auto', 'none', 'mica', 'acrylic' or 'tabbed'. + /// + [SupportedOSPlatform("windows")] + public string BackgroundMaterial { get; set; } + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/CPUUsage.cs b/src/ElectronNET.API/API/Entities/CPUUsage.cs index f9b73261..c21d133e 100644 --- a/src/ElectronNET.API/API/Entities/CPUUsage.cs +++ b/src/ElectronNET.API/API/Entities/CPUUsage.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class CPUUsage { /// @@ -11,9 +12,14 @@ public class CPUUsage public double PercentCPUUsage { get; set; } /// - /// The number of average idle cpu wakeups per second since the last call to - /// getCPUUsage.First call returns 0. + /// Total seconds of CPU time used since process startup, if available. /// - public int IdleWakeupsPerSecond { get; set; } + public double? CumulativeCPUUsage { get; set; } + + /// + /// The number of average idle CPU wakeups per second since the last call to + /// getCPUUsage. First call returns 0. Will always return 0 on Windows. + /// + public double IdleWakeupsPerSecond { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Certificate.cs b/src/ElectronNET.API/API/Entities/Certificate.cs index 646c126f..937b4153 100644 --- a/src/ElectronNET.API/API/Entities/Certificate.cs +++ b/src/ElectronNET.API/API/Entities/Certificate.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class Certificate { /// diff --git a/src/ElectronNET.API/API/Entities/CertificatePrincipal.cs b/src/ElectronNET.API/API/Entities/CertificatePrincipal.cs index 0b1245af..8b1b6b27 100644 --- a/src/ElectronNET.API/API/Entities/CertificatePrincipal.cs +++ b/src/ElectronNET.API/API/Entities/CertificatePrincipal.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class CertificatePrincipal { /// diff --git a/src/ElectronNET.API/API/Entities/CertificateTrustDialogOptions.cs b/src/ElectronNET.API/API/Entities/CertificateTrustDialogOptions.cs index 9a3bfda9..04b0eab2 100644 --- a/src/ElectronNET.API/API/Entities/CertificateTrustDialogOptions.cs +++ b/src/ElectronNET.API/API/Entities/CertificateTrustDialogOptions.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class CertificateTrustDialogOptions { /// diff --git a/src/ElectronNET.API/API/Entities/ChromeExtensionInfo.cs b/src/ElectronNET.API/API/Entities/ChromeExtensionInfo.cs index 52bc2dc4..b3d5e0a6 100644 --- a/src/ElectronNET.API/API/Entities/ChromeExtensionInfo.cs +++ b/src/ElectronNET.API/API/Entities/ChromeExtensionInfo.cs @@ -3,6 +3,7 @@ /// /// Provide metadata about the current loaded Chrome extension /// + /// Project-specific: no matching Electron structure found in MCP docs (electronjs). public class ChromeExtensionInfo { /// @@ -26,4 +27,4 @@ public ChromeExtensionInfo(string name, string version) /// public string Version { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ClearStorageDataOptions.cs b/src/ElectronNET.API/API/Entities/ClearStorageDataOptions.cs index 45ebb974..cf455e14 100644 --- a/src/ElectronNET.API/API/Entities/ClearStorageDataOptions.cs +++ b/src/ElectronNET.API/API/Entities/ClearStorageDataOptions.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class ClearStorageDataOptions { /// @@ -11,14 +12,17 @@ public class ClearStorageDataOptions public string Origin { get; set; } /// - /// The types of storages to clear, can contain: appcache, cookies, filesystem, - /// indexdb, localstorage, shadercache, websql, serviceworkers, cachestorage. + /// The types of storages to clear. Can contain: cookies, filesystem, indexdb, + /// localstorage, shadercache, websql, serviceworkers, cachestorage. + /// If not specified, all storage types are cleared. /// public string[] Storages { get; set; } /// - /// The types of quotas to clear, can contain: temporary, persistent, syncable. + /// The types of quotas to clear. Can contain: temporary. If not specified, + /// all quotas are cleared. The quotas option is deprecated; + /// "temporary" is the only remaining supported quota type. /// public string[] Quotas { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Cookie.cs b/src/ElectronNET.API/API/Entities/Cookie.cs index d9b9b278..815c2865 100644 --- a/src/ElectronNET.API/API/Entities/Cookie.cs +++ b/src/ElectronNET.API/API/Entities/Cookie.cs @@ -1,53 +1,59 @@ namespace ElectronNET.API.Entities { /// - /// + /// Cookie structure as used by Electron session.cookies APIs. /// + /// Up-to-date with Electron API 39.2 public class Cookie { /// - /// The name of the cookie. + /// Gets or sets the name of the cookie. /// public string Name { get; set; } /// - /// The value of the cookie. + /// Gets or sets the value of the cookie. /// public string Value { get; set; } /// - /// (optional) - The domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains. + /// Gets or sets the domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains. /// public string Domain { get; set; } /// - /// (optional) - Whether the cookie is a host-only cookie; this will only be true if no domain was passed. + /// Gets or sets a value indicating whether the cookie is a host-only cookie; this will only be true if no domain was passed. /// public bool HostOnly { get; set; } /// - /// (optional) - The path of the cookie. + /// Gets or sets the path of the cookie. /// public string Path { get; set; } /// - /// (optional) - Whether the cookie is marked as secure. + /// Gets or sets a value indicating whether the cookie is marked as secure. /// public bool Secure { get; set; } /// - /// (optional) - Whether the cookie is marked as HTTP only. + /// Gets or sets a value indicating whether the cookie is marked as HTTP only. /// public bool HttpOnly { get; set; } /// - /// (optional) - Whether the cookie is a session cookie or a persistent cookie with an expiration date. + /// Gets or sets a value indicating whether the cookie is a session cookie or a persistent cookie with an expiration date. /// public bool Session { get; set; } /// - /// (optional) - The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies. + /// Gets or sets the expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies. /// - public long ExpirationDate { get; set; } + public double ExpirationDate { get; set; } + + /// + /// Gets or sets the SameSite policy applied to this cookie. Can be "unspecified", "no_restriction", "lax" or "strict". + /// + public string SameSite { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/CookieChangedCause.cs b/src/ElectronNET.API/API/Entities/CookieChangedCause.cs index 0038357f..fd65bfd4 100644 --- a/src/ElectronNET.API/API/Entities/CookieChangedCause.cs +++ b/src/ElectronNET.API/API/Entities/CookieChangedCause.cs @@ -1,17 +1,15 @@ - -using System.Text.Json.Serialization; - namespace ElectronNET.API.Entities { + using System.Text.Json.Serialization; + /// - /// The cause of the change + /// The cause of the cookie change (per Electron Cookies 'changed' event). /// public enum CookieChangedCause { /// - ///The cookie was changed directly by a consumer's action. + /// The cookie was changed directly by a consumer's action. /// - [JsonPropertyName("explicit")] @explicit, /// @@ -20,19 +18,19 @@ public enum CookieChangedCause overwrite, /// - /// The cookie was automatically removed as it expired. + /// The cookie was automatically removed as it expired. /// expired, /// - /// The cookie was automatically evicted during garbage collection. + /// The cookie was automatically evicted during garbage collection. /// evicted, /// - /// The cookie was overwritten with an already-expired expiration date. + /// The cookie was overwritten with an already-expired expiration date. /// [JsonPropertyName("expired_overwrite")] expiredOverwrite } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/CookieDetails.cs b/src/ElectronNET.API/API/Entities/CookieDetails.cs index 3c44de6a..260edb98 100644 --- a/src/ElectronNET.API/API/Entities/CookieDetails.cs +++ b/src/ElectronNET.API/API/Entities/CookieDetails.cs @@ -5,54 +5,59 @@ namespace ElectronNET.API.Entities /// /// /// + /// Up-to-date with Electron API 39.2 public class CookieDetails { /// - /// The URL to associate the cookie with. The callback will be rejected if the URL is invalid. + /// Gets or sets the URL to associate the cookie with. The operation will be rejected if the URL is invalid. /// public string Url { get; set; } /// - /// (optional) - The name of the cookie. Empty by default if omitted. + /// Gets or sets the name of the cookie. Empty by default if omitted. /// [DefaultValue("")] public string Name { get; set; } /// - /// (optional) - The value of the cookie. Empty by default if omitted. + /// Gets or sets the value of the cookie. Empty by default if omitted. /// [DefaultValue("")] public string Value { get; set; } /// - /// (optional) - The domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains. Empty by default if omitted. + /// Gets or sets the domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains. Empty by default if omitted. /// [DefaultValue("")] public string Domain { get; set; } /// - /// (optional) - The path of the cookie. Empty by default if omitted. + /// Gets or sets the path of the cookie. Empty by default if omitted. /// [DefaultValue("")] public string Path { get; set; } /// - /// (optional) - Whether the cookie is marked as secure. Defaults to false. + /// Gets or sets a value indicating whether the cookie should be marked as secure. Defaults to false unless the SameSite policy is set to no_restriction (SameSite=None). /// [DefaultValue(false)] public bool Secure { get; set; } /// - /// (optional) - Whether the cookie is marked as HTTP only. Defaults to false. + /// Gets or sets a value indicating whether the cookie should be marked as HTTP only. Defaults to false. /// [DefaultValue(false)] public bool HttpOnly { get; set; } /// - /// (optional) - The expiration date of the cookie as the number of seconds since the UNIX epoch. - /// If omitted then the cookie becomes a session cookie and will not be retained between sessions. + /// Gets or sets the expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie and will not be retained between sessions. /// [DefaultValue(0)] - public long ExpirationDate { get; set; } + public double ExpirationDate { get; set; } + + /// + /// Gets or sets the SameSite policy to apply to this cookie. Can be "unspecified", "no_restriction", "lax" or "strict". Default is "lax". + /// + public string SameSite { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/CookieFilter.cs b/src/ElectronNET.API/API/Entities/CookieFilter.cs index ee5a51e4..7914fe80 100644 --- a/src/ElectronNET.API/API/Entities/CookieFilter.cs +++ b/src/ElectronNET.API/API/Entities/CookieFilter.cs @@ -3,10 +3,11 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class CookieFilter { /// - /// (optional) - Retrieves cookies which are associated with url.Empty implies retrieving cookies of all URLs. + /// (optional) - Retrieves cookies which are associated with url. Empty implies retrieving cookies of all URLs. /// public string Url { get; set; } @@ -34,5 +35,10 @@ public class CookieFilter /// (optional) - Filters out session or persistent cookies. /// public bool Session { get; set; } + + /// + /// (optional) - Filters cookies by httpOnly. + /// + public bool HttpOnly { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/CreateFromBitmapOptions.cs b/src/ElectronNET.API/API/Entities/CreateFromBitmapOptions.cs index 6b80c219..48ec8036 100644 --- a/src/ElectronNET.API/API/Entities/CreateFromBitmapOptions.cs +++ b/src/ElectronNET.API/API/Entities/CreateFromBitmapOptions.cs @@ -3,21 +3,22 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class CreateFromBitmapOptions { /// - /// Gets or sets the width + /// Gets or sets the width in pixels. Required for nativeImage.createFromBitmap(buffer, options). /// public int? Width { get; set; } /// - /// Gets or sets the height + /// Gets or sets the height in pixels. Required for nativeImage.createFromBitmap(buffer, options). /// public int? Height { get; set; } /// - /// Gets or sets the scalefactor + /// Gets or sets the image scale factor. Optional, defaults to 1.0. /// public float ScaleFactor { get; set; } = 1.0f; } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/CreateFromBufferOptions.cs b/src/ElectronNET.API/API/Entities/CreateFromBufferOptions.cs index 206f5acd..0eef0f91 100644 --- a/src/ElectronNET.API/API/Entities/CreateFromBufferOptions.cs +++ b/src/ElectronNET.API/API/Entities/CreateFromBufferOptions.cs @@ -3,20 +3,21 @@ namespace ElectronNET.API.Entities /// /// /// + /// Up-to-date with Electron API 39.2 public class CreateFromBufferOptions { /// - /// Gets or sets the width + /// Gets or sets the width. Required for bitmap buffers passed to nativeImage.createFromBuffer. /// public int? Width { get; set; } /// - /// Gets or sets the height + /// Gets or sets the height. Required for bitmap buffers passed to nativeImage.createFromBuffer. /// public int? Height { get; set; } /// - /// Gets or sets the scalefactor + /// The image scale factor. Optional, defaults to 1.0. /// public float ScaleFactor { get; set; } = 1.0f; } diff --git a/src/ElectronNET.API/API/Entities/CreateInterruptedDownloadOptions.cs b/src/ElectronNET.API/API/Entities/CreateInterruptedDownloadOptions.cs index e7d066e7..5221376e 100644 --- a/src/ElectronNET.API/API/Entities/CreateInterruptedDownloadOptions.cs +++ b/src/ElectronNET.API/API/Entities/CreateInterruptedDownloadOptions.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class CreateInterruptedDownloadOptions { /// @@ -16,7 +17,7 @@ public class CreateInterruptedDownloadOptions public string[] UrlChain { get; set; } /// - /// + /// (optional) - MIME type of the download. /// public string MimeType { get; set; } @@ -41,9 +42,10 @@ public class CreateInterruptedDownloadOptions public string ETag { get; set; } /// - /// Time when download was started in number of seconds since UNIX epoch. + /// (optional) - Time when download was started in number of seconds since UNIX epoch. + /// Electron documents this as a Number (Double). /// - public int StartTime { get; set; } + public double? StartTime { get; set; } /// /// @@ -64,4 +66,4 @@ public CreateInterruptedDownloadOptions(string path, string[] urlChain, int offs ETag = eTag; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Data.cs b/src/ElectronNET.API/API/Entities/Data.cs index 2dcca894..9dddf66d 100644 --- a/src/ElectronNET.API/API/Entities/Data.cs +++ b/src/ElectronNET.API/API/Entities/Data.cs @@ -21,6 +21,12 @@ public class Data /// public string Html { get; set; } + /// + /// Gets or sets the image. + /// Maps to clipboard.write({ image: NativeImage }). + /// + public NativeImage Image { get; set; } + /// /// Gets or sets the RTF. diff --git a/src/ElectronNET.API/API/Entities/DefaultFontFamily.cs b/src/ElectronNET.API/API/Entities/DefaultFontFamily.cs index 105d2053..95e081a3 100644 --- a/src/ElectronNET.API/API/Entities/DefaultFontFamily.cs +++ b/src/ElectronNET.API/API/Entities/DefaultFontFamily.cs @@ -34,5 +34,10 @@ public class DefaultFontFamily /// Defaults to Impact. /// public string Fantasy { get; set; } + + /// + /// Defaults to Latin Modern Math. + /// + public string Math { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/DevToolsMode.cs b/src/ElectronNET.API/API/Entities/DevToolsMode.cs index 7290d8ca..6d786a39 100644 --- a/src/ElectronNET.API/API/Entities/DevToolsMode.cs +++ b/src/ElectronNET.API/API/Entities/DevToolsMode.cs @@ -1,9 +1,9 @@ namespace ElectronNET.API.Entities { /// - /// Opens the devtools with specified dock state, can be right, bottom, undocked, - /// detach.Defaults to last used dock state.In undocked mode it's possible to dock - /// back.In detach mode it's not. + /// Opens the devtools with specified dock state, can be left, right, bottom, undocked, + /// detach. Defaults to last used dock state. In undocked mode it's possible to dock + /// back. In detach mode it's not. /// public enum DevToolsMode { @@ -25,6 +25,11 @@ public enum DevToolsMode /// /// The detach /// - detach + detach, + + /// + /// The left + /// + left, } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Display.cs b/src/ElectronNET.API/API/Entities/Display.cs index ba2d8a79..258b6b84 100644 --- a/src/ElectronNET.API/API/Entities/Display.cs +++ b/src/ElectronNET.API/API/Entities/Display.cs @@ -3,10 +3,11 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class Display { /// - /// Can be available, unavailable, unknown. + /// Gets or sets the accelerometer support status; can be 'available', 'unavailable', or 'unknown'. /// public string AccelerometerSupport { get; set; } @@ -19,57 +20,72 @@ public class Display public Rectangle Bounds { get; set; } /// - /// The number of bits per pixel. + /// Gets or sets the number of bits per pixel. /// public int ColorDepth { get; set; } /// - /// Represent a color space (three-dimensional object which contains all realizable color combinations) for the purpose of color conversions. + /// Gets or sets the color space description used for color conversions. /// public string ColorSpace { get; set; } /// - /// The number of bits per color component. + /// Gets or sets the number of bits per color component. /// public int DepthPerComponent { get; set; } /// - /// The display refresh rate. + /// Gets or sets a value indicating whether the display is detected by the system. /// - public int DisplayFrequency { get; set; } + public bool Detected { get; set; } /// - /// Unique identifier associated with the display. + /// Gets or sets the display refresh rate. + /// + public double DisplayFrequency { get; set; } + + /// + /// Gets or sets the unique identifier associated with the display. A value of -1 means the display is invalid or the correct id is not yet known, and a value of -10 means the display is a virtual display assigned to a unified desktop. /// public long Id { get; set; } /// - /// true for an internal display and false for an external display. + /// Gets or sets a value indicating whether the display is internal (true) or external (false). /// public bool Internal { get; set; } /// - /// User-friendly label, determined by the platform. + /// Gets or sets the user-friendly label, determined by the platform. /// public string Label { get; set; } /// - /// Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees. + /// Gets or sets the maximum cursor size in native pixels. + /// + public Size MaximumCursorSize { get; set; } + + /// + /// Gets or sets the display's origin in pixel coordinates. Only available on windowing systems that position displays in pixel coordinates (e.g., X11). + /// + public Point NativeOrigin { get; set; } + + /// + /// Gets or sets the screen rotation in clock-wise degrees. Can be 0, 90, 180, or 270. /// public int Rotation { get; set; } /// - /// Output device's pixel scale factor. + /// Gets or sets the output device's pixel scale factor. /// public double ScaleFactor { get; set; } /// - /// Can be available, unavailable, unknown. + /// Gets or sets the touch support status; can be 'available', 'unavailable', or 'unknown'. /// public string TouchSupport { get; set; } /// - /// Whether or not the display is a monochrome display. + /// Gets or sets a value indicating whether the display is monochrome. /// public bool Monochrome { get; set; } @@ -82,10 +98,10 @@ public class Display public Size Size { get; set; } /// - /// Gets or sets the work area. + /// Gets or sets the work area of the display in DIP points. /// /// - /// The work area. + /// The work area of the display in DIP points. /// public Rectangle WorkArea { get; set; } diff --git a/src/ElectronNET.API/API/Entities/DisplayBalloonOptions.cs b/src/ElectronNET.API/API/Entities/DisplayBalloonOptions.cs index c2235111..66758b7d 100644 --- a/src/ElectronNET.API/API/Entities/DisplayBalloonOptions.cs +++ b/src/ElectronNET.API/API/Entities/DisplayBalloonOptions.cs @@ -1,8 +1,21 @@ -namespace ElectronNET.API +using System.Runtime.Versioning; + +namespace ElectronNET.API { /// /// /// + public enum DisplayBalloonIconType + { + none, + info, + warning, + error, + custom + } + + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("Windows")] public class DisplayBalloonOptions { /// @@ -28,5 +41,29 @@ public class DisplayBalloonOptions /// The content. /// public string Content { get; set; } + + /// + /// (optional) - Icon type for the balloon: none, info, warning, error or custom. + /// Default is custom. + /// + public DisplayBalloonIconType IconType { get; set; } = DisplayBalloonIconType.custom; + + /// + /// (optional) - Use the large version of the icon. Default is true. + /// Maps to Windows NIIF_LARGE_ICON. + /// + public bool LargeIcon { get; set; } = true; + + /// + /// (optional) - Do not play the associated sound. Default is false. + /// Maps to Windows NIIF_NOSOUND. + /// + public bool NoSound { get; set; } + + /// + /// (optional) - Do not display the balloon if the current user is in "quiet time". + /// Default is false. Maps to Windows NIIF_RESPECT_QUIET_TIME. + /// + public bool RespectQuietTime { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/DockBounceType.cs b/src/ElectronNET.API/API/Entities/DockBounceType.cs index eedcaac3..611982b0 100644 --- a/src/ElectronNET.API/API/Entities/DockBounceType.cs +++ b/src/ElectronNET.API/API/Entities/DockBounceType.cs @@ -1,10 +1,13 @@ using System.ComponentModel; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// /// Defines the DockBounceType enumeration. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("macOS")] public enum DockBounceType { /// diff --git a/src/ElectronNET.API/API/Entities/EnableNetworkEmulationOptions.cs b/src/ElectronNET.API/API/Entities/EnableNetworkEmulationOptions.cs index 967cc53d..d5a3e3d1 100644 --- a/src/ElectronNET.API/API/Entities/EnableNetworkEmulationOptions.cs +++ b/src/ElectronNET.API/API/Entities/EnableNetworkEmulationOptions.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class EnableNetworkEmulationOptions { /// @@ -12,17 +13,20 @@ public class EnableNetworkEmulationOptions /// /// RTT in ms. Defaults to 0 which will disable latency throttling. + /// Electron documents this as a Number (Double). /// - public int Latency { get; set; } + public double Latency { get; set; } /// /// Download rate in Bps. Defaults to 0 which will disable download throttling. + /// Electron documents this as a Number (Double). /// - public int DownloadThroughput { get; set; } + public double DownloadThroughput { get; set; } /// /// Upload rate in Bps. Defaults to 0 which will disable upload throttling. + /// Electron documents this as a Number (Double). /// - public int UploadThroughput { get; set; } + public double UploadThroughput { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Extension.cs b/src/ElectronNET.API/API/Entities/Extension.cs index 6bd8cbe1..af4da662 100644 --- a/src/ElectronNET.API/API/Entities/Extension.cs +++ b/src/ElectronNET.API/API/Entities/Extension.cs @@ -3,6 +3,7 @@ /// /// Docs: https://electronjs.org/docs/api/structures/extension /// + /// Up-to-date with Electron API 39.2 public class Extension { /// @@ -35,4 +36,4 @@ public class Extension /// public string Version { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/FileFilter.cs b/src/ElectronNET.API/API/Entities/FileFilter.cs index 3f573ed3..4cae053a 100644 --- a/src/ElectronNET.API/API/Entities/FileFilter.cs +++ b/src/ElectronNET.API/API/Entities/FileFilter.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class FileFilter { /// diff --git a/src/ElectronNET.API/API/Entities/FileIconOptions.cs b/src/ElectronNET.API/API/Entities/FileIconOptions.cs index f2e1d250..820d2140 100644 --- a/src/ElectronNET.API/API/Entities/FileIconOptions.cs +++ b/src/ElectronNET.API/API/Entities/FileIconOptions.cs @@ -3,14 +3,13 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class FileIconOptions { /// - /// Gets the size. + /// The requested icon size string passed to app.getFileIcon: + /// "small" (16x16), "normal" (32x32), or "large" (48x48 on Linux, 32x32 on Windows; unsupported on macOS). /// - /// - /// The size. - /// public string Size { get; private set; } /// diff --git a/src/ElectronNET.API/API/Entities/FileIconSize.cs b/src/ElectronNET.API/API/Entities/FileIconSize.cs index 75430d60..bb642b92 100644 --- a/src/ElectronNET.API/API/Entities/FileIconSize.cs +++ b/src/ElectronNET.API/API/Entities/FileIconSize.cs @@ -1,23 +1,28 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// /// /// + /// Up-to-date with Electron API 39.2 public enum FileIconSize { /// - /// The small + /// small - 16x16 (per app.getFileIcon size mapping). /// small, /// - /// The normal + /// normal - 32x32 (per app.getFileIcon size mapping). /// normal, /// - /// The large + /// large - 48x48 on Linux, 32x32 on Windows, unsupported on macOS (per app.getFileIcon size mapping). /// + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("Windows")] large } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/FocusOptions.cs b/src/ElectronNET.API/API/Entities/FocusOptions.cs index 2520499f..56053a57 100644 --- a/src/ElectronNET.API/API/Entities/FocusOptions.cs +++ b/src/ElectronNET.API/API/Entities/FocusOptions.cs @@ -1,15 +1,18 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// /// Controls the behavior of . /// + /// Up-to-date with Electron API 39.2 public class FocusOptions { /// /// Make the receiver the active app even if another app is currently active. - /// - /// You should seek to use the option as sparingly as possible. + /// You should seek to use the steal option as sparingly as possible. /// + [SupportedOSPlatform("macOS")] public bool Steal { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/GPUFeatureStatus.cs b/src/ElectronNET.API/API/Entities/GPUFeatureStatus.cs index 1a49de9b..01448e0f 100644 --- a/src/ElectronNET.API/API/Entities/GPUFeatureStatus.cs +++ b/src/ElectronNET.API/API/Entities/GPUFeatureStatus.cs @@ -1,85 +1,99 @@ - using System.Text.Json.Serialization; namespace ElectronNET.API.Entities { /// + /// Graphics Feature Status from chrome://gpu/ as returned by app.getGPUFeatureStatus(). + /// Each field reflects the status of a GPU capability reported by Chromium. /// + /// Possible values for all fields: + /// - disabled_software: Software only. Hardware acceleration disabled (yellow) + /// - disabled_off: Disabled (red) + /// - disabled_off_ok: Disabled (yellow) + /// - unavailable_software: Software only, hardware acceleration unavailable (yellow) + /// - unavailable_off: Unavailable (red) + /// - unavailable_off_ok: Unavailable (yellow) + /// - enabled_readback: Hardware accelerated but at reduced performance (yellow) + /// - enabled_force: Hardware accelerated on all pages (green) + /// - enabled: Hardware accelerated (green) + /// - enabled_on: Enabled (green) + /// - enabled_force_on: Force enabled (green) /// + /// Up-to-date with Electron API 39.2 public class GPUFeatureStatus { /// - /// Canvas. + /// Gets or sets the status for Canvas. /// [JsonPropertyName("2d_canvas")] public string Canvas { get; set; } /// - /// Flash. + /// Gets or sets the status for Flash. /// [JsonPropertyName("flash_3d")] public string Flash3D { get; set; } /// - /// Flash Stage3D. + /// Gets or sets the status for Flash Stage3D. /// [JsonPropertyName("flash_stage3d")] public string FlashStage3D { get; set; } /// - /// Flash Stage3D Baseline profile. + /// Gets or sets the status for Flash Stage3D Baseline profile. /// [JsonPropertyName("flash_stage3d_baseline")] public string FlashStage3dBaseline { get; set; } /// - /// Compositing. + /// Gets or sets the status for Compositing. /// [JsonPropertyName("gpu_compositing")] public string GpuCompositing { get; set; } /// - /// Multiple Raster Threads. + /// Gets or sets the status for Multiple Raster Threads. /// [JsonPropertyName("multiple_raster_threads")] public string MultipleRasterThreads { get; set; } /// - /// Native GpuMemoryBuffers. + /// Gets or sets the status for Native GpuMemoryBuffers. /// [JsonPropertyName("native_gpu_memory_buffers")] public string NativeGpuMemoryBuffers { get; set; } /// - /// Rasterization. + /// Gets or sets the status for Rasterization. /// public string Rasterization { get; set; } /// - /// Video Decode. + /// Gets or sets the status for Video Decode. /// [JsonPropertyName("video_decode")] public string VideoDecode { get; set; } /// - /// Video Encode. + /// Gets or sets the status for Video Encode. /// [JsonPropertyName("video_encode")] public string VideoEncode { get; set; } /// - /// VPx Video Decode. + /// Gets or sets the status for VPx Video Decode. /// [JsonPropertyName("vpx_decode")] public string VpxDecode { get; set; } /// - /// WebGL. + /// Gets or sets the status for WebGL. /// public string Webgl { get; set; } /// - /// WebGL2. + /// Gets or sets the status for WebGL2. /// public string Webgl2 { get; set; } } diff --git a/src/ElectronNET.API/API/Entities/IPostData.cs b/src/ElectronNET.API/API/Entities/IPostData.cs index a8c9612e..8c5d2c9d 100644 --- a/src/ElectronNET.API/API/Entities/IPostData.cs +++ b/src/ElectronNET.API/API/Entities/IPostData.cs @@ -1,15 +1,17 @@ namespace ElectronNET.API.Entities { /// - /// Interface to use Electrons PostData Object + /// Represents a postData item for loadURL/webContents.loadURL options. + /// Valid types per Electron docs: 'rawData' and 'file'. /// + /// Up-to-date with Electron API 39.2 public interface IPostData { /// /// One of the following: - /// rawData - The data is available as a Buffer, in the rawData field. - /// file - The object represents a file. The filePath, offset, length and modificationTime fields will be used to describe the file. - /// blob - The object represents a Blob. The blobUUID field will be used to describe the Blob. + /// rawData - . + /// file - . + /// Based on Electron postData definitions. /// public string Type { get; } } diff --git a/src/ElectronNET.API/API/Entities/ImportCertificateOptions.cs b/src/ElectronNET.API/API/Entities/ImportCertificateOptions.cs index 3a93dc68..cabb91e0 100644 --- a/src/ElectronNET.API/API/Entities/ImportCertificateOptions.cs +++ b/src/ElectronNET.API/API/Entities/ImportCertificateOptions.cs @@ -1,8 +1,12 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Options for app.importCertificate(options) on Linux. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("linux")] public class ImportCertificateOptions { /// diff --git a/src/ElectronNET.API/API/Entities/InputEvent.cs b/src/ElectronNET.API/API/Entities/InputEvent.cs index 8c0cb632..a39a50a3 100644 --- a/src/ElectronNET.API/API/Entities/InputEvent.cs +++ b/src/ElectronNET.API/API/Entities/InputEvent.cs @@ -6,8 +6,10 @@ namespace ElectronNET.API.Entities using System.Text.Json.Serialization; /// - /// + /// Input event payload as used by webContents 'input-event' and 'before-input-event'. + /// Fields map to KeyboardEvent properties where noted, and type/modifiers follow Electron's InputEvent structure. /// + /// Up-to-date with Electron API 39.2 public class InputEvent { /// @@ -57,15 +59,95 @@ public class InputEvent /// /// An array of modifiers of the event, can be `shift`, `control`, `ctrl`, `alt`, - /// `meta`, `command`, `cmd`, `isKeypad`, `isAutoRepeat`, `leftButtonDown`, - /// `middleButtonDown`, `rightButtonDown`, `capsLock`, `numLock`, `left`, `right` + /// `meta`, `command`, `cmd`, `iskeypad`, `isautorepeat`, `leftbuttondown`, + /// `middlebuttondown`, `rightbuttondown`, `capslock`, `numlock`, `left`, `right`. /// [JsonConverter(typeof(ModifierTypeListConverter))] public List Modifiers { get; set; } + /// + /// For MouseInputEvent: The x-coordinate of the event (Integer). + /// + public int? X { get; set; } + + /// + /// For MouseInputEvent: The y-coordinate of the event (Integer). + /// + public int? Y { get; set; } + + /// + /// For MouseInputEvent: The button pressed, can be 'left', 'middle', or 'right' (optional). + /// + public string Button { get; set; } + + /// + /// For MouseInputEvent: Global x in screen coordinates (Integer, optional). + /// + public int? GlobalX { get; set; } + + /// + /// For MouseInputEvent: Global y in screen coordinates (Integer, optional). + /// + public int? GlobalY { get; set; } + + /// + /// For MouseInputEvent: Movement delta on x-axis since last event (Integer, optional). + /// + public int? MovementX { get; set; } + + /// + /// For MouseInputEvent: Movement delta on y-axis since last event (Integer, optional). + /// + public int? MovementY { get; set; } + + /// + /// For MouseInputEvent: Click count (Integer, optional). + /// + public int? ClickCount { get; set; } + + /// + /// For MouseWheelInputEvent: Horizontal scroll delta (Integer, optional). + /// + public int? DeltaX { get; set; } + + /// + /// For MouseWheelInputEvent: Vertical scroll delta (Integer, optional). + /// + public int? DeltaY { get; set; } + + /// + /// For MouseWheelInputEvent: Horizontal wheel ticks (Integer, optional). + /// + public int? WheelTicksX { get; set; } + + /// + /// For MouseWheelInputEvent: Vertical wheel ticks (Integer, optional). + /// + public int? WheelTicksY { get; set; } + + /// + /// For MouseWheelInputEvent: Horizontal acceleration ratio (Integer, optional). + /// + public int? AccelerationRatioX { get; set; } + + /// + /// For MouseWheelInputEvent: Vertical acceleration ratio (Integer, optional). + /// + public int? AccelerationRatioY { get; set; } + + /// + /// For MouseWheelInputEvent: True if wheel deltas are precise (optional). + /// + public bool? HasPreciseScrollingDeltas { get; set; } + + /// + /// For MouseWheelInputEvent: True if the target can scroll (optional). + /// + public bool? CanScroll { get; set; } + /// /// Can be `undefined`, `mouseDown`, `mouseUp`, `mouseMove`, `mouseEnter`, - /// `mouseLeave`, `contextMenu`, `mouseWheel`, `rawKeyDown`, `keyDown`, `keyUp`, + /// `mouseLeave`, `contextMenu`, `mouseWheel`, `rawKeyDown`, `keyDown`, `keyUp`, `char`, /// `gestureScrollBegin`, `gestureScrollEnd`, `gestureScrollUpdate`, /// `gestureFlingStart`, `gestureFlingCancel`, `gesturePinchBegin`, /// `gesturePinchEnd`, `gesturePinchUpdate`, `gestureTapDown`, `gestureShowPress`, @@ -77,6 +159,4 @@ public class InputEvent /// public InputEventType Type { get; set; } } -} - - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/InputEventType.cs b/src/ElectronNET.API/API/Entities/InputEventType.cs index a64f11d6..6df172b9 100644 --- a/src/ElectronNET.API/API/Entities/InputEventType.cs +++ b/src/ElectronNET.API/API/Entities/InputEventType.cs @@ -60,6 +60,11 @@ public enum InputEventType /// keyUp, + /// + /// + /// + @char, + /// /// /// diff --git a/src/ElectronNET.API/API/Entities/JumpListCategory.cs b/src/ElectronNET.API/API/Entities/JumpListCategory.cs index 9c99d8ff..df01ee99 100644 --- a/src/ElectronNET.API/API/Entities/JumpListCategory.cs +++ b/src/ElectronNET.API/API/Entities/JumpListCategory.cs @@ -1,27 +1,29 @@ - using System.Text.Json.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// - /// + /// Jump List category definition used with app.setJumpList(categories). + /// Matches Electron's JumpListCategory structure. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("windows")] public class JumpListCategory { /// - /// Must be set if type is custom, otherwise it should be omitted. + /// Gets or sets the name; must be set if type is custom, otherwise it should be omitted. /// public string Name { get; set; } /// - /// Array of objects if type is tasks or custom, otherwise it should be omitted. + /// Gets or sets the array of objects if type is tasks or custom; otherwise it should be omitted. /// public JumpListItem[] Items { get; set; } /// - /// One of the following: "tasks" | "frequent" | "recent" | "custom" + /// Gets or sets the category type. One of: tasks | frequent | recent | custom. /// public JumpListCategoryType Type { get; set; } } -} - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/JumpListCategoryType.cs b/src/ElectronNET.API/API/Entities/JumpListCategoryType.cs index 56a18ddf..4211e4ec 100644 --- a/src/ElectronNET.API/API/Entities/JumpListCategoryType.cs +++ b/src/ElectronNET.API/API/Entities/JumpListCategoryType.cs @@ -1,8 +1,12 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Jump list category kinds for app.setJumpList (Windows). /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("Windows")] public enum JumpListCategoryType { /// diff --git a/src/ElectronNET.API/API/Entities/JumpListItem.cs b/src/ElectronNET.API/API/Entities/JumpListItem.cs index b2e41df2..6ff55c7e 100644 --- a/src/ElectronNET.API/API/Entities/JumpListItem.cs +++ b/src/ElectronNET.API/API/Entities/JumpListItem.cs @@ -1,59 +1,65 @@ - using System.Text.Json.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// - /// + /// Jump List item used in app.setJumpList(categories) on Windows. + /// Matches Electron's JumpListItem structure. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("windows")] public class JumpListItem { /// - /// The command line arguments when program is executed. Should only be set if type is task. + /// Gets or sets the command line arguments when program is executed. Should only be set if type is task. /// public string Args { get; set; } /// - /// Description of the task (displayed in a tooltip). Should only be set if type is task. + /// Gets or sets the description of the task (displayed in a tooltip). Should only be set if type is task. Maximum length 260 characters. /// public string Description { get; set; } /// - /// The index of the icon in the resource file. If a resource file contains multiple + /// Gets or sets the index of the icon in the resource file. If a resource file contains multiple /// icons this value can be used to specify the zero-based index of the icon that - /// should be displayed for this task.If a resource file contains only one icon, + /// should be displayed for this task. If a resource file contains only one icon, /// this property should be set to zero. /// public int IconIndex { get; set; } /// - /// The absolute path to an icon to be displayed in a Jump List, which can be an + /// Gets or sets the absolute path to an icon to be displayed in a Jump List, which can be an /// arbitrary resource file that contains an icon(e.g. .ico, .exe, .dll). You can /// usually specify process.execPath to show the program icon. /// public string IconPath { get; set; } /// - /// Path of the file to open, should only be set if type is file. + /// Gets or sets the path of the file to open; should only be set if type is file. /// public string Path { get; set; } /// - /// Path of the program to execute, usually you should specify process.execPath - /// which opens the current program.Should only be set if type is task. + /// Gets or sets the path of the program to execute, usually specify process.execPath + /// which opens the current program. Should only be set if type is task. /// public string Program { get; set; } /// - /// The text to be displayed for the item in the Jump List. Should only be set if type is task. + /// Gets or sets the text to be displayed for the item in the Jump List. Should only be set if type is task. /// public string Title { get; set; } /// - /// One of the following: "task" | "separator" | "file" + /// Gets or sets the item type. One of: task | separator | file. /// public JumpListItemType Type { get; set; } - } -} - + /// + /// Gets or sets the working directory. Default is empty. + /// + public string WorkingDirectory { get; set; } + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/JumpListItemType.cs b/src/ElectronNET.API/API/Entities/JumpListItemType.cs index 6bc23828..0b055c0a 100644 --- a/src/ElectronNET.API/API/Entities/JumpListItemType.cs +++ b/src/ElectronNET.API/API/Entities/JumpListItemType.cs @@ -1,8 +1,12 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Jump list item kinds for app.setJumpList (Windows). /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("Windows")] public enum JumpListItemType { /// diff --git a/src/ElectronNET.API/API/Entities/JumpListSettings.cs b/src/ElectronNET.API/API/Entities/JumpListSettings.cs index 82184ed1..e340be24 100644 --- a/src/ElectronNET.API/API/Entities/JumpListSettings.cs +++ b/src/ElectronNET.API/API/Entities/JumpListSettings.cs @@ -1,20 +1,24 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Settings returned by app.getJumpListSettings() on Windows. + /// Matches Electron's JumpListSettings object. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("windows")] public class JumpListSettings { /// - /// The minimum number of items that will be shown in the Jump List (for a more detailed description of this value see the - /// MSDN docs). + /// The minimum number of items that will be shown in the Jump List. /// public int MinItems { get; set; } = 0; /// /// Array of JumpListItem objects that correspond to items that the user has explicitly removed from custom categories - /// in the Jump List. These items must not be re-added to the Jump List in the next call to , Windows will - /// not display any custom category that contains any of the removed items. + /// in the Jump List. These items must not be re-added to the Jump List in the next call to app.setJumpList(categories); + /// Windows will not display any custom category that contains any of the removed items. /// public JumpListItem[] RemovedItems { get; set; } = new JumpListItem[0]; } diff --git a/src/ElectronNET.API/API/Entities/LoadURLOptions.cs b/src/ElectronNET.API/API/Entities/LoadURLOptions.cs index f4e14781..e03c6ccb 100644 --- a/src/ElectronNET.API/API/Entities/LoadURLOptions.cs +++ b/src/ElectronNET.API/API/Entities/LoadURLOptions.cs @@ -1,12 +1,14 @@ namespace ElectronNET.API.Entities { /// - /// + /// Options for BrowserWindow.loadURL(url, options) / webContents.loadURL(url, options). + /// Matches Electron's loadURL options. /// + /// Up-to-date with Electron API 39.2 public class LoadURLOptions { /// - /// A HTTP Referrer url. + /// An HTTP Referrer URL. In Electron this may be a string or a Referrer object. /// public string HttpReferrer { get; set; } @@ -16,20 +18,18 @@ public class LoadURLOptions public string UserAgent { get; set; } /// - /// Base url (with trailing path separator) for files to be loaded by the data url. - /// This is needed only if the specified url is a data url and needs to load other - /// files. + /// Base URL (with trailing path separator) for files to be loaded by the data URL. + /// Needed only if the specified URL is a data URL and needs to load other files. /// public string BaseURLForDataURL { get; set; } /// - /// Extra headers for the request. + /// Extra headers separated by "\n". /// public string ExtraHeaders { get; set; } /// - /// PostData Object for the request. - /// Can be , or + /// Post data for the request. Matches Electron's postData: (UploadRawData | UploadFile)[] /// public IPostData[] PostData { get; set; } } diff --git a/src/ElectronNET.API/API/Entities/LoginItemLaunchItem.cs b/src/ElectronNET.API/API/Entities/LoginItemLaunchItem.cs new file mode 100644 index 00000000..1ad9660e --- /dev/null +++ b/src/ElectronNET.API/API/Entities/LoginItemLaunchItem.cs @@ -0,0 +1,37 @@ +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities +{ + /// + /// Windows launch entry as returned by app.getLoginItemSettings().launchItems. + /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("windows")] + public class LoginItemLaunchItem + { + /// + /// Name value of a registry entry. + /// + public string Name { get; set; } + + /// + /// The executable to an app that corresponds to a registry entry. + /// + public string Path { get; set; } + + /// + /// The command-line arguments to pass to the executable. + /// + public string[] Args { get; set; } + + /// + /// One of user or machine. Indicates whether the registry entry is under HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE. + /// + public string Scope { get; set; } + + /// + /// True if the app registry key is startup approved and therefore shows as enabled in Task Manager and Windows settings. + /// + public bool Enabled { get; set; } + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/LoginItemSettings.cs b/src/ElectronNET.API/API/Entities/LoginItemSettings.cs index a744a624..037d3d72 100644 --- a/src/ElectronNET.API/API/Entities/LoginItemSettings.cs +++ b/src/ElectronNET.API/API/Entities/LoginItemSettings.cs @@ -1,8 +1,11 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Return object for app.getLoginItemSettings() on macOS and Windows. /// + /// Up-to-date with Electron API 39.2 public class LoginItemSettings { /// @@ -11,29 +14,52 @@ public class LoginItemSettings public bool OpenAtLogin { get; set; } /// - /// if the app is set to open as hidden at login. This setting is not available + /// if the app is set to open as hidden at login. Deprecated on macOS 13 and up; not available /// on MAS builds. /// + [SupportedOSPlatform("macos")] public bool OpenAsHidden { get; set; } /// /// if the app was opened at login automatically. This setting is not available /// on MAS builds. /// + [SupportedOSPlatform("macos")] public bool WasOpenedAtLogin { get; set; } /// /// if the app was opened as a hidden login item. This indicates that the app should not - /// open any windows at startup. This setting is not available on + /// open any windows at startup. Deprecated on macOS 13 and up; not available on /// MAS builds. /// + [SupportedOSPlatform("macos")] public bool WasOpenedAsHidden { get; set; } /// /// if the app was opened as a login item that should restore the state from the previous /// session. This indicates that the app should restore the windows that were open the last time the app was closed. - /// This setting is not available on MAS builds. + /// Deprecated on macOS 13 and up; not available on MAS builds. /// + [SupportedOSPlatform("macos")] public bool RestoreState { get; set; } + + /// + /// macOS status: one of not-registered, enabled, requires-approval, or not-found. + /// + [SupportedOSPlatform("macos")] + public string Status { get; set; } + + /// + /// Windows: true if app is set to open at login and its run key is not deactivated. + /// Differs from OpenAtLogin as it ignores the args option; this is true if the given executable would be launched at login with any arguments. + /// + [SupportedOSPlatform("windows")] + public bool ExecutableWillLaunchAtLogin { get; set; } + + /// + /// Windows launch entries found in registry. + /// + [SupportedOSPlatform("windows")] + public LoginItemLaunchItem[] LaunchItems { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/LoginItemSettingsOptions.cs b/src/ElectronNET.API/API/Entities/LoginItemSettingsOptions.cs index bd23d453..85e408f2 100644 --- a/src/ElectronNET.API/API/Entities/LoginItemSettingsOptions.cs +++ b/src/ElectronNET.API/API/Entities/LoginItemSettingsOptions.cs @@ -1,4 +1,6 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// /// @@ -8,11 +10,25 @@ public class LoginItemSettingsOptions /// /// The executable path to compare against. Defaults to process.execPath. /// + [SupportedOSPlatform("windows")] public string Path { get; set; } /// /// The command-line arguments to compare against. Defaults to an empty array. /// + [SupportedOSPlatform("windows")] public string[] Args { get; set; } + + /// + /// The type of service to query on macOS 13+. Defaults to 'mainAppService'. Only available on macOS 13 and up. + /// + [SupportedOSPlatform("macos")] + public string Type { get; set; } + + /// + /// The name of the service. Required if type is non-default. Only available on macOS 13 and up. + /// + [SupportedOSPlatform("macos")] + public string ServiceName { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/LoginSettings.cs b/src/ElectronNET.API/API/Entities/LoginSettings.cs index 994a9941..05ba0209 100644 --- a/src/ElectronNET.API/API/Entities/LoginSettings.cs +++ b/src/ElectronNET.API/API/Entities/LoginSettings.cs @@ -1,8 +1,11 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Settings object for app.setLoginItemSettings() on macOS and Windows. /// + /// Up-to-date with Electron API 39.2 public class LoginSettings { /// @@ -14,19 +17,46 @@ public class LoginSettings /// /// to open the app as hidden. Defaults to . The user can edit this /// setting from the System Preferences so app.getLoginItemSettings().wasOpenedAsHidden should be checked when the app is - /// opened to know the current value. This setting is not available on MAS builds. + /// opened to know the current value. This setting is not available on MAS builds and does not work on macOS 13 and up. /// + [SupportedOSPlatform("macos")] public bool OpenAsHidden { get; set; } /// /// The executable to launch at login. Defaults to process.execPath. /// + [SupportedOSPlatform("windows")] public string Path { get; set; } /// /// The command-line arguments to pass to the executable. Defaults to an empty /// array.Take care to wrap paths in quotes. /// + [SupportedOSPlatform("windows")] public string[] Args { get; set; } + + /// + /// The type of service to add as a login item. Defaults to 'mainAppService'. Only available on macOS 13 and up. + /// + [SupportedOSPlatform("macos")] + public string Type { get; set; } + + /// + /// The name of the service. Required if Type is non-default. Only available on macOS 13 and up. + /// + [SupportedOSPlatform("macos")] + public string ServiceName { get; set; } + + /// + /// Change the startup approved registry key and enable/disable the app in Task Manager and Windows Settings. Defaults to true. + /// + [SupportedOSPlatform("windows")] + public bool Enabled { get; set; } = true; + + /// + /// Value name to write into registry. Defaults to the app's AppUserModelId(). + /// + [SupportedOSPlatform("windows")] + public string Name { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Margins.cs b/src/ElectronNET.API/API/Entities/Margins.cs index b99bb681..e6da4efb 100644 --- a/src/ElectronNET.API/API/Entities/Margins.cs +++ b/src/ElectronNET.API/API/Entities/Margins.cs @@ -1,33 +1,42 @@ namespace ElectronNET.API.Entities; /// -/// +/// Margins object used by webContents.print options and webContents.printToPDF. /// +/// Up-to-date with Electron API 39.2 public class Margins { /// - /// Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen, + /// Gets or sets the margin type. Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen, /// you will also need to specify `top`, `bottom`, `left`, and `right`. /// public string MarginType { get; set; } /// - /// The top margin of the printed web page, in pixels. + /// Gets or sets the top margin of the printed web page. Units depend on API: + /// - webContents.print: pixels + /// - webContents.printToPDF: inches /// - public int Top { get; set; } + public double Top { get; set; } /// - /// The bottom margin of the printed web page, in pixels. + /// Gets or sets the bottom margin of the printed web page. Units depend on API: + /// - webContents.print: pixels + /// - webContents.printToPDF: inches /// - public int Bottom { get; set; } + public double Bottom { get; set; } /// - /// The left margin of the printed web page, in pixels. + /// Gets or sets the left margin of the printed web page. Units depend on API: + /// - webContents.print: pixels + /// - webContents.printToPDF: inches /// - public int Left { get; set; } + public double Left { get; set; } /// - /// The right margin of the printed web page, in pixels. + /// Gets or sets the right margin of the printed web page. Units depend on API: + /// - webContents.print: pixels + /// - webContents.printToPDF: inches /// - public int Right { get; set; } + public double Right { get; set; } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/MemoryInfo.cs b/src/ElectronNET.API/API/Entities/MemoryInfo.cs index 840cb5d7..d8b11eb3 100644 --- a/src/ElectronNET.API/API/Entities/MemoryInfo.cs +++ b/src/ElectronNET.API/API/Entities/MemoryInfo.cs @@ -1,24 +1,28 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Process memory info as returned by process.getProcessMemoryInfo(). + /// Values are reported in Kilobytes. /// + /// Up-to-date with Electron API 39.2 public class MemoryInfo { /// - /// The amount of memory currently pinned to actual physical RAM. + /// Gets or sets the amount of memory currently pinned to actual physical RAM. /// public int WorkingSetSize { get; set; } /// - /// The maximum amount of memory that has ever been pinned to actual physical RAM. + /// Gets or sets the maximum amount of memory that has ever been pinned to actual physical RAM. /// public int PeakWorkingSetSize { get; set; } /// - /// The amount of memory not shared by other processes, such as JS heap or HTML - /// content. + /// Gets or sets the amount of memory not shared by other processes, such as JS heap or HTML content. Windows only. /// + [SupportedOSPlatform("windows")] public int PrivateBytes { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/MenuItem.cs b/src/ElectronNET.API/API/Entities/MenuItem.cs index 200b5cd4..13a6e195 100644 --- a/src/ElectronNET.API/API/Entities/MenuItem.cs +++ b/src/ElectronNET.API/API/Entities/MenuItem.cs @@ -1,28 +1,29 @@ using System; using System.Text.Json.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// /// /// + /// Up-to-date with Electron API 39.2 public class MenuItem { /// - /// Will be called with click(menuItem, browserWindow, event) when the menu item is + /// Will be called with click(menuItem, browserWindow, event) when the menu item is /// clicked. /// [JsonIgnore] public Action Click { get; set; } /// - /// Define the action of the menu item, when specified the click property will be - /// ignored. + /// Gets or sets the action (role) of the menu item. When specified, the click property will be ignored. /// public MenuRole Role { get; set; } /// - /// Can be normal, separator, submenu, checkbox or radio. + /// Gets or sets the menu item type. Can be normal, separator, submenu, checkbox, radio, header (macOS 14+), or palette (macOS 14+). /// public MenuType Type { get; set; } @@ -42,8 +43,15 @@ public class MenuItem /// /// The sublabel. /// + [SupportedOSPlatform("macos")] public string Sublabel { get; set; } + /// + /// Hover text for this menu item (macOS). + /// + [SupportedOSPlatform("macos")] + public string ToolTip { get; set; } + /// /// Gets or sets the accelerator. @@ -63,17 +71,31 @@ public class MenuItem public string Icon { get; set; } /// - /// If false, the menu item will be greyed out and unclickable. + /// Gets or sets a value indicating whether the item is enabled. If false, the menu item will be greyed out and unclickable. /// public bool Enabled { get; set; } = true; /// - /// If false, the menu item will be entirely hidden. + /// Gets or sets a value indicating whether the item is visible. If false, the menu item will be entirely hidden. /// public bool Visible { get; set; } = true; /// - /// Should only be specified for checkbox or radio type menu items. + /// Gets or sets a value indicating whether the accelerator should work when the item is hidden. Default is true (macOS). + /// When false, prevents the accelerator from triggering the item if the item is not visible. + /// + [SupportedOSPlatform("macos")] + public bool? AcceleratorWorksWhenHidden { get; set; } + + /// + /// Gets or sets a value indicating whether the accelerator should be registered with the system or only displayed (Linux/Windows). Defaults to true. + /// + [SupportedOSPlatform("windows")] + [SupportedOSPlatform("linux")] + public bool? RegisterAccelerator { get; set; } + + /// + /// Gets or sets a value indicating whether the item is checked. Should only be specified for checkbox or radio items. /// public bool Checked { get; set; } @@ -85,17 +107,44 @@ public class MenuItem public MenuItem[] Submenu { get; set; } /// - /// Unique within a single menu. If defined then it can be used as a reference to - /// this item by the position attribute. + /// The item to share when the role is shareMenu (macOS). + /// + [SupportedOSPlatform("macos")] + public SharingItem SharingItem { get; set; } + + /// + /// Gets or sets a unique id within a single menu. If defined then it can be used as a reference for placement. /// public string Id { get; internal set; } /// - /// This field allows fine-grained definition of the specific location within a - /// given menu. + /// This field allows fine-grained definition of the specific location within a given menu. /// public string Position { get; set; } - } -} + /// + /// Gets or sets a list of item ids. Inserts this item before the item(s) with the specified id(s). + /// If the referenced item doesn't exist the item will be inserted at the end of the menu. + /// Also implies that this item should be placed in the same group as the referenced item(s). + /// + public string[] Before { get; set; } + + /// + /// Gets or sets a list of item ids. Inserts this item after the item(s) with the specified id(s). + /// If the referenced item doesn't exist the item will be inserted at the end of the menu. + /// + public string[] After { get; set; } + + /// + /// Gets or sets a list of item ids. Places this item's containing group before the containing group + /// of the item(s) with the specified id(s). + /// + public string[] BeforeGroupContaining { get; set; } + /// + /// Gets or sets a list of item ids. Places this item's containing group after the containing group + /// of the item(s) with the specified id(s). + /// + public string[] AfterGroupContaining { get; set; } + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/MenuRole.cs b/src/ElectronNET.API/API/Entities/MenuRole.cs index 37f10090..e2eed341 100644 --- a/src/ElectronNET.API/API/Entities/MenuRole.cs +++ b/src/ElectronNET.API/API/Entities/MenuRole.cs @@ -31,14 +31,14 @@ public enum MenuRole paste, /// - /// The pasteandmatchstyle + /// The pasteAndMatchStyle /// - pasteandmatchstyle, + pasteAndMatchStyle, /// - /// The selectall + /// The selectAll /// - selectall, + selectAll, /// /// The delete @@ -68,12 +68,12 @@ public enum MenuRole /// /// Reload the current window ignoring the cache. /// - forcereload, + forceReload, /// /// Toggle developer tools in the current window /// - toggledevtools, + toggleDevTools, /// /// Toggle full screen mode on the current window @@ -83,17 +83,17 @@ public enum MenuRole /// /// Reset the focused page’s zoom level to the original size /// - resetzoom, + resetZoom, /// /// Zoom in the focused page by 10% /// - zoomin, + zoomIn, /// /// Zoom out the focused page by 10% /// - zoomout, + zoomOut, /// /// Whole default “Edit” menu (Undo, Copy, etc.) @@ -118,7 +118,7 @@ public enum MenuRole /// /// Only macOS: Map to the hideOtherApplications action /// - hideothers, + hideOthers, /// /// Only macOS: Map to the unhideAllApplications action @@ -128,12 +128,12 @@ public enum MenuRole /// /// Only macOS: Map to the startSpeaking action /// - startspeaking, + startSpeaking, /// /// Only macOS: Map to the stopSpeaking action /// - stopspeaking, + stopSpeaking, /// /// Only macOS: Map to the arrangeInFront action @@ -158,6 +158,108 @@ public enum MenuRole /// /// Only macOS: The submenu is a “Services” menu /// - services + services, + + /// + /// Toggle built-in spellchecker. + /// + toggleSpellChecker, + + /// + /// The submenu is a "File" menu. + /// + fileMenu, + + /// + /// The submenu is a "View" menu. + /// + viewMenu, + + /// + /// The application menu. + /// + appMenu, + + /// + /// The submenu is a "Share" menu. + /// + shareMenu, + + /// + /// Displays a list of files recently opened by the app. + /// + recentDocuments, + + /// + /// Clear the recent documents list. + /// + clearRecentDocuments, + + /// + /// Toggle the tab bar (macOS). + /// + toggleTabBar, + + /// + /// Select the next tab (macOS). + /// + selectNextTab, + + /// + /// Select the previous tab (macOS). + /// + selectPreviousTab, + + /// + /// Show all tabs (macOS). + /// + showAllTabs, + + /// + /// Merge all windows (macOS). + /// + mergeAllWindows, + + /// + /// Move the current tab to a new window (macOS). + /// + moveTabToNewWindow, + + /// + /// Show substitutions panel (macOS). + /// + showSubstitutions, + + /// + /// Toggle smart quotes (macOS). + /// + toggleSmartQuotes, + + /// + /// Toggle smart dashes (macOS). + /// + toggleSmartDashes, + + /// + /// Toggle text replacement (macOS). + /// + toggleTextReplacement, + + // Backwards-compatibility aliases (old identifiers) to avoid breaking existing code. + // These map to the same enum values as their official values. + pasteandmatchstyle = pasteAndMatchStyle, + selectall = selectAll, + forcereload = forceReload, + toggledevtools = toggleDevTools, + resetzoom = resetZoom, + zoomin = zoomIn, + zoomout = zoomOut, + hideothers = hideOthers, + startspeaking = startSpeaking, + stopspeaking = stopSpeaking, + togglespellchecker = toggleSpellChecker, + togglesmartquotes = toggleSmartQuotes, + togglesmartdashes = toggleSmartDashes, + toggletextreplacement = toggleTextReplacement } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/MenuType.cs b/src/ElectronNET.API/API/Entities/MenuType.cs index 9da110cd..86682818 100644 --- a/src/ElectronNET.API/API/Entities/MenuType.cs +++ b/src/ElectronNET.API/API/Entities/MenuType.cs @@ -1,33 +1,48 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Menu item types matching Electron's MenuItem.type values. /// + /// Up-to-date with Electron API 39.2 public enum MenuType { /// - /// The normal + /// Normal menu item. /// normal, /// - /// The separator + /// Separator between items. /// separator, /// - /// The submenu + /// Submenu container. /// submenu, /// - /// The checkbox + /// Checkbox item. /// checkbox, /// - /// The radio + /// Radio item. + /// + radio, + + /// + /// Header item (macOS 14+). + /// + [SupportedOSPlatform("macos")] + header, + + /// + /// Palette item (macOS 14+). /// - radio + [SupportedOSPlatform("macos")] + palette } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/MessageBoxOptions.cs b/src/ElectronNET.API/API/Entities/MessageBoxOptions.cs index 22284d66..09ce56a7 100644 --- a/src/ElectronNET.API/API/Entities/MessageBoxOptions.cs +++ b/src/ElectronNET.API/API/Entities/MessageBoxOptions.cs @@ -1,89 +1,82 @@ - using System.Text.Json.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// - /// + /// Options for dialog.showMessageBox / dialog.showMessageBoxSync. /// + /// Up-to-date with Electron API 39.2 public class MessageBoxOptions { /// - /// Can be "none", "info", "error", "question" or "warning". On Windows, "question" - /// displays the same icon as "info", unless you set an icon using the "icon" - /// option. On macOS, both "warning" and "error" display the same warning icon. + /// Gets or sets the type. Can be "none", "info", "error", "question" or "warning". On Windows, "question" displays the same icon as "info", unless you set an icon using the "icon" option. On macOS, both "warning" and "error" display the same warning icon. /// public MessageBoxType Type { get; set; } /// - /// Array of texts for buttons. On Windows, an empty array will result in one button - /// labeled "OK". + /// Gets or sets the array of texts for buttons. On Windows, an empty array will result in one button labeled "OK". /// public string[] Buttons { get; set; } /// - /// Index of the button in the buttons array which will be selected by default when - /// the message box opens. + /// Gets or sets the index of the button in the buttons array which will be selected by default when the message box opens. /// public int DefaultId { get; set; } /// - /// Title of the message box, some platforms will not show it. + /// Gets or sets the title of the message box; some platforms will not show it. /// public string Title { get; set; } /// - /// Content of the message box. + /// Gets or sets the content of the message box. /// public string Message { get; set; } /// - /// Extra information of the message. + /// Gets or sets the extra information of the message. /// public string Detail { get; set; } /// - /// If provided, the message box will include a checkbox with the given label. The - /// checkbox state can be inspected only when using callback. + /// Gets or sets the checkbox label. If provided, the message box will include a checkbox with the given label. /// public string CheckboxLabel { get; set; } /// - /// Initial checked state of the checkbox. false by default. + /// Gets or sets the initial checked state of the checkbox. Defaults to false. /// public bool CheckboxChecked { get; set; } /// - /// Gets or sets the icon. + /// Gets or sets the icon for the message box. /// - /// - /// The icon. - /// public string Icon { get; set; } /// - /// The index of the button to be used to cancel the dialog, via the Esc key. By - /// default this is assigned to the first button with "cancel" or "no" as the label. - /// If no such labeled buttons exist and this option is not set, 0 will be used as - /// the return value or callback response. This option is ignored on Windows. + /// Gets or sets the custom width of the text in the message box. + /// + [SupportedOSPlatform("macos")] + public int? TextWidth { get; set; } + + /// + /// Gets or sets the index of the button to be used to cancel the dialog via the Esc key. By default this is assigned to the first button with "cancel" or "no" as the label. If no such labeled buttons exist and this option is not set, 0 will be used. /// public int CancelId { get; set; } /// - /// On Windows Electron will try to figure out which one of the buttons are common - /// buttons(like "Cancel" or "Yes"), and show the others as command links in the - /// dialog.This can make the dialog appear in the style of modern Windows apps. If - /// you don't like this behavior, you can set noLink to true. + /// Gets or sets a value indicating whether to disable Windows command-links behavior (noLink). + /// On Windows Electron will try to figure out which one of the buttons are common buttons (like "Cancel" or "Yes"), and show the others as command links in the dialog. Set to true to disable this behavior. /// + [SupportedOSPlatform("windows")] public bool NoLink { get; set; } /// - /// Normalize the keyboard access keys across platforms. Default is false. Enabling - /// this assumes AND character is used in the button labels for the placement of the keyboard + /// Gets or sets a value indicating whether to normalize the keyboard access keys across platforms. Default is false. Enabling this assumes '&' is used in the button labels for the placement of the keyboard /// shortcut access key and labels will be converted so they work correctly on each - /// platform, AND characters are removed on macOS, converted to _ on Linux, and left - /// untouched on Windows.For example, a button label of VieANDw will be converted to - /// Vie_w on Linux and View on macOS and can be selected via Alt-W on Windows and + /// platform, '&' characters are removed on macOS, converted to '_' on Linux, and left + /// untouched on Windows. For example, a button label of "View" will be converted to "Vie_w" on Linux and "View" on macOS and can be selected via Alt-W on Windows and /// Linux. /// public bool NormalizeAccessKeys { get; set; } @@ -97,6 +90,4 @@ public MessageBoxOptions(string message) Message = message; } } -} - - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/MessageBoxResult.cs b/src/ElectronNET.API/API/Entities/MessageBoxResult.cs index 835c292c..dd44c24a 100644 --- a/src/ElectronNET.API/API/Entities/MessageBoxResult.cs +++ b/src/ElectronNET.API/API/Entities/MessageBoxResult.cs @@ -1,24 +1,19 @@ namespace ElectronNET.API.Entities { /// - /// + /// Result returned by dialog.showMessageBox / dialog.showMessageBoxSync. /// + /// Up-to-date with Electron API 39.2 public class MessageBoxResult { /// - /// Gets or sets the response. + /// The index of the clicked button. /// - /// - /// The response. - /// public int Response { get; set; } /// - /// Gets or sets a value indicating whether [checkbox checked]. + /// The checked state of the checkbox if CheckboxLabel was set; otherwise false. /// - /// - /// true if [checkbox checked]; otherwise, false. - /// public bool CheckboxChecked { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/MessageBoxType.cs b/src/ElectronNET.API/API/Entities/MessageBoxType.cs index 09fb3b0b..3490bad9 100644 --- a/src/ElectronNET.API/API/Entities/MessageBoxType.cs +++ b/src/ElectronNET.API/API/Entities/MessageBoxType.cs @@ -1,8 +1,9 @@ namespace ElectronNET.API.Entities { /// - /// + /// Message box type for dialog.showMessageBox/showMessageBoxSync. /// + /// Up-to-date with Electron API 39.2 public enum MessageBoxType { /// diff --git a/src/ElectronNET.API/API/Entities/ModifierType.cs b/src/ElectronNET.API/API/Entities/ModifierType.cs index d7b37458..664d40f5 100644 --- a/src/ElectronNET.API/API/Entities/ModifierType.cs +++ b/src/ElectronNET.API/API/Entities/ModifierType.cs @@ -1,8 +1,9 @@ namespace ElectronNET.API.Entities; /// -/// Specifies the possible modifier keys for a keyboard input. +/// Specifies the possible modifier keys for a keyboard input (maps to InputEvent.modifiers). /// +/// Up-to-date with Electron API 39.2 public enum ModifierType { /// diff --git a/src/ElectronNET.API/API/Entities/NativeImage.cs b/src/ElectronNET.API/API/Entities/NativeImage.cs index bf087919..e974d41a 100644 --- a/src/ElectronNET.API/API/Entities/NativeImage.cs +++ b/src/ElectronNET.API/API/Entities/NativeImage.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text.Json.Serialization; using System.Text.RegularExpressions; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { @@ -268,6 +269,12 @@ public bool IsEmpty() /// public bool IsTemplateImage => _isTemplateImage; + /// + /// Whether the image is considered a macOS template image. + /// + [SupportedOSPlatform("macos")] + public bool IsMacTemplateImage => _isTemplateImage; + /// /// Deprecated. Marks the image as a template image. /// diff --git a/src/ElectronNET.API/API/Entities/NativeImageJsonConverter.cs b/src/ElectronNET.API/API/Entities/NativeImageJsonConverter.cs index 00ac690c..140e6d1c 100644 --- a/src/ElectronNET.API/API/Entities/NativeImageJsonConverter.cs +++ b/src/ElectronNET.API/API/Entities/NativeImageJsonConverter.cs @@ -8,6 +8,7 @@ namespace ElectronNET.API.Entities { + /// Project-specific: JSON converter for NativeImage; no MCP structure equivalent. internal class NativeImageJsonConverter : JsonConverter { public override void Write(Utf8JsonWriter writer, NativeImage value, JsonSerializerOptions options) @@ -35,5 +36,4 @@ public override NativeImage Read(ref Utf8JsonReader reader, Type typeToConvert, return new NativeImage(newDictionary); } } -} - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/NotificationAction.cs b/src/ElectronNET.API/API/Entities/NotificationAction.cs index c7194cd0..71e681cf 100644 --- a/src/ElectronNET.API/API/Entities/NotificationAction.cs +++ b/src/ElectronNET.API/API/Entities/NotificationAction.cs @@ -1,17 +1,21 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// /// /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("macos")] public class NotificationAction { /// - /// The label for the given action. + /// Gets or sets the label for the action. /// public string Text { get; set; } /// - /// The type of action, can be button. + /// Gets or sets the type of action; can be 'button'. /// public string Type { get; set; } } diff --git a/src/ElectronNET.API/API/Entities/NotificationOptions.cs b/src/ElectronNET.API/API/Entities/NotificationOptions.cs index ce9fb680..cd17dfac 100644 --- a/src/ElectronNET.API/API/Entities/NotificationOptions.cs +++ b/src/ElectronNET.API/API/Entities/NotificationOptions.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.Versioning; using System.Text.Json.Serialization; namespace ElectronNET.API.Entities @@ -6,72 +7,85 @@ namespace ElectronNET.API.Entities /// /// /// + /// Up-to-date with Electron API 39.2 public class NotificationOptions { /// - /// A title for the notification, which will be shown at the top of the notification - /// window when it is shown. + /// Gets or sets the title for the notification, which will be shown at the top of the notification window when it is shown. /// public string Title { get; set; } /// - /// A subtitle for the notification, which will be displayed below the title. + /// Gets or sets the subtitle for the notification, which will be displayed below the title. /// - public string SubTitle { get; set; } + [SupportedOSPlatform("macos")] + [JsonPropertyName("subtitle")] + public string Subtitle { get; set; } /// - /// The body text of the notification, which will be displayed below the title or - /// subtitle. + /// Gets or sets the body text of the notification, which will be displayed below the title or subtitle. /// public string Body { get; set; } /// - /// Whether or not to emit an OS notification noise when showing the notification. + /// Gets or sets a value indicating whether to suppress the OS notification noise when showing the notification. /// public bool Silent { get; set; } /// - /// An icon to use in the notification. + /// Gets or sets an icon to use in the notification. Can be a string path or a NativeImage. If a string is passed, it must be a valid path to a local icon file. /// public string Icon { get; set; } /// - /// Whether or not to add an inline reply option to the notification. + /// Gets or sets a value indicating whether to add an inline reply option to the notification. /// + [SupportedOSPlatform("macos")] public bool HasReply { get; set; } /// - /// The timeout duration of the notification. Can be 'default' or 'never'. + /// Gets or sets the timeout duration of the notification. Can be 'default' or 'never'. /// + [SupportedOSPlatform("linux")] + [SupportedOSPlatform("windows")] public string TimeoutType { get; set; } /// - /// The placeholder to write in the inline reply input field. + /// Gets or sets the placeholder to write in the inline reply input field. /// + [SupportedOSPlatform("macos")] public string ReplyPlaceholder { get; set; } /// - /// The name of the sound file to play when the notification is shown. + /// Gets or sets the name of the sound file to play when the notification is shown. /// + [SupportedOSPlatform("macos")] public string Sound { get; set; } /// - /// The urgency level of the notification. Can be 'normal', 'critical', or 'low'. + /// Gets or sets the urgency level of the notification. Can be 'normal', 'critical', or 'low'. /// + [SupportedOSPlatform("linux")] public string Urgency { get; set; } /// - /// Actions to add to the notification. Please read the available actions and - /// limitations in the NotificationAction documentation. + /// Gets or sets the actions to add to the notification. Please read the available actions and limitations in the NotificationAction documentation. /// - public NotificationAction Actions { get; set; } + [SupportedOSPlatform("macos")] + public NotificationAction[] Actions { get; set; } /// - /// A custom title for the close button of an alert. An empty string will cause the - /// default localized text to be used. + /// Gets or sets a custom title for the close button of an alert. An empty string will cause the default localized text to be used. /// + [SupportedOSPlatform("macos")] public string CloseButtonText { get; set; } + /// + /// Gets or sets a custom description of the Notification on Windows superseding all properties above. Provides full customization of design and behavior of the notification. + /// + [SupportedOSPlatform("windows")] + public string ToastXml { get; set; } + /// /// Emitted when the notification is shown to the user, note this could be fired /// multiple times as a notification can be shown multiple times through the Show() @@ -127,6 +141,7 @@ public class NotificationOptions /// The string the user entered into the inline reply field /// [JsonIgnore] + [SupportedOSPlatform("macos")] public Action OnReply { get; set; } /// @@ -139,10 +154,11 @@ public class NotificationOptions internal string ReplyID { get; set; } /// - /// macOS only - The index of the action that was activated + /// macOS only - The index of the action that was activated. /// [JsonIgnore] - public Action OnAction { get; set; } + [SupportedOSPlatform("macos")] + public Action OnAction { get; set; } /// /// Gets or sets the action identifier. @@ -153,6 +169,14 @@ public class NotificationOptions [JsonInclude] internal string ActionID { get; set; } + /// + /// Windows only: Emitted when an error is encountered while creating and showing the native notification. + /// Corresponds to the 'failed' event on Notification. + /// + [JsonIgnore] + [SupportedOSPlatform("windows")] + public Action OnFailed { get; set; } + /// /// Initializes a new instance of the class. /// diff --git a/src/ElectronNET.API/API/Entities/OnDidFailLoadInfo.cs b/src/ElectronNET.API/API/Entities/OnDidFailLoadInfo.cs index a3f03176..d6fdcc3f 100644 --- a/src/ElectronNET.API/API/Entities/OnDidFailLoadInfo.cs +++ b/src/ElectronNET.API/API/Entities/OnDidFailLoadInfo.cs @@ -15,4 +15,24 @@ public class OnDidFailLoadInfo /// Validated URL. /// public string ValidatedUrl { get; set; } -} + + /// + /// Error description string. + /// + public string ErrorDescription { get; set; } + + /// + /// True if the event pertains to the main frame. + /// + public bool IsMainFrame { get; set; } + + /// + /// The process id for the frame. + /// + public int FrameProcessId { get; set; } + + /// + /// The routing id for the frame. + /// + public int FrameRoutingId { get; set; } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/OnDidNavigateInfo.cs b/src/ElectronNET.API/API/Entities/OnDidNavigateInfo.cs index 5f8ccb9f..6094ca51 100644 --- a/src/ElectronNET.API/API/Entities/OnDidNavigateInfo.cs +++ b/src/ElectronNET.API/API/Entities/OnDidNavigateInfo.cs @@ -1,17 +1,23 @@ namespace ElectronNET.API.Entities; /// -/// 'OnDidNavigate' event details. +/// 'did-navigate' event details for main frame navigation. /// +/// Up-to-date with Electron API 39.2 public class OnDidNavigateInfo { /// - /// Navigated URL. + /// The URL navigated to. /// public string Url { get; set; } /// - /// HTTP response code. + /// HTTP response code (-1 for non-HTTP navigations). /// public int HttpResponseCode { get; set; } -} + + /// + /// HTTP status text (empty for non-HTTP navigations). + /// + public string HttpStatusText { get; set; } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/OnTopLevel.cs b/src/ElectronNET.API/API/Entities/OnTopLevel.cs index f2a125c3..0165f53b 100644 --- a/src/ElectronNET.API/API/Entities/OnTopLevel.cs +++ b/src/ElectronNET.API/API/Entities/OnTopLevel.cs @@ -1,10 +1,14 @@ using System.ComponentModel; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// - /// + /// String values for the 'level' parameter of BrowserWindow.setAlwaysOnTop. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public enum OnTopLevel { /// diff --git a/src/ElectronNET.API/API/Entities/OpenDevToolsOptions.cs b/src/ElectronNET.API/API/Entities/OpenDevToolsOptions.cs index d280579b..6bea1d80 100644 --- a/src/ElectronNET.API/API/Entities/OpenDevToolsOptions.cs +++ b/src/ElectronNET.API/API/Entities/OpenDevToolsOptions.cs @@ -1,4 +1,3 @@ - using System.Text.Json.Serialization; namespace ElectronNET.API.Entities @@ -9,11 +8,19 @@ namespace ElectronNET.API.Entities public class OpenDevToolsOptions { /// - /// Opens the devtools with specified dock state, can be right, bottom, undocked, - /// detach.Defaults to last used dock state.In undocked mode it's possible to dock - /// back.In detach mode it's not. + /// Opens the DevTools with specified dock state. Can be left, right, bottom, undocked, or detach. + /// Defaults to the last used dock state. In undocked mode it's possible to dock back; in detach mode it's not. /// public DevToolsMode Mode { get; set; } - } -} + /// + /// Whether to bring the opened DevTools window to the foreground. Default is true. + /// + public bool Activate { get; set; } = true; + + /// + /// A title for the DevTools window (only visible in undocked or detach mode). + /// + public string Title { get; set; } + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/OpenDialogOptions.cs b/src/ElectronNET.API/API/Entities/OpenDialogOptions.cs index f6c58198..1e6899ce 100644 --- a/src/ElectronNET.API/API/Entities/OpenDialogOptions.cs +++ b/src/ElectronNET.API/API/Entities/OpenDialogOptions.cs @@ -1,11 +1,13 @@ - using System.Text.Json.Serialization; namespace ElectronNET.API.Entities { + using System.Runtime.Versioning; + /// /// /// + /// Up-to-date with Electron API 39.2 public class OpenDialogOptions { /// @@ -30,18 +32,19 @@ public class OpenDialogOptions public string ButtonLabel { get; set; } /// - /// Contains which features the dialog should use. The following values are supported: + /// Gets or sets which features the dialog should use. The following values are supported: /// 'openFile' | 'openDirectory' | 'multiSelections' | 'showHiddenFiles' | 'createDirectory' | 'promptToCreate' | 'noResolveAliases' | 'treatPackageAsDirectory' /// public OpenDialogProperty[] Properties { get; set; } /// - /// Message to display above input boxes. + /// Gets or sets the message to display above input boxes. /// + [SupportedOSPlatform("macos")] public string Message { get; set; } /// - /// The filters specifies an array of file types that can be displayed or + /// Gets or sets the filters specifying an array of file types that can be displayed or /// selected when you want to limit the user to a specific type. For example: /// /// @@ -56,6 +59,11 @@ public class OpenDialogOptions /// /// public FileFilter[] Filters { get; set; } - } -} + /// + /// Create security scoped bookmarks when packaged for the Mac App Store. + /// + [SupportedOSPlatform("macos")] + public bool SecurityScopedBookmarks { get; set; } + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/OpenDialogProperty.cs b/src/ElectronNET.API/API/Entities/OpenDialogProperty.cs index 44a16b15..42ecd037 100644 --- a/src/ElectronNET.API/API/Entities/OpenDialogProperty.cs +++ b/src/ElectronNET.API/API/Entities/OpenDialogProperty.cs @@ -1,5 +1,7 @@ namespace ElectronNET.API.Entities { + using System.Runtime.Versioning; + /// /// /// @@ -28,21 +30,31 @@ public enum OpenDialogProperty /// /// The create directory /// + [SupportedOSPlatform("macos")] createDirectory, /// /// The prompt to create /// + [SupportedOSPlatform("windows")] promptToCreate, /// /// The no resolve aliases /// + [SupportedOSPlatform("macos")] noResolveAliases, /// /// The treat package as directory /// - treatPackageAsDirectory + [SupportedOSPlatform("macos")] + treatPackageAsDirectory, + + /// + /// Do not add the item being opened to the recent documents list (Windows). + /// + [SupportedOSPlatform("windows")] + dontAddToRecent } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/OpenExternalOptions.cs b/src/ElectronNET.API/API/Entities/OpenExternalOptions.cs index f648cd19..1d3f3f5b 100644 --- a/src/ElectronNET.API/API/Entities/OpenExternalOptions.cs +++ b/src/ElectronNET.API/API/Entities/OpenExternalOptions.cs @@ -1,21 +1,32 @@ using System.ComponentModel; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// /// Controls the behavior of OpenExternal. /// + /// Up-to-date with Electron API 39.2 public class OpenExternalOptions { /// - /// to bring the opened application to the foreground. The default is . + /// Gets or sets whether to bring the opened application to the foreground. The default is . /// + [SupportedOSPlatform("macos")] [DefaultValue(true)] public bool Activate { get; set; } = true; /// - /// The working directory. + /// Gets or sets the working directory. /// + [SupportedOSPlatform("windows")] public string WorkingDirectory { get; set; } + + /// + /// Gets or sets a value indicating a user-initiated launch that enables tracking of frequently used programs and other behaviors. The default is . + /// + [SupportedOSPlatform("windows")] + [DefaultValue(false)] + public bool LogUsage { get; set; } = false; } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/PageSize.cs b/src/ElectronNET.API/API/Entities/PageSize.cs index 607a59c3..4b83e15e 100644 --- a/src/ElectronNET.API/API/Entities/PageSize.cs +++ b/src/ElectronNET.API/API/Entities/PageSize.cs @@ -4,17 +4,35 @@ public class PageSize { private readonly string _value; + /// + /// Represents the page size for printing/PDF. + /// Matches Electron semantics: either a named size (e.g. 'A4', 'Letter', 'Legal', 'Tabloid', 'Ledger', etc.) + /// or a custom size specified by Height and Width in inches. + /// + /// Up-to-date with Electron API 39.2 public PageSize() { } private PageSize(string value) : this() => _value = value; + /// + /// Gets or sets the custom page height in inches (when using object form instead of a named size). + /// public double Height { get; set; } + /// + /// Gets or sets the custom page width in inches (when using object form instead of a named size). + /// public double Width { get; set; } + /// + /// Implicit conversion to string to represent named page sizes (e.g. 'A4', 'Letter'). + /// public static implicit operator string(PageSize pageSize) => pageSize?._value; + /// + /// Implicit conversion from string to represent named page sizes (e.g. 'A4', 'Letter'). + /// public static implicit operator PageSize(string value) => new(value); -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/PathName.cs b/src/ElectronNET.API/API/Entities/PathName.cs index e9500c21..6fe8ab89 100644 --- a/src/ElectronNET.API/API/Entities/PathName.cs +++ b/src/ElectronNET.API/API/Entities/PathName.cs @@ -1,95 +1,102 @@ using System.ComponentModel; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// - /// Defines the PathName enumeration. + /// Names for app.getPath(name). Aligned with Electron docs. /// + /// Up-to-date with Electron API 39.2 public enum PathName { /// - /// User’s home directory. + /// User's home directory. /// - [Description("home")] Home, /// /// Per-user application data directory. /// - [Description("appData")] AppData, /// - /// The directory for storing your app’s configuration files, - /// which by default it is the appData directory appended with your app’s name. + /// The directory for storing your app's configuration files, which by default is the appData directory appended with your app's name. /// - [Description("userData")] UserData, + /// + /// The directory for storing data generated by Session, such as localStorage, cookies, disk cache, downloaded dictionaries, network state, devtools files. + /// By default this points to userData. + /// + SessionData, + /// /// Temporary directory. /// - [Description("temp")] Temp, /// /// The current executable file. /// - [Description("exe")] Exe, /// - /// The libchromiumcontent library. + /// The location of the Chromium module. By default this is synonymous with exe. /// - [Description("Module")] Module, /// - /// The current user’s Desktop directory. + /// The current user's Desktop directory. /// - [Description("desktop")] Desktop, /// - /// Directory for a user’s “My Documents”. + /// Directory for a user's "My Documents". /// - [Description("documents")] Documents, /// - /// Directory for a user’s downloads. + /// Directory for a user's downloads. /// - [Description("downloads")] Downloads, /// - /// Directory for a user’s music. + /// Directory for a user's music. /// - [Description("music")] Music, /// - /// Directory for a user’s pictures. + /// Directory for a user's pictures. /// - [Description("pictures")] Pictures, /// - /// Directory for a user’s videos. + /// Directory for a user's videos. /// - [Description("videos")] Videos, /// - /// The logs. + /// Directory for the user's recent files. Windows only. + /// + [SupportedOSPlatform("windows")] + Recent, + + /// + /// Directory for your app's log folder. /// - [Description("logs")] Logs, /// - /// Full path to the system version of the Pepper Flash plugin. + /// Directory where crash dumps are stored. + /// + CrashDumps, + + /// + /// The directory where app assets such as resources.pak are stored. + /// Available on Windows and Linux only. /// - [Description("PepperFlashSystemPlugin")] - PepperFlashSystemPlugin + [SupportedOSPlatform("windows")] + [SupportedOSPlatform("linux")] + Assets } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Point.cs b/src/ElectronNET.API/API/Entities/Point.cs index 9b3bed8a..c88f6db4 100644 --- a/src/ElectronNET.API/API/Entities/Point.cs +++ b/src/ElectronNET.API/API/Entities/Point.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class Point { /// diff --git a/src/ElectronNET.API/API/Entities/PrintOptions.cs b/src/ElectronNET.API/API/Entities/PrintOptions.cs index bb3f6188..d0070ffb 100644 --- a/src/ElectronNET.API/API/Entities/PrintOptions.cs +++ b/src/ElectronNET.API/API/Entities/PrintOptions.cs @@ -3,15 +3,16 @@ namespace ElectronNET.API.Entities /// /// Print dpi /// + /// Up-to-date with Electron API 39.2 public class PrintDpi { /// - /// The horizontal dpi + /// Gets or sets the horizontal DPI. /// public float Horizontal { get; set; } /// - /// The vertical dpi + /// Gets or sets the vertical DPI. /// public float Vertical { get; set; } } @@ -19,15 +20,16 @@ public class PrintDpi /// /// The page range to print /// + /// Up-to-date with Electron API 39.2 public class PrintPageRange { /// - /// From + /// Gets or sets the starting page index (0-based). /// public int From { get; set; } /// - /// To + /// Gets or sets the ending page index (inclusive, 0-based). /// public int To { get; set; } } @@ -35,72 +37,89 @@ public class PrintPageRange /// /// Print options /// + /// Up-to-date with Electron API 39.2 public class PrintOptions { /// - /// Don't ask user for print settings + /// Gets or sets a value indicating whether to suppress print settings prompts. /// public bool Silent { get; set; } /// - /// Prints the background color and image of the web page + /// Gets or sets a value indicating whether to print background graphics. /// public bool PrintBackground { get; set; } /// - /// Set the printer device name to use + /// Gets or sets the printer device name to use. /// public string DeviceName { get; set; } /// - /// Set whether the printed web page will be in color or grayscale + /// Gets or sets a value indicating whether the page will be printed in color. /// public bool Color { get; set; } /// - /// Specifies the type of margins to use. Uses 0 for default margin, 1 for no - /// margin, and 2 for minimum margin. + /// Gets or sets the margins for the print job. Use MarginType plus top/bottom/left/right for custom. + /// Units for margins with webContents.print are pixels (per MCP); for webContents.printToPDF, inches. /// - public int MarginsType { get; set; } + public Margins Margins { get; set; } /// - /// true for landscape, false for portrait. + /// Gets or sets a value indicating whether to print in landscape orientation. /// public bool Landscape { get; set; } /// - /// The scale factor of the web page + /// Gets or sets the scale factor of the web page. /// public float ScaleFactor { get; set; } /// - /// The number of pages to print per page sheet + /// Gets or sets the number of pages to print per sheet. /// public int PagesPerSheet { get; set; } /// - /// The number of copies of the web page to print + /// Gets or sets the number of copies to print. /// - public bool Copies { get; set; } + public int Copies { get; set; } /// - /// Whether the web page should be collated + /// Gets or sets a value indicating whether pages should be collated. /// public bool Collate { get; set; } /// - /// The page range to print + /// Gets or sets the page range(s) to print. On macOS, only one range is honored. /// - public PrintPageRange PageRanges { get; set; } + public PrintPageRange[] PageRanges { get; set; } /// - /// Set the duplex mode of the printed web page. Can be simplex, shortEdge, or longEdge. + /// Gets or sets the duplex mode of the printed web page. Can be simplex, shortEdge, or longEdge. /// public string DuplexMode { get; set; } /// - /// Dpi + /// Gets or sets the DPI settings for the print job. /// public PrintDpi Dpi { get; set; } + + /// + /// Gets or sets the string to be printed as page header. + /// + public string Header { get; set; } + + /// + /// Gets or sets the string to be printed as page footer. + /// + public string Footer { get; set; } + + /// + /// Gets or sets the page size of the printed document. Can be A0–A6, Legal, Letter, Tabloid, + /// or an object. For webContents.print, custom sizes use microns (Chromium validates width_microns/height_microns). + /// + public PageSize PageSize { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/PrintToPDFOptions.cs b/src/ElectronNET.API/API/Entities/PrintToPDFOptions.cs index 714bca0b..1200274b 100644 --- a/src/ElectronNET.API/API/Entities/PrintToPDFOptions.cs +++ b/src/ElectronNET.API/API/Entities/PrintToPDFOptions.cs @@ -6,30 +6,31 @@ namespace ElectronNET.API.Entities; /// /// /// +/// Up-to-date with Electron API 39.2 public class PrintToPDFOptions { /// - /// Paper orientation. `true` for landscape, `false` for portrait. Defaults to false. + /// Gets or sets the paper orientation. `true` for landscape, `false` for portrait. Defaults to false. /// public bool Landscape { get; set; } = false; /// - /// Whether to display header and footer. Defaults to false. + /// Gets or sets whether to display header and footer. Defaults to false. /// public bool DisplayHeaderFooter { get; set; } = false; /// - /// Whether to print background graphics. Defaults to false. + /// Gets or sets whether to print background graphics. Defaults to false. /// public bool PrintBackground { get; set; } = false; /// - /// Scale of the webpage rendering. Defaults to 1. + /// Gets or sets the scale of the webpage rendering. Defaults to 1. /// public double Scale { get; set; } = 1; /// - /// Specify page size of the generated PDF. Can be `A0`, `A1`, `A2`, `A3`, `A4`, + /// Gets or sets the page size of the generated PDF. Can be `A0`, `A1`, `A2`, `A3`, `A4`, /// `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`, or an Object containing /// `height` and `width` in inches. Defaults to `Letter`. /// @@ -37,13 +38,13 @@ public class PrintToPDFOptions public PageSize PageSize { get; set; } = "Letter"; /// - /// Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, + /// Gets or sets the paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, /// which means print all pages. /// public string PageRanges { get; set; } = ""; /// - /// HTML template for the print header. Should be valid HTML markup with following + /// Gets or sets the HTML template for the print header. Should be valid HTML markup with following /// classes used to inject printing values into them: `date` (formatted print date), /// `title` (document title), `url` (document location), `pageNumber` (current page /// number) and `totalPages` (total pages in the document). For example, `` @@ -52,16 +53,28 @@ public class PrintToPDFOptions public string HeaderTemplate { get; set; } /// - /// HTML template for the print footer. Should use the same format as the + /// Gets or sets the HTML template for the print footer. Should use the same format as the /// `headerTemplate`. /// public string FooterTemplate { get; set; } /// - /// Whether or not to prefer page size as defined by css. Defaults to false, in + /// Gets or sets whether to prefer page size as defined by css. Defaults to false, in /// which case the content will be scaled to fit the paper size. /// public bool PreferCSSPageSize { get; set; } = false; + /// + /// Gets or sets whether to generate a tagged (accessible) PDF. Defaults to false. + /// Experimental per Electron docs; the generated PDF may not adhere fully to PDF/UA and WCAG standards. + /// + public bool GenerateTaggedPDF { get; set; } = false; + + /// + /// Gets or sets whether to generate a PDF document outline from content headers. Defaults to false. + /// Experimental per Electron docs. + /// + public bool GenerateDocumentOutline { get; set; } = false; + public Margins Margins { get; set; } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/PrinterInfo.cs b/src/ElectronNET.API/API/Entities/PrinterInfo.cs index 88b2f44a..f612eeb0 100644 --- a/src/ElectronNET.API/API/Entities/PrinterInfo.cs +++ b/src/ElectronNET.API/API/Entities/PrinterInfo.cs @@ -1,28 +1,43 @@ +using System.Collections.Generic; + namespace ElectronNET.API.Entities { /// - /// Printer info + /// PrinterInfo structure as returned by webContents.getPrintersAsync(). Fields backed by MCP: name, displayName, description, options. /// + /// Up-to-date with Electron API 39.2 public class PrinterInfo { /// - /// Name + /// Gets or sets the name of the printer as understood by the OS. /// public string Name { get; set; } /// - /// Name + /// Gets or sets the name of the printer as shown in Print Preview. + /// + public string DisplayName { get; set; } + + /// + /// Gets or sets a longer description of the printer's type. /// public string Description { get; set; } /// - /// Status + /// Gets or sets the status code reported by the OS. Semantics are platform-specific. + /// Not MCP-backed: this field is not listed in Electron's PrinterInfo structure. /// public int Status { get; set; } /// - /// Is default + /// Gets or sets a value indicating whether this printer is the system default. + /// Not MCP-backed: this field is not listed in Electron's PrinterInfo structure. /// public bool IsDefault { get; set; } + + /// + /// Gets or sets the platform-specific printer information as an object (keys/values vary by OS). + /// + public Dictionary Options { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ProcessMetric.cs b/src/ElectronNET.API/API/Entities/ProcessMetric.cs index 30ef1c34..0bbde730 100644 --- a/src/ElectronNET.API/API/Entities/ProcessMetric.cs +++ b/src/ElectronNET.API/API/Entities/ProcessMetric.cs @@ -1,54 +1,58 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// /// Process metrics information. /// + /// Up-to-date with Electron API 39.2 public class ProcessMetric { /// - /// Process id of the process. + /// Gets or sets the process id of the process. /// public int PId { get; set; } /// - /// Process type (Browser or Tab or GPU etc). + /// Gets or sets the process type. One of: Browser | Tab | Utility | Zygote | Sandbox helper | GPU | Pepper Plugin | Pepper Plugin Broker | Unknown. /// public string Type { get; set; } /// - /// CPU usage of the process. + /// Gets or sets the CPU usage of the process. /// public CPUUsage Cpu { get; set; } /// - /// Creation time for this process in milliseconds since Unix epoch. Can exceed Int32 range and may contain fractional milliseconds. + /// Gets or sets the creation time for this process, represented as the number of milliseconds since the UNIX epoch. Since the pid can be reused after a process dies, use both pid and creationTime to uniquely identify a process. /// public double CreationTime { get; set; } /// - /// Memory information for the process. + /// Gets or sets the memory information for the process. /// public MemoryInfo Memory { get; set; } /// - /// Whether the process is sandboxed on OS level. + /// Gets or sets a value indicating whether the process is sandboxed on OS level. /// + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("windows")] public bool Sandboxed { get; set; } /// - /// One of the following values: - /// untrusted | low | medium | high | unknown + /// Gets or sets the integrity level. One of: untrusted | low | medium | high | unknown. /// + [SupportedOSPlatform("windows")] public string IntegrityLevel { get; set; } /// - /// The name of the process. - /// Examples for utility: Audio Service, Content Decryption Module Service, Network Service, Video Capture, etc. + /// Gets or sets the name of the process. Examples for utility: Audio Service, Content Decryption Module Service, Network Service, Video Capture, etc. /// public string Name { get; set; } /// - /// The non-localized name of the process. + /// Gets or sets the non-localized name of the process. /// public string ServiceName { get; set; } } diff --git a/src/ElectronNET.API/API/Entities/ProcessVersions.cs b/src/ElectronNET.API/API/Entities/ProcessVersions.cs index 4e6fe54c..11c76e64 100644 --- a/src/ElectronNET.API/API/Entities/ProcessVersions.cs +++ b/src/ElectronNET.API/API/Entities/ProcessVersions.cs @@ -3,8 +3,9 @@ namespace ElectronNET.API.Entities /// /// An object listing the version strings specific to Electron /// + /// Project-specific: no matching Electron structure found in MCP docs (electronjs). /// Value representing Chrome's version string /// Value representing Electron's version string /// public record ProcessVersions(string Chrome, string Electron); -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ProgressBarMode.cs b/src/ElectronNET.API/API/Entities/ProgressBarMode.cs index b9fed428..260355d8 100644 --- a/src/ElectronNET.API/API/Entities/ProgressBarMode.cs +++ b/src/ElectronNET.API/API/Entities/ProgressBarMode.cs @@ -1,8 +1,12 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Mode for BrowserWindow/BaseWindow setProgressBar on Windows. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("Windows")] public enum ProgressBarMode { /// diff --git a/src/ElectronNET.API/API/Entities/ProgressBarOptions.cs b/src/ElectronNET.API/API/Entities/ProgressBarOptions.cs index 898486e6..6967f45d 100644 --- a/src/ElectronNET.API/API/Entities/ProgressBarOptions.cs +++ b/src/ElectronNET.API/API/Entities/ProgressBarOptions.cs @@ -1,17 +1,18 @@ - using System.Text.Json.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// - /// + /// Options for BrowserWindow.setProgressBar(progress, options). /// + /// Up-to-date with Electron API 39.2 public class ProgressBarOptions { /// - /// Mode for the progress bar. Can be 'none' | 'normal' | 'indeterminate' | 'error' | 'paused'. + /// Mode for the progress bar on Windows. Can be 'none' | 'normal' | 'indeterminate' | 'error' | 'paused'. /// - public ProgressBarMode Mode { get; set; } + [SupportedOSPlatform("windows")] + public ProgressBarMode Mode { get; set; } = ProgressBarMode.normal; } -} - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ProgressInfo.cs b/src/ElectronNET.API/API/Entities/ProgressInfo.cs index 75c94970..3055ed0e 100644 --- a/src/ElectronNET.API/API/Entities/ProgressInfo.cs +++ b/src/ElectronNET.API/API/Entities/ProgressInfo.cs @@ -3,31 +3,30 @@ /// /// /// + /// Up-to-date with electron-updater 6.7.2 public class ProgressInfo { - /// - /// - /// + /// Gets or sets the progress. public string Progress { get; set; } /// - /// + /// Gets or sets bytes processed per second. /// - public string BytesPerSecond { get; set; } + public long BytesPerSecond { get; set; } /// - /// + /// Gets or sets the percentage completed (0–100). /// - public string Percent { get; set; } + public double Percent { get; set; } /// - /// + /// Gets or sets the total number of bytes to download. /// - public string Total { get; set; } + public long Total { get; set; } /// - /// + /// Gets or sets the number of bytes transferred so far. /// - public string Transferred { get; set; } + public long Transferred { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ProxyConfig.cs b/src/ElectronNET.API/API/Entities/ProxyConfig.cs index 3dd9ac00..529b7449 100644 --- a/src/ElectronNET.API/API/Entities/ProxyConfig.cs +++ b/src/ElectronNET.API/API/Entities/ProxyConfig.cs @@ -1,10 +1,16 @@ namespace ElectronNET.API.Entities { /// - /// + /// Proxy configuration for app.setProxy / session.setProxy. Matches Electron's ProxyConfig structure. /// public class ProxyConfig { + /// + /// The proxy mode. One of: 'direct' | 'auto_detect' | 'pac_script' | 'fixed_servers' | 'system'. + /// Defaults to 'pac_script' if 'PacScript' is specified, otherwise defaults to 'fixed_servers'. + /// + public string Mode { get; set; } + /// /// The URL associated with the PAC file. /// @@ -33,4 +39,4 @@ public ProxyConfig(string pacScript, string proxyRules, string proxyBypassRules) ProxyBypassRules = proxyBypassRules; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ReadBookmark.cs b/src/ElectronNET.API/API/Entities/ReadBookmark.cs index fd5b665c..29443e23 100644 --- a/src/ElectronNET.API/API/Entities/ReadBookmark.cs +++ b/src/ElectronNET.API/API/Entities/ReadBookmark.cs @@ -1,8 +1,13 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Result of clipboard.readBookmark(): title and url. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public class ReadBookmark { /// diff --git a/src/ElectronNET.API/API/Entities/Rectangle.cs b/src/ElectronNET.API/API/Entities/Rectangle.cs index b0622725..738ba863 100644 --- a/src/ElectronNET.API/API/Entities/Rectangle.cs +++ b/src/ElectronNET.API/API/Entities/Rectangle.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class Rectangle { /// diff --git a/src/ElectronNET.API/API/Entities/RelaunchOptions.cs b/src/ElectronNET.API/API/Entities/RelaunchOptions.cs index 5fc8517a..15854788 100644 --- a/src/ElectronNET.API/API/Entities/RelaunchOptions.cs +++ b/src/ElectronNET.API/API/Entities/RelaunchOptions.cs @@ -1,24 +1,19 @@ namespace ElectronNET.API.Entities { /// - /// Controls the behavior of . + /// Options for app.relaunch: optional args array and execPath. /// + /// Up-to-date with Electron API 39.2 public class RelaunchOptions { /// - /// Gets or sets the arguments. + /// Command-line arguments for the relaunched instance. /// - /// - /// The arguments. - /// public string[] Args { get; set; } /// - /// Gets or sets the execute path. + /// Executable path to relaunch instead of the current app. /// - /// - /// The execute path. - /// public string ExecPath { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ReleaseNoteInfo.cs b/src/ElectronNET.API/API/Entities/ReleaseNoteInfo.cs index c9ebf2aa..b2a3d19e 100644 --- a/src/ElectronNET.API/API/Entities/ReleaseNoteInfo.cs +++ b/src/ElectronNET.API/API/Entities/ReleaseNoteInfo.cs @@ -3,16 +3,17 @@ /// /// /// + /// Up-to-date with electron-updater 6.7.2 public class ReleaseNoteInfo { /// - /// The version. + /// Gets or sets the version. /// public string Version { get; set; } /// - /// The note. + /// Gets or sets the note text. /// public string Note { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/RemovePassword.cs b/src/ElectronNET.API/API/Entities/RemovePassword.cs index 811c19ed..92690e9d 100644 --- a/src/ElectronNET.API/API/Entities/RemovePassword.cs +++ b/src/ElectronNET.API/API/Entities/RemovePassword.cs @@ -1,4 +1,3 @@ - using System.Text.Json.Serialization; namespace ElectronNET.API.Entities @@ -6,6 +5,7 @@ namespace ElectronNET.API.Entities /// /// /// + /// Undecidable from MCP: no typed structure for session.clearAuthCache parameters. public class RemovePassword { /// @@ -25,7 +25,7 @@ public class RemovePassword public string Realm { get; set; } /// - /// Scheme of the authentication. Can be basic, digest, ntlm, negotiate. + /// Scheme of the authentication. Can be basic, digest, ntlm, negotiate. /// Must be provided if removing by origin. /// public Scheme Scheme { get; set; } @@ -49,6 +49,4 @@ public RemovePassword(string type) Type = type; } } -} - - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ResizeOptions.cs b/src/ElectronNET.API/API/Entities/ResizeOptions.cs index 1490ccdb..02976541 100644 --- a/src/ElectronNET.API/API/Entities/ResizeOptions.cs +++ b/src/ElectronNET.API/API/Entities/ResizeOptions.cs @@ -1,8 +1,9 @@ namespace ElectronNET.API.Entities { /// - /// + /// Options for NativeImage.resize: optional width/height and quality. /// + /// Up-to-date with Electron API 39.2 public class ResizeOptions { /// @@ -16,8 +17,8 @@ public class ResizeOptions public int? Height { get; set; } /// - /// good, better, or best. Default is "best"; + /// 'good', 'better', or 'best'. Default is 'best'. /// public string Quality { get; set; } = "best"; } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/SaveDialogOptions.cs b/src/ElectronNET.API/API/Entities/SaveDialogOptions.cs index 16811d70..1772c144 100644 --- a/src/ElectronNET.API/API/Entities/SaveDialogOptions.cs +++ b/src/ElectronNET.API/API/Entities/SaveDialogOptions.cs @@ -1,10 +1,12 @@ using ElectronNET.API.Entities; +using System.Runtime.Versioning; namespace ElectronNET.API { /// - /// + /// Options for dialog.showSaveDialog / dialog.showSaveDialogSync. /// + /// Up-to-date with Electron API 39.2 public class SaveDialogOptions { /// @@ -21,13 +23,18 @@ public class SaveDialogOptions public string DefaultPath { get; set; } /// - /// Custom label for the confirmation button, when left empty the default label will - /// be used. + /// Gets or sets the custom label for the confirmation button; when left empty the default label will be used. /// public string ButtonLabel { get; set; } /// - /// The filters specifies an array of file types that can be displayed or + /// Properties for the save dialog. Supported values: + /// showHiddenFiles | createDirectory (macOS) | treatPackageAsDirectory (macOS) | showOverwriteConfirmation (Linux) | dontAddToRecent (Windows) + /// + public SaveDialogProperty[] Properties { get; set; } + + /// + /// Gets or sets the filters specifying an array of file types that can be displayed or /// selected when you want to limit the user to a specific type. For example: /// /// @@ -44,18 +51,27 @@ public class SaveDialogOptions public FileFilter[] Filters { get; set; } /// - /// Message to display above text fields. + /// Gets or sets the message to display above text fields. /// + [SupportedOSPlatform("macos")] public string Message { get; set; } /// - /// Custom label for the text displayed in front of the filename text field. + /// Gets or sets the custom label for the text displayed in front of the filename text field. /// + [SupportedOSPlatform("macos")] public string NameFieldLabel { get; set; } /// - /// Show the tags input box, defaults to true. + /// Gets or sets a value indicating whether to show the tags input box. Defaults to true. /// + [SupportedOSPlatform("macos")] public bool ShowsTagField { get; set; } + + /// + /// Gets or sets a value indicating whether to create a security scoped bookmark when packaged for the Mac App Store. If enabled and the file doesn't already exist a blank file will be created at the chosen path. + /// + [SupportedOSPlatform("macos")] + public bool SecurityScopedBookmarks { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/SaveDialogProperty.cs b/src/ElectronNET.API/API/Entities/SaveDialogProperty.cs new file mode 100644 index 00000000..633e65e8 --- /dev/null +++ b/src/ElectronNET.API/API/Entities/SaveDialogProperty.cs @@ -0,0 +1,40 @@ +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities +{ + /// + /// Properties supported by dialog.showSaveDialog / showSaveDialogSync. + /// + /// Up-to-date with Electron API 39.2 + public enum SaveDialogProperty + { + /// + /// Show hidden files in dialog. + /// + showHiddenFiles, + + /// + /// Allow creating new directories from dialog (macOS). + /// + [SupportedOSPlatform("macos")] + createDirectory, + + /// + /// Treat packages, such as .app folders, as a directory instead of a file (macOS). + /// + [SupportedOSPlatform("macos")] + treatPackageAsDirectory, + + /// + /// Sets whether the user will be presented a confirmation dialog if the user types a file name that already exists (Linux). + /// + [SupportedOSPlatform("linux")] + showOverwriteConfirmation, + + /// + /// Do not add the item being saved to the recent documents list (Windows). + /// + [SupportedOSPlatform("windows")] + dontAddToRecent + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Scheme.cs b/src/ElectronNET.API/API/Entities/Scheme.cs index a1daf100..4eb0b468 100644 --- a/src/ElectronNET.API/API/Entities/Scheme.cs +++ b/src/ElectronNET.API/API/Entities/Scheme.cs @@ -1,8 +1,9 @@ namespace ElectronNET.API.Entities { /// - /// + /// Authentication scheme names used by webContents 'login' authInfo.scheme. /// + /// Undecidable from MCP: no typed enum is defined in docs; kept as project enum to reflect commonly observed values. public enum Scheme { /// diff --git a/src/ElectronNET.API/API/Entities/SemVer.cs b/src/ElectronNET.API/API/Entities/SemVer.cs index abac145a..4e3f8c84 100644 --- a/src/ElectronNET.API/API/Entities/SemVer.cs +++ b/src/ElectronNET.API/API/Entities/SemVer.cs @@ -3,6 +3,7 @@ /// /// /// + /// Project-specific: no matching Electron structure found in MCP docs (electronjs). public class SemVer { /// @@ -54,6 +55,7 @@ public class SemVer /// /// /// + /// Project-specific: no matching Electron structure found in MCP docs (electronjs). public class SemVerOptions { /// diff --git a/src/ElectronNET.API/API/Entities/SharingItem.cs b/src/ElectronNET.API/API/Entities/SharingItem.cs new file mode 100644 index 00000000..38bfb107 --- /dev/null +++ b/src/ElectronNET.API/API/Entities/SharingItem.cs @@ -0,0 +1,27 @@ +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities +{ + /// + /// SharingItem for MenuItem role 'shareMenu' (macOS). + /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("macos")] + public class SharingItem + { + /// + /// An array of text to share. + /// + public string[] Texts { get; set; } + + /// + /// An array of files to share. + /// + public string[] FilePaths { get; set; } + + /// + /// An array of URLs to share. + /// + public string[] Urls { get; set; } + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ShortcutDetails.cs b/src/ElectronNET.API/API/Entities/ShortcutDetails.cs index 90235661..01db6715 100644 --- a/src/ElectronNET.API/API/Entities/ShortcutDetails.cs +++ b/src/ElectronNET.API/API/Entities/ShortcutDetails.cs @@ -1,8 +1,12 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// /// Structure of a shortcut. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("windows")] public class ShortcutDetails { /// @@ -36,6 +40,12 @@ public class ShortcutDetails /// public int IconIndex { get; set; } + /// + /// The Application Toast Activator CLSID. Needed for participating in Action Center. + /// + [SupportedOSPlatform("windows")] + public string ToastActivatorClsid { get; set; } + /// /// The target to launch from this shortcut. /// diff --git a/src/ElectronNET.API/API/Entities/ShortcutLinkOperation.cs b/src/ElectronNET.API/API/Entities/ShortcutLinkOperation.cs index fda0aaee..69ed7751 100644 --- a/src/ElectronNET.API/API/Entities/ShortcutLinkOperation.cs +++ b/src/ElectronNET.API/API/Entities/ShortcutLinkOperation.cs @@ -1,28 +1,28 @@ using System.ComponentModel; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// /// Defines the ShortcutLinkOperation enumeration. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("Windows")] public enum ShortcutLinkOperation { /// /// Creates a new shortcut, overwriting if necessary. /// - [Description("create")] Create, /// /// Updates specified properties only on an existing shortcut. /// - [Description("update")] Update, /// /// Overwrites an existing shortcut, fails if the shortcut doesn't exist. /// - [Description("replace")] Replace } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/Size.cs b/src/ElectronNET.API/API/Entities/Size.cs index 61bbd122..7dbd771e 100644 --- a/src/ElectronNET.API/API/Entities/Size.cs +++ b/src/ElectronNET.API/API/Entities/Size.cs @@ -3,6 +3,7 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class Size { /// diff --git a/src/ElectronNET.API/API/Entities/ThemeSourceMode.cs b/src/ElectronNET.API/API/Entities/ThemeSourceMode.cs index 53fa23ed..b1f1fda8 100644 --- a/src/ElectronNET.API/API/Entities/ThemeSourceMode.cs +++ b/src/ElectronNET.API/API/Entities/ThemeSourceMode.cs @@ -5,24 +5,22 @@ namespace ElectronNET.API.Entities /// /// Defines the ThemeSourceMode enumeration. /// + /// Up-to-date with Electron API 39.2 public enum ThemeSourceMode { /// /// Operating system default. /// - [Description("system")] System, /// /// Light theme. /// - [Description("light")] Light, /// /// Dark theme. /// - [Description("dark")] Dark } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ThumbarButton.cs b/src/ElectronNET.API/API/Entities/ThumbarButton.cs index 051976f5..dbfd03b5 100644 --- a/src/ElectronNET.API/API/Entities/ThumbarButton.cs +++ b/src/ElectronNET.API/API/Entities/ThumbarButton.cs @@ -1,11 +1,14 @@ using System; using System.Text.Json.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// - /// + /// Thumbnail toolbar button for Windows taskbar. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("windows")] public class ThumbarButton { /// @@ -56,5 +59,4 @@ public ThumbarButton(string icon) Icon = icon; } } -} - +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ThumbarButtonFlag.cs b/src/ElectronNET.API/API/Entities/ThumbarButtonFlag.cs index e68ca860..0c4c9c3a 100644 --- a/src/ElectronNET.API/API/Entities/ThumbarButtonFlag.cs +++ b/src/ElectronNET.API/API/Entities/ThumbarButtonFlag.cs @@ -1,8 +1,12 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Flags for Windows taskbar thumbnail toolbar buttons. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("windows")] public enum ThumbarButtonFlag { /// diff --git a/src/ElectronNET.API/API/Entities/TitleBarOverlay.cs b/src/ElectronNET.API/API/Entities/TitleBarOverlay.cs index 34c8ab87..ae0bb2e0 100644 --- a/src/ElectronNET.API/API/Entities/TitleBarOverlay.cs +++ b/src/ElectronNET.API/API/Entities/TitleBarOverlay.cs @@ -1,5 +1,11 @@ -namespace ElectronNET.API.Entities; +using System.Runtime.Versioning; +namespace ElectronNET.API.Entities; + +/// +/// Configures the window's title bar overlay when using a frameless window. +/// +/// Up-to-date with Electron API 39.2 public class TitleBarOverlay { private readonly bool? _value; @@ -10,13 +16,34 @@ public TitleBarOverlay() private TitleBarOverlay(bool value) : this() => _value = value; + /// + /// Gets or sets the CSS color of the Window Controls Overlay when enabled. + /// OS-specific per MCP: available on Windows and Linux. + /// + [SupportedOSPlatform("windows")] + [SupportedOSPlatform("linux")] public string Color { get; set; } - public double Height { get; set; } - + /// + /// Gets or sets the height of the title bar and Window Controls Overlay in pixels. Default is system height. + /// + public int Height { get; set; } + + /// + /// Gets or sets the CSS color of the symbols on the Window Controls Overlay when enabled. + /// OS-specific per MCP: available on Windows and Linux. + /// + [SupportedOSPlatform("windows")] + [SupportedOSPlatform("linux")] public string SymbolColor { get; set; } + /// + /// Allows using a bare boolean for titleBarOverlay in options (true/false). + /// public static implicit operator bool?(TitleBarOverlay titleBarOverlay) => titleBarOverlay?._value; + /// + /// Allows constructing from a bare boolean (true/false) for titleBarOverlay. + /// public static implicit operator TitleBarOverlay(bool value) => new(value); } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/TitleBarStyle.cs b/src/ElectronNET.API/API/Entities/TitleBarStyle.cs index f28ac954..7bd5f167 100644 --- a/src/ElectronNET.API/API/Entities/TitleBarStyle.cs +++ b/src/ElectronNET.API/API/Entities/TitleBarStyle.cs @@ -1,5 +1,5 @@ - using System.Text.Json.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { @@ -22,11 +22,13 @@ public enum TitleBarStyle /// /// The hidden inset /// + [SupportedOSPlatform("macos")] hiddenInset, /// /// The custom buttons on hover /// + [SupportedOSPlatform("macos")] customButtonsOnHover } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ToBitmapOptions.cs b/src/ElectronNET.API/API/Entities/ToBitmapOptions.cs index 1a08c3bf..f280f300 100644 --- a/src/ElectronNET.API/API/Entities/ToBitmapOptions.cs +++ b/src/ElectronNET.API/API/Entities/ToBitmapOptions.cs @@ -1,13 +1,14 @@ namespace ElectronNET.API.Entities { /// - /// + /// Options for nativeImage.toBitmap; supports optional scaleFactor (defaults to 1.0) per MCP. /// + /// Up-to-date with Electron API 39.2 public class ToBitmapOptions { /// - /// Gets or sets the scalefactor + /// Gets or sets the image scale factor. Defaults to 1.0. /// public float ScaleFactor { get; set; } = 1.0f; } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ToDataUrlOptions.cs b/src/ElectronNET.API/API/Entities/ToDataUrlOptions.cs index 0df4aa99..ccdb437d 100644 --- a/src/ElectronNET.API/API/Entities/ToDataUrlOptions.cs +++ b/src/ElectronNET.API/API/Entities/ToDataUrlOptions.cs @@ -3,11 +3,12 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class ToDataUrlOptions { /// - /// Gets or sets the scalefactor + /// Gets or sets the image scale factor. Defaults to 1.0. /// public float ScaleFactor { get; set; } = 1.0f; } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/ToPNGOptions.cs b/src/ElectronNET.API/API/Entities/ToPNGOptions.cs index f4e36b10..8d0e6831 100644 --- a/src/ElectronNET.API/API/Entities/ToPNGOptions.cs +++ b/src/ElectronNET.API/API/Entities/ToPNGOptions.cs @@ -3,11 +3,12 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class ToPNGOptions { /// - /// Gets or sets the scalefactor + /// Gets or sets the image scale factor. Defaults to 1.0. /// public float ScaleFactor { get; set; } = 1.0f; } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/TrayClickEventArgs.cs b/src/ElectronNET.API/API/Entities/TrayClickEventArgs.cs index 516e192a..6ac9da16 100644 --- a/src/ElectronNET.API/API/Entities/TrayClickEventArgs.cs +++ b/src/ElectronNET.API/API/Entities/TrayClickEventArgs.cs @@ -1,4 +1,6 @@ -namespace ElectronNET.API +using ElectronNET.API.Entities; + +namespace ElectronNET.API { /// /// @@ -36,5 +38,15 @@ public class TrayClickEventArgs /// true if [meta key]; otherwise, false. /// public bool MetaKey { get; set; } + + /// + /// The bounds of tray icon. + /// + public Rectangle Bounds { get; set; } + + /// + /// The position of the event. + /// + public Point Position { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/UpdateCancellationToken.cs b/src/ElectronNET.API/API/Entities/UpdateCancellationToken.cs index 84b9c3c7..7345d2d6 100644 --- a/src/ElectronNET.API/API/Entities/UpdateCancellationToken.cs +++ b/src/ElectronNET.API/API/Entities/UpdateCancellationToken.cs @@ -3,22 +3,23 @@ /// /// /// + /// Up-to-date with electron-updater 6.7.2 public class UpdateCancellationToken { /// - /// + /// Gets or sets a value indicating whether cancellation has been requested. /// public bool Cancelled { get; set; } /// - /// + /// Requests cancellation of the update process. /// public void Cancel() { } /// - /// + /// Disposes the underlying cancellation token (if applicable). /// public void Dispose() { diff --git a/src/ElectronNET.API/API/Entities/UpdateCheckResult.cs b/src/ElectronNET.API/API/Entities/UpdateCheckResult.cs index 66c75aa2..3a902c77 100644 --- a/src/ElectronNET.API/API/Entities/UpdateCheckResult.cs +++ b/src/ElectronNET.API/API/Entities/UpdateCheckResult.cs @@ -3,21 +3,22 @@ /// /// /// + /// Up-to-date with electron-updater 6.7.2 public class UpdateCheckResult { /// - /// + /// Gets or sets the update information discovered by the check. /// public UpdateInfo UpdateInfo { get; set; } = new UpdateInfo(); /// - /// + /// Gets or sets the download artifacts (if provided by the updater). /// public string[] Download { get; set; } /// - /// + /// Gets or sets the cancellation token for the update process. /// public UpdateCancellationToken CancellationToken { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/UpdateFileInfo.cs b/src/ElectronNET.API/API/Entities/UpdateFileInfo.cs index 5f5d6f62..dc1708cc 100644 --- a/src/ElectronNET.API/API/Entities/UpdateFileInfo.cs +++ b/src/ElectronNET.API/API/Entities/UpdateFileInfo.cs @@ -3,11 +3,12 @@ /// /// /// + /// Up-to-date with electron-updater 6.7.2 public class UpdateFileInfo : BlockMapDataHolder { /// - /// + /// Gets or sets the URL of the update file. /// public string Url { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/UpdateInfo.cs b/src/ElectronNET.API/API/Entities/UpdateInfo.cs index 5b33bf0b..c3b6a457 100644 --- a/src/ElectronNET.API/API/Entities/UpdateInfo.cs +++ b/src/ElectronNET.API/API/Entities/UpdateInfo.cs @@ -3,36 +3,37 @@ /// /// /// + /// Up-to-date with electron-updater 6.7.2 public class UpdateInfo { /// - /// The version. + /// Gets or sets the version. /// public string Version { get; set; } /// - /// + /// Gets or sets the files included in this update. /// public UpdateFileInfo[] Files { get; set; } = new UpdateFileInfo[0]; /// - /// The release name. + /// Gets or sets the release name. /// public string ReleaseName { get; set; } /// - /// The release notes. + /// Gets or sets the release notes. /// public ReleaseNoteInfo[] ReleaseNotes { get; set; } = new ReleaseNoteInfo[0]; /// - /// + /// Gets or sets the release date. /// public string ReleaseDate { get; set; } /// - /// The staged rollout percentage, 0-100. + /// Gets or sets the staged rollout percentage, 0-100. /// - public int StagingPercentage { get; set; } + public double StagingPercentage { get; set; } } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/UploadFile.cs b/src/ElectronNET.API/API/Entities/UploadFile.cs index adff7df8..d542c355 100644 --- a/src/ElectronNET.API/API/Entities/UploadFile.cs +++ b/src/ElectronNET.API/API/Entities/UploadFile.cs @@ -3,32 +3,32 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class UploadFile : IPostData { /// - /// The object represents a file. + /// Gets the type discriminator; constant 'file'. /// public string Type { get; } = "file"; /// - /// The path of the file being uploaded. + /// Gets or sets the path of the file to be uploaded. /// public string FilePath { get; set; } /// - /// The offset from the beginning of the file being uploaded, in bytes. Defaults to 0. + /// Gets or sets the offset from the beginning of the file being uploaded, in bytes. Defaults to 0. /// public long Offset { get; set; } = 0; /// - /// The length of the file being uploaded, . Defaults to 0. - /// If set to -1, the whole file will be uploaded. + /// Gets or sets the number of bytes to read from offset. Defaults to 0. /// public long Length { get; set; } = 0; /// - /// The modification time of the file represented by a double, which is the number of seconds since the UNIX Epoch (Jan 1, 1970) + /// Gets or sets the last modification time in number of seconds since the UNIX epoch. Defaults to 0. /// - public double ModificationTime { get; set; } + public double ModificationTime { get; set; } = 0; } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/UploadRawData.cs b/src/ElectronNET.API/API/Entities/UploadRawData.cs index c1577978..96a91ac9 100644 --- a/src/ElectronNET.API/API/Entities/UploadRawData.cs +++ b/src/ElectronNET.API/API/Entities/UploadRawData.cs @@ -3,15 +3,16 @@ /// /// /// + /// Up-to-date with Electron API 39.2 public class UploadRawData : IPostData { /// - /// The data is available as a Buffer, in the rawData field. + /// Gets the type discriminator; constant 'rawData'. /// public string Type { get; } = "rawData"; /// - /// The raw bytes of the post data in a Buffer. + /// Gets or sets the data to be uploaded as raw bytes (Electron Buffer). /// public byte[] Bytes { get; set; } } diff --git a/src/ElectronNET.API/API/Entities/UserTask.cs b/src/ElectronNET.API/API/Entities/UserTask.cs index 020910dc..65443b14 100644 --- a/src/ElectronNET.API/API/Entities/UserTask.cs +++ b/src/ElectronNET.API/API/Entities/UserTask.cs @@ -1,8 +1,12 @@ -namespace ElectronNET.API.Entities +using System.Runtime.Versioning; + +namespace ElectronNET.API.Entities { /// - /// + /// Windows Task item used by app.setUserTasks. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("Windows")] public class UserTask { /// diff --git a/src/ElectronNET.API/API/Entities/Vibrancy.cs b/src/ElectronNET.API/API/Entities/Vibrancy.cs index 2e8bec85..8e35607e 100644 --- a/src/ElectronNET.API/API/Entities/Vibrancy.cs +++ b/src/ElectronNET.API/API/Entities/Vibrancy.cs @@ -1,63 +1,92 @@ using System.Runtime.Serialization; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// - /// + /// Vibrancy types for BrowserWindow on macOS. /// + /// Up-to-date with Electron API 39.2 + [SupportedOSPlatform("macos")] public enum Vibrancy { /// - /// The appearance based + /// Appearance-based vibrancy. /// [EnumMember(Value = "appearance-based")] appearanceBased, /// - /// The light + /// Title bar area. /// - light, + titlebar, /// - /// The dark + /// Selection highlight. /// - dark, + selection, /// - /// The titlebar + /// Menu background. /// - titlebar, + menu, /// - /// The selection + /// Popover background. /// - selection, + popover, /// - /// The menu + /// Sidebar background. /// - menu, + sidebar, /// - /// The popover + /// Header background. /// - popover, + header, /// - /// The sidebar + /// Sheet background. /// - sidebar, + sheet, + + /// + /// Window background. + /// + window, + + /// + /// Heads-up display. + /// + hud, + + /// + /// Fullscreen UI background. + /// + [EnumMember(Value = "fullscreen-ui")] + fullscreenUi, + + /// + /// Tooltip background. + /// + tooltip, + + /// + /// Content background. + /// + content, /// - /// The medium light + /// Under-window background. /// - [EnumMember(Value = "medium-light")] - mediumLight, + [EnumMember(Value = "under-window")] + underWindow, /// - /// The ultra dark + /// Under-page background. /// - [EnumMember(Value = "ultra-dark")] - ultraDark + [EnumMember(Value = "under-page")] + underPage } } \ No newline at end of file diff --git a/src/ElectronNET.API/API/Entities/WebPreferences.cs b/src/ElectronNET.API/API/Entities/WebPreferences.cs index 12d8bf40..385d3474 100644 --- a/src/ElectronNET.API/API/Entities/WebPreferences.cs +++ b/src/ElectronNET.API/API/Entities/WebPreferences.cs @@ -1,10 +1,12 @@ using System.ComponentModel; +using System.Runtime.Versioning; namespace ElectronNET.API.Entities { /// /// /// + /// Up-to-date with Electron API 39.2 public class WebPreferences { /// @@ -25,6 +27,11 @@ public class WebPreferences /// public bool NodeIntegrationInWorker { get; set; } + /// + /// Experimental option for enabling Node.js support in sub-frames such as iframes and child windows. + /// + public bool NodeIntegrationInSubFrames { get; set; } + /// /// Specifies a script that will be loaded before other scripts run in the page. /// This script will always have access to node APIs no matter whether node @@ -35,11 +42,7 @@ public class WebPreferences public string Preload { get; set; } /// - /// If set, this will sandbox the renderer associated with the window, making it - /// compatible with the Chromium OS-level sandbox and disabling the Node.js engine. - /// This is not the same as the nodeIntegration option and the APIs available to the - /// preload script are more limited. Read more about the option.This option is - /// currently experimental and may change or be removed in future Electron releases. + /// If set, this will sandbox the renderer associated with the window, making it compatible with the Chromium OS-level sandbox and disabling the Node.js engine. This is not the same as the nodeIntegration option and the APIs available to the preload script are more limited. Default is true since Electron 20. The sandbox will automatically be disabled when nodeIntegration is set to true. /// public bool Sandbox { get; set; } @@ -56,7 +59,8 @@ public class WebPreferences /// /// The default zoom factor of the page, 3.0 represents 300%. Default is 1.0. /// - public double ZoomFactor { get; set; } + [DefaultValue(1.0)] + public double ZoomFactor { get; set; } = 1.0; /// /// Enables JavaScript support. Default is true. @@ -84,6 +88,11 @@ public class WebPreferences [DefaultValue(true)] public bool Images { get; set; } = true; + /// + /// Specifies how to run image animations (e.g. GIFs). Can be 'animate', 'animateOnce' or 'noAnimation'. Default is 'animate'. + /// + public string ImageAnimationPolicy { get; set; } + /// /// Make TextArea elements resizable. Default is true. /// @@ -115,11 +124,13 @@ public class WebPreferences /// /// Enables Chromium's experimental canvas features. Default is false. /// + /// Not documented by MCP electronjs web-preferences. public bool ExperimentalCanvasFeatures { get; set; } /// /// Enables scroll bounce (rubber banding) effect on macOS. Default is false. /// + [SupportedOSPlatform("macos")] public bool ScrollBounce { get; set; } /// @@ -147,16 +158,19 @@ public class WebPreferences /// /// Defaults to 13. /// - public int DefaultMonospaceFontSize { get; set; } + [DefaultValue(13)] + public int DefaultMonospaceFontSize { get; set; } = 13; /// /// Defaults to 0. /// - public int MinimumFontSize { get; set; } + [DefaultValue(0)] + public int MinimumFontSize { get; set; } = 0; /// /// Defaults to ISO-8859-1. /// + /// Not documented by MCP electronjs web-preferences. public string DefaultEncoding { get; set; } /// @@ -212,5 +226,25 @@ public class WebPreferences /// [DefaultValue(false)] public bool EnableRemoteModule { get; set; } = false; + + /// + /// Gets or sets a value indicating whether to enable preferred size mode. The preferred size is the minimum size needed to contain the layout of the document—without requiring scrolling. Enabling this will cause the 'preferred-size-changed' event to be emitted on the WebContents when the preferred size changes. Default is false. + /// + [DefaultValue(false)] + public bool EnablePreferredSizeMode { get; set; } + + /// + /// Gets or sets a value indicating whether to enable background transparency for the guest page. Default is true. + /// Note: The guest page's text and background colors are derived from the color scheme of its root element. When transparency is enabled, the text color will still change accordingly but the background will remain transparent. + /// + [DefaultValue(true)] + public bool Transparent { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to enable the 'paste' execCommand. Deprecated. Default is false. + /// + [DefaultValue(false)] + [System.Obsolete("enableDeprecatedPaste is deprecated in Electron; avoid using.")] + public bool EnableDeprecatedPaste { get; set; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Extensions/EnumExtensions.cs b/src/ElectronNET.API/API/Extensions/EnumExtensions.cs deleted file mode 100644 index 42604586..00000000 --- a/src/ElectronNET.API/API/Extensions/EnumExtensions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.ComponentModel; -using System.Reflection; - -namespace ElectronNET.API.Extensions -{ - internal static class EnumExtensions - { - public static string GetDescription(this T enumerationValue) where T : struct - { - Type type = enumerationValue.GetType(); - if (!type.IsEnum) - { - throw new ArgumentException("EnumerationValue must be of Enum type", "enumerationValue"); - } - - //Tries to find a DescriptionAttribute for a potential friendly name - //for the enum - MemberInfo[] memberInfo = type.GetMember(enumerationValue.ToString()); - if (memberInfo != null && memberInfo.Length > 0) - { - object[] attrs = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false); - - if (attrs != null && attrs.Length > 0) - { - //Pull out the description value - return ((DescriptionAttribute)attrs[0]).Description; - } - } - - //If we have no description attribute, just return the ToString of the enum - return enumerationValue.ToString(); - } - } -} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Extensions/ThumbarButtonExtensions.cs b/src/ElectronNET.API/API/Extensions/ThumbarButtonExtensions.cs index 3b155546..11cdaf12 100644 --- a/src/ElectronNET.API/API/Extensions/ThumbarButtonExtensions.cs +++ b/src/ElectronNET.API/API/Extensions/ThumbarButtonExtensions.cs @@ -36,4 +36,4 @@ public static ThumbarButton GetThumbarButton(this List thumbarBut return result; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/GlobalShortcut.cs b/src/ElectronNET.API/API/GlobalShortcut.cs index 9786fe6c..46a6b911 100644 --- a/src/ElectronNET.API/API/GlobalShortcut.cs +++ b/src/ElectronNET.API/API/GlobalShortcut.cs @@ -39,10 +39,10 @@ internal static GlobalShortcut Instance private Dictionary _shortcuts = new Dictionary(); /// - /// Registers a global shortcut of accelerator. + /// Registers a global shortcut of accelerator. /// The callback is called when the registered shortcut is pressed by the user. /// - /// When the accelerator is already taken by other applications, this call will + /// When the accelerator is already taken by other applications, this call will /// silently fail.This behavior is intended by operating systems, since they don’t /// want applications to fight for global shortcuts. /// @@ -66,7 +66,7 @@ public void Register(string accelerator, Action function) } /// - /// When the accelerator is already taken by other applications, + /// When the accelerator is already taken by other applications, /// this call will still return false. This behavior is intended by operating systems, /// since they don’t want applications to fight for global shortcuts. /// diff --git a/src/ElectronNET.API/API/HostHook.cs b/src/ElectronNET.API/API/HostHook.cs index 634f7603..31bbc455 100644 --- a/src/ElectronNET.API/API/HostHook.cs +++ b/src/ElectronNET.API/API/HostHook.cs @@ -8,7 +8,7 @@ namespace ElectronNET.API /// /// Allows you to execute native JavaScript/TypeScript code from the host process. /// - /// It is only possible if the Electron.NET CLI has previously added an + /// It is only possible if the Electron.NET CLI has previously added an /// ElectronHostHook directory: /// electronize add HostHook /// @@ -48,10 +48,7 @@ internal static HostHook Instance /// Optional parameters. public void Call(string socketEventName, params dynamic[] arguments) { - BridgeConnector.Socket.Once(socketEventName + "Error" + oneCallguid, (result) => - { - Electron.Dialog.ShowErrorBox("Host Hook Exception", result); - }); + BridgeConnector.Socket.Once(socketEventName + "Error" + oneCallguid, (result) => { Electron.Dialog.ShowErrorBox("Host Hook Exception", result); }); BridgeConnector.Socket.Emit(socketEventName, arguments, oneCallguid); } @@ -95,7 +92,5 @@ public Task CallAsync(string socketEventName, params dynamic[] arguments) return tcs.Task; } - - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/IpcMain.cs b/src/ElectronNET.API/API/IpcMain.cs index 21c25922..0260a889 100644 --- a/src/ElectronNET.API/API/IpcMain.cs +++ b/src/ElectronNET.API/API/IpcMain.cs @@ -1,12 +1,13 @@ -using ElectronNET.API.Serialization; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json; -using System.Threading.Tasks; - namespace ElectronNET.API { + using System; + using System.Diagnostics; + using System.Linq; + using System.Text.Json; + using System.Text.Json.Serialization; + using System.Threading.Tasks; + using ElectronNET.Serialization; + /// /// Communicate asynchronously from the main process to renderer processes. /// @@ -14,6 +15,18 @@ public sealed class IpcMain { private static IpcMain _ipcMain; private static object _syncRoot = new object(); + private static readonly JsonSerializerOptions BoxedObjectSerializationOptions = new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, + WriteIndented = false, + Converters = + { + new JsonStringEnumConverter(JsonNamingPolicy.CamelCase), + new JsonToBoxedPrimitivesConverter(), + } + }; + internal IpcMain() { @@ -39,7 +52,7 @@ internal static IpcMain Instance } /// - /// Listens to channel, when a new message arrives listener would be called with + /// Listens to channel, when a new message arrives listener would be called with /// listener(event, args...). /// /// Channelname. @@ -50,28 +63,27 @@ public async Task On(string channel, Action listener) BridgeConnector.Socket.Off(channel); BridgeConnector.Socket.On(channel, (args) => { - List objectArray = FormatArguments(args); - - if (objectArray.Count == 1) - { - listener(objectArray.First()); - } - else - { - listener(objectArray); - } + var arg = FormatArguments(args); + listener(arg); }); } - private static List FormatArguments(JsonElement args) + private static object FormatArguments(JsonElement args) { - var objectArray = args.Deserialize(ElectronJson.Options).ToList(); - objectArray.RemoveAll(item => item is null); - return objectArray; + var objectArray = args.Deserialize(BoxedObjectSerializationOptions).ToList(); + + Debug.Assert(objectArray.Count <= 2); + + if (objectArray.Count == 2) + { + return objectArray[1]; + } + + return null; } /// - /// Send a message to the renderer process synchronously via channel, + /// Send a message to the renderer process synchronously via channel, /// you can also send arbitrary arguments. /// /// Note: Sending a synchronous message will block the whole renderer process, @@ -84,18 +96,8 @@ public void OnSync(string channel, Func listener) BridgeConnector.Socket.Emit("registerSyncIpcMainChannel", channel); BridgeConnector.Socket.On(channel, (args) => { - List objectArray = FormatArguments(args); - object parameter; - if (objectArray.Count == 1) - { - parameter = objectArray.First(); - } - else - { - parameter = objectArray; - } - - var result = listener(parameter); + var arg = FormatArguments(args); + var result = listener(arg); BridgeConnector.Socket.Emit(channel + "Sync", result); }); } @@ -111,16 +113,8 @@ public void Once(string channel, Action listener) BridgeConnector.Socket.Emit("registerOnceIpcMainChannel", channel); BridgeConnector.Socket.Once(channel, (args) => { - List objectArray = FormatArguments(args); - - if (objectArray.Count == 1) - { - listener(objectArray.First()); - } - else - { - listener(objectArray); - } + var arg = FormatArguments(args); + listener(arg); }); } @@ -160,7 +154,5 @@ public void Send(BrowserView browserView, string channel, params object[] data) { BridgeConnector.Socket.Emit("sendToIpcRendererBrowserView", browserView.Id, channel, data); } - - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Menu.cs b/src/ElectronNET.API/API/Menu.cs index c037532c..7571ef02 100644 --- a/src/ElectronNET.API/API/Menu.cs +++ b/src/ElectronNET.API/API/Menu.cs @@ -129,7 +129,5 @@ public void ContextMenuPopup(BrowserWindow browserWindow) { BridgeConnector.Socket.Emit("menu-contextMenuPopup", browserWindow.Id); } - - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/NativeTheme.cs b/src/ElectronNET.API/API/NativeTheme.cs index c817b9d8..620e0861 100644 --- a/src/ElectronNET.API/API/NativeTheme.cs +++ b/src/ElectronNET.API/API/NativeTheme.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.Versioning; using System.Threading.Tasks; using ElectronNET.API.Entities; using ElectronNET.API.Extensions; @@ -8,7 +9,7 @@ namespace ElectronNET.API /// /// Read and respond to changes in Chromium's native color theme. /// - public sealed class NativeTheme: ApiBase + public sealed class NativeTheme : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketEventNameTypes SocketEventNameType => SocketEventNameTypes.DashedLower; @@ -59,7 +60,7 @@ internal static NativeTheme Instance /// /// /// The 'updated' event will be emitted - /// + /// /// /// /// Settings this property to will have the following effects: @@ -79,7 +80,7 @@ internal static NativeTheme Instance /// /// The 'updated' event will be emitted /// - /// + /// /// The usage of this property should align with a classic "dark mode" state machine in your application where the user has three options. /// /// @@ -98,7 +99,7 @@ internal static NativeTheme Instance /// The new ThemeSource. public void SetThemeSource(ThemeSourceMode themeSourceMode) { - var themeSource = themeSourceMode.GetDescription(); + var themeSource = themeSourceMode; BridgeConnector.Socket.Emit("nativeTheme-themeSource", themeSource); } @@ -107,26 +108,30 @@ public void SetThemeSource(ThemeSourceMode themeSourceMode) /// A property that can be , or . It is used to override () and /// supercede the value that Chromium has chosen to use internally. /// - public Task GetThemeSourceAsync() => GetPropertyAsync(); + public Task GetThemeSourceAsync() => this.InvokeAsync(); /// /// A for if the OS / Chromium currently has a dark mode enabled or is /// being instructed to show a dark-style UI. If you want to modify this value you /// should use . /// - public Task ShouldUseDarkColorsAsync() => GetPropertyAsync(); + public Task ShouldUseDarkColorsAsync() => this.InvokeAsync(); /// /// A for if the OS / Chromium currently has high-contrast mode enabled or is /// being instructed to show a high-contrast UI. /// - public Task ShouldUseHighContrastColorsAsync() => GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] + public Task ShouldUseHighContrastColorsAsync() => this.InvokeAsync(); /// /// A for if the OS / Chromium currently has an inverted color scheme or is /// being instructed to use an inverted color scheme. /// - public Task ShouldUseInvertedColorSchemeAsync() => GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] + public Task ShouldUseInvertedColorSchemeAsync() => this.InvokeAsync(); /// /// Emitted when something in the underlying NativeTheme has changed. This normally means that either the value of , @@ -138,4 +143,4 @@ public event Action Updated remove => RemoveEvent(value, GetHashCode()); } } -} \ No newline at end of file +} diff --git a/src/ElectronNET.API/API/Notification.cs b/src/ElectronNET.API/API/Notification.cs index aaa0c479..e0e9f80b 100644 --- a/src/ElectronNET.API/API/Notification.cs +++ b/src/ElectronNET.API/API/Notification.cs @@ -9,7 +9,7 @@ namespace ElectronNET.API /// /// Create OS desktop notifications /// - public sealed class Notification: ApiBase + public sealed class Notification : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.NoDashUpperFirst; private static Notification _notification; @@ -88,10 +88,7 @@ private static void GenerateIDsForDefinedActions(NotificationOptions notificatio isActionDefined = true; BridgeConnector.Socket.Off("NotificationEventReply"); - BridgeConnector.Socket.On("NotificationEventReply", (args) => - { - _notificationOptions.Single(x => x.ReplyID == args[0]).OnReply(args[1]); - }); + BridgeConnector.Socket.On("NotificationEventReply", (args) => { _notificationOptions.Single(x => x.ReplyID == args[0]).OnReply(args[1]); }); } if (notificationOptions.OnAction != null) @@ -102,7 +99,11 @@ private static void GenerateIDsForDefinedActions(NotificationOptions notificatio BridgeConnector.Socket.Off("NotificationEventAction"); BridgeConnector.Socket.On("NotificationEventAction", (args) => { - _notificationOptions.Single(x => x.ActionID == args[0]).OnAction(args[1]); + var opt = _notificationOptions.Single(x => x.ActionID == args[0]); + if (int.TryParse(args[1], out var index)) + { + opt.OnAction(index); + } }); } @@ -116,6 +117,6 @@ private static void GenerateIDsForDefinedActions(NotificationOptions notificatio /// Whether or not desktop notifications are supported on the current system. /// /// - public Task IsSupportedAsync() => GetPropertyAsync(); + public Task IsSupportedAsync() => this.InvokeAsync(); } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/PowerMonitor.cs b/src/ElectronNET.API/API/PowerMonitor.cs index 51ae2818..776af480 100644 --- a/src/ElectronNET.API/API/PowerMonitor.cs +++ b/src/ElectronNET.API/API/PowerMonitor.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.Versioning; // ReSharper disable InconsistentNaming @@ -7,14 +8,16 @@ namespace ElectronNET.API /// /// Monitor power state changes.. /// - public sealed class PowerMonitor: ApiBase + public sealed class PowerMonitor : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketEventNameTypes SocketEventNameType => SocketEventNameTypes.DashedLower; /// - /// Emitted when the system is about to lock the screen. + /// Emitted when the system is about to lock the screen. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public event Action OnLockScreen { add => AddEvent(value); @@ -22,8 +25,10 @@ public event Action OnLockScreen } /// - /// Emitted when the system is about to unlock the screen. + /// Emitted when the system is about to unlock the screen. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public event Action OnUnLockScreen { add => AddEvent(value); @@ -51,6 +56,8 @@ public event Action OnResume /// /// Emitted when the system changes to AC power. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public event Action OnAC { add => AddEvent(value); @@ -60,6 +67,8 @@ public event Action OnAC /// /// Emitted when system changes to battery power. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public event Action OnBattery { add => AddEvent(value); @@ -72,6 +81,8 @@ public event Action OnBattery /// order for the app to exit cleanly.If `e.preventDefault()` is called, the app /// should exit as soon as possible by calling something like `app.quit()`. /// + [SupportedOSPlatform("Linux")] + [SupportedOSPlatform("macOS")] public event Action OnShutdown { add => AddEvent(value); @@ -104,4 +115,4 @@ internal static PowerMonitor Instance } } } -} \ No newline at end of file +} diff --git a/src/ElectronNET.API/API/Process.cs b/src/ElectronNET.API/API/Process.cs index 328b0074..e3c2d264 100644 --- a/src/ElectronNET.API/API/Process.cs +++ b/src/ElectronNET.API/API/Process.cs @@ -9,10 +9,11 @@ namespace ElectronNET.API /// Electron's process object is extended from the Node.js process object. It adds the /// events, properties, and methods. /// - public sealed class Process: ApiBase + public sealed class Process : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketTaskMessageNameTypes SocketTaskMessageNameType => SocketTaskMessageNameTypes.DashesLowerFirst; + internal Process() { } @@ -43,8 +44,8 @@ internal static Process Instance /// /// The process.execPath property returns the absolute pathname of the executable that /// started the Node.js process. Symbolic links, if any, are resolved. - /// - public Task ExecPathAsync => GetPropertyAsync(); + /// + public Task ExecPathAsync => this.InvokeAsync(); /// /// The process.argv property returns an array containing the command-line arguments passed @@ -53,56 +54,56 @@ internal static Process Instance /// will be the path to the JavaScript file being executed. The remaining elements will be /// any additional command-line arguments /// - public Task ArgvAsync => GetPropertyAsync(); + public Task ArgvAsync => this.InvokeAsync(); /// /// The process.execPath property returns the absolute pathname of the executable that /// started the Node.js process. Symbolic links, if any, are resolved. /// - public Task TypeAsync => GetPropertyAsync(); + public Task TypeAsync => this.InvokeAsync(); /// /// The process.versions property returns an object listing the version strings of /// chrome and electron. - /// - public Task VersionsAsync => GetPropertyAsync(); + /// + public Task VersionsAsync => this.InvokeAsync(); /// /// A Boolean. When app is started by being passed as parameter to the default app, this /// property is true in the main process, otherwise it is false. /// - public Task DefaultAppAsync => GetPropertyAsync(); + public Task DefaultAppAsync => this.InvokeAsync(); /// /// A Boolean, true when the current renderer context is the "main" renderer frame. If you /// want the ID of the current frame you should use webFrame.routingId /// - public Task IsMainFrameAsync => GetPropertyAsync(); + public Task IsMainFrameAsync => this.InvokeAsync(); /// /// A String representing the path to the resources directory. /// - public Task ResourcesPathAsync => GetPropertyAsync(); + public Task ResourcesPathAsync => this.InvokeAsync(); /// /// The number of seconds the current Node.js process has been running. The return value /// includes fractions of a second. Use Math.floor() to get whole seconds. /// - public Task UpTimeAsync => GetPropertyAsync(); + public Task UpTimeAsync => this.InvokeAsync(); /// /// The PID of the electron process /// - public Task PidAsync => GetPropertyAsync(); + public Task PidAsync => this.InvokeAsync(); /// /// The operating system CPU architecture for which the Node.js binary was compiled /// - public Task ArchAsync => GetPropertyAsync(); + public Task ArchAsync => this.InvokeAsync(); /// /// A string identifying the operating system platform on which the Node.js process is running /// - public Task PlatformAsync => GetPropertyAsync(); + public Task PlatformAsync => this.InvokeAsync(); } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Screen.cs b/src/ElectronNET.API/API/Screen.cs index 8c2b5cb0..5c81e583 100644 --- a/src/ElectronNET.API/API/Screen.cs +++ b/src/ElectronNET.API/API/Screen.cs @@ -1,6 +1,7 @@ using ElectronNET.API.Entities; using System; using System.Linq; +using System.Runtime.Versioning; using System.Text.Json; using System.Threading.Tasks; using ElectronNET.API.Serialization; @@ -10,7 +11,7 @@ namespace ElectronNET.API /// /// Retrieve information about screen size, displays, cursor position, etc. /// - public sealed class Screen: ApiBase + public sealed class Screen : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketTaskMessageNameTypes SocketTaskMessageNameType => SocketTaskMessageNameTypes.DashesLowerFirst; @@ -35,8 +36,8 @@ public event Action OnDisplayRemoved } /// - /// Emitted when one or more metrics change in a display. - /// The changedMetrics is an array of strings that describe the changes. + /// Emitted when one or more metrics change in a display. + /// The changedMetrics is an array of strings that describe the changes. /// Possible changes are bounds, workArea, scaleFactor and rotation. /// public event Action OnDisplayMetricsChanged @@ -56,6 +57,7 @@ public event Action OnDisplayMetricsChanged BridgeConnector.Socket.Emit("register-screen-display-metrics-changed", GetHashCode()); } + _onDisplayMetricsChanged += value; } remove @@ -101,37 +103,38 @@ internal static Screen Instance /// The current absolute position of the mouse pointer. /// /// - public Task GetCursorScreenPointAsync() => GetPropertyAsync(); + public Task GetCursorScreenPointAsync() => this.InvokeAsync(); /// /// macOS: The height of the menu bar in pixels. /// /// The height of the menu bar in pixels. - public Task GetMenuBarWorkAreaAsync() => GetPropertyAsync(); + [SupportedOSPlatform("macOS")] + public Task GetMenuBarWorkAreaAsync() => this.InvokeAsync(); /// /// The primary display. /// /// - public Task GetPrimaryDisplayAsync() => GetPropertyAsync(); + public Task GetPrimaryDisplayAsync() => this.InvokeAsync(); /// /// An array of displays that are currently available. /// /// An array of displays that are currently available. - public Task GetAllDisplaysAsync() => GetPropertyAsync(); + public Task GetAllDisplaysAsync() => this.InvokeAsync(); /// /// The display nearest the specified point. /// /// The display nearest the specified point. - public Task GetDisplayNearestPointAsync(Point point) => GetPropertyAsync(point); + public Task GetDisplayNearestPointAsync(Point point) => this.InvokeAsync(point); /// /// The display that most closely intersects the provided bounds. /// /// /// The display that most closely intersects the provided bounds. - public Task GetDisplayMatchingAsync(Rectangle rectangle) => GetPropertyAsync(rectangle); + public Task GetDisplayMatchingAsync(Rectangle rectangle) => this.InvokeAsync(rectangle); } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Session.cs b/src/ElectronNET.API/API/Session.cs index bee7566c..a7459cb4 100644 --- a/src/ElectronNET.API/API/Session.cs +++ b/src/ElectronNET.API/API/Session.cs @@ -47,10 +47,10 @@ public void AllowNTLMCredentialsForDomains(string domains) /// public Task ClearAuthCacheAsync(RemovePassword options) { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.Once("webContents-session-clearAuthCache-completed" + guid, () => tcs.SetResult(null)); + BridgeConnector.Socket.Once("webContents-session-clearAuthCache-completed" + guid, () => tcs.SetResult()); BridgeConnector.Socket.Emit("webContents-session-clearAuthCache", Id, options, guid); return tcs.Task; @@ -61,10 +61,10 @@ public Task ClearAuthCacheAsync(RemovePassword options) /// public Task ClearAuthCacheAsync() { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.Once("webContents-session-clearAuthCache-completed" + guid, () => tcs.SetResult(null)); + BridgeConnector.Socket.Once("webContents-session-clearAuthCache-completed" + guid, () => tcs.SetResult()); BridgeConnector.Socket.Emit("webContents-session-clearAuthCache", Id, guid); return tcs.Task; @@ -76,10 +76,10 @@ public Task ClearAuthCacheAsync() /// public Task ClearCacheAsync() { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.Once("webContents-session-clearCache-completed" + guid, () => tcs.SetResult(null)); + BridgeConnector.Socket.Once("webContents-session-clearCache-completed" + guid, () => tcs.SetResult()); BridgeConnector.Socket.Emit("webContents-session-clearCache", Id, guid); return tcs.Task; @@ -91,10 +91,10 @@ public Task ClearCacheAsync() /// public Task ClearHostResolverCacheAsync() { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.Once("webContents-session-clearHostResolverCache-completed" + guid, () => tcs.SetResult(null)); + BridgeConnector.Socket.Once("webContents-session-clearHostResolverCache-completed" + guid, () => tcs.SetResult()); BridgeConnector.Socket.Emit("webContents-session-clearHostResolverCache", Id, guid); return tcs.Task; @@ -106,10 +106,10 @@ public Task ClearHostResolverCacheAsync() /// public Task ClearStorageDataAsync() { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.Once("webContents-session-clearStorageData-completed" + guid, () => tcs.SetResult(null)); + BridgeConnector.Socket.Once("webContents-session-clearStorageData-completed" + guid, () => tcs.SetResult()); BridgeConnector.Socket.Emit("webContents-session-clearStorageData", Id, guid); return tcs.Task; @@ -122,10 +122,10 @@ public Task ClearStorageDataAsync() /// public Task ClearStorageDataAsync(ClearStorageDataOptions options) { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.Once("webContents-session-clearStorageData-options-completed" + guid, () => tcs.SetResult(null)); + BridgeConnector.Socket.Once("webContents-session-clearStorageData-options-completed" + guid, () => tcs.SetResult()); BridgeConnector.Socket.Emit("webContents-session-clearStorageData-options", Id, options, guid); return tcs.Task; @@ -276,10 +276,10 @@ public void SetPreloads(string[] preloads) /// public Task SetProxyAsync(ProxyConfig config) { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.Once("webContents-session-setProxy-completed" + guid, () => tcs.SetResult(null)); + BridgeConnector.Socket.Once("webContents-session-setProxy-completed" + guid, () => tcs.SetResult()); BridgeConnector.Socket.Emit("webContents-session-setProxy", Id, config, guid); return tcs.Task; @@ -373,7 +373,5 @@ public Task LoadExtensionAsync(string path, bool allowFileAccess = fa return tcs.Task; } - - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Shell.cs b/src/ElectronNET.API/API/Shell.cs index 14bfcbcb..888b3097 100644 --- a/src/ElectronNET.API/API/Shell.cs +++ b/src/ElectronNET.API/API/Shell.cs @@ -1,8 +1,7 @@ +using System.Runtime.Versioning; +using System.Threading.Tasks; using ElectronNET.API.Entities; using ElectronNET.API.Extensions; -using ElectronNET.API.Serialization; -using System.Text.Json; -using System.Threading.Tasks; namespace ElectronNET.API { @@ -43,13 +42,9 @@ internal static Shell Instance /// The full path to the directory / file. public Task ShowItemInFolderAsync(string fullPath) { - var tcs = new TaskCompletionSource(); - - // Is this really useful? - BridgeConnector.Socket.Once("shell-showItemInFolderCompleted", () => { }); BridgeConnector.Socket.Emit("shell-showItemInFolder", fullPath); - return tcs.Task; + return Task.CompletedTask; } /// @@ -68,7 +63,7 @@ public Task OpenPathAsync(string path) } /// - /// Open the given external protocol URL in the desktop’s default manner. + /// Open the given external protocol URL in the desktop’s default manner. /// (For example, mailto: URLs in the user’s default mail agent). /// /// Max 2081 characters on windows. @@ -79,7 +74,7 @@ public Task OpenExternalAsync(string url) } /// - /// Open the given external protocol URL in the desktop’s default manner. + /// Open the given external protocol URL in the desktop’s default manner. /// (For example, mailto: URLs in the user’s default mail agent). /// /// Max 2081 characters on windows. @@ -133,12 +128,13 @@ public void Beep() /// Default is /// Structure of a shortcut. /// Whether the shortcut was created successfully. + [SupportedOSPlatform("Windows")] public Task WriteShortcutLinkAsync(string shortcutPath, ShortcutLinkOperation operation, ShortcutDetails options) { var tcs = new TaskCompletionSource(); BridgeConnector.Socket.Once("shell-writeShortcutLinkCompleted", tcs.SetResult); - BridgeConnector.Socket.Emit("shell-writeShortcutLink", shortcutPath, operation.GetDescription(), options); + BridgeConnector.Socket.Emit("shell-writeShortcutLink", shortcutPath, operation, options); return tcs.Task; } @@ -149,6 +145,7 @@ public Task WriteShortcutLinkAsync(string shortcutPath, ShortcutLinkOperat /// /// The path tot the shortcut. /// of the shortcut. + [SupportedOSPlatform("Windows")] public Task ReadShortcutLinkAsync(string shortcutPath) { var tcs = new TaskCompletionSource(); @@ -158,7 +155,5 @@ public Task ReadShortcutLinkAsync(string shortcutPath) return tcs.Task; } - - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/Tray.cs b/src/ElectronNET.API/API/Tray.cs index a18b178e..4a0e84c6 100644 --- a/src/ElectronNET.API/API/Tray.cs +++ b/src/ElectronNET.API/API/Tray.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Versioning; using System.Text.Json; using System.Threading.Tasks; using ElectronNET.API.Serialization; @@ -14,7 +15,7 @@ namespace ElectronNET.API /// /// Add icons and context menus to the system's notification area. /// - public sealed class Tray: ApiBase + public sealed class Tray : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketEventNameTypes SocketEventNameType => SocketEventNameTypes.DashedLower; @@ -38,6 +39,7 @@ public event Action OnClick BridgeConnector.Socket.Emit("register-tray-click", GetHashCode()); } + _click += value; } remove @@ -56,6 +58,8 @@ public event Action OnClick /// /// macOS, Windows: Emitted when the tray icon is right clicked. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public event Action OnRightClick { add @@ -72,6 +76,7 @@ public event Action OnRightClick BridgeConnector.Socket.Emit("register-tray-right-click", GetHashCode()); } + _rightClick += value; } remove @@ -90,6 +95,8 @@ public event Action OnRightClick /// /// macOS, Windows: Emitted when the tray icon is double clicked. /// + [SupportedOSPlatform("macOS")] + [SupportedOSPlatform("Windows")] public event Action OnDoubleClick { add @@ -106,6 +113,7 @@ public event Action OnDoubleClick BridgeConnector.Socket.Emit("register-tray-double-click", GetHashCode()); } + _doubleClick += value; } remove @@ -124,6 +132,7 @@ public event Action OnDoubleClick /// /// Windows: Emitted when the tray balloon shows. /// + [SupportedOSPlatform("Windows")] public event Action OnBalloonShow { add => AddEvent(value, GetHashCode()); @@ -133,6 +142,7 @@ public event Action OnBalloonShow /// /// Windows: Emitted when the tray balloon is clicked. /// + [SupportedOSPlatform("Windows")] public event Action OnBalloonClick { add => AddEvent(value, GetHashCode()); @@ -140,9 +150,10 @@ public event Action OnBalloonClick } /// - /// Windows: Emitted when the tray balloon is closed + /// Windows: Emitted when the tray balloon is closed /// because of timeout or user manually closes it. /// + [SupportedOSPlatform("Windows")] public event Action OnBalloonClosed { add => AddEvent(value, GetHashCode()); @@ -209,11 +220,33 @@ public async Task Show(string image, MenuItem[] menuItems) _items.Clear(); _items.AddRange(menuItems); + RegisterMenuItemClickedHandler(); + } + + /// + /// Sets the tray menu items. + /// + /// Calling this method updates the context menu with the specified items. Any previously + /// set menu items will be replaced. + /// An array of objects representing the menu items to display in the tray menu. + /// Cannot be null. + public async Task SetMenuItems(MenuItem[] menuItems) + { + menuItems.AddMenuItemsId(); + await BridgeConnector.Socket.Emit("set-contextMenu", new object[] { menuItems }).ConfigureAwait(false); + _items.Clear(); + _items.AddRange(menuItems); + + RegisterMenuItemClickedHandler(); + } + + private void RegisterMenuItemClickedHandler() + { BridgeConnector.Socket.Off("trayMenuItemClicked"); BridgeConnector.Socket.On("trayMenuItemClicked", (id) => { MenuItem menuItem = _items.GetMenuItem(id); - menuItem?.Click(); + menuItem?.Click?.Invoke(); }); } @@ -248,6 +281,7 @@ public async Task SetImage(string image) /// Sets the image associated with this tray icon when pressed on macOS. /// /// + [SupportedOSPlatform("macOS")] public async Task SetPressedImage(string image) { await BridgeConnector.Socket.Emit("tray-setPressedImage", image).ConfigureAwait(false); @@ -266,6 +300,7 @@ public async Task SetToolTip(string toolTip) /// macOS: Sets the title displayed aside of the tray icon in the status bar. /// /// + [SupportedOSPlatform("macOS")] public async Task SetTitle(string title) { await BridgeConnector.Socket.Emit("tray-setTitle", title).ConfigureAwait(false); @@ -275,6 +310,7 @@ public async Task SetTitle(string title) /// Windows: Displays a tray balloon. /// /// + [SupportedOSPlatform("Windows")] public async Task DisplayBalloon(DisplayBalloonOptions options) { await BridgeConnector.Socket.Emit("tray-displayBalloon", options).ConfigureAwait(false); @@ -295,7 +331,6 @@ public async Task IsDestroyedAsync() } - private const string ModuleName = "tray"; /// diff --git a/src/ElectronNET.API/API/WebContents.cs b/src/ElectronNET.API/API/WebContents.cs index 761bfed4..7657b413 100644 --- a/src/ElectronNET.API/API/WebContents.cs +++ b/src/ElectronNET.API/API/WebContents.cs @@ -1,6 +1,7 @@ -using ElectronNET.API.Entities; using System; using System.Threading.Tasks; +using ElectronNET.API.Entities; +using ElectronNET.Common; // ReSharper disable InconsistentNaming @@ -9,7 +10,7 @@ namespace ElectronNET.API; /// /// Render and control web pages. /// -public class WebContents: ApiBase +public class WebContents : ApiBase { protected override SocketTaskEventNameTypes SocketTaskEventNameType => SocketTaskEventNameTypes.DashesLowerFirst; protected override SocketTaskMessageNameTypes SocketTaskMessageNameType => SocketTaskMessageNameTypes.DashesLowerFirst; @@ -123,7 +124,7 @@ internal WebContents(int id) /// public void OpenDevTools() { - BridgeConnector.Socket.Emit("webContentsOpenDevTools", Id); + BridgeConnector.Socket.Emit("webContents-openDevTools", Id); } /// @@ -132,31 +133,66 @@ public void OpenDevTools() /// public void OpenDevTools(OpenDevToolsOptions openDevToolsOptions) { - BridgeConnector.Socket.Emit("webContentsOpenDevTools", Id, openDevToolsOptions); + BridgeConnector.Socket.Emit("webContents-openDevTools", Id, openDevToolsOptions); + } + + /// + /// Toggles the devtools. + /// + public void ToggleDevTools() + { + BridgeConnector.Socket.Emit("webContents-toggleDevTools", Id); + } + + /// + /// Closes the devtools. + /// + public void CloseDevTools() + { + BridgeConnector.Socket.Emit("webContents-closeDevTools", Id); + } + + /// + /// Returns boolean - Whether the devtools is opened. + /// + /// + public bool IsDevToolsOpened() + { + return Task.Run(() => InvokeAsync()).Result; + } + + /// + /// Returns boolean - Whether the devtools view is focused. + /// + /// + public bool IsDevToolsFocused() + { + return Task.Run(() => InvokeAsync()).Result; } /// /// Get system printers. /// /// printers - public Task GetPrintersAsync() => GetPropertyAsync(); + public Task GetPrintersAsync() => this.InvokeAsyncWithTimeout(8.seconds()); /// /// Prints window's web page. /// /// /// success - public Task PrintAsync(PrintOptions options) => GetPropertyAsync(options); + public Task PrintAsync(PrintOptions options) => this.InvokeAsync(options); + /// /// Prints window's web page. /// /// success - public Task PrintAsync() => GetPropertyAsync(string.Empty); + public Task PrintAsync() => this.InvokeAsync(string.Empty); /// /// Prints window's web page as PDF with Chromium's preview printing custom - /// settings.The landscape will be ignored if @page CSS at-rule is used in the web page. - /// By default, an empty options will be regarded as: Use page-break-before: always; + /// settings.The landscape will be ignored if @page CSS at-rule is used in the web page. + /// By default, an empty options will be regarded as: Use page-break-before: always; /// CSS style to force to print to a new page. /// /// @@ -222,7 +258,7 @@ public Task GetUrl() } /// - /// The async method will resolve when the page has finished loading, + /// The async method will resolve when the page has finished loading, /// and rejects if the page fails to load. /// /// A noop rejection handler is already attached, which avoids unhandled rejection @@ -239,7 +275,7 @@ public Task LoadURLAsync(string url) } /// - /// The async method will resolve when the page has finished loading, + /// The async method will resolve when the page has finished loading, /// and rejects if the page fails to load. /// /// A noop rejection handler is already attached, which avoids unhandled rejection @@ -253,18 +289,15 @@ public Task LoadURLAsync(string url) /// public Task LoadURLAsync(string url, LoadURLOptions options) { - var tcs = new TaskCompletionSource(); + var tcs = new TaskCompletionSource(); BridgeConnector.Socket.Once("webContents-loadURL-complete" + Id, () => { BridgeConnector.Socket.Off("webContents-loadURL-error" + Id); - tcs.SetResult(null); + tcs.SetResult(); }); - BridgeConnector.Socket.Once("webContents-loadURL-error" + Id, (error) => - { - tcs.SetException(new InvalidOperationException(error)); - }); + BridgeConnector.Socket.Once("webContents-loadURL-error" + Id, (error) => { tcs.SetException(new InvalidOperationException(error)); }); BridgeConnector.Socket.Emit("webContents-loadURL", Id, url, options); @@ -282,4 +315,88 @@ public void InsertCSS(bool isBrowserWindow, string path) { BridgeConnector.Socket.Emit("webContents-insertCSS", Id, isBrowserWindow, path); } -} + + /// + /// Returns number - The current zoom factor. + /// + /// + public Task GetZoomFactorAsync() => InvokeAsync(); + + /// + /// Changes the zoom factor to the specified factor. + /// Zoom factor is zoom percent divided by 100, so 300% = 3.0. + /// The factor must be greater than 0.0. + /// + /// + public void SetZoomFactor(double factor) + { + BridgeConnector.Socket.Emit("webContents-setZoomFactor", Id, factor); + } + + /// + /// Returns number - The current zoom level. + /// + /// + public Task GetZoomLevelAsync() => InvokeAsync(); + + /// + /// Changes the zoom level to the specified level. + /// The original size is 0 and each increment above or below represents zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively. + /// + /// + public void SetZoomLevel(int level) + { + BridgeConnector.Socket.Emit("webContents-setZoomLevel", Id, level); + } + + /// + /// Sets the maximum and minimum pinch-to-zoom level. + /// + /// + /// + public Task SetVisualZoomLevelLimitsAsync(int minimumLevel, int maximumLevel) + { + var tcs = new TaskCompletionSource(); + + BridgeConnector.Socket.Once("webContents-setVisualZoomLevelLimits-completed", tcs.SetResult); + BridgeConnector.Socket.Emit("webContents-setVisualZoomLevelLimits", Id, minimumLevel, maximumLevel); + + return tcs.Task; + } + + /// + /// Returns boolean - Whether this page has been muted. + /// + /// + public Task IsAudioMutedAsync() => InvokeAsync(); + + /// + /// Returns boolean - Whether audio is currently playing. + /// + /// + public Task IsCurrentlyAudibleAsync() => InvokeAsync(); + + /// + /// Mute the audio on the current web page. + /// + /// + public void SetAudioMuted(bool muted) + { + BridgeConnector.Socket.Emit("webContents-setAudioMuted", Id, muted); + } + + /// + /// Returns string - The user agent for this web page. + /// + /// + public Task GetUserAgentAsync() => InvokeAsyncWithTimeout(3.seconds()); + + /// + /// Overrides the user agent for this web page. + /// + /// + public void SetUserAgent(string userAgent) + { + BridgeConnector.Socket.Emit("webContents-setUserAgent", Id, userAgent); + } +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/WebRequest.cs b/src/ElectronNET.API/API/WebRequest.cs index 0bbd5efa..a39a97b7 100644 --- a/src/ElectronNET.API/API/WebRequest.cs +++ b/src/ElectronNET.API/API/WebRequest.cs @@ -59,4 +59,4 @@ public void RemoveListener(Action> listen } } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/API/WindowManager.cs b/src/ElectronNET.API/API/WindowManager.cs index 665aef0a..20a6b193 100644 --- a/src/ElectronNET.API/API/WindowManager.cs +++ b/src/ElectronNET.API/API/WindowManager.cs @@ -158,8 +158,8 @@ private bool IsWindows10() } /// - /// A BrowserView can be used to embed additional web content into a BrowserWindow. - /// It is like a child window, except that it is positioned relative to its owning window. + /// A BrowserView can be used to embed additional web content into a BrowserWindow. + /// It is like a child window, except that it is positioned relative to its owning window. /// It is meant to be an alternative to the webview tag. /// /// @@ -169,8 +169,8 @@ public Task CreateBrowserViewAsync() } /// - /// A BrowserView can be used to embed additional web content into a BrowserWindow. - /// It is like a child window, except that it is positioned relative to its owning window. + /// A BrowserView can be used to embed additional web content into a BrowserWindow. + /// It is like a child window, except that it is positioned relative to its owning window. /// It is meant to be an alternative to the webview tag. /// /// @@ -192,6 +192,5 @@ public async Task CreateBrowserViewAsync(BrowserViewConstructorOpti return await tcs.Task.ConfigureAwait(false); } - } } \ No newline at end of file diff --git a/src/ElectronNET.API/Bridge/SocketIOFacade.cs b/src/ElectronNET.API/Bridge/SocketIOFacade.cs index ed13afc9..4db0a0b7 100644 --- a/src/ElectronNET.API/Bridge/SocketIOFacade.cs +++ b/src/ElectronNET.API/Bridge/SocketIOFacade.cs @@ -2,12 +2,10 @@ // ReSharper disable once CheckNamespace namespace ElectronNET.API; -using ElectronNET.API.Serialization; -using SocketIO.Serializer.SystemTextJson; using System; -using System.Linq; -using System.Text.Json; using System.Threading.Tasks; +using ElectronNET.API.Serialization; +using SocketIO.Serializer.SystemTextJson; using SocketIO = SocketIOClient.SocketIO; internal class SocketIoFacade @@ -66,20 +64,6 @@ public void On(string eventName, Action action) } } - // Keep object overload for compatibility; value will be a JsonElement boxed as object. - public void On(string eventName, Action action) - { - lock (_lockObj) - { - _socket.On(eventName, response => - { - var value = (object)response.GetValue(); - ////Console.WriteLine($"Called Event {eventName} - data {value}"); - Task.Run(() => action(value)); - }); - } - } - public void Once(string eventName, Action action) { lock (_lockObj) @@ -121,4 +105,4 @@ public void DisposeSocket() { _socket.Dispose(); } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Common/Extensions.cs b/src/ElectronNET.API/Common/Extensions.cs index 515488b0..a5de118c 100644 --- a/src/ElectronNET.API/Common/Extensions.cs +++ b/src/ElectronNET.API/Common/Extensions.cs @@ -51,14 +51,14 @@ public static string StripAsync(this string str) return str; } - + public static string StripOn(this string str) { if (string.IsNullOrWhiteSpace(str) || !str.StartsWith("On", StringComparison.Ordinal)) { return str; } - + return str.Substring(2); } @@ -66,7 +66,7 @@ public static string ToDashedEventName(this string str) { return string.Join("-", Regex.Split(str.StripOn(), "(? +// Copyright © Emby LLC. All rights reserved. +// + +namespace ElectronNET.Common +{ + using System; + using System.Diagnostics.CodeAnalysis; + + /// + /// The TimeSpanExtensions class. + /// + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "OK")] + [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "OK")] + [SuppressMessage("ReSharper", "StyleCop.SA1300", Justification = "OK")] + [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "OK")] + internal static class TimeSpanExtensions + { + public static TimeSpan ms(this int value) + { + return TimeSpan.FromMilliseconds(value); + } + + public static TimeSpan ms(this long value) + { + return TimeSpan.FromMilliseconds(value); + } + + public static TimeSpan seconds(this int value) + { + return TimeSpan.FromSeconds(value); + } + + public static TimeSpan minutes(this int value) + { + return TimeSpan.FromMinutes(value); + } + + public static TimeSpan hours(this int value) + { + return TimeSpan.FromHours(value); + } + + public static TimeSpan days(this int value) + { + return TimeSpan.FromDays(value); + } + + public static TimeSpan ms(this double value) + { + return TimeSpan.FromMilliseconds(value); + } + + public static TimeSpan seconds(this double value) + { + return TimeSpan.FromSeconds(value); + } + + public static TimeSpan minutes(this double value) + { + return TimeSpan.FromMinutes(value); + } + + public static TimeSpan hours(this double value) + { + return TimeSpan.FromHours(value); + } + + public static TimeSpan days(this double value) + { + return TimeSpan.FromDays(value); + } + } +} diff --git a/src/ElectronNET.API/Converter/ModifierTypeListConverter.cs b/src/ElectronNET.API/Converter/ModifierTypeListConverter.cs index 737a0ab5..371f71a3 100644 --- a/src/ElectronNET.API/Converter/ModifierTypeListConverter.cs +++ b/src/ElectronNET.API/Converter/ModifierTypeListConverter.cs @@ -23,6 +23,7 @@ public override List Read(ref Utf8JsonReader reader, Type typeToCo { throw new JsonException("Expected array for ModifierType list"); } + while (reader.Read()) { if (reader.TokenType == JsonTokenType.EndArray) break; @@ -30,6 +31,7 @@ public override List Read(ref Utf8JsonReader reader, Type typeToCo var s = reader.GetString(); list.Add((ModifierType)Enum.Parse(typeof(ModifierType), s, ignoreCase: true)); } + return list; } @@ -38,8 +40,9 @@ public override void Write(Utf8JsonWriter writer, List value, Json writer.WriteStartArray(); foreach (var modifier in value) { - writer.WriteStringValue(modifier.ToString()); + writer.WriteStringValue(modifier.ToString().ToLowerInvariant()); } + writer.WriteEndArray(); } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Converter/PageSizeConverter.cs b/src/ElectronNET.API/Converter/PageSizeConverter.cs index c79dc278..d896c7ad 100644 --- a/src/ElectronNET.API/Converter/PageSizeConverter.cs +++ b/src/ElectronNET.API/Converter/PageSizeConverter.cs @@ -42,5 +42,4 @@ public override void Write(Utf8JsonWriter writer, PageSize value, JsonSerializer JsonSerializer.Serialize(writer, value, ElectronJson.Options); } } -} - +} \ No newline at end of file diff --git a/src/ElectronNET.API/Converter/TitleBarOverlayConverter.cs b/src/ElectronNET.API/Converter/TitleBarOverlayConverter.cs index 2d6044a9..e41fca09 100644 --- a/src/ElectronNET.API/Converter/TitleBarOverlayConverter.cs +++ b/src/ElectronNET.API/Converter/TitleBarOverlayConverter.cs @@ -42,5 +42,4 @@ public override void Write(Utf8JsonWriter writer, TitleBarOverlay value, JsonSer JsonSerializer.Serialize(writer, value, ElectronJson.Options); } } -} - +} \ No newline at end of file diff --git a/src/ElectronNET.API/ElectronNET.API.csproj b/src/ElectronNET.API/ElectronNET.API.csproj index 3a500110..7a1cda19 100644 --- a/src/ElectronNET.API/ElectronNET.API.csproj +++ b/src/ElectronNET.API/ElectronNET.API.csproj @@ -28,12 +28,13 @@ runtime; build; native; contentfiles; analyzers - - + + + diff --git a/src/ElectronNET.API/ElectronNetRuntime.cs b/src/ElectronNET.API/ElectronNetRuntime.cs index 8fd0f0b0..78d976e8 100644 --- a/src/ElectronNET.API/ElectronNetRuntime.cs +++ b/src/ElectronNET.API/ElectronNetRuntime.cs @@ -24,6 +24,8 @@ static ElectronNetRuntime() StartupManager.Initialize(); } + public static string ElectronExtraArguments { get; set; } + public static int? ElectronSocketPort { get; internal set; } public static int? AspNetWebPort { get; internal set; } @@ -52,4 +54,4 @@ internal static SocketIoFacade GetSocket() return RuntimeControllerCore?.Socket; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Runtime/Controllers/RuntimeControllerDotNetFirst.cs b/src/ElectronNET.API/Runtime/Controllers/RuntimeControllerDotNetFirst.cs index 8e1633dd..70591674 100644 --- a/src/ElectronNET.API/Runtime/Controllers/RuntimeControllerDotNetFirst.cs +++ b/src/ElectronNET.API/Runtime/Controllers/RuntimeControllerDotNetFirst.cs @@ -40,7 +40,7 @@ protected override Task StartCore() { var isUnPacked = ElectronNetRuntime.StartupMethod.IsUnpackaged(); var electronBinaryName = ElectronNetRuntime.ElectronExecutable; - var args = Environment.CommandLine; + var args = string.Format("{0} {1}", ElectronNetRuntime.ElectronExtraArguments, Environment.CommandLine).Trim(); this.port = ElectronNetRuntime.ElectronSocketPort; if (!this.port.HasValue) @@ -49,10 +49,15 @@ protected override Task StartCore() ElectronNetRuntime.ElectronSocketPort = this.port; } + Console.Error.WriteLine("[StartCore]: isUnPacked: {0}", isUnPacked); + Console.Error.WriteLine("[StartCore]: electronBinaryName: {0}", electronBinaryName); + Console.Error.WriteLine("[StartCore]: args: {0}", args); + this.electronProcess = new ElectronProcessActive(isUnPacked, electronBinaryName, args, this.port.Value); this.electronProcess.Ready += this.ElectronProcess_Ready; this.electronProcess.Stopped += this.ElectronProcess_Stopped; + Console.Error.WriteLine("[StartCore]: Before Start"); return this.electronProcess.Start(); } @@ -82,11 +87,11 @@ private void ElectronProcess_Stopped(object sender, EventArgs e) private void HandleStopped() { - if (this.socketBridge.State != LifetimeState.Stopped) + if (this.socketBridge != null && this.socketBridge.State != LifetimeState.Stopped) { this.socketBridge.Stop(); } - else if (this.electronProcess.State != LifetimeState.Stopped) + else if (this.electronProcess != null && this.electronProcess.State != LifetimeState.Stopped) { this.electronProcess.Stop(); } diff --git a/src/ElectronNET.API/Runtime/Data/DotnetAppType.cs b/src/ElectronNET.API/Runtime/Data/DotnetAppType.cs index d52328a6..9a48304b 100644 --- a/src/ElectronNET.API/Runtime/Data/DotnetAppType.cs +++ b/src/ElectronNET.API/Runtime/Data/DotnetAppType.cs @@ -8,4 +8,4 @@ public enum DotnetAppType /// ASP.NET Core cross-platform app. AspNetCoreApp, } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Runtime/Data/LifetimeState.cs b/src/ElectronNET.API/Runtime/Data/LifetimeState.cs index 1785887a..a643a043 100644 --- a/src/ElectronNET.API/Runtime/Data/LifetimeState.cs +++ b/src/ElectronNET.API/Runtime/Data/LifetimeState.cs @@ -9,4 +9,4 @@ public enum LifetimeState Stopping, Stopped, } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Runtime/Data/StartupMethod.cs b/src/ElectronNET.API/Runtime/Data/StartupMethod.cs index 9d3e380b..2dcf68a8 100644 --- a/src/ElectronNET.API/Runtime/Data/StartupMethod.cs +++ b/src/ElectronNET.API/Runtime/Data/StartupMethod.cs @@ -34,4 +34,4 @@ public enum StartupMethod /// UnpackedDotnetFirst, } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Runtime/Helpers/LaunchOrderDetector.cs b/src/ElectronNET.API/Runtime/Helpers/LaunchOrderDetector.cs index 8320cfe0..203fb476 100644 --- a/src/ElectronNET.API/Runtime/Helpers/LaunchOrderDetector.cs +++ b/src/ElectronNET.API/Runtime/Helpers/LaunchOrderDetector.cs @@ -69,4 +69,4 @@ public static bool CheckIsLaunchedByDotNet() return null; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Runtime/Helpers/PortHelper.cs b/src/ElectronNET.API/Runtime/Helpers/PortHelper.cs index 3a141082..f627c971 100644 --- a/src/ElectronNET.API/Runtime/Helpers/PortHelper.cs +++ b/src/ElectronNET.API/Runtime/Helpers/PortHelper.cs @@ -21,6 +21,5 @@ public static int GetFreePort(int? defaultPost) port += 2; } } - } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Runtime/Helpers/UnpackagedDetector.cs b/src/ElectronNET.API/Runtime/Helpers/UnpackagedDetector.cs index d4fbd9da..f5c5f549 100644 --- a/src/ElectronNET.API/Runtime/Helpers/UnpackagedDetector.cs +++ b/src/ElectronNET.API/Runtime/Helpers/UnpackagedDetector.cs @@ -106,4 +106,4 @@ public static bool CheckIsUnpackaged() return null; } } -} +} \ No newline at end of file diff --git a/src/ElectronNET.API/Runtime/Services/ElectronProcess/ElectronProcessActive.cs b/src/ElectronNET.API/Runtime/Services/ElectronProcess/ElectronProcessActive.cs index 297c17c5..61cae062 100644 --- a/src/ElectronNET.API/Runtime/Services/ElectronProcess/ElectronProcessActive.cs +++ b/src/ElectronNET.API/Runtime/Services/ElectronProcess/ElectronProcessActive.cs @@ -5,6 +5,7 @@ using System; using System.ComponentModel; using System.IO; + using System.Runtime.InteropServices; using System.Threading.Tasks; /// @@ -42,6 +43,11 @@ protected override Task StartCore() var electrondir = Path.Combine(dir.FullName, ".electron"); startCmd = Path.Combine(electrondir, "node_modules", "electron", "dist", "electron"); + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + startCmd = Path.Combine(electrondir, "node_modules", "electron", "dist", "Electron.app", "Contents", "MacOS", "Electron"); + } + args = $"main.js -unpackeddotnet --trace-warnings -electronforcedport={this.socketPort:D} " + this.extraArguments; workingDir = electrondir; } @@ -68,22 +74,40 @@ protected override Task StopCore() private async Task StartInternal(string startCmd, string args, string directoriy) { - await Task.Delay(10).ConfigureAwait(false); + try + { + await Task.Delay(10.ms()).ConfigureAwait(false); - this.process = new ProcessRunner("ElectronRunner"); - this.process.ProcessExited += this.Process_Exited; - this.process.Run(startCmd, args, directoriy); + Console.Error.WriteLine("[StartInternal]: startCmd: {0}", startCmd); + Console.Error.WriteLine("[StartInternal]: args: {0}", args); - await Task.Delay(500).ConfigureAwait(false); + this.process = new ProcessRunner("ElectronRunner"); + this.process.ProcessExited += this.Process_Exited; + this.process.Run(startCmd, args, directoriy); - if (!this.process.IsRunning) - { - Task.Run(() => this.TransitionState(LifetimeState.Stopped)); + await Task.Delay(500.ms()).ConfigureAwait(false); - throw new Exception("Failed to launch the Electron process."); - } + Console.Error.WriteLine("[StartInternal]: after run:"); + + if (!this.process.IsRunning) + { + Console.Error.WriteLine("[StartInternal]: Process is not running: " + this.process.StandardError); + Console.Error.WriteLine("[StartInternal]: Process is not running: " + this.process.StandardOutput); - this.TransitionState(LifetimeState.Ready); + Task.Run(() => this.TransitionState(LifetimeState.Stopped)); + + throw new Exception("Failed to launch the Electron process."); + } + + this.TransitionState(LifetimeState.Ready); + } + catch (Exception ex) + { + Console.Error.WriteLine("[StartInternal]: Exception: " + this.process?.StandardError); + Console.Error.WriteLine("[StartInternal]: Exception: " + this.process?.StandardOutput); + Console.Error.WriteLine("[StartInternal]: Exception: " + ex); + throw; + } } private void Process_Exited(object sender, EventArgs e) diff --git a/src/ElectronNET.API/Runtime/StartupManager.cs b/src/ElectronNET.API/Runtime/StartupManager.cs index 607d58b9..125b6dee 100644 --- a/src/ElectronNET.API/Runtime/StartupManager.cs +++ b/src/ElectronNET.API/Runtime/StartupManager.cs @@ -132,13 +132,19 @@ private BuildInfo GatherBuildInfo() if (electronAssembly == null) { + Console.WriteLine("GatherBuildInfo: Early exit"); return buildInfo; } if (electronAssembly.GetName().Name == "testhost" || electronAssembly.GetName().Name == "ReSharperTestRunner") { + Console.WriteLine("GatherBuildInfo: Detected testhost"); electronAssembly = AppDomain.CurrentDomain.GetData("ElectronTestAssembly") as Assembly ?? electronAssembly; } + else + { + Console.WriteLine("GatherBuildInfo: No testhost detected: " + electronAssembly.GetName().Name); + } var attributes = electronAssembly.GetCustomAttributes().ToList(); diff --git a/src/ElectronNET.API/Serialization/ElectronJson.cs b/src/ElectronNET.API/Serialization/ElectronJson.cs index 37209850..3fa06ddf 100644 --- a/src/ElectronNET.API/Serialization/ElectronJson.cs +++ b/src/ElectronNET.API/Serialization/ElectronJson.cs @@ -30,5 +30,4 @@ internal static class ElectronJson internal partial class ElectronJsonContext : JsonSerializerContext { } -} - +} \ No newline at end of file diff --git a/src/ElectronNET.API/Serialization/JsonToBoxedPrimitivesConverter.cs b/src/ElectronNET.API/Serialization/JsonToBoxedPrimitivesConverter.cs new file mode 100644 index 00000000..5db53047 --- /dev/null +++ b/src/ElectronNET.API/Serialization/JsonToBoxedPrimitivesConverter.cs @@ -0,0 +1,126 @@ +namespace ElectronNET.Serialization +{ + using System; + using System.Collections.Generic; + using System.Text.Json; + using System.Text.Json.Serialization; + + public sealed class JsonToBoxedPrimitivesConverter : JsonConverter + { + public override object Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return ReadValue(ref reader); + } + + private static object ReadValue(ref Utf8JsonReader r) + { + switch (r.TokenType) + { + case JsonTokenType.StartObject: + + var obj = new Dictionary(); + while (r.Read()) + { + if (r.TokenType == JsonTokenType.EndObject) + { + return obj; + } + + if (r.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException("Expected property name."); + } + + string name = r.GetString()!; + if (!r.Read()) + { + throw new JsonException("Unexpected end while reading property value."); + } + + obj[name] = ReadValue(ref r); + } + + throw new JsonException("Unexpected end while reading object."); + + case JsonTokenType.StartArray: + + var list = new List(); + while (r.Read()) + { + if (r.TokenType == JsonTokenType.EndArray) + { + return list; + } + + list.Add(ReadValue(ref r)); + } + + throw new JsonException("Unexpected end while reading array."); + + case JsonTokenType.True: return true; + case JsonTokenType.False: return false; + case JsonTokenType.Null: return null; + + case JsonTokenType.Number: + + if (r.TryGetInt32(out int i)) + { + return i; + } + + if (r.TryGetInt64(out long l)) + { + return l; + } + + if (r.TryGetDouble(out double d)) + { + return d; + } + + return r.GetDecimal(); + + case JsonTokenType.String: + + string s = r.GetString()!; + + if (DateTimeOffset.TryParse(s, out var dto)) + { + return dto; + } + + if (DateTime.TryParse(s, out var dt)) + { + return dt; + } + + if (TimeSpan.TryParse(s, out var ts)) + { + return ts; + } + + if (Guid.TryParse(s, out var g)) + { + return g; + } + + return s; + + default: + throw new JsonException($"Unsupported token {r.TokenType}"); + } + } + + public override void Write(Utf8JsonWriter writer, object value, JsonSerializerOptions options) + { + if (value is null) + { + writer.WriteNullValue(); + return; + } + + writer.WriteStartObject(); + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/ElectronNET.AspNet/API/WebHostBuilderExtensions.cs b/src/ElectronNET.AspNet/API/WebHostBuilderExtensions.cs index c6078365..26d524f7 100644 --- a/src/ElectronNET.AspNet/API/WebHostBuilderExtensions.cs +++ b/src/ElectronNET.AspNet/API/WebHostBuilderExtensions.cs @@ -61,6 +61,11 @@ public static IWebHostBuilder UseElectron(this IWebHostBuilder builder, string[] { ElectronNetRuntime.OnAppReadyCallback = onAppReadyCallback; + // no matter how this is set - let's unset to prevent Electron not starting as expected + // e.g., VS Code sets this env variable, but this will cause `require("electron")` to not + // work as expected, see issue #952 + Environment.SetEnvironmentVariable("ELECTRON_RUN_AS_NODE", null); + var webPort = PortHelper.GetFreePort(ElectronNetRuntime.AspNetWebPort ?? ElectronNetRuntime.DefaultWebPort); ElectronNetRuntime.AspNetWebPort = webPort; diff --git a/src/ElectronNET.Build/ElectronNET.Build.csproj b/src/ElectronNET.Build/ElectronNET.Build.csproj index 1bcb4269..e7cb1b9e 100644 --- a/src/ElectronNET.Build/ElectronNET.Build.csproj +++ b/src/ElectronNET.Build/ElectronNET.Build.csproj @@ -1,36 +1,36 @@  - + - - netstandard2.0 - False - + + netstandard2.0 + False + - - - + + + - - - <_DllTargetPath>$(MSBuildThisFileDirectory)\..\ElectronNET\build + - + <_DllTargetPath>$(MSBuildThisFileDirectory)\..\ElectronNET\build - + - - - + + + + + - + - + - + diff --git a/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj b/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj index 731744f8..caf726c6 100644 --- a/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj +++ b/src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj @@ -5,10 +5,10 @@ true - + - net8.0 + net10.0 exe @@ -16,6 +16,7 @@ false False false + disable 128.png @@ -69,9 +70,9 @@ - + - + \ No newline at end of file diff --git a/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/linux-x64.pubxml b/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/linux-x64.pubxml index c92d1b50..2c9cd897 100644 --- a/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/linux-x64.pubxml +++ b/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/linux-x64.pubxml @@ -7,7 +7,7 @@ publish\Release\net8.0\linux-x64 FileSystem <_TargetId>Folder - net8.0 + net10.0 linux-x64 false false diff --git a/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/publish-win-x64.pubxml b/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/publish-win-x64.pubxml index 01940b38..cf6e6e09 100644 --- a/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/publish-win-x64.pubxml +++ b/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/publish-win-x64.pubxml @@ -12,7 +12,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. publish\Release\net8.0\win-x64\ FileSystem <_TargetId>Folder - net8.0 + net10.0 win-x64 true diff --git a/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/win-x64.pubxml b/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/win-x64.pubxml index fbd20075..bda8dcc7 100644 --- a/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/win-x64.pubxml +++ b/src/ElectronNET.ConsoleApp/Properties/PublishProfiles/win-x64.pubxml @@ -7,7 +7,7 @@ publish\Release\net8.0\win-x64 FileSystem <_TargetId>Folder - net8.0 + net10.0 win-x64 false false diff --git a/src/ElectronNET.Host/.vscode/launch.json b/src/ElectronNET.Host/.vscode/launch.json index bb2469e6..df908dc1 100644 --- a/src/ElectronNET.Host/.vscode/launch.json +++ b/src/ElectronNET.Host/.vscode/launch.json @@ -1,20 +1,21 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Launch Electron App", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/main.js", - "sourceMaps": true, - "args": [ - "--test=true", - "--blub=wuhuu" - ] - } - ] + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Electron App", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", + "program": "${workspaceFolder}/main.js", + "skipFiles": [ "/**" ], + "cwd": "${workspaceFolder}", + "console": "externalTerminal", + "args": [ + "--test=true" + ] + } + ] } \ No newline at end of file diff --git a/src/ElectronNET.Host/ElectronHostHook/connector.js b/src/ElectronNET.Host/ElectronHostHook/connector.js index 5e5a0e81..b71a2012 100644 --- a/src/ElectronNET.Host/ElectronHostHook/connector.js +++ b/src/ElectronNET.Host/ElectronHostHook/connector.js @@ -1,7 +1,10 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Connector = void 0; +const socket_io_1 = require("socket.io"); class Connector { + socket; + app; constructor(socket, // @ts-ignore app) { diff --git a/src/ElectronNET.Host/ElectronHostHook/connector.js.map b/src/ElectronNET.Host/ElectronHostHook/connector.js.map index dfa3a4f7..8ab02c0d 100644 --- a/src/ElectronNET.Host/ElectronHostHook/connector.js.map +++ b/src/ElectronNET.Host/ElectronHostHook/connector.js.map @@ -1 +1 @@ -{"version":3,"file":"connector.js","sourceRoot":"","sources":["connector.ts"],"names":[],"mappings":";;;AAEA,MAAa,SAAS;IAClB,YAAoB,MAAc;IAC9B,aAAa;IACN,GAAiB;QAFR,WAAM,GAAN,MAAM,CAAQ;QAEvB,QAAG,GAAH,GAAG,CAAc;IAAI,CAAC;IAEjC,EAAE,CAAC,GAAW,EAAE,cAAwB;QACpC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE;YACnC,MAAM,EAAE,GAAW,IAAI,CAAC,GAAG,EAAE,CAAC;YAE9B,IAAI,CAAC;gBACD,cAAc,CAAC,GAAG,IAAI,EAAE,CAAC,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C,CAAC,CAAC;IACP,CAAC;CACJ;AApBD,8BAoBC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/ElectronHostHook/index.js b/src/ElectronNET.Host/ElectronHostHook/index.js index 813f7a15..6576b124 100644 --- a/src/ElectronNET.Host/ElectronHostHook/index.js +++ b/src/ElectronNET.Host/ElectronHostHook/index.js @@ -1,8 +1,45 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.HookService = void 0; +// @ts-ignore +const Electron = __importStar(require("electron")); +const socket_io_1 = require("socket.io"); const connector_1 = require("./connector"); class HookService extends connector_1.Connector { + app; constructor(socket, app) { super(socket, app); this.app = app; diff --git a/src/ElectronNET.Host/ElectronHostHook/index.js.map b/src/ElectronNET.Host/ElectronHostHook/index.js.map index ff24e734..3c7b0ed4 100644 --- a/src/ElectronNET.Host/ElectronHostHook/index.js.map +++ b/src/ElectronNET.Host/ElectronHostHook/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAGA,2CAAwC;AAExC,MAAa,WAAY,SAAQ,qBAAS;IACtC,YAAY,MAAc,EAAS,GAAiB;QAChD,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QADY,QAAG,GAAH,GAAG,CAAc;IAEpD,CAAC;IAED,WAAW;QACP,8CAA8C;IAClD,CAAC;CACJ;AARD,kCAQC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,mDAAqC;AACrC,yCAAmC;AACnC,2CAAwC;AAExC,MAAa,WAAY,SAAQ,qBAAS;IACH;IAAnC,YAAY,MAAc,EAAS,GAAiB;QAChD,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QADY,QAAG,GAAH,GAAG,CAAc;IAEpD,CAAC;IAED,WAAW;QACP,8CAA8C;IAClD,CAAC;CACJ;AARD,kCAQC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/ElectronNET.Host.esproj b/src/ElectronNET.Host/ElectronNET.Host.esproj new file mode 100644 index 00000000..25d35af7 --- /dev/null +++ b/src/ElectronNET.Host/ElectronNET.Host.esproj @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/ElectronNET.Host/api/autoUpdater.js.map b/src/ElectronNET.Host/api/autoUpdater.js.map index d4c8e43e..d5eeed11 100644 --- a/src/ElectronNET.Host/api/autoUpdater.js.map +++ b/src/ElectronNET.Host/api/autoUpdater.js.map @@ -1 +1 @@ -{"version":3,"file":"autoUpdater.js","sourceRoot":"","sources":["autoUpdater.ts"],"names":[],"mappings":";AACA,uDAA+C;AAC/C,IAAI,cAAc,CAAC;AAEnB,iBAAS,CAAC,MAAc,EAAE,EAAE;IACxB,cAAc,GAAG,MAAM,CAAC;IAExB,MAAM,C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E,cAAc,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,wBAAwB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QAC/C,MAAM,OAAO,GAAG,MAAM,8BAAW,CAAC,UAAU,EAAE,CAAC;QAC/C,cAAc,CAAC,IAAI,CAAC,kCAAkC,GAAG,IAAI,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/browserView.js.map b/src/ElectronNET.Host/api/browserView.js.map index a61597d3..9409e77b 100644 --- a/src/ElectronNET.Host/api/browserView.js.map +++ b/src/ElectronNET.Host/api/browserView.js.map @@ -1 +1 @@ -{"version":3,"file":"browserView.js","sourceRoot":"","sources":["browserView.ts"],"names":[],"mappings":";;;AACA,uCAAuC;AACvC,MAAM,YAAY,GAAkB,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,CAAkB,CAAC;AAC7G,IAAI,WAAwB,EAAE,cAAc,CAAC;AAC7C,MAAM,qBAAqB,GAAgC,CAAC,MAAM,CAAC,uBAAuB,CAAC,GAAG,MAAM,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAgC,CAAC;AAEpK,MAAM,cAAc,GAAG,CAAC,MAAc,EAAE,EAAE;IACtC,cAAc,GAAG,MAAM,CAAC;IAExB,MAAM,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,OAAO,EAAE,EAAE;QACvC,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,EAAE,CAAC;YACjE,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,EAAE,CAAC;QACjG,CAAC;QAED,WAAW,GAAG,IAAI,sBAAW,CAAC,OAAO,CAA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AAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QACvD,MAAM,eAAe,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,eAAe,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;YAC/B,OAAO,eAAe,CAAC;QAC3B,CAAC;IACL,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/browserWindows.js b/src/ElectronNET.Host/api/browserWindows.js index f229a438..2e6d14ec 100644 --- a/src/ElectronNET.Host/api/browserWindows.js +++ b/src/ElectronNET.Host/api/browserWindows.js @@ -1,179 +1,197 @@ "use strict"; const electron_1 = require("electron"); const browserView_1 = require("./browserView"); -const path = require('path'); -const windows = (global['browserWindows'] = global['browserWindows'] || []); +const path = require("path"); +const windows = (global["browserWindows"] = + global["browserWindows"] || []); let readyToShowWindowsIds = []; let window, lastOptions, electronSocket; let mainWindowURL; -const proxyToCredentialsMap = (global['proxyToCredentialsMap'] = global['proxyToCredentialsMap'] || []); +const proxyToCredentialsMap = (global["proxyToCredentialsMap"] = global["proxyToCredentialsMap"] || []); module.exports = (socket, app) => { electronSocket = socket; - app.on('login', (event, webContents, request, authInfo, callback) => { + app.on("login", (event, webContents, request, authInfo, callback) => { if (authInfo.isProxy) { let proxy = `${authInfo.host}:${authInfo.port}`; - if (proxy in proxyToCredentialsMap && proxyToCredentialsMap[proxy].split(':').length === 2) { + if (proxy in proxyToCredentialsMap && + proxyToCredentialsMap[proxy].split(":").length === 2) { event.preventDefault(); - let user = proxyToCredentialsMap[proxy].split(':')[0]; - let pass = proxyToCredentialsMap[proxy].split(':')[1]; + let user = proxyToCredentialsMap[proxy].split(":")[0]; + let pass = proxyToCredentialsMap[proxy].split(":")[1]; callback(user, pass); } } }); - socket.on('register-browserWindow-ready-to-show', (id) => { + socket.on("register-browserWindow-ready-to-show", (id) => { if (readyToShowWindowsIds.includes(id)) { - readyToShowWindowsIds = readyToShowWindowsIds.filter(value => value !== id); - electronSocket.emit('browserWindow-ready-to-show' + id); + readyToShowWindowsIds = readyToShowWindowsIds.filter((value) => value !== id); + electronSocket.emit("browserWindow-ready-to-show" + id); } - getWindowById(id).on('ready-to-show', () => { + getWindowById(id).on("ready-to-show", () => { readyToShowWindowsIds.push(id); - electronSocket.emit('browserWindow-ready-to-show' + id); + electronSocket.emit("browserWindow-ready-to-show" + id); }); }); - socket.on('register-browserWindow-page-title-updated', (id) => { - getWindowById(id).on('page-title-updated', (event, title) => { - electronSocket.emit('browserWindow-page-title-updated' + id, title); + socket.on("register-browserWindow-page-title-updated", (id) => { + getWindowById(id).on("page-title-updated", (event, title) => { + electronSocket.emit("browserWindow-page-title-updated" + id, title); }); }); - socket.on('register-browserWindow-close', (id) => { - getWindowById(id).on('close', () => { - electronSocket.emit('browserWindow-close' + id); + socket.on("register-browserWindow-close", (id) => { + getWindowById(id).on("close", () => { + electronSocket.emit("browserWindow-close" + id); }); }); - socket.on('register-browserWindow-closed', (id) => { - getWindowById(id).on('closed', () => { - electronSocket.emit('browserWindow-closed' + id); + socket.on("register-browserWindow-closed", (id) => { + getWindowById(id).on("closed", () => { + electronSocket.emit("browserWindow-closed" + id); }); }); - socket.on('register-browserWindow-session-end', (id) => { - getWindowById(id).on('session-end', () => { - electronSocket.emit('browserWindow-session-end' + id); + socket.on("register-browserWindow-session-end", (id) => { + getWindowById(id).on("session-end", () => { + electronSocket.emit("browserWindow-session-end" + id); }); }); - socket.on('register-browserWindow-unresponsive', (id) => { - getWindowById(id).on('unresponsive', () => { - electronSocket.emit('browserWindow-unresponsive' + id); + socket.on("register-browserWindow-unresponsive", (id) => { + getWindowById(id).on("unresponsive", () => { + electronSocket.emit("browserWindow-unresponsive" + id); }); }); - socket.on('register-browserWindow-responsive', (id) => { - getWindowById(id).on('responsive', () => { - electronSocket.emit('browserWindow-responsive' + id); + socket.on("register-browserWindow-responsive", (id) => { + getWindowById(id).on("responsive", () => { + electronSocket.emit("browserWindow-responsive" + id); }); }); - socket.on('register-browserWindow-blur', (id) => { - getWindowById(id).on('blur', () => { - electronSocket.emit('browserWindow-blur' + id); + socket.on("register-browserWindow-blur", (id) => { + getWindowById(id).on("blur", () => { + electronSocket.emit("browserWindow-blur" + id); }); }); - socket.on('register-browserWindow-focus', (id) => { - getWindowById(id).on('focus', () => { - electronSocket.emit('browserWindow-focus' + id); + socket.on("register-browserWindow-focus", (id) => { + getWindowById(id).on("focus", () => { + electronSocket.emit("browserWindow-focus" + id); }); }); - socket.on('register-browserWindow-show', (id) => { - getWindowById(id).on('show', () => { - electronSocket.emit('browserWindow-show' + id); + socket.on("register-browserWindow-show", (id) => { + getWindowById(id).on("show", () => { + electronSocket.emit("browserWindow-show" + id); }); }); - socket.on('register-browserWindow-hide', (id) => { - getWindowById(id).on('hide', () => { - electronSocket.emit('browserWindow-hide' + id); + socket.on("register-browserWindow-hide", (id) => { + getWindowById(id).on("hide", () => { + electronSocket.emit("browserWindow-hide" + id); }); }); - socket.on('register-browserWindow-maximize', (id) => { - getWindowById(id).on('maximize', () => { - electronSocket.emit('browserWindow-maximize' + id); + socket.on("register-browserWindow-maximize", (id) => { + getWindowById(id).on("maximize", () => { + electronSocket.emit("browserWindow-maximize" + id); }); }); - socket.on('register-browserWindow-unmaximize', (id) => { - getWindowById(id).on('unmaximize', () => { - electronSocket.emit('browserWindow-unmaximize' + id); + socket.on("register-browserWindow-unmaximize", (id) => { + getWindowById(id).on("unmaximize", () => { + electronSocket.emit("browserWindow-unmaximize" + id); }); }); - socket.on('register-browserWindow-minimize', (id) => { - getWindowById(id).on('minimize', () => { - electronSocket.emit('browserWindow-minimize' + id); + socket.on("register-browserWindow-minimize", (id) => { + getWindowById(id).on("minimize", () => { + electronSocket.emit("browserWindow-minimize" + id); }); }); - socket.on('register-browserWindow-restore', (id) => { - getWindowById(id).on('restore', () => { - electronSocket.emit('browserWindow-restore' + id); + socket.on("register-browserWindow-restore", (id) => { + getWindowById(id).on("restore", () => { + electronSocket.emit("browserWindow-restore" + id); }); }); - socket.on('register-browserWindow-resize', (id) => { - getWindowById(id).on('resize', () => { - electronSocket.emit('browserWindow-resize' + id); + socket.on("register-browserWindow-resize", (id) => { + getWindowById(id).on("resize", () => { + electronSocket.emit("browserWindow-resize" + id); }); }); - socket.on('register-browserWindow-move', (id) => { - getWindowById(id).on('move', () => { - electronSocket.emit('browserWindow-move' + id); + socket.on("register-browserWindow-move", (id) => { + getWindowById(id).on("move", () => { + electronSocket.emit("browserWindow-move" + id); }); }); - socket.on('register-browserWindow-moved', (id) => { - getWindowById(id).on('moved', () => { - electronSocket.emit('browserWindow-moved' + id); + socket.on("register-browserWindow-moved", (id) => { + getWindowById(id).on("moved", () => { + electronSocket.emit("browserWindow-moved" + id); }); }); - socket.on('register-browserWindow-enter-full-screen', (id) => { - getWindowById(id).on('enter-full-screen', () => { - electronSocket.emit('browserWindow-enter-full-screen' + id); + socket.on("register-browserWindow-enter-full-screen", (id) => { + getWindowById(id).on("enter-full-screen", () => { + electronSocket.emit("browserWindow-enter-full-screen" + id); }); }); - socket.on('register-browserWindow-leave-full-screen', (id) => { - getWindowById(id).on('leave-full-screen', () => { - electronSocket.emit('browserWindow-leave-full-screen' + id); + socket.on("register-browserWindow-leave-full-screen", (id) => { + getWindowById(id).on("leave-full-screen", () => { + electronSocket.emit("browserWindow-leave-full-screen" + id); }); }); - socket.on('register-browserWindow-enter-html-full-screen', (id) => { - getWindowById(id).on('enter-html-full-screen', () => { - electronSocket.emit('browserWindow-enter-html-full-screen' + id); + socket.on("register-browserWindow-enter-html-full-screen", (id) => { + getWindowById(id).on("enter-html-full-screen", () => { + electronSocket.emit("browserWindow-enter-html-full-screen" + id); }); }); - socket.on('register-browserWindow-leave-html-full-screen', (id) => { - getWindowById(id).on('leave-html-full-screen', () => { - electronSocket.emit('browserWindow-leave-html-full-screen' + id); + socket.on("register-browserWindow-leave-html-full-screen", (id) => { + getWindowById(id).on("leave-html-full-screen", () => { + electronSocket.emit("browserWindow-leave-html-full-screen" + id); }); }); - socket.on('register-browserWindow-app-command', (id) => { - getWindowById(id).on('app-command', (event, command) => { - electronSocket.emit('browserWindow-app-command' + id, command); + socket.on("register-browserWindow-app-command", (id) => { + getWindowById(id).on("app-command", (event, command) => { + electronSocket.emit("browserWindow-app-command" + id, command); }); }); - socket.on('register-browserWindow-swipe', (id) => { - getWindowById(id).on('swipe', (event, direction) => { - electronSocket.emit('browserWindow-swipe' + id, direction); + socket.on("register-browserWindow-swipe", (id) => { + getWindowById(id).on("swipe", (event, direction) => { + electronSocket.emit("browserWindow-swipe" + id, direction); }); }); - socket.on('register-browserWindow-sheet-begin', (id) => { - getWindowById(id).on('sheet-begin', () => { - electronSocket.emit('browserWindow-sheet-begin' + id); + socket.on("register-browserWindow-sheet-begin", (id) => { + getWindowById(id).on("sheet-begin", () => { + electronSocket.emit("browserWindow-sheet-begin" + id); }); }); - socket.on('register-browserWindow-sheet-end', (id) => { - getWindowById(id).on('sheet-end', () => { - electronSocket.emit('browserWindow-sheet-end' + id); + socket.on("register-browserWindow-sheet-end", (id) => { + getWindowById(id).on("sheet-end", () => { + electronSocket.emit("browserWindow-sheet-end" + id); }); }); - socket.on('register-browserWindow-new-window-for-tab', (id) => { - getWindowById(id).on('new-window-for-tab', () => { - electronSocket.emit('browserWindow-new-window-for-tab' + id); + socket.on("register-browserWindow-new-window-for-tab", (id) => { + getWindowById(id).on("new-window-for-tab", () => { + electronSocket.emit("browserWindow-new-window-for-tab" + id); }); }); - socket.on('createBrowserWindow', (options, loadUrl) => { - if (options.webPreferences && !('nodeIntegration' in options.webPreferences)) { - options = { ...options, webPreferences: { ...options.webPreferences, nodeIntegration: true, contextIsolation: false } }; + socket.on("createBrowserWindow", (options, loadUrl) => { + if (options.webPreferences && + !("nodeIntegration" in options.webPreferences)) { + options = { + ...options, + webPreferences: { + ...options.webPreferences, + nodeIntegration: true, + contextIsolation: false, + }, + }; } else if (!options.webPreferences) { - options = { ...options, webPreferences: { nodeIntegration: true, contextIsolation: false } }; + options = { + ...options, + webPreferences: { nodeIntegration: true, contextIsolation: false }, + }; + } + if (options.isRunningBlazor) { + options.webPreferences["preload"] = path.join(__dirname, "..", "scripts", "blazor-preload.js"); } + delete options.isRunningBlazor; // we dont want to recreate the window when watch is ready. - if (app.commandLine.hasSwitch('watch') && app['mainWindowURL'] === loadUrl) { - window = app['mainWindow']; + if (app.commandLine.hasSwitch("watch") && + app["mainWindowURL"] === loadUrl) { + window = app["mainWindow"]; if (window) { window.reload(); windows.push(window); - electronSocket.emit('BrowserWindowCreated', window.id); + electronSocket.emit("BrowserWindowCreated", window.id); return; } } @@ -186,32 +204,32 @@ module.exports = (socket, app) => { if (options.proxy && options.proxyCredentials) { proxyToCredentialsMap[options.proxy] = options.proxyCredentials; } - window.on('ready-to-show', () => { + window.on("ready-to-show", () => { if (readyToShowWindowsIds.includes(window.id)) { - readyToShowWindowsIds = readyToShowWindowsIds.filter(value => value !== window.id); + readyToShowWindowsIds = readyToShowWindowsIds.filter((value) => value !== window.id); } else { readyToShowWindowsIds.push(window.id); } }); lastOptions = options; - window.on('closed', (sender) => { + window.on("closed", (sender) => { for (let index = 0; index < windows.length; index++) { const windowItem = windows[index]; try { windowItem.id; } catch (error) { - if (error.message === 'Object has been destroyed') { + if (error.message === "Object has been destroyed") { windows.splice(index, 1); const ids = []; - windows.forEach(x => ids.push(x.id)); - electronSocket.emit('BrowserWindowClosed', ids); + windows.forEach((x) => ids.push(x.id)); + electronSocket.emit("BrowserWindowClosed", ids); } } } }); - app.on('activate', () => { + app.on("activate", () => { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. if (window === null && lastOptions) { @@ -221,204 +239,204 @@ module.exports = (socket, app) => { if (loadUrl) { window.loadURL(loadUrl); } - if (app.commandLine.hasSwitch('clear-cache') && - app.commandLine.getSwitchValue('clear-cache')) { + if (app.commandLine.hasSwitch("clear-cache") && + app.commandLine.getSwitchValue("clear-cache")) { window.webContents.session.clearCache(); - console.log('auto clear-cache active for new window.'); + console.log("auto clear-cache active for new window."); } // set main window url - if (app['mainWindowURL'] == undefined || app['mainWindowURL'] == "") { - app['mainWindowURL'] = loadUrl; - app['mainWindow'] = window; + if (app["mainWindowURL"] == undefined || app["mainWindowURL"] == "") { + app["mainWindowURL"] = loadUrl; + app["mainWindow"] = window; } windows.push(window); - electronSocket.emit('BrowserWindowCreated', window.id); + electronSocket.emit("BrowserWindowCreated", window.id); }); - socket.on('browserWindowDestroy', (id) => { + socket.on("browserWindowDestroy", (id) => { getWindowById(id).destroy(); }); - socket.on('browserWindowClose', (id) => { + socket.on("browserWindowClose", (id) => { getWindowById(id).close(); }); - socket.on('browserWindowFocus', (id) => { + socket.on("browserWindowFocus", (id) => { getWindowById(id).focus(); }); - socket.on('browserWindowBlur', (id) => { + socket.on("browserWindowBlur", (id) => { getWindowById(id).blur(); }); - socket.on('browserWindowIsFocused', (id) => { + socket.on("browserWindowIsFocused", (id) => { const isFocused = getWindowById(id).isFocused(); - electronSocket.emit('browserWindow-isFocused-completed', isFocused); + electronSocket.emit("browserWindow-isFocused-completed", isFocused); }); - socket.on('browserWindowIsDestroyed', (id) => { + socket.on("browserWindowIsDestroyed", (id) => { const isDestroyed = getWindowById(id).isDestroyed(); - electronSocket.emit('browserWindow-isDestroyed-completed', isDestroyed); + electronSocket.emit("browserWindow-isDestroyed-completed", isDestroyed); }); - socket.on('browserWindowShow', (id) => { + socket.on("browserWindowShow", (id) => { getWindowById(id).show(); }); - socket.on('browserWindowShowInactive', (id) => { + socket.on("browserWindowShowInactive", (id) => { getWindowById(id).showInactive(); }); - socket.on('browserWindowHide', (id) => { + socket.on("browserWindowHide", (id) => { getWindowById(id).hide(); }); - socket.on('browserWindowIsVisible', (id) => { + socket.on("browserWindowIsVisible", (id) => { const isVisible = getWindowById(id).isVisible(); - electronSocket.emit('browserWindow-isVisible-completed', isVisible); + electronSocket.emit("browserWindow-isVisible-completed", isVisible); }); - socket.on('browserWindowIsModal', (id) => { + socket.on("browserWindowIsModal", (id) => { const isModal = getWindowById(id).isModal(); - electronSocket.emit('browserWindow-isModal-completed', isModal); + electronSocket.emit("browserWindow-isModal-completed", isModal); }); - socket.on('browserWindowMaximize', (id) => { + socket.on("browserWindowMaximize", (id) => { getWindowById(id).maximize(); }); - socket.on('browserWindowUnmaximize', (id) => { + socket.on("browserWindowUnmaximize", (id) => { getWindowById(id).unmaximize(); }); - socket.on('browserWindowIsMaximized', (id) => { + socket.on("browserWindowIsMaximized", (id) => { const isMaximized = getWindowById(id).isMaximized(); - electronSocket.emit('browserWindow-isMaximized-completed', isMaximized); + electronSocket.emit("browserWindow-isMaximized-completed", isMaximized); }); - socket.on('browserWindowMinimize', (id) => { + socket.on("browserWindowMinimize", (id) => { getWindowById(id).minimize(); }); - socket.on('browserWindowRestore', (id) => { + socket.on("browserWindowRestore", (id) => { getWindowById(id).restore(); }); - socket.on('browserWindowIsMinimized', (id) => { + socket.on("browserWindowIsMinimized", (id) => { const isMinimized = getWindowById(id).isMinimized(); - electronSocket.emit('browserWindow-isMinimized-completed', isMinimized); + electronSocket.emit("browserWindow-isMinimized-completed", isMinimized); }); - socket.on('browserWindowSetFullScreen', (id, fullscreen) => { + socket.on("browserWindowSetFullScreen", (id, fullscreen) => { getWindowById(id).setFullScreen(fullscreen); }); - socket.on('browserWindowIsFullScreen', (id) => { + socket.on("browserWindowIsFullScreen", (id) => { const isFullScreen = getWindowById(id).isFullScreen(); - electronSocket.emit('browserWindow-isFullScreen-completed', isFullScreen); + electronSocket.emit("browserWindow-isFullScreen-completed", isFullScreen); }); - socket.on('browserWindowSetAspectRatio', (id, aspectRatio, extraSize) => { + socket.on("browserWindowSetAspectRatio", (id, aspectRatio, extraSize) => { getWindowById(id).setAspectRatio(aspectRatio, extraSize); }); - socket.on('browserWindowPreviewFile', (id, path, displayname) => { + socket.on("browserWindowPreviewFile", (id, path, displayname) => { getWindowById(id).previewFile(path, displayname); }); - socket.on('browserWindowCloseFilePreview', (id) => { + socket.on("browserWindowCloseFilePreview", (id) => { getWindowById(id).closeFilePreview(); }); - socket.on('browserWindowSetBounds', (id, bounds, animate) => { + socket.on("browserWindowSetBounds", (id, bounds, animate) => { getWindowById(id).setBounds(bounds, animate); }); - socket.on('browserWindowGetBounds', (id) => { + socket.on("browserWindowGetBounds", (id) => { const rectangle = getWindowById(id).getBounds(); - electronSocket.emit('browserWindow-getBounds-completed', rectangle); + electronSocket.emit("browserWindow-getBounds-completed", rectangle); }); - socket.on('browserWindowSetContentBounds', (id, bounds, animate) => { + socket.on("browserWindowSetContentBounds", (id, bounds, animate) => { getWindowById(id).setContentBounds(bounds, animate); }); - socket.on('browserWindowGetContentBounds', (id) => { + socket.on("browserWindowGetContentBounds", (id) => { const rectangle = getWindowById(id).getContentBounds(); - electronSocket.emit('browserWindow-getContentBounds-completed', rectangle); + electronSocket.emit("browserWindow-getContentBounds-completed", rectangle); }); - socket.on('browserWindowSetSize', (id, width, height, animate) => { + socket.on("browserWindowSetSize", (id, width, height, animate) => { getWindowById(id).setSize(width, height, animate); }); - socket.on('browserWindowGetSize', (id) => { + socket.on("browserWindowGetSize", (id) => { const size = getWindowById(id).getSize(); - electronSocket.emit('browserWindow-getSize-completed', size); + electronSocket.emit("browserWindow-getSize-completed", size); }); - socket.on('browserWindowSetContentSize', (id, width, height, animate) => { + socket.on("browserWindowSetContentSize", (id, width, height, animate) => { getWindowById(id).setContentSize(width, height, animate); }); - socket.on('browserWindowGetContentSize', (id) => { + socket.on("browserWindowGetContentSize", (id) => { const size = getWindowById(id).getContentSize(); - electronSocket.emit('browserWindow-getContentSize-completed', size); + electronSocket.emit("browserWindow-getContentSize-completed", size); }); - socket.on('browserWindowSetMinimumSize', (id, width, height) => { + socket.on("browserWindowSetMinimumSize", (id, width, height) => { getWindowById(id).setMinimumSize(width, height); }); - socket.on('browserWindowGetMinimumSize', (id) => { + socket.on("browserWindowGetMinimumSize", (id) => { const size = getWindowById(id).getMinimumSize(); - electronSocket.emit('browserWindow-getMinimumSize-completed', size); + electronSocket.emit("browserWindow-getMinimumSize-completed", size); }); - socket.on('browserWindowSetMaximumSize', (id, width, height) => { + socket.on("browserWindowSetMaximumSize", (id, width, height) => { getWindowById(id).setMaximumSize(width, height); }); - socket.on('browserWindowGetMaximumSize', (id) => { + socket.on("browserWindowGetMaximumSize", (id) => { const size = getWindowById(id).getMaximumSize(); - electronSocket.emit('browserWindow-getMaximumSize-completed', size); + electronSocket.emit("browserWindow-getMaximumSize-completed", size); }); - socket.on('browserWindowSetResizable', (id, resizable) => { + socket.on("browserWindowSetResizable", (id, resizable) => { getWindowById(id).setResizable(resizable); }); - socket.on('browserWindowIsResizable', (id) => { + socket.on("browserWindowIsResizable", (id) => { const resizable = getWindowById(id).isResizable(); - electronSocket.emit('browserWindow-isResizable-completed', resizable); + electronSocket.emit("browserWindow-isResizable-completed", resizable); }); - socket.on('browserWindowSetMovable', (id, movable) => { + socket.on("browserWindowSetMovable", (id, movable) => { getWindowById(id).setMovable(movable); }); - socket.on('browserWindowIsMovable', (id) => { + socket.on("browserWindowIsMovable", (id) => { const movable = getWindowById(id).isMovable(); - electronSocket.emit('browserWindow-isMovable-completed', movable); + electronSocket.emit("browserWindow-isMovable-completed", movable); }); - socket.on('browserWindowSetMinimizable', (id, minimizable) => { + socket.on("browserWindowSetMinimizable", (id, minimizable) => { getWindowById(id).setMinimizable(minimizable); }); - socket.on('browserWindowIsMinimizable', (id) => { + socket.on("browserWindowIsMinimizable", (id) => { const minimizable = getWindowById(id).isMinimizable(); - electronSocket.emit('browserWindow-isMinimizable-completed', minimizable); + electronSocket.emit("browserWindow-isMinimizable-completed", minimizable); }); - socket.on('browserWindowSetMaximizable', (id, maximizable) => { + socket.on("browserWindowSetMaximizable", (id, maximizable) => { getWindowById(id).setMaximizable(maximizable); }); - socket.on('browserWindowIsMaximizable', (id) => { + socket.on("browserWindowIsMaximizable", (id) => { const maximizable = getWindowById(id).isMaximizable(); - electronSocket.emit('browserWindow-isMaximizable-completed', maximizable); + electronSocket.emit("browserWindow-isMaximizable-completed", maximizable); }); - socket.on('browserWindowSetFullScreenable', (id, fullscreenable) => { + socket.on("browserWindowSetFullScreenable", (id, fullscreenable) => { getWindowById(id).setFullScreenable(fullscreenable); }); - socket.on('browserWindowIsFullScreenable', (id) => { + socket.on("browserWindowIsFullScreenable", (id) => { const fullscreenable = getWindowById(id).isFullScreenable(); - electronSocket.emit('browserWindow-isFullScreenable-completed', fullscreenable); + electronSocket.emit("browserWindow-isFullScreenable-completed", fullscreenable); }); - socket.on('browserWindowSetClosable', (id, closable) => { + socket.on("browserWindowSetClosable", (id, closable) => { getWindowById(id).setClosable(closable); }); - socket.on('browserWindowIsClosable', (id) => { + socket.on("browserWindowIsClosable", (id) => { const closable = getWindowById(id).isClosable(); - electronSocket.emit('browserWindow-isClosable-completed', closable); + electronSocket.emit("browserWindow-isClosable-completed", closable); }); - socket.on('browserWindowSetAlwaysOnTop', (id, flag, level, relativeLevel) => { + socket.on("browserWindowSetAlwaysOnTop", (id, flag, level, relativeLevel) => { getWindowById(id).setAlwaysOnTop(flag, level, relativeLevel); }); - socket.on('browserWindowIsAlwaysOnTop', (id) => { + socket.on("browserWindowIsAlwaysOnTop", (id) => { const isAlwaysOnTop = getWindowById(id).isAlwaysOnTop(); - electronSocket.emit('browserWindow-isAlwaysOnTop-completed', isAlwaysOnTop); + electronSocket.emit("browserWindow-isAlwaysOnTop-completed", isAlwaysOnTop); }); - socket.on('browserWindowCenter', (id) => { + socket.on("browserWindowCenter", (id) => { getWindowById(id).center(); }); - socket.on('browserWindowSetPosition', (id, x, y, animate) => { + socket.on("browserWindowSetPosition", (id, x, y, animate) => { getWindowById(id).setPosition(x, y, animate); }); - socket.on('browserWindowGetPosition', (id) => { + socket.on("browserWindowGetPosition", (id) => { const position = getWindowById(id).getPosition(); - electronSocket.emit('browserWindow-getPosition-completed', position); + electronSocket.emit("browserWindow-getPosition-completed", position); }); - socket.on('browserWindowSetTitle', (id, title) => { + socket.on("browserWindowSetTitle", (id, title) => { getWindowById(id).setTitle(title); }); - socket.on('browserWindowGetTitle', (id) => { + socket.on("browserWindowGetTitle", (id) => { const title = getWindowById(id).getTitle(); - electronSocket.emit('browserWindow-getTitle-completed', title); + electronSocket.emit("browserWindow-getTitle-completed", title); }); - socket.on('browserWindowSetTitle', (id, title) => { + socket.on("browserWindowSetTitle", (id, title) => { getWindowById(id).setTitle(title); }); - socket.on('browserWindowSetSheetOffset', (id, offsetY, offsetX) => { + socket.on("browserWindowSetSheetOffset", (id, offsetY, offsetX) => { if (offsetX) { getWindowById(id).setSheetOffset(offsetY, offsetX); } @@ -426,77 +444,80 @@ module.exports = (socket, app) => { getWindowById(id).setSheetOffset(offsetY); } }); - socket.on('browserWindowFlashFrame', (id, flag) => { + socket.on("browserWindowFlashFrame", (id, flag) => { getWindowById(id).flashFrame(flag); }); - socket.on('browserWindowSetSkipTaskbar', (id, skip) => { + socket.on("browserWindowSetSkipTaskbar", (id, skip) => { getWindowById(id).setSkipTaskbar(skip); }); - socket.on('browserWindowSetKiosk', (id, flag) => { + socket.on("browserWindowSetKiosk", (id, flag) => { getWindowById(id).setKiosk(flag); }); - socket.on('browserWindowIsKiosk', (id) => { + socket.on("browserWindowIsKiosk", (id) => { const isKiosk = getWindowById(id).isKiosk(); - electronSocket.emit('browserWindow-isKiosk-completed', isKiosk); + electronSocket.emit("browserWindow-isKiosk-completed", isKiosk); }); - socket.on('browserWindowGetNativeWindowHandle', (id) => { - const nativeWindowHandle = getWindowById(id).getNativeWindowHandle().readInt32LE(0).toString(16); - electronSocket.emit('browserWindow-getNativeWindowHandle-completed', nativeWindowHandle); + socket.on("browserWindowGetNativeWindowHandle", (id) => { + const nativeWindowHandle = getWindowById(id) + .getNativeWindowHandle() + .readInt32LE(0) + .toString(16); + electronSocket.emit("browserWindow-getNativeWindowHandle-completed", nativeWindowHandle); }); - socket.on('browserWindowSetRepresentedFilename', (id, filename) => { + socket.on("browserWindowSetRepresentedFilename", (id, filename) => { const win = getWindowById(id); try { - if (win && typeof win.setRepresentedFilename === 'function') { + if (win && typeof win.setRepresentedFilename === "function") { win.setRepresentedFilename(filename); } } catch (e) { - console.warn('setRepresentedFilename failed (likely unsupported platform):', e); + console.warn("setRepresentedFilename failed (likely unsupported platform):", e); } }); - socket.on('browserWindowGetRepresentedFilename', (id) => { + socket.on("browserWindowGetRepresentedFilename", (id) => { const win = getWindowById(id); - let pathname = ''; + let pathname = ""; try { - if (win && typeof win.getRepresentedFilename === 'function') { - pathname = win.getRepresentedFilename() || ''; + if (win && typeof win.getRepresentedFilename === "function") { + pathname = win.getRepresentedFilename() || ""; } } catch (e) { - console.warn('getRepresentedFilename failed (likely unsupported platform):', e); + console.warn("getRepresentedFilename failed (likely unsupported platform):", e); } - electronSocket.emit('browserWindow-getRepresentedFilename-completed', pathname); + electronSocket.emit("browserWindow-getRepresentedFilename-completed", pathname); }); - socket.on('browserWindowSetDocumentEdited', (id, edited) => { + socket.on("browserWindowSetDocumentEdited", (id, edited) => { getWindowById(id).setDocumentEdited(edited); }); - socket.on('browserWindowIsDocumentEdited', (id) => { + socket.on("browserWindowIsDocumentEdited", (id) => { const edited = getWindowById(id).isDocumentEdited(); - electronSocket.emit('browserWindow-isDocumentEdited-completed', edited); + electronSocket.emit("browserWindow-isDocumentEdited-completed", edited); }); - socket.on('browserWindowFocusOnWebView', (id) => { + socket.on("browserWindowFocusOnWebView", (id) => { getWindowById(id).focusOnWebView(); }); - socket.on('browserWindowBlurWebView', (id) => { + socket.on("browserWindowBlurWebView", (id) => { getWindowById(id).blurWebView(); }); - socket.on('browserWindowLoadURL', (id, url, options) => { + socket.on("browserWindowLoadURL", (id, url, options) => { getWindowById(id).loadURL(url, options); }); - socket.on('browserWindowReload', (id) => { + socket.on("browserWindowReload", (id) => { getWindowById(id).reload(); }); - socket.on('browserWindowSetMenu', (id, menuItems) => { + socket.on("browserWindowSetMenu", (id, menuItems) => { let menu = null; if (menuItems) { menu = electron_1.Menu.buildFromTemplate(menuItems); addMenuItemClickConnector(menu.items, (id) => { - electronSocket.emit('windowMenuItemClicked', id); + electronSocket.emit("windowMenuItemClicked", id); }); } getWindowById(id).setMenu(menu); }); - socket.on('browserWindowRemoveMenu', (id) => { + socket.on("browserWindowRemoveMenu", (id) => { getWindowById(id).removeMenu(); }); function addMenuItemClickConnector(menuItems, callback) { @@ -504,34 +525,36 @@ module.exports = (socket, app) => { if (item.submenu && item.submenu.items.length > 0) { addMenuItemClickConnector(item.submenu.items, callback); } - if ('id' in item && item.id) { - item.click = () => { callback(item.id); }; + if ("id" in item && item.id) { + item.click = () => { + callback(item.id); + }; } }); } - socket.on('browserWindowSetProgressBar', (id, progress) => { + socket.on("browserWindowSetProgressBar", (id, progress) => { getWindowById(id).setProgressBar(progress); }); - socket.on('browserWindowSetProgressBar', (id, progress, options) => { + socket.on("browserWindowSetProgressBar", (id, progress, options) => { getWindowById(id).setProgressBar(progress, options); }); - socket.on('browserWindowSetHasShadow', (id, hasShadow) => { + socket.on("browserWindowSetHasShadow", (id, hasShadow) => { getWindowById(id).setHasShadow(hasShadow); }); - socket.on('browserWindowHasShadow', (id) => { + socket.on("browserWindowHasShadow", (id) => { const hasShadow = getWindowById(id).hasShadow(); - electronSocket.emit('browserWindow-hasShadow-completed', hasShadow); + electronSocket.emit("browserWindow-hasShadow-completed", hasShadow); }); - socket.on('browserWindowSetThumbarButtons', (id, thumbarButtons) => { - thumbarButtons.forEach(thumbarButton => { + socket.on("browserWindowSetThumbarButtons", (id, thumbarButtons) => { + thumbarButtons.forEach((thumbarButton) => { const originalIconPath = thumbarButton.icon.toString(); - const path = require('path'); - const fs = require('fs'); + const path = require("path"); + const fs = require("fs"); let imagePath = originalIconPath; if (!path.isAbsolute(originalIconPath)) { - imagePath = path.join(__dirname.replace('api', ''), 'bin', originalIconPath); + imagePath = path.join(__dirname.replace("api", ""), "bin", originalIconPath); } - const { nativeImage } = require('electron'); + const { nativeImage } = require("electron"); if (fs.existsSync(imagePath)) { thumbarButton.icon = nativeImage.createFromPath(imagePath); } @@ -540,55 +563,55 @@ module.exports = (socket, app) => { thumbarButton.icon = nativeImage.createEmpty(); } thumbarButton.click = () => { - electronSocket.emit('thumbarButtonClicked', thumbarButton['id']); + electronSocket.emit("thumbarButtonClicked", thumbarButton["id"]); }; }); const success = getWindowById(id).setThumbarButtons(thumbarButtons); - electronSocket.emit('browserWindowSetThumbarButtons-completed', success); + electronSocket.emit("browserWindowSetThumbarButtons-completed", success); }); - socket.on('browserWindowSetThumbnailClip', (id, rectangle) => { + socket.on("browserWindowSetThumbnailClip", (id, rectangle) => { getWindowById(id).setThumbnailClip(rectangle); }); - socket.on('browserWindowSetThumbnailToolTip', (id, toolTip) => { + socket.on("browserWindowSetThumbnailToolTip", (id, toolTip) => { getWindowById(id).setThumbnailToolTip(toolTip); }); - socket.on('browserWindowSetAppDetails', (id, options) => { + socket.on("browserWindowSetAppDetails", (id, options) => { getWindowById(id).setAppDetails(options); }); - socket.on('browserWindowShowDefinitionForSelection', (id) => { + socket.on("browserWindowShowDefinitionForSelection", (id) => { getWindowById(id).showDefinitionForSelection(); }); - socket.on('browserWindowSetAutoHideMenuBar', (id, hide) => { + socket.on("browserWindowSetAutoHideMenuBar", (id, hide) => { getWindowById(id).setAutoHideMenuBar(hide); }); - socket.on('browserWindowIsMenuBarAutoHide', (id) => { + socket.on("browserWindowIsMenuBarAutoHide", (id) => { const isMenuBarAutoHide = getWindowById(id).isMenuBarAutoHide(); - electronSocket.emit('browserWindow-isMenuBarAutoHide-completed', isMenuBarAutoHide); + electronSocket.emit("browserWindow-isMenuBarAutoHide-completed", isMenuBarAutoHide); }); - socket.on('browserWindowSetMenuBarVisibility', (id, visible) => { + socket.on("browserWindowSetMenuBarVisibility", (id, visible) => { getWindowById(id).setMenuBarVisibility(visible); }); - socket.on('browserWindowIsMenuBarVisible', (id) => { + socket.on("browserWindowIsMenuBarVisible", (id) => { const isMenuBarVisible = getWindowById(id).isMenuBarVisible(); - electronSocket.emit('browserWindow-isMenuBarVisible-completed', isMenuBarVisible); + electronSocket.emit("browserWindow-isMenuBarVisible-completed", isMenuBarVisible); }); - socket.on('browserWindowSetVisibleOnAllWorkspaces', (id, visible) => { + socket.on("browserWindowSetVisibleOnAllWorkspaces", (id, visible) => { getWindowById(id).setVisibleOnAllWorkspaces(visible); }); - socket.on('browserWindowIsVisibleOnAllWorkspaces', (id) => { + socket.on("browserWindowIsVisibleOnAllWorkspaces", (id) => { const isVisibleOnAllWorkspaces = getWindowById(id).isVisibleOnAllWorkspaces(); - electronSocket.emit('browserWindow-isVisibleOnAllWorkspaces-completed', isVisibleOnAllWorkspaces); + electronSocket.emit("browserWindow-isVisibleOnAllWorkspaces-completed", isVisibleOnAllWorkspaces); }); - socket.on('browserWindowSetIgnoreMouseEvents', (id, ignore) => { + socket.on("browserWindowSetIgnoreMouseEvents", (id, ignore) => { getWindowById(id).setIgnoreMouseEvents(ignore); }); - socket.on('browserWindowSetContentProtection', (id, enable) => { + socket.on("browserWindowSetContentProtection", (id, enable) => { getWindowById(id).setContentProtection(enable); }); - socket.on('browserWindowSetFocusable', (id, focusable) => { + socket.on("browserWindowSetFocusable", (id, focusable) => { getWindowById(id).setFocusable(focusable); }); - socket.on('browserWindowSetParentWindow', (id, parent) => { + socket.on("browserWindowSetParentWindow", (id, parent) => { const child = getWindowById(id); if (!parent) { // Clear parent: make this window top-level @@ -598,25 +621,25 @@ module.exports = (socket, app) => { const browserWindow = electron_1.BrowserWindow.fromId(parent.id); child.setParentWindow(browserWindow); }); - socket.on('browserWindowGetParentWindow', (id) => { + socket.on("browserWindowGetParentWindow", (id) => { const browserWindow = getWindowById(id).getParentWindow(); - electronSocket.emit('browserWindow-getParentWindow-completed', browserWindow.id); + electronSocket.emit("browserWindow-getParentWindow-completed", browserWindow.id); }); - socket.on('browserWindowGetChildWindows', (id) => { + socket.on("browserWindowGetChildWindows", (id) => { const browserWindows = getWindowById(id).getChildWindows(); const ids = []; - browserWindows.forEach(x => { + browserWindows.forEach((x) => { ids.push(x.id); }); - electronSocket.emit('browserWindow-getChildWindows-completed', ids); + electronSocket.emit("browserWindow-getChildWindows-completed", ids); }); - socket.on('browserWindowSetAutoHideCursor', (id, autoHide) => { + socket.on("browserWindowSetAutoHideCursor", (id, autoHide) => { getWindowById(id).setAutoHideCursor(autoHide); }); - socket.on('browserWindowSetVibrancy', (id, type) => { + socket.on("browserWindowSetVibrancy", (id, type) => { getWindowById(id).setVibrancy(type); }); - socket.on('browserWindow-setBrowserView', (id, browserViewId) => { + socket.on("browserWindow-setBrowserView", (id, browserViewId) => { getWindowById(id).setBrowserView((0, browserView_1.browserViewMediateService)(browserViewId)); }); function getWindowById(id) { diff --git a/src/ElectronNET.Host/api/browserWindows.js.map b/src/ElectronNET.Host/api/browserWindows.js.map index becb38d5..6fc574ef 100644 --- a/src/ElectronNET.Host/api/browserWindows.js.map +++ b/src/ElectronNET.Host/api/browserWindows.js.map @@ -1 +1 @@ -{"version":3,"file":"browserWindows.js","sourceRoot":"","sources":["browserWindows.ts"],"names":[],"mappings":";AACA,uCAA4D;AAC5D,+CAA0D;AAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,OAAO,GAA6B,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAA6B,CAAC;AAClI,IAAI,qBAAqB,GAAa,EAAE,CAAC;AACzC,IAAI,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC;AACxC,IAAI,aAAa,CAAC;AAClB,MAAM,qBAAqB,GAAgC,CAAC,MAAM,CAAC,uBAAuB,CAAC,GAAG,MAAM,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAgC,CAAC;AAEpK,iBAAS,CAAC,MAAc,EAAE,GAAiB,EAAE,EAAE;IAC3C,cAAc,GAAG,MAAM,CAAC;IAExB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;QAChE,IAA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GAAG,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,gCAAgC,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE;QAC3D,aAAa,CAAC,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,0BAA0B,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE;QACjD,aAAa,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,8BAA8B,EAAE,CAAC,EAAE,EAAE,aAAa,EAAE,EAAE;QAC9D,aAAa,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,IAAA,uCAAyB,EAAC,aAAa,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,SAAS,aAAa,CAAC,EAAU;QAC/B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YACpD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;YAC/B,IAAI,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;gBACtB,OAAO,OAAO,CAAC;YACjB,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/browserWindows.ts b/src/ElectronNET.Host/api/browserWindows.ts index 6e9516b5..b54f5a04 100644 --- a/src/ElectronNET.Host/api/browserWindows.ts +++ b/src/ElectronNET.Host/api/browserWindows.ts @@ -1,798 +1,877 @@ -import { Socket } from 'net'; -import { BrowserWindow, Menu, nativeImage } from 'electron'; -import { browserViewMediateService } from './browserView'; -const path = require('path'); -const windows: Electron.BrowserWindow[] = (global['browserWindows'] = global['browserWindows'] || []) as Electron.BrowserWindow[]; +import { Socket } from "net"; +import { BrowserWindow, Menu, nativeImage } from "electron"; +import { browserViewMediateService } from "./browserView"; +const path = require("path"); +const windows: Electron.BrowserWindow[] = (global["browserWindows"] = + global["browserWindows"] || []) as Electron.BrowserWindow[]; let readyToShowWindowsIds: number[] = []; let window, lastOptions, electronSocket; let mainWindowURL; -const proxyToCredentialsMap: { [proxy: string]: string } = (global['proxyToCredentialsMap'] = global['proxyToCredentialsMap'] || []) as { [proxy: string]: string }; +const proxyToCredentialsMap: { [proxy: string]: string } = (global[ + "proxyToCredentialsMap" +] = global["proxyToCredentialsMap"] || []) as { [proxy: string]: string }; export = (socket: Socket, app: Electron.App) => { - electronSocket = socket; - - app.on('login', (event, webContents, request, authInfo, callback) => { - if (authInfo.isProxy) { - let proxy = `${authInfo.host}:${authInfo.port}` - if (proxy in proxyToCredentialsMap && proxyToCredentialsMap[proxy].split(':').length === 2) { - event.preventDefault() - let user = proxyToCredentialsMap[proxy].split(':')[0] - let pass = proxyToCredentialsMap[proxy].split(':')[1] - callback(user, pass) - } - } - }) - - socket.on('register-browserWindow-ready-to-show', (id) => { - if (readyToShowWindowsIds.includes(id)) { - readyToShowWindowsIds = readyToShowWindowsIds.filter(value => value !== id); - electronSocket.emit('browserWindow-ready-to-show' + id); - } + electronSocket = socket; + + app.on("login", (event, webContents, request, authInfo, callback) => { + if (authInfo.isProxy) { + let proxy = `${authInfo.host}:${authInfo.port}`; + if ( + proxy in proxyToCredentialsMap && + proxyToCredentialsMap[proxy].split(":").length === 2 + ) { + event.preventDefault(); + let user = proxyToCredentialsMap[proxy].split(":")[0]; + let pass = proxyToCredentialsMap[proxy].split(":")[1]; + callback(user, pass); + } + } + }); + + socket.on("register-browserWindow-ready-to-show", (id) => { + if (readyToShowWindowsIds.includes(id)) { + readyToShowWindowsIds = readyToShowWindowsIds.filter( + (value) => value !== id + ); + electronSocket.emit("browserWindow-ready-to-show" + id); + } - getWindowById(id).on('ready-to-show', () => { - readyToShowWindowsIds.push(id); - electronSocket.emit('browserWindow-ready-to-show' + id); - }); + getWindowById(id).on("ready-to-show", () => { + readyToShowWindowsIds.push(id); + electronSocket.emit("browserWindow-ready-to-show" + id); }); + }); - socket.on('register-browserWindow-page-title-updated', (id) => { - getWindowById(id).on('page-title-updated', (event, title) => { - electronSocket.emit('browserWindow-page-title-updated' + id, title); - }); + socket.on("register-browserWindow-page-title-updated", (id) => { + getWindowById(id).on("page-title-updated", (event, title) => { + electronSocket.emit("browserWindow-page-title-updated" + id, title); }); + }); - socket.on('register-browserWindow-close', (id) => { - getWindowById(id).on('close', () => { - electronSocket.emit('browserWindow-close' + id); - }); + socket.on("register-browserWindow-close", (id) => { + getWindowById(id).on("close", () => { + electronSocket.emit("browserWindow-close" + id); }); + }); - socket.on('register-browserWindow-closed', (id) => { - getWindowById(id).on('closed', () => { - electronSocket.emit('browserWindow-closed' + id); - }); + socket.on("register-browserWindow-closed", (id) => { + getWindowById(id).on("closed", () => { + electronSocket.emit("browserWindow-closed" + id); }); + }); - socket.on('register-browserWindow-session-end', (id) => { - getWindowById(id).on('session-end', () => { - electronSocket.emit('browserWindow-session-end' + id); - }); + socket.on("register-browserWindow-session-end", (id) => { + getWindowById(id).on("session-end", () => { + electronSocket.emit("browserWindow-session-end" + id); }); + }); - socket.on('register-browserWindow-unresponsive', (id) => { - getWindowById(id).on('unresponsive', () => { - electronSocket.emit('browserWindow-unresponsive' + id); - }); + socket.on("register-browserWindow-unresponsive", (id) => { + getWindowById(id).on("unresponsive", () => { + electronSocket.emit("browserWindow-unresponsive" + id); }); + }); - socket.on('register-browserWindow-responsive', (id) => { - getWindowById(id).on('responsive', () => { - electronSocket.emit('browserWindow-responsive' + id); - }); + socket.on("register-browserWindow-responsive", (id) => { + getWindowById(id).on("responsive", () => { + electronSocket.emit("browserWindow-responsive" + id); }); + }); - socket.on('register-browserWindow-blur', (id) => { - getWindowById(id).on('blur', () => { - electronSocket.emit('browserWindow-blur' + id); - }); + socket.on("register-browserWindow-blur", (id) => { + getWindowById(id).on("blur", () => { + electronSocket.emit("browserWindow-blur" + id); }); + }); - socket.on('register-browserWindow-focus', (id) => { - getWindowById(id).on('focus', () => { - electronSocket.emit('browserWindow-focus' + id); - }); + socket.on("register-browserWindow-focus", (id) => { + getWindowById(id).on("focus", () => { + electronSocket.emit("browserWindow-focus" + id); }); + }); - socket.on('register-browserWindow-show', (id) => { - getWindowById(id).on('show', () => { - electronSocket.emit('browserWindow-show' + id); - }); + socket.on("register-browserWindow-show", (id) => { + getWindowById(id).on("show", () => { + electronSocket.emit("browserWindow-show" + id); }); + }); - socket.on('register-browserWindow-hide', (id) => { - getWindowById(id).on('hide', () => { - electronSocket.emit('browserWindow-hide' + id); - }); + socket.on("register-browserWindow-hide", (id) => { + getWindowById(id).on("hide", () => { + electronSocket.emit("browserWindow-hide" + id); }); + }); - socket.on('register-browserWindow-maximize', (id) => { - getWindowById(id).on('maximize', () => { - electronSocket.emit('browserWindow-maximize' + id); - }); + socket.on("register-browserWindow-maximize", (id) => { + getWindowById(id).on("maximize", () => { + electronSocket.emit("browserWindow-maximize" + id); }); + }); - socket.on('register-browserWindow-unmaximize', (id) => { - getWindowById(id).on('unmaximize', () => { - electronSocket.emit('browserWindow-unmaximize' + id); - }); + socket.on("register-browserWindow-unmaximize", (id) => { + getWindowById(id).on("unmaximize", () => { + electronSocket.emit("browserWindow-unmaximize" + id); }); + }); - socket.on('register-browserWindow-minimize', (id) => { - getWindowById(id).on('minimize', () => { - electronSocket.emit('browserWindow-minimize' + id); - }); + socket.on("register-browserWindow-minimize", (id) => { + getWindowById(id).on("minimize", () => { + electronSocket.emit("browserWindow-minimize" + id); }); + }); - socket.on('register-browserWindow-restore', (id) => { - getWindowById(id).on('restore', () => { - electronSocket.emit('browserWindow-restore' + id); - }); + socket.on("register-browserWindow-restore", (id) => { + getWindowById(id).on("restore", () => { + electronSocket.emit("browserWindow-restore" + id); }); + }); - socket.on('register-browserWindow-resize', (id) => { - getWindowById(id).on('resize', () => { - electronSocket.emit('browserWindow-resize' + id); - }); + socket.on("register-browserWindow-resize", (id) => { + getWindowById(id).on("resize", () => { + electronSocket.emit("browserWindow-resize" + id); }); + }); - socket.on('register-browserWindow-move', (id) => { - getWindowById(id).on('move', () => { - electronSocket.emit('browserWindow-move' + id); - }); + socket.on("register-browserWindow-move", (id) => { + getWindowById(id).on("move", () => { + electronSocket.emit("browserWindow-move" + id); }); + }); - socket.on('register-browserWindow-moved', (id) => { - getWindowById(id).on('moved', () => { - electronSocket.emit('browserWindow-moved' + id); - }); + socket.on("register-browserWindow-moved", (id) => { + getWindowById(id).on("moved", () => { + electronSocket.emit("browserWindow-moved" + id); }); + }); - socket.on('register-browserWindow-enter-full-screen', (id) => { - getWindowById(id).on('enter-full-screen', () => { - electronSocket.emit('browserWindow-enter-full-screen' + id); - }); + socket.on("register-browserWindow-enter-full-screen", (id) => { + getWindowById(id).on("enter-full-screen", () => { + electronSocket.emit("browserWindow-enter-full-screen" + id); }); + }); - socket.on('register-browserWindow-leave-full-screen', (id) => { - getWindowById(id).on('leave-full-screen', () => { - electronSocket.emit('browserWindow-leave-full-screen' + id); - }); + socket.on("register-browserWindow-leave-full-screen", (id) => { + getWindowById(id).on("leave-full-screen", () => { + electronSocket.emit("browserWindow-leave-full-screen" + id); }); + }); - socket.on('register-browserWindow-enter-html-full-screen', (id) => { - getWindowById(id).on('enter-html-full-screen', () => { - electronSocket.emit('browserWindow-enter-html-full-screen' + id); - }); + socket.on("register-browserWindow-enter-html-full-screen", (id) => { + getWindowById(id).on("enter-html-full-screen", () => { + electronSocket.emit("browserWindow-enter-html-full-screen" + id); }); + }); - socket.on('register-browserWindow-leave-html-full-screen', (id) => { - getWindowById(id).on('leave-html-full-screen', () => { - electronSocket.emit('browserWindow-leave-html-full-screen' + id); - }); + socket.on("register-browserWindow-leave-html-full-screen", (id) => { + getWindowById(id).on("leave-html-full-screen", () => { + electronSocket.emit("browserWindow-leave-html-full-screen" + id); }); + }); - socket.on('register-browserWindow-app-command', (id) => { - getWindowById(id).on('app-command', (event, command) => { - electronSocket.emit('browserWindow-app-command' + id, command); - }); + socket.on("register-browserWindow-app-command", (id) => { + getWindowById(id).on("app-command", (event, command) => { + electronSocket.emit("browserWindow-app-command" + id, command); }); + }); - socket.on('register-browserWindow-swipe', (id) => { - getWindowById(id).on('swipe', (event, direction) => { - electronSocket.emit('browserWindow-swipe' + id, direction); - }); + socket.on("register-browserWindow-swipe", (id) => { + getWindowById(id).on("swipe", (event, direction) => { + electronSocket.emit("browserWindow-swipe" + id, direction); }); + }); - socket.on('register-browserWindow-sheet-begin', (id) => { - getWindowById(id).on('sheet-begin', () => { - electronSocket.emit('browserWindow-sheet-begin' + id); - }); + socket.on("register-browserWindow-sheet-begin", (id) => { + getWindowById(id).on("sheet-begin", () => { + electronSocket.emit("browserWindow-sheet-begin" + id); }); + }); - socket.on('register-browserWindow-sheet-end', (id) => { - getWindowById(id).on('sheet-end', () => { - electronSocket.emit('browserWindow-sheet-end' + id); - }); + socket.on("register-browserWindow-sheet-end", (id) => { + getWindowById(id).on("sheet-end", () => { + electronSocket.emit("browserWindow-sheet-end" + id); }); + }); - socket.on('register-browserWindow-new-window-for-tab', (id) => { - getWindowById(id).on('new-window-for-tab', () => { - electronSocket.emit('browserWindow-new-window-for-tab' + id); - }); + socket.on("register-browserWindow-new-window-for-tab", (id) => { + getWindowById(id).on("new-window-for-tab", () => { + electronSocket.emit("browserWindow-new-window-for-tab" + id); }); + }); - socket.on('createBrowserWindow', (options, loadUrl) => { - if (options.webPreferences && !('nodeIntegration' in options.webPreferences)) { - options = { ...options, webPreferences: { ...options.webPreferences, nodeIntegration: true, contextIsolation: false } }; - } else if (!options.webPreferences) { - options = { ...options, webPreferences: { nodeIntegration: true, contextIsolation: false } }; - } - - // we dont want to recreate the window when watch is ready. - if (app.commandLine.hasSwitch('watch') && app['mainWindowURL'] === loadUrl) { - window = app['mainWindow']; - if (window) { - window.reload(); - windows.push(window); - electronSocket.emit('BrowserWindowCreated', window.id); - return; - } - } else { - window = new BrowserWindow(options); - } - - if (options.proxy) { - window.webContents.session.setProxy({proxyRules: options.proxy}); - } - - if (options.proxy && options.proxyCredentials) { - proxyToCredentialsMap[options.proxy] = options.proxyCredentials; - } - - window.on('ready-to-show', () => { - if (readyToShowWindowsIds.includes(window.id)) { - readyToShowWindowsIds = readyToShowWindowsIds.filter(value => value !== window.id); - } else { - readyToShowWindowsIds.push(window.id); - } - }); - - lastOptions = options; - - window.on('closed', (sender) => { - for (let index = 0; index < windows.length; index++) { - const windowItem = windows[index]; - try { - windowItem.id; - } catch (error) { - if (error.message === 'Object has been destroyed') { - windows.splice(index, 1); - - const ids = []; - windows.forEach(x => ids.push(x.id)); - electronSocket.emit('BrowserWindowClosed', ids); - } - } - } - }); - - app.on('activate', () => { - // On macOS it's common to re-create a window in the app when the - // dock icon is clicked and there are no other windows open. - if (window === null && lastOptions) { - window = new BrowserWindow(lastOptions); - } - }); - - if (loadUrl) { - window.loadURL(loadUrl); - } + socket.on("createBrowserWindow", (options, loadUrl) => { + if ( + options.webPreferences && + !("nodeIntegration" in options.webPreferences) + ) { + options = { + ...options, + webPreferences: { + ...options.webPreferences, + nodeIntegration: true, + contextIsolation: false, + }, + }; + } else if (!options.webPreferences) { + options = { + ...options, + webPreferences: { nodeIntegration: true, contextIsolation: false }, + }; + } - if (app.commandLine.hasSwitch('clear-cache') && - app.commandLine.getSwitchValue('clear-cache')) { - window.webContents.session.clearCache(); - console.log('auto clear-cache active for new window.'); - } + if (options.isRunningBlazor) { + options.webPreferences["preload"] = path.join( + __dirname, + "..", + "scripts", + "blazor-preload.js" + ); + } - // set main window url - if (app['mainWindowURL'] == undefined || app['mainWindowURL'] == "") { - app['mainWindowURL'] = loadUrl; - app['mainWindow'] = window; - } + delete options.isRunningBlazor; + // we dont want to recreate the window when watch is ready. + if ( + app.commandLine.hasSwitch("watch") && + app["mainWindowURL"] === loadUrl + ) { + window = app["mainWindow"]; + if (window) { + window.reload(); windows.push(window); - electronSocket.emit('BrowserWindowCreated', window.id); - }); - - socket.on('browserWindowDestroy', (id) => { - getWindowById(id).destroy(); - }); + electronSocket.emit("BrowserWindowCreated", window.id); + return; + } + } else { + window = new BrowserWindow(options); + } - socket.on('browserWindowClose', (id) => { - getWindowById(id).close(); - }); + if (options.proxy) { + window.webContents.session.setProxy({ proxyRules: options.proxy }); + } - socket.on('browserWindowFocus', (id) => { - getWindowById(id).focus(); - }); + if (options.proxy && options.proxyCredentials) { + proxyToCredentialsMap[options.proxy] = options.proxyCredentials; + } - socket.on('browserWindowBlur', (id) => { - getWindowById(id).blur(); + window.on("ready-to-show", () => { + if (readyToShowWindowsIds.includes(window.id)) { + readyToShowWindowsIds = readyToShowWindowsIds.filter( + (value) => value !== window.id + ); + } else { + readyToShowWindowsIds.push(window.id); + } }); - socket.on('browserWindowIsFocused', (id) => { - const isFocused = getWindowById(id).isFocused(); + lastOptions = options; - electronSocket.emit('browserWindow-isFocused-completed', isFocused); + window.on("closed", (sender) => { + for (let index = 0; index < windows.length; index++) { + const windowItem = windows[index]; + try { + windowItem.id; + } catch (error) { + if (error.message === "Object has been destroyed") { + windows.splice(index, 1); + + const ids = []; + windows.forEach((x) => ids.push(x.id)); + electronSocket.emit("BrowserWindowClosed", ids); + } + } + } }); - socket.on('browserWindowIsDestroyed', (id) => { - const isDestroyed = getWindowById(id).isDestroyed(); - - electronSocket.emit('browserWindow-isDestroyed-completed', isDestroyed); + app.on("activate", () => { + // On macOS it's common to re-create a window in the app when the + // dock icon is clicked and there are no other windows open. + if (window === null && lastOptions) { + window = new BrowserWindow(lastOptions); + } }); - socket.on('browserWindowShow', (id) => { - getWindowById(id).show(); - }); + if (loadUrl) { + window.loadURL(loadUrl); + } - socket.on('browserWindowShowInactive', (id) => { - getWindowById(id).showInactive(); - }); + if ( + app.commandLine.hasSwitch("clear-cache") && + app.commandLine.getSwitchValue("clear-cache") + ) { + window.webContents.session.clearCache(); + console.log("auto clear-cache active for new window."); + } - socket.on('browserWindowHide', (id) => { - getWindowById(id).hide(); - }); + // set main window url + if (app["mainWindowURL"] == undefined || app["mainWindowURL"] == "") { + app["mainWindowURL"] = loadUrl; + app["mainWindow"] = window; + } - socket.on('browserWindowIsVisible', (id) => { - const isVisible = getWindowById(id).isVisible(); + windows.push(window); + electronSocket.emit("BrowserWindowCreated", window.id); + }); - electronSocket.emit('browserWindow-isVisible-completed', isVisible); - }); + socket.on("browserWindowDestroy", (id) => { + getWindowById(id).destroy(); + }); - socket.on('browserWindowIsModal', (id) => { - const isModal = getWindowById(id).isModal(); + socket.on("browserWindowClose", (id) => { + getWindowById(id).close(); + }); - electronSocket.emit('browserWindow-isModal-completed', isModal); - }); + socket.on("browserWindowFocus", (id) => { + getWindowById(id).focus(); + }); - socket.on('browserWindowMaximize', (id) => { - getWindowById(id).maximize(); - }); + socket.on("browserWindowBlur", (id) => { + getWindowById(id).blur(); + }); - socket.on('browserWindowUnmaximize', (id) => { - getWindowById(id).unmaximize(); - }); + socket.on("browserWindowIsFocused", (id) => { + const isFocused = getWindowById(id).isFocused(); - socket.on('browserWindowIsMaximized', (id) => { - const isMaximized = getWindowById(id).isMaximized(); + electronSocket.emit("browserWindow-isFocused-completed", isFocused); + }); - electronSocket.emit('browserWindow-isMaximized-completed', isMaximized); - }); + socket.on("browserWindowIsDestroyed", (id) => { + const isDestroyed = getWindowById(id).isDestroyed(); - socket.on('browserWindowMinimize', (id) => { - getWindowById(id).minimize(); - }); + electronSocket.emit("browserWindow-isDestroyed-completed", isDestroyed); + }); - socket.on('browserWindowRestore', (id) => { - getWindowById(id).restore(); - }); + socket.on("browserWindowShow", (id) => { + getWindowById(id).show(); + }); - socket.on('browserWindowIsMinimized', (id) => { - const isMinimized = getWindowById(id).isMinimized(); + socket.on("browserWindowShowInactive", (id) => { + getWindowById(id).showInactive(); + }); - electronSocket.emit('browserWindow-isMinimized-completed', isMinimized); - }); + socket.on("browserWindowHide", (id) => { + getWindowById(id).hide(); + }); - socket.on('browserWindowSetFullScreen', (id, fullscreen) => { - getWindowById(id).setFullScreen(fullscreen); - }); + socket.on("browserWindowIsVisible", (id) => { + const isVisible = getWindowById(id).isVisible(); - socket.on('browserWindowIsFullScreen', (id) => { - const isFullScreen = getWindowById(id).isFullScreen(); + electronSocket.emit("browserWindow-isVisible-completed", isVisible); + }); - electronSocket.emit('browserWindow-isFullScreen-completed', isFullScreen); - }); + socket.on("browserWindowIsModal", (id) => { + const isModal = getWindowById(id).isModal(); - socket.on('browserWindowSetAspectRatio', (id, aspectRatio, extraSize) => { - getWindowById(id).setAspectRatio(aspectRatio, extraSize); - }); + electronSocket.emit("browserWindow-isModal-completed", isModal); + }); - socket.on('browserWindowPreviewFile', (id, path, displayname) => { - getWindowById(id).previewFile(path, displayname); - }); + socket.on("browserWindowMaximize", (id) => { + getWindowById(id).maximize(); + }); - socket.on('browserWindowCloseFilePreview', (id) => { - getWindowById(id).closeFilePreview(); - }); + socket.on("browserWindowUnmaximize", (id) => { + getWindowById(id).unmaximize(); + }); - socket.on('browserWindowSetBounds', (id, bounds, animate) => { - getWindowById(id).setBounds(bounds, animate); - }); + socket.on("browserWindowIsMaximized", (id) => { + const isMaximized = getWindowById(id).isMaximized(); - socket.on('browserWindowGetBounds', (id) => { - const rectangle = getWindowById(id).getBounds(); + electronSocket.emit("browserWindow-isMaximized-completed", isMaximized); + }); - electronSocket.emit('browserWindow-getBounds-completed', rectangle); - }); + socket.on("browserWindowMinimize", (id) => { + getWindowById(id).minimize(); + }); - socket.on('browserWindowSetContentBounds', (id, bounds, animate) => { - getWindowById(id).setContentBounds(bounds, animate); - }); + socket.on("browserWindowRestore", (id) => { + getWindowById(id).restore(); + }); - socket.on('browserWindowGetContentBounds', (id) => { - const rectangle = getWindowById(id).getContentBounds(); + socket.on("browserWindowIsMinimized", (id) => { + const isMinimized = getWindowById(id).isMinimized(); - electronSocket.emit('browserWindow-getContentBounds-completed', rectangle); - }); + electronSocket.emit("browserWindow-isMinimized-completed", isMinimized); + }); - socket.on('browserWindowSetSize', (id, width, height, animate) => { - getWindowById(id).setSize(width, height, animate); - }); + socket.on("browserWindowSetFullScreen", (id, fullscreen) => { + getWindowById(id).setFullScreen(fullscreen); + }); - socket.on('browserWindowGetSize', (id) => { - const size = getWindowById(id).getSize(); + socket.on("browserWindowIsFullScreen", (id) => { + const isFullScreen = getWindowById(id).isFullScreen(); - electronSocket.emit('browserWindow-getSize-completed', size); - }); + electronSocket.emit("browserWindow-isFullScreen-completed", isFullScreen); + }); - socket.on('browserWindowSetContentSize', (id, width, height, animate) => { - getWindowById(id).setContentSize(width, height, animate); - }); + socket.on("browserWindowSetAspectRatio", (id, aspectRatio, extraSize) => { + getWindowById(id).setAspectRatio(aspectRatio, extraSize); + }); - socket.on('browserWindowGetContentSize', (id) => { - const size = getWindowById(id).getContentSize(); + socket.on("browserWindowPreviewFile", (id, path, displayname) => { + getWindowById(id).previewFile(path, displayname); + }); - electronSocket.emit('browserWindow-getContentSize-completed', size); - }); + socket.on("browserWindowCloseFilePreview", (id) => { + getWindowById(id).closeFilePreview(); + }); - socket.on('browserWindowSetMinimumSize', (id, width, height) => { - getWindowById(id).setMinimumSize(width, height); - }); + socket.on("browserWindowSetBounds", (id, bounds, animate) => { + getWindowById(id).setBounds(bounds, animate); + }); - socket.on('browserWindowGetMinimumSize', (id) => { - const size = getWindowById(id).getMinimumSize(); + socket.on("browserWindowGetBounds", (id) => { + const rectangle = getWindowById(id).getBounds(); - electronSocket.emit('browserWindow-getMinimumSize-completed', size); - }); + electronSocket.emit("browserWindow-getBounds-completed", rectangle); + }); - socket.on('browserWindowSetMaximumSize', (id, width, height) => { - getWindowById(id).setMaximumSize(width, height); - }); + socket.on("browserWindowSetContentBounds", (id, bounds, animate) => { + getWindowById(id).setContentBounds(bounds, animate); + }); - socket.on('browserWindowGetMaximumSize', (id) => { - const size = getWindowById(id).getMaximumSize(); + socket.on("browserWindowGetContentBounds", (id) => { + const rectangle = getWindowById(id).getContentBounds(); - electronSocket.emit('browserWindow-getMaximumSize-completed', size); - }); + electronSocket.emit("browserWindow-getContentBounds-completed", rectangle); + }); - socket.on('browserWindowSetResizable', (id, resizable) => { - getWindowById(id).setResizable(resizable); - }); + socket.on("browserWindowSetSize", (id, width, height, animate) => { + getWindowById(id).setSize(width, height, animate); + }); - socket.on('browserWindowIsResizable', (id) => { - const resizable = getWindowById(id).isResizable(); + socket.on("browserWindowGetSize", (id) => { + const size = getWindowById(id).getSize(); - electronSocket.emit('browserWindow-isResizable-completed', resizable); - }); + electronSocket.emit("browserWindow-getSize-completed", size); + }); - socket.on('browserWindowSetMovable', (id, movable) => { - getWindowById(id).setMovable(movable); - }); + socket.on("browserWindowSetContentSize", (id, width, height, animate) => { + getWindowById(id).setContentSize(width, height, animate); + }); - socket.on('browserWindowIsMovable', (id) => { - const movable = getWindowById(id).isMovable(); + socket.on("browserWindowGetContentSize", (id) => { + const size = getWindowById(id).getContentSize(); - electronSocket.emit('browserWindow-isMovable-completed', movable); - }); + electronSocket.emit("browserWindow-getContentSize-completed", size); + }); - socket.on('browserWindowSetMinimizable', (id, minimizable) => { - getWindowById(id).setMinimizable(minimizable); - }); + socket.on("browserWindowSetMinimumSize", (id, width, height) => { + getWindowById(id).setMinimumSize(width, height); + }); - socket.on('browserWindowIsMinimizable', (id) => { - const minimizable = getWindowById(id).isMinimizable(); + socket.on("browserWindowGetMinimumSize", (id) => { + const size = getWindowById(id).getMinimumSize(); - electronSocket.emit('browserWindow-isMinimizable-completed', minimizable); - }); + electronSocket.emit("browserWindow-getMinimumSize-completed", size); + }); - socket.on('browserWindowSetMaximizable', (id, maximizable) => { - getWindowById(id).setMaximizable(maximizable); - }); + socket.on("browserWindowSetMaximumSize", (id, width, height) => { + getWindowById(id).setMaximumSize(width, height); + }); - socket.on('browserWindowIsMaximizable', (id) => { - const maximizable = getWindowById(id).isMaximizable(); + socket.on("browserWindowGetMaximumSize", (id) => { + const size = getWindowById(id).getMaximumSize(); - electronSocket.emit('browserWindow-isMaximizable-completed', maximizable); - }); + electronSocket.emit("browserWindow-getMaximumSize-completed", size); + }); - socket.on('browserWindowSetFullScreenable', (id, fullscreenable) => { - getWindowById(id).setFullScreenable(fullscreenable); - }); + socket.on("browserWindowSetResizable", (id, resizable) => { + getWindowById(id).setResizable(resizable); + }); - socket.on('browserWindowIsFullScreenable', (id) => { - const fullscreenable = getWindowById(id).isFullScreenable(); + socket.on("browserWindowIsResizable", (id) => { + const resizable = getWindowById(id).isResizable(); - electronSocket.emit('browserWindow-isFullScreenable-completed', fullscreenable); - }); + electronSocket.emit("browserWindow-isResizable-completed", resizable); + }); - socket.on('browserWindowSetClosable', (id, closable) => { - getWindowById(id).setClosable(closable); - }); + socket.on("browserWindowSetMovable", (id, movable) => { + getWindowById(id).setMovable(movable); + }); - socket.on('browserWindowIsClosable', (id) => { - const closable = getWindowById(id).isClosable(); + socket.on("browserWindowIsMovable", (id) => { + const movable = getWindowById(id).isMovable(); - electronSocket.emit('browserWindow-isClosable-completed', closable); - }); + electronSocket.emit("browserWindow-isMovable-completed", movable); + }); - socket.on('browserWindowSetAlwaysOnTop', (id, flag, level, relativeLevel) => { - getWindowById(id).setAlwaysOnTop(flag, level, relativeLevel); - }); + socket.on("browserWindowSetMinimizable", (id, minimizable) => { + getWindowById(id).setMinimizable(minimizable); + }); - socket.on('browserWindowIsAlwaysOnTop', (id) => { - const isAlwaysOnTop = getWindowById(id).isAlwaysOnTop(); + socket.on("browserWindowIsMinimizable", (id) => { + const minimizable = getWindowById(id).isMinimizable(); - electronSocket.emit('browserWindow-isAlwaysOnTop-completed', isAlwaysOnTop); - }); + electronSocket.emit("browserWindow-isMinimizable-completed", minimizable); + }); - socket.on('browserWindowCenter', (id) => { - getWindowById(id).center(); - }); + socket.on("browserWindowSetMaximizable", (id, maximizable) => { + getWindowById(id).setMaximizable(maximizable); + }); - socket.on('browserWindowSetPosition', (id, x, y, animate) => { - getWindowById(id).setPosition(x, y, animate); - }); + socket.on("browserWindowIsMaximizable", (id) => { + const maximizable = getWindowById(id).isMaximizable(); - socket.on('browserWindowGetPosition', (id) => { - const position = getWindowById(id).getPosition(); + electronSocket.emit("browserWindow-isMaximizable-completed", maximizable); + }); - electronSocket.emit('browserWindow-getPosition-completed', position); - }); + socket.on("browserWindowSetFullScreenable", (id, fullscreenable) => { + getWindowById(id).setFullScreenable(fullscreenable); + }); - socket.on('browserWindowSetTitle', (id, title) => { - getWindowById(id).setTitle(title); - }); + socket.on("browserWindowIsFullScreenable", (id) => { + const fullscreenable = getWindowById(id).isFullScreenable(); - socket.on('browserWindowGetTitle', (id) => { - const title = getWindowById(id).getTitle(); + electronSocket.emit( + "browserWindow-isFullScreenable-completed", + fullscreenable + ); + }); - electronSocket.emit('browserWindow-getTitle-completed', title); - }); + socket.on("browserWindowSetClosable", (id, closable) => { + getWindowById(id).setClosable(closable); + }); - socket.on('browserWindowSetTitle', (id, title) => { - getWindowById(id).setTitle(title); - }); - - socket.on('browserWindowSetSheetOffset', (id, offsetY, offsetX) => { - if (offsetX) { - getWindowById(id).setSheetOffset(offsetY, offsetX); - } else { - getWindowById(id).setSheetOffset(offsetY); - } - }); - - socket.on('browserWindowFlashFrame', (id, flag) => { - getWindowById(id).flashFrame(flag); - }); - - socket.on('browserWindowSetSkipTaskbar', (id, skip) => { - getWindowById(id).setSkipTaskbar(skip); - }); - - socket.on('browserWindowSetKiosk', (id, flag) => { - getWindowById(id).setKiosk(flag); - }); - - socket.on('browserWindowIsKiosk', (id) => { - const isKiosk = getWindowById(id).isKiosk(); - - electronSocket.emit('browserWindow-isKiosk-completed', isKiosk); - }); - - socket.on('browserWindowGetNativeWindowHandle', (id) => { - const nativeWindowHandle = getWindowById(id).getNativeWindowHandle().readInt32LE(0).toString(16); - electronSocket.emit('browserWindow-getNativeWindowHandle-completed', nativeWindowHandle); - }); - - socket.on('browserWindowSetRepresentedFilename', (id, filename) => { - const win = getWindowById(id); - try { - if (win && typeof win.setRepresentedFilename === 'function') { - win.setRepresentedFilename(filename); - } - } catch (e) { - console.warn('setRepresentedFilename failed (likely unsupported platform):', e); - } - }); + socket.on("browserWindowIsClosable", (id) => { + const closable = getWindowById(id).isClosable(); - socket.on('browserWindowGetRepresentedFilename', (id) => { - const win = getWindowById(id); - let pathname = ''; - try { - if (win && typeof win.getRepresentedFilename === 'function') { - pathname = win.getRepresentedFilename() || ''; - } - } catch (e) { - console.warn('getRepresentedFilename failed (likely unsupported platform):', e); - } - electronSocket.emit('browserWindow-getRepresentedFilename-completed', pathname); - }); - - socket.on('browserWindowSetDocumentEdited', (id, edited) => { - getWindowById(id).setDocumentEdited(edited); - }); + electronSocket.emit("browserWindow-isClosable-completed", closable); + }); - socket.on('browserWindowIsDocumentEdited', (id) => { - const edited = getWindowById(id).isDocumentEdited(); + socket.on("browserWindowSetAlwaysOnTop", (id, flag, level, relativeLevel) => { + getWindowById(id).setAlwaysOnTop(flag, level, relativeLevel); + }); - electronSocket.emit('browserWindow-isDocumentEdited-completed', edited); - }); + socket.on("browserWindowIsAlwaysOnTop", (id) => { + const isAlwaysOnTop = getWindowById(id).isAlwaysOnTop(); - socket.on('browserWindowFocusOnWebView', (id) => { - getWindowById(id).focusOnWebView(); - }); + electronSocket.emit("browserWindow-isAlwaysOnTop-completed", isAlwaysOnTop); + }); - socket.on('browserWindowBlurWebView', (id) => { - getWindowById(id).blurWebView(); - }); - - socket.on('browserWindowLoadURL', (id, url, options) => { - getWindowById(id).loadURL(url, options); - }); + socket.on("browserWindowCenter", (id) => { + getWindowById(id).center(); + }); - socket.on('browserWindowReload', (id) => { - getWindowById(id).reload(); - }); + socket.on("browserWindowSetPosition", (id, x, y, animate) => { + getWindowById(id).setPosition(x, y, animate); + }); - socket.on('browserWindowSetMenu', (id, menuItems) => { - let menu = null; + socket.on("browserWindowGetPosition", (id) => { + const position = getWindowById(id).getPosition(); - if (menuItems) { - menu = Menu.buildFromTemplate(menuItems); + electronSocket.emit("browserWindow-getPosition-completed", position); + }); - addMenuItemClickConnector(menu.items, (id) => { - electronSocket.emit('windowMenuItemClicked', id); - }); - } + socket.on("browserWindowSetTitle", (id, title) => { + getWindowById(id).setTitle(title); + }); - getWindowById(id).setMenu(menu); - }); + socket.on("browserWindowGetTitle", (id) => { + const title = getWindowById(id).getTitle(); - socket.on('browserWindowRemoveMenu', (id) => { - getWindowById(id).removeMenu(); - }); + electronSocket.emit("browserWindow-getTitle-completed", title); + }); - function addMenuItemClickConnector(menuItems, callback) { - menuItems.forEach((item) => { - if (item.submenu && item.submenu.items.length > 0) { - addMenuItemClickConnector(item.submenu.items, callback); - } + socket.on("browserWindowSetTitle", (id, title) => { + getWindowById(id).setTitle(title); + }); - if ('id' in item && item.id) { - item.click = () => { callback(item.id); }; - } - }); + socket.on("browserWindowSetSheetOffset", (id, offsetY, offsetX) => { + if (offsetX) { + getWindowById(id).setSheetOffset(offsetY, offsetX); + } else { + getWindowById(id).setSheetOffset(offsetY); } + }); + + socket.on("browserWindowFlashFrame", (id, flag) => { + getWindowById(id).flashFrame(flag); + }); + + socket.on("browserWindowSetSkipTaskbar", (id, skip) => { + getWindowById(id).setSkipTaskbar(skip); + }); + + socket.on("browserWindowSetKiosk", (id, flag) => { + getWindowById(id).setKiosk(flag); + }); + + socket.on("browserWindowIsKiosk", (id) => { + const isKiosk = getWindowById(id).isKiosk(); + + electronSocket.emit("browserWindow-isKiosk-completed", isKiosk); + }); + + socket.on("browserWindowGetNativeWindowHandle", (id) => { + const nativeWindowHandle = getWindowById(id) + .getNativeWindowHandle() + .readInt32LE(0) + .toString(16); + electronSocket.emit( + "browserWindow-getNativeWindowHandle-completed", + nativeWindowHandle + ); + }); + + socket.on("browserWindowSetRepresentedFilename", (id, filename) => { + const win = getWindowById(id); + try { + if (win && typeof win.setRepresentedFilename === "function") { + win.setRepresentedFilename(filename); + } + } catch (e) { + console.warn( + "setRepresentedFilename failed (likely unsupported platform):", + e + ); + } + }); + + socket.on("browserWindowGetRepresentedFilename", (id) => { + const win = getWindowById(id); + let pathname = ""; + try { + if (win && typeof win.getRepresentedFilename === "function") { + pathname = win.getRepresentedFilename() || ""; + } + } catch (e) { + console.warn( + "getRepresentedFilename failed (likely unsupported platform):", + e + ); + } + electronSocket.emit( + "browserWindow-getRepresentedFilename-completed", + pathname + ); + }); - socket.on('browserWindowSetProgressBar', (id, progress) => { - getWindowById(id).setProgressBar(progress); - }); - - socket.on('browserWindowSetProgressBar', (id, progress, options) => { - getWindowById(id).setProgressBar(progress, options); - }); - - socket.on('browserWindowSetHasShadow', (id, hasShadow) => { - getWindowById(id).setHasShadow(hasShadow); - }); - - socket.on('browserWindowHasShadow', (id) => { - const hasShadow = getWindowById(id).hasShadow(); - - electronSocket.emit('browserWindow-hasShadow-completed', hasShadow); - }); - - socket.on('browserWindowSetThumbarButtons', (id, thumbarButtons: Electron.ThumbarButton[]) => { - thumbarButtons.forEach(thumbarButton => { - const originalIconPath = thumbarButton.icon.toString(); - const path = require('path'); - const fs = require('fs'); - let imagePath = originalIconPath; - if (!path.isAbsolute(originalIconPath)) { - imagePath = path.join(__dirname.replace('api', ''), 'bin', originalIconPath); - } - const { nativeImage } = require('electron'); - if (fs.existsSync(imagePath)) { - thumbarButton.icon = nativeImage.createFromPath(imagePath); - } else { - // Fallback to empty image to avoid failure - thumbarButton.icon = nativeImage.createEmpty(); - } - thumbarButton.click = () => { - electronSocket.emit('thumbarButtonClicked', thumbarButton['id']); - }; - }); - - const success = getWindowById(id).setThumbarButtons(thumbarButtons); - electronSocket.emit('browserWindowSetThumbarButtons-completed', success); - }); - - socket.on('browserWindowSetThumbnailClip', (id, rectangle) => { - getWindowById(id).setThumbnailClip(rectangle); - }); - - socket.on('browserWindowSetThumbnailToolTip', (id, toolTip) => { - getWindowById(id).setThumbnailToolTip(toolTip); - }); - - socket.on('browserWindowSetAppDetails', (id, options) => { - getWindowById(id).setAppDetails(options); - }); - - socket.on('browserWindowShowDefinitionForSelection', (id) => { - getWindowById(id).showDefinitionForSelection(); - }); + socket.on("browserWindowSetDocumentEdited", (id, edited) => { + getWindowById(id).setDocumentEdited(edited); + }); - socket.on('browserWindowSetAutoHideMenuBar', (id, hide) => { - getWindowById(id).setAutoHideMenuBar(hide); - }); + socket.on("browserWindowIsDocumentEdited", (id) => { + const edited = getWindowById(id).isDocumentEdited(); - socket.on('browserWindowIsMenuBarAutoHide', (id) => { - const isMenuBarAutoHide = getWindowById(id).isMenuBarAutoHide(); + electronSocket.emit("browserWindow-isDocumentEdited-completed", edited); + }); - electronSocket.emit('browserWindow-isMenuBarAutoHide-completed', isMenuBarAutoHide); - }); + socket.on("browserWindowFocusOnWebView", (id) => { + getWindowById(id).focusOnWebView(); + }); - socket.on('browserWindowSetMenuBarVisibility', (id, visible) => { - getWindowById(id).setMenuBarVisibility(visible); - }); + socket.on("browserWindowBlurWebView", (id) => { + getWindowById(id).blurWebView(); + }); - socket.on('browserWindowIsMenuBarVisible', (id) => { - const isMenuBarVisible = getWindowById(id).isMenuBarVisible(); + socket.on("browserWindowLoadURL", (id, url, options) => { + getWindowById(id).loadURL(url, options); + }); - electronSocket.emit('browserWindow-isMenuBarVisible-completed', isMenuBarVisible); - }); + socket.on("browserWindowReload", (id) => { + getWindowById(id).reload(); + }); - socket.on('browserWindowSetVisibleOnAllWorkspaces', (id, visible) => { - getWindowById(id).setVisibleOnAllWorkspaces(visible); - }); + socket.on("browserWindowSetMenu", (id, menuItems) => { + let menu = null; - socket.on('browserWindowIsVisibleOnAllWorkspaces', (id) => { - const isVisibleOnAllWorkspaces = getWindowById(id).isVisibleOnAllWorkspaces(); + if (menuItems) { + menu = Menu.buildFromTemplate(menuItems); - electronSocket.emit('browserWindow-isVisibleOnAllWorkspaces-completed', isVisibleOnAllWorkspaces); - }); - - socket.on('browserWindowSetIgnoreMouseEvents', (id, ignore) => { - getWindowById(id).setIgnoreMouseEvents(ignore); - }); - - socket.on('browserWindowSetContentProtection', (id, enable) => { - getWindowById(id).setContentProtection(enable); - }); - - socket.on('browserWindowSetFocusable', (id, focusable) => { - getWindowById(id).setFocusable(focusable); - }); + addMenuItemClickConnector(menu.items, (id) => { + electronSocket.emit("windowMenuItemClicked", id); + }); + } - socket.on('browserWindowSetParentWindow', (id, parent) => { - const child = getWindowById(id); - if (!parent) { - // Clear parent: make this window top-level - child.setParentWindow(null); - return; + getWindowById(id).setMenu(menu); + }); + + socket.on("browserWindowRemoveMenu", (id) => { + getWindowById(id).removeMenu(); + }); + + function addMenuItemClickConnector(menuItems, callback) { + menuItems.forEach((item) => { + if (item.submenu && item.submenu.items.length > 0) { + addMenuItemClickConnector(item.submenu.items, callback); + } + + if ("id" in item && item.id) { + item.click = () => { + callback(item.id); + }; + } + }); + } + + socket.on("browserWindowSetProgressBar", (id, progress) => { + getWindowById(id).setProgressBar(progress); + }); + + socket.on("browserWindowSetProgressBar", (id, progress, options) => { + getWindowById(id).setProgressBar(progress, options); + }); + + socket.on("browserWindowSetHasShadow", (id, hasShadow) => { + getWindowById(id).setHasShadow(hasShadow); + }); + + socket.on("browserWindowHasShadow", (id) => { + const hasShadow = getWindowById(id).hasShadow(); + + electronSocket.emit("browserWindow-hasShadow-completed", hasShadow); + }); + + socket.on( + "browserWindowSetThumbarButtons", + (id, thumbarButtons: Electron.ThumbarButton[]) => { + thumbarButtons.forEach((thumbarButton) => { + const originalIconPath = thumbarButton.icon.toString(); + const path = require("path"); + const fs = require("fs"); + let imagePath = originalIconPath; + if (!path.isAbsolute(originalIconPath)) { + imagePath = path.join( + __dirname.replace("api", ""), + "bin", + originalIconPath + ); } - const browserWindow = BrowserWindow.fromId(parent.id); - child.setParentWindow(browserWindow); - }); + const { nativeImage } = require("electron"); + if (fs.existsSync(imagePath)) { + thumbarButton.icon = nativeImage.createFromPath(imagePath); + } else { + // Fallback to empty image to avoid failure + thumbarButton.icon = nativeImage.createEmpty(); + } + thumbarButton.click = () => { + electronSocket.emit("thumbarButtonClicked", thumbarButton["id"]); + }; + }); - socket.on('browserWindowGetParentWindow', (id) => { - const browserWindow = getWindowById(id).getParentWindow(); + const success = getWindowById(id).setThumbarButtons(thumbarButtons); + electronSocket.emit("browserWindowSetThumbarButtons-completed", success); + } + ); + + socket.on("browserWindowSetThumbnailClip", (id, rectangle) => { + getWindowById(id).setThumbnailClip(rectangle); + }); + + socket.on("browserWindowSetThumbnailToolTip", (id, toolTip) => { + getWindowById(id).setThumbnailToolTip(toolTip); + }); + + socket.on("browserWindowSetAppDetails", (id, options) => { + getWindowById(id).setAppDetails(options); + }); + + socket.on("browserWindowShowDefinitionForSelection", (id) => { + getWindowById(id).showDefinitionForSelection(); + }); + + socket.on("browserWindowSetAutoHideMenuBar", (id, hide) => { + getWindowById(id).setAutoHideMenuBar(hide); + }); + + socket.on("browserWindowIsMenuBarAutoHide", (id) => { + const isMenuBarAutoHide = getWindowById(id).isMenuBarAutoHide(); + + electronSocket.emit( + "browserWindow-isMenuBarAutoHide-completed", + isMenuBarAutoHide + ); + }); + + socket.on("browserWindowSetMenuBarVisibility", (id, visible) => { + getWindowById(id).setMenuBarVisibility(visible); + }); + + socket.on("browserWindowIsMenuBarVisible", (id) => { + const isMenuBarVisible = getWindowById(id).isMenuBarVisible(); + + electronSocket.emit( + "browserWindow-isMenuBarVisible-completed", + isMenuBarVisible + ); + }); + + socket.on("browserWindowSetVisibleOnAllWorkspaces", (id, visible) => { + getWindowById(id).setVisibleOnAllWorkspaces(visible); + }); + + socket.on("browserWindowIsVisibleOnAllWorkspaces", (id) => { + const isVisibleOnAllWorkspaces = + getWindowById(id).isVisibleOnAllWorkspaces(); + + electronSocket.emit( + "browserWindow-isVisibleOnAllWorkspaces-completed", + isVisibleOnAllWorkspaces + ); + }); + + socket.on("browserWindowSetIgnoreMouseEvents", (id, ignore) => { + getWindowById(id).setIgnoreMouseEvents(ignore); + }); + + socket.on("browserWindowSetContentProtection", (id, enable) => { + getWindowById(id).setContentProtection(enable); + }); + + socket.on("browserWindowSetFocusable", (id, focusable) => { + getWindowById(id).setFocusable(focusable); + }); + + socket.on("browserWindowSetParentWindow", (id, parent) => { + const child = getWindowById(id); + if (!parent) { + // Clear parent: make this window top-level + child.setParentWindow(null); + return; + } + const browserWindow = BrowserWindow.fromId(parent.id); + child.setParentWindow(browserWindow); + }); - electronSocket.emit('browserWindow-getParentWindow-completed', browserWindow.id); - }); + socket.on("browserWindowGetParentWindow", (id) => { + const browserWindow = getWindowById(id).getParentWindow(); - socket.on('browserWindowGetChildWindows', (id) => { - const browserWindows = getWindowById(id).getChildWindows(); + electronSocket.emit( + "browserWindow-getParentWindow-completed", + browserWindow.id + ); + }); - const ids = []; + socket.on("browserWindowGetChildWindows", (id) => { + const browserWindows = getWindowById(id).getChildWindows(); - browserWindows.forEach(x => { - ids.push(x.id); - }); + const ids = []; - electronSocket.emit('browserWindow-getChildWindows-completed', ids); + browserWindows.forEach((x) => { + ids.push(x.id); }); - socket.on('browserWindowSetAutoHideCursor', (id, autoHide) => { - getWindowById(id).setAutoHideCursor(autoHide); - }); + electronSocket.emit("browserWindow-getChildWindows-completed", ids); + }); - socket.on('browserWindowSetVibrancy', (id, type) => { - getWindowById(id).setVibrancy(type); - }); + socket.on("browserWindowSetAutoHideCursor", (id, autoHide) => { + getWindowById(id).setAutoHideCursor(autoHide); + }); - socket.on('browserWindow-setBrowserView', (id, browserViewId) => { - getWindowById(id).setBrowserView(browserViewMediateService(browserViewId)); - }); + socket.on("browserWindowSetVibrancy", (id, type) => { + getWindowById(id).setVibrancy(type); + }); - function getWindowById(id: number): Electron.BrowserWindow { - for (let index = 0; index < windows.length; index++) { - const element = windows[index]; - if (element.id === id) { - return element; - } - } + socket.on("browserWindow-setBrowserView", (id, browserViewId) => { + getWindowById(id).setBrowserView(browserViewMediateService(browserViewId)); + }); + + function getWindowById(id: number): Electron.BrowserWindow { + for (let index = 0; index < windows.length; index++) { + const element = windows[index]; + if (element.id === id) { + return element; + } } + } }; diff --git a/src/ElectronNET.Host/api/ipc.js b/src/ElectronNET.Host/api/ipc.js index efbe120a..b95352ef 100644 --- a/src/ElectronNET.Host/api/ipc.js +++ b/src/ElectronNET.Host/api/ipc.js @@ -58,11 +58,10 @@ module.exports = (socket) => { catch { /* ignore */ } }); electron_1.ipcMain.on('integration-click-context-menu', (event, windowId, id) => { - var _a, _b; try { const entries = global['contextMenuItems'] || []; const entry = entries.find((x) => x.browserWindowId === windowId); - const mi = (_b = (_a = entry === null || entry === void 0 ? void 0 : entry.menu) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.find((i) => i.id === id); + const mi = entry?.menu?.items?.find((i) => i.id === id); if (mi && typeof mi.click === 'function') { const bw = electron_1.BrowserWindow.fromId(windowId); mi.click(undefined, bw, undefined); diff --git a/src/ElectronNET.Host/api/ipc.js.map b/src/ElectronNET.Host/api/ipc.js.map index 4f55f751..b641b15d 100644 --- a/src/ElectronNET.Host/api/ipc.js.map +++ b/src/ElectronNET.Host/api/ipc.js.map @@ -1 +1 @@ -{"version":3,"file":"ipc.js","sourceRoot":"","sources":["ipc.ts"],"names":[],"mappings":";AAAA,uCAAqE;AAErE,IAAI,cAAc,CAAC;AAEnB,iBAAS,CAAC,MAAc,EAAE,EAAE;IACxB,cAAc,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,wBAAwB,EAAE,CAAC,OAAO,EAAE,EAAE;QAC5C,kBAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YAChC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,4BAA4B,EAAE,CAAC,OAAO,EAAE,EAAE;QAChD,kBAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YAChC,MAAM,CAAC,GAAQ,MAAM,CAAC;YACtB,CAAC,CAAC,kBAAkB,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;YACvC,MAAM,CAAC,E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EAAE,CAAC,gCAAgC,EAAE,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAU,EAAE,EAAE;QACjF,IAAI,CAAC;YACD,MAAM,OAAO,GAAI,MAAc,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;YAC1D,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC;YACvE,MAAM,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;YAC7D,IAAI,EAAE,IAAI,OAAQ,EAAU,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;gBAChD,MAAM,EAAE,GAAG,wBAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACzC,EAAU,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;YAChD,CAAC;QACL,CAAC;QAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/nativeTheme.js.map b/src/ElectronNET.Host/api/nativeTheme.js.map index b47cf7c4..0b57ff1f 100644 --- a/src/ElectronNET.Host/api/nativeTheme.js.map +++ b/src/ElectronNET.Host/api/nativeTheme.js.map @@ -1 +1 @@ -{"version":3,"file":"nativeTheme.js","sourceRoot":"","sources":["nativeTheme.ts"],"names":[],"mappings":";AACA,uCAAuC;AACvC,IAAI,cAAc,CAAC;AAEnB,iBAAS,CAAC,MAAc,EAAE,EAAE;IACxB,cAAc,GAAG,MAAM,CAAC;IAExB,MAAM,CAAC,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC9C,MAAM,mBAAmB,GAAG,sBAAW,CAAC,mBAAmB,CAAC;QAE5D,c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--git a/src/ElectronNET.Host/api/notification.js.map b/src/ElectronNET.Host/api/notification.js.map index 267b9b31..fc26d37c 100644 --- a/src/ElectronNET.Host/api/notification.js.map +++ b/src/ElectronNET.Host/api/notification.js.map @@ -1 +1 @@ -{"version":3,"file":"notification.js","sourceRoot":"","sources":["notification.ts"],"names":[],"mappings":";AACA,uCAAwC;AACxC,MAAM,aAAa,GAA4B,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAA4B,CAAC;AACpI,IAAI,cAAc,CAAC;AAEnB,iBAAS,CAAC,MAAc,EAAE,EAAE;IACxB,cAAc,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,OAAO,EAAE,EAAE;QACxC,MAAM,YAAY,GAAG,IAAI,uBAAY,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,SAAS,GAAG,KAAK,CAAC;QAEtB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACjB,SAAS,GAAG,IAAI,CAAC;YACjB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;gBACzB,cAAc,CAAC,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;YACjE,CAAC,CAAC,CAAC;QACP,CAAC;QAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YAClB,SAAS,GAAG,IAAI,CAAC;YACjB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBAC1B,cAAc,CAAC,IAAI,CAAC,wBAAwB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACnE,CAAC,CAAC,CAAC;QACP,CAAC;QAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YAClB,SAAS,GAAG,IAAI,CAAC;YACjB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBAC1B,cAAc,CAAC,IAAI,CAAC,wBAAwB,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IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YACnB,SAAS,GAAG,IAAI,CAAC;YACjB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBACvC,cAAc,CAAC,IAAI,CAAC,yBAAyB,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;YAC9E,CAAC,CAAC,CAAC;QACP,CAAC;QAED,IAAI,SAAS,EAAE,CAAC;YACZ,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACrC,CAAC;QAED,YAAY,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACtC,MAAM,WAAW,GAAG,uBAAY,CAAC,WAAW,EAAE,CAAC;QAC/C,cAAc,CAAC,IAAI,CAAC,kCAAkC,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/powerMonitor.js.map b/src/ElectronNET.Host/api/powerMonitor.js.map index f83530e0..01f7be39 100644 --- a/src/ElectronNET.Host/api/powerMonitor.js.map +++ b/src/ElectronNET.Host/api/powerMonitor.js.map @@ -1 +1 @@ -{"version":3,"file":"powerMonitor.js","sourceRoot":"","sources":["powerMonitor.ts"],"names":[],"mappings":";AACA,uCAAwC;AACxC,IAAI,cAAc,CAAC;AAEnB,iBAAS,CAAC,MAAc,EAAE,EAAE;IACxB,cAAc,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACtC,uBAAY,CAAC,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE;YAChC,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,EA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C,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QAC5C,uBAAY,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;YAC/B,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QAC7C,uBAAY,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE;YAC7B,cAAc,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/process.ts b/src/ElectronNET.Host/api/process.ts index e7a6b541..6d3afd0f 100644 --- a/src/ElectronNET.Host/api/process.ts +++ b/src/ElectronNET.Host/api/process.ts @@ -37,7 +37,7 @@ export = (socket: Socket) => { electronSocket.emit('process-isMainFrame-completed', false); return; } - electronSocket.emit('process-isMainFrame-completed', process.isMainFrame); + electronSocket.emit('process-isMainFrame-completed', process.isMainFrame); }); socket.on('process-resourcesPath', () => { diff --git a/src/ElectronNET.Host/api/screen.js.map b/src/ElectronNET.Host/api/screen.js.map index a395faf5..9fd43df0 100644 --- a/src/ElectronNET.Host/api/screen.js.map +++ b/src/ElectronNET.Host/api/screen.js.map @@ -1 +1 @@ -{"version":3,"file":"screen.js","sourceRoot":"","sources":["screen.ts"],"names":[],"mappings":";AACA,uCAAkC;AAClC,IAAI,cAAc,CAAC;AAEnB,iBAAS,CAAC,MAAc,EAAE,EAAE;IACxB,cAAc,GAAG,MAAM,CAAC;IAExB,MAAM,CAAC,EAAE,CAAC,+BAA+B,EAAE,CAAC,EAAE,EAAE,EAAE;QAC9C,iBAAM,CAAC,EAAE,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAC1C,cAAc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M,OAAO,GAAG,iBAAM,CAAC,cAAc,EAAE,CAAC;QACxC,cAAc,CAAC,IAAI,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,+BAA+B,EAAE,CAAC,KAAK,EAAE,EAAE;QACjD,MAAM,OAAO,GAAG,iBAAM,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACrD,cAAc,CAAC,IAAI,CAAC,yCAAyC,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,2BAA2B,EAAE,CAAC,SAAS,EAAE,EAAE;QACjD,MAAM,OAAO,GAAG,iBAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACrD,cAAc,CAAC,IAAI,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/screen.ts b/src/ElectronNET.Host/api/screen.ts index beac16a0..61289cf5 100644 --- a/src/ElectronNET.Host/api/screen.ts +++ b/src/ElectronNET.Host/api/screen.ts @@ -4,7 +4,7 @@ let electronSocket; export = (socket: Socket) => { electronSocket = socket; - + socket.on('register-screen-display-added', (id) => { screen.on('display-added', (event, display) => { electronSocket.emit('screen-display-added' + id, display); diff --git a/src/ElectronNET.Host/api/shell.ts b/src/ElectronNET.Host/api/shell.ts index 9a0dfd7f..eac4dc46 100644 --- a/src/ElectronNET.Host/api/shell.ts +++ b/src/ElectronNET.Host/api/shell.ts @@ -39,7 +39,7 @@ export = (socket: Socket) => { await shell.trashItem(fullPath); success = true; } catch (error) { - success = false; + success = false; } electronSocket.emit('shell-trashItem-completed', success); diff --git a/src/ElectronNET.Host/api/tray.js b/src/ElectronNET.Host/api/tray.js index 103acfbf..ae20b505 100644 --- a/src/ElectronNET.Host/api/tray.js +++ b/src/ElectronNET.Host/api/tray.js @@ -50,11 +50,7 @@ module.exports = (socket) => { const trayIcon = electron_1.nativeImage.createFromPath(image); tray.value = new electron_1.Tray(trayIcon); if (menuItems) { - const menu = electron_1.Menu.buildFromTemplate(menuItems); - addMenuItemClickConnector(menu.items, (id) => { - electronSocket.emit('trayMenuItemClicked', id); - }); - tray.value.setContextMenu(menu); + applyContextMenu(menuItems); } }); socket.on('tray-destroy', () => { @@ -62,6 +58,11 @@ module.exports = (socket) => { tray.value.destroy(); } }); + socket.on('set-contextMenu', (menuItems) => { + if (menuItems && tray.value) { + applyContextMenu(menuItems); + } + }); socket.on('tray-setImage', (image) => { if (tray.value) { tray.value.setImage(image); @@ -118,6 +119,13 @@ module.exports = (socket) => { }); } }); + function applyContextMenu(menuItems) { + const menu = electron_1.Menu.buildFromTemplate(menuItems); + addMenuItemClickConnector(menu.items, (id) => { + electronSocket.emit('trayMenuItemClicked', id); + }); + tray.value.setContextMenu(menu); + } function addMenuItemClickConnector(menuItems, callback) { menuItems.forEach((item) => { if (item.submenu && item.submenu.items.length > 0) { diff --git a/src/ElectronNET.Host/api/tray.js.map b/src/ElectronNET.Host/api/tray.js.map index 8d6584ba..3634cb9f 100644 --- a/src/ElectronNET.Host/api/tray.js.map +++ b/src/ElectronNET.Host/api/tray.js.map @@ -1 +1 @@ -{"version":3,"file":"tray.js","sourceRoot":"","sources":["tray.ts"],"names":[],"mappings":";AACA,uCAAmD;AACnD,IAAI,IAAI,GAA6B,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3F,IAAI,cAAc,CAAC;AAEnB,iBAAS,CAAC,MAAc,EAAE,EAAE;IACxB,cAAc,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC,EAAE,EAAE,EAAE;QACpC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,KAA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CAAC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,yBAAyB,CAAC,SAAS,EAAE,QAAQ;QAClD,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACvB,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChD,yBAAyB,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YAC5D,CAAC;YAED,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;gBAC1B,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/tray.ts b/src/ElectronNET.Host/api/tray.ts index 1481f9a6..9c101022 100644 --- a/src/ElectronNET.Host/api/tray.ts +++ b/src/ElectronNET.Host/api/tray.ts @@ -59,12 +59,7 @@ export = (socket: Socket) => { tray.value = new Tray(trayIcon); if (menuItems) { - const menu = Menu.buildFromTemplate(menuItems); - - addMenuItemClickConnector(menu.items, (id) => { - electronSocket.emit('trayMenuItemClicked', id); - }); - tray.value.setContextMenu(menu); + applyContextMenu(menuItems); } }); @@ -74,6 +69,12 @@ export = (socket: Socket) => { } }); + socket.on('set-contextMenu', (menuItems) => { + if (menuItems && tray.value) { + applyContextMenu(menuItems); + } + }); + socket.on('tray-setImage', (image) => { if (tray.value) { tray.value.setImage(image); @@ -136,6 +137,14 @@ export = (socket: Socket) => { } }); + function applyContextMenu(menuItems) { + const menu = Menu.buildFromTemplate(menuItems); + addMenuItemClickConnector(menu.items, (id) => { + electronSocket.emit('trayMenuItemClicked', id); + }); + tray.value.setContextMenu(menu); + } + function addMenuItemClickConnector(menuItems, callback) { menuItems.forEach((item) => { if (item.submenu && item.submenu.items.length > 0) { diff --git a/src/ElectronNET.Host/api/webContents.js b/src/ElectronNET.Host/api/webContents.js index 7b16a712..add58233 100644 --- a/src/ElectronNET.Host/api/webContents.js +++ b/src/ElectronNET.Host/api/webContents.js @@ -1,78 +1,84 @@ "use strict"; const electron_1 = require("electron"); const browserView_1 = require("./browserView"); -const fs = require('fs'); +const fs = require("fs"); let electronSocket; module.exports = (socket) => { electronSocket = socket; // The crashed event has been removed in Electron 29 - socket.on('register-webContents-crashed', (id) => { + socket.on("register-webContents-crashed", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('crashed'); + browserWindow.webContents.removeAllListeners("crashed"); // @ts-expect-error No overload matches this call - browserWindow.webContents.on('crashed', (event, killed) => { - electronSocket.emit('webContents-crashed' + id, killed); + browserWindow.webContents.on("crashed", (event, killed) => { + electronSocket.emit("webContents-crashed" + id, killed); }); }); - socket.on('register-webContents-didFinishLoad', (id) => { + socket.on("register-webContents-didFinishLoad", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-finish-load'); - browserWindow.webContents.on('did-finish-load', () => { - electronSocket.emit('webContents-didFinishLoad' + id); + browserWindow.webContents.removeAllListeners("did-finish-load"); + browserWindow.webContents.on("did-finish-load", () => { + electronSocket.emit("webContents-didFinishLoad" + id); }); }); - socket.on('register-webContents-didStartNavigation', (id) => { + socket.on("register-webContents-didStartNavigation", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-start-navigation'); - browserWindow.webContents.on('did-start-navigation', (_, url) => { - electronSocket.emit('webContents-didStartNavigation' + id, url); + browserWindow.webContents.removeAllListeners("did-start-navigation"); + browserWindow.webContents.on("did-start-navigation", (_, url) => { + electronSocket.emit("webContents-didStartNavigation" + id, url); }); }); - socket.on('register-webContents-didNavigate', (id) => { + socket.on("register-webContents-didNavigate", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-navigate'); - browserWindow.webContents.on('did-navigate', (_, url, httpResponseCode) => { - electronSocket.emit('webContents-didNavigate' + id, { url, httpResponseCode }); + browserWindow.webContents.removeAllListeners("did-navigate"); + browserWindow.webContents.on("did-navigate", (_, url, httpResponseCode) => { + electronSocket.emit("webContents-didNavigate" + id, { + url, + httpResponseCode, + }); }); }); - socket.on('register-webContents-willRedirect', (id) => { + socket.on("register-webContents-willRedirect", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('will-redirect'); - browserWindow.webContents.on('will-redirect', (_, url) => { - electronSocket.emit('webContents-willRedirect' + id, url); + browserWindow.webContents.removeAllListeners("will-redirect"); + browserWindow.webContents.on("will-redirect", (_, url) => { + electronSocket.emit("webContents-willRedirect" + id, url); }); }); - socket.on('register-webContents-didFailLoad', (id) => { + socket.on("register-webContents-didFailLoad", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-fail-load'); - browserWindow.webContents.on('did-fail-load', (_, errorCode, validatedUrl) => { - electronSocket.emit('webContents-didFailLoad' + id, { errorCode, validatedUrl }); + browserWindow.webContents.removeAllListeners("did-fail-load"); + browserWindow.webContents.on("did-fail-load", (_, errorCode, validatedUrl) => { + electronSocket.emit("webContents-didFailLoad" + id, { + errorCode, + validatedUrl, + }); }); }); - socket.on('register-webContents-didRedirectNavigation', (id) => { + socket.on("register-webContents-didRedirectNavigation", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-redirect-navigation'); - browserWindow.webContents.on('did-redirect-navigation', (_, url) => { - electronSocket.emit('webContents-didRedirectNavigation' + id, url); + browserWindow.webContents.removeAllListeners("did-redirect-navigation"); + browserWindow.webContents.on("did-redirect-navigation", (_, url) => { + electronSocket.emit("webContents-didRedirectNavigation" + id, url); }); }); - socket.on('register-webContents-input-event', (id) => { + socket.on("register-webContents-input-event", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('input-event'); - browserWindow.webContents.on('input-event', (_, eventArgs) => { - if (eventArgs.type !== 'char') { - electronSocket.emit('webContents-input-event' + id, eventArgs); + browserWindow.webContents.removeAllListeners("input-event"); + browserWindow.webContents.on("input-event", (_, eventArgs) => { + if (eventArgs.type !== "char") { + electronSocket.emit("webContents-input-event" + id, eventArgs); } }); }); - socket.on('register-webContents-domReady', (id) => { + socket.on("register-webContents-domReady", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('dom-ready'); - browserWindow.webContents.on('dom-ready', () => { - electronSocket.emit('webContents-domReady' + id); + browserWindow.webContents.removeAllListeners("dom-ready"); + browserWindow.webContents.on("dom-ready", () => { + electronSocket.emit("webContents-domReady" + id); }); }); - socket.on('webContentsOpenDevTools', (id, options) => { + socket.on("webContents-openDevTools", (id, options) => { if (options) { getWindowById(id).webContents.openDevTools(options); } @@ -80,38 +86,38 @@ module.exports = (socket) => { getWindowById(id).webContents.openDevTools(); } }); - socket.on('webContents-getPrinters', async (id) => { + socket.on("webContents-getPrinters", async (id) => { const printers = await getWindowById(id).webContents.getPrintersAsync(); - electronSocket.emit('webContents-getPrinters-completed', printers); + electronSocket.emit("webContents-getPrinters-completed", printers); }); - socket.on('webContents-print', async (id, options = {}) => { + socket.on("webContents-print", async (id, options = {}) => { await getWindowById(id).webContents.print(options); - electronSocket.emit('webContents-print-completed', true); + electronSocket.emit("webContents-print-completed", true); }); - socket.on('webContents-printToPDF', async (id, options = {}, path) => { + socket.on("webContents-printToPDF", async (id, options = {}, path) => { const buffer = await getWindowById(id).webContents.printToPDF(options); fs.writeFile(path, buffer, (error) => { if (error) { - electronSocket.emit('webContents-printToPDF-completed', false); + electronSocket.emit("webContents-printToPDF-completed", false); } else { - electronSocket.emit('webContents-printToPDF-completed', true); + electronSocket.emit("webContents-printToPDF-completed", true); } }); }); - socket.on('webContents-executeJavaScript', async (id, code, userGesture = false) => { + socket.on("webContents-executeJavaScript", async (id, code, userGesture = false) => { const result = await getWindowById(id).webContents.executeJavaScript(code, userGesture); - electronSocket.emit('webContents-executeJavaScript-completed', result); + electronSocket.emit("webContents-executeJavaScript-completed", result); }); - socket.on('webContents-getUrl', function (id) { + socket.on("webContents-getUrl", function (id) { const browserWindow = getWindowById(id); - electronSocket.emit('webContents-getUrl' + id, browserWindow.webContents.getURL()); + electronSocket.emit("webContents-getUrl" + id, browserWindow.webContents.getURL()); }); - socket.on('webContents-session-allowNTLMCredentialsForDomains', (id, domains) => { + socket.on("webContents-session-allowNTLMCredentialsForDomains", (id, domains) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.allowNTLMCredentialsForDomains(domains); }); - socket.on('webContents-session-clearAuthCache', async (...args) => { + socket.on("webContents-session-clearAuthCache", async (...args) => { // Overload support: (id, guid) OR (id, options, guid) const browserWindow = getWindowById(args[0]); let guid; @@ -124,6 +130,7 @@ module.exports = (socket) => { const options = args[1]; guid = args[2]; try { + // @ts-ignore await browserWindow.webContents.session.clearAuthCache(options); } catch { @@ -134,87 +141,87 @@ module.exports = (socket) => { else { return; // invalid invocation } - electronSocket.emit('webContents-session-clearAuthCache-completed' + guid); + electronSocket.emit("webContents-session-clearAuthCache-completed" + guid); }); - socket.on('webContents-session-clearCache', async (id, guid) => { + socket.on("webContents-session-clearCache", async (id, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.clearCache(); - electronSocket.emit('webContents-session-clearCache-completed' + guid); + electronSocket.emit("webContents-session-clearCache-completed" + guid); }); - socket.on('webContents-session-clearHostResolverCache', async (id, guid) => { + socket.on("webContents-session-clearHostResolverCache", async (id, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.clearHostResolverCache(); - electronSocket.emit('webContents-session-clearHostResolverCache-completed' + guid); + electronSocket.emit("webContents-session-clearHostResolverCache-completed" + guid); }); - socket.on('webContents-session-clearStorageData', async (id, guid) => { + socket.on("webContents-session-clearStorageData", async (id, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.clearStorageData({}); - electronSocket.emit('webContents-session-clearStorageData-completed' + guid); + electronSocket.emit("webContents-session-clearStorageData-completed" + guid); }); - socket.on('webContents-session-clearStorageData-options', async (id, options, guid) => { + socket.on("webContents-session-clearStorageData-options", async (id, options, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.clearStorageData(options); - electronSocket.emit('webContents-session-clearStorageData-options-completed' + guid); + electronSocket.emit("webContents-session-clearStorageData-options-completed" + guid); }); - socket.on('webContents-session-createInterruptedDownload', (id, options) => { + socket.on("webContents-session-createInterruptedDownload", (id, options) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.createInterruptedDownload(options); }); - socket.on('webContents-session-disableNetworkEmulation', (id) => { + socket.on("webContents-session-disableNetworkEmulation", (id) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.disableNetworkEmulation(); }); - socket.on('webContents-session-enableNetworkEmulation', (id, options) => { + socket.on("webContents-session-enableNetworkEmulation", (id, options) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.enableNetworkEmulation(options); }); - socket.on('webContents-session-flushStorageData', (id) => { + socket.on("webContents-session-flushStorageData", (id) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.flushStorageData(); }); - socket.on('webContents-session-getBlobData', async (id, identifier, guid) => { + socket.on("webContents-session-getBlobData", async (id, identifier, guid) => { const browserWindow = getWindowById(id); const buffer = await browserWindow.webContents.session.getBlobData(identifier); - electronSocket.emit('webContents-session-getBlobData-completed' + guid, buffer.buffer); + electronSocket.emit("webContents-session-getBlobData-completed" + guid, buffer.buffer); }); - socket.on('webContents-session-getCacheSize', async (id, guid) => { + socket.on("webContents-session-getCacheSize", async (id, guid) => { const browserWindow = getWindowById(id); const size = await browserWindow.webContents.session.getCacheSize(); - electronSocket.emit('webContents-session-getCacheSize-completed' + guid, size); + electronSocket.emit("webContents-session-getCacheSize-completed" + guid, size); }); - socket.on('webContents-session-getPreloads', (id, guid) => { + socket.on("webContents-session-getPreloads", (id, guid) => { const browserWindow = getWindowById(id); const preloads = browserWindow.webContents.session.getPreloads(); - electronSocket.emit('webContents-session-getPreloads-completed' + guid, preloads); + electronSocket.emit("webContents-session-getPreloads-completed" + guid, preloads); }); - socket.on('webContents-session-getUserAgent', (id, guid) => { + socket.on("webContents-session-getUserAgent", (id, guid) => { const browserWindow = getWindowById(id); const userAgent = browserWindow.webContents.session.getUserAgent(); - electronSocket.emit('webContents-session-getUserAgent-completed' + guid, userAgent); + electronSocket.emit("webContents-session-getUserAgent-completed" + guid, userAgent); }); - socket.on('webContents-session-resolveProxy', async (id, url, guid) => { + socket.on("webContents-session-resolveProxy", async (id, url, guid) => { const browserWindow = getWindowById(id); const proxy = await browserWindow.webContents.session.resolveProxy(url); - electronSocket.emit('webContents-session-resolveProxy-completed' + guid, proxy); + electronSocket.emit("webContents-session-resolveProxy-completed" + guid, proxy); }); - socket.on('webContents-session-setDownloadPath', (id, path) => { + socket.on("webContents-session-setDownloadPath", (id, path) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.setDownloadPath(path); }); - socket.on('webContents-session-setPreloads', (id, preloads) => { + socket.on("webContents-session-setPreloads", (id, preloads) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.setPreloads(preloads); }); - socket.on('webContents-session-setProxy', async (id, configuration, guid) => { + socket.on("webContents-session-setProxy", async (id, configuration, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.setProxy(configuration); - electronSocket.emit('webContents-session-setProxy-completed' + guid); + electronSocket.emit("webContents-session-setProxy-completed" + guid); }); - socket.on('webContents-session-setUserAgent', (id, userAgent, acceptLanguages) => { + socket.on("webContents-session-setUserAgent", (id, userAgent, acceptLanguages) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.setUserAgent(userAgent, acceptLanguages); }); - socket.on('register-webContents-session-webRequest-onBeforeRequest', (id, filter) => { + socket.on("register-webContents-session-webRequest-onBeforeRequest", (id, filter) => { const browserWindow = getWindowById(id); const session = browserWindow.webContents.session; session.webRequest.onBeforeRequest(filter, (details, callback) => { @@ -225,83 +232,143 @@ module.exports = (socket) => { }); }); }); - socket.on('register-webContents-session-cookies-changed', (id) => { + socket.on("register-webContents-session-cookies-changed", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.session.cookies.removeAllListeners('changed'); - browserWindow.webContents.session.cookies.on('changed', (event, cookie, cause, removed) => { - electronSocket.emit('webContents-session-cookies-changed' + id, [cookie, cause, removed]); + browserWindow.webContents.session.cookies.removeAllListeners("changed"); + browserWindow.webContents.session.cookies.on("changed", (event, cookie, cause, removed) => { + electronSocket.emit("webContents-session-cookies-changed" + id, [ + cookie, + cause, + removed, + ]); }); }); - socket.on('webContents-session-cookies-get', async (id, filter, guid) => { + socket.on("webContents-session-cookies-get", async (id, filter, guid) => { const browserWindow = getWindowById(id); const cookies = await browserWindow.webContents.session.cookies.get(filter); - electronSocket.emit('webContents-session-cookies-get-completed' + guid, cookies); + electronSocket.emit("webContents-session-cookies-get-completed" + guid, cookies); }); - socket.on('webContents-session-cookies-set', async (id, details, guid) => { + socket.on("webContents-session-cookies-set", async (id, details, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.cookies.set(details); - electronSocket.emit('webContents-session-cookies-set-completed' + guid); + electronSocket.emit("webContents-session-cookies-set-completed" + guid); }); - socket.on('webContents-session-cookies-remove', async (id, url, name, guid) => { + socket.on("webContents-session-cookies-remove", async (id, url, name, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.cookies.remove(url, name); - electronSocket.emit('webContents-session-cookies-remove-completed' + guid); + electronSocket.emit("webContents-session-cookies-remove-completed" + guid); }); - socket.on('webContents-session-cookies-flushStore', async (id, guid) => { + socket.on("webContents-session-cookies-flushStore", async (id, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.cookies.flushStore(); - electronSocket.emit('webContents-session-cookies-flushStore-completed' + guid); + electronSocket.emit("webContents-session-cookies-flushStore-completed" + guid); }); - socket.on('webContents-loadURL', (id, url, options) => { + socket.on("webContents-loadURL", (id, url, options) => { const browserWindow = getWindowById(id); browserWindow.webContents .loadURL(url, options) .then(() => { - electronSocket.emit('webContents-loadURL-complete' + id); + electronSocket.emit("webContents-loadURL-complete" + id); }) .catch((error) => { console.error(error); - electronSocket.emit('webContents-loadURL-error' + id, error); + electronSocket.emit("webContents-loadURL-error" + id, error); }); }); - socket.on('webContents-insertCSS', (id, isBrowserWindow, path) => { + socket.on("webContents-insertCSS", (id, isBrowserWindow, path) => { if (isBrowserWindow) { const browserWindow = getWindowById(id); if (browserWindow) { - browserWindow.webContents.insertCSS(fs.readFileSync(path, 'utf8')); + browserWindow.webContents.insertCSS(fs.readFileSync(path, "utf8")); } } else { - const browserViews = (global['browserViews'] = global['browserViews'] || []); + const browserViews = (global["browserViews"] = + global["browserViews"] || []); let view = null; for (let i = 0; i < browserViews.length; i++) { - if (browserViews[i]['id'] + 1000 === id) { + if (browserViews[i]["id"] + 1000 === id) { view = browserViews[i]; break; } } if (view) { - view.webContents.insertCSS(fs.readFileSync(path, 'utf8')); + view.webContents.insertCSS(fs.readFileSync(path, "utf8")); } } }); - socket.on('webContents-session-getAllExtensions', (id) => { + socket.on("webContents-session-getAllExtensions", (id) => { const browserWindow = getWindowById(id); const extensionsList = browserWindow.webContents.session.getAllExtensions(); const chromeExtensionInfo = []; Object.keys(extensionsList).forEach((key) => { chromeExtensionInfo.push(extensionsList[key]); }); - electronSocket.emit('webContents-session-getAllExtensions-completed', chromeExtensionInfo); + electronSocket.emit("webContents-session-getAllExtensions-completed", chromeExtensionInfo); }); - socket.on('webContents-session-removeExtension', (id, name) => { + socket.on("webContents-session-removeExtension", (id, name) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.removeExtension(name); }); - socket.on('webContents-session-loadExtension', async (id, path, allowFileAccess = false) => { + socket.on("webContents-session-loadExtension", async (id, path, allowFileAccess = false) => { const browserWindow = getWindowById(id); const extension = await browserWindow.webContents.session.loadExtension(path, { allowFileAccess: allowFileAccess }); - electronSocket.emit('webContents-session-loadExtension-completed', extension); + electronSocket.emit("webContents-session-loadExtension-completed", extension); + }); + socket.on('webContents-getZoomFactor', (id) => { + const browserWindow = getWindowById(id); + const text = browserWindow.webContents.getZoomFactor(); + electronSocket.emit('webContents-getZoomFactor-completed', text); + }); + socket.on('webContents-setZoomFactor', (id, factor) => { + const browserWindow = getWindowById(id); + browserWindow.webContents.setZoomFactor(factor); + }); + socket.on('webContents-getZoomLevel', (id) => { + const browserWindow = getWindowById(id); + const content = browserWindow.webContents.getZoomLevel(); + electronSocket.emit('webContents-getZoomLevel-completed', content); + }); + socket.on('webContents-setZoomLevel', (id, level) => { + const browserWindow = getWindowById(id); + browserWindow.webContents.setZoomLevel(level); + }); + socket.on('webContents-setVisualZoomLevelLimits', async (id, minimumLevel, maximumLevel) => { + const browserWindow = getWindowById(id); + await browserWindow.webContents.setVisualZoomLevelLimits(minimumLevel, maximumLevel); + electronSocket.emit('webContents-setVisualZoomLevelLimits-completed'); + }); + socket.on("webContents-toggleDevTools", (id) => { + getWindowById(id).webContents.toggleDevTools(); + }); + socket.on("webContents-closeDevTools", (id) => { + getWindowById(id).webContents.closeDevTools(); + }); + socket.on("webContents-isDevToolsOpened", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-isDevToolsOpened-completed', browserWindow.webContents.isDevToolsOpened()); + }); + socket.on("webContents-isDevToolsFocused", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-isDevToolsFocused-completed', browserWindow.webContents.isDevToolsFocused()); + }); + socket.on("webContents-setAudioMuted", (id, muted) => { + getWindowById(id).webContents.setAudioMuted(muted); + }); + socket.on("webContents-isAudioMuted", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-isAudioMuted-completed', browserWindow.webContents.isAudioMuted()); + }); + socket.on("webContents-isCurrentlyAudible", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-isCurrentlyAudible-completed', browserWindow.webContents.isCurrentlyAudible()); + }); + socket.on("webContents-getUserAgent", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-getUserAgent-completed', browserWindow.webContents.getUserAgent()); + }); + socket.on("webContents-setUserAgent", (id, userAgent) => { + getWindowById(id).webContents.setUserAgent(userAgent); }); function getWindowById(id) { if (id >= 1000) { diff --git a/src/ElectronNET.Host/api/webContents.js.map b/src/ElectronNET.Host/api/webContents.js.map index 72f434f6..f914af82 100644 --- a/src/ElectronNET.Host/api/webContents.js.map +++ b/src/ElectronNET.Host/api/webContents.js.map @@ -1 +1 @@ -{"version":3,"file":"webContents.js","sourceRoot":"","sources":["webContents.ts"],"names":[],"mappings":";AACA,uCAAsD;AACtD,+CAA0D;AAC1D,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,IAAI,cAAc,CAAC;AAEnB,iBAAS,CAAC,MAAc,EAAE,EAAE;IAC1B,cAAc,GAAG,MAAM,CAAC;IAExB,oDAAoD;IACpD,MAAM,CAAC,EAAE,CAAC,8BAA8B,EAAE,CAAC,EAAE,EAAE,EAAE;QAC/C,MAAM,aAAa,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;QAExC,aAAa,CAAC,WAAW,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACxD,iDAAiD;QACjD,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACxD,cAAc,CAAC,IAAI,CAAC,qBAAqB,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,oCAAoC,EAAE,CAAC,EAAE,EAAE,EAAE;QACrD,MAAM,aAAa,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;QAExC,aAAa,CAAC,WAAW,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;QAChE,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE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AC,WAAW,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACpH,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,0BAA0B,EAAE,UAAU,EAAE;QAC9C,MAAM,aAAa,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;QACxC,cAAc,CAAC,IAAI,CAAC,oCAAoC,EAAE,aAAa,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC;IACxG,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,0BAA0B,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE;QACpD,aAAa,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,SAAS,aAAa,CACtB,EAAU;QAEV,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;YACf,OAAO,IAAA,uCAAyB,EAAC,EAAE,GAAG,IAAI,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,wBAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/src/ElectronNET.Host/api/webContents.ts b/src/ElectronNET.Host/api/webContents.ts index e9eadb06..fe54a521 100644 --- a/src/ElectronNET.Host/api/webContents.ts +++ b/src/ElectronNET.Host/api/webContents.ts @@ -1,98 +1,107 @@ -import { Socket } from 'net'; -import { BrowserWindow, BrowserView } from 'electron'; -import { browserViewMediateService } from './browserView'; -const fs = require('fs'); +import { Socket } from "net"; +import {BrowserWindow, BrowserView} from "electron"; +import { browserViewMediateService } from "./browserView"; +const fs = require("fs"); let electronSocket; export = (socket: Socket) => { electronSocket = socket; // The crashed event has been removed in Electron 29 - socket.on('register-webContents-crashed', (id) => { + socket.on("register-webContents-crashed", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('crashed'); + browserWindow.webContents.removeAllListeners("crashed"); // @ts-expect-error No overload matches this call - browserWindow.webContents.on('crashed', (event, killed) => { - electronSocket.emit('webContents-crashed' + id, killed); + browserWindow.webContents.on("crashed", (event, killed) => { + electronSocket.emit("webContents-crashed" + id, killed); }); }); - socket.on('register-webContents-didFinishLoad', (id) => { + socket.on("register-webContents-didFinishLoad", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-finish-load'); - browserWindow.webContents.on('did-finish-load', () => { - electronSocket.emit('webContents-didFinishLoad' + id); + browserWindow.webContents.removeAllListeners("did-finish-load"); + browserWindow.webContents.on("did-finish-load", () => { + electronSocket.emit("webContents-didFinishLoad" + id); }); }); - socket.on('register-webContents-didStartNavigation', (id) => { + socket.on("register-webContents-didStartNavigation", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-start-navigation'); - browserWindow.webContents.on('did-start-navigation', (_, url) => { - electronSocket.emit('webContents-didStartNavigation' + id, url); + browserWindow.webContents.removeAllListeners("did-start-navigation"); + browserWindow.webContents.on("did-start-navigation", (_, url) => { + electronSocket.emit("webContents-didStartNavigation" + id, url); }); }); - socket.on('register-webContents-didNavigate', (id) => { + socket.on("register-webContents-didNavigate", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-navigate'); - browserWindow.webContents.on('did-navigate', (_, url, httpResponseCode) => { - electronSocket.emit('webContents-didNavigate' + id, {url, httpResponseCode}); + browserWindow.webContents.removeAllListeners("did-navigate"); + browserWindow.webContents.on("did-navigate", (_, url, httpResponseCode) => { + electronSocket.emit("webContents-didNavigate" + id, { + url, + httpResponseCode, + }); }); }); - socket.on('register-webContents-willRedirect', (id) => { + socket.on("register-webContents-willRedirect", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('will-redirect'); - browserWindow.webContents.on('will-redirect', (_, url) => { - electronSocket.emit('webContents-willRedirect' + id, url); + browserWindow.webContents.removeAllListeners("will-redirect"); + browserWindow.webContents.on("will-redirect", (_, url) => { + electronSocket.emit("webContents-willRedirect" + id, url); }); }); - socket.on('register-webContents-didFailLoad', (id) => { + socket.on("register-webContents-didFailLoad", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-fail-load'); - browserWindow.webContents.on('did-fail-load', (_, errorCode, validatedUrl) => { - electronSocket.emit('webContents-didFailLoad' + id, {errorCode, validatedUrl}); - }); + browserWindow.webContents.removeAllListeners("did-fail-load"); + browserWindow.webContents.on( + "did-fail-load", + (_, errorCode, validatedUrl) => { + electronSocket.emit("webContents-didFailLoad" + id, { + errorCode, + validatedUrl, + }); + } + ); }); - socket.on('register-webContents-didRedirectNavigation', (id) => { + socket.on("register-webContents-didRedirectNavigation", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('did-redirect-navigation'); - browserWindow.webContents.on('did-redirect-navigation', (_, url) => { - electronSocket.emit('webContents-didRedirectNavigation' + id, url); + browserWindow.webContents.removeAllListeners("did-redirect-navigation"); + browserWindow.webContents.on("did-redirect-navigation", (_, url) => { + electronSocket.emit("webContents-didRedirectNavigation" + id, url); }); }); - socket.on('register-webContents-input-event', (id) => { + socket.on("register-webContents-input-event", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('input-event'); - browserWindow.webContents.on('input-event', (_, eventArgs) => { - if (eventArgs.type !== 'char') { - electronSocket.emit('webContents-input-event' + id, eventArgs); + browserWindow.webContents.removeAllListeners("input-event"); + browserWindow.webContents.on("input-event", (_, eventArgs) => { + if (eventArgs.type !== "char") { + electronSocket.emit("webContents-input-event" + id, eventArgs); } }); }); - socket.on('register-webContents-domReady', (id) => { + socket.on("register-webContents-domReady", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.removeAllListeners('dom-ready'); - browserWindow.webContents.on('dom-ready', () => { - electronSocket.emit('webContents-domReady' + id); + browserWindow.webContents.removeAllListeners("dom-ready"); + browserWindow.webContents.on("dom-ready", () => { + electronSocket.emit("webContents-domReady" + id); }); }); - socket.on('webContentsOpenDevTools', (id, options) => { + socket.on("webContents-openDevTools", (id, options) => { if (options) { getWindowById(id).webContents.openDevTools(options); } else { @@ -100,55 +109,68 @@ export = (socket: Socket) => { } }); - socket.on('webContents-getPrinters', async (id) => { + socket.on("webContents-getPrinters", async (id) => { const printers = await getWindowById(id).webContents.getPrintersAsync(); - electronSocket.emit('webContents-getPrinters-completed', printers); + electronSocket.emit("webContents-getPrinters-completed", printers); }); - socket.on('webContents-print', async (id, options = {}) => { + socket.on("webContents-print", async (id, options = {}) => { await getWindowById(id).webContents.print(options); - electronSocket.emit('webContents-print-completed', true); + electronSocket.emit("webContents-print-completed", true); }); - socket.on('webContents-printToPDF', async (id, options = {}, path) => { + socket.on("webContents-printToPDF", async (id, options = {}, path) => { const buffer = await getWindowById(id).webContents.printToPDF(options); fs.writeFile(path, buffer, (error) => { if (error) { - electronSocket.emit('webContents-printToPDF-completed', false); + electronSocket.emit("webContents-printToPDF-completed", false); } else { - electronSocket.emit('webContents-printToPDF-completed', true); + electronSocket.emit("webContents-printToPDF-completed", true); } }); }); - socket.on('webContents-executeJavaScript', async (id, code, userGesture = false) => { - const result = await getWindowById(id).webContents.executeJavaScript(code, userGesture); - electronSocket.emit('webContents-executeJavaScript-completed', result); - }); + socket.on( + "webContents-executeJavaScript", + async (id, code, userGesture = false) => { + const result = await getWindowById(id).webContents.executeJavaScript( + code, + userGesture + ); + electronSocket.emit("webContents-executeJavaScript-completed", result); + } + ); - socket.on('webContents-getUrl', function (id) { + socket.on("webContents-getUrl", function (id) { const browserWindow = getWindowById(id); - electronSocket.emit('webContents-getUrl' + id, browserWindow.webContents.getURL()); + electronSocket.emit( + "webContents-getUrl" + id, + browserWindow.webContents.getURL() + ); }); - socket.on('webContents-session-allowNTLMCredentialsForDomains', (id, domains) => { - const browserWindow = getWindowById(id); - browserWindow.webContents.session.allowNTLMCredentialsForDomains(domains); - }); + socket.on( + "webContents-session-allowNTLMCredentialsForDomains", + (id, domains) => { + const browserWindow = getWindowById(id); + browserWindow.webContents.session.allowNTLMCredentialsForDomains(domains); + } + ); - socket.on('webContents-session-clearAuthCache', async (...args) => { + socket.on("webContents-session-clearAuthCache", async (...args) => { // Overload support: (id, guid) OR (id, options, guid) const browserWindow = getWindowById(args[0]); let guid: string; - if (args.length ===2) { + if (args.length === 2) { // No options guid = args[1]; await browserWindow.webContents.session.clearAuthCache(); - } else if (args.length ===3) { + } else if (args.length === 3) { const options = args[1]; guid = args[2]; try { + // @ts-ignore await browserWindow.webContents.session.clearAuthCache(options); } catch { // Fallback to clearing without options if Electron version rejects custom options @@ -157,199 +179,258 @@ export = (socket: Socket) => { } else { return; // invalid invocation } - electronSocket.emit('webContents-session-clearAuthCache-completed' + guid); + electronSocket.emit("webContents-session-clearAuthCache-completed" + guid); }); - socket.on('webContents-session-clearCache', async (id, guid) => { + socket.on("webContents-session-clearCache", async (id, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.clearCache(); - electronSocket.emit('webContents-session-clearCache-completed' + guid); + electronSocket.emit("webContents-session-clearCache-completed" + guid); }); - socket.on('webContents-session-clearHostResolverCache', async (id, guid) => { + socket.on("webContents-session-clearHostResolverCache", async (id, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.clearHostResolverCache(); - electronSocket.emit('webContents-session-clearHostResolverCache-completed' + guid); + electronSocket.emit( + "webContents-session-clearHostResolverCache-completed" + guid + ); }); - socket.on('webContents-session-clearStorageData', async (id, guid) => { + socket.on("webContents-session-clearStorageData", async (id, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.clearStorageData({}); - electronSocket.emit('webContents-session-clearStorageData-completed' + guid); + electronSocket.emit( + "webContents-session-clearStorageData-completed" + guid + ); }); - socket.on('webContents-session-clearStorageData-options', async (id, options, guid) => { - const browserWindow = getWindowById(id); - await browserWindow.webContents.session.clearStorageData(options); + socket.on( + "webContents-session-clearStorageData-options", + async (id, options, guid) => { + const browserWindow = getWindowById(id); + await browserWindow.webContents.session.clearStorageData(options); - electronSocket.emit('webContents-session-clearStorageData-options-completed' + guid); - }); + electronSocket.emit( + "webContents-session-clearStorageData-options-completed" + guid + ); + } + ); - socket.on('webContents-session-createInterruptedDownload', (id, options) => { + socket.on("webContents-session-createInterruptedDownload", (id, options) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.createInterruptedDownload(options); }); - socket.on('webContents-session-disableNetworkEmulation', (id) => { + socket.on("webContents-session-disableNetworkEmulation", (id) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.disableNetworkEmulation(); }); - socket.on('webContents-session-enableNetworkEmulation', (id, options) => { + socket.on("webContents-session-enableNetworkEmulation", (id, options) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.enableNetworkEmulation(options); }); - socket.on('webContents-session-flushStorageData', (id) => { + socket.on("webContents-session-flushStorageData", (id) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.flushStorageData(); }); - socket.on('webContents-session-getBlobData', async (id, identifier, guid) => { + socket.on("webContents-session-getBlobData", async (id, identifier, guid) => { const browserWindow = getWindowById(id); - const buffer = await browserWindow.webContents.session.getBlobData(identifier); + const buffer = await browserWindow.webContents.session.getBlobData( + identifier + ); - electronSocket.emit('webContents-session-getBlobData-completed' + guid, buffer.buffer); + electronSocket.emit( + "webContents-session-getBlobData-completed" + guid, + buffer.buffer + ); }); - socket.on('webContents-session-getCacheSize', async (id, guid) => { + socket.on("webContents-session-getCacheSize", async (id, guid) => { const browserWindow = getWindowById(id); const size = await browserWindow.webContents.session.getCacheSize(); - electronSocket.emit('webContents-session-getCacheSize-completed' + guid, size); + electronSocket.emit( + "webContents-session-getCacheSize-completed" + guid, + size + ); }); - socket.on('webContents-session-getPreloads', (id, guid) => { + socket.on("webContents-session-getPreloads", (id, guid) => { const browserWindow = getWindowById(id); const preloads = browserWindow.webContents.session.getPreloads(); - electronSocket.emit('webContents-session-getPreloads-completed' + guid, preloads); + electronSocket.emit( + "webContents-session-getPreloads-completed" + guid, + preloads + ); }); - socket.on('webContents-session-getUserAgent', (id, guid) => { + socket.on("webContents-session-getUserAgent", (id, guid) => { const browserWindow = getWindowById(id); const userAgent = browserWindow.webContents.session.getUserAgent(); - electronSocket.emit('webContents-session-getUserAgent-completed' + guid, userAgent); + electronSocket.emit( + "webContents-session-getUserAgent-completed" + guid, + userAgent + ); }); - socket.on('webContents-session-resolveProxy', async (id, url, guid) => { + socket.on("webContents-session-resolveProxy", async (id, url, guid) => { const browserWindow = getWindowById(id); const proxy = await browserWindow.webContents.session.resolveProxy(url); - electronSocket.emit('webContents-session-resolveProxy-completed' + guid, proxy); + electronSocket.emit( + "webContents-session-resolveProxy-completed" + guid, + proxy + ); }); - socket.on('webContents-session-setDownloadPath', (id, path) => { + socket.on("webContents-session-setDownloadPath", (id, path) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.setDownloadPath(path); }); - socket.on('webContents-session-setPreloads', (id, preloads) => { + socket.on("webContents-session-setPreloads", (id, preloads) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.setPreloads(preloads); }); - socket.on('webContents-session-setProxy', async (id, configuration, guid) => { + socket.on("webContents-session-setProxy", async (id, configuration, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.setProxy(configuration); - electronSocket.emit('webContents-session-setProxy-completed' + guid); + electronSocket.emit("webContents-session-setProxy-completed" + guid); }); - socket.on('webContents-session-setUserAgent', (id, userAgent, acceptLanguages) => { - const browserWindow = getWindowById(id); - browserWindow.webContents.session.setUserAgent(userAgent, acceptLanguages); - }); + socket.on( + "webContents-session-setUserAgent", + (id, userAgent, acceptLanguages) => { + const browserWindow = getWindowById(id); + browserWindow.webContents.session.setUserAgent( + userAgent, + acceptLanguages + ); + } + ); - socket.on('register-webContents-session-webRequest-onBeforeRequest', (id, filter) => { + socket.on( + "register-webContents-session-webRequest-onBeforeRequest", + (id, filter) => { const browserWindow = getWindowById(id); const session = browserWindow.webContents.session; session.webRequest.onBeforeRequest(filter, (details, callback) => { - socket.emit(`webContents-session-webRequest-onBeforeRequest${id}`, details); - // Listen for a response from C# to continue the request - electronSocket.once(`webContents-session-webRequest-onBeforeRequest-response${id}`, (response) => { - callback(response); - }); + socket.emit( + `webContents-session-webRequest-onBeforeRequest${id}`, + details + ); + // Listen for a response from C# to continue the request + electronSocket.once( + `webContents-session-webRequest-onBeforeRequest-response${id}`, + (response) => { + callback(response); + } + ); }); - }); + } + ); - socket.on('register-webContents-session-cookies-changed', (id) => { + socket.on("register-webContents-session-cookies-changed", (id) => { const browserWindow = getWindowById(id); - browserWindow.webContents.session.cookies.removeAllListeners('changed'); - browserWindow.webContents.session.cookies.on('changed', (event, cookie, cause, removed) => { - electronSocket.emit('webContents-session-cookies-changed' + id, [cookie, cause, removed]); - }); + browserWindow.webContents.session.cookies.removeAllListeners("changed"); + browserWindow.webContents.session.cookies.on( + "changed", + (event, cookie, cause, removed) => { + electronSocket.emit("webContents-session-cookies-changed" + id, [ + cookie, + cause, + removed, + ]); + } + ); }); - socket.on('webContents-session-cookies-get', async (id, filter, guid) => { + socket.on("webContents-session-cookies-get", async (id, filter, guid) => { const browserWindow = getWindowById(id); const cookies = await browserWindow.webContents.session.cookies.get(filter); - electronSocket.emit('webContents-session-cookies-get-completed' + guid, cookies); + electronSocket.emit( + "webContents-session-cookies-get-completed" + guid, + cookies + ); }); - socket.on('webContents-session-cookies-set', async (id, details, guid) => { + socket.on("webContents-session-cookies-set", async (id, details, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.cookies.set(details); - electronSocket.emit('webContents-session-cookies-set-completed' + guid); + electronSocket.emit("webContents-session-cookies-set-completed" + guid); }); - socket.on('webContents-session-cookies-remove', async (id, url, name, guid) => { - const browserWindow = getWindowById(id); - await browserWindow.webContents.session.cookies.remove(url, name); + socket.on( + "webContents-session-cookies-remove", + async (id, url, name, guid) => { + const browserWindow = getWindowById(id); + await browserWindow.webContents.session.cookies.remove(url, name); - electronSocket.emit('webContents-session-cookies-remove-completed' + guid); - }); + electronSocket.emit( + "webContents-session-cookies-remove-completed" + guid + ); + } + ); - socket.on('webContents-session-cookies-flushStore', async (id, guid) => { + socket.on("webContents-session-cookies-flushStore", async (id, guid) => { const browserWindow = getWindowById(id); await browserWindow.webContents.session.cookies.flushStore(); - electronSocket.emit('webContents-session-cookies-flushStore-completed' + guid); + electronSocket.emit( + "webContents-session-cookies-flushStore-completed" + guid + ); }); - socket.on('webContents-loadURL', (id, url, options) => { + socket.on("webContents-loadURL", (id, url, options) => { const browserWindow = getWindowById(id); browserWindow.webContents .loadURL(url, options) .then(() => { - electronSocket.emit('webContents-loadURL-complete' + id); + electronSocket.emit("webContents-loadURL-complete" + id); }) .catch((error) => { console.error(error); - electronSocket.emit('webContents-loadURL-error' + id, error); + electronSocket.emit("webContents-loadURL-error" + id, error); }); }); - socket.on('webContents-insertCSS', (id, isBrowserWindow, path) => { + socket.on("webContents-insertCSS", (id, isBrowserWindow, path) => { if (isBrowserWindow) { const browserWindow = getWindowById(id); if (browserWindow) { - browserWindow.webContents.insertCSS(fs.readFileSync(path, 'utf8')); + browserWindow.webContents.insertCSS(fs.readFileSync(path, "utf8")); } } else { - const browserViews: BrowserView[] = (global['browserViews'] = global['browserViews'] || []) as BrowserView[]; + const browserViews: BrowserView[] = (global["browserViews"] = + global["browserViews"] || []) as BrowserView[]; let view: BrowserView = null; for (let i = 0; i < browserViews.length; i++) { - if (browserViews[i]['id'] + 1000 === id) { + if (browserViews[i]["id"] + 1000 === id) { view = browserViews[i]; break; } } if (view) { - view.webContents.insertCSS(fs.readFileSync(path, 'utf8')); + view.webContents.insertCSS(fs.readFileSync(path, "utf8")); } } }); - socket.on('webContents-session-getAllExtensions', (id) => { + socket.on("webContents-session-getAllExtensions", (id) => { const browserWindow = getWindowById(id); const extensionsList = browserWindow.webContents.session.getAllExtensions(); const chromeExtensionInfo = []; @@ -358,22 +439,105 @@ export = (socket: Socket) => { chromeExtensionInfo.push(extensionsList[key]); }); - electronSocket.emit('webContents-session-getAllExtensions-completed', chromeExtensionInfo); + electronSocket.emit( + "webContents-session-getAllExtensions-completed", + chromeExtensionInfo + ); }); - socket.on('webContents-session-removeExtension', (id, name) => { + socket.on("webContents-session-removeExtension", (id, name) => { const browserWindow = getWindowById(id); browserWindow.webContents.session.removeExtension(name); }); - socket.on('webContents-session-loadExtension', async (id, path, allowFileAccess = false) => { - const browserWindow = getWindowById(id); - const extension = await browserWindow.webContents.session.loadExtension(path, { allowFileAccess: allowFileAccess }); + socket.on( + "webContents-session-loadExtension", + async (id, path, allowFileAccess = false) => { + const browserWindow = getWindowById(id); + const extension = await browserWindow.webContents.session.loadExtension( + path, + { allowFileAccess: allowFileAccess } + ); + + electronSocket.emit( + "webContents-session-loadExtension-completed", + extension + ); + } + ); - electronSocket.emit('webContents-session-loadExtension-completed', extension); - }); + socket.on('webContents-getZoomFactor', (id) => { + const browserWindow = getWindowById(id); + const text = browserWindow.webContents.getZoomFactor(); + electronSocket.emit('webContents-getZoomFactor-completed', text); + }); + + socket.on('webContents-setZoomFactor', (id, factor) => { + const browserWindow = getWindowById(id); + browserWindow.webContents.setZoomFactor(factor); + }); + + socket.on('webContents-getZoomLevel', (id) => { + const browserWindow = getWindowById(id); + const content = browserWindow.webContents.getZoomLevel(); + electronSocket.emit('webContents-getZoomLevel-completed', content); + }); + + socket.on('webContents-setZoomLevel', (id, level) => { + const browserWindow = getWindowById(id); + browserWindow.webContents.setZoomLevel(level); + }); + + socket.on('webContents-setVisualZoomLevelLimits', async (id, minimumLevel, maximumLevel) => { + const browserWindow = getWindowById(id); + await browserWindow.webContents.setVisualZoomLevelLimits(minimumLevel, maximumLevel); + electronSocket.emit('webContents-setVisualZoomLevelLimits-completed'); + }); + + socket.on("webContents-toggleDevTools", (id) => { + getWindowById(id).webContents.toggleDevTools(); + }); + + socket.on("webContents-closeDevTools", (id) => { + getWindowById(id).webContents.closeDevTools(); + }); + + socket.on("webContents-isDevToolsOpened", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-isDevToolsOpened-completed', browserWindow.webContents.isDevToolsOpened()); + }); + + socket.on("webContents-isDevToolsFocused", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-isDevToolsFocused-completed', browserWindow.webContents.isDevToolsFocused()); + }); + + socket.on("webContents-setAudioMuted", (id, muted) => { + getWindowById(id).webContents.setAudioMuted(muted); + }); + + socket.on("webContents-isAudioMuted", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-isAudioMuted-completed', browserWindow.webContents.isAudioMuted()); + }); + + socket.on("webContents-isCurrentlyAudible", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-isCurrentlyAudible-completed', browserWindow.webContents.isCurrentlyAudible()); + }); + + socket.on("webContents-getUserAgent", function (id) { + const browserWindow = getWindowById(id); + electronSocket.emit('webContents-getUserAgent-completed', browserWindow.webContents.getUserAgent()); + }); + + socket.on("webContents-setUserAgent", (id, userAgent) => { + getWindowById(id).webContents.setUserAgent(userAgent); + }); - function getWindowById(id: number): Electron.BrowserWindow | Electron.BrowserView { + function getWindowById( + id: number + ): Electron.BrowserWindow | Electron.BrowserView { if (id >= 1000) { return browserViewMediateService(id - 1000); } diff --git a/src/ElectronNET.Host/eslint.config.js b/src/ElectronNET.Host/eslint.config.js new file mode 100644 index 00000000..c91642f0 --- /dev/null +++ b/src/ElectronNET.Host/eslint.config.js @@ -0,0 +1,7 @@ +module.exports = [ + { + rules: { + // Add rules here. + } + } +]; \ No newline at end of file diff --git a/src/ElectronNET.Host/globals.d.ts b/src/ElectronNET.Host/globals.d.ts new file mode 100644 index 00000000..1570d942 --- /dev/null +++ b/src/ElectronNET.Host/globals.d.ts @@ -0,0 +1,5 @@ +// Ambient declarations to silence implicit any / global index usage +// Minimal surface expand only if further errors appear. +declare var browserViews: any; +declare var tray: any; +declare var electronsocket: any; diff --git a/src/ElectronNET.Host/main.js b/src/ElectronNET.Host/main.js index 1cddaa5a..2562ca7b 100644 --- a/src/ElectronNET.Host/main.js +++ b/src/ElectronNET.Host/main.js @@ -5,14 +5,13 @@ const path = require('path'); const cProcess = require('child_process').spawn; const portscanner = require('portscanner'); const { imageSize } = require('image-size'); -const { HookService } = require('electron-host-hook'); let io, server, browserWindows, ipc, apiProcess, loadURL; let appApi, menu, dialogApi, notification, tray, webContents; let globalShortcut, shellApi, screen, clipboard, autoUpdater; let commandLine, browserView; let powerMonitor; let processInfo; -let splashScreen, hostHook; +let splashScreen; let nativeTheme; let dock; let launchFile; @@ -263,6 +262,7 @@ function startSocketApiBridge(port) { console.log('Electron Socket: starting...'); server = require('http').createServer(); const { Server } = require('socket.io'); + let hostHook; io = new Server({ pingTimeout: 60000, // in ms, default is 5000 pingInterval: 10000, // in ms, default is 25000 @@ -359,6 +359,8 @@ function startSocketApiBridge(port) { }); try { + const { HookService } = require('electron-host-hook'); + if (hostHook === undefined) { hostHook = new HookService(socket, app); hostHook.onHostReady(); @@ -366,6 +368,7 @@ function startSocketApiBridge(port) { } catch (error) { console.error(error.message); } + console.log('Electron Socket: startup complete.'); }); } @@ -373,7 +376,7 @@ function startSocketApiBridge(port) { function startAspCoreBackend(electronPort) { startBackend(); - function startBackend() { + function startBackend() { loadURL = `about:blank`; const envParam = getEnvironmentParameter(); const parameters = [ diff --git a/src/ElectronNET.Host/package-lock.json b/src/ElectronNET.Host/package-lock.json index 4a45d86d..db517ef0 100644 --- a/src/ElectronNET.Host/package-lock.json +++ b/src/ElectronNET.Host/package-lock.json @@ -19,7 +19,7 @@ "devDependencies": { "@types/node": "^22.18", "electron": "^30.0.3", - "eslint": "^9.37.0", + "eslint": "^9.39.1", "typescript": "^5.9.3" } }, @@ -39,6 +39,7 @@ "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz", "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^4.1.1", "env-paths": "^2.2.0", @@ -60,6 +61,7 @@ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -78,6 +80,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -86,21 +89,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/config-array": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", - "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.6", + "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", "minimatch": "^3.1.2" }, @@ -109,22 +114,24 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.0.tgz", - "integrity": "sha512-WUFvV4WoIwW8Bv0KeKCIIEgdSiFOsulyN0xrMu+7z43q/hkOLXjvb5u7UC9jDxvRzcrbEmuZBX5yJZz1741jog==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.16.0" + "@eslint/core": "^0.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", - "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.15" }, @@ -137,6 +144,7 @@ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -156,10 +164,11 @@ } }, "node_modules/@eslint/js": { - "version": "9.37.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.37.0.tgz", - "integrity": "sha512-jaS+NJ+hximswBG6pjNX0uEJZkrT0zwpVi3BA3vX22aFGjJjmgSTSmPpZCRKmoBL5VY/M6p0xsSJx7rk7sy5gg==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -168,21 +177,23 @@ } }, "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/plugin-kit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz", - "integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.16.0", + "@eslint/core": "^0.17.0", "levn": "^0.4.1" }, "engines": { @@ -194,6 +205,7 @@ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=18.18.0" } @@ -203,6 +215,7 @@ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.4.0" @@ -216,6 +229,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -229,6 +243,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=18.18" }, @@ -242,6 +257,7 @@ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -252,13 +268,15 @@ "node_modules/@socket.io/component-emitter": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", - "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==" + "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", + "license": "MIT" }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dev": true, + "license": "MIT", "dependencies": { "defer-to-connect": "^2.0.0" }, @@ -271,6 +289,7 @@ "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dev": true, + "license": "MIT", "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "^3.1.4", @@ -282,6 +301,7 @@ "version": "2.8.19", "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -290,33 +310,38 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { - "version": "22.18.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.18.10.tgz", - "integrity": "sha512-anNG/V/Efn/YZY4pRzbACnKxNKoBng2VTFydVu8RRs5hQjikP8CQfaeAV59VFSCzKNp90mXiVXW2QzV56rwMrg==", + "version": "22.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.1.tgz", + "integrity": "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==", + "license": "MIT", "dependencies": { "undici-types": "~6.21.0" } @@ -326,6 +351,7 @@ "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -335,6 +361,7 @@ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" @@ -344,6 +371,7 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -357,6 +385,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -369,6 +398,7 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -378,6 +408,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -394,6 +425,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -407,12 +439,14 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" }, "node_modules/async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "license": "MIT", "dependencies": { "lodash": "^4.17.14" } @@ -421,12 +455,14 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "license": "MIT", "engines": { "node": "^4.5.0 || >= 5.9" } @@ -437,6 +473,7 @@ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", "dev": true, + "license": "MIT", "optional": true }, "node_modules/brace-expansion": { @@ -444,6 +481,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -454,6 +492,7 @@ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -462,6 +501,7 @@ "version": "9.3.1", "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.3.1.tgz", "integrity": "sha512-2/egrNDDnRaxVwK3A+cJq6UOlqOdedGA7JPqCeJjN2Zjk1/QB/6QUi3b714ScIGS7HafFXTyzJEOr5b44I3kvQ==", + "license": "MIT", "dependencies": { "debug": "^4.3.4", "sax": "^1.2.4" @@ -475,6 +515,7 @@ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.6.0" } @@ -484,6 +525,7 @@ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", "dev": true, + "license": "MIT", "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -502,6 +544,7 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -511,6 +554,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -527,6 +571,7 @@ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", "dev": true, + "license": "MIT", "dependencies": { "mimic-response": "^1.0.0" }, @@ -539,6 +584,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -550,18 +596,21 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cookie": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -570,6 +619,7 @@ "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", "dependencies": { "object-assign": "^4", "vary": "^1" @@ -583,6 +633,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -595,12 +646,14 @@ "node_modules/dasherize": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", - "integrity": "sha512-APql/TZ6FdLEpf2z7/X2a2zyqK8juYtqaSVqxw9mYoQ64CXkfU15AeLh8pUszT8+fnYjgm6t0aIYpWKJbnLkuA==" + "integrity": "sha512-APql/TZ6FdLEpf2z7/X2a2zyqK8juYtqaSVqxw9mYoQ64CXkfU15AeLh8pUszT8+fnYjgm6t0aIYpWKJbnLkuA==", + "license": "MIT" }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -618,6 +671,7 @@ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, + "license": "MIT", "dependencies": { "mimic-response": "^3.1.0" }, @@ -633,6 +687,7 @@ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -644,13 +699,15 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/defer-to-connect": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } @@ -660,6 +717,7 @@ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "es-define-property": "^1.0.0", @@ -678,6 +736,7 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "define-data-property": "^1.0.1", @@ -696,6 +755,7 @@ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/electron": { @@ -704,6 +764,7 @@ "integrity": "sha512-AhL7+mZ8Lg14iaNfoYTkXQ2qee8mmsQyllKdqxlpv/zrKgfxz6jNVtcRRbQtLxtF8yzcImWdfTQROpYiPumdbw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "dependencies": { "@electron/get": "^2.0.0", "@types/node": "^20.9.0", @@ -724,6 +785,7 @@ "version": "6.6.2", "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.6.2.tgz", "integrity": "sha512-Cr4GDOkbAUqRHP5/oeOmH/L2Bn6+FQPxVLZtPbcmKZC63a1F3uu5EefYOssgZXG3u/zBlubbJ5PJdITdMVggbw==", + "license": "MIT", "dependencies": { "builder-util-runtime": "9.3.1", "fs-extra": "^10.1.0", @@ -739,6 +801,7 @@ "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -752,6 +815,7 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -763,6 +827,7 @@ "version": "7.7.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -774,15 +839,17 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "license": "MIT", "engines": { "node": ">= 10.0.0" } }, "node_modules/electron/node_modules/@types/node": { - "version": "20.19.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.21.tgz", - "integrity": "sha512-CsGG2P3I5y48RPMfprQGfy4JPRZ6csfC3ltBZSRItG3ngggmNY/qs2uZKp4p9VbrpqNNSMzUZNFZKzgOGnd/VA==", + "version": "20.19.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", + "integrity": "sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==", "dev": true, + "license": "MIT", "dependencies": { "undici-types": "~6.21.0" } @@ -792,6 +859,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", "dev": true, + "license": "MIT", "dependencies": { "once": "^1.4.0" } @@ -800,6 +868,7 @@ "version": "6.6.4", "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.4.tgz", "integrity": "sha512-ZCkIjSYNDyGn0R6ewHDtXgns/Zre/NT6Agvq1/WobF7JXgFff4SeDroKiCO3fNJreU9YG429Sc81o4w5ok/W5g==", + "license": "MIT", "dependencies": { "@types/cors": "^2.8.12", "@types/node": ">=10.0.0", @@ -819,6 +888,7 @@ "version": "5.2.3", "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", + "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -827,6 +897,7 @@ "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -844,6 +915,7 @@ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -853,6 +925,7 @@ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">= 0.4" @@ -863,6 +936,7 @@ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">= 0.4" @@ -873,6 +947,7 @@ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/escape-string-regexp": { @@ -880,6 +955,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -888,24 +964,24 @@ } }, "node_modules/eslint": { - "version": "9.37.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.37.0.tgz", - "integrity": "sha512-XyLmROnACWqSxiGYArdef1fItQd47weqB7iwtfr9JHwRrqIXZdcFMvvEcL9xHCmL0SNsOvF0c42lWyM1U5dgig==", + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.0", - "@eslint/config-helpers": "^0.4.0", - "@eslint/core": "^0.16.0", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.37.0", - "@eslint/plugin-kit": "^0.4.0", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", @@ -952,6 +1028,7 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -968,6 +1045,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -980,6 +1058,7 @@ "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", @@ -997,6 +1076,7 @@ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1009,6 +1089,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -1021,6 +1102,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -1030,6 +1112,7 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -1039,6 +1122,7 @@ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -1058,25 +1142,29 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, + "license": "MIT", "dependencies": { "pend": "~1.2.0" } @@ -1086,6 +1174,7 @@ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^4.0.0" }, @@ -1098,6 +1187,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1114,6 +1204,7 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" @@ -1126,13 +1217,15 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -1147,6 +1240,7 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, + "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -1162,6 +1256,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -1174,6 +1269,7 @@ "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", "dev": true, + "license": "BSD-3-Clause", "optional": true, "dependencies": { "boolean": "^3.0.1", @@ -1192,6 +1288,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, + "license": "ISC", "optional": true, "bin": { "semver": "bin/semver.js" @@ -1205,6 +1302,7 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -1217,6 +1315,7 @@ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "define-properties": "^1.2.1", @@ -1234,6 +1333,7 @@ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">= 0.4" @@ -1247,6 +1347,7 @@ "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, + "license": "MIT", "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", @@ -1270,13 +1371,15 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1286,6 +1389,7 @@ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "es-define-property": "^1.0.0" @@ -1298,13 +1402,15 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", - "dev": true + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/http2-wrapper": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "dev": true, + "license": "MIT", "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.0.0" @@ -1318,6 +1424,7 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -1326,6 +1433,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.2.1.tgz", "integrity": "sha512-rH+46sQJ2dlwfjfhCyNx5thzrv+dtmBIhPHk0zgRUukHzZ/kRueTJXoYYsclBaKcSMBWuGbOFXtioLpzTb5euw==", + "license": "MIT", "dependencies": { "queue": "6.0.2" }, @@ -1341,6 +1449,7 @@ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -1357,6 +1466,7 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -1364,13 +1474,15 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1380,6 +1492,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -1391,6 +1504,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz", "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", + "license": "ISC", "dependencies": { "lodash.isfinite": "^3.3.2" } @@ -1399,12 +1513,14 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -1416,25 +1532,29 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true, + "license": "ISC", "optional": true }, "node_modules/jsonfile": { @@ -1442,6 +1562,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, + "license": "MIT", "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -1451,6 +1572,7 @@ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -1458,13 +1580,15 @@ "node_modules/lazy-val": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.5.tgz", - "integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==" + "integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==", + "license": "MIT" }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -1478,6 +1602,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -1491,35 +1616,41 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" }, "node_modules/lodash.escaperegexp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==" + "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==", + "license": "MIT" }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead." + "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", + "license": "MIT" }, "node_modules/lodash.isfinite": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", - "integrity": "sha512-7FGG40uhC8Mm633uKW1r58aElFlBlxCrg9JfSi3P6aYiWmfiWF0PgMd86ZUsxE5GwWPdHoS2+48bwTh2VPkIQA==" + "integrity": "sha512-7FGG40uhC8Mm633uKW1r58aElFlBlxCrg9JfSi3P6aYiWmfiWF0PgMd86ZUsxE5GwWPdHoS2+48bwTh2VPkIQA==", + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1529,6 +1660,7 @@ "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "escape-string-regexp": "^4.0.0" @@ -1541,6 +1673,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1549,6 +1682,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -1561,6 +1695,7 @@ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -1570,6 +1705,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1580,18 +1716,21 @@ "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1601,6 +1740,7 @@ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1612,6 +1752,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1621,6 +1762,7 @@ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">= 0.4" @@ -1631,6 +1773,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } @@ -1640,6 +1783,7 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -1657,6 +1801,7 @@ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1666,6 +1811,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -1681,6 +1827,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -1696,6 +1843,7 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -1708,6 +1856,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1717,6 +1866,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1725,12 +1875,14 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/portscanner": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.2.0.tgz", "integrity": "sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw==", + "license": "MIT", "dependencies": { "async": "^2.6.0", "is-number-like": "^1.0.3" @@ -1745,6 +1897,7 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } @@ -1754,6 +1907,7 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -1763,6 +1917,7 @@ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", "dev": true, + "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -1773,6 +1928,7 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1781,6 +1937,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", + "license": "MIT", "dependencies": { "inherits": "~2.0.3" } @@ -1790,6 +1947,7 @@ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1801,13 +1959,15 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -1817,6 +1977,7 @@ "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", "dev": true, + "license": "MIT", "dependencies": { "lowercase-keys": "^2.0.0" }, @@ -1829,6 +1990,7 @@ "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", "dev": true, + "license": "BSD-3-Clause", "optional": true, "dependencies": { "boolean": "^3.0.1", @@ -1843,15 +2005,17 @@ } }, "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz", + "integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==", + "license": "BlueOak-1.0.0" }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } @@ -1861,6 +2025,7 @@ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/serialize-error": { @@ -1868,6 +2033,7 @@ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "type-fest": "^0.13.1" @@ -1884,6 +2050,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -1896,6 +2063,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1904,6 +2072,7 @@ "version": "4.8.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", + "license": "MIT", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", @@ -1921,6 +2090,7 @@ "version": "2.5.5", "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", + "license": "MIT", "dependencies": { "debug": "~4.3.4", "ws": "~8.17.1" @@ -1930,6 +2100,7 @@ "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -1946,6 +2117,7 @@ "version": "4.2.4", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" @@ -1958,6 +2130,7 @@ "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -1974,6 +2147,7 @@ "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -1991,6 +2165,7 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", "dev": true, + "license": "BSD-3-Clause", "optional": true }, "node_modules/strip-json-comments": { @@ -1998,6 +2173,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -2010,6 +2186,7 @@ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz", "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "debug": "^4.1.0" }, @@ -2022,6 +2199,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2032,13 +2210,15 @@ "node_modules/tiny-typed-emitter": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz", - "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==" + "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==", + "license": "MIT" }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -2051,6 +2231,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true, + "license": "(MIT OR CC0-1.0)", "optional": true, "engines": { "node": ">=10" @@ -2064,6 +2245,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -2075,13 +2257,15 @@ "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==" + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4.0.0" } @@ -2091,6 +2275,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -2099,6 +2284,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2108,6 +2294,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2123,6 +2310,7 @@ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2131,12 +2319,14 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/ws": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -2158,6 +2348,7 @@ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -2168,6 +2359,7 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/src/ElectronNET.Host/package.json b/src/ElectronNET.Host/package.json index 183fca0a..95bfc01c 100644 --- a/src/ElectronNET.Host/package.json +++ b/src/ElectronNET.Host/package.json @@ -6,23 +6,27 @@ "url": "https://github.com/ElectronNET/Electron.NET" }, "main": "main.js", - "author": "Gregor Biswanger, Florian Rappl", - "license": "MIT", + "type": "commonjs", "scripts": { + "build": "tsc --build", + "clean": "tsc --build --clean", "start": "tsc -p ." }, + "keywords": [], + "author": "Gregor Biswanger, Florian Rappl", + "license": "MIT", "dependencies": { - "dasherize": "^2.0.0", - "electron-updater": "^6.6.2", - "image-size": "^1.2.1", - "portscanner": "^2.2.0", - "socket.io": "^4.8.1", - "electron-host-hook": "file:./ElectronHostHook" + "dasherize": "^2.0.0", + "electron-host-hook": "file:./ElectronHostHook", + "image-size": "^1.2.1", + "portscanner": "^2.2.0", + "electron-updater": "^6.6.2", + "socket.io": "^4.8.1" }, "devDependencies": { - "@types/node": "^22.18", - "electron": "^30.0.3", - "eslint": "^9.37.0", - "typescript": "^5.9.3" + "@types/node": "^22.18", + "electron": "^30.0.3", + "eslint": "^9.39.1", + "typescript": "^5.9.3" } } diff --git a/src/ElectronNET.Host/scripts/blazor-preload.js b/src/ElectronNET.Host/scripts/blazor-preload.js new file mode 100644 index 00000000..e2754628 --- /dev/null +++ b/src/ElectronNET.Host/scripts/blazor-preload.js @@ -0,0 +1,2 @@ +global.process = undefined; +global.module = undefined; diff --git a/src/ElectronNET.Host/tsconfig.json b/src/ElectronNET.Host/tsconfig.json index 6c0db629..11f7ad5e 100644 --- a/src/ElectronNET.Host/tsconfig.json +++ b/src/ElectronNET.Host/tsconfig.json @@ -1,13 +1,29 @@ { + "exclude": [ + "node_modules", + "ElectronHostHook" + ], "compilerOptions": { "module": "commonjs", - "target": "ES2019", + "moduleResolution": "node", + "target": "es2020", + "lib": ["es2020"], + "types": ["node"], "sourceMap": true, + "strict": false, + "noImplicitAny": false, "skipLibCheck": true, - "newLine": "crlf" + "isolatedModules": false, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "baseUrl": ".", + "paths": { + "electron-updater": ["node_modules/electron-updater/dist/index.d.ts"] + } }, - "exclude": [ - "node_modules", - "ElectronHostHook" + "include": [ + "**/*.ts", + "types-shims.d.ts", + "globals.d.ts" ] -} \ No newline at end of file +} diff --git a/src/ElectronNET.Host/tsconfig.tsbuildinfo b/src/ElectronNET.Host/tsconfig.tsbuildinfo new file mode 100644 index 00000000..149ba25c --- /dev/null +++ b/src/ElectronNET.Host/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./globals.d.ts","./types-shims.d.ts","./api/app.ts","./api/autoupdater.ts","./api/browserview.ts","./api/browserwindows.ts","./api/clipboard.ts","./api/commandline.ts","./api/dialog.ts","./api/dock.ts","./api/globalshortcut.ts","./api/ipc.ts","./api/menu.ts","./api/nativetheme.ts","./api/notification.ts","./api/powermonitor.ts","./api/process.ts","./api/screen.ts","./api/shell.ts","./api/tray.ts","./api/webcontents.ts"],"version":"5.9.3"} \ No newline at end of file diff --git a/src/ElectronNET.Host/types-shims.d.ts b/src/ElectronNET.Host/types-shims.d.ts new file mode 100644 index 00000000..f6432a13 --- /dev/null +++ b/src/ElectronNET.Host/types-shims.d.ts @@ -0,0 +1,8 @@ +// Simplified ambient module declarations to silence unresolved external module TS errors +// and missing extended tsconfig references inside node_modules. +// This is internal only. +declare module 'electron-updater' { + export const autoUpdater: any; +} + +declare module '@ljharb/tsconfig'; diff --git a/src/ElectronNET.IntegrationTests/Common/IntegrationFactAttribute.cs b/src/ElectronNET.IntegrationTests/Common/IntegrationFactAttribute.cs new file mode 100644 index 00000000..6142bdfd --- /dev/null +++ b/src/ElectronNET.IntegrationTests/Common/IntegrationFactAttribute.cs @@ -0,0 +1,101 @@ +namespace ElectronNET.IntegrationTests.Common +{ + using System.Runtime.InteropServices; + using Xunit.Sdk; + + /// + /// Custom fact attribute with a default timeout of 20 seconds, allowing tests to be skipped on specific environments. + /// + /// + [AttributeUsage(AttributeTargets.Method)] + [XunitTestCaseDiscoverer("Xunit.Sdk.SkippableFactDiscoverer", "Xunit.SkippableFact")] + internal sealed class IntegrationFactAttribute : FactAttribute + { + private static readonly bool IsOnWsl; + + private static readonly bool IsOnCI; + + static IntegrationFactAttribute() + { + IsOnWsl = DetectWsl(); + IsOnCI = DetectCI(); + } + + /// + /// Initializes a new instance of the class. + /// + public IntegrationFactAttribute() + { + this.Timeout = 20_000; + } + + public bool SkipOnWsl { get; set; } + + public bool SkipOnCI { get; set; } + + /// + /// Marks the test so that it will not be run, and gets or sets the skip reason + /// + public override string Skip { + get + { + if (IsOnWsl && this.SkipOnWsl) + { + return "Skipping test on WSL environment."; + } + + if (IsOnCI && this.SkipOnCI) + { + return "Skipping test on CI environment."; + } + + return base.Skip; + } + set + { + base.Skip = value; + } + } + + private static bool DetectWsl() + { + try + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + return false; + } + + if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("WSL_DISTRO_NAME")) || + !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("WSL_INTEROP"))) + { + return true; + } + + return false; + } + catch + { + return false; + } + } + + private static bool DetectCI() + { + try + { + if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TF_BUILD")) || + !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_ACTIONS"))) + { + return true; + } + + return false; + } + catch + { + return false; + } + } + } +} diff --git a/src/ElectronNET.IntegrationTests/Common/IntegrationTestBase.cs b/src/ElectronNET.IntegrationTests/Common/IntegrationTestBase.cs new file mode 100644 index 00000000..5a6407fa --- /dev/null +++ b/src/ElectronNET.IntegrationTests/Common/IntegrationTestBase.cs @@ -0,0 +1,23 @@ +namespace ElectronNET.IntegrationTests.Common +{ + using ElectronNET.API; + using ElectronNET.API.Entities; + + // Base class for integration tests providing shared access to MainWindow and OS platform constants + public abstract class IntegrationTestBase + { + protected IntegrationTestBase(ElectronFixture fixture) + { + Fixture = fixture; + MainWindow = fixture.MainWindow; + } + + protected ElectronFixture Fixture { get; } + protected BrowserWindow MainWindow { get; } + + // Constants for SupportedOSPlatform attributes + public const string Windows = "Windows"; + public const string MacOS = "macOS"; + public const string Linux = "Linux"; + } +} diff --git a/src/ElectronNET.IntegrationTests/ElectronFixture.cs b/src/ElectronNET.IntegrationTests/ElectronFixture.cs index 68a1ec9b..59be6c95 100644 --- a/src/ElectronNET.IntegrationTests/ElectronFixture.cs +++ b/src/ElectronNET.IntegrationTests/ElectronFixture.cs @@ -1,38 +1,66 @@ namespace ElectronNET.IntegrationTests { + using System.Diagnostics.CodeAnalysis; using System.Reflection; using ElectronNET.API; using ElectronNET.API.Entities; + using ElectronNET.Common; // Shared fixture that starts Electron runtime once + [SuppressMessage("ReSharper", "MethodHasAsyncOverload")] public class ElectronFixture : IAsyncLifetime { public BrowserWindow MainWindow { get; private set; } = null!; public async Task InitializeAsync() { - AppDomain.CurrentDomain.SetData("ElectronTestAssembly", Assembly.GetExecutingAssembly()); - var runtimeController = ElectronNetRuntime.RuntimeController; - await runtimeController.Start(); - await runtimeController.WaitReadyTask; - - // create hidden window for tests (avoid showing UI) - this.MainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions + try { - Show = false, - Width = 800, - Height = 600, - }); + Console.Error.WriteLine("[ElectronFixture] InitializeAsync: start"); + AppDomain.CurrentDomain.SetData("ElectronTestAssembly", Assembly.GetExecutingAssembly()); + + Console.WriteLine("[ElectronFixture] Acquire RuntimeController"); + var runtimeController = ElectronNetRuntime.RuntimeController; + ElectronNetRuntime.ElectronExtraArguments = "--no-sandbox"; + + Console.Error.WriteLine("[ElectronFixture] Starting Electron runtime..."); + await runtimeController.Start(); + + Console.Error.WriteLine("[ElectronFixture] Waiting for Ready..."); + await Task.WhenAny(runtimeController.WaitReadyTask, Task.Delay(10.seconds())); - // Clear potential cache side-effects - await this.MainWindow.WebContents.Session.ClearCacheAsync(); + if (!runtimeController.WaitReadyTask.IsCompleted) + { + throw new TimeoutException("The Electron process did not start within 10 seconds"); + } + + Console.Error.WriteLine("[ElectronFixture] Runtime Ready"); + + // create hidden window for tests (avoid showing UI) + this.MainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions + { + Show = false, + Width = 800, + Height = 600, + }, "about:blank"); + + await this.MainWindow.WebContents.Session.ClearCacheAsync(); + } + catch (Exception ex) + { + Console.Error.WriteLine("[ElectronFixture] InitializeAsync: exception"); + Console.Error.WriteLine(ex.ToString()); + throw; + } } public async Task DisposeAsync() { var runtimeController = ElectronNetRuntime.RuntimeController; + Console.Error.WriteLine("[ElectronFixture] Stopping Electron runtime..."); await runtimeController.Stop(); await runtimeController.WaitStoppedTask; + Console.Error.WriteLine("[ElectronFixture] Runtime stopped"); } } diff --git a/src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj b/src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj index 373440c2..ad9d60c3 100644 --- a/src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj +++ b/src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj @@ -5,25 +5,25 @@ true - + - net8.0 + net10.0 enable - enable + disable false true - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -37,6 +37,12 @@ false - + + + PreserveNewest + + + + diff --git a/src/ElectronNET.IntegrationTests/Tests/AppTests.cs b/src/ElectronNET.IntegrationTests/Tests/AppTests.cs index 4512f6b9..6d962f25 100644 --- a/src/ElectronNET.IntegrationTests/Tests/AppTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/AppTests.cs @@ -1,23 +1,21 @@ namespace ElectronNET.IntegrationTests.Tests { - using System.Runtime.InteropServices; using ElectronNET.API; using ElectronNET.API.Entities; using System; using System.IO; + using System.Runtime.Versioning; using System.Threading.Tasks; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class AppTests + public class AppTests : IntegrationTestBase { - // ReSharper disable once NotAccessedField.Local - private readonly ElectronFixture fx; - public AppTests(ElectronFixture fx) + public AppTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_get_app_path() { var path = await Electron.App.GetAppPathAsync(); @@ -25,7 +23,7 @@ public async Task Can_get_app_path() Directory.Exists(path).Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_get_version_and_locale() { var version = await Electron.App.GetVersionAsync(); @@ -34,7 +32,7 @@ public async Task Can_get_version_and_locale() locale.Should().NotBeNullOrWhiteSpace(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_get_special_paths() { var userData = await Electron.App.GetPathAsync(PathName.UserData); @@ -46,29 +44,7 @@ public async Task Can_get_special_paths() Directory.Exists(temp).Should().BeTrue(); } - - [Fact(Timeout = 20000)] - public async Task Badge_count_roundtrip_where_supported() - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - var ok = await Electron.App.SetBadgeCountAsync(3); - ok.Should().BeTrue(); - var count = await Electron.App.GetBadgeCountAsync(); - count.Should().Be(3); - // reset - await Electron.App.SetBadgeCountAsync(0); - } - else - { - // On Windows it's usually unsupported; ensure badge query works and returns a non-negative value - await Electron.App.SetBadgeCountAsync(0); // ignore return value - var count = await Electron.App.GetBadgeCountAsync(); - count.Should().BeGreaterOrEqualTo(0); - } - } - - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_get_app_metrics() { var metrics = await Electron.App.GetAppMetricsAsync(); @@ -76,29 +52,23 @@ public async Task Can_get_app_metrics() metrics.Length.Should().BeGreaterThan(0); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_get_gpu_feature_status() { var status = await Electron.App.GetGpuFeatureStatusAsync(); status.Should().NotBeNull(); } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(MacOS)] + [SupportedOSPlatform(Windows)] public async Task Can_get_login_item_settings() { var settings = await Electron.App.GetLoginItemSettingsAsync(); settings.Should().NotBeNull(); } - [Fact(Timeout = 20000)] - public async Task Can_set_app_logs_path() - { - var tempDir = Path.Combine(Path.GetTempPath(), "ElectronLogsTest" + Guid.NewGuid().ToString("N")); - Directory.CreateDirectory(tempDir); - Electron.App.SetAppLogsPath(tempDir); - } - - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task CommandLine_append_and_query_switch() { var switchName = "integration-switch"; @@ -107,7 +77,9 @@ public async Task CommandLine_append_and_query_switch() (await Electron.App.CommandLine.GetSwitchValueAsync(switchName)).Should().Be("value123"); } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(MacOS)] + [SupportedOSPlatform(Windows)] public async Task Accessibility_support_toggle() { Electron.App.SetAccessibilitySupportEnabled(true); @@ -116,7 +88,7 @@ public async Task Accessibility_support_toggle() Electron.App.SetAccessibilitySupportEnabled(false); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task UserAgentFallback_roundtrip() { var original = await Electron.App.UserAgentFallbackAsync; @@ -126,35 +98,26 @@ public async Task UserAgentFallback_roundtrip() Electron.App.UserAgentFallback = original; // restore } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(Linux)] + [SupportedOSPlatform(MacOS)] public async Task BadgeCount_set_and_reset_where_supported() { await Electron.App.SetBadgeCountAsync(2); var count = await Electron.App.GetBadgeCountAsync(); // Some platforms may always return0; just ensure call didn't throw and is non-negative - count.Should().BeGreaterOrEqualTo(0); + count.Should().BeGreaterThanOrEqualTo(0); await Electron.App.SetBadgeCountAsync(0); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task App_metrics_have_cpu_info() { var metrics = await Electron.App.GetAppMetricsAsync(); metrics[0].Cpu.Should().NotBeNull(); } - [Fact(Timeout = 20000)] - public async Task App_badge_count_roundtrip() - { - // Set then get (non-mac platforms treat as no-op but should return0 or set value) - var success = await Electron.App.SetBadgeCountAsync(3); - success.Should().BeTrue(); - var count = await Electron.App.GetBadgeCountAsync(); - // Allow fallback to0 on platforms without badge support - (count ==3 || count ==0).Should().BeTrue(); - } - - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task App_gpu_feature_status_has_some_fields() { var status = await Electron.App.GetGpuFeatureStatusAsync(); @@ -163,4 +126,4 @@ public async Task App_gpu_feature_status_has_some_fields() status.VideoDecode.Should().NotBeNull(); } } -} \ No newline at end of file +} diff --git a/src/ElectronNET.IntegrationTests/Tests/AutoUpdaterTests.cs b/src/ElectronNET.IntegrationTests/Tests/AutoUpdaterTests.cs index 4da2734b..65279a89 100644 --- a/src/ElectronNET.IntegrationTests/Tests/AutoUpdaterTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/AutoUpdaterTests.cs @@ -2,79 +2,79 @@ { using API; using System.Threading.Tasks; + using ElectronNET.Common; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class AutoUpdaterTests + public class AutoUpdaterTests : IntegrationTestBase { - private readonly ElectronFixture fx; - public AutoUpdaterTests(ElectronFixture fx) + public AutoUpdaterTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - - [Fact(Timeout = 20000)] + + [IntegrationFact] public async Task AutoDownload_check() { Electron.AutoUpdater.AutoDownload = false; - var test1 = Electron.AutoUpdater.AutoDownload; + var test1 = Electron.AutoUpdater.AutoDownload; Electron.AutoUpdater.AutoDownload = true; - var test2 = Electron.AutoUpdater.AutoDownload; + var test2 = Electron.AutoUpdater.AutoDownload; test1.Should().BeFalse(); test2.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task AutoInstallOnAppQuit_check() { Electron.AutoUpdater.AutoInstallOnAppQuit = false; - var test1 = Electron.AutoUpdater.AutoInstallOnAppQuit; + var test1 = Electron.AutoUpdater.AutoInstallOnAppQuit; Electron.AutoUpdater.AutoInstallOnAppQuit = true; - var test2 = Electron.AutoUpdater.AutoInstallOnAppQuit; + var test2 = Electron.AutoUpdater.AutoInstallOnAppQuit; test1.Should().BeFalse(); test2.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task AllowPrerelease_check() { Electron.AutoUpdater.AllowPrerelease = false; - var test1 = Electron.AutoUpdater.AllowPrerelease; + var test1 = Electron.AutoUpdater.AllowPrerelease; Electron.AutoUpdater.AllowPrerelease = true; - var test2 = Electron.AutoUpdater.AllowPrerelease; + var test2 = Electron.AutoUpdater.AllowPrerelease; test1.Should().BeFalse(); test2.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task FullChangelog_check() { Electron.AutoUpdater.FullChangelog = false; - var test1 = Electron.AutoUpdater.FullChangelog; + var test1 = Electron.AutoUpdater.FullChangelog; Electron.AutoUpdater.FullChangelog = true; - var test2 = Electron.AutoUpdater.FullChangelog; + var test2 = Electron.AutoUpdater.FullChangelog; test1.Should().BeFalse(); test2.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task AllowDowngrade_check() { Electron.AutoUpdater.AllowDowngrade = false; - var test1 = Electron.AutoUpdater.AllowDowngrade; + var test1 = Electron.AutoUpdater.AllowDowngrade; Electron.AutoUpdater.AllowDowngrade = true; - var test2 = Electron.AutoUpdater.AllowDowngrade; + var test2 = Electron.AutoUpdater.AllowDowngrade; test1.Should().BeFalse(); test2.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task UpdateConfigPath_check() { - var test1 = Electron.AutoUpdater.UpdateConfigPath; + var test1 = Electron.AutoUpdater.UpdateConfigPath; test1.Should().Be(string.Empty); } - - [Fact(Timeout = 20000)] + + [IntegrationFact] public async Task CurrentVersionAsync_check() { var semver = await Electron.AutoUpdater.CurrentVersionAsync; @@ -82,17 +82,18 @@ public async Task CurrentVersionAsync_check() semver.Major.Should().BeGreaterThan(0); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task ChannelAsync_check() { var test = await Electron.AutoUpdater.ChannelAsync; test.Should().Be(string.Empty); Electron.AutoUpdater.SetChannel = "beta"; + await Task.Delay(500.ms()); test = await Electron.AutoUpdater.ChannelAsync; test.Should().Be("beta"); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task RequestHeadersAsync_check() { var headers = new Dictionary @@ -102,31 +103,32 @@ public async Task RequestHeadersAsync_check() var test = await Electron.AutoUpdater.RequestHeadersAsync; test.Should().BeNull(); Electron.AutoUpdater.RequestHeaders = headers; + await Task.Delay(500.ms()); test = await Electron.AutoUpdater.RequestHeadersAsync; test.Should().NotBeNull(); test.Count.Should().Be(1); test["key1"].Should().Be("value1"); } - - [Fact(Timeout = 20000)] + + [IntegrationFact] public async Task CheckForUpdatesAsync_check() { var test = await Electron.AutoUpdater.CheckForUpdatesAsync(); test.Should().BeNull(); } - - [Fact(Timeout = 20000)] + + [IntegrationFact] public async Task CheckForUpdatesAndNotifyAsync_check() { var test = await Electron.AutoUpdater.CheckForUpdatesAsync(); test.Should().BeNull(); } - - [Fact(Timeout = 20000)] + + [IntegrationFact] public async Task GetFeedURLAsync_check() { var test = await Electron.AutoUpdater.GetFeedURLAsync(); test.Should().Contain("Deprecated"); } - } -} + } +} \ No newline at end of file diff --git a/src/ElectronNET.IntegrationTests/Tests/BrowserViewTests.cs b/src/ElectronNET.IntegrationTests/Tests/BrowserViewTests.cs index 3e1b626f..6fa25c0b 100644 --- a/src/ElectronNET.IntegrationTests/Tests/BrowserViewTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/BrowserViewTests.cs @@ -2,21 +2,20 @@ namespace ElectronNET.IntegrationTests.Tests { using ElectronNET.API; using ElectronNET.API.Entities; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class BrowserViewTests + public class BrowserViewTests : IntegrationTestBase { - private readonly ElectronFixture fx; - public BrowserViewTests(ElectronFixture fx) + public BrowserViewTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Create_browser_view_and_adjust_bounds() { var view = await Electron.WindowManager.CreateBrowserViewAsync(new BrowserViewConstructorOptions()); - this.fx.MainWindow.SetBrowserView(view); + this.MainWindow.SetBrowserView(view); view.Bounds = new Rectangle { X = 0, Y = 0, Width = 300, Height = 200 }; // Access bounds again (synchronous property fetch) var current = view.Bounds; diff --git a/src/ElectronNET.IntegrationTests/Tests/BrowserWindowTests.cs b/src/ElectronNET.IntegrationTests/Tests/BrowserWindowTests.cs index e7e69021..c22b8908 100644 --- a/src/ElectronNET.IntegrationTests/Tests/BrowserWindowTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/BrowserWindowTests.cs @@ -1,223 +1,261 @@ namespace ElectronNET.IntegrationTests.Tests { - using System.Runtime.InteropServices; + using System.Runtime.Versioning; using ElectronNET.API; using ElectronNET.API.Entities; + using ElectronNET.Common; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class BrowserWindowTests + public class BrowserWindowTests : IntegrationTestBase { - private readonly ElectronFixture fx; - - public BrowserWindowTests(ElectronFixture fx) + public BrowserWindowTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_set_and_get_title() { const string title = "Integration Test Title"; - this.fx.MainWindow.SetTitle(title); - var roundTrip = await this.fx.MainWindow.GetTitleAsync(); + this.MainWindow.SetTitle(title); + await Task.Delay(500.ms()); + var roundTrip = await this.MainWindow.GetTitleAsync(); roundTrip.Should().Be(title); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_resize_and_get_size() { - this.fx.MainWindow.SetSize(643, 482); - var size = await this.fx.MainWindow.GetSizeAsync(); + this.MainWindow.SetSize(643, 482); + await Task.Delay(500.ms()); + var size = await this.MainWindow.GetSizeAsync(); size.Should().HaveCount(2); size[0].Should().Be(643); size[1].Should().Be(482); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_set_progress_bar_and_clear() { - this.fx.MainWindow.SetProgressBar(0.5); + this.MainWindow.SetProgressBar(0.5); // No direct getter; rely on absence of error. Try changing again. - this.fx.MainWindow.SetProgressBar(-1); // clears - await Task.Delay(50); + this.MainWindow.SetProgressBar(-1); // clears + await Task.Delay(50.ms()); } - [Fact(Timeout = 20000)] + [IntegrationFact(SkipOnWsl = true)] public async Task Can_set_and_get_position() { - this.fx.MainWindow.SetPosition(134, 246); - await Task.Delay(500); - var pos = await this.fx.MainWindow.GetPositionAsync(); + this.MainWindow.SetPosition(134, 246); + await Task.Delay(500.ms()); + var pos = await this.MainWindow.GetPositionAsync(); pos.Should().BeEquivalentTo([134, 246]); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_set_and_get_bounds() { var bounds = new Rectangle { X = 10, Y = 20, Width = 400, Height = 300 }; - this.fx.MainWindow.SetBounds(bounds); - var round = await this.fx.MainWindow.GetBoundsAsync(); + this.MainWindow.SetBounds(bounds); + await Task.Delay(500.ms()); + var round = await this.MainWindow.GetBoundsAsync(); round.Should().BeEquivalentTo(bounds); round.Width.Should().Be(400); round.Height.Should().Be(300); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_set_and_get_content_bounds() { var bounds = new Rectangle { X = 0, Y = 0, Width = 300, Height = 200 }; - this.fx.MainWindow.SetContentBounds(bounds); - var round = await this.fx.MainWindow.GetContentBoundsAsync(); + this.MainWindow.SetContentBounds(bounds); + await Task.Delay(500.ms()); + var round = await this.MainWindow.GetContentBoundsAsync(); round.Width.Should().BeGreaterThan(0); round.Height.Should().BeGreaterThan(0); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Show_hide_visibility_roundtrip() { - this.fx.MainWindow.Show(); - (await this.fx.MainWindow.IsVisibleAsync()).Should().BeTrue(); - this.fx.MainWindow.Hide(); - (await this.fx.MainWindow.IsVisibleAsync()).Should().BeFalse(); + BrowserWindow window = null; + + try + { + window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true }, "about:blank"); + + await Task.Delay(100.ms()); + + window.Show(); + + await Task.Delay(500.ms()); + (await window.IsVisibleAsync()).Should().BeTrue(); + + window.Hide(); + await Task.Delay(500.ms()); + + (await window.IsVisibleAsync()).Should().BeFalse(); + } + finally + { + window?.Destroy(); + } } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task AlwaysOnTop_toggle_and_query() { - this.fx.MainWindow.SetAlwaysOnTop(true); - (await this.fx.MainWindow.IsAlwaysOnTopAsync()).Should().BeTrue(); - this.fx.MainWindow.SetAlwaysOnTop(false); - (await this.fx.MainWindow.IsAlwaysOnTopAsync()).Should().BeFalse(); + this.MainWindow.SetAlwaysOnTop(true); + await Task.Delay(500.ms()); + (await this.MainWindow.IsAlwaysOnTopAsync()).Should().BeTrue(); + this.MainWindow.SetAlwaysOnTop(false); + await Task.Delay(500.ms()); + (await this.MainWindow.IsAlwaysOnTopAsync()).Should().BeFalse(); } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(Linux)] + [SupportedOSPlatform(Windows)] public async Task MenuBar_auto_hide_and_visibility() { - this.fx.MainWindow.SetAutoHideMenuBar(true); - (await this.fx.MainWindow.IsMenuBarAutoHideAsync()).Should().BeTrue(); - this.fx.MainWindow.SetMenuBarVisibility(false); - (await this.fx.MainWindow.IsMenuBarVisibleAsync()).Should().BeFalse(); - this.fx.MainWindow.SetMenuBarVisibility(true); - (await this.fx.MainWindow.IsMenuBarVisibleAsync()).Should().BeTrue(); + this.MainWindow.SetAutoHideMenuBar(true); + await Task.Delay(500.ms()); + (await this.MainWindow.IsMenuBarAutoHideAsync()).Should().BeTrue(); + this.MainWindow.SetMenuBarVisibility(false); + await Task.Delay(500.ms()); + (await this.MainWindow.IsMenuBarVisibleAsync()).Should().BeFalse(); + this.MainWindow.SetMenuBarVisibility(true); + await Task.Delay(500.ms()); + (await this.MainWindow.IsMenuBarVisibleAsync()).Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task ReadyToShow_event_fires_after_content_ready() { - var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false }); - var tcs = new TaskCompletionSource(); - window.OnReadyToShow += () => tcs.TrySetResult(); + BrowserWindow window = null; - // Trigger a navigation and wait for DOM ready so the renderer paints, which emits ready-to-show - var domReadyTcs = new TaskCompletionSource(); - window.WebContents.OnDomReady += () => domReadyTcs.TrySetResult(); - await window.WebContents.LoadURLAsync("about:blank"); - await domReadyTcs.Task; + try + { + window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false }, "about:blank"); + var tcs = new TaskCompletionSource(); + window.OnReadyToShow += () => tcs.TrySetResult(); - var completed = await Task.WhenAny(tcs.Task, Task.Delay(3000)); - completed.Should().Be(tcs.Task); + // Trigger a navigation and wait for DOM ready so the renderer paints, which emits ready-to-show + var domReadyTcs = new TaskCompletionSource(); + window.WebContents.OnDomReady += () => domReadyTcs.TrySetResult(); + await Task.Delay(500.ms()); + await window.WebContents.LoadURLAsync("about:blank"); + await domReadyTcs.Task; - // Typical usage is to show once ready - window.Show(); + var completed = await Task.WhenAny(tcs.Task, Task.Delay(3.seconds())); + completed.Should().Be(tcs.Task); + } + finally + { + window?.Destroy(); + } } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task PageTitleUpdated_event_fires_on_title_change() { - var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true }); + var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true }, "about:blank"); var tcs = new TaskCompletionSource(); window.OnPageTitleUpdated += title => tcs.TrySetResult(title); // Navigate and wait for DOM ready, then change the document.title to trigger the event var domReadyTcs = new TaskCompletionSource(); window.WebContents.OnDomReady += () => domReadyTcs.TrySetResult(); + await Task.Delay(500.ms()); await window.WebContents.LoadURLAsync("about:blank"); await domReadyTcs.Task; await window.WebContents.ExecuteJavaScriptAsync("document.title='NewTitle';"); // Wait for event up to a short timeout - var completed2 = await Task.WhenAny(tcs.Task, Task.Delay(3000)); + var completed2 = await Task.WhenAny(tcs.Task, Task.Delay(3.seconds())); completed2.Should().Be(tcs.Task); (await tcs.Task).Should().Be("NewTitle"); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Resize_event_fires_on_size_change() { - var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false }); + var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false }, "about:blank"); var resized = false; window.OnResize += () => resized = true; + await Task.Delay(500.ms()); window.SetSize(500, 400); - await Task.Delay(300); + await Task.Delay(300.ms()); resized.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Progress_bar_and_always_on_top_toggle() { - var win = this.fx.MainWindow; + var win = this.MainWindow; win.SetProgressBar(0.5); - win.SetProgressBar(0.8, new ProgressBarOptions { Mode = ProgressBarMode.normal }); + await Task.Delay(50.ms()); + win.SetProgressBar(0.8, new ProgressBarOptions()); + await Task.Delay(50.ms()); win.SetAlwaysOnTop(true); + await Task.Delay(500.ms()); (await win.IsAlwaysOnTopAsync()).Should().BeTrue(); win.SetAlwaysOnTop(false); + await Task.Delay(500.ms()); (await win.IsAlwaysOnTopAsync()).Should().BeFalse(); } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(Linux)] + [SupportedOSPlatform(Windows)] public async Task Menu_bar_visibility_and_auto_hide() { - var win = this.fx.MainWindow; + var win = this.MainWindow; win.SetAutoHideMenuBar(true); + await Task.Delay(500.ms()); (await win.IsMenuBarAutoHideAsync()).Should().BeTrue(); win.SetMenuBarVisibility(true); + await Task.Delay(500.ms()); (await win.IsMenuBarVisibleAsync()).Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Parent_child_relationship_roundtrip() { - var child = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false, Width = 300, Height = 200 }); - this.fx.MainWindow.SetParentWindow(null); // ensure top-level - child.SetParentWindow(this.fx.MainWindow); + var child = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false, Width = 300, Height = 200 }, "about:blank"); + this.MainWindow.SetParentWindow(null); // ensure top-level + child.SetParentWindow(this.MainWindow); + await Task.Delay(500.ms()); var parent = await child.GetParentWindowAsync(); - parent.Id.Should().Be(this.fx.MainWindow.Id); - var kids = await this.fx.MainWindow.GetChildWindowsAsync(); + parent.Id.Should().Be(this.MainWindow.Id); + var kids = await this.MainWindow.GetChildWindowsAsync(); kids.Select(k => k.Id).Should().Contain(child.Id); child.Destroy(); } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(MacOS)] public async Task Represented_filename_and_edited_flags() { - var win = this.fx.MainWindow; + var win = this.MainWindow; var temp = Path.Combine(Path.GetTempPath(), "electronnet_test.txt"); File.WriteAllText(temp, "test"); win.SetRepresentedFilename(temp); + + await Task.Delay(500.ms()); + var represented = await win.GetRepresentedFilenameAsync(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - represented.Should().Be(temp); - } - else - { - // Non-macOS platforms may not support represented filename; empty is acceptable - represented.Should().BeEmpty(); - } + represented.Should().Be(temp); win.SetDocumentEdited(true); + + await Task.Delay(500.ms()); + var edited = await win.IsDocumentEditedAsync(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - edited.Should().BeTrue(); - } - else - { - edited.Should().BeFalse(); // unsupported on non-mac platforms - } + edited.Should().BeTrue(); win.SetDocumentEdited(false); } } -} \ No newline at end of file +} diff --git a/src/ElectronNET.IntegrationTests/Tests/ClipboardTests.cs b/src/ElectronNET.IntegrationTests/Tests/ClipboardTests.cs index b3bd2dd1..4ef2a991 100644 --- a/src/ElectronNET.IntegrationTests/Tests/ClipboardTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/ClipboardTests.cs @@ -1,19 +1,17 @@ namespace ElectronNET.IntegrationTests.Tests { + using System.Runtime.Versioning; using ElectronNET.API; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class ClipboardTests + public class ClipboardTests : IntegrationTestBase { - // ReSharper disable once NotAccessedField.Local - private readonly ElectronFixture fx; - - public ClipboardTests(ElectronFixture fx) + public ClipboardTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Clipboard_text_roundtrip() { var text = $"Hello Electron {Guid.NewGuid()}"; @@ -22,7 +20,7 @@ public async Task Clipboard_text_roundtrip() read.Should().Be(text); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Available_formats_contains_text_after_write() { var text = "FormatsTest"; @@ -31,7 +29,9 @@ public async Task Available_formats_contains_text_after_write() formats.Should().Contain(f => f.Contains("text") || f.Contains("TEXT") || f.Contains("plain")); } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(MacOS)] + [SupportedOSPlatform(Windows)] public async Task Bookmark_write_and_read() { var url = "https://electron-test.com"; @@ -40,4 +40,4 @@ public async Task Bookmark_write_and_read() bookmark.Url.Should().Be(url); } } -} \ No newline at end of file +} diff --git a/src/ElectronNET.IntegrationTests/Tests/CookiesTests.cs b/src/ElectronNET.IntegrationTests/Tests/CookiesTests.cs index 3113fe52..1bb6cc92 100644 --- a/src/ElectronNET.IntegrationTests/Tests/CookiesTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/CookiesTests.cs @@ -1,25 +1,26 @@ namespace ElectronNET.IntegrationTests.Tests { + using ElectronNET.Common; + using ElectronNET.IntegrationTests.Common; + [Collection("ElectronCollection")] - public class CookiesTests + public class CookiesTests : IntegrationTestBase { - private readonly ElectronFixture fx; - public CookiesTests(ElectronFixture fx) + public CookiesTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Skip = "Cookie set/get requires navigation to domain; skipping until test harness serves page")] + [IntegrationFact(Skip = "Cookie set/get requires navigation to domain; skipping until test harness serves page")] public async Task Cookie_set_get_remove_sequence() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; var changed = false; session.Cookies.OnChanged += (cookie, cause, removed) => changed = true; // Navigate to example.com so cookie domain matches - await this.fx.MainWindow.WebContents.LoadURLAsync("https://example.com"); + await this.MainWindow.WebContents.LoadURLAsync("https://example.com"); // Set via renderer for now - await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync("document.cookie='integration_cookie=1;path=/';"); - await Task.Delay(500); + await this.MainWindow.WebContents.ExecuteJavaScriptAsync("document.cookie='integration_cookie=1;path=/';"); + await Task.Delay(500.ms()); changed.Should().BeTrue(); } } diff --git a/src/ElectronNET.IntegrationTests/Tests/GlobalShortcutTests.cs b/src/ElectronNET.IntegrationTests/Tests/GlobalShortcutTests.cs index 625618f3..942e6311 100644 --- a/src/ElectronNET.IntegrationTests/Tests/GlobalShortcutTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/GlobalShortcutTests.cs @@ -2,11 +2,16 @@ namespace ElectronNET.IntegrationTests.Tests { using System.Runtime.InteropServices; using ElectronNET.API; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class GlobalShortcutTests + public class GlobalShortcutTests : IntegrationTestBase { - [Fact(Timeout = 20000)] + public GlobalShortcutTests(ElectronFixture fx) : base(fx) + { + } + + [IntegrationFact] public async Task Can_register_and_unregister() { var accel = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "Cmd+Alt+G" : "Ctrl+Alt+G"; diff --git a/src/ElectronNET.IntegrationTests/Tests/HostHookTests.cs b/src/ElectronNET.IntegrationTests/Tests/HostHookTests.cs index 254f7aa4..05b15495 100644 --- a/src/ElectronNET.IntegrationTests/Tests/HostHookTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/HostHookTests.cs @@ -1,11 +1,16 @@ namespace ElectronNET.IntegrationTests.Tests { using ElectronNET.API; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class HostHookTests + public class HostHookTests : IntegrationTestBase { - [Fact(Skip = "Requires HostHook setup; skipping")] + public HostHookTests(ElectronFixture fx) : base(fx) + { + } + + [IntegrationFact(Skip = "Requires HostHook setup; skipping")] public async Task HostHook_call_returns_value() { var result = await Electron.HostHook.CallAsync("create-excel-file", "."); diff --git a/src/ElectronNET.IntegrationTests/Tests/IpcMainTests.cs b/src/ElectronNET.IntegrationTests/Tests/IpcMainTests.cs index 73901897..6136fa0a 100644 --- a/src/ElectronNET.IntegrationTests/Tests/IpcMainTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/IpcMainTests.cs @@ -1,76 +1,93 @@ namespace ElectronNET.IntegrationTests.Tests { using ElectronNET.API; + using ElectronNET.Common; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class IpcMainTests + public class IpcMainTests : IntegrationTestBase { - private readonly ElectronFixture fx; - public IpcMainTests(ElectronFixture fx) + public IpcMainTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Ipc_On_receives_message_from_renderer() { + object received = null; + var tcs = new TaskCompletionSource(); - await Electron.IpcMain.On("ipc-on-test", obj => tcs.TrySetResult(obj?.ToString() ?? string.Empty)); - await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync("require('electron').ipcRenderer.send('ipc-on-test','payload123')"); + await Electron.IpcMain.On("ipc-on-test", obj => + { + received = obj; + tcs.TrySetResult(obj as string); + }); + + await this.MainWindow.WebContents.ExecuteJavaScriptAsync("require('electron').ipcRenderer.send('ipc-on-test','payload123')"); + var result = await tcs.Task.WaitAsync(TimeSpan.FromSeconds(5)); + + received.Should().BeOfType(); + received.Should().Be("payload123"); result.Should().Be("payload123"); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Ipc_Once_only_fires_once() { var count = 0; Electron.IpcMain.Once("ipc-once-test", _ => count++); - await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync("const {ipcRenderer}=require('electron'); ipcRenderer.send('ipc-once-test','a'); ipcRenderer.send('ipc-once-test','b');"); - await Task.Delay(500); + await this.MainWindow.WebContents.ExecuteJavaScriptAsync("const {ipcRenderer}=require('electron'); ipcRenderer.send('ipc-once-test','a'); ipcRenderer.send('ipc-once-test','b');"); + await Task.Delay(500.ms()); count.Should().Be(1); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Ipc_RemoveAllListeners_stops_receiving() { var fired = false; await Electron.IpcMain.On("ipc-remove-test", _ => fired = true); Electron.IpcMain.RemoveAllListeners("ipc-remove-test"); - await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync("require('electron').ipcRenderer.send('ipc-remove-test','x')"); - await Task.Delay(400); + await this.MainWindow.WebContents.ExecuteJavaScriptAsync("require('electron').ipcRenderer.send('ipc-remove-test','x')"); + await Task.Delay(400.ms()); fired.Should().BeFalse(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Ipc_OnSync_returns_value() { + object received = null; + Electron.IpcMain.OnSync("ipc-sync-test", (obj) => { - obj.Should().NotBeNull(); + received = obj; return "pong"; }); - var ret = await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync("require('electron').ipcRenderer.sendSync('ipc-sync-test','ping')"); + var ret = await this.MainWindow.WebContents.ExecuteJavaScriptAsync("require('electron').ipcRenderer.sendSync('ipc-sync-test','ping')"); + + received.Should().BeOfType(); + received.Should().Be("ping"); + ret.Should().Be("pong"); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Ipc_Send_from_main_reaches_renderer() { // Listener: store raw arg; if Electron packs differently we will normalize later - await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync(@"(function(){ const {ipcRenderer}=require('electron'); ipcRenderer.once('main-to-render',(e,arg)=>{ globalThis.__mainToRender = arg;}); return 'ready'; })();"); - Electron.IpcMain.Send(this.fx.MainWindow, "main-to-render", "hello-msg"); + await this.MainWindow.WebContents.ExecuteJavaScriptAsync(@"(function(){ const {ipcRenderer}=require('electron'); ipcRenderer.once('main-to-render',(e,arg)=>{ globalThis.__mainToRender = arg;}); return 'ready'; })();"); + Electron.IpcMain.Send(this.MainWindow, "main-to-render", "hello-msg"); string value = ""; for (int i = 0; i < 20; i++) { - var jsVal = await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync("globalThis.__mainToRender === undefined ? '' : (typeof globalThis.__mainToRender === 'string' ? globalThis.__mainToRender : JSON.stringify(globalThis.__mainToRender))"); + var jsVal = await this.MainWindow.WebContents.ExecuteJavaScriptAsync("globalThis.__mainToRender === undefined ? '' : (typeof globalThis.__mainToRender === 'string' ? globalThis.__mainToRender : JSON.stringify(globalThis.__mainToRender))"); value = jsVal?.ToString() ?? ""; if (!string.IsNullOrEmpty(value)) { break; } - await Task.Delay(100); + await Task.Delay(100.ms()); } // Normalize possible JSON array ["hello-msg"] case diff --git a/src/ElectronNET.IntegrationTests/Tests/MenuTests.cs b/src/ElectronNET.IntegrationTests/Tests/MenuTests.cs index d40d8984..7c9a900d 100644 --- a/src/ElectronNET.IntegrationTests/Tests/MenuTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/MenuTests.cs @@ -2,17 +2,17 @@ namespace ElectronNET.IntegrationTests.Tests { using ElectronNET.API; using ElectronNET.API.Entities; + using ElectronNET.Common; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class MenuTests + public class MenuTests : IntegrationTestBase { - private readonly ElectronFixture fx; - public MenuTests(ElectronFixture fx) + public MenuTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task ApplicationMenu_click_invokes_handler() { var clicked = false; @@ -29,29 +29,29 @@ public async Task ApplicationMenu_click_invokes_handler() }; Electron.Menu.SetApplicationMenu(items); var targetId = items[0].Submenu[0].Id; - await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync($"require('electron').ipcRenderer.send('integration-click-application-menu','{targetId}')"); + await this.MainWindow.WebContents.ExecuteJavaScriptAsync($"require('electron').ipcRenderer.send('integration-click-application-menu','{targetId}')"); for (int i = 0; i < 20 && !clicked; i++) { - await Task.Delay(100); + await Task.Delay(100.ms()); } clicked.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task ContextMenu_popup_registers_items() { - var win = this.fx.MainWindow; + var win = this.MainWindow; var ctxClicked = false; var ctxItems = new[] { new MenuItem { Label = "Ctx", Click = () => ctxClicked = true } }; Electron.Menu.SetContextMenu(win, ctxItems); var ctxId = ctxItems[0].Id; // simulate popup then click Electron.Menu.ContextMenuPopup(win); - await this.fx.MainWindow.WebContents.ExecuteJavaScriptAsync($"require('electron').ipcRenderer.send('integration-click-context-menu',{win.Id},'{ctxId}')"); + await this.MainWindow.WebContents.ExecuteJavaScriptAsync($"require('electron').ipcRenderer.send('integration-click-context-menu',{win.Id},'{ctxId}')"); for (int i = 0; i < 20 && !ctxClicked; i++) { - await Task.Delay(100); + await Task.Delay(100.ms()); } ctxClicked.Should().BeTrue(); diff --git a/src/ElectronNET.IntegrationTests/Tests/MultiEventRegistrationTests.cs b/src/ElectronNET.IntegrationTests/Tests/MultiEventRegistrationTests.cs index e00c8509..3d4c421b 100644 --- a/src/ElectronNET.IntegrationTests/Tests/MultiEventRegistrationTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/MultiEventRegistrationTests.cs @@ -1,13 +1,12 @@ namespace ElectronNET.IntegrationTests.Tests { + using ElectronNET.IntegrationTests.Common; + [Collection("ElectronCollection")] - public class MultiEventRegistrationTests + public class MultiEventRegistrationTests : IntegrationTestBase { - private readonly ElectronFixture fx; - - public MultiEventRegistrationTests(ElectronFixture fx) + public MultiEventRegistrationTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } private static async Task WaitAllOrTimeout(TimeSpan timeout, params Task[] tasks) @@ -17,10 +16,10 @@ private static async Task WaitAllOrTimeout(TimeSpan timeout, params Task[] return ReferenceEquals(completed, all) && all.IsCompletedSuccessfully; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task BrowserWindow_OnResize_multiple_handlers_called() { - var win = this.fx.MainWindow; + var win = this.MainWindow; var h1 = new TaskCompletionSource(); var h2 = new TaskCompletionSource(); var h3 = new TaskCompletionSource(); @@ -41,10 +40,10 @@ public async Task BrowserWindow_OnResize_multiple_handlers_called() } } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task WebContents_OnDomReady_multiple_handlers_called() { - var wc = this.fx.MainWindow.WebContents; + var wc = this.MainWindow.WebContents; var r1 = new TaskCompletionSource(); var r2 = new TaskCompletionSource(); diff --git a/src/ElectronNET.IntegrationTests/Tests/NativeImageTests.cs b/src/ElectronNET.IntegrationTests/Tests/NativeImageTests.cs index da59c925..e7a09b0c 100644 --- a/src/ElectronNET.IntegrationTests/Tests/NativeImageTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/NativeImageTests.cs @@ -1,15 +1,20 @@ +using System.Drawing; +using ElectronNET.API.Entities; +using ElectronNET.IntegrationTests.Common; using System.Runtime.Versioning; using RectangleEntity = ElectronNET.API.Entities.Rectangle; namespace ElectronNET.IntegrationTests.Tests { - using System.Drawing; - using ElectronNET.API.Entities; - - [SupportedOSPlatform("Windows")] - public class NativeImageTests + [Collection("ElectronCollection")] + [SupportedOSPlatform(Windows)] + public class NativeImageTests : IntegrationTestBase { - [SkippableFact(Timeout = 20000)] + public NativeImageTests(ElectronFixture fx) : base(fx) + { + } + + [IntegrationFact] public async Task Create_from_bitmap_and_to_png() { using var bmp = new Bitmap(10, 10); @@ -27,7 +32,7 @@ public async Task Create_from_bitmap_and_to_png() png!.Length.Should().BeGreaterThan(0); } - [SkippableFact(Timeout = 20000)] + [IntegrationFact] public async Task Create_from_buffer_and_to_data_url() { // Prepare PNG bytes @@ -46,7 +51,7 @@ public async Task Create_from_buffer_and_to_data_url() dataUrl!.StartsWith("data:image/", StringComparison.Ordinal).Should().BeTrue(); } - [SkippableFact(Timeout = 20000)] + [IntegrationFact] public async Task Resize_and_crop_produce_expected_sizes() { using var bmp = new Bitmap(12, 10); @@ -66,7 +71,7 @@ public async Task Resize_and_crop_produce_expected_sizes() csize.Height.Should().Be(3); } - [SkippableFact(Timeout = 20000)] + [IntegrationFact] public async Task Add_representation_for_scale_factor() { using var bmp = new Bitmap(5, 5); diff --git a/src/ElectronNET.IntegrationTests/Tests/NativeThemeTests.cs b/src/ElectronNET.IntegrationTests/Tests/NativeThemeTests.cs index f6b8f5ce..9e9bb615 100644 --- a/src/ElectronNET.IntegrationTests/Tests/NativeThemeTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/NativeThemeTests.cs @@ -1,26 +1,37 @@ namespace ElectronNET.IntegrationTests.Tests { + using System.Runtime.Versioning; using ElectronNET.API; using ElectronNET.API.Entities; + using ElectronNET.Common; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class NativeThemeTests + public class NativeThemeTests : IntegrationTestBase { - [Fact(Timeout = 20000)] + public NativeThemeTests(ElectronFixture fx) : base(fx) + { + } + + [IntegrationFact] public async Task ThemeSource_roundtrip() { // Capture initial _ = await Electron.NativeTheme.ShouldUseDarkColorsAsync(); // Force light + await Task.Delay(50.ms()); Electron.NativeTheme.SetThemeSource(ThemeSourceMode.Light); + await Task.Delay(500.ms()); var useDarkAfterLight = await Electron.NativeTheme.ShouldUseDarkColorsAsync(); var themeSourceLight = await Electron.NativeTheme.GetThemeSourceAsync(); // Force dark Electron.NativeTheme.SetThemeSource(ThemeSourceMode.Dark); + await Task.Delay(500.ms()); var useDarkAfterDark = await Electron.NativeTheme.ShouldUseDarkColorsAsync(); var themeSourceDark = await Electron.NativeTheme.GetThemeSourceAsync(); // Restore system Electron.NativeTheme.SetThemeSource(ThemeSourceMode.System); + await Task.Delay(500.ms()); var themeSourceSystem = await Electron.NativeTheme.GetThemeSourceAsync(); // Assertions are tolerant (platform dependent) useDarkAfterLight.Should().BeFalse("forcing Light should result in light colors"); @@ -30,34 +41,38 @@ public async Task ThemeSource_roundtrip() themeSourceSystem.Should().Be(ThemeSourceMode.System); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Updated_event_fires_on_change() { var fired = false; Electron.NativeTheme.Updated += () => fired = true; Electron.NativeTheme.SetThemeSource(ThemeSourceMode.Dark); - await Task.Delay(400); + await Task.Delay(400.ms()); Electron.NativeTheme.SetThemeSource(ThemeSourceMode.Light); for (int i = 0; i < 10 && !fired; i++) { - await Task.Delay(100); + await Task.Delay(100.ms()); } fired.Should().BeTrue(); } - - [Fact(Timeout = 20000)] + + [IntegrationFact] + [SupportedOSPlatform(MacOS)] + [SupportedOSPlatform(Windows)] public async Task Should_use_high_contrast_colors_check() { var metrics = await Electron.NativeTheme.ShouldUseHighContrastColorsAsync(); metrics.Should().Be(false); } - - [Fact(Timeout = 20000)] + + [IntegrationFact] + [SupportedOSPlatform(MacOS)] + [SupportedOSPlatform(Windows)] public async Task Should_use_inverted_colors_check() { var metrics = await Electron.NativeTheme.ShouldUseInvertedColorSchemeAsync(); metrics.Should().Be(false); } } -} \ No newline at end of file +} diff --git a/src/ElectronNET.IntegrationTests/Tests/NotificationTests.cs b/src/ElectronNET.IntegrationTests/Tests/NotificationTests.cs index c192dcea..9f8772f4 100644 --- a/src/ElectronNET.IntegrationTests/Tests/NotificationTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/NotificationTests.cs @@ -1,29 +1,42 @@ namespace ElectronNET.IntegrationTests.Tests { + using System.Runtime.InteropServices; using ElectronNET.API; using ElectronNET.API.Entities; + using ElectronNET.Common; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class NotificationTests + public class NotificationTests : IntegrationTestBase { - [Fact(Timeout = 20000)] + public NotificationTests(ElectronFixture fx) : base(fx) + { + } + + [IntegrationFact] public async Task Notification_create_check() { + Skip.If(RuntimeInformation.IsOSPlatform(OSPlatform.Linux), "Always returns false. Might need full-blown desktop environment"); + var tcs = new TaskCompletionSource(); var options = new NotificationOptions("Notification Title", "Notification test 123"); options.OnShow = () => tcs.SetResult(); + await Task.Delay(500.ms()); + Electron.Notification.Show(options); - await Task.WhenAny(tcs.Task, Task.Delay(5_000)); + await Task.WhenAny(tcs.Task, Task.Delay(5.seconds())); tcs.Task.IsCompletedSuccessfully.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Notification_is_supported_check() { + Skip.If(RuntimeInformation.IsOSPlatform(OSPlatform.Linux), "Always returns false. Might need full-blown desktop environment"); + var supported = await Electron.Notification.IsSupportedAsync(); supported.Should().BeTrue(); } diff --git a/src/ElectronNET.IntegrationTests/Tests/ProcessTests.cs b/src/ElectronNET.IntegrationTests/Tests/ProcessTests.cs index d581c3b4..f5a9f485 100644 --- a/src/ElectronNET.IntegrationTests/Tests/ProcessTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/ProcessTests.cs @@ -1,59 +1,62 @@ namespace ElectronNET.IntegrationTests.Tests { using ElectronNET.API; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class ProcessTests + public class ProcessTests : IntegrationTestBase { - [Fact(Timeout = 20000)] + public ProcessTests(ElectronFixture fx) : base(fx) + { + } + + [IntegrationFact] public async Task Process_info_is_accessible() { // Use renderer to fetch process info and round-trip - var execPath = await Electron.WindowManager.CreateWindowAsync(new API.Entities.BrowserWindowOptions { Show = false }); + var execPath = await Electron.WindowManager.CreateWindowAsync(new API.Entities.BrowserWindowOptions { Show = false }, "about:blank"); var result = await execPath.WebContents.ExecuteJavaScriptAsync("process.execPath && process.platform ? 'ok' : 'fail'"); result.Should().Be("ok"); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Process_properties_are_populated() { var execPath = await Electron.Process.ExecPathAsync; execPath.Should().NotBeNullOrWhiteSpace(); - + var pid = await Electron.Process.PidAsync; pid.Should().BeGreaterThan(0); - + var platform = await Electron.Process.PlatformAsync; platform.Should().NotBeNullOrWhiteSpace(); - + var argv = await Electron.Process.ArgvAsync; argv.Should().NotBeNull(); argv.Length.Should().BeGreaterThan(0); - + var type = await Electron.Process.TypeAsync; type.Should().NotBeNullOrWhiteSpace(); - + var version = await Electron.Process.VersionsAsync; version.Should().NotBeNull(); version.Chrome.Should().NotBeNullOrWhiteSpace(); version.Electron.Should().NotBeNullOrWhiteSpace(); - + var defaultApp = await Electron.Process.DefaultAppAsync; defaultApp.Should().BeTrue(); - + var isMainFrame = await Electron.Process.IsMainFrameAsync; isMainFrame.Should().BeFalse(); - + var resourcePath = await Electron.Process.ResourcesPathAsync; resourcePath.Should().NotBeNullOrWhiteSpace(); var upTime = await Electron.Process.UpTimeAsync; upTime.Should().BeGreaterThan(0); - + var arch = await Electron.Process.ArchAsync; arch.Should().NotBeNullOrWhiteSpace(); - } - } } \ No newline at end of file diff --git a/src/ElectronNET.IntegrationTests/Tests/ScreenTests.cs b/src/ElectronNET.IntegrationTests/Tests/ScreenTests.cs index 1cdb5347..1ccf1f8b 100644 --- a/src/ElectronNET.IntegrationTests/Tests/ScreenTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/ScreenTests.cs @@ -1,21 +1,18 @@ -using ElectronNET.API.Entities; - namespace ElectronNET.IntegrationTests.Tests { + using System.Runtime.Versioning; using ElectronNET.API; + using ElectronNET.API.Entities; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class ScreenTests + public class ScreenTests : IntegrationTestBase { - // ReSharper disable once NotAccessedField.Local - private readonly ElectronFixture fx; - - public ScreenTests(ElectronFixture fx) + public ScreenTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact(SkipOnWsl = true)] public async Task Primary_display_has_positive_dimensions() { var display = await Electron.Screen.GetPrimaryDisplayAsync(); @@ -23,7 +20,7 @@ public async Task Primary_display_has_positive_dimensions() display.Size.Height.Should().BeGreaterThan(0); } - [Fact(Timeout = 20000)] + [IntegrationFact(SkipOnWsl = true)] public async Task GetAllDisplays_returns_at_least_one() { var displays = await Electron.Screen.GetAllDisplaysAsync(); @@ -31,16 +28,15 @@ public async Task GetAllDisplays_returns_at_least_one() displays.Length.Should().BeGreaterThan(0); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task GetCursorScreenPoint_check() { var point = await Electron.Screen.GetCursorScreenPointAsync(); point.Should().NotBeNull(); - point.X.Should().BeGreaterThanOrEqualTo(0); - point.Y.Should().BeGreaterThanOrEqualTo(0); } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(MacOS)] public async Task GetMenuBarWorkArea_check() { var area = await Electron.Screen.GetMenuBarWorkAreaAsync(); @@ -51,7 +47,7 @@ public async Task GetMenuBarWorkArea_check() area.Width.Should().BeGreaterThan(0); } - [Fact(Timeout = 20000)] + [IntegrationFact(SkipOnWsl = true)] public async Task GetDisplayNearestPoint_check() { var point = new Point @@ -64,8 +60,8 @@ public async Task GetDisplayNearestPoint_check() display.Size.Width.Should().BeGreaterThan(0); display.Size.Height.Should().BeGreaterThan(0); } - - [Fact(Timeout = 20000)] + + [IntegrationFact(SkipOnWsl = true)] public async Task GetDisplayMatching_check() { var rectangle = new Rectangle @@ -81,4 +77,4 @@ public async Task GetDisplayMatching_check() display.Size.Height.Should().BeGreaterThan(0); } } -} \ No newline at end of file +} diff --git a/src/ElectronNET.IntegrationTests/Tests/SessionTests.cs b/src/ElectronNET.IntegrationTests/Tests/SessionTests.cs index 50243a97..53dad7bb 100644 --- a/src/ElectronNET.IntegrationTests/Tests/SessionTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/SessionTests.cs @@ -1,21 +1,19 @@ namespace ElectronNET.IntegrationTests.Tests { using ElectronNET.API.Entities; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class SessionTests + public class SessionTests : IntegrationTestBase { - private readonly ElectronFixture fx; - - public SessionTests(ElectronFixture fx) + public SessionTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Session_preloads_roundtrip() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; _ = await session.GetPreloadsAsync(); // Use a dummy path; API should store value session.SetPreloads(new[] { "/tmp/preload_dummy.js" }); @@ -23,10 +21,10 @@ public async Task Session_preloads_roundtrip() preloadsAfter.Should().Contain("/tmp/preload_dummy.js"); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Session_proxy_set_and_resolve() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; // Provide all ctor args (pacScript empty to ignore, proxyRules direct, bypass empty) await session.SetProxyAsync(new ProxyConfig("", "direct://", "")); var proxy = await session.ResolveProxyAsync("https://example.com"); @@ -34,10 +32,10 @@ public async Task Session_proxy_set_and_resolve() } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Session_clear_cache_and_storage_completes() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; await session.ClearCacheAsync(); await session.ClearStorageDataAsync(); await session.ClearHostResolverCacheAsync(); @@ -46,10 +44,10 @@ public async Task Session_clear_cache_and_storage_completes() ua.Should().NotBeNullOrWhiteSpace(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Session_preloads_set_multiple_and_clear() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; session.SetPreloads(new[] { "/tmp/a.js", "/tmp/b.js" }); var after = await session.GetPreloadsAsync(); after.Should().Contain("/tmp/a.js").And.Contain("/tmp/b.js"); @@ -59,40 +57,40 @@ public async Task Session_preloads_set_multiple_and_clear() empty.Should().NotContain("/tmp/a.js"); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Clear_auth_cache_overloads() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; await session.ClearAuthCacheAsync(); await session.ClearAuthCacheAsync(new RemovePassword("password") { Origin = "https://example.com", Username = "user", Password = "pw", Realm = "realm", Scheme = Scheme.basic }); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Clear_storage_with_options() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; await session.ClearStorageDataAsync(new ClearStorageDataOptions { Storages = new[] { "cookies" }, Quotas = new[] { "temporary" } }); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Enable_disable_network_emulation() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; session.EnableNetworkEmulation(new EnableNetworkEmulationOptions { Offline = false, Latency = 10, DownloadThroughput = 50000, UploadThroughput = 20000 }); session.DisableNetworkEmulation(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Flush_storage_data_does_not_throw() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; session.FlushStorageData(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Set_user_agent_affects_new_navigation() { - var session = this.fx.MainWindow.WebContents.Session; + var session = this.MainWindow.WebContents.Session; // Set UA and verify via session API (navigator.userAgent on existing WebContents may not reflect the override) session.SetUserAgent("IntegrationAgent/1.0"); var ua = await session.GetUserAgent(); diff --git a/src/ElectronNET.IntegrationTests/Tests/ShellTests.cs b/src/ElectronNET.IntegrationTests/Tests/ShellTests.cs index e81c762c..3a71ad8e 100644 --- a/src/ElectronNET.IntegrationTests/Tests/ShellTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/ShellTests.cs @@ -1,11 +1,16 @@ namespace ElectronNET.IntegrationTests.Tests { using ElectronNET.API; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class ShellTests + public class ShellTests : IntegrationTestBase { - [Fact(Timeout = 20000)] + public ShellTests(ElectronFixture fx) : base(fx) + { + } + + [IntegrationFact(Skip = "This can keep the test process hanging until the e-mail window is closed")] public async Task OpenExternal_invalid_scheme_returns_error_or_empty() { var error = await Electron.Shell.OpenExternalAsync("mailto:test@example.com"); diff --git a/src/ElectronNET.IntegrationTests/Tests/ThumbarButtonTests.cs b/src/ElectronNET.IntegrationTests/Tests/ThumbarButtonTests.cs index 2ba58b14..fbbd6981 100644 --- a/src/ElectronNET.IntegrationTests/Tests/ThumbarButtonTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/ThumbarButtonTests.cs @@ -1,34 +1,29 @@ namespace ElectronNET.IntegrationTests.Tests { - using System.Runtime.InteropServices; + using System.Runtime.Versioning; using ElectronNET.API.Entities; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class ThumbarButtonTests + public class ThumbarButtonTests : IntegrationTestBase { - private readonly ElectronFixture fx; - - public ThumbarButtonTests(ElectronFixture fx) + public ThumbarButtonTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(Windows)] public async Task SetThumbarButtons_returns_success() { var btn = new ThumbarButton("icon.png") { Tooltip = "Test" }; - var success = await this.fx.MainWindow.SetThumbarButtonsAsync(new[] { btn }); + var success = await this.MainWindow.SetThumbarButtonsAsync(new[] { btn }); success.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] + [SupportedOSPlatform(Windows)] public async Task Thumbar_button_click_invokes_callback() { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - return; // only meaningful on Windows taskbar - } - var icon = Path.Combine(Directory.GetCurrentDirectory(), "ElectronNET.WebApp", "wwwroot", "icon.png"); if (!File.Exists(icon)) { @@ -37,8 +32,8 @@ public async Task Thumbar_button_click_invokes_callback() var tcs = new TaskCompletionSource(); var btn = new ThumbarButton(icon) { Tooltip = "Test", Flags = new[] { ThumbarButtonFlag.enabled }, Click = () => tcs.TrySetResult(true) }; - var ok = await this.fx.MainWindow.SetThumbarButtonsAsync(new[] { btn }); + var ok = await this.MainWindow.SetThumbarButtonsAsync(new[] { btn }); ok.Should().BeTrue(); } } -} \ No newline at end of file +} diff --git a/src/ElectronNET.IntegrationTests/Tests/TrayTests.cs b/src/ElectronNET.IntegrationTests/Tests/TrayTests.cs index c52a9137..324534e2 100644 --- a/src/ElectronNET.IntegrationTests/Tests/TrayTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/TrayTests.cs @@ -1,18 +1,16 @@ namespace ElectronNET.IntegrationTests.Tests { using ElectronNET.API; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class TrayTests + public class TrayTests : IntegrationTestBase { - // ReSharper disable once NotAccessedField.Local - private readonly ElectronFixture fx; - public TrayTests(ElectronFixture fx) + public TrayTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_create_tray_and_destroy() { //await Electron.Tray.Show("assets/icon.png"); diff --git a/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs b/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs index c7bdde7a..7afae016 100644 --- a/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs +++ b/src/ElectronNET.IntegrationTests/Tests/WebContentsTests.cs @@ -1,55 +1,57 @@ +using System.Runtime.InteropServices; + namespace ElectronNET.IntegrationTests.Tests { + using ElectronNET.API; using ElectronNET.API.Entities; + using ElectronNET.Common; + using ElectronNET.IntegrationTests.Common; [Collection("ElectronCollection")] - public class WebContentsTests + public class WebContentsTests : IntegrationTestBase { - private readonly ElectronFixture fx; - - public WebContentsTests(ElectronFixture fx) + public WebContentsTests(ElectronFixture fx) : base(fx) { - this.fx = fx; } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_get_url_after_navigation() { - var wc = this.fx.MainWindow.WebContents; + var wc = this.MainWindow.WebContents; await wc.LoadURLAsync("https://example.com"); var url = await wc.GetUrl(); url.Should().Contain("example.com"); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task ExecuteJavaScript_returns_title() { - var wc = this.fx.MainWindow.WebContents; + var wc = this.MainWindow.WebContents; await wc.LoadURLAsync("https://example.com"); var title = await wc.ExecuteJavaScriptAsync("document.title"); title.Should().NotBeNull(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task DomReady_event_fires() { - var wc = this.fx.MainWindow.WebContents; + var wc = this.MainWindow.WebContents; var fired = false; wc.OnDomReady += () => fired = true; await wc.LoadURLAsync("https://example.com"); - await Task.Delay(500); + await Task.Delay(500.ms()); fired.Should().BeTrue(); } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_print_to_pdf() { var html = "data:text/html,

PDF Test

Electron.NET

"; - await this.fx.MainWindow.WebContents.LoadURLAsync(html); + await this.MainWindow.WebContents.LoadURLAsync(html); var tmp = Path.Combine(Path.GetTempPath(), $"electronnet_pdf_{Guid.NewGuid():N}.pdf"); try { - var ok = await this.fx.MainWindow.WebContents.PrintToPDFAsync(tmp); + var ok = await this.MainWindow.WebContents.PrintToPDFAsync(tmp); ok.Should().BeTrue(); File.Exists(tmp).Should().BeTrue(); new FileInfo(tmp).Length.Should().BeGreaterThan(0); @@ -63,21 +65,131 @@ public async Task Can_print_to_pdf() } } - [Fact(Timeout = 20000)] + [IntegrationFact] public async Task Can_basic_print() { var html = "data:text/html,

Print Test

"; - await this.fx.MainWindow.WebContents.LoadURLAsync(html); - var ok = await this.fx.MainWindow.WebContents.PrintAsync(new PrintOptions { Silent = true, PrintBackground = true }); + await this.MainWindow.WebContents.LoadURLAsync(html); + var ok = await this.MainWindow.WebContents.PrintAsync(new PrintOptions { Silent = true, PrintBackground = true }); ok.Should().BeTrue(); } - - [SkippableFact(Timeout = 20000)] + + [IntegrationFact] public async Task GetPrintersAsync_check() { - Skip.If(Environment.GetEnvironmentVariable("GITHUB_TOKEN") != null, "Skipping printer test in CI environment."); - var info = await fx.MainWindow.WebContents.GetPrintersAsync(); + var info = await this.MainWindow.WebContents.GetPrintersAsync(); info.Should().NotBeNull(); } + + [IntegrationFact] + public async Task GetSetZoomFactor_check() + { + await this.MainWindow.WebContents.GetZoomFactorAsync(); + var ok = await this.MainWindow.WebContents.GetZoomFactorAsync(); + ok.Should().BeGreaterThan(0.0); + this.MainWindow.WebContents.SetZoomFactor(2.0); + await Task.Delay(500.ms()); + ok = await this.MainWindow.WebContents.GetZoomFactorAsync(); + ok.Should().Be(2.0); + } + + [IntegrationFact] + public async Task GetSetZoomLevel_check() + { + BrowserWindow window = null; + + try + { + window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true }, "about:blank"); + + await Task.Delay(100.ms()); + + window.WebContents.SetZoomLevel(0); + await Task.Delay(500.ms()); + + var ok = await window.WebContents.GetZoomLevelAsync(); + ok.Should().Be(0); + + window.WebContents.SetZoomLevel(2); + await Task.Delay(500.ms()); + + ok = await window.WebContents.GetZoomLevelAsync(); + ok.Should().Be(2); + } + finally + { + window?.Destroy(); + } + } + + [IntegrationFact] + public async Task DevTools_check() + { + BrowserWindow window = null; + + try + { + window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true }, "about:blank"); + + await Task.Delay(3.seconds()); + + window.WebContents.IsDevToolsOpened().Should().BeFalse(); + window.WebContents.OpenDevTools(); + await Task.Delay(5.seconds()); + + window.WebContents.IsDevToolsOpened().Should().BeTrue(); + window.WebContents.CloseDevTools(); + await Task.Delay(2.seconds()); + + window.WebContents.IsDevToolsOpened().Should().BeFalse(); + } + finally + { + window?.Destroy(); + } + } + + [IntegrationFact] + public async Task GetSetAudioMuted_check() + { + this.MainWindow.WebContents.SetAudioMuted(true); + await Task.Delay(500.ms()); + var ok = await this.MainWindow.WebContents.IsAudioMutedAsync(); + ok.Should().BeTrue(); + this.MainWindow.WebContents.SetAudioMuted(false); + await Task.Delay(500.ms()); + ok = await this.MainWindow.WebContents.IsAudioMutedAsync(); + ok.Should().BeFalse(); + + // Assuming no audio is playing, IsCurrentlyAudibleAsync should return false + // there is no way to play audio in this test + ok = await this.MainWindow.WebContents.IsCurrentlyAudibleAsync(); + ok.Should().BeFalse(); + } + + [IntegrationFact] + public async Task GetSetUserAgent_check() + { + BrowserWindow window = null; + + try + { + window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = true }, "about:blank"); + + await Task.Delay(3.seconds()); + + window.WebContents.SetUserAgent("MyUserAgent/1.0"); + + await Task.Delay(1.seconds()); + + var ok = await window.WebContents.GetUserAgentAsync(); + ok.Should().Be("MyUserAgent/1.0"); + } + finally + { + window?.Destroy(); + } + } + } } \ No newline at end of file diff --git a/src/ElectronNET.IntegrationTests/xunit.runner.json b/src/ElectronNET.IntegrationTests/xunit.runner.json new file mode 100644 index 00000000..9283731d --- /dev/null +++ b/src/ElectronNET.IntegrationTests/xunit.runner.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", + "methodDisplay": "method", + "diagnosticMessages": true, + "parallelizeTestCollections": false, + "longRunningTestSeconds": 60 +} diff --git a/src/ElectronNET.Samples.ElectronHostHook/Controllers/HomeController.cs b/src/ElectronNET.Samples.ElectronHostHook/Controllers/HomeController.cs new file mode 100644 index 00000000..f71aadb0 --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/Controllers/HomeController.cs @@ -0,0 +1,22 @@ +using ElectronNET.API; +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; + +namespace ElectronNET.Samples.ElectronHostHook.Controllers +{ + public class HomeController : Controller + { + public async Task Index() + { + string message = "Electron not active"; + if (HybridSupport.IsElectronActive) + { + // Call the HostHook defined in ElectronHostHook/index.ts + var result = await Electron.HostHook.CallAsync("ping", "Hello from C#"); + message = $"Sent 'Hello from C#', Received: '{result}'"; + } + + return View("Index", message); + } + } +} diff --git a/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/.gitignore b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/.gitignore new file mode 100644 index 00000000..984dc924 --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/.gitignore @@ -0,0 +1,3 @@ +node_modules +*.js +*.js.map diff --git a/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/connector.ts b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/connector.ts new file mode 100644 index 00000000..295ba95f --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/connector.ts @@ -0,0 +1,21 @@ +import { Socket } from "socket.io"; + +export class Connector { + constructor(private socket: Socket, public app: any) { + } + + on(key: string, javaScriptCode: Function): void { + this.socket.on(key, (...args: any[]) => { + const id: string = args.pop(); + try { + javaScriptCode(...args, (data) => { + if (data) { + this.socket.emit(`${key}Complete${id}`, data); + } + }); + } catch (error) { + this.socket.emit(`${key}Error${id}`, `Host Hook Exception`, error); + } + }); + } +} diff --git a/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/index.ts b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/index.ts new file mode 100644 index 00000000..54b69c97 --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/index.ts @@ -0,0 +1,16 @@ +import { Connector } from "./connector"; +import { Socket } from "socket.io"; + +export class HookService extends Connector { + constructor(socket: Socket, public app: any) { + super(socket, app); + } + + onHostReady(): void { + // execute your own JavaScript Host logic here + this.on("ping", (msg, done) => { + console.log("Received ping from C#:", msg); + done("pong: " + msg); + }); + } +} diff --git a/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/package.json b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/package.json new file mode 100644 index 00000000..069cbac2 --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/package.json @@ -0,0 +1,12 @@ +{ + "name": "electron-host-hook", + "version": "1.0.0", + "description": "Connector for Electron.NET projects.", + "main": "index.js", + "dependencies": { + "socket.io": "^4.8.1" + }, + "devDependencies": { + "typescript": "^5.9.3" + } +} diff --git a/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/tsconfig.json b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/tsconfig.json new file mode 100644 index 00000000..db8ccccd --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/ElectronHostHook/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "ES2019", + "sourceMap": true, + "skipLibCheck": true + }, + "exclude": ["node_modules"] +} diff --git a/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj b/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj new file mode 100644 index 00000000..802cdab6 --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/ElectronNET.Samples.ElectronHostHook.csproj @@ -0,0 +1,36 @@ + + + true + + + + + + net10.0 + OutOfProcess + AspNetCoreModule + false + commonjs + true + ElectronHostHook/tsconfig.json + true + true + + + + + + + + + + + + + + + + + + + diff --git a/src/ElectronNET.Samples.ElectronHostHook/Program.cs b/src/ElectronNET.Samples.ElectronHostHook/Program.cs new file mode 100644 index 00000000..c3825ed5 --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/Program.cs @@ -0,0 +1,33 @@ +using ElectronNET.API; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; + +namespace ElectronNET.Samples.ElectronHostHook +{ + public class Program + { + public static void Main(string[] args) + { + var builder = WebApplication.CreateBuilder(args); + + builder.WebHost.UseElectron(args, async () => + { + var window = await Electron.WindowManager.CreateWindowAsync(); + }); + + builder.Services.AddElectron(); + builder.Services.AddControllersWithViews(); + + var app = builder.Build(); + + app.UseStaticFiles(); + app.UseRouting(); + + app.MapControllerRoute( + name: "default", + pattern: "{controller=Home}/{action=Index}/{id?}"); + + app.Run(); + } + } +} diff --git a/src/ElectronNET.Samples.ElectronHostHook/Properties/launchSettings.json b/src/ElectronNET.Samples.ElectronHostHook/Properties/launchSettings.json new file mode 100644 index 00000000..d4c4b1eb --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "ElectronNET.Samples.ElectronHostHook": { + "commandName": "Project", + "launchBrowser": false, + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/src/ElectronNET.Samples.ElectronHostHook/Views/Home/Index.cshtml b/src/ElectronNET.Samples.ElectronHostHook/Views/Home/Index.cshtml new file mode 100644 index 00000000..f0f3be97 --- /dev/null +++ b/src/ElectronNET.Samples.ElectronHostHook/Views/Home/Index.cshtml @@ -0,0 +1,25 @@ +@model string +@{ + Layout = null; +} + + + + + + + ElectronHostHook Sample + + + +

ElectronHostHook Sample

+

This sample demonstrates bidirectional communication between C# and the Electron Host process.

+ +
+ Result: @Model +
+ + diff --git a/src/ElectronNET.WebApp/Controllers/HomeController.cs b/src/ElectronNET.WebApp/Controllers/HomeController.cs index e4dfa304..45c4d875 100644 --- a/src/ElectronNET.WebApp/Controllers/HomeController.cs +++ b/src/ElectronNET.WebApp/Controllers/HomeController.cs @@ -10,38 +10,22 @@ public IActionResult Index() { if (HybridSupport.IsElectronActive) { - Electron.PowerMonitor.OnLockScreen += () => + if (OperatingSystem.IsMacOS() || OperatingSystem.IsWindows()) { - Console.WriteLine("Screen Locked detected from C#"); - }; + Electron.PowerMonitor.OnLockScreen += () => { Console.WriteLine("Screen Locked detected from C#"); }; - Electron.PowerMonitor.OnUnLockScreen += () => - { - Console.WriteLine("Screen unlocked detected from C# "); - }; + Electron.PowerMonitor.OnUnLockScreen += () => { Console.WriteLine("Screen unlocked detected from C# "); }; - Electron.PowerMonitor.OnSuspend += () => - { - Console.WriteLine("The system is going to sleep"); - }; + Electron.PowerMonitor.OnSuspend += () => { Console.WriteLine("The system is going to sleep"); }; - Electron.PowerMonitor.OnResume += () => - { - Console.WriteLine("The system is resuming"); - }; + Electron.PowerMonitor.OnResume += () => { Console.WriteLine("The system is resuming"); }; - Electron.PowerMonitor.OnAC += () => - { - Console.WriteLine("The system changes to AC power"); - }; - - Electron.PowerMonitor.OnBattery += () => - { - Console.WriteLine("The system is about to change to battery power"); - }; + Electron.PowerMonitor.OnAC += () => { Console.WriteLine("The system changes to AC power"); }; + Electron.PowerMonitor.OnBattery += () => { Console.WriteLine("The system is about to change to battery power"); }; + } } - + return View(); } } diff --git a/src/ElectronNET.WebApp/Controllers/HostHookController.cs b/src/ElectronNET.WebApp/Controllers/HostHookController.cs index bfc5291f..db7a52e6 100644 --- a/src/ElectronNET.WebApp/Controllers/HostHookController.cs +++ b/src/ElectronNET.WebApp/Controllers/HostHookController.cs @@ -16,7 +16,7 @@ public IActionResult Index() var mainWindow = Electron.WindowManager.BrowserWindows.First(); var options = new OpenDialogOptions { - Properties = new OpenDialogProperty[] + Properties = new OpenDialogProperty[] { OpenDialogProperty.openDirectory } diff --git a/src/ElectronNET.WebApp/Controllers/UpdateController.cs b/src/ElectronNET.WebApp/Controllers/UpdateController.cs index 1f2c8919..e145ec77 100644 --- a/src/ElectronNET.WebApp/Controllers/UpdateController.cs +++ b/src/ElectronNET.WebApp/Controllers/UpdateController.cs @@ -31,7 +31,7 @@ public IActionResult Index() { // Electron.NET CLI Command for deploy: // electronize build /target win /electron-params --publish=always - + var currentVersion = await Electron.App.GetVersionAsync(); var updateCheckResult = await Electron.AutoUpdater.CheckForUpdatesAndNotifyAsync(); var availableVersion = updateCheckResult.UpdateInfo.Version; diff --git a/src/ElectronNET.WebApp/ElectronHostHook/connector.ts b/src/ElectronNET.WebApp/ElectronHostHook/connector.ts index 7ba9c0b3..55125575 100644 --- a/src/ElectronNET.WebApp/ElectronHostHook/connector.ts +++ b/src/ElectronNET.WebApp/ElectronHostHook/connector.ts @@ -1,7 +1,7 @@ import { Socket } from 'socket.io'; -export class Connector { - constructor(private socket: Socket, +export class Connector { + constructor(private socket: Socket, public app: any) { } on(key: string, javaScriptCode: Function): void { diff --git a/src/ElectronNET.WebApp/ElectronHostHook/package-lock.json b/src/ElectronNET.WebApp/ElectronHostHook/package-lock.json index 289cba32..4582c86f 100644 --- a/src/ElectronNET.WebApp/ElectronHostHook/package-lock.json +++ b/src/ElectronNET.WebApp/ElectronHostHook/package-lock.json @@ -1269,9 +1269,9 @@ "dev": true }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "dependencies": { "argparse": "^2.0.1" @@ -3017,9 +3017,9 @@ "dev": true }, "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "requires": { "argparse": "^2.0.1" diff --git a/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj b/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj index 15a0acc1..65a7cbb5 100644 --- a/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj +++ b/src/ElectronNET.WebApp/ElectronNET.WebApp.csproj @@ -5,10 +5,10 @@ true - + - net8.0 + net10.0 OutOfProcess AspNetCoreModule @@ -42,6 +42,11 @@ true ElectronHostHook/tsconfig.json + + true + true + disable + @@ -71,11 +76,11 @@ - - + + - + \ No newline at end of file diff --git a/src/ElectronNET.WebApp/Program.cs b/src/ElectronNET.WebApp/Program.cs index 9adf2ea0..d3a36968 100644 --- a/src/ElectronNET.WebApp/Program.cs +++ b/src/ElectronNET.WebApp/Program.cs @@ -55,39 +55,42 @@ private static void AddDevelopmentTests() }); }); - Electron.Dock.SetMenu(new[] + if (System.OperatingSystem.IsMacOS()) { - new MenuItem + Electron.Dock.SetMenu(new[] { - Type = MenuType.normal, - Label = "MenuItem", - Click = () => + new MenuItem { - Electron.Notification.Show(new NotificationOptions( - "Dock MenuItem Click", - "A menu item added to the Dock was selected;")); + Type = MenuType.normal, + Label = "MenuItem", + Click = () => + { + Electron.Notification.Show(new NotificationOptions( + "Dock MenuItem Click", + "A menu item added to the Dock was selected;")); + }, }, - }, - new MenuItem - { - Type = MenuType.submenu, - Label = "SubMenu", - Submenu = new[] + new MenuItem { - new MenuItem + Type = MenuType.submenu, + Label = "SubMenu", + Submenu = new[] { - Type = MenuType.normal, - Label = "Sub MenuItem", - Click = () => + new MenuItem { - Electron.Notification.Show(new NotificationOptions( - "Dock Sub MenuItem Click", - "A menu item added to the Dock was selected;")); + Type = MenuType.normal, + Label = "Sub MenuItem", + Click = () => + { + Electron.Notification.Show(new NotificationOptions( + "Dock Sub MenuItem Click", + "A menu item added to the Dock was selected;")); + }, }, - }, + } } - } - }); + }); + } } } } diff --git a/src/ElectronNET.WebApp/Properties/PublishProfiles/linux-x64.pubxml b/src/ElectronNET.WebApp/Properties/PublishProfiles/linux-x64.pubxml index 3c9c8310..770648d1 100644 --- a/src/ElectronNET.WebApp/Properties/PublishProfiles/linux-x64.pubxml +++ b/src/ElectronNET.WebApp/Properties/PublishProfiles/linux-x64.pubxml @@ -11,7 +11,7 @@ FileSystem <_TargetId>Folder - net8.0 + net10.0 linux-x64 6ea447d9-343f-46b8-b456-66557bddbb9f true diff --git a/src/ElectronNET.WebApp/Properties/PublishProfiles/win-x64.pubxml b/src/ElectronNET.WebApp/Properties/PublishProfiles/win-x64.pubxml index 04d7a390..874b3803 100644 --- a/src/ElectronNET.WebApp/Properties/PublishProfiles/win-x64.pubxml +++ b/src/ElectronNET.WebApp/Properties/PublishProfiles/win-x64.pubxml @@ -11,7 +11,7 @@ FileSystem <_TargetId>Folder - net8.0 + net10.0 win-x64 6ea447d9-343f-46b8-b456-66557bddbb9f true diff --git a/src/ElectronNET.sln b/src/ElectronNET.sln index 3f46f97b..eb20f10e 100644 --- a/src/ElectronNET.sln +++ b/src/ElectronNET.sln @@ -1,38 +1,20 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.12.35707.178 +# Visual Studio Version 18 +VisualStudioVersion = 18.0.11205.157 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronNET.WebApp", "ElectronNET.WebApp\ElectronNET.WebApp.csproj", "{7C048379-401C-4345-B5E7-BE232DEA8157}" + ProjectSection(ProjectDependencies) = postProject + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} = {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} + {8860606D-6847-F22A-5AED-DF4E0984DD24} = {8860606D-6847-F22A-5AED-DF4E0984DD24} + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronNET.API", "ElectronNET.API\ElectronNET.API.csproj", "{A78157BA-B754-45F1-969F-D6A513CA0E72}" EndProject -Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "ElectronNET.Host", "ElectronNET.Host\", "{B33E9B82-B6B4-4DB0-B6EE-61CC34641518}" - ProjectSection(WebsiteProperties) = preProject - TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.8" - Debug.AspNetCompiler.VirtualPath = "/localhost_56840" - Debug.AspNetCompiler.PhysicalPath = "ElectronNET.Host\" - Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_56840\" - Debug.AspNetCompiler.Updateable = "true" - Debug.AspNetCompiler.ForceOverwrite = "true" - Debug.AspNetCompiler.FixedNames = "false" - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.VirtualPath = "/localhost_56840" - Release.AspNetCompiler.PhysicalPath = "ElectronNET.Host\" - Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_56840\" - Release.AspNetCompiler.Updateable = "true" - Release.AspNetCompiler.ForceOverwrite = "true" - Release.AspNetCompiler.FixedNames = "false" - Release.AspNetCompiler.Debug = "False" - VWDPort = "56840" - SlnRelativePath = "ElectronNET.Host\" - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectronNET.Build", "ElectronNET.Build\ElectronNET.Build.csproj", "{829FC339-4785-4229-ABA5-53ADB544DA00}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectronNET", "ElectronNET\ElectronNET.csproj", "{8860606D-6847-F22A-5AED-DF4E0984DD24}" ProjectSection(ProjectDependencies) = postProject {829FC339-4785-4229-ABA5-53ADB544DA00} = {829FC339-4785-4229-ABA5-53ADB544DA00} - {B33E9B82-B6B4-4DB0-B6EE-61CC34641518} = {B33E9B82-B6B4-4DB0-B6EE-61CC34641518} EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "!Config", "!Config", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}" @@ -48,6 +30,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectronNET.AspNet", "ElectronNET.AspNet\ElectronNET.AspNet.csproj", "{DD10D21A-D131-1D9C-33F9-406046E0C5B0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectronNET.ConsoleApp", "ElectronNET.ConsoleApp\ElectronNET.ConsoleApp.csproj", "{EE38A326-5DE8-AF09-9EB9-DF0878938783}" + ProjectSection(ProjectDependencies) = postProject + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} = {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} + {8860606D-6847-F22A-5AED-DF4E0984DD24} = {8860606D-6847-F22A-5AED-DF4E0984DD24} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{1BB6F634-2831-4496-83A6-BC6761DCEC8D}" EndProject @@ -55,7 +41,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Apps", "Test Apps", "{ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{985D39A7-5216-4945-8167-2FD0CB387BD8}" ProjectSection(SolutionItems) = preProject - ..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml + ..\.github\workflows\Build and Publish.yml = ..\.github\workflows\Build and Publish.yml + ..\.github\workflows\integration-tests.yml = ..\.github\workflows\integration-tests.yml + ..\.github\workflows\PR Validation.yml = ..\.github\workflows\PR Validation.yml + ..\.github\workflows\pr-comment.yml = ..\.github\workflows\pr-comment.yml + ..\.github\workflows\publish-wiki.yml = ..\.github\workflows\publish-wiki.yml + ..\.github\workflows\retry-test-jobs.yml = ..\.github\workflows\retry-test-jobs.yml + ..\.github\workflows\trailing-whitespace-check.yml = ..\.github\workflows\trailing-whitespace-check.yml EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_build", "..\nuke\_build.csproj", "{015CB06B-6CAE-209F-E050-21C3ACA5FE9F}" @@ -70,6 +62,17 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Projects", "Test Projects", "{75129C45-FC6F-41B0-A485-07F4A7E031ED}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectronNET.IntegrationTests", "ElectronNET.IntegrationTests\ElectronNET.IntegrationTests.csproj", "{AE877E48-6B44-63C2-8EA0-DB58D096B553}" + ProjectSection(ProjectDependencies) = postProject + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} = {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} + EndProjectSection +EndProject +Project("{54A90642-561A-4BB1-A94E-469ADEE60C69}") = "ElectronNET.Host", "ElectronNET.Host\ElectronNET.Host.esproj", "{1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronNET.Samples.ElectronHostHook", "ElectronNET.Samples.ElectronHostHook\ElectronNET.Samples.ElectronHostHook.csproj", "{B8D65F3A-7E54-4632-9F1C-46679237B312}" + ProjectSection(ProjectDependencies) = postProject + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} = {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} + {8860606D-6847-F22A-5AED-DF4E0984DD24} = {8860606D-6847-F22A-5AED-DF4E0984DD24} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -85,10 +88,6 @@ Global {A78157BA-B754-45F1-969F-D6A513CA0E72}.Debug|Any CPU.Build.0 = Debug|Any CPU {A78157BA-B754-45F1-969F-D6A513CA0E72}.Release|Any CPU.ActiveCfg = Release|Any CPU {A78157BA-B754-45F1-969F-D6A513CA0E72}.Release|Any CPU.Build.0 = Release|Any CPU - {B33E9B82-B6B4-4DB0-B6EE-61CC34641518}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B33E9B82-B6B4-4DB0-B6EE-61CC34641518}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B33E9B82-B6B4-4DB0-B6EE-61CC34641518}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {B33E9B82-B6B4-4DB0-B6EE-61CC34641518}.Release|Any CPU.Build.0 = Debug|Any CPU {829FC339-4785-4229-ABA5-53ADB544DA00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {829FC339-4785-4229-ABA5-53ADB544DA00}.Release|Any CPU.ActiveCfg = Release|Any CPU {829FC339-4785-4229-ABA5-53ADB544DA00}.Release|Any CPU.Build.0 = Release|Any CPU @@ -112,6 +111,16 @@ Global {AE877E48-6B44-63C2-8EA0-DB58D096B553}.Debug|Any CPU.Build.0 = Debug|Any CPU {AE877E48-6B44-63C2-8EA0-DB58D096B553}.Release|Any CPU.ActiveCfg = Release|Any CPU {AE877E48-6B44-63C2-8EA0-DB58D096B553}.Release|Any CPU.Build.0 = Release|Any CPU + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6}.Release|Any CPU.Build.0 = Release|Any CPU + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6}.Release|Any CPU.Deploy.0 = Release|Any CPU + {B8D65F3A-7E54-4632-9F1C-46679237B312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8D65F3A-7E54-4632-9F1C-46679237B312}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8D65F3A-7E54-4632-9F1C-46679237B312}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8D65F3A-7E54-4632-9F1C-46679237B312}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -119,7 +128,6 @@ Global GlobalSection(NestedProjects) = preSolution {7C048379-401C-4345-B5E7-BE232DEA8157} = {EDCBFC49-2AEE-4BAF-9368-4409298C52FC} {A78157BA-B754-45F1-969F-D6A513CA0E72} = {1BB6F634-2831-4496-83A6-BC6761DCEC8D} - {B33E9B82-B6B4-4DB0-B6EE-61CC34641518} = {1BB6F634-2831-4496-83A6-BC6761DCEC8D} {829FC339-4785-4229-ABA5-53ADB544DA00} = {1BB6F634-2831-4496-83A6-BC6761DCEC8D} {8860606D-6847-F22A-5AED-DF4E0984DD24} = {1BB6F634-2831-4496-83A6-BC6761DCEC8D} {DD10D21A-D131-1D9C-33F9-406046E0C5B0} = {1BB6F634-2831-4496-83A6-BC6761DCEC8D} @@ -127,6 +135,8 @@ Global {015CB06B-6CAE-209F-E050-21C3ACA5FE9F} = {985D39A7-5216-4945-8167-2FD0CB387BD8} {06CAADC7-DE5B-47B4-AB2A-E9501459A2D1} = {D36CDFFD-3438-42E4-A7FF-88BA19AC4964} {AE877E48-6B44-63C2-8EA0-DB58D096B553} = {75129C45-FC6F-41B0-A485-07F4A7E031ED} + {1C5FD66E-A1C6-C436-DF7C-3ECE4FEDDFE6} = {1BB6F634-2831-4496-83A6-BC6761DCEC8D} + {B8D65F3A-7E54-4632-9F1C-46679237B312} = {EDCBFC49-2AEE-4BAF-9368-4409298C52FC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {81A62E71-9E04-4EFE-AD5C-23165375F8EF} diff --git a/src/ElectronNET.sln.DotSettings b/src/ElectronNET.sln.DotSettings new file mode 100644 index 00000000..fd98f554 --- /dev/null +++ b/src/ElectronNET.sln.DotSettings @@ -0,0 +1,9 @@ + + DO_NOT_SHOW + False + False + CI + True + True + True + True \ No newline at end of file diff --git a/src/ElectronNET/ElectronNET.csproj b/src/ElectronNET/ElectronNET.csproj index 48abf453..2298cd7e 100644 --- a/src/ElectronNET/ElectronNET.csproj +++ b/src/ElectronNET/ElectronNET.csproj @@ -10,6 +10,7 @@ $(DescriptionFirstPart) This package contains the ElectronNET project system. false false + disable diff --git a/src/ElectronNET/build/ElectronNET.Core.props b/src/ElectronNET/build/ElectronNET.Core.props index c9e1eedf..29d2c913 100644 --- a/src/ElectronNET/build/ElectronNET.Core.props +++ b/src/ElectronNET/build/ElectronNET.Core.props @@ -1,6 +1,32 @@ - + + 30.4.0 + 26.0 + win-x64 + true + + + + $(MSBuildProjectName.Replace(".", "-").ToLower()) + electron-builder.json + $(MSBuildProjectName) + - + + false + false + false + + + + $(MSBuildThisFileDirectory)ElectronNET.LateImport.targets + + + + $(CollectUpToDateCheckBuiltDesignTimeDependsOn);ElectronCollectUpToDateCheckBuiltDesignTime + $(FileSystemPublishDependsOn);ElectronFileSystemPublishClearItems + + + \ No newline at end of file diff --git a/src/ElectronNET/build/ElectronNET.Core.targets b/src/ElectronNET/build/ElectronNET.Core.targets index 4bee5104..39da417a 100644 --- a/src/ElectronNET/build/ElectronNET.Core.targets +++ b/src/ElectronNET/build/ElectronNET.Core.targets @@ -1,6 +1,29 @@ - + + win + $(Title) + $(PackageId) + - + + <_IsMsAspNetProject>False + <_IsMsAspNetProject Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true'">True + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ElectronNET/build/ElectronNET.LateImport.targets b/src/ElectronNET/build/ElectronNET.LateImport.targets index f25493e9..d82dcbd8 100644 --- a/src/ElectronNET/build/ElectronNET.LateImport.targets +++ b/src/ElectronNET/build/ElectronNET.LateImport.targets @@ -344,7 +344,6 @@ <_OriginalPublishDir>$(PublishDir) $(_OriginalPublishDir)bin\ - $(PublishDir) true @@ -460,7 +459,7 @@ - <_NpxCmd>npx electron-builder --config=./$(ElectronBuilderJson) --$(ElectronPlatform) --$(ElectronArch) -c.electronVersion=$(ElectronVersion) $(ElectronPaParams) + <_NpxCmd>npx electron-builder --config=./$(ElectronBuilderJson) --$(ElectronPlatform) --$(ElectronArch) -c.electronVersion=$(ElectronVersion) -c.directories.output "$(ElectronPublishUrlFullPath)" $(ElectronPaParams) <_NpxCmd Condition="'$(IsLinuxWsl)' == 'true'">wsl bash -ic '$(_NpxCmd)' diff --git a/src/ElectronNET/build/ElectronNET.MigrationChecks.targets b/src/ElectronNET/build/ElectronNET.MigrationChecks.targets new file mode 100644 index 00000000..df2336fe --- /dev/null +++ b/src/ElectronNET/build/ElectronNET.MigrationChecks.targets @@ -0,0 +1,280 @@ + + + + + + ElectronCheckNoPackageJson; + ElectronCheckNoManifestJson; + ElectronCheckElectronBuilderJson; + ElectronCheckNoParentPaths; + ElectronCheckPubxmlFiles + + + + + + + + + + + + + <_InvalidPackageJson Include="$(MSBuildProjectDirectory)\**\package.json" + Exclude="$(MSBuildProjectDirectory)\ElectronHostHook\**\package.json; + $(MSBuildProjectDirectory)\bin\**\package.json; + $(MSBuildProjectDirectory)\obj\**\package.json; + $(MSBuildProjectDirectory)\publish\**\package.json; + $(MSBuildProjectDirectory)\node_modules\**\package.json" /> + <_InvalidPackageLockJson Include="$(MSBuildProjectDirectory)\**\package-lock.json" + Exclude="$(MSBuildProjectDirectory)\ElectronHostHook\**\package-lock.json; + $(MSBuildProjectDirectory)\bin\**\package-lock.json; + $(MSBuildProjectDirectory)\obj\**\package-lock.json; + $(MSBuildProjectDirectory)\publish\**\package-lock.json; + $(MSBuildProjectDirectory)\node_modules\**\package-lock.json" /> + + + + <_HasInvalidPackageJson>false + <_HasInvalidPackageJson Condition="@(_InvalidPackageJson->Count()) > 0 OR @(_InvalidPackageLockJson->Count()) > 0">true + + + + + + + + + + + <_InvalidManifestJson Include="$(MSBuildProjectDirectory)\**\electron.manifest.json;$(MSBuildProjectDirectory)\**\electron-manifest.json" + Exclude="$(MSBuildProjectDirectory)\bin\**\*; + $(MSBuildProjectDirectory)\obj\**\*; + $(MSBuildProjectDirectory)\publish\**\*; + $(MSBuildProjectDirectory)\node_modules\**\*" /> + + + + <_HasInvalidManifestJson>false + <_HasInvalidManifestJson Condition="@(_InvalidManifestJson->Count()) > 0">true + + + + + + + + + + + + <_ElectronBuilderJsonInProperties Include="$(MSBuildProjectDirectory)\Properties\electron-builder.json" /> + + + + <_HasElectronBuilderJsonInProperties>false + <_HasElectronBuilderJsonInProperties Condition="Exists('$(MSBuildProjectDirectory)\Properties\electron-builder.json')">true + + + + + <_ElectronBuilderJsonWrongLocation Include="$(MSBuildProjectDirectory)\**\electron-builder.json" + Exclude="$(MSBuildProjectDirectory)\Properties\electron-builder.json; + $(MSBuildProjectDirectory)\bin\**\*; + $(MSBuildProjectDirectory)\obj\**\*; + $(MSBuildProjectDirectory)\publish\**\*; + $(MSBuildProjectDirectory)\node_modules\**\*" /> + + + + <_HasElectronBuilderJsonWrongLocation>false + <_HasElectronBuilderJsonWrongLocation Condition="@(_ElectronBuilderJsonWrongLocation->Count()) > 0">true + + + + + + + + + + + + + <_ElectronBuilderJsonPath>$(MSBuildProjectDirectory)\Properties\electron-builder.json + + + + + + + + + + <_ElectronBuilderJsonContent>@(_ElectronBuilderJsonLines, ' ') + <_HasParentPathReference>false + <_HasParentPathReference Condition="$(_ElectronBuilderJsonContent.Contains('../')) OR $(_ElectronBuilderJsonContent.Contains('..\\'))" >true + + + + + + + + + + + + <_PubxmlFiles Include="$(MSBuildProjectDirectory)\Properties\PublishProfiles\*.pubxml" /> + + + + + <_IsAspNetProject>false + <_IsAspNetProject Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true'">true + <_HasPubxmlFiles>false + <_HasPubxmlFiles Condition="@(_PubxmlFiles->Count()) > 0">true + + + + + <_PubxmlFileInfo Include="@(_PubxmlFiles)" Condition="'%(Identity)' != ''"> + $([System.IO.File]::ReadAllText('%(Identity)')) + + + + + + <_PubxmlFileInfoWithFlags Include="@(_PubxmlFileInfo)" Condition="'%(Identity)' != ''"> + $([System.Text.RegularExpressions.Regex]::IsMatch('%(FileContent)', '<WebPublishMethod>')) + + + + + + <_AspNetMissingWebPublishMethod Include="@(_PubxmlFileInfoWithFlags)" + Condition="'$(_IsAspNetProject)' == 'true' AND '%(HasWebPublishMethod)' == 'False'" /> + + + + + <_ConsolePubxmlWithAspNetProperties Include="@(_PubxmlFileInfoWithFlags)" + Condition="'$(_IsAspNetProject)' != 'true' AND '%(HasWebPublishMethod)' == 'True'" /> + + + + + + + + + + + diff --git a/src/ElectronNET/build/ElectronNET.props b/src/ElectronNET/build/ElectronNET.props deleted file mode 100644 index f616fbbd..00000000 --- a/src/ElectronNET/build/ElectronNET.props +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 30.4.0 - 26.0 - win-x64 - true - - - - $(MSBuildProjectName.Replace(".", "-").ToLower()) - electron-builder.json - $(MSBuildProjectName) - - - - false - false - false - - - - $(MSBuildThisFileDirectory)ElectronNET.LateImport.targets - - - - $(CollectUpToDateCheckBuiltDesignTimeDependsOn);ElectronCollectUpToDateCheckBuiltDesignTime - $(FileSystemPublishDependsOn);ElectronFileSystemPublishClearItems - - - diff --git a/src/ElectronNET/build/ElectronNET.targets b/src/ElectronNET/build/ElectronNET.targets deleted file mode 100644 index 518cdb78..00000000 --- a/src/ElectronNET/build/ElectronNET.targets +++ /dev/null @@ -1,26 +0,0 @@ - - - - - win - $(Title) - $(PackageId) - - - - <_IsMsAspNetProject>False - <_IsMsAspNetProject Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true'">True - - - - - - - - - - - - - - diff --git a/src/common.props b/src/common.props index 4773795a..9026afa7 100644 --- a/src/common.props +++ b/src/common.props @@ -1,6 +1,6 @@ - 0.1.0 + 0.3.0 ElectronNET.Core Gregor Biswanger, Florian Rappl, softworkz Electron.NET @@ -14,16 +14,6 @@ Changelog: https://github.com/ElectronNET/Electron.NET/blob/main/Changelog.md PackageIcon.png Building cross platform electron based desktop apps with .NET Core and - optionally - ASP.NET Core. - - - 50.0.24.0 - ElectronNET - / - false - - PackageIcon.png - - $(Version) $(Version) $(Version)$(VersionPostFix) diff --git a/src/testEnvironments.json b/src/testEnvironments.json new file mode 100644 index 00000000..1208edc7 --- /dev/null +++ b/src/testEnvironments.json @@ -0,0 +1,17 @@ +{ + "version": "1", + "environments": [ + // See https://aka.ms/remotetesting for more details + // about how to configure remote environments. + { + "name": "WSL Ubuntu", + "type": "wsl", + "wslDistribution": "UbuFresh" + } + //{ + // "name": "Docker dotnet/sdk", + // "type": "docker", + // "dockerImage": "mcr.microsoft.com/dotnet/sdk" + //} + ] +} \ No newline at end of file