optolith-database-schema 0.1.7 → 0.1.11

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,34 @@
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.1.11](https://github.com/elyukai/optolith-database-schema/compare/v0.1.10...v0.1.11) (2022-03-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * add numeric ae cost field to ancestor glyphs ([d8e36d9](https://github.com/elyukai/optolith-database-schema/commit/d8e36d9a8a583cb57f72bbb4224ab8e10d7943c8))
11
+
12
+ ### [0.1.10](https://github.com/elyukai/optolith-database-schema/compare/v0.1.9...v0.1.10) (2022-03-16)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * main type refs and titles ([3abec4e](https://github.com/elyukai/optolith-database-schema/commit/3abec4e47ec3356d770d45c1e47ddb5c2e0fb9e4))
18
+
19
+ ### [0.1.9](https://github.com/elyukai/optolith-database-schema/compare/v0.1.8...v0.1.9) (2022-03-16)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * generator script should use new directories config location ([b83532b](https://github.com/elyukai/optolith-database-schema/commit/b83532bd9a84a20939dcbfd4d3f5fde060558f57))
25
+
26
+ ### [0.1.8](https://github.com/elyukai/optolith-database-schema/compare/v0.1.7...v0.1.8) (2022-03-16)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * **npm:** ship package directory config with npm ([dbf196c](https://github.com/elyukai/optolith-database-schema/commit/dbf196c105bad7d06d016af56242adbd867de20d))
32
+
5
33
  ### [0.1.7](https://github.com/elyukai/optolith-database-schema/compare/v0.1.6...v0.1.7) (2022-03-16)
6
34
 
7
35
 
@@ -0,0 +1,4 @@
1
+ export const sourceDir: string
2
+ export const libDir: string
3
+ export const jsonSchemaDir: string
4
+ export const markdownDir: string
@@ -0,0 +1,14 @@
1
+ // @ts-check
2
+
3
+ import { dirname, join } from "path";
4
+ import { fileURLToPath } from "url";
5
+
6
+ // @ts-ignore
7
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..")
8
+
9
+ const typesDir = main => join(root, main, "types")
10
+
11
+ export const sourceDir = typesDir("src")
12
+ export const libDir = typesDir("lib")
13
+ export const jsonSchemaDir = join(root, "schema")
14
+ export const markdownDir = join(root, "docs", "reference")
package/lib/main.js CHANGED
@@ -3,7 +3,7 @@ import addFormats from "ajv-formats";
3
3
  import { lstat, readdir, readFile } from "fs/promises";
4
4
  import { join } from "path";
5
5
  import YAML from "yaml";
6
- import { jsonSchemaDir } from "../build/directories.js";
6
+ import { jsonSchemaDir } from "../config/directories.js";
7
7
  import { typeValidatorMap } from "./config.js";
8
8
  const readdirRecursive = async (dirPath) => {
9
9
  const directoryEntries = await readdir(dirPath, { withFileTypes: true });
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @main Spell
2
+ * @main Cantrip
3
3
  */
4
4
  import { Errata } from "./source/_Erratum.js";
5
5
  import { PublicationRefs } from "./source/_PublicationRef.js";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @main Spell
2
+ * @main Cantrip
3
3
  */
4
4
  import { validateSchemaCreator } from "../validation/schema.js";
5
5
  export const validateSchema = validateSchemaCreator(import.meta.url);
@@ -14,6 +14,12 @@ export declare type AncestorGlyph = {
14
14
  select_options?: Activatable.SelectOptions;
15
15
  maximum?: Activatable.Maximum;
16
16
  prerequisites?: GeneralPrerequisites;
17
+ /**
18
+ * The AE cost of the ancestor glyph.
19
+ * @integer
20
+ * @minimum 1
21
+ */
22
+ ae_cost: number;
17
23
  ap_value: Activatable.AdventurePointsValue;
18
24
  src: PublicationRefs;
19
25
  /**
@@ -1,6 +1,6 @@
1
1
  import { basename, dirname, extname, join, relative, sep } from "path";
2
2
  import { fileURLToPath } from "url";
3
- import { libDir } from "../../build/directories.js";
3
+ import { libDir } from "../../config/directories.js";
4
4
  const changeFileExtension = (path, ext) => join(dirname(path), basename(path, extname(path)) + ext);
5
5
  const schemaIdFromSourcePath = (sourcePath) => {
6
6
  const relativePathOfType = relative(libDir, fileURLToPath(sourcePath));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.1.7",
3
+ "version": "0.1.11",
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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "/Cantrip.schema.json",
4
- "$ref": "#/definitions/Spell",
4
+ "$ref": "#/definitions/Cantrip",
5
5
  "definitions": {
6
6
  "Cantrip": {
7
7
  "title": "Cantrip",
@@ -22,6 +22,11 @@
22
22
  "prerequisites": {
23
23
  "$ref": "../_Prerequisite.schema.json#/definitions/GeneralPrerequisites"
24
24
  },
25
+ "ae_cost": {
26
+ "description": "The AE cost of the ancestor glyph.",
27
+ "type": "integer",
28
+ "minimum": 1
29
+ },
25
30
  "ap_value": {
26
31
  "$ref": "../_Activatable.schema.json#/definitions/AdventurePointsValue"
27
32
  },
@@ -61,6 +66,7 @@
61
66
  },
62
67
  "required": [
63
68
  "id",
69
+ "ae_cost",
64
70
  "ap_value",
65
71
  "src",
66
72
  "translations"