@manta-eu/rdf-lib 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +35 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @manta-eu/rdf-lib
2
+
3
+ Namespace prefixes, CURIE helpers and JSON-LD types for the Manta knowledge graph.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @manta-eu/rdf-lib
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { namespaces, baseIri } from "@manta-eu/rdf-lib/namespaces";
15
+ import { sanitizeSparqlLiteral } from "@manta-eu/rdf-lib/sparql-literal-escape";
16
+ import { buildShaclShapeQuery } from "@manta-eu/rdf-lib/shacl-shape-query";
17
+ ```
18
+
19
+ ## Exports
20
+
21
+ | Export | Contents |
22
+ | ------------------------- | --------------------------------------------------------- |
23
+ | `./namespaces` | Namespace prefixes, base IRIs and well-known predicates |
24
+ | `./sparql-literal-escape` | `sanitizeSparqlLiteral`, for putting a value into a query |
25
+ | `./shacl-shape-query` | Builders for SHACL shape, property and summary queries |
26
+ | `./jsonld` | JSON-LD types |
27
+ | `./action-plan-schemas` | Schemas for action plans |
28
+ | `./detail-view-types` | Types for rendering a node's detail view |
29
+
30
+ Escape every value you interpolate into SPARQL with `sanitizeSparqlLiteral` — the query builders
31
+ here do it for the values they receive, but a string you assemble yourself is yours to escape.
32
+
33
+ ## License
34
+
35
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manta-eu/rdf-lib",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Namespace prefixes, CURIE helpers and JSON-LD types for the Manta knowledge graph",
5
5
  "exports": {
6
6
  "./action-plan-schemas": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "ldkit": "2.8.0",
39
- "@manta-eu/ldo": "0.1.0"
39
+ "@manta-eu/ldo": "0.1.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "tsc-alias": "^1.9.5",
@@ -62,6 +62,6 @@
62
62
  "scripts": {
63
63
  "test": "vitest --run",
64
64
  "types": "tsc --noEmit",
65
- "build": "tsc --project tsconfig.build.json && tsc-alias --project tsconfig.build.json --resolve-full-paths"
65
+ "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc --project tsconfig.build.json && tsc-alias --project tsconfig.build.json --resolve-full-paths"
66
66
  }
67
67
  }