@openbkn/bkn-sdk 0.1.1-alpha.4 → 0.1.1-alpha.5
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.
|
@@ -272,14 +272,21 @@ function mapToken(data) {
|
|
|
272
272
|
idToken: data.id_token
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
+
function isHeadless() {
|
|
276
|
+
if (process.platform !== "linux") return false;
|
|
277
|
+
return !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY;
|
|
278
|
+
}
|
|
275
279
|
function openBrowser(url) {
|
|
276
280
|
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
277
281
|
try {
|
|
278
|
-
spawn(cmd, [url], {
|
|
282
|
+
const child = spawn(cmd, [url], {
|
|
279
283
|
stdio: "ignore",
|
|
280
284
|
detached: true,
|
|
281
285
|
shell: process.platform === "win32"
|
|
282
|
-
})
|
|
286
|
+
});
|
|
287
|
+
child.on("error", () => {
|
|
288
|
+
});
|
|
289
|
+
child.unref();
|
|
283
290
|
} catch {
|
|
284
291
|
}
|
|
285
292
|
}
|
|
@@ -5127,6 +5134,7 @@ export {
|
|
|
5127
5134
|
readPlatformConfig,
|
|
5128
5135
|
writePlatformConfig,
|
|
5129
5136
|
resolveContext,
|
|
5137
|
+
isHeadless,
|
|
5130
5138
|
openBrowser,
|
|
5131
5139
|
fetchAuthStatus,
|
|
5132
5140
|
deviceLogin,
|
|
@@ -5161,4 +5169,4 @@ export {
|
|
|
5161
5169
|
exportCreds,
|
|
5162
5170
|
auth_exports
|
|
5163
5171
|
};
|
|
5164
|
-
//# sourceMappingURL=chunk-
|
|
5172
|
+
//# sourceMappingURL=chunk-67GKXAWG.js.map
|