GithubHelp home page GithubHelp logo

scooter's Introduction

@hapi/scooter

User-agent information plugin.

scooter is part of the hapi ecosystem and was designed to work seamlessly with the hapi web framework and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out hapi – they work even better together.

Visit the hapi.dev Developer Portal for tutorials, documentation, and support

Useful resources

scooter's People

Contributors

arb avatar cjihrig avatar danielb2 avatar devinivy avatar geek avatar hueniverse avatar jarrodyellets avatar jaw187 avatar kyleamathews avatar lloydbenson avatar marsup avatar nargonath avatar nlf avatar nvcexploder avatar thegoleffect avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scooter's Issues

Hapi >= 8 Listed as Peer Dependency But Not Used

I see that here Hapi is listed as a peer-dependency but not actually used anywhere within the code. Looking through the commit history it appears to be this way so that it is run on a compatible Hapi version.

This doesn't seem like the correct usage of peerDependencies to me and it is also preventing me from locking down my dependencies (and sub-dependencies) via shrinkwrap without including hapi as a dependency in my module.

In my particular case I have a shared module with common plugins for my Hapi servers. These plugins are not dependent upon Hapi (similar to scooter) but are meant to be used with it.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

Assertion error: name is missing with hapi 17 and v4.0

Hi, hope this is not a stupid error from my end....I get the following error when I try to start the server:

{ AssertionError [ERR_ASSERTION]: Invalid plugin options {
  "plugin": {
    "register": (server, options, next) => {\n\n    server.ext('onRequest', internals.onRequest);\n    return next();\n},
    "name" [1]: -- missing --
  }
}

[1] "name" is required

I am registering the plugin with await server.register(Scooter)

Cannot find module 'semver'

Seems like since explicit semver dependency was removed in this commit f9cdc67 the plugin is broken.

This is because the dependency useragent uses but does not depend on semver (only specified as a dev dep). https://github.com/3rd-Eden/useragent/blob/master/package.json#L40

Example:

const Hapi = require('hapi');
const server =  Hapi.server({ port: 8086 });
const Scooter = require('scooter');

server.route({
    method: 'GET',
    path: '/user-agent',
    handler: (request, reply) => {

        return reply(request.plugins.scooter.toJSON());
    }
});

const start = async () => {

    await server.register(Scooter);

    await server.start();

    console.log(server.info.uri + '/user-agent');
};

start();

When using hapi 17.8.1 and scooter 5.0.1 and installing deps with --production flag the example code above will throw:

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'semver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/matt/Desktop/scooter-test/node_modules/useragent/features/index.js:7:14)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Arrived bird one scooter 590

How handle it fully charged

Support plan

  • is this issue currently blocking your project? (yes/no):
  • is this issue affecting a production system? (yes/no):

Context

  • node version:
  • module version:
  • environment (e.g. node, browser, native):
  • used with (e.g. hapi application, another framework, standalone, ...):
  • any other relevant information:

How can we help?

const some = 'properly formatted code example';

Minor version upgrade is a breaking change

The recent update 4.0.1 added a dependency for Hapi >=17.7.0 and updated the plugin format.

This is a breaking change for projects that are not on Hapi 17 yet because the changes are not backwards compatible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.