@kud/foxhop-cli 1.0.0 → 1.0.1
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/dist/cli.js +11 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -242,11 +242,17 @@ var sync = (node, cli, dir = defaultScriptsDir()) => {
|
|
|
242
242
|
// src/cli.ts
|
|
243
243
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
244
244
|
var browserApp = () => process.env.FOXHOP_BROWSER ?? "Firefox Nightly";
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
var runOpen = (args) => {
|
|
246
|
+
const child = spawn("/usr/bin/open", args, {
|
|
247
|
+
stdio: "ignore",
|
|
248
|
+
detached: true
|
|
249
|
+
});
|
|
250
|
+
child.on("error", () => {
|
|
251
|
+
});
|
|
252
|
+
child.unref();
|
|
253
|
+
};
|
|
254
|
+
var foreground = () => runOpen(["-a", browserApp()]);
|
|
255
|
+
var openUrl = (url) => runOpen([url]);
|
|
250
256
|
var focus = defineCommand({
|
|
251
257
|
meta: {
|
|
252
258
|
name: "focus",
|