Skip to content

Ambisafe/hapi-semver-plugin

Repository files navigation

⚠️ DEPRECATED - Package Migrated to GitHub

This package has been migrated to GitHub Packages.

New Location: https://github.com/orgs/Ambisafe/packages/npm/package/hapi-semver-plugin

Install from GitHub Packages:

# Add to .npmrc
@ambisafe:registry=https://npm.pkg.github.com

# Install
npm install @ambisafe/hapi-semver-plugin

This GitLab repository is no longer maintained. Please use the GitHub Package.


hapi-semver-plugin

hapi.js plugin for semver versioned paths

install

npm install --save @ambisafe/hapi-semver-plugin

requirements

hapi.js 18.x.x

How to use

  1. attach hapi.js plugin
import HapiSemverPlugin from '@ambisafe/hapi-semver-plugin';
import packageJson from '../../package.json';

await server.register({
    register: HapiSemverPlugin,
    options: {
      defaultVersion: '*',
      minValidVersion: '1.0.0',
      maxValidVersion: packageJson.version
    }
  });
  1. transform all hapi routes
import { routesAddVersions } from '@ambisafe/hapi-semver-plugin';
export default routesAddVersions([...<hapi routes list>]);

About

hapi.js plugin for semver versioning paths

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors