@openbkn/bkn-sdk 0.1.1-alpha.4 → 0.1.1-alpha.6
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/{chunk-APJNRHLS.js → chunk-GAYXY7LP.js} +17 -4
- package/dist/chunk-GAYXY7LP.js.map +1 -0
- package/dist/cli.js +29 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-APJNRHLS.js.map +0 -1
|
@@ -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
|
}
|
|
@@ -5057,7 +5064,12 @@ function whoami() {
|
|
|
5057
5064
|
"No decodable identity (token is opaque and no id_token saved). Use `auth status`."
|
|
5058
5065
|
);
|
|
5059
5066
|
}
|
|
5060
|
-
return
|
|
5067
|
+
return {
|
|
5068
|
+
...claims,
|
|
5069
|
+
baseUrl: baseUrl ?? void 0,
|
|
5070
|
+
userId: baseUrl ? activeUserId(baseUrl) : void 0,
|
|
5071
|
+
username: usernameOf(token)
|
|
5072
|
+
};
|
|
5061
5073
|
}
|
|
5062
5074
|
function listPlatforms2() {
|
|
5063
5075
|
const current = activePlatform();
|
|
@@ -5127,6 +5139,7 @@ export {
|
|
|
5127
5139
|
readPlatformConfig,
|
|
5128
5140
|
writePlatformConfig,
|
|
5129
5141
|
resolveContext,
|
|
5142
|
+
isHeadless,
|
|
5130
5143
|
openBrowser,
|
|
5131
5144
|
fetchAuthStatus,
|
|
5132
5145
|
deviceLogin,
|
|
@@ -5161,4 +5174,4 @@ export {
|
|
|
5161
5174
|
exportCreds,
|
|
5162
5175
|
auth_exports
|
|
5163
5176
|
};
|
|
5164
|
-
//# sourceMappingURL=chunk-
|
|
5177
|
+
//# sourceMappingURL=chunk-GAYXY7LP.js.map
|