@platformatic/runtime 1.42.0 → 1.43.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/preload/platformatic.runtime.json +15 -0
- package/fixtures/preload/preload.js +1 -0
- package/fixtures/preload/services/a/platformatic.service.json +14 -0
- package/fixtures/preload/services/a/plugin.js +7 -0
- package/lib/schema.js +4 -0
- package/lib/worker.js +5 -0
- package/package.json +10 -10
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://platformatic.dev/schemas/v1.20.0/runtime",
|
|
3
|
+
"entrypoint": "a",
|
|
4
|
+
"preload": "preload.js",
|
|
5
|
+
"autoload": {
|
|
6
|
+
"path": "./services"
|
|
7
|
+
},
|
|
8
|
+
"server": {
|
|
9
|
+
"hostname": "127.0.0.1",
|
|
10
|
+
"port": "{{PORT}}",
|
|
11
|
+
"logger": {
|
|
12
|
+
"level": "info"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
globalThis.value = 42
|
package/lib/schema.js
CHANGED
package/lib/worker.js
CHANGED
|
@@ -4,6 +4,7 @@ const inspector = require('node:inspector')
|
|
|
4
4
|
const { register, createRequire } = require('node:module')
|
|
5
5
|
const { isatty } = require('node:tty')
|
|
6
6
|
const { join } = require('node:path')
|
|
7
|
+
const { pathToFileURL } = require('node:url')
|
|
7
8
|
const {
|
|
8
9
|
MessageChannel,
|
|
9
10
|
parentPort,
|
|
@@ -120,6 +121,10 @@ process.on('unhandledRejection', (err) => {
|
|
|
120
121
|
})
|
|
121
122
|
|
|
122
123
|
async function main () {
|
|
124
|
+
if (config.preload) {
|
|
125
|
+
await import(pathToFileURL(config.preload))
|
|
126
|
+
}
|
|
127
|
+
|
|
123
128
|
const { inspectorOptions } = workerData.config
|
|
124
129
|
|
|
125
130
|
if (inspectorOptions) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.43.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.43.0",
|
|
38
|
+
"@platformatic/sql-mapper": "1.43.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/db": "1.
|
|
68
|
-
"@platformatic/config": "1.
|
|
69
|
-
"@platformatic/
|
|
70
|
-
"@platformatic/
|
|
71
|
-
"@platformatic/telemetry": "1.
|
|
72
|
-
"@platformatic/
|
|
66
|
+
"@platformatic/composer": "1.43.0",
|
|
67
|
+
"@platformatic/db": "1.43.0",
|
|
68
|
+
"@platformatic/config": "1.43.0",
|
|
69
|
+
"@platformatic/generators": "1.43.0",
|
|
70
|
+
"@platformatic/utils": "1.43.0",
|
|
71
|
+
"@platformatic/telemetry": "1.43.0",
|
|
72
|
+
"@platformatic/service": "1.43.0"
|
|
73
73
|
},
|
|
74
74
|
"standard": {
|
|
75
75
|
"ignore": [
|