Skip to content

Introduce permanent storage and random user tokens#7

Open
Maschina wants to merge 14 commits intotim-hellhake:masterfrom
Maschina:master
Open

Introduce permanent storage and random user tokens#7
Maschina wants to merge 14 commits intotim-hellhake:masterfrom
Maschina:master

Conversation

@Maschina
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Owner

@tim-hellhake tim-hellhake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!
I have just a few comments.

Comment thread .gitignore
dist
.vscode
hue.json
package-lock.json
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
package-lock.json

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an updated package-lock.json.

Comment thread package.json
"dependencies": {
"express": "^4.17.1",
"body-parser": "^1.19.0"
"bluebird": "^3.7.2",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually used in the code?

Comment on lines +64 to +68
let map: {[key: string]: string} = {};
map[address] = message;
return [{
success: map
}];
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let map: {[key: string]: string} = {};
map[address] = message;
return [{
success: map
}];
return [{
success: {[address]: message}
}];

Comment thread src/helpers/timehelper.ts
Comment on lines +6 to +8

export function getIsoDateTime(): string {
var dateFormat = require('dateformat');
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function getIsoDateTime(): string {
var dateFormat = require('dateformat');
import dateformat from 'dateformat';
export function getIsoDateTime(): string {

npm install --save-dev @types/dateformat

Comment thread src/index.ts
Comment on lines +7 to +10
import { HueBridge } from './hue-bridge';

let bridge = new HueBridge({ debug: true });
bridge.start(); No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { HueBridge } from './hue-bridge';
let bridge = new HueBridge({ debug: true });
bridge.start();
export * from './hue-bridge'

It should be still usable as a library.
I'm totally fine if you add something like a server.js.

Comment thread tslint.json
Comment on lines +1 to +14
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"no-unnecessary-type-assertion": true,
"array-type": [true, "array"],
"no-double-space": true,
"no-var-keyword": true
},
"rulesDirectory": []
} No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TSLint is deprecated, please use TypeScript ESLint

@Maschina
Copy link
Copy Markdown
Author

Maschina commented Apr 17, 2021

Awesome work!
I have just a few comments.

@tim-hellhake
Thanks! I meanwhile proceeded with groups and scenes. Does it makes sense to close this pull request, implement your suggestions and open another pull request?

@tim-hellhake
Copy link
Copy Markdown
Owner

Thanks! I meanwhile proceeded with groups and scenes. Does it makes sense to close this pull request, implement your suggestions and open another pull request?

I would update this PR but if it's easier to open a new PR feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants