@platformatic/db-core 0.31.1 → 0.33.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.
- package/README.md +1 -1
- package/package.json +6 -6
- package/test/basic.test.js +24 -8
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ This modules wraps [`@platformatic/sql-mapper`](https://www.npmjs.com/package/@p
|
|
|
5
5
|
[`@platformatic/sql-openapi`](https://www.npmjs.com/package/@platformatic/sql-openapi) in a convenient [Fastify](https://www.fastify.io/)
|
|
6
6
|
plugin.
|
|
7
7
|
|
|
8
|
-
Check out the full documentation for Platformatic DB on [our website](https://
|
|
8
|
+
Check out the full documentation for Platformatic DB on [our website](https://docs.platformatic.dev/docs/getting-started/quick-start-guide).
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/db-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"fastify-plugin": "^4.5.0",
|
|
25
|
-
"@platformatic/sql-events": "0.
|
|
26
|
-
"@platformatic/sql-graphql": "0.
|
|
27
|
-
"@platformatic/sql-mapper": "0.
|
|
28
|
-
"@platformatic/sql-openapi": "0.
|
|
29
|
-
"@platformatic/types": "0.
|
|
25
|
+
"@platformatic/sql-events": "0.33.0",
|
|
26
|
+
"@platformatic/sql-graphql": "0.33.0",
|
|
27
|
+
"@platformatic/sql-mapper": "0.33.0",
|
|
28
|
+
"@platformatic/sql-openapi": "0.33.0",
|
|
29
|
+
"@platformatic/types": "0.33.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"test": "standard | snazzy && tap test/*test.js",
|
package/test/basic.test.js
CHANGED
|
@@ -26,7 +26,9 @@ async function onDatabaseLoad (db, sql) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
test('entities are available', async ({ ok, teardown }) => {
|
|
29
|
-
const app = Fastify(
|
|
29
|
+
const app = Fastify({
|
|
30
|
+
pluginTimeout: 30000
|
|
31
|
+
})
|
|
30
32
|
app.register(core, {
|
|
31
33
|
...connInfo,
|
|
32
34
|
onDatabaseLoad
|
|
@@ -38,7 +40,9 @@ test('entities are available', async ({ ok, teardown }) => {
|
|
|
38
40
|
})
|
|
39
41
|
|
|
40
42
|
test('graphql is available', async ({ equal, same, teardown }) => {
|
|
41
|
-
const app = Fastify(
|
|
43
|
+
const app = Fastify({
|
|
44
|
+
pluginTimeout: 30000
|
|
45
|
+
})
|
|
42
46
|
app.register(core, {
|
|
43
47
|
...connInfo,
|
|
44
48
|
onDatabaseLoad
|
|
@@ -71,7 +75,9 @@ test('graphql is available', async ({ equal, same, teardown }) => {
|
|
|
71
75
|
})
|
|
72
76
|
|
|
73
77
|
test('graphiql can be enabled', async ({ equal, same, teardown }) => {
|
|
74
|
-
const app = Fastify(
|
|
78
|
+
const app = Fastify({
|
|
79
|
+
pluginTimeout: 30000
|
|
80
|
+
})
|
|
75
81
|
app.register(core, {
|
|
76
82
|
...connInfo,
|
|
77
83
|
onDatabaseLoad,
|
|
@@ -89,7 +95,9 @@ test('graphiql can be enabled', async ({ equal, same, teardown }) => {
|
|
|
89
95
|
})
|
|
90
96
|
|
|
91
97
|
test('graphql can be disabled', async ({ equal, teardown }) => {
|
|
92
|
-
const app = Fastify(
|
|
98
|
+
const app = Fastify({
|
|
99
|
+
pluginTimeout: 30000
|
|
100
|
+
})
|
|
93
101
|
app.register(core, {
|
|
94
102
|
...connInfo,
|
|
95
103
|
onDatabaseLoad,
|
|
@@ -115,7 +123,9 @@ test('graphql can be disabled', async ({ equal, teardown }) => {
|
|
|
115
123
|
})
|
|
116
124
|
|
|
117
125
|
test('openapi is available', async ({ equal, teardown }) => {
|
|
118
|
-
const app = Fastify(
|
|
126
|
+
const app = Fastify({
|
|
127
|
+
pluginTimeout: 30000
|
|
128
|
+
})
|
|
119
129
|
app.register(core, {
|
|
120
130
|
...connInfo,
|
|
121
131
|
onDatabaseLoad
|
|
@@ -130,7 +140,9 @@ test('openapi is available', async ({ equal, teardown }) => {
|
|
|
130
140
|
})
|
|
131
141
|
|
|
132
142
|
test('openapi can be disabled', async ({ equal, teardown }) => {
|
|
133
|
-
const app = Fastify(
|
|
143
|
+
const app = Fastify({
|
|
144
|
+
pluginTimeout: 30000
|
|
145
|
+
})
|
|
134
146
|
app.register(core, {
|
|
135
147
|
...connInfo,
|
|
136
148
|
onDatabaseLoad,
|
|
@@ -146,7 +158,9 @@ test('openapi can be disabled', async ({ equal, teardown }) => {
|
|
|
146
158
|
})
|
|
147
159
|
|
|
148
160
|
test('openapi with an object', async ({ equal, teardown }) => {
|
|
149
|
-
const app = Fastify(
|
|
161
|
+
const app = Fastify({
|
|
162
|
+
pluginTimeout: 30000
|
|
163
|
+
})
|
|
150
164
|
app.register(core, {
|
|
151
165
|
...connInfo,
|
|
152
166
|
onDatabaseLoad,
|
|
@@ -162,7 +176,9 @@ test('openapi with an object', async ({ equal, teardown }) => {
|
|
|
162
176
|
})
|
|
163
177
|
|
|
164
178
|
test('mq is available', async ({ equal, same, teardown }) => {
|
|
165
|
-
const app = Fastify(
|
|
179
|
+
const app = Fastify({
|
|
180
|
+
pluginTimeout: 30000
|
|
181
|
+
})
|
|
166
182
|
await app.register(core, {
|
|
167
183
|
...connInfo,
|
|
168
184
|
events: true,
|