-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 870bfaa
Showing
35 changed files
with
9,321 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking" | ||
], | ||
"ignorePatterns": [ "dist" ], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"project": "tsconfig.json", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ "@stylistic" ], | ||
"rules": { | ||
"camelcase": [ "warn" ], | ||
"curly": [ "warn", "all" ], | ||
"dot-notation": "warn", | ||
"eqeqeq": "warn", | ||
"no-await-in-loop": [ "warn" ], | ||
"no-console": [ "warn" ], | ||
"prefer-arrow-callback": [ "warn" ], | ||
"quotes": [ "warn", "double", { "avoidEscape": true } ], | ||
"sort-imports": [ "warn" ], | ||
"sort-keys": [ "warn" ], | ||
"sort-vars": [ "warn" ], | ||
"@stylistic/brace-style": [ "error" ], | ||
"@stylistic/comma-dangle": [ "error" ], | ||
"@stylistic/indent": [ "warn", 2, { "SwitchCase": 1 } ], | ||
"@stylistic/linebreak-style": [ "warn", "unix" ], | ||
"@stylistic/lines-between-class-members": [ "warn", "always", { "exceptAfterSingleLine": true } ], | ||
"@stylistic/max-len": [ "warn", 170 ], | ||
"@stylistic/no-tabs": [ "error" ], | ||
"@stylistic/no-trailing-spaces": [ "error" ], | ||
"@stylistic/semi": [ "warn", "always" ], | ||
"@stylistic/space-before-function-paren": ["error", { "anonymous": "never", "asyncArrow": "always", "named": "never" } ], | ||
"@typescript-eslint/explicit-function-return-type": [ "warn" ], | ||
"@typescript-eslint/explicit-module-boundary-types": [ "warn" ], | ||
"@typescript-eslint/no-explicit-any": [ "warn" ], | ||
"@typescript-eslint/no-floating-promises": [ "warn", { "ignoreIIFE": true }], | ||
"@typescript-eslint/no-non-null-assertion": [ "warn" ], | ||
"@typescript-eslint/no-this-alias": [ "warn" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: Support Request | ||
about: Report a bug or request help. Please read the documentation first before creating a support request. | ||
title: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- You must use the issue template below. --> | ||
<!-- Please ensure you read the documentation before creating a support request. --> | ||
|
||
**Describe The Problem:** | ||
<!-- A clear and concise description of what the issue is. --> | ||
|
||
**To Reproduce:** | ||
<!-- Steps to reproduce the behavior. --> | ||
|
||
**Logs:** | ||
<!-- In order to be helpful, include the relevant logs from the UniFi Access API package, if applicable. --> | ||
|
||
``` | ||
Show the UniFi Access API logs here. | ||
Remove any sensitive information. | ||
``` | ||
|
||
**Screenshots:** | ||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
blank_issues_enabled: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: Feature Request | ||
about: Suggest an idea for an enhancement. | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe:** | ||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> | ||
|
||
**Describe the solution you'd like:** | ||
<!-- A clear and concise description of what you want to happen. --> | ||
|
||
**Describe alternatives you've considered:** | ||
<!-- A clear and concise description of any alternative solutions or features you've considered. --> | ||
|
||
**Additional context:** | ||
<!-- Add any other context or screenshots about the feature request here. --> | ||
|
||
<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Merge all dependencies as long within ${TARGET} scope (defined in workflows/dependabot-automerge.yml). | ||
# | ||
- match: | ||
dependency_type: all | ||
update_type: semver:minor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Query daily for npm dependency updates. | ||
# | ||
version: 2 | ||
|
||
updates: | ||
|
||
# Enable version updates for github-actions. | ||
- package-ecosystem: "github-actions" | ||
|
||
# Look for ".github/workflows" in the "root" directory. | ||
directory: "/" | ||
|
||
# Check for updated GitHub Actions every weekday. | ||
schedule: | ||
interval: "daily" | ||
|
||
# Allow up to ten pull requests to be generated at any one time. | ||
open-pull-requests-limit: 0 | ||
|
||
# Enable version updates for npm. | ||
- package-ecosystem: "npm" | ||
|
||
# Look for "package.json" and "package-lock.json" files in the "root" directory. | ||
directory: "/" | ||
|
||
# Check the npm registry for updates every weekday. | ||
schedule: | ||
interval: "daily" | ||
|
||
# Allow up to ten pull requests to be generated at any one time. | ||
open-pull-requests-limit: 0 | ||
|
||
# Ignore certain dependency updates. | ||
# ignore: | ||
# Ignore node-fetch updates for now due to the breaking change in module management. | ||
# - dependency-name: "node-fetch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Continuous integration - validate builds when commits are made, and publish when releases are created. | ||
# | ||
name: "Continuous Integration" | ||
|
||
# Run the build on all push, pull request, and release creation events. | ||
on: | ||
pull_request: | ||
push: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
|
||
# Run a validation build on LTS versions of node. | ||
validate-build: | ||
|
||
# Build only if we've received a push event. | ||
if: github.event_name == 'push' | ||
|
||
# Create the build matrix for all the environments we're validating against. | ||
strategy: | ||
matrix: | ||
node-version: [ lts/-1, lts/* ] | ||
os: [ ubuntu-latest ] | ||
|
||
# Specify the environments we're going to build in. | ||
runs-on: ${{ matrix.os }} | ||
|
||
# Execute the build activities. | ||
steps: | ||
- name: Checkout the repository. | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup the node ${{ matrix.node-version }} environment. | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Build and install the package with a clean slate. | ||
run: | | ||
npm ci | ||
npm run build --if-present | ||
env: | ||
CI: true | ||
|
||
# Publish the release to the NPM registry. | ||
publish-npm: | ||
|
||
# Publish only if we've received a release event and the tag starts with "v" (aka v1.2.3). | ||
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
# Specify the environment we're going to build in. | ||
runs-on: ubuntu-latest | ||
|
||
# Execute the build and publish activities. | ||
steps: | ||
- name: Checkout the repository. | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup the node environment. | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
||
# Use the oldest node LTS version that we support. | ||
node-version: lts/-1 | ||
|
||
# Use the NPM registry. | ||
registry-url: 'https://registry.npmjs.org/' | ||
|
||
- name: Install the package with a clean slate. | ||
run: npm ci | ||
|
||
- name: Publish the package to NPM. | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Automerge dependency updates identified by dependabot. | ||
# | ||
name: Automerge Dependabot Version Updates | ||
|
||
on: | ||
pull_request_target: | ||
|
||
jobs: | ||
auto-merge: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ahmadnassri/action-dependabot-auto-merge@v2 | ||
with: | ||
target: minor | ||
github-token: ${{ secrets.UPDATES_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Close stale issues after a defined period of time. | ||
# | ||
name: Close Stale Issues | ||
|
||
on: | ||
issues: | ||
types: [reopened] | ||
schedule: | ||
- cron: "*/60 * * * *" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Autoclose stale issues. | ||
uses: actions/stale@v8 | ||
with: | ||
days-before-close: 2 | ||
days-before-stale: 7 | ||
exempt-issue-labels: 'discussion,help wanted,long running' | ||
exempt-pr-labels: 'awaiting-approval,work-in-progress' | ||
remove-stale-when-updated: true | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-label: 'stale' | ||
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' | ||
stale-pr-label: 'stale' | ||
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Close issues that don't conform to the issue templates. | ||
# | ||
name: Close Non-Conforming Issues | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
autoclose: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Autoclose issues that don't follow the issue templates. | ||
uses: roots/[email protected] | ||
with: | ||
issue-close-message: "@${issue.user.login} - this issue is being automatically closed because it does not follow either the feature request or bug report issue template. The issue templates have been designed to help in the troubleshooting (or feature request) process. Please use them and populate it as completely as possible to streamline troubleshooting or feature request discussions." | ||
issue-pattern: "Describe alternatives you've considered|Describe The Problem" | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Lock Threads' | ||
|
||
on: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: lock | ||
|
||
jobs: | ||
action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dessant/lock-threads@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-inactive-days: "2" | ||
exclude-any-issue-labels: "discussion" | ||
issue-comment: "This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions." | ||
issue-lock-reason: "" | ||
pr-inactive-days: "7" | ||
pr-comment: "This issue is locked to prevent necroposting on closed issues. Please create a new issue for related discussion, if needed." | ||
pr-lock-reason: "" |
Oops, something went wrong.