@rdfc/js-runner 2.0.0-alpha.7 → 2.0.0-alpha.9

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.
Files changed (62) hide show
  1. package/.idea/LNKD.tech Editor.xml +194 -0
  2. package/.idea/codeStyles/Project.xml +52 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  5. package/.idea/js-runner.iml +12 -0
  6. package/{examples/echo/.idea → .idea}/modules.xml +1 -1
  7. package/.idea/vcs.xml +6 -0
  8. package/dist/args.d.ts +4 -0
  9. package/dist/args.js +58 -0
  10. package/dist/connectors/file.d.ts +15 -0
  11. package/dist/connectors/file.js +89 -0
  12. package/dist/connectors/http.d.ts +14 -0
  13. package/dist/connectors/http.js +82 -0
  14. package/dist/connectors/kafka.d.ts +48 -0
  15. package/dist/connectors/kafka.js +68 -0
  16. package/dist/connectors/ws.d.ts +10 -0
  17. package/dist/connectors/ws.js +72 -0
  18. package/dist/connectors.d.ts +73 -0
  19. package/dist/connectors.js +168 -0
  20. package/dist/index.cjs +732 -0
  21. package/dist/index.d.ts +42 -0
  22. package/dist/index.js +83 -0
  23. package/dist/tsconfig.tsbuildinfo +1 -0
  24. package/dist/util.d.ts +71 -0
  25. package/dist/util.js +92 -0
  26. package/examples/echo/src/processors.ts +29 -31
  27. package/lib/index.d.ts +2 -1
  28. package/lib/index.js +3 -2
  29. package/lib/jsonld.js +3 -2
  30. package/lib/logger.d.ts +3 -1
  31. package/lib/logger.js +23 -1
  32. package/lib/reader.js +8 -16
  33. package/lib/reexports.d.ts +2 -2
  34. package/lib/reexports.js +3 -3
  35. package/lib/runner.js +27 -16
  36. package/lib/testUtils.js +6 -4
  37. package/lib/tsconfig.tsbuildinfo +1 -1
  38. package/lib/util_processors.js +1 -1
  39. package/lib/writer.js +1 -1
  40. package/package.json +1 -1
  41. package/src/index.ts +2 -1
  42. package/src/jsonld.ts +4 -1
  43. package/src/logger.ts +27 -1
  44. package/src/reader.ts +124 -130
  45. package/src/reexports.ts +5 -2
  46. package/src/runner.ts +158 -143
  47. package/src/testUtils.ts +34 -25
  48. package/src/util_processors.ts +1 -1
  49. package/src/writer.ts +66 -66
  50. package/examples/echo/.idea/echo.iml +0 -9
  51. package/examples/echo/.idea/misc.xml +0 -6
  52. package/examples/echo/.idea/vcs.xml +0 -7
  53. package/examples/echo/.swls/config.json +0 -1
  54. package/examples/echo/index.ttl +0 -3
  55. package/examples/echo/minimal.ttl +0 -90
  56. package/examples/echo/shacl.ttl +0 -9
  57. package/examples/echo/shape.ttl +0 -1339
  58. package/examples/echo/test.ttl +0 -11
  59. package/examples/echo/untitled:/types/MyType.ttl +0 -0
  60. package/file:/home/silvius/Projects/mumo-pipeline/ldes/http_3A_2F_2Fdata.mumo.be_2Fstreams_2Fnodes_2Fdefault/root/index.trig +0 -3
  61. package/ldes/http_3A_2F_2Fdata.mumo.be_2Fstreams_2Fnodes_2Fdefault/root/index.trig +0 -3
  62. package/minimal.ttl +0 -99
@@ -1,11 +0,0 @@
1
- @prefix rdfc: <https://w3id.org/rdf-connect#>.
2
- @prefix foaf: <http://xmlns.com/foaf/0.1/>.
3
-
4
- [ ] foaf:knows [
5
- foaf:name "Arthur";
6
- foaf:img <img>;
7
- foaf:knows <me>;
8
- ];
9
- foaf:name "Arthur".
10
-
11
- <b> <c> <D>
File without changes
@@ -1,3 +0,0 @@
1
- <../../index.trig> a <https://w3id.org/ldes#EventStream>.
2
- <index.trig> a <https://w3id.org/tree#Node>;
3
- <http://purl.org/dc/terms/isPartOf> <../../index.trig>.
@@ -1,3 +0,0 @@
1
- <../../index.trig> a <https://w3id.org/ldes#EventStream>.
2
- <index.trig> a <https://w3id.org/tree#Node>;
3
- <http://purl.org/dc/terms/isPartOf> <../../index.trig>.
package/minimal.ttl DELETED
@@ -1,99 +0,0 @@
1
- @prefix prov: <http://www.w3.org/ns/prov#>.
2
- @prefix sds: <https://w3id.org/sds#>.
3
- @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
4
- @prefix owl: <http://www.w3.org/2002/07/owl#>.
5
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
6
- @prefix sh: <http://www.w3.org/ns/shacl#>.
7
- @prefix rdfc: <https://w3id.org/rdf-connect#>.
8
-
9
- ############################################################
10
- # General statements #
11
- ############################################################
12
- # sds:Activity is a prov:Activity
13
- sds:Activity rdfs:subClassOf prov:Activity.
14
-
15
- # rdfc:Processor too
16
- rdfc:Processor rdfs:subClassOf sds:Activity.
17
-
18
- # sds:implementationOf is subClassOf
19
- sds:implementationOf rdfs:subPropertyOf rdfs:subClassOf.
20
-
21
- ############################################################
22
- # Javascript statements #
23
- ############################################################
24
- # specialized for js too
25
- rdfc:jsImplementationOf rdfs:subPropertyOf sds:implementationOf.
26
-
27
- # A node runner, runs things that are rdfc:jsImplementationOf rdfc:Processor (aka, rdfs:subClassOf prov:Activity)
28
- rdfc:NodeRunner a rdfc:Runner;
29
- rdfc:handlesSubjectsOf rdfc:jsImplementationOf;
30
- rdfc:command "npx js-runner".
31
-
32
- # This shouldn't be necessary, should work with sh:targetSubjectsOf
33
- # rdfc:processor_definition <JsProcessorShape>.
34
- #
35
- # Shape that a Js Processor should fulfil;
36
- [ ] a sh:NodeShape;
37
- # This shouldn't be necessary,should work with sh:targetSubjectsOf and this isn't a real Class
38
- sh:targetClass <JsProcessorShape>;
39
- # We target it with jsImplementationOf
40
- sh:targetSubjectsOf rdfc:jsImplementationOf;
41
- sh:property [
42
- sh:path rdfc:entrypoint;
43
- sh:name "location";
44
- sh:minCount 1;
45
- sh:maxCount 1;
46
- sh:datatype xsd:iri;
47
- ], [
48
- sh:path rdfc:file;
49
- sh:name "file";
50
- sh:minCount 1;
51
- sh:maxCount 1;
52
- sh:datatype xsd:iri;
53
- ], [
54
- sh:path rdfc:class;
55
- sh:name "clazz";
56
- sh:maxCount 1;
57
- sh:datatype xsd:string;
58
- ].
59
-
60
- ############################################################
61
- # Processor statements #
62
- ############################################################
63
- rdfc:FooBarProcessor a owl:Class;
64
- rdfs:label "My Epic FooBar Processor";
65
- rdfs:description "FooBars everything!";
66
- rdfc:jsImplementationOf rdfc:Processor;
67
- rdfc:entrypoint <./>;
68
- rdfc:file <./lib/processors.js>;
69
- rdfc:class "FooBarProcessor".
70
-
71
- [ ] a sh:NodeShape;
72
- sh:targetClass rdfc:FooBarProcessor;
73
- sh:property [
74
- sh:path rdfc:reader;
75
- sh:name "reader";
76
- sh:minCount 1;
77
- sh:maxCount 1;
78
- sh:class rdfc:Reader;
79
- ], [
80
- sh:path rdfc:writer;
81
- sh:name "writer";
82
- sh:maxCount 1;
83
- sh:class rdfc:Writer;
84
- ].
85
-
86
- ############################################################
87
- # Pipeline statements #
88
- ############################################################
89
- <> a rdfc:Pipeline;
90
- rdfc:consistsOf [
91
- rdfc:instantiates rdfc:NodeRunner;
92
- rdfc:processor <foobar>;
93
- ].
94
-
95
- <incomingMessages> a rdfc:Reader, rdfc:Writer.
96
- <foobar> a rdfc:FooBarProcessor;
97
- rdfc:reader <incomingMessages>;
98
- rdfc:writer <incomingMessages>.
99
-