sdk-aws-lambda 0.7.1 → 0.7.3
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/dist/domain.objects/TrailCarrier.d.ts +17 -0
- package/dist/domain.objects/TrailCarrier.js +3 -0
- package/dist/domain.objects/TrailCarrier.js.map +1 -0
- package/dist/domain.objects/TrailExidHeader.d.ts +10 -0
- package/dist/domain.objects/TrailExidHeader.js +14 -0
- package/dist/domain.objects/TrailExidHeader.js.map +1 -0
- package/dist/domain.operations/asLambdaEvent/asLambdaEvent.fromApiGateway.js +15 -1
- package/dist/domain.operations/asLambdaEvent/asLambdaEvent.fromApiGateway.js.map +1 -1
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.d.ts +50 -27
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.js +18 -61
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.js.map +1 -1
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.viaApiGateway.d.ts +35 -0
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.viaApiGateway.js +80 -0
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.viaApiGateway.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.viaInvoke.d.ts +37 -0
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.viaInvoke.js +70 -0
- package/dist/domain.operations/askLambdaEndpoint/askLambdaEndpoint.viaInvoke.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/invoke/executeHttpRequest.d.ts +17 -0
- package/dist/domain.operations/askLambdaEndpoint/invoke/executeHttpRequest.js +34 -0
- package/dist/domain.operations/askLambdaEndpoint/invoke/executeHttpRequest.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asErrorFromHttpResponse.d.ts +31 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asErrorFromHttpResponse.js +55 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asErrorFromHttpResponse.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHeadersRecord.d.ts +13 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHeadersRecord.js +22 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHeadersRecord.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpMethod.d.ts +16 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpMethod.js +22 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpMethod.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpRequestBody.d.ts +17 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpRequestBody.js +28 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpRequestBody.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpRequestHeaders.d.ts +23 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpRequestHeaders.js +39 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/asHttpRequestHeaders.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/getOneBodyFromHttpText.d.ts +10 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/getOneBodyFromHttpText.js +19 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/getOneBodyFromHttpText.js.map +1 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/getOneCorrelationIdFromBody.d.ts +11 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/getOneCorrelationIdFromBody.js +19 -0
- package/dist/domain.operations/askLambdaEndpoint/serde/getOneCorrelationIdFromBody.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asCorsHeadersWithTrail.d.ts +12 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asCorsHeadersWithTrail.js +27 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/asCorsHeadersWithTrail.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.d.ts +3 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.js +32 -7
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/genLambdaEndpoint.forApiGateway.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genApiGatewayRequestEventNormalizationMiddleware.js +22 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forApiGateway/middleware/genApiGatewayRequestEventNormalizationMiddleware.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk.js +13 -2
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forAsk/genLambdaEndpoint.forAsk.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asCallerFault.d.ts +14 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asCallerFault.js +20 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asCallerFault.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsBatchResponse.d.ts +9 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsBatchResponse.js +13 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsBatchResponse.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordIds.d.ts +10 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordIds.js +11 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/asSqsRecordIds.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.d.ts +9 -3
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.js +40 -38
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perBatch.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.d.ts +12 -6
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.js +59 -35
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genLambdaEndpoint.forSqs.perRecord.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.d.ts +20 -7
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.js +21 -9
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/genSqsEndpointMiddlewares.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsIdsRetried.d.ts +19 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsIdsRetried.js +22 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsIdsRetried.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsIdsUnclaimable.d.ts +11 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsIdsUnclaimable.js +13 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsIdsUnclaimable.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsSuccessRefsMalformed.d.ts +11 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsSuccessRefsMalformed.js +18 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/getAllSqsSuccessRefsMalformed.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/isSqsSuccessRef.d.ts +8 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/isSqsSuccessRef.js +14 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/isSqsSuccessRef.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/logSqsRecordInvalid.d.ts +15 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/logSqsRecordInvalid.js +22 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/logSqsRecordInvalid.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/logSqsRecordRefused.d.ts +27 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/logSqsRecordRefused.js +33 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/logSqsRecordRefused.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.d.ts +6 -5
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.js +6 -5
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordValidated.js.map +1 -1
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordsValidated.d.ts +31 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordsValidated.js +46 -0
- package/dist/domain.operations/genLambdaEndpoint/genLambdaEndpoint.forSqs/setSqsRecordsValidated.js.map +1 -0
- package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.d.ts +15 -8
- package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.js +57 -12
- package/dist/domain.operations/genLambdaEndpoint/middleware/genTrailMiddleware.js.map +1 -1
- package/dist/domain.operations/lambdaEndpointWire/frame/asHeadersWithoutKey.d.ts +11 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/asHeadersWithoutKey.js +13 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/asHeadersWithoutKey.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/asTrailExidHeaders.d.ts +23 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/asTrailExidHeaders.js +32 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/asTrailExidHeaders.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailCarrierOfEvent.d.ts +20 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailCarrierOfEvent.js +23 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailCarrierOfEvent.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailCarrierOfHandler.d.ts +9 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailCarrierOfHandler.js +19 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailCarrierOfHandler.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailExidFromHeaders.d.ts +16 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailExidFromHeaders.js +24 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/getOneTrailExidFromHeaders.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isEventDeclaredAsApiGateway.d.ts +9 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isEventDeclaredAsApiGateway.js +15 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isEventDeclaredAsApiGateway.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isTrailExid.d.ts +19 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isTrailExid.js +27 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isTrailExid.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isTrailExidHeaderMalformed.d.ts +11 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isTrailExidHeaderMalformed.js +21 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/isTrailExidHeaderMalformed.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/setEventDeclaredAsApiGateway.d.ts +21 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/setEventDeclaredAsApiGateway.js +27 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/setEventDeclaredAsApiGateway.js.map +1 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/setHandlerTrailCarrier.d.ts +24 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/setHandlerTrailCarrier.js +28 -0
- package/dist/domain.operations/lambdaEndpointWire/frame/setHandlerTrailCarrier.js.map +1 -0
- package/dist/domain.operations/runLambdaEndpoint/error/isErrorLike.d.ts +6 -1
- package/dist/domain.operations/runLambdaEndpoint/error/isErrorLike.js +6 -1
- package/dist/domain.operations/runLambdaEndpoint/error/isErrorLike.js.map +1 -1
- package/dist/domain.operations/runLambdaEndpoint/runLambdaEndpoint.onReferenced.d.ts +7 -0
- package/dist/domain.operations/runLambdaEndpoint/runLambdaEndpoint.onReferenced.js +18 -2
- package/dist/domain.operations/runLambdaEndpoint/runLambdaEndpoint.onReferenced.js.map +1 -1
- package/dist/domain.operations/runLambdaEndpoint/runLambdaEndpoint.onSerialized.js +43 -7
- package/dist/domain.operations/runLambdaEndpoint/runLambdaEndpoint.onSerialized.js.map +1 -1
- package/dist/domain.operations/runLambdaEndpoint/serde/asCarriedPayload.d.ts +35 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/asCarriedPayload.js +81 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/asCarriedPayload.js.map +1 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/asErrorTypeOfErrorLike.d.ts +41 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/asErrorTypeOfErrorLike.js +116 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/asErrorTypeOfErrorLike.js.map +1 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/asWireFunctionErrorPayload.js +52 -17
- package/dist/domain.operations/runLambdaEndpoint/serde/asWireFunctionErrorPayload.js.map +1 -1
- package/dist/domain.operations/runLambdaEndpoint/serde/getOneTrailWithExid.d.ts +14 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/getOneTrailWithExid.js +18 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/getOneTrailWithExid.js.map +1 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/isEventWithHeaders.d.ts +17 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/isEventWithHeaders.js +19 -0
- package/dist/domain.operations/runLambdaEndpoint/serde/isEventWithHeaders.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/readme.md +65 -4
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { LambdaEndpointDialect } from '../../../domain.objects/LambdaEndpointDialect';
|
|
2
|
+
import type { TrailCarrier } from '../../../domain.objects/TrailCarrier';
|
|
3
|
+
/**
|
|
4
|
+
* .what = casts an event into the payload its endpoint's carrier reads, in the dialect declared
|
|
5
|
+
* .why = a direct invoke reads a `{ event, trail }` wrapper; an api gateway event is built by aws
|
|
6
|
+
* and carries the opt-in in its own `headers`. the dialect is still derived from
|
|
7
|
+
* `struct.payload` alone, so the two knobs cannot disagree
|
|
8
|
+
* (`invariant.ancient-vs-contemp-callers.md`)
|
|
9
|
+
*
|
|
10
|
+
* | carrier | contemp | ancient |
|
|
11
|
+
* |---------|---------|---------|
|
|
12
|
+
* | wrapper | `{ event, trail }` | the event, untouched |
|
|
13
|
+
* | headers | the event + `x-trail-exid` | the event, untouched: the sdk adds no opt-in |
|
|
14
|
+
*
|
|
15
|
+
* .note = the `wrapper` arm is `asFramedPayload`, unchanged. this adds the second carrier and
|
|
16
|
+
* owns no copy of the first (rule.forbid.parallel-codepaths)
|
|
17
|
+
* .note = the `headers` arm owes an exid, since a header that holds no value holds no opt-in: it takes
|
|
18
|
+
* the caller's trail, else a well-formed one the event already holds in its header, else a
|
|
19
|
+
* generated one (`getOneTrailWithExid`)
|
|
20
|
+
* .note = the `headers` arm merges the key into `multiValueHeaders` too when the event holds that
|
|
21
|
+
* twin, so a v1 event stays wire-faithful, and drops every case variant of the key first,
|
|
22
|
+
* so the sdk's key is the only one the endpoint reads. a hand-built v1 event that holds
|
|
23
|
+
* `X-Trail-Exid` loses that variant and gains the lowercase one; every other key keeps its
|
|
24
|
+
* author's case
|
|
25
|
+
* .note = `ancient` leaves the event as it is, so an event that already holds the key (a request
|
|
26
|
+
* captured off a real wire) keeps the opt-in its caller placed there
|
|
27
|
+
*/
|
|
28
|
+
export declare const asCarriedPayload: (input: {
|
|
29
|
+
event: unknown;
|
|
30
|
+
trail: {
|
|
31
|
+
exid?: string;
|
|
32
|
+
} | null;
|
|
33
|
+
dialect: LambdaEndpointDialect;
|
|
34
|
+
carrier: TrailCarrier;
|
|
35
|
+
}) => unknown;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asCarriedPayload = void 0;
|
|
4
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
5
|
+
const TrailExidHeader_1 = require("../../../domain.objects/TrailExidHeader");
|
|
6
|
+
const asHeadersWithoutKey_1 = require("../../lambdaEndpointWire/frame/asHeadersWithoutKey");
|
|
7
|
+
const asTrailExidHeaders_1 = require("../../lambdaEndpointWire/frame/asTrailExidHeaders");
|
|
8
|
+
const getOneTrailExidFromHeaders_1 = require("../../lambdaEndpointWire/frame/getOneTrailExidFromHeaders");
|
|
9
|
+
const asFramedPayload_1 = require("./asFramedPayload");
|
|
10
|
+
const getOneTrailWithExid_1 = require("./getOneTrailWithExid");
|
|
11
|
+
const isEventWithHeaders_1 = require("./isEventWithHeaders");
|
|
12
|
+
/**
|
|
13
|
+
* .what = casts an event into the payload its endpoint's carrier reads, in the dialect declared
|
|
14
|
+
* .why = a direct invoke reads a `{ event, trail }` wrapper; an api gateway event is built by aws
|
|
15
|
+
* and carries the opt-in in its own `headers`. the dialect is still derived from
|
|
16
|
+
* `struct.payload` alone, so the two knobs cannot disagree
|
|
17
|
+
* (`invariant.ancient-vs-contemp-callers.md`)
|
|
18
|
+
*
|
|
19
|
+
* | carrier | contemp | ancient |
|
|
20
|
+
* |---------|---------|---------|
|
|
21
|
+
* | wrapper | `{ event, trail }` | the event, untouched |
|
|
22
|
+
* | headers | the event + `x-trail-exid` | the event, untouched: the sdk adds no opt-in |
|
|
23
|
+
*
|
|
24
|
+
* .note = the `wrapper` arm is `asFramedPayload`, unchanged. this adds the second carrier and
|
|
25
|
+
* owns no copy of the first (rule.forbid.parallel-codepaths)
|
|
26
|
+
* .note = the `headers` arm owes an exid, since a header that holds no value holds no opt-in: it takes
|
|
27
|
+
* the caller's trail, else a well-formed one the event already holds in its header, else a
|
|
28
|
+
* generated one (`getOneTrailWithExid`)
|
|
29
|
+
* .note = the `headers` arm merges the key into `multiValueHeaders` too when the event holds that
|
|
30
|
+
* twin, so a v1 event stays wire-faithful, and drops every case variant of the key first,
|
|
31
|
+
* so the sdk's key is the only one the endpoint reads. a hand-built v1 event that holds
|
|
32
|
+
* `X-Trail-Exid` loses that variant and gains the lowercase one; every other key keeps its
|
|
33
|
+
* author's case
|
|
34
|
+
* .note = `ancient` leaves the event as it is, so an event that already holds the key (a request
|
|
35
|
+
* captured off a real wire) keeps the opt-in its caller placed there
|
|
36
|
+
*/
|
|
37
|
+
const asCarriedPayload = (input) => {
|
|
38
|
+
// the carrier is exhaustive: a third one added to the type fails to compile until it is handled here
|
|
39
|
+
if (input.carrier !== 'wrapper' && input.carrier !== 'headers')
|
|
40
|
+
return helpful_errors_1.MalfunctionError.throw('the trail carrier is not one this writes', {
|
|
41
|
+
carrier: input.carrier,
|
|
42
|
+
});
|
|
43
|
+
if (input.carrier === 'wrapper')
|
|
44
|
+
return (0, asFramedPayload_1.asFramedPayload)(input);
|
|
45
|
+
// ancient: the sdk adds no opt-in, exactly as a browser's request carries none
|
|
46
|
+
if (input.dialect === 'ancient')
|
|
47
|
+
return input.event;
|
|
48
|
+
// `input.event` is `unknown` because this operation serves every carrier; the header bags are
|
|
49
|
+
// checked here, at run time, rather than asserted
|
|
50
|
+
const event = isEventWithHeaders_1.isEventWithHeaders.assure(input.event);
|
|
51
|
+
const headersCarried = (0, asTrailExidHeaders_1.asTrailExidHeaders)({
|
|
52
|
+
trail: (0, getOneTrailWithExid_1.getOneTrailWithExid)({
|
|
53
|
+
trail: input.trail ?? {
|
|
54
|
+
exid: (0, getOneTrailExidFromHeaders_1.getOneTrailExidFromHeaders)({ headers: event.headers }),
|
|
55
|
+
},
|
|
56
|
+
}),
|
|
57
|
+
});
|
|
58
|
+
return {
|
|
59
|
+
...event,
|
|
60
|
+
headers: {
|
|
61
|
+
...(0, asHeadersWithoutKey_1.asHeadersWithoutKey)({
|
|
62
|
+
headers: event.headers,
|
|
63
|
+
key: TrailExidHeader_1.TRAIL_EXID_HEADER,
|
|
64
|
+
}),
|
|
65
|
+
...headersCarried,
|
|
66
|
+
},
|
|
67
|
+
...(event.multiValueHeaders
|
|
68
|
+
? {
|
|
69
|
+
multiValueHeaders: {
|
|
70
|
+
...(0, asHeadersWithoutKey_1.asHeadersWithoutKey)({
|
|
71
|
+
headers: event.multiValueHeaders,
|
|
72
|
+
key: TrailExidHeader_1.TRAIL_EXID_HEADER,
|
|
73
|
+
}),
|
|
74
|
+
[TrailExidHeader_1.TRAIL_EXID_HEADER]: [headersCarried[TrailExidHeader_1.TRAIL_EXID_HEADER]],
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
: {}),
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
exports.asCarriedPayload = asCarriedPayload;
|
|
81
|
+
//# sourceMappingURL=asCarriedPayload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asCarriedPayload.js","sourceRoot":"","sources":["../../../../src/domain.operations/runLambdaEndpoint/serde/asCarriedPayload.ts"],"names":[],"mappings":";;;AAAA,mDAAkD;AAIlD,6EAA4E;AAC5E,4FAAyF;AACzF,0FAAuF;AACvF,0GAAuG;AACvG,uDAAoD;AACpD,+DAA4D;AAC5D,6DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACI,MAAM,gBAAgB,GAAG,CAAC,KAKhC,EAAW,EAAE;IACZ,qGAAqG;IACrG,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;QAC5D,OAAO,iCAAgB,CAAC,KAAK,CAAC,0CAA0C,EAAE;YACxE,OAAO,EAAE,KAAK,CAAC,OAAuB;SACvC,CAAC,CAAC;IACL,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO,IAAA,iCAAe,EAAC,KAAK,CAAC,CAAC;IAE/D,+EAA+E;IAC/E,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,KAAK,CAAC;IAEpD,8FAA8F;IAC9F,kDAAkD;IAClD,MAAM,KAAK,GAAG,uCAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,IAAA,uCAAkB,EAAC;QACxC,KAAK,EAAE,IAAA,yCAAmB,EAAC;YACzB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI;gBACpB,IAAI,EAAE,IAAA,uDAA0B,EAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;aAC7D;SACF,CAAC;KACH,CAAC,CAAC;IACH,OAAO;QACL,GAAG,KAAK;QACR,OAAO,EAAE;YACP,GAAG,IAAA,yCAAmB,EAAC;gBACrB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,GAAG,EAAE,mCAAiB;aACvB,CAAC;YACF,GAAG,cAAc;SAClB;QACD,GAAG,CAAC,KAAK,CAAC,iBAAiB;YACzB,CAAC,CAAC;gBACE,iBAAiB,EAAE;oBACjB,GAAG,IAAA,yCAAmB,EAAC;wBACrB,OAAO,EAAE,KAAK,CAAC,iBAAiB;wBAChC,GAAG,EAAE,mCAAiB;qBACvB,CAAC;oBACF,CAAC,mCAAiB,CAAC,EAAE,CAAC,cAAc,CAAC,mCAAiB,CAAC,CAAC;iBACzD;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC,CAAC;AA/CW,QAAA,gBAAgB,oBA+C3B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = the wire label of any thrown value, as the aws node runtime writes it
|
|
3
|
+
* .why = a local run must label a throw exactly as the cloud does, or a caller fault flips side
|
|
4
|
+
* between loci. the source is `toRapidResponse` in
|
|
5
|
+
* `aws-lambda-nodejs-runtime-interface-client`, `src/Errors.js`:
|
|
6
|
+
*
|
|
7
|
+
* ```js
|
|
8
|
+
* try {
|
|
9
|
+
* if (util.types.isNativeError(error) || _isError(error))
|
|
10
|
+
* return { errorType: error.name?.replaceAll('\x7F', '%7F'), ...,
|
|
11
|
+
* trace: error.stack.replaceAll('\x7F', '%7F').split('\n') };
|
|
12
|
+
* return { errorType: typeof error, errorMessage: error.toString(), trace: [] };
|
|
13
|
+
* } catch (_err) { return { errorType: 'handled', ... }; }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* `_isError` asks for a truthy `name`, `message`, and `stack`, each a string
|
|
17
|
+
*
|
|
18
|
+
* .note = read from `aws/aws-lambda-nodejs-runtime-interface-client` `main`, `src/Errors.js`, on
|
|
19
|
+
* 2026-10-22. `blackbox/deployed.faultLabel.acceptance.test.ts` compares it to the
|
|
20
|
+
* deployed runtime, one fault kind per branch, so a label rule change upstream turns that
|
|
21
|
+
* suite red. a branch no kind there reaches is still caught only by a re-read of the file
|
|
22
|
+
*
|
|
23
|
+
* .note = a thrown `null` or `undefined` never reaches `toRapidResponse` on the cloud: the
|
|
24
|
+
* runtime's `CallbackContext.fail` swaps it for the string `'handled'` first. this
|
|
25
|
+
* mirrors `toRapidResponse` alone; `asWireFunctionErrorPayload` makes that swap ahead of it
|
|
26
|
+
*
|
|
27
|
+
* .note = each branch the runtime reaches via its `catch` is computed here up front, so this
|
|
28
|
+
* holds no catch of its own: an error-shaped value whose `stack`, or a present `name` or
|
|
29
|
+
* `message`, is not a string makes the runtime's `.replaceAll` throw; a `null`, an
|
|
30
|
+
* `undefined`, a value with no `toString`, or one whose `toString` (or its getter)
|
|
31
|
+
* throws makes `error.toString()` throw. each of those reads `'handled'`
|
|
32
|
+
* .note = one divergence, by type: a native error whose `.name` was set nullish gets no
|
|
33
|
+
* `errorType` on the cloud; this answers `'undefined'`, since a label is a string
|
|
34
|
+
* .note = two predicates, two questions. `isErrorLike` is the COARSE narrow: "can I read
|
|
35
|
+
* `.message` and `.stack` off this?". this is the runtime's LABEL rule: "what does the
|
|
36
|
+
* cloud call it?". a site that reads fields reaches for `isErrorLike`; a site that must
|
|
37
|
+
* match the wire label reaches for this
|
|
38
|
+
*/
|
|
39
|
+
export declare const asErrorTypeOfErrorLike: (input: {
|
|
40
|
+
error: unknown;
|
|
41
|
+
}) => string;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asErrorTypeOfErrorLike = void 0;
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
5
|
+
/**
|
|
6
|
+
* .what = the wire label of any thrown value, as the aws node runtime writes it
|
|
7
|
+
* .why = a local run must label a throw exactly as the cloud does, or a caller fault flips side
|
|
8
|
+
* between loci. the source is `toRapidResponse` in
|
|
9
|
+
* `aws-lambda-nodejs-runtime-interface-client`, `src/Errors.js`:
|
|
10
|
+
*
|
|
11
|
+
* ```js
|
|
12
|
+
* try {
|
|
13
|
+
* if (util.types.isNativeError(error) || _isError(error))
|
|
14
|
+
* return { errorType: error.name?.replaceAll('\x7F', '%7F'), ...,
|
|
15
|
+
* trace: error.stack.replaceAll('\x7F', '%7F').split('\n') };
|
|
16
|
+
* return { errorType: typeof error, errorMessage: error.toString(), trace: [] };
|
|
17
|
+
* } catch (_err) { return { errorType: 'handled', ... }; }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* `_isError` asks for a truthy `name`, `message`, and `stack`, each a string
|
|
21
|
+
*
|
|
22
|
+
* .note = read from `aws/aws-lambda-nodejs-runtime-interface-client` `main`, `src/Errors.js`, on
|
|
23
|
+
* 2026-10-22. `blackbox/deployed.faultLabel.acceptance.test.ts` compares it to the
|
|
24
|
+
* deployed runtime, one fault kind per branch, so a label rule change upstream turns that
|
|
25
|
+
* suite red. a branch no kind there reaches is still caught only by a re-read of the file
|
|
26
|
+
*
|
|
27
|
+
* .note = a thrown `null` or `undefined` never reaches `toRapidResponse` on the cloud: the
|
|
28
|
+
* runtime's `CallbackContext.fail` swaps it for the string `'handled'` first. this
|
|
29
|
+
* mirrors `toRapidResponse` alone; `asWireFunctionErrorPayload` makes that swap ahead of it
|
|
30
|
+
*
|
|
31
|
+
* .note = each branch the runtime reaches via its `catch` is computed here up front, so this
|
|
32
|
+
* holds no catch of its own: an error-shaped value whose `stack`, or a present `name` or
|
|
33
|
+
* `message`, is not a string makes the runtime's `.replaceAll` throw; a `null`, an
|
|
34
|
+
* `undefined`, a value with no `toString`, or one whose `toString` (or its getter)
|
|
35
|
+
* throws makes `error.toString()` throw. each of those reads `'handled'`
|
|
36
|
+
* .note = one divergence, by type: a native error whose `.name` was set nullish gets no
|
|
37
|
+
* `errorType` on the cloud; this answers `'undefined'`, since a label is a string
|
|
38
|
+
* .note = two predicates, two questions. `isErrorLike` is the COARSE narrow: "can I read
|
|
39
|
+
* `.message` and `.stack` off this?". this is the runtime's LABEL rule: "what does the
|
|
40
|
+
* cloud call it?". a site that reads fields reaches for `isErrorLike`; a site that must
|
|
41
|
+
* match the wire label reaches for this
|
|
42
|
+
*/
|
|
43
|
+
const asErrorTypeOfErrorLike = (input) => {
|
|
44
|
+
const error = input.error;
|
|
45
|
+
// the runtime's error arm: a native error, or a value its `_isError` accepts
|
|
46
|
+
if (node_util_1.types.isNativeError(error) || isRuntimeErrorShape(error))
|
|
47
|
+
return asErrorTypeOfErrorShaped({ error });
|
|
48
|
+
// the runtime's other arm calls `error.toString()`; where that throws, it answers 'handled'
|
|
49
|
+
if (!isToStringCallable({ value: error }))
|
|
50
|
+
return 'handled';
|
|
51
|
+
return typeof error;
|
|
52
|
+
};
|
|
53
|
+
exports.asErrorTypeOfErrorLike = asErrorTypeOfErrorLike;
|
|
54
|
+
/**
|
|
55
|
+
* .what = the runtime's `_isError`: a truthy `name`, `message`, and `stack`, each a string
|
|
56
|
+
* .why = the empty string is falsy, so `{ name: 'X', message: '', stack: 's' }` fails it
|
|
57
|
+
* .note = `_isError` asks no `typeof` of the value, so a named function with a string
|
|
58
|
+
* `message` and `stack` passes it too, and the cloud labels it by its `.name`
|
|
59
|
+
*/
|
|
60
|
+
const isRuntimeErrorShape = (value) => (typeof value === 'object' || typeof value === 'function') &&
|
|
61
|
+
value !== null &&
|
|
62
|
+
'name' in value &&
|
|
63
|
+
'message' in value &&
|
|
64
|
+
'stack' in value &&
|
|
65
|
+
typeof value.name === 'string' &&
|
|
66
|
+
typeof value.message === 'string' &&
|
|
67
|
+
typeof value.stack === 'string' &&
|
|
68
|
+
value.name !== '' &&
|
|
69
|
+
value.message !== '' &&
|
|
70
|
+
value.stack !== '';
|
|
71
|
+
/**
|
|
72
|
+
* .what = the label of a value the runtime treats as an error: its `.name`, or 'handled' where
|
|
73
|
+
* the runtime's own reads would throw
|
|
74
|
+
*/
|
|
75
|
+
const asErrorTypeOfErrorShaped = (input) => {
|
|
76
|
+
// a native error or a `_isError` value; each read may be absent on either
|
|
77
|
+
const name = Reflect.get(input.error, 'name');
|
|
78
|
+
const message = Reflect.get(input.error, 'message');
|
|
79
|
+
const stack = Reflect.get(input.error, 'stack');
|
|
80
|
+
// `error.stack.replaceAll(...)` throws on a stack that is not a string
|
|
81
|
+
if (typeof stack !== 'string')
|
|
82
|
+
return 'handled';
|
|
83
|
+
// `?.replaceAll(...)` throws on a present name or message that is not a string
|
|
84
|
+
const isStringOrNullish = (value) => value === null || value === undefined || typeof value === 'string';
|
|
85
|
+
if (!isStringOrNullish(name) || !isStringOrNullish(message))
|
|
86
|
+
return 'handled';
|
|
87
|
+
// the runtime escapes DEL, so a label that holds one reads the same on both loci
|
|
88
|
+
return typeof name === 'string'
|
|
89
|
+
? name.split('\x7F').join('%7F')
|
|
90
|
+
: 'undefined';
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* .what = whether `value.toString()` runs, as the runtime's non-error arm calls it
|
|
94
|
+
* .why = the runtime answers 'handled' wherever that call throws: an absent `toString` (a null
|
|
95
|
+
* prototype), one that throws, or a getter that throws. only a call tells all three apart,
|
|
96
|
+
* so the probe calls it rather than read the property
|
|
97
|
+
* .note = the catch IS the mirror of the runtime's own `catch`, never a hidden fault: whatever
|
|
98
|
+
* the call throws, the cloud reads 'handled', and so does this. a `toString` with side
|
|
99
|
+
* effects runs once here and once more where the payload writes the message
|
|
100
|
+
*/
|
|
101
|
+
const isToStringCallable = (input) => {
|
|
102
|
+
if (input.value === null || input.value === undefined)
|
|
103
|
+
return false;
|
|
104
|
+
try {
|
|
105
|
+
// a primitive boxes to its prototype's `toString`, so `Object()` reads it the same way
|
|
106
|
+
const toStringFound = Reflect.get(Object(input.value), 'toString');
|
|
107
|
+
if (typeof toStringFound !== 'function')
|
|
108
|
+
return false;
|
|
109
|
+
Reflect.apply(toStringFound, input.value, []);
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=asErrorTypeOfErrorLike.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asErrorTypeOfErrorLike.js","sourceRoot":"","sources":["../../../../src/domain.operations/runLambdaEndpoint/serde/asErrorTypeOfErrorLike.ts"],"names":[],"mappings":";;;AAAA,yCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAyB,EAAU,EAAE;IAC1E,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAE1B,6EAA6E;IAC7E,IAAI,iBAAK,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,mBAAmB,CAAC,KAAK,CAAC;QAC1D,OAAO,wBAAwB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAE7C,4FAA4F;IAC5F,IAAI,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAAE,OAAO,SAAS,CAAC;IAC5D,OAAO,OAAO,KAAK,CAAC;AACtB,CAAC,CAAC;AAVW,QAAA,sBAAsB,0BAUjC;AAEF;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC9D,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC;IAC1D,KAAK,KAAK,IAAI;IACd,MAAM,IAAI,KAAK;IACf,SAAS,IAAI,KAAK;IAClB,OAAO,IAAI,KAAK;IAChB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;IACjC,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;IAC/B,KAAK,CAAC,IAAI,KAAK,EAAE;IACjB,KAAK,CAAC,OAAO,KAAK,EAAE;IACpB,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC;AAErB;;;GAGG;AACH,MAAM,wBAAwB,GAAG,CAAC,KAAwB,EAAU,EAAE;IACpE,0EAA0E;IAC1E,MAAM,IAAI,GAAY,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACvD,MAAM,OAAO,GAAY,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,MAAM,KAAK,GAAY,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEzD,uEAAuE;IACvE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAEhD,+EAA+E;IAC/E,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAW,EAAE,CACpD,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;IACrE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IAE9E,iFAAiF;IACjF,OAAO,OAAO,IAAI,KAAK,QAAQ;QAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QAChC,CAAC,CAAC,WAAW,CAAC;AAClB,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,kBAAkB,GAAG,CAAC,KAAyB,EAAW,EAAE;IAChE,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACpE,IAAI,CAAC;QACH,uFAAuF;QACvF,MAAM,aAAa,GAAY,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;QAC5E,IAAI,OAAO,aAAa,KAAK,UAAU;YAAE,OAAO,KAAK,CAAC;QACtD,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.asWireFunctionErrorPayload = void 0;
|
|
4
4
|
const isErrorLike_1 = require("../error/isErrorLike");
|
|
5
|
+
const asErrorTypeOfErrorLike_1 = require("./asErrorTypeOfErrorLike");
|
|
6
|
+
/**
|
|
7
|
+
* .what = the message the aws node runtime writes when its own reads of a thrown value throw
|
|
8
|
+
* .why = `toRapidResponse`'s catch arm answers `errorType: 'handled'` with this fixed text and
|
|
9
|
+
* no trace (`aws-lambda-nodejs-runtime-interface-client`, `src/Errors.js`), so a local
|
|
10
|
+
* run shows the caller the same words the cloud does
|
|
11
|
+
*/
|
|
12
|
+
const RUNTIME_HANDLED_MESSAGE = 'callback called with Error argument, but there was a problem while retrieving one or more of its message, name, and stack';
|
|
5
13
|
/**
|
|
6
14
|
* .what = casts a thrown handler fault into the envelope aws puts on the wire
|
|
7
15
|
* .why = 🔴 **a THROW does not cross a wire; a payload does.** on the cloud locus
|
|
@@ -39,29 +47,56 @@ const isErrorLike_1 = require("../error/isErrorLike");
|
|
|
39
47
|
*/
|
|
40
48
|
const asWireFunctionErrorPayload = (error) => {
|
|
41
49
|
/**
|
|
42
|
-
* .what =
|
|
43
|
-
* .why = 🔴
|
|
44
|
-
*
|
|
45
|
-
* `
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* .what = labels the payload exactly as the aws node runtime labels it, read by duck-type
|
|
51
|
+
* .why = 🔴 the cloud wire is the truth this cast must reproduce. the runtime's
|
|
52
|
+
* `toRapidResponse` (`aws-lambda-nodejs-runtime-interface-client`,
|
|
53
|
+
* `src/Errors.js`) writes `errorType: error.name` for an error, and
|
|
54
|
+
* `errorType: typeof error` for any other thrown value. a read of
|
|
55
|
+
* `constructor.name` instead labels a helpful-errors `ConstraintError`
|
|
56
|
+
* (whose `.name` is the inherited `'Error'`) as a caller fault locally
|
|
57
|
+
* while the cloud labels it a server fault — a green local run over a
|
|
58
|
+
* red prod (sdk-aws-lambda#73). so a throw reads here exactly as it
|
|
59
|
+
* reads on the cloud, whatever its `.name`.
|
|
60
|
+
* .note = never `instanceof Error`: it fails across realms, and this runs where
|
|
61
|
+
* two meet (the local locus loads the handler through
|
|
62
|
+
* `getOneHandlerFromServerlessYml`; jest gives each module its own vm
|
|
63
|
+
* context). the reason lives at `isErrorLike`
|
|
64
|
+
* .note = the LABEL mirror is exact, the lossy parts included: `errorType`
|
|
65
|
+
* may be any `typeof` (`'object'`, `'symbol'`, …) or the runtime's own
|
|
66
|
+
* `'handled'` (a stackless native error), which carries the runtime's
|
|
67
|
+
* one fixed message and no trace. a thrown `null` or `undefined` never
|
|
68
|
+
* reaches `toRapidResponse`: the runtime's `CallbackContext.fail` swaps
|
|
69
|
+
* it for the string `'handled'` first, so the wire reads
|
|
70
|
+
* `errorType: 'string'`, `errorMessage: 'handled'` (measured by
|
|
71
|
+
* `blackbox/deployed.faultLabel.acceptance.test.ts`). and a
|
|
72
|
+
* thrown object with no message reads `errorMessage: '[object Object]'`,
|
|
73
|
+
* as the runtime's own `${error}` writes it. a local cast that read
|
|
74
|
+
* better than prod would hide what prod shows; to carry a cause, throw
|
|
75
|
+
* an `Error`. an error-like value that fails `_isError` keeps its
|
|
76
|
+
* message and stack here — the label, which decides the fault side,
|
|
77
|
+
* is the field held to the cloud's bytes
|
|
53
78
|
*/
|
|
54
|
-
|
|
79
|
+
// the runtime's fail arm swaps a null or undefined rejection for the string 'handled'
|
|
80
|
+
const thrown = error === null || error === undefined ? 'handled' : error;
|
|
81
|
+
// the runtime's catch arm writes one fixed message and no trace, whatever was thrown
|
|
82
|
+
const errorType = (0, asErrorTypeOfErrorLike_1.asErrorTypeOfErrorLike)({ error: thrown });
|
|
83
|
+
if (errorType === 'handled')
|
|
84
|
+
return {
|
|
85
|
+
errorMessage: RUNTIME_HANDLED_MESSAGE,
|
|
86
|
+
errorType,
|
|
87
|
+
stackTrace: [],
|
|
88
|
+
};
|
|
89
|
+
if (!(0, isErrorLike_1.isErrorLike)(thrown))
|
|
55
90
|
return {
|
|
56
|
-
errorMessage: String(
|
|
57
|
-
errorType
|
|
91
|
+
errorMessage: String(thrown),
|
|
92
|
+
errorType,
|
|
58
93
|
stackTrace: [],
|
|
59
94
|
};
|
|
60
95
|
return {
|
|
61
|
-
errorMessage:
|
|
62
|
-
errorType
|
|
96
|
+
errorMessage: thrown.message,
|
|
97
|
+
errorType,
|
|
63
98
|
// `stack` is optional on a real Error
|
|
64
|
-
stackTrace: typeof
|
|
99
|
+
stackTrace: typeof thrown.stack === 'string' ? thrown.stack.split('\n') : [],
|
|
65
100
|
};
|
|
66
101
|
};
|
|
67
102
|
exports.asWireFunctionErrorPayload = asWireFunctionErrorPayload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asWireFunctionErrorPayload.js","sourceRoot":"","sources":["../../../../src/domain.operations/runLambdaEndpoint/serde/asWireFunctionErrorPayload.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;
|
|
1
|
+
{"version":3,"file":"asWireFunctionErrorPayload.js","sourceRoot":"","sources":["../../../../src/domain.operations/runLambdaEndpoint/serde/asWireFunctionErrorPayload.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AACnD,qEAAkE;AAElE;;;;;GAKG;AACH,MAAM,uBAAuB,GAC3B,2HAA2H,CAAC;AAE9H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACI,MAAM,0BAA0B,GAAG,CACxC,KAAc,EACqD,EAAE;IACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,sFAAsF;IACtF,MAAM,MAAM,GAAG,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;IAEzE,qFAAqF;IACrF,MAAM,SAAS,GAAG,IAAA,+CAAsB,EAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,IAAI,SAAS,KAAK,SAAS;QACzB,OAAO;YACL,YAAY,EAAE,uBAAuB;YACrC,SAAS;YACT,UAAU,EAAE,EAAE;SACf,CAAC;IAEJ,IAAI,CAAC,IAAA,yBAAW,EAAC,MAAM,CAAC;QACtB,OAAO;YACL,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC;YAC5B,SAAS;YACT,UAAU,EAAE,EAAE;SACf,CAAC;IAEJ,OAAO;QACL,YAAY,EAAE,MAAM,CAAC,OAAO;QAC5B,SAAS;QACT,sCAAsC;QACtC,UAAU,EACR,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;KACnE,CAAC;AACJ,CAAC,CAAC;AA3DW,QAAA,0BAA0B,8BA2DrC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = the caller's trail, with an exid guaranteed — the caller's own, or a generated one
|
|
3
|
+
* .why = the `x-trail-exid` header carries a value or carries no opt-in, so a request that
|
|
4
|
+
* opts in owes an exid. a wrapper may go without one; a header may not
|
|
5
|
+
*
|
|
6
|
+
* .note = an absent, null, or empty exid all read as "none" by `getExidFromContext`, which generates
|
|
7
|
+
*/
|
|
8
|
+
export declare const getOneTrailWithExid: (input: {
|
|
9
|
+
trail: {
|
|
10
|
+
exid?: string | null;
|
|
11
|
+
} | null | undefined;
|
|
12
|
+
}) => {
|
|
13
|
+
exid: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOneTrailWithExid = void 0;
|
|
4
|
+
const getExidFromContext_1 = require("../../lambdaEndpointWire/context/getExidFromContext");
|
|
5
|
+
/**
|
|
6
|
+
* .what = the caller's trail, with an exid guaranteed — the caller's own, or a generated one
|
|
7
|
+
* .why = the `x-trail-exid` header carries a value or carries no opt-in, so a request that
|
|
8
|
+
* opts in owes an exid. a wrapper may go without one; a header may not
|
|
9
|
+
*
|
|
10
|
+
* .note = an absent, null, or empty exid all read as "none" by `getExidFromContext`, which generates
|
|
11
|
+
*/
|
|
12
|
+
const getOneTrailWithExid = (input) => ({
|
|
13
|
+
exid: (0, getExidFromContext_1.getExidFromContext)({
|
|
14
|
+
log: { trail: { exid: input.trail?.exid ?? null } },
|
|
15
|
+
}).exid,
|
|
16
|
+
});
|
|
17
|
+
exports.getOneTrailWithExid = getOneTrailWithExid;
|
|
18
|
+
//# sourceMappingURL=getOneTrailWithExid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOneTrailWithExid.js","sourceRoot":"","sources":["../../../../src/domain.operations/runLambdaEndpoint/serde/getOneTrailWithExid.ts"],"names":[],"mappings":";;;AAAA,4FAAyF;AAEzF;;;;;;GAMG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAEnC,EAAoB,EAAE,CAAC,CAAC;IACvB,IAAI,EAAE,IAAA,uCAAkB,EAAC;QACvB,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,IAAI,IAAI,EAAE,EAAE;KACpD,CAAC,CAAC,IAAI;CACR,CAAC,CAAC;AANU,QAAA,mBAAmB,uBAM7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = the two header bags an api gateway event may hold: `headers` on every version, and its
|
|
3
|
+
* multi-value twin on v1
|
|
4
|
+
* .why = the `headers` carrier writes the opt-in into both, so it must know their shape
|
|
5
|
+
*/
|
|
6
|
+
export type EventWithHeaders = {
|
|
7
|
+
headers?: Record<string, string> | null;
|
|
8
|
+
multiValueHeaders?: Record<string, string[]> | null;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* .what = whether a value is an object whose header bags, where present, are objects or null
|
|
12
|
+
* .why = the carrier reads an `unknown` event, and a type guard checks the shape at run time where
|
|
13
|
+
* an `as` cast would only assert it (`rule.forbid.as-cast`, `rule.require.assure-via-type-checks`)
|
|
14
|
+
*
|
|
15
|
+
* .note = `.assure` narrows and throws a helpful error; `.assess` narrows in an `if`
|
|
16
|
+
*/
|
|
17
|
+
export declare const isEventWithHeaders: import("type-fns").AssessWithAssure<unknown, EventWithHeaders>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEventWithHeaders = void 0;
|
|
4
|
+
const type_fns_1 = require("type-fns");
|
|
5
|
+
/**
|
|
6
|
+
* .what = whether a value is an object whose header bags, where present, are objects or null
|
|
7
|
+
* .why = the carrier reads an `unknown` event, and a type guard checks the shape at run time where
|
|
8
|
+
* an `as` cast would only assert it (`rule.forbid.as-cast`, `rule.require.assure-via-type-checks`)
|
|
9
|
+
*
|
|
10
|
+
* .note = `.assure` narrows and throws a helpful error; `.assess` narrows in an `if`
|
|
11
|
+
*/
|
|
12
|
+
exports.isEventWithHeaders = (0, type_fns_1.withAssure)((value) => {
|
|
13
|
+
if (typeof value !== 'object' || value === null)
|
|
14
|
+
return false;
|
|
15
|
+
const isBagOrAbsent = (bag) => bag === undefined || bag === null || typeof bag === 'object';
|
|
16
|
+
return (isBagOrAbsent(Reflect.get(value, 'headers')) &&
|
|
17
|
+
isBagOrAbsent(Reflect.get(value, 'multiValueHeaders')));
|
|
18
|
+
}, { name: 'isEventWithHeaders' });
|
|
19
|
+
//# sourceMappingURL=isEventWithHeaders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isEventWithHeaders.js","sourceRoot":"","sources":["../../../../src/domain.operations/runLambdaEndpoint/serde/isEventWithHeaders.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAYtC;;;;;;GAMG;AACU,QAAA,kBAAkB,GAAG,IAAA,qBAAU,EAC1C,CAAC,KAAc,EAA6B,EAAE;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,aAAa,GAAG,CAAC,GAAY,EAAW,EAAE,CAC9C,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,CAAC;IAC/D,OAAO,CACL,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAC5C,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CACvD,CAAC;AACJ,CAAC,EACD,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAC/B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* define endpoints, ask endpoints, auto-propagate trace-ids.
|
|
5
5
|
*
|
|
6
6
|
* .note = the trace-id propagates lambda to lambda, via the `{ event, trail }` wrapper
|
|
7
|
-
* `askLambdaEndpoint` sends
|
|
7
|
+
* `askLambdaEndpoint` sends, and across http, via the `x-trail-exid` header
|
|
8
|
+
* `askLambdaEndpoint.viaApiGateway` sends. it does not yet cross a queue boundary — those
|
|
8
9
|
* triggers mint a fresh `exid` per invoke (`domain.terms/trail.md`)
|
|
9
10
|
*/
|
|
10
11
|
export { BadRequestError } from 'helpful-errors';
|
|
@@ -126,6 +127,12 @@ export { genServiceSdk } from './domain.operations/genServiceSdk/genServiceSdk';
|
|
|
126
127
|
export { type GetAllLambdaContractsContext, type GetAllLambdaContractsInput, getAllLambdaContracts, } from './domain.operations/getAllLambdaContracts/getAllLambdaContracts';
|
|
127
128
|
export { getAllLambdaFunctionsByPrefix } from './domain.operations/getAllLambdaContracts/lambdaFunction/getAllLambdaFunctionsByPrefix';
|
|
128
129
|
export { type GetOneLambdaContractContext, type GetOneLambdaContractInput, getOneLambdaContract, } from './domain.operations/getOneLambdaContract/getOneLambdaContract';
|
|
130
|
+
/**
|
|
131
|
+
* .what = the headers that opt an http request into the contemp dialect, and carry its trail
|
|
132
|
+
* .why = any http client (fetch, axios, ky) spreads this into its request
|
|
133
|
+
* (`domain.terms/x-trail-exid.md`)
|
|
134
|
+
*/
|
|
135
|
+
export { asTrailExidHeaders } from './domain.operations/lambdaEndpointWire/frame/asTrailExidHeaders';
|
|
129
136
|
export { asLambdaContext } from './domain.operations/runLambdaEndpoint/context/asLambdaContext';
|
|
130
137
|
export { asLambdaEndpointOutput } from './domain.operations/runLambdaEndpoint/dialect/asLambdaEndpointOutput';
|
|
131
138
|
export { asLambdaEndpointErrorEnvelopeAncient, asLambdaEndpointErrorEnvelopeContemp, isLambdaEndpointErrorEnvelopeAncient, isLambdaEndpointErrorEnvelopeContemp, } from './domain.operations/runLambdaEndpoint/dialect/isLambdaEndpointErrorEnvelope';
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
* define endpoints, ask endpoints, auto-propagate trace-ids.
|
|
6
6
|
*
|
|
7
7
|
* .note = the trace-id propagates lambda to lambda, via the `{ event, trail }` wrapper
|
|
8
|
-
* `askLambdaEndpoint` sends
|
|
8
|
+
* `askLambdaEndpoint` sends, and across http, via the `x-trail-exid` header
|
|
9
|
+
* `askLambdaEndpoint.viaApiGateway` sends. it does not yet cross a queue boundary — those
|
|
9
10
|
* triggers mint a fresh `exid` per invoke (`domain.terms/trail.md`)
|
|
10
11
|
*/
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.runLambdaEndpoint = exports.isLambdaEndpointErrorEnvelopeContemp = exports.isLambdaEndpointErrorEnvelopeAncient = exports.asLambdaEndpointErrorEnvelopeContemp = exports.asLambdaEndpointErrorEnvelopeAncient = exports.asLambdaEndpointOutput = exports.asLambdaContext = exports.getOneLambdaContract = exports.getAllLambdaFunctionsByPrefix = exports.getAllLambdaContracts = exports.genServiceSdk = exports.getValidatedOutput = exports.getValidatedInput = exports.genZodOutputValidationMiddleware = exports.genTrailMiddleware = exports.genIoLoggerMiddleware = exports.genIntrospectionMiddleware = exports.genInternalServiceErrorMiddleware = exports.genConstraintErrorMiddleware = exports.asContextTrailed = exports.genZodEventValidationMiddleware = exports.genZodInputValidationMiddleware = exports.genContentTypeCoherenceMiddleware = exports.genApiGatewayRequestEventNormalizationMiddleware = exports.isApiGatewayResponse = exports.asApiGatewayResponseSchema = exports.genLambdaEndpoint = exports.asLambdaEvent = exports.asLambdaEndpoint = exports.getAskLambdaCacheKey = exports.asCacheWithoutSet = exports.askLambdaEndpoint = exports.LambdaServiceNotFoundError = exports.LambdaIntrospectionNotSupportedError = exports.LambdaIntrospectionBlockedError = exports.LambdaFunctionNotFoundError = exports.LambdaEndpointError = exports.LambdaEndpoint = exports.LambdaDomainObjectRefUnbindableError = exports.LambdaDomainObjectNotCapturableError = exports.LambdaCredentialsAbsentError = exports.HttpStatusCode = exports.GeneratedFile = exports.delLambdaSdks = exports.BadRequestError = void 0;
|
|
13
|
+
exports.runLambdaEndpoint = exports.isLambdaEndpointErrorEnvelopeContemp = exports.isLambdaEndpointErrorEnvelopeAncient = exports.asLambdaEndpointErrorEnvelopeContemp = exports.asLambdaEndpointErrorEnvelopeAncient = exports.asLambdaEndpointOutput = exports.asLambdaContext = exports.asTrailExidHeaders = exports.getOneLambdaContract = exports.getAllLambdaFunctionsByPrefix = exports.getAllLambdaContracts = exports.genServiceSdk = exports.getValidatedOutput = exports.getValidatedInput = exports.genZodOutputValidationMiddleware = exports.genTrailMiddleware = exports.genIoLoggerMiddleware = exports.genIntrospectionMiddleware = exports.genInternalServiceErrorMiddleware = exports.genConstraintErrorMiddleware = exports.asContextTrailed = exports.genZodEventValidationMiddleware = exports.genZodInputValidationMiddleware = exports.genContentTypeCoherenceMiddleware = exports.genApiGatewayRequestEventNormalizationMiddleware = exports.isApiGatewayResponse = exports.asApiGatewayResponseSchema = exports.genLambdaEndpoint = exports.asLambdaEvent = exports.asLambdaEndpoint = exports.getAskLambdaCacheKey = exports.asCacheWithoutSet = exports.askLambdaEndpoint = exports.LambdaServiceNotFoundError = exports.LambdaIntrospectionNotSupportedError = exports.LambdaIntrospectionBlockedError = exports.LambdaFunctionNotFoundError = exports.LambdaEndpointError = exports.LambdaEndpoint = exports.LambdaDomainObjectRefUnbindableError = exports.LambdaDomainObjectNotCapturableError = exports.LambdaCredentialsAbsentError = exports.HttpStatusCode = exports.GeneratedFile = exports.delLambdaSdks = exports.BadRequestError = void 0;
|
|
13
14
|
// re-export from helpful-errors for convenience
|
|
14
15
|
var helpful_errors_1 = require("helpful-errors");
|
|
15
16
|
Object.defineProperty(exports, "BadRequestError", { enumerable: true, get: function () { return helpful_errors_1.BadRequestError; } });
|
|
@@ -132,6 +133,13 @@ var getAllLambdaFunctionsByPrefix_1 = require("./domain.operations/getAllLambdaC
|
|
|
132
133
|
Object.defineProperty(exports, "getAllLambdaFunctionsByPrefix", { enumerable: true, get: function () { return getAllLambdaFunctionsByPrefix_1.getAllLambdaFunctionsByPrefix; } });
|
|
133
134
|
var getOneLambdaContract_1 = require("./domain.operations/getOneLambdaContract/getOneLambdaContract");
|
|
134
135
|
Object.defineProperty(exports, "getOneLambdaContract", { enumerable: true, get: function () { return getOneLambdaContract_1.getOneLambdaContract; } });
|
|
136
|
+
/**
|
|
137
|
+
* .what = the headers that opt an http request into the contemp dialect, and carry its trail
|
|
138
|
+
* .why = any http client (fetch, axios, ky) spreads this into its request
|
|
139
|
+
* (`domain.terms/x-trail-exid.md`)
|
|
140
|
+
*/
|
|
141
|
+
var asTrailExidHeaders_1 = require("./domain.operations/lambdaEndpointWire/frame/asTrailExidHeaders");
|
|
142
|
+
Object.defineProperty(exports, "asTrailExidHeaders", { enumerable: true, get: function () { return asTrailExidHeaders_1.asTrailExidHeaders; } });
|
|
135
143
|
// test utils — the run boundary axis (run an endpoint by reference, or by slug)
|
|
136
144
|
var asLambdaContext_1 = require("./domain.operations/runLambdaEndpoint/context/asLambdaContext");
|
|
137
145
|
Object.defineProperty(exports, "asLambdaContext", { enumerable: true, get: function () { return asLambdaContext_1.asLambdaContext; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,gDAAgD;AAChD,iDAAiD;AAAxC,iHAAA,eAAe,OAAA;AAQxB;;;;;GAKG;AACH,kEAAkE;AAAzD,6GAAA,aAAa,OAAA;AAWtB,gEAA+D;AAAtD,8GAAA,aAAa,OAAA;AACtB,kEAAiE;AAAxD,gHAAA,cAAc,OAAA;AACvB,8FAA6F;AAApF,4IAAA,4BAA4B,OAAA;AACrC,8GAA6G;AAApG,4JAAA,oCAAoC,OAAA;AAC7C,8GAA6G;AAApG,4JAAA,oCAAoC,OAAA;AAC7C,kEAAiE;AAAxD,gHAAA,cAAc,OAAA;AAEvB,4EAA2E;AAAlE,0HAAA,mBAAmB,OAAA;AAE5B,4BAA4B;AAC5B,4FAA2F;AAAlF,0IAAA,2BAA2B,OAAA;AACpC,oGAAmG;AAA1F,kJAAA,+BAA+B,OAAA;AACxC,8GAA6G;AAApG,4JAAA,oCAAoC,OAAA;AAC7C,0FAAyF;AAAhF,wIAAA,0BAA0B,OAAA;AAKnC,oBAAoB;AACpB,6FAA4F;AAAnF,sHAAA,iBAAiB,OAAA;AAC1B,mGAAkG;AAAzF,sHAAA,iBAAiB,OAAA;AAC1B,yGAAwG;AAA/F,4HAAA,oBAAoB,OAAA;AAC7B,eAAe;AACf,0FAAyF;AAAhF,oHAAA,gBAAgB,OAAA;AACzB,gFAAgF;AAChF,iFAAgF;AAAvE,8GAAA,aAAa,OAAA;AACtB;;;;;GAKG;AACH,6FAA4F;AAAnF,sHAAA,iBAAiB,OAAA;AAO1B,+IAA8I;AAArI,wIAAA,0BAA0B,OAAA;AAMnC,mIAAkI;AAAzH,4HAAA,oBAAoB,OAAA;AAC7B,sMAAqM;AAA5L,oLAAA,gDAAgD,OAAA;AACzD,wKAAuK;AAA9J,sJAAA,iCAAiC,OAAA;AAC1C,oKAAmK;AAA1J,kJAAA,+BAA+B,OAAA;AASxC,6JAA4J;AAAnJ,kJAAA,+BAA+B,OAAA;AAqBxC;;;;GAIG;AACH,sGAG2E;AAFzE,oHAAA,gBAAgB,OAAA;AAGlB,8HAA6H;AAApH,4IAAA,4BAA4B,OAAA;AACrC,wIAAuI;AAA9H,sJAAA,iCAAiC,OAAA;AAC1C,0HAAyH;AAAhH,wIAAA,0BAA0B,OAAA;AACnC,gHAA+G;AAAtG,8HAAA,qBAAqB,OAAA;AAC9B,gCAAgC;AAChC,0GAAyG;AAAhG,wHAAA,kBAAkB,OAAA;AAC3B,sIAAqI;AAA5H,oJAAA,gCAAgC,OAAA;AASzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wGAAuG;AAA9F,sHAAA,iBAAiB,OAAA;AAC1B,0GAG6E;AAF3E,wHAAA,kBAAkB,OAAA;AAcpB,8DAA8D;AAC9D,iFAAgF;AAAvE,8GAAA,aAAa,OAAA;AACtB,0CAA0C;AAC1C,yGAIyE;AADvE,8HAAA,qBAAqB,OAAA;AAEvB,wIAAuI;AAA9H,8IAAA,6BAA6B,OAAA;AACtC,sGAIuE;AADrE,4HAAA,oBAAoB,OAAA;AAEtB;;;;GAIG;AACH,sGAAqG;AAA5F,wHAAA,kBAAkB,OAAA;AAC3B,gFAAgF;AAChF,iGAAgG;AAAvF,kHAAA,eAAe,OAAA;AACxB,8EAA8E;AAC9E,yEAAyE;AACzE,+EAA+E;AAC/E,4EAA4E;AAC5E,4CAA4C;AAC5C,+GAA8G;AAArG,gIAAA,sBAAsB,OAAA;AAC/B,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAC9E,0CAA0C;AAC1C,6HAKqF;AAJnF,qJAAA,oCAAoC,OAAA;AACpC,qJAAA,oCAAoC,OAAA;AACpC,qJAAA,oCAAoC,OAAA;AACpC,qJAAA,oCAAoC,OAAA;AAMtC,6FAA4F;AAAnF,sHAAA,iBAAiB,OAAA"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "sdk-aws-lambda",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "a simple and opinionated sdk for aws lambda. define endpoints, ask endpoints, auto-propagate trace-ids.",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.3",
|
|
6
6
|
"repository": "ehmpathy/sdk-aws-lambda",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/sdk-aws-lambda",
|
|
8
8
|
"keywords": [
|
|
@@ -102,14 +102,14 @@
|
|
|
102
102
|
"husky": "8.0.3",
|
|
103
103
|
"iso-time": "1.11.7",
|
|
104
104
|
"jest": "30.2.0",
|
|
105
|
-
"rhachet": "1.
|
|
105
|
+
"rhachet": "1.50.1",
|
|
106
106
|
"rhachet-brains-anthropic": "0.4.3",
|
|
107
107
|
"rhachet-brains-fireworksai": "0.2.3",
|
|
108
|
-
"rhachet-brains-openrouter": "0.1.
|
|
108
|
+
"rhachet-brains-openrouter": "0.1.4",
|
|
109
109
|
"rhachet-brains-xai": "0.3.3",
|
|
110
|
-
"rhachet-roles-bhrain": "0.
|
|
111
|
-
"rhachet-roles-bhuild": "0.
|
|
112
|
-
"rhachet-roles-ehmpathy": "1.
|
|
110
|
+
"rhachet-roles-bhrain": "0.42.3",
|
|
111
|
+
"rhachet-roles-bhuild": "0.23.3",
|
|
112
|
+
"rhachet-roles-ehmpathy": "1.40.0",
|
|
113
113
|
"rhachet-roles-rhachet": "0.1.7",
|
|
114
114
|
"test-fns": "1.15.8",
|
|
115
115
|
"tsc-alias": "1.8.10",
|