@platformatic/runtime 1.7.0 → 1.7.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.
@@ -0,0 +1,4 @@
1
+ {
2
+ "version": "0.0.1",
3
+ "description": "test package.json"
4
+ }
@@ -0,0 +1,27 @@
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
+ },
11
+ "types": {
12
+ "autogenerate": false
13
+ },
14
+ "db": {
15
+ "connectionString": "sqlite://db.sqlite",
16
+ "graphql": true,
17
+ "ignore": {
18
+ "versions": true
19
+ },
20
+ "events": false
21
+ },
22
+ "plugins": {
23
+ "paths": [
24
+ "plugin.js"
25
+ ]
26
+ }
27
+ }
@@ -0,0 +1,12 @@
1
+ 'use strict'
2
+
3
+ /** @param {import('fastify').FastifyInstance} app */
4
+ module.exports = async function (app) {
5
+ app.get('/async_crash', async () => {
6
+ setImmediate(() => {
7
+ throw new Error('boom')
8
+ })
9
+
10
+ return 'ok'
11
+ })
12
+ }
@@ -0,0 +1,27 @@
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
+ },
11
+ "types": {
12
+ "autogenerate": false
13
+ },
14
+ "db": {
15
+ "connectionString": "sqlite://db.sqlite",
16
+ "graphql": true,
17
+ "ignore": {
18
+ "versions": true
19
+ },
20
+ "events": false
21
+ },
22
+ "plugins": {
23
+ "paths": [
24
+ "plugin.js"
25
+ ]
26
+ }
27
+ }
@@ -0,0 +1,12 @@
1
+ 'use strict'
2
+
3
+ /** @param {import('fastify').FastifyInstance} app */
4
+ module.exports = async function (app) {
5
+ app.get('/async_crash', async () => {
6
+ setImmediate(() => {
7
+ throw new Error('boom')
8
+ })
9
+
10
+ return 'ok'
11
+ })
12
+ }
package/lib/config.js CHANGED
@@ -256,7 +256,7 @@ async function wrapConfigInRuntimeConfig ({ configManager, args }) {
256
256
  let serviceId = 'main'
257
257
  try {
258
258
  const packageJson = join(configManager.dirname, 'package.json')
259
- serviceId = require(packageJson).name
259
+ serviceId = require(packageJson).name || 'main'
260
260
  if (serviceId.startsWith('@')) {
261
261
  serviceId = serviceId.split('/')[1]
262
262
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -28,8 +28,8 @@
28
28
  "standard": "^17.1.0",
29
29
  "tsd": "^0.29.0",
30
30
  "typescript": "^5.2.2",
31
- "@platformatic/sql-graphql": "1.7.0",
32
- "@platformatic/sql-mapper": "1.7.0"
31
+ "@platformatic/sql-graphql": "1.7.1",
32
+ "@platformatic/sql-mapper": "1.7.1"
33
33
  },
34
34
  "dependencies": {
35
35
  "@fastify/error": "^3.4.0",
@@ -48,12 +48,12 @@
48
48
  "pino": "^8.16.0",
49
49
  "pino-pretty": "^10.2.3",
50
50
  "undici": "^5.26.3",
51
- "@platformatic/composer": "1.7.0",
52
- "@platformatic/config": "1.7.0",
53
- "@platformatic/db": "1.7.0",
54
- "@platformatic/telemetry": "1.7.0",
55
- "@platformatic/service": "1.7.0",
56
- "@platformatic/utils": "1.7.0"
51
+ "@platformatic/composer": "1.7.1",
52
+ "@platformatic/config": "1.7.1",
53
+ "@platformatic/db": "1.7.1",
54
+ "@platformatic/service": "1.7.1",
55
+ "@platformatic/telemetry": "1.7.1",
56
+ "@platformatic/utils": "1.7.1"
57
57
  },
58
58
  "standard": {
59
59
  "ignore": [