diff --git a/.eslintrc.json b/.eslintrc.json index 0da42ae61..02753280c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -63,6 +63,13 @@ "rules": { "no-console": "off" } + }, + { + "files": ["./**/*.spec.{ts,js}", "./cypress/**", "./demos/**", "./**/docs/**"], + "rules": { + "jsdoc/require-jsdoc": "off", + "@typescript-eslint/no-unused-vars": "off" + } } ] } diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c7015dbe7..396ff4e6e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -14,7 +14,7 @@ jobs: name: check tests if: github.repository_owner == 'mermaid-js' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - uses: testomatio/check-tests@stable diff --git a/.github/workflows/e2e b/.github/workflows/e2e deleted file mode 100644 index 5b716e429..000000000 --- a/.github/workflows/e2e +++ /dev/null @@ -1,38 +0,0 @@ -name: E2E - -on: [push, pull_request] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] - steps: - - uses: actions/checkout@v3 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - cache: yarn - node-version: ${{ matrix.node-version }} - - - name: Install Yarn - run: npm i yarn --global - - - name: Install Packages - run: | - yarn install --frozen-lockfile - env: - CYPRESS_CACHE_FOLDER: .cache/Cypress - - - name: Run Build - run: yarn build - - - name: Run E2E Tests - run: yarn e2e - env: - CYPRESS_CACHE_FOLDER: .cache/Cypress diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 000000000..06a346aeb --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,38 @@ +name: E2E + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [16.x] + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + cache: yarn + node-version: ${{ matrix.node-version }} + + - name: Install Yarn + run: npm i yarn --global + + - name: Install Packages + run: | + yarn install --frozen-lockfile + env: + CYPRESS_CACHE_FOLDER: .cache/Cypress + + - name: Run Build + run: yarn build + + - name: Run E2E Tests + run: yarn e2e + env: + CYPRESS_CACHE_FOLDER: .cache/Cypress diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97aa0a377..08c35befa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,3 +32,12 @@ jobs: - name: Run Unit Tests run: | yarn ci --coverage + + - name: Upload Coverage to Coveralls + # it feels a bit weird to use @master, but that's what the docs use + # (coveralls also doesn't publish a @v1 we can use) + # https://github.com/marketplace/actions/coveralls-github-action + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: unit diff --git a/.lintstagedrc.json b/.lintstagedrc.json index c53b7f626..1e7c61dd8 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,5 +1,6 @@ { "src/docs/**": ["yarn docs:build --git"], - "*.{ts,js,json,html,md}": ["eslint --fix", "prettier --write"], + "src/docs.mts": ["yarn docs:build --git"], + "*.{ts,js,json,html,md,mts}": ["eslint --fix", "prettier --write"], "*.jison": ["yarn lint:jison"] } diff --git a/applitools.cnfig.js b/applitools.cnfig.js deleted file mode 100644 index 900aabf2e..000000000 --- a/applitools.cnfig.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - testConcurrency: 1, - // browser: [ - // // Add browsers with different viewports - // { width: 800, height: 600, name: 'chrome' }, - // { width: 700, height: 500, name: 'firefox' }, - // { width: 1600, height: 1200, name: 'ie11' }, - // { width: 1024, height: 768, name: 'edgechromium' }, - // { width: 800, height: 600, name: 'safari' }, - // // Add mobile emulation devices in Portrait mode - // { deviceName: 'iPhone X', screenOrientation: 'portrait' }, - // { deviceName: 'Pixel 2', screenOrientation: 'portrait' }, - // ], - // // set batch name to the configuration - // batchName: 'Ultrafast Batch', -}; diff --git a/applitools.config.js b/applitools.config.js new file mode 100644 index 000000000..1c0607868 --- /dev/null +++ b/applitools.config.js @@ -0,0 +1,19 @@ +// eslint-disable-next-line @typescript-eslint/no-var-requires +const { defineConfig } = require('cypress'); + +module.exports = defineConfig({ + testConcurrency: 1, + browser: [ + // Add browsers with different viewports + // { width: 800, height: 600, name: 'chrome' }, + // { width: 700, height: 500, name: 'firefox' }, + // { width: 1600, height: 1200, name: 'ie11' }, + // { width: 1024, height: 768, name: 'edgechromium' }, + // { width: 800, height: 600, name: 'safari' }, + // // Add mobile emulation devices in Portrait mode + // { deviceName: 'iPhone X', screenOrientation: 'portrait' }, + // { deviceName: 'Pixel 2', screenOrientation: 'portrait' }, + ], + // set batch name to the configuration + batchName: `Mermaid ${process.env.APPLI_BRANCH ?? "'no APPLI_BRANCH set'"}`, +}); diff --git a/cypress.config.js b/cypress.config.js index d7c9831d4..b434cec47 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -2,21 +2,20 @@ const { defineConfig } = require('cypress'); const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); -require('@applitools/eyes-cypress')(module); module.exports = defineConfig({ e2e: { - specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', + specPattern: 'cypress/integration/**/*.{js,jsx,ts,tsx}', setupNodeEvents(on, config) { addMatchImageSnapshotPlugin(on, config); // copy any needed variables from process.env to config.env config.env.useAppli = process.env.USE_APPLI ? true : false; - config.env.codeBranch = process.env.APPLI_BRANCH; // do not forget to return the changed config object! return config; }, - supportFile: 'cypress/support/index.js', }, video: false, }); + +require('@applitools/eyes-cypress')(module); diff --git a/cypress/downloads/downloads.html b/cypress/downloads/downloads.html deleted file mode 100644 index b42fc821e..000000000 --- a/cypress/downloads/downloads.html +++ /dev/null @@ -1 +0,0 @@ -Cr24 \ No newline at end of file diff --git a/cypress/helpers/util.js b/cypress/helpers/util.js index b5e64a1e8..d138dfcfe 100644 --- a/cypress/helpers/util.js +++ b/cypress/helpers/util.js @@ -44,15 +44,13 @@ export const imgSnapshotTest = (graphStr, _options, api = false, validation) => } const useAppli = Cypress.env('useAppli'); //const useAppli = false; - const branch = Cypress.env('codeBranch'); cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot'); const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-'); if (useAppli) { cy.eyesOpen({ - appName: 'Mermaid-' + branch, + appName: 'Mermaid', testName: name, - batchName: branch, }); } @@ -96,15 +94,13 @@ export const urlSnapshotTest = (url, _options, api = false, validation) => { options.fontSize = '16px'; } const useAppli = Cypress.env('useAppli'); - const branch = Cypress.env('codeBranch'); cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot'); const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-'); if (useAppli) { cy.eyesOpen({ - appName: 'Mermaid-' + branch, + appName: 'Mermaid', testName: name, - batchName: branch, }); } diff --git a/cypress/integration/other/configuration.spec.js b/cypress/integration/other/configuration.spec.js index a67758d9c..513cf0714 100644 --- a/cypress/integration/other/configuration.spec.js +++ b/cypress/integration/other/configuration.spec.js @@ -15,11 +15,13 @@ describe('Configuration', () => { // Check the marker-end property to make sure it is properly set to // start with # - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(#'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(#'); + }); }); it('should handle default value false of arrowMarkerAbsolute', () => { renderGraph( @@ -35,11 +37,13 @@ describe('Configuration', () => { // Check the marker-end property to make sure it is properly set to // start with # - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(#'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(#'); + }); }); it('should handle arrowMarkerAbsolute explicitly set to false', () => { renderGraph( @@ -57,11 +61,13 @@ describe('Configuration', () => { // Check the marker-end property to make sure it is properly set to // start with # - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(#'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(#'); + }); }); it('should handle arrowMarkerAbsolute explicitly set to "false" as false', () => { renderGraph( @@ -79,15 +85,17 @@ describe('Configuration', () => { // Check the marker-end property to make sure it is properly set to // start with # - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(#'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(#'); + }); }); it('should handle arrowMarkerAbsolute set to true', () => { renderGraph( - `graph TD + `flowchart TD A[Christmas] -->|Get money| B(Go shopping) B --> C{Let me think} C -->|One| D[Laptop] @@ -99,11 +107,13 @@ describe('Configuration', () => { } ); - cy.get('.edgePath path') - .first() - .should('have.attr', 'marker-end') - .should('exist') - .and('include', 'url(http://localhost'); + cy.get('.edgePaths').within(() => { + cy.get('path') + .first() + .should('have.attr', 'marker-end') + .should('exist') + .and('include', 'url(http://localhost'); + }); }); it('should not taint the initial configuration when using multiple directives', () => { const url = 'http://localhost:9000/regression/issue-1874.html'; diff --git a/cypress/integration/other/xss.spec.js b/cypress/integration/other/xss.spec.js index 912354f7d..4911dd8df 100644 --- a/cypress/integration/other/xss.spec.js +++ b/cypress/integration/other/xss.spec.js @@ -81,6 +81,9 @@ describe('XSS', () => { cy.get('#the-malware').should('not.exist'); }); it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { + cy.on('uncaught:exception', (_err, _runnable) => { + return false; // continue rendering even if there if mermaid throws an error + }); cy.visit('http://localhost:9000/xss9.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); diff --git a/cypress/integration/rendering/flowchart.spec.js b/cypress/integration/rendering/flowchart.spec.js index b4e94d1ab..c4ef54fcf 100644 --- a/cypress/integration/rendering/flowchart.spec.js +++ b/cypress/integration/rendering/flowchart.spec.js @@ -745,13 +745,13 @@ describe('Graph', () => { cy.get('svg').should((svg) => { expect(svg).to.have.attr('width', '100%'); // expect(svg).to.have.attr('height'); - // use within because the absolute value can be slightly different depending on the environment ±5% + // use within because the absolute value can be slightly different depending on the environment ±10% // const height = parseFloat(svg.attr('height')); // expect(height).to.be.within(446 * 0.95, 446 * 1.05); const style = svg.attr('style'); expect(style).to.match(/^max-width: [\d.]+px;$/); const maxWidthValue = parseFloat(style.match(/[\d.]+/g).join('')); - expect(maxWidthValue).to.be.within(300 * 0.95, 300 * 1.05); + expect(maxWidthValue).to.be.within(300 * 0.9, 300 * 1.1); }); }); it('39: should render a flowchart when useMaxWidth is false', () => { @@ -768,9 +768,9 @@ describe('Graph', () => { cy.get('svg').should((svg) => { // const height = parseFloat(svg.attr('height')); const width = parseFloat(svg.attr('width')); - // use within because the absolute value can be slightly different depending on the environment ±5% + // use within because the absolute value can be slightly different depending on the environment ±10% // expect(height).to.be.within(446 * 0.95, 446 * 1.05); - expect(width).to.be.within(300 * 0.95, 300 * 1.05); + expect(width).to.be.within(300 * 0.9, 300 * 1.1); expect(svg).to.not.have.attr('style'); }); }); diff --git a/cypress/integration/rendering/gitGraph.spec.js b/cypress/integration/rendering/gitGraph.spec.js index 80981c31c..b0d65d0cc 100644 --- a/cypress/integration/rendering/gitGraph.spec.js +++ b/cypress/integration/rendering/gitGraph.spec.js @@ -213,42 +213,43 @@ describe('Git Graph diagram', () => { ` gitGraph checkout main - commit + %% Make sure to manually set the ID of all commits, for consistent visual tests + commit id: "1-abcdefg" checkout main branch branch1 - commit + commit id: "2-abcdefg" checkout main merge branch1 branch branch2 - commit + commit id: "3-abcdefg" checkout main merge branch2 branch branch3 - commit + commit id: "4-abcdefg" checkout main merge branch3 branch branch4 - commit + commit id: "5-abcdefg" checkout main merge branch4 branch branch5 - commit + commit id: "6-abcdefg" checkout main merge branch5 branch branch6 - commit + commit id: "7-abcdefg" checkout main merge branch6 branch branch7 - commit + commit id: "8-abcdefg" checkout main merge branch7 branch branch8 - commit + commit id: "9-abcdefg" checkout main merge branch8 branch branch9 - commit + commit id: "10-abcdefg" `, {} ); diff --git a/cypress/platform/bundle-test.js b/cypress/platform/bundle-test.js index b4ce798b2..373f8741a 100644 --- a/cypress/platform/bundle-test.js +++ b/cypress/platform/bundle-test.js @@ -1,4 +1,4 @@ -import mermaid from '../../dist/mermaid.core.mjs'; +import mermaid from '../../dist/mermaid.core'; let code = `flowchart LR Power_Supply --> Transmitter_A diff --git a/cypress/platform/knsv.html b/cypress/platform/knsv.html index c98ce70c8..a06667c1f 100644 --- a/cypress/platform/knsv.html +++ b/cypress/platform/knsv.html @@ -39,6 +39,14 @@
+flowchart LR
+  a ---
+    
+
+flowchart LR
+  a2 ---
+    
+
 flowchart LR
   classDef aPID stroke:#4e4403,fill:#fdde29,color:#4e4403,rx:5px,ry:5px;
   classDef crm stroke:#333333,fill:#DCDCDC,color:#333333,rx:5px,ry:5px;
@@ -73,7 +81,31 @@ flowchart TD
     
 flowchart TD
-id
+
+  release-branch[Create Release Branch]:::relClass
+  develop-branch[Update Develop Branch]:::relClass
+  github-release-draft[GitHub Release Draft]:::relClass
+  trigger-pipeline[Trigger Jenkins pipeline]:::fixClass
+  github-release[GitHub Release]:::postClass
+
+  build-ready --> release-branch
+  build-ready --> develop-branch
+  release-branch --> jenkins-release-build
+  jenkins-release-build --> github-release-draft
+  jenkins-release-build --> install-release
+  install-release --> verify-release
+  jenkins-release-build --> announce
+  github-release-draft --> github-release
+  verify-release --> verify-check
+  verify-check -- Yes --> github-release
+  verify-check -- No --> release-fix
+  release-fix --> release-branch-pr
+  verify-check -- No --> delete-artifacts
+  release-branch-pr --> trigger-pipeline
+  delete-artifacts --> trigger-pipeline
+  trigger-pipeline --> jenkins-release-build
+
+
     
 flowchart LR
@@ -99,7 +131,7 @@ flowchart TD
       class A someclass;
       class C someclass;
     
-
+    
    sequenceDiagram
       title: My Sequence Diagram Title
       accTitle: My Acc Sequence Diagram
@@ -109,14 +141,14 @@ flowchart TD
       John-->>Alice: Great!
       Alice-)John: See you later!
     
-
+    
 graph TD
     A -->|000| B
     B -->|111| C
 
     linkStyle 1 stroke:#ff3,stroke-width:4px,color:red;
     
-
+    
   journey
       accTitle: My User Journey Diagram
       accDescr: My User Journey Diagram Description
@@ -130,10 +162,10 @@ graph TD
         Go downstairs: 5: Me
         Sit down: 5: Me
     
-
+    
         info
     
-
+    
 requirementDiagram
       accTitle: My req Diagram
       accDescr: My req Diagram Description
@@ -174,7 +206,7 @@ requirementDiagram
     test_req - contains -> test_req3
     test_req <- copies - test_entity2
     
-
+    
 gantt
     dateFormat  YYYY-MM-DD
     title       Adding GANTT diagram functionality to mermaid
@@ -206,7 +238,7 @@ gantt
     Add gantt diagram to demo page      :20h
     Add another diagram to demo page    :48h
     
-
+    
 stateDiagram
   state Active {
     Idle
@@ -234,7 +266,7 @@ stateDiagram
           end
           B ->> A: Return
     
-
+    
 classDiagram
 accTitle: My class diagram
 accDescr: My class diagram Description
@@ -259,7 +291,7 @@ class Class10 {
         A->>Bob: Hola
         Bob-->A: Pasten !
     
-
+    
       gitGraph
        commit id: "ZERO"
        branch develop
@@ -288,7 +320,7 @@ flowchart TD
       C -->|Two| E[iPhone]
       C -->|Three| F[fa:fa-car Car]
     
-
+    
         classDiagram
           Animal "1" <|-- Duck
           Animal <|-- Fish
@@ -311,7 +343,7 @@ flowchart TD
             +run()
           }
     
-
+    
         erDiagram
     CAR ||--o{ NAMED-DRIVER : allows
     CAR {
@@ -357,6 +389,11 @@ flowchart TD
 
         document.getElementsByTagName('body')[0].appendChild(div);
       }
+
+      mermaid.parseError = function (err, hash) {
+        console.error('In parse error:');
+        console.error(err);
+      };
     
   
 
diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html
index 94b99602a..3be7bfb73 100644
--- a/cypress/platform/knsv2.html
+++ b/cypress/platform/knsv2.html
@@ -47,9 +47,17 @@
     
Security check
-sequenceDiagram
-  Nothing:Valid;
-      
+ flowchart TD + A[myClass1] --> B[default] & C[default] + B[default] & C[default] --> D[myClass2] + classDef default stroke-width:2px,fill:none,stroke:silver + classDef node color:red + classDef myClass1 color:#0000ff + classDef myClass2 stroke:#0000ff,fill:#ccccff + class A myClass1 + class D myClass2 +
@@ -59,6 +67,7 @@ sequenceDiagram }; mermaid.initialize({ startOnLoad: false, + logLevel: 0, // themeVariables: {relationLabelColor: 'red'} }); function callback() { diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js deleted file mode 100644 index ca5a37d5a..000000000 --- a/cypress/plugins/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -// module.exports = (on, config) => { -// // `on` is used to hook into various events Cypress emits -// // `config` is the resolved Cypress config -// } - -const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin'); -require('@applitools/eyes-cypress')(module); - -module.exports = (on, config) => { - addMatchImageSnapshotPlugin(on, config); - // copy any needed variables from process.env to config.env - config.env.useAppli = process.env.USE_APPLI ? true : false; - config.env.codeBranch = process.env.APPLI_BRANCH; - - // do not forget to return the changed config object! - return config; -}; - -require('@applitools/eyes-cypress')(module); diff --git a/cypress/support/index.js b/cypress/support/e2e.js similarity index 90% rename from cypress/support/index.js rename to cypress/support/e2e.js index 1d23c59bf..69d93b4a4 100644 --- a/cypress/support/index.js +++ b/cypress/support/e2e.js @@ -17,8 +17,6 @@ import '@applitools/eyes-cypress/commands'; // Import commands.js using ES2015 syntax: import './commands'; -// import '@percy/cypress'; -import '@applitools/eyes-cypress/commands'; // Alternatively you can use CommonJS syntax: // require('./commands') diff --git a/docs/8.6.0_docs.md b/docs/8.6.0_docs.md index b532a1c94..9cced28ca 100644 --- a/docs/8.6.0_docs.md +++ b/docs/8.6.0_docs.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Version 8.6.0 Changes diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d676920b7..20f7afe3a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Change Log diff --git a/docs/Configuration.md b/docs/Configuration.md index 0df2de104..1cbaa228f 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Configuration diff --git a/docs/README.md b/docs/README.md index 9e149dfdb..e22276488 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # About Mermaid diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 0d32a7010..1b6153b89 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Summary diff --git a/docs/Setup.md b/docs/Setup.md index 2ef56e1d8..32effc937 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -1,16 +1,13 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. ## mermaidAPI -Edit this -Page[\[N|Solid\](img/GitHub-Mark-32px.png)][1] - This is the API to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js. -The core of this api is the [**render**][2] function which, given a graph +The core of this api is the [**render**][1] function which, given a graph definition as text, renders the graph/diagram and returns an svg element for the graph. It is then up to the user of the API to make use of the svg, either insert it somewhere in the @@ -21,7 +18,7 @@ In addition to the render function, a number of behavioral configuration options ## Configuration **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more\[[click -here][3]].** +here][2]].** ## **What follows are config instructions for older versions** @@ -36,7 +33,7 @@ htmlLabels:true, curve:'cardinal', }, }; mermaid.initialize(config);
-A summary of all options and their defaults is found [here][4]. +A summary of all options and their defaults is found [here][3]. A description of each option follows below. ## theme @@ -224,7 +221,7 @@ Default value: true Decides which rendering engine that is to be used for the rendering. Legal values are: dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid -Default value: 'dagre-d3' +Default value: 'dagre-wrapper' ## sequence @@ -367,7 +364,8 @@ Default value: true **Notes:** -This will display arrows that start and begin at the same node as right angles, rather than a curve +This will display arrows that start and begin at the same node as right angles, rather than a +curve Default value: false @@ -719,7 +717,8 @@ Default value: true **Notes:** -This will display arrows that start and begin at the same node as right angles, rather than a curves +This will display arrows that start and begin at the same node as right angles, rather than a +curves Default value: false @@ -1411,10 +1410,10 @@ This sets the auto-wrap padding for the diagram (sides only) ### Parameters -- `text` **[string][5]** -- `parseError` **[Function][6]?** +- `text` **[string][4]** +- `parseError` **[Function][5]?** -Returns **[boolean][7]** +Returns **[boolean][6]** ## setSiteConfig @@ -1433,7 +1432,7 @@ function _Default value: At default, will mirror Global Config_ - `conf` **MermaidConfig** The base currentConfig to use as siteConfig -Returns **[object][8]** The siteConfig +Returns **[object][7]** The siteConfig ## getSiteConfig @@ -1445,7 +1444,7 @@ Returns **[object][8]** The siteConfig **Notes**: Returns **any** values in siteConfig. -Returns **[object][8]** The siteConfig +Returns **[object][7]** The siteConfig ## setConfig @@ -1484,10 +1483,10 @@ $(function () { ### Parameters -- `id` **[string][5]** The id of the element to be rendered -- `text` **[string][5]** The graph definition -- `cb` **function (svgCode: [string][5], bindFunctions: function (element: [Element][9]): void): void** -- `container` **[Element][9]** Selector to element in which a div with the graph temporarily will be +- `id` **[string][4]** The id of the element to be rendered +- `text` **[string][4]** The graph definition +- `cb` **function (svgCode: [string][4], bindFunctions: function (element: [Element][8]): void): void** +- `container` **[Element][8]** Selector to element in which a div with the graph temporarily will be inserted. If one is provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is completed. @@ -1526,7 +1525,7 @@ Pushes in a directive to the configuration ### Parameters -- `directive` **[object][8]** The directive to push in +- `directive` **[object][7]** The directive to push in ## reset @@ -1620,12 +1619,11 @@ Returns **void** ``` -[1]: https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js -[2]: Setup.md?id=render -[3]: 8.6.0_docs.md -[4]: #mermaidapi-configuration-defaults -[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String -[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function -[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean -[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object -[9]: https://developer.mozilla.org/docs/Web/API/Element +[1]: Setup.md?id=render +[2]: 8.6.0_docs.md +[3]: #mermaidapi-configuration-defaults +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object +[8]: https://developer.mozilla.org/docs/Web/API/Element diff --git a/docs/Tutorials.md b/docs/Tutorials.md index 0211d35d0..0eac9ccfe 100644 --- a/docs/Tutorials.md +++ b/docs/Tutorials.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Tutorials diff --git a/docs/_navbar.md b/docs/_navbar.md index 6ec266461..222926fc4 100644 --- a/docs/_navbar.md +++ b/docs/_navbar.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. - Getting started diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 40e46d835..a97bd8d72 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. - 📔 Introduction diff --git a/docs/accessibility.md b/docs/accessibility.md index 820fe364a..70ebef9d1 100644 --- a/docs/accessibility.md +++ b/docs/accessibility.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Accessibility Options diff --git a/docs/breakingChanges.md b/docs/breakingChanges.md index f5bb4ddb3..01088b9dc 100644 --- a/docs/breakingChanges.md +++ b/docs/breakingChanges.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Breaking changes diff --git a/docs/c4c.md b/docs/c4c.md index 1b4251785..48688f1a0 100644 --- a/docs/c4c.md +++ b/docs/c4c.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # C4 Diagrams diff --git a/docs/classDiagram.md b/docs/classDiagram.md index 1576aaa17..6c9ae96fe 100644 --- a/docs/classDiagram.md +++ b/docs/classDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Class diagrams diff --git a/docs/developer-docs/configuration.md b/docs/developer-docs/configuration.md index a10954416..e764e200a 100644 --- a/docs/developer-docs/configuration.md +++ b/docs/developer-docs/configuration.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Configuration diff --git a/docs/development.md b/docs/development.md index 365f639d7..70762be86 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Development and Contribution 🙌 diff --git a/docs/diagrams-and-syntax-and-examples/flowchart.md b/docs/diagrams-and-syntax-and-examples/flowchart.md index 3aef42ef7..0f798d27f 100644 --- a/docs/diagrams-and-syntax-and-examples/flowchart.md +++ b/docs/diagrams-and-syntax-and-examples/flowchart.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. --- diff --git a/docs/directives.md b/docs/directives.md index 943dac53f..8ef732008 100644 --- a/docs/directives.md +++ b/docs/directives.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Directives diff --git a/docs/entityRelationshipDiagram.md b/docs/entityRelationshipDiagram.md index 34e6a3ac6..1f24796b6 100644 --- a/docs/entityRelationshipDiagram.md +++ b/docs/entityRelationshipDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Entity Relationship Diagrams diff --git a/docs/examples.md b/docs/examples.md index 174a2c986..d717083c6 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Examples diff --git a/docs/faq.md b/docs/faq.md index a1b6e4837..ac5eeeb80 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Frequently Asked Questions diff --git a/docs/flowchart.md b/docs/flowchart.md index 4d469f55e..3ff17ad02 100644 --- a/docs/flowchart.md +++ b/docs/flowchart.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Flowcharts - Basic Syntax diff --git a/docs/gantt.md b/docs/gantt.md index b0a302d9f..9d598d977 100644 --- a/docs/gantt.md +++ b/docs/gantt.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Gantt diagrams diff --git a/docs/gitgraph.md b/docs/gitgraph.md index c423c2515..5f86cf53c 100644 --- a/docs/gitgraph.md +++ b/docs/gitgraph.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Gitgraph Diagrams diff --git a/docs/index.html b/docs/index.html index 39d454533..0a41b516c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,6 +1,6 @@ - + mermaid - Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, @@ -21,22 +21,13 @@ rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" /> - <script src="//cdn.jsdelivr.net/npm/mermaid@9.1.6/dist/mermaid.min.js"></script> + <script src="//cdn.jsdelivr.net/npm/mermaid@9.1.7/dist/mermaid.min.js"></script> <!-- <script src="http://localhost:9000/mermaid.js"></script> --> - <script> - // prettier-ignore - (function (i, s, o, g, r, a, m) { - i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { - (i[r].q = i[r].q || []).push(arguments) - }, i[r].l = 1 * new Date(); a = s.createElement(o), - m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) - })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); - - ga('create', 'UA-153180559-1', 'auto'); - if (location) { - ga('send', 'pageview', location.hash); - } - </script> + <script + defer="" + data-domain="mermaid-js.github.io" + src="https://plausible.io/js/plausible.js" + ></script> <script> var require = { paths: { vs: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.29.1/min/vs' }, diff --git a/docs/integrations.md b/docs/integrations.md index 16e735779..57d3bd316 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Integrations diff --git a/docs/introduction.md b/docs/introduction.md index 38c7c7a0e..992fbafc1 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1 +1 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. diff --git a/docs/landing/index.html b/docs/landing/index.html index 9b1e3749f..2431ad9bd 100644 --- a/docs/landing/index.html +++ b/docs/landing/index.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html lang="en"> - <head> + <!--# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs.--><head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> @@ -64,7 +64,7 @@ using Mermaid.js. </p> <a - href="https://www.amazon.com/Official-Guide-Mermaid-js-beautiful-flowcharts-dp-1801078025/dp/1801078025/ref=mt_other?_encoding=UTF8&me=&qid=1628153965" + href="https://www.amazon.com/Official-Guide-Mermaid-js-beautiful-flowcharts-dp-1801078025/dp/1801078025/ref=mt_other?_encoding=UTF8&me=&qid=1628153965" > <button style="background: #ffa41c; border: 1px solid #ff8f00" @@ -322,7 +322,7 @@ </p> </h3> <a - href="https://www.amazon.com/Official-Guide-Mermaid-js-beautiful-flowcharts-dp-1801078025/dp/1801078025/ref=mt_other?_encoding=UTF8&me=&qid=1628153965" + href="https://www.amazon.com/Official-Guide-Mermaid-js-beautiful-flowcharts-dp-1801078025/dp/1801078025/ref=mt_other?_encoding=UTF8&me=&qid=1628153965" > <button style="background: #ffa41c; border: 1px solid #ff8f00" diff --git a/docs/mermaidCLI.md b/docs/mermaidCLI.md index e3249315b..0d32c5472 100644 --- a/docs/mermaidCLI.md +++ b/docs/mermaidCLI.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # mermaid CLI diff --git a/docs/mindmap.md b/docs/mindmap.md index 6ab954f5b..3d435d68a 100644 --- a/docs/mindmap.md +++ b/docs/mindmap.md @@ -1,9 +1,7 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Mindmap -**Edit this Page** [![N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/src/docs/mindmap.md) - > Mindmap: This is an experimental diagram for now. The syntax and properties can change in future releases. The syntax is stabel except for the icon integration which is the experimental part. "A mind map is a diagram used to visually organize information into a hierarchy, showing relationships among pieces of the whole. It is often created around a single concept, drawn as an image in the center of a blank page, to which associated representations of ideas such as images, words and parts of words are added. Major ideas are connected directly to the central concept, and other ideas branch out from those major ideas." Wikipedia diff --git a/docs/n00b-advanced.md b/docs/n00b-advanced.md index 4e9d74b98..b8970142a 100644 --- a/docs/n00b-advanced.md +++ b/docs/n00b-advanced.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Advanced n00b mermaid (Coming soon..) diff --git a/docs/n00b-gettingStarted.md b/docs/n00b-gettingStarted.md index f3ade5559..505542539 100644 --- a/docs/n00b-gettingStarted.md +++ b/docs/n00b-gettingStarted.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # A Mermaid User-Guide for Beginners diff --git a/docs/n00b-overview.md b/docs/n00b-overview.md index 913fcc2f6..c109b63f2 100644 --- a/docs/n00b-overview.md +++ b/docs/n00b-overview.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Overview for Beginners diff --git a/docs/n00b-syntaxReference.md b/docs/n00b-syntaxReference.md index 9f18e3d28..d25c6425e 100644 --- a/docs/n00b-syntaxReference.md +++ b/docs/n00b-syntaxReference.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Diagram Syntax diff --git a/docs/newDiagram.md b/docs/newDiagram.md index e2191f1de..285cb7637 100644 --- a/docs/newDiagram.md +++ b/docs/newDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Adding a New Diagram/Chart 📊 diff --git a/docs/pie.md b/docs/pie.md index 1e13e3872..79dcbfee5 100644 --- a/docs/pie.md +++ b/docs/pie.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Pie chart diagrams diff --git a/docs/requirementDiagram.md b/docs/requirementDiagram.md index c510183d9..d31967871 100644 --- a/docs/requirementDiagram.md +++ b/docs/requirementDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Requirement Diagram diff --git a/docs/security.md b/docs/security.md index e2990eb5b..ee9033ca2 100644 --- a/docs/security.md +++ b/docs/security.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Security diff --git a/docs/sequenceDiagram.md b/docs/sequenceDiagram.md index ae0bd5e45..97968a676 100644 --- a/docs/sequenceDiagram.md +++ b/docs/sequenceDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Sequence diagrams diff --git a/docs/stateDiagram.md b/docs/stateDiagram.md index 6af3b0bc4..8ea9fd239 100644 --- a/docs/stateDiagram.md +++ b/docs/stateDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # State diagrams diff --git a/docs/theming.md b/docs/theming.md index 287499eff..9ba136ec4 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Theme Configuration diff --git a/docs/upgrading.md b/docs/upgrading.md index fd7f72d82..c4d7bd3bd 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Upgrading diff --git a/docs/usage.md b/docs/usage.md index 02bd1bb13..e59670d02 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # Usage diff --git a/docs/user-journey.md b/docs/user-journey.md index 9e213f425..e0d924f85 100644 --- a/docs/user-journey.md +++ b/docs/user-journey.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in src/docs. # User Journey Diagram diff --git a/jest.config.js b/jest.config.js index c3d972313..5b43d379d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,13 +5,16 @@ module.exports = { testEnvironment: 'jsdom', preset: 'ts-jest', transform: { - '^.+\\.tsx?$': ['jest-esbuild', { banner: '"use strict";' }], - '^.+\\.jsx?$': ['jest-esbuild', { banner: '"use strict";' }], + '^.+\\.[jt]sx?$': 'esbuild-jest', '^.+\\.jison$': [ path.resolve(__dirname, './src/jison/transformer.js'), { 'token-stack': true }, ], }, + coveragePathIgnorePatterns: [ + '/node_modules/', + '^.+\\.jison$', // might be able to fix in future if .jison adds source-map support + ], transformIgnorePatterns: ['/node_modules/(?!dagre-d3-renderer/lib|khroma).*\\.js'], testPathIgnorePatterns: ['/node_modules/', '.cache', './cypress'], moduleNameMapper: { diff --git a/package.json b/package.json index 91d000832..5b681f04d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mermaid", - "version": "9.1.6", + "version": "9.2.0-rc1", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "main": "dist/mermaid.core.mjs", "module": "dist/mermaid.core.mjs", @@ -69,14 +69,14 @@ "d3": "^7.0.0", "dagre": "^0.8.5", "dagre-d3": "^0.6.4", - "dompurify": "2.3.10", + "dompurify": "2.4.0", "fast-clone": "^1.5.13", "graphlib": "^2.1.8", "khroma": "^2.0.0", "lodash": "^4.17.21", "moment-mini": "^2.24.0", "non-layered-tidy-tree-layout": "^2.0.2", - "stylis": "^4.0.10" + "stylis": "^4.1.2" }, "devDependencies": { "@applitools/eyes-cypress": "^3.25.7", @@ -89,20 +89,20 @@ "@types/jest": "^28.1.7", "@types/lodash": "^4.14.184", "@types/stylis": "^4.0.2", - "@typescript-eslint/eslint-plugin": "^5.36.1", - "@typescript-eslint/parser": "^5.36.1", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", "concurrently": "^7.0.0", "coveralls": "^3.0.2", - "cypress": "9.7.0", + "cypress": "^10.0.0", "cypress-image-snapshot": "^4.0.1", "documentation": "13.2.0", "esbuild": "^0.15.6", - "esbuild-loader": "^2.19.0", - "eslint": "^8.23.0", + "esbuild-jest": "^0.5.0", + "eslint": "^8.23.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-cypress": "^2.12.1", "eslint-plugin-html": "^7.1.0", - "eslint-plugin-jest": "^27.0.1", + "eslint-plugin-jest": "^27.0.4", "eslint-plugin-jsdoc": "^39.3.6", "eslint-plugin-json": "^3.1.0", "eslint-plugin-markdown": "^3.0.0", @@ -111,8 +111,7 @@ "husky": "^8.0.0", "identity-obj-proxy": "^3.0.0", "jest": "^28.0.3", - "jest-environment-jsdom": "^29.0.2", - "jest-esbuild": "^0.2.9", + "jest-environment-jsdom": "^29.0.3", "jison": "^0.4.18", "js-base64": "3.7.2", "lint-staged": "^13.0.0", @@ -124,9 +123,8 @@ "rimraf": "^3.0.2", "start-server-and-test": "^1.12.6", "ts-jest": "^28.0.8", - "ts-loader": "^9.3.1", "ts-node": "^10.9.1", - "typescript": "^4.8.2", + "typescript": "^4.8.3", "unist-util-flatmap": "^1.0.0" }, "resolutions": { diff --git a/src/assignWithDepth.js b/src/assignWithDepth.js index 9f44b01ee..eff568d3e 100644 --- a/src/assignWithDepth.js +++ b/src/assignWithDepth.js @@ -1,3 +1,4 @@ +'use strict'; /** * @function assignWithDepth Extends the functionality of {@link ObjectConstructor.assign} with the * ability to merge arbitrary-depth objects For each key in src with path `k` (recursively) diff --git a/src/dagre-wrapper/createLabel.js b/src/dagre-wrapper/createLabel.js index 631fb7645..ba0ce4a5d 100644 --- a/src/dagre-wrapper/createLabel.js +++ b/src/dagre-wrapper/createLabel.js @@ -1,11 +1,9 @@ import { select } from 'd3'; import { log } from '../logger'; import { getConfig } from '../config'; -import { sanitizeText, evaluate } from '../diagrams/common/common'; +import { evaluate } from '../diagrams/common/common'; import { decodeEntities } from '../mermaidAPI'; -const sanitizeTxt = (txt) => sanitizeText(txt, getConfig()); - /** * @param dom * @param styleFn diff --git a/src/dagre-wrapper/edges.js b/src/dagre-wrapper/edges.js index 86e41de1d..6ed08e924 100644 --- a/src/dagre-wrapper/edges.js +++ b/src/dagre-wrapper/edges.js @@ -472,7 +472,8 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph // }); let url = ''; - if (getConfig().state.arrowMarkerAbsolute) { + // // TODO: Can we load this config only from the rendered graph type? + if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) { url = window.location.protocol + '//' + diff --git a/src/dagre-wrapper/markers.js b/src/dagre-wrapper/markers.js index b28be4119..fa229d231 100644 --- a/src/dagre-wrapper/markers.js +++ b/src/dagre-wrapper/markers.js @@ -119,7 +119,7 @@ const dependency = (elem, type) => { .append('path') .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z'); }; -const lollipop = (elem, type, id) => { +const lollipop = (elem, type) => { elem .append('defs') .append('marker') diff --git a/src/dagre-wrapper/nodes.js b/src/dagre-wrapper/nodes.js index 344210e93..f25eb2e86 100644 --- a/src/dagre-wrapper/nodes.js +++ b/src/dagre-wrapper/nodes.js @@ -6,9 +6,7 @@ import intersect from './intersect/index.js'; import createLabel from './createLabel'; import note from './shapes/note'; import { parseMember } from '../diagrams/class/svgDraw'; -import { evaluate, sanitizeText as sanitize } from '../diagrams/common/common'; - -const sanitizeText = (txt) => sanitize(txt, getConfig()); +import { evaluate } from '../diagrams/common/common'; const question = (parent, node) => { const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true); @@ -348,7 +346,7 @@ const rect = (parent, node) => { }; const labelRect = (parent, node) => { - const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'label', true); + const { shapeSvg } = labelHelper(parent, node, 'label', true); log.trace('Classes = ', node.classes); // add the rect diff --git a/src/defaultConfig.ts b/src/defaultConfig.ts index 60d867437..681fda60c 100644 --- a/src/defaultConfig.ts +++ b/src/defaultConfig.ts @@ -228,9 +228,9 @@ const config: Partial<MermaidConfig> = { * Decides which rendering engine that is to be used for the rendering. Legal values are: * dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid * - * Default value: 'dagre-d3' + * Default value: 'dagre-wrapper' */ - defaultRenderer: 'dagre-d3', + defaultRenderer: 'dagre-wrapper', }, /** The object containing configurations specific for sequence diagrams */ @@ -387,7 +387,8 @@ const config: Partial<MermaidConfig> = { * * **Notes:** * - * This will display arrows that start and begin at the same node as right angles, rather than a curve + * This will display arrows that start and begin at the same node as right angles, rather than a + * curve * * Default value: false */ @@ -802,7 +803,8 @@ const config: Partial<MermaidConfig> = { * * **Notes:** * - * This will display arrows that start and begin at the same node as right angles, rather than a curves + * This will display arrows that start and begin at the same node as right angles, rather than a + * curves * * Default value: false */ diff --git a/src/diagram-api/detectType.ts b/src/diagram-api/detectType.ts index 87b681767..817de5149 100644 --- a/src/diagram-api/detectType.ts +++ b/src/diagram-api/detectType.ts @@ -1,26 +1,12 @@ import { MermaidConfig } from '../config.type'; -export type DiagramDetector = (text: string) => boolean; +export type DiagramDetector = (text: string, config?: MermaidConfig) => boolean; const directive = /[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi; const anyComment = /\s*%%.*\n/gm; const detectors: Record<string, DiagramDetector> = {}; -const diagramMatchers: Record<string, RegExp> = { - c4: /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/, - sequence: /^\s*sequenceDiagram/, - gantt: /^\s*gantt/, - classDiagram: /^\s*classDiagram-v2/, - stateDiagram: /^\s*stateDiagram-v2/, - 'flowchart-v2': /^\s*flowchart/, // Might need to add |graph to fix #3391 - info: /^\s*info/, - pie: /^\s*pie/, - er: /^\s*erDiagram/, - journey: /^\s*journey/, - // gitGraph: /^\s*gitGraph/, - requirement: /^\s*requirement(Diagram)?/, -}; /** * @function detectType Detects the type of the graph text. Takes into consideration the possible @@ -47,28 +33,9 @@ const diagramMatchers: Record<string, RegExp> = { */ export const detectType = function (text: string, config?: MermaidConfig): string { text = text.replace(directive, '').replace(anyComment, '\n'); - for (const [diagram, matcher] of Object.entries(diagramMatchers)) { - if (text.match(matcher)) { - return diagram; - } - } - - if (text.match(/^\s*classDiagram/)) { - if (config?.class?.defaultRenderer === 'dagre-wrapper') return 'classDiagram'; - return 'class'; - } - - if (text.match(/^\s*stateDiagram/)) { - if (config?.state?.defaultRenderer === 'dagre-wrapper') return 'stateDiagram'; - return 'state'; - } - - if (config?.flowchart?.defaultRenderer === 'dagre-wrapper') { - return 'flowchart-v2'; - } for (const [key, detector] of Object.entries(detectors)) { - if (detector(text)) { + if (detector(text, config)) { return key; } } diff --git a/src/diagram-api/diagram-orchestration.ts b/src/diagram-api/diagram-orchestration.ts index ea0c76ffa..d68d4da79 100644 --- a/src/diagram-api/diagram-orchestration.ts +++ b/src/diagram-api/diagram-orchestration.ts @@ -1,20 +1,340 @@ import { registerDiagram } from './diagramAPI'; -import * as mindmapDb from '../diagrams/mindmap/mindmapDb'; -import mindmapRenderer from '../diagrams/mindmap/mindmapRenderer'; + // @ts-ignore: TODO Fix ts errors import mindmapParser from '../diagrams/mindmap/parser/mindmap'; +import * as mindmapDb from '../diagrams/mindmap/mindmapDb'; import { mindmapDetector } from '../diagrams/mindmap/mindmapDetector'; +import mindmapRenderer from '../diagrams/mindmap/mindmapRenderer'; import mindmapStyles from '../diagrams/mindmap/styles'; -import gitGraphDb from '../diagrams/git/gitGraphAst'; -import gitGraphRenderer from '../diagrams/git/gitGraphRenderer'; // @ts-ignore: TODO Fix ts errors import gitGraphParser from '../diagrams/git/parser/gitGraph'; import { gitGraphDetector } from '../diagrams/git/gitGraphDetector'; +import gitGraphDb from '../diagrams/git/gitGraphAst'; +import gitGraphRenderer from '../diagrams/git/gitGraphRenderer'; import gitGraphStyles from '../diagrams/git/styles'; +// @ts-ignore: TODO Fix ts errors +import c4Parser from '../diagrams/c4/parser/c4Diagram'; +import { c4Detector } from '../diagrams/c4/c4Detector'; +import c4Db from '../diagrams/c4/c4Db'; +import c4Renderer from '../diagrams/c4/c4Renderer'; +import c4Styles from '../diagrams/c4/styles'; + +// @ts-ignore: TODO Fix ts errors +import classParser from '../diagrams/class/parser/classDiagram'; +import { classDetector } from '../diagrams/class/classDetector'; +import { classDetectorV2 } from '../diagrams/class/classDetector-V2'; +import classDb from '../diagrams/class/classDb'; +import classRenderer from '../diagrams/class/classRenderer'; +import classRendererV2 from '../diagrams/class/classRenderer-v2'; +import classStyles from '../diagrams/class/styles'; + +// @ts-ignore: TODO Fix ts errors +import erParser from '../diagrams/er/parser/erDiagram'; +import { erDetector } from '../diagrams/er/erDetector'; +import erDb from '../diagrams/er/erDb'; +import erRenderer from '../diagrams/er/erRenderer'; +import erStyles from '../diagrams/er/styles'; + +// @ts-ignore: TODO Fix ts errors +import flowParser from '../diagrams/flowchart/parser/flow'; +import { flowDetector } from '../diagrams/flowchart/flowDetector'; +import { flowDetectorV2 } from '../diagrams/flowchart/flowDetector-v2'; +import flowDb from '../diagrams/flowchart/flowDb'; +import flowRenderer from '../diagrams/flowchart/flowRenderer'; +import flowRendererV2 from '../diagrams/flowchart/flowRenderer-v2'; +import flowStyles from '../diagrams/flowchart/styles'; + +// @ts-ignore: TODO Fix ts errors +import ganttParser from '../diagrams/gantt/parser/gantt'; +import { ganttDetector } from '../diagrams/gantt/ganttDetector'; +import ganttDb from '../diagrams/gantt/ganttDb'; +import ganttRenderer from '../diagrams/gantt/ganttRenderer'; +import ganttStyles from '../diagrams/gantt/styles'; + +// @ts-ignore: TODO Fix ts errors +import infoParser from '../diagrams/info/parser/info'; +import infoDb from '../diagrams/info/infoDb'; +import infoRenderer from '../diagrams/info/infoRenderer'; +import { infoDetector } from '../diagrams/info/infoDetector'; +import infoStyles from '../diagrams/info/styles'; + +// @ts-ignore: TODO Fix ts errors +import pieParser from '../diagrams/pie/parser/pie'; +import { pieDetector } from '../diagrams/pie/pieDetector'; +import pieDb from '../diagrams/pie/pieDb'; +import pieRenderer from '../diagrams/pie/pieRenderer'; +import pieStyles from '../diagrams/pie/styles'; + +// @ts-ignore: TODO Fix ts errors +import requirementParser from '../diagrams/requirement/parser/requirementDiagram'; +import { requirementDetector } from '../diagrams/requirement/requirementDetector'; +import requirementDb from '../diagrams/requirement/requirementDb'; +import requirementRenderer from '../diagrams/requirement/requirementRenderer'; +import requirementStyles from '../diagrams/requirement/styles'; + +// @ts-ignore: TODO Fix ts errors +import sequenceParser from '../diagrams/sequence/parser/sequenceDiagram'; +import { sequenceDetector } from '../diagrams/sequence/sequenceDetector'; +import sequenceDb from '../diagrams/sequence/sequenceDb'; +import sequenceRenderer from '../diagrams/sequence/sequenceRenderer'; +import sequenceStyles from '../diagrams/sequence/styles'; + +// @ts-ignore: TODO Fix ts errors +import stateParser from '../diagrams/state/parser/stateDiagram'; +import { stateDetector } from '../diagrams/state/stateDetector'; +import { stateDetectorV2 } from '../diagrams/state/stateDetector-V2'; +import stateDb from '../diagrams/state/stateDb'; +import stateRenderer from '../diagrams/state/stateRenderer'; +import stateRendererV2 from '../diagrams/state/stateRenderer-v2'; +import stateStyles from '../diagrams/state/styles'; + +// @ts-ignore: TODO Fix ts errors +import journeyParser from '../diagrams/user-journey/parser/journey'; +import { journeyDetector } from '../diagrams/user-journey/journeyDetector'; +import journeyDb from '../diagrams/user-journey/journeyDb'; +import journeyRenderer from '../diagrams/user-journey/journeyRenderer'; +import journeyStyles from '../diagrams/user-journey/styles'; +import { getConfig, setConfig } from '../config'; + +import errorRenderer from '../diagrams/error/errorRenderer'; +import errorStyles from '../diagrams/error/styles'; + export const addDiagrams = () => { - // Register mindmap and other built-in diagrams + registerDiagram( + 'error', + // Special diagram with error messages but setup as a regular diagram + { + db: { + clear: () => { + // Quite ok, clear needs to be there for error to work as a regular diagram + }, + }, + styles: errorStyles, + renderer: errorRenderer, + parser: { + parser: { yy: {} }, + parse: () => { + // no op + }, + }, + init: () => { + // no op + }, + }, + (text) => text.toLowerCase().trim() === 'error' + ); + registerDiagram( + 'c4', + { + parser: c4Parser, + db: c4Db, + renderer: c4Renderer, + styles: c4Styles, + init: (cnf) => { + c4Renderer.setConf(cnf.c4); + }, + }, + c4Detector + ); + registerDiagram( + 'class', + { + parser: classParser, + db: classDb, + renderer: classRenderer, + styles: classStyles, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + classDb.clear(); + }, + }, + classDetector + ); + registerDiagram( + 'classDiagram', + { + parser: classParser, + db: classDb, + renderer: classRendererV2, + styles: classStyles, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + classDb.clear(); + }, + }, + classDetectorV2 + ); + registerDiagram( + 'er', + { + parser: erParser, + db: erDb, + renderer: erRenderer, + styles: erStyles, + }, + erDetector + ); + registerDiagram( + 'gantt', + { + parser: ganttParser, + db: ganttDb, + renderer: ganttRenderer, + styles: ganttStyles, + }, + ganttDetector + ); + registerDiagram( + 'info', + { + parser: infoParser, + db: infoDb, + renderer: infoRenderer, + styles: infoStyles, + }, + infoDetector + ); + registerDiagram( + 'pie', + { + parser: pieParser, + db: pieDb, + renderer: pieRenderer, + styles: pieStyles, + }, + pieDetector + ); + registerDiagram( + 'requirement', + { + parser: requirementParser, + db: requirementDb, + renderer: requirementRenderer, + styles: requirementStyles, + }, + requirementDetector + ); + registerDiagram( + 'sequence', + { + parser: sequenceParser, + db: sequenceDb, + renderer: sequenceRenderer, + styles: sequenceStyles, + init: (cnf) => { + if (!cnf.sequence) { + cnf.sequence = {}; + } + cnf.sequence.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + if ('sequenceDiagram' in cnf) { + throw new Error( + '`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.' + ); + } + sequenceDb.setWrap(cnf.wrap); + sequenceRenderer.setConf(cnf.sequence); + }, + }, + sequenceDetector + ); + registerDiagram( + 'state', + { + parser: stateParser, + db: stateDb, + renderer: stateRenderer, + styles: stateStyles, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + stateDb.clear(); + }, + }, + stateDetector + ); + registerDiagram( + 'stateDiagram', + { + parser: stateParser, + db: stateDb, + renderer: stateRendererV2, + styles: stateStyles, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + stateDb.clear(); + }, + }, + stateDetectorV2 + ); + registerDiagram( + 'journey', + { + parser: journeyParser, + db: journeyDb, + renderer: journeyRenderer, + styles: journeyStyles, + init: (cnf) => { + journeyRenderer.setConf(cnf.journey); + journeyDb.clear(); + }, + }, + journeyDetector + ); + + registerDiagram( + 'flowchart', + { + parser: flowParser, + db: flowDb, + renderer: flowRendererV2, + styles: flowStyles, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + // TODO, broken as of 2022-09-14 (13809b50251845475e6dca65cc395761be38fbd2) + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + flowRenderer.setConf(cnf.flowchart); + flowDb.clear(); + flowDb.setGen('gen-1'); + }, + }, + flowDetector + ); + registerDiagram( + 'flowchart-v2', + { + parser: flowParser, + db: flowDb, + renderer: flowRendererV2, + styles: flowStyles, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + // flowchart-v2 uses dagre-wrapper, which doesn't have access to flowchart cnf + setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } }); + flowRendererV2.setConf(cnf.flowchart); + flowDb.clear(); + flowDb.setGen('gen-2'); + }, + }, + flowDetectorV2 + ); registerDiagram( 'gitGraph', { parser: gitGraphParser, db: gitGraphDb, renderer: gitGraphRenderer, styles: gitGraphStyles }, diff --git a/src/diagram-api/diagramAPI.spec.ts b/src/diagram-api/diagramAPI.spec.ts index f72384c11..e0c7a283d 100644 --- a/src/diagram-api/diagramAPI.spec.ts +++ b/src/diagram-api/diagramAPI.spec.ts @@ -1,5 +1,8 @@ import { detectType } from './detectType'; import { getDiagram, registerDiagram } from './diagramAPI'; +import { addDiagrams } from './diagram-orchestration'; + +addDiagrams(); describe('DiagramAPI', () => { it('should return default diagrams', () => { diff --git a/src/diagram-api/diagramAPI.ts b/src/diagram-api/diagramAPI.ts index 652e66465..9a86c5b51 100644 --- a/src/diagram-api/diagramAPI.ts +++ b/src/diagram-api/diagramAPI.ts @@ -1,70 +1,23 @@ -import c4Db from '../diagrams/c4/c4Db'; -import c4Renderer from '../diagrams/c4/c4Renderer'; -import c4Styles from '../diagrams/c4/styles'; -// @ts-ignore: TODO Fix ts errors -import c4Parser from '../diagrams/c4/parser/c4Diagram'; -import classDb from '../diagrams/class/classDb'; -import classRenderer from '../diagrams/class/classRenderer'; -import classRendererV2 from '../diagrams/class/classRenderer-v2'; -import classStyles from '../diagrams/class/styles'; -// @ts-ignore: TODO Fix ts errors -import classParser from '../diagrams/class/parser/classDiagram'; -import erDb from '../diagrams/er/erDb'; -import erRenderer from '../diagrams/er/erRenderer'; -// @ts-ignore: TODO Fix ts errors -import erParser from '../diagrams/er/parser/erDiagram'; -import erStyles from '../diagrams/er/styles'; -import flowDb from '../diagrams/flowchart/flowDb'; -import flowRenderer from '../diagrams/flowchart/flowRenderer'; -import flowRendererV2 from '../diagrams/flowchart/flowRenderer-v2'; -import flowStyles from '../diagrams/flowchart/styles'; -// @ts-ignore: TODO Fix ts errors -import flowParser from '../diagrams/flowchart/parser/flow'; -import ganttDb from '../diagrams/gantt/ganttDb'; -import ganttRenderer from '../diagrams/gantt/ganttRenderer'; -// @ts-ignore: TODO Fix ts errors -import ganttParser from '../diagrams/gantt/parser/gantt'; -import ganttStyles from '../diagrams/gantt/styles'; - -import infoDb from '../diagrams/info/infoDb'; -import infoRenderer from '../diagrams/info/infoRenderer'; -// @ts-ignore: TODO Fix ts errors -import infoParser from '../diagrams/info/parser/info'; -import infoStyles from '../diagrams/info/styles'; -// @ts-ignore: TODO Fix ts errors -import pieParser from '../diagrams/pie/parser/pie'; -import pieDb from '../diagrams/pie/pieDb'; -import pieRenderer from '../diagrams/pie/pieRenderer'; -import pieStyles from '../diagrams/pie/styles'; -// @ts-ignore: TODO Fix ts errors -import requirementParser from '../diagrams/requirement/parser/requirementDiagram'; -import requirementDb from '../diagrams/requirement/requirementDb'; -import requirementRenderer from '../diagrams/requirement/requirementRenderer'; -import requirementStyles from '../diagrams/requirement/styles'; -// @ts-ignore: TODO Fix ts errors -import sequenceParser from '../diagrams/sequence/parser/sequenceDiagram'; -import sequenceDb from '../diagrams/sequence/sequenceDb'; -import sequenceRenderer from '../diagrams/sequence/sequenceRenderer'; -import sequenceStyles from '../diagrams/sequence/styles'; -// @ts-ignore: TODO Fix ts errors -import stateParser from '../diagrams/state/parser/stateDiagram'; -import stateDb from '../diagrams/state/stateDb'; -import stateRenderer from '../diagrams/state/stateRenderer'; -import stateRendererV2 from '../diagrams/state/stateRenderer-v2'; -import stateStyles from '../diagrams/state/styles'; -import journeyDb from '../diagrams/user-journey/journeyDb'; -import journeyRenderer from '../diagrams/user-journey/journeyRenderer'; -import journeyStyles from '../diagrams/user-journey/styles'; -// @ts-ignore: TODO Fix ts errors -import journeyParser from '../diagrams/user-journey/parser/journey'; -import { addDetector, DiagramDetector } from './detectType'; -import { log as _log } from '../logger'; +import { addDetector, DiagramDetector as _DiagramDetector } from './detectType'; +import { log as _log, setLogLevel as _setLogLevel } from '../logger'; import { getConfig as _getConfig } from '../config'; import { sanitizeText as _sanitizeText } from '../diagrams/common/common'; import { MermaidConfig } from '../config.type'; import { setupGraphViewbox as _setupGraphViewbox } from '../setupGraphViewbox'; import { addStylesForDiagram } from '../styles'; +/* + Packaging and exposing resources for externa diagrams so that they can import + diagramAPI and have access to selct parts of mermaid common code reqiored to + create diagrams worling like the internal diagrams. +*/ +export const log = _log; +export const setLogLevel = _setLogLevel; +export type DiagramDetector = _DiagramDetector; +export const getConfig = _getConfig; +export const sanitizeText = (text: string) => _sanitizeText(text, getConfig()); +export const setupGraphViewbox = _setupGraphViewbox; + export interface DiagramDefinition { db: any; renderer: any; @@ -73,158 +26,7 @@ export interface DiagramDefinition { init?: (config: MermaidConfig) => void; } -const diagrams: Record<string, DiagramDefinition> = { - c4: { - db: c4Db, - renderer: c4Renderer, - parser: c4Parser, - init: (cnf) => { - c4Renderer.setConf(cnf.c4); - }, - styles: c4Styles, - }, - class: { - db: classDb, - renderer: classRenderer, - parser: classParser, - init: (cnf) => { - if (!cnf.class) { - cnf.class = {}; - } - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - classDb.clear(); - }, - styles: classStyles, - }, - classDiagram: { - db: classDb, - renderer: classRendererV2, - parser: classParser, - init: (cnf) => { - if (!cnf.class) { - cnf.class = {}; - } - cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - classDb.clear(); - }, - styles: classStyles, - }, - er: { - db: erDb, - renderer: erRenderer, - parser: erParser, - styles: erStyles, - }, - flowchart: { - db: flowDb, - renderer: flowRenderer, - parser: flowParser, - init: (cnf) => { - flowRenderer.setConf(cnf.flowchart); - if (!cnf.flowchart) { - cnf.flowchart = {}; - } - cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - flowDb.clear(); - flowDb.setGen('gen-1'); - }, - styles: flowStyles, - }, - 'flowchart-v2': { - db: flowDb, - renderer: flowRendererV2, - parser: flowParser, - init: (cnf) => { - flowRendererV2.setConf(cnf.flowchart); - if (!cnf.flowchart) { - cnf.flowchart = {}; - } - cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - flowDb.clear(); - flowDb.setGen('gen-2'); - }, - styles: flowStyles, - }, - gantt: { - db: ganttDb, - renderer: ganttRenderer, - parser: ganttParser, - styles: ganttStyles, - }, - info: { - db: infoDb, - renderer: infoRenderer, - parser: infoParser, - styles: infoStyles, - }, - pie: { - db: pieDb, - renderer: pieRenderer, - parser: pieParser, - styles: pieStyles, - }, - requirement: { - db: requirementDb, - renderer: requirementRenderer, - parser: requirementParser, - styles: requirementStyles, - }, - sequence: { - db: sequenceDb, - renderer: sequenceRenderer, - parser: sequenceParser, - init: (cnf) => { - if (!cnf.sequence) { - cnf.sequence = {}; - } - cnf.sequence.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - if ('sequenceDiagram' in cnf) { - throw new Error( - '`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.' - ); - } - sequenceDb.setWrap(cnf.wrap); - sequenceRenderer.setConf(cnf.sequence); - }, - styles: sequenceStyles, - }, - state: { - db: stateDb, - renderer: stateRenderer, - parser: stateParser, - init: (cnf) => { - if (!cnf.state) { - cnf.state = {}; - } - cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - stateDb.clear(); - }, - styles: stateStyles, - }, - stateDiagram: { - db: stateDb, - renderer: stateRendererV2, - parser: stateParser, - init: (cnf) => { - if (!cnf.state) { - cnf.state = {}; - } - cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; - stateDb.clear(); - }, - styles: stateStyles, - }, - journey: { - db: journeyDb, - renderer: journeyRenderer, - parser: journeyParser, - init: (cnf) => { - journeyRenderer.setConf(cnf.journey); - journeyDb.clear(); - }, - styles: journeyStyles, - }, -}; +const diagrams: Record<string, DiagramDefinition> = {}; export const registerDiagram = ( id: string, @@ -245,8 +47,3 @@ export const getDiagram = (name: string): DiagramDefinition => { } throw new Error(`Diagram ${name} not found.`); }; - -export const log = _log; -export const getConfig = _getConfig; -export const sanitizeText = (text: string) => _sanitizeText(text, getConfig()); -export const setupGraphViewbox = _setupGraphViewbox; diff --git a/src/diagrams/c4/c4Db.js b/src/diagrams/c4/c4Db.js index d53d6d31f..79028a0c5 100644 --- a/src/diagrams/c4/c4Db.js +++ b/src/diagrams/c4/c4Db.js @@ -1,6 +1,5 @@ import mermaidAPI from '../../mermaidAPI'; import * as configApi from '../../config'; -import { log } from '../../logger'; import { sanitizeText } from '../common/common'; import { setAccTitle, getAccTitle, getAccDescription, setAccDescription } from '../../commonDb'; @@ -21,7 +20,6 @@ let boundarys = [ let rels = []; let title = ''; let wrapEnabled = false; -let description = ''; let c4ShapeInRow = 4; let c4BoundaryInRow = 2; var c4Type; @@ -636,13 +634,13 @@ export const updateLayoutConfig = function (typeC4Shape, c4ShapeInRowParam, c4Bo let c4BoundaryInRowValue = c4BoundaryInRow; if (typeof c4ShapeInRowParam === 'object') { - let [key, value] = Object.entries(c4ShapeInRowParam)[0]; + const value = Object.values(c4ShapeInRowParam)[0]; c4ShapeInRowValue = parseInt(value); } else { c4ShapeInRowValue = parseInt(c4ShapeInRowParam); } if (typeof c4BoundaryInRowParam === 'object') { - let [key, value] = Object.entries(c4BoundaryInRowParam)[0]; + const value = Object.values(c4BoundaryInRowParam)[0]; c4BoundaryInRowValue = parseInt(value); } else { c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam); @@ -721,7 +719,6 @@ export const clear = function () { boundaryParseStack = ['']; title = ''; wrapEnabled = false; - description = ''; c4ShapeInRow = 4; c4BoundaryInRow = 2; }; diff --git a/src/diagrams/c4/c4Detector.ts b/src/diagrams/c4/c4Detector.ts new file mode 100644 index 000000000..2be62bff1 --- /dev/null +++ b/src/diagrams/c4/c4Detector.ts @@ -0,0 +1,5 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const c4Detector: DiagramDetector = (txt) => { + return txt.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null; +}; diff --git a/src/diagrams/c4/c4Renderer.js b/src/diagrams/c4/c4Renderer.js index 409f38cbb..dceca2887 100644 --- a/src/diagrams/c4/c4Renderer.js +++ b/src/diagrams/c4/c4Renderer.js @@ -298,7 +298,7 @@ export const drawC4ShapeArray = function (currentBounds, diagram, c4ShapeArray, currentBounds.insert(c4Shape); - const height = svgDraw.drawC4Shape(diagram, c4Shape, conf); + svgDraw.drawC4Shape(diagram, c4Shape, conf); } currentBounds.bumpLastMargin(conf.c4ShapeMargin); @@ -616,7 +616,6 @@ export const draw = function (_text, id, _version, diagObj) { globalBoundaryMaxY = conf.diagramMarginY; const title = diagObj.db.getTitle(); - const c4type = diagObj.db.getC4Type(); let currentBoundarys = diagObj.db.getBoundarys(''); // switch (c4type) { // case 'C4Context': diff --git a/src/diagrams/c4/svgDraw.js b/src/diagrams/c4/svgDraw.js index c67fb2649..5666d9f84 100644 --- a/src/diagrams/c4/svgDraw.js +++ b/src/diagrams/c4/svgDraw.js @@ -1,5 +1,4 @@ import common from '../common/common'; -import { addFunction } from '../../interactionDb'; import { sanitizeUrl } from '@braintree/sanitize-url'; export const drawRect = function (elem, rectData) { diff --git a/src/diagrams/class/classDetector-V2.ts b/src/diagrams/class/classDetector-V2.ts new file mode 100644 index 000000000..a0e270100 --- /dev/null +++ b/src/diagrams/class/classDetector-V2.ts @@ -0,0 +1,9 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const classDetectorV2: DiagramDetector = (txt, config) => { + // If we have confgured to use dagre-wrapper then we should return true in this function for classDiagram code thus making it use the new class diagram + if (txt.match(/^\s*classDiagram/) !== null && config?.class?.defaultRenderer === 'dagre-wrapper') + return true; + // We have not opted to use the new renderer so we should return true if we detect a class diagram + return txt.match(/^\s*classDiagram-v2/) !== null; +}; diff --git a/src/diagrams/class/classDetector.ts b/src/diagrams/class/classDetector.ts new file mode 100644 index 000000000..19d8bd2f5 --- /dev/null +++ b/src/diagrams/class/classDetector.ts @@ -0,0 +1,8 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const classDetector: DiagramDetector = (txt, config) => { + // If we have confgured to use dagre-wrapper then we should never return true in this function + if (config?.class?.defaultRenderer === 'dagre-wrapper') return false; + // We have not opted to use the new renderer so we should return true if we detect a class diagram + return txt.match(/^\s*classDiagram/) !== null; +}; diff --git a/src/diagrams/class/classRenderer-v2.js b/src/diagrams/class/classRenderer-v2.js index a211ab552..20722e6d0 100644 --- a/src/diagrams/class/classRenderer-v2.js +++ b/src/diagrams/class/classRenderer-v2.js @@ -3,7 +3,6 @@ import graphlib from 'graphlib'; import { log } from '../../logger'; import { getConfig } from '../../config'; import { render } from '../../dagre-wrapper/index.js'; -// import addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js'; import { curveLinear } from 'd3'; import { interpolateToCurve, getStylesFromArray } from '../../utils'; import { setupGraphViewbox } from '../../setupGraphViewbox'; @@ -11,7 +10,6 @@ import common from '../common/common'; import addSVGAccessibilityFields from '../../accessibility'; let idCache = {}; -const padding = 20; const sanitizeText = (txt) => common.sanitizeText(txt, getConfig()); @@ -235,20 +233,6 @@ export const addRelations = function (relations, g) { }); }; -/** - * Gets the ID with the same label as in the cache - * - * @param {string} label The label to look for - * @returns {string} The resulting ID - */ -const getGraphId = function (label) { - const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label); - - if (foundEntry) { - return foundEntry[0]; - } -}; - /** * Merges the value of `conf` with the passed `cnf` * diff --git a/src/diagrams/class/classRenderer.js b/src/diagrams/class/classRenderer.js index 6536cb5a1..c1236afea 100644 --- a/src/diagrams/class/classRenderer.js +++ b/src/diagrams/class/classRenderer.js @@ -10,12 +10,6 @@ import addSVGAccessibilityFields from '../../accessibility'; let idCache = {}; const padding = 20; -const confa = { - dividerMargin: 10, - padding: 5, - textHeight: 10, -}; - /** * Gets the ID with the same label as in the cache * @@ -163,7 +157,6 @@ export const draw = function (text, id, _version, diagObj) { securityLevel === 'sandbox' ? select(sandboxElement.nodes()[0].contentDocument.body) : select('body'); - const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document; // Fetch the default direction, use TD if none was found const diagram = root.select(`[id='${id}']`); diff --git a/src/diagrams/er/erDb.js b/src/diagrams/er/erDb.js index 856d54979..ad3454f84 100644 --- a/src/diagrams/er/erDb.js +++ b/src/diagrams/er/erDb.js @@ -1,7 +1,7 @@ import { log } from '../../logger'; import mermaidAPI from '../../mermaidAPI'; import * as configApi from '../../config'; -import common from '../common/common'; + import { setAccTitle, getAccTitle, @@ -12,8 +12,6 @@ import { let entities = {}; let relationships = []; -let title = ''; -let description = ''; const Cardinality = { ZERO_OR_ONE: 'ZERO_OR_ONE', @@ -78,7 +76,6 @@ const getRelationships = () => relationships; const clear = function () { entities = {}; relationships = []; - title = ''; commonClear(); }; diff --git a/src/diagrams/er/erDetector.ts b/src/diagrams/er/erDetector.ts new file mode 100644 index 000000000..a17eafb81 --- /dev/null +++ b/src/diagrams/er/erDetector.ts @@ -0,0 +1,5 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const erDetector: DiagramDetector = (txt) => { + return txt.match(/^\s*erDiagram/) !== null; +}; diff --git a/src/errorRenderer.ts b/src/diagrams/error/errorRenderer.ts similarity index 91% rename from src/errorRenderer.ts rename to src/diagrams/error/errorRenderer.ts index de0b31886..df9ce2c6e 100644 --- a/src/errorRenderer.ts +++ b/src/diagrams/error/errorRenderer.ts @@ -1,7 +1,7 @@ /** Created by knut on 14-12-11. */ import { select } from 'd3'; -import { log } from './logger'; -import { getErrorMessage } from './utils'; +import { log } from '../../logger'; +import { getErrorMessage } from '../../utils'; let conf = {}; @@ -17,10 +17,11 @@ export const setConf = function (cnf: any) { /** * Draws a an info picture in the tag with id: id based on the graph definition in text. * + * @param text * @param {string} id The text for the error * @param {string} mermaidVersion The version */ -export const draw = (id: string, mermaidVersion: string) => { +export const draw = (text: string, id: string, mermaidVersion: string) => { try { log.debug('Renering svg for syntax error\n'); @@ -72,22 +73,22 @@ export const draw = (id: string, mermaidVersion: string) => { g.append('text') // text label for the x axis .attr('class', 'error-text') - .attr('x', 1240) + .attr('x', 1440) .attr('y', 250) .attr('font-size', '150px') .style('text-anchor', 'middle') .text('Syntax error in graph'); g.append('text') // text label for the x axis .attr('class', 'error-text') - .attr('x', 1050) + .attr('x', 1250) .attr('y', 400) .attr('font-size', '100px') .style('text-anchor', 'middle') .text('mermaid version ' + mermaidVersion); svg.attr('height', 100); - svg.attr('width', 400); - svg.attr('viewBox', '768 0 512 512'); + svg.attr('width', 500); + svg.attr('viewBox', '768 0 912 512'); } catch (e) { log.error('Error while rendering info diagram'); log.error(getErrorMessage(e)); diff --git a/src/diagrams/error/styles.js b/src/diagrams/error/styles.js new file mode 100644 index 000000000..0b0729813 --- /dev/null +++ b/src/diagrams/error/styles.js @@ -0,0 +1,3 @@ +const getStyles = () => ``; + +export default getStyles; diff --git a/src/diagrams/flowchart/flowDetector-v2.ts b/src/diagrams/flowchart/flowDetector-v2.ts new file mode 100644 index 000000000..f73748c79 --- /dev/null +++ b/src/diagrams/flowchart/flowDetector-v2.ts @@ -0,0 +1,8 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const flowDetectorV2: DiagramDetector = (txt, config) => { + // If we have confgured to use dagre-wrapper then we should return true in this function for graph code thus making it use the new flowchart diagram + if (config?.flowchart?.defaultRenderer === 'dagre-wrapper' && txt.match(/^\s*graph/) !== null) + return true; + return txt.match(/^\s*flowchart/) !== null; +}; diff --git a/src/diagrams/flowchart/flowDetector.ts b/src/diagrams/flowchart/flowDetector.ts new file mode 100644 index 000000000..edc9096c0 --- /dev/null +++ b/src/diagrams/flowchart/flowDetector.ts @@ -0,0 +1,8 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const flowDetector: DiagramDetector = (txt, config) => { + // If we have confired to only use new flow charts this function shohuld always return false + // as in not signalling true for a legacy flowchart + if (config?.flowchart?.defaultRenderer === 'dagre-wrapper') return false; + return txt.match(/^\s*graph/) !== null; +}; diff --git a/src/diagrams/flowchart/flowRenderer.addEdges.spec.js b/src/diagrams/flowchart/flowRenderer.addEdges.spec.js new file mode 100644 index 000000000..1bcb076f1 --- /dev/null +++ b/src/diagrams/flowchart/flowRenderer.addEdges.spec.js @@ -0,0 +1,154 @@ +import flowDb from './flowDb'; +import flowParser from './parser/flow'; +import flowRenderer from './flowRenderer'; +import Diagram from '../../Diagram'; +import { addDiagrams } from '../../diagram-api/diagram-orchestration'; +addDiagrams(); +afterEach(() => { + jest.restoreAllMocks(); +}); + +describe('when using mermaid and ', function () { + describe('when calling addEdges ', function () { + beforeEach(function () { + flowParser.parser.yy = flowDb; + flowDb.clear(); + flowDb.setGen('gen-2'); + }); + it('should handle edges with text', function () { + const diag = new Diagram('graph TD;A-->|text ex|B;'); + diag.db.getVertices(); + const edges = diag.db.getEdges(); + + const mockG = { + setEdge: function (start, end, options) { + expect(start).toContain('flowchart-A-'); + expect(end).toContain('flowchart-B-'); + expect(options.arrowhead).toBe('normal'); + expect(options.label.match('text ex')).toBeTruthy(); + }, + }; + + flowRenderer.addEdges(edges, mockG, diag); + }); + + it('should handle edges without text', function () { + const diag = new Diagram('graph TD;A-->B;'); + diag.db.getVertices(); + const edges = diag.db.getEdges(); + + const mockG = { + setEdge: function (start, end, options) { + expect(start).toContain('flowchart-A-'); + expect(end).toContain('flowchart-B-'); + expect(options.arrowhead).toBe('normal'); + }, + }; + + flowRenderer.addEdges(edges, mockG, diag); + }); + + it('should handle open-ended edges', function () { + const diag = new Diagram('graph TD;A---B;'); + diag.db.getVertices(); + const edges = diag.db.getEdges(); + + const mockG = { + setEdge: function (start, end, options) { + expect(start).toContain('flowchart-A-'); + expect(end).toContain('flowchart-B-'); + expect(options.arrowhead).toBe('none'); + }, + }; + + flowRenderer.addEdges(edges, mockG, diag); + }); + + it('should handle edges with styles defined', function () { + const diag = new Diagram('graph TD;A---B; linkStyle 0 stroke:val1,stroke-width:val2;'); + diag.db.getVertices(); + const edges = diag.db.getEdges(); + + const mockG = { + setEdge: function (start, end, options) { + expect(start).toContain('flowchart-A-'); + expect(end).toContain('flowchart-B-'); + expect(options.arrowhead).toBe('none'); + expect(options.style).toBe('stroke:val1;stroke-width:val2;fill:none;'); + }, + }; + + flowRenderer.addEdges(edges, mockG, diag); + }); + it('should handle edges with interpolation defined', function () { + const diag = new Diagram('graph TD;A---B; linkStyle 0 interpolate basis'); + diag.db.getVertices(); + const edges = diag.db.getEdges(); + + const mockG = { + setEdge: function (start, end, options) { + expect(start).toContain('flowchart-A-'); + expect(end).toContain('flowchart-B-'); + expect(options.arrowhead).toBe('none'); + expect(options.curve).toBe('basis'); // mocked as string + }, + }; + + flowRenderer.addEdges(edges, mockG, diag); + }); + it('should handle edges with text and styles defined', function () { + const diag = new Diagram( + 'graph TD;A---|the text|B; linkStyle 0 stroke:val1,stroke-width:val2;' + ); + diag.db.getVertices(); + const edges = diag.db.getEdges(); + + const mockG = { + setEdge: function (start, end, options) { + expect(start).toContain('flowchart-A-'); + expect(end).toContain('flowchart-B-'); + expect(options.arrowhead).toBe('none'); + expect(options.label.match('the text')).toBeTruthy(); + expect(options.style).toBe('stroke:val1;stroke-width:val2;fill:none;'); + }, + }; + + flowRenderer.addEdges(edges, mockG, diag); + }); + + it('should set fill to "none" by default when handling edges', function () { + const diag = new Diagram('graph TD;A---B; linkStyle 0 stroke:val1,stroke-width:val2;'); + diag.db.getVertices(); + const edges = diag.db.getEdges(); + + const mockG = { + setEdge: function (start, end, options) { + expect(start).toContain('flowchart-A-'); + expect(end).toContain('flowchart-B'); + expect(options.arrowhead).toBe('none'); + expect(options.style).toBe('stroke:val1;stroke-width:val2;fill:none;'); + }, + }; + + flowRenderer.addEdges(edges, mockG, diag); + }); + + it('should not set fill to none if fill is set in linkStyle', function () { + const diag = new Diagram( + 'graph TD;A---B; linkStyle 0 stroke:val1,stroke-width:val2,fill:blue;' + ); + diag.db.getVertices(); + const edges = diag.db.getEdges(); + const mockG = { + setEdge: function (start, end, options) { + expect(start).toContain('flowchart-A-'); + expect(end).toContain('flowchart-B-'); + expect(options.arrowhead).toBe('none'); + expect(options.style).toBe('stroke:val1;stroke-width:val2;fill:blue;'); + }, + }; + + flowRenderer.addEdges(edges, mockG, diag); + }); + }); +}); diff --git a/src/diagrams/flowchart/flowRenderer.js b/src/diagrams/flowchart/flowRenderer.js index 5b14330dd..0c3aa3623 100644 --- a/src/diagrams/flowchart/flowRenderer.js +++ b/src/diagrams/flowchart/flowRenderer.js @@ -29,8 +29,6 @@ export const setConf = function (cnf) { * @param diagObj */ export const addVertices = function (vert, g, svgId, root, _doc, diagObj) { - const securityLevel = getConfig().securityLevel; - const svg = !root ? select(`[id="${svgId}"]`) : root.select(`[id="${svgId}"]`); const doc = !_doc ? document : _doc; const keys = Object.keys(vert); diff --git a/src/diagrams/gantt/ganttDb.js b/src/diagrams/gantt/ganttDb.js index f6a526759..5d072b903 100644 --- a/src/diagrams/gantt/ganttDb.js +++ b/src/diagrams/gantt/ganttDb.js @@ -4,7 +4,7 @@ import { log } from '../../logger'; import * as configApi from '../../config'; import utils from '../../utils'; import mermaidAPI from '../../mermaidAPI'; -import common from '../common/common'; + import { setAccTitle, getAccTitle, @@ -21,8 +21,6 @@ let todayMarker = ''; let includes = []; let excludes = []; let links = {}; -let title = ''; -let accDescription = ''; let sections = []; let tasks = []; let currentSection = ''; @@ -34,10 +32,6 @@ let topAxis = false; // The serial order of the task in the script let lastOrder = 0; -const sanitizeText = function (txt) { - return common.sanitizeText(txt, configApi.getConfig()); -}; - export const parseDirective = function (statement, context, type) { mermaidAPI.parseDirective(this, statement, context, type); }; @@ -47,7 +41,6 @@ export const clear = function () { tasks = []; currentSection = ''; funs = []; - title = ''; taskCnt = 0; lastTask = undefined; lastTaskID = undefined; @@ -247,7 +240,8 @@ const getStartDate = function (prevTime, dateFormat, str) { * - `ms` for milliseconds * * @param {string} str - A string representing the duration. - * @returns {moment.Duration} A moment duration, including an invalid moment for invalid input string. + * @returns {moment.Duration} A moment duration, including an invalid moment for invalid input + * string. */ const parseDuration = function (str) { const statement = /^(\d+(?:\.\d+)?)([yMwdhms]|ms)$/.exec(str.trim()); diff --git a/src/diagrams/gantt/ganttDetector.ts b/src/diagrams/gantt/ganttDetector.ts new file mode 100644 index 000000000..926792dcf --- /dev/null +++ b/src/diagrams/gantt/ganttDetector.ts @@ -0,0 +1,5 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const ganttDetector: DiagramDetector = (txt) => { + return txt.match(/^\s*gantt/) !== null; +}; diff --git a/src/diagrams/gantt/ganttRenderer.js b/src/diagrams/gantt/ganttRenderer.js index 5a24d6d3f..3b12bc191 100644 --- a/src/diagrams/gantt/ganttRenderer.js +++ b/src/diagrams/gantt/ganttRenderer.js @@ -391,7 +391,6 @@ export const draw = function (text, id, version, diagObj) { if (securityLevel === 'sandbox') { let sandboxElement; sandboxElement = select('#i' + id); - const root = select(sandboxElement.nodes()[0].contentDocument.body); const doc = sandboxElement.nodes()[0].contentDocument; rectangles diff --git a/src/diagrams/git/gitGraphParserV2.spec.js b/src/diagrams/git/gitGraphParserV2.spec.js index 56a11a876..b6c9c2459 100644 --- a/src/diagrams/git/gitGraphParserV2.spec.js +++ b/src/diagrams/git/gitGraphParserV2.spec.js @@ -363,6 +363,37 @@ describe('when parsing a gitGraph', function () { expect(Object.keys(parser.yy.getBranches()).length).toBe(2); }); + it('should allow branch names starting with unusual prefixes', function () { + const str = `gitGraph: + commit + %% branch names starting with numbers are not recommended, but are supported by git + branch branch01 + branch checkout02 + branch cherry-pick03 + branch branch/example-branch + branch merge/test_merge + %% single character branch name + branch A + `; + + parser.parse(str); + const commits = parser.yy.getCommits(); + expect(Object.keys(commits).length).toBe(1); + expect(parser.yy.getCurrentBranch()).toBe('A'); + expect(parser.yy.getDirection()).toBe('LR'); + expect(Object.keys(parser.yy.getBranches()).length).toBe(7); + expect(Object.keys(parser.yy.getBranches())).toEqual( + expect.arrayContaining([ + 'branch01', + 'checkout02', + 'cherry-pick03', + 'branch/example-branch', + 'merge/test_merge', + 'A', + ]) + ); + }); + it('should handle new branch checkout', function () { const str = `gitGraph: commit diff --git a/src/diagrams/git/gitGraphRenderer.js b/src/diagrams/git/gitGraphRenderer.js index 5a9036b88..68905c0d2 100644 --- a/src/diagrams/git/gitGraphRenderer.js +++ b/src/diagrams/git/gitGraphRenderer.js @@ -5,7 +5,6 @@ import { getConfig } from '../../config'; import addSVGAccessibilityFields from '../../accessibility'; let allCommitsDict = {}; -let branchNum; const commitType = { NORMAL: 0, @@ -83,7 +82,7 @@ const drawCommits = (svg, commits, modifyGraph) => { const sortedKeys = keys.sort((a, b) => { return commits[a].seq - commits[b].seq; }); - sortedKeys.forEach((key, index) => { + sortedKeys.forEach((key) => { const commit = commits[key]; const y = branchPos[commit.branch].pos; @@ -92,7 +91,9 @@ const drawCommits = (svg, commits, modifyGraph) => { if (modifyGraph) { let typeClass; let commitSymbolType = - typeof commit.customType !== 'undefined' ? commit.customType : commit.type; + typeof commit.customType !== 'undefined' && commit.customType !== '' + ? commit.customType + : commit.type; switch (commitSymbolType) { case commitType.NORMAL: typeClass = 'commit-normal'; @@ -290,18 +291,15 @@ const drawCommits = (svg, commits, modifyGraph) => { }; /** - * Detect if there are other commits between commit1's x-position and commit2's x-position on the same - * branch as commit2. + * Detect if there are other commits between commit1's x-position and commit2's x-position on the + * same branch as commit2. * * @param {any} commit1 * @param {any} commit2 * @param allCommits - * @returns {boolean} if there are commits between commit1's x-position and commit2's x-position + * @returns {boolean} If there are commits between commit1's x-position and commit2's x-position */ const hasOverlappingCommits = (commit1, commit2, allCommits) => { - const commit1Pos = commitPos[commit2.id]; - const commit2Pos = commitPos[commit1.id]; - // Find commits on the same branch as commit2 const keys = Object.keys(allCommits); const overlappingComits = keys.filter((key) => { @@ -322,7 +320,7 @@ const hasOverlappingCommits = (commit1, commit2, allCommits) => { * @param {any} y1 * @param {any} y2 * @param {any} _depth - * @returns {number} y value between y1 and y2 + * @returns {number} Y value between y1 and y2 */ const findLane = (y1, y2, _depth) => { const depth = _depth || 0; @@ -355,25 +353,11 @@ const findLane = (y1, y2, _depth) => { * @param {any} allCommits */ const drawArrow = (svg, commit1, commit2, allCommits) => { - const conf = getConfig(); - const p1 = commitPos[commit1.id]; const p2 = commitPos[commit2.id]; const overlappingCommits = hasOverlappingCommits(commit1, commit2, allCommits); // log.debug('drawArrow', p1, p2, overlappingCommits, commit1.id, commit2.id); - let url = ''; - if (conf.arrowMarkerAbsolute) { - url = - window.location.protocol + - '//' + - window.location.host + - window.location.pathname + - window.location.search; - url = url.replace(/\(/g, '\\('); - url = url.replace(/\)/g, '\\)'); - } - let arc = ''; let arc2 = ''; let radius = 0; @@ -431,7 +415,7 @@ const drawArrow = (svg, commit1, commit2, allCommits) => { } ${p2.y}`; } } - const arrow = svg + svg .append('path') .attr('d', lineDef) .attr('class', 'arrow arrow' + (colorClassNum % THEME_COLOR_LIMIT)); @@ -439,10 +423,7 @@ const drawArrow = (svg, commit1, commit2, allCommits) => { const drawArrows = (svg, commits) => { const gArrows = svg.append('g').attr('class', 'commit-arrows'); - let pos = 0; - - const k = Object.keys(commits); - k.forEach((key, index) => { + Object.keys(commits).forEach((key) => { const commit = commits[key]; if (commit.parents && commit.parents.length > 0) { commit.parents.forEach((parent) => { diff --git a/src/diagrams/git/parser/gitGraph.jison b/src/diagrams/git/parser/gitGraph.jison index 29edec808..f35dbcde3 100644 --- a/src/diagrams/git/parser/gitGraph.jison +++ b/src/diagrams/git/parser/gitGraph.jison @@ -36,7 +36,7 @@ accDescr\s*"{"\s* { this.begin("ac \#[^\n]* /* skip comments */ \%%[^\n]* /* skip comments */ "gitGraph" return 'GG'; -"commit" return 'COMMIT'; +commit(?=\s|$) return 'COMMIT'; "id:" return 'COMMIT_ID'; "type:" return 'COMMIT_TYPE'; "msg:" return 'COMMIT_MSG'; @@ -44,12 +44,12 @@ accDescr\s*"{"\s* { this.begin("ac "REVERSE" return 'REVERSE'; "HIGHLIGHT" return 'HIGHLIGHT'; "tag:" return 'COMMIT_TAG'; -"branch" return 'BRANCH'; +branch(?=\s|$) return 'BRANCH'; "order:" return 'ORDER'; -"merge" return 'MERGE'; -"cherry-pick" return 'CHERRY_PICK'; +merge(?=\s|$) return 'MERGE'; +cherry-pick(?=\s|$) return 'CHERRY_PICK'; // "reset" return 'RESET'; -"checkout" return 'CHECKOUT'; +checkout(?=\s|$) return 'CHECKOUT'; "LR" return 'DIR'; "BT" return 'DIR'; ":" return ':'; @@ -61,7 +61,7 @@ accDescr\s*"{"\s* { this.begin("ac <string>["] this.popState(); <string>[^"]* return 'STR'; [0-9]+(?=\s|$) return 'NUM'; -\w[-\./\w]*[-\w] return 'ID'; // only a subset of https://git-scm.com/docs/git-check-ref-format +\w([-\./\w]*[-\w])? return 'ID'; // only a subset of https://git-scm.com/docs/git-check-ref-format <<EOF>> return 'EOF'; \s+ /* skip all whitespace */ // lowest priority so we can use lookaheads in earlier regex diff --git a/src/diagrams/info/infoDetector.ts b/src/diagrams/info/infoDetector.ts new file mode 100644 index 000000000..68f2ac794 --- /dev/null +++ b/src/diagrams/info/infoDetector.ts @@ -0,0 +1,5 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const infoDetector: DiagramDetector = (txt) => { + return txt.match(/^\s*info/) !== null; +}; diff --git a/src/diagrams/info/infoRenderer.js b/src/diagrams/info/infoRenderer.js index 9e81b9ffb..b50178481 100644 --- a/src/diagrams/info/infoRenderer.js +++ b/src/diagrams/info/infoRenderer.js @@ -27,7 +27,6 @@ export const draw = (text, id, version, diagObj) => { securityLevel === 'sandbox' ? select(sandboxElement.nodes()[0].contentDocument.body) : select('body'); - const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document; // Parse the graph definition // parser.parse(text); diff --git a/src/diagrams/mindmap/mindmap.spec.js b/src/diagrams/mindmap/mindmap.spec.js index 155b566fb..e7909ef50 100644 --- a/src/diagrams/mindmap/mindmap.spec.js +++ b/src/diagrams/mindmap/mindmap.spec.js @@ -1,6 +1,6 @@ import { parser as mindmap } from './parser/mindmap'; import * as mindmapDB from './mindmapDb'; -import { setLogLevel } from '../../logger'; +import { setLogLevel } from '../../diagram-api/diagramAPI'; describe('when parsing a mindmap ', function () { beforeEach(function () { diff --git a/src/diagrams/mindmap/mindmapDb.js b/src/diagrams/mindmap/mindmapDb.js index 48b242c9e..68906c5fb 100644 --- a/src/diagrams/mindmap/mindmapDb.js +++ b/src/diagrams/mindmap/mindmapDb.js @@ -1,6 +1,5 @@ /** Created by knut on 15-01-14. */ -import { sanitizeText, getConfig } from '../../diagram-api/diagramAPI'; -import { log as _log } from '../../logger'; +import { sanitizeText, getConfig, log as _log } from '../../diagram-api/diagramAPI'; let nodes = []; let cnt = 0; diff --git a/src/diagrams/mindmap/mindmapRenderer.js b/src/diagrams/mindmap/mindmapRenderer.js index caa8baedb..2f2b06292 100644 --- a/src/diagrams/mindmap/mindmapRenderer.js +++ b/src/diagrams/mindmap/mindmapRenderer.js @@ -2,7 +2,7 @@ import { select } from 'd3'; import { log, getConfig, setupGraphViewbox } from '../../diagram-api/diagramAPI'; import svgDraw from './svgDraw'; -import { BoundingBox, Layout, Tree } from 'non-layered-tidy-tree-layout'; +import { BoundingBox, Layout } from 'non-layered-tidy-tree-layout'; import clone from 'fast-clone'; import * as db from './mindmapDb'; @@ -85,9 +85,8 @@ function rightToLeft(mindmap) { /** * @param mindmap * @param dir - * @param conf */ -function layout(mindmap, dir, conf) { +function layout(mindmap, dir) { const bb = new BoundingBox(30, 60); const layout = new Layout(bb); @@ -192,8 +191,7 @@ function layoutMindmap(node, conf) { }); // Merge the trees into a single tree - const result = mergeTrees(node, trees); - eachNode; + mergeTrees(node, trees); return node; } /** @@ -232,13 +230,11 @@ export const draw = (text, id, version, diagObj) => { securityLevel === 'sandbox' ? select(sandboxElement.nodes()[0].contentDocument.body) : select('body'); - const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document; - // Parse the graph definition const svg = root.select('#' + id); - const g = svg.append('g'); + svg.append('g'); const mm = diagObj.db.getMindmap(); // Draw the graph and start with drawing the nodes without proper position diff --git a/src/diagrams/mindmap/styles.js b/src/diagrams/mindmap/styles.js index 76d6a9c1b..f6afaa612 100644 --- a/src/diagrams/mindmap/styles.js +++ b/src/diagrams/mindmap/styles.js @@ -1,4 +1,4 @@ -import { darken, lighten, adjust, invert, isDark } from 'khroma'; +import { darken, lighten, isDark } from 'khroma'; const genSections = (options) => { let sections = ''; diff --git a/src/diagrams/mindmap/svgDraw.js b/src/diagrams/mindmap/svgDraw.js index 511c46e20..7d6804f24 100644 --- a/src/diagrams/mindmap/svgDraw.js +++ b/src/diagrams/mindmap/svgDraw.js @@ -1,4 +1,3 @@ -const lineBreakRegex = /<br\s*\/?>/gi; import { select } from 'd3'; import * as db from './mindmapDb'; @@ -15,7 +14,6 @@ function wrap(text, width) { .reverse(), word, line = [], - lineNumber = 0, lineHeight = 1.1, // ems y = text.attr('y'), dy = parseFloat(text.attr('dy')), @@ -49,9 +47,9 @@ function wrap(text, width) { }); } -const defaultBkg = function (elem, node, section, conf) { +const defaultBkg = function (elem, node, section) { const rd = 5; - const r = elem + elem .append('path') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) @@ -70,25 +68,22 @@ const defaultBkg = function (elem, node, section, conf) { .attr('x2', node.width) .attr('y2', node.height); }; -const rectBkg = function (elem, node, section, conf) { - const r = elem +const rectBkg = function (elem, node) { + elem .append('rect') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) .attr('height', node.height) .attr('width', node.width); }; -const cloudBkg = function (elem, node, section, conf) { - const rd = 5; - const r = elem; +const cloudBkg = function (elem, node) { const w = node.width; const h = node.height; - const r0 = 0.1 * w; const r1 = 0.15 * w; const r2 = 0.25 * w; const r3 = 0.35 * w; const r4 = 0.2 * w; - const p = elem + elem .append('path') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) @@ -111,12 +106,11 @@ const cloudBkg = function (elem, node, section, conf) { H0 V0 Z` ); }; -const bangBkg = function (elem, node, section, conf) { - const rd = 5; +const bangBkg = function (elem, node) { const w = node.width; const h = node.height; const r = 0.15 * w; - const p = elem + elem .append('path') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) @@ -143,16 +137,15 @@ const bangBkg = function (elem, node, section, conf) { H0 V0 Z` ); }; -const circleBkg = function (elem, node, section, conf) { - const r = elem +const circleBkg = function (elem, node) { + elem .append('circle') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) .attr('r', node.width / 2); - // .attr('width', node.width); }; -const roundedRectBkg = function (elem, node, section, conf) { - const r = elem +const roundedRectBkg = function (elem, node) { + elem .append('rect') .attr('id', 'node-' + node.id) .attr('class', 'node-bkg node-' + db.type2Str(node.type)) @@ -185,7 +178,6 @@ export const drawNode = function (elem, node, section, conf) { .append('text') .text(node.descr) .attr('dy', '1em') - // .attr('dy', '0') .attr('alignment-baseline', 'middle') .attr('dominant-baseline', 'middle') .attr('text-anchor', 'middle') @@ -197,18 +189,12 @@ export const drawNode = function (elem, node, section, conf) { if (node.icon) { if (node.type === db.nodeType.CIRCLE) { node.height += 50; - const orgWidth = node.width; node.width += 50; - // node.width = Math.max(orgWidth, 100); - const widthDiff = Math.abs(node.width - orgWidth); const icon = nodeElem .append('foreignObject') .attr('height', '50px') .attr('width', node.width) .attr('style', 'text-align: center;'); - // .attr('x', 0) - // .attr('y', 0) - // .attr('class', 'node-icon ' + node.icon); icon .append('div') .attr('class', 'icon-container') @@ -228,9 +214,7 @@ export const drawNode = function (elem, node, section, conf) { .attr('width', '60px') .attr('height', node.height) .attr('style', 'text-align: center;margin-top:' + heightDiff / 2 + 'px;'); - // .attr('x', 0) - // .attr('y', 0) - // .attr('class', 'node-icon ' + node.icon); + icon .append('div') .attr('class', 'icon-container') @@ -260,15 +244,11 @@ export const drawNode = function (elem, node, section, conf) { circleBkg(bkgElem, node, section, conf); break; case db.nodeType.CLOUD: - // bkgElem.attr('transform', 'translate(' + node.width / 2 + ', ' + +node.height / 2 + ')'); cloudBkg(bkgElem, node, section, conf); break; case db.nodeType.BANG: - // bkgElem.attr('transform', 'translate(' + node.width / 2 + ', ' + +node.height / 2 + ')'); bangBkg(bkgElem, node, section, conf); break; - default: - // defaultBkg(bkgElem, node, section, conf); } // Position the node to its coordinate @@ -279,17 +259,7 @@ export const drawNode = function (elem, node, section, conf) { return node.height; }; -export const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, section, conf) { - // edgesElem - // .append('line') - // .attr('x1', parent.x + parent.width / 2) - // .attr('y1', parent.y + parent.height / 2) - // .attr('x2', mindmap.x + mindmap.width / 2) - // .attr('y2', mindmap.y + mindmap.height / 2) - // .attr('class', 'edge section-edge-' + section + ' edge-depth-' + depth); - - //<path d="M100,250 Q250,100 400,250 T700,250" /> - +export const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, section) { const sx = parent.x + parent.width / 2; const sy = parent.y + parent.height / 2; const ex = mindmap.x + mindmap.width / 2; @@ -310,7 +280,7 @@ export const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, sec .attr('class', 'edge section-edge-' + section + ' edge-depth-' + depth); }; -export const positionNode = function (node, conf) { +export const positionNode = function (node) { const nodeElem = db.getElementById(node.id); const x = node.x || 0; diff --git a/src/diagrams/pie/pieDb.js b/src/diagrams/pie/pieDb.js index def0242a3..8ef4d9efc 100644 --- a/src/diagrams/pie/pieDb.js +++ b/src/diagrams/pie/pieDb.js @@ -13,8 +13,6 @@ import { } from '../../commonDb'; let sections = {}; -let title = ''; -let description = ''; let showData = false; export const parseDirective = function (statement, context, type) { @@ -49,7 +47,6 @@ const cleanupValue = function (value) { const clear = function () { sections = {}; - title = ''; showData = false; commonClear(); }; diff --git a/src/diagrams/pie/pieDetector.ts b/src/diagrams/pie/pieDetector.ts new file mode 100644 index 000000000..1e122b0e0 --- /dev/null +++ b/src/diagrams/pie/pieDetector.ts @@ -0,0 +1,5 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const pieDetector: DiagramDetector = (txt) => { + return txt.match(/^\s*pie/) !== null; +}; diff --git a/src/diagrams/requirement/requirementDb.js b/src/diagrams/requirement/requirementDb.js index f78bd5509..9d48f0b2d 100644 --- a/src/diagrams/requirement/requirementDb.js +++ b/src/diagrams/requirement/requirementDb.js @@ -1,7 +1,7 @@ import * as configApi from '../../config'; import { log } from '../../logger'; import mermaidAPI from '../../mermaidAPI'; -import common from '../common/common'; + import { setAccTitle, getAccTitle, @@ -15,10 +15,6 @@ let latestRequirement = {}; let requirements = {}; let latestElement = {}; let elements = {}; -let title = ''; -let accDescription = ''; - -const sanitizeText = (txt) => common.sanitizeText(txt, configApi.getConfig()); const RequirementType = { REQUIREMENT: 'Requirement', diff --git a/src/diagrams/requirement/requirementDetector.ts b/src/diagrams/requirement/requirementDetector.ts new file mode 100644 index 000000000..2e1aa93ae --- /dev/null +++ b/src/diagrams/requirement/requirementDetector.ts @@ -0,0 +1,5 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const requirementDetector: DiagramDetector = (txt) => { + return txt.match(/^\s*requirement(Diagram)?/) !== null; +}; diff --git a/src/diagrams/requirement/requirementRenderer.js b/src/diagrams/requirement/requirementRenderer.js index 7a43edaee..d10c43066 100644 --- a/src/diagrams/requirement/requirementRenderer.js +++ b/src/diagrams/requirement/requirementRenderer.js @@ -320,7 +320,6 @@ export const draw = (text, id, _version, diagObj) => { securityLevel === 'sandbox' ? select(sandboxElement.nodes()[0].contentDocument.body) : select('body'); - const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document; const svg = root.select(`[id='${id}']`); markers.insertLineEndings(svg, conf); diff --git a/src/diagrams/sequence/sequenceDb.js b/src/diagrams/sequence/sequenceDb.js index 7d0309127..6c863e204 100644 --- a/src/diagrams/sequence/sequenceDb.js +++ b/src/diagrams/sequence/sequenceDb.js @@ -16,8 +16,6 @@ let prevActor = undefined; let actors = {}; let messages = []; const notes = []; -let diagramTitle = ''; -let description = ''; let sequenceNumbersEnabled = false; let wrapEnabled; @@ -153,7 +151,6 @@ export const clear = function () { actors = {}; messages = []; sequenceNumbersEnabled = false; - diagramTitle = ''; commonClear(); }; diff --git a/src/diagrams/sequence/sequenceDetector.ts b/src/diagrams/sequence/sequenceDetector.ts new file mode 100644 index 000000000..e68433255 --- /dev/null +++ b/src/diagrams/sequence/sequenceDetector.ts @@ -0,0 +1,5 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const sequenceDetector: DiagramDetector = (txt) => { + return txt.match(/^\s*sequenceDiagram/) !== null; +}; diff --git a/src/diagrams/sequence/sequenceDiagram.spec.js b/src/diagrams/sequence/sequenceDiagram.spec.js index 808eb567e..5479e49e4 100644 --- a/src/diagrams/sequence/sequenceDiagram.spec.js +++ b/src/diagrams/sequence/sequenceDiagram.spec.js @@ -1,12 +1,8 @@ -// import sequence from './parser/sequenceDiagram'; -// import sequenceDb from './sequenceDb'; import * as configApi from '../../config'; -// import renderer from './sequenceRenderer'; import mermaidAPI from '../../mermaidAPI'; -// import '../../diagram-api/diagramAPI'; import Diagram from '../../Diagram'; - -// console.log('sequenceDiagram', sequenceDb); +import { addDiagrams } from '../../diagram-api/diagram-orchestration'; +addDiagrams(); /** * @param conf * @param key diff --git a/src/diagrams/state/stateDb.js b/src/diagrams/state/stateDb.js index 7092cf1d6..96f92af8a 100644 --- a/src/diagrams/state/stateDb.js +++ b/src/diagrams/state/stateDb.js @@ -11,8 +11,6 @@ import { clear as commonClear, } from '../../commonDb'; -const sanitizeText = (txt) => common.sanitizeText(txt, configApi.getConfig()); - const clone = (o) => JSON.parse(JSON.stringify(o)); let rootDoc = []; @@ -121,10 +119,6 @@ let documents = { let currentDocument = documents.root; let startCnt = 0; -let endCnt = 0; // let stateCnt = 0; - -let title = 'State diagram'; -let description = ''; /** * Function called by parser when a node definition has been found. @@ -179,7 +173,6 @@ export const clear = function (saveCommon) { currentDocument = documents.root; startCnt = 0; - endCnt = 0; classes = []; if (!saveCommon) { commonClear(); @@ -211,7 +204,6 @@ export const addRelation = function (_id1, _id2, title) { type1 = 'start'; } if (_id2 === '[*]') { - endCnt++; id2 = 'end' + startCnt; type2 = 'end'; } diff --git a/src/diagrams/state/stateDetector-V2.ts b/src/diagrams/state/stateDetector-V2.ts new file mode 100644 index 000000000..8082a47bd --- /dev/null +++ b/src/diagrams/state/stateDetector-V2.ts @@ -0,0 +1,8 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const stateDetectorV2: DiagramDetector = (text, config) => { + if (text.match(/^\s*stateDiagram-v2/) !== null) return true; + if (text.match(/^\s*stateDiagram/) && config?.state?.defaultRenderer === 'dagre-wrapper') + return true; + return false; +}; diff --git a/src/diagrams/state/stateDetector.ts b/src/diagrams/state/stateDetector.ts new file mode 100644 index 000000000..79dd6586b --- /dev/null +++ b/src/diagrams/state/stateDetector.ts @@ -0,0 +1,8 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const stateDetector: DiagramDetector = (txt, config) => { + // If we have confired to only use new state diagrams this function should always return false + // as in not signalling true for a legacy state diagram + if (config?.state?.defaultRenderer === 'dagre-wrapper') return false; + return txt.match(/^\s*stateDiagram/) !== null; +}; diff --git a/src/diagrams/state/stateRenderer-v2.js b/src/diagrams/state/stateRenderer-v2.js index 4452f9491..13c474b5e 100644 --- a/src/diagrams/state/stateRenderer-v2.js +++ b/src/diagrams/state/stateRenderer-v2.js @@ -283,7 +283,6 @@ export const draw = function (text, id, _version, diag) { securityLevel === 'sandbox' ? select(sandboxElement.nodes()[0].contentDocument.body) : select('body'); - const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document; const svg = root.select(`[id="${id}"]`); // Run the renderer. This is what draws the final graph. diff --git a/src/diagrams/user-journey/journeyDb.js b/src/diagrams/user-journey/journeyDb.js index d8f27b93c..0707636f5 100644 --- a/src/diagrams/user-journey/journeyDb.js +++ b/src/diagrams/user-journey/journeyDb.js @@ -1,6 +1,5 @@ import mermaidAPI from '../../mermaidAPI'; import * as configApi from '../../config'; -import common from '../common/common'; import { setAccTitle, getAccTitle, @@ -11,10 +10,6 @@ import { clear as commonClear, } from '../../commonDb'; -const sanitizeText = (txt) => common.sanitizeText(txt, configApi.getConfig()); - -let title = ''; -let description = ''; let currentSection = ''; const sections = []; @@ -29,8 +24,6 @@ export const clear = function () { sections.length = 0; tasks.length = 0; currentSection = ''; - title = ''; - description = ''; rawTasks.length = 0; commonClear(); }; diff --git a/src/diagrams/user-journey/journeyDetector.ts b/src/diagrams/user-journey/journeyDetector.ts new file mode 100644 index 000000000..77c8688ae --- /dev/null +++ b/src/diagrams/user-journey/journeyDetector.ts @@ -0,0 +1,5 @@ +import type { DiagramDetector } from '../../diagram-api/detectType'; + +export const journeyDetector: DiagramDetector = (txt) => { + return txt.match(/^\s*journey/) !== null; +}; diff --git a/src/docs.mts b/src/docs.mts index 5bc3a49cf..06a1f4bff 100644 --- a/src/docs.mts +++ b/src/docs.mts @@ -1,42 +1,152 @@ /* eslint-disable no-console */ -import { remark } from 'remark'; -import type { Code, Root } from 'mdast'; +/** + * @file Transform documentation source files into files suitable for publishing + * and optionally copy the transformed files from the source directory to the + * directory used for the final, published documentation directory. The list + * of files transformed and copied to final documentation directory are logged + * to the console. If a file in the source directory has the same contents in + * the final directory, nothing is done (the final directory is up-to-date). + * @example + * docs + * Run with no option flags + * + * @example + * docs --verify + * If the --verify option is used, it only _verifies_ that the final directory has been updated with the transformed files in the source directory. + * No files will be copied to the final documentation directory, but the list of files to be changed is shown on the console. + * If the final documentation directory does not have the transformed files from source directory + * - a message to the console will show that this command should be run without the --verify flag so that the final directory is updated, and + * - it will return a fail exit code (1) + * + * @example + * docs --git + * If the --git option is used, the command `git add docs` will be run after all transformations (and/or verifications) have completed successfully + * If not files were transformed, the git command is not run. + * + * @todo Ensure that the documentation source and final paths are correct by + * using process.cwd() to get their absolute paths. Ensures that the location + * of those 2 directories is not dependent on where this file resides. + * + * @todo Write a test file for this. (Will need to be able to deal .mts file. + * Jest has trouble with it.) + */ import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'fs'; -// @ts-ignore: no typings -import flatmap from 'unist-util-flatmap'; -import { globby } from 'globby'; -import { join, dirname } from 'path'; import { exec } from 'child_process'; +import { globby } from 'globby'; +import { JSDOM } from 'jsdom'; +import type { Code, Root } from 'mdast'; +import { join, dirname } from 'path'; import prettier from 'prettier'; +import { remark } from 'remark'; +// @ts-ignore No typescript declaration file +import flatmap from 'unist-util-flatmap'; -const verify = process.argv.includes('--verify'); -const git = process.argv.includes('--git'); -let fileChanged = false; -// Possible Improvement: combine with lint-staged to only copy files that have changed -const prepareOutFile = (file: string): string => { - const outFile = join('docs', file.replace('src/docs/', '')); - mkdirSync(dirname(outFile), { recursive: true }); - return outFile; +const SOURCE_DOCS_DIR = 'src/docs'; +const FINAL_DOCS_DIR = 'docs'; + +const AUTOGENERATED_TEXT = `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in ${SOURCE_DOCS_DIR}.`; + +const LOGMSG_TRANSFORMED = 'transformed'; +const LOGMSG_TO_BE_TRANSFORMED = 'to be transformed'; +const LOGMSG_COPIED = `, and copied to ${FINAL_DOCS_DIR}`; + +const WARN_DOCSDIR_DOESNT_MATCH = `Changed files were transformed in ${SOURCE_DOCS_DIR} but do not match the files in ${FINAL_DOCS_DIR}. Please run yarn docs:build after making changes to ${SOURCE_DOCS_DIR} to update the ${FINAL_DOCS_DIR} directory with the transformed files.`; + +const verifyOnly: boolean = process.argv.includes('--verify'); +const git: boolean = process.argv.includes('--git'); + +// TODO: Read from .prettierrc? +const prettierConfig: prettier.Config = { + useTabs: false, + tabWidth: 2, + endOfLine: 'auto', + printWidth: 100, + singleQuote: true, }; -const verifyAndCopy = (file: string, content?: string) => { - const outFile = prepareOutFile(file); - const existingBuffer = existsSync(outFile) ? readFileSync(outFile) : Buffer.from('#NEW FILE#'); - const newBuffer = content ? Buffer.from(content) : readFileSync(file); +let filesWereTransformed = false; + +/** + * Given a source file name and path, return the documentation destination full + * path and file name Create the destination path if it does not already exist. + * + * @param {string} file - Name of the file (including full path) + * @returns {string} Name of the file with the path changed from the source + * directory to final documentation directory + * @todo Possible Improvement: combine with lint-staged to only copy files that + * have changed + */ +const changeToFinalDocDir = (file: string): string => { + const newDir = file.replace(SOURCE_DOCS_DIR, FINAL_DOCS_DIR); + mkdirSync(dirname(newDir), { recursive: true }); + return newDir; +}; + +/** + * Log messages to the console showing if the transformed file copied to the + * final documentation directory or still needs to be copied. + * + * @param {string} filename Name of the file that was transformed + * @param {boolean} wasCopied Whether or not the file was copied + */ +const logWasOrShouldBeTransformed = (filename: string, wasCopied: boolean) => { + const changeMsg = wasCopied ? LOGMSG_TRANSFORMED : LOGMSG_TO_BE_TRANSFORMED; + let logMsg: string; + logMsg = ` File ${changeMsg}: ${filename}`; + if (wasCopied) { + logMsg += LOGMSG_COPIED; + } + console.log(logMsg); +}; + +/** + * If the file contents were transformed, set the _filesWereTransformed_ flag to + * true and copy the transformed contents to the final documentation directory + * if the doCopy flag is true. Log messages to the console. + * + * @param {string} filename Name of the file that will be verified + * @param {boolean} [doCopy=false] Whether we should copy that + * transformedContents to the final documentation directory. Default is + * `false`. Default is `false` + * @param {string} [transformedContent] New contents for the file + */ +const copyTransformedContents = (filename: string, doCopy = false, transformedContent?: string) => { + const fileInFinalDocDir = changeToFinalDocDir(filename); + const existingBuffer = existsSync(fileInFinalDocDir) + ? readFileSync(fileInFinalDocDir) + : Buffer.from('#NEW FILE#'); + const newBuffer = transformedContent ? Buffer.from(transformedContent) : readFileSync(filename); if (existingBuffer.equals(newBuffer)) { - // Files are same, skip. - return; + return; // Files are same, skip. } - console.log(`File changed: ${outFile}`); - fileChanged = true; - if (!verify) { - writeFileSync(outFile, newBuffer); + + filesWereTransformed = true; + if (doCopy) { + writeFileSync(fileInFinalDocDir, newBuffer); } + logWasOrShouldBeTransformed(fileInFinalDocDir, doCopy); }; -const transform = (file: string) => { - const doc = readFileSync(file, 'utf8'); +const readSyncedUTF8file = (filename: string): string => { + return readFileSync(filename, 'utf8'); +}; + +/** + * Transform a markdown file and write the transformed file to the directory for + * published documentation + * + * 1. Add a `mermaid-example` block before every `mermaid` or `mmd` block On the + * docsify site (one place where the documentation is published), this will + * show the code used for the mermaid diagram + * 2. Add the text that says the file is automatically generated + * 3. Use prettier to format the file Verify that the file has been changed and + * write out the changes + * + * @param file {string} name of the file that will be verified + */ +const transformMarkdown = (file: string) => { + const doc = readSyncedUTF8file(file); const ast: Root = remark.parse(doc); const out = flatmap(ast, (c: Code) => { if (c.type !== 'code' || !c.lang?.startsWith('mermaid')) { @@ -48,38 +158,82 @@ const transform = (file: string) => { return [c, Object.assign({}, c, { lang: 'mermaid' })]; }); - const transformed = `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit corresponding file in src/docs.\n${remark.stringify( - out - )}`; - verifyAndCopy( - file, - prettier.format(transformed, { - parser: 'markdown', - useTabs: false, - tabWidth: 2, - endOfLine: 'auto', - printWidth: 100, - singleQuote: true, - }) - ); + // Add the AUTOGENERATED_TEXT to the start of the file + const transformed = `${AUTOGENERATED_TEXT}\n${remark.stringify(out)}`; + const formatted = prettier.format(transformed, { + parser: 'markdown', + ...prettierConfig, + }); + copyTransformedContents(file, !verifyOnly, formatted); }; -(async () => { - const mdFiles = await globby(['./src/docs/**/*.md'], { dot: true }); - mdFiles.forEach(transform); - const nonMDFiles = await globby(['src/docs/**', '!**/*.md'], { dot: true }); - nonMDFiles.forEach((file) => { - verifyAndCopy(file); +/** + * Transform an HTML file and write the transformed file to the directory for + * published documentation + * + * - Add the text that says the file is automatically generated Verify that the + * file has been changed and write out the changes + * + * @param filename {string} name of the HTML file to transform + */ +const transformHtml = (filename: string) => { + /** + * Insert the '...auto generated...' comment into an HTML file after the<html> element + * + * @param fileName {string} file name that should have the comment inserted + * @returns {string} The contents of the file with the comment inserted + */ + const insertAutoGeneratedComment = (fileName: string): string => { + const fileContents = readSyncedUTF8file(fileName); + const jsdom = new JSDOM(fileContents); + const htmlDoc = jsdom.window.document; + const autoGeneratedComment = jsdom.window.document.createComment(AUTOGENERATED_TEXT); + + const rootElement = htmlDoc.documentElement; + rootElement.prepend(autoGeneratedComment); + return jsdom.serialize(); + }; + + const transformedHTML = insertAutoGeneratedComment(filename); + const formattedHTML = prettier.format(transformedHTML, { + parser: 'html', + ...prettierConfig, }); - if (fileChanged) { - if (verify) { - console.log( - "Changes detected in files in `docs`. Please run `yarn docs:build` after making changes to 'src/docs' to update the `docs` folder." - ); + copyTransformedContents(filename, !verifyOnly, formattedHTML); +}; + +/** Main method (entry point) */ +(async () => { + const sourceDirGlob = join('.', SOURCE_DOCS_DIR, '**'); + const includeFilesStartingWithDot = true; + + console.log('Transforming markdown files...'); + const mdFiles = await globby([join(sourceDirGlob, '*.md')], { + dot: includeFilesStartingWithDot, + }); + mdFiles.forEach(transformMarkdown); + + console.log('Transforming html files...'); + const htmlFiles = await globby([join(sourceDirGlob, '*.html')], { + dot: includeFilesStartingWithDot, + }); + htmlFiles.forEach(transformHtml); + + console.log('Transforming all other files...'); + const otherFiles = await globby([sourceDirGlob, '!**/*.md', '!**/*.html'], { + dot: includeFilesStartingWithDot, + }); + otherFiles.forEach((file: string) => { + copyTransformedContents(file, !verifyOnly); // no transformation + }); + + if (filesWereTransformed) { + if (verifyOnly) { + console.log(WARN_DOCSDIR_DOESNT_MATCH); process.exit(1); } if (git) { - console.log('Adding changes in docs folder to git'); + console.log('Adding changes in ${FINAL_DOCS_DIR} folder to git'); exec('git add docs'); } } diff --git a/src/docs/Setup.md b/src/docs/Setup.md index 41e706825..aae2ae9c0 100644 --- a/src/docs/Setup.md +++ b/src/docs/Setup.md @@ -2,13 +2,10 @@ ## mermaidAPI -Edit this -Page[\[N|Solid\](img/GitHub-Mark-32px.png)][1] - This is the API to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js. -The core of this api is the [**render**][2] function which, given a graph +The core of this api is the [**render**][1] function which, given a graph definition as text, renders the graph/diagram and returns an svg element for the graph. It is then up to the user of the API to make use of the svg, either insert it somewhere in the @@ -19,7 +16,7 @@ In addition to the render function, a number of behavioral configuration options ## Configuration **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more\[[click -here][3]].** +here][2]].** ## **What follows are config instructions for older versions** @@ -34,7 +31,7 @@ htmlLabels:true, curve:'cardinal', }, }; mermaid.initialize(config); </script> </pre> -A summary of all options and their defaults is found [here][4]. +A summary of all options and their defaults is found [here][3]. A description of each option follows below. ## theme @@ -222,7 +219,7 @@ Default value: true Decides which rendering engine that is to be used for the rendering. Legal values are: dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid -Default value: 'dagre-d3' +Default value: 'dagre-wrapper' ## sequence @@ -365,7 +362,8 @@ Default value: true **Notes:** -This will display arrows that start and begin at the same node as right angles, rather than a curve +This will display arrows that start and begin at the same node as right angles, rather than a +curve Default value: false @@ -717,7 +715,8 @@ Default value: true **Notes:** -This will display arrows that start and begin at the same node as right angles, rather than a curves +This will display arrows that start and begin at the same node as right angles, rather than a +curves Default value: false @@ -1409,10 +1408,10 @@ This sets the auto-wrap padding for the diagram (sides only) ### Parameters -- `text` **[string][5]** -- `parseError` **[Function][6]?** +- `text` **[string][4]** +- `parseError` **[Function][5]?** -Returns **[boolean][7]** +Returns **[boolean][6]** ## setSiteConfig @@ -1431,7 +1430,7 @@ function _Default value: At default, will mirror Global Config_ - `conf` **MermaidConfig** The base currentConfig to use as siteConfig -Returns **[object][8]** The siteConfig +Returns **[object][7]** The siteConfig ## getSiteConfig @@ -1443,7 +1442,7 @@ Returns **[object][8]** The siteConfig **Notes**: Returns **any** values in siteConfig. -Returns **[object][8]** The siteConfig +Returns **[object][7]** The siteConfig ## setConfig @@ -1482,10 +1481,10 @@ $(function () { ### Parameters -- `id` **[string][5]** The id of the element to be rendered -- `text` **[string][5]** The graph definition -- `cb` **function (svgCode: [string][5], bindFunctions: function (element: [Element][9]): void): void** -- `container` **[Element][9]** Selector to element in which a div with the graph temporarily will be +- `id` **[string][4]** The id of the element to be rendered +- `text` **[string][4]** The graph definition +- `cb` **function (svgCode: [string][4], bindFunctions: function (element: [Element][8]): void): void** +- `container` **[Element][8]** Selector to element in which a div with the graph temporarily will be inserted. If one is provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is completed. @@ -1524,7 +1523,7 @@ Pushes in a directive to the configuration ### Parameters -- `directive` **[object][8]** The directive to push in +- `directive` **[object][7]** The directive to push in ## reset @@ -1618,12 +1617,11 @@ Returns **void** </script> ``` -[1]: https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js -[2]: Setup.md?id=render -[3]: 8.6.0_docs.md -[4]: #mermaidapi-configuration-defaults -[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String -[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function -[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean -[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object -[9]: https://developer.mozilla.org/docs/Web/API/Element +[1]: Setup.md?id=render +[2]: 8.6.0_docs.md +[3]: #mermaidapi-configuration-defaults +[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean +[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object +[8]: https://developer.mozilla.org/docs/Web/API/Element diff --git a/src/docs/index.html b/src/docs/index.html index 39d454533..ea3969c77 100644 --- a/src/docs/index.html +++ b/src/docs/index.html @@ -21,22 +21,13 @@ rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" /> - <script src="//cdn.jsdelivr.net/npm/mermaid@9.1.6/dist/mermaid.min.js"></script> + <script src="//cdn.jsdelivr.net/npm/mermaid@9.1.7/dist/mermaid.min.js"></script> <!-- <script src="http://localhost:9000/mermaid.js"></script> --> - <script> - // prettier-ignore - (function (i, s, o, g, r, a, m) { - i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { - (i[r].q = i[r].q || []).push(arguments) - }, i[r].l = 1 * new Date(); a = s.createElement(o), - m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) - })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); - - ga('create', 'UA-153180559-1', 'auto'); - if (location) { - ga('send', 'pageview', location.hash); - } - </script> + <script + defer + data-domain="mermaid-js.github.io" + src="https://plausible.io/js/plausible.js" + ></script> <script> var require = { paths: { vs: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.29.1/min/vs' }, diff --git a/src/docs/mindmap.md b/src/docs/mindmap.md index d7f1b4817..85a05e04b 100644 --- a/src/docs/mindmap.md +++ b/src/docs/mindmap.md @@ -1,7 +1,5 @@ # Mindmap -**Edit this Page** [![N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/src/docs/mindmap.md) - > Mindmap: This is an experimental diagram for now. The syntax and properties can change in future releases. The syntax is stabel except for the icon integration which is the experimental part. "A mind map is a diagram used to visually organize information into a hierarchy, showing relationships among pieces of the whole. It is often created around a single concept, drawn as an image in the center of a blank page, to which associated representations of ideas such as images, words and parts of words are added. Major ideas are connected directly to the central concept, and other ideas branch out from those major ideas." Wikipedia diff --git a/src/logger.ts b/src/logger.ts index 57c9cf4bb..b01934e88 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -36,6 +36,8 @@ export const setLogLevel = function (level: keyof typeof LEVELS | number | strin if (level in LEVELS) { numericLevel = LEVELS[level as keyof typeof LEVELS]; } + } else if (typeof level === 'number') { + numericLevel = level; } log.trace = () => {}; log.debug = () => {}; diff --git a/src/mermaid.spec.js b/src/mermaid.spec.js index 06eb8fe0e..a93a8d4ee 100644 --- a/src/mermaid.spec.js +++ b/src/mermaid.spec.js @@ -9,8 +9,6 @@ const { mermaidAPI } = require('./mermaidAPI'); const { default: flowDb } = require('./diagrams/flowchart/flowDb'); import flowParser from './diagrams/flowchart/parser/flow'; -import flowRenderer from './diagrams/flowchart/flowRenderer'; -import Diagram from './Diagram'; const spyOn = jest.spyOn; @@ -64,149 +62,6 @@ describe('when using mermaid and ', function () { }); }); - describe('when calling addEdges ', function () { - beforeEach(function () { - flowParser.parser.yy = flowDb; - flowDb.clear(); - flowDb.setGen('gen-2'); - }); - it('should handle edges with text', function () { - const diag = new Diagram('graph TD;A-->|text ex|B;'); - diag.db.getVertices(); - const edges = diag.db.getEdges(); - - const mockG = { - setEdge: function (start, end, options) { - expect(start).toContain('flowchart-A-'); - expect(end).toContain('flowchart-B-'); - expect(options.arrowhead).toBe('normal'); - expect(options.label.match('text ex')).toBeTruthy(); - }, - }; - - flowRenderer.addEdges(edges, mockG, diag); - }); - - it('should handle edges without text', function () { - const diag = new Diagram('graph TD;A-->B;'); - diag.db.getVertices(); - const edges = diag.db.getEdges(); - - const mockG = { - setEdge: function (start, end, options) { - expect(start).toContain('flowchart-A-'); - expect(end).toContain('flowchart-B-'); - expect(options.arrowhead).toBe('normal'); - }, - }; - - flowRenderer.addEdges(edges, mockG, diag); - }); - - it('should handle open-ended edges', function () { - const diag = new Diagram('graph TD;A---B;'); - diag.db.getVertices(); - const edges = diag.db.getEdges(); - - const mockG = { - setEdge: function (start, end, options) { - expect(start).toContain('flowchart-A-'); - expect(end).toContain('flowchart-B-'); - expect(options.arrowhead).toBe('none'); - }, - }; - - flowRenderer.addEdges(edges, mockG, diag); - }); - - it('should handle edges with styles defined', function () { - const diag = new Diagram('graph TD;A---B; linkStyle 0 stroke:val1,stroke-width:val2;'); - diag.db.getVertices(); - const edges = diag.db.getEdges(); - - const mockG = { - setEdge: function (start, end, options) { - expect(start).toContain('flowchart-A-'); - expect(end).toContain('flowchart-B-'); - expect(options.arrowhead).toBe('none'); - expect(options.style).toBe('stroke:val1;stroke-width:val2;fill:none;'); - }, - }; - - flowRenderer.addEdges(edges, mockG, diag); - }); - it('should handle edges with interpolation defined', function () { - const diag = new Diagram('graph TD;A---B; linkStyle 0 interpolate basis'); - diag.db.getVertices(); - const edges = diag.db.getEdges(); - - const mockG = { - setEdge: function (start, end, options) { - expect(start).toContain('flowchart-A-'); - expect(end).toContain('flowchart-B-'); - expect(options.arrowhead).toBe('none'); - expect(options.curve).toBe('basis'); // mocked as string - }, - }; - - flowRenderer.addEdges(edges, mockG, diag); - }); - it('should handle edges with text and styles defined', function () { - const diag = new Diagram( - 'graph TD;A---|the text|B; linkStyle 0 stroke:val1,stroke-width:val2;' - ); - diag.db.getVertices(); - const edges = diag.db.getEdges(); - - const mockG = { - setEdge: function (start, end, options) { - expect(start).toContain('flowchart-A-'); - expect(end).toContain('flowchart-B-'); - expect(options.arrowhead).toBe('none'); - expect(options.label.match('the text')).toBeTruthy(); - expect(options.style).toBe('stroke:val1;stroke-width:val2;fill:none;'); - }, - }; - - flowRenderer.addEdges(edges, mockG, diag); - }); - - it('should set fill to "none" by default when handling edges', function () { - const diag = new Diagram('graph TD;A---B; linkStyle 0 stroke:val1,stroke-width:val2;'); - diag.db.getVertices(); - const edges = diag.db.getEdges(); - - const mockG = { - setEdge: function (start, end, options) { - expect(start).toContain('flowchart-A-'); - expect(end).toContain('flowchart-B'); - expect(options.arrowhead).toBe('none'); - expect(options.style).toBe('stroke:val1;stroke-width:val2;fill:none;'); - }, - }; - - flowRenderer.addEdges(edges, mockG, diag); - }); - - it('should not set fill to none if fill is set in linkStyle', function () { - const diag = new Diagram( - 'graph TD;A---B; linkStyle 0 stroke:val1,stroke-width:val2,fill:blue;' - ); - diag.db.getVertices(); - const edges = diag.db.getEdges(); - const mockG = { - setEdge: function (start, end, options) { - expect(start).toContain('flowchart-A-'); - expect(end).toContain('flowchart-B-'); - expect(options.arrowhead).toBe('none'); - expect(options.style).toBe('stroke:val1;stroke-width:val2;fill:blue;'); - }, - }; - - flowRenderer.addEdges(edges, mockG, diag); - }); - }); - describe('checking validity of input ', function () { beforeEach(function () { flowParser.parser.yy = flowDb; diff --git a/src/mermaid.ts b/src/mermaid.ts index e42c383fd..6eec7ea66 100644 --- a/src/mermaid.ts +++ b/src/mermaid.ts @@ -1,3 +1,4 @@ +'use strict'; /** * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid * functionality and to render the diagrams to svg code. @@ -95,9 +96,11 @@ const initThrowsErrors = function ( const idGenerator = new utils.initIdGenerator(conf.deterministicIds, conf.deterministicIDSeed); let txt; + const errors = []; // element is the current div with mermaid class for (const element of Array.from(nodesToProcess)) { + log.info('Rendering diagram: ' + element.id); /*! Check if previously processed */ if (element.getAttribute('data-processed')) { continue; @@ -135,10 +138,17 @@ const initThrowsErrors = function ( } catch (error) { log.warn('Catching Error (bootstrap)', error); // @ts-ignore: TODO Fix ts errors - // TODO: We should be throwing an error object. - throw { error, message: error.str }; + const mermaidError = { error, str: error.str, hash: error.hash, message: error.str }; + if (typeof mermaid.parseError === 'function') { + mermaid.parseError(mermaidError); + } + errors.push(mermaidError); } } + if (errors.length > 0) { + // TODO: We should be throwing an error object. + throw errors[0]; + } }; const initialize = function (config: MermaidConfig) { diff --git a/src/mermaidAPI.spec.js b/src/mermaidAPI.spec.js index 3c4a28ca9..241b5ec86 100644 --- a/src/mermaidAPI.spec.js +++ b/src/mermaidAPI.spec.js @@ -1,3 +1,4 @@ +'use strict'; import mermaid from './mermaid'; import mermaidAPI from './mermaidAPI'; import assignWithDepth from './assignWithDepth'; diff --git a/src/mermaidAPI.ts b/src/mermaidAPI.ts index f66087aab..db1f8d453 100644 --- a/src/mermaidAPI.ts +++ b/src/mermaidAPI.ts @@ -1,7 +1,4 @@ /** - * Edit this - * Page[[N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js) - * * This is the API to be used when optionally handling the integration with the web page, instead of * using the default integration provided by mermaid.js. * @@ -26,7 +23,7 @@ import flowDb from './diagrams/flowchart/flowDb'; import flowRenderer from './diagrams/flowchart/flowRenderer'; import ganttDb from './diagrams/gantt/ganttDb'; import Diagram from './Diagram'; -import errorRenderer from './errorRenderer'; +import errorRenderer from './diagrams/error/errorRenderer'; import { attachFunctions } from './interactionDb'; import { log, setLogLevel } from './logger'; import getStyles from './styles'; @@ -124,6 +121,10 @@ const render = function ( cb: (svgCode: string, bindFunctions?: (element: Element) => void) => void, container?: Element ): void { + if (!hasLoadedDiagrams) { + addDiagrams(); + hasLoadedDiagrams = true; + } configApi.reset(); text = text.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;; const graphInit = utils.detectInit(text); @@ -228,7 +229,14 @@ const render = function ( text = encodeEntities(text); // Important that we do not create the diagram until after the directives have been included - const diag = new Diagram(text); + let diag; + let parseEncounteredException; + try { + diag = new Diagram(text); + } catch (error) { + diag = new Diagram('error'); + parseEncounteredException = error; + } // Get the tmp element containing the the svg const element = root.select('#d' + id).node(); const graphType = diag.type; @@ -301,7 +309,7 @@ const render = function ( try { diag.renderer.draw(text, id, pkg.version, diag); } catch (e) { - errorRenderer.draw(id, pkg.version); + errorRenderer.draw(text, id, pkg.version); throw e; } @@ -371,6 +379,10 @@ const render = function ( node.remove(); } + if (parseEncounteredException) { + throw parseEncounteredException; + } + return svgCode; }; diff --git a/src/styles.ts b/src/styles.ts index c1ccf0639..0c4a7e1a5 100644 --- a/src/styles.ts +++ b/src/styles.ts @@ -1,5 +1,6 @@ import classDiagram from './diagrams/class/styles'; import er from './diagrams/er/styles'; +import error from './diagrams/error/styles'; import flowchart from './diagrams/flowchart/styles'; import gantt from './diagrams/gantt/styles'; // import gitGraph from './diagrams/git/styles'; @@ -28,6 +29,7 @@ const themes: Record<string, any> = { info, pie, er, + error, journey, requirement, c4, diff --git a/src/utils.ts b/src/utils.ts index 097980d8c..d6b317034 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -40,7 +40,6 @@ const directive = /[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi; const directiveWithoutOpen = /\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi; -const anyComment = /\s*%%.*\n/gm; /** * @function detectInit Detects the init config object from the text @@ -73,7 +72,7 @@ const anyComment = /\s*%%.*\n/gm; * g-->h * ``` * @param {string} text The text defining the graph - * @param {any} cnf + * @param {any} config * @returns {object} The json object representing the init passed to mermaid.initialize() */ export const detectInit = function (text: string, config?: MermaidConfig): MermaidConfig { @@ -308,7 +307,6 @@ const calcLabelPosition = (points) => { const calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => { let prevPoint; - let totalDistance = 0; log.info('our points', points); if (points[0] !== initialPosition) { points = points.reverse(); @@ -368,14 +366,12 @@ const calcTerminalLabelPosition = (terminalMarkerSize, position, _points) => { // Todo looking to faster cloning method let points = JSON.parse(JSON.stringify(_points)); let prevPoint; - let totalDistance = 0; log.info('our points', points); if (position !== 'start_left' && position !== 'start_right') { points = points.reverse(); } points.forEach((point) => { - totalDistance += distance(point, prevPoint); prevPoint = point; }); @@ -707,19 +703,6 @@ export const calculateTextDimensions = memoize( (text, config) => `${text}${config.fontSize}${config.fontWeight}${config.fontFamily}` ); -/** - * Applys d3 attributes - * - * @param {any} d3Elem D3 Element to apply the attributes onto - * @param {[string, string][]} attrs Object.keys equivalent format of key to value mapping of - * attributes - */ -const d3Attrs = function (d3Elem, attrs) { - for (const attr of attrs) { - d3Elem.attr(attr[0], attr[1]); - } -}; - export const initIdGenerator = class iterator { constructor(deterministic, seed) { this.deterministic = deterministic; @@ -742,7 +725,7 @@ let decoder; * Decodes HTML, source: {@link https://github.com/shrpne/entity-decode/blob/v2.0.1/browser.js} * * @param {string} html HTML as a string - * @returns Unescaped HTML + * @returns {string} Unescaped HTML */ export const entityDecode = function (html) { decoder = decoder || document.createElement('div'); diff --git a/test.js b/test.js deleted file mode 100644 index fa728c6ed..000000000 --- a/test.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * - */ -function apa() { - // comment's - const a = 1; - return 'apa' + a; -} diff --git a/yarn.lock b/yarn.lock index 61ea96333..55fa0c555 100644 --- a/yarn.lock +++ b/yarn.lock @@ -244,6 +244,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== +"@babel/compat-data@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.1.tgz#72d647b4ff6a4f82878d184613353af1dd0290f9" + integrity sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg== + "@babel/core@7.12.3": version "7.12.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.3.tgz#1b436884e1e3bff6fb1328dc02b208759de92ad8" @@ -266,6 +271,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.1.0", "@babel/core@^7.12.17": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.1.tgz#c8fa615c5e88e272564ace3d42fbc8b17bfeb22b" + integrity sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.0" + "@babel/helper-compilation-targets" "^7.19.1" + "@babel/helper-module-transforms" "^7.19.0" + "@babel/helpers" "^7.19.0" + "@babel/parser" "^7.19.1" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.1" + "@babel/types" "^7.19.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + "@babel/core@^7.11.6", "@babel/core@^7.12.3": version "7.18.13" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.13.tgz#9be8c44512751b05094a4d3ab05fc53a47ce00ac" @@ -305,6 +331,15 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" +"@babel/generator@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.0.tgz#785596c06425e59334df2ccee63ab166b738419a" + integrity sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg== + dependencies: + "@babel/types" "^7.19.0" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.16.0", "@babel/helper-annotate-as-pure@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" @@ -337,6 +372,16 @@ browserslist "^4.20.2" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.1.tgz#7f630911d83b408b76fe584831c98e5395d7a17c" + integrity sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg== + dependencies: + "@babel/compat-data" "^7.19.1" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.21.3" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.16.0": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz#fac430912606331cb075ea8d82f9a4c145a4da19" @@ -429,6 +474,14 @@ "@babel/template" "^7.18.6" "@babel/types" "^7.18.9" +"@babel/helper-function-name@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" + integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== + dependencies: + "@babel/template" "^7.18.10" + "@babel/types" "^7.19.0" + "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" @@ -485,6 +538,20 @@ "@babel/traverse" "^7.18.9" "@babel/types" "^7.18.9" +"@babel/helper-module-transforms@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30" + integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" + "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" @@ -639,6 +706,15 @@ "@babel/traverse" "^7.18.9" "@babel/types" "^7.18.9" +"@babel/helpers@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.0.tgz#f30534657faf246ae96551d88dd31e9d1fa1fc18" + integrity sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg== + dependencies: + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.0" + "@babel/types" "^7.19.0" + "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -658,6 +734,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.13.tgz#5b2dd21cae4a2c5145f1fbd8ca103f9313d3b7e4" integrity sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg== +"@babel/parser@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.1.tgz#6f6d6c2e621aad19a92544cc217ed13f1aac5b4c" + integrity sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" @@ -1178,7 +1259,7 @@ "@babel/helper-plugin-utils" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.18.6": +"@babel/plugin-transform-modules-commonjs@^7.12.13", "@babel/plugin-transform-modules-commonjs@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== @@ -1493,6 +1574,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.1.tgz#0fafe100a8c2a603b4718b1d9bf2568d1d193347" + integrity sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.19.0" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.19.0" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.19.1" + "@babel/types" "^7.19.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.18.13" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.13.tgz#30aeb9e514f4100f7c1cb6e5ba472b30e48f519a" @@ -1502,6 +1599,15 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@babel/types@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" + integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1512,6 +1618,14 @@ resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.0.tgz#fe364f025ba74f6de6c837a84ef44bdb1d61e68f" integrity sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w== +"@cnakazawa/watch@^1.0.3": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" + integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ== + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" + "@commitlint/cli@^17.1.2": version "17.1.2" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.1.2.tgz#38240f84936df5216f749f06f838dc50cc85a43d" @@ -1715,20 +1829,15 @@ esquery "^1.4.0" jsdoc-type-pratt-parser "~3.1.0" -"@esbuild/linux-loong64@0.14.54": - version "0.14.54" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz#de2a4be678bd4d0d1ffbb86e6de779cde5999028" - integrity sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw== - "@esbuild/linux-loong64@0.15.6": version "0.15.6" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.6.tgz#45be4184f00e505411bc265a05e709764114acd8" integrity sha512-hqmVU2mUjH6J2ZivHphJ/Pdse2ZD+uGCHK0uvsiLDk/JnSedEVj77CiVUnbMKuU4tih1TZZL8tG9DExQg/GZsw== -"@eslint/eslintrc@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.1.tgz#de0807bfeffc37b964a7d0400e0c348ce5a2543d" - integrity sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ== +"@eslint/eslintrc@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.2.tgz#58b69582f3b7271d8fa67fe5251767a5b38ea356" + integrity sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1854,15 +1963,15 @@ "@types/node" "*" jest-mock "^28.1.3" -"@jest/environment@^29.0.2": - version "29.0.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.0.2.tgz#9e4b6d4c9bce5bfced6f63945d8c8e571394f572" - integrity sha512-Yf+EYaLOrVCgts/aTS5nGznU4prZUPa5k9S63Yct8YSOKj2jkdS17hHSUKhk5jxDFMyCy1PXknypDw7vfgc/mA== +"@jest/environment@^29.0.3": + version "29.0.3" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.0.3.tgz#7745ec30a954e828e8cc6df6a13280d3b51d8f35" + integrity sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA== dependencies: - "@jest/fake-timers" "^29.0.2" - "@jest/types" "^29.0.2" + "@jest/fake-timers" "^29.0.3" + "@jest/types" "^29.0.3" "@types/node" "*" - jest-mock "^29.0.2" + jest-mock "^29.0.3" "@jest/expect-utils@^28.1.3": version "28.1.3" @@ -1891,17 +2000,17 @@ jest-mock "^28.1.3" jest-util "^28.1.3" -"@jest/fake-timers@^29.0.2": - version "29.0.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.0.2.tgz#6f15f4d8eb1089d445e3f73473ddc434faa2f798" - integrity sha512-2JhQeWU28fvmM5r33lxg6BxxkTKaVXs6KMaJ6eXSM8ml/MaWkt2BvbIO8G9KWAJFMdBXWbn+2h9OK1/s5urKZA== +"@jest/fake-timers@^29.0.3": + version "29.0.3" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.0.3.tgz#ad5432639b715d45a86a75c47fd75019bc36b22c" + integrity sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ== dependencies: - "@jest/types" "^29.0.2" + "@jest/types" "^29.0.3" "@sinonjs/fake-timers" "^9.1.2" "@types/node" "*" - jest-message-util "^29.0.2" - jest-mock "^29.0.2" - jest-util "^29.0.2" + jest-message-util "^29.0.3" + jest-mock "^29.0.3" + jest-util "^29.0.3" "@jest/globals@^28.1.3": version "28.1.3" @@ -1986,6 +2095,27 @@ jest-haste-map "^28.1.3" slash "^3.0.0" +"@jest/transform@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" + integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^26.6.2" + babel-plugin-istanbul "^6.0.0" + chalk "^4.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.4" + jest-haste-map "^26.6.2" + jest-regex-util "^26.0.0" + jest-util "^26.6.2" + micromatch "^4.0.2" + pirates "^4.0.1" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + "@jest/transform@^28.1.3": version "28.1.3" resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.3.tgz#59d8098e50ab07950e0f2fc0fc7ec462371281b0" @@ -2007,6 +2137,17 @@ slash "^3.0.0" write-file-atomic "^4.0.1" +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@jest/types@^28.1.3": version "28.1.3" resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b" @@ -2019,10 +2160,10 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jest/types@^29.0.2": - version "29.0.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.0.2.tgz#5a5391fa7f7f41bf4b201d6d2da30e874f95b6c1" - integrity sha512-5WNMesBLmlkt1+fVkoCjHa0X3i3q8zc4QLTDkdHgCa2gyPZc7rdlZBWgVLqwS1860ZW5xJuCDwAzqbGaXIr/ew== +"@jest/types@^29.0.3": + version "29.0.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.0.3.tgz#0be78fdddb1a35aeb2041074e55b860561c8ef63" + integrity sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A== dependencies: "@jest/schemas" "^29.0.0" "@types/istanbul-lib-coverage" "^2.0.0" @@ -2170,6 +2311,17 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": + version "7.1.19" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" + integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + "@types/babel__core@^7.1.14": version "7.1.17" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.17.tgz#f50ac9d20d64153b510578d84f9643f9a3afbe64" @@ -2489,7 +2641,7 @@ resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249" integrity sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA== -"@types/graceful-fs@^4.1.3": +"@types/graceful-fs@^4.1.2", "@types/graceful-fs@^4.1.3": version "4.1.5" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== @@ -2681,6 +2833,13 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== +"@types/yargs@^15.0.0": + version "15.0.14" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.14.tgz#26d821ddb89e70492160b66d10a0eb6df8f6fb06" + integrity sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ== + dependencies: + "@types/yargs-parser" "*" + "@types/yargs@^17.0.8": version "17.0.10" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.10.tgz#591522fce85d8739bca7b8bb90d048e4478d186a" @@ -2695,14 +2854,14 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.1.tgz#471f64dc53600025e470dad2ca4a9f2864139019" - integrity sha512-iC40UK8q1tMepSDwiLbTbMXKDxzNy+4TfPWgIL661Ym0sD42vRcQU93IsZIrmi+x292DBr60UI/gSwfdVYexCA== +"@typescript-eslint/eslint-plugin@^5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz#5ccdd5d9004120f28fc6e717fb4b5c9bddcfbc04" + integrity sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og== dependencies: - "@typescript-eslint/scope-manager" "5.36.1" - "@typescript-eslint/type-utils" "5.36.1" - "@typescript-eslint/utils" "5.36.1" + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/type-utils" "5.37.0" + "@typescript-eslint/utils" "5.37.0" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -2710,14 +2869,14 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.36.1.tgz#931c22c7bacefd17e29734628cdec8b2acdcf1ce" - integrity sha512-/IsgNGOkBi7CuDfUbwt1eOqUXF9WGVBW9dwEe1pi+L32XrTsZIgmDFIi2RxjzsvB/8i+MIf5JIoTEH8LOZ368A== +"@typescript-eslint/parser@^5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.37.0.tgz#c382077973f3a4ede7453fb14cadcad3970cbf3b" + integrity sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw== dependencies: - "@typescript-eslint/scope-manager" "5.36.1" - "@typescript-eslint/types" "5.36.1" - "@typescript-eslint/typescript-estree" "5.36.1" + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/typescript-estree" "5.37.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.10.1": @@ -2728,21 +2887,21 @@ "@typescript-eslint/types" "5.10.1" "@typescript-eslint/visitor-keys" "5.10.1" -"@typescript-eslint/scope-manager@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.36.1.tgz#23c49b7ddbcffbe09082e6694c2524950766513f" - integrity sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w== +"@typescript-eslint/scope-manager@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz#044980e4f1516a774a418dafe701a483a6c9f9ca" + integrity sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q== dependencies: - "@typescript-eslint/types" "5.36.1" - "@typescript-eslint/visitor-keys" "5.36.1" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/visitor-keys" "5.37.0" -"@typescript-eslint/type-utils@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.36.1.tgz#016fc2bff6679f54c0b2df848a493f0ca3d4f625" - integrity sha512-xfZhfmoQT6m3lmlqDvDzv9TiCYdw22cdj06xY0obSznBsT///GK5IEZQdGliXpAOaRL34o8phEvXzEo/VJx13Q== +"@typescript-eslint/type-utils@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz#43ed2f567ada49d7e33a6e4b6f9babd060445fe5" + integrity sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ== dependencies: - "@typescript-eslint/typescript-estree" "5.36.1" - "@typescript-eslint/utils" "5.36.1" + "@typescript-eslint/typescript-estree" "5.37.0" + "@typescript-eslint/utils" "5.37.0" debug "^4.3.4" tsutils "^3.21.0" @@ -2751,10 +2910,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.10.1.tgz#dca9bd4cb8c067fc85304a31f38ec4766ba2d1ea" integrity sha512-ZvxQ2QMy49bIIBpTqFiOenucqUyjTQ0WNLhBM6X1fh1NNlYAC6Kxsx8bRTY3jdYsYg44a0Z/uEgQkohbR0H87Q== -"@typescript-eslint/types@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.1.tgz#1cf0e28aed1cb3ee676917966eb23c2f8334ce2c" - integrity sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg== +"@typescript-eslint/types@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.37.0.tgz#09e4870a5f3af7af3f84e08d792644a87d232261" + integrity sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA== "@typescript-eslint/typescript-estree@5.10.1": version "5.10.1" @@ -2769,28 +2928,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.1.tgz#b857f38d6200f7f3f4c65cd0a5afd5ae723f2adb" - integrity sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g== +"@typescript-eslint/typescript-estree@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz#956dcf5c98363bcb97bdd5463a0a86072ff79355" + integrity sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA== dependencies: - "@typescript-eslint/types" "5.36.1" - "@typescript-eslint/visitor-keys" "5.36.1" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/visitor-keys" "5.37.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.36.1.tgz#136d5208cc7a3314b11c646957f8f0b5c01e07ad" - integrity sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg== +"@typescript-eslint/utils@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.37.0.tgz#7784cb8e91390c4f90ccaffd24a0cf9874df81b2" + integrity sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.36.1" - "@typescript-eslint/types" "5.36.1" - "@typescript-eslint/typescript-estree" "5.36.1" + "@typescript-eslint/scope-manager" "5.37.0" + "@typescript-eslint/types" "5.37.0" + "@typescript-eslint/typescript-estree" "5.37.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -2814,12 +2973,12 @@ "@typescript-eslint/types" "5.10.1" eslint-visitor-keys "^3.0.0" -"@typescript-eslint/visitor-keys@5.36.1": - version "5.36.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.1.tgz#7731175312d65738e501780f923896d200ad1615" - integrity sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ== +"@typescript-eslint/visitor-keys@5.37.0": + version "5.37.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz#7b72dd343295ea11e89b624995abc7103c554eee" + integrity sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA== dependencies: - "@typescript-eslint/types" "5.36.1" + "@typescript-eslint/types" "5.37.0" eslint-visitor-keys "^3.3.0" "@wdio/config@7.16.11": @@ -3069,6 +3228,14 @@ ansi-styles@~1.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" integrity sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg= +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -3226,6 +3393,20 @@ axios@^0.21.1: dependencies: follow-redirects "^1.14.0" +babel-jest@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" + integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== + dependencies: + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" + "@types/babel__core" "^7.1.7" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^26.6.2" + chalk "^4.0.0" + graceful-fs "^4.2.4" + slash "^3.0.0" + babel-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" @@ -3246,7 +3427,7 @@ babel-plugin-dynamic-import-node@^2.3.3: dependencies: object.assign "^4.1.0" -babel-plugin-istanbul@^6.1.1: +babel-plugin-istanbul@^6.0.0, babel-plugin-istanbul@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== @@ -3257,6 +3438,16 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" +babel-plugin-jest-hoist@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" + integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.0.0" + "@types/babel__traverse" "^7.0.6" + babel-plugin-jest-hoist@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz#1952c4d0ea50f2d6d794353762278d1d8cca3fbe" @@ -3309,6 +3500,14 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" +babel-preset-jest@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" + integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ== + dependencies: + babel-plugin-jest-hoist "^26.6.2" + babel-preset-current-node-syntax "^1.0.0" + babel-preset-jest@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz#5dfc20b99abed5db994406c2b9ab94c73aaa419d" @@ -3362,11 +3561,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -3468,6 +3662,16 @@ browserslist@^4.20.2, browserslist@^4.21.0: node-releases "^2.0.5" update-browserslist-db "^1.0.4" +browserslist@^4.21.3: + version "4.21.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" + integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== + dependencies: + caniuse-lite "^1.0.30001400" + electron-to-chromium "^1.4.251" + node-releases "^2.0.6" + update-browserslist-db "^1.0.9" + bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -3600,6 +3804,18 @@ caniuse-lite@^1.0.30001359: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001390.tgz" integrity sha512-sS4CaUM+/+vqQUlCvCJ2WtDlV81aWtHhqeEVkLokVJJa3ViN4zDxAGfq9R8i1m90uGHxo99cy10Od+lvn3hf0g== +caniuse-lite@^1.0.30001400: + version "1.0.30001402" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001402.tgz#aa29e1f47f5055b0d0c07696a67b8b08023d14c8" + integrity sha512-Mx4MlhXO5NwuvXGgVb+hg65HZ+bhUYsz8QtDGDo2QmaJS2GBX47Xfi2koL86lc8K+l+htXeTEB/Aeqvezoo6Ew== + +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== + dependencies: + rsvp "^4.8.4" + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -3705,6 +3921,11 @@ chokidar@^3.4.0: optionalDependencies: fsevents "~2.3.2" +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + ci-info@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" @@ -4305,10 +4526,10 @@ cypress-image-snapshot@^4.0.1: pkg-dir "^3.0.0" term-img "^4.0.0" -cypress@9.7.0: - version "9.7.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.7.0.tgz#bf55b2afd481f7a113ef5604aa8b693564b5e744" - integrity sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q== +cypress@^10.0.0: + version "10.8.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.8.0.tgz#12a681f2642b6f13d636bab65d5b71abdb1497a5" + integrity sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -4329,7 +4550,7 @@ cypress@9.7.0: dayjs "^1.10.4" debug "^4.3.2" enquirer "^2.3.6" - eventemitter2 "^6.4.3" + eventemitter2 "6.4.7" execa "4.1.0" executable "^4.1.1" extract-zip "2.0.1" @@ -4984,10 +5205,10 @@ domhandler@^5.0.1, domhandler@^5.0.2: dependencies: domelementtype "^2.3.0" -dompurify@2.3.10: - version "2.3.10" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.10.tgz#901f7390ffe16a91a5a556b94043314cd4850385" - integrity sha512-o7Fg/AgC7p/XpKjf/+RC3Ok6k4St5F7Q6q6+Nnm3p2zGWioAY6dh0CbbuwOhH2UcSzKsdniE/YnE2/92JcsA+g== +dompurify@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.0.tgz#c9c88390f024c2823332615c9e20a453cf3825dd" + integrity sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA== domutils@^3.0.1: version "3.0.1" @@ -5058,6 +5279,11 @@ electron-to-chromium@^1.4.172: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.177.tgz#b6a4436eb788ca732556cd69f384b8a3c82118c5" integrity sha512-FYPir3NSBEGexSZUEeht81oVhHfLFl6mhUKSkjHN/iB/TwEIt/WHQrqVGfTLN5gQxwJCQkIJBe05eOXjI7omgg== +electron-to-chromium@^1.4.251: + version "1.4.253" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.253.tgz#3402fd2159530fc6d94237f1b9535fa7bebaf399" + integrity sha512-1pezJ2E1UyBTGbA7fUlHdPSXQw1k+82VhTFLG5G0AUqLGvsZqFzleOblceqegZzxYX4kC7hGEEdzIQI9RZ1Cuw== + emittery@^0.10.2: version "0.10.2" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" @@ -5078,11 +5304,6 @@ emoji-regex@^9.2.2: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -5095,14 +5316,6 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^5.0.0: - version "5.10.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" - integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -5129,245 +5342,115 @@ error@^7.0.0: dependencies: string-template "~0.2.1" -esbuild-android-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz#505f41832884313bbaffb27704b8bcaa2d8616be" - integrity sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ== - esbuild-android-64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.6.tgz#baaed943ca510c2ad546e116728132e76d1d2044" integrity sha512-Z1CHSgB1crVQi2LKSBwSkpaGtaloVz0ZIYcRMsvHc3uSXcR/x5/bv9wcZspvH/25lIGTaViosciS/NS09ERmVA== -esbuild-android-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz#8ce69d7caba49646e009968fe5754a21a9871771" - integrity sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg== - esbuild-android-arm64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.6.tgz#1c33c73d4c074969e014e31958116460c8e75a7a" integrity sha512-mvM+gqNxqKm2pCa3dnjdRzl7gIowuc4ga7P7c3yHzs58Im8v/Lfk1ixSgQ2USgIywT48QWaACRa3F4MG7djpSw== -esbuild-darwin-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz#24ba67b9a8cb890a3c08d9018f887cc221cdda25" - integrity sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug== - esbuild-darwin-64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.6.tgz#388592ba61bf31993d79f6311f7452aa1ef255b9" integrity sha512-BsfVt3usScAfGlXJiGtGamwVEOTM8AiYiw1zqDWhGv6BncLXCnTg1As+90mxWewdTZKq3iIy8s9g8CKkrrAXVw== -esbuild-darwin-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz#3f7cdb78888ee05e488d250a2bdaab1fa671bf73" - integrity sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw== - esbuild-darwin-arm64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.6.tgz#194e987849dc4688654008a1792f26e948f52e74" integrity sha512-CnrAeJaEpPakUobhqO4wVSA4Zm6TPaI5UY4EsI62j9mTrjIyQPXA1n4Ju6Iu5TVZRnEqV6q8blodgYJ6CJuwCA== -esbuild-freebsd-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz#09250f997a56ed4650f3e1979c905ffc40bbe94d" - integrity sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg== - esbuild-freebsd-64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.6.tgz#daa72faee585ec2ec27cc65e86a6ce0786373e66" integrity sha512-+qFdmqi+jkAsxsNJkaWVrnxEUUI50nu6c3MBVarv3RCDCbz7ZS1a4ZrdkwEYFnKcVWu6UUE0Kkb1SQ1yGEG6sg== -esbuild-freebsd-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz#bafb46ed04fc5f97cbdb016d86947a79579f8e48" - integrity sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q== - esbuild-freebsd-arm64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.6.tgz#70c8a2a30bf6bb9d547a0d8dc93aa015ec4f77f9" integrity sha512-KtQkQOhnNciXm2yrTYZMD3MOm2zBiiwFSU+dkwNbcfDumzzUprr1x70ClTdGuZwieBS1BM/k0KajRQX7r504Xw== -esbuild-linux-32@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz#e2a8c4a8efdc355405325033fcebeb941f781fe5" - integrity sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw== +esbuild-jest@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/esbuild-jest/-/esbuild-jest-0.5.0.tgz#7a9964bfdecafca3b675a8aeb08193bcdba8b9d7" + integrity sha512-AMZZCdEpXfNVOIDvURlqYyHwC8qC1/BFjgsrOiSL1eyiIArVtHL8YAC83Shhn16cYYoAWEW17yZn0W/RJKJKHQ== + dependencies: + "@babel/core" "^7.12.17" + "@babel/plugin-transform-modules-commonjs" "^7.12.13" + babel-jest "^26.6.3" esbuild-linux-32@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.6.tgz#d69ed2335b2d68c00b3248254b432172077b7ced" integrity sha512-IAkDNz3TpxwISTGVdQijwyHBZrbFgLlRi5YXcvaEHtgbmayLSDcJmH5nV1MFgo/x2QdKcHBkOYHdjhKxUAcPwg== -esbuild-linux-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz#de5fdba1c95666cf72369f52b40b03be71226652" - integrity sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg== - esbuild-linux-64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.6.tgz#dca821e8f129cccde23ac947fd0d4bea3b333808" integrity sha512-gQPksyrEYfA4LJwyfTQWAZaVZCx4wpaLrSzo2+Xc9QLC+i/sMWmX31jBjrn4nLJCd79KvwCinto36QC7BEIU/A== -esbuild-linux-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz#dae4cd42ae9787468b6a5c158da4c84e83b0ce8b" - integrity sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig== - esbuild-linux-arm64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.6.tgz#c9e8bc86f3c58a7c8ff1ded5880c6a39ade7621b" integrity sha512-aovDkclFa6C9EdZVBuOXxqZx83fuoq8097xZKhEPSygwuy4Lxs8J4anHG7kojAsR+31lfUuxzOo2tHxv7EiNHA== -esbuild-linux-arm@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz#a2c1dff6d0f21dbe8fc6998a122675533ddfcd59" - integrity sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw== - esbuild-linux-arm@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.6.tgz#354ecad0223f5b176995cf4462560eec2633de24" integrity sha512-xZ0Bq2aivsthDjA/ytQZzxrxIZbG0ATJYMJxNeOIBc1zUjpbVpzBKgllOZMsTSXMHFHGrow6TnCcgwqY0+oEoQ== -esbuild-linux-mips64le@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz#d9918e9e4cb972f8d6dae8e8655bf9ee131eda34" - integrity sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw== - esbuild-linux-mips64le@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.6.tgz#f4fb941a4ff0af437deed69a2e0712983c8fff3e" integrity sha512-wVpW8wkWOGizsCqCwOR/G3SHwhaecpGy3fic9BF1r7vq4djLjUcA8KunDaBCjJ6TgLQFhJ98RjDuyEf8AGjAvw== -esbuild-linux-ppc64le@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz#3f9a0f6d41073fb1a640680845c7de52995f137e" - integrity sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ== - esbuild-linux-ppc64le@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.6.tgz#19774a8b52c77173f2d4f171b8a8cf839b12e686" integrity sha512-z6w6gsPH/Y77uchocluDC8tkCg9rfkcPTePzZKNr879bF4tu7j9t255wuNOCE396IYEGxY7y8u2HJ9i7kjCLVw== -esbuild-linux-riscv64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz#618853c028178a61837bc799d2013d4695e451c8" - integrity sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg== - esbuild-linux-riscv64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.6.tgz#66bd83b065c4a1e623df02c122bc7e4e15fd8486" integrity sha512-pfK/3MJcmbfU399TnXW5RTPS1S+ID6ra+CVj9TFZ2s0q9Ja1F5A1VirUUvViPkjiw+Kq3zveyn6U09Wg1zJXrw== -esbuild-linux-s390x@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz#d1885c4c5a76bbb5a0fe182e2c8c60eb9e29f2a6" - integrity sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA== - esbuild-linux-s390x@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.6.tgz#1e024bddc75afe8dc70ed48fc9627af770d7f34b" integrity sha512-OZeeDu32liefcwAE63FhVqM4heWTC8E3MglOC7SK0KYocDdY/6jyApw0UDkDHlcEK9mW6alX/SH9r3PDjcCo/Q== -esbuild-loader@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/esbuild-loader/-/esbuild-loader-2.19.0.tgz#54f62d1da8262acfc3c5883c24da35af8324f116" - integrity sha512-urGNVE6Tl2rqx92ElKi/LiExXjGvcH6HfDBFzJ9Ppwqh4n6Jmx8x7RKAyMzSM78b6CAaJLhDncG5sPrL0ROh5Q== - dependencies: - esbuild "^0.14.39" - joycon "^3.0.1" - json5 "^2.2.0" - loader-utils "^2.0.0" - tapable "^2.2.0" - webpack-sources "^2.2.0" - -esbuild-netbsd-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz#69ae917a2ff241b7df1dbf22baf04bd330349e81" - integrity sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w== - esbuild-netbsd-64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.6.tgz#c11477d197f059c8794ee1691e3399201f7c4b9a" integrity sha512-kaxw61wcHMyiEsSsi5ut1YYs/hvTC2QkxJwyRvC2Cnsz3lfMLEu8zAjpBKWh9aU/N0O/gsRap4wTur5GRuSvBA== -esbuild-openbsd-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz#db4c8495287a350a6790de22edea247a57c5d47b" - integrity sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw== - esbuild-openbsd-64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.6.tgz#b29e7faed5b8d2aeaf3884c47c1a96b1cba8e263" integrity sha512-CuoY60alzYfIZapUHqFXqXbj88bbRJu8Fp9okCSHRX2zWIcGz4BXAHXiG7dlCye5nFVrY72psesLuWdusyf2qw== -esbuild-sunos-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz#54287ee3da73d3844b721c21bc80c1dc7e1bf7da" - integrity sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw== - esbuild-sunos-64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.6.tgz#9668f39e47179f50c0435040904b9c6e10e84a70" integrity sha512-1ceefLdPWcd1nW/ZLruPEYxeUEAVX0YHbG7w+BB4aYgfknaLGotI/ZvPWUZpzhC8l1EybrVlz++lm3E6ODIJOg== -esbuild-windows-32@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz#f8aaf9a5667630b40f0fb3aa37bf01bbd340ce31" - integrity sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w== - esbuild-windows-32@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.6.tgz#9ddcd56e3c4fb9729a218c713c4e76bdbc1678b4" integrity sha512-pBqdOsKqCD5LRYiwF29PJRDJZi7/Wgkz46u3d17MRFmrLFcAZDke3nbdDa1c8YgY78RiemudfCeAemN8EBlIpA== -esbuild-windows-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz#bf54b51bd3e9b0f1886ffdb224a4176031ea0af4" - integrity sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ== - esbuild-windows-64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.6.tgz#1eaadeadfd995e9d065d35cb3e9f02607202f339" integrity sha512-KpPOh4aTOo//g9Pk2oVAzXMpc9Sz9n5A9sZTmWqDSXCiiachfFhbuFlsKBGATYCVitXfmBIJ4nNYYWSOdz4hQg== -esbuild-windows-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz#937d15675a15e4b0e4fafdbaa3a01a776a2be982" - integrity sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg== - esbuild-windows-arm64@0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.6.tgz#e18a778d354fc2ca2306688f3fedad8a3e57819e" integrity sha512-DB3G2x9OvFEa00jV+OkDBYpufq5x/K7a6VW6E2iM896DG4ZnAvJKQksOsCPiM1DUaa+DrijXAQ/ZOcKAqf/3Hg== -esbuild@^0.14.39, esbuild@^0.14.48: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.54.tgz#8b44dcf2b0f1a66fc22459943dccf477535e9aa2" - integrity sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA== - optionalDependencies: - "@esbuild/linux-loong64" "0.14.54" - esbuild-android-64 "0.14.54" - esbuild-android-arm64 "0.14.54" - esbuild-darwin-64 "0.14.54" - esbuild-darwin-arm64 "0.14.54" - esbuild-freebsd-64 "0.14.54" - esbuild-freebsd-arm64 "0.14.54" - esbuild-linux-32 "0.14.54" - esbuild-linux-64 "0.14.54" - esbuild-linux-arm "0.14.54" - esbuild-linux-arm64 "0.14.54" - esbuild-linux-mips64le "0.14.54" - esbuild-linux-ppc64le "0.14.54" - esbuild-linux-riscv64 "0.14.54" - esbuild-linux-s390x "0.14.54" - esbuild-netbsd-64 "0.14.54" - esbuild-openbsd-64 "0.14.54" - esbuild-sunos-64 "0.14.54" - esbuild-windows-32 "0.14.54" - esbuild-windows-64 "0.14.54" - esbuild-windows-arm64 "0.14.54" - esbuild@^0.15.6: version "0.15.6" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.6.tgz#626e5941b98de506b862047be3c4b33f89278923" @@ -5474,10 +5557,10 @@ eslint-plugin-html@^7.1.0: dependencies: htmlparser2 "^8.0.1" -eslint-plugin-jest@^27.0.1: - version "27.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.0.1.tgz#3e67ee2051411540988c62075e8788702a1064da" - integrity sha512-LosUsrkwVSs/8Z/I8Hqn5vWgTEsHrfIquDEKOsV8/cl+gbFR4tiRCE1AimEotsHjSC0Rx1tYm6vPhw8C3ktmmg== +eslint-plugin-jest@^27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.0.4.tgz#ab9c7b3f48bfade4762c24c415a5d9bbc0174a61" + integrity sha512-BuvY78pHMpMJ6Cio7sKg6jrqEcnRYPUc4Nlihku4vKx3FjlmMINSX4vcYokZIe+8TKcyr1aI5Kq7vYwgJNdQSA== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -5542,12 +5625,12 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.23.0: - version "8.23.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.0.tgz#a184918d288820179c6041bb3ddcc99ce6eea040" - integrity sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA== +eslint@^8.23.1: + version "8.23.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.23.1.tgz#cfd7b3f7fdd07db8d16b4ac0516a29c8d8dca5dc" + integrity sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg== dependencies: - "@eslint/eslintrc" "^1.3.1" + "@eslint/eslintrc" "^1.3.2" "@humanwhocodes/config-array" "^0.10.4" "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" "@humanwhocodes/module-importer" "^1.0.1" @@ -5566,7 +5649,6 @@ eslint@^8.23.0: fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" - functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" globals "^13.15.0" globby "^11.1.0" @@ -5575,6 +5657,7 @@ eslint@^8.23.0: import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" + js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" @@ -5668,10 +5751,15 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter2@^6.4.3: - version "6.4.5" - resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.5.tgz#97380f758ae24ac15df8353e0cc27f8b95644655" - integrity sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw== +eventemitter2@6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d" + integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg== + +exec-sh@^0.3.2: + version "0.3.6" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" + integrity sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w== execa@4.1.0: version "4.1.0" @@ -6135,7 +6223,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@^2.1.2, fsevents@^2.3.2, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -6900,6 +6988,13 @@ is-buffer@^2.0.0: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + is-ci@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" @@ -7095,7 +7190,7 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typedarray@~1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= @@ -7326,18 +7421,18 @@ jest-each@^28.1.3: jest-util "^28.1.3" pretty-format "^28.1.3" -jest-environment-jsdom@^29.0.2: - version "29.0.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.0.2.tgz#d616a19416d0dda5155b854d301197fb6092dff0" - integrity sha512-hWqC9FQI5yT04lTd4VJnzT5QObxq0xrSrqpGkqsYfxPeJYjyhriI7W2oJC5HZ1UbhnvA+8GS1nzgPsstvRpdVw== +jest-environment-jsdom@^29.0.3: + version "29.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.0.3.tgz#0c6ee841133dd6acbe957bceaceea93b7ec60ca9" + integrity sha512-KIGvpm12c71hoYTjL4wC2c8K6KfhOHJqJtaHc1IApu5rG047YWZoEP13BlbucWfzGISBrmli8KFqdhdQEa8Wnw== dependencies: - "@jest/environment" "^29.0.2" - "@jest/fake-timers" "^29.0.2" - "@jest/types" "^29.0.2" + "@jest/environment" "^29.0.3" + "@jest/fake-timers" "^29.0.3" + "@jest/types" "^29.0.3" "@types/jsdom" "^20.0.0" "@types/node" "*" - jest-mock "^29.0.2" - jest-util "^29.0.2" + jest-mock "^29.0.3" + jest-util "^29.0.3" jsdom "^20.0.0" jest-environment-node@^28.1.3: @@ -7352,19 +7447,32 @@ jest-environment-node@^28.1.3: jest-mock "^28.1.3" jest-util "^28.1.3" -jest-esbuild@^0.2.9: - version "0.2.9" - resolved "https://registry.yarnpkg.com/jest-esbuild/-/jest-esbuild-0.2.9.tgz#c4c103e510400ad8a080753fd990dfe5a2a76025" - integrity sha512-GfcQgHf8XPwUydEurYTRdrhrDblVFXtgOsKmE/7KADxbsC0c5xpxQBarak4X7K0wl5XXfTmw7Qtat2V0/ssreg== - dependencies: - debug "^4.3.4" - esbuild "^0.14.48" - jest-get-type@^28.0.2: version "28.0.2" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== +jest-haste-map@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" + integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== + dependencies: + "@jest/types" "^26.6.2" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^26.0.0" + jest-serializer "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" + micromatch "^4.0.2" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.1.2" + jest-haste-map@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.3.tgz#abd5451129a38d9841049644f34b034308944e2b" @@ -7432,18 +7540,18 @@ jest-message-util@^28.1.3: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^29.0.2: - version "29.0.2" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.0.2.tgz#b2781dfb6a2d1c63830d9684c5148ae3155c6154" - integrity sha512-kcJAgms3ckJV0wUoLsAM40xAhY+pb9FVSZwicjFU9PFkaTNmqh9xd99/CzKse48wPM1ANUQKmp03/DpkY+lGrA== +jest-message-util@^29.0.3: + version "29.0.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.0.3.tgz#f0254e1ffad21890c78355726202cc91d0a40ea8" + integrity sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.0.2" + "@jest/types" "^29.0.3" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^29.0.2" + pretty-format "^29.0.3" slash "^3.0.0" stack-utils "^2.0.3" @@ -7455,12 +7563,12 @@ jest-mock@^28.1.3: "@jest/types" "^28.1.3" "@types/node" "*" -jest-mock@^29.0.2: - version "29.0.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.0.2.tgz#d7810966a6338aca6a440c3cd9f19276477840ad" - integrity sha512-giWXOIT23UCxHCN2VUfUJ0Q7SmiqQwfSFXlCaIhW5anITpNQ+3vuLPQdKt5wkuwM37GrbFyHIClce8AAK9ft9g== +jest-mock@^29.0.3: + version "29.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.0.3.tgz#4f0093f6a9cb2ffdb9c44a07a3912f0c098c8de9" + integrity sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww== dependencies: - "@jest/types" "^29.0.2" + "@jest/types" "^29.0.3" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -7468,6 +7576,11 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== +jest-regex-util@^26.0.0: + version "26.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" + integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== + jest-regex-util@^28.0.2: version "28.0.2" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" @@ -7551,6 +7664,14 @@ jest-runtime@^28.1.3: slash "^3.0.0" strip-bom "^4.0.0" +jest-serializer@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" + integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== + dependencies: + "@types/node" "*" + graceful-fs "^4.2.4" + jest-snapshot@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.3.tgz#17467b3ab8ddb81e2f605db05583d69388fc0668" @@ -7580,6 +7701,18 @@ jest-snapshot@^28.1.3: pretty-format "^28.1.3" semver "^7.3.5" +jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== + dependencies: + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + jest-util@^28.0.0, jest-util@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0" @@ -7592,12 +7725,12 @@ jest-util@^28.0.0, jest-util@^28.1.3: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^29.0.2: - version "29.0.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.0.2.tgz#c75c5cab7f3b410782f9570a60c5558b5dfb6e3a" - integrity sha512-ozk8ruEEEACxqpz0hN9UOgtPZS0aN+NffwQduR5dVlhN+eN47vxurtvgZkYZYMpYrsmlAEx1XabkB3BnN0GfKQ== +jest-util@^29.0.3: + version "29.0.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.0.3.tgz#06d1d77f9a1bea380f121897d78695902959fbc0" + integrity sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ== dependencies: - "@jest/types" "^29.0.2" + "@jest/types" "^29.0.3" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" @@ -7630,6 +7763,15 @@ jest-watcher@^28.1.3: jest-util "^28.1.3" string-length "^4.0.1" +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + jest-worker@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" @@ -7682,11 +7824,6 @@ joi@^17.4.0: "@sideway/formula" "^3.0.0" "@sideway/pinpoint" "^2.0.0" -joycon@^3.0.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" - integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== - jpeg-js@0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.4.tgz#a9f1c6f1f9f0fa80cdb3484ed9635054d28936aa" @@ -7697,6 +7834,11 @@ js-base64@3.7.2: resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745" integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ== +js-sdsl@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.1.4.tgz#78793c90f80e8430b7d8dc94515b6c77d98a26a6" + integrity sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -7810,7 +7952,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@^2.1.2, json5@^2.2.0, json5@^2.2.1: +json5@^2.1.2, json5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== @@ -8051,15 +8193,6 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -loader-utils@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129" - integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -8598,7 +8731,7 @@ micromark@~2.11.0: debug "^4.0.0" parse-entities "^2.0.0" -micromatch@^3.1.5: +micromatch@^3.1.4, micromatch@^3.1.5: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -8617,7 +8750,7 @@ micromatch@^3.1.5: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.0, micromatch@^4.0.4, micromatch@^4.0.5: +micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -8688,7 +8821,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== @@ -8824,6 +8957,11 @@ node-releases@^2.0.5: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== + nomnom@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.5.2.tgz#f4345448a853cfbd5c0d26320f2477ab0526fe2f" @@ -9368,7 +9506,7 @@ pify@^5.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== -pirates@^4.0.4: +pirates@^4.0.1, pirates@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== @@ -9466,10 +9604,10 @@ pretty-format@^28.0.0, pretty-format@^28.1.3: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-format@^29.0.2: - version "29.0.2" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.0.2.tgz#7f7666a7bf05ba2bcacde61be81c6db64f6f3be6" - integrity sha512-wp3CdtUa3cSJVFn3Miu5a1+pxc1iPIQTenOAn+x5erXeN1+ryTcLesV5pbK/rlW5EKwp27x38MoYfNGaNXDDhg== +pretty-format@^29.0.3: + version "29.0.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.0.3.tgz#23d5f8cabc9cbf209a77d49409d093d61166a811" + integrity sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q== dependencies: "@jest/schemas" "^29.0.0" ansi-styles "^5.0.0" @@ -10155,6 +10293,11 @@ robust-predicates@^3.0.0: resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a" integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g== +rsvp@^4.8.4: + version "4.8.5" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -10208,6 +10351,21 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" + integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== + dependencies: + "@cnakazawa/watch" "^1.0.3" + anymatch "^2.0.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" + fb-watchman "^2.0.0" + micromatch "^3.1.4" + minimist "^1.1.1" + walker "~1.0.5" + saxes@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" @@ -10429,11 +10587,6 @@ socks@^2.3.3: ip "^1.1.5" smart-buffer "^4.2.0" -source-list-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -10798,10 +10951,10 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -stylis@^4.0.10: - version "4.1.1" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.1.tgz#e46c6a9bbf7c58db1e65bb730be157311ae1fe12" - integrity sha512-lVrM/bNdhVX2OgBFNa2YJ9Lxj7kPzylieHd3TNjuGE0Re9JB7joL5VUKOVH1kdNNJTgGPpT8hmwIAPLaSyEVFQ== +stylis@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.2.tgz#870b3c1c2275f51b702bb3da9e94eedad87bba41" + integrity sha512-Nn2CCrG2ZaFziDxaZPN43CXqn+j7tcdjPFCkRBkFue8QYXC2HdEwnw5TCBo4yQZ2WxKYeSi0fdoOrtEqgDrXbA== subarg@^1.0.0: version "1.0.0" @@ -10856,11 +11009,6 @@ 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@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - term-img@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/term-img/-/term-img-4.1.0.tgz#5b170961f7aa20b2f3b22deb8ad504beb963a8a5" @@ -11093,16 +11241,6 @@ ts-jest@^28.0.8: semver "7.x" yargs-parser "^21.0.1" -ts-loader@^9.3.1: - version "9.3.1" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.3.1.tgz#fe25cca56e3e71c1087fe48dc67f4df8c59b22d4" - integrity sha512-OkyShkcZTsTwyS3Kt7a4rsT/t2qvEVQuKCTg4LJmpj9fhFR7ukGdZwV6Qq3tRUkqcXtfGpPR7+hFKHCG/0d3Lw== - dependencies: - chalk "^4.1.0" - enhanced-resolve "^5.0.0" - micromatch "^4.0.0" - semver "^7.3.4" - ts-node@^10.8.1, ts-node@^10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -11208,16 +11346,28 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.6.4, typescript@^4.8.2: +typescript@^4.6.4: version "4.8.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790" integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw== +typescript@^4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" + integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== + uglify-js@^3.1.4: version "3.14.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.4.tgz#68756f17d1b90b9d289341736cb9a567d6882f90" @@ -11442,6 +11592,14 @@ update-browserslist-db@^1.0.4: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18" + integrity sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -11730,7 +11888,7 @@ wait-on@6.0.0: minimist "^1.2.5" rxjs "^7.1.0" -walker@^1.0.8: +walker@^1.0.7, walker@^1.0.8, walker@~1.0.5: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== @@ -11762,14 +11920,6 @@ webidl-conversions@^7.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== -webpack-sources@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.3.1.tgz#570de0af163949fe272233c2cefe1b56f74511fd" - integrity sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA== - dependencies: - source-list-map "^2.0.1" - source-map "^0.6.1" - websocket-driver@>=0.5.1: version "0.7.4" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" @@ -11877,6 +12027,16 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +write-file-atomic@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + write-file-atomic@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.1.tgz#9faa33a964c1c85ff6f849b80b42a88c2c537c8f"