Chore: Remove/replace some Meteor packages (#28189)

Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
pull/28339/head^2
Tasso Evangelista 3 years ago committed by GitHub
parent 05a9c0101d
commit 29d67d45ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/meteor/.eslintcache
  2. 8
      apps/meteor/.meteor/packages
  3. 3
      apps/meteor/.meteor/versions
  4. 2
      apps/meteor/app/meteor-autocomplete/client/autocomplete-client.js
  5. 3
      apps/meteor/package.json
  6. 37
      apps/meteor/server/startup/initialData.js
  7. 19
      yarn.lock

File diff suppressed because one or more lines are too long

@ -9,10 +9,12 @@
rocketchat:ddp
rocketchat:mongo-config
accounts-base@2.2.6
accounts-facebook@1.3.3
accounts-github@1.5.0
accounts-google@1.4.0
accounts-meteor-developer@1.5.0
accounts-oauth@1.4.2
accounts-password@2.3.3
accounts-twitter@1.5.0
blaze-html-templates
@ -58,22 +60,17 @@ kadira:flow-router
mrt:reactive-store
mystor:device-detection
rocketchat:restivus
nooitaf:colors
ostrio:cookies
pauli:accounts-linkedin
raix:handlebar-helpers
raix:ui-dropped-event
rocketchat:tap-i18n@3.0.0
underscore@1.0.11
littledata:synced-cron
accounts-base@2.2.6
accounts-oauth@1.4.2
autoupdate@1.8.0
babel-compiler@7.10.1
google-oauth@1.4.3
htmljs
matb33:collection-hooks
meteorhacks:inject-initial
oauth@2.1.3
@ -85,7 +82,6 @@ webapp@1.13.2
webapp-hashing@1.1.1
rocketchat:oauth2-server
rocketchat:i18n
dandv:caret-position
facts-base@1.0.1
url@1.3.2
standard-minifier-css@1.8.3

@ -23,7 +23,6 @@ callback-hook@1.4.0
check@1.3.2
coffeescript@2.4.1
coffeescript-compiler@2.4.1
dandv:caret-position@2.1.1
ddp@1.4.1
ddp-client@2.6.1
ddp-common@1.4.0
@ -85,7 +84,6 @@ mongo-dev-server@1.1.0
mongo-id@1.0.8
mrt:reactive-store@0.0.1
mystor:device-detection@0.2.0
nooitaf:colors@1.2.0
npm-mongo@4.12.1
oauth@2.1.3
oauth1@1.5.1
@ -98,7 +96,6 @@ pauli:linkedin-oauth@6.0.0
promise@0.12.2
raix:eventemitter@1.0.0
raix:handlebar-helpers@0.2.5
raix:ui-dropped-event@0.0.7
random@1.2.1
rate-limit@1.0.9
react-fast-refresh@0.2.3

@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
import { Match } from 'meteor/check';
import { Blaze } from 'meteor/blaze';
import { Deps } from 'meteor/deps';
import { getCaretCoordinates } from 'meteor/dandv:caret-position';
import getCaretCoordinates from 'textarea-caret';
import AutoCompleteRecords from './collection';
import { APIClient } from '../../utils/client';

@ -141,6 +141,7 @@
"@types/strict-uri-encode": "^2.0.0",
"@types/string-strip-html": "^5.0.1",
"@types/supertest": "^2.0.12",
"@types/textarea-caret": "^3",
"@types/ua-parser-js": "^0.7.36",
"@types/use-subscription": "^1.0.0",
"@types/use-sync-external-store": "^0.0.3",
@ -280,6 +281,7 @@
"clipboard": "^2.0.11",
"codemirror": "^5.65.6",
"colorette": "^2.0.19",
"colors": "^1.4.0",
"connect": "^3.7.0",
"cookie": "^0.5.0",
"cookie-parser": "^1.4.6",
@ -384,6 +386,7 @@
"strict-uri-encode": "^2.0.0",
"string-strip-html": "^7.0.3",
"tar-stream": "^1.6.2",
"textarea-caret": "^3.1.0",
"tinykeys": "^1.4.0",
"turndown": "^7.1.1",
"twilio": "^3.76.1",

@ -1,6 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { Settings } from '@rocket.chat/models';
import colors from 'colors/safe';
import { RocketChatFile } from '../../app/file/server';
import { FileUpload } from '../../app/file-upload/server';
@ -56,7 +57,7 @@ Meteor.startup(async function () {
if (process.env.ADMIN_PASS) {
if ((await (await getUsersInRole('admin')).count()) === 0) {
console.log('Inserting admin user:'.green);
console.log(colors.green('Inserting admin user:'));
const adminUser = {
name: 'Administrator',
username: 'admin',
@ -70,7 +71,7 @@ Meteor.startup(async function () {
adminUser.name = process.env.ADMIN_NAME;
}
console.log(`Name: ${adminUser.name}`.green);
console.log(colors.green(`Name: ${adminUser.name}`));
if (process.env.ADMIN_EMAIL) {
if (validateEmail(process.env.ADMIN_EMAIL)) {
@ -82,12 +83,12 @@ Meteor.startup(async function () {
},
];
console.log(`Email: ${process.env.ADMIN_EMAIL}`.green);
console.log(colors.green(`Email: ${process.env.ADMIN_EMAIL}`));
} else {
console.log('Email provided already exists; Ignoring environment variables ADMIN_EMAIL'.red);
console.log(colors.red('Email provided already exists; Ignoring environment variables ADMIN_EMAIL'));
}
} else {
console.log('Email provided is invalid; Ignoring environment variables ADMIN_EMAIL'.red);
console.log(colors.red('Email provided is invalid; Ignoring environment variables ADMIN_EMAIL'));
}
}
@ -104,14 +105,14 @@ Meteor.startup(async function () {
if (checkUsernameAvailability(process.env.ADMIN_USERNAME)) {
adminUser.username = process.env.ADMIN_USERNAME;
} else {
console.log('Username provided already exists; Ignoring environment variables ADMIN_USERNAME'.red);
console.log(colors.red('Username provided already exists; Ignoring environment variables ADMIN_USERNAME'));
}
} else {
console.log('Username provided is invalid; Ignoring environment variables ADMIN_USERNAME'.red);
console.log(colors.red('Username provided is invalid; Ignoring environment variables ADMIN_USERNAME'));
}
}
console.log(`Username: ${adminUser.username}`.green);
console.log(colors.green(`Username: ${adminUser.username}`));
adminUser.type = 'user';
@ -121,7 +122,7 @@ Meteor.startup(async function () {
await addUserRolesAsync(id, ['admin']);
} else {
console.log('Users with admin role already exist; Ignoring environment variables ADMIN_PASS'.red);
console.log(colors.red('Users with admin role already exist; Ignoring environment variables ADMIN_PASS'));
}
}
@ -130,16 +131,16 @@ Meteor.startup(async function () {
const initialUser = JSON.parse(process.env.INITIAL_USER);
if (!initialUser._id) {
console.log('No _id provided; Ignoring environment variable INITIAL_USER'.red);
console.log(colors.red('No _id provided; Ignoring environment variable INITIAL_USER'));
} else if (!Users.findOneById(initialUser._id)) {
console.log('Inserting initial user:'.green);
console.log(JSON.stringify(initialUser, null, 2).green);
console.log(colors.green('Inserting initial user:'));
console.log(colors.green(JSON.stringify(initialUser, null, 2)));
Users.create(initialUser);
await addUserToDefaultChannels(initialUser, true);
}
} catch (e) {
console.log('Error processing environment variable INITIAL_USER'.red, e);
console.log(colors.red('Error processing environment variable INITIAL_USER'), e);
}
}
@ -162,7 +163,7 @@ Meteor.startup(async function () {
Users.removeById('rocketchat.internal.admin.test');
if (process.env.TEST_MODE === 'true') {
console.log('Inserting admin test user:'.green);
console.log(colors.green('Inserting admin test user:'));
const adminUser = {
_id: 'rocketchat.internal.admin.test',
@ -181,10 +182,10 @@ Meteor.startup(async function () {
type: 'user',
};
console.log(`Name: ${adminUser.name}`.green);
console.log(`Email: ${adminUser.emails[0].address}`.green);
console.log(`Username: ${adminUser.username}`.green);
console.log(`Password: ${adminUser._id}`.green);
console.log(colors.green(`Name: ${adminUser.name}`));
console.log(colors.green(`Email: ${adminUser.emails[0].address}`));
console.log(colors.green(`Username: ${adminUser.username}`));
console.log(colors.green(`Password: ${adminUser._id}`));
if (Users.findOneByEmailAddress(adminUser.emails[0].address)) {
throw new Meteor.Error(`Email ${adminUser.emails[0].address} already exists`, "Rocket.Chat can't run in test mode");

@ -7385,6 +7385,7 @@ __metadata:
"@types/strict-uri-encode": ^2.0.0
"@types/string-strip-html": ^5.0.1
"@types/supertest": ^2.0.12
"@types/textarea-caret": ^3
"@types/ua-parser-js": ^0.7.36
"@types/use-subscription": ^1.0.0
"@types/use-sync-external-store": ^0.0.3
@ -7421,6 +7422,7 @@ __metadata:
clipboard: ^2.0.11
codemirror: ^5.65.6
colorette: ^2.0.19
colors: ^1.4.0
connect: ^3.7.0
cookie: ^0.5.0
cookie-parser: ^1.4.6
@ -7561,6 +7563,7 @@ __metadata:
supertest: ^6.2.3
tar-stream: ^1.6.2
template-file: ^6.0.1
textarea-caret: ^3.1.0
tinykeys: ^1.4.0
ts-node: ^10.9.1
turndown: ^7.1.1
@ -12483,6 +12486,13 @@ __metadata:
languageName: node
linkType: hard
"@types/textarea-caret@npm:^3":
version: 3.0.1
resolution: "@types/textarea-caret@npm:3.0.1"
checksum: 18ff4275f0411187aebf4f475e318f5c62a87c056d3ff280b86e18fca6bf2c9bfab9ea885135f210131df230fc761b9f560b66dd8d3d2ebb161610f4ffbf3541
languageName: node
linkType: hard
"@types/tmp@npm:^0.2.2":
version: 0.2.3
resolution: "@types/tmp@npm:0.2.3"
@ -16769,7 +16779,7 @@ __metadata:
languageName: node
linkType: hard
"colors@npm:1.4.0":
"colors@npm:1.4.0, colors@npm:^1.4.0":
version: 1.4.0
resolution: "colors@npm:1.4.0"
checksum: 98aa2c2418ad87dedf25d781be69dc5fc5908e279d9d30c34d8b702e586a0474605b3a189511482b9d5ed0d20c867515d22749537f7bc546256c6014f3ebdcec
@ -36609,6 +36619,13 @@ __metadata:
languageName: node
linkType: hard
"textarea-caret@npm:^3.1.0":
version: 3.1.0
resolution: "textarea-caret@npm:3.1.0"
checksum: ddefbd3078f7181d0433e69c9595ed16f64cef01c110856b4c24fe03bc2560f373a39db1c85bd3a0e65017e27b7f4034864cd6a355b8e5057c5f1a2100c0f583
languageName: node
linkType: hard
"thread-stream@npm:^0.15.1":
version: 0.15.2
resolution: "thread-stream@npm:0.15.2"

Loading…
Cancel
Save