@slimio/psp
v0.12.3
Published
Analyze compliance with the structural policy of a SlimIO project
Downloads
43
Readme
Project structure policy
SlimIO - Project Structure Policy. A policy aims to accurately describe the constituent elements of a project. This CLI has been created to apply the following Specification.
⚠️ This project has been created for SlimIO (it will not work outside). Feel free to replicate the idea / core concept.
Requirements
- Node.js v12 or higher
- a SlimIO Manifest file at the root of the scanned project.
Getting Started
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i @slimio/psp
# or
$ yarn add @slimio/pspUsage example
When installed globally the psp executable will be exposed in your terminal.
$ pspIf you want to continue the execution even for critical warnings, just run with force mode:
$ psp --forceArguments
| name | description | | --- | --- | | -h --help | Show help | | --force | Enable force mode | | --gitignore | Show .gitignore file | | --npmignore | Show .npmignore file | | --editorconfig | Show .editorconfig file |
API
PSP is available in API mode too.
const psp = require("@slimio/psp");
async function main() {
const { warn, crit } = await psp({
forceMode: true, // <-- stay to true (else it will exit the process on CRIT).
CWD: "./dir",
isCLI: false, // <-- stay to false (else it will work as it was executed as a CLI).
verbose: false
});
console.log(`warn => ${warn}, crit => ${crit}`);
}
main().catch(console.error);Get a global overview of many projects
The SlimIO Sync project allow to run a command to get a global overview of warnings of all projects in the current working dir.
Dependencies
|Name|Refactoring|Security Risk|Usage| |---|---|---|---| |@slimio/is|Minor|Low|JavaScript Type checker| |@slimio/manifest|Minor|Low|SlimIO Manifest manager| |boxen|Minor|High|TBC| |estree-walker|⚠️Major|Low|Simple utility for walking an ESTree-compliant AST| |file-ignore-parser|Minor|Low|Parse .ignore file| |file-normalize|⚠️Major|Low|File normalizer| |globby|Minor|High|TBC| |js-yaml|⚠️Major|Low|YAML parser/writer| |kleur|Minor|Low|color for TTY| |make-promises-safe|⚠️Major|Low|Force Node.js DEP00018| |marked|Minor|Low|TBC| |meriyah|Minor|Low|TBC| |sade|Minor|Low|Sade is a small but powerful tool for building command-line interface (CLI) applications for Node.js that are fast, responsive, and helpful!| |semver|⚠️Major|Low|Semver parser/utilities for node|
License
MIT
