@maxdrellin/xenocline 0.0.4 → 0.0.6
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/dist/aggregator.js.map +1 -1
- package/dist/event/aggregator.js.map +1 -1
- package/dist/event/event.js.map +1 -1
- package/dist/event/node.js.map +1 -1
- package/dist/event/phase.js.map +1 -1
- package/dist/event/process.js.map +1 -1
- package/dist/event/transition.js.map +1 -1
- package/dist/execution/aggregator.js.map +1 -1
- package/dist/execution/event.js.map +1 -1
- package/dist/execution/next.js.map +1 -1
- package/dist/execution/node.js.map +1 -1
- package/dist/execution/phase.js.map +1 -1
- package/dist/execution/process.js.map +1 -1
- package/dist/input.js.map +1 -1
- package/dist/node/aggregatornode.js.map +1 -1
- package/dist/node/node.js.map +1 -1
- package/dist/node/phasenode.js.map +1 -1
- package/dist/phase.js.map +1 -1
- package/dist/process.js.map +1 -1
- package/dist/transition/beginning.js.map +1 -1
- package/dist/transition/connection.js.map +1 -1
- package/dist/transition/decision.js.map +1 -1
- package/dist/transition/next.js.map +1 -1
- package/dist/transition/termination.js.map +1 -1
- package/dist/transition/transition.js.map +1 -1
- package/dist/util/general.js.map +1 -1
- package/dist/utility/event/eventfilter.js.map +1 -1
- package/dist/utility/event/filteredhandler.js.map +1 -1
- package/dist/xenocline.cjs +0 -0
- package/dist/xenocline.cjs.map +1 -1
- package/package.json +32 -32
- package/scripts/pre-commit-hook.sh +52 -0
- package/.doccident-setup.mjs +0 -36
- package/.kodrdriv/config.yaml +0 -10
- package/.kodrdriv/context/content.md +0 -26
- package/__mocks__/src/execution/event.js +0 -8
- package/eslint.config.mjs +0 -82
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxdrellin/xenocline",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Xenocline provides a streamlined, modular framework to manage and execute Processor Pipelines—sequences of computational steps or tasks executed systematically to process data or events. It allows developers to define, connect, and orchestrate individual processors into efficient workflows, supporting clear separation of concerns, scalability, and ease of maintenance.",
|
|
5
5
|
"main": "dist/xenocline.cjs",
|
|
6
6
|
"module": "dist/xenocline.js",
|
|
@@ -19,6 +19,20 @@
|
|
|
19
19
|
"require": "./dist/xenocline.cjs"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "npm run lint && tsc --noEmit && vite build && copyfiles -u 1 \"src/**/*.md\" dist && copyfiles -u 1 \"src/**/*.yaml\" dist",
|
|
24
|
+
"start": "node dist/xenocline.cjs",
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"watch": "vite build --watch",
|
|
27
|
+
"test": "npm run test:coverage && npm run test:readme",
|
|
28
|
+
"test:coverage": "jest --coverage",
|
|
29
|
+
"test:readme": "doccident -c .doccident-setup.mjs README.md",
|
|
30
|
+
"lint": "eslint . --ext .ts",
|
|
31
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"precommit": "npm run build && npm run lint && npm run test",
|
|
34
|
+
"prepublishOnly": "npm run lint && npm run build && npm run test"
|
|
35
|
+
},
|
|
22
36
|
"keywords": [
|
|
23
37
|
"pipeline",
|
|
24
38
|
"execution",
|
|
@@ -30,42 +44,28 @@
|
|
|
30
44
|
"@doccident/doccident": "^0.0.1"
|
|
31
45
|
},
|
|
32
46
|
"devDependencies": {
|
|
33
|
-
"@babel/core": "^7.
|
|
47
|
+
"@babel/core": "^7.28.0",
|
|
34
48
|
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
|
|
35
|
-
"@babel/plugin-transform-typescript": "^7.
|
|
49
|
+
"@babel/plugin-transform-typescript": "^7.28.0",
|
|
36
50
|
"@babel/preset-typescript": "^7.27.1",
|
|
37
51
|
"@eslint/eslintrc": "^3.3.1",
|
|
38
|
-
"@eslint/js": "^9.
|
|
39
|
-
"@jest/globals": "^
|
|
52
|
+
"@eslint/js": "^9.30.1",
|
|
53
|
+
"@jest/globals": "^30.0.4",
|
|
40
54
|
"@rollup/plugin-replace": "^6.0.2",
|
|
41
|
-
"@swc/core": "^1.11
|
|
42
|
-
"@types/jest": "^
|
|
43
|
-
"@types/
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^8.33.0",
|
|
47
|
-
"@typescript-eslint/parser": "^8.33.0",
|
|
55
|
+
"@swc/core": "^1.12.11",
|
|
56
|
+
"@types/jest": "^30.0.0",
|
|
57
|
+
"@types/node": "^24.0.12",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^8.36.0",
|
|
59
|
+
"@typescript-eslint/parser": "^8.36.0",
|
|
48
60
|
"copyfiles": "^2.4.1",
|
|
49
|
-
"eslint": "^9.
|
|
50
|
-
"eslint-plugin-import": "^2.
|
|
51
|
-
"globals": "^16.
|
|
52
|
-
"jest": "^
|
|
53
|
-
"ts-jest": "^29.
|
|
61
|
+
"eslint": "^9.30.1",
|
|
62
|
+
"eslint-plugin-import": "^2.32.0",
|
|
63
|
+
"globals": "^16.3.0",
|
|
64
|
+
"jest": "^30.0.4",
|
|
65
|
+
"ts-jest": "^29.4.0",
|
|
54
66
|
"typescript": "^5.8.3",
|
|
55
|
-
"vite": "^
|
|
67
|
+
"vite": "^7.0.4",
|
|
56
68
|
"vite-plugin-dts": "^4.5.4",
|
|
57
|
-
"vite-plugin-node": "^
|
|
58
|
-
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"build": "vite build && copyfiles -u 1 \"src/**/*.md\" dist && copyfiles -u 1 \"src/**/*.yaml\" dist",
|
|
61
|
-
"start": "node dist/xenocline.cjs",
|
|
62
|
-
"dev": "vite",
|
|
63
|
-
"watch": "vite build --watch",
|
|
64
|
-
"test": "pnpm run test:coverage && pnpm run test:readme",
|
|
65
|
-
"test:coverage": "jest --coverage",
|
|
66
|
-
"test:readme": "doccident -c .doccident-setup.mjs README.md",
|
|
67
|
-
"lint": "eslint . --ext .ts",
|
|
68
|
-
"lint:fix": "eslint . --ext .ts --fix",
|
|
69
|
-
"clean": "rm -rf dist"
|
|
69
|
+
"vite-plugin-node": "^7.0.0"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Xenocline Pre-commit Hook
|
|
4
|
+
# Prevents committing package.json files that contain file: dependencies
|
|
5
|
+
#
|
|
6
|
+
# To install this hook:
|
|
7
|
+
# 1. Copy this file to .git/hooks/pre-commit
|
|
8
|
+
# 2. Make it executable: chmod +x .git/hooks/pre-commit
|
|
9
|
+
#
|
|
10
|
+
# Or run: npm run install-hooks (if you add this script to package.json)
|
|
11
|
+
|
|
12
|
+
echo "🔍 Checking for file: dependencies in staged package.json files..."
|
|
13
|
+
|
|
14
|
+
# Find all staged package.json files
|
|
15
|
+
staged_package_files=$(git diff --cached --name-only | grep "package\.json$")
|
|
16
|
+
|
|
17
|
+
if [ -z "$staged_package_files" ]; then
|
|
18
|
+
echo "✅ No package.json files staged for commit"
|
|
19
|
+
exit 0
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
found_file_deps=false
|
|
23
|
+
|
|
24
|
+
# Check each staged package.json file for file: dependencies
|
|
25
|
+
for file in $staged_package_files; do
|
|
26
|
+
if [ -f "$file" ]; then
|
|
27
|
+
# Look for "file:" dependencies in the staged version
|
|
28
|
+
if git show :$file | grep -q '"file:'; then
|
|
29
|
+
echo "❌ Found file: dependencies in $file:"
|
|
30
|
+
git show :$file | grep '"file:' | sed 's/^/ /'
|
|
31
|
+
found_file_deps=true
|
|
32
|
+
fi
|
|
33
|
+
fi
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
if $found_file_deps; then
|
|
37
|
+
echo ""
|
|
38
|
+
echo "🚫 COMMIT BLOCKED: Cannot commit package.json files with file: dependencies"
|
|
39
|
+
echo ""
|
|
40
|
+
echo "💡 To fix this:"
|
|
41
|
+
echo " 1. Remove file: dependencies from package.json"
|
|
42
|
+
echo " 2. Commit your changes"
|
|
43
|
+
echo ""
|
|
44
|
+
echo " Or to commit anyway (not recommended):"
|
|
45
|
+
echo " git commit --no-verify"
|
|
46
|
+
echo ""
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
echo "✅ No file: dependencies found in staged package.json files"
|
|
51
|
+
exit 0
|
|
52
|
+
|
package/.doccident-setup.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
import { transform } from '@babel/core';
|
|
3
|
-
// eslint-disable-next-line import/extensions
|
|
4
|
-
import * as Xenocline from './dist/xenocline.js';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
"globals": {
|
|
8
|
-
"exports": {
|
|
9
|
-
"Xenocline": Xenocline
|
|
10
|
-
},
|
|
11
|
-
"console": {
|
|
12
|
-
"log": console.log,
|
|
13
|
-
"error": console.error,
|
|
14
|
-
"warn": console.warn,
|
|
15
|
-
"info": console.info,
|
|
16
|
-
"debug": console.debug
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"require": {
|
|
20
|
-
'@maxdrellin/xenocline': Xenocline
|
|
21
|
-
},
|
|
22
|
-
transformCode: (code) => {
|
|
23
|
-
// transform the code using @bable/preset-typescript
|
|
24
|
-
const transformedCode = transform(code, {
|
|
25
|
-
filename: 'test.ts',
|
|
26
|
-
presets: ['@babel/preset-typescript'],
|
|
27
|
-
plugins: [
|
|
28
|
-
'@babel/plugin-transform-typescript',
|
|
29
|
-
'@babel/plugin-transform-modules-commonjs'
|
|
30
|
-
],
|
|
31
|
-
comments: true // Preserve comments
|
|
32
|
-
})?.code;
|
|
33
|
-
|
|
34
|
-
return transformedCode;
|
|
35
|
-
}
|
|
36
|
-
}
|
package/.kodrdriv/config.yaml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Xenocline, as a library focused on creating a system to execute a **Processor Pipeline**, can be described as follows:
|
|
2
|
-
|
|
3
|
-
**Xenocline** provides a streamlined, modular framework to manage and execute **Processor Pipelines**—sequences of computational steps or tasks executed systematically to process data or events. It allows developers to define, connect, and orchestrate individual processors into efficient workflows, supporting clear separation of concerns, scalability, and ease of maintenance.
|
|
4
|
-
|
|
5
|
-
### Core Concepts:
|
|
6
|
-
|
|
7
|
-
1. **Processor**:
|
|
8
|
-
Individual computational unit responsible for a specific, well-defined operation (e.g., parsing data, validating inputs, transforming records).
|
|
9
|
-
|
|
10
|
-
2. **Pipeline**:
|
|
11
|
-
A structured sequence or graph of processors, allowing data or events to flow through multiple processing stages seamlessly.
|
|
12
|
-
|
|
13
|
-
3. **Execution Engine**:
|
|
14
|
-
Manages the lifecycle of processors within a pipeline, coordinating initialization, execution order, concurrency, error handling, and resource management.
|
|
15
|
-
|
|
16
|
-
4. **Pipeline Definition**:
|
|
17
|
-
Clear, configurable declarations for how processors interact, ensuring pipelines are easy to define, understand, modify, and debug.
|
|
18
|
-
|
|
19
|
-
### Why Xenocline?
|
|
20
|
-
|
|
21
|
-
* **Modularity**: Easy plug-and-play processors to extend or modify pipeline behavior.
|
|
22
|
-
* **Robustness**: Handles complex execution scenarios with built-in error handling and resource management.
|
|
23
|
-
* **Scalability**: Designed for high performance, enabling parallel execution and efficient handling of large-scale processing.
|
|
24
|
-
* **Developer-friendly**: Clean, intuitive APIs for building and managing pipelines.
|
|
25
|
-
|
|
26
|
-
This architecture makes **Xenocline** ideal for applications like data transformation, event handling, ETL (Extract, Transform, Load) processes, middleware orchestration, and automation workflows—anywhere a structured pipeline execution model is advantageous.
|
package/eslint.config.mjs
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { defineConfig, globalIgnores } from "eslint/config";
|
|
2
|
-
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
3
|
-
import importPlugin from "eslint-plugin-import";
|
|
4
|
-
import globals from "globals";
|
|
5
|
-
import tsParser from "@typescript-eslint/parser";
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
import js from "@eslint/js";
|
|
9
|
-
import { FlatCompat } from "@eslint/eslintrc";
|
|
10
|
-
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = path.dirname(__filename);
|
|
13
|
-
const compat = new FlatCompat({
|
|
14
|
-
baseDirectory: __dirname,
|
|
15
|
-
recommendedConfig: js.configs.recommended,
|
|
16
|
-
allConfig: js.configs.all
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export default defineConfig([
|
|
20
|
-
globalIgnores([
|
|
21
|
-
"dist/**",
|
|
22
|
-
"node_modules/**",
|
|
23
|
-
"**/*.test.ts",
|
|
24
|
-
]),
|
|
25
|
-
{
|
|
26
|
-
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
|
|
27
|
-
|
|
28
|
-
plugins: {
|
|
29
|
-
"@typescript-eslint": typescriptEslint,
|
|
30
|
-
"import": importPlugin,
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
languageOptions: {
|
|
34
|
-
globals: {
|
|
35
|
-
...globals.node,
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
parser: tsParser,
|
|
39
|
-
ecmaVersion: "latest",
|
|
40
|
-
sourceType: "module",
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
rules: {
|
|
44
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
45
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
46
|
-
|
|
47
|
-
"@typescript-eslint/no-unused-vars": ["warn", {
|
|
48
|
-
argsIgnorePattern: "^_",
|
|
49
|
-
}],
|
|
50
|
-
|
|
51
|
-
indent: ["error", 4, {
|
|
52
|
-
SwitchCase: 1,
|
|
53
|
-
}],
|
|
54
|
-
|
|
55
|
-
"import/extensions": ["error", "never", {
|
|
56
|
-
ignorePackages: true,
|
|
57
|
-
pattern: {
|
|
58
|
-
"js": "never",
|
|
59
|
-
"ts": "never",
|
|
60
|
-
"d": "always"
|
|
61
|
-
}
|
|
62
|
-
}],
|
|
63
|
-
|
|
64
|
-
"import/no-extraneous-dependencies": ["error", {
|
|
65
|
-
devDependencies: true,
|
|
66
|
-
optionalDependencies: false,
|
|
67
|
-
peerDependencies: false,
|
|
68
|
-
}],
|
|
69
|
-
|
|
70
|
-
"no-console": ["error"],
|
|
71
|
-
|
|
72
|
-
"no-restricted-imports": ["error", {
|
|
73
|
-
paths: ["dayjs", "fs", "moment-timezone"],
|
|
74
|
-
patterns: [
|
|
75
|
-
{
|
|
76
|
-
group: ["src/**"],
|
|
77
|
-
message: "Use absolute imports instead of relative imports"
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}]
|
|
81
|
-
},
|
|
82
|
-
}]);
|