1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-18 22:25:28 +02:00

Minify backend (#17054)

* wip

* Update build.js

* Update build.js

* [minify-backend用] フィジビリティ検証 (#16878)

* fix: minify-backend

* 間違えて入れちゃったのを戻す

* 追従

* fix

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>

* test

* use node 24

* Revert "use node 24"

This reverts commit 7ae2debf23.

* Revert "test"

This reverts commit d919879091.

* Update package.json

* wip

* Update compile_config.js

* Revert "Update compile_config.js"

This reverts commit 0ee286f02b.

* Update config.ts

* wip

* Update .swcrc

* Update ClientServerService.ts

* [ci skip] update CHANGELOG

---------

Co-authored-by: おさむのひと <46447427+samunohito@users.noreply.github.com>
This commit is contained in:
syuilo
2026-01-05 20:56:52 +09:00
committed by GitHub
parent 4f65c1529b
commit 7bcfeba7e5
16 changed files with 722 additions and 187 deletions

View File

@@ -4,8 +4,6 @@
*/
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as os from 'node:os';
import cluster from 'node:cluster';
import chalk from 'chalk';
@@ -17,20 +15,15 @@ import { showMachineInfo } from '@/misc/show-machine-info.js';
import { envOption } from '@/env.js';
import { jobQueue, server } from './common.js';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../../built/meta.json`, 'utf-8'));
const logger = new Logger('core', 'cyan');
const bootLogger = logger.createSubLogger('boot', 'magenta');
const themeColor = chalk.hex('#86b300');
function greet() {
function greet(props: { version: string }) {
if (!envOption.quiet) {
//#region Misskey logo
const v = `v${meta.version}`;
const v = `v${props.version}`;
console.log(themeColor(' _____ _ _ '));
console.log(themeColor(' | |_|___ ___| |_ ___ _ _ '));
console.log(themeColor(' | | | | |_ -|_ -| \'_| -_| | |'));
@@ -46,7 +39,7 @@ function greet() {
}
bootLogger.info('Welcome to Misskey!');
bootLogger.info(`Misskey v${meta.version}`, null, true);
bootLogger.info(`Misskey v${props.version}`, null, true);
}
/**
@@ -57,11 +50,11 @@ export async function masterMain() {
// initialize app
try {
greet();
config = loadConfigBoot();
greet({ version: config.version });
showEnvironment();
await showMachineInfo(bootLogger);
showNodejsVersion();
config = loadConfigBoot();
//await connectDb();
if (config.pidFile) fs.writeFileSync(config.pidFile, process.pid.toString());
} catch (e) {