cdk-real-drift 0.12.31 → 0.12.32

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/cli.js CHANGED
@@ -2451,7 +2451,9 @@ const KNOWN_DEFAULTS = {
2451
2451
  "AWS::AutoScaling::ScheduledAction": { EndTime: "null" },
2452
2452
  "AWS::DocDB::DBCluster": {
2453
2453
  Port: 27017,
2454
- BackupRetentionPeriod: 1
2454
+ BackupRetentionPeriod: 1,
2455
+ StorageType: "standard",
2456
+ NetworkType: "IPV4"
2455
2457
  },
2456
2458
  "AWS::DocDB::DBInstance": { CACertificateIdentifier: "rds-ca-rsa2048-g1" },
2457
2459
  "AWS::EC2::VolumeAttachment": { EbsCardIndex: 0 },
@@ -10032,6 +10034,54 @@ const readSchedulerSchedule = async ({ physicalId, declared, region }) => {
10032
10034
  ...s.Target !== void 0 && { Target: s.Target }
10033
10035
  };
10034
10036
  };
10037
+ const projectCodeBuildSource = (src) => ({
10038
+ ...src.type !== void 0 && { Type: src.type },
10039
+ ...src.location !== void 0 && { Location: src.location },
10040
+ ...src.buildspec !== void 0 && { BuildSpec: src.buildspec },
10041
+ ...src.gitCloneDepth !== void 0 && { GitCloneDepth: src.gitCloneDepth },
10042
+ ...src.insecureSsl !== void 0 && { InsecureSsl: src.insecureSsl },
10043
+ ...src.reportBuildStatus !== void 0 && { ReportBuildStatus: src.reportBuildStatus },
10044
+ ...src.sourceIdentifier !== void 0 && { SourceIdentifier: src.sourceIdentifier }
10045
+ });
10046
+ const projectCodeBuildArtifacts = (art) => ({
10047
+ ...art.type !== void 0 && { Type: art.type },
10048
+ ...art.location !== void 0 && { Location: art.location },
10049
+ ...art.name !== void 0 && { Name: art.name },
10050
+ ...art.namespaceType !== void 0 && { NamespaceType: art.namespaceType },
10051
+ ...art.packaging !== void 0 && { Packaging: art.packaging },
10052
+ ...art.path !== void 0 && { Path: art.path },
10053
+ ...art.artifactIdentifier !== void 0 && { ArtifactIdentifier: art.artifactIdentifier },
10054
+ ...art.overrideArtifactName !== void 0 && { OverrideArtifactName: art.overrideArtifactName },
10055
+ ...art.encryptionDisabled !== void 0 && { EncryptionDisabled: art.encryptionDisabled }
10056
+ });
10057
+ const projectCodeBuildTriggers = (w) => ({
10058
+ Webhook: true,
10059
+ ...w.buildType !== void 0 && { BuildType: w.buildType },
10060
+ ...Array.isArray(w.filterGroups) && { FilterGroups: w.filterGroups.map((group) => (group ?? []).map((f) => ({
10061
+ ...f.type !== void 0 && { Type: f.type },
10062
+ ...f.pattern !== void 0 && { Pattern: f.pattern },
10063
+ ...f.excludeMatchedPattern !== void 0 && { ExcludeMatchedPattern: f.excludeMatchedPattern }
10064
+ }))) },
10065
+ ...w.scopeConfiguration && { ScopeConfiguration: {
10066
+ ...w.scopeConfiguration.name !== void 0 && { Name: w.scopeConfiguration.name },
10067
+ ...w.scopeConfiguration.domain !== void 0 && { Domain: w.scopeConfiguration.domain },
10068
+ ...w.scopeConfiguration.scope !== void 0 && { Scope: w.scopeConfiguration.scope }
10069
+ } }
10070
+ });
10071
+ const projectCodeBuildBatchConfig = (b) => ({
10072
+ ...b.serviceRole !== void 0 && { ServiceRole: b.serviceRole },
10073
+ ...b.combineArtifacts !== void 0 && { CombineArtifacts: b.combineArtifacts },
10074
+ ...b.timeoutInMins !== void 0 && { TimeoutInMins: b.timeoutInMins },
10075
+ ...b.batchReportMode !== void 0 && { BatchReportMode: b.batchReportMode },
10076
+ ...b.restrictions && { Restrictions: {
10077
+ ...b.restrictions.maximumBuildsAllowed !== void 0 && { MaximumBuildsAllowed: b.restrictions.maximumBuildsAllowed },
10078
+ ...b.restrictions.computeTypesAllowed !== void 0 && { ComputeTypesAllowed: b.restrictions.computeTypesAllowed }
10079
+ } }
10080
+ });
10081
+ const projectCodeBuildSourceVersion = (v) => ({
10082
+ ...v.sourceIdentifier !== void 0 && { SourceIdentifier: v.sourceIdentifier },
10083
+ ...v.sourceVersion !== void 0 && { SourceVersion: v.sourceVersion }
10084
+ });
10035
10085
  const readCodeBuildProject = async ({ physicalId, declared, region }) => {
10036
10086
  const name = str$1(physicalId) ?? str$1(declared.Name);
10037
10087
  if (!name) return void 0;
@@ -10046,27 +10096,11 @@ const readCodeBuildProject = async ({ physicalId, declared, region }) => {
10046
10096
  if (p.timeoutInMinutes !== void 0) model.TimeoutInMinutes = p.timeoutInMinutes;
10047
10097
  if (p.queuedTimeoutInMinutes !== void 0) model.QueuedTimeoutInMinutes = p.queuedTimeoutInMinutes;
10048
10098
  if (p.encryptionKey !== void 0) model.EncryptionKey = p.encryptionKey;
10049
- const src = p.source;
10050
- if (src) model.Source = {
10051
- ...src.type !== void 0 && { Type: src.type },
10052
- ...src.location !== void 0 && { Location: src.location },
10053
- ...src.buildspec !== void 0 && { BuildSpec: src.buildspec },
10054
- ...src.gitCloneDepth !== void 0 && { GitCloneDepth: src.gitCloneDepth },
10055
- ...src.insecureSsl !== void 0 && { InsecureSsl: src.insecureSsl },
10056
- ...src.reportBuildStatus !== void 0 && { ReportBuildStatus: src.reportBuildStatus }
10057
- };
10058
- const art = p.artifacts;
10059
- if (art) model.Artifacts = {
10060
- ...art.type !== void 0 && { Type: art.type },
10061
- ...art.location !== void 0 && { Location: art.location },
10062
- ...art.name !== void 0 && { Name: art.name },
10063
- ...art.namespaceType !== void 0 && { NamespaceType: art.namespaceType },
10064
- ...art.packaging !== void 0 && { Packaging: art.packaging },
10065
- ...art.path !== void 0 && { Path: art.path },
10066
- ...art.artifactIdentifier !== void 0 && { ArtifactIdentifier: art.artifactIdentifier },
10067
- ...art.overrideArtifactName !== void 0 && { OverrideArtifactName: art.overrideArtifactName },
10068
- ...art.encryptionDisabled !== void 0 && { EncryptionDisabled: art.encryptionDisabled }
10069
- };
10099
+ if (p.source) model.Source = projectCodeBuildSource(p.source);
10100
+ if (p.artifacts) model.Artifacts = projectCodeBuildArtifacts(p.artifacts);
10101
+ if (Array.isArray(p.secondarySources) && p.secondarySources.length > 0) model.SecondarySources = p.secondarySources.map(projectCodeBuildSource);
10102
+ if (Array.isArray(p.secondaryArtifacts) && p.secondaryArtifacts.length > 0) model.SecondaryArtifacts = p.secondaryArtifacts.map(projectCodeBuildArtifacts);
10103
+ if (Array.isArray(p.secondarySourceVersions) && p.secondarySourceVersions.length > 0) model.SecondarySourceVersions = p.secondarySourceVersions.map(projectCodeBuildSourceVersion);
10070
10104
  const env = p.environment;
10071
10105
  if (env) model.Environment = {
10072
10106
  ...env.type !== void 0 && { Type: env.type },
@@ -10121,6 +10155,9 @@ const readCodeBuildProject = async ({ physicalId, declared, region }) => {
10121
10155
  ...cache.location !== void 0 && { Location: cache.location },
10122
10156
  ...cache.modes?.length && { Modes: cache.modes }
10123
10157
  };
10158
+ if (p.webhook) model.Triggers = projectCodeBuildTriggers(p.webhook);
10159
+ if (p.buildBatchConfig) model.BuildBatchConfig = projectCodeBuildBatchConfig(p.buildBatchConfig);
10160
+ if (typeof p.autoRetryLimit === "number" && p.autoRetryLimit > 0) model.AutoRetryLimit = p.autoRetryLimit;
10124
10161
  if (Array.isArray(p.tags) && p.tags.length > 0) model.Tags = p.tags.map((t) => ({
10125
10162
  Key: t.key,
10126
10163
  Value: t.value
@@ -10220,6 +10257,13 @@ const readDocDbCluster = async ({ physicalId, declared, region, accountId }) =>
10220
10257
  if (cl.DBClusterParameterGroup !== void 0) model.DBClusterParameterGroupName = cl.DBClusterParameterGroup;
10221
10258
  const sgs = (cl.VpcSecurityGroups ?? []).map((g) => g.VpcSecurityGroupId).filter((s) => s !== void 0);
10222
10259
  if (sgs.length > 0) model.VpcSecurityGroupIds = sgs;
10260
+ if (cl.ServerlessV2ScalingConfiguration !== void 0) model.ServerlessV2ScalingConfiguration = {
10261
+ ...cl.ServerlessV2ScalingConfiguration.MinCapacity !== void 0 && { MinCapacity: cl.ServerlessV2ScalingConfiguration.MinCapacity },
10262
+ ...cl.ServerlessV2ScalingConfiguration.MaxCapacity !== void 0 && { MaxCapacity: cl.ServerlessV2ScalingConfiguration.MaxCapacity }
10263
+ };
10264
+ if (cl.StorageType !== void 0) model.StorageType = cl.StorageType;
10265
+ if (cl.NetworkType !== void 0) model.NetworkType = cl.NetworkType;
10266
+ if (cl.DBSubnetGroup !== void 0) model.DBSubnetGroupName = cl.DBSubnetGroup;
10223
10267
  const tagArn = str$1(cl.DBClusterArn) ?? (accountId && id ? `arn:${partitionForRegion(region).partition}:rds:${region}:${accountId}:cluster:${id}` : void 0);
10224
10268
  if (tagArn) await attachDocDbTags(c, tagArn, declared, model, "DBCluster");
10225
10269
  return model;