Fix build errors

This commit is contained in:
Darren Clarke 2023-03-14 17:40:24 +00:00
parent 785d0965e3
commit d0f1c1337c
28 changed files with 268 additions and 112 deletions

View file

@ -29,8 +29,8 @@ export const cfVerifier = (audience: string, domain: string): VerifyFn => {
});
return async (token) => {
const getKey = (header, callback) => {
client.getSigningKey(header.kid, function (err, key) {
const getKey = (header: any, callback: any) => {
client.getSigningKey(header.kid, function (err: any, key: any) {
if (err)
throw Boom.serverUnavailable(
"failed to fetch cloudflare access jwks"
@ -201,6 +201,7 @@ export const CloudflareAccessProvider = (
req: IncomingMessage
) => {
const verifier = cfVerifier(audience, domain);
// @ts-expect-error
return Providers.Credentials({
id: cloudflareAccountProvider,
name: "Cloudflare Access",

View file

@ -1,7 +1,7 @@
import pgDataProvider from "ra-postgraphile";
import schema from "./graphql-schema.json";
export const metamigoDataProvider = async (client) => {
export const metamigoDataProvider = async (client: any) => {
const graphqlDataProvider = await pgDataProvider(
client,
// @ts-expect-error: Missing property
@ -9,7 +9,7 @@ export const metamigoDataProvider = async (client) => {
{ introspection: { schema: schema.data.__schema } }
);
const dataProvider = async (type, resource, params) => {
const dataProvider = async (type: any, resource: any, params: any) => {
return graphqlDataProvider(type, resource, params);
};