Creating a fat jar for plugins
The plugins should be completely independent of the appsmith-server. Earlier, the plugins were picking their dependencies from the main appsmith-server maven module.
Now using the maven-shade-plugin, they are an independent entity and completely self sufficient. The only exception is restapi-plugin & rapidapi-plugin because they inherit from spring-boot-starter which is not compatible with the maven-shade-plugin.
See merge request theappsmith/internal-tools-server!377
Remove the query field in ActionConfiguration and use body instead
The client code is getting complicated because of the difference in SQL and non-SQL handling of the query field in actionConfiguration. If we expect the request to be sent in the `body` field, the plugin can parse the String body however it feels like.
See merge request theappsmith/internal-tools-server!340
This is to simplify the query pane on the frontend client. The client doesn't need to have separate interfaces for sql and non-sql plugins. All queries will be sent to the server in the form of a String that is parsed in different formats based on the plugin.
Also adding test cases for PostgresPlugin. Used TestContainers to simulate the postgres db in Docker inside the Java test itself. Very useful.
Handling form data via the field bodyFormData in ActionConfiguration
This is because the client sends us the data for form-data in the form of a list of Property fields with keys and values. This is consistent with how the client stores & renders headers & query parameters as well.
For MediaType application/x-www-form-urlencoded we will use the bodyFormData field.
See merge request theappsmith/internal-tools-server!370
This is because the client sends us the data for form-data in the form of a list of Property fields with keys and values. This is consistent with how the client stores & renders headers & query parameters as well.
For MediaType application/x-www-form-urlencoded we will use the bodyFormData field.
Modifying the default page name to Page1
Also creating a default empty layout when a new page is created. This ensures that the client can show the default message on new page creations.
See merge request theappsmith/internal-tools-server!363
Adding dynamicBinding to Action
Also adding the status code to ActionExecutionResult when plugin returns with an error.
See merge request theappsmith/internal-tools-server!356
Use sequences for numbering new datasources.
Introduces a new collection in the database, `sequence`. We intend store one document per domain collection (hence a unique index on `name` field), which has a sequence number. The number is *always* set to a value that can be used next and never been used before (hence the human-readable-name `nextNumber`). Of course, this holds true only if the collection is accessed through `SequenceService.getNext(DomainClass.class)`.
This MR also includes two migrations. One for adding a unique index on `sequence.name`. Another for setting an initial value for the `nextNumber` for datasources, such that the next new datasource has a unique name. We are computing this value based off of the existing datasources named `Untitled Datasource <number>`, finding the highest number in the names and incrementing it.
See merge request theappsmith/internal-tools-server!351
Adding the ForwardedHeaderTransform bean to enable spring to parse...
Adding the ForwardedHeaderTransform bean to enable spring to parse X-Forwarded-* headers from Nginx proxy
See merge request theappsmith/internal-tools-server!344
Fixing bug where duplicate headers were being set in the action execution result
Also removing empty headers from being sent to the action
See merge request theappsmith/internal-tools-server!337
Request body and header in Action Execution Response
The actionService.execute() flow now sets the request body and header in the action execute response.
Will help the user debug the action better.
See merge request theappsmith/internal-tools-server!336
Automatically use a unique name for creating datasources without name.
In the request from frontend for datasource creation, if the data
doesn't have a `name` value, we now set it to an automatically numbered
value and save with that.
See merge request theappsmith/internal-tools-server!333
In the request from frontend for datasource creation, if the data
doesn't have a `name` value, we now set it to an automatically numbered
value and save with that.