Installations
npm install @bpmn-io/element-templates-validator
Developer Guide
Typescript
No
Module System
ESM
Node Version
20.18.1
NPM Version
10.8.2
Releases
Contributors
Languages
JavaScript (100%)
Developer
bpmn-io
Download Statistics
Total Downloads
1,297,361
Last Day
1,466
Last Week
6,723
Last Month
29,748
Last Year
431,680
GitHub Statistics
5 Stars
138 Commits
4 Forks
7 Watching
3 Branches
10 Contributors
Bundle Size
284.33 kB
Minified
33.45 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.3.3
Package Id
@bpmn-io/element-templates-validator@2.3.3
Unpacked Size
848.43 kB
Size
107.32 kB
File Count
5
NPM Version
10.8.2
Node Version
20.18.1
Publised On
28 Jan 2025
Total Downloads
Cumulative downloads
Total Downloads
1,297,361
Last day
-17.3%
1,466
Compared to previous day
Last week
-24%
6,723
Compared to previous week
Last month
1.5%
29,748
Compared to previous month
Last year
-17.5%
431,680
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
element-templates-validator
Validate element templates based on JSON Schema.
Installation
1npm i --save @bpmn-io/element-templates-validator
Usage
Given an example element template:
1import { validate } from '@bpmn-io/element-templates-validator'; 2 3import sample from './test/fixtures/rpa-broken.json'; 4 5const { 6 valid, 7 errors 8} = validate(sample); 9 10if (!valid) { 11 console.error('Invalid JSON detected:', errors); 12} 13
This will print detailed information about errors inside the sample:
1[ 2 { 3 "keyword": "type", 4 "dataPath": "", 5 "schemaPath": "#/type", 6 "params": { 7 "type": "object" 8 }, 9 "message": "must be object", 10 "dataPointer": { 11 "value": { 12 "line": 0, 13 "column": 0, 14 "pos": 0 15 }, 16 "valueEnd": { 17 "line": 177, 18 "column": 1, 19 "pos": 4825 20 } 21 } 22 } 23 ... 24]
It's also possible to validate multiple objects at once
1import { validateAll } from '@bpmn-io/element-templates-validator'; 2 3import samples from './test/fixtures/multiple-errors.json'; 4 5const { 6 valid, 7 results 8} = validateAll(samples); 9 10if (!valid) { 11 console.error('Invalid JSON objects detected:', results.filter(r => !r.valid)); 12}
License
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
21 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found linked content: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/bpmn-io/.github/SECURITY.md:1
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-7q7g-4xm8-89cq
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/element-templates-validator/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/element-templates-validator/CI.yml/main?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 1 out of 1 npmCommand dependencies pinned
Reason
Found 2/19 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/CI.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 14 are checked with a SAST tool
Score
5.1
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More