optolith-database-schema 0.13.5 → 0.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.13.7](https://github.com/elyukai/optolith-database-schema/compare/v0.13.6...v0.13.7) (2023-12-05)
6
+
7
+ ### [0.13.6](https://github.com/elyukai/optolith-database-schema/compare/v0.13.5...v0.13.6) (2023-12-05)
8
+
5
9
  ### [0.13.5](https://github.com/elyukai/optolith-database-schema/compare/v0.13.4...v0.13.5) (2023-12-05)
6
10
 
7
11
  ### [0.13.4](https://github.com/elyukai/optolith-database-schema/compare/v0.13.3...v0.13.4) (2023-12-01)
@@ -1,9 +1,8 @@
1
1
  import { dirname, join } from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
- import { JsonSchemaSpec } from "optolith-tsjsonschemamd/renderers/jsonSchema";
4
3
  const root = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
5
4
  export const sourceDir = join(root, "src", "types");
6
5
  export const libDir = join(root, "lib", "types");
7
6
  export const jsonSchemaDir = join(root, "schema");
8
7
  export const markdownDir = join(root, "docs", "reference");
9
- export const jsonSchemaSpec = JsonSchemaSpec.Draft_2019_09;
8
+ export const jsonSchemaSpec = "Draft_2019_09";
@@ -1,7 +1,6 @@
1
1
  import addFormatsModule from "ajv-formats";
2
2
  import Ajv2019Module from "ajv/dist/2019.js";
3
3
  import Ajv2020Module from "ajv/dist/2020.js";
4
- import { JsonSchemaSpec } from "optolith-tsjsonschemamd/renderers/jsonSchema";
5
4
  import "../helpers/array.js";
6
5
  import { isHiddenFileName, readDirectoryRec, readJsonFile } from "../helpers/io.js";
7
6
  import { assertExhaustive } from "../helpers/typeSafety.js";
@@ -10,10 +9,10 @@ const Ajv2020 = Ajv2020Module.default;
10
9
  const addFormats = addFormatsModule.default;
11
10
  const createSchemaValidator = (jsonSchemaSpec, validatorOptions = {}) => {
12
11
  switch (jsonSchemaSpec) {
13
- case JsonSchemaSpec.Draft_07:
14
- case JsonSchemaSpec.Draft_2019_09:
12
+ case "Draft_07":
13
+ case "Draft_2019_09":
15
14
  return new Ajv2019(validatorOptions);
16
- case JsonSchemaSpec.Draft_2020_12:
15
+ case "Draft_2020_12":
17
16
  return new Ajv2020(validatorOptions);
18
17
  default:
19
18
  assertExhaustive(jsonSchemaSpec);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.13.5",
3
+ "version": "0.13.7",
4
4
  "description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
5
5
  "keywords": [
6
6
  "tde",