Giter Club home page Giter Club logo

adminjs-hapijs's Introduction

Hapijs plugin for AdminJS

This is an official AdminJS plugin which integrates it to hapijs framework.

AdminJS

AdminJS is an automatic admin interface which can be plugged into your application. You, as a developer, provide database models (like posts, comments, stores, products or whatever else your application uses), and AdminJS generates UI which allows you (or other trusted users) to manage content.

Check out the example application here: https://adminjs-demo.herokuapp.com/admin/

Or visit AdminJS github page.

Usage

To see example usage visit the Hapi section under AdminJS project page

License

AdminJS is copyrighted © 2023 rst.software. It is a free software, and may be redistributed under the terms specified in the LICENSE file.

About rst.software

We’re an open, friendly team that helps clients from all over the world to transform their businesses and create astonishing products.

  • We are available for hire.
  • If you want to work for us - check out the career page.

adminjs-hapijs's People

Contributors

adamfrydrychrst avatar ariansobczak-rst avatar dependabot[bot] avatar dziraf avatar francois2metz avatar frontkickit avatar heygul avatar iaurg avatar jwasiak avatar michlask avatar sbross avatar semantic-release-bot avatar thiagonp avatar wojtek-krysiak avatar

Stargazers

 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

adminjs-hapijs's Issues

Error in runing adminjs-hapijs

When I run the package it suddenly appears that:

node_modules/@adminjs/hapi/src/extensions/session-auth.ts:49:18 - error TS2322: Type '{ 'hapi-auth-cookie': { redirectTo: false; }; }' is not assignable to type 'PluginSpecificConfiguration'.
  Object literal may only specify known properties, and ''hapi-auth-cookie'' does not exist in type 'PluginSpecificConfiguration'.

49       plugins: { 'hapi-auth-cookie': { redirectTo: false } },
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@adminjs/hapi/src/plugin.ts:156:15 - error TS18046: 'e' is of type 'unknown'.

156           if (e.statusCode >= 400 && e.statusCode < 500) {
                  ~

node_modules/@adminjs/hapi/src/plugin.ts:156:38 - error TS18046: 'e' is of type 'unknown'.

156           if (e.statusCode >= 400 && e.statusCode < 500) {
                                         ~

node_modules/@adminjs/hapi/src/plugin.ts:157:32 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error'.

157             throw Boom.boomify(e, { statusCode: e.statusCode });
                                   ~

node_modules/@adminjs/hapi/src/plugin.ts:157:49 - error TS18046: 'e' is of type 'unknown'.

157             throw Boom.boomify(e, { statusCode: e.statusCode });
                                                    ~

node_modules/@adminjs/hapi/src/plugin.ts:161:32 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error'.

161             throw Boom.boomify(e);

Even though I replace depreciated hapi-auth-cookie with @hapi/cookie, it still doesn't work.

Is there anything to resolve it?

Using inert together with changing 'relativeTo' option causes assets not to load (403 Forbidden)

When in hapi server configuration I added option:
const server = new Hatpi.Server({ routes: { files: { relativeTo: Path.join(__dirname, 'assets') //<- This is important line! } } });
https://github.com/SoftwareBrothers/admin-bro-hapijs/blob/a56cbc43bc90ccec6c023ef71ad32e719d5e4909/plugin.js#L136 This is probably related to this line. Src is relating on default relativeTo value which is '.' so any change to it throws 403 Forbidden.

Here is documentation to routes/files option https://github.com/hapijs/hapi/blob/master/API.md#route.options.files
Also possible fix could be to play with confine in Inert library: https://github.com/hapijs/inert

Error: Cannot find module 'admin-bro'

Getting the following error.

Error: Cannot find module 'admin-bro'
Require stack:
- /Users/admin-bro-test/node_modules/admin-bro-hapijs/plugin.js
- /Users/admin-bro-test/node_modules/admin-bro-hapijs/index.js
- /Users/admin-bro-test/server/manifest.js
- /Users/admin-bro-test/server/index.js

Following module added. "admin-bro-hapijs": "^2.0.0",

Will debug this further during this weekend and provide my findings.

The automated release is failing 🚨

🚨 The automated release from the beta branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the beta branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot 📦🚀

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.