@platformatic/remix 3.13.1 → 3.15.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/config.d.ts +63 -3
- package/lib/capability.js +3 -5
- package/package.json +6 -6
- package/schema.json +134 -16
package/config.d.ts
CHANGED
|
@@ -117,7 +117,20 @@ export interface PlatformaticRemixConfig {
|
|
|
117
117
|
services?: {
|
|
118
118
|
[k: string]: unknown;
|
|
119
119
|
}[];
|
|
120
|
-
workers?:
|
|
120
|
+
workers?:
|
|
121
|
+
| number
|
|
122
|
+
| string
|
|
123
|
+
| {
|
|
124
|
+
static?: number;
|
|
125
|
+
dynamic?: boolean;
|
|
126
|
+
minimum?: number;
|
|
127
|
+
maximum?: number;
|
|
128
|
+
total?: number;
|
|
129
|
+
maxMemory?: number;
|
|
130
|
+
cooldown?: number;
|
|
131
|
+
gracePeriod?: number;
|
|
132
|
+
[k: string]: unknown;
|
|
133
|
+
};
|
|
121
134
|
workersRestartDelay?: number | string;
|
|
122
135
|
logger?: {
|
|
123
136
|
level: (
|
|
@@ -201,6 +214,7 @@ export interface PlatformaticRemixConfig {
|
|
|
201
214
|
rejectUnauthorized?: boolean;
|
|
202
215
|
};
|
|
203
216
|
};
|
|
217
|
+
reuseTcpPorts?: boolean;
|
|
204
218
|
startTimeout?: number;
|
|
205
219
|
restartOnError?: boolean | number;
|
|
206
220
|
exitOnUnhandledErrors?: boolean;
|
|
@@ -325,6 +339,37 @@ export interface PlatformaticRemixConfig {
|
|
|
325
339
|
};
|
|
326
340
|
plugins?: string[];
|
|
327
341
|
timeout?: number | string;
|
|
342
|
+
/**
|
|
343
|
+
* Configuration for exporting metrics to an OTLP endpoint
|
|
344
|
+
*/
|
|
345
|
+
otlpExporter?: {
|
|
346
|
+
/**
|
|
347
|
+
* Enable or disable OTLP metrics export
|
|
348
|
+
*/
|
|
349
|
+
enabled?: boolean | string;
|
|
350
|
+
/**
|
|
351
|
+
* OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
352
|
+
*/
|
|
353
|
+
endpoint: string;
|
|
354
|
+
/**
|
|
355
|
+
* Interval in milliseconds between metric pushes
|
|
356
|
+
*/
|
|
357
|
+
interval?: number | string;
|
|
358
|
+
/**
|
|
359
|
+
* Additional HTTP headers for authentication
|
|
360
|
+
*/
|
|
361
|
+
headers?: {
|
|
362
|
+
[k: string]: string;
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* Service name for OTLP resource attributes
|
|
366
|
+
*/
|
|
367
|
+
serviceName?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Service version for OTLP resource attributes
|
|
370
|
+
*/
|
|
371
|
+
serviceVersion?: string;
|
|
372
|
+
};
|
|
328
373
|
};
|
|
329
374
|
telemetry?: {
|
|
330
375
|
enabled?: boolean | string;
|
|
@@ -408,13 +453,28 @@ export interface PlatformaticRemixConfig {
|
|
|
408
453
|
maxTotalMemory?: number;
|
|
409
454
|
minWorkers?: number;
|
|
410
455
|
maxWorkers?: number;
|
|
456
|
+
cooldownSec?: number;
|
|
457
|
+
gracePeriod?: number;
|
|
458
|
+
/**
|
|
459
|
+
* @deprecated
|
|
460
|
+
*/
|
|
411
461
|
scaleUpELU?: number;
|
|
462
|
+
/**
|
|
463
|
+
* @deprecated
|
|
464
|
+
*/
|
|
412
465
|
scaleDownELU?: number;
|
|
466
|
+
/**
|
|
467
|
+
* @deprecated
|
|
468
|
+
*/
|
|
413
469
|
timeWindowSec?: number;
|
|
470
|
+
/**
|
|
471
|
+
* @deprecated
|
|
472
|
+
*/
|
|
414
473
|
scaleDownTimeWindowSec?: number;
|
|
415
|
-
|
|
474
|
+
/**
|
|
475
|
+
* @deprecated
|
|
476
|
+
*/
|
|
416
477
|
scaleIntervalSec?: number;
|
|
417
|
-
gracePeriod?: number;
|
|
418
478
|
};
|
|
419
479
|
inspectorOptions?: {
|
|
420
480
|
host?: string;
|
package/lib/capability.js
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
importFile,
|
|
7
7
|
resolvePackage
|
|
8
8
|
} from '@platformatic/basic'
|
|
9
|
-
import { features } from '@platformatic/foundation'
|
|
10
9
|
import { ViteCapability } from '@platformatic/vite'
|
|
11
10
|
import { createRequestHandler } from '@remix-run/express'
|
|
12
11
|
import express from 'express'
|
|
@@ -60,6 +59,8 @@ export class RemixCapability extends ViteCapability {
|
|
|
60
59
|
return this.url
|
|
61
60
|
}
|
|
62
61
|
|
|
62
|
+
await this._start()
|
|
63
|
+
|
|
63
64
|
const config = this.config
|
|
64
65
|
const command = config.application.commands[this.isProduction ? 'production' : 'development']
|
|
65
66
|
|
|
@@ -156,6 +157,7 @@ export class RemixCapability extends ViteCapability {
|
|
|
156
157
|
await preloadVite()
|
|
157
158
|
}
|
|
158
159
|
|
|
160
|
+
await super._start({ listen })
|
|
159
161
|
await super.start({ listen })
|
|
160
162
|
|
|
161
163
|
/* c8 ignore next 3 */
|
|
@@ -172,10 +174,6 @@ export class RemixCapability extends ViteCapability {
|
|
|
172
174
|
const serverOptions = this.serverConfig
|
|
173
175
|
const listenOptions = { host: serverOptions?.hostname || '127.0.0.1', port: serverOptions?.port || 0 }
|
|
174
176
|
|
|
175
|
-
if (this.isProduction && features.node.reusePort) {
|
|
176
|
-
listenOptions.reusePort = true
|
|
177
|
-
}
|
|
178
|
-
|
|
179
177
|
this.#server = await new Promise((resolve, reject) => {
|
|
180
178
|
return this.#app
|
|
181
179
|
.listen(listenOptions, function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/remix",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Platformatic Remix Capability",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"light-my-request": "^6.0.0",
|
|
21
21
|
"pino-http": "^10.2.0",
|
|
22
22
|
"semver": "^7.6.3",
|
|
23
|
-
"@platformatic/basic": "3.
|
|
24
|
-
"@platformatic/foundation": "3.
|
|
25
|
-
"@platformatic/vite": "3.
|
|
23
|
+
"@platformatic/basic": "3.15.0",
|
|
24
|
+
"@platformatic/foundation": "3.15.0",
|
|
25
|
+
"@platformatic/vite": "3.15.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@remix-run/dev": "^2.16.8",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"typescript": "^5.5.4",
|
|
42
42
|
"vite": "^5.4.2",
|
|
43
43
|
"ws": "^8.18.0",
|
|
44
|
-
"@platformatic/gateway": "3.
|
|
45
|
-
"@platformatic/service": "3.
|
|
44
|
+
"@platformatic/gateway": "3.15.0",
|
|
45
|
+
"@platformatic/service": "3.15.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/@platformatic/remix/3.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/remix/3.15.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Remix Config",
|
|
5
5
|
"type": "object",
|
|
@@ -426,14 +426,34 @@
|
|
|
426
426
|
"useHttp": {
|
|
427
427
|
"type": "boolean"
|
|
428
428
|
},
|
|
429
|
+
"reuseTcpPorts": {
|
|
430
|
+
"type": "boolean",
|
|
431
|
+
"default": true
|
|
432
|
+
},
|
|
429
433
|
"workers": {
|
|
430
434
|
"anyOf": [
|
|
431
435
|
{
|
|
432
|
-
"type": "number"
|
|
433
|
-
"minimum": 1
|
|
436
|
+
"type": "number"
|
|
434
437
|
},
|
|
435
438
|
{
|
|
436
439
|
"type": "string"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"type": "object",
|
|
443
|
+
"properties": {
|
|
444
|
+
"static": {
|
|
445
|
+
"type": "number",
|
|
446
|
+
"minimum": 1
|
|
447
|
+
},
|
|
448
|
+
"minimum": {
|
|
449
|
+
"type": "number",
|
|
450
|
+
"minimum": 1
|
|
451
|
+
},
|
|
452
|
+
"maximum": {
|
|
453
|
+
"type": "number",
|
|
454
|
+
"minimum": 0
|
|
455
|
+
}
|
|
456
|
+
}
|
|
437
457
|
}
|
|
438
458
|
]
|
|
439
459
|
},
|
|
@@ -654,6 +674,43 @@
|
|
|
654
674
|
},
|
|
655
675
|
{
|
|
656
676
|
"type": "string"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"type": "object",
|
|
680
|
+
"properties": {
|
|
681
|
+
"static": {
|
|
682
|
+
"type": "number",
|
|
683
|
+
"minimum": 1
|
|
684
|
+
},
|
|
685
|
+
"dynamic": {
|
|
686
|
+
"type": "boolean",
|
|
687
|
+
"default": false
|
|
688
|
+
},
|
|
689
|
+
"minimum": {
|
|
690
|
+
"type": "number",
|
|
691
|
+
"minimum": 1
|
|
692
|
+
},
|
|
693
|
+
"maximum": {
|
|
694
|
+
"type": "number",
|
|
695
|
+
"minimum": 0
|
|
696
|
+
},
|
|
697
|
+
"total": {
|
|
698
|
+
"type": "number",
|
|
699
|
+
"minimum": 1
|
|
700
|
+
},
|
|
701
|
+
"maxMemory": {
|
|
702
|
+
"type": "number",
|
|
703
|
+
"minimum": 0
|
|
704
|
+
},
|
|
705
|
+
"cooldown": {
|
|
706
|
+
"type": "number",
|
|
707
|
+
"minimum": 0
|
|
708
|
+
},
|
|
709
|
+
"gracePeriod": {
|
|
710
|
+
"type": "number",
|
|
711
|
+
"minimum": 0
|
|
712
|
+
}
|
|
713
|
+
}
|
|
657
714
|
}
|
|
658
715
|
]
|
|
659
716
|
},
|
|
@@ -939,6 +996,10 @@
|
|
|
939
996
|
},
|
|
940
997
|
"additionalProperties": false
|
|
941
998
|
},
|
|
999
|
+
"reuseTcpPorts": {
|
|
1000
|
+
"type": "boolean",
|
|
1001
|
+
"default": true
|
|
1002
|
+
},
|
|
942
1003
|
"startTimeout": {
|
|
943
1004
|
"default": 30000,
|
|
944
1005
|
"type": "number",
|
|
@@ -1430,6 +1491,58 @@
|
|
|
1430
1491
|
}
|
|
1431
1492
|
],
|
|
1432
1493
|
"default": 10000
|
|
1494
|
+
},
|
|
1495
|
+
"otlpExporter": {
|
|
1496
|
+
"type": "object",
|
|
1497
|
+
"description": "Configuration for exporting metrics to an OTLP endpoint",
|
|
1498
|
+
"properties": {
|
|
1499
|
+
"enabled": {
|
|
1500
|
+
"anyOf": [
|
|
1501
|
+
{
|
|
1502
|
+
"type": "boolean"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
"type": "string"
|
|
1506
|
+
}
|
|
1507
|
+
],
|
|
1508
|
+
"description": "Enable or disable OTLP metrics export"
|
|
1509
|
+
},
|
|
1510
|
+
"endpoint": {
|
|
1511
|
+
"type": "string",
|
|
1512
|
+
"description": "OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)"
|
|
1513
|
+
},
|
|
1514
|
+
"interval": {
|
|
1515
|
+
"anyOf": [
|
|
1516
|
+
{
|
|
1517
|
+
"type": "integer"
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"type": "string"
|
|
1521
|
+
}
|
|
1522
|
+
],
|
|
1523
|
+
"default": 60000,
|
|
1524
|
+
"description": "Interval in milliseconds between metric pushes"
|
|
1525
|
+
},
|
|
1526
|
+
"headers": {
|
|
1527
|
+
"type": "object",
|
|
1528
|
+
"additionalProperties": {
|
|
1529
|
+
"type": "string"
|
|
1530
|
+
},
|
|
1531
|
+
"description": "Additional HTTP headers for authentication"
|
|
1532
|
+
},
|
|
1533
|
+
"serviceName": {
|
|
1534
|
+
"type": "string",
|
|
1535
|
+
"description": "Service name for OTLP resource attributes"
|
|
1536
|
+
},
|
|
1537
|
+
"serviceVersion": {
|
|
1538
|
+
"type": "string",
|
|
1539
|
+
"description": "Service version for OTLP resource attributes"
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
"required": [
|
|
1543
|
+
"endpoint"
|
|
1544
|
+
],
|
|
1545
|
+
"additionalProperties": false
|
|
1433
1546
|
}
|
|
1434
1547
|
},
|
|
1435
1548
|
"additionalProperties": false
|
|
@@ -1589,35 +1702,40 @@
|
|
|
1589
1702
|
"type": "number",
|
|
1590
1703
|
"minimum": 1
|
|
1591
1704
|
},
|
|
1705
|
+
"cooldownSec": {
|
|
1706
|
+
"type": "number",
|
|
1707
|
+
"minimum": 0
|
|
1708
|
+
},
|
|
1709
|
+
"gracePeriod": {
|
|
1710
|
+
"type": "number",
|
|
1711
|
+
"minimum": 0
|
|
1712
|
+
},
|
|
1592
1713
|
"scaleUpELU": {
|
|
1593
1714
|
"type": "number",
|
|
1594
1715
|
"minimum": 0,
|
|
1595
|
-
"maximum": 1
|
|
1716
|
+
"maximum": 1,
|
|
1717
|
+
"deprecated": true
|
|
1596
1718
|
},
|
|
1597
1719
|
"scaleDownELU": {
|
|
1598
1720
|
"type": "number",
|
|
1599
1721
|
"minimum": 0,
|
|
1600
|
-
"maximum": 1
|
|
1722
|
+
"maximum": 1,
|
|
1723
|
+
"deprecated": true
|
|
1601
1724
|
},
|
|
1602
1725
|
"timeWindowSec": {
|
|
1603
1726
|
"type": "number",
|
|
1604
|
-
"minimum": 0
|
|
1727
|
+
"minimum": 0,
|
|
1728
|
+
"deprecated": true
|
|
1605
1729
|
},
|
|
1606
1730
|
"scaleDownTimeWindowSec": {
|
|
1607
1731
|
"type": "number",
|
|
1608
|
-
"minimum": 0
|
|
1609
|
-
|
|
1610
|
-
"cooldownSec": {
|
|
1611
|
-
"type": "number",
|
|
1612
|
-
"minimum": 0
|
|
1732
|
+
"minimum": 0,
|
|
1733
|
+
"deprecated": true
|
|
1613
1734
|
},
|
|
1614
1735
|
"scaleIntervalSec": {
|
|
1615
1736
|
"type": "number",
|
|
1616
|
-
"minimum": 0
|
|
1617
|
-
|
|
1618
|
-
"gracePeriod": {
|
|
1619
|
-
"type": "number",
|
|
1620
|
-
"minimum": 0
|
|
1737
|
+
"minimum": 0,
|
|
1738
|
+
"deprecated": true
|
|
1621
1739
|
}
|
|
1622
1740
|
},
|
|
1623
1741
|
"additionalProperties": false
|