@platformatic/remix 3.25.0 → 3.27.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 CHANGED
@@ -525,6 +525,62 @@ export interface PlatformaticRemixConfig {
525
525
  [k: string]: string | [string, ...string[]];
526
526
  };
527
527
  };
528
+ application?: {
529
+ reuseTcpPorts?: boolean;
530
+ workers?:
531
+ | number
532
+ | string
533
+ | {
534
+ static?: number;
535
+ minimum?: number;
536
+ maximum?: number;
537
+ [k: string]: unknown;
538
+ };
539
+ health?: {
540
+ enabled?: boolean | string;
541
+ interval?: number | string;
542
+ gracePeriod?: number | string;
543
+ maxUnhealthyChecks?: number | string;
544
+ maxELU?: number | string;
545
+ maxHeapUsed?: number | string;
546
+ maxHeapTotal?: number | string;
547
+ maxYoungGeneration?: number | string;
548
+ codeRangeSize?: number | string;
549
+ };
550
+ arguments?: string[];
551
+ env?: {
552
+ [k: string]: string;
553
+ };
554
+ envfile?: string;
555
+ sourceMaps?: boolean;
556
+ packageManager?: "npm" | "pnpm" | "yarn";
557
+ preload?: string | string[];
558
+ nodeOptions?: string;
559
+ execArgv?: string[];
560
+ permissions?: {
561
+ fs?: {
562
+ read?: string[];
563
+ write?: string[];
564
+ };
565
+ };
566
+ telemetry?: {
567
+ /**
568
+ * An array of instrumentations loaded if telemetry is enabled
569
+ */
570
+ instrumentations?: (
571
+ | string
572
+ | {
573
+ package: string;
574
+ exportName?: string;
575
+ options?: {
576
+ [k: string]: unknown;
577
+ };
578
+ [k: string]: unknown;
579
+ }
580
+ )[];
581
+ [k: string]: unknown;
582
+ };
583
+ };
528
584
  };
529
585
  vite?: {
530
586
  configFile?: string | boolean;
package/lib/capability.js CHANGED
@@ -4,9 +4,9 @@ import {
4
4
  ensureTrailingSlash,
5
5
  errors,
6
6
  getServerUrl,
7
- importFile,
8
- resolvePackage
7
+ importFile
9
8
  } from '@platformatic/basic'
9
+ import { resolvePackageViaCJS } from '@platformatic/basic/lib/utils.js'
10
10
  import { ViteCapability } from '@platformatic/vite'
11
11
  import { createRequestHandler } from '@remix-run/express'
12
12
  import express from 'express'
@@ -36,7 +36,7 @@ export class RemixCapability extends ViteCapability {
36
36
  await super.init()
37
37
 
38
38
  if (!this.isProduction) {
39
- this.#remix = resolve(dirname(resolvePackage(this.root, '@remix-run/dev')), '..')
39
+ this.#remix = resolve(dirname(await resolvePackageViaCJS(this.root, '@remix-run/dev')), '..')
40
40
  const remixPackage = JSON.parse(await readFile(resolve(this.#remix, 'package.json'), 'utf-8'))
41
41
 
42
42
  if (!satisfies(remixPackage.version, supportedVersions)) {
@@ -158,15 +158,12 @@ export class RemixCapability extends ViteCapability {
158
158
  await preloadVite()
159
159
  }
160
160
 
161
- await super._start({ listen })
162
161
  await super.start({ listen })
163
162
 
164
163
  /* c8 ignore next 3 */
165
164
  if (!this._getVite().config.plugins.some(p => p.name === 'remix')) {
166
165
  this.logger.warn('Could not find Remix plugin in your Vite configuration. Continuing as plain Vite application.')
167
166
  }
168
-
169
- await this._collectMetrics()
170
167
  }
171
168
 
172
169
  async #startProduction (listen) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/remix",
3
- "version": "3.25.0",
3
+ "version": "3.27.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.25.0",
24
- "@platformatic/vite": "3.25.0",
25
- "@platformatic/foundation": "3.25.0"
23
+ "@platformatic/foundation": "3.27.0",
24
+ "@platformatic/basic": "3.27.0",
25
+ "@platformatic/vite": "3.27.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.25.0",
45
- "@platformatic/service": "3.25.0"
44
+ "@platformatic/gateway": "3.27.0",
45
+ "@platformatic/service": "3.27.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.25.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/remix/3.27.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Remix Config",
5
5
  "type": "object",
@@ -619,6 +619,12 @@
619
619
  "nodeOptions": {
620
620
  "type": "string"
621
621
  },
622
+ "execArgv": {
623
+ "type": "array",
624
+ "items": {
625
+ "type": "string"
626
+ }
627
+ },
622
628
  "permissions": {
623
629
  "type": "object",
624
630
  "properties": {
@@ -1926,6 +1932,258 @@
1926
1932
  "deny"
1927
1933
  ],
1928
1934
  "additionalProperties": false
1935
+ },
1936
+ "application": {
1937
+ "type": "object",
1938
+ "properties": {
1939
+ "reuseTcpPorts": {
1940
+ "type": "boolean",
1941
+ "default": true
1942
+ },
1943
+ "workers": {
1944
+ "anyOf": [
1945
+ {
1946
+ "type": "number"
1947
+ },
1948
+ {
1949
+ "type": "string"
1950
+ },
1951
+ {
1952
+ "type": "object",
1953
+ "properties": {
1954
+ "static": {
1955
+ "type": "number",
1956
+ "minimum": 1
1957
+ },
1958
+ "minimum": {
1959
+ "type": "number",
1960
+ "minimum": 1
1961
+ },
1962
+ "maximum": {
1963
+ "type": "number",
1964
+ "minimum": 0
1965
+ }
1966
+ }
1967
+ }
1968
+ ]
1969
+ },
1970
+ "health": {
1971
+ "type": "object",
1972
+ "default": {},
1973
+ "properties": {
1974
+ "enabled": {
1975
+ "anyOf": [
1976
+ {
1977
+ "type": "boolean"
1978
+ },
1979
+ {
1980
+ "type": "string"
1981
+ }
1982
+ ]
1983
+ },
1984
+ "interval": {
1985
+ "anyOf": [
1986
+ {
1987
+ "type": "number",
1988
+ "minimum": 0
1989
+ },
1990
+ {
1991
+ "type": "string"
1992
+ }
1993
+ ]
1994
+ },
1995
+ "gracePeriod": {
1996
+ "anyOf": [
1997
+ {
1998
+ "type": "number",
1999
+ "minimum": 0
2000
+ },
2001
+ {
2002
+ "type": "string"
2003
+ }
2004
+ ]
2005
+ },
2006
+ "maxUnhealthyChecks": {
2007
+ "anyOf": [
2008
+ {
2009
+ "type": "number",
2010
+ "minimum": 1
2011
+ },
2012
+ {
2013
+ "type": "string"
2014
+ }
2015
+ ]
2016
+ },
2017
+ "maxELU": {
2018
+ "anyOf": [
2019
+ {
2020
+ "type": "number",
2021
+ "minimum": 0,
2022
+ "maximum": 1
2023
+ },
2024
+ {
2025
+ "type": "string"
2026
+ }
2027
+ ]
2028
+ },
2029
+ "maxHeapUsed": {
2030
+ "anyOf": [
2031
+ {
2032
+ "type": "number",
2033
+ "minimum": 0,
2034
+ "maximum": 1
2035
+ },
2036
+ {
2037
+ "type": "string"
2038
+ }
2039
+ ]
2040
+ },
2041
+ "maxHeapTotal": {
2042
+ "anyOf": [
2043
+ {
2044
+ "type": "number",
2045
+ "minimum": 0
2046
+ },
2047
+ {
2048
+ "type": "string"
2049
+ }
2050
+ ]
2051
+ },
2052
+ "maxYoungGeneration": {
2053
+ "anyOf": [
2054
+ {
2055
+ "type": "number",
2056
+ "minimum": 0
2057
+ },
2058
+ {
2059
+ "type": "string"
2060
+ }
2061
+ ]
2062
+ },
2063
+ "codeRangeSize": {
2064
+ "anyOf": [
2065
+ {
2066
+ "type": "number",
2067
+ "minimum": 0
2068
+ },
2069
+ {
2070
+ "type": "string"
2071
+ }
2072
+ ]
2073
+ }
2074
+ },
2075
+ "additionalProperties": false
2076
+ },
2077
+ "arguments": {
2078
+ "type": "array",
2079
+ "items": {
2080
+ "type": "string"
2081
+ }
2082
+ },
2083
+ "env": {
2084
+ "type": "object",
2085
+ "additionalProperties": {
2086
+ "type": "string"
2087
+ }
2088
+ },
2089
+ "envfile": {
2090
+ "type": "string"
2091
+ },
2092
+ "sourceMaps": {
2093
+ "type": "boolean"
2094
+ },
2095
+ "packageManager": {
2096
+ "type": "string",
2097
+ "enum": [
2098
+ "npm",
2099
+ "pnpm",
2100
+ "yarn"
2101
+ ]
2102
+ },
2103
+ "preload": {
2104
+ "anyOf": [
2105
+ {
2106
+ "type": "string",
2107
+ "resolvePath": true
2108
+ },
2109
+ {
2110
+ "type": "array",
2111
+ "items": {
2112
+ "type": "string",
2113
+ "resolvePath": true
2114
+ }
2115
+ }
2116
+ ]
2117
+ },
2118
+ "nodeOptions": {
2119
+ "type": "string"
2120
+ },
2121
+ "execArgv": {
2122
+ "type": "array",
2123
+ "items": {
2124
+ "type": "string"
2125
+ }
2126
+ },
2127
+ "permissions": {
2128
+ "type": "object",
2129
+ "properties": {
2130
+ "fs": {
2131
+ "type": "object",
2132
+ "properties": {
2133
+ "read": {
2134
+ "type": "array",
2135
+ "items": {
2136
+ "type": "string"
2137
+ }
2138
+ },
2139
+ "write": {
2140
+ "type": "array",
2141
+ "items": {
2142
+ "type": "string"
2143
+ }
2144
+ }
2145
+ },
2146
+ "additionalProperties": false
2147
+ }
2148
+ },
2149
+ "additionalProperties": false
2150
+ },
2151
+ "telemetry": {
2152
+ "type": "object",
2153
+ "properties": {
2154
+ "instrumentations": {
2155
+ "type": "array",
2156
+ "description": "An array of instrumentations loaded if telemetry is enabled",
2157
+ "items": {
2158
+ "oneOf": [
2159
+ {
2160
+ "type": "string"
2161
+ },
2162
+ {
2163
+ "type": "object",
2164
+ "properties": {
2165
+ "package": {
2166
+ "type": "string"
2167
+ },
2168
+ "exportName": {
2169
+ "type": "string"
2170
+ },
2171
+ "options": {
2172
+ "type": "object",
2173
+ "additionalProperties": true
2174
+ }
2175
+ },
2176
+ "required": [
2177
+ "package"
2178
+ ]
2179
+ }
2180
+ ]
2181
+ }
2182
+ }
2183
+ }
2184
+ }
2185
+ },
2186
+ "additionalProperties": false
1929
2187
  }
1930
2188
  },
1931
2189
  "additionalProperties": false