@platformatic/runtime 2.27.1 → 2.28.1-alpha.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.
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 HttpsSchemasPlatformaticDevPlatformaticRuntime2271Json = {
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime2281Alpha1Json = {
9
9
  [k: string]: unknown;
10
10
  } & {
11
11
  $schema?: string;
package/lib/runtime.js CHANGED
@@ -71,6 +71,7 @@ class Runtime extends EventEmitter {
71
71
  #workers
72
72
  #restartingWorkers
73
73
  #sharedHttpCache
74
+ servicesConfigsPatches
74
75
 
75
76
  constructor (configManager, runtimeLogsDir, env) {
76
77
  super()
@@ -90,6 +91,7 @@ class Runtime extends EventEmitter {
90
91
  this.#status = undefined
91
92
  this.#restartingWorkers = new Map()
92
93
  this.#sharedHttpCache = null
94
+ this.servicesConfigsPatches = new Map()
93
95
  }
94
96
 
95
97
  async init () {
@@ -687,10 +689,7 @@ class Runtime extends EventEmitter {
687
689
  }
688
690
  } catch (e) {
689
691
  // The service exited while we were sending the ITC, skip it
690
- if (
691
- e.code === 'PLT_RUNTIME_SERVICE_NOT_STARTED' ||
692
- e.code === 'PLT_RUNTIME_SERVICE_EXIT'
693
- ) {
692
+ if (e.code === 'PLT_RUNTIME_SERVICE_NOT_STARTED' || e.code === 'PLT_RUNTIME_SERVICE_EXIT') {
694
693
  continue
695
694
  }
696
695
 
@@ -830,6 +829,14 @@ class Runtime extends EventEmitter {
830
829
  }
831
830
  }
832
831
 
832
+ setServiceConfigPatch (id, patch) {
833
+ this.servicesConfigsPatches.set(id, patch)
834
+ }
835
+
836
+ removeServiceConfigPatch (id) {
837
+ this.servicesConfigsPatches.delete(id)
838
+ }
839
+
833
840
  async getLogIds (runtimePID) {
834
841
  runtimePID = runtimePID ?? process.pid
835
842
 
@@ -990,7 +997,8 @@ class Runtime extends EventEmitter {
990
997
  config,
991
998
  serviceConfig: {
992
999
  ...serviceConfig,
993
- isProduction: this.#isProduction
1000
+ isProduction: this.#isProduction,
1001
+ configPatch: this.servicesConfigsPatches.get(serviceId)
994
1002
  },
995
1003
  worker: {
996
1004
  id: workerId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "2.27.1",
3
+ "version": "2.28.1-alpha.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -22,7 +22,7 @@
22
22
  "borp": "^0.19.0",
23
23
  "c8": "^10.0.0",
24
24
  "eslint": "9",
25
- "execa": "^8.0.1",
25
+ "execa": "^9.0.0",
26
26
  "express": "^4.18.3",
27
27
  "fast-jwt": "^5.0.0",
28
28
  "get-port": "^7.1.0",
@@ -35,12 +35,12 @@
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/composer": "2.27.1",
39
- "@platformatic/node": "2.27.1",
40
- "@platformatic/db": "2.27.1",
41
- "@platformatic/service": "2.27.1",
42
- "@platformatic/sql-graphql": "2.27.1",
43
- "@platformatic/sql-mapper": "2.27.1"
38
+ "@platformatic/db": "2.28.1-alpha.1",
39
+ "@platformatic/composer": "2.28.1-alpha.1",
40
+ "@platformatic/node": "2.28.1-alpha.1",
41
+ "@platformatic/service": "2.28.1-alpha.1",
42
+ "@platformatic/sql-mapper": "2.28.1-alpha.1",
43
+ "@platformatic/sql-graphql": "2.28.1-alpha.1"
44
44
  },
45
45
  "dependencies": {
46
46
  "@fastify/accepts": "^5.0.0",
@@ -63,7 +63,7 @@
63
63
  "graphql": "^16.8.1",
64
64
  "help-me": "^5.0.0",
65
65
  "minimist": "^1.2.8",
66
- "pino": "^8.19.0",
66
+ "pino": "^9.0.0",
67
67
  "pino-pretty": "^13.0.0",
68
68
  "pino-roll": "^2.0.0",
69
69
  "prom-client": "^15.1.2",
@@ -73,13 +73,13 @@
73
73
  "undici": "^7.0.0",
74
74
  "undici-thread-interceptor": "^0.10.0",
75
75
  "ws": "^8.16.0",
76
- "@platformatic/basic": "2.27.1",
77
- "@platformatic/config": "2.27.1",
78
- "@platformatic/generators": "2.27.1",
79
- "@platformatic/itc": "2.27.1",
80
- "@platformatic/ts-compiler": "2.27.1",
81
- "@platformatic/telemetry": "2.27.1",
82
- "@platformatic/utils": "2.27.1"
76
+ "@platformatic/basic": "2.28.1-alpha.1",
77
+ "@platformatic/config": "2.28.1-alpha.1",
78
+ "@platformatic/generators": "2.28.1-alpha.1",
79
+ "@platformatic/itc": "2.28.1-alpha.1",
80
+ "@platformatic/telemetry": "2.28.1-alpha.1",
81
+ "@platformatic/ts-compiler": "2.28.1-alpha.1",
82
+ "@platformatic/utils": "2.28.1-alpha.1"
83
83
  },
84
84
  "scripts": {
85
85
  "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.27.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.28.1-alpha.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {