@anthonylzq/simba.js 5.1.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <h1 align="center">
2
2
  <!-- <p align="center">Simba.js</p> -->
3
- <a href="https://simbajs.notion.site/783092dc7d444067b4c56a25d671f658?v=31060f3d17524ca58870e86c2960a6df"><img src="https://i.ibb.co/QHxn7kP/Gatonowww.png" alt="Simba.js"></a>
3
+ <a href="https://simbajs.notion.site/783092dc7d444067b4c56a25d671f658?v=31060f3d17524ca58870e86c2960a6df"><img src="https://i.ibb.co/QFX0WnH/simba-pink.png" alt="Simba.js"></a>
4
4
  </h1>
5
5
 
6
6
  [![NPM version](https://img.shields.io/npm/v/@anthonylzq/simba.js.svg?style=flat)](https://www.npmjs.com/package/@anthonylzq/simba.js)
@@ -850,7 +850,7 @@ export { ErrorForUser as EFU, MessageForUser as MFU }
850
850
  },
851
851
  index: {
852
852
  content: `import { ApolloError } from 'apollo-server-core'
853
- import { FastifyLoggerInstance } from 'fastify'
853
+ import { HttpLogger } from 'express-pino-logger'
854
854
 
855
855
  const errorHandling = ({
856
856
  e,
@@ -862,7 +862,7 @@ const errorHandling = ({
862
862
  e: any
863
863
  message: string
864
864
  code: string
865
- log: FastifyLoggerInstance
865
+ log: HttpLogger['logger']
866
866
  }): never => {
867
867
  log.error(e)
868
868
 
@@ -1300,7 +1300,7 @@ class Server {
1300
1300
  }
1301
1301
 
1302
1302
  #config() {
1303
- this.#app.register(require('fastify-cors'), {})
1303
+ this.#app.register(require('@fastify/cors'), {})
1304
1304
  this.#app.addHook('preHandler', (req, reply, done) => {
1305
1305
  reply.header('Access-Control-Allow-Methods', 'GET, POST, PATCH, DELETE')
1306
1306
  reply.header('Access-Control-Allow-Origin', '*')
@@ -1368,7 +1368,7 @@ export { server as Server }
1368
1368
  routes: {
1369
1369
  docs: {
1370
1370
  content: `import { FastifyInstance } from 'fastify'
1371
- import fastifySwagger from 'fastify-swagger'
1371
+ import fastifySwagger from '@fastify/swagger'
1372
1372
 
1373
1373
  const Docs = (app: FastifyInstance, prefix = '/api'): void => {
1374
1374
  app.register(fastifySwagger, {
@@ -2380,7 +2380,7 @@ export { server as Server }
2380
2380
  routes: {
2381
2381
  docs: {
2382
2382
  content: `import { FastifyInstance } from 'fastify'
2383
- import fastifySwagger from 'fastify-swagger'
2383
+ import fastifySwagger from '@fastify/swagger'
2384
2384
 
2385
2385
  const Docs = (app: FastifyInstance, prefix = '/api'): void => {
2386
2386
  app.register(fastifySwagger, {
package/lib/src/index.js CHANGED
@@ -62,7 +62,7 @@ module.exports = async ({
62
62
  graphql ? 'apollo-server-express' : ''
63
63
  }`
64
64
 
65
- const fastifyProdPackages = `fastify fastify-swagger fastify-cors ${
65
+ const fastifyProdPackages = `fastify @fastify/swagger @fastify/cors ${
66
66
  graphql ? 'apollo-server-fastify apollo-server-plugin-base' : ''
67
67
  }`
68
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthonylzq/simba.js",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "set up a modern backend app by running one command",
5
5
  "main": "lib/index.js",
6
6
  "directories": {