diff --git a/src/crawler.ts b/src/crawler.ts index 1b186271..30368726 100644 --- a/src/crawler.ts +++ b/src/crawler.ts @@ -1,10 +1,10 @@ -import {RegistrationStore} from './registration'; -import {DatasetStore, extractIris} from './dataset'; -import {dereference, fetch, HttpError, NoDatasetFoundAtUrl} from './fetch'; +import {RegistrationStore} from './registration.js'; +import {DatasetStore, extractIris} from './dataset.js'; +import {dereference, fetch, HttpError, NoDatasetFoundAtUrl} from './fetch.js'; import DatasetExt from 'rdf-ext/lib/Dataset'; import Pino from 'pino'; -import {Validator} from './validator'; -import {crawlCounter} from './instrumentation'; +import {Validator} from './validator.js'; +import {crawlCounter} from './instrumentation.js'; export class Crawler { constructor( diff --git a/src/dataset.ts b/src/dataset.ts index d430430f..dd747475 100644 --- a/src/dataset.ts +++ b/src/dataset.ts @@ -2,11 +2,11 @@ import DatasetExt from 'rdf-ext/lib/Dataset'; import factory from 'rdf-ext'; import rdf from 'rdf-ext'; import {URL} from 'url'; -import {datasetType} from './query'; +import {datasetType} from './query.js'; import {Readable, Transform} from 'stream'; import {StreamParser} from 'n3'; import {JsonLdParser} from 'jsonld-streaming-parser'; -import {StandardizeSchemaOrgPrefixToHttps} from './transform'; +import {StandardizeSchemaOrgPrefixToHttps} from './transform.js'; export interface DatasetStore { /** diff --git a/src/fetch.ts b/src/fetch.ts index 4da7f793..f07c3bef 100644 --- a/src/fetch.ts +++ b/src/fetch.ts @@ -3,11 +3,11 @@ import factory from 'rdf-ext'; import DatasetExt from 'rdf-ext/lib/Dataset'; import {URL} from 'url'; import {Store} from 'n3'; -import {bindingsToQuads, selectQuery, sparqlLimit} from './query'; +import {bindingsToQuads, selectQuery, sparqlLimit} from './query.js'; import {pipeline} from 'stream'; -import {StandardizeSchemaOrgPrefixToHttps} from './transform'; +import {StandardizeSchemaOrgPrefixToHttps} from './transform.js'; import Pino from 'pino'; -import {rdfDereferencer} from './rdf'; +import {rdfDereferencer} from './rdf.js'; /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ import _ from './comunica-config.json'; diff --git a/src/graphdb.ts b/src/graphdb.ts index 465d47e5..d697afc5 100644 --- a/src/graphdb.ts +++ b/src/graphdb.ts @@ -9,8 +9,8 @@ import { AllowedRegistrationDomainStore, Registration, RegistrationStore, -} from './registration'; -import {DatasetStore, extractIris} from './dataset'; +} from './registration.js'; +import {DatasetStore, extractIris} from './dataset.js'; export type SparqlResult = { results: { diff --git a/src/instrumentation.ts b/src/instrumentation.ts index 2298ddf8..64250e64 100644 --- a/src/instrumentation.ts +++ b/src/instrumentation.ts @@ -6,7 +6,7 @@ import { PeriodicExportingMetricReader, } from '@opentelemetry/sdk-metrics'; import {OTLPMetricExporter} from '@opentelemetry/exporter-metrics-otlp-proto'; -import {DatasetStore} from './dataset'; +import {DatasetStore} from './dataset.js'; export function startInstrumentation(datasetStore: DatasetStore) { datasetsCounter.addCallback(async result => diff --git a/src/main.ts b/src/main.ts index 994d6106..e6b04812 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,13 +3,13 @@ import { GraphDbClient, GraphDbDatasetStore, GraphDbRegistrationStore, -} from './graphdb'; -import {readUrl, ShaclValidator} from './validator'; -import {Crawler} from './crawler'; +} from './graphdb.js'; +import {readUrl, ShaclValidator} from './validator.js'; +import {Crawler} from './crawler.js'; import {scheduleJob} from 'node-schedule'; -import {server} from './server'; +import {server} from './server.js'; import Pino from 'pino'; -import {startInstrumentation} from './instrumentation'; +import {startInstrumentation} from './instrumentation.js'; const client = new GraphDbClient( process.env.GRAPHDB_URL || 'http://127.0.0.1:7200', diff --git a/src/server.ts b/src/server.ts index a6fd29b8..b3f1ddd3 100644 --- a/src/server.ts +++ b/src/server.ts @@ -6,26 +6,26 @@ import fastify, { FastifyRequest, FastifyServerOptions, } from 'fastify'; -import {Validator} from './validator'; +import {Validator} from './validator.js'; import datasetExt from 'rdf-dataset-ext'; -import {dereference, fetch, HttpError, NoDatasetFoundAtUrl} from './fetch'; +import {dereference, fetch, HttpError, NoDatasetFoundAtUrl} from './fetch.js'; import DatasetExt from 'rdf-ext/lib/Dataset'; import {URL} from 'url'; import { AllowedRegistrationDomainStore, Registration, RegistrationStore, -} from './registration'; -import {DatasetStore, extractIris, load} from './dataset'; +} from './registration.js'; +import {DatasetStore, extractIris, load} from './dataset.js'; import {IncomingMessage, Server} from 'http'; import * as psl from 'psl'; -import {rdfSerializer} from './rdf'; +import {rdfSerializer} from './rdf.js'; import fastifySwagger from '@fastify/swagger'; import fastifyCors from '@fastify/cors'; import {DatasetCore} from 'rdf-js'; import acceptsSerializer from '@fastify/accepts-serializer'; import fastifySwaggerUi from '@fastify/swagger-ui'; -import {registrationsCounter, validationsCounter} from './instrumentation'; +import {registrationsCounter, validationsCounter} from './instrumentation.js'; const serializer = (contentType: string) => diff --git a/src/validator.ts b/src/validator.ts index 364380db..9d138ad8 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -3,7 +3,7 @@ import factory from 'rdf-ext'; import SHACLValidator from 'rdf-validate-shacl'; import DatasetExt from 'rdf-ext/lib/Dataset'; import ValidationReport from 'rdf-validate-shacl/src/validation-report'; -import {rdfDereferencer} from './rdf'; +import {rdfDereferencer} from './rdf.js'; export interface Validator { /**