Skip to content

Commit

Permalink
fix: event memory (#353)
Browse files Browse the repository at this point in the history
* refactor: event manager

* chore(deps): upgrading several dependencies

* fix: unit test

* fix: import path

* revert: shareDbService `onSubmit`

---------

Co-authored-by: pengap <[email protected]>
  • Loading branch information
Pengap and Pengap authored Jan 30, 2024
1 parent 8e11700 commit 98143c0
Show file tree
Hide file tree
Showing 70 changed files with 3,273 additions and 2,976 deletions.
30 changes: 14 additions & 16 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# All node_modules directories
node_modules
**/node_modules
**/dist
**/.next

Expand All @@ -10,35 +9,31 @@ node_modules

# By default all git files
.git
.gitignore
**/.gitignore
.gitattributes
.github

# Tools caches
.cache/*
**.tsbuildinfo
.cache
**/*.tsbuildinfo
**/.eslintcache

# Used when building with nextjs (next-eslint)
!.eslintrc.base.json
!.prettierignore
!.prettierrc.js
!.eslintignore
# eslint
**/.eslintrc.cjs
**/lint-staged.config.js

# npm
!.npmrc

# Docker related
.dockerignore
Dockerfile
Dockerfile.*
docker-compose.yml
docker-compose.*.yml
dockers/**
dockers
*Dockerfile*
*docker-compose*

# Log files
logs
*.log
**/*.log

# Temp files
tmp
Expand All @@ -49,6 +44,9 @@ tmp
.vscode

# other
**/db
**/.assets
**/.temporary
**.DS_Store
*.md
docs
**/*.md
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0);
}
const husky = (await import('husky')).default;
console.log(husky());
7 changes: 6 additions & 1 deletion apps/nestjs-backend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ module.exports = {
// optional overrides per project
},
overrides: [
// optional overrides per project file match
{
files: ['src/event-emitter/events/**/*.event.ts'],
rules: {
'@typescript-eslint/naming-convention': 'off',
},
},
],
};
16 changes: 0 additions & 16 deletions apps/nestjs-backend/ecosystem.config.js

This file was deleted.

59 changes: 30 additions & 29 deletions apps/nestjs-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
"flamegraph-home": "npx 0x --output-dir './.debug/flamegraph/{pid}.0x' --on-port 'autocannon http://localhost:$PORT --duration 20' -- node ../../node_modules/.bin/next start"
},
"devDependencies": {
"@faker-js/faker": "8.3.1",
"@faker-js/faker": "8.4.0",
"@nestjs/cli": "10.3.0",
"@nestjs/testing": "10.3.0",
"@nestjs/testing": "10.3.1",
"@teable-group/eslint-config-bases": "workspace:^",
"@types/bcrypt": "5.0.2",
"@types/cookie": "0.6.0",
Expand All @@ -65,11 +65,11 @@
"@types/mime-types": "2.1.4",
"@types/ms": "0.7.34",
"@types/multer": "1.4.11",
"@types/node": "18.18.2",
"@types/node": "18.19.0",
"@types/node-fetch": "2.6.11",
"@types/nodemailer": "6.4.14",
"@types/passport": "1.0.16",
"@types/passport-jwt": "4.0.0",
"@types/passport-jwt": "4.0.1",
"@types/passport-local": "1.0.38",
"@types/pause": "0.1.3",
"@types/sharedb": "3.3.9",
Expand All @@ -82,7 +82,7 @@
"eslint": "8.56.0",
"eslint-config-next": "13.0.2",
"get-tsconfig": "4.7.2",
"npm-run-all": "4.1.5",
"npm-run-all2": "6.1.1",
"prettier": "3.2.4",
"rimraf": "5.0.5",
"symlink-dir": "5.2.1",
Expand All @@ -92,34 +92,34 @@
"typescript": "5.3.3",
"unplugin-swc": "1.4.4",
"vite-tsconfig-paths": "4.3.1",
"vitest": "1.2.1",
"vitest": "1.2.2",
"vitest-mock-extended": "1.3.1",
"webpack": "5.89.0"
"webpack": "5.90.0"
},
"dependencies": {
"@keyv/sqlite": "3.6.6",
"@keyv/sqlite": "3.6.7",
"@nestjs-modules/mailer": "1.10.3",
"@nestjs/axios": "3.0.1",
"@nestjs/common": "10.3.0",
"@nestjs/common": "10.3.1",
"@nestjs/config": "3.1.1",
"@nestjs/core": "10.3.0",
"@nestjs/core": "10.3.1",
"@nestjs/event-emitter": "2.0.3",
"@nestjs/jwt": "10.2.0",
"@nestjs/passport": "10.0.3",
"@nestjs/platform-express": "10.3.0",
"@nestjs/platform-ws": "10.3.0",
"@nestjs/platform-express": "10.3.1",
"@nestjs/platform-ws": "10.3.1",
"@nestjs/swagger": "7.2.0",
"@nestjs/terminus": "10.2.0",
"@nestjs/websockets": "10.3.0",
"@nestjs/terminus": "10.2.1",
"@nestjs/websockets": "10.3.1",
"@opentelemetry/api": "1.7.0",
"@opentelemetry/context-async-hooks": "1.20.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.47.0",
"@opentelemetry/instrumentation-express": "0.34.1",
"@opentelemetry/instrumentation-http": "0.47.0",
"@opentelemetry/instrumentation-pino": "0.34.5",
"@opentelemetry/resources": "1.20.0",
"@opentelemetry/sdk-node": "0.47.0",
"@opentelemetry/semantic-conventions": "1.20.0",
"@opentelemetry/context-async-hooks": "1.21.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.48.0",
"@opentelemetry/instrumentation-express": "0.35.0",
"@opentelemetry/instrumentation-http": "0.48.0",
"@opentelemetry/instrumentation-pino": "0.35.0",
"@opentelemetry/resources": "1.21.0",
"@opentelemetry/sdk-node": "0.48.0",
"@opentelemetry/semantic-conventions": "1.21.0",
"@prisma/client": "5.8.1",
"@prisma/instrumentation": "5.8.1",
"@teable-group/common-i18n": "workspace:^",
Expand All @@ -128,7 +128,7 @@
"@teable-group/openapi": "workspace:^",
"@teamwork/websocket-json-stream": "2.0.0",
"ajv": "8.12.0",
"axios": "1.6.5",
"axios": "1.6.7",
"bcrypt": "5.1.1",
"class-transformer": "0.5.1",
"class-validator": "0.14.1",
Expand All @@ -137,26 +137,26 @@
"cors": "2.8.5",
"dayjs": "1.11.10",
"express": "4.18.2",
"express-session": "1.17.3",
"express-session": "1.18.0",
"fs-extra": "11.2.0",
"handlebars": "4.7.8",
"helmet": "7.1.0",
"is-port-reachable": "3.1.0",
"joi": "17.12.0",
"joi": "17.12.1",
"json-rules-engine": "6.5.0",
"jsonpath-plus": "7.2.0",
"keyv": "4.5.4",
"knex": "3.0.1",
"knex": "3.1.0",
"lodash": "4.17.21",
"markdown-it": "14.0.0",
"markdown-it-sanitizer": "0.4.3",
"mime-types": "2.1.35",
"minio": "7.1.3",
"ms": "2.1.3",
"multer": "1.4.5-lts.1",
"nanoid": "3.3.6",
"nest-knexjs": "0.0.19",
"nestjs-cls": "3.6.0",
"nanoid": "3.3.7",
"nest-knexjs": "0.0.20",
"nestjs-cls": "4.0.2",
"nestjs-pino": "4.0.0",
"nestjs-redoc": "2.2.2",
"next": "13.0.2",
Expand All @@ -173,6 +173,7 @@
"sharedb": "4.1.2",
"sharp": "0.33.2",
"transliteration": "2.3.5",
"ts-pattern": "5.0.6",
"ws": "8.16.0",
"zod": "3.22.4",
"zod-validation-error": "3.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/naming-convention */
import { SetMetadata, UseInterceptors } from '@nestjs/common';
import type { Events } from '../events';
import { EventMiddleware } from '../interceptor/event.Interceptor';
import type { Events } from '../model';

type OrdinaryEventName = Extract<
Events,
Expand Down
Loading

0 comments on commit 98143c0

Please sign in to comment.