@platformatic/foundation 3.61.0 → 3.62.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.
Files changed (2) hide show
  1. package/lib/schema.js +51 -0
  2. package/package.json +2 -2
package/lib/schema.js CHANGED
@@ -96,6 +96,37 @@ export const preload = {
96
96
  ]
97
97
  }
98
98
 
99
+ const extension = {
100
+ anyOf: [
101
+ { type: 'string', resolvePath: true },
102
+ {
103
+ type: 'object',
104
+ additionalProperties: false,
105
+ required: ['path'],
106
+ properties: {
107
+ path: {
108
+ type: 'string',
109
+ resolvePath: true
110
+ },
111
+ options: {
112
+ type: 'object',
113
+ additionalProperties: true
114
+ }
115
+ }
116
+ }
117
+ ]
118
+ }
119
+
120
+ export const extensions = {
121
+ anyOf: [
122
+ ...extension.anyOf,
123
+ {
124
+ type: 'array',
125
+ items: extension
126
+ }
127
+ ]
128
+ }
129
+
99
130
  export const watch = {
100
131
  type: 'object',
101
132
  properties: {
@@ -362,6 +393,11 @@ export const server = {
362
393
  port: {
363
394
  anyOf: [{ type: 'integer' }, { type: 'string' }]
364
395
  },
396
+ portAssignment: {
397
+ type: 'string',
398
+ enum: ['shared', 'perWorkerIncrement'],
399
+ description: 'Configures how entrypoint server worker ports are assigned. When set to shared, all workers listen on the same port. When set to perWorkerIncrement, each worker will use its own port, starting from port (worker 0).'
400
+ },
365
401
  backlog: {
366
402
  type: 'integer',
367
403
  description: 'The maximum length of the queue of pending connections'
@@ -614,6 +650,8 @@ export const health = {
614
650
  gracePeriod: overridableValue({ type: 'number', minimum: 0 }, 30000),
615
651
  maxUnhealthyChecks: overridableValue({ type: 'number', minimum: 1 }, 10),
616
652
  maxELU: overridableValue({ type: 'number', minimum: 0, maximum: 1 }, 0.99),
653
+ maxEventLoopDelay: overridableValue({ type: 'number', minimum: 0 }),
654
+ maxEventLoopDelayP99: overridableValue({ type: 'number', minimum: 0 }),
617
655
  maxHeapUsed: overridableValue({ type: 'number', minimum: 0, maximum: 1 }, 0.99),
618
656
  maxHeapTotal: overridableValue({ type: 'number', minimum: 0 }, 4 * Math.pow(1024, 3)), // 4GB
619
657
  maxYoungGeneration: overridableValue({ type: 'number', minimum: 0 }, 128 * Math.pow(1024, 2)), // 128MB,
@@ -868,6 +906,17 @@ export const application = {
868
906
  ]
869
907
  },
870
908
  health: { ...healthWithoutDefaults },
909
+ restartOnError: {
910
+ description:
911
+ 'Overrides the runtime-level restartOnError for this application. Set to false or 0 to never restart the application when it crashes, a positive number to wait that amount of milliseconds between restarts, or true to use the default delay.',
912
+ anyOf: [
913
+ { type: 'boolean' },
914
+ {
915
+ type: 'number',
916
+ minimum: 0
917
+ }
918
+ ]
919
+ },
871
920
  dependencies: {
872
921
  type: 'array',
873
922
  items: {
@@ -992,6 +1041,7 @@ export const runtimeProperties = {
992
1041
  type: 'string'
993
1042
  },
994
1043
  preload,
1044
+ extensions,
995
1045
  entrypoint: {
996
1046
  type: 'string'
997
1047
  },
@@ -1589,6 +1639,7 @@ export const schemaComponents = {
1589
1639
  env,
1590
1640
  workers,
1591
1641
  preload,
1642
+ extensions,
1592
1643
  watch,
1593
1644
  cors,
1594
1645
  logger,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/foundation",
3
- "version": "3.61.0",
3
+ "version": "3.62.0",
4
4
  "description": "Platformatic Foundation",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "pino": "^9.9.0",
43
43
  "pino-test": "^1.0.1",
44
44
  "tstyche": "^6.2.0",
45
- "typescript": "^5.5.4"
45
+ "typescript": "^5.9.3"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=22.19.0"