nc-agent 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/bin/nc.mjs +8 -4
  2. package/package.json +1 -1
package/bin/nc.mjs CHANGED
@@ -1722,15 +1722,19 @@ async function runDeviceFlow({ installMode = undefined, ncRoot = undefined } = {
1722
1722
  const dim = '\x1b[2m';
1723
1723
  const reset = '\x1b[0m';
1724
1724
 
1725
- const completeUrl = verification_uri_complete || `${verification_uri}?user_code=${encodeURIComponent(user_code)}`;
1725
+ // Print the CLEAN verification_uri (no ?user_code= query). The /device page
1726
+ // has a manual 8-character code input; the deep-link form is useless here
1727
+ // because the login redirect strips the query (return_to=/device only), so
1728
+ // the code would never auto-fill after sign-in anyway.
1729
+ const verifyUrl = verification_uri || `${baseUrl}/device`;
1726
1730
 
1727
1731
  printBox([
1728
1732
  { text: `${bold}Node Command — Device Authorization${reset}`, rawLength: 'Node Command — Device Authorization'.length },
1729
1733
  { text: '', rawLength: 0 },
1730
- { text: 'To complete pairing, visit this URL in your browser:', rawLength: 'To complete pairing, visit this URL in your browser:'.length },
1731
- { text: `${cyan}${bold}${completeUrl}${reset}`, rawLength: completeUrl.length },
1734
+ { text: 'To complete pairing, open this URL in your browser:', rawLength: 'To complete pairing, open this URL in your browser:'.length },
1735
+ { text: `${cyan}${bold}${verifyUrl}${reset}`, rawLength: verifyUrl.length },
1732
1736
  { text: '', rawLength: 0 },
1733
- { text: `Confirmation Code: ${yellow}${bold}${user_code}${reset}`, rawLength: `Confirmation Code: ${user_code}`.length },
1737
+ { text: `Then enter this code on the page: ${yellow}${bold}${user_code}${reset}`, rawLength: `Then enter this code on the page: ${user_code}`.length },
1734
1738
  { text: '', rawLength: 0 },
1735
1739
  { text: `${dim}Waiting for approval in browser...${reset}`, rawLength: 'Waiting for approval in browser...'.length }
1736
1740
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nc-agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "bin": {