Tsify tools (mostly) (#7018)

This includes among others:
 - Proper tsification of various tools code,
 - Elimination of the `CompilationInfo2` type,
 - Use of `CompilationInfo` instead of `Record<any, any>` in some places
 - These lines in CompilationResult:
```
    // Temp hack until we get all code to agree on type of asm
    asm?: ResultLine[] | string;
```

The next task would be to get all code to agree on the type of
CompilationResult.asm, thereby enabling fixing of most the remaining
TSification.
This commit is contained in:
Ofek
2024-10-26 10:58:30 +03:00
committed by GitHub
parent d7da9a7d64
commit 4e5348ab77
38 changed files with 194 additions and 147 deletions

7
app.ts
View File

@@ -33,14 +33,16 @@ import bodyParser from 'body-parser';
import compression from 'compression';
import express from 'express';
import fs from 'fs-extra';
// @ts-expect-warning
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import morgan from 'morgan';
import nopt from 'nopt';
import PromClient from 'prom-client';
import responseTime from 'response-time';
import sanitize from 'sanitize-filename';
import sFavicon from 'serve-favicon';
// @ts-expect-warning
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import systemdSocket from 'systemd-socket';
import _ from 'underscore';
import urljoin from 'url-join';
@@ -50,7 +52,6 @@ import * as normalizer from './lib/clientstate-normalizer.js';
import {CompilationEnvironment} from './lib/compilation-env.js';
import {CompilationQueue} from './lib/compilation-queue.js';
import {CompilerFinder} from './lib/compiler-finder.js';
// import { policy as csp } from './lib/csp.js';
import {startWineInit} from './lib/exec.js';
import {CompileHandler} from './lib/handlers/compile.js';
import * as healthCheck from './lib/handlers/health-check.js';