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

api-landscape

v0.1.2

Published

API Landscape CLI

Downloads

6

Readme

DO NOT USE; Research project

Build Status

API Landscape Lifecycle Tooling

  • Human Entrypoint TODO
  • Machine Discovery

Requirements

Accounts

  • NPM account
  • GitHub account
  • Travis CI account
  • ZEIT Now account
  • Docker HUB account
  • Infrastructural Domain in ZEIT (optional)

Local Development

  • Docker

Collaborate

  • fork or create branch
  • dev

Env Varianbles

API_LANDSCAPE_DOMAIN APIS_DOMAINS

Local

SERVICE_SELF_PORT

CI/CD

SERVICE_SELF_PORT NOW_TOKEN NOW_TEAM API_LANDSCAPE_DOMAIN TRAVIS_PULL_REQUEST - Travis specific

Production

Build

SERVICE_SELF_PORT

Runtime

BASE_URL - It templates itself when the container starts

Dependencies

  • supermodels
  • governance repo

Commands

test

  • does the readme contain the right branch
  • dredd test the mock
  • governance

build

X - syntax validation X - dereferencing

  • generates readme

    • doc url
    • mock url
    • changelog
  • compiles and dereferences the templated and decomposed spec

    • github
    • version
    • host
    • license

serve maybe mock

  • starts a server
    • with the mock for the api
    • and the discovery endpoint service the compiled spec
    • and the human readable documentaion

dev

X - it builds the spec document

  • it starts the mock server
  • the mock server
    • is mocking the API
    • is serving the /discovery endpoint X - compat /discovery/doc endpoint X - compat /discovery/spec endpoint X - is serving the doc
    • is serving the spec document X - when the spec changes X - it rebuilds the spec X - it reloads the browser automatically
    • it reloads the mock

release

  • locally
    • for master branch
      • fail
    • for other branches
      • fail
  • in CI
    • for master branch
      • semantic release
    • for other branches
      • fail

deploy

  • locally

    • for master branch
    • for other branches
  • in CI

    • for master branch

    • for other branches
      • if PR
        • deploy to PR
      • if not PR
        • do nothing

References

  • yarn https://yarnpkg.com/en/
  • yarn workspaces https://yarnpkg.com/lang/en/docs/workspaces/
  • yarn workspaces with git submodules https://blog.nrwl.io/dev-workflow-using-git-submodules-and-yarn-workspaces-14fd06c07964
  • package.json https://docs.npmjs.com/files/package.json
  • grunt https://gruntjs.com/
  • grunt-contrib-watch https://github.com/gruntjs/grunt-contrib-watch#optionslivereload
  • grunt-contrib-connect https://github.com/gruntjs/grunt-contrib-connect
  • express
  • express-http-proxy
  • grunt-exec https://github.com/jharding/grunt-exec
  • livereload https://github.com/gruntjs/grunt-contrib-watch/blob/master/docs/watch-examples.md#enabling-live-reload-in-your-html
  • change case https://github.com/blakeembrey/change-casec
  • dotenv https://www.npmjs.com/package/dotenv
  • dotenv edit https://github.com/stevenvachon/edit-dotenv
  • portastic https://www.npmjs.com/package/portastic
  • openapi 2.0 https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
  • ReDoc https://github.com/Rebilly/ReDoc
  • Stoplight Prism https://github.com/stoplightio/prism
  • restful json https://restfuljson.org/
  • Dredd http://github.com/apiaryio/dredd
  • Dredd Hooks http://dredd.org/en/latest/hooks-nodejs.html
  • Swagger CLI https://github.com/APIDevTools/swagger-cli
  • Swagger Praser https://github.com/APIDevTools/swagger-parser
  • Semantic Release https://github.com/semantic-release/semantic-release
  • Github Protected Branches, Required reviiews and stats checks https://help.github.com/articles/about-protected-branches/
  • Github CLI for Comments https://github.com/stephencelis/ghi
  • Travis CI CLI https://github.com/travis-ci/travis.rb
  • Travis CI Build Environment Variables https://docs.travis-ci.com/user/environment-variables/
  • Travis CI Conditions https://docs.travis-ci.com/user/conditions-v1
  • ZEIT Now CLI https://zeit.co/now
  • ZEIT Now Build Environment Variables https://zeit.co/docs/features/build-env-and-secrets
  • ZEIT Now Runtime Environment Variables https://zeit.co/docs/features/env-and-secrets

TODO

Security

  • [] Make sure tokens are secure for forks in CI
  • [] Figure out PR deployment for forks reflecting ^^^

Infra

  • [] Conventions for environment varirables and configuration
    • service configuration
    • discovery: surrounding environment (local (mocking), stage, prod etc..)

Developer Experience

  • [] STDOUT from deploy task
  • [] Faster Docker build using arbitrary binary node-alpine + stoplight/prism images
  • [] mock component binary, problematic license
  • [] performance degradation by reverse proxying
  • [] show OAS validation errors with line numbers
  • [] faster build
    • [] using JS API instead of CLI
    • [] triggering mock reloadng instead of the full entire process/container lifecycle
  • [] not only API Specification is the contract
    • [] scenarios
    • [] prose