@jaypie/constructs 1.2.15 → 1.2.16
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/cjs/JaypieDistribution.d.ts +4 -5
- package/dist/cjs/index.cjs +4 -15
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/esm/JaypieDistribution.d.ts +4 -5
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -15
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -61,11 +61,11 @@ export interface JaypieDistributionProps extends Omit<cloudfront.DistributionPro
|
|
|
61
61
|
*/
|
|
62
62
|
host?: string | HostConfig;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
65
|
-
* Use
|
|
66
|
-
* @default
|
|
64
|
+
* Enable response streaming for Lambda Function URLs.
|
|
65
|
+
* Use with createLambdaStreamHandler for SSE/streaming responses.
|
|
66
|
+
* @default false
|
|
67
67
|
*/
|
|
68
|
-
|
|
68
|
+
streaming?: boolean;
|
|
69
69
|
/**
|
|
70
70
|
* Origin read timeout - how long CloudFront waits for a response from the origin.
|
|
71
71
|
* This is the maximum time allowed for the origin to respond.
|
|
@@ -98,7 +98,6 @@ export declare class JaypieDistribution extends Construct implements cloudfront.
|
|
|
98
98
|
private isIOrigin;
|
|
99
99
|
private isIFunctionUrl;
|
|
100
100
|
private isIFunction;
|
|
101
|
-
private hasInvokeMode;
|
|
102
101
|
private isExportNameObject;
|
|
103
102
|
private resolveLogBucket;
|
|
104
103
|
get env(): {
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -2349,7 +2349,7 @@ class JaypieDatadogSecret extends JaypieEnvSecret {
|
|
|
2349
2349
|
class JaypieDistribution extends constructs.Construct {
|
|
2350
2350
|
constructor(scope, id, props) {
|
|
2351
2351
|
super(scope, id);
|
|
2352
|
-
const { certificate: certificateProp = true, defaultBehavior: propsDefaultBehavior, destination: destinationProp = true, handler, host: propsHost,
|
|
2352
|
+
const { certificate: certificateProp = true, defaultBehavior: propsDefaultBehavior, destination: destinationProp = true, handler, host: propsHost, logBucket: logBucketProp, originReadTimeout = cdk.Duration.seconds(CDK$2.DURATION.CLOUDFRONT_API), roleTag = CDK$2.ROLE.API, streaming = false, zone: propsZone, ...distributionProps } = props;
|
|
2353
2353
|
// Validate environment variables
|
|
2354
2354
|
if (process.env.CDK_ENV_API_SUBDOMAIN &&
|
|
2355
2355
|
!isValidSubdomain(process.env.CDK_ENV_API_SUBDOMAIN)) {
|
|
@@ -2403,13 +2403,9 @@ class JaypieDistribution extends constructs.Construct {
|
|
|
2403
2403
|
// IFunction before IFunctionUrl (IFunction doesn't have functionUrlId)
|
|
2404
2404
|
let origin;
|
|
2405
2405
|
if (handler) {
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
? invokeMode // Explicit non-default value, use it
|
|
2410
|
-
: this.hasInvokeMode(handler)
|
|
2411
|
-
? handler.invokeMode // Auto-detect from handler
|
|
2412
|
-
: invokeMode; // Use default BUFFERED
|
|
2406
|
+
const resolvedInvokeMode = streaming
|
|
2407
|
+
? lambda__namespace.InvokeMode.RESPONSE_STREAM
|
|
2408
|
+
: lambda__namespace.InvokeMode.BUFFERED;
|
|
2413
2409
|
if (this.isIFunction(handler)) {
|
|
2414
2410
|
// Create FunctionUrl for the Lambda function
|
|
2415
2411
|
const functionUrl = new lambda__namespace.FunctionUrl(this, "FunctionUrl", {
|
|
@@ -2563,13 +2559,6 @@ class JaypieDistribution extends constructs.Construct {
|
|
|
2563
2559
|
"functionName" in handler &&
|
|
2564
2560
|
!("url" in handler));
|
|
2565
2561
|
}
|
|
2566
|
-
hasInvokeMode(handler) {
|
|
2567
|
-
// Check if handler has an invokeMode property for streaming support
|
|
2568
|
-
return (typeof handler === "object" &&
|
|
2569
|
-
handler !== null &&
|
|
2570
|
-
"invokeMode" in handler &&
|
|
2571
|
-
typeof handler.invokeMode === "string");
|
|
2572
|
-
}
|
|
2573
2562
|
isExportNameObject(value) {
|
|
2574
2563
|
return (typeof value === "object" &&
|
|
2575
2564
|
value !== null &&
|