wattpm 3.58.1 → 3.60.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/index.js +28 -2
- package/package.json +6 -6
- package/schema.json +244 -2
package/index.js
CHANGED
|
@@ -20,6 +20,28 @@ import { version } from './lib/schema.js'
|
|
|
20
20
|
|
|
21
21
|
export * from './lib/schema.js'
|
|
22
22
|
|
|
23
|
+
// Extract the -c/--config option from application command arguments, leaving
|
|
24
|
+
// all the other arguments for the application command itself
|
|
25
|
+
function extractConfigOption (args) {
|
|
26
|
+
const remaining = []
|
|
27
|
+
let config = null
|
|
28
|
+
|
|
29
|
+
for (let i = 0; i < args.length; i++) {
|
|
30
|
+
const arg = args[i]
|
|
31
|
+
|
|
32
|
+
if (arg === '-c' || arg === '--config') {
|
|
33
|
+
config = args[i + 1]
|
|
34
|
+
i++
|
|
35
|
+
} else if (arg.startsWith('--config=')) {
|
|
36
|
+
config = arg.slice('--config='.length)
|
|
37
|
+
} else {
|
|
38
|
+
remaining.push(arg)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return { config, remaining }
|
|
43
|
+
}
|
|
44
|
+
|
|
23
45
|
export async function main () {
|
|
24
46
|
updateGlobals({ executable: this.executableId })
|
|
25
47
|
|
|
@@ -75,6 +97,7 @@ export async function main () {
|
|
|
75
97
|
let command
|
|
76
98
|
const requestedCommand = unparsed[0] || 'help'
|
|
77
99
|
let applicationCommandContext
|
|
100
|
+
let applicationCommandArgs
|
|
78
101
|
switch (requestedCommand) {
|
|
79
102
|
case 'build':
|
|
80
103
|
command = buildCommand
|
|
@@ -144,11 +167,14 @@ export async function main () {
|
|
|
144
167
|
break
|
|
145
168
|
default:
|
|
146
169
|
if (requestedCommand) {
|
|
147
|
-
|
|
170
|
+
// Extract the -c/--config option, which selects the runtime configuration file
|
|
171
|
+
const { config: runtimeConfigFile, remaining } = extractConfigOption(unparsed.slice(1))
|
|
172
|
+
const applicationsCommands = await loadApplicationsCommands(this.executableName, runtimeConfigFile)
|
|
148
173
|
const applicationCommand = applicationsCommands.commands[requestedCommand]
|
|
149
174
|
|
|
150
175
|
if (applicationCommand) {
|
|
151
176
|
applicationCommandContext = applicationsCommands.applications[requestedCommand]
|
|
177
|
+
applicationCommandArgs = remaining
|
|
152
178
|
command = applicationCommand
|
|
153
179
|
}
|
|
154
180
|
}
|
|
@@ -168,7 +194,7 @@ export async function main () {
|
|
|
168
194
|
if (applicationCommandContext) {
|
|
169
195
|
const invocationCwd = process.cwd()
|
|
170
196
|
process.chdir(applicationCommandContext.path)
|
|
171
|
-
return command.call(this, logger, applicationCommandContext.config,
|
|
197
|
+
return command.call(this, logger, applicationCommandContext.config, applicationCommandArgs, {
|
|
172
198
|
application: applicationCommandContext,
|
|
173
199
|
cwd: invocationCwd,
|
|
174
200
|
colorette,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wattpm",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.60.0",
|
|
4
4
|
"description": "The Node.js Application Server",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"pino-pretty": "^13.0.0",
|
|
31
31
|
"split2": "^4.2.0",
|
|
32
32
|
"table": "^6.8.2",
|
|
33
|
-
"@platformatic/control": "3.
|
|
34
|
-
"@platformatic/
|
|
35
|
-
"@platformatic/
|
|
36
|
-
"@platformatic/runtime": "3.
|
|
33
|
+
"@platformatic/control": "3.60.0",
|
|
34
|
+
"@platformatic/globals": "3.60.0",
|
|
35
|
+
"@platformatic/foundation": "3.60.0",
|
|
36
|
+
"@platformatic/runtime": "3.60.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"cleaner-spec-reporter": "^0.5.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"neostandard": "^0.12.0",
|
|
46
46
|
"typescript": "^5.5.4",
|
|
47
47
|
"undici": "^7.27.2",
|
|
48
|
-
"@platformatic/node": "3.
|
|
48
|
+
"@platformatic/node": "3.60.0"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=22.19.0"
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/wattpm/3.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/wattpm/3.60.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Runtime Config",
|
|
5
5
|
"type": "object",
|
|
@@ -58,6 +58,23 @@
|
|
|
58
58
|
"id": {
|
|
59
59
|
"type": "string"
|
|
60
60
|
},
|
|
61
|
+
"enabled": {
|
|
62
|
+
"anyOf": [
|
|
63
|
+
{
|
|
64
|
+
"type": "boolean"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": {
|
|
72
|
+
"type": "boolean"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"default": true
|
|
77
|
+
},
|
|
61
78
|
"config": {
|
|
62
79
|
"type": "string"
|
|
63
80
|
},
|
|
@@ -427,6 +444,23 @@
|
|
|
427
444
|
"id": {
|
|
428
445
|
"type": "string"
|
|
429
446
|
},
|
|
447
|
+
"enabled": {
|
|
448
|
+
"anyOf": [
|
|
449
|
+
{
|
|
450
|
+
"type": "boolean"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"type": "string"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"type": "object",
|
|
457
|
+
"additionalProperties": {
|
|
458
|
+
"type": "boolean"
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"default": true
|
|
463
|
+
},
|
|
430
464
|
"path": {
|
|
431
465
|
"type": "string",
|
|
432
466
|
"allowEmptyPaths": true,
|
|
@@ -806,6 +840,23 @@
|
|
|
806
840
|
"id": {
|
|
807
841
|
"type": "string"
|
|
808
842
|
},
|
|
843
|
+
"enabled": {
|
|
844
|
+
"anyOf": [
|
|
845
|
+
{
|
|
846
|
+
"type": "boolean"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"type": "string"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"type": "object",
|
|
853
|
+
"additionalProperties": {
|
|
854
|
+
"type": "boolean"
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
],
|
|
858
|
+
"default": true
|
|
859
|
+
},
|
|
809
860
|
"path": {
|
|
810
861
|
"type": "string",
|
|
811
862
|
"allowEmptyPaths": true,
|
|
@@ -1185,6 +1236,23 @@
|
|
|
1185
1236
|
"id": {
|
|
1186
1237
|
"type": "string"
|
|
1187
1238
|
},
|
|
1239
|
+
"enabled": {
|
|
1240
|
+
"anyOf": [
|
|
1241
|
+
{
|
|
1242
|
+
"type": "boolean"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"type": "string"
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
"type": "object",
|
|
1249
|
+
"additionalProperties": {
|
|
1250
|
+
"type": "boolean"
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
],
|
|
1254
|
+
"default": true
|
|
1255
|
+
},
|
|
1188
1256
|
"path": {
|
|
1189
1257
|
"type": "string",
|
|
1190
1258
|
"allowEmptyPaths": true,
|
|
@@ -1781,6 +1849,25 @@
|
|
|
1781
1849
|
"captureStdio": {
|
|
1782
1850
|
"type": "boolean",
|
|
1783
1851
|
"default": true
|
|
1852
|
+
},
|
|
1853
|
+
"pino": {
|
|
1854
|
+
"type": "object",
|
|
1855
|
+
"default": {},
|
|
1856
|
+
"properties": {
|
|
1857
|
+
"level": {
|
|
1858
|
+
"type": "string",
|
|
1859
|
+
"default": "level"
|
|
1860
|
+
},
|
|
1861
|
+
"time": {
|
|
1862
|
+
"type": "string",
|
|
1863
|
+
"default": "time"
|
|
1864
|
+
},
|
|
1865
|
+
"message": {
|
|
1866
|
+
"type": "string",
|
|
1867
|
+
"default": "msg"
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
"additionalProperties": false
|
|
1784
1871
|
}
|
|
1785
1872
|
},
|
|
1786
1873
|
"default": {},
|
|
@@ -2124,6 +2211,115 @@
|
|
|
2124
2211
|
},
|
|
2125
2212
|
{
|
|
2126
2213
|
"type": "string"
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
"type": "object",
|
|
2217
|
+
"properties": {
|
|
2218
|
+
"enabled": {
|
|
2219
|
+
"anyOf": [
|
|
2220
|
+
{
|
|
2221
|
+
"type": "boolean"
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
"type": "string"
|
|
2225
|
+
}
|
|
2226
|
+
]
|
|
2227
|
+
},
|
|
2228
|
+
"hostname": {
|
|
2229
|
+
"type": "string"
|
|
2230
|
+
},
|
|
2231
|
+
"port": {
|
|
2232
|
+
"anyOf": [
|
|
2233
|
+
{
|
|
2234
|
+
"type": "integer"
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
"type": "string"
|
|
2238
|
+
}
|
|
2239
|
+
]
|
|
2240
|
+
},
|
|
2241
|
+
"readiness": {
|
|
2242
|
+
"anyOf": [
|
|
2243
|
+
{
|
|
2244
|
+
"type": "boolean"
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
"type": "object",
|
|
2248
|
+
"properties": {
|
|
2249
|
+
"endpoint": {
|
|
2250
|
+
"type": "string"
|
|
2251
|
+
},
|
|
2252
|
+
"success": {
|
|
2253
|
+
"type": "object",
|
|
2254
|
+
"properties": {
|
|
2255
|
+
"statusCode": {
|
|
2256
|
+
"type": "number"
|
|
2257
|
+
},
|
|
2258
|
+
"body": {
|
|
2259
|
+
"type": "string"
|
|
2260
|
+
}
|
|
2261
|
+
},
|
|
2262
|
+
"additionalProperties": false
|
|
2263
|
+
},
|
|
2264
|
+
"fail": {
|
|
2265
|
+
"type": "object",
|
|
2266
|
+
"properties": {
|
|
2267
|
+
"statusCode": {
|
|
2268
|
+
"type": "number"
|
|
2269
|
+
},
|
|
2270
|
+
"body": {
|
|
2271
|
+
"type": "string"
|
|
2272
|
+
}
|
|
2273
|
+
},
|
|
2274
|
+
"additionalProperties": false
|
|
2275
|
+
}
|
|
2276
|
+
},
|
|
2277
|
+
"additionalProperties": false
|
|
2278
|
+
}
|
|
2279
|
+
]
|
|
2280
|
+
},
|
|
2281
|
+
"liveness": {
|
|
2282
|
+
"anyOf": [
|
|
2283
|
+
{
|
|
2284
|
+
"type": "boolean"
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
"type": "object",
|
|
2288
|
+
"properties": {
|
|
2289
|
+
"endpoint": {
|
|
2290
|
+
"type": "string"
|
|
2291
|
+
},
|
|
2292
|
+
"success": {
|
|
2293
|
+
"type": "object",
|
|
2294
|
+
"properties": {
|
|
2295
|
+
"statusCode": {
|
|
2296
|
+
"type": "number"
|
|
2297
|
+
},
|
|
2298
|
+
"body": {
|
|
2299
|
+
"type": "string"
|
|
2300
|
+
}
|
|
2301
|
+
},
|
|
2302
|
+
"additionalProperties": false
|
|
2303
|
+
},
|
|
2304
|
+
"fail": {
|
|
2305
|
+
"type": "object",
|
|
2306
|
+
"properties": {
|
|
2307
|
+
"statusCode": {
|
|
2308
|
+
"type": "number"
|
|
2309
|
+
},
|
|
2310
|
+
"body": {
|
|
2311
|
+
"type": "string"
|
|
2312
|
+
}
|
|
2313
|
+
},
|
|
2314
|
+
"additionalProperties": false
|
|
2315
|
+
}
|
|
2316
|
+
},
|
|
2317
|
+
"additionalProperties": false
|
|
2318
|
+
}
|
|
2319
|
+
]
|
|
2320
|
+
}
|
|
2321
|
+
},
|
|
2322
|
+
"additionalProperties": false
|
|
2127
2323
|
}
|
|
2128
2324
|
],
|
|
2129
2325
|
"default": true
|
|
@@ -2600,7 +2796,9 @@
|
|
|
2600
2796
|
"type": "string"
|
|
2601
2797
|
}
|
|
2602
2798
|
],
|
|
2603
|
-
"default": 5000
|
|
2799
|
+
"default": 5000,
|
|
2800
|
+
"deprecated": true,
|
|
2801
|
+
"description": "Deprecated. Health probe timeout configuration is no longer used."
|
|
2604
2802
|
},
|
|
2605
2803
|
"plugins": {
|
|
2606
2804
|
"type": "array",
|
|
@@ -2676,6 +2874,50 @@
|
|
|
2676
2874
|
],
|
|
2677
2875
|
"additionalProperties": false
|
|
2678
2876
|
},
|
|
2877
|
+
"opentelemetry": {
|
|
2878
|
+
"type": "object",
|
|
2879
|
+
"description": "Configuration for forwarding user OpenTelemetry metrics to an OTLP endpoint",
|
|
2880
|
+
"properties": {
|
|
2881
|
+
"enabled": {
|
|
2882
|
+
"anyOf": [
|
|
2883
|
+
{
|
|
2884
|
+
"type": "boolean"
|
|
2885
|
+
},
|
|
2886
|
+
{
|
|
2887
|
+
"type": "string"
|
|
2888
|
+
}
|
|
2889
|
+
],
|
|
2890
|
+
"description": "Enable or disable OpenTelemetry metrics forwarding"
|
|
2891
|
+
},
|
|
2892
|
+
"endpoint": {
|
|
2893
|
+
"type": "string",
|
|
2894
|
+
"description": "OTLP metrics endpoint URL (e.g., http://collector:4318/v1/metrics)"
|
|
2895
|
+
},
|
|
2896
|
+
"interval": {
|
|
2897
|
+
"anyOf": [
|
|
2898
|
+
{
|
|
2899
|
+
"type": "integer"
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
"type": "string"
|
|
2903
|
+
}
|
|
2904
|
+
],
|
|
2905
|
+
"default": 60000,
|
|
2906
|
+
"description": "Interval in milliseconds between metric forwards"
|
|
2907
|
+
},
|
|
2908
|
+
"headers": {
|
|
2909
|
+
"type": "object",
|
|
2910
|
+
"additionalProperties": {
|
|
2911
|
+
"type": "string"
|
|
2912
|
+
},
|
|
2913
|
+
"description": "Additional HTTP headers for authentication"
|
|
2914
|
+
}
|
|
2915
|
+
},
|
|
2916
|
+
"required": [
|
|
2917
|
+
"endpoint"
|
|
2918
|
+
],
|
|
2919
|
+
"additionalProperties": false
|
|
2920
|
+
},
|
|
2679
2921
|
"httpCustomLabels": {
|
|
2680
2922
|
"type": "array",
|
|
2681
2923
|
"description": "Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.",
|