diff --git a/electron/UnzipData.ts b/electron/UnzipData.ts index 9689516..8f81557 100644 --- a/electron/UnzipData.ts +++ b/electron/UnzipData.ts @@ -67,7 +67,7 @@ export default abstract class UnzipData { path.resolve(__dirname, "../src/assets/data.json"), { encoding: "utf8", flag: "r" } ); - const jsonSchemaPath = "schemas"; + const jsonSchemaPath = "public/schemas"; if (!UnzipData.validateAgainstJsonSchema(jsonSchemaPath, jsonData)) { log.warn(`Data for file ${UnzipData.zipFileToUse} is not valid JSON`); @@ -88,7 +88,7 @@ export default abstract class UnzipData { try { const schemaList = fs.readdirSync(jsonSchemaPath) .filter(schemaPath => schemaPath.endsWith(".schema.json")) - .map(schemaPath => JSON.parse(fs.readFileSync(`schemas/${schemaPath}`, { encoding: "utf8", flag: "r" })) as Record); + .map(schemaPath => JSON.parse(fs.readFileSync(`${jsonSchemaPath}/${schemaPath}`, { encoding: "utf8", flag: "r" })) as Record); const appSchemaIndex = schemaList.findIndex((schema) => String(schema.$id).endsWith("app.schema.json")); if (appSchemaIndex === -1) { throw new Error("app.schema.json not found"); diff --git a/schemas/app.schema.json b/public/schemas/app.schema.json similarity index 100% rename from schemas/app.schema.json rename to public/schemas/app.schema.json diff --git a/schemas/brand.schema.json b/public/schemas/brand.schema.json similarity index 100% rename from schemas/brand.schema.json rename to public/schemas/brand.schema.json diff --git a/schemas/font.schema.json b/public/schemas/font.schema.json similarity index 100% rename from schemas/font.schema.json rename to public/schemas/font.schema.json diff --git a/schemas/product.schema.json b/public/schemas/product.schema.json similarity index 100% rename from schemas/product.schema.json rename to public/schemas/product.schema.json diff --git a/schemas/range.schema.json b/public/schemas/range.schema.json similarity index 100% rename from schemas/range.schema.json rename to public/schemas/range.schema.json diff --git a/schemas/settings.schema.json b/public/schemas/settings.schema.json similarity index 100% rename from schemas/settings.schema.json rename to public/schemas/settings.schema.json