@platformatic/service 0.5.1 → 0.6.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/lib/schema.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Matteo Collina <hello@matteocollina.com>",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@fastify/static": "^6.5.0",
|
|
35
35
|
"@fastify/swagger": "^8.0.0",
|
|
36
36
|
"@fastify/under-pressure": "^8.0.0",
|
|
37
|
-
"@platformatic/config": "0.
|
|
38
|
-
"@platformatic/utils": "0.
|
|
37
|
+
"@platformatic/config": "0.6.0",
|
|
38
|
+
"@platformatic/utils": "0.6.0",
|
|
39
39
|
"close-with-grace": "^1.1.0",
|
|
40
40
|
"commist": "^3.1.2",
|
|
41
41
|
"desm": "^1.2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"fastify": "^4.6.0",
|
|
46
46
|
"fastify-metrics": "^10.0.0",
|
|
47
47
|
"fastify-plugin": "^4.1.0",
|
|
48
|
-
"fastify-sandbox": "^0.
|
|
48
|
+
"fastify-sandbox": "^0.10.0",
|
|
49
49
|
"graphql": "^16.6.0",
|
|
50
50
|
"help-me": "^4.1.0",
|
|
51
51
|
"mercurius": "^11.3.0",
|
package/test/cli/start.test.mjs
CHANGED
|
@@ -17,7 +17,14 @@ test('autostart', async ({ equal, same, match, teardown }) => {
|
|
|
17
17
|
})
|
|
18
18
|
|
|
19
19
|
test('start command', async ({ equal, same, match, teardown }) => {
|
|
20
|
-
const { child } = await start('start', '-c', join(import.meta.url, '..', '..', 'fixtures', 'hello', 'platformatic.service.json'))
|
|
20
|
+
const { child, url } = await start('start', '-c', join(import.meta.url, '..', '..', 'fixtures', 'hello', 'platformatic.service.json'))
|
|
21
|
+
|
|
22
|
+
const res = await request(`${url}`)
|
|
23
|
+
equal(res.statusCode, 200)
|
|
24
|
+
const body = await res.body.json()
|
|
25
|
+
match(body, {
|
|
26
|
+
hello: 'world'
|
|
27
|
+
}, 'response')
|
|
21
28
|
|
|
22
29
|
child.kill('SIGINT')
|
|
23
30
|
})
|
|
@@ -27,3 +34,16 @@ test('default logger', async ({ equal, same, match, teardown }) => {
|
|
|
27
34
|
match(url, /http:\/\/127.0.0.1:[0-9]+/)
|
|
28
35
|
child.kill('SIGINT')
|
|
29
36
|
})
|
|
37
|
+
|
|
38
|
+
test('plugin options', async ({ equal, same, match, teardown }) => {
|
|
39
|
+
const { child, url } = await start('-c', join(import.meta.url, '..', '..', 'fixtures', 'options', 'platformatic.service.yml'))
|
|
40
|
+
|
|
41
|
+
const res = await request(`${url}`)
|
|
42
|
+
equal(res.statusCode, 200)
|
|
43
|
+
const body = await res.body.json()
|
|
44
|
+
match(body, {
|
|
45
|
+
something: 'else'
|
|
46
|
+
}, 'response')
|
|
47
|
+
|
|
48
|
+
child.kill('SIGINT')
|
|
49
|
+
})
|