fix: tsc errors
This commit is contained in:
parent
c06e655819
commit
6d68a704a3
|
@ -1,4 +1,4 @@
|
|||
import crypto from 'node:crypto';
|
||||
import * as crypto from 'node:crypto';
|
||||
|
||||
export type Client = {
|
||||
name: string;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { Client, checkKey } from './client.js';
|
||||
|
||||
import fsp from 'node:fs/promises';
|
||||
import * as fsp from 'node:fs/promises';
|
||||
import Ajv from 'ajv';
|
||||
import { existsSync } from 'node:fs';
|
||||
// @ts-expect-error: esnext moment
|
||||
const ajv = new Ajv();
|
||||
|
||||
const config_validate = ajv.compile({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { type FastifyPluginAsync } from 'fastify';
|
||||
import fsp from 'node:fs/promises';
|
||||
import * as fsp from 'node:fs/promises';
|
||||
|
||||
import { Config, config } from '../config.js';
|
||||
import { InvalidAuthorization } from '../errors.js';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { FastifyPluginAsync } from 'fastify';
|
||||
import fsp from 'node:fs/promises';
|
||||
import * as fsp from 'node:fs/promises';
|
||||
|
||||
import { Config, config } from '../config.js';
|
||||
import { InvalidAuthorization, NotFoundError } from '../errors.js';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { type FastifyPluginAsync } from 'fastify';
|
||||
import fsp from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import * as fsp from 'node:fs/promises';
|
||||
import * as path from 'node:path';
|
||||
import { Stats } from 'node:fs';
|
||||
|
||||
import { Config, config } from '../config.js';
|
||||
|
|
|
@ -14,6 +14,7 @@ type UploadPayload = {
|
|||
data: string; // base64-encoded
|
||||
name: string;
|
||||
};
|
||||
// @ts-expect-error: esnext moment
|
||||
const ajv = new Ajv();
|
||||
const upload_schema = {
|
||||
type: 'object',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { config } from './config.js';
|
||||
|
||||
import path from 'path';
|
||||
import fsp from 'node:fs/promises';
|
||||
import * as path from 'path';
|
||||
import * as fsp from 'node:fs/promises';
|
||||
import { NoKeyClient } from './client.js';
|
||||
|
||||
function getClient(clientName: string): NoKeyClient | undefined {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["ES2023"]
|
||||
"lib": ["ES2023"],
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue