@platformatic/runtime 1.43.0 → 1.44.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/fixtures/management-api/services/service-1/platformatic.json +3 -1
- package/fixtures/management-api/services/service-db/migrations/001.do.sql +4 -0
- package/fixtures/management-api/services/service-db/migrations/001.undo.sql +1 -0
- package/fixtures/management-api/services/service-db/package.json +5 -0
- package/fixtures/management-api/services/service-db/platformatic.db.json +29 -0
- package/fixtures/management-api/services/service-db/plugin.js +12 -0
- package/lib/management-api.js +12 -0
- package/package.json +10 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DROP TABLE movies;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://platformatic.dev/schemas/v0.22.0/db",
|
|
3
|
+
"server": {
|
|
4
|
+
"hostname": "127.0.0.1",
|
|
5
|
+
"port": 0
|
|
6
|
+
},
|
|
7
|
+
"migrations": {
|
|
8
|
+
"dir": "migrations",
|
|
9
|
+
"table": "versions",
|
|
10
|
+
"autoApply": true
|
|
11
|
+
},
|
|
12
|
+
"types": {
|
|
13
|
+
"autogenerate": false
|
|
14
|
+
},
|
|
15
|
+
"db": {
|
|
16
|
+
"connectionString": "sqlite://db.sqlite",
|
|
17
|
+
"graphql": true,
|
|
18
|
+
"ignore": {
|
|
19
|
+
"versions": true
|
|
20
|
+
},
|
|
21
|
+
"events": false
|
|
22
|
+
},
|
|
23
|
+
"plugins": {
|
|
24
|
+
"paths": [
|
|
25
|
+
"plugin.js"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"watch": false
|
|
29
|
+
}
|
package/lib/management-api.js
CHANGED
|
@@ -59,6 +59,18 @@ async function managementApiPlugin (app, opts) {
|
|
|
59
59
|
return runtime.getServiceConfig(id)
|
|
60
60
|
})
|
|
61
61
|
|
|
62
|
+
app.get('/services/:id/openapi-schema', async (request) => {
|
|
63
|
+
const { id } = request.params
|
|
64
|
+
app.log.debug('get openapi-schema', { id })
|
|
65
|
+
return runtime.getServiceOpenapiSchema(id)
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
app.get('/services/:id/graphql-schema', async (request) => {
|
|
69
|
+
const { id } = request.params
|
|
70
|
+
app.log.debug('get graphql-schema', { id })
|
|
71
|
+
return runtime.getServiceGraphqlSchema(id)
|
|
72
|
+
})
|
|
73
|
+
|
|
62
74
|
app.post('/services/:id/start', async (request) => {
|
|
63
75
|
const { id } = request.params
|
|
64
76
|
app.log.debug('start service', { id })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"typescript": "^5.4.2",
|
|
35
35
|
"undici-oidc-interceptor": "^0.5.0",
|
|
36
36
|
"why-is-node-running": "^2.2.2",
|
|
37
|
-
"@platformatic/sql-graphql": "1.
|
|
38
|
-
"@platformatic/sql-mapper": "1.
|
|
37
|
+
"@platformatic/sql-graphql": "1.44.0",
|
|
38
|
+
"@platformatic/sql-mapper": "1.44.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@fastify/error": "^3.4.1",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"undici": "^6.9.0",
|
|
64
64
|
"why-is-node-running": "^2.2.2",
|
|
65
65
|
"ws": "^8.16.0",
|
|
66
|
-
"@platformatic/composer": "1.
|
|
67
|
-
"@platformatic/
|
|
68
|
-
"@platformatic/
|
|
69
|
-
"@platformatic/generators": "1.
|
|
70
|
-
"@platformatic/
|
|
71
|
-
"@platformatic/telemetry": "1.
|
|
72
|
-
"@platformatic/
|
|
66
|
+
"@platformatic/composer": "1.44.0",
|
|
67
|
+
"@platformatic/config": "1.44.0",
|
|
68
|
+
"@platformatic/db": "1.44.0",
|
|
69
|
+
"@platformatic/generators": "1.44.0",
|
|
70
|
+
"@platformatic/service": "1.44.0",
|
|
71
|
+
"@platformatic/telemetry": "1.44.0",
|
|
72
|
+
"@platformatic/utils": "1.44.0"
|
|
73
73
|
},
|
|
74
74
|
"standard": {
|
|
75
75
|
"ignore": [
|