@rdfc/js-runner 3.0.2 → 3.0.3

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 (47) hide show
  1. package/README.md +4 -0
  2. package/__tests__/echoProcessor.test.ts +11 -12
  3. package/bun.lock +820 -0
  4. package/lib/logger.d.ts +1 -0
  5. package/lib/logger.js +19 -9
  6. package/lib/reader.js +1 -1
  7. package/lib/runner.js +1 -1
  8. package/lib/testUtils/duplex.js +1 -1
  9. package/lib/testUtils/index.d.ts +9 -9
  10. package/lib/testUtils/index.js +9 -9
  11. package/lib/tsconfig.tsbuildinfo +1 -1
  12. package/package.json +15 -14
  13. package/src/logger.ts +15 -7
  14. package/src/reader.ts +8 -8
  15. package/src/runner.ts +3 -1
  16. package/src/testUtils/duplex.ts +1 -4
  17. package/src/testUtils/index.ts +25 -21
  18. package/.idea/LNKD.tech Editor.xml +0 -194
  19. package/.idea/codeStyles/Project.xml +0 -52
  20. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  21. package/.idea/copilot.data.migration.agent.xml +0 -6
  22. package/.idea/copilot.data.migration.ask.xml +0 -6
  23. package/.idea/copilot.data.migration.ask2agent.xml +0 -6
  24. package/.idea/copilot.data.migration.edit.xml +0 -6
  25. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  26. package/.idea/js-runner.iml +0 -12
  27. package/.idea/modules.xml +0 -8
  28. package/.idea/vcs.xml +0 -6
  29. package/dist/args.d.ts +0 -4
  30. package/dist/args.js +0 -58
  31. package/dist/connectors/file.d.ts +0 -15
  32. package/dist/connectors/file.js +0 -89
  33. package/dist/connectors/http.d.ts +0 -14
  34. package/dist/connectors/http.js +0 -82
  35. package/dist/connectors/kafka.d.ts +0 -48
  36. package/dist/connectors/kafka.js +0 -68
  37. package/dist/connectors/ws.d.ts +0 -10
  38. package/dist/connectors/ws.js +0 -72
  39. package/dist/connectors.d.ts +0 -73
  40. package/dist/connectors.js +0 -168
  41. package/dist/index.cjs +0 -732
  42. package/dist/index.d.ts +0 -42
  43. package/dist/index.js +0 -83
  44. package/dist/tsconfig.tsbuildinfo +0 -1
  45. package/dist/util.d.ts +0 -71
  46. package/dist/util.js +0 -92
  47. package/jest.config.js +0 -2
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # JavaScript runner for RDF-Connect
2
2
 
3
+ [![Build and tests with Node.js](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
+
5
+ This package provides a JavaScript runner implementation for RDF-Connect, which allows you to run JavaScript/TypeScript processors in your [RDF-Connect](https://github.com/rdf-connect/rdf-connect) pipeline.
6
+
3
7
  ## Usage
4
8
 
5
9
  To use the JavaScript (Node or Bun) runner for RDF-Connect, you need to have a pipeline configuration that includes JavaScript/TypeScript processors.
@@ -70,12 +70,11 @@ describe('EchoProcessor', () => {
70
70
 
71
71
  const msgs: string[] = []
72
72
 
73
- ; (async () => {
74
- for await (const m of outputReader.strings()) {
75
- msgs.push(m)
76
- }
77
- })()
78
-
73
+ ;(async () => {
74
+ for await (const m of outputReader.strings()) {
75
+ msgs.push(m)
76
+ }
77
+ })()
79
78
 
80
79
  await inputWriter.string('Hello')
81
80
  expect(msgs).toEqual(['Hello'])
@@ -107,13 +106,13 @@ describe('EchoProcessor', () => {
107
106
 
108
107
  const msgs: string[] = []
109
108
 
110
- ; (async () => {
111
- for await (const m of outputReader.strings()) {
112
- msgs.push(m)
113
- }
114
- })()
109
+ ;(async () => {
110
+ for await (const m of outputReader.strings()) {
111
+ msgs.push(m)
112
+ }
113
+ })()
115
114
 
116
- const gen = async function*() {
115
+ const gen = async function* () {
117
116
  yield encoder.encode('Hello')
118
117
  yield encoder.encode('World')
119
118
  }