Delete 100 files via Git Manager GUI
This commit is contained in:
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../@electron/asar/bin/asar.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../@electron/asar/bin/asar.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@electron\asar\bin\asar.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../@electron/asar/bin/asar.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../@electron/asar/bin/asar.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../@electron/asar/bin/asar.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../@electron/asar/bin/asar.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../crc-32/bin/crc32.njs" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../crc-32/bin/crc32.njs" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\crc-32\bin\crc32.njs" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../crc-32/bin/crc32.njs" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../crc-32/bin/crc32.njs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../crc-32/bin/crc32.njs" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../crc-32/bin/crc32.njs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../ejs/bin/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../ejs/bin/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ejs\bin\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../ejs/bin/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../ejs/bin/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../ejs/bin/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../ejs/bin/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../electron/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../electron/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../electron-builder/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../electron-builder/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\electron-builder\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../electron-builder/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../electron-builder/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../electron-builder/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../electron-builder/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../@electron/fuses/dist/bin.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../@electron/fuses/dist/bin.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@electron\fuses\dist\bin.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../@electron/fuses/dist/bin.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../@electron/fuses/dist/bin.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../@electron/fuses/dist/bin.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../@electron/fuses/dist/bin.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../@electron/osx-sign/bin/electron-osx-flat.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../@electron/osx-sign/bin/electron-osx-flat.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@electron\osx-sign\bin\electron-osx-flat.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../@electron/osx-sign/bin/electron-osx-flat.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../@electron/osx-sign/bin/electron-osx-flat.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../@electron/osx-sign/bin/electron-osx-flat.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../@electron/osx-sign/bin/electron-osx-flat.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../@electron/osx-sign/bin/electron-osx-sign.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../@electron/osx-sign/bin/electron-osx-sign.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@electron\osx-sign\bin\electron-osx-sign.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../@electron/osx-sign/bin/electron-osx-sign.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../@electron/osx-sign/bin/electron-osx-sign.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../@electron/osx-sign/bin/electron-osx-sign.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../@electron/osx-sign/bin/electron-osx-sign.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../@electron/rebuild/lib/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../@electron/rebuild/lib/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@electron\rebuild\lib\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../@electron/rebuild/lib/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../@electron/rebuild/lib/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../@electron/rebuild/lib/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../@electron/rebuild/lib/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../@electron/windows-sign/bin/electron-windows-sign.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../@electron/windows-sign/bin/electron-windows-sign.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@electron\windows-sign\bin\electron-windows-sign.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../@electron/windows-sign/bin/electron-windows-sign.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../@electron/windows-sign/bin/electron-windows-sign.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../@electron/windows-sign/bin/electron-windows-sign.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../@electron/windows-sign/bin/electron-windows-sign.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\electron\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../electron/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../electron/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../electron/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../electron/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../electron-builder/install-app-deps.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../electron-builder/install-app-deps.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\electron-builder\install-app-deps.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../electron-builder/install-app-deps.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../electron-builder/install-app-deps.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../electron-builder/install-app-deps.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../electron-builder/install-app-deps.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../electron/install.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../electron/install.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\electron\install.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../electron/install.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../electron/install.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../electron/install.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../electron/install.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../jake/bin/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../jake/bin/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jake\bin\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../jake/bin/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../jake/bin/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../jake/bin/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../jake/bin/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../jiti/lib/jiti-cli.mjs" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../jiti/lib/jiti-cli.mjs" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jiti\lib\jiti-cli.mjs" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../json5/lib/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../json5/lib/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../json5/lib/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../mime/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../mime/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../mime/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../mime/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../node-gyp/bin/node-gyp.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../node-gyp/bin/node-gyp.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\node-gyp\bin\node-gyp.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../which/bin/which.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../which/bin/which.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\which.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../which/bin/which.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../which/bin/which.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../which/bin/which.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../which/bin/which.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../nopt/bin/nopt.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nopt\bin\nopt.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../nopt/bin/nopt.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../nopt/bin/nopt.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../postject/dist/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../postject/dist/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\postject\dist\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../postject/dist/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../postject/dist/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../postject/dist/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../postject/dist/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../read-binary-file-arch/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../read-binary-file-arch/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\read-binary-file-arch\cli.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../read-binary-file-arch/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../read-binary-file-arch/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../read-binary-file-arch/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../read-binary-file-arch/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../rimraf/bin.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../rimraf/bin.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../rimraf/bin.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../semver/bin/semver.js" "$@"
|
|
||||||
fi
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../semver/bin/semver.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
-3870
File diff suppressed because it is too large
Load Diff
-94
@@ -1,94 +0,0 @@
|
|||||||
# @electron-internal/extract-zip
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> **Internal to the Electron project.** This package exists to serve Electron's
|
|
||||||
> own tooling. Use from non-Electron packages is not supported: the API may
|
|
||||||
> change to suit Electron's needs, and bug reports or feature requests from
|
|
||||||
> outside use cases may be closed without action. If you need a general-purpose
|
|
||||||
> extractor, use [`extract-zip`](https://github.com/max-mapper/extract-zip).
|
|
||||||
|
|
||||||
Fast, safe, native zip extraction for Node.js. Drop-in replacement for [`extract-zip`](https://github.com/max-mapper/extract-zip).
|
|
||||||
|
|
||||||
- **Native**: Rust core via N-API, decompression runs off the event loop.
|
|
||||||
- **Fast**: ~2x faster on entry-heavy archives, never slower. See [benchmarks](#benchmarks).
|
|
||||||
- **Safe**: hardened against Zip Slip, symlink escapes, absolute paths, NUL injection, Windows reserved names, and zip bombs.
|
|
||||||
- **Zero runtime deps**: no `debug`/`yauzl`/`get-stream` in your tree.
|
|
||||||
- **Cross-platform**: prebuilt binaries for macOS, Linux (glibc/musl), and Windows (x64/arm64).
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add @electron-internal/extract-zip
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
ESM only:
|
|
||||||
|
|
||||||
```js
|
|
||||||
import extract from '@electron-internal/extract-zip';
|
|
||||||
|
|
||||||
await extract('archive.zip', { dir: '/absolute/output/path' });
|
|
||||||
```
|
|
||||||
|
|
||||||
`dir` (required, absolute) is the only option. Everything else is fixed: existing
|
|
||||||
files are overwritten, archive mode bits (masked to `0o777`) and mtimes are
|
|
||||||
preserved, symlinks are created (skipped on Windows without symlink privilege),
|
|
||||||
and writes are parallelised across `min(cpus, 8)` workers. The original's
|
|
||||||
`onEntry`, `defaultDirMode`, and `defaultFileMode` are not supported, since no
|
|
||||||
consumer in the `electron` org uses them.
|
|
||||||
|
|
||||||
## Security
|
|
||||||
|
|
||||||
This package is hardened for extracting trusted Electron distribution archives,
|
|
||||||
enforcing path containment against Zip Slip, symlink escapes, absolute paths, NUL
|
|
||||||
injection, Windows reserved names, and zip bombs. Its threat model and the full
|
|
||||||
list of containment guarantees are documented in [`SECURITY.md`](./SECURITY.md).
|
|
||||||
|
|
||||||
Extracting untrusted or unverified archives is out of scope — see
|
|
||||||
[`SECURITY.md`](./SECURITY.md) for details.
|
|
||||||
|
|
||||||
## Benchmarks
|
|
||||||
|
|
||||||
`yarn bench` (Apple M-series, Node 24, median of 5):
|
|
||||||
|
|
||||||
| Corpus | Zip size | `extract-zip` (JS) | this | Speedup |
|
|
||||||
|---|--:|--:|--:|--:|
|
|
||||||
| electron-v42.2.0-darwin-arm64 | 112 MB | 817 ms | 441 ms | 1.9x |
|
|
||||||
| 8 x 4 MB compressible | 0.1 MB | 24 ms | 3 ms | 9.4x |
|
|
||||||
| 2000 small text files | 0.4 MB | 372 ms | 199 ms | 1.9x |
|
|
||||||
| 200 incompressible files | 6.2 MB | 40 ms | 22 ms | 1.8x |
|
|
||||||
| `node_modules` | 2.9 MB | 68 ms | 37 ms | 1.9x |
|
|
||||||
|
|
||||||
Extraction runs in phases: validate paths and create directories, inflate and
|
|
||||||
write files in parallel with zlib-ng, then apply symlinks and directory
|
|
||||||
metadata. The Electron number is gated by its single 182 MB framework binary,
|
|
||||||
which can't be split further.
|
|
||||||
|
|
||||||
## Distribution
|
|
||||||
|
|
||||||
One package ships all prebuilt binaries (~2 MB gzipped): macOS
|
|
||||||
`darwin-universal`, Windows `x64`/`arm64`, and Linux `x64`/`arm64` for both glibc
|
|
||||||
and musl. `binding.js` picks the right one at load time. No
|
|
||||||
`optionalDependencies`, no postinstall, no network at install.
|
|
||||||
|
|
||||||
## Building from source
|
|
||||||
|
|
||||||
Requires a Rust toolchain (and `cmake` for zlib-ng).
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn install
|
|
||||||
yarn build # builds index.<your-platform>.node
|
|
||||||
yarn test
|
|
||||||
```
|
|
||||||
|
|
||||||
## Releasing
|
|
||||||
|
|
||||||
Releases are driven by [semantic-release](https://semantic-release.gitbook.io/)
|
|
||||||
on every push to `main`: conventional commit messages decide the version bump,
|
|
||||||
CI builds all targets, and the fat package is published to npm via trusted
|
|
||||||
publishing. No manual version bumps or tags.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
BSD-2-Clause
|
|
||||||
-8
@@ -1,8 +0,0 @@
|
|||||||
/* auto-generated by NAPI-RS */
|
|
||||||
/* eslint-disable */
|
|
||||||
export declare function extract(zipPath: string, opts: ExtractOptions): Promise<void>
|
|
||||||
|
|
||||||
export interface ExtractOptions {
|
|
||||||
/** Destination directory. Must be an absolute path. */
|
|
||||||
dir: string
|
|
||||||
}
|
|
||||||
-629
@@ -1,629 +0,0 @@
|
|||||||
// prettier-ignore
|
|
||||||
/* eslint-disable */
|
|
||||||
// @ts-nocheck
|
|
||||||
/* auto-generated by NAPI-RS */
|
|
||||||
|
|
||||||
import { createRequire } from 'node:module'
|
|
||||||
const require = createRequire(import.meta.url)
|
|
||||||
const __dirname = new URL('.', import.meta.url).pathname
|
|
||||||
|
|
||||||
const { readFileSync } = require('node:fs')
|
|
||||||
let nativeBinding = null
|
|
||||||
const loadErrors = []
|
|
||||||
|
|
||||||
const isMusl = () => {
|
|
||||||
let musl = false
|
|
||||||
if (process.platform === 'linux') {
|
|
||||||
musl = isMuslFromFilesystem()
|
|
||||||
if (musl === null) {
|
|
||||||
musl = isMuslFromReport()
|
|
||||||
}
|
|
||||||
if (musl === null) {
|
|
||||||
musl = isMuslFromChildProcess()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return musl
|
|
||||||
}
|
|
||||||
|
|
||||||
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
|
|
||||||
|
|
||||||
const isMuslFromFilesystem = () => {
|
|
||||||
try {
|
|
||||||
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
|
|
||||||
} catch {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const isMuslFromReport = () => {
|
|
||||||
let report = null
|
|
||||||
if (typeof process.report?.getReport === 'function') {
|
|
||||||
process.report.excludeNetwork = true
|
|
||||||
report = process.report.getReport()
|
|
||||||
}
|
|
||||||
if (!report) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
if (report.header && report.header.glibcVersionRuntime) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (Array.isArray(report.sharedObjects)) {
|
|
||||||
if (report.sharedObjects.some(isFileMusl)) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
const isMuslFromChildProcess = () => {
|
|
||||||
try {
|
|
||||||
return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
|
|
||||||
} catch (e) {
|
|
||||||
// If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function requireNative() {
|
|
||||||
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
||||||
try {
|
|
||||||
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
|
||||||
} catch (err) {
|
|
||||||
loadErrors.push(err)
|
|
||||||
}
|
|
||||||
} else if (process.platform === 'android') {
|
|
||||||
if (process.arch === 'arm64') {
|
|
||||||
try {
|
|
||||||
return require('./index.android-arm64.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-android-arm64 is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-android-arm64/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'arm') {
|
|
||||||
try {
|
|
||||||
return require('./index.android-arm-eabi.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-android-arm-eabi is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-android-arm-eabi/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
|
|
||||||
}
|
|
||||||
} else if (process.platform === 'win32') {
|
|
||||||
if (process.arch === 'x64') {
|
|
||||||
if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
|
|
||||||
try {
|
|
||||||
return require('./index.win32-x64-gnu.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-win32-x64-gnu is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-win32-x64-gnu/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return require('./index.win32-x64-msvc.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-win32-x64-msvc is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-win32-x64-msvc/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'ia32') {
|
|
||||||
try {
|
|
||||||
return require('./index.win32-ia32-msvc.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-win32-ia32-msvc is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-win32-ia32-msvc/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'arm64') {
|
|
||||||
try {
|
|
||||||
return require('./index.win32-arm64-msvc.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-win32-arm64-msvc is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-win32-arm64-msvc/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
|
|
||||||
}
|
|
||||||
} else if (process.platform === 'darwin') {
|
|
||||||
try {
|
|
||||||
return require('./index.darwin-universal.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-darwin-universal is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-darwin-universal/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
if (process.arch === 'x64') {
|
|
||||||
try {
|
|
||||||
return require('./index.darwin-x64.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-darwin-x64 is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-darwin-x64/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'arm64') {
|
|
||||||
try {
|
|
||||||
return require('./index.darwin-arm64.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-darwin-arm64 is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-darwin-arm64/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
|
|
||||||
}
|
|
||||||
} else if (process.platform === 'freebsd') {
|
|
||||||
if (process.arch === 'x64') {
|
|
||||||
try {
|
|
||||||
return require('./index.freebsd-x64.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-freebsd-x64 is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-freebsd-x64/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'arm64') {
|
|
||||||
try {
|
|
||||||
return require('./index.freebsd-arm64.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-freebsd-arm64 is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-freebsd-arm64/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
|
|
||||||
}
|
|
||||||
} else if (process.platform === 'linux') {
|
|
||||||
if (process.arch === 'x64') {
|
|
||||||
if (isMusl()) {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-x64-musl.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-x64-musl is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-x64-musl/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-x64-gnu.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-x64-gnu is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-x64-gnu/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
return require('./index.linux-x64-musl.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-x64-musl is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-x64-musl/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'arm64') {
|
|
||||||
if (isMusl()) {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-arm64-musl.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm64-musl is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm64-musl/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-arm64-gnu.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm64-gnu is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm64-gnu/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
return require('./index.linux-arm64-musl.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm64-musl is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm64-musl/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'arm') {
|
|
||||||
if (isMusl()) {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-arm-musleabihf.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm-musleabihf is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm-musleabihf/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-arm-gnueabihf.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm-gnueabihf is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-arm-gnueabihf/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'loong64') {
|
|
||||||
if (isMusl()) {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-loong64-musl.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-loong64-musl is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-loong64-musl/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-loong64-gnu.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-loong64-gnu is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-loong64-gnu/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'riscv64') {
|
|
||||||
if (isMusl()) {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-riscv64-musl.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-riscv64-musl is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-riscv64-musl/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-riscv64-gnu.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-riscv64-gnu is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-riscv64-gnu/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'ppc64') {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-ppc64-gnu.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-ppc64-gnu is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-ppc64-gnu/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else if (process.arch === 's390x') {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-s390x-gnu.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-s390x-gnu is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-s390x-gnu/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'ia32') {
|
|
||||||
try {
|
|
||||||
return require('./index.linux-ia32-gnu.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-ia32-gnu is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-linux-ia32-gnu/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
|
|
||||||
}
|
|
||||||
} else if (process.platform === 'openharmony') {
|
|
||||||
if (process.arch === 'arm64') {
|
|
||||||
try {
|
|
||||||
return require('./index.openharmony-arm64.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-openharmony-arm64 is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-openharmony-arm64/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'x64') {
|
|
||||||
try {
|
|
||||||
return require('./index.openharmony-x64.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-openharmony-x64 is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-openharmony-x64/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else if (process.arch === 'arm') {
|
|
||||||
try {
|
|
||||||
return require('./index.openharmony-arm.node')
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const binding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-openharmony-arm is intentionally not published)') })()
|
|
||||||
const bindingPackageVersion = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-openharmony-arm/package.json is intentionally not published)') })().version
|
|
||||||
if (bindingPackageVersion !== '0.0.0-development' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
||||||
throw new Error(`Native binding package version mismatch, expected 0.0.0-development but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
||||||
}
|
|
||||||
return binding
|
|
||||||
} catch (e) {
|
|
||||||
loadErrors.push(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nativeBinding = requireNative()
|
|
||||||
|
|
||||||
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
||||||
let wasiBinding = null
|
|
||||||
let wasiBindingError = null
|
|
||||||
try {
|
|
||||||
wasiBinding = require('./index.wasi.cjs')
|
|
||||||
nativeBinding = wasiBinding
|
|
||||||
} catch (err) {
|
|
||||||
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
||||||
wasiBindingError = err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
||||||
try {
|
|
||||||
wasiBinding = (() => { throw new Error('prebuild for this platform is not bundled (and @electron-internal/extract-zip-wasm32-wasi is intentionally not published)') })()
|
|
||||||
nativeBinding = wasiBinding
|
|
||||||
} catch (err) {
|
|
||||||
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
||||||
if (!wasiBindingError) {
|
|
||||||
wasiBindingError = err
|
|
||||||
} else {
|
|
||||||
wasiBindingError.cause = err
|
|
||||||
}
|
|
||||||
loadErrors.push(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
|
|
||||||
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
|
|
||||||
error.cause = wasiBindingError
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!nativeBinding) {
|
|
||||||
if (loadErrors.length > 0) {
|
|
||||||
throw new Error(
|
|
||||||
`Cannot find native binding. ` +
|
|
||||||
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
|
||||||
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
|
|
||||||
{
|
|
||||||
cause: loadErrors.reduce((err, cur) => {
|
|
||||||
cur.cause = err
|
|
||||||
return cur
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
throw new Error(`Failed to load native binding`)
|
|
||||||
}
|
|
||||||
|
|
||||||
const { extract } = nativeBinding
|
|
||||||
export { extract }
|
|
||||||
-8
@@ -1,8 +0,0 @@
|
|||||||
export interface ExtractOptions {
|
|
||||||
/** Destination directory. Must be an absolute path. */
|
|
||||||
dir: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export declare function extract(zipPath: string, opts: ExtractOptions): Promise<void>;
|
|
||||||
|
|
||||||
export default extract;
|
|
||||||
BIN
Binary file not shown.
-23
@@ -1,23 +0,0 @@
|
|||||||
import path from 'node:path';
|
|
||||||
import { extract as nativeExtract } from './binding.js';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Extract a zip archive to a directory.
|
|
||||||
*
|
|
||||||
* await extract(source, { dir: '/abs/path' })
|
|
||||||
*
|
|
||||||
* @param {string} zipPath
|
|
||||||
* @param {import('./index.js').ExtractOptions} opts
|
|
||||||
* @returns {Promise<void>}
|
|
||||||
*/
|
|
||||||
export async function extract(zipPath, opts) {
|
|
||||||
if (!opts || typeof opts.dir !== 'string') {
|
|
||||||
throw new TypeError('extract: opts.dir is required');
|
|
||||||
}
|
|
||||||
if (!path.isAbsolute(opts.dir)) {
|
|
||||||
throw new TypeError('extract: opts.dir must be an absolute path');
|
|
||||||
}
|
|
||||||
return nativeExtract(zipPath, opts);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default extract;
|
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
-69
@@ -1,69 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@electron-internal/extract-zip",
|
|
||||||
"version": "1.0.5",
|
|
||||||
"description": "Fast, safe, native zip extraction for Node.js. Drop-in replacement for extract-zip.",
|
|
||||||
"type": "module",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"types": "./index.d.ts",
|
|
||||||
"default": "./index.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js",
|
|
||||||
"index.d.ts",
|
|
||||||
"binding.js",
|
|
||||||
"binding.d.ts",
|
|
||||||
"index.*.node"
|
|
||||||
],
|
|
||||||
"napi": {
|
|
||||||
"binaryName": "index",
|
|
||||||
"packageName": "@electron-internal/extract-zip",
|
|
||||||
"targets": [
|
|
||||||
"x86_64-apple-darwin",
|
|
||||||
"aarch64-apple-darwin",
|
|
||||||
"universal-apple-darwin",
|
|
||||||
"x86_64-pc-windows-msvc",
|
|
||||||
"aarch64-pc-windows-msvc",
|
|
||||||
"x86_64-unknown-linux-gnu",
|
|
||||||
"aarch64-unknown-linux-gnu",
|
|
||||||
"x86_64-unknown-linux-musl",
|
|
||||||
"aarch64-unknown-linux-musl",
|
|
||||||
"i686-unknown-linux-gnu",
|
|
||||||
"armv7-unknown-linux-gnueabihf"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"build": "napi build --platform --release --esm --output-dir . --js binding.js --dts binding.d.ts && node scripts/strip-binding-fallbacks.js",
|
|
||||||
"build:debug": "napi build --platform --esm --output-dir . --js binding.js --dts binding.d.ts && node scripts/strip-binding-fallbacks.js",
|
|
||||||
"universal": "napi universalize --output-dir .",
|
|
||||||
"test": "node --test test/*.test.js",
|
|
||||||
"bench": "node bench/bench.js",
|
|
||||||
"bench:electron": "node bench/electron.js",
|
|
||||||
"prepublishOnly": "node scripts/check-prebuilds.js"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"zip",
|
|
||||||
"unzip",
|
|
||||||
"extract",
|
|
||||||
"native",
|
|
||||||
"fast"
|
|
||||||
],
|
|
||||||
"license": "BSD-2-Clause",
|
|
||||||
"packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=22.12.0"
|
|
||||||
},
|
|
||||||
"publishConfig": {
|
|
||||||
"provenance": true,
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"url": "https://github.com/electron/extract-zip"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@napi-rs/cli": "patch:@napi-rs/cli@npm%3A3.6.2#~/.yarn/patches/@napi-rs-cli-npm-3.6.2-b710c59d43.patch",
|
|
||||||
"extract-zip": "2.0.1",
|
|
||||||
"yazl": "3.3.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
Copyright (c) 2014 GitHub Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
-208
@@ -1,208 +0,0 @@
|
|||||||
# @electron/asar - Electron Archive
|
|
||||||
|
|
||||||
[](https://github.com/electron/asar/actions/workflows/test.yml)
|
|
||||||
[](https://npmjs.org/package/@electron/asar)
|
|
||||||
|
|
||||||
Asar is a simple extensive archive format, it works like `tar` that concatenates
|
|
||||||
all files together without compression, while having random access support.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
* Support random access
|
|
||||||
* Use JSON to store files' information
|
|
||||||
* Very easy to write a parser
|
|
||||||
|
|
||||||
## Command line utility
|
|
||||||
|
|
||||||
### Install
|
|
||||||
|
|
||||||
This module requires Node 10 or later.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install --engine-strict @electron/asar
|
|
||||||
```
|
|
||||||
|
|
||||||
### Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ asar --help
|
|
||||||
|
|
||||||
Usage: asar [options] [command]
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
|
|
||||||
pack|p <dir> <output>
|
|
||||||
create asar archive
|
|
||||||
|
|
||||||
list|l <archive>
|
|
||||||
list files of asar archive
|
|
||||||
|
|
||||||
extract-file|ef <archive> <filename>
|
|
||||||
extract one file from archive
|
|
||||||
|
|
||||||
extract|e <archive> <dest>
|
|
||||||
extract archive
|
|
||||||
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
-h, --help output usage information
|
|
||||||
-V, --version output the version number
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Excluding multiple resources from being packed
|
|
||||||
|
|
||||||
Given:
|
|
||||||
```
|
|
||||||
app
|
|
||||||
(a) ├── x1
|
|
||||||
(b) ├── x2
|
|
||||||
(c) ├── y3
|
|
||||||
(d) │ ├── x1
|
|
||||||
(e) │ └── z1
|
|
||||||
(f) │ └── x2
|
|
||||||
(g) └── z4
|
|
||||||
(h) └── w1
|
|
||||||
```
|
|
||||||
|
|
||||||
Exclude: a, b
|
|
||||||
```bash
|
|
||||||
$ asar pack app app.asar --unpack-dir "{x1,x2}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Exclude: a, b, d, f
|
|
||||||
```bash
|
|
||||||
$ asar pack app app.asar --unpack-dir "**/{x1,x2}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Exclude: a, b, d, f, h
|
|
||||||
```bash
|
|
||||||
$ asar pack app app.asar --unpack-dir "{**/x1,**/x2,z4/w1}"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Using programmatically
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const asar = require('@electron/asar');
|
|
||||||
|
|
||||||
const src = 'some/path/';
|
|
||||||
const dest = 'name.asar';
|
|
||||||
|
|
||||||
await asar.createPackage(src, dest);
|
|
||||||
console.log('done.');
|
|
||||||
```
|
|
||||||
|
|
||||||
Please note that there is currently **no** error handling provided!
|
|
||||||
|
|
||||||
### Transform
|
|
||||||
You can pass in a `transform` option, that is a function, which either returns
|
|
||||||
nothing, or a `stream.Transform`. The latter will be used on files that will be
|
|
||||||
in the `.asar` file to transform them (e.g. compress).
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const asar = require('@electron/asar');
|
|
||||||
|
|
||||||
const src = 'some/path/';
|
|
||||||
const dest = 'name.asar';
|
|
||||||
|
|
||||||
function transform (filename) {
|
|
||||||
return new CustomTransformStream()
|
|
||||||
}
|
|
||||||
|
|
||||||
await asar.createPackageWithOptions(src, dest, { transform: transform });
|
|
||||||
console.log('done.');
|
|
||||||
```
|
|
||||||
|
|
||||||
## Format
|
|
||||||
|
|
||||||
Asar uses [Pickle][pickle] to safely serialize binary value to file.
|
|
||||||
|
|
||||||
The format of asar is very flat:
|
|
||||||
|
|
||||||
```
|
|
||||||
| UInt32: header_size | String: header | Bytes: file1 | ... | Bytes: file42 |
|
|
||||||
```
|
|
||||||
|
|
||||||
The `header_size` and `header` are serialized with [Pickle][pickle] class, and
|
|
||||||
`header_size`'s [Pickle][pickle] object is 8 bytes.
|
|
||||||
|
|
||||||
The `header` is a JSON string, and the `header_size` is the size of `header`'s
|
|
||||||
`Pickle` object.
|
|
||||||
|
|
||||||
Structure of `header` is something like this:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"files": {
|
|
||||||
"tmp": {
|
|
||||||
"files": {}
|
|
||||||
},
|
|
||||||
"usr" : {
|
|
||||||
"files": {
|
|
||||||
"bin": {
|
|
||||||
"files": {
|
|
||||||
"ls": {
|
|
||||||
"offset": "0",
|
|
||||||
"size": 100,
|
|
||||||
"executable": true,
|
|
||||||
"integrity": {
|
|
||||||
"algorithm": "SHA256",
|
|
||||||
"hash": "...",
|
|
||||||
"blockSize": 1024,
|
|
||||||
"blocks": ["...", "..."]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cd": {
|
|
||||||
"offset": "100",
|
|
||||||
"size": 100,
|
|
||||||
"executable": true,
|
|
||||||
"integrity": {
|
|
||||||
"algorithm": "SHA256",
|
|
||||||
"hash": "...",
|
|
||||||
"blockSize": 1024,
|
|
||||||
"blocks": ["...", "..."]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"etc": {
|
|
||||||
"files": {
|
|
||||||
"hosts": {
|
|
||||||
"offset": "200",
|
|
||||||
"size": 32,
|
|
||||||
"integrity": {
|
|
||||||
"algorithm": "SHA256",
|
|
||||||
"hash": "...",
|
|
||||||
"blockSize": 1024,
|
|
||||||
"blocks": ["...", "..."]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
`offset` and `size` records the information to read the file from archive, the
|
|
||||||
`offset` starts from 0 so you have to manually add the size of `header_size` and
|
|
||||||
`header` to the `offset` to get the real offset of the file.
|
|
||||||
|
|
||||||
`offset` is a UINT64 number represented in string, because there is no way to
|
|
||||||
precisely represent UINT64 in JavaScript `Number`. `size` is a JavaScript
|
|
||||||
`Number` that is no larger than `Number.MAX_SAFE_INTEGER`, which has a value of
|
|
||||||
`9007199254740991` and is about 8PB in size. We didn't store `size` in UINT64
|
|
||||||
because file size in Node.js is represented as `Number` and it is not safe to
|
|
||||||
convert `Number` to UINT64.
|
|
||||||
|
|
||||||
`integrity` is an object consisting of a few keys:
|
|
||||||
* A hashing `algorithm`, currently only `SHA256` is supported.
|
|
||||||
* A hex encoded `hash` value representing the hash of the entire file.
|
|
||||||
* An array of hex encoded hashes for the `blocks` of the file. i.e. for a blockSize of 4KB this array contains the hash of every block if you split the file into N 4KB blocks.
|
|
||||||
* A integer value `blockSize` representing the size in bytes of each block in the `blocks` hashes above
|
|
||||||
|
|
||||||
[pickle]: https://chromium.googlesource.com/chromium/src/+/main/base/pickle.h
|
|
||||||
-82
@@ -1,82 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
var packageJSON = require('../package.json')
|
|
||||||
var splitVersion = function (version) { return version.split('.').map(function (part) { return Number(part) }) }
|
|
||||||
var requiredNodeVersion = splitVersion(packageJSON.engines.node.slice(2))
|
|
||||||
var actualNodeVersion = splitVersion(process.versions.node)
|
|
||||||
|
|
||||||
if (actualNodeVersion[0] < requiredNodeVersion[0] || (actualNodeVersion[0] === requiredNodeVersion[0] && actualNodeVersion[1] < requiredNodeVersion[1])) {
|
|
||||||
console.error('CANNOT RUN WITH NODE ' + process.versions.node)
|
|
||||||
console.error('asar requires Node ' + packageJSON.engines.node + '.')
|
|
||||||
process.exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Not consts so that this file can load in Node < 4.0
|
|
||||||
var asar = require('../lib/asar')
|
|
||||||
var program = require('commander')
|
|
||||||
|
|
||||||
program.version('v' + packageJSON.version)
|
|
||||||
.description('Manipulate asar archive files')
|
|
||||||
|
|
||||||
program.command('pack <dir> <output>')
|
|
||||||
.alias('p')
|
|
||||||
.description('create asar archive')
|
|
||||||
.option('--ordering <file path>', 'path to a text file for ordering contents')
|
|
||||||
.option('--unpack <expression>', 'do not pack files matching glob <expression>')
|
|
||||||
.option('--unpack-dir <expression>', 'do not pack dirs matching glob <expression> or starting with literal <expression>')
|
|
||||||
.option('--exclude-hidden', 'exclude hidden files')
|
|
||||||
.action(function (dir, output, options) {
|
|
||||||
options = {
|
|
||||||
unpack: options.unpack,
|
|
||||||
unpackDir: options.unpackDir,
|
|
||||||
ordering: options.ordering,
|
|
||||||
version: options.sv,
|
|
||||||
arch: options.sa,
|
|
||||||
builddir: options.sb,
|
|
||||||
dot: !options.excludeHidden
|
|
||||||
}
|
|
||||||
asar.createPackageWithOptions(dir, output, options).catch(error => {
|
|
||||||
console.error(error)
|
|
||||||
process.exit(1)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
program.command('list <archive>')
|
|
||||||
.alias('l')
|
|
||||||
.description('list files of asar archive')
|
|
||||||
.option('-i, --is-pack', 'each file in the asar is pack or unpack')
|
|
||||||
.action(function (archive, options) {
|
|
||||||
options = {
|
|
||||||
isPack: options.isPack
|
|
||||||
}
|
|
||||||
var files = asar.listPackage(archive, options)
|
|
||||||
for (var i in files) {
|
|
||||||
console.log(files[i])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
program.command('extract-file <archive> <filename>')
|
|
||||||
.alias('ef')
|
|
||||||
.description('extract one file from archive')
|
|
||||||
.action(function (archive, filename) {
|
|
||||||
require('fs').writeFileSync(require('path').basename(filename),
|
|
||||||
asar.extractFile(archive, filename))
|
|
||||||
})
|
|
||||||
|
|
||||||
program.command('extract <archive> <dest>')
|
|
||||||
.alias('e')
|
|
||||||
.description('extract archive')
|
|
||||||
.action(function (archive, dest) {
|
|
||||||
asar.extractAll(archive, dest)
|
|
||||||
})
|
|
||||||
|
|
||||||
program.command('*')
|
|
||||||
.action(function (_cmd, args) {
|
|
||||||
console.log('asar: \'%s\' is not an asar command. See \'asar --help\'.', args[0])
|
|
||||||
})
|
|
||||||
|
|
||||||
program.parse(process.argv)
|
|
||||||
|
|
||||||
if (program.args.length === 0) {
|
|
||||||
program.help()
|
|
||||||
}
|
|
||||||
-96
@@ -1,96 +0,0 @@
|
|||||||
import { FilesystemDirectoryEntry, FilesystemEntry, FilesystemLinkEntry } from './filesystem';
|
|
||||||
import * as disk from './disk';
|
|
||||||
import { CrawledFileType } from './crawlfs';
|
|
||||||
import { IOptions } from './types/glob';
|
|
||||||
export declare function createPackage(src: string, dest: string): Promise<NodeJS.WritableStream>;
|
|
||||||
export type CreateOptions = {
|
|
||||||
dot?: boolean;
|
|
||||||
globOptions?: IOptions;
|
|
||||||
/**
|
|
||||||
* Path to a file containing the list of relative filepaths relative to `src` and the specific order they should be inserted into the asar.
|
|
||||||
* Formats allowed below:
|
|
||||||
* filepath
|
|
||||||
* : filepath
|
|
||||||
* <anything>:filepath
|
|
||||||
*/
|
|
||||||
ordering?: string;
|
|
||||||
pattern?: string;
|
|
||||||
transform?: (filePath: string) => NodeJS.ReadWriteStream | void;
|
|
||||||
unpack?: string;
|
|
||||||
unpackDir?: string;
|
|
||||||
};
|
|
||||||
export declare function createPackageWithOptions(src: string, dest: string, options: CreateOptions): Promise<NodeJS.WritableStream>;
|
|
||||||
/**
|
|
||||||
* Create an ASAR archive from a list of filenames.
|
|
||||||
*
|
|
||||||
* @param src - Base path. All files are relative to this.
|
|
||||||
* @param dest - Archive filename (& path).
|
|
||||||
* @param filenames - List of filenames relative to src.
|
|
||||||
* @param [metadata] - Object with filenames as keys and {type='directory|file|link', stat: fs.stat} as values. (Optional)
|
|
||||||
* @param [options] - Options passed to `createPackageWithOptions`.
|
|
||||||
*/
|
|
||||||
export declare function createPackageFromFiles(src: string, dest: string, filenames: string[], metadata?: disk.InputMetadata, options?: CreateOptions): Promise<NodeJS.WritableStream>;
|
|
||||||
export type AsarStream = {
|
|
||||||
/**
|
|
||||||
Relative path to the file or directory from within the archive
|
|
||||||
*/
|
|
||||||
path: string;
|
|
||||||
/**
|
|
||||||
Function that returns a read stream for a file.
|
|
||||||
Note: this is called multiple times per "file", so a new NodeJS.ReadableStream needs to be created each time
|
|
||||||
*/
|
|
||||||
streamGenerator: () => NodeJS.ReadableStream;
|
|
||||||
/**
|
|
||||||
Whether the file/link should be unpacked
|
|
||||||
*/
|
|
||||||
unpacked: boolean;
|
|
||||||
stat: CrawledFileType['stat'];
|
|
||||||
};
|
|
||||||
export type AsarDirectory = Pick<AsarStream, 'path' | 'unpacked'> & {
|
|
||||||
type: 'directory';
|
|
||||||
};
|
|
||||||
export type AsarSymlinkStream = AsarStream & {
|
|
||||||
type: 'link';
|
|
||||||
symlink: string;
|
|
||||||
};
|
|
||||||
export type AsarFileStream = AsarStream & {
|
|
||||||
type: 'file';
|
|
||||||
};
|
|
||||||
export type AsarStreamType = AsarDirectory | AsarFileStream | AsarSymlinkStream;
|
|
||||||
/**
|
|
||||||
* Create an ASAR archive from a list of streams.
|
|
||||||
*
|
|
||||||
* @param dest - Archive filename (& path).
|
|
||||||
* @param streams - List of streams to be piped in-memory into asar filesystem. Insertion order is preserved.
|
|
||||||
*/
|
|
||||||
export declare function createPackageFromStreams(dest: string, streams: AsarStreamType[]): Promise<import("fs").WriteStream>;
|
|
||||||
export declare function statFile(archivePath: string, filename: string, followLinks?: boolean): FilesystemEntry;
|
|
||||||
export declare function getRawHeader(archivePath: string): disk.ArchiveHeader;
|
|
||||||
export interface ListOptions {
|
|
||||||
isPack: boolean;
|
|
||||||
}
|
|
||||||
export declare function listPackage(archivePath: string, options: ListOptions): string[];
|
|
||||||
export declare function extractFile(archivePath: string, filename: string, followLinks?: boolean): Buffer;
|
|
||||||
export declare function extractAll(archivePath: string, dest: string): void;
|
|
||||||
export declare function uncache(archivePath: string): boolean;
|
|
||||||
export declare function uncacheAll(): void;
|
|
||||||
export { EntryMetadata } from './filesystem';
|
|
||||||
export { InputMetadata, DirectoryRecord, FileRecord, ArchiveHeader } from './disk';
|
|
||||||
export type InputMetadataType = 'directory' | 'file' | 'link';
|
|
||||||
export type DirectoryMetadata = FilesystemDirectoryEntry;
|
|
||||||
export type FileMetadata = FilesystemEntry;
|
|
||||||
export type LinkMetadata = FilesystemLinkEntry;
|
|
||||||
declare const _default: {
|
|
||||||
createPackage: typeof createPackage;
|
|
||||||
createPackageWithOptions: typeof createPackageWithOptions;
|
|
||||||
createPackageFromFiles: typeof createPackageFromFiles;
|
|
||||||
createPackageFromStreams: typeof createPackageFromStreams;
|
|
||||||
statFile: typeof statFile;
|
|
||||||
getRawHeader: typeof getRawHeader;
|
|
||||||
listPackage: typeof listPackage;
|
|
||||||
extractFile: typeof extractFile;
|
|
||||||
extractAll: typeof extractAll;
|
|
||||||
uncache: typeof uncache;
|
|
||||||
uncacheAll: typeof uncacheAll;
|
|
||||||
};
|
|
||||||
export default _default;
|
|
||||||
-337
@@ -1,337 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
}));
|
|
||||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
});
|
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.createPackage = createPackage;
|
|
||||||
exports.createPackageWithOptions = createPackageWithOptions;
|
|
||||||
exports.createPackageFromFiles = createPackageFromFiles;
|
|
||||||
exports.createPackageFromStreams = createPackageFromStreams;
|
|
||||||
exports.statFile = statFile;
|
|
||||||
exports.getRawHeader = getRawHeader;
|
|
||||||
exports.listPackage = listPackage;
|
|
||||||
exports.extractFile = extractFile;
|
|
||||||
exports.extractAll = extractAll;
|
|
||||||
exports.uncache = uncache;
|
|
||||||
exports.uncacheAll = uncacheAll;
|
|
||||||
const path = __importStar(require("path"));
|
|
||||||
const minimatch_1 = __importDefault(require("minimatch"));
|
|
||||||
const wrapped_fs_1 = __importDefault(require("./wrapped-fs"));
|
|
||||||
const filesystem_1 = require("./filesystem");
|
|
||||||
const disk = __importStar(require("./disk"));
|
|
||||||
const crawlfs_1 = require("./crawlfs");
|
|
||||||
/**
|
|
||||||
* Whether a directory should be excluded from packing due to the `--unpack-dir" option.
|
|
||||||
*
|
|
||||||
* @param dirPath - directory path to check
|
|
||||||
* @param pattern - literal prefix [for backward compatibility] or glob pattern
|
|
||||||
* @param unpackDirs - Array of directory paths previously marked as unpacked
|
|
||||||
*/
|
|
||||||
function isUnpackedDir(dirPath, pattern, unpackDirs) {
|
|
||||||
if (dirPath.startsWith(pattern) || (0, minimatch_1.default)(dirPath, pattern)) {
|
|
||||||
if (!unpackDirs.includes(dirPath)) {
|
|
||||||
unpackDirs.push(dirPath);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return unpackDirs.some((unpackDir) => dirPath.startsWith(unpackDir) && !path.relative(unpackDir, dirPath).startsWith('..'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function createPackage(src, dest) {
|
|
||||||
return createPackageWithOptions(src, dest, {});
|
|
||||||
}
|
|
||||||
async function createPackageWithOptions(src, dest, options) {
|
|
||||||
const globOptions = options.globOptions ? options.globOptions : {};
|
|
||||||
globOptions.dot = options.dot === undefined ? true : options.dot;
|
|
||||||
const pattern = src + (options.pattern ? options.pattern : '/**/*');
|
|
||||||
const [filenames, metadata] = await (0, crawlfs_1.crawl)(pattern, globOptions);
|
|
||||||
return createPackageFromFiles(src, dest, filenames, metadata, options);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Create an ASAR archive from a list of filenames.
|
|
||||||
*
|
|
||||||
* @param src - Base path. All files are relative to this.
|
|
||||||
* @param dest - Archive filename (& path).
|
|
||||||
* @param filenames - List of filenames relative to src.
|
|
||||||
* @param [metadata] - Object with filenames as keys and {type='directory|file|link', stat: fs.stat} as values. (Optional)
|
|
||||||
* @param [options] - Options passed to `createPackageWithOptions`.
|
|
||||||
*/
|
|
||||||
async function createPackageFromFiles(src, dest, filenames, metadata = {}, options = {}) {
|
|
||||||
src = path.normalize(src);
|
|
||||||
dest = path.normalize(dest);
|
|
||||||
filenames = filenames.map(function (filename) {
|
|
||||||
return path.normalize(filename);
|
|
||||||
});
|
|
||||||
const filesystem = new filesystem_1.Filesystem(src);
|
|
||||||
const files = [];
|
|
||||||
const links = [];
|
|
||||||
const unpackDirs = [];
|
|
||||||
let filenamesSorted = [];
|
|
||||||
if (options.ordering) {
|
|
||||||
const orderingFiles = (await wrapped_fs_1.default.readFile(options.ordering))
|
|
||||||
.toString()
|
|
||||||
.split('\n')
|
|
||||||
.map((line) => {
|
|
||||||
if (line.includes(':')) {
|
|
||||||
line = line.split(':').pop();
|
|
||||||
}
|
|
||||||
line = line.trim();
|
|
||||||
if (line.startsWith('/')) {
|
|
||||||
line = line.slice(1);
|
|
||||||
}
|
|
||||||
return line;
|
|
||||||
});
|
|
||||||
const ordering = [];
|
|
||||||
for (const file of orderingFiles) {
|
|
||||||
const pathComponents = file.split(path.sep);
|
|
||||||
let str = src;
|
|
||||||
for (const pathComponent of pathComponents) {
|
|
||||||
str = path.join(str, pathComponent);
|
|
||||||
ordering.push(str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let missing = 0;
|
|
||||||
const total = filenames.length;
|
|
||||||
for (const file of ordering) {
|
|
||||||
if (!filenamesSorted.includes(file) && filenames.includes(file)) {
|
|
||||||
filenamesSorted.push(file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (const file of filenames) {
|
|
||||||
if (!filenamesSorted.includes(file)) {
|
|
||||||
filenamesSorted.push(file);
|
|
||||||
missing += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log(`Ordering file has ${((total - missing) / total) * 100}% coverage.`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
filenamesSorted = filenames;
|
|
||||||
}
|
|
||||||
const handleFile = async function (filename) {
|
|
||||||
if (!metadata[filename]) {
|
|
||||||
const fileType = await (0, crawlfs_1.determineFileType)(filename);
|
|
||||||
if (!fileType) {
|
|
||||||
throw new Error('Unknown file type for file: ' + filename);
|
|
||||||
}
|
|
||||||
metadata[filename] = fileType;
|
|
||||||
}
|
|
||||||
const file = metadata[filename];
|
|
||||||
const shouldUnpackPath = function (relativePath, unpack, unpackDir) {
|
|
||||||
let shouldUnpack = false;
|
|
||||||
if (unpack) {
|
|
||||||
shouldUnpack = (0, minimatch_1.default)(filename, unpack, { matchBase: true });
|
|
||||||
}
|
|
||||||
if (!shouldUnpack && unpackDir) {
|
|
||||||
shouldUnpack = isUnpackedDir(relativePath, unpackDir, unpackDirs);
|
|
||||||
}
|
|
||||||
return shouldUnpack;
|
|
||||||
};
|
|
||||||
let shouldUnpack;
|
|
||||||
switch (file.type) {
|
|
||||||
case 'directory':
|
|
||||||
shouldUnpack = shouldUnpackPath(path.relative(src, filename), undefined, options.unpackDir);
|
|
||||||
filesystem.insertDirectory(filename, shouldUnpack);
|
|
||||||
break;
|
|
||||||
case 'file':
|
|
||||||
shouldUnpack = shouldUnpackPath(path.relative(src, path.dirname(filename)), options.unpack, options.unpackDir);
|
|
||||||
files.push({ filename, unpack: shouldUnpack });
|
|
||||||
return filesystem.insertFile(filename, () => wrapped_fs_1.default.createReadStream(filename), shouldUnpack, file, options);
|
|
||||||
case 'link':
|
|
||||||
shouldUnpack = shouldUnpackPath(path.relative(src, filename), options.unpack, options.unpackDir);
|
|
||||||
links.push({ filename, unpack: shouldUnpack });
|
|
||||||
filesystem.insertLink(filename, shouldUnpack);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return Promise.resolve();
|
|
||||||
};
|
|
||||||
const insertsDone = async function () {
|
|
||||||
await wrapped_fs_1.default.mkdirp(path.dirname(dest));
|
|
||||||
return disk.writeFilesystem(dest, filesystem, { files, links }, metadata);
|
|
||||||
};
|
|
||||||
const names = filenamesSorted.slice();
|
|
||||||
const next = async function (name) {
|
|
||||||
if (!name) {
|
|
||||||
return insertsDone();
|
|
||||||
}
|
|
||||||
await handleFile(name);
|
|
||||||
return next(names.shift());
|
|
||||||
};
|
|
||||||
return next(names.shift());
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Create an ASAR archive from a list of streams.
|
|
||||||
*
|
|
||||||
* @param dest - Archive filename (& path).
|
|
||||||
* @param streams - List of streams to be piped in-memory into asar filesystem. Insertion order is preserved.
|
|
||||||
*/
|
|
||||||
async function createPackageFromStreams(dest, streams) {
|
|
||||||
// We use an ambiguous root `src` since we're piping directly from a stream and the `filePath` for the stream is already relative to the src/root
|
|
||||||
const src = '.';
|
|
||||||
const filesystem = new filesystem_1.Filesystem(src);
|
|
||||||
const files = [];
|
|
||||||
const links = [];
|
|
||||||
const handleFile = async function (stream) {
|
|
||||||
const { path: destinationPath, type } = stream;
|
|
||||||
const filename = path.normalize(destinationPath);
|
|
||||||
switch (type) {
|
|
||||||
case 'directory':
|
|
||||||
filesystem.insertDirectory(filename, stream.unpacked);
|
|
||||||
break;
|
|
||||||
case 'file':
|
|
||||||
files.push({
|
|
||||||
filename,
|
|
||||||
streamGenerator: stream.streamGenerator,
|
|
||||||
link: undefined,
|
|
||||||
mode: stream.stat.mode,
|
|
||||||
unpack: stream.unpacked,
|
|
||||||
});
|
|
||||||
return filesystem.insertFile(filename, stream.streamGenerator, stream.unpacked, {
|
|
||||||
type: 'file',
|
|
||||||
stat: stream.stat,
|
|
||||||
});
|
|
||||||
case 'link':
|
|
||||||
links.push({
|
|
||||||
filename,
|
|
||||||
streamGenerator: stream.streamGenerator,
|
|
||||||
link: stream.symlink,
|
|
||||||
mode: stream.stat.mode,
|
|
||||||
unpack: stream.unpacked,
|
|
||||||
});
|
|
||||||
filesystem.insertLink(filename, stream.unpacked, path.dirname(filename), stream.symlink, src);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return Promise.resolve();
|
|
||||||
};
|
|
||||||
const insertsDone = async function () {
|
|
||||||
await wrapped_fs_1.default.mkdirp(path.dirname(dest));
|
|
||||||
return disk.streamFilesystem(dest, filesystem, { files, links });
|
|
||||||
};
|
|
||||||
const streamQueue = streams.slice();
|
|
||||||
const next = async function (stream) {
|
|
||||||
if (!stream) {
|
|
||||||
return insertsDone();
|
|
||||||
}
|
|
||||||
await handleFile(stream);
|
|
||||||
return next(streamQueue.shift());
|
|
||||||
};
|
|
||||||
return next(streamQueue.shift());
|
|
||||||
}
|
|
||||||
function statFile(archivePath, filename, followLinks = true) {
|
|
||||||
const filesystem = disk.readFilesystemSync(archivePath);
|
|
||||||
return filesystem.getFile(filename, followLinks);
|
|
||||||
}
|
|
||||||
function getRawHeader(archivePath) {
|
|
||||||
return disk.readArchiveHeaderSync(archivePath);
|
|
||||||
}
|
|
||||||
function listPackage(archivePath, options) {
|
|
||||||
return disk.readFilesystemSync(archivePath).listFiles(options);
|
|
||||||
}
|
|
||||||
function extractFile(archivePath, filename, followLinks = true) {
|
|
||||||
const filesystem = disk.readFilesystemSync(archivePath);
|
|
||||||
const fileInfo = filesystem.getFile(filename, followLinks);
|
|
||||||
if ('link' in fileInfo || 'files' in fileInfo) {
|
|
||||||
throw new Error('Expected to find file at: ' + filename + ' but found a directory or link');
|
|
||||||
}
|
|
||||||
return disk.readFileSync(filesystem, filename, fileInfo);
|
|
||||||
}
|
|
||||||
function extractAll(archivePath, dest) {
|
|
||||||
const filesystem = disk.readFilesystemSync(archivePath);
|
|
||||||
const filenames = filesystem.listFiles();
|
|
||||||
// under windows just extract links as regular files
|
|
||||||
const followLinks = process.platform === 'win32';
|
|
||||||
// create destination directory
|
|
||||||
wrapped_fs_1.default.mkdirpSync(dest);
|
|
||||||
const extractionErrors = [];
|
|
||||||
for (const fullPath of filenames) {
|
|
||||||
// Remove leading slash
|
|
||||||
const filename = fullPath.substr(1);
|
|
||||||
const destFilename = path.join(dest, filename);
|
|
||||||
const file = filesystem.getFile(filename, followLinks);
|
|
||||||
if (path.relative(dest, destFilename).startsWith('..')) {
|
|
||||||
throw new Error(`${fullPath}: file "${destFilename}" writes out of the package`);
|
|
||||||
}
|
|
||||||
if ('files' in file) {
|
|
||||||
// it's a directory, create it and continue with the next entry
|
|
||||||
wrapped_fs_1.default.mkdirpSync(destFilename);
|
|
||||||
}
|
|
||||||
else if ('link' in file) {
|
|
||||||
// it's a symlink, create a symlink
|
|
||||||
const linkSrcPath = path.dirname(path.join(dest, file.link));
|
|
||||||
const linkDestPath = path.dirname(destFilename);
|
|
||||||
const relativePath = path.relative(linkDestPath, linkSrcPath);
|
|
||||||
// try to delete output file, because we can't overwrite a link
|
|
||||||
try {
|
|
||||||
wrapped_fs_1.default.unlinkSync(destFilename);
|
|
||||||
}
|
|
||||||
catch (_a) { }
|
|
||||||
const linkTo = path.join(relativePath, path.basename(file.link));
|
|
||||||
if (path.relative(dest, linkSrcPath).startsWith('..')) {
|
|
||||||
throw new Error(`${fullPath}: file "${file.link}" links out of the package to "${linkSrcPath}"`);
|
|
||||||
}
|
|
||||||
wrapped_fs_1.default.symlinkSync(linkTo, destFilename);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// it's a file, try to extract it
|
|
||||||
try {
|
|
||||||
const content = disk.readFileSync(filesystem, filename, file);
|
|
||||||
wrapped_fs_1.default.writeFileSync(destFilename, content);
|
|
||||||
if (file.executable) {
|
|
||||||
wrapped_fs_1.default.chmodSync(destFilename, '755');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
extractionErrors.push(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (extractionErrors.length) {
|
|
||||||
throw new Error('Unable to extract some files:\n\n' +
|
|
||||||
extractionErrors.map((error) => error.stack).join('\n\n'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function uncache(archivePath) {
|
|
||||||
return disk.uncacheFilesystem(archivePath);
|
|
||||||
}
|
|
||||||
function uncacheAll() {
|
|
||||||
disk.uncacheAll();
|
|
||||||
}
|
|
||||||
// Export everything in default, too
|
|
||||||
exports.default = {
|
|
||||||
createPackage,
|
|
||||||
createPackageWithOptions,
|
|
||||||
createPackageFromFiles,
|
|
||||||
createPackageFromStreams,
|
|
||||||
statFile,
|
|
||||||
getRawHeader,
|
|
||||||
listPackage,
|
|
||||||
extractFile,
|
|
||||||
extractAll,
|
|
||||||
uncache,
|
|
||||||
uncacheAll,
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=asar.js.map
|
|
||||||
-1
File diff suppressed because one or more lines are too long
-12
@@ -1,12 +0,0 @@
|
|||||||
import { Stats } from 'fs';
|
|
||||||
import { IOptions } from './types/glob';
|
|
||||||
export type CrawledFileType = {
|
|
||||||
type: 'file' | 'directory' | 'link';
|
|
||||||
stat: Pick<Stats, 'mode' | 'size'>;
|
|
||||||
transformed?: {
|
|
||||||
path: string;
|
|
||||||
stat: Stats;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
export declare function determineFileType(filename: string): Promise<CrawledFileType | null>;
|
|
||||||
export declare function crawl(dir: string, options: IOptions): Promise<readonly [string[], Record<string, CrawledFileType>]>;
|
|
||||||
-79
@@ -1,79 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
}));
|
|
||||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
});
|
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.determineFileType = determineFileType;
|
|
||||||
exports.crawl = crawl;
|
|
||||||
const util_1 = require("util");
|
|
||||||
const glob_1 = require("glob");
|
|
||||||
const wrapped_fs_1 = __importDefault(require("./wrapped-fs"));
|
|
||||||
const path = __importStar(require("path"));
|
|
||||||
const glob = (0, util_1.promisify)(glob_1.glob);
|
|
||||||
async function determineFileType(filename) {
|
|
||||||
const stat = await wrapped_fs_1.default.lstat(filename);
|
|
||||||
if (stat.isFile()) {
|
|
||||||
return { type: 'file', stat };
|
|
||||||
}
|
|
||||||
else if (stat.isDirectory()) {
|
|
||||||
return { type: 'directory', stat };
|
|
||||||
}
|
|
||||||
else if (stat.isSymbolicLink()) {
|
|
||||||
return { type: 'link', stat };
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
async function crawl(dir, options) {
|
|
||||||
const metadata = {};
|
|
||||||
const crawled = await glob(dir, options);
|
|
||||||
const results = await Promise.all(crawled.map(async (filename) => [filename, await determineFileType(filename)]));
|
|
||||||
const links = [];
|
|
||||||
const filenames = results
|
|
||||||
.map(([filename, type]) => {
|
|
||||||
if (type) {
|
|
||||||
metadata[filename] = type;
|
|
||||||
if (type.type === 'link')
|
|
||||||
links.push(filename);
|
|
||||||
}
|
|
||||||
return filename;
|
|
||||||
})
|
|
||||||
.filter((filename) => {
|
|
||||||
// Newer glob can return files inside symlinked directories, to avoid
|
|
||||||
// those appearing in archives we need to manually exclude theme here
|
|
||||||
const exactLinkIndex = links.findIndex((link) => filename === link);
|
|
||||||
return links.every((link, index) => {
|
|
||||||
if (index === exactLinkIndex) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
const isFileWithinSymlinkDir = filename.startsWith(link);
|
|
||||||
// symlink may point outside the directory: https://github.com/electron/asar/issues/303
|
|
||||||
const relativePath = path.relative(link, path.dirname(filename));
|
|
||||||
return !isFileWithinSymlinkDir || relativePath.startsWith('..');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return [filenames, metadata];
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=crawlfs.js.map
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"crawlfs.js","sourceRoot":"","sources":["../src/crawlfs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,8CAUC;AAED,sBA8BC;AA7DD,+BAAiC;AACjC,+BAAqC;AAErC,8DAA8B;AAE9B,2CAA6B;AAG7B,MAAM,IAAI,GAAG,IAAA,gBAAS,EAAC,WAAK,CAAC,CAAC;AAWvB,KAAK,UAAU,iBAAiB,CAAC,QAAgB;IACtD,MAAM,IAAI,GAAG,MAAM,oBAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;QAClB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAChC,CAAC;SAAM,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IACrC,CAAC;SAAM,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;QACjC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAChC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAEM,KAAK,UAAU,KAAK,CAAC,GAAW,EAAE,OAAiB;IACxD,MAAM,QAAQ,GAAoC,EAAE,CAAC;IACrD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,iBAAiB,CAAC,QAAQ,CAAC,CAAU,CAAC,CACxF,CAAC;IACF,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,SAAS,GAAG,OAAO;SACtB,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE;QACxB,IAAI,IAAI,EAAE,CAAC;YACT,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;YAC1B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE;QACnB,qEAAqE;QACrE,qEAAqE;QACrE,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;QACpE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YACjC,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;gBAC7B,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,sBAAsB,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACzD,uFAAuF;YACvF,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;YACjE,OAAO,CAAC,sBAAsB,IAAI,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACL,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AACxC,CAAC"}
|
|
||||||
Reference in New Issue
Block a user