@lde/pipeline 0.38.0 → 0.38.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.
@@ -1 +1 @@
1
- {"version":3,"file":"importResolver.d.ts","sourceRoot":"","sources":["../../src/distribution/importResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAgB,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,gBAAgB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,0BAA0B,GAAG,QAAQ,CAAC;CAC7D;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,cAAe,YAAW,oBAAoB;IAEvD,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,KAAK,EAAE,oBAAoB,EAC3B,OAAO,EAAE,qBAAqB;IAG3C,KAAK,CACT,OAAO,EAAE,OAAO,EAChB,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,mBAAmB,CAAC;IAgBzB,OAAO,CACX,MAAM,EAAE,mBAAmB,EAC3B,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,uBAAuB,CAAC;IAoBpD,eAAe,CACnB,MAAM,EAAE,mBAAmB,EAC3B,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,oBAAoB,GAAG,uBAAuB,CAAC;IAc1D;;;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AAC;IAc1D;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAY7B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;YAeV,aAAa;IA2GrB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
@@ -120,13 +120,20 @@ export class ImportResolver {
120
120
  }
121
121
  if (importResult instanceof ImportFailed) {
122
122
  callbacks?.onImportFailed?.(importResult.distribution, importResult.error);
123
+ return new NoDistributionAvailable(dataset, 'No SPARQL endpoint or importable data dump available', probeResults, importResult);
123
124
  }
124
125
  if (importResult instanceof NotSupported) {
125
126
  const failedDistribution = importResult.distribution ?? candidates[0];
126
127
  callbacks?.onImportFailed?.(failedDistribution, 'No supported import format');
127
128
  return new NoDistributionAvailable(dataset, 'No supported import format available', probeResults);
128
129
  }
129
- return new NoDistributionAvailable(dataset, 'No SPARQL endpoint or importable data dump available', probeResults, importResult instanceof ImportFailed ? importResult : undefined);
130
+ // Unreachable by type, but not at runtime: an importer that loads its own
131
+ // copy of @lde/sparql-importer returns results that fail every instanceof
132
+ // above. Skipping the dataset here would hide that a successful import
133
+ // happened at all.
134
+ const unexpected = importResult;
135
+ throw new Error(`The importer returned a ${unexpected.constructor.name} that is not one of this resolver’s import results. ` +
136
+ 'This usually means @lde/sparql-importer is installed more than once: check with `npm ls @lde/sparql-importer` and run `npm dedupe`.');
130
137
  }
131
138
  async cleanup() {
132
139
  await this.options.server.stop();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/pipeline",
3
- "version": "0.38.0",
3
+ "version": "0.38.1",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/ldelements/lde.git",
6
6
  "directory": "packages/pipeline"
@@ -39,8 +39,8 @@
39
39
  "fetch-sparql-endpoint": "^7.2.0",
40
40
  "filenamify-url": "^4.0.0",
41
41
  "is-network-error": "^1.3.2",
42
- "n3": "^2.7.12",
43
- "p-retry": "^8.0.0",
42
+ "n3": "^2.13.12",
43
+ "p-retry": "^8.0.1",
44
44
  "rdf-string": "^2.0.1",
45
45
  "tslib": "^2.3.0"
46
46
  }