appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Feature] Import Custom JS libraries into Appsmith

Open areyabhishek opened this issue 4 years ago • 85 comments

Summary

Import additional JS libraries that I can use. Creating this issue as a placeholder

  • Support CDN based and JS SDK

List of library support requested by users

  • jsPDF
  • https://www.npmjs.com/package/node-forge
  • firebase-admin
  • segment library
  • https://github.com/digitalbazaar/forge
  • firebase-auth
  • JsonPath
  • supabase js client for authentication and signup flows.
  • mParticle
  • Amplitude
  • Datadog
  • mathjax
  • Danfo JS
  • CryptoJS
  • UZip
  • JWT
  • ESRI js
  • axios

Please mention the library you would like to use with Appsmith using this feature.

Front logo Front conversations

areyabhishek avatar Jan 04 '21 12:01 areyabhishek

A great reason why this feature is really important instead of us supporting different functions within the platform https://github.com/lodash/lodash/issues/5130#issuecomment-840494799

Nikhil-Nandagopal avatar May 15 '21 08:05 Nikhil-Nandagopal

+1 for this request I'd like to be able to import custom JS library in the header I am trying to create a PDF label from custom data but I don't think it's possible as of now unless I can import jsPDF library.

vishaldfreak avatar Jun 11 '21 03:06 vishaldfreak

A user has a need for node forge to be added. @hetunandu for the time being can we quickly add this to our list of default libs? https://www.npmjs.com/package/node-forge

Nikhil-Nandagopal avatar Jul 02 '21 13:07 Nikhil-Nandagopal

A user has a need for node forge to be added. @hetunandu for the time being can we quickly add this to our list of default libs? https://www.npmjs.com/package/node-forge

Yes, it would be great to have a custom import for this 'node-forge' library for authentication workflows.

tomjose92 avatar Jul 02 '21 13:07 tomjose92

@Nikhil-Nandagopal Is there a way to add such libraries from the UI ?

anvaynk avatar Jul 02 '21 14:07 anvaynk

@anvaynk we're currently working on the ability to add it from the UI. For now we're simply adding libraries on a case by case basis.

Nikhil-Nandagopal avatar Jul 02 '21 14:07 Nikhil-Nandagopal

Sounds good. Thanks!

anvaynk avatar Jul 02 '21 14:07 anvaynk

Waiting to get this feature out. Any update?

vishalvijay avatar Jul 17 '21 07:07 vishalvijay

@vishalvijay we are working to launch this. Could you tell us the libraries you'd like to use? We can include them for you

areyabhishek avatar Jul 17 '21 08:07 areyabhishek

Thanks for reply @areyabhishek

firebase-admin is something we use commonly.

vishalvijay avatar Jul 17 '21 15:07 vishalvijay

Another user reported wanting to add firebase admin

Nikhil-Nandagopal avatar Aug 02 '21 06:08 Nikhil-Nandagopal

Another user has requested this feature

Nikhil-Nandagopal avatar Oct 28 '21 09:10 Nikhil-Nandagopal

PlaySimple would like to integrate the segment library using this feature

Nikhil-Nandagopal avatar Oct 28 '21 14:10 Nikhil-Nandagopal

in a self hosted environment , how can I import libraries?

morandalex avatar Nov 26 '21 09:11 morandalex

@morandalex unfortunately there is no way to do this right now. We will be working on this feature in Q1 of next year

Nikhil-Nandagopal avatar Nov 26 '21 09:11 Nikhil-Nandagopal

+1 For this. My need is to add the crypto library for generating secure random tokens inside the application

R-Peleg avatar Nov 29 '21 08:11 R-Peleg

@R-Peleg we have forge included which has some functions to generate secure tokens. Does this work for you? You can use it as {{forge.sha256.create().update("test").digest().toHex()}} This is the documentation for the library https://github.com/digitalbazaar/forge

Nikhil-Nandagopal avatar Nov 30 '21 05:11 Nikhil-Nandagopal

A user wants to add https://ably.com

Nikhil-Nandagopal avatar Dec 14 '21 14:12 Nikhil-Nandagopal

I'm using Supabase... but without the ability to import the supabase JS library.. it becomes a glorified cloud-hosted postgres instance.... so what's the point of using supabase instead of just hosting my own postgres instance anymore?

paulochang avatar Dec 16 '21 12:12 paulochang

@paulochang exact same situation here. I'm not even sure that it's possible to authenticate with Supabase without using their lib..

benjamin-kirkbride avatar Dec 17 '21 21:12 benjamin-kirkbride

One of the users on discord wanted to use https://github.com/nextapps-de/winbox inside Appsmith which needs this feature and also support for custom CSS addition as some libraries also need that.

https://discord.com/channels/725602949748752515/725609493974614076/922053078042165278

rishabhrathod01 avatar Dec 20 '21 10:12 rishabhrathod01

I'd be keen to add in https://unpkg.com/mqtt/dist/mqtt.min.js for MQTT communication via WebSockets.

An alternative solution would be some kind of WebSocket data source.

tomhollingworth avatar Dec 28 '21 21:12 tomhollingworth

We have a request to send encrypted and signed messages to a persistent database and can only be done with a specific library. If we can somehow have support on this, that would be extremely great. :)

alvin-reyes avatar Dec 30 '21 22:12 alvin-reyes

questo interessa anche a me

billyrudi avatar Jan 02 '22 11:01 billyrudi

We have a use case where we have image and pdf files to package into a zip folder and initiate a download. If we could import libraries like JSZip, that would be great help for us. Especially with the new JS Editor on appsmith. Thanks! My use case at this moment involves only public JS libraries.

jingrenlim avatar Jan 04 '22 06:01 jingrenlim

I need to install the AWS SDK so I can write custom data sources, using the JS Object feature in Appsmith.

I would like to build my own self-hosted AWS Management Console replacement, using Appsmith, since the AWS Management Console UI is terrible.

Appsmith looks really slick! Just learned about it a few moments ago and spun it up with Docker Compose, in seconds. šŸš€šŸš€šŸš€

pcgeek86 avatar Jan 27 '22 02:01 pcgeek86

It's currently impossible to communicate to any Google service which requires a signed JWT from a service account. This means it's impossible to consume API endpoints, cloud functions, etc. that are protected by an IAM service account.

The first step to solving this is being able to generate a signed JWT using a service account private key which means there's a need to import a third-party library for support. I'm sure there's more required - but this feature at least starts the process.

jmgilman avatar Jan 27 '22 04:01 jmgilman

I'm using Supabase... but without the ability to import the supabase JS library.. it becomes a glorified cloud-hosted postgres instance.... so what's the point of using supabase instead of just hosting my own postgres instance anymore?

Yeah @Rishabh-Rathod , there are a lot of no-code/low-code backends platforms (perfect to pair with appsmith) that have their own js SDK.

Might it be easier to allow import of js lib from CDN instead of "installing"?

marino-t avatar Feb 01 '22 14:02 marino-t

Hey folks! thank you for your attention on this issue. We're still wrapping up our current JS Editor which was a massive project but we'll be picking this up right after that!

Nikhil-Nandagopal avatar Feb 02 '22 07:02 Nikhil-Nandagopal

I’m waiting to use this

billyrudi avatar Feb 11 '22 19:02 billyrudi