-
Notifications
You must be signed in to change notification settings - Fork 739
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
Showing
6 changed files
with
127 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,21 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
plugins: ['@typescript-eslint', 'prettier'], | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
}, | ||
env: { | ||
es6: true, | ||
node: true, | ||
}, | ||
rules: { | ||
'prettier/prettier': 'error', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
}, | ||
} |
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,3 @@ | ||
dist/ | ||
.eslintrc.cjs | ||
.prettierrc.cjs |
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,7 @@ | ||
module.exports = { | ||
singleQuote: true, | ||
arrowParens: 'always', | ||
printWidth: 100, | ||
trailingComma: 'all', | ||
semi: false, | ||
} |
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,47 @@ | ||
{ | ||
"name": "@crowd/merge-suggestions-worker", | ||
"version": "1.0.0", | ||
"private": true, | ||
"scripts": { | ||
"start": "CROWD_TEMPORAL_TASKQUEUE=merge-suggestions SERVICE=merge-suggestions-worker TS_NODE_TRANSPILE_ONLY=true node -r tsconfig-paths/register -r ts-node/register src/main.ts", | ||
"start:debug:local": "set -a && . ../../../backend/.env.dist.local && . ../../../backend/.env.override.local && set +a && CROWD_TEMPORAL_TASKQUEUE=merge-suggestions SERVICE=merge-suggestions-worker TS_NODE_TRANSPILE_ONLY=true LOG_LEVEL=trace node --inspect=0.0.0.0:9232 -r tsconfig-paths/register -r ts-node/register src/main.ts", | ||
"start:debug": "CROWD_TEMPORAL_TASKQUEUE=merge-suggestions SERVICE=merge-suggestions-worker TS_NODE_TRANSPILE_ONLY=true LOG_LEVEL=trace node --inspect=0.0.0.0:9232 -r tsconfig-paths/register -r ts-node/register src/main.ts", | ||
"dev:local": "./node_modules/.bin/nodemon --watch src --watch ../../libs --ext ts --exec pnpm run start:debug:local", | ||
"dev": "./node_modules/.bin/nodemon --watch src --watch ../../libs --ext ts --exec pnpm run start:debug", | ||
"lint": "./node_modules/.bin/eslint --ext .ts src --max-warnings=0", | ||
"format": "./node_modules/.bin/prettier --write \"src/**/*.ts\"", | ||
"format-check": "./node_modules/.bin/prettier --check .", | ||
"tsc-check": "./node_modules/.bin/tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@crowd/archetype-standard": "file:../../archetypes/standard", | ||
"@crowd/archetype-worker": "file:../../archetypes/worker", | ||
"@crowd/common": "file:../../libs/common", | ||
"@crowd/cubejs": "file:../../libs/cubejs", | ||
"@crowd/types": "file:../../libs/types", | ||
"@crowd/feature-flags": "file:../../libs/feature-flags", | ||
"@temporalio/activity": "~1.8.6", | ||
"@temporalio/client": "~1.8.6", | ||
"@temporalio/workflow": "~1.8.6", | ||
"axios": "~1.5.1", | ||
"fast-levenshtein": "^3.0.0", | ||
"html-to-text": "~9.0.5", | ||
"lodash": "~4.17.21", | ||
"moment": "~2.29.4", | ||
"ts-node": "^10.9.1", | ||
"tsconfig-paths": "^4.2.0", | ||
"typescript": "^5.2.2", | ||
"uuid": "~9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.8.2", | ||
"@types/uuid": "~9.0.6", | ||
"@typescript-eslint/eslint-plugin": "^6.7.4", | ||
"@typescript-eslint/parser": "^6.7.4", | ||
"eslint": "^8.50.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"nodemon": "^3.0.1", | ||
"prettier": "^3.0.3" | ||
} | ||
} |
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,31 @@ | ||
import { Config } from '@crowd/archetype-standard' | ||
import { ServiceWorker, Options } from '@crowd/archetype-worker' | ||
|
||
const config: Config = { | ||
envvars: [], | ||
producer: { | ||
enabled: false, | ||
}, | ||
temporal: { | ||
enabled: true, | ||
}, | ||
redis: { | ||
enabled: true, | ||
}, | ||
} | ||
|
||
const options: Options = { | ||
postgres: { | ||
enabled: true, | ||
}, | ||
opensearch: { | ||
enabled: false, | ||
}, | ||
} | ||
|
||
export const svc = new ServiceWorker(config, options) | ||
|
||
setImmediate(async () => { | ||
await svc.init() | ||
await svc.start() | ||
}) |
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,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2017", | ||
"module": "Node16", | ||
"lib": ["es6", "es7", "es2017", "es2017.object", "es2015.promise", "ES2021.String"], | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"moduleResolution": "node16", | ||
"experimentalDecorators": true, | ||
"esModuleInterop": true, | ||
"baseUrl": "./src", | ||
"paths": { | ||
"@crowd/*": ["../../../libs/*/src"], | ||
"@crowd/archetype-*": ["../../../archetypes/*/src"] | ||
} | ||
}, | ||
"include": ["src/**/*"] | ||
} |