Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): update barnard59 packages #1514

Merged
merged 6 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/flat-lamps-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@cube-creator/cli": patch
---

Update barnard59 packages:
- barnard59 1.1.0 => 5.0.1
- barnard59-base 1.1.0 => 2.4.2
- barnard59-formats 1.1.0 => 2.1.1
- barnard59-graph-store 1.0.0 => 5.1.2
- barnard59-http 1.1.1 => 2.0.0
- barnard59-rdf 1.0.0 => 3.4.0
- barnard59-validate-shacl 0.3.0 => barnard59-shacl 1.4.5
5 changes: 5 additions & 0 deletions .changeset/tall-walls-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-creator/cli": patch
---

Use package barnard59-cube
7 changes: 4 additions & 3 deletions apis/core/lib/handlers/csv-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import { Enrichment } from '@hydrofoil/labyrinth/lib/middleware/preprocessResource'
import { cc } from '@cube-creator/core/namespace'
import { fromPointer as mediaObjectFromPointer } from '@cube-creator/model/MediaObject'
import { AnyPointer, GraphPointer } from 'clownface'
import clownface, { AnyPointer, GraphPointer } from 'clownface'

Check warning on line 7 in apis/core/lib/handlers/csv-source.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/csv-source.ts#L7

Added line #L7 was not covered by tests
import { schema } from '@tpluscode/rdf-ns-builders'
import { ResourceIdentifier } from '@tpluscode/rdfine/RdfResource'
import type { DatasetCore, NamedNode } from '@rdfjs/types'

Check warning on line 10 in apis/core/lib/handlers/csv-source.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/csv-source.ts#L10

Added line #L10 was not covered by tests
import { shaclValidate } from '../middleware/shacl'
import { createCSVSource } from '../domain/csv-source/upload'
import { deleteSource } from '../domain/csv-source/delete'
Expand Down Expand Up @@ -66,8 +67,8 @@
return next()
}

const csvSource = await req.hydra.resource.clownface()
const directDownload = getPresignedLink(csvSource)
const csvSource: { term: NamedNode; dataset: DatasetCore } = await req.hydra.resource.clownface()
const directDownload = getPresignedLink(clownface(csvSource))

Check warning on line 71 in apis/core/lib/handlers/csv-source.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/csv-source.ts#L70-L71

Added lines #L70 - L71 were not covered by tests
if (!directDownload) {
return next(new Error('s3 key not found'))
}
Expand Down
5 changes: 4 additions & 1 deletion apis/core/lib/handlers/cube-projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import * as ns from '@tpluscode/rdf-ns-builders'
import cors from 'cors'
import { isMultipart } from '@cube-creator/express/multipart'
import type { DatasetCore, NamedNode } from '@rdfjs/types'
import clownface from 'clownface'

Check warning on line 11 in apis/core/lib/handlers/cube-projects.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/cube-projects.ts#L10-L11

Added lines #L10 - L11 were not covered by tests
import { shaclValidate } from '../middleware/shacl'
import { createProject } from '../domain/cube-projects/create'
import { updateProject } from '../domain/cube-projects/update'
Expand All @@ -28,8 +30,9 @@
throw new Error('User is not defined')
}

const pointer: { term: NamedNode; dataset: DatasetCore } = await req.hydra.resource.clownface()

Check warning on line 33 in apis/core/lib/handlers/cube-projects.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/cube-projects.ts#L33

Added line #L33 was not covered by tests
const { project: { pointer: project }, job } = await createProject({
projectsCollection: await req.hydra.resource.clownface(),
projectsCollection: clownface(pointer),

Check warning on line 35 in apis/core/lib/handlers/cube-projects.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/cube-projects.ts#L35

Added line #L35 was not covered by tests
resource: await req.resource(),
user,
store: req.resourceStore(),
Expand Down
4 changes: 3 additions & 1 deletion apis/core/lib/handlers/cube-projects/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import $rdf from 'rdf-ext'
import { parsers } from '@rdfjs-elements/formats-pretty'
import toStream from 'string-to-stream'
import type { DatasetCore, NamedNode } from '@rdfjs/types'

Check warning on line 9 in apis/core/lib/handlers/cube-projects/import.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/cube-projects/import.ts#L9

Added line #L9 was not covered by tests
import { shaclValidate } from '../../middleware/shacl'
import { importProject } from '../../domain/cube-projects/import'
import { streamClient } from '../../query-client'
Expand All @@ -24,8 +25,9 @@
throw new Error('User is not defined')
}

const pointer: { term: NamedNode; dataset: DatasetCore } = await req.hydra.resource.clownface()

Check warning on line 28 in apis/core/lib/handlers/cube-projects/import.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/cube-projects/import.ts#L28

Added line #L28 was not covered by tests
const { project, importedDataset } = await importProject({
projectsCollection: await req.hydra.resource.clownface(),
projectsCollection: clownface(pointer),

Check warning on line 30 in apis/core/lib/handlers/cube-projects/import.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/cube-projects/import.ts#L30

Added line #L30 was not covered by tests
resource: await req.parseFromMultipart(),
files: req.multipartFileQuadsStreams(),
store: req.resourceStore(),
Expand Down
11 changes: 7 additions & 4 deletions apis/core/lib/handlers/dataset.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { PassThrough } from 'stream'
import type { Term } from '@rdfjs/types'
import toStream from 'rdf-dataset-ext/toStream.js'
import type { DatasetCore, NamedNode, Term } from '@rdfjs/types'

Check warning on line 3 in apis/core/lib/handlers/dataset.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/dataset.ts#L2-L3

Added lines #L2 - L3 were not covered by tests
import asyncMiddleware from 'middleware-async'
import clownface from 'clownface'
import parsePreferHeader from 'parse-prefer-header'
Expand All @@ -20,8 +21,9 @@
export const put = protectedResource(
shaclValidate,
asyncMiddleware(async (req, res) => {
const pointer: { term: NamedNode; dataset: DatasetCore } = await req.hydra.resource.clownface()

Check warning on line 24 in apis/core/lib/handlers/dataset.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/dataset.ts#L24

Added line #L24 was not covered by tests
const dataset = await update({
dataset: await req.hydra.resource.clownface(),
dataset: clownface(pointer),

Check warning on line 26 in apis/core/lib/handlers/dataset.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/dataset.ts#L26

Added line #L26 was not covered by tests
resource: await req.resource(),
store: req.resourceStore(),
})
Expand All @@ -35,7 +37,8 @@
export const get = protectedResource(asyncMiddleware(async (req, res) => {
const { includeInLists } = parsePreferHeader(req.header('Prefer'))

const dataset = await req.hydra.resource.clownface()
const ptr: { term: NamedNode; dataset: DatasetCore } = await req.hydra.resource.clownface()
const dataset = clownface(ptr)

Check warning on line 41 in apis/core/lib/handlers/dataset.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/dataset.ts#L40-L41

Added lines #L40 - L41 were not covered by tests
const shapeStreams = [...await loadCubeShapes(req.hydra.resource.term, !includeInLists, clients)]
const outStream = new PassThrough({
objectMode: true,
Expand All @@ -48,7 +51,7 @@
const linkedResources = await loadLinkedResources(dataset, types.out(query.include).toArray(), req.labyrinth.sparql)
const observationsTemplateStream = await observationTemplate(dataset.term)

merge([dataset.dataset.toStream(), ...shapeStreams, linkedResources.toStream(), observationsTemplateStream], { objectMode: true })
merge([toStream(dataset.dataset), ...shapeStreams, linkedResources.toStream(), observationsTemplateStream], { objectMode: true })

Check warning on line 54 in apis/core/lib/handlers/dataset.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/dataset.ts#L54

Added line #L54 was not covered by tests
.pipe(outStream)

return res.quadStream(outStream)
Expand Down
5 changes: 3 additions & 2 deletions apis/core/lib/handlers/observations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import * as ns from '@cube-creator/core/namespace'
import { cc, hydraBox } from '@cube-creator/core/namespace'
import { hydra } from '@tpluscode/rdf-ns-builders'
import type { DatasetCore, Term } from '@rdfjs/types'

Check warning on line 14 in apis/core/lib/handlers/observations.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/observations.ts#L14

Added line #L14 was not covered by tests
import { warning } from '../log'
import { getObservations } from '../domain/observations'

Expand Down Expand Up @@ -50,8 +51,8 @@
}
}

const templatePointer = req.hydra.operation.out(hydraBox.variables).toArray()[0]
const template = RdfResourceImpl.factory.createEntity<IriTemplate>(templatePointer, [IriTemplateMixin])
const templatePointer: { term: Term; dataset: DatasetCore } = req.hydra.operation.out(hydraBox.variables).toArray()[0]
const template = RdfResourceImpl.factory.createEntity<IriTemplate>(clownface(templatePointer), [IriTemplateMixin])

Check warning on line 55 in apis/core/lib/handlers/observations.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/observations.ts#L54-L55

Added lines #L54 - L55 were not covered by tests
const collection = await getObservations({
sourceGraph,
pageSize,
Expand Down
4 changes: 3 additions & 1 deletion apis/core/lib/handlers/table/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
import clownface from 'clownface'
import $rdf from 'rdf-ext'
import { rdf } from '@tpluscode/rdf-ns-builders'
import type { DatasetCore, NamedNode } from '@rdfjs/types'

Check warning on line 8 in apis/core/lib/handlers/table/create.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/table/create.ts#L8

Added line #L8 was not covered by tests
import { createTable } from '../../domain/table/create'
import { shaclValidate } from '../../middleware/shacl'

export const post = protectedResource(
shaclValidate,
asyncMiddleware(async (req, res) => {
const cfLike: { term: NamedNode; dataset: DatasetCore } = await req.hydra.resource.clownface()

Check warning on line 15 in apis/core/lib/handlers/table/create.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/table/create.ts#L15

Added line #L15 was not covered by tests
const table = await createTable({
tableCollection: await req.hydra.resource.clownface(),
tableCollection: clownface(cfLike),

Check warning on line 17 in apis/core/lib/handlers/table/create.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/handlers/table/create.ts#L17

Added line #L17 was not covered by tests
resource: await req.resource(),
store: req.resourceStore(),
})
Expand Down
4 changes: 2 additions & 2 deletions apis/core/lib/middleware/operations.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { RequestHandler } from 'express'
import clownface, { GraphPointer } from 'clownface'
import clownface from 'clownface'
import asyncMiddleware from 'middleware-async'
import { hydra, rdf } from '@tpluscode/rdf-ns-builders'
import TermSet from '@rdfjs/term-set'
import { log } from '../log'

function logRemovedOperation(operation: GraphPointer) {
function logRemovedOperation(operation: any) {

Check warning on line 8 in apis/core/lib/middleware/operations.ts

View check run for this annotation

Codecov / codecov/patch

apis/core/lib/middleware/operations.ts#L8

Added line #L8 was not covered by tests
const method = operation.out(hydra.method).value
const types = operation.out(rdf.type).values
const clas = operation.in(hydra.supportedOperation).values
Expand Down
1 change: 1 addition & 0 deletions apis/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"once": "^1.4.0",
"parse-prefer-header": "^1.0.0",
"rdf-cube-view-query": "^1.8.2",
"rdf-dataset-ext": "^1.1.0",
"rdf-ext": "^1.3.0",
"rdf-literal": "^1.3.0",
"set-link": "^1.0.0",
Expand Down
3 changes: 3 additions & 0 deletions cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ RUN yarn install --frozen-lockfile
COPY . .
RUN rm -rf ./ui
RUN rm -rf ./apis
RUN rm -rf ./cli/test
RUN rm -rf ./packages/model/test
RUN rm -rf ./packages/testing
RUN rm -rf ./packages/express
RUN rm -rf ./packages/express-rdf-request
RUN rm -rf ./packages/shacl-middleware
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/bufferDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function bufferInfo(pipeline: Pipeline) {
const { key, value } = bufferStatePair({
index,
mode: 'write',
state: step.stream._writableState,
state: (step.stream as any)._writableState,
step,
})

Expand Down
5 changes: 3 additions & 2 deletions cli/lib/commands/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ export function create<TOptions extends RunOptions>({ pipelineSources, prepare,

await prepare?.(command, variables)

const { default: Runner } = await importDynamic('barnard59/runner.js')
const { default: Runner } = await importDynamic<typeof import('barnard59/runner.js')>('barnard59/runner.js')
const env = await importDynamic<typeof import('barnard59-env')>('barnard59-env')
const run = await Runner(clownface({
dataset,
term: pipelines.Entrypoint,
}), {
}), env.default, {
basePath: path.resolve(basePath, 'pipelines'),
outputStream: process.stdout,
variables,
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/counters.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Quad } from '@rdfjs/types'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import { PassThrough } from 'readable-stream'
import through2 from 'through2'
import { csvw } from '@tpluscode/rdf-ns-builders/strict'
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { readable } from 'duplex-to'
import { CsvSource } from '@cube-creator/model'
import fetch from 'node-fetch'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'

Check warning on line 7 in cli/lib/csv.ts

View check run for this annotation

Codecov / codecov/patch

cli/lib/csv.ts#L7

Added line #L7 was not covered by tests

export function openFromCsvw(this: Context) {
const csvStream = new PassThrough()
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/cube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { DatasetCore, Quad, Term } from '@rdfjs/types'
import $rdf from 'rdf-ext'
import { cc } from '@cube-creator/core/namespace'
import clownface, { GraphPointer } from 'clownface'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import { obj } from 'through2'
import { CONSTRUCT, sparql } from '@tpluscode/sparql-builder'
import { schema, sh } from '@tpluscode/rdf-ns-builders/strict'
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/import/cube.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NamedNode } from '@rdfjs/types'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import StreamClient from 'sparql-http-client'
import { CONSTRUCT } from '@tpluscode/sparql-builder'
import * as ns from '@cube-creator/core/namespace'
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/import/cubeMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { DatasetCore, NamedNode, Quad, Term } from '@rdfjs/types'
import { cc } from '@cube-creator/core/namespace'
import DatasetExt from 'rdf-ext/lib/Dataset'
import { dcterms, schema } from '@tpluscode/rdf-ns-builders'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import StreamClient from 'sparql-http-client'
import $rdf from 'rdf-ext'
import { sparql, CONSTRUCT } from '@tpluscode/sparql-builder'
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/import/dimensions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DatasetCore, NamedNode, Term } from '@rdfjs/types'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import ParsingClient from 'sparql-http-client/ParsingClient'
import clownface, { AnyContext, AnyPointer, GraphPointer } from 'clownface'
import $rdf from 'rdf-ext'
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import $rdf from 'rdf-ext'
import { cc } from '@cube-creator/core/namespace'
import TermMap from '@rdfjs/term-map'
import { GraphPointer } from 'clownface'
import { ValidationError } from 'barnard59-validate-shacl/lib/errors'
import { ValidationError } from 'barnard59-shacl/lib/errors'
import DatasetExt from 'rdf-ext/lib/Dataset'
import { createPlaygroundUrl } from '@zazuko/shacl-playground'
import { shorten } from '@zazuko/s'
Expand Down
4 changes: 2 additions & 2 deletions cli/lib/loadCube.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Stream, PassThrough } from 'stream'
import { spawnSync } from 'child_process'
import type * as Pipeline from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import { CONSTRUCT, sparql } from '@tpluscode/sparql-builder'
import { csvw } from '@tpluscode/rdf-ns-builders'
import { cc, cube } from '@cube-creator/core/namespace'
Expand All @@ -20,7 +20,7 @@ interface Params {
* Opens a SPARQL stream reading the cube, excluding the Cube Constraint subgraph,
* which will be processed alongside the rest of cube metadata
*/
export async function loadCube(this: Pipeline.Context, { jobUri, endpoint, user, password }: Params): Promise<Stream> {
export async function loadCube(this: Context, { jobUri, endpoint, user, password }: Params): Promise<Stream> {
const { project } = await loadProject(jobUri, this)

const patterns = sparql`
Expand Down
4 changes: 2 additions & 2 deletions cli/lib/log.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import winston from 'winston'
import { OnViolation } from 'barnard59-validate-shacl'
import { OnViolation } from 'barnard59-shacl/validate'
import { fromPointer } from '@rdfine/shacl/lib/ValidationReport'

export const logger = winston.createLogger({
Expand All @@ -12,7 +12,7 @@ export const logger = winston.createLogger({
],
})

export function prettyPrintReport({ context, report }: OnViolation) {
export const prettyPrintReport: OnViolation = ({ context, report }) => {
const jsonld = fromPointer(report.pointer).toJSON()
context.logger.error(JSON.stringify(jsonld, null, 2))

Expand Down
2 changes: 1 addition & 1 deletion cli/lib/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { dcat, dcterms, rdf, schema, sh, _void, foaf } from '@tpluscode/rdf-ns-b
import { cc, cube } from '@cube-creator/core/namespace'
import { Dataset, Project, PublishJob } from '@cube-creator/model'
import { HydraClient } from 'alcaeus/alcaeus'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import { Published } from '@cube-creator/model/Cube'
import { CONSTRUCT, sparql } from '@tpluscode/sparql-builder'
import StreamClient from 'sparql-http-client/StreamClient'
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
interface DynamicImport {
(m: string): Promise<any>
<T = any>(m: string): Promise<T>
}

// eslint-disable-next-line no-new-func
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/output-filter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BlankNode, Quad, Term } from '@rdfjs/types'
import { csvw, rdf } from '@tpluscode/rdf-ns-builders'
import { cc } from '@cube-creator/core/namespace'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import { customAlphabet } from 'nanoid'
import dict from 'nanoid-dictionary'
import $rdf from 'rdf-ext'
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/output-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { DatasetCore, Quad, Term } from '@rdfjs/types'
import $rdf from 'rdf-ext'
import { ImportJob, TransformJob } from '@cube-creator/model'
import { HydraClient } from 'alcaeus/alcaeus'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import { Dictionary } from '@rdfine/prov'
import { prov, schema, qudt } from '@tpluscode/rdf-ns-builders/strict'
import { cc, cube } from '@cube-creator/core/namespace'
Expand Down
7 changes: 4 additions & 3 deletions cli/lib/pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type * as Pipeline from 'barnard59-core/lib/Pipeline'
import type Pipeline from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'

Check warning on line 2 in cli/lib/pipeline.ts

View check run for this annotation

Codecov / codecov/patch

cli/lib/pipeline.ts#L1-L2

Added lines #L1 - L2 were not covered by tests

export const asStep = (pipeline: Pipeline.default) => pipeline
export const asStep = (pipeline: Pipeline) => pipeline

Check warning on line 4 in cli/lib/pipeline.ts

View check run for this annotation

Codecov / codecov/patch

cli/lib/pipeline.ts#L4

Added line #L4 was not covered by tests

export function selectTransformation(this: Pipeline.Context, arg: {observationTable: Pipeline.default; otherTable: Pipeline.default}) {
export function selectTransformation(this: Context, arg: {observationTable: Pipeline; otherTable: Pipeline}) {

Check warning on line 6 in cli/lib/pipeline.ts

View check run for this annotation

Codecov / codecov/patch

cli/lib/pipeline.ts#L6

Added line #L6 was not covered by tests
if (this.variables.get('transformed').isObservationTable === true) {
this.logger.info('Input is cube table')
return arg.observationTable
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/project.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PublishJob, Project } from '@cube-creator/model'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import { tracer } from './otel/tracer'

export async function loadProject(jobUri: string, { variables, logger }: Context) {
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/publish/versions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import $rdf from 'rdf-ext'
import through2 from 'through2'
import clownface from 'clownface'
Expand Down
2 changes: 1 addition & 1 deletion cli/lib/validation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { NamedNode, Quad } from '@rdfjs/types'
import { turtle } from '@tpluscode/rdf-string'
import type { Context } from 'barnard59-core/lib/Pipeline'
import type { Context } from 'barnard59-core'
import { validateQuad } from 'rdf-validate-datatype'

export function validate(this: Context, quad: Quad): Quad {
Expand Down
Loading
Loading