@platformatic/control 3.5.0 → 3.6.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/index.d.ts CHANGED
@@ -98,13 +98,17 @@ export class RuntimeApiClient {
98
98
  getRuntimes (): Promise<Runtime[]>
99
99
  getRuntimeMetadata (pid: number): Promise<Runtime>
100
100
  getRuntimeApplications (pid: number): Promise<RuntimeApplications>
101
- getRuntimeConfig (pid: number): Promise<Record<string, unknown> & { path?: string, configFile?: string, configPath?: string, server?: { path?: string } }>
101
+ getRuntimeConfig (
102
+ pid: number
103
+ ): Promise<
104
+ Record<string, unknown> & { path?: string; configFile?: string; configPath?: string; server?: { path?: string } }
105
+ >
102
106
  getRuntimeApplicationConfig (pid: number, applicationId?: string): Promise<Record<string, unknown>>
103
107
  getRuntimeEnv (pid: number): Promise<Record<string, string>>
104
108
  getRuntimeOpenapi (pid: number, applicationId: string): Promise<Record<string, unknown>>
105
109
  getRuntimeApplicationEnv (pid: number, applicationId: string): Promise<Record<string, string>>
106
110
  reloadRuntime (pid: number, options?: object): Promise<ChildProcess>
107
- restartRuntime (pid: number): Promise<void>
111
+ restartRuntime (pid: number, ...applications: string[]): Promise<void>
108
112
  stopRuntime (pid: number): Promise<void>
109
113
  getRuntimeMetrics<T extends { format?: 'text' | 'json' }> (
110
114
  pid: number,
package/lib/index.js CHANGED
@@ -370,12 +370,14 @@ export class RuntimeApiClient {
370
370
  return child
371
371
  }
372
372
 
373
- async restartRuntime (pid) {
373
+ async restartRuntime (pid, ...applications) {
374
374
  const client = this.#getUndiciClient(pid)
375
375
 
376
376
  const { statusCode, body } = await client.request({
377
377
  path: '/api/v1/restart',
378
- method: 'POST'
378
+ method: 'POST',
379
+ headers: { 'content-type': 'application/json' },
380
+ body: JSON.stringify({ applications })
379
381
  })
380
382
 
381
383
  if (statusCode !== 200) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/control",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "Platformatic Control",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "split2": "^4.2.0",
24
24
  "tsd": "^0.33.0",
25
25
  "typescript": "^5.5.4",
26
- "@platformatic/runtime": "3.5.0",
27
- "@platformatic/service": "3.5.0"
26
+ "@platformatic/runtime": "3.6.0",
27
+ "@platformatic/service": "3.6.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "@fastify/error": "^4.0.0",
@@ -34,7 +34,7 @@
34
34
  "table": "^6.8.1",
35
35
  "undici": "^7.0.0",
36
36
  "ws": "^8.16.0",
37
- "@platformatic/foundation": "3.5.0"
37
+ "@platformatic/foundation": "3.6.0"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=22.19.0"