Make biome happier
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import express, {
|
import express, {
|
||||||
Request as ExpressRequest,
|
type Request as ExpressRequest,
|
||||||
Response as ExpressResponse,
|
type Response as ExpressResponse,
|
||||||
} from "express";
|
} from "express";
|
||||||
import { match } from "path-to-regexp";
|
import { match } from "path-to-regexp";
|
||||||
import { cli } from "./cli";
|
import { cli } from "./cli";
|
||||||
@@ -10,19 +10,16 @@ import { routes } from "./routes";
|
|||||||
import { services } from "./services";
|
import { services } from "./services";
|
||||||
// import { URLPattern } from 'node:url';
|
// import { URLPattern } from 'node:url';
|
||||||
import {
|
import {
|
||||||
Call,
|
type Call,
|
||||||
InternalHandler,
|
type InternalHandler,
|
||||||
Method,
|
type Method,
|
||||||
ProcessedRoute,
|
|
||||||
Result,
|
|
||||||
Route,
|
|
||||||
massageMethod,
|
massageMethod,
|
||||||
methodParser,
|
methodParser,
|
||||||
|
type ProcessedRoute,
|
||||||
|
type Result,
|
||||||
|
type Route,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
services.logging.log({ source: "logging", text: ["1"] });
|
services.logging.log({ source: "logging", text: ["1"] });
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { contentTypes } from "./content-types";
|
import { contentTypes } from "./content-types";
|
||||||
import { httpCodes } from "./http-codes";
|
import { httpCodes } from "./http-codes";
|
||||||
import { services } from "./services";
|
import { services } from "./services";
|
||||||
import { Call, Handler, Result } from "./types";
|
import type { Call, Handler, Result } from "./types";
|
||||||
|
|
||||||
const multiHandler: Handler = async (call: Call): Promise<Result> => {
|
const multiHandler: Handler = async (call: Call): Promise<Result> => {
|
||||||
const code = httpCodes.success.OK;
|
const code = httpCodes.success.OK;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { contentTypes } from "./content-types";
|
|||||||
import { multiHandler } from "./handlers";
|
import { multiHandler } from "./handlers";
|
||||||
import { HttpCode, httpCodes } from "./http-codes";
|
import { HttpCode, httpCodes } from "./http-codes";
|
||||||
import { services } from "./services";
|
import { services } from "./services";
|
||||||
import { Call, ProcessedRoute, Result, Route } from "./types";
|
import { type Call, ProcessedRoute, type Result, type Route } from "./types";
|
||||||
|
|
||||||
// FIXME: Obviously put this somewhere else
|
// FIXME: Obviously put this somewhere else
|
||||||
const okText = (result: string): Result => {
|
const okText = (result: string): Result => {
|
||||||
|
|||||||
@@ -8,6 +8,6 @@
|
|||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"types": ["node"],
|
"types": ["node"],
|
||||||
"outDir": "out",
|
"outDir": "out"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
// FIXME: split this up into types used by app developers and types internal
|
// FIXME: split this up into types used by app developers and types internal
|
||||||
// to the framework.
|
// to the framework.
|
||||||
import {
|
import {
|
||||||
Request as ExpressRequest,
|
type Request as ExpressRequest,
|
||||||
Response as ExpressResponse,
|
Response as ExpressResponse,
|
||||||
} from "express";
|
} from "express";
|
||||||
import { MatchFunction } from "path-to-regexp";
|
import type { MatchFunction } from "path-to-regexp";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { ContentType, contentTypes } from "./content-types";
|
import { type ContentType, contentTypes } from "./content-types";
|
||||||
import { HttpCode, httpCodes } from "./http-codes";
|
import { type HttpCode, httpCodes } from "./http-codes";
|
||||||
|
|
||||||
const methodParser = z.union([
|
const methodParser = z.union([
|
||||||
z.literal("GET"),
|
z.literal("GET"),
|
||||||
|
|||||||
Reference in New Issue
Block a user