Skip to content

Commit

Permalink
Release 0.8.0 (#46)
Browse files Browse the repository at this point in the history
* fix: #27 node-red crash on network errors

* feat: #36 allow custom port for Requests

* feat: #25 Error during polling - cookies refresh job (45m)

* Removed yarn

Co-authored-by: crxporter <[email protected]>
  • Loading branch information
Shaquu and crxporter authored Oct 20, 2022
1 parent df2fc23 commit 38c7197
Show file tree
Hide file tree
Showing 21 changed files with 14,237 additions and 4,200 deletions.
12 changes: 9 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'plugin:prettier/recommended',
'prettier',
],
plugins: ['@typescript-eslint', 'prettier'],
plugins: ['@typescript-eslint', 'prettier', 'simple-import-sort'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
Expand All @@ -23,13 +23,19 @@ module.exports = {
},
rules: {
'prettier/prettier': 'off',
indent: ['error', 4, { 'SwitchCase': 1 }],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'never'],
'no-prototype-builtins': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
],
},
}
14 changes: 7 additions & 7 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
node-version: 12
- run: |
npm i -g yarn
yarn install --frozen-lockfile
yarn build
yarn test
npm install -g npm
npm ci
npm run build
npm test
publish-npm:
needs: build
Expand All @@ -35,9 +35,9 @@ jobs:
- name: Publish
if: contains(steps.package-version.outputs.current-version, 'dev') == true
run: |
npm i -g yarn
yarn install --frozen-lockfile
yarn build
npm install -g npm
npm ci
npm run build
npm publish --tag dev
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_TKN}}
23 changes: 12 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 12
- run: |
npm i -g yarn
yarn install --frozen-lockfile
yarn build
yarn test
- run:
npm install -g npm
npm ci
npm run build
npm test

publish-npm:
needs: build
Expand All @@ -35,10 +35,10 @@ jobs:
- name: Publish
if: contains(steps.package-version.outputs.current-version, 'dev') != true
run: |
npm i -g yarn
yarn install --frozen-lockfile
yarn build
yarn publish
npm install -g npm
npm ci
npm run build
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_TKN}}

Expand All @@ -57,8 +57,9 @@ jobs:
- name: Publish
if: contains(steps.package-version.outputs.current-version, 'dev') != true
run: |
yarn install --frozen-lockfile
yarn build
npm install -g npm
npm ci
npm run build
npm init --scope=nrchkb -y
npm publish
env:
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ Temporary Items
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
Expand Down Expand Up @@ -184,9 +182,6 @@ typings/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
Expand Down
9 changes: 4 additions & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint
yarn prettier
yarn test
npm run eslint
npm test
12 changes: 6 additions & 6 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
"tabWidth": 4,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"endOfLine": "lf"
tabWidth: 4,
useTabs: false,
semi: false,
singleQuote: true,
trailingComma: 'es5',
endOfLine: 'lf',
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Be warned, it is a lot of data. It will be up to the user to build filters and f
### * Current Status
Updated July 15, 2021.

Currently we have what appears to be a fully functioning setup. We are still looking for errors and bugs from more edge case testing, please report if you find something.
Currently, we have what appears to be a fully functioning setup. We are still looking for errors and bugs from more edge case testing, please report if you find something.

The HTTP endpoints [listed here](https://ubntwiki.com/products/software/UniFi-controller/api) should all be working properly. GET, POST, and PUT requests should all be functioning and able to pass commands from Node-RED into the UniFi API.

Expand All @@ -24,7 +24,7 @@ As you place your first UniFi node, you will need to create a new config node. T

### * How to Use HTTP Request Node

HTTP request nodes can do all of the things [listed here](https://ubntwiki.com/products/software/UniFi-controller/api).
HTTP request nodes can do all the things [listed here](https://ubntwiki.com/products/software/UniFi-controller/api).

The configuration may be set either by typing into the node's setup fields or by sending payloads including `msg.payload.endpoint`, `msg.payload.method`, and `msg.payload.data`.

Expand All @@ -48,7 +48,7 @@ Here is an example payload which maybe sent if you would like to send data (POST
}
```

Please use [this excellent list](https://ubntwiki.com/products/software/UniFi-controller/api) to learn all of the fun things you might like to send to the HTTP node.
Please use [this excellent list](https://ubntwiki.com/products/software/UniFi-controller/api) to learn all the fun things you might like to send to the HTTP node.

### * How to Use WebSocket Node

Expand Down
Loading

0 comments on commit 38c7197

Please sign in to comment.