* src/gpgme-json.c (process_request): Remove 'nm_mode'.
--
This was an error in the javascript testing code. Thus the Mozilla
specs are correct that the request is send verbatim.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/gpgme-json.c (opt_debug): New.
(process_request): Add optional arg nm_mode. In this mode take the
request from a "message" object.
(native_messaging_repl): Add debug output and call process_request
in NM_MODE.
(main): Add option --debug. Parse envvar GPGME_JSON_DEBUG as an
alternative way to enable this. Use a default log file.
--
Note that the default log file is ~/.gnupg/S.gpgme-json.log .
Thus to debug a javascript application you should start
watchgnupg --time-only --force ~/.gnupg/S.gpgme-json.log
in a separate tty and then use
GPGME_JSON_DEBUG=1 firefox &
to run firefox.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/gpgme-json.c: Remove header argparse.h. Define
GPGRT_ENABLE_ARGPARSE_MACROS.
(interactive_repl): Replace strusage by gpgrt_strusage.
(my_strusage): Add SPDX level.
(main): Switch to gpgrt_argparse stuff but keep very limited
functionality when building with an older libgpg-error.
Signed-off-by: Werner Koch <wk@gnupg.org>