@rdfc/js-runner 0.2.0 → 0.2.2

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/README.md CHANGED
@@ -1,28 +1,26 @@
1
1
  # Js-runner
2
2
 
3
- [![Bun CI](https://github.com/ajuvercr/js-runner/actions/workflows/build-test.yml/badge.svg)](https://github.com/ajuvercr/js-runner/actions/workflows/build-test.yml)
3
+ [![Bun CI](https://github.com/rdf-connect/js-runner/actions/workflows/build-test.yml/badge.svg)](https://github.com/rdf-connect/js-runner/actions/workflows/build-test.yml) [![npm](https://img.shields.io/npm/v/@rdfc/js-runner.svg?style=popout)](https://npmjs.com/package/@rdfc/js-runner)
4
4
 
5
- Executor for a javascript workbench. Starting from a turtle file describing the workbench.
5
+ Typescript/Javascript executor for an [RDF-Connect](https://rdf-connect.github.io/rdfc.github.io/) pipeline. Starting from a declarative RDF file describing the pipeline.
6
6
 
7
7
  ## Process definition
8
8
 
9
- Each js process must have `js:file`, `js:function` and `js:mapping` objects.
9
+ Each js process must have `js:file`, `js:function` and `js:mapping` objects.
10
10
 
11
11
  - `js:file` points to the location of the main javascript file, containing the function.
12
12
  - `js:location` points to the starting location for `js:file` relative from the current file.
13
13
  - `js:function` points to the function name in the file.
14
14
  - `js:mapping` is a `fno:Mapping` object that links properties to function arguments.
15
15
 
16
-
17
- When you declare a new js process, it is required to add a shacl shape.
16
+ When you declare a new js process, it is required to add a SHACL shape.
18
17
  Each `sh:property` is accounted for, noting the type `sh:class` or `sh:datatype`.
19
18
 
20
19
  Example definitions are available in `processor/configs/*.ttl`.
21
20
 
22
-
23
21
  ## Pipeline configuration
24
22
 
25
- In a js pipeline you can use all declared js processes, as defined in their shacl shapes.
23
+ In a js pipeline you can use all declared js processes, as defined in their SHACL shapes.
26
24
 
27
25
  An example can be found in `input.ttl`, here a `js:Send` process and a `js:Resc` process are defined.
28
26
  `js:Send` takes in a message to send, and a channel to send it to.
@@ -30,13 +28,13 @@ An example can be found in `input.ttl`, here a `js:Send` process and a `js:Resc`
30
28
 
31
29
  (implementation can be found in `procossor/test.js`)
32
30
 
33
- Note: currently websockets are configured, but changing the configuration to use the JsReaderChannel and JsWriterChannel will work too, even without a serialization step.
31
+ Note: currently Websockets are configured, but changing the configuration to use the JsReaderChannel and JsWriterChannel will work too, even without a serialization step.
34
32
 
35
33
  You can execute this pipeline with
34
+
36
35
  ```bash
37
- $ tsc
38
- $ bun bin/js-runner.js input.ttl
36
+ tsc
37
+ bun bin/js-runner.js input.ttl
39
38
  ```
40
39
 
41
- This example input configuration file uses `owl:imports` to specify additional configuration files.
42
-
40
+ This example input configuration file uses `owl:imports` to specify additional configuration files.