Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Librairie simpliste pour la création de commandes CLI.
import {GCommand, Command, CommandParameters} from "kjscommand/build/index.js";
const param1 = new CommandParameters("param", "p", "Description ici", "defaut");
const param2 = new CommandParameters("superparam", "sp", "Autre description");
const command = new Command("command", "Description de la commande", [param1, param2], function(arg = {param, superparam})
{
console.log("Param1 :" + arg.param + " Param 2 :" + arg.superparam);
}
const gCommand = new GCommand("test", "Description de l'application", [command]);
gCommand.getArguments(process.argv.slice(2));
La commande se décompose comme ceci : test command --param="autre" -sp 12
GCommand
(le nom attribué doit être le même que celui du fichier de préférence)Command
qui est une sous commande de la commande globale--param=[VALEUR]` ou alors sous la forme raccourci
-p 12``Pour récupérer les paramètres il faut simplement définir dans la fonction de callback un premier paramètres qui contiendra tous les paramètres de la commande sous la forme suivante : arg. ( correspond au nom entier du paramètre)
getArguments() prend en paramètre un tableau d'arguments.
FAQs
CLI Creator
We found that kjscommand demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.