@@ -500,8 +500,8 @@ static void frida_python_authentication_service_do_authenticate (GTask * task, F
500500static int PyCompiler_init (PyCompiler * self , PyObject * args , PyObject * kw );
501501static PyObject * PyCompiler_build (PyCompiler * self , PyObject * args , PyObject * kw );
502502static PyObject * PyCompiler_watch (PyCompiler * self , PyObject * args , PyObject * kw );
503- static gboolean PyCompiler_set_options (FridaCompilerOptions * options , const gchar * project_root_value , const gchar * source_maps_value ,
504- const gchar * compression_value );
503+ static gboolean PyCompiler_set_options (FridaCompilerOptions * options , const gchar * project_root_value , const gchar * output_format_value ,
504+ const gchar * bundle_format_value , const gchar * type_check_value , const gchar * source_maps_value , const gchar * compression_value );
505505
506506static int PyFileMonitor_init (PyFileMonitor * self , PyObject * args , PyObject * kw );
507507static PyObject * PyFileMonitor_enable (PyFileMonitor * self );
@@ -4768,20 +4768,26 @@ static PyObject *
47684768PyCompiler_build (PyCompiler * self , PyObject * args , PyObject * kw )
47694769{
47704770 PyObject * result ;
4771- static char * keywords [] = { "entrypoint" , "project_root" , "source_maps" , "compression" , NULL };
4771+ static char * keywords [] =
4772+ { "entrypoint" , "project_root" , "output_format" , "bundle_format" , "type_check" , "source_maps" , "compression" , NULL };
47724773 const char * entrypoint ;
47734774 const char * project_root = NULL ;
4775+ const char * output_format = NULL ;
4776+ const char * bundle_format = NULL ;
4777+ const char * type_check = NULL ;
47744778 const char * source_maps = NULL ;
47754779 const char * compression = NULL ;
47764780 FridaBuildOptions * options ;
47774781 GError * error = NULL ;
47784782 gchar * bundle ;
47794783
4780- if (!PyArg_ParseTupleAndKeywords (args , kw , "s|sss" , keywords , & entrypoint , & project_root , & source_maps , & compression ))
4784+ if (!PyArg_ParseTupleAndKeywords (args , kw , "s|ssssss" , keywords , & entrypoint , & project_root , & output_format , & bundle_format , & type_check ,
4785+ & source_maps , & compression ))
47814786 return NULL ;
47824787
47834788 options = frida_build_options_new ();
4784- if (!PyCompiler_set_options (FRIDA_COMPILER_OPTIONS (options ), project_root , source_maps , compression ))
4789+ if (!PyCompiler_set_options (FRIDA_COMPILER_OPTIONS (options ), project_root , output_format , bundle_format , type_check , source_maps ,
4790+ compression ))
47854791 goto invalid_option_value ;
47864792
47874793 Py_BEGIN_ALLOW_THREADS
@@ -4808,19 +4814,25 @@ PyCompiler_build (PyCompiler * self, PyObject * args, PyObject * kw)
48084814static PyObject *
48094815PyCompiler_watch (PyCompiler * self , PyObject * args , PyObject * kw )
48104816{
4811- static char * keywords [] = { "entrypoint" , "project_root" , "source_maps" , "compression" , NULL };
4817+ static char * keywords [] =
4818+ { "entrypoint" , "project_root" , "output_format" , "bundle_format" , "type_check" , "source_maps" , "compression" , NULL };
48124819 const char * entrypoint ;
48134820 const char * project_root = NULL ;
4821+ const char * output_format = NULL ;
4822+ const char * bundle_format = NULL ;
4823+ const char * type_check = NULL ;
48144824 const char * source_maps = NULL ;
48154825 const char * compression = NULL ;
48164826 FridaWatchOptions * options ;
48174827 GError * error = NULL ;
48184828
4819- if (!PyArg_ParseTupleAndKeywords (args , kw , "s|sss" , keywords , & entrypoint , & project_root , & source_maps , & compression ))
4829+ if (!PyArg_ParseTupleAndKeywords (args , kw , "s|ssssss" , keywords , & entrypoint , & project_root , & output_format , & bundle_format , & type_check ,
4830+ & source_maps , & compression ))
48204831 return NULL ;
48214832
48224833 options = frida_watch_options_new ();
4823- if (!PyCompiler_set_options (FRIDA_COMPILER_OPTIONS (options ), project_root , source_maps , compression ))
4834+ if (!PyCompiler_set_options (FRIDA_COMPILER_OPTIONS (options ), project_root , output_format , bundle_format , type_check , source_maps ,
4835+ compression ))
48244836 goto invalid_option_value ;
48254837
48264838 Py_BEGIN_ALLOW_THREADS
@@ -4842,12 +4854,42 @@ PyCompiler_watch (PyCompiler * self, PyObject * args, PyObject * kw)
48424854}
48434855
48444856static gboolean
4845- PyCompiler_set_options (FridaCompilerOptions * options , const gchar * project_root_value , const gchar * source_maps_value ,
4846- const gchar * compression_value )
4857+ PyCompiler_set_options (FridaCompilerOptions * options , const gchar * project_root_value , const gchar * output_format_value ,
4858+ const gchar * bundle_format_value , const gchar * type_check_value , const gchar * source_maps_value , const gchar * compression_value )
48474859{
48484860 if (project_root_value != NULL )
48494861 frida_compiler_options_set_project_root (options , project_root_value );
48504862
4863+ if (output_format_value != NULL )
4864+ {
4865+ FridaOutputFormat output_format ;
4866+
4867+ if (!PyGObject_unmarshal_enum (output_format_value , FRIDA_TYPE_OUTPUT_FORMAT , & output_format ))
4868+ return FALSE;
4869+
4870+ frida_compiler_options_set_output_format (options , output_format );
4871+ }
4872+
4873+ if (bundle_format_value != NULL )
4874+ {
4875+ FridaBundleFormat bundle_format ;
4876+
4877+ if (!PyGObject_unmarshal_enum (bundle_format_value , FRIDA_TYPE_BUNDLE_FORMAT , & bundle_format ))
4878+ return FALSE;
4879+
4880+ frida_compiler_options_set_bundle_format (options , bundle_format );
4881+ }
4882+
4883+ if (type_check_value != NULL )
4884+ {
4885+ FridaTypeCheckMode type_check ;
4886+
4887+ if (!PyGObject_unmarshal_enum (type_check_value , FRIDA_TYPE_TYPE_CHECK_MODE , & type_check ))
4888+ return FALSE;
4889+
4890+ frida_compiler_options_set_type_check (options , type_check );
4891+ }
4892+
48514893 if (source_maps_value != NULL )
48524894 {
48534895 FridaSourceMaps source_maps ;
0 commit comments