mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-02 06:46:15 -07:00
Compare commits
6 Commits
feature/cl
...
feature/ge
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55b45a4a0c | ||
|
|
ae03bd2f13 | ||
|
|
1e2bb889bf | ||
|
|
7615bbd9dd | ||
|
|
aa2e05d468 | ||
|
|
b3e1639029 |
1
.github/workflows/build-tests-mac.yml
vendored
1
.github/workflows/build-tests-mac.yml
vendored
@@ -12,6 +12,7 @@ jobs:
|
|||||||
buildForAllPlatformsMacOS:
|
buildForAllPlatformsMacOS:
|
||||||
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
|
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
170
.github/workflows/release-cli.yml
vendored
170
.github/workflows/release-cli.yml
vendored
@@ -1,170 +0,0 @@
|
|||||||
name: Release CLI
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag:
|
|
||||||
description: 'Release tag to build (e.g., v2.0.0). Uses latest release if empty.'
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
publish-npm:
|
|
||||||
description: 'Publish to npm'
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.release.tag_name || inputs.tag || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-binaries:
|
|
||||||
name: Build ${{ matrix.target }}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- target: linux-x64
|
|
||||||
os: ubuntu-latest
|
|
||||||
pkg-target: node20-linux-x64
|
|
||||||
binary-name: game-ci-linux-x64
|
|
||||||
- target: linux-arm64
|
|
||||||
os: ubuntu-latest
|
|
||||||
pkg-target: node20-linux-arm64
|
|
||||||
binary-name: game-ci-linux-arm64
|
|
||||||
- target: macos-x64
|
|
||||||
os: macos-latest
|
|
||||||
pkg-target: node20-macos-x64
|
|
||||||
binary-name: game-ci-macos-x64
|
|
||||||
- target: macos-arm64
|
|
||||||
os: macos-latest
|
|
||||||
pkg-target: node20-macos-arm64
|
|
||||||
binary-name: game-ci-macos-arm64
|
|
||||||
- target: windows-x64
|
|
||||||
os: windows-latest
|
|
||||||
pkg-target: node20-win-x64
|
|
||||||
binary-name: game-ci-windows-x64.exe
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.release.tag_name || inputs.tag || github.ref }}
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Build TypeScript
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Verify CLI before packaging
|
|
||||||
run: node lib/cli.js version
|
|
||||||
|
|
||||||
- name: Build standalone binary
|
|
||||||
run: npx pkg lib/cli.js --target ${{ matrix.pkg-target }} --output ${{ matrix.binary-name }} --compress GZip
|
|
||||||
|
|
||||||
- name: Verify standalone binary (non-cross-compiled)
|
|
||||||
if: |
|
|
||||||
(matrix.target == 'linux-x64' && runner.os == 'Linux') ||
|
|
||||||
(matrix.target == 'macos-arm64' && runner.os == 'macOS' && runner.arch == 'ARM64') ||
|
|
||||||
(matrix.target == 'macos-x64' && runner.os == 'macOS' && runner.arch == 'X64') ||
|
|
||||||
(matrix.target == 'windows-x64' && runner.os == 'Windows')
|
|
||||||
run: ./${{ matrix.binary-name }} version
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: binary-${{ matrix.target }}
|
|
||||||
path: ${{ matrix.binary-name }}
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
create-checksums-and-upload:
|
|
||||||
name: Checksums and release upload
|
|
||||||
needs: build-binaries
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: binaries
|
|
||||||
pattern: binary-*
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: List binaries
|
|
||||||
run: ls -la binaries/
|
|
||||||
|
|
||||||
- name: Generate SHA256 checksums
|
|
||||||
run: |
|
|
||||||
cd binaries
|
|
||||||
sha256sum game-ci-* > checksums.txt
|
|
||||||
echo "=== checksums.txt ==="
|
|
||||||
cat checksums.txt
|
|
||||||
|
|
||||||
- name: Determine release tag
|
|
||||||
id: tag
|
|
||||||
run: |
|
|
||||||
if [ "${{ github.event_name }}" = "release" ]; then
|
|
||||||
echo "tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
|
|
||||||
elif [ -n "${{ inputs.tag }}" ]; then
|
|
||||||
echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
echo "No release tag available. Skipping upload."
|
|
||||||
echo "tag=" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload binaries to release
|
|
||||||
if: steps.tag.outputs.tag != ''
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
run: |
|
|
||||||
cd binaries
|
|
||||||
for f in game-ci-* checksums.txt; do
|
|
||||||
echo "Uploading $f..."
|
|
||||||
gh release upload "${{ steps.tag.outputs.tag }}" "$f" \
|
|
||||||
--repo "${{ github.repository }}" \
|
|
||||||
--clobber
|
|
||||||
done
|
|
||||||
|
|
||||||
publish-npm:
|
|
||||||
name: Publish to npm
|
|
||||||
needs: build-binaries
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: >-
|
|
||||||
(github.event_name == 'release') || (github.event_name == 'workflow_dispatch' && inputs.publish-npm)
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.release.tag_name || inputs.tag || github.ref }}
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: yarn install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: yarn test
|
|
||||||
|
|
||||||
- name: Verify CLI
|
|
||||||
run: |
|
|
||||||
node lib/cli.js version
|
|
||||||
node lib/cli.js --help
|
|
||||||
|
|
||||||
- name: Publish to npm
|
|
||||||
run: npm publish --provenance --access public
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
24
action.yml
24
action.yml
@@ -269,6 +269,28 @@ inputs:
|
|||||||
default: 'false'
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
description: 'Skip the activation/deactivation of Unity. This assumes Unity is already activated.'
|
description: 'Skip the activation/deactivation of Unity. This assumes Unity is already activated.'
|
||||||
|
artifactOutputTypes:
|
||||||
|
description: 'Comma-separated list of output types to collect (build, logs, test-results, coverage, images, metrics, data-export, server-build, custom)'
|
||||||
|
required: false
|
||||||
|
default: 'build,logs,test-results'
|
||||||
|
artifactUploadTarget:
|
||||||
|
description: 'Where to upload artifacts: github-artifacts, storage, local, none'
|
||||||
|
required: false
|
||||||
|
default: 'github-artifacts'
|
||||||
|
artifactUploadPath:
|
||||||
|
description: 'Destination path for artifact upload (storage URI or local path)'
|
||||||
|
required: false
|
||||||
|
artifactCompression:
|
||||||
|
description: 'Compression for artifacts: none, gzip, lz4'
|
||||||
|
required: false
|
||||||
|
default: 'gzip'
|
||||||
|
artifactRetentionDays:
|
||||||
|
description: 'Retention period for uploaded artifacts in days'
|
||||||
|
required: false
|
||||||
|
default: '30'
|
||||||
|
artifactCustomTypes:
|
||||||
|
description: 'JSON string defining custom output types [{name, defaultPath, description}]'
|
||||||
|
required: false
|
||||||
cloneDepth:
|
cloneDepth:
|
||||||
default: '50'
|
default: '50'
|
||||||
required: false
|
required: false
|
||||||
@@ -292,6 +314,8 @@ outputs:
|
|||||||
'Returns the exit code from the build scripts. This code is 0 if the build was successful. If there was an error
|
'Returns the exit code from the build scripts. This code is 0 if the build was successful. If there was an error
|
||||||
during activation, the code is from the activation step. If activation is successful, the code is from the project
|
during activation, the code is from the activation step. If activation is successful, the code is from the project
|
||||||
build step.'
|
build step.'
|
||||||
|
artifactManifestPath:
|
||||||
|
description: 'Path to the generated artifact manifest JSON file'
|
||||||
branding:
|
branding:
|
||||||
icon: 'box'
|
icon: 'box'
|
||||||
color: 'gray-dark'
|
color: 'gray-dark'
|
||||||
|
|||||||
1160
dist/index.js
generated
vendored
1160
dist/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
122
install.ps1
122
install.ps1
@@ -1,122 +0,0 @@
|
|||||||
# game-ci CLI installer for Windows
|
|
||||||
# Usage: irm https://raw.githubusercontent.com/game-ci/unity-builder/main/install.ps1 | iex
|
|
||||||
#
|
|
||||||
# Environment variables:
|
|
||||||
# GAME_CI_VERSION - Install a specific version (e.g., v2.0.0). Defaults to latest.
|
|
||||||
# GAME_CI_INSTALL - Installation directory. Defaults to $HOME\.game-ci\bin.
|
|
||||||
|
|
||||||
$ErrorActionPreference = 'Stop'
|
|
||||||
|
|
||||||
$Repo = "game-ci/unity-builder"
|
|
||||||
$InstallDir = if ($env:GAME_CI_INSTALL) { $env:GAME_CI_INSTALL } else { Join-Path $env:USERPROFILE ".game-ci\bin" }
|
|
||||||
$AssetName = "game-ci-windows-x64.exe"
|
|
||||||
$BinaryName = "game-ci.exe"
|
|
||||||
|
|
||||||
function Write-Info($Message) {
|
|
||||||
Write-Host "info: " -ForegroundColor Green -NoNewline
|
|
||||||
Write-Host $Message
|
|
||||||
}
|
|
||||||
|
|
||||||
function Write-Warn($Message) {
|
|
||||||
Write-Host "warn: " -ForegroundColor Yellow -NoNewline
|
|
||||||
Write-Host $Message
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine version
|
|
||||||
if ($env:GAME_CI_VERSION) {
|
|
||||||
$Version = $env:GAME_CI_VERSION
|
|
||||||
Write-Info "Using specified version: $Version"
|
|
||||||
} else {
|
|
||||||
Write-Info "Fetching latest release..."
|
|
||||||
try {
|
|
||||||
$Release = Invoke-RestMethod "https://api.github.com/repos/$Repo/releases/latest"
|
|
||||||
$Version = $Release.tag_name
|
|
||||||
} catch {
|
|
||||||
Write-Host "error: Could not determine latest version. Check https://github.com/$Repo/releases" -ForegroundColor Red
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$DownloadUrl = "https://github.com/$Repo/releases/download/$Version/$AssetName"
|
|
||||||
$ChecksumUrl = "https://github.com/$Repo/releases/download/$Version/checksums.txt"
|
|
||||||
$BinaryPath = Join-Path $InstallDir $BinaryName
|
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Info "Installing game-ci $Version (windows-x64)"
|
|
||||||
Write-Info " from: $DownloadUrl"
|
|
||||||
Write-Info " to: $BinaryPath"
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
# Create install directory
|
|
||||||
if (-not (Test-Path $InstallDir)) {
|
|
||||||
New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
|
|
||||||
}
|
|
||||||
|
|
||||||
# Download binary
|
|
||||||
try {
|
|
||||||
Invoke-WebRequest -Uri $DownloadUrl -OutFile $BinaryPath -UseBasicParsing
|
|
||||||
} catch {
|
|
||||||
if ($_.Exception.Response.StatusCode -eq 404) {
|
|
||||||
Write-Host "error: Release asset not found: $AssetName ($Version)" -ForegroundColor Red
|
|
||||||
Write-Host " Check available assets at https://github.com/$Repo/releases/tag/$Version" -ForegroundColor Red
|
|
||||||
} else {
|
|
||||||
Write-Host "error: Download failed: $_" -ForegroundColor Red
|
|
||||||
}
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Verify checksum
|
|
||||||
try {
|
|
||||||
$Checksums = Invoke-WebRequest -Uri $ChecksumUrl -UseBasicParsing | Select-Object -ExpandProperty Content
|
|
||||||
$ExpectedLine = $Checksums -split "`n" | Where-Object { $_ -match $AssetName } | Select-Object -First 1
|
|
||||||
if ($ExpectedLine) {
|
|
||||||
$ExpectedHash = ($ExpectedLine -split '\s+')[0]
|
|
||||||
$ActualHash = (Get-FileHash -Path $BinaryPath -Algorithm SHA256).Hash.ToLower()
|
|
||||||
if ($ExpectedHash -eq $ActualHash) {
|
|
||||||
Write-Info "Checksum verified (SHA256)"
|
|
||||||
} else {
|
|
||||||
Write-Host "error: Checksum verification failed!" -ForegroundColor Red
|
|
||||||
Write-Host " Expected: $ExpectedHash" -ForegroundColor Red
|
|
||||||
Write-Host " Got: $ActualHash" -ForegroundColor Red
|
|
||||||
Remove-Item $BinaryPath -Force
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
# Checksums not available for this release; continue without verification
|
|
||||||
}
|
|
||||||
|
|
||||||
# Verify the binary works
|
|
||||||
try {
|
|
||||||
$VersionOutput = & $BinaryPath version 2>&1
|
|
||||||
Write-Info "Verified: $($VersionOutput | Select-Object -First 1)"
|
|
||||||
} catch {
|
|
||||||
Write-Warn "Binary downloaded but could not verify. It may still work."
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host "game-ci installed successfully!" -ForegroundColor Green -BackgroundColor Black
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
# Check PATH and offer to add
|
|
||||||
$UserPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
|
|
||||||
if ($UserPath -notlike "*$InstallDir*") {
|
|
||||||
Write-Warn "game-ci is not in your PATH."
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host "To add it permanently, run:" -ForegroundColor Yellow
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host " [Environment]::SetEnvironmentVariable('PATH', ""$InstallDir;"" + [Environment]::GetEnvironmentVariable('PATH', 'User'), 'User')"
|
|
||||||
Write-Host ""
|
|
||||||
Write-Info "Then restart your terminal."
|
|
||||||
|
|
||||||
# Offer to add automatically
|
|
||||||
Write-Host ""
|
|
||||||
$AddToPath = Read-Host "Add to PATH now? (Y/n)"
|
|
||||||
if ($AddToPath -ne 'n' -and $AddToPath -ne 'N') {
|
|
||||||
[Environment]::SetEnvironmentVariable('PATH', "$InstallDir;$UserPath", 'User')
|
|
||||||
$env:PATH = "$InstallDir;$env:PATH"
|
|
||||||
Write-Info "Added to PATH. You can now run: game-ci --help"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Info "game-ci is already in your PATH. Run: game-ci --help"
|
|
||||||
}
|
|
||||||
196
install.sh
196
install.sh
@@ -1,196 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# game-ci CLI installer
|
|
||||||
# Usage: curl -fsSL https://raw.githubusercontent.com/game-ci/unity-builder/main/install.sh | sh
|
|
||||||
#
|
|
||||||
# Environment variables:
|
|
||||||
# GAME_CI_VERSION - Install a specific version (e.g., v2.0.0). Defaults to latest.
|
|
||||||
# GAME_CI_INSTALL - Installation directory. Defaults to ~/.game-ci/bin.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
REPO="game-ci/unity-builder"
|
|
||||||
INSTALL_DIR="${GAME_CI_INSTALL:-$HOME/.game-ci/bin}"
|
|
||||||
BINARY_NAME="game-ci"
|
|
||||||
|
|
||||||
# Colors (disabled if not a terminal)
|
|
||||||
if [ -t 1 ]; then
|
|
||||||
BOLD='\033[1m'
|
|
||||||
GREEN='\033[0;32m'
|
|
||||||
YELLOW='\033[0;33m'
|
|
||||||
RED='\033[0;31m'
|
|
||||||
RESET='\033[0m'
|
|
||||||
else
|
|
||||||
BOLD=''
|
|
||||||
GREEN=''
|
|
||||||
YELLOW=''
|
|
||||||
RED=''
|
|
||||||
RESET=''
|
|
||||||
fi
|
|
||||||
|
|
||||||
info() {
|
|
||||||
printf "${GREEN}info${RESET}: %s\n" "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
warn() {
|
|
||||||
printf "${YELLOW}warn${RESET}: %s\n" "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
error() {
|
|
||||||
printf "${RED}error${RESET}: %s\n" "$1" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Detect OS and architecture
|
|
||||||
detect_platform() {
|
|
||||||
OS="$(uname -s)"
|
|
||||||
ARCH="$(uname -m)"
|
|
||||||
|
|
||||||
case "$OS" in
|
|
||||||
Linux*) PLATFORM="linux" ;;
|
|
||||||
Darwin*) PLATFORM="macos" ;;
|
|
||||||
MINGW*|MSYS*|CYGWIN*)
|
|
||||||
PLATFORM="windows"
|
|
||||||
warn "For Windows, consider using install.ps1 instead:"
|
|
||||||
warn " irm https://raw.githubusercontent.com/game-ci/unity-builder/main/install.ps1 | iex"
|
|
||||||
;;
|
|
||||||
*) error "Unsupported operating system: $OS" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$ARCH" in
|
|
||||||
x86_64|amd64) ARCH="x64" ;;
|
|
||||||
aarch64|arm64) ARCH="arm64" ;;
|
|
||||||
*) error "Unsupported architecture: $ARCH" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ASSET_NAME="game-ci-${PLATFORM}-${ARCH}"
|
|
||||||
if [ "$PLATFORM" = "windows" ]; then
|
|
||||||
ASSET_NAME="${ASSET_NAME}.exe"
|
|
||||||
BINARY_NAME="game-ci.exe"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get latest release tag from GitHub API
|
|
||||||
get_latest_version() {
|
|
||||||
if [ -n "$GAME_CI_VERSION" ]; then
|
|
||||||
VERSION="$GAME_CI_VERSION"
|
|
||||||
info "Using specified version: $VERSION"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Fetching latest release..."
|
|
||||||
|
|
||||||
if command -v curl > /dev/null 2>&1; then
|
|
||||||
VERSION=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
|
|
||||||
elif command -v wget > /dev/null 2>&1; then
|
|
||||||
VERSION=$(wget -qO- "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
|
|
||||||
else
|
|
||||||
error "Neither curl nor wget found. Please install one of them."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$VERSION" ]; then
|
|
||||||
error "Could not determine latest version. Check https://github.com/${REPO}/releases"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Download and install the binary
|
|
||||||
install() {
|
|
||||||
DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${VERSION}/${ASSET_NAME}"
|
|
||||||
|
|
||||||
printf "\n"
|
|
||||||
info "Installing game-ci ${VERSION} (${PLATFORM}-${ARCH})"
|
|
||||||
info " from: ${DOWNLOAD_URL}"
|
|
||||||
info " to: ${INSTALL_DIR}/${BINARY_NAME}"
|
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
mkdir -p "$INSTALL_DIR"
|
|
||||||
|
|
||||||
# Download with progress
|
|
||||||
if command -v curl > /dev/null 2>&1; then
|
|
||||||
HTTP_CODE=$(curl -fSL "$DOWNLOAD_URL" -o "${INSTALL_DIR}/${BINARY_NAME}" -w "%{http_code}" 2>/dev/null) || true
|
|
||||||
if [ "$HTTP_CODE" = "404" ]; then
|
|
||||||
error "Release asset not found: ${ASSET_NAME} (${VERSION}). Check available assets at https://github.com/${REPO}/releases/tag/${VERSION}"
|
|
||||||
elif [ ! -f "${INSTALL_DIR}/${BINARY_NAME}" ]; then
|
|
||||||
error "Download failed. URL: ${DOWNLOAD_URL}"
|
|
||||||
fi
|
|
||||||
elif command -v wget > /dev/null 2>&1; then
|
|
||||||
wget -q "$DOWNLOAD_URL" -O "${INSTALL_DIR}/${BINARY_NAME}" || error "Download failed. URL: ${DOWNLOAD_URL}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod +x "${INSTALL_DIR}/${BINARY_NAME}"
|
|
||||||
|
|
||||||
# Verify the binary works
|
|
||||||
if "${INSTALL_DIR}/${BINARY_NAME}" version > /dev/null 2>&1; then
|
|
||||||
INSTALLED_VERSION=$("${INSTALL_DIR}/${BINARY_NAME}" version 2>&1 | head -1)
|
|
||||||
info "Verified: ${INSTALLED_VERSION}"
|
|
||||||
else
|
|
||||||
warn "Binary downloaded but could not verify. It may still work."
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "\n"
|
|
||||||
printf "${BOLD}game-ci installed successfully!${RESET}\n"
|
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
# Check if install dir is in PATH
|
|
||||||
case ":$PATH:" in
|
|
||||||
*":${INSTALL_DIR}:"*)
|
|
||||||
info "game-ci is already in your PATH. Run: game-ci --help"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
SHELL_NAME=$(basename "$SHELL" 2>/dev/null || echo "sh")
|
|
||||||
case "$SHELL_NAME" in
|
|
||||||
zsh) PROFILE="~/.zshrc" ;;
|
|
||||||
bash) PROFILE="~/.bashrc" ;;
|
|
||||||
fish) PROFILE="~/.config/fish/config.fish" ;;
|
|
||||||
*) PROFILE="~/.profile" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
printf "${YELLOW}Add game-ci to your PATH by adding this to ${PROFILE}:${RESET}\n"
|
|
||||||
printf "\n"
|
|
||||||
if [ "$SHELL_NAME" = "fish" ]; then
|
|
||||||
printf " set -gx PATH \"%s\" \$PATH\n" "$INSTALL_DIR"
|
|
||||||
else
|
|
||||||
printf " export PATH=\"%s:\$PATH\"\n" "$INSTALL_DIR"
|
|
||||||
fi
|
|
||||||
printf "\n"
|
|
||||||
info "Then restart your shell or run: source ${PROFILE}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Verify checksum if checksums.txt is available
|
|
||||||
verify_checksum() {
|
|
||||||
if ! command -v sha256sum > /dev/null 2>&1; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
CHECKSUM_URL="https://github.com/${REPO}/releases/download/${VERSION}/checksums.txt"
|
|
||||||
|
|
||||||
CHECKSUMS=""
|
|
||||||
if command -v curl > /dev/null 2>&1; then
|
|
||||||
CHECKSUMS=$(curl -fsSL "$CHECKSUM_URL" 2>/dev/null) || return 0
|
|
||||||
elif command -v wget > /dev/null 2>&1; then
|
|
||||||
CHECKSUMS=$(wget -qO- "$CHECKSUM_URL" 2>/dev/null) || return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$CHECKSUMS" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
EXPECTED=$(echo "$CHECKSUMS" | grep "$ASSET_NAME" | awk '{print $1}')
|
|
||||||
if [ -z "$EXPECTED" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
ACTUAL=$(sha256sum "${INSTALL_DIR}/${BINARY_NAME}" | awk '{print $1}')
|
|
||||||
if [ "$EXPECTED" != "$ACTUAL" ]; then
|
|
||||||
error "Checksum verification failed!\n Expected: ${EXPECTED}\n Got: ${ACTUAL}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Checksum verified (SHA256)"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main
|
|
||||||
detect_platform
|
|
||||||
get_latest_version
|
|
||||||
install
|
|
||||||
verify_checksum
|
|
||||||
24
package.json
24
package.json
@@ -3,24 +3,6 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"description": "Build Unity projects for different platforms.",
|
"description": "Build Unity projects for different platforms.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
|
||||||
"game-ci": "./lib/cli.js"
|
|
||||||
},
|
|
||||||
"pkg": {
|
|
||||||
"scripts": "lib/**/*.js",
|
|
||||||
"assets": [
|
|
||||||
"lib/**/*.json",
|
|
||||||
"package.json"
|
|
||||||
],
|
|
||||||
"targets": [
|
|
||||||
"node20-linux-x64",
|
|
||||||
"node20-linux-arm64",
|
|
||||||
"node20-macos-x64",
|
|
||||||
"node20-macos-arm64",
|
|
||||||
"node20-win-x64"
|
|
||||||
],
|
|
||||||
"outputPath": "dist-binaries"
|
|
||||||
},
|
|
||||||
"repository": "git@github.com:game-ci/unity-builder.git",
|
"repository": "git@github.com:game-ci/unity-builder.git",
|
||||||
"author": "Webber <webber@takken.io>",
|
"author": "Webber <webber@takken.io>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -30,7 +12,6 @@
|
|||||||
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts",
|
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts",
|
||||||
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
||||||
"cli": "yarn ts-node src/index.ts -m cli",
|
"cli": "yarn ts-node src/index.ts -m cli",
|
||||||
"game-ci": "ts-node src/cli.ts",
|
|
||||||
"gcp-secrets-tests": "cross-env providerStrategy=aws orchestratorTests=true inputPullCommand=\"gcp-secret-manager\" populateOverride=true pullInputList=UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD yarn test -i -t \"orchestrator\"",
|
"gcp-secrets-tests": "cross-env providerStrategy=aws orchestratorTests=true inputPullCommand=\"gcp-secret-manager\" populateOverride=true pullInputList=UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD yarn test -i -t \"orchestrator\"",
|
||||||
"gcp-secrets-cli": "cross-env orchestratorTests=true USE_IL2CPP=false inputPullCommand=\"gcp-secret-manager\" yarn ts-node src/index.ts -m cli --populateOverride true --pullInputList UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD",
|
"gcp-secrets-cli": "cross-env orchestratorTests=true USE_IL2CPP=false inputPullCommand=\"gcp-secret-manager\" yarn ts-node src/index.ts -m cli --populateOverride true --pullInputList UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD",
|
||||||
"aws-secrets-cli": "cross-env orchestratorTests=true inputPullCommand=\"aws-secret-manager\" yarn ts-node src/index.ts -m cli --populateOverride true --pullInputList UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD",
|
"aws-secrets-cli": "cross-env orchestratorTests=true inputPullCommand=\"aws-secret-manager\" yarn ts-node src/index.ts -m cli --populateOverride true --pullInputList UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD",
|
||||||
@@ -73,8 +54,7 @@
|
|||||||
"ts-md5": "^1.3.1",
|
"ts-md5": "^1.3.1",
|
||||||
"unity-changeset": "^3.1.0",
|
"unity-changeset": "^3.1.0",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"yaml": "^2.2.2",
|
"yaml": "^2.2.2"
|
||||||
"yargs": "^17.7.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/base-64": "^1.0.0",
|
"@types/base-64": "^1.0.0",
|
||||||
@@ -82,7 +62,6 @@
|
|||||||
"@types/node": "^17.0.23",
|
"@types/node": "^17.0.23",
|
||||||
"@types/semver": "^7.3.9",
|
"@types/semver": "^7.3.9",
|
||||||
"@types/uuid": "^9.0.0",
|
"@types/uuid": "^9.0.0",
|
||||||
"@types/yargs": "^17.0.35",
|
|
||||||
"@typescript-eslint/parser": "4.8.1",
|
"@typescript-eslint/parser": "4.8.1",
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.36.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
@@ -98,7 +77,6 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"lefthook": "^1.6.1",
|
"lefthook": "^1.6.1",
|
||||||
"node-fetch": "2",
|
"node-fetch": "2",
|
||||||
"pkg": "^5.8.1",
|
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
"ts-node": "10.8.1",
|
"ts-node": "10.8.1",
|
||||||
|
|||||||
42
src/cli.ts
42
src/cli.ts
@@ -1,42 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
import yargs from 'yargs';
|
|
||||||
// eslint-disable-next-line import/no-unresolved
|
|
||||||
import { hideBin } from 'yargs/helpers';
|
|
||||||
import buildCommand from './cli/commands/build';
|
|
||||||
import testCommand from './cli/commands/test';
|
|
||||||
import orchestrateCommand from './cli/commands/orchestrate';
|
|
||||||
import activateCommand from './cli/commands/activate';
|
|
||||||
import statusCommand from './cli/commands/status';
|
|
||||||
import versionCommand from './cli/commands/version';
|
|
||||||
import updateCommand from './cli/commands/update';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
|
|
||||||
const cli = yargs(hideBin(process.argv))
|
|
||||||
.scriptName('game-ci')
|
|
||||||
.usage('$0 <command> [options]')
|
|
||||||
.command(buildCommand)
|
|
||||||
.command(testCommand)
|
|
||||||
.command(orchestrateCommand)
|
|
||||||
.command(activateCommand)
|
|
||||||
.command(statusCommand)
|
|
||||||
.command(versionCommand)
|
|
||||||
.command(updateCommand)
|
|
||||||
.demandCommand(1, 'You must specify a command. Run game-ci --help for available commands.')
|
|
||||||
.strict()
|
|
||||||
.alias('h', 'help')
|
|
||||||
.epilogue('For more information, visit https://game.ci')
|
|
||||||
.wrap(Math.min(120, process.stdout.columns || 80));
|
|
||||||
|
|
||||||
async function main() {
|
|
||||||
try {
|
|
||||||
await cli.parse();
|
|
||||||
} catch (error: any) {
|
|
||||||
if (error.name !== 'YError') {
|
|
||||||
core.error(`Error: ${error.message}`);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
import { execFile } from 'node:child_process';
|
|
||||||
import path from 'node:path';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Integration tests that spawn the CLI as a child process and verify
|
|
||||||
* exit codes and output. Uses node with --require ts-node/register to
|
|
||||||
* run the TypeScript entry point directly so no build step is required.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const CLI_ENTRY = path.resolve(__dirname, '..', '..', 'cli.ts');
|
|
||||||
|
|
||||||
function runCli(cliArguments: string[]): Promise<{ code: number | null; stdout: string; stderr: string }> {
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
execFile(
|
|
||||||
process.execPath,
|
|
||||||
['--require', 'ts-node/register/transpile-only', CLI_ENTRY, ...cliArguments],
|
|
||||||
{ timeout: 30_000, cwd: path.resolve(__dirname, '..', '..', '..') },
|
|
||||||
(error, stdout, stderr) => {
|
|
||||||
resolve({
|
|
||||||
code: error ? error.code ?? 1 : 0,
|
|
||||||
stdout: stdout.toString(),
|
|
||||||
stderr: stderr.toString(),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Integration tests spawn child processes which need more time than the default 5s
|
|
||||||
jest.setTimeout(30_000);
|
|
||||||
|
|
||||||
describe('CLI integration', () => {
|
|
||||||
it('exits 0 and shows all commands for --help', async () => {
|
|
||||||
const result = await runCli(['--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('game-ci');
|
|
||||||
expect(result.stdout).toContain('build');
|
|
||||||
expect(result.stdout).toContain('test');
|
|
||||||
expect(result.stdout).toContain('orchestrate');
|
|
||||||
expect(result.stdout).toContain('activate');
|
|
||||||
expect(result.stdout).toContain('status');
|
|
||||||
expect(result.stdout).toContain('version');
|
|
||||||
expect(result.stdout).toContain('update');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 and shows version info for version command', async () => {
|
|
||||||
const result = await runCli(['version']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('unity-builder');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 and shows build flags for build --help', async () => {
|
|
||||||
const result = await runCli(['build', '--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('--target-platform');
|
|
||||||
expect(result.stdout).toContain('--unity-version');
|
|
||||||
expect(result.stdout).toContain('--project-path');
|
|
||||||
expect(result.stdout).toContain('--build-name');
|
|
||||||
expect(result.stdout).toContain('--builds-path');
|
|
||||||
expect(result.stdout).toContain('--build-method');
|
|
||||||
expect(result.stdout).toContain('--custom-parameters');
|
|
||||||
expect(result.stdout).toContain('--versioning');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 and shows test flags for test --help', async () => {
|
|
||||||
const result = await runCli(['test', '--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('--target-platform');
|
|
||||||
expect(result.stdout).toContain('--test-mode');
|
|
||||||
expect(result.stdout).toContain('--test-results-path');
|
|
||||||
expect(result.stdout).toContain('--enable-code-coverage');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 for test alias t --help', async () => {
|
|
||||||
const result = await runCli(['t', '--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('--test-mode');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits non-zero for an unknown command', async () => {
|
|
||||||
const result = await runCli(['nonexistent']);
|
|
||||||
|
|
||||||
expect(result.code).not.toStrictEqual(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits non-zero when no command is provided', async () => {
|
|
||||||
const result = await runCli([]);
|
|
||||||
|
|
||||||
expect(result.code).not.toStrictEqual(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 for orchestrate --help', async () => {
|
|
||||||
const result = await runCli(['orchestrate', '--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('--target-platform');
|
|
||||||
expect(result.stdout).toContain('--provider-strategy');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 for orchestrate alias o --help', async () => {
|
|
||||||
const result = await runCli(['o', '--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('--provider-strategy');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 for activate --help', async () => {
|
|
||||||
const result = await runCli(['activate', '--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('activate');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 for status --help', async () => {
|
|
||||||
const result = await runCli(['status', '--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('status');
|
|
||||||
expect(result.stdout).toContain('--cache-dir');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('exits 0 for update --help', async () => {
|
|
||||||
const result = await runCli(['update', '--help']);
|
|
||||||
|
|
||||||
expect(result.code).toStrictEqual(0);
|
|
||||||
expect(result.stdout).toContain('update');
|
|
||||||
expect(result.stdout).toContain('--force');
|
|
||||||
expect(result.stdout).toContain('--version');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,312 +0,0 @@
|
|||||||
import buildCommand from '../commands/build';
|
|
||||||
import testCommand from '../commands/test';
|
|
||||||
import activateCommand from '../commands/activate';
|
|
||||||
import orchestrateCommand from '../commands/orchestrate';
|
|
||||||
import statusCommand from '../commands/status';
|
|
||||||
import versionCommand from '../commands/version';
|
|
||||||
import updateCommand from '../commands/update';
|
|
||||||
|
|
||||||
function createFakeYargs(): { yargs: any; options: Record<string, any> } {
|
|
||||||
const options: Record<string, any> = {};
|
|
||||||
const yargs: any = {
|
|
||||||
option: jest.fn(),
|
|
||||||
positional: jest.fn(),
|
|
||||||
example: jest.fn(),
|
|
||||||
env: jest.fn(),
|
|
||||||
};
|
|
||||||
|
|
||||||
yargs.option.mockImplementation((name: string, config: any) => {
|
|
||||||
options[name] = config;
|
|
||||||
|
|
||||||
return yargs;
|
|
||||||
});
|
|
||||||
yargs.positional.mockImplementation((name: string, config: any) => {
|
|
||||||
options[name] = config;
|
|
||||||
|
|
||||||
return yargs;
|
|
||||||
});
|
|
||||||
yargs.example.mockReturnValue(yargs);
|
|
||||||
yargs.env.mockReturnValue(yargs);
|
|
||||||
|
|
||||||
return { yargs, options };
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('CLI commands', () => {
|
|
||||||
describe('build command', () => {
|
|
||||||
it('exports the correct command name', () => {
|
|
||||||
expect(buildCommand.command).toStrictEqual('build');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a description', () => {
|
|
||||||
expect(buildCommand.describe).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a builder function', () => {
|
|
||||||
expect(typeof buildCommand.builder).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a handler function', () => {
|
|
||||||
expect(typeof buildCommand.handler).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('defines all expected build flags via builder', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(buildCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
// Core build flags (from shared + build-specific)
|
|
||||||
expect(options['target-platform']).toBeDefined();
|
|
||||||
expect(options['target-platform'].demandOption).toStrictEqual(true);
|
|
||||||
expect(options['unity-version']).toBeDefined();
|
|
||||||
expect(options['project-path']).toBeDefined();
|
|
||||||
expect(options['build-profile']).toBeDefined();
|
|
||||||
expect(options['build-name']).toBeDefined();
|
|
||||||
expect(options['builds-path']).toBeDefined();
|
|
||||||
expect(options['build-method']).toBeDefined();
|
|
||||||
expect(options['custom-parameters']).toBeDefined();
|
|
||||||
expect(options['versioning']).toBeDefined();
|
|
||||||
expect(options['version']).toBeDefined();
|
|
||||||
expect(options['custom-image']).toBeDefined();
|
|
||||||
expect(options['manual-exit']).toBeDefined();
|
|
||||||
expect(options['enable-gpu']).toBeDefined();
|
|
||||||
|
|
||||||
// Android flags
|
|
||||||
expect(options['android-version-code']).toBeDefined();
|
|
||||||
expect(options['android-export-type']).toBeDefined();
|
|
||||||
expect(options['android-keystore-name']).toBeDefined();
|
|
||||||
expect(options['android-keystore-base64']).toBeDefined();
|
|
||||||
expect(options['android-keystore-pass']).toBeDefined();
|
|
||||||
expect(options['android-keyalias-name']).toBeDefined();
|
|
||||||
expect(options['android-keyalias-pass']).toBeDefined();
|
|
||||||
expect(options['android-target-sdk-version']).toBeDefined();
|
|
||||||
expect(options['android-symbol-type']).toBeDefined();
|
|
||||||
|
|
||||||
// Docker flags
|
|
||||||
expect(options['docker-cpu-limit']).toBeDefined();
|
|
||||||
expect(options['docker-memory-limit']).toBeDefined();
|
|
||||||
expect(options['docker-workspace-path']).toBeDefined();
|
|
||||||
expect(options['run-as-host-user']).toBeDefined();
|
|
||||||
expect(options['chown-files-to']).toBeDefined();
|
|
||||||
|
|
||||||
// Build should NOT have orchestrator-specific flags
|
|
||||||
expect(options['provider-strategy']).toBeUndefined();
|
|
||||||
expect(options['aws-stack-name']).toBeUndefined();
|
|
||||||
expect(options['kube-config']).toBeUndefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('sets correct default values', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(buildCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['unity-version'].default).toStrictEqual('auto');
|
|
||||||
expect(options['project-path'].default).toStrictEqual('.');
|
|
||||||
expect(options['builds-path'].default).toStrictEqual('build');
|
|
||||||
expect(options['versioning'].default).toStrictEqual('Semantic');
|
|
||||||
expect(options['manual-exit'].default).toStrictEqual(false);
|
|
||||||
expect(options['enable-gpu'].default).toStrictEqual(false);
|
|
||||||
expect(options['android-export-type'].default).toStrictEqual('androidPackage');
|
|
||||||
expect(options['android-symbol-type'].default).toStrictEqual('none');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('provides camelCase aliases for kebab-case options', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(buildCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['target-platform'].alias).toStrictEqual('targetPlatform');
|
|
||||||
expect(options['unity-version'].alias).toStrictEqual('unityVersion');
|
|
||||||
expect(options['project-path'].alias).toStrictEqual('projectPath');
|
|
||||||
expect(options['build-name'].alias).toStrictEqual('buildName');
|
|
||||||
expect(options['builds-path'].alias).toStrictEqual('buildsPath');
|
|
||||||
expect(options['build-method'].alias).toStrictEqual('buildMethod');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('test command', () => {
|
|
||||||
it('exports command with alias', () => {
|
|
||||||
expect(testCommand.command).toStrictEqual(['test', 't']);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a description', () => {
|
|
||||||
expect(testCommand.describe).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a builder function', () => {
|
|
||||||
expect(typeof testCommand.builder).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a handler function', () => {
|
|
||||||
expect(typeof testCommand.handler).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('defines test-specific flags', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(testCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['test-mode']).toBeDefined();
|
|
||||||
expect(options['test-mode'].default).toStrictEqual('All');
|
|
||||||
expect(options['test-mode'].choices).toStrictEqual(['EditMode', 'PlayMode', 'All']);
|
|
||||||
expect(options['test-results-path']).toBeDefined();
|
|
||||||
expect(options['test-category']).toBeDefined();
|
|
||||||
expect(options['test-filter']).toBeDefined();
|
|
||||||
expect(options['enable-code-coverage']).toBeDefined();
|
|
||||||
expect(options['coverage-options']).toBeDefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('includes shared project options', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(testCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['target-platform']).toBeDefined();
|
|
||||||
expect(options['target-platform'].demandOption).toStrictEqual(true);
|
|
||||||
expect(options['unity-version']).toBeDefined();
|
|
||||||
expect(options['project-path']).toBeDefined();
|
|
||||||
expect(options['custom-image']).toBeDefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('includes docker options but not orchestrator options', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(testCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['docker-cpu-limit']).toBeDefined();
|
|
||||||
expect(options['docker-memory-limit']).toBeDefined();
|
|
||||||
expect(options['provider-strategy']).toBeUndefined();
|
|
||||||
expect(options['aws-stack-name']).toBeUndefined();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('activate command', () => {
|
|
||||||
it('exports the correct command name', () => {
|
|
||||||
expect(activateCommand.command).toStrictEqual('activate');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a description', () => {
|
|
||||||
expect(activateCommand.describe).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a builder function', () => {
|
|
||||||
expect(typeof activateCommand.builder).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a handler function', () => {
|
|
||||||
expect(typeof activateCommand.handler).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('orchestrate command', () => {
|
|
||||||
it('exports command with alias', () => {
|
|
||||||
expect(orchestrateCommand.command).toStrictEqual(['orchestrate', 'o']);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a description', () => {
|
|
||||||
expect(orchestrateCommand.describe).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a builder function', () => {
|
|
||||||
expect(typeof orchestrateCommand.builder).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a handler function', () => {
|
|
||||||
expect(typeof orchestrateCommand.handler).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('defines key orchestrator flags', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(orchestrateCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['target-platform']).toBeDefined();
|
|
||||||
expect(options['target-platform'].demandOption).toStrictEqual(true);
|
|
||||||
expect(options['provider-strategy']).toBeDefined();
|
|
||||||
expect(options['provider-strategy'].default).toStrictEqual('aws');
|
|
||||||
expect(options['aws-stack-name']).toBeDefined();
|
|
||||||
expect(options['kube-config']).toBeDefined();
|
|
||||||
expect(options['kube-volume']).toBeDefined();
|
|
||||||
expect(options['cache-key']).toBeDefined();
|
|
||||||
expect(options['watch-to-end']).toBeDefined();
|
|
||||||
expect(options['clone-depth']).toBeDefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('does not include build-only options', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(orchestrateCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['build-profile']).toBeUndefined();
|
|
||||||
expect(options['manual-exit']).toBeUndefined();
|
|
||||||
expect(options['enable-gpu']).toBeUndefined();
|
|
||||||
expect(options['android-version-code']).toBeUndefined();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('status command', () => {
|
|
||||||
it('exports the correct command name', () => {
|
|
||||||
expect(statusCommand.command).toStrictEqual('status');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a description', () => {
|
|
||||||
expect(statusCommand.describe).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a handler function', () => {
|
|
||||||
expect(typeof statusCommand.handler).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('includes cache-dir option', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(statusCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['cache-dir']).toBeDefined();
|
|
||||||
expect(options['project-path']).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('version command', () => {
|
|
||||||
it('exports the correct command name', () => {
|
|
||||||
expect(versionCommand.command).toStrictEqual('version');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a description', () => {
|
|
||||||
expect(versionCommand.describe).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a handler function', () => {
|
|
||||||
expect(typeof versionCommand.handler).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('update command', () => {
|
|
||||||
it('exports the correct command name', () => {
|
|
||||||
expect(updateCommand.command).toStrictEqual('update');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a description', () => {
|
|
||||||
expect(updateCommand.describe).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a builder function', () => {
|
|
||||||
expect(typeof updateCommand.builder).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a handler function', () => {
|
|
||||||
expect(typeof updateCommand.handler).toStrictEqual('function');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('defines force and version flags', () => {
|
|
||||||
const { yargs, options } = createFakeYargs();
|
|
||||||
|
|
||||||
(updateCommand.builder as Function)(yargs);
|
|
||||||
|
|
||||||
expect(options['force']).toBeDefined();
|
|
||||||
expect(options['force'].type).toStrictEqual('boolean');
|
|
||||||
expect(options['force'].default).toStrictEqual(false);
|
|
||||||
expect(options['version']).toBeDefined();
|
|
||||||
expect(options['version'].type).toStrictEqual('string');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,221 +0,0 @@
|
|||||||
import { mapCliArgumentsToInput, CliArguments } from '../input-mapper';
|
|
||||||
import { Cli } from '../../model/cli/cli';
|
|
||||||
import GitHub from '../../model/github';
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
jest.restoreAllMocks();
|
|
||||||
Cli.options = undefined;
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('mapCliArgumentsToInput', () => {
|
|
||||||
describe('basic mapping', () => {
|
|
||||||
it('populates Cli.options from CLI arguments', () => {
|
|
||||||
const cliArguments: CliArguments = {
|
|
||||||
targetPlatform: 'StandaloneLinux64',
|
|
||||||
unityVersion: '2022.3.56f1',
|
|
||||||
projectPath: './my-project',
|
|
||||||
};
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options).toBeDefined();
|
|
||||||
expect(Cli.options!['targetPlatform']).toStrictEqual('StandaloneLinux64');
|
|
||||||
expect(Cli.options!['unityVersion']).toStrictEqual('2022.3.56f1');
|
|
||||||
expect(Cli.options!['projectPath']).toStrictEqual('./my-project');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('disables GitHub Actions input reading', () => {
|
|
||||||
const cliArguments: CliArguments = { targetPlatform: 'WebGL' };
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(GitHub.githubInputEnabled).toStrictEqual(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('sets mode to cli by default when not provided', () => {
|
|
||||||
const cliArguments: CliArguments = { targetPlatform: 'Android' };
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['mode']).toStrictEqual('cli');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('preserves an explicitly provided mode', () => {
|
|
||||||
const cliArguments: CliArguments = { targetPlatform: 'Android', mode: 'custom-mode' };
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['mode']).toStrictEqual('custom-mode');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('default values', () => {
|
|
||||||
it('omits undefined values from Cli.options', () => {
|
|
||||||
const cliArguments: CliArguments = {
|
|
||||||
targetPlatform: 'StandaloneLinux64',
|
|
||||||
unityVersion: undefined,
|
|
||||||
buildName: undefined,
|
|
||||||
};
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['targetPlatform']).toStrictEqual('StandaloneLinux64');
|
|
||||||
expect(Cli.options!).not.toHaveProperty('unityVersion');
|
|
||||||
expect(Cli.options!).not.toHaveProperty('buildName');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('boolean conversion', () => {
|
|
||||||
it('converts boolean true to string "true"', () => {
|
|
||||||
const cliArguments: CliArguments = { manualExit: true };
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['manualExit']).toStrictEqual('true');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('converts boolean false to string "false"', () => {
|
|
||||||
const cliArguments: CliArguments = { enableGpu: false };
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['enableGpu']).toStrictEqual('false');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('converts allowDirtyBuild boolean to string', () => {
|
|
||||||
const cliArguments: CliArguments = { allowDirtyBuild: true };
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['allowDirtyBuild']).toStrictEqual('true');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('yargs internal properties', () => {
|
|
||||||
it('filters out yargs _ property', () => {
|
|
||||||
const cliArguments: CliArguments = {
|
|
||||||
targetPlatform: 'iOS',
|
|
||||||
_: ['build'] as any,
|
|
||||||
};
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!).not.toHaveProperty('_');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('filters out yargs $0 property', () => {
|
|
||||||
const cliArguments: CliArguments = {
|
|
||||||
targetPlatform: 'iOS',
|
|
||||||
$0: 'game-ci' as any,
|
|
||||||
};
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!).not.toHaveProperty('$0');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('flag name conversion', () => {
|
|
||||||
it('passes camelCase keys through directly', () => {
|
|
||||||
const cliArguments: CliArguments = {
|
|
||||||
androidKeystoreName: 'my.keystore',
|
|
||||||
androidKeystorePass: 'secret',
|
|
||||||
dockerCpuLimit: '4',
|
|
||||||
dockerMemoryLimit: '8g',
|
|
||||||
};
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['androidKeystoreName']).toStrictEqual('my.keystore');
|
|
||||||
expect(Cli.options!['androidKeystorePass']).toStrictEqual('secret');
|
|
||||||
expect(Cli.options!['dockerCpuLimit']).toStrictEqual('4');
|
|
||||||
expect(Cli.options!['dockerMemoryLimit']).toStrictEqual('8g');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('maps all android-related arguments', () => {
|
|
||||||
const cliArguments: CliArguments = {
|
|
||||||
androidVersionCode: '42',
|
|
||||||
androidExportType: 'androidAppBundle',
|
|
||||||
androidKeystoreBase64: 'base64data',
|
|
||||||
androidKeyaliasName: 'myalias',
|
|
||||||
androidKeyaliasPass: 'aliaspass',
|
|
||||||
androidTargetSdkVersion: '33',
|
|
||||||
androidSymbolType: 'public',
|
|
||||||
};
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['androidVersionCode']).toStrictEqual('42');
|
|
||||||
expect(Cli.options!['androidExportType']).toStrictEqual('androidAppBundle');
|
|
||||||
expect(Cli.options!['androidKeystoreBase64']).toStrictEqual('base64data');
|
|
||||||
expect(Cli.options!['androidKeyaliasName']).toStrictEqual('myalias');
|
|
||||||
expect(Cli.options!['androidKeyaliasPass']).toStrictEqual('aliaspass');
|
|
||||||
expect(Cli.options!['androidTargetSdkVersion']).toStrictEqual('33');
|
|
||||||
expect(Cli.options!['androidSymbolType']).toStrictEqual('public');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('maps docker and container arguments', () => {
|
|
||||||
const cliArguments: CliArguments = {
|
|
||||||
dockerIsolationMode: 'hyperv',
|
|
||||||
dockerWorkspacePath: '/custom/workspace',
|
|
||||||
containerRegistryRepository: 'custom/editor',
|
|
||||||
containerRegistryImageVersion: '5',
|
|
||||||
runAsHostUser: 'true',
|
|
||||||
chownFilesTo: 'root:root',
|
|
||||||
};
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['dockerIsolationMode']).toStrictEqual('hyperv');
|
|
||||||
expect(Cli.options!['dockerWorkspacePath']).toStrictEqual('/custom/workspace');
|
|
||||||
expect(Cli.options!['containerRegistryRepository']).toStrictEqual('custom/editor');
|
|
||||||
expect(Cli.options!['containerRegistryImageVersion']).toStrictEqual('5');
|
|
||||||
expect(Cli.options!['runAsHostUser']).toStrictEqual('true');
|
|
||||||
expect(Cli.options!['chownFilesTo']).toStrictEqual('root:root');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('maps orchestrator-related arguments', () => {
|
|
||||||
const cliArguments: CliArguments = {
|
|
||||||
providerStrategy: 'k8s',
|
|
||||||
awsStackName: 'my-stack',
|
|
||||||
kubeConfig: 'base64config',
|
|
||||||
kubeVolume: 'my-pvc',
|
|
||||||
kubeVolumeSize: '10Gi',
|
|
||||||
kubeStorageClass: 'gp3',
|
|
||||||
containerCpu: '2048',
|
|
||||||
containerMemory: '4096',
|
|
||||||
cacheKey: 'my-cache',
|
|
||||||
watchToEnd: 'false',
|
|
||||||
cloneDepth: '100',
|
|
||||||
};
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.options!['providerStrategy']).toStrictEqual('k8s');
|
|
||||||
expect(Cli.options!['awsStackName']).toStrictEqual('my-stack');
|
|
||||||
expect(Cli.options!['kubeConfig']).toStrictEqual('base64config');
|
|
||||||
expect(Cli.options!['kubeVolume']).toStrictEqual('my-pvc');
|
|
||||||
expect(Cli.options!['kubeVolumeSize']).toStrictEqual('10Gi');
|
|
||||||
expect(Cli.options!['kubeStorageClass']).toStrictEqual('gp3');
|
|
||||||
expect(Cli.options!['containerCpu']).toStrictEqual('2048');
|
|
||||||
expect(Cli.options!['containerMemory']).toStrictEqual('4096');
|
|
||||||
expect(Cli.options!['cacheKey']).toStrictEqual('my-cache');
|
|
||||||
expect(Cli.options!['watchToEnd']).toStrictEqual('false');
|
|
||||||
expect(Cli.options!['cloneDepth']).toStrictEqual('100');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Cli.isCliMode integration', () => {
|
|
||||||
it('enables CLI mode after mapping', () => {
|
|
||||||
const cliArguments: CliArguments = { targetPlatform: 'WebGL' };
|
|
||||||
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
expect(Cli.isCliMode).toStrictEqual(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('is not in CLI mode before mapping', () => {
|
|
||||||
expect(Cli.isCliMode).toStrictEqual(false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
import type { CommandModule } from 'yargs';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import { mapCliArgumentsToInput, CliArguments } from '../input-mapper';
|
|
||||||
|
|
||||||
interface ActivateArguments extends CliArguments {
|
|
||||||
unityVersion?: string;
|
|
||||||
unitySerial?: string;
|
|
||||||
unityLicensingServer?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const activateCommand: CommandModule<object, ActivateArguments> = {
|
|
||||||
command: 'activate',
|
|
||||||
describe: 'Verify Unity license configuration',
|
|
||||||
builder: (yargs) => {
|
|
||||||
return yargs
|
|
||||||
.option('unity-version', {
|
|
||||||
alias: 'unityVersion',
|
|
||||||
type: 'string',
|
|
||||||
description: 'Version of Unity to activate',
|
|
||||||
default: 'auto',
|
|
||||||
})
|
|
||||||
.option('unity-licensing-server', {
|
|
||||||
alias: 'unityLicensingServer',
|
|
||||||
type: 'string',
|
|
||||||
description: 'The Unity licensing server address for floating licenses',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.env('UNITY')
|
|
||||||
.example(
|
|
||||||
'UNITY_SERIAL=XXXX-XXXX-XXXX-XXXX game-ci activate',
|
|
||||||
'Activate Unity using a serial from environment variable',
|
|
||||||
)
|
|
||||||
.example(
|
|
||||||
'game-ci activate --unity-licensing-server http://license-server:8080',
|
|
||||||
'Activate Unity using a floating license server',
|
|
||||||
) as any;
|
|
||||||
},
|
|
||||||
handler: async (cliArguments) => {
|
|
||||||
try {
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
const unitySerial = process.env.UNITY_SERIAL;
|
|
||||||
const unityLicense = process.env.UNITY_LICENSE;
|
|
||||||
const licensingServer = cliArguments.unityLicensingServer || process.env.UNITY_LICENSING_SERVER || '';
|
|
||||||
|
|
||||||
if (licensingServer) {
|
|
||||||
core.info(`Activating Unity via licensing server: ${licensingServer}`);
|
|
||||||
core.info('Floating license activation is handled automatically during builds.');
|
|
||||||
core.info('No manual activation step is needed when using a licensing server.');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!unitySerial && !unityLicense) {
|
|
||||||
throw new Error(
|
|
||||||
'No Unity license found.\n\n' +
|
|
||||||
'Provide one of the following:\n' +
|
|
||||||
' - UNITY_SERIAL environment variable (professional license)\n' +
|
|
||||||
' - UNITY_LICENSE environment variable (personal license file content)\n' +
|
|
||||||
' - --unity-licensing-server flag (floating license)\n\n' +
|
|
||||||
'For more information, visit: https://game.ci/docs/github/activation',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (unitySerial) {
|
|
||||||
const maskedSerial = unitySerial.length > 8 ? `${unitySerial.slice(0, 4)}...${unitySerial.slice(-4)}` : '****';
|
|
||||||
core.info(`Unity serial detected: ${maskedSerial}`);
|
|
||||||
core.info('License will be activated automatically when running a build.');
|
|
||||||
} else if (unityLicense) {
|
|
||||||
core.info('Unity license file detected from UNITY_LICENSE environment variable.');
|
|
||||||
core.info('License will be activated automatically when running a build.');
|
|
||||||
}
|
|
||||||
|
|
||||||
core.info('\nActivation verified. You can now run: game-ci build --target-platform <platform>');
|
|
||||||
} catch (error: any) {
|
|
||||||
core.setFailed(`Activation failed: ${error.message}`);
|
|
||||||
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default activateCommand;
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
import type { CommandModule } from 'yargs';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import { BuildParameters, ImageTag } from '../../model';
|
|
||||||
import { mapCliArgumentsToInput, CliArguments } from '../input-mapper';
|
|
||||||
import MacBuilder from '../../model/mac-builder';
|
|
||||||
import Docker from '../../model/docker';
|
|
||||||
import Action from '../../model/action';
|
|
||||||
import PlatformSetup from '../../model/platform-setup';
|
|
||||||
import { withProjectOptions, withDockerOptions, withAndroidOptions } from './shared-options';
|
|
||||||
|
|
||||||
interface BuildArguments extends CliArguments {
|
|
||||||
targetPlatform: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const buildCommand: CommandModule<object, BuildArguments> = {
|
|
||||||
command: 'build',
|
|
||||||
describe: 'Build a Unity project locally via Docker or native runner',
|
|
||||||
builder: (yargs) => {
|
|
||||||
let y = withProjectOptions(yargs);
|
|
||||||
y = withAndroidOptions(y);
|
|
||||||
y = withDockerOptions(y);
|
|
||||||
|
|
||||||
return y
|
|
||||||
.option('build-profile', {
|
|
||||||
alias: 'buildProfile',
|
|
||||||
type: 'string',
|
|
||||||
description: 'Path to the build profile to activate, relative to the project root',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('versioning', {
|
|
||||||
type: 'string',
|
|
||||||
description: 'The versioning scheme to use when building the project',
|
|
||||||
default: 'Semantic',
|
|
||||||
})
|
|
||||||
.option('version', {
|
|
||||||
type: 'string',
|
|
||||||
description: 'The version, when used with the "Custom" versioning scheme',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('manual-exit', {
|
|
||||||
alias: 'manualExit',
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Suppresses -quit. Exit your build method using EditorApplication.Exit(0) instead.',
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
.option('enable-gpu', {
|
|
||||||
alias: 'enableGpu',
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Launches unity without specifying -nographics',
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
.option('cache-unity-installation-on-mac', {
|
|
||||||
alias: 'cacheUnityInstallationOnMac',
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Whether to cache the Unity hub and editor installation on MacOS',
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
.option('unity-hub-version-on-mac', {
|
|
||||||
alias: 'unityHubVersionOnMac',
|
|
||||||
type: 'string',
|
|
||||||
description: 'The version of Unity Hub to install on MacOS (e.g. 3.4.0). Defaults to latest available on brew.',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.example('game-ci build --target-platform StandaloneLinux64', 'Build for Linux using auto-detected Unity version')
|
|
||||||
.example(
|
|
||||||
'game-ci build --target-platform Android --unity-version 2022.3.56f1 --build-method MyBuild.Run',
|
|
||||||
'Build for Android with a specific Unity version and build method',
|
|
||||||
) as any;
|
|
||||||
},
|
|
||||||
handler: async (cliArguments) => {
|
|
||||||
try {
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
const buildParameters = await BuildParameters.create();
|
|
||||||
const baseImage = new ImageTag(buildParameters);
|
|
||||||
|
|
||||||
core.info(`Building locally for ${buildParameters.targetPlatform}...`);
|
|
||||||
core.info(`Unity version: ${buildParameters.editorVersion}`);
|
|
||||||
core.info(`Project path: ${buildParameters.projectPath}`);
|
|
||||||
|
|
||||||
const actionFolder = Action.actionFolder;
|
|
||||||
await PlatformSetup.setup(buildParameters, actionFolder);
|
|
||||||
|
|
||||||
const exitCode =
|
|
||||||
process.platform === 'darwin'
|
|
||||||
? await MacBuilder.run(actionFolder)
|
|
||||||
: await Docker.run(baseImage.toString(), {
|
|
||||||
workspace: process.cwd(),
|
|
||||||
actionFolder,
|
|
||||||
...buildParameters,
|
|
||||||
});
|
|
||||||
|
|
||||||
core.info(`\nBuild completed with exit code: ${exitCode}`);
|
|
||||||
core.info(`Build version: ${buildParameters.buildVersion}`);
|
|
||||||
core.info(`Build path: ${buildParameters.buildPath}`);
|
|
||||||
|
|
||||||
if (exitCode !== 0) {
|
|
||||||
throw new Error(`Build failed with exit code ${exitCode}`);
|
|
||||||
}
|
|
||||||
} catch (error: any) {
|
|
||||||
core.setFailed(`Build failed: ${error.message}`);
|
|
||||||
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default buildCommand;
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
import type { CommandModule } from 'yargs';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import { BuildParameters, ImageTag, Orchestrator } from '../../model';
|
|
||||||
import { mapCliArgumentsToInput, CliArguments } from '../input-mapper';
|
|
||||||
import { withProjectOptions, withOrchestratorOptions } from './shared-options';
|
|
||||||
|
|
||||||
interface OrchestrateArguments extends CliArguments {
|
|
||||||
targetPlatform: string;
|
|
||||||
providerStrategy?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const orchestrateCommand: CommandModule<object, OrchestrateArguments> = {
|
|
||||||
command: ['orchestrate', 'o'],
|
|
||||||
describe: 'Run a build via orchestrator providers (AWS, Kubernetes, etc.)',
|
|
||||||
builder: (yargs) => {
|
|
||||||
let y = withProjectOptions(yargs);
|
|
||||||
y = withOrchestratorOptions(y);
|
|
||||||
|
|
||||||
return y
|
|
||||||
.option('versioning', {
|
|
||||||
type: 'string',
|
|
||||||
description: 'The versioning scheme to use',
|
|
||||||
default: 'None',
|
|
||||||
})
|
|
||||||
.example(
|
|
||||||
'game-ci orchestrate --target-platform StandaloneLinux64 --provider-strategy aws',
|
|
||||||
'Build on AWS using the orchestrator',
|
|
||||||
)
|
|
||||||
.example(
|
|
||||||
'game-ci o --target-platform StandaloneLinux64 --provider-strategy k8s --kube-config <base64>',
|
|
||||||
'Build on Kubernetes (short alias)',
|
|
||||||
) as any;
|
|
||||||
},
|
|
||||||
handler: async (cliArguments) => {
|
|
||||||
try {
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
const buildParameters = await BuildParameters.create();
|
|
||||||
const baseImage = new ImageTag(buildParameters);
|
|
||||||
|
|
||||||
core.info(`Orchestrating build via ${buildParameters.providerStrategy}...`);
|
|
||||||
core.info(`Target platform: ${buildParameters.targetPlatform}`);
|
|
||||||
core.info(`Unity version: ${buildParameters.editorVersion}`);
|
|
||||||
core.info(`Build GUID: ${buildParameters.buildGuid}`);
|
|
||||||
|
|
||||||
const result = await Orchestrator.run(buildParameters, baseImage.toString());
|
|
||||||
|
|
||||||
core.info(`\nOrchestrated build completed.`);
|
|
||||||
if (result?.BuildResults) {
|
|
||||||
core.info(`Results: ${result.BuildResults}`);
|
|
||||||
} else {
|
|
||||||
core.warning('Build completed but no build results were returned.');
|
|
||||||
}
|
|
||||||
} catch (error: any) {
|
|
||||||
core.setFailed(`Orchestrated build failed: ${error.message}`);
|
|
||||||
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default orchestrateCommand;
|
|
||||||
@@ -1,308 +0,0 @@
|
|||||||
import type { Argv } from 'yargs';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Shared option groups for CLI commands. Avoids duplicating option
|
|
||||||
* definitions across build, test, and orchestrate commands.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function withProjectOptions<T>(yargs: Argv<T>) {
|
|
||||||
return yargs
|
|
||||||
.option('target-platform', {
|
|
||||||
alias: 'targetPlatform',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Platform that the build should target',
|
|
||||||
demandOption: true,
|
|
||||||
})
|
|
||||||
.option('unity-version', {
|
|
||||||
alias: 'unityVersion',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Version of Unity to use. Use "auto" to detect from ProjectVersion.txt.',
|
|
||||||
default: 'auto',
|
|
||||||
})
|
|
||||||
.option('project-path', {
|
|
||||||
alias: 'projectPath',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Path to the Unity project',
|
|
||||||
default: '.',
|
|
||||||
})
|
|
||||||
.option('build-name', {
|
|
||||||
alias: 'buildName',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Name of the build',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('builds-path', {
|
|
||||||
alias: 'buildsPath',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Path where the builds should be stored',
|
|
||||||
default: 'build',
|
|
||||||
})
|
|
||||||
.option('build-method', {
|
|
||||||
alias: 'buildMethod',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Path to a Namespace.Class.StaticMethod to run to perform the build',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('custom-parameters', {
|
|
||||||
alias: 'customParameters',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Custom parameters to configure the build',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('custom-image', {
|
|
||||||
alias: 'customImage',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Specific docker image that should be used for building the project',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('git-private-token', {
|
|
||||||
alias: 'gitPrivateToken',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'GitHub private token for repository access',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('skip-activation', {
|
|
||||||
alias: 'skipActivation',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Skip Unity activation/deactivation',
|
|
||||||
default: 'false',
|
|
||||||
})
|
|
||||||
.option('unity-licensing-server', {
|
|
||||||
alias: 'unityLicensingServer',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The Unity licensing server address',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('container-registry-repository', {
|
|
||||||
alias: 'containerRegistryRepository',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Container registry and repository to pull image from. Only applicable if customImage is not set.',
|
|
||||||
default: 'unityci/editor',
|
|
||||||
})
|
|
||||||
.option('container-registry-image-version', {
|
|
||||||
alias: 'containerRegistryImageVersion',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Container registry image version. Only applicable if customImage is not set.',
|
|
||||||
default: '3',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function withDockerOptions<T>(yargs: Argv<T>) {
|
|
||||||
return yargs
|
|
||||||
.option('docker-cpu-limit', {
|
|
||||||
alias: 'dockerCpuLimit',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Number of CPU cores to assign the docker container',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('docker-memory-limit', {
|
|
||||||
alias: 'dockerMemoryLimit',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Amount of memory to assign the docker container (e.g. 512m, 4g)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('docker-workspace-path', {
|
|
||||||
alias: 'dockerWorkspacePath',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The path to mount the workspace inside the docker container',
|
|
||||||
default: '/github/workspace',
|
|
||||||
})
|
|
||||||
.option('docker-isolation-mode', {
|
|
||||||
alias: 'dockerIsolationMode',
|
|
||||||
type: 'string' as const,
|
|
||||||
description:
|
|
||||||
'Isolation mode to use for the docker container (process, hyperv, or default). Only applicable on Windows.',
|
|
||||||
default: 'default',
|
|
||||||
})
|
|
||||||
.option('run-as-host-user', {
|
|
||||||
alias: 'runAsHostUser',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Whether to run as a user that matches the host system',
|
|
||||||
default: 'false',
|
|
||||||
})
|
|
||||||
.option('chown-files-to', {
|
|
||||||
alias: 'chownFilesTo',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'User and optionally group to give ownership of build artifacts',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('ssh-agent', {
|
|
||||||
alias: 'sshAgent',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'SSH Agent path to forward to the container',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('ssh-public-keys-directory-path', {
|
|
||||||
alias: 'sshPublicKeysDirectoryPath',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Path to a directory containing SSH public keys to forward to the container',
|
|
||||||
default: '',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function withAndroidOptions<T>(yargs: Argv<T>) {
|
|
||||||
return yargs
|
|
||||||
.option('android-version-code', {
|
|
||||||
alias: 'androidVersionCode',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The android versionCode',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('android-export-type', {
|
|
||||||
alias: 'androidExportType',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The android export type (androidPackage, androidAppBundle, androidStudioProject)',
|
|
||||||
default: 'androidPackage',
|
|
||||||
})
|
|
||||||
.option('android-keystore-name', {
|
|
||||||
alias: 'androidKeystoreName',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The android keystoreName',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('android-keystore-base64', {
|
|
||||||
alias: 'androidKeystoreBase64',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The base64 contents of the android keystore file',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('android-keystore-pass', {
|
|
||||||
alias: 'androidKeystorePass',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The android keystorePass',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('android-keyalias-name', {
|
|
||||||
alias: 'androidKeyaliasName',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The android keyaliasName',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('android-keyalias-pass', {
|
|
||||||
alias: 'androidKeyaliasPass',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The android keyaliasPass',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('android-target-sdk-version', {
|
|
||||||
alias: 'androidTargetSdkVersion',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The android target API level',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('android-symbol-type', {
|
|
||||||
alias: 'androidSymbolType',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The android symbol type to export (none, public, debugging)',
|
|
||||||
default: 'none',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function withOrchestratorOptions<T>(yargs: Argv<T>) {
|
|
||||||
return yargs
|
|
||||||
.option('provider-strategy', {
|
|
||||||
alias: 'providerStrategy',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Orchestrator provider: aws, k8s, local-docker, local-system',
|
|
||||||
default: 'aws',
|
|
||||||
})
|
|
||||||
.option('aws-stack-name', {
|
|
||||||
alias: 'awsStackName',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'The Cloud Formation stack name (AWS provider)',
|
|
||||||
default: 'game-ci',
|
|
||||||
})
|
|
||||||
.option('kube-config', {
|
|
||||||
alias: 'kubeConfig',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Base64 encoded Kubernetes config (K8s provider)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('kube-volume', {
|
|
||||||
alias: 'kubeVolume',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Persistent Volume Claim name for Unity build (K8s provider)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('kube-volume-size', {
|
|
||||||
alias: 'kubeVolumeSize',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Disc space for Kubernetes Persistent Volume',
|
|
||||||
default: '5Gi',
|
|
||||||
})
|
|
||||||
.option('kube-storage-class', {
|
|
||||||
alias: 'kubeStorageClass',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Kubernetes storage class to use for orchestrator jobs. Leave empty to install rook cluster.',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('container-cpu', {
|
|
||||||
alias: 'containerCpu',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'CPU allocation for remote build container',
|
|
||||||
default: '1024',
|
|
||||||
})
|
|
||||||
.option('container-memory', {
|
|
||||||
alias: 'containerMemory',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Memory allocation for remote build container',
|
|
||||||
default: '3072',
|
|
||||||
})
|
|
||||||
.option('cache-key', {
|
|
||||||
alias: 'cacheKey',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Cache key to indicate bucket for cache',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('allow-dirty-build', {
|
|
||||||
alias: 'allowDirtyBuild',
|
|
||||||
type: 'boolean' as const,
|
|
||||||
description: 'Allow builds from dirty branches',
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
.option('watch-to-end', {
|
|
||||||
alias: 'watchToEnd',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Whether to watch the build to completion',
|
|
||||||
default: 'true',
|
|
||||||
})
|
|
||||||
.option('clone-depth', {
|
|
||||||
alias: 'cloneDepth',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Git clone depth (0 for full clone)',
|
|
||||||
default: '50',
|
|
||||||
})
|
|
||||||
.option('read-input-from-override-list', {
|
|
||||||
alias: 'readInputFromOverrideList',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Comma separated list of input value names to read from the input override command',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('read-input-override-command', {
|
|
||||||
alias: 'readInputOverrideCommand',
|
|
||||||
type: 'string' as const,
|
|
||||||
description: 'Command to execute to pull input from an external source (e.g. cloud provider secret managers)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('post-build-steps', {
|
|
||||||
alias: 'postBuildSteps',
|
|
||||||
type: 'string' as const,
|
|
||||||
description:
|
|
||||||
'Post build job in yaml format with the keys image, secrets (name, value object array), command string',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('pre-build-steps', {
|
|
||||||
alias: 'preBuildSteps',
|
|
||||||
type: 'string' as const,
|
|
||||||
description:
|
|
||||||
'Pre build job after repository setup but before the build job (yaml format with keys image, secrets, command)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('custom-job', {
|
|
||||||
alias: 'customJob',
|
|
||||||
type: 'string' as const,
|
|
||||||
description:
|
|
||||||
'Custom job instead of the standard build automation (yaml format with keys image, secrets, command)',
|
|
||||||
default: '',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
import type { CommandModule } from 'yargs';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import fs from 'node:fs';
|
|
||||||
import path from 'node:path';
|
|
||||||
import UnityVersioning from '../../model/unity-versioning';
|
|
||||||
|
|
||||||
const statusCommand: CommandModule = {
|
|
||||||
command: 'status',
|
|
||||||
describe: 'Show project info, environment, and cache status',
|
|
||||||
builder: (yargs) => {
|
|
||||||
return yargs
|
|
||||||
.option('project-path', {
|
|
||||||
alias: 'projectPath',
|
|
||||||
type: 'string',
|
|
||||||
description: 'Path to the Unity project',
|
|
||||||
default: '.',
|
|
||||||
})
|
|
||||||
.option('cache-dir', {
|
|
||||||
alias: 'cacheDir',
|
|
||||||
type: 'string',
|
|
||||||
description: 'Path to an additional cache directory to inspect',
|
|
||||||
default: '',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handler: async (cliArguments) => {
|
|
||||||
const projectPath = (cliArguments.projectPath as string) || '.';
|
|
||||||
const cacheDirectory = cliArguments.cacheDir as string;
|
|
||||||
|
|
||||||
core.info('game-ci Workspace Status');
|
|
||||||
core.info('========================\n');
|
|
||||||
|
|
||||||
// Project detection
|
|
||||||
const projectVersionPath = path.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');
|
|
||||||
const hasProject = fs.existsSync(projectVersionPath);
|
|
||||||
|
|
||||||
core.info(`Project Path: ${path.resolve(projectPath)}`);
|
|
||||||
core.info(`Unity Project Found: ${hasProject ? 'Yes' : 'No'}`);
|
|
||||||
|
|
||||||
if (hasProject) {
|
|
||||||
try {
|
|
||||||
const unityVersion = UnityVersioning.determineUnityVersion(projectPath, 'auto');
|
|
||||||
core.info(`Unity Version: ${unityVersion}`);
|
|
||||||
} catch {
|
|
||||||
core.info(`Unity Version: Unable to detect`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Library cache status
|
|
||||||
const libraryPath = path.join(projectPath, 'Library');
|
|
||||||
if (fs.existsSync(libraryPath)) {
|
|
||||||
const stats = fs.statSync(libraryPath);
|
|
||||||
core.info(`Library Cache: Present (modified ${stats.mtime.toISOString()})`);
|
|
||||||
|
|
||||||
const keyDirectories = ['PackageCache', 'ScriptAssemblies', 'ShaderCache', 'Bee'];
|
|
||||||
for (const directory of keyDirectories) {
|
|
||||||
const directoryPath = path.join(libraryPath, directory);
|
|
||||||
if (fs.existsSync(directoryPath)) {
|
|
||||||
const directoryStats = fs.statSync(directoryPath);
|
|
||||||
core.info(` ${directory}/: exists (modified ${directoryStats.mtime.toISOString()})`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(`Library Cache: Not present (clean build required)`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cache archive detection
|
|
||||||
if (cacheDirectory && fs.existsSync(cacheDirectory)) {
|
|
||||||
core.info(`\nCache Archives (${cacheDirectory}):`);
|
|
||||||
const cacheFiles = fs.readdirSync(cacheDirectory).filter((f) => f.endsWith('.tar') || f.endsWith('.tar.lz4'));
|
|
||||||
if (cacheFiles.length > 0) {
|
|
||||||
for (const file of cacheFiles) {
|
|
||||||
const filePath = path.join(cacheDirectory, file);
|
|
||||||
const fileStats = fs.statSync(filePath);
|
|
||||||
const sizeMegabytes = (fileStats.size / (1024 * 1024)).toFixed(1);
|
|
||||||
core.info(` - ${file} (${sizeMegabytes} MB, ${fileStats.mtime.toISOString()})`);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info(' No cache archives found.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build output detection
|
|
||||||
const buildsPath = path.join(projectPath, '..', 'build');
|
|
||||||
if (fs.existsSync(buildsPath)) {
|
|
||||||
const builds = fs.readdirSync(buildsPath);
|
|
||||||
if (builds.length > 0) {
|
|
||||||
core.info(`\nBuild Outputs (${buildsPath}):`);
|
|
||||||
for (const build of builds) {
|
|
||||||
const buildPath = path.join(buildsPath, build);
|
|
||||||
const buildStats = fs.statSync(buildPath);
|
|
||||||
core.info(` - ${build} (${buildStats.isDirectory() ? 'dir' : 'file'}, ${buildStats.mtime.toISOString()})`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Environment
|
|
||||||
core.info('\nEnvironment:');
|
|
||||||
core.info(` Platform: ${process.platform}`);
|
|
||||||
core.info(` Node.js: ${process.version}`);
|
|
||||||
core.info(` UNITY_SERIAL: ${process.env.UNITY_SERIAL ? 'Set' : 'Not set'}`);
|
|
||||||
core.info(` UNITY_LICENSE: ${process.env.UNITY_LICENSE ? 'Set' : 'Not set'}`);
|
|
||||||
core.info(` UNITY_EMAIL: ${process.env.UNITY_EMAIL ? 'Set' : 'Not set'}`);
|
|
||||||
core.info(` UNITY_PASSWORD: ${process.env.UNITY_PASSWORD ? 'Set' : 'Not set'}`);
|
|
||||||
|
|
||||||
// Docker availability
|
|
||||||
core.info(`\nDocker: Checking...`);
|
|
||||||
try {
|
|
||||||
const { execSync } = await import('node:child_process');
|
|
||||||
const dockerVersion = execSync('docker --version', { encoding: 'utf8' }).trim();
|
|
||||||
core.info(` ${dockerVersion}`);
|
|
||||||
} catch {
|
|
||||||
core.info(` Docker not found or not accessible`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default statusCommand;
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
import type { CommandModule } from 'yargs';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import { BuildParameters, ImageTag } from '../../model';
|
|
||||||
import { mapCliArgumentsToInput, CliArguments } from '../input-mapper';
|
|
||||||
import Docker from '../../model/docker';
|
|
||||||
import Action from '../../model/action';
|
|
||||||
import PlatformSetup from '../../model/platform-setup';
|
|
||||||
import { withProjectOptions, withDockerOptions } from './shared-options';
|
|
||||||
|
|
||||||
interface TestArguments extends CliArguments {
|
|
||||||
targetPlatform: string;
|
|
||||||
testMode?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const testCommand: CommandModule<object, TestArguments> = {
|
|
||||||
command: ['test', 't'],
|
|
||||||
describe: 'Run tests for a Unity project',
|
|
||||||
builder: (yargs) => {
|
|
||||||
let y = withProjectOptions(yargs);
|
|
||||||
y = withDockerOptions(y);
|
|
||||||
|
|
||||||
return y
|
|
||||||
.option('test-mode', {
|
|
||||||
alias: 'testMode',
|
|
||||||
type: 'string',
|
|
||||||
description: 'The mode to run tests in (EditMode, PlayMode, or All)',
|
|
||||||
default: 'All',
|
|
||||||
choices: ['EditMode', 'PlayMode', 'All'],
|
|
||||||
})
|
|
||||||
.option('test-results-path', {
|
|
||||||
alias: 'testResultsPath',
|
|
||||||
type: 'string',
|
|
||||||
description: 'Path where test results XML should be stored',
|
|
||||||
default: 'test-results',
|
|
||||||
})
|
|
||||||
.option('test-category', {
|
|
||||||
alias: 'testCategory',
|
|
||||||
type: 'string',
|
|
||||||
description: 'Only run tests in the given category (semicolon-separated)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('test-filter', {
|
|
||||||
alias: 'testFilter',
|
|
||||||
type: 'string',
|
|
||||||
description: 'Only run tests that match the filter (semicolon-separated)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('coverage-options', {
|
|
||||||
alias: 'coverageOptions',
|
|
||||||
type: 'string',
|
|
||||||
description: 'Options for code coverage (e.g. assemblyFilters, pathFilters)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.option('enable-code-coverage', {
|
|
||||||
alias: 'enableCodeCoverage',
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Enable code coverage when running tests',
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
.option('versioning', {
|
|
||||||
type: 'string',
|
|
||||||
description: 'The versioning scheme to use',
|
|
||||||
default: 'None',
|
|
||||||
})
|
|
||||||
.option('cache-unity-installation-on-mac', {
|
|
||||||
alias: 'cacheUnityInstallationOnMac',
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Whether to cache the Unity hub and editor installation on MacOS',
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
.option('unity-hub-version-on-mac', {
|
|
||||||
alias: 'unityHubVersionOnMac',
|
|
||||||
type: 'string',
|
|
||||||
description: 'The version of Unity Hub to install on MacOS (e.g. 3.4.0). Defaults to latest available on brew.',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.example('game-ci test --target-platform StandaloneLinux64', 'Run all tests for Linux platform')
|
|
||||||
.example(
|
|
||||||
'game-ci t --target-platform StandaloneLinux64 --test-mode EditMode',
|
|
||||||
'Run only EditMode tests (short alias)',
|
|
||||||
)
|
|
||||||
.example(
|
|
||||||
'game-ci test --target-platform StandaloneLinux64 --enable-code-coverage',
|
|
||||||
'Run tests with code coverage',
|
|
||||||
) as any;
|
|
||||||
},
|
|
||||||
handler: async (cliArguments) => {
|
|
||||||
try {
|
|
||||||
// Map test-specific flags into the input system
|
|
||||||
mapCliArgumentsToInput(cliArguments);
|
|
||||||
|
|
||||||
const buildParameters = await BuildParameters.create();
|
|
||||||
const baseImage = new ImageTag(buildParameters);
|
|
||||||
|
|
||||||
const testMode = cliArguments.testMode || 'All';
|
|
||||||
|
|
||||||
core.info(`Running Unity tests (${testMode})...`);
|
|
||||||
core.info(`Target platform: ${buildParameters.targetPlatform}`);
|
|
||||||
core.info(`Unity version: ${buildParameters.editorVersion}`);
|
|
||||||
core.info(`Project path: ${buildParameters.projectPath}`);
|
|
||||||
|
|
||||||
const actionFolder = Action.actionFolder;
|
|
||||||
await PlatformSetup.setup(buildParameters, actionFolder);
|
|
||||||
|
|
||||||
const exitCode = await Docker.run(baseImage.toString(), {
|
|
||||||
workspace: process.cwd(),
|
|
||||||
actionFolder,
|
|
||||||
...buildParameters,
|
|
||||||
});
|
|
||||||
|
|
||||||
const resultsPath = cliArguments.testResultsPath || 'test-results';
|
|
||||||
core.info(`\nTests completed with exit code: ${exitCode}`);
|
|
||||||
core.info(`Test results: ${resultsPath}`);
|
|
||||||
|
|
||||||
if (exitCode !== 0) {
|
|
||||||
throw new Error(`Tests failed with exit code ${exitCode}`);
|
|
||||||
}
|
|
||||||
} catch (error: any) {
|
|
||||||
core.setFailed(`Tests failed: ${error.message}`);
|
|
||||||
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default testCommand;
|
|
||||||
@@ -1,387 +0,0 @@
|
|||||||
import type { CommandModule } from 'yargs';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import fs from 'node:fs';
|
|
||||||
import os from 'node:os';
|
|
||||||
import path from 'node:path';
|
|
||||||
import https from 'node:https';
|
|
||||||
import http from 'node:http';
|
|
||||||
import { execFileSync } from 'node:child_process';
|
|
||||||
|
|
||||||
const REPO = 'game-ci/unity-builder';
|
|
||||||
|
|
||||||
interface GitHubRelease {
|
|
||||||
// eslint-disable-next-line camelcase
|
|
||||||
tag_name: string;
|
|
||||||
assets: Array<{
|
|
||||||
name: string;
|
|
||||||
// eslint-disable-next-line camelcase
|
|
||||||
browser_download_url: string;
|
|
||||||
size: number;
|
|
||||||
}>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface UpdateArguments {
|
|
||||||
force?: boolean;
|
|
||||||
version?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetches JSON from a URL via HTTPS, following redirects.
|
|
||||||
*/
|
|
||||||
function fetchJson(url: string): Promise<any> {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const get = (targetUrl: string, redirectCount: number) => {
|
|
||||||
if (redirectCount > 5) {
|
|
||||||
reject(new Error('Too many redirects'));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
https
|
|
||||||
.get(
|
|
||||||
targetUrl,
|
|
||||||
{
|
|
||||||
headers: { 'User-Agent': 'game-ci-cli', Accept: 'application/json' },
|
|
||||||
},
|
|
||||||
(response) => {
|
|
||||||
if (
|
|
||||||
response.statusCode &&
|
|
||||||
response.statusCode >= 300 &&
|
|
||||||
response.statusCode < 400 &&
|
|
||||||
response.headers.location
|
|
||||||
) {
|
|
||||||
get(response.headers.location, redirectCount + 1);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (response.statusCode !== 200) {
|
|
||||||
reject(new Error(`HTTP ${response.statusCode} from ${targetUrl}`));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let data = '';
|
|
||||||
response.on('data', (chunk) => (data += chunk));
|
|
||||||
response.on('end', () => {
|
|
||||||
try {
|
|
||||||
resolve(JSON.parse(data));
|
|
||||||
} catch {
|
|
||||||
reject(new Error('Invalid JSON response'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.on('error', reject);
|
|
||||||
};
|
|
||||||
get(url, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Downloads a file from a URL, following redirects. Returns the file content as a Buffer.
|
|
||||||
*/
|
|
||||||
function downloadFile(url: string): Promise<Buffer> {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const get = (targetUrl: string, redirectCount: number) => {
|
|
||||||
if (redirectCount > 10) {
|
|
||||||
reject(new Error('Too many redirects'));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const protocol = targetUrl.startsWith('https') ? https : http;
|
|
||||||
protocol
|
|
||||||
.get(targetUrl, { headers: { 'User-Agent': 'game-ci-cli' } }, (response) => {
|
|
||||||
if (
|
|
||||||
response.statusCode &&
|
|
||||||
response.statusCode >= 300 &&
|
|
||||||
response.statusCode < 400 &&
|
|
||||||
response.headers.location
|
|
||||||
) {
|
|
||||||
get(response.headers.location, redirectCount + 1);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (response.statusCode !== 200) {
|
|
||||||
reject(new Error(`HTTP ${response.statusCode} downloading ${targetUrl}`));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const chunks: Buffer[] = [];
|
|
||||||
response.on('data', (chunk: Buffer) => chunks.push(chunk));
|
|
||||||
response.on('end', () => resolve(Buffer.concat(chunks)));
|
|
||||||
})
|
|
||||||
.on('error', reject);
|
|
||||||
};
|
|
||||||
get(url, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the current version from package.json or the compiled binary.
|
|
||||||
*/
|
|
||||||
function getCurrentVersion(): string {
|
|
||||||
// Try reading from package.json at various relative locations
|
|
||||||
const candidates = [
|
|
||||||
path.join(__dirname, '..', '..', '..', 'package.json'),
|
|
||||||
path.join(__dirname, '..', '..', 'package.json'),
|
|
||||||
path.join(process.cwd(), 'package.json'),
|
|
||||||
];
|
|
||||||
|
|
||||||
for (const candidate of candidates) {
|
|
||||||
if (fs.existsSync(candidate)) {
|
|
||||||
try {
|
|
||||||
const packageData = JSON.parse(fs.readFileSync(candidate, 'utf8'));
|
|
||||||
if (packageData.version) {
|
|
||||||
return packageData.version;
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// Continue to next candidate
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 'unknown';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines the correct asset name for the current platform/architecture.
|
|
||||||
*/
|
|
||||||
function getAssetName(): string {
|
|
||||||
const platform = process.platform;
|
|
||||||
const arch = process.arch;
|
|
||||||
|
|
||||||
let osPart: string;
|
|
||||||
switch (platform) {
|
|
||||||
case 'linux':
|
|
||||||
osPart = 'linux';
|
|
||||||
break;
|
|
||||||
case 'darwin':
|
|
||||||
osPart = 'macos';
|
|
||||||
break;
|
|
||||||
case 'win32':
|
|
||||||
osPart = 'windows';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error(`Unsupported platform: ${platform}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
let archPart: string;
|
|
||||||
switch (arch) {
|
|
||||||
case 'x64':
|
|
||||||
archPart = 'x64';
|
|
||||||
break;
|
|
||||||
case 'arm64':
|
|
||||||
archPart = 'arm64';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error(`Unsupported architecture: ${arch}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const assetBaseName = `game-ci-${osPart}-${archPart}`;
|
|
||||||
|
|
||||||
return osPart === 'windows' ? `${assetBaseName}.exe` : assetBaseName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines the path to the currently running executable.
|
|
||||||
* For standalone binaries (pkg), process.execPath points to the binary itself.
|
|
||||||
* For Node.js execution, we return undefined since self-update does not apply.
|
|
||||||
*/
|
|
||||||
function getExecutablePath(): string | undefined {
|
|
||||||
// When running as a pkg binary, process.pkg is defined
|
|
||||||
if ((process as any).pkg) {
|
|
||||||
return process.execPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
// When running via Node.js, check if there is a standalone binary in the typical install location
|
|
||||||
const installDirectory = process.env.GAME_CI_INSTALL || path.join(os.homedir(), '.game-ci', 'bin');
|
|
||||||
const binaryName = process.platform === 'win32' ? 'game-ci.exe' : 'game-ci';
|
|
||||||
const installedPath = path.join(installDirectory, binaryName);
|
|
||||||
|
|
||||||
if (fs.existsSync(installedPath)) {
|
|
||||||
return installedPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Strips leading 'v' from a version string and splits into numeric parts.
|
|
||||||
*/
|
|
||||||
function parseVersionParts(version: string): number[] {
|
|
||||||
return version
|
|
||||||
.replace(/^v/, '')
|
|
||||||
.split('.')
|
|
||||||
.map((part) => Number(part));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compares two semver strings. Returns:
|
|
||||||
* -1 if a < b
|
|
||||||
* 0 if a == b
|
|
||||||
* 1 if a > b
|
|
||||||
*/
|
|
||||||
function compareSemver(a: string, b: string): number {
|
|
||||||
const partsA = parseVersionParts(a);
|
|
||||||
const partsB = parseVersionParts(b);
|
|
||||||
|
|
||||||
for (let index = 0; index < 3; index++) {
|
|
||||||
const x = partsA[index] || 0;
|
|
||||||
const y = partsB[index] || 0;
|
|
||||||
if (x < y) return -1;
|
|
||||||
if (x > y) return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const updateCommand: CommandModule<object, UpdateArguments> = {
|
|
||||||
command: 'update',
|
|
||||||
describe: 'Update game-ci to the latest version',
|
|
||||||
builder: (yargs) => {
|
|
||||||
return yargs
|
|
||||||
.option('force', {
|
|
||||||
alias: 'f',
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Force update even if already on latest version',
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
.option('version', {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Update to a specific version (e.g., v2.0.0)',
|
|
||||||
default: '',
|
|
||||||
})
|
|
||||||
.example('game-ci update', 'Update to the latest version')
|
|
||||||
.example('game-ci update --version v2.1.0', 'Update to a specific version')
|
|
||||||
.example('game-ci update --force', 'Force reinstall of the current version') as any;
|
|
||||||
},
|
|
||||||
handler: async (cliArguments) => {
|
|
||||||
try {
|
|
||||||
const currentVersion = getCurrentVersion();
|
|
||||||
core.info(`Current version: v${currentVersion}`);
|
|
||||||
core.info(`Platform: ${process.platform} ${process.arch}`);
|
|
||||||
core.info('');
|
|
||||||
|
|
||||||
// Fetch release info
|
|
||||||
let release: GitHubRelease;
|
|
||||||
const targetVersion = cliArguments.version as string;
|
|
||||||
|
|
||||||
if (targetVersion) {
|
|
||||||
const tag = targetVersion.startsWith('v') ? targetVersion : `v${targetVersion}`;
|
|
||||||
core.info(`Fetching release ${tag}...`);
|
|
||||||
release = await fetchJson(`https://api.github.com/repos/${REPO}/releases/tags/${tag}`);
|
|
||||||
} else {
|
|
||||||
core.info('Checking for updates...');
|
|
||||||
release = await fetchJson(`https://api.github.com/repos/${REPO}/releases/latest`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const latestVersion = release.tag_name;
|
|
||||||
core.info(`Latest version: ${latestVersion}`);
|
|
||||||
core.info('');
|
|
||||||
|
|
||||||
// Compare versions
|
|
||||||
const comparison = compareSemver(currentVersion, latestVersion);
|
|
||||||
if (comparison >= 0 && !cliArguments.force) {
|
|
||||||
core.info('You are already on the latest version. Use --force to reinstall.');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (comparison > 0 && !targetVersion) {
|
|
||||||
core.info(`Current version (v${currentVersion}) is newer than latest release (${latestVersion}).`);
|
|
||||||
core.info('Use --force to downgrade, or --version to target a specific release.');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the correct asset
|
|
||||||
const assetName = getAssetName();
|
|
||||||
const asset = release.assets.find((a) => a.name === assetName);
|
|
||||||
|
|
||||||
if (!asset) {
|
|
||||||
const available = release.assets.map((a) => a.name).join(', ');
|
|
||||||
throw new Error(
|
|
||||||
`No binary found for ${process.platform}-${process.arch} (looking for ${assetName}).\nAvailable assets: ${available}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const sizeMb = (asset.size / (1024 * 1024)).toFixed(1);
|
|
||||||
core.info(`Downloading ${assetName} (${sizeMb} MB)...`);
|
|
||||||
|
|
||||||
// Download the new binary
|
|
||||||
const binaryData = await downloadFile(asset.browser_download_url);
|
|
||||||
|
|
||||||
// Determine where to write the updated binary
|
|
||||||
const executablePath = getExecutablePath();
|
|
||||||
|
|
||||||
if (!executablePath) {
|
|
||||||
core.info('');
|
|
||||||
core.info('game-ci is running via Node.js (not as a standalone binary).');
|
|
||||||
core.info('To update the npm package, run:');
|
|
||||||
core.info(' npm install -g unity-builder@latest');
|
|
||||||
core.info('');
|
|
||||||
core.info('To install the standalone binary instead:');
|
|
||||||
core.info(' curl -fsSL https://raw.githubusercontent.com/game-ci/unity-builder/main/install.sh | sh');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write the new binary.
|
|
||||||
// On Windows, we cannot overwrite a running executable directly.
|
|
||||||
// Write to a temporary file, then rename.
|
|
||||||
const temporaryPath = `${executablePath}.update`;
|
|
||||||
const backupPath = `${executablePath}.backup`;
|
|
||||||
|
|
||||||
fs.writeFileSync(temporaryPath, binaryData);
|
|
||||||
|
|
||||||
if (process.platform !== 'win32') {
|
|
||||||
fs.chmodSync(temporaryPath, 0o755);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify the downloaded binary
|
|
||||||
try {
|
|
||||||
const output = execFileSync(temporaryPath, ['version'], { encoding: 'utf8', timeout: 10_000 });
|
|
||||||
core.info(`Verified new binary: ${output.trim().split('\n')[0]}`);
|
|
||||||
} catch (verifyError: any) {
|
|
||||||
fs.unlinkSync(temporaryPath);
|
|
||||||
throw new Error(`Downloaded binary failed verification: ${verifyError.message}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Replace the current binary
|
|
||||||
try {
|
|
||||||
// Backup current
|
|
||||||
if (fs.existsSync(backupPath)) {
|
|
||||||
fs.unlinkSync(backupPath);
|
|
||||||
}
|
|
||||||
fs.renameSync(executablePath, backupPath);
|
|
||||||
fs.renameSync(temporaryPath, executablePath);
|
|
||||||
|
|
||||||
// Clean up backup
|
|
||||||
try {
|
|
||||||
fs.unlinkSync(backupPath);
|
|
||||||
} catch {
|
|
||||||
// On Windows the backup may be locked; that is fine
|
|
||||||
}
|
|
||||||
} catch (replaceError: any) {
|
|
||||||
// Attempt to restore from backup
|
|
||||||
if (fs.existsSync(backupPath) && !fs.existsSync(executablePath)) {
|
|
||||||
fs.renameSync(backupPath, executablePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean up temporary file
|
|
||||||
if (fs.existsSync(temporaryPath)) {
|
|
||||||
fs.unlinkSync(temporaryPath);
|
|
||||||
}
|
|
||||||
throw new Error(`Failed to replace binary: ${replaceError.message}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
core.info('');
|
|
||||||
core.info(`Successfully updated game-ci to ${latestVersion}`);
|
|
||||||
} catch (error: any) {
|
|
||||||
core.error(`Update failed: ${error.message}`);
|
|
||||||
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default updateCommand;
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import type { CommandModule } from 'yargs';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import fs from 'node:fs';
|
|
||||||
import path from 'node:path';
|
|
||||||
|
|
||||||
const versionCommand: CommandModule = {
|
|
||||||
command: 'version',
|
|
||||||
describe: 'Show version info',
|
|
||||||
builder: {},
|
|
||||||
handler: async () => {
|
|
||||||
try {
|
|
||||||
// Read version from package.json
|
|
||||||
let packageJsonPath = path.join(__dirname, '..', '..', '..', 'package.json');
|
|
||||||
if (!fs.existsSync(packageJsonPath)) {
|
|
||||||
packageJsonPath = path.join(__dirname, '..', '..', 'package.json');
|
|
||||||
}
|
|
||||||
if (!fs.existsSync(packageJsonPath)) {
|
|
||||||
packageJsonPath = path.join(process.cwd(), 'package.json');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fs.existsSync(packageJsonPath)) {
|
|
||||||
const packageData = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
||||||
core.info(`game-ci (unity-builder) v${packageData.version}`);
|
|
||||||
core.info(`Node.js ${process.version}`);
|
|
||||||
core.info(`Platform: ${process.platform} ${process.arch}`);
|
|
||||||
} else {
|
|
||||||
core.info('game-ci (unity-builder)');
|
|
||||||
core.info('Version information unavailable');
|
|
||||||
}
|
|
||||||
} catch (error: any) {
|
|
||||||
core.info('game-ci (unity-builder)');
|
|
||||||
core.error(`Could not read version: ${error.message}`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default versionCommand;
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
import { Cli } from '../model/cli/cli';
|
|
||||||
import GitHub from '../model/github';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Maps CLI arguments (kebab-case flags) to the Input/OrchestratorOptions
|
|
||||||
* interface used by the action. This bridges the gap between user-friendly
|
|
||||||
* CLI flags and the camelCase environment/input system unity-builder expects.
|
|
||||||
*
|
|
||||||
* The existing Input class already queries Cli.options, environment variables,
|
|
||||||
* and GitHub Action inputs in priority order. We populate Cli.options so that
|
|
||||||
* the rest of the codebase works unchanged.
|
|
||||||
*/
|
|
||||||
export interface CliArguments {
|
|
||||||
targetPlatform?: string;
|
|
||||||
unityVersion?: string;
|
|
||||||
projectPath?: string;
|
|
||||||
buildProfile?: string;
|
|
||||||
buildName?: string;
|
|
||||||
buildsPath?: string;
|
|
||||||
buildMethod?: string;
|
|
||||||
customParameters?: string;
|
|
||||||
versioning?: string;
|
|
||||||
version?: string;
|
|
||||||
customImage?: string;
|
|
||||||
manualExit?: boolean;
|
|
||||||
enableGpu?: boolean;
|
|
||||||
|
|
||||||
androidVersionCode?: string;
|
|
||||||
androidExportType?: string;
|
|
||||||
androidKeystoreName?: string;
|
|
||||||
androidKeystoreBase64?: string;
|
|
||||||
androidKeystorePass?: string;
|
|
||||||
androidKeyaliasName?: string;
|
|
||||||
androidKeyaliasPass?: string;
|
|
||||||
androidTargetSdkVersion?: string;
|
|
||||||
androidSymbolType?: string;
|
|
||||||
|
|
||||||
dockerCpuLimit?: string;
|
|
||||||
dockerMemoryLimit?: string;
|
|
||||||
dockerIsolationMode?: string;
|
|
||||||
dockerWorkspacePath?: string;
|
|
||||||
containerRegistryRepository?: string;
|
|
||||||
containerRegistryImageVersion?: string;
|
|
||||||
runAsHostUser?: string;
|
|
||||||
chownFilesTo?: string;
|
|
||||||
|
|
||||||
sshAgent?: string;
|
|
||||||
sshPublicKeysDirectoryPath?: string;
|
|
||||||
gitPrivateToken?: string;
|
|
||||||
|
|
||||||
providerStrategy?: string;
|
|
||||||
awsStackName?: string;
|
|
||||||
kubeConfig?: string;
|
|
||||||
kubeVolume?: string;
|
|
||||||
kubeVolumeSize?: string;
|
|
||||||
kubeStorageClass?: string;
|
|
||||||
containerCpu?: string;
|
|
||||||
containerMemory?: string;
|
|
||||||
cacheKey?: string;
|
|
||||||
watchToEnd?: string;
|
|
||||||
allowDirtyBuild?: boolean;
|
|
||||||
skipActivation?: string;
|
|
||||||
cloneDepth?: string;
|
|
||||||
|
|
||||||
readInputFromOverrideList?: string;
|
|
||||||
readInputOverrideCommand?: string;
|
|
||||||
postBuildSteps?: string;
|
|
||||||
preBuildSteps?: string;
|
|
||||||
customJob?: string;
|
|
||||||
|
|
||||||
unityLicensingServer?: string;
|
|
||||||
|
|
||||||
cacheUnityInstallationOnMac?: boolean;
|
|
||||||
unityHubVersionOnMac?: string;
|
|
||||||
|
|
||||||
testMode?: string;
|
|
||||||
testResultsPath?: string;
|
|
||||||
testCategory?: string;
|
|
||||||
testFilter?: string;
|
|
||||||
coverageOptions?: string;
|
|
||||||
enableCodeCoverage?: boolean;
|
|
||||||
|
|
||||||
mode?: string;
|
|
||||||
|
|
||||||
[key: string]: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts kebab-case CLI flags to camelCase keys matching the Input class
|
|
||||||
* property names, then injects them into Cli.options so the existing
|
|
||||||
* Input.getInput() / OrchestratorOptions.getInput() chain picks them up.
|
|
||||||
*/
|
|
||||||
export function mapCliArgumentsToInput(cliArguments: CliArguments): void {
|
|
||||||
// Disable GitHub Actions input reading when in CLI mode
|
|
||||||
GitHub.githubInputEnabled = false;
|
|
||||||
|
|
||||||
// The existing Cli.options mechanism is used by Input.getInput() to query
|
|
||||||
// CLI-provided values. We set it directly.
|
|
||||||
const mapped: Record<string, unknown> = {};
|
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(cliArguments)) {
|
|
||||||
if (value !== undefined && key !== '_' && key !== '$0') {
|
|
||||||
mapped[key] = typeof value === 'boolean' ? String(value) : value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure mode is set so Cli.isCliMode returns true
|
|
||||||
if (!mapped['mode']) {
|
|
||||||
mapped['mode'] = 'cli';
|
|
||||||
}
|
|
||||||
|
|
||||||
Cli.options = mapped;
|
|
||||||
}
|
|
||||||
62
src/index.ts
62
src/index.ts
@@ -1,8 +1,12 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
import path from 'node:path';
|
||||||
import { Action, BuildParameters, Cache, Orchestrator, Docker, ImageTag, Output } from './model';
|
import { Action, BuildParameters, Cache, Orchestrator, Docker, ImageTag, Output } from './model';
|
||||||
import { Cli } from './model/cli/cli';
|
import { Cli } from './model/cli/cli';
|
||||||
import MacBuilder from './model/mac-builder';
|
import MacBuilder from './model/mac-builder';
|
||||||
import PlatformSetup from './model/platform-setup';
|
import PlatformSetup from './model/platform-setup';
|
||||||
|
import { OutputService } from './model/orchestrator/services/output/output-service';
|
||||||
|
import { OutputTypeRegistry } from './model/orchestrator/services/output/output-type-registry';
|
||||||
|
import { ArtifactUploadHandler } from './model/orchestrator/services/output/artifact-upload-handler';
|
||||||
|
|
||||||
async function runMain() {
|
async function runMain() {
|
||||||
try {
|
try {
|
||||||
@@ -42,6 +46,64 @@ async function runMain() {
|
|||||||
await Output.setAndroidVersionCode(buildParameters.androidVersionCode);
|
await Output.setAndroidVersionCode(buildParameters.androidVersionCode);
|
||||||
await Output.setEngineExitCode(exitCode);
|
await Output.setEngineExitCode(exitCode);
|
||||||
|
|
||||||
|
// Artifact collection and upload (runs on both success and failure)
|
||||||
|
try {
|
||||||
|
// Register custom output types if provided
|
||||||
|
if (buildParameters.artifactCustomTypes) {
|
||||||
|
try {
|
||||||
|
const customTypes = JSON.parse(buildParameters.artifactCustomTypes);
|
||||||
|
if (Array.isArray(customTypes)) {
|
||||||
|
for (const ct of customTypes) {
|
||||||
|
OutputTypeRegistry.registerType({
|
||||||
|
name: ct.name,
|
||||||
|
defaultPath: ct.defaultPath || ct.pattern || `./${ct.name}/`,
|
||||||
|
description: ct.description || `Custom output type: ${ct.name}`,
|
||||||
|
builtIn: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (parseError) {
|
||||||
|
core.warning(`Failed to parse artifactCustomTypes: ${(parseError as Error).message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Collect outputs and generate manifest
|
||||||
|
const manifestPath = path.join(buildParameters.projectPath, 'output-manifest.json');
|
||||||
|
const manifest = await OutputService.collectOutputs(
|
||||||
|
buildParameters.projectPath,
|
||||||
|
buildParameters.buildGuid,
|
||||||
|
buildParameters.artifactOutputTypes,
|
||||||
|
manifestPath,
|
||||||
|
);
|
||||||
|
|
||||||
|
core.setOutput('artifactManifestPath', manifestPath);
|
||||||
|
|
||||||
|
// Upload artifacts
|
||||||
|
const uploadConfig = ArtifactUploadHandler.parseConfig(
|
||||||
|
buildParameters.artifactUploadTarget,
|
||||||
|
buildParameters.artifactUploadPath || undefined,
|
||||||
|
buildParameters.artifactCompression,
|
||||||
|
buildParameters.artifactRetentionDays,
|
||||||
|
);
|
||||||
|
|
||||||
|
const uploadResult = await ArtifactUploadHandler.uploadArtifacts(
|
||||||
|
manifest,
|
||||||
|
uploadConfig,
|
||||||
|
buildParameters.projectPath,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!uploadResult.success) {
|
||||||
|
core.warning(
|
||||||
|
`Artifact upload completed with errors: ${uploadResult.entries
|
||||||
|
.filter((e) => !e.success)
|
||||||
|
.map((e) => `${e.type}: ${e.error}`)
|
||||||
|
.join('; ')}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (artifactError) {
|
||||||
|
core.warning(`Artifact collection/upload failed: ${(artifactError as Error).message}`);
|
||||||
|
}
|
||||||
|
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
core.setFailed(`Build failed with exit code ${exitCode}`);
|
core.setFailed(`Build failed with exit code ${exitCode}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ class BuildParameters {
|
|||||||
public cacheUnityInstallationOnMac!: boolean;
|
public cacheUnityInstallationOnMac!: boolean;
|
||||||
public unityHubVersionOnMac!: string;
|
public unityHubVersionOnMac!: string;
|
||||||
public dockerWorkspacePath!: string;
|
public dockerWorkspacePath!: string;
|
||||||
|
public artifactOutputTypes!: string;
|
||||||
|
public artifactUploadTarget!: string;
|
||||||
|
public artifactUploadPath!: string;
|
||||||
|
public artifactCompression!: string;
|
||||||
|
public artifactRetentionDays!: string;
|
||||||
|
public artifactCustomTypes!: string;
|
||||||
|
|
||||||
public static shouldUseRetainedWorkspaceMode(buildParameters: BuildParameters) {
|
public static shouldUseRetainedWorkspaceMode(buildParameters: BuildParameters) {
|
||||||
return buildParameters.maxRetainedWorkspaces > 0 && Orchestrator.lockedWorkspace !== ``;
|
return buildParameters.maxRetainedWorkspaces > 0 && Orchestrator.lockedWorkspace !== ``;
|
||||||
@@ -242,6 +248,12 @@ class BuildParameters {
|
|||||||
cacheUnityInstallationOnMac: Input.cacheUnityInstallationOnMac,
|
cacheUnityInstallationOnMac: Input.cacheUnityInstallationOnMac,
|
||||||
unityHubVersionOnMac: Input.unityHubVersionOnMac,
|
unityHubVersionOnMac: Input.unityHubVersionOnMac,
|
||||||
dockerWorkspacePath: Input.dockerWorkspacePath,
|
dockerWorkspacePath: Input.dockerWorkspacePath,
|
||||||
|
artifactOutputTypes: Input.artifactOutputTypes,
|
||||||
|
artifactUploadTarget: Input.artifactUploadTarget,
|
||||||
|
artifactUploadPath: Input.artifactUploadPath,
|
||||||
|
artifactCompression: Input.artifactCompression,
|
||||||
|
artifactRetentionDays: Input.artifactRetentionDays,
|
||||||
|
artifactCustomTypes: Input.artifactCustomTypes,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,8 +155,8 @@ export class Cli {
|
|||||||
return result.map((x) => x.Name);
|
return result.map((x) => x.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`list-workflow`, `lists running workflows`)
|
@CliFunction(`list-worfklow`, `lists running workflows`)
|
||||||
public static async ListWorkflow(): Promise<string[]> {
|
public static async ListWorfklow(): Promise<string[]> {
|
||||||
const buildParameter = await BuildParameters.create();
|
const buildParameter = await BuildParameters.create();
|
||||||
|
|
||||||
await Orchestrator.setup(buildParameter);
|
await Orchestrator.setup(buildParameter);
|
||||||
|
|||||||
@@ -278,6 +278,30 @@ class Input {
|
|||||||
return Input.getInput('containerRegistryImageVersion') ?? '3';
|
return Input.getInput('containerRegistryImageVersion') ?? '3';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get artifactOutputTypes(): string {
|
||||||
|
return Input.getInput('artifactOutputTypes') ?? 'build,logs,test-results';
|
||||||
|
}
|
||||||
|
|
||||||
|
static get artifactUploadTarget(): string {
|
||||||
|
return Input.getInput('artifactUploadTarget') ?? 'github-artifacts';
|
||||||
|
}
|
||||||
|
|
||||||
|
static get artifactUploadPath(): string {
|
||||||
|
return Input.getInput('artifactUploadPath') ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
static get artifactCompression(): string {
|
||||||
|
return Input.getInput('artifactCompression') ?? 'gzip';
|
||||||
|
}
|
||||||
|
|
||||||
|
static get artifactRetentionDays(): string {
|
||||||
|
return Input.getInput('artifactRetentionDays') ?? '30';
|
||||||
|
}
|
||||||
|
|
||||||
|
static get artifactCustomTypes(): string {
|
||||||
|
return Input.getInput('artifactCustomTypes') ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
static get skipActivation(): string {
|
static get skipActivation(): string {
|
||||||
return Input.getInput('skipActivation')?.toLowerCase() ?? 'false';
|
return Input.getInput('skipActivation')?.toLowerCase() ?? 'false';
|
||||||
}
|
}
|
||||||
|
|||||||
607
src/model/orchestrator/services/output/artifact-service.test.ts
Normal file
607
src/model/orchestrator/services/output/artifact-service.test.ts
Normal file
@@ -0,0 +1,607 @@
|
|||||||
|
import fs from 'node:fs';
|
||||||
|
import path from 'node:path';
|
||||||
|
import { OutputTypeRegistry, OutputTypeDefinition } from './output-type-registry';
|
||||||
|
import { OutputService } from './output-service';
|
||||||
|
import { OutputManifest } from './output-manifest';
|
||||||
|
import { ArtifactUploadHandler, ArtifactUploadConfig } from './artifact-upload-handler';
|
||||||
|
|
||||||
|
// Mock node:fs
|
||||||
|
jest.mock('node:fs');
|
||||||
|
const mockedFs = fs as jest.Mocked<typeof fs>;
|
||||||
|
|
||||||
|
// Mock @actions/core (used by OrchestratorLogger)
|
||||||
|
jest.mock('@actions/core', () => ({
|
||||||
|
info: jest.fn(),
|
||||||
|
warning: jest.fn(),
|
||||||
|
error: jest.fn(),
|
||||||
|
setOutput: jest.fn(),
|
||||||
|
getInput: jest.fn(),
|
||||||
|
setFailed: jest.fn(),
|
||||||
|
setSecret: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock @actions/exec (used by upload handler for rclone)
|
||||||
|
jest.mock('@actions/exec', () => ({
|
||||||
|
exec: jest.fn().mockResolvedValue(0),
|
||||||
|
}));
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.restoreAllMocks();
|
||||||
|
OutputTypeRegistry.resetCustomTypes();
|
||||||
|
});
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// OutputTypeRegistry Tests
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
describe('OutputTypeRegistry', () => {
|
||||||
|
describe('built-in types', () => {
|
||||||
|
it('should have 8 built-in types', () => {
|
||||||
|
const allTypes = OutputTypeRegistry.getAllTypes();
|
||||||
|
const builtInTypes = allTypes.filter((t) => t.builtIn);
|
||||||
|
expect(builtInTypes).toHaveLength(8);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each(['build', 'test-results', 'server-build', 'data-export', 'images', 'logs', 'metrics', 'coverage'])(
|
||||||
|
'should include built-in type "%s"',
|
||||||
|
(typeName) => {
|
||||||
|
const typeDef = OutputTypeRegistry.getType(typeName);
|
||||||
|
expect(typeDef).toBeDefined();
|
||||||
|
expect(typeDef!.name).toBe(typeName);
|
||||||
|
expect(typeDef!.builtIn).toBe(true);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
it('should return undefined for unknown types', () => {
|
||||||
|
const typeDef = OutputTypeRegistry.getType('nonexistent');
|
||||||
|
expect(typeDef).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should include default paths for all built-in types', () => {
|
||||||
|
const allTypes = OutputTypeRegistry.getAllTypes();
|
||||||
|
for (const typeDef of allTypes) {
|
||||||
|
expect(typeDef.defaultPath).toBeTruthy();
|
||||||
|
expect(typeof typeDef.defaultPath).toBe('string');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should include descriptions for all built-in types', () => {
|
||||||
|
const allTypes = OutputTypeRegistry.getAllTypes();
|
||||||
|
for (const typeDef of allTypes) {
|
||||||
|
expect(typeDef.description).toBeTruthy();
|
||||||
|
expect(typeof typeDef.description).toBe('string');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('custom type registration', () => {
|
||||||
|
it('should register a custom type', () => {
|
||||||
|
const customType: OutputTypeDefinition = {
|
||||||
|
name: 'custom-reports',
|
||||||
|
defaultPath: './Reports/',
|
||||||
|
description: 'Custom generated reports',
|
||||||
|
builtIn: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
OutputTypeRegistry.registerType(customType);
|
||||||
|
const retrieved = OutputTypeRegistry.getType('custom-reports');
|
||||||
|
expect(retrieved).toBeDefined();
|
||||||
|
expect(retrieved!.name).toBe('custom-reports');
|
||||||
|
expect(retrieved!.builtIn).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not override built-in types', () => {
|
||||||
|
const override: OutputTypeDefinition = {
|
||||||
|
name: 'build',
|
||||||
|
defaultPath: './Override/',
|
||||||
|
description: 'Should not override',
|
||||||
|
builtIn: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
OutputTypeRegistry.registerType(override);
|
||||||
|
const buildType = OutputTypeRegistry.getType('build');
|
||||||
|
expect(buildType!.defaultPath).not.toBe('./Override/');
|
||||||
|
expect(buildType!.builtIn).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should include custom types in getAllTypes', () => {
|
||||||
|
OutputTypeRegistry.registerType({
|
||||||
|
name: 'custom-a',
|
||||||
|
defaultPath: './A/',
|
||||||
|
description: 'Custom A',
|
||||||
|
builtIn: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const allTypes = OutputTypeRegistry.getAllTypes();
|
||||||
|
expect(allTypes.length).toBe(9); // 8 built-in + 1 custom
|
||||||
|
expect(allTypes.some((t) => t.name === 'custom-a')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should reset custom types', () => {
|
||||||
|
OutputTypeRegistry.registerType({
|
||||||
|
name: 'temp-type',
|
||||||
|
defaultPath: './Temp/',
|
||||||
|
description: 'Temporary type',
|
||||||
|
builtIn: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(OutputTypeRegistry.getType('temp-type')).toBeDefined();
|
||||||
|
OutputTypeRegistry.resetCustomTypes();
|
||||||
|
expect(OutputTypeRegistry.getType('temp-type')).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should force builtIn to false when registering custom types', () => {
|
||||||
|
OutputTypeRegistry.registerType({
|
||||||
|
name: 'sneaky',
|
||||||
|
defaultPath: './Sneaky/',
|
||||||
|
description: 'Tries to be built-in',
|
||||||
|
builtIn: true, // Intentionally setting to true
|
||||||
|
});
|
||||||
|
|
||||||
|
const retrieved = OutputTypeRegistry.getType('sneaky');
|
||||||
|
expect(retrieved).toBeDefined();
|
||||||
|
expect(retrieved!.builtIn).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('parseOutputTypes', () => {
|
||||||
|
it('should parse a comma-separated string of valid types', () => {
|
||||||
|
const types = OutputTypeRegistry.parseOutputTypes('build,logs,coverage');
|
||||||
|
expect(types).toHaveLength(3);
|
||||||
|
expect(types.map((t) => t.name)).toEqual(['build', 'logs', 'coverage']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should skip unknown types', () => {
|
||||||
|
const types = OutputTypeRegistry.parseOutputTypes('build,unknown,logs');
|
||||||
|
expect(types).toHaveLength(2);
|
||||||
|
expect(types.map((t) => t.name)).toEqual(['build', 'logs']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should handle empty string', () => {
|
||||||
|
const types = OutputTypeRegistry.parseOutputTypes('');
|
||||||
|
expect(types).toHaveLength(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should handle whitespace in type names', () => {
|
||||||
|
const types = OutputTypeRegistry.parseOutputTypes(' build , logs , coverage ');
|
||||||
|
expect(types).toHaveLength(3);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should include custom types when parsing', () => {
|
||||||
|
OutputTypeRegistry.registerType({
|
||||||
|
name: 'my-reports',
|
||||||
|
defaultPath: './Reports/',
|
||||||
|
description: 'Custom reports',
|
||||||
|
builtIn: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const types = OutputTypeRegistry.parseOutputTypes('build,my-reports');
|
||||||
|
expect(types).toHaveLength(2);
|
||||||
|
expect(types[1].name).toBe('my-reports');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// OutputService Tests
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
describe('OutputService', () => {
|
||||||
|
const projectPath = '/project';
|
||||||
|
const buildGuid = 'test-guid-1234';
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
// Reset all fs mocks
|
||||||
|
mockedFs.existsSync.mockReset();
|
||||||
|
mockedFs.statSync.mockReset();
|
||||||
|
mockedFs.readdirSync.mockReset();
|
||||||
|
mockedFs.writeFileSync.mockReset();
|
||||||
|
mockedFs.mkdirSync.mockReset();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('collectOutputs', () => {
|
||||||
|
it('should return an empty manifest when no output types are declared', async () => {
|
||||||
|
const manifest = await OutputService.collectOutputs(projectPath, buildGuid, '');
|
||||||
|
expect(manifest.buildGuid).toBe(buildGuid);
|
||||||
|
expect(manifest.outputs).toHaveLength(0);
|
||||||
|
expect(manifest.timestamp).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should skip outputs where the path does not exist', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(false);
|
||||||
|
|
||||||
|
const manifest = await OutputService.collectOutputs(projectPath, buildGuid, 'build,logs');
|
||||||
|
expect(manifest.outputs).toHaveLength(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should collect directory outputs with file listings', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => true, size: 0 } as any);
|
||||||
|
mockedFs.readdirSync.mockImplementation((_dirPath: any, options?: any) => {
|
||||||
|
if (options?.withFileTypes) {
|
||||||
|
return [
|
||||||
|
{ name: 'file1.txt', isDirectory: () => false },
|
||||||
|
{ name: 'file2.txt', isDirectory: () => false },
|
||||||
|
] as any;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ['file1.txt', 'file2.txt'] as any;
|
||||||
|
});
|
||||||
|
|
||||||
|
const manifest = await OutputService.collectOutputs(projectPath, buildGuid, 'logs');
|
||||||
|
expect(manifest.outputs).toHaveLength(1);
|
||||||
|
expect(manifest.outputs[0].type).toBe('logs');
|
||||||
|
expect(manifest.outputs[0].files).toEqual(['file1.txt', 'file2.txt']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should collect file output with correct size', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 4096 } as any);
|
||||||
|
|
||||||
|
const manifest = await OutputService.collectOutputs(projectPath, buildGuid, 'coverage');
|
||||||
|
expect(manifest.outputs).toHaveLength(1);
|
||||||
|
expect(manifest.outputs[0].size).toBe(4096);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should write manifest to disk when manifestPath is provided', async () => {
|
||||||
|
// existsSync returns false for output paths (no outputs found) but mkdirSync/writeFileSync should still be called
|
||||||
|
// The service only writes manifest when at least one output type is declared and types are resolved
|
||||||
|
// So we need to provide a valid output type and have its path exist
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 100 } as any);
|
||||||
|
mockedFs.mkdirSync.mockReturnValue(undefined);
|
||||||
|
mockedFs.writeFileSync.mockImplementation(() => {});
|
||||||
|
|
||||||
|
const manifestPath = '/output/manifest.json';
|
||||||
|
await OutputService.collectOutputs(projectPath, buildGuid, 'logs', manifestPath);
|
||||||
|
|
||||||
|
expect(mockedFs.mkdirSync).toHaveBeenCalledWith(path.dirname(manifestPath), { recursive: true });
|
||||||
|
expect(mockedFs.writeFileSync).toHaveBeenCalledWith(manifestPath, expect.any(String), 'utf8');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should generate valid JSON in the manifest file', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 200 } as any);
|
||||||
|
mockedFs.mkdirSync.mockReturnValue(undefined);
|
||||||
|
mockedFs.writeFileSync.mockImplementation(() => {});
|
||||||
|
|
||||||
|
const manifestPath = '/output/manifest.json';
|
||||||
|
await OutputService.collectOutputs(projectPath, buildGuid, 'coverage', manifestPath);
|
||||||
|
|
||||||
|
const writtenContent = (mockedFs.writeFileSync as jest.Mock).mock.calls[0][1];
|
||||||
|
const parsed = JSON.parse(writtenContent);
|
||||||
|
expect(parsed.buildGuid).toBe(buildGuid);
|
||||||
|
expect(Array.isArray(parsed.outputs)).toBe(true);
|
||||||
|
expect(parsed.outputs.length).toBeGreaterThan(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set a valid ISO 8601 timestamp', async () => {
|
||||||
|
const manifest = await OutputService.collectOutputs(projectPath, buildGuid, '');
|
||||||
|
const parsed = new Date(manifest.timestamp);
|
||||||
|
expect(parsed.toISOString()).toBe(manifest.timestamp);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// ArtifactUploadHandler Tests
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
describe('ArtifactUploadHandler', () => {
|
||||||
|
const projectPath = '/project';
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
mockedFs.existsSync.mockReset();
|
||||||
|
mockedFs.statSync.mockReset();
|
||||||
|
mockedFs.readdirSync.mockReset();
|
||||||
|
mockedFs.mkdirSync.mockReset();
|
||||||
|
mockedFs.copyFileSync.mockReset();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('parseConfig', () => {
|
||||||
|
it('should parse valid config values', () => {
|
||||||
|
const config = ArtifactUploadHandler.parseConfig('github-artifacts', '/dest', 'gzip', '14');
|
||||||
|
expect(config.target).toBe('github-artifacts');
|
||||||
|
expect(config.destination).toBe('/dest');
|
||||||
|
expect(config.compression).toBe('gzip');
|
||||||
|
expect(config.retentionDays).toBe(14);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should default invalid target to github-artifacts', () => {
|
||||||
|
const config = ArtifactUploadHandler.parseConfig('invalid', undefined, 'none', '30');
|
||||||
|
expect(config.target).toBe('github-artifacts');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should default invalid compression to gzip', () => {
|
||||||
|
const config = ArtifactUploadHandler.parseConfig('local', '/dest', 'brotli', '30');
|
||||||
|
expect(config.compression).toBe('gzip');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should default invalid retention to 30 days', () => {
|
||||||
|
const config = ArtifactUploadHandler.parseConfig('local', '/dest', 'gzip', 'abc');
|
||||||
|
expect(config.retentionDays).toBe(30);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should default negative retention to 30 days', () => {
|
||||||
|
const config = ArtifactUploadHandler.parseConfig('local', '/dest', 'gzip', '-5');
|
||||||
|
expect(config.retentionDays).toBe(30);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set destination to undefined when empty string', () => {
|
||||||
|
const config = ArtifactUploadHandler.parseConfig('storage', '', 'none', '7');
|
||||||
|
expect(config.destination).toBeUndefined();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('uploadArtifacts', () => {
|
||||||
|
it('should skip upload when target is none', async () => {
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [{ type: 'build', path: './Builds/' }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'none',
|
||||||
|
compression: 'gzip',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.success).toBe(true);
|
||||||
|
expect(result.entries).toHaveLength(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return success with no entries for empty manifest', async () => {
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'github-artifacts',
|
||||||
|
compression: 'gzip',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.success).toBe(true);
|
||||||
|
expect(result.entries).toHaveLength(0);
|
||||||
|
expect(result.totalBytes).toBe(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fail entry when output path does not exist', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(false);
|
||||||
|
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [{ type: 'build', path: './Builds/Missing/' }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'local',
|
||||||
|
destination: '/output',
|
||||||
|
compression: 'none',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.success).toBe(false);
|
||||||
|
expect(result.entries).toHaveLength(1);
|
||||||
|
expect(result.entries[0].success).toBe(false);
|
||||||
|
expect(result.entries[0].error).toContain('does not exist');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should copy files for local upload target', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 1024 } as any);
|
||||||
|
mockedFs.mkdirSync.mockReturnValue(undefined);
|
||||||
|
mockedFs.copyFileSync.mockReturnValue(undefined);
|
||||||
|
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [{ type: 'logs', path: './Logs/build.log', size: 1024 }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'local',
|
||||||
|
destination: '/output',
|
||||||
|
compression: 'none',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.success).toBe(true);
|
||||||
|
expect(result.entries).toHaveLength(1);
|
||||||
|
expect(result.entries[0].success).toBe(true);
|
||||||
|
expect(result.totalBytes).toBe(1024);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fail local upload when no destination is provided', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 512 } as any);
|
||||||
|
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [{ type: 'logs', path: './Logs/build.log', size: 512 }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'local',
|
||||||
|
compression: 'none',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.success).toBe(false);
|
||||||
|
expect(result.entries[0].success).toBe(false);
|
||||||
|
expect(result.entries[0].error).toContain('destination path');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should report correct duration', async () => {
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'none',
|
||||||
|
compression: 'gzip',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.durationMs).toBeGreaterThanOrEqual(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('collectFiles', () => {
|
||||||
|
it('should return single file for a file path', () => {
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false } as any);
|
||||||
|
|
||||||
|
const files = ArtifactUploadHandler.collectFiles('/path/to/file.txt');
|
||||||
|
expect(files).toEqual(['/path/to/file.txt']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return all files recursively for a directory', () => {
|
||||||
|
mockedFs.statSync.mockImplementation((p: any) => {
|
||||||
|
const pathStr = typeof p === 'string' ? p : p.toString();
|
||||||
|
if (pathStr.endsWith('.txt') || pathStr.endsWith('.log')) {
|
||||||
|
return { isDirectory: () => false } as any;
|
||||||
|
}
|
||||||
|
|
||||||
|
return { isDirectory: () => true } as any;
|
||||||
|
});
|
||||||
|
|
||||||
|
mockedFs.readdirSync.mockImplementation((dirPath: any, _options?: any) => {
|
||||||
|
const dirStr = typeof dirPath === 'string' ? dirPath : dirPath.toString();
|
||||||
|
if (dirStr === '/root') {
|
||||||
|
return [
|
||||||
|
{ name: 'file1.txt', isDirectory: () => false },
|
||||||
|
{ name: 'sub', isDirectory: () => true },
|
||||||
|
] as any;
|
||||||
|
}
|
||||||
|
if (dirStr.endsWith('sub')) {
|
||||||
|
return [{ name: 'file2.log', isDirectory: () => false }] as any;
|
||||||
|
}
|
||||||
|
|
||||||
|
return [] as any;
|
||||||
|
});
|
||||||
|
|
||||||
|
const files = ArtifactUploadHandler.collectFiles('/root');
|
||||||
|
expect(files).toHaveLength(2);
|
||||||
|
expect(files).toContain(path.join('/root', 'file1.txt'));
|
||||||
|
expect(files).toContain(path.join('/root', 'sub', 'file2.log'));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('storage upload validation', () => {
|
||||||
|
it('should fail storage upload when no destination is provided', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 256 } as any);
|
||||||
|
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [{ type: 'build', path: './Builds/', size: 256 }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'storage',
|
||||||
|
compression: 'gzip',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.success).toBe(false);
|
||||||
|
expect(result.entries[0].error).toContain('destination URI');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fail storage upload when destination URI has invalid format', async () => {
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 256 } as any);
|
||||||
|
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [{ type: 'build', path: './Builds/', size: 256 }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'storage',
|
||||||
|
destination: '/just/a/local/path',
|
||||||
|
compression: 'gzip',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.success).toBe(false);
|
||||||
|
expect(result.entries[0].error).toContain('Invalid storage destination URI');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fail storage upload when rclone is not installed', async () => {
|
||||||
|
// Mock child_process.execFileSync to throw (rclone not found)
|
||||||
|
const childProcess = require('node:child_process');
|
||||||
|
const originalExecFileSync = childProcess.execFileSync;
|
||||||
|
childProcess.execFileSync = jest.fn(() => {
|
||||||
|
throw new Error('ENOENT');
|
||||||
|
});
|
||||||
|
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 256 } as any);
|
||||||
|
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [{ type: 'build', path: './Builds/', size: 256 }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'storage',
|
||||||
|
destination: 's3:my-bucket/artifacts',
|
||||||
|
compression: 'gzip',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
expect(result.success).toBe(false);
|
||||||
|
expect(result.entries[0].error).toContain('rclone is not installed');
|
||||||
|
|
||||||
|
// Restore
|
||||||
|
childProcess.execFileSync = originalExecFileSync;
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should accept valid rclone storage URI formats', async () => {
|
||||||
|
// Mock child_process.execFileSync to succeed (rclone available)
|
||||||
|
const childProcess = require('node:child_process');
|
||||||
|
const originalExecFileSync = childProcess.execFileSync;
|
||||||
|
childProcess.execFileSync = jest.fn(() => 'rclone v1.65.0');
|
||||||
|
|
||||||
|
mockedFs.existsSync.mockReturnValue(true);
|
||||||
|
mockedFs.statSync.mockReturnValue({ isDirectory: () => false, size: 256 } as any);
|
||||||
|
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid: 'test-guid',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [{ type: 'build', path: './Builds/', size: 256 }],
|
||||||
|
};
|
||||||
|
|
||||||
|
// s3:bucket format should pass URI validation and reach the exec call
|
||||||
|
const config: ArtifactUploadConfig = {
|
||||||
|
target: 'storage',
|
||||||
|
destination: 's3:my-bucket/artifacts',
|
||||||
|
compression: 'gzip',
|
||||||
|
retentionDays: 30,
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = await ArtifactUploadHandler.uploadArtifacts(manifest, config, projectPath);
|
||||||
|
// Should succeed because exec is mocked to return 0
|
||||||
|
expect(result.entries[0].success).toBe(true);
|
||||||
|
|
||||||
|
// Restore
|
||||||
|
childProcess.execFileSync = originalExecFileSync;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,474 @@
|
|||||||
|
import fs from 'node:fs';
|
||||||
|
import path from 'node:path';
|
||||||
|
import { execFileSync } from 'node:child_process';
|
||||||
|
import { exec } from '@actions/exec';
|
||||||
|
import OrchestratorLogger from '../core/orchestrator-logger';
|
||||||
|
import { OutputManifest, OutputEntry } from './output-manifest';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration for artifact upload.
|
||||||
|
*/
|
||||||
|
export interface ArtifactUploadConfig {
|
||||||
|
/** Upload target: 'github-artifacts', 'storage', 'local', 'none' */
|
||||||
|
target: 'github-artifacts' | 'storage' | 'local' | 'none';
|
||||||
|
|
||||||
|
/** Destination path — storage URI for 'storage', local path for 'local' */
|
||||||
|
destination?: string;
|
||||||
|
|
||||||
|
/** Compression method */
|
||||||
|
compression: 'none' | 'gzip' | 'lz4';
|
||||||
|
|
||||||
|
/** Retention period in days (GitHub Artifacts only) */
|
||||||
|
retentionDays: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Result of an artifact upload operation.
|
||||||
|
*/
|
||||||
|
export interface UploadResult {
|
||||||
|
/** Whether the upload succeeded overall */
|
||||||
|
success: boolean;
|
||||||
|
|
||||||
|
/** Per-entry upload results */
|
||||||
|
entries: UploadEntryResult[];
|
||||||
|
|
||||||
|
/** Total bytes uploaded */
|
||||||
|
totalBytes: number;
|
||||||
|
|
||||||
|
/** Duration in milliseconds */
|
||||||
|
durationMs: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UploadEntryResult {
|
||||||
|
/** The output type name */
|
||||||
|
type: string;
|
||||||
|
|
||||||
|
/** The output path */
|
||||||
|
path: string;
|
||||||
|
|
||||||
|
/** Whether this entry uploaded successfully */
|
||||||
|
success: boolean;
|
||||||
|
|
||||||
|
/** Bytes uploaded for this entry */
|
||||||
|
bytes: number;
|
||||||
|
|
||||||
|
/** Error message if upload failed */
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GitHub Artifacts size limit per artifact (10 GB).
|
||||||
|
* Files larger than this must be split.
|
||||||
|
*/
|
||||||
|
const GITHUB_ARTIFACT_SIZE_LIMIT = 10 * 1024 * 1024 * 1024;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimum valid storage URI pattern: "remote:path" or "remote:".
|
||||||
|
* rclone requires at least a remote name followed by a colon.
|
||||||
|
*/
|
||||||
|
const STORAGE_URI_PATTERN = /^[a-zA-Z][\w-]*:/;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether rclone is installed and available on PATH.
|
||||||
|
* Returns true if `rclone version` executes successfully.
|
||||||
|
*/
|
||||||
|
function isRcloneAvailable(): boolean {
|
||||||
|
try {
|
||||||
|
execFileSync('rclone', ['version'], { stdio: 'pipe', timeout: 5000 });
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate that a storage destination URI has the correct rclone format.
|
||||||
|
* Valid format: "remoteName:path" (e.g., "s3:bucket/prefix", "gdrive:folder").
|
||||||
|
*/
|
||||||
|
function isValidStorageUri(uri: string): boolean {
|
||||||
|
return STORAGE_URI_PATTERN.test(uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles uploading build artifacts to various targets.
|
||||||
|
*/
|
||||||
|
export class ArtifactUploadHandler {
|
||||||
|
/**
|
||||||
|
* Upload artifacts described by a manifest to the configured target.
|
||||||
|
*/
|
||||||
|
static async uploadArtifacts(
|
||||||
|
manifest: OutputManifest,
|
||||||
|
config: ArtifactUploadConfig,
|
||||||
|
projectPath: string,
|
||||||
|
): Promise<UploadResult> {
|
||||||
|
const startTime = Date.now();
|
||||||
|
const result: UploadResult = {
|
||||||
|
success: true,
|
||||||
|
entries: [],
|
||||||
|
totalBytes: 0,
|
||||||
|
durationMs: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (config.target === 'none') {
|
||||||
|
OrchestratorLogger.log('[ArtifactUpload] Upload target is "none", skipping upload');
|
||||||
|
result.durationMs = Date.now() - startTime;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (manifest.outputs.length === 0) {
|
||||||
|
OrchestratorLogger.log('[ArtifactUpload] No outputs in manifest, nothing to upload');
|
||||||
|
result.durationMs = Date.now() - startTime;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
OrchestratorLogger.log(`[ArtifactUpload] Uploading ${manifest.outputs.length} output(s) to ${config.target}`);
|
||||||
|
|
||||||
|
for (const entry of manifest.outputs) {
|
||||||
|
const entryResult = await ArtifactUploadHandler.uploadEntry(entry, config, projectPath);
|
||||||
|
result.entries.push(entryResult);
|
||||||
|
result.totalBytes += entryResult.bytes;
|
||||||
|
|
||||||
|
if (!entryResult.success) {
|
||||||
|
result.success = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result.durationMs = Date.now() - startTime;
|
||||||
|
|
||||||
|
OrchestratorLogger.log(
|
||||||
|
`[ArtifactUpload] Upload complete: ${result.entries.filter((e) => e.success).length}/${
|
||||||
|
result.entries.length
|
||||||
|
} succeeded, ${result.totalBytes} bytes, ${result.durationMs}ms`,
|
||||||
|
);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload a single output entry.
|
||||||
|
*/
|
||||||
|
private static async uploadEntry(
|
||||||
|
entry: OutputEntry,
|
||||||
|
config: ArtifactUploadConfig,
|
||||||
|
projectPath: string,
|
||||||
|
): Promise<UploadEntryResult> {
|
||||||
|
const entryResult: UploadEntryResult = {
|
||||||
|
type: entry.type,
|
||||||
|
path: entry.path,
|
||||||
|
success: false,
|
||||||
|
bytes: entry.size || 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
const resolvedPath = path.resolve(
|
||||||
|
projectPath,
|
||||||
|
entry.path.replace('{platform}', process.env.BUILD_TARGET || 'Unknown'),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!fs.existsSync(resolvedPath)) {
|
||||||
|
entryResult.error = `Output path does not exist: ${resolvedPath}`;
|
||||||
|
OrchestratorLogger.logWarning(`[ArtifactUpload] ${entryResult.error}`);
|
||||||
|
|
||||||
|
return entryResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
switch (config.target) {
|
||||||
|
case 'github-artifacts':
|
||||||
|
await ArtifactUploadHandler.uploadToGitHubArtifacts(entry, resolvedPath, config);
|
||||||
|
break;
|
||||||
|
case 'storage':
|
||||||
|
await ArtifactUploadHandler.uploadToStorage(entry, resolvedPath, config);
|
||||||
|
break;
|
||||||
|
case 'local':
|
||||||
|
await ArtifactUploadHandler.uploadToLocal(entry, resolvedPath, config);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
entryResult.success = true;
|
||||||
|
OrchestratorLogger.log(
|
||||||
|
`[ArtifactUpload] Uploaded '${entry.type}' (${entryResult.bytes} bytes) to ${config.target}`,
|
||||||
|
);
|
||||||
|
} catch (error: any) {
|
||||||
|
entryResult.error = error.message || String(error);
|
||||||
|
OrchestratorLogger.logWarning(`[ArtifactUpload] Failed to upload '${entry.type}': ${entryResult.error}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return entryResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload to GitHub Artifacts via @actions/artifact.
|
||||||
|
* Handles large file splitting if artifacts exceed the size limit.
|
||||||
|
*/
|
||||||
|
private static async uploadToGitHubArtifacts(
|
||||||
|
entry: OutputEntry,
|
||||||
|
resolvedPath: string,
|
||||||
|
config: ArtifactUploadConfig,
|
||||||
|
): Promise<void> {
|
||||||
|
// Dynamically require @actions/artifact — it may not be available in all environments.
|
||||||
|
// Using a variable to prevent TypeScript from resolving the module at compile time.
|
||||||
|
let artifact: any;
|
||||||
|
try {
|
||||||
|
const artifactModule = '@actions/artifact';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
|
artifact = require(artifactModule);
|
||||||
|
} catch {
|
||||||
|
throw new Error('@actions/artifact package is not available. Install it to use github-artifacts upload target.');
|
||||||
|
}
|
||||||
|
|
||||||
|
const artifactClient = artifact.DefaultArtifactClient
|
||||||
|
? new artifact.DefaultArtifactClient()
|
||||||
|
: artifact.default
|
||||||
|
? new artifact.default()
|
||||||
|
: artifact;
|
||||||
|
|
||||||
|
const files = ArtifactUploadHandler.collectFiles(resolvedPath);
|
||||||
|
|
||||||
|
if (files.length === 0) {
|
||||||
|
OrchestratorLogger.logWarning(`[ArtifactUpload] No files found at ${resolvedPath} for '${entry.type}'`);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const totalSize = entry.size || 0;
|
||||||
|
const artifactName = `unity-output-${entry.type}`;
|
||||||
|
|
||||||
|
if (totalSize > GITHUB_ARTIFACT_SIZE_LIMIT) {
|
||||||
|
OrchestratorLogger.log(
|
||||||
|
`[ArtifactUpload] Output '${entry.type}' exceeds GitHub Artifacts size limit (${totalSize} > ${GITHUB_ARTIFACT_SIZE_LIMIT}), splitting into chunks`,
|
||||||
|
);
|
||||||
|
await ArtifactUploadHandler.uploadChunked(artifactClient, artifactName, files, resolvedPath, config);
|
||||||
|
} else {
|
||||||
|
const rootDirectory = fs.statSync(resolvedPath).isDirectory() ? resolvedPath : path.dirname(resolvedPath);
|
||||||
|
|
||||||
|
if (typeof artifactClient.uploadArtifact === 'function') {
|
||||||
|
await artifactClient.uploadArtifact(artifactName, files, rootDirectory, {
|
||||||
|
retentionDays: config.retentionDays,
|
||||||
|
compressionLevel: config.compression === 'none' ? 0 : 6,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
throw new Error(
|
||||||
|
'@actions/artifact client does not have uploadArtifact method. Ensure the package version is compatible.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload large artifacts in chunks to stay within GitHub size limits.
|
||||||
|
*/
|
||||||
|
private static async uploadChunked(
|
||||||
|
artifactClient: any,
|
||||||
|
baseName: string,
|
||||||
|
files: string[],
|
||||||
|
rootDirectory: string,
|
||||||
|
config: ArtifactUploadConfig,
|
||||||
|
): Promise<void> {
|
||||||
|
const chunkSize = GITHUB_ARTIFACT_SIZE_LIMIT;
|
||||||
|
let currentChunkFiles: string[] = [];
|
||||||
|
let currentChunkSize = 0;
|
||||||
|
let chunkIndex = 0;
|
||||||
|
|
||||||
|
for (const filePath of files) {
|
||||||
|
const fileSize = fs.statSync(filePath).size;
|
||||||
|
|
||||||
|
if (currentChunkSize + fileSize > chunkSize && currentChunkFiles.length > 0) {
|
||||||
|
await ArtifactUploadHandler.uploadSingleChunk(
|
||||||
|
artifactClient,
|
||||||
|
`${baseName}-part${chunkIndex}`,
|
||||||
|
currentChunkFiles,
|
||||||
|
rootDirectory,
|
||||||
|
config,
|
||||||
|
);
|
||||||
|
chunkIndex++;
|
||||||
|
currentChunkFiles = [];
|
||||||
|
currentChunkSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentChunkFiles.push(filePath);
|
||||||
|
currentChunkSize += fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentChunkFiles.length > 0) {
|
||||||
|
await ArtifactUploadHandler.uploadSingleChunk(
|
||||||
|
artifactClient,
|
||||||
|
chunkIndex > 0 ? `${baseName}-part${chunkIndex}` : baseName,
|
||||||
|
currentChunkFiles,
|
||||||
|
rootDirectory,
|
||||||
|
config,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async uploadSingleChunk(
|
||||||
|
artifactClient: any,
|
||||||
|
name: string,
|
||||||
|
files: string[],
|
||||||
|
rootDirectory: string,
|
||||||
|
config: ArtifactUploadConfig,
|
||||||
|
): Promise<void> {
|
||||||
|
OrchestratorLogger.log(`[ArtifactUpload] Uploading chunk '${name}' with ${files.length} file(s)`);
|
||||||
|
|
||||||
|
if (typeof artifactClient.uploadArtifact === 'function') {
|
||||||
|
await artifactClient.uploadArtifact(name, files, rootDirectory, {
|
||||||
|
retentionDays: config.retentionDays,
|
||||||
|
compressionLevel: config.compression === 'none' ? 0 : 6,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload to remote storage via rclone.
|
||||||
|
*
|
||||||
|
* Validates rclone availability and destination URI format before attempting
|
||||||
|
* the upload. If rclone is not installed, falls back to local copy when a
|
||||||
|
* local-compatible destination is provided, or skips with a clear error.
|
||||||
|
*/
|
||||||
|
private static async uploadToStorage(
|
||||||
|
entry: OutputEntry,
|
||||||
|
resolvedPath: string,
|
||||||
|
config: ArtifactUploadConfig,
|
||||||
|
): Promise<void> {
|
||||||
|
if (!config.destination) {
|
||||||
|
throw new Error('Storage upload requires a destination URI in artifactUploadPath');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate storage URI format before attempting upload
|
||||||
|
if (!isValidStorageUri(config.destination)) {
|
||||||
|
throw new Error(
|
||||||
|
`Invalid storage destination URI: "${config.destination}". ` +
|
||||||
|
'Expected rclone remote format "remoteName:path" (e.g., "s3:my-bucket/artifacts", "gdrive:builds").',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check rclone availability before attempting upload
|
||||||
|
if (!isRcloneAvailable()) {
|
||||||
|
OrchestratorLogger.error(
|
||||||
|
'rclone is not installed or not in PATH. ' +
|
||||||
|
'Install rclone (https://rclone.org/install/) to use storage-based artifact upload. ' +
|
||||||
|
'Falling back to local copy.',
|
||||||
|
);
|
||||||
|
|
||||||
|
// Attempt local copy fallback using the destination as a hint
|
||||||
|
// Strip the remote prefix to get a local-ish path for fallback
|
||||||
|
OrchestratorLogger.logWarning(
|
||||||
|
`[ArtifactUpload] Storage upload skipped for '${entry.type}' — rclone not available`,
|
||||||
|
);
|
||||||
|
throw new Error(
|
||||||
|
'rclone is not installed or not in PATH. ' +
|
||||||
|
'Install rclone from https://rclone.org/install/ to use storage-based artifact upload.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const destination = `${config.destination}/${entry.type}`;
|
||||||
|
|
||||||
|
OrchestratorLogger.log(`[ArtifactUpload] Uploading '${entry.type}' to storage: ${destination}`);
|
||||||
|
|
||||||
|
const args = ['copy', resolvedPath, destination, '--progress'];
|
||||||
|
|
||||||
|
if (config.compression !== 'none') {
|
||||||
|
// rclone doesn't have built-in compression flags for copy;
|
||||||
|
// compression is typically handled by the remote configuration.
|
||||||
|
// Log as informational.
|
||||||
|
OrchestratorLogger.log(
|
||||||
|
`[ArtifactUpload] Note: compression '${config.compression}' is configured at the remote level for rclone`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
await exec('rclone', args);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload to a local path (copy).
|
||||||
|
*/
|
||||||
|
private static async uploadToLocal(
|
||||||
|
entry: OutputEntry,
|
||||||
|
resolvedPath: string,
|
||||||
|
config: ArtifactUploadConfig,
|
||||||
|
): Promise<void> {
|
||||||
|
if (!config.destination) {
|
||||||
|
throw new Error('Local upload requires a destination path in artifactUploadPath');
|
||||||
|
}
|
||||||
|
|
||||||
|
const destination = path.join(config.destination, entry.type);
|
||||||
|
fs.mkdirSync(destination, { recursive: true });
|
||||||
|
|
||||||
|
OrchestratorLogger.log(`[ArtifactUpload] Copying '${entry.type}' to local path: ${destination}`);
|
||||||
|
|
||||||
|
ArtifactUploadHandler.copyRecursive(resolvedPath, destination);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively copy files from source to destination.
|
||||||
|
*/
|
||||||
|
private static copyRecursive(source: string, destination: string): void {
|
||||||
|
const stat = fs.statSync(source);
|
||||||
|
|
||||||
|
if (stat.isDirectory()) {
|
||||||
|
fs.mkdirSync(destination, { recursive: true });
|
||||||
|
const entries = fs.readdirSync(source);
|
||||||
|
for (const entry of entries) {
|
||||||
|
ArtifactUploadHandler.copyRecursive(path.join(source, entry), path.join(destination, entry));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fs.copyFileSync(source, destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Collect all files at a given path (recursively if directory).
|
||||||
|
*/
|
||||||
|
static collectFiles(targetPath: string): string[] {
|
||||||
|
const stat = fs.statSync(targetPath);
|
||||||
|
|
||||||
|
if (!stat.isDirectory()) {
|
||||||
|
return [targetPath];
|
||||||
|
}
|
||||||
|
|
||||||
|
const files: string[] = [];
|
||||||
|
const entries = fs.readdirSync(targetPath, { withFileTypes: true });
|
||||||
|
|
||||||
|
for (const entry of entries) {
|
||||||
|
const fullPath = path.join(targetPath, entry.name);
|
||||||
|
if (entry.isDirectory()) {
|
||||||
|
files.push(...ArtifactUploadHandler.collectFiles(fullPath));
|
||||||
|
} else {
|
||||||
|
files.push(fullPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse an ArtifactUploadConfig from action inputs.
|
||||||
|
*/
|
||||||
|
static parseConfig(
|
||||||
|
target: string,
|
||||||
|
destination: string | undefined,
|
||||||
|
compression: string,
|
||||||
|
retentionDays: string,
|
||||||
|
): ArtifactUploadConfig {
|
||||||
|
const validTargets = ['github-artifacts', 'storage', 'local', 'none'] as const;
|
||||||
|
const resolvedTarget = validTargets.includes(target as any)
|
||||||
|
? (target as ArtifactUploadConfig['target'])
|
||||||
|
: 'github-artifacts';
|
||||||
|
|
||||||
|
const validCompressions = ['none', 'gzip', 'lz4'] as const;
|
||||||
|
const resolvedCompression = validCompressions.includes(compression as any)
|
||||||
|
? (compression as ArtifactUploadConfig['compression'])
|
||||||
|
: 'gzip';
|
||||||
|
|
||||||
|
const parsedRetention = Number.parseInt(retentionDays, 10);
|
||||||
|
const resolvedRetention = Number.isNaN(parsedRetention) || parsedRetention <= 0 ? 30 : parsedRetention;
|
||||||
|
|
||||||
|
return {
|
||||||
|
target: resolvedTarget,
|
||||||
|
destination: destination || undefined,
|
||||||
|
compression: resolvedCompression,
|
||||||
|
retentionDays: resolvedRetention,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
3
src/model/orchestrator/services/output/index.ts
Normal file
3
src/model/orchestrator/services/output/index.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export { OutputManifest, OutputEntry } from './output-manifest';
|
||||||
|
export { OutputTypeRegistry, OutputTypeDefinition } from './output-type-registry';
|
||||||
|
export { OutputService } from './output-service';
|
||||||
41
src/model/orchestrator/services/output/output-manifest.ts
Normal file
41
src/model/orchestrator/services/output/output-manifest.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* Structured build output manifest.
|
||||||
|
* Describes all artifacts produced by a build with type, path, size, hash, and metadata.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface OutputEntry {
|
||||||
|
/** Output type identifier (e.g., 'build', 'test-results', 'images') */
|
||||||
|
type: string;
|
||||||
|
|
||||||
|
/** Relative path to the output */
|
||||||
|
path: string;
|
||||||
|
|
||||||
|
/** Output format (e.g., 'nunit3', 'junit', 'json') */
|
||||||
|
format?: string;
|
||||||
|
|
||||||
|
/** File size in bytes */
|
||||||
|
size?: number;
|
||||||
|
|
||||||
|
/** Content hash (e.g., 'sha256:abc...') */
|
||||||
|
hash?: string;
|
||||||
|
|
||||||
|
/** Individual files within the output path */
|
||||||
|
files?: string[];
|
||||||
|
|
||||||
|
/** Type-specific summary (e.g., test counts, build size) */
|
||||||
|
summary?: Record<string, unknown>;
|
||||||
|
|
||||||
|
/** Arbitrary metadata */
|
||||||
|
metadata?: Record<string, unknown>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OutputManifest {
|
||||||
|
/** Unique build identifier */
|
||||||
|
buildGuid: string;
|
||||||
|
|
||||||
|
/** ISO 8601 timestamp */
|
||||||
|
timestamp: string;
|
||||||
|
|
||||||
|
/** All outputs produced by this build */
|
||||||
|
outputs: OutputEntry[];
|
||||||
|
}
|
||||||
118
src/model/orchestrator/services/output/output-service.ts
Normal file
118
src/model/orchestrator/services/output/output-service.ts
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
import fs from 'node:fs';
|
||||||
|
import path from 'node:path';
|
||||||
|
import OrchestratorLogger from '../core/orchestrator-logger';
|
||||||
|
import { OutputManifest, OutputEntry } from './output-manifest';
|
||||||
|
import { OutputTypeRegistry } from './output-type-registry';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Service for collecting, manifesting, and managing build outputs.
|
||||||
|
*
|
||||||
|
* After a build completes, this service scans declared output paths,
|
||||||
|
* generates a structured manifest, and prepares outputs for post-processing.
|
||||||
|
*/
|
||||||
|
export class OutputService {
|
||||||
|
/**
|
||||||
|
* Collect outputs from the workspace and generate a manifest.
|
||||||
|
*
|
||||||
|
* @param projectPath - Path to the Unity project root
|
||||||
|
* @param buildGuid - Unique build identifier
|
||||||
|
* @param outputTypesInput - Comma-separated output type names
|
||||||
|
* @param manifestPath - Where to write the manifest JSON (optional)
|
||||||
|
* @returns The generated output manifest
|
||||||
|
*/
|
||||||
|
static async collectOutputs(
|
||||||
|
projectPath: string,
|
||||||
|
buildGuid: string,
|
||||||
|
outputTypesInput: string,
|
||||||
|
manifestPath?: string,
|
||||||
|
): Promise<OutputManifest> {
|
||||||
|
const types = OutputTypeRegistry.parseOutputTypes(outputTypesInput);
|
||||||
|
const manifest: OutputManifest = {
|
||||||
|
buildGuid,
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
outputs: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
if (types.length === 0) {
|
||||||
|
OrchestratorLogger.log('[Output] No output types declared, skipping collection');
|
||||||
|
|
||||||
|
return manifest;
|
||||||
|
}
|
||||||
|
|
||||||
|
OrchestratorLogger.log(
|
||||||
|
`[Output] Collecting ${types.length} output type(s): ${types.map((t) => t.name).join(', ')}`,
|
||||||
|
);
|
||||||
|
|
||||||
|
for (const typeDef of types) {
|
||||||
|
const outputPath = path.join(
|
||||||
|
projectPath,
|
||||||
|
typeDef.defaultPath.replace('{platform}', process.env.BUILD_TARGET || 'Unknown'),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!fs.existsSync(outputPath)) {
|
||||||
|
OrchestratorLogger.log(`[Output] No output found for '${typeDef.name}' at ${outputPath}`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const entry: OutputEntry = {
|
||||||
|
type: typeDef.name,
|
||||||
|
path: typeDef.defaultPath,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Collect file listing for directory outputs
|
||||||
|
try {
|
||||||
|
const stat = fs.statSync(outputPath);
|
||||||
|
if (stat.isDirectory()) {
|
||||||
|
entry.files = fs.readdirSync(outputPath);
|
||||||
|
entry.size = OutputService.getDirectorySize(outputPath);
|
||||||
|
} else {
|
||||||
|
entry.size = stat.size;
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
OrchestratorLogger.logWarning(`[Output] Failed to stat output '${typeDef.name}' at ${outputPath}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
manifest.outputs.push(entry);
|
||||||
|
OrchestratorLogger.log(
|
||||||
|
`[Output] Collected '${typeDef.name}': ${entry.files?.length || 1} file(s), ${entry.size || 0} bytes`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write manifest to disk
|
||||||
|
if (manifestPath) {
|
||||||
|
try {
|
||||||
|
const manifestDir = path.dirname(manifestPath);
|
||||||
|
fs.mkdirSync(manifestDir, { recursive: true });
|
||||||
|
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), 'utf8');
|
||||||
|
OrchestratorLogger.log(`[Output] Manifest written to ${manifestPath}`);
|
||||||
|
} catch (error: any) {
|
||||||
|
OrchestratorLogger.logWarning(`[Output] Failed to write manifest: ${error.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return manifest;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate total size of a directory recursively.
|
||||||
|
*/
|
||||||
|
private static getDirectorySize(dirPath: string): number {
|
||||||
|
let totalSize = 0;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
||||||
|
for (const entry of entries) {
|
||||||
|
const fullPath = path.join(dirPath, entry.name);
|
||||||
|
if (entry.isDirectory()) {
|
||||||
|
totalSize += OutputService.getDirectorySize(fullPath);
|
||||||
|
} else {
|
||||||
|
totalSize += fs.statSync(fullPath).size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// Ignore errors in size calculation
|
||||||
|
}
|
||||||
|
|
||||||
|
return totalSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
136
src/model/orchestrator/services/output/output-type-registry.ts
Normal file
136
src/model/orchestrator/services/output/output-type-registry.ts
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
import OrchestratorLogger from '../core/orchestrator-logger';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registry of known output types with default paths and processing hints.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface OutputTypeDefinition {
|
||||||
|
/** Type identifier */
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
/** Default output path (relative to project root) */
|
||||||
|
defaultPath: string;
|
||||||
|
|
||||||
|
/** Human-readable description */
|
||||||
|
description: string;
|
||||||
|
|
||||||
|
/** Whether this type is built-in or user-registered */
|
||||||
|
builtIn: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class OutputTypeRegistry {
|
||||||
|
private static readonly builtInTypes: Record<string, OutputTypeDefinition> = {
|
||||||
|
build: {
|
||||||
|
name: 'build',
|
||||||
|
defaultPath: './Builds/{platform}/',
|
||||||
|
description: 'Standard game build artifact',
|
||||||
|
builtIn: true,
|
||||||
|
},
|
||||||
|
'test-results': {
|
||||||
|
name: 'test-results',
|
||||||
|
defaultPath: './TestResults/',
|
||||||
|
description: 'NUnit/JUnit XML test results',
|
||||||
|
builtIn: true,
|
||||||
|
},
|
||||||
|
'server-build': {
|
||||||
|
name: 'server-build',
|
||||||
|
defaultPath: './Builds/{platform}-server/',
|
||||||
|
description: 'Dedicated server build artifact',
|
||||||
|
builtIn: true,
|
||||||
|
},
|
||||||
|
'data-export': {
|
||||||
|
name: 'data-export',
|
||||||
|
defaultPath: './Exports/',
|
||||||
|
description: 'Exported data files (CSV, JSON, binary)',
|
||||||
|
builtIn: true,
|
||||||
|
},
|
||||||
|
images: {
|
||||||
|
name: 'images',
|
||||||
|
defaultPath: './Captures/',
|
||||||
|
description: 'Screenshots, render captures, atlas previews',
|
||||||
|
builtIn: true,
|
||||||
|
},
|
||||||
|
logs: {
|
||||||
|
name: 'logs',
|
||||||
|
defaultPath: './Logs/',
|
||||||
|
description: 'Structured build and test logs',
|
||||||
|
builtIn: true,
|
||||||
|
},
|
||||||
|
metrics: {
|
||||||
|
name: 'metrics',
|
||||||
|
defaultPath: './Metrics/',
|
||||||
|
description: 'Build performance metrics and asset statistics',
|
||||||
|
builtIn: true,
|
||||||
|
},
|
||||||
|
coverage: {
|
||||||
|
name: 'coverage',
|
||||||
|
defaultPath: './Coverage/',
|
||||||
|
description: 'Code coverage reports',
|
||||||
|
builtIn: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
private static customTypes: Record<string, OutputTypeDefinition> = {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a type definition by name. Checks custom types first, then built-in.
|
||||||
|
*/
|
||||||
|
static getType(name: string): OutputTypeDefinition | undefined {
|
||||||
|
return OutputTypeRegistry.customTypes[name] || OutputTypeRegistry.builtInTypes[name];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all registered types (built-in + custom).
|
||||||
|
*/
|
||||||
|
static getAllTypes(): OutputTypeDefinition[] {
|
||||||
|
return [...Object.values(OutputTypeRegistry.builtInTypes), ...Object.values(OutputTypeRegistry.customTypes)];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register a custom output type.
|
||||||
|
*/
|
||||||
|
static registerType(definition: OutputTypeDefinition): void {
|
||||||
|
if (OutputTypeRegistry.builtInTypes[definition.name]) {
|
||||||
|
OrchestratorLogger.logWarning(`[OutputTypes] Cannot override built-in type '${definition.name}'`);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
OutputTypeRegistry.customTypes[definition.name] = { ...definition, builtIn: false };
|
||||||
|
OrchestratorLogger.log(`[OutputTypes] Registered custom type '${definition.name}'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse a comma-separated output types string into type definitions.
|
||||||
|
* Unknown types are logged as warnings and skipped.
|
||||||
|
*/
|
||||||
|
static parseOutputTypes(outputTypesInput: string): OutputTypeDefinition[] {
|
||||||
|
if (!outputTypesInput) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
const names = outputTypesInput
|
||||||
|
.split(',')
|
||||||
|
.map((s) => s.trim())
|
||||||
|
.filter(Boolean);
|
||||||
|
const types: OutputTypeDefinition[] = [];
|
||||||
|
|
||||||
|
for (const name of names) {
|
||||||
|
const typeDef = OutputTypeRegistry.getType(name);
|
||||||
|
if (typeDef) {
|
||||||
|
types.push(typeDef);
|
||||||
|
} else {
|
||||||
|
OrchestratorLogger.logWarning(`[OutputTypes] Unknown output type '${name}', skipping`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return types;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset custom types (for testing).
|
||||||
|
*/
|
||||||
|
static resetCustomTypes(): void {
|
||||||
|
OutputTypeRegistry.customTypes = {};
|
||||||
|
}
|
||||||
|
}
|
||||||
420
yarn.lock
420
yarn.lock
@@ -1006,15 +1006,6 @@
|
|||||||
eslint-visitor-keys "^2.1.0"
|
eslint-visitor-keys "^2.1.0"
|
||||||
semver "^6.3.1"
|
semver "^6.3.1"
|
||||||
|
|
||||||
"@babel/generator@7.18.2":
|
|
||||||
version "7.18.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d"
|
|
||||||
integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==
|
|
||||||
dependencies:
|
|
||||||
"@babel/types" "^7.18.2"
|
|
||||||
"@jridgewell/gen-mapping" "^0.3.0"
|
|
||||||
jsesc "^2.5.1"
|
|
||||||
|
|
||||||
"@babel/generator@^7.22.10", "@babel/generator@^7.7.2":
|
"@babel/generator@^7.22.10", "@babel/generator@^7.7.2":
|
||||||
version "7.22.10"
|
version "7.22.10"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722"
|
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722"
|
||||||
@@ -1108,21 +1099,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@babel/types" "^7.22.5"
|
"@babel/types" "^7.22.5"
|
||||||
|
|
||||||
"@babel/helper-string-parser@^7.18.10", "@babel/helper-string-parser@^7.27.1":
|
|
||||||
version "7.27.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
|
|
||||||
integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==
|
|
||||||
|
|
||||||
"@babel/helper-string-parser@^7.22.5":
|
"@babel/helper-string-parser@^7.22.5":
|
||||||
version "7.22.5"
|
version "7.22.5"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f"
|
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f"
|
||||||
integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==
|
integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==
|
||||||
|
|
||||||
"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.28.5":
|
|
||||||
version "7.28.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4"
|
|
||||||
integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==
|
|
||||||
|
|
||||||
"@babel/helper-validator-identifier@^7.22.20":
|
"@babel/helper-validator-identifier@^7.22.20":
|
||||||
version "7.22.20"
|
version "7.22.20"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
|
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
|
||||||
@@ -1165,11 +1146,6 @@
|
|||||||
chalk "^2.4.2"
|
chalk "^2.4.2"
|
||||||
js-tokens "^4.0.0"
|
js-tokens "^4.0.0"
|
||||||
|
|
||||||
"@babel/parser@7.18.4":
|
|
||||||
version "7.18.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef"
|
|
||||||
integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==
|
|
||||||
|
|
||||||
"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5":
|
"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5":
|
||||||
version "7.22.10"
|
version "7.22.10"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55"
|
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55"
|
||||||
@@ -1312,15 +1288,6 @@
|
|||||||
debug "^4.1.0"
|
debug "^4.1.0"
|
||||||
globals "^11.1.0"
|
globals "^11.1.0"
|
||||||
|
|
||||||
"@babel/types@7.19.0":
|
|
||||||
version "7.19.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600"
|
|
||||||
integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==
|
|
||||||
dependencies:
|
|
||||||
"@babel/helper-string-parser" "^7.18.10"
|
|
||||||
"@babel/helper-validator-identifier" "^7.18.6"
|
|
||||||
to-fast-properties "^2.0.0"
|
|
||||||
|
|
||||||
"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.3.3":
|
"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.3.3":
|
||||||
version "7.22.10"
|
version "7.22.10"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03"
|
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03"
|
||||||
@@ -1330,14 +1297,6 @@
|
|||||||
"@babel/helper-validator-identifier" "^7.22.5"
|
"@babel/helper-validator-identifier" "^7.22.5"
|
||||||
to-fast-properties "^2.0.0"
|
to-fast-properties "^2.0.0"
|
||||||
|
|
||||||
"@babel/types@^7.18.2":
|
|
||||||
version "7.29.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.0.tgz#9f5b1e838c446e72cf3cd4b918152b8c605e37c7"
|
|
||||||
integrity sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==
|
|
||||||
dependencies:
|
|
||||||
"@babel/helper-string-parser" "^7.27.1"
|
|
||||||
"@babel/helper-validator-identifier" "^7.28.5"
|
|
||||||
|
|
||||||
"@babel/types@^7.22.15", "@babel/types@^7.23.0":
|
"@babel/types@^7.22.15", "@babel/types@^7.23.0":
|
||||||
version "7.23.0"
|
version "7.23.0"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb"
|
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb"
|
||||||
@@ -2708,13 +2667,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/yargs-parser" "*"
|
"@types/yargs-parser" "*"
|
||||||
|
|
||||||
"@types/yargs@^17.0.35":
|
|
||||||
version "17.0.35"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.35.tgz#07013e46aa4d7d7d50a49e15604c1c5340d4eb24"
|
|
||||||
integrity sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==
|
|
||||||
dependencies:
|
|
||||||
"@types/yargs-parser" "*"
|
|
||||||
|
|
||||||
"@types/yarnpkg__lockfile@^1.1.6":
|
"@types/yarnpkg__lockfile@^1.1.6":
|
||||||
version "1.1.6"
|
version "1.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.6.tgz#60a35ede6197d8cbedd5bb8393f3921e8d56d44b"
|
resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.6.tgz#60a35ede6197d8cbedd5bb8393f3921e8d56d44b"
|
||||||
@@ -3163,11 +3115,6 @@ asynckit@^0.4.0:
|
|||||||
resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
|
resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
|
||||||
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
|
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
|
||||||
|
|
||||||
at-least-node@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
|
|
||||||
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
|
|
||||||
|
|
||||||
available-typed-arrays@^1.0.5:
|
available-typed-arrays@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
|
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
|
||||||
@@ -3282,7 +3229,7 @@ base-64@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/base-64/-/base-64-1.0.0.tgz#09d0f2084e32a3fd08c2475b973788eee6ae8f4a"
|
resolved "https://registry.yarnpkg.com/base-64/-/base-64-1.0.0.tgz#09d0f2084e32a3fd08c2475b973788eee6ae8f4a"
|
||||||
integrity sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==
|
integrity sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==
|
||||||
|
|
||||||
base64-js@^1.0.2, base64-js@^1.3.1:
|
base64-js@^1.0.2:
|
||||||
version "1.5.1"
|
version "1.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||||
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||||
@@ -3330,15 +3277,6 @@ big-integer@^1.6.44:
|
|||||||
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
|
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
|
||||||
integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
|
integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
|
||||||
|
|
||||||
bl@^4.0.3:
|
|
||||||
version "4.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
|
|
||||||
integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==
|
|
||||||
dependencies:
|
|
||||||
buffer "^5.5.0"
|
|
||||||
inherits "^2.0.4"
|
|
||||||
readable-stream "^3.4.0"
|
|
||||||
|
|
||||||
bowser@^2.11.0:
|
bowser@^2.11.0:
|
||||||
version "2.11.0"
|
version "2.11.0"
|
||||||
resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f"
|
resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f"
|
||||||
@@ -3409,14 +3347,6 @@ buffer@4.9.2:
|
|||||||
ieee754 "^1.1.4"
|
ieee754 "^1.1.4"
|
||||||
isarray "^1.0.0"
|
isarray "^1.0.0"
|
||||||
|
|
||||||
buffer@^5.5.0:
|
|
||||||
version "5.7.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
|
|
||||||
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
|
|
||||||
dependencies:
|
|
||||||
base64-js "^1.3.1"
|
|
||||||
ieee754 "^1.1.13"
|
|
||||||
|
|
||||||
bundle-name@^3.0.0:
|
bundle-name@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a"
|
resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a"
|
||||||
@@ -3510,7 +3440,7 @@ chalk@^2.4.2:
|
|||||||
escape-string-regexp "^1.0.5"
|
escape-string-regexp "^1.0.5"
|
||||||
supports-color "^5.3.0"
|
supports-color "^5.3.0"
|
||||||
|
|
||||||
chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
|
chalk@^4.0.0, chalk@^4.1.0:
|
||||||
version "4.1.2"
|
version "4.1.2"
|
||||||
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
|
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
|
||||||
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
||||||
@@ -3533,11 +3463,6 @@ charenc@0.0.2:
|
|||||||
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
|
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
|
||||||
integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==
|
integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==
|
||||||
|
|
||||||
chownr@^1.1.1:
|
|
||||||
version "1.1.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
|
|
||||||
integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
|
|
||||||
|
|
||||||
chownr@^2.0.0:
|
chownr@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz"
|
resolved "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz"
|
||||||
@@ -3579,15 +3504,6 @@ cliui@^7.0.2:
|
|||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
wrap-ansi "^7.0.0"
|
wrap-ansi "^7.0.0"
|
||||||
|
|
||||||
cliui@^8.0.1:
|
|
||||||
version "8.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
|
|
||||||
integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
|
|
||||||
dependencies:
|
|
||||||
string-width "^4.2.0"
|
|
||||||
strip-ansi "^6.0.1"
|
|
||||||
wrap-ansi "^7.0.0"
|
|
||||||
|
|
||||||
clone-response@^1.0.2:
|
clone-response@^1.0.2:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3"
|
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3"
|
||||||
@@ -3698,11 +3614,6 @@ core-util-is@1.0.2:
|
|||||||
resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
|
resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
|
||||||
integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==
|
integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==
|
||||||
|
|
||||||
core-util-is@~1.0.0:
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
|
|
||||||
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
|
|
||||||
|
|
||||||
create-require@^1.1.0:
|
create-require@^1.1.0:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz"
|
resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz"
|
||||||
@@ -3821,11 +3732,6 @@ dedent@^0.7.0:
|
|||||||
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
|
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
|
||||||
integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==
|
integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==
|
||||||
|
|
||||||
deep-extend@^0.6.0:
|
|
||||||
version "0.6.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
|
||||||
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
|
|
||||||
|
|
||||||
deep-is@^0.1.3:
|
deep-is@^0.1.3:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz"
|
resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz"
|
||||||
@@ -3897,11 +3803,6 @@ dequal@^2.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be"
|
resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be"
|
||||||
integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==
|
integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==
|
||||||
|
|
||||||
detect-libc@^2.0.0:
|
|
||||||
version "2.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.2.tgz#689c5dcdc1900ef5583a4cb9f6d7b473742074ad"
|
|
||||||
integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==
|
|
||||||
|
|
||||||
detect-newline@^3.0.0:
|
detect-newline@^3.0.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
||||||
@@ -3998,13 +3899,6 @@ end-of-stream@^1.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
once "^1.4.0"
|
once "^1.4.0"
|
||||||
|
|
||||||
end-of-stream@^1.4.1:
|
|
||||||
version "1.4.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.5.tgz#7344d711dea40e0b74abc2ed49778743ccedb08c"
|
|
||||||
integrity sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==
|
|
||||||
dependencies:
|
|
||||||
once "^1.4.0"
|
|
||||||
|
|
||||||
enquirer@^2.3.5:
|
enquirer@^2.3.5:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56"
|
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56"
|
||||||
@@ -4504,11 +4398,6 @@ exit@^0.1.2:
|
|||||||
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
|
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
|
||||||
integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==
|
integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==
|
||||||
|
|
||||||
expand-template@^2.0.3:
|
|
||||||
version "2.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
|
|
||||||
integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==
|
|
||||||
|
|
||||||
expect@^27.5.1:
|
expect@^27.5.1:
|
||||||
version "27.5.1"
|
version "27.5.1"
|
||||||
resolved "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz"
|
resolved "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz"
|
||||||
@@ -4692,19 +4581,6 @@ form-data@~2.3.2:
|
|||||||
combined-stream "^1.0.6"
|
combined-stream "^1.0.6"
|
||||||
mime-types "^2.1.12"
|
mime-types "^2.1.12"
|
||||||
|
|
||||||
from2@^2.3.0:
|
|
||||||
version "2.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
|
|
||||||
integrity sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==
|
|
||||||
dependencies:
|
|
||||||
inherits "^2.0.1"
|
|
||||||
readable-stream "^2.0.0"
|
|
||||||
|
|
||||||
fs-constants@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
|
||||||
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
|
|
||||||
|
|
||||||
fs-extra@^11.1.1:
|
fs-extra@^11.1.1:
|
||||||
version "11.1.1"
|
version "11.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d"
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d"
|
||||||
@@ -4714,16 +4590,6 @@ fs-extra@^11.1.1:
|
|||||||
jsonfile "^6.0.1"
|
jsonfile "^6.0.1"
|
||||||
universalify "^2.0.0"
|
universalify "^2.0.0"
|
||||||
|
|
||||||
fs-extra@^9.1.0:
|
|
||||||
version "9.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
|
|
||||||
integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==
|
|
||||||
dependencies:
|
|
||||||
at-least-node "^1.0.0"
|
|
||||||
graceful-fs "^4.2.0"
|
|
||||||
jsonfile "^6.0.1"
|
|
||||||
universalify "^2.0.0"
|
|
||||||
|
|
||||||
fs-minipass@^2.0.0:
|
fs-minipass@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz"
|
resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz"
|
||||||
@@ -4746,11 +4612,6 @@ function-bind@^1.1.1:
|
|||||||
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
|
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
|
||||||
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
|
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
|
||||||
|
|
||||||
function-bind@^1.1.2:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
|
|
||||||
integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
|
|
||||||
|
|
||||||
function.prototype.name@^1.1.5:
|
function.prototype.name@^1.1.5:
|
||||||
version "1.1.5"
|
version "1.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621"
|
resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621"
|
||||||
@@ -4830,11 +4691,6 @@ getpass@^0.1.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
assert-plus "^1.0.0"
|
assert-plus "^1.0.0"
|
||||||
|
|
||||||
github-from-package@0.0.0:
|
|
||||||
version "0.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
|
|
||||||
integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==
|
|
||||||
|
|
||||||
glob-parent@^5.1.2:
|
glob-parent@^5.1.2:
|
||||||
version "5.1.2"
|
version "5.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
||||||
@@ -5019,13 +4875,6 @@ has@^1.0.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
function-bind "^1.1.1"
|
function-bind "^1.1.1"
|
||||||
|
|
||||||
hasown@^2.0.2:
|
|
||||||
version "2.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
|
|
||||||
integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
|
|
||||||
dependencies:
|
|
||||||
function-bind "^1.1.2"
|
|
||||||
|
|
||||||
hosted-git-info@^2.1.4:
|
hosted-git-info@^2.1.4:
|
||||||
version "2.8.9"
|
version "2.8.9"
|
||||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
|
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
|
||||||
@@ -5104,7 +4953,7 @@ ieee754@1.1.13:
|
|||||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
|
||||||
integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
|
integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
|
||||||
|
|
||||||
ieee754@^1.1.13, ieee754@^1.1.4:
|
ieee754@^1.1.4:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||||
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
||||||
@@ -5158,16 +5007,11 @@ inflight@^1.0.4:
|
|||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
wrappy "1"
|
wrappy "1"
|
||||||
|
|
||||||
inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
|
inherits@2, inherits@^2.0.3:
|
||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
|
resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
|
||||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||||
|
|
||||||
ini@~1.3.0:
|
|
||||||
version "1.3.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
|
||||||
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
|
|
||||||
|
|
||||||
internal-slot@^1.0.5:
|
internal-slot@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986"
|
resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986"
|
||||||
@@ -5182,14 +5026,6 @@ interpret@^1.0.0:
|
|||||||
resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz"
|
resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz"
|
||||||
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
||||||
|
|
||||||
into-stream@^6.0.0:
|
|
||||||
version "6.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-6.0.0.tgz#4bfc1244c0128224e18b8870e85b2de8e66c6702"
|
|
||||||
integrity sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==
|
|
||||||
dependencies:
|
|
||||||
from2 "^2.3.0"
|
|
||||||
p-is-promise "^3.0.0"
|
|
||||||
|
|
||||||
is-arguments@^1.0.4:
|
is-arguments@^1.0.4:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b"
|
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b"
|
||||||
@@ -5237,13 +5073,6 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
|
|||||||
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
|
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
|
||||||
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
|
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
|
||||||
|
|
||||||
is-core-module@2.9.0:
|
|
||||||
version "2.9.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69"
|
|
||||||
integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==
|
|
||||||
dependencies:
|
|
||||||
has "^1.0.3"
|
|
||||||
|
|
||||||
is-core-module@^2.12.1, is-core-module@^2.13.0:
|
is-core-module@^2.12.1, is-core-module@^2.13.0:
|
||||||
version "2.13.0"
|
version "2.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db"
|
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db"
|
||||||
@@ -5251,13 +5080,6 @@ is-core-module@^2.12.1, is-core-module@^2.13.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
has "^1.0.3"
|
has "^1.0.3"
|
||||||
|
|
||||||
is-core-module@^2.16.1:
|
|
||||||
version "2.16.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4"
|
|
||||||
integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==
|
|
||||||
dependencies:
|
|
||||||
hasown "^2.0.2"
|
|
||||||
|
|
||||||
is-date-object@^1.0.1:
|
is-date-object@^1.0.1:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f"
|
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f"
|
||||||
@@ -5413,7 +5235,7 @@ is-wsl@^2.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-docker "^2.0.0"
|
is-docker "^2.0.0"
|
||||||
|
|
||||||
isarray@^1.0.0, isarray@~1.0.0:
|
isarray@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==
|
integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==
|
||||||
@@ -6375,7 +6197,7 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.1.7"
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6:
|
minimist@^1.2.0, minimist@^1.2.6:
|
||||||
version "1.2.8"
|
version "1.2.8"
|
||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
|
||||||
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
||||||
@@ -6405,11 +6227,6 @@ minizlib@^2.1.1:
|
|||||||
minipass "^3.0.0"
|
minipass "^3.0.0"
|
||||||
yallist "^4.0.0"
|
yallist "^4.0.0"
|
||||||
|
|
||||||
mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3:
|
|
||||||
version "0.5.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
|
|
||||||
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==
|
|
||||||
|
|
||||||
mkdirp@^1.0.3:
|
mkdirp@^1.0.3:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
|
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
|
||||||
@@ -6430,24 +6247,11 @@ multimap@^1.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/multimap/-/multimap-1.1.0.tgz#5263febc085a1791c33b59bb3afc6a76a2a10ca8"
|
resolved "https://registry.yarnpkg.com/multimap/-/multimap-1.1.0.tgz#5263febc085a1791c33b59bb3afc6a76a2a10ca8"
|
||||||
integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==
|
integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==
|
||||||
|
|
||||||
multistream@^4.1.0:
|
|
||||||
version "4.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/multistream/-/multistream-4.1.0.tgz#7bf00dfd119556fbc153cff3de4c6d477909f5a8"
|
|
||||||
integrity sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==
|
|
||||||
dependencies:
|
|
||||||
once "^1.4.0"
|
|
||||||
readable-stream "^3.6.0"
|
|
||||||
|
|
||||||
nanoid@^3.3.1:
|
nanoid@^3.3.1:
|
||||||
version "3.3.6"
|
version "3.3.6"
|
||||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
|
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
|
||||||
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
|
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
|
||||||
|
|
||||||
napi-build-utils@^1.0.1:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
|
|
||||||
integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==
|
|
||||||
|
|
||||||
natural-compare@^1.4.0:
|
natural-compare@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||||
@@ -6468,14 +6272,7 @@ no-case@^3.0.4:
|
|||||||
lower-case "^2.0.2"
|
lower-case "^2.0.2"
|
||||||
tslib "^2.0.3"
|
tslib "^2.0.3"
|
||||||
|
|
||||||
node-abi@^3.3.0:
|
node-fetch@2:
|
||||||
version "3.87.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.87.0.tgz#423e28fea5c2f195fddd98acded9938c001ae6dd"
|
|
||||||
integrity sha512-+CGM1L1CgmtheLcBuleyYOn7NWPVu0s0EJH2C4puxgEZb9h8QpR9G2dBfZJOAUhi7VQxuBPMd0hiISWcTyiYyQ==
|
|
||||||
dependencies:
|
|
||||||
semver "^7.3.5"
|
|
||||||
|
|
||||||
node-fetch@2, node-fetch@^2.6.6, node-fetch@^2.7.0:
|
|
||||||
version "2.7.0"
|
version "2.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
||||||
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
|
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
|
||||||
@@ -6489,6 +6286,13 @@ node-fetch@^2.6.7:
|
|||||||
dependencies:
|
dependencies:
|
||||||
whatwg-url "^5.0.0"
|
whatwg-url "^5.0.0"
|
||||||
|
|
||||||
|
node-fetch@^2.7.0:
|
||||||
|
version "2.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
||||||
|
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
|
||||||
|
dependencies:
|
||||||
|
whatwg-url "^5.0.0"
|
||||||
|
|
||||||
node-int64@^0.4.0:
|
node-int64@^0.4.0:
|
||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
||||||
@@ -6704,11 +6508,6 @@ p-cancelable@^2.0.0:
|
|||||||
resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz"
|
resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz"
|
||||||
integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==
|
integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==
|
||||||
|
|
||||||
p-is-promise@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-3.0.0.tgz#58e78c7dfe2e163cf2a04ff869e7c1dba64a5971"
|
|
||||||
integrity sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==
|
|
||||||
|
|
||||||
p-limit@^2.2.0:
|
p-limit@^2.2.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
|
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
|
||||||
@@ -6854,63 +6653,11 @@ pkg-dir@^7.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
find-up "^6.3.0"
|
find-up "^6.3.0"
|
||||||
|
|
||||||
pkg-fetch@3.4.2:
|
|
||||||
version "3.4.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.4.2.tgz#6f68ebc54842b73f8c0808959a9df3739dcb28b7"
|
|
||||||
integrity sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA==
|
|
||||||
dependencies:
|
|
||||||
chalk "^4.1.2"
|
|
||||||
fs-extra "^9.1.0"
|
|
||||||
https-proxy-agent "^5.0.0"
|
|
||||||
node-fetch "^2.6.6"
|
|
||||||
progress "^2.0.3"
|
|
||||||
semver "^7.3.5"
|
|
||||||
tar-fs "^2.1.1"
|
|
||||||
yargs "^16.2.0"
|
|
||||||
|
|
||||||
pkg@^5.8.1:
|
|
||||||
version "5.8.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.8.1.tgz#862020f3c0575638ef7d1146f951a54d65ddc984"
|
|
||||||
integrity sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA==
|
|
||||||
dependencies:
|
|
||||||
"@babel/generator" "7.18.2"
|
|
||||||
"@babel/parser" "7.18.4"
|
|
||||||
"@babel/types" "7.19.0"
|
|
||||||
chalk "^4.1.2"
|
|
||||||
fs-extra "^9.1.0"
|
|
||||||
globby "^11.1.0"
|
|
||||||
into-stream "^6.0.0"
|
|
||||||
is-core-module "2.9.0"
|
|
||||||
minimist "^1.2.6"
|
|
||||||
multistream "^4.1.0"
|
|
||||||
pkg-fetch "3.4.2"
|
|
||||||
prebuild-install "7.1.1"
|
|
||||||
resolve "^1.22.0"
|
|
||||||
stream-meter "^1.0.4"
|
|
||||||
|
|
||||||
pluralize@^8.0.0:
|
pluralize@^8.0.0:
|
||||||
version "8.0.0"
|
version "8.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
|
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
|
||||||
integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==
|
integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==
|
||||||
|
|
||||||
prebuild-install@7.1.1:
|
|
||||||
version "7.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45"
|
|
||||||
integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==
|
|
||||||
dependencies:
|
|
||||||
detect-libc "^2.0.0"
|
|
||||||
expand-template "^2.0.3"
|
|
||||||
github-from-package "0.0.0"
|
|
||||||
minimist "^1.2.3"
|
|
||||||
mkdirp-classic "^0.5.3"
|
|
||||||
napi-build-utils "^1.0.1"
|
|
||||||
node-abi "^3.3.0"
|
|
||||||
pump "^3.0.0"
|
|
||||||
rc "^1.2.7"
|
|
||||||
simple-get "^4.0.0"
|
|
||||||
tar-fs "^2.0.0"
|
|
||||||
tunnel-agent "^0.6.0"
|
|
||||||
|
|
||||||
prelude-ls@^1.2.1:
|
prelude-ls@^1.2.1:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
|
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
|
||||||
@@ -6947,17 +6694,12 @@ pretty-format@^27.0.0, pretty-format@^27.5.1:
|
|||||||
ansi-styles "^5.0.0"
|
ansi-styles "^5.0.0"
|
||||||
react-is "^17.0.1"
|
react-is "^17.0.1"
|
||||||
|
|
||||||
process-nextick-args@~2.0.0:
|
|
||||||
version "2.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
|
||||||
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
|
||||||
|
|
||||||
process@^0.11.10:
|
process@^0.11.10:
|
||||||
version "0.11.10"
|
version "0.11.10"
|
||||||
resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz"
|
resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz"
|
||||||
integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
|
integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
|
||||||
|
|
||||||
progress@^2.0.0, progress@^2.0.3:
|
progress@^2.0.0:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
|
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
|
||||||
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
||||||
@@ -7030,16 +6772,6 @@ quick-lru@^5.1.1:
|
|||||||
resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz"
|
resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz"
|
||||||
integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==
|
integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==
|
||||||
|
|
||||||
rc@^1.2.7:
|
|
||||||
version "1.2.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
|
|
||||||
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
|
|
||||||
dependencies:
|
|
||||||
deep-extend "^0.6.0"
|
|
||||||
ini "~1.3.0"
|
|
||||||
minimist "^1.2.0"
|
|
||||||
strip-json-comments "~2.0.1"
|
|
||||||
|
|
||||||
react-is@^17.0.1:
|
react-is@^17.0.1:
|
||||||
version "17.0.2"
|
version "17.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
|
||||||
@@ -7064,28 +6796,6 @@ read-pkg@^5.2.0:
|
|||||||
parse-json "^5.0.0"
|
parse-json "^5.0.0"
|
||||||
type-fest "^0.6.0"
|
type-fest "^0.6.0"
|
||||||
|
|
||||||
readable-stream@^2.0.0, readable-stream@^2.1.4:
|
|
||||||
version "2.3.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b"
|
|
||||||
integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==
|
|
||||||
dependencies:
|
|
||||||
core-util-is "~1.0.0"
|
|
||||||
inherits "~2.0.3"
|
|
||||||
isarray "~1.0.0"
|
|
||||||
process-nextick-args "~2.0.0"
|
|
||||||
safe-buffer "~5.1.1"
|
|
||||||
string_decoder "~1.1.1"
|
|
||||||
util-deprecate "~1.0.1"
|
|
||||||
|
|
||||||
readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0:
|
|
||||||
version "3.6.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
|
|
||||||
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
|
|
||||||
dependencies:
|
|
||||||
inherits "^2.0.3"
|
|
||||||
string_decoder "^1.1.1"
|
|
||||||
util-deprecate "^1.0.1"
|
|
||||||
|
|
||||||
rechoir@^0.6.2:
|
rechoir@^0.6.2:
|
||||||
version "0.6.2"
|
version "0.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||||
@@ -7204,15 +6914,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.3, resolve@^1.22
|
|||||||
path-parse "^1.0.7"
|
path-parse "^1.0.7"
|
||||||
supports-preserve-symlinks-flag "^1.0.0"
|
supports-preserve-symlinks-flag "^1.0.0"
|
||||||
|
|
||||||
resolve@^1.22.0:
|
|
||||||
version "1.22.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262"
|
|
||||||
integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==
|
|
||||||
dependencies:
|
|
||||||
is-core-module "^2.16.1"
|
|
||||||
path-parse "^1.0.7"
|
|
||||||
supports-preserve-symlinks-flag "^1.0.0"
|
|
||||||
|
|
||||||
responselike@^1.0.2:
|
responselike@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
|
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
|
||||||
@@ -7268,16 +6969,11 @@ safe-array-concat@^1.0.0:
|
|||||||
has-symbols "^1.0.3"
|
has-symbols "^1.0.3"
|
||||||
isarray "^2.0.5"
|
isarray "^2.0.5"
|
||||||
|
|
||||||
safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0:
|
safe-buffer@^5.0.1, safe-buffer@^5.1.2:
|
||||||
version "5.2.1"
|
version "5.2.1"
|
||||||
resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
|
resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
|
||||||
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||||
|
|
||||||
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
|
||||||
version "5.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
|
||||||
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
|
||||||
|
|
||||||
safe-regex-test@^1.0.0:
|
safe-regex-test@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295"
|
resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295"
|
||||||
@@ -7385,20 +7081,6 @@ signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
|
|||||||
resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz"
|
resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz"
|
||||||
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
|
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
|
||||||
|
|
||||||
simple-concat@^1.0.0:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f"
|
|
||||||
integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==
|
|
||||||
|
|
||||||
simple-get@^4.0.0:
|
|
||||||
version "4.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543"
|
|
||||||
integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==
|
|
||||||
dependencies:
|
|
||||||
decompress-response "^6.0.0"
|
|
||||||
once "^1.3.1"
|
|
||||||
simple-concat "^1.0.0"
|
|
||||||
|
|
||||||
sisteransi@^1.0.5:
|
sisteransi@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
|
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
|
||||||
@@ -7504,13 +7186,6 @@ stream-buffers@^3.0.2:
|
|||||||
resolved "https://registry.npmjs.org/stream-buffers/-/stream-buffers-3.0.2.tgz"
|
resolved "https://registry.npmjs.org/stream-buffers/-/stream-buffers-3.0.2.tgz"
|
||||||
integrity sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ==
|
integrity sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ==
|
||||||
|
|
||||||
stream-meter@^1.0.4:
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d"
|
|
||||||
integrity sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ==
|
|
||||||
dependencies:
|
|
||||||
readable-stream "^2.1.4"
|
|
||||||
|
|
||||||
string-length@^4.0.1:
|
string-length@^4.0.1:
|
||||||
version "4.0.2"
|
version "4.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
|
resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
|
||||||
@@ -7555,20 +7230,6 @@ string.prototype.trimstart@^1.0.6:
|
|||||||
define-properties "^1.1.4"
|
define-properties "^1.1.4"
|
||||||
es-abstract "^1.20.4"
|
es-abstract "^1.20.4"
|
||||||
|
|
||||||
string_decoder@^1.1.1:
|
|
||||||
version "1.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
|
|
||||||
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
|
|
||||||
dependencies:
|
|
||||||
safe-buffer "~5.2.0"
|
|
||||||
|
|
||||||
string_decoder@~1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
|
||||||
integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
|
|
||||||
dependencies:
|
|
||||||
safe-buffer "~5.1.0"
|
|
||||||
|
|
||||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||||
version "6.0.1"
|
version "6.0.1"
|
||||||
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
|
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
|
||||||
@@ -7601,11 +7262,6 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
|
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
|
||||||
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
|
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
|
||||||
|
|
||||||
strip-json-comments@~2.0.1:
|
|
||||||
version "2.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
|
||||||
integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==
|
|
||||||
|
|
||||||
strnum@^1.0.5:
|
strnum@^1.0.5:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.1.2.tgz#57bca4fbaa6f271081715dbc9ed7cee5493e28e4"
|
resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.1.2.tgz#57bca4fbaa6f271081715dbc9ed7cee5493e28e4"
|
||||||
@@ -7698,27 +7354,6 @@ table@^6.0.9:
|
|||||||
string-width "^4.2.3"
|
string-width "^4.2.3"
|
||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
|
|
||||||
tar-fs@^2.0.0, tar-fs@^2.1.1:
|
|
||||||
version "2.1.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.4.tgz#800824dbf4ef06ded9afea4acafe71c67c76b930"
|
|
||||||
integrity sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==
|
|
||||||
dependencies:
|
|
||||||
chownr "^1.1.1"
|
|
||||||
mkdirp-classic "^0.5.2"
|
|
||||||
pump "^3.0.0"
|
|
||||||
tar-stream "^2.1.4"
|
|
||||||
|
|
||||||
tar-stream@^2.1.4:
|
|
||||||
version "2.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287"
|
|
||||||
integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==
|
|
||||||
dependencies:
|
|
||||||
bl "^4.0.3"
|
|
||||||
end-of-stream "^1.4.1"
|
|
||||||
fs-constants "^1.0.0"
|
|
||||||
inherits "^2.0.3"
|
|
||||||
readable-stream "^3.1.1"
|
|
||||||
|
|
||||||
tar@^6.1.11:
|
tar@^6.1.11:
|
||||||
version "6.1.15"
|
version "6.1.15"
|
||||||
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.15.tgz#c9738b0b98845a3b344d334b8fa3041aaba53a69"
|
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.15.tgz#c9738b0b98845a3b344d334b8fa3041aaba53a69"
|
||||||
@@ -8123,11 +7758,6 @@ url@0.10.3:
|
|||||||
punycode "1.3.2"
|
punycode "1.3.2"
|
||||||
querystring "0.2.0"
|
querystring "0.2.0"
|
||||||
|
|
||||||
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
|
||||||
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
|
||||||
|
|
||||||
util@^0.12.4:
|
util@^0.12.4:
|
||||||
version "0.12.5"
|
version "0.12.5"
|
||||||
resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc"
|
resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc"
|
||||||
@@ -8402,11 +8032,6 @@ yargs-parser@20.x, yargs-parser@^20.2.2:
|
|||||||
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz"
|
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz"
|
||||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||||
|
|
||||||
yargs-parser@^21.1.1:
|
|
||||||
version "21.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
|
|
||||||
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
|
|
||||||
|
|
||||||
yargs@^16.2.0:
|
yargs@^16.2.0:
|
||||||
version "16.2.0"
|
version "16.2.0"
|
||||||
resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz"
|
resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz"
|
||||||
@@ -8420,19 +8045,6 @@ yargs@^16.2.0:
|
|||||||
y18n "^5.0.5"
|
y18n "^5.0.5"
|
||||||
yargs-parser "^20.2.2"
|
yargs-parser "^20.2.2"
|
||||||
|
|
||||||
yargs@^17.7.2:
|
|
||||||
version "17.7.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
|
|
||||||
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
|
|
||||||
dependencies:
|
|
||||||
cliui "^8.0.1"
|
|
||||||
escalade "^3.1.1"
|
|
||||||
get-caller-file "^2.0.5"
|
|
||||||
require-directory "^2.1.1"
|
|
||||||
string-width "^4.2.3"
|
|
||||||
y18n "^5.0.5"
|
|
||||||
yargs-parser "^21.1.1"
|
|
||||||
|
|
||||||
yarn-audit-fix@^9.3.8:
|
yarn-audit-fix@^9.3.8:
|
||||||
version "9.3.12"
|
version "9.3.12"
|
||||||
resolved "https://registry.yarnpkg.com/yarn-audit-fix/-/yarn-audit-fix-9.3.12.tgz#cc34e87aa080bace32f2f105be6b581a3cb6eb24"
|
resolved "https://registry.yarnpkg.com/yarn-audit-fix/-/yarn-audit-fix-9.3.12.tgz#cc34e87aa080bace32f2f105be6b581a3cb6eb24"
|
||||||
|
|||||||
Reference in New Issue
Block a user