@platformatic/nest 3.55.0 → 3.57.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
@@ -352,6 +352,33 @@ export interface PlatformaticNestJSConfig {
352
352
  enabled?: boolean | string;
353
353
  hostname?: string;
354
354
  endpoint?: string;
355
+ https?: {
356
+ allowHTTP1?: boolean;
357
+ key:
358
+ | string
359
+ | {
360
+ path?: string;
361
+ }
362
+ | (
363
+ | string
364
+ | {
365
+ path?: string;
366
+ }
367
+ )[];
368
+ cert:
369
+ | string
370
+ | {
371
+ path?: string;
372
+ }
373
+ | (
374
+ | string
375
+ | {
376
+ path?: string;
377
+ }
378
+ )[];
379
+ requestCert?: boolean;
380
+ rejectUnauthorized?: boolean;
381
+ };
355
382
  auth?: {
356
383
  username: string;
357
384
  password: string;
@@ -490,6 +517,14 @@ export interface PlatformaticNestJSConfig {
490
517
  * The path to write the traces to. Only for file exporter.
491
518
  */
492
519
  path?: string;
520
+ /**
521
+ * The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
522
+ */
523
+ protocol?: "http" | "grpc";
524
+ /**
525
+ * Alias for protocol. Only for the otlp exporter. Defaults to http.
526
+ */
527
+ transport?: "http" | "grpc";
493
528
  [k: string]: unknown;
494
529
  };
495
530
  additionalProperties?: never;
@@ -515,6 +550,14 @@ export interface PlatformaticNestJSConfig {
515
550
  * The path to write the traces to. Only for file exporter.
516
551
  */
517
552
  path?: string;
553
+ /**
554
+ * The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
555
+ */
556
+ protocol?: "http" | "grpc";
557
+ /**
558
+ * Alias for protocol. Only for the otlp exporter. Defaults to http.
559
+ */
560
+ transport?: "http" | "grpc";
518
561
  [k: string]: unknown;
519
562
  };
520
563
  additionalProperties?: never;
package/lib/capability.js CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  importFile,
10
10
  resolvePackageViaCJS
11
11
  } from '@platformatic/basic'
12
+ import { getEvents } from '@platformatic/globals'
12
13
  import getPort from 'get-port'
13
14
  import inject from 'light-my-request'
14
15
  import { readFile } from 'node:fs/promises'
@@ -78,7 +79,8 @@ export class NestCapability extends BaseCapability {
78
79
 
79
80
  // We use url changing as a way to notify restarts
80
81
  this.childManager.on('url', () => {
81
- globalThis.platformatic.events.emitAndNotify('url', this.url)
82
+ const events = getEvents()
83
+ events.emitAndNotify('url', this.url)
82
84
  })
83
85
  } else {
84
86
  return this.#startProduction(listen)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/nest",
3
- "version": "3.55.0",
3
+ "version": "3.57.0",
4
4
  "description": "Platformatic Nest.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,9 +18,10 @@
18
18
  "get-port": "^7.1.0",
19
19
  "light-my-request": "^6.0.0",
20
20
  "pino-http": "^10.2.0",
21
- "@platformatic/foundation": "3.55.0",
22
- "@platformatic/basic": "3.55.0",
23
- "@platformatic/generators": "3.55.0"
21
+ "@platformatic/basic": "3.57.0",
22
+ "@platformatic/generators": "3.57.0",
23
+ "@platformatic/globals": "3.57.0",
24
+ "@platformatic/foundation": "3.57.0"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@nestjs/cli": "^11.0.7",
@@ -34,8 +35,8 @@
34
35
  "tstyche": "^6.2.0",
35
36
  "tsx": "^4.19.0",
36
37
  "typescript": "^5.5.4",
37
- "@platformatic/gateway": "3.55.0",
38
- "@platformatic/service": "3.55.0"
38
+ "@platformatic/gateway": "3.57.0",
39
+ "@platformatic/service": "3.57.0"
39
40
  },
40
41
  "engines": {
41
42
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.55.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.57.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic NestJS Config",
5
5
  "type": "object",
@@ -1616,6 +1616,99 @@
1616
1616
  "endpoint": {
1617
1617
  "type": "string"
1618
1618
  },
1619
+ "https": {
1620
+ "type": "object",
1621
+ "properties": {
1622
+ "allowHTTP1": {
1623
+ "type": "boolean"
1624
+ },
1625
+ "key": {
1626
+ "anyOf": [
1627
+ {
1628
+ "type": "string"
1629
+ },
1630
+ {
1631
+ "type": "object",
1632
+ "properties": {
1633
+ "path": {
1634
+ "type": "string",
1635
+ "resolvePath": true
1636
+ }
1637
+ },
1638
+ "additionalProperties": false
1639
+ },
1640
+ {
1641
+ "type": "array",
1642
+ "items": {
1643
+ "anyOf": [
1644
+ {
1645
+ "type": "string"
1646
+ },
1647
+ {
1648
+ "type": "object",
1649
+ "properties": {
1650
+ "path": {
1651
+ "type": "string",
1652
+ "resolvePath": true
1653
+ }
1654
+ },
1655
+ "additionalProperties": false
1656
+ }
1657
+ ]
1658
+ }
1659
+ }
1660
+ ]
1661
+ },
1662
+ "cert": {
1663
+ "anyOf": [
1664
+ {
1665
+ "type": "string"
1666
+ },
1667
+ {
1668
+ "type": "object",
1669
+ "properties": {
1670
+ "path": {
1671
+ "type": "string",
1672
+ "resolvePath": true
1673
+ }
1674
+ },
1675
+ "additionalProperties": false
1676
+ },
1677
+ {
1678
+ "type": "array",
1679
+ "items": {
1680
+ "anyOf": [
1681
+ {
1682
+ "type": "string"
1683
+ },
1684
+ {
1685
+ "type": "object",
1686
+ "properties": {
1687
+ "path": {
1688
+ "type": "string",
1689
+ "resolvePath": true
1690
+ }
1691
+ },
1692
+ "additionalProperties": false
1693
+ }
1694
+ ]
1695
+ }
1696
+ }
1697
+ ]
1698
+ },
1699
+ "requestCert": {
1700
+ "type": "boolean"
1701
+ },
1702
+ "rejectUnauthorized": {
1703
+ "type": "boolean"
1704
+ }
1705
+ },
1706
+ "additionalProperties": false,
1707
+ "required": [
1708
+ "key",
1709
+ "cert"
1710
+ ]
1711
+ },
1619
1712
  "auth": {
1620
1713
  "type": "object",
1621
1714
  "properties": {
@@ -1931,6 +2024,22 @@
1931
2024
  "path": {
1932
2025
  "type": "string",
1933
2026
  "description": "The path to write the traces to. Only for file exporter."
2027
+ },
2028
+ "protocol": {
2029
+ "type": "string",
2030
+ "enum": [
2031
+ "http",
2032
+ "grpc"
2033
+ ],
2034
+ "description": "The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http."
2035
+ },
2036
+ "transport": {
2037
+ "type": "string",
2038
+ "enum": [
2039
+ "http",
2040
+ "grpc"
2041
+ ],
2042
+ "description": "Alias for protocol. Only for the otlp exporter. Defaults to http."
1934
2043
  }
1935
2044
  }
1936
2045
  },
@@ -1967,6 +2076,22 @@
1967
2076
  "path": {
1968
2077
  "type": "string",
1969
2078
  "description": "The path to write the traces to. Only for file exporter."
2079
+ },
2080
+ "protocol": {
2081
+ "type": "string",
2082
+ "enum": [
2083
+ "http",
2084
+ "grpc"
2085
+ ],
2086
+ "description": "The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http."
2087
+ },
2088
+ "transport": {
2089
+ "type": "string",
2090
+ "enum": [
2091
+ "http",
2092
+ "grpc"
2093
+ ],
2094
+ "description": "Alias for protocol. Only for the otlp exporter. Defaults to http."
1970
2095
  }
1971
2096
  }
1972
2097
  },