Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created Clickhouse APIs, with Worker re-write in ts #115

Merged
merged 3 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading