wattpm 3.5.1 → 3.7.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.
@@ -106,9 +106,9 @@ export async function restartCommand (logger, args) {
106
106
 
107
107
  try {
108
108
  const client = new RuntimeApiClient()
109
- const [runtime] = await getMatchingRuntime(client, positionals)
109
+ const [runtime, applications] = await getMatchingRuntime(client, positionals)
110
110
 
111
- await client.restartRuntime(runtime.pid)
111
+ await client.restartRuntime(runtime.pid, ...applications)
112
112
  await client.close()
113
113
 
114
114
  logger.done(`Runtime ${bold(runtime.packageName)} has been restarted.`)
@@ -209,13 +209,20 @@ export const help = {
209
209
  ]
210
210
  },
211
211
  restart: {
212
- usage: 'restart [id]',
213
- description: 'Restarts all applications',
212
+ usage: 'restart [id] [application...]',
213
+ description: 'Restarts applications',
214
+ footer:
215
+ 'All applications are restarted in parallel, and within each application, workers are replaced one at a time.',
214
216
  args: [
215
217
  {
216
218
  name: 'id',
217
219
  description:
218
220
  'The process ID or the name of the application (it can be omitted only if there is a single application running)'
221
+ },
222
+ {
223
+ name: 'application',
224
+ description:
225
+ 'The name of the application to restart (if omitted, all applications are restarted)'
219
226
  }
220
227
  ]
221
228
  },
@@ -113,8 +113,8 @@ export async function pprofCommand (logger, args) {
113
113
 
114
114
  export const help = {
115
115
  pprof: {
116
- usage: 'pprof <start|stop> [id] [service]',
117
- description: 'Profile CPU usage of running services',
116
+ usage: 'pprof <start|stop> [id] [application]',
117
+ description: 'Profile CPU usage of running application',
118
118
  options: [],
119
119
  args: [
120
120
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wattpm",
3
- "version": "3.5.1",
3
+ "version": "3.7.0",
4
4
  "description": "The Node.js Application Server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -29,9 +29,9 @@
29
29
  "pino-pretty": "^13.0.0",
30
30
  "split2": "^4.2.0",
31
31
  "table": "^6.8.2",
32
- "@platformatic/control": "3.5.1",
33
- "@platformatic/runtime": "3.5.1",
34
- "@platformatic/foundation": "3.5.1"
32
+ "@platformatic/control": "3.7.0",
33
+ "@platformatic/foundation": "3.7.0",
34
+ "@platformatic/runtime": "3.7.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "cleaner-spec-reporter": "^0.5.0",
@@ -42,7 +42,7 @@
42
42
  "neostandard": "^0.12.0",
43
43
  "typescript": "^5.5.4",
44
44
  "undici": "^7.0.0",
45
- "@platformatic/node": "3.5.1"
45
+ "@platformatic/node": "3.7.0"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/wattpm/3.5.1.json",
2
+ "$id": "https://schemas.platformatic.dev/wattpm/3.7.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Runtime Config",
5
5
  "type": "object",
@@ -926,6 +926,18 @@
926
926
  ],
927
927
  "default": 1
928
928
  },
929
+ "workersRestartDelay": {
930
+ "anyOf": [
931
+ {
932
+ "type": "number",
933
+ "minimum": 0
934
+ },
935
+ {
936
+ "type": "string"
937
+ }
938
+ ],
939
+ "default": 0
940
+ },
929
941
  "logger": {
930
942
  "type": "object",
931
943
  "properties": {