Skip to content

Commit

Permalink
Merge pull request #115 from vigneshshettyin/clickhouse-apis
Browse files Browse the repository at this point in the history
Created Clickhouse APIs, with Worker re-write in ts
  • Loading branch information
VijeshVS authored Jun 9, 2024
2 parents 01b606f + 4d22c84 commit 38fda63
Show file tree
Hide file tree
Showing 42 changed files with 7,287 additions and 749 deletions.
15 changes: 15 additions & 0 deletions kafka-clickhouse/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

[*.{js,json,ts,mts,yml,yaml}]
indent_size = 2
indent_style = space
1 change: 1 addition & 0 deletions kafka-clickhouse/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/**/*.js
27 changes: 27 additions & 0 deletions kafka-clickhouse/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"env": {
"browser": false,
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module",
"ecmaVersion": 2020
},
"plugins": ["@typescript-eslint", "jest"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"prettier"
],
"rules": {
// The following rule is enabled only to supplement the inline suppression
// examples, and because it is not a recommended rule, you should either
// disable it, or understand what it enforces.
// https://typescript-eslint.io/rules/explicit-function-return-type/
"@typescript-eslint/explicit-function-return-type": "warn"
}
}
29 changes: 29 additions & 0 deletions kafka-clickhouse/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Logs
logs
*.log
npm-debug.log*

# Dependencies
node_modules/

# Coverage
coverage

# Transpiled files
build/

# VS Code
.vscode
!.vscode/tasks.js

# JetBrains IDEs
.idea/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Misc
.DS_Store
12 changes: 12 additions & 0 deletions kafka-clickhouse/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"singleQuote": true,
"trailingComma": "all",
"overrides": [
{
"files": ["*.ts", "*.mts"],
"options": {
"parser": "typescript"
}
}
]
}
File renamed without changes.
3 changes: 3 additions & 0 deletions kafka/.env.example → kafka-clickhouse/example.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
KAFKA_BROKER=localhost:9092
PORT=3001
SECRET_KEY=SECRET_KEY
CLICKHOUSE_URL=http://default:@localhost:8123/eurl_data
KAFKA_USER=default
KAFKA_PASSWORD=default
KAFKAJS_NO_PARTITIONER_WARNING=1
Expand Down
18 changes: 18 additions & 0 deletions kafka-clickhouse/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default {
testEnvironment: 'node',
preset: 'ts-jest/presets/default-esm',
transform: {
'^.+\\.m?[tj]s?$': ['ts-jest', { useESM: true }],
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.(m)?js$': '$1',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(m)?ts$',
coverageDirectory: 'coverage',
collectCoverageFrom: [
'src/**/*.ts',
'src/**/*.mts',
'!src/**/*.d.ts',
'!src/**/*.d.mts',
],
};
Loading

0 comments on commit 38fda63

Please sign in to comment.