@platformatic/node 3.46.0 → 3.48.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 PlatformaticNodeJsConfig {
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,36 @@
1
+ import { BaseCapability, BaseContext, BaseOptions } from '@platformatic/basic'
2
+ import { Configuration, ConfigurationOptions } from '@platformatic/foundation'
3
+ import { BaseGenerator } from '@platformatic/generators'
4
+ import { JSONSchemaType } from 'ajv'
5
+ import type { PlatformaticNodeJsConfig } from './config.d.ts'
6
+
7
+ export type { PlatformaticNodeJsConfig } from './config.d.ts'
8
+
9
+ export interface NodeContext extends BaseContext {}
10
+
11
+ export type NodeConfiguration = Configuration<PlatformaticNodeJsConfig>
12
+
13
+ export declare function transform (config: NodeConfiguration): Promise<NodeConfiguration>
14
+
15
+ export declare function loadConfiguration (
16
+ root: string | PlatformaticNodeJsConfig,
17
+ source?: string | PlatformaticNodeJsConfig,
18
+ context?: ConfigurationOptions
19
+ ): Promise<NodeConfiguration>
20
+
21
+ export declare function create (
22
+ configOrRoot: string | PlatformaticNodeJsConfig,
23
+ sourceOrConfig?: string | PlatformaticNodeJsConfig,
24
+ context?: ConfigurationOptions
25
+ ): Promise<NodeCapability>
26
+
27
+ export declare class Generator extends BaseGenerator {}
28
+
29
+ export declare const packageJson: Record<string, unknown>
30
+ export declare const schema: JSONSchemaType<PlatformaticNodeJsConfig>
31
+ export declare const schemaComponents: { node: JSONSchemaType<object> }
32
+ export declare const version: string
33
+
34
+ export declare class NodeCapability extends BaseCapability<PlatformaticNodeJsConfig, BaseOptions<NodeContext>> {
35
+ constructor (root: string, config: PlatformaticNodeJsConfig, context?: object)
36
+ }
package/lib/schema.js CHANGED
@@ -49,6 +49,9 @@ export const schema = {
49
49
  $schema: {
50
50
  type: 'string'
51
51
  },
52
+ module: {
53
+ type: 'string'
54
+ },
52
55
  logger: utilsSchemaComponents.logger,
53
56
  server: utilsSchemaComponents.server,
54
57
  watch: basicSchemaComponents.watch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/node",
3
- "version": "3.46.0",
3
+ "version": "3.48.0",
4
4
  "description": "Platformatic Node.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,28 +18,30 @@
18
18
  "@watchable/unpromise": "^1.0.2",
19
19
  "json5": "^2.2.3",
20
20
  "light-my-request": "^6.0.0",
21
- "@platformatic/basic": "3.46.0",
22
- "@platformatic/generators": "3.46.0",
23
- "@platformatic/foundation": "3.46.0"
21
+ "@platformatic/basic": "3.48.0",
22
+ "@platformatic/foundation": "3.48.0",
23
+ "@platformatic/generators": "3.48.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "cleaner-spec-reporter": "^0.5.0",
27
27
  "eslint": "9",
28
28
  "express": "^4.19.2",
29
29
  "fastify": "^5.7.0",
30
+ "tstyche": "^6.2.0",
30
31
  "json-schema-to-typescript": "^15.0.1",
31
32
  "koa": "^2.15.3",
32
33
  "neostandard": "^0.12.0",
33
34
  "tsx": "^4.19.0",
34
35
  "typescript": "^5.5.4",
35
- "@platformatic/gateway": "3.46.0",
36
- "@platformatic/service": "3.46.0"
36
+ "@platformatic/service": "3.48.0",
37
+ "@platformatic/gateway": "3.48.0"
37
38
  },
38
39
  "engines": {
39
40
  "node": ">=22.19.0"
40
41
  },
41
42
  "scripts": {
42
- "test": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
43
+ "test": "npm run test:types && node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js test/**/*.test.js",
44
+ "test:types": "tstyche",
43
45
  "gen-schema": "node lib/schema.js > schema.json",
44
46
  "gen-types": "json2ts > config.d.ts < schema.json",
45
47
  "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/node/3.46.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/node/3.48.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Node.js 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": {