-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Move ddp-streamer micro service to its own sub-repo (#25246)
- Loading branch information
1 parent
b708948
commit 1b9a5f0
Showing
25 changed files
with
299 additions
and
73 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
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
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
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
apps/meteor/ee/server/services/ddp-streamer/streams/index.ts
This file was deleted.
Oops, something went wrong.
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
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,16 @@ | ||
{ | ||
"extends": ["@rocket.chat/eslint-config"], | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.spec.js", "**/*.spec.jsx"], | ||
"env": { | ||
"jest": true | ||
} | ||
} | ||
], | ||
"ignorePatterns": ["**/dist"], | ||
"plugins": ["jest"], | ||
"env": { | ||
"jest/globals": true | ||
} | ||
} |
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,32 @@ | ||
FROM node:14.18.3-alpine | ||
|
||
ARG SERVICE | ||
|
||
WORKDIR /app | ||
|
||
COPY ./packages/core-typings/package.json packages/core-typings/package.json | ||
COPY ./packages/core-typings/dist packages/core-typings/dist | ||
COPY ./packages/rest-typings/package.json packages/rest-typings/package.json | ||
COPY ./packages/rest-typings/dist packages/rest-typings/dist | ||
COPY ./packages/ui-contexts/package.json packages/ui-contexts/package.json | ||
COPY ./packages/ui-contexts/dist packages/ui-contexts/dist | ||
|
||
COPY ./ee/apps/${SERVICE}/dist . | ||
|
||
COPY ./package.json . | ||
COPY ./yarn.lock . | ||
COPY ./.yarnrc.yml . | ||
COPY ./.yarn/plugins .yarn/plugins | ||
COPY ./.yarn/releases .yarn/releases | ||
COPY ./ee/apps/${SERVICE}/package.json ee/apps/${SERVICE}/package.json | ||
|
||
ENV NODE_ENV=production \ | ||
PORT=3000 | ||
|
||
WORKDIR /app/ee/apps/${SERVICE} | ||
|
||
RUN yarn workspaces focus --production | ||
|
||
EXPOSE 3000 9458 | ||
|
||
CMD ["node", "src/service.js"] |
File renamed without changes.
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,50 @@ | ||
{ | ||
"name": "@rocket.chat/ddp-streamer", | ||
"private": true, | ||
"version": "0.0.1", | ||
"description": "Rocket.Chat DDP-Streamer service", | ||
"scripts": { | ||
"build": "tsc -p tsconfig.json", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [ | ||
"rocketchat" | ||
], | ||
"author": "Rocket.Chat", | ||
"dependencies": { | ||
"@rocket.chat/apps-engine": "^1.31.0", | ||
"@rocket.chat/core-typings": "workspace:^", | ||
"@rocket.chat/emitter": "~0.31.9", | ||
"@rocket.chat/rest-typings": "workspace:^", | ||
"@rocket.chat/string-helpers": "~0.31.9", | ||
"@rocket.chat/ui-contexts": "workspace:^", | ||
"colorette": "^1.3.0", | ||
"ejson": "^2.2.2", | ||
"eventemitter3": "^4.0.7", | ||
"fibers": "^5.0.1", | ||
"jaeger-client": "^3.19.0", | ||
"moleculer": "^0.14.19", | ||
"mongodb": "^3.6.10", | ||
"nats": "^2.4.0", | ||
"pino": "^7.9.2", | ||
"sharp": "^0.30.4", | ||
"uuid": "^7.0.3", | ||
"ws": "^8.5.0" | ||
}, | ||
"devDependencies": { | ||
"@rocket.chat/eslint-config": "workspace:^", | ||
"@types/ejson": "^2.1.3", | ||
"@types/meteor": "1.4.81", | ||
"@types/mongodb": "^3.6.20", | ||
"@types/node": "^14.18.12", | ||
"@types/sharp": "^0.30.2", | ||
"@types/uuid": "^8.3.4", | ||
"@types/ws": "^8.5.3", | ||
"pino-pretty": "^7.6.0", | ||
"typescript": "~4.3.5" | ||
}, | ||
"main": "./dist/service.js", | ||
"files": [ | ||
"/dist" | ||
] | ||
} |
File renamed without changes.
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
File renamed without changes.
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
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
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
File renamed without changes.
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
File renamed without changes.
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,6 @@ | ||
import '../../../../apps/meteor/ee/server/startup/broker'; | ||
|
||
import { api } from '../../../../apps/meteor/server/sdk/api'; | ||
import { DDPStreamer } from './DDPStreamer'; | ||
|
||
api.registerService(new DDPStreamer()); |
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,23 @@ | ||
import type { ISubscription, IRoom, IUser, ISetting } from '@rocket.chat/core-typings'; | ||
|
||
import { NotificationsModule } from '../../../../apps/meteor/server/modules/notifications/notifications.module'; | ||
import { Stream } from './Streamer'; | ||
import { Collections, getConnection } from '../../../../apps/meteor/ee/server/services/mongo'; | ||
import { RoomsRaw } from '../../../../apps/meteor/app/models/server/raw/Rooms'; | ||
import { SubscriptionsRaw } from '../../../../apps/meteor/app/models/server/raw/Subscriptions'; | ||
import { UsersRaw } from '../../../../apps/meteor/app/models/server/raw/Users'; | ||
import { SettingsRaw } from '../../../../apps/meteor/app/models/server/raw/Settings'; | ||
|
||
export const notifications = new NotificationsModule(Stream); | ||
|
||
getConnection().then((db) => { | ||
const Users = new UsersRaw(db.collection<IUser>(Collections.User)); | ||
notifications.configure({ | ||
Rooms: new RoomsRaw(db.collection<IRoom>(Collections.Rooms)), | ||
Subscriptions: new SubscriptionsRaw(db.collection<ISubscription>(Collections.Subscriptions), { | ||
Users, | ||
}), | ||
Users, | ||
Settings: new SettingsRaw(db.collection<ISetting>(Collections.Settings)), | ||
}); | ||
}); |
File renamed without changes.
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,29 @@ | ||
{ | ||
"extends": "../../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"target": "es2018", | ||
"lib": ["esnext", "dom"], | ||
"allowJs": true, | ||
"checkJs": false, | ||
"incremental": true, | ||
|
||
/* Strict Type-Checking Options */ | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"strictPropertyInitialization": false, | ||
|
||
/* Additional Checks */ | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": false, | ||
"noFallthroughCasesInSwitch": false, | ||
|
||
/* Module Resolution Options */ | ||
"outDir": "./dist", | ||
"importsNotUsedAsValues": "preserve", | ||
"declaration": false, | ||
"declarationMap": false | ||
}, | ||
"include": ["./src/**/*", "../../../apps/meteor/definition", "./definition"], | ||
"exclude": ["./dist", "./ecosystem.config.js"] | ||
} |
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
Oops, something went wrong.