@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 ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node --
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -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 * as generators from "@shaclmate/compiler/generators";
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/esm/batteries/fs.js";
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((iriPrefix) => iriPrefix[0] === prefix || iriPrefix[1].equals(prefixNode));
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.15",
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
- "*.d.ts",
17
- "*.js"
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 -g **/*.d.ts* **/*.js **/*.js.map tsconfig.tsbuildinfo",
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
- "types": "index.d.ts",
49
- "version": "2.0.15"
53
+ "version": "2.0.17"
50
54
  }
package/cli.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cli.d.ts.map
File without changes
File without changes