diff --git a/package-lock.json b/package-lock.json index 426941f4..cede18d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1874,7 +1874,7 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "1.0.2", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -20053,7 +20053,7 @@ "version": "1.9.2", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.2.tgz", "integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@emnapi/wasi-threads": "1.2.1", @@ -20064,7 +20064,7 @@ "version": "1.9.2", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz", "integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "tslib": "^2.4.0" @@ -20074,7 +20074,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "tslib": "^2.4.0" @@ -21455,9 +21455,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -21472,9 +21469,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -21489,9 +21483,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -21506,9 +21497,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -22026,7 +22014,7 @@ "version": "1.0.0-next.29", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@protobufjs/aspromise": { @@ -22439,6 +22427,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22455,6 +22444,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22471,6 +22461,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22487,6 +22478,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22503,6 +22495,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22519,9 +22512,7 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22538,9 +22529,7 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22557,9 +22546,7 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22576,9 +22563,7 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22595,9 +22580,7 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22614,9 +22597,7 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22633,6 +22614,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22649,6 +22631,7 @@ "cpu": [ "wasm32" ], + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -22664,6 +22647,7 @@ "version": "1.1.5", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz", "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -22682,6 +22666,7 @@ "version": "0.10.2", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -22695,6 +22680,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22711,6 +22697,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -22819,9 +22806,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -22836,9 +22820,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -22853,9 +22834,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -22870,9 +22848,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -22887,9 +22862,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -22904,9 +22876,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -22921,9 +22890,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -22938,9 +22904,6 @@ "ppc64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -22955,9 +22918,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -22972,9 +22932,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -22989,9 +22946,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -23006,9 +22960,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -23023,9 +22974,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -25202,7 +25150,7 @@ "version": "5.0.4", "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-5.0.4.tgz", "integrity": "sha512-P5YcQY8Y6RmoE9xRXI38rT8pssbcubEzqtYTM2XQoxOXMDn04nRaTI1SM8qCl9/NfW3ag9GlzdSXu7IwO5Ft8A==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^1.0.2", @@ -25231,7 +25179,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.2.tgz", "integrity": "sha512-9J/JMwOf9AoJhAywhrn7ScKTL38hsWQP/qPG60OtaAFcQ5OXPwKsxZFlbnuCKmZ61m8/lGgHYnFpdyQZUvG/iA==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=22" @@ -25241,7 +25189,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-1.0.2.tgz", "integrity": "sha512-gUsfXZJbzPamoIY5TvHFiMMoXESBrUMo+xqaj+rYrWI69+EnvRlYBlP96ZnHPY4vX8kyUpgAnFUCg5wZG/HkDQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@vitest/istanbul-lib-coverage": "1.0.2" @@ -25292,7 +25240,7 @@ "version": "5.0.4", "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-5.0.4.tgz", "integrity": "sha512-kh/bp0oLr6w18kt4MFn5/zS+Hpc5k3bsf6S2m2Qksj7sKHrnc7Tu90UVYyiXnRvkYruN6kSCHQ3RR+SBE6FinA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "tinyrainbow": "^3.2.0" @@ -25315,7 +25263,7 @@ "version": "5.0.4", "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-5.0.4.tgz", "integrity": "sha512-L40ToOGwFgeZ+JVPMKHb7T0b671mqcmCpMUh9P68xq9YZ+TXM72rkDf9ljuv02e5Y1zj8ww0CnWIUnqs3FEWKQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@vitest/utils": "5.0.4", @@ -25336,7 +25284,7 @@ "version": "5.0.4", "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-5.0.4.tgz", "integrity": "sha512-hgpnyMuMqCz2PARmk3v62FxUr8jHIkY13ygvUeh8s+dmQxfnvkB/sgtoZFzG4lMitnEdnrg/lCvDbtVzuAsGWQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@vitest/pretty-format": "5.0.4", @@ -26041,7 +25989,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.7.tgz", "integrity": "sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.31", @@ -26053,7 +26001,7 @@ "version": "10.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", "integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/async": { @@ -27302,7 +27250,7 @@ }, "node_modules/convert-source-map": { "version": "2.0.0", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/cookie": { @@ -29623,7 +29571,7 @@ "version": "0.8.3", "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz", "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/figures": { @@ -29858,7 +29806,7 @@ "version": "3.4.4", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/fn.name": { @@ -31937,6 +31885,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -31957,6 +31906,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -31977,6 +31927,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -31997,6 +31948,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -32017,6 +31969,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -32037,9 +31990,7 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -32060,9 +32011,7 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -32083,9 +32032,7 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -32106,9 +32053,7 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -32129,6 +32074,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -32149,6 +32095,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -32892,7 +32839,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -36252,7 +36199,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@polka/url": "^1.0.0-next.24", @@ -37198,7 +37145,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.2.0.tgz", "integrity": "sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=14.0.0" @@ -37269,7 +37216,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -38966,7 +38913,7 @@ "version": "2.9.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", - "devOptional": true, + "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" @@ -40477,7 +40424,7 @@ }, "packages/docgen": { "name": "@lde/docgen", - "version": "0.6.22", + "version": "0.7.0", "license": "MIT", "dependencies": { "@tpluscode/rdf-ns-builders": "^5.0.0", @@ -41578,7 +41525,7 @@ }, "packages/search": { "name": "@lde/search", - "version": "0.27.0", + "version": "0.27.1", "license": "MIT", "dependencies": { "@lde/text-normalization": "^0.1.2", @@ -41603,13 +41550,13 @@ }, "packages/search-api-graphql": { "name": "@lde/search-api-graphql", - "version": "0.29.0", + "version": "0.29.1", "license": "MIT", "dependencies": { "@escape.tech/graphql-armor-cost-limit": "^2.4.3", "@escape.tech/graphql-armor-max-depth": "^2.4.2", "@graphql-yoga/render-graphiql": "^5.24.2", - "@lde/search": "^0.27.0", + "@lde/search": "^0.27.1", "commander": "^15.0.0", "dataloader": "^2.2.3", "graphql": "^16.9.0", @@ -41669,12 +41616,12 @@ }, "packages/search-api-server": { "name": "@lde/search-api-server", - "version": "0.20.1", + "version": "0.20.2", "license": "MIT", "dependencies": { - "@lde/search": "^0.27.0", - "@lde/search-api-graphql": "^0.29.0", - "@lde/search-typesense": "^0.32.1", + "@lde/search": "^0.27.1", + "@lde/search-api-graphql": "^0.29.1", + "@lde/search-typesense": "^0.32.2", "@whatwg-node/server": "^0.11.0", "tslib": "^2.3.0", "typesense": "^3.1.1" @@ -41685,15 +41632,15 @@ }, "packages/search-indexer": { "name": "@lde/search-indexer", - "version": "0.19.1", + "version": "0.19.2", "license": "MIT", "dependencies": { "@lde/dataset-registry-client": "^0.9.3", "@lde/pipeline": "^0.36.7", "@lde/pipeline-console-reporter": "^0.27.7", - "@lde/search": "^0.27.0", - "@lde/search-pipeline": "^0.29.1", - "@lde/search-typesense": "^0.32.1", + "@lde/search": "^0.27.1", + "@lde/search-pipeline": "^0.29.2", + "@lde/search-typesense": "^0.32.2", "@lde/sparql-qlever": "^0.16.2", "commander": "^15.0.0", "tslib": "^2.3.0", @@ -41714,17 +41661,17 @@ }, "packages/search-pipeline": { "name": "@lde/search-pipeline", - "version": "0.29.1", + "version": "0.29.2", "license": "MIT", "dependencies": { - "@lde/search": "^0.27.0", + "@lde/search": "^0.27.1", "@traqula/generator-sparql-1-1": "^1.3.1", "@traqula/parser-sparql-1-1": "^1.3.1", "@traqula/rules-sparql-1-1": "^1.2.0", "tslib": "^2.3.0" }, "devDependencies": { - "@lde/search-typesense": "^0.32.1", + "@lde/search-typesense": "^0.32.2", "@rdfjs/types": "^2.0.1", "n3": "^2.7.12", "testcontainers": "^12.1.0", @@ -41751,10 +41698,10 @@ }, "packages/search-typesense": { "name": "@lde/search-typesense", - "version": "0.32.1", + "version": "0.32.2", "license": "MIT", "dependencies": { - "@lde/search": "^0.27.0", + "@lde/search": "^0.27.1", "@lde/text-normalization": "^0.1.2", "tslib": "^2.3.0", "typesense": "^3.1.1" diff --git a/packages/dataset-registry-client/src/client.ts b/packages/dataset-registry-client/src/client.ts index 8290b4dd..527b5b1e 100644 --- a/packages/dataset-registry-client/src/client.ts +++ b/packages/dataset-registry-client/src/client.ts @@ -1,6 +1,6 @@ import { Dataset, Distribution } from '@lde/dataset'; import { DatasetSchema } from './schema.js'; -import { type SchemaSearchInterface, type SchemaInterface } from 'ldkit'; +import { type SchemaSearchInterface } from 'ldkit'; import { createLens } from 'ldkit'; import { prepareQuery } from './query.js'; import { Paginator } from './paginator.js'; @@ -23,7 +23,7 @@ export class Client { // logQuery: (query) => console.debug(query), }); - let results: SchemaInterface[] | undefined; + let results; let total; let pageSize; @@ -32,12 +32,6 @@ export class Client { results = await datasets.query(prepareQuery(args)); total = results.length; pageSize = total; - } else if (args.$id) { - // Work around LDkit bug: count() ignores $id. - // IRI lookups don't need pagination. - results = await datasets.find({ where: args }); - total = results.length; - pageSize = total; } else { // With search criteria the results are paginated. total = await datasets.count({ where: args }); @@ -51,9 +45,6 @@ export class Client { // Custom query has no paginated results. // TODO: we could add a convention here like {OFFSET} {LIMIT} in the query string. items = await datasets.query(prepareQuery(args)); - } else if (results) { - // Pre-fetched results ($id workaround): return them directly. - items = results; } else { items = await datasets.find({ where: args,