@tramvai/tokens-server-private 2.132.1 → 2.133.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/lib/index.d.ts CHANGED
@@ -127,4 +127,12 @@ export declare const EARLY_HINTS_MANAGER_TOKEN: EarlyHintsManager & {
127
127
  export interface EarlyHintsManager {
128
128
  flushHints(): Promise<void>;
129
129
  }
130
+ /**
131
+ * @description
132
+ * Subscription to papi initialization.
133
+ * It is called before papi routes registration
134
+ */
135
+ export declare const PAPI_FASTIFY_INIT_TOKEN: FASTIFY_APP_INIT_HANDLER & {
136
+ __type?: "multi token" | undefined;
137
+ };
130
138
  export {};
package/lib/index.es.js CHANGED
@@ -80,5 +80,13 @@ const PAPI_EXECUTOR = createToken('papi executor');
80
80
  * and writes it to the TCP socket directly
81
81
  */
82
82
  const EARLY_HINTS_MANAGER_TOKEN = createToken('earlyHintsManager');
83
+ /**
84
+ * @description
85
+ * Subscription to papi initialization.
86
+ * It is called before papi routes registration
87
+ */
88
+ const PAPI_FASTIFY_INIT_TOKEN = createToken('papi fastify init', {
89
+ multi: true,
90
+ });
83
91
 
84
- export { EARLY_HINTS_MANAGER_TOKEN, FASTIFY_REQUEST, FASTIFY_RESPONSE, PAPI_EXECUTOR, SERVER_FACTORY_TOKEN, UTILITY_SERVER_TOKEN, UTILITY_WEB_FASTIFY_APP_TOKEN, WEB_FASTIFY_APP_AFTER_ERROR_TOKEN, WEB_FASTIFY_APP_AFTER_INIT_TOKEN, WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN, WEB_FASTIFY_APP_BEFORE_INIT_TOKEN, WEB_FASTIFY_APP_FACTORY_TOKEN, WEB_FASTIFY_APP_INIT_TOKEN, WEB_FASTIFY_APP_LIMITER_TOKEN, WEB_FASTIFY_APP_METRICS_TOKEN, WEB_FASTIFY_APP_TOKEN };
92
+ export { EARLY_HINTS_MANAGER_TOKEN, FASTIFY_REQUEST, FASTIFY_RESPONSE, PAPI_EXECUTOR, PAPI_FASTIFY_INIT_TOKEN, SERVER_FACTORY_TOKEN, UTILITY_SERVER_TOKEN, UTILITY_WEB_FASTIFY_APP_TOKEN, WEB_FASTIFY_APP_AFTER_ERROR_TOKEN, WEB_FASTIFY_APP_AFTER_INIT_TOKEN, WEB_FASTIFY_APP_BEFORE_ERROR_TOKEN, WEB_FASTIFY_APP_BEFORE_INIT_TOKEN, WEB_FASTIFY_APP_FACTORY_TOKEN, WEB_FASTIFY_APP_INIT_TOKEN, WEB_FASTIFY_APP_LIMITER_TOKEN, WEB_FASTIFY_APP_METRICS_TOKEN, WEB_FASTIFY_APP_TOKEN };
package/lib/index.js CHANGED
@@ -84,11 +84,20 @@ const PAPI_EXECUTOR = dippy.createToken('papi executor');
84
84
  * and writes it to the TCP socket directly
85
85
  */
86
86
  const EARLY_HINTS_MANAGER_TOKEN = dippy.createToken('earlyHintsManager');
87
+ /**
88
+ * @description
89
+ * Subscription to papi initialization.
90
+ * It is called before papi routes registration
91
+ */
92
+ const PAPI_FASTIFY_INIT_TOKEN = dippy.createToken('papi fastify init', {
93
+ multi: true,
94
+ });
87
95
 
88
96
  exports.EARLY_HINTS_MANAGER_TOKEN = EARLY_HINTS_MANAGER_TOKEN;
89
97
  exports.FASTIFY_REQUEST = FASTIFY_REQUEST;
90
98
  exports.FASTIFY_RESPONSE = FASTIFY_RESPONSE;
91
99
  exports.PAPI_EXECUTOR = PAPI_EXECUTOR;
100
+ exports.PAPI_FASTIFY_INIT_TOKEN = PAPI_FASTIFY_INIT_TOKEN;
92
101
  exports.SERVER_FACTORY_TOKEN = SERVER_FACTORY_TOKEN;
93
102
  exports.UTILITY_SERVER_TOKEN = UTILITY_SERVER_TOKEN;
94
103
  exports.UTILITY_WEB_FASTIFY_APP_TOKEN = UTILITY_WEB_FASTIFY_APP_TOKEN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-server-private",
3
- "version": "2.132.1",
3
+ "version": "2.133.0",
4
4
  "description": "Tramvai private tokens for @tramvai/module-server",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -18,7 +18,7 @@
18
18
  "watch": "tsc -w"
19
19
  },
20
20
  "dependencies": {
21
- "@tramvai/papi": "2.132.1"
21
+ "@tramvai/papi": "2.133.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@tinkoff/dippy": "0.8.15",