Check script which typechecks using Typescripts new Go port (#1075)
This commit is contained in:
parent
9757ace06e
commit
11f04e1b0b
4 changed files with 133 additions and 10 deletions
|
|
@ -311,7 +311,10 @@ export class StreamableHTTPClientTransport implements Transport {
|
|||
// if something happens reader will throw
|
||||
try {
|
||||
// Create a pipeline: binary stream -> text decoder -> SSE parser
|
||||
const reader = stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream()).getReader();
|
||||
const reader = stream
|
||||
.pipeThrough(new TextDecoderStream() as ReadableWritablePair<string, Uint8Array>)
|
||||
.pipeThrough(new EventSourceParserStream())
|
||||
.getReader();
|
||||
|
||||
while (true) {
|
||||
const { value: event, done } = await reader.read();
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import {
|
|||
} from '../../types.js';
|
||||
import { InMemoryEventStore } from '../shared/inMemoryEventStore.js';
|
||||
import { setupAuthServer } from './demoInMemoryOAuthProvider.js';
|
||||
import { OAuthMetadata } from 'src/shared/auth.js';
|
||||
import { checkResourceAllowed } from 'src/shared/auth-utils.js';
|
||||
import { OAuthMetadata } from '../../shared/auth.js';
|
||||
import { checkResourceAllowed } from '../../shared/auth-utils.js';
|
||||
|
||||
import cors from 'cors';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { McpServer } from './mcp.js';
|
|||
import { createServer, type Server } from 'node:http';
|
||||
import { AddressInfo } from 'node:net';
|
||||
import { z } from 'zod';
|
||||
import { CallToolResult, JSONRPCMessage } from 'src/types.js';
|
||||
import { CallToolResult, JSONRPCMessage } from '../types.js';
|
||||
|
||||
const createMockResponse = () => {
|
||||
const res = {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* (note: a few don't have SDK types, see MISSING_SDK_TYPES below)
|
||||
*/
|
||||
import * as SDKTypes from './types.js';
|
||||
import * as SpecTypes from '../spec.types.js';
|
||||
import * as SpecTypes from './spec.types.js';
|
||||
import fs from 'node:fs';
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
|
@ -443,7 +443,7 @@ const sdkTypeChecks = {
|
|||
};
|
||||
|
||||
// This file is .gitignore'd, and fetched by `npm run fetch:spec-types` (called by `npm run test`)
|
||||
const SPEC_TYPES_FILE = 'spec.types.ts';
|
||||
const SPEC_TYPES_FILE = 'src/spec.types.ts';
|
||||
const SDK_TYPES_FILE = 'src/types.ts';
|
||||
|
||||
const MISSING_SDK_TYPES = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue