@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
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { CDK } from "./constants";
|
|
2
2
|
export { JaypieAccountLoggingBucket, JaypieAccountLoggingBucketProps, } from "./JaypieAccountLoggingBucket";
|
|
3
|
-
export { JaypieApiGateway, JaypieApiGatewayProps
|
|
3
|
+
export { JaypieApiGateway, JaypieApiGatewayProps } from "./JaypieApiGateway";
|
|
4
4
|
export { JaypieAppStack } from "./JaypieAppStack";
|
|
5
5
|
export { JaypieBucketQueuedLambda } from "./JaypieBucketQueuedLambda";
|
|
6
|
-
export { JaypieCertificate, JaypieCertificateProps
|
|
6
|
+
export { JaypieCertificate, JaypieCertificateProps } from "./JaypieCertificate";
|
|
7
7
|
export { JaypieDatadogBucket, JaypieDatadogBucketProps, } from "./JaypieDatadogBucket";
|
|
8
8
|
export { JaypieDatadogForwarder, JaypieDatadogForwarderProps, } from "./JaypieDatadogForwarder";
|
|
9
9
|
export { JaypieDatadogSecret } from "./JaypieDatadogSecret";
|
|
@@ -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/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { CDK } from "./constants";
|
|
2
2
|
export { JaypieAccountLoggingBucket, JaypieAccountLoggingBucketProps, } from "./JaypieAccountLoggingBucket";
|
|
3
|
-
export { JaypieApiGateway, JaypieApiGatewayProps
|
|
3
|
+
export { JaypieApiGateway, JaypieApiGatewayProps } from "./JaypieApiGateway";
|
|
4
4
|
export { JaypieAppStack } from "./JaypieAppStack";
|
|
5
5
|
export { JaypieBucketQueuedLambda } from "./JaypieBucketQueuedLambda";
|
|
6
|
-
export { JaypieCertificate, JaypieCertificateProps
|
|
6
|
+
export { JaypieCertificate, JaypieCertificateProps } from "./JaypieCertificate";
|
|
7
7
|
export { JaypieDatadogBucket, JaypieDatadogBucketProps, } from "./JaypieDatadogBucket";
|
|
8
8
|
export { JaypieDatadogForwarder, JaypieDatadogForwarderProps, } from "./JaypieDatadogForwarder";
|
|
9
9
|
export { JaypieDatadogSecret } from "./JaypieDatadogSecret";
|
package/dist/esm/index.js
CHANGED
|
@@ -2317,7 +2317,7 @@ class JaypieDatadogSecret extends JaypieEnvSecret {
|
|
|
2317
2317
|
class JaypieDistribution extends Construct {
|
|
2318
2318
|
constructor(scope, id, props) {
|
|
2319
2319
|
super(scope, id);
|
|
2320
|
-
const { certificate: certificateProp = true, defaultBehavior: propsDefaultBehavior, destination: destinationProp = true, handler, host: propsHost,
|
|
2320
|
+
const { certificate: certificateProp = true, defaultBehavior: propsDefaultBehavior, destination: destinationProp = true, handler, host: propsHost, logBucket: logBucketProp, originReadTimeout = Duration.seconds(CDK$2.DURATION.CLOUDFRONT_API), roleTag = CDK$2.ROLE.API, streaming = false, zone: propsZone, ...distributionProps } = props;
|
|
2321
2321
|
// Validate environment variables
|
|
2322
2322
|
if (process.env.CDK_ENV_API_SUBDOMAIN &&
|
|
2323
2323
|
!isValidSubdomain(process.env.CDK_ENV_API_SUBDOMAIN)) {
|
|
@@ -2371,13 +2371,9 @@ class JaypieDistribution extends Construct {
|
|
|
2371
2371
|
// IFunction before IFunctionUrl (IFunction doesn't have functionUrlId)
|
|
2372
2372
|
let origin;
|
|
2373
2373
|
if (handler) {
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
? invokeMode // Explicit non-default value, use it
|
|
2378
|
-
: this.hasInvokeMode(handler)
|
|
2379
|
-
? handler.invokeMode // Auto-detect from handler
|
|
2380
|
-
: invokeMode; // Use default BUFFERED
|
|
2374
|
+
const resolvedInvokeMode = streaming
|
|
2375
|
+
? lambda.InvokeMode.RESPONSE_STREAM
|
|
2376
|
+
: lambda.InvokeMode.BUFFERED;
|
|
2381
2377
|
if (this.isIFunction(handler)) {
|
|
2382
2378
|
// Create FunctionUrl for the Lambda function
|
|
2383
2379
|
const functionUrl = new lambda.FunctionUrl(this, "FunctionUrl", {
|
|
@@ -2531,13 +2527,6 @@ class JaypieDistribution extends Construct {
|
|
|
2531
2527
|
"functionName" in handler &&
|
|
2532
2528
|
!("url" in handler));
|
|
2533
2529
|
}
|
|
2534
|
-
hasInvokeMode(handler) {
|
|
2535
|
-
// Check if handler has an invokeMode property for streaming support
|
|
2536
|
-
return (typeof handler === "object" &&
|
|
2537
|
-
handler !== null &&
|
|
2538
|
-
"invokeMode" in handler &&
|
|
2539
|
-
typeof handler.invokeMode === "string");
|
|
2540
|
-
}
|
|
2541
2530
|
isExportNameObject(value) {
|
|
2542
2531
|
return (typeof value === "object" &&
|
|
2543
2532
|
value !== null &&
|