@rdfc/js-runner 1.0.0 → 2.0.0-alpha.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.
Files changed (79) hide show
  1. package/.husky/pre-commit +6 -0
  2. package/.prettierrc +4 -0
  3. package/README.md +3 -38
  4. package/__tests__/channels.test.ts +133 -0
  5. package/bin/runner.js +8 -0
  6. package/eslint.config.mjs +21 -0
  7. package/examples/echo/package-lock.json +80 -0
  8. package/examples/echo/package.json +18 -0
  9. package/examples/echo/pipeline.ttl +30 -0
  10. package/examples/echo/processors.ttl +84 -0
  11. package/examples/echo/src/processors.ts +75 -0
  12. package/examples/echo/test.ttl +14 -0
  13. package/examples/echo/tsconfig.json +114 -0
  14. package/examples/echo/untitled:/types/MyType.ttl +0 -0
  15. package/index.ttl +63 -0
  16. package/jest.config.js +2 -0
  17. package/lib/client.d.ts +1 -0
  18. package/lib/client.js +43 -0
  19. package/lib/convertor.d.ts +9 -0
  20. package/lib/convertor.js +51 -0
  21. package/lib/index.d.ts +4 -0
  22. package/lib/index.js +5 -0
  23. package/lib/jsonld.d.ts +17 -0
  24. package/lib/jsonld.js +134 -0
  25. package/lib/logger.d.ts +15 -0
  26. package/lib/logger.js +27 -0
  27. package/lib/processor.d.ts +19 -0
  28. package/lib/processor.js +13 -0
  29. package/lib/reader.d.ts +29 -0
  30. package/lib/reader.js +110 -0
  31. package/lib/runner.d.ts +25 -0
  32. package/lib/runner.js +111 -0
  33. package/lib/tsconfig.tsbuildinfo +1 -0
  34. package/lib/util_processors.d.ts +11 -0
  35. package/lib/util_processors.js +13 -0
  36. package/lib/writer.d.ts +25 -0
  37. package/lib/writer.js +57 -0
  38. package/package.json +49 -51
  39. package/src/client.ts +52 -0
  40. package/src/convertor.ts +59 -0
  41. package/src/index.ts +4 -0
  42. package/src/jsonld.ts +217 -0
  43. package/src/logger.ts +38 -0
  44. package/src/processor.ts +39 -0
  45. package/src/reader.ts +148 -0
  46. package/src/runner.ts +186 -0
  47. package/src/util_processors.ts +20 -0
  48. package/src/writer.ts +89 -0
  49. package/tsconfig.json +33 -0
  50. package/vite.config.ts +10 -0
  51. package/LICENSE +0 -21
  52. package/bin/js-runner.js +0 -4
  53. package/channels/file.ttl +0 -37
  54. package/channels/http.ttl +0 -59
  55. package/channels/kafka.ttl +0 -98
  56. package/channels/ws.ttl +0 -33
  57. package/dist/args.d.ts +0 -4
  58. package/dist/args.js +0 -59
  59. package/dist/connectors/file.d.ts +0 -15
  60. package/dist/connectors/file.js +0 -89
  61. package/dist/connectors/http.d.ts +0 -14
  62. package/dist/connectors/http.js +0 -82
  63. package/dist/connectors/kafka.d.ts +0 -48
  64. package/dist/connectors/kafka.js +0 -64
  65. package/dist/connectors/ws.d.ts +0 -10
  66. package/dist/connectors/ws.js +0 -69
  67. package/dist/connectors.d.ts +0 -54
  68. package/dist/connectors.js +0 -145
  69. package/dist/index.cjs +0 -677
  70. package/dist/index.d.ts +0 -33
  71. package/dist/index.js +0 -74
  72. package/dist/tsconfig.tsbuildinfo +0 -1
  73. package/dist/util.d.ts +0 -43
  74. package/dist/util.js +0 -75
  75. package/ontology.ttl +0 -169
  76. package/processor/echo.ttl +0 -38
  77. package/processor/resc.ttl +0 -34
  78. package/processor/send.ttl +0 -40
  79. package/processor/test.js +0 -35
@@ -0,0 +1,6 @@
1
+ echo Husky format!
2
+ npm run format
3
+ echo Husky Lint!
4
+ npm run lint
5
+ echo Husky Test!
6
+ npm test
package/.prettierrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "singleQuote": true,
3
+ "semi": false
4
+ }
package/README.md CHANGED
@@ -1,40 +1,5 @@
1
- # Js-runner
1
+ # RDFC-2 Javascript runner
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)
3
+ Communitcates with the rdfc orchestrator though grpc.
4
4
 
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
-
7
- ## Process definition
8
-
9
- Each js process must have `js:file`, `js:function` and `js:mapping` objects.
10
-
11
- - `js:file` points to the location of the main javascript file, containing the function.
12
- - `js:location` points to the starting location for `js:file` relative from the current file.
13
- - `js:function` points to the function name in the file.
14
- - `js:mapping` is a `fno:Mapping` object that links properties to function arguments.
15
-
16
- When you declare a new js process, it is required to add a SHACL shape.
17
- Each `sh:property` is accounted for, noting the type `sh:class` or `sh:datatype`.
18
-
19
- Example definitions are available in `processor/configs/*.ttl`.
20
-
21
- ## Pipeline configuration
22
-
23
- In a js pipeline you can use all declared js processes, as defined in their SHACL shapes.
24
-
25
- An example can be found in `input.ttl`, here a `js:Send` process and a `js:Resc` process are defined.
26
- `js:Send` takes in a message to send, and a channel to send it to.
27
- `js:Resc` only takes a channel to read from.
28
-
29
- (implementation can be found in `procossor/test.js`)
30
-
31
- Note: currently Websockets are configured, but changing the configuration to use the JsReaderChannel and JsWriterChannel will work too, even without a serialization step.
32
-
33
- You can execute this pipeline with
34
-
35
- ```bash
36
- tsc
37
- npx bin/js-runner.js input.ttl
38
- ```
39
-
40
- This example input configuration file uses `owl:imports` to specify additional configuration files.
5
+ Take a look at the example pipeline at `./examples/echo/` for example processors and an example pipeline.
@@ -0,0 +1,133 @@
1
+ import { describe, expect, test } from 'vitest'
2
+ import { DataChunk, RunnerClient } from '@rdfc/proto'
3
+ import { ClientReadableStream } from '@grpc/grpc-js'
4
+ import * as grpc from '@grpc/grpc-js'
5
+ import { ReaderInstance } from '../src/reader'
6
+ import { createLogger } from 'winston'
7
+ import winston from 'winston/lib/winston/transports'
8
+ import { ClientReadableStreamImpl } from '@grpc/grpc-js/build/src/call'
9
+
10
+ const encoder = new TextEncoder()
11
+ class TestClient extends RunnerClient {
12
+ next: (stream: ClientReadableStream<DataChunk>) => unknown
13
+
14
+ constructor() {
15
+ super('localhost:5400', grpc.credentials.createInsecure())
16
+ }
17
+
18
+ nextStream(): Promise<ClientReadableStream<DataChunk>> {
19
+ return new Promise((res) => (this.next = res))
20
+ }
21
+
22
+ receiveStreamMessage(): ClientReadableStream<DataChunk> {
23
+ const stream = new ClientReadableStreamImpl<DataChunk>((data: Buffer) => {
24
+ console.log('Debug', data)
25
+ return { data }
26
+ })
27
+ this.next(stream)
28
+ return stream
29
+ }
30
+ }
31
+
32
+ async function one<T>(iter: AsyncIterable<T>): Promise<T | undefined> {
33
+ for await (const item of iter) {
34
+ return item
35
+ }
36
+ }
37
+
38
+ describe('Reader', async () => {
39
+ const client = new TestClient()
40
+ const uri = 'someUri'
41
+ const logger = createLogger({
42
+ transports: new winston.Console({ level: process.env['DEBUG'] && 'debug' }),
43
+ })
44
+
45
+ test('handles string', async () => {
46
+ const reader = new ReaderInstance(uri, client, logger)
47
+
48
+ const promise = one(reader.strings())
49
+ reader.handleMsg({ data: encoder.encode('Hello world'), channel: uri })
50
+ const out = await promise
51
+
52
+ expect(out).toEqual('Hello world')
53
+ })
54
+
55
+ test('handles closed string', async () => {
56
+ const reader = new ReaderInstance(uri, client, logger)
57
+
58
+ const promise = one(reader.strings())
59
+ reader.close()
60
+ const out = await promise
61
+
62
+ expect(out).toEqual(undefined)
63
+ })
64
+
65
+ test('handles strings', async () => {
66
+ const reader = new ReaderInstance(uri, client, logger)
67
+
68
+ const msgsPromise = (async () => {
69
+ const msgs: string[] = []
70
+ for await (const msg of reader.strings()) {
71
+ msgs.push(msg)
72
+ }
73
+ return msgs
74
+ })()
75
+ reader.handleMsg({ data: encoder.encode('Hello'), channel: uri })
76
+ reader.handleMsg({ data: encoder.encode('World'), channel: uri })
77
+ reader.close()
78
+
79
+ const msgs = await msgsPromise
80
+
81
+ expect(msgs).toEqual(['Hello', 'World'])
82
+ })
83
+
84
+ test('handles buffer', async () => {
85
+ const reader = new ReaderInstance(uri, client, logger)
86
+
87
+ const data = encoder.encode('Hello world')
88
+ const promise = one(reader.buffers())
89
+ reader.handleMsg({ data, channel: uri })
90
+ const out = await promise
91
+
92
+ expect(out).toEqual(data)
93
+ })
94
+
95
+ test('handles buffers', async () => {
96
+ const reader = new ReaderInstance(uri, client, logger)
97
+
98
+ const data = encoder.encode('Hello world')
99
+ const promise = one(reader.buffers())
100
+ reader.handleMsg({ data, channel: uri })
101
+ const out = await promise
102
+
103
+ expect(out).toEqual(data)
104
+ })
105
+
106
+ test('handles stream', async () => {
107
+ const reader = new ReaderInstance(uri, client, logger)
108
+
109
+ const nextStream = client.nextStream()
110
+ const promise = one(reader.streams())
111
+ reader.handleStreamingMessage({ id: { id: 5 }, channel: uri })
112
+ const stream = await nextStream
113
+
114
+ stream.push('Hello')
115
+ stream.push('World')
116
+ console.log(stream.eventNames())
117
+
118
+ const out = await promise
119
+ const msgsPromise = (async () => {
120
+ const msgs: Uint8Array[] = []
121
+ for await (const msg of out!) {
122
+ msgs.push(msg)
123
+ }
124
+ return msgs
125
+ })()
126
+
127
+ stream.emit('end')
128
+ stream.emit('close')
129
+
130
+ const msgs = await msgsPromise
131
+ console.log(msgs)
132
+ })
133
+ })
package/bin/runner.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { start } from '../lib/client.js'
4
+
5
+ const host = process.argv[2]
6
+ const uri = process.argv[3]
7
+
8
+ start(host, uri)
@@ -0,0 +1,21 @@
1
+ import globals from 'globals'
2
+ import pluginJs from '@eslint/js'
3
+ import tseslint from 'typescript-eslint'
4
+
5
+ /** @type {import('eslint').Linter.Config[]} */
6
+ export default [
7
+ {
8
+ files: ['src/**/*.{js,mjs,cjs,ts}'],
9
+ },
10
+ { languageOptions: { globals: globals.browser } },
11
+ pluginJs.configs.recommended,
12
+ ...tseslint.configs.recommended,
13
+ {
14
+ ignores: ['src/generated/', '**/lib/', 'coverage/'],
15
+ },
16
+ {
17
+ languageOptions: {
18
+ globals: { process: 'readable' },
19
+ },
20
+ },
21
+ ]
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "echo",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "echo",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "@rdfc/js-runner": "file:../.."
13
+ },
14
+ "devDependencies": {
15
+ "typescript": "^5.8.2"
16
+ }
17
+ },
18
+ "../..": {
19
+ "name": "@rdfc/js-runner",
20
+ "version": "1.0.0",
21
+ "license": "ISC",
22
+ "dependencies": {
23
+ "@grpc/grpc-js": "^1.12.6",
24
+ "@rdfc/proto": "^0.1.1",
25
+ "@treecg/types": "^0.4.6",
26
+ "jsonld": "^8.3.3",
27
+ "jsonld-streaming-parser": "^5.0.0",
28
+ "n3": "^1.23.1",
29
+ "rdf-lens": "^1.3.5",
30
+ "winston": "^3.17.0",
31
+ "winston-transport": "^4.9.0"
32
+ },
33
+ "bin": {
34
+ "js-runner": "bin/runner.js"
35
+ },
36
+ "devDependencies": {
37
+ "@eslint/js": "^9.21.0",
38
+ "@rdfjs/types": "^2.0.1",
39
+ "@types/jest": "^29.5.14",
40
+ "@types/jsonld": "^1.5.15",
41
+ "@types/n3": "^1.21.1",
42
+ "@types/node": "^22.13.5",
43
+ "@typescript-eslint/eslint-plugin": "^8.25.0",
44
+ "@typescript-eslint/parser": "^8.25.0",
45
+ "@vitest/coverage-v8": "^3.0.7",
46
+ "eslint": "^9.21.0",
47
+ "eslint-config-prettier": "^10.0.1",
48
+ "eslint-plugin-prettier": "^5.2.3",
49
+ "globals": "^16.0.0",
50
+ "husky": "^9.1.7",
51
+ "jest": "^29.7.0",
52
+ "lint-staged": "^15.4.3",
53
+ "prettier": "^3.5.2",
54
+ "ts-jest": "^29.2.6",
55
+ "tsc-alias": "^1.8.10",
56
+ "typescript": "^5.7.3",
57
+ "typescript-eslint": "^8.25.0",
58
+ "vitest": "^3.0.7"
59
+ }
60
+ },
61
+ "node_modules/@rdfc/js-runner": {
62
+ "resolved": "../..",
63
+ "link": true
64
+ },
65
+ "node_modules/typescript": {
66
+ "version": "5.8.2",
67
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
68
+ "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
69
+ "dev": true,
70
+ "license": "Apache-2.0",
71
+ "bin": {
72
+ "tsc": "bin/tsc",
73
+ "tsserver": "bin/tsserver"
74
+ },
75
+ "engines": {
76
+ "node": ">=14.17"
77
+ }
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "echo",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "build": "tsc"
7
+ },
8
+ "keywords": [],
9
+ "author": "",
10
+ "license": "ISC",
11
+ "description": "",
12
+ "dependencies": {
13
+ "@rdfc/js-runner": "file:../.."
14
+ },
15
+ "devDependencies": {
16
+ "typescript": "^5.8.2"
17
+ }
18
+ }
@@ -0,0 +1,30 @@
1
+ @prefix owl: <http://www.w3.org/2002/07/owl#>.
2
+ @prefix rdfc: <https://w3id.org/rdf-connect/ontology#>.
3
+
4
+ <> owl:imports <./processors.ttl>.
5
+ <> a rdfc:Pipeline;
6
+ rdfc:dependency <>;
7
+ rdfc:processor <sender>, <echo>, <log>, <test>;
8
+ rdfc:runner rdfc:JsRunner.
9
+
10
+ <1> a rdfc:Writer, rdfc:Reader.
11
+ <2> a rdfc:Writer, rdfc:Reader.
12
+ <sender> a rdfc:SendProcessor;
13
+ rdfc:writer <1>;
14
+ rdfc:msg "hallo", "world".
15
+
16
+ <echo> a rdfc:EchoProcessor;
17
+ rdfc:reader <1>;
18
+ rdfc:writer <2>.
19
+
20
+ <log> a rdfc:LogProcessor;
21
+ rdfc:reader <2>.
22
+
23
+ <test> a rdfc:Test;
24
+ rdfc:path ( <a> <b> );
25
+ rdfc:path "help";
26
+ rdfc:cbd [
27
+ a rdfc:Something;
28
+ rdfc:else [ a rdfc:SomethingElse ];
29
+ ].
30
+
@@ -0,0 +1,84 @@
1
+ @prefix owl: <http://www.w3.org/2002/07/owl#>.
2
+ @prefix ex: <http://example.org/>.
3
+ @prefix foaf: <http://xmlns.com/foaf/0.1/>.
4
+ @prefix rdfl: <https://w3id.org/rdf-lens/ontology#>.
5
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
6
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
7
+ @prefix sh: <http://www.w3.org/ns/shacl#>.
8
+ @prefix rdfc: <https://w3id.org/rdf-connect/ontology#>.
9
+
10
+ <> owl:imports <../../index.ttl>.
11
+
12
+ rdfc:Test a rdfc:JsProcessor;
13
+ rdfc:entrypoint <./>;
14
+ rdfc:file <./lib/processors.js>;
15
+ rdfc:class "TestProcessor".
16
+
17
+ [ ] a sh:NodeShape;
18
+ sh:targetClass rdfc:Test;
19
+ sh:property [
20
+ sh:path rdfc:path;
21
+ sh:name "path";
22
+ sh:class rdfl:Path;
23
+ ], [
24
+ sh:path rdfc:cbd;
25
+ sh:name "cbd";
26
+ sh:class rdfl:CBD;
27
+ ].
28
+
29
+
30
+ rdfc:EchoProcessor a rdfc:JsProcessor, owl:Class;
31
+ rdfc:entrypoint <./>;
32
+ rdfc:file <./lib/processors.js>;
33
+ rdfc:class "EchoProcessor".
34
+
35
+ [ ] a sh:NodeShape;
36
+ sh:targetClass rdfc:EchoProcessor;
37
+ sh:property [
38
+ sh:path rdfc:reader;
39
+ sh:name "reader";
40
+ sh:minCount 1;
41
+ sh:maxCount 1;
42
+ sh:class rdfc:Reader;
43
+ ], [
44
+ sh:path rdfc:writer;
45
+ sh:name "writer";
46
+ sh:minCount 1;
47
+ sh:maxCount 1;
48
+ sh:class rdfc:Writer;
49
+ ].
50
+
51
+ rdfc:LogProcessor a rdfc:JsProcessor;
52
+ rdfc:entrypoint <./>;
53
+ rdfc:file <./lib/processors.js>;
54
+ rdfc:class "LogProcessor".
55
+
56
+ [ ] a sh:NodeShape;
57
+ sh:targetClass rdfc:LogProcessor;
58
+ sh:property [
59
+ sh:path rdfc:reader;
60
+ sh:name "reader";
61
+ sh:minCount 1;
62
+ sh:maxCount 1;
63
+ sh:class rdfc:Reader;
64
+ ].
65
+
66
+ rdfc:SendProcessor a rdfc:JsProcessor;
67
+ rdfc:entrypoint <./>;
68
+ rdfc:file <./lib/processors.js>;
69
+ rdfc:class "SendProcessor".
70
+
71
+ [ ] a sh:NodeShape;
72
+ sh:targetClass rdfc:SendProcessor;
73
+ sh:property [
74
+ sh:path rdfc:writer;
75
+ sh:name "writer";
76
+ sh:minCount 1;
77
+ sh:maxCount 1;
78
+ sh:class rdfc:Writer;
79
+ ], [
80
+ sh:path rdfc:msg;
81
+ sh:name "msgs";
82
+ sh:datatype xsd:string;
83
+ ].
84
+
@@ -0,0 +1,75 @@
1
+ import { Processor, Reader, Writer } from '@rdfc/js-runner'
2
+
3
+ export class TestProcessor extends Processor<unknown> {
4
+ async init(this: this): Promise<void> {
5
+ this.logger.info(JSON.stringify(this.args, undefined, 2))
6
+ }
7
+ async transform(this: this): Promise<void> {}
8
+ async produce(this: this): Promise<void> {}
9
+ }
10
+
11
+ type EchoArgs = {
12
+ reader: Reader
13
+ writer: Writer
14
+ }
15
+
16
+ export class EchoProcessor extends Processor<EchoArgs> {
17
+ async init(this: this & EchoArgs): Promise<void> {
18
+ this.logger.info('Init echo processor')
19
+ }
20
+
21
+ async transform(this: EchoArgs & this): Promise<void> {
22
+ for await (const msg of this.reader.streams()) {
23
+ this.logger.info('Echoing message')
24
+ await this.writer.stream(msg)
25
+ }
26
+ await this.writer.close()
27
+ this.logger.info('closed')
28
+ }
29
+
30
+ async produce(this: this & EchoArgs): Promise<void> {
31
+ // nothing
32
+ }
33
+ }
34
+
35
+ type LogArgs = {
36
+ reader: Reader
37
+ writer: Writer
38
+ }
39
+
40
+ export class LogProcessor extends Processor<LogArgs> {
41
+ async init(): Promise<void> {
42
+ this.logger.info('Init log processor')
43
+ }
44
+
45
+ async transform(this: LogArgs & this): Promise<void> {
46
+ for await (const msg of this.args.reader.strings()) {
47
+ this.logger.info('Got msg' + msg)
48
+ }
49
+ }
50
+
51
+ async produce() {}
52
+ }
53
+
54
+ type SendArgs = {
55
+ msgs: string[]
56
+ writer: Writer
57
+ }
58
+
59
+ export class SendProcessor extends Processor<SendArgs> {
60
+ async init(): Promise<void> {
61
+ this.logger.info('Init send processor')
62
+ }
63
+
64
+ async transform(): Promise<void> {}
65
+ async produce(): Promise<void> {
66
+ for (const msg of this.get('msgs')) {
67
+ await this.get('writer').string(msg)
68
+
69
+ this.logger.info('Sending ' + msg)
70
+ await new Promise((res) => setTimeout(res, 1000))
71
+ }
72
+ await this.get('writer').close()
73
+ this.logger.info('Closed')
74
+ }
75
+ }
@@ -0,0 +1,14 @@
1
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
2
+ @prefix sh: <http://www.w3.org/ns/shacl#>.
3
+
4
+ [] a rdf:Seq;
5
+ rdf:first [].
6
+
7
+ <AnyJsProcessor> a sh:NodeShape;
8
+ sh:property [
9
+ sh:path sh:prop;
10
+ sh:node [ sh:property [
11
+ sh:path sh:prop;
12
+ ] ];
13
+ ].
14
+
@@ -0,0 +1,114 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
17
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
+
27
+ /* Modules */
28
+ "module": "commonjs" /* Specify what module code is generated. */,
29
+ // "rootDir": "./", /* Specify the root folder within your source files. */
30
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
31
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
39
+ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
40
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
41
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
42
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
43
+ // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
44
+ // "resolveJsonModule": true, /* Enable importing .json files. */
45
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
46
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
47
+
48
+ /* JavaScript Support */
49
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
50
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
51
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
52
+
53
+ /* Emit */
54
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
55
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
56
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
57
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
58
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
59
+ // "noEmit": true, /* Disable emitting files from a compilation. */
60
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
61
+ // "outDir": "./", /* Specify an output folder for all emitted files. */
62
+ // "removeComments": true, /* Disable emitting comments. */
63
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
64
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
65
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
66
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
67
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
68
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
69
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
70
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
71
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
72
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
73
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
74
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
75
+
76
+ /* Interop Constraints */
77
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
78
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
79
+ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
80
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
81
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
82
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
83
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
84
+
85
+ /* Type Checking */
86
+ "strict": true /* Enable all strict type-checking options. */,
87
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
88
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
89
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
90
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
91
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
92
+ // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
93
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
94
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
95
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
96
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
97
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
98
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
99
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
100
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
101
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
102
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
103
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
104
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
105
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
106
+
107
+ /* Completeness */
108
+
109
+ "outDir": "lib/",
110
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
111
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
112
+ },
113
+ "include": ["src/**/*"]
114
+ }
File without changes