Hi there,
I’m in the middle of writing an app, which connects to our monitoring server, so I can receive notifications via rocket-chat. My app checks at 8am respectively 9am, if someone has claimed the role, for receiving the monitoring-notifications.
However, we sometimes have public holidays, which results in no one working on these days.
In our old bot, which was written the old way using the JavaScript SDK, which has been deprecated now, we could use the external npm package date-holidays without issues, to check if the current had any public holidays on that day, so we could prevent sending messages, that a responsible monitoring-person is missing.
Since rewriting the app with the apps-engine, I’ve noticed that this was no longer possible.
After searching the web a bit, I’ve stumbled over the Developer Docs, mentioning NPM Support:
with this in mind, I had high hopes, that the date-holidays npm-package should work.
However, after many hours wasted, I’ve came to the conclusion, that it wasn’t possible at all, to use any external NPM packages, even though mentioned in the Developer-Docs.
I’ve been trying to include the minified JavaScript files into the source of my app, but the apps-engine always complained about it being an external dependecy or not even compiling at all, because it couldn’t find the file. And since it was JavaScript, I’ve also tried to enable JavaScript-Support inside the tsconfig and increasing the ES version. None of it helped.
I’ve stumbled over a REST-API doing the same thing, but my employer doesn’t want an extra REST-API, if could be achievable via an npm-package, which I also totally understand, since someone needs to maintain the REST-API.
So: Has anyone of you got any useful hints to achieve my beloved date-holidays package inside my app? It is very crucial for the app to work and I’m not in the mood to write the complete library from scratch, nor will my employer allow it.
I would be glad for any help or hint I can get.