Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2 #74

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
50c66e3
Rewritten the code for more features and to extract validation, v2.0.…
m-mohr Aug 10, 2023
a74e9fe
Implement custom validation + doc improvements
m-mohr Sep 7, 2023
043bbcb
2.0.0-beta.2
m-mohr Sep 7, 2023
0f04671
fix various issues, v2.0.0-beta.3
m-mohr Sep 7, 2023
2491e0d
fix CLI output issues, v2.0.0-beta.4
m-mohr Oct 6, 2023
ef062ff
fix CLI output issues, v2.0.0-beta.5
m-mohr Oct 6, 2023
2d9f06f
Add funding info
m-mohr Feb 14, 2024
798731f
Restructure
m-mohr Mar 15, 2024
776de0b
Implement temporary workaround for https://github.com/OSGeo/PROJ/issu…
m-mohr Mar 15, 2024
bf48fe0
v2.0.0-beta.6
m-mohr Mar 15, 2024
d2d441b
clean-up
m-mohr Mar 15, 2024
8b364b4
Fix validation of iri without a host (i.e. localhost)
m-mohr Mar 20, 2024
48faec6
v2.0.0-beta.7
m-mohr Mar 20, 2024
f848077
Revert "Implement temporary workaround for https://github.com/OSGeo/P…
m-mohr Mar 26, 2024
98ede5f
Handle schemas that have no $id defined
m-mohr Jul 19, 2024
0f80500
Import doesn't work
m-mohr Jul 19, 2024
445af98
v2.0.0-beta.8
m-mohr Jul 19, 2024
fd598cf
Report data loading issues
m-mohr Aug 5, 2024
57c0922
Add missing uri-js dependency, v2.0.0-beta.9
m-mohr Aug 5, 2024
35a29de
Fix missing import, v2.0.0-beta.10
m-mohr Aug 5, 2024
c3cffc3
Fix linting report, v2.0.0-beta.11
m-mohr Aug 5, 2024
a9a99a3
Allow to customize Ajv via custom validator, v2.0.0-beta.12
m-mohr Aug 7, 2024
1894549
Don't run MacOS 11 CI anylonger
m-mohr Oct 31, 2024
9af3ed4
Merge branch 'master' into v2
m-mohr Oct 31, 2024
7a84f42
Check against more current node versions
m-mohr Oct 31, 2024
80fef01
Add possibility to bypass validator
m-mohr Oct 31, 2024
c5e8dd8
v2.0.0-beta.13
m-mohr Oct 31, 2024
d88b9ed
Support for partial URLs in schema maps
m-mohr Jan 30, 2025
3628d0a
Support for JS config files
m-mohr Jan 30, 2025
1f44231
Handle invalid input paths better
m-mohr Jan 30, 2025
7202d53
Better URL parsing and handling of unsupported protocols
m-mohr Jan 30, 2025
7e39c5e
v2.0.0-beta.14
m-mohr Jan 30, 2025
8611efb
Fix reference error
m-mohr Jan 30, 2025
f128999
Fix various issues of the last release
m-mohr Jan 30, 2025
f6d7cdb
v2.0.0-beta.15
m-mohr Jan 30, 2025
75b6529
Update stac-js
m-mohr Jan 30, 2025
9553f84
Update README.md
m-mohr Jan 30, 2025
486a2d8
Update src/cli.js
m-mohr Feb 4, 2025
fee4463
Properly handle invalid JSON files, other fixes for custom validators
m-mohr Feb 20, 2025
0b43b1a
v2.0.0-beta.16
m-mohr Feb 20, 2025
e3ef9e5
Don't print if no category is given
m-mohr Feb 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow to customize Ajv via custom validator, v2.0.0-beta.12
m-mohr committed Aug 7, 2024

Verified

This commit was signed with the committer’s verified signature.
gadomski Pete Gadomski
commit a9a99a3c437936e2ceb7f3f60adaf5f8a3d38302
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ See the [STAC Validator Comparison](COMPARISON.md) for the features supported by

## Versions

**Current version:** 2.0.0-beta.11
**Current version:** 2.0.0-beta.12

| STAC Node Validator Version | Supported STAC Versions |
| --------------------------- | ----------------------- |
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stac-node-validator",
"version": "2.0.0-beta.11",
"version": "2.0.0-beta.12",
"description": "STAC Validator for NodeJS",
"author": "Matthias Mohr",
"license": "Apache-2.0",
4 changes: 4 additions & 0 deletions src/baseValidator.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,10 @@ class BaseValidator {
constructor() {
}

async createAjv(ajv) {
return ajv;
}

/**
* Any preprocessing work you want to do on the data.
*
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -72,6 +72,9 @@ async function validate(data, config) {
};
config = Object.assign({}, defaultConfig, config);
config.ajv = createAjv(config);
if (config.customValidator) {
config.ajv = await config.customValidator.createAjv(config.ajv);
}

let report = createReport();
if (typeof data === 'string') {