@wraps.dev/cli 2.6.0 → 2.7.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 +3471 -1923
- package/dist/cli.js.map +1 -1
- package/dist/console/assets/index-B8Dwj3Ia.css +1 -0
- package/dist/console/assets/index-C-_YbUR8.js +497 -0
- package/dist/console/index.html +2 -2
- package/dist/lambda/event-processor/.bundled +1 -1
- package/dist/lambda/event-processor/index.mjs +1 -0
- package/dist/lambda/inbound-processor/.bundled +1 -0
- package/dist/lambda/inbound-processor/index.mjs +75 -0
- package/dist/lambda/inbound-processor/index.ts +234 -0
- package/dist/lambda/sms-event-processor/.bundled +1 -1
- package/dist/lambda/sms-event-processor/index.mjs +1 -0
- package/package.json +4 -6
- package/dist/console/assets/index-BkjyJsJy.js +0 -476
- package/dist/console/assets/index-C0PNzmYT.css +0 -1
package/dist/console/index.html
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"
|
|
12
12
|
rel="stylesheet"
|
|
13
13
|
>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
15
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-C-_YbUR8.js"></script>
|
|
15
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B8Dwj3Ia.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="root"></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at: 2026-02-
|
|
1
|
+
Built at: 2026-02-03T04:33:00.753Z
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
1
2
|
import{randomUUID as w}from"node:crypto";import{DynamoDBClient as k,PutItemCommand as I}from"@aws-sdk/client-dynamodb";var A=new k({});async function E(m,y){let l=y.awsRequestId,d=w().slice(0,8),a=(s,o)=>{console.log(JSON.stringify({requestId:l,batchId:d,msg:s,...o}))},T=(s,o,e)=>{console.error(JSON.stringify({requestId:l,batchId:d,msg:s,error:String(o),...e}))};a("Processing SES batch",{recordCount:m.Records.length});let u=process.env.TABLE_NAME;if(!u)throw new Error("TABLE_NAME environment variable not set");let g=Number.parseInt(process.env.RETENTION_DAYS||"90",10);for(let s of m.Records)try{let e=JSON.parse(s.body).detail,t=e.eventType||e.notificationType,r=e.mail,p=r.messageId,f=new Date(r.timestamp).getTime(),S=r.source,b=r.destination||[],v=r.commonHeaders?.subject||"";a("Processing email event",{messageId:p,eventType:t,recipientCount:b.length});let n={},i=f;if(t==="Send"&&e.send)n={tags:r.tags||{}};else if(t==="Delivery"&&e.delivery)i=new Date(e.delivery.timestamp).getTime(),n={timestamp:e.delivery.timestamp,processingTimeMillis:e.delivery.processingTimeMillis,recipients:e.delivery.recipients,smtpResponse:e.delivery.smtpResponse,remoteMtaIp:e.delivery.remoteMtaIp};else if(t==="Open"&&e.open)i=new Date(e.open.timestamp).getTime(),n={timestamp:e.open.timestamp,userAgent:e.open.userAgent,ipAddress:e.open.ipAddress};else if(t==="Click"&&e.click)i=new Date(e.click.timestamp).getTime(),n={timestamp:e.click.timestamp,link:e.click.link,linkTags:e.click.linkTags||{},userAgent:e.click.userAgent,ipAddress:e.click.ipAddress};else if(t==="Bounce"&&e.bounce){let c=e.bounce.bounceSubType;c==="Suppressed"||c==="OnAccountSuppressionList"?(t="Suppressed",i=new Date(e.bounce.timestamp).getTime(),n={reason:c,suppressedRecipients:e.bounce.bouncedRecipients,timestamp:e.bounce.timestamp,feedbackId:e.bounce.feedbackId}):(i=new Date(e.bounce.timestamp).getTime(),n={bounceType:e.bounce.bounceType,bounceSubType:e.bounce.bounceSubType,bouncedRecipients:e.bounce.bouncedRecipients,timestamp:e.bounce.timestamp,feedbackId:e.bounce.feedbackId})}else t==="Complaint"&&e.complaint?(i=new Date(e.complaint.timestamp).getTime(),n={complainedRecipients:e.complaint.complainedRecipients,timestamp:e.complaint.timestamp,feedbackId:e.complaint.feedbackId,complaintFeedbackType:e.complaint.complaintFeedbackType,userAgent:e.complaint.userAgent}):t==="Reject"&&e.reject?n={reason:e.reject.reason}:t==="Rendering Failure"&&e.failure?n={errorMessage:e.failure.errorMessage,templateName:e.failure.templateName}:t==="DeliveryDelay"&&e.deliveryDelay?(i=new Date(e.deliveryDelay.timestamp).getTime(),n={timestamp:e.deliveryDelay.timestamp,delayType:e.deliveryDelay.delayType,expirationTime:e.deliveryDelay.expirationTime,delayedRecipients:e.deliveryDelay.delayedRecipients}):t==="Subscription"&&e.subscription&&(i=new Date(e.subscription.timestamp).getTime(),n={contactList:e.subscription.contactList,timestamp:e.subscription.timestamp,source:e.subscription.source,newTopicPreferences:e.subscription.newTopicPreferences,oldTopicPreferences:e.subscription.oldTopicPreferences});let D=g>0?Date.now()+g*24*60*60*1e3:Date.now()+365*24*60*60*1e3;await A.send(new I({TableName:u,Item:{messageId:{S:p},sentAt:{N:i.toString()},accountId:{S:process.env.AWS_ACCOUNT_ID||"unknown"},from:{S},to:{L:b.map(c=>({S:c}))},subject:{S:v},eventType:{S:t},eventData:{S:JSON.stringify(e)},additionalData:{S:JSON.stringify(n)},createdAt:{N:Date.now().toString()},expiresAt:{N:D.toString()}}})),a("Stored event",{eventType:t,messageId:p})}catch(o){T("Error processing record",o,{sqsMessageId:s.messageId})}return{statusCode:200,body:JSON.stringify({message:"Events processed successfully"})}}export{E as handler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Built at: 2026-02-03T04:33:00.829Z
|