UNPKG

saget-auth-middleware

Version:

SSO Middleware dengan dukungan localStorage untuk validasi authentifikasi domain malinau.go.id dan semua subdomain pada aplikasi Next.js 14 & 15

47 lines (39 loc) • 908 B
#!/usr/bin/env node import { setupEnvironment } from './setup.js'; const args = process.argv.slice(2); const command = args[0]; function showHelp() { console.log(` šŸ” SAGET Auth Middleware CLI Usage: npx saget-auth-middleware <command> Commands: init Initialize SSO configuration in your project help Show this help message Examples: npx saget-auth-middleware init npx saget-auth-middleware help `); } function handleCommand() { switch (command) { case 'init': console.log('šŸš€ Initializing SAGET SSO Middleware...'); setupEnvironment(); break; case 'help': case '--help': case '-h': showHelp(); break; default: if (!command) { console.log('āŒ No command provided.'); } else { console.log(`āŒ Unknown command: ${command}`); } showHelp(); process.exit(1); } } handleCommand();