Merge remote-tracking branch 'parent/main' into upstream-20231116

This commit is contained in:
KMY 2023-11-15 13:01:29 +09:00
commit 24371d6b2a
87 changed files with 566 additions and 347 deletions

View file

@ -2,6 +2,7 @@
const fs = require('fs');
const http = require('http');
const path = require('path');
const url = require('url');
const dotenv = require('dotenv');
@ -17,8 +18,11 @@ const WebSocket = require('ws');
const environment = process.env.NODE_ENV || 'development';
// Correctly detect and load .env or .env.production file based on environment:
const dotenvFile = environment === 'production' ? '.env.production' : '.env';
dotenv.config({
path: environment === 'production' ? '.env.production' : '.env',
path: path.resolve(__dirname, path.join('..', dotenvFile))
});
log.level = process.env.LOG_LEVEL || 'verbose';

39
streaming/package.json Normal file
View file

@ -0,0 +1,39 @@
{
"name": "@mastodon/streaming",
"license": "AGPL-3.0-or-later",
"packageManager": "yarn@4.0.2",
"engines": {
"node": ">=18"
},
"description": "Mastodon's Streaming Server",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/mastodon/mastodon.git"
},
"scripts": {
"start": "node ./index.js"
},
"dependencies": {
"dotenv": "^16.0.3",
"express": "^4.18.2",
"ioredis": "^5.3.2",
"jsdom": "^22.1.0",
"npmlog": "^7.0.1",
"pg": "^8.5.0",
"pg-connection-string": "^2.6.0",
"prom-client": "^15.0.0",
"uuid": "^9.0.0",
"ws": "^8.12.1"
},
"devDependencies": {
"@types/express": "^4.17.17",
"@types/npmlog": "^4.1.4",
"@types/pg": "^8.6.6",
"@types/uuid": "^9.0.0"
},
"optionalDependencies": {
"bufferutil": "^4.0.7",
"utf-8-validate": "^6.0.3"
}
}