@percy/client
Advanced tools
Comparing version 1.0.0-beta.44 to 1.0.0-beta.45
@@ -10,7 +10,7 @@ "use strict"; | ||
var _git = require("@percy/env/dist/git"); | ||
var _utils = require("@percy/env/dist/utils"); | ||
var _package = _interopRequireDefault(require("../package.json")); | ||
var _utils = require("./utils"); | ||
var _utils2 = require("./utils"); | ||
@@ -35,3 +35,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
apiUrl, | ||
httpAgent: (0, _utils.httpAgentFor)(apiUrl), | ||
httpAgent: (0, _utils2.httpAgentFor)(apiUrl), | ||
clientInfo: new Set([].concat(clientInfo)), | ||
@@ -89,3 +89,3 @@ environmentInfo: new Set([].concat(environmentInfo)), | ||
get(path) { | ||
return (0, _utils.request)(`${this.apiUrl}/${path}`, { | ||
return (0, _utils2.request)(`${this.apiUrl}/${path}`, { | ||
method: 'GET', | ||
@@ -99,3 +99,3 @@ agent: this.httpAgent, | ||
post(path, body = {}) { | ||
return (0, _utils.request)(`${this.apiUrl}/${path}`, { | ||
return (0, _utils2.request)(`${this.apiUrl}/${path}`, { | ||
method: 'POST', | ||
@@ -156,3 +156,3 @@ agent: this.httpAgent, | ||
type: 'resources', | ||
id: r.sha || (0, _utils.sha256hash)(r.content), | ||
id: r.sha || (0, _utils2.sha256hash)(r.content), | ||
attributes: { | ||
@@ -216,3 +216,3 @@ 'resource-url': r.url, | ||
let getBuildData = async () => { | ||
let sha = commit && ((0, _git.git)(`rev-parse ${commit}`) || commit); | ||
let sha = commit && ((0, _utils.git)(`rev-parse ${commit}`) || commit); | ||
let body = build ? await this.getBuild(build) : await this.getBuilds(project, { | ||
@@ -271,5 +271,5 @@ sha | ||
type: 'resources', | ||
id: sha || (0, _utils.sha256hash)(content), | ||
id: sha || (0, _utils2.sha256hash)(content), | ||
attributes: { | ||
'base64-content': (0, _utils.base64encode)(content) | ||
'base64-content': (0, _utils2.base64encode)(content) | ||
} | ||
@@ -286,3 +286,3 @@ } | ||
return (0, _utils.pool)(function* () { | ||
return (0, _utils2.pool)(function* () { | ||
for (let resource of resources) { | ||
@@ -323,3 +323,3 @@ yield this.uploadResource(resource); | ||
type: 'resources', | ||
id: r.sha || (0, _utils.sha256hash)(r.content), | ||
id: r.sha || (0, _utils2.sha256hash)(r.content), | ||
attributes: { | ||
@@ -326,0 +326,0 @@ 'resource-url': r.url || null, |
{ | ||
"name": "@percy/client", | ||
"version": "1.0.0-beta.44", | ||
"version": "1.0.0-beta.45", | ||
"license": "MIT", | ||
@@ -26,5 +26,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@percy/env": "^1.0.0-beta.44" | ||
"@percy/env": "^1.0.0-beta.45" | ||
}, | ||
"gitHead": "22062e770a9b05140b7617593e93f00495888a8a" | ||
"gitHead": "1e600c7b3318ce14aa66cb763c204443e5f034b7" | ||
} |
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
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
24693
Updated@percy/env@^1.0.0-beta.45