@nocobase/plugin-workflow-mailer 2.3.0-beta.13 → 2.3.0-beta.15

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.
Files changed (173) hide show
  1. package/dist/externalVersion.js +6 -6
  2. package/dist/node_modules/joi/package.json +1 -1
  3. package/dist/node_modules/nodemailer/dist/cjs/addressparser/index.d.ts +59 -0
  4. package/dist/node_modules/nodemailer/dist/cjs/addressparser/index.js +790 -0
  5. package/dist/node_modules/nodemailer/dist/cjs/base64/index.d.ts +36 -0
  6. package/dist/node_modules/nodemailer/dist/cjs/base64/index.js +119 -0
  7. package/dist/node_modules/nodemailer/dist/cjs/dkim/index.d.ts +52 -0
  8. package/dist/node_modules/nodemailer/dist/cjs/dkim/index.js +228 -0
  9. package/dist/node_modules/nodemailer/dist/cjs/dkim/message-parser.d.ts +48 -0
  10. package/dist/node_modules/nodemailer/dist/cjs/dkim/message-parser.js +180 -0
  11. package/dist/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.d.ts +36 -0
  12. package/dist/node_modules/nodemailer/dist/cjs/dkim/relaxed-body.js +148 -0
  13. package/dist/node_modules/nodemailer/dist/cjs/dkim/sign.d.ts +52 -0
  14. package/dist/node_modules/nodemailer/dist/cjs/dkim/sign.js +165 -0
  15. package/dist/node_modules/nodemailer/dist/cjs/errors.d.ts +96 -0
  16. package/dist/node_modules/nodemailer/dist/cjs/errors.js +70 -0
  17. package/dist/node_modules/nodemailer/dist/cjs/fetch/cookies.d.ts +107 -0
  18. package/dist/node_modules/nodemailer/dist/cjs/fetch/cookies.js +282 -0
  19. package/dist/node_modules/nodemailer/dist/cjs/fetch/index.d.ts +65 -0
  20. package/dist/node_modules/nodemailer/dist/cjs/fetch/index.js +384 -0
  21. package/dist/node_modules/nodemailer/dist/cjs/json-transport/index.d.ts +64 -0
  22. package/dist/node_modules/nodemailer/dist/cjs/json-transport/index.js +99 -0
  23. package/dist/node_modules/nodemailer/dist/cjs/mail-composer/index.d.ts +174 -0
  24. package/dist/node_modules/nodemailer/dist/cjs/mail-composer/index.js +613 -0
  25. package/dist/node_modules/nodemailer/dist/cjs/mailer/index.d.ts +237 -0
  26. package/dist/node_modules/nodemailer/dist/cjs/mailer/index.js +415 -0
  27. package/dist/node_modules/nodemailer/dist/cjs/mailer/mail-message.d.ts +97 -0
  28. package/dist/node_modules/nodemailer/dist/cjs/mailer/mail-message.js +342 -0
  29. package/dist/node_modules/nodemailer/dist/cjs/mime-funcs/index.d.ts +161 -0
  30. package/dist/node_modules/nodemailer/dist/cjs/mime-funcs/index.js +787 -0
  31. package/dist/node_modules/nodemailer/dist/cjs/mime-funcs/mime-types.d.ts +2 -0
  32. package/dist/node_modules/nodemailer/dist/cjs/mime-funcs/mime-types.js +2103 -0
  33. package/dist/node_modules/nodemailer/dist/cjs/mime-node/index.d.ts +333 -0
  34. package/dist/node_modules/nodemailer/dist/cjs/mime-node/index.js +1493 -0
  35. package/dist/node_modules/nodemailer/dist/cjs/mime-node/last-newline.d.ts +5 -0
  36. package/dist/node_modules/nodemailer/dist/cjs/mime-node/last-newline.js +32 -0
  37. package/dist/node_modules/nodemailer/dist/cjs/mime-node/le-unix.d.ts +9 -0
  38. package/dist/node_modules/nodemailer/dist/cjs/mime-node/le-unix.js +40 -0
  39. package/dist/node_modules/nodemailer/dist/cjs/mime-node/le-windows.d.ts +10 -0
  40. package/dist/node_modules/nodemailer/dist/cjs/mime-node/le-windows.js +47 -0
  41. package/dist/node_modules/nodemailer/dist/cjs/nodemailer.d.ts +124 -0
  42. package/dist/node_modules/nodemailer/dist/cjs/nodemailer.js +1 -0
  43. package/dist/node_modules/nodemailer/dist/cjs/package-info.d.ts +3 -0
  44. package/dist/node_modules/nodemailer/dist/cjs/package-info.js +7 -0
  45. package/dist/node_modules/nodemailer/dist/cjs/package.json +3 -0
  46. package/dist/node_modules/nodemailer/dist/cjs/punycode/index.d.ts +73 -0
  47. package/dist/node_modules/nodemailer/{lib → dist/cjs}/punycode/index.js +62 -111
  48. package/dist/node_modules/nodemailer/dist/cjs/qp/index.d.ts +32 -0
  49. package/dist/node_modules/nodemailer/dist/cjs/qp/index.js +207 -0
  50. package/dist/node_modules/nodemailer/dist/cjs/sendmail-transport/index.d.ts +69 -0
  51. package/dist/node_modules/nodemailer/dist/cjs/sendmail-transport/index.js +210 -0
  52. package/dist/node_modules/nodemailer/dist/cjs/ses-transport/index.d.ts +112 -0
  53. package/dist/node_modules/nodemailer/dist/cjs/ses-transport/index.js +252 -0
  54. package/dist/node_modules/nodemailer/dist/cjs/shared/index.d.ts +260 -0
  55. package/dist/node_modules/nodemailer/dist/cjs/shared/index.js +680 -0
  56. package/dist/node_modules/nodemailer/dist/cjs/shared/objects.d.ts +23 -0
  57. package/dist/node_modules/nodemailer/dist/cjs/shared/objects.js +43 -0
  58. package/dist/node_modules/nodemailer/dist/cjs/shared/url.d.ts +21 -0
  59. package/dist/node_modules/nodemailer/dist/cjs/shared/url.js +255 -0
  60. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.d.ts +15 -0
  61. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/data-stream.js +108 -0
  62. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/http-proxy-client.d.ts +47 -0
  63. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/http-proxy-client.js +189 -0
  64. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/index.d.ts +416 -0
  65. package/dist/node_modules/nodemailer/dist/cjs/smtp-connection/index.js +1837 -0
  66. package/dist/node_modules/nodemailer/dist/cjs/smtp-pool/index.d.ts +133 -0
  67. package/dist/node_modules/nodemailer/dist/cjs/smtp-pool/index.js +569 -0
  68. package/dist/node_modules/nodemailer/dist/cjs/smtp-pool/pool-resource.d.ts +62 -0
  69. package/dist/node_modules/nodemailer/dist/cjs/smtp-pool/pool-resource.js +257 -0
  70. package/dist/node_modules/nodemailer/dist/cjs/smtp-transport/index.d.ts +156 -0
  71. package/dist/node_modules/nodemailer/dist/cjs/smtp-transport/index.js +371 -0
  72. package/dist/node_modules/nodemailer/dist/cjs/stream-transport/index.d.ts +65 -0
  73. package/dist/node_modules/nodemailer/dist/cjs/stream-transport/index.js +146 -0
  74. package/dist/node_modules/nodemailer/dist/cjs/well-known/index.d.ts +35 -0
  75. package/dist/node_modules/nodemailer/dist/cjs/well-known/index.js +41 -0
  76. package/dist/node_modules/nodemailer/dist/cjs/well-known/services.d.ts +2 -0
  77. package/dist/node_modules/nodemailer/dist/cjs/well-known/services.js +674 -0
  78. package/dist/node_modules/nodemailer/dist/cjs/xoauth2/index.d.ts +201 -0
  79. package/dist/node_modules/nodemailer/dist/cjs/xoauth2/index.js +426 -0
  80. package/dist/node_modules/nodemailer/dist/esm/addressparser/index.d.ts +59 -0
  81. package/dist/node_modules/nodemailer/{lib → dist/esm}/addressparser/index.js +361 -131
  82. package/dist/node_modules/nodemailer/dist/esm/base64/index.d.ts +36 -0
  83. package/dist/node_modules/nodemailer/{lib → dist/esm}/base64/index.js +31 -56
  84. package/dist/node_modules/nodemailer/dist/esm/dkim/index.d.ts +52 -0
  85. package/dist/node_modules/nodemailer/{lib → dist/esm}/dkim/index.js +49 -78
  86. package/dist/node_modules/nodemailer/dist/esm/dkim/message-parser.d.ts +48 -0
  87. package/dist/node_modules/nodemailer/{lib → dist/esm}/dkim/message-parser.js +64 -42
  88. package/dist/node_modules/nodemailer/dist/esm/dkim/relaxed-body.d.ts +36 -0
  89. package/dist/node_modules/nodemailer/dist/esm/dkim/relaxed-body.js +141 -0
  90. package/dist/node_modules/nodemailer/dist/esm/dkim/sign.d.ts +52 -0
  91. package/dist/node_modules/nodemailer/{lib → dist/esm}/dkim/sign.js +50 -46
  92. package/dist/node_modules/nodemailer/dist/esm/errors.d.ts +96 -0
  93. package/dist/node_modules/nodemailer/{lib → dist/esm}/errors.js +26 -18
  94. package/dist/node_modules/nodemailer/dist/esm/fetch/cookies.d.ts +107 -0
  95. package/dist/node_modules/nodemailer/dist/esm/fetch/cookies.js +242 -0
  96. package/dist/node_modules/nodemailer/dist/esm/fetch/index.d.ts +65 -0
  97. package/dist/node_modules/nodemailer/{lib → dist/esm}/fetch/index.js +80 -147
  98. package/dist/node_modules/nodemailer/dist/esm/json-transport/index.d.ts +64 -0
  99. package/dist/node_modules/nodemailer/{lib → dist/esm}/json-transport/index.js +19 -39
  100. package/dist/node_modules/nodemailer/dist/esm/mail-composer/index.d.ts +174 -0
  101. package/dist/node_modules/nodemailer/{lib → dist/esm}/mail-composer/index.js +199 -265
  102. package/dist/node_modules/nodemailer/dist/esm/mailer/index.d.ts +237 -0
  103. package/dist/node_modules/nodemailer/{lib → dist/esm}/mailer/index.js +128 -234
  104. package/dist/node_modules/nodemailer/dist/esm/mailer/mail-message.d.ts +97 -0
  105. package/dist/node_modules/nodemailer/{lib → dist/esm}/mailer/mail-message.js +62 -114
  106. package/dist/node_modules/nodemailer/dist/esm/mime-funcs/index.d.ts +161 -0
  107. package/dist/node_modules/nodemailer/dist/esm/mime-funcs/index.js +738 -0
  108. package/dist/node_modules/nodemailer/dist/esm/mime-funcs/mime-types.d.ts +2 -0
  109. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-funcs/mime-types.js +29 -42
  110. package/dist/node_modules/nodemailer/dist/esm/mime-node/index.d.ts +333 -0
  111. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-node/index.js +259 -372
  112. package/dist/node_modules/nodemailer/dist/esm/mime-node/last-newline.d.ts +5 -0
  113. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-node/last-newline.js +4 -10
  114. package/dist/node_modules/nodemailer/dist/esm/mime-node/le-unix.d.ts +9 -0
  115. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-node/le-unix.js +6 -11
  116. package/dist/node_modules/nodemailer/dist/esm/mime-node/le-windows.d.ts +10 -0
  117. package/dist/node_modules/nodemailer/{lib → dist/esm}/mime-node/le-windows.js +6 -13
  118. package/dist/node_modules/nodemailer/dist/esm/nodemailer.d.ts +124 -0
  119. package/dist/node_modules/nodemailer/dist/esm/nodemailer.js +166 -0
  120. package/dist/node_modules/nodemailer/dist/esm/package-info.d.ts +3 -0
  121. package/dist/node_modules/nodemailer/dist/esm/package-info.js +4 -0
  122. package/dist/node_modules/nodemailer/dist/esm/package.json +3 -0
  123. package/dist/node_modules/nodemailer/dist/esm/punycode/index.d.ts +73 -0
  124. package/dist/node_modules/nodemailer/dist/esm/punycode/index.js +405 -0
  125. package/dist/node_modules/nodemailer/dist/esm/qp/index.d.ts +32 -0
  126. package/dist/node_modules/nodemailer/{lib → dist/esm}/qp/index.js +38 -67
  127. package/dist/node_modules/nodemailer/dist/esm/sendmail-transport/index.d.ts +69 -0
  128. package/dist/node_modules/nodemailer/{lib → dist/esm}/sendmail-transport/index.js +51 -101
  129. package/dist/node_modules/nodemailer/dist/esm/ses-transport/index.d.ts +112 -0
  130. package/dist/node_modules/nodemailer/dist/esm/ses-transport/index.js +212 -0
  131. package/dist/node_modules/nodemailer/dist/esm/shared/index.d.ts +260 -0
  132. package/dist/node_modules/nodemailer/{lib → dist/esm}/shared/index.js +156 -272
  133. package/dist/node_modules/nodemailer/dist/esm/shared/objects.d.ts +23 -0
  134. package/dist/node_modules/nodemailer/{lib → dist/esm}/shared/objects.js +13 -17
  135. package/dist/node_modules/nodemailer/dist/esm/shared/url.d.ts +21 -0
  136. package/dist/node_modules/nodemailer/dist/esm/shared/url.js +214 -0
  137. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.d.ts +15 -0
  138. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.js +103 -0
  139. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/http-proxy-client.d.ts +47 -0
  140. package/dist/node_modules/nodemailer/{lib → dist/esm}/smtp-connection/http-proxy-client.js +49 -74
  141. package/dist/node_modules/nodemailer/dist/esm/smtp-connection/index.d.ts +416 -0
  142. package/dist/node_modules/nodemailer/{lib → dist/esm}/smtp-connection/index.js +574 -794
  143. package/dist/node_modules/nodemailer/dist/esm/smtp-pool/index.d.ts +133 -0
  144. package/dist/node_modules/nodemailer/{lib → dist/esm}/smtp-pool/index.js +172 -284
  145. package/dist/node_modules/nodemailer/dist/esm/smtp-pool/pool-resource.d.ts +62 -0
  146. package/dist/node_modules/nodemailer/{lib → dist/esm}/smtp-pool/pool-resource.js +57 -97
  147. package/dist/node_modules/nodemailer/dist/esm/smtp-transport/index.d.ts +156 -0
  148. package/dist/node_modules/nodemailer/{lib → dist/esm}/smtp-transport/index.js +81 -179
  149. package/dist/node_modules/nodemailer/dist/esm/stream-transport/index.d.ts +65 -0
  150. package/dist/node_modules/nodemailer/{lib → dist/esm}/stream-transport/index.js +36 -74
  151. package/dist/node_modules/nodemailer/dist/esm/well-known/index.d.ts +35 -0
  152. package/dist/node_modules/nodemailer/{lib → dist/esm}/well-known/index.js +5 -16
  153. package/dist/node_modules/nodemailer/dist/esm/well-known/services.d.ts +2 -0
  154. package/dist/node_modules/nodemailer/dist/esm/well-known/services.js +671 -0
  155. package/dist/node_modules/nodemailer/dist/esm/xoauth2/index.d.ts +201 -0
  156. package/dist/node_modules/nodemailer/{lib → dist/esm}/xoauth2/index.js +125 -187
  157. package/dist/node_modules/nodemailer/{lib → dist}/well-known/services.json +9 -2
  158. package/dist/node_modules/nodemailer/package.json +1 -1
  159. package/package.json +3 -3
  160. package/dist/node_modules/nodemailer/.gitattributes +0 -6
  161. package/dist/node_modules/nodemailer/.ncurc.js +0 -9
  162. package/dist/node_modules/nodemailer/.prettierignore +0 -8
  163. package/dist/node_modules/nodemailer/.prettierrc +0 -12
  164. package/dist/node_modules/nodemailer/.prettierrc.js +0 -10
  165. package/dist/node_modules/nodemailer/.release-please-config.json +0 -9
  166. package/dist/node_modules/nodemailer/eslint.config.js +0 -88
  167. package/dist/node_modules/nodemailer/lib/dkim/relaxed-body.js +0 -154
  168. package/dist/node_modules/nodemailer/lib/fetch/cookies.js +0 -276
  169. package/dist/node_modules/nodemailer/lib/mime-funcs/index.js +0 -671
  170. package/dist/node_modules/nodemailer/lib/nodemailer.js +0 -1
  171. package/dist/node_modules/nodemailer/lib/ses-transport/index.js +0 -266
  172. package/dist/node_modules/nodemailer/lib/shared/url.js +0 -151
  173. package/dist/node_modules/nodemailer/lib/smtp-connection/data-stream.js +0 -105
@@ -0,0 +1,36 @@
1
+ import { Transform } from 'node:stream';
2
+ import crypto from 'node:crypto';
3
+ /**
4
+ * Options for the relaxed body hash stream
5
+ */
6
+ export interface RelaxedBodyOptions {
7
+ /** Hash algorithm for the body hash, defaults to sha256 */
8
+ hashAlgo?: string | undefined;
9
+ /** Collect the canonicalized body and emit it with the 'hash' event */
10
+ debug?: boolean | undefined;
11
+ }
12
+ /**
13
+ * Passes the message body through unchanged and hashes its relaxed
14
+ * canonicalization (RFC 6376 section 3.4.4) on the side: whitespace at the end
15
+ * of a line is dropped, runs of whitespace within a line become a single space,
16
+ * every line ends with CRLF, empty lines at the end of the body are ignored and
17
+ * a non-empty body always ends with CRLF. Bytes are canonicalized as they arrive,
18
+ * so a line of any length costs constant memory.
19
+ */
20
+ declare class RelaxedBody extends Transform {
21
+ bodyHash: crypto.Hash;
22
+ /** Bytes of the original body seen so far */
23
+ byteLength: number;
24
+ debug: boolean | undefined;
25
+ constructor(options?: RelaxedBodyOptions);
26
+ updateHash(chunk: Buffer, final?: boolean): void;
27
+ }
28
+ /**
29
+ * Type aliases in the layout of @types/nodemailer, so `RelaxedBody.Options` style references keep working
30
+ */
31
+ declare namespace RelaxedBody {
32
+ type Options = RelaxedBodyOptions;
33
+ }
34
+ /** The same alias as a module level export, for `import * as RelaxedBody` and `import RelaxedBody = require()` */
35
+ export type { RelaxedBodyOptions as Options };
36
+ export default RelaxedBody;
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ // streams through a message body and calculates relaxed body hash
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const node_stream_1 = require("node:stream");
8
+ const node_crypto_1 = __importDefault(require("node:crypto"));
9
+ const CHAR_CR = 0x0d;
10
+ const CHAR_LF = 0x0a;
11
+ const CHAR_SPACE = 0x20;
12
+ const CHAR_TAB = 0x09;
13
+ const CRLF = Buffer.from('\r\n');
14
+ // a run of empty lines is hashed from this buffer in slices
15
+ const EMPTY_LINES = Buffer.alloc(4096, CRLF);
16
+ /**
17
+ * Passes the message body through unchanged and hashes its relaxed
18
+ * canonicalization (RFC 6376 section 3.4.4) on the side: whitespace at the end
19
+ * of a line is dropped, runs of whitespace within a line become a single space,
20
+ * every line ends with CRLF, empty lines at the end of the body are ignored and
21
+ * a non-empty body always ends with CRLF. Bytes are canonicalized as they arrive,
22
+ * so a line of any length costs constant memory.
23
+ */
24
+ class RelaxedBody extends node_stream_1.Transform {
25
+ constructor(options) {
26
+ super();
27
+ options = options || {};
28
+ this.bodyHash = node_crypto_1.default.createHash(options.hashAlgo || 'sha256');
29
+ this.byteLength = 0;
30
+ this.debug = options.debug;
31
+ this._debugBody = options.debug ? [] : false;
32
+ this._lineHasContent = false;
33
+ this._pendingWsp = false;
34
+ this._pendingCr = false;
35
+ this._pendingEmptyLines = 0;
36
+ }
37
+ /** @internal */
38
+ _hashCanonical(data) {
39
+ if (!data.length) {
40
+ return;
41
+ }
42
+ this.bodyHash.update(data);
43
+ if (this._debugBody) {
44
+ this._debugBody.push(Buffer.from(data));
45
+ }
46
+ }
47
+ /** @internal */
48
+ _hashEmptyLines() {
49
+ while (this._pendingEmptyLines > 0) {
50
+ const count = Math.min(this._pendingEmptyLines, EMPTY_LINES.length / 2);
51
+ this._hashCanonical(EMPTY_LINES.subarray(0, count * 2));
52
+ this._pendingEmptyLines -= count;
53
+ }
54
+ }
55
+ /**
56
+ * Writes a content byte, with the space a pending run of whitespace collapses to,
57
+ * into the output buffer and returns the new write position. Kept a method rather
58
+ * than a closure so the write position stays a plain local in the byte loop
59
+ * @internal
60
+ */
61
+ _emitContent(out, outPos, c) {
62
+ if (!this._lineHasContent) {
63
+ if (this._pendingEmptyLines) {
64
+ // the first content byte of a line is where the empty lines before it
65
+ // become part of the body, so hash what is in the buffer before them
66
+ this._hashCanonical(out.subarray(0, outPos));
67
+ outPos = 0;
68
+ this._hashEmptyLines();
69
+ }
70
+ this._lineHasContent = true;
71
+ }
72
+ if (this._pendingWsp) {
73
+ out[outPos++] = CHAR_SPACE;
74
+ this._pendingWsp = false;
75
+ }
76
+ out[outPos++] = c;
77
+ return outPos;
78
+ }
79
+ updateHash(chunk, final) {
80
+ // every byte contributes itself at most once, plus a CR for a bare LF
81
+ // and, once per chunk, a pending space and CR carried over from before
82
+ const out = Buffer.allocUnsafe(chunk.length * 2 + 2);
83
+ let outPos = 0;
84
+ for (let i = 0; i < chunk.length; i++) {
85
+ const c = chunk[i];
86
+ if (c === CHAR_LF) {
87
+ // end of line, a CR right before it and any trailing whitespace are dropped
88
+ if (this._lineHasContent) {
89
+ out[outPos++] = CHAR_CR;
90
+ out[outPos++] = CHAR_LF;
91
+ this._lineHasContent = false;
92
+ }
93
+ else {
94
+ this._pendingEmptyLines++;
95
+ }
96
+ this._pendingWsp = false;
97
+ this._pendingCr = false;
98
+ continue;
99
+ }
100
+ if (this._pendingCr) {
101
+ // not followed by LF, so the CR is content
102
+ outPos = this._emitContent(out, outPos, CHAR_CR);
103
+ this._pendingCr = false;
104
+ }
105
+ if (c === CHAR_CR) {
106
+ this._pendingCr = true;
107
+ }
108
+ else if (c === CHAR_SPACE || c === CHAR_TAB) {
109
+ this._pendingWsp = true;
110
+ }
111
+ else {
112
+ outPos = this._emitContent(out, outPos, c);
113
+ }
114
+ }
115
+ if (final && this._pendingCr) {
116
+ // a CR at the very end of the body is content
117
+ outPos = this._emitContent(out, outPos, CHAR_CR);
118
+ this._pendingCr = false;
119
+ }
120
+ this._hashCanonical(out.subarray(0, outPos));
121
+ }
122
+ /** @internal */
123
+ _transform(chunk, encoding, callback) {
124
+ if (!chunk || !chunk.length) {
125
+ return callback();
126
+ }
127
+ if (typeof chunk === 'string') {
128
+ chunk = Buffer.from(chunk, encoding);
129
+ }
130
+ this.updateHash(chunk);
131
+ this.byteLength += chunk.length;
132
+ this.push(chunk);
133
+ callback();
134
+ }
135
+ /** @internal */
136
+ _flush(callback) {
137
+ this.updateHash(Buffer.alloc(0), true);
138
+ if (this._lineHasContent) {
139
+ // the body does not end with a line break, add one
140
+ this._hashCanonical(CRLF);
141
+ }
142
+ this.emit('hash', this.bodyHash.digest('base64'), this.debug ? Buffer.concat(this._debugBody) : false);
143
+ callback();
144
+ }
145
+ }
146
+ exports.default = RelaxedBody;
147
+ module.exports = exports.default;
148
+ Object.defineProperty(module.exports, 'default', { value: exports.default, enumerable: false, writable: true, configurable: true });
@@ -0,0 +1,52 @@
1
+ import crypto from 'node:crypto';
2
+ import type { NodemailerError } from '../errors.js';
3
+ import type { MessageParserHeaderLine } from './message-parser.js';
4
+ /**
5
+ * Private key accepted by crypto.Sign#sign: a PEM string, a Buffer, a KeyObject or an
6
+ * object with the key and its passphrase
7
+ */
8
+ export type DKIMPrivateKey = crypto.KeyLike | crypto.SignKeyObjectInput | crypto.SignPrivateKeyInput;
9
+ /**
10
+ * Options for the DKIM signature header generator
11
+ */
12
+ export interface DKIMKey {
13
+ /** Domain name to be signed for */
14
+ domainName?: string | undefined;
15
+ /** DKIM key selector to use */
16
+ keySelector?: string | undefined;
17
+ /** DKIM private key to use */
18
+ privateKey?: DKIMPrivateKey | undefined;
19
+ }
20
+ export interface DKIMSignOptions extends DKIMKey {
21
+ /** Colon separated list of header field names to sign, defaults to the RFC4871 list */
22
+ headerFieldNames?: string | undefined;
23
+ /** Colon separated list of header field names to leave out of the signature */
24
+ skipFields?: string | undefined;
25
+ }
26
+ /**
27
+ * Canonicalized headers and the list of field names that went into them
28
+ */
29
+ export interface DKIMRelaxedHeaders {
30
+ /** Relaxed header lines, each terminated with CRLF, one character per byte ('binary' encoding) */
31
+ headers: string;
32
+ /** Colon separated list of the field names that were included */
33
+ fieldNames: string;
34
+ }
35
+ /**
36
+ * Returns DKIM signature header line
37
+ *
38
+ * @param headers Parsed headers object from MessageParser
39
+ * @param hashAlgo Hash algorithm the body hash was calculated with, for example "sha256"
40
+ * @param bodyHash Base64 encoded hash of the message
41
+ * @param options DKIM options
42
+ * @param options.domainName Domain name to be signed for
43
+ * @param options.keySelector DKIM key selector to use
44
+ * @param options.privateKey DKIM private key to use
45
+ * @return Complete header line
46
+ */
47
+ declare function sign(headers: MessageParserHeaderLine[], hashAlgo: string, bodyHash: string, options?: DKIMSignOptions): string | false;
48
+ declare namespace sign {
49
+ var relaxedHeaders: (headers: MessageParserHeaderLine[], fieldNames?: string, skipFields?: string) => DKIMRelaxedHeaders;
50
+ var unsupportedHashAlgoError: (hashAlgo: string) => NodemailerError;
51
+ }
52
+ export default sign;
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const punycode = __importStar(require("../punycode/index.js"));
40
+ const mimeFuncs = __importStar(require("../mime-funcs/index.js"));
41
+ const node_crypto_1 = __importDefault(require("node:crypto"));
42
+ const errors = __importStar(require("../errors.js"));
43
+ /**
44
+ * Error for a hashAlgo value the crypto module does not know
45
+ */
46
+ function unsupportedHashAlgoError(hashAlgo) {
47
+ const err = new Error('Unsupported DKIM hash algorithm "' + hashAlgo + '"');
48
+ err.code = errors.ECONFIG;
49
+ return err;
50
+ }
51
+ /**
52
+ * Returns DKIM signature header line
53
+ *
54
+ * @param headers Parsed headers object from MessageParser
55
+ * @param hashAlgo Hash algorithm the body hash was calculated with, for example "sha256"
56
+ * @param bodyHash Base64 encoded hash of the message
57
+ * @param options DKIM options
58
+ * @param options.domainName Domain name to be signed for
59
+ * @param options.keySelector DKIM key selector to use
60
+ * @param options.privateKey DKIM private key to use
61
+ * @return Complete header line
62
+ */
63
+ function sign(headers, hashAlgo, bodyHash, options) {
64
+ options = options || {};
65
+ // all listed fields from RFC4871 #5.5
66
+ const defaultFieldNames = 'From:Sender:Reply-To:Subject:Date:Message-ID:To:' +
67
+ 'Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:' +
68
+ 'Content-Description:Resent-Date:Resent-From:Resent-Sender:' +
69
+ 'Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:' +
70
+ 'List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:' +
71
+ 'List-Owner:List-Archive';
72
+ const fieldNames = options.headerFieldNames || defaultFieldNames;
73
+ const canonicalizedHeaderData = relaxedHeaders(headers, fieldNames, options.skipFields);
74
+ const dkimHeader = generateDKIMHeader(options.domainName, options.keySelector, canonicalizedHeaderData.fieldNames, hashAlgo, bodyHash);
75
+ canonicalizedHeaderData.headers += 'dkim-signature:' + relaxedHeaderLine(dkimHeader);
76
+ let signer;
77
+ try {
78
+ signer = node_crypto_1.default.createSign(('rsa-' + hashAlgo).toUpperCase());
79
+ }
80
+ catch (_E) {
81
+ throw unsupportedHashAlgoError(hashAlgo);
82
+ }
83
+ // the header lines are 'binary' strings, so this reproduces the original header bytes
84
+ signer.update(canonicalizedHeaderData.headers, 'latin1');
85
+ let signature;
86
+ try {
87
+ signature = signer.sign(options.privateKey, 'base64');
88
+ }
89
+ catch (_E) {
90
+ return false;
91
+ }
92
+ return dkimHeader + signature.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g, '$&\r\n ').trim();
93
+ }
94
+ sign.relaxedHeaders = relaxedHeaders;
95
+ sign.unsupportedHashAlgoError = unsupportedHashAlgoError;
96
+ exports.default = sign;
97
+ function generateDKIMHeader(domainName, keySelector, fieldNames, hashAlgo, bodyHash) {
98
+ // the caller supplied tag values are interpolated straight into the tag list, and none of
99
+ // them has any way to carry a control char, DEL, or one of the delimiters that would close
100
+ // the value and open a tag of its own
101
+ const cleanTagValue = (value) => (value || '').toString().replace(/[\x00-\x1f\x7f;=]/g, '');
102
+ const dkim = [
103
+ 'v=1',
104
+ 'a=rsa-' + hashAlgo,
105
+ 'c=relaxed/relaxed',
106
+ 'd=' + punycode.toASCII(cleanTagValue(domainName)),
107
+ 'q=dns/txt',
108
+ 's=' + cleanTagValue(keySelector),
109
+ 'bh=' + bodyHash,
110
+ 'h=' + cleanTagValue(fieldNames)
111
+ ].join('; ');
112
+ return mimeFuncs.foldLines('DKIM-Signature: ' + dkim, 76) + ';\r\n b=';
113
+ }
114
+ function relaxedHeaders(headers, fieldNames, skipFields) {
115
+ const includedFields = new Set();
116
+ const skip = new Set();
117
+ const headerFields = new Map();
118
+ (skipFields || '')
119
+ .toLowerCase()
120
+ .split(':')
121
+ .forEach(field => {
122
+ skip.add(field.trim());
123
+ });
124
+ (fieldNames || '')
125
+ .toLowerCase()
126
+ .split(':')
127
+ .filter(field => !skip.has(field.trim()))
128
+ .forEach(field => {
129
+ includedFields.add(field.trim());
130
+ });
131
+ for (let i = headers.length - 1; i >= 0; i--) {
132
+ const line = headers[i];
133
+ // only include the first value from bottom to top
134
+ if (includedFields.has(line.key) && !headerFields.has(line.key)) {
135
+ headerFields.set(line.key, relaxedHeaderLine(line.line));
136
+ }
137
+ }
138
+ const headersList = [];
139
+ const fields = [];
140
+ includedFields.forEach(field => {
141
+ if (headerFields.has(field)) {
142
+ fields.push(field);
143
+ headersList.push(field + ':' + headerFields.get(field));
144
+ }
145
+ });
146
+ return {
147
+ headers: headersList.join('\r\n') + '\r\n',
148
+ fieldNames: fields.join(':')
149
+ };
150
+ }
151
+ /**
152
+ * Relaxed canonicalization of a header field value (RFC 6376 section 3.4.2): unfold, turn
153
+ * every run of SP and HTAB into a single SP and drop the whitespace next to the colon and
154
+ * at the end. Only SP and HTAB count as whitespace, so bytes that decode to other space
155
+ * characters, such as a non-breaking space in a UTF-8 header, stay as they are
156
+ */
157
+ function relaxedHeaderLine(line) {
158
+ return line
159
+ .substr(line.indexOf(':') + 1)
160
+ .replace(/\r?\n/g, '')
161
+ .replace(/[ \t]+/g, ' ')
162
+ .replace(/^ | $/g, '');
163
+ }
164
+ module.exports = exports.default;
165
+ Object.defineProperty(module.exports, 'default', { value: exports.default, enumerable: false, writable: true, configurable: true });
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Nodemailer Error Codes
3
+ *
4
+ * Centralized error code definitions for consistent error handling.
5
+ *
6
+ * Usage:
7
+ * import * as errors from './errors.js';
8
+ * const err: NodemailerError = new Error('Connection closed');
9
+ * err.code = errors.ECONNECTION;
10
+ */
11
+ /**
12
+ * Error code descriptions for documentation and debugging
13
+ */
14
+ export declare const ERROR_CODES: {
15
+ readonly ECONNECTION: "Connection closed unexpectedly";
16
+ readonly ETIMEDOUT: "Connection or operation timed out";
17
+ readonly ESOCKET: "Socket-level error";
18
+ readonly EDNS: "DNS resolution failed";
19
+ readonly ETLS: "TLS handshake or STARTTLS failed";
20
+ readonly EREQUIRETLS: "REQUIRETLS not supported by server (RFC 8689)";
21
+ readonly EPROTOCOL: "Invalid SMTP server response";
22
+ readonly EENVELOPE: "Invalid mail envelope (sender or recipients)";
23
+ readonly EMESSAGE: "Message delivery error";
24
+ readonly ESTREAM: "Stream processing error";
25
+ readonly EAUTH: "Authentication failed";
26
+ readonly ENOAUTH: "Authentication credentials not provided";
27
+ readonly EOAUTH2: "OAuth2 token generation or refresh error";
28
+ readonly EMAXLIMIT: "Pool resource limit reached (max messages per connection)";
29
+ readonly EMAXRECIPIENTS: "Recipient count exceeds maxRecipients";
30
+ readonly ESENDMAIL: "Sendmail command error";
31
+ readonly ESES: "AWS SES transport error";
32
+ readonly ECONFIG: "Invalid configuration";
33
+ readonly EPROXY: "Proxy connection error";
34
+ readonly EFILEACCESS: "File access rejected (disableFileAccess is set)";
35
+ readonly EURLACCESS: "URL access rejected (disableUrlAccess is set)";
36
+ readonly EFETCH: "HTTP fetch error";
37
+ };
38
+ /**
39
+ * Union of all known Nodemailer error codes
40
+ */
41
+ export type ErrorCode = keyof typeof ERROR_CODES;
42
+ export declare const ECONNECTION = "ECONNECTION";
43
+ export declare const ETIMEDOUT = "ETIMEDOUT";
44
+ export declare const ESOCKET = "ESOCKET";
45
+ export declare const EDNS = "EDNS";
46
+ export declare const ETLS = "ETLS";
47
+ export declare const EREQUIRETLS = "EREQUIRETLS";
48
+ export declare const EPROTOCOL = "EPROTOCOL";
49
+ export declare const EENVELOPE = "EENVELOPE";
50
+ export declare const EMESSAGE = "EMESSAGE";
51
+ export declare const ESTREAM = "ESTREAM";
52
+ export declare const EAUTH = "EAUTH";
53
+ export declare const ENOAUTH = "ENOAUTH";
54
+ export declare const EOAUTH2 = "EOAUTH2";
55
+ export declare const EMAXLIMIT = "EMAXLIMIT";
56
+ export declare const EMAXRECIPIENTS = "EMAXRECIPIENTS";
57
+ export declare const ESENDMAIL = "ESENDMAIL";
58
+ export declare const ESES = "ESES";
59
+ export declare const ECONFIG = "ECONFIG";
60
+ export declare const EPROXY = "EPROXY";
61
+ export declare const EFILEACCESS = "EFILEACCESS";
62
+ export declare const EURLACCESS = "EURLACCESS";
63
+ export declare const EFETCH = "EFETCH";
64
+ /**
65
+ * An Error together with the properties Nodemailer attaches to the errors it
66
+ * hands to callers. Every property is optional, the set that is present
67
+ * depends on where the error originated. Socket level errors keep the errno
68
+ * and syscall fields Node.js sets on them.
69
+ */
70
+ export interface NodemailerError extends NodeJS.ErrnoException {
71
+ /** Nodemailer error code, see ERROR_CODES */
72
+ code?: string | undefined;
73
+ /** SMTP command that was in flight when the server replied with an error */
74
+ command?: string | undefined;
75
+ /** Raw SMTP server response */
76
+ response?: string | undefined;
77
+ /** Numeric SMTP response code */
78
+ responseCode?: number | undefined;
79
+ /** URL of the resource that could not be fetched */
80
+ sourceUrl?: string | undefined;
81
+ /** Recipient address the error applies to */
82
+ recipient?: string | undefined;
83
+ /** Recipient addresses rejected by the server */
84
+ rejected?: string[] | undefined;
85
+ /** Per-recipient errors for the rejected addresses */
86
+ rejectedErrors?: NodemailerError[] | undefined;
87
+ }
88
+ /**
89
+ * Node style callback: called with an error, or with null and the result
90
+ */
91
+ export type Callback<T> = (err: NodemailerError | null, result: T) => void;
92
+ /**
93
+ * Callback as the library calls it on its error paths: with an error alone, or with null and
94
+ * the result. The public signatures use Callback, internally the error paths cast to this
95
+ */
96
+ export type ResultCallback<T> = (err: NodemailerError | null, result?: T) => void;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * Nodemailer Error Codes
4
+ *
5
+ * Centralized error code definitions for consistent error handling.
6
+ *
7
+ * Usage:
8
+ * import * as errors from './errors.js';
9
+ * const err: NodemailerError = new Error('Connection closed');
10
+ * err.code = errors.ECONNECTION;
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.EFETCH = exports.EURLACCESS = exports.EFILEACCESS = exports.EPROXY = exports.ECONFIG = exports.ESES = exports.ESENDMAIL = exports.EMAXRECIPIENTS = exports.EMAXLIMIT = exports.EOAUTH2 = exports.ENOAUTH = exports.EAUTH = exports.ESTREAM = exports.EMESSAGE = exports.EENVELOPE = exports.EPROTOCOL = exports.EREQUIRETLS = exports.ETLS = exports.EDNS = exports.ESOCKET = exports.ETIMEDOUT = exports.ECONNECTION = exports.ERROR_CODES = void 0;
14
+ /**
15
+ * Error code descriptions for documentation and debugging
16
+ */
17
+ exports.ERROR_CODES = {
18
+ // Connection errors
19
+ ECONNECTION: 'Connection closed unexpectedly',
20
+ ETIMEDOUT: 'Connection or operation timed out',
21
+ ESOCKET: 'Socket-level error',
22
+ EDNS: 'DNS resolution failed',
23
+ // TLS/Security errors
24
+ ETLS: 'TLS handshake or STARTTLS failed',
25
+ EREQUIRETLS: 'REQUIRETLS not supported by server (RFC 8689)',
26
+ // Protocol errors
27
+ EPROTOCOL: 'Invalid SMTP server response',
28
+ EENVELOPE: 'Invalid mail envelope (sender or recipients)',
29
+ EMESSAGE: 'Message delivery error',
30
+ ESTREAM: 'Stream processing error',
31
+ // Authentication errors
32
+ EAUTH: 'Authentication failed',
33
+ ENOAUTH: 'Authentication credentials not provided',
34
+ EOAUTH2: 'OAuth2 token generation or refresh error',
35
+ // Resource errors
36
+ EMAXLIMIT: 'Pool resource limit reached (max messages per connection)',
37
+ EMAXRECIPIENTS: 'Recipient count exceeds maxRecipients',
38
+ // Transport-specific errors
39
+ ESENDMAIL: 'Sendmail command error',
40
+ ESES: 'AWS SES transport error',
41
+ // Configuration and access errors
42
+ ECONFIG: 'Invalid configuration',
43
+ EPROXY: 'Proxy connection error',
44
+ EFILEACCESS: 'File access rejected (disableFileAccess is set)',
45
+ EURLACCESS: 'URL access rejected (disableUrlAccess is set)',
46
+ EFETCH: 'HTTP fetch error'
47
+ };
48
+ // Error codes as string constants
49
+ exports.ECONNECTION = 'ECONNECTION';
50
+ exports.ETIMEDOUT = 'ETIMEDOUT';
51
+ exports.ESOCKET = 'ESOCKET';
52
+ exports.EDNS = 'EDNS';
53
+ exports.ETLS = 'ETLS';
54
+ exports.EREQUIRETLS = 'EREQUIRETLS';
55
+ exports.EPROTOCOL = 'EPROTOCOL';
56
+ exports.EENVELOPE = 'EENVELOPE';
57
+ exports.EMESSAGE = 'EMESSAGE';
58
+ exports.ESTREAM = 'ESTREAM';
59
+ exports.EAUTH = 'EAUTH';
60
+ exports.ENOAUTH = 'ENOAUTH';
61
+ exports.EOAUTH2 = 'EOAUTH2';
62
+ exports.EMAXLIMIT = 'EMAXLIMIT';
63
+ exports.EMAXRECIPIENTS = 'EMAXRECIPIENTS';
64
+ exports.ESENDMAIL = 'ESENDMAIL';
65
+ exports.ESES = 'ESES';
66
+ exports.ECONFIG = 'ECONFIG';
67
+ exports.EPROXY = 'EPROXY';
68
+ exports.EFILEACCESS = 'EFILEACCESS';
69
+ exports.EURLACCESS = 'EURLACCESS';
70
+ exports.EFETCH = 'EFETCH';
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Options for the Cookies jar
3
+ */
4
+ export interface CookiesOptions {
5
+ /** Lifetime in seconds for cookies that do not set their own expiration (default 1800) */
6
+ sessionTimeout?: number | string | undefined;
7
+ }
8
+ /**
9
+ * A cookie as parsed from a 'Set-Cookie:' header and kept in the jar
10
+ */
11
+ export interface Cookie {
12
+ name?: string | undefined;
13
+ value?: string | undefined;
14
+ domain?: string | undefined;
15
+ path?: string | undefined;
16
+ expires?: Date | undefined;
17
+ secure?: boolean | undefined;
18
+ httponly?: boolean | undefined;
19
+ }
20
+ type CookieEntry = Cookie;
21
+ /**
22
+ * Creates a biskviit cookie jar for managing cookie values in memory
23
+ *
24
+ * @constructor
25
+ * @param [options] Optional options object
26
+ */
27
+ declare class Cookies {
28
+ options: CookiesOptions;
29
+ cookies: Cookie[];
30
+ constructor(options?: CookiesOptions);
31
+ /**
32
+ * Stores a cookie string to the cookie storage
33
+ *
34
+ * @param cookieStr Value from the 'Set-Cookie:' header
35
+ * @param url Current URL
36
+ */
37
+ set(cookieStr: string, url?: string): boolean;
38
+ /**
39
+ * Returns cookie string for the 'Cookie:' header.
40
+ *
41
+ * @param url URL to check for
42
+ * @returns Cookie header or empty string if no matches were found
43
+ */
44
+ get(url?: string): string;
45
+ /**
46
+ * Lists all valied cookie objects for the specified URL
47
+ *
48
+ * @param url URL to check for
49
+ * @returns An array of cookie objects
50
+ */
51
+ list(url?: string): Cookie[];
52
+ /**
53
+ * Parses cookie string from the 'Set-Cookie:' header
54
+ *
55
+ * @param cookieStr String from the 'Set-Cookie:' header
56
+ * @returns Cookie object
57
+ */
58
+ parse(cookieStr?: string): Cookie;
59
+ /**
60
+ * Checks if a cookie object is valid for a specified URL
61
+ *
62
+ * @param cookie Cookie object
63
+ * @param url URL to check for
64
+ * @returns true if cookie is valid for specifiec URL
65
+ */
66
+ match(cookie: Cookie, url?: string): boolean;
67
+ /**
68
+ * Adds (or updates/removes if needed) a cookie object to the cookie storage
69
+ *
70
+ * @param cookie Cookie value to be stored
71
+ */
72
+ add(cookie: Cookie): boolean;
73
+ /**
74
+ * Checks if two cookie objects are the same
75
+ *
76
+ * @param a Cookie to check against
77
+ * @param b Cookie to check against
78
+ * @returns True, if the cookies are the same
79
+ */
80
+ compare(a: Cookie, b: Cookie): boolean;
81
+ /**
82
+ * Checks if a cookie is expired
83
+ *
84
+ * @param cookie Cookie object to check against
85
+ * @returns True, if the cookie is expired
86
+ */
87
+ isExpired(cookie: Cookie): boolean;
88
+ /**
89
+ * Returns the default path for an URL path argument, the default-path of
90
+ * RFC 6265 section 5.1.4. A cookie that carries no Path attribute is scoped
91
+ * to the directory of the URL it was set from
92
+ *
93
+ * @param pathname
94
+ * @returns Default path
95
+ */
96
+ getPath(pathname?: string | null): string;
97
+ }
98
+ /**
99
+ * Type aliases in the layout of @types/nodemailer, so `Cookies.Cookie` style references keep working
100
+ */
101
+ declare namespace Cookies {
102
+ type Options = CookiesOptions;
103
+ type Cookie = CookieEntry;
104
+ }
105
+ /** The same alias as a module level export, for `import * as Cookies` and `import Cookies = require()` */
106
+ export type { CookiesOptions as Options };
107
+ export default Cookies;