@platformatic/next 3.45.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 PlatformaticNextJsConfig {
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,53 @@
1
+ import { BaseCapability, BaseContext, BaseOptions } from '@platformatic/basic'
2
+ import { Configuration, ConfigurationOptions } from '@platformatic/foundation'
3
+ import { JSONSchemaType } from 'ajv'
4
+ import { FastifyError } from 'fastify'
5
+ import type { PlatformaticNextJsConfig } from './config.d.ts'
6
+
7
+ export type { PlatformaticNextJsConfig } from './config.d.ts'
8
+
9
+ export interface NextContext extends BaseContext {}
10
+
11
+ export type NextConfiguration = Configuration<PlatformaticNextJsConfig>
12
+
13
+ export declare function transform (config: NextConfiguration): Promise<NextConfiguration>
14
+
15
+ export declare function getAdapterPath (): string
16
+
17
+ export declare function enhanceNextConfig (nextConfig: any, ...args: unknown[]): Promise<any>
18
+
19
+ export declare function loadConfiguration (
20
+ root: string | PlatformaticNextJsConfig,
21
+ source?: string | PlatformaticNextJsConfig,
22
+ context?: ConfigurationOptions
23
+ ): Promise<NextConfiguration>
24
+
25
+ export declare function create (
26
+ configOrRoot: string | PlatformaticNextJsConfig,
27
+ sourceOrConfig?: string | PlatformaticNextJsConfig,
28
+ context?: ConfigurationOptions
29
+ ): Promise<NextCapability | NextImageOptimizerCapability>
30
+
31
+ export declare class NextCapability extends BaseCapability<PlatformaticNextJsConfig, BaseOptions<NextContext>> {
32
+ constructor (root: string, config: PlatformaticNextJsConfig, context?: object)
33
+ }
34
+
35
+ export declare class NextImageOptimizerCapability extends BaseCapability<
36
+ PlatformaticNextJsConfig,
37
+ BaseOptions<NextContext>
38
+ > {
39
+ constructor (root: string, config: PlatformaticNextJsConfig, context?: object)
40
+ }
41
+
42
+ export declare const packageJson: Record<string, unknown>
43
+ export declare const schema: JSONSchemaType<PlatformaticNextJsConfig>
44
+ export declare const schemaComponents: { next: JSONSchemaType<object> }
45
+ export declare const version: string
46
+ export declare const supportedVersions: string[]
47
+
48
+ export declare function getCacheHandlerPath (name: string): string
49
+
50
+ export namespace errors {
51
+ export const StandaloneServerNotFound: () => FastifyError
52
+ export const CannotParseStandaloneServer: () => FastifyError
53
+ }
package/lib/schema.js CHANGED
@@ -228,6 +228,9 @@ export const schema = {
228
228
  $schema: {
229
229
  type: 'string'
230
230
  },
231
+ module: {
232
+ type: 'string'
233
+ },
231
234
  logger: utilsSchemaComponents.logger,
232
235
  server: utilsSchemaComponents.server,
233
236
  watch: basicSchemaComponents.watch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/next",
3
- "version": "3.45.0",
3
+ "version": "3.47.0",
4
4
  "description": "Platformatic Next.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,8 +25,8 @@
25
25
  "light-my-request": "^6.0.0",
26
26
  "msgpackr": "^1.11.2",
27
27
  "semver": "^7.6.3",
28
- "@platformatic/basic": "3.45.0",
29
- "@platformatic/foundation": "3.45.0"
28
+ "@platformatic/basic": "3.47.0",
29
+ "@platformatic/foundation": "3.47.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@fastify/reply-from": "^12.0.0",
@@ -35,6 +35,7 @@
35
35
  "@types/react-dom": "^19.1.7",
36
36
  "cleaner-spec-reporter": "^0.5.0",
37
37
  "eslint": "9",
38
+ "tstyche": "^6.2.0",
38
39
  "execa": "^9.5.1",
39
40
  "fastify": "^5.7.3",
40
41
  "json-schema-to-typescript": "^15.0.1",
@@ -42,14 +43,15 @@
42
43
  "next": "^16.1.0",
43
44
  "typescript": "^5.5.4",
44
45
  "ws": "^8.18.0",
45
- "@platformatic/service": "3.45.0",
46
- "@platformatic/gateway": "3.45.0"
46
+ "@platformatic/service": "3.47.0",
47
+ "@platformatic/gateway": "3.47.0"
47
48
  },
48
49
  "engines": {
49
50
  "node": ">=22.19.0"
50
51
  },
51
52
  "scripts": {
52
- "test": "npm run test:main && npm run test:caching && npm run test:compatibility && npm run test:integration",
53
+ "test": "npm run test:types && npm run test:main && npm run test:caching && npm run test:compatibility && npm run test:integration",
54
+ "test:types": "tstyche",
53
55
  "test:main": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/*.test.js",
54
56
  "test:caching": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/caching/*.test.js",
55
57
  "test:compatibility": "node --test --test-reporter=cleaner-spec-reporter --test-concurrency=1 --test-timeout=2000000 test/compatibility/*.test.js",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/next/3.45.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/next/3.47.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Next.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": {