three-blocks-login 0.1.6 → 0.1.7

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/login.js +8 -0
  2. package/package.json +1 -1
package/bin/login.js CHANGED
@@ -362,6 +362,14 @@ let CHANNEL = String( args.channel || process.env.THREE_BLOCKS_CHANNEL || "stabl
362
362
  if ( ! [ 'stable', 'alpha', 'beta' ].includes( CHANNEL ) ) CHANNEL = 'stable';
363
363
  const PRINT_SHELL = !! ( args[ 'print-shell' ] || args.printShell || process.env.THREE_BLOCKS_LOGIN_PRINT_SHELL === '1' );
364
364
  const NON_INTERACTIVE = !! ( args[ 'non-interactive' ] || args.nonInteractive || process.env.CI === '1' );
365
+ const SKIP_LOGIN = /^1|true|yes$/i.test( String( process.env.THREE_BLOCKS_LOGIN_SKIP || '' ) );
366
+
367
+ if ( SKIP_LOGIN ) {
368
+
369
+ if ( ! QUIET ) console.error( `${banner} skipping login (THREE_BLOCKS_LOGIN_SKIP=1)` );
370
+ process.exit( 0 );
371
+
372
+ }
365
373
 
366
374
  // Load .env from current working directory (no deps)
367
375
  loadEnvFromDotfile( process.cwd() );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-blocks-login",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Fetch a short-lived token from the three-blocks broker and configure npm for the current context.",
5
5
  "type": "module",
6
6
  "bin": {