diff --git a/.changeset/eighty-poets-roll.md b/.changeset/eighty-poets-roll.md new file mode 100644 index 0000000000000..292d14259572e --- /dev/null +++ b/.changeset/eighty-poets-roll.md @@ -0,0 +1,10 @@ +--- +'@graphql-mesh/supergraph': minor +'@graphql-mesh/graphql': minor +'@omnigraph/json-schema': minor +'@omnigraph/openapi': minor +'json-machete': minor +'@graphql-mesh/utils': minor +--- + +Use `fetch` with `file://` to access files diff --git a/.changeset/lucky-otters-cough.md b/.changeset/lucky-otters-cough.md new file mode 100644 index 0000000000000..89edb19d98d07 --- /dev/null +++ b/.changeset/lucky-otters-cough.md @@ -0,0 +1,5 @@ +--- +'@graphql-mesh/utils': minor +--- + +Use `URL.canParse` to check if it is URL diff --git a/examples/json-schema-file-upload/tests/json-schema-file-upload.test.ts b/examples/json-schema-file-upload/tests/json-schema-file-upload.test.ts index 43a2d9b70f837..15a4b0c932c10 100644 --- a/examples/json-schema-file-upload/tests/json-schema-file-upload.test.ts +++ b/examples/json-schema-file-upload/tests/json-schema-file-upload.test.ts @@ -12,7 +12,7 @@ describe('JSON Schema File Uploads', () => { }); mesh = await getMesh({ ...config, - fetchFn: router.fetch as any, + fetchFn: router.fetch, }); }); afterAll(() => { diff --git a/examples/json-schema-subscriptions/api/app.ts b/examples/json-schema-subscriptions/api/app.ts index 7c70010b40523..0b3de4ebf9206 100644 --- a/examples/json-schema-subscriptions/api/app.ts +++ b/examples/json-schema-subscriptions/api/app.ts @@ -1,7 +1,8 @@ import { createRouter, Response } from 'fets'; +import { MeshFetch } from '@graphql-mesh/types'; import { fetch as defaultFetch } from '@whatwg-node/fetch'; -export function createApi(fetch = defaultFetch) { +export function createApi(fetch: MeshFetch = defaultFetch) { let todos = []; const app = createRouter() @@ -20,13 +21,18 @@ export function createApi(fetch = defaultFetch) { ...reqBody, }; todos.push(todo); - await fetch('http://127.0.0.1:4000/webhooks/todo_added', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify(todo), - }).catch(console.log); + try { + const res = await fetch('http://127.0.0.1:4000/webhooks/todo_added', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(todo), + }); + console.log('Webhook response', await res.text()); + } catch (e) { + console.error('Failed to send webhook', e); + } return Response.json(todo); }, }); diff --git a/examples/json-schema-subscriptions/tests/json-schema-subscriptions.test.ts b/examples/json-schema-subscriptions/tests/json-schema-subscriptions.test.ts index 1ed97ac1f2fa8..4542ea4012d7b 100644 --- a/examples/json-schema-subscriptions/tests/json-schema-subscriptions.test.ts +++ b/examples/json-schema-subscriptions/tests/json-schema-subscriptions.test.ts @@ -24,7 +24,7 @@ describe('JSON Schema Subscriptions', () => { baseDir, getBuiltMesh: () => fakePromise(mesh), }); - const api = createApi(meshHttp.fetch as any); + const api = createApi(meshHttp.fetch); }); afterEach(() => { resetTodos(); diff --git a/package.json b/package.json index 3de31362d3995..b91f6e3927770 100644 --- a/package.json +++ b/package.json @@ -108,8 +108,14 @@ }, "resolutions": { "@changesets/assemble-release-plan": "patch:@changesets/assemble-release-plan@npm%3A5.2.3#~/.yarn/patches/@changesets-assemble-release-plan-npm-5.2.3-296454a28f.patch", + "@graphql-tools/graphql-file-loader": "8.0.13-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f", + "@graphql-tools/json-file-loader": "8.0.12-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f", + "@graphql-tools/load": "8.0.13-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f", + "@graphql-tools/merge": "9.0.18-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f", + "@graphql-tools/url-loader": "8.0.25-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f", + "@graphql-tools/utils": "10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f", "@whatwg-node/fetch": "0.10.3", - "@whatwg-node/node-fetch": "0.7.7", + "@whatwg-node/node-fetch": "0.7.8-alpha-20250124174946-bf76ab63fc7e7c5ee6898f3bf12f95ef0ac79a63", "@whatwg-node/server": "0.9.65", "axios": "^1.0.0", "cross-fetch": "^4.0.0", diff --git a/packages/json-machete/src/dereferenceObject.ts b/packages/json-machete/src/dereferenceObject.ts index 1781f9acb1782..e6130672c629f 100644 --- a/packages/json-machete/src/dereferenceObject.ts +++ b/packages/json-machete/src/dereferenceObject.ts @@ -1,5 +1,6 @@ import JsonPointer from 'json-pointer'; import urlJoin from 'url-join'; +import type { MeshFetch } from '@graphql-mesh/types'; import { handleUntitledDefinitions } from './healUntitledDefinitions.js'; export const resolvePath = (path: string, root: any): any => { @@ -61,6 +62,7 @@ export async function dereferenceObject( obj: T, { cwd = globalThis?.process.cwd(), + fetch, externalFileCache = new Map(), refMap = new Map(), root = obj as any, @@ -69,11 +71,12 @@ export async function dereferenceObject( resolvedObjects = new WeakSet(), }: { cwd?: string; + fetch: MeshFetch; externalFileCache?: Map; refMap?: Map; root?: TRoot; debugLogFn?(message?: any): void; - readFileOrUrl(path: string, opts: { cwd: string }): Promise | any; + readFileOrUrl(path: string, opts: { cwd: string; fetch: MeshFetch }): Promise | any; resolvedObjects?: WeakSet; }, ): Promise { @@ -91,7 +94,7 @@ export async function dereferenceObject( let externalFile = externalFileCache.get(externalFilePath); if (!externalFile) { try { - externalFile = await readFileOrUrl(externalFilePath, { cwd }); + externalFile = await readFileOrUrl(externalFilePath, { cwd, fetch }); } catch (e) { console.error(e); throw new Error(`Unable to load ${externalRelativeFilePath} from ${cwd}`); @@ -137,6 +140,7 @@ export async function dereferenceObject( readFileOrUrl, root: externalFile, resolvedObjects, + fetch, }, ); refMap.set($ref, result); @@ -161,6 +165,7 @@ export async function dereferenceObject( */ const result = await dereferenceObject(resolvedObj, { cwd, + fetch, externalFileCache, refMap, root, @@ -193,6 +198,7 @@ export async function dereferenceObject( debugLogFn, readFileOrUrl, resolvedObjects, + fetch, }); } } diff --git a/packages/legacy/handlers/graphql/src/index.ts b/packages/legacy/handlers/graphql/src/index.ts index f968bde570129..a3d18f5fefde2 100644 --- a/packages/legacy/handlers/graphql/src/index.ts +++ b/packages/legacy/handlers/graphql/src/index.ts @@ -263,14 +263,14 @@ export default class GraphQLHandler implements MeshHandler { source: schemaConfig, }: YamlConfig.GraphQLHandlerCodeFirstConfiguration): Promise { if (schemaConfig.endsWith('.graphql')) { - const rawSDL = await readFileOrUrl(schemaConfig, { + const rawAst = await readFileOrUrl(schemaConfig, { cwd: this.baseDir, allowUnknownExtensions: true, importFn: this.importFn, fetch: this.fetchFn, logger: this.logger, }); - const schema = buildSchema(rawSDL, { + const schema = buildASTSchema(rawAst, { assumeValid: true, assumeValidSDL: true, }); diff --git a/packages/legacy/handlers/supergraph/src/index.ts b/packages/legacy/handlers/supergraph/src/index.ts index 90720095eac79..4699f1b35ea05 100644 --- a/packages/legacy/handlers/supergraph/src/index.ts +++ b/packages/legacy/handlers/supergraph/src/index.ts @@ -66,7 +66,9 @@ export default class SupergraphHandler implements MeshHandler { fetch: this.fetchFn, logger: this.logger, }).catch(e => { - throw new Error(`Failed to load supergraph SDL from ${interpolatedSource}:\n ${e.message}`); + throw new Error( + `Supergraph source must be a valid GraphQL SDL string or a parsed DocumentNode, but got an invalid result from ${interpolatedSource} instead.\n Got error: ${e.message}`, + ); }); return handleSupergraphResponse(res, interpolatedSource); } @@ -81,7 +83,9 @@ export default class SupergraphHandler implements MeshHandler { fetch: this.fetchFn, logger: this.logger, }).catch(e => { - throw new Error(`Failed to load supergraph SDL from ${interpolatedSource}:\n ${e.message}`); + throw new Error( + `Supergraph source must be a valid GraphQL SDL string or a parsed DocumentNode, but got an invalid result from ${interpolatedSource} instead.\n Got error: ${e.message}`, + ); }); return handleSupergraphResponse(sdlOrIntrospection, interpolatedSource); }); diff --git a/packages/legacy/handlers/supergraph/tests/supergraph.spec.ts b/packages/legacy/handlers/supergraph/tests/supergraph.spec.ts index 92576d10b92b9..9e26f107641d3 100644 --- a/packages/legacy/handlers/supergraph/tests/supergraph.spec.ts +++ b/packages/legacy/handlers/supergraph/tests/supergraph.spec.ts @@ -246,8 +246,6 @@ describe('Supergraph', () => { expect(logger.error.mock.calls[0][0].toString()) .toBe(`Failed to generate the schema for the source Supergraph source must be a valid GraphQL SDL string or a parsed DocumentNode, but got an invalid result from ./fixtures/supergraph-invalid.graphql instead. - Got result: type Query { - Got error: Syntax Error: Expected Name, found .`); }); it('throws a helpful error when the source is down', async () => { @@ -270,8 +268,8 @@ describe('Supergraph', () => { ).rejects.toThrow(); expect(logger.error.mock.calls[0][0].toString()) .toBe(`Failed to generate the schema for the source - Failed to load supergraph SDL from http://down-sdl-source.com/my-sdl.graphql: - getaddrinfo ENOTFOUND down-sdl-source.com`); + Supergraph source must be a valid GraphQL SDL string or a parsed DocumentNode, but got an invalid result from http://down-sdl-source.com/my-sdl.graphql instead. + Got error: getaddrinfo ENOTFOUND down-sdl-source.com`); }); it('configures WebSockets for subscriptions correctly', async () => { await using authorsHttpServer = await createDisposableServer(authorsServer); diff --git a/packages/legacy/testing/getTestMesh.ts b/packages/legacy/testing/getTestMesh.ts index 04285c0d02529..67db240a6c790 100644 --- a/packages/legacy/testing/getTestMesh.ts +++ b/packages/legacy/testing/getTestMesh.ts @@ -46,7 +46,7 @@ export function getTestMesh(extraOptions?: Partial) { validate: false, }); return getMesh({ - fetchFn: yoga.fetch as any, + fetchFn: yoga.fetch, sources: [ { name: 'Yoga', diff --git a/packages/legacy/utils/src/read-file-or-url.ts b/packages/legacy/utils/src/read-file-or-url.ts index 8286eb092f270..823231a09c9ff 100644 --- a/packages/legacy/utils/src/read-file-or-url.ts +++ b/packages/legacy/utils/src/read-file-or-url.ts @@ -1,22 +1,22 @@ +import { parse, Source } from 'graphql'; import type { Schema } from 'js-yaml'; import { DEFAULT_SCHEMA, load as loadYamlFromJsYaml, Type } from 'js-yaml'; import { fs, path as pathModule } from '@graphql-mesh/cross-helpers'; import type { ImportFn, Logger, MeshFetch, MeshFetchRequestInit } from '@graphql-mesh/types'; -import { fetch } from '@whatwg-node/fetch'; +import { isUrl, isValidPath, mapMaybePromise } from '@graphql-tools/utils'; +import { fetch as defaultFetch } from '@whatwg-node/fetch'; import { loadFromModuleExportExpression } from './load-from-module-export-expression.js'; export interface ReadFileOrUrlOptions extends MeshFetchRequestInit { allowUnknownExtensions?: boolean; - fallbackFormat?: 'json' | 'yaml' | 'js' | 'ts'; + fallbackFormat?: 'json' | 'yaml' | 'js' | 'ts' | 'graphql'; cwd: string; fetch: MeshFetch; importFn: ImportFn; logger: Logger; } -export function isUrl(str: string): boolean { - return /^https?:\/\//.test(str); -} +export { isUrl }; export async function readFileOrUrl( filePathOrUrl: string, @@ -25,11 +25,17 @@ export async function readFileOrUrl( if (isUrl(filePathOrUrl)) { config.logger.debug(`Fetching ${filePathOrUrl} via HTTP`); return readUrl(filePathOrUrl, config); - } else if (filePathOrUrl.startsWith('{') || filePathOrUrl.startsWith('[')) { + } else if ( + filePathOrUrl.startsWith('{') || + filePathOrUrl.startsWith('[') || + filePathOrUrl.startsWith('"') + ) { return JSON.parse(filePathOrUrl); - } else { + } else if (isValidPath(filePathOrUrl)) { config.logger.debug(`Reading ${filePathOrUrl} from the file system`); return readFile(filePathOrUrl, config); + } else { + return filePathOrUrl as T; } } @@ -80,48 +86,77 @@ export function loadYaml(filepath: string, content: string, logger: Logger): any }); } -export async function readFile( +function isAbsolute(path: string): boolean { + return path.startsWith('/') || /^[A-Z]:\\/i.test(path); +} + +export function readFile( fileExpression: string, - { allowUnknownExtensions, cwd, fallbackFormat, importFn, logger }: ReadFileOrUrlOptions, + { + allowUnknownExtensions, + cwd, + fallbackFormat, + importFn, + logger, + fetch = defaultFetch, + }: ReadFileOrUrlOptions, ): Promise { const [filePath] = fileExpression.split('#'); - if (/js$/.test(filePath) || /ts$/.test(filePath)) { - return loadFromModuleExportExpression(fileExpression, { - cwd, - importFn, - defaultExportName: 'default', - }); - } - const actualPath = pathModule.isAbsolute(filePath) ? filePath : pathModule.join(cwd, filePath); - const rawResult = await fs.promises.readFile(actualPath, 'utf-8'); - if (/json$/.test(actualPath)) { - return JSON.parse(rawResult); - } - if (/yaml$/.test(actualPath) || /yml$/.test(actualPath)) { - return loadYaml(actualPath, rawResult, logger); - } else if (fallbackFormat) { - switch (fallbackFormat) { - case 'json': - return JSON.parse(rawResult); - case 'yaml': - return loadYaml(actualPath, rawResult, logger); - case 'ts': - case 'js': - return importFn(actualPath); - } - } else if (!allowUnknownExtensions) { - throw new Error( - `Failed to parse JSON/YAML. Ensure file '${filePath}' has ` + - `the correct extension (i.e. '.json', '.yaml', or '.yml).`, + if (/js$/.test(filePath) || /ts$/.test(filePath) || /json$/.test(filePath)) { + return mapMaybePromise( + loadFromModuleExportExpression(fileExpression, { + cwd, + importFn, + defaultExportName: 'default', + }), + res => JSON.parse(JSON.stringify(res)), ); } - return rawResult as unknown as T; + const actualPath = isAbsolute(filePath) ? filePath : `${cwd}/${filePath}`; + const url = `file://${actualPath}`; + return mapMaybePromise(fetch(url), res => { + if (/json$/.test(actualPath) || res.headers.get('content-type')?.includes('json')) { + return res.json(); + } + return mapMaybePromise(res.text(), rawResult => { + if (/yaml$/.test(actualPath) || /yml$/.test(actualPath)) { + return loadYaml(actualPath, rawResult, logger); + } else if ( + /graphql$/.test(actualPath) || + /graphqls$/.test(actualPath) || + /gql$/.test(actualPath) || + /gqls$/.test(actualPath) || + res.headers.get('content-type')?.includes('graphql') + ) { + const source = new Source(rawResult, actualPath); + return parse(source); + } else if (fallbackFormat) { + switch (fallbackFormat) { + case 'json': + return JSON.parse(rawResult); + case 'yaml': + return loadYaml(actualPath, rawResult, logger); + case 'ts': + case 'js': + return importFn(actualPath); + case 'graphql': + return parse(new Source(rawResult, actualPath)); + } + } else if (!allowUnknownExtensions) { + throw new Error( + `Failed to parse JSON/YAML. Ensure file '${filePath}' has ` + + `the correct extension (i.e. '.json', '.yaml', or '.yml).`, + ); + } + return rawResult as unknown as T; + }); + }); } export async function readUrl(path: string, config: ReadFileOrUrlOptions): Promise { const { allowUnknownExtensions, fallbackFormat } = config || {}; config.headers ||= {}; - config.fetch ||= fetch; + config.fetch ||= defaultFetch; const response = await config.fetch(path, config); const contentType = response.headers?.get('content-type') || ''; const responseText = await response.text(); diff --git a/packages/loaders/json-schema/src/getDereferencedJSONSchemaFromOperations.ts b/packages/loaders/json-schema/src/getDereferencedJSONSchemaFromOperations.ts index e0a6e4128e517..72a2ecae4c72e 100644 --- a/packages/loaders/json-schema/src/getDereferencedJSONSchemaFromOperations.ts +++ b/packages/loaders/json-schema/src/getDereferencedJSONSchemaFromOperations.ts @@ -51,6 +51,7 @@ export async function getDereferencedJSONSchemaFromOperations({ }); const fullyDeferencedSchema = await dereferenceObject(referencedJSONSchema, { cwd, + fetch: fetchFn, debugLogFn: dereferenceObjectLogger.debug.bind(dereferenceObjectLogger), readFileOrUrl: readFileOrUrlForJsonMachete, }); diff --git a/packages/loaders/openapi/src/getJSONSchemaOptionsFromOpenAPIOptions.ts b/packages/loaders/openapi/src/getJSONSchemaOptionsFromOpenAPIOptions.ts index 63523735a1561..d2a3c43752fe4 100644 --- a/packages/loaders/openapi/src/getJSONSchemaOptionsFromOpenAPIOptions.ts +++ b/packages/loaders/openapi/src/getJSONSchemaOptionsFromOpenAPIOptions.ts @@ -90,7 +90,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions( source, fallbackFormat, cwd, - fetch: fetchFn, + fetch, endpoint, schemaHeaders, operationHeaders, @@ -125,7 +125,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions( const readFileOrUrlForJsonMachete = (path: string, opts: { cwd: string }) => readFileOrUrl(path, { cwd: opts.cwd, - fetch: fetchFn, + fetch, headers: schemaHeadersFactory({ env: process.env }), importFn: defaultImportFn, logger, @@ -138,6 +138,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions( }, { cwd, + fetch, readFileOrUrl: readFileOrUrlForJsonMachete, debugLogFn: logger.debug.bind(logger), }, @@ -147,6 +148,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions( cwd, readFileOrUrl: readFileOrUrlForJsonMachete, debugLogFn: logger.debug.bind(logger), + fetch, }); } @@ -710,6 +712,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions( cwd, root: oasOrSwagger, readFileOrUrl: readFileOrUrlForJsonMachete, + fetch, }, ); responseByStatusCode[responseKey].links = responseByStatusCode[responseKey].links || {}; @@ -842,7 +845,7 @@ export async function getJSONSchemaOptionsFromOpenAPIOptions( operations, endpoint, cwd, - fetch: fetchFn, + fetch, schemaHeaders, operationHeaders, }; diff --git a/packages/loaders/openapi/tests/additionalProperties.test.ts b/packages/loaders/openapi/tests/additionalProperties.test.ts index c8ac550cb6207..0275d8fe52234 100644 --- a/packages/loaders/openapi/tests/additionalProperties.test.ts +++ b/packages/loaders/openapi/tests/additionalProperties.test.ts @@ -33,7 +33,7 @@ describe('additionalProperties', () => { source: './fixtures/additionalProperties.json', endpoint: 'http://localhost:3000', cwd: __dirname, - fetch: router.fetch as any, + fetch: router.fetch, }); }); it('should generate the schema correctly', async () => { diff --git a/packages/loaders/openapi/tests/allof-properties.test.ts b/packages/loaders/openapi/tests/allof-properties.test.ts index 203b948bdc4b9..ac35b06fe73a3 100644 --- a/packages/loaders/openapi/tests/allof-properties.test.ts +++ b/packages/loaders/openapi/tests/allof-properties.test.ts @@ -1,5 +1,6 @@ import { GraphQLSchema } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('Merge attributes correctly in allOfs', () => { @@ -8,6 +9,7 @@ describe('Merge attributes correctly in allOfs', () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { source: './fixtures/allof-properties.yml', cwd: __dirname, + fetch, ignoreErrorResponses: true, // It is not possible to provide a union type with File scalar }); diff --git a/packages/loaders/openapi/tests/authentication.test.ts b/packages/loaders/openapi/tests/authentication.test.ts index 3a3012d98c067..51826f2a44ce7 100644 --- a/packages/loaders/openapi/tests/authentication.test.ts +++ b/packages/loaders/openapi/tests/authentication.test.ts @@ -30,7 +30,7 @@ describe('OpenAPI Loader: Authentication', () => { operationHeaders: { authorization: 'Basic {args.usernameAndPassword|base64}', }, - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, }); const result = await normalizedExecutor({ @@ -63,7 +63,7 @@ describe('OpenAPI Loader: Authentication', () => { operationHeaders: { access_token: '{args.apiKey}', }, - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, }); const result = await normalizedExecutor({ @@ -96,7 +96,7 @@ describe('OpenAPI Loader: Authentication', () => { operationHeaders: { cookie: 'access_token={args.apiKey}', }, - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, }); const result = await normalizedExecutor({ @@ -129,7 +129,7 @@ describe('OpenAPI Loader: Authentication', () => { queryParams: { access_token: '{args.apiKey}', }, - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, }); const result = await normalizedExecutor({ diff --git a/packages/loaders/openapi/tests/basket.test.ts b/packages/loaders/openapi/tests/basket.test.ts index 7a5ef433a8403..c4494d848c4e7 100644 --- a/packages/loaders/openapi/tests/basket.test.ts +++ b/packages/loaders/openapi/tests/basket.test.ts @@ -1,6 +1,6 @@ import { execute, parse } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; -import { Headers } from '@whatwg-node/fetch'; +import { fetch, Headers } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Basket', () => { @@ -8,6 +8,7 @@ describe('Basket', () => { const schema = await loadGraphQLSchemaFromOpenAPI('basket', { source: './fixtures/basket.json', cwd: __dirname, + fetch, }); expect(printSchemaWithDirectives(schema)).toMatchSnapshot(); }); diff --git a/packages/loaders/openapi/tests/calendly.test.ts b/packages/loaders/openapi/tests/calendly.test.ts index 47967bb173b38..0f7f1a111a4b9 100644 --- a/packages/loaders/openapi/tests/calendly.test.ts +++ b/packages/loaders/openapi/tests/calendly.test.ts @@ -1,5 +1,7 @@ import { graphql } from 'graphql'; +import type { MeshFetchRequestInit } from '@graphql-mesh/types'; import { fakePromise, printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch as defaultFetch, Headers } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Calendly', () => { @@ -7,6 +9,7 @@ describe('Calendly', () => { const schema = await loadGraphQLSchemaFromOpenAPI('calendly', { source: './fixtures/calendly.yml', cwd: __dirname, + fetch: defaultFetch, }); expect(printSchemaWithDirectives(schema)).toMatchSnapshot(); }); @@ -19,18 +22,23 @@ describe('Calendly', () => { } } `; - const fetch = jest.fn(() => + const fetch = jest.fn((_url: string, _opts: MeshFetchRequestInit) => fakePromise({ json: () => fakePromise({}), text: () => fakePromise(''), - + headers: new Headers(), ok: true, } as Response), ); const createdSchema = await loadGraphQLSchemaFromOpenAPI('calendly', { source: './fixtures/calendly.yml', cwd: __dirname, - fetch, + fetch(url, opts) { + if (url.startsWith('file:')) { + return defaultFetch(url, opts); + } + return fetch(url, opts); + }, }); return graphql({ schema: createdSchema, source: query }).then((result: any) => { expect((fetch.mock.calls[0] as string[])[0]).toEqual( @@ -47,7 +55,7 @@ describe('Calendly', () => { } } `; - const fetch = jest.fn(() => + const fetch = jest.fn((_url: string, _opts: MeshFetchRequestInit) => fakePromise({ json: () => fakePromise({}), text: () => fakePromise(''), @@ -58,7 +66,12 @@ describe('Calendly', () => { const createdSchema = await loadGraphQLSchemaFromOpenAPI('calendly', { source: './fixtures/calendly.yml', cwd: __dirname, - fetch, + fetch(url, opts) { + if (url.startsWith('file:')) { + return defaultFetch(url, opts); + } + return fetch(url, opts); + }, }); return graphql({ schema: createdSchema, source: query }).then((result: any) => { diff --git a/packages/loaders/openapi/tests/cloudfunction.test.ts b/packages/loaders/openapi/tests/cloudfunction.test.ts index 1779c92eea9d3..bab808ba67077 100644 --- a/packages/loaders/openapi/tests/cloudfunction.test.ts +++ b/packages/loaders/openapi/tests/cloudfunction.test.ts @@ -1,5 +1,6 @@ import { GraphQLSchema, parse, validate } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('OpenAPI Loader: Cloudfunction', () => { @@ -9,6 +10,7 @@ describe('OpenAPI Loader: Cloudfunction', () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { source: './fixtures/cloudfunction.json', cwd: __dirname, + fetch, operationHeaders: { Authorization: 'Basic {args.usernamePassword|base64}', }, diff --git a/packages/loaders/openapi/tests/cloudfunction_expanded.test.ts b/packages/loaders/openapi/tests/cloudfunction_expanded.test.ts index 5b6619f176c0a..eb7147b17e916 100644 --- a/packages/loaders/openapi/tests/cloudfunction_expanded.test.ts +++ b/packages/loaders/openapi/tests/cloudfunction_expanded.test.ts @@ -1,6 +1,7 @@ import { join } from 'path'; import { GraphQLSchema, parse, validate } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('Cloudfunction', () => { @@ -8,6 +9,7 @@ describe('Cloudfunction', () => { beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { source: join(__dirname, './fixtures/cloudfunction_expanded.json'), + fetch, operationHeaders: { Authorization: 'Basic {args.usernamePassword|base64}', }, diff --git a/packages/loaders/openapi/tests/content-type.test.ts b/packages/loaders/openapi/tests/content-type.test.ts index 456c9a67cdd62..2827dbf1de0ff 100644 --- a/packages/loaders/openapi/tests/content-type.test.ts +++ b/packages/loaders/openapi/tests/content-type.test.ts @@ -1,5 +1,6 @@ import { createRouter, Response } from 'fets'; import { execute, parse } from 'graphql'; +import { fetch } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Query Params with POST', () => { @@ -15,7 +16,12 @@ describe('Query Params with POST', () => { const schema = await loadGraphQLSchemaFromOpenAPI('test', { source: './fixtures/multi-content-types.yml', endpoint: 'http://localhost:3000', - fetch: server.fetch as any, + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return server.fetch(url, opts); + }, cwd: __dirname, }); const query = /* GraphQL */ ` diff --git a/packages/loaders/openapi/tests/discriminator-invalid-key.test.ts b/packages/loaders/openapi/tests/discriminator-invalid-key.test.ts index f298144eba73f..acb3c59a404ca 100644 --- a/packages/loaders/openapi/tests/discriminator-invalid-key.test.ts +++ b/packages/loaders/openapi/tests/discriminator-invalid-key.test.ts @@ -1,6 +1,7 @@ import { createRouter, Response } from 'fets'; import { execute, GraphQLSchema, parse } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('Discriminator with invalid key in the mapping', () => { @@ -76,8 +77,12 @@ describe('Discriminator with invalid key in the mapping', () => { endpoint: 'http://localhost', cwd: __dirname, ignoreErrorResponses: true, - // @ts-ignore - fetch: router.fetch, + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return router.fetch(url, opts); + }, }); }); it('should generate correct schema', () => { diff --git a/packages/loaders/openapi/tests/discriminator.test.ts b/packages/loaders/openapi/tests/discriminator.test.ts index 2f6ca4962c70e..8feba57e680d7 100644 --- a/packages/loaders/openapi/tests/discriminator.test.ts +++ b/packages/loaders/openapi/tests/discriminator.test.ts @@ -1,6 +1,6 @@ import { execute, GraphQLSchema, parse } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; -import { Response } from '@whatwg-node/fetch'; +import { fetch, Response } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('Discriminator Mapping', () => { @@ -10,7 +10,10 @@ describe('Discriminator Mapping', () => { source: './fixtures/discriminator-mapping.yml', cwd: __dirname, ignoreErrorResponses: true, - async fetch(url) { + fetch(url) { + if (url.startsWith('file:')) { + return fetch(url); + } if (url === 'pets/1') { return Response.json({ petType: 'Dog', diff --git a/packages/loaders/openapi/tests/docusign.test.ts b/packages/loaders/openapi/tests/docusign.test.ts index 7f221ed78b3c7..487750e4baedd 100644 --- a/packages/loaders/openapi/tests/docusign.test.ts +++ b/packages/loaders/openapi/tests/docusign.test.ts @@ -1,5 +1,6 @@ import { GraphQLSchema } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('Docusign', () => { @@ -9,6 +10,7 @@ describe('Docusign', () => { source: './fixtures/docusign.json', ignoreErrorResponses: true, cwd: __dirname, + fetch, // It is not possible to provide a union type with File scalar }); }); diff --git a/packages/loaders/openapi/tests/empty-response.test.ts b/packages/loaders/openapi/tests/empty-response.test.ts index 27c564fc4b48c..339aaec5adcdc 100644 --- a/packages/loaders/openapi/tests/empty-response.test.ts +++ b/packages/loaders/openapi/tests/empty-response.test.ts @@ -1,5 +1,5 @@ import { execute, GraphQLSchema, parse } from 'graphql'; -import { Response } from '@whatwg-node/fetch'; +import { fetch, Response } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; let createdSchema: GraphQLSchema; @@ -10,7 +10,10 @@ describe('Empty JSON response', () => { */ beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { - async fetch(input, init) { + fetch(input, _init) { + if (input.startsWith('file:')) { + return fetch(input); + } return new Response(undefined, { headers: { 'Content-Type': 'application/json', diff --git a/packages/loaders/openapi/tests/escaped-values.test.ts b/packages/loaders/openapi/tests/escaped-values.test.ts index 59d06fda1f110..2c7ae432663b0 100644 --- a/packages/loaders/openapi/tests/escaped-values.test.ts +++ b/packages/loaders/openapi/tests/escaped-values.test.ts @@ -21,7 +21,7 @@ describe('Escaped Values', () => { source: './fixtures/escaped-values.json', cwd: __dirname, endpoint: 'http://localhost:3000/api', - fetch: router.fetch as any, + fetch: router.fetch, }); }); it('should generate the correct schema', () => { diff --git a/packages/loaders/openapi/tests/example_api.test.ts b/packages/loaders/openapi/tests/example_api.test.ts index 291cc59b29aed..027dcb2a5468e 100644 --- a/packages/loaders/openapi/tests/example_api.test.ts +++ b/packages/loaders/openapi/tests/example_api.test.ts @@ -10,6 +10,7 @@ import { } from 'graphql'; import 'json-bigint-patch'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import type { OpenAPILoaderOptions } from '../src/index.js'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; import { exampleApi } from './example_api_server.js'; @@ -20,7 +21,7 @@ describe('example_api', () => { beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('example_api', { - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, endpoint, source: './fixtures/example_oas.json', cwd: __dirname, @@ -1256,7 +1257,7 @@ describe('example_api', () => { endpoint, source: './fixtures/example_oas.json', cwd: __dirname, - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, operationHeaders: { exampleHeader: 'some-value', }, @@ -1851,7 +1852,7 @@ describe('example_api', () => { endpoint, source: './fixtures/example_oas.json', cwd: __dirname, - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, selectQueryOrMutationField: [ { fieldName: 'getUserByUsername', @@ -1922,7 +1923,7 @@ describe('example_api', () => { endpoint, source: './fixtures/example_oas.json', cwd: __dirname, - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, queryParams: { limit: '10', }, @@ -2041,7 +2042,12 @@ describe('example_api', () => { endpoint, source: './fixtures/example_oas.json', cwd: __dirname, - fetch: exampleApi.fetch as any, + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return exampleApi.fetch(url, opts); + }, queryParams: { limit: '1', }, @@ -2077,7 +2083,12 @@ describe('example_api', () => { endpoint, source: './fixtures/example_oas.json', cwd: __dirname, - fetch: exampleApi.fetch as any, + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return exampleApi.fetch(url, opts); + }, queryParams: { limit: 1, }, @@ -2116,7 +2127,12 @@ describe('example_api', () => { endpoint, source: './fixtures/example_oas.json', cwd: __dirname, - fetch: exampleApi.fetch as any, + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return exampleApi.fetch(url, opts); + }, operationHeaders: { snack_type: 'chips', snack_size: '{context.snack_size}', @@ -2149,7 +2165,12 @@ describe('example_api', () => { endpoint, source: './fixtures/example_oas.json', cwd: __dirname, - fetch: exampleApi.fetch as any, + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return exampleApi.fetch(url, opts); + }, operationHeaders: { snack_type: 'chips', snack_size: 'large', @@ -2180,7 +2201,7 @@ describe('example_api', () => { endpoint, source: './fixtures/example_oas.json', cwd: __dirname, - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, }; const schema = await loadGraphQLSchemaFromOpenAPI('example_api', options); diff --git a/packages/loaders/openapi/tests/example_api2.test.ts b/packages/loaders/openapi/tests/example_api2.test.ts index e18e323dc30ae..e4d1d76bd618b 100644 --- a/packages/loaders/openapi/tests/example_api2.test.ts +++ b/packages/loaders/openapi/tests/example_api2.test.ts @@ -16,7 +16,7 @@ describe('OpenAPI loader: Naming convention', () => { let createdSchema: GraphQLSchema; beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { - fetch: exampleApi2.fetch as any, + fetch: exampleApi2.fetch, endpoint: 'http://localhost:{context.port}/api', source: './fixtures/example_oas2.json', cwd: __dirname, diff --git a/packages/loaders/openapi/tests/example_api5.test.ts b/packages/loaders/openapi/tests/example_api5.test.ts index ef777e8353c98..35896e101100a 100644 --- a/packages/loaders/openapi/tests/example_api5.test.ts +++ b/packages/loaders/openapi/tests/example_api5.test.ts @@ -12,7 +12,7 @@ describe('OpenAPI Loader: Testing the naming convention', () => { beforeAll(async () => { // Update PORT for this test case: createdSchema = await loadGraphQLSchemaFromOpenAPI('example_api', { - fetch: exampleApi5.fetch as any, + fetch: exampleApi5.fetch, endpoint: 'http://localhost:3000/api', source: './fixtures/example_oas5.json', cwd: __dirname, diff --git a/packages/loaders/openapi/tests/example_api6.test.ts b/packages/loaders/openapi/tests/example_api6.test.ts index 3db306c01283a..eff530257f258 100644 --- a/packages/loaders/openapi/tests/example_api6.test.ts +++ b/packages/loaders/openapi/tests/example_api6.test.ts @@ -12,7 +12,7 @@ describe('example_api6', () => { const endpoint = 'http://localhost:3000/api'; beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('example_api6', { - fetch: exampleApi6.fetch as any, + fetch: exampleApi6.fetch, endpoint, source: './fixtures/example_oas6.json', cwd: __dirname, @@ -57,7 +57,7 @@ describe('example_api6', () => { endpoint, source: './fixtures/example_oas6.json', cwd: __dirname, - fetch: exampleApi6.fetch as any, + fetch: exampleApi6.fetch, operationHeaders: { specialheader: 'requestOptions', }, diff --git a/packages/loaders/openapi/tests/example_api7.test.ts b/packages/loaders/openapi/tests/example_api7.test.ts index d4e49d73eb4d3..87815bed24c5f 100644 --- a/packages/loaders/openapi/tests/example_api7.test.ts +++ b/packages/loaders/openapi/tests/example_api7.test.ts @@ -14,7 +14,7 @@ describe('OpenAPI Loader: example_api7', () => { // Set up the schema first and run example API servers beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('example_api7', { - fetch: exampleApi7.fetch as any, + fetch: exampleApi7.fetch, endpoint: `http://127.0.0.1:3000/api`, source: './fixtures/example_oas7.json', cwd: __dirname, diff --git a/packages/loaders/openapi/tests/example_api8.test.ts b/packages/loaders/openapi/tests/example_api8.test.ts index 566f79624e686..0942ccb7e0720 100644 --- a/packages/loaders/openapi/tests/example_api8.test.ts +++ b/packages/loaders/openapi/tests/example_api8.test.ts @@ -12,7 +12,7 @@ let createdSchema: GraphQLSchema; describe('OpenAPI loader: Empty upstream 404 response', () => { beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { - fetch: exampleApi8.fetch as any, + fetch: exampleApi8.fetch, endpoint: 'http://localhost:{context.port}/api', source: './fixtures/example_oas8.json', cwd: __dirname, diff --git a/packages/loaders/openapi/tests/example_api_combined.test.ts b/packages/loaders/openapi/tests/example_api_combined.test.ts index d1243fb970d85..2595653b4aef1 100644 --- a/packages/loaders/openapi/tests/example_api_combined.test.ts +++ b/packages/loaders/openapi/tests/example_api_combined.test.ts @@ -11,7 +11,7 @@ describe('Example API Combined', () => { source: './fixtures/example_oas_combined.json', cwd: __dirname, endpoint: 'http://localhost:3000/api', - fetch: exampleApi.fetch as any, + fetch: exampleApi.fetch, }); }); diff --git a/packages/loaders/openapi/tests/explode.test.ts b/packages/loaders/openapi/tests/explode.test.ts index 68da80cf78442..220ec289dd7af 100644 --- a/packages/loaders/openapi/tests/explode.test.ts +++ b/packages/loaders/openapi/tests/explode.test.ts @@ -1,5 +1,5 @@ import { execute, GraphQLSchema, parse } from 'graphql'; -import { Response } from '@whatwg-node/fetch'; +import { fetch, Response } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Explode parameter', () => { @@ -8,17 +8,13 @@ describe('Explode parameter', () => { schema = await loadGraphQLSchemaFromOpenAPI('explode', { source: './fixtures/explode.yml', cwd: __dirname, - async fetch(url) { - return new Response( - JSON.stringify({ - url, - }), - { - headers: { - 'Content-Type': 'application/json', - }, - }, - ); + fetch(url) { + if (url.startsWith('file:')) { + return fetch(url); + } + return Response.json({ + url, + }); }, }); }); diff --git a/packages/loaders/openapi/tests/file-upload.test.ts b/packages/loaders/openapi/tests/file-upload.test.ts index a57b68d725a7b..fdb70c72f2444 100644 --- a/packages/loaders/openapi/tests/file-upload.test.ts +++ b/packages/loaders/openapi/tests/file-upload.test.ts @@ -11,7 +11,7 @@ beforeAll(async () => { createdSchema = await loadGraphQLSchemaFromOpenAPI('file_upload', { source: './fixtures/file_upload.json', cwd: __dirname, - fetch: fileUploadApi.fetch as any, + fetch: fileUploadApi.fetch, }); createdSchemaYoga = createYoga({ schema: createdSchema, diff --git a/packages/loaders/openapi/tests/form-explode-oneof.test.ts b/packages/loaders/openapi/tests/form-explode-oneof.test.ts index 1dffeb04a0e7d..9aa4757166af1 100644 --- a/packages/loaders/openapi/tests/form-explode-oneof.test.ts +++ b/packages/loaders/openapi/tests/form-explode-oneof.test.ts @@ -1,5 +1,5 @@ import { execute, GraphQLSchema, parse } from 'graphql'; -import { Response } from '@whatwg-node/fetch'; +import { fetch, Response } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; let createdSchema: GraphQLSchema; @@ -11,7 +11,10 @@ describe('OpenAPI loader: form explode with oneof query parameters', () => { beforeAll(async () => { const endpoint = `http://localhost:3000/`; createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { - async fetch(input, init) { + fetch(input, init) { + if (input.startsWith('file:')) { + return fetch(input, init); + } return Response.json({ url: input, }); diff --git a/packages/loaders/openapi/tests/int64-input.test.ts b/packages/loaders/openapi/tests/int64-input.test.ts index d6e7f309ef6e4..a34636b06399c 100644 --- a/packages/loaders/openapi/tests/int64-input.test.ts +++ b/packages/loaders/openapi/tests/int64-input.test.ts @@ -1,5 +1,5 @@ import { execute, GraphQLSchema, parse } from 'graphql'; -import { Request, Response } from '@whatwg-node/fetch'; +import { fetch, Request, Response } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; let createdSchema: GraphQLSchema; @@ -11,11 +11,16 @@ describe('OpenAPI loader: Int64 input', () => { beforeAll(async () => { const endpoint = `http://localhost:3000/`; createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { - async fetch(input, init) { + fetch(input, init) { + if (input.startsWith('file:')) { + return fetch(input, init); + } const req = new Request(input, init); - const json = await req.json<{ id: string; name: string }>(); - - return Response.json({ name: json.name }); + return req.json<{ id: string; name: string }>().then(json => + Response.json({ + name: json.name, + }), + ); }, endpoint, source: './fixtures/int64-input.yml', diff --git a/packages/loaders/openapi/tests/multiple-responses-swagger.test.ts b/packages/loaders/openapi/tests/multiple-responses-swagger.test.ts index 14b6e0ad5d067..10f9428d720fa 100644 --- a/packages/loaders/openapi/tests/multiple-responses-swagger.test.ts +++ b/packages/loaders/openapi/tests/multiple-responses-swagger.test.ts @@ -1,4 +1,5 @@ import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Multiple Responses Swagger', () => { @@ -6,6 +7,7 @@ describe('Multiple Responses Swagger', () => { const schema = await loadGraphQLSchemaFromOpenAPI('test', { source: './fixtures/multiple-responses-swagger.yml', cwd: __dirname, + fetch, }); expect(printSchemaWithDirectives(schema)).toMatchSnapshot('schema'); }); diff --git a/packages/loaders/openapi/tests/nested-one-of.test.ts b/packages/loaders/openapi/tests/nested-one-of.test.ts index 80ffce0ebb237..0e9409485e28a 100644 --- a/packages/loaders/openapi/tests/nested-one-of.test.ts +++ b/packages/loaders/openapi/tests/nested-one-of.test.ts @@ -1,6 +1,6 @@ import { execute, parse } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; -import { Response } from '@whatwg-node/fetch'; +import { fetch, Response } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Algolia schema with nested one Of', () => { @@ -8,6 +8,7 @@ describe('Algolia schema with nested one Of', () => { const schema = await loadGraphQLSchemaFromOpenAPI('algolia-nested-one-of', { source: `./fixtures/algolia-subset-nested-one-of.yml`, cwd: __dirname, + fetch, }); expect(printSchemaWithDirectives(schema)).toMatchSnapshot('schema'); }); @@ -15,14 +16,18 @@ describe('Algolia schema with nested one Of', () => { const schema = await loadGraphQLSchemaFromOpenAPI('algolia-nested-one-of', { source: `./fixtures/algolia-subset-nested-one-of.yml`, cwd: __dirname, - fetch: async () => - Response.json({ + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return Response.json({ consequence: { params: { facetFilters: [[['foo'], 'bar'], 'baz'], }, }, - }), + }); + }, }); const query = /* GraphQL */ ` query { diff --git a/packages/loaders/openapi/tests/nested_objects.test.ts b/packages/loaders/openapi/tests/nested_objects.test.ts index 74021efcff24f..676410407adf6 100644 --- a/packages/loaders/openapi/tests/nested_objects.test.ts +++ b/packages/loaders/openapi/tests/nested_objects.test.ts @@ -11,7 +11,7 @@ describe('OpanAPI: nested objects', () => { beforeAll(async () => { // Update PORT for this test case: createdSchema = await loadGraphQLSchemaFromOpenAPI('example_api', { - fetch: nestedObjectsApi.fetch as any, + fetch: nestedObjectsApi.fetch, endpoint: `http://localhost:3000`, source: './fixtures/nested_object.json', cwd: __dirname, diff --git a/packages/loaders/openapi/tests/non_string_links.test.ts b/packages/loaders/openapi/tests/non_string_links.test.ts index b109def9084e5..9b9807f8a57c4 100644 --- a/packages/loaders/openapi/tests/non_string_links.test.ts +++ b/packages/loaders/openapi/tests/non_string_links.test.ts @@ -1,4 +1,5 @@ import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Links on non-object fields', () => { @@ -6,6 +7,7 @@ describe('Links on non-object fields', () => { const schema = await loadGraphQLSchemaFromOpenAPI('toto', { source: './fixtures/non_string_links.yml', cwd: __dirname, + fetch, }); expect(printSchemaWithDirectives(schema)).toMatchSnapshot(); }); diff --git a/packages/loaders/openapi/tests/oneof-without-descriminator.test.ts b/packages/loaders/openapi/tests/oneof-without-descriminator.test.ts index 8efb71a097c08..8a7e2964b6ec3 100644 --- a/packages/loaders/openapi/tests/oneof-without-descriminator.test.ts +++ b/packages/loaders/openapi/tests/oneof-without-descriminator.test.ts @@ -1,6 +1,6 @@ import { execute, GraphQLSchema, parse } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; -import { Response } from '@whatwg-node/fetch'; +import { fetch, Response } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('oneOf without discriminator', () => { @@ -10,7 +10,10 @@ describe('oneOf without discriminator', () => { source: './fixtures/one-of-no-discriminator.yml', cwd: __dirname, ignoreErrorResponses: true, - async fetch(url, options, context) { + fetch(url, options, context) { + if (url.startsWith('file:')) { + return fetch(url, options); + } switch (options.body) { case '{"B":"string"}': return Response.json({ diff --git a/packages/loaders/openapi/tests/pet-union.test.ts b/packages/loaders/openapi/tests/pet-union.test.ts index 6eb5657213e63..54ff1faf4f859 100644 --- a/packages/loaders/openapi/tests/pet-union.test.ts +++ b/packages/loaders/openapi/tests/pet-union.test.ts @@ -1,6 +1,7 @@ import { createRouter, Response } from 'fets'; import { execute, GraphQLSchema, parse } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Pet', () => { @@ -29,7 +30,12 @@ describe('Pet', () => { endpoint: 'http://example.com', source: `./fixtures/pet-union.yml`, cwd: __dirname, - fetch: async (url, init) => router.fetch(url, init), + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return router.fetch(url, opts); + }, }); }); it('should generate the correct schema', async () => { diff --git a/packages/loaders/openapi/tests/pet.test.ts b/packages/loaders/openapi/tests/pet.test.ts index 7373e42ba7b32..2c7d88c470261 100644 --- a/packages/loaders/openapi/tests/pet.test.ts +++ b/packages/loaders/openapi/tests/pet.test.ts @@ -1,6 +1,7 @@ import { createRouter, Response } from 'fets'; import { execute, GraphQLSchema, parse } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Pet', () => { @@ -29,7 +30,12 @@ describe('Pet', () => { endpoint: 'http://example.com', source: `./fixtures/pet.yml`, cwd: __dirname, - fetch: async (url, init) => router.fetch(url, init), + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return router.fetch(url, opts); + }, }); }); it('should generate the correct schema', async () => { diff --git a/packages/loaders/openapi/tests/query-arguments.test.ts b/packages/loaders/openapi/tests/query-arguments.test.ts index 8db485d2eacdb..4c63e36da60da 100644 --- a/packages/loaders/openapi/tests/query-arguments.test.ts +++ b/packages/loaders/openapi/tests/query-arguments.test.ts @@ -12,7 +12,7 @@ describe('OpenAPI loader: Query Arguments', () => { beforeAll(async () => { const endpoint = `http://localhost:3000/`; createdSchema = await loadGraphQLSchemaFromOpenAPI('test', { - fetch: queryArgumentsApi.fetch as any, + fetch: queryArgumentsApi.fetch, endpoint, source: './fixtures/query_arguments.json', cwd: __dirname, diff --git a/packages/loaders/openapi/tests/query-params-with-post.test.ts b/packages/loaders/openapi/tests/query-params-with-post.test.ts index 4418ae3f08b6a..75de57443432b 100644 --- a/packages/loaders/openapi/tests/query-params-with-post.test.ts +++ b/packages/loaders/openapi/tests/query-params-with-post.test.ts @@ -1,5 +1,6 @@ import { createRouter, Response } from 'fets'; import { execute, parse } from 'graphql'; +import { fetch } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; describe('Query Params with POST', () => { @@ -15,7 +16,12 @@ describe('Query Params with POST', () => { const schema = await loadGraphQLSchemaFromOpenAPI('test', { source: './fixtures/query-params-with-post.yml', endpoint: 'http://localhost:3000', - fetch: queryParamsWithPostServer.fetch as any, + fetch(url, opts) { + if (url.startsWith('file:')) { + return fetch(url, opts); + } + return queryParamsWithPostServer.fetch(url, opts); + }, cwd: __dirname, }); const query = /* GraphQL */ ` diff --git a/packages/loaders/openapi/tests/required-allof.test.ts b/packages/loaders/openapi/tests/required-allof.test.ts index 73e60d67aa873..5222abad4785e 100644 --- a/packages/loaders/openapi/tests/required-allof.test.ts +++ b/packages/loaders/openapi/tests/required-allof.test.ts @@ -1,5 +1,6 @@ import { GraphQLSchema } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('Merge required attributes correctly in allOfs', () => { @@ -9,6 +10,7 @@ describe('Merge required attributes correctly in allOfs', () => { source: './fixtures/required-allof.yml', cwd: __dirname, ignoreErrorResponses: true, + fetch, // It is not possible to provide a union type with File scalar }); }); diff --git a/packages/loaders/openapi/tests/schemas.test.ts b/packages/loaders/openapi/tests/schemas.test.ts index 1817ebbb15b69..88c952d4d26f3 100644 --- a/packages/loaders/openapi/tests/schemas.test.ts +++ b/packages/loaders/openapi/tests/schemas.test.ts @@ -1,6 +1,7 @@ // eslint-disable-next-line import/no-nodejs-modules import { join } from 'path'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; +import { fetch } from '@whatwg-node/fetch'; import loadGraphQLSchemaFromOpenAPI from '../src/index.js'; const schemas: Record = { @@ -39,6 +40,7 @@ describe('Schemas', () => { loadGraphQLSchemaFromOpenAPI(schemaName, { source: schemaPath, cwd: join(__dirname, 'fixtures'), + fetch, }).then(printSchemaWithDirectives), ).resolves.toMatchSnapshot(); }); diff --git a/packages/loaders/openapi/tests/spotify.test.ts b/packages/loaders/openapi/tests/spotify.test.ts index 49ca12aef634e..eaf6f1ea001d6 100644 --- a/packages/loaders/openapi/tests/spotify.test.ts +++ b/packages/loaders/openapi/tests/spotify.test.ts @@ -1,6 +1,6 @@ import { execute, GraphQLSchema, parse } from 'graphql'; import { printSchemaWithDirectives } from '@graphql-tools/utils'; -import { Response } from '@whatwg-node/fetch'; +import { fetch, Response } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('Spotify', () => { @@ -11,16 +11,20 @@ describe('Spotify', () => { source: './fixtures/spotify.yml', cwd: __dirname, ignoreErrorResponses: true, - fetch: async url => - Response.json({ - albums: { - items: [ - { - name: url, - }, - ], - }, - }), + fetch: (url, opts) => { + if (url.startsWith('https://api.spotify.com')) { + return Response.json({ + albums: { + items: [ + { + name: url, + }, + ], + }, + }); + } + return fetch(url, opts); + }, }); }); diff --git a/packages/loaders/openapi/tests/unknown-properties-union.test.ts b/packages/loaders/openapi/tests/unknown-properties-union.test.ts index 4c00794916a05..d3862519bb031 100644 --- a/packages/loaders/openapi/tests/unknown-properties-union.test.ts +++ b/packages/loaders/openapi/tests/unknown-properties-union.test.ts @@ -1,6 +1,6 @@ import { GraphQLSchema, parse } from 'graphql'; import { normalizedExecutor } from '@graphql-tools/executor'; -import { Response } from '@whatwg-node/fetch'; +import { fetch, Response } from '@whatwg-node/fetch'; import { loadGraphQLSchemaFromOpenAPI } from '../src/loadGraphQLSchemaFromOpenAPI.js'; describe('additional properties in union type', () => { @@ -10,7 +10,10 @@ describe('additional properties in union type', () => { source: './fixtures/one-of-no-discriminator.yml', cwd: __dirname, ignoreErrorResponses: true, - async fetch(url, options, context) { + fetch(url, options, context) { + if (url.startsWith('file:')) { + return fetch(url, options); + } return Response.json({ type: 'TestType', // this breaks B: 'Value', diff --git a/yarn.lock b/yarn.lock index 6e375294004cc..1f4c9c187631b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -526,22 +526,6 @@ __metadata: languageName: node linkType: hard -"@ardatan/aggregate-error@npm:0.0.1": - version: 0.0.1 - resolution: "@ardatan/aggregate-error@npm:0.0.1" - checksum: 10c0/b24e02c608c44eea3e987cfa226a2bc67d87f344d90f8f3040d60260613dee28229491ab004f5565b933ea95ed8c409b3d14343db741a40b3419aac7621437b2 - languageName: node - linkType: hard - -"@ardatan/aggregate-error@npm:0.0.6": - version: 0.0.6 - resolution: "@ardatan/aggregate-error@npm:0.0.6" - dependencies: - tslib: "npm:~2.0.1" - checksum: 10c0/e374247b506baf753b21fdb32bd8eda12c3b3bf2bd7cc8954e2761ae3eb10e5033ab9cde6a0f279fbdb09e263358b29d40c05e79eb50a1eab08fbf8916a0253c - languageName: node - linkType: hard - "@ardatan/graphql-to-config-schema@npm:0.1.25": version: 0.1.25 resolution: "@ardatan/graphql-to-config-schema@npm:0.1.25" @@ -7830,21 +7814,6 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/delegate@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/delegate@npm:6.1.0" - dependencies: - "@ardatan/aggregate-error": "npm:0.0.1" - "@graphql-tools/schema": "npm:6.1.0" - "@graphql-tools/utils": "npm:6.1.0" - is-promise: "npm:4.0.0" - tslib: "npm:~2.0.1" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/a1b740dccf69a9748f80990fb49e260d3f92d207c45355c66d86621171dfc74f432bad7b3330f8b17e4758030ef543d71949b80b106464550f1535ac0d4d5d1e - languageName: node - linkType: hard - "@graphql-tools/delegate@npm:^10.0.28, @graphql-tools/delegate@npm:^10.2.10": version: 10.2.10 resolution: "@graphql-tools/delegate@npm:10.2.10" @@ -7940,18 +7909,18 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/executor-legacy-ws@npm:^1.1.8": - version: 1.1.8 - resolution: "@graphql-tools/executor-legacy-ws@npm:1.1.8" +"@graphql-tools/executor-legacy-ws@npm:1.1.11-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 1.1.11-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/executor-legacy-ws@npm:1.1.11-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: - "@graphql-tools/utils": "npm:^10.7.0" + "@graphql-tools/utils": "npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" "@types/ws": "npm:^8.0.0" isomorphic-ws: "npm:^5.0.0" tslib: "npm:^2.4.0" ws: "npm:^8.17.1" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/0794380a3eafdb10c60e6e43c25c592f44ce6c1d183d996ec3a2668031f214eebdda47931ea5f9fec149f34243df3191ba41359cbd990452d2713626674d14b4 + checksum: 10c0/0ed7512ce92f94c82626a0bb0ac6e34576889bda2afd4d4efc34558c3210346997c5e97fa478666ea9363a0631a967437098db879297c74bf11f148ed92b791e languageName: node linkType: hard @@ -8026,32 +7995,18 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/graphql-file-loader@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/graphql-file-loader@npm:6.1.0" +"@graphql-tools/graphql-file-loader@npm:8.0.13-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 8.0.13-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/graphql-file-loader@npm:8.0.13-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: - "@graphql-tools/import": "npm:6.1.0" - "@graphql-tools/utils": "npm:6.1.0" - fs-extra: "npm:9.0.1" - tslib: "npm:~2.0.1" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/d009cce0971ce4f8333b758ffd2a8387b81b81cc11769f6b2d263ffb85bc32c9c1a9187c2e400c76588ea16161d0064be3ed4f2574721e29b9e437dcb7f4cd8e - languageName: node - linkType: hard - -"@graphql-tools/graphql-file-loader@npm:^8.0.0, @graphql-tools/graphql-file-loader@npm:^8.0.1, @graphql-tools/graphql-file-loader@npm:^8.0.5, @graphql-tools/graphql-file-loader@npm:^8.0.6, @graphql-tools/graphql-file-loader@npm:~8.0.0": - version: 8.0.9 - resolution: "@graphql-tools/graphql-file-loader@npm:8.0.9" - dependencies: - "@graphql-tools/import": "npm:7.0.9" - "@graphql-tools/utils": "npm:^10.7.0" + "@graphql-tools/import": "npm:7.0.12-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" + "@graphql-tools/utils": "npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" globby: "npm:^11.0.3" tslib: "npm:^2.4.0" unixify: "npm:^1.0.0" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/320af2085275612b7f9bc7f0e9c94d308f3ccf01c1461964d078ca5205f48bb87c0c357ce0d477d81e5611e93848ce893fa5033175f5006fd75d59d69ea6aec3 + checksum: 10c0/d495f2df2ba68f1c47b199ea7a68f1b035f6da98e5f5a457a5d0e893b14c6fc6ff5a4b08225b2d6ee5dc9bfb3964bcee198f8d9b86b03797a47ea2e178f86e6a languageName: node linkType: hard @@ -8089,137 +8044,56 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/import@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/import@npm:6.1.0" +"@graphql-tools/import@npm:7.0.12-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 7.0.12-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/import@npm:7.0.12-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: - fs-extra: "npm:9.0.1" - resolve-from: "npm:5.0.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/22c446ef4c70bde5743d006fe85093d5b6de5f2648ab043b60c3ed4e3f59b1dbdd502a6e61e5caf16995416f711043f8bca98287646e7505efe1cdffb078b0dd - languageName: node - linkType: hard - -"@graphql-tools/import@npm:7.0.9": - version: 7.0.9 - resolution: "@graphql-tools/import@npm:7.0.9" - dependencies: - "@graphql-tools/utils": "npm:^10.7.0" + "@graphql-tools/utils": "npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" resolve-from: "npm:5.0.0" tslib: "npm:^2.4.0" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/e4e429221b0c032280a3fc9dcaf6d54f2052ec055451e6a24714353a53dc8198996d499f0b7ddd41a0964d187919ed54ae9d153e77dac62b07ded37f045c4594 + checksum: 10c0/ae97af34b27c61e27a6deb80f753ebebe0b62fda0541e56c3e1c0ee91d6d5f088c8df98a140ccad0509b07d9f23d62b8d321c2c4f455b3d16198337fb6bd0908 languageName: node linkType: hard -"@graphql-tools/json-file-loader@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/json-file-loader@npm:6.1.0" +"@graphql-tools/json-file-loader@npm:8.0.12-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 8.0.12-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/json-file-loader@npm:8.0.12-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: - "@graphql-tools/utils": "npm:6.1.0" - fs-extra: "npm:9.0.1" - tslib: "npm:~2.0.1" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/0f6f71a36858ccd7c4a2c91fbbb80d76c98eef96f845705ca1ec8e355f441db375be5cd2182c00994689bdb484bfbb5096d0de1a1e5bea1a5461eb7d94ad9793 - languageName: node - linkType: hard - -"@graphql-tools/json-file-loader@npm:^8.0.0, @graphql-tools/json-file-loader@npm:~8.0.0": - version: 8.0.8 - resolution: "@graphql-tools/json-file-loader@npm:8.0.8" - dependencies: - "@graphql-tools/utils": "npm:^10.6.4" + "@graphql-tools/utils": "npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" globby: "npm:^11.0.3" tslib: "npm:^2.4.0" unixify: "npm:^1.0.0" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/53a48efa1788b48a9b9834f3820c4155290b0dd7373f828bb6f445628734a8a07654d96a70222b11669e8b374203a7b2e9a22f17f2bfa91bb5a2b488f6683434 + checksum: 10c0/0538909b6759ecb220234af1ee9896070d2783a507c860b8b23b2e9d62901f1a4ab34d1590264e0274add5a56a5cff7b97c519985c716c8b5712b76e7493c708 languageName: node linkType: hard -"@graphql-tools/load@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/load@npm:6.1.0" +"@graphql-tools/load@npm:8.0.13-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 8.0.13-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/load@npm:8.0.13-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: - "@graphql-tools/merge": "npm:6.1.0" - "@graphql-tools/utils": "npm:6.1.0" - globby: "npm:11.0.1" - import-from: "npm:3.0.0" - is-glob: "npm:4.0.1" - p-limit: "npm:3.0.2" - tslib: "npm:~2.0.1" - unixify: "npm:1.0.0" - valid-url: "npm:1.0.9" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/ab5c92000f891ccd3a3ffb5224c8cac6b8de7b160fcfc1db828430303ddf3c4dedf629fdc7de5dccca813c78ac100465d09b517c7fca0fdc0509e48f1b89efcf - languageName: node - linkType: hard - -"@graphql-tools/load@npm:^8.0.0, @graphql-tools/load@npm:^8.0.1, @graphql-tools/load@npm:^8.0.2, @graphql-tools/load@npm:^8.0.7, @graphql-tools/load@npm:~8.0.0": - version: 8.0.10 - resolution: "@graphql-tools/load@npm:8.0.10" - dependencies: - "@graphql-tools/schema": "npm:^10.0.14" - "@graphql-tools/utils": "npm:^10.7.0" + "@graphql-tools/schema": "npm:10.0.17-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" + "@graphql-tools/utils": "npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" p-limit: "npm:3.1.0" tslib: "npm:^2.4.0" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/5b2d09244bfd5c3d8e67ffdfb8bc856f34bf7e37f133e07677c8b663a76ffcc9998445c0214fedcaae48a12e0d703f61006691492a64cbc695e22e13e1e8f208 + checksum: 10c0/60f9b8571b8b2fd523c320f21b1a272bc1479912e2f9b2046a2d0624657f815430e33abd5b82aed0ed358c9554d954e94b32ea34b9c17c682306fb837218a1f7 languageName: node linkType: hard -"@graphql-tools/merge@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/merge@npm:6.1.0" +"@graphql-tools/merge@npm:9.0.18-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 9.0.18-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/merge@npm:9.0.18-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: - "@graphql-tools/schema": "npm:6.1.0" - "@graphql-tools/utils": "npm:6.1.0" - tslib: "npm:~2.0.1" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/ce1fb4c2fc69b1ec9f1506114fe48eb53a089b36f7872bba1c974a78fc0e6c3827b05215b6c4829581696b1dadbb4204d5aaff9aa51f625da7072003dc88f443 - languageName: node - linkType: hard - -"@graphql-tools/merge@npm:8.3.1": - version: 8.3.1 - resolution: "@graphql-tools/merge@npm:8.3.1" - dependencies: - "@graphql-tools/utils": "npm:8.9.0" - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/dce29916fa6bd134947f584080ab18908b23537ec8dff74d838bf6c7be34b3e14c527d4ffd18b8f91efe6bb967f170f7393a2383035ed952f88010b60536a106 - languageName: node - linkType: hard - -"@graphql-tools/merge@npm:^8.4.1": - version: 8.4.2 - resolution: "@graphql-tools/merge@npm:8.4.2" - dependencies: - "@graphql-tools/utils": "npm:^9.2.1" - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/2df55222b48e010e683572f456cf265aabae5748c59f7c1260c66dec9794b7a076d3706f04da969b77f0a32c7ccb4551fee30125931d3fe9c98a8806aae9a3f4 - languageName: node - linkType: hard - -"@graphql-tools/merge@npm:^9.0.0, @graphql-tools/merge@npm:^9.0.12, @graphql-tools/merge@npm:^9.0.17": - version: 9.0.17 - resolution: "@graphql-tools/merge@npm:9.0.17" - dependencies: - "@graphql-tools/utils": "npm:^10.7.2" + "@graphql-tools/utils": "npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" tslib: "npm:^2.4.0" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/5dc25bd8875adaa0c4c3efb928f514b8828b36b71aaba4aeef02c36975e6ab897168e9370b0955ad6c569d3671cea1c84b4c54646ae3287992f458641deea8a2 + checksum: 10c0/93544f6d667e20095ed58365fe50d45f1e59e65da985553b03b8bb9aef2db7f0f78c2f5e00891590e7000abc48e9eaa5dd08baa69df96e0fe60f4aa8d16d425c languageName: node linkType: hard @@ -8353,15 +8227,17 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/schema@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/schema@npm:6.1.0" +"@graphql-tools/schema@npm:10.0.17-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 10.0.17-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/schema@npm:10.0.17-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: - "@graphql-tools/utils": "npm:6.1.0" - tslib: "npm:~2.0.1" + "@graphql-tools/merge": "npm:9.0.18-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" + "@graphql-tools/utils": "npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" + tslib: "npm:^2.4.0" + value-or-promise: "npm:^1.0.12" peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/f4e452256eb5edad0c4c5b034a32e908a9d9a3bc6310ca30a4f1a4388515a431c612ca3e81d467f0bfd23230d13726c2102e77ac488711e71871ac7151660a7d + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + checksum: 10c0/52509c03fa88178cc94ea9dc892ffa2cda5ced67af53c0232c9bce47f38da01bf28586594a68fcd00fe5bfdc5ef19faffad02fb200ca6ad184b381a34b8a05a7 languageName: node linkType: hard @@ -8424,64 +8300,31 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/url-loader@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/url-loader@npm:6.1.0" +"@graphql-tools/url-loader@npm:8.0.25-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 8.0.25-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/url-loader@npm:8.0.25-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: - "@graphql-tools/delegate": "npm:6.1.0" - "@graphql-tools/utils": "npm:6.1.0" - "@graphql-tools/wrap": "npm:6.1.0" - "@types/websocket": "npm:1.0.1" - cross-fetch: "npm:3.0.5" - subscriptions-transport-ws: "npm:0.9.18" - tslib: "npm:~2.0.1" - valid-url: "npm:1.0.9" - websocket: "npm:1.0.31" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/dc73e0484cfc843f5c1c9f96c2225978e67fe7242f59dfd092b7ed24a4105f71ae94872501ca8f6f465485d01ca68119ec5a90b0ac6b1ade39143183e702fd68 - languageName: node - linkType: hard - -"@graphql-tools/url-loader@npm:^8.0.0, @graphql-tools/url-loader@npm:^8.0.15, @graphql-tools/url-loader@npm:^8.0.9, @graphql-tools/url-loader@npm:~8.0.0": - version: 8.0.21 - resolution: "@graphql-tools/url-loader@npm:8.0.21" - dependencies: - "@ardatan/sync-fetch": "npm:^0.0.1" "@graphql-tools/executor-graphql-ws": "npm:^1.3.2" "@graphql-tools/executor-http": "npm:^1.1.9" - "@graphql-tools/executor-legacy-ws": "npm:^1.1.8" - "@graphql-tools/utils": "npm:^10.7.0" + "@graphql-tools/executor-legacy-ws": "npm:1.1.11-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" + "@graphql-tools/utils": "npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" "@graphql-tools/wrap": "npm:^10.0.16" "@types/ws": "npm:^8.0.0" "@whatwg-node/fetch": "npm:^0.10.0" isomorphic-ws: "npm:^5.0.0" + sync-fetch: "npm:0.6.0-2" tslib: "npm:^2.4.0" value-or-promise: "npm:^1.0.11" ws: "npm:^8.17.1" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/9fff91ca7c469209934b64878bd26bd2aa986155e9061fea1746ce1a7b9d2a7e83455b879a6c16c5eb83f0339624544c47cc77bd059003b7b733b3e5ae0c1095 - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:10.6.1": - version: 10.6.1 - resolution: "@graphql-tools/utils@npm:10.6.1" - dependencies: - "@graphql-typed-document-node/core": "npm:^3.1.1" - cross-inspect: "npm:1.0.1" - dset: "npm:^3.1.2" - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/00cd131e34e0adf85c4b879fc301fcf0b51709d8b802efe0349d0207dbc64990b018f3588d8bc122de805c0759f96e145ec1f80083a2f95a37f4ea83ce0329ed + checksum: 10c0/26a74a664e76993813f027a70b9c86b627b4f926a04875b6206a970678280fbb6edc52b429e9a6556bb7342c00f268448a8cbe416d2e620cafcba558c76762ad languageName: node linkType: hard -"@graphql-tools/utils@npm:10.7.2, @graphql-tools/utils@npm:^10.0.0, @graphql-tools/utils@npm:^10.0.3, @graphql-tools/utils@npm:^10.3.2, @graphql-tools/utils@npm:^10.5.1, @graphql-tools/utils@npm:^10.5.4, @graphql-tools/utils@npm:^10.5.6, @graphql-tools/utils@npm:^10.6.0, @graphql-tools/utils@npm:^10.6.1, @graphql-tools/utils@npm:^10.6.2, @graphql-tools/utils@npm:^10.6.4, @graphql-tools/utils@npm:^10.7.0, @graphql-tools/utils@npm:^10.7.2": - version: 10.7.2 - resolution: "@graphql-tools/utils@npm:10.7.2" +"@graphql-tools/utils@npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f": + version: 10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f + resolution: "@graphql-tools/utils@npm:10.8.0-alpha-20250124175511-cf926757b2731edb762be661f8671ed41d778b2f" dependencies: "@graphql-typed-document-node/core": "npm:^3.1.1" cross-inspect: "npm:1.0.1" @@ -8489,82 +8332,7 @@ __metadata: tslib: "npm:^2.4.0" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/1e73eaf482437e2d20c1241d3fd422587a7cba93bc67d1572974053788fda22cca745f2e3048150a0af5b0cd9132b7ee49b661ada7a4a0e40e4732afcb53c549 - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/utils@npm:6.1.0" - dependencies: - "@ardatan/aggregate-error": "npm:0.0.1" - camel-case: "npm:4.1.1" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/e86b307a30698962834b249d52d2a1df3aaba1360e64b8a36e09c32b6101c2e26bfacf23370cc5fa21297c1d03e23afc81e4686770567df4d1b5b693f35d6cc0 - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:8.9.0": - version: 8.9.0 - resolution: "@graphql-tools/utils@npm:8.9.0" - dependencies: - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/dd589d970fee9ce093a545c69d6306b61af0f38358361295af1274164a87db2985a51d05ca0e0dd08a4e709f0b5c7c201e69ab0b30480fe2fa0c7a7b8310da0a - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:^7.6.0": - version: 7.10.0 - resolution: "@graphql-tools/utils@npm:7.10.0" - dependencies: - "@ardatan/aggregate-error": "npm:0.0.6" - camel-case: "npm:4.1.2" - tslib: "npm:~2.2.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/e8b29bf3ff63c9ca123daa3785422189177ec0273331bb739a422d3055b5b3d0e956d357988e46b4b06e74d727c1ff228fe467d4e956a72ca8b6e292d0ce0f02 - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:^8.5.2, @graphql-tools/utils@npm:^8.8.0": - version: 8.13.1 - resolution: "@graphql-tools/utils@npm:8.13.1" - dependencies: - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/f9bab1370aa91e706abec4c8ea980e15293cb78bd4effba53ad2365dc39d81148db7667b3ef89b35f0a0b0ad58081ffdac4264b7125c69fa8393590ae5025745 - languageName: node - linkType: hard - -"@graphql-tools/utils@npm:^9.0.0, @graphql-tools/utils@npm:^9.2.1": - version: 9.2.1 - resolution: "@graphql-tools/utils@npm:9.2.1" - dependencies: - "@graphql-typed-document-node/core": "npm:^3.1.1" - tslib: "npm:^2.4.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/37a7bd7e14d28ff1bacc007dca84bc6cef2d7d7af9a547b5dbe52fcd134afddd6d4a7b2148cfbaff5ddba91a868453d597da77bd0457fb0be15928f916901606 - languageName: node - linkType: hard - -"@graphql-tools/wrap@npm:6.1.0": - version: 6.1.0 - resolution: "@graphql-tools/wrap@npm:6.1.0" - dependencies: - "@graphql-tools/delegate": "npm:6.1.0" - "@graphql-tools/schema": "npm:6.1.0" - "@graphql-tools/utils": "npm:6.1.0" - aggregate-error: "npm:3.1.0" - is-promise: "npm:4.0.0" - tslib: "npm:~2.0.1" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - checksum: 10c0/f566410eb1c501ea6c277cbb26fd93595577ded36c1dd1d9c57b15d57e240434291ff6f85deb1a75529237e00bcf48b277c34db4d9520ee5b5d116d2fbf55d25 + checksum: 10c0/e4f4405b19379614dcaf027a6dd86c8bda6a6e2b61053f595a6b53ab02319b1d5272cf9419b1f95e193016bc22e763b6ed673caf3a73f0cc013d61fc018bdd68 languageName: node linkType: hard @@ -14004,15 +13772,6 @@ __metadata: languageName: node linkType: hard -"@types/websocket@npm:1.0.1": - version: 1.0.1 - resolution: "@types/websocket@npm:1.0.1" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/55081a08c75023d9bdee037dd50a053e26d49d58b56741020fa1e8a2069519aa8f22ab03758521b3a04f5d59146dfdecdda442a69a0a413bd81bd8660411c9e8 - languageName: node - linkType: hard - "@types/whatwg-url@npm:^11.0.2": version: 11.0.5 resolution: "@types/whatwg-url@npm:11.0.5" @@ -14570,14 +14329,14 @@ __metadata: languageName: node linkType: hard -"@whatwg-node/node-fetch@npm:0.7.7": - version: 0.7.7 - resolution: "@whatwg-node/node-fetch@npm:0.7.7" +"@whatwg-node/node-fetch@npm:0.7.8-alpha-20250124174946-bf76ab63fc7e7c5ee6898f3bf12f95ef0ac79a63": + version: 0.7.8-alpha-20250124174946-bf76ab63fc7e7c5ee6898f3bf12f95ef0ac79a63 + resolution: "@whatwg-node/node-fetch@npm:0.7.8-alpha-20250124174946-bf76ab63fc7e7c5ee6898f3bf12f95ef0ac79a63" dependencies: "@whatwg-node/disposablestack": "npm:^0.0.5" busboy: "npm:^1.6.0" tslib: "npm:^2.6.3" - checksum: 10c0/f61c45f256363f1c98ddcbcfc9265c8a98a64d09461a19ce32bcf76ab38619c7d7ee52ee7abfe80e49ddc7d6336e85ee481552294146ae934fca453feb970d23 + checksum: 10c0/ae9424227481eb4c8abfee0da52cd5272043b0d9312a57c7710fc108250f89de4948af0d785a65578476a6682179fc78c010e851e71468973185deb5ae0fc3fc languageName: node linkType: hard @@ -14803,7 +14562,7 @@ __metadata: languageName: node linkType: hard -"aggregate-error@npm:3.1.0, aggregate-error@npm:^3.0.0": +"aggregate-error@npm:^3.0.0": version: 3.1.0 resolution: "aggregate-error@npm:3.1.0" dependencies: @@ -16299,17 +16058,7 @@ __metadata: languageName: node linkType: hard -"camel-case@npm:4.1.1": - version: 4.1.1 - resolution: "camel-case@npm:4.1.1" - dependencies: - pascal-case: "npm:^3.1.1" - tslib: "npm:^1.10.0" - checksum: 10c0/d8113f24a3ac764a81a6ec7a5de5d339bcc749da741e6a088c8f1dc8768845ef5299ce37d94449a0608727ac0a7c33e9c47fecfa820a1ab2b4145c0f5129c584 - languageName: node - linkType: hard - -"camel-case@npm:4.1.2, camel-case@npm:^4.1.2": +"camel-case@npm:^4.1.2": version: 4.1.2 resolution: "camel-case@npm:4.1.2" dependencies: @@ -18331,7 +18080,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.6.0": +"debug@npm:2.6.9, debug@npm:^2.6.0": version: 2.6.9 resolution: "debug@npm:2.6.9" dependencies: @@ -20658,7 +20407,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.1.1, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2": +"fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -21748,20 +21497,6 @@ __metadata: languageName: node linkType: hard -"globby@npm:11.0.1": - version: 11.0.1 - resolution: "globby@npm:11.0.1" - dependencies: - array-union: "npm:^2.1.0" - dir-glob: "npm:^3.0.1" - fast-glob: "npm:^3.1.1" - ignore: "npm:^5.1.4" - merge2: "npm:^1.3.0" - slash: "npm:^3.0.0" - checksum: 10c0/b5966bb6e8fa88a02924a0ee71c619ad57b98660269ddecd5e939a42f4fc056e7958659bde539454e2deaeac79bbdeab01831783f05efd4b14305b5bfff44c09 - languageName: node - linkType: hard - "globby@npm:11.1.0, globby@npm:^11.0.0, globby@npm:^11.0.3, globby@npm:^11.0.4, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" @@ -23111,7 +22846,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.1.4, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1, ignore@npm:^5.3.2": +"ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1, ignore@npm:^5.3.2": version: 5.3.2 resolution: "ignore@npm:5.3.2" checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 @@ -23149,15 +22884,6 @@ __metadata: languageName: node linkType: hard -"import-from@npm:3.0.0": - version: 3.0.0 - resolution: "import-from@npm:3.0.0" - dependencies: - resolve-from: "npm:^5.0.0" - checksum: 10c0/83a40470190f2d9c6ca6a0a2d2de40e9d0b38eedeb2409320a44eaeed48751678e206c9ac7fefef18be19c95ad1cc0e98c844fdf631ab3d9a5597c3476e7525f - languageName: node - linkType: hard - "import-from@npm:4.0.0": version: 4.0.0 resolution: "import-from@npm:4.0.0" @@ -23663,15 +23389,6 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:4.0.1": - version: 4.0.1 - resolution: "is-glob@npm:4.0.1" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/a8414252499e4381756c36fe52ed778e090dd21d8cb81053384eafd5bc4fc36a6232ef528156ec98dce561f589d1d16659b7f9679b8c86864ac3c6acd5da6f66 - languageName: node - linkType: hard - "is-glob@npm:4.0.3, is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" @@ -23823,13 +23540,6 @@ __metadata: languageName: node linkType: hard -"is-promise@npm:4.0.0": - version: 4.0.0 - resolution: "is-promise@npm:4.0.0" - checksum: 10c0/ebd5c672d73db781ab33ccb155fb9969d6028e37414d609b115cc534654c91ccd061821d5b987eefaa97cf4c62f0b909bb2f04db88306de26e91bfe8ddc01503 - languageName: node - linkType: hard - "is-promise@npm:^2.1.0, is-promise@npm:^2.2.2": version: 2.2.2 resolution: "is-promise@npm:2.2.2" @@ -28278,7 +27988,7 @@ __metadata: languageName: node linkType: hard -"nan@npm:^2.14.0, nan@npm:^2.16.0, nan@npm:^2.17.0, nan@npm:^2.19.0, nan@npm:^2.20.0": +"nan@npm:^2.16.0, nan@npm:^2.17.0, nan@npm:^2.19.0, nan@npm:^2.20.0": version: 2.22.0 resolution: "nan@npm:2.22.0" dependencies: @@ -29262,15 +28972,6 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:3.0.2": - version: 3.0.2 - resolution: "p-limit@npm:3.0.2" - dependencies: - p-try: "npm:^2.0.0" - checksum: 10c0/cb3e578f1117bcf29a0e883c2b1a8018d683001f362fdd50aac6758c88f4826b4aeaee8c0c43995a56394ab5aeada049971bef718ab8b37d8b8c9152d50fa2cd - languageName: node - linkType: hard - "p-limit@npm:3.1.0, p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": version: 3.1.0 resolution: "p-limit@npm:3.1.0" @@ -29503,7 +29204,7 @@ __metadata: languageName: node linkType: hard -"pascal-case@npm:3.1.2, pascal-case@npm:^3.1.1, pascal-case@npm:^3.1.2": +"pascal-case@npm:3.1.2, pascal-case@npm:^3.1.2": version: 3.1.2 resolution: "pascal-case@npm:3.1.2" dependencies: @@ -34523,21 +34224,6 @@ __metadata: languageName: node linkType: hard -"subscriptions-transport-ws@npm:0.9.18": - version: 0.9.18 - resolution: "subscriptions-transport-ws@npm:0.9.18" - dependencies: - backo2: "npm:^1.0.2" - eventemitter3: "npm:^3.1.0" - iterall: "npm:^1.2.1" - symbol-observable: "npm:^1.0.4" - ws: "npm:^5.2.0" - peerDependencies: - graphql: ">=0.10.0" - checksum: 10c0/607215f075d7fb5c9f75ec1a7c11a1e7e66564a323bb83b9b80c8d8f76e882e128e1c44602bc8ca086bb951cc5d66af07cc91f1144ecfc56b1bfe90bdc9e8204 - languageName: node - linkType: hard - "subscriptions-transport-ws@npm:^0.9.18": version: 0.9.19 resolution: "subscriptions-transport-ws@npm:0.9.19" @@ -34692,6 +34378,17 @@ __metadata: languageName: node linkType: hard +"sync-fetch@npm:0.6.0-2": + version: 0.6.0-2 + resolution: "sync-fetch@npm:0.6.0-2" + dependencies: + node-fetch: "npm:^3.3.2" + timeout-signal: "npm:^2.0.0" + whatwg-mimetype: "npm:^4.0.0" + checksum: 10c0/1b3e96dfe12de520d9530abb0765baa3ce5921b6fc33ff23171cf838916a58956e755eb359669fba59bfba9b0eefd7e5b6eed737db0ba03bc2cb98a93de5cdb3 + languageName: node + linkType: hard + "sync-request@npm:^6.1.0": version: 6.1.0 resolution: "sync-request@npm:6.1.0" @@ -35052,6 +34749,13 @@ __metadata: languageName: node linkType: hard +"timeout-signal@npm:^2.0.0": + version: 2.0.0 + resolution: "timeout-signal@npm:2.0.0" + checksum: 10c0/dd0a41712552fd45e075664edbdb5d1715a0791e6a206f1d00f5808b954b18046f87b71a7b9216a5030ba772516212b696bbbfb3115bf81b3277b04f62aab135 + languageName: node + linkType: hard + "timers-ext@npm:^0.1.5, timers-ext@npm:^0.1.7": version: 0.1.8 resolution: "timers-ext@npm:0.1.8" @@ -36200,7 +35904,7 @@ __metadata: languageName: node linkType: hard -"unixify@npm:1.0.0, unixify@npm:^1.0.0": +"unixify@npm:^1.0.0": version: 1.0.0 resolution: "unixify@npm:1.0.0" dependencies: @@ -36403,13 +36107,6 @@ __metadata: languageName: node linkType: hard -"valid-url@npm:1.0.9": - version: 1.0.9 - resolution: "valid-url@npm:1.0.9" - checksum: 10c0/3995e65f9942dbcb1621754c0f9790335cec61e9e9310c0a809e9ae0e2ae91bb7fc6a471fba788e979db0418d9806639f681ecebacc869bc8c3de88efa562ee6 - languageName: node - linkType: hard - "validate-npm-package-license@npm:^3.0.1": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" @@ -36905,20 +36602,6 @@ __metadata: languageName: node linkType: hard -"websocket@npm:1.0.31": - version: 1.0.31 - resolution: "websocket@npm:1.0.31" - dependencies: - debug: "npm:^2.2.0" - es5-ext: "npm:^0.10.50" - nan: "npm:^2.14.0" - node-gyp: "npm:latest" - typedarray-to-buffer: "npm:^3.1.5" - yaeti: "npm:^0.0.6" - checksum: 10c0/ea03c2e195ed77a50da84a5db178b88bc95da9eb0659c98e3a80db267e50e2f6fc516fc78f5af44c5de467cbf7553d55726df6caa36c81548c0cbe7dd117c916 - languageName: node - linkType: hard - "whatwg-encoding@npm:^1.0.5": version: 1.0.5 resolution: "whatwg-encoding@npm:1.0.5" @@ -36935,7 +36618,7 @@ __metadata: languageName: node linkType: hard -"whatwg-mimetype@npm:4.0.0": +"whatwg-mimetype@npm:4.0.0, whatwg-mimetype@npm:^4.0.0": version: 4.0.0 resolution: "whatwg-mimetype@npm:4.0.0" checksum: 10c0/a773cdc8126b514d790bdae7052e8bf242970cebd84af62fb2f35a33411e78e981f6c0ab9ed1fe6ec5071b09d5340ac9178e05b52d35a9c4bcf558ba1b1551df @@ -37523,7 +37206,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^5.2.0, ws@npm:^5.2.3": +"ws@npm:^5.2.3": version: 5.2.4 resolution: "ws@npm:5.2.4" dependencies: @@ -37664,13 +37347,6 @@ __metadata: languageName: node linkType: hard -"yaeti@npm:^0.0.6": - version: 0.0.6 - resolution: "yaeti@npm:0.0.6" - checksum: 10c0/4e88702d8b34d7b61c1c4ec674422b835d453b8f8a6232be41e59fc98bc4d9ab6d5abd2da55bab75dfc07ae897fdc0c541f856ce3ab3b17de1630db6161aa3f6 - languageName: node - linkType: hard - "yallist@npm:^2.1.2": version: 2.1.2 resolution: "yallist@npm:2.1.2"