Commit graph

343 commits

Author SHA1 Message Date
Matthijs Kooijman
c5314fe17a custom-module: Call reload() function on auto-reload
This allows modules to re-initialize any state they need whenever the
module is reloaded.

Without this, any such initialization can also be done in the top
level of the custom module, but this has two problems:

 1. Top-level module code runs on load and reload, and for the initial
    load, it runs *before* the connections are set up, so trying to use
    send() would produce an error on load (not reload).

 2. Top-level module code runs for the primary custom module, but also
    for any nested modules, removing control about the process and
    ordering from the primary custom module. In addition, a module that
    can be used both as primary and nested module, there is no clean way
    to distinguish between these cases.

Both of these problems can be solved by doing some bookkeeping in the
global object, but that produces messy code.

This commit allows modules to define a reload() function, which is
called (for the primary module only) after the module is reloaded. This
means that any initialization for the first load can be done in init()
and for reloads in reload(), and in both cases all connections will
already have been set up solving issue 1. In addition, neither of these
functions are called for nested modules, solving issue 2 (and the
primary module can then stil explicitly call a reload function on nested
modules if needed, as shown in the examples).
2024-06-18 09:37:01 +02:00
jean-emmanuel
ac995b2dd1 lint 2024-04-03 10:01:05 +02:00
jean-emmanuel
20d5091622 server: fix cookie parsing (user resources not loading when using an external browser) 2024-04-03 08:47:19 +02:00
jean-emmanuel
1a4b971b18 mac: unable to show launcher windows when starting minimized 2024-02-22 09:29:35 +01:00
jean-emmanuel
3ed11f3894 custom-module: expose tcpServer 2024-02-21 10:52:40 +01:00
jean-emmanuel
f78814ba45 launcher: start hidden on mac is "start minimized" is set 2024-02-21 10:10:55 +01:00
jean-emmanuel
690add4b38 server: fix config file read/write initial check 2024-02-04 09:57:22 +01:00
jean-emmanuel
9181c2a3aa remote control: /EDIT* commands sent by a custom module are not affected by the server's read-only option anymore 2024-01-17 16:05:03 +01:00
jean-emmanuel
4ef3595125 server: print config file read error 2023-11-23 09:42:32 +01:00
jean-emmanuel
3e74271e12 code editor: update ace (use upstream), update syntax (es7), do some cleanup, prevent middle clicking (causes issues on linux) 2023-09-08 18:08:54 +02:00
jean-emmanuel
04e4e95c04 ipc: fix --authentication on iOS clients (don't rely on headers to pass credentials)
misc: remove "new Buffer()" deprecation warning
2023-09-06 23:44:21 +02:00
jean-emmanuel
90b34d7475 custom module: receive() not passing boolean arguments properly 2023-08-30 13:13:29 +02:00
jean-emmanuel
afeb726ddb cli: electron might take a capital E, take it into account when parsing args 2023-07-02 16:09:12 +02:00
jean-emmanuel
6954727196 server: --client-size and --client-position options not parsed correctly 2023-04-15 13:23:12 +02:00
jean-emmanuel
a93d27f08e server: print multiple qrcodes if multiple network interfaces are available and prevent printing a qrcode for the localhost address 2023-04-06 00:35:11 +02:00
jean-emmanuel
b480889b70 custom module: add optional errorCallback argument toloadJSON and saveJSON 2023-04-05 22:57:50 +02:00
jean-emmanuel
9b2fa156ac midi: bump version 2023-03-15 08:42:05 +01:00
jean-emmanuel
23ca4ac9a7 misc: add css classes to some notification popups to allow targetting them with css themes 2023-03-10 10:09:06 +01:00
jean-emmanuel
81b6ca0557 custom module:don't restrict file extension in loadJSON() and saveJSON functions 2023-03-05 01:27:12 +01:00
jean-emmanuel
885886d0c9 midi: optional nrpn/rpn packing/unpacking 2023-01-31 16:10:20 +01:00
jean-emmanuel
abcd214114 lint 2022-12-25 17:37:13 +01:00
jean-emmanuel
3fd9c694ce image: add support for special value "qrcode" 2022-12-25 17:33:18 +01:00
jean-emmanuel
cebca61e30 qrcode: optional (cli) and on demand (launcher) 2022-12-25 17:17:08 +01:00
jean-emmanuel
454884eb81 custom module: fix autoreload on nested submodules 2022-11-29 16:58:48 +01:00
jean-emmanuel
6ef1d412f9 custom module: expose global object that persists accross module reloads. 2022-11-29 08:36:09 +01:00
jean-emmanuel
ddcf186a66 custom module: prevent error when module.exports is not defined 2022-11-29 08:02:11 +01:00
jean-emmanuel
738df79708 qrcode pr: refactor for terminal compatibility 2022-11-26 18:34:36 +01:00
jean-emmanuel
924b3c924e misc: rename launcher>->server event 2022-11-26 18:33:53 +01:00
ameisso
b2dced4cda New : adapted colors 2022-11-26 02:39:00 +01:00
ameisso
76aef5cb96 New : print all addresses 2022-11-26 02:27:44 +01:00
ameisso
c78cda3c40 New : print qrCode of the last IP 2022-11-25 19:22:06 +01:00
jean-emmanuel
2552dd187e fragment: add fallback property 2022-11-09 10:14:54 +01:00
jean-emmanuel
c7ce398632 terminal: colorize debug messages for in/out messages 2022-11-09 09:22:53 +01:00
jean-emmanuel
d6a864fe71 launcher: add Start minimized menu option 2022-11-09 08:45:22 +01:00
jean-emmanuel
2164964116 cli: add --client-size & --client-position options 2022-11-07 10:26:05 +01:00
jean-emmanuel
74f6c289e5 builtin client:change noFocus client option behavior: the defalt client window now doesn't take the focus at all, even when a text input is clicked. 2022-11-01 18:11:49 +01:00
jean-emmanuel
74198c07d7 theme: avoid server-side parsing error with --color-background 2022-10-22 21:31:09 +02:00
jean-emmanuel
48ad73911d server: fix loading client script source map 2022-10-18 15:07:01 +02:00
Eric Theise
e5d3ccf7b5 Change occurrences of 'catched' to 'caught'. 2022-10-13 06:12:39 -07:00
Eric Theise
5301e2507a Typos and grammatical (English) cleanups. Changes made to comments and text output, not css classes or variable names. 2022-10-12 13:01:18 -07:00
jean-emmanuel
d208644e39 midi: on Mac, name virtual ports after the device name to avoid confusion 2022-10-04 11:38:29 +02:00
bordun
262e1861a9 midi: bump version 2022-07-04 11:38:14 +02:00
bordun
6321e99a11 lint: indent 2022-06-01 15:00:44 +02:00
bordun
b7e7530c12 main: hide no gui message when running osc server process 2022-06-01 14:59:36 +02:00
bordun
3884188df9 server: solve file resolving issue (osc assets vs user assets) 2022-06-01 14:56:50 +02:00
bordun
275ea3c14b windows: allow accessing other drives than the default one (list drives when the file browser reaches the filesystem's root) 2022-05-31 15:16:17 +02:00
bordun
976c2c2040 server: yargs update breaking things again 2022-05-30 15:40:11 +02:00
jean-emmanuel
f61560d4cf lint: no return outside function 2022-05-22 18:28:04 +02:00
jean-emmanuel
15361f67b7 package: upate most dependencies 2022-05-22 16:44:32 +02:00
jean-emmanuel
1368a109c2 server: put app assets in a private folder to let users use "client" and "assets" as folder names 2022-05-22 12:32:10 +02:00