PromucFlow_constructor/app/server/appsmith-server
Abhijeet 32e8224120
feat: Update existing app via JSON import (#22684)
## Description

When a user wants to develop in an instance and deploy in another, the
only way to update an app is via Git. In scenarios where this is not
possible (either in Airgapped scenarios or due to the user's choice),
the user cannot update the deployed app. This PR allows a user to update
an existing app via JSON import. The original references will be
maintained where applicable

> TL;DR: Provide a way to update the existing application via JSON
import in situations where Git sync is not an option.

Fixes #22075 

### How to test?
1. Create a new workspace `WS1`
2. Create new app
3. Generate CRUD page
4. Export the application
5. Create new workspace lets's call this as `WS2` and import the
exported app from step 4
6. Create another page `pageCreatedInWS2` in imported application in
`WS2`
7. Export the updated application from `WS2`
8. Update existing application created in step 2 in `WS1` by importing
the application which is exported from `WS2` in step 7
9. Updated application should have `pageCreatedInWS2` page

```
Curl for ref:
 curl --location '{{base_url}}/api/v1/applications/import/{{workspaceId}}?applicationId={{applicationId}}' \
--header 'Cookie: SESSION={{cookieSessionId}}' \
--header 'X-Requested-By: Appsmith' \
--form 'file=@{{JSON_FILE_TO_IMPORT}}'
```

## Type of change

- New feature (non-breaking change which adds functionality)
- This change requires a documentation update


## How Has This Been Tested?
- Manual
- JUnit

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-04-27 22:55:07 +05:30
..
src feat: Update existing app via JSON import (#22684) 2023-04-27 22:55:07 +05:30
auth-notes Convert the project into a multi-module structure 2019-09-16 11:21:57 +00:00
pom.xml chore: Upgrading graphql dependency (#21809) 2023-04-14 16:36:50 +05:30