jake87
bcc25047f2
Readded config file editing, working on config file value setting
2021-11-13 22:35:15 +11:00
jake87
6013fcd528
Started rework of file loading system
2021-11-06 17:04:34 +11:00
jake87
71fb8541d5
Added more comments, added quotes around strings
2021-11-06 14:32:13 +11:00
jake87
4398d33fea
Fixed definitions to be consistant with bullet points.
2021-11-05 23:32:18 +11:00
jake87
92814aa9b3
Reworked to use config list's grabber system
...
Also now using the system described by Hornwitser, in using
libConfig.MasterConfig.groups to get definitions. Now all that's needed
is to re-read the updated data back into clustorio.
2021-11-05 23:24:13 +11:00
jake87
08a8182173
Reworked to use throw error, added system for getting config groups
...
Now using `throw error` to exit out, instead of exit(1). Reworked config
get system to use the map of configs in libConfig.MasterConfig.groups .
2021-11-01 20:40:44 +11:00
jake87
77e9b929dc
Testing why config not being returned correctly
2021-10-30 12:31:20 +11:00
jake87
b6306031dc
Reworked some of editor logic to work with async functions
...
Now async functions can be used after the editor returns, as before they
couldnt be used due to .on being non-async.
2021-10-29 22:21:46 +11:00
jake87
0564eee400
Experementing with the master config
...
no important work, commit for my own sake
2021-10-29 22:09:01 +11:00
jake87
f548ac2ecc
Added more logic into ctl.js
...
Now prints out a basic approximation of the final look of the config
file; with comments on the function of each part.
2021-10-29 20:42:32 +11:00
jake87
c9fd99589b
Added more selection options for the edit
...
ctl master config edit [editor]
is the new structure; it can take an optional editor, and will prio this
editor over any other editor, such as one set by env vars. Generally,
the prio goes like this: argv supplied editor > EDITOR env var > VISUAL
env var. Things needing to be done are marked with a TODO.
2021-10-27 20:16:37 +11:00
jake87
23d8a819af
Added basic framework for edit command
...
Implimented framework for edit command, including ability to get a temp
file, open an editor on the file, then resume code execution once the
editor exits.
2021-10-26 21:23:23 +11:00
jake87
14b3331c8e
Added basic logic for config edit command
...
Added groundwork for the ctl master config edit command,
including temporary file grabbing and JSON config fetching.
2021-10-26 20:46:24 +11:00
jake87
f266c441db
Fixed async logic within lib/file_ops.js
2021-10-26 20:46:24 +11:00
jake87
ed73e3ad1e
Fixed variable naming issue with file_ops.getTempFile
2021-10-26 20:46:05 +11:00
jake87
4f9a8fb45c
Rewrote temp function to be safer, using findUnusedName
2021-10-26 17:50:39 +11:00
jake87
6910737374
Added function in lib/file_ops.js to return a temp filename with salt
2021-10-25 21:58:56 +11:00