hedgequantx 2.6.70 → 2.6.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.6.70",
3
+ "version": "2.6.72",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -841,28 +841,36 @@ const setupBrowserOAuth = async (provider, config) => {
841
841
 
842
842
  if (browserOpened) {
843
843
  console.log(makeLine(chalk.green('BROWSER OPENED')));
844
+ console.log(makeLine(''));
845
+ console.log(makeLine(chalk.white('AFTER LOGGING IN, YOU WILL SEE A CODE')));
846
+ console.log(makeLine(chalk.white('COPY THE ENTIRE CODE AND PASTE IT BELOW')));
847
+ console.log(makeLine(''));
848
+ if (config.codeFormat) {
849
+ console.log(makeLine(chalk.white(`THE CODE LOOKS LIKE: ${config.codeFormat}`)));
850
+ console.log(makeLine(''));
851
+ }
852
+ console.log(makeLine(chalk.white('TYPE < TO CANCEL')));
853
+ drawBoxFooter(boxWidth);
854
+ console.log();
844
855
  } else {
845
856
  console.log(makeLine(chalk.yellow('COULD NOT OPEN BROWSER (VPS/SSH?)')));
846
857
  console.log(makeLine(''));
847
- console.log(makeLine(chalk.white('OPEN THIS URL IN YOUR BROWSER:')));
858
+ console.log(makeLine(chalk.white('AFTER LOGGING IN, YOU WILL SEE A CODE')));
859
+ console.log(makeLine(chalk.white('COPY THE ENTIRE CODE AND PASTE IT BELOW')));
848
860
  console.log(makeLine(''));
849
- const maxUrlLen = W - 4;
850
- for (let i = 0; i < url.length; i += maxUrlLen) {
851
- console.log(makeLine(chalk.cyan(url.substring(i, i + maxUrlLen))));
861
+ if (config.codeFormat) {
862
+ console.log(makeLine(chalk.white(`THE CODE LOOKS LIKE: ${config.codeFormat}`)));
863
+ console.log(makeLine(''));
852
864
  }
865
+ console.log(makeLine(chalk.white('TYPE < TO CANCEL')));
866
+ drawBoxFooter(boxWidth);
867
+ // Display URL outside the box for easy copy-paste (no line breaks)
868
+ console.log();
869
+ console.log(chalk.yellow(' OPEN THIS URL IN YOUR BROWSER:'));
870
+ console.log();
871
+ console.log(chalk.cyan(` ${url}`));
872
+ console.log();
853
873
  }
854
- console.log(makeLine(''));
855
- console.log(makeLine(chalk.white('AFTER LOGGING IN, YOU WILL SEE A CODE')));
856
- console.log(makeLine(chalk.white('COPY THE ENTIRE CODE AND PASTE IT BELOW')));
857
- console.log(makeLine(''));
858
- if (config.codeFormat) {
859
- console.log(makeLine(chalk.white(`THE CODE LOOKS LIKE: ${config.codeFormat}`)));
860
- console.log(makeLine(''));
861
- }
862
- console.log(makeLine(chalk.white('TYPE < TO CANCEL')));
863
-
864
- drawBoxFooter(boxWidth);
865
- console.log();
866
874
 
867
875
  const code = await prompts.textInput(chalk.cyan('PASTE AUTHORIZATION CODE:'));
868
876
 
@@ -976,9 +984,7 @@ const setupDeviceFlowOAuth = async (provider, config) => {
976
984
 
977
985
  console.log(makeLine(chalk.yellow('DEVICE FLOW AUTHENTICATION')));
978
986
  console.log(makeLine(''));
979
- console.log(makeLine(chalk.white('1. OPEN THIS URL IN YOUR BROWSER:')));
980
- console.log(makeLine(''));
981
- console.log(makeLine(chalk.cyan(deviceResult.verificationUri || deviceResult.verificationUriComplete)));
987
+ console.log(makeLine(chalk.white('1. OPEN THE URL BELOW IN YOUR BROWSER')));
982
988
  console.log(makeLine(''));
983
989
  console.log(makeLine(chalk.white('2. ENTER THIS CODE WHEN PROMPTED:')));
984
990
  console.log(makeLine(''));
@@ -991,6 +997,14 @@ const setupDeviceFlowOAuth = async (provider, config) => {
991
997
 
992
998
  drawBoxFooter(boxWidth);
993
999
 
1000
+ // Display URL outside the box for easy copy-paste
1001
+ const verificationUrl = deviceResult.verificationUriComplete || deviceResult.verificationUri;
1002
+ console.log();
1003
+ console.log(chalk.yellow(' OPEN THIS URL IN YOUR BROWSER:'));
1004
+ console.log();
1005
+ console.log(chalk.cyan(` ${verificationUrl}`));
1006
+ console.log();
1007
+
994
1008
  // Poll for token
995
1009
  const pollSpinner = ora({ text: 'WAITING FOR AUTHORIZATION...', color: 'cyan' }).start();
996
1010