@platformatic/db-core 0.2.0 → 0.4.0

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  const fp = require('fastify-plugin')
4
4
  const sqlMapper = require('@platformatic/sql-mapper')
5
- const sqlOpenAPI = require('@platformatic/sql-openapi')
6
- const sqlGraphQL = require('@platformatic/sql-graphql')
7
5
 
8
6
  module.exports = fp(async function (app, opts) {
9
7
  app.register(sqlMapper, {
@@ -11,6 +9,7 @@ module.exports = fp(async function (app, opts) {
11
9
  })
12
10
 
13
11
  if (opts.graphql !== false) {
12
+ const sqlGraphQL = require('@platformatic/sql-graphql')
14
13
  const graphqlConfig = typeof opts.graphql === 'object' ? opts.graphql : {}
15
14
  app.register(sqlGraphQL, {
16
15
  ...graphqlConfig
@@ -19,6 +18,7 @@ module.exports = fp(async function (app, opts) {
19
18
 
20
19
  // enabled by default
21
20
  if (opts.openapi !== false) {
21
+ const sqlOpenAPI = require('@platformatic/sql-openapi')
22
22
  const openapiConfig = typeof opts.openapi === 'object' ? opts.openapi : {}
23
23
  app.register(sqlOpenAPI, {
24
24
  ...openapiConfig
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/db-core",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -21,9 +21,9 @@
21
21
  "tap": "^16.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@platformatic/sql-graphql": "0.2.0",
25
- "@platformatic/sql-mapper": "0.2.0",
26
- "@platformatic/sql-openapi": "0.2.0",
24
+ "@platformatic/sql-graphql": "0.4.0",
25
+ "@platformatic/sql-mapper": "0.4.0",
26
+ "@platformatic/sql-openapi": "0.4.0",
27
27
  "fastify-plugin": "^4.1.0"
28
28
  },
29
29
  "scripts": {