single-file-cli 2.0.8 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.json +1 -1
- package/lib/browser.js +2 -5
- package/lib/version.js +1 -1
- package/options.js +1 -1
- package/package.json +1 -1
package/deno.json
CHANGED
package/lib/browser.js
CHANGED
|
@@ -31,7 +31,7 @@ let child, profilePath;
|
|
|
31
31
|
export { launchBrowser, closeBrowser };
|
|
32
32
|
|
|
33
33
|
async function launchBrowser(options = {}, indexPath = 0) {
|
|
34
|
-
|
|
34
|
+
const executablePath = options.executablePath || BROWSER_PATHS[build.os][indexPath];
|
|
35
35
|
const args = Array.from(BROWSER_ARGS);
|
|
36
36
|
profilePath = await makeTempDir();
|
|
37
37
|
if (options.headless) {
|
|
@@ -39,9 +39,6 @@ async function launchBrowser(options = {}, indexPath = 0) {
|
|
|
39
39
|
} else {
|
|
40
40
|
args.push("--start-maximized");
|
|
41
41
|
}
|
|
42
|
-
if (options.executablePath) {
|
|
43
|
-
path = options.executablePath;
|
|
44
|
-
}
|
|
45
42
|
if (options.debug) {
|
|
46
43
|
args.push("--auto-open-devtools-for-tabs");
|
|
47
44
|
}
|
|
@@ -61,7 +58,7 @@ async function launchBrowser(options = {}, indexPath = 0) {
|
|
|
61
58
|
if (options.args) {
|
|
62
59
|
args.push(...options.args);
|
|
63
60
|
}
|
|
64
|
-
const command = new Command(
|
|
61
|
+
const command = new Command(executablePath, { args, stdout: PIPED_STD_CONFIG, stderr: PIPED_STD_CONFIG });
|
|
65
62
|
try {
|
|
66
63
|
child = await command.spawn();
|
|
67
64
|
} catch (error) {
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "2.0.
|
|
1
|
+
export const version = "2.0.10";
|
package/options.js
CHANGED
|
@@ -154,7 +154,7 @@ async function getOptions() {
|
|
|
154
154
|
Object.keys(OPTIONS_INFO).forEach(optionName => {
|
|
155
155
|
const optionInfo = getOptionInfo(optionName);
|
|
156
156
|
const optionKey = getOptionKey(optionName, optionInfo);
|
|
157
|
-
if (optionInfo.defaultValue !== undefined) {
|
|
157
|
+
if (options[optionKey] === undefined && optionInfo.defaultValue !== undefined) {
|
|
158
158
|
options[optionKey] = OPTIONS_INFO[optionName].defaultValue;
|
|
159
159
|
}
|
|
160
160
|
});
|