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