Skip to content

Commit

Permalink
build(deps): update barnard59 packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed May 14, 2024
1 parent 4a9a139 commit 3050844
Show file tree
Hide file tree
Showing 12 changed files with 1,043 additions and 298 deletions.
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.0
- 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
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')

Check warning on line 106 in cli/lib/commands/runner.ts

View check run for this annotation

Codecov / codecov/patch

cli/lib/commands/runner.ts#L105-L106

Added lines #L105 - L106 were not covered by tests
const run = await Runner(clownface({
dataset,
term: pipelines.Entrypoint,
}), {
}), env.default, {

Check warning on line 110 in cli/lib/commands/runner.ts

View check run for this annotation

Codecov / codecov/patch

cli/lib/commands/runner.ts#L110

Added line #L110 was not covered by tests
basePath: path.resolve(basePath, 'pipelines'),
outputStream: process.stdout,
variables,
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
20 changes: 8 additions & 12 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
"@zazuko/shacl-playground": "^1.0.0",
"alcaeus": "^2",
"aws-sdk": "^2.559.0",
"barnard59": "^1.1.0",
"barnard59-base": "^1.1.0",
"barnard59-formats": "^1.1.0",
"barnard59-graph-store": "^1.0.0",
"barnard59-http": "^1.1.1",
"barnard59-rdf": "^1.0.0",
"barnard59-validate-shacl": "^0.3.8",
"barnard59": "^5.0.1",
"barnard59-base": "^2.4.2",
"barnard59-cube": "^1.4.3",
"barnard59-formats": "^2.1.0",
"barnard59-graph-store": "^5.1.2",
"barnard59-http": "^2.0.0",
"barnard59-rdf": "^3.4.0",
"barnard59-shacl": "^1.4.5",
"body-parser": "^1.19.0",
"clownface": "^1",
"commander": "^4.1.1",
Expand Down Expand Up @@ -83,11 +84,6 @@
"@cube-creator/testing": "^0.1.21",
"@tpluscode/rdf-ns-builders": "^1.0.0",
"@tpluscode/sparql-builder": "^0.3.15",
"@types/barnard59": "^1.0.1",
"@types/barnard59-base": "^1.0.1",
"@types/barnard59-core": "^1.0.2",
"@types/barnard59-graph-store": "^1.0.0",
"@types/barnard59-validate-shacl": "^0.3.2",
"@types/body-parser": "^1.19.0",
"@types/chai": "^4.2.13",
"@types/chai-as-promised": "^7.1.3",
Expand Down
23 changes: 18 additions & 5 deletions cli/pipelines/import.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,24 @@
@prefix code: <https://code.described.at/> .

<#Main> a :Pipeline ;
:steps
[
:stepList
( <#concatStreams> <#validate> <#StreamOutput> ) ;
] .
:variables
[
:variable
[
:name "executionUrl" ;
:required false
] ;
:variable
[
:name "lastTransformed" ;
:required false
] ;
] ;
:steps
[
:stepList
( <#concatStreams> <#validate> <#StreamOutput> ) ;
] .

<#concatStreams>
a :Step ;
Expand Down
2 changes: 1 addition & 1 deletion cli/pipelines/main.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

<#toObservation> a :Step;
code:implementedBy [ a code:EcmaScriptModule;
code:link <node:barnard59-rdf/cube.js#toObservation>
code:link <node:barnard59-cube/cube.js#toObservation>
] ;
code:arguments [
code:name "observations";
Expand Down
2 changes: 2 additions & 0 deletions cli/pipelines/publish-to-graph-store.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ _:upload
a :Step ;
code:implementedBy [ a code:EcmaScriptModule ;
code:link <node:barnard59-graph-store/post.js#default> ] ;
code:arguments [ code:name "graph" ;
code:value "target-graph"^^:VariableName ] ;
code:arguments [ code:name "endpoint" ;
code:value "publish-graph-store-endpoint"^^:VariableName ] ;
code:arguments [ code:name "user" ;
Expand Down
57 changes: 35 additions & 22 deletions cli/pipelines/publish.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<#Main> a :Pipeline ;
:steps
[
:stepList
(
<#concatStreams>
<#removeHydraTriples>
<#uniqueBnodes>
<#countOutputQuads>
<#StreamOutput>
) ;
] .
:variables
[
:variable
[
:name "lastTransformed" ;
:required false
] ;
:variable
[
:name "bnodeUuid" ;
:required false
] ;
] ;
:steps
[
:stepList
(
<#concatStreams>
<#removeHydraTriples>
<#uniqueBnodes>
<#countOutputQuads>
<#StreamOutput>
) ;
] .

<#concatStreams>
a :Step ;
Expand Down Expand Up @@ -57,7 +70,7 @@
code:implementedBy
[
a code:EcmaScriptModule ;
code:link <node:barnard59-validate-shacl/validate.js#shacl>
code:link <node:barnard59-shacl/validate.js#shacl>
] ;
code:arguments
[ code:name "shape" ; code:value <#concatShapes> ] ,
Expand Down Expand Up @@ -129,24 +142,24 @@
] .

<#shapeURLs> a :Step ;
code:implementedBy [
code:implementedBy [
a code:EcmaScriptModule ;
code:link <node:stream#Readable.from> ;
code:link <node:stream#Readable.from> ;
] ;
code:arguments (
"""[
'https://cube.link/v0.1.0/shape/standalone-constraint-constraint',
// 'https://cube.link/v0.1.0/shape/datacatalog-constraint',
]"""^^code:EcmaScript
'https://cube.link/latest/shape/standalone-constraint-constraint',
// 'https://cube.link/v0.1.0/shape/datacatalog-constraint',
]"""^^code:EcmaScript
)
.

<#getShapes> a :Step ;
code:implementedBy [
code:implementedBy [
a code:EcmaScriptModule ;
code:link <node:barnard59-base/forEach.js#default> ;
code:link <node:barnard59-base/forEach.js#default> ;
] ;
code:arguments ( <#getShape> "shapeURL" )
code:arguments ( <#getShape> "shapeURL" )
.

<#getShape> a :Pipeline , :ReadableObjectMode;
Expand All @@ -156,7 +169,7 @@
(
<#fetch>
<#parse>
)
)
] .

<#fetch> a :Step ;
Expand All @@ -177,7 +190,7 @@
[
code:link <node:barnard59-formats/n3.js#parse> ;
a code:EcmaScriptModule ;
]
]
.


Expand Down
2 changes: 2 additions & 0 deletions cli/pipelines/to-graph-store.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ _:upload
a :Step ;
code:implementedBy [ a code:EcmaScriptModule ;
code:link <node:barnard59-graph-store/put.js#default> ] ;
code:arguments [ code:name "graph" ;
code:value "graph"^^:VariableName ] ;
code:arguments [ code:name "endpoint" ;
code:value "graph-store-endpoint"^^:VariableName ] ;
code:arguments [ code:name "user" ;
Expand Down
25 changes: 17 additions & 8 deletions cli/pipelines/unlist.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

<#Main> a :Pipeline ;
:steps [ :stepList ( <#expirePreviousVersions> <#StreamOutput> ) ] ;
:variables
[
:variable
[
:name "lastTransformed" ;
:required false
] ;
:variable
[
:name "publish-job" ;
:required false
] ;
] ;
:steps [ :stepList ( <#expirePreviousVersions> <#StreamOutput> ) ] ;
.

<#expirePreviousVersions>
Expand All @@ -15,18 +28,14 @@

<#StreamOutput>
a :Pipeline, :WritableObjectMode ;
:steps [ :stepList ( _:setGraph _:upload ) ] ;.

_:setGraph
a :Step ;
code:implementedBy [ a code:EcmaScriptModule ;
code:link <node:barnard59-rdf/setGraph.js#default> ] ;
code:arguments ( "target-graph"^^:VariableName ) .
:steps [ :stepList ( _:upload ) ] ;.

_:upload
a :Step ;
code:implementedBy [ a code:EcmaScriptModule ;
code:link <node:barnard59-graph-store/post.js#default> ] ;
code:arguments [ code:name "graph" ;
code:value "target-graph"^^:VariableName ] ;
code:arguments [ code:name "endpoint" ;
code:value "publish-graph-store-endpoint"^^:VariableName ] ;
code:arguments [ code:name "user" ;
Expand Down
Loading

0 comments on commit 3050844

Please sign in to comment.