@opra/core 0.25.1 → 0.25.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/cjs/adapter/endpoint-context.js +1 -1
- package/cjs/adapter/execution-context.host.js +1 -1
- package/esm/adapter/endpoint-context.js +1 -1
- package/esm/adapter/execution-context.host.js +1 -1
- package/package.json +2 -2
- package/types/adapter/execution-context.d.ts +2 -2
- package/types/adapter/execution-context.host.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { HttpServerRequest } from './http/http-server-request';
|
|
2
2
|
import type { HttpServerResponse } from './http/http-server-response';
|
|
3
3
|
import type { Protocol } from './platform-adapter';
|
|
4
|
-
export interface ExecutionContext<
|
|
4
|
+
export interface ExecutionContext<TSession extends {} = {}> {
|
|
5
5
|
readonly protocol: Protocol;
|
|
6
6
|
readonly platform: string;
|
|
7
|
-
|
|
7
|
+
session: TSession;
|
|
8
8
|
errors: Error[];
|
|
9
9
|
switchToHttp(): HttpMessageContext;
|
|
10
10
|
switchToWs(): WsMessageContext;
|
|
@@ -4,7 +4,7 @@ import type { HttpServerResponse } from './/http/http-server-response.js';
|
|
|
4
4
|
import type { ExecutionContext, HttpMessageContext, RpcMessageContext, WsMessageContext } from './execution-context.js';
|
|
5
5
|
import type { HttpServerRequest } from './http/http-server-request.js';
|
|
6
6
|
import { Protocol } from './platform-adapter.js';
|
|
7
|
-
export declare class ExecutionContextHost<
|
|
7
|
+
export declare class ExecutionContextHost<TSession extends {} = {}> extends AsyncEventEmitter implements ExecutionContext<TSession> {
|
|
8
8
|
readonly api: ApiDocument;
|
|
9
9
|
readonly platform: string;
|
|
10
10
|
readonly protocol: Protocol;
|
|
@@ -12,7 +12,7 @@ export declare class ExecutionContextHost<TSpace extends {} = {}> extends AsyncE
|
|
|
12
12
|
readonly ws?: WsMessageContext;
|
|
13
13
|
readonly rpc?: RpcMessageContext;
|
|
14
14
|
errors: Error[];
|
|
15
|
-
|
|
15
|
+
session: TSession;
|
|
16
16
|
constructor(api: ApiDocument, platform: string, protocol: {
|
|
17
17
|
http?: {
|
|
18
18
|
incoming: HttpServerRequest;
|