@platformatic/runtime 2.75.0-alpha.1 → 2.75.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 +1 -1
- package/lib/errors.js +3 -1
- package/lib/runtime.js +10 -0
- package/package.json +15 -15
- package/schema.json +1 -1
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
|
|
8
|
+
export type HttpsSchemasPlatformaticDevPlatformaticRuntime2750Json = {
|
|
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
|
|
3
|
+
"version": "2.75.0",
|
|
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
|
|
41
|
-
"@platformatic/db": "2.75.0
|
|
42
|
-
"@platformatic/node": "2.75.0
|
|
43
|
-
"@platformatic/service": "2.75.0
|
|
44
|
-
"@platformatic/sql-graphql": "2.75.0
|
|
45
|
-
"@platformatic/sql-mapper": "2.75.0
|
|
40
|
+
"@platformatic/composer": "2.75.0",
|
|
41
|
+
"@platformatic/db": "2.75.0",
|
|
42
|
+
"@platformatic/node": "2.75.0",
|
|
43
|
+
"@platformatic/service": "2.75.0",
|
|
44
|
+
"@platformatic/sql-graphql": "2.75.0",
|
|
45
|
+
"@platformatic/sql-mapper": "2.75.0"
|
|
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
|
|
80
|
-
"@platformatic/
|
|
81
|
-
"@platformatic/
|
|
82
|
-
"@platformatic/metrics": "2.75.0
|
|
83
|
-
"@platformatic/
|
|
84
|
-
"@platformatic/
|
|
85
|
-
"@platformatic/
|
|
86
|
-
"@platformatic/
|
|
79
|
+
"@platformatic/basic": "2.75.0",
|
|
80
|
+
"@platformatic/itc": "2.75.0",
|
|
81
|
+
"@platformatic/telemetry": "2.75.0",
|
|
82
|
+
"@platformatic/metrics": "2.75.0",
|
|
83
|
+
"@platformatic/ts-compiler": "2.75.0",
|
|
84
|
+
"@platformatic/utils": "2.75.0",
|
|
85
|
+
"@platformatic/generators": "2.75.0",
|
|
86
|
+
"@platformatic/config": "2.75.0"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"test": "pnpm run lint && borp --concurrency=1 --timeout=1200000 && tsd",
|
package/schema.json
CHANGED