@jaypie/constructs 1.2.15 → 1.2.17
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/JaypieCertificate.d.ts +1 -0
- package/dist/cjs/JaypieDistribution.d.ts +4 -5
- package/dist/cjs/JaypieDynamoDb.d.ts +1 -0
- package/dist/cjs/JaypieEnvSecret.d.ts +2 -1
- package/dist/cjs/index.cjs +23 -17
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/esm/JaypieCertificate.d.ts +1 -0
- package/dist/esm/JaypieDistribution.d.ts +4 -5
- package/dist/esm/JaypieDynamoDb.d.ts +1 -0
- package/dist/esm/JaypieEnvSecret.d.ts +2 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +23 -17
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -113,5 +113,6 @@ export declare class JaypieCertificate extends Construct implements acm.ICertifi
|
|
|
113
113
|
region: string;
|
|
114
114
|
};
|
|
115
115
|
applyRemovalPolicy(policy: RemovalPolicy): void;
|
|
116
|
+
get certificateRef(): acm.CertificateReference;
|
|
116
117
|
metricDaysToExpiry(props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
|
|
117
118
|
}
|
|
@@ -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(): {
|
|
@@ -105,6 +105,7 @@ export declare class JaypieDynamoDb extends Construct implements dynamodb.ITable
|
|
|
105
105
|
get tableArn(): string;
|
|
106
106
|
get tableId(): string | undefined;
|
|
107
107
|
get tableName(): string;
|
|
108
|
+
get tableRef(): dynamodb.TableReference;
|
|
108
109
|
get tableStreamArn(): string | undefined;
|
|
109
110
|
get encryptionKey(): import("aws-cdk-lib/aws-kms").IKey | undefined;
|
|
110
111
|
applyRemovalPolicy(policy: RemovalPolicy): void;
|
|
@@ -25,8 +25,9 @@ export declare class JaypieEnvSecret extends Construct implements ISecret {
|
|
|
25
25
|
};
|
|
26
26
|
applyRemovalPolicy(policy: RemovalPolicy): void;
|
|
27
27
|
get secretArn(): string;
|
|
28
|
-
get secretName(): string;
|
|
29
28
|
get secretFullArn(): string | undefined;
|
|
29
|
+
get secretName(): string;
|
|
30
|
+
get secretRef(): secretsmanager.SecretReference;
|
|
30
31
|
get encryptionKey(): IKey | undefined;
|
|
31
32
|
get secretValue(): SecretValue;
|
|
32
33
|
secretValueFromJson(key: string): SecretValue;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -999,11 +999,14 @@ class JaypieEnvSecret extends constructs.Construct {
|
|
|
999
999
|
get secretArn() {
|
|
1000
1000
|
return this._secret.secretArn;
|
|
1001
1001
|
}
|
|
1002
|
+
get secretFullArn() {
|
|
1003
|
+
return this._secret.secretFullArn;
|
|
1004
|
+
}
|
|
1002
1005
|
get secretName() {
|
|
1003
1006
|
return this._secret.secretName;
|
|
1004
1007
|
}
|
|
1005
|
-
get
|
|
1006
|
-
return this._secret.
|
|
1008
|
+
get secretRef() {
|
|
1009
|
+
return this._secret.secretRef;
|
|
1007
1010
|
}
|
|
1008
1011
|
get encryptionKey() {
|
|
1009
1012
|
return this._secret.encryptionKey;
|
|
@@ -2160,6 +2163,9 @@ class JaypieCertificate extends constructs.Construct {
|
|
|
2160
2163
|
this.certificate.applyRemovalPolicy(policy);
|
|
2161
2164
|
}
|
|
2162
2165
|
// ICertificate implementation
|
|
2166
|
+
get certificateRef() {
|
|
2167
|
+
return this.certificate.certificateRef;
|
|
2168
|
+
}
|
|
2163
2169
|
metricDaysToExpiry(props) {
|
|
2164
2170
|
return this.certificate.metricDaysToExpiry(props);
|
|
2165
2171
|
}
|
|
@@ -2349,7 +2355,7 @@ class JaypieDatadogSecret extends JaypieEnvSecret {
|
|
|
2349
2355
|
class JaypieDistribution extends constructs.Construct {
|
|
2350
2356
|
constructor(scope, id, props) {
|
|
2351
2357
|
super(scope, id);
|
|
2352
|
-
const { certificate: certificateProp = true, defaultBehavior: propsDefaultBehavior, destination: destinationProp = true, handler, host: propsHost,
|
|
2358
|
+
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
2359
|
// Validate environment variables
|
|
2354
2360
|
if (process.env.CDK_ENV_API_SUBDOMAIN &&
|
|
2355
2361
|
!isValidSubdomain(process.env.CDK_ENV_API_SUBDOMAIN)) {
|
|
@@ -2403,13 +2409,9 @@ class JaypieDistribution extends constructs.Construct {
|
|
|
2403
2409
|
// IFunction before IFunctionUrl (IFunction doesn't have functionUrlId)
|
|
2404
2410
|
let origin;
|
|
2405
2411
|
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
|
|
2412
|
+
const resolvedInvokeMode = streaming
|
|
2413
|
+
? lambda__namespace.InvokeMode.RESPONSE_STREAM
|
|
2414
|
+
: lambda__namespace.InvokeMode.BUFFERED;
|
|
2413
2415
|
if (this.isIFunction(handler)) {
|
|
2414
2416
|
// Create FunctionUrl for the Lambda function
|
|
2415
2417
|
const functionUrl = new lambda__namespace.FunctionUrl(this, "FunctionUrl", {
|
|
@@ -2563,13 +2565,6 @@ class JaypieDistribution extends constructs.Construct {
|
|
|
2563
2565
|
"functionName" in handler &&
|
|
2564
2566
|
!("url" in handler));
|
|
2565
2567
|
}
|
|
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
2568
|
isExportNameObject(value) {
|
|
2574
2569
|
return (typeof value === "object" &&
|
|
2575
2570
|
value !== null &&
|
|
@@ -2836,6 +2831,9 @@ class JaypieDynamoDb extends constructs.Construct {
|
|
|
2836
2831
|
get tableName() {
|
|
2837
2832
|
return this._table.tableName;
|
|
2838
2833
|
}
|
|
2834
|
+
get tableRef() {
|
|
2835
|
+
return this._table.tableRef;
|
|
2836
|
+
}
|
|
2839
2837
|
get tableStreamArn() {
|
|
2840
2838
|
return this._table.tableStreamArn;
|
|
2841
2839
|
}
|
|
@@ -3930,6 +3928,10 @@ class JaypieWebDeploymentBucket extends constructs.Construct {
|
|
|
3930
3928
|
new cdk.CfnOutput(this, "DestinationBucketDeployRoleArn", {
|
|
3931
3929
|
value: bucketDeployRole.roleArn,
|
|
3932
3930
|
});
|
|
3931
|
+
// Output the bucket name for workflows
|
|
3932
|
+
new cdk.CfnOutput(this, "DestinationBucketName", {
|
|
3933
|
+
value: this.bucket.bucketName,
|
|
3934
|
+
});
|
|
3933
3935
|
}
|
|
3934
3936
|
// Create CloudFront distribution and certificate if host and zone are provided
|
|
3935
3937
|
if (host && zone) {
|
|
@@ -3983,6 +3985,10 @@ class JaypieWebDeploymentBucket extends constructs.Construct {
|
|
|
3983
3985
|
});
|
|
3984
3986
|
cdk.Tags.of(record).add(CDK$2.TAG.ROLE, CDK$2.ROLE.NETWORKING);
|
|
3985
3987
|
this.distributionDomainName = this.distribution.distributionDomainName;
|
|
3988
|
+
// Output the distribution ID for cache invalidation
|
|
3989
|
+
new cdk.CfnOutput(this, "DistributionId", {
|
|
3990
|
+
value: this.distribution.distributionId,
|
|
3991
|
+
});
|
|
3986
3992
|
}
|
|
3987
3993
|
}
|
|
3988
3994
|
// Implement remaining IBucket methods by delegating to the bucket
|