@lde/sparql-qlever 0.15.5 → 0.15.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"importer.d.ts","sourceRoot":"","sources":["../src/importer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,iBAAiB,EAC7B,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAyB,YAAY,EAAE,MAAM,cAAc,CAAC;AAMnE,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,yBAAyB;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yJAAyJ;IACzJ,+BAA+B,CAAC,EAAE,OAAO,CAAC;CAC3C;AAED,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAWD,qBAAa,QAAS,YAAW,iBAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;gBAE9B,OAAO,EAAE,qBAAqB;IAa7B,MAAM,CACjB,aAAa,EAAE,YAAY,EAAE,GAC5B,OAAO,CAAC,YAAY,GAAG,gBAAgB,GAAG,YAAY,CAAC;YAqC5C,QAAQ;IA6DtB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,aAAa;IAIrB;;OAEG;YACW,eAAe;IA0B7B,yDAAyD;YAC3C,eAAe;YAaf,cAAc;YAKd,KAAK;CA8CpB"}
1
+ {"version":3,"file":"importer.d.ts","sourceRoot":"","sources":["../src/importer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,iBAAiB,EAC7B,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAyB,YAAY,EAAE,MAAM,cAAc,CAAC;AAOnE,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,yBAAyB;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yJAAyJ;IACzJ,+BAA+B,CAAC,EAAE,OAAO,CAAC;CAC3C;AAED,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAWD,qBAAa,QAAS,YAAW,iBAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;gBAE9B,OAAO,EAAE,qBAAqB;IAa7B,MAAM,CACjB,aAAa,EAAE,YAAY,EAAE,GAC5B,OAAO,CAAC,YAAY,GAAG,gBAAgB,GAAG,YAAY,CAAC;YAqC5C,QAAQ;IA6DtB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,aAAa;IAIrB;;OAEG;YACW,eAAe;IA0B7B,yDAAyD;YAC3C,eAAe;YAaf,cAAc;YAKd,KAAK;CA8CpB"}
package/dist/importer.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ImportFailed, ImportSuccessful, NotSupported, } from '@lde/sparql-importer';
2
2
  import { compressionMediaTypes } from '@lde/dataset';
3
3
  import { LastModifiedDownloader } from '@lde/distribution-downloader';
4
+ import { shellQuote } from '@lde/task-runner';
4
5
  import { basename, dirname, join } from 'path';
5
6
  import { readFile, stat, writeFile } from 'node:fs/promises';
6
7
  import { needsPreprocessing, preprocess } from './preprocess.js';
@@ -176,20 +177,6 @@ export class Importer {
176
177
  return await this.options.taskRunner.wait(indexTask);
177
178
  }
178
179
  }
179
- /**
180
- * POSIX-quote a value for safe interpolation into a shell command: wrap it in
181
- * single quotes and escape any embedded single quote as `'\''`.
182
- *
183
- * Without this, a data filename containing an apostrophe – e.g. a dataset
184
- * titled `'s-Hertogenbosch`, whose distribution URL maps to a local file like
185
- * `…Erfgoed+'s-Hertogenbosch.nt` – would terminate the surrounding quotes, so
186
- * `cat`/`gunzip` would read a non-existent path and feed `qlever-index` empty
187
- * input. The index then "succeeds" with 0 triples, the import is treated as
188
- * failed, and every distribution (and the JSON-LD fallback) fails the same way.
189
- */
190
- function shellQuote(value) {
191
- return `'${value.replace(/'/g, "'\\''")}'`;
192
- }
193
180
  /**
194
181
  * Native QLever index formats – `qlever-index -F <flag>` consumes these
195
182
  * directly. JSON-LD is not here: it is preprocessed to N-Quads first (see
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/sparql-qlever",
3
- "version": "0.15.5",
3
+ "version": "0.15.6",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/ldelements/lde.git",
6
6
  "directory": "packages/sparql-qlever"
@@ -26,11 +26,11 @@
26
26
  "dependencies": {
27
27
  "@lde/dataset": "^0.7.9",
28
28
  "@lde/distribution-downloader": "^0.6.8",
29
- "@lde/sparql-importer": "^0.6.9",
29
+ "@lde/sparql-importer": "^0.6.10",
30
30
  "@lde/sparql-server": "^0.4.14",
31
- "@lde/task-runner": "^0.2.13",
32
- "@lde/task-runner-docker": "^0.2.16",
33
- "@lde/task-runner-native": "^0.2.16",
31
+ "@lde/task-runner": "^0.2.14",
32
+ "@lde/task-runner-docker": "^0.2.17",
33
+ "@lde/task-runner-native": "^0.2.17",
34
34
  "@lde/wait-for-sparql": "^0.2.17",
35
35
  "rdf-parse": "^5.0.0",
36
36
  "rdf-serialize": "^5.1.0",