mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-04 11:34:23 +01:00
added objects to be transfered from parser to db
This commit is contained in:
@@ -15,6 +15,7 @@ import { commitType } from './gitGraphTypes.js';
|
|||||||
import { ImperativeState } from '../../utils/imperativeState.js';
|
import { ImperativeState } from '../../utils/imperativeState.js';
|
||||||
|
|
||||||
import DEFAULT_CONFIG from '../../defaultConfig.js';
|
import DEFAULT_CONFIG from '../../defaultConfig.js';
|
||||||
|
|
||||||
import type { GitGraphDiagramConfig } from '../../config.type.js';
|
import type { GitGraphDiagramConfig } from '../../config.type.js';
|
||||||
interface GitGraphState {
|
interface GitGraphState {
|
||||||
commits: Map<string, Commit>;
|
commits: Map<string, Commit>;
|
||||||
|
|||||||
@@ -9,13 +9,31 @@ export const commitType = {
|
|||||||
CHERRY_PICK: 4,
|
CHERRY_PICK: 4,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const gitcommitType = {
|
export interface CommitDB {
|
||||||
NORMAL: 0,
|
message: string;
|
||||||
REVERSE: 1,
|
id: string;
|
||||||
HIGHLIGHT: 2,
|
type: typeof commitType;
|
||||||
MERGE: 3,
|
tags?: string[];
|
||||||
CHERRY_PICK: 4,
|
}
|
||||||
} as const;
|
|
||||||
|
export interface BranchDB {
|
||||||
|
name: string;
|
||||||
|
order: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MergeDB {
|
||||||
|
branch: string;
|
||||||
|
id: string;
|
||||||
|
type?: typeof commitType;
|
||||||
|
tags?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CherryPickDB {
|
||||||
|
id: string;
|
||||||
|
targetId: string;
|
||||||
|
parent: string;
|
||||||
|
tags?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface Commit {
|
export interface Commit {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user