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

cmd-ts

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmd-ts - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

4

dist/cjs/effects.js

@@ -41,4 +41,4 @@ "use strict";

const { into, message, exitCode } = this.config;
const exitMessage = chalk_1.default.dim(`process exits with status ${exitCode}`);
return `${chalk_1.default.dim(into)}:\n${message}\n\n${exitMessage}`;
const coloredExit = chalk_1.default.dim(`process exited with status ${exitCode} (${into})`);
return `${message}\n\n${coloredExit}`;
}

@@ -45,0 +45,0 @@ output() {

@@ -87,3 +87,6 @@ "use strict";

async parse(context) {
var _a;
var _a, _b;
if (((_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.length) === 0) {
context.hotPath.push(config.name);
}
const parsed = await subcommand.parse(context);

@@ -96,3 +99,3 @@ if (Result.isErr(parsed)) {

}
(_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.push(parsed.value);
(_b = context.hotPath) === null || _b === void 0 ? void 0 : _b.push(parsed.value);
const cmd = config.cmds[parsed.value];

@@ -115,3 +118,6 @@ const parsedCommand = await cmd.parse(context);

async run(context) {
var _a;
var _a, _b;
if (((_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.length) === 0) {
context.hotPath.push(config.name);
}
const parsedSubcommand = await subcommand.parse(context);

@@ -123,3 +129,3 @@ if (Result.isErr(parsedSubcommand)) {

}
(_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.push(parsedSubcommand.value);
(_b = context.hotPath) === null || _b === void 0 ? void 0 : _b.push(parsedSubcommand.value);
const cmd = config.cmds[parsedSubcommand.value];

@@ -126,0 +132,0 @@ const commandRun = await cmd.run(context);

@@ -1,2 +0,1 @@

import chalk from 'chalk';
/**

@@ -7,8 +6,2 @@ * @ignore

/**
* Creates a function to get a new color
*
* @ignore
*/
export declare function generateColorCycle(): () => chalk.Chalk;
/**
* Group an array by a function that returns the key

@@ -15,0 +8,0 @@ *

@@ -6,3 +6,2 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const chalk_1 = __importDefault(require("chalk"));
const strip_ansi_1 = __importDefault(require("strip-ansi"));

@@ -25,20 +24,3 @@ /**

exports.padNoAnsi = padNoAnsi;
const colorCycle = [
chalk_1.default.green,
chalk_1.default.blue,
chalk_1.default.magenta,
chalk_1.default.cyan,
chalk_1.default.white,
];
/**
* Creates a function to get a new color
*
* @ignore
*/
function generateColorCycle() {
let i = 0;
return () => colorCycle[i++ % colorCycle.length];
}
exports.generateColorCycle = generateColorCycle;
/**
* Group an array by a function that returns the key

@@ -45,0 +27,0 @@ *

@@ -36,4 +36,4 @@ /**

const { into, message, exitCode } = this.config;
const exitMessage = chalk.dim(`process exits with status ${exitCode}`);
return `${chalk.dim(into)}:\n${message}\n\n${exitMessage}`;
const coloredExit = chalk.dim(`process exited with status ${exitCode} (${into})`);
return `${message}\n\n${coloredExit}`;
}

@@ -40,0 +40,0 @@ output() {

@@ -75,3 +75,6 @@ import { positional } from './positional';

async parse(context) {
var _a;
var _a, _b;
if (((_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.length) === 0) {
context.hotPath.push(config.name);
}
const parsed = await subcommand.parse(context);

@@ -84,3 +87,3 @@ if (Result.isErr(parsed)) {

}
(_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.push(parsed.value);
(_b = context.hotPath) === null || _b === void 0 ? void 0 : _b.push(parsed.value);
const cmd = config.cmds[parsed.value];

@@ -103,3 +106,6 @@ const parsedCommand = await cmd.parse(context);

async run(context) {
var _a;
var _a, _b;
if (((_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.length) === 0) {
context.hotPath.push(config.name);
}
const parsedSubcommand = await subcommand.parse(context);

@@ -111,3 +117,3 @@ if (Result.isErr(parsedSubcommand)) {

}
(_a = context.hotPath) === null || _a === void 0 ? void 0 : _a.push(parsedSubcommand.value);
(_b = context.hotPath) === null || _b === void 0 ? void 0 : _b.push(parsedSubcommand.value);
const cmd = config.cmds[parsedSubcommand.value];

@@ -114,0 +120,0 @@ const commandRun = await cmd.run(context);

@@ -1,2 +0,1 @@

import chalk from 'chalk';
/**

@@ -7,8 +6,2 @@ * @ignore

/**
* Creates a function to get a new color
*
* @ignore
*/
export declare function generateColorCycle(): () => chalk.Chalk;
/**
* Group an array by a function that returns the key

@@ -15,0 +8,0 @@ *

@@ -1,2 +0,1 @@

import chalk from 'chalk';
import stripAnsi from 'strip-ansi';

@@ -18,19 +17,3 @@ /**

}
const colorCycle = [
chalk.green,
chalk.blue,
chalk.magenta,
chalk.cyan,
chalk.white,
];
/**
* Creates a function to get a new color
*
* @ignore
*/
export function generateColorCycle() {
let i = 0;
return () => colorCycle[i++ % colorCycle.length];
}
/**
* Group an array by a function that returns the key

@@ -37,0 +20,0 @@ *

{
"name": "cmd-ts",
"version": "0.6.0",
"version": "0.6.1",
"homepage": "https://cmd-ts.now.sh",

@@ -5,0 +5,0 @@ "license": "MIT",

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