@fluojs/runtime 2.0.1 → 3.0.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.
Files changed (127) hide show
  1. package/README.ko.md +278 -20
  2. package/README.md +278 -20
  3. package/dist/adapters/internal-request-response-factory.d.ts +1 -1
  4. package/dist/adapters/internal-request-response-factory.d.ts.map +1 -1
  5. package/dist/adapters/internal-request-response-factory.js +1 -1
  6. package/dist/adapters/request-response-factory.d.ts +20 -1
  7. package/dist/adapters/request-response-factory.d.ts.map +1 -1
  8. package/dist/adapters/request-response-factory.js +75 -22
  9. package/dist/bootstrap.d.ts +3 -9
  10. package/dist/bootstrap.d.ts.map +1 -1
  11. package/dist/bootstrap.js +179 -75
  12. package/dist/devtools/contracts.d.ts +3 -135
  13. package/dist/devtools/contracts.d.ts.map +1 -1
  14. package/dist/devtools/index.d.ts +2 -3
  15. package/dist/devtools/index.d.ts.map +1 -1
  16. package/dist/devtools/index.js +1 -2
  17. package/dist/devtools/snapshot.d.ts +1 -1
  18. package/dist/devtools/snapshot.d.ts.map +1 -1
  19. package/dist/devtools/snapshot.js +18 -17
  20. package/dist/devtools/studio-request-observer.d.ts +14 -0
  21. package/dist/devtools/studio-request-observer.d.ts.map +1 -0
  22. package/dist/devtools/studio-request-observer.js +112 -0
  23. package/dist/devtools/studio-runtime-config.d.ts +25 -0
  24. package/dist/devtools/studio-runtime-config.d.ts.map +1 -0
  25. package/dist/devtools/studio-runtime-config.js +59 -0
  26. package/dist/devtools/studio-runtime.d.ts +12 -18
  27. package/dist/devtools/studio-runtime.d.ts.map +1 -1
  28. package/dist/devtools/studio-runtime.js +25 -169
  29. package/dist/errors.d.ts +26 -0
  30. package/dist/errors.d.ts.map +1 -1
  31. package/dist/errors.js +38 -0
  32. package/dist/health/health.d.ts +6 -2
  33. package/dist/health/health.d.ts.map +1 -1
  34. package/dist/health/health.js +3 -2
  35. package/dist/http-adapter-shared.d.ts +1 -1
  36. package/dist/http-adapter-shared.d.ts.map +1 -1
  37. package/dist/http-adapter-shared.js +1 -1
  38. package/dist/index.d.ts +6 -3
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +4 -1
  41. package/dist/internal/route-inspection-metadata.d.ts +30 -0
  42. package/dist/internal/route-inspection-metadata.d.ts.map +1 -0
  43. package/dist/internal/route-inspection-metadata.js +68 -0
  44. package/dist/internal.d.ts +6 -1
  45. package/dist/internal.d.ts.map +1 -1
  46. package/dist/internal.js +4 -1
  47. package/dist/module-definition.d.ts +10 -0
  48. package/dist/module-definition.d.ts.map +1 -0
  49. package/dist/module-definition.js +12 -0
  50. package/dist/module-graph.d.ts +41 -0
  51. package/dist/module-graph.d.ts.map +1 -1
  52. package/dist/module-graph.js +108 -13
  53. package/dist/multipart.d.ts +67 -3
  54. package/dist/multipart.d.ts.map +1 -1
  55. package/dist/multipart.js +665 -103
  56. package/dist/platform-component-registry.d.ts +9 -0
  57. package/dist/platform-component-registry.d.ts.map +1 -0
  58. package/dist/platform-component-registry.js +70 -0
  59. package/dist/platform-diagnostic-retention.d.ts +13 -0
  60. package/dist/platform-diagnostic-retention.d.ts.map +1 -0
  61. package/dist/platform-diagnostic-retention.js +43 -0
  62. package/dist/platform-shell-probe-reports.d.ts +8 -0
  63. package/dist/platform-shell-probe-reports.d.ts.map +1 -0
  64. package/dist/platform-shell-probe-reports.js +95 -0
  65. package/dist/platform-shell-probes.d.ts +16 -0
  66. package/dist/platform-shell-probes.d.ts.map +1 -0
  67. package/dist/platform-shell-probes.js +141 -0
  68. package/dist/platform-shell.d.ts +7 -13
  69. package/dist/platform-shell.d.ts.map +1 -1
  70. package/dist/platform-shell.js +58 -310
  71. package/dist/retryable-shutdown.d.ts +7 -0
  72. package/dist/retryable-shutdown.d.ts.map +1 -0
  73. package/dist/retryable-shutdown.js +20 -0
  74. package/dist/route-inspection.d.ts +56 -0
  75. package/dist/route-inspection.d.ts.map +1 -0
  76. package/dist/route-inspection.js +80 -0
  77. package/dist/tokens.d.ts +6 -4
  78. package/dist/tokens.d.ts.map +1 -1
  79. package/dist/tokens.js +5 -0
  80. package/dist/types.d.ts +53 -8
  81. package/dist/types.d.ts.map +1 -1
  82. package/dist/web.d.ts +22 -3
  83. package/dist/web.d.ts.map +1 -1
  84. package/dist/web.js +80 -34
  85. package/package.json +13 -26
  86. package/dist/internal-node.d.ts +0 -2
  87. package/dist/internal-node.d.ts.map +0 -1
  88. package/dist/internal-node.js +0 -1
  89. package/dist/logging/json-logger.d.ts +0 -8
  90. package/dist/logging/json-logger.d.ts.map +0 -1
  91. package/dist/logging/json-logger.js +0 -45
  92. package/dist/logging/logger.d.ts +0 -37
  93. package/dist/logging/logger.d.ts.map +0 -1
  94. package/dist/logging/logger.js +0 -103
  95. package/dist/node/internal-node-compression.d.ts +0 -22
  96. package/dist/node/internal-node-compression.d.ts.map +0 -1
  97. package/dist/node/internal-node-compression.js +0 -84
  98. package/dist/node/internal-node-request.d.ts +0 -162
  99. package/dist/node/internal-node-request.d.ts.map +0 -1
  100. package/dist/node/internal-node-request.js +0 -478
  101. package/dist/node/internal-node-response.d.ts +0 -28
  102. package/dist/node/internal-node-response.d.ts.map +0 -1
  103. package/dist/node/internal-node-response.js +0 -205
  104. package/dist/node/internal-node-shutdown.d.ts +0 -34
  105. package/dist/node/internal-node-shutdown.d.ts.map +0 -1
  106. package/dist/node/internal-node-shutdown.js +0 -83
  107. package/dist/node/internal-node.d.ts +0 -111
  108. package/dist/node/internal-node.d.ts.map +0 -1
  109. package/dist/node/internal-node.js +0 -283
  110. package/dist/node/node-compression.d.ts +0 -2
  111. package/dist/node/node-compression.d.ts.map +0 -1
  112. package/dist/node/node-compression.js +0 -1
  113. package/dist/node/node-request.d.ts +0 -2
  114. package/dist/node/node-request.d.ts.map +0 -1
  115. package/dist/node/node-request.js +0 -1
  116. package/dist/node/node-response.d.ts +0 -2
  117. package/dist/node/node-response.d.ts.map +0 -1
  118. package/dist/node/node-response.js +0 -1
  119. package/dist/node/node-shutdown.d.ts +0 -2
  120. package/dist/node/node-shutdown.d.ts.map +0 -1
  121. package/dist/node/node-shutdown.js +0 -1
  122. package/dist/node/node.d.ts +0 -2
  123. package/dist/node/node.d.ts.map +0 -1
  124. package/dist/node/node.js +0 -1
  125. package/dist/node.d.ts +0 -5
  126. package/dist/node.d.ts.map +0 -1
  127. package/dist/node.js +0 -3
@@ -1,205 +0,0 @@
1
- import { createErrorResponse, HttpException, InternalServerErrorException } from '@fluojs/http';
2
-
3
- /**
4
- * Defines the mutable framework response type.
5
- */
6
-
7
- function createFrameworkResponseStream(response) {
8
- return {
9
- close() {
10
- if (!response.writableEnded) {
11
- response.end();
12
- }
13
- },
14
- get closed() {
15
- return response.writableEnded;
16
- },
17
- flush() {
18
- response.flushHeaders?.();
19
- },
20
- onClose(listener) {
21
- response.on('close', listener);
22
- return () => {
23
- response.removeListener('close', listener);
24
- };
25
- },
26
- waitForDrain() {
27
- if (response.writableEnded || response.destroyed) {
28
- return Promise.resolve();
29
- }
30
- return new Promise(resolve => {
31
- const settle = () => {
32
- response.removeListener('drain', settle);
33
- response.removeListener('close', settle);
34
- response.removeListener('error', settle);
35
- resolve();
36
- };
37
- response.once('drain', settle);
38
- response.once('close', settle);
39
- response.once('error', settle);
40
- });
41
- },
42
- write(chunk) {
43
- return response.write(chunk);
44
- }
45
- };
46
- }
47
-
48
- /**
49
- * Create framework response.
50
- *
51
- * @param response The response.
52
- * @param compression The compression.
53
- * @returns The create framework response result.
54
- */
55
- export function createFrameworkResponse(response, compression) {
56
- let activeStream;
57
- const resolveCompression = (() => {
58
- const factory = typeof compression === 'function' ? compression : () => compression;
59
- let resolved = false;
60
- let value;
61
- return () => {
62
- if (!resolved) {
63
- value = factory();
64
- resolved = true;
65
- }
66
- return value;
67
- };
68
- })();
69
- const mergeSetCookieHeader = (current, incoming) => {
70
- const nextValues = Array.isArray(incoming) ? incoming : [incoming];
71
- if (current === undefined) {
72
- return nextValues.length === 1 ? nextValues[0] : [...nextValues];
73
- }
74
- if (typeof current === 'number') {
75
- return nextValues.length === 1 ? nextValues[0] : [...nextValues];
76
- }
77
- const currentValues = Array.isArray(current) ? current : [current];
78
- const merged = [...currentValues, ...nextValues];
79
- return merged.length === 1 ? merged[0] : merged;
80
- };
81
- const frameworkResponse = {
82
- committed: response.headersSent || response.writableEnded,
83
- headers: {},
84
- raw: response,
85
- get stream() {
86
- activeStream ??= createFrameworkResponseStream(response);
87
- return activeStream;
88
- },
89
- redirect(status, location) {
90
- this.setStatus(status);
91
- this.setHeader('Location', location);
92
- void this.send(undefined);
93
- },
94
- send(body) {
95
- if (response.writableEnded) {
96
- this.committed = true;
97
- return;
98
- }
99
- const existingContentType = response.getHeader('Content-Type');
100
- const serialized = serializeResponseBody(body, typeof existingContentType === 'string' ? existingContentType : undefined);
101
- if (!response.hasHeader('Content-Type') && serialized.defaultContentType) {
102
- response.setHeader('Content-Type', serialized.defaultContentType);
103
- }
104
- const contentType = response.getHeader('Content-Type');
105
- const payload = typeof serialized.payload === 'string' ? Buffer.from(serialized.payload, 'utf8') : serialized.payload;
106
- const activeCompression = resolveCompression();
107
- if (activeCompression) {
108
- this.committed = true;
109
- return Promise.resolve(activeCompression.write(payload, {
110
- contentType
111
- })).then(handled => {
112
- if (!handled && !response.writableEnded) {
113
- response.end(payload);
114
- }
115
- }).catch(() => {
116
- if (!response.writableEnded) {
117
- response.end();
118
- }
119
- });
120
- }
121
- response.end(payload);
122
- this.committed = true;
123
- },
124
- setHeader(name, value) {
125
- const headers = this.headers;
126
- const lowerName = name.toLowerCase();
127
- if (lowerName === 'set-cookie') {
128
- const merged = mergeSetCookieHeader(response.getHeader(name), value);
129
- response.setHeader(name, merged);
130
- headers[name] = merged;
131
- return;
132
- }
133
- response.setHeader(name, value);
134
- headers[name] = value;
135
- },
136
- setStatus(code) {
137
- response.statusCode = code;
138
- this.statusCode = code;
139
- this.statusSet = true;
140
- },
141
- statusCode: undefined,
142
- statusSet: false
143
- };
144
- return frameworkResponse;
145
- }
146
-
147
- /**
148
- * Write node adapter error response.
149
- *
150
- * @param error The error.
151
- * @param response The response.
152
- * @param requestId The request id.
153
- * @returns The write node adapter error response result.
154
- */
155
- export async function writeNodeAdapterErrorResponse(error, response, requestId) {
156
- const httpError = toHttpException(error);
157
- response.setStatus(httpError.status);
158
- await response.send(createErrorResponse(httpError, requestId));
159
- }
160
- function serializeResponseBody(body, contentType) {
161
- if (body === undefined) {
162
- return {
163
- payload: ''
164
- };
165
- }
166
- if (Buffer.isBuffer(body)) {
167
- return {
168
- defaultContentType: 'application/octet-stream',
169
- payload: body
170
- };
171
- }
172
- if (body instanceof Uint8Array) {
173
- return {
174
- defaultContentType: 'application/octet-stream',
175
- payload: Buffer.from(body)
176
- };
177
- }
178
- if (body instanceof ArrayBuffer) {
179
- return {
180
- defaultContentType: 'application/octet-stream',
181
- payload: Buffer.from(body)
182
- };
183
- }
184
- if (typeof body === 'string') {
185
- return {
186
- defaultContentType: isJsonContentType(contentType) ? undefined : 'text/plain; charset=utf-8',
187
- payload: isJsonContentType(contentType) ? JSON.stringify(body) : body
188
- };
189
- }
190
- return {
191
- defaultContentType: 'application/json; charset=utf-8',
192
- payload: JSON.stringify(body)
193
- };
194
- }
195
- function isJsonContentType(contentType) {
196
- return typeof contentType === 'string' && contentType.toLowerCase().includes('application/json');
197
- }
198
- function toHttpException(error) {
199
- if (error instanceof HttpException) {
200
- return error;
201
- }
202
- return new InternalServerErrorException('Internal server error.', {
203
- cause: error
204
- });
205
- }
@@ -1,34 +0,0 @@
1
- import type { Application, ApplicationLogger } from '../types.js';
2
- import type { HttpAdapterShutdownRegistration } from '../http-adapter-shared.js';
3
- type NodeShutdownSignal = 'SIGINT' | 'SIGTERM';
4
- /**
5
- * Returns the default POSIX shutdown signals used by Node-hosted runtime helpers.
6
- *
7
- * @returns The ordered list of signals that trigger graceful shutdown registration.
8
- */
9
- export declare function defaultNodeShutdownSignals(): readonly NodeShutdownSignal[];
10
- /**
11
- * Creates shutdown registration logic for Node-hosted adapters.
12
- *
13
- * The returned registration preserves graceful shutdown semantics while leaving
14
- * final process termination ownership to the surrounding host/runtime.
15
- *
16
- * @param signals Signals to register, or `false` to disable signal handling.
17
- * @returns Registration callback consumed by HTTP adapter startup helpers.
18
- */
19
- export declare function createNodeShutdownSignalRegistration(signals?: false | readonly NodeShutdownSignal[]): HttpAdapterShutdownRegistration;
20
- /**
21
- * Registers process signal handlers that attempt graceful shutdown.
22
- *
23
- * When the shutdown timeout elapses, the helper records failure via logging and
24
- * `process.exitCode` but does not terminate the host process directly.
25
- *
26
- * @param app Application instance to close when a signal arrives.
27
- * @param logger Logger used for shutdown diagnostics.
28
- * @param signals Signals to bind, or `false` to skip registration.
29
- * @param forceExitTimeoutMs Timeout window used to mark shutdown as failed.
30
- * @returns Unregister callback that removes the installed signal handlers.
31
- */
32
- export declare function registerShutdownSignals(app: Application, logger: ApplicationLogger, signals: false | readonly NodeShutdownSignal[], forceExitTimeoutMs?: number): () => void;
33
- export {};
34
- //# sourceMappingURL=internal-node-shutdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internal-node-shutdown.d.ts","sourceRoot":"","sources":["../../src/node/internal-node-shutdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAEjF,KAAK,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAI/C;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,SAAS,kBAAkB,EAAE,CAE1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oCAAoC,CAClD,OAAO,GAAE,KAAK,GAAG,SAAS,kBAAkB,EAAiC,GAC5E,+BAA+B,CAOjC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,KAAK,GAAG,SAAS,kBAAkB,EAAE,EAC9C,kBAAkB,GAAE,MAAsC,GACzD,MAAM,IAAI,CAqBZ"}
@@ -1,83 +0,0 @@
1
- const DEFAULT_FORCE_EXIT_TIMEOUT_MS = 30_000;
2
-
3
- /**
4
- * Returns the default POSIX shutdown signals used by Node-hosted runtime helpers.
5
- *
6
- * @returns The ordered list of signals that trigger graceful shutdown registration.
7
- */
8
- export function defaultNodeShutdownSignals() {
9
- return ['SIGINT', 'SIGTERM'];
10
- }
11
-
12
- /**
13
- * Creates shutdown registration logic for Node-hosted adapters.
14
- *
15
- * The returned registration preserves graceful shutdown semantics while leaving
16
- * final process termination ownership to the surrounding host/runtime.
17
- *
18
- * @param signals Signals to register, or `false` to disable signal handling.
19
- * @returns Registration callback consumed by HTTP adapter startup helpers.
20
- */
21
- export function createNodeShutdownSignalRegistration(signals = defaultNodeShutdownSignals()) {
22
- return (app, logger, forceExitTimeoutMs) => registerShutdownSignals(app, logger, signals, forceExitTimeoutMs);
23
- }
24
-
25
- /**
26
- * Registers process signal handlers that attempt graceful shutdown.
27
- *
28
- * When the shutdown timeout elapses, the helper records failure via logging and
29
- * `process.exitCode` but does not terminate the host process directly.
30
- *
31
- * @param app Application instance to close when a signal arrives.
32
- * @param logger Logger used for shutdown diagnostics.
33
- * @param signals Signals to bind, or `false` to skip registration.
34
- * @param forceExitTimeoutMs Timeout window used to mark shutdown as failed.
35
- * @returns Unregister callback that removes the installed signal handlers.
36
- */
37
- export function registerShutdownSignals(app, logger, signals, forceExitTimeoutMs = DEFAULT_FORCE_EXIT_TIMEOUT_MS) {
38
- if (signals === false) {
39
- return () => {};
40
- }
41
- const bindings = [];
42
- for (const signal of signals) {
43
- const handler = () => {
44
- void closeFromSignal(app, logger, signal, forceExitTimeoutMs);
45
- };
46
- bindings.push({
47
- signal,
48
- handler
49
- });
50
- process.once(signal, handler);
51
- }
52
- return () => {
53
- for (const binding of bindings) {
54
- process.off(binding.signal, binding.handler);
55
- }
56
- };
57
- }
58
- async function closeFromSignal(app, logger, signal, forceExitTimeoutMs) {
59
- if (app.state === 'closed') {
60
- process.exitCode = 0;
61
- return;
62
- }
63
- let timedOut = false;
64
- const forceExitTimer = setTimeout(() => {
65
- timedOut = true;
66
- logger.error(`Shutdown timeout exceeded after ${String(forceExitTimeoutMs)}ms; leaving process termination to the host.`, undefined, 'FluoFactory');
67
- process.exitCode = 1;
68
- }, forceExitTimeoutMs);
69
- if (forceExitTimer.unref) {
70
- forceExitTimer.unref();
71
- }
72
- try {
73
- await app.close(signal);
74
- clearTimeout(forceExitTimer);
75
- if (!timedOut) {
76
- process.exitCode = 0;
77
- }
78
- } catch (error) {
79
- clearTimeout(forceExitTimer);
80
- logger.error('Failed to shut down the application cleanly.', error, 'FluoFactory');
81
- process.exitCode = 1;
82
- }
83
- }
@@ -1,111 +0,0 @@
1
- import { createServer as createHttpServer } from 'node:http';
2
- import { createServer as createHttpsServer, type ServerOptions as HttpsServerOptions } from 'node:https';
3
- import { type CorsOptions, type Dispatcher, type HttpApplicationAdapter, type MiddlewareLike, type SecurityHeadersOptions } from '@fluojs/http';
4
- import type { MultipartOptions } from '../multipart.js';
5
- import type { Application, ApplicationLogger, CreateApplicationOptions, ModuleType } from '../types.js';
6
- import { compressNodeResponse, createNodeResponseCompression } from './internal-node-compression.js';
7
- import { cloneHeaderValue, cloneRequestHeaders, createDeferredFrameworkRequestShell, createMemoizedAsyncValue, createMemoizedValue, createRequestSignal, normalizePrimaryContentType, parseCookieHeader, parseQueryParamsFromSearch, readPrimaryHeaderValue, resolveAbsoluteRequestUrl, resolveRequestIdFromHeaders, snapshotSimpleQueryRecord, splitRawRequestUrl } from './internal-node-request.js';
8
- import { createNodeShutdownSignalRegistration, defaultNodeShutdownSignals, registerShutdownSignals } from './internal-node-shutdown.js';
9
- /**
10
- * Describes the node http adapter options contract.
11
- */
12
- export interface NodeHttpAdapterOptions {
13
- host?: string;
14
- https?: HttpsServerOptions;
15
- maxBodySize?: number;
16
- port?: number;
17
- rawBody?: boolean;
18
- retryDelayMs?: number;
19
- retryLimit?: number;
20
- shutdownTimeoutMs?: number;
21
- }
22
- /**
23
- * Defines the node application signal type.
24
- */
25
- export type NodeApplicationSignal = 'SIGINT' | 'SIGTERM';
26
- /**
27
- * Defines the cors input type.
28
- */
29
- export type CorsInput = false | string | string[] | CorsOptions;
30
- /**
31
- * Describes the bootstrap node application options contract.
32
- */
33
- export interface BootstrapNodeApplicationOptions extends Omit<CreateApplicationOptions, 'adapter' | 'logger' | 'middleware'> {
34
- compression?: boolean;
35
- cors?: CorsInput;
36
- globalPrefix?: string;
37
- globalPrefixExclude?: readonly string[];
38
- host?: string;
39
- https?: HttpsServerOptions;
40
- logger?: ApplicationLogger;
41
- maxBodySize?: number;
42
- middleware?: MiddlewareLike[];
43
- multipart?: MultipartOptions;
44
- port?: number;
45
- rawBody?: boolean;
46
- retryDelayMs?: number;
47
- retryLimit?: number;
48
- securityHeaders?: false | SecurityHeadersOptions;
49
- shutdownTimeoutMs?: number;
50
- }
51
- /**
52
- * Describes the run node application options contract.
53
- */
54
- export interface RunNodeApplicationOptions extends BootstrapNodeApplicationOptions {
55
- forceExitTimeoutMs?: number;
56
- shutdownSignals?: false | readonly NodeApplicationSignal[];
57
- }
58
- interface NodeListenTarget {
59
- bindTarget: string;
60
- url: string;
61
- }
62
- type NodeServer = ReturnType<typeof createHttpServer> | ReturnType<typeof createHttpsServer>;
63
- /**
64
- * Represents the node http application adapter.
65
- */
66
- export declare class NodeHttpApplicationAdapter implements HttpApplicationAdapter {
67
- private readonly port;
68
- private readonly host;
69
- private readonly retryDelayMs;
70
- private readonly retryLimit;
71
- private readonly httpsOptions;
72
- private readonly shutdownTimeoutMs;
73
- private readonly server;
74
- private dispatcher?;
75
- private readonly requestResponseFactory;
76
- private readonly sockets;
77
- constructor(port: number, host: string | undefined, retryDelayMs: number | undefined, retryLimit: number | undefined, compression: boolean | undefined, httpsOptions: HttpsServerOptions | undefined, multipartOptions?: MultipartOptions, maxBodySize?: number, preserveRawBody?: boolean, shutdownTimeoutMs?: number);
78
- getServer(): NodeServer;
79
- getRealtimeCapability(): import("@fluojs/http").ServerBackedHttpAdapterRealtimeCapability;
80
- getListenTarget(): NodeListenTarget;
81
- listen(dispatcher: Dispatcher): Promise<void>;
82
- close(): Promise<void>;
83
- private handleRequest;
84
- }
85
- /**
86
- * Create node http adapter.
87
- *
88
- * @param options The options.
89
- * @param compression The compression.
90
- * @param multipartOptions The multipart options.
91
- * @returns The create node http adapter result.
92
- */
93
- export declare function createNodeHttpAdapter(options?: NodeHttpAdapterOptions, compression?: boolean, multipartOptions?: MultipartOptions): HttpApplicationAdapter;
94
- /**
95
- * Bootstrap node application.
96
- *
97
- * @param rootModule The root module.
98
- * @param options The options.
99
- * @returns The bootstrap node application result.
100
- */
101
- export declare function bootstrapNodeApplication(rootModule: ModuleType, options: BootstrapNodeApplicationOptions): Promise<Application>;
102
- /**
103
- * Run node application.
104
- *
105
- * @param rootModule The root module.
106
- * @param options The options.
107
- * @returns The run node application result.
108
- */
109
- export declare function runNodeApplication(rootModule: ModuleType, options: RunNodeApplicationOptions): Promise<Application>;
110
- export { cloneHeaderValue, cloneRequestHeaders, compressNodeResponse, createDeferredFrameworkRequestShell, createMemoizedAsyncValue, createMemoizedValue, createNodeResponseCompression, createNodeShutdownSignalRegistration, createRequestSignal, defaultNodeShutdownSignals, normalizePrimaryContentType, parseCookieHeader, parseQueryParamsFromSearch, readPrimaryHeaderValue, registerShutdownSignals, resolveAbsoluteRequestUrl, resolveRequestIdFromHeaders, snapshotSimpleQueryRecord, splitRawRequestUrl, };
111
- //# sourceMappingURL=internal-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internal-node.d.ts","sourceRoot":"","sources":["../../src/node/internal-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAA6C,MAAM,WAAW,CAAC;AACxG,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,KAAK,aAAa,IAA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