@nerest/nerest 1.7.0 → 1.7.2
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/dist/server/hooks/logger.d.ts +1 -1
- package/dist/server/hooks/runtime.js +1 -1
- package/dist/server/loaders/schema.d.ts +1 -2
- package/dist/server/shared.d.ts +1 -1
- package/dist/server/shared.js +3 -2
- package/package.json +20 -21
- package/server/hooks/runtime.ts +1 -1
- package/server/shared.ts +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function runLoggerHook(loader: () => Promise<unknown>): Promise<boolean | (import("fastify").FastifyLoggerOptions<import("fastify").RawServerDefault, import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>, import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>> & import("pino").LoggerOptions<never, boolean>) | null | undefined>;
|
|
1
|
+
export declare function runLoggerHook(loader: () => Promise<unknown>): Promise<boolean | (import("fastify").FastifyLoggerOptions<import("fastify").RawServerDefault, import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("node:http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider.js").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>, import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("node:http").IncomingMessage, import("node:http").ServerResponse<import("node:http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>> & import("pino").LoggerOptions<never, boolean>) | null | undefined>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function loadAppSchema(appRoot: string): Promise<RefParser.JSONSchema | null>;
|
|
1
|
+
export declare function loadAppSchema(appRoot: string): Promise<import("@apidevtools/json-schema-ref-parser").JSONSchema | null>;
|
package/dist/server/shared.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ type ServerOptions = {
|
|
|
10
10
|
loadPropsHook: (entry: string) => Promise<unknown>;
|
|
11
11
|
loadRuntimeHook: () => Promise<unknown>;
|
|
12
12
|
};
|
|
13
|
-
export declare function createServer(options: ServerOptions): Promise<fastify.FastifyInstance<fastify.RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, fastify.FastifyBaseLogger, fastify.FastifyTypeProviderDefault>>;
|
|
13
|
+
export declare function createServer(options: ServerOptions): Promise<fastify.FastifyInstance<fastify.RawServerDefault, import("node:http").IncomingMessage, import("node:http").ServerResponse<import("node:http").IncomingMessage>, fastify.FastifyBaseLogger, fastify.FastifyTypeProviderDefault>>;
|
|
14
14
|
export {};
|
package/dist/server/shared.js
CHANGED
|
@@ -14,8 +14,9 @@ export async function createServer(options) {
|
|
|
14
14
|
const { project, root, loadRuntimeHook } = options;
|
|
15
15
|
const app = fastify({
|
|
16
16
|
logger: (await runLoggerHook(loadRuntimeHook)) ?? true,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
routerOptions: {
|
|
18
|
+
ignoreTrailingSlash: true,
|
|
19
|
+
},
|
|
19
20
|
// JSON parsing can take a long time and blocks the event loop,
|
|
20
21
|
// so we need to limit the size of the body. 10MB is a good compromise
|
|
21
22
|
// baseline that was chosen by experimenting with real world usage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nerest/nerest",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "React micro frontend framework",
|
|
5
5
|
"homepage": "https://github.com/nerestjs/nerest",
|
|
6
6
|
"repository": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"lint": "eslint --ext .ts .",
|
|
28
28
|
"prepare": "simple-git-hooks",
|
|
29
29
|
"test": "npm run test:module && npm run test:integration:dev && npm run test:integration:prod",
|
|
30
|
-
"test:integration:dev": "
|
|
31
|
-
"test:integration:prod": "
|
|
30
|
+
"test:integration:dev": "sh tests/integration/run.development.sh",
|
|
31
|
+
"test:integration:prod": "sh tests/integration/run.production.sh",
|
|
32
32
|
"test:module": "vitest run tests/module/**",
|
|
33
33
|
"typegen": "json2ts -i 'schemas/**/*.json' -o schemas --bannerComment ''"
|
|
34
34
|
},
|
|
@@ -49,39 +49,38 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@apidevtools/json-schema-ref-parser": "^
|
|
53
|
-
"@fastify/middie": "^9.0
|
|
54
|
-
"@fastify/static": "^
|
|
55
|
-
"@fastify/swagger": "^9.
|
|
56
|
-
"@fastify/swagger-ui": "^5.2.
|
|
52
|
+
"@apidevtools/json-schema-ref-parser": "^15.2.1",
|
|
53
|
+
"@fastify/middie": "^9.1.0",
|
|
54
|
+
"@fastify/static": "^9.0.0",
|
|
55
|
+
"@fastify/swagger": "^9.6.1",
|
|
56
|
+
"@fastify/swagger-ui": "^5.2.4",
|
|
57
57
|
"ajv": "^8.17.1",
|
|
58
58
|
"ajv-formats": "^3.0.1",
|
|
59
59
|
"dotenv": "^17.2.3",
|
|
60
60
|
"fast-glob": "^3.3.3",
|
|
61
61
|
"fast-uri": "^3.1.0",
|
|
62
|
-
"fastify": "^5.
|
|
62
|
+
"fastify": "^5.7.1",
|
|
63
63
|
"fastify-graceful-shutdown": "^5.0.0",
|
|
64
64
|
"json-schema-to-typescript": "^15.0.4",
|
|
65
|
-
"vite": "^7.1
|
|
65
|
+
"vite": "^7.3.1",
|
|
66
66
|
"vite-plugin-externals": "^0.6.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@commitlint/cli": "^20.1
|
|
70
|
-
"@commitlint/config-conventional": "^20.
|
|
71
|
-
"@playwright/test": "^1.
|
|
69
|
+
"@commitlint/cli": "^20.3.1",
|
|
70
|
+
"@commitlint/config-conventional": "^20.3.1",
|
|
71
|
+
"@playwright/test": "^1.57.0",
|
|
72
72
|
"@tinkoff/eslint-config": "^5.0.1",
|
|
73
73
|
"@tinkoff/eslint-config-react": "^5.0.1",
|
|
74
74
|
"@tinkoff/prettier-config": "^5.0.0",
|
|
75
|
-
"@types/react": "^19.2.
|
|
76
|
-
"@types/react-dom": "^19.2.
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"react": "^19.2.
|
|
80
|
-
"react-dom": "^19.2.0",
|
|
75
|
+
"@types/react": "^19.2.8",
|
|
76
|
+
"@types/react-dom": "^19.2.3",
|
|
77
|
+
"lint-staged": "^16.2.7",
|
|
78
|
+
"react": "^19.2.3",
|
|
79
|
+
"react-dom": "^19.2.3",
|
|
81
80
|
"simple-git-hooks": "^2.13.1",
|
|
82
|
-
"sort-package-json": "^3.
|
|
81
|
+
"sort-package-json": "^3.6.0",
|
|
83
82
|
"typescript": "^5.9.3",
|
|
84
|
-
"vitest": "^
|
|
83
|
+
"vitest": "^4.0.17"
|
|
85
84
|
},
|
|
86
85
|
"peerDependencies": {
|
|
87
86
|
"react": "^18.0.0 || ^19.0.0",
|
package/server/hooks/runtime.ts
CHANGED
package/server/shared.ts
CHANGED
|
@@ -35,8 +35,9 @@ export async function createServer(options: ServerOptions) {
|
|
|
35
35
|
|
|
36
36
|
const app = fastify({
|
|
37
37
|
logger: (await runLoggerHook(loadRuntimeHook)) ?? true,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
routerOptions: {
|
|
39
|
+
ignoreTrailingSlash: true,
|
|
40
|
+
},
|
|
40
41
|
// JSON parsing can take a long time and blocks the event loop,
|
|
41
42
|
// so we need to limit the size of the body. 10MB is a good compromise
|
|
42
43
|
// baseline that was chosen by experimenting with real world usage
|