Skip to content

Commit 38c7197

Browse files
Shaquucrxporter
andauthored
Release 0.8.0 (#46)
* 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 <38265886+crxporter@users.noreply.github.com>
1 parent df2fc23 commit 38c7197

21 files changed

+14237
-4200
lines changed

.eslintrc.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
'plugin:prettier/recommended',
1212
'prettier',
1313
],
14-
plugins: ['@typescript-eslint', 'prettier'],
14+
plugins: ['@typescript-eslint', 'prettier', 'simple-import-sort'],
1515
globals: {
1616
Atomics: 'readonly',
1717
SharedArrayBuffer: 'readonly',
@@ -23,13 +23,19 @@ module.exports = {
2323
},
2424
rules: {
2525
'prettier/prettier': 'off',
26-
indent: ['error', 4, { 'SwitchCase': 1 }],
2726
'linebreak-style': ['error', 'unix'],
28-
quotes: ['error', 'single'],
27+
quotes: ['error', 'single', { avoidEscape: true }],
2928
semi: ['error', 'never'],
3029
'no-prototype-builtins': 'off',
3130
'@typescript-eslint/no-this-alias': 'off',
3231
'@typescript-eslint/no-var-requires': 'off',
3332
'@typescript-eslint/no-explicit-any': 'off',
33+
'@typescript-eslint/ban-ts-comment': 'off',
34+
'simple-import-sort/imports': 'error',
35+
'simple-import-sort/exports': 'error',
36+
'@typescript-eslint/no-unused-vars': [
37+
'error',
38+
{ argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' },
39+
],
3440
},
3541
}

.github/workflows/publish-dev.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
with:
1515
node-version: 12
1616
- run: |
17-
npm i -g yarn
18-
yarn install --frozen-lockfile
19-
yarn build
20-
yarn test
17+
npm install -g npm
18+
npm ci
19+
npm run build
20+
npm test
2121
2222
publish-npm:
2323
needs: build
@@ -35,9 +35,9 @@ jobs:
3535
- name: Publish
3636
if: contains(steps.package-version.outputs.current-version, 'dev') == true
3737
run: |
38-
npm i -g yarn
39-
yarn install --frozen-lockfile
40-
yarn build
38+
npm install -g npm
39+
npm ci
40+
npm run build
4141
npm publish --tag dev
4242
env:
4343
NODE_AUTH_TOKEN: ${{secrets.NODE_TKN}}

.github/workflows/publish.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
- uses: actions/setup-node@v1
1414
with:
1515
node-version: 12
16-
- run: |
17-
npm i -g yarn
18-
yarn install --frozen-lockfile
19-
yarn build
20-
yarn test
16+
- run:
17+
npm install -g npm
18+
npm ci
19+
npm run build
20+
npm test
2121

2222
publish-npm:
2323
needs: build
@@ -35,10 +35,10 @@ jobs:
3535
- name: Publish
3636
if: contains(steps.package-version.outputs.current-version, 'dev') != true
3737
run: |
38-
npm i -g yarn
39-
yarn install --frozen-lockfile
40-
yarn build
41-
yarn publish
38+
npm install -g npm
39+
npm ci
40+
npm run build
41+
npm publish
4242
env:
4343
NODE_AUTH_TOKEN: ${{secrets.NODE_TKN}}
4444

@@ -57,8 +57,9 @@ jobs:
5757
- name: Publish
5858
if: contains(steps.package-version.outputs.current-version, 'dev') != true
5959
run: |
60-
yarn install --frozen-lockfile
61-
yarn build
60+
npm install -g npm
61+
npm ci
62+
npm run build
6263
npm init --scope=nrchkb -y
6364
npm publish
6465
env:

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ Temporary Items
135135
logs
136136
*.log
137137
npm-debug.log*
138-
yarn-debug.log*
139-
yarn-error.log*
140138

141139
# Runtime data
142140
pids
@@ -184,9 +182,6 @@ typings/
184182
# Output of 'npm pack'
185183
*.tgz
186184

187-
# Yarn Integrity file
188-
.yarn-integrity
189-
190185
# dotenv environment variables file
191186
.env
192187
.env.test

.husky/pre-commit

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
33

4-
yarn lint
5-
yarn prettier
6-
yarn test
4+
npm run eslint
5+
npm test

.prettierrc.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
2-
"tabWidth": 4,
3-
"useTabs": false,
4-
"semi": false,
5-
"singleQuote": true,
6-
"trailingComma": "es5",
7-
"endOfLine": "lf"
2+
tabWidth: 4,
3+
useTabs: false,
4+
semi: false,
5+
singleQuote: true,
6+
trailingComma: 'es5',
7+
endOfLine: 'lf',
88
}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Be warned, it is a lot of data. It will be up to the user to build filters and f
1010
### * Current Status
1111
Updated July 15, 2021.
1212

13-
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.
13+
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.
1414

1515
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.
1616

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

2525
### * How to Use HTTP Request Node
2626

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

2929
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`.
3030

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

51-
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.
51+
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.
5252

5353
### * How to Use WebSocket Node
5454

0 commit comments

Comments
 (0)