@zhin.js/middleware 1.1.12 → 1.1.13
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/middleware-index.js
CHANGED
|
@@ -42,7 +42,7 @@ export class MiddlewareIndex {
|
|
|
42
42
|
return terminal();
|
|
43
43
|
const authorInput = bindOperationInput(input, record.owner, operationSnapshot);
|
|
44
44
|
const context = {
|
|
45
|
-
...createCapabilityContext(operationSnapshot, record.owner, undefined, readOperationSession(authorInput, record.adapter)?.signal),
|
|
45
|
+
...createCapabilityContext({ snapshot: operationSnapshot, ownerId: record.owner, admission: undefined, signal: readOperationSession(authorInput, record.adapter)?.signal }),
|
|
46
46
|
input: authorInput,
|
|
47
47
|
};
|
|
48
48
|
Object.defineProperty(context, 'session', {
|
|
@@ -76,7 +76,7 @@ export class MiddlewareIndex {
|
|
|
76
76
|
throw new Error('Invalid inbound Middleware');
|
|
77
77
|
const authorInput = bindOperationInput(input, record.owner, operationSnapshot);
|
|
78
78
|
const context = {
|
|
79
|
-
...createCapabilityContext(operationSnapshot, record.owner, undefined, readOperationSession(authorInput, record.adapter)?.signal), input: authorInput,
|
|
79
|
+
...createCapabilityContext({ snapshot: operationSnapshot, ownerId: record.owner, admission: undefined, signal: readOperationSession(authorInput, record.adapter)?.signal }), input: authorInput,
|
|
80
80
|
};
|
|
81
81
|
Object.defineProperty(context, 'session', {
|
|
82
82
|
enumerable: true, get: () => readOperationSession(authorInput, record.adapter),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/middleware",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "Convention-based Middleware Feature for Zhin Plugin Runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"src"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@zhin.js/feature-kit": "1.1.
|
|
20
|
-
"@zhin.js/plugin-runtime": "1.1.
|
|
19
|
+
"@zhin.js/feature-kit": "1.1.12",
|
|
20
|
+
"@zhin.js/plugin-runtime": "1.1.20"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^26.1.2",
|
package/src/middleware-index.ts
CHANGED
|
@@ -96,7 +96,7 @@ export class MiddlewareIndex {
|
|
|
96
96
|
if (!record) return terminal();
|
|
97
97
|
const authorInput = bindOperationInput(input, record.owner, operationSnapshot);
|
|
98
98
|
const context = {
|
|
99
|
-
...createCapabilityContext(operationSnapshot, record.owner, undefined, readOperationSession(authorInput, record.adapter)?.signal),
|
|
99
|
+
...createCapabilityContext({ snapshot: operationSnapshot, ownerId: record.owner, admission: undefined, signal: readOperationSession(authorInput, record.adapter)?.signal }),
|
|
100
100
|
input: authorInput,
|
|
101
101
|
} as MiddlewareContext<TInput>;
|
|
102
102
|
Object.defineProperty(context, 'session', {
|
|
@@ -132,7 +132,7 @@ export class MiddlewareIndex {
|
|
|
132
132
|
if (definition.target !== 'inbound') throw new Error('Invalid inbound Middleware');
|
|
133
133
|
const authorInput = bindOperationInput(input, record.owner, operationSnapshot);
|
|
134
134
|
const context = {
|
|
135
|
-
...createCapabilityContext(operationSnapshot, record.owner, undefined, readOperationSession(authorInput, record.adapter)?.signal), input: authorInput,
|
|
135
|
+
...createCapabilityContext({ snapshot: operationSnapshot, ownerId: record.owner, admission: undefined, signal: readOperationSession(authorInput, record.adapter)?.signal }), input: authorInput,
|
|
136
136
|
} as MiddlewareContext<TInput>;
|
|
137
137
|
Object.defineProperty(context, 'session', {
|
|
138
138
|
enumerable: true, get: () => readOperationSession(authorInput, record.adapter),
|