mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Merge branch 'develop' into cs/msi-cont
# Conflicts: # .github/workflows/build.yml # Cargo.toml # src/lib-rust/Cargo.toml # src/lib-rust/src/lib.rs
This commit is contained in:
@@ -6,6 +6,3 @@ tw = "test --features windows"
|
||||
tw86 = "test --target i686-pc-windows-msvc --features windows"
|
||||
bw = "build --features windows"
|
||||
bw86 = "build --target i686-pc-windows-msvc --features windows"
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
41
.github/actions/job-setup/action.yml
vendored
Normal file
41
.github/actions/job-setup/action.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: "Setup Job Environment"
|
||||
description: "Installs dependencies like dotnet, rust, etc."
|
||||
|
||||
inputs:
|
||||
update-dotnet:
|
||||
description: 'Whether to run the setup-dotnet action'
|
||||
required: false
|
||||
default: 'false'
|
||||
rust-cache:
|
||||
description: 'Whether to run the rust-cache action'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
if: inputs.update-dotnet == 'true'
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: Print dotnet version
|
||||
shell: pwsh
|
||||
run: dotnet --info
|
||||
- name: Install NBGV CLI
|
||||
shell: pwsh
|
||||
run: dotnet tool update -g nbgv
|
||||
- uses: dotnet/nbgv@master
|
||||
with:
|
||||
setAllVars: true
|
||||
- name: Update Project Version
|
||||
shell: pwsh
|
||||
run: ./.github/set-nbgv-version.ps1
|
||||
- name: Rust Cache
|
||||
if: inputs.rust-cache == 'true'
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "${{ github.workflow }}"
|
||||
101
.github/actions/wait-artifact/action.yml
vendored
Normal file
101
.github/actions/wait-artifact/action.yml
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
name: "Wait for Artifacts"
|
||||
description: "Wait for artifacts to be available before continuing"
|
||||
inputs:
|
||||
artifacts:
|
||||
description: "A list of artifact names to wait for"
|
||||
required: true
|
||||
token:
|
||||
description: "GitHub token"
|
||||
required: true
|
||||
max_wait_seconds:
|
||||
description: "Maximum number of seconds to wait for the artifact"
|
||||
required: false
|
||||
default: "300"
|
||||
repository:
|
||||
description: "The GitHub repository (e.g., owner/repo)"
|
||||
required: false
|
||||
default: ${{ github.repository }}
|
||||
workflow_run_id:
|
||||
description: "The workflow run ID"
|
||||
required: false
|
||||
default: ${{ github.run_id }}
|
||||
verbose:
|
||||
description: "Enable verbose logging"
|
||||
required: false
|
||||
default: "false"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Wait for artifacts
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ inputs.token }}
|
||||
run: |
|
||||
# Parse the artifacts input
|
||||
$artifactInput = '${{ inputs.artifacts }}'
|
||||
$artifactNames = $artifactInput -split ',|;|`n'
|
||||
$artifactNames = $artifactNames | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' }
|
||||
|
||||
# Get other inputs
|
||||
$maxWaitSeconds = [int]"${{ inputs.max_wait_seconds }}"
|
||||
$maxAttempts = [math]::Round($maxWaitSeconds / 10)
|
||||
$sleepSeconds = 10
|
||||
$attempt = 0
|
||||
$workflowRunId = "${{ inputs.workflow_run_id }}"
|
||||
$repository = "${{ inputs.repository }}"
|
||||
$verbose = [bool]"${{ inputs.verbose }}"
|
||||
|
||||
$artifactsAvailable = @{}
|
||||
foreach ($artifactName in $artifactNames) {
|
||||
$artifactsAvailable[$artifactName.Trim()] = $false
|
||||
}
|
||||
|
||||
# Verbose logging
|
||||
if ($verbose) {
|
||||
Write-Host "Parameters:"
|
||||
Write-Host " Artifacts: $artifactInput"
|
||||
Write-Host " Parsed Artifacts: $($artifactNames -join ', ')"
|
||||
Write-Host " Max Wait Seconds: $maxWaitSeconds"
|
||||
Write-Host " Max Attempts: $maxAttempts"
|
||||
Write-Host " Sleep Seconds: $sleepSeconds"
|
||||
Write-Host " Workflow Run ID: $workflowRunId"
|
||||
Write-Host " Repository: $repository"
|
||||
Write-Host " Verbose: $verbose"
|
||||
}
|
||||
|
||||
Write-Host "Waiting for artifacts '$($artifactNames -join ', ')' to become available in workflow run $workflowRunId..."
|
||||
while ($attempt -lt $maxAttempts -and $artifactsAvailable.Values -contains $false) {
|
||||
$artifactsJson = gh api "repos/$repository/actions/runs/$workflowRunId/artifacts?per_page=100"
|
||||
$artifacts = $artifactsJson | ConvertFrom-Json
|
||||
|
||||
foreach ($artifactName in $artifactNames) {
|
||||
if ($artifacts.artifacts | Where-Object { $_.name -eq $artifactName.Trim() }) {
|
||||
$artifactsAvailable[$artifactName.Trim()] = $true
|
||||
}
|
||||
}
|
||||
|
||||
$waitingFor = $artifactsAvailable.GetEnumerator() | Where-Object { $_.Value -eq $false } | ForEach-Object { $_.Key }
|
||||
if ($waitingFor.Count -gt 0) {
|
||||
Write-Host "Still waiting for: $($waitingFor -join ', '). Attempt $($attempt + 1)/$maxAttempts"
|
||||
if ($verbose) {
|
||||
$currentlyAvailableInLoop = @()
|
||||
if ($artifacts.artifacts) {
|
||||
$currentlyAvailableInLoop = $artifacts.artifacts | ForEach-Object { $_.name }
|
||||
}
|
||||
if ($currentlyAvailableInLoop.Count -gt 0) {
|
||||
Write-Host " (Verbose) Currently available in this check: $($currentlyAvailableInLoop -join ', ')"
|
||||
} else {
|
||||
Write-Host " (Verbose) No artifacts reported as available in this check."
|
||||
}
|
||||
}
|
||||
Start-Sleep -Seconds $sleepSeconds
|
||||
$attempt++
|
||||
}
|
||||
}
|
||||
|
||||
if ($artifactsAvailable.Values -contains $false) {
|
||||
Write-Host "Error: Not all artifacts became available in time."
|
||||
exit 1
|
||||
} else {
|
||||
Write-Host "All artifacts are available, continuing..."
|
||||
}
|
||||
44
.github/set-nbgv-version.ps1
vendored
44
.github/set-nbgv-version.ps1
vendored
@@ -1,22 +1,52 @@
|
||||
param(
|
||||
[string]$version = $(nbgv get-version -v NuGetPackageVersion).Trim()
|
||||
)
|
||||
# param(
|
||||
# [string]$nuGetPackageVersion = $(nbgv get-version -v NuGetPackageVersion).Trim()
|
||||
# )
|
||||
|
||||
$semverVersion = $(nbgv get-version -v NuGetPackageVersion).Trim()
|
||||
$fourpartVersion = $(nbgv get-version -v Version).Trim()
|
||||
|
||||
$originalLocation = Get-Location
|
||||
|
||||
# setting cargo workspace version
|
||||
$scriptDir = "$PSScriptRoot/.."
|
||||
$path = Join-Path $scriptDir "Cargo.toml"
|
||||
Write-Host "Setting version to $version"
|
||||
Write-Host "Setting version to $semverVersion"
|
||||
|
||||
(Get-Content $path) | ForEach-Object {
|
||||
if ($_ -match '^version\s*=\s*".*"') {
|
||||
$_ -replace '^version\s*=\s*".*"', "version = `"$version`""
|
||||
$_ -replace '^version\s*=\s*".*"', "version = `"$semverVersion`""
|
||||
}
|
||||
else {
|
||||
$_
|
||||
}
|
||||
} | Set-Content $path
|
||||
|
||||
# setting nodejs version
|
||||
Set-Location "$scriptDir/src/lib-nodejs"
|
||||
npm version $version --no-git-tag-version
|
||||
npm version $semverVersion --no-git-tag-version
|
||||
|
||||
# setting pyproject.toml version
|
||||
$pyprojectPath = [IO.Path]::Combine($scriptDir, 'src', 'lib-python', 'pyproject.toml')
|
||||
|
||||
$pythonVersion = $semverVersion
|
||||
if ($pythonVersion -match '-g') {
|
||||
$pythonVersion = $fourpartVersion -replace '^(\d+\.\d+\.\d+)\.(\d+)$', '${1}.dev${2}'
|
||||
}
|
||||
Write-Host "Python version to $pythonVersion"
|
||||
|
||||
(Get-Content $pyprojectPath) | ForEach-Object {
|
||||
if ($_ -match '^version\s*=\s*".*"') {
|
||||
$_ -replace '^version\s*=\s*".*"', "version = `"$pythonVersion`""
|
||||
}
|
||||
else {
|
||||
$_
|
||||
}
|
||||
} | Set-Content $pyprojectPath
|
||||
|
||||
# copying README.md
|
||||
Copy-Item -Path "$scriptDir/README_NUGET.md" -Destination "$scriptDir/src/lib-nodejs/README.md" -Force
|
||||
Copy-Item -Path "$scriptDir/README_NUGET.md" -Destination "$scriptDir/src/lib-rust/README.md" -Force
|
||||
Copy-Item -Path "$scriptDir/README_NUGET.md" -Destination "$scriptDir/src/lib-rust/README.md" -Force
|
||||
Copy-Item -Path "$scriptDir/README_NUGET.md" -Destination "$scriptDir/src/lib-python/README.md" -Force
|
||||
|
||||
Set-Location $originalLocation
|
||||
|
||||
|
||||
101
.github/workflows/build-packages.yml
vendored
Normal file
101
.github/workflows/build-packages.yml
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
name: Build Packages
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
python:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Python Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: pythondl
|
||||
pattern: wheels-*
|
||||
merge-multiple: true
|
||||
- name: Upload lib-python package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lib-python
|
||||
path: pythondl
|
||||
|
||||
rust:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
update-dotnet: true
|
||||
- name: Download Rust Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: target/release
|
||||
pattern: rust-*
|
||||
merge-multiple: true
|
||||
- name: Build .NET
|
||||
run: dotnet build -c Release /p:PackRustAssets=true /p:ContinuousIntegrationBuild=true
|
||||
- name: Build lib-nodejs
|
||||
working-directory: src/lib-nodejs
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
- name: Write Version File
|
||||
run: echo $NBGV_NuGetPackageVersion > version.txt
|
||||
- name: Upload version file as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-version
|
||||
path: version.txt
|
||||
- name: Upload Package Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packages
|
||||
path: build/Release/*nupkg
|
||||
- name: Rearrange Artifacts
|
||||
run: |
|
||||
mkdir src/lib-nodejs/lib/native
|
||||
mv target/release/*.node src/lib-nodejs/lib/native/
|
||||
|
||||
mkdir lib-c
|
||||
mkdir lib-c/lib
|
||||
mkdir lib-c/lib-static
|
||||
mkdir lib-c/include
|
||||
|
||||
mv target/release/*.so lib-c/lib/
|
||||
mv target/release/*.dylib lib-c/lib/
|
||||
mv target/release/*.dll lib-c/lib/
|
||||
mv target/release/*.dll.lib lib-c/lib/
|
||||
mv target/release/*.a lib-c/lib-static/
|
||||
mv target/release/*.lib lib-c/lib-static/
|
||||
|
||||
cp src/lib-cpp/include/* lib-c/include/
|
||||
|
||||
mkdir bin-core
|
||||
mv target/release/* bin-core/
|
||||
- name: Upload Core Bins
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bin-core
|
||||
path: bin-core/*
|
||||
- name: Upload lib-c
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lib-c
|
||||
path: lib-c/*
|
||||
- name: Pack lib-nodejs
|
||||
working-directory: src/lib-nodejs
|
||||
run: npm pack
|
||||
- name: Pack lib-rust
|
||||
run: cargo package -p velopack --allow-dirty
|
||||
- name: Upload lib-nodejs package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lib-nodejs
|
||||
path: src/lib-nodejs/velopack-*.tgz
|
||||
- name: Upload lib-rust package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lib-rust
|
||||
path: target/package/velopack-*.crate
|
||||
209
.github/workflows/build-python.yml
vendored
Normal file
209
.github/workflows/build-python.yml
vendored
Normal file
@@ -0,0 +1,209 @@
|
||||
name: Build Python
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- runner: ubuntu-22.04
|
||||
target: x86_64
|
||||
- runner: ubuntu-22.04
|
||||
target: x86
|
||||
- runner: ubuntu-22.04-arm
|
||||
target: aarch64
|
||||
- runner: ubuntu-22.04
|
||||
target: armv7
|
||||
- runner: ubuntu-22.04
|
||||
target: s390x
|
||||
- runner: ubuntu-22.04
|
||||
target: ppc64le
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Build wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
working-directory: src/lib-python
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
manylinux: auto
|
||||
# - name: Build free-threaded wheels
|
||||
# uses: PyO3/maturin-action@v1
|
||||
# with:
|
||||
# working-directory: src/lib-python
|
||||
# target: ${{ matrix.platform.target }}
|
||||
# args: --release --out dist -i python3.13t
|
||||
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# manylinux: auto
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheels-linux-${{ matrix.platform.target }}
|
||||
path: src/lib-python/dist
|
||||
retention-days: 1
|
||||
|
||||
musllinux:
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- runner: ubuntu-22.04
|
||||
target: x86_64
|
||||
- runner: ubuntu-22.04
|
||||
target: x86
|
||||
- runner: ubuntu-22.04
|
||||
target: aarch64
|
||||
- runner: ubuntu-22.04
|
||||
target: armv7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Build wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
working-directory: src/lib-python
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
manylinux: musllinux_1_2
|
||||
# - name: Build free-threaded wheels
|
||||
# uses: PyO3/maturin-action@v1
|
||||
# with:
|
||||
# working-directory: src/lib-python
|
||||
# target: ${{ matrix.platform.target }}
|
||||
# args: --release --out dist -i python3.13t
|
||||
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# manylinux: musllinux_1_2
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheels-musllinux-${{ matrix.platform.target }}
|
||||
path: src/lib-python/dist
|
||||
retention-days: 1
|
||||
|
||||
windows:
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- runner: windows-latest
|
||||
target: x64
|
||||
rust_target: x86_64-pc-windows-msvc
|
||||
- runner: windows-latest
|
||||
target: x86
|
||||
rust_target: i686-pc-windows-msvc
|
||||
- runner: windows-11-arm
|
||||
target: arm64
|
||||
rust_target: aarch64-pc-windows-msvc
|
||||
steps:
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
if: ${{ matrix.platform.runner == 'windows-11-arm' }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
architecture: ${{ matrix.platform.target }}
|
||||
- name: Build wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
working-directory: src/lib-python
|
||||
target: ${{ matrix.platform.rust_target }}
|
||||
args: --release --out dist
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# - name: Build free-threaded wheels
|
||||
# uses: PyO3/maturin-action@v1
|
||||
# with:
|
||||
# working-directory: src/lib-python
|
||||
# target: ${{ matrix.platform.rust_target }}
|
||||
# args: --release --out dist -i python3.13t
|
||||
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheels-windows-${{ matrix.platform.target }}
|
||||
path: src/lib-python/dist
|
||||
retention-days: 1
|
||||
|
||||
macos:
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- runner: macos-13
|
||||
target: x86_64
|
||||
- runner: macos-14
|
||||
target: aarch64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Build wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
working-directory: src/lib-python
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# - name: Build free-threaded wheels
|
||||
# uses: PyO3/maturin-action@v1
|
||||
# with:
|
||||
# working-directory: src/lib-python
|
||||
# target: ${{ matrix.platform.target }}
|
||||
# args: --release --out dist -i python3.13t
|
||||
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheels-macos-${{ matrix.platform.target }}
|
||||
path: src/lib-python/dist
|
||||
retention-days: 1
|
||||
|
||||
sdist:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Build sdist
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
working-directory: src/lib-python
|
||||
command: sdist
|
||||
args: --out dist
|
||||
- name: Upload sdist
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wheels-sdist
|
||||
path: src/lib-python/dist
|
||||
retention-days: 1
|
||||
208
.github/workflows/build-rust.yml
vendored
Normal file
208
.github/workflows/build-rust.yml
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
name: Build Rust
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
windows-bins:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
RUSTFLAGS: -C target-feature=+crt-static
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
rust-cache: true
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc
|
||||
- name: Build Rust Binaries
|
||||
run: cargo +nightly build --target i686-win7-windows-msvc --features windows --release -Z build-std="core,alloc,std,panic_abort" -p velopack_bins
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-windows-bins
|
||||
path: |
|
||||
target\i686-win7-windows-msvc\release\*.exe
|
||||
target\i686-win7-windows-msvc\release\*.pdb
|
||||
retention-days: 1
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: [x86, x64, arm64]
|
||||
include:
|
||||
- target: x86
|
||||
rust_flags: --release -Z build-std="core,alloc,std,panic_abort"
|
||||
rust_target: i686-win7-windows-msvc
|
||||
- target: x64
|
||||
rust_flags: --release -Z build-std="core,alloc,std,panic_abort"
|
||||
rust_target: x86_64-win7-windows-msvc
|
||||
- target: arm64
|
||||
rust_flags: --release
|
||||
rust_target: aarch64-pc-windows-msvc
|
||||
env:
|
||||
RUSTFLAGS: -C target-feature=+crt-static
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
rust-cache: true
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc
|
||||
rustup target add aarch64-pc-windows-msvc --toolchain nightly-x86_64-pc-windows-msvc
|
||||
- name: Build Rust (${{ matrix.target }})
|
||||
run: |
|
||||
cargo +nightly build --target ${{ matrix.rust_target }} ${{ matrix.rust_flags }} -p velopack_nodeffi -p velopack_libc -p velopack_wix
|
||||
move target\${{ matrix.rust_target }}\release\velopack_nodeffi.dll target\velopack_nodeffi_win_${{ matrix.target }}_msvc.node
|
||||
move target\${{ matrix.rust_target }}\release\velopack_libc.dll target\velopack_libc_win_${{ matrix.target }}_msvc.dll
|
||||
move target\${{ matrix.rust_target }}\release\velopack_libc.dll.lib target\velopack_libc_win_${{ matrix.target }}_msvc.dll.lib
|
||||
move target\${{ matrix.rust_target }}\release\velopack_libc.lib target\velopack_libc_win_${{ matrix.target }}_msvc.lib
|
||||
move target\${{ matrix.rust_target }}\release\velopack_wix.dll target\velopack_wix_${{ matrix.target }}.dll
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-windows-libs-${{ matrix.target }}
|
||||
path: |
|
||||
target\*.node
|
||||
target\*.dll
|
||||
target\*.lib
|
||||
retention-days: 1
|
||||
- name: Cancel workflow if failed
|
||||
uses: andymckay/cancel-action@0.5
|
||||
if: ${{ failure() }}
|
||||
|
||||
linux-bins:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: [x64, arm64]
|
||||
include:
|
||||
- target: x64
|
||||
rust_target: x86_64-unknown-linux-musl
|
||||
- target: arm64
|
||||
rust_target: aarch64-unknown-linux-musl
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
cargo binstall cross
|
||||
mkdir ./artifacts
|
||||
- name: Build Rust Binaries (${{ matrix.target }})
|
||||
run: |
|
||||
cross build --release --target ${{ matrix.rust_target }} -p velopack_bins
|
||||
ldd ./target/${{ matrix.rust_target }}/release/update || true
|
||||
cp ./target/${{ matrix.rust_target }}/release/update ./artifacts/UpdateNix_${{ matrix.target }}
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-ubuntu-bins-${{ matrix.target }}
|
||||
path: |
|
||||
artifacts/UpdateNix_${{ matrix.target }}
|
||||
retention-days: 1
|
||||
# - name: Cancel workflow if failed
|
||||
# uses: andymckay/cancel-action@0.5
|
||||
# if: ${{ failure() }}
|
||||
|
||||
linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: [x64, arm64]
|
||||
include:
|
||||
- target: x64
|
||||
rust_target: x86_64-unknown-linux-gnu
|
||||
- target: arm64
|
||||
rust_target: aarch64-unknown-linux-gnu
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
rustup target add aarch64-unknown-linux-gnu
|
||||
sudo apt update
|
||||
sudo apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
|
||||
mkdir ./artifacts
|
||||
- name: Build Rust (${{ matrix.target }})
|
||||
env:
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||
run: |
|
||||
cargo build --release --target ${{ matrix.rust_target }} -p velopack_nodeffi -p velopack_libc
|
||||
cp ./target/${{ matrix.rust_target }}/release/libvelopack_nodeffi.so ./artifacts/velopack_nodeffi_linux_${{ matrix.target }}_gnu.node
|
||||
cp ./target/${{ matrix.rust_target }}/release/libvelopack_libc.so ./artifacts/velopack_libc_linux_${{ matrix.target }}_gnu.so
|
||||
cp ./target/${{ matrix.rust_target }}/release/libvelopack_libc.a ./artifacts/velopack_libc_linux_${{ matrix.target }}_gnu.a
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-ubuntu-libs-${{ matrix.target }}
|
||||
path: |
|
||||
artifacts/*.so
|
||||
artifacts/*.node
|
||||
artifacts/*.a
|
||||
retention-days: 1
|
||||
# - name: Cancel workflow if failed
|
||||
# uses: andymckay/cancel-action@0.5
|
||||
# if: ${{ failure() }}
|
||||
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
rust-cache: true
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
rustup target add x86_64-apple-darwin
|
||||
- name: Build Rust (x64)
|
||||
run: |
|
||||
cargo build --release --target x86_64-apple-darwin
|
||||
otool -L ./target/x86_64-apple-darwin/release/update
|
||||
- name: Build Rust (arm64)
|
||||
run: |
|
||||
cargo build --release --target aarch64-apple-darwin
|
||||
otool -L ./target/aarch64-apple-darwin/release/update
|
||||
- name: Create Universal Binary
|
||||
run: |
|
||||
lipo -create -output ./target/UpdateMac ./target/x86_64-apple-darwin/release/update ./target/aarch64-apple-darwin/release/update
|
||||
file ./target/UpdateMac
|
||||
lipo -create -output ./target/velopack_nodeffi_osx.node ./target/x86_64-apple-darwin/release/libvelopack_nodeffi.dylib ./target/aarch64-apple-darwin/release/libvelopack_nodeffi.dylib
|
||||
file ./target/velopack_nodeffi_osx.node
|
||||
lipo -create -output ./target/velopack_libc_osx.dylib ./target/x86_64-apple-darwin/release/libvelopack_libc.dylib ./target/aarch64-apple-darwin/release/libvelopack_libc.dylib
|
||||
file ./target/velopack_libc_osx.dylib
|
||||
cp ./target/x86_64-apple-darwin/release/libvelopack_libc.a ./target/velopack_libc_osx_x64_gnu.a
|
||||
cp ./target/aarch64-apple-darwin/release/libvelopack_libc.a ./target/velopack_libc_osx_arm64_gnu.a
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-macos
|
||||
path: |
|
||||
target/UpdateMac
|
||||
target/*.dylib
|
||||
target/*.node
|
||||
target/*.a
|
||||
retention-days: 1
|
||||
- name: Cancel workflow if failed
|
||||
uses: andymckay/cancel-action@0.5
|
||||
if: ${{ failure() }}
|
||||
65
.github/workflows/build-samples.yml
vendored
Normal file
65
.github/workflows/build-samples.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: Build Samples
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
samples:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample: [CPlusPlusWidgets, CPlusPlusWin32, CSharpAvalonia, CSharpUno, CSharpWpf, NodeJSElectron, RustIced]
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
sample: CPlusPlusWin32
|
||||
- os: macos-latest
|
||||
sample: CPlusPlusWin32
|
||||
- os: ubuntu-latest
|
||||
sample: CSharpWpf
|
||||
- os: macos-latest
|
||||
sample: CSharpWpf
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install wxWidgets (Windows)
|
||||
working-directory: samples/${{ matrix.sample }}
|
||||
run: |
|
||||
curl -L -o wxWidgets-3.2.6-headers.7z https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxWidgets-3.2.6-headers.7z
|
||||
curl -L -o wxMSW-3.2.6_vc14x_x64_Dev.7z https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxMSW-3.2.6_vc14x_x64_Dev.7z
|
||||
curl -L -o wxMSW-3.2.6_vc14x_x64_ReleaseDLL.7z https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxMSW-3.2.6_vc14x_x64_ReleaseDLL.7z
|
||||
7z x wxWidgets-3.2.6-headers.7z -o".\wxWidgets" -y
|
||||
7z x wxMSW-3.2.6_vc14x_x64_Dev.7z -o".\wxWidgets" -y
|
||||
7z x wxMSW-3.2.6_vc14x_x64_ReleaseDLL.7z -o".\wxWidgets" -y
|
||||
dir wxWidgets
|
||||
if: ${{ matrix.sample == 'CPlusPlusWidgets' && matrix.os == 'windows-latest' }}
|
||||
- name: Install wxWidgets (MacOS)
|
||||
run: brew install wxwidgets
|
||||
if: ${{ matrix.sample == 'CPlusPlusWidgets' && matrix.os == 'macos-latest' }}
|
||||
- name: Install wxWidgets (Linux)
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt-cache search libwxgt*
|
||||
sudo apt-cache search libgtk*
|
||||
sudo apt install -y libwxgtk3.2-dev libgtk-3-dev
|
||||
if: ${{ matrix.sample == 'CPlusPlusWidgets' && matrix.os == 'ubuntu-latest' }}
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: Install VPK
|
||||
run: dotnet tool install -g vpk
|
||||
- name: Pack Sample (Windows)
|
||||
working-directory: samples/${{ matrix.sample }}
|
||||
run: .\build.bat 1.0.0
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
- name: Pack Sample (Unix)
|
||||
working-directory: samples/${{ matrix.sample }}
|
||||
run: |
|
||||
chmod 755 ./build.sh
|
||||
./build.sh 1.0.0
|
||||
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }}
|
||||
170
.github/workflows/build-tests.yml
vendored
Normal file
170
.github/workflows/build-tests.yml
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
name: Build Tests
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
jobs:
|
||||
rust:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
include:
|
||||
- os: windows-latest
|
||||
rust_flags: "--features windows"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
- name: Check lib-rust
|
||||
run: cargo check -p velopack -F async
|
||||
- name: Test Rust
|
||||
run: cargo llvm-cov ${{ matrix.rust_flags }} --cobertura --output-path ./test/coverage.rust.${{ matrix.os }}.xml
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: ./test/coverage.rust.${{ matrix.os }}.xml
|
||||
|
||||
nodejs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Check lib-nodejs
|
||||
working-directory: src/lib-nodejs
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
npm run test
|
||||
|
||||
python:
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
# runs-on: ${{ matrix.os }}
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Install Dependencies
|
||||
working-directory: src/lib-python
|
||||
run: |
|
||||
dotnet tool update -g vpk
|
||||
pip install uv
|
||||
uv sync
|
||||
- name: Check lib-python
|
||||
working-directory: src/lib-python/test
|
||||
run: uv run python run_test.py
|
||||
|
||||
vpk:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||
VELOPACK_GITHUB_TEST_TOKEN: ${{ secrets.VELOPACK_GITHUB_TEST_TOKEN }}
|
||||
VELOPACK_B2_TEST_TOKEN: ${{ secrets.VELOPACK_B2_TEST_TOKEN }}
|
||||
VELOPACK_AZ_TEST_TOKEN: ${{ secrets.VELOPACK_AZ_TEST_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
update-dotnet: true
|
||||
- name: Install FUSE
|
||||
run: |
|
||||
sudo add-apt-repository universe
|
||||
sudo apt update
|
||||
sudo apt install libfuse2
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
- name: Install squashfs-tools
|
||||
run: brew install squashfs
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
- name: Install dotnet-coverage
|
||||
run: dotnet tool install -g dotnet-coverage
|
||||
- name: Build .NET
|
||||
run: dotnet build -c Release
|
||||
- name: Wait for Artifacts
|
||||
uses: ./.github/actions/wait-artifact
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
max_wait_seconds: 900
|
||||
artifacts: rust-macos,rust-windows-bins,rust-ubuntu-bins-x64,rust-ubuntu-bins-arm64
|
||||
verbose: true
|
||||
- name: Download Rust Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: target/release
|
||||
pattern: rust-*
|
||||
merge-multiple: true
|
||||
- name: Azure login
|
||||
uses: azure/login@v2
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
with:
|
||||
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
||||
- name: Test Velopack.Tests
|
||||
run: dotnet test test/Velopack.Tests/Velopack.Tests.csproj --no-build -c Release -l "console;verbosity=detailed;consoleLoggerParameters=ErrorsOnly" -l GithubActions -- RunConfiguration.CollectSourceInformation=true
|
||||
- name: Test Velopack.Packaging.Tests
|
||||
run: dotnet test test/Velopack.Packaging.Tests/Velopack.Packaging.Tests.csproj --no-build -c Release -l "console;verbosity=detailed;consoleLoggerParameters=ErrorsOnly" -l GithubActions -- RunConfiguration.CollectSourceInformation=true
|
||||
- name: Test Velopack.CommandLine.Tests
|
||||
run: dotnet test test/Velopack.CommandLine.Tests/Velopack.CommandLine.Tests.csproj --no-build -c Release -l "console;verbosity=detailed;consoleLoggerParameters=ErrorsOnly" -l GithubActions -- RunConfiguration.CollectSourceInformation=true
|
||||
- name: Upload Cross-Compile Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cross-${{ matrix.os }}
|
||||
path: test/artifacts/*
|
||||
retention-days: 1
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
directory: ./test
|
||||
- name: Wait for Artifacts
|
||||
uses: ./.github/actions/wait-artifact
|
||||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
max_wait_seconds: 900
|
||||
artifacts: cross-macos-latest,cross-ubuntu-latest,cross-windows-latest
|
||||
verbose: true
|
||||
- name: Download Cross Artifacts
|
||||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: test/artifacts
|
||||
pattern: cross-*
|
||||
merge-multiple: true
|
||||
- name: Test Cross-Compiled Apps
|
||||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' }}
|
||||
env:
|
||||
VELOPACK_CROSS_ARTIFACTS: true
|
||||
run: dotnet test test/Velopack.Packaging.Tests/Velopack.Packaging.Tests.csproj --no-build -c Release --filter "FullyQualifiedName~RunCrossApp" -l "console;verbosity=detailed;consoleLoggerParameters=ErrorsOnly" -l GithubActions -- RunConfiguration.CollectSourceInformation=true
|
||||
|
||||
474
.github/workflows/build.yml
vendored
474
.github/workflows/build.yml
vendored
@@ -7,473 +7,27 @@ on:
|
||||
branches: [master, develop]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
jobs:
|
||||
build-rust-windows:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
RUSTFLAGS: -C target-feature=+crt-static
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "rust-build-windows"
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
rustup target add aarch64-pc-windows-msvc --toolchain nightly-x86_64-pc-windows-msvc
|
||||
rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc
|
||||
- name: Update Version
|
||||
shell: pwsh
|
||||
run: ./.github/set-nbgv-version.ps1
|
||||
- name: Build Rust Binaries (x86)
|
||||
run: cargo +nightly build --target i686-win7-windows-msvc -Z build-std="core,alloc,std,panic_abort" --features windows --release -p velopack_bins
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-windows-latest
|
||||
path: |
|
||||
target\i686-win7-windows-msvc\release\*.exe
|
||||
target\i686-win7-windows-msvc\release\*.pdb
|
||||
- name: Build Rust (x86)
|
||||
run: cargo +nightly build --target i686-win7-windows-msvc -Z build-std="core,alloc,std,panic_abort" --release -p velopack_nodeffi -p velopack_libc -p velopack_wix
|
||||
- name: Build Rust (x64)
|
||||
run: cargo +nightly build --target x86_64-win7-windows-msvc -Z build-std="core,alloc,std,panic_abort" --release -p velopack_nodeffi -p velopack_libc -p velopack_wix
|
||||
- name: Build Rust (arm64)
|
||||
run: cargo +nightly build --target aarch64-pc-windows-msvc --release -p velopack_nodeffi -p velopack_libc -p velopack_wix
|
||||
- name: Collect Artifacts
|
||||
run: |
|
||||
move target\i686-win7-windows-msvc\release\velopack_nodeffi.dll target\velopack_nodeffi_win_x86_msvc.node
|
||||
move target\x86_64-win7-windows-msvc\release\velopack_nodeffi.dll target\velopack_nodeffi_win_x64_msvc.node
|
||||
move target\aarch64-pc-windows-msvc\release\velopack_nodeffi.dll target\velopack_nodeffi_win_arm64_msvc.node
|
||||
build-rust:
|
||||
uses: ./.github/workflows/build-rust.yml
|
||||
|
||||
move target\i686-win7-windows-msvc\release\velopack_libc.dll target\velopack_libc_win_x86_msvc.dll
|
||||
move target\x86_64-win7-windows-msvc\release\velopack_libc.dll target\velopack_libc_win_x64_msvc.dll
|
||||
move target\aarch64-pc-windows-msvc\release\velopack_libc.dll target\velopack_libc_win_arm64_msvc.dll
|
||||
build-python:
|
||||
uses: ./.github/workflows/build-python.yml
|
||||
|
||||
build-tests:
|
||||
uses: ./.github/workflows/build-tests.yml
|
||||
secrets: inherit # tests need secrets to run
|
||||
|
||||
move target\i686-win7-windows-msvc\release\velopack_libc.dll.lib target\velopack_libc_win_x86_msvc.dll.lib
|
||||
move target\x86_64-win7-windows-msvc\release\velopack_libc.dll.lib target\velopack_libc_win_x64_msvc.dll.lib
|
||||
move target\aarch64-pc-windows-msvc\release\velopack_libc.dll.lib target\velopack_libc_win_arm64_msvc.dll.lib
|
||||
build-samples:
|
||||
uses: ./.github/workflows/build-samples.yml
|
||||
|
||||
move target\i686-win7-windows-msvc\release\velopack_libc.lib target\velopack_libc_win_x86_msvc.lib
|
||||
move target\x86_64-win7-windows-msvc\release\velopack_libc.lib target\velopack_libc_win_x64_msvc.lib
|
||||
move target\aarch64-pc-windows-msvc\release\velopack_libc.lib target\velopack_libc_win_arm64_msvc.lib
|
||||
|
||||
move target\i686-win7-windows-msvc\release\velopack_wix.dll target\velopack_wix_x86.dll
|
||||
move target\x86_64-win7-windows-msvc\release\velopack_wix.dll target\velopack_wix_x64.dll
|
||||
move target\aarch64-pc-windows-msvc\release\velopack_wix.dll target\velopack_wix_arm64.dll
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-windows-latest-libs
|
||||
path: |
|
||||
target\*.node
|
||||
target\*.dll
|
||||
target\*.lib
|
||||
# - name: Cancel workflow if failed
|
||||
# uses: andymckay/cancel-action@0.5
|
||||
# if: ${{ failure() }}
|
||||
|
||||
build-rust-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
cargo binstall cross
|
||||
rustup target add aarch64-unknown-linux-gnu
|
||||
sudo apt update
|
||||
sudo apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
|
||||
mkdir ./artifacts
|
||||
# rustup target add x86_64-unknown-linux-musl
|
||||
# rustup target add aarch64-unknown-linux-musl
|
||||
# sudo apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu musl-tools musl:arm64
|
||||
- name: Update Version
|
||||
shell: pwsh
|
||||
run: ./.github/set-nbgv-version.ps1
|
||||
- name: Build Rust Binaries (x64)
|
||||
run: |
|
||||
cargo clean
|
||||
cross build --release --target x86_64-unknown-linux-musl -p velopack_bins
|
||||
ldd ./target/x86_64-unknown-linux-musl/release/update || true
|
||||
cp ./target/x86_64-unknown-linux-musl/release/update ./artifacts/UpdateNix_x64
|
||||
- name: Build Rust Binaries (arm64)
|
||||
run: |
|
||||
cargo clean
|
||||
cross build --release --target aarch64-unknown-linux-musl -p velopack_bins
|
||||
ldd ./target/aarch64-unknown-linux-musl/release/update || true
|
||||
cp ./target/aarch64-unknown-linux-musl/release/update ./artifacts/UpdateNix_arm64
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-ubuntu-latest
|
||||
path: |
|
||||
artifacts/UpdateNix*
|
||||
- name: Build Rust (x64)
|
||||
run: |
|
||||
cargo clean
|
||||
cargo build --release --target x86_64-unknown-linux-gnu -p velopack_nodeffi -p velopack_libc
|
||||
cp ./target/x86_64-unknown-linux-gnu/release/libvelopack_nodeffi.so ./artifacts/velopack_nodeffi_linux_x64_gnu.node
|
||||
cp ./target/x86_64-unknown-linux-gnu/release/libvelopack_libc.so ./artifacts/velopack_libc_linux_x64_gnu.so
|
||||
cp ./target/x86_64-unknown-linux-gnu/release/libvelopack_libc.a ./artifacts/velopack_libc_linux_x64_gnu.a
|
||||
- name: Build Rust (arm64)
|
||||
run: |
|
||||
cargo clean
|
||||
cargo build --release --target aarch64-unknown-linux-gnu -p velopack_nodeffi -p velopack_libc
|
||||
cp ./target/aarch64-unknown-linux-gnu/release/libvelopack_nodeffi.so ./artifacts/velopack_nodeffi_linux_arm64_gnu.node
|
||||
cp ./target/aarch64-unknown-linux-gnu/release/libvelopack_libc.so ./artifacts/velopack_libc_linux_arm64_gnu.so
|
||||
cp ./target/aarch64-unknown-linux-gnu/release/libvelopack_libc.a ./artifacts/velopack_libc_linux_arm64_gnu.a
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-ubuntu-latest-libs
|
||||
path: |
|
||||
artifacts/*.so
|
||||
artifacts/*.node
|
||||
artifacts/*.a
|
||||
- name: Cancel workflow if failed
|
||||
uses: andymckay/cancel-action@0.5
|
||||
if: ${{ failure() }}
|
||||
|
||||
build-rust-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "rust-build-macos"
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
rustup target add x86_64-apple-darwin
|
||||
dotnet tool update -g nbgv
|
||||
- name: Update Version
|
||||
shell: pwsh
|
||||
run: ./.github/set-nbgv-version.ps1
|
||||
- name: Build Rust (x64)
|
||||
run: |
|
||||
cargo build --release --target x86_64-apple-darwin
|
||||
otool -L ./target/x86_64-apple-darwin/release/update
|
||||
- name: Build Rust (arm64)
|
||||
run: |
|
||||
cargo build --release --target aarch64-apple-darwin
|
||||
otool -L ./target/aarch64-apple-darwin/release/update
|
||||
- name: Create Universal Binary
|
||||
run: |
|
||||
lipo -create -output ./target/UpdateMac ./target/x86_64-apple-darwin/release/update ./target/aarch64-apple-darwin/release/update
|
||||
file ./target/UpdateMac
|
||||
lipo -create -output ./target/velopack_nodeffi_osx.node ./target/x86_64-apple-darwin/release/libvelopack_nodeffi.dylib ./target/aarch64-apple-darwin/release/libvelopack_nodeffi.dylib
|
||||
file ./target/velopack_nodeffi_osx.node
|
||||
lipo -create -output ./target/velopack_libc_osx.dylib ./target/x86_64-apple-darwin/release/libvelopack_libc.dylib ./target/aarch64-apple-darwin/release/libvelopack_libc.dylib
|
||||
file ./target/velopack_libc_osx.dylib
|
||||
cp ./target/x86_64-apple-darwin/release/libvelopack_libc.a ./target/velopack_libc_osx_x64_gnu.a
|
||||
cp ./target/aarch64-apple-darwin/release/libvelopack_libc.a ./target/velopack_libc_osx_arm64_gnu.a
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-macos-latest
|
||||
path: |
|
||||
target/UpdateMac
|
||||
target/*.dylib
|
||||
target/*.node
|
||||
target/*.a
|
||||
- name: Cancel workflow if failed
|
||||
uses: andymckay/cancel-action@0.5
|
||||
if: ${{ failure() }}
|
||||
|
||||
test-bins:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
include:
|
||||
- os: windows-latest
|
||||
rust_flags: "--features windows"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "rust-test-${{ matrix.os }}"
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
- name: Check lib-rust
|
||||
run: cargo check -p velopack -F async
|
||||
- name: Check lib-nodejs
|
||||
working-directory: src/lib-nodejs
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
npm run test
|
||||
- name: Test Rust
|
||||
run: cargo llvm-cov ${{ matrix.rust_flags }} --cobertura --output-path ./test/coverage.rust.${{ matrix.os }}.xml
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: ./test/coverage.rust.${{ matrix.os }}.xml
|
||||
|
||||
test-vpk:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||
VELOPACK_GITHUB_TEST_TOKEN: ${{ secrets.VELOPACK_GITHUB_TEST_TOKEN }}
|
||||
VELOPACK_B2_TEST_TOKEN: ${{ secrets.VELOPACK_B2_TEST_TOKEN }}
|
||||
VELOPACK_AZ_TEST_TOKEN: ${{ secrets.VELOPACK_AZ_TEST_TOKEN }}
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: Print dotnet version
|
||||
run: dotnet --info
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install FUSE
|
||||
run: |
|
||||
sudo add-apt-repository universe
|
||||
sudo apt update
|
||||
sudo apt install libfuse2
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
- name: Install squashfs-tools
|
||||
run: brew install squashfs
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
- name: Install dotnet-coverage
|
||||
run: dotnet tool install -g dotnet-coverage
|
||||
- name: Build .NET
|
||||
run: dotnet build -c Release
|
||||
- uses: caesay/wait-artifact-action@494939e840383463b1686ce3624a8aab059c2c8b
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
max_wait_seconds: 900
|
||||
artifacts: rust-macos-latest,rust-windows-latest,rust-ubuntu-latest
|
||||
verbose: true
|
||||
- name: Download Rust Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: target/release
|
||||
pattern: rust-*
|
||||
merge-multiple: true
|
||||
- name: Azure login
|
||||
uses: azure/login@v2
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
with:
|
||||
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
||||
- name: Test Velopack.Tests
|
||||
run: dotnet test test/Velopack.Tests/Velopack.Tests.csproj --no-build -c Release -l "console;verbosity=detailed;consoleLoggerParameters=ErrorsOnly" -l GithubActions -- RunConfiguration.CollectSourceInformation=true
|
||||
- name: Test Velopack.Packaging.Tests
|
||||
run: dotnet test test/Velopack.Packaging.Tests/Velopack.Packaging.Tests.csproj --no-build -c Release -l "console;verbosity=detailed;consoleLoggerParameters=ErrorsOnly" -l GithubActions -- RunConfiguration.CollectSourceInformation=true
|
||||
- name: Test Velopack.CommandLine.Tests
|
||||
run: dotnet test test/Velopack.CommandLine.Tests/Velopack.CommandLine.Tests.csproj --no-build -c Release -l "console;verbosity=detailed;consoleLoggerParameters=ErrorsOnly" -l GithubActions -- RunConfiguration.CollectSourceInformation=true
|
||||
- name: Upload Cross-Compile Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cross-${{ matrix.os }}
|
||||
path: test/artifacts/*
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
directory: ./test
|
||||
- uses: caesay/wait-artifact-action@494939e840383463b1686ce3624a8aab059c2c8b
|
||||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
max_wait_seconds: 900
|
||||
artifacts: cross-macos-latest,cross-ubuntu-latest,cross-windows-latest
|
||||
verbose: true
|
||||
- name: Download Cross Artifacts
|
||||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: test/artifacts
|
||||
pattern: cross-*
|
||||
merge-multiple: true
|
||||
- name: Test Cross-Compiled Apps
|
||||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' }}
|
||||
env:
|
||||
VELOPACK_CROSS_ARTIFACTS: true
|
||||
run: dotnet test test/Velopack.Packaging.Tests/Velopack.Packaging.Tests.csproj --no-build -c Release --filter "FullyQualifiedName~RunCrossApp" -l "console;verbosity=detailed;consoleLoggerParameters=ErrorsOnly" -l GithubActions -- RunConfiguration.CollectSourceInformation=true
|
||||
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-rust-windows, build-rust-linux, build-rust-macos]
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: Print dotnet version
|
||||
run: dotnet --info
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: dotnet/nbgv@master
|
||||
with:
|
||||
setAllVars: true
|
||||
- name: Update Version
|
||||
shell: pwsh
|
||||
run: ./.github/set-nbgv-version.ps1
|
||||
- name: Download Rust Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: target/release
|
||||
pattern: rust-*
|
||||
merge-multiple: true
|
||||
- name: Build .NET
|
||||
run: dotnet build -c Release /p:PackRustAssets=true /p:ContinuousIntegrationBuild=true
|
||||
- name: Build lib-nodejs
|
||||
working-directory: src/lib-nodejs
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
- name: Write Version File
|
||||
run: echo $NBGV_NuGetPackageVersion > version.txt
|
||||
- name: Upload version file as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-version
|
||||
path: version.txt
|
||||
- name: Upload Package Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packages
|
||||
path: build/Release/*nupkg
|
||||
- name: Rearrange Artifacts
|
||||
run: |
|
||||
mkdir src/lib-nodejs/lib/native
|
||||
mv target/release/*.node src/lib-nodejs/lib/native/
|
||||
|
||||
mkdir lib-c
|
||||
mkdir lib-c/lib
|
||||
mkdir lib-c/lib-static
|
||||
mkdir lib-c/include
|
||||
|
||||
mv target/release/*.so lib-c/lib/
|
||||
mv target/release/*.dylib lib-c/lib/
|
||||
mv target/release/*.dll lib-c/lib/
|
||||
mv target/release/*.dll.lib lib-c/lib/
|
||||
mv target/release/*.a lib-c/lib-static/
|
||||
mv target/release/*.lib lib-c/lib-static/
|
||||
|
||||
cp src/lib-cpp/include/* lib-c/include/
|
||||
|
||||
mkdir bin-core
|
||||
mv target/release/* bin-core/
|
||||
- name: Upload Core Bins
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bin-core
|
||||
path: bin-core/*
|
||||
- name: Upload lib-c
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lib-c
|
||||
path: lib-c/*
|
||||
- name: Pack lib-nodejs
|
||||
working-directory: src/lib-nodejs
|
||||
run: npm pack
|
||||
- name: Pack lib-rust
|
||||
run: cargo package -p velopack --allow-dirty
|
||||
- name: Upload lib-nodejs package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lib-nodejs
|
||||
path: src/lib-nodejs/velopack-*.tgz
|
||||
- name: Upload lib-rust package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lib-rust
|
||||
path: target/package/velopack-*.crate
|
||||
|
||||
samples:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample: [CPlusPlusWidgets, CPlusPlusWin32, CSharpAvalonia, CSharpUno, CSharpWpf, NodeJSElectron, RustIced]
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
sample: CPlusPlusWin32
|
||||
- os: macos-latest
|
||||
sample: CPlusPlusWin32
|
||||
- os: ubuntu-latest
|
||||
sample: CSharpWpf
|
||||
- os: macos-latest
|
||||
sample: CSharpWpf
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install wxWidgets (Windows)
|
||||
working-directory: samples/${{ matrix.sample }}
|
||||
run: |
|
||||
curl -L -o wxWidgets-3.2.6-headers.7z https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxWidgets-3.2.6-headers.7z
|
||||
curl -L -o wxMSW-3.2.6_vc14x_x64_Dev.7z https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxMSW-3.2.6_vc14x_x64_Dev.7z
|
||||
curl -L -o wxMSW-3.2.6_vc14x_x64_ReleaseDLL.7z https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxMSW-3.2.6_vc14x_x64_ReleaseDLL.7z
|
||||
7z x wxWidgets-3.2.6-headers.7z -o".\wxWidgets" -y
|
||||
7z x wxMSW-3.2.6_vc14x_x64_Dev.7z -o".\wxWidgets" -y
|
||||
7z x wxMSW-3.2.6_vc14x_x64_ReleaseDLL.7z -o".\wxWidgets" -y
|
||||
dir wxWidgets
|
||||
if: ${{ matrix.sample == 'CPlusPlusWidgets' && matrix.os == 'windows-latest' }}
|
||||
- name: Install wxWidgets (MacOS)
|
||||
run: brew install wxwidgets
|
||||
if: ${{ matrix.sample == 'CPlusPlusWidgets' && matrix.os == 'macos-latest' }}
|
||||
- name: Install wxWidgets (Linux)
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt-cache search libwxgt*
|
||||
sudo apt-cache search libgtk*
|
||||
sudo apt install -y libwxgtk3.2-dev libgtk-3-dev
|
||||
if: ${{ matrix.sample == 'CPlusPlusWidgets' && matrix.os == 'ubuntu-latest' }}
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
- name: Install VPK
|
||||
run: dotnet tool install -g vpk
|
||||
- name: Pack Sample (Windows)
|
||||
working-directory: samples/${{ matrix.sample }}
|
||||
run: .\build.bat 1.0.0
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
- name: Pack Sample (Unix)
|
||||
working-directory: samples/${{ matrix.sample }}
|
||||
run: |
|
||||
chmod 755 ./build.sh
|
||||
./build.sh 1.0.0
|
||||
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' }}
|
||||
build-packages:
|
||||
needs: [build-python, build-rust]
|
||||
uses: ./.github/workflows/build-packages.yml
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [package, test-vpk, test-bins, samples]
|
||||
needs: [build-packages, build-tests, build-samples]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- name: Invoke Release Workflow
|
||||
|
||||
42
.github/workflows/release.yml
vendored
42
.github/workflows/release.yml
vendored
@@ -26,6 +26,11 @@ jobs:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
path: ./
|
||||
|
||||
- name: Load version from file
|
||||
run: |
|
||||
version=$(cat version.txt | xargs)
|
||||
echo "PKG_VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
- name: Download vpk
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
@@ -58,17 +63,26 @@ jobs:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
path: ./lib-c-files
|
||||
|
||||
- name: Load version from file
|
||||
run: |
|
||||
version=$(cat version.txt | xargs)
|
||||
echo "PKG_VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
- name: Create lib-c zip package
|
||||
working-directory: ./lib-c-files
|
||||
run: |
|
||||
mkdir -p ../lib-c
|
||||
zip -r ../lib-c/velopack_libc_$PKG_VERSION.zip .
|
||||
|
||||
- name: Download lib-python
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: lib-python
|
||||
run-id: ${{ github.event.inputs.workflow_run_id }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
path: ./lib-python-files
|
||||
|
||||
- name: Create lib-python zip package
|
||||
working-directory: ./lib-python-files
|
||||
run: |
|
||||
mkdir -p ../lib-python
|
||||
zip -r ../lib-python/velopack_libpython_$PKG_VERSION.zip .
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: ./repo
|
||||
@@ -202,6 +216,7 @@ jobs:
|
||||
gh release upload $currentTag (get-item ../lib-nodejs/*.tgz)
|
||||
gh release upload $currentTag (get-item ../lib-rust/*.crate)
|
||||
gh release upload $currentTag (get-item ../lib-c/*.zip)
|
||||
gh release upload $currentTag (get-item ../lib-python/*.zip)
|
||||
|
||||
- name: Publish NuGet Packages
|
||||
run: |
|
||||
@@ -223,4 +238,19 @@ jobs:
|
||||
rm Cargo.toml.orig
|
||||
rm .cargo_vcs_info.json
|
||||
cargo login ${{ secrets.CARGO_TOKEN }}
|
||||
cargo publish --allow-dirty --no-verify
|
||||
cargo publish --allow-dirty --no-verify
|
||||
|
||||
# - name: Publish to TestPyPI
|
||||
# uses: pypa/gh-action-pypi-publish@release/v1
|
||||
# with:
|
||||
# repository-url: https://test.pypi.org/legacy/
|
||||
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||
# packages-dir: lib-python-files/
|
||||
# verbose: true
|
||||
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
packages-dir: lib-python-files/
|
||||
verbose: true
|
||||
571
Cargo.lock
generated
571
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@ members = [
|
||||
"src/lib-rust",
|
||||
"src/lib-nodejs/velopack_nodeffi",
|
||||
"src/lib-cpp",
|
||||
"src/lib-python",
|
||||
"src/wix-dll",
|
||||
]
|
||||
exclude = [
|
||||
@@ -17,6 +18,7 @@ authors = ["Velopack Ltd, Caelan Sayler <git@caesay.com>"]
|
||||
homepage = "https://velopack.io"
|
||||
repository = "https://github.com/velopack/velopack"
|
||||
documentation = "https://docs.velopack.io"
|
||||
description = "Installer and automatic update framework for cross-platform desktop applications"
|
||||
keywords = ["update", "install", "velopack", "squirrel", "automatic-updates"]
|
||||
categories = ["development-tools"]
|
||||
license = "MIT"
|
||||
@@ -43,7 +45,6 @@ regex = "1.10"
|
||||
normpath = "1.3"
|
||||
bitflags = "2.9"
|
||||
rand = "0.9"
|
||||
ts-rs = "10.0"
|
||||
zstd = "0.13"
|
||||
async-std = "1.13"
|
||||
anyhow = "1.0"
|
||||
@@ -53,7 +54,6 @@ clap = "4.5"
|
||||
chrono = "0.4"
|
||||
wait-timeout = "0.2"
|
||||
strum = { version = "0.27", features = ["derive"] }
|
||||
file-rotate = "0.8"
|
||||
simple-stopwatch = "0.1"
|
||||
enum-flags = "0.4"
|
||||
remove_dir_all = "1.0"
|
||||
@@ -79,7 +79,7 @@ fs_extra = "1.3"
|
||||
memmap2 = "0.9"
|
||||
windows = "0.61"
|
||||
webview2-com-sys = "0.37"
|
||||
cbindgen = "0.28"
|
||||
cbindgen = "0.29"
|
||||
log-panics = "2.1.0"
|
||||
core-foundation = "0.10"
|
||||
core-foundation-sys = "0.8"
|
||||
@@ -88,6 +88,9 @@ walkdir = "2.5"
|
||||
rayon = "1.6"
|
||||
progress-streams = "1.1"
|
||||
flate2 = { version = "1.0", default-features = false }
|
||||
pyo3 = { version = "0.25.0", features = ["extension-module", "macros", "abi3", "abi3-py37", "anyhow"] }
|
||||
pyo3-build-config = "0.25.0"
|
||||
pyo3-log = "0.12.4"
|
||||
winreg = "0.55"
|
||||
|
||||
# default to small, optimized workspace release binaries
|
||||
|
||||
@@ -26,7 +26,7 @@ https://github.com/velopack/velopack/assets/1287295/0ff1bea7-15ed-42ae-8bdd-9519
|
||||
|
||||
## Documentation
|
||||
- 📖 [Read the docs](https://docs.velopack.io/)
|
||||
- ⚡ [Quick start guides](https://docs.velopack.io/category/quick-start)
|
||||
- ⚡ [Quick start guides](https://docs.velopack.io/category/getting-started)
|
||||
- 🕶️ [View example apps](https://docs.velopack.io/category/sample-apps)
|
||||
- 📺 [See website & demo](https://velopack.io/)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Velopack is an installation and auto-update framework for cross-platform applica
|
||||
|
||||
## Documentation
|
||||
- 📖 [Read the docs](https://docs.velopack.io/)
|
||||
- ⚡ [Quick start guides](https://docs.velopack.io/category/quick-start)
|
||||
- ⚡ [Quick start guides](https://docs.velopack.io/category/getting-started)
|
||||
- 🕶️ [View example apps](https://docs.velopack.io/category/sample-apps)
|
||||
- 📺 [See website & demo](https://velopack.io/)
|
||||
|
||||
|
||||
424
samples/NodeJSElectron/package-lock.json
generated
424
samples/NodeJSElectron/package-lock.json
generated
@@ -29,24 +29,24 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.26.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
|
||||
"integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
|
||||
"integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.27.1",
|
||||
"js-tokens": "^4.0.0",
|
||||
"picocolors": "^1.0.0"
|
||||
"picocolors": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-validator-identifier": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
|
||||
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
|
||||
"integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -465,9 +465,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/asar": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.3.1.tgz",
|
||||
"integrity": "sha512-WtpC/+34p0skWZiarRjLAyqaAX78DofhDxnREy/V5XHfu1XEXbFCSSMcDQ6hNCPJFaPy8/NnUgYuf9uiCkvKPg==",
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.4.1.tgz",
|
||||
"integrity": "sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -616,9 +616,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/node-gyp/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -813,9 +813,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/universal/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1128,9 +1128,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/body-parser": {
|
||||
"version": "1.19.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz",
|
||||
"integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==",
|
||||
"version": "1.19.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz",
|
||||
"integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1205,16 +1205,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
||||
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/express": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz",
|
||||
"integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==",
|
||||
"version": "4.17.23",
|
||||
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.23.tgz",
|
||||
"integrity": "sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1276,9 +1276,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/http-errors": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz",
|
||||
"integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==",
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz",
|
||||
"integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -1317,13 +1317,13 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.13.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz",
|
||||
"integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==",
|
||||
"version": "24.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.1.tgz",
|
||||
"integrity": "sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.20.0"
|
||||
"undici-types": "~7.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-forge": {
|
||||
@@ -1337,9 +1337,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/qs": {
|
||||
"version": "6.9.18",
|
||||
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz",
|
||||
"integrity": "sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA==",
|
||||
"version": "6.14.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz",
|
||||
"integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -1368,9 +1368,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/send": {
|
||||
"version": "0.17.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz",
|
||||
"integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==",
|
||||
"version": "0.17.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz",
|
||||
"integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1389,9 +1389,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/serve-static": {
|
||||
"version": "1.15.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz",
|
||||
"integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==",
|
||||
"version": "1.15.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz",
|
||||
"integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1411,9 +1411,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/ws": {
|
||||
"version": "8.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz",
|
||||
"integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==",
|
||||
"version": "8.18.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
|
||||
"integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1648,9 +1648,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.14.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
|
||||
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
|
||||
"version": "8.15.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
|
||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
@@ -2042,9 +2042,9 @@
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
||||
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2066,9 +2066,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.24.4",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
|
||||
"integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
|
||||
"version": "4.25.0",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz",
|
||||
"integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -2086,10 +2086,10 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001688",
|
||||
"electron-to-chromium": "^1.5.73",
|
||||
"caniuse-lite": "^1.0.30001718",
|
||||
"electron-to-chromium": "^1.5.160",
|
||||
"node-releases": "^2.0.19",
|
||||
"update-browserslist-db": "^1.1.1"
|
||||
"update-browserslist-db": "^1.1.3"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "cli.js"
|
||||
@@ -2181,9 +2181,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cacache/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2268,14 +2268,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/call-bound": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz",
|
||||
"integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==",
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
||||
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.1",
|
||||
"get-intrinsic": "^1.2.6"
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"get-intrinsic": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -2306,9 +2306,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001700",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz",
|
||||
"integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==",
|
||||
"version": "1.0.30001723",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001723.tgz",
|
||||
"integrity": "sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -2344,28 +2344,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/chokidar": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
||||
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
|
||||
"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
"readdirp": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.10.0"
|
||||
"node": ">= 14.16.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/chownr": {
|
||||
@@ -2913,9 +2904,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
|
||||
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3769,9 +3760,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.103",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.103.tgz",
|
||||
"integrity": "sha512-P6+XzIkfndgsrjROJWfSvVEgNHtPgbhVyTkwLjUM2HU/h7pZRORgaTlHqfAikqxKmdJMLW8fftrdGWbd/Ds0FA==",
|
||||
"version": "1.5.167",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.167.tgz",
|
||||
"integrity": "sha512-LxcRvnYO5ez2bMOFpbuuVuAI5QNeY1ncVytE/KXaL6ZNfzX1yPlAO0nSOyIHx2fVAuUprMqPs/TdVhUFZy7SIQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
@@ -3797,6 +3788,16 @@
|
||||
"global-agent": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/electron/node_modules/@types/node": {
|
||||
"version": "22.15.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.31.tgz",
|
||||
"integrity": "sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/electron/node_modules/fs-extra": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||
@@ -3832,6 +3833,13 @@
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/electron/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==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/electron/node_modules/universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
@@ -3976,9 +3984,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/es-module-lexer": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
|
||||
"integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==",
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz",
|
||||
"integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -4370,9 +4378,9 @@
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/fastq": {
|
||||
"version": "1.19.0",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz",
|
||||
"integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==",
|
||||
"version": "1.19.1",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
|
||||
"integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
@@ -4569,36 +4577,6 @@
|
||||
"webpack": "^5.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fork-ts-checker-webpack-plugin/node_modules/chokidar": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
|
||||
"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"readdirp": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.16.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/fork-ts-checker-webpack-plugin/node_modules/readdirp": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
|
||||
"integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 14.18.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "individual",
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/forwarded": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
||||
@@ -5085,9 +5063,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/html-entities": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz",
|
||||
"integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==",
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz",
|
||||
"integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -5187,9 +5165,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/http-cache-semantics": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
|
||||
"integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
|
||||
"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,
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
@@ -5218,9 +5196,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/http-parser-js": {
|
||||
"version": "0.5.9",
|
||||
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.9.tgz",
|
||||
"integrity": "sha512-n1XsPy3rXVxlqxVioEWdC+0+M+SQw0DpJynwtOPo1X+ZlvdzTLtDBIJJlDQTnwZIFJrZSzSGmIOUdP8tu+SgLw==",
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.10.tgz",
|
||||
"integrity": "sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -5255,9 +5233,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/http-proxy-middleware": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz",
|
||||
"integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==",
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz",
|
||||
"integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -6422,9 +6400,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.8",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
|
||||
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
|
||||
"version": "3.3.11",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
|
||||
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -7154,9 +7132,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.3",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz",
|
||||
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
|
||||
"version": "8.5.5",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.5.tgz",
|
||||
"integrity": "sha512-d/jtm+rdNT8tpXuHY5MMtcbJFBkhXE6593XVR9UoGCH8jSFGci7jGvMGH5RYd5PBJW+00NZQt6gf7CbagJCrhg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -7174,7 +7152,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.8",
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
},
|
||||
@@ -7606,16 +7584,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
|
||||
"integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
"node": ">= 14.18.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "individual",
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
@@ -7802,9 +7781,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/reusify": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
||||
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
|
||||
"integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -7948,9 +7927,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||
"version": "7.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
@@ -8207,9 +8186,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/shell-quote": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz",
|
||||
"integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==",
|
||||
"version": "1.8.3",
|
||||
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz",
|
||||
"integrity": "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -8356,9 +8335,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/socks": {
|
||||
"version": "2.8.4",
|
||||
"resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz",
|
||||
"integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==",
|
||||
"version": "2.8.5",
|
||||
"resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz",
|
||||
"integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -8676,9 +8655,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tapable": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
||||
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz",
|
||||
"integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -8714,14 +8693,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.39.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz",
|
||||
"integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
|
||||
"version": "5.42.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.42.0.tgz",
|
||||
"integrity": "sha512-UYCvU9YQW2f/Vwl+P0GfhxJxbUGLwd+5QrrGgLajzWAtC/23AX0vcise32kkP7Eu0Wu9VlzzHAXkLObgjQfFlQ==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
"acorn": "^8.8.2",
|
||||
"acorn": "^8.14.0",
|
||||
"commander": "^2.20.0",
|
||||
"source-map-support": "~0.5.20"
|
||||
},
|
||||
@@ -8733,9 +8712,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser-webpack-plugin": {
|
||||
"version": "5.3.11",
|
||||
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz",
|
||||
"integrity": "sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==",
|
||||
"version": "5.3.14",
|
||||
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz",
|
||||
"integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -8805,9 +8784,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/terser-webpack-plugin/node_modules/schema-utils": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz",
|
||||
"integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==",
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz",
|
||||
"integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -9045,9 +9024,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.20.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
||||
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
||||
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -9098,9 +9077,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz",
|
||||
"integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==",
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
||||
"integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -9228,9 +9207,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/watchpack": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
|
||||
"integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
|
||||
"version": "2.4.4",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz",
|
||||
"integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -9269,14 +9248,15 @@
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/webpack": {
|
||||
"version": "5.98.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.98.0.tgz",
|
||||
"integrity": "sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA==",
|
||||
"version": "5.99.9",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.9.tgz",
|
||||
"integrity": "sha512-brOPwM3JnmOa+7kd3NsmOUOwbDAj8FT9xDsG3IW0MgbN9yZV7Oi/s/+MNQ/EcSMqw7qfoRyXPoeEWT8zLVdVGg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/eslint-scope": "^3.7.7",
|
||||
"@types/estree": "^1.0.6",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@webassemblyjs/ast": "^1.14.1",
|
||||
"@webassemblyjs/wasm-edit": "^1.14.1",
|
||||
"@webassemblyjs/wasm-parser": "^1.14.1",
|
||||
@@ -9293,7 +9273,7 @@
|
||||
"loader-runner": "^4.2.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"neo-async": "^2.6.2",
|
||||
"schema-utils": "^4.3.0",
|
||||
"schema-utils": "^4.3.2",
|
||||
"tapable": "^2.1.1",
|
||||
"terser-webpack-plugin": "^5.3.11",
|
||||
"watchpack": "^2.4.1",
|
||||
@@ -9377,9 +9357,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/webpack-dev-middleware/node_modules/schema-utils": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz",
|
||||
"integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==",
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz",
|
||||
"integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -9486,6 +9466,31 @@
|
||||
"ajv": "^8.8.2"
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-server/node_modules/chokidar": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
|
||||
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
"glob-parent": "~5.1.2",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-server/node_modules/ipaddr.js": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz",
|
||||
@@ -9503,10 +9508,23 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/webpack-dev-server/node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
||||
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-server/node_modules/schema-utils": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz",
|
||||
"integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==",
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz",
|
||||
"integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -9524,9 +9542,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-server/node_modules/ws": {
|
||||
"version": "8.18.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz",
|
||||
"integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==",
|
||||
"version": "8.18.2",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz",
|
||||
"integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -9561,9 +9579,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-sources": {
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
|
||||
"integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.2.tgz",
|
||||
"integrity": "sha512-ykKKus8lqlgXX/1WjudpIEjqsafjOTcOJqxnAbMLAu/KCsDCJ6GBtvscewvTkrn24HsnvFwrSCbenFrhtcCsAA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -9608,9 +9626,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/webpack/node_modules/schema-utils": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz",
|
||||
"integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==",
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz",
|
||||
"integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
1083
samples/RustIced/Cargo.lock
generated
1083
samples/RustIced/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -58,7 +58,6 @@ bitflags.workspace = true
|
||||
regex.workspace = true
|
||||
normpath.workspace = true
|
||||
simple-stopwatch.workspace = true
|
||||
file-rotate.workspace = true
|
||||
wait-timeout.workspace = true
|
||||
pretty-bytes-rust.workspace = true
|
||||
enum-flags.workspace = true
|
||||
|
||||
@@ -5,21 +5,17 @@
|
||||
extern crate log;
|
||||
|
||||
use std::{
|
||||
env,
|
||||
os::windows::process::CommandExt,
|
||||
process::{Command as Process, ExitCode},
|
||||
};
|
||||
use velopack::locator::LocationContext;
|
||||
use velopack::logging;
|
||||
use windows::Win32::UI::WindowsAndMessaging::AllowSetForegroundWindow;
|
||||
|
||||
fn main() -> ExitCode {
|
||||
let my_path = std::env::current_exe().unwrap();
|
||||
let default_log_file = {
|
||||
let mut my_dir = env::current_exe().unwrap();
|
||||
my_dir.pop();
|
||||
my_dir.join("Velopack.log")
|
||||
};
|
||||
|
||||
let _ = velopack::logging::init_logging("stub", Some(&default_log_file), false, false, None);
|
||||
let default_log_file = logging::default_logfile_path(LocationContext::IAmUpdateExe);
|
||||
let _ = logging::init_logging("stub", Some(&default_log_file), false, false, None);
|
||||
|
||||
info!("--");
|
||||
info!("Starting Velopack Stub (at {:?})", my_path);
|
||||
|
||||
@@ -5,8 +5,8 @@ var scriptsDir = Assembly.GetEntryAssembly()!
|
||||
.GetCustomAttributes<AssemblyMetadataAttribute>()
|
||||
.Single(x => x.Key == "SelfDir").Value!;
|
||||
|
||||
var librustDir = Path.Combine(scriptsDir, "..", "..", "lib-rust", "src");
|
||||
var libcppDir = Path.Combine(scriptsDir, "..");
|
||||
var librustDir = Path.Combine(scriptsDir, "..", "lib-rust", "src");
|
||||
var libcppDir = Path.Combine(scriptsDir, "..", "lib-cpp");
|
||||
var templatesDir = Path.Combine(scriptsDir, "Templates");
|
||||
var files = Directory.EnumerateFiles(librustDir, "*.rs", SearchOption.AllDirectories);
|
||||
|
||||
@@ -55,20 +55,16 @@ var types = new List<TypeMap>() {
|
||||
TypeMap.RustStruct("VelopackLocatorConfig", "vpkc_locator_config_t"),
|
||||
TypeMap.SystemType("String", "char", "string", "c_char"),
|
||||
TypeMap.SystemType("PathBuf", "char", "string", "c_char"),
|
||||
TypeMap.Primitive("bool", "bool"),
|
||||
TypeMap.Primitive("i32", "int32_t"),
|
||||
TypeMap.Primitive("i64", "int64_t"),
|
||||
TypeMap.Primitive("u32", "uint32_t"),
|
||||
TypeMap.Primitive("u64", "uint64_t"),
|
||||
TypeMap.Primitive("bool", "bool", "boolean"),
|
||||
TypeMap.Primitive("i32", "int32_t", "number"),
|
||||
TypeMap.Primitive("i64", "int64_t", "number"),
|
||||
TypeMap.Primitive("u32", "uint32_t", "number"),
|
||||
TypeMap.Primitive("u64", "uint64_t", "number"),
|
||||
}.ToDictionary(v => v.rustType, v => v);
|
||||
|
||||
var handlebarData = availableStructs.Select(s => new RustStruct_Struct {
|
||||
rust_comment = s.DocComment.ToRustComment(),
|
||||
cpp_comment = s.DocComment.ToCppComment(),
|
||||
struct_rust_name = s.Name,
|
||||
struct_c_name = types[s.Name].interopType,
|
||||
fields = s.Fields.Select(f => {
|
||||
var isString = types[f.Type].rustType == "PathBuf" || types[f.Type].rustType == "String";
|
||||
var handlebarData = availableStructs.Select(s => {
|
||||
var fields = s.Fields.Select(f => {
|
||||
//var isString = types[f.Type].rustType == "PathBuf" || types[f.Type].rustType == "String";
|
||||
var field = new RustStruct_Field {
|
||||
rust_comment = f.DocComment.ToRustComment(),
|
||||
cpp_comment = f.DocComment.ToCppComment(),
|
||||
@@ -78,26 +74,54 @@ var handlebarData = availableStructs.Select(s => new RustStruct_Struct {
|
||||
field_rust_type = f.Type,
|
||||
field_c_type = types[f.Type].interopType,
|
||||
field_cpp_type = types[f.Type].cppType,
|
||||
field_node_type = types[f.Type].nodeType,
|
||||
field_system = types[f.Type].system,
|
||||
field_primitive = types[f.Type].primitive,
|
||||
field_normal = !f.Vec && !types[f.Type].primitive,
|
||||
};
|
||||
return field;
|
||||
}).ToArray(),
|
||||
}).ToArray();
|
||||
|
||||
var opt_ordered_fields = fields
|
||||
.Where(f => !f.field_optional)
|
||||
.Concat(fields.Where(f => f.field_optional))
|
||||
.ToArray();
|
||||
|
||||
var stru = new RustStruct_Struct {
|
||||
rust_comment = s.DocComment.ToRustComment(),
|
||||
cpp_comment = s.DocComment.ToCppComment(),
|
||||
struct_rust_name = s.Name,
|
||||
struct_c_name = types[s.Name].interopType,
|
||||
fields = fields,
|
||||
opt_ordered_fields = opt_ordered_fields,
|
||||
};
|
||||
return stru;
|
||||
}).ToArray();
|
||||
|
||||
// --- rust generation ---
|
||||
string rustTypes = Path.Combine(libcppDir, "src", "types.rs");
|
||||
var rustCTypesTemplate = Handlebars.Compile(File.ReadAllText(Path.Combine(templatesDir, "rust_types.hbs")));
|
||||
var rustCTypes = rustCTypesTemplate(handlebarData);
|
||||
Util.ReplaceTextInFile(rustTypes, "RUST_TYPES", rustCTypes.ToString().ReplaceLineEndings("\n"));
|
||||
|
||||
// --- C++ generation ---
|
||||
string rustCppInclude = Path.Combine(libcppDir, "include", "Velopack.hpp");
|
||||
var cppTypesTemplate = Handlebars.Compile(File.ReadAllText(Path.Combine(templatesDir, "cpp_mapping.hbs")));
|
||||
var cppTypes = cppTypesTemplate(handlebarData);
|
||||
|
||||
Console.WriteLine("Writing all to file");
|
||||
Util.ReplaceTextInFile(rustTypes, "RUST_TYPES", rustCTypes.ToString().ReplaceLineEndings("\n"));
|
||||
Util.ReplaceTextInFile(rustCppInclude, "CPP_TYPES", cppTypes.ToString().ReplaceLineEndings("\n"));
|
||||
|
||||
// --- python generation ---
|
||||
string pythonAssetRs = Path.Combine(scriptsDir, "..", "lib-python", "src", "types.rs");
|
||||
var pythonAssetTemplate = Handlebars.Compile(File.ReadAllText(Path.Combine(templatesDir, "python_asset.hbs")));
|
||||
var pythonAsset = pythonAssetTemplate(handlebarData);
|
||||
File.WriteAllText(pythonAssetRs, pythonAsset.ToString().ReplaceLineEndings("\n"));
|
||||
|
||||
// --- nodejs generation ---
|
||||
var libnodeTypesFile = Path.Combine(scriptsDir, "..", "lib-nodejs", "src", "types.ts");
|
||||
var nodeTemplate = Handlebars.Compile(File.ReadAllText(Path.Combine(templatesDir, "node_types.hbs")));
|
||||
var nodeData = nodeTemplate(handlebarData);
|
||||
File.WriteAllText(libnodeTypesFile, nodeData.ToString().ReplaceLineEndings("\n"));
|
||||
|
||||
return 0;
|
||||
|
||||
class TypeMap
|
||||
@@ -105,6 +129,7 @@ class TypeMap
|
||||
public string rustType;
|
||||
public string cType;
|
||||
public string cppType;
|
||||
public string nodeType;
|
||||
public string interopType;
|
||||
public bool primitive;
|
||||
public bool system;
|
||||
@@ -115,18 +140,20 @@ class TypeMap
|
||||
rustType = rustName,
|
||||
cType = cType,
|
||||
cppType = rustName,
|
||||
nodeType = rustName,
|
||||
interopType = cType,
|
||||
primitive = false,
|
||||
system = false,
|
||||
};
|
||||
}
|
||||
|
||||
public static TypeMap Primitive(string rustName, string cType)
|
||||
public static TypeMap Primitive(string rustName, string cType, string nodeType)
|
||||
{
|
||||
return new TypeMap() {
|
||||
rustType = rustName,
|
||||
cType = cType,
|
||||
cppType = cType,
|
||||
nodeType = nodeType,
|
||||
interopType = rustName,
|
||||
primitive = true,
|
||||
system = false,
|
||||
@@ -139,6 +166,7 @@ class TypeMap
|
||||
rustType = rustName,
|
||||
cType = cType,
|
||||
cppType = cppType,
|
||||
nodeType = cppType,
|
||||
interopType = interopType,
|
||||
primitive = false,
|
||||
system = true,
|
||||
@@ -153,6 +181,7 @@ class RustStruct_Struct
|
||||
public string rust_comment;
|
||||
public string cpp_comment;
|
||||
public RustStruct_Field[] fields;
|
||||
public RustStruct_Field[] opt_ordered_fields;
|
||||
}
|
||||
|
||||
class RustStruct_Field
|
||||
@@ -161,11 +190,13 @@ class RustStruct_Field
|
||||
public string field_c_type;
|
||||
public string field_cpp_type;
|
||||
public string field_rust_type;
|
||||
public string field_node_type;
|
||||
public bool field_primitive;
|
||||
public bool field_optional;
|
||||
public bool field_vector;
|
||||
public bool field_system;
|
||||
public bool field_normal;
|
||||
public bool field_primitive_or_system => field_primitive || field_system;
|
||||
public string rust_comment;
|
||||
public string cpp_comment;
|
||||
}
|
||||
12
src/code-generator/Templates/node_types.hbs
Normal file
12
src/code-generator/Templates/node_types.hbs
Normal file
@@ -0,0 +1,12 @@
|
||||
// This file is auto-generated. Do not edit by hand.
|
||||
|
||||
{{#each this}}
|
||||
{{cpp_comment}}
|
||||
export type {{struct_rust_name}} = {
|
||||
{{#each fields}}
|
||||
{{#indent "cpp_comment" " "}}
|
||||
{{field_name}}{{#if field_optional}}?{{/if}}: {{field_node_type}}{{#if field_vector}}[]{{/if}},
|
||||
{{/each}}
|
||||
}
|
||||
|
||||
{{/each}}
|
||||
92
src/code-generator/Templates/python_asset.hbs
Normal file
92
src/code-generator/Templates/python_asset.hbs
Normal file
@@ -0,0 +1,92 @@
|
||||
// This file is auto-generated. Do not edit by hand.
|
||||
#![allow(non_snake_case)]
|
||||
use pyo3::prelude::*;
|
||||
use velopack::{VelopackAsset, UpdateInfo, UpdateOptions, locator::VelopackLocatorConfig};
|
||||
use std::path::PathBuf;
|
||||
|
||||
{{#each this}}
|
||||
#[pyclass(name = "{{struct_rust_name}}")]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Py{{struct_rust_name}} {
|
||||
{{#each fields}}
|
||||
#[pyo3(get, set)]
|
||||
pub {{field_name}}: {{#if field_vector}}Vec<{{/if}}{{#if field_optional}}Option<{{/if~}}
|
||||
{{~#unless field_primitive_or_system}}Py{{/unless}}{{field_rust_type}}
|
||||
{{~#if field_optional}}>{{/if}}{{#if field_vector}}>{{/if}},
|
||||
{{/each}}
|
||||
}
|
||||
|
||||
#[pymethods]
|
||||
impl Py{{struct_rust_name}} {
|
||||
#[new]
|
||||
#[pyo3(signature = ({{#each opt_ordered_fields}}{{field_name}}{{#if field_optional}} = None{{/if~}}{{#unless @last}}, {{/unless}}{{/each}}))]
|
||||
fn new(
|
||||
{{#each opt_ordered_fields}}{{field_name}}: {{#if field_vector}}Vec<{{/if}}{{#if field_optional}}Option<{{/if~}}
|
||||
{{~#unless field_primitive_or_system}}Py{{/unless}}{{field_rust_type}}
|
||||
{{~#if field_optional}}>{{/if}}{{#if field_vector}}>{{/if}},
|
||||
{{/each}}) -> Self {
|
||||
Self {
|
||||
{{#each fields}}
|
||||
{{#if field_vector}}
|
||||
{{field_name}}: {{field_name}}.into_iter().map(Into::into).collect(),
|
||||
{{/if}}
|
||||
{{#if field_primitive}}
|
||||
{{field_name}}: {{field_name}},
|
||||
{{/if}}
|
||||
{{#if field_optional}}
|
||||
{{field_name}}: {{field_name}}.map(Into::into),
|
||||
{{else}}
|
||||
{{#if field_normal}}
|
||||
{{field_name}}: {{field_name}}.into(),
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<{{struct_rust_name}}> for Py{{struct_rust_name}} {
|
||||
fn from(value: {{struct_rust_name}}) -> Self {
|
||||
Py{{struct_rust_name}} {
|
||||
{{#each fields}}
|
||||
{{#if field_vector}}
|
||||
{{field_name}}: value.{{field_name}}.into_iter().map(Into::into).collect(),
|
||||
{{/if}}
|
||||
{{#if field_primitive}}
|
||||
{{field_name}}: value.{{field_name}},
|
||||
{{/if}}
|
||||
{{#if field_optional}}
|
||||
{{field_name}}: value.{{field_name}}.map(Into::into),
|
||||
{{else}}
|
||||
{{#if field_normal}}
|
||||
{{field_name}}: value.{{field_name}}.into(),
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<{{struct_rust_name}}> for Py{{struct_rust_name}} {
|
||||
fn into(self) -> {{struct_rust_name}} {
|
||||
{{struct_rust_name}} {
|
||||
{{#each fields}}
|
||||
{{#if field_vector}}
|
||||
{{field_name}}: self.{{field_name}}.into_iter().map(Into::into).collect(),
|
||||
{{/if}}
|
||||
{{#if field_primitive}}
|
||||
{{field_name}}: self.{{field_name}},
|
||||
{{/if}}
|
||||
{{#if field_optional}}
|
||||
{{field_name}}: self.{{field_name}}.map(Into::into),
|
||||
{{else}}
|
||||
{{#if field_normal}}
|
||||
{{field_name}}: self.{{field_name}}.into(),
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{{/each}}
|
||||
@@ -3,6 +3,7 @@
|
||||
name = "velopack_libc"
|
||||
publish = false
|
||||
version.workspace = true
|
||||
description.workspace = true
|
||||
authors.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef VELOPACK_H
|
||||
#define VELOPACK_H
|
||||
|
||||
/* Generated with cbindgen:0.28.0 */
|
||||
/* Generated with cbindgen:0.29.0 */
|
||||
|
||||
/* THIS FILE IS AUTO-GENERATED - DO NOT EDIT */
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Velopack.Logging
|
||||
public FileVelopackLogger(string filePath, uint processId)
|
||||
{
|
||||
ProcessId = processId;
|
||||
_fileStream = new FileStream(filePath, FileMode.Append, FileAccess.Write, FileShare.ReadWrite);
|
||||
_fileStream = new FileStream(filePath, FileMode.Append, FileAccess.Write, FileShare.ReadWrite | FileShare.Delete);
|
||||
_writer = new StreamWriter(_fileStream);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Velopack.Sources
|
||||
/// <summary>
|
||||
/// The Bearer or other type of Authorization header used to authenticate against the Api.
|
||||
/// </summary>
|
||||
protected abstract (string Name, string Value) Authorization { get; }
|
||||
protected abstract (string Name, string Value)? Authorization { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Base constructor.
|
||||
@@ -51,17 +51,18 @@ namespace Velopack.Sources
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual Task DownloadReleaseEntry(IVelopackLogger logger, VelopackAsset releaseEntry, string localFile, Action<int> progress, CancellationToken cancelToken)
|
||||
public virtual Task DownloadReleaseEntry(IVelopackLogger logger, VelopackAsset releaseEntry, string localFile, Action<int> progress,
|
||||
CancellationToken cancelToken)
|
||||
{
|
||||
if (releaseEntry is GitBaseAsset githubEntry) {
|
||||
// this might be a browser url or an api url (depending on whether we have a AccessToken or not)
|
||||
// https://docs.github.com/en/rest/reference/releases#get-a-release-asset
|
||||
var assetUrl = GetAssetUrlFromName(githubEntry.Release, releaseEntry.FileName);
|
||||
return Downloader.DownloadFile(assetUrl, localFile, progress,
|
||||
new Dictionary<string, string> {
|
||||
[Authorization.Name] = Authorization.Value,
|
||||
["Accept"] = "application/octet-stream"
|
||||
},
|
||||
return Downloader.DownloadFile(
|
||||
assetUrl,
|
||||
localFile,
|
||||
progress,
|
||||
GetRequestHeaders("application/octet-stream"),
|
||||
cancelToken: cancelToken);
|
||||
}
|
||||
|
||||
@@ -91,11 +92,10 @@ namespace Velopack.Sources
|
||||
logger.Trace(ex.ToString());
|
||||
continue;
|
||||
}
|
||||
var releaseBytes = await Downloader.DownloadBytes(assetUrl,
|
||||
new Dictionary<string, string> {
|
||||
[Authorization.Name] = Authorization.Value,
|
||||
["Accept"] = "application/octet-stream"
|
||||
}
|
||||
|
||||
var releaseBytes = await Downloader.DownloadBytes(
|
||||
assetUrl,
|
||||
GetRequestHeaders("application/octet-stream")
|
||||
).ConfigureAwait(false);
|
||||
var txt = CoreUtil.RemoveByteOrderMarkerIfPresent(releaseBytes);
|
||||
var feed = VelopackAssetFeed.FromJson(txt);
|
||||
@@ -122,6 +122,24 @@ namespace Velopack.Sources
|
||||
/// </summary>
|
||||
protected abstract string GetAssetUrlFromName(T release, string assetName);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a dictionary containing HTTP request headers.
|
||||
/// </summary>
|
||||
/// <param name="accept">The value for the "Accept" header; defaults to "application/json".</param>
|
||||
/// <returns>A dictionary of headers including "Accept" and, if available, authorization headers.</returns>
|
||||
protected virtual Dictionary<string, string> GetRequestHeaders(string accept = "application/json")
|
||||
{
|
||||
var headers = new Dictionary<string, string> {
|
||||
["Accept"] = accept,
|
||||
};
|
||||
if (Authorization.HasValue) {
|
||||
headers.Add(Authorization.Value.Name, Authorization.Value.Value);
|
||||
}
|
||||
|
||||
return headers;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a wrapper around <see cref="VelopackAsset"/> which also contains a Git Release.
|
||||
/// </summary>
|
||||
@@ -146,4 +164,4 @@ namespace Velopack.Sources
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,8 @@ namespace Velopack.Sources
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Authorization"/>
|
||||
protected override (string Name, string Value) Authorization => ("Authorization", $"token {AccessToken}");
|
||||
protected override (string Name, string Value)? Authorization =>
|
||||
string.IsNullOrEmpty(AccessToken) ? null : ("Authorization", $"token {AccessToken}");
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override async Task<GiteaRelease[]> GetReleases(bool includePrereleases)
|
||||
@@ -96,14 +97,9 @@ namespace Velopack.Sources
|
||||
var releasesPath = $"repos{RepoUri.AbsolutePath}/releases?limit={perPage}&page={page}&draft=false";
|
||||
var baseUri = GetApiBaseUrl(RepoUri);
|
||||
var getReleasesUri = new Uri(baseUri, releasesPath);
|
||||
var response = await Downloader.DownloadString(getReleasesUri.ToString(),
|
||||
new Dictionary<string, string> {
|
||||
[Authorization.Name] = Authorization.Value,
|
||||
["Accept"] = "application/json"
|
||||
}
|
||||
).ConfigureAwait(false);
|
||||
var response = await Downloader.DownloadString(getReleasesUri.ToString(), GetRequestHeaders()).ConfigureAwait(false);
|
||||
var releases = CompiledJson.DeserializeGiteaReleaseList(response);
|
||||
if (releases == null) return new GiteaRelease[0];
|
||||
if (releases == null) return Array.Empty<GiteaRelease>();
|
||||
return releases.OrderByDescending(d => d.PublishedAt).Where(x => includePrereleases || !x.Prerelease).ToArray();
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,8 @@ namespace Velopack.Sources
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Authorization"/>
|
||||
protected override (string Name, string Value) Authorization => ("Authorization", $"Bearer {AccessToken}");
|
||||
protected override (string Name, string Value)? Authorization =>
|
||||
string.IsNullOrEmpty(AccessToken) ? null : ("Authorization", $"Bearer {AccessToken}");
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override async Task<GithubRelease[]> GetReleases(bool includePrereleases)
|
||||
@@ -99,11 +100,9 @@ namespace Velopack.Sources
|
||||
var releasesPath = $"repos{RepoUri.AbsolutePath}/releases?per_page={perPage}&page={page}";
|
||||
var baseUri = GetApiBaseUrl(RepoUri);
|
||||
var getReleasesUri = new Uri(baseUri, releasesPath);
|
||||
var response = await Downloader.DownloadString(getReleasesUri.ToString(),
|
||||
new Dictionary<string, string> {
|
||||
[Authorization.Name] = Authorization.Value,
|
||||
["Accept"] = "application/vnd.github.v3+json"
|
||||
}
|
||||
var response = await Downloader.DownloadString(
|
||||
getReleasesUri.ToString(),
|
||||
GetRequestHeaders("application/vnd.github.v3+json")
|
||||
).ConfigureAwait(false);
|
||||
var releases = CompiledJson.DeserializeGithubReleaseList(response);
|
||||
if (releases == null) return Array.Empty<GithubRelease>();
|
||||
@@ -117,7 +116,8 @@ namespace Velopack.Sources
|
||||
throw new ArgumentException($"No assets found in GitHub Release '{release.Name}'.");
|
||||
}
|
||||
|
||||
IEnumerable<GithubReleaseAsset> allReleasesFiles = release.Assets.Where(a => a.Name?.Equals(assetName, StringComparison.InvariantCultureIgnoreCase) == true);
|
||||
IEnumerable<GithubReleaseAsset> allReleasesFiles =
|
||||
release.Assets.Where(a => a.Name?.Equals(assetName, StringComparison.InvariantCultureIgnoreCase) == true);
|
||||
if (!allReleasesFiles.Any()) {
|
||||
throw new ArgumentException($"Could not find asset called '{assetName}' in GitHub Release '{release.Name}'.");
|
||||
}
|
||||
@@ -157,8 +157,9 @@ namespace Velopack.Sources
|
||||
// API location is http://internal.github.server.local/api/v3
|
||||
baseAddress = new Uri(string.Format("{0}{1}{2}/api/v3/", repoUrl.Scheme, Uri.SchemeDelimiter, repoUrl.Host));
|
||||
}
|
||||
|
||||
// above ^^ notice the end slashes for the baseAddress, explained here: http://stackoverflow.com/a/23438417/162694
|
||||
return baseAddress;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,8 @@ namespace Velopack.Sources
|
||||
public class GitlabSource : GitBase<GitlabRelease>
|
||||
{
|
||||
/// <inheritdoc cref="Authorization"/>
|
||||
protected override (string Name, string Value) Authorization => ("PRIVATE-TOKEN", AccessToken ?? string.Empty);
|
||||
protected override (string Name, string Value)? Authorization =>
|
||||
string.IsNullOrEmpty(AccessToken) ? null : ("PRIVATE-TOKEN", AccessToken ?? string.Empty);
|
||||
|
||||
/// <inheritdoc cref="GitlabSource" />
|
||||
/// <param name="repoUrl">
|
||||
@@ -157,17 +158,22 @@ namespace Velopack.Sources
|
||||
const int perPage = 10;
|
||||
const int page = 1;
|
||||
// https://docs.gitlab.com/ee/api/releases/
|
||||
var releasesPath = $"{RepoUri.AbsolutePath}/releases?per_page={perPage}&page={page}";
|
||||
var baseUri = new Uri("https://gitlab.com");
|
||||
var getReleasesUri = new Uri(baseUri, releasesPath);
|
||||
var response = await Downloader.DownloadString(getReleasesUri.ToString(),
|
||||
new Dictionary<string, string> {
|
||||
[Authorization.Name] = Authorization.Value,
|
||||
["Accept"] = "application/json"
|
||||
}).ConfigureAwait(false);
|
||||
var releasesPath = $"releases?per_page={perPage}&page={page}";
|
||||
var getReleasesUri = CombineUri(RepoUri, releasesPath);
|
||||
var response = await Downloader.DownloadString(getReleasesUri.ToString(), GetRequestHeaders()).ConfigureAwait(false);
|
||||
var releases = CompiledJson.DeserializeGitlabReleaseList(response);
|
||||
if (releases == null) return new GitlabRelease[0];
|
||||
if (releases == null) return Array.Empty<GitlabRelease>();
|
||||
return releases.OrderByDescending(d => d.ReleasedAt).Where(x => includePrereleases || !x.UpcomingRelease).ToArray();
|
||||
}
|
||||
|
||||
private static Uri CombineUri(Uri baseUri, string relativePath)
|
||||
{
|
||||
string baseUriStr = baseUri.ToString();
|
||||
|
||||
if (!baseUriStr.EndsWith("/"))
|
||||
baseUriStr += "/";
|
||||
|
||||
return new Uri(baseUriStr + relativePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,48 +18,54 @@ namespace Velopack.Sources
|
||||
public static ProductInfoHeaderValue UserAgent => new("Velopack", VelopackRuntimeInfo.VelopackNugetVersion.ToFullString());
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual async Task DownloadFile(string url, string targetFile, Action<int> progress, IDictionary<string, string>? headers, double timeout, CancellationToken cancelToken = default)
|
||||
public virtual async Task DownloadFile(string url, string targetFile, Action<int> progress, IDictionary<string, string>? headers, double timeout,
|
||||
CancellationToken cancelToken = default)
|
||||
{
|
||||
using var client = CreateHttpClient(headers, timeout);
|
||||
await TryDownloadThenLowercase(
|
||||
async (reqUrl) => {
|
||||
using (var fs = File.Open(targetFile, FileMode.Create)) {
|
||||
await DownloadToStreamInternal(client, reqUrl, fs, progress, cancelToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
try {
|
||||
using (var fs = File.Open(targetFile, FileMode.Create)) {
|
||||
await DownloadToStreamInternal(client, url, fs, progress, cancelToken).ConfigureAwait(false);
|
||||
}
|
||||
} catch {
|
||||
// NB: Some super brain-dead services are case-sensitive yet
|
||||
// corrupt case on upload. I can't even.
|
||||
using (var fs = File.Open(targetFile, FileMode.Create)) {
|
||||
await DownloadToStreamInternal(client, url.ToLower(), fs, progress, cancelToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
url).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual async Task<byte[]> DownloadBytes(string url, IDictionary<string, string>? headers, double timeout)
|
||||
{
|
||||
using var client = CreateHttpClient(headers, timeout);
|
||||
|
||||
try {
|
||||
return await client.GetByteArrayAsync(url).ConfigureAwait(false);
|
||||
} catch {
|
||||
// NB: Some super brain-dead services are case-sensitive yet
|
||||
// corrupt case on upload. I can't even.
|
||||
return await client.GetByteArrayAsync(url.ToLower()).ConfigureAwait(false);
|
||||
}
|
||||
return await TryDownloadThenLowercase(client.GetByteArrayAsync, url).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual async Task<string> DownloadString(string url, IDictionary<string, string>? headers, double timeout)
|
||||
{
|
||||
using var client = CreateHttpClient(headers, timeout);
|
||||
return await TryDownloadThenLowercase(client.GetStringAsync, url).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to download a string from the specified url. If it fails, it will attempt to
|
||||
/// download the string again with the url lowercased. This is useful for services that
|
||||
/// are case-sensitive yet corrupt the case on upload.
|
||||
/// </summary>
|
||||
protected virtual async Task<T> TryDownloadThenLowercase<T>(Func<string, Task<T>> downloadFunc, string url)
|
||||
{
|
||||
try {
|
||||
return await client.GetStringAsync(url).ConfigureAwait(false);
|
||||
return await downloadFunc(url).ConfigureAwait(false);
|
||||
} catch {
|
||||
// NB: Some super brain-dead services are case-sensitive yet
|
||||
// corrupt case on upload. I can't even.
|
||||
return await client.GetStringAsync(url.ToLower()).ConfigureAwait(false);
|
||||
try {
|
||||
// NB: Some super brain-dead services are case-sensitive yet
|
||||
// corrupt case on upload. I can't even.
|
||||
return await downloadFunc(url.ToLower()).ConfigureAwait(false);
|
||||
} catch {
|
||||
// we don't want to throw the "fallback" exception
|
||||
}
|
||||
|
||||
throw; // rethrow the original exception
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +73,8 @@ namespace Velopack.Sources
|
||||
/// Asynchronously downloads a remote url to the specified destination stream while
|
||||
/// providing progress updates.
|
||||
/// </summary>
|
||||
protected virtual async Task DownloadToStreamInternal(HttpClient client, string requestUri, Stream destination, Action<int>? progress = null, CancellationToken cancelToken = default)
|
||||
protected virtual async Task DownloadToStreamInternal(HttpClient client, string requestUri, Stream destination, Action<int>? progress = null,
|
||||
CancellationToken cancelToken = default)
|
||||
{
|
||||
// https://stackoverflow.com/a/46497896/184746
|
||||
// Get the http headers first to examine the content length
|
||||
@@ -128,8 +135,7 @@ namespace Velopack.Sources
|
||||
var client = new HttpClient(CreateHttpClientHandler());
|
||||
client.DefaultRequestHeaders.UserAgent.Add(UserAgent);
|
||||
|
||||
foreach (var header in headers ?? new Dictionary<string, string>())
|
||||
{
|
||||
foreach (var header in headers ?? new Dictionary<string, string>()) {
|
||||
client.DefaultRequestHeaders.Add(header.Key, header.Value);
|
||||
}
|
||||
|
||||
@@ -137,4 +143,4 @@ namespace Velopack.Sources
|
||||
return client;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
331
src/lib-nodejs/package-lock.json
generated
331
src/lib-nodejs/package-lock.json
generated
@@ -42,24 +42,24 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.26.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
|
||||
"integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
|
||||
"integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.27.1",
|
||||
"js-tokens": "^4.0.0",
|
||||
"picocolors": "^1.0.0"
|
||||
"picocolors": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/compat-data": {
|
||||
"version": "7.26.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz",
|
||||
"integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==",
|
||||
"version": "7.27.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz",
|
||||
"integrity": "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -67,22 +67,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/core": {
|
||||
"version": "7.26.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz",
|
||||
"integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==",
|
||||
"version": "7.27.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.4.tgz",
|
||||
"integrity": "sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.26.2",
|
||||
"@babel/generator": "^7.26.9",
|
||||
"@babel/helper-compilation-targets": "^7.26.5",
|
||||
"@babel/helper-module-transforms": "^7.26.0",
|
||||
"@babel/helpers": "^7.26.9",
|
||||
"@babel/parser": "^7.26.9",
|
||||
"@babel/template": "^7.26.9",
|
||||
"@babel/traverse": "^7.26.9",
|
||||
"@babel/types": "^7.26.9",
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
"@babel/generator": "^7.27.3",
|
||||
"@babel/helper-compilation-targets": "^7.27.2",
|
||||
"@babel/helper-module-transforms": "^7.27.3",
|
||||
"@babel/helpers": "^7.27.4",
|
||||
"@babel/parser": "^7.27.4",
|
||||
"@babel/template": "^7.27.2",
|
||||
"@babel/traverse": "^7.27.4",
|
||||
"@babel/types": "^7.27.3",
|
||||
"convert-source-map": "^2.0.0",
|
||||
"debug": "^4.1.0",
|
||||
"gensync": "^1.0.0-beta.2",
|
||||
@@ -98,14 +98,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.26.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz",
|
||||
"integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==",
|
||||
"version": "7.27.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz",
|
||||
"integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.26.9",
|
||||
"@babel/types": "^7.26.9",
|
||||
"@babel/parser": "^7.27.5",
|
||||
"@babel/types": "^7.27.3",
|
||||
"@jridgewell/gen-mapping": "^0.3.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.25",
|
||||
"jsesc": "^3.0.2"
|
||||
@@ -115,14 +115,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-compilation-targets": {
|
||||
"version": "7.26.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz",
|
||||
"integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==",
|
||||
"version": "7.27.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz",
|
||||
"integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/compat-data": "^7.26.5",
|
||||
"@babel/helper-validator-option": "^7.25.9",
|
||||
"@babel/compat-data": "^7.27.2",
|
||||
"@babel/helper-validator-option": "^7.27.1",
|
||||
"browserslist": "^4.24.0",
|
||||
"lru-cache": "^5.1.1",
|
||||
"semver": "^6.3.1"
|
||||
@@ -132,29 +132,29 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-module-imports": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz",
|
||||
"integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz",
|
||||
"integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/traverse": "^7.25.9",
|
||||
"@babel/types": "^7.25.9"
|
||||
"@babel/traverse": "^7.27.1",
|
||||
"@babel/types": "^7.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-module-transforms": {
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz",
|
||||
"integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==",
|
||||
"version": "7.27.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz",
|
||||
"integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.25.9",
|
||||
"@babel/traverse": "^7.25.9"
|
||||
"@babel/helper-module-imports": "^7.27.1",
|
||||
"@babel/helper-validator-identifier": "^7.27.1",
|
||||
"@babel/traverse": "^7.27.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -164,9 +164,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-plugin-utils": {
|
||||
"version": "7.26.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz",
|
||||
"integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz",
|
||||
"integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -174,9 +174,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-string-parser": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
|
||||
"integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
|
||||
"integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -184,9 +184,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-validator-identifier": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
|
||||
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
|
||||
"integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -194,9 +194,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-validator-option": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz",
|
||||
"integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
|
||||
"integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -204,27 +204,27 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helpers": {
|
||||
"version": "7.26.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz",
|
||||
"integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==",
|
||||
"version": "7.27.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz",
|
||||
"integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.26.9",
|
||||
"@babel/types": "^7.26.9"
|
||||
"@babel/template": "^7.27.2",
|
||||
"@babel/types": "^7.27.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.26.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz",
|
||||
"integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==",
|
||||
"version": "7.27.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz",
|
||||
"integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.26.9"
|
||||
"@babel/types": "^7.27.3"
|
||||
},
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
@@ -289,13 +289,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-syntax-import-attributes": {
|
||||
"version": "7.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz",
|
||||
"integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz",
|
||||
"integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
"@babel/helper-plugin-utils": "^7.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -331,13 +331,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-syntax-jsx": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz",
|
||||
"integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz",
|
||||
"integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
"@babel/helper-plugin-utils": "^7.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -457,13 +457,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-syntax-typescript": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz",
|
||||
"integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==",
|
||||
"version": "7.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz",
|
||||
"integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
"@babel/helper-plugin-utils": "^7.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -473,32 +473,32 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/template": {
|
||||
"version": "7.26.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz",
|
||||
"integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==",
|
||||
"version": "7.27.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz",
|
||||
"integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.26.2",
|
||||
"@babel/parser": "^7.26.9",
|
||||
"@babel/types": "^7.26.9"
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
"@babel/parser": "^7.27.2",
|
||||
"@babel/types": "^7.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.26.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz",
|
||||
"integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==",
|
||||
"version": "7.27.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz",
|
||||
"integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.26.2",
|
||||
"@babel/generator": "^7.26.9",
|
||||
"@babel/parser": "^7.26.9",
|
||||
"@babel/template": "^7.26.9",
|
||||
"@babel/types": "^7.26.9",
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
"@babel/generator": "^7.27.3",
|
||||
"@babel/parser": "^7.27.4",
|
||||
"@babel/template": "^7.27.2",
|
||||
"@babel/types": "^7.27.3",
|
||||
"debug": "^4.3.1",
|
||||
"globals": "^11.1.0"
|
||||
},
|
||||
@@ -507,14 +507,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.26.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz",
|
||||
"integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==",
|
||||
"version": "7.27.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz",
|
||||
"integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.25.9"
|
||||
"@babel/helper-string-parser": "^7.27.1",
|
||||
"@babel/helper-validator-identifier": "^7.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -1086,9 +1086,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node20": {
|
||||
"version": "20.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.5.tgz",
|
||||
"integrity": "sha512-Vm8e3WxDTqMGPU4GATF9keQAIy1Drd7bPwlgzKJnZtoOsTm1tduUTbDjg0W5qERvGuxPI2h9RbMufH0YdfBylA==",
|
||||
"version": "20.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.6.tgz",
|
||||
"integrity": "sha512-sz+Hqx9zwZDpZIV871WSbUzSqNIsXzghZydypnfgzPKLltVJfkINfUeTct31n/tTSa9ZE1ZOfKdRre1uHHquYQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -1107,9 +1107,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__generator": {
|
||||
"version": "7.6.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",
|
||||
"integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",
|
||||
"version": "7.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz",
|
||||
"integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1128,9 +1128,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__traverse": {
|
||||
"version": "7.20.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz",
|
||||
"integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==",
|
||||
"version": "7.20.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz",
|
||||
"integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1186,9 +1186,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.15.21",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz",
|
||||
"integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==",
|
||||
"version": "22.15.31",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.31.tgz",
|
||||
"integrity": "sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1220,9 +1220,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.14.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
|
||||
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
|
||||
"version": "8.15.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
|
||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
@@ -1459,9 +1459,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
||||
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1483,9 +1483,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.24.4",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
|
||||
"integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
|
||||
"version": "4.25.0",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz",
|
||||
"integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1503,10 +1503,10 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001688",
|
||||
"electron-to-chromium": "^1.5.73",
|
||||
"caniuse-lite": "^1.0.30001718",
|
||||
"electron-to-chromium": "^1.5.160",
|
||||
"node-releases": "^2.0.19",
|
||||
"update-browserslist-db": "^1.1.1"
|
||||
"update-browserslist-db": "^1.1.3"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "cli.js"
|
||||
@@ -1566,9 +1566,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001700",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz",
|
||||
"integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==",
|
||||
"version": "1.0.30001723",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001723.tgz",
|
||||
"integrity": "sha512-1R/elMjtehrFejxwmexeXAtae5UO9iSyFn6G/I806CYC/BLyyBk1EPhrKBkWhy6wM6Xnm47dSJQec+tLJ39WHw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1767,9 +1767,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
|
||||
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1785,9 +1785,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/dedent": {
|
||||
"version": "1.5.3",
|
||||
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz",
|
||||
"integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==",
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz",
|
||||
"integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
@@ -1898,9 +1898,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.103",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.103.tgz",
|
||||
"integrity": "sha512-P6+XzIkfndgsrjROJWfSvVEgNHtPgbhVyTkwLjUM2HU/h7pZRORgaTlHqfAikqxKmdJMLW8fftrdGWbd/Ds0FA==",
|
||||
"version": "1.5.167",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.167.tgz",
|
||||
"integrity": "sha512-LxcRvnYO5ez2bMOFpbuuVuAI5QNeY1ncVytE/KXaL6ZNfzX1yPlAO0nSOyIHx2fVAuUprMqPs/TdVhUFZy7SIQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
@@ -2043,9 +2043,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fastq": {
|
||||
"version": "1.19.0",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz",
|
||||
"integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==",
|
||||
"version": "1.19.1",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
|
||||
"integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
@@ -2073,9 +2073,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/filelist/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2311,9 +2311,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ignore": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz",
|
||||
"integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==",
|
||||
"version": "7.0.5",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
|
||||
"integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2519,9 +2519,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/istanbul-lib-instrument/node_modules/semver": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||
"version": "7.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
@@ -3127,9 +3127,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/jest-snapshot/node_modules/semver": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||
"version": "7.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
@@ -3368,9 +3368,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/make-dir/node_modules/semver": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||
"version": "7.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
@@ -3699,9 +3699,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/pirates": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
|
||||
"integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
|
||||
"integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3889,9 +3889,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/reusify": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
||||
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
|
||||
"integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -4161,16 +4161,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ts-jest": {
|
||||
"version": "29.3.4",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.4.tgz",
|
||||
"integrity": "sha512-Iqbrm8IXOmV+ggWHOTEbjwyCf2xZlUMv5npExksXohL+tk8va4Fjhb+X2+Rt9NBmgO7bJ8WpnMLOwih/DnMlFA==",
|
||||
"version": "29.4.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz",
|
||||
"integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bs-logger": "^0.2.6",
|
||||
"ejs": "^3.1.10",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
"jest-util": "^29.0.0",
|
||||
"json5": "^2.2.3",
|
||||
"lodash.memoize": "^4.1.2",
|
||||
"make-error": "^1.3.6",
|
||||
@@ -4186,10 +4185,11 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.0 <8",
|
||||
"@jest/transform": "^29.0.0",
|
||||
"@jest/types": "^29.0.0",
|
||||
"babel-jest": "^29.0.0",
|
||||
"jest": "^29.0.0",
|
||||
"@jest/transform": "^29.0.0 || ^30.0.0",
|
||||
"@jest/types": "^29.0.0 || ^30.0.0",
|
||||
"babel-jest": "^29.0.0 || ^30.0.0",
|
||||
"jest": "^29.0.0 || ^30.0.0",
|
||||
"jest-util": "^29.0.0 || ^30.0.0",
|
||||
"typescript": ">=4.3 <6"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
@@ -4207,6 +4207,9 @@
|
||||
},
|
||||
"esbuild": {
|
||||
"optional": true
|
||||
},
|
||||
"jest-util": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4338,9 +4341,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz",
|
||||
"integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==",
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
||||
"integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { VelopackAsset } from "./VelopackAsset";
|
||||
|
||||
/**
|
||||
* Holds information about the current version and pending updates, such as how many there are, and access to release notes.
|
||||
*/
|
||||
export type UpdateInfo = {
|
||||
/**
|
||||
* The available version that we are updating to.
|
||||
*/
|
||||
TargetFullRelease: VelopackAsset,
|
||||
/**
|
||||
* The base release that this update is based on. This is only available if the update is a delta update.
|
||||
*/
|
||||
BaseRelease: VelopackAsset | null,
|
||||
/**
|
||||
* The list of delta updates that can be applied to the base version to get to the target version.
|
||||
*/
|
||||
DeltasToTarget: Array<VelopackAsset>,
|
||||
/**
|
||||
* True if the update is a version downgrade or lateral move (such as when switching channels to the same version number).
|
||||
* In this case, only full updates are allowed, and any local packages on disk newer than the downloaded version will be
|
||||
* deleted.
|
||||
*/
|
||||
IsDowngrade: boolean, };
|
||||
@@ -1,28 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Options to customise the behaviour of UpdateManager.
|
||||
*/
|
||||
export type UpdateOptions = {
|
||||
/**
|
||||
* Allows UpdateManager to update to a version that's lower than the current version (i.e. downgrading).
|
||||
* This could happen if a release has bugs and was retracted from the release feed, or if you're using
|
||||
* ExplicitChannel to switch channels to another channel where the latest version on that
|
||||
* channel is lower than the current version.
|
||||
*/
|
||||
AllowVersionDowngrade: boolean,
|
||||
/**
|
||||
* **This option should usually be left None**.
|
||||
* Overrides the default channel used to fetch updates.
|
||||
* The default channel will be whatever channel was specified on the command line when building this release.
|
||||
* For example, if the current release was packaged with '--channel beta', then the default channel will be 'beta'.
|
||||
* This allows users to automatically receive updates from the same channel they installed from. This options
|
||||
* allows you to explicitly switch channels, for example if the user wished to switch back to the 'stable' channel
|
||||
* without having to reinstall the application.
|
||||
*/
|
||||
ExplicitChannel: string | null,
|
||||
/**
|
||||
* Sets the maximum number of deltas to consider before falling back to a full update.
|
||||
* The default is 10. Set to a negative number (eg. -1) to disable deltas.
|
||||
*/
|
||||
MaximumDeltasBeforeFallback: number, };
|
||||
@@ -1,42 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* An individual Velopack asset, could refer to an asset on-disk or in a remote package feed.
|
||||
*/
|
||||
export type VelopackAsset = {
|
||||
/**
|
||||
* The name or Id of the package containing this release.
|
||||
*/
|
||||
PackageId: string,
|
||||
/**
|
||||
* The version of this release.
|
||||
*/
|
||||
Version: string,
|
||||
/**
|
||||
* The type of asset (eg. "Full" or "Delta").
|
||||
*/
|
||||
Type: string,
|
||||
/**
|
||||
* The filename of the update package containing this release.
|
||||
*/
|
||||
FileName: string,
|
||||
/**
|
||||
* The SHA1 checksum of the update package containing this release.
|
||||
*/
|
||||
SHA1: string,
|
||||
/**
|
||||
* The SHA256 checksum of the update package containing this release.
|
||||
*/
|
||||
SHA256: string,
|
||||
/**
|
||||
* The size in bytes of the update package containing this release.
|
||||
*/
|
||||
Size: bigint,
|
||||
/**
|
||||
* The release notes in markdown format, as passed to Velopack when packaging the release. This may be an empty string.
|
||||
*/
|
||||
NotesMarkdown: string,
|
||||
/**
|
||||
* The release notes in HTML format, transformed from Markdown when packaging the release. This may be an empty string.
|
||||
*/
|
||||
NotesHtml: string, };
|
||||
@@ -1,30 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* VelopackLocator provides some utility functions for locating the current app important paths (eg. path to packages, update binary, and so forth).
|
||||
*/
|
||||
export type VelopackLocatorConfig = {
|
||||
/**
|
||||
* The root directory of the current app.
|
||||
*/
|
||||
RootAppDir: string,
|
||||
/**
|
||||
* The path to the Update.exe binary.
|
||||
*/
|
||||
UpdateExePath: string,
|
||||
/**
|
||||
* The path to the packages' directory.
|
||||
*/
|
||||
PackagesDir: string,
|
||||
/**
|
||||
* The current app manifest.
|
||||
*/
|
||||
ManifestPath: string,
|
||||
/**
|
||||
* The directory containing the application's user binaries.
|
||||
*/
|
||||
CurrentBinaryDir: string,
|
||||
/**
|
||||
* Whether the current application is portable or installed.
|
||||
*/
|
||||
IsPortable: boolean, };
|
||||
@@ -1,9 +1,7 @@
|
||||
import * as addon from "./load";
|
||||
import type { UpdateInfo } from "./bindings/UpdateInfo";
|
||||
import type { UpdateOptions } from "./bindings/UpdateOptions";
|
||||
import type { VelopackLocatorConfig } from "./bindings/VelopackLocatorConfig";
|
||||
|
||||
export { UpdateInfo, UpdateOptions, VelopackLocatorConfig };
|
||||
import type { UpdateInfo, UpdateOptions, VelopackLocatorConfig, VelopackAsset } from "./types";
|
||||
export { UpdateInfo, UpdateOptions, VelopackLocatorConfig, VelopackAsset };
|
||||
|
||||
type UpdateManagerOpaque = {};
|
||||
declare module "./load" {
|
||||
|
||||
82
src/lib-nodejs/src/types.ts
Normal file
82
src/lib-nodejs/src/types.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
// This file is auto-generated. Do not edit by hand.
|
||||
|
||||
/** VelopackLocator provides some utility functions for locating the current app important paths (eg. path to packages, update binary, and so forth). */
|
||||
export type VelopackLocatorConfig = {
|
||||
/** The root directory of the current app. */
|
||||
RootAppDir: string,
|
||||
/** The path to the Update.exe binary. */
|
||||
UpdateExePath: string,
|
||||
/** The path to the packages' directory. */
|
||||
PackagesDir: string,
|
||||
/** The current app manifest. */
|
||||
ManifestPath: string,
|
||||
/** The directory containing the application's user binaries. */
|
||||
CurrentBinaryDir: string,
|
||||
/** Whether the current application is portable or installed. */
|
||||
IsPortable: boolean,
|
||||
}
|
||||
|
||||
/** An individual Velopack asset, could refer to an asset on-disk or in a remote package feed. */
|
||||
export type VelopackAsset = {
|
||||
/** The name or Id of the package containing this release. */
|
||||
PackageId: string,
|
||||
/** The version of this release. */
|
||||
Version: string,
|
||||
/** The type of asset (eg. "Full" or "Delta"). */
|
||||
Type: string,
|
||||
/** The filename of the update package containing this release. */
|
||||
FileName: string,
|
||||
/** The SHA1 checksum of the update package containing this release. */
|
||||
SHA1: string,
|
||||
/** The SHA256 checksum of the update package containing this release. */
|
||||
SHA256: string,
|
||||
/** The size in bytes of the update package containing this release. */
|
||||
Size: number,
|
||||
/** The release notes in markdown format, as passed to Velopack when packaging the release. This may be an empty string. */
|
||||
NotesMarkdown: string,
|
||||
/** The release notes in HTML format, transformed from Markdown when packaging the release. This may be an empty string. */
|
||||
NotesHtml: string,
|
||||
}
|
||||
|
||||
/** Holds information about the current version and pending updates, such as how many there are, and access to release notes. */
|
||||
export type UpdateInfo = {
|
||||
/** The available version that we are updating to. */
|
||||
TargetFullRelease: VelopackAsset,
|
||||
/** The base release that this update is based on. This is only available if the update is a delta update. */
|
||||
BaseRelease?: VelopackAsset,
|
||||
/** The list of delta updates that can be applied to the base version to get to the target version. */
|
||||
DeltasToTarget: VelopackAsset[],
|
||||
/**
|
||||
* True if the update is a version downgrade or lateral move (such as when switching channels to the same version number).
|
||||
* In this case, only full updates are allowed, and any local packages on disk newer than the downloaded version will be
|
||||
* deleted.
|
||||
*/
|
||||
IsDowngrade: boolean,
|
||||
}
|
||||
|
||||
/** Options to customise the behaviour of UpdateManager. */
|
||||
export type UpdateOptions = {
|
||||
/**
|
||||
* Allows UpdateManager to update to a version that's lower than the current version (i.e. downgrading).
|
||||
* This could happen if a release has bugs and was retracted from the release feed, or if you're using
|
||||
* ExplicitChannel to switch channels to another channel where the latest version on that
|
||||
* channel is lower than the current version.
|
||||
*/
|
||||
AllowVersionDowngrade: boolean,
|
||||
/**
|
||||
* **This option should usually be left None**.
|
||||
* Overrides the default channel used to fetch updates.
|
||||
* The default channel will be whatever channel was specified on the command line when building this release.
|
||||
* For example, if the current release was packaged with '--channel beta', then the default channel will be 'beta'.
|
||||
* This allows users to automatically receive updates from the same channel they installed from. This options
|
||||
* allows you to explicitly switch channels, for example if the user wished to switch back to the 'stable' channel
|
||||
* without having to reinstall the application.
|
||||
*/
|
||||
ExplicitChannel?: string,
|
||||
/**
|
||||
* Sets the maximum number of deltas to consider before falling back to a full update.
|
||||
* The default is 10. Set to a negative number (eg. -1) to disable deltas.
|
||||
*/
|
||||
MaximumDeltasBeforeFallback: number,
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ exclude = ["index.node"]
|
||||
publish = false
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
description.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
documentation.workspace = true
|
||||
@@ -23,8 +24,4 @@ semver.workspace = true
|
||||
log.workspace = true
|
||||
simplelog.workspace = true
|
||||
lazy_static.workspace = true
|
||||
neon.workspace = true
|
||||
|
||||
[build-dependencies]
|
||||
velopack = { workspace = true, features = ["typescript"] }
|
||||
ts-rs.workspace = true
|
||||
neon.workspace = true
|
||||
@@ -1,12 +0,0 @@
|
||||
use std::{env, path::Path};
|
||||
use locator::VelopackLocatorConfig;
|
||||
use ts_rs::TS;
|
||||
use velopack::*;
|
||||
|
||||
fn main() {
|
||||
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
let bindings_dir = Path::new(&manifest_dir).join("..").join("src").join("bindings");
|
||||
UpdateInfo::export_all_to(&bindings_dir).unwrap();
|
||||
UpdateOptions::export_all_to(&bindings_dir).unwrap();
|
||||
VelopackLocatorConfig::export_all_to(&bindings_dir).unwrap();
|
||||
}
|
||||
201
src/lib-python/.gitignore
vendored
Normal file
201
src/lib-python/.gitignore
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
build/*
|
||||
dist/*
|
||||
Releases/*
|
||||
*.zip
|
||||
*.tar.gz
|
||||
test/app_version.py
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# UV
|
||||
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
#uv.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
||||
.pdm.toml
|
||||
.pdm-python
|
||||
.pdm-build/
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
# Abstra
|
||||
# Abstra is an AI-powered process automation framework.
|
||||
# Ignore directories containing user credentials, local state, and settings.
|
||||
# Learn more at https://abstra.io/docs
|
||||
.abstra/
|
||||
|
||||
# Visual Studio Code
|
||||
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
||||
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
||||
# you could uncomment the following to ignore the entire vscode folder
|
||||
# .vscode/
|
||||
|
||||
# Ruff stuff:
|
||||
.ruff_cache/
|
||||
|
||||
# PyPI configuration file
|
||||
.pypirc
|
||||
|
||||
# Cursor
|
||||
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
||||
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
||||
# refer to https://docs.cursor.com/context/ignore-files
|
||||
.cursorignore
|
||||
.cursorindexingignore
|
||||
24
src/lib-python/Cargo.toml
Normal file
24
src/lib-python/Cargo.toml
Normal file
@@ -0,0 +1,24 @@
|
||||
[package]
|
||||
name = "velopack_python"
|
||||
publish = false
|
||||
authors.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
description.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
velopack.workspace = true
|
||||
pyo3.workspace = true
|
||||
pyo3-log.workspace = true
|
||||
|
||||
[build-dependencies]
|
||||
pyo3-build-config.workspace = true
|
||||
21
src/lib-python/README.md
Normal file
21
src/lib-python/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
# Prerequisites
|
||||
- Install UV
|
||||
https://docs.astral.sh/uv/getting-started/installation/
|
||||
- If you have rust already, you can build from source with:
|
||||
```
|
||||
cargo install --git https://github.com/astral-sh/uv uv
|
||||
```
|
||||
- Also can use winget for a pre-compiled version:
|
||||
```
|
||||
winget install --id=astral-sh.uv -e
|
||||
```
|
||||
|
||||
# Running the tests
|
||||
- `uv sync`
|
||||
- `cd test`
|
||||
- `uv run python run_test.py`
|
||||
|
||||
# Building / Publishing
|
||||
|
||||
- uv build
|
||||
3
src/lib-python/build.rs
Normal file
3
src/lib-python/build.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
pyo3_build_config::add_extension_module_link_args();
|
||||
}
|
||||
21
src/lib-python/pyproject.toml
Normal file
21
src/lib-python/pyproject.toml
Normal file
@@ -0,0 +1,21 @@
|
||||
[project]
|
||||
dynamic = ["description", "authors", "license"]
|
||||
name = "velopack"
|
||||
requires-python = ">=3.8"
|
||||
version = "0.0.1"
|
||||
|
||||
[build-system]
|
||||
requires = ["maturin>=1.0,<2.0"]
|
||||
build-backend = "maturin"
|
||||
|
||||
[tool.maturin]
|
||||
module-name = "velopack"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"maturin>=1.8.6",
|
||||
"pyinstaller>=6.13.0",
|
||||
]
|
||||
test = [
|
||||
"pyinstaller>=6.13.0",
|
||||
]
|
||||
176
src/lib-python/src/app.rs
Normal file
176
src/lib-python/src/app.rs
Normal file
@@ -0,0 +1,176 @@
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyCFunction;
|
||||
|
||||
use velopack::VelopackApp as VelopackAppRust;
|
||||
|
||||
/// Python wrapper for VelopackApp with builder pattern
|
||||
#[pyclass(name = "App")]
|
||||
pub struct VelopackAppWrapper {
|
||||
// We'll store the callbacks as Python objects
|
||||
install_hook: Option<Py<PyCFunction>>,
|
||||
update_hook: Option<Py<PyCFunction>>,
|
||||
obsolete_hook: Option<Py<PyCFunction>>,
|
||||
uninstall_hook: Option<Py<PyCFunction>>,
|
||||
firstrun_hook: Option<Py<PyCFunction>>,
|
||||
restarted_hook: Option<Py<PyCFunction>>,
|
||||
auto_apply: bool,
|
||||
args: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[pymethods]
|
||||
impl VelopackAppWrapper {
|
||||
/// Create a new VelopackApp builder
|
||||
#[new]
|
||||
pub fn new() -> Self {
|
||||
VelopackAppWrapper {
|
||||
install_hook: None,
|
||||
update_hook: None,
|
||||
obsolete_hook: None,
|
||||
uninstall_hook: None,
|
||||
firstrun_hook: None,
|
||||
restarted_hook: None,
|
||||
auto_apply: true,
|
||||
args: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Override the command line arguments used by VelopackApp
|
||||
pub fn set_args(mut slf: PyRefMut<Self>, args: Vec<String>) -> PyRefMut<Self> {
|
||||
slf.args = Some(args);
|
||||
slf
|
||||
}
|
||||
|
||||
/// Set whether to automatically apply downloaded updates on startup
|
||||
pub fn set_auto_apply_on_startup(mut slf: PyRefMut<Self>, apply: bool) -> PyRefMut<Self> {
|
||||
slf.auto_apply = apply;
|
||||
slf
|
||||
}
|
||||
|
||||
/// This hook is triggered when the application is started for the first time after installation
|
||||
pub fn on_first_run(mut slf: PyRefMut<Self>, callback: Py<PyCFunction>) -> PyRefMut<Self> {
|
||||
slf.firstrun_hook = Some(callback);
|
||||
slf
|
||||
}
|
||||
|
||||
/// This hook is triggered when the application is restarted by Velopack after installing updates
|
||||
pub fn on_restarted(mut slf: PyRefMut<Self>, callback: Py<PyCFunction>) -> PyRefMut<Self> {
|
||||
slf.restarted_hook = Some(callback);
|
||||
slf
|
||||
}
|
||||
|
||||
/// Fast callback hook for after installation (Windows only)
|
||||
pub fn on_after_install_fast_callback(mut slf: PyRefMut<Self>, callback: Py<PyCFunction>) -> PyRefMut<Self> {
|
||||
slf.install_hook = Some(callback);
|
||||
slf
|
||||
}
|
||||
|
||||
/// Fast callback hook for after update (Windows only)
|
||||
pub fn on_after_update_fast_callback(mut slf: PyRefMut<Self>, callback: Py<PyCFunction>) -> PyRefMut<Self> {
|
||||
slf.update_hook = Some(callback);
|
||||
slf
|
||||
}
|
||||
|
||||
/// Fast callback hook for before update (Windows only)
|
||||
pub fn on_before_update_fast_callback(mut slf: PyRefMut<Self>, callback: Py<PyCFunction>) -> PyRefMut<Self> {
|
||||
slf.obsolete_hook = Some(callback);
|
||||
slf
|
||||
}
|
||||
|
||||
/// Fast callback hook for before uninstall (Windows only)
|
||||
pub fn on_before_uninstall_fast_callback(mut slf: PyRefMut<Self>, callback: Py<PyCFunction>) -> PyRefMut<Self> {
|
||||
slf.uninstall_hook = Some(callback);
|
||||
slf
|
||||
}
|
||||
|
||||
/// Runs the Velopack startup logic
|
||||
pub fn run(&mut self, _py: Python) -> PyResult<()> {
|
||||
// Create the Rust VelopackApp with our stored configuration
|
||||
let mut app = VelopackAppRust::build().set_auto_apply_on_startup(self.auto_apply);
|
||||
|
||||
// Set args if provided
|
||||
if let Some(ref args) = self.args {
|
||||
app = app.set_args(args.clone());
|
||||
}
|
||||
|
||||
// Set up hooks - we need to convert Python callbacks to Rust closures
|
||||
if let Some(ref hook) = self.firstrun_hook {
|
||||
let hook_clone = hook;
|
||||
app = app.on_first_run(move |version| {
|
||||
Python::with_gil(|py| {
|
||||
let version_str = version.to_string();
|
||||
if let Err(e) = hook_clone.call1(py, (version_str,)) {
|
||||
eprintln!("Error calling first_run hook: {:?}", e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(ref hook) = self.restarted_hook {
|
||||
let hook_clone = hook;
|
||||
app = app.on_restarted(move |version| {
|
||||
Python::with_gil(|py| {
|
||||
let version_str = version.to_string();
|
||||
if let Err(e) = hook_clone.call1(py, (version_str,)) {
|
||||
eprintln!("Error calling restarted hook: {:?}", e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
if let Some(ref hook) = self.install_hook {
|
||||
let hook_clone = hook;
|
||||
app = app.on_after_install_fast_callback(move |version| {
|
||||
Python::with_gil(|py| {
|
||||
let version_str = version.to_string();
|
||||
if let Err(e) = hook_clone.call1(py, (version_str,)) {
|
||||
eprintln!("Error calling install hook: {:?}", e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(ref hook) = self.update_hook {
|
||||
let hook_clone = hook;
|
||||
app = app.on_after_update_fast_callback(move |version| {
|
||||
Python::with_gil(|py| {
|
||||
let version_str = version.to_string();
|
||||
if let Err(e) = hook_clone.call1(py, (version_str,)) {
|
||||
eprintln!("Error calling update hook: {:?}", e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(ref hook) = self.obsolete_hook {
|
||||
let hook_clone = hook;
|
||||
app = app.on_before_update_fast_callback(move |version| {
|
||||
Python::with_gil(|py| {
|
||||
let version_str = version.to_string();
|
||||
if let Err(e) = hook_clone.call1(py, (version_str,)) {
|
||||
eprintln!("Error calling obsolete hook: {:?}", e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if let Some(ref hook) = self.uninstall_hook {
|
||||
let hook_clone = hook;
|
||||
app = app.on_before_uninstall_fast_callback(move |version| {
|
||||
Python::with_gil(|py| {
|
||||
let version_str = version.to_string();
|
||||
if let Err(e) = hook_clone.call1(py, (version_str,)) {
|
||||
eprintln!("Error calling uninstall hook: {:?}", e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// do not Release the GIL before calling the potentially blocking run method
|
||||
app.run();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
35
src/lib-python/src/lib.rs
Normal file
35
src/lib-python/src/lib.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::PyModule;
|
||||
|
||||
mod types;
|
||||
use types::*;
|
||||
|
||||
mod app;
|
||||
use app::VelopackAppWrapper;
|
||||
|
||||
mod manager;
|
||||
use manager::UpdateManagerWrapper;
|
||||
|
||||
#[pymodule]
|
||||
#[pyo3(name = "velopack")]
|
||||
fn velopack(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
||||
pyo3_log::init();
|
||||
|
||||
// auto-generated DTO's
|
||||
m.add_class::<PyVelopackAsset>()?;
|
||||
m.add_class::<PyUpdateInfo>()?;
|
||||
m.add_class::<PyUpdateOptions>()?;
|
||||
m.add_class::<PyVelopackLocatorConfig>()?;
|
||||
|
||||
// concrete classes
|
||||
m.add_class::<VelopackAppWrapper>()?;
|
||||
m.add_class::<UpdateManagerWrapper>()?;
|
||||
|
||||
// add __version__ attribute
|
||||
m.add("__version__", env!("CARGO_PKG_VERSION"))?;
|
||||
|
||||
// add __author__ attribute
|
||||
m.add("__author__", env!("CARGO_PKG_AUTHORS"))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
80
src/lib-python/src/manager.rs
Normal file
80
src/lib-python/src/manager.rs
Normal file
@@ -0,0 +1,80 @@
|
||||
use anyhow::Result;
|
||||
use pyo3::prelude::*;
|
||||
use std::sync::mpsc;
|
||||
use std::thread;
|
||||
|
||||
use velopack::sources::AutoSource;
|
||||
use velopack::{UpdateCheck, UpdateInfo, UpdateManager as VelopackUpdateManagerRust};
|
||||
|
||||
use crate::types::*;
|
||||
|
||||
#[pyclass(name = "UpdateManager")]
|
||||
pub struct UpdateManagerWrapper {
|
||||
inner: VelopackUpdateManagerRust,
|
||||
}
|
||||
|
||||
#[pymethods]
|
||||
impl UpdateManagerWrapper {
|
||||
#[new]
|
||||
#[pyo3(signature = (source, options = None, locator = None))]
|
||||
pub fn new(source: String, options: Option<PyUpdateOptions>, locator: Option<PyVelopackLocatorConfig>) -> Result<Self> {
|
||||
let source = AutoSource::new(&source);
|
||||
// set myinner to a new VelopackUpdateManager with the source
|
||||
let inner = VelopackUpdateManagerRust::new(source, options.map(Into::into), locator.map(Into::into))?;
|
||||
Ok(UpdateManagerWrapper { inner })
|
||||
}
|
||||
|
||||
pub fn check_for_updates(&mut self) -> Result<Option<PyUpdateInfo>> {
|
||||
let update_check = self.inner.check_for_updates()?;
|
||||
match update_check {
|
||||
UpdateCheck::UpdateAvailable(updates) => {
|
||||
let py_updates = PyUpdateInfo::from(updates);
|
||||
Ok(Some(py_updates))
|
||||
}
|
||||
UpdateCheck::NoUpdateAvailable => Ok(None),
|
||||
UpdateCheck::RemoteIsEmpty => Ok(None),
|
||||
}
|
||||
}
|
||||
|
||||
#[pyo3(signature = (update_info, progress_callback = None))]
|
||||
pub fn download_updates(&mut self, update_info: &PyUpdateInfo, progress_callback: Option<PyObject>) -> Result<()> {
|
||||
// Convert PyUpdateInfo back to rust UpdateInfo
|
||||
let rust_update_info: UpdateInfo = update_info.clone().into();
|
||||
|
||||
if let Some(callback) = progress_callback {
|
||||
// Create a channel for progress updates
|
||||
let (sender, receiver) = mpsc::channel::<i16>();
|
||||
|
||||
// Spawn a thread to handle progress updates
|
||||
let progress_thread = thread::spawn(move || {
|
||||
Python::with_gil(|py| {
|
||||
while let Ok(progress) = receiver.recv() {
|
||||
if let Err(e) = callback.call1(py, (progress,)) {
|
||||
// Log error but continue - don't break the download
|
||||
eprintln!("Progress callback error: {}", e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Call download with the sender
|
||||
let result = self.inner.download_updates(&rust_update_info, Some(sender))?;
|
||||
|
||||
// Wait for the progress thread to finish
|
||||
let _ = progress_thread.join();
|
||||
Ok(result)
|
||||
} else {
|
||||
// No progress callback provided
|
||||
self.inner.download_updates(&rust_update_info, None)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn apply_updates_and_restart(&mut self, update_info: &PyUpdateInfo) -> Result<()> {
|
||||
// Convert PyUpdateInfo back to rust UpdateInfo
|
||||
let rust_update_info: UpdateInfo = update_info.clone().into();
|
||||
self.inner.apply_updates_and_restart(&rust_update_info)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
258
src/lib-python/src/types.rs
Normal file
258
src/lib-python/src/types.rs
Normal file
@@ -0,0 +1,258 @@
|
||||
// This file is auto-generated. Do not edit by hand.
|
||||
#![allow(non_snake_case)]
|
||||
use pyo3::prelude::*;
|
||||
use velopack::{VelopackAsset, UpdateInfo, UpdateOptions, locator::VelopackLocatorConfig};
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[pyclass(name = "VelopackLocatorConfig")]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct PyVelopackLocatorConfig {
|
||||
#[pyo3(get, set)]
|
||||
pub RootAppDir: PathBuf,
|
||||
#[pyo3(get, set)]
|
||||
pub UpdateExePath: PathBuf,
|
||||
#[pyo3(get, set)]
|
||||
pub PackagesDir: PathBuf,
|
||||
#[pyo3(get, set)]
|
||||
pub ManifestPath: PathBuf,
|
||||
#[pyo3(get, set)]
|
||||
pub CurrentBinaryDir: PathBuf,
|
||||
#[pyo3(get, set)]
|
||||
pub IsPortable: bool,
|
||||
}
|
||||
|
||||
#[pymethods]
|
||||
impl PyVelopackLocatorConfig {
|
||||
#[new]
|
||||
#[pyo3(signature = (RootAppDir, UpdateExePath, PackagesDir, ManifestPath, CurrentBinaryDir, IsPortable))]
|
||||
fn new(
|
||||
RootAppDir: PathBuf,
|
||||
UpdateExePath: PathBuf,
|
||||
PackagesDir: PathBuf,
|
||||
ManifestPath: PathBuf,
|
||||
CurrentBinaryDir: PathBuf,
|
||||
IsPortable: bool,
|
||||
) -> Self {
|
||||
Self {
|
||||
RootAppDir: RootAppDir.into(),
|
||||
UpdateExePath: UpdateExePath.into(),
|
||||
PackagesDir: PackagesDir.into(),
|
||||
ManifestPath: ManifestPath.into(),
|
||||
CurrentBinaryDir: CurrentBinaryDir.into(),
|
||||
IsPortable: IsPortable,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<VelopackLocatorConfig> for PyVelopackLocatorConfig {
|
||||
fn from(value: VelopackLocatorConfig) -> Self {
|
||||
PyVelopackLocatorConfig {
|
||||
RootAppDir: value.RootAppDir.into(),
|
||||
UpdateExePath: value.UpdateExePath.into(),
|
||||
PackagesDir: value.PackagesDir.into(),
|
||||
ManifestPath: value.ManifestPath.into(),
|
||||
CurrentBinaryDir: value.CurrentBinaryDir.into(),
|
||||
IsPortable: value.IsPortable,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<VelopackLocatorConfig> for PyVelopackLocatorConfig {
|
||||
fn into(self) -> VelopackLocatorConfig {
|
||||
VelopackLocatorConfig {
|
||||
RootAppDir: self.RootAppDir.into(),
|
||||
UpdateExePath: self.UpdateExePath.into(),
|
||||
PackagesDir: self.PackagesDir.into(),
|
||||
ManifestPath: self.ManifestPath.into(),
|
||||
CurrentBinaryDir: self.CurrentBinaryDir.into(),
|
||||
IsPortable: self.IsPortable,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pyclass(name = "VelopackAsset")]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct PyVelopackAsset {
|
||||
#[pyo3(get, set)]
|
||||
pub PackageId: String,
|
||||
#[pyo3(get, set)]
|
||||
pub Version: String,
|
||||
#[pyo3(get, set)]
|
||||
pub Type: String,
|
||||
#[pyo3(get, set)]
|
||||
pub FileName: String,
|
||||
#[pyo3(get, set)]
|
||||
pub SHA1: String,
|
||||
#[pyo3(get, set)]
|
||||
pub SHA256: String,
|
||||
#[pyo3(get, set)]
|
||||
pub Size: u64,
|
||||
#[pyo3(get, set)]
|
||||
pub NotesMarkdown: String,
|
||||
#[pyo3(get, set)]
|
||||
pub NotesHtml: String,
|
||||
}
|
||||
|
||||
#[pymethods]
|
||||
impl PyVelopackAsset {
|
||||
#[new]
|
||||
#[pyo3(signature = (PackageId, Version, Type, FileName, SHA1, SHA256, Size, NotesMarkdown, NotesHtml))]
|
||||
fn new(
|
||||
PackageId: String,
|
||||
Version: String,
|
||||
Type: String,
|
||||
FileName: String,
|
||||
SHA1: String,
|
||||
SHA256: String,
|
||||
Size: u64,
|
||||
NotesMarkdown: String,
|
||||
NotesHtml: String,
|
||||
) -> Self {
|
||||
Self {
|
||||
PackageId: PackageId.into(),
|
||||
Version: Version.into(),
|
||||
Type: Type.into(),
|
||||
FileName: FileName.into(),
|
||||
SHA1: SHA1.into(),
|
||||
SHA256: SHA256.into(),
|
||||
Size: Size,
|
||||
NotesMarkdown: NotesMarkdown.into(),
|
||||
NotesHtml: NotesHtml.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<VelopackAsset> for PyVelopackAsset {
|
||||
fn from(value: VelopackAsset) -> Self {
|
||||
PyVelopackAsset {
|
||||
PackageId: value.PackageId.into(),
|
||||
Version: value.Version.into(),
|
||||
Type: value.Type.into(),
|
||||
FileName: value.FileName.into(),
|
||||
SHA1: value.SHA1.into(),
|
||||
SHA256: value.SHA256.into(),
|
||||
Size: value.Size,
|
||||
NotesMarkdown: value.NotesMarkdown.into(),
|
||||
NotesHtml: value.NotesHtml.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<VelopackAsset> for PyVelopackAsset {
|
||||
fn into(self) -> VelopackAsset {
|
||||
VelopackAsset {
|
||||
PackageId: self.PackageId.into(),
|
||||
Version: self.Version.into(),
|
||||
Type: self.Type.into(),
|
||||
FileName: self.FileName.into(),
|
||||
SHA1: self.SHA1.into(),
|
||||
SHA256: self.SHA256.into(),
|
||||
Size: self.Size,
|
||||
NotesMarkdown: self.NotesMarkdown.into(),
|
||||
NotesHtml: self.NotesHtml.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pyclass(name = "UpdateInfo")]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct PyUpdateInfo {
|
||||
#[pyo3(get, set)]
|
||||
pub TargetFullRelease: PyVelopackAsset,
|
||||
#[pyo3(get, set)]
|
||||
pub BaseRelease: Option<PyVelopackAsset>,
|
||||
#[pyo3(get, set)]
|
||||
pub DeltasToTarget: Vec<PyVelopackAsset>,
|
||||
#[pyo3(get, set)]
|
||||
pub IsDowngrade: bool,
|
||||
}
|
||||
|
||||
#[pymethods]
|
||||
impl PyUpdateInfo {
|
||||
#[new]
|
||||
#[pyo3(signature = (TargetFullRelease, DeltasToTarget, IsDowngrade, BaseRelease = None))]
|
||||
fn new(
|
||||
TargetFullRelease: PyVelopackAsset,
|
||||
DeltasToTarget: Vec<PyVelopackAsset>,
|
||||
IsDowngrade: bool,
|
||||
BaseRelease: Option<PyVelopackAsset>,
|
||||
) -> Self {
|
||||
Self {
|
||||
TargetFullRelease: TargetFullRelease.into(),
|
||||
BaseRelease: BaseRelease.map(Into::into),
|
||||
DeltasToTarget: DeltasToTarget.into_iter().map(Into::into).collect(),
|
||||
IsDowngrade: IsDowngrade,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UpdateInfo> for PyUpdateInfo {
|
||||
fn from(value: UpdateInfo) -> Self {
|
||||
PyUpdateInfo {
|
||||
TargetFullRelease: value.TargetFullRelease.into(),
|
||||
BaseRelease: value.BaseRelease.map(Into::into),
|
||||
DeltasToTarget: value.DeltasToTarget.into_iter().map(Into::into).collect(),
|
||||
IsDowngrade: value.IsDowngrade,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<UpdateInfo> for PyUpdateInfo {
|
||||
fn into(self) -> UpdateInfo {
|
||||
UpdateInfo {
|
||||
TargetFullRelease: self.TargetFullRelease.into(),
|
||||
BaseRelease: self.BaseRelease.map(Into::into),
|
||||
DeltasToTarget: self.DeltasToTarget.into_iter().map(Into::into).collect(),
|
||||
IsDowngrade: self.IsDowngrade,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pyclass(name = "UpdateOptions")]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct PyUpdateOptions {
|
||||
#[pyo3(get, set)]
|
||||
pub AllowVersionDowngrade: bool,
|
||||
#[pyo3(get, set)]
|
||||
pub ExplicitChannel: Option<String>,
|
||||
#[pyo3(get, set)]
|
||||
pub MaximumDeltasBeforeFallback: i32,
|
||||
}
|
||||
|
||||
#[pymethods]
|
||||
impl PyUpdateOptions {
|
||||
#[new]
|
||||
#[pyo3(signature = (AllowVersionDowngrade, MaximumDeltasBeforeFallback, ExplicitChannel = None))]
|
||||
fn new(
|
||||
AllowVersionDowngrade: bool,
|
||||
MaximumDeltasBeforeFallback: i32,
|
||||
ExplicitChannel: Option<String>,
|
||||
) -> Self {
|
||||
Self {
|
||||
AllowVersionDowngrade: AllowVersionDowngrade,
|
||||
ExplicitChannel: ExplicitChannel.map(Into::into),
|
||||
MaximumDeltasBeforeFallback: MaximumDeltasBeforeFallback,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UpdateOptions> for PyUpdateOptions {
|
||||
fn from(value: UpdateOptions) -> Self {
|
||||
PyUpdateOptions {
|
||||
AllowVersionDowngrade: value.AllowVersionDowngrade,
|
||||
ExplicitChannel: value.ExplicitChannel.map(Into::into),
|
||||
MaximumDeltasBeforeFallback: value.MaximumDeltasBeforeFallback,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<UpdateOptions> for PyUpdateOptions {
|
||||
fn into(self) -> UpdateOptions {
|
||||
UpdateOptions {
|
||||
AllowVersionDowngrade: self.AllowVersionDowngrade,
|
||||
ExplicitChannel: self.ExplicitChannel.map(Into::into),
|
||||
MaximumDeltasBeforeFallback: self.MaximumDeltasBeforeFallback,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
src/lib-python/test/app.py
Normal file
16
src/lib-python/test/app.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import velopack
|
||||
|
||||
import app_version
|
||||
|
||||
version = app_version.version
|
||||
|
||||
if __name__ == "__main__":
|
||||
velopack.App().run()
|
||||
um = velopack.UpdateManager("http://localhost:8080")
|
||||
update_info = um.check_for_updates()
|
||||
print(f"Update info: {update_info}")
|
||||
if update_info:
|
||||
um.download_updates(update_info)
|
||||
um.apply_updates_and_restart(update_info)
|
||||
with open("version_result.txt", "w") as f:
|
||||
f.write(f"{version}")
|
||||
110
src/lib-python/test/run_test.py
Normal file
110
src/lib-python/test/run_test.py
Normal file
@@ -0,0 +1,110 @@
|
||||
import atexit
|
||||
import functools
|
||||
from http.server import HTTPServer, SimpleHTTPRequestHandler
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
import threading
|
||||
import time
|
||||
import zipfile
|
||||
|
||||
httpd = None
|
||||
|
||||
def log(msg):
|
||||
print(f"[LOG] {msg}")
|
||||
|
||||
|
||||
# Register a cleanup function to ensure the HTTP server is stopped on exit
|
||||
def cleanup():
|
||||
global httpd
|
||||
if httpd:
|
||||
log("Stopping HTTP server...")
|
||||
httpd.shutdown()
|
||||
httpd.server_close()
|
||||
log("HTTP server stopped.")
|
||||
shutil.rmtree("output", ignore_errors=True)
|
||||
shutil.rmtree("dist", ignore_errors=True)
|
||||
shutil.rmtree("build", ignore_errors=True)
|
||||
shutil.rmtree("Releases", ignore_errors=True)
|
||||
|
||||
atexit.register(cleanup)
|
||||
|
||||
def _run_cmd(args):
|
||||
log(f"Running command: {' '.join(args)}")
|
||||
result = subprocess.run(args, capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
raise RuntimeError(f"Command failed: {' '.join(args)}\n{result.stdout}\n{result.stderr}")
|
||||
return result.stdout.strip()
|
||||
|
||||
def write_app_version(version):
|
||||
log(f"Writing app version: {version}")
|
||||
with open("app_version.py", "w") as f:
|
||||
f.write(f'version = "{version}"\n')
|
||||
log("App version written successfully")
|
||||
|
||||
def read_app_version(path):
|
||||
log(f"Reading app version from: {path}")
|
||||
with open(path, "r") as f:
|
||||
version = f.read()
|
||||
log(f"App version read successfully: {version}")
|
||||
return version
|
||||
|
||||
def extract_full_path(zip_file, target_dir):
|
||||
log(f"Extracting {zip_file} to {target_dir}")
|
||||
with zipfile.ZipFile(zip_file, 'r') as zip_ref:
|
||||
zip_ref.extractall(target_dir)
|
||||
log("Extraction completed")
|
||||
|
||||
# check if we are running on Windows
|
||||
if platform.system() != "Windows":
|
||||
raise RuntimeError("This script is intended to run on Windows only, for now")
|
||||
|
||||
_pyinstaller_command = ["uv", "run", "pyinstaller", "--onedir", "--console", "app.py", "--noconfirm"]
|
||||
|
||||
# check if we are running from the test dir
|
||||
if Path(__file__).parent.name != "test":
|
||||
raise RuntimeError("This script must be run from the 'test' directory")
|
||||
|
||||
# check for vpk cli
|
||||
_run_cmd(["vpk", "-h"])
|
||||
|
||||
write_app_version("1.0.0")
|
||||
|
||||
_run_cmd(_pyinstaller_command)
|
||||
|
||||
# make app version
|
||||
_run_cmd(["vpk", "pack", "--packId", "test-app", "--packVersion", "1.0.0", "--packDir", "dist/app/", "--mainExe", "app.exe"])
|
||||
|
||||
extract_full_path("Releases/test-app-win-Portable.zip", "output")
|
||||
|
||||
log("Starting HTTP server thread serving ./Releases …")
|
||||
handler = functools.partial(SimpleHTTPRequestHandler, directory=str(Path("Releases").resolve()))
|
||||
httpd = HTTPServer(("localhost", 8080), handler)
|
||||
server_thread = threading.Thread(target=httpd.serve_forever, daemon=True)
|
||||
server_thread.start()
|
||||
log("HTTP server is now running at http://localhost:8000")
|
||||
# Give it a moment to start
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
# check if the app version is correct
|
||||
_run_cmd(["output/test-app.exe"])
|
||||
|
||||
current_version = read_app_version("output/current/version_result.txt")
|
||||
if current_version.strip() != "1.0.0":
|
||||
raise RuntimeError(f"Version mismatch: expected '1.0.0', got '{current_version.strip()}'")
|
||||
|
||||
log("App version is correct: 1.0.0")
|
||||
log("Trying to create update package...")
|
||||
write_app_version("1.0.1")
|
||||
_run_cmd(_pyinstaller_command)
|
||||
_run_cmd(["vpk", "pack", "--packId", "test-app", "--packVersion", "1.0.1", "--packDir", "dist/app/", "--mainExe", "app.exe"])
|
||||
# check if the app version is correct
|
||||
_run_cmd(["output/test-app.exe"])
|
||||
new_version = read_app_version("output/current/version_result.txt")
|
||||
if new_version.strip() != "1.0.1":
|
||||
raise RuntimeError(f"Version mismatch: expected '1.0.1' after update, got '{new_version.strip()}'")
|
||||
|
||||
log("Update package created successfully and version is now 1.0.1")
|
||||
log("Test completed successfully")
|
||||
265
src/lib-python/uv.lock
generated
Normal file
265
src/lib-python/uv.lock
generated
Normal file
@@ -0,0 +1,265 @@
|
||||
version = 1
|
||||
revision = 2
|
||||
requires-python = ">=3.8"
|
||||
resolution-markers = [
|
||||
"python_full_version >= '3.9'",
|
||||
"python_full_version < '3.9'",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "altgraph"
|
||||
version = "0.17.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/de/a8/7145824cf0b9e3c28046520480f207df47e927df83aa9555fb47f8505922/altgraph-0.17.4.tar.gz", hash = "sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406", size = 48418, upload-time = "2023-09-25T09:04:52.164Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/4d/3f/3bc3f1d83f6e4a7fcb834d3720544ca597590425be5ba9db032b2bf322a2/altgraph-0.17.4-py2.py3-none-any.whl", hash = "sha256:642743b4750de17e655e6711601b077bc6598dbfa3ba5fa2b2a35ce12b508dff", size = 21212, upload-time = "2023-09-25T09:04:50.691Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "importlib-metadata"
|
||||
version = "8.5.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version < '3.9'",
|
||||
]
|
||||
dependencies = [
|
||||
{ name = "zipp", version = "3.20.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/cd/12/33e59336dca5be0c398a7482335911a33aa0e20776128f038019f1a95f1b/importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7", size = 55304, upload-time = "2024-09-11T14:56:08.937Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a0/d9/a1e041c5e7caa9a05c925f4bdbdfb7f006d1f74996af53467bc394c97be7/importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b", size = 26514, upload-time = "2024-09-11T14:56:07.019Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "importlib-metadata"
|
||||
version = "8.7.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version >= '3.9'",
|
||||
]
|
||||
dependencies = [
|
||||
{ name = "zipp", version = "3.23.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000", size = 56641, upload-time = "2025-04-27T15:29:01.736Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/20/b0/36bd937216ec521246249be3bf9855081de4c5e06a0c9b4219dbeda50373/importlib_metadata-8.7.0-py3-none-any.whl", hash = "sha256:e5dd1551894c77868a30651cef00984d50e1002d06942a7101d34870c5f02afd", size = 27656, upload-time = "2025-04-27T15:29:00.214Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "macholib"
|
||||
version = "1.16.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "altgraph" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/95/ee/af1a3842bdd5902ce133bd246eb7ffd4375c38642aeb5dc0ae3a0329dfa2/macholib-1.16.3.tar.gz", hash = "sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30", size = 59309, upload-time = "2023-09-25T09:10:16.155Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/d1/5d/c059c180c84f7962db0aeae7c3b9303ed1d73d76f2bfbc32bc231c8be314/macholib-1.16.3-py2.py3-none-any.whl", hash = "sha256:0e315d7583d38b8c77e815b1ecbdbf504a8258d8b3e17b61165c6feb60d18f2c", size = 38094, upload-time = "2023-09-25T09:10:14.188Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "maturin"
|
||||
version = "1.8.7"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "tomli", marker = "python_full_version < '3.11'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/5d/67/71098eb8cac6dacfc71b6b81645017811ad377c22c959cff524505cbc8d4/maturin-1.8.7.tar.gz", hash = "sha256:96c76353f94a153c5dc1a9d3916e75fcd17e6bf216a06dcdc2f84b9f98f374af", size = 205116, upload-time = "2025-06-09T13:58:15.09Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/da/58/fcd05985cbd9edd0232146a768e5fdcbda1f954ea82ec1c81f4d75d275c2/maturin-1.8.7-py3-none-linux_armv6l.whl", hash = "sha256:43526cc7fdc025b0d134b09d2cdbbe8fe816c4d72351822fa967d36784764bab", size = 8097702, upload-time = "2025-06-09T13:57:49.497Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7e/a5/f02d9661fe21321f6852ef740eda54fe257e91c5c906265db902d1989bc8/maturin-1.8.7-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:5e134fc67e7f28e9f57d01dc2603c243456f80e76f93ef54ee61a4403dccd7e3", size = 16059837, upload-time = "2025-06-09T13:57:52.713Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c5/bc/51c9ce286909831bee0c5a64d769355cd8a84f373e22f7d7d07c78a829ec/maturin-1.8.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b560b86d6119c82430f9682f76708b3ea4984e5976afab6b844c9c8094709f78", size = 8381884, upload-time = "2025-06-09T13:57:55.275Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4f/ed/a5d84adbd0df3bb1b1e0f75b13a89446455f66d0070562f29ac30db5054a/maturin-1.8.7-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl", hash = "sha256:272f34df99ff9be27174b0d2afaec98bac5217670bceddd796f45a0095849dd9", size = 8141538, upload-time = "2025-06-09T13:57:56.941Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fd/f8/ef902fb50454fd57a514b6bc1203f55b8c5dd5b0c5439fabe22aca0ef60e/maturin-1.8.7-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:c39f288b72ceae9274e612131c8a1a18bc248170910e27eb39956ffbd62bd712", size = 8795313, upload-time = "2025-06-09T13:57:58.99Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d6/13/9cfb7d799ceda322651be21af7d2b541eb125477db30a8dba408ec4a9813/maturin-1.8.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:8766377b5339b354fc83195ee1d9879db2b1323ea485305c6932f97b1661334d", size = 7899633, upload-time = "2025-06-09T13:58:00.868Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c4/d2/46c98e5aef3011efa56dd0fc0ffc9bba4fef236339352af5876f0027af03/maturin-1.8.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:987b4e821c5ec2b5c6d75f4fcb6141d6418188356c3ff229c67f58c11ae54ded", size = 7960920, upload-time = "2025-06-09T13:58:02.826Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e4/b7/ec2dde6c5aefcf38279c6276a96f9351081f22174e9db56db394d0f32e67/maturin-1.8.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:15ec5919b334e421e97623446907a3f994fc04427ab2c9e5eab5a461565e6ce3", size = 10155481, upload-time = "2025-06-09T13:58:04.761Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/35/38/ef38d4a7008068212f8d11643178e8b0291d7cdd047b47f449243be5e5cd/maturin-1.8.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ec37762228b76d4763e0ad18f7d70d8dbe52298ecdb0737bb4fd383a49fc2f06", size = 8995379, upload-time = "2025-06-09T13:58:07.152Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/29/79/f1b64d1d0e11ca4eb24a8b82d0916bc0e3e477b8a6879e9a6bee93b731f3/maturin-1.8.7-py3-none-win32.whl", hash = "sha256:834c2f8029c1e19e272b360102eead74fdb6df93d1cb6e645d6aeaec86b532f6", size = 7261393, upload-time = "2025-06-09T13:58:09.466Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/53/1e/efc95e4cab8fbbede2f8d28481bae44eee4a43cfe456e78854ef9952ec6b/maturin-1.8.7-py3-none-win_amd64.whl", hash = "sha256:ef44ade7b2401ebbd4b0d268e4b953b4256295c827a21e806a51d29f629ab638", size = 8300461, upload-time = "2025-06-09T13:58:11.545Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/17/2b/270b772f31844aae4297f178e81d5890c259973dedc68a48084a36c34ec1/maturin-1.8.7-py3-none-win_arm64.whl", hash = "sha256:20813b2262661a403fc0c695e3d4836257f992927fa2234928eb3510b13de2cd", size = 6973691, upload-time = "2025-06-09T13:58:13.223Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "packaging"
|
||||
version = "25.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pefile"
|
||||
version = "2023.2.7"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/78/c5/3b3c62223f72e2360737fd2a57c30e5b2adecd85e70276879609a7403334/pefile-2023.2.7.tar.gz", hash = "sha256:82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc", size = 74854, upload-time = "2023-02-07T12:23:55.958Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/55/26/d0ad8b448476d0a1e8d3ea5622dc77b916db84c6aa3cb1e1c0965af948fc/pefile-2023.2.7-py3-none-any.whl", hash = "sha256:da185cd2af68c08a6cd4481f7325ed600a88f6a813bad9dea07ab3ef73d8d8d6", size = 71791, upload-time = "2023-02-07T12:28:36.678Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pyinstaller"
|
||||
version = "6.14.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "altgraph" },
|
||||
{ name = "importlib-metadata", version = "8.5.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" },
|
||||
{ name = "importlib-metadata", version = "8.7.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" },
|
||||
{ name = "macholib", marker = "sys_platform == 'darwin'" },
|
||||
{ name = "packaging" },
|
||||
{ name = "pefile", marker = "sys_platform == 'win32'" },
|
||||
{ name = "pyinstaller-hooks-contrib" },
|
||||
{ name = "pywin32-ctypes", marker = "sys_platform == 'win32'" },
|
||||
{ name = "setuptools", version = "75.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" },
|
||||
{ name = "setuptools", version = "80.9.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/9f/4a/d66d3a9c34349d73eb099401060e2591da8ccc5ed427e54fff3961302513/pyinstaller-6.14.1.tar.gz", hash = "sha256:35d5c06a668e21f0122178dbf20e40fd21012dc8f6170042af6050c4e7b3edca", size = 4284317, upload-time = "2025-06-08T18:45:46.367Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/43/f6/fa56e547fe849db4b8da0acaad6101a6382c18370c7e0f378a1cf0ea89f0/pyinstaller-6.14.1-py3-none-macosx_10_13_universal2.whl", hash = "sha256:da559cfe4f7a20a7ebdafdf12ea2a03ea94d3caa49736ef53ee2c155d78422c9", size = 999937, upload-time = "2025-06-08T18:44:26.429Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/af/a6/a2814978f47ae038b1ce112717adbdcfd8dfb9504e5c52437902331cde1a/pyinstaller-6.14.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:f040d1e3d42af3730104078d10d4a8ca3350bd1c78de48f12e1b26f761e0cbc3", size = 719569, upload-time = "2025-06-08T18:44:30.948Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/35/f0/86391a4c0f558aef43a7dac8f678d46f4e5b84bd133308e3ea81f7384ab9/pyinstaller-6.14.1-py3-none-manylinux2014_i686.whl", hash = "sha256:7b8813fb2d5a82ef4ceffc342ed9a11a6fc1ef21e68e833dbd8fedb8a188d3f5", size = 729824, upload-time = "2025-06-08T18:44:34.983Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e5/88/446814e335d937406e6e1ae4a77ed922b8eea8b90f3aaf69427a16b58ed2/pyinstaller-6.14.1-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e2cfdbc6dd41d19872054fc233da18856ec422a7fdea899b6985ae04f980376a", size = 727937, upload-time = "2025-06-08T18:44:38.954Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/0f/5aa891c61d303ad4a794b7e2f864aacf64fe0f6f5559e2aec0f742595fad/pyinstaller-6.14.1-py3-none-manylinux2014_s390x.whl", hash = "sha256:a4d53b3ecb5786b097b79bda88c4089186fc1498ef7eaa6cee57599ae459241e", size = 724762, upload-time = "2025-06-08T18:44:42.768Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c5/92/e32ec0a1754852a8ed5a60f6746c6483e3da68aee97d314f3a3a99e0ed9e/pyinstaller-6.14.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:c48dd257f77f61ebea2d1fdbaf11243730f2271873c88d3b5ecb7869525d3bcb", size = 724957, upload-time = "2025-06-08T18:44:46.829Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c3/66/1260f384e47bf939f6238f791d4cda7edb94771d2fa0a451e0edb21ac9c7/pyinstaller-6.14.1-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:5b05cbb2ffc033b4681268159b82bac94b875475c339603c7e605f00a73c8746", size = 724132, upload-time = "2025-06-08T18:44:51.081Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d2/8b/8570ab94ec07e0b2b1203f45840353ee76aa067a2540c97da43d43477b26/pyinstaller-6.14.1-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:d5fd73757c8ea9adb2f9c1f81656335ba9890029ede3031835d768fde36e89f0", size = 723847, upload-time = "2025-06-08T18:44:54.896Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d5/43/6c68dc9e53b09ff948d6e46477932b387832bbb920c48061d734ef089368/pyinstaller-6.14.1-py3-none-win32.whl", hash = "sha256:547f7a93592e408cbfd093ce9fd9631215387dab0dbf3130351d3b0b1186a534", size = 1299744, upload-time = "2025-06-08T18:45:00.781Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7c/dd/bb8d5bcb0592f7f5d454ad308051d00ed34f8b08d5003400b825cfe35513/pyinstaller-6.14.1-py3-none-win_amd64.whl", hash = "sha256:0794290b4b56ef9d35858334deb29f36ec1e1f193b0f825212a0aa5a1bec5a2f", size = 1357625, upload-time = "2025-06-08T18:45:06.826Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/89/57/8a8979737980e50aa5031b77318ce783759bf25be2956317f2e1d7a65a09/pyinstaller-6.14.1-py3-none-win_arm64.whl", hash = "sha256:d9d99695827f892cb19644106da30681363e8ff27b8326ac8416d62890ab9c74", size = 1298607, upload-time = "2025-06-08T18:45:12.766Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pyinstaller-hooks-contrib"
|
||||
version = "2025.5"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "importlib-metadata", version = "8.5.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" },
|
||||
{ name = "importlib-metadata", version = "8.7.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" },
|
||||
{ name = "packaging" },
|
||||
{ name = "setuptools", version = "75.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" },
|
||||
{ name = "setuptools", version = "80.9.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/5f/ff/e3376595935d5f8135964d2177cd3e3e0c1b5a6237497d9775237c247a5d/pyinstaller_hooks_contrib-2025.5.tar.gz", hash = "sha256:707386770b8fe066c04aad18a71bc483c7b25e18b4750a756999f7da2ab31982", size = 163124, upload-time = "2025-06-08T18:47:53.26Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/0c/2c/b4d317534e17dd1df95c394d4b37febb15ead006a1c07c2bb006481fb5e7/pyinstaller_hooks_contrib-2025.5-py3-none-any.whl", hash = "sha256:ebfae1ba341cb0002fb2770fad0edf2b3e913c2728d92df7ad562260988ca373", size = 437246, upload-time = "2025-06-08T18:47:51.516Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pywin32-ctypes"
|
||||
version = "0.2.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755", size = 29471, upload-time = "2024-08-14T10:15:34.626Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8", size = 30756, upload-time = "2024-08-14T10:15:33.187Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "setuptools"
|
||||
version = "75.3.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version < '3.9'",
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/5c/01/771ea46cce201dd42cff043a5eea929d1c030fb3d1c2ee2729d02ca7814c/setuptools-75.3.2.tar.gz", hash = "sha256:3c1383e1038b68556a382c1e8ded8887cd20141b0eb5708a6c8d277de49364f5", size = 1354489, upload-time = "2025-03-12T00:02:19.004Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/15/65/3f0dba35760d902849d39d38c0a72767794b1963227b69a587f8a336d08c/setuptools-75.3.2-py3-none-any.whl", hash = "sha256:90ab613b6583fc02d5369cbca13ea26ea0e182d1df2d943ee9cbe81d4c61add9", size = 1251198, upload-time = "2025-03-12T00:02:17.554Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "setuptools"
|
||||
version = "80.9.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version >= '3.9'",
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c", size = 1319958, upload-time = "2025-05-27T00:56:51.443Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922", size = 1201486, upload-time = "2025-05-27T00:56:49.664Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tomli"
|
||||
version = "2.2.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff", size = 17175, upload-time = "2024-11-27T22:38:36.873Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/43/ca/75707e6efa2b37c77dadb324ae7d9571cb424e61ea73fad7c56c2d14527f/tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249", size = 131077, upload-time = "2024-11-27T22:37:54.956Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c7/16/51ae563a8615d472fdbffc43a3f3d46588c264ac4f024f63f01283becfbb/tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6", size = 123429, upload-time = "2024-11-27T22:37:56.698Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f1/dd/4f6cd1e7b160041db83c694abc78e100473c15d54620083dbd5aae7b990e/tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a", size = 226067, upload-time = "2024-11-27T22:37:57.63Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a9/6b/c54ede5dc70d648cc6361eaf429304b02f2871a345bbdd51e993d6cdf550/tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee", size = 236030, upload-time = "2024-11-27T22:37:59.344Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/47/999514fa49cfaf7a92c805a86c3c43f4215621855d151b61c602abb38091/tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e", size = 240898, upload-time = "2024-11-27T22:38:00.429Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/73/41/0a01279a7ae09ee1573b423318e7934674ce06eb33f50936655071d81a24/tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4", size = 229894, upload-time = "2024-11-27T22:38:02.094Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/55/18/5d8bc5b0a0362311ce4d18830a5d28943667599a60d20118074ea1b01bb7/tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106", size = 245319, upload-time = "2024-11-27T22:38:03.206Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/92/a3/7ade0576d17f3cdf5ff44d61390d4b3febb8a9fc2b480c75c47ea048c646/tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8", size = 238273, upload-time = "2024-11-27T22:38:04.217Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/72/6f/fa64ef058ac1446a1e51110c375339b3ec6be245af9d14c87c4a6412dd32/tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff", size = 98310, upload-time = "2024-11-27T22:38:05.908Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6a/1c/4a2dcde4a51b81be3530565e92eda625d94dafb46dbeb15069df4caffc34/tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b", size = 108309, upload-time = "2024-11-27T22:38:06.812Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/52/e1/f8af4c2fcde17500422858155aeb0d7e93477a0d59a98e56cbfe75070fd0/tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea", size = 132762, upload-time = "2024-11-27T22:38:07.731Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/03/b8/152c68bb84fc00396b83e7bbddd5ec0bd3dd409db4195e2a9b3e398ad2e3/tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8", size = 123453, upload-time = "2024-11-27T22:38:09.384Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c8/d6/fc9267af9166f79ac528ff7e8c55c8181ded34eb4b0e93daa767b8841573/tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192", size = 233486, upload-time = "2024-11-27T22:38:10.329Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5c/51/51c3f2884d7bab89af25f678447ea7d297b53b5a3b5730a7cb2ef6069f07/tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222", size = 242349, upload-time = "2024-11-27T22:38:11.443Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ab/df/bfa89627d13a5cc22402e441e8a931ef2108403db390ff3345c05253935e/tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77", size = 252159, upload-time = "2024-11-27T22:38:13.099Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9e/6e/fa2b916dced65763a5168c6ccb91066f7639bdc88b48adda990db10c8c0b/tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6", size = 237243, upload-time = "2024-11-27T22:38:14.766Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b4/04/885d3b1f650e1153cbb93a6a9782c58a972b94ea4483ae4ac5cedd5e4a09/tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd", size = 259645, upload-time = "2024-11-27T22:38:15.843Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9c/de/6b432d66e986e501586da298e28ebeefd3edc2c780f3ad73d22566034239/tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e", size = 244584, upload-time = "2024-11-27T22:38:17.645Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1c/9a/47c0449b98e6e7d1be6cbac02f93dd79003234ddc4aaab6ba07a9a7482e2/tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98", size = 98875, upload-time = "2024-11-27T22:38:19.159Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ef/60/9b9638f081c6f1261e2688bd487625cd1e660d0a85bd469e91d8db969734/tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4", size = 109418, upload-time = "2024-11-27T22:38:20.064Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/04/90/2ee5f2e0362cb8a0b6499dc44f4d7d48f8fff06d28ba46e6f1eaa61a1388/tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7", size = 132708, upload-time = "2024-11-27T22:38:21.659Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c0/ec/46b4108816de6b385141f082ba99e315501ccd0a2ea23db4a100dd3990ea/tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c", size = 123582, upload-time = "2024-11-27T22:38:22.693Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a0/bd/b470466d0137b37b68d24556c38a0cc819e8febe392d5b199dcd7f578365/tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13", size = 232543, upload-time = "2024-11-27T22:38:24.367Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d9/e5/82e80ff3b751373f7cead2815bcbe2d51c895b3c990686741a8e56ec42ab/tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281", size = 241691, upload-time = "2024-11-27T22:38:26.081Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/05/7e/2a110bc2713557d6a1bfb06af23dd01e7dde52b6ee7dadc589868f9abfac/tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272", size = 251170, upload-time = "2024-11-27T22:38:27.921Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/64/7b/22d713946efe00e0adbcdfd6d1aa119ae03fd0b60ebed51ebb3fa9f5a2e5/tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140", size = 236530, upload-time = "2024-11-27T22:38:29.591Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/38/31/3a76f67da4b0cf37b742ca76beaf819dca0ebef26d78fc794a576e08accf/tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2", size = 258666, upload-time = "2024-11-27T22:38:30.639Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/07/10/5af1293da642aded87e8a988753945d0cf7e00a9452d3911dd3bb354c9e2/tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744", size = 243954, upload-time = "2024-11-27T22:38:31.702Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5b/b9/1ed31d167be802da0fc95020d04cd27b7d7065cc6fbefdd2f9186f60d7bd/tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec", size = 98724, upload-time = "2024-11-27T22:38:32.837Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c7/32/b0963458706accd9afcfeb867c0f9175a741bf7b19cd424230714d722198/tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69", size = 109383, upload-time = "2024-11-27T22:38:34.455Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc", size = 14257, upload-time = "2024-11-27T22:38:35.385Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "velopack"
|
||||
version = "0.0.1"
|
||||
source = { editable = "." }
|
||||
|
||||
[package.dev-dependencies]
|
||||
dev = [
|
||||
{ name = "maturin" },
|
||||
{ name = "pyinstaller" },
|
||||
]
|
||||
test = [
|
||||
{ name = "pyinstaller" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
|
||||
[package.metadata.requires-dev]
|
||||
dev = [
|
||||
{ name = "maturin", specifier = ">=1.8.6" },
|
||||
{ name = "pyinstaller", specifier = ">=6.13.0" },
|
||||
]
|
||||
test = [{ name = "pyinstaller", specifier = ">=6.13.0" }]
|
||||
|
||||
[[package]]
|
||||
name = "zipp"
|
||||
version = "3.20.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version < '3.9'",
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/54/bf/5c0000c44ebc80123ecbdddba1f5dcd94a5ada602a9c225d84b5aaa55e86/zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29", size = 24199, upload-time = "2024-09-13T13:44:16.101Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/62/8b/5ba542fa83c90e09eac972fc9baca7a88e7e7ca4b221a89251954019308b/zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350", size = 9200, upload-time = "2024-09-13T13:44:14.38Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zipp"
|
||||
version = "3.23.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
resolution-markers = [
|
||||
"python_full_version >= '3.9'",
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166", size = 25547, upload-time = "2025-06-08T17:06:39.4Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/2e/54/647ade08bf0db230bfea292f893923872fd20be6ac6f53b2b936ba839d75/zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e", size = 10276, upload-time = "2025-06-08T17:06:38.034Z" },
|
||||
]
|
||||
@@ -1,8 +1,8 @@
|
||||
[package]
|
||||
name = "velopack"
|
||||
description = "Installer and automatic updates for cross-platform desktop applications"
|
||||
readme = "README.md"
|
||||
version.workspace = true
|
||||
description.workspace = true
|
||||
authors.workspace = true
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
@@ -16,8 +16,7 @@ rust-version.workspace = true
|
||||
[features]
|
||||
default = []
|
||||
async = ["async-std"]
|
||||
typescript = ["ts-rs"]
|
||||
file-logging = ["log-panics", "simplelog", "file-rotate", "time"]
|
||||
file-logging = ["log-panics", "simplelog", "time"]
|
||||
public-utils = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
@@ -51,16 +50,12 @@ sha1.workspace = true
|
||||
sha2.workspace = true
|
||||
uuid.workspace = true
|
||||
|
||||
# typescript
|
||||
ts-rs = { workspace = true, optional = true }
|
||||
|
||||
# async
|
||||
async-std = { workspace = true, optional = true }
|
||||
|
||||
# file logging
|
||||
log-panics = { workspace = true, optional = true }
|
||||
simplelog = { workspace = true, optional = true }
|
||||
file-rotate = { workspace = true, optional = true }
|
||||
time = { workspace = true, optional = true }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
|
||||
185
src/lib-rust/src/file_rotate.rs
Normal file
185
src/lib-rust/src/file_rotate.rs
Normal file
@@ -0,0 +1,185 @@
|
||||
use std::fs::{self, File, OpenOptions};
|
||||
use std::io::Write;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
pub struct FileRotate {
|
||||
file: Option<File>,
|
||||
path: PathBuf,
|
||||
max_size: u64,
|
||||
current_size: u64,
|
||||
}
|
||||
|
||||
/// This is a very simple log file rotate implementation. It should implement the Write trait.
|
||||
/// It should fail-safe, and not panic if it can't write logs for some reason.
|
||||
/// It will rotate the "path" to "path.old" when it reaches 1mb, overwriting any previous "path.old"
|
||||
impl FileRotate {
|
||||
pub fn new<P: AsRef<Path>>(path: P, max_size: u64) -> Self {
|
||||
let path = path.as_ref();
|
||||
|
||||
let mut me = Self { file: None, path: path.to_path_buf(), max_size, current_size: 0 };
|
||||
|
||||
me.ensure_log_dir_exists();
|
||||
|
||||
if let Ok(metadata) = fs::metadata(&me.path) {
|
||||
let size = metadata.len();
|
||||
if size > me.max_size {
|
||||
me.rotate();
|
||||
} else {
|
||||
me.current_size = size;
|
||||
}
|
||||
}
|
||||
|
||||
me.open_file();
|
||||
me
|
||||
}
|
||||
|
||||
fn ensure_log_dir_exists(&self) {
|
||||
if let Some(parent) = self.path.parent() {
|
||||
if let Err(_e) = fs::create_dir_all(parent) {
|
||||
// eprintln!("Failed to create log file parent directory: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn open_file(&mut self) {
|
||||
if let Some(_) = &self.file {
|
||||
return;
|
||||
}
|
||||
|
||||
self.ensure_log_dir_exists();
|
||||
|
||||
let mut o = OpenOptions::new();
|
||||
o.read(true).create(true).append(true);
|
||||
|
||||
match o.open(&self.path) {
|
||||
Ok(file) => self.file = Some(file),
|
||||
Err(_e) => {} //eprintln!("Failed to open log file: {e}"),
|
||||
}
|
||||
}
|
||||
|
||||
fn rotate(&mut self) {
|
||||
self.ensure_log_dir_exists();
|
||||
|
||||
let _ = self.file.take();
|
||||
|
||||
let rotation_path = append_extension(&self.path, "old");
|
||||
|
||||
if let Err(_e) = fs::rename(&self.path, &rotation_path) {
|
||||
// eprintln!("Failed to rotate log file: {e}");
|
||||
} else {
|
||||
self.current_size = 0;
|
||||
}
|
||||
|
||||
self.open_file();
|
||||
}
|
||||
}
|
||||
|
||||
impl Write for FileRotate {
|
||||
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
|
||||
if self.file.is_none() {
|
||||
self.open_file();
|
||||
}
|
||||
|
||||
if let Some(file) = &mut self.file {
|
||||
let written = file.write(buf)?;
|
||||
self.current_size += written as u64;
|
||||
if self.current_size > self.max_size {
|
||||
self.flush()?;
|
||||
self.rotate();
|
||||
}
|
||||
Ok(written)
|
||||
} else {
|
||||
Err(std::io::Error::new(std::io::ErrorKind::Other, "File not open"))
|
||||
}
|
||||
}
|
||||
|
||||
fn flush(&mut self) -> std::io::Result<()> {
|
||||
if self.file.is_none() {
|
||||
self.open_file();
|
||||
}
|
||||
|
||||
if let Some(file) = &mut self.file {
|
||||
file.flush()
|
||||
} else {
|
||||
Err(std::io::Error::new(std::io::ErrorKind::Other, "File not open"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn append_extension(path: &Path, ext: &str) -> PathBuf {
|
||||
let mut os_string = path.as_os_str().to_os_string();
|
||||
os_string.push(format!(".{}", ext));
|
||||
PathBuf::from(os_string)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn write_lines(path: &PathBuf, lines: u32) {
|
||||
let mut writer = FileRotate::new(path, 200);
|
||||
for idx in 1..=lines {
|
||||
let _ = writeln!(writer, "Line {}: Hello World!", idx);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_file_rotate() {
|
||||
let tmpdir = tempfile::tempdir().unwrap();
|
||||
|
||||
let path = tmpdir.path().join("test.log");
|
||||
write_lines(&path, 28);
|
||||
|
||||
let content = fs::read_to_string(&path).unwrap();
|
||||
|
||||
let expected = "
|
||||
20: Hello World!
|
||||
Line 21: Hello World!
|
||||
Line 22: Hello World!
|
||||
Line 23: Hello World!
|
||||
Line 24: Hello World!
|
||||
Line 25: Hello World!
|
||||
Line 26: Hello World!
|
||||
Line 27: Hello World!
|
||||
Line 28: Hello World!
|
||||
";
|
||||
|
||||
assert_eq!(content.trim(), expected.trim());
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[test]
|
||||
fn test_file_rotate_case_insensitive() {
|
||||
let tmpdir = tempfile::tempdir().unwrap();
|
||||
|
||||
let path = tmpdir.path().join("test.log");
|
||||
write_lines(&path, 7);
|
||||
write_lines(&path, 7);
|
||||
write_lines(&path, 7);
|
||||
|
||||
let path2 = tmpdir.path().join("Test.log");
|
||||
write_lines(&path2, 7);
|
||||
write_lines(&path2, 7);
|
||||
write_lines(&path2, 7);
|
||||
|
||||
let content = fs::read_to_string(&path).unwrap();
|
||||
let content_old = fs::read_to_string(&append_extension(&path, "old")).unwrap();
|
||||
|
||||
let expected = "
|
||||
Line 6: Hello World!
|
||||
Line 7: Hello World!
|
||||
";
|
||||
|
||||
let expected_old = "
|
||||
Line 3: Hello World!
|
||||
Line 4: Hello World!
|
||||
Line 5: Hello World!
|
||||
Line 6: Hello World!
|
||||
Line 7: Hello World!
|
||||
Line 1: Hello World!
|
||||
Line 2: Hello World!
|
||||
Line 3: Hello World!
|
||||
Line 4: Hello World!
|
||||
Line 5: Hello World!
|
||||
";
|
||||
|
||||
assert_eq!(content.trim(), expected.trim());
|
||||
assert_eq!(content_old.trim(), expected_old.trim());
|
||||
}
|
||||
@@ -118,6 +118,9 @@ macro_rules! maybe_pub_os {
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(feature = "file-logging")]
|
||||
mod file_rotate;
|
||||
|
||||
mod app;
|
||||
pub use app::*;
|
||||
|
||||
@@ -188,4 +191,4 @@ impl From<ureq::Error> for Error {
|
||||
fn from(err: ureq::Error) -> Self {
|
||||
Error::Network(Box::new(NetworkError::Http(err)))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,6 @@ impl ShortcutLocationFlags {
|
||||
/// VelopackLocator provides some utility functions for locating the current app important paths (eg. path to packages, update binary, and so forth).
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, Default)]
|
||||
#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
|
||||
pub struct VelopackLocatorConfig {
|
||||
/// The root directory of the current app.
|
||||
pub RootAppDir: PathBuf,
|
||||
|
||||
@@ -96,12 +96,9 @@ pub fn init_logging(
|
||||
|
||||
if let Some(f) = file {
|
||||
let file_level = if verbose { LevelFilter::Trace } else { LevelFilter::Info };
|
||||
let writer = file_rotate::FileRotate::new(
|
||||
let writer = super::file_rotate::FileRotate::new(
|
||||
f.clone(),
|
||||
file_rotate::suffix::AppendCount::new(1), // keep 1 old log file
|
||||
file_rotate::ContentLimit::Bytes(1 * 1024 * 1024), // 1MB max log file size
|
||||
file_rotate::compression::Compression::None,
|
||||
None,
|
||||
1 * 1024 * 1024, // 1MB max log file size
|
||||
);
|
||||
loggers.push(WriteLogger::new(file_level, get_config(Some(process_name)), writer));
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ impl VelopackAssetFeed {
|
||||
/// An individual Velopack asset, could refer to an asset on-disk or in a remote package feed.
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
|
||||
#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
|
||||
#[serde(default)]
|
||||
pub struct VelopackAsset {
|
||||
/// The name or Id of the package containing this release.
|
||||
@@ -75,7 +74,6 @@ pub struct VelopackAsset {
|
||||
/// Holds information about the current version and pending updates, such as how many there are, and access to release notes.
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
|
||||
#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
|
||||
#[serde(default)]
|
||||
pub struct UpdateInfo {
|
||||
/// The available version that we are updating to.
|
||||
@@ -115,7 +113,6 @@ impl AsRef<VelopackAsset> for VelopackAsset {
|
||||
/// Options to customise the behaviour of UpdateManager.
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
|
||||
#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
|
||||
#[serde(default)]
|
||||
pub struct UpdateOptions {
|
||||
/// Allows UpdateManager to update to a version that's lower than the current version (i.e. downgrading).
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.S3" Version="4.0.0.4" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="4.0.1.3" />
|
||||
<PackageReference Include="Azure.Storage.Blobs" Version="12.24.0" />
|
||||
<PackageReference Include="Gitea.Net.API" Version="25.3.5" />
|
||||
<PackageReference Include="Octokit" Version="14.0.0" />
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.72.0" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.72.0" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.72.0" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.72.1" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.72.1" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.72.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" Aliases="HttpFormatting" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="System.Text.Json" Version="9.0.5" />
|
||||
<PackageReference Include="Markdig" Version="0.41.1" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.72.0" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.72.0" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.72.0" />
|
||||
<PackageReference Include="Markdig" Version="0.41.2" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.72.1" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.72.1" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.72.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" Aliases="HttpFormatting" />
|
||||
<PackageReference Include="NuGet.Protocol" Version="6.14.0" />
|
||||
|
||||
@@ -20,6 +20,26 @@ public class GithubDeploymentTests
|
||||
_output = output;
|
||||
}
|
||||
|
||||
[Fact(Skip = "Need to create a repo to test with")]
|
||||
public async Task TestUnauthenticatedDownload()
|
||||
{
|
||||
using var logger = _output.BuildLoggerFor<GithubDeploymentTests>();
|
||||
using var _1 = TempUtil.GetTempDirectory(out var releaseDir);
|
||||
|
||||
var repo = new GitHubRepository(logger);
|
||||
var options = new GitHubDownloadOptions {
|
||||
TargetOs = RuntimeOs.Linux,
|
||||
Channel = "linux-x64",
|
||||
ReleaseDir = new DirectoryInfo(releaseDir),
|
||||
Timeout = 60,
|
||||
Prerelease = false,
|
||||
RepoUrl = "TODO",
|
||||
Token = null,
|
||||
};
|
||||
|
||||
await repo.DownloadLatestFullPackageAsync(options);
|
||||
}
|
||||
|
||||
[SkippableFact]
|
||||
public void WillRefuseToUploadMultipleWithoutMergeArg()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user