Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TypeScript #80

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [19.9.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@ store
*.key

ansible/prod.yml

.tsimp
6 changes: 4 additions & 2 deletions api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox'
import fastify, {
import {
fastify,
FastifyBaseLogger,
RawReplyDefaultExpression,
RawRequestDefaultExpression,
Expand Down Expand Up @@ -118,7 +119,8 @@ async function apiBuilder (cfg: APIConfig): Promise<FastifyTypebox> {

const v1Routes = (cfg: APIConfig, store: StoreI) => async (server: FastifyTypebox): Promise<void> => {
if (cfg.usePrometheus ?? false) {
await server.register(metrics, { endpoint: '/metrics' })
// https://github.com/SkeLLLa/fastify-metrics/issues/92
await server.register(metrics.default, { endpoint: '/metrics' })
}

if (cfg.useSwagger ?? false) {
Expand Down
2 changes: 1 addition & 1 deletion config/admin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NewAdmin, Admin } from '../api/schemas'
import { NewAdmin, Admin } from '../api/schemas.js'
import { Static } from '@sinclair/typebox'
import { Config } from './store.js'
import { nanoid } from 'nanoid'
Expand Down
2 changes: 1 addition & 1 deletion config/publisher.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NewPublisher, Publisher } from '../api/schemas'
import { NewPublisher, Publisher } from '../api/schemas.js'
import { Static } from '@sinclair/typebox'
import { Config } from './store.js'
import { nanoid } from 'nanoid'
Expand Down
2 changes: 1 addition & 1 deletion fs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'path'
import fs from 'fs'
import tar from 'tar-fs'
import gunzip from 'gunzip-maybe'
import rimraf from 'rimraf'
import { rimraf } from 'rimraf'
import { pipeline } from 'stream/promises'
import makeDir from 'make-dir'

Expand Down
Loading