Commit graph

199 commits

Author SHA1 Message Date
Max Leiter 03eadf0288
Add separate yarn lint command 2022-05-31 15:21:16 -07:00
Max Leiter 4f41d80b88
Replace as string with String constructor 2022-05-31 14:47:54 -07:00
Max Leiter 3d4d29bca4
linting 2022-05-31 13:56:33 -07:00
Max Leiter afba008363
Fix package commands by adding .argument() call 2022-05-31 13:44:54 -07:00
Max Leiter 21b52a99a0
linting 2022-05-31 12:54:21 -07:00
Max Leiter cff9209a25
fix joining channels from net form(?), major progress in tests 2022-05-31 12:46:55 -07:00
Max Leiter f37d82dd19
vue 3 progress 2022-05-23 00:44:01 -07:00
Max Leiter a06bc904ae
Add src/dist to prettier/eslint ignores, apply lint, webpack adjustments 2022-05-21 11:56:01 -07:00
Max Leiter 1d2dc40985
fix yarn build and start 2022-05-21 11:55:22 -07:00
Max Leiter ed02acfad4
more tests, eslint work 2022-05-21 11:49:34 -07:00
Max Leiter 0ce89950e9
constants.js -> ts, more config cleanup 2022-05-21 11:49:28 -07:00
Max Leiter 60f2532e81
tsconfig changes 2022-05-21 11:49:27 -07:00
Max Leiter 26cfa8d159
progress? 2022-05-21 11:47:54 -07:00
Max Leiter 5bb94d6428
ts progress 2022-05-21 11:47:49 -07:00
Max Leiter 291ac3e903
[ts-migrate][src] Rename files from JS/JSX to TS/TSX
Co-authored-by: ts-migrate <>
2022-05-21 11:47:11 -07:00
Max Leiter d164784d8b
[ts-migrate][src] Init tsconfig.json file
Co-authored-by: ts-migrate <>
2022-05-21 11:47:11 -07:00
Max Leiter 01d640db47
ts progress 2022-05-21 11:47:08 -07:00
Reto d4cc2dd361
Refactor config out of Helper (#4558)
* Remove config from Helper

Helper is the usual util grab bag of useful stuff.
Somehow the config ended up there historically but
structurally that doesn't make any sense.

* Add cert folder to prettier ignore file
2022-05-01 12:12:39 -07:00
Reto d7bba325a7
Fix user file permissions on create (#4507)
User files contain secrets and should be protected.
Chances are that the user folder can be protected as well,
so let's do that if TL is creating the folder.
2022-04-11 17:47:22 -07:00
Reto 815319810c
cli: don't error if the user folder doesn't exist (#4508)
The user folder gets created on demand, thelounge list should not
fail if the folder doesn't exist.
This just means that no users are present, so report that instead.
2022-04-11 17:46:29 -07:00
Max Leiter 6b852d14c8
Fix not overriding config options with -c 2021-06-22 00:00:41 -07:00
Reto Brunner c5fcc5d72f install: allow installation of local packages
It may not be desirable to host all plugins on npm, allow for local packages to
be installed given a package name with a `file:` prefix.

This is still more restrictive than what yarn would support but allows us to still
verify the thelounge compatibility by reading the package.json file.

`yarn add` messes up with local filepaths and generates a lockfile that is
"outdated" as far as any other yarn commands go, which makes them error out.

For some reason `yarn install` fixes that and hence we run that after an install.
Here's the diff of yarn.lock between the broken state after `yarn add file:$path`
and `yarn install`
	--- yarn.lock.2.afterAdd	2021-06-02 00:10:52.365134018 +0200
	+++ yarn.lock.3.afterinstall	2021-06-02 00:13:27.122760442 +0200
	@@ -2194,7 +2194,7 @@
	     safe-buffer "^5.1.2"
	     yallist "^3.0.3"

	-thelounge-plugin-shortcuts@/home/reto/sourcecode/thelounge-plugin-shortcuts:
	+"thelounge-plugin-shortcuts@file:../../sourcecode/thelounge-plugin-shortcuts":
	   version "1.0.12"
	   dependencies:
	     thelounge "4.2.0"

The only thing it does is switch an absolute path to a relative one for whatever
reason.
2021-06-05 13:01:55 +02:00
Taavi Väänänen e790a72e59 Make add and reset CLI commands scriptable
Add CLI options `--password` and `--save-logs` (for `add` only) in
order to make adding users and changing user passwords scriptable.

Closes #3913
2020-10-07 09:00:00 +03:00
Al McKinlay 86e570efb2 Add version support for packages. 2020-08-21 15:03:12 +01:00
Pavel Djundik 487a438f02 Replace all uses of fs-extra with native methods 2020-03-22 20:42:16 +02:00
Pavel Djundik 881b3eda19 Run format after updating to prettier 2.0 2020-03-21 22:55:36 +02:00
Pavel Djundik 80b0e8ad12 Fix up commander changes 2020-03-15 14:00:02 +02:00
Pavel Djundik 8f15548770 Fix not being able to uninstall packages 2020-02-27 19:21:01 +02:00
Pavel Djundik 469fe577f2 Wrap stdout parsing from yarn into try/catch 2020-02-11 11:48:02 +02:00
Pavel Djundik 0c246f0bbe Fix passing utf-8 to readFileSync 2020-01-01 01:11:04 +02:00
Pavel Djundik 99175bef82 Check if there are any packages installed in upgrade command 2019-12-30 19:28:28 +02:00
Pavel Djundik c1920eb566 When updating user file, write to temp file first 2019-12-18 10:47:07 +02:00
Pavel Djundik e3a2fa7dd1 Create packages/package.json on server start 2019-12-14 20:48:25 +02:00
Pavel Djundik 24e41327a3 Provide fake $HOME env to Yarn commands 2019-12-13 17:45:10 +02:00
Pavel Djundik db4b292a38 Remove code that aided upgrade to v3 2019-12-02 12:10:17 +02:00
Pavel Djundik 1410256e42
Merge pull request #3489 from thelounge/xpaw/fix-3221
Enable some user commands for LDAP
2019-11-11 12:01:48 +02:00
Tim Miller-Williams 19d8178606 Add webpack hot module reloading for development
Co-Authored-By: Tim Miller-Williams <timmw@users.noreply.github.com>
2019-11-08 15:02:44 +02:00
Pavel Djundik e58a895293 Enable some user commands for LDAP
Fixes #3221
2019-11-01 13:37:32 +02:00
Pavel Djundik e09599aeae Fix running commands 2019-11-01 12:51:57 +02:00
Pavel Djundik 41e5090fb0 Do not crash on first run due to config.js not existing 2019-10-22 15:00:05 +03:00
Pavel Djundik 5d13e4c97d Check config owner synchronously
Fixes async warning printing during prompt when adding a user
2019-09-24 22:06:04 +03:00
Pavel Djundik 4753d58c0b Display an error on unknown command 2019-08-12 11:03:52 +03:00
Alistair McKinlay 20816d509d Add check for outdated packages, and show on the help screen. 2019-07-19 13:33:09 +01:00
Alistair McKinlay 133e7bf710 Format js/vue with prettier 2019-07-19 11:27:40 +01:00
Pavel Djundik 295b3a4251 Correctly parse numbers when passed in CLI
Fixes #3295
2019-07-12 10:56:19 +03:00
Pavel Djundik 1425130436 Update eslint and eslint-plugin-vue, fix rules 2019-06-25 11:51:47 +03:00
Pavel Djundik a9e774b13b Print a warning when running as root 2019-05-20 18:17:35 +03:00
Pavel Djundik 7c1efb18d1 Print a warning on invalid keys in config 2019-03-05 13:49:50 +02:00
Pavel Djundik c870545b46 Use require.resolve for yarn 2019-01-24 18:52:15 +02:00
Pavel Djundik 6937e6e772 Set yarn cache folder in the packages folder
Fixes thelounge/thelounge-docker#71
2019-01-16 12:51:52 +02:00