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

@oclif/core

Package Overview
Dependencies
Maintainers
2
Versions
414
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oclif/core - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0

11

lib/interfaces/hooks.d.ts

@@ -36,2 +36,9 @@ import { Command } from '../command';

};
finally: {
options: {
argv: string[];
id: string;
};
return: void;
};
init: {

@@ -110,2 +117,6 @@ options: {

/**
* Runs at the end of the CLI lifecycle - regardless of success or failure.
*/
type Finally = Hook<'finally'>;
/**
* Runs when the CLI is initialized before a command is executed.

@@ -112,0 +123,0 @@ */

23

lib/main.js

@@ -40,9 +40,2 @@ "use strict";

const initMarker = performance_1.Performance.mark(performance_1.OCLIF_MARKER_OWNER, 'main.run#init');
const collectPerf = async () => {
marker?.stop();
if (!initMarker?.stopped)
initMarker?.stop();
await performance_1.Performance.collect();
performance_1.Performance.debug();
};
const showHelp = async (argv) => {

@@ -70,2 +63,10 @@ const Help = await (0, help_1.loadHelpClass)(config);

const [id, ...argvSlice] = (0, help_1.normalizeArgv)(config, argv);
const runFinally = async () => {
marker?.stop();
if (!initMarker?.stopped)
initMarker?.stop();
await performance_1.Performance.collect();
performance_1.Performance.debug();
await config.runHook('finally', { argv: argvSlice, id });
};
// run init hook

@@ -76,3 +77,3 @@ await config.runHook('init', { argv: argvSlice, id });

ux_1.ux.stdout(config.userAgent);
await collectPerf();
await runFinally();
return;

@@ -83,3 +84,3 @@ }

await showHelp(argv);
await collectPerf();
await runFinally();
return;

@@ -93,3 +94,3 @@ }

await showHelp([id]);
await collectPerf();
await runFinally();
return;

@@ -103,4 +104,4 @@ }

finally {
await collectPerf();
await runFinally();
}
}
{
"name": "@oclif/core",
"description": "base library for oclif CLIs",
"version": "4.1.1",
"version": "4.2.0",
"author": "Salesforce",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/core/issues",

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