This repository was archived by the owner on Oct 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +9
-3
lines changed
Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { DynamicChildrenProcessor } from "../dfdElements/dynamicChildren";
66import { EditorModeController } from "../editorMode/editorModeController" ;
77import { sendMessage } from "./webSocketHandler" ;
88import { ConstraintRegistry } from "../constraintMenu/constraintRegistry" ;
9- import { SavedDiagram } from "./save" ;
9+ import { CURRENT_VERSION , SavedDiagram } from "./save" ;
1010import { LoadingIndicator } from "../../common/loadingIndicator" ;
1111
1212export interface AnalyzeDiagramAction extends Action {
@@ -62,6 +62,7 @@ export class AnalyzeDiagramCommand extends Command {
6262 labelTypes : this . labelTypeRegistry ?. getLabelTypes ( ) ,
6363 constraints : this . constraintRegistry ?. getConstraints ( ) ,
6464 mode : this . editorModeController ?. getCurrentMode ( ) ,
65+ version : CURRENT_VERSION ,
6566 } ;
6667 const diagramJson = JSON . stringify ( diagram , undefined , 4 ) ;
6768 sendMessage ( "Json:" + diagramJson ) ;
Original file line number Diff line number Diff line change 619619 "constraint" : " data Sensitivity.Personal neverFlows vertex Location.nonEU"
620620 }
621621 ],
622- "mode" : " edit"
622+ "mode" : " edit" ,
623+ "version" : 1
623624}
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ export interface SavedDiagram {
1515 labelTypes ?: LabelType [ ] ;
1616 constraints ?: Constraint [ ] ;
1717 mode ?: EditorMode ;
18+ version : number ;
1819}
20+ export const CURRENT_VERSION = 1 ;
1921
2022export interface SaveDiagramAction extends Action {
2123 kind : typeof SaveDiagramAction . KIND ;
@@ -66,6 +68,7 @@ export class SaveDiagramCommand extends Command {
6668 labelTypes : this . labelTypeRegistry ?. getLabelTypes ( ) ,
6769 constraints : this . constraintRegistry ?. getConstraints ( ) ,
6870 mode : this . editorModeController ?. getCurrentMode ( ) ,
71+ version : CURRENT_VERSION ,
6972 } ;
7073 const diagramJson = JSON . stringify ( diagram , undefined , 4 ) ;
7174 const jsonBlob = new Blob ( [ diagramJson ] , { type : "application/json" } ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { LabelTypeRegistry } from "../labels/labelTypeRegistry";
55import { DynamicChildrenProcessor } from "../dfdElements/dynamicChildren" ;
66import { EditorModeController } from "../editorMode/editorModeController" ;
77import { sendMessage } from "./webSocketHandler" ;
8- import { SavedDiagram } from "./save" ;
8+ import { CURRENT_VERSION , SavedDiagram } from "./save" ;
99import { ConstraintRegistry } from "../constraintMenu/constraintRegistry" ;
1010import { getModelFileName } from "../../index" ;
1111
@@ -58,6 +58,7 @@ export class SaveDFDandDDCommand extends Command {
5858 labelTypes : this . labelTypeRegistry ?. getLabelTypes ( ) ,
5959 constraints : this . constraintRegistry ?. getConstraints ( ) ,
6060 mode : this . editorModeController ?. getCurrentMode ( ) ,
61+ version : CURRENT_VERSION ,
6162 } ;
6263 const diagramJson = JSON . stringify ( diagram , undefined , 4 ) ;
6364 sendMessage ( "Json2DFD:" + getModelFileName ( ) + ":" + diagramJson ) ;
You can’t perform that action at this time.
0 commit comments