@wraps.dev/cli 3.14.0 → 3.15.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 CHANGED
@@ -24886,7 +24886,7 @@ function calculateUserWebhookCost(config2, emailsPerMonth) {
24886
24886
  description: "User webhook (API Destination invocations)"
24887
24887
  };
24888
24888
  }
24889
- function calculateCosts(config2, emailsPerMonth = 1e4) {
24889
+ function calculateCosts(config2, emailsPerMonth = 1e4, sesPlan = DEFAULT_SES_PLAN) {
24890
24890
  const tracking = calculateTrackingCost(config2);
24891
24891
  const reputationMetrics = calculateReputationMetricsCost(config2);
24892
24892
  const eventTracking = calculateEventTrackingCost(config2, emailsPerMonth);
@@ -24897,7 +24897,7 @@ function calculateCosts(config2, emailsPerMonth = 1e4) {
24897
24897
  const smtpCredentials = calculateSMTPCredentialsCost(config2);
24898
24898
  const alerts = calculateAlertingCost(config2);
24899
24899
  const userWebhook = calculateUserWebhookCost(config2, emailsPerMonth);
24900
- const sesEmailCost = Math.max(0, emailsPerMonth - FREE_TIER.SES_EMAILS) * AWS_PRICING.SES_PER_EMAIL;
24900
+ const sesEmailCost = monthlyCostForPlan(sesPlan, emailsPerMonth);
24901
24901
  const totalMonthlyCost = sesEmailCost + (tracking?.monthly || 0) + (reputationMetrics?.monthly || 0) + (eventTracking?.monthly || 0) + (dynamoDBHistory?.monthly || 0) + (emailArchiving?.monthly || 0) + (dedicatedIp?.monthly || 0) + (waf?.monthly || 0) + (smtpCredentials?.monthly || 0) + (alerts?.monthly || 0) + (userWebhook?.monthly || 0);
24902
24902
  return {
24903
24903
  tracking,
@@ -24912,7 +24912,7 @@ function calculateCosts(config2, emailsPerMonth = 1e4) {
24912
24912
  userWebhook,
24913
24913
  total: {
24914
24914
  monthly: totalMonthlyCost,
24915
- perEmail: AWS_PRICING.SES_PER_EMAIL,
24915
+ perEmail: SES_PLAN_RATES[sesPlan].tiers[0].per1K / 1e3,
24916
24916
  description: `Total estimated cost for ${emailsPerMonth.toLocaleString()} emails/month`
24917
24917
  }
24918
24918
  };
@@ -24926,14 +24926,14 @@ function formatCost(cost) {
24926
24926
  }
24927
24927
  return `$${cost.toFixed(2)}`;
24928
24928
  }
24929
- function getCostSummary(config2, emailsPerMonth = 1e4) {
24930
- const costs = calculateCosts(config2, emailsPerMonth);
24929
+ function getCostSummary(config2, emailsPerMonth = 1e4, sesPlan = DEFAULT_SES_PLAN) {
24930
+ const costs = calculateCosts(config2, emailsPerMonth, sesPlan);
24931
24931
  const lines = [];
24932
24932
  lines.push(
24933
24933
  `Estimated cost for ${emailsPerMonth.toLocaleString()} emails/month: ${formatCost(costs.total.monthly)}/mo`
24934
24934
  );
24935
24935
  lines.push(
24936
- ` (${formatCost((costs.total.perEmail ?? 0) * 1e3)}/1k emails + infrastructure)`
24936
+ ` (${formatCost((costs.total.perEmail ?? 0) * 1e3)}/1k emails on the SES ${SES_PLAN_RATES[sesPlan].label} plan + infrastructure)`
24937
24937
  );
24938
24938
  if (costs.tracking) {
24939
24939
  lines.push(
@@ -24987,15 +24987,15 @@ function getCostSummary(config2, emailsPerMonth = 1e4) {
24987
24987
  }
24988
24988
  return lines.join("\n");
24989
24989
  }
24990
- var AWS_PRICING, FREE_TIER;
24990
+ var DEFAULT_SES_PLAN, AWS_PRICING, FREE_TIER;
24991
24991
  var init_costs = __esm({
24992
24992
  "src/utils/email/costs.ts"() {
24993
24993
  "use strict";
24994
24994
  init_esm_shims();
24995
+ init_ses_plans2();
24996
+ DEFAULT_SES_PLAN = "ESSENTIALS";
24995
24997
  AWS_PRICING = {
24996
24998
  // SES pricing
24997
- SES_PER_EMAIL: 1e-4,
24998
- // $0.10 per 1,000 emails (outbound)
24999
24999
  SES_ATTACHMENT_PER_GB: 0.12,
25000
25000
  // $0.12 per GB of attachments
25001
25001
  // DynamoDB pricing (on-demand, Standard table class)
@@ -25042,9 +25042,6 @@ var init_costs = __esm({
25042
25042
  // $0.20 per million API Destination invocations
25043
25043
  };
25044
25044
  FREE_TIER = {
25045
- // SES: no free sending tier (the 3,000/mo-for-12-months offer was retired
25046
- // 2026-07-21; new accounts get generic $200 AWS credits instead)
25047
- SES_EMAILS: 0,
25048
25045
  // Lambda: Permanently free tier
25049
25046
  LAMBDA_REQUESTS: 1e6,
25050
25047
  // 1M requests per month (always free)