@platformatic/remix 3.0.0-alpha.5 → 3.0.0-alpha.6
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 +8 -5
- package/index.js +3 -3
- package/lib/{stackable.js → capability.js} +3 -3
- package/package.json +9 -10
- package/schema.json +237 -8
package/config.d.ts
CHANGED
|
@@ -114,6 +114,9 @@ export interface PlatformaticRemixConfig {
|
|
|
114
114
|
runtime?: {
|
|
115
115
|
preload?: string | string[];
|
|
116
116
|
basePath?: string;
|
|
117
|
+
services?: {
|
|
118
|
+
[k: string]: unknown;
|
|
119
|
+
}[];
|
|
117
120
|
workers?: number | string;
|
|
118
121
|
logger?: {
|
|
119
122
|
level: (
|
|
@@ -201,7 +204,7 @@ export interface PlatformaticRemixConfig {
|
|
|
201
204
|
restartOnError?: boolean | number;
|
|
202
205
|
gracefulShutdown?: {
|
|
203
206
|
runtime: number | string;
|
|
204
|
-
|
|
207
|
+
application: number | string;
|
|
205
208
|
};
|
|
206
209
|
health?: {
|
|
207
210
|
enabled?: boolean | string;
|
|
@@ -320,11 +323,11 @@ export interface PlatformaticRemixConfig {
|
|
|
320
323
|
telemetry?: {
|
|
321
324
|
enabled?: boolean | string;
|
|
322
325
|
/**
|
|
323
|
-
* The name of the
|
|
326
|
+
* The name of the application. Defaults to the folder name if not specified.
|
|
324
327
|
*/
|
|
325
|
-
|
|
328
|
+
applicationName: string;
|
|
326
329
|
/**
|
|
327
|
-
* The version of the
|
|
330
|
+
* The version of the application (optional)
|
|
328
331
|
*/
|
|
329
332
|
version?: string;
|
|
330
333
|
/**
|
|
@@ -400,7 +403,7 @@ export interface PlatformaticRemixConfig {
|
|
|
400
403
|
watchDisabled?: boolean;
|
|
401
404
|
[k: string]: unknown;
|
|
402
405
|
};
|
|
403
|
-
|
|
406
|
+
applicationTimeout?: number | string;
|
|
404
407
|
messagingTimeout?: number | string;
|
|
405
408
|
env?: {
|
|
406
409
|
[k: string]: string;
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { transform as basicTransform, resolve, validationOptions } from '@platformatic/basic'
|
|
2
2
|
import { kMetadata, loadConfiguration as utilsLoadConfiguration } from '@platformatic/foundation'
|
|
3
|
+
import { RemixCapability } from './lib/capability.js'
|
|
3
4
|
import { schema } from './lib/schema.js'
|
|
4
|
-
import { RemixStackable } from './lib/stackable.js'
|
|
5
5
|
|
|
6
6
|
/* c8 ignore next 5 */
|
|
7
7
|
export async function transform (config, schema, options) {
|
|
@@ -24,8 +24,8 @@ export async function loadConfiguration (configOrRoot, sourceOrConfig, context)
|
|
|
24
24
|
|
|
25
25
|
export async function create (configOrRoot, sourceOrConfig, context) {
|
|
26
26
|
const config = await loadConfiguration(configOrRoot, sourceOrConfig, context)
|
|
27
|
-
return new
|
|
27
|
+
return new RemixCapability(config[kMetadata].root, config, context)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export * from './lib/capability.js'
|
|
30
31
|
export { packageJson, schema, schemaComponents, version } from './lib/schema.js'
|
|
31
|
-
export * from './lib/stackable.js'
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolvePackage
|
|
8
8
|
} from '@platformatic/basic'
|
|
9
9
|
import { features } from '@platformatic/foundation'
|
|
10
|
-
import {
|
|
10
|
+
import { ViteCapability } from '@platformatic/vite'
|
|
11
11
|
import { createRequestHandler } from '@remix-run/express'
|
|
12
12
|
import express from 'express'
|
|
13
13
|
import inject from 'light-my-request'
|
|
@@ -20,7 +20,7 @@ import { packageJson } from './schema.js'
|
|
|
20
20
|
|
|
21
21
|
const supportedVersions = '^2.0.0'
|
|
22
22
|
|
|
23
|
-
export class
|
|
23
|
+
export class RemixCapability extends ViteCapability {
|
|
24
24
|
#app
|
|
25
25
|
#server
|
|
26
26
|
#remix
|
|
@@ -132,7 +132,7 @@ export class RemixStackable extends ViteStackable {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
return {
|
|
135
|
-
|
|
135
|
+
gateway: {
|
|
136
136
|
tcp: typeof this.url !== 'undefined',
|
|
137
137
|
url: this.url,
|
|
138
138
|
prefix: this.basePath ?? this.#basePath,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/remix",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
4
|
-
"description": "Platformatic Remix
|
|
3
|
+
"version": "3.0.0-alpha.6",
|
|
4
|
+
"description": "Platformatic Remix Capability",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -20,15 +20,15 @@
|
|
|
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.0.0-alpha.
|
|
24
|
-
"@platformatic/
|
|
25
|
-
"@platformatic/
|
|
23
|
+
"@platformatic/basic": "3.0.0-alpha.6",
|
|
24
|
+
"@platformatic/vite": "3.0.0-alpha.6",
|
|
25
|
+
"@platformatic/foundation": "3.0.0-alpha.6"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@remix-run/dev": "^2.16.8",
|
|
29
29
|
"@remix-run/node": "^2.16.8",
|
|
30
30
|
"@remix-run/react": "^2.16.8",
|
|
31
|
-
"
|
|
31
|
+
"cleaner-spec-reporter": "^0.5.0",
|
|
32
32
|
"eslint": "9",
|
|
33
33
|
"fastify": "^5.0.0",
|
|
34
34
|
"isbot": "^5.1.17",
|
|
@@ -39,15 +39,14 @@
|
|
|
39
39
|
"typescript": "^5.5.4",
|
|
40
40
|
"vite": "^5.4.2",
|
|
41
41
|
"ws": "^8.18.0",
|
|
42
|
-
"@platformatic/service": "3.0.0-alpha.
|
|
43
|
-
"@platformatic/
|
|
42
|
+
"@platformatic/service": "3.0.0-alpha.6",
|
|
43
|
+
"@platformatic/gateway": "3.0.0-alpha.6"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=22.18.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
|
-
"test": "
|
|
50
|
-
"coverage": "npm run lint && borp -C -X test -X test/fixtures --concurrency=1 --timeout 1200000",
|
|
49
|
+
"test": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
|
|
51
50
|
"gen-schema": "node lib/schema.js > schema.json",
|
|
52
51
|
"gen-types": "json2ts > config.d.ts < schema.json",
|
|
53
52
|
"build": "pnpm run gen-schema && pnpm run gen-types",
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/remix/3.0.0-alpha.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/remix/3.0.0-alpha.6.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Remix Config",
|
|
5
5
|
"type": "object",
|
|
@@ -386,6 +386,235 @@
|
|
|
386
386
|
"basePath": {
|
|
387
387
|
"type": "string"
|
|
388
388
|
},
|
|
389
|
+
"services": {
|
|
390
|
+
"type": "array",
|
|
391
|
+
"items": {
|
|
392
|
+
"type": "object",
|
|
393
|
+
"anyOf": [
|
|
394
|
+
{
|
|
395
|
+
"required": [
|
|
396
|
+
"id",
|
|
397
|
+
"path"
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"required": [
|
|
402
|
+
"id",
|
|
403
|
+
"url"
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
"properties": {
|
|
408
|
+
"id": {
|
|
409
|
+
"type": "string"
|
|
410
|
+
},
|
|
411
|
+
"path": {
|
|
412
|
+
"type": "string",
|
|
413
|
+
"allowEmptyPaths": true,
|
|
414
|
+
"resolvePath": true
|
|
415
|
+
},
|
|
416
|
+
"config": {
|
|
417
|
+
"type": "string"
|
|
418
|
+
},
|
|
419
|
+
"url": {
|
|
420
|
+
"type": "string"
|
|
421
|
+
},
|
|
422
|
+
"gitBranch": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"default": "main"
|
|
425
|
+
},
|
|
426
|
+
"useHttp": {
|
|
427
|
+
"type": "boolean"
|
|
428
|
+
},
|
|
429
|
+
"workers": {
|
|
430
|
+
"anyOf": [
|
|
431
|
+
{
|
|
432
|
+
"type": "number",
|
|
433
|
+
"minimum": 1
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"type": "string"
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
"health": {
|
|
441
|
+
"type": "object",
|
|
442
|
+
"default": {},
|
|
443
|
+
"properties": {
|
|
444
|
+
"enabled": {
|
|
445
|
+
"anyOf": [
|
|
446
|
+
{
|
|
447
|
+
"type": "boolean"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"type": "string"
|
|
451
|
+
}
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
"interval": {
|
|
455
|
+
"anyOf": [
|
|
456
|
+
{
|
|
457
|
+
"type": "number",
|
|
458
|
+
"minimum": 0
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"type": "string"
|
|
462
|
+
}
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
"gracePeriod": {
|
|
466
|
+
"anyOf": [
|
|
467
|
+
{
|
|
468
|
+
"type": "number",
|
|
469
|
+
"minimum": 0
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"type": "string"
|
|
473
|
+
}
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
"maxUnhealthyChecks": {
|
|
477
|
+
"anyOf": [
|
|
478
|
+
{
|
|
479
|
+
"type": "number",
|
|
480
|
+
"minimum": 1
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"type": "string"
|
|
484
|
+
}
|
|
485
|
+
]
|
|
486
|
+
},
|
|
487
|
+
"maxELU": {
|
|
488
|
+
"anyOf": [
|
|
489
|
+
{
|
|
490
|
+
"type": "number",
|
|
491
|
+
"minimum": 0,
|
|
492
|
+
"maximum": 1
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"type": "string"
|
|
496
|
+
}
|
|
497
|
+
]
|
|
498
|
+
},
|
|
499
|
+
"maxHeapUsed": {
|
|
500
|
+
"anyOf": [
|
|
501
|
+
{
|
|
502
|
+
"type": "number",
|
|
503
|
+
"minimum": 0,
|
|
504
|
+
"maximum": 1
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"type": "string"
|
|
508
|
+
}
|
|
509
|
+
]
|
|
510
|
+
},
|
|
511
|
+
"maxHeapTotal": {
|
|
512
|
+
"anyOf": [
|
|
513
|
+
{
|
|
514
|
+
"type": "number",
|
|
515
|
+
"minimum": 0
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"type": "string"
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
"maxYoungGeneration": {
|
|
523
|
+
"anyOf": [
|
|
524
|
+
{
|
|
525
|
+
"type": "number",
|
|
526
|
+
"minimum": 0
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"type": "string"
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"additionalProperties": false
|
|
535
|
+
},
|
|
536
|
+
"arguments": {
|
|
537
|
+
"type": "array",
|
|
538
|
+
"items": {
|
|
539
|
+
"type": "string"
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"env": {
|
|
543
|
+
"type": "object",
|
|
544
|
+
"additionalProperties": {
|
|
545
|
+
"type": "string"
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"envfile": {
|
|
549
|
+
"type": "string"
|
|
550
|
+
},
|
|
551
|
+
"sourceMaps": {
|
|
552
|
+
"type": "boolean",
|
|
553
|
+
"default": false
|
|
554
|
+
},
|
|
555
|
+
"packageManager": {
|
|
556
|
+
"type": "string",
|
|
557
|
+
"enum": [
|
|
558
|
+
"npm",
|
|
559
|
+
"pnpm",
|
|
560
|
+
"yarn"
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
"preload": {
|
|
564
|
+
"anyOf": [
|
|
565
|
+
{
|
|
566
|
+
"type": "string",
|
|
567
|
+
"resolvePath": true
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"type": "array",
|
|
571
|
+
"items": {
|
|
572
|
+
"type": "string",
|
|
573
|
+
"resolvePath": true
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
]
|
|
577
|
+
},
|
|
578
|
+
"nodeOptions": {
|
|
579
|
+
"type": "string"
|
|
580
|
+
},
|
|
581
|
+
"telemetry": {
|
|
582
|
+
"type": "object",
|
|
583
|
+
"properties": {
|
|
584
|
+
"instrumentations": {
|
|
585
|
+
"type": "array",
|
|
586
|
+
"description": "An array of instrumentations loaded if telemetry is enabled",
|
|
587
|
+
"items": {
|
|
588
|
+
"oneOf": [
|
|
589
|
+
{
|
|
590
|
+
"type": "string"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"type": "object",
|
|
594
|
+
"properties": {
|
|
595
|
+
"package": {
|
|
596
|
+
"type": "string"
|
|
597
|
+
},
|
|
598
|
+
"exportName": {
|
|
599
|
+
"type": "string"
|
|
600
|
+
},
|
|
601
|
+
"options": {
|
|
602
|
+
"type": "object",
|
|
603
|
+
"additionalProperties": true
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
"required": [
|
|
607
|
+
"package"
|
|
608
|
+
]
|
|
609
|
+
}
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
},
|
|
389
618
|
"workers": {
|
|
390
619
|
"anyOf": [
|
|
391
620
|
{
|
|
@@ -700,7 +929,7 @@
|
|
|
700
929
|
],
|
|
701
930
|
"default": 10000
|
|
702
931
|
},
|
|
703
|
-
"
|
|
932
|
+
"application": {
|
|
704
933
|
"anyOf": [
|
|
705
934
|
{
|
|
706
935
|
"type": "number",
|
|
@@ -716,7 +945,7 @@
|
|
|
716
945
|
"default": {},
|
|
717
946
|
"required": [
|
|
718
947
|
"runtime",
|
|
719
|
-
"
|
|
948
|
+
"application"
|
|
720
949
|
],
|
|
721
950
|
"additionalProperties": false
|
|
722
951
|
},
|
|
@@ -1147,13 +1376,13 @@
|
|
|
1147
1376
|
}
|
|
1148
1377
|
]
|
|
1149
1378
|
},
|
|
1150
|
-
"
|
|
1379
|
+
"applicationName": {
|
|
1151
1380
|
"type": "string",
|
|
1152
|
-
"description": "The name of the
|
|
1381
|
+
"description": "The name of the application. Defaults to the folder name if not specified."
|
|
1153
1382
|
},
|
|
1154
1383
|
"version": {
|
|
1155
1384
|
"type": "string",
|
|
1156
|
-
"description": "The version of the
|
|
1385
|
+
"description": "The version of the application (optional)"
|
|
1157
1386
|
},
|
|
1158
1387
|
"skip": {
|
|
1159
1388
|
"type": "array",
|
|
@@ -1260,7 +1489,7 @@
|
|
|
1260
1489
|
}
|
|
1261
1490
|
},
|
|
1262
1491
|
"required": [
|
|
1263
|
-
"
|
|
1492
|
+
"applicationName"
|
|
1264
1493
|
],
|
|
1265
1494
|
"additionalProperties": false
|
|
1266
1495
|
},
|
|
@@ -1281,7 +1510,7 @@
|
|
|
1281
1510
|
}
|
|
1282
1511
|
}
|
|
1283
1512
|
},
|
|
1284
|
-
"
|
|
1513
|
+
"applicationTimeout": {
|
|
1285
1514
|
"anyOf": [
|
|
1286
1515
|
{
|
|
1287
1516
|
"type": "number",
|