iobroker.fakeroku 0.2.2 → 0.2.3

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/.eslintignore ADDED
@@ -0,0 +1,2 @@
1
+ **/.eslintrc.js
2
+ admin/words.js
package/.eslintrc.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "root": true,
3
+ "env": {
4
+ "es6": true,
5
+ "node": true,
6
+ "mocha": true
7
+ },
8
+ "extends": ["eslint:recommended"],
9
+ "plugins": [],
10
+ "rules": {
11
+ "indent": [
12
+ "error",
13
+ 4,
14
+ {
15
+ "SwitchCase": 1
16
+ }
17
+ ],
18
+ "no-console": "off",
19
+ "no-unused-vars": [
20
+ "error",
21
+ {
22
+ "ignoreRestSiblings": true,
23
+ "argsIgnorePattern": "^_"
24
+ }
25
+ ],
26
+ "no-var": "error",
27
+ "no-trailing-spaces": "error",
28
+ "prefer-const": "error",
29
+ "quotes": [
30
+ "error",
31
+ "single",
32
+ {
33
+ "avoidEscape": true,
34
+ "allowTemplateLiterals": true
35
+ }
36
+ ],
37
+ "semi": ["error", "always"]
38
+ },
39
+ "parserOptions": {
40
+ "ecmaVersion": 2020
41
+ }
42
+ }
@@ -0,0 +1,17 @@
1
+ # Configure here which dependency updates should be merged automatically.
2
+ # The recommended configuration is the following:
3
+ - match:
4
+ # Only merge patches for production dependencies
5
+ dependency_type: production
6
+ update_type: "semver:patch"
7
+ - match:
8
+ # Except for security fixes, here we allow minor patches
9
+ dependency_type: production
10
+ update_type: "security:minor"
11
+ - match:
12
+ # and development dependencies can have a minor update, too
13
+ dependency_type: development
14
+ update_type: "semver:minor"
15
+
16
+ # The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
17
+ # https://dependabot.com/docs/config-file/#automerged_updates
@@ -0,0 +1,18 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: npm
4
+ directory: "/"
5
+ schedule:
6
+ interval: monthly
7
+ time: "04:00"
8
+ timezone: Europe/Berlin
9
+ open-pull-requests-limit: 15
10
+ versioning-strategy: increase
11
+
12
+ - package-ecosystem: github-actions
13
+ directory: "/"
14
+ schedule:
15
+ interval: monthly
16
+ time: "04:00"
17
+ timezone: Europe/Berlin
18
+ open-pull-requests-limit: 15
@@ -0,0 +1,27 @@
1
+ # Automatically merge Dependabot PRs when version comparison is within the range
2
+ # that is configured in .github/auto-merge.yml
3
+
4
+ name: Auto-Merge Dependabot PRs
5
+
6
+ on:
7
+ # WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
8
+ # details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
9
+ pull_request_target:
10
+
11
+ jobs:
12
+ auto-merge:
13
+ if: github.actor == 'dependabot[bot]'
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v3
18
+
19
+ - name: Check if PR should be auto-merged
20
+ uses: ahmadnassri/action-dependabot-auto-merge@v2
21
+ with:
22
+ # In order to use this, you need to go to https://github.com/settings/tokens and
23
+ # create a Personal Access Token with the permission "public_repo".
24
+ # Enter this token in your repository settings under "Secrets" and name it AUTO_MERGE_TOKEN
25
+ github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
26
+ # By default, squash and merge, so Github chooses nice commit messages
27
+ command: squash and merge
@@ -1,115 +1,95 @@
1
- # This is a composition of lint and test scripts
2
- # Make sure to update this file along with the others
3
-
4
1
  name: Test and Release
5
2
 
6
3
  # Run this job on all pushes and pull requests
7
4
  # as well as tags with a semantic version
8
5
  on:
9
- push:
10
- branches:
11
- - '*'
12
- tags:
13
- # normal versions
14
- - "v?[0-9]+.[0-9]+.[0-9]+"
15
- # pre-releases
16
- - "v?[0-9]+.[0-9]+.[0-9]+-**"
17
- pull_request: {}
6
+ push:
7
+ branches:
8
+ - 'master'
9
+ tags:
10
+ # normal versions
11
+ - 'v[0-9]+.[0-9]+.[0-9]+'
12
+ # pre-releases
13
+ - 'v[0-9]+.[0-9]+.[0-9]+-**'
14
+ pull_request: {}
15
+
16
+ # Cancel previous PR/branch runs when a new commit is pushed
17
+ concurrency:
18
+ group: ${{ github.ref }}
19
+ cancel-in-progress: true
18
20
 
19
21
  jobs:
20
- # Performs quick checks before the expensive test runs
21
- check-and-lint:
22
- if: contains(github.event.head_commit.message, '[skip ci]') == false
23
-
24
- runs-on: ubuntu-latest
25
-
26
- strategy:
27
- matrix:
28
- node-version: [16.x]
29
-
30
- steps:
31
- - uses: actions/checkout@v1
32
- - name: Use Node.js ${{ matrix.node-version }}
33
- uses: actions/setup-node@v1
34
- with:
35
- node-version: ${{ matrix.node-version }}
36
-
37
- - name: Install Dependencies
38
- run: npm ci
39
-
40
- - name: Test package files
41
- run: npm run test:package
42
-
43
- # Runs adapter tests on all supported node versions and OSes
44
- adapter-tests:
45
- if: contains(github.event.head_commit.message, '[skip ci]') == false
46
-
47
- runs-on: ${{ matrix.os }}
48
- strategy:
49
- matrix:
50
- node-version: [16.x, 18.x, 20.x]
51
- os: [ubuntu-latest, windows-latest, macos-latest]
52
-
53
- steps:
54
- - uses: ioBroker/testing-action-adapter@v1
55
- with:
56
- node-version: ${{ matrix.node-version }}
57
- os: ${{ matrix.os }}
58
- # Uncomment the following line if your adapter cannot be installed using 'npm ci'
59
- # install-command: 'npm install'
60
- build: false
61
-
62
- # Deploys the final package to NPM and GitHub Actions
63
- deploy:
64
- # Trigger this step only when a commit on master is tagged with a version number
65
- if: |
66
- contains(github.event.head_commit.message, '[skip ci]') == false &&
67
- github.event_name == 'push' &&
68
- startsWith(github.ref, 'refs/tags/v')
69
- needs: [adapter-tests]
70
-
71
- runs-on: ubuntu-latest
72
- strategy:
73
- matrix:
74
- node-version: [14.x]
75
-
76
- steps:
77
- - name: Checkout code
78
- uses: actions/checkout@v2
79
-
80
- - name: Use Node.js ${{ matrix.node-version }}
81
- uses: actions/setup-node@v1
82
- with:
83
- node-version: ${{ matrix.node-version }}
84
-
85
- - name: Extract the version and commit body from the tag
86
- id: extract_release
87
- # The body may be multiline, therefore we need to escape some characters
88
- run: |
89
- VERSION="${{ github.ref }}"
90
- VERSION=${VERSION##*/v}
91
- echo "::set-output name=VERSION::$VERSION"
92
- BODY=$(git show -s --format=%b)
93
- BODY="${BODY//'%'/'%25'}"
94
- BODY="${BODY//$'\n'/'%0A'}"
95
- BODY="${BODY//$'\r'/'%0D'}"
96
- echo "::set-output name=BODY::$BODY"
97
- - name: Install dependencies
98
- run: npm ci
99
-
100
- - name: Publish package to npm
101
- run: |
102
- npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
103
- npm whoami
104
- npm publish
105
- - name: Create Github Release
106
- uses: actions/create-release@v1
107
- env:
108
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109
- with:
110
- tag_name: ${{ github.ref }}
111
- release_name: Release v${{ steps.extract_release.outputs.VERSION }}
112
- draft: false
113
- # Prerelease versions create pre-releases on Github
114
- prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }}
115
- body: ${{ steps.extract_release.outputs.BODY }}
22
+ # Performs quick checks before the expensive test runs
23
+ check-and-lint:
24
+ if: contains(github.event.head_commit.message, '[skip ci]') == false
25
+
26
+ runs-on: ubuntu-latest
27
+
28
+ steps:
29
+ - uses: ioBroker/testing-action-check@v1
30
+ with:
31
+ node-version: '20.x'
32
+ # Uncomment the following line if your adapter cannot be installed using 'npm ci'
33
+ # install-command: 'npm install'
34
+ lint: false
35
+
36
+
37
+ # Runs adapter tests on all supported node versions and OSes
38
+ adapter-tests:
39
+ if: contains(github.event.head_commit.message, '[skip ci]') == false
40
+
41
+ runs-on: ${{ matrix.os }}
42
+ strategy:
43
+ matrix:
44
+ node-version: [18.x, 20.x]
45
+ os: [ubuntu-latest, windows-latest, macos-latest]
46
+
47
+ steps:
48
+ - uses: ioBroker/testing-action-adapter@v1
49
+ with:
50
+ node-version: ${{ matrix.node-version }}
51
+ os: ${{ matrix.os }}
52
+ # Uncomment the following line if your adapter cannot be installed using 'npm ci'
53
+ # install-command: 'npm install'
54
+
55
+ # TODO: To enable automatic npm releases, create a token on npmjs.org
56
+ # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
57
+ # Then uncomment the following block:
58
+
59
+ # Deploys the final package to NPM
60
+ deploy:
61
+ needs: [check-and-lint, adapter-tests]
62
+
63
+ # Trigger this step only when a commit on any branch is tagged with a version number
64
+ if: |
65
+ contains(github.event.head_commit.message, '[skip ci]') == false &&
66
+ github.event_name == 'push' &&
67
+ startsWith(github.ref, 'refs/tags/v')
68
+
69
+ runs-on: ubuntu-latest
70
+
71
+ # Write permissions are required to create Github releases
72
+ permissions:
73
+ contents: write
74
+
75
+ steps:
76
+ - uses: ioBroker/testing-action-deploy@v1
77
+ with:
78
+ node-version: '20.x'
79
+ # Uncomment the following line if your adapter cannot be installed using 'npm ci'
80
+ # install-command: 'npm install'
81
+ npm-token: ${{ secrets.NPM_TOKEN }}
82
+ github-token: ${{ secrets.GITHUB_TOKEN }}
83
+
84
+ # When using Sentry for error reporting, Sentry can be informed about new releases
85
+ # To enable create a API-Token in Sentry (User settings, API keys)
86
+ # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
87
+ # Then uncomment and customize the following block:
88
+ #sentry: true
89
+ #sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
90
+ #sentry-url: "https://sentry.io"
91
+ #sentry-org: "mcm4iob"
92
+ #sentry-project: "iobroker-pid"
93
+ #sentry-version-prefix: "iobroker.pid"
94
+ ## If your sentry project is linked to a GitHub repository, you can enable the following option
95
+ #sentry-github-integration: true
@@ -0,0 +1,2 @@
1
+ package.json
2
+ package-lock.json
package/.prettierrc.js ADDED
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ semi: true,
3
+ trailingComma: 'all',
4
+ singleQuote: true,
5
+ printWidth: 120,
6
+ useTabs: false,
7
+ tabWidth: 4,
8
+ endOfLine: 'lf',
9
+ };
@@ -1,3 +1,3 @@
1
1
  {
2
- "plugins": ["iobroker"]
3
- }
2
+ "plugins": ["iobroker", "license", "manual-review"]
3
+ }
package/LICENSE CHANGED
@@ -1,5 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
+ Copyright (c) 2024 iobroker-community-adapters <iobroker-community-adapters@gmx.de>
3
4
  Copyright (c) 2017 Pmant
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
package/README.md CHANGED
@@ -30,6 +30,10 @@ States are automatically created when fakeRoku receives a key for the first time
30
30
  Placeholder for the next version (at the beginning of the line):
31
31
  ### __WORK IN PROGRESS__
32
32
  -->
33
+ ### 0.2.3 (2024-06-11)
34
+ * (mcm1957) Adapter requires node.js >= 18 and js-controller >= 5 now
35
+ * (mcm1957) Dependencies have been updated
36
+
33
37
  ### 0.2.2 (2023-07-24)
34
38
  * (Appollon77) fixed issues with controller v5
35
39
 
@@ -49,6 +53,7 @@ States are automatically created when fakeRoku receives a key for the first time
49
53
  ## License
50
54
  The MIT License (MIT)
51
55
 
56
+ Copyright (c) 2024 iobroker-community-adapters <iobroker-community-adapters@gmx.de>
52
57
  Copyright (c) 2017 Pmant
53
58
 
54
59
  Permission is hereby granted, free of charge, to any person obtaining a copy
package/io-package.json CHANGED
@@ -1,9 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "fakeroku",
4
- "version": "0.2.2",
5
- "license": "MIT",
4
+ "version": "0.2.3",
6
5
  "news": {
6
+ "0.2.3": {
7
+ "en": "Adapter requires node.js >= 18 and js-controller >= 5 now\nDependencies have been updated",
8
+ "de": "Adapter benötigt node.js >= 18 und js-controller >= 5 jetzt\nAbhängigkeiten wurden aktualisiert",
9
+ "ru": "Адаптер требует node.js >= 18 и js-контроллер >= 5 сейчас\nЗависимость обновлена",
10
+ "pt": "Adapter requer node.js >= 18 e js-controller >= 5 agora\nAs dependências foram atualizadas",
11
+ "nl": "Voor adaptor zijn node.js < 18 en js-controller > Nu 5\nAfhankelijkheden zijn bijgewerkt",
12
+ "fr": "L'adaptateur nécessite node.js >= 18 et js-controller >= 5 maintenant\nLes dépendances ont été actualisées",
13
+ "it": "Adattatore richiede node.js >= 18 e js-controller >= 5 ora\nLe dipendenze sono state aggiornate",
14
+ "es": "Adaptador requiere node.js ó= 18 y js-controller 5 ahora\nSe han actualizado las dependencias",
15
+ "pl": "Adapter wymaga node.js > = 18 i kontroler js- > = 5 teraz\nZaktualizowano zależności",
16
+ "uk": "Адаптер вимагає node.js >= 18 і js-controller >= 5 тепер\nЗалежність було оновлено",
17
+ "zh-cn": "适配器需要节点.js QQ18和js控制器 QQ 现在5号\n依赖关系已更新"
18
+ },
7
19
  "0.2.2": {
8
20
  "en": "fixed issues with controller v5",
9
21
  "de": "problemstellungen mit controller v5",
@@ -33,28 +45,55 @@
33
45
  "ru": "first version"
34
46
  }
35
47
  },
36
- "title": "Fakeroku Emulator",
48
+ "titleLang": {
49
+ "en": "Fakeroku Emulator",
50
+ "de": "Fakeroku Emulator",
51
+ "ru": "Emulator Fakeroku",
52
+ "pt": "Emulador de Fakeroku",
53
+ "nl": "Fakeroku-emulator",
54
+ "fr": "Émulateur Fakeroku",
55
+ "it": "Emulatore Fakeroku",
56
+ "es": "Fakeroku Emulator",
57
+ "pl": "Fakeroku Emulator",
58
+ "uk": "Fakeroku Емулятор",
59
+ "zh-cn": "Fakeroku 模拟器"
60
+ },
37
61
  "desc": {
38
62
  "en": "Adapter emulates Roku-Devices to Harmony Hub",
39
63
  "de": "Adapter simuliert Roku-Geräte für den Harmony Hub",
40
64
  "ru": "ioBroker fakeroku драйвер как образец"
41
65
  },
42
- "platform": "Javascript/Node.js",
43
- "mode": "daemon",
44
- "icon": "fakeroku.png",
45
- "enabled": true,
46
- "extIcon": "https://github.com/iobroker-community-adapters/ioBroker.fakeroku/master/admin/fakeroku.png",
47
66
  "keywords": [
48
67
  "fakeroku",
49
68
  "Harmony Hub"
50
69
  ],
51
- "readme": "https://github.com/iobroker-community-adapters/blob/master/README.md",
70
+ "licenseInformation": {
71
+ "license": "MIT",
72
+ "type": "free"
73
+ },
74
+ "platform": "Javascript/Node.js",
75
+ "mode": "daemon",
76
+ "icon": "fakeroku.png",
77
+ "extIcon": "https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.fakeroku/master/admin/fakeroku.png",
78
+ "readme": "https://github.com/iobroker-community-adapters/ioBroker.fakeroku/blob/master/README.md",
52
79
  "loglevel": "info",
80
+ "tier": 2,
53
81
  "type": "multimedia",
54
- "restartAdapters": [],
55
- "singletonHost": true,
82
+ "enabled": true,
56
83
  "authors": [
57
84
  "Pmant <patrickmo@gmx.de>"
85
+ ],
86
+ "restartAdapters": [],
87
+ "singletonHost": true,
88
+ "dependencies": [
89
+ {
90
+ "js-controller": ">=5.0.19"
91
+ }
92
+ ],
93
+ "globalDependencies": [
94
+ {
95
+ "admin": ">=6.13.16"
96
+ }
58
97
  ]
59
98
  },
60
99
  "native": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.fakeroku",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "ioBroker fakeroku Adapter",
5
5
  "author": {
6
6
  "name": "Pmant",
@@ -13,12 +13,6 @@
13
13
  }
14
14
  ],
15
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
16
  "license": "MIT",
23
17
  "keywords": [
24
18
  "ioBroker",
@@ -30,33 +24,53 @@
30
24
  "type": "git",
31
25
  "url": "https://github.com/iobroker-community-adapters/ioBroker.fakeroku"
32
26
  },
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
33
30
  "dependencies": {
34
31
  "http-headers": "^3.0.1",
35
- "@iobroker/adapter-core": "^1.0.3"
32
+ "@iobroker/adapter-core": "^3.1.6"
36
33
  },
37
34
  "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"
35
+ "@alcalzone/release-script": "^3.7.0",
36
+ "@alcalzone/release-script-plugin-iobroker": "^3.7.0",
37
+ "@alcalzone/release-script-plugin-license": "^3.7.0",
38
+ "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
39
+ "@iobroker/adapter-dev": "^1.3.0",
40
+ "@iobroker/testing": "^4.1.3",
41
+ "@tsconfig/node14": "^14.1.0",
42
+ "@types/chai": "^4.3.11",
43
+ "@types/chai-as-promised": "^7.1.8",
44
+ "@types/mocha": "^10.0.6",
45
+ "@types/node": "^20.11.25",
46
+ "@types/proxyquire": "^1.3.31",
47
+ "@types/sinon": "^17.0.3",
48
+ "@types/sinon-chai": "^3.2.12",
49
+ "chai": "^4.4.1",
50
+ "chai-as-promised": "^7.1.1",
51
+ "eslint": "^8.57.0",
52
+ "eslint-config-prettier": "^9.1.0",
53
+ "eslint-plugin-prettier": "^5.1.3",
54
+ "mocha": "^10.3.0",
55
+ "prettier": "^3.2.5",
56
+ "proxyquire": "^2.1.3",
57
+ "sinon": "^17.0.1",
58
+ "sinon-chai": "^3.7.0",
59
+ "typescript": "~5.4.2"
47
60
  },
48
61
  "main": "main.js",
49
62
  "scripts": {
50
- "release": "release-script",
51
- "test": "mocha --exit",
52
- "test:package": "mocha ./test/testPackageFiles.js",
53
- "test:integration": "mocha ./test/testAdapter.js"
63
+ "test:js": "mocha --config test/mocharc.custom.json \"{!(node_modules|test)/**/*.test.js,*.test.js,test/**/test!(PackageFiles|Startup).js}\"",
64
+ "test:package": "mocha test/package --exit",
65
+ "test:integration": "mocha test/integration --exit",
66
+ "test": "npm run test:js && npm run test:package",
67
+ "check": "tsc --noEmit -p tsconfig.check.json",
68
+ "lint": "eslint .",
69
+ "translate": "translate-adapter",
70
+ "release": "release-script"
54
71
  },
55
72
  "bugs": {
56
73
  "url": "https://github.com/iobroker-community-adapters/ioBroker.fakeroku/issues"
57
74
  },
58
- "readmeFilename": "README.md",
59
- "engines": {
60
- "node": ">=4.0.0"
61
- }
75
+ "readmeFilename": "README.md"
62
76
  }