@wraps.dev/cli 1.3.0 → 1.4.0
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 +37 -8
- package/dist/cli.js.map +1 -1
- package/dist/lambda/event-processor/.bundled +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -146,7 +146,7 @@ var require_package = __commonJS({
|
|
|
146
146
|
"package.json"(exports, module) {
|
|
147
147
|
module.exports = {
|
|
148
148
|
name: "@wraps.dev/cli",
|
|
149
|
-
version: "1.
|
|
149
|
+
version: "1.4.0",
|
|
150
150
|
description: "CLI for deploying Wraps email infrastructure to your AWS account",
|
|
151
151
|
type: "module",
|
|
152
152
|
main: "./dist/cli.js",
|
|
@@ -2796,7 +2796,9 @@ function createConnectionMetadata(accountId, region, provider, emailConfig, pres
|
|
|
2796
2796
|
function applyConfigUpdates(existingConfig, updates) {
|
|
2797
2797
|
const result = { ...existingConfig };
|
|
2798
2798
|
for (const [key, value] of Object.entries(updates)) {
|
|
2799
|
-
if (value === void 0)
|
|
2799
|
+
if (value === void 0) {
|
|
2800
|
+
continue;
|
|
2801
|
+
}
|
|
2800
2802
|
if (key === "tracking" && typeof value === "object") {
|
|
2801
2803
|
const trackingUpdate = value;
|
|
2802
2804
|
result.tracking = {
|
|
@@ -3269,6 +3271,7 @@ ${pc3.bold("Updated Permissions:")}`);
|
|
|
3269
3271
|
console.log(
|
|
3270
3272
|
` ${pc3.green("\u2713")} SES metrics and identity verification (always enabled)`
|
|
3271
3273
|
);
|
|
3274
|
+
console.log(` ${pc3.green("\u2713")} SES template management (always enabled)`);
|
|
3272
3275
|
if (sendingEnabled) {
|
|
3273
3276
|
console.log(` ${pc3.green("\u2713")} Email sending via SES`);
|
|
3274
3277
|
}
|
|
@@ -3302,6 +3305,18 @@ function buildConsolePolicyDocument(emailConfig) {
|
|
|
3302
3305
|
],
|
|
3303
3306
|
Resource: "*"
|
|
3304
3307
|
});
|
|
3308
|
+
statements.push({
|
|
3309
|
+
Effect: "Allow",
|
|
3310
|
+
Action: [
|
|
3311
|
+
"ses:GetTemplate",
|
|
3312
|
+
"ses:ListTemplates",
|
|
3313
|
+
"ses:CreateTemplate",
|
|
3314
|
+
"ses:UpdateTemplate",
|
|
3315
|
+
"ses:DeleteTemplate",
|
|
3316
|
+
"ses:TestRenderTemplate"
|
|
3317
|
+
],
|
|
3318
|
+
Resource: "*"
|
|
3319
|
+
});
|
|
3305
3320
|
const sendingEnabled = !emailConfig || emailConfig.sendingEnabled !== false;
|
|
3306
3321
|
if (sendingEnabled) {
|
|
3307
3322
|
statements.push({
|
|
@@ -4373,7 +4388,14 @@ ${pc4.bold("Current Configuration:")}
|
|
|
4373
4388
|
} else {
|
|
4374
4389
|
console.log(` Preset: ${pc4.cyan("custom")}`);
|
|
4375
4390
|
}
|
|
4376
|
-
const config2 = metadata.services.email
|
|
4391
|
+
const config2 = metadata.services.email?.config;
|
|
4392
|
+
if (!config2) {
|
|
4393
|
+
clack3.log.error("No email configuration found in metadata");
|
|
4394
|
+
clack3.log.info(
|
|
4395
|
+
`Use ${pc4.cyan("wraps email init")} to create new infrastructure.`
|
|
4396
|
+
);
|
|
4397
|
+
process.exit(1);
|
|
4398
|
+
}
|
|
4377
4399
|
if (config2.domain) {
|
|
4378
4400
|
console.log(` Sending Domain: ${pc4.cyan(config2.domain)}`);
|
|
4379
4401
|
}
|
|
@@ -5662,13 +5684,13 @@ async function restore(options) {
|
|
|
5662
5684
|
${pc9.bold("The following Wraps resources will be removed:")}
|
|
5663
5685
|
`
|
|
5664
5686
|
);
|
|
5665
|
-
if (metadata.services.email
|
|
5687
|
+
if (metadata.services.email?.config.tracking?.enabled) {
|
|
5666
5688
|
console.log(` ${pc9.cyan("\u2713")} Configuration Set (wraps-email-tracking)`);
|
|
5667
5689
|
}
|
|
5668
|
-
if (metadata.services.email
|
|
5690
|
+
if (metadata.services.email?.config.eventTracking?.dynamoDBHistory) {
|
|
5669
5691
|
console.log(` ${pc9.cyan("\u2713")} DynamoDB Table (wraps-email-history)`);
|
|
5670
5692
|
}
|
|
5671
|
-
if (metadata.services.email
|
|
5693
|
+
if (metadata.services.email?.config.eventTracking?.enabled) {
|
|
5672
5694
|
console.log(` ${pc9.cyan("\u2713")} EventBridge Rules`);
|
|
5673
5695
|
console.log(` ${pc9.cyan("\u2713")} SQS Queues`);
|
|
5674
5696
|
console.log(` ${pc9.cyan("\u2713")} Lambda Functions`);
|
|
@@ -5780,7 +5802,14 @@ ${pc10.bold("Current Configuration:")}
|
|
|
5780
5802
|
} else {
|
|
5781
5803
|
console.log(` Preset: ${pc10.cyan("custom")}`);
|
|
5782
5804
|
}
|
|
5783
|
-
const config2 = metadata.services.email
|
|
5805
|
+
const config2 = metadata.services.email?.config;
|
|
5806
|
+
if (!config2) {
|
|
5807
|
+
clack9.log.error("No email configuration found in metadata");
|
|
5808
|
+
clack9.log.info(
|
|
5809
|
+
`Use ${pc10.cyan("wraps email init")} to create new infrastructure.`
|
|
5810
|
+
);
|
|
5811
|
+
process.exit(1);
|
|
5812
|
+
}
|
|
5784
5813
|
if (config2.domain) {
|
|
5785
5814
|
console.log(` Sending Domain: ${pc10.cyan(config2.domain)}`);
|
|
5786
5815
|
}
|
|
@@ -7438,7 +7467,7 @@ function createSettingsRouter(config2) {
|
|
|
7438
7467
|
});
|
|
7439
7468
|
}
|
|
7440
7469
|
const configSetName = "wraps-email-tracking";
|
|
7441
|
-
const domain = metadata.services.email
|
|
7470
|
+
const domain = metadata.services.email?.config.domain;
|
|
7442
7471
|
const settings = await fetchEmailSettings(
|
|
7443
7472
|
config2.roleArn,
|
|
7444
7473
|
config2.region,
|