forked from mermaid-js/mermaid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Alois Klink <[email protected]>
- Loading branch information
1 parent
efa47e3
commit 14524e1
Showing
11 changed files
with
153 additions
and
137 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { fileURLToPath } from 'node:url'; | ||
/** @import import { LoadHook } from "node:module"; */ | ||
/** | ||
* @type {LoadHook} | ||
* | ||
* Load hook that short circuits the loading of `.schema.yaml` files with `export default {}`. | ||
* These would normally be loaded using ESBuild, but that doesn't work for these local scripts. | ||
* | ||
* @see https://nodejs.org/api/module.html#loadurl-context-nextload | ||
*/ | ||
export const load = async (url, context, nextLoad) => { | ||
const filePath = url.startsWith('file://') ? fileURLToPath(url) : url; | ||
if (filePath.endsWith('.schema.yaml')) { | ||
return { | ||
format: 'module', | ||
shortCircuit: true, | ||
source: `export default {}`, | ||
}; | ||
} else { | ||
return await nextLoad(url, context); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
packages/mermaid/src/rendering-util/rendering-elements/shapes.cli.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.