mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
replace whatwg-node/fetch with native fetch (#4110)
This commit is contained in:
parent
9a7cacea4c
commit
b186496961
31 changed files with 0 additions and 63 deletions
|
|
@ -36,7 +36,6 @@
|
|||
"@types/lodash": "4.14.202",
|
||||
"@types/ms": "0.7.34",
|
||||
"@types/object-hash": "3.0.6",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"agentkeepalive": "4.5.0",
|
||||
"bcryptjs": "2.4.3",
|
||||
"dataloader": "2.2.2",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { WebhooksApi } from '@hive/webhooks';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { HttpClient } from '../../../shared/providers/http-client';
|
||||
import { Logger } from '../../../shared/providers/logger';
|
||||
import type { WebhooksConfig } from '../tokens';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { StripeBillingApi, StripeBillingApiInput } from '@hive/stripe-billing';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { OrganizationSelector } from '../../../__generated__/types';
|
||||
import { OrganizationBilling } from '../../../shared/entities';
|
||||
import { Logger } from '../../shared/providers/logger';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import bcryptjs from 'bcryptjs';
|
|||
import { Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import { z } from 'zod';
|
||||
import { encodeCdnToken, generatePrivateKey } from '@hive/cdn-script/cdn-token';
|
||||
import { crypto } from '@whatwg-node/fetch';
|
||||
import { HiveError } from '../../../shared/errors';
|
||||
import { isUUID } from '../../../shared/is-uuid';
|
||||
import { AuthManager } from '../../auth/providers/auth-manager';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { AvailableRulesResponse, SchemaPolicyApi, SchemaPolicyApiInput } from '@hive/policy';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { sentry } from '../../../shared/sentry';
|
||||
import { Logger } from '../../shared/providers/logger';
|
||||
import type { SchemaPolicyServiceConfig } from './tokens';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { RateLimitApi, RateLimitApiInput } from '@hive/rate-limit';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { sentry } from '../../../shared/sentry';
|
||||
import { Logger } from '../../shared/providers/logger';
|
||||
import type { RateLimitServiceConfig } from './tokens';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { ContractsInputType, SchemaBuilderApi } from '@hive/schema';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { Orchestrator, Project, ProjectType, SchemaObject } from '../../../../shared/entities';
|
||||
import { sentry } from '../../../../shared/sentry';
|
||||
import { Logger } from '../../../shared/providers/logger';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { SchemaBuilderApi } from '@hive/schema';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities';
|
||||
import { sentry } from '../../../../shared/sentry';
|
||||
import { Logger } from '../../../shared/providers/logger';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { SchemaBuilderApi } from '@hive/schema';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities';
|
||||
import { sentry } from '../../../../shared/sentry';
|
||||
import { Logger } from '../../../shared/providers/logger';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { Inject, Injectable, InjectionToken, Optional } from 'graphql-modules';
|
||||
import type { EmailsApi } from '@hive/emails';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
|
||||
export const EMAILS_ENDPOINT = new InjectionToken<string>('EMAILS_ENDPOINT');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { TokensApi } from '@hive/tokens';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import type { Token } from '../../../shared/entities';
|
||||
import { HiveError } from '../../../shared/errors';
|
||||
import { atomic } from '../../../shared/helpers';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { Inject, Injectable, Scope } from 'graphql-modules';
|
||||
import type { UsageEstimatorApi, UsageEstimatorApiInput } from '@hive/usage-estimator';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { sentry } from '../../../shared/sentry';
|
||||
import { Logger } from '../../shared/providers/logger';
|
||||
import type { UsageEstimationServiceConfig } from './tokens';
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
"@types/mjml": "4.7.1",
|
||||
"@types/nodemailer": "6.4.14",
|
||||
"@types/sendmail": "1.4.7",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"bullmq": "5.3.3",
|
||||
"copyfiles": "2.4.1",
|
||||
"dotenv": "16.4.5",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import nodemailer from 'nodemailer';
|
||||
import sm from 'sendmail';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import type {
|
||||
EmailProviderConfig,
|
||||
MockEmailProviderConfig,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
"@apollo/composition": "2.7.1",
|
||||
"@apollo/federation-internals": "2.7.1",
|
||||
"@graphql-hive/external-composition": "workspace:*",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"@whatwg-node/server": "0.9.25",
|
||||
"graphql": "16.8.1",
|
||||
"lru-cache": "^7.17.0",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import LRU from 'lru-cache';
|
|||
import { composeServices } from '@apollo/composition';
|
||||
import { Supergraph } from '@apollo/federation-internals';
|
||||
import { compose, signatureHeaderName, verifyRequest } from '@graphql-hive/external-composition';
|
||||
import { Response } from '@whatwg-node/fetch';
|
||||
import { createServerAdapter } from '@whatwg-node/server';
|
||||
import { ResolvedEnv } from './environment';
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
"@sentry/node": "7.102.1",
|
||||
"@sentry/tracing": "7.102.1",
|
||||
"@trpc/server": "10.45.1",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"ajv": "8.12.0",
|
||||
"dotenv": "16.4.5",
|
||||
"eslint": "8.57.0",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
"@sentry/node": "7.102.1",
|
||||
"@trpc/client": "10.45.1",
|
||||
"@trpc/server": "10.45.1",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"date-fns": "3.3.1",
|
||||
"dotenv": "16.4.5",
|
||||
"got": "14.2.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import type { EmailsApi } from '@hive/emails';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { env } from './environment';
|
||||
|
||||
export function createEmailScheduler(config?: { endpoint: string }) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { createStorage as createPostgreSQLStorage } from '@hive/storage';
|
|||
import type { UsageEstimatorApi } from '@hive/usage-estimator';
|
||||
import * as Sentry from '@sentry/node';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import type { RateLimitInput } from './api';
|
||||
import { createEmailScheduler } from './emails';
|
||||
import { rateLimitOperationsEventOrg } from './metrics';
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
"@trpc/server": "10.45.1",
|
||||
"@types/async-retry": "1.4.8",
|
||||
"@types/ioredis-mock": "8.2.5",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"dotenv": "16.4.5",
|
||||
"fast-json-stable-stringify": "2.1.0",
|
||||
"fastify": "4.26.1",
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
"@sentry/node": "7.102.1",
|
||||
"@swc/core": "1.4.2",
|
||||
"@trpc/server": "10.45.1",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"@whatwg-node/server": "0.9.25",
|
||||
"dotenv": "16.4.5",
|
||||
"fastify": "4.26.1",
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import { useResponseCache } from '@graphql-yoga/plugin-response-cache';
|
|||
import { HiveError, Registry, RegistryContext } from '@hive/api';
|
||||
import { cleanRequestId } from '@hive/service-common';
|
||||
import { runWithAsyncContext } from '@sentry/node';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { asyncStorage } from './async-storage';
|
||||
import type { HiveConfig } from './environment';
|
||||
import { useArmor } from './use-armor';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
"@sentry/node": "7.102.1",
|
||||
"@trpc/client": "10.45.1",
|
||||
"@trpc/server": "10.45.1",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"date-fns": "3.3.1",
|
||||
"dotenv": "16.4.5",
|
||||
"got": "14.2.0",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
"@hive/service-common": "workspace:*",
|
||||
"@sentry/node": "7.102.1",
|
||||
"@trpc/server": "10.45.1",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"dotenv": "16.4.5",
|
||||
"got": "14.2.0",
|
||||
"pino-pretty": "10.3.1",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
"@sentry/node": "7.102.1",
|
||||
"@trpc/client": "10.45.1",
|
||||
"@trpc/server": "10.45.1",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"ajv": "8.12.0",
|
||||
"dotenv": "16.4.5",
|
||||
"got": "14.2.0",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import LRU from 'tiny-lru';
|
|||
import type { RateLimitApi, RateLimitApiInput, RateLimitApiOutput } from '@hive/rate-limit';
|
||||
import { FastifyLoggerInstance } from '@hive/service-common';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
|
||||
export function createUsageRateLimit(config: {
|
||||
endpoint: string | null;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import LRU from 'tiny-lru';
|
|||
import { FastifyLoggerInstance } from '@hive/service-common';
|
||||
import type { TokensApi } from '@hive/tokens';
|
||||
import { createTRPCProxyClient, httpLink } from '@trpc/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
import { tokenCacheHits, tokenRequests } from './metrics';
|
||||
|
||||
export enum TokenStatus {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@
|
|||
"@urql/core": "4.1.4",
|
||||
"@urql/exchange-graphcache": "6.3.3",
|
||||
"@urql/exchange-persisted": "4.1.0",
|
||||
"@whatwg-node/fetch": "0.9.16",
|
||||
"class-variance-authority": "0.7.0",
|
||||
"clsx": "2.1.0",
|
||||
"cmdk": "0.2.1",
|
||||
|
|
|
|||
|
|
@ -616,9 +616,6 @@ importers:
|
|||
'@types/object-hash':
|
||||
specifier: 3.0.6
|
||||
version: 3.0.6
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
agentkeepalive:
|
||||
specifier: 4.5.0
|
||||
version: 4.5.0
|
||||
|
|
@ -796,9 +793,6 @@ importers:
|
|||
'@types/sendmail':
|
||||
specifier: 1.4.7
|
||||
version: 1.4.7
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
bullmq:
|
||||
specifier: 5.3.3
|
||||
version: 5.3.3(patch_hash=kobtuuqaglbtaadx3jiqtahl3i)
|
||||
|
|
@ -844,9 +838,6 @@ importers:
|
|||
'@graphql-hive/external-composition':
|
||||
specifier: workspace:*
|
||||
version: link:../../../libraries/external-composition/dist
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
'@whatwg-node/server':
|
||||
specifier: 0.9.25
|
||||
version: 0.9.25
|
||||
|
|
@ -877,9 +868,6 @@ importers:
|
|||
'@trpc/server':
|
||||
specifier: 10.45.1
|
||||
version: 10.45.1
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
ajv:
|
||||
specifier: 8.12.0
|
||||
version: 8.12.0
|
||||
|
|
@ -925,9 +913,6 @@ importers:
|
|||
'@trpc/server':
|
||||
specifier: 10.45.1
|
||||
version: 10.45.1
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
date-fns:
|
||||
specifier: 3.3.1
|
||||
version: 3.3.1
|
||||
|
|
@ -982,9 +967,6 @@ importers:
|
|||
'@types/ioredis-mock':
|
||||
specifier: 8.2.5
|
||||
version: 8.2.5
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
dotenv:
|
||||
specifier: 16.4.5
|
||||
version: 16.4.5
|
||||
|
|
@ -1081,9 +1063,6 @@ importers:
|
|||
'@trpc/server':
|
||||
specifier: 10.45.1
|
||||
version: 10.45.1
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
'@whatwg-node/server':
|
||||
specifier: 0.9.25
|
||||
version: 0.9.25
|
||||
|
|
@ -1229,9 +1208,6 @@ importers:
|
|||
'@trpc/server':
|
||||
specifier: 10.45.1
|
||||
version: 10.45.1
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
date-fns:
|
||||
specifier: 3.3.1
|
||||
version: 3.3.1
|
||||
|
|
@ -1322,9 +1298,6 @@ importers:
|
|||
'@trpc/server':
|
||||
specifier: 10.45.1
|
||||
version: 10.45.1
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
ajv:
|
||||
specifier: 8.12.0
|
||||
version: 8.12.0
|
||||
|
|
@ -1370,9 +1343,6 @@ importers:
|
|||
'@trpc/server':
|
||||
specifier: 10.45.1
|
||||
version: 10.45.1
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
dotenv:
|
||||
specifier: 16.4.5
|
||||
version: 16.4.5
|
||||
|
|
@ -1595,9 +1565,6 @@ importers:
|
|||
'@urql/exchange-persisted':
|
||||
specifier: 4.1.0
|
||||
version: 4.1.0(graphql@16.8.1)
|
||||
'@whatwg-node/fetch':
|
||||
specifier: 0.9.16
|
||||
version: 0.9.16
|
||||
class-variance-authority:
|
||||
specifier: 0.7.0
|
||||
version: 0.7.0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { buildSchema, parse } from 'graphql';
|
||||
import { createHive } from '@graphql-hive/client';
|
||||
import { fetch } from '@whatwg-node/fetch';
|
||||
|
||||
const isFederation = process.env.FEDERATION === '1';
|
||||
const isSchemaReportingEnabled = process.env.SCHEMA_REPORTING !== '0';
|
||||
|
|
|
|||
Loading…
Reference in a new issue