Where is the extension code?

This might be a general or a very specific question, I don’t know.

I’m using an extension called MQTT Client (advanced), by @arthuro555. It’s currently the only extension I use.

  • If I add this extension in a new, empty project, where is the code of the extension stored on my machine? (I have a Mac.)
  • Is the source code of the extension available? I want to make changes or improvements, how can I contribute? (Hypothetical; I have currently no ideas)
  • The extension is said to be a wrapper on MQTT.js. If I add the MQTT extension in a new, empty project, will I also get MQTT.js installed to my computer? If so, where will it be stored?
  • Does the extension wrap the version of MQTT.js that was available when MQTT Client (advanced)(Version 1.0.0) was published? Or does it automatically wrap a current MQTT.js?

My examples are of course very specific, but I can imagine that the same questions would be valid for other extensions that wrap 3rd party libraries.

Open the sidebar and click on the extension.

and then click open in editor

It will open a tab with all of the functions which you can open, copy, modify, etc…

Thank for the reply.

It seems that code from the GitHub repository GitHub - mqttjs/MQTT.js: The MQTT client for Node.js and the browser is copied into line 28 of the function onFirstSceneLoaded in the MQTT Client (advanced) extension. This is a very long line; when re-formatted with proper line breaks, it corresponds to close to 6000 lines of code.

It’s possible find code fragments that exist in both this line 28, and in the MQTT.js repository, but the code in the extension has a different form, all of it being a part of a large function definition. This makes it next to impossible to, for example, see if bug fixes in the MQTT.js code have been incorporated into the extension code. I have been unable to find out which version of MQTT.js that has been incorporated into the MQTT Client extension. It doesn’t seem feasible to replace it with the latest version, since I have no idea how to change it into the form needed by the extension.

Is this way of wrapping external code standard practice for GDevelop extensions?

To answer another of my original questions: the code of the extension is stored in my computer, as a part of the GDevelop project file my_project_name.json, including the re-structured MQTT.js code.

yes

that is a standard way of shipping javascript code. the repo rarely contains code intended for direct use, the built code for consumer use is located in the npm package. you can explore and copy that code from the npm package using a tool like unpkg or jsdelivr:

I forgot, but I’d hazard a guess that its probably either one of the most recent v4 versions or one of the earliest v5 versions

I submitted an update to the latest MQTT.js version

What is “the original test project”?

the project that had originally been used to test the extension when it had been first submitted