Since we don't use the `raspberry` information, calling it in `si.get`
is useless.
I also made the string construction in the code a bit more readable. The
output remains the same.
Main point was to enable ESLint `dot-notation` and `no-unneeded-ternary`
rules for more code consistency.
I took the occasion to add two minor commits:
- Fix a problem found by running `test:spelling
- Minor dependency update
It wouldn't be a problem if the PR didn't arrive in the next release,
the changes are cosmetic.
if the MagicMirror js folder is not writable (synology nas created by
different user than docker container) there is an uncaught throw
```
[ERROR] EACCES: permission denied, open 'js/positions.js'
```
add try/catch, output new message, console.error
```text
unable to write js/positions.js with the discovered module positions
make the MagicMirror/js folder writeable by the user starting MagicMirror
```
MM will start, but no modules will show, as no positions were discovered
this file is used to pass the list from the server side to the browser
side
fixes#3651
after adding check:config to the MM startup process, #3450, we
accidentally discover module positions more than once, and write the
file each time..
add a check to see if we have done this work already
I felt like adding a spell checker, but it's okay if you find it
superfluous. At least then we could fix the found spell issues.
What is still missing is an automatic integration so that the spell
checker does not have to be called manually. Would it perhaps make sense
to always do it before a release?
read index.html to discover the regions used, make them the list checked
by app.js and check:config test
fixes#3504 supercedes #3506
no config.js param required
see #3358
used command: `find ./ -type f -exec perl -i -0pe
's/\/\*\s*magicmirror.*?\*\/\s*//si' {} \;`
This is a first draft, I think we should preserve some of the comments.
It is basically a cosmetic thing, but has the following advantages:
1. Consistency with the official node documentation. The prefix is used
there.
2. It is easier to recognize the build-in modules.
This is a first attempt to bring additional system information into the
console (see #3328). It's certainly not yet perfect, but with the PR we
have a better basis for discussion.
I tried to keep the output small so that we get as much information as
possible in screenshots.
This is how it looks on my development system.
```bash
[03.01.2024 00:50.19.226] [INFO] System information:
### SYSTEM: manufacturer: Notebook; model: N650DU; raspberry: undefined; virtual: false
### OS: platform: linux; distro: Debian GNU/Linux; release: 12
### VERSIONS: MagicMirror: 2.27.0-develop; electron: 27.2.0; kernel: 5.10.0-20-amd64; node: 21.1.0; npm: 10.2.4; pm2: 5.3.0; docker: 20.10.24+dfsg1
```
Why is it still a draft:
- [x] I have doubts that utils.js is the right place for the function. What do you think?
=> Update: As long as there is no better idea, it stays there.
- [x] Instead of working through all wishes you expressed in the issue #3328, I only implemented what was easy to achieve. And wanted to hear what you think about this approach.
=> Update: Some added. Of course, more information could be added later, as soon as experience has been gained in productive use.
- [x] I don't quite like the introductory line ("The following lines provide information..."). Should I perhaps simply replace it with "System information:"?
=> Update: Changed to "System information:"
[Here](https://github.com/sebhildebrandt/systeminformation#function-reference-and-os-support) you can see what information we could easily add with the systeminformation package.
It would be interesting how the raspberry field is filled on a raspi system and with docker there should be another line, but I can't easily test that now.