@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
- * Auto-detected from PROJECT_ENV (personal/ephemeral = consumer).
9
- * @default auto-detected from environment
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 "Certificate-{sanitized-domain}"
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
- * Auto-detected from PROJECT_ENV (sandbox = provider).
31
- * @default auto-detected from environment
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 {
@@ -2031,11 +2031,11 @@ function sanitizeDomain(domain) {
2031
2031
  * });
2032
2032
  *
2033
2033
  * @example
2034
- * // Provider/consumer pattern for cross-stack sharing
2035
- * // In sandbox stack:
2034
+ * // Optional: Provider/consumer pattern for cross-stack sharing
2035
+ * // In sandbox stack (explicitly export):
2036
2036
  * new JaypieCertificate(this, { provider: true });
2037
2037
  *
2038
- * // In personal build:
2038
+ * // In personal build (explicitly import):
2039
2039
  * new JaypieCertificate(this, { consumer: true });
2040
2040
  */
2041
2041
  class JaypieCertificate extends constructs.Construct {
@@ -2072,7 +2072,7 @@ class JaypieCertificate extends constructs.Construct {
2072
2072
  }
2073
2073
  }
2074
2074
  super(scope, id);
2075
- const { consumer = checkEnvIsConsumer(), domainName: propsDomainName, export: exportParam, provider = checkEnvIsProvider(), roleTag = CDK$2.ROLE.API, zone: propsZone, } = props;
2075
+ const { consumer = false, domainName: propsDomainName, export: exportParam, provider = false, roleTag = CDK$2.ROLE.API, zone: propsZone, } = props;
2076
2076
  // Validate environment variables
2077
2077
  if (process.env.CDK_ENV_API_SUBDOMAIN &&
2078
2078
  !isValidSubdomain(process.env.CDK_ENV_API_SUBDOMAIN)) {