Skip to content

Commit 29c780b

Browse files
committed
BUGFIX: Use correct path to schema when running standalone
1 parent a9a7f67 commit 29c780b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bin/validate.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ ajv.addKeyword('x-intellij-html-description');
1616
const schemas = [
1717
{
1818
pattern: /NodeTypes(\/?).*\.yaml$/,
19-
schemaFile: './NodeTypes.Schema.json',
19+
schemaFile: '../NodeTypes.Schema.json',
2020
},
2121
{
2222
pattern: /Caches.*\.yaml$/,
23-
schemaFile: './Caches.Schema.json',
23+
schemaFile: '../Caches.Schema.json',
2424
},
2525
{
2626
pattern: /Version.*\.yaml$/,
27-
schemaFile: './NodeMigration.Schema.json',
27+
schemaFile: '../NodeMigration.Schema.json',
2828
},
2929
{
3030
pattern: /Routes.*\.yaml$/,
31-
schemaFile: './Routes.Schema.json',
31+
schemaFile: '../Routes.Schema.json',
3232
},
3333
{
3434
pattern: /Settings.Presets.yaml$/,
35-
schemaFile: './NodeTypes.Presets.Schema.json',
35+
schemaFile: '../NodeTypes.Presets.Schema.json',
3636
},
3737
].map(sd => {
38-
const schema = JSON.parse(fs.readFileSync(sd.schemaFile, {encoding: 'utf8', flag: 'r'}));
38+
const schema = JSON.parse(fs.readFileSync(path.join(__dirname, sd.schemaFile), {encoding: 'utf8', flag: 'r'}));
3939
const validate = ajv.compile(schema);
4040
return {
4141
...sd,

0 commit comments

Comments
 (0)