Skip to content

Commit

Permalink
improved error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
phfaist committed Aug 12, 2023
1 parent cda941d commit 122bdb2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 7 additions & 2 deletions eczoodb/load_yamldb.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ import { schema_root_dir_default } from './dirs_defaults.js';

export class EcZooDbYamlDataLoader extends StandardZooDbYamlDataLoader
{
constructor({ schema_root }={})
constructor(options={})
{
schema_root ??= `file://${schema_root_dir_default}/`;
let loader_options = Object.assign({}, options);

const schema_root = loader_options.schema_root ?? `file://${schema_root_dir_default}/`;
delete loader_options.schema_root;

debug('schema_root is ', { schema_root });

super({
... loader_options,

//
// specify objects & where to find them
//
Expand Down
1 change: 1 addition & 0 deletions previewtool/previewApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ window.addEventListener('load', async () => {
let zoodb = new EcZooDb( appZooDbOptions );
zoodb.install_zoo_loader(new EcZooDbYamlDataLoader({
schema_root: `file://${serverData.schema_root_dir}/`,
throw_reload_errors: true,
}));

await zoodb.load();
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@ __metadata:

"@phfaist/zoodb@https://github.com/phfaist/zoodb.git#main":
version: 0.1.1
resolution: "@phfaist/zoodb@https://github.com/phfaist/zoodb.git#commit=89fa74ef227882e1e7587a3d6b9e6beb65d13bc3"
resolution: "@phfaist/zoodb@https://github.com/phfaist/zoodb.git#commit=05d73422d87d8cd07e0d92825785a46e684e8dc2"
dependencies:
"@apidevtools/json-schema-ref-parser": ^10.1.0
base32-encode: ^2.0.0
Expand All @@ -1915,13 +1915,13 @@ __metadata:
stream-parser: ^0.3.1
tippy.js: ^6.3.7
url: ^0.11.0
checksum: 9a0783f3495c41ef10e0e1d7605bfe8d3a533229099c07baa6416d1f257c61780d3bbe3232883576f9b9c2ea630335b80c8d0f5ef01cf9ade5a3bc9c46797d2e
checksum: 934416aaa0ffa462ec96a44ea459aad58f39bf26dcd7799170ec50b0bae206d6f21a1d7ca38cdfaecb60d58a68eb4bc8a9ec00b305824ec1d9242ece5ccb6449
languageName: node
linkType: hard

"@phfaist/zoodbtools_preview@https://github.com/phfaist/zoodbtools.git#head=main&workspace=zoodbtools_preview":
version: 0.1.0
resolution: "@phfaist/zoodbtools_preview@https://github.com/phfaist/zoodbtools.git#workspace=zoodbtools_preview&commit=2bf6a99703e168d636e95f9682cf9c8f56bb02f6"
resolution: "@phfaist/zoodbtools_preview@https://github.com/phfaist/zoodbtools.git#workspace=zoodbtools_preview&commit=513f049b5969768c404778636a9aa5ae8a977615"
dependencies:
debug: ^4.3.4
escape-html: ^1.0.3
Expand All @@ -1931,13 +1931,13 @@ __metadata:
react-select: ^5.7.4
peerDependencies:
"@phfaist/zoodb": "*"
checksum: bd26882f4a68992233f9bccb559ad0d18991eb1c1ea688158371a205554fa48f60768e93c5c77c79d55632c2b2a8c52adb816d035c62d6b5354e6b4f2a2d5e4b
checksum: 16dc7f4084b1c46a1f817ff4604cb14a7de34e2afa38639abff7cd4bca4241c32ab545c702980965b9b5c6ae39c7c6da3e012cb843c6ab7d3a71e9c17048cc56
languageName: node
linkType: hard

"@phfaist/zoodbtools_previewremote@https://github.com/phfaist/zoodbtools.git#head=main&workspace=zoodbtools_previewremote":
version: 0.1.0
resolution: "@phfaist/zoodbtools_previewremote@https://github.com/phfaist/zoodbtools.git#workspace=zoodbtools_previewremote&commit=2bf6a99703e168d636e95f9682cf9c8f56bb02f6"
resolution: "@phfaist/zoodbtools_previewremote@https://github.com/phfaist/zoodbtools.git#workspace=zoodbtools_previewremote&commit=513f049b5969768c404778636a9aa5ae8a977615"
dependencies:
debug: ^4.3.4
fs-remote: ^0.1.9
Expand Down

0 comments on commit 122bdb2

Please sign in to comment.