Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| af5ee0299d |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "autonomy-studio-launcher",
|
"name": "autonomy-studio-launcher",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"description": "Autonomy Studio v2 Frontend",
|
"description": "Autonomy Studio v2 Frontend",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
+7
-5
@@ -350,12 +350,17 @@ function downloadFile(
|
|||||||
|
|
||||||
const total = Number(response.headers['content-length'] ?? 0)
|
const total = Number(response.headers['content-length'] ?? 0)
|
||||||
let received = 0
|
let received = 0
|
||||||
|
let lastProgress = -1
|
||||||
const file = createWriteStream(tmpPath)
|
const file = createWriteStream(tmpPath)
|
||||||
|
|
||||||
response.on('data', (chunk: Buffer) => {
|
response.on('data', (chunk: Buffer) => {
|
||||||
received += chunk.length
|
received += chunk.length
|
||||||
if (total > 0) {
|
if (total > 0) {
|
||||||
onProgress(Math.min(99, Math.round((received / total) * 100)))
|
const progress = Math.min(99, Math.round((received / total) * 100))
|
||||||
|
if (progress !== lastProgress) {
|
||||||
|
lastProgress = progress
|
||||||
|
onProgress(progress)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1198,12 +1203,9 @@ function createWindow(): void {
|
|||||||
if (spawnPath) {
|
if (spawnPath) {
|
||||||
const useDevLauncher = is.dev && spawnPath === resolvedDevAppPath
|
const useDevLauncher = is.dev && spawnPath === resolvedDevAppPath
|
||||||
const launchUrlArg = url ? [`--url=${encodeURIComponent(url)}`] : []
|
const launchUrlArg = url ? [`--url=${encodeURIComponent(url)}`] : []
|
||||||
const noSandboxArg = !useDevLauncher && process.platform === 'linux' && spawnPath.toLowerCase().endsWith('.appimage')
|
|
||||||
? ['--no-sandbox']
|
|
||||||
: []
|
|
||||||
const args = useDevLauncher
|
const args = useDevLauncher
|
||||||
? ['run', 'dev']
|
? ['run', 'dev']
|
||||||
: [...noSandboxArg, ...launchUrlArg, ...authLaunchArgs, ...(authProtocolUrl ? [authProtocolUrl] : [])]
|
: [...launchUrlArg, ...authLaunchArgs, ...(authProtocolUrl ? [authProtocolUrl] : [])]
|
||||||
const execBin = useDevLauncher ? 'npm' : spawnPath
|
const execBin = useDevLauncher ? 'npm' : spawnPath
|
||||||
|
|
||||||
const childEnv = createCleanChildEnv()
|
const childEnv = createCleanChildEnv()
|
||||||
|
|||||||
Reference in New Issue
Block a user