@percy/core
Advanced tools
Comparing version 1.28.0 to 1.28.1-beta.0
@@ -120,6 +120,6 @@ import fs from 'fs'; | ||
reject | ||
})); | ||
}, 'app')); | ||
data = await handleSyncJob(snapshotPromise, percy, 'comparison'); | ||
} else { | ||
let upload = percy.upload(req.body); | ||
let upload = percy.upload(req.body, null, 'app'); | ||
if (req.url.searchParams.has('await')) await upload; | ||
@@ -168,6 +168,6 @@ } | ||
reject | ||
})); | ||
}, 'automate')); | ||
data = await handleSyncJob(snapshotPromise, percy, 'comparison'); | ||
} else { | ||
percy.upload(comparisonData); | ||
percy.upload(comparisonData, null, 'automate'); | ||
} | ||
@@ -174,0 +174,0 @@ res.json(200, { |
@@ -336,3 +336,3 @@ import PercyClient from '@percy/client'; | ||
// Uploads one or more snapshots directly to the current Percy build | ||
upload(options, callback = null) { | ||
upload(options, callback = null, screenshotFlow = null) { | ||
if (this.readyState !== 1) { | ||
@@ -368,2 +368,3 @@ throw new Error('Not running'); | ||
this.client.addEnvironmentInfo(options.environmentInfo); | ||
this.client.screenshotFlow = screenshotFlow; | ||
@@ -370,0 +371,0 @@ // Sync CLI support, attached resolve, reject promise |
@@ -347,2 +347,3 @@ import logger from '@percy/logger'; | ||
try { | ||
var _data$attributes; | ||
build = percy.build = {}; | ||
@@ -356,2 +357,3 @@ let { | ||
let number = data.attributes['build-number']; | ||
percy.client.buildType = (_data$attributes = data.attributes) === null || _data$attributes === void 0 ? void 0 : _data$attributes.type; | ||
Object.assign(build, { | ||
@@ -425,3 +427,7 @@ id: data.id, | ||
} = snapshot; | ||
if (percy.client.screenshotFlow === 'automate' && percy.client.buildType !== 'automate') { | ||
throw new Error(`Cannot run automate screenshots in ${percy.client.buildType} project. Please use automate project token`); | ||
} else if (percy.client.screenshotFlow === 'app' && percy.client.buildType !== 'app') { | ||
throw new Error(`Cannot run App Percy screenshots in ${percy.client.buildType} project. Please use App Percy project token`); | ||
} | ||
// yield to evaluated snapshot resources | ||
@@ -428,0 +434,0 @@ snapshot.resources = typeof resources === 'function' ? yield* yieldTo(resources()) : resources; |
{ | ||
"name": "@percy/core", | ||
"version": "1.28.0", | ||
"version": "1.28.1-beta.0", | ||
"license": "MIT", | ||
@@ -12,3 +12,3 @@ "repository": { | ||
"access": "public", | ||
"tag": "latest" | ||
"tag": "beta" | ||
}, | ||
@@ -47,7 +47,7 @@ "engines": { | ||
"dependencies": { | ||
"@percy/client": "1.28.0", | ||
"@percy/config": "1.28.0", | ||
"@percy/dom": "1.28.0", | ||
"@percy/logger": "1.28.0", | ||
"@percy/webdriver-utils": "1.28.0", | ||
"@percy/client": "1.28.1-beta.0", | ||
"@percy/config": "1.28.1-beta.0", | ||
"@percy/dom": "1.28.1-beta.0", | ||
"@percy/logger": "1.28.1-beta.0", | ||
"@percy/webdriver-utils": "1.28.1-beta.0", | ||
"content-disposition": "^0.5.4", | ||
@@ -63,3 +63,3 @@ "cross-spawn": "^7.0.3", | ||
}, | ||
"gitHead": "9d95f18e45e37aa3683e5b8276fd85cf07dba8cb" | ||
"gitHead": "648f81742ebf8c6f29ccdfdff77df124e4e1668d" | ||
} |
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
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
199668
4826
2
+ Added@percy/client@1.28.1-beta.0(transitive)
+ Added@percy/config@1.28.1-beta.0(transitive)
+ Added@percy/dom@1.28.1-beta.0(transitive)
+ Added@percy/env@1.28.1-beta.0(transitive)
+ Added@percy/logger@1.28.1-beta.0(transitive)
+ Added@percy/sdk-utils@1.28.1-beta.0(transitive)
+ Added@percy/webdriver-utils@1.28.1-beta.0(transitive)
- Removed@percy/client@1.28.0(transitive)
- Removed@percy/config@1.28.0(transitive)
- Removed@percy/dom@1.28.0(transitive)
- Removed@percy/env@1.28.0(transitive)
- Removed@percy/logger@1.28.0(transitive)
- Removed@percy/sdk-utils@1.28.0(transitive)
- Removed@percy/webdriver-utils@1.28.0(transitive)
Updated@percy/client@1.28.1-beta.0
Updated@percy/config@1.28.1-beta.0
Updated@percy/dom@1.28.1-beta.0
Updated@percy/logger@1.28.1-beta.0