-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
…/attachment-file * 'develop' of github.com:RocketChat/Rocket.Chat: (33 commits) Chore: fix EmailInbox intermittent e2e tests (#27573) [IMPROVE] Authorize search of custom fields on `users.list` (#27423) Chore: Threads as React components (#27524) [NEW] Upload service (#27543) [FIX] Fix emoji appearance on sidebar (#27580) [FIX] RoomLeader status not working (#27576) [FIX] Announcement banner link opening in the same page (#27554) Bump version to 5.4.1 [FIX] Custom languages not being applied to i18next (#27557) [FIX] Registration and Login placeholders not being used (#27558) [FIX] Fix Login with Show default form disabled (#27475) [FIX] Message Actions menu does not close upon choosing an action (#27328) Chore: Deprecate unused omnichannel API (#27538) [FIX] Pagination not working on current chats (#27432) [FIX] Custom languages not being applied to i18next (#27557) [FIX] Registration and Login placeholders not being used (#27558) [FIX] Message Actions menu does not close upon choosing an action (#27328) Chore: Deprecate unused omnichannel API (#27538) Regression: Add button-icon-disabled-color to the palette (#27522) Chore: Refactor CreateChannelModal (#27469) ...
- Loading branch information
Showing
215 changed files
with
4,552 additions
and
3,637 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
to: ee/apps/<%= name %>/.eslintrc.json | ||
--- | ||
{ | ||
"extends": ["@rocket.chat/eslint-config"], | ||
"ignorePatterns": ["**/dist"] | ||
} |
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,51 @@ | ||
--- | ||
to: ee/apps/<%= name %>/package.json | ||
--- | ||
{ | ||
"name": "@rocket.chat/<%= name.toLowerCase() %>", | ||
"private": true, | ||
"version": "0.1.0", | ||
"description": "Rocket.Chat service", | ||
"scripts": { | ||
"build": "tsc -p tsconfig.json", | ||
"ms": "TRANSPORTER=${TRANSPORTER:-TCP} MONGO_URL=${MONGO_URL:-mongodb://localhost:3001/meteor} ts-node --files src/service.ts", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"lint": "eslint src", | ||
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json" | ||
}, | ||
"keywords": [ | ||
"rocketchat" | ||
], | ||
"author": "Rocket.Chat", | ||
"dependencies": { | ||
"@rocket.chat/core-typings": "workspace:^", | ||
"@rocket.chat/emitter": "0.31.22", | ||
"@rocket.chat/model-typings": "workspace:^", | ||
"@rocket.chat/models": "workspace:^", | ||
"@rocket.chat/rest-typings": "workspace:^", | ||
"@rocket.chat/string-helpers": "0.31.22", | ||
"@types/node": "^14.18.21", | ||
"ejson": "^2.2.2", | ||
"eventemitter3": "^4.0.7", | ||
"fibers": "^5.0.3", | ||
"mem": "^8.1.1", | ||
"moleculer": "^0.14.21", | ||
"mongodb": "^4.12.1", | ||
"nats": "^2.4.0", | ||
"pino": "^8.4.2", | ||
"polka": "^0.5.2" | ||
}, | ||
"devDependencies": { | ||
"@rocket.chat/eslint-config": "workspace:^", | ||
"@types/eslint": "^8.4.10", | ||
"@types/polka": "^0.5.4", | ||
"eslint": "^8.29.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "~4.5.5" | ||
}, | ||
"main": "./dist/ee/apps/<%= name %>/src/service.js", | ||
"files": [ | ||
"/dist" | ||
] | ||
} | ||
|
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,43 @@ | ||
--- | ||
to: ee/apps/<%= name %>/src/service.ts | ||
--- | ||
import type { Document } from 'mongodb'; | ||
import polka from 'polka'; | ||
|
||
import { api } from '../../../../apps/meteor/server/sdk/api'; | ||
import { broker } from '../../../../apps/meteor/ee/server/startup/broker'; | ||
import { Collections, getCollection, getConnection } from '../../../../apps/meteor/ee/server/services/mongo'; | ||
import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; | ||
|
||
const PORT = process.env.PORT || 3034; | ||
|
||
(async () => { | ||
const db = await getConnection(); | ||
|
||
const trash = await getCollection<Document>(Collections.Trash); | ||
|
||
registerServiceModels(db, trash); | ||
|
||
api.setBroker(broker); | ||
|
||
// need to import service after models are registered | ||
const { <%= h.changeCase.pascalCase(name) %> } = await import('./<%= h.changeCase.pascalCase(name) %>'); | ||
|
||
api.registerService(new <%= h.changeCase.pascalCase(name) %>()); | ||
|
||
await api.start(); | ||
|
||
polka() | ||
.get('/health', async function (_req, res) { | ||
try { | ||
await api.nodeList(); | ||
res.end('ok'); | ||
} catch (err) { | ||
console.error('Service not healthy', err); | ||
|
||
res.writeHead(500); | ||
res.end('not healthy'); | ||
} | ||
}) | ||
.listen(PORT); | ||
})(); |
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 @@ | ||
--- | ||
to: ee/apps/<%= name %>/src/<%= h.changeCase.pascalCase(name) %>.ts | ||
--- | ||
import { ServiceClass } from '../../../../apps/meteor/server/sdk/types/ServiceClass'; | ||
|
||
export class <%= h.changeCase.pascalCase(name) %> extends ServiceClass { | ||
protected name = '<%= name %>'; | ||
|
||
constructor() { | ||
super(); | ||
|
||
// your stuff | ||
} | ||
|
||
// more stuff | ||
} |
Oops, something went wrong.