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

nature

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nature - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

index.js

29

bin/cli.js
#!/usr/bin/env node
import DefaultLogger from '../lib/logger.js'
import { loadModule } from 'load-module'
try {
/* TODO: build a command map from config */
const commandMap = new Map()
const command = process.argv[2]
const args = process.argv.slice(3)
const logger = new DefaultLogger()
let Strategy
if (command && commandMap.has(command)) {
Strategy = commandMap.get(command)
} else if (command) {
Strategy = await loadModule(command, { paths: process.cwd() })
} else {
throw new Error('Usage: nature <command|strategy-file|strategy-module> [<args...>]')
}
const strategy = new Strategy()
const completionReport = await strategy.execute(args)
if (completionReport) {
logger.info(completionReport.toString())
}
} catch (err) {
console.error(err.cause)
console.error(err.stack)
process.exitCode = 1
}

10

package.json
{
"name": "nature",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.6.2",
"version": "0.7.0",
"description": "Naturalise your inventory",

@@ -11,6 +11,3 @@ "repository": {

"type": "module",
"exports": {
"./strategy": "./lib/strategy.js",
"./completion-report": "./lib/completion-report.js"
},
"exports": "./index.js",
"bin": {

@@ -25,4 +22,3 @@ "nature": "bin/cli.js"

"scripts": {
"test": "npm run test:ci",
"test:ci": ""
"test": "npm run test:ci"
},

@@ -29,0 +25,0 @@ "files": [

@@ -5,1 +5,2 @@ Work In Progress.

* module-level await
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