indiecrm-cli 0.2.1 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2
4
+
5
+ - Finish Salesprompter browser login even when the browser proxy keeps a localhost callback connection open.
6
+
3
7
  ## 0.2.1
4
8
 
5
9
  - Keep IndieCRM CRM commands outside the inherited Salesprompter research authentication hook.
package/dist/auth.js CHANGED
@@ -342,6 +342,9 @@ export async function loginWithBrowserConnect(options) {
342
342
  const redirectUri = `http://127.0.0.1:${address.port}/callback`;
343
343
  const closeServer = async () => await new Promise((resolve) => {
344
344
  server.close(() => resolve());
345
+ // A browser proxy may keep the callback socket open after the response
346
+ // finishes, which otherwise leaves the completed login waiting forever.
347
+ server.closeAllConnections();
345
348
  });
346
349
  const browserUrl = new URL(`${apiBaseUrl}/api/cli/auth/connect`);
347
350
  browserUrl.searchParams.set("redirect_uri", redirectUri);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indiecrm-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "IndieCRM CLI for CRM workspaces and Salesprompter research workflows",
5
5
  "author": "Daniel Sinewe <hello@danielsinewe.com>",
6
6
  "type": "module",