Skip to content

Commit 36fcabc

Browse files
authored
fix(typos): fixed typos ZMS-167 (zone-eu#740)
1 parent 6f03e89 commit 36fcabc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+191
-195
lines changed

api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ server.use(async (req, res) => {
355355
req.role = tokenData.role;
356356
req.user = tokenData.user;
357357

358-
// make a reference to original method, otherwise might be overrided
358+
// make a reference to original method, otherwise might be overridden
359359
let setAuthToken = userHandler.setAuthToken.bind(userHandler);
360360

361361
req.accessToken = {

config/imap.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ maxMB = 25
1313
# delete messages from \Trash and \Junk after retention days
1414
retention = 30
1515

16-
# Default max donwload bandwith per day in megabytes
16+
# Default max download bandwidth per day in megabytes
1717
# Replaced by 'const:max:imap:download' setting
1818
maxDownloadMB = 10240
1919

20-
# Default max upload bandwith per day in megabytes
20+
# Default max upload bandwidth per day in megabytes
2121
# Replaced by 'const:max:imap:upload' setting
2222
maxUploadMB = 10240
2323

@@ -35,8 +35,8 @@ enableCompression = false
3535

3636
# If true, then expect HAProxy PROXY header as the first line of data
3737
useProxy = false
38-
# useProxy=true # expect PROXY from all conections
39-
# useProxy=['*'] # expect PROXY from all conections
38+
# useProxy=true # expect PROXY from all connections
39+
# useProxy=['*'] # expect PROXY from all connections
4040
# useProxy=['1.2.3.4', '1.2.3.5'] # expect PROXY only from connections from listed IP addresses
4141

4242
# an array of IP addresses to ignore (not logged)
@@ -54,7 +54,7 @@ ignoredHosts = []
5454
#secure=false
5555
#ignoreSTARTTLS=true
5656

57-
# Apple push notificiations
57+
# Apple push notifications
5858
# TODO: missing actual implementation for Apple Push Service
5959
[aps]
6060
enabled = false

config/pop3.toml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
# If enabled then WildDuck exposes a limited POP3 interface for listing and fetching emails
2-
enabled=true
3-
port=9995
2+
enabled = true
3+
port = 9995
44
# by default bind to localhost only
5-
host="0.0.0.0"
5+
host = "0.0.0.0"
66

77
# Use `true` for port 995 and `false` for 110
8-
secure=true
8+
secure = true
99

1010
# If true, then do not show server info in CAPA response
11-
disableVersionString=false
11+
disableVersionString = false
1212

1313
# How many latest messages to list for LIST and UIDL
1414
# POP3 server never lists all messages but only a limited length list
15-
maxMessages=250
15+
maxMessages = 250
1616

17-
# Max donwload bandwith per day in megabytes
17+
# Max download bandwidth per day in megabytes
1818
# Replaced by 'const:max:pop3:download' setting
19-
maxDownloadMB=10240
19+
maxDownloadMB = 10240
2020

2121
# If true, then expect HAProxy PROXY header as the first line of data
22-
useProxy=false
22+
useProxy = false
2323

2424
# an array of IP addresses to ignore (not logged)
25-
ignoredHosts=[]
25+
ignoredHosts = []
2626

2727
#name="WildDuck POP3"
2828
#version="1.0.0"
@@ -34,7 +34,7 @@ ignoredHosts=[]
3434

3535
[setup]
3636
# Public configuration for POP3
37-
hostname="localhost"
38-
secure=true
37+
hostname = "localhost"
38+
secure = true
3939
# port defaults to pop3.port
4040
#port=9995

config/tls.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Default TLS keys (can be overriden by individual services)
1+
# Default TLS keys (can be overridden by individual services)
22
#key="/path/to/server/key.pem"
33
#ca=["/path/to/server/ca1.pem", "/path/to/server/ca2.pem"]
44
#cert="/path/to/server/cert.pem"
5-
#dhparam="/path/to/server/dhparam.pem"
5+
#dhparam="/path/to/server/dhparam.pem"

docs/api-error-codes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
- `FileNotFound`: This file does not exist
2727
- `InsecurePasswordError`: Provided password was found from breached passwords list
2828
- `ERRCOMPOSE`: Could not queue message for delivery
29-
- `KeyGenereateError`: Failed to generate private or public key
29+
- `KeyGenerateError`: Failed to generate private or public key
3030
- `InternalConfigError`: Invalid encryption settings
3131
- `HashError`
3232
- `UserUpdateFail`: Could not update user

docs/api/openapidocs.json

+1-1
Large diffs are not rendered by default.

docs/in-depth/command-line.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ wduck-users() {
7575
}
7676
```
7777

78-
### Query user informations
78+
### Query user information
7979

8080
```
8181
curl -i http://localhost:8080/users/$USERID

imap-core/lib/commands/copy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = {
4848
_user: this.session.user.id.toString(),
4949
_mailbox: this.selected.mailbox,
5050
_sess: this.id,
51-
_message_count: messages.lentgh
51+
_message_count: messages.length
5252
};
5353

5454
this._server.onCopy(

imap-core/lib/commands/list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ module.exports = {
153153
let specialUseFlag = folder.specialUse;
154154
if (specialUseFlag) {
155155
if (isXlist && XlistTags.has(specialUseFlag)) {
156-
// rewite flag to XLIST tag which is a bit different
156+
// rewrite flag to XLIST tag which is a bit different
157157
specialUseFlag = XlistTags.get(specialUseFlag);
158158
}
159159
flags.push(specialUseFlag);

imap-core/lib/commands/move.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = {
4848
_user: this.session.user.id.toString(),
4949
_mailbox: this.selected.mailbox,
5050
_sess: this.id,
51-
_message_count: messages.lentgh
51+
_message_count: messages.length
5252
};
5353

5454
this._server.onMove(

imap-core/lib/commands/namespace.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
state: ['Authenticated', 'Selected'],
55

66
handler(command, callback) {
7-
// fixed structre
7+
// fixed structure
88
this.send('* NAMESPACE (("" "/")) NIL NIL');
99

1010
callback(null, {

imap-core/lib/commands/search.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function parseQueryTerms(terms, uidList) {
223223
break;
224224

225225
case 'or':
226-
// ensure that value is alwas an array
226+
// ensure that value is always an array
227227
response.value = [].concat(curTerm.slice(1) || []);
228228
break;
229229

imap-core/lib/commands/store.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = {
4747
let type = 'flags'; // currently hard coded, in the future might support other values as well, eg. X-GM-LABELS
4848
let range = (command.attributes[0] && command.attributes[0].value) || '';
4949

50-
// if arguments include extenstions at index 1, then length is 4, otherwise 3
50+
// if arguments include extensions at index 1, then length is 4, otherwise 3
5151
let pos = command.attributes.length === 4 ? 1 : 0;
5252

5353
let action = ((command.attributes[pos + 1] && command.attributes[pos + 1].value) || '').toString().toUpperCase();
@@ -124,7 +124,7 @@ module.exports = {
124124
_user: this.session.user.id.toString(),
125125
_mailbox: this.selected.mailbox,
126126
_sess: this.id,
127-
_message_count: messages.lentgh,
127+
_message_count: messages.length,
128128
_flags: flags.join(', '),
129129
_store_action: action,
130130
_silent: silent ? 'yes' : '',
@@ -157,11 +157,13 @@ module.exports = {
157157
// STORE returns MODIFIED as sequence numbers, so convert UIDs to sequence list
158158
if (modified && modified.length) {
159159
logdata._modified = modified.length;
160-
modified = modified.map(uid => this.selected.uidList.indexOf(uid) + 1).filter(
161-
seq =>
162-
// ensure that deleted items (eg seq=0) do not end up in the list
163-
seq > 0
164-
);
160+
modified = modified
161+
.map(uid => this.selected.uidList.indexOf(uid) + 1)
162+
.filter(
163+
seq =>
164+
// ensure that deleted items (eg seq=0) do not end up in the list
165+
seq > 0
166+
);
165167
}
166168

167169
let message = success === true ? 'STORE completed' : false;
@@ -181,8 +183,8 @@ module.exports = {
181183
typeof success === 'string'
182184
? success.toUpperCase()
183185
: modified && modified.length
184-
? 'MODIFIED ' + imapTools.packMessageRange(modified)
185-
: false,
186+
? 'MODIFIED ' + imapTools.packMessageRange(modified)
187+
: false,
186188
message
187189
};
188190

imap-core/lib/commands/uid-store.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
let type = 'flags'; // currently hard coded, in the future might support other values as well, eg. X-GM-LABELS
3838
let range = (command.attributes[0] && command.attributes[0].value) || '';
3939

40-
// if arguments include extenstions at index 1, then length is 4, otherwise 3
40+
// if arguments include extensions at index 1, then length is 4, otherwise 3
4141
let pos = command.attributes.length === 4 ? 1 : 0;
4242

4343
let action = ((command.attributes[pos + 1] && command.attributes[pos + 1].value) || '').toString().toUpperCase();
@@ -111,7 +111,7 @@ module.exports = {
111111
_user: this.session.user.id.toString(),
112112
_mailbox: this.selected.mailbox,
113113
_sess: this.id,
114-
_message_count: messages.lentgh,
114+
_message_count: messages.length,
115115
_flags: flags.join(', '),
116116
_store_action: action,
117117
_silent: silent ? 'yes' : '',
@@ -160,8 +160,8 @@ module.exports = {
160160
typeof success === 'string'
161161
? success.toUpperCase()
162162
: modified && modified.length
163-
? 'MODIFIED ' + imapTools.packMessageRange(modified)
164-
: false,
163+
? 'MODIFIED ' + imapTools.packMessageRange(modified)
164+
: false,
165165
message
166166
});
167167
}

imap-core/lib/commands/xapplepushservice.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ module.exports = {
116116
}
117117
}
118118

119-
// Make sure all required keys (exept mailboxes) are present
119+
// Make sure all required keys (except mailboxes) are present
120120
for (let requiredKey of requiredKeys) {
121121
if (!data[requiredKey] && requiredKey !== 'mailboxes') {
122122
return callback(null, {

imap-core/lib/handler/imap-compile-stream.js

+8-14
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,16 @@ module.exports = (response, isLogging) => {
5757
if (stream.isLimited) {
5858
// stream is already limited
5959
let limiter = new LengthLimiter(expectedLength - startFrom, ' ', 0);
60-
stream.pipe(limiter).pipe(
61-
output,
62-
{
63-
end: false
64-
}
65-
);
60+
stream.pipe(limiter).pipe(output, {
61+
end: false
62+
});
6663
limiter.once('end', () => resolve());
6764
} else {
6865
// force limites
6966
let limiter = new LengthLimiter(expectedLength, ' ', startFrom);
70-
stream.pipe(limiter).pipe(
71-
output,
72-
{
73-
end: false
74-
}
75-
);
67+
stream.pipe(limiter).pipe(output, {
68+
end: false
69+
});
7670
limiter.once('end', () => resolve());
7771
}
7872

@@ -106,7 +100,7 @@ module.exports = (response, isLogging) => {
106100
// (...)
107101
resp.push(LEFT_PARENTHESIS);
108102

109-
// Check if we need to skip separtor WS between two arrays
103+
// Check if we need to skip separator WS between two arrays
110104
let isSubArray = node.length > 1 && Array.isArray(node[0]);
111105

112106
for (let child of node) {
@@ -190,7 +184,7 @@ module.exports = (response, isLogging) => {
190184
if (isLogging && node.value.length > 20) {
191185
resp.push(Buffer.from('"(* ' + node.value.length + 'B string *)"'));
192186
} else {
193-
// JSON.stringify conveniently adds enclosing quotes and escapes any "\ occurences
187+
// JSON.stringify conveniently adds enclosing quotes and escapes any "\ occurrences
194188
resp.push(Buffer.from(JSON.stringify((node.value || '').toString('binary')), 'binary'));
195189
}
196190
break;

imap-core/lib/handler/imap-compiler.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ const imapFormalSyntax = require('./imap-formal-syntax');
77
/**
88
* Compiles an input object into
99
*/
10-
module.exports = function(response, asArray, isLogging) {
10+
module.exports = function (response, asArray, isLogging) {
1111
let respParts = [];
1212
let resp = (response.tag || '') + (response.command ? ' ' + response.command : '');
1313
let val;
1414
let lastType;
15-
let walk = function(node, options) {
15+
let walk = function (node, options) {
1616
options = options || {};
1717

1818
if (lastType === 'LITERAL' || (!['(', '<', '['].includes(resp.substr(-1)) && resp.length)) {
@@ -32,7 +32,7 @@ module.exports = function(response, asArray, isLogging) {
3232
lastType = 'LIST';
3333
resp += '(';
3434

35-
// check if we need to skip separtor WS between two arrays
35+
// check if we need to skip separator WS between two arrays
3636
let subArray = node.length > 1 && Array.isArray(node[0]);
3737

3838
node.forEach(child => {

imap-core/lib/imap-connection.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class IMAPConnection extends EventEmitter {
249249
return this.close();
250250
}
251251
if (this.compression) {
252-
// make sure we transmit the message immediatelly
252+
// make sure we transmit the message immediately
253253
this._deflate.flush();
254254
}
255255
this.logger.debug(
@@ -627,7 +627,7 @@ class IMAPConnection extends EventEmitter {
627627
// append received notifications to the list
628628
conn.selected.notifications = conn.selected.notifications.concat(updates);
629629
if (conn.idling) {
630-
// when idling emit notifications immediatelly
630+
// when idling emit notifications immediately
631631
conn.emitNotifications();
632632
}
633633
});

imap-core/lib/search.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const queryHandlers = {
1111
return callback(null, true);
1212
},
1313

14-
// matches if the message object includes (exists:true) or does not include (exists:false) specifiec flag
14+
// matches if the message object includes (exists:true) or does not include (exists:false) specific flag
1515
flag(message, query, callback) {
1616
let pos = [].concat(message.flags || []).indexOf(query.value);
1717
return callback(null, query.exists ? pos >= 0 : pos < 0);
@@ -290,7 +290,7 @@ function matchSearchTerm(message, query, callback) {
290290
}
291291

292292
/**
293-
* Traverses query tree and checks if all query terms match or not. Stops on first false match occurence
293+
* Traverses query tree and checks if all query terms match or not. Stops on first false match occurrence
294294
*
295295
* @param {Object} message Stored message object
296296
* @param {Object} query Query term object

0 commit comments

Comments
 (0)