npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mvp-contributions

v0.1.5

Published

CLI tool to review and submit your Microsoft MVP contributions

Downloads

4

Readme

mvp-contributions

npm version Node.js Package JavaScript Style Guide

CLI tool to review and submit your Microsoft MVP contributions

Status: Beta quality (manually tested, bugs are expected)

Screenshot

🤨 Rationale

The MVP website is quite slow (yup, indeed Microsoft... 🤷) so it's tedious to submit a lot of stuff by hand. This tool should be able to automate most of the hard work.

It also provide convenience commands to delete entries and deduplicate them.

🛠️ Requirements

This tool requires a modern version of Node.js (18+)

🔑 Authentication

Go to your browser of choice and head to mvp.microsoft.com. Do a login. Inspect your cookies and copy the value for the cookie .AspNet.Cookies.

👩‍🏫 Usage

You can use this tool with npx or install it locally.

npx usage

Just run:

npx mvp-contributions --help

Local installation

Install the tool locally with

npm i -g mvp-contributions

Then you can just run:

mvp-contributions --help

Available commands

These are the commands currently supported by the tool

  • list [options]: List submitted contributions (default command)
  • delete [options] <contributionId...>: Deletes one or more contributions by contribution by ID
  • dedup [options]: Deletes duplicated contributions
  • submit [options] [filepath]: Submit new contributions from contributions YAML file
  • help [command]: display help for command

All commands (except help) requires you to have a valid session token. This token can be passed either through the -c flag or by setting the environment variable MVP_COOKIE (recommended).

To get a valid session token, go to https://mvp.microsoft.com/. Perform a login and then inspect the page with your browser developer tools. Check out the cookies (Application tab in Chrome) and copy the value for the .AspNet.Cookies cookie.

Example

If your .AspNet.Cookies value is etzEL73OjWhpwayx... (in reality it will be much longer than this), then you can do:

export MVP_COOKIE="etzEL73OjWhpwayx..."
mvp-contributions list

or

mvp-contributions -c "etzEL73OjWhpwayx..." list

🥹 Generating YAML files from existing content

The goal of this project is to be able to come up with ways of fetching all the content activities from one or more sources and convert them to the expected YAML contribution format.

Some examples are available on how you might be able to fetch and convert data from various sources:

Feel free to submit your examples here.

📦 Schema

Your content.yml file needs to follow a very specific schema.

The list of entries should be an array and every entry must have 2 fields: type (string) and props (object).

The props object will have a different schema depending on the selected type.

Here you can find the list of all the available types (pointing to their schema file in Zod):

Note tha the contributions.yml committed in this repository contains some commented examples that you can use as a reference.

The list of all available Contribution Areas is available in src/ContributionAreas.ts

💡 Future improvement ideas

  • Better testing (no testing right now... confused_john_travolta.gif)
  • Support content files in JS/TS (to have a better authoring experience with autocompletion and type checking)
  • Detection of expired sessions (it generally lasts 1 hour)
  • Avoid submit duplicated content (fetch all contente first and deduplicate on insertion)

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.