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 🙏

© 2026 – Pkg Stats / Ryan Hefner

greenforce

v0.0.25

Published

Core Vue 3 plugins used across Blue Bear applications: authenticated API client, dialog/toast/navigation managers, and shared mixins.

Readme

Greenforce

A Vue 3 plugin library that bundles the core building blocks used across our Vue applications: an authenticated API client, a dialog manager, a navigation/tab manager, a toast notification system, and a set of reusable mixins and errors.

Installation

Greenforce ships a compiled dist/ (ESM + CJS + .d.ts). No bundler configuration is needed for node_modules/greenforce. Add it to a Vue 3 app alongside its peer dependencies:

npm install greenforce
npm install @auth0/auth0-vue vue vue-i18n vue-logger-plugin vue-router vuetning

axios and uuid are pulled in automatically as runtime dependencies. Requires Node >= 18 to install.

Usage

Every manager is installed as a standard Vue plugin via a create* factory:

import { createApp } from "vue"
import {
    createApiClient,
    createDialogManager,
    createNavigationManager,
    createToastManager,
} from "greenforce"

import App from "./App.vue"
import router from "./router"
import i18n from "./i18n"
import { auth0 } from "./auth0"
import logger from "./logger"

const app = createApp(App)

app.use(auth0)
app.use(router)
app.use(i18n)
app.use(logger)

app.use(createApiClient({ auth0, logger }))
app.use(createDialogManager())
app.use(createNavigationManager({ router, i18n }))
app.use(createToastManager({ i18n }))

app.mount("#app")

createApiClient is idempotent: the first call caches the installer and the exported apiClient Axios instance; subsequent calls return the same installer regardless of new options.

Public API

Everything consumers can import lives in src/index.ts:

Installers

  • createApiClient(options) — configures an Axios instance that injects Auth0 tokens and logs out the user on 401 responses.
  • createDialogManager() — installs modal/dialog lifecycle management.
  • createNavigationManager(options) — installs the tab-based navigation system on top of Vue Router.
  • createToastManager(options) — installs the toast notification system.

Managers and classes

  • ApiResponse — wrapper around Axios responses.
  • DialogManager, NavigationManager, ToastManager — singleton managers exposed for direct use.
  • Tab — represents an individual navigation tab.
  • encodePath — helper from tab-parser for encoding navigation paths.
  • VIEW_MODE — constants for navigation view modes.

Mixins

  • ViewMixin — base functionality for views.
  • ChildViewMixin — extends ViewMixin for nested/child views.
  • InitializableMixin — provides an initialization lifecycle hook.

Errors

  • ApiError — thrown by the API client for non-success responses; carries status and payload context.
  • ArgumentNullError — guard error used for required-argument validation.

Shared instance

  • apiClient: AxiosInstance — the Axios instance created by createApiClient. Available after the first createApiClient call.

Project structure

src/
  api-client/          Axios + Auth0 integration
  dialog-management/   Dialog/modal manager
  errors/              ApiError, ArgumentNullError
  mixins/              ViewMixin, ChildViewMixin, InitializableMixin
  navigation-management/ Tab-based navigation manager
  toast-management/    Toast notification manager
  index.ts             Public entry point

When adding a new public symbol, export it from src/index.ts or consumers will not see it.

Development

npm install
npm run typecheck   # tsc --noEmit against src/
npm run lint        # check for lint issues
npm run lint:fix    # auto-fix where possible
npm run test        # run Vitest suite
npm run test:watch  # Vitest in watch mode
npm run build       # tsup → dist/
npm run build:watch # tsup in watch mode

ESLint enforces 4-space indentation, no semicolons, trailing commas in multiline literals, Vue 3 essential rules, and the project's TypeScript config. TypeScript runs in strict mode.

Release

Every push to main publishes a new patch version to npm. CI (GitHub Actions, see .github/workflows/publish-npm.yml) runs typecheck + lint + test + build, then npm publish, then tags the commit v<version> and increments the REVISION_VERSION repository variable via the GitHub API.

Humans edit MAJOR_VERSION or MINOR_VERSION under the repo's Actions variables when a minor/major bump is warranted — the CI owns the patch number.

Operator failure modes:

  • Publish succeeds but tag push fails: version exists on npm without a git tag. Create the tag manually on the relevant commit.
  • Publish succeeds but the REVISION_VERSION bump fails: the next main push will retry the same version and npm publish will 403. Bump REVISION_VERSION in the repo's Actions variables manually once, then push.
  • Publish fails: no tag, no bump. Next push retries with the same version number.

Requirements

  • Vue 3.5+
  • Node 18+
  • Peer plugins: @auth0/auth0-vue, vue-router, vue-i18n, vue-logger-plugin, vuetning