@go-to-k/cdkd 0.50.2 → 0.50.4

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
@@ -22204,23 +22204,14 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
22204
22204
  new GetAuthorizerCommand({ restApiId, authorizerId: physicalId })
22205
22205
  );
22206
22206
  const result = { RestApiId: restApiId };
22207
- if (resp.name !== void 0)
22208
- result["Name"] = resp.name;
22207
+ result["Name"] = resp.name ?? "";
22209
22208
  if (resp.type !== void 0)
22210
22209
  result["Type"] = resp.type;
22211
- if (resp.providerARNs !== void 0 && resp.providerARNs.length > 0) {
22212
- result["ProviderARNs"] = [...resp.providerARNs];
22213
- }
22214
- if (resp.authorizerUri !== void 0)
22215
- result["AuthorizerUri"] = resp.authorizerUri;
22216
- if (resp.authorizerCredentials !== void 0) {
22217
- result["AuthorizerCredentials"] = resp.authorizerCredentials;
22218
- }
22219
- if (resp.identitySource !== void 0)
22220
- result["IdentitySource"] = resp.identitySource;
22221
- if (resp.identityValidationExpression !== void 0) {
22222
- result["IdentityValidationExpression"] = resp.identityValidationExpression;
22223
- }
22210
+ result["ProviderARNs"] = resp.providerARNs ? [...resp.providerARNs] : [];
22211
+ result["AuthorizerUri"] = resp.authorizerUri ?? "";
22212
+ result["AuthorizerCredentials"] = resp.authorizerCredentials ?? "";
22213
+ result["IdentitySource"] = resp.identitySource ?? "";
22214
+ result["IdentityValidationExpression"] = resp.identityValidationExpression ?? "";
22224
22215
  if (resp.authorizerResultTtlInSeconds !== void 0) {
22225
22216
  result["AuthorizerResultTtlInSeconds"] = resp.authorizerResultTtlInSeconds;
22226
22217
  }
@@ -22240,8 +22231,7 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
22240
22231
  new GetResourceCommand3({ restApiId, resourceId: physicalId })
22241
22232
  );
22242
22233
  const result = { RestApiId: restApiId };
22243
- if (resp.parentId !== void 0)
22244
- result["ParentId"] = resp.parentId;
22234
+ result["ParentId"] = resp.parentId ?? "";
22245
22235
  if (resp.pathPart !== void 0)
22246
22236
  result["PathPart"] = resp.pathPart;
22247
22237
  return result;
@@ -22260,9 +22250,7 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
22260
22250
  new GetDeploymentCommand({ restApiId, deploymentId: physicalId })
22261
22251
  );
22262
22252
  const result = { RestApiId: restApiId };
22263
- if (resp.description !== void 0 && resp.description !== "") {
22264
- result["Description"] = resp.description;
22265
- }
22253
+ result["Description"] = resp.description ?? "";
22266
22254
  return result;
22267
22255
  } catch (err) {
22268
22256
  if (err instanceof NotFoundException3)
@@ -22281,11 +22269,8 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
22281
22269
  const result = { RestApiId: restApiId };
22282
22270
  if (resp.stageName !== void 0)
22283
22271
  result["StageName"] = resp.stageName;
22284
- if (resp.deploymentId !== void 0)
22285
- result["DeploymentId"] = resp.deploymentId;
22286
- if (resp.description !== void 0 && resp.description !== "") {
22287
- result["Description"] = resp.description;
22288
- }
22272
+ result["DeploymentId"] = resp.deploymentId ?? "";
22273
+ result["Description"] = resp.description ?? "";
22289
22274
  return result;
22290
22275
  } catch (err) {
22291
22276
  if (err instanceof NotFoundException3)
@@ -22297,9 +22282,7 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
22297
22282
  try {
22298
22283
  const resp = await this.apiGatewayClient.send(new GetAccountCommand({}));
22299
22284
  const result = {};
22300
- if (resp.cloudwatchRoleArn !== void 0) {
22301
- result["CloudWatchRoleArn"] = resp.cloudwatchRoleArn;
22302
- }
22285
+ result["CloudWatchRoleArn"] = resp.cloudwatchRoleArn ?? "";
22303
22286
  return result;
22304
22287
  } catch (err) {
22305
22288
  if (err instanceof NotFoundException3)
@@ -22326,12 +22309,9 @@ var ApiGatewayProvider = class _ApiGatewayProvider {
22326
22309
  if (resp.authorizationType !== void 0) {
22327
22310
  result["AuthorizationType"] = resp.authorizationType;
22328
22311
  }
22329
- if (resp.authorizerId !== void 0)
22330
- result["AuthorizerId"] = resp.authorizerId;
22331
- if (resp.methodIntegration)
22332
- result["Integration"] = resp.methodIntegration;
22333
- if (resp.methodResponses)
22334
- result["MethodResponses"] = resp.methodResponses;
22312
+ result["AuthorizerId"] = resp.authorizerId ?? "";
22313
+ result["Integration"] = resp.methodIntegration ?? {};
22314
+ result["MethodResponses"] = resp.methodResponses ?? {};
22335
22315
  return result;
22336
22316
  } catch (err) {
22337
22317
  if (err instanceof NotFoundException3)
@@ -22961,15 +22941,11 @@ var ApiGatewayV2Provider = class {
22961
22941
  try {
22962
22942
  const resp = await this.getClient().send(new GetApiCommand({ ApiId: physicalId }));
22963
22943
  const result = {};
22964
- if (resp.Name !== void 0)
22965
- result["Name"] = resp.Name;
22944
+ result["Name"] = resp.Name ?? "";
22966
22945
  if (resp.ProtocolType !== void 0)
22967
22946
  result["ProtocolType"] = resp.ProtocolType;
22968
- if (resp.Description !== void 0 && resp.Description !== "") {
22969
- result["Description"] = resp.Description;
22970
- }
22971
- if (resp.CorsConfiguration)
22972
- result["CorsConfiguration"] = resp.CorsConfiguration;
22947
+ result["Description"] = resp.Description ?? "";
22948
+ result["CorsConfiguration"] = resp.CorsConfiguration ?? {};
22973
22949
  const tags = normalizeAwsTagsToCfn(resp.Tags);
22974
22950
  result["Tags"] = tags;
22975
22951
  return result;
@@ -22990,11 +22966,8 @@ var ApiGatewayV2Provider = class {
22990
22966
  const result = { ApiId: apiId };
22991
22967
  if (resp.StageName !== void 0)
22992
22968
  result["StageName"] = resp.StageName;
22993
- if (resp.AutoDeploy !== void 0)
22994
- result["AutoDeploy"] = resp.AutoDeploy;
22995
- if (resp.Description !== void 0 && resp.Description !== "") {
22996
- result["Description"] = resp.Description;
22997
- }
22969
+ result["AutoDeploy"] = resp.AutoDeploy ?? false;
22970
+ result["Description"] = resp.Description ?? "";
22998
22971
  return result;
22999
22972
  } catch (err) {
23000
22973
  if (err instanceof NotFoundException4)
@@ -23013,13 +22986,9 @@ var ApiGatewayV2Provider = class {
23013
22986
  const result = { ApiId: apiId };
23014
22987
  if (resp.IntegrationType !== void 0)
23015
22988
  result["IntegrationType"] = resp.IntegrationType;
23016
- if (resp.IntegrationUri !== void 0)
23017
- result["IntegrationUri"] = resp.IntegrationUri;
23018
- if (resp.IntegrationMethod !== void 0)
23019
- result["IntegrationMethod"] = resp.IntegrationMethod;
23020
- if (resp.PayloadFormatVersion !== void 0) {
23021
- result["PayloadFormatVersion"] = resp.PayloadFormatVersion;
23022
- }
22989
+ result["IntegrationUri"] = resp.IntegrationUri ?? "";
22990
+ result["IntegrationMethod"] = resp.IntegrationMethod ?? "";
22991
+ result["PayloadFormatVersion"] = resp.PayloadFormatVersion ?? "";
23023
22992
  return result;
23024
22993
  } catch (err) {
23025
22994
  if (err instanceof NotFoundException4)
@@ -23038,12 +23007,9 @@ var ApiGatewayV2Provider = class {
23038
23007
  const result = { ApiId: apiId };
23039
23008
  if (resp.RouteKey !== void 0)
23040
23009
  result["RouteKey"] = resp.RouteKey;
23041
- if (resp.Target !== void 0)
23042
- result["Target"] = resp.Target;
23043
- if (resp.AuthorizationType !== void 0)
23044
- result["AuthorizationType"] = resp.AuthorizationType;
23045
- if (resp.AuthorizerId !== void 0)
23046
- result["AuthorizerId"] = resp.AuthorizerId;
23010
+ result["Target"] = resp.Target ?? "";
23011
+ result["AuthorizationType"] = resp.AuthorizationType ?? "";
23012
+ result["AuthorizerId"] = resp.AuthorizerId ?? "";
23047
23013
  return result;
23048
23014
  } catch (err) {
23049
23015
  if (err instanceof NotFoundException4)
@@ -23062,18 +23028,11 @@ var ApiGatewayV2Provider = class {
23062
23028
  const result = { ApiId: apiId };
23063
23029
  if (resp.AuthorizerType !== void 0)
23064
23030
  result["AuthorizerType"] = resp.AuthorizerType;
23065
- if (resp.Name !== void 0)
23066
- result["Name"] = resp.Name;
23067
- if (resp.IdentitySource !== void 0 && resp.IdentitySource.length > 0) {
23068
- result["IdentitySource"] = [...resp.IdentitySource];
23069
- }
23070
- if (resp.JwtConfiguration)
23071
- result["JwtConfiguration"] = resp.JwtConfiguration;
23072
- if (resp.AuthorizerUri !== void 0)
23073
- result["AuthorizerUri"] = resp.AuthorizerUri;
23074
- if (resp.AuthorizerPayloadFormatVersion !== void 0) {
23075
- result["AuthorizerPayloadFormatVersion"] = resp.AuthorizerPayloadFormatVersion;
23076
- }
23031
+ result["Name"] = resp.Name ?? "";
23032
+ result["IdentitySource"] = resp.IdentitySource ? [...resp.IdentitySource] : [];
23033
+ result["JwtConfiguration"] = resp.JwtConfiguration ?? {};
23034
+ result["AuthorizerUri"] = resp.AuthorizerUri ?? "";
23035
+ result["AuthorizerPayloadFormatVersion"] = resp.AuthorizerPayloadFormatVersion ?? "";
23077
23036
  return result;
23078
23037
  } catch (err) {
23079
23038
  if (err instanceof NotFoundException4)
@@ -28877,71 +28836,37 @@ var CognitoUserPoolProvider = class {
28877
28836
  const result = {};
28878
28837
  if (pool.Name !== void 0)
28879
28838
  result["UserPoolName"] = pool.Name;
28880
- if (pool.AutoVerifiedAttributes && pool.AutoVerifiedAttributes.length > 0) {
28881
- result["AutoVerifiedAttributes"] = [...pool.AutoVerifiedAttributes];
28882
- }
28883
- if (pool.UsernameAttributes && pool.UsernameAttributes.length > 0) {
28884
- result["UsernameAttributes"] = [...pool.UsernameAttributes];
28885
- }
28886
- if (pool.AliasAttributes && pool.AliasAttributes.length > 0) {
28887
- result["AliasAttributes"] = [...pool.AliasAttributes];
28888
- }
28889
- if (pool.Policies)
28890
- result["Policies"] = pool.Policies;
28839
+ result["AutoVerifiedAttributes"] = pool.AutoVerifiedAttributes ? [...pool.AutoVerifiedAttributes] : [];
28840
+ result["UsernameAttributes"] = pool.UsernameAttributes ? [...pool.UsernameAttributes] : [];
28841
+ result["AliasAttributes"] = pool.AliasAttributes ? [...pool.AliasAttributes] : [];
28842
+ result["Policies"] = pool.Policies ?? {};
28891
28843
  if (pool.SchemaAttributes && pool.SchemaAttributes.length > 0) {
28892
28844
  result["Schema"] = pool.SchemaAttributes;
28893
28845
  }
28894
- if (pool.LambdaConfig && Object.keys(pool.LambdaConfig).length > 0) {
28895
- result["LambdaConfig"] = pool.LambdaConfig;
28896
- }
28897
- if (pool.MfaConfiguration !== void 0)
28898
- result["MfaConfiguration"] = pool.MfaConfiguration;
28899
- if (pool.AdminCreateUserConfig)
28900
- result["AdminCreateUserConfig"] = pool.AdminCreateUserConfig;
28901
- if (pool.AccountRecoverySetting) {
28902
- result["AccountRecoverySetting"] = pool.AccountRecoverySetting;
28903
- }
28904
- if (pool.UserAttributeUpdateSettings) {
28905
- result["UserAttributeUpdateSettings"] = pool.UserAttributeUpdateSettings;
28906
- }
28907
- if (pool.DeletionProtection !== void 0) {
28908
- result["DeletionProtection"] = pool.DeletionProtection;
28909
- }
28910
- if (pool.EmailConfiguration)
28911
- result["EmailConfiguration"] = pool.EmailConfiguration;
28912
- if (pool.SmsConfiguration)
28913
- result["SmsConfiguration"] = pool.SmsConfiguration;
28914
- if (pool.VerificationMessageTemplate) {
28915
- result["VerificationMessageTemplate"] = pool.VerificationMessageTemplate;
28916
- }
28917
- if (pool.UsernameConfiguration) {
28918
- result["UsernameConfiguration"] = pool.UsernameConfiguration;
28919
- }
28920
- if (pool.DeviceConfiguration)
28921
- result["DeviceConfiguration"] = pool.DeviceConfiguration;
28922
- if (pool.UserPoolAddOns)
28923
- result["UserPoolAddOns"] = pool.UserPoolAddOns;
28924
- if (pool.EmailVerificationMessage !== void 0) {
28925
- result["EmailVerificationMessage"] = pool.EmailVerificationMessage;
28926
- }
28927
- if (pool.EmailVerificationSubject !== void 0) {
28928
- result["EmailVerificationSubject"] = pool.EmailVerificationSubject;
28929
- }
28930
- if (pool.SmsAuthenticationMessage !== void 0) {
28931
- result["SmsAuthenticationMessage"] = pool.SmsAuthenticationMessage;
28932
- }
28933
- if (pool.SmsVerificationMessage !== void 0) {
28934
- result["SmsVerificationMessage"] = pool.SmsVerificationMessage;
28935
- }
28846
+ result["LambdaConfig"] = pool.LambdaConfig ?? {};
28847
+ result["MfaConfiguration"] = pool.MfaConfiguration ?? "OFF";
28848
+ result["AdminCreateUserConfig"] = pool.AdminCreateUserConfig ?? {};
28849
+ result["AccountRecoverySetting"] = pool.AccountRecoverySetting ?? {};
28850
+ result["UserAttributeUpdateSettings"] = pool.UserAttributeUpdateSettings ?? {};
28851
+ result["DeletionProtection"] = pool.DeletionProtection ?? "INACTIVE";
28852
+ result["EmailConfiguration"] = pool.EmailConfiguration ?? {};
28853
+ result["SmsConfiguration"] = pool.SmsConfiguration ?? {};
28854
+ result["VerificationMessageTemplate"] = pool.VerificationMessageTemplate ?? {};
28855
+ result["UsernameConfiguration"] = pool.UsernameConfiguration ?? {};
28856
+ result["DeviceConfiguration"] = pool.DeviceConfiguration ?? {};
28857
+ result["UserPoolAddOns"] = pool.UserPoolAddOns ?? {};
28858
+ result["EmailVerificationMessage"] = pool.EmailVerificationMessage ?? "";
28859
+ result["EmailVerificationSubject"] = pool.EmailVerificationSubject ?? "";
28860
+ result["SmsAuthenticationMessage"] = pool.SmsAuthenticationMessage ?? "";
28861
+ result["SmsVerificationMessage"] = pool.SmsVerificationMessage ?? "";
28862
+ const userTags = {};
28936
28863
  if (pool.UserPoolTags) {
28937
- const userTags = {};
28938
28864
  for (const [k, v] of Object.entries(pool.UserPoolTags)) {
28939
28865
  if (!k.startsWith("aws:"))
28940
28866
  userTags[k] = v;
28941
28867
  }
28942
- if (Object.keys(userTags).length > 0)
28943
- result["UserPoolTags"] = userTags;
28944
28868
  }
28869
+ result["UserPoolTags"] = userTags;
28945
28870
  return result;
28946
28871
  }
28947
28872
  /**
@@ -30839,21 +30764,19 @@ var AppSyncProvider = class {
30839
30764
  if (api.authenticationType !== void 0) {
30840
30765
  result["AuthenticationType"] = api.authenticationType;
30841
30766
  }
30842
- if (api.xrayEnabled !== void 0)
30843
- result["XrayEnabled"] = api.xrayEnabled;
30844
- if (api.logConfig) {
30767
+ result["XrayEnabled"] = api.xrayEnabled ?? false;
30768
+ {
30845
30769
  const log = {};
30846
- if (api.logConfig.cloudWatchLogsRoleArn !== void 0) {
30770
+ if (api.logConfig?.cloudWatchLogsRoleArn !== void 0) {
30847
30771
  log["CloudWatchLogsRoleArn"] = api.logConfig.cloudWatchLogsRoleArn;
30848
30772
  }
30849
- if (api.logConfig.fieldLogLevel !== void 0) {
30773
+ if (api.logConfig?.fieldLogLevel !== void 0) {
30850
30774
  log["FieldLogLevel"] = api.logConfig.fieldLogLevel;
30851
30775
  }
30852
- if (api.logConfig.excludeVerboseContent !== void 0) {
30776
+ if (api.logConfig?.excludeVerboseContent !== void 0) {
30853
30777
  log["ExcludeVerboseContent"] = api.logConfig.excludeVerboseContent;
30854
30778
  }
30855
- if (Object.keys(log).length > 0)
30856
- result["LogConfig"] = log;
30779
+ result["LogConfig"] = log;
30857
30780
  }
30858
30781
  const tags = normalizeAwsTagsToCfn(api.tags);
30859
30782
  result["Tags"] = tags;
@@ -30879,11 +30802,8 @@ var AppSyncProvider = class {
30879
30802
  result["Name"] = ds.name;
30880
30803
  if (ds.type !== void 0)
30881
30804
  result["Type"] = ds.type;
30882
- if (ds.description !== void 0 && ds.description !== "") {
30883
- result["Description"] = ds.description;
30884
- }
30885
- if (ds.serviceRoleArn !== void 0)
30886
- result["ServiceRoleArn"] = ds.serviceRoleArn;
30805
+ result["Description"] = ds.description ?? "";
30806
+ result["ServiceRoleArn"] = ds.serviceRoleArn ?? "";
30887
30807
  if (ds.dynamodbConfig) {
30888
30808
  const dynamo = {};
30889
30809
  if (ds.dynamodbConfig.tableName !== void 0)
@@ -30929,31 +30849,24 @@ var AppSyncProvider = class {
30929
30849
  result["TypeName"] = resolver.typeName;
30930
30850
  if (resolver.fieldName !== void 0)
30931
30851
  result["FieldName"] = resolver.fieldName;
30932
- if (resolver.dataSourceName !== void 0)
30933
- result["DataSourceName"] = resolver.dataSourceName;
30934
- if (resolver.requestMappingTemplate !== void 0) {
30935
- result["RequestMappingTemplate"] = resolver.requestMappingTemplate;
30936
- }
30937
- if (resolver.responseMappingTemplate !== void 0) {
30938
- result["ResponseMappingTemplate"] = resolver.responseMappingTemplate;
30939
- }
30852
+ result["DataSourceName"] = resolver.dataSourceName ?? "";
30853
+ result["RequestMappingTemplate"] = resolver.requestMappingTemplate ?? "";
30854
+ result["ResponseMappingTemplate"] = resolver.responseMappingTemplate ?? "";
30940
30855
  if (resolver.kind !== void 0)
30941
30856
  result["Kind"] = resolver.kind;
30942
- if (resolver.pipelineConfig?.functions && resolver.pipelineConfig.functions.length > 0) {
30943
- result["PipelineConfig"] = { Functions: [...resolver.pipelineConfig.functions] };
30944
- }
30945
- if (resolver.runtime) {
30857
+ result["PipelineConfig"] = {
30858
+ Functions: resolver.pipelineConfig?.functions ? [...resolver.pipelineConfig.functions] : []
30859
+ };
30860
+ {
30946
30861
  const runtime = {};
30947
- if (resolver.runtime.name !== void 0)
30862
+ if (resolver.runtime?.name !== void 0)
30948
30863
  runtime["Name"] = resolver.runtime.name;
30949
- if (resolver.runtime.runtimeVersion !== void 0) {
30864
+ if (resolver.runtime?.runtimeVersion !== void 0) {
30950
30865
  runtime["RuntimeVersion"] = resolver.runtime.runtimeVersion;
30951
30866
  }
30952
- if (Object.keys(runtime).length > 0)
30953
- result["Runtime"] = runtime;
30867
+ result["Runtime"] = runtime;
30954
30868
  }
30955
- if (resolver.code !== void 0)
30956
- result["Code"] = resolver.code;
30869
+ result["Code"] = resolver.code ?? "";
30957
30870
  return result;
30958
30871
  }
30959
30872
  async readApiKey(physicalId) {
@@ -30975,9 +30888,7 @@ var AppSyncProvider = class {
30975
30888
  for (const key of resp.apiKeys ?? []) {
30976
30889
  if (key.id === apiKeyId) {
30977
30890
  const result = { ApiId: apiId };
30978
- if (key.description !== void 0 && key.description !== "") {
30979
- result["Description"] = key.description;
30980
- }
30891
+ result["Description"] = key.description ?? "";
30981
30892
  if (key.expires !== void 0)
30982
30893
  result["Expires"] = key.expires;
30983
30894
  return result;
@@ -42659,7 +42570,7 @@ function reorderArgs(argv) {
42659
42570
  }
42660
42571
  async function main() {
42661
42572
  const program = new Command14();
42662
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.50.2");
42573
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.50.4");
42663
42574
  program.addCommand(createBootstrapCommand());
42664
42575
  program.addCommand(createSynthCommand());
42665
42576
  program.addCommand(createListCommand());