@lde/search-indexer 0.3.0 → 0.3.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.
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -0
- package/dist/indexer.d.ts.map +1 -1
- package/dist/indexer.js +6 -0
- package/package.json +5 -5
package/dist/config.d.ts
CHANGED
|
@@ -11,6 +11,15 @@ export interface IndexerConfig {
|
|
|
11
11
|
/** SPARQL endpoint of the DCAT dataset registry the selection queries
|
|
12
12
|
* (`REGISTRY_ENDPOINT`). */
|
|
13
13
|
readonly registryEndpoint: URL;
|
|
14
|
+
/**
|
|
15
|
+
* Root types extracted from {@link registryEndpoint} instead of from each
|
|
16
|
+
* dataset’s own distribution (`REGISTRY_ROOT_TYPES`, whitespace- or
|
|
17
|
+
* comma-separated {@link SearchType.name}s) – the dataset’s own description
|
|
18
|
+
* and what hangs off it, which live in the register rather than in the data a
|
|
19
|
+
* publisher ships. Empty when unset: every type reads the distribution, the
|
|
20
|
+
* behaviour before this setting existed.
|
|
21
|
+
*/
|
|
22
|
+
readonly registryRootTypes: readonly string[];
|
|
14
23
|
/** Dataset selection within the registry: explicit IRIs (`DATASETS`),
|
|
15
24
|
* search criteria (`DATASET_CRITERIA`), or every dataset when neither is
|
|
16
25
|
* set. */
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC;iCAC6B;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC;IAC/B;;eAEW;IACX,QAAQ,CAAC,eAAe,EAAE,cAAc,C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EAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,0BAA0B,GAAG,QAAQ,CAAC;IACpE,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;oCAGgC;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAQD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GACxD,aAAa,CAqFf"}
|
package/dist/config.js
CHANGED
|
@@ -57,6 +57,7 @@ export function configFromEnvironment(environment) {
|
|
|
57
57
|
const config = {
|
|
58
58
|
schemaModulePath: environment['SCHEMA_MODULE'] ?? '/config/search-schema.mjs',
|
|
59
59
|
registryEndpoint,
|
|
60
|
+
registryRootTypes: names(environment['REGISTRY_ROOT_TYPES']),
|
|
60
61
|
datasetCriteria,
|
|
61
62
|
typesense: {
|
|
62
63
|
host: required('TYPESENSE_HOST'),
|
|
@@ -74,6 +75,16 @@ export function configFromEnvironment(environment) {
|
|
|
74
75
|
}
|
|
75
76
|
return config;
|
|
76
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* A whitespace- or comma-separated list variable, as a list. The names
|
|
80
|
+
* themselves are validated against the mounted schema when the pipeline is
|
|
81
|
+
* wired – config has no schema to check them against.
|
|
82
|
+
*/
|
|
83
|
+
function names(value) {
|
|
84
|
+
return value === undefined
|
|
85
|
+
? []
|
|
86
|
+
: value.split(/[\s,]+/).filter((name) => name.length > 0);
|
|
87
|
+
}
|
|
77
88
|
/** `DATASETS` (whitespace-separated IRIs) or `DATASET_CRITERIA` (a JSON
|
|
78
89
|
* object) – never both; neither selects the whole registry. */
|
|
79
90
|
function criteriaFromEnvironment(environment, problems) {
|
package/dist/indexer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../src/indexer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../src/indexer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CA8BxC"}
|
package/dist/indexer.js
CHANGED
|
@@ -29,6 +29,12 @@ export async function createSearchIndexer(config) {
|
|
|
29
29
|
datasets: datasetSelectorFrom(config),
|
|
30
30
|
distributionResolver: distributionResolverFrom(config),
|
|
31
31
|
writerFor: writerFactoryFrom(client, config),
|
|
32
|
+
registryTypes: config.registryRootTypes.length > 0
|
|
33
|
+
? {
|
|
34
|
+
endpoint: config.registryEndpoint,
|
|
35
|
+
names: config.registryRootTypes,
|
|
36
|
+
}
|
|
37
|
+
: undefined,
|
|
32
38
|
provenanceStore: config.provenance
|
|
33
39
|
? new FileProvenanceStore({ path: config.provenance.path })
|
|
34
40
|
: undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lde/search-indexer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "The @lde/search-pipeline indexer as a bootable process and prebuilt Docker image: loads a mounted schema-declaration module, dataset selection, Typesense connection and rebuild mode from the environment, then runs the object-grain searchIndexerPipeline once to completion. The composition layer that binds the engine-agnostic @lde/search-pipeline stages to @lde/search-typesense – the write-path counterpart of @lde/search-api-server.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "git+https://github.com/ldelements/lde.git",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@lde/dataset-registry-client": "^0.9.1",
|
|
32
|
-
"@lde/pipeline": "^0.35.
|
|
33
|
-
"@lde/pipeline-console-reporter": "^0.26.
|
|
32
|
+
"@lde/pipeline": "^0.35.5",
|
|
33
|
+
"@lde/pipeline-console-reporter": "^0.26.5",
|
|
34
34
|
"@lde/search": "^0.15.0",
|
|
35
|
-
"@lde/search-pipeline": "^0.15.
|
|
36
|
-
"@lde/search-typesense": "^0.18.
|
|
35
|
+
"@lde/search-pipeline": "^0.15.1",
|
|
36
|
+
"@lde/search-typesense": "^0.18.1",
|
|
37
37
|
"@lde/sparql-qlever": "^0.15.3",
|
|
38
38
|
"commander": "^15.0.0",
|
|
39
39
|
"tslib": "^2.3.0",
|