Skip to content

Commit

Permalink
fix(js/plugins/firebase): fix imports for ESM compatibility in fireba…
Browse files Browse the repository at this point in the history
…se auth
  • Loading branch information
pavelgj committed Dec 10, 2024
1 parent 780ca7d commit eefb44e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/plugins/firebase/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import { Response } from 'express';
import { DecodedIdToken, getAuth } from 'firebase-admin/auth';
import { __RequestWithAuth, z } from 'genkit';
import { FunctionFlowAuth } from './functions';
import { initializeAppIfNecessary } from './helpers';
import { FunctionFlowAuth } from './functions.js';
import { initializeAppIfNecessary } from './helpers.js';

export function firebaseAuth<I extends z.ZodTypeAny>(
policy: (user: DecodedIdToken, input: z.infer<I>) => void | Promise<void>
Expand Down
2 changes: 2 additions & 0 deletions js/testapps/esm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { checks } from '@genkit-ai/checks';
import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore';
import { genkitEval } from '@genkit-ai/evaluator';
import { enableFirebaseTelemetry } from '@genkit-ai/firebase';
import { firebaseAuth } from '@genkit-ai/firebase/auth';
import { enableGoogleCloudTelemetry } from '@genkit-ai/google-cloud';
import { googleAI } from '@genkit-ai/googleai';
import { vertexAI } from '@genkit-ai/vertexai';
Expand All @@ -42,5 +43,6 @@ pinecone;
chroma;
devLocalVectorstore;
genkitEval;
firebaseAuth;

export const ai = genkit({});

0 comments on commit eefb44e

Please sign in to comment.