iobroker.fakeroku 0.2.0 → 0.2.2
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.
- package/.github/workflows/test-and-release.yml +115 -0
- package/.mocharc.json +5 -0
- package/.releaseconfig.json +3 -0
- package/LICENSE +20 -20
- package/README.md +70 -57
- package/admin/index.html +142 -143
- package/io-package.json +73 -53
- package/main.js +376 -376
- package/package.json +62 -55
- package/.npmignore +0 -10
- package/iobroker-data/iobroker.json +0 -66
- package/lib/utils.js +0 -46
package/package.json
CHANGED
|
@@ -1,55 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "iobroker.fakeroku",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "ioBroker fakeroku Adapter",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Pmant",
|
|
7
|
-
"email": "patrickmo@gmx.de"
|
|
8
|
-
},
|
|
9
|
-
"contributors": [
|
|
10
|
-
{
|
|
11
|
-
"name": "Pmant",
|
|
12
|
-
"email": "patrickmo@gmx.de"
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"homepage": "https://github.com/
|
|
16
|
-
"licenses": [
|
|
17
|
-
{
|
|
18
|
-
"type": "MIT",
|
|
19
|
-
"url": "https://github.com/
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"grunt
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
},
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
}
|
|
55
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "iobroker.fakeroku",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "ioBroker fakeroku Adapter",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Pmant",
|
|
7
|
+
"email": "patrickmo@gmx.de"
|
|
8
|
+
},
|
|
9
|
+
"contributors": [
|
|
10
|
+
{
|
|
11
|
+
"name": "Pmant",
|
|
12
|
+
"email": "patrickmo@gmx.de"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/iobroker-community-adapters/ioBroker.fakeroku",
|
|
16
|
+
"licenses": [
|
|
17
|
+
{
|
|
18
|
+
"type": "MIT",
|
|
19
|
+
"url": "https://github.com/iobroker-community-adapters/blob/master/LICENSE"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"keywords": [
|
|
24
|
+
"ioBroker",
|
|
25
|
+
"fakeroku",
|
|
26
|
+
"Smart Home",
|
|
27
|
+
"home automation"
|
|
28
|
+
],
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/iobroker-community-adapters/ioBroker.fakeroku"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"http-headers": "^3.0.1",
|
|
35
|
+
"@iobroker/adapter-core": "^1.0.3"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@alcalzone/release-script": "^3.6.0",
|
|
39
|
+
"@alcalzone/release-script-plugin-iobroker": "^3.6.0",
|
|
40
|
+
"grunt": "^1.0.1",
|
|
41
|
+
"grunt-replace": "^1.0.1",
|
|
42
|
+
"grunt-contrib-jshint": "^1.1.0",
|
|
43
|
+
"grunt-jscs": "^3.0.1",
|
|
44
|
+
"grunt-http": "^2.2.0",
|
|
45
|
+
"mocha": "^4.1.0",
|
|
46
|
+
"chai": "^4.1.2"
|
|
47
|
+
},
|
|
48
|
+
"main": "main.js",
|
|
49
|
+
"scripts": {
|
|
50
|
+
"release": "release-script",
|
|
51
|
+
"test": "mocha --exit",
|
|
52
|
+
"test:package": "mocha ./test/testPackageFiles.js",
|
|
53
|
+
"test:integration": "mocha ./test/testAdapter.js"
|
|
54
|
+
},
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/iobroker-community-adapters/ioBroker.fakeroku/issues"
|
|
57
|
+
},
|
|
58
|
+
"readmeFilename": "README.md",
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=4.0.0"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/.npmignore
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"system": {
|
|
3
|
-
"memoryLimitMB": 0,
|
|
4
|
-
"hostname": ""
|
|
5
|
-
},
|
|
6
|
-
"network": {
|
|
7
|
-
"IPv4": true,
|
|
8
|
-
"IPv6": true,
|
|
9
|
-
"bindAddress": null,
|
|
10
|
-
"useSystemNpm": true
|
|
11
|
-
},
|
|
12
|
-
"objects": {
|
|
13
|
-
"type": "file",
|
|
14
|
-
"typeComment": "Possible values: 'file' - [port 9001], redis - [port 6379], couch - [port 5984].",
|
|
15
|
-
"host": "127.0.0.1",
|
|
16
|
-
"port": 9001,
|
|
17
|
-
"user": "",
|
|
18
|
-
"pass": "",
|
|
19
|
-
"noFileCache": false,
|
|
20
|
-
"connectTimeout": 2000
|
|
21
|
-
},
|
|
22
|
-
"states": {
|
|
23
|
-
"type": "file",
|
|
24
|
-
"typeComment": "Possible values: 'file' - [port 9000], 'redis' - [port 6379].",
|
|
25
|
-
"host": "127.0.0.1",
|
|
26
|
-
"port": 9000,
|
|
27
|
-
"maxQueue": 1000,
|
|
28
|
-
"options": {
|
|
29
|
-
"auth_pass": null,
|
|
30
|
-
"retry_max_delay": 15000
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"log": {
|
|
34
|
-
"level": "info",
|
|
35
|
-
"maxDays": 7,
|
|
36
|
-
"noStdout": true,
|
|
37
|
-
"transport": {
|
|
38
|
-
"file1": {
|
|
39
|
-
"type": "file",
|
|
40
|
-
"enabled": true,
|
|
41
|
-
"filename": "log/iobroker",
|
|
42
|
-
"fileext": ".log",
|
|
43
|
-
"maxsize": null,
|
|
44
|
-
"maxFiles": null
|
|
45
|
-
},
|
|
46
|
-
"syslog1": {
|
|
47
|
-
"type": "syslog",
|
|
48
|
-
"enabled": false,
|
|
49
|
-
"host": "localhost",
|
|
50
|
-
"host_comment": "The host running syslogd, defaults to localhost.",
|
|
51
|
-
"port_comment": "The port on the host that syslog is running on, defaults to syslogd's default port(514/UDP).",
|
|
52
|
-
"protocol": "udp4",
|
|
53
|
-
"protocol_comment": "The network protocol to log over (e.g. tcp4, udp4, unix, unix-connect, etc).",
|
|
54
|
-
"path_comment": "The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).",
|
|
55
|
-
"facility_comment": "Syslog facility to use (Default: local0).",
|
|
56
|
-
"localhost": "iobroker",
|
|
57
|
-
"localhost_comment": "Host to indicate that log messages are coming from (Default: localhost).",
|
|
58
|
-
"sysLogType_comment": "The type of the syslog protocol to use (Default: BSD).",
|
|
59
|
-
"app_name_comment": "The name of the application (Default: process.title).",
|
|
60
|
-
"eol_comment": "The end of line character to be added to the end of the message (Default: Message without modifications)."
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"dataDirComment": "Always relative to iobroker.js-controller/",
|
|
65
|
-
"dataDir": "../../iobroker-data/"
|
|
66
|
-
}
|
package/lib/utils.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
var controllerDir;
|
|
2
|
-
|
|
3
|
-
// Get js-controller directory to load libs
|
|
4
|
-
function getControllerDir(isInstall) {
|
|
5
|
-
var fs = require('fs');
|
|
6
|
-
// Find the js-controller location
|
|
7
|
-
var controllerDir = __dirname.replace(/\\/g, '/');
|
|
8
|
-
controllerDir = controllerDir.split('/');
|
|
9
|
-
if (controllerDir[controllerDir.length - 3] == 'adapter') {
|
|
10
|
-
controllerDir.splice(controllerDir.length - 3, 3);
|
|
11
|
-
controllerDir = controllerDir.join('/');
|
|
12
|
-
} else if (controllerDir[controllerDir.length - 3] == 'node_modules') {
|
|
13
|
-
controllerDir.splice(controllerDir.length - 3, 3);
|
|
14
|
-
controllerDir = controllerDir.join('/');
|
|
15
|
-
if (fs.existsSync(controllerDir + '/node_modules/iobroker.js-controller')) {
|
|
16
|
-
controllerDir += '/node_modules/iobroker.js-controller';
|
|
17
|
-
} else if (fs.existsSync(controllerDir + '/node_modules/ioBroker.js-controller')) {
|
|
18
|
-
controllerDir += '/node_modules/ioBroker.js-controller';
|
|
19
|
-
} else if (!fs.existsSync(controllerDir + '/controller.js')) {
|
|
20
|
-
if (!isInstall) {
|
|
21
|
-
console.log('Cannot find js-controller');
|
|
22
|
-
process.exit(10);
|
|
23
|
-
} else {
|
|
24
|
-
process.exit();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
} else {
|
|
28
|
-
if (!isInstall) {
|
|
29
|
-
console.log('Cannot find js-controller');
|
|
30
|
-
process.exit(10);
|
|
31
|
-
} else {
|
|
32
|
-
process.exit();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return controllerDir;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Read controller configuration file
|
|
39
|
-
function getConfig() {
|
|
40
|
-
return JSON.parse(fs.readFileSync(controllerDir + '/conf/iobroker.json'));
|
|
41
|
-
}
|
|
42
|
-
controllerDir = getControllerDir(typeof process != 'undefined' && process.argv && process.argv.indexOf('--install') != -1);
|
|
43
|
-
|
|
44
|
-
exports.controllerDir = controllerDir;
|
|
45
|
-
exports.getConfig = getConfig;
|
|
46
|
-
exports.adapter = require(controllerDir + '/lib/adapter.js');
|