Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
Signed-off-by: Hasan Eroglu <[email protected]>
  • Loading branch information
hasanheroglu committed Sep 27, 2024
1 parent 52e7921 commit 3468cbf
Show file tree
Hide file tree
Showing 18 changed files with 43 additions and 40 deletions.
3 changes: 2 additions & 1 deletion mashups/smart-home/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"start:smart-clock": "node ./dist/things/smart-clock.js",
"start:all": "./runMashupThings.sh",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"format": "prettier --write \"**/*.ts\" \"**/*.json\""
},
"author": "Eclipse Thingweb <[email protected]> (https://thingweb.io/)",
"license": "EPL-2.0 OR W3C-20150513",
Expand Down
3 changes: 2 additions & 1 deletion things/advanced-coffee-machine/http/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "tsc -b",
"test": "mocha",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"**/*.json\""
},
"keywords": [
"wot",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
/********************************************************************************
* Copyright (c) 2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the W3C Software Notice and
* Document License (2015-05-13) which is available at
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document.
*
* SPDX-License-Identifier: EPL-2.0 OR W3C-20150513
********************************************************************************/

const coap = require("coap");
const hostname = "localhost";
const portNumber = 5683;
const thingName = "coap-calculator-simple";

const fullTDEndpoint = `/${thingName}`,
resultEndPoint = `/${thingName}/properties/result`,
lastChangeEndPoint = `/${thingName}/properties/lastChange`,
additionEndPoint = `/${thingName}/actions/add`,
subtractionEndPoint = `/${thingName}/actions/subtract`,
updateEndPoint = `/${thingName}/events/update`;
const fullTDEndpoint = `/${thingName}`;
const resultEndPoint = `/${thingName}/properties/result`;
const lastChangeEndPoint = `/${thingName}/properties/lastChange`;
const additionEndPoint = `/${thingName}/actions/add`;
const subtractionEndPoint = `/${thingName}/actions/subtract`;
const updateEndPoint = `/${thingName}/events/update`;

/****************************************/
/****** Thing Description Endpoint ******/
Expand Down
3 changes: 2 additions & 1 deletion things/calculator/coap/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
],
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"format": "prettier --write \"**/*.js\" \"test/**/*.js\" \"client-tests/**/*.js\" \"**/*.json\""
},
"author": "Eclipse Thingweb <[email protected]> (https://thingweb.io/)",
"license": "EPL-2.0 OR W3C-20150513",
Expand Down
3 changes: 2 additions & 1 deletion things/calculator/http/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"scripts": {
"test": "node simple-calculator.js ; pid = $! ; result=$(mocha --exit *.test.js)) & kill $pid",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"format": "prettier --write \"**/*.js\" \"test/**/*.js\" \"client-tests/**/*.js\" \"**/*.json\""
},
"author": "Eclipse Thingweb <[email protected]> (https://thingweb.io/)",
"license": "EPL-2.0 OR W3C-20150513",
Expand Down
27 changes: 7 additions & 20 deletions things/calculator/mqtt/js/mqtt-calculator.td.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"scheme": "nosec"
}
},
"security": [
"nosec_sc"
],
"security": ["nosec_sc"],
"base": "mqtt://test.mosquitto.org:1883/mqtt-calculator/",
"properties": {
"result": {
Expand All @@ -28,9 +26,7 @@
{
"href": "properties/result",
"contentType": "application/json",
"op": [
"readproperty"
]
"op": ["readproperty"]
}
]
},
Expand All @@ -44,9 +40,7 @@
{
"href": "properties/lastChange",
"contentType": "application/json",
"op": [
"readproperty"
]
"op": ["readproperty"]
}
]
}
Expand All @@ -65,9 +59,7 @@
{
"href": "actions/add",
"contentType": "application/json",
"op": [
"invokeaction"
]
"op": ["invokeaction"]
}
]
},
Expand All @@ -84,9 +76,7 @@
{
"href": "actions/subtract",
"contentType": "application/json",
"op": [
"invokeaction"
]
"op": ["invokeaction"]
}
]
}
Expand All @@ -100,12 +90,9 @@
{
"href": "events/update",
"contentType": "application/json",
"op": [
"subscribeevent",
"unsubscribeevent"
]
"op": ["subscribeevent", "unsubscribeevent"]
}
]
}
}
}
}
3 changes: 2 additions & 1 deletion things/calculator/mqtt/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
],
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"format": "prettier --write \"**/*.js\" \"test/**/*.js\" \"**/*.json\""
},
"author": "Eclipse Thingweb <[email protected]> (https://thingweb.io/)",
"license": "EPL-2.0 OR W3C-20150513",
Expand Down
11 changes: 3 additions & 8 deletions things/elevator/modbus/js/modbus-elevator.td.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"scheme": "nosec"
}
},
"security": [
"nosec_sc"
],
"security": ["nosec_sc"],
"base": "modbus+tcp://0.0.0.0:8502/1",
"properties": {
"lightSwitch": {
Expand Down Expand Up @@ -49,10 +47,7 @@
"forms": [
{
"href": "modbus+tcp://0.0.0.0:8502/1/10001?quantity=1",
"op": [
"readproperty",
"observeproperty"
],
"op": ["readproperty", "observeproperty"],
"modv:entity": "DiscreteInput",
"modv:function": "readDiscreteInput",
"modv:pollingTime": 1000,
Expand Down Expand Up @@ -85,4 +80,4 @@
]
}
}
}
}
3 changes: 2 additions & 1 deletion things/elevator/modbus/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "main.js",
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"format": "prettier --write \"**/*.js\" \"test/**/*.js\" \"**/*.json\""
},
"keywords": [
"wot",
Expand Down

0 comments on commit 3468cbf

Please sign in to comment.