diff --git a/.eslintrc.json b/.eslintrc.json index 47ba776d8..a360f8822 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -22,7 +22,7 @@ "plugin:@cspell/recommended", "prettier" ], - "plugins": ["@typescript-eslint", "html", "jest", "jsdoc", "json", "@cspell"], + "plugins": ["@typescript-eslint", "no-only-tests", "html", "jest", "jsdoc", "json", "@cspell"], "rules": { "no-console": "error", "no-prototype-builtins": "off", @@ -49,7 +49,6 @@ } ], "json/*": ["error", "allowComments"], - "no-empty": ["error", { "allowEmptyCatch": true }], "@cspell/spellchecker": [ "warn", { @@ -58,6 +57,13 @@ "checkStringTemplates": false } ] + "no-empty": [ + "error", + { + "allowEmptyCatch": true + } + ], + "no-only-tests/no-only-tests": "error" }, "overrides": [ { diff --git a/.vite/server.ts b/.vite/server.ts index c62b6236a..334398dd8 100644 --- a/.vite/server.ts +++ b/.vite/server.ts @@ -1,7 +1,15 @@ -import express from 'express'; +import express, { NextFunction, Request, Response } from 'express'; import { createServer as createViteServer } from 'vite'; // import { getBuildConfig } from './build'; +const cors = (req: Request, res: Response, next: NextFunction) => { + res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); + res.header('Access-Control-Allow-Headers', 'Content-Type'); + + next(); +}; + async function createServer() { const app = express(); @@ -12,6 +20,7 @@ async function createServer() { appType: 'custom', // don't include Vite's default HTML handling middlewares }); + app.use(cors); app.use(express.static('./packages/mermaid/dist')); app.use(express.static('./packages/mermaid-example-diagram/dist')); app.use(express.static('./packages/mermaid-mindmap/dist')); diff --git a/cypress/integration/rendering/erDiagram.spec.js b/cypress/integration/rendering/erDiagram.spec.js index 0f9084e7c..063727024 100644 --- a/cypress/integration/rendering/erDiagram.spec.js +++ b/cypress/integration/rendering/erDiagram.spec.js @@ -167,7 +167,7 @@ describe('Entity Relationship Diagram', () => { cy.get('svg'); }); - it.only('should render entities with generic and array attributes', () => { + it('should render entities with generic and array attributes', () => { renderGraph( ` erDiagram diff --git a/docs/index.html b/docs/index.html index 6d129c346..6f3f0f27b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,6 +15,14 @@ name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" /> + + + + + + + + + + =5.0.0'} + dev: true + /eslint-scope/5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'}