{"id":15389352,"url":"https://github.com/tpluscode/rdf-ns-builders","last_synced_at":"2025-10-06T00:32:08.497Z","repository":{"id":38406602,"uuid":"242502490","full_name":"tpluscode/rdf-ns-builders","owner":"tpluscode","description":"Generated RDF/JS namespace builders for common vocabularies","archived":false,"fork":false,"pushed_at":"2025-03-26T13:24:31.000Z","size":2617,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-27T00:55:35.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpluscode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-23T11:12:37.000Z","updated_at":"2025-03-26T13:24:06.000Z","dependencies_parsed_at":"2024-06-18T18:33:21.575Z","dependency_job_id":"7b9b456b-478d-4e91-9b10-8892ad1e3566","html_url":"https://github.com/tpluscode/rdf-ns-builders","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":"tpluscode/ts-template","purl":"pkg:github/tpluscode/rdf-ns-builders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2Frdf-ns-builders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2Frdf-ns-builders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2Frdf-ns-builders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2Frdf-ns-builders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpluscode","download_url":"https://codeload.github.com/tpluscode/rdf-ns-builders/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpluscode%2Frdf-ns-builders/sbom","scorecard":{"id":896136,"data":{"date":"2025-08-11","repo":{"name":"github.com/tpluscode/rdf-ns-builders","commit":"be12524321007cdd6e732d392b7a0eb973b8eb03"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/tpluscode/rdf-ns-builders/release.yml/master?enable=pin","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   4 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T13:47:18.390Z","repository_id":38406602,"created_at":"2025-08-24T13:47:18.390Z","updated_at":"2025-08-24T13:47:18.390Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278542439,"owners_count":26004059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T15:00:10.760Z","updated_at":"2025-10-06T00:32:08.467Z","avatar_url":"https://github.com/tpluscode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e # @tpluscode/rdf-ns-builders\n\nCommon RDF vocabularies extracted from [`@zazuko/vocabularies`][rdfv] and wrapped\nas [`@rdfjs/namespace`][ns] builder objects.\n\nAlso includes TypeScript declarations of the terms included in the known\nvocabularies as extracted from the actual RDF source file.\n\n## Why?\n\n1. If you're tired of typing `const schema = namespace(prefixes.schema)` every so often\n2. If you want to have your IDE \"Find usages\" of a `@rdfjs/namespace`-generated term\n\n## Installation\n\n```\nnpm i -S @tpluscode/rdf-ns-builders\n```\n\n## Usage\n\nSimply import a namespace builder by its prefix defined in [`@zazuko/vocabularies`][rdfv]\n\n```ts\nimport { schema } from '@tpluscode/rdf-ns-builders'\nimport { NamedNode } from '@rdfjs/types'\n\nconst schemaPerson: NamedNode = schema.Person\n```\n\n### Usage with RDF/JS Environment\n\nYou can also add all vocabularies to an environment. Note that this will load everything immediately, even if unused\n\n```js\nimport { NamedNode } from '@rdfjs/types'\nimport Environment from '@rdfjs/environment/Environment.js'\nimport NsBuildersFactory from '@tpluscode/rdf-ns-builders'\n\nconst rdf = new Environment([NsBuildersFactory])\n\nconst schemaPerson: NamedNode = rdf.ns.schema.Person\n```\n\n### Loose builder\n\nThe namespace builders exported from the main module allow arbitrary term but in TypeScript, an error will be shown if they do not exist in the vocabulary. Alternatively, loose builders can be imported which will ignore terms from outside the vocabulary.\n\n```\nimport { schema } from '@tpluscode/rdf-ns-builders/loose'\nimport { NamedNode } from '@rdfjs/types'\n\n// will not show error\nconst schemaPerson: NamedNode = schema.Persona\n```\n\n## Roll your own\n\nGiven a package with same exports as `@zazuko/vocabularies`, it is possible to generate a set of namespace builders generated from your own vocabularies.\n\nInstall required peer dependencies:\n\n```\nnpm i -D ts-node ts-morph clownface @zazuko/vocabularies safe-identifier\n```\n\nRun the following command to generate builders package by providing the source package name and output directory.\n\n```\nnpm run rdf-ns-builders generate -p @my/vocabularies -o builders\n```\n\nThis will create a directory `source`, containing typescript modules for all vocabularies, similar to those from [src](src/vocabularies).\n\n[rdfv]: https://github.com/zazuko/rdf-vocabularies\n[ns]: http://npm.im/@rdfjs/namespace\n\n## Adding your own vocabularies\n\nTo extend the interface of `env.ns` you need to add you own factory which will add additional\nnamespace builders to the environment. TypeScript users will also need to extend the `CustomPrefixes`\ninterface.\n\n```ts\n// ./ns.ts\nimport { NamespaceBuilder } from '@rdfjs/namespace'\n\ntype ExampleTerms = 'foo' | 'bar\n\ndeclare module '@tpluscode/rdf-ns-builders' {\n  interface CustomNamespaces {\n    ex: NamespaceBuilder\u003cExampleTerms\u003e\n  }\n}\n\nexport class ExampleNsFactory {\n  init(this: Environment\u003cNsBuildersFactory | NamespaceFactory\u003e) {\n    this.ns = {\n      ...this.ns,\n      ex: this.namespace\u003cExampleTerms\u003e('https://example.com/'),\n    }\n  }\n}\n```\n\nThen, use it to create an extended environment.\n\n```ts\n// ./env.ts\nimport { create } from '@zazuko/env'\nimport { ExampleNsFactory } from './ns.js'\n\nexport default create(TalosNsFactory)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpluscode%2Frdf-ns-builders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpluscode%2Frdf-ns-builders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpluscode%2Frdf-ns-builders/lists"}