optolith-database-schema 0.11.8 → 0.11.9

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,13 @@
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.11.9](https://github.com/elyukai/optolith-database-schema/compare/v0.11.8...v0.11.9) (2023-05-31)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * move TypeId declaration to exported file ([940f567](https://github.com/elyukai/optolith-database-schema/commit/940f5674f64547c277f479e43df4d3b193e5489c))
11
+
5
12
  ### [0.11.8](https://github.com/elyukai/optolith-database-schema/compare/v0.11.7...v0.11.8) (2023-05-31)
6
13
 
7
14
 
@@ -461,3 +461,4 @@ export declare const configMap: {
461
461
  weapons: import("../typeConfig.js").TypeConfig<Weapon.Weapon>;
462
462
  zibiljaRituals: import("../typeConfig.js").TypeConfig<ZibiljaRitual.ZibiljaRitual>;
463
463
  };
464
+ export type TypeId<K extends keyof TypeMap> = ReturnType<(typeof configMap)[K]["id"]>;
package/lib/main.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { TypeMap } from "./config/types.js";
1
+ import { TypeId, TypeMap } from "./config/types.js";
2
2
  import "./helpers/array.js";
3
3
  import { Result } from "./helpers/result.js";
4
- import { TypeId } from "./typeConfig.js";
5
4
  import { IntegrityError } from "./validation/builders/integrity.js";
6
5
  import { FileNameError } from "./validation/builders/naming.js";
7
6
  import { SchemaError } from "./validation/builders/schema.js";
@@ -1,7 +1,5 @@
1
- import { TypeMap, configMap } from "./config/types.js";
2
1
  import { IntegrityValidator } from "./validation/builders/integrity.js";
3
2
  import { SchemaValidator } from "./validation/builders/schema.js";
4
- export type TypeId<K extends keyof TypeMap> = ReturnType<(typeof configMap)[K]["id"]>;
5
3
  export type TypeConfig<T, ID extends string | number = number> = {
6
4
  name: string;
7
5
  id: (data: T, filepath: string) => ID;
@@ -1,7 +1,6 @@
1
- import { TypeMap } from "../../config/types.js";
1
+ import { TypeId, TypeMap } from "../../config/types.js";
2
2
  import { PathDescriptor } from "../../helpers/objectPath.js";
3
3
  import { Result } from "../../helpers/result.js";
4
- import { TypeId } from "../../typeConfig.js";
5
4
  /**
6
5
  * An error in the shape of an `Ajv` error, with `keyword` being the
7
6
  * discriminating property.
@@ -1,8 +1,7 @@
1
- import { TypeMap } from "../config/types.js";
1
+ import { TypeId, TypeMap } from "../config/types.js";
2
2
  import "../helpers/array.js";
3
3
  import { Result } from "../helpers/result.js";
4
4
  import { EntityDirectoryPaths, TypeValidationError, ValidationOptions } from "../main.js";
5
- import { TypeId } from "../typeConfig.js";
6
5
  export type TypeIdPair<K extends keyof TypeMap> = [id: TypeId<K>, data: TypeMap[K]];
7
6
  export type TypeValidationResult<K extends keyof TypeMap> = Result<TypeIdPair<K>, TypeValidationError[]>;
8
7
  export type TypeValidationResultsByType = [keyof TypeMap, [filePath: string, result: TypeValidationResult<keyof TypeMap>][]][];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
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",