percy-client
Advanced tools
Comparing version 0.2.0 to 1.0.0
@@ -8,2 +8,3 @@ 'use strict'; | ||
var utils = require('./utils'); | ||
var Environment = require('./environment'); | ||
var requestPromise = require('request-promise'); | ||
@@ -62,2 +63,3 @@ | ||
this.apiUrl = options.apiUrl || 'https://percy.io/api/v1'; | ||
this.environment = options.environment || new Environment(process.env); | ||
this._httpClient = requestPromise; | ||
@@ -114,3 +116,7 @@ } | ||
'attributes': { | ||
'branch': 'master' | ||
'branch': this.environment.branch, | ||
'commit-sha': this.environment.commitSha, | ||
'pull-request-number': this.environment.pullRequestNumber, | ||
'parallel-nonce': this.environment.parallelNonce, | ||
'parallel-total-shards': this.environment.parallelTotalShards | ||
} | ||
@@ -117,0 +123,0 @@ } |
{ | ||
"name": "percy-client", | ||
"version": "0.2.0", | ||
"description": "API client library for percy.io", | ||
"version": "1.0.0", | ||
"description": "JavaScript API client library for Percy (https://percy.io).", | ||
"main": "dist/main.js", | ||
"scripts": { | ||
"build:compile": "babel main.js utils.js --presets babel-preset-es2015 --out-dir dist", | ||
"build:compile": "babel main.js utils.js environment.js --presets babel-preset-es2015 --out-dir dist", | ||
"build:browserify": "browserify --standalone percy-client --ignore cls-bluebird dist/main.js -o dist/bundle.js", | ||
@@ -9,0 +9,0 @@ "build": "npm run build:compile && npm run build:browserify", |
@@ -6,2 +6,6 @@ # percy-js | ||
WIP. | ||
JavaScript API client library for [Percy](https://percy.io). | ||
This is a low-level API library, you probably want to use a higher-level plugin. Check out: | ||
* [ember-percy](https://github.com/percy/ember-percy) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2202752
7
63418
0
11
1