New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

moniteur

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moniteur

Monitor your asset size over time, in your browser, or using the provided HTTP API.

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
58
increased by866.67%
Maintainers
1
Weekly downloads
 
Created
Source

moniteur

Monitor your asset size over time, in your browser, or using the provided HTTP API.

This is my first Node app, I know it is messy and it lacks tests.

More features to come: see roadmap.

Development

npm install moniteur

The node module is still at a very early stage and probably won't run for now, sorry, but you can still clone the project.

Clone the repository and run these commands:

npm run dev

Start

npm start

open http://localhost:3000

Configuration

For now, only stylesheets are supported.

You can monitor separate local files, single assets or bundles of assets:

{
  "assets": {
    "stylesheets": {
      "Main CSS": "test/fixtures/main.css",
      "Another CSS": "test/fixtures/main2.css",
      "FT desktop CSS bundle": [
        "http://s1.ft-static.com/m/style/90975546/bundles/core.css",
        "http://navigation.webservices.ft.com/v1/navigation/ft/css/style.min.css",
        "http://s1.ft-static.com/m/style/5c37627a/bundles/nonArticle.css"
      ],
      "Guardian's CSS": "http://assets.guim.co.uk/stylesheets/df893cb0c705c642348c474dbbd59f73/global.css"
    }
  }
}

Asset monitor API

Add a data point
moniteur save --config ../test/fixtures/test-config.json
Read data points
moniteur read --config ../test/fixtures/test-config.json

HTTP API

Read configuration

/config

JSON data object for HighCharts (providing the asset name's hash)

Since forever: /metrics/stylesheets/adf6e9c154cb57a818f7fb407085bff6

Between two dates: /metrics/stylesheets/adf6e9c154cb57a818f7fb407085bff6/1015711104475..1415711104475

License

ISC

Roadmap

  • Make moniteur a working node module
  • Run as some sort of daemon that monitors asset metrics every X seconds
  • Asset size budget limits
  • Monitor JavaScript files
  • Email alert when budget is almost reached or exceeded
  • Weekly email recaps
  • Tests!
  • Deployment script
  • (maybe?) providing a page's URL, scrape all assets out of it and analyse them
  • Option to filter graphs by time ranges (last 7 days, last 30 days, last year)
  • UA switch for remote assets

Keywords

FAQs

Package last updated on 15 Nov 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc