Skip to content

Commit

Permalink
added objects to be transfered from parser to db
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Fulbright authored and Austin Fulbright committed Aug 20, 2024
1 parent 4ec0dcf commit d9d9cc9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/mermaid/src/diagrams/git/gitGraphAst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { commitType } from './gitGraphTypes.js';
import { ImperativeState } from '../../utils/imperativeState.js';

import DEFAULT_CONFIG from '../../defaultConfig.js';

import type { GitGraphDiagramConfig } from '../../config.type.js';
interface GitGraphState {
commits: Map<string, Commit>;
Expand Down
32 changes: 25 additions & 7 deletions packages/mermaid/src/diagrams/git/gitGraphTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,31 @@ export const commitType = {
CHERRY_PICK: 4,
} as const;

export const gitcommitType = {
NORMAL: 0,
REVERSE: 1,
HIGHLIGHT: 2,
MERGE: 3,
CHERRY_PICK: 4,
} as const;
export interface CommitDB {
message: string;
id: string;
type: typeof commitType;
tags?: string[];
}

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 {
id: string;
Expand Down

0 comments on commit d9d9cc9

Please sign in to comment.