Socket
Socket
Sign inDemoInstall

@lighthouse/common

Package Overview
Dependencies
Maintainers
15
Versions
461
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lighthouse/common - npm Package Compare versions

Comparing version 4.24.1-canary-1 to 4.24.1-canary-2

22

dist/pdf/activity-report/index.js

@@ -23,3 +23,9 @@ "use strict";

const DEFAULT_MAX_SCANS = 200;
const MAX_ATTACHMENTS = 100;
const LIGHTHOUSE_BASE_URL = 'https://app.lighthouse.io';
const maxFormsText = {
text: [(0, _helpers.text)(`Detailed Form Submissions in the Daily Activity Report are limited to a total of ${MAX_ATTACHMENTS}. `), (0, _helpers.text)('To access individual Form Submissions, open the hyperlink next to the respective submission within the Other Activity table. Alternatively, they may be accessed in the Lighthouse Management Console.')],
style: 'small',
margin: [0, 10, 0, 10]
};
/**

@@ -108,3 +114,2 @@ * buildActivityPdf

} = data;
const MAX_ATTACHMENTS = 100;
const enterEvents = (0, _lodash.filter)(events, event => event.type === 'enter');

@@ -149,7 +154,2 @@ const exceedsMaxScans = (0, _lodash.size)(enterEvents) > maxScans;

if (exceedsMaxForms) {
const maxFormsText = {
text: [(0, _helpers.text)(`Detailed Form Submissions in the Daily Activity Report are limited to a total of ${MAX_ATTACHMENTS}.`), (0, _helpers.text)('To access individual Form Submissions, open the hyperlink next to the respective submission within the Other Activity table. Alternatively, they may be accessed in the Lighthouse Management Console.')],
style: 'small',
margin: [0, 10, 0, 10]
};
activitySummarySection.push(maxFormsText);

@@ -436,3 +436,11 @@ }

});
return [header, hLine, activityTable];
const otherActivitySummarySection = [header, hLine, activityTable];
const formCount = (0, _lodash.size)(rows);
const exceedsMaxForms = formCount > MAX_ATTACHMENTS;
if (exceedsMaxForms) {
activitySummarySection.push(maxFormsText);
}
return otherActivitySummarySection;
}

@@ -439,0 +447,0 @@

@@ -17,3 +17,9 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";

var DEFAULT_MAX_SCANS = 200;
var MAX_ATTACHMENTS = 100;
var LIGHTHOUSE_BASE_URL = 'https://app.lighthouse.io';
var maxFormsText = {
text: [text("Detailed Form Submissions in the Daily Activity Report are limited to a total of ".concat(MAX_ATTACHMENTS, ". ")), text('To access individual Form Submissions, open the hyperlink next to the respective submission within the Other Activity table. Alternatively, they may be accessed in the Lighthouse Management Console.')],
style: 'small',
margin: [0, 10, 0, 10]
};
/**

@@ -170,3 +176,3 @@ * buildActivityPdf

_buildActivitySummarySection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data) {
var audits, events, issues, _data$maxScans, maxScans, settings, tasks, timezone, MAX_ATTACHMENTS, enterEvents, exceedsMaxScans, scans, auditRows, issueRows, scanRows, taskRows, formCount, exceedsMaxForms, rows, sortedRows, title, header, hLine, activityTable, activitySummarySection, maxScansText, maxFormsText;
var audits, events, issues, _data$maxScans, maxScans, settings, tasks, timezone, enterEvents, exceedsMaxScans, scans, auditRows, issueRows, scanRows, taskRows, formCount, exceedsMaxForms, rows, sortedRows, title, header, hLine, activityTable, activitySummarySection, maxScansText;

@@ -178,3 +184,2 @@ return _regeneratorRuntime.wrap(function _callee4$(_context4) {

audits = data.audits, events = data.events, issues = data.issues, _data$maxScans = data.maxScans, maxScans = _data$maxScans === void 0 ? DEFAULT_MAX_SCANS : _data$maxScans, settings = data.settings, tasks = data.tasks, timezone = data.timezone;
MAX_ATTACHMENTS = 100;
enterEvents = filter(events, function (event) {

@@ -202,3 +207,3 @@ return event.type === 'enter';

hLine = horizontalLine();
_context4.next = 18;
_context4.next = 17;
return buildActivityTable({

@@ -210,3 +215,3 @@ rows: sortedRows,

case 18:
case 17:
activityTable = _context4.sent;

@@ -227,7 +232,2 @@ activitySummarySection = [header, hLine, activityTable];

if (exceedsMaxForms) {
maxFormsText = {
text: [text("Detailed Form Submissions in the Daily Activity Report are limited to a total of ".concat(MAX_ATTACHMENTS, ".")), text('To access individual Form Submissions, open the hyperlink next to the respective submission within the Other Activity table. Alternatively, they may be accessed in the Lighthouse Management Console.')],
style: 'small',
margin: [0, 10, 0, 10]
};
activitySummarySection.push(maxFormsText);

@@ -238,3 +238,3 @@ }

case 23:
case 22:
case "end":

@@ -568,3 +568,3 @@ return _context4.stop();

_buildOtherActivitySection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(data) {
var audits, issues, tasks, settings, timezone, auditRows, issueRows, taskRows, rows, sortedRows, title, header, hLine, activityTable;
var audits, issues, tasks, settings, timezone, auditRows, issueRows, taskRows, rows, sortedRows, title, header, hLine, activityTable, otherActivitySummarySection, formCount, exceedsMaxForms;
return _regeneratorRuntime.wrap(function _callee7$(_context7) {

@@ -598,5 +598,13 @@ while (1) {

activityTable = _context7.sent;
return _context7.abrupt("return", [header, hLine, activityTable]);
otherActivitySummarySection = [header, hLine, activityTable];
formCount = size(rows);
exceedsMaxForms = formCount > MAX_ATTACHMENTS;
case 13:
if (exceedsMaxForms) {
activitySummarySection.push(maxFormsText);
}
return _context7.abrupt("return", otherActivitySummarySection);
case 17:
case "end":

@@ -603,0 +611,0 @@ return _context7.stop();

{
"name": "@lighthouse/common",
"version": "4.24.1-canary-1",
"version": "4.24.1-canary-2",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc