@platformatic/runtime 2.39.0 → 2.40.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/config.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
- export type HttpsSchemasPlatformaticDevPlatformaticRuntime2390Json = {
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime2400Json = {
9
9
  [k: string]: unknown;
10
10
  } & {
11
11
  $schema?: string;
package/lib/start.js CHANGED
@@ -29,7 +29,7 @@ async function restartRuntime (runtime) {
29
29
  }
30
30
 
31
31
  async function buildRuntime (configManager, env) {
32
- env = env || process.env
32
+ env = env || Object.assign({}, process.env, configManager.env)
33
33
 
34
34
  if (inspector.url() && !env.VSCODE_INSPECTOR_OPTIONS) {
35
35
  throw new errors.NodeInspectorFlagsNotSupportedError()
@@ -107,6 +107,7 @@ class RemoteCacheStore {
107
107
 
108
108
  #sanitizeRequest (request) {
109
109
  return {
110
+ id: request.id,
110
111
  origin: request.origin,
111
112
  method: request.method,
112
113
  path: request.path,
@@ -105,15 +105,19 @@ async function main () {
105
105
  const service = workerData.serviceConfig
106
106
 
107
107
  // Load env file and mixin env vars from service config
108
+ let envfile
108
109
  if (service.envfile) {
109
- const envfile = resolve(workerData.dirname, service.envfile)
110
- globalThis.platformatic.logger.info({ envfile }, 'Loading envfile...')
111
-
112
- dotenv.config({
113
- path: envfile
114
- })
110
+ envfile = resolve(workerData.dirname, service.envfile)
111
+ } else {
112
+ envfile = resolve(workerData.serviceConfig.path, '.env')
115
113
  }
116
114
 
115
+ globalThis.platformatic.logger.debug({ envfile }, 'Loading envfile...')
116
+
117
+ dotenv.config({
118
+ path: envfile
119
+ })
120
+
117
121
  if (config.env) {
118
122
  Object.assign(process.env, config.env)
119
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "2.39.0",
3
+ "version": "2.40.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -36,12 +36,12 @@
36
36
  "typescript": "^5.5.4",
37
37
  "undici-oidc-interceptor": "^0.5.0",
38
38
  "why-is-node-running": "^2.2.2",
39
- "@platformatic/composer": "2.39.0",
40
- "@platformatic/db": "2.39.0",
41
- "@platformatic/node": "2.39.0",
42
- "@platformatic/service": "2.39.0",
43
- "@platformatic/sql-graphql": "2.39.0",
44
- "@platformatic/sql-mapper": "2.39.0"
39
+ "@platformatic/composer": "2.40.0",
40
+ "@platformatic/db": "2.40.0",
41
+ "@platformatic/sql-graphql": "2.40.0",
42
+ "@platformatic/service": "2.40.0",
43
+ "@platformatic/sql-mapper": "2.40.0",
44
+ "@platformatic/node": "2.40.0"
45
45
  },
46
46
  "dependencies": {
47
47
  "@fastify/accepts": "^5.0.0",
@@ -75,13 +75,13 @@
75
75
  "undici": "^7.0.0",
76
76
  "undici-thread-interceptor": "^0.11.0",
77
77
  "ws": "^8.16.0",
78
- "@platformatic/basic": "2.39.0",
79
- "@platformatic/generators": "2.39.0",
80
- "@platformatic/config": "2.39.0",
81
- "@platformatic/itc": "2.39.0",
82
- "@platformatic/telemetry": "2.39.0",
83
- "@platformatic/ts-compiler": "2.39.0",
84
- "@platformatic/utils": "2.39.0"
78
+ "@platformatic/basic": "2.40.0",
79
+ "@platformatic/config": "2.40.0",
80
+ "@platformatic/generators": "2.40.0",
81
+ "@platformatic/itc": "2.40.0",
82
+ "@platformatic/telemetry": "2.40.0",
83
+ "@platformatic/ts-compiler": "2.40.0",
84
+ "@platformatic/utils": "2.40.0"
85
85
  },
86
86
  "scripts": {
87
87
  "test": "npm run lint && borp --concurrency=1 --timeout=300000 && tsd",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.39.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.40.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {