Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ice987987 committed Jul 17, 2022
0 parents commit 868b810
Show file tree
Hide file tree
Showing 40 changed files with 7,153 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .create-adapter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"cli": true,
"target": "directory",
"adapterName": "hagelschutz",
"title": "Hagelschutz Schweiz",
"description": "This adapter fetches hail warnings from https://meteo.netitservices.com",
"keywords": [
"hail",
"hail warnings",
"switzerland"
],
"expert": "yes",
"features": [
"adapter"
],
"adminFeatures": [],
"type": "weather",
"startMode": "daemon",
"connectionType": "cloud",
"dataSource": "poll",
"connectionIndicator": "yes",
"language": "JavaScript",
"adminReact": "no",
"tools": [
"ESLint",
"type checking"
],
"i18n": "words.js",
"releaseScript": "no",
"devServer": "no",
"indentation": "Tab",
"quotes": "single",
"es6class": "yes",
"authorName": "ice987",
"authorGithub": "ice987987",
"authorEmail": "[email protected]",
"gitRemoteProtocol": "HTTPS",
"gitCommit": "no",
"defaultBranch": "main",
"license": "MIT License",
"dependabot": "yes",
"creatorVersion": "2.1.1"
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/.eslintrc.js
40 changes: 40 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"root": true,
"env": {
"es6": true,
"node": true,
"mocha": true
},
"extends": [
"eslint:recommended"
],
"plugins": [],
"rules": {
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
],
"no-console": "off",
"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"always"
]
},
"parserOptions": {
"ecmaVersion": 2018
}
}
81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Bug report
title: "Bug report"
description: "Create a report to help improve this ioBroker adapter"
labels: needs-triage
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to report a bug in this adapter!**
If this is the first time you are doing this, please take a few moments to read
through the [README](https://github.com/ice987987/ioBroker.hagelschutz/blob/main/README.md).
You are about to report a bug in **hagelschutz Adapter**. Do not proceed if your issues
occurs with ioBroker itself, any third party adapters, unofficial or outdated
adapter versions.
And finally, make sure any bug you want to report is still present with the **current**
adapter (beta) version.
Thank you for your collaboration!
- type: textarea
attributes:
label: The problem
description: >-
Describe the issue you are experiencing here. Tell us what you were trying to do
step by step, and what happened that you did not expect.
Provide a clear and concise description of what the problem is and include as many
details as possible.
validations:
required: true
- type: markdown
attributes:
value: |
## Environment
- type: input
attributes:
label: Version of Node.js
description: Can be found in the host section of ioBroker admin
validations:
required: true
- type: input
attributes:
label: Version of ioBroker js-controller
description: Can be found in the host section of ioBroker admin
validations:
required: true
- type: input
attributes:
label: Version of "hagelschutz"-adapter
description: Can be found in the adapters tab of ioBroker admin
validations:
required: true
- type: input
attributes:
label: Version of "admin"-adapter
description: Can be found in the adapters tab of ioBroker admin
validations:
required: true
- type: input
attributes:
label: Operating system incl. version running ioBroker
description: >-
Linux (Docker), Windows, MacOS, something else?
validations:
required: true
- type: markdown
attributes:
value: |
## Logs and other files needed for analysis
- type: checkboxes
attributes:
label: Checklist of files to include below
options:
- label: iobroker.current.log (Please share the logs in debug mode and check that there are no personal information)
required: true
- label: Contents of the JavaScript browser console (always include in cases of issues with the user interface)
- type: textarea
attributes:
label: Additional information & file uploads
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
17 changes: 17 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Configure here which dependency updates should be merged automatically.
# The recommended configuration is the following:
- match:
# Only merge patches for production dependencies
dependency_type: production
update_type: "semver:patch"
- match:
# Except for security fixes, here we allow minor patches
dependency_type: production
update_type: "security:minor"
- match:
# and development dependencies can have a minor update, too
dependency_type: development
update_type: "semver:minor"

# The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
# https://dependabot.com/docs/config-file/#automerged_updates
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: monthly
time: "04:00"
timezone: Europe/Zurich
open-pull-requests-limit: 20
assignees:
- ice987987
versioning-strategy: increase
27 changes: 27 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Automatically merge Dependabot PRs when version comparison is within the range
# that is configured in .github/auto-merge.yml

name: Auto-Merge Dependabot PRs

on:
# WARNING: This needs to be run in the PR base, DO NOT build untrusted code in this action
# details under https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check if PR should be auto-merged
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
# In order to use this, you need to go to https://github.com/settings/tokens and
# create a Personal Access Token with the permission "public_repo".
# Enter this token in your repository settings under "Secrets" and name it AUTO_MERGE_TOKEN
github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
# By default, squash and merge, so Github chooses nice commit messages
command: squash and merge
83 changes: 83 additions & 0 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Test and Release

# Run this job on all pushes and pull requests
# as well as tags with a semantic version
on:
push:
branches:
- "main"
tags:
# normal versions
- "v[0-9]+.[0-9]+.[0-9]+"
# pre-releases
- "v[0-9]+.[0-9]+.[0-9]+-**"
pull_request: {}

jobs:
# Performs quick checks before the expensive test runs
check-and-lint:
if: contains(github.event.head_commit.message, '[skip ci]') == false

runs-on: ubuntu-latest

steps:
- uses: ioBroker/testing-action-check@v1
with:
node-version: '14.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
lint: true

# Runs adapter tests on all supported node versions and OSes
adapter-tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false

runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: ioBroker/testing-action-adapter@v1
with:
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'

# TODO: To enable automatic npm releases, create a token on npmjs.org
# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
# Then uncomment the following block:

# # Deploys the final package to NPM
# deploy:
# needs: [check-and-lint, adapter-tests]
#
# # Trigger this step only when a commit on any branch is tagged with a version number
# if: |
# contains(github.event.head_commit.message, '[skip ci]') == false &&
# github.event_name == 'push' &&
# startsWith(github.ref, 'refs/tags/v')
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: ioBroker/testing-action-deploy@v1
# with:
# node-version: '14.x'
# # Uncomment the following line if your adapter cannot be installed using 'npm ci'
# # install-command: 'npm install'
# npm-token: ${{ secrets.NPM_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
#
# # When using Sentry for error reporting, Sentry can be informed about new releases
# # To enable create a API-Token in Sentry (User settings, API keys)
# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
# # Then uncomment and customize the following block:
# sentry: true
# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
# sentry-project: "iobroker-hagelschutz"
# sentry-version-prefix: "iobroker.hagelschutz"
# # If your sentry project is linked to a GitHub repository, you can enable the following option
# # sentry-github-integration: true
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# No dot-directories except github/vscode
.*/
!.vscode/
!.github/

*.code-workspace
node_modules
nbproject

# npm package files
iobroker.*.tgz

Thumbs.db

# i18n intermediate files
admin/i18n/flat.txt
admin/i18n/*/flat.txt
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"eslint.enable": true,
"json.schemas": [
{
"fileMatch": [
"io-package.json"
],
"url": "https://json.schemastore.org/io-package"
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 ice987 <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 868b810

Please sign in to comment.