@unikode/cli 1.0.15 → 1.0.16

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1609,6 +1609,7 @@ var ThemeDialogContent = () => {
1609
1609
  };
1610
1610
  // src/lib/oauth.ts
1611
1611
  import open from "open";
1612
+ import os from "os";
1612
1613
  var LOGIN_TIMEOUT_MS = 5 * 60 * 1000;
1613
1614
  function toBase64Url(input) {
1614
1615
  return Buffer.from(input).toString("base64url");
@@ -1645,6 +1646,7 @@ async function performLogin() {
1645
1646
  return new Promise((resolve, reject) => {
1646
1647
  const server = Bun.serve({
1647
1648
  port: 0,
1649
+ hostname: "0.0.0.0",
1648
1650
  async fetch(req) {
1649
1651
  const url = new URL(req.url);
1650
1652
  if (url.pathname !== "/callback") {
@@ -1714,7 +1716,8 @@ async function performLogin() {
1714
1716
  reject(new Error("Failed to start callback server"));
1715
1717
  return;
1716
1718
  }
1717
- const state = encodeState({ port, nonce });
1719
+ const cliHost = os.hostname();
1720
+ const state = encodeState({ port, nonce, cliHost });
1718
1721
  const redirectUri = `${apiUrl}/auth/callback`;
1719
1722
  const authorizeUrl = new URL(`${clerkFrontendApi}/oauth/authorize`);
1720
1723
  authorizeUrl.searchParams.set("response_type", "code");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unikode/cli",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {