@bobfrankston/mailx 1.0.30 → 1.0.32
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/bin/mailx.js +20 -5
- package/client/styles/layout.css +12 -7
- package/launcher/builder/postinstall.js +7 -7
- package/package.json +4 -4
- package/packages/mailx-send/mailsend/node_modules/.package-lock.json +0 -49
- package/packages/mailx-send/mailsend/node_modules/@types/node/LICENSE +0 -21
- package/packages/mailx-send/mailsend/node_modules/@types/node/README.md +0 -15
- package/packages/mailx-send/mailsend/node_modules/@types/node/assert/strict.d.ts +0 -111
- package/packages/mailx-send/mailsend/node_modules/@types/node/assert.d.ts +0 -1078
- package/packages/mailx-send/mailsend/node_modules/@types/node/async_hooks.d.ts +0 -603
- package/packages/mailx-send/mailsend/node_modules/@types/node/buffer.buffer.d.ts +0 -472
- package/packages/mailx-send/mailsend/node_modules/@types/node/buffer.d.ts +0 -1934
- package/packages/mailx-send/mailsend/node_modules/@types/node/child_process.d.ts +0 -1476
- package/packages/mailx-send/mailsend/node_modules/@types/node/cluster.d.ts +0 -578
- package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/packages/mailx-send/mailsend/node_modules/@types/node/console.d.ts +0 -452
- package/packages/mailx-send/mailsend/node_modules/@types/node/constants.d.ts +0 -21
- package/packages/mailx-send/mailsend/node_modules/@types/node/crypto.d.ts +0 -4545
- package/packages/mailx-send/mailsend/node_modules/@types/node/dgram.d.ts +0 -600
- package/packages/mailx-send/mailsend/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
- package/packages/mailx-send/mailsend/node_modules/@types/node/dns/promises.d.ts +0 -503
- package/packages/mailx-send/mailsend/node_modules/@types/node/dns.d.ts +0 -923
- package/packages/mailx-send/mailsend/node_modules/@types/node/domain.d.ts +0 -170
- package/packages/mailx-send/mailsend/node_modules/@types/node/events.d.ts +0 -976
- package/packages/mailx-send/mailsend/node_modules/@types/node/fs/promises.d.ts +0 -1295
- package/packages/mailx-send/mailsend/node_modules/@types/node/fs.d.ts +0 -4461
- package/packages/mailx-send/mailsend/node_modules/@types/node/globals.d.ts +0 -172
- package/packages/mailx-send/mailsend/node_modules/@types/node/globals.typedarray.d.ts +0 -38
- package/packages/mailx-send/mailsend/node_modules/@types/node/http.d.ts +0 -2089
- package/packages/mailx-send/mailsend/node_modules/@types/node/http2.d.ts +0 -2644
- package/packages/mailx-send/mailsend/node_modules/@types/node/https.d.ts +0 -579
- package/packages/mailx-send/mailsend/node_modules/@types/node/index.d.ts +0 -97
- package/packages/mailx-send/mailsend/node_modules/@types/node/inspector.d.ts +0 -253
- package/packages/mailx-send/mailsend/node_modules/@types/node/inspector.generated.d.ts +0 -4052
- package/packages/mailx-send/mailsend/node_modules/@types/node/module.d.ts +0 -891
- package/packages/mailx-send/mailsend/node_modules/@types/node/net.d.ts +0 -1057
- package/packages/mailx-send/mailsend/node_modules/@types/node/os.d.ts +0 -506
- package/packages/mailx-send/mailsend/node_modules/@types/node/package.json +0 -145
- package/packages/mailx-send/mailsend/node_modules/@types/node/path.d.ts +0 -200
- package/packages/mailx-send/mailsend/node_modules/@types/node/perf_hooks.d.ts +0 -968
- package/packages/mailx-send/mailsend/node_modules/@types/node/process.d.ts +0 -2084
- package/packages/mailx-send/mailsend/node_modules/@types/node/punycode.d.ts +0 -117
- package/packages/mailx-send/mailsend/node_modules/@types/node/querystring.d.ts +0 -152
- package/packages/mailx-send/mailsend/node_modules/@types/node/readline/promises.d.ts +0 -161
- package/packages/mailx-send/mailsend/node_modules/@types/node/readline.d.ts +0 -594
- package/packages/mailx-send/mailsend/node_modules/@types/node/repl.d.ts +0 -428
- package/packages/mailx-send/mailsend/node_modules/@types/node/sea.d.ts +0 -153
- package/packages/mailx-send/mailsend/node_modules/@types/node/sqlite.d.ts +0 -721
- package/packages/mailx-send/mailsend/node_modules/@types/node/stream/consumers.d.ts +0 -38
- package/packages/mailx-send/mailsend/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/packages/mailx-send/mailsend/node_modules/@types/node/stream/web.d.ts +0 -622
- package/packages/mailx-send/mailsend/node_modules/@types/node/stream.d.ts +0 -1664
- package/packages/mailx-send/mailsend/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/packages/mailx-send/mailsend/node_modules/@types/node/test.d.ts +0 -2163
- package/packages/mailx-send/mailsend/node_modules/@types/node/timers/promises.d.ts +0 -108
- package/packages/mailx-send/mailsend/node_modules/@types/node/timers.d.ts +0 -287
- package/packages/mailx-send/mailsend/node_modules/@types/node/tls.d.ts +0 -1319
- package/packages/mailx-send/mailsend/node_modules/@types/node/trace_events.d.ts +0 -197
- package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
- package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
- package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/index.d.ts +0 -97
- package/packages/mailx-send/mailsend/node_modules/@types/node/tty.d.ts +0 -208
- package/packages/mailx-send/mailsend/node_modules/@types/node/url.d.ts +0 -984
- package/packages/mailx-send/mailsend/node_modules/@types/node/util.d.ts +0 -2606
- package/packages/mailx-send/mailsend/node_modules/@types/node/v8.d.ts +0 -920
- package/packages/mailx-send/mailsend/node_modules/@types/node/vm.d.ts +0 -1000
- package/packages/mailx-send/mailsend/node_modules/@types/node/wasi.d.ts +0 -181
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/events.d.ts +0 -97
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/fetch.d.ts +0 -55
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/navigator.d.ts +0 -22
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/packages/mailx-send/mailsend/node_modules/@types/node/worker_threads.d.ts +0 -784
- package/packages/mailx-send/mailsend/node_modules/@types/node/zlib.d.ts +0 -747
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/LICENSE +0 -21
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/README.md +0 -15
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/index.d.ts +0 -82
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/addressparser/index.d.ts +0 -31
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/base64/index.d.ts +0 -22
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/index.d.ts +0 -45
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/message-parser.d.ts +0 -75
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/relaxed-body.d.ts +0 -75
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/sign.d.ts +0 -21
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/fetch/cookies.d.ts +0 -54
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/fetch/index.d.ts +0 -38
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/json-transport/index.d.ts +0 -53
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mail-composer/index.d.ts +0 -25
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mailer/index.d.ts +0 -283
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mailer/mail-message.d.ts +0 -32
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-funcs/index.d.ts +0 -87
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-funcs/mime-types.d.ts +0 -2
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-node/index.d.ts +0 -224
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-node/last-newline.d.ts +0 -9
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/qp/index.d.ts +0 -23
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/index.d.ts +0 -53
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/le-unix.d.ts +0 -7
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/le-windows.d.ts +0 -7
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/ses-transport/index.d.ts +0 -146
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/shared/index.d.ts +0 -58
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/data-stream.d.ts +0 -11
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/http-proxy-client.d.ts +0 -16
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/index.d.ts +0 -270
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-pool/index.d.ts +0 -93
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-pool/pool-resource.d.ts +0 -66
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-transport/index.d.ts +0 -115
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/stream-transport/index.d.ts +0 -59
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/well-known/index.d.ts +0 -6
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/xoauth2/index.d.ts +0 -114
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/package.json +0 -38
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.ncurc.js +0 -9
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierignore +0 -8
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierrc +0 -12
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierrc.js +0 -10
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.release-please-config.json +0 -9
- package/packages/mailx-send/mailsend/node_modules/nodemailer/LICENSE +0 -16
- package/packages/mailx-send/mailsend/node_modules/nodemailer/README.md +0 -86
- package/packages/mailx-send/mailsend/node_modules/nodemailer/SECURITY.txt +0 -22
- package/packages/mailx-send/mailsend/node_modules/nodemailer/eslint.config.js +0 -88
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/addressparser/index.js +0 -383
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/base64/index.js +0 -139
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/index.js +0 -253
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/message-parser.js +0 -155
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/relaxed-body.js +0 -154
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/sign.js +0 -117
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/fetch/cookies.js +0 -281
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/fetch/index.js +0 -280
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/json-transport/index.js +0 -82
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mail-composer/index.js +0 -629
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mailer/index.js +0 -441
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mailer/mail-message.js +0 -316
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-funcs/index.js +0 -625
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-funcs/mime-types.js +0 -2113
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/index.js +0 -1316
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/last-newline.js +0 -33
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/le-unix.js +0 -43
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/le-windows.js +0 -52
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/nodemailer.js +0 -157
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/punycode/index.js +0 -460
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/qp/index.js +0 -227
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/sendmail-transport/index.js +0 -210
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/ses-transport/index.js +0 -234
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/shared/index.js +0 -754
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/data-stream.js +0 -108
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +0 -143
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/index.js +0 -1870
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-pool/index.js +0 -652
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +0 -259
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-transport/index.js +0 -421
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/stream-transport/index.js +0 -135
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/well-known/index.js +0 -47
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/well-known/services.json +0 -611
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/xoauth2/index.js +0 -427
- package/packages/mailx-send/mailsend/node_modules/nodemailer/package.json +0 -47
- package/packages/mailx-send/mailsend/node_modules/undici-types/LICENSE +0 -21
- package/packages/mailx-send/mailsend/node_modules/undici-types/README.md +0 -6
- package/packages/mailx-send/mailsend/node_modules/undici-types/agent.d.ts +0 -31
- package/packages/mailx-send/mailsend/node_modules/undici-types/api.d.ts +0 -43
- package/packages/mailx-send/mailsend/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/packages/mailx-send/mailsend/node_modules/undici-types/cache.d.ts +0 -36
- package/packages/mailx-send/mailsend/node_modules/undici-types/client.d.ts +0 -108
- package/packages/mailx-send/mailsend/node_modules/undici-types/connector.d.ts +0 -34
- package/packages/mailx-send/mailsend/node_modules/undici-types/content-type.d.ts +0 -21
- package/packages/mailx-send/mailsend/node_modules/undici-types/cookies.d.ts +0 -28
- package/packages/mailx-send/mailsend/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/packages/mailx-send/mailsend/node_modules/undici-types/dispatcher.d.ts +0 -256
- package/packages/mailx-send/mailsend/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/packages/mailx-send/mailsend/node_modules/undici-types/errors.d.ts +0 -149
- package/packages/mailx-send/mailsend/node_modules/undici-types/eventsource.d.ts +0 -61
- package/packages/mailx-send/mailsend/node_modules/undici-types/fetch.d.ts +0 -209
- package/packages/mailx-send/mailsend/node_modules/undici-types/file.d.ts +0 -39
- package/packages/mailx-send/mailsend/node_modules/undici-types/filereader.d.ts +0 -54
- package/packages/mailx-send/mailsend/node_modules/undici-types/formdata.d.ts +0 -108
- package/packages/mailx-send/mailsend/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/packages/mailx-send/mailsend/node_modules/undici-types/global-origin.d.ts +0 -7
- package/packages/mailx-send/mailsend/node_modules/undici-types/handlers.d.ts +0 -15
- package/packages/mailx-send/mailsend/node_modules/undici-types/header.d.ts +0 -4
- package/packages/mailx-send/mailsend/node_modules/undici-types/index.d.ts +0 -71
- package/packages/mailx-send/mailsend/node_modules/undici-types/interceptors.d.ts +0 -17
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-client.d.ts +0 -25
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/packages/mailx-send/mailsend/node_modules/undici-types/package.json +0 -55
- package/packages/mailx-send/mailsend/node_modules/undici-types/patch.d.ts +0 -33
- package/packages/mailx-send/mailsend/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/packages/mailx-send/mailsend/node_modules/undici-types/pool.d.ts +0 -39
- package/packages/mailx-send/mailsend/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/packages/mailx-send/mailsend/node_modules/undici-types/readable.d.ts +0 -65
- package/packages/mailx-send/mailsend/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/packages/mailx-send/mailsend/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/packages/mailx-send/mailsend/node_modules/undici-types/util.d.ts +0 -18
- package/packages/mailx-send/mailsend/node_modules/undici-types/webidl.d.ts +0 -228
- package/packages/mailx-send/mailsend/node_modules/undici-types/websocket.d.ts +0 -150
- package/packages/mailx-send/node_modules/.package-lock.json +0 -49
- package/packages/mailx-send/node_modules/@types/node/LICENSE +0 -21
- package/packages/mailx-send/node_modules/@types/node/README.md +0 -15
- package/packages/mailx-send/node_modules/@types/node/assert/strict.d.ts +0 -111
- package/packages/mailx-send/node_modules/@types/node/assert.d.ts +0 -1078
- package/packages/mailx-send/node_modules/@types/node/async_hooks.d.ts +0 -603
- package/packages/mailx-send/node_modules/@types/node/buffer.buffer.d.ts +0 -472
- package/packages/mailx-send/node_modules/@types/node/buffer.d.ts +0 -1934
- package/packages/mailx-send/node_modules/@types/node/child_process.d.ts +0 -1476
- package/packages/mailx-send/node_modules/@types/node/cluster.d.ts +0 -578
- package/packages/mailx-send/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/packages/mailx-send/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/packages/mailx-send/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/packages/mailx-send/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/packages/mailx-send/node_modules/@types/node/console.d.ts +0 -452
- package/packages/mailx-send/node_modules/@types/node/constants.d.ts +0 -21
- package/packages/mailx-send/node_modules/@types/node/crypto.d.ts +0 -4545
- package/packages/mailx-send/node_modules/@types/node/dgram.d.ts +0 -600
- package/packages/mailx-send/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
- package/packages/mailx-send/node_modules/@types/node/dns/promises.d.ts +0 -503
- package/packages/mailx-send/node_modules/@types/node/dns.d.ts +0 -923
- package/packages/mailx-send/node_modules/@types/node/domain.d.ts +0 -170
- package/packages/mailx-send/node_modules/@types/node/events.d.ts +0 -976
- package/packages/mailx-send/node_modules/@types/node/fs/promises.d.ts +0 -1295
- package/packages/mailx-send/node_modules/@types/node/fs.d.ts +0 -4461
- package/packages/mailx-send/node_modules/@types/node/globals.d.ts +0 -172
- package/packages/mailx-send/node_modules/@types/node/globals.typedarray.d.ts +0 -38
- package/packages/mailx-send/node_modules/@types/node/http.d.ts +0 -2089
- package/packages/mailx-send/node_modules/@types/node/http2.d.ts +0 -2644
- package/packages/mailx-send/node_modules/@types/node/https.d.ts +0 -579
- package/packages/mailx-send/node_modules/@types/node/index.d.ts +0 -97
- package/packages/mailx-send/node_modules/@types/node/inspector.d.ts +0 -253
- package/packages/mailx-send/node_modules/@types/node/inspector.generated.d.ts +0 -4052
- package/packages/mailx-send/node_modules/@types/node/module.d.ts +0 -891
- package/packages/mailx-send/node_modules/@types/node/net.d.ts +0 -1057
- package/packages/mailx-send/node_modules/@types/node/os.d.ts +0 -506
- package/packages/mailx-send/node_modules/@types/node/package.json +0 -145
- package/packages/mailx-send/node_modules/@types/node/path.d.ts +0 -200
- package/packages/mailx-send/node_modules/@types/node/perf_hooks.d.ts +0 -968
- package/packages/mailx-send/node_modules/@types/node/process.d.ts +0 -2084
- package/packages/mailx-send/node_modules/@types/node/punycode.d.ts +0 -117
- package/packages/mailx-send/node_modules/@types/node/querystring.d.ts +0 -152
- package/packages/mailx-send/node_modules/@types/node/readline/promises.d.ts +0 -161
- package/packages/mailx-send/node_modules/@types/node/readline.d.ts +0 -594
- package/packages/mailx-send/node_modules/@types/node/repl.d.ts +0 -428
- package/packages/mailx-send/node_modules/@types/node/sea.d.ts +0 -153
- package/packages/mailx-send/node_modules/@types/node/sqlite.d.ts +0 -721
- package/packages/mailx-send/node_modules/@types/node/stream/consumers.d.ts +0 -38
- package/packages/mailx-send/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/packages/mailx-send/node_modules/@types/node/stream/web.d.ts +0 -622
- package/packages/mailx-send/node_modules/@types/node/stream.d.ts +0 -1664
- package/packages/mailx-send/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/packages/mailx-send/node_modules/@types/node/test.d.ts +0 -2163
- package/packages/mailx-send/node_modules/@types/node/timers/promises.d.ts +0 -108
- package/packages/mailx-send/node_modules/@types/node/timers.d.ts +0 -287
- package/packages/mailx-send/node_modules/@types/node/tls.d.ts +0 -1319
- package/packages/mailx-send/node_modules/@types/node/trace_events.d.ts +0 -197
- package/packages/mailx-send/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
- package/packages/mailx-send/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
- package/packages/mailx-send/node_modules/@types/node/ts5.6/index.d.ts +0 -97
- package/packages/mailx-send/node_modules/@types/node/tty.d.ts +0 -208
- package/packages/mailx-send/node_modules/@types/node/url.d.ts +0 -984
- package/packages/mailx-send/node_modules/@types/node/util.d.ts +0 -2606
- package/packages/mailx-send/node_modules/@types/node/v8.d.ts +0 -920
- package/packages/mailx-send/node_modules/@types/node/vm.d.ts +0 -1000
- package/packages/mailx-send/node_modules/@types/node/wasi.d.ts +0 -181
- package/packages/mailx-send/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
- package/packages/mailx-send/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/packages/mailx-send/node_modules/@types/node/web-globals/events.d.ts +0 -97
- package/packages/mailx-send/node_modules/@types/node/web-globals/fetch.d.ts +0 -55
- package/packages/mailx-send/node_modules/@types/node/web-globals/navigator.d.ts +0 -22
- package/packages/mailx-send/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/packages/mailx-send/node_modules/@types/node/worker_threads.d.ts +0 -784
- package/packages/mailx-send/node_modules/@types/node/zlib.d.ts +0 -747
- package/packages/mailx-send/node_modules/undici-types/LICENSE +0 -21
- package/packages/mailx-send/node_modules/undici-types/README.md +0 -6
- package/packages/mailx-send/node_modules/undici-types/agent.d.ts +0 -31
- package/packages/mailx-send/node_modules/undici-types/api.d.ts +0 -43
- package/packages/mailx-send/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/packages/mailx-send/node_modules/undici-types/cache.d.ts +0 -36
- package/packages/mailx-send/node_modules/undici-types/client.d.ts +0 -108
- package/packages/mailx-send/node_modules/undici-types/connector.d.ts +0 -34
- package/packages/mailx-send/node_modules/undici-types/content-type.d.ts +0 -21
- package/packages/mailx-send/node_modules/undici-types/cookies.d.ts +0 -28
- package/packages/mailx-send/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/packages/mailx-send/node_modules/undici-types/dispatcher.d.ts +0 -256
- package/packages/mailx-send/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/packages/mailx-send/node_modules/undici-types/errors.d.ts +0 -149
- package/packages/mailx-send/node_modules/undici-types/eventsource.d.ts +0 -61
- package/packages/mailx-send/node_modules/undici-types/fetch.d.ts +0 -209
- package/packages/mailx-send/node_modules/undici-types/file.d.ts +0 -39
- package/packages/mailx-send/node_modules/undici-types/filereader.d.ts +0 -54
- package/packages/mailx-send/node_modules/undici-types/formdata.d.ts +0 -108
- package/packages/mailx-send/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/packages/mailx-send/node_modules/undici-types/global-origin.d.ts +0 -7
- package/packages/mailx-send/node_modules/undici-types/handlers.d.ts +0 -15
- package/packages/mailx-send/node_modules/undici-types/header.d.ts +0 -4
- package/packages/mailx-send/node_modules/undici-types/index.d.ts +0 -71
- package/packages/mailx-send/node_modules/undici-types/interceptors.d.ts +0 -17
- package/packages/mailx-send/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/packages/mailx-send/node_modules/undici-types/mock-client.d.ts +0 -25
- package/packages/mailx-send/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/packages/mailx-send/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/packages/mailx-send/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/packages/mailx-send/node_modules/undici-types/package.json +0 -55
- package/packages/mailx-send/node_modules/undici-types/patch.d.ts +0 -33
- package/packages/mailx-send/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/packages/mailx-send/node_modules/undici-types/pool.d.ts +0 -39
- package/packages/mailx-send/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/packages/mailx-send/node_modules/undici-types/readable.d.ts +0 -65
- package/packages/mailx-send/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/packages/mailx-send/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/packages/mailx-send/node_modules/undici-types/util.d.ts +0 -18
- package/packages/mailx-send/node_modules/undici-types/webidl.d.ts +0 -228
- package/packages/mailx-send/node_modules/undici-types/websocket.d.ts +0 -150
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const globals = require('globals');
|
|
4
|
-
|
|
5
|
-
module.exports = [
|
|
6
|
-
{
|
|
7
|
-
ignores: ['node_modules/**', 'coverage/**', 'dist/**', 'build/**', '.nyc_output/**']
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
files: ['**/*.js'],
|
|
11
|
-
languageOptions: {
|
|
12
|
-
ecmaVersion: 2017,
|
|
13
|
-
sourceType: 'script',
|
|
14
|
-
globals: Object.assign({}, globals.node, globals.es2017, {
|
|
15
|
-
it: true,
|
|
16
|
-
describe: true,
|
|
17
|
-
beforeEach: true,
|
|
18
|
-
afterEach: true
|
|
19
|
-
})
|
|
20
|
-
},
|
|
21
|
-
rules: {
|
|
22
|
-
// Error detection
|
|
23
|
-
'for-direction': 'error',
|
|
24
|
-
'no-await-in-loop': 'error',
|
|
25
|
-
'no-div-regex': 'error',
|
|
26
|
-
eqeqeq: 'error',
|
|
27
|
-
'dot-notation': 'error',
|
|
28
|
-
curly: 'error',
|
|
29
|
-
'no-fallthrough': 'error',
|
|
30
|
-
'no-unused-expressions': [
|
|
31
|
-
'error',
|
|
32
|
-
{
|
|
33
|
-
allowShortCircuit: true
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
'no-unused-vars': [
|
|
37
|
-
'error',
|
|
38
|
-
{
|
|
39
|
-
varsIgnorePattern: '^_',
|
|
40
|
-
argsIgnorePattern: '^_',
|
|
41
|
-
caughtErrorsIgnorePattern: '^_'
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
'handle-callback-err': 'error',
|
|
45
|
-
'no-new': 'error',
|
|
46
|
-
'new-cap': 'error',
|
|
47
|
-
'no-eval': 'error',
|
|
48
|
-
'no-invalid-this': 'error',
|
|
49
|
-
radix: ['error', 'always'],
|
|
50
|
-
'no-use-before-define': ['error', 'nofunc'],
|
|
51
|
-
'callback-return': ['error', ['callback', 'cb', 'done']],
|
|
52
|
-
'no-regex-spaces': 'error',
|
|
53
|
-
'no-empty': 'error',
|
|
54
|
-
'no-duplicate-case': 'error',
|
|
55
|
-
'no-empty-character-class': 'error',
|
|
56
|
-
'no-redeclare': 'off', // Disabled per project preference
|
|
57
|
-
'block-scoped-var': 'error',
|
|
58
|
-
'no-sequences': 'error',
|
|
59
|
-
'no-throw-literal': 'error',
|
|
60
|
-
'no-useless-call': 'error',
|
|
61
|
-
'no-useless-concat': 'error',
|
|
62
|
-
'no-void': 'error',
|
|
63
|
-
yoda: 'error',
|
|
64
|
-
'no-undef': 'error',
|
|
65
|
-
'global-require': 'error',
|
|
66
|
-
'no-var': 'error',
|
|
67
|
-
'no-bitwise': 'error',
|
|
68
|
-
'no-lonely-if': 'error',
|
|
69
|
-
'no-mixed-spaces-and-tabs': 'error',
|
|
70
|
-
'arrow-body-style': ['error', 'as-needed'],
|
|
71
|
-
'arrow-parens': ['error', 'as-needed'],
|
|
72
|
-
'prefer-arrow-callback': 'error',
|
|
73
|
-
'object-shorthand': 'error',
|
|
74
|
-
'prefer-spread': 'error',
|
|
75
|
-
'no-prototype-builtins': 'off', // Disabled per project preference
|
|
76
|
-
strict: ['error', 'global'],
|
|
77
|
-
|
|
78
|
-
// Disable all formatting rules (handled by Prettier)
|
|
79
|
-
indent: 'off',
|
|
80
|
-
quotes: 'off',
|
|
81
|
-
'linebreak-style': 'off',
|
|
82
|
-
semi: 'off',
|
|
83
|
-
'quote-props': 'off',
|
|
84
|
-
'comma-dangle': 'off',
|
|
85
|
-
'comma-style': 'off'
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
];
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Converts tokens for a single address into an address object
|
|
5
|
-
*
|
|
6
|
-
* @param {Array} tokens Tokens object
|
|
7
|
-
* @param {Number} depth Current recursion depth for nested group protection
|
|
8
|
-
* @return {Object} Address object
|
|
9
|
-
*/
|
|
10
|
-
function _handleAddress(tokens, depth) {
|
|
11
|
-
let isGroup = false;
|
|
12
|
-
let state = 'text';
|
|
13
|
-
let address;
|
|
14
|
-
let addresses = [];
|
|
15
|
-
let data = {
|
|
16
|
-
address: [],
|
|
17
|
-
comment: [],
|
|
18
|
-
group: [],
|
|
19
|
-
text: [],
|
|
20
|
-
textWasQuoted: [] // Track which text tokens came from inside quotes
|
|
21
|
-
};
|
|
22
|
-
let i;
|
|
23
|
-
let len;
|
|
24
|
-
let insideQuotes = false; // Track if we're currently inside a quoted string
|
|
25
|
-
|
|
26
|
-
// Filter out <addresses>, (comments) and regular text
|
|
27
|
-
for (i = 0, len = tokens.length; i < len; i++) {
|
|
28
|
-
let token = tokens[i];
|
|
29
|
-
let prevToken = i ? tokens[i - 1] : null;
|
|
30
|
-
if (token.type === 'operator') {
|
|
31
|
-
switch (token.value) {
|
|
32
|
-
case '<':
|
|
33
|
-
state = 'address';
|
|
34
|
-
insideQuotes = false;
|
|
35
|
-
break;
|
|
36
|
-
case '(':
|
|
37
|
-
state = 'comment';
|
|
38
|
-
insideQuotes = false;
|
|
39
|
-
break;
|
|
40
|
-
case ':':
|
|
41
|
-
state = 'group';
|
|
42
|
-
isGroup = true;
|
|
43
|
-
insideQuotes = false;
|
|
44
|
-
break;
|
|
45
|
-
case '"':
|
|
46
|
-
// Track quote state for text tokens
|
|
47
|
-
insideQuotes = !insideQuotes;
|
|
48
|
-
state = 'text';
|
|
49
|
-
break;
|
|
50
|
-
default:
|
|
51
|
-
state = 'text';
|
|
52
|
-
insideQuotes = false;
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
} else if (token.value) {
|
|
56
|
-
if (state === 'address') {
|
|
57
|
-
// handle use case where unquoted name includes a "<"
|
|
58
|
-
// Apple Mail truncates everything between an unexpected < and an address
|
|
59
|
-
// and so will we
|
|
60
|
-
token.value = token.value.replace(/^[^<]*<\s*/, '');
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (prevToken && prevToken.noBreak && data[state].length) {
|
|
64
|
-
// join values
|
|
65
|
-
data[state][data[state].length - 1] += token.value;
|
|
66
|
-
if (state === 'text' && insideQuotes) {
|
|
67
|
-
data.textWasQuoted[data.textWasQuoted.length - 1] = true;
|
|
68
|
-
}
|
|
69
|
-
} else {
|
|
70
|
-
data[state].push(token.value);
|
|
71
|
-
if (state === 'text') {
|
|
72
|
-
data.textWasQuoted.push(insideQuotes);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// If there is no text but a comment, replace the two
|
|
79
|
-
if (!data.text.length && data.comment.length) {
|
|
80
|
-
data.text = data.comment;
|
|
81
|
-
data.comment = [];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (isGroup) {
|
|
85
|
-
// http://tools.ietf.org/html/rfc2822#appendix-A.1.3
|
|
86
|
-
data.text = data.text.join(' ');
|
|
87
|
-
|
|
88
|
-
// Parse group members, but flatten any nested groups (RFC 5322 doesn't allow nesting)
|
|
89
|
-
let groupMembers = [];
|
|
90
|
-
if (data.group.length) {
|
|
91
|
-
let parsedGroup = addressparser(data.group.join(','), { _depth: depth + 1 });
|
|
92
|
-
// Flatten: if any member is itself a group, extract its members into the sequence
|
|
93
|
-
parsedGroup.forEach(member => {
|
|
94
|
-
if (member.group) {
|
|
95
|
-
// Nested group detected - flatten it by adding its members directly
|
|
96
|
-
groupMembers = groupMembers.concat(member.group);
|
|
97
|
-
} else {
|
|
98
|
-
groupMembers.push(member);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
addresses.push({
|
|
104
|
-
name: data.text || (address && address.name),
|
|
105
|
-
group: groupMembers
|
|
106
|
-
});
|
|
107
|
-
} else {
|
|
108
|
-
// If no address was found, try to detect one from regular text
|
|
109
|
-
if (!data.address.length && data.text.length) {
|
|
110
|
-
for (i = data.text.length - 1; i >= 0; i--) {
|
|
111
|
-
// Security fix: Do not extract email addresses from quoted strings
|
|
112
|
-
// RFC 5321 allows @ inside quoted local-parts like "user@domain"@example.com
|
|
113
|
-
// Extracting emails from quoted text leads to misrouting vulnerabilities
|
|
114
|
-
if (!data.textWasQuoted[i] && data.text[i].match(/^[^@\s]+@[^@\s]+$/)) {
|
|
115
|
-
data.address = data.text.splice(i, 1);
|
|
116
|
-
data.textWasQuoted.splice(i, 1);
|
|
117
|
-
break;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
let _regexHandler = function (address) {
|
|
122
|
-
if (!data.address.length) {
|
|
123
|
-
data.address = [address.trim()];
|
|
124
|
-
return ' ';
|
|
125
|
-
} else {
|
|
126
|
-
return address;
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
// still no address
|
|
131
|
-
if (!data.address.length) {
|
|
132
|
-
for (i = data.text.length - 1; i >= 0; i--) {
|
|
133
|
-
// Security fix: Do not extract email addresses from quoted strings
|
|
134
|
-
if (!data.textWasQuoted[i]) {
|
|
135
|
-
// fixed the regex to parse email address correctly when email address has more than one @
|
|
136
|
-
data.text[i] = data.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/, _regexHandler).trim();
|
|
137
|
-
if (data.address.length) {
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// If there's still is no text but a comment exixts, replace the two
|
|
146
|
-
if (!data.text.length && data.comment.length) {
|
|
147
|
-
data.text = data.comment;
|
|
148
|
-
data.comment = [];
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// Keep only the first address occurence, push others to regular text
|
|
152
|
-
if (data.address.length > 1) {
|
|
153
|
-
data.text = data.text.concat(data.address.splice(1));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// Join values with spaces
|
|
157
|
-
data.text = data.text.join(' ');
|
|
158
|
-
data.address = data.address.join(' ');
|
|
159
|
-
|
|
160
|
-
if (!data.address && isGroup) {
|
|
161
|
-
return [];
|
|
162
|
-
} else {
|
|
163
|
-
address = {
|
|
164
|
-
address: data.address || data.text || '',
|
|
165
|
-
name: data.text || data.address || ''
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
if (address.address === address.name) {
|
|
169
|
-
if ((address.address || '').match(/@/)) {
|
|
170
|
-
address.name = '';
|
|
171
|
-
} else {
|
|
172
|
-
address.address = '';
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
addresses.push(address);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
return addresses;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Creates a Tokenizer object for tokenizing address field strings
|
|
185
|
-
*
|
|
186
|
-
* @constructor
|
|
187
|
-
* @param {String} str Address field string
|
|
188
|
-
*/
|
|
189
|
-
class Tokenizer {
|
|
190
|
-
constructor(str) {
|
|
191
|
-
this.str = (str || '').toString();
|
|
192
|
-
this.operatorCurrent = '';
|
|
193
|
-
this.operatorExpecting = '';
|
|
194
|
-
this.node = null;
|
|
195
|
-
this.escaped = false;
|
|
196
|
-
|
|
197
|
-
this.list = [];
|
|
198
|
-
/**
|
|
199
|
-
* Operator tokens and which tokens are expected to end the sequence
|
|
200
|
-
*/
|
|
201
|
-
this.operators = {
|
|
202
|
-
'"': '"',
|
|
203
|
-
'(': ')',
|
|
204
|
-
'<': '>',
|
|
205
|
-
',': '',
|
|
206
|
-
':': ';',
|
|
207
|
-
// Semicolons are not a legal delimiter per the RFC2822 grammar other
|
|
208
|
-
// than for terminating a group, but they are also not valid for any
|
|
209
|
-
// other use in this context. Given that some mail clients have
|
|
210
|
-
// historically allowed the semicolon as a delimiter equivalent to the
|
|
211
|
-
// comma in their UI, it makes sense to treat them the same as a comma
|
|
212
|
-
// when used outside of a group.
|
|
213
|
-
';': ''
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Tokenizes the original input string
|
|
219
|
-
*
|
|
220
|
-
* @return {Array} An array of operator|text tokens
|
|
221
|
-
*/
|
|
222
|
-
tokenize() {
|
|
223
|
-
let list = [];
|
|
224
|
-
|
|
225
|
-
for (let i = 0, len = this.str.length; i < len; i++) {
|
|
226
|
-
let chr = this.str.charAt(i);
|
|
227
|
-
let nextChr = i < len - 1 ? this.str.charAt(i + 1) : null;
|
|
228
|
-
this.checkChar(chr, nextChr);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
this.list.forEach(node => {
|
|
232
|
-
node.value = (node.value || '').toString().trim();
|
|
233
|
-
if (node.value) {
|
|
234
|
-
list.push(node);
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
return list;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Checks if a character is an operator or text and acts accordingly
|
|
243
|
-
*
|
|
244
|
-
* @param {String} chr Character from the address field
|
|
245
|
-
*/
|
|
246
|
-
checkChar(chr, nextChr) {
|
|
247
|
-
if (this.escaped) {
|
|
248
|
-
// ignore next condition blocks
|
|
249
|
-
} else if (chr === this.operatorExpecting) {
|
|
250
|
-
this.node = {
|
|
251
|
-
type: 'operator',
|
|
252
|
-
value: chr
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
if (nextChr && ![' ', '\t', '\r', '\n', ',', ';'].includes(nextChr)) {
|
|
256
|
-
this.node.noBreak = true;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
this.list.push(this.node);
|
|
260
|
-
this.node = null;
|
|
261
|
-
this.operatorExpecting = '';
|
|
262
|
-
this.escaped = false;
|
|
263
|
-
|
|
264
|
-
return;
|
|
265
|
-
} else if (!this.operatorExpecting && chr in this.operators) {
|
|
266
|
-
this.node = {
|
|
267
|
-
type: 'operator',
|
|
268
|
-
value: chr
|
|
269
|
-
};
|
|
270
|
-
this.list.push(this.node);
|
|
271
|
-
this.node = null;
|
|
272
|
-
this.operatorExpecting = this.operators[chr];
|
|
273
|
-
this.escaped = false;
|
|
274
|
-
return;
|
|
275
|
-
} else if (['"', "'"].includes(this.operatorExpecting) && chr === '\\') {
|
|
276
|
-
this.escaped = true;
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
if (!this.node) {
|
|
281
|
-
this.node = {
|
|
282
|
-
type: 'text',
|
|
283
|
-
value: ''
|
|
284
|
-
};
|
|
285
|
-
this.list.push(this.node);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
if (chr === '\n') {
|
|
289
|
-
// Convert newlines to spaces. Carriage return is ignored as \r and \n usually
|
|
290
|
-
// go together anyway and there already is a WS for \n. Lone \r means something is fishy.
|
|
291
|
-
chr = ' ';
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
if (chr.charCodeAt(0) >= 0x21 || [' ', '\t'].includes(chr)) {
|
|
295
|
-
// skip command bytes
|
|
296
|
-
this.node.value += chr;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
this.escaped = false;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Maximum recursion depth for parsing nested groups.
|
|
305
|
-
* RFC 5322 doesn't allow nested groups, so this is a safeguard against
|
|
306
|
-
* malicious input that could cause stack overflow.
|
|
307
|
-
*/
|
|
308
|
-
const MAX_NESTED_GROUP_DEPTH = 50;
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Parses structured e-mail addresses from an address field
|
|
312
|
-
*
|
|
313
|
-
* Example:
|
|
314
|
-
*
|
|
315
|
-
* 'Name <address@domain>'
|
|
316
|
-
*
|
|
317
|
-
* will be converted to
|
|
318
|
-
*
|
|
319
|
-
* [{name: 'Name', address: 'address@domain'}]
|
|
320
|
-
*
|
|
321
|
-
* @param {String} str Address field
|
|
322
|
-
* @param {Object} options Optional options object
|
|
323
|
-
* @param {Number} options._depth Internal recursion depth counter (do not set manually)
|
|
324
|
-
* @return {Array} An array of address objects
|
|
325
|
-
*/
|
|
326
|
-
function addressparser(str, options) {
|
|
327
|
-
options = options || {};
|
|
328
|
-
let depth = options._depth || 0;
|
|
329
|
-
|
|
330
|
-
// Prevent stack overflow from deeply nested groups (DoS protection)
|
|
331
|
-
if (depth > MAX_NESTED_GROUP_DEPTH) {
|
|
332
|
-
return [];
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
let tokenizer = new Tokenizer(str);
|
|
336
|
-
let tokens = tokenizer.tokenize();
|
|
337
|
-
|
|
338
|
-
let addresses = [];
|
|
339
|
-
let address = [];
|
|
340
|
-
let parsedAddresses = [];
|
|
341
|
-
|
|
342
|
-
tokens.forEach(token => {
|
|
343
|
-
if (token.type === 'operator' && (token.value === ',' || token.value === ';')) {
|
|
344
|
-
if (address.length) {
|
|
345
|
-
addresses.push(address);
|
|
346
|
-
}
|
|
347
|
-
address = [];
|
|
348
|
-
} else {
|
|
349
|
-
address.push(token);
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
if (address.length) {
|
|
354
|
-
addresses.push(address);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
addresses.forEach(address => {
|
|
358
|
-
address = _handleAddress(address, depth);
|
|
359
|
-
if (address.length) {
|
|
360
|
-
parsedAddresses = parsedAddresses.concat(address);
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
|
|
364
|
-
if (options.flatten) {
|
|
365
|
-
let addresses = [];
|
|
366
|
-
let walkAddressList = list => {
|
|
367
|
-
list.forEach(address => {
|
|
368
|
-
if (address.group) {
|
|
369
|
-
return walkAddressList(address.group);
|
|
370
|
-
} else {
|
|
371
|
-
addresses.push(address);
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
};
|
|
375
|
-
walkAddressList(parsedAddresses);
|
|
376
|
-
return addresses;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
return parsedAddresses;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
// expose to the world
|
|
383
|
-
module.exports = addressparser;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const Transform = require('stream').Transform;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Encodes a Buffer into a base64 encoded string
|
|
7
|
-
*
|
|
8
|
-
* @param {Buffer} buffer Buffer to convert
|
|
9
|
-
* @returns {String} base64 encoded string
|
|
10
|
-
*/
|
|
11
|
-
function encode(buffer) {
|
|
12
|
-
if (typeof buffer === 'string') {
|
|
13
|
-
buffer = Buffer.from(buffer, 'utf-8');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return buffer.toString('base64');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Adds soft line breaks to a base64 string
|
|
21
|
-
*
|
|
22
|
-
* @param {String} str base64 encoded string that might need line wrapping
|
|
23
|
-
* @param {Number} [lineLength=76] Maximum allowed length for a line
|
|
24
|
-
* @returns {String} Soft-wrapped base64 encoded string
|
|
25
|
-
*/
|
|
26
|
-
function wrap(str, lineLength) {
|
|
27
|
-
str = (str || '').toString();
|
|
28
|
-
lineLength = lineLength || 76;
|
|
29
|
-
|
|
30
|
-
if (str.length <= lineLength) {
|
|
31
|
-
return str;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
let result = [];
|
|
35
|
-
let pos = 0;
|
|
36
|
-
let chunkLength = lineLength * 1024;
|
|
37
|
-
while (pos < str.length) {
|
|
38
|
-
let wrappedLines = str.substr(pos, chunkLength).replace(new RegExp('.{' + lineLength + '}', 'g'), '$&\r\n');
|
|
39
|
-
result.push(wrappedLines);
|
|
40
|
-
pos += chunkLength;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return result.join('');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Creates a transform stream for encoding data to base64 encoding
|
|
48
|
-
*
|
|
49
|
-
* @constructor
|
|
50
|
-
* @param {Object} options Stream options
|
|
51
|
-
* @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping
|
|
52
|
-
*/
|
|
53
|
-
class Encoder extends Transform {
|
|
54
|
-
constructor(options) {
|
|
55
|
-
super();
|
|
56
|
-
this.options = options || {};
|
|
57
|
-
|
|
58
|
-
if (this.options.lineLength !== false) {
|
|
59
|
-
this.options.lineLength = this.options.lineLength || 76;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
this._curLine = '';
|
|
63
|
-
this._remainingBytes = false;
|
|
64
|
-
|
|
65
|
-
this.inputBytes = 0;
|
|
66
|
-
this.outputBytes = 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
_transform(chunk, encoding, done) {
|
|
70
|
-
if (encoding !== 'buffer') {
|
|
71
|
-
chunk = Buffer.from(chunk, encoding);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (!chunk || !chunk.length) {
|
|
75
|
-
return setImmediate(done);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
this.inputBytes += chunk.length;
|
|
79
|
-
|
|
80
|
-
if (this._remainingBytes && this._remainingBytes.length) {
|
|
81
|
-
chunk = Buffer.concat([this._remainingBytes, chunk], this._remainingBytes.length + chunk.length);
|
|
82
|
-
this._remainingBytes = false;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (chunk.length % 3) {
|
|
86
|
-
this._remainingBytes = chunk.slice(chunk.length - (chunk.length % 3));
|
|
87
|
-
chunk = chunk.slice(0, chunk.length - (chunk.length % 3));
|
|
88
|
-
} else {
|
|
89
|
-
this._remainingBytes = false;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
let b64 = this._curLine + encode(chunk);
|
|
93
|
-
|
|
94
|
-
if (this.options.lineLength) {
|
|
95
|
-
b64 = wrap(b64, this.options.lineLength);
|
|
96
|
-
|
|
97
|
-
let lastLF = b64.lastIndexOf('\n');
|
|
98
|
-
if (lastLF < 0) {
|
|
99
|
-
this._curLine = b64;
|
|
100
|
-
b64 = '';
|
|
101
|
-
} else {
|
|
102
|
-
this._curLine = b64.substring(lastLF + 1);
|
|
103
|
-
b64 = b64.substring(0, lastLF + 1);
|
|
104
|
-
|
|
105
|
-
if (b64 && !b64.endsWith('\r\n')) {
|
|
106
|
-
b64 += '\r\n';
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
} else {
|
|
110
|
-
this._curLine = '';
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (b64) {
|
|
114
|
-
this.outputBytes += b64.length;
|
|
115
|
-
this.push(Buffer.from(b64, 'ascii'));
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
setImmediate(done);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
_flush(done) {
|
|
122
|
-
if (this._remainingBytes && this._remainingBytes.length) {
|
|
123
|
-
this._curLine += encode(this._remainingBytes);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (this._curLine) {
|
|
127
|
-
this.outputBytes += this._curLine.length;
|
|
128
|
-
this.push(Buffer.from(this._curLine, 'ascii'));
|
|
129
|
-
this._curLine = '';
|
|
130
|
-
}
|
|
131
|
-
done();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
module.exports = {
|
|
136
|
-
encode,
|
|
137
|
-
wrap,
|
|
138
|
-
Encoder
|
|
139
|
-
};
|