cli.js 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env node
  2. 'use strict';
  3. // @ts-check
  4. // ==================================================================================
  5. // cli.js
  6. // ----------------------------------------------------------------------------------
  7. // Description: System Information - library
  8. // for Node.js
  9. // Copyright: (c) 2014 - 2022
  10. // Author: Sebastian Hildebrandt
  11. // ----------------------------------------------------------------------------------
  12. // License: MIT
  13. // ==================================================================================
  14. // ----------------------------------------------------------------------------------
  15. // Dependencies
  16. // ----------------------------------------------------------------------------------
  17. const si = require('./index');
  18. // ----------------------------------------------------------------------------------
  19. // Main
  20. // ----------------------------------------------------------------------------------
  21. (function () {
  22. si.getStaticData().then(
  23. (data => {
  24. data.time = si.time();
  25. console.log(JSON.stringify(data, null, 2));
  26. }
  27. ));
  28. })();