Skip to content

Commit

Permalink
Merge branch 'develop' into fix/unnecessary-permissions-check-marketp…
Browse files Browse the repository at this point in the history
…lace
  • Loading branch information
kodiakhq[bot] committed Jan 9, 2023
2 parents b4b5d16 + cdc2f99 commit 1a1b125
Show file tree
Hide file tree
Showing 1,991 changed files with 26,085 additions and 22,426 deletions.
7 changes: 7 additions & 0 deletions .github/history-manual.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,12 @@
"contributors": [
"ggazzo"
]
}],
"5.3.3": [{
"title": "[FIX] Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)",
"userLogin": "ggazzo",
"contributors": [
"ggazzo"
]
}]
}
4,469 changes: 4,468 additions & 1 deletion .github/history.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ jobs:
RC_DOCKER_TAG: '${{ needs.release-versions.outputs.gh-docker-tag }}.official'
DOCKER_TAG: ${{ needs.release-versions.outputs.gh-docker-tag }}
TRANSPORTER: nats://nats:4222
# this is 100% intentional, secrets are not available at forks, so ee-tests will always fail
# to avoid this, we are using a dummy license, expiring on 2022-12-31
ENTERPRISE_LICENSE: GWHMQe3C3lu3if4ropk1iQ09sCKjIaQogwMymgl7pbuotLpHPhTzxvuSqJYmEtHGKX4MQsrYA+8witFF3JMOc3AswwAkxQz+TZz9+XfiBo49p7OL0xfO6f9ElhLHclptcEPFDSilQlmDI1Jjr7k+MdqXxE4XbZ4Pdeg9vdEDtroKvSvd0ngtFMkIXa6829Cg0nzTCCcWo3Jc80JPub6VMgpdZ2KnsswQt8dBz+psvztcwrqF7X5731HkPX0lTttjF6SSIs+WAIdwAY4b2VRtD3PbMWxbe0ac+2x5+ItIRH0PFRh/gVWdtiKfskQpcucU739CX/d4pQGK/OWxKifH1XH824doeyYuvjXwvCW5anPlRXKAqIn2gh6LcdGfFNIbjX9wG4/U162vDr3AtEpRYdjzfvvBW1gveYMGidIiEhQZu7h5Ie9b3tNBkNBgBcqibL9JO6K3/2pxX7gymjT+9VRZgB5+ME2pziD54SjSWCwkLcf/RByxArdDSqI3llKjyDnRXjhqzsLhmsc6UdJCJd1IiqjQ4v5QXH2C57cJlej93ZLuNRFcnb0cE0nAFHIfLSZP5CSJA/gY7mtBL0b0osUisNL/os7a74JFMoa4DDfTD2CarYV5E4+fpX3NqINzpYwFzZi9pH2wIL6oe1yuZPcn9vjRhK2jvG81tHSR/4s=
# this is 100% intentional, secrets are not available for forks, so ee-tests will always fail
# to avoid this, we are using a dummy license, expiring at 2023-06-30
ENTERPRISE_LICENSE: Z2Dg0RC3kyxjuklSE6qfqyvD2xSD+oTYcS9OesJG0523r7rSPjv59LTQqPcp5E61qQYM3MOKoW3mDrurw4h78nVbsfrF2DoJZeNjRFQfIbgwcdPwtmnqPpDvAslszHY16VzM7O7EYqAqp/9mlnRzs1iJY+W3w1r6HWBlVMb9u41bl5HBSpX6Nxw8YxL4mizwOpjxewQbPQvNTLJNAW6w0nCzF5A3CKBhD9fziadedVMLOuXBuR8kIl8zbIAfqpHmL8SvakvQAbZEjWWQshmH+C9CKA5PppkmA8Q1DNWQoVtHSiYDK8RRjAEx+0oGflklzFyhJFDvD+ohZduNtNCgrJmxP5VFrVrLSK4BXgTSwwnaSKa2N+Qx0CmuRfu7nCPc1Cf6h6+k2TXvzkE4Z0ZJnDV1khu611glAr99bHdwF+bMX3XZI66bS8KqnHEukCt5xei25iKJ2xrfmGuiAkAuKHKzBmTEmXM0pGhkfDhA9jhxG3Atoj1A5y8vdrs88voF+UuNFZ6k9sKtdvrWIWClnkatPE+41ggbzCsOhFz07BvRWaEtw2Kenipl4Vtag4qmFpUaUfsuouH99M3gDlysDZO3x5aH8yfzvFeL5WDMvsmdEHNLpHl89WsPCONvx0JjRSdwcCA1NrRuVy1Ncu0S0bRByn7HZqoY9u6HPkXKBxQ=
run: |
docker compose -f docker-compose-ci.yml up -d --build
Expand Down
949 changes: 937 additions & 12 deletions HISTORY.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _templates/package/new/tsconfig.json.ejs.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
to: packages/<%= name %>/tsconfig.json
---
{
"extends": "../../tsconfig.base.json",
"extends": "../../tsconfig.base.client.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist"
Expand Down
7 changes: 7 additions & 0 deletions _templates/service/new/.eslintrc.json.ejs.t
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"]
}
52 changes: 52 additions & 0 deletions _templates/service/new/package.json.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
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-services": "workspace:^",
"@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"
]
}

43 changes: 43 additions & 0 deletions _templates/service/new/service.ejs.t
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 '@rocket.chat/core-services';

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);
})();
16 changes: 16 additions & 0 deletions _templates/service/new/servicesClass.ejs.t
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 '@rocket.chat/core-services';

export class <%= h.changeCase.pascalCase(name) %> extends ServiceClass {
protected name = '<%= name %>';

constructor() {
super();

// your stuff
}

// more stuff
}
12 changes: 12 additions & 0 deletions _templates/service/new/tsconfig.json.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
to: ee/apps/<%= name %>/tsconfig.json
---
{
"extends": "../../../tsconfig.base.server.json",
"compilerOptions": {
"outDir": "./dist"
},
"files": ["./src/service.ts"],
"include": ["../../../apps/meteor/definition/externals/meteor"],
"exclude": ["./dist"]
}
2 changes: 1 addition & 1 deletion apps/meteor/.docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/ubi8/nodejs-12

ENV RC_VERSION 5.4.0-develop
ENV RC_VERSION 6.0.0-develop

MAINTAINER buildmaster@rocket.chat

Expand Down
1 change: 0 additions & 1 deletion apps/meteor/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ autoupdate@1.8.0
babel-compiler@7.9.0
google-oauth@1.4.2
htmljs
less
matb33:collection-hooks
meteorhacks:inject-initial
oauth@2.1.2
Expand Down
1 change: 0 additions & 1 deletion apps/meteor/.meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ kadira:flow-router@2.12.1
konecty:multiple-instances-status@1.1.0
konecty:user-presence@2.6.3
launch-screen@1.3.0
less@3.0.2
littledata:synced-cron@1.5.1
localstorage@1.2.0
logging@1.3.1
Expand Down
8 changes: 1 addition & 7 deletions apps/meteor/.mocharc.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,5 @@ module.exports = {
timeout: 10000,
bail: true,
file: 'tests/end-to-end/teardown.js',
spec: [
'tests/unit/app/api/server/v1/**/*.spec.ts',
'tests/end-to-end/api/**/*.js',
'tests/end-to-end/api/**/*.ts',
'tests/end-to-end/apps/*.js',
'tests/end-to-end/apps/*.ts',
],
spec: ['tests/unit/app/api/server/v1/**/*.spec.*', 'tests/end-to-end/api/**/*', 'tests/end-to-end/apps/*'],
};
2 changes: 0 additions & 2 deletions apps/meteor/.mocharc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"reporter": "spec",
"extension": ["js", "ts", "tsx"],
"require": [
"@babel/register",
"regenerator-runtime/runtime",
"ts-node/register",
"./tests/setup/chaiPlugins.ts"
],
Expand Down
5 changes: 3 additions & 2 deletions apps/meteor/.storybook/decorators.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DecoratorFunction } from '@storybook/addons';
import React, { ReactElement } from 'react';
import type { DecoratorFunction } from '@storybook/addons';
import type { ReactElement } from 'react';
import React from 'react';

import ModalContextMock from '../client/stories/contexts/ModalContextMock';
import QueryClientProviderMock from '../client/stories/contexts/QueryClientProviderMock';
Expand Down
85 changes: 0 additions & 85 deletions apps/meteor/app/analytics/client/loadScript.js

This file was deleted.

0 comments on commit 1a1b125

Please sign in to comment.