39 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
0b70274a1a
Replace prettier by stylistic to lint JavaScript (#3303)
In the latest versions of ESLint, more and more formatting rules were
removed or declared deprecated. These rules have been integrated into
the new Stylistic package (https://eslint.style/guide/why) and expanded.

Stylistic acts as a better formatter  for JavaScript as Prettier.

With this PR there are many changes that make the code more uniform, but
it may be difficult to review due to the large amount. Even if I have no
worries about the changes, perhaps this would be something for the
release after next.

Let me know what you think.
2023-12-25 08:17:11 +01:00
Bugsounet - Cédric
203e8647d4
3rd party modules updater for updatenotification (#3150)
Added my (modified) updater main core into updatenotification default
module

Missing: callback display in MM² (i will code it after)

new part of configuration added:

```
		updates: [
			// array of module update commands
			{
				// with embed npm script
				"MMM-Test": "npm run update"
			},
			{
				// with "complex" process
				"MMM-OtherSample": "rm -rf package-lock.json && git reset --hard && git pull && npm install"
			},
			{
				// with git pull && npm install
				"MMM-OtherSample2": "git pull && npm install"
			},
			{
				// with a simple git pull
				"MMM-OtherSample3": "git pull"
			}
		],
		updateTimeout: 2 * 60 * 1000, // max update duration
		updateAutorestart: false // autoRestart MM when update done ?
```

@khassel: i need your help
I don't use docker, maybe you can help me for this:
How can i check if MM² is running inside a docker ? (from MM² main core)
Actually, I check if we use pm2 or not.
I have to check if docker is used or not too
last time you tell me: "you can't use updater with docker", so I want to
check and deny any update if docker used

---------

Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
2023-11-10 12:43:34 +01:00
Kristjan ESPERANTO
7dcea98e99
Handle pretty-quick issue (#3169)
- Replace pretty-quick by lint-staged (to fix:
<https://github.com/azz/pretty-quick/issues/164>)
- Update prettier dependencies
- Handle prettier issues
2023-08-16 14:21:02 +02:00
Bugsounet - Cédric
c1850f2577
Remote force check update (#3127)
updatenotification: 

allow force scanning with `SCAN_UPDATES` notification from other modules
2023-06-18 14:33:03 +02:00
Bugsounet - Cédric
e985e99036
Updates notification (#3119)
Hi,

Like some default modules, I propose to send an `UPDATES` notification
in an array with the git information of these modules

This allows developers to create their own auto-update system (which
I've been using in my case since 3 years, with automatic things)

Of course, for security reasons `MagicMirror` is excluded

---------

Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
2023-06-08 22:41:48 +02:00
Kristjan ESPERANTO
5f38c53260
Revise require imports (#3071)
- order (external first)
- remove superfluous file extensions
- new line after imports
- deconstruct (only one time (in `check_config.js`))
- fix path (only one time (in `global-setup.js`))
2023-03-22 23:53:10 +01:00
Karsten Hassel
29e3ec06cb
added possibility to ignore MagicMirror repo in updatenotification (#3002)
was [requested in the
forum](https://forum.magicmirror.builders/topic/17519/updatenotification).

- added possibility to exclude MagicMirror Repo and renamed it from
`default` to `MagicMirror`
- improved getting `behind` in case a hard `git fetch` was already done
- removed test "excludes repo if refs don't match regex" because of
above improvement this case is obsolete
- improved `git fetch --dry-run` with `-n` option to exclude tags (noise
reduction)
2023-01-12 09:14:20 +01:00
Felix Wiedenbach
c2d2c278e0 fixed updatenotification async/await issues and more es6 2021-09-18 03:53:40 +02:00
Karsten Hassel
98942d6f9c rename to GitHelper 2021-09-09 19:51:07 +02:00
Karsten Hassel
dd43f35bbe add unit tests 2021-09-09 00:03:28 +02:00
Karsten Hassel
093988e136 extract git stuff in own class 2021-09-06 23:55:32 +02:00
Karsten Hassel
ce13d7f98b added comments, get hash only for mm 2021-09-05 23:39:23 +02:00
Karsten Hassel
22384342db fix update notification, remove simple-git 2021-09-04 22:55:03 +02:00
Karsten Hassel
860840c367 dirty working snapshot 2021-09-04 19:08:18 +02:00
buxxi
d2b3414ac6 changelog for zombie processes and fixing linting error 2021-03-13 12:02:56 +01:00
buxxi
401a6f3417 Updating simple-git and using timeout when checking for module updates 2021-03-13 11:58:33 +01:00
buxxi
3ed223a550 Refactoring update notification to use async/await 2021-03-13 11:12:08 +01:00
Felix Wiedenbach
b18d98f5ea exposed logger as node module 2021-02-18 19:14:53 +01:00
Brandon Marlowe
6f1c7d6253 added --dry-run option to prevent updatenotification module from consuming fetch result 2020-07-28 23:51:38 -04:00
rejas
008ac2876b More console -> Logger conversions 2020-06-02 15:05:31 +02:00
Veeck
abb5dc5739 Run prettier over ALL files once
No other changes done in this commit
2020-05-11 22:22:32 +02:00
rejas
b9d19cfcb4 First round of undef fixes 2020-05-03 12:40:48 +02:00
rejas
5a4ae99283 Add no-multi-spaces rule to eslint and run it 2020-03-15 15:49:34 +01:00
buxxi
75c8c3f50b Using promises to resolve which modules has a git remote so the modules wont be skipped on the first check 2020-02-17 22:56:06 +01:00
buxxi
c925e88475 Adding support for ignoring update check for certain modules 2020-02-11 18:13:39 +01:00
Rodrigo Ramírez Norambuena
82ee051c1a linter fixes 2019-07-26 01:25:26 -04:00
Sam Detweiler
7315f7d283 fix conflict with master repo develop branch 2019-07-01 12:35:47 -05:00
Sam Detweiler
4084c57789 fix updatenotification to not crash 2019-06-29 15:59:03 -05:00
shbatm
1f62b8f0b6
Update node_helper.js 2019-01-04 18:12:12 -06:00
shbatm
b9d6a235e3
Fixes Incomplete fix for MichMich/MagicMirror#1507 2019-01-04 12:37:58 -06:00
shbatm
a257b15f86 Error handling for bad git data in updatenotification
Update CHANGELOG
2019-01-04 09:23:10 -06:00
Chris van Marle
e7b9100f1c Add Github link to update info 2017-10-16 14:24:29 +02:00
Michael Teeuw
48db615ac8 Merge pull request #553 from roramirez/grunt-eslint-modules
Grunt eslint modules
2016-12-13 12:58:43 +01:00
Chris van Marle
0d18266ad1 Fetch remote git only if repo has a remote 2016-12-07 08:38:45 +01:00
Rodrigo Ramírez Norambuena
83ee0534f2 fixed eslint error into modules for Javascript files 2016-12-02 23:23:54 -03:00
Chris van Marle
482dd4db76 Check updates for configured modules only 2016-11-18 12:57:45 +01:00
Chris van Marle
7329515a4d Check for module updates 2016-11-16 18:19:44 +01:00
Michael Teeuw
1b7fe286a6 remove logging 2016-10-17 17:03:10 +02:00
Michael Teeuw
a66a4f62bd Add module 'updatenotification'. 2016-10-15 13:08:46 +02:00