]> git.kaiwu.me - njs.git/commitdiff
QuickJS: added xml to nginx modules.
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 3 Apr 2025 00:47:10 +0000 (17:47 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Fri, 4 Apr 2025 05:20:32 +0000 (22:20 -0700)
Missed in cec9a1650.

nginx/config
nginx/ngx_http_js_module.c
nginx/ngx_js.h
nginx/ngx_stream_js_module.c

index 2edf7a3d7da2def70598d8419ad17aa9ef1e39c8..03ec03d0cbdcfd7c4b132b68b5691866264a3205 100644 (file)
@@ -129,6 +129,10 @@ if [ $NJS_LIBXSLT != NO ]; then
     have=NJS_HAVE_XML . auto/have
     NJS_SRCS="$NJS_SRCS $ngx_addon_dir/../external/njs_xml_module.c"
 
+    if [ "$NJS_HAVE_QUICKJS" = "YES" ];  then
+        NJS_SRCS="$NJS_SRCS $ngx_addon_dir/../external/qjs_xml_module.c"
+    fi
+
     echo " enabled xml module"
 fi
 
index 0c8215c56379b521b8338d9e22a89045175e49bd..5a131bc9a6e13fbad0496cb033ab5cf7fc97e1c3 100644 (file)
@@ -1140,6 +1140,9 @@ qjs_module_t *njs_http_qjs_addon_modules[] = {
 #ifdef NJS_HAVE_OPENSSL
     &qjs_webcrypto_module,
 #endif
+#ifdef NJS_HAVE_XML
+    &qjs_xml_module,
+#endif
 #ifdef NJS_HAVE_ZLIB
     &qjs_zlib_module,
 #endif
index 51b8916cc7d5bab328d53c82d8367393f051b047..0a99a6964c309efdb73171aa4d8db660434cc05e 100644 (file)
@@ -378,6 +378,7 @@ ngx_int_t ngx_qjs_string(JSContext *cx, JSValueConst val, ngx_str_t *str);
     ((ngx_js_external_ctx_pt) ngx_qjs_meta(cx, 11))(e)
 
 extern qjs_module_t  qjs_webcrypto_module;
+extern qjs_module_t  qjs_xml_module;
 extern qjs_module_t  qjs_zlib_module;
 extern qjs_module_t  ngx_qjs_ngx_module;
 extern qjs_module_t  ngx_qjs_ngx_shared_dict_module;
index b1e175d26ca81c8fb61625e20a7ffa7ce0dcf667..44c7af17daabb9b84991e7d5e352ae5a4412fce7 100644 (file)
@@ -841,6 +841,9 @@ qjs_module_t *njs_stream_qjs_addon_modules[] = {
 #ifdef NJS_HAVE_OPENSSL
     &qjs_webcrypto_module,
 #endif
+#ifdef NJS_HAVE_XML
+    &qjs_xml_module,
+#endif
 #ifdef NJS_HAVE_ZLIB
     &qjs_zlib_module,
 #endif