mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
add line ending stuff
This commit is contained in:
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/nodemailer/nodemailer
|
||||
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
|
||||
// Piotr Roszatycki <https://github.com/dex4er>
|
||||
// Daniel Chao <https://github.com/bioball>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
|
||||
Vendored
+5
-7
@@ -1,14 +1,12 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
import { Transport, TransportOptions } from '../..';
|
||||
|
||||
import { Transport, TransportOptions } from '..';
|
||||
import * as shared from './../shared';
|
||||
|
||||
import * as shared from './shared';
|
||||
|
||||
import Mail = require('./mailer');
|
||||
import MailMessage = require('./mailer/mail-message');
|
||||
import MimeNode = require('./mime-node');
|
||||
import Mail = require('./../mailer');
|
||||
import MailMessage = require('./../mailer/mail-message');
|
||||
import MimeNode = require('./../mime-node');
|
||||
|
||||
declare namespace SendmailTransport {
|
||||
type MailOptions = Mail.Options;
|
||||
@@ -0,0 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Duplex } from 'stream';
|
||||
|
||||
declare class LeUnix extends Duplex {}
|
||||
|
||||
export = LeUnix;
|
||||
@@ -0,0 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Duplex } from 'stream';
|
||||
|
||||
declare class LeWindows extends Duplex {}
|
||||
|
||||
export = LeWindows;
|
||||
@@ -21,6 +21,8 @@ import SMTPTransport = require('nodemailer/lib/smtp-transport');
|
||||
import StreamTransport = require('nodemailer/lib/stream-transport');
|
||||
import wellKnown = require('nodemailer/lib/well-known');
|
||||
import XOAuth2 = require('nodemailer/lib/xoauth2');
|
||||
import LeWindows = require('nodemailer/lib/sendmail-transport/le-windows');
|
||||
import LeUnix = require('nodemailer/lib/sendmail-transport/le-unix');
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as stream from 'stream';
|
||||
@@ -722,6 +724,25 @@ function sendmail_test() {
|
||||
});
|
||||
}
|
||||
|
||||
// line ending transforms using windows-style newlines
|
||||
|
||||
function sendmail_line_endings_windows_test () {
|
||||
function process_le (mail: MailMessage) {
|
||||
const input = mail.message.createReadStream();
|
||||
input.pipe(new LeWindows());
|
||||
}
|
||||
}
|
||||
|
||||
// line ending transforms using unix-style newlines
|
||||
|
||||
function sendmail_line_endings_unix_test() {
|
||||
function process_le(mail: MailMessage) {
|
||||
const input = mail.message.createReadStream();
|
||||
input.pipe(new LeUnix());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 5. SES transport
|
||||
|
||||
// Send a message using SES transport
|
||||
@@ -1345,4 +1366,4 @@ function well_known_test() {
|
||||
if (options) {
|
||||
console.log(options.host, options.port, options.secure);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,9 @@
|
||||
"lib/mime-funcs/mime-types.d.ts",
|
||||
"lib/mime-node.d.ts",
|
||||
"lib/qp.d.ts",
|
||||
"lib/sendmail-transport.d.ts",
|
||||
"lib/sendmail-transport/index.d.ts",
|
||||
"lib/sendmail-transport/le-unix.d.ts",
|
||||
"lib/sendmail-transport/le-windows.d.ts",
|
||||
"lib/ses-transport.d.ts",
|
||||
"lib/shared.d.ts",
|
||||
"lib/smtp-connection.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user