New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

fake-console

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fake-console

Simulate realistic console outputs for npm install, builds, CI jobs, error stacks, server starts, and more. Perfect for demos, tutorials, testing, and UI mockups.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

fake-console

Simulate realistic developer console outputs like npm install, server startup, build logs, CI jobs, test runners, and more — all with a simple JavaScript function.

Ideal for:

  • Demos
  • Tutorials
  • Mock dev tools
  • UI testing
  • CLI projects
  • Educational apps

Installation

npm install fake-console

Usage/Examples

const {
  simulateNpmInstall,
  simulateYarnInstall,
  simulateExpressServer,
  simulateGitPush,
  simulateDockerBuild,
  simulateErrorStack,
  simulateReactBuild,
  simulateAngularBuild,
  simulateNestStart,
  simulateSpringBootRun,
  simulateDjangoRun,
  simulateViteBuild,
  simulateWebpackBuild,
  simulateVueServe,
  simulateNextJsDev,
  simulatePythonFlaskRun,
  simulateWarning,
  simulateScriptExecution,
  simulateTestRunner,
  simulateCIJob
} = require('fake-console');

(async () => {
  await simulateNpmInstall('express');
  await simulateExpressServer(3000);
  simulateErrorStack();
})();

Available Simulations

FunctionDescription
simulateNpmInstall(pkg, duration)Simulates npm install logs
simulateYarnInstall(pkg, duration)Simulates yarn add output
simulateExpressServer(port)Logs Express server start-up
simulateGitPush()Simulates git push origin main
simulateDockerBuild()Simulates docker build and run logs
simulateErrorStack()Prints a fake runtime error with stack trace
simulateReactBuild()Simulates npm start of Create React App
simulateAngularBuild()Angular CLI build logs
simulateNestStart()NestJS app boot with dependency tree
simulateSpringBootRun()Spring Boot Java app logs
simulateDjangoRun()Django dev server log
simulateViteBuild()Vite dev server startup logs
simulateWebpackBuild()Webpack build output with chunks/assets
simulateVueServe()Vue CLI dev server logs
simulateNextJsDev()Next.js dev command output
simulatePythonFlaskRun()Flask app log
simulateWarning(msg)Display warning messages
simulateScriptExecution()Generic script logs (like Bash output)
simulateTestRunner()Simulated Jest/Mocha test logs
simulateCIJob()Simulates a full CI/CD job run log

Example: NPM Install

await simulateNpmInstall(['axios', 'mongoose'], 2000);
// > npm install axios mongoose
// Installing axios...
// Installing mongoose...
// + axios mongoose added

Keywords

console

FAQs

Package last updated on 08 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts