Download packages/schema-engine/src/test.ts from AnthropicallyHuggingFaces/ProjectOS: direct link, hf CLI and curl.
- Browser
- Download file 561 Bytes
-
https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/packages/schema-engine/src/test.ts
- Command line
-
hf download hf://spaces/AnthropicallyHuggingFaces/ProjectOS/packages/schema-engine/src/test.ts
-
curl -L -o test.ts https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/packages/schema-engine/src/test.ts
561 Bytes
| import { dirname, resolve } from 'node:path'; | |
| import { fileURLToPath } from 'node:url'; | |
| import { validateSchematron } from './validator/schematron-validator.js'; | |
| const sourceDirectory = dirname(fileURLToPath(import.meta.url)); | |
| const packageDirectory = resolve(sourceDirectory, '..'); | |
| const errors = validateSchematron( | |
| resolve(packageDirectory, 'fixtures/bootstrap-valid.xml'), | |
| resolve(packageDirectory, '../../schemas/ProjectOS.sch') | |
| ); | |
| if (errors.length) { | |
| console.error(errors); | |
| process.exitCode = 1; | |
| } else { | |
| console.log('schematron passed'); | |
| } | |