@bobfrankston/mailx 1.0.31 → 1.0.33
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/client/styles/layout.css +12 -7
- package/launcher/builder/postinstall.js +7 -7
- package/package.json +5 -5
- 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,281 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// module to handle cookies
|
|
4
|
-
|
|
5
|
-
const urllib = require('url');
|
|
6
|
-
|
|
7
|
-
const SESSION_TIMEOUT = 1800; // 30 min
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Creates a biskviit cookie jar for managing cookie values in memory
|
|
11
|
-
*
|
|
12
|
-
* @constructor
|
|
13
|
-
* @param {Object} [options] Optional options object
|
|
14
|
-
*/
|
|
15
|
-
class Cookies {
|
|
16
|
-
constructor(options) {
|
|
17
|
-
this.options = options || {};
|
|
18
|
-
this.cookies = [];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Stores a cookie string to the cookie storage
|
|
23
|
-
*
|
|
24
|
-
* @param {String} cookieStr Value from the 'Set-Cookie:' header
|
|
25
|
-
* @param {String} url Current URL
|
|
26
|
-
*/
|
|
27
|
-
set(cookieStr, url) {
|
|
28
|
-
let urlparts = urllib.parse(url || '');
|
|
29
|
-
let cookie = this.parse(cookieStr);
|
|
30
|
-
let domain;
|
|
31
|
-
|
|
32
|
-
if (cookie.domain) {
|
|
33
|
-
domain = cookie.domain.replace(/^\./, '');
|
|
34
|
-
|
|
35
|
-
// do not allow cross origin cookies
|
|
36
|
-
if (
|
|
37
|
-
// can't be valid if the requested domain is shorter than current hostname
|
|
38
|
-
urlparts.hostname.length < domain.length ||
|
|
39
|
-
// prefix domains with dot to be sure that partial matches are not used
|
|
40
|
-
('.' + urlparts.hostname).substr(-domain.length + 1) !== '.' + domain
|
|
41
|
-
) {
|
|
42
|
-
cookie.domain = urlparts.hostname;
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
cookie.domain = urlparts.hostname;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (!cookie.path) {
|
|
49
|
-
cookie.path = this.getPath(urlparts.pathname);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// if no expire date, then use sessionTimeout value
|
|
53
|
-
if (!cookie.expires) {
|
|
54
|
-
cookie.expires = new Date(Date.now() + (Number(this.options.sessionTimeout || SESSION_TIMEOUT) || SESSION_TIMEOUT) * 1000);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return this.add(cookie);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Returns cookie string for the 'Cookie:' header.
|
|
62
|
-
*
|
|
63
|
-
* @param {String} url URL to check for
|
|
64
|
-
* @returns {String} Cookie header or empty string if no matches were found
|
|
65
|
-
*/
|
|
66
|
-
get(url) {
|
|
67
|
-
return this.list(url)
|
|
68
|
-
.map(cookie => cookie.name + '=' + cookie.value)
|
|
69
|
-
.join('; ');
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Lists all valied cookie objects for the specified URL
|
|
74
|
-
*
|
|
75
|
-
* @param {String} url URL to check for
|
|
76
|
-
* @returns {Array} An array of cookie objects
|
|
77
|
-
*/
|
|
78
|
-
list(url) {
|
|
79
|
-
let result = [];
|
|
80
|
-
let i;
|
|
81
|
-
let cookie;
|
|
82
|
-
|
|
83
|
-
for (i = this.cookies.length - 1; i >= 0; i--) {
|
|
84
|
-
cookie = this.cookies[i];
|
|
85
|
-
|
|
86
|
-
if (this.isExpired(cookie)) {
|
|
87
|
-
this.cookies.splice(i, i);
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (this.match(cookie, url)) {
|
|
92
|
-
result.unshift(cookie);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return result;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Parses cookie string from the 'Set-Cookie:' header
|
|
101
|
-
*
|
|
102
|
-
* @param {String} cookieStr String from the 'Set-Cookie:' header
|
|
103
|
-
* @returns {Object} Cookie object
|
|
104
|
-
*/
|
|
105
|
-
parse(cookieStr) {
|
|
106
|
-
let cookie = {};
|
|
107
|
-
|
|
108
|
-
(cookieStr || '')
|
|
109
|
-
.toString()
|
|
110
|
-
.split(';')
|
|
111
|
-
.forEach(cookiePart => {
|
|
112
|
-
let valueParts = cookiePart.split('=');
|
|
113
|
-
let key = valueParts.shift().trim().toLowerCase();
|
|
114
|
-
let value = valueParts.join('=').trim();
|
|
115
|
-
let domain;
|
|
116
|
-
|
|
117
|
-
if (!key) {
|
|
118
|
-
// skip empty parts
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
switch (key) {
|
|
123
|
-
case 'expires':
|
|
124
|
-
value = new Date(value);
|
|
125
|
-
// ignore date if can not parse it
|
|
126
|
-
if (value.toString() !== 'Invalid Date') {
|
|
127
|
-
cookie.expires = value;
|
|
128
|
-
}
|
|
129
|
-
break;
|
|
130
|
-
|
|
131
|
-
case 'path':
|
|
132
|
-
cookie.path = value;
|
|
133
|
-
break;
|
|
134
|
-
|
|
135
|
-
case 'domain':
|
|
136
|
-
domain = value.toLowerCase();
|
|
137
|
-
if (domain.length && domain.charAt(0) !== '.') {
|
|
138
|
-
domain = '.' + domain; // ensure preceeding dot for user set domains
|
|
139
|
-
}
|
|
140
|
-
cookie.domain = domain;
|
|
141
|
-
break;
|
|
142
|
-
|
|
143
|
-
case 'max-age':
|
|
144
|
-
cookie.expires = new Date(Date.now() + (Number(value) || 0) * 1000);
|
|
145
|
-
break;
|
|
146
|
-
|
|
147
|
-
case 'secure':
|
|
148
|
-
cookie.secure = true;
|
|
149
|
-
break;
|
|
150
|
-
|
|
151
|
-
case 'httponly':
|
|
152
|
-
cookie.httponly = true;
|
|
153
|
-
break;
|
|
154
|
-
|
|
155
|
-
default:
|
|
156
|
-
if (!cookie.name) {
|
|
157
|
-
cookie.name = key;
|
|
158
|
-
cookie.value = value;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
return cookie;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Checks if a cookie object is valid for a specified URL
|
|
168
|
-
*
|
|
169
|
-
* @param {Object} cookie Cookie object
|
|
170
|
-
* @param {String} url URL to check for
|
|
171
|
-
* @returns {Boolean} true if cookie is valid for specifiec URL
|
|
172
|
-
*/
|
|
173
|
-
match(cookie, url) {
|
|
174
|
-
let urlparts = urllib.parse(url || '');
|
|
175
|
-
|
|
176
|
-
// check if hostname matches
|
|
177
|
-
// .foo.com also matches subdomains, foo.com does not
|
|
178
|
-
if (
|
|
179
|
-
urlparts.hostname !== cookie.domain &&
|
|
180
|
-
(cookie.domain.charAt(0) !== '.' || ('.' + urlparts.hostname).substr(-cookie.domain.length) !== cookie.domain)
|
|
181
|
-
) {
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// check if path matches
|
|
186
|
-
let path = this.getPath(urlparts.pathname);
|
|
187
|
-
if (path.substr(0, cookie.path.length) !== cookie.path) {
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// check secure argument
|
|
192
|
-
if (cookie.secure && urlparts.protocol !== 'https:') {
|
|
193
|
-
return false;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Adds (or updates/removes if needed) a cookie object to the cookie storage
|
|
201
|
-
*
|
|
202
|
-
* @param {Object} cookie Cookie value to be stored
|
|
203
|
-
*/
|
|
204
|
-
add(cookie) {
|
|
205
|
-
let i;
|
|
206
|
-
let len;
|
|
207
|
-
|
|
208
|
-
// nothing to do here
|
|
209
|
-
if (!cookie || !cookie.name) {
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// overwrite if has same params
|
|
214
|
-
for (i = 0, len = this.cookies.length; i < len; i++) {
|
|
215
|
-
if (this.compare(this.cookies[i], cookie)) {
|
|
216
|
-
// check if the cookie needs to be removed instead
|
|
217
|
-
if (this.isExpired(cookie)) {
|
|
218
|
-
this.cookies.splice(i, 1); // remove expired/unset cookie
|
|
219
|
-
return false;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
this.cookies[i] = cookie;
|
|
223
|
-
return true;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// add as new if not already expired
|
|
228
|
-
if (!this.isExpired(cookie)) {
|
|
229
|
-
this.cookies.push(cookie);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
return true;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Checks if two cookie objects are the same
|
|
237
|
-
*
|
|
238
|
-
* @param {Object} a Cookie to check against
|
|
239
|
-
* @param {Object} b Cookie to check against
|
|
240
|
-
* @returns {Boolean} True, if the cookies are the same
|
|
241
|
-
*/
|
|
242
|
-
compare(a, b) {
|
|
243
|
-
return a.name === b.name && a.path === b.path && a.domain === b.domain && a.secure === b.secure && a.httponly === a.httponly;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Checks if a cookie is expired
|
|
248
|
-
*
|
|
249
|
-
* @param {Object} cookie Cookie object to check against
|
|
250
|
-
* @returns {Boolean} True, if the cookie is expired
|
|
251
|
-
*/
|
|
252
|
-
isExpired(cookie) {
|
|
253
|
-
return (cookie.expires && cookie.expires < new Date()) || !cookie.value;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Returns normalized cookie path for an URL path argument
|
|
258
|
-
*
|
|
259
|
-
* @param {String} pathname
|
|
260
|
-
* @returns {String} Normalized path
|
|
261
|
-
*/
|
|
262
|
-
getPath(pathname) {
|
|
263
|
-
let path = (pathname || '/').split('/');
|
|
264
|
-
path.pop(); // remove filename part
|
|
265
|
-
path = path.join('/').trim();
|
|
266
|
-
|
|
267
|
-
// ensure path prefix /
|
|
268
|
-
if (path.charAt(0) !== '/') {
|
|
269
|
-
path = '/' + path;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// ensure path suffix /
|
|
273
|
-
if (path.substr(-1) !== '/') {
|
|
274
|
-
path += '/';
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
return path;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
module.exports = Cookies;
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const http = require('http');
|
|
4
|
-
const https = require('https');
|
|
5
|
-
const urllib = require('url');
|
|
6
|
-
const zlib = require('zlib');
|
|
7
|
-
const PassThrough = require('stream').PassThrough;
|
|
8
|
-
const Cookies = require('./cookies');
|
|
9
|
-
const packageData = require('../../package.json');
|
|
10
|
-
const net = require('net');
|
|
11
|
-
|
|
12
|
-
const MAX_REDIRECTS = 5;
|
|
13
|
-
|
|
14
|
-
module.exports = function (url, options) {
|
|
15
|
-
return nmfetch(url, options);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
module.exports.Cookies = Cookies;
|
|
19
|
-
|
|
20
|
-
function nmfetch(url, options) {
|
|
21
|
-
options = options || {};
|
|
22
|
-
|
|
23
|
-
options.fetchRes = options.fetchRes || new PassThrough();
|
|
24
|
-
options.cookies = options.cookies || new Cookies();
|
|
25
|
-
options.redirects = options.redirects || 0;
|
|
26
|
-
options.maxRedirects = isNaN(options.maxRedirects) ? MAX_REDIRECTS : options.maxRedirects;
|
|
27
|
-
|
|
28
|
-
if (options.cookie) {
|
|
29
|
-
[].concat(options.cookie || []).forEach(cookie => {
|
|
30
|
-
options.cookies.set(cookie, url);
|
|
31
|
-
});
|
|
32
|
-
options.cookie = false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
let fetchRes = options.fetchRes;
|
|
36
|
-
let parsed = urllib.parse(url);
|
|
37
|
-
let method = (options.method || '').toString().trim().toUpperCase() || 'GET';
|
|
38
|
-
let finished = false;
|
|
39
|
-
let cookies;
|
|
40
|
-
let body;
|
|
41
|
-
|
|
42
|
-
let handler = parsed.protocol === 'https:' ? https : http;
|
|
43
|
-
|
|
44
|
-
let headers = {
|
|
45
|
-
'accept-encoding': 'gzip,deflate',
|
|
46
|
-
'user-agent': 'nodemailer/' + packageData.version
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
Object.keys(options.headers || {}).forEach(key => {
|
|
50
|
-
headers[key.toLowerCase().trim()] = options.headers[key];
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
if (options.userAgent) {
|
|
54
|
-
headers['user-agent'] = options.userAgent;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (parsed.auth) {
|
|
58
|
-
headers.Authorization = 'Basic ' + Buffer.from(parsed.auth).toString('base64');
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if ((cookies = options.cookies.get(url))) {
|
|
62
|
-
headers.cookie = cookies;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (options.body) {
|
|
66
|
-
if (options.contentType !== false) {
|
|
67
|
-
headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (typeof options.body.pipe === 'function') {
|
|
71
|
-
// it's a stream
|
|
72
|
-
headers['Transfer-Encoding'] = 'chunked';
|
|
73
|
-
body = options.body;
|
|
74
|
-
body.on('error', err => {
|
|
75
|
-
if (finished) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
finished = true;
|
|
79
|
-
err.type = 'FETCH';
|
|
80
|
-
err.sourceUrl = url;
|
|
81
|
-
fetchRes.emit('error', err);
|
|
82
|
-
});
|
|
83
|
-
} else {
|
|
84
|
-
if (options.body instanceof Buffer) {
|
|
85
|
-
body = options.body;
|
|
86
|
-
} else if (typeof options.body === 'object') {
|
|
87
|
-
try {
|
|
88
|
-
// encodeURIComponent can fail on invalid input (partial emoji etc.)
|
|
89
|
-
body = Buffer.from(
|
|
90
|
-
Object.keys(options.body)
|
|
91
|
-
.map(key => {
|
|
92
|
-
let value = options.body[key].toString().trim();
|
|
93
|
-
return encodeURIComponent(key) + '=' + encodeURIComponent(value);
|
|
94
|
-
})
|
|
95
|
-
.join('&')
|
|
96
|
-
);
|
|
97
|
-
} catch (E) {
|
|
98
|
-
if (finished) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
finished = true;
|
|
102
|
-
E.type = 'FETCH';
|
|
103
|
-
E.sourceUrl = url;
|
|
104
|
-
fetchRes.emit('error', E);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
} else {
|
|
108
|
-
body = Buffer.from(options.body.toString().trim());
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';
|
|
112
|
-
headers['Content-Length'] = body.length;
|
|
113
|
-
}
|
|
114
|
-
// if method is not provided, use POST instead of GET
|
|
115
|
-
method = (options.method || '').toString().trim().toUpperCase() || 'POST';
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
let req;
|
|
119
|
-
let reqOptions = {
|
|
120
|
-
method,
|
|
121
|
-
host: parsed.hostname,
|
|
122
|
-
path: parsed.path,
|
|
123
|
-
port: parsed.port ? parsed.port : parsed.protocol === 'https:' ? 443 : 80,
|
|
124
|
-
headers,
|
|
125
|
-
rejectUnauthorized: false,
|
|
126
|
-
agent: false
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
if (options.tls) {
|
|
130
|
-
Object.keys(options.tls).forEach(key => {
|
|
131
|
-
reqOptions[key] = options.tls[key];
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (
|
|
136
|
-
parsed.protocol === 'https:' &&
|
|
137
|
-
parsed.hostname &&
|
|
138
|
-
parsed.hostname !== reqOptions.host &&
|
|
139
|
-
!net.isIP(parsed.hostname) &&
|
|
140
|
-
!reqOptions.servername
|
|
141
|
-
) {
|
|
142
|
-
reqOptions.servername = parsed.hostname;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
try {
|
|
146
|
-
req = handler.request(reqOptions);
|
|
147
|
-
} catch (E) {
|
|
148
|
-
finished = true;
|
|
149
|
-
setImmediate(() => {
|
|
150
|
-
E.type = 'FETCH';
|
|
151
|
-
E.sourceUrl = url;
|
|
152
|
-
fetchRes.emit('error', E);
|
|
153
|
-
});
|
|
154
|
-
return fetchRes;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (options.timeout) {
|
|
158
|
-
req.setTimeout(options.timeout, () => {
|
|
159
|
-
if (finished) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
finished = true;
|
|
163
|
-
req.abort();
|
|
164
|
-
let err = new Error('Request Timeout');
|
|
165
|
-
err.type = 'FETCH';
|
|
166
|
-
err.sourceUrl = url;
|
|
167
|
-
fetchRes.emit('error', err);
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
req.on('error', err => {
|
|
172
|
-
if (finished) {
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
finished = true;
|
|
176
|
-
err.type = 'FETCH';
|
|
177
|
-
err.sourceUrl = url;
|
|
178
|
-
fetchRes.emit('error', err);
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
req.on('response', res => {
|
|
182
|
-
let inflate;
|
|
183
|
-
|
|
184
|
-
if (finished) {
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
switch (res.headers['content-encoding']) {
|
|
189
|
-
case 'gzip':
|
|
190
|
-
case 'deflate':
|
|
191
|
-
inflate = zlib.createUnzip();
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if (res.headers['set-cookie']) {
|
|
196
|
-
[].concat(res.headers['set-cookie'] || []).forEach(cookie => {
|
|
197
|
-
options.cookies.set(cookie, url);
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
if ([301, 302, 303, 307, 308].includes(res.statusCode) && res.headers.location) {
|
|
202
|
-
// redirect
|
|
203
|
-
options.redirects++;
|
|
204
|
-
if (options.redirects > options.maxRedirects) {
|
|
205
|
-
finished = true;
|
|
206
|
-
let err = new Error('Maximum redirect count exceeded');
|
|
207
|
-
err.type = 'FETCH';
|
|
208
|
-
err.sourceUrl = url;
|
|
209
|
-
fetchRes.emit('error', err);
|
|
210
|
-
req.abort();
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
// redirect does not include POST body
|
|
214
|
-
options.method = 'GET';
|
|
215
|
-
options.body = false;
|
|
216
|
-
return nmfetch(urllib.resolve(url, res.headers.location), options);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
fetchRes.statusCode = res.statusCode;
|
|
220
|
-
fetchRes.headers = res.headers;
|
|
221
|
-
|
|
222
|
-
if (res.statusCode >= 300 && !options.allowErrorResponse) {
|
|
223
|
-
finished = true;
|
|
224
|
-
let err = new Error('Invalid status code ' + res.statusCode);
|
|
225
|
-
err.type = 'FETCH';
|
|
226
|
-
err.sourceUrl = url;
|
|
227
|
-
fetchRes.emit('error', err);
|
|
228
|
-
req.abort();
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
res.on('error', err => {
|
|
233
|
-
if (finished) {
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
finished = true;
|
|
237
|
-
err.type = 'FETCH';
|
|
238
|
-
err.sourceUrl = url;
|
|
239
|
-
fetchRes.emit('error', err);
|
|
240
|
-
req.abort();
|
|
241
|
-
});
|
|
242
|
-
|
|
243
|
-
if (inflate) {
|
|
244
|
-
res.pipe(inflate).pipe(fetchRes);
|
|
245
|
-
inflate.on('error', err => {
|
|
246
|
-
if (finished) {
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
finished = true;
|
|
250
|
-
err.type = 'FETCH';
|
|
251
|
-
err.sourceUrl = url;
|
|
252
|
-
fetchRes.emit('error', err);
|
|
253
|
-
req.abort();
|
|
254
|
-
});
|
|
255
|
-
} else {
|
|
256
|
-
res.pipe(fetchRes);
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
setImmediate(() => {
|
|
261
|
-
if (body) {
|
|
262
|
-
try {
|
|
263
|
-
if (typeof body.pipe === 'function') {
|
|
264
|
-
return body.pipe(req);
|
|
265
|
-
} else {
|
|
266
|
-
req.write(body);
|
|
267
|
-
}
|
|
268
|
-
} catch (err) {
|
|
269
|
-
finished = true;
|
|
270
|
-
err.type = 'FETCH';
|
|
271
|
-
err.sourceUrl = url;
|
|
272
|
-
fetchRes.emit('error', err);
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
req.end();
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
return fetchRes;
|
|
280
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const packageData = require('../../package.json');
|
|
4
|
-
const shared = require('../shared');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Generates a Transport object to generate JSON output
|
|
8
|
-
*
|
|
9
|
-
* @constructor
|
|
10
|
-
* @param {Object} optional config parameter
|
|
11
|
-
*/
|
|
12
|
-
class JSONTransport {
|
|
13
|
-
constructor(options) {
|
|
14
|
-
options = options || {};
|
|
15
|
-
|
|
16
|
-
this.options = options || {};
|
|
17
|
-
|
|
18
|
-
this.name = 'JSONTransport';
|
|
19
|
-
this.version = packageData.version;
|
|
20
|
-
|
|
21
|
-
this.logger = shared.getLogger(this.options, {
|
|
22
|
-
component: this.options.component || 'json-transport'
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* <p>Compiles a mailcomposer message and forwards it to handler that sends it.</p>
|
|
28
|
-
*
|
|
29
|
-
* @param {Object} emailMessage MailComposer object
|
|
30
|
-
* @param {Function} callback Callback function to run when the sending is completed
|
|
31
|
-
*/
|
|
32
|
-
send(mail, done) {
|
|
33
|
-
// Sendmail strips this header line by itself
|
|
34
|
-
mail.message.keepBcc = true;
|
|
35
|
-
|
|
36
|
-
let envelope = mail.data.envelope || mail.message.getEnvelope();
|
|
37
|
-
let messageId = mail.message.messageId();
|
|
38
|
-
|
|
39
|
-
let recipients = [].concat(envelope.to || []);
|
|
40
|
-
if (recipients.length > 3) {
|
|
41
|
-
recipients.push('...and ' + recipients.splice(2).length + ' more');
|
|
42
|
-
}
|
|
43
|
-
this.logger.info(
|
|
44
|
-
{
|
|
45
|
-
tnx: 'send',
|
|
46
|
-
messageId
|
|
47
|
-
},
|
|
48
|
-
'Composing JSON structure of %s to <%s>',
|
|
49
|
-
messageId,
|
|
50
|
-
recipients.join(', ')
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
setImmediate(() => {
|
|
54
|
-
mail.normalize((err, data) => {
|
|
55
|
-
if (err) {
|
|
56
|
-
this.logger.error(
|
|
57
|
-
{
|
|
58
|
-
err,
|
|
59
|
-
tnx: 'send',
|
|
60
|
-
messageId
|
|
61
|
-
},
|
|
62
|
-
'Failed building JSON structure for %s. %s',
|
|
63
|
-
messageId,
|
|
64
|
-
err.message
|
|
65
|
-
);
|
|
66
|
-
return done(err);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
delete data.envelope;
|
|
70
|
-
delete data.normalizedHeaders;
|
|
71
|
-
|
|
72
|
-
return done(null, {
|
|
73
|
-
envelope,
|
|
74
|
-
messageId,
|
|
75
|
-
message: this.options.skipEncoding ? data : JSON.stringify(data)
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
module.exports = JSONTransport;
|