@jaypie/constructs 1.1.41 → 1.1.42

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.
@@ -1,4 +1,4 @@
1
- export declare function envHostname({ component, domain, env, subdomain, }: {
1
+ export declare function envHostname({ component, domain, env, subdomain, }?: {
2
2
  component?: string;
3
3
  domain?: string;
4
4
  env?: string;
@@ -1,6 +1,6 @@
1
1
  import { Construct } from "constructs";
2
2
  import * as route53 from "aws-cdk-lib/aws-route53";
3
- export declare function resolveHostedZone(scope: Construct, { name, zone, }: {
3
+ export declare function resolveHostedZone(scope: Construct, { name, zone, }?: {
4
4
  name?: string;
5
5
  zone?: string | route53.IHostedZone;
6
6
  }): route53.IHostedZone;
package/dist/esm/index.js CHANGED
@@ -180,7 +180,7 @@ function constructTagger(construct, { name } = {}) {
180
180
  return true;
181
181
  }
182
182
 
183
- function envHostname({ component, domain, env, subdomain, }) {
183
+ function envHostname({ component, domain, env, subdomain, } = {}) {
184
184
  const resolvedDomain = domain || process.env.CDK_ENV_DOMAIN || process.env.CDK_ENV_HOSTED_ZONE;
185
185
  if (!resolvedDomain) {
186
186
  throw new ConfigurationError("No hostname `domain` provided. Set CDK_ENV_DOMAIN or CDK_ENV_HOSTED_ZONE to use environment domain");
@@ -270,7 +270,7 @@ function jaypieLambdaEnv(options = {}) {
270
270
  return environment;
271
271
  }
272
272
 
273
- function resolveHostedZone(scope, { name = "HostedZone", zone = process.env.CDK_ENV_HOSTED_ZONE, }) {
273
+ function resolveHostedZone(scope, { name = "HostedZone", zone = process.env.CDK_ENV_HOSTED_ZONE, } = {}) {
274
274
  if (!zone) {
275
275
  throw new ConfigurationError("No `zone` provided. Set CDK_ENV_HOSTED_ZONE to use environment zone");
276
276
  }