@platformatic/nest 3.46.0 → 3.47.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
@@ -7,6 +7,7 @@
7
7
 
8
8
  export interface PlatformaticNestJSConfig {
9
9
  $schema?: string;
10
+ module?: string;
10
11
  logger?: {
11
12
  level?: (
12
13
  | ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
package/index.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ import { BaseCapability, BaseContext, BaseOptions } from '@platformatic/basic'
2
+ import { Configuration, ConfigurationOptions } from '@platformatic/foundation'
3
+ import { JSONSchemaType } from 'ajv'
4
+ import type { PlatformaticNestJSConfig } from './config.d.ts'
5
+
6
+ export type { PlatformaticNestJSConfig } from './config.d.ts'
7
+
8
+ export interface NestContext extends BaseContext {}
9
+
10
+ export type NestConfiguration = Configuration<PlatformaticNestJSConfig>
11
+
12
+ export declare function transform (config: NestConfiguration): Promise<NestConfiguration>
13
+
14
+ export declare function loadConfiguration (
15
+ root: string | PlatformaticNestJSConfig,
16
+ source?: string | PlatformaticNestJSConfig,
17
+ context?: ConfigurationOptions
18
+ ): Promise<NestConfiguration>
19
+
20
+ export declare function create (
21
+ configOrRoot: string | PlatformaticNestJSConfig,
22
+ sourceOrConfig?: string | PlatformaticNestJSConfig,
23
+ context?: ConfigurationOptions
24
+ ): Promise<NestCapability>
25
+
26
+ export declare class NestCapability extends BaseCapability<PlatformaticNestJSConfig, BaseOptions<NestContext>> {
27
+ constructor (root: string, config: PlatformaticNestJSConfig, context?: object)
28
+ }
29
+
30
+ export declare const packageJson: Record<string, unknown>
31
+ export declare const schema: JSONSchemaType<PlatformaticNestJSConfig>
32
+ export declare const schemaComponents: { nest: JSONSchemaType<object> }
33
+ export declare const version: string
34
+ export declare const supportedVersions: string
package/lib/capability.js CHANGED
@@ -16,7 +16,7 @@ import { pinoHttp } from 'pino-http'
16
16
  import { satisfies } from 'semver'
17
17
  import { version } from './schema.js'
18
18
 
19
- const supportedVersions = '^11.0.0'
19
+ export const supportedVersions = '^11.0.0'
20
20
 
21
21
  export class NestCapability extends BaseCapability {
22
22
  #basePath
package/lib/schema.js CHANGED
@@ -60,6 +60,9 @@ export const schema = {
60
60
  $schema: {
61
61
  type: 'string'
62
62
  },
63
+ module: {
64
+ type: 'string'
65
+ },
63
66
  logger: utilsSchemaComponents.logger,
64
67
  server: utilsSchemaComponents.server,
65
68
  watch: basicSchemaComponents.watch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/nest",
3
- "version": "3.46.0",
3
+ "version": "3.47.0",
4
4
  "description": "Platformatic Nest.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,9 +18,9 @@
18
18
  "get-port": "^7.1.0",
19
19
  "light-my-request": "^6.0.0",
20
20
  "pino-http": "^10.2.0",
21
- "@platformatic/basic": "3.46.0",
22
- "@platformatic/generators": "3.46.0",
23
- "@platformatic/foundation": "3.46.0"
21
+ "@platformatic/basic": "3.47.0",
22
+ "@platformatic/foundation": "3.47.0",
23
+ "@platformatic/generators": "3.47.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@nestjs/cli": "^11.0.7",
@@ -31,16 +31,18 @@
31
31
  "eslint": "9",
32
32
  "json-schema-to-typescript": "^15.0.1",
33
33
  "neostandard": "^0.12.0",
34
+ "tstyche": "^6.2.0",
34
35
  "tsx": "^4.19.0",
35
36
  "typescript": "^5.5.4",
36
- "@platformatic/gateway": "3.46.0",
37
- "@platformatic/service": "3.46.0"
37
+ "@platformatic/service": "3.47.0",
38
+ "@platformatic/gateway": "3.47.0"
38
39
  },
39
40
  "engines": {
40
41
  "node": ">=22.19.0"
41
42
  },
42
43
  "scripts": {
43
- "test": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
44
+ "test": "npm run test:types && node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
45
+ "test:types": "tstyche",
44
46
  "gen-schema": "node lib/schema.js > schema.json",
45
47
  "gen-types": "json2ts > config.d.ts < schema.json",
46
48
  "build": "npm run gen-schema && npm run gen-types",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.46.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.47.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic NestJS Config",
5
5
  "type": "object",
@@ -7,6 +7,9 @@
7
7
  "$schema": {
8
8
  "type": "string"
9
9
  },
10
+ "module": {
11
+ "type": "string"
12
+ },
10
13
  "logger": {
11
14
  "type": "object",
12
15
  "properties": {