
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
validation-monitoring-module-test
Advanced tools
This module is used to validate publications in the context of the Flemish government.
  
	
	
	
The Validation Monitoring Module is an npm module designed to safeguard the integrity of data published to a triple store, crucial in scenarios involving multiple publishers. It meticulously compares publications against a predefined data blueprint, pinpointing discrepancies and enforcing data structure compliance according to specified standards.
Crafted with Test-Driven Development (TDD) principles at its core, this npm module emphasizes reliability and robustness from the ground up. Developed in TypeScript for enhanced type safety and transpiled to JavaScript for wide-ranging compatibility, it incorporates an extensive suite of Jest tests. This rigorous testing approach ensures the module performs reliably under various scenarios, making it a trustworthy addition to any Node.js project.
Publications must meet structural requirements to ensure consistency and readability. The module supports validation for the following document types:
- Besluitenlijst
- Notule
- Agenda
In addition to specific document types, each publication is required to have a title, validated as a string to ensure it is present and correctly formatted. For "Notule" documents, there is an additional requirement to validate the maturity level, ensuring that these documents not only meet structural standards but also adhere to designated maturity criteria, adding a layer of depth to the validation process.
In order to properly validate an agenda item exists in a publication, we need to know the following:
- Agenda item
  - title
  - resolution
  - vote
  - decision
- Session
  - time
  - governing body
βββ validation-monitoring-module/
    βββ README.md
    βββ files
    β   βββ notulen.ttl
    βββ jest.config.js
    βββ package-lock.json
    βββ package.json
    βββ src
    β   βββ index.ts
    β   βββ queries.ts
    β   βββ tests
    β   βββ validation.ts
    βββ tsconfig.json
    βββ tslint.json
    βββ tsup.config.ts
    βββ yarn.lock
source
- Clone the validation-monitoring-module repository:
 $ git clone https://github.com/lblod/validation-monitoring-tool
- Change to the project directory:
 $ cd validation-monitoring-module
- Install the dependencies:
 $ > npm install
npm
- Install the module from npm:
 $ > npm install validation-monitoring-module
To use the module, import it into your project:
import { validatePublication, getBlueprintOfDocumentType, fetchDocument } from 'validation-monitoring-module/index';Then, call the
validatePublicationfunction with the publication data to validate:const blueprint: Bindings[] = await getBlueprintOfDocumentType('Notulen'); const publication: Bindings[] = await fetchDocument(NOTULEN_LINK, PROXY); const validationResult = await validatePublication(publication, blueprint);The
validatePublicationfunction returns an array of subjects. Each subject is structured as follows:[key: number]: { name: string, totalCount: number, type: string, typeName: string, url: string, usedShape: string, validCount: number, validatedProperties: { [key: number]: { name: string, }
Run the test suite using the command below:
npm run test
Link to the full documentation here.
FAQs
This module is used to validate publications in the context of the Flemish government.
We found that validation-monitoring-module-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.