@platformatic/runtime 3.16.0 → 3.17.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/generator.js +3 -8
- package/lib/runtime.js +1 -1
- package/lib/worker/main.js +5 -4
- package/package.json +15 -17
- package/schema.json +1 -1
package/lib/generator.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import createError from '@fastify/error'
|
|
2
2
|
import {
|
|
3
|
+
createEnvFileTool,
|
|
3
4
|
defaultPackageManager,
|
|
4
5
|
findConfigurationFile,
|
|
5
6
|
generateDashedName,
|
|
@@ -50,12 +51,6 @@ function getRuntimeBaseEnvVars (config) {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
// This is needed as dotenv-tool is not loading with ESM currently
|
|
54
|
-
export function createDotenvTool (...args) {
|
|
55
|
-
const { DotEnvTool } = createRequire(import.meta.url)('dotenv-tool')
|
|
56
|
-
return new DotEnvTool(...args)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
54
|
export class RuntimeGenerator extends BaseGenerator {
|
|
60
55
|
constructor (opts) {
|
|
61
56
|
super({
|
|
@@ -371,8 +366,8 @@ export class RuntimeGenerator extends BaseGenerator {
|
|
|
371
366
|
// check all applications are present with the same template
|
|
372
367
|
const allCurrentApplicationsNames = this.applications.map(s => s.name)
|
|
373
368
|
const allNewApplicationsNames = newConfig.applications.map(s => s.name)
|
|
374
|
-
// load
|
|
375
|
-
const envTool =
|
|
369
|
+
// load env file tool
|
|
370
|
+
const envTool = createEnvFileTool({
|
|
376
371
|
path: join(this.targetDirectory, '.env')
|
|
377
372
|
})
|
|
378
373
|
|
package/lib/runtime.js
CHANGED
|
@@ -222,7 +222,7 @@ export class Runtime extends EventEmitter {
|
|
|
222
222
|
await this.addApplications(this.#config.applications)
|
|
223
223
|
await this.#setDispatcher(config.undici)
|
|
224
224
|
|
|
225
|
-
if (config.scheduler) {
|
|
225
|
+
if (config.scheduler && !this.#context.build) {
|
|
226
226
|
this.#scheduler = startScheduler(config.scheduler, this.#dispatcher, logger)
|
|
227
227
|
}
|
|
228
228
|
|
package/lib/worker/main.js
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
disablePinoDirectWrite,
|
|
5
5
|
getPrivateSymbol
|
|
6
6
|
} from '@platformatic/foundation'
|
|
7
|
-
import dotenv from 'dotenv'
|
|
8
7
|
import { subscribe } from 'node:diagnostics_channel'
|
|
9
8
|
import { EventEmitter } from 'node:events'
|
|
10
9
|
import { ServerResponse } from 'node:http'
|
|
@@ -110,9 +109,11 @@ async function main () {
|
|
|
110
109
|
|
|
111
110
|
globalThis.platformatic.logger.debug({ envfile }, 'Loading envfile...')
|
|
112
111
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
112
|
+
try {
|
|
113
|
+
process.loadEnvFile(envfile)
|
|
114
|
+
} catch {
|
|
115
|
+
// Ignore if the file doesn't exist, similar to dotenv behavior
|
|
116
|
+
}
|
|
116
117
|
|
|
117
118
|
if (runtimeConfig.env) {
|
|
118
119
|
Object.assign(process.env, runtimeConfig.env)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"typescript": "^5.5.4",
|
|
36
36
|
"undici-oidc-interceptor": "^0.5.0",
|
|
37
37
|
"why-is-node-running": "^2.2.2",
|
|
38
|
-
"@platformatic/
|
|
39
|
-
"@platformatic/
|
|
40
|
-
"@platformatic/gateway": "3.
|
|
41
|
-
"@platformatic/node": "3.
|
|
42
|
-
"@platformatic/
|
|
43
|
-
"@platformatic/sql-graphql": "3.
|
|
44
|
-
"@platformatic/
|
|
45
|
-
"@platformatic/
|
|
38
|
+
"@platformatic/db": "3.17.0",
|
|
39
|
+
"@platformatic/composer": "3.17.0",
|
|
40
|
+
"@platformatic/gateway": "3.17.0",
|
|
41
|
+
"@platformatic/node": "3.17.0",
|
|
42
|
+
"@platformatic/service": "3.17.0",
|
|
43
|
+
"@platformatic/sql-graphql": "3.17.0",
|
|
44
|
+
"@platformatic/sql-mapper": "3.17.0",
|
|
45
|
+
"@platformatic/wattpm-pprof-capture": "3.17.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@fastify/accepts": "^5.0.0",
|
|
@@ -57,8 +57,6 @@
|
|
|
57
57
|
"colorette": "^2.0.20",
|
|
58
58
|
"cron": "^4.1.0",
|
|
59
59
|
"debounce": "^2.0.0",
|
|
60
|
-
"dotenv": "^16.4.5",
|
|
61
|
-
"dotenv-tool": "^0.1.1",
|
|
62
60
|
"fastest-levenshtein": "^1.0.16",
|
|
63
61
|
"fastify": "^5.0.0",
|
|
64
62
|
"graphql": "^16.8.1",
|
|
@@ -73,12 +71,12 @@
|
|
|
73
71
|
"undici": "^7.0.0",
|
|
74
72
|
"undici-thread-interceptor": "^0.15.0",
|
|
75
73
|
"ws": "^8.16.0",
|
|
76
|
-
"@platformatic/basic": "3.
|
|
77
|
-
"@platformatic/
|
|
78
|
-
"@platformatic/
|
|
79
|
-
"@platformatic/foundation": "3.
|
|
80
|
-
"@platformatic/metrics": "3.
|
|
81
|
-
"@platformatic/telemetry": "3.
|
|
74
|
+
"@platformatic/basic": "3.17.0",
|
|
75
|
+
"@platformatic/itc": "3.17.0",
|
|
76
|
+
"@platformatic/generators": "3.17.0",
|
|
77
|
+
"@platformatic/foundation": "3.17.0",
|
|
78
|
+
"@platformatic/metrics": "3.17.0",
|
|
79
|
+
"@platformatic/telemetry": "3.17.0"
|
|
82
80
|
},
|
|
83
81
|
"engines": {
|
|
84
82
|
"node": ">=22.19.0"
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/runtime/3.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/runtime/3.17.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Runtime Config",
|
|
5
5
|
"type": "object",
|