|
|
|
@ -44,10 +44,14 @@ export async function forAllShapes( |
|
|
|
|
const shaclPromise = Promise.all( |
|
|
|
|
shapeDir.map(async (file) => { |
|
|
|
|
if (file.isFile()) { |
|
|
|
|
let store: Awaited<ReturnType<typeof derefStore>>; |
|
|
|
|
try { |
|
|
|
|
const store = await derefStore(path.join(shapePath, file.name), { |
|
|
|
|
store = await derefStore(path.join(shapePath, file.name), { |
|
|
|
|
localFiles: true, |
|
|
|
|
}); |
|
|
|
|
} catch (e) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// Make sure the RDF file contains a SHACL shape
|
|
|
|
|
if ( |
|
|
|
|
hasMatch( |
|
|
|
@ -67,9 +71,6 @@ export async function forAllShapes( |
|
|
|
|
); |
|
|
|
|
await callback(shex, path.parse(file.name).name); |
|
|
|
|
} |
|
|
|
|
} catch (e) { |
|
|
|
|
// no-op ignore invalid RDF file
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|
); |
|
|
|
|