Git Product home page Git Product logo

loopback4-example-shopping's Introduction

@loopback/example-shopping

Continuous Integration Status

This project aims to represent an online ecommerce platform APIs to validate / test the LoopBack 4 framework readiness for GA. See loopbackio/loopback-next#1476 for more information.

Shopping example overview diagram

Pre-requisites

Node.js >= 8.9.0 and running instances of a MongoDB and Redis server are required for the app to start. The Redis server is used for the shopping cart, while MongoDB is used for the rest of the models in the app.

Docker is required for running tests, make sure it is running if you want to run the tests.

Installation

Do the following to clone and start the project.

In case you have Docker installed on your system and don't want to manually install MongoDB and Redis, you can run npm run docker:start to download their images and start the servers. Otherwise, you can skip this command.

$ git clone https://github.com/loopbackio/loopback4-example-shopping.git
$ cd loopback4-example-shopping
$ npm i
$ npm run docker:start
$ npm start

Usage

The main app will be running at http://localhost:3000. The shopping website (Shoppy) is at http://localhost:3000/shoppy.html, and the API Explorer at http://localhost:3000/explorer/.

Shoppy website

You will also see Recommendation server is running at http://localhost:3001., it is the server to which the services/recommender.service service will connect to get the recommendations for a user.

The app will be pre-populated with some products and users when it starts; and all existing products, users, shopping cart and orders will be deleted too. If you don't want to reset the database, set databaseSeeding to false in the application configuration object.

Tests

This repository comes with integration, unit, acceptance and end-to-end (e2e) tests. To execute these, see instructions below.

Note: prior to running the e2e tests the application must be running. On a different terminal do:

$ npm start

then on another terminal do the following to execute e2e tests:

$ npm run test:ui

For other tests:

$ npm test

Models

This app has the following models:

  1. User - representing the users of the system.
  2. UserCredentials - representing sensitive credentials like a password.
  3. Product - a model which is mapped to a remote service by services/recommender.service.
  4. ShoppingCartItem - a model for representing purchases.
  5. ShoppingCart - a model to represent a user's shopping cart, can contain many items (items) of the type ShoppingCartItem.
  6. Order - a model to represent an order by user, can have many products (products) of the type ShoppingCartItem.
  7. KeyAndPassword - a model to represent the user's password reset request
  8. EmailTemplate - a model to represent the email request template for Nodemailer
  9. NodeMailer - a model to represent the response from Nodemailer after sending reset password email
  10. Envelope - a model to represent the envelope portion of the response from Nodemailer after sending reset password email
  11. ResetPasswordInit - a model to represent the request for initial password reset step

ShoppingCart and Order are marked as belonging to the User model by the use of the @belongsTo model decorator. Correspondingly, the User model is marked as having many Orders using the @hasMany model decorator. Although possible, a hasMany relation for User to ShoppingCart has not be created in this particular app to limit the scope of the example.

User is also marked as having one UserCredentials model using the @hasOne decorator. The belongsTo relation for UserCredentials to User has not been created to keep the scope smaller.

Controllers

Controllers expose API endpoints for interacting with the models and more.

In this app, there are four controllers:

  1. ping - a simple controller to checking the status of the app.
  2. user-management - controller for creating user, fetching user info, updating user info, and logging in.
  3. shopping-cart - controller for creating, updating, deleting shopping carts, and getting the details about a shopping cart.
  4. user-order - controller for creating, updating, deleting orders, and getting the details about an order.
  5. product - controller for managing products catalog

Services

Services are modular components that can be plugged into a LoopBack application in various locations to contribute additional capabilities and features to the application.

This app has five services:

  1. services/recommender.service - responsible for connecting to a "remote" server and getting recommendations for a user. The API endpoint at GET /users​/{userId}​/recommend, is made possible by this service.
  2. services/user-management.service - responsible for verifying if user exists and the submitted password matches that of the existing user.
  3. services/hash.password.bcryptjs - responsible for generating and comparing password hashes.
  4. services/validator - responsible for validating email and password when a new user is created.
  5. services/jwt.service - responsible for generating and verifying JSON Web Token.
  6. services/email.service - responsible for sending reset password email

Authentication

Note: This app contains a login endpoint for the purpose of spike and demo, the authentication for the CRUD operations and navigational endpoints of model User is still in progress.

Login

The endpoint for logging in a user is a POST request to /users/login.

Once the credentials are extracted, the logging-in implementation at the controller level is just a four step process. This level of simplicity is made possible by the use of the UserService service provided by @loopback/authentication.

  1. const user = await this.userService.verifyCredentials(credentials) - verify the credentials.
  2. const userProfile = this.userService.convertToUserProfile(user) - generate user profile object.
  3. const token = await this.jwtService.generateToken(userProfile) - generate JWT based on the user profile object.
  4. return {token} - send the JWT.

You can see the details in packages/shopping/src/controllers/user-management.controller.ts.

Authorization

Endpoint authorization is done using @loopback/authorization. Use the @authorize decorator to protect access to controller methods.

All controller methods without the @authorize decorator will be accessible to everyone. To restrict access, specify the roles in the allowedRoles property. Here are two examples to illustrate the point.

Unprotected controller method (no @authorize decorator), everyone can access it:

async find(
  @param.query.object('filter', getFilterSchemaFor(Product))
  filter?: Filter<Product>,
): Promise<Product[]> {
  ...
}

Protected controller method, only admin and customer can access it:

@authorize({
  allowedRoles: ['admin', 'customer'],
  voters: [basicAuthorization],
})
async set(
  @inject(SecurityBindings.USER)
  currentUserProfile: UserProfile,
  @param.path.string('userId') userId: string,
  @requestBody({description: 'update user'}) user: User,
): Promise<void> {
  ...
}

There are three roles in this app: admin, support, and customer. You can go through the controller methods in user-controller.ts and shopping-cart.controller.ts to see which roles are given access to which methods.

The authorization implementation is done via voter functions. In this app, there is just a single voter function - 'basicAuthorization'. It implements the following rules:

  1. No access if the user was created without a roles property.
  2. No access if the user's role in not in the allowedRoles authorization metadata.
  3. User can access only model's belonging to themselves.
  4. admin and support roles bypass model ownership check.

For more details about authorization in LoopBack 4, refer to https://loopback.io/doc/en/lb4/Loopback-component-authorization.html.

JWT secret

By default, the JWTs will be signed using HS256 with a 64 character long string of random hex digits as secret. To use your own secret, set environment variable JWT_SECRET to the value of your own secret. You will want to use your own secret if running multiple instances of the application or want to generate or validate the JWTs in a different application.

You can see the details in packages/shopping/src/application.ts.

Reset Password

This repository includes a forgot password and reset password functionality that illustrates how shoppers can reset their password in the case they forgot them. Shoppers can either reset their password while logged in or locked out of the application. For this functionality we use Nodemailer. Please see https://nodemailer.com/usage/using-gmail/ if you're planning to use Nodemailer with Gmail. Additionally, to manage environment variables we use dotenv, therefore, you must create a .env file in the root of the project with the below contents:

SMTP_PORT=587
SMTP_SERVER=smtp.gmail.com
APPLICATION_URL=http://localhost:3000/ <endpoint-to-the-page-with-reset-password-form>
SMTP_USERNAME=<gmail-username-for-account-used-to-send-email>
SMTP_PASSWORD=<gmail-password-for-account-used-to-send-email>
PASSWORD_RESET_EMAIL_LIMIT=2

Tutorial

There is a tutorial which shows how to apply the JWT strategy to secure your endpoint with @loopback/[email protected]. You can check more details in https://loopback.io/doc/en/lb4/Authentication-tutorial.html

Trying It Out

Please check the try it out section in the tutorial.

Deploy to Cloud as Microservices

The example application can be packaged as multiple Docker containers and deployed to a cloud environment as a Kubernetes cluster.

Please check out Deploy Shopping Application as Cloud-native Microservices.

Build and deploy on Red Hat OpenShift

You can find instructions, Dockerfiles and resource definition files for building and deploying on Red Hat OpenShift Container Platform in the openshift directory.

Contributing

This project uses DCO. Be sure to sign off your commits using the -s flag or adding Signed-off-By: Name<Email> in the commit message.

Example

git commit -s -m "feat: my commit message"

Other LoopBack 4 Guidelines apply. See the following resources to get you started:

Team

See all contributors.

License

MIT

LoopBack

loopback4-example-shopping's People

Contributors

achrinza avatar bajtos avatar deepakrkris avatar derdeka avatar dhmlau avatar dougal83 avatar emonddr avatar greenkeeper[bot] avatar jannyhou avatar johanschvn avatar marioestradarosa avatar memorychips avatar mrmodise avatar nflaig avatar omarchehab98 avatar raymondfeng avatar renovate-bot avatar renovate[bot] avatar virkt25 avatar vvdwivedi 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  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

loopback4-example-shopping's Issues

will there be documentation for this example

New to loopback4 (I looked at lb3 and this is very different). Do feel that one issue with lb4 is the documentation; compared to lb3, it is quite sparse and the tutorial is not as thorough. And this shopping example does appear better.
So is the hope that it will become part of the docs? Also if the aim is to teach then docs for it would be so useful.
regards,
John

mongo url parser fails

When I try to use a mongo url of the form

mongodb+srv://<USER>:<PASSWORD>@<MY_ATLAS_CONNECTION>/test?retryWrites=true

the url parser fails and returns a url object of null. The above format is what mongo Atlas uses to connect to their mongo servers. This error crashes the server. The error occurs whether I escape the characters in the url or not. I am able to connect using my url in my other programs.

{
  "name": "mongo",
  "connector": "mongodb",
  "url": "mongodb+srv://<USER>:<PASSWORD>@<MY_ATLAS_CONNECTION>/test?retryWrites=true",
  "database": "test",
  "useNewUrlParser": true
}

Please fix this or verify that your url parser works correctly.

An in-range update of loopback-connector-mongodb is breaking the build 🚨

The dependency loopback-connector-mongodb was updated from 4.1.0 to 4.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

loopback-connector-mongodb is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 13 commits.

  • 3a79606 4.2.0
  • 84651b9 Merge pull request #513 from strongloop/fix/nested-decimal-coercion-logic
  • 25122e0 fix: edge cases to coerce nested decimal props
  • c95fe01 Merge pull request #510 from strongloop/test/strict-model-extendedops
  • 6fcfa30 test: strict model update with mongo operators
  • f67d1e5 Merge pull request #508 from strongloop/copyrights
  • 58e8f7c chore: update copyrights years
  • 92c97cf Merge pull request #507 from mitsos1os/undefined-converted-to-null-506
  • 97bb9b3 add check for embedded property type conversion
  • cf10c6b Merge pull request #497 from jareeve/mongodb-srv
  • 869ddd7 Remove port when using mongodb+srv
  • 6e3e702 Merge pull request #505 from strongloop/fix/failing-test-cases
  • 20212e9 ci: fix previously failing tests

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/http-server is breaking the build 🚨

The dependency @loopback/http-server was updated from 1.1.14 to 1.1.15.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/http-server is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 13 commits.

  • 938be7c chore: publish release
  • 2ecdeba chore: update pevent
  • db7e01c fix: fix the emitter
  • b730320 fix(booter-lb3app): export component instead of booter
  • 993a97f feat: add booter-lb3app package
  • 469830f chore: add node v12 to the travis build and remove v11
  • 31aa5ea feat(example-greeter-extension): add npm start script to run the example app
  • 633821f docs: add docs for extension point and extensions
  • fb5d4a0 refactor(example-greeter-extension): use decorator/helper functions from core
  • 89f3cbc feat(core): add help functions/decorators for extension point/extension
  • 83ff105 fix(cli): escape char sequences for javascript comments
  • 6d71439 fix(cli): escape identifiers with conflicting name as decorators
  • 9b49773 fix(repository-json-schema): resolve the circular reference

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/repository is breaking the build 🚨

The dependency @loopback/repository was updated from 1.2.0 to 1.2.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/repository is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 2 commits.

  • ae54e45 chore: publish release
  • 6edfa9d fix(testlab): make sure fixtures is included in npm package

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/service-proxy is breaking the build 🚨

The dependency @loopback/service-proxy was updated from 1.1.5 to 1.1.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/service-proxy is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 13 commits.

  • 938be7c chore: publish release
  • 2ecdeba chore: update pevent
  • db7e01c fix: fix the emitter
  • b730320 fix(booter-lb3app): export component instead of booter
  • 993a97f feat: add booter-lb3app package
  • 469830f chore: add node v12 to the travis build and remove v11
  • 31aa5ea feat(example-greeter-extension): add npm start script to run the example app
  • 633821f docs: add docs for extension point and extensions
  • fb5d4a0 refactor(example-greeter-extension): use decorator/helper functions from core
  • 89f3cbc feat(core): add help functions/decorators for extension point/extension
  • 83ff105 fix(cli): escape char sequences for javascript comments
  • 6d71439 fix(cli): escape identifiers with conflicting name as decorators
  • 9b49773 fix(repository-json-schema): resolve the circular reference

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/core is breaking the build 🚨

The dependency @loopback/core was updated from 1.1.7 to 1.1.8.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 59 commits.

  • 6e0eeb6 chore: publish release
  • d48eac4 chore: update copyright headers for examples
  • e70f97c chore: update copyright header
  • 6bafa07 chore: update copyright headers
  • 7793749 chore: update copyright headers
  • 67531bf docs: move reserved binding keys
  • fb10efc feat(context): add events to ContextView
  • c3c5dab feat(rest): add strict option for routers
  • 89f905b feat(openapi-v3): add operationId based on controller/method names
  • 8c7bd86 feat(openapi-spec-builder): improve openapi spec builder and add tests
  • 8a66bf9 chore: update copyright headers
  • 41b3a37 docs: update 'deploy to kubernetes on ibm cloud' tutorial
  • 5494243 perf: update dockerfile to better version
  • d4eb70c chore: remove Node.js 10.0.0 from AppVeyor config
  • 2b648ae chore: add package-lock files

There are 59 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/rest is breaking the build 🚨

The dependency @loopback/rest was updated from 1.10.0 to 1.10.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/rest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 12 commits.

  • 8b5c63f chore: publish release
  • 91b2381 fix(cli): make sure the item type is imported for an array in openapi spec
  • bf36532 feat(context): always pass the session to ResolverFunction
  • ad95d1f docs: update docs for life cycle observers
  • d54651d feat(cli): add lb4 observer command to generate life cycle scripts
  • 6912f76 feat(boot): add a booter for life cycle scripts
  • 27c8127 feat(core): introduce life cycle support
  • 24545f5 docs: add self relation examples
  • c6ef653 chore: update dependencies
  • 81d19bb fix(rest): a small typo fix in code comments
  • d0014c6 feat(repository-json-schema): refactor metaToJsonProperty to accept custom jsonSchema
  • e1f7ef6 docs: add greeter-extension example to other example docs

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Refactor authentication util functions into a service

Description

We currently keep authentication related util functions in a util file, refactoring them into a service will give us the benefit of dependency injection.

The controller function calls the service to perform login. The service is injected via DI.
The login service receives UserRepository via DI.

Acceptance Criteria

  • Refactor the authentication related utils into a service class
  • The service is injected via DI in controller constructor, and controller function calls the service to perform login.
  • The UserRepository is injected via DI in service constructor.
  • Explorer better approach if the approach above is not the best practice

PR in progress

#33

Add documentation for this example

Description

As a demo repository, let's add more documentation about the user scenarios and how to play with the app.

Acceptance Criteria

Document:

  • the models this example has and how they interact with each other
  • services
  • login system

An in-range update of @loopback/context is breaking the build 🚨

The dependency @loopback/context was updated from 1.8.1 to 1.9.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/context is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 28 commits.

  • 27791c1 chore: publish release
  • 9eea48a chore: update dependencies
  • f2c2264 docs: explain request handling phases and Express middleware
  • 3bd6165 feat(repository): add execute implementation
  • 15dcd16 feat(context): add binding.toAlias() to resolve values from another binding
  • aee539c refactor(http-server): remove "request" module from tests
  • 2de1d77 chore: add 'submit pr' link to pr template
  • ed3d104 docs: add MAINTAINING.md for maintainers guide
  • 122fe7b fix(context): clear binding cache upon scope or value getter changes
  • 705dcd5 feat(context): pass resolution options into binding.getValue()
  • 5f1e526 chore: update all dependencies to latest versions
  • 0ffc52a docs: describe how to update all dependencies
  • 6d4383f build: add script to check package-lock files
  • 8e7528a chore: upgrade to typescript 3.4
  • be21cde feat(rest): add mountExpressRouter

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/build is breaking the build 🚨

The devDependency @loopback/build was updated from 1.5.0 to 1.5.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/build is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).

Commits

The new version differs by 26 commits.

  • f8ecd49 chore: publish release
  • 114a70e chore: fix invalid tsdoc tags in comments
  • 98bdce0 docs: document Components
  • e8b8e8b feat: resolve authentication strategy registered via extension point
  • 9f0d8ca fix(rest): aggressive redirection to Swagger UI
  • 0122211 fix(example-todo-list): add steps to run in sql db
  • 90694a1 chore(testlab): move from deprecated shot to @hapi/shot
  • ff014fc feat(booter-lb3app): enable operation-scoped model schemas
  • 22400fe feat(http-server): add support for unix socket/windows pipe path
  • 1d35a68 fix(docs): update Service-static-files.md to fix a typo
  • 6263dd6 docs: document foreign key property in hasMany relation
  • 1c87a3d chore: update dependencies
  • 3bc26b1 chore: update husky to version 2.0.0
  • 938be7c chore: publish release
  • 2ecdeba chore: update pevent

There are 26 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/service-proxy is breaking the build 🚨

The dependency @loopback/service-proxy was updated from 1.0.9 to 1.0.10.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/service-proxy is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 59 commits.

  • 6e0eeb6 chore: publish release
  • d48eac4 chore: update copyright headers for examples
  • e70f97c chore: update copyright header
  • 6bafa07 chore: update copyright headers
  • 7793749 chore: update copyright headers
  • 67531bf docs: move reserved binding keys
  • fb10efc feat(context): add events to ContextView
  • c3c5dab feat(rest): add strict option for routers
  • 89f905b feat(openapi-v3): add operationId based on controller/method names
  • 8c7bd86 feat(openapi-spec-builder): improve openapi spec builder and add tests
  • 8a66bf9 chore: update copyright headers
  • 41b3a37 docs: update 'deploy to kubernetes on ibm cloud' tutorial
  • 5494243 perf: update dockerfile to better version
  • d4eb70c chore: remove Node.js 10.0.0 from AppVeyor config
  • 2b648ae chore: add package-lock files

There are 59 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/service-proxy is breaking the build 🚨

The dependency @loopback/service-proxy was updated from 1.1.1 to 1.1.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/service-proxy is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 28 commits.

  • 27791c1 chore: publish release
  • 9eea48a chore: update dependencies
  • f2c2264 docs: explain request handling phases and Express middleware
  • 3bd6165 feat(repository): add execute implementation
  • 15dcd16 feat(context): add binding.toAlias() to resolve values from another binding
  • aee539c refactor(http-server): remove "request" module from tests
  • 2de1d77 chore: add 'submit pr' link to pr template
  • ed3d104 docs: add MAINTAINING.md for maintainers guide
  • 122fe7b fix(context): clear binding cache upon scope or value getter changes
  • 705dcd5 feat(context): pass resolution options into binding.getValue()
  • 5f1e526 chore: update all dependencies to latest versions
  • 0ffc52a docs: describe how to update all dependencies
  • 6d4383f build: add script to check package-lock files
  • 8e7528a chore: upgrade to typescript 3.4
  • be21cde feat(rest): add mountExpressRouter

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/authentication is breaking the build 🚨

The dependency @loopback/authentication was updated from 1.0.14 to 1.0.15.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/authentication is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 44 commits.

  • 6e0eeb6 chore: publish release
  • d48eac4 chore: update copyright headers for examples
  • e70f97c chore: update copyright header
  • 6bafa07 chore: update copyright headers
  • 7793749 chore: update copyright headers
  • 67531bf docs: move reserved binding keys
  • fb10efc feat(context): add events to ContextView
  • c3c5dab feat(rest): add strict option for routers
  • 89f905b feat(openapi-v3): add operationId based on controller/method names
  • 8c7bd86 feat(openapi-spec-builder): improve openapi spec builder and add tests
  • 8a66bf9 chore: update copyright headers
  • 41b3a37 docs: update 'deploy to kubernetes on ibm cloud' tutorial
  • 5494243 perf: update dockerfile to better version
  • d4eb70c chore: remove Node.js 10.0.0 from AppVeyor config
  • 2b648ae chore: add package-lock files

There are 44 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/testlab is breaking the build 🚨

The devDependency @loopback/testlab was updated from 1.2.4 to 1.2.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/testlab is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 25 commits.

  • fe8ef46 chore: publish release
  • 37fbd3c test: fixed ger request fields with multer
  • 0ed6bb7 chore: upgrade to [email protected] to remove npm audit warnings
  • 782a810 chore: update nyc to version 14.0.0
  • 755d8a0 chore(example-soap-calculator): increase timeout for integration tests
  • 7895780 test(rest): add express router on top of basePath test
  • 03e5c3b docs: add guideline doc for authorize component
  • 76fdda1 chore: update dependencies
  • 2bad701 fix(rest): fix a variable in sample code for README.md
  • 866aa2f feat(build): add more TypeScript "strict" checks
  • 6df4561 docs: document hasMany/belongsTo/hasOne limitations for NoSQL databases
  • 05bf4ac docs: add jsonSchema field
  • 6ebb283 feat: introduce an authentication strategy interface
  • c774ed1 fix(repository): relax constrain check to allow input containing constrained values
  • 301ccb2 refactor(context): refactor target type checking for injections into a function

There are 25 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore: update actions/setup-node action to v4
  • chore: update dependency concurrently to v8
  • chore: update dependency cypress to v13
  • chore: update dependency eslint to v9
  • chore: update dependency eslint-config-prettier to v9
  • chore: update dependency eslint-plugin-cypress to v3
  • chore: update dependency eslint-plugin-eslint-plugin to v6
  • chore: update dependency fs-extra to v11 (fs-extra, @types/fs-extra)
  • chore: update dependency husky to v9
  • chore: update dependency lerna to v8
  • chore: update dependency loopback-connector-rest to v5
  • chore: update dependency mocha to v10.4.0 (mocha, @types/mocha)
  • chore: update dependency testcontainers to v10
  • chore: update dependency typescript to v5
  • chore: update dependency uuid to v9 (uuid, @types/uuid)
  • chore: update loopback monorepo (@loopback/authentication, @loopback/authentication-jwt, @loopback/authorization, @loopback/boot, @loopback/build, @loopback/context, @loopback/core, @loopback/eslint-config, @loopback/http-server, @loopback/openapi-v3, @loopback/repository, @loopback/rest, @loopback/rest-explorer, @loopback/security, @loopback/service-proxy, @loopback/testlab)
  • chore: update node.js to v22
  • chore: update typescript-eslint monorepo to v7 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • chore: lock file maintenance
  • 🔐 Create all rate-limited PRs at once 🔐

Warning

Renovate failed to look up the following dependencies: Failed to look up docker package loopback4-example-shopping-monorepo, Failed to look up helm package redis, Failed to look up helm package mongodb.

Files affected: Dockerfile.recommender, Dockerfile.shopping, kubernetes/shopping-app/requirements.yaml


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile.monorepo
  • node 18
Dockerfile.recommender
  • loopback4-example-shopping-monorepo 1.1.0
  • node 18-slim
Dockerfile.shopping
  • loopback4-example-shopping-monorepo 1.1.0
  • node 18-slim
openshift/Dockerfile.monorepo
openshift/Dockerfile.recommender
openshift/Dockerfile.shopping
github-actions
.github/workflows/ci.yml
  • actions/checkout v3
  • actions/setup-node v2
  • supercharge/mongodb-github-action 1.7.0
  • supercharge/redis-github-action 1.4.0
  • actions/checkout v3
  • actions/setup-node v2
  • actions/checkout v3
  • actions/setup-node v2
helm-requirements
kubernetes/shopping-app/requirements.yaml
  • redis 10.5.7
  • mongodb 7.8.10
npm
package.json
  • @commitlint/cli 17.0.1
  • @commitlint/config-conventional 17.0.0
  • @commitlint/config-lerna-scopes 17.0.0
  • @commitlint/travis-cli 17.0.1
  • @loopback/build 9.0.0
  • @loopback/eslint-config 13.0.0
  • @loopback/testlab 5.0.0
  • @types/fs-extra 9.0.13
  • @types/node 17.0.42
  • @typescript-eslint/eslint-plugin 5.27.1
  • @typescript-eslint/parser 5.27.1
  • commitizen 4.2.4
  • concurrently 7.2.1
  • cz-conventional-changelog 3.3.0
  • dotenv 16.0.1
  • eslint 8.17.0
  • eslint-config-prettier 8.5.0
  • eslint-plugin-cypress 2.12.1
  • eslint-plugin-eslint-plugin 4.2.0
  • eslint-plugin-mocha 10.0.5
  • fs-extra 10.1.0
  • husky 8.0.1
  • lerna 4.0.0
  • mocha 10.0.0
  • source-map-support 0.5.21
  • testcontainers 8.10.1
  • typescript 4.7.3
  • node >=8.9
packages/recommender/package.json
  • @grpc/grpc-js 1.6.7
  • @grpc/proto-loader 0.6.13
  • @loopback/http-server 4.0.0
  • express 4.18.1
  • @loopback/build 9.0.0
  • @loopback/testlab 5.0.0
  • @types/express 4.17.13
  • @types/node 17.0.42
  • typescript 4.7.3
  • node >=10.16
packages/shopping/package.json
  • @loopback/authentication 9.0.0
  • @loopback/authentication-jwt 0.12.0
  • @loopback/authorization 0.12.0
  • @loopback/boot 5.0.0
  • @loopback/context 5.0.0
  • @loopback/core 4.0.0
  • @loopback/openapi-v3 8.0.0
  • @loopback/repository 5.0.0
  • @loopback/rest 12.0.0
  • @loopback/rest-explorer 5.0.0
  • @loopback/security 0.8.0
  • @loopback/service-proxy 5.0.0
  • @types/jsonwebtoken 8.5.8
  • @types/yaml 1.9.7
  • bcryptjs 2.4.3
  • casbin 5.15.1
  • debug 4.3.4
  • dotenv 16.0.1
  • express 4.18.1
  • isemail 3.2.0
  • jsonwebtoken 8.5.1
  • lodash 4.17.21
  • loopback-connector-grpc 2.0.0
  • loopback-connector-kv-redis 4.0.0
  • loopback-connector-mongodb 6.2.0
  • loopback-connector-rest 4.0.1
  • nodemailer 6.7.5
  • uuid 8.3.2
  • yaml 2.1.1
  • @grpc/grpc-js 1.6.7
  • @loopback/build 9.0.0
  • @loopback/testlab 5.0.0
  • @types/bcryptjs 2.4.2
  • @types/debug 4.1.7
  • @types/express 4.17.13
  • @types/lodash 4.14.182
  • @types/mocha 9.1.1
  • @types/node 17.0.42
  • @types/nodemailer 6.4.4
  • @types/uuid 8.3.4
  • concurrently 7.2.1
  • cypress 10.1.0
  • mocha 10.0.0
  • source-map-support 0.5.21
  • typescript 4.7.3
  • node >=10.16

  • Check this box to trigger a request for Renovate to run again on this repository

An in-range update of @loopback/repository is breaking the build 🚨

The dependency @loopback/repository was updated from 1.5.0 to 1.5.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/repository is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 13 commits.

  • 938be7c chore: publish release
  • 2ecdeba chore: update pevent
  • db7e01c fix: fix the emitter
  • b730320 fix(booter-lb3app): export component instead of booter
  • 993a97f feat: add booter-lb3app package
  • 469830f chore: add node v12 to the travis build and remove v11
  • 31aa5ea feat(example-greeter-extension): add npm start script to run the example app
  • 633821f docs: add docs for extension point and extensions
  • fb5d4a0 refactor(example-greeter-extension): use decorator/helper functions from core
  • 89f3cbc feat(core): add help functions/decorators for extension point/extension
  • 83ff105 fix(cli): escape char sequences for javascript comments
  • 6d71439 fix(cli): escape identifiers with conflicting name as decorators
  • 9b49773 fix(repository-json-schema): resolve the circular reference

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

[Spike][User] Refactor `password` implementation

From #5 (comment)

While this is good enough for the initial implementation, it is also very brittle. We should find a more robust way how to allow models to hide certain properties from toJSON output.

In the past, I had very good experience with moving the password to a different model (table/collection) and use hasMany relation. As a nice side effect, by keeping a hash of all previous passwords, we can easily implement a password policy like "cannot reuse the same password".


I think this needs some discussion as I'm personally not sure if refactoring passwords to it's own table is the best design but agree current design is a bit brittle.

Let's discuss this issue and refine the acceptance criteria.

Acceptance Criteria

  • Explore a more secure and robust way to store the password for users
    • As suggested above, we can try store Password in a separate model(table/collection)
    • Feel free to come up with other solutions.

An in-range update of @loopback/testlab is breaking the build 🚨

The devDependency @loopback/testlab was updated from 1.0.7 to 1.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/testlab is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 59 commits.

  • 6e0eeb6 chore: publish release
  • d48eac4 chore: update copyright headers for examples
  • e70f97c chore: update copyright header
  • 6bafa07 chore: update copyright headers
  • 7793749 chore: update copyright headers
  • 67531bf docs: move reserved binding keys
  • fb10efc feat(context): add events to ContextView
  • c3c5dab feat(rest): add strict option for routers
  • 89f905b feat(openapi-v3): add operationId based on controller/method names
  • 8c7bd86 feat(openapi-spec-builder): improve openapi spec builder and add tests
  • 8a66bf9 chore: update copyright headers
  • 41b3a37 docs: update 'deploy to kubernetes on ibm cloud' tutorial
  • 5494243 perf: update dockerfile to better version
  • d4eb70c chore: remove Node.js 10.0.0 from AppVeyor config
  • 2b648ae chore: add package-lock files

There are 59 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/repository is breaking the build 🚨

The dependency @loopback/repository was updated from 1.1.7 to 1.1.8.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/repository is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 44 commits.

  • 6e0eeb6 chore: publish release
  • d48eac4 chore: update copyright headers for examples
  • e70f97c chore: update copyright header
  • 6bafa07 chore: update copyright headers
  • 7793749 chore: update copyright headers
  • 67531bf docs: move reserved binding keys
  • fb10efc feat(context): add events to ContextView
  • c3c5dab feat(rest): add strict option for routers
  • 89f905b feat(openapi-v3): add operationId based on controller/method names
  • 8c7bd86 feat(openapi-spec-builder): improve openapi spec builder and add tests
  • 8a66bf9 chore: update copyright headers
  • 41b3a37 docs: update 'deploy to kubernetes on ibm cloud' tutorial
  • 5494243 perf: update dockerfile to better version
  • d4eb70c chore: remove Node.js 10.0.0 from AppVeyor config
  • 2b648ae chore: add package-lock files

There are 44 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Refactor shopping app to use the updated authentication package

Description

  1. Use the new authentication interface in authentication package => #2466
  2. Use the updated authentication action in authentication package => #2467
  3. Use the updated strategy resolver provider in authentication package => #2312 && #2467 (The resolver will need to deal with passport strategies and non-passport) strategies.
  4. /users/login will continue to be without any authenticate decorator (won't have a strategy associated with it). email and password comes in the request body, and logic for performing user credential validation will continue to be done in the controller method.
  5. The JWTStrategy will be reworked to be an extension of the authentication strategy extension point so that it is discoverable via the new strategy resolver provider in 3).
  6. Take into account the community PR that added authorization to user orders.
    #71. Related to: loopbackio/loopback-next#1998

Acceptance Criteria

  • Updated documentation to guide user through steps of: starting database and redis, adding users to the database, logging in with email and password and receiving a jwt token, and using this jwt token with a REST Client (if API Explorer is not updated to pass credentials or tokens with requests) to access the authenticated endpoints, and using API Explorer for the non-authenticated endpoints
  • Updated unit, acceptance, and integration mocha tests

Refactor this example to a monorepo

Description

Had a talk with Raymond on #41 (comment) and come up with some ideas to restructure this example.

Here is a few points to consider, if team is good with it then we can turn them into acceptance criteria:

  • Turn the example into a monorepo
  • Switch to the new conversion of test folder src/__tests__/
  • Import artifacts from root level path, see discussion in #41 (comment)
  • Investigate a better file structure for advanced loopback app that combined with express or other middleware, reference project could be found in loopbackio/loopback-next#1982 (comment)

An in-range update of @loopback/boot is breaking the build 🚨

The dependency @loopback/boot was updated from 1.1.1 to 1.1.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/boot is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 2 commits.

  • ae54e45 chore: publish release
  • 6edfa9d fix(testlab): make sure fixtures is included in npm package

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Advanced version of shopping app with each component as microservices

Background

The repo https://github.com/strongloop/loopback4-example-microservices was initially created to illustrate how microservices can be created using LoopBack 4.

Over time, this repo was not keeping up on the changes as we've moving along. As a result, it needs to be updated in order to be running again. Another problem with this repo is that it was created while we're settling on the architecture/design.

@strongloop/sq-lb-apex @raymondfeng were discussing what is the best way to handle it. Below is the proposal.

Description

Based on what we have in this example-shopping application, we create an "advanced" version of the app, so that each component is a microservice. All the components will still be in the same repository as monorepo.

Acceptance Criteria

  • Create a new repo (monorepo) for this microservice version of the shopping app.
    • Make each component as microservice
    • Document the steps as "how to" documentation page
  • Deprecate https://github.com/strongloop/loopback4-example-microservices and indicate the new repo created above should be the one to reference.

An in-range update of @loopback/authentication is breaking the build 🚨

The dependency @loopback/authentication was updated from 1.1.2 to 1.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/authentication is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 25 commits.

  • fe8ef46 chore: publish release
  • 37fbd3c test: fixed ger request fields with multer
  • 0ed6bb7 chore: upgrade to [email protected] to remove npm audit warnings
  • 782a810 chore: update nyc to version 14.0.0
  • 755d8a0 chore(example-soap-calculator): increase timeout for integration tests
  • 7895780 test(rest): add express router on top of basePath test
  • 03e5c3b docs: add guideline doc for authorize component
  • 76fdda1 chore: update dependencies
  • 2bad701 fix(rest): fix a variable in sample code for README.md
  • 866aa2f feat(build): add more TypeScript "strict" checks
  • 6df4561 docs: document hasMany/belongsTo/hasOne limitations for NoSQL databases
  • 05bf4ac docs: add jsonSchema field
  • 6ebb283 feat: introduce an authentication strategy interface
  • c774ed1 fix(repository): relax constrain check to allow input containing constrained values
  • 301ccb2 refactor(context): refactor target type checking for injections into a function

There are 25 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/openapi-v3 is breaking the build 🚨

The dependency @loopback/openapi-v3 was updated from 1.3.4 to 1.3.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/openapi-v3 is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 9 commits.

  • 0074ff0 chore: publish release
  • a70f00d chore: run apidocs in serial to avoid race condition of api-docs creation
  • 6699825 fix(context): instantiate class with non-injected arguments
  • 7a372a8 chore: update build dependencies
  • a3d0dfc feat(cli): normalize variable names for OpenAPI paths
  • 4843a1f fix(cli): generate operation only for the 1st tag to avoid duplicate routes
  • af20548 fix(cli): improve openapi code generation for naming and typing
  • dcc9cac feat(context): make Injection.metadata a required property
  • 35f719c feat(cli): add lb4 discover for model discovery

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/boot is breaking the build 🚨

The dependency @loopback/boot was updated from 1.0.14 to 1.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/boot is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 44 commits.

  • 6e0eeb6 chore: publish release
  • d48eac4 chore: update copyright headers for examples
  • e70f97c chore: update copyright header
  • 6bafa07 chore: update copyright headers
  • 7793749 chore: update copyright headers
  • 67531bf docs: move reserved binding keys
  • fb10efc feat(context): add events to ContextView
  • c3c5dab feat(rest): add strict option for routers
  • 89f905b feat(openapi-v3): add operationId based on controller/method names
  • 8c7bd86 feat(openapi-spec-builder): improve openapi spec builder and add tests
  • 8a66bf9 chore: update copyright headers
  • 41b3a37 docs: update 'deploy to kubernetes on ibm cloud' tutorial
  • 5494243 perf: update dockerfile to better version
  • d4eb70c chore: remove Node.js 10.0.0 from AppVeyor config
  • 2b648ae chore: add package-lock files

There are 44 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/context is breaking the build 🚨

The dependency @loopback/context was updated from 1.5.1 to 1.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/context is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 32 commits.

  • f60b097 chore: publish release
  • 4cd2442 feat(cli): add --docker option to generate docker files
  • af5b16a feat(rest): add disabled option for OpenAPI spec endpoints
  • ca88a41 fix(docs): grammar fix on todo-tutorial-datasource.md
  • 4ca2e82 chore(build): upgrade to [email protected]
  • ec0abf4 docs: add space to hello-world
  • e5d2b6f docs: change order of tuts
  • 24ca51e docs: add hello-world to examples
  • 878fd35 docs: remove Contributions.md
  • b3abc55 docs: remove interim file
  • d74937e docs: menu change current to lb3
  • 539e425 chore: change sign cla checkbox to link
  • 70ebbad fix(example-todo-list): change rootDir in compilerOptions
  • c77ac38 chore: update mocha to version 6.0.0
  • c7f59ba feat(rest): introduce requestBodyParser options in RestServerOptions

There are 32 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Not Found: [email protected]

[loopback4-example-shopping] node -v
v10.13.0
[loopback4-example-shopping] npm -v
6.4.1
[loopback4-example-shopping] npm i
WARN tar ENOENT: no such file or directory, open '/Users/loopback/loopback-examples/loopback4-example-shopping/node_modules/.staging/path-type-08a916cc/package.json'
WARN tar ENOENT: no such file or directory, open '/Users/loopback/loopback-examples/loopback4-example-shopping/node_modules/.staging/path-type-08a916cc/index.js'
WARN tar ENOENT: no such file or directory, open '/Users/loopback/loopback-examples/loopback4-example-shopping/node_modules/.staging/path-type-08a916cc/license'
WARN tar ENOENT: no such file or directory, open '/Users/loopback/loopback-examples/loopback4-example-shopping/node_modules/.staging/path-type-08a916cc/readme.md'
npm ERR! code E404
npm ERR! 404 Not Found: [email protected]

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/loopback/.npm/_logs/2018-12-01T17_17_29_183Z-debug.log

How to find user information with order

I want to data like below: --

 [{
   userId:'akash',
   userName:'akash55',
   orders:[
      {
         orderId:1        
         product:{
            productId:1,
            producdName:'example'
         }
      }
   ]
}, 

{
   userId:'akash',
   userName:'akash55',
   orders:[
      {
         orderId:1        
         product:{
            productId:1,
            producdName:'example'
         }
      }
   ]
}
]

An in-range update of @loopback/rest is breaking the build 🚨

The dependency @loopback/rest was updated from 1.9.0 to 1.9.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/rest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 2 commits.

  • ae54e45 chore: publish release
  • 6edfa9d fix(testlab): make sure fixtures is included in npm package

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 11.10.2 to 11.10.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Suggestion Models in their own files.

To keep it standardized with other LB4 tutorials and model discovery utility functions, you should place the two models in their own file.

src/models/shopping-cart-item.model.ts
src/models/shopping-cart.model.ts

Add logout function to invalidate the accesstoken

Description

The logout function for jwt strategy is missing in PR #26, we should add it in the user controller by invalidating the accesstoken.

JWT authentication is stateless, which means the best way to invalidate the accesstoken is removing it from the client side. IMO the best way to invalidate it in a LoopBack app, is to remove it from the explorer when we finish story loopbackio/loopback-next#2205.

More discussion are welcomed. cc @strongloop/loopback-next

Acceptance Criteria

  • Add the logout endpoint in user controller by invalidating the JWT access token.

An in-range update of @loopback/repository is breaking the build 🚨

The dependency @loopback/repository was updated from 1.2.1 to 1.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/repository is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 28 commits.

  • 27791c1 chore: publish release
  • 9eea48a chore: update dependencies
  • f2c2264 docs: explain request handling phases and Express middleware
  • 3bd6165 feat(repository): add execute implementation
  • 15dcd16 feat(context): add binding.toAlias() to resolve values from another binding
  • aee539c refactor(http-server): remove "request" module from tests
  • 2de1d77 chore: add 'submit pr' link to pr template
  • ed3d104 docs: add MAINTAINING.md for maintainers guide
  • 122fe7b fix(context): clear binding cache upon scope or value getter changes
  • 705dcd5 feat(context): pass resolution options into binding.getValue()
  • 5f1e526 chore: update all dependencies to latest versions
  • 0ffc52a docs: describe how to update all dependencies
  • 6d4383f build: add script to check package-lock files
  • 8e7528a chore: upgrade to typescript 3.4
  • be21cde feat(rest): add mountExpressRouter

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

high server vulnerability after npm install

I cloned 9320192

and I get this error in console after doing npm install

> opencollective postinstall


                       Thanks for installing commitizen 🙏
                 Please consider donating to our open collective
                        to help us maintain this package.

                            Number of contributors: 58
                               Number of backers: 3
                              Annual budget: US$ 34
                             Current balance: US$ 34

         👉  Donate: https://opencollective.com/commitizen/donate

added 933 packages from 1479 contributors and audited 5496 packages in 33.028s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
matejs-MacBook-Pro:loopback4-example-shopping matejsimunic$ npm audit
npm ERR! code EAUDITNOLOCK
npm ERR! audit Neither npm-shrinkwrap.json nor package-lock.json found: Cannot audit a project without a lockfile
npm ERR! audit Try creating one first with: npm i --package-lock-only

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/matejsimunic/.npm/_logs/2018-09-12T06_05_25_918Z-debug.log
matejs-MacBook-Pro:loopback4-example-shopping matejsimunic$ npm i --package-lock-only
audited 5496 packages in 6.933s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
matejs-MacBook-Pro:loopback4-example-shopping matejsimunic$ npm audit
npm ERR! code EAUDITNOLOCK
npm ERR! audit Neither npm-shrinkwrap.json nor package-lock.json found: Cannot audit a project without a lockfile
npm ERR! audit Try creating one first with: npm i --package-lock-only

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/matejsimunic/.npm/_logs/2018-09-12T06_05_53_385Z-debug.log

An in-range update of @loopback/core is breaking the build 🚨

The dependency @loopback/core was updated from 1.2.1 to 1.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 28 commits.

  • 27791c1 chore: publish release
  • 9eea48a chore: update dependencies
  • f2c2264 docs: explain request handling phases and Express middleware
  • 3bd6165 feat(repository): add execute implementation
  • 15dcd16 feat(context): add binding.toAlias() to resolve values from another binding
  • aee539c refactor(http-server): remove "request" module from tests
  • 2de1d77 chore: add 'submit pr' link to pr template
  • ed3d104 docs: add MAINTAINING.md for maintainers guide
  • 122fe7b fix(context): clear binding cache upon scope or value getter changes
  • 705dcd5 feat(context): pass resolution options into binding.getValue()
  • 5f1e526 chore: update all dependencies to latest versions
  • 0ffc52a docs: describe how to update all dependencies
  • 6d4383f build: add script to check package-lock files
  • 8e7528a chore: upgrade to typescript 3.4
  • be21cde feat(rest): add mountExpressRouter

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/authentication is breaking the build 🚨

The dependency @loopback/authentication was updated from 1.0.16 to 1.0.17.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/authentication is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 2 commits.

  • ae54e45 chore: publish release
  • 6edfa9d fix(testlab): make sure fixtures is included in npm package

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Implement skipped tests

There are 3 tests in user-order.contoller.acceptance.ts that are skipped because the underlying features needed haven't yet been implemented.

The missing features are:

Once the above have been implemented, the skipped tests should be implemented.


  • Implement test titled: throws an error when creating an order for a non-existent user
  • Implement test titled: patches orders matching filter for a given user
  • Implement test titled: deletes orders matching filter for a given user

VS Code Debugger

VS Code Debugger Launch Task

Please add a launch.json file with a configured launch task to run the vs code debugger.

An in-range update of @loopback/rest is breaking the build 🚨

The dependency @loopback/rest was updated from 1.5.5 to 1.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/rest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 32 commits.

  • f60b097 chore: publish release
  • 4cd2442 feat(cli): add --docker option to generate docker files
  • af5b16a feat(rest): add disabled option for OpenAPI spec endpoints
  • ca88a41 fix(docs): grammar fix on todo-tutorial-datasource.md
  • 4ca2e82 chore(build): upgrade to [email protected]
  • ec0abf4 docs: add space to hello-world
  • e5d2b6f docs: change order of tuts
  • 24ca51e docs: add hello-world to examples
  • 878fd35 docs: remove Contributions.md
  • b3abc55 docs: remove interim file
  • d74937e docs: menu change current to lb3
  • 539e425 chore: change sign cla checkbox to link
  • 70ebbad fix(example-todo-list): change rootDir in compilerOptions
  • c77ac38 chore: update mocha to version 6.0.0
  • c7f59ba feat(rest): introduce requestBodyParser options in RestServerOptions

There are 32 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/boot is breaking the build 🚨

The dependency @loopback/boot was updated from 1.2.2 to 1.2.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/boot is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 13 commits.

  • 938be7c chore: publish release
  • 2ecdeba chore: update pevent
  • db7e01c fix: fix the emitter
  • b730320 fix(booter-lb3app): export component instead of booter
  • 993a97f feat: add booter-lb3app package
  • 469830f chore: add node v12 to the travis build and remove v11
  • 31aa5ea feat(example-greeter-extension): add npm start script to run the example app
  • 633821f docs: add docs for extension point and extensions
  • fb5d4a0 refactor(example-greeter-extension): use decorator/helper functions from core
  • 89f3cbc feat(core): add help functions/decorators for extension point/extension
  • 83ff105 fix(cli): escape char sequences for javascript comments
  • 6d71439 fix(cli): escape identifiers with conflicting name as decorators
  • 9b49773 fix(repository-json-schema): resolve the circular reference

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @loopback/core is breaking the build 🚨

The dependency @loopback/core was updated from 1.3.0 to 1.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@loopback/core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 12 commits.

  • 8b5c63f chore: publish release
  • 91b2381 fix(cli): make sure the item type is imported for an array in openapi spec
  • bf36532 feat(context): always pass the session to ResolverFunction
  • ad95d1f docs: update docs for life cycle observers
  • d54651d feat(cli): add lb4 observer command to generate life cycle scripts
  • 6912f76 feat(boot): add a booter for life cycle scripts
  • 27c8127 feat(core): introduce life cycle support
  • 24545f5 docs: add self relation examples
  • c6ef653 chore: update dependencies
  • 81d19bb fix(rest): a small typo fix in code comments
  • d0014c6 feat(repository-json-schema): refactor metaToJsonProperty to accept custom jsonSchema
  • e1f7ef6 docs: add greeter-extension example to other example docs

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Email and Password Validation

This would be the perfect place to show people how to validate inputs using the methods that are hinted at in the documentation here: https://loopback.io/doc/en/lb4/Parsing-requests.html#request-body

Please refer to the documentation on @requestbody decorator to get a comprehensive idea of defining custom validation rules for your models.

As the flagship example of the framework it doesn't look good having a bunch of old school if statements in the controller method doing validation. Someone who knows what they are doing could easily setup a "minimum length" example for the password which would help a lot.

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.