UNPKG

secure-scan-js

Version:

A JavaScript implementation of Yelp's detect-secrets tool - no Python required

23 lines (20 loc) 763 B
#!/usr/bin/env node import { createRequire } from 'module'; const require = createRequire(import.meta.url); const auth = require('../src/auth-web.js'); const chalk = require('chalk'); console.log(chalk.cyan('===================')); console.log(chalk.cyan('Auth Status Checker')); console.log(chalk.cyan('===================')); // Check the authentication status const status = auth.getTokenStatus(); if (status.valid) { console.log(status, "__status") console.log(chalk.green('\n✅ You are authenticated!')); console.log(chalk.green(`Token valid until: ${status.expiresAt}`)); console.log(chalk.green(`Time remaining: ${status.expiresIn}`)); process.exit(0); } else { console.log(chalk.yellow(`\n⚠️ ${status.message}`)); process.exit(1); }