Gathering detailed insights and metrics for @netlify/cli-utils
Gathering detailed insights and metrics for @netlify/cli-utils
Gathering detailed insights and metrics for @netlify/cli-utils
Gathering detailed insights and metrics for @netlify/cli-utils
npm install @netlify/cli-utils
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
5 Stars
60 Commits
3 Forks
29 Watching
6 Branches
14 Contributors
Updated on 28 Jan 2023
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
85.7%
13
Compared to previous day
Last week
-50.6%
80
Compared to previous week
Last month
-19.9%
719
Compared to previous month
Last year
-47.9%
8,556
Compared to previous year
18
Note: This package has been deprecated and moved into the core CLI. https://github.com/netlify/cli
netlify-cli's @oclif/command baseclass.
Provides a unified way to load and persist global and site level cli config and authenticated api. Also allows commands to program against a consistent base-class api to enable changes down the road.
1const Command = require('@netlify/cli-utils') 2 3class OpenCommand extends Command { 4 async run() { 5 await this.authenticate() 6 7 const api = this.netlify.api 8 9 // authenticated api 10 } 11} 12 13OpenCommand.description = `A description` 14 15OpenCommand.examples = [ 16 'netlify open:admin', 17 'netlify open:site' 18] 19 20OpenCommand.hidden = true 21 22module.exports = OpenCommand 23
Import the the base class and extend it, the same way you do with @oclif/command
.
Commands that extend this base class get access to the same api as @oclif/command
plus a few extra properties:
this.netlify.globalConfig
Provides access to configuration stored in the users home folder under ~/.netlify
.
See global-config.
this.netlify.state
Provides access to site-level state relative to the process.cwd
. (e.g. project/.netlify/config.json
)
See site-config
this.netlify.api
An instance of the netlify
api client. If access tokens are found in global config, then this client will automatically be authenticated.
this.netlify.site
get current site context including root, configPath, and id (with getter and setter).
this.netlify.config
Get the configuration from netlify.[toml/yml]
.
this.authenticate()
A method that will log the user in if they are not already logged in. If the user is already logged in, this is a noop.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
71 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More