Gathering detailed insights and metrics for cypress-dotenv
Gathering detailed insights and metrics for cypress-dotenv
Gathering detailed insights and metrics for cypress-dotenv
Gathering detailed insights and metrics for cypress-dotenv
npm install cypress-dotenv
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
54 Stars
54 Commits
13 Forks
3 Watching
7 Branches
8 Contributors
Updated on 23 Nov 2024
JavaScript (98.36%)
Shell (1.64%)
Cumulative downloads
Total Downloads
Last day
-13.8%
12,754
Compared to previous day
Last week
1%
76,189
Compared to previous week
Last month
9.1%
327,103
Compared to previous month
Last year
5.9%
3,728,083
Compared to previous year
3
5
Cypress plugin that enables compatability with dotenv.
Please note that as of v2.0 this plugin only support Node v10+, Cypress 8+ and dotenv 10+
If you are still using older versions, then please install v1.x instead
It will load any environment variables
defined in your .env
file so you can access them via Cypress.env()
from within your tests as you would expect.
Any Cypress config options defined in your .env
will also be applied and take precedence over what is in your cypress.json
file. See the Cypress docs for details on this
For example, if your .env
file has something like this:
1CYPRESS_HELLO=hola 2GOODBYE=adios
You can use Cypress.env('HELLO')
to access its value.
You will also need to install the original dotenv
package along with cypress-dotenv
1npm install --save-dev dotenv cypress-dotenv
or
yarn add --dev dotenv cypress-dotenv
Since this is a plugin, you will need to modify your file cypress/plugins/index.js
to look something like this:
1const dotenvPlugin = require('cypress-dotenv'); 2module.exports = (on, config) => { 3 config = dotenvPlugin(config) 4 return config 5}
This plugin takes three paramaters. The first parameter (which is mandatory) is the Cypress config object.
The second is an optional dotenv config object.
The third is an optional [all] boolean parameter, which is set to false by default. If set to true, it returns all available environmental variables, not limited to those prefixed with CYPRESS_.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 4/17 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
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
19 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