@platformatic/tanstack 3.74.0 → 3.75.1

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 (3) hide show
  1. package/config.d.ts +156 -4
  2. package/package.json +10 -10
  3. package/schema.json +105 -1
package/config.d.ts CHANGED
@@ -122,6 +122,14 @@ export interface PlatformaticTanStackConfig {
122
122
  * The maximum length of the queue of pending connections
123
123
  */
124
124
  backlog?: number;
125
+ /**
126
+ * The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed. When running behind a load balancer, set it higher than the load balancer idle timeout.
127
+ */
128
+ keepAliveTimeout?: number;
129
+ /**
130
+ * The number of milliseconds to wait to receive the complete HTTP headers from the client. It should be greater than keepAliveTimeout.
131
+ */
132
+ headersTimeout?: number;
125
133
  http2?: boolean;
126
134
  https?: {
127
135
  allowHTTP1?: boolean;
@@ -157,8 +165,8 @@ export interface PlatformaticTanStackConfig {
157
165
  /**
158
166
  * @minItems 1
159
167
  */
160
- allow?: [string, ...string[]];
161
- ignore?: string[];
168
+ allow?: [string, ...string[]] | null;
169
+ ignore?: string[] | null;
162
170
  }
163
171
  | boolean
164
172
  | string;
@@ -199,9 +207,108 @@ export interface PlatformaticTanStackConfig {
199
207
  }
200
208
  )[];
201
209
  basePath?: string;
202
- services?: {
210
+ services?: ({
203
211
  [k: string]: unknown;
204
- }[];
212
+ } & {
213
+ id?: string;
214
+ enabled?:
215
+ | boolean
216
+ | string
217
+ | {
218
+ [k: string]: boolean;
219
+ };
220
+ path?: string;
221
+ config?: string;
222
+ url?: string;
223
+ gitBranch?: string;
224
+ useHttp?: boolean;
225
+ websocket?: boolean;
226
+ reuseTcpPorts?: boolean;
227
+ workers?:
228
+ | number
229
+ | string
230
+ | {
231
+ static?: number;
232
+ minimum?: number;
233
+ maximum?: number;
234
+ scaleUpELU?: number;
235
+ scaleDownELU?: number;
236
+ [k: string]: unknown;
237
+ };
238
+ health?: {
239
+ enabled?: boolean | string;
240
+ interval?: number | string;
241
+ gracePeriod?: number | string;
242
+ maxUnhealthyChecks?: number | string;
243
+ maxELU?: number | string;
244
+ maxEventLoopDelay?: number | string;
245
+ maxEventLoopDelayP99?: number | string;
246
+ maxHeapUsed?: number | string;
247
+ maxHeapTotal?: number | string;
248
+ maxYoungGeneration?: number | string;
249
+ codeRangeSize?: number | string;
250
+ bufferPoolSize?: number | string;
251
+ defaultHighWaterMark?: number | string;
252
+ };
253
+ /**
254
+ * 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.
255
+ */
256
+ restartOnError?: boolean | number;
257
+ dependencies?: string[];
258
+ arguments?: string[];
259
+ env?: {
260
+ [k: string]: string;
261
+ };
262
+ envfile?: string;
263
+ sourceMaps?: boolean;
264
+ nodeModulesSourceMaps?: string[];
265
+ packageManager?: "npm" | "pnpm" | "yarn";
266
+ preload?: string | string[];
267
+ nodeOptions?: string;
268
+ execArgv?: string[];
269
+ permissions?: {
270
+ fs?: {
271
+ read?: string[];
272
+ write?: string[];
273
+ };
274
+ };
275
+ telemetry?: {
276
+ /**
277
+ * An array of instrumentations loaded if telemetry is enabled
278
+ */
279
+ instrumentations?: (
280
+ | string
281
+ | {
282
+ package: string;
283
+ exportName?: string;
284
+ options?: {
285
+ [k: string]: unknown;
286
+ };
287
+ [k: string]: unknown;
288
+ }
289
+ )[];
290
+ [k: string]: unknown;
291
+ };
292
+ compileCache?:
293
+ | boolean
294
+ | {
295
+ /**
296
+ * Enable Node.js module compile cache for faster startup
297
+ */
298
+ enabled?: boolean;
299
+ /**
300
+ * Directory to store compile cache. Defaults to .plt/compile-cache in app root
301
+ */
302
+ directory?: string;
303
+ };
304
+ management?:
305
+ | boolean
306
+ | {
307
+ enabled?: boolean;
308
+ operations?: string[];
309
+ };
310
+ [k: string]: unknown;
311
+ })[];
205
312
  workers?:
206
313
  | number
207
314
  | string
@@ -333,6 +440,14 @@ export interface PlatformaticTanStackConfig {
333
440
  * The maximum length of the queue of pending connections
334
441
  */
335
442
  backlog?: number;
443
+ /**
444
+ * The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed. When running behind a load balancer, set it higher than the load balancer idle timeout.
445
+ */
446
+ keepAliveTimeout?: number;
447
+ /**
448
+ * The number of milliseconds to wait to receive the complete HTTP headers from the client. It should be greater than keepAliveTimeout.
449
+ */
450
+ headersTimeout?: number;
336
451
  http2?: boolean;
337
452
  https?: {
338
453
  allowHTTP1?: boolean;
@@ -755,6 +870,32 @@ export interface PlatformaticTanStackConfig {
755
870
  * Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
756
871
  */
757
872
  diagLogger?: boolean | string;
873
+ /**
874
+ * How much to trace. Omitted, everything is recorded. Either a type out of the set OpenTelemetry defines for OTEL_TRACES_SAMPLER, or a package exporting a sampler.
875
+ */
876
+ sampler?:
877
+ | {
878
+ type:
879
+ | "always_on"
880
+ | "always_off"
881
+ | "traceidratio"
882
+ | "parentbased_always_on"
883
+ | "parentbased_always_off"
884
+ | "parentbased_traceidratio";
885
+ /**
886
+ * Options for the sampler, for instance { "ratio": 0.1 } for the ratio based ones.
887
+ */
888
+ options?: {
889
+ [k: string]: unknown;
890
+ };
891
+ }
892
+ | {
893
+ package: string;
894
+ exportName?: string;
895
+ options?: {
896
+ [k: string]: unknown;
897
+ };
898
+ };
758
899
  };
759
900
  verticalScaler?: {
760
901
  enabled?: boolean;
@@ -939,5 +1080,16 @@ export interface PlatformaticTanStackConfig {
939
1080
  contentType?: string;
940
1081
  statusCode?: number;
941
1082
  };
1083
+ preCompressed?:
1084
+ | boolean
1085
+ | string
1086
+ | {
1087
+ enabled?:
1088
+ | boolean
1089
+ | string
1090
+ | {
1091
+ [k: string]: boolean;
1092
+ };
1093
+ };
942
1094
  };
943
1095
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/tanstack",
3
- "version": "3.74.0",
3
+ "version": "3.75.1",
4
4
  "description": "Platformatic TanStack Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -15,22 +15,22 @@
15
15
  },
16
16
  "homepage": "https://github.com/platformatic/platformatic#readme",
17
17
  "dependencies": {
18
- "@platformatic/basic": "3.74.0",
19
- "@platformatic/foundation": "3.74.0",
20
- "@platformatic/globals": "3.74.0",
21
- "@platformatic/vite": "3.74.0",
18
+ "@platformatic/basic": "3.75.1",
19
+ "@platformatic/foundation": "3.75.1",
20
+ "@platformatic/globals": "3.75.1",
21
+ "@platformatic/vite": "3.75.1",
22
22
  "semver": "^7.6.3"
23
23
  },
24
24
  "devDependencies": {
25
- "@platformatic/gateway": "3.74.0",
26
- "@platformatic/service": "3.74.0",
25
+ "@platformatic/gateway": "3.75.1",
26
+ "@platformatic/service": "3.75.1",
27
27
  "@tanstack/react-router": "^1.139.7",
28
28
  "@tanstack/react-start": "^1.139.8",
29
- "@vitejs/plugin-react": "^5.1.1",
29
+ "@vitejs/plugin-react": "^6.0.0",
30
30
  "cleaner-spec-reporter": "^2.0.0",
31
31
  "eslint": "9",
32
32
  "fastify": "^5.0.0",
33
- "json-schema-to-typescript": "^15.0.1",
33
+ "json-schema-to-typescript": "^16.0.0",
34
34
  "neostandard": "^0.14.0",
35
35
  "nitro": "3.0.1-alpha.2",
36
36
  "react": "^19.1.0",
@@ -39,7 +39,7 @@
39
39
  "typescript": "~6.0.3",
40
40
  "vite": "^8.2.2",
41
41
  "vite-plugin-solid": "^2.11.10",
42
- "vite-tsconfig-paths": "^5.1.4",
42
+ "vite-tsconfig-paths": "^6.0.0",
43
43
  "ws": "^8.18.0"
44
44
  },
45
45
  "engines": {
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/tanstack/3.74.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/tanstack/3.75.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic TanStack Config",
5
5
  "type": "object",
@@ -280,6 +280,16 @@
280
280
  "type": "integer",
281
281
  "description": "The maximum length of the queue of pending connections"
282
282
  },
283
+ "keepAliveTimeout": {
284
+ "type": "integer",
285
+ "minimum": 0,
286
+ "description": "The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed. When running behind a load balancer, set it higher than the load balancer idle timeout."
287
+ },
288
+ "headersTimeout": {
289
+ "type": "integer",
290
+ "minimum": 0,
291
+ "description": "The number of milliseconds to wait to receive the complete HTTP headers from the client. It should be greater than keepAliveTimeout."
292
+ },
283
293
  "http2": {
284
294
  "type": "boolean"
285
295
  },
@@ -1336,6 +1346,16 @@
1336
1346
  "type": "integer",
1337
1347
  "description": "The maximum length of the queue of pending connections"
1338
1348
  },
1349
+ "keepAliveTimeout": {
1350
+ "type": "integer",
1351
+ "minimum": 0,
1352
+ "description": "The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed. When running behind a load balancer, set it higher than the load balancer idle timeout."
1353
+ },
1354
+ "headersTimeout": {
1355
+ "type": "integer",
1356
+ "minimum": 0,
1357
+ "description": "The number of milliseconds to wait to receive the complete HTTP headers from the client. It should be greater than keepAliveTimeout."
1358
+ },
1339
1359
  "http2": {
1340
1360
  "type": "boolean"
1341
1361
  },
@@ -2580,6 +2600,56 @@
2580
2600
  }
2581
2601
  ],
2582
2602
  "description": "Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level."
2603
+ },
2604
+ "sampler": {
2605
+ "description": "How much to trace. Omitted, everything is recorded. Either a type out of the set OpenTelemetry defines for OTEL_TRACES_SAMPLER, or a package exporting a sampler.",
2606
+ "anyOf": [
2607
+ {
2608
+ "type": "object",
2609
+ "properties": {
2610
+ "type": {
2611
+ "type": "string",
2612
+ "enum": [
2613
+ "always_on",
2614
+ "always_off",
2615
+ "traceidratio",
2616
+ "parentbased_always_on",
2617
+ "parentbased_always_off",
2618
+ "parentbased_traceidratio"
2619
+ ]
2620
+ },
2621
+ "options": {
2622
+ "type": "object",
2623
+ "description": "Options for the sampler, for instance { \"ratio\": 0.1 } for the ratio based ones.",
2624
+ "additionalProperties": true
2625
+ }
2626
+ },
2627
+ "required": [
2628
+ "type"
2629
+ ],
2630
+ "additionalProperties": false
2631
+ },
2632
+ {
2633
+ "type": "object",
2634
+ "description": "A module exporting a sampler, or a factory which receives the options and returns one. A relative path is resolved against the application directory.",
2635
+ "properties": {
2636
+ "package": {
2637
+ "type": "string"
2638
+ },
2639
+ "exportName": {
2640
+ "type": "string"
2641
+ },
2642
+ "options": {
2643
+ "type": "object",
2644
+ "additionalProperties": true
2645
+ }
2646
+ },
2647
+ "required": [
2648
+ "package"
2649
+ ],
2650
+ "additionalProperties": false
2651
+ }
2652
+ ]
2583
2653
  }
2584
2654
  },
2585
2655
  "required": [
@@ -3281,6 +3351,40 @@
3281
3351
  }
3282
3352
  ],
3283
3353
  "default": false
3354
+ },
3355
+ "preCompressed": {
3356
+ "anyOf": [
3357
+ {
3358
+ "type": "boolean"
3359
+ },
3360
+ {
3361
+ "type": "string"
3362
+ },
3363
+ {
3364
+ "type": "object",
3365
+ "properties": {
3366
+ "enabled": {
3367
+ "anyOf": [
3368
+ {
3369
+ "type": "boolean"
3370
+ },
3371
+ {
3372
+ "type": "string"
3373
+ },
3374
+ {
3375
+ "type": "object",
3376
+ "additionalProperties": {
3377
+ "type": "boolean"
3378
+ }
3379
+ }
3380
+ ],
3381
+ "default": true
3382
+ }
3383
+ },
3384
+ "additionalProperties": false
3385
+ }
3386
+ ],
3387
+ "default": false
3284
3388
  }
3285
3389
  },
3286
3390
  "default": {},