Socket
Socket
Sign inDemoInstall

makitso

Package Overview
Dependencies
91
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-beta.1 to 2.0.0

coverage/clover.xml

22

dist/command/index.js

@@ -88,3 +88,3 @@ "use strict";

if (!appCmd.action) return [3 /*break*/, 5];
return [4 /*yield*/, appCmd.action({ context: context, command: appCmd, input: input })];
return [4 /*yield*/, appCmd.action({ commands: commands, context: context, command: appCmd, input: input })];
case 4:

@@ -121,3 +121,14 @@ _b.sent();

Object.assign(prompt, {
keyPressers: __spreadArrays(prompt.keyPressers, [
keyPressers: __spreadArrays([
{
keyPress: function (state) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
debug_1.debug("keyPresser1", state);
return [2 /*return*/, state];
});
});
}
}
], prompt.keyPressers, [
makitso_prompt_1.keyPressHistory,

@@ -146,2 +157,9 @@ keyPressParser,

initCommandPrompt({ context: context, commands: commands, prompt: prompt });
process.on("SIGINT", function () {
console.log("Interrupted");
console.log(prompt.state);
if (!prompt.state.pojo.returnCommand) {
process.exit();
}
});
return [2 /*return*/, promptAndRun({ context: context, commands: commands, prompt: prompt })];

@@ -148,0 +166,0 @@ });

@@ -39,2 +39,3 @@ import * as yargsParseArgs from "yargs-parser";

export declare type CommandActionArgs = {
commands: Commands;
command: Command;

@@ -44,2 +45,7 @@ context: ContextSchema;

};
export declare type CommandSuggestArgs = {
command: Command;
context: ContextSchema;
input: CommandActionInput;
};
export declare type CommandAction = (args: CommandActionArgs) => Promise<void>;

@@ -51,3 +57,3 @@ export declare type Command = {

options?: string[];
suggest?: (args: CommandActionArgs) => Promise<string[]>;
suggest?: (args: CommandSuggestArgs) => Promise<string[]>;
help?: (args: {

@@ -54,0 +60,0 @@ context: ContextSchema;

@@ -43,3 +43,3 @@ "use strict";

if (appCmd.action) {
await appCmd.action({ context, command: appCmd, input });
await appCmd.action({ commands, context, command: appCmd, input });
}

@@ -76,2 +76,8 @@ }

keyPressers: [
{
async keyPress(state: any) {
debug("keyPresser1", state);
return state;
}
},
...prompt.keyPressers,

@@ -101,3 +107,12 @@ keyPressHistory,

initCommandPrompt({ context, commands, prompt });
process.on("SIGINT", function() {
console.log("Interrupted");
console.log(prompt.state);
if (!prompt.state.pojo.returnCommand) {
process.exit();
}
});
return promptAndRun({ context, commands, prompt });
}

@@ -47,2 +47,3 @@ import * as yargsParseArgs from "yargs-parser";

export type CommandActionArgs = {
commands: Commands;
command: Command;

@@ -53,2 +54,8 @@ context: ContextSchema;

export type CommandSuggestArgs = {
command: Command;
context: ContextSchema;
input: CommandActionInput;
};
export type CommandAction = (args: CommandActionArgs) => Promise<void>;

@@ -61,3 +68,3 @@

options?: string[];
suggest?: (args: CommandActionArgs) => Promise<string[]>;
suggest?: (args: CommandSuggestArgs) => Promise<string[]>;
help?: (args: {

@@ -64,0 +71,0 @@ context: ContextSchema;

44

package.json
{
"name": "makitso",
"version": "2.0.0-beta.1",
"version": "2.0.0",
"description": "A Framework for building composable interactive commandline apps",

@@ -19,30 +19,30 @@ "main": "dist/index.js",

"@lecstor/app-error": "^0.0.2",
"chalk": "^2.3.0",
"ellipsize": "^0.0.3",
"chalk": "^4.0.0",
"ellipsize": "^0.1.0",
"js-yaml": "^3.10.0",
"keytar": "^4.0.5",
"makitso-prompt": "3.0.0-beta.1",
"keytar": "^5.6.0",
"makitso-prompt": "^3.0.0",
"prettyjson": "^1.2.1",
"yargs-parser": "^9.0.2"
"yargs-parser": "^18.1.3"
},
"devDependencies": {
"@types/eslint-plugin-prettier": "2.2.0",
"@types/jest": "^25.1.4",
"@types/lodash": "^4.14.149",
"@types/node": "^13.7.7",
"@types/prettier": "1.19.0",
"@types/eslint-plugin-prettier": "3.1.0",
"@types/jest": "^25.2.2",
"@types/lodash": "^4.14.151",
"@types/node": "^14.0.1",
"@types/prettier": "2.0.0",
"@types/yargs-parser": "^15.0.0",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.2.0",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-prettier": "^3.1.0",
"jest": "^25.1.0",
"mock-stdin": "^0.3.1",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"eslint": "^7.0.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"jest": "^26.0.1",
"mock-stdin": "^1.0.0",
"node-ansiparser": "^2.2.0",
"node-ansiterminal": "^0.2.1-beta",
"prettier": "^1.18.2",
"prettier-eslint": "^8.3.1",
"ts-jest": "^25.2.1",
"typescript": "^3.8.3"
"prettier": "^2.0.5",
"prettier-eslint": "^9.0.1",
"ts-jest": "^25.5.1",
"typescript": "^3.9.2"
},

@@ -49,0 +49,0 @@ "engines": {

@@ -14,4 +14,5 @@ {

"dist",
"__tests__"
"**/__tests__",
"**/*.test.*"
]
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc