appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

feat: add endpoints for custom JS library add / remove / get

Open sumitsum opened this issue 3 years ago • 2 comments

Description

  • The PR adds REST API endpoints to enable the following:
    • add a new custom JS library to application (PATCH request)
    • remove a previously added custom JS library from application (PATCH request)
    • get a list of all installed custom JS libraries in an application (GET request)
  • List of custom installed JS libraries is added to the Application class.
  • This PR introduces new controller and repository classes for custom JS lib related operations.
  • Instead of fetching / updating the entire domain object, only the custom JS lib related objects are fetched / updated.
  • Please note that the JUnit test cases will be added separately. It is tracked here.
  • TODO: The following action items will be picked up ASAP, however these action items will not be treated as a blocker to the feature since all features promised as part of Custom JS Lib project will still be fully functional without the presence of these items:
    • check if add or remove end point implementations can directly update the DB array instead of fetching the array, updating them and writing back. Otherwise, wrap the function in a lock so that simultaneous updates don't cause inconsistency. It is tracked here.
    • check if import / export feature works fine with the new changes. Tracked here.
    • check if git sync feature works fine with the new changes. Tracked here.

Fixes #18155 #18156 #18157 #18158

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Manual
  • JUnit TC will be picked up ASAP. It is tracked here.

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
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] 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

sumitsum avatar Nov 17 '22 06:11 sumitsum

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
appsmith ⬜️ Ignored (Inspect) Dec 12, 2022 at 10:22AM (UTC)

vercel[bot] avatar Nov 17 '22 06:11 vercel[bot]

Deployment failed with the following error:

Resource is limited - try again in 26 minutes (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar Nov 22 '22 04:11 vercel[bot]

Closing this since we have directly merged the change into release via PR: https://github.com/appsmithorg/appsmith/pull/18904

sumitsum avatar Dec 19 '22 04:12 sumitsum