0.0.1 • Published 12 months ago

@stageconsulting/krivo v0.0.1

Weekly downloads
-
License
Proprietary
Repository
-
Last release
12 months ago

Spectra CLI

Spectra scans the code heuristically for information about packages, tests, and endpoints. To find more information about the architecture please see the Figma Diagram for more information

Contributing

If you want to work on this project or add some kind of contribution, please check the CONTRIBUTING.md file in that repository, there you will find detailed information on how to work on this project.

What is it?

Spectra is a cloud-native analytics and security platform, covering several areas of your application such as:

  • Analysis of Open-Source code - Analysis of all installed modules and their dependency trees, analyzing their respective versions together with the NPM registry server. - Versioning validation - Information of unused modules
  • Unit Test Analysis - Integration with tools like Jest, Mocha, Jasmine and Tap - Analysis of test formats preventing bad practices in the creation of such tests, such as direct tests of the type: expect(true).toBe(true) - Complete and detailed information about code coverage.
  • Endpoint detection - Analysis of the platform being used (At the moment the only supported one is NestJS) - Information of all detected Endpoints, GETs, POSTs, PUTs and etc... - Detailed information of the parameters that need to be passed and their respective formats - Analysis of specific classes, interfaces and types and how they are passed via URL request. - Information from such structures on whether or not they are used
  • Code style analysis - Integration with ESLint and Prettier. - Code style error information with file, row and column breakdown. - Error severity information. - Detection of console.log in code

Making the code run

Please, dont use Yarn... I know you love it but I dont want to deal with multiple lock files. So, to install this repo runs:

npm install

Now, in order to make the repository works in your machine, you need to link the code, so NPM will add the bin folder into the ENV PATH.

npm link

To test, run the repository in development mode. Why? Simple, because this will generate the build file without release a new version.

npm run build:dev

After this you can use the command spectra on your terminal.

For windows Users

If you get an error like this:

spectra File <location> cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ spectra
+ ~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

You can run this command:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

This will allow you to use npm CLIs on your computer.