@wraps.dev/cli 2.11.8 → 2.11.10
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
|
@@ -95,7 +95,7 @@ async function stateBucketExists(accountId, region) {
|
|
|
95
95
|
await client.send(new HeadBucketCommand({ Bucket: bucketName }));
|
|
96
96
|
return true;
|
|
97
97
|
} catch (error) {
|
|
98
|
-
if (error.name === "NotFound" || error.name === "NoSuchBucket" || error.$metadata?.httpStatusCode === 404) {
|
|
98
|
+
if (error instanceof Error && (error.name === "NotFound" || error.name === "NoSuchBucket" || error.$metadata?.httpStatusCode === 404)) {
|
|
99
99
|
return false;
|
|
100
100
|
}
|
|
101
101
|
throw error;
|
|
@@ -117,7 +117,8 @@ async function ensureStateBucket(accountId, region) {
|
|
|
117
117
|
await client.send(new HeadBucketCommand({ Bucket: bucketName }));
|
|
118
118
|
return bucketName;
|
|
119
119
|
} catch (error) {
|
|
120
|
-
|
|
120
|
+
const isNotFound = error instanceof Error && (error.name === "NotFound" || error.name === "NoSuchBucket" || error.$metadata?.httpStatusCode === 404);
|
|
121
|
+
if (!isNotFound) {
|
|
121
122
|
throw error;
|
|
122
123
|
}
|
|
123
124
|
}
|
|
@@ -204,7 +205,7 @@ async function downloadMetadata(bucketName, accountId, region) {
|
|
|
204
205
|
}
|
|
205
206
|
return JSON.parse(body);
|
|
206
207
|
} catch (error) {
|
|
207
|
-
if (error.name === "NoSuchKey" || error.$metadata?.httpStatusCode === 404) {
|
|
208
|
+
if (error instanceof Error && (error.name === "NoSuchKey" || error.$metadata?.httpStatusCode === 404)) {
|
|
208
209
|
return null;
|
|
209
210
|
}
|
|
210
211
|
throw error;
|
|
@@ -277,7 +278,7 @@ async function migrateLocalPulumiState(localPulumiDir, bucketName, accountId, re
|
|
|
277
278
|
await s3Stack.importStack(state);
|
|
278
279
|
} catch (error) {
|
|
279
280
|
console.error(
|
|
280
|
-
`Warning: Failed to migrate stack ${stackName}: ${error.message}`
|
|
281
|
+
`Warning: Failed to migrate stack ${stackName}: ${error instanceof Error ? error.message : error}`
|
|
281
282
|
);
|
|
282
283
|
}
|
|
283
284
|
}
|
|
@@ -351,7 +352,7 @@ async function ensurePulumiWorkDir(options) {
|
|
|
351
352
|
} catch (error) {
|
|
352
353
|
const clack47 = await import("@clack/prompts");
|
|
353
354
|
clack47.log.warn(
|
|
354
|
-
`S3 state backend unavailable (${error.message}). Using local state.`
|
|
355
|
+
`S3 state backend unavailable (${error instanceof Error ? error.message : error}). Using local state.`
|
|
355
356
|
);
|
|
356
357
|
}
|
|
357
358
|
}
|
|
@@ -1815,7 +1816,7 @@ async function isSESSandbox(region) {
|
|
|
1815
1816
|
);
|
|
1816
1817
|
return false;
|
|
1817
1818
|
} catch (error) {
|
|
1818
|
-
if (error.name === "InvalidParameterValue") {
|
|
1819
|
+
if (error instanceof Error && error.name === "InvalidParameterValue") {
|
|
1819
1820
|
return true;
|
|
1820
1821
|
}
|
|
1821
1822
|
throw error;
|
|
@@ -4057,7 +4058,10 @@ async function loadConnectionMetadata(accountId, region) {
|
|
|
4057
4058
|
localData = data;
|
|
4058
4059
|
}
|
|
4059
4060
|
} catch (error) {
|
|
4060
|
-
console.error(
|
|
4061
|
+
console.error(
|
|
4062
|
+
"Error loading connection metadata:",
|
|
4063
|
+
error instanceof Error ? error.message : error
|
|
4064
|
+
);
|
|
4061
4065
|
}
|
|
4062
4066
|
}
|
|
4063
4067
|
if (process.env.WRAPS_LOCAL_ONLY !== "1") {
|
|
@@ -4115,7 +4119,10 @@ async function saveConnectionMetadata(metadata) {
|
|
|
4115
4119
|
const content = JSON.stringify(metadata, null, 2);
|
|
4116
4120
|
await writeFile3(metadataPath, content, "utf-8");
|
|
4117
4121
|
} catch (error) {
|
|
4118
|
-
console.error(
|
|
4122
|
+
console.error(
|
|
4123
|
+
"Error saving connection metadata:",
|
|
4124
|
+
error instanceof Error ? error.message : error
|
|
4125
|
+
);
|
|
4119
4126
|
throw error;
|
|
4120
4127
|
}
|
|
4121
4128
|
if (process.env.WRAPS_LOCAL_ONLY !== "1") {
|
|
@@ -4165,7 +4172,10 @@ async function listConnections() {
|
|
|
4165
4172
|
}
|
|
4166
4173
|
return connections;
|
|
4167
4174
|
} catch (error) {
|
|
4168
|
-
console.error(
|
|
4175
|
+
console.error(
|
|
4176
|
+
"Error listing connections:",
|
|
4177
|
+
error instanceof Error ? error.message : error
|
|
4178
|
+
);
|
|
4169
4179
|
return [];
|
|
4170
4180
|
}
|
|
4171
4181
|
}
|
|
@@ -4463,12 +4473,25 @@ var init_metadata = __esm({
|
|
|
4463
4473
|
}
|
|
4464
4474
|
});
|
|
4465
4475
|
|
|
4476
|
+
// src/constants.ts
|
|
4477
|
+
function getDefaultRegion() {
|
|
4478
|
+
return process.env.AWS_REGION || DEFAULT_AWS_REGION;
|
|
4479
|
+
}
|
|
4480
|
+
var DEFAULT_AWS_REGION;
|
|
4481
|
+
var init_constants = __esm({
|
|
4482
|
+
"src/constants.ts"() {
|
|
4483
|
+
"use strict";
|
|
4484
|
+
init_esm_shims();
|
|
4485
|
+
DEFAULT_AWS_REGION = "us-east-1";
|
|
4486
|
+
}
|
|
4487
|
+
});
|
|
4488
|
+
|
|
4466
4489
|
// src/infrastructure/shared/resource-checks.ts
|
|
4467
4490
|
async function roleExists(roleName) {
|
|
4468
4491
|
try {
|
|
4469
4492
|
const { IAMClient: IAMClient4, GetRoleCommand: GetRoleCommand3 } = await import("@aws-sdk/client-iam");
|
|
4470
4493
|
const iam9 = new IAMClient4({
|
|
4471
|
-
region:
|
|
4494
|
+
region: getDefaultRegion()
|
|
4472
4495
|
});
|
|
4473
4496
|
await iam9.send(new GetRoleCommand3({ RoleName: roleName }));
|
|
4474
4497
|
return true;
|
|
@@ -4484,7 +4507,7 @@ async function tableExists(tableName) {
|
|
|
4484
4507
|
try {
|
|
4485
4508
|
const { DynamoDBClient: DynamoDBClient6, DescribeTableCommand: DescribeTableCommand2 } = await import("@aws-sdk/client-dynamodb");
|
|
4486
4509
|
const dynamodb3 = new DynamoDBClient6({
|
|
4487
|
-
region:
|
|
4510
|
+
region: getDefaultRegion()
|
|
4488
4511
|
});
|
|
4489
4512
|
await dynamodb3.send(new DescribeTableCommand2({ TableName: tableName }));
|
|
4490
4513
|
return true;
|
|
@@ -4500,7 +4523,7 @@ async function sqsQueueExists(queueName) {
|
|
|
4500
4523
|
try {
|
|
4501
4524
|
const { SQSClient, GetQueueUrlCommand } = await import("@aws-sdk/client-sqs");
|
|
4502
4525
|
const sqs5 = new SQSClient({
|
|
4503
|
-
region:
|
|
4526
|
+
region: getDefaultRegion()
|
|
4504
4527
|
});
|
|
4505
4528
|
const response = await sqs5.send(
|
|
4506
4529
|
new GetQueueUrlCommand({ QueueName: queueName })
|
|
@@ -4514,7 +4537,7 @@ async function snsTopicExists(topicName) {
|
|
|
4514
4537
|
try {
|
|
4515
4538
|
const { SNSClient: SNSClient2, ListTopicsCommand: ListTopicsCommand2 } = await import("@aws-sdk/client-sns");
|
|
4516
4539
|
const sns3 = new SNSClient2({
|
|
4517
|
-
region:
|
|
4540
|
+
region: getDefaultRegion()
|
|
4518
4541
|
});
|
|
4519
4542
|
let nextToken;
|
|
4520
4543
|
do {
|
|
@@ -4538,7 +4561,7 @@ async function lambdaFunctionExists(functionName) {
|
|
|
4538
4561
|
try {
|
|
4539
4562
|
const { LambdaClient: LambdaClient2, GetFunctionCommand } = await import("@aws-sdk/client-lambda");
|
|
4540
4563
|
const lambda4 = new LambdaClient2({
|
|
4541
|
-
region:
|
|
4564
|
+
region: getDefaultRegion()
|
|
4542
4565
|
});
|
|
4543
4566
|
await lambda4.send(new GetFunctionCommand({ FunctionName: functionName }));
|
|
4544
4567
|
return true;
|
|
@@ -4554,6 +4577,7 @@ var init_resource_checks = __esm({
|
|
|
4554
4577
|
"src/infrastructure/shared/resource-checks.ts"() {
|
|
4555
4578
|
"use strict";
|
|
4556
4579
|
init_esm_shims();
|
|
4580
|
+
init_constants();
|
|
4557
4581
|
}
|
|
4558
4582
|
});
|
|
4559
4583
|
|
|
@@ -4778,7 +4802,7 @@ async function findEventSourceMapping(functionName, queueArn) {
|
|
|
4778
4802
|
try {
|
|
4779
4803
|
const { LambdaClient: LambdaClient2, ListEventSourceMappingsCommand } = await import("@aws-sdk/client-lambda");
|
|
4780
4804
|
const lambda4 = new LambdaClient2({
|
|
4781
|
-
region:
|
|
4805
|
+
region: getDefaultRegion()
|
|
4782
4806
|
});
|
|
4783
4807
|
const response = await lambda4.send(
|
|
4784
4808
|
new ListEventSourceMappingsCommand({
|
|
@@ -4847,7 +4871,8 @@ async function deployLambdaFunctions(config2) {
|
|
|
4847
4871
|
]
|
|
4848
4872
|
}),
|
|
4849
4873
|
tags: {
|
|
4850
|
-
ManagedBy: "wraps-cli"
|
|
4874
|
+
ManagedBy: "wraps-cli",
|
|
4875
|
+
Service: "email"
|
|
4851
4876
|
}
|
|
4852
4877
|
});
|
|
4853
4878
|
new aws7.iam.RolePolicyAttachment("wraps-email-lambda-basic-execution", {
|
|
@@ -4912,6 +4937,7 @@ async function deployLambdaFunctions(config2) {
|
|
|
4912
4937
|
environment: lambdaEnvironment,
|
|
4913
4938
|
tags: {
|
|
4914
4939
|
ManagedBy: "wraps-cli",
|
|
4940
|
+
Service: "email",
|
|
4915
4941
|
Description: "Process SES email events from SQS and store in DynamoDB"
|
|
4916
4942
|
}
|
|
4917
4943
|
},
|
|
@@ -4970,6 +4996,7 @@ var init_lambda = __esm({
|
|
|
4970
4996
|
"src/infrastructure/resources/lambda.ts"() {
|
|
4971
4997
|
"use strict";
|
|
4972
4998
|
init_esm_shims();
|
|
4999
|
+
init_constants();
|
|
4973
5000
|
init_resource_checks();
|
|
4974
5001
|
nodeBuiltins = builtinModules.flatMap((m) => [m, `node:${m}`]);
|
|
4975
5002
|
}
|
|
@@ -5286,7 +5313,7 @@ function retentionToAWSPeriod2(retention) {
|
|
|
5286
5313
|
}
|
|
5287
5314
|
}
|
|
5288
5315
|
async function createMailManagerArchive(config2) {
|
|
5289
|
-
const region = config2.region ||
|
|
5316
|
+
const region = config2.region || getDefaultRegion();
|
|
5290
5317
|
const archiveName = `wraps-${config2.name}-archive`;
|
|
5291
5318
|
const mailManagerClient = new MailManagerClient({ region });
|
|
5292
5319
|
const sesClient = new SESv2Client2({ region });
|
|
@@ -5388,6 +5415,7 @@ var init_mail_manager = __esm({
|
|
|
5388
5415
|
"src/infrastructure/resources/mail-manager.ts"() {
|
|
5389
5416
|
"use strict";
|
|
5390
5417
|
init_esm_shims();
|
|
5418
|
+
init_constants();
|
|
5391
5419
|
}
|
|
5392
5420
|
});
|
|
5393
5421
|
|
|
@@ -9867,12 +9895,13 @@ async function createServiceIAMRole(config2) {
|
|
|
9867
9895
|
|
|
9868
9896
|
// src/infrastructure/vercel-oidc.ts
|
|
9869
9897
|
init_esm_shims();
|
|
9898
|
+
init_constants();
|
|
9870
9899
|
import * as aws3 from "@pulumi/aws";
|
|
9871
9900
|
async function getExistingOIDCProviderArn(url) {
|
|
9872
9901
|
try {
|
|
9873
9902
|
const { IAMClient: IAMClient4, ListOpenIDConnectProvidersCommand } = await import("@aws-sdk/client-iam");
|
|
9874
9903
|
const iam9 = new IAMClient4({
|
|
9875
|
-
region:
|
|
9904
|
+
region: getDefaultRegion()
|
|
9876
9905
|
});
|
|
9877
9906
|
const response = await iam9.send(new ListOpenIDConnectProvidersCommand({}));
|
|
9878
9907
|
const expectedArnSuffix = url.replace("https://", "");
|
|
@@ -14852,6 +14881,7 @@ async function createAlertingResources(config2) {
|
|
|
14852
14881
|
displayName: "Wraps Email Alerts",
|
|
14853
14882
|
tags: {
|
|
14854
14883
|
ManagedBy: "wraps-cli",
|
|
14884
|
+
Service: "email",
|
|
14855
14885
|
Description: "Alert notifications for email reputation and health"
|
|
14856
14886
|
}
|
|
14857
14887
|
});
|
|
@@ -14898,6 +14928,7 @@ async function createAlertingResources(config2) {
|
|
|
14898
14928
|
// Don't alarm if no data (no emails sent)
|
|
14899
14929
|
tags: {
|
|
14900
14930
|
ManagedBy: "wraps-cli",
|
|
14931
|
+
Service: "email",
|
|
14901
14932
|
Severity: "warning"
|
|
14902
14933
|
}
|
|
14903
14934
|
}
|
|
@@ -14921,6 +14952,7 @@ async function createAlertingResources(config2) {
|
|
|
14921
14952
|
treatMissingData: "notBreaching",
|
|
14922
14953
|
tags: {
|
|
14923
14954
|
ManagedBy: "wraps-cli",
|
|
14955
|
+
Service: "email",
|
|
14924
14956
|
Severity: "critical"
|
|
14925
14957
|
}
|
|
14926
14958
|
}
|
|
@@ -14942,6 +14974,7 @@ async function createAlertingResources(config2) {
|
|
|
14942
14974
|
treatMissingData: "notBreaching",
|
|
14943
14975
|
tags: {
|
|
14944
14976
|
ManagedBy: "wraps-cli",
|
|
14977
|
+
Service: "email",
|
|
14945
14978
|
Severity: "warning"
|
|
14946
14979
|
}
|
|
14947
14980
|
}
|
|
@@ -14963,6 +14996,7 @@ async function createAlertingResources(config2) {
|
|
|
14963
14996
|
treatMissingData: "notBreaching",
|
|
14964
14997
|
tags: {
|
|
14965
14998
|
ManagedBy: "wraps-cli",
|
|
14999
|
+
Service: "email",
|
|
14966
15000
|
Severity: "critical"
|
|
14967
15001
|
}
|
|
14968
15002
|
}
|
|
@@ -14988,6 +15022,7 @@ async function createAlertingResources(config2) {
|
|
|
14988
15022
|
treatMissingData: "notBreaching",
|
|
14989
15023
|
tags: {
|
|
14990
15024
|
ManagedBy: "wraps-cli",
|
|
15025
|
+
Service: "email",
|
|
14991
15026
|
Severity: "warning"
|
|
14992
15027
|
}
|
|
14993
15028
|
});
|
|
@@ -15036,7 +15071,8 @@ async function createDynamoDBTables(_config) {
|
|
|
15036
15071
|
attributeName: "expiresAt"
|
|
15037
15072
|
},
|
|
15038
15073
|
tags: {
|
|
15039
|
-
ManagedBy: "wraps-cli"
|
|
15074
|
+
ManagedBy: "wraps-cli",
|
|
15075
|
+
Service: "email"
|
|
15040
15076
|
}
|
|
15041
15077
|
},
|
|
15042
15078
|
{
|
|
@@ -15090,7 +15126,8 @@ async function createEventBridgeResources(config2) {
|
|
|
15090
15126
|
// We capture all by not filtering on detail-type
|
|
15091
15127
|
}),
|
|
15092
15128
|
tags: {
|
|
15093
|
-
ManagedBy: "wraps-cli"
|
|
15129
|
+
ManagedBy: "wraps-cli",
|
|
15130
|
+
Service: "email"
|
|
15094
15131
|
}
|
|
15095
15132
|
});
|
|
15096
15133
|
new aws6.sqs.QueuePolicy("wraps-email-events-queue-policy", {
|
|
@@ -15168,7 +15205,8 @@ async function createEventBridgeResources(config2) {
|
|
|
15168
15205
|
]
|
|
15169
15206
|
}),
|
|
15170
15207
|
tags: {
|
|
15171
|
-
ManagedBy: "wraps-cli"
|
|
15208
|
+
ManagedBy: "wraps-cli",
|
|
15209
|
+
Service: "email"
|
|
15172
15210
|
}
|
|
15173
15211
|
});
|
|
15174
15212
|
new aws6.iam.RolePolicy("wraps-webhook-policy", {
|
|
@@ -15316,7 +15354,8 @@ async function createIAMRole(config2) {
|
|
|
15316
15354
|
oidcProvider: config2.oidcProvider,
|
|
15317
15355
|
vercelTeamSlug: config2.vercelTeamSlug,
|
|
15318
15356
|
vercelProjectName: config2.vercelProjectName,
|
|
15319
|
-
policyStatements: statements
|
|
15357
|
+
policyStatements: statements,
|
|
15358
|
+
extraTags: { Service: "email" }
|
|
15320
15359
|
});
|
|
15321
15360
|
}
|
|
15322
15361
|
|
|
@@ -15335,7 +15374,7 @@ async function configurationSetExists(configSetName, region) {
|
|
|
15335
15374
|
);
|
|
15336
15375
|
return true;
|
|
15337
15376
|
} catch (error) {
|
|
15338
|
-
if (error.name === "NotFoundException") {
|
|
15377
|
+
if (error instanceof Error && error.name === "NotFoundException") {
|
|
15339
15378
|
return false;
|
|
15340
15379
|
}
|
|
15341
15380
|
console.error("Error checking for existing configuration set:", error);
|
|
@@ -15353,7 +15392,7 @@ async function eventDestinationExists(configSetName, eventDestName, region) {
|
|
|
15353
15392
|
);
|
|
15354
15393
|
return response.EventDestinations?.some((dest) => dest.Name === eventDestName) ?? false;
|
|
15355
15394
|
} catch (error) {
|
|
15356
|
-
if (error.name === "NotFoundException") {
|
|
15395
|
+
if (error instanceof Error && error.name === "NotFoundException") {
|
|
15357
15396
|
return false;
|
|
15358
15397
|
}
|
|
15359
15398
|
return false;
|
|
@@ -15368,7 +15407,7 @@ async function emailIdentityExists(emailIdentity, region) {
|
|
|
15368
15407
|
);
|
|
15369
15408
|
return true;
|
|
15370
15409
|
} catch (error) {
|
|
15371
|
-
if (error.name === "NotFoundException") {
|
|
15410
|
+
if (error instanceof Error && error.name === "NotFoundException") {
|
|
15372
15411
|
return false;
|
|
15373
15412
|
}
|
|
15374
15413
|
console.error("Error checking for existing email identity:", error);
|
|
@@ -15389,6 +15428,7 @@ async function createSESResources(config2) {
|
|
|
15389
15428
|
},
|
|
15390
15429
|
tags: {
|
|
15391
15430
|
ManagedBy: "wraps-cli",
|
|
15431
|
+
Service: "email",
|
|
15392
15432
|
Description: "Wraps email tracking configuration set"
|
|
15393
15433
|
}
|
|
15394
15434
|
};
|
|
@@ -15477,7 +15517,8 @@ async function createSESResources(config2) {
|
|
|
15477
15517
|
nextSigningKeyLength: "RSA_2048_BIT"
|
|
15478
15518
|
},
|
|
15479
15519
|
tags: {
|
|
15480
|
-
ManagedBy: "wraps-cli"
|
|
15520
|
+
ManagedBy: "wraps-cli",
|
|
15521
|
+
Service: "email"
|
|
15481
15522
|
}
|
|
15482
15523
|
});
|
|
15483
15524
|
dkimTokens = domainIdentity.dkimSigningAttributes.apply(
|
|
@@ -15515,6 +15556,7 @@ async function createSESResources(config2) {
|
|
|
15515
15556
|
|
|
15516
15557
|
// src/infrastructure/resources/smtp-credentials.ts
|
|
15517
15558
|
init_esm_shims();
|
|
15559
|
+
init_constants();
|
|
15518
15560
|
import { createHmac as createHmac2 } from "crypto";
|
|
15519
15561
|
import * as aws9 from "@pulumi/aws";
|
|
15520
15562
|
function convertToSMTPPassword2(secretAccessKey, region) {
|
|
@@ -15538,12 +15580,12 @@ async function userExists(userName) {
|
|
|
15538
15580
|
try {
|
|
15539
15581
|
const { IAMClient: IAMClient4, GetUserCommand } = await import("@aws-sdk/client-iam");
|
|
15540
15582
|
const iam9 = new IAMClient4({
|
|
15541
|
-
region:
|
|
15583
|
+
region: getDefaultRegion()
|
|
15542
15584
|
});
|
|
15543
15585
|
await iam9.send(new GetUserCommand({ UserName: userName }));
|
|
15544
15586
|
return true;
|
|
15545
15587
|
} catch (error) {
|
|
15546
|
-
if (error.name === "NoSuchEntityException" || error.Code === "NoSuchEntity") {
|
|
15588
|
+
if (error instanceof Error && (error.name === "NoSuchEntityException" || error.Code === "NoSuchEntity")) {
|
|
15547
15589
|
return false;
|
|
15548
15590
|
}
|
|
15549
15591
|
return false;
|
|
@@ -15558,6 +15600,7 @@ async function createSMTPCredentials(config2) {
|
|
|
15558
15600
|
name: userName,
|
|
15559
15601
|
tags: {
|
|
15560
15602
|
ManagedBy: "wraps-cli",
|
|
15603
|
+
Service: "email",
|
|
15561
15604
|
Purpose: "SES SMTP Authentication"
|
|
15562
15605
|
}
|
|
15563
15606
|
},
|
|
@@ -15610,6 +15653,7 @@ async function createSQSResources() {
|
|
|
15610
15653
|
// 14 days
|
|
15611
15654
|
tags: {
|
|
15612
15655
|
ManagedBy: "wraps-cli",
|
|
15656
|
+
Service: "email",
|
|
15613
15657
|
Description: "Dead letter queue for failed SES event processing"
|
|
15614
15658
|
}
|
|
15615
15659
|
});
|
|
@@ -15630,6 +15674,7 @@ async function createSQSResources() {
|
|
|
15630
15674
|
),
|
|
15631
15675
|
tags: {
|
|
15632
15676
|
ManagedBy: "wraps-cli",
|
|
15677
|
+
Service: "email",
|
|
15633
15678
|
Description: "Queue for SES email events from EventBridge"
|
|
15634
15679
|
}
|
|
15635
15680
|
});
|
|
@@ -16194,7 +16239,10 @@ async function scanSESIdentities(region) {
|
|
|
16194
16239
|
}
|
|
16195
16240
|
return identities;
|
|
16196
16241
|
} catch (error) {
|
|
16197
|
-
console.error(
|
|
16242
|
+
console.error(
|
|
16243
|
+
"Error scanning SES identities:",
|
|
16244
|
+
error instanceof Error ? error.message : error
|
|
16245
|
+
);
|
|
16198
16246
|
return [];
|
|
16199
16247
|
}
|
|
16200
16248
|
}
|
|
@@ -16221,12 +16269,18 @@ async function scanSESConfigurationSets(region) {
|
|
|
16221
16269
|
eventDestinations
|
|
16222
16270
|
});
|
|
16223
16271
|
} catch (error) {
|
|
16224
|
-
console.error(
|
|
16272
|
+
console.error(
|
|
16273
|
+
`Error describing config set ${name}:`,
|
|
16274
|
+
error instanceof Error ? error.message : error
|
|
16275
|
+
);
|
|
16225
16276
|
}
|
|
16226
16277
|
}
|
|
16227
16278
|
return configSets;
|
|
16228
16279
|
} catch (error) {
|
|
16229
|
-
console.error(
|
|
16280
|
+
console.error(
|
|
16281
|
+
"Error scanning SES configuration sets:",
|
|
16282
|
+
error instanceof Error ? error.message : error
|
|
16283
|
+
);
|
|
16230
16284
|
return [];
|
|
16231
16285
|
}
|
|
16232
16286
|
}
|
|
@@ -16254,13 +16308,16 @@ async function scanSNSTopics(region) {
|
|
|
16254
16308
|
} catch (error) {
|
|
16255
16309
|
console.error(
|
|
16256
16310
|
`Error getting topic attributes for ${arn}:`,
|
|
16257
|
-
error.message
|
|
16311
|
+
error instanceof Error ? error.message : error
|
|
16258
16312
|
);
|
|
16259
16313
|
}
|
|
16260
16314
|
}
|
|
16261
16315
|
return topics;
|
|
16262
16316
|
} catch (error) {
|
|
16263
|
-
console.error(
|
|
16317
|
+
console.error(
|
|
16318
|
+
"Error scanning SNS topics:",
|
|
16319
|
+
error instanceof Error ? error.message : error
|
|
16320
|
+
);
|
|
16264
16321
|
return [];
|
|
16265
16322
|
}
|
|
16266
16323
|
}
|
|
@@ -16285,12 +16342,18 @@ async function scanDynamoTables(region) {
|
|
|
16285
16342
|
});
|
|
16286
16343
|
}
|
|
16287
16344
|
} catch (error) {
|
|
16288
|
-
console.error(
|
|
16345
|
+
console.error(
|
|
16346
|
+
`Error describing table ${name}:`,
|
|
16347
|
+
error instanceof Error ? error.message : error
|
|
16348
|
+
);
|
|
16289
16349
|
}
|
|
16290
16350
|
}
|
|
16291
16351
|
return tables;
|
|
16292
16352
|
} catch (error) {
|
|
16293
|
-
console.error(
|
|
16353
|
+
console.error(
|
|
16354
|
+
"Error scanning DynamoDB tables:",
|
|
16355
|
+
error instanceof Error ? error.message : error
|
|
16356
|
+
);
|
|
16294
16357
|
return [];
|
|
16295
16358
|
}
|
|
16296
16359
|
}
|
|
@@ -16312,7 +16375,10 @@ async function scanLambdaFunctions(region) {
|
|
|
16312
16375
|
}
|
|
16313
16376
|
return functions;
|
|
16314
16377
|
} catch (error) {
|
|
16315
|
-
console.error(
|
|
16378
|
+
console.error(
|
|
16379
|
+
"Error scanning Lambda functions:",
|
|
16380
|
+
error instanceof Error ? error.message : error
|
|
16381
|
+
);
|
|
16316
16382
|
return [];
|
|
16317
16383
|
}
|
|
16318
16384
|
}
|
|
@@ -16344,7 +16410,10 @@ async function scanIAMRoles(region) {
|
|
|
16344
16410
|
}
|
|
16345
16411
|
return roles;
|
|
16346
16412
|
} catch (error) {
|
|
16347
|
-
console.error(
|
|
16413
|
+
console.error(
|
|
16414
|
+
"Error scanning IAM roles:",
|
|
16415
|
+
error instanceof Error ? error.message : error
|
|
16416
|
+
);
|
|
16348
16417
|
return [];
|
|
16349
16418
|
}
|
|
16350
16419
|
}
|
|
@@ -27035,7 +27104,7 @@ function createSettingsRouter(config2) {
|
|
|
27035
27104
|
});
|
|
27036
27105
|
} catch (error) {
|
|
27037
27106
|
console.error("[Verify] Error verifying tracking domain:", error);
|
|
27038
|
-
if (error.code === "ENODATA" || error.code === "ENOTFOUND") {
|
|
27107
|
+
if (error instanceof Error && (error.code === "ENODATA" || error.code === "ENOTFOUND")) {
|
|
27039
27108
|
return res.json({
|
|
27040
27109
|
verified: false,
|
|
27041
27110
|
error: "No CNAME record found for this domain"
|
|
@@ -27069,7 +27138,7 @@ function createSettingsRouter(config2) {
|
|
|
27069
27138
|
});
|
|
27070
27139
|
} catch (error) {
|
|
27071
27140
|
console.error("[Verify] Error verifying DMARC:", error);
|
|
27072
|
-
if (error.code === "ENODATA" || error.code === "ENOTFOUND") {
|
|
27141
|
+
if (error instanceof Error && (error.code === "ENODATA" || error.code === "ENOTFOUND")) {
|
|
27073
27142
|
return res.json({
|
|
27074
27143
|
verified: false,
|
|
27075
27144
|
error: "No DMARC record found for this domain"
|
|
@@ -28495,6 +28564,7 @@ import pc39 from "picocolors";
|
|
|
28495
28564
|
|
|
28496
28565
|
// src/infrastructure/sms-stack.ts
|
|
28497
28566
|
init_esm_shims();
|
|
28567
|
+
init_constants();
|
|
28498
28568
|
import * as aws18 from "@pulumi/aws";
|
|
28499
28569
|
import * as pulumi24 from "@pulumi/pulumi";
|
|
28500
28570
|
init_resource_checks();
|
|
@@ -28614,7 +28684,7 @@ async function findExistingPhoneNumber(phoneNumberType) {
|
|
|
28614
28684
|
try {
|
|
28615
28685
|
const { PinpointSMSVoiceV2Client: PinpointSMSVoiceV2Client5, DescribePhoneNumbersCommand: DescribePhoneNumbersCommand2 } = await import("@aws-sdk/client-pinpoint-sms-voice-v2");
|
|
28616
28686
|
const client = new PinpointSMSVoiceV2Client5({
|
|
28617
|
-
region:
|
|
28687
|
+
region: getDefaultRegion()
|
|
28618
28688
|
});
|
|
28619
28689
|
const numberTypeMap = {
|
|
28620
28690
|
simulator: "SIMULATOR",
|