@percy/core 1.28.8-beta.2 → 1.28.8-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -182,6 +182,21 @@ export function createPercyServer(percy, port) {
182
182
  res.json(200, {
183
183
  success: true
184
184
  });
185
+ }).route('post', '/percy/log', async (req, res) => {
186
+ const log = logger('sdk');
187
+ if (!req.body) {
188
+ log.error('No request body for /percy/log endpoint');
189
+ return res.json(400, {
190
+ error: 'No body passed'
191
+ });
192
+ }
193
+ const level = req.body.level;
194
+ const message = req.body.message;
195
+ const meta = req.body.meta || {};
196
+ log[level](message, meta);
197
+ res.json(200, {
198
+ success: true
199
+ });
185
200
  })
186
201
  // stops percy at the end of the current event loop
187
202
  .route('/percy/stop', (req, res) => {
package/dist/percy.js CHANGED
@@ -432,12 +432,12 @@ export class Percy {
432
432
  try {
433
433
  var _this$build3, _this$build4, _this$build5, _this$build6;
434
434
  const logsObject = {
435
- clilogs: logger.query(() => true)
435
+ clilogs: logger.query(log => !['ci'].includes(log.debug))
436
436
  };
437
437
  // Only add CI logs if not disabled voluntarily.
438
438
  const sendCILogs = process.env.PERCY_CLIENT_ERROR_LOGS !== 'false';
439
439
  if (sendCILogs) {
440
- const redactedContent = redactSecrets(logger.query(() => true, true));
440
+ const redactedContent = redactSecrets(logger.query(log => ['ci'].includes(log.debug)));
441
441
  logsObject.cilogs = redactedContent;
442
442
  }
443
443
  const content = base64encode(Pako.gzip(JSON.stringify(logsObject)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/core",
3
- "version": "1.28.8-beta.2",
3
+ "version": "1.28.8-beta.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,11 +43,11 @@
43
43
  "test:types": "tsd"
44
44
  },
45
45
  "dependencies": {
46
- "@percy/client": "1.28.8-beta.2",
47
- "@percy/config": "1.28.8-beta.2",
48
- "@percy/dom": "1.28.8-beta.2",
49
- "@percy/logger": "1.28.8-beta.2",
50
- "@percy/webdriver-utils": "1.28.8-beta.2",
46
+ "@percy/client": "1.28.8-beta.4",
47
+ "@percy/config": "1.28.8-beta.4",
48
+ "@percy/dom": "1.28.8-beta.4",
49
+ "@percy/logger": "1.28.8-beta.4",
50
+ "@percy/webdriver-utils": "1.28.8-beta.4",
51
51
  "content-disposition": "^0.5.4",
52
52
  "cross-spawn": "^7.0.3",
53
53
  "extract-zip": "^2.0.1",
@@ -60,5 +60,5 @@
60
60
  "ws": "^8.0.0",
61
61
  "yaml": "^2.4.1"
62
62
  },
63
- "gitHead": "6c954bcd0fa6a825ad636167f0a07251f124b710"
63
+ "gitHead": "0ea30a56b97b5a5dab6ddc1282f71f1ecf07df2d"
64
64
  }