diff --git a/.github/workflows/dashboards-reports-test-and-build-workflow.yml b/.github/workflows/dashboards-reports-test-and-build-workflow.yml index 8bef8dbf..4e9caa91 100644 --- a/.github/workflows/dashboards-reports-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-reports-test-and-build-workflow.yml @@ -30,14 +30,6 @@ jobs: - name: Move Dashboards Reports to Plugins Dir run: mv dashboards-reports ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} - - name: Add Chromium Binary to Reporting for Testing - run: | - sudo apt install -y libnss3-dev fonts-liberation libfontconfig1 - cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} - wget https://github.com/opendistro-for-elasticsearch/kibana-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip - unzip chromium-linux-x64.zip - rm chromium-linux-x64.zip - - name: OpenSearch Dashboards Plugin Bootstrap uses: nick-invision/retry@v1 with: @@ -63,48 +55,10 @@ jobs: run: | cd ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} yarn build - - cd build - mkdir -p ./{linux-x64,linux-arm64,windows-x64}/opensearch-dashboards/${{ env.PLUGIN_NAME }} - cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-x64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip - cp ./${{ env.PLUGIN_NAME }}-*.zip ./linux-arm64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip - mv ./${{ env.PLUGIN_NAME }}-*.zip ./windows-x64/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip - - cd linux-x64 - wget https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-linux-x64.zip - unzip chromium-linux-x64.zip -d ./opensearch-dashboards/${{ env.PLUGIN_NAME }} - zip -ur ./${{ env.ARTIFACT_NAME }}-*.zip ./opensearch-dashboards - mv ./${{ env.ARTIFACT_NAME }}-*.zip .. - cd .. - - cd linux-arm64 - wget https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-linux-arm64.zip - unzip chromium-linux-arm64.zip -d ./opensearch-dashboards/${{ env.PLUGIN_NAME }} - zip -ur ./${{ env.ARTIFACT_NAME }}-*.zip ./opensearch-dashboards - mv ./${{ env.ARTIFACT_NAME }}-*.zip .. - cd .. - - cd windows-x64 - wget https://github.com/opensearch-project/dashboards-reports/releases/download/chromium-1.12.0.0/chromium-windows-x64.zip - unzip chromium-windows-x64.zip -d ./opensearch-dashboards/${{ env.PLUGIN_NAME }} - zip -ur ./${{ env.ARTIFACT_NAME }}-*.zip ./opensearch-dashboards - mv ./${{ env.ARTIFACT_NAME }}-*.zip .. - cd .. + mv ./build/*.zip ./build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip - name: Upload Artifact For Linux x64 uses: actions/upload-artifact@v1 with: name: dashboards-reports-linux-x64 - path: ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-x64.zip - - - name: Upload Artifact For Linux arm64 - uses: actions/upload-artifact@v1 - with: - name: dashboards-reports-linux-arm64 - path: ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-linux-arm64.zip - - - name: Upload Artifact For Windows - uses: actions/upload-artifact@v1 - with: - name: dashboards-reports-windows-x64 - path: ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}-windows-x64.zip + path: ../OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}/build/${{ env.ARTIFACT_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip diff --git a/README.md b/README.md index d70f59aa..20f5fe89 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ - [Contributing](#contributing) - [Setup](#setup-&-build) - [Notifications Integration](#notifications-integration) -- [Troubleshooting](#troubleshooting) - [Code of Conduct](#code-of-conduct) - [Security](#security) - [License](#license) @@ -35,15 +34,6 @@ Complete OpenSearch Dashboards Report feature is composed of 2 plugins. Refer to OpenSearch Dashboards Reports integration with [Notifications](https://github.com/opensearch-project/notifications) is currently in progress, tracking for the 8/30 OpenSearch 1.1 release. -## Troubleshooting - -#### Fail to launch Chromium - -There could be two reasons for this problem - -1. You are not having the correct version of headless-chrome matching to the OS that your OpenSearch Dashboards is running. Different versions of headless-chrome can be found [here](https://github.com/opensearch-project/dashboards-reports/releases/tag/chromium-1.12.0.0) - -2. Missing additional dependencies. Please refer to [additional dependencies section](./dashboards-reports/rendering-engine/headless-chrome/README.md#additional-libaries) to install required dependencies according to your operating system. ## Code of Conduct This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [opensource-codeofconduct@amazon.com](mailto:opensource-codeofconduct@amazon.com) with any additional questions or comments. diff --git a/dashboards-reports/.gitignore b/dashboards-reports/.gitignore index 9e1fedcc..16b7cd30 100644 --- a/dashboards-reports/.gitignore +++ b/dashboards-reports/.gitignore @@ -10,4 +10,3 @@ yarn-error.log .eslintcache package-lock.json /target/ -.chromium/ \ No newline at end of file diff --git a/dashboards-reports/opensearch-dashboards-plugin-helpers.dev.json b/dashboards-reports/.opensearch_dashboards-plugin-helpers.json similarity index 90% rename from dashboards-reports/opensearch-dashboards-plugin-helpers.dev.json rename to dashboards-reports/.opensearch_dashboards-plugin-helpers.json index 05b7d7e4..eee5a7ea 100644 --- a/dashboards-reports/opensearch-dashboards-plugin-helpers.dev.json +++ b/dashboards-reports/.opensearch_dashboards-plugin-helpers.json @@ -5,6 +5,7 @@ "yarn.lock", ".i18nrc.json", "common/**/*", + "scripts/**/*", "public/**/*", "server/**/*", "translations/**/*" diff --git a/dashboards-reports/package.json b/dashboards-reports/package.json index 2f061e83..1fb238a2 100644 --- a/dashboards-reports/package.json +++ b/dashboards-reports/package.json @@ -17,21 +17,22 @@ "test": "../../node_modules/.bin/jest --config ./test/jest.config.js", "cypress:run": "cypress run", "cypress:open": "cypress open", - "plugin_helpers": "node ../../scripts/plugin_helpers" + "plugin_helpers": "node ../../scripts/plugin_helpers", + "postinstall": "node ./scripts/patch-html2canvas.js" }, "dependencies": { - "async-mutex": "^0.2.6", "babel-polyfill": "^6.26.0", "cheerio": "0.22.0", "cron-validator": "^1.1.1", - "dompurify": "^2.3.8", + "dompurify": "^2.4.1", "elastic-builder": "^2.7.1", "enzyme-adapter-react-16": "^1.15.2", + "html2canvas": "1.4.1", "jest-fetch-mock": "^3.0.3", "jquery": "^3.5.0", "jsdom": "13.1.0", "json-2-csv": "^3.7.6", - "puppeteer-core": "^13.7.0", + "jspdf": "^2.5.1", "react-addons-test-utils": "^15.6.2", "react-id-generator": "^3.0.1", "react-markdown": "^4.3.1", @@ -43,6 +44,7 @@ "react-toast-notifications": "^2.4.0", "set-interval-async": "1.0.33", "showdown": "^1.9.1", + "svg-pathdata": "5.0.5", "ws": "^7.4.6" }, "devDependencies": { @@ -50,7 +52,6 @@ "@types/dompurify": "^2.3.3", "@types/enzyme-adapter-react-16": "^1.0.6", "@types/jsdom": "^16.2.3", - "@types/puppeteer-core": "^5.4.0", "@types/react": "^16.9.36", "@types/react-addons-test-utils": "^0.14.25", "@types/react-dom": "^16.9.8", @@ -66,6 +67,7 @@ "identity-obj-proxy": "^3.0.0", "jest-dom": "^4.0.0", "react-test-renderer": "^16.12.0", + "replace-in-file": "^6.3.5", "ts-jest": "^26.1.0" }, "resolutions": { @@ -75,6 +77,7 @@ "lodash": "^4.17.21", "path-parse": "^1.0.7", "glob-parent": "^5.1.2", - "css-what": "^5.0.1" + "css-what": "^5.0.1", + "yargs": "16.2.0" } } diff --git a/dashboards-reports/public/components/context_menu/context_menu.js b/dashboards-reports/public/components/context_menu/context_menu.js index 30602ec4..4bf8f80d 100644 --- a/dashboards-reports/public/components/context_menu/context_menu.js +++ b/dashboards-reports/public/components/context_menu/context_menu.js @@ -25,27 +25,30 @@ */ /* eslint-disable no-restricted-globals */ -import $ from 'jquery'; -import dateMath from '@elastic/datemath'; +//@ts-check import { i18n } from '@osd/i18n'; +import $ from 'jquery'; +import { parse } from 'url'; import { readStreamToFile } from '../main/main_utils'; +import { uiSettingsService } from '../utils/settings_service'; +import { + GENERATE_REPORT_PARAM, + GENERATE_REPORT_PARAM_REGEX, +} from '../visual_report/constants'; +import { generateReport } from '../visual_report/generate_report'; import { - contextMenuCreateReportDefinition, - getTimeFieldsFromUrl, - displayLoadingModal, addSuccessOrFailureToast, + contextMenuCreateReportDefinition, contextMenuViewReports, + displayLoadingModal, + getTimeFieldsFromUrl, replaceQueryURL, } from './context_menu_helpers'; import { + getMenuItem, popoverMenu, popoverMenuDiscover, - getMenuItem, } from './context_menu_ui'; -import { timeRangeMatcher } from '../utils/utils'; -import { parse } from 'url'; -import { unhashUrl } from '../../../../../src/plugins/opensearch_dashboards_utils/public'; -import { uiSettingsService } from '../utils/settings_service'; const generateInContextReport = async ( timeRanges, @@ -126,23 +129,28 @@ const generateInContextReport = async ( credentials: 'include', } ) - .then((response) => { - if (response.status === 200) { - $('#reportGenerationProgressModal').remove(); - addSuccessOrFailureToast('success'); - } else { - if (response.status === 403) { + .then(async (response) => [response.status, await response.json()]) + .then(async ([status, data]) => { + if (status !== 200) { + if (status === 403) { addSuccessOrFailureToast('permissionsFailure'); - } else if (response.status === 503) { + } else if (status === 503) { addSuccessOrFailureToast('timeoutFailure', reportSource); } else { addSuccessOrFailureToast('failure'); } + } else if (fileFormat === 'pdf' || fileFormat === 'png') { + try { + await generateReport(data.reportId); + addSuccessOrFailureToast('success'); + } catch (error) { + console.error(error); + addSuccessOrFailureToast('failure'); + } + } else if (data.data) { + await readStreamToFile(data.data, fileFormat, data.filename); } - return response.json(); - }) - .then(async (data) => { - await readStreamToFile(data.data, fileFormat, data.filename); + $('#reportGenerationProgressModal').remove(); }); }; @@ -239,9 +247,34 @@ $(function () { }); }); + checkURLParams(); locationHashChanged(); }); +/* generate a report if flagged in URL params */ +const checkURLParams = async () => { + const [hash, query] = location.href.split('#')[1].split('?'); + const params = new URLSearchParams(query); + const id = params.get(GENERATE_REPORT_PARAM); + if (!id) return; + await new Promise((resolve) => setTimeout(resolve, 1000)); + displayLoadingModal(); + try { + await generateReport(id, 30000); + window.history.replaceState( + {}, + '', + `#${hash}?${query.replace(GENERATE_REPORT_PARAM_REGEX, '')}` + ); + addSuccessOrFailureToast('success'); + } catch (error) { + console.error(error); + addSuccessOrFailureToast('failure'); + } finally { + $('#reportGenerationProgressModal').remove(); + } +}; + const isDiscoverNavMenu = (navMenu) => { return ( navMenu[0].children.length === 5 && diff --git a/dashboards-reports/public/components/context_menu/context_menu_ui.js b/dashboards-reports/public/components/context_menu/context_menu_ui.js index 6a4e2e29..ba971a5f 100644 --- a/dashboards-reports/public/components/context_menu/context_menu_ui.js +++ b/dashboards-reports/public/components/context_menu/context_menu_ui.js @@ -266,7 +266,7 @@ export const popoverMenuDiscover = (savedObjectAvailable) => { export const permissionsMissingOnGeneration = () => { return ` -
+

${i18n.translate( 'opensearch.reports.menu.newNotificationAppears', { defaultMessage: 'A new notification appears' } @@ -297,7 +297,7 @@ export const permissionsMissingOnGeneration = () => { export const reportGenerationSuccess = () => { return ` -

+

A new notification appears

@@ -339,7 +339,7 @@ export const reportGenerationFailure = ( }) ) => { return ` -
+

A new notification appears

@@ -366,7 +366,7 @@ export const reportGenerationFailure = ( export const reportGenerationInProgressModal = () => { return ` -
+
@@ -397,7 +397,7 @@ export const reportGenerationInProgressModal = () => { 'opensearch.reports.menu.progress.youCanClose', { defaultMessage: - 'You can close this dialog while we continue in the background.', + 'Please keep this dialog open while report is being generated.', } )}
@@ -405,9 +405,6 @@ export const reportGenerationInProgressModal = () => {
-
-
-
diff --git a/dashboards-reports/public/components/main/loading_modal/loading_modal.tsx b/dashboards-reports/public/components/main/loading_modal/loading_modal.tsx index 2eb5d080..cba99414 100644 --- a/dashboards-reports/public/components/main/loading_modal/loading_modal.tsx +++ b/dashboards-reports/public/components/main/loading_modal/loading_modal.tsx @@ -80,7 +80,7 @@ export function GenerateReportLoadingModal(props: { setShowLoading: any }) { {i18n.translate('opensearch.reports.loading.youCanClose', { defaultMessage: - 'You can close this dialog while we continue in the background.', + 'Please keep this dialog open while report is being generated.', })} @@ -93,15 +93,6 @@ export function GenerateReportLoadingModal(props: { setShowLoading: any }) { - - - - {i18n.translate('opensearch.reports.loading.close', { - defaultMessage: 'Close', - })} - - - diff --git a/dashboards-reports/public/components/main/main_utils.tsx b/dashboards-reports/public/components/main/main_utils.tsx index c21fcf51..30c10d88 100644 --- a/dashboards-reports/public/components/main/main_utils.tsx +++ b/dashboards-reports/public/components/main/main_utils.tsx @@ -24,12 +24,30 @@ * permissions and limitations under the License. */ -import 'babel-polyfill'; import { i18n } from '@osd/i18n'; -import { HttpFetchOptions, HttpSetup } from '../../../../../src/core/public'; +import 'babel-polyfill'; +import { HttpSetup } from '../../../../../src/core/public'; import { uiSettingsService } from '../utils/settings_service'; +import { GENERATE_REPORT_PARAM } from '../visual_report/constants'; + +export const getAvailableNotificationsChannels = (configList: any) => { + let availableChannels = []; + for (let i = 0; i < configList.length; ++i) { + let channelEntry = {}; + channelEntry = { + label: configList[i].config.name, + id: configList[i].config_id, + }; + availableChannels.push(channelEntry); + } + return availableChannels; +}; + +type fileFormatsOptions = { + [key: string]: string; +}; -export const fileFormatsUpper = { +export const fileFormatsUpper: fileFormatsOptions = { csv: 'CSV', pdf: 'PDF', png: 'PNG', @@ -168,11 +186,23 @@ export const generateReportFromDefinitionId = async ( }) .then(async (response: any) => { // for emailing a report, this API response doesn't have response body - if (response) { - const fileFormat = extractFileFormat(response['filename']); - const fileName = response['filename']; + if (!response) return; + const fileFormat = extractFileFormat(response['filename']); + const fileName = response['filename']; + if (fileFormat === 'csv') { await readStreamToFile(await response['data'], fileFormat, fileName); + status = true; + return; } + + // generate reports in browser is memory intensive, do it in a new process by removing referrer + const a = document.createElement('a'); + a.href = + window.location.origin + + `${response.queryUrl}&${GENERATE_REPORT_PARAM}=${response.reportId}`; + a.target = '_blank'; + a.rel = 'noreferrer'; + a.click(); status = true; }) .catch((error) => { @@ -203,9 +233,20 @@ export const generateReportById = async ( //TODO: duplicate code, extract to be a function that can reuse. e.g. handleResponse(response) const fileFormat = extractFileFormat(response['filename']); const fileName = response['filename']; - await readStreamToFile(await response['data'], fileFormat, fileName); - handleSuccessToast(); - return response; + if (fileFormat === 'csv') { + await readStreamToFile(await response['data'], fileFormat, fileName); + handleSuccessToast(); + return response; + } + + // generate reports in browser is memory intensive, do it in a new process by removing referrer + const a = document.createElement('a'); + a.href = + window.location.origin + + `${response.queryUrl}&${GENERATE_REPORT_PARAM}=${reportId}`; + a.target = '_blank'; + a.rel = 'noreferrer'; + a.click(); }) .catch((error) => { console.log('error on generating report by id:', error); diff --git a/dashboards-reports/public/components/utils/settings_service.ts b/dashboards-reports/public/components/utils/settings_service.ts index 5df595f5..6f37d213 100644 --- a/dashboards-reports/public/components/utils/settings_service.ts +++ b/dashboards-reports/public/components/utils/settings_service.ts @@ -9,13 +9,15 @@ * GitHub history for details. */ -import { IUiSettingsClient } from '../../../../../src/core/public'; +import { HttpStart, IUiSettingsClient } from '../../../../../src/core/public'; let uiSettings: IUiSettingsClient; +let http: HttpStart; export const uiSettingsService = { - init: (client: IUiSettingsClient) => { - uiSettings = client; + init: (uiSettingsClient: IUiSettingsClient, httpClient: HttpStart) => { + uiSettings = uiSettingsClient; + http = httpClient; }, get: (key: string, defaultOverride?: any) => { return uiSettings?.get(key, defaultOverride) || ''; @@ -34,4 +36,5 @@ export const uiSettingsService = { csvSeparator, }; }, + getHttpClient: () => http, }; diff --git a/dashboards-reports/server/routes/utils/visual_report/style.css b/dashboards-reports/public/components/visual_report/assets/report_styles.ts similarity index 97% rename from dashboards-reports/server/routes/utils/visual_report/style.css rename to dashboards-reports/public/components/visual_report/assets/report_styles.ts index c329e281..a78ee8a8 100644 --- a/dashboards-reports/server/routes/utils/visual_report/style.css +++ b/dashboards-reports/public/components/visual_report/assets/report_styles.ts @@ -1,3 +1,9 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export const reportingStyle = ` html, body { margin: 0; @@ -213,3 +219,4 @@ iframe, embed, object { padding: 6px 13px; border: 1px solid #c8ccd0; } +`; diff --git a/dashboards-reports/public/components/visual_report/constants.ts b/dashboards-reports/public/components/visual_report/constants.ts new file mode 100644 index 00000000..c0e6a6d0 --- /dev/null +++ b/dashboards-reports/public/components/visual_report/constants.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import Showdown from 'showdown'; + +// search param key name to trigger report generation, value is a report ID +export const GENERATE_REPORT_PARAM = 'visualReportId'; +export const GENERATE_REPORT_PARAM_REGEX = new RegExp( + '[&?]' + GENERATE_REPORT_PARAM + '=[^&]+', + '' +); + +export enum VISUAL_REPORT_TYPE { + dashboard = 'Dashboard', + visualization = 'Visualization', + notebook = 'Notebook', +} +export enum SELECTOR { + dashboard = '#dashboardViewport', + visualization = '.visEditor__content', + notebook = '.euiPageBody', +} + +export const DEFAULT_REPORT_HEADER = '

OpenSearch Dashboards Reports

'; + +export const converter = new Showdown.Converter({ + tables: true, + simplifiedAutoLink: true, + strikethrough: true, + tasklists: true, + noHeaderId: true, +}); diff --git a/dashboards-reports/public/components/visual_report/generate_report.ts b/dashboards-reports/public/components/visual_report/generate_report.ts new file mode 100644 index 00000000..52e82121 --- /dev/null +++ b/dashboards-reports/public/components/visual_report/generate_report.ts @@ -0,0 +1,207 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import createDOMPurify from 'dompurify'; +import html2canvas from 'html2canvas'; +import jsPDF from 'jspdf'; +import { v1 as uuidv1 } from 'uuid'; +import { ReportSchemaType } from '../../../server/model'; +import { uiSettingsService } from '../utils/settings_service'; +import { reportingStyle } from './assets/report_styles'; +import { + converter, + DEFAULT_REPORT_HEADER, + SELECTOR, + VISUAL_REPORT_TYPE, +} from './constants'; + +const waitForSelector = (selector: string, timeout = 30000) => { + return Promise.race([ + new Promise((resolve) => { + if (document.querySelector(selector)) { + return resolve(document.querySelector(selector)); + } + const observer = new MutationObserver((mutations) => { + if (document.querySelector(selector)) { + resolve(document.querySelector(selector)); + observer.disconnect(); + } + }); + observer.observe(document.body, { + childList: true, + subtree: true, + }); + }), + new Promise((resolve, reject) => + setTimeout( + () => + reject( + 'Timed out waiting for selector ' + + selector + + ' while generating report.' + ), + timeout + ) + ), + ]); +}; + +const timeout = (ms: number) => { + return new Promise((resolve) => setTimeout(resolve, ms)); +}; + +const removeNonReportElements = ( + doc: Document, + reportSource: VISUAL_REPORT_TYPE +) => { + // remove buttons + doc.querySelectorAll("[class^='euiButton']").forEach((e) => e.remove()); + // remove top navBar + doc.querySelectorAll("[class^='euiHeader']").forEach((e) => e.remove()); + // remove visualization editor + if (reportSource === VISUAL_REPORT_TYPE.visualization) { + doc.querySelector('[data-test-subj="splitPanelResizer"]')?.remove(); + doc.querySelector('.visEditor__collapsibleSidebar')?.remove(); + } + doc.body.style.paddingTop = '0px'; +}; + +const addReportHeader = (doc: Document, header: string) => { + const headerHtml = `
+
+
${header}
+
+
`; + const headerContainer = document.createElement('div'); + headerContainer.className = 'reportWrapper'; + headerContainer.innerHTML = headerHtml; + const body = doc.getElementsByTagName('body')[0]; + body.insertBefore(headerContainer, body.children[0]); +}; + +const addReportFooter = (doc: Document, footer: string) => { + const footerHtml = `
+
+
${footer}
+
+
`; + const footerContainer = document.createElement('div'); + footerContainer.className = 'reportWrapper'; + footerContainer.innerHTML = footerHtml; + const body = doc.getElementsByTagName('body')[0]; + body.appendChild(footerContainer); +}; + +const addReportStyle = (doc: Document, style: string) => { + const styleElement = document.createElement('style'); + styleElement.innerHTML = style; + doc.getElementsByTagName('head')[0].appendChild(styleElement); +}; + +const computeHeight = (height: number, header: string, footer: string) => { + let computedHeight = height; + const headerLines = header.split('\n').length; + const footerLines = footer.split('\n').length; + if (headerLines) { + computedHeight += 24 * headerLines; + } + if (footerLines) { + computedHeight += 50 + 24 * footerLines; + } + return computedHeight; +}; + +export const generateReport = async (id: string, forceDelay = 15000) => { + const http = uiSettingsService.getHttpClient(); + const DOMPurify = createDOMPurify(window); + + const report = await http.get( + '../api/reporting/reports/' + id + ); + const format = + report.report_definition.report_params.core_params.report_format; + const reportSource = report.report_definition.report_params + .report_source as unknown as VISUAL_REPORT_TYPE; + const headerInput = report.report_definition.report_params.core_params.header; + const footerInput = report.report_definition.report_params.core_params.footer; + const header = headerInput + ? DOMPurify.sanitize(converter.makeHtml(headerInput)) + : DEFAULT_REPORT_HEADER; + const footer = footerInput + ? DOMPurify.sanitize(converter.makeHtml(footerInput)) + : ''; + const fileName = + report.report_definition.report_params.report_name + + `_${new Date().toISOString()}_${uuidv1()}.${format}`; + + await timeout(1000); + switch (reportSource) { + case VISUAL_REPORT_TYPE.dashboard: + await waitForSelector(SELECTOR.dashboard); + break; + case VISUAL_REPORT_TYPE.visualization: + await waitForSelector(SELECTOR.visualization); + break; + case VISUAL_REPORT_TYPE.notebook: + await waitForSelector(SELECTOR.notebook); + break; + default: + throw Error( + `report source can only be one of [Dashboard, Visualization, Notebook]` + ); + } + await timeout(forceDelay); + + const width = document.documentElement.scrollWidth; + const height = computeHeight( + document.documentElement.scrollHeight, + header, + footer + ); + return html2canvas(document.body, { + windowWidth: width, + windowHeight: height, + width, + height, + imageTimeout: 30000, + useCORS: true, + removeContainer: false, + onclone: function (documentClone) { + removeNonReportElements(documentClone, reportSource); + addReportHeader(documentClone, header); + addReportFooter(documentClone, footer); + addReportStyle(documentClone, reportingStyle); + }, + }).then(function (canvas) { + // TODO remove this and 'removeContainer: false' when https://github.com/niklasvh/html2canvas/pull/2949 is merged + document + .querySelectorAll('.html2canvas-container') + .forEach((e) => { + const iframe = e.contentWindow; + if (e) { + e.src = 'about:blank'; + if (iframe) { + iframe.document.write(''); + iframe.document.clear(); + iframe.close(); + } + e.remove(); + } + }); + + if (format === 'png') { + const link = document.createElement('a'); + link.download = fileName; + link.href = canvas.toDataURL(); + link.click(); + } else { + const orient = canvas.width > canvas.height ? 'landscape' : 'portrait'; + const pdf = new jsPDF(orient, 'px', [canvas.width, canvas.height]); + pdf.addImage(canvas, 'JPEG', 0, 0, canvas.width, canvas.height); + pdf.save(fileName); + } + return true; + }); +}; diff --git a/dashboards-reports/public/plugin.ts b/dashboards-reports/public/plugin.ts index c4bbb23d..f74c71d9 100644 --- a/dashboards-reports/public/plugin.ts +++ b/dashboards-reports/public/plugin.ts @@ -44,7 +44,7 @@ export class ReportsDashboardsPlugin implements Plugin { public setup(core: CoreSetup): ReportsDashboardsPluginSetup { - uiSettingsService.init(core.uiSettings); + uiSettingsService.init(core.uiSettings, core.http); // Register an application into the side navigation menu core.application.register({ id: PLUGIN_ID, diff --git a/dashboards-reports/rendering-engine/headless-chrome/README.md b/dashboards-reports/rendering-engine/headless-chrome/README.md deleted file mode 100644 index 783a9e01..00000000 --- a/dashboards-reports/rendering-engine/headless-chrome/README.md +++ /dev/null @@ -1,56 +0,0 @@ -## Chrome Binaries for OpenSearch Dashboards Reports used by Puppeteer -Headless Chrome for Linux and Mac are chrome binaries which are significantly smaller than the standard binaries shipped by Google and Puppeteer. -Chrome binary can be built from shell script build_headless_chrome.sh for Mac, Linux x64 and Linux arm64, -output of script is called headless_shell. - -## Puppeteer's Chrome version - -Find the puppeteer version used in OpenSearch Dashboards node_modules.json and get the associated chrome SHA to build from crrev.com and puppeteer repositories. Puppeteer 1.9 uses rev 674921 with commit sha as 312d84c8ce62810976feda0d3457108a6dfff9e6) - -## headless Chrome folder structure --chromium - |-chromium - |-chromium - |-src - |-out - |-headless - |-headless_shell # output of scripts - -## How to generate the headless_chrome -This is a shell script to set environment variable, download the source code and build the executable. - -## Commands to create headless_chrome -Run below command to create headless_shell for each platform - -headless-chrome.sh chrome-version-SHA (arch_name (arm64)) -. Mac x64: ./build_headless_chrome.sh -. Linux x64: ./build_headless_chrome.sh -. Linux arm64: ./build_headless_chrome.sh arm64 - -# How to call in Command line: -. PNG report: ./headless_shell --headless --disable-gpu --screenshot=test.png https://docs-beta.opensearch.org/ -. PDF report: ./headless_shell --headless --disable-gpu --print-to-pdf=test.pdf https://docs-beta.opensearch.org/ - -## Headless Chromium for MAC -# Files: - headless_shell - libswiftshader_libGLESv2.dylib - -## Headless Chromium for Linux (arm64 and x64) -# Files: - headless_shell - swiftshader - |-libEGL.so - |-libEGL.so.TOC - |-libGLESv2.so - |-libGLESv2.so.TOC -# Additional libaries: -- Ubuntu needs additional dependencies to run chromium -``` -sudo apt install -y libnss3-dev fonts-liberation libfontconfig1 -``` -- RedHat/CentOS/Amazon Linux 2 needs additional dependencies to run chromium -``` -sudo yum install -y libnss3.so xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype -``` - diff --git a/dashboards-reports/rendering-engine/headless-chrome/build_headless_chrome.sh b/dashboards-reports/rendering-engine/headless-chrome/build_headless_chrome.sh deleted file mode 100644 index 219ba8e8..00000000 --- a/dashboards-reports/rendering-engine/headless-chrome/build_headless_chrome.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/bash - -# Initializes a Linux environment. This need only be done once per -# machine. The OS needs to be a flavor that supports apt get, such as Ubuntu. - -function generateArgs { -if [ $1 == 'linux' ]; then - echo 'import("//build/args/headless.gn") -is_component_build = false -remove_webcore_debug_symbols = true -enable_nacl = false -is_debug = false -symbol_level = 0 -use_kerberos = false' > args.gn -elif [ $1 == 'darwin' ]; then - echo '#args configuration - -icu_use_data_file = false -v8_use_external_startup_data = false -remove_webcore_debug_symbols = true -use_kerberos = false -use_libpci = false -use_pulseaudio = false -use_udev = false -is_debug = false -symbol_level = 0 -is_component_build = false -enable_nacl = false -enable_print_preview = false -enable_basic_printing = false -enable_remoting = false -use_alsa = false -use_cups = false -use_dbus = false -use_gio = false -' > args.gn -fi -} - -ARGC=("$#") - -if [ $ARGC -lt 1 ]; -then - echo "format: build_headless_chrome.sh {chrome_source_version} (arch_name)" - echo "Mac x64: ./build_headless_chrome.sh 312d84c8ce62810976feda0d3457108a6dfff9e6" - echo "Linux x64: ./build_headless_chrome.sh 312d84c8ce62810976feda0d3457108a6dfff9e6" - echo "Linux arm64: ./build_headless_chrome.sh 312d84c8ce62810976feda0d3457108a6dfff9e6 arm64" - exit -fi - -source_version=$1 - -if [ $ARGC -lt 2 ]; -then - arch_name="x64" -else - arch_name=$2 -fi - -if ! [ -x "$(command -v python)" ]; then - echo "Python is not found, please install python or setup python environment properly" - exit -fi - -# Launch the cross-platform init script using a relative path -# from this script's location. -mkdir -p ~/chromium - -if [ "$#" -eq 2 ]; then - arch_name=$2 -fi - -current_folder=$(pwd) - -# find the current platform -platform_name='unknown' -if [[ "$OSTYPE" == "linux-gnu"* ]]; then - platform_name='linux' -elif [[ "$OSTYPE" == "darwin"* ]]; then - platform_name='darwin' -elif [[ "$OSTYPE" == "win32" ]]; then - platform_name='windows' -fi - -if [[ "$platform_name" == "unknown" ]]; then - echo "platform is" $platform_name - exit -fi - -echo "source_version = " $source_version -echo "platform_name = " $platform_name -echo "arch_name = " $arch_name -generateArgs $platform_name - -# Configure git -git config --global core.autocrlf false -git config --global core.filemode false -git config --global branch.autosetuprebase always -cd chromium - -# Grab Chromium's custom build tools, if they aren't already installed -# (On Windows, they are installed before this Python script is run) -if ! [ -d "depot_tools" ] -then - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git -fi - -# Put depot_tools on the path so we can properly run the fetch command -export PATH="$PATH:${HOME}/chromium/depot_tools" -echo ${HOME}/chromium/depot_tools - -# Fetch the Chromium source code - -if [ -d 'chromium' ]; then - echo "chromium src aready exists, please delete it and retry..." - exit -fi - -mkdir -p chromium -cd chromium -pwd - -# Build Linux deps -echo "fetching chromium..." -fetch chromium - - -# Build Linux deps - -cd src -if [[ arch_name -eq "arm64" ]]; then - ./build/linux/sysroot_scripts/install-sysroot.py --arch=$arch_name -fi - -if [[ platform_name -eq "linux" ]]; then - ./build/install-build-deps.sh -fi - - -# Set to "arm" to build for ARM on Linux -echo 'Building Chromium ' $source_version ' for ' $arch_name - -# Sync the codebase to the correct version, syncing master first -# to ensure that we actually have all the versions we may refer to -echo 'Syncing source code' - - -git checkout -f master -git fetch -f origin -gclient sync --with_branch_heads --with_tags --jobs 16 -git checkout $source_version -gclient sync --with_branch_heads --with_tags --jobs 16 -gclient runhooks -echo "current_folder :" $current_folder - -platform_build_args=$current_folder'/args.gn' -#platform_build_args=$current_folder/chromium/build_chromium/$platform_name/args.gn - -outputDir='headless' -mkdir -p 'out/headless' - -echo "platform_build_args :" $platform_build_args - -cp $platform_build_args 'out/headless/args.gn' -echo "platform_build_args :" $platform_build_args -echo 'target_cpu = '\"$arch_name\" >> 'out/headless/args.gn' - -gn gen out/headless - -autoninja -C out/headless headless_shell - -if [[ ($platform_name != "Windows" && $arch_name != 'arm64') ]]; then - echo 'Optimizing headless_shell' - mv out/headless/headless_shell out/headless/headless_shell_raw - strip -o out/headless/headless_shell out/headless/headless_shell_raw -fi diff --git a/dashboards-reports/scripts/patch-html2canvas.js b/dashboards-reports/scripts/patch-html2canvas.js new file mode 100644 index 00000000..c01f5bf4 --- /dev/null +++ b/dashboards-reports/scripts/patch-html2canvas.js @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +// @ts-check +// workaround for Safari support before https://github.com/niklasvh/html2canvas/pull/2911 is merged +const replace = require('replace-in-file'); + +const options = { + files: [ + __dirname + '/../node_modules/html2canvas/**/*.js', + __dirname + '/../node_modules/html2canvas/**/*.js.map', + ], + from: 'if (image.width === width && image.height === height) {', + to: 'if (false && image.width === width && image.height === height) {', +}; + +try { + const changedFiles = replace.sync(options); + console.log( + 'Modified files for html2canvas Safari support:\n', + changedFiles + .filter((file) => file.hasChanged) + .map((file) => file.file) + .join('\n') + ); +} catch (error) { + console.error( + 'Error occurred when modifiying files for html2canvas Safari support:', + error + ); +} diff --git a/dashboards-reports/server/plugin.ts b/dashboards-reports/server/plugin.ts index 8e06740a..27cd6a20 100644 --- a/dashboards-reports/server/plugin.ts +++ b/dashboards-reports/server/plugin.ts @@ -32,8 +32,6 @@ import { Logger, ILegacyClusterClient, } from '../../../src/core/server'; -import { setIntervalAsync } from 'set-interval-async/dynamic'; -import { Semaphore, SemaphoreInterface, withTimeout } from 'async-mutex'; import opensearchReportsPlugin from './backend/opensearch-reports-plugin'; import { ReportsDashboardsPluginSetup, @@ -58,14 +56,14 @@ export class ReportsDashboardsPlugin implements Plugin { private readonly logger: Logger; - private readonly semaphore: SemaphoreInterface; + private readonly initializerContext: PluginInitializerContext< + ReportingConfigType + >; + private reportingConfig?: ReportingConfig; - constructor(initializerContext: PluginInitializerContext) { - this.logger = initializerContext.logger.get(); - - const timeoutError = new Error('Server busy'); - timeoutError.statusCode = 503; - this.semaphore = withTimeout(new Semaphore(1), 300000, timeoutError); + constructor(context: PluginInitializerContext) { + this.logger = context.logger.get(); + this.initializerContext = context; } public setup(core: CoreSetup) { @@ -89,7 +87,6 @@ export class ReportsDashboardsPlugin (context, request) => { return { logger: this.logger, - semaphore: this.semaphore, opensearchReportsClient, }; } diff --git a/dashboards-reports/server/routes/lib/createReport.ts b/dashboards-reports/server/routes/lib/createReport.ts index 05b57b97..7e3b75bd 100644 --- a/dashboards-reports/server/routes/lib/createReport.ts +++ b/dashboards-reports/server/routes/lib/createReport.ts @@ -40,14 +40,12 @@ import { RequestHandlerContext, } from '../../../../../src/core/server'; import { createSavedSearchReport } from '../utils/savedSearchReportHelper'; -import { ReportSchemaType } from '../../model'; +import { ReportSchemaType, VisualReportSchemaType } from '../../model'; import { CreateReportResultType } from '../utils/types'; -import { createVisualReport } from '../utils/visual_report/visualReportHelper'; -import { SetCookie, Headers } from 'puppeteer-core'; -import { updateReportState } from './updateReportState'; import { saveReport } from './saveReport'; -import { SemaphoreInterface } from 'async-mutex'; +import { ReportingConfig } from 'server'; import _ from 'lodash'; +import { getFileName } from '../utils/helpers'; export const createReport = async ( request: OpenSearchDashboardsRequest, @@ -58,8 +56,6 @@ export const createReport = async ( const isScheduledTask = false; //@ts-ignore const logger: Logger = context.reporting_plugin.logger; - //@ts-ignore - const semaphore: SemaphoreInterface = context.reporting_plugin.semaphore; // @ts-ignore const opensearchReportsClient: ILegacyScopedClusterClient = context.reporting_plugin.opensearchReportsClient.asScoped(request); @@ -104,18 +100,24 @@ export const createReport = async ( const completeQueryUrl = `${LOCAL_HOST}${report.query_url}`; const extraHeaders = _.pick(request.headers, EXTRA_HEADERS); - const [value, release] = await semaphore.acquire(); - try { - createReportResult = await createVisualReport( - reportParams, - completeQueryUrl, - logger, - extraHeaders, - timezone - ); - } finally { - release(); - } + const { + core_params, + report_name: reportName, + report_source: reportSource, + } = reportParams; + const coreParams = core_params as VisualReportSchemaType; + const { + header, + footer, + window_height: windowHeight, + window_width: windowWidth, + report_format: reportFormat, + } = coreParams; + const curTime = new Date(); + const timeCreated = curTime.valueOf(); + const fileName = `${getFileName(reportName, curTime)}.${reportFormat}`; + + return { timeCreated, dataUrl: '', fileName, reportId, queryUrl: report.query_url }; } // update report state to "created" // TODO: temporarily remove the following diff --git a/dashboards-reports/server/routes/report.ts b/dashboards-reports/server/routes/report.ts index 493139cb..a293ee2e 100644 --- a/dashboards-reports/server/routes/report.ts +++ b/dashboards-reports/server/routes/report.ts @@ -91,6 +91,8 @@ export default function (router: IRouter) { body: { data: reportData.dataUrl, filename: reportData.fileName, + reportId: reportData.reportId, + queryUrl: reportData.queryUrl, }, }); } catch (error) { @@ -155,6 +157,8 @@ export default function (router: IRouter) { body: { data: reportData.dataUrl, filename: reportData.fileName, + reportId: reportData.reportId, + queryUrl: reportData.queryUrl, }, }); } catch (error) { @@ -222,6 +226,8 @@ export default function (router: IRouter) { body: { data: reportData.dataUrl, filename: reportData.fileName, + reportId: reportData.reportId, + queryUrl: reportData.queryUrl, }, }); } catch (error) { diff --git a/dashboards-reports/server/routes/utils/__tests__/visualReportHelper.test.ts b/dashboards-reports/server/routes/utils/__tests__/visualReportHelper.test.ts deleted file mode 100644 index f94aa5e3..00000000 --- a/dashboards-reports/server/routes/utils/__tests__/visualReportHelper.test.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -/* - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -import 'regenerator-runtime/runtime'; -import { createVisualReport } from '../visual_report/visualReportHelper'; -import { Logger } from '../../../../../../src/core/server'; -import { ReportParamsSchemaType, reportSchema } from '../../../model'; -import { mockLogger } from '../../../../test/__mocks__/loggerMock'; - -const mockHeader = { mockKey: 'mockValue' }; -const input = { - query_url: '/app/dashboards#/view/7adfa750-4c81-11e8-b3d7-01146121b73d', - time_from: 1343576635300, - time_to: 1596037435301, - report_definition: { - report_params: { - report_name: 'test visual report', - report_source: 'Dashboard', - description: 'Hi this is your Dashboard on demand', - core_params: { - base_url: '/app/dashboards#/view/7adfa750-4c81-11e8-b3d7-01146121b73d', - window_width: 1300, - window_height: 900, - report_format: 'png', - time_duration: 'PT5M', - origin: 'http://localhost:5601', - }, - }, - delivery: { - configIds: [], - title: 'title', - textDescription: 'text description', - htmlDescription: 'html description', - }, - trigger: { - trigger_type: 'On demand', - }, - }, -}; - -const mockHtmlPath = `file://${__dirname}/demo_dashboard.html`; - -describe('test create visual report', () => { - test('create report with valid input', async () => { - // Check if the assumption of input is up-to-date - reportSchema.validate(input); - }, 20000); - - test('create png report', async () => { - expect.assertions(3); - const reportParams = input.report_definition.report_params; - const { dataUrl, fileName } = await createVisualReport( - reportParams as ReportParamsSchemaType, - mockHtmlPath, - mockLogger, - mockHeader, - undefined, - /^(data:image|file:\/\/)/ - ); - expect(fileName).toContain(`${reportParams.report_name}`); - expect(fileName).toContain('.png'); - expect(dataUrl).toBeDefined(); - }, 60000); - - test('create pdf report', async () => { - expect.assertions(3); - const reportParams = input.report_definition.report_params; - reportParams.core_params.report_format = 'pdf'; - - const { dataUrl, fileName } = await createVisualReport( - reportParams as ReportParamsSchemaType, - mockHtmlPath, - mockLogger, - mockHeader, - undefined, - /^(data:image|file:\/\/)/ - ); - expect(fileName).toContain(`${reportParams.report_name}`); - expect(fileName).toContain('.pdf'); - expect(dataUrl).toBeDefined(); - }, 60000); -}); diff --git a/dashboards-reports/server/routes/utils/constants.ts b/dashboards-reports/server/routes/utils/constants.ts index 71b7e8e5..b6096fab 100644 --- a/dashboards-reports/server/routes/utils/constants.ts +++ b/dashboards-reports/server/routes/utils/constants.ts @@ -78,12 +78,6 @@ export enum DELIVERY_TYPE { channel = 'Channel', } -export enum SELECTOR { - dashboard = '#dashboardViewport', - visualization = '.visEditor__content', - notebook = '.euiPageBody', -} - // https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-from-size.html export const DEFAULT_MAX_SIZE = 10000; @@ -105,14 +99,6 @@ export const EXTRA_HEADERS = [ 'x-forwarded-for', ]; -export const converter = new Showdown.Converter({ - tables: true, - simplifiedAutoLink: true, - strikethrough: true, - tasklists: true, - noHeaderId: true, -}); - const BLOCKED_KEYWORD = 'BLOCKED_KEYWORD'; const ipv4Regex = /(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])/g const ipv6Regex = /(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/g; @@ -133,8 +119,6 @@ export const replaceBlockedKeywords = (htmlString: string) => { return htmlString; } -export const CHROMIUM_PATH = `${__dirname}/../../../.chromium/headless_shell`; - /** * Metric constants diff --git a/dashboards-reports/server/routes/utils/types.ts b/dashboards-reports/server/routes/utils/types.ts index 6ba79ebe..6b6c74f0 100644 --- a/dashboards-reports/server/routes/utils/types.ts +++ b/dashboards-reports/server/routes/utils/types.ts @@ -28,6 +28,8 @@ export interface CreateReportResultType { timeCreated: number; dataUrl: string; fileName: string; + reportId: string; + queryUrl: string; } type ReportSourceType = 'dashboard' | 'visualization' | 'saved_search' | 'notebook'; diff --git a/dashboards-reports/server/routes/utils/visual_report/footer_template.html b/dashboards-reports/server/routes/utils/visual_report/footer_template.html deleted file mode 100644 index 6fc56f8c..00000000 --- a/dashboards-reports/server/routes/utils/visual_report/footer_template.html +++ /dev/null @@ -1,5 +0,0 @@ -
-
-
-
-
diff --git a/dashboards-reports/server/routes/utils/visual_report/header_template.html b/dashboards-reports/server/routes/utils/visual_report/header_template.html deleted file mode 100644 index 9796c499..00000000 --- a/dashboards-reports/server/routes/utils/visual_report/header_template.html +++ /dev/null @@ -1,5 +0,0 @@ -
-
-
-
-
diff --git a/dashboards-reports/server/routes/utils/visual_report/visualReportHelper.ts b/dashboards-reports/server/routes/utils/visual_report/visualReportHelper.ts deleted file mode 100644 index bf1483bc..00000000 --- a/dashboards-reports/server/routes/utils/visual_report/visualReportHelper.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - * Modifications Copyright OpenSearch Contributors. See - * GitHub history for details. - */ - -/* - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -import puppeteer, { Headers } from 'puppeteer-core'; -import createDOMPurify from 'dompurify'; -import { JSDOM } from 'jsdom'; -import { Logger } from '../../../../../../src/core/server'; -import { - DEFAULT_REPORT_HEADER, - REPORT_TYPE, - FORMAT, - SELECTOR, - CHROMIUM_PATH, - SECURITY_CONSTANTS, - ALLOWED_HOSTS, -} from '../constants'; -import { getFileName } from '../helpers'; -import { CreateReportResultType } from '../types'; -import { ReportParamsSchemaType, VisualReportSchemaType } from 'server/model'; -import { converter, replaceBlockedKeywords } from '../constants'; -import fs from 'fs'; -import _ from 'lodash'; - -export const createVisualReport = async ( - reportParams: ReportParamsSchemaType, - queryUrl: string, - logger: Logger, - extraHeaders: Headers, - timezone?: string, - validRequestProtocol = /^(data:image)/, -): Promise => { - const { - core_params, - report_name: reportName, - report_source: reportSource, - } = reportParams; - const coreParams = core_params as VisualReportSchemaType; - const { - header, - footer, - window_height: windowHeight, - window_width: windowWidth, - report_format: reportFormat, - } = coreParams; - - const window = new JSDOM('').window; - const DOMPurify = createDOMPurify(window); - - let keywordFilteredHeader = header - ? converter.makeHtml(header) - : DEFAULT_REPORT_HEADER; - let keywordFilteredFooter = footer ? converter.makeHtml(footer) : ''; - - keywordFilteredHeader = DOMPurify.sanitize(keywordFilteredHeader); - keywordFilteredFooter = DOMPurify.sanitize(keywordFilteredFooter); - - // filter blocked keywords in header and footer - if (keywordFilteredHeader !== '') { - keywordFilteredHeader = replaceBlockedKeywords(keywordFilteredHeader); - } - if (keywordFilteredFooter !== '') { - keywordFilteredFooter = replaceBlockedKeywords(keywordFilteredFooter); - } - - // set up puppeteer - const browser = await puppeteer.launch({ - headless: true, - /** - * TODO: temp fix to disable sandbox when launching chromium on Linux instance - * https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox - */ - args: [ - '--no-sandbox', - '--disable-setuid-sandbox', - '--disable-gpu', - '--no-zygote', - '--font-render-hinting=none', - '--js-flags="--jitless --no-opt"', - '--disable-features=V8OptimizeJavascript', - ], - executablePath: CHROMIUM_PATH, - env: { - TZ: timezone || 'UTC', - }, - pipe: true, - }); - const page = await browser.newPage(); - - await page.setRequestInterception(true); - let localStorageAvailable = true; - page.on('request', (req) => { - // disallow non-allowlisted connections. urls with valid protocols do not need ALLOWED_HOSTS check - if ( - !validRequestProtocol.test(req.url()) && - !ALLOWED_HOSTS.test(new URL(req.url()).hostname) - ) { - if (req.isNavigationRequest() && req.redirectChain().length > 0) { - localStorageAvailable = false; - logger.error( - 'Reporting does not allow redirections to outside of localhost, aborting. URL received: ' + - req.url() - ); - } else { - logger.warn( - 'Disabled connection to non-allowlist domains: ' + req.url() - ); - } - req.abort(); - } else { - req.continue(); - } - }); - - page.setDefaultNavigationTimeout(0); - page.setDefaultTimeout(300000); // use 300s timeout instead of default 30s - // Set extra headers that are needed - if (!_.isEmpty(extraHeaders)) { - await page.setExtraHTTPHeaders(extraHeaders); - } - logger.info(`original queryUrl ${queryUrl}`); - await page.goto(queryUrl, { waitUntil: 'networkidle0' }); - // should add to local storage after page.goto, then access the page again - browser must have an url to register local storage item on it - try { - await page.evaluate( - /* istanbul ignore next */ - (key) => { - try { - if ( - localStorageAvailable && - typeof localStorage !== 'undefined' && - localStorage !== null - ) { - localStorage.setItem(key, 'false'); - } - } catch (err) {} - }, - SECURITY_CONSTANTS.TENANT_LOCAL_STORAGE_KEY - ); - } catch (err) { - logger.error(err); - } - await page.goto(queryUrl, { waitUntil: 'networkidle0' }); - logger.info(`page url ${page.url()}`); - - await page.setViewport({ - width: windowWidth, - height: windowHeight, - }); - - let buffer: Buffer; - // remove unwanted elements - await page.evaluate( - /* istanbul ignore next */ - (reportSource, REPORT_TYPE) => { - // remove buttons - document - .querySelectorAll("[class^='euiButton']") - .forEach((e) => e.remove()); - // remove top navBar - document - .querySelectorAll("[class^='euiHeader']") - .forEach((e) => e.remove()); - // remove visualization editor - if (reportSource === REPORT_TYPE.visualization) { - document - .querySelector('[data-test-subj="splitPanelResizer"]') - ?.remove(); - document.querySelector('.visEditor__collapsibleSidebar')?.remove(); - } - document.body.style.paddingTop = '0px'; - }, - reportSource, - REPORT_TYPE - ); - - // force wait for any resize to load after the above DOM modification - await new Promise(resolve => setTimeout(resolve, 1000)); - // crop content - switch (reportSource) { - case REPORT_TYPE.dashboard: - await page.waitForSelector(SELECTOR.dashboard, { - visible: true, - }); - break; - case REPORT_TYPE.visualization: - await page.waitForSelector(SELECTOR.visualization, { - visible: true, - }); - break; - case REPORT_TYPE.notebook: - await page.waitForSelector(SELECTOR.notebook, { - visible: true, - }); - break; - default: - throw Error( - `report source can only be one of [Dashboard, Visualization]` - ); - } - - // wait for dynamic page content to render - await waitForDynamicContent(page); - - await addReportHeader(page, keywordFilteredHeader); - await addReportFooter(page, keywordFilteredFooter); - await addReportStyle(page); - - // this causes UT to fail in github CI but works locally - try { - const numDisallowedTags = await page.evaluate( - () => - document.getElementsByTagName('iframe').length + - document.getElementsByTagName('embed').length + - document.getElementsByTagName('object').length - ); - if (numDisallowedTags > 0) { - throw Error('Reporting does not support "iframe", "embed", or "object" tags, aborting'); - } - } catch (error) { - logger.error(error); - } - - // create pdf or png accordingly - if (reportFormat === FORMAT.pdf) { - const scrollHeight = await page.evaluate( - /* istanbul ignore next */ - () => document.documentElement.scrollHeight - ); - - buffer = await page.pdf({ - margin: undefined, - width: windowWidth, - height: scrollHeight + 'px', - printBackground: true, - pageRanges: '1', - }); - } else if (reportFormat === FORMAT.png) { - buffer = await page.screenshot({ - fullPage: true, - }); - } - - const curTime = new Date(); - const timeCreated = curTime.valueOf(); - const fileName = `${getFileName(reportName, curTime)}.${reportFormat}`; - await browser.close(); - - return { timeCreated, dataUrl: buffer.toString('base64'), fileName }; -}; - -const addReportStyle = async (page: puppeteer.Page) => { - const css = fs.readFileSync(`${__dirname}/style.css`).toString(); - - await page.evaluate( - /* istanbul ignore next */ - (style: string) => { - const styleElement = document.createElement('style'); - styleElement.innerHTML = style; - document.getElementsByTagName('head')[0].appendChild(styleElement); - }, - css - ); -}; - -const addReportHeader = async (page: puppeteer.Page, header: string) => { - const headerHtml = fs - .readFileSync(`${__dirname}/header_template.html`) - .toString() - .replace('', header); - - await page.evaluate( - /* istanbul ignore next */ - (headerHtml: string) => { - const content = document.body.firstChild; - const headerContainer = document.createElement('div'); - headerContainer.className = 'reportWrapper'; - headerContainer.innerHTML = headerHtml; - content?.parentNode?.insertBefore(headerContainer, content); - }, - headerHtml - ); -}; - -const addReportFooter = async (page: puppeteer.Page, footer: string) => { - const headerHtml = fs - .readFileSync(`${__dirname}/footer_template.html`) - .toString() - .replace('', footer); - - await page.evaluate( - /* istanbul ignore next */ - (headerHtml: string) => { - const content = document.body.firstChild; - const headerContainer = document.createElement('div'); - headerContainer.className = 'reportWrapper'; - headerContainer.innerHTML = headerHtml; - content?.parentNode?.insertBefore(headerContainer, null); - }, - headerHtml - ); -}; - -// add waitForDynamicContent function -const waitForDynamicContent = async ( - page, - timeout = 30000, - interval = 1000, - checks = 5 -) => { - const maxChecks = timeout / interval; - let passedChecks = 0; - let previousLength = 0; - - let i = 0; - while (i++ <= maxChecks) { - let pageContent = await page.content(); - let currentLength = pageContent.length; - - previousLength === 0 || previousLength != currentLength - ? (passedChecks = 0) - : passedChecks++; - if (passedChecks >= checks) { - break; - } - - previousLength = currentLength; - await new Promise(resolve => setTimeout(resolve, interval)); - } -}; diff --git a/dashboards-reports/translations/pl.json b/dashboards-reports/translations/pl.json index a2f91b6a..468245b8 100644 --- a/dashboards-reports/translations/pl.json +++ b/dashboards-reports/translations/pl.json @@ -123,7 +123,7 @@ "opensearch.reports.loading.close": "Zamknij", "opensearch.reports.loading.generatingReport": "Generowanie raportu.", "opensearch.reports.loading.preparingYourFile": "Przygotowanie pliku do pobrania.", - "opensearch.reports.loading.youCanClose": "Możesz zamknąć to okno dialogowe, raport jest generowany w tle.", + "opensearch.reports.loading.youCanClose": "Nie zamykaj tego okna dialogowego podczas generowania raportu.", "opensearch.reports.main.errorDownloadingReport": "Błąd przy pobieraniu raportu", "opensearch.reports.main.errorGeneratingReportDefinitionsTable.": "Błąd generowania listy definicji raportów.", "opensearch.reports.main.errorGeneratingReportsTable.": "Błąd generowania listy raportów.", @@ -153,7 +153,7 @@ "opensearch.reports.menu.newNotificationAppears": "Pojawiło się nowe powiadomienie", "opensearch.reports.menu.progress.generatingReport": "Generowanie raportu", "opensearch.reports.menu.progress.preparingYourFile": "Przygotowanie pliku do pobrania", - "opensearch.reports.menu.progress.youCanClose": "Możesz zamknąć to okno dialogowe, raport jest generowany w tle.", + "opensearch.reports.menu.progress.youCanClose": "Nie zamykaj tego okna dialogowego podczas generowania raportu.", "opensearch.reports.menu.scheduleAndShare": "Wygeneruj i udostępnij", "opensearch.reports.menu.successfullyGenerated": "Pomyślnie wygenerowano raport.", "opensearch.reports.menu.visual.createReportDefinition": "Utwórz definicję raportu.", diff --git a/dashboards-reports/yarn.lock b/dashboards-reports/yarn.lock index ac3de19f..a234bec1 100644 --- a/dashboards-reports/yarn.lock +++ b/dashboards-reports/yarn.lock @@ -254,6 +254,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.7.tgz#fcb41a5a70550e04a7b708037c7c32f7f356d8fd" + integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ== + dependencies: + regenerator-runtime "^0.13.11" + "@babel/template@^7.10.4", "@babel/template@^7.3.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" @@ -661,19 +668,10 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== -"@types/puppeteer-core@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@types/puppeteer-core/-/puppeteer-core-5.4.0.tgz#880a7917b4ede95cbfe2d5e81a558cfcb072c0fb" - integrity sha512-yqRPuv4EFcSkTyin6Yy17pN6Qz2vwVwTCJIDYMXbE3j8vTPhv0nCQlZOl5xfi0WHUkqvQsjAR8hAfjeMCoetwg== - dependencies: - "@types/puppeteer" "*" - -"@types/puppeteer@*": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-5.4.0.tgz#1ef860bd7a9dcf0c4633aac8c0ec21f75b431868" - integrity sha512-zTYDLjnHjgzokrwKt7N0rgn7oZPYo1J0m8Ghu+gXqzLCEn8RWbELa2uprE2UFJ0jU/Sk0x9jXXdOH/5QQLFHhQ== - dependencies: - "@types/node" "*" +"@types/raf@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@types/raf/-/raf-3.4.0.tgz#2b72cbd55405e071f1c4d29992638e022b20acc2" + integrity sha512-taW5/WYqo36N7V39oYyHP9Ipfd5pNFvGTIQsNGj86xV88YQ7GnI30/yMfKDF7Zgin0m3e+ikX88FvImnK4RjGw== "@types/react-addons-test-utils@^0.14.25": version "0.14.25" @@ -696,7 +694,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^16.9.36": +"@types/react@*": version "16.9.49" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.49.tgz#09db021cf8089aba0cdb12a49f8021a69cce4872" integrity sha512-DtLFjSj0OYAdVLBbyjhuV9CdGVHCkHn2R+xr3XkBvK2rS1Y1tkc14XSGjYgm5Fjjr90AxH9tiSzc1pCFMGO06g== @@ -704,6 +702,20 @@ "@types/prop-types" "*" csstype "^3.0.2" +"@types/react@^16.9.36": + version "16.14.34" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.34.tgz#d129324ffda312044e1c47aab18696e4ed493282" + integrity sha512-b99nWeGGReLh6aKBppghVqp93dFJtgtDOzc8NXM6hewD8PQ2zZG5kBLgbx+VJr7Q7WBMjHxaIl3dwpwwPIUgyA== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/scheduler@*": + version "0.16.2" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" + integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== + "@types/set-interval-async@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/set-interval-async/-/set-interval-async-1.0.0.tgz#7769973e0ded3faee36018795a92b6ba239d668e" @@ -746,13 +758,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yauzl@^2.9.1": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599" - integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw== - dependencies: - "@types/node" "*" - "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -931,13 +936,6 @@ acorn@^6.0.1, acorn@^6.0.4, acorn@^6.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - airbnb-prop-types@^2.16.0: version "2.16.0" resolved "https://registry.yarnpkg.com/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz#b96274cefa1abb14f623f804173ee97c13971dc2" @@ -988,22 +986,22 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - ansi-regex@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -1147,13 +1145,6 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async-mutex@^0.2.6: - version "0.2.6" - resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.2.6.tgz#0d7a3deb978bc2b984d5908a2038e1ae2e54ff40" - integrity sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw== - dependencies: - tslib "^2.0.0" - async@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" @@ -1302,7 +1293,12 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2, base64-js@^1.3.1: +base64-arraybuffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz#1c37589a7c4b0746e34bd1feb951da2df01c1bdc" + integrity sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ== + +base64-js@^1.0.2: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -1349,15 +1345,6 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - blob-util@2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" @@ -1499,6 +1486,11 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +btoa@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73" + integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g== + buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -1523,14 +1515,6 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^5.2.1, buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -1595,6 +1579,20 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +canvg@^3.0.6: + version "3.0.10" + resolved "https://registry.yarnpkg.com/canvg/-/canvg-3.0.10.tgz#8e52a2d088b6ffa23ac78970b2a9eebfae0ef4b3" + integrity sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q== + dependencies: + "@babel/runtime" "^7.12.5" + "@types/raf" "^3.4.0" + core-js "^3.8.3" + raf "^3.4.1" + regenerator-runtime "^0.13.7" + rgbcolor "^1.0.1" + stackblur-canvas "^2.0.0" + svg-pathdata "^6.0.3" + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -1643,6 +1641,14 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + character-entities-legacy@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" @@ -1784,23 +1790,14 @@ cli-truncate@^0.2.1: slice-ansi "0.0.4" string-width "^1.0.1" -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" + wrap-ansi "^7.0.0" code-point-at@^1.0.0: version "1.1.0" @@ -1935,6 +1932,11 @@ core-js@^2.4.0, core-js@^2.5.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== +core-js@^3.6.0, core-js@^3.8.3: + version "3.26.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.1.tgz#7a9816dabd9ee846c1c0fe0e8fcad68f3709134e" + integrity sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1987,13 +1989,6 @@ cron-validator@^1.1.1: resolved "https://registry.yarnpkg.com/cron-validator/-/cron-validator-1.1.1.tgz#0a27bb75508c7bc03c8b840d2d9f170eeacb5615" integrity sha512-vfZb05w/wezuwPZBDvdIBmJp2BvuJExHeyKRa5oBqD2ZDXR61hb3QgPc/3ZhBEQJlAy8Jlnn5XC/JCT3IDqxwg== -cross-fetch@3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - cross-fetch@^3.0.4: version "3.0.6" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c" @@ -2038,6 +2033,13 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" +css-line-break@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-line-break/-/css-line-break-2.1.0.tgz#bfef660dfa6f5397ea54116bb3cb4873edbc4fa0" + integrity sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w== + dependencies: + utrie "^1.0.2" + css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" @@ -2145,13 +2147,6 @@ date-fns@^1.27.2: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== -debug@4, debug@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -2242,11 +2237,6 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -devtools-protocol@0.0.981744: - version "0.0.981744" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.981744.tgz#9960da0370284577d46c28979a0b32651022bacf" - integrity sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg== - diff-sequences@^25.2.6: version "25.2.6" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" @@ -2335,10 +2325,10 @@ domhandler@^3.0, domhandler@^3.0.0: dependencies: domelementtype "^2.0.1" -dompurify@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.8.tgz#224fe9ae57d7ebd9a1ae1ac18c1c1ca3f532226f" - integrity sha512-eVhaWoVibIzqdGYjwsBWodIQIaXFSB+cKDf4cfxLMsK0xiud6SE+/WCVx/Xw/UwQsa4cS3T2eITcdtmTg2UKcw== +dompurify@^2.2.0, dompurify@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.1.tgz#f9cb1a275fde9af6f2d0a2644ef648dd6847b631" + integrity sha512-ewwFzHzrrneRjxzmK6oVz/rZn9VWspGFRDb4/rRtIsM1n36t9AKma/ye8syCpcw+XJ25kOK/hOG7t1j2I2yBqA== domutils@1.5.1: version "1.5.1" @@ -2416,11 +2406,6 @@ elliptic@^6.5.3: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -2431,7 +2416,7 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -2576,6 +2561,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -2784,17 +2774,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" - integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== - dependencies: - debug "^4.1.1" - get-stream "^5.1.0" - yauzl "^2.10.0" - optionalDependencies: - "@types/yauzl" "^2.9.1" - extract-zip@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" @@ -2844,6 +2823,11 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" +fflate@^0.4.8: + version "0.4.8" + resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.4.8.tgz#f90b82aefbd8ac174213abb338bd7ef848f0f5ae" + integrity sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA== + figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" @@ -2907,7 +2891,7 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -2957,11 +2941,6 @@ from2@^2.1.0: inherits "^2.0.1" readable-stream "^2.0.0" -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - fs-extra@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -3029,7 +3008,7 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1: +get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -3055,7 +3034,7 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0, get-stream@^5.1.0: +get-stream@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== @@ -3108,15 +3087,15 @@ glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3, glob@^7.1.4: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== +glob@^7.1.3, glob@^7.1.4, glob@^7.2.0: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" @@ -3287,6 +3266,14 @@ html-to-react@^1.3.4: lodash.camelcase "^4.3.0" ramda "^0.27" +html2canvas@1.4.1, html2canvas@^1.0.0-rc.5: + version "1.4.1" + resolved "https://registry.yarnpkg.com/html2canvas/-/html2canvas-1.4.1.tgz#7cef1888311b5011d507794a066041b14669a543" + integrity sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA== + dependencies: + css-line-break "^2.1.0" + text-segmentation "^1.0.3" + htmlparser2@^3.9.1: version "3.10.1" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" @@ -3323,14 +3310,6 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -3355,7 +3334,7 @@ identity-obj-proxy@^3.0.0: dependencies: harmony-reflect "^1.4.6" -ieee754@^1.1.13, ieee754@^1.1.4: +ieee754@^1.1.4: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -3952,6 +3931,21 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jspdf@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jspdf/-/jspdf-2.5.1.tgz#00c85250abf5447a05f3b32ab9935ab4a56592cc" + integrity sha512-hXObxz7ZqoyhxET78+XR34Xu2qFGrJJ2I2bE5w4SM8eFaFEkW2xcGRVUss360fYelwRSid/jT078kbNvmoW0QA== + dependencies: + "@babel/runtime" "^7.14.0" + atob "^2.1.2" + btoa "^1.2.1" + fflate "^0.4.8" + optionalDependencies: + canvg "^3.0.6" + core-js "^3.6.0" + dompurify "^2.2.0" + html2canvas "^1.0.0-rc.5" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -4408,6 +4402,13 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -4437,11 +4438,6 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp-classic@^0.5.2: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - mkdirp@1.x: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -4518,13 +4514,6 @@ node-fetch@2.6.1: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-fetch@2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -4950,13 +4939,6 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" -pkg-dir@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -5004,11 +4986,6 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" @@ -5037,11 +5014,6 @@ prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" -proxy-from-env@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -5109,24 +5081,6 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer-core@^13.7.0: - version "13.7.0" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-13.7.0.tgz#3344bee3994163f49120a55ddcd144a40575ba5b" - integrity sha512-rXja4vcnAzFAP1OVLq/5dWNfwBGuzcOARJ6qGV7oAZhnLmVRU8G5MsdeQEAOy332ZhkIOnn9jp15R89LKHyp2Q== - dependencies: - cross-fetch "3.1.5" - debug "4.3.4" - devtools-protocol "0.0.981744" - extract-zip "2.0.1" - https-proxy-agent "5.0.1" - pkg-dir "4.2.0" - progress "2.0.3" - proxy-from-env "1.1.0" - rimraf "3.0.2" - tar-fs "2.1.1" - unbzip2-stream "1.4.3" - ws "8.5.0" - qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -5151,6 +5105,13 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= +raf@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" + integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== + dependencies: + performance-now "^2.1.0" + ramda@^0.27: version "0.27.1" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" @@ -5307,7 +5268,7 @@ react-transition-group@^4.3.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@^3.1.1, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -5347,6 +5308,11 @@ regenerator-runtime@^0.11.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== +regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.7: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" @@ -5401,6 +5367,15 @@ replace-ext@1.0.0: resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= +replace-in-file@^6.3.5: + version "6.3.5" + resolved "https://registry.yarnpkg.com/replace-in-file/-/replace-in-file-6.3.5.tgz#ff956b0ab5bc96613207d603d197cd209400a654" + integrity sha512-arB9d3ENdKva2fxRnSjwBEXfK1npgyci7ZZuwysgAp7ORjHSyxz6oqIjTEv8R0Ydl4Ll7uOAZXL4vbkhGIizCg== + dependencies: + chalk "^4.1.2" + glob "^7.2.0" + yargs "^17.2.1" + request-progress@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" @@ -5455,11 +5430,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -5524,12 +5494,10 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@3.0.2, rimraf@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" +rgbcolor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rgbcolor/-/rgbcolor-1.0.1.tgz#d6505ecdb304a6595da26fa4b43307306775945d" + integrity sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw== rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" @@ -5538,6 +5506,13 @@ rimraf@^2.5.4, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -5648,11 +5623,6 @@ serialize-javascript@^4.0.0: dependencies: randombytes "^2.1.0" -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - set-interval-async@1.0.33: version "1.0.33" resolved "https://registry.yarnpkg.com/set-interval-async/-/set-interval-async-1.0.33.tgz#f9a0a2ad7d8fb62cd6eac0ce088a6d631602089c" @@ -5837,6 +5807,11 @@ ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" +stackblur-canvas@^2.0.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz#aa87bbed1560fdcd3138fff344fc6a1c413ebac4" + integrity sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ== + state-toggle@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe" @@ -5909,23 +5884,14 @@ string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - string-width@^4.1.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" string-width@^4.2.0: version "4.2.0" @@ -5980,13 +5946,6 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" @@ -5994,6 +5953,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" @@ -6023,6 +5989,16 @@ supports-color@^7.0.0, supports-color@^7.1.0, supports-color@^7.2.0: dependencies: has-flag "^4.0.0" +svg-pathdata@5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/svg-pathdata/-/svg-pathdata-5.0.5.tgz#65e8d765642ba15fe15434444087d082bc526b29" + integrity sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow== + +svg-pathdata@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/svg-pathdata/-/svg-pathdata-6.0.3.tgz#80b0e0283b652ccbafb69ad4f8f73e8d3fbf2cac" + integrity sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw== + symbol-observable@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" @@ -6043,27 +6019,6 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar-fs@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.1.4" - -tar-stream@^2.1.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - terser-webpack-plugin@^1.4.3: version "1.4.5" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" @@ -6097,6 +6052,13 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +text-segmentation@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/text-segmentation/-/text-segmentation-1.0.3.tgz#52a388159efffe746b24a63ba311b6ac9f2d7943" + integrity sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw== + dependencies: + utrie "^1.0.2" + throttleit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" @@ -6110,11 +6072,6 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - timers-browserify@^2.0.4: version "2.0.12" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" @@ -6201,11 +6158,6 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - trim-trailing-lines@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.3.tgz#7f0739881ff76657b7776e10874128004b625a94" @@ -6243,11 +6195,6 @@ tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" - integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== - tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -6284,14 +6231,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -unbzip2-stream@1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - unherit@^1.0.4: version "1.1.3" resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22" @@ -6439,6 +6378,13 @@ util@^0.11.0: dependencies: inherits "2.0.3" +utrie@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/utrie/-/utrie-1.0.2.tgz#d42fe44de9bc0119c25de7f564a6ed1b2c87a645" + integrity sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw== + dependencies: + base64-arraybuffer "^1.0.2" + uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" @@ -6526,11 +6472,6 @@ watchpack@^1.7.4: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -6585,14 +6526,6 @@ whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - whatwg-url@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" @@ -6602,11 +6535,6 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -6641,19 +6569,10 @@ wrap-ansi@^3.0.1: string-width "^2.1.1" strip-ansi "^4.0.0" -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" @@ -6674,11 +6593,6 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -ws@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" - integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== - ws@^6.1.2: version "6.2.1" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" @@ -6731,7 +6645,7 @@ yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== -yargs-parser@18.x, yargs-parser@^18.1.2: +yargs-parser@18.x: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -6739,47 +6653,23 @@ yargs-parser@18.x, yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" - integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs@^14.2: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== +yargs@16.2.0, yargs@^14.2, yargs@^15.3.1, yargs@^17.2.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^15.0.1" - -yargs@^15.3.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" + y18n "^5.0.5" + yargs-parser "^20.2.2" yauzl@^2.10.0: version "2.10.0"