Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AF-146 Remove application schema from file format #102

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/attack_flow_builder/src/store/PageEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export class PageEditor {
let page = JSON.parse(file) as PageExport;

// Initialize diagram factory
let factory = await DiagramFactory.create(page.schema);
let factory = await DiagramFactory.create(Configuration.schema);

// Compile export index
let index = new Map<string, DiagramObjectExport>();
Expand Down Expand Up @@ -306,7 +306,6 @@ export class PageEditor {
let doc: PageExport = {
version: pkg.version,
id: this.page.id,
schema: this.page.factory.getSchema(),
objects: [...this.page.getSubtree()].map(o => o.toExport()),
location: location
}
Expand Down Expand Up @@ -393,8 +392,11 @@ type PageExport = {

/**
* The page's internal schema.
* @deprecated
* Since version 2.1.0. Schemas now rest solely with the application and
* are no longer exported with each file.
*/
schema: BlockDiagramSchema
schema?: BlockDiagramSchema

/**
* The page's diagram objects.
Expand Down
Loading