diff --git a/.webpack/webpack.config.base.js b/.webpack/webpack.config.base.js index 25dfbffcc..24db2a4f3 100644 --- a/.webpack/webpack.config.base.js +++ b/.webpack/webpack.config.base.js @@ -1,12 +1,12 @@ import path from 'path'; - +const { TsConfigPathsPlugin } = require('awesome-typescript-loader'); export const resolveRoot = (...relativePath) => path.resolve(__dirname, '..', ...relativePath); export default { amd: false, // https://github.com/lodash/lodash/issues/3052 target: 'web', entry: { - mermaid: './src/mermaid.js', + mermaid: './src/mermaid.ts', }, resolve: { extensions: ['.wasm', '.mjs', '.js', '.ts', '.json', '.jison'], @@ -14,6 +14,7 @@ export default { fs: false, // jison generated code requires 'fs' path: require.resolve('path-browserify'), }, + plugins: [new TsConfigPathsPlugin()], }, output: { path: resolveRoot('./dist'), diff --git a/.webpack/webpack.config.e2e.babel.js b/.webpack/webpack.config.e2e.babel.js index 3ec2bdcd7..b9c5b7733 100644 --- a/.webpack/webpack.config.e2e.babel.js +++ b/.webpack/webpack.config.e2e.babel.js @@ -4,7 +4,7 @@ import { merge } from 'webpack-merge'; export default merge(baseConfig, { mode: 'development', entry: { - mermaid: './src/mermaid.js', + mermaid: './src/mermaid.ts', e2e: './cypress/platform/viewer.js', 'bundle-test': './cypress/platform/bundle-test.js', }, diff --git a/package.json b/package.json index 94fa72e01..9aceb6568 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,9 @@ "@commitlint/cli": "^17.0.0", "@commitlint/config-conventional": "^17.0.0", "@types/d3": "^7.4.0", + "@types/dompurify": "^2.3.3", "@types/jest": "^28.1.7", + "awesome-typescript-loader": "^5.2.1", "babel-jest": "^28.0.3", "babel-loader": "^8.2.2", "concurrently": "^7.0.0", diff --git a/src/@types/config.d.ts b/src/@types/config.d.ts new file mode 100644 index 000000000..2e947273d --- /dev/null +++ b/src/@types/config.d.ts @@ -0,0 +1,342 @@ +// TODO: This was auto generated from defaultConfig. Needs to be verified. + +import DOMPurify from 'dompurify'; + +export interface MermaidConfig { + theme?: string; + themeVariables?: any; + themeCSS?: string; + maxTextSize?: number; + darkMode?: boolean; + fontFamily?: string; + logLevel?: number; + securityLevel?: string; + startOnLoad?: boolean; + arrowMarkerAbsolute?: boolean; + secure?: string[]; + deterministicIds?: boolean; + deterministicIDSeed?: string; + flowchart?: FlowchartDiagramConfig; + sequence?: SequenceDiagramConfig; + gantt?: GanttDiagramConfig; + journey?: JourneyDiagramConfig; + class?: ClassDiagramConfig; + state?: StateDiagramConfig; + er?: ErDiagramConfig; + pie?: PieDiagramConfig; + requirement?: RequirementDiagramConfig; + gitGraph?: GitGraphDiagramConfig; + c4?: C4DiagramConfig; + dompurifyConfig?: DOMPurify.Config; +} + +// TODO: More configs needs to be moved in here +export interface BaseDiagramConfig extends BaseDiagramConfig { + useWidth?: number; + useMaxWidth?: boolean; +} + +export interface C4DiagramConfig extends BaseDiagramConfig { + diagramMarginX?: number; + diagramMarginY?: number; + c4ShapeMargin?: number; + c4ShapePadding?: number; + width?: number; + height?: number; + boxMargin?: number; + c4ShapeInRow?: number; + nextLinePaddingX?: number; + c4BoundaryInRow?: number; + personFontSize?: string | number; + personFontFamily?: string; + personFontWeight?: string | number; + external_personFontSize?: string | number; + external_personFontFamily?: string; + external_personFontWeight?: string | number; + systemFontSize?: string | number; + systemFontFamily?: string; + systemFontWeight?: string | number; + external_systemFontSize?: string | number; + external_systemFontFamily?: string; + external_systemFontWeight?: string | number; + system_dbFontSize?: string | number; + system_dbFontFamily?: string; + system_dbFontWeight?: string | number; + external_system_dbFontSize?: string | number; + external_system_dbFontFamily?: string; + external_system_dbFontWeight?: string | number; + system_queueFontSize?: string | number; + system_queueFontFamily?: string; + system_queueFontWeight?: string | number; + external_system_queueFontSize?: string | number; + external_system_queueFontFamily?: string; + external_system_queueFontWeight?: string | number; + boundaryFontSize?: string | number; + boundaryFontFamily?: string; + boundaryFontWeight?: string | number; + messageFontSize?: string | number; + messageFontFamily?: string; + messageFontWeight?: string | number; + containerFontSize?: string | number; + containerFontFamily?: string; + containerFontWeight?: string | number; + external_containerFontSize?: string | number; + external_containerFontFamily?: string; + external_containerFontWeight?: string | number; + container_dbFontSize?: string | number; + container_dbFontFamily?: string; + container_dbFontWeight?: string | number; + external_container_dbFontSize?: string | number; + external_container_dbFontFamily?: string; + external_container_dbFontWeight?: string | number; + container_queueFontSize?: string | number; + container_queueFontFamily?: string; + container_queueFontWeight?: string | number; + external_container_queueFontSize?: string | number; + external_container_queueFontFamily?: string; + external_container_queueFontWeight?: string | number; + componentFontSize?: string | number; + componentFontFamily?: string; + componentFontWeight?: string | number; + external_componentFontSize?: string | number; + external_componentFontFamily?: string; + external_componentFontWeight?: string | number; + component_dbFontSize?: string | number; + component_dbFontFamily?: string; + component_dbFontWeight?: string | number; + external_component_dbFontSize?: string | number; + external_component_dbFontFamily?: string; + external_component_dbFontWeight?: string | number; + component_queueFontSize?: string | number; + component_queueFontFamily?: string; + component_queueFontWeight?: string | number; + external_component_queueFontSize?: string | number; + external_component_queueFontFamily?: string; + external_component_queueFontWeight?: string | number; + wrap?: boolean; + wrapPadding?: number; + person_bg_color?: string; + person_border_color?: string; + external_person_bg_color?: string; + external_person_border_color?: string; + system_bg_color?: string; + system_border_color?: string; + system_db_bg_color?: string; + system_db_border_color?: string; + system_queue_bg_color?: string; + system_queue_border_color?: string; + external_system_bg_color?: string; + external_system_border_color?: string; + external_system_db_bg_color?: string; + external_system_db_border_color?: string; + external_system_queue_bg_color?: string; + external_system_queue_border_color?: string; + container_bg_color?: string; + container_border_color?: string; + container_db_bg_color?: string; + container_db_border_color?: string; + container_queue_bg_color?: string; + container_queue_border_color?: string; + external_container_bg_color?: string; + external_container_border_color?: string; + external_container_db_bg_color?: string; + external_container_db_border_color?: string; + external_container_queue_bg_color?: string; + external_container_queue_border_color?: string; + component_bg_color?: string; + component_border_color?: string; + component_db_bg_color?: string; + component_db_border_color?: string; + component_queue_bg_color?: string; + component_queue_border_color?: string; + external_component_bg_color?: string; + external_component_border_color?: string; + external_component_db_bg_color?: string; + external_component_db_border_color?: string; + external_component_queue_bg_color?: string; + external_component_queue_border_color?: string; + personFont?: FontCalculator; + external_personFont?: FontCalculator; + systemFont?: FontCalculator; + external_systemFont?: FontCalculator; + system_dbFont?: FontCalculator; + external_system_dbFont?: FontCalculator; + system_queueFont?: FontCalculator; + external_system_queueFont?: FontCalculator; + containerFont?: FontCalculator; + external_containerFont?: FontCalculator; + container_dbFont?: FontCalculator; + external_container_dbFont?: FontCalculator; + container_queueFont?: FontCalculator; + external_container_queueFont?: FontCalculator; + componentFont?: FontCalculator; + external_componentFont?: FontCalculator; + component_dbFont?: FontCalculator; + external_component_dbFont?: FontCalculator; + component_queueFont?: FontCalculator; + external_component_queueFont?: FontCalculator; + boundaryFont?: FontCalculator; + messageFont?: FontCalculator; +} + +export interface GitGraphDiagramConfig extends BaseDiagramConfig { + diagramPadding?: number; + nodeLabel?: NodeLabel; + mainBranchName?: string; + mainBranchOrder?: number; + showCommitLabel?: boolean; + showBranches?: boolean; + rotateCommitLabel?: boolean; + arrowMarkerAbsolute?: boolean; +} + +export interface NodeLabel { + width?: number; + height?: number; + x?: number; + y?: number; +} + +export interface RequirementDiagramConfig extends BaseDiagramConfig { + rect_fill?: string; + text_color?: string; + rect_border_size?: string; + rect_border_color?: string; + rect_min_width?: number; + rect_min_height?: number; + fontSize?: number; + rect_padding?: number; + line_height?: number; +} + +export interface PieDiagramConfig extends BaseDiagramConfig {} + +export interface ErDiagramConfig extends BaseDiagramConfig { + diagramPadding?: number; + layoutDirection?: string; + minEntityWidth?: number; + minEntityHeight?: number; + entityPadding?: number; + stroke?: string; + fill?: string; + fontSize?: number; +} + +export interface StateDiagramConfig extends BaseDiagramConfig { + dividerMargin?: number; + sizeUnit?: number; + padding?: number; + textHeight?: number; + titleShift?: number; + noteMargin?: number; + forkWidth?: number; + forkHeight?: number; + miniPadding?: number; + fontSizeFactor?: number; + fontSize?: number; + labelHeight?: number; + edgeLengthFactor?: string; + compositTitleSize?: number; + radius?: number; + defaultRenderer?: string; +} + +export interface ClassDiagramConfig extends BaseDiagramConfig { + arrowMarkerAbsolute?: boolean; + dividerMargin?: number; + padding?: number; + textHeight?: number; + defaultRenderer?: string; +} + +export interface JourneyDiagramConfig extends BaseDiagramConfig { + diagramMarginX?: number; + diagramMarginY?: number; + leftMargin?: number; + width?: number; + height?: number; + boxMargin?: number; + boxTextMargin?: number; + noteMargin?: number; + messageMargin?: number; + messageAlign?: string; + bottomMarginAdj?: number; + rightAngles?: boolean; + taskFontSize?: string | number; + taskFontFamily?: string; + taskMargin?: number; + activationWidth?: number; + textPlacement?: string; + actorColours?: string[]; + sectionFills?: string[]; + sectionColours?: string[]; +} + +export interface GanttDiagramConfig extends BaseDiagramConfig { + titleTopMargin?: number; + barHeight?: number; + barGap?: number; + topPadding?: number; + rightPadding?: number; + leftPadding?: number; + gridLineStartPadding?: number; + fontSize?: number; + sectionFontSize?: string | number; + numberSectionStyles?: number; + axisFormat?: string; + topAxis?: boolean; +} + +export interface SequenceDiagramConfig extends BaseDiagramConfig { + hideUnusedParticipants?: boolean; + activationWidth?: number; + diagramMarginX?: number; + diagramMarginY?: number; + actorMargin?: number; + width?: number; + height?: number; + boxMargin?: number; + boxTextMargin?: number; + noteMargin?: number; + messageMargin?: number; + messageAlign?: string; + mirrorActors?: boolean; + forceMenus?: boolean; + bottomMarginAdj?: number; + rightAngles?: boolean; + showSequenceNumbers?: boolean; + actorFontSize?: string | number; + actorFontFamily?: string; + actorFontWeight?: string | number; + noteFontSize?: string | number; + noteFontFamily?: string; + noteFontWeight?: string | number; + noteAlign?: string; + messageFontSize?: string | number; + messageFontFamily?: string; + messageFontWeight?: string | number; + wrap?: boolean; + wrapPadding?: number; + labelBoxWidth?: number; + labelBoxHeight?: number; + messageFont?: FontCalculator; + noteFont?: FontCalculator; + actorFont?: FontCalculator; +} + +export interface FlowchartDiagramConfig extends BaseDiagramConfig { + diagramPadding?: number; + htmlLabels?: boolean; + nodeSpacing?: number; + rankSpacing?: number; + curve?: string; + padding?: number; + defaultRenderer?: string; +} + +export interface FontConfig { + fontSize?: string | number; + fontFamily?: string; + fontWeight?: string | number; +} +export type FontCalculator = () => Partial; diff --git a/src/@types/types.d.ts b/src/@types/types.d.ts new file mode 100644 index 000000000..24318d1d3 --- /dev/null +++ b/src/@types/types.d.ts @@ -0,0 +1 @@ +type DiagramDetector = (text: string) => boolean; diff --git a/src/commonDb.js b/src/commonDb.ts similarity index 57% rename from src/commonDb.js rename to src/commonDb.ts index 90e99faca..42ffde004 100644 --- a/src/commonDb.js +++ b/src/commonDb.ts @@ -3,35 +3,35 @@ import { getConfig } from './config'; let title = ''; let diagramTitle = ''; let description = ''; -const sanitizeText = (txt) => _sanitizeText(txt, getConfig()); +const sanitizeText = (txt: string): string => _sanitizeText(txt, getConfig()); -export const clear = function () { +export const clear = function (): void { title = ''; description = ''; diagramTitle = ''; }; -export const setAccTitle = function (txt) { +export const setAccTitle = function (txt: string): void { title = sanitizeText(txt).replace(/^\s+/g, ''); }; -export const getAccTitle = function () { +export const getAccTitle = function (): string { return title || diagramTitle; }; -export const setAccDescription = function (txt) { +export const setAccDescription = function (txt: string): void { description = sanitizeText(txt).replace(/\n\s+/g, '\n'); }; -export const getAccDescription = function () { +export const getAccDescription = function (): string { return description; }; -export const setDiagramTitle = function (txt) { +export const setDiagramTitle = function (txt: string): void { diagramTitle = sanitizeText(txt); }; -export const getDiagramTitle = function () { +export const getDiagramTitle = function (): string { return diagramTitle; }; diff --git a/src/defaultConfig.js b/src/defaultConfig.ts similarity index 98% rename from src/defaultConfig.js rename to src/defaultConfig.ts index acf85055f..8328510b7 100644 --- a/src/defaultConfig.js +++ b/src/defaultConfig.ts @@ -1,4 +1,5 @@ import theme from './themes'; +import { MermaidConfig } from 'types/config'; /** * **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click * here](8.6.0_docs.md)].** @@ -21,7 +22,7 @@ import theme from './themes'; * * @name Configuration */ -const config = { +const config: Partial = { /** * Theme , the CSS style sheet * @@ -49,12 +50,13 @@ const config = { fontFamily: '"trebuchet ms", verdana, arial, sans-serif;', /** - * | Parameter | Description | Type | Required | Values | - * | --------- | ----------------------------------------------------- | ---------------- | -------- | ------------- | - * | logLevel | This option decides the amount of logging to be used. | string \| number | Required | 1, 2, 3, 4, 5 | + * | Parameter | Description | Type | Required | Values | + * | --------- | ----------------------------------------------------- | ---------------- | -------- | --------------------------------------------- | + * | logLevel | This option decides the amount of logging to be used. | string \| number | Required | 'trace','debug','info','warn','error','fatal' | * * **Notes:** * + * - Trace: 0 * - Debug: 1 * - Info: 2 * - Warn: 3 @@ -1820,11 +1822,12 @@ const config = { }, }; -config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute; -config.gitGraph.arrowMarkerAbsolute = config.arrowMarkerAbsolute; +console.log(JSON.stringify(config)); +if (config.class) config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute; +if (config.gitGraph) config.gitGraph.arrowMarkerAbsolute = config.arrowMarkerAbsolute; -const keyify = (obj, prefix = '') => - Object.keys(obj).reduce((res, el) => { +const keyify = (obj: any, prefix = ''): string[] => + Object.keys(obj).reduce((res: string[], el): string[] => { if (Array.isArray(obj[el])) { return res; } else if (typeof obj[el] === 'object' && obj[el] !== null) { @@ -1833,5 +1836,5 @@ const keyify = (obj, prefix = '') => return [...res, prefix + el]; }, []); -export const configKeys = keyify(config, ''); +export const configKeys: string[] = keyify(config, ''); export default config; diff --git a/src/diagram-api/detectType.ts b/src/diagram-api/detectType.ts index 417d3ace4..3a3250aa0 100644 --- a/src/diagram-api/detectType.ts +++ b/src/diagram-api/detectType.ts @@ -1,3 +1,5 @@ +import type { MermaidConfig } from 'types/config'; + const directive = /[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi; const anyComment = /\s*%%.*\n/gm; @@ -41,7 +43,7 @@ const diagramMatchers: Record = { * }} [cnf] * @returns {string} A graph definition key */ -export const detectType = function (text: string, cnf: ConfigType): string { +export const detectType = function (text: string, cnf: MermaidConfig): string { text = text.replace(directive, '').replace(anyComment, '\n'); for (const [diagram, matcher] of Object.entries(diagramMatchers)) { if (text.match(matcher)) { diff --git a/src/diagrams/common/common.js b/src/diagrams/common/common.ts similarity index 64% rename from src/diagrams/common/common.js rename to src/diagrams/common/common.ts index b4a341169..2d1d06bbc 100644 --- a/src/diagrams/common/common.js +++ b/src/diagrams/common/common.ts @@ -1,19 +1,19 @@ import DOMPurify from 'dompurify'; +import { MermaidConfig } from 'types/config'; /** - * Gets the number of lines in a string + * Gets the rows of lines in a string * * @param {string | undefined} s The string to check the lines for - * @returns {number} The number of lines in that string + * @returns {string[]} The rows in that string */ -export const getRows = (s) => { - if (!s) return 1; - let str = breakToPlaceholder(s); - str = str.replace(/\\n/g, '#br#'); +export const getRows = (s?: string): string[] => { + if (!s) return ['']; + const str = breakToPlaceholder(s).replace(/\\n/g, '#br#'); return str.split('#br#'); }; -export const removeEscapes = (text) => { +export const removeEscapes = (text: string): string => { let newStr = text.replace(/\\u[\dA-F]{4}/gi, function (match) { return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)); }); @@ -35,7 +35,7 @@ export const removeEscapes = (text) => { * @param {string} txt The text to sanitize * @returns {string} The safer text */ -export const removeScript = (txt) => { +export const removeScript = (txt: string): string => { var rs = ''; var idx = 0; @@ -65,49 +65,39 @@ export const removeScript = (txt) => { return decodedText; }; -const sanitizeMore = (text, config) => { - let txt = text; - let htmlLabels = true; - if ( - config.flowchart && - (config.flowchart.htmlLabels === false || config.flowchart.htmlLabels === 'false') - ) { - htmlLabels = false; - } - - if (htmlLabels) { +const sanitizeMore = (text: string, config: MermaidConfig) => { + // TODO Q: Should this check really be here? Feels like we should be sanitizing it regardless. + if (config.flowchart?.htmlLabels !== false) { const level = config.securityLevel; - if (level === 'antiscript' || level === 'strict') { - txt = removeScript(txt); + text = removeScript(text); } else if (level !== 'loose') { - // eslint-disable-line - txt = breakToPlaceholder(txt); - txt = txt.replace(//g, '>'); - txt = txt.replace(/=/g, '='); - txt = placeholderToBreak(txt); + text = breakToPlaceholder(text); + text = text.replace(//g, '>'); + text = text.replace(/=/g, '='); + text = placeholderToBreak(text); } } - - return txt; + return text; }; -export const sanitizeText = (text, config) => { +export const sanitizeText = (text: string, config: MermaidConfig): string => { if (!text) return text; - let txt = ''; - if (config['dompurifyConfig']) { - txt = DOMPurify.sanitize(sanitizeMore(text, config), config['dompurifyConfig']); + if (config.dompurifyConfig) { + text = DOMPurify.sanitize(sanitizeMore(text, config), config.dompurifyConfig).toString(); } else { - txt = DOMPurify.sanitize(sanitizeMore(text, config)); + text = DOMPurify.sanitize(sanitizeMore(text, config)); } - return txt; + return text; }; -export const sanitizeTextOrArray = (a, config) => { +export const sanitizeTextOrArray = ( + a: string | string[] | string[][], + config: MermaidConfig +): string | string[] => { if (typeof a === 'string') return sanitizeText(a, config); - - const f = (x) => sanitizeText(x, config); - return a.flat().map(f); + // TODO Q: Do we need flat? + return a.flat().map((x: string) => sanitizeText(x, config)); }; export const lineBreakRegex = //gi; @@ -118,7 +108,7 @@ export const lineBreakRegex = //gi; * @param {string} text The text to test * @returns {boolean} Whether or not the text has breaks */ -export const hasBreaks = (text) => { +export const hasBreaks = (text: string): boolean => { return lineBreakRegex.test(text); }; @@ -128,7 +118,7 @@ export const hasBreaks = (text) => { * @param {string} text Text to split * @returns {string[]} List of lines as strings */ -export const splitBreaks = (text) => { +export const splitBreaks = (text: string): string[] => { return text.split(lineBreakRegex); }; @@ -138,7 +128,7 @@ export const splitBreaks = (text) => { * @param {string} s HTML with placeholders * @returns {string} HTML with breaks instead of placeholders */ -const placeholderToBreak = (s) => { +const placeholderToBreak = (s: string): string => { return s.replace(/#br#/g, '
'); }; @@ -148,7 +138,7 @@ const placeholderToBreak = (s) => { * @param {string} s HTML string * @returns {string} String with placeholders */ -const breakToPlaceholder = (s) => { +const breakToPlaceholder = (s: string): string => { return s.replace(lineBreakRegex, '#br#'); }; @@ -158,8 +148,9 @@ const breakToPlaceholder = (s) => { * @param {boolean} useAbsolute Whether to return the absolute URL or not * @returns {string} The current URL */ -const getUrl = (useAbsolute) => { +const getUrl = (useAbsolute: boolean): string => { let url = ''; + // TODO Q: If useAbsolute if false, empty string is returned. Bug? if (useAbsolute) { url = window.location.protocol + @@ -180,7 +171,9 @@ const getUrl = (useAbsolute) => { * @param {string | boolean} val String or boolean to convert * @returns {boolean} The result from the input */ -export const evaluate = (val) => (val === 'false' || val === false ? false : true); +// TODO Q: Should we make this check more specific? 'False', '0', 'null' all will evaluate to true. +export const evaluate = (val: string | boolean): boolean => + val === 'false' || val === false ? false : true; export default { getRows, diff --git a/src/mermaid.js b/src/mermaid.ts similarity index 91% rename from src/mermaid.js rename to src/mermaid.ts index 3d2092253..13b693b8c 100644 --- a/src/mermaid.js +++ b/src/mermaid.ts @@ -1,3 +1,5 @@ +// TODO: Remove +// @ts-nocheck /** * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid * functionality and to render the diagrams to svg code. @@ -29,9 +31,9 @@ import utils from './utils'; * * Renders the mermaid diagrams */ -const init = function () { +const init = function (config: any, ...nodes: any[]) { try { - initThrowsErrors(...arguments); + initThrowsErrors(config, nodes); } catch (e) { log.warn('Syntax Error rendering'); log.warn(e.str); @@ -41,25 +43,17 @@ const init = function () { } }; -const initThrowsErrors = function () { +const initThrowsErrors = function (config: any, nodes: any[]) { const conf = mermaidAPI.getConfig(); // console.log('Starting rendering diagrams (init) - mermaid.init', conf); - let nodes; - if (arguments.length >= 2) { - /*! sequence config was passed as #1 */ - if (typeof arguments[0] !== 'undefined') { - mermaid.sequenceConfig = arguments[0]; - } - - nodes = arguments[1]; - } else { - nodes = arguments[0]; + if (config) { + mermaid.sequenceConfig = config; } // if last argument is a function this is the callback function - let callback; - if (typeof arguments[arguments.length - 1] === 'function') { - callback = arguments[arguments.length - 1]; + let callback: (id: string) => void; + if (typeof nodes[nodes.length - 1] === 'function') { + callback = nodes[nodes.length - 1]; log.debug('Callback function found'); } else { if (typeof conf.mermaid !== 'undefined') { @@ -140,7 +134,7 @@ const initThrowsErrors = function () { } }; -const initialize = function (config) { +const initialize = function (config: any) { // mermaidAPI.reset(); if (typeof config.mermaid !== 'undefined') { if (typeof config.mermaid.startOnLoad !== 'undefined') { diff --git a/src/types.d.ts b/src/types.d.ts deleted file mode 100644 index 9570962c9..000000000 --- a/src/types.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -interface ConfigType { - class?: { defaultRenderer: string }; - state?: { defaultRenderer: string }; - flowchart?: { defaultRenderer: string }; -} - -type DiagramDetector = (text: string) => boolean; diff --git a/src/utils.js b/src/utils.js index e7fc5dcb0..24fb965b5 100644 --- a/src/utils.js +++ b/src/utils.js @@ -814,6 +814,7 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) export const initIdGenerator = class iterator { constructor(deterministic, seed) { this.deterministic = deterministic; + // TODO: Seed is only used for length? this.seed = seed; this.count = seed ? seed.length : 0; diff --git a/tsconfig.json b/tsconfig.json index 7fdd4d736..9db9a8874 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Projects */ - // "incremental": true, /* Enable incremental compilation */ + "incremental": true /* Enable incremental compilation */, // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ @@ -11,8 +11,10 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "lib": [ + "ES2021" + ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */, // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ @@ -24,20 +26,25 @@ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ /* Modules */ - "module": "ES6", /* Specify what module code is generated. */ + "module": "ES6" /* Specify what module code is generated. */, // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, + "baseUrl": "./src" /* Specify the base directory to resolve non-relative module names. */, + "paths": { + "types/*": ["@types/*"] + } /* Specify a set of entries that re-map imports to additional lookup locations. */, // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ + "typeRoots": [ + "./node_modules/@types", + "./src/@types" + ] /* Specify multiple folders that act like `./node_modules/@types`. */, // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "resolveJsonModule": true, /* Enable importing .json files */ // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ /* JavaScript Support */ - "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */, // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ @@ -47,7 +54,7 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist", /* Specify an output folder for all emitted files. */ + "outDir": "./dist" /* Specify an output folder for all emitted files. */, // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ @@ -69,12 +76,12 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ + "strict": true /* Enable all strict type-checking options. */, // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ @@ -96,6 +103,6 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ } } diff --git a/yarn.lock b/yarn.lock index 9848cc6bb..7e72ef394 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2437,6 +2437,13 @@ dependencies: "@types/ms" "*" +"@types/dompurify@^2.3.3": + version "2.3.3" + resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-2.3.3.tgz#c24c92f698f77ed9cc9d9fa7888f90cf2bfaa23f" + integrity sha512-nnVQSgRVuZ/843oAfhA25eRSNzUFcBPk/LOiw5gm8mD9/X7CNcbRkQu/OsjCewO8+VIYfPxUnXvPEVGenw14+w== + dependencies: + "@types/trusted-types" "*" + "@types/eslint-scope@^3.7.3": version "3.7.3" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.3.tgz#125b88504b61e3c8bc6f870882003253005c3224" @@ -2675,6 +2682,11 @@ resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw== +"@types/trusted-types@*": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.2.tgz#fc25ad9943bcac11cceb8168db4f275e0e72e756" + integrity sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg== + "@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" @@ -3314,6 +3326,20 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +awesome-typescript-loader@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/awesome-typescript-loader/-/awesome-typescript-loader-5.2.1.tgz#a41daf7847515f4925cdbaa3075d61f289e913fc" + integrity sha512-slv66OAJB8orL+UUaTI3pKlLorwIvS4ARZzYR9iJJyGsEgOqueMfOMdKySWzZ73vIkEe3fcwFgsKMg4d8zyb1g== + dependencies: + chalk "^2.4.1" + enhanced-resolve "^4.0.0" + loader-utils "^1.1.0" + lodash "^4.17.5" + micromatch "^3.1.9" + mkdirp "^0.5.1" + source-map-support "^0.5.3" + webpack-log "^1.2.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -3777,7 +3803,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -4796,6 +4822,14 @@ d3@^5.14, d3@^7.0.0: d3-transition "3" d3-zoom "3" +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + dagre-d3@^0.6.4: version "0.6.4" resolved "https://registry.yarnpkg.com/dagre-d3/-/dagre-d3-0.6.4.tgz#0728d5ce7f177ca2337df141ceb60fbe6eeb7b29" @@ -5328,6 +5362,15 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enhanced-resolve@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" + integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0: version "5.10.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" @@ -5353,6 +5396,13 @@ envinfo@^7.7.3: resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== +errno@^0.1.3: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -5372,6 +5422,32 @@ es-module-lexer@^0.9.0: resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -5797,6 +5873,13 @@ express@^4.17.3: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.6.0.tgz#3871d50641e874cc172e2b53f919842d19db4c52" + integrity sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg== + dependencies: + type "^2.5.0" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -7891,6 +7974,13 @@ json5@^0.5.0: resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.1.2, json5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" @@ -8147,6 +8237,15 @@ loader-utils@^0.2.15: json5 "^0.5.0" object-assign "^4.0.1" +loader-utils@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + loader-utils@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129" @@ -8211,7 +8310,7 @@ lodash.once@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash@^4.17.10, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.4: +lodash@^4.17.10, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.17.5: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -8221,6 +8320,13 @@ log-driver@^1.2.7: resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== +log-symbols@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + log-symbols@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" @@ -8249,6 +8355,14 @@ loglevel@^1.6.0: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.0.tgz#e7ec73a57e1e7b419cb6c6ac06bf050b67356114" integrity sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA== +loglevelnext@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/loglevelnext/-/loglevelnext-1.0.5.tgz#36fc4f5996d6640f539ff203ba819641680d75a2" + integrity sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A== + dependencies: + es6-symbol "^3.1.1" + object.assign "^4.1.0" + longest-streak@^2.0.1: version "2.0.4" resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.4.tgz#b8599957da5b5dab64dee3fe316fa774597d90e4" @@ -8451,6 +8565,14 @@ memfs@^3.4.1: dependencies: fs-monkey "1.0.3" +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + meow@^8.0.0: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -8691,7 +8813,7 @@ micromark@~2.11.0: debug "^4.0.0" parse-entities "^2.0.0" -micromatch@^3.1.5: +micromatch@^3.1.5, micromatch@^3.1.9: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -8786,7 +8908,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -8908,6 +9030,11 @@ netmask@^2.0.1: resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -9671,6 +9798,11 @@ proxy-from-env@^1.0.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" + integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== + ps-tree@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" @@ -10650,7 +10782,7 @@ source-map-support@0.5.13: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@^0.5.16, source-map-support@~0.5.20: +source-map-support@^0.5.16, source-map-support@^0.5.3, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -11089,6 +11221,11 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +tapable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" @@ -11462,6 +11599,16 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.5.0: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -11693,7 +11840,7 @@ uuid@8.3.2, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^3.3.2: +uuid@^3.1.0, uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -12047,6 +12194,16 @@ webpack-dev-server@^4.3.0: webpack-dev-middleware "^5.3.1" ws "^8.4.2" +webpack-log@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-1.2.0.tgz#a4b34cda6b22b518dbb0ab32e567962d5c72a43d" + integrity sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA== + dependencies: + chalk "^2.1.0" + log-symbols "^2.1.0" + loglevelnext "^1.0.1" + uuid "^3.1.0" + webpack-merge@^5.7.3, webpack-merge@^5.8.0: version "5.8.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61"