Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8243be4
Showing
16 changed files
with
10,300 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.DS_Store | ||
*.iml | ||
.idea | ||
.idea/** | ||
report.**.json | ||
|
||
# Ignore yarn error logs | ||
**/yarn-error.log | ||
|
||
# Ignore js files | ||
**/src/**/*.js | ||
**/src/**/*.js.map | ||
|
||
# Node modules | ||
**/node_modules | ||
|
||
# Work folders | ||
**/lib | ||
**/dist | ||
|
||
# Yarn | ||
.yarn | ||
.yarn-cache/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Execution Engine | ||
|
||
Execution Engine is a TypeScript library that enables tracing and visualization of code execution workflows in projects with multiple successive and embedded TypeScript modules. Gain insights into the dynamic sequence of code execution by capturing detailed traces in JSON format, easily parseable into graphs. | ||
|
||
## Features ✨ | ||
|
||
- **Code Tracing:** Trace the execution flow of TypeScript code in your project. | ||
- **Visualization:** Generate JSON traces for clear visualization of code execution paths. | ||
- **Versatile Integration:** Seamless integration with projects using TypeScript. | ||
|
||
## Installation 📦 | ||
|
||
```bash | ||
npm install execution-engine | ||
``` | ||
|
||
## Usage 📚 | ||
|
||
```typescript | ||
import { ExecutionEngine } from 'execution-engine'; | ||
|
||
const engine = new ExecutionEngine(); | ||
|
||
// for sync functions: | ||
const result1 = engine.run((param1) => someResult, [param1Value]); | ||
const function1Output = result1.outputs // The output value returned by the function. | ||
|
||
// for async functions: | ||
const result2 = await engine.run(async (param2) => someResult, [param2Value]); | ||
const function2Output = result2.outputs // The output value returned by the function. | ||
|
||
//Access the trace information: | ||
const trace = engine.getTrace(); | ||
console.log('Trace:', trace); | ||
``` | ||
|
||
# Contributing 🤝 | ||
If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request. Contributions are welcome! | ||
|
||
# License 📄 | ||
This project is licensed under the MIT License - see the LICENSE file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module.exports = { | ||
roots: ['<rootDir>/src'], | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest', | ||
}, | ||
testRegex: '(//.*|(\\.|/)(test|spec))\\.tsx?$', | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], | ||
modulePaths: ['<rootDir>/dist'], | ||
// collectCoverage: true, | ||
// coverageDirectory: 'reports', | ||
// coverageReporters: [['lcov', { projectRoot: '../../' }]], | ||
// testResultsProcessor: 'jest-sonar-reporter', | ||
// reporters: [ | ||
// 'default', | ||
// [ | ||
// '../../node_modules/jest-html-reporter', | ||
// { | ||
// pageTitle: 'Test Report', | ||
// includeFailureMsg: true, | ||
// includeConsoleLog: true, | ||
// }, | ||
// ], | ||
// ], | ||
}; |
Oops, something went wrong.