Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spinajs/cli

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/cli - npm Package Compare versions

Comparing version 2.0.252 to 2.0.253

14

lib/cjs/index.js

@@ -43,7 +43,11 @@ "use strict";

this.Log.trace(`Found command ${cmd.name}`);
const cMeta = Reflect.getMetadata(decorators_js_1.META_COMMAND, cmd.instance);
const oMeta = Reflect.getMetadata(decorators_js_1.META_OPTION, cmd.instance);
const aMeta = Reflect.getMetadata(decorators_js_1.META_ARGUMENT, cmd.instance);
const cMeta = Reflect.getMetadata(decorators_js_1.META_COMMAND, cmd.type);
const oMeta = Reflect.getMetadata(decorators_js_1.META_OPTION, cmd.type);
const aMeta = Reflect.getMetadata(decorators_js_1.META_ARGUMENT, cmd.type);
if (!cMeta) {
this.Log.warn(`Command ${cmd.name} is not marked as command. Use decorators to add description to command`);
continue;
}
const c = commander_1.program.command(cMeta.nameAndArgs, cMeta.description, cMeta.opts);
oMeta.forEach((o) => {
oMeta?.forEach((o) => {
if (o.required) {

@@ -56,3 +60,3 @@ c.requiredOption(o.flags, o.description, o.parser, o.defaultValue);

});
aMeta.forEach((a) => {
aMeta?.forEach((a) => {
c.argument(a.name, a.description, a.parser, a.defaultValue);

@@ -59,0 +63,0 @@ });

@@ -26,7 +26,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

this.Log.trace(`Found command ${cmd.name}`);
const cMeta = Reflect.getMetadata(META_COMMAND, cmd.instance);
const oMeta = Reflect.getMetadata(META_OPTION, cmd.instance);
const aMeta = Reflect.getMetadata(META_ARGUMENT, cmd.instance);
const cMeta = Reflect.getMetadata(META_COMMAND, cmd.type);
const oMeta = Reflect.getMetadata(META_OPTION, cmd.type);
const aMeta = Reflect.getMetadata(META_ARGUMENT, cmd.type);
if (!cMeta) {
this.Log.warn(`Command ${cmd.name} is not marked as command. Use decorators to add description to command`);
continue;
}
const c = program.command(cMeta.nameAndArgs, cMeta.description, cMeta.opts);
oMeta.forEach((o) => {
oMeta?.forEach((o) => {
if (o.required) {

@@ -39,3 +43,3 @@ c.requiredOption(o.flags, o.description, o.parser, o.defaultValue);

});
aMeta.forEach((a) => {
aMeta?.forEach((a) => {
c.argument(a.name, a.description, a.parser, a.defaultValue);

@@ -42,0 +46,0 @@ });

{
"name": "@spinajs/cli",
"version": "2.0.252",
"version": "2.0.253",
"description": "SpinaJS command line module",

@@ -45,7 +45,7 @@ "main": "lib/cjs/index.js",

"dependencies": {
"@spinajs/configuration": "^2.0.252",
"@spinajs/di": "^2.0.252",
"@spinajs/exceptions": "^2.0.252",
"@spinajs/log": "^2.0.252",
"@spinajs/reflection": "^2.0.252",
"@spinajs/configuration": "^2.0.253",
"@spinajs/di": "^2.0.253",
"@spinajs/exceptions": "^2.0.253",
"@spinajs/log": "^2.0.253",
"@spinajs/reflection": "^2.0.253",
"commander": "10.0.0",

@@ -52,0 +52,0 @@ "reflect-metadata": "^0.1.13"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc