@pnpm/network.web-auth 1101.3.0 → 1101.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @pnpm/network.web-auth
2
2
 
3
+ ## 1101.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - @pnpm/error@1100.1.1
9
+
10
+ ## 1101.4.0
11
+
12
+ ### Minor Changes
13
+
14
+ - `pnpm login` no longer requires an interactive terminal when the registry supports web-based login: without a TTY it prints the authentication URL (skipping the QR code and the "Press ENTER to open the URL in your browser" prompt) and polls the registry until the browser approval completes. Only the classic username/password login still fails with `ERR_PNPM_LOGIN_NON_INTERACTIVE` in a non-interactive terminal.
15
+
3
16
  ## 1101.3.0
4
17
 
5
18
  ### Minor Changes
@@ -8,3 +8,8 @@
8
8
  * instead of aborting the authentication flow.
9
9
  */
10
10
  export declare function formatAuthUrlMessage(authUrl: string, globalWarn: (message: string) => void): string;
11
+ /**
12
+ * Formats the "Authenticate your account at" message without a QR code — for
13
+ * output that is not a terminal and cannot render one.
14
+ */
15
+ export declare function formatAuthUrlOnlyMessage(authUrl: string): string;
@@ -15,8 +15,15 @@ export function formatAuthUrlMessage(authUrl, globalWarn) {
15
15
  }
16
16
  catch (err) {
17
17
  globalWarn(`Could not generate a QR code: ${String(err)}`);
18
- return `Authenticate your account at:\n${authUrl}`;
18
+ return formatAuthUrlOnlyMessage(authUrl);
19
19
  }
20
- return `Authenticate your account at:\n${authUrl}\n\n${qrCode}`;
20
+ return `${formatAuthUrlOnlyMessage(authUrl)}\n\n${qrCode}`;
21
+ }
22
+ /**
23
+ * Formats the "Authenticate your account at" message without a QR code — for
24
+ * output that is not a terminal and cannot render one.
25
+ */
26
+ export function formatAuthUrlOnlyMessage(authUrl) {
27
+ return `Authenticate your account at:\n${authUrl}`;
21
28
  }
22
29
  //# sourceMappingURL=formatAuthUrlMessage.js.map
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { formatAuthUrlMessage } from './formatAuthUrlMessage.js';
1
+ export { formatAuthUrlMessage, formatAuthUrlOnlyMessage } from './formatAuthUrlMessage.js';
2
2
  export { generateQrCode } from './generateQrCode.js';
3
3
  export { pollForWebAuthToken, type PollForWebAuthTokenParams, type WebAuthContext, type WebAuthFetchOptions, type WebAuthFetchResponse, type WebAuthFetchResponseBody, type WebAuthFetchResponseBodyReader, type WebAuthFetchResponseHeaders, } from './pollForWebAuthToken.js';
4
4
  export { promptBrowserOpen, type PromptBrowserOpenContext, type PromptBrowserOpenParams, type PromptBrowserOpenReadlineInterface, } from './promptBrowserOpen.js';
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { formatAuthUrlMessage } from './formatAuthUrlMessage.js';
1
+ export { formatAuthUrlMessage, formatAuthUrlOnlyMessage } from './formatAuthUrlMessage.js';
2
2
  export { generateQrCode } from './generateQrCode.js';
3
3
  export { pollForWebAuthToken, } from './pollForWebAuthToken.js';
4
4
  export { promptBrowserOpen, } from './promptBrowserOpen.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/network.web-auth",
3
- "version": "1101.3.0",
3
+ "version": "1101.4.1",
4
4
  "description": "Web-based authentication flow with QR code display and token polling",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -28,13 +28,13 @@
28
28
  "!*.map"
29
29
  ],
30
30
  "dependencies": {
31
- "@pnpm/error": "1100.1.0",
31
+ "@pnpm/error": "1100.1.1",
32
32
  "open": "^11.0.0",
33
33
  "qrcode-terminal": "^0.12.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@jest/globals": "30.4.1",
37
- "@pnpm/network.web-auth": "1101.3.0",
37
+ "@pnpm/network.web-auth": "1101.4.1",
38
38
  "@types/qrcode-terminal": "^0.12.2"
39
39
  },
40
40
  "engines": {