So the latest releases of Verdacho, it includes a new security feature, which is rate limit. At this point, you can add rate limit to two areas, which are the web endpoints, the security endpoints, which are the login and change password. With that, you're going to use the possibility of DNL of service attack, which these are key in points. So by default are actually really set up to really low number of requests, but you can change this. So I totally recommend to use this feature if you haven't noticed it already exists.
So, end-to-end testing, which is my favorite one, which the integrity of your packages is when you are publishing a package and the structure of functionality of these models are not being affected when it's consumed by users. There are so many ways to break a package, the most common one is misconfiguration, because it does not matter how well tested your model is. There are some main steps when you are configuring to ship a package that depends on the developers, and it could be you forgot to add main field if you are trying to ship a common-JS package, or maybe you forgot the module if you are trying to use a JSON module, or maybe you forgot the right patterns on the file property in the package. Also, you might misconfigure the .npm.ignore file in the root file. There are so many things involved on shipping a package, and any mistake counts and can be cached only in publishing. For that, you need a registry. You cannot publish snapshots all the time to the public one, especially if I private packages, so I recommend to test publishing your packages on every pull request, just like a storybook is doing on this slide, for example.
Let's see an example, I can break a package that is intended to be shipped as a command-line interface. Here I have a demo, if you want to look it up later, it just prints hello world on the console, and it uses github actions, docker and node js to run small end-to-end tests. So, as you observe, this is a view of my github project, which my tests are broken on master. So, let's see quickly what's the reason, and let's fix it in a moment. So, this is my project, and if you see, there is something wrong on the config, on the package. So, let's see for a second what might be, and it seems it's thebin file. So, this file does not exist on the root, it doesn't exist. So, what we can do to fix it? Well, just using the right name, right? And, let's actually commit this file because if we... and this should actually fix the problem. So, let's commit this. No, I don't want break master, I want to fix master. Yeah, let's push these changes and then while GitHub runs the action, I will show you how I'm actually doing this test. So, if you're not familiar with GitHub Actions, it's really simple, I would totally recommend to use them. Here we have service. Service is a property that allows you to use docker images within your action. In this case I'm using the Verdacio docker image, which is the official one. I'm exposing two ports, I mean one port, which is the same. For the S73, with this you can use the registry in all the steps below.
Comments