wattpm 3.16.0 → 3.18.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.
@@ -36,7 +36,7 @@ export async function buildCommand (logger, args) {
36
36
  }
37
37
 
38
38
  try {
39
- runtime = await create(configurationFile)
39
+ runtime = await create(configurationFile, undefined, { build: true })
40
40
  await runtime.init()
41
41
  /* c8 ignore next 4 - Hard to test */
42
42
  } catch (error) {
@@ -10,7 +10,8 @@ export async function pprofStartCommand (logger, args) {
10
10
  const { positionals, values } = parseArgs(
11
11
  args,
12
12
  {
13
- type: { type: 'string', short: 't', default: 'cpu' }
13
+ type: { type: 'string', short: 't', default: 'cpu' },
14
+ 'source-maps': { type: 'boolean', short: 's', default: false }
14
15
  },
15
16
  false
16
17
  )
@@ -29,6 +30,11 @@ export async function pprofStartCommand (logger, args) {
29
30
 
30
31
  const options = { intervalMicros: 1000, type }
31
32
 
33
+ // Add sourceMaps option if enabled
34
+ if (values['source-maps']) {
35
+ options.sourceMaps = true
36
+ }
37
+
32
38
  if (applicationId) {
33
39
  // Start profiling for specific application
34
40
  const application = runtimeApplications.find(s => s.id === applicationId)
@@ -102,6 +108,7 @@ export async function pprofStopCommand (logger, args) {
102
108
  logger.info(
103
109
  `${type.toUpperCase()} profiling stopped for application ${bold(applicationId)}, profile saved to ${bold(filename)}`
104
110
  )
111
+ logger.info(`Run ${bold(`npx @platformatic/flame generate ${filename}`)} to generate the flamegraph`)
105
112
  } else {
106
113
  // Stop profiling for all applications
107
114
  for (const application of runtimeApplications) {
@@ -112,6 +119,7 @@ export async function pprofStopCommand (logger, args) {
112
119
  logger.info(
113
120
  `${type.toUpperCase()} profiling stopped for application ${bold(application.id)}, profile saved to ${bold(filename)}`
114
121
  )
122
+ logger.info(`Run ${bold(`npx @platformatic/flame generate ${filename}`)} to generate the flamegraph`)
115
123
  } catch (error) {
116
124
  logger.warn(`Failed to stop profiling for application ${application.id}: ${error.message}`)
117
125
  }
@@ -151,6 +159,10 @@ export const help = {
151
159
  {
152
160
  name: '--type, -t',
153
161
  description: 'Profile type: "cpu" for CPU wall time (default) or "heap" for heap memory'
162
+ },
163
+ {
164
+ name: '--source-maps, -s',
165
+ description: 'Enable source map support to resolve TypeScript and other transpiled code locations in profiles'
154
166
  }
155
167
  ],
156
168
  args: [
@@ -171,9 +183,11 @@ export const help = {
171
183
  footer:
172
184
  'Use "pprof start [application]" to start profiling and "pprof stop [application]" to stop and save profile data.\n' +
173
185
  'Examples:\n' +
174
- ' wattpm pprof start --type=cpu my-app # Start CPU profiling\n' +
175
- ' wattpm pprof start --type=heap my-app # Start heap profiling\n' +
176
- ' wattpm pprof stop --type=cpu my-app # Stop CPU profiling\n' +
177
- ' wattpm pprof stop --type=heap my-app # Stop heap profiling'
186
+ ' wattpm pprof start --type=cpu my-app # Start CPU profiling\n' +
187
+ ' wattpm pprof start --type=heap my-app # Start heap profiling\n' +
188
+ ' wattpm pprof start --source-maps my-app # Start CPU profiling with source maps\n' +
189
+ ' wattpm pprof start --type=cpu --source-maps my-app # Start CPU profiling with source maps\n' +
190
+ ' wattpm pprof stop --type=cpu my-app # Stop CPU profiling\n' +
191
+ ' wattpm pprof stop --type=heap my-app # Stop heap profiling'
178
192
  }
179
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wattpm",
3
- "version": "3.16.0",
3
+ "version": "3.18.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.16.0",
33
- "@platformatic/runtime": "3.16.0",
34
- "@platformatic/foundation": "3.16.0"
32
+ "@platformatic/control": "3.18.0",
33
+ "@platformatic/foundation": "3.18.0",
34
+ "@platformatic/runtime": "3.18.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.16.0"
45
+ "@platformatic/node": "3.18.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.16.0.json",
2
+ "$id": "https://schemas.platformatic.dev/wattpm/3.18.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Runtime Config",
5
5
  "type": "object",
@@ -1626,8 +1626,7 @@
1626
1626
  {
1627
1627
  "type": "string"
1628
1628
  }
1629
- ],
1630
- "default": 4294967296
1629
+ ]
1631
1630
  },
1632
1631
  "maxYoungGeneration": {
1633
1632
  "anyOf": [