@platformatic/runtime 2.75.0-alpha.1 → 2.75.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 HttpsSchemasPlatformaticDevPlatformaticRuntime2750Alpha1Json = {
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime2751Json = {
9
9
  [k: string]: unknown;
10
10
  } & {
11
11
  $schema?: string;
package/lib/errors.js CHANGED
@@ -112,5 +112,7 @@ module.exports = {
112
112
  CannotRemoveServiceOnUpdateError: createError(
113
113
  `${ERROR_PREFIX}_CANNOT_REMOVE_SERVICE_ON_UPDATE`,
114
114
  'Cannot remove service "%s" when updating a Runtime'
115
- )
115
+ ),
116
+
117
+ MissingPprofCapture: createError(`${ERROR_PREFIX}_MISSING_PPROF_CAPTURE`, 'Please install @platformatic/watt-pprof-capture')
116
118
  }
package/lib/runtime.js CHANGED
@@ -806,14 +806,24 @@ class Runtime extends EventEmitter {
806
806
  return sendViaITC(service, 'getServiceEnv')
807
807
  }
808
808
 
809
+ #validatePprofCapturePreload () {
810
+ const found = this.#configManager.current.preload?.some(p => p.includes('watt-pprof-capture'))
811
+
812
+ if (!found) {
813
+ throw new errors.MissingPprofCapture()
814
+ }
815
+ }
816
+
809
817
  async startServiceProfiling (id, options = {}, ensureStarted = true) {
810
818
  const service = await this.#getServiceById(id, ensureStarted)
819
+ this.#validatePprofCapturePreload()
811
820
 
812
821
  return sendViaITC(service, 'startProfiling', options)
813
822
  }
814
823
 
815
824
  async stopServiceProfiling (id, ensureStarted = true) {
816
825
  const service = await this.#getServiceById(id, ensureStarted)
826
+ this.#validatePprofCapturePreload()
817
827
 
818
828
  return sendViaITC(service, 'stopProfiling')
819
829
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "2.75.0-alpha.1",
3
+ "version": "2.75.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -37,12 +37,12 @@
37
37
  "typescript": "^5.5.4",
38
38
  "undici-oidc-interceptor": "^0.5.0",
39
39
  "why-is-node-running": "^2.2.2",
40
- "@platformatic/composer": "2.75.0-alpha.1",
41
- "@platformatic/db": "2.75.0-alpha.1",
42
- "@platformatic/node": "2.75.0-alpha.1",
43
- "@platformatic/service": "2.75.0-alpha.1",
44
- "@platformatic/sql-graphql": "2.75.0-alpha.1",
45
- "@platformatic/sql-mapper": "2.75.0-alpha.1"
40
+ "@platformatic/composer": "2.75.1",
41
+ "@platformatic/node": "2.75.1",
42
+ "@platformatic/service": "2.75.1",
43
+ "@platformatic/sql-graphql": "2.75.1",
44
+ "@platformatic/db": "2.75.1",
45
+ "@platformatic/sql-mapper": "2.75.1"
46
46
  },
47
47
  "dependencies": {
48
48
  "@fastify/accepts": "^5.0.0",
@@ -76,14 +76,14 @@
76
76
  "undici": "^7.0.0",
77
77
  "undici-thread-interceptor": "^0.14.0",
78
78
  "ws": "^8.16.0",
79
- "@platformatic/basic": "2.75.0-alpha.1",
80
- "@platformatic/config": "2.75.0-alpha.1",
81
- "@platformatic/generators": "2.75.0-alpha.1",
82
- "@platformatic/metrics": "2.75.0-alpha.1",
83
- "@platformatic/itc": "2.75.0-alpha.1",
84
- "@platformatic/telemetry": "2.75.0-alpha.1",
85
- "@platformatic/ts-compiler": "2.75.0-alpha.1",
86
- "@platformatic/utils": "2.75.0-alpha.1"
79
+ "@platformatic/basic": "2.75.1",
80
+ "@platformatic/generators": "2.75.1",
81
+ "@platformatic/metrics": "2.75.1",
82
+ "@platformatic/itc": "2.75.1",
83
+ "@platformatic/telemetry": "2.75.1",
84
+ "@platformatic/ts-compiler": "2.75.1",
85
+ "@platformatic/utils": "2.75.1",
86
+ "@platformatic/config": "2.75.1"
87
87
  },
88
88
  "scripts": {
89
89
  "test": "pnpm run lint && borp --concurrency=1 --timeout=1200000 && tsd",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.75.0-alpha.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.75.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {