GithubHelp home page GithubHelp logo

blipp's People

Contributors

abeluck avatar danielb2 avatar dennis-zent avatar dependabot[bot] avatar iniva avatar johnbrett avatar labs-scnm avatar svallory avatar y-lyn-10 avatar zedd45 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

blipp's Issues

options: {showAuth: true} throws error

Is this me or is it a bug? As soon as I add showAuth to the options I get an error: "showAuth" is not allowed

(I use glue) Here's my manifest:

const manifest = { server: {}, connections: [ {host: "localhost", port: 8000} ], registrations: [ {plugin: "hapi-auth-basic"}, {plugin: "blipp", options: {showAuth: true}} ] }

Now the interesting part. If I remove showAuth from options and then go to the module /node_modules/blipp/lib/index.js and edit line 11 to be showAuth: Joi.boolean().default(true) // instead of false
then it works!

How can this be?

Add custom properties to table

This might be outside this project's scope, but I'm wondering if there's any way to add custom properties to the table?

For example; in the below route, I make use of different plugins for access permissions, ideally I would like to display these permissions during startup in the table.

{ method: 'POST', path: '/api/example', config: { description: 'Example route', auth: 'bearer', plugins: { access: { mustInclude: ['primary'] }, validate: { headers: Joi.object().options({ allowUnknown: true }) } }, handler: function() { } }

Ability to exclude certain routes

Could you perhaps add an option to the option to exclude certain routes? I'm using the hapi-swagger plugin, and now blipp shows the /docs and /documentation routes in the route table.

Hapi v17 Support

Hi ๐Ÿ‘‹

I love this tiny plugin and I want to keep using it with the latest version of Hapi. Unfortunately, it introduces many breaking changes, so multiple versions will have to be supported afterwards.

I see that there is no recent activity on this repository, so I am opening this issue to ask: would you accept my PR if I take this assignment? ๐Ÿ˜‡

showScope option throwing an error

Using typescript. Registering blipp with this option configuration:

 {
    plugin: require("blipp"),
    options: { showAuth: true, showScope: true }
  }

Getting this error (took out my root directory):

Unhandled rejection { AssertionError [ERR_ASSERTION]: {
  "showAuth": true,
  "showScope" [1]: true
}

[1] "showScope" is not allowed
    at new AssertionError (/internal/assert.js:268:11)
    at Object.exports.assert (/node_modules/hoek/lib/index.js:736:11)
    at Object.exports.register (/node_modules/blipp/lib/index.js:20:10)
    at internals.Server.register (/node_modules/hapi/lib/server.js:431:35)
    at init (/index.ts:17:16)
    at Object.<anonymous> (/index.ts:45:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Module.m._compile (/node_modules/ts-node/src/index.ts:439:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/node_modules/ts-node/src/index.ts:442:12)
  generatedMessage: false,
  name: 'AssertionError [ERR_ASSERTION]',
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '==' }

edit: I'm using blipp version 3.0.0

Show the scope of each route

That's an idea for enhancement.

Currently we show what are the strategies for each route, using the { showAuth: true } option. How about if we add { showScope: true } to the options as well and list these values too?

I would be more than hapi to work on that :))

Does not work with version 8.


/home/andrew/Desktop/projects/github/photobox/services/service-members/node_modules/hapi/node_modules/hoek/lib/index.js:663
    throw new Error(msgs.join(' ') || 'Unknown error');
          ^
Error: A callback function is required to register a plugin
    at Object.exports.assert (/home/andrew/Desktop/projects/github/photobox/services/service-members/node_modules/hapi/node_modules/hoek/lib/index.js:663:11)
    at internals.Plugin.register (/home/andrew/Desktop/projects/github/photobox/services/service-members/node_modules/hapi/lib/plugin.js:154:10)
    at Object.<anonymous> (/home/andrew/Desktop/projects/github/photobox/services/service-members/server.js:16:8)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3

Fringe error catch

Hapijs 8.x

Have not confirmed if this is a hapijs feature or bug just thought its was worth note.

// here # 2 will be used, #1 ignored.
server.route({
config: { description: "descrip 1" },
config: { description: "descrip 2" }
});

Add option to filter out internal routes

You can define HapiJS routes that are only internal
http://hapijs.com/api#route-configuration

This was introduced in 9.1.0:
hapijs/hapi@66730f9

However, these internal routes are showing up on blipp. It'd be a nice option to be able to hide those. Perhaps the option could be hideInternalRoutes and default to false? I'd be more than happy to make the PR for this. It would push the devDependencies up a major version from 8.x.x. to 9.x.x. Given Hapi is currently on 15, this seems like it'd be safe. Thoughts?

Update dependencies after joi was split out

We need to undo some of the changes in #41:

warning blipp > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning blipp > @hapi/[email protected]: Switch to 'npm install joi'
warning blipp > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning blipp > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning blipp > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning blipp > @hapi/joi > @hapi/topo > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning blipp > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
  • @hapi/joi -> joi
  • Bump @hapi/hoek to latest

Add demo/example

Yes, using blipp is really easy and straightforward, but I think that it would be great to have a simple demo that runs via $ npm run demo :)

This would help new contributors to test/explore the project without monkey-patching the dependency on their existing projects. Also, it is a good first issue for such new contributors.

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.