optolith-database-schema 0.1.7 → 0.1.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,20 @@
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.9](https://github.com/elyukai/optolith-database-schema/compare/v0.1.8...v0.1.9) (2022-03-16)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * generator script should use new directories config location ([b83532b](https://github.com/elyukai/optolith-database-schema/commit/b83532bd9a84a20939dcbfd4d3f5fde060558f57))
11
+
12
+ ### [0.1.8](https://github.com/elyukai/optolith-database-schema/compare/v0.1.7...v0.1.8) (2022-03-16)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **npm:** ship package directory config with npm ([dbf196c](https://github.com/elyukai/optolith-database-schema/commit/dbf196c105bad7d06d016af56242adbd867de20d))
18
+
5
19
  ### [0.1.7](https://github.com/elyukai/optolith-database-schema/compare/v0.1.6...v0.1.7) (2022-03-16)
6
20
 
7
21
 
@@ -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,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.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",