@tramvai/module-server 2.0.2 → 2.2.3
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/lib/modules/papi/shared.d.ts +3 -3
- package/lib/server/error.d.ts +4 -3
- package/lib/server/webApp.d.ts +16 -15
- package/lib/server.es.js +1 -1
- package/lib/server.js +1 -1
- package/package.json +12 -12
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const sharedProviders: {
|
|
2
|
-
provide: string
|
|
2
|
+
provide: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<string>;
|
|
3
3
|
useFactory: ({ appInfo }: {
|
|
4
4
|
appInfo: any;
|
|
5
5
|
}) => string;
|
|
6
6
|
deps: {
|
|
7
|
-
appInfo: {
|
|
7
|
+
appInfo: import("@tinkoff/dippy/lib/createToken/createToken").BaseTokenInterface<{
|
|
8
8
|
[key: string]: string;
|
|
9
9
|
appName: string;
|
|
10
|
-
}
|
|
10
|
+
}>;
|
|
11
11
|
};
|
|
12
12
|
}[];
|
package/lib/server/error.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FastifyInstance } from 'fastify';
|
|
2
2
|
import type { LOGGER_TOKEN } from '@tramvai/module-common';
|
|
3
3
|
import type { WEB_FASTIFY_APP_AFTER_ERROR_TOKEN, WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN, WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN } from '@tramvai/tokens-server-private';
|
|
4
|
+
import type { ExtractDependencyType } from '@tinkoff/dippy';
|
|
4
5
|
export declare const errorHandler: (app: FastifyInstance, { log, beforeError, processError, afterError, }: {
|
|
5
6
|
log: ReturnType<typeof LOGGER_TOKEN>;
|
|
6
|
-
beforeError: typeof WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN
|
|
7
|
-
processError: typeof WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN
|
|
8
|
-
afterError: typeof WEB_FASTIFY_APP_AFTER_ERROR_TOKEN
|
|
7
|
+
beforeError: ExtractDependencyType<typeof WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN>;
|
|
8
|
+
processError: ExtractDependencyType<typeof WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN>;
|
|
9
|
+
afterError: ExtractDependencyType<typeof WEB_FASTIFY_APP_AFTER_ERROR_TOKEN>;
|
|
9
10
|
}) => void;
|
package/lib/server/webApp.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { LOGGER_TOKEN } from '@tramvai/tokens-common';
|
|
|
3
3
|
import type { COMMAND_LINE_RUNNER_TOKEN } from '@tramvai/core';
|
|
4
4
|
import type { WEB_APP_TOKEN, WEB_APP_BEFORE_INIT_TOKEN, WEB_APP_INIT_TOKEN, WEB_APP_AFTER_INIT_TOKEN, WEB_APP_LIMITER_TOKEN, SERVER_TOKEN } from '@tramvai/tokens-server';
|
|
5
5
|
import type { WEB_FASTIFY_APP_TOKEN, WEB_FASTIFY_APP_AFTER_INIT_TOKEN, WEB_FASTIFY_APP_BEFORE_INIT_TOKEN, WEB_FASTIFY_APP_INIT_TOKEN, WEB_FASTIFY_APP_LIMITER_TOKEN, WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN, WEB_FASTIFY_APP_AFTER_ERROR_TOKEN, WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN } from '@tramvai/tokens-server-private';
|
|
6
|
+
import type { ExtractDependencyType } from '@tinkoff/dippy';
|
|
6
7
|
export declare const webAppFactory: ({ server }: {
|
|
7
8
|
server: typeof SERVER_TOKEN;
|
|
8
9
|
}) => import("fastify").FastifyInstance<import("http").Server, import("http").IncomingMessage, import("http").ServerResponse, import("fastify").FastifyLoggerInstance> & PromiseLike<import("fastify").FastifyInstance<import("http").Server, import("http").IncomingMessage, import("http").ServerResponse, import("fastify").FastifyLoggerInstance>>;
|
|
@@ -10,19 +11,19 @@ export declare const webAppExpressFactory: ({ webApp }: {
|
|
|
10
11
|
webApp: typeof WEB_FASTIFY_APP_TOKEN;
|
|
11
12
|
}) => import("express-serve-static-core").Express;
|
|
12
13
|
export declare const webAppInitCommand: ({ app, expressApp, logger, commandLineRunner, beforeInit, limiterRequest, init, afterInit, expressBeforeInit, expressInit, expressAfterInit, expressLimiterRequest, beforeError, processError, afterError, }: {
|
|
13
|
-
app: typeof WEB_FASTIFY_APP_TOKEN
|
|
14
|
-
expressApp: typeof WEB_APP_TOKEN
|
|
15
|
-
logger: typeof LOGGER_TOKEN
|
|
16
|
-
commandLineRunner: typeof COMMAND_LINE_RUNNER_TOKEN
|
|
17
|
-
beforeInit: typeof WEB_FASTIFY_APP_BEFORE_INIT_TOKEN
|
|
18
|
-
limiterRequest: typeof WEB_FASTIFY_APP_LIMITER_TOKEN
|
|
19
|
-
init: typeof WEB_FASTIFY_APP_INIT_TOKEN
|
|
20
|
-
afterInit: typeof WEB_FASTIFY_APP_AFTER_INIT_TOKEN
|
|
21
|
-
expressBeforeInit: typeof WEB_APP_BEFORE_INIT_TOKEN
|
|
22
|
-
expressInit: typeof WEB_APP_INIT_TOKEN
|
|
23
|
-
expressAfterInit: typeof WEB_APP_AFTER_INIT_TOKEN
|
|
24
|
-
expressLimiterRequest: typeof WEB_APP_LIMITER_TOKEN
|
|
25
|
-
beforeError: typeof WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN
|
|
26
|
-
processError: typeof WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN
|
|
27
|
-
afterError: typeof WEB_FASTIFY_APP_AFTER_ERROR_TOKEN
|
|
14
|
+
app: ExtractDependencyType<typeof WEB_FASTIFY_APP_TOKEN>;
|
|
15
|
+
expressApp: ExtractDependencyType<typeof WEB_APP_TOKEN>;
|
|
16
|
+
logger: ExtractDependencyType<typeof LOGGER_TOKEN>;
|
|
17
|
+
commandLineRunner: ExtractDependencyType<typeof COMMAND_LINE_RUNNER_TOKEN>;
|
|
18
|
+
beforeInit: ExtractDependencyType<typeof WEB_FASTIFY_APP_BEFORE_INIT_TOKEN>;
|
|
19
|
+
limiterRequest: ExtractDependencyType<typeof WEB_FASTIFY_APP_LIMITER_TOKEN>;
|
|
20
|
+
init: ExtractDependencyType<typeof WEB_FASTIFY_APP_INIT_TOKEN>;
|
|
21
|
+
afterInit: ExtractDependencyType<typeof WEB_FASTIFY_APP_AFTER_INIT_TOKEN>;
|
|
22
|
+
expressBeforeInit: ExtractDependencyType<typeof WEB_APP_BEFORE_INIT_TOKEN>;
|
|
23
|
+
expressInit: ExtractDependencyType<typeof WEB_APP_INIT_TOKEN>;
|
|
24
|
+
expressAfterInit: ExtractDependencyType<typeof WEB_APP_AFTER_INIT_TOKEN>;
|
|
25
|
+
expressLimiterRequest: ExtractDependencyType<typeof WEB_APP_LIMITER_TOKEN>;
|
|
26
|
+
beforeError: ExtractDependencyType<typeof WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN>;
|
|
27
|
+
processError: ExtractDependencyType<typeof WEB_FASTIFY_APP_PROCESS_ERROR_TOKEN>;
|
|
28
|
+
afterError: ExtractDependencyType<typeof WEB_FASTIFY_APP_AFTER_ERROR_TOKEN>;
|
|
28
29
|
}) => () => Promise<void>;
|
package/lib/server.es.js
CHANGED
|
@@ -588,7 +588,7 @@ ServerGracefulShutdownModule = __decorate([
|
|
|
588
588
|
provide({
|
|
589
589
|
provide: WEB_FASTIFY_APP_BEFORE_INIT_TOKEN,
|
|
590
590
|
multi: true,
|
|
591
|
-
useFactory: ({ app, server, logger, commandLineRunner, livenessProbe, readinessProbe
|
|
591
|
+
useFactory: ({ app, server, logger, commandLineRunner, livenessProbe, readinessProbe }) => {
|
|
592
592
|
const log = logger('server');
|
|
593
593
|
return function serverListen() {
|
|
594
594
|
createTerminus(server, app, {
|
package/lib/server.js
CHANGED
|
@@ -613,7 +613,7 @@ ServerGracefulShutdownModule = tslib.__decorate([
|
|
|
613
613
|
core.provide({
|
|
614
614
|
provide: tokensServerPrivate.WEB_FASTIFY_APP_BEFORE_INIT_TOKEN,
|
|
615
615
|
multi: true,
|
|
616
|
-
useFactory: ({ app, server, logger, commandLineRunner, livenessProbe, readinessProbe
|
|
616
|
+
useFactory: ({ app, server, logger, commandLineRunner, livenessProbe, readinessProbe }) => {
|
|
617
617
|
const log = logger('server');
|
|
618
618
|
return function serverListen() {
|
|
619
619
|
terminus.createTerminus(server, app, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/module-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"browser": "lib/browser.js",
|
|
6
6
|
"main": "lib/server.js",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"@tinkoff/monkeypatch": "1.3.5",
|
|
24
24
|
"@tinkoff/terminus": "0.0.5",
|
|
25
25
|
"@tinkoff/url": "0.7.39",
|
|
26
|
-
"@tramvai/module-cache-warmup": "2.
|
|
27
|
-
"@tramvai/module-metrics": "2.
|
|
28
|
-
"@tramvai/papi": "2.
|
|
29
|
-
"@tramvai/tokens-server": "2.
|
|
30
|
-
"@tramvai/tokens-server-private": "2.
|
|
26
|
+
"@tramvai/module-cache-warmup": "2.2.3",
|
|
27
|
+
"@tramvai/module-metrics": "2.2.3",
|
|
28
|
+
"@tramvai/papi": "2.2.3",
|
|
29
|
+
"@tramvai/tokens-server": "2.2.3",
|
|
30
|
+
"@tramvai/tokens-server-private": "2.2.3",
|
|
31
31
|
"compression": "^1.7.4",
|
|
32
32
|
"express": "^4.17.1",
|
|
33
33
|
"fastify": "^3.29.0",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"http-proxy-middleware": "^2.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@tinkoff/dippy": "0.7.
|
|
41
|
+
"@tinkoff/dippy": "0.7.43",
|
|
42
42
|
"@tinkoff/utils": "^2.1.2",
|
|
43
|
-
"@tramvai/cli": "2.
|
|
44
|
-
"@tramvai/core": "2.
|
|
45
|
-
"@tramvai/module-common": "2.
|
|
46
|
-
"@tramvai/module-environment": "2.
|
|
47
|
-
"@tramvai/tokens-common": "2.
|
|
43
|
+
"@tramvai/cli": "2.2.3",
|
|
44
|
+
"@tramvai/core": "2.2.3",
|
|
45
|
+
"@tramvai/module-common": "2.2.3",
|
|
46
|
+
"@tramvai/module-environment": "2.2.3",
|
|
47
|
+
"@tramvai/tokens-common": "2.2.3",
|
|
48
48
|
"tslib": "^2.0.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|