mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-03 06:10:20 +00:00
Workaround yargs coerce issue (#1283)
This commit is contained in:
parent
46424f9795
commit
d759695e5a
2
.gitignore
vendored
2
.gitignore
vendored
@ -40,6 +40,8 @@ build/Release
|
||||
# Dependency directory
|
||||
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
|
||||
node_modules
|
||||
.nvmrc
|
||||
|
||||
# Python virtual environment in case it's created for the Castlabs code signing tool
|
||||
venv
|
||||
|
||||
|
18
package-lock.json
generated
18
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "nativefier",
|
||||
"version": "45.0.0",
|
||||
"version": "45.0.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "nativefier",
|
||||
"version": "45.0.0",
|
||||
"version": "45.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
@ -19,7 +19,7 @@
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"source-map-support": "^0.5.19",
|
||||
"tmp": "^0.2.1",
|
||||
"yargs": "17.0.1"
|
||||
"yargs": "^17.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"nativefier": "lib/cli.js"
|
||||
@ -7715,9 +7715,9 @@
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "17.0.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.1.tgz",
|
||||
"integrity": "sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==",
|
||||
"version": "17.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz",
|
||||
"integrity": "sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==",
|
||||
"dependencies": {
|
||||
"cliui": "^7.0.2",
|
||||
"escalade": "^3.1.1",
|
||||
@ -13580,9 +13580,9 @@
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"yargs": {
|
||||
"version": "17.0.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.1.tgz",
|
||||
"integrity": "sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==",
|
||||
"version": "17.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz",
|
||||
"integrity": "sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==",
|
||||
"requires": {
|
||||
"cliui": "^7.0.2",
|
||||
"escalade": "^3.1.1",
|
||||
|
@ -63,7 +63,7 @@
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"source-map-support": "^0.5.19",
|
||||
"tmp": "^0.2.1",
|
||||
"yargs": "17.0.1"
|
||||
"yargs": "^17.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/debug": "^4.1.6",
|
||||
|
15
src/cli.ts
15
src/cli.ts
@ -567,6 +567,21 @@ export function parseArgs(args: yargs.Argv<RawOptions>): RawOptions {
|
||||
|
||||
parsed.noOverwrite = parsed['no-overwrite'] = !parsed.overwrite;
|
||||
|
||||
// Since coerce in yargs seems to have broken since
|
||||
// https://github.com/yargs/yargs/pull/1978
|
||||
for (const arg of [
|
||||
'win32metadata',
|
||||
'browserwindow-options',
|
||||
'file-download-options',
|
||||
]) {
|
||||
if (parsed[arg] && typeof parsed[arg] === 'string') {
|
||||
parsed[arg] = parseJson(parsed[arg] as string);
|
||||
}
|
||||
}
|
||||
if (parsed['process-envs'] && typeof parsed['process-envs'] === 'string') {
|
||||
parsed['process-envs'] = getProcessEnvs(parsed['process-envs']);
|
||||
}
|
||||
|
||||
return parsed;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user