lemon-model 5.0.0 → 5.0.1
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.
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @date 2024-12-20 optimized `NextIdentityCognito`
|
|
11
11
|
* @date 2025-05-13 optimized `NextContext` with `Authorization` header
|
|
12
12
|
* @date 2025-06-12 optimized `SearchBody` with `knn` support
|
|
13
|
+
* @date 2026-10-30 v5 B13: `NextContext.channel` and `NextContext.trace` (`NextTrace`).
|
|
13
14
|
*
|
|
14
15
|
* @copyright (C) lemoncloud.io 2019 - All Rights Reserved.
|
|
15
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-types.js","sourceRoot":"","sources":["../../../src/types/core-types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"core-types.js","sourceRoot":"","sources":["../../../src/types/core-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @date 2024-12-20 optimized `NextIdentityCognito`
|
|
11
11
|
* @date 2025-05-13 optimized `NextContext` with `Authorization` header
|
|
12
12
|
* @date 2025-06-12 optimized `SearchBody` with `knn` support
|
|
13
|
+
* @date 2026-10-30 v5 B13: `NextContext.channel` and `NextContext.trace` (`NextTrace`).
|
|
13
14
|
*
|
|
14
15
|
* @copyright (C) lemoncloud.io 2019 - All Rights Reserved.
|
|
15
16
|
*/
|
|
@@ -253,6 +254,43 @@ export interface NextContext<T extends NextIdentity = NextIdentity> {
|
|
|
253
254
|
* calling depth for every handler. ( automatically increased from lambda-handler )
|
|
254
255
|
*/
|
|
255
256
|
depth?: number;
|
|
257
|
+
/**
|
|
258
|
+
* (optional) the channel of this request, set once by the receiving entry (v5 B13).
|
|
259
|
+
* - `external`: a web request with a `host` header (API Gateway, ALB, Function URL).
|
|
260
|
+
* - `internal`: a host-less web event (direct invoke) or a protocol call (relay, SNS, SQS).
|
|
261
|
+
* - `local`: the local express harness (local mode).
|
|
262
|
+
*/
|
|
263
|
+
channel?: 'external' | 'internal' | 'local';
|
|
264
|
+
/**
|
|
265
|
+
* (optional) the trace of the call chain, set by the receiving entry (v5 B13).
|
|
266
|
+
*/
|
|
267
|
+
trace?: NextTrace;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* type: `NextTrace`
|
|
271
|
+
* - the trace of a call chain across internal hops (v5 B13).
|
|
272
|
+
*/
|
|
273
|
+
export interface NextTrace {
|
|
274
|
+
/**
|
|
275
|
+
* trace id: the requestId of the first entry of the chain.
|
|
276
|
+
*/
|
|
277
|
+
tid: string;
|
|
278
|
+
/**
|
|
279
|
+
* hop count from the first entry (the first entry is `0`).
|
|
280
|
+
*/
|
|
281
|
+
hop: number;
|
|
282
|
+
/**
|
|
283
|
+
* (optional) service uri of the direct caller (the previous hop).
|
|
284
|
+
*/
|
|
285
|
+
via?: string;
|
|
286
|
+
/**
|
|
287
|
+
* (optional) requestId of the direct caller (the previous hop).
|
|
288
|
+
*/
|
|
289
|
+
pid?: string;
|
|
290
|
+
/**
|
|
291
|
+
* (optional) the first request path uri of the chain (like `context.source`).
|
|
292
|
+
*/
|
|
293
|
+
src?: string;
|
|
256
294
|
}
|
|
257
295
|
/**
|
|
258
296
|
* type: `NextHandler`
|
package/dist/types/core-types.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* @date 2024-12-20 optimized `NextIdentityCognito`
|
|
12
12
|
* @date 2025-05-13 optimized `NextContext` with `Authorization` header
|
|
13
13
|
* @date 2025-06-12 optimized `SearchBody` with `knn` support
|
|
14
|
+
* @date 2026-10-30 v5 B13: `NextContext.channel` and `NextContext.trace` (`NextTrace`).
|
|
14
15
|
*
|
|
15
16
|
* @copyright (C) lemoncloud.io 2019 - All Rights Reserved.
|
|
16
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-types.js","sourceRoot":"","sources":["../../src/types/core-types.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"core-types.js","sourceRoot":"","sources":["../../src/types/core-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"}
|