@jaypie/constructs 1.2.10 → 1.2.11
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.
|
@@ -5,8 +5,8 @@ import { Construct } from "constructs";
|
|
|
5
5
|
export interface JaypieCertificateProps {
|
|
6
6
|
/**
|
|
7
7
|
* Import certificate from a provider stack instead of creating one.
|
|
8
|
-
*
|
|
9
|
-
* @default
|
|
8
|
+
* When true, imports the certificate ARN via CloudFormation export.
|
|
9
|
+
* @default false
|
|
10
10
|
*/
|
|
11
11
|
consumer?: boolean;
|
|
12
12
|
/**
|
|
@@ -16,19 +16,20 @@ export interface JaypieCertificateProps {
|
|
|
16
16
|
domainName?: string;
|
|
17
17
|
/**
|
|
18
18
|
* Export name override for cross-stack sharing.
|
|
19
|
+
* Only used when provider is true.
|
|
19
20
|
* @default Generated from environment and domain
|
|
20
21
|
*/
|
|
21
22
|
export?: string;
|
|
22
23
|
/**
|
|
23
24
|
* Construct ID override. When not provided, ID is auto-generated from domain.
|
|
24
25
|
* Use this to align with certificates created by other constructs.
|
|
25
|
-
* @default Auto-generated as "
|
|
26
|
+
* @default Auto-generated as "JaypieCert-{sanitized-domain}"
|
|
26
27
|
*/
|
|
27
28
|
id?: string;
|
|
28
29
|
/**
|
|
29
30
|
* Export certificate ARN for other stacks to import.
|
|
30
|
-
*
|
|
31
|
-
* @default
|
|
31
|
+
* When true, creates a CloudFormation export that consumer stacks can import.
|
|
32
|
+
* @default false
|
|
32
33
|
*/
|
|
33
34
|
provider?: boolean;
|
|
34
35
|
/**
|
|
@@ -83,11 +84,11 @@ export interface JaypieCertificateProps {
|
|
|
83
84
|
* });
|
|
84
85
|
*
|
|
85
86
|
* @example
|
|
86
|
-
* // Provider/consumer pattern for cross-stack sharing
|
|
87
|
-
* // In sandbox stack:
|
|
87
|
+
* // Optional: Provider/consumer pattern for cross-stack sharing
|
|
88
|
+
* // In sandbox stack (explicitly export):
|
|
88
89
|
* new JaypieCertificate(this, { provider: true });
|
|
89
90
|
*
|
|
90
|
-
* // In personal build:
|
|
91
|
+
* // In personal build (explicitly import):
|
|
91
92
|
* new JaypieCertificate(this, { consumer: true });
|
|
92
93
|
*/
|
|
93
94
|
export declare class JaypieCertificate extends Construct implements acm.ICertificate {
|
package/dist/esm/index.js
CHANGED
|
@@ -1999,11 +1999,11 @@ function sanitizeDomain(domain) {
|
|
|
1999
1999
|
* });
|
|
2000
2000
|
*
|
|
2001
2001
|
* @example
|
|
2002
|
-
* // Provider/consumer pattern for cross-stack sharing
|
|
2003
|
-
* // In sandbox stack:
|
|
2002
|
+
* // Optional: Provider/consumer pattern for cross-stack sharing
|
|
2003
|
+
* // In sandbox stack (explicitly export):
|
|
2004
2004
|
* new JaypieCertificate(this, { provider: true });
|
|
2005
2005
|
*
|
|
2006
|
-
* // In personal build:
|
|
2006
|
+
* // In personal build (explicitly import):
|
|
2007
2007
|
* new JaypieCertificate(this, { consumer: true });
|
|
2008
2008
|
*/
|
|
2009
2009
|
class JaypieCertificate extends Construct {
|
|
@@ -2040,7 +2040,7 @@ class JaypieCertificate extends Construct {
|
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
2042
|
super(scope, id);
|
|
2043
|
-
const { consumer =
|
|
2043
|
+
const { consumer = false, domainName: propsDomainName, export: exportParam, provider = false, roleTag = CDK$2.ROLE.API, zone: propsZone, } = props;
|
|
2044
2044
|
// Validate environment variables
|
|
2045
2045
|
if (process.env.CDK_ENV_API_SUBDOMAIN &&
|
|
2046
2046
|
!isValidSubdomain(process.env.CDK_ENV_API_SUBDOMAIN)) {
|