Skip to content

Commit 944d3ac

Browse files
authored
Merge pull request #1286 from danielpeintner/fix-comments-text-2024-05-22
docs: fix typos in comments/text/descriptions/variable-names
2 parents 0e9ef6f + 1044ec0 commit 944d3ac

16 files changed

Lines changed: 48 additions & 48 deletions

File tree

packages/binding-coap/src/coap-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export default class CoapServer implements ProtocolServer {
367367
this.coreResources.delete(name);
368368
this.mdnsIntroducer?.delete(name);
369369

370-
info(`CoapServer succesfully destroyed '${exposedThing.title}'`);
370+
info(`CoapServer successfully destroyed '${exposedThing.title}'`);
371371
return true;
372372
}
373373
}

packages/binding-coap/test/coap-client-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const port2 = 31834;
3131
/**
3232
* Helper function for waiting during tests.
3333
*
34-
* @param ms The time to wait in miliseconds.
34+
* @param ms The time to wait in milliseconds.
3535
* @returns A Promise that is resolved after the given time period.
3636
*/
3737
function sleep(ms: number) {

packages/binding-coap/test/coap-server-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ class CoapServerTest {
636636
await coapServer.stop();
637637
}
638638

639-
@test async "should add the cov:observe subprotocol value to obervable properties and events "() {
639+
@test async "should add the cov:observe subprotocol value to observable properties and events "() {
640640
const coapServer = new CoapServer({ port: 5683 });
641641
const servient = new Servient();
642642
servient.addServer(coapServer);

packages/binding-mbus/src/mbus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class MBusForm extends Form {
3030
*/
3131
public "mbus:offset"?: number;
3232
/**
33-
* Timeout in milliseconds of the modbus request. Default to 1000 milliseconds
33+
* Timeout in milliseconds of the mbus request. Default to 1000 milliseconds
3434
*/
3535
public "mbus:timeout"?: number;
3636
}

packages/binding-modbus/test/modbus-client-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ describe("Modbus client test", () => {
343343
it("should write a resource with big endian ordering", async () => {
344344
const form: ModbusForm = {
345345
href: "modbus+tcp://127.0.0.1:8502/1/0",
346-
contentType: "application/octet-stream;length=2;byteSeq=BIG_ENDIAN", // FIXME: Use mostsignficant etc.
346+
contentType: "application/octet-stream;length=2;byteSeq=BIG_ENDIAN", // FIXME: Use most significant etc.
347347
"modv:function": 16,
348348
};
349349

packages/binding-mqtt/src/mqtt-broker-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export default class MqttBrokerServer implements ProtocolServer {
351351
}
352352

353353
if (removedThing != null) {
354-
info(`MqttBrokerServer succesfully destroyed '${removedThing.title}'`);
354+
info(`MqttBrokerServer successfully destroyed '${removedThing.title}'`);
355355
} else {
356356
info(`MqttBrokerServer failed to destroy thing with thingId '${thingId}'`);
357357
}

packages/binding-opcua/test/full-opcua-thing-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const thingDescription: WoT.ThingDescription = {
5151
unit: "°C",
5252
type: "number",
5353
"opcua:nodeId": { root: "i=84", path: "/Objects/1:MySensor/2:ParameterSet/1:Temperature" },
54-
// Don't specifu type here as it could be multi form: type: [ "object", "number" ],
54+
// Don't specify type here as it could be multi form: type: [ "object", "number" ],
5555
forms: [
5656
// 0 -> standard Node WoT form => Raw value
5757
{
@@ -113,7 +113,7 @@ const thingDescription: WoT.ThingDescription = {
113113
observable: true,
114114
unit: "°C",
115115
type: "number",
116-
// dont't
116+
// don't
117117
forms: [
118118
{
119119
href: "/",
@@ -209,7 +209,7 @@ const thingDescription: WoT.ThingDescription = {
209209
type: "object",
210210
properties: {
211211
PreviousSetPoint: {
212-
type: "object", // << Note here this is an object reprensenting a JSON OPCUA Variant
212+
type: "object", // << Note here this is an object representing a JSON OPCUA Variant
213213
title: "the previous temperature set point",
214214
// minimum: 0,
215215
// maximum: 100,

packages/binding-websockets/src/ws-server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default class WebSocketServer implements ProtocolServer {
8484
public start(servient: Servient): Promise<void> {
8585
debug(`WebSocketServer starting on ${this.address !== undefined ? this.address + " " : ""}port ${this.port}`);
8686
return new Promise<void>((resolve, reject) => {
87-
// handle incoming WebScoket connections
87+
// handle incoming WebSocket connections
8888
this.httpServer.on("upgrade", (request, socket, head) => {
8989
const pathname = new url.URL(request.url ?? "", `${this.scheme}://${request.headers.host}`).pathname;
9090

@@ -309,7 +309,7 @@ export default class WebSocketServer implements ProtocolServer {
309309
removedThing = this.thingNames.delete(thingPath);
310310
}
311311
if (removedThing) {
312-
info(`WebSocketServer succesfully destroyed '${thingId}'`);
312+
info(`WebSocketServer successfully destroyed '${thingId}'`);
313313
} else {
314314
info(`WebSocketServer failed to destroy thing with thingId '${thingId}'`);
315315
}

packages/cli/src/cli-default-servient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export default class DefaultServient extends Servient {
328328
return undefined;
329329
});
330330
thing.setPropertyReadHandler("things", async () => {
331-
debug("returnings things");
331+
debug("returning things");
332332
return this.getThings();
333333
});
334334
thing

packages/cli/src/cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const schemaValidator = ajv.compile(ConfigSchema) as ValidateFunction;
3838
const defaultFile = "wot-servient.conf.json";
3939
const baseDir = ".";
4040

41-
const dotEnvConfigParamters: DotEnvConfigParameter = {};
41+
const dotEnvConfigParameters: DotEnvConfigParameter = {};
4242

4343
// General commands
4444
program
@@ -175,7 +175,7 @@ function parseConfigParams(param: string, previous: unknown) {
175175
.join("\n")}`
176176
);
177177
}
178-
// Concatenate validated paramters
178+
// Concatenate validated parameters
179179
let result = previous ?? {};
180180
result = _.merge(result, obj);
181181
return result;
@@ -220,7 +220,7 @@ if (errorNoException?.code !== "ENOENT") {
220220
for (const [key, value] of Object.entries(env.parsed)) {
221221
// Parse and validate on configfile-related entries
222222
if (key.startsWith("config.")) {
223-
dotEnvConfigParamters[key.replace("config.", "")] = value;
223+
dotEnvConfigParameters[key.replace("config.", "")] = value;
224224
}
225225
}
226226
}
@@ -238,7 +238,7 @@ async function buildConfig(): Promise<unknown> {
238238
}
239239

240240
// .env file
241-
for (const [key, value] of Object.entries(dotEnvConfigParamters)) {
241+
for (const [key, value] of Object.entries(dotEnvConfigParameters)) {
242242
const obj = _.set({}, key, value);
243243
configFileData = _.merge(configFileData, obj);
244244
}

0 commit comments

Comments
 (0)