@shaclmate/cli 2.0.15 → 2.0.17
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.
- package/dist/cli.d.ts +3 -0
- package/{cli.js → dist/cli.js} +8 -5
- package/package.json +13 -9
- package/cli.d.ts +0 -2
- /package/{dashDataset.d.ts → dist/dashDataset.d.ts} +0 -0
- /package/{dashDataset.js → dist/dashDataset.js} +0 -0
- /package/{shaclShaclDataset.d.ts → dist/shaclShaclDataset.d.ts} +0 -0
- /package/{shaclShaclDataset.js → dist/shaclShaclDataset.js} +0 -0
package/dist/cli.d.ts
ADDED
package/{cli.js → dist/cli.js}
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node --
|
|
1
2
|
import * as fs from "node:fs";
|
|
2
|
-
import PrefixMap from "@rdfjs/prefix-map/PrefixMap";
|
|
3
|
+
import PrefixMap from "@rdfjs/prefix-map/PrefixMap.js";
|
|
3
4
|
import { Compiler } from "@shaclmate/compiler";
|
|
4
|
-
import
|
|
5
|
+
import { generators } from "@shaclmate/compiler";
|
|
5
6
|
import { command, option, restPositionals, run, string, subcommands, } from "cmd-ts";
|
|
6
|
-
import { ExistingPath } from "cmd-ts/dist/
|
|
7
|
+
import { ExistingPath } from "cmd-ts/dist/cjs/batteries/fs.js";
|
|
7
8
|
import * as N3 from "n3";
|
|
8
9
|
import { DataFactory, Parser, Store } from "n3";
|
|
9
|
-
import pino from "pino";
|
|
10
|
+
import { pino } from "pino";
|
|
10
11
|
import SHACLValidator from "rdf-validate-shacl";
|
|
11
12
|
import { dashDataset } from "./dashDataset.js";
|
|
12
13
|
import { shaclShaclDataset } from "./shaclShaclDataset.js";
|
|
@@ -40,7 +41,9 @@ function generate({ generator, inputFilePaths, outputFilePath, }) {
|
|
|
40
41
|
const iriPrefixes = [];
|
|
41
42
|
for (const inputFilePath of inputFilePaths) {
|
|
42
43
|
dataset.addQuads(inputParser.parse(fs.readFileSync(inputFilePath).toString(), null, (prefix, prefixNode) => {
|
|
43
|
-
const existingIriPrefix = iriPrefixes.find(
|
|
44
|
+
const existingIriPrefix = iriPrefixes.find(
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
(iriPrefix) => iriPrefix[0] === prefix || iriPrefix[1].equals(prefixNode));
|
|
44
47
|
if (existingIriPrefix) {
|
|
45
48
|
if (existingIriPrefix[0] !== prefix ||
|
|
46
49
|
!existingIriPrefix[1].equals(prefixNode)) {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bin": {
|
|
3
|
-
"shaclmate": "cli.js"
|
|
3
|
+
"shaclmate": "dist/cli.js"
|
|
4
4
|
},
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@shaclmate/compiler": "2.0.
|
|
6
|
+
"@shaclmate/compiler": "2.0.17",
|
|
7
7
|
"@types/n3": "^1.21.1",
|
|
8
8
|
"@types/rdf-validate-shacl": "^0.4.7",
|
|
9
9
|
"cmd-ts": "^0.13.0",
|
|
@@ -12,19 +12,24 @@
|
|
|
12
12
|
"rdf-validate-shacl": "^0.5.6"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
15
21
|
"files": [
|
|
16
|
-
"
|
|
17
|
-
"
|
|
22
|
+
"dist/*.d.ts",
|
|
23
|
+
"dist/*.js"
|
|
18
24
|
],
|
|
19
|
-
"main": "index.js",
|
|
20
25
|
"license": "Apache-2.0",
|
|
21
26
|
"name": "@shaclmate/cli",
|
|
22
27
|
"scripts": {
|
|
23
|
-
"build": "tsc -b",
|
|
28
|
+
"build": "tsc -b && chmod +x dist/cli.js",
|
|
24
29
|
"check": "biome check",
|
|
25
30
|
"check:write": "biome check --write",
|
|
26
31
|
"check:write:unsafe": "biome check --write --unsafe",
|
|
27
|
-
"clean": "rimraf
|
|
32
|
+
"clean": "rimraf dist",
|
|
28
33
|
"format": "biome format",
|
|
29
34
|
"format:write": "biome format --write",
|
|
30
35
|
"format:write:unsafe": "biome format --write --unsafe",
|
|
@@ -45,6 +50,5 @@
|
|
|
45
50
|
"url": "git+https://github.com/minorg/shaclmate"
|
|
46
51
|
},
|
|
47
52
|
"type": "module",
|
|
48
|
-
"
|
|
49
|
-
"version": "2.0.15"
|
|
53
|
+
"version": "2.0.17"
|
|
50
54
|
}
|
package/cli.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|