
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
@inquirerer/utils
Advanced tools
CLI lifecycle utilities
Utilities for building command-line applications with inquirerer
CLI lifecycle utilities for building command-line applications with inquirerer.
npm install @inquirerer/utils
Extracts the first positional argument from argv for command routing:
import { extractFirst } from '@inquirerer/utils';
const { first, newArgv } = extractFirst(argv);
// first = 'init' (the subcommand)
// newArgv = remaining arguments with first positional removed
Exits the CLI with an error message and optional cleanup:
import { cliExitWithError } from '@inquirerer/utils';
await cliExitWithError(error, {
beforeExit: async () => {
await closeConnections();
}
});
Checks for package updates with caching:
import { checkForUpdates } from '@inquirerer/utils';
const result = await checkForUpdates({
pkgName: '@my/cli',
pkgVersion: '1.0.0',
registryBaseUrl: 'https://registry.npmjs.org'
});
if (result.hasUpdate) {
console.log(result.message);
}
Gets the package.json for the current package:
import { getSelfPackageJson, getSelfVersion, getSelfName } from '@inquirerer/utils';
const pkg = getSelfPackageJson(__dirname);
const version = getSelfVersion(__dirname);
const name = getSelfName(__dirname);
MIT
git clone https://github.com/constructive-io/dev-utils.git
cd dev-utils
pnpm install
pnpm build
cd packages/<packagename>
pnpm test:watch
Built for developers, with developers.
👉 https://launchql.com | https://hyperweb.io
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
FAQs
CLI lifecycle utilities for building command-line applications
The npm package @inquirerer/utils receives a total of 9,270 weekly downloads. As such, @inquirerer/utils popularity was classified as popular.
We found that @inquirerer/utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.