-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.js
More file actions
53 lines (49 loc) · 1.78 KB
/
Copy pathsettings.js
File metadata and controls
53 lines (49 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* Copyright (c) 2024-2026 Serhii I. Myshko
https://github.com/sergeiown/Winget_Upgrade/blob/main/LICENSE */
'use strict';
const os = require('os');
const path = require('path');
const settings = {
appVersion: '3.2.2',
wingetPath: 'where.exe winget',
wingetVersion: 'winget --version',
logFilePath: path.join(process.cwd(), 'winget_upgrade.log'),
ignoreFilePath: path.join(process.cwd(), 'winget_ignore.txt'),
legacyIgnoreFilePath: path.join(process.cwd(), 'winget_ignore.json'),
languageFilePath: path.join(process.cwd(), 'winget_language.txt'),
autoCloseFilePath: path.join(process.cwd(), 'winget_autoclose.txt'),
githubReleasesApiUrl: 'https://api.github.com/repos/sergeiown/Winget_Upgrade/releases/latest',
updateAssetName: 'WingetUpgradeSetup.exe',
maxLogFileSize: 256 * 1024,
preUpgradePauseMs: 5000,
stepPauseMs: 3500,
wingetArgs: {
list: ['list', '--accept-source-agreements', '--disable-interactivity', '--ignore-warnings'],
upgradeList: ['upgrade', '--accept-source-agreements', '--disable-interactivity', '--ignore-warnings'],
upgrade: [
'upgrade',
'--exact',
'--accept-package-agreements',
'--accept-source-agreements',
'--disable-interactivity',
'--ignore-warnings',
],
},
wingetExitCodes: {
SUCCESS: 0,
NO_APPLICABLE_UPDATE: 0x8a15002b,
},
date: new Date()
.toLocaleString('uk-UA', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
})
.replace(/,\s*/g, ' ')
.trim(),
finalLogMessage: `Upgrade is complete.${os.EOL}`,
};
module.exports = settings;