Skip to content

Commit f63f2f7

Browse files
committed
refactor: completely remove references to wot-servient and rename it to node-wot
1 parent eb18a6a commit f63f2f7

14 files changed

Lines changed: 26 additions & 95 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ You can alternatively use node-wot via its command line interface (CLI). Please
118118

119119
#### As global tool
120120

121-
To make the `wot-servient` command available on your machine, install the CLI tool in the global scope:
121+
To make the `node-wot` command available on your machine, install the CLI tool in the global scope:
122122

123123
```
124124
npm i @node-wot/cli -g

packages/binding-mqtt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ Please setup node-wot as described at the [node-wot main page](https://github.co
300300
- example-mqtt-publish.js: Shows when node-wot acts as a MQTT Client that publishes data (latest counter value) to a broker.
301301
At the same time, another client can invoke an action, such as `resetCounter`, by sending a publication message to the topic of this action.
302302
This other client does not have to be node-wot, any MQTT client can interact with this Thing.
303-
For node-wot clients, make sure to provide MQTT broker details (`host`, `port`, `username`, `password`, `clientId`) in the wot-servient.conf.json:
303+
For node-wot clients, make sure to provide MQTT broker details (`host`, `port`, `username`, `password`, `clientId`) in the `node-wot.conf.json`:
304304

305305
```js
306306
{

packages/binding-netconf/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The Binding example in the `./examples` directory provides a TD (`netconf-thing.
4444
Depending on which NETCONF server is used, the following might have to be changed:
4545

4646
- IP address and port in `examples/netconf-thing.jsonld`
47-
- credentials for the NETCONF Thing (id `urn:dev:wot:org:eclipse:netconf-example`) have to be changed in `wot-servient.conf.json`.
47+
- credentials for the NETCONF Thing (id `urn:dev:wot:org:eclipse:netconf-example`) have to be changed in `node-wot.conf.json`.
4848

4949
## New Form Fields for the NETCONF Binding
5050

@@ -53,7 +53,7 @@ Depending on which NETCONF server is used, the following might have to be change
5353
The href contains: URI schema + IP address + port + XPath
5454

5555
- URI schema: the schema for NETCONF is not registered with IANA; the Binding is using `netconf`.
56-
- IP address and port: IP address and port of the NETCONF server. The credentials for the SSH connection to the server can be added into the `wot-servient.configuration.json`.
56+
- IP address and port: IP address and port of the NETCONF server. The credentials for the SSH connection to the server can be added into the `node-wot.configuration.json`.
5757
- XPath: the XPath of the YANG model node addressed by the given InteractionAffordance. The XPath is automatically converted into the corresponding XML needed by the RPC. If an attribute refers to a particular namespace, an alias can be used. The complete URN for the alias should be added to the **nc:NSs** field.
5858

5959
### nc:target

packages/browser-bundle/web-test-runner.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ async function cleanup() {
169169

170170
function controlTestServient() {
171171
return {
172-
name: "wot-servient",
172+
name: "node-wot",
173173

174174
async executeCommand({ command }) {
175175
switch (command) {

packages/cli/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ node-wot script1.js ./src/script2.js
4848

4949
### Configuration
5050

51-
The `-h` option explains the functionality and also how node-wot can be configured based on `wot-servient.conf.json`.
51+
The `-h` option explains the functionality and also how node-wot can be configured based on `node-wot.conf.json`.
5252

5353
- `node-wot -h` _or_
5454
- `node packages\cli\dist\cli.js -h`
@@ -69,7 +69,7 @@ Options:
6969
-v, --version display node-wot version
7070
-c, --client-only do not start any servers (enables multiple instances without port conflicts)
7171
-ll, --logLevel <string> choose the desired log level. WARNING: if DEBUG env variable is specified this option gets overridden. (choices: "debug", "info", "warn", "error")
72-
-f, --config-file <file> load configuration from specified file (default: $(pwd)/wot-servient.conf.json)
72+
-f, --config-file <file> load configuration from specified file (default: $(pwd)/node-wot.conf.json)
7373
-p, --config-params <param...> override configuration parameters [key1:=value1 key2:=value2 ...] (e.g. http.port:=8080)
7474
-h, --help show this help
7575
@@ -91,12 +91,12 @@ node-wot schema
9191
In your configuration files you can the following to enable IDE config validation:
9292
9393
{
94-
"$schema": "./node_modules/@node-wot/cli/dist/wot-servient-schema.conf.json"
94+
"$schema": "./node_modules/@node-wot/cli/dist/node-wot-schema.conf.json"
9595
...
9696
}
9797
```
9898

99-
Additionally, you can look at [the JSON Schema](https://github.com/eclipse-thingweb/node-wot/blob/master/packages/cli/src/wot-servient-schema.conf.json) to understand possible values for each field.
99+
Additionally, you can look at [the JSON Schema](https://github.com/eclipse-thingweb/node-wot/blob/master/packages/cli/src/node-wot-schema.conf.json) to understand possible values for each field.
100100

101101
> In the current implementation, the **middleware** option (that you can use to handle raw HTTP requests _before_ they hit the Servient) is only available when using the `@node-wot/binding-http` package as a library. See [Adding a middleware](../binding-http/README.md#adding-a-middleware) for more information.
102102

packages/cli/import-json-to-ts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { readFileSync, writeFileSync } = require("fs");
22
const { existsSync, mkdirSync } = require("fs");
33

4-
const schema = readFileSync("./src/wot-servient-schema.conf.json", "utf8");
4+
const schema = readFileSync("./src/node-wot-schema.conf.json", "utf8");
55
const package = readFileSync("./package.json", "utf8");
66
const { version } = JSON.parse(package);
77

@@ -11,7 +11,7 @@ if (!existsSync(generatedDir)) {
1111
}
1212

1313
writeFileSync(
14-
"./src/generated/wot-servient-schema.conf.ts",
14+
"./src/generated/node-wot-schema.conf.ts",
1515
`const schema = ${schema.trimEnd()} as const \nexport default schema;`
1616
);
1717
writeFileSync("./src/generated/version.ts", `const version = "${version}" as const \nexport default version;`);

packages/cli/src/cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import DefaultServient from "./cli-default-servient";
2020
import * as path from "path";
2121
import { Command, Argument, Option } from "commander";
2222
import Ajv, { ValidateFunction } from "ajv";
23-
import ConfigSchema from "./generated/wot-servient-schema.conf";
23+
import ConfigSchema from "./generated/node-wot-schema.conf";
2424
import version from "./generated/version";
2525
import { createLoggers, Helpers } from "@node-wot/core";
2626
import { loadEnvVariables } from "./utils";
@@ -36,7 +36,7 @@ const { error, info, warn, debug } = createLoggers("cli", "cli");
3636
const program = new Command();
3737
const ajv = new Ajv({ strict: true, allErrors: true });
3838
const schemaValidator = ajv.compile(ConfigSchema) as ValidateFunction<Configuration>;
39-
const defaultFile = "wot-servient.conf.json";
39+
const defaultFile = "node-wot.conf.json";
4040
const baseDir = ".";
4141

4242
// General commands
@@ -69,7 +69,7 @@ node-wot schema
6969
In your configuration files you can the following to enable IDE config validation:
7070
7171
{
72-
"$schema": "./node_modules/@node-wot/cli/dist/wot-servient-schema.conf.json"
72+
"$schema": "./node_modules/@node-wot/cli/dist/node-wot-schema.conf.json"
7373
...
7474
}
7575
`
@@ -86,7 +86,7 @@ program
8686
)
8787
.option(
8888
"-f, --config-file <file>",
89-
"load configuration from specified file (default: $(pwd)/wot-servient.conf.json)",
89+
"load configuration from specified file (default: $(pwd)/node-wot.conf.json)",
9090
(value, previous) => parseConfigFile(value, previous)
9191
)
9292
.option(

packages/cli/src/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
********************************************************************************/
1515

1616
import { FromSchema } from "json-schema-to-ts";
17-
import schema from "./generated/wot-servient-schema.conf";
17+
import schema from "./generated/node-wot-schema.conf";
1818
import { DotenvParseOutput } from "dotenv";
1919
import _ from "lodash";
2020
import { readFile } from "fs/promises";
File renamed without changes.

packages/cli/src/utils/load-env-variables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import * as dotenv from "dotenv";
1616
import ErrnoException = NodeJS.ErrnoException;
1717

18-
export function loadEnvVariables(prefix: string = "WOT_SERVIENT_"): { [key: string]: string } {
18+
export function loadEnvVariables(prefix: string = "NODE_WOT_"): { [key: string]: string } {
1919
const env: dotenv.DotenvConfigOutput = dotenv.config();
2020
const errornoException: ErrnoException | undefined = env.error;
2121
// ignore file not found but throw otherwise

0 commit comments

Comments
 (0)