diff --git a/js/ai/src/formats/types.d.ts b/js/ai/src/formats/types.ts similarity index 88% rename from js/ai/src/formats/types.d.ts rename to js/ai/src/formats/types.ts index 33595224c..7f0c9fbd5 100644 --- a/js/ai/src/formats/types.d.ts +++ b/js/ai/src/formats/types.ts @@ -19,14 +19,14 @@ import { GenerateResponseChunk } from '../generate.js'; import { Message } from '../message.js'; import { ModelRequest } from '../model.js'; -type OutputContentTypes = 'application/json' | 'text/plain'; +export type OutputContentTypes = 'application/json' | 'text/plain'; export interface Formatter { name: string; config: ModelRequest['output']; handler: (schema?: JSONSchema) => { parseMessage(message: Message): O; - parseChunk?: (chunk: GenerateResponseChunk, cursor?: CC) => CO; + parseChunk?: (chunk: GenerateResponseChunk) => CO; instructions?: string; }; } diff --git a/js/ai/src/generate/action.ts b/js/ai/src/generate/action.ts index 94bf6fdd1..1bf320fae 100644 --- a/js/ai/src/generate/action.ts +++ b/js/ai/src/generate/action.ts @@ -152,17 +152,15 @@ async function generate( streamingCallback ? (chunk: GenerateResponseChunkData) => { // Store accumulated chunk data - if (streamingCallback) { - streamingCallback!( - new GenerateResponseChunk(chunk, { - index: 0, - role: 'model', - previousChunks: accumulatedChunks, - parser: resolvedFormat?.handler(request.output?.schema) - .parseChunk, - }) - ); - } + streamingCallback( + new GenerateResponseChunk(chunk, { + index: 0, + role: 'model', + previousChunks: accumulatedChunks, + parser: resolvedFormat?.handler(request.output?.schema) + .parseChunk, + }) + ); accumulatedChunks.push(chunk); } : undefined, diff --git a/js/ai/src/generate/response.ts b/js/ai/src/generate/response.ts index f476bbea3..41b2981c3 100644 --- a/js/ai/src/generate/response.ts +++ b/js/ai/src/generate/response.ts @@ -73,14 +73,6 @@ export class GenerateResponse implements ModelResponseData { this.request = options?.request; } - private get assertMessage(): Message { - if (!this.message) - throw new Error( - 'Operation could not be completed because the response does not contain a generated message.' - ); - return this.message; - } - /** * Throws an error if the response does not contain valid output. */ diff --git a/js/ai/src/model/middleware.ts b/js/ai/src/model/middleware.ts index 434958dfb..2e5530bc1 100644 --- a/js/ai/src/model/middleware.ts +++ b/js/ai/src/model/middleware.ts @@ -15,7 +15,7 @@ */ import { Document } from '../document.js'; -import { +import type { MediaPart, MessageData, ModelInfo, @@ -129,12 +129,15 @@ export function validateSupport(options: { }; } +// N.B. Figure out why array.findLast isn't available despite setting target +// to ES2022 (Node 16.14.0) function lastUserMessage(messages: MessageData[]) { for (let i = messages.length - 1; i >= 0; i--) { if (messages[i].role === 'user') { return messages[i]; } } + return undefined; } /** diff --git a/js/ai/src/testing/model-tester.ts b/js/ai/src/testing/model-tester.ts index 626a4c3af..a4f50a496 100644 --- a/js/ai/src/testing/model-tester.ts +++ b/js/ai/src/testing/model-tester.ts @@ -53,9 +53,9 @@ const tests: Record = { ], }); - const want = ''; + const want = /plus/i; const got = response.text.trim(); - assert.match(got, /plus/i); + assert.match(got, want); }, history: async (registry: Registry, model: string) => { const resolvedModel = (await registry.lookupAction( @@ -155,7 +155,7 @@ export async function testModels( registry: Registry, models: string[] ): Promise { - const gablorkenTool = defineTool( + defineTool( registry, { name: 'gablorkenTool', diff --git a/js/ai/tests/formats/array_test.ts b/js/ai/tests/formats/array_test.ts index a8abb2eaf..a56752950 100644 --- a/js/ai/tests/formats/array_test.ts +++ b/js/ai/tests/formats/array_test.ts @@ -68,7 +68,6 @@ describe('arrayFormat', () => { it(st.desc, () => { const parser = arrayFormatter.handler(); const chunks: GenerateResponseChunkData[] = []; - let lastCursor = 0; for (const chunk of st.chunks) { const newChunk: GenerateResponseChunkData = { diff --git a/js/ai/tests/formats/json_test.ts b/js/ai/tests/formats/json_test.ts index 464db5639..dff531b73 100644 --- a/js/ai/tests/formats/json_test.ts +++ b/js/ai/tests/formats/json_test.ts @@ -64,7 +64,6 @@ describe('jsonFormat', () => { it(st.desc, () => { const parser = jsonFormatter.handler(); const chunks: GenerateResponseChunkData[] = []; - let lastCursor = ''; for (const chunk of st.chunks) { const newChunk: GenerateResponseChunkData = { @@ -72,8 +71,7 @@ describe('jsonFormat', () => { }; const result = parser.parseChunk!( - new GenerateResponseChunk(newChunk, { previousChunks: [...chunks] }), - lastCursor + new GenerateResponseChunk(newChunk, { previousChunks: [...chunks] }) ); chunks.push(newChunk); diff --git a/js/core/package.json b/js/core/package.json index ae33f7e32..33fc15b99 100644 --- a/js/core/package.json +++ b/js/core/package.json @@ -32,11 +32,12 @@ "@opentelemetry/sdk-metrics": "^1.25.0", "@opentelemetry/sdk-node": "^0.52.0", "@opentelemetry/sdk-trace-base": "^1.25.0", + "@types/json-schema": "^7.0.15", "ajv": "^8.12.0", - "body-parser": "^1.20.3", - "cors": "^2.8.5", "ajv-formats": "^3.0.1", "async-mutex": "^0.5.0", + "body-parser": "^1.20.3", + "cors": "^2.8.5", "express": "^4.21.0", "get-port": "^5.1.0", "json-schema": "^0.4.0", diff --git a/js/core/src/tracing.ts b/js/core/src/tracing.ts index 85e096f1e..217019a24 100644 --- a/js/core/src/tracing.ts +++ b/js/core/src/tracing.ts @@ -79,24 +79,17 @@ export async function enableTelemetry( } export async function cleanUpTracing(): Promise { - return new Promise((resolve) => { - if (telemetrySDK) { - // Metrics are not flushed as part of the shutdown operation. If metrics - // are enabled, we need to manually flush them *before* the reader - // receives shutdown order. - const metricFlush = maybeFlushMetrics(); + if (!telemetrySDK) { + return; + } - return metricFlush.then(() => { - return telemetrySDK!.shutdown().then(() => { - logger.debug('OpenTelemetry SDK shut down.'); - telemetrySDK = null; - resolve(); - }); - }); - } else { - resolve(); - } - }); + // Metrics are not flushed as part of the shutdown operation. If metrics + // are enabled, we need to manually flush them *before* the reader + // receives shutdown order. + await maybeFlushMetrics(); + await telemetrySDK.shutdown(); + logger.debug('OpenTelemetry SDK shut down.'); + telemetrySDK = null; } /** diff --git a/js/core/tsconfig.json b/js/core/tsconfig.json index 3cf966d7c..d96b77bbb 100644 --- a/js/core/tsconfig.json +++ b/js/core/tsconfig.json @@ -1,4 +1,8 @@ { "extends": "../tsconfig.json", - "include": ["src"] + "include": ["src"], + "compilerOptions": { + // DOM is needed for streaming APIs. + "lib": ["es2022", "dom"] + } } diff --git a/js/genkit/src/client/client.ts b/js/genkit/src/client/client.ts index d9144e1e1..99ba6e6e2 100644 --- a/js/genkit/src/client/client.ts +++ b/js/genkit/src/client/client.ts @@ -194,6 +194,19 @@ export async function runFlow({ `Server returned: ${response.status}: ${await response.text()}` ); } - const wrappedDesult = await response.json(); - return wrappedDesult.result; + const wrappedResult = (await response.json()) as + | { result: O } + | { error: unknown }; + if ('error' in wrappedResult) { + if (typeof wrappedResult.error === 'string') { + throw new Error(wrappedResult.error); + } + // TODO: The callable protocol defines an HttpError that has a JSON format of + // details?: string + // httpErrorCode: { canonicalName: string } + // message: string + // Should we create a new error class that parses this and exposes it as fields? + throw new Error(JSON.stringify(wrappedResult.error)); + } + return wrappedResult.result; } diff --git a/js/plugins/chroma/tsconfig.json b/js/plugins/chroma/tsconfig.json index 596e2cf72..3949a1ba5 100644 --- a/js/plugins/chroma/tsconfig.json +++ b/js/plugins/chroma/tsconfig.json @@ -1,4 +1,9 @@ { "extends": "../../tsconfig.json", - "include": ["src"] + "include": ["src"], + "compilerOptions": { + // chromadb does not compile cleany. It tries to import @xenova/transformers and + // chromadb-default-embed, which do not seem to be packaged with the library + "skipLibCheck": true + } } diff --git a/js/plugins/firebase/tsconfig.json b/js/plugins/firebase/tsconfig.json index 596e2cf72..aece3c102 100644 --- a/js/plugins/firebase/tsconfig.json +++ b/js/plugins/firebase/tsconfig.json @@ -1,4 +1,13 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + // Google protobuf libraries have a transitive dependency on the long + // library, which incorrectly implements the ESM/CSM dual mode. This + // started in 5.0.0 and protobufjs requires ^5.0.0. + // This can be removed if https://github.com/dcodeIO/long.js/pull/130 gets + // approved, though it's been sitting around for over a year without + // acceptance. + "skipLibCheck": true + }, "include": ["src"] } diff --git a/js/plugins/google-cloud/src/gcpOpenTelemetry.ts b/js/plugins/google-cloud/src/gcpOpenTelemetry.ts index 096e077d7..d543d66a8 100644 --- a/js/plugins/google-cloud/src/gcpOpenTelemetry.ts +++ b/js/plugins/google-cloud/src/gcpOpenTelemetry.ts @@ -219,7 +219,7 @@ export class GcpOpenTelemetry { */ class MetricExporterWrapper extends MetricExporter { constructor( - private options?: ExporterOptions, + options?: ExporterOptions, private errorHandler?: (error: Error) => void ) { super(options); diff --git a/js/plugins/google-cloud/tests/metrics_test.ts b/js/plugins/google-cloud/tests/metrics_test.ts index 190886337..8bba5fcce 100644 --- a/js/plugins/google-cloud/tests/metrics_test.ts +++ b/js/plugins/google-cloud/tests/metrics_test.ts @@ -243,7 +243,7 @@ describe('GoogleCloudMetrics', () => { await ai.generate({ model: testModel, prompt: 'Hi' }); await ai.generate({ model: testModel, prompt: 'Yo' }); - const spans = await getExportedSpans(); + await getExportedSpans(); const requestCounter = await getCounterMetric('genkit/feature/requests'); const latencyHistogram = await getHistogramMetric('genkit/feature/latency'); @@ -544,7 +544,7 @@ describe('GoogleCloudMetrics', () => { it('writes path metrics for a failing flow with exception in root', async () => { const flow = createFlow(ai, 'testFlow', async () => { - const subPath = await ai.run('sub-action', async () => { + await ai.run('sub-action', async () => { return 'done'; }); return Promise.reject(new Error('failed')); @@ -582,8 +582,8 @@ describe('GoogleCloudMetrics', () => { it('writes path metrics for a failing flow with exception in subaction', async () => { const flow = createFlow(ai, 'testFlow', async () => { - const subPath1 = await ai.run('sub-action-1', async () => { - const subPath2 = await ai.run('sub-action-2', async () => { + await ai.run('sub-action-1', async () => { + await ai.run('sub-action-2', async () => { return Promise.reject(new Error('failed')); }); return 'done'; @@ -627,8 +627,8 @@ describe('GoogleCloudMetrics', () => { it('writes path metrics for a flow with exception in action', async () => { const flow = createFlow(ai, 'testFlow', async () => { - const subPath1 = await ai.run('sub-action-1', async () => { - const subPath2 = await ai.run('sub-action-2', async () => { + await ai.run('sub-action-1', async () => { + await ai.run('sub-action-2', async () => { return 'done'; }); return Promise.reject(new Error('failed')); @@ -674,10 +674,10 @@ describe('GoogleCloudMetrics', () => { it('writes path metrics for a flow with an exception in a serial action', async () => { const flow = createFlow(ai, 'testFlow', async () => { - const subPath1 = await ai.run('sub-action-1', async () => { + await ai.run('sub-action-1', async () => { return 'done'; }); - const subPath2 = await ai.run('sub-action-2', async () => { + await ai.run('sub-action-2', async () => { return Promise.reject(new Error('failed')); }); return 'done'; diff --git a/js/plugins/google-cloud/tsconfig.json b/js/plugins/google-cloud/tsconfig.json index 596e2cf72..9b6c8b4e2 100644 --- a/js/plugins/google-cloud/tsconfig.json +++ b/js/plugins/google-cloud/tsconfig.json @@ -1,4 +1,13 @@ { "extends": "../../tsconfig.json", - "include": ["src"] + "include": ["src"], + "compilerOptions": { + // Google protobuf libraries have a transitive dependency on the long + // library, which incorrectly implements the ESM/CSM dual mode. This + // started in 5.0.0 and protobufjs requires ^5.0.0. + // This can be removed if https://github.com/dcodeIO/long.js/pull/130 gets + // approved, though it's been sitting around for over a year without + // acceptance. + "skipLibCheck": true + } } diff --git a/js/plugins/langchain/tsconfig.json b/js/plugins/langchain/tsconfig.json index 596e2cf72..cf52d2741 100644 --- a/js/plugins/langchain/tsconfig.json +++ b/js/plugins/langchain/tsconfig.json @@ -1,4 +1,15 @@ { "extends": "../../tsconfig.json", - "include": ["src"] + "include": ["src"], + "compilerOptions": { + // The langchain+core package has multiple ts errors: + // 1. In chat_models.d.ts and llms.d.ts, TypeScript cannot infer the type of `this`. + // this error might be resolved by upgrading typescript versions + // 2. outputs.d.cts and base.d.cts mix up ESM and CSM and are using the wrong loader. + // + // The langchain package also has errors: + // 1. callbacks.d.ts, evaluation.d.cts, and base.d.cts mix up ESM and CSM and are + // using the wrong loader + "skipLibCheck": true + } } diff --git a/js/plugins/mcp/src/client/tools.ts b/js/plugins/mcp/src/client/tools.ts index 433f5c135..06a25100f 100644 --- a/js/plugins/mcp/src/client/tools.ts +++ b/js/plugins/mcp/src/client/tools.ts @@ -56,7 +56,7 @@ function registerTool( { name: `${params.name}/${tool.name}`, description: tool.description || '', - inputJsonSchema: tool.inputSchema, + inputJsonSchema: tool.inputSchema.properties, outputSchema: z.any(), }, async (args) => { diff --git a/js/plugins/mcp/src/index.ts b/js/plugins/mcp/src/index.ts index f5bf3e830..39e21b5c3 100644 --- a/js/plugins/mcp/src/index.ts +++ b/js/plugins/mcp/src/index.ts @@ -44,7 +44,7 @@ async function transportFrom(params: McpClientOptions): Promise { const { SSEClientTransport } = await import( '@modelcontextprotocol/sdk/client/sse.js' ); - return new SSEClientTransport(URL.parse(params.serverUrl)!); + return new SSEClientTransport(new URL(params.serverUrl)); } if (params.serverProcess) { const { StdioClientTransport } = await import( diff --git a/js/plugins/mcp/src/server.ts b/js/plugins/mcp/src/server.ts index 5acb0c451..5fdfd8fc9 100644 --- a/js/plugins/mcp/src/server.ts +++ b/js/plugins/mcp/src/server.ts @@ -184,7 +184,9 @@ export class GenkitMcpServer { } } -function toMcpPromptArguments(p: PromptAction): Prompt['arguments'] { +function toMcpPromptArguments( + p: PromptAction +): Prompt['arguments'] | undefined { const jsonSchema = toJsonSchema({ schema: p.__action.inputSchema, jsonSchema: p.__action.inputJsonSchema, @@ -216,6 +218,7 @@ function toMcpPromptArguments(p: PromptAction): Prompt['arguments'] { required: jsonSchema.required?.includes(k), }); } + return args; } const ROLE_MAP = { model: 'assistant', user: 'user' } as const; diff --git a/js/plugins/ollama/package.json b/js/plugins/ollama/package.json index a7747a986..97547108b 100644 --- a/js/plugins/ollama/package.json +++ b/js/plugins/ollama/package.json @@ -31,10 +31,12 @@ "peerDependencies": { "genkit": "workspace:*" }, + "dependencies": { + "ollama": "^0.5.9" + }, "devDependencies": { "@types/node": "^20.11.16", "npm-run-all": "^4.1.5", - "ollama": "^0.5.9", "rimraf": "^6.0.1", "tsup": "^8.3.5", "tsx": "^4.19.2", diff --git a/js/plugins/ollama/src/embeddings.ts b/js/plugins/ollama/src/embeddings.ts index a559c62f9..6d4dc771a 100644 --- a/js/plugins/ollama/src/embeddings.ts +++ b/js/plugins/ollama/src/embeddings.ts @@ -98,7 +98,7 @@ export function defineOllamaEmbedder( ); } - const payload: EmbedResponse = await response.json(); + const payload = (await response.json()) as EmbedResponse; const embeddings: { embedding: number[] }[] = []; diff --git a/js/plugins/pinecone/tsconfig.json b/js/plugins/pinecone/tsconfig.json index 596e2cf72..a255d005d 100644 --- a/js/plugins/pinecone/tsconfig.json +++ b/js/plugins/pinecone/tsconfig.json @@ -1,4 +1,10 @@ { "extends": "../../tsconfig.json", - "include": ["src"] + "include": ["src"], + "compilerOptions": { + // The @pinecone-database+pinecone library has TypeScript errors: + // 1. There are three errors that the type RequestCredentials cannot be found + // 2. There is one error that WindowOrWorkerGlobalScope cannot be found + "skipLibCheck": true + } } diff --git a/js/plugins/vertexai/src/imagen.ts b/js/plugins/vertexai/src/imagen.ts index 926a9d24d..3b71ba107 100644 --- a/js/plugins/vertexai/src/imagen.ts +++ b/js/plugins/vertexai/src/imagen.ts @@ -269,11 +269,6 @@ export function imagenModel( }; } - const req: any = { - instances: [instance], - parameters: toParameters(request), - }; - const predictClient = predictClientFactory(request); const response = await predictClient([instance], toParameters(request)); diff --git a/js/plugins/vertexai/src/vectorsearch/index.ts b/js/plugins/vertexai/src/vectorsearch/index.ts index e372660e5..1a8ddca75 100644 --- a/js/plugins/vertexai/src/vectorsearch/index.ts +++ b/js/plugins/vertexai/src/vectorsearch/index.ts @@ -39,8 +39,7 @@ export { */ export function vertexAIVectorSearch(options?: PluginOptions): GenkitPlugin { return genkitPlugin('vertexAIVectorSearch', async (ai: Genkit) => { - const { projectId, location, vertexClientFactory, authClient } = - await getDerivedParams(options); + const { authClient } = await getDerivedParams(options); if ( options?.vectorSearchOptions && diff --git a/js/plugins/vertexai/src/vectorsearch/vector_search/query_public_endpoint.ts b/js/plugins/vertexai/src/vectorsearch/vector_search/query_public_endpoint.ts index f055e3b9d..eaa2bc30e 100644 --- a/js/plugins/vertexai/src/vectorsearch/vector_search/query_public_endpoint.ts +++ b/js/plugins/vertexai/src/vectorsearch/vector_search/query_public_endpoint.ts @@ -88,5 +88,5 @@ export async function queryPublicEndpoint( if (!response.ok) { logger.error('Error querying index: ', response.statusText); } - return response.json(); + return response.json() as FindNeighborsResponse; } diff --git a/js/plugins/vertexai/src/vectorsearch/vector_search/retrievers.ts b/js/plugins/vertexai/src/vectorsearch/vector_search/retrievers.ts index 0f8a64024..ca9975a40 100644 --- a/js/plugins/vertexai/src/vectorsearch/vector_search/retrievers.ts +++ b/js/plugins/vertexai/src/vectorsearch/vector_search/retrievers.ts @@ -48,7 +48,6 @@ export function vertexAiRetrievers( for (const vectorSearchOption of vectorSearchOptions) { const { documentRetriever, indexId, publicDomainName } = vectorSearchOption; - const embedder = vectorSearchOption.embedder ?? defaultEmbedder; const embedderOptions = vectorSearchOption.embedderOptions; const retriever = ai.defineRetriever( diff --git a/js/plugins/vertexai/tsconfig.json b/js/plugins/vertexai/tsconfig.json index 596e2cf72..9b6c8b4e2 100644 --- a/js/plugins/vertexai/tsconfig.json +++ b/js/plugins/vertexai/tsconfig.json @@ -1,4 +1,13 @@ { "extends": "../../tsconfig.json", - "include": ["src"] + "include": ["src"], + "compilerOptions": { + // Google protobuf libraries have a transitive dependency on the long + // library, which incorrectly implements the ESM/CSM dual mode. This + // started in 5.0.0 and protobufjs requires ^5.0.0. + // This can be removed if https://github.com/dcodeIO/long.js/pull/130 gets + // approved, though it's been sitting around for over a year without + // acceptance. + "skipLibCheck": true + } } diff --git a/js/pnpm-lock.yaml b/js/pnpm-lock.yaml index d7aab53af..2db426433 100644 --- a/js/pnpm-lock.yaml +++ b/js/pnpm-lock.yaml @@ -99,6 +99,9 @@ importers: '@opentelemetry/sdk-trace-base': specifier: ^1.25.0 version: 1.25.1(@opentelemetry/api@1.9.0) + '@types/json-schema': + specifier: ^7.0.15 + version: 7.0.15 ajv: specifier: ^8.12.0 version: 8.12.0 @@ -492,7 +495,7 @@ importers: version: 5.1.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.11.30) + version: 29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) npm-run-all: specifier: ^4.1.5 version: 4.1.5 @@ -501,7 +504,7 @@ importers: version: 6.0.1 ts-jest: specifier: ^29.1.2 - version: 29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.11.30))(typescript@4.9.5) + version: 29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)))(typescript@4.9.5) tsup: specifier: ^8.3.5 version: 8.3.5(postcss@8.4.47)(tsx@4.19.2)(typescript@4.9.5)(yaml@2.6.1) @@ -577,7 +580,7 @@ importers: version: 20.11.30 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.11.30) + version: 29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) npm-run-all: specifier: ^4.1.5 version: 4.1.5 @@ -586,7 +589,7 @@ importers: version: 6.0.1 ts-jest: specifier: ^29.1.2 - version: 29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.11.30))(typescript@4.9.5) + version: 29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)))(typescript@4.9.5) tsup: specifier: ^8.3.5 version: 8.3.5(postcss@8.4.47)(tsx@4.19.2)(typescript@4.9.5)(yaml@2.6.1) @@ -688,7 +691,7 @@ importers: version: 20.16.9 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.16.9) + version: 29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) npm-run-all: specifier: ^4.1.5 version: 4.1.5 @@ -697,7 +700,7 @@ importers: version: 6.0.1 ts-jest: specifier: ^29.1.2 - version: 29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.16.9))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)))(typescript@5.6.3) tsup: specifier: ^8.3.5 version: 8.3.5(postcss@8.4.47)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.6.1) @@ -713,6 +716,9 @@ importers: genkit: specifier: workspace:* version: link:../../genkit + ollama: + specifier: ^0.5.9 + version: 0.5.9 devDependencies: '@types/node': specifier: ^20.11.16 @@ -720,9 +726,6 @@ importers: npm-run-all: specifier: ^4.1.5 version: 4.1.5 - ollama: - specifier: ^0.5.9 - version: 0.5.9 rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -1867,6 +1870,10 @@ packages: resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + '@dabh/diagnostics@2.0.3': resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} @@ -2619,6 +2626,9 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@js-sdsl/ordered-map@4.4.2': resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==} @@ -3517,6 +3527,18 @@ packages: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} + '@tsconfig/node10@1.0.11': + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + '@types/aws-lambda@8.10.122': resolution: {integrity: sha512-vBkIh9AY22kVOCEKo5CJlyCgmSWvasC+SWUxL/x/vOwRobMpI/HG1xp/Ae3AqmSiZeLUbOhW0FCD3ZjqqUxmXw==} @@ -3586,6 +3608,9 @@ packages: '@types/jest@29.5.13': resolution: {integrity: sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/jsonwebtoken@9.0.6': resolution: {integrity: sha512-/5hndP5dCjloafCXns6SZyESp3Ldq7YjH3zwzwczYnjxIT0Fqzk5ROSYVGfFyczIue7IUEj8hkvLbPoLQ18vQw==} @@ -3695,6 +3720,10 @@ packages: peerDependencies: acorn: ^8 + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + acorn@8.11.3: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} @@ -3758,6 +3787,9 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -4075,6 +4107,9 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + cross-env@7.0.3: resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} @@ -4195,6 +4230,10 @@ packages: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + digest-fetch@1.3.0: resolution: {integrity: sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==} @@ -6322,6 +6361,20 @@ packages: resolution: {integrity: sha512-DiwiXfwvcTeZ5wCE0z+2A9EseZsztaiZtGrtSaY5JOD7ekPnR/GoIVD5gXZAlK9Na9Kvpo9Waz5rW64WKAWApg==} engines: {node: '>=12'} + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} @@ -6489,6 +6542,9 @@ packages: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + v8-to-istanbul@9.3.0: resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} @@ -6629,6 +6685,10 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -6889,6 +6949,11 @@ snapshots: '@colors/colors@1.6.0': {} + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + optional: true + '@dabh/diagnostics@2.0.3': dependencies: colorspace: 1.1.4 @@ -7684,7 +7749,7 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -7698,7 +7763,42 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.16.9) + jest-config: 29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.5 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.16.9 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -7854,6 +7954,12 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + optional: true + '@js-sdsl/ordered-map@4.4.2': {} '@langchain/community@0.0.53(@pinecone-database/pinecone@2.2.0)(chromadb@1.9.2(encoding@0.1.13)(openai@4.53.0(encoding@0.1.13)))(encoding@0.1.13)(firebase-admin@12.3.1(encoding@0.1.13))(google-auth-library@8.9.0(encoding@0.1.13))(jsonwebtoken@9.0.2)': @@ -8665,6 +8771,18 @@ snapshots: '@tootallnate/once@2.0.0': {} + '@tsconfig/node10@1.0.11': + optional: true + + '@tsconfig/node12@1.0.11': + optional: true + + '@tsconfig/node14@1.0.3': + optional: true + + '@tsconfig/node16@1.0.4': + optional: true + '@types/aws-lambda@8.10.122': {} '@types/babel__core@7.20.5': @@ -8763,6 +8881,8 @@ snapshots: expect: 29.7.0 pretty-format: 29.7.0 + '@types/json-schema@7.0.15': {} + '@types/jsonwebtoken@9.0.6': dependencies: '@types/node': 20.16.9 @@ -8881,6 +9001,11 @@ snapshots: dependencies: acorn: 8.11.3 + acorn-walk@8.3.4: + dependencies: + acorn: 8.11.3 + optional: true + acorn@8.11.3: {} agent-base@6.0.2: @@ -8937,6 +9062,9 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 + arg@4.1.3: + optional: true + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -9277,13 +9405,13 @@ snapshots: object-assign: 4.1.1 vary: 1.1.2 - create-jest@29.7.0(@types/node@20.11.30): + create-jest@29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.11.30) + jest-config: 29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -9292,13 +9420,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@20.16.9): + create-jest@29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.16.9) + jest-config: 29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -9307,6 +9435,9 @@ snapshots: - supports-color - ts-node + create-require@1.1.1: + optional: true + cross-env@7.0.3: dependencies: cross-spawn: 7.0.6 @@ -9406,6 +9537,9 @@ snapshots: diff-sequences@29.6.3: {} + diff@4.0.2: + optional: true + digest-fetch@1.3.0: dependencies: base-64: 0.1.0 @@ -10489,16 +10623,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.11.30): + jest-cli@29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)): dependencies: - '@jest/core': 29.7.0 + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.11.30) + create-jest: 29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.11.30) + jest-config: 29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -10508,16 +10642,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@20.16.9): + jest-cli@29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)): dependencies: - '@jest/core': 29.7.0 + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.16.9) + create-jest: 29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.16.9) + jest-config: 29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -10527,7 +10661,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.11.30): + jest-config@29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)): dependencies: '@babel/core': 7.25.7 '@jest/test-sequencer': 29.7.0 @@ -10553,11 +10687,12 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.11.30 + ts-node: 10.9.2(@types/node@20.11.30)(typescript@4.9.5) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.16.9): + jest-config@29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)): dependencies: '@babel/core': 7.25.7 '@jest/test-sequencer': 29.7.0 @@ -10583,6 +10718,38 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.16.9 + ts-node: 10.9.2(@types/node@20.11.30)(typescript@4.9.5) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-config@29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)): + dependencies: + '@babel/core': 7.25.7 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.25.7) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.16.9 + ts-node: 10.9.2(@types/node@20.16.9)(typescript@5.6.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -10802,24 +10969,24 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.11.30): + jest@29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)): dependencies: - '@jest/core': 29.7.0 + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.11.30) + jest-cli: 29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros - supports-color - ts-node - jest@29.7.0(@types/node@20.16.9): + jest@29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)): dependencies: - '@jest/core': 29.7.0 + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.16.9) + jest-cli: 29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -12094,12 +12261,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.11.30))(typescript@4.9.5): + ts-jest@29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)))(typescript@4.9.5): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.11.30) + jest: 29.7.0(@types/node@20.11.30)(ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -12113,12 +12280,12 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.25.7) - ts-jest@29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.16.9))(typescript@5.6.3): + ts-jest@29.2.5(@babel/core@7.25.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.7))(jest@29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.16.9) + jest: 29.7.0(@types/node@20.16.9)(ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -12134,6 +12301,44 @@ snapshots: ts-md5@1.3.1: {} + ts-node@10.9.2(@types/node@20.11.30)(typescript@4.9.5): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.11.30 + acorn: 8.11.3 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.5 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optional: true + + ts-node@10.9.2(@types/node@20.16.9)(typescript@5.6.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.16.9 + acorn: 8.11.3 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.6.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optional: true + tslib@2.6.2: {} tsup@8.3.5(postcss@8.4.47)(tsx@4.19.2)(typescript@4.9.5)(yaml@2.4.1): @@ -12352,6 +12557,9 @@ snapshots: uuid@9.0.1: {} + v8-compile-cache-lib@3.0.1: + optional: true + v8-to-istanbul@9.3.0: dependencies: '@jridgewell/trace-mapping': 0.3.25 @@ -12500,6 +12708,9 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 + yn@3.1.1: + optional: true + yocto-queue@0.1.0: {} zod-to-json-schema@3.22.5(zod@3.23.8): diff --git a/js/tsconfig.json b/js/tsconfig.json index 0b00e340d..f97e2100c 100644 --- a/js/tsconfig.json +++ b/js/tsconfig.json @@ -3,17 +3,16 @@ "declaration": true, "module": "NodeNext", "moduleResolution": "NodeNext", - "noImplicitReturns": false, - "noUnusedLocals": false, + "allowSyntheticDefaultImports": true, + "noImplicitReturns": true, + "noUnusedLocals": true, "noImplicitAny": false, "resolveJsonModule": true, "sourceMap": true, "esModuleInterop": true, "strict": true, - "target": "es2015", - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "typeRoots": ["./node_modules/@types"], + "target": "es2022", + "lib": ["es2022"], "noEmit": true }, "compileOnSave": true diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f00f333a9..52702ed5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,7 +37,7 @@ importers: version: 6.0.1 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@20.12.11)(typescript@5.4.5) + version: 10.9.2(@types/node@22.10.5)(typescript@5.4.5) tsx: specifier: ^4.19.2 version: 4.19.2 @@ -200,8 +200,8 @@ packages: resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} @@ -218,15 +218,15 @@ packages: '@tsconfig/node16@1.0.4': resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - '@types/node@20.12.11': - resolution: {integrity: sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==} + '@types/node@22.10.5': + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} - acorn-walk@8.3.2: - resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} engines: {node: '>=0.4.0'} - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true @@ -1013,8 +1013,8 @@ packages: unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -1153,12 +1153,12 @@ snapshots: '@jridgewell/resolve-uri@3.1.2': {} - '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@tsconfig/node10@1.0.11': {} @@ -1168,13 +1168,15 @@ snapshots: '@tsconfig/node16@1.0.4': {} - '@types/node@20.12.11': + '@types/node@22.10.5': dependencies: - undici-types: 5.26.5 + undici-types: 6.20.0 - acorn-walk@8.3.2: {} + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.0 - acorn@8.11.3: {} + acorn@8.14.0: {} ansi-escapes@4.3.2: dependencies: @@ -2018,16 +2020,16 @@ snapshots: dependencies: os-tmpdir: 1.0.2 - ts-node@10.9.2(@types/node@20.12.11)(typescript@5.4.5): + ts-node@10.9.2(@types/node@22.10.5)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.12.11 - acorn: 8.11.3 - acorn-walk: 8.3.2 + '@types/node': 22.10.5 + acorn: 8.14.0 + acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 @@ -2090,7 +2092,7 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - undici-types@5.26.5: {} + undici-types@6.20.0: {} util-deprecate@1.0.2: {}