iobroker.fakeroku 0.2.1 → 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 -61
- package/admin/index.html +142 -142
- package/io-package.json +73 -58
- package/main.js +376 -376
- package/package.json +62 -56
- package/.npmignore +0 -10
- package/lib/utils.js +0 -46
package/package.json
CHANGED
|
@@ -1,56 +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
|
-
"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/
|
|
32
|
-
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"http-headers": "^3.0.1"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"grunt
|
|
41
|
-
"grunt-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
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');
|