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

@fig/complete-commander

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fig/complete-commander - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

2

lib/index.d.ts

@@ -5,3 +5,3 @@ import { Command } from "commander";

}
export declare function generateCompletionSpec(command: Command, options?: Options): string | undefined;
export declare function generateCompletionSpec(command: Command, options?: Options): Promise<string | undefined>;
export declare function addCompletionSpecCommand(command: Command): void;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -17,3 +26,4 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

function getTemplate(spec) {
return prettier_1.default.format(`
return __awaiter(this, void 0, void 0, function* () {
return prettier_1.default.format(`
// Autogenerated by @fig/complete-commander

@@ -25,2 +35,3 @@

`, { parser: "typescript" });
});
}

@@ -128,7 +139,9 @@ function generateArg(_arg) {

function generateCompletionSpec(command, options) {
const figSpecCommandName = (options === null || options === void 0 ? void 0 : options.figSpecCommandName) || DEFAULT_FIG_SUBCOMMAND_NAME;
// The first subcommand will never have the name of the `figSpecCommandName`
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const spec = getTemplate(generateCommand(command, figSpecCommandName));
return spec;
return __awaiter(this, void 0, void 0, function* () {
const figSpecCommandName = (options === null || options === void 0 ? void 0 : options.figSpecCommandName) || DEFAULT_FIG_SUBCOMMAND_NAME;
// The first subcommand will never have the name of the `figSpecCommandName`
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const spec = getTemplate(generateCommand(command, figSpecCommandName));
return spec;
});
}

@@ -140,7 +153,7 @@ exports.generateCompletionSpec = generateCompletionSpec;

.description("Print the Fig completion spec")
.action(() => {
const spec = generateCompletionSpec(command);
.action(() => __awaiter(this, void 0, void 0, function* () {
const spec = yield generateCompletionSpec(command);
console.log(spec);
});
}));
}
exports.addCompletionSpecCommand = addCompletionSpecCommand;
{
"name": "@fig/complete-commander",
"version": "2.0.1",
"version": "3.0.0",
"description": "Export commander command as a Fig spec",
"main": "lib/index.js",
"scripts": {
"build": "tsc",
"test": "ts-node test/index.ts",
"test:overwrite": "OVERWRITE=true yarn test",
"clean:test": "git clean -Xf test",
"prepack": "yarn build"
},
"repository": {

@@ -35,19 +28,24 @@ "type": "git",

"peerDependencies": {
"commander": "^8.0.0"
"commander": "^11.1.0"
},
"dependencies": {
"prettier": "^2.3.2"
"prettier": "^3.1.0"
},
"devDependencies": {
"@types/node": "^16.7.2",
"@types/prettier": "^2.3.2",
"@withfig/autocomplete-types": "^1.10.0",
"chalk": "^4.1.2",
"commander": "^8.1.0",
"ts-node": "^10.2.1",
"typescript": "^4.4.2"
"@types/node": "^20.9.2",
"chalk": "^5.3.0",
"commander": "^11.1.0",
"tsx": "^4.1.4",
"typescript": "~5.2.0",
"@withfig/autocomplete-types": "^1.29.0"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsc",
"test": "tsx test/index.ts",
"test:overwrite": "OVERWRITE=true yarn test",
"clean:test": "git clean -Xf test"
}
}
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