SKY UX and 'tedious' (SQL Server connection)

Has anyone tried to make SKY UX work with 'tedious' module? 


I am working on building a Constituent Dashboard Add-in pulling additional data from our SQL Server data warehouse based on the context (recordId). I've built some JS functions I can run in node, then "translated" them to ts to include them in the add-in project. The function is using 'tedious' module, a pure JavaScript implementation of the TDS protocol used to interact with SQL Server. However whenever I try to import 'tedious' module to my add-in spa, skyux build can't resolve several modules, dns, tls, fs, net among them. Searching through stackoverflow I found this: https://stackoverflow.com/questions/51541561/module-not-found-cant-resolve-dns-in-pg-lib/64051156 


In short, tedious is using promises that can only be used on the server-side, so webpack is trying to bundle things for the client that can only be used in the server. However, although the implementation depends on them, it does not require them to work. So it looks like there are workarounds for angular that can solve the problem, one involves specifying externals in webpack.config.js, the other one faking existence of the modules. Neither of them seems to work with skyux builder. 


I would also love to hear any other ideas how to pull and incorporate external SQL Server data in SKY Add-ins without building web services and/or my own API. Thank you

Comments

  • I don't know if this answers your question.  I am using SSIS to connect with our instance of RE NXT.  I use a plug in for Visual Studios to connect to Blackbaud, using the SKY APIs.  The plug in is Cozyroc (www.cozyroc.com).  They have rest connectors and it has eliminated the need to call the individual APIs.  When viewed in Visual Studio, it looks like tables.  I've been able to load parts of the constituent table into our local copy of SQL server.  The table structure isn't exactly like the database tables used to run RE 7.  You have to add the Cozyroc application into your instance of RE/FE NXT.  The application is not in the Blackbaud marketplace but the application ID is available on the Cozyroc web site.
  • I ended up building my own web server in Node that manages routes and processes requests from the tile sending response with the data I need to display. It's probably a safer solution than encoding SQL Server requests directly in the tile. Thank you for the suggestion. 

Categories