@apocaliss92/nodelink-js 0.4.30 → 0.4.31
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/{chunk-AZZKLRJV.js → chunk-XVFCEFM6.js} +1 -1
- package/dist/chunk-XVFCEFM6.js.map +1 -0
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +1 -1
- package/dist/index.cjs +6 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -13
- package/dist/index.d.ts +0 -13
- package/dist/index.js +7 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-AZZKLRJV.js.map +0 -1
package/dist/cli/rtsp-server.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -41131,8 +41131,10 @@ function createEmailPushServer(params) {
|
|
|
41131
41131
|
let server;
|
|
41132
41132
|
let status = buildInitialStatus(config);
|
|
41133
41133
|
function parseRecipient(rcpt) {
|
|
41134
|
-
const
|
|
41135
|
-
if (
|
|
41134
|
+
const at = rcpt.lastIndexOf("@");
|
|
41135
|
+
if (at <= 0 || at === rcpt.length - 1) return void 0;
|
|
41136
|
+
const local = rcpt.slice(0, at);
|
|
41137
|
+
const domain = rcpt.slice(at + 1).toLowerCase();
|
|
41136
41138
|
return { local, domain };
|
|
41137
41139
|
}
|
|
41138
41140
|
function resolveCameraIdFromRecipient(rcpt) {
|
|
@@ -41155,9 +41157,6 @@ function createEmailPushServer(params) {
|
|
|
41155
41157
|
return;
|
|
41156
41158
|
}
|
|
41157
41159
|
const receivedAtMs = Date.now();
|
|
41158
|
-
const imageAttachment = (parsed.attachments ?? []).find(
|
|
41159
|
-
(a) => a && typeof a.contentType === "string" && a.contentType.toLowerCase().startsWith("image/") && Buffer.isBuffer(a.content)
|
|
41160
|
-
);
|
|
41161
41160
|
const event = {
|
|
41162
41161
|
cameraId,
|
|
41163
41162
|
recipient,
|
|
@@ -41165,18 +41164,11 @@ function createEmailPushServer(params) {
|
|
|
41165
41164
|
receivedAtMs,
|
|
41166
41165
|
subject: parsed.subject ?? "",
|
|
41167
41166
|
from: typeof parsed.from === "object" && parsed.from !== null && "text" in parsed.from ? String(parsed.from.text) : "",
|
|
41168
|
-
bodyExcerpt: (parsed.text ?? "").slice(0, 500)
|
|
41169
|
-
...imageAttachment ? {
|
|
41170
|
-
attachment: {
|
|
41171
|
-
contentType: imageAttachment.contentType,
|
|
41172
|
-
data: imageAttachment.content,
|
|
41173
|
-
...imageAttachment.filename ? { filename: imageAttachment.filename } : {}
|
|
41174
|
-
}
|
|
41175
|
-
} : {}
|
|
41167
|
+
bodyExcerpt: (parsed.text ?? "").slice(0, 500)
|
|
41176
41168
|
};
|
|
41177
41169
|
status.messagesAccepted++;
|
|
41178
41170
|
log.info(
|
|
41179
|
-
`Email push for camera=${cameraId} type=${event.inferredType}
|
|
41171
|
+
`Email push for camera=${cameraId} type=${event.inferredType} subject="${event.subject.slice(0, 80)}"`
|
|
41180
41172
|
);
|
|
41181
41173
|
emitEmailPushEvent(event);
|
|
41182
41174
|
}
|