diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 8e82d111b..bf5b83ce7 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,6 +1,16 @@ /* eslint-env node */ -/* eslint-disable-next-line @typescript-eslint/no-var-requires */ -const { builtinModules } = require('module'); +const guildConfig = require('@theguild/eslint-config/base'); + +const rulesToExtends = Object.fromEntries( + Object.entries(guildConfig.rules).filter(([key]) => + [ + 'simple-import-sort/imports', + 'import/first', + 'no-restricted-globals', + '@typescript-eslint/no-unused-vars', + ].includes(key), + ), +); module.exports = { reportUnusedDisableDirectives: true, @@ -22,17 +32,11 @@ module.exports = { project: ['./tsconfig.eslint.json'], }, parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint', 'import', 'hive'], - extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], + plugins: [...guildConfig.plugins, 'hive'], + extends: guildConfig.extends, rules: { 'no-process-env': 'error', - 'no-restricted-globals': ['error', 'stop'], - '@typescript-eslint/no-unused-vars': [ - 'error', - { argsIgnorePattern: '^_', ignoreRestSiblings: true }, - ], 'no-empty': ['error', { allowEmptyCatch: true }], - 'import/no-absolute-path': 'error', 'import/no-self-import': 'error', 'import/no-extraneous-dependencies': [ @@ -42,7 +46,6 @@ module.exports = { optionalDependencies: false, }, ], - 'import/first': 'error', 'hive/enforce-deps-in-dev': [ 'error', { @@ -51,6 +54,7 @@ module.exports = { }, ], '@typescript-eslint/no-floating-promises': 'error', + ...rulesToExtends, // 🚨 The following rules needs to be fixed and was temporarily disabled to avoid printing warning '@typescript-eslint/no-explicit-any': 'off', @@ -72,7 +76,6 @@ module.exports = { 'plugin:jsx-a11y/recommended', 'plugin:@next/next/recommended', ], - plugins: ['simple-import-sort'], settings: { tailwindcss: { config: 'packages/app/tailwind.config.js', @@ -109,37 +112,6 @@ module.exports = { 'jsx-a11y/alt-text': ['warn', { elements: ['img'], img: ['Image', 'NextImage'] }], '@typescript-eslint/consistent-type-imports': ['error', { prefer: 'no-type-imports' }], 'simple-import-sort/exports': 'error', - 'simple-import-sort/imports': [ - 'error', - { - groups: [ - [ - // Node.js builtins - `^(node:)?(${builtinModules - .filter(mod => !mod.startsWith('_') && !mod.includes('/')) - .join('|')})(/.*|$)`, - '^react(-dom)?$', - '^next(/.*|$)', - '^graphql(/.*|$)', - // Side effect imports. - '^\\u0000', - // Packages. - // Things that start with a letter (or digit or underscore), or `@` followed by a letter. - '^@?\\w', - ], - [ - // Absolute imports and other imports such as Vue-style `@/foo`. - // Anything not matched in another group. - '^', - // Relative imports. - // Anything that starts with a dot. - '^\\.', - // Style imports. - '^.+\\.css$', - ], - ], - }, - ], }, }, { diff --git a/deployment/index.ts b/deployment/index.ts index 619ca69b2..4c55beed1 100644 --- a/deployment/index.ts +++ b/deployment/index.ts @@ -1,32 +1,32 @@ import * as pulumi from '@pulumi/pulumi'; -import { DeploymentEnvironment } from './types'; -import { deployDbMigrations } from './services/db-migrations'; -import { deployTokens } from './services/tokens'; -import { deployWebhooks } from './services/webhooks'; -import { deployEmails } from './services/emails'; -import { deploySchema } from './services/schema'; -import { deployUsage } from './services/usage'; -import { deployUsageIngestor } from './services/usage-ingestor'; -import { deployGraphQL } from './services/graphql'; +import * as random from '@pulumi/random'; import { deployApp } from './services/app'; +import { deployStripeBilling } from './services/billing'; +import { deployBotKube } from './services/bot-kube'; +import { deployCFBroker } from './services/cf-broker'; +import { deployCFCDN } from './services/cf-cdn'; +import { deployClickhouse } from './services/clickhouse'; +import { deployCloudFlareSecurityTransform } from './services/cloudflare-security'; +import { deployDbMigrations } from './services/db-migrations'; import { deployDocs } from './services/docs'; -import { deployRedis } from './services/redis'; +import { deployEmails } from './services/emails'; +import { deployGraphQL } from './services/graphql'; import { deployKafka } from './services/kafka'; import { deployMetrics } from './services/observability'; -import { deployCFCDN } from './services/cf-cdn'; -import { deployCFBroker } from './services/cf-broker'; import { deployCloudflarePolice } from './services/police'; -import { deployBotKube } from './services/bot-kube'; import { deployProxy } from './services/proxy'; -import { deployClickhouse } from './services/clickhouse'; -import { deployUsageEstimation } from './services/usage-estimation'; -import { deploySuperTokens } from './services/supertokens'; -import { optimizeAzureCluster } from './utils/azure-helpers'; import { deployRateLimit } from './services/rate-limit'; -import { deployStripeBilling } from './services/billing'; -import { deployCloudFlareSecurityTransform } from './services/cloudflare-security'; +import { deployRedis } from './services/redis'; +import { deploySchema } from './services/schema'; +import { deploySuperTokens } from './services/supertokens'; +import { deployTokens } from './services/tokens'; +import { deployUsage } from './services/usage'; +import { deployUsageEstimation } from './services/usage-estimation'; +import { deployUsageIngestor } from './services/usage-ingestor'; +import { deployWebhooks } from './services/webhooks'; +import { DeploymentEnvironment } from './types'; +import { optimizeAzureCluster } from './utils/azure-helpers'; import { createDockerImageFactory } from './utils/docker-images'; -import * as random from '@pulumi/random'; optimizeAzureCluster(); diff --git a/deployment/services/app.ts b/deployment/services/app.ts index 67f12760d..b3df5acd6 100644 --- a/deployment/services/app.ts +++ b/deployment/services/app.ts @@ -1,11 +1,11 @@ -import * as pulumi from '@pulumi/pulumi'; -import { GraphQL } from './graphql'; -import { DbMigrations } from './db-migrations'; -import { ServiceDeployment } from '../utils/service-deployment'; -import { serviceLocalEndpoint } from '../utils/local-endpoint'; -import { DeploymentEnvironment } from '../types'; -import { Docs } from './docs'; import * as k8s from '@pulumi/kubernetes'; +import * as pulumi from '@pulumi/pulumi'; +import { DeploymentEnvironment } from '../types'; +import { serviceLocalEndpoint } from '../utils/local-endpoint'; +import { ServiceDeployment } from '../utils/service-deployment'; +import { DbMigrations } from './db-migrations'; +import { Docs } from './docs'; +import { GraphQL } from './graphql'; const appConfig = new pulumi.Config('app'); const commonConfig = new pulumi.Config('common'); diff --git a/deployment/services/billing.ts b/deployment/services/billing.ts index 7ff47baa9..053900d1a 100644 --- a/deployment/services/billing.ts +++ b/deployment/services/billing.ts @@ -1,11 +1,11 @@ +import * as k8s from '@pulumi/kubernetes'; import * as pulumi from '@pulumi/pulumi'; import { parse } from 'pg-connection-string'; -import { ServiceDeployment } from '../utils/service-deployment'; import { DeploymentEnvironment } from '../types'; +import { serviceLocalEndpoint } from '../utils/local-endpoint'; +import { ServiceDeployment } from '../utils/service-deployment'; import { DbMigrations } from './db-migrations'; import { UsageEstimator } from './usage-estimation'; -import { serviceLocalEndpoint } from '../utils/local-endpoint'; -import * as k8s from '@pulumi/kubernetes'; const billingConfig = new pulumi.Config('billing'); const commonConfig = new pulumi.Config('common'); diff --git a/deployment/services/clickhouse.ts b/deployment/services/clickhouse.ts index 1fca2feb6..3535481d3 100644 --- a/deployment/services/clickhouse.ts +++ b/deployment/services/clickhouse.ts @@ -1,6 +1,6 @@ import * as pulumi from '@pulumi/pulumi'; -import { serviceLocalHost } from '../utils/local-endpoint'; import { Clickhouse as ClickhouseDeployment } from '../utils/clickhouse'; +import { serviceLocalHost } from '../utils/local-endpoint'; const clickhouseConfig = new pulumi.Config('clickhouse'); const commonConfig = new pulumi.Config('common'); diff --git a/deployment/services/cloudflare-security.ts b/deployment/services/cloudflare-security.ts index 6a095231a..3fb26d585 100644 --- a/deployment/services/cloudflare-security.ts +++ b/deployment/services/cloudflare-security.ts @@ -1,5 +1,5 @@ -import * as pulumi from '@pulumi/pulumi'; import * as cf from '@pulumi/cloudflare'; +import * as pulumi from '@pulumi/pulumi'; const cfConfig = new pulumi.Config('cloudflareCustom'); diff --git a/deployment/services/db-migrations.ts b/deployment/services/db-migrations.ts index 6dec1421a..6c931d2eb 100644 --- a/deployment/services/db-migrations.ts +++ b/deployment/services/db-migrations.ts @@ -1,10 +1,10 @@ -import * as pulumi from '@pulumi/pulumi'; import * as k8s from '@pulumi/kubernetes'; +import * as pulumi from '@pulumi/pulumi'; import { parse } from 'pg-connection-string'; +import { DeploymentEnvironment } from '../types'; import { ServiceDeployment } from '../utils/service-deployment'; import { Clickhouse } from './clickhouse'; import { Kafka } from './kafka'; -import { DeploymentEnvironment } from '../types'; const apiConfig = new pulumi.Config('api'); export type DbMigrations = ReturnType; diff --git a/deployment/services/docs.ts b/deployment/services/docs.ts index 6c2d6fda3..03f5fec80 100644 --- a/deployment/services/docs.ts +++ b/deployment/services/docs.ts @@ -1,5 +1,5 @@ -import { ServiceDeployment } from '../utils/service-deployment'; import * as k8s from '@pulumi/kubernetes'; +import { ServiceDeployment } from '../utils/service-deployment'; export type Docs = ReturnType; diff --git a/deployment/services/emails.ts b/deployment/services/emails.ts index 2cd756cd6..24014a3ff 100644 --- a/deployment/services/emails.ts +++ b/deployment/services/emails.ts @@ -1,9 +1,9 @@ -import * as pulumi from '@pulumi/pulumi'; -import { ServiceDeployment } from '../utils/service-deployment'; -import { DeploymentEnvironment } from '../types'; -import { Redis } from './redis'; -import { serviceLocalEndpoint } from '../utils/local-endpoint'; import * as k8s from '@pulumi/kubernetes'; +import * as pulumi from '@pulumi/pulumi'; +import { DeploymentEnvironment } from '../types'; +import { serviceLocalEndpoint } from '../utils/local-endpoint'; +import { ServiceDeployment } from '../utils/service-deployment'; +import { Redis } from './redis'; const commonConfig = new pulumi.Config('common'); const commonEnv = commonConfig.requireObject>('env'); diff --git a/deployment/services/graphql.ts b/deployment/services/graphql.ts index 839ae015a..8e4efed37 100644 --- a/deployment/services/graphql.ts +++ b/deployment/services/graphql.ts @@ -1,23 +1,23 @@ +import * as k8s from '@pulumi/kubernetes'; import * as pulumi from '@pulumi/pulumi'; -import { CDN } from './cf-cdn'; +import { Output } from '@pulumi/pulumi'; import { parse } from 'pg-connection-string'; -import { Tokens } from './tokens'; -import { Webhooks } from './webhooks'; -import { Redis } from './redis'; -import { DbMigrations } from './db-migrations'; -import { Schema } from './schema'; -import { ServiceDeployment } from '../utils/service-deployment'; -import { serviceLocalEndpoint } from '../utils/local-endpoint'; import { DeploymentEnvironment } from '../types'; +import { isProduction } from '../utils/helpers'; +import { serviceLocalEndpoint } from '../utils/local-endpoint'; +import { ServiceDeployment } from '../utils/service-deployment'; +import { StripeBillingService } from './billing'; +import { CDN } from './cf-cdn'; import { Clickhouse } from './clickhouse'; +import { DbMigrations } from './db-migrations'; +import { Emails } from './emails'; +import { RateLimitService } from './rate-limit'; +import { Redis } from './redis'; +import { Schema } from './schema'; +import { Tokens } from './tokens'; import { Usage } from './usage'; import { UsageEstimator } from './usage-estimation'; -import { RateLimitService } from './rate-limit'; -import { Emails } from './emails'; -import { StripeBillingService } from './billing'; -import { Output } from '@pulumi/pulumi'; -import * as k8s from '@pulumi/kubernetes'; -import { isProduction } from '../utils/helpers'; +import { Webhooks } from './webhooks'; const commonConfig = new pulumi.Config('common'); const cloudflareConfig = new pulumi.Config('cloudflare'); diff --git a/deployment/services/proxy.ts b/deployment/services/proxy.ts index 36819bbab..94a2e2c99 100644 --- a/deployment/services/proxy.ts +++ b/deployment/services/proxy.ts @@ -1,12 +1,12 @@ import * as pulumi from '@pulumi/pulumi'; -import { Proxy } from '../utils/reverse-proxy'; -import { CertManager } from '../utils/cert-manager'; -import { GraphQL } from './graphql'; -import { App } from './app'; -import { Usage } from './usage'; -import { Docs } from './docs'; -import { isProduction } from '../utils/helpers'; import { DeploymentEnvironment } from '../types'; +import { CertManager } from '../utils/cert-manager'; +import { isProduction } from '../utils/helpers'; +import { Proxy } from '../utils/reverse-proxy'; +import { App } from './app'; +import { Docs } from './docs'; +import { GraphQL } from './graphql'; +import { Usage } from './usage'; const commonConfig = new pulumi.Config('common'); diff --git a/deployment/services/rate-limit.ts b/deployment/services/rate-limit.ts index a4a8066d9..5f2beabbd 100644 --- a/deployment/services/rate-limit.ts +++ b/deployment/services/rate-limit.ts @@ -1,12 +1,12 @@ +import * as k8s from '@pulumi/kubernetes'; import * as pulumi from '@pulumi/pulumi'; import { parse } from 'pg-connection-string'; -import { ServiceDeployment } from '../utils/service-deployment'; import { DeploymentEnvironment } from '../types'; -import { DbMigrations } from './db-migrations'; -import { UsageEstimator } from './usage-estimation'; -import { Emails } from './emails'; import { serviceLocalEndpoint } from '../utils/local-endpoint'; -import * as k8s from '@pulumi/kubernetes'; +import { ServiceDeployment } from '../utils/service-deployment'; +import { DbMigrations } from './db-migrations'; +import { Emails } from './emails'; +import { UsageEstimator } from './usage-estimation'; const rateLimitConfig = new pulumi.Config('rateLimit'); const commonConfig = new pulumi.Config('common'); diff --git a/deployment/services/redis.ts b/deployment/services/redis.ts index 5adb05f91..2f9b7f600 100644 --- a/deployment/services/redis.ts +++ b/deployment/services/redis.ts @@ -1,8 +1,8 @@ import * as pulumi from '@pulumi/pulumi'; -import { serviceLocalHost } from '../utils/local-endpoint'; -import { Redis as RedisStore } from '../utils/redis'; import { DeploymentEnvironment } from '../types'; import { isProduction } from '../utils/helpers'; +import { serviceLocalHost } from '../utils/local-endpoint'; +import { Redis as RedisStore } from '../utils/redis'; const redisConfig = new pulumi.Config('redis'); diff --git a/deployment/services/schema.ts b/deployment/services/schema.ts index 29374e2b5..6c354d040 100644 --- a/deployment/services/schema.ts +++ b/deployment/services/schema.ts @@ -1,10 +1,10 @@ -import * as pulumi from '@pulumi/pulumi'; -import { ServiceDeployment } from '../utils/service-deployment'; -import { DeploymentEnvironment } from '../types'; -import { Redis } from './redis'; -import type { Broker } from './cf-broker'; import * as k8s from '@pulumi/kubernetes'; +import * as pulumi from '@pulumi/pulumi'; +import { DeploymentEnvironment } from '../types'; import { isProduction } from '../utils/helpers'; +import { ServiceDeployment } from '../utils/service-deployment'; +import type { Broker } from './cf-broker'; +import { Redis } from './redis'; const commonConfig = new pulumi.Config('common'); const commonEnv = commonConfig.requireObject>('env'); diff --git a/deployment/services/supertokens.ts b/deployment/services/supertokens.ts index 60c538dd3..fd451eb04 100644 --- a/deployment/services/supertokens.ts +++ b/deployment/services/supertokens.ts @@ -1,7 +1,7 @@ -import * as pulumi from '@pulumi/pulumi'; import * as kx from '@pulumi/kubernetesx'; -import { serviceLocalEndpoint } from '../utils/local-endpoint'; +import * as pulumi from '@pulumi/pulumi'; import { Output } from '@pulumi/pulumi'; +import { serviceLocalEndpoint } from '../utils/local-endpoint'; export function deploySuperTokens( { apiKey }: { apiKey: Output }, diff --git a/deployment/services/tokens.ts b/deployment/services/tokens.ts index afc7975e9..30385d7a1 100644 --- a/deployment/services/tokens.ts +++ b/deployment/services/tokens.ts @@ -1,9 +1,9 @@ +import * as k8s from '@pulumi/kubernetes'; import * as pulumi from '@pulumi/pulumi'; import { parse } from 'pg-connection-string'; -import { DbMigrations } from './db-migrations'; -import { ServiceDeployment } from '../utils/service-deployment'; import { DeploymentEnvironment } from '../types'; -import * as k8s from '@pulumi/kubernetes'; +import { ServiceDeployment } from '../utils/service-deployment'; +import { DbMigrations } from './db-migrations'; const commonConfig = new pulumi.Config('common'); const apiConfig = new pulumi.Config('api'); diff --git a/deployment/services/usage-estimation.ts b/deployment/services/usage-estimation.ts index d1dd4df22..58470a487 100644 --- a/deployment/services/usage-estimation.ts +++ b/deployment/services/usage-estimation.ts @@ -1,9 +1,9 @@ +import * as k8s from '@pulumi/kubernetes'; import * as pulumi from '@pulumi/pulumi'; -import { ServiceDeployment } from '../utils/service-deployment'; import { DeploymentEnvironment } from '../types'; +import { ServiceDeployment } from '../utils/service-deployment'; import { Clickhouse } from './clickhouse'; import { DbMigrations } from './db-migrations'; -import * as k8s from '@pulumi/kubernetes'; const commonConfig = new pulumi.Config('common'); const commonEnv = commonConfig.requireObject>('env'); diff --git a/deployment/services/usage-ingestor.ts b/deployment/services/usage-ingestor.ts index bf4329f44..0b6b8e2d5 100644 --- a/deployment/services/usage-ingestor.ts +++ b/deployment/services/usage-ingestor.ts @@ -1,11 +1,11 @@ -import * as pulumi from '@pulumi/pulumi'; -import { DbMigrations } from './db-migrations'; -import { ServiceDeployment } from '../utils/service-deployment'; -import { DeploymentEnvironment } from '../types'; -import { Clickhouse } from './clickhouse'; -import { Kafka } from './kafka'; -import { isProduction } from '../utils/helpers'; import * as k8s from '@pulumi/kubernetes'; +import * as pulumi from '@pulumi/pulumi'; +import { DeploymentEnvironment } from '../types'; +import { isProduction } from '../utils/helpers'; +import { ServiceDeployment } from '../utils/service-deployment'; +import { Clickhouse } from './clickhouse'; +import { DbMigrations } from './db-migrations'; +import { Kafka } from './kafka'; const commonConfig = new pulumi.Config('common'); const commonEnv = commonConfig.requireObject>('env'); diff --git a/deployment/services/usage.ts b/deployment/services/usage.ts index 2a2aaee24..8d4765514 100644 --- a/deployment/services/usage.ts +++ b/deployment/services/usage.ts @@ -1,13 +1,13 @@ +import * as k8s from '@pulumi/kubernetes'; import * as pulumi from '@pulumi/pulumi'; -import { Tokens } from './tokens'; -import { DbMigrations } from './db-migrations'; -import { ServiceDeployment } from '../utils/service-deployment'; -import { serviceLocalEndpoint } from '../utils/local-endpoint'; import { DeploymentEnvironment } from '../types'; +import { isProduction } from '../utils/helpers'; +import { serviceLocalEndpoint } from '../utils/local-endpoint'; +import { ServiceDeployment } from '../utils/service-deployment'; +import { DbMigrations } from './db-migrations'; import { Kafka } from './kafka'; import { RateLimitService } from './rate-limit'; -import { isProduction } from '../utils/helpers'; -import * as k8s from '@pulumi/kubernetes'; +import { Tokens } from './tokens'; const commonConfig = new pulumi.Config('common'); const commonEnv = commonConfig.requireObject>('env'); diff --git a/deployment/services/webhooks.ts b/deployment/services/webhooks.ts index 31e63d076..ff33a51f5 100644 --- a/deployment/services/webhooks.ts +++ b/deployment/services/webhooks.ts @@ -1,9 +1,9 @@ -import * as pulumi from '@pulumi/pulumi'; -import { ServiceDeployment } from '../utils/service-deployment'; -import { DeploymentEnvironment } from '../types'; -import { Redis } from './redis'; -import type { Broker } from './cf-broker'; import * as k8s from '@pulumi/kubernetes'; +import * as pulumi from '@pulumi/pulumi'; +import { DeploymentEnvironment } from '../types'; +import { ServiceDeployment } from '../utils/service-deployment'; +import type { Broker } from './cf-broker'; +import { Redis } from './redis'; const commonConfig = new pulumi.Config('common'); const commonEnv = commonConfig.requireObject>('env'); diff --git a/deployment/utils/clickhouse.ts b/deployment/utils/clickhouse.ts index bad6a11f4..dc95919c1 100644 --- a/deployment/utils/clickhouse.ts +++ b/deployment/utils/clickhouse.ts @@ -1,7 +1,7 @@ -import * as kx from '@pulumi/kubernetesx'; import * as k8s from '@pulumi/kubernetes'; -import { PodBuilder } from './pod-builder'; +import * as kx from '@pulumi/kubernetesx'; import { getLocalComposeConfig } from './local-config'; +import { PodBuilder } from './pod-builder'; export class Clickhouse { constructor( diff --git a/deployment/utils/cloudflare.ts b/deployment/utils/cloudflare.ts index ee5955665..9ef43662a 100644 --- a/deployment/utils/cloudflare.ts +++ b/deployment/utils/cloudflare.ts @@ -1,7 +1,7 @@ -import * as cf from '@pulumi/cloudflare'; -import * as pulumi from '@pulumi/pulumi'; import { readFileSync } from 'fs'; import { resolve } from 'path'; +import * as cf from '@pulumi/cloudflare'; +import * as pulumi from '@pulumi/pulumi'; export class CloudflareCDN { constructor( diff --git a/deployment/utils/observability.ts b/deployment/utils/observability.ts index da35d8303..1e4464c5a 100644 --- a/deployment/utils/observability.ts +++ b/deployment/utils/observability.ts @@ -1,5 +1,5 @@ import * as k8s from '@pulumi/kubernetes'; -import { Output, interpolate } from '@pulumi/pulumi'; +import { interpolate, Output } from '@pulumi/pulumi'; export type ObservabilityConfig = { loki: { diff --git a/deployment/utils/pod-builder.ts b/deployment/utils/pod-builder.ts index 6232492ea..ba0fc1dfc 100644 --- a/deployment/utils/pod-builder.ts +++ b/deployment/utils/pod-builder.ts @@ -1,5 +1,5 @@ -import * as kx from '@pulumi/kubernetesx'; import * as k8s from '@pulumi/kubernetes'; +import * as kx from '@pulumi/kubernetesx'; import * as pulumi from '@pulumi/pulumi'; export function normalizeEnv(env: kx.types.Container['env']): any[] { diff --git a/deployment/utils/police.ts b/deployment/utils/police.ts index 4406490e9..5127c9e2b 100644 --- a/deployment/utils/police.ts +++ b/deployment/utils/police.ts @@ -1,7 +1,7 @@ -import * as cf from '@pulumi/cloudflare'; -import * as pulumi from '@pulumi/pulumi'; import { readFileSync } from 'fs'; import { resolve } from 'path'; +import * as cf from '@pulumi/cloudflare'; +import * as pulumi from '@pulumi/pulumi'; export class HivePolice { constructor( diff --git a/deployment/utils/redis.ts b/deployment/utils/redis.ts index 7186728f4..4c82ccacd 100644 --- a/deployment/utils/redis.ts +++ b/deployment/utils/redis.ts @@ -1,5 +1,5 @@ -import * as kx from '@pulumi/kubernetesx'; import * as k8s from '@pulumi/kubernetes'; +import * as kx from '@pulumi/kubernetesx'; import { normalizeEnv, PodBuilder } from './pod-builder'; const DEFAULT_IMAGE = 'bitnami/redis:6.2.6'; diff --git a/deployment/utils/service-deployment.ts b/deployment/utils/service-deployment.ts index 51026d721..31113b81f 100644 --- a/deployment/utils/service-deployment.ts +++ b/deployment/utils/service-deployment.ts @@ -1,8 +1,8 @@ -import * as kx from '@pulumi/kubernetesx'; import * as k8s from '@pulumi/kubernetes'; +import * as kx from '@pulumi/kubernetesx'; import * as pulumi from '@pulumi/pulumi'; -import { PodBuilder, normalizeEnv } from './pod-builder'; import { isDefined } from './helpers'; +import { normalizeEnv, PodBuilder } from './pod-builder'; export class ServiceDeployment { constructor( diff --git a/integration-tests/testkit/auth.ts b/integration-tests/testkit/auth.ts index 355247f18..78c8c59ad 100644 --- a/integration-tests/testkit/auth.ts +++ b/integration-tests/testkit/auth.ts @@ -1,5 +1,5 @@ -import { createTRPCProxyClient, httpLink } from '@trpc/client'; import type { InternalApi } from '@hive/server'; +import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { createFetch } from '@whatwg-node/fetch'; import { z } from 'zod'; import { ensureEnv } from './env'; diff --git a/integration-tests/testkit/cli.ts b/integration-tests/testkit/cli.ts index 6ff9319a9..b1a2f4992 100644 --- a/integration-tests/testkit/cli.ts +++ b/integration-tests/testkit/cli.ts @@ -1,6 +1,6 @@ import { resolve } from 'path'; -import { getServiceHost } from './utils'; import { execaCommand } from '@esm2cjs/execa'; +import { getServiceHost } from './utils'; const binPath = resolve(__dirname, '../../packages/libraries/cli/bin/dev'); diff --git a/integration-tests/testkit/flow.ts b/integration-tests/testkit/flow.ts index 4f90b1ae1..e9a5bb300 100644 --- a/integration-tests/testkit/flow.ts +++ b/integration-tests/testkit/flow.ts @@ -1,34 +1,33 @@ import { gql } from '@app/gql'; import { fetch } from '@whatwg-node/fetch'; - import type { + AnswerOrganizationTransferRequestInput, CreateOrganizationInput, - UpdateOrganizationNameInput, - SchemaPublishInput, CreateProjectInput, - UpdateProjectNameInput, + CreateTargetInput, CreateTokenInput, DeleteTokensInput, - OrganizationMemberAccessInput, - SchemaCheckInput, - PublishPersistedOperationInput, - SetTargetValidationInput, - UpdateTargetValidationSettingsInput, - OperationsStatsSelectorInput, - UpdateBaseSchemaInput, - SchemaVersionsInput, - CreateTargetInput, - UpdateTargetNameInput, - SchemaVersionUpdateInput, - TargetSelectorInput, - OrganizationSelectorInput, - SchemaSyncCdnInput, - RateLimitInput, - InviteToOrganizationByEmailInput, EnableExternalSchemaCompositionInput, + InviteToOrganizationByEmailInput, + OperationsStatsSelectorInput, + OrganizationMemberAccessInput, + OrganizationSelectorInput, OrganizationTransferRequestSelector, + PublishPersistedOperationInput, + RateLimitInput, RequestOrganizationTransferInput, - AnswerOrganizationTransferRequestInput, + SchemaCheckInput, + SchemaPublishInput, + SchemaSyncCdnInput, + SchemaVersionsInput, + SchemaVersionUpdateInput, + SetTargetValidationInput, + TargetSelectorInput, + UpdateBaseSchemaInput, + UpdateOrganizationNameInput, + UpdateProjectNameInput, + UpdateTargetNameInput, + UpdateTargetValidationSettingsInput, } from './gql/graphql'; import { execute } from './graphql'; diff --git a/integration-tests/testkit/graphql.ts b/integration-tests/testkit/graphql.ts index 9884071bd..c2b52c1ba 100644 --- a/integration-tests/testkit/graphql.ts +++ b/integration-tests/testkit/graphql.ts @@ -1,7 +1,7 @@ -// eslint-disable-next-line import/no-extraneous-dependencies -import { ExecutionResult, print } from 'graphql'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { createFetch } from '@whatwg-node/fetch'; +// eslint-disable-next-line import/no-extraneous-dependencies +import { ExecutionResult, print } from 'graphql'; import { getServiceHost } from './utils'; const { fetch } = createFetch({ diff --git a/integration-tests/tests/api/artifacts-cdn.spec.ts b/integration-tests/tests/api/artifacts-cdn.spec.ts index 289e95e97..60942ab33 100644 --- a/integration-tests/tests/api/artifacts-cdn.spec.ts +++ b/integration-tests/tests/api/artifacts-cdn.spec.ts @@ -1,12 +1,12 @@ import { - S3Client, - ListObjectsCommand, DeleteObjectsCommand, GetObjectCommand, + ListObjectsCommand, + S3Client, } from '@aws-sdk/client-s3'; import { fetch } from '@whatwg-node/fetch'; -import { initSeed } from '../../testkit/seed'; import { ProjectType, TargetAccessScope } from '../../testkit/gql/graphql'; +import { initSeed } from '../../testkit/seed'; import { getServiceHost } from '../../testkit/utils'; const s3Client = new S3Client({ diff --git a/integration-tests/tests/api/organization/get-started.spec.ts b/integration-tests/tests/api/organization/get-started.spec.ts index 5487e9458..2cc443bb1 100644 --- a/integration-tests/tests/api/organization/get-started.spec.ts +++ b/integration-tests/tests/api/organization/get-started.spec.ts @@ -1,10 +1,10 @@ -import { waitFor } from '../../../testkit/flow'; import { - TargetAccessScope, - ProjectType, - ProjectAccessScope, OrganizationAccessScope, + ProjectAccessScope, + ProjectType, + TargetAccessScope, } from '@app/gql/graphql'; +import { waitFor } from '../../../testkit/flow'; import { initSeed } from '../../../testkit/seed'; test.concurrent('freshly created organization has Get Started progress at 0%', async () => { diff --git a/integration-tests/tests/api/organization/transfer.spec.ts b/integration-tests/tests/api/organization/transfer.spec.ts index 044f25467..1b05db8d7 100644 --- a/integration-tests/tests/api/organization/transfer.spec.ts +++ b/integration-tests/tests/api/organization/transfer.spec.ts @@ -1,14 +1,14 @@ -import { initSeed } from '../../../testkit/seed'; import { + answerOrganizationTransferRequest, getOrganizationTransferRequest, requestOrganizationTransfer, - answerOrganizationTransferRequest, } from '../../../testkit/flow'; import { OrganizationAccessScope, ProjectAccessScope, TargetAccessScope, } from '../../../testkit/gql/graphql'; +import { initSeed } from '../../../testkit/seed'; test.concurrent( 'accessing non-existing ownership transfer request should result in null', diff --git a/integration-tests/tests/api/persisted-operations/publish.spec.ts b/integration-tests/tests/api/persisted-operations/publish.spec.ts index 4a699a0bf..b0970bb9e 100644 --- a/integration-tests/tests/api/persisted-operations/publish.spec.ts +++ b/integration-tests/tests/api/persisted-operations/publish.spec.ts @@ -1,4 +1,4 @@ -import { ProjectType, ProjectAccessScope } from '@app/gql/graphql'; +import { ProjectAccessScope, ProjectType } from '@app/gql/graphql'; import { publishPersistedOperations } from '../../../testkit/flow'; import { initSeed } from '../../../testkit/seed'; diff --git a/integration-tests/tests/api/rate-limit/emails.spec.ts b/integration-tests/tests/api/rate-limit/emails.spec.ts index 53ffe4c4a..7faafccc7 100644 --- a/integration-tests/tests/api/rate-limit/emails.spec.ts +++ b/integration-tests/tests/api/rate-limit/emails.spec.ts @@ -1,11 +1,11 @@ import { - TargetAccessScope, - ProjectType, - ProjectAccessScope, OrganizationAccessScope, + ProjectAccessScope, + ProjectType, + TargetAccessScope, } from '@app/gql/graphql'; -import { updateOrgRateLimit, waitFor } from '../../../testkit/flow'; import * as emails from '../../../testkit/emails'; +import { updateOrgRateLimit, waitFor } from '../../../testkit/flow'; import { initSeed } from '../../../testkit/seed'; function filterEmailsByOrg(orgName: string, emails: emails.Email[]) { diff --git a/integration-tests/tests/api/schema/check.spec.ts b/integration-tests/tests/api/schema/check.spec.ts index 480f23b8e..c5747dfbe 100644 --- a/integration-tests/tests/api/schema/check.spec.ts +++ b/integration-tests/tests/api/schema/check.spec.ts @@ -1,4 +1,4 @@ -import { TargetAccessScope, ProjectType } from '@app/gql/graphql'; +import { ProjectType, TargetAccessScope } from '@app/gql/graphql'; import { initSeed } from '../../../testkit/seed'; test.concurrent('can check a schema with target:registry:read access', async () => { diff --git a/integration-tests/tests/api/schema/composition-federation-2.spec.ts b/integration-tests/tests/api/schema/composition-federation-2.spec.ts index b6646c6e9..75b486e66 100644 --- a/integration-tests/tests/api/schema/composition-federation-2.spec.ts +++ b/integration-tests/tests/api/schema/composition-federation-2.spec.ts @@ -1,7 +1,7 @@ +import { ProjectAccessScope, ProjectType, TargetAccessScope } from '@app/gql/graphql'; import { enableExternalSchemaComposition } from '../../../testkit/flow'; -import { TargetAccessScope, ProjectType, ProjectAccessScope } from '@app/gql/graphql'; -import { generateUnique } from '../../../testkit/utils'; import { initSeed } from '../../../testkit/seed'; +import { generateUnique } from '../../../testkit/utils'; // We do not resolve this to a host address, because we are calling this through a different flow: // GraphQL API -> Schema service -> Composition service diff --git a/integration-tests/tests/api/schema/external-composition.spec.ts b/integration-tests/tests/api/schema/external-composition.spec.ts index 263858e7d..dd8f13d4b 100644 --- a/integration-tests/tests/api/schema/external-composition.spec.ts +++ b/integration-tests/tests/api/schema/external-composition.spec.ts @@ -1,8 +1,8 @@ -import { TargetAccessScope, ProjectType, ProjectAccessScope } from '@app/gql/graphql'; -import { enableExternalSchemaComposition } from '../../../testkit/flow'; +import { ProjectAccessScope, ProjectType, TargetAccessScope } from '@app/gql/graphql'; import { history, serviceName, servicePort } from '../../../testkit/external-composition'; -import { generateUnique } from '../../../testkit/utils'; +import { enableExternalSchemaComposition } from '../../../testkit/flow'; import { initSeed } from '../../../testkit/seed'; +import { generateUnique } from '../../../testkit/utils'; test.concurrent('call an external service to compose and validate services', async () => { const { createOrg } = await initSeed().createOwner(); diff --git a/integration-tests/tests/api/schema/publish.spec.ts b/integration-tests/tests/api/schema/publish.spec.ts index 4f8708c56..ab572f921 100644 --- a/integration-tests/tests/api/schema/publish.spec.ts +++ b/integration-tests/tests/api/schema/publish.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable no-process-env */ -import { TargetAccessScope, ProjectType } from '@app/gql/graphql'; -import { createTarget, publishSchema } from '../../../testkit/flow'; +import { ProjectType, TargetAccessScope } from '@app/gql/graphql'; import { fetch } from '@whatwg-node/fetch'; +import { createTarget, publishSchema } from '../../../testkit/flow'; import { initSeed } from '../../../testkit/seed'; test.concurrent('cannot publish a schema without target:registry:write access', async () => { diff --git a/integration-tests/tests/api/schema/sync.spec.ts b/integration-tests/tests/api/schema/sync.spec.ts index 89515652c..0acda74b1 100644 --- a/integration-tests/tests/api/schema/sync.spec.ts +++ b/integration-tests/tests/api/schema/sync.spec.ts @@ -1,4 +1,4 @@ -import { TargetAccessScope, ProjectType } from '@app/gql/graphql'; +import { ProjectType, TargetAccessScope } from '@app/gql/graphql'; import { initSeed } from '../../../testkit/seed'; test.concurrent( diff --git a/integration-tests/tests/api/target/tokens.spec.ts b/integration-tests/tests/api/target/tokens.spec.ts index abe329b4b..e6b4901d2 100644 --- a/integration-tests/tests/api/target/tokens.spec.ts +++ b/integration-tests/tests/api/target/tokens.spec.ts @@ -1,4 +1,4 @@ -import { TargetAccessScope, ProjectType } from '@app/gql/graphql'; +import { ProjectType, TargetAccessScope } from '@app/gql/graphql'; import { initSeed } from '../../../testkit/seed'; test.concurrent( diff --git a/integration-tests/tests/api/target/usage.spec.ts b/integration-tests/tests/api/target/usage.spec.ts index 6fec4acdc..cd0e9a77f 100644 --- a/integration-tests/tests/api/target/usage.spec.ts +++ b/integration-tests/tests/api/target/usage.spec.ts @@ -1,19 +1,18 @@ import { - TargetAccessScope, - ProjectType, - ProjectAccessScope, OrganizationAccessScope, + ProjectAccessScope, + ProjectType, + TargetAccessScope, } from '@app/gql/graphql'; -import formatISO from 'date-fns/formatISO'; -import subHours from 'date-fns/subHours'; -import { createTarget, updateTargetValidationSettings, waitFor } from '../../../testkit/flow'; -import { CollectedOperation } from '../../../testkit/usage'; -import { clickHouseQuery } from '../../../testkit/clickhouse'; // eslint-disable-next-line hive/enforce-deps-in-dev import { normalizeOperation } from '@graphql-hive/core'; - +import formatISO from 'date-fns/formatISO'; +import subHours from 'date-fns/subHours'; import { parse, print } from 'graphql'; +import { clickHouseQuery } from '../../../testkit/clickhouse'; +import { createTarget, updateTargetValidationSettings, waitFor } from '../../../testkit/flow'; import { initSeed } from '../../../testkit/seed'; +import { CollectedOperation } from '../../../testkit/usage'; function ensureNumber(value: number | string): number { if (typeof value === 'number') { diff --git a/integration-tests/tests/cli/schema.spec.ts b/integration-tests/tests/cli/schema.spec.ts index 5cc681293..abd58652a 100644 --- a/integration-tests/tests/cli/schema.spec.ts +++ b/integration-tests/tests/cli/schema.spec.ts @@ -1,8 +1,8 @@ /* eslint-disable no-process-env */ import { createHash } from 'node:crypto'; -import { schemaPublish, schemaCheck } from '../../testkit/cli'; -import { initSeed } from '../../testkit/seed'; +import { schemaCheck, schemaPublish } from '../../testkit/cli'; import { ProjectType } from '../../testkit/gql/graphql'; +import { initSeed } from '../../testkit/seed'; test.concurrent('can publish and check a schema with target:registry:read access', async () => { const { createOrg } = await initSeed().createOwner(); diff --git a/jest.config.js b/jest.config.js index 5b71b90bb..071db7aad 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,5 @@ -import { resolve, dirname } from 'path'; import { readFileSync } from 'fs'; +import { dirname, resolve } from 'path'; import { fileURLToPath } from 'url'; import { pathsToModuleNameMapper } from 'ts-jest'; diff --git a/package.json b/package.json index 8fc60dbd9..7a4d61c52 100644 --- a/package.json +++ b/package.json @@ -65,11 +65,10 @@ "@graphql-inspector/cli": "3.4.0", "@sentry/cli": "2.11.0", "@swc/core": "1.3.24", + "@theguild/eslint-config": "0.4.0", "@theguild/prettier-config": "1.0.0", "@types/jest": "29.2.4", "@types/node": "18.11.18", - "@typescript-eslint/eslint-plugin": "5.47.1", - "@typescript-eslint/parser": "5.47.1", "babel-jest": "29.3.1", "babel-plugin-parameter-decorator": "1.0.16", "babel-plugin-transform-typescript-metadata": "0.3.2", @@ -80,11 +79,6 @@ "eslint": "8.30.0", "eslint-plugin-cypress": "2.12.1", "eslint-plugin-hive": "file:./rules", - "eslint-plugin-import": "2.26.0", - "eslint-plugin-jsx-a11y": "6.6.1", - "eslint-plugin-react": "7.31.11", - "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-simple-import-sort": "8.0.0", "eslint-plugin-tailwindcss": "3.7.1", "fs-extra": "11.1.0", "glob": "8.0.3", diff --git a/packages/libraries/cli/src/base-command.ts b/packages/libraries/cli/src/base-command.ts index c55a51671..8d9e0ce39 100644 --- a/packages/libraries/cli/src/base-command.ts +++ b/packages/libraries/cli/src/base-command.ts @@ -1,7 +1,7 @@ import { Command, Config as OclifConfig, Errors } from '@oclif/core'; import colors from 'colors'; +import { ClientError, GraphQLClient } from 'graphql-request'; import symbols from 'log-symbols'; -import { GraphQLClient, ClientError } from 'graphql-request'; import { Config } from './helpers/config'; import { getSdk } from './sdk'; diff --git a/packages/libraries/cli/src/commands/operations/check.ts b/packages/libraries/cli/src/commands/operations/check.ts index 805557746..73e604299 100644 --- a/packages/libraries/cli/src/commands/operations/check.ts +++ b/packages/libraries/cli/src/commands/operations/check.ts @@ -1,9 +1,9 @@ -import { Flags, Errors } from '@oclif/core'; -import { buildSchema, Source, GraphQLError } from 'graphql'; -import { validate, InvalidDocument } from '@graphql-inspector/core'; +import { InvalidDocument, validate } from '@graphql-inspector/core'; +import { Errors, Flags } from '@oclif/core'; +import { buildSchema, GraphQLError, Source } from 'graphql'; import Command from '../../base-command'; -import { loadOperations } from '../../helpers/operations'; import { graphqlEndpoint } from '../../helpers/config'; +import { loadOperations } from '../../helpers/operations'; export default class OperationsCheck extends Command { static description = 'checks operations against a published schema'; diff --git a/packages/libraries/cli/src/commands/operations/publish.ts b/packages/libraries/cli/src/commands/operations/publish.ts index ac4f4ffa8..b38b31c3c 100644 --- a/packages/libraries/cli/src/commands/operations/publish.ts +++ b/packages/libraries/cli/src/commands/operations/publish.ts @@ -1,7 +1,7 @@ -import { Flags, Errors } from '@oclif/core'; +import { Errors, Flags } from '@oclif/core'; import Command from '../../base-command'; -import { loadOperations } from '../../helpers/operations'; import { graphqlEndpoint } from '../../helpers/config'; +import { loadOperations } from '../../helpers/operations'; export default class OperationsPublish extends Command { static description = 'saves operations to the store'; diff --git a/packages/libraries/cli/src/commands/schema/check.ts b/packages/libraries/cli/src/commands/schema/check.ts index 48a53378f..8597e9081 100644 --- a/packages/libraries/cli/src/commands/schema/check.ts +++ b/packages/libraries/cli/src/commands/schema/check.ts @@ -1,9 +1,9 @@ -import { Flags, Errors } from '@oclif/core'; -import { loadSchema, renderChanges, renderErrors, minifySchema } from '../../helpers/schema'; -import { invariant } from '../../helpers/validation'; -import { gitInfo } from '../../helpers/git'; -import { graphqlEndpoint } from '../../helpers/config'; +import { Errors, Flags } from '@oclif/core'; import Command from '../../base-command'; +import { graphqlEndpoint } from '../../helpers/config'; +import { gitInfo } from '../../helpers/git'; +import { loadSchema, minifySchema, renderChanges, renderErrors } from '../../helpers/schema'; +import { invariant } from '../../helpers/validation'; export default class SchemaCheck extends Command { static description = 'checks schema'; diff --git a/packages/libraries/cli/src/commands/schema/publish.ts b/packages/libraries/cli/src/commands/schema/publish.ts index 47079ecdd..481cd025e 100644 --- a/packages/libraries/cli/src/commands/schema/publish.ts +++ b/packages/libraries/cli/src/commands/schema/publish.ts @@ -1,12 +1,12 @@ +import { existsSync, readFileSync } from 'fs'; import { transformCommentsToDescriptions } from '@graphql-tools/utils'; -import { Flags, Errors } from '@oclif/core'; +import { Errors, Flags } from '@oclif/core'; import { GraphQLError, print } from 'graphql'; import Command from '../../base-command'; import { graphqlEndpoint } from '../../helpers/config'; import { gitInfo } from '../../helpers/git'; -import { invariant } from '../../helpers/validation'; import { loadSchema, minifySchema, renderChanges, renderErrors } from '../../helpers/schema'; -import { existsSync, readFileSync } from 'fs'; +import { invariant } from '../../helpers/validation'; export default class SchemaPublish extends Command { static description = 'publishes schema'; diff --git a/packages/libraries/cli/src/helpers/config.ts b/packages/libraries/cli/src/helpers/config.ts index 42cdef344..ae4612e93 100644 --- a/packages/libraries/cli/src/helpers/config.ts +++ b/packages/libraries/cli/src/helpers/config.ts @@ -1,6 +1,6 @@ import fs from 'fs'; -import mkdirp from 'mkdirp'; import path from 'path'; +import mkdirp from 'mkdirp'; export const graphqlEndpoint = 'https://app.graphql-hive.com/graphql'; diff --git a/packages/libraries/cli/src/helpers/git.ts b/packages/libraries/cli/src/helpers/git.ts index e9d3b4dda..97b696e5d 100644 --- a/packages/libraries/cli/src/helpers/git.ts +++ b/packages/libraries/cli/src/helpers/git.ts @@ -1,7 +1,7 @@ -import { gitToJs } from 'git-parse'; -import ci from 'env-ci'; -import { readFileSync, existsSync } from 'fs'; +import { existsSync, readFileSync } from 'fs'; import { join } from 'path'; +import ci from 'env-ci'; +import { gitToJs } from 'git-parse'; function splitPath(path: string) { const parts = path.split(/(\/|\\)/); diff --git a/packages/libraries/cli/src/helpers/operations.ts b/packages/libraries/cli/src/helpers/operations.ts index 19ae0e196..2f322ef0c 100644 --- a/packages/libraries/cli/src/helpers/operations.ts +++ b/packages/libraries/cli/src/helpers/operations.ts @@ -1,10 +1,10 @@ -import { normalizeOperation } from '@graphql-hive/core'; import { promises as fs } from 'fs'; import { relative } from 'path'; -import { parse } from 'graphql'; -import { loadDocuments } from '@graphql-tools/load'; +import { normalizeOperation } from '@graphql-hive/core'; import { CodeFileLoader } from '@graphql-tools/code-file-loader'; import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader'; +import { loadDocuments } from '@graphql-tools/load'; +import { parse } from 'graphql'; export async function loadOperations( file: string, diff --git a/packages/libraries/cli/src/helpers/schema.ts b/packages/libraries/cli/src/helpers/schema.ts index 9e2bc7844..1d07f59c2 100644 --- a/packages/libraries/cli/src/helpers/schema.ts +++ b/packages/libraries/cli/src/helpers/schema.ts @@ -1,12 +1,12 @@ -import colors from 'colors'; -import { print, concatAST } from 'graphql'; -import { loadTypedefs } from '@graphql-tools/load'; import { CodeFileLoader } from '@graphql-tools/code-file-loader'; import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader'; import { JsonFileLoader } from '@graphql-tools/json-file-loader'; +import { loadTypedefs } from '@graphql-tools/load'; import { UrlLoader } from '@graphql-tools/url-loader'; -import { CriticalityLevel, SchemaChangeConnection, SchemaErrorConnection } from '../sdk'; +import colors from 'colors'; +import { concatAST, print } from 'graphql'; import baseCommand from '../base-command'; +import { CriticalityLevel, SchemaChangeConnection, SchemaErrorConnection } from '../sdk'; const indent = ' '; diff --git a/packages/libraries/client/src/apollo.ts b/packages/libraries/client/src/apollo.ts index c7c7bef60..afc64cee5 100644 --- a/packages/libraries/client/src/apollo.ts +++ b/packages/libraries/client/src/apollo.ts @@ -1,13 +1,13 @@ +import { createHash } from 'crypto'; import type { ApolloServerPlugin } from 'apollo-server-plugin-base'; +import axios from 'axios'; import type { DocumentNode } from 'graphql'; +import { createHive } from './client.js'; import type { HiveClient, HivePluginOptions, SupergraphSDLFetcherOptions, } from './internal/types.js'; -import { createHash } from 'crypto'; -import axios from 'axios'; -import { createHive } from './client.js'; import { isHiveClient } from './internal/utils.js'; import { version } from './version.js'; diff --git a/packages/libraries/client/src/client.ts b/packages/libraries/client/src/client.ts index 976730dba..8783ce345 100644 --- a/packages/libraries/client/src/client.ts +++ b/packages/libraries/client/src/client.ts @@ -1,9 +1,9 @@ -import { GraphQLSchema, ExecutionArgs, ExecutionResult } from 'graphql'; import axios from 'axios'; -import type { HivePluginOptions, HiveClient } from './internal/types.js'; -import { createUsage } from './internal/usage.js'; -import { createReporting } from './internal/reporting.js'; +import { ExecutionArgs, ExecutionResult, GraphQLSchema } from 'graphql'; import { createOperationsStore } from './internal/operations-store.js'; +import { createReporting } from './internal/reporting.js'; +import type { HiveClient, HivePluginOptions } from './internal/types.js'; +import { createUsage } from './internal/usage.js'; import { logIf } from './internal/utils.js'; import { version } from './version.js'; diff --git a/packages/libraries/client/src/envelop.ts b/packages/libraries/client/src/envelop.ts index 88aa04a34..d80a86b61 100644 --- a/packages/libraries/client/src/envelop.ts +++ b/packages/libraries/client/src/envelop.ts @@ -1,6 +1,6 @@ import type { Plugin } from '@envelop/types'; -import type { HiveClient, HivePluginOptions } from './internal/types.js'; import { createHive } from './client.js'; +import type { HiveClient, HivePluginOptions } from './internal/types.js'; import { isHiveClient } from './internal/utils.js'; export function useHive(clientOrOptions: HiveClient): Plugin; diff --git a/packages/libraries/client/src/gateways.ts b/packages/libraries/client/src/gateways.ts index ec5912e05..343a6f35b 100644 --- a/packages/libraries/client/src/gateways.ts +++ b/packages/libraries/client/src/gateways.ts @@ -1,5 +1,5 @@ -import axios from 'axios'; import { createHash } from 'crypto'; +import axios from 'axios'; import type { SchemaFetcherOptions, ServicesFetcherOptions } from './internal/types.js'; import { version } from './version.js'; diff --git a/packages/libraries/client/src/internal/operations-store.ts b/packages/libraries/client/src/internal/operations-store.ts index 66985d6f5..85c24799e 100644 --- a/packages/libraries/client/src/internal/operations-store.ts +++ b/packages/libraries/client/src/internal/operations-store.ts @@ -1,6 +1,6 @@ -import type { DocumentNode } from 'graphql'; -import { stripIgnoredCharacters, parse } from 'graphql'; import axios from 'axios'; +import type { DocumentNode } from 'graphql'; +import { parse, stripIgnoredCharacters } from 'graphql'; import type { HivePluginOptions } from './types.js'; export interface OperationsStore { diff --git a/packages/libraries/client/src/internal/reporting.ts b/packages/libraries/client/src/internal/reporting.ts index 06abbaca9..2ad11c568 100644 --- a/packages/libraries/client/src/internal/reporting.ts +++ b/packages/libraries/client/src/internal/reporting.ts @@ -1,9 +1,9 @@ -import { GraphQLSchema, stripIgnoredCharacters, print, Kind, ExecutionResult } from 'graphql'; import { getDocumentNodeFromSchema } from '@graphql-tools/utils'; -import { createAgent } from './agent.js'; -import { version } from '../version.js'; -import type { HivePluginOptions } from './types.js'; +import { ExecutionResult, GraphQLSchema, Kind, print, stripIgnoredCharacters } from 'graphql'; import type { SchemaPublishMutation } from '../__generated__/types.js'; +import { version } from '../version.js'; +import { createAgent } from './agent.js'; +import type { HivePluginOptions } from './types.js'; import { logIf } from './utils.js'; export interface SchemaReporter { diff --git a/packages/libraries/client/src/internal/types.ts b/packages/libraries/client/src/internal/types.ts index 33217a6bc..11dc78b08 100644 --- a/packages/libraries/client/src/internal/types.ts +++ b/packages/libraries/client/src/internal/types.ts @@ -1,7 +1,7 @@ import type { ExecutionArgs } from 'graphql'; import type { AgentOptions } from './agent.js'; -import type { SchemaReporter } from './reporting.js'; import type { OperationsStore } from './operations-store.js'; +import type { SchemaReporter } from './reporting.js'; export interface HiveClient { info(): Promise; diff --git a/packages/libraries/client/src/internal/usage.ts b/packages/libraries/client/src/internal/usage.ts index 828e295ed..e40d47b1a 100644 --- a/packages/libraries/client/src/internal/usage.ts +++ b/packages/libraries/client/src/internal/usage.ts @@ -1,3 +1,4 @@ +import { normalizeOperation } from '@graphql-hive/core'; import { ArgumentNode, DocumentNode, @@ -24,24 +25,23 @@ import { visitWithTypeInfo, } from 'graphql'; import LRU from 'tiny-lru'; -import { normalizeOperation } from '@graphql-hive/core'; +import { version } from '../version.js'; import { createAgent } from './agent.js'; import { randomSampling } from './sampling.js'; -import { version } from '../version.js'; +import type { + ClientInfo, + CollectUsageCallback, + HivePluginOptions, + HiveUsagePluginOptions, +} from './types.js'; import { cache, cacheDocumentKey, - measureDuration, - memo, isAsyncIterableIterator, logIf, + measureDuration, + memo, } from './utils.js'; -import type { - HivePluginOptions, - HiveUsagePluginOptions, - CollectUsageCallback, - ClientInfo, -} from './types.js'; interface UsageCollector { collect(args: ExecutionArgs): CollectUsageCallback; diff --git a/packages/libraries/client/src/internal/utils.ts b/packages/libraries/client/src/internal/utils.ts index 6f05390e7..cfdd317c0 100644 --- a/packages/libraries/client/src/internal/utils.ts +++ b/packages/libraries/client/src/internal/utils.ts @@ -1,5 +1,5 @@ import { createHash } from 'crypto'; -import type { HiveClient, HivePluginOptions, AsyncIterableIteratorOrValue } from './types.js'; +import type { AsyncIterableIteratorOrValue, HiveClient, HivePluginOptions } from './types.js'; export function isAsyncIterableIterator( value: AsyncIterableIteratorOrValue, diff --git a/packages/libraries/client/tests/gateways.spec.ts b/packages/libraries/client/tests/gateways.spec.ts index 791000891..455979208 100644 --- a/packages/libraries/client/tests/gateways.spec.ts +++ b/packages/libraries/client/tests/gateways.spec.ts @@ -1,6 +1,6 @@ // eslint-disable-next-line import/no-extraneous-dependencies import nock from 'nock'; -import { createServicesFetcher, createSchemaFetcher } from '../src/gateways'; +import { createSchemaFetcher, createServicesFetcher } from '../src/gateways'; afterEach(() => { nock.cleanAll(); diff --git a/packages/libraries/client/tests/info.spec.ts b/packages/libraries/client/tests/info.spec.ts index d6f684904..1ba7ef2d9 100644 --- a/packages/libraries/client/tests/info.spec.ts +++ b/packages/libraries/client/tests/info.spec.ts @@ -1,6 +1,6 @@ -import { createHive } from '../src/client'; // eslint-disable-next-line import/no-extraneous-dependencies import nock from 'nock'; +import { createHive } from '../src/client'; test('should not leak the exception', async () => { const logger = { diff --git a/packages/libraries/client/tests/integration.spec.ts b/packages/libraries/client/tests/integration.spec.ts index 21fe171c6..5c908ca4a 100644 --- a/packages/libraries/client/tests/integration.spec.ts +++ b/packages/libraries/client/tests/integration.spec.ts @@ -1,11 +1,11 @@ -/* eslint-disable-next-line import/no-extraneous-dependencies */ -import { createSchema, createYoga } from 'graphql-yoga'; +import { createServer } from 'node:http'; +import { AddressInfo } from 'node:net'; /* eslint-disable-next-line import/no-extraneous-dependencies */ import { ApolloServerBase } from 'apollo-server-core'; import axios from 'axios'; -import { createServer } from 'node:http'; -import { AddressInfo } from 'node:net'; -import { createHive, useHive, hiveApollo } from '../src'; +/* eslint-disable-next-line import/no-extraneous-dependencies */ +import { createSchema, createYoga } from 'graphql-yoga'; +import { createHive, hiveApollo, useHive } from '../src'; import { waitFor } from './test-utils'; const typeDefs = /* GraphQL */ ` diff --git a/packages/libraries/client/tests/reporting.spec.ts b/packages/libraries/client/tests/reporting.spec.ts index 3d3bc97af..3e2fd0673 100644 --- a/packages/libraries/client/tests/reporting.spec.ts +++ b/packages/libraries/client/tests/reporting.spec.ts @@ -1,8 +1,8 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { buildSubgraphSchema } from '@apollo/federation'; import { buildSchema, parse } from 'graphql'; // eslint-disable-next-line import/no-extraneous-dependencies import nock from 'nock'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { buildSubgraphSchema } from '@apollo/federation'; import { createHive } from '../src/client'; import { version } from '../src/version'; import { waitFor } from './test-utils'; diff --git a/packages/libraries/client/tests/usage-collector.spec.ts b/packages/libraries/client/tests/usage-collector.spec.ts index b2464d599..2f1ac382f 100644 --- a/packages/libraries/client/tests/usage-collector.spec.ts +++ b/packages/libraries/client/tests/usage-collector.spec.ts @@ -1,4 +1,4 @@ -import { parse, buildSchema } from 'graphql'; +import { buildSchema, parse } from 'graphql'; import { createCollector } from '../src/internal/usage'; const schema = buildSchema(/* GraphQL */ ` diff --git a/packages/libraries/client/tests/usage.spec.ts b/packages/libraries/client/tests/usage.spec.ts index 08b0c7df0..de857a7f0 100644 --- a/packages/libraries/client/tests/usage.spec.ts +++ b/packages/libraries/client/tests/usage.spec.ts @@ -1,10 +1,10 @@ -import { parse, buildSchema } from 'graphql'; +import { buildSchema, parse } from 'graphql'; // eslint-disable-next-line import/no-extraneous-dependencies import nock from 'nock'; import { createHive } from '../src/client'; +import type { Report } from '../src/internal/usage'; import { version } from '../src/version'; import { waitFor } from './test-utils'; -import type { Report } from '../src/internal/usage'; const headers = { 'Content-Type': 'application/json', diff --git a/packages/libraries/core/src/normalize/operation.ts b/packages/libraries/core/src/normalize/operation.ts index 9ad7836a0..faf3dd80e 100644 --- a/packages/libraries/core/src/normalize/operation.ts +++ b/packages/libraries/core/src/normalize/operation.ts @@ -1,16 +1,16 @@ import { - visit, - print, - stripIgnoredCharacters, - separateOperations, - Kind, - DocumentNode, - DefinitionNode, - OperationDefinitionNode, ArgumentNode, - VariableDefinitionNode, - SelectionNode, + DefinitionNode, DirectiveNode, + DocumentNode, + Kind, + OperationDefinitionNode, + print, + SelectionNode, + separateOperations, + stripIgnoredCharacters, + VariableDefinitionNode, + visit, } from 'graphql'; import sortBy from 'lodash.sortby'; diff --git a/packages/services/api/src/create.ts b/packages/services/api/src/create.ts index aa6979b40..f0d6c6670 100644 --- a/packages/services/api/src/create.ts +++ b/packages/services/api/src/create.ts @@ -1,59 +1,59 @@ +import type { S3Client } from '@aws-sdk/client-s3'; import { createApplication, Scope } from 'graphql-modules'; import { activityModule } from './modules/activity'; +import { adminModule } from './modules/admin'; +import { alertsModule } from './modules/alerts'; +import { WEBHOOKS_CONFIG, WebhooksConfig } from './modules/alerts/providers/tokens'; import { authModule } from './modules/auth'; -import { labModule } from './modules/lab'; -import { operationsModule } from './modules/operations'; -import { ClickHouseConfig, CLICKHOUSE_CONFIG } from './modules/operations/providers/tokens'; -import { organizationModule } from './modules/organization'; -import { persistedOperationModule } from './modules/persisted-operations'; -import { projectModule } from './modules/project'; -import { schemaModule } from './modules/schema'; -import { sharedModule } from './modules/shared'; -import { HttpClient } from './modules/shared/providers/http-client'; -import { IdTranslator } from './modules/shared/providers/id-translator'; -import { IdempotentRunner } from './modules/shared/providers/idempotent-runner'; -import { Logger } from './modules/shared/providers/logger'; -import { CryptoProvider, encryptionSecretProvider } from './modules/shared/providers/crypto'; -import { RedisConfig, REDIS_CONFIG, RedisProvider } from './modules/shared/providers/redis'; -import { Storage } from './modules/shared/providers/storage'; -import { EMAILS_ENDPOINT, Emails } from './modules/shared/providers/emails'; -import { targetModule } from './modules/target'; +import { billingModule } from './modules/billing'; +import { BILLING_CONFIG, BillingConfig } from './modules/billing/providers/tokens'; +import { cdnModule } from './modules/cdn'; +import { CDN_CONFIG, CDNConfig } from './modules/cdn/providers/tokens'; +import { feedbackModule } from './modules/feedback'; +import { FEEDBACK_SLACK_CHANNEL, FEEDBACK_SLACK_TOKEN } from './modules/feedback/providers/tokens'; import { integrationsModule } from './modules/integrations'; import { GITHUB_APP_CONFIG, GitHubApplicationConfig, } from './modules/integrations/providers/github-integration-manager'; -import { alertsModule } from './modules/alerts'; -import { tokenModule } from './modules/token'; -import { feedbackModule } from './modules/feedback'; -import { TokensConfig, TOKENS_CONFIG } from './modules/token/providers/tokens'; -import { WebhooksConfig, WEBHOOKS_CONFIG } from './modules/alerts/providers/tokens'; -import { - SchemaServiceConfig, - SCHEMA_SERVICE_CONFIG, -} from './modules/schema/providers/orchestrators/tokens'; -import { provideSchemaModuleConfig, SchemaModuleConfig } from './modules/schema/providers/config'; -import { CDN_CONFIG, CDNConfig } from './modules/cdn/providers/tokens'; -import { cdnModule } from './modules/cdn'; -import { adminModule } from './modules/admin'; -import { FEEDBACK_SLACK_CHANNEL, FEEDBACK_SLACK_TOKEN } from './modules/feedback/providers/tokens'; -import { usageEstimationModule } from './modules/usage-estimation'; -import { - UsageEstimationServiceConfig, - USAGE_ESTIMATION_SERVICE_CONFIG, -} from './modules/usage-estimation/providers/tokens'; +import { labModule } from './modules/lab'; +import { oidcIntegrationsModule } from './modules/oidc-integrations'; +import { OIDC_INTEGRATIONS_ENABLED } from './modules/oidc-integrations/providers/tokens'; +import { operationsModule } from './modules/operations'; +import { CLICKHOUSE_CONFIG, ClickHouseConfig } from './modules/operations/providers/tokens'; +import { organizationModule } from './modules/organization'; +import { persistedOperationModule } from './modules/persisted-operations'; +import { projectModule } from './modules/project'; import { rateLimitModule } from './modules/rate-limit'; import { - RateLimitServiceConfig, RATE_LIMIT_SERVICE_CONFIG, + RateLimitServiceConfig, } from './modules/rate-limit/providers/tokens'; -import { BillingConfig, BILLING_CONFIG } from './modules/billing/providers/tokens'; -import { billingModule } from './modules/billing'; -import { OIDC_INTEGRATIONS_ENABLED } from './modules/oidc-integrations/providers/tokens'; -import { oidcIntegrationsModule } from './modules/oidc-integrations'; +import { schemaModule } from './modules/schema'; import { ArtifactStorageWriter } from './modules/schema/providers/artifact-storage-writer'; +import { provideSchemaModuleConfig, SchemaModuleConfig } from './modules/schema/providers/config'; +import { + SCHEMA_SERVICE_CONFIG, + SchemaServiceConfig, +} from './modules/schema/providers/orchestrators/tokens'; +import { sharedModule } from './modules/shared'; +import { CryptoProvider, encryptionSecretProvider } from './modules/shared/providers/crypto'; +import { Emails, EMAILS_ENDPOINT } from './modules/shared/providers/emails'; +import { HttpClient } from './modules/shared/providers/http-client'; +import { IdTranslator } from './modules/shared/providers/id-translator'; +import { IdempotentRunner } from './modules/shared/providers/idempotent-runner'; +import { Logger } from './modules/shared/providers/logger'; +import { REDIS_CONFIG, RedisConfig, RedisProvider } from './modules/shared/providers/redis'; +import { Storage } from './modules/shared/providers/storage'; import { WEB_APP_URL } from './modules/shared/providers/tokens'; -import type { S3Client } from '@aws-sdk/client-s3'; +import { targetModule } from './modules/target'; +import { tokenModule } from './modules/token'; +import { TOKENS_CONFIG, TokensConfig } from './modules/token/providers/tokens'; +import { usageEstimationModule } from './modules/usage-estimation'; +import { + USAGE_ESTIMATION_SERVICE_CONFIG, + UsageEstimationServiceConfig, +} from './modules/usage-estimation/providers/tokens'; const modules = [ sharedModule, diff --git a/packages/services/api/src/modules/activity/index.ts b/packages/services/api/src/modules/activity/index.ts index 3ba701444..8ff0502fc 100644 --- a/packages/services/api/src/modules/activity/index.ts +++ b/packages/services/api/src/modules/activity/index.ts @@ -1,6 +1,6 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; import { ActivityManager } from './providers/activity-manager'; +import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; export const activityModule = createModule({ diff --git a/packages/services/api/src/modules/activity/providers/activity-manager.ts b/packages/services/api/src/modules/activity/providers/activity-manager.ts index 7b608c498..d1bd017e3 100644 --- a/packages/services/api/src/modules/activity/providers/activity-manager.ts +++ b/packages/services/api/src/modules/activity/providers/activity-manager.ts @@ -5,9 +5,9 @@ import { OrganizationAccessScope } from '../../auth/providers/organization-acces import { ProjectAccessScope } from '../../auth/providers/project-access'; import { Logger } from '../../shared/providers/logger'; import { - Storage, OrganizationSelector, ProjectSelector, + Storage, TargetSelector, } from '../../shared/providers/storage'; import { Activity } from './activities'; diff --git a/packages/services/api/src/modules/activity/resolvers.ts b/packages/services/api/src/modules/activity/resolvers.ts index 7612a2324..6c7a26128 100644 --- a/packages/services/api/src/modules/activity/resolvers.ts +++ b/packages/services/api/src/modules/activity/resolvers.ts @@ -1,8 +1,8 @@ -import { ActivityModule } from './__generated__/types'; -import { IdTranslator } from '../shared/providers/id-translator'; -import { ActivityManager } from './providers/activity-manager'; import { ActivityObject } from '../../shared/entities'; import { createConnection } from '../../shared/schema'; +import { IdTranslator } from '../shared/providers/id-translator'; +import { ActivityModule } from './__generated__/types'; +import { ActivityManager } from './providers/activity-manager'; export const resolvers: ActivityModule.Resolvers = { Query: { diff --git a/packages/services/api/src/modules/admin/index.ts b/packages/services/api/src/modules/admin/index.ts index 5a79007c8..6818d4c87 100644 --- a/packages/services/api/src/modules/admin/index.ts +++ b/packages/services/api/src/modules/admin/index.ts @@ -1,6 +1,6 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; import { AdminManager } from './providers/admin-manager'; +import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; export const adminModule = createModule({ diff --git a/packages/services/api/src/modules/admin/providers/admin-manager.ts b/packages/services/api/src/modules/admin/providers/admin-manager.ts index 0fcf0d0d2..c704ce90c 100644 --- a/packages/services/api/src/modules/admin/providers/admin-manager.ts +++ b/packages/services/api/src/modules/admin/providers/admin-manager.ts @@ -1,10 +1,10 @@ -import { Injectable, Scope } from 'graphql-modules'; import { GraphQLError } from 'graphql'; +import { Injectable, Scope } from 'graphql-modules'; +import { atomic } from '../../../shared/helpers'; import { AuthManager } from '../../auth/providers/auth-manager'; +import { OperationsReader } from '../../operations/providers/operations-reader'; import { Logger } from '../../shared/providers/logger'; import { Storage } from '../../shared/providers/storage'; -import { atomic } from '../../../shared/helpers'; -import { OperationsReader } from '../../operations/providers/operations-reader'; /** * Responsible for auth checks. diff --git a/packages/services/api/src/modules/admin/resolvers.ts b/packages/services/api/src/modules/admin/resolvers.ts index bf9fdcff5..b86b0a4b9 100644 --- a/packages/services/api/src/modules/admin/resolvers.ts +++ b/packages/services/api/src/modules/admin/resolvers.ts @@ -1,5 +1,5 @@ -import { AdminManager } from './providers/admin-manager'; import { AdminModule } from './__generated__/types'; +import { AdminManager } from './providers/admin-manager'; export const resolvers: AdminModule.Resolvers = { Query: { diff --git a/packages/services/api/src/modules/alerts/index.ts b/packages/services/api/src/modules/alerts/index.ts index 92e61350b..3c386cb63 100644 --- a/packages/services/api/src/modules/alerts/index.ts +++ b/packages/services/api/src/modules/alerts/index.ts @@ -1,9 +1,9 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; -import typeDefs from './module.graphql'; -import { AlertsManager } from './providers/alerts-manager'; import { SlackCommunicationAdapter } from './providers/adapters/slack'; import { WebhookCommunicationAdapter } from './providers/adapters/webhook'; +import { AlertsManager } from './providers/alerts-manager'; +import { resolvers } from './resolvers'; +import typeDefs from './module.graphql'; export const alertsModule = createModule({ id: 'alerts', diff --git a/packages/services/api/src/modules/alerts/providers/adapters/common.ts b/packages/services/api/src/modules/alerts/providers/adapters/common.ts index 7adb0a519..81eade9ee 100644 --- a/packages/services/api/src/modules/alerts/providers/adapters/common.ts +++ b/packages/services/api/src/modules/alerts/providers/adapters/common.ts @@ -4,8 +4,8 @@ import { AlertChannel, Organization, Project, - Target, SchemaVersion, + Target, } from '../../../../shared/entities'; export interface SchemaChangeNotificationInput { diff --git a/packages/services/api/src/modules/alerts/providers/adapters/slack.ts b/packages/services/api/src/modules/alerts/providers/adapters/slack.ts index 83d42a9df..d0b644f28 100644 --- a/packages/services/api/src/modules/alerts/providers/adapters/slack.ts +++ b/packages/services/api/src/modules/alerts/providers/adapters/slack.ts @@ -1,15 +1,15 @@ +import { MessageAttachment, WebClient } from '@slack/web-api'; import { Inject, Injectable } from 'graphql-modules'; -import { WebClient, MessageAttachment } from '@slack/web-api'; -import { - CommunicationAdapter, - SchemaChangeNotificationInput, - filterChangesByLevel, - slackCoderize, - ChannelConfirmationInput, -} from './common'; import type * as Types from '../../../../__generated__/types'; import { Logger } from '../../../shared/providers/logger'; import { WEB_APP_URL } from '../../../shared/providers/tokens'; +import { + ChannelConfirmationInput, + CommunicationAdapter, + filterChangesByLevel, + SchemaChangeNotificationInput, + slackCoderize, +} from './common'; @Injectable() export class SlackCommunicationAdapter implements CommunicationAdapter { diff --git a/packages/services/api/src/modules/alerts/providers/adapters/webhook.ts b/packages/services/api/src/modules/alerts/providers/adapters/webhook.ts index 3457d196e..419716b69 100644 --- a/packages/services/api/src/modules/alerts/providers/adapters/webhook.ts +++ b/packages/services/api/src/modules/alerts/providers/adapters/webhook.ts @@ -1,12 +1,12 @@ -import { Injectable, Inject, Scope, CONTEXT } from 'graphql-modules'; import type { WebhooksApi } from '@hive/webhooks'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { fetch } from '@whatwg-node/fetch'; -import type { CommunicationAdapter, SchemaChangeNotificationInput } from './common'; -import { Logger } from '../../../shared/providers/logger'; +import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules'; import { HttpClient } from '../../../shared/providers/http-client'; -import { WEBHOOKS_CONFIG } from '../tokens'; +import { Logger } from '../../../shared/providers/logger'; import type { WebhooksConfig } from '../tokens'; +import { WEBHOOKS_CONFIG } from '../tokens'; +import type { CommunicationAdapter, SchemaChangeNotificationInput } from './common'; @Injectable({ scope: Scope.Operation, diff --git a/packages/services/api/src/modules/alerts/providers/alerts-manager.ts b/packages/services/api/src/modules/alerts/providers/alerts-manager.ts index 65d376765..e9024147b 100644 --- a/packages/services/api/src/modules/alerts/providers/alerts-manager.ts +++ b/packages/services/api/src/modules/alerts/providers/alerts-manager.ts @@ -1,20 +1,20 @@ import { Injectable, Scope } from 'graphql-modules'; -import type { AlertsModule } from '../__generated__/types'; -import type { AlertChannel, Alert } from '../../../shared/entities'; +import type { Alert, AlertChannel } from '../../../shared/entities'; import { cache } from '../../../shared/helpers'; import { AuthManager } from '../../auth/providers/auth-manager'; +import { ProjectAccessScope } from '../../auth/providers/project-access'; +import { TargetAccessScope } from '../../auth/providers/target-access'; +import { IntegrationsAccessContext } from '../../integrations/providers/integrations-access-context'; +import { SlackIntegrationManager } from '../../integrations/providers/slack-integration-manager'; import { OrganizationManager } from '../../organization/providers/organization-manager'; import { ProjectManager } from '../../project/providers/project-manager'; import { Logger } from '../../shared/providers/logger'; -import { Storage } from '../../shared/providers/storage'; import type { ProjectSelector } from '../../shared/providers/storage'; -import { SlackIntegrationManager } from '../../integrations/providers/slack-integration-manager'; -import { IntegrationsAccessContext } from '../../integrations/providers/integrations-access-context'; +import { Storage } from '../../shared/providers/storage'; +import type { AlertsModule } from '../__generated__/types'; import { SchemaChangeNotificationInput } from './adapters/common'; import { SlackCommunicationAdapter } from './adapters/slack'; import { WebhookCommunicationAdapter } from './adapters/webhook'; -import { ProjectAccessScope } from '../../auth/providers/project-access'; -import { TargetAccessScope } from '../../auth/providers/target-access'; @Injectable({ scope: Scope.Operation, diff --git a/packages/services/api/src/modules/alerts/resolvers.ts b/packages/services/api/src/modules/alerts/resolvers.ts index 042c8aaea..51ad85ece 100644 --- a/packages/services/api/src/modules/alerts/resolvers.ts +++ b/packages/services/api/src/modules/alerts/resolvers.ts @@ -1,8 +1,8 @@ -import type { AlertsModule } from './__generated__/types'; -import { IdTranslator } from '../shared/providers/id-translator'; -import { AlertsManager } from './providers/alerts-manager'; -import { TargetManager } from '../target/providers/target-manager'; import { z } from 'zod'; +import { IdTranslator } from '../shared/providers/id-translator'; +import { TargetManager } from '../target/providers/target-manager'; +import type { AlertsModule } from './__generated__/types'; +import { AlertsManager } from './providers/alerts-manager'; const AlertChannelNameModel = z.string().min(1).max(100); const SlackChannelNameModel = z.string().min(1).max(80); diff --git a/packages/services/api/src/modules/auth/index.ts b/packages/services/api/src/modules/auth/index.ts index 9eb1f45ff..391653b0d 100644 --- a/packages/services/api/src/modules/auth/index.ts +++ b/packages/services/api/src/modules/auth/index.ts @@ -1,11 +1,11 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; import { AuthManager } from './providers/auth-manager'; -import { ApiTokenProvider } from './providers/tokens'; import { OrganizationAccess } from './providers/organization-access'; import { ProjectAccess } from './providers/project-access'; import { TargetAccess } from './providers/target-access'; +import { ApiTokenProvider } from './providers/tokens'; import { UserManager } from './providers/user-manager'; +import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; export const authModule = createModule({ diff --git a/packages/services/api/src/modules/auth/providers/auth-manager.ts b/packages/services/api/src/modules/auth/providers/auth-manager.ts index 0ec4ce0ed..aa783bbd4 100644 --- a/packages/services/api/src/modules/auth/providers/auth-manager.ts +++ b/packages/services/api/src/modules/auth/providers/auth-manager.ts @@ -1,11 +1,10 @@ -import { Injectable, Inject, Scope, CONTEXT } from 'graphql-modules'; +import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules'; import type { User } from '../../../shared/entities'; -import type { Listify, MapToArray } from '../../../shared/helpers'; import { AccessError } from '../../../shared/errors'; +import type { Listify, MapToArray } from '../../../shared/helpers'; import { share } from '../../../shared/helpers'; import { Storage } from '../../shared/providers/storage'; import { TokenStorage } from '../../token/providers/token-storage'; -import { ApiToken } from './tokens'; import { OrganizationAccess, OrganizationAccessScope, @@ -13,6 +12,7 @@ import { } from './organization-access'; import { ProjectAccess, ProjectAccessScope, ProjectUserScopesSelector } from './project-access'; import { TargetAccess, TargetAccessScope, TargetUserScopesSelector } from './target-access'; +import { ApiToken } from './tokens'; import { UserManager } from './user-manager'; export interface OrganizationAccessSelector { diff --git a/packages/services/api/src/modules/auth/providers/organization-access.ts b/packages/services/api/src/modules/auth/providers/organization-access.ts index b8ab07322..4869d5e11 100644 --- a/packages/services/api/src/modules/auth/providers/organization-access.ts +++ b/packages/services/api/src/modules/auth/providers/organization-access.ts @@ -1,14 +1,15 @@ -import { Injectable, Scope, Inject, forwardRef } from 'graphql-modules'; import Dataloader from 'dataloader'; -import { Logger } from '../../shared/providers/logger'; -import { Storage } from '../../shared/providers/storage'; +import DataLoader from 'dataloader'; +import { forwardRef, Inject, Injectable, Scope } from 'graphql-modules'; import { Token } from '../../../shared/entities'; import { AccessError } from '../../../shared/errors'; -import DataLoader from 'dataloader'; -import { TokenStorage, TokenSelector } from '../../token/providers/token-storage'; -import { OrganizationAccessScope } from './scopes'; +import { Logger } from '../../shared/providers/logger'; +import { Storage } from '../../shared/providers/storage'; +import { TokenSelector, TokenStorage } from '../../token/providers/token-storage'; import type { ProjectAccessScope } from './project-access'; +import { OrganizationAccessScope } from './scopes'; import type { TargetAccessScope } from './target-access'; + export { OrganizationAccessScope } from './scopes'; export interface OrganizationOwnershipSelector { diff --git a/packages/services/api/src/modules/auth/providers/project-access.ts b/packages/services/api/src/modules/auth/providers/project-access.ts index 69c084a4f..1b4d6189f 100644 --- a/packages/services/api/src/modules/auth/providers/project-access.ts +++ b/packages/services/api/src/modules/auth/providers/project-access.ts @@ -1,9 +1,10 @@ -import { Injectable, Scope } from 'graphql-modules'; import Dataloader from 'dataloader'; -import { Logger } from '../../shared/providers/logger'; +import { Injectable, Scope } from 'graphql-modules'; import { AccessError } from '../../../shared/errors'; -import { ProjectAccessScope } from './scopes'; +import { Logger } from '../../shared/providers/logger'; import { OrganizationAccess } from './organization-access'; +import { ProjectAccessScope } from './scopes'; + export { ProjectAccessScope } from './scopes'; export interface ProjectUserAccessSelector { diff --git a/packages/services/api/src/modules/auth/providers/target-access.ts b/packages/services/api/src/modules/auth/providers/target-access.ts index 70ec14308..d13c9c188 100644 --- a/packages/services/api/src/modules/auth/providers/target-access.ts +++ b/packages/services/api/src/modules/auth/providers/target-access.ts @@ -1,9 +1,10 @@ -import { Injectable, Scope } from 'graphql-modules'; import Dataloader from 'dataloader'; -import { Logger } from '../../shared/providers/logger'; +import { Injectable, Scope } from 'graphql-modules'; import { AccessError } from '../../../shared/errors'; -import { TargetAccessScope } from './scopes'; +import { Logger } from '../../shared/providers/logger'; import { OrganizationAccess } from './organization-access'; +import { TargetAccessScope } from './scopes'; + export { TargetAccessScope } from './scopes'; export interface TargetUserAccessSelector { diff --git a/packages/services/api/src/modules/auth/providers/tokens.ts b/packages/services/api/src/modules/auth/providers/tokens.ts index db14b0c48..c01d186d3 100644 --- a/packages/services/api/src/modules/auth/providers/tokens.ts +++ b/packages/services/api/src/modules/auth/providers/tokens.ts @@ -1,4 +1,4 @@ -import { InjectionToken, FactoryProvider, Scope, CONTEXT } from 'graphql-modules'; +import { CONTEXT, FactoryProvider, InjectionToken, Scope } from 'graphql-modules'; export const ApiToken = new InjectionToken('x-api-token'); export const ApiTokenProvider: FactoryProvider = { diff --git a/packages/services/api/src/modules/auth/resolvers.ts b/packages/services/api/src/modules/auth/resolvers.ts index 282514ccb..49bbc6e64 100644 --- a/packages/services/api/src/modules/auth/resolvers.ts +++ b/packages/services/api/src/modules/auth/resolvers.ts @@ -1,10 +1,10 @@ +import { z } from 'zod'; +import { createConnection } from '../../shared/schema'; import { AuthModule } from './__generated__/types'; import { AuthManager } from './providers/auth-manager'; -import { createConnection } from '../../shared/schema'; import { OrganizationAccessScope } from './providers/organization-access'; import { ProjectAccessScope } from './providers/project-access'; import { TargetAccessScope } from './providers/target-access'; -import { z } from 'zod'; import { displayNameLengthBoundaries, fullNameLengthBoundaries } from './providers/user-manager'; export const resolvers: AuthModule.Resolvers & { diff --git a/packages/services/api/src/modules/billing/index.ts b/packages/services/api/src/modules/billing/index.ts index a80c82e50..4ae00ccd5 100644 --- a/packages/services/api/src/modules/billing/index.ts +++ b/packages/services/api/src/modules/billing/index.ts @@ -1,7 +1,7 @@ import { createModule } from 'graphql-modules'; +import { BillingProvider } from './providers/billing.provider'; import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; -import { BillingProvider } from './providers/billing.provider'; export const billingModule = createModule({ id: 'billing', diff --git a/packages/services/api/src/modules/billing/providers/billing.provider.ts b/packages/services/api/src/modules/billing/providers/billing.provider.ts index 62c0de2ae..d1dbbb180 100644 --- a/packages/services/api/src/modules/billing/providers/billing.provider.ts +++ b/packages/services/api/src/modules/billing/providers/billing.provider.ts @@ -1,13 +1,13 @@ -import { Inject, Injectable, Scope } from 'graphql-modules'; -import { Logger } from '../../shared/providers/logger'; -import { BILLING_CONFIG } from './tokens'; -import type { BillingConfig } from './tokens'; import type { StripeBillingApi, StripeBillingApiInput } from '@hive/stripe-billing'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { fetch } from '@whatwg-node/fetch'; +import { Inject, Injectable, Scope } from 'graphql-modules'; import { OrganizationSelector } from '../../../__generated__/types'; import { OrganizationBilling } from '../../../shared/entities'; +import { Logger } from '../../shared/providers/logger'; import { Storage } from '../../shared/providers/storage'; +import type { BillingConfig } from './tokens'; +import { BILLING_CONFIG } from './tokens'; @Injectable({ global: true, diff --git a/packages/services/api/src/modules/billing/resolvers.ts b/packages/services/api/src/modules/billing/resolvers.ts index 5d9cd4af0..b4b2002b3 100644 --- a/packages/services/api/src/modules/billing/resolvers.ts +++ b/packages/services/api/src/modules/billing/resolvers.ts @@ -4,8 +4,8 @@ import { AuthManager } from '../auth/providers/auth-manager'; import { OrganizationAccessScope } from '../auth/providers/organization-access'; import { OrganizationManager } from '../organization/providers/organization-manager'; import { IdTranslator } from '../shared/providers/id-translator'; -import { BillingProvider } from './providers/billing.provider'; import { BillingModule } from './__generated__/types'; +import { BillingProvider } from './providers/billing.provider'; const USAGE_DEFAULT_LIMITATIONS: Record< 'HOBBY' | 'PRO' | 'ENTERPRISE', diff --git a/packages/services/api/src/modules/cdn/index.ts b/packages/services/api/src/modules/cdn/index.ts index 76aa379fd..73bcdea01 100644 --- a/packages/services/api/src/modules/cdn/index.ts +++ b/packages/services/api/src/modules/cdn/index.ts @@ -1,7 +1,7 @@ import { createModule } from 'graphql-modules'; +import { CdnProvider } from './providers/cdn.provider'; import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; -import { CdnProvider } from './providers/cdn.provider'; export const cdnModule = createModule({ id: 'cdn', diff --git a/packages/services/api/src/modules/cdn/providers/cdn.provider.ts b/packages/services/api/src/modules/cdn/providers/cdn.provider.ts index d187c29d5..a1b175e24 100644 --- a/packages/services/api/src/modules/cdn/providers/cdn.provider.ts +++ b/packages/services/api/src/modules/cdn/providers/cdn.provider.ts @@ -1,12 +1,12 @@ -import { Injectable, Inject, Scope } from 'graphql-modules'; import { createHmac } from 'crypto'; import type { Span } from '@sentry/types'; +import { Inject, Injectable, Scope } from 'graphql-modules'; import { HiveError } from '../../../shared/errors'; +import { sentry } from '../../../shared/sentry'; import { HttpClient } from '../../shared/providers/http-client'; import { Logger } from '../../shared/providers/logger'; -import { sentry } from '../../../shared/sentry'; -import { CDN_CONFIG } from './tokens'; import type { CDNConfig } from './tokens'; +import { CDN_CONFIG } from './tokens'; type CdnResourceType = 'schema' | 'supergraph' | 'metadata'; diff --git a/packages/services/api/src/modules/cdn/resolvers.ts b/packages/services/api/src/modules/cdn/resolvers.ts index dccca5c09..5c8c6dd63 100644 --- a/packages/services/api/src/modules/cdn/resolvers.ts +++ b/packages/services/api/src/modules/cdn/resolvers.ts @@ -1,9 +1,9 @@ -import { CdnModule } from './__generated__/types'; -import { CdnProvider } from './providers/cdn.provider'; -import { IdTranslator } from '../shared/providers/id-translator'; +import { HiveError } from '../../shared/errors'; import { AuthManager } from '../auth/providers/auth-manager'; import { TargetAccessScope } from '../auth/providers/target-access'; -import { HiveError } from '../../shared/errors'; +import { IdTranslator } from '../shared/providers/id-translator'; +import { CdnModule } from './__generated__/types'; +import { CdnProvider } from './providers/cdn.provider'; export const resolvers: CdnModule.Resolvers = { Mutation: { diff --git a/packages/services/api/src/modules/feedback/index.ts b/packages/services/api/src/modules/feedback/index.ts index a977b6fd5..43e4e6409 100644 --- a/packages/services/api/src/modules/feedback/index.ts +++ b/packages/services/api/src/modules/feedback/index.ts @@ -1,6 +1,6 @@ import { createModule } from 'graphql-modules'; -import typeDefs from './module.graphql'; import { resolvers } from './resolvers'; +import typeDefs from './module.graphql'; export const feedbackModule = createModule({ id: 'feedback', diff --git a/packages/services/api/src/modules/feedback/resolvers.ts b/packages/services/api/src/modules/feedback/resolvers.ts index f181b7bfb..dedd2c9d3 100644 --- a/packages/services/api/src/modules/feedback/resolvers.ts +++ b/packages/services/api/src/modules/feedback/resolvers.ts @@ -1,7 +1,7 @@ -import type { FeedbackModule } from './__generated__/types'; import * as Sentry from '@sentry/node'; import { WebClient } from '@slack/web-api'; import { AuthManager } from '../auth/providers/auth-manager'; +import type { FeedbackModule } from './__generated__/types'; import { FEEDBACK_SLACK_CHANNEL, FEEDBACK_SLACK_TOKEN } from './providers/tokens'; export const resolvers: FeedbackModule.Resolvers = { diff --git a/packages/services/api/src/modules/integrations/index.ts b/packages/services/api/src/modules/integrations/index.ts index de1772dfe..f27a9b266 100644 --- a/packages/services/api/src/modules/integrations/index.ts +++ b/packages/services/api/src/modules/integrations/index.ts @@ -1,8 +1,8 @@ import { createModule } from 'graphql-modules'; +import { GitHubIntegrationManager } from './providers/github-integration-manager'; +import { SlackIntegrationManager } from './providers/slack-integration-manager'; import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; -import { SlackIntegrationManager } from './providers/slack-integration-manager'; -import { GitHubIntegrationManager } from './providers/github-integration-manager'; export const integrationsModule = createModule({ id: 'integrations', diff --git a/packages/services/api/src/modules/integrations/providers/github-integration-manager.ts b/packages/services/api/src/modules/integrations/providers/github-integration-manager.ts index 0364894dd..e625c2c11 100644 --- a/packages/services/api/src/modules/integrations/providers/github-integration-manager.ts +++ b/packages/services/api/src/modules/integrations/providers/github-integration-manager.ts @@ -1,10 +1,10 @@ -import { Injectable, Inject, InjectionToken, Scope } from 'graphql-modules'; -import type { IntegrationsModule } from '../__generated__/types'; import { App } from '@octokit/app'; +import { Inject, Injectable, InjectionToken, Scope } from 'graphql-modules'; import { AuthManager } from '../../auth/providers/auth-manager'; import { OrganizationAccessScope } from '../../auth/providers/organization-access'; import { Logger } from '../../shared/providers/logger'; -import { Storage, OrganizationSelector } from '../../shared/providers/storage'; +import { OrganizationSelector, Storage } from '../../shared/providers/storage'; +import type { IntegrationsModule } from '../__generated__/types'; export interface GitHubApplicationConfig { appId: number; diff --git a/packages/services/api/src/modules/integrations/providers/slack-integration-manager.ts b/packages/services/api/src/modules/integrations/providers/slack-integration-manager.ts index a777d3a58..5214acb83 100644 --- a/packages/services/api/src/modules/integrations/providers/slack-integration-manager.ts +++ b/packages/services/api/src/modules/integrations/providers/slack-integration-manager.ts @@ -1,17 +1,17 @@ import { Injectable, Scope } from 'graphql-modules'; +import { AccessError } from '../../../shared/errors'; import { AuthManager } from '../../auth/providers/auth-manager'; import { OrganizationAccessScope } from '../../auth/providers/organization-access'; import { ProjectAccessScope } from '../../auth/providers/project-access'; import { TargetAccessScope } from '../../auth/providers/target-access'; -import { Logger } from '../../shared/providers/logger'; import { CryptoProvider } from '../../shared/providers/crypto'; +import { Logger } from '../../shared/providers/logger'; import { - Storage, OrganizationSelector, ProjectSelector, + Storage, TargetSelector, } from '../../shared/providers/storage'; -import { AccessError } from '../../../shared/errors'; import { IntegrationsAccessContext } from './integrations-access-context'; @Injectable({ diff --git a/packages/services/api/src/modules/integrations/resolvers.ts b/packages/services/api/src/modules/integrations/resolvers.ts index 7fbecbc32..507c601ec 100644 --- a/packages/services/api/src/modules/integrations/resolvers.ts +++ b/packages/services/api/src/modules/integrations/resolvers.ts @@ -1,9 +1,9 @@ -import type { IntegrationsModule } from './__generated__/types'; -import { SlackIntegrationManager } from './providers/slack-integration-manager'; -import { GitHubIntegrationManager } from './providers/github-integration-manager'; -import { IdTranslator } from '../shared/providers/id-translator'; import { z } from 'zod'; import { HiveError } from '../../shared/errors'; +import { IdTranslator } from '../shared/providers/id-translator'; +import type { IntegrationsModule } from './__generated__/types'; +import { GitHubIntegrationManager } from './providers/github-integration-manager'; +import { SlackIntegrationManager } from './providers/slack-integration-manager'; /** * Current token size is 255 characters. diff --git a/packages/services/api/src/modules/lab/resolvers.ts b/packages/services/api/src/modules/lab/resolvers.ts index 63fd63af4..ccce7fa22 100644 --- a/packages/services/api/src/modules/lab/resolvers.ts +++ b/packages/services/api/src/modules/lab/resolvers.ts @@ -1,10 +1,10 @@ -import type { LabModule } from './__generated__/types'; -import { IdTranslator } from '../shared/providers/id-translator'; -import { SchemaManager } from '../schema/providers/schema-manager'; -import { ProjectManager } from '../project/providers/project-manager'; import { AuthManager } from '../auth/providers/auth-manager'; import { TargetAccessScope } from '../auth/providers/target-access'; +import { ProjectManager } from '../project/providers/project-manager'; import { SchemaHelper } from '../schema/providers/schema-helper'; +import { SchemaManager } from '../schema/providers/schema-manager'; +import { IdTranslator } from '../shared/providers/id-translator'; +import type { LabModule } from './__generated__/types'; export const resolvers: LabModule.Resolvers = { Query: { diff --git a/packages/services/api/src/modules/oidc-integrations/index.ts b/packages/services/api/src/modules/oidc-integrations/index.ts index 745955701..b8114e9a5 100644 --- a/packages/services/api/src/modules/oidc-integrations/index.ts +++ b/packages/services/api/src/modules/oidc-integrations/index.ts @@ -1,7 +1,7 @@ import { createModule } from 'graphql-modules'; -import typeDefs from './module.graphql'; import { OIDCIntegrationsProvider } from './providers/oidc-integrations.provider'; import { resolvers } from './resolvers'; +import typeDefs from './module.graphql'; export const oidcIntegrationsModule = createModule({ id: 'oidc-integrations', diff --git a/packages/services/api/src/modules/oidc-integrations/providers/oidc-integrations.provider.ts b/packages/services/api/src/modules/oidc-integrations/providers/oidc-integrations.provider.ts index 22516f42c..a21468708 100644 --- a/packages/services/api/src/modules/oidc-integrations/providers/oidc-integrations.provider.ts +++ b/packages/services/api/src/modules/oidc-integrations/providers/oidc-integrations.provider.ts @@ -1,4 +1,5 @@ import { Inject, Injectable, Scope } from 'graphql-modules'; +import zod from 'zod'; import { OIDCIntegration, OrganizationType } from '../../../shared/entities'; import { AuthManager } from '../../auth/providers/auth-manager'; import { OrganizationAccessScope } from '../../auth/providers/organization-access'; @@ -6,7 +7,6 @@ import { CryptoProvider } from '../../shared/providers/crypto'; import { Logger } from '../../shared/providers/logger'; import { Storage } from '../../shared/providers/storage'; import { OIDC_INTEGRATIONS_ENABLED } from './tokens'; -import zod from 'zod'; @Injectable({ global: true, diff --git a/packages/services/api/src/modules/oidc-integrations/resolvers.ts b/packages/services/api/src/modules/oidc-integrations/resolvers.ts index f628f5a11..691136734 100644 --- a/packages/services/api/src/modules/oidc-integrations/resolvers.ts +++ b/packages/services/api/src/modules/oidc-integrations/resolvers.ts @@ -1,6 +1,6 @@ import { OrganizationManager } from '../organization/providers/organization-manager'; -import { OIDCIntegrationsProvider } from './providers/oidc-integrations.provider'; import { OidcIntegrationsModule } from './__generated__/types'; +import { OIDCIntegrationsProvider } from './providers/oidc-integrations.provider'; export const resolvers: OidcIntegrationsModule.Resolvers = { Mutation: { diff --git a/packages/services/api/src/modules/operations/index.ts b/packages/services/api/src/modules/operations/index.ts index 0e089e7bd..dc40f86cf 100644 --- a/packages/services/api/src/modules/operations/index.ts +++ b/packages/services/api/src/modules/operations/index.ts @@ -1,9 +1,9 @@ import { createModule } from 'graphql-modules'; -import typeDefs from './module.graphql'; -import { resolvers } from './resolvers'; +import { ClickHouse } from './providers/clickhouse-client'; import { OperationsManager } from './providers/operations-manager'; import { OperationsReader } from './providers/operations-reader'; -import { ClickHouse } from './providers/clickhouse-client'; +import { resolvers } from './resolvers'; +import typeDefs from './module.graphql'; export const operationsModule = createModule({ id: 'operations', diff --git a/packages/services/api/src/modules/operations/providers/clickhouse-client.ts b/packages/services/api/src/modules/operations/providers/clickhouse-client.ts index 8ed99d0a6..bccbe5ff7 100644 --- a/packages/services/api/src/modules/operations/providers/clickhouse-client.ts +++ b/packages/services/api/src/modules/operations/providers/clickhouse-client.ts @@ -1,11 +1,11 @@ -import { Injectable, Inject } from 'graphql-modules'; -import Agent from 'agentkeepalive'; import type { Span } from '@sentry/types'; -import { CLICKHOUSE_CONFIG } from './tokens'; -import type { ClickHouseConfig } from './tokens'; -import { HttpClient } from '../../shared/providers/http-client'; +import Agent from 'agentkeepalive'; +import { Inject, Injectable } from 'graphql-modules'; import { atomic } from '../../../shared/helpers'; +import { HttpClient } from '../../shared/providers/http-client'; import { Logger } from '../../shared/providers/logger'; +import type { ClickHouseConfig } from './tokens'; +import { CLICKHOUSE_CONFIG } from './tokens'; export interface QueryResponse { data: readonly T[]; diff --git a/packages/services/api/src/modules/operations/providers/operations-manager.ts b/packages/services/api/src/modules/operations/providers/operations-manager.ts index 79c92a32e..d63665b37 100644 --- a/packages/services/api/src/modules/operations/providers/operations-manager.ts +++ b/packages/services/api/src/modules/operations/providers/operations-manager.ts @@ -1,12 +1,12 @@ import { Injectable, Scope } from 'graphql-modules'; import LRU from 'lru-cache'; import type { DateRange } from '../../../shared/entities'; -import type { Optional, Listify } from '../../../shared/helpers'; +import type { Listify, Optional } from '../../../shared/helpers'; import { cache } from '../../../shared/helpers'; import { AuthManager } from '../../auth/providers/auth-manager'; import { TargetAccessScope } from '../../auth/providers/target-access'; import { Logger } from '../../shared/providers/logger'; -import type { TargetSelector, OrganizationSelector } from '../../shared/providers/storage'; +import type { OrganizationSelector, TargetSelector } from '../../shared/providers/storage'; import { Storage } from '../../shared/providers/storage'; import { OperationsReader } from './operations-reader'; diff --git a/packages/services/api/src/modules/operations/providers/operations-reader.ts b/packages/services/api/src/modules/operations/providers/operations-reader.ts index 34b2674cd..0558acdd8 100644 --- a/packages/services/api/src/modules/operations/providers/operations-reader.ts +++ b/packages/services/api/src/modules/operations/providers/operations-reader.ts @@ -1,11 +1,11 @@ -import { Injectable } from 'graphql-modules'; -import { format, addMinutes, isAfter, differenceInDays } from 'date-fns'; import type { Span } from '@sentry/types'; import { batch } from '@theguild/buddy'; -import { ClickHouse, RowOf } from './clickhouse-client'; -import { calculateTimeWindow } from './helpers'; +import { addMinutes, differenceInDays, format, isAfter } from 'date-fns'; +import { Injectable } from 'graphql-modules'; import type { DateRange } from '../../../shared/entities'; import { sentry } from '../../../shared/sentry'; +import { ClickHouse, RowOf } from './clickhouse-client'; +import { calculateTimeWindow } from './helpers'; function formatDate(date: Date): string { return format(addMinutes(date, date.getTimezoneOffset()), 'yyyy-MM-dd HH:mm:ss'); diff --git a/packages/services/api/src/modules/operations/resolvers.ts b/packages/services/api/src/modules/operations/resolvers.ts index 2f3298d79..717d32cf8 100644 --- a/packages/services/api/src/modules/operations/resolvers.ts +++ b/packages/services/api/src/modules/operations/resolvers.ts @@ -1,8 +1,8 @@ import { hash, nsToMs, parseDateRangeInput } from '../../shared/helpers'; import { createConnection } from '../../shared/schema'; import { IdTranslator } from '../shared/providers/id-translator'; -import { OperationsManager } from './providers/operations-manager'; import { OperationsModule } from './__generated__/types'; +import { OperationsManager } from './providers/operations-manager'; export const resolvers: OperationsModule.Resolvers = { Query: { diff --git a/packages/services/api/src/modules/organization/index.ts b/packages/services/api/src/modules/organization/index.ts index ccfe19d7b..bd7855776 100644 --- a/packages/services/api/src/modules/organization/index.ts +++ b/packages/services/api/src/modules/organization/index.ts @@ -1,6 +1,6 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; import { OrganizationManager } from './providers/organization-manager'; +import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; export const organizationModule = createModule({ diff --git a/packages/services/api/src/modules/organization/providers/organization-manager.ts b/packages/services/api/src/modules/organization/providers/organization-manager.ts index 9c060521c..ce4589faa 100644 --- a/packages/services/api/src/modules/organization/providers/organization-manager.ts +++ b/packages/services/api/src/modules/organization/providers/organization-manager.ts @@ -1,22 +1,22 @@ -import { Injectable, Inject, Scope } from 'graphql-modules'; -import { paramCase } from 'param-case'; import { createHash } from 'crypto'; -import { Organization, OrganizationType, OrganizationInvitation } from '../../../shared/entities'; +import { Inject, Injectable, Scope } from 'graphql-modules'; +import { paramCase } from 'param-case'; +import { Organization, OrganizationInvitation, OrganizationType } from '../../../shared/entities'; import { HiveError } from '../../../shared/errors'; -import { AuthManager } from '../../auth/providers/auth-manager'; -import { Logger } from '../../shared/providers/logger'; -import { Storage } from '../../shared/providers/storage'; -import { WEB_APP_URL } from '../../shared/providers/tokens'; -import type { OrganizationSelector } from '../../shared/providers/storage'; -import { share, cache, uuid, diffArrays, pushIfMissing } from '../../../shared/helpers'; +import { cache, diffArrays, pushIfMissing, share, uuid } from '../../../shared/helpers'; import { ActivityManager } from '../../activity/providers/activity-manager'; -import { BillingProvider } from '../../billing/providers/billing.provider'; -import { TokenStorage } from '../../token/providers/token-storage'; -import { Emails } from '../../shared/providers/emails'; +import { AuthManager } from '../../auth/providers/auth-manager'; import { OrganizationAccessScope } from '../../auth/providers/organization-access'; import { ProjectAccessScope } from '../../auth/providers/project-access'; import { TargetAccessScope } from '../../auth/providers/target-access'; -import { reservedOrganizationNames, organizationAdminScopes } from './organization-config'; +import { BillingProvider } from '../../billing/providers/billing.provider'; +import { Emails } from '../../shared/providers/emails'; +import { Logger } from '../../shared/providers/logger'; +import type { OrganizationSelector } from '../../shared/providers/storage'; +import { Storage } from '../../shared/providers/storage'; +import { WEB_APP_URL } from '../../shared/providers/tokens'; +import { TokenStorage } from '../../token/providers/token-storage'; +import { organizationAdminScopes, reservedOrganizationNames } from './organization-config'; /** * Responsible for auth checks. diff --git a/packages/services/api/src/modules/organization/resolvers.ts b/packages/services/api/src/modules/organization/resolvers.ts index bf6cb7d3f..18cb028ef 100644 --- a/packages/services/api/src/modules/organization/resolvers.ts +++ b/packages/services/api/src/modules/organization/resolvers.ts @@ -1,11 +1,11 @@ -import type { OrganizationModule } from './__generated__/types'; -import { createConnection } from '../../shared/schema'; -import { OrganizationType } from '../../shared/entities'; -import { IdTranslator } from '../shared/providers/id-translator'; -import { OrganizationManager } from './providers/organization-manager'; -import { AuthManager } from '../auth/providers/auth-manager'; import { z } from 'zod'; +import { OrganizationType } from '../../shared/entities'; +import { createConnection } from '../../shared/schema'; +import { AuthManager } from '../auth/providers/auth-manager'; +import { IdTranslator } from '../shared/providers/id-translator'; import { Logger } from '../shared/providers/logger'; +import type { OrganizationModule } from './__generated__/types'; +import { OrganizationManager } from './providers/organization-manager'; const OrganizationNameModel = z.string().min(2).max(50); diff --git a/packages/services/api/src/modules/persisted-operations/index.ts b/packages/services/api/src/modules/persisted-operations/index.ts index a5e99f500..59fe8393e 100644 --- a/packages/services/api/src/modules/persisted-operations/index.ts +++ b/packages/services/api/src/modules/persisted-operations/index.ts @@ -1,7 +1,7 @@ import { createModule } from 'graphql-modules'; -import typeDefs from './module.graphql'; import { PersistedOperationManager } from './providers/persisted-operation-manager'; import { resolvers } from './resolvers'; +import typeDefs from './module.graphql'; export const persistedOperationModule = createModule({ id: 'persisted-operations', diff --git a/packages/services/api/src/modules/persisted-operations/providers/persisted-operation-manager.ts b/packages/services/api/src/modules/persisted-operations/providers/persisted-operation-manager.ts index f2c3f8af8..e616b9894 100644 --- a/packages/services/api/src/modules/persisted-operations/providers/persisted-operation-manager.ts +++ b/packages/services/api/src/modules/persisted-operations/providers/persisted-operation-manager.ts @@ -1,16 +1,16 @@ -import { Injectable, Scope } from 'graphql-modules'; import { hashOperation, normalizeOperation } from '@graphql-hive/core'; -import { parse, Kind, OperationDefinitionNode, DefinitionNode } from 'graphql'; -import { PersistedOperationsModule } from '../__generated__/types'; +import { DefinitionNode, Kind, OperationDefinitionNode, parse } from 'graphql'; +import { Injectable, Scope } from 'graphql-modules'; import type { PersistedOperation } from '../../../shared/entities'; import { AuthManager } from '../../auth/providers/auth-manager'; +import { ProjectAccessScope } from '../../auth/providers/project-access'; import { Logger } from '../../shared/providers/logger'; import { PersistedOperationSelector, ProjectSelector, Storage, } from '../../shared/providers/storage'; -import { ProjectAccessScope } from '../../auth/providers/project-access'; +import { PersistedOperationsModule } from '../__generated__/types'; /** * Responsible for auth checks. diff --git a/packages/services/api/src/modules/persisted-operations/resolvers.ts b/packages/services/api/src/modules/persisted-operations/resolvers.ts index fa5406a43..bdb3a7f68 100644 --- a/packages/services/api/src/modules/persisted-operations/resolvers.ts +++ b/packages/services/api/src/modules/persisted-operations/resolvers.ts @@ -2,8 +2,8 @@ import { createConnection } from '../../shared/schema'; import { OrganizationManager } from '../organization/providers/organization-manager'; import { ProjectManager } from '../project/providers/project-manager'; import { IdTranslator } from '../shared/providers/id-translator'; -import { PersistedOperationManager } from './providers/persisted-operation-manager'; import type { PersistedOperationsModule } from './__generated__/types'; +import { PersistedOperationManager } from './providers/persisted-operation-manager'; export const resolvers: PersistedOperationsModule.Resolvers = { Query: { diff --git a/packages/services/api/src/modules/project/index.ts b/packages/services/api/src/modules/project/index.ts index bf144351b..0dac63315 100644 --- a/packages/services/api/src/modules/project/index.ts +++ b/packages/services/api/src/modules/project/index.ts @@ -1,6 +1,6 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; import { ProjectManager } from './providers/project-manager'; +import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; export const projectModule = createModule({ diff --git a/packages/services/api/src/modules/project/providers/project-manager.ts b/packages/services/api/src/modules/project/providers/project-manager.ts index d00e0fa2b..1ec79ec04 100644 --- a/packages/services/api/src/modules/project/providers/project-manager.ts +++ b/packages/services/api/src/modules/project/providers/project-manager.ts @@ -1,16 +1,16 @@ import { Injectable, Scope } from 'graphql-modules'; import { paramCase } from 'param-case'; import type { Project, ProjectType } from '../../../shared/entities'; -import { AuthManager } from '../../auth/providers/auth-manager'; -import { Logger } from '../../shared/providers/logger'; -import { Storage, OrganizationSelector, ProjectSelector } from '../../shared/providers/storage'; import { NullableAndPartial, share, uuid } from '../../../shared/helpers'; -import { SchemaManager } from '../../schema/providers/schema-manager'; -import type { CustomOrchestratorConfig } from '../../schema/providers/orchestrators/custom'; import { ActivityManager } from '../../activity/providers/activity-manager'; -import { TokenStorage } from '../../token/providers/token-storage'; +import { AuthManager } from '../../auth/providers/auth-manager'; import { OrganizationAccessScope } from '../../auth/providers/organization-access'; import { ProjectAccessScope } from '../../auth/providers/project-access'; +import type { CustomOrchestratorConfig } from '../../schema/providers/orchestrators/custom'; +import { SchemaManager } from '../../schema/providers/schema-manager'; +import { Logger } from '../../shared/providers/logger'; +import { OrganizationSelector, ProjectSelector, Storage } from '../../shared/providers/storage'; +import { TokenStorage } from '../../token/providers/token-storage'; /** * Responsible for auth checks. diff --git a/packages/services/api/src/modules/project/resolvers.ts b/packages/services/api/src/modules/project/resolvers.ts index c7a779106..adb0f6682 100644 --- a/packages/services/api/src/modules/project/resolvers.ts +++ b/packages/services/api/src/modules/project/resolvers.ts @@ -1,10 +1,10 @@ -import type { ProjectModule } from './__generated__/types'; +import { z } from 'zod'; import { ProjectType } from '../../shared/entities'; import { createConnection } from '../../shared/schema'; -import { ProjectManager } from './providers/project-manager'; import { IdTranslator } from '../shared/providers/id-translator'; import { TargetManager } from '../target/providers/target-manager'; -import { z } from 'zod'; +import type { ProjectModule } from './__generated__/types'; +import { ProjectManager } from './providers/project-manager'; const ProjectNameModel = z.string().min(2).max(40); const URLModel = z.string().url().max(200); diff --git a/packages/services/api/src/modules/rate-limit/index.ts b/packages/services/api/src/modules/rate-limit/index.ts index a20c2fa93..24e885d43 100644 --- a/packages/services/api/src/modules/rate-limit/index.ts +++ b/packages/services/api/src/modules/rate-limit/index.ts @@ -1,7 +1,7 @@ import { createModule } from 'graphql-modules'; +import { RateLimitProvider } from './providers/rate-limit.provider'; import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; -import { RateLimitProvider } from './providers/rate-limit.provider'; export const rateLimitModule = createModule({ id: 'rate-limit', diff --git a/packages/services/api/src/modules/rate-limit/providers/rate-limit.provider.ts b/packages/services/api/src/modules/rate-limit/providers/rate-limit.provider.ts index 4e9e03383..865ef1c64 100644 --- a/packages/services/api/src/modules/rate-limit/providers/rate-limit.provider.ts +++ b/packages/services/api/src/modules/rate-limit/providers/rate-limit.provider.ts @@ -1,12 +1,12 @@ -import { Inject, Injectable, Scope } from 'graphql-modules'; -import { sentry } from '../../../shared/sentry'; -import { Logger } from '../../shared/providers/logger'; -import { RATE_LIMIT_SERVICE_CONFIG } from './tokens'; -import type { RateLimitServiceConfig } from './tokens'; import type { RateLimitApi, RateLimitApiInput } from '@hive/rate-limit'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { fetch } from '@whatwg-node/fetch'; +import { Inject, Injectable, Scope } from 'graphql-modules'; import { HiveError } from '../../../shared/errors'; +import { sentry } from '../../../shared/sentry'; +import { Logger } from '../../shared/providers/logger'; +import type { RateLimitServiceConfig } from './tokens'; +import { RATE_LIMIT_SERVICE_CONFIG } from './tokens'; @Injectable({ global: true, diff --git a/packages/services/api/src/modules/rate-limit/resolvers.ts b/packages/services/api/src/modules/rate-limit/resolvers.ts index 0a704a704..316768cdf 100644 --- a/packages/services/api/src/modules/rate-limit/resolvers.ts +++ b/packages/services/api/src/modules/rate-limit/resolvers.ts @@ -1,6 +1,6 @@ -import { RateLimitProvider } from './providers/rate-limit.provider'; import { Logger } from './../shared/providers/logger'; import { RateLimitModule } from './__generated__/types'; +import { RateLimitProvider } from './providers/rate-limit.provider'; export const resolvers: RateLimitModule.Resolvers = { Organization: { diff --git a/packages/services/api/src/modules/schema/index.ts b/packages/services/api/src/modules/schema/index.ts index 199afb863..97494d273 100644 --- a/packages/services/api/src/modules/schema/index.ts +++ b/packages/services/api/src/modules/schema/index.ts @@ -1,11 +1,11 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; +import { Inspector } from './providers/inspector'; +import { orchestrators } from './providers/orchestrators'; +import { SchemaHelper } from './providers/schema-helper'; import { SchemaManager } from './providers/schema-manager'; import { SchemaPublisher } from './providers/schema-publisher'; import { SchemaValidator } from './providers/schema-validator'; -import { SchemaHelper } from './providers/schema-helper'; -import { orchestrators } from './providers/orchestrators'; -import { Inspector } from './providers/inspector'; +import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; export const schemaModule = createModule({ diff --git a/packages/services/api/src/modules/schema/providers/artifact-storage-reader.ts b/packages/services/api/src/modules/schema/providers/artifact-storage-reader.ts index 1d74b9c8c..f37874137 100644 --- a/packages/services/api/src/modules/schema/providers/artifact-storage-reader.ts +++ b/packages/services/api/src/modules/schema/providers/artifact-storage-reader.ts @@ -1,7 +1,7 @@ /** * IMPORTANT NOTE: This file needs to be kept platform-agnostic, don't use any Node.js specific APIs. */ -import { GetObjectCommand, HeadObjectCommand, type S3Client } from '@aws-sdk/client-s3'; +import { type S3Client, GetObjectCommand, HeadObjectCommand } from '@aws-sdk/client-s3'; import { getSignedUrl } from '@aws-sdk/s3-request-presigner'; import { fetch } from '@whatwg-node/fetch'; diff --git a/packages/services/api/src/modules/schema/providers/artifact-storage-writer.ts b/packages/services/api/src/modules/schema/providers/artifact-storage-writer.ts index 5383d5949..867928739 100644 --- a/packages/services/api/src/modules/schema/providers/artifact-storage-writer.ts +++ b/packages/services/api/src/modules/schema/providers/artifact-storage-writer.ts @@ -1,4 +1,4 @@ -import { PutObjectCommand, type S3Client } from '@aws-sdk/client-s3'; +import { type S3Client, PutObjectCommand } from '@aws-sdk/client-s3'; import { buildArtifactStorageKey } from './artifact-storage-reader'; const artifactMeta = { diff --git a/packages/services/api/src/modules/schema/providers/inspector.ts b/packages/services/api/src/modules/schema/providers/inspector.ts index 322de9f6d..c9184aa7d 100644 --- a/packages/services/api/src/modules/schema/providers/inspector.ts +++ b/packages/services/api/src/modules/schema/providers/inspector.ts @@ -1,12 +1,12 @@ -import { Injectable, Scope } from 'graphql-modules'; +import { Change, CriticalityLevel, diff, DiffRule } from '@graphql-inspector/core'; import type { GraphQLSchema } from 'graphql'; -import { diff, Change, CriticalityLevel, DiffRule } from '@graphql-inspector/core'; +import { Injectable, Scope } from 'graphql-modules'; import type * as Types from '../../../__generated__/types'; import type { TargetSettings } from '../../../shared/entities'; -import { Logger } from '../../shared/providers/logger'; -import { sentry } from '../../../shared/sentry'; import { createPeriod } from '../../../shared/helpers'; +import { sentry } from '../../../shared/sentry'; import { OperationsManager } from '../../operations/providers/operations-manager'; +import { Logger } from '../../shared/providers/logger'; import { TargetManager } from '../../target/providers/target-manager'; const criticalityMap: Record = { diff --git a/packages/services/api/src/modules/schema/providers/orchestrators/custom.ts b/packages/services/api/src/modules/schema/providers/orchestrators/custom.ts index fca5094ec..8b584bfa8 100644 --- a/packages/services/api/src/modules/schema/providers/orchestrators/custom.ts +++ b/packages/services/api/src/modules/schema/providers/orchestrators/custom.ts @@ -1,12 +1,12 @@ -import { Injectable } from 'graphql-modules'; import { parse } from 'graphql'; -import { Logger } from '../../../shared/providers/logger'; -import { HiveError } from '../../../../shared/errors'; -import { HttpClient } from '../../../shared/providers/http-client'; -import { Orchestrator, ProjectType, emptySource, SchemaObject } from '../../../../shared/entities'; +import { Injectable } from 'graphql-modules'; import type { SchemaError } from '../../../../__generated__/types'; -import { SchemaBuildError } from './errors'; +import { emptySource, Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities'; +import { HiveError } from '../../../../shared/errors'; import { sentry } from '../../../../shared/sentry'; +import { HttpClient } from '../../../shared/providers/http-client'; +import { Logger } from '../../../shared/providers/logger'; +import { SchemaBuildError } from './errors'; export interface CustomOrchestratorConfig { validationUrl: string; diff --git a/packages/services/api/src/modules/schema/providers/orchestrators/federation.ts b/packages/services/api/src/modules/schema/providers/orchestrators/federation.ts index 3e3f01783..b334319cd 100644 --- a/packages/services/api/src/modules/schema/providers/orchestrators/federation.ts +++ b/packages/services/api/src/modules/schema/providers/orchestrators/federation.ts @@ -1,14 +1,14 @@ -import { Injectable, Inject, Scope, CONTEXT } from 'graphql-modules'; -import { parse } from 'graphql'; -import { Logger } from '../../../shared/providers/logger'; -import { sentry } from '../../../../shared/sentry'; -import { Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities'; -import { SchemaBuildError } from './errors'; -import { SCHEMA_SERVICE_CONFIG } from './tokens'; -import type { SchemaServiceConfig } from './tokens'; +import type { SchemaBuilderApi } from '@hive/schema'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { fetch } from '@whatwg-node/fetch'; -import type { SchemaBuilderApi } from '@hive/schema'; +import { parse } from 'graphql'; +import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules'; +import { Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities'; +import { sentry } from '../../../../shared/sentry'; +import { Logger } from '../../../shared/providers/logger'; +import { SchemaBuildError } from './errors'; +import type { SchemaServiceConfig } from './tokens'; +import { SCHEMA_SERVICE_CONFIG } from './tokens'; type ExternalComposition = { enabled: boolean; diff --git a/packages/services/api/src/modules/schema/providers/orchestrators/index.ts b/packages/services/api/src/modules/schema/providers/orchestrators/index.ts index f97cb08f2..bdc56d62f 100644 --- a/packages/services/api/src/modules/schema/providers/orchestrators/index.ts +++ b/packages/services/api/src/modules/schema/providers/orchestrators/index.ts @@ -1,8 +1,8 @@ import { Provider } from 'graphql-modules'; -import { SingleOrchestrator } from './single'; -import { FederationOrchestrator } from './federation'; -import { StitchingOrchestrator } from './stitching'; import { CustomOrchestrator } from './custom'; +import { FederationOrchestrator } from './federation'; +import { SingleOrchestrator } from './single'; +import { StitchingOrchestrator } from './stitching'; export const orchestrators: Provider[] = [ SingleOrchestrator, diff --git a/packages/services/api/src/modules/schema/providers/orchestrators/single.ts b/packages/services/api/src/modules/schema/providers/orchestrators/single.ts index 91f0d56c5..6fe9e1a21 100644 --- a/packages/services/api/src/modules/schema/providers/orchestrators/single.ts +++ b/packages/services/api/src/modules/schema/providers/orchestrators/single.ts @@ -1,15 +1,15 @@ -import { Injectable, Inject, Scope, CONTEXT } from 'graphql-modules'; -import { parse } from 'graphql'; -import { Logger } from '../../../shared/providers/logger'; -import { HiveError } from '../../../../shared/errors'; -import { Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities'; -import { SchemaBuildError } from './errors'; -import { SCHEMA_SERVICE_CONFIG } from './tokens'; -import type { SchemaServiceConfig } from './tokens'; -import { sentry } from '../../../../shared/sentry'; +import type { SchemaBuilderApi } from '@hive/schema'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { fetch } from '@whatwg-node/fetch'; -import type { SchemaBuilderApi } from '@hive/schema'; +import { parse } from 'graphql'; +import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules'; +import { Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities'; +import { HiveError } from '../../../../shared/errors'; +import { sentry } from '../../../../shared/sentry'; +import { Logger } from '../../../shared/providers/logger'; +import { SchemaBuildError } from './errors'; +import type { SchemaServiceConfig } from './tokens'; +import { SCHEMA_SERVICE_CONFIG } from './tokens'; @Injectable({ scope: Scope.Operation, diff --git a/packages/services/api/src/modules/schema/providers/orchestrators/stitching.ts b/packages/services/api/src/modules/schema/providers/orchestrators/stitching.ts index 0c051d7c8..039554938 100644 --- a/packages/services/api/src/modules/schema/providers/orchestrators/stitching.ts +++ b/packages/services/api/src/modules/schema/providers/orchestrators/stitching.ts @@ -1,14 +1,14 @@ -import { Injectable, Inject, Scope, CONTEXT } from 'graphql-modules'; -import { parse } from 'graphql'; -import { Logger } from '../../../shared/providers/logger'; -import { Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities'; -import { SchemaBuildError } from './errors'; -import { SCHEMA_SERVICE_CONFIG } from './tokens'; -import type { SchemaServiceConfig } from './tokens'; -import { sentry } from '../../../../shared/sentry'; +import type { SchemaBuilderApi } from '@hive/schema'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { fetch } from '@whatwg-node/fetch'; -import type { SchemaBuilderApi } from '@hive/schema'; +import { parse } from 'graphql'; +import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules'; +import { Orchestrator, ProjectType, SchemaObject } from '../../../../shared/entities'; +import { sentry } from '../../../../shared/sentry'; +import { Logger } from '../../../shared/providers/logger'; +import { SchemaBuildError } from './errors'; +import type { SchemaServiceConfig } from './tokens'; +import { SCHEMA_SERVICE_CONFIG } from './tokens'; @Injectable({ scope: Scope.Operation, diff --git a/packages/services/api/src/modules/schema/providers/schema-helper.ts b/packages/services/api/src/modules/schema/providers/schema-helper.ts index 87b1b7d8f..366f50ced 100644 --- a/packages/services/api/src/modules/schema/providers/schema-helper.ts +++ b/packages/services/api/src/modules/schema/providers/schema-helper.ts @@ -1,10 +1,10 @@ -import { Injectable, Scope } from 'graphql-modules'; -import { print } from 'graphql'; import { createHash } from 'crypto'; -import { createSchemaObject } from '../../../shared/entities'; +import { print } from 'graphql'; +import { Injectable, Scope } from 'graphql-modules'; import type { Schema, SchemaObject } from '../../../shared/entities'; -import { sortDocumentNode } from '../../../shared/schema'; +import { createSchemaObject } from '../../../shared/entities'; import { cache } from '../../../shared/helpers'; +import { sortDocumentNode } from '../../../shared/schema'; @Injectable({ scope: Scope.Operation, diff --git a/packages/services/api/src/modules/schema/providers/schema-manager.ts b/packages/services/api/src/modules/schema/providers/schema-manager.ts index 64343e935..7bbe0ab19 100644 --- a/packages/services/api/src/modules/schema/providers/schema-manager.ts +++ b/packages/services/api/src/modules/schema/providers/schema-manager.ts @@ -1,25 +1,25 @@ import { Injectable, Scope } from 'graphql-modules'; import lodash from 'lodash'; -import { SchemaVersion } from '../../../shared/mappers'; +import { z } from 'zod'; import { Orchestrator, ProjectType } from '../../../shared/entities'; -import { atomic, stringifySelector } from '../../../shared/helpers'; import { HiveError } from '../../../shared/errors'; +import { atomic, stringifySelector } from '../../../shared/helpers'; +import { SchemaVersion } from '../../../shared/mappers'; import { AuthManager } from '../../auth/providers/auth-manager'; +import { ProjectAccessScope } from '../../auth/providers/project-access'; +import { TargetAccessScope } from '../../auth/providers/target-access'; +import { CryptoProvider } from '../../shared/providers/crypto'; import { Logger } from '../../shared/providers/logger'; import { + OrganizationSelector, + ProjectSelector, Storage, TargetSelector, - ProjectSelector, - OrganizationSelector, } from '../../shared/providers/storage'; import { CustomOrchestrator } from './orchestrators/custom'; import { FederationOrchestrator } from './orchestrators/federation'; import { SingleOrchestrator } from './orchestrators/single'; import { StitchingOrchestrator } from './orchestrators/stitching'; -import { TargetAccessScope } from '../../auth/providers/target-access'; -import { ProjectAccessScope } from '../../auth/providers/project-access'; -import { CryptoProvider } from '../../shared/providers/crypto'; -import { z } from 'zod'; const ENABLE_EXTERNAL_COMPOSITION_SCHEMA = z.object({ endpoint: z.string().url().nonempty(), diff --git a/packages/services/api/src/modules/schema/providers/schema-publisher.ts b/packages/services/api/src/modules/schema/providers/schema-publisher.ts index 4c5d3fd0f..b854d0e98 100644 --- a/packages/services/api/src/modules/schema/providers/schema-publisher.ts +++ b/packages/services/api/src/modules/schema/providers/schema-publisher.ts @@ -1,36 +1,36 @@ -import { Injectable, Inject, Scope } from 'graphql-modules'; -import lodash from 'lodash'; import type { Span } from '@sentry/types'; +import { Inject, Injectable, Scope } from 'graphql-modules'; +import lodash from 'lodash'; +import * as Types from '../../../__generated__/types'; import { - Schema, - Target, + GraphQLDocumentStringInvalidError, + Orchestrator, Project, ProjectType, - Orchestrator, - GraphQLDocumentStringInvalidError, + Schema, + Target, } from '../../../shared/entities'; -import * as Types from '../../../__generated__/types'; -import { ProjectManager } from '../../project/providers/project-manager'; -import { Logger } from '../../shared/providers/logger'; -import { updateSchemas } from '../../../shared/schema'; -import { SchemaManager } from './schema-manager'; -import { SchemaValidator, ValidationResult } from './schema-validator'; -import { sentry } from '../../../shared/sentry'; -import { Storage, type TargetSelector } from '../../shared/providers/storage'; -import { IdempotentRunner } from '../../shared/providers/idempotent-runner'; +import { HiveError } from '../../../shared/errors'; import { bolderize } from '../../../shared/markdown'; +import { updateSchemas } from '../../../shared/schema'; +import { sentry } from '../../../shared/sentry'; import { AlertsManager } from '../../alerts/providers/alerts-manager'; -import { TargetManager } from '../../target/providers/target-manager'; -import { CdnProvider } from '../../cdn/providers/cdn.provider'; -import { OrganizationManager } from '../../organization/providers/organization-manager'; import { AuthManager } from '../../auth/providers/auth-manager'; import { TargetAccessScope } from '../../auth/providers/target-access'; +import { CdnProvider } from '../../cdn/providers/cdn.provider'; import { GitHubIntegrationManager } from '../../integrations/providers/github-integration-manager'; +import { OrganizationManager } from '../../organization/providers/organization-manager'; +import { ProjectManager } from '../../project/providers/project-manager'; +import { IdempotentRunner } from '../../shared/providers/idempotent-runner'; +import { Logger } from '../../shared/providers/logger'; +import { type TargetSelector, Storage } from '../../shared/providers/storage'; +import { TargetManager } from '../../target/providers/target-manager'; +import { ArtifactStorageWriter } from './artifact-storage-writer'; import type { SchemaModuleConfig } from './config'; import { SCHEMA_MODULE_CONFIG } from './config'; import { SchemaHelper } from './schema-helper'; -import { HiveError } from '../../../shared/errors'; -import { ArtifactStorageWriter } from './artifact-storage-writer'; +import { SchemaManager } from './schema-manager'; +import { SchemaValidator, ValidationResult } from './schema-validator'; type CheckInput = Omit & TargetSelector; diff --git a/packages/services/api/src/modules/schema/providers/schema-validator.ts b/packages/services/api/src/modules/schema/providers/schema-validator.ts index 4d92dfe22..d15e90018 100644 --- a/packages/services/api/src/modules/schema/providers/schema-validator.ts +++ b/packages/services/api/src/modules/schema/providers/schema-validator.ts @@ -1,12 +1,12 @@ import { Injectable, Scope } from 'graphql-modules'; -import { Orchestrator, Schema, SchemaObject, Project } from '../../../shared/entities'; -import { buildSchema, findSchema, hashSchema } from '../../../shared/schema'; import * as Types from '../../../__generated__/types'; -import { Logger } from '../../shared/providers/logger'; +import { Orchestrator, Project, Schema, SchemaObject } from '../../../shared/entities'; +import { buildSchema, findSchema, hashSchema } from '../../../shared/schema'; import { sentry } from '../../../shared/sentry'; -import { SchemaHelper } from './schema-helper'; +import { Logger } from '../../shared/providers/logger'; import { Inspector } from './inspector'; import { SchemaBuildError } from './orchestrators/errors'; +import { SchemaHelper } from './schema-helper'; export type ValidationResult = { valid: boolean; diff --git a/packages/services/api/src/modules/schema/resolvers.ts b/packages/services/api/src/modules/schema/resolvers.ts index 33d275dc7..9ae747625 100644 --- a/packages/services/api/src/modules/schema/resolvers.ts +++ b/packages/services/api/src/modules/schema/resolvers.ts @@ -1,41 +1,41 @@ import { createHash } from 'crypto'; import { buildASTSchema, - isObjectType, - isInterfaceType, - isUnionType, + GraphQLError, + GraphQLNamedType, isEnumType, isInputObjectType, + isInterfaceType, + isObjectType, isScalarType, - GraphQLNamedType, - GraphQLError, + isUnionType, } from 'graphql'; -import type { SchemaModule } from './__generated__/types'; -import { SchemaManager } from './providers/schema-manager'; -import { SchemaPublisher } from './providers/schema-publisher'; -import { Inspector } from './providers/inspector'; -import { buildSchema, createConnection } from '../../shared/schema'; -import { ProjectType } from '../../shared/entities'; -import type { - GraphQLObjectTypeMapper, - GraphQLInterfaceTypeMapper, - GraphQLUnionTypeMapper, - GraphQLEnumTypeMapper, - GraphQLInputObjectTypeMapper, - GraphQLScalarTypeMapper, -} from '../../shared/mappers'; -import { ProjectManager } from '../project/providers/project-manager'; -import { IdTranslator } from '../shared/providers/id-translator'; -import { OrganizationManager } from '../organization/providers/organization-manager'; -import { SchemaBuildError } from './providers/orchestrators/errors'; -import { TargetManager } from '../target/providers/target-manager'; -import { AuthManager } from '../auth/providers/auth-manager'; import { parseResolveInfo } from 'graphql-parse-resolve-info'; import { z } from 'zod'; -import { SchemaHelper } from './providers/schema-helper'; -import type { WithSchemaCoordinatesUsage, WithGraphQLParentInfo } from '../../shared/mappers'; +import { ProjectType } from '../../shared/entities'; import { createPeriod, parseDateRangeInput } from '../../shared/helpers'; +import type { + GraphQLEnumTypeMapper, + GraphQLInputObjectTypeMapper, + GraphQLInterfaceTypeMapper, + GraphQLObjectTypeMapper, + GraphQLScalarTypeMapper, + GraphQLUnionTypeMapper, +} from '../../shared/mappers'; +import type { WithGraphQLParentInfo, WithSchemaCoordinatesUsage } from '../../shared/mappers'; +import { buildSchema, createConnection } from '../../shared/schema'; +import { AuthManager } from '../auth/providers/auth-manager'; import { OperationsManager } from '../operations/providers/operations-manager'; +import { OrganizationManager } from '../organization/providers/organization-manager'; +import { ProjectManager } from '../project/providers/project-manager'; +import { IdTranslator } from '../shared/providers/id-translator'; +import { TargetManager } from '../target/providers/target-manager'; +import type { SchemaModule } from './__generated__/types'; +import { Inspector } from './providers/inspector'; +import { SchemaBuildError } from './providers/orchestrators/errors'; +import { SchemaHelper } from './providers/schema-helper'; +import { SchemaManager } from './providers/schema-manager'; +import { SchemaPublisher } from './providers/schema-publisher'; const MaybeModel = (value: T) => z.union([z.null(), z.undefined(), value]); const GraphQLSchemaStringModel = z.string().max(5_000_000).min(0); diff --git a/packages/services/api/src/modules/shared/providers/crypto.ts b/packages/services/api/src/modules/shared/providers/crypto.ts index 745c204e0..6570eb64f 100644 --- a/packages/services/api/src/modules/shared/providers/crypto.ts +++ b/packages/services/api/src/modules/shared/providers/crypto.ts @@ -1,5 +1,5 @@ -import { Injectable, Scope, InjectionToken, Inject } from 'graphql-modules'; import crypto from 'crypto'; +import { Inject, Injectable, InjectionToken, Scope } from 'graphql-modules'; const ALG = 'aes256'; const IN_ENC = 'utf8'; diff --git a/packages/services/api/src/modules/shared/providers/emails.ts b/packages/services/api/src/modules/shared/providers/emails.ts index 9c5c3f4c2..9d23ef708 100644 --- a/packages/services/api/src/modules/shared/providers/emails.ts +++ b/packages/services/api/src/modules/shared/providers/emails.ts @@ -1,7 +1,7 @@ -import { Injectable, InjectionToken, Inject, Optional } from 'graphql-modules'; -import { fetch } from '@whatwg-node/fetch'; -import { createTRPCProxyClient, httpLink } from '@trpc/client'; import type { EmailsApi, EmailsApiInput } from '@hive/emails'; +import { createTRPCProxyClient, httpLink } from '@trpc/client'; +import { fetch } from '@whatwg-node/fetch'; +import { Inject, Injectable, InjectionToken, Optional } from 'graphql-modules'; export const EMAILS_ENDPOINT = new InjectionToken('EMAILS_ENDPOINT'); diff --git a/packages/services/api/src/modules/shared/providers/http-client.ts b/packages/services/api/src/modules/shared/providers/http-client.ts index d13dd2356..059c7db3b 100644 --- a/packages/services/api/src/modules/shared/providers/http-client.ts +++ b/packages/services/api/src/modules/shared/providers/http-client.ts @@ -1,8 +1,8 @@ -import { Injectable } from 'graphql-modules'; -import { got, TimeoutError, HTTPError } from 'got'; -import type { OptionsOfJSONResponseBody } from 'got'; import * as Sentry from '@sentry/node'; import type { Span } from '@sentry/types'; +import type { OptionsOfJSONResponseBody } from 'got'; +import { got, HTTPError, TimeoutError } from 'got'; +import { Injectable } from 'graphql-modules'; interface HttpClientOptions extends OptionsOfJSONResponseBody { method: 'GET' | 'POST' | 'DELETE' | 'PUT'; diff --git a/packages/services/api/src/modules/shared/providers/id-translator.ts b/packages/services/api/src/modules/shared/providers/id-translator.ts index cdfe62732..e15c4b2ee 100644 --- a/packages/services/api/src/modules/shared/providers/id-translator.ts +++ b/packages/services/api/src/modules/shared/providers/id-translator.ts @@ -1,13 +1,13 @@ import { Injectable, Scope } from 'graphql-modules'; -import type { - OrganizationSelector, - ProjectSelector, - TargetSelector, - PersistedOperationSelector, -} from './storage'; -import { Storage } from './storage'; import { cache, filterSelector } from '../../../shared/helpers'; import { Logger } from './logger'; +import type { + OrganizationSelector, + PersistedOperationSelector, + ProjectSelector, + TargetSelector, +} from './storage'; +import { Storage } from './storage'; @Injectable({ scope: Scope.Operation, diff --git a/packages/services/api/src/modules/shared/providers/idempotent-runner.ts b/packages/services/api/src/modules/shared/providers/idempotent-runner.ts index 5d4a04d4e..e47adae10 100644 --- a/packages/services/api/src/modules/shared/providers/idempotent-runner.ts +++ b/packages/services/api/src/modules/shared/providers/idempotent-runner.ts @@ -1,9 +1,9 @@ -import { Injectable, Scope, Inject } from 'graphql-modules'; import type { Span } from '@sentry/types'; -import { REDIS_INSTANCE } from '../../shared/providers/redis'; -import type { Redis } from '../../shared/providers/redis'; -import { Logger } from '../../shared/providers/logger'; +import { Inject, Injectable, Scope } from 'graphql-modules'; import { uuid } from '../../../shared/helpers'; +import { Logger } from '../../shared/providers/logger'; +import type { Redis } from '../../shared/providers/redis'; +import { REDIS_INSTANCE } from '../../shared/providers/redis'; /** * diff --git a/packages/services/api/src/modules/shared/providers/redis.ts b/packages/services/api/src/modules/shared/providers/redis.ts index 4627aba6f..a67523218 100644 --- a/packages/services/api/src/modules/shared/providers/redis.ts +++ b/packages/services/api/src/modules/shared/providers/redis.ts @@ -1,8 +1,8 @@ -import { InjectionToken } from 'graphql-modules'; -import Redis from 'ioredis'; import type { FactoryProvider } from 'graphql-modules'; +import { InjectionToken } from 'graphql-modules'; import type { Redis as RedisInstance } from 'ioredis'; import type { RedisOptions } from 'ioredis'; +import Redis from 'ioredis'; import { Logger } from './logger'; export type { RedisInstance as Redis }; diff --git a/packages/services/api/src/modules/shared/providers/storage.ts b/packages/services/api/src/modules/shared/providers/storage.ts index b1223bdf0..fca2296de 100644 --- a/packages/services/api/src/modules/shared/providers/storage.ts +++ b/packages/services/api/src/modules/shared/providers/storage.ts @@ -1,27 +1,27 @@ import { Injectable } from 'graphql-modules'; -import type { NullableAndPartial } from '../../../shared/helpers'; +import type { AddAlertChannelInput, AddAlertInput } from '../../../__generated__/types'; import type { + ActivityObject, + Alert, + AlertChannel, Member, + OIDCIntegration, Organization, + OrganizationBilling, + OrganizationInvitation, PersistedOperation, Project, Schema, SchemaVersion, Target, - User, - ActivityObject, TargetSettings, - AlertChannel, - Alert, - OrganizationBilling, - OrganizationInvitation, - OIDCIntegration, + User, } from '../../../shared/entities'; -import type { CustomOrchestratorConfig } from '../../schema/providers/orchestrators/custom'; -import type { AddAlertChannelInput, AddAlertInput } from '../../../__generated__/types'; +import type { NullableAndPartial } from '../../../shared/helpers'; import type { OrganizationAccessScope } from '../../auth/providers/organization-access'; import type { ProjectAccessScope } from '../../auth/providers/project-access'; import type { TargetAccessScope } from '../../auth/providers/target-access'; +import type { CustomOrchestratorConfig } from '../../schema/providers/orchestrators/custom'; type Paginated = T & { after?: string | null; diff --git a/packages/services/api/src/modules/target/index.ts b/packages/services/api/src/modules/target/index.ts index 04e7ae4f3..bc5c00cf5 100644 --- a/packages/services/api/src/modules/target/index.ts +++ b/packages/services/api/src/modules/target/index.ts @@ -1,6 +1,6 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; import { TargetManager } from './providers/target-manager'; +import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; export const targetModule = createModule({ diff --git a/packages/services/api/src/modules/target/providers/target-manager.ts b/packages/services/api/src/modules/target/providers/target-manager.ts index 5ffa50010..d5c75e2c5 100644 --- a/packages/services/api/src/modules/target/providers/target-manager.ts +++ b/packages/services/api/src/modules/target/providers/target-manager.ts @@ -1,15 +1,15 @@ import { Injectable, Scope } from 'graphql-modules'; import { paramCase } from 'param-case'; import type { Target, TargetSettings } from '../../../shared/entities'; -import { HiveError } from './../../../shared/errors'; -import { AuthManager } from '../../auth/providers/auth-manager'; -import { Logger } from '../../shared/providers/logger'; -import { Storage, ProjectSelector, TargetSelector } from '../../shared/providers/storage'; import { share, uuid } from '../../../shared/helpers'; import { ActivityManager } from '../../activity/providers/activity-manager'; -import { TokenStorage } from '../../token/providers/token-storage'; +import { AuthManager } from '../../auth/providers/auth-manager'; import { ProjectAccessScope } from '../../auth/providers/project-access'; import { TargetAccessScope } from '../../auth/providers/target-access'; +import { Logger } from '../../shared/providers/logger'; +import { ProjectSelector, Storage, TargetSelector } from '../../shared/providers/storage'; +import { TokenStorage } from '../../token/providers/token-storage'; +import { HiveError } from './../../../shared/errors'; /** * Responsible for auth checks. diff --git a/packages/services/api/src/modules/target/resolvers.ts b/packages/services/api/src/modules/target/resolvers.ts index 9cbf6a493..f1134b532 100644 --- a/packages/services/api/src/modules/target/resolvers.ts +++ b/packages/services/api/src/modules/target/resolvers.ts @@ -1,9 +1,9 @@ -import type { TargetModule } from './__generated__/types'; -import { createConnection } from '../../shared/schema'; -import { IdTranslator } from '../shared/providers/id-translator'; -import { TargetManager } from './providers/target-manager'; import { z } from 'zod'; +import { createConnection } from '../../shared/schema'; import { OrganizationManager } from '../organization/providers/organization-manager'; +import { IdTranslator } from '../shared/providers/id-translator'; +import type { TargetModule } from './__generated__/types'; +import { TargetManager } from './providers/target-manager'; const TargetNameModel = z.string().min(2).max(30); const PercentageModel = z.number().min(0).max(100); diff --git a/packages/services/api/src/modules/token/index.ts b/packages/services/api/src/modules/token/index.ts index f4b32ca33..19733fc36 100644 --- a/packages/services/api/src/modules/token/index.ts +++ b/packages/services/api/src/modules/token/index.ts @@ -1,8 +1,8 @@ import { createModule } from 'graphql-modules'; -import { resolvers } from './resolvers'; -import typeDefs from './module.graphql'; import { TokenManager } from './providers/token-manager'; import { TokenStorage } from './providers/token-storage'; +import { resolvers } from './resolvers'; +import typeDefs from './module.graphql'; export const tokenModule = createModule({ id: 'token', diff --git a/packages/services/api/src/modules/token/providers/token-manager.ts b/packages/services/api/src/modules/token/providers/token-manager.ts index cf417cbaa..2aa0d99ec 100644 --- a/packages/services/api/src/modules/token/providers/token-manager.ts +++ b/packages/services/api/src/modules/token/providers/token-manager.ts @@ -3,13 +3,13 @@ import type { Token } from '../../../shared/entities'; import { HiveError } from '../../../shared/errors'; import { diffArrays, pushIfMissing } from '../../../shared/helpers'; import { AuthManager } from '../../auth/providers/auth-manager'; -import { Storage, TargetSelector } from '../../shared/providers/storage'; -import { Logger } from '../../shared/providers/logger'; -import { TokenStorage } from './token-storage'; -import type { CreateTokenResult } from './token-storage'; -import { TargetAccessScope } from '../../auth/providers/target-access'; -import { ProjectAccessScope } from '../../auth/providers/project-access'; import { OrganizationAccessScope } from '../../auth/providers/organization-access'; +import { ProjectAccessScope } from '../../auth/providers/project-access'; +import { TargetAccessScope } from '../../auth/providers/target-access'; +import { Logger } from '../../shared/providers/logger'; +import { Storage, TargetSelector } from '../../shared/providers/storage'; +import type { CreateTokenResult } from './token-storage'; +import { TokenStorage } from './token-storage'; interface CreateTokenInput extends TargetSelector { name: string; diff --git a/packages/services/api/src/modules/token/providers/token-storage.ts b/packages/services/api/src/modules/token/providers/token-storage.ts index 5429840ee..801162963 100644 --- a/packages/services/api/src/modules/token/providers/token-storage.ts +++ b/packages/services/api/src/modules/token/providers/token-storage.ts @@ -1,21 +1,21 @@ -import { Inject, Injectable, Scope, CONTEXT } from 'graphql-modules'; -import { atomic } from '../../../shared/helpers'; -import { HiveError } from '../../../shared/errors'; -import type { Token } from '../../../shared/entities'; -import { Logger } from '../../shared/providers/logger'; -import { - TargetSelector, - ProjectSelector, - OrganizationSelector, -} from '../../shared/providers/storage'; -import type { TargetAccessScope } from '../../auth/providers/target-access'; -import type { ProjectAccessScope } from '../../auth/providers/project-access'; -import type { OrganizationAccessScope } from '../../auth/providers/organization-access'; -import type { TokensConfig } from './tokens'; -import { TOKENS_CONFIG } from './tokens'; import type { TokensApi } from '@hive/tokens'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { fetch } from '@whatwg-node/fetch'; +import { CONTEXT, Inject, Injectable, Scope } from 'graphql-modules'; +import type { Token } from '../../../shared/entities'; +import { HiveError } from '../../../shared/errors'; +import { atomic } from '../../../shared/helpers'; +import type { OrganizationAccessScope } from '../../auth/providers/organization-access'; +import type { ProjectAccessScope } from '../../auth/providers/project-access'; +import type { TargetAccessScope } from '../../auth/providers/target-access'; +import { Logger } from '../../shared/providers/logger'; +import { + OrganizationSelector, + ProjectSelector, + TargetSelector, +} from '../../shared/providers/storage'; +import type { TokensConfig } from './tokens'; +import { TOKENS_CONFIG } from './tokens'; function maskToken(token: string) { return token.substring(0, 3) + '*'.repeat(token.length - 6) + token.substring(token.length - 3); diff --git a/packages/services/api/src/modules/token/resolvers.ts b/packages/services/api/src/modules/token/resolvers.ts index 6dacdc7de..d83df4f20 100644 --- a/packages/services/api/src/modules/token/resolvers.ts +++ b/packages/services/api/src/modules/token/resolvers.ts @@ -1,12 +1,12 @@ -import type { TokenModule } from './__generated__/types'; +import { z } from 'zod'; import { createConnection } from '../../shared/schema'; -import { TokenManager } from './providers/token-manager'; -import { IdTranslator } from '../shared/providers/id-translator'; import { AuthManager } from '../auth/providers/auth-manager'; import { OrganizationManager } from '../organization/providers/organization-manager'; import { ProjectManager } from '../project/providers/project-manager'; +import { IdTranslator } from '../shared/providers/id-translator'; import { TargetManager } from '../target/providers/target-manager'; -import { z } from 'zod'; +import type { TokenModule } from './__generated__/types'; +import { TokenManager } from './providers/token-manager'; const TokenNameModel = z.string().min(2).max(50); diff --git a/packages/services/api/src/modules/usage-estimation/index.ts b/packages/services/api/src/modules/usage-estimation/index.ts index 1ce46f391..700d82511 100644 --- a/packages/services/api/src/modules/usage-estimation/index.ts +++ b/packages/services/api/src/modules/usage-estimation/index.ts @@ -1,7 +1,7 @@ import { createModule } from 'graphql-modules'; +import { UsageEstimationProvider } from './providers/usage-estimation.provider'; import { resolvers } from './resolvers'; import typeDefs from './module.graphql'; -import { UsageEstimationProvider } from './providers/usage-estimation.provider'; export const usageEstimationModule = createModule({ id: 'usage-estimation', diff --git a/packages/services/api/src/modules/usage-estimation/providers/usage-estimation.provider.ts b/packages/services/api/src/modules/usage-estimation/providers/usage-estimation.provider.ts index 616901f32..a3547fa6a 100644 --- a/packages/services/api/src/modules/usage-estimation/providers/usage-estimation.provider.ts +++ b/packages/services/api/src/modules/usage-estimation/providers/usage-estimation.provider.ts @@ -1,11 +1,11 @@ import type { UsageEstimatorApi, UsageEstimatorApiInput } from '@hive/usage-estimator'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; +import { fetch } from '@whatwg-node/fetch'; import { Inject, Injectable, Scope } from 'graphql-modules'; import { sentry } from '../../../shared/sentry'; import { Logger } from '../../shared/providers/logger'; import type { UsageEstimationServiceConfig } from './tokens'; import { USAGE_ESTIMATION_SERVICE_CONFIG } from './tokens'; -import { fetch } from '@whatwg-node/fetch'; @Injectable({ scope: Scope.Singleton, diff --git a/packages/services/api/src/modules/usage-estimation/resolvers.ts b/packages/services/api/src/modules/usage-estimation/resolvers.ts index 3e619a683..6d9160264 100644 --- a/packages/services/api/src/modules/usage-estimation/resolvers.ts +++ b/packages/services/api/src/modules/usage-estimation/resolvers.ts @@ -5,8 +5,8 @@ import { OrganizationAccessScope } from '../auth/providers/organization-access'; import { ProjectManager } from '../project/providers/project-manager'; import { IdTranslator } from '../shared/providers/id-translator'; import { TargetManager } from '../target/providers/target-manager'; -import { UsageEstimationProvider } from './providers/usage-estimation.provider'; import { UsageEstimationModule } from './__generated__/types'; +import { UsageEstimationProvider } from './providers/usage-estimation.provider'; export const resolvers: UsageEstimationModule.Resolvers = { Query: { diff --git a/packages/services/api/src/shared/entities.ts b/packages/services/api/src/shared/entities.ts index 4cd6e5dbf..ebfdf659c 100644 --- a/packages/services/api/src/shared/entities.ts +++ b/packages/services/api/src/shared/entities.ts @@ -1,14 +1,14 @@ import { DocumentNode, GraphQLError, SourceLocation } from 'graphql'; +import { parse } from 'graphql'; import type { - SchemaError, AlertChannelType, AlertType, AuthProvider, OrganizationAccessScope, ProjectAccessScope, + SchemaError, TargetAccessScope, } from '../__generated__/types'; -import { parse } from 'graphql'; export interface Schema { id: string; diff --git a/packages/services/api/src/shared/helpers.ts b/packages/services/api/src/shared/helpers.ts index e316e98ae..a698b27b9 100644 --- a/packages/services/api/src/shared/helpers.ts +++ b/packages/services/api/src/shared/helpers.ts @@ -1,12 +1,12 @@ +import { createHash } from 'crypto'; import type { InjectionToken } from 'graphql-modules'; import ms from 'ms'; -import { createHash } from 'crypto'; import type { + DateRangeInput, OrganizationSelector, PersistedOperationSelector, ProjectSelector, TargetSelector, - DateRangeInput, } from '../__generated__/types'; import { DateRange } from './entities'; diff --git a/packages/services/api/src/shared/mappers.ts b/packages/services/api/src/shared/mappers.ts index cd5233d7a..6d0c05f74 100644 --- a/packages/services/api/src/shared/mappers.ts +++ b/packages/services/api/src/shared/mappers.ts @@ -1,23 +1,25 @@ import type { + GraphQLArgument, + GraphQLEnumType, + GraphQLEnumValue, GraphQLField, GraphQLInputField, - GraphQLObjectType, - GraphQLInterfaceType, - GraphQLUnionType, - GraphQLEnumType, GraphQLInputObjectType, + GraphQLInterfaceType, + GraphQLObjectType, GraphQLScalarType, - GraphQLEnumValue, GraphQLSchema, - GraphQLArgument, + GraphQLUnionType, } from 'graphql'; import type { + ClientStats, + OperationStats, SchemaChange, SchemaError, - OperationStats, - ClientStats, } from '../__generated__/types'; import type { + ActivityObject, + DateRange, Member, Organization, PersistedOperation, @@ -27,8 +29,6 @@ import type { Target, Token, User, - ActivityObject, - DateRange, } from './entities'; export interface SchemaVersion extends SchemaVersionEntity { diff --git a/packages/services/api/src/shared/schema.ts b/packages/services/api/src/shared/schema.ts index 530a6a2b1..ea6cf5982 100644 --- a/packages/services/api/src/shared/schema.ts +++ b/packages/services/api/src/shared/schema.ts @@ -1,21 +1,21 @@ -import lodash from 'lodash'; import { createHash } from 'crypto'; import { buildASTSchema, - GraphQLSchema, - lexicographicSortSchema, - visit, - DocumentNode, - Kind, - DefinitionNode, ConstDirectiveNode, - OperationTypeDefinitionNode, - FieldDefinitionNode, - NamedTypeNode, + DefinitionNode, + DocumentNode, EnumValueDefinitionNode, + FieldDefinitionNode, + GraphQLSchema, InputValueDefinitionNode, + Kind, + lexicographicSortSchema, + NamedTypeNode, + OperationTypeDefinitionNode, + visit, } from 'graphql'; -import { Schema, SchemaObject, emptySource } from './entities'; +import lodash from 'lodash'; +import { emptySource, Schema, SchemaObject } from './entities'; export function hashSchema(schema: Schema): string { return createHash('md5').update(schema.source, 'utf-8').digest('hex'); diff --git a/packages/services/broker-worker/build.mjs b/packages/services/broker-worker/build.mjs index 728aae227..0438747a2 100644 --- a/packages/services/broker-worker/build.mjs +++ b/packages/services/broker-worker/build.mjs @@ -1,6 +1,6 @@ -import { build } from 'esbuild'; -import { fileURLToPath } from 'url'; import { dirname } from 'path'; +import { fileURLToPath } from 'url'; +import { build } from 'esbuild'; (async function main() { const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/services/broker-worker/src/dev-polyfill.ts b/packages/services/broker-worker/src/dev-polyfill.ts index 85560093f..afcf182cb 100644 --- a/packages/services/broker-worker/src/dev-polyfill.ts +++ b/packages/services/broker-worker/src/dev-polyfill.ts @@ -1,4 +1,4 @@ -import { createFetch, Response, Request, Headers, ReadableStream } from '@whatwg-node/fetch'; +import { createFetch, Headers, ReadableStream, Request, Response } from '@whatwg-node/fetch'; const nodeFetch = createFetch({ useNodeFetch: true, diff --git a/packages/services/broker-worker/src/dev.ts b/packages/services/broker-worker/src/dev.ts index 72791a4a5..f6915ab15 100644 --- a/packages/services/broker-worker/src/dev.ts +++ b/packages/services/broker-worker/src/dev.ts @@ -1,9 +1,9 @@ import './dev-polyfill'; import { createServer } from 'http'; -import { handleRequest } from './handler'; -import { isSignatureValid } from './auth'; import { createServerAdapter } from '@whatwg-node/server'; import { Router } from 'itty-router'; +import { isSignatureValid } from './auth'; +import { handleRequest } from './handler'; // eslint-disable-next-line no-process-env const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 4010; diff --git a/packages/services/broker-worker/src/models.ts b/packages/services/broker-worker/src/models.ts index 16b7fba8d..f6f75195a 100644 --- a/packages/services/broker-worker/src/models.ts +++ b/packages/services/broker-worker/src/models.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; import { isSignatureValid } from './auth'; -import { MissingSignature, InvalidSignature, InvalidRequestFormat } from './errors'; +import { InvalidRequestFormat, InvalidSignature, MissingSignature } from './errors'; const SIGNATURE_HEADER_NAME = 'x-hive-signature'; diff --git a/packages/services/broker-worker/tests/broker.spec.ts b/packages/services/broker-worker/tests/broker.spec.ts index dc5910fd5..bdfc7e591 100644 --- a/packages/services/broker-worker/tests/broker.spec.ts +++ b/packages/services/broker-worker/tests/broker.spec.ts @@ -1,8 +1,8 @@ import '../src/dev-polyfill'; -import { handleRequest } from '../src/handler'; -import { InvalidSignature, MissingSignature, InvalidRequestFormat } from '../src/errors'; -import { isSignatureValid } from '../src/auth'; import nock from 'nock'; +import { isSignatureValid } from '../src/auth'; +import { InvalidRequestFormat, InvalidSignature, MissingSignature } from '../src/errors'; +import { handleRequest } from '../src/handler'; const SignatureValidators = { AlwaysTrue: () => true, diff --git a/packages/services/cdn-worker/build.mjs b/packages/services/cdn-worker/build.mjs index 728aae227..0438747a2 100644 --- a/packages/services/cdn-worker/build.mjs +++ b/packages/services/cdn-worker/build.mjs @@ -1,6 +1,6 @@ -import { build } from 'esbuild'; -import { fileURLToPath } from 'url'; import { dirname } from 'path'; +import { fileURLToPath } from 'url'; +import { build } from 'esbuild'; (async function main() { const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/services/cdn-worker/src/artifact-handler.ts b/packages/services/cdn-worker/src/artifact-handler.ts index 11cf50db6..271b18949 100644 --- a/packages/services/cdn-worker/src/artifact-handler.ts +++ b/packages/services/cdn-worker/src/artifact-handler.ts @@ -1,11 +1,11 @@ -import type { KeyValidator } from './key-validation'; +import type { ArtifactsType } from '@hive/api/src/modules/schema/providers/artifact-storage-reader'; import { type Request, createFetch } from '@whatwg-node/fetch'; import itty from 'itty-router'; import zod from 'zod'; -import { InvalidAuthKeyResponse, MissingAuthKeyResponse } from './errors'; import type { Analytics } from './analytics'; import { createAnalytics } from './analytics'; -import type { ArtifactsType } from '@hive/api/src/modules/schema/providers/artifact-storage-reader'; +import { InvalidAuthKeyResponse, MissingAuthKeyResponse } from './errors'; +import type { KeyValidator } from './key-validation'; const { Response } = createFetch({ useNodeFetch: true }); diff --git a/packages/services/cdn-worker/src/dev-polyfill.ts b/packages/services/cdn-worker/src/dev-polyfill.ts index 02d76431e..9a1af9a09 100644 --- a/packages/services/cdn-worker/src/dev-polyfill.ts +++ b/packages/services/cdn-worker/src/dev-polyfill.ts @@ -1,4 +1,4 @@ -import { Response, Request, Headers, ReadableStream, crypto } from '@whatwg-node/fetch'; +import { crypto, Headers, ReadableStream, Request, Response } from '@whatwg-node/fetch'; if (!globalThis.Response) { globalThis.Response = Response; diff --git a/packages/services/cdn-worker/src/dev.ts b/packages/services/cdn-worker/src/dev.ts index 6a21067e8..884bfe124 100644 --- a/packages/services/cdn-worker/src/dev.ts +++ b/packages/services/cdn-worker/src/dev.ts @@ -1,14 +1,14 @@ import './dev-polyfill'; import { createServer } from 'http'; -import { createRequestHandler } from './handler'; -import { createArtifactRequestHandler } from './artifact-handler'; -import { devStorage } from './dev-polyfill'; -import { createServerAdapter } from '@whatwg-node/server'; -import { withParams, json } from 'itty-router-extras'; -import { createIsKeyValid } from './key-validation'; -import itty from 'itty-router'; import { S3Client } from '@aws-sdk/client-s3'; import { ArtifactStorageReader } from '@hive/api/src/modules/schema/providers/artifact-storage-reader'; +import { createServerAdapter } from '@whatwg-node/server'; +import itty from 'itty-router'; +import { json, withParams } from 'itty-router-extras'; +import { createArtifactRequestHandler } from './artifact-handler'; +import { devStorage } from './dev-polyfill'; +import { createRequestHandler } from './handler'; +import { createIsKeyValid } from './key-validation'; // eslint-disable-next-line no-process-env const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 4010; diff --git a/packages/services/cdn-worker/src/handler.ts b/packages/services/cdn-worker/src/handler.ts index 85363ecd8..24ee2275d 100644 --- a/packages/services/cdn-worker/src/handler.ts +++ b/packages/services/cdn-worker/src/handler.ts @@ -1,3 +1,5 @@ +import { buildSchema, introspectionFromSchema } from 'graphql'; +import { Analytics, createAnalytics } from './analytics'; import { CDNArtifactNotFound, InvalidArtifactMatch, @@ -6,8 +8,6 @@ import { MissingAuthKeyResponse, MissingTargetIDErrorResponse, } from './errors'; -import { Analytics, createAnalytics } from './analytics'; -import { buildSchema, introspectionFromSchema } from 'graphql'; import type { KeyValidator } from './key-validation'; async function createETag(value: string) { diff --git a/packages/services/cdn-worker/src/index.ts b/packages/services/cdn-worker/src/index.ts index cdc6cfb91..37cce0397 100644 --- a/packages/services/cdn-worker/src/index.ts +++ b/packages/services/cdn-worker/src/index.ts @@ -1,12 +1,12 @@ -import Toucan from 'toucan-js'; -import itty from 'itty-router'; -import { ArtifactStorageReader } from '@hive/api/src/modules/schema/providers/artifact-storage-reader'; import { S3Client } from '@aws-sdk/client-s3'; -import { createIsKeyValid } from './key-validation'; +import { ArtifactStorageReader } from '@hive/api/src/modules/schema/providers/artifact-storage-reader'; +import itty from 'itty-router'; +import Toucan from 'toucan-js'; +import { AnalyticsEngine, createAnalytics } from './analytics'; +import { createArtifactRequestHandler } from './artifact-handler'; import { UnexpectedError } from './errors'; import { createRequestHandler } from './handler'; -import { createArtifactRequestHandler } from './artifact-handler'; -import { createAnalytics, AnalyticsEngine } from './analytics'; +import { createIsKeyValid } from './key-validation'; /** * KV Storage for the CDN diff --git a/packages/services/cdn-worker/tests/cdn.spec.ts b/packages/services/cdn-worker/tests/cdn.spec.ts index a59548be4..ad59c24fe 100644 --- a/packages/services/cdn-worker/tests/cdn.spec.ts +++ b/packages/services/cdn-worker/tests/cdn.spec.ts @@ -1,13 +1,13 @@ import '../src/dev-polyfill'; -import { createRequestHandler } from '../src/handler'; +import { createHmac } from 'crypto'; import { InvalidArtifactTypeResponse, InvalidAuthKeyResponse, MissingAuthKeyResponse, MissingTargetIDErrorResponse, } from '../src/errors'; +import { createRequestHandler } from '../src/handler'; import { createIsKeyValid, KeyValidator } from '../src/key-validation'; -import { createHmac } from 'crypto'; describe('CDN Worker', () => { const KeyValidators: Record = { diff --git a/packages/services/emails/src/api.ts b/packages/services/emails/src/api.ts index aed37801c..1fe2772fa 100644 --- a/packages/services/emails/src/api.ts +++ b/packages/services/emails/src/api.ts @@ -1,10 +1,10 @@ import type { inferRouterInputs } from '@trpc/server'; import { initTRPC } from '@trpc/server'; +import { z } from 'zod'; import type { Context } from './context'; import { EmailInputShape } from './shapes'; -import { z } from 'zod'; -import { renderPasswordResetEmail } from './templates/password-reset'; import { renderEmailVerificationEmail } from './templates/email-verification'; +import { renderPasswordResetEmail } from './templates/password-reset'; const t = initTRPC.context().create(); diff --git a/packages/services/emails/src/index.ts b/packages/services/emails/src/index.ts index eaebd4188..5ab642ade 100644 --- a/packages/services/emails/src/index.ts +++ b/packages/services/emails/src/index.ts @@ -1,20 +1,20 @@ #!/usr/bin/env node import { - createServer, createErrorHandler, - startMetrics, + createServer, registerShutdown, reportReadiness, startHeartbeats, + startMetrics, } from '@hive/service-common'; import * as Sentry from '@sentry/node'; -import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import type { CreateFastifyContextOptions } from '@trpc/server/adapters/fastify'; +import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import { emailsApiRouter } from './api'; -import { createScheduler } from './scheduler'; -import { createEmailProvider } from './providers'; import type { Context } from './context'; import { env } from './environment'; +import { createEmailProvider } from './providers'; +import { createScheduler } from './scheduler'; async function main() { if (env.sentry) { diff --git a/packages/services/emails/src/providers.ts b/packages/services/emails/src/providers.ts index dc27ec375..4070b86ea 100644 --- a/packages/services/emails/src/providers.ts +++ b/packages/services/emails/src/providers.ts @@ -1,13 +1,13 @@ +import { fetch } from '@whatwg-node/fetch'; import nodemailer from 'nodemailer'; import sm from 'sendmail'; import type { EmailProviderConfig, - PostmarkEmailProviderConfig, MockEmailProviderConfig, - SMTPEmailProviderConfig, + PostmarkEmailProviderConfig, SendmailEmailProviderConfig, + SMTPEmailProviderConfig, } from './environment'; -import { fetch } from '@whatwg-node/fetch'; interface Email { to: string; diff --git a/packages/services/emails/src/scheduler.ts b/packages/services/emails/src/scheduler.ts index 8d36fde0d..20ee1a78c 100644 --- a/packages/services/emails/src/scheduler.ts +++ b/packages/services/emails/src/scheduler.ts @@ -1,12 +1,12 @@ -import * as Sentry from '@sentry/node'; import type { FastifyLoggerInstance } from '@hive/service-common'; -import { Queue, QueueScheduler, Worker, Job } from 'bullmq'; +import * as Sentry from '@sentry/node'; +import { Job, Queue, QueueScheduler, Worker } from 'bullmq'; import Redis, { Redis as RedisInstance } from 'ioredis'; -import pTimeout from 'p-timeout'; import mjml2html from 'mjml'; -import { emailsTotal, emailsFailuresTotal } from './metrics'; -import type { EmailInput } from './shapes'; +import pTimeout from 'p-timeout'; +import { emailsFailuresTotal, emailsTotal } from './metrics'; import type { EmailProvider } from './providers'; +import type { EmailInput } from './shapes'; const DAY_IN_SECONDS = 86_400; diff --git a/packages/services/external-composition/federation-2/src/index.ts b/packages/services/external-composition/federation-2/src/index.ts index d533db393..7701a0256 100644 --- a/packages/services/external-composition/federation-2/src/index.ts +++ b/packages/services/external-composition/federation-2/src/index.ts @@ -1,7 +1,7 @@ import { createServer } from 'node:http'; import process from 'node:process'; -import { createRequestListener } from './server'; import { resolveEnv } from './environment'; +import { createRequestListener } from './server'; // eslint-disable-next-line no-process-env const env = resolveEnv(process.env); diff --git a/packages/services/external-composition/federation-2/src/server.ts b/packages/services/external-composition/federation-2/src/server.ts index a8b8cdb44..9ae282ec6 100644 --- a/packages/services/external-composition/federation-2/src/server.ts +++ b/packages/services/external-composition/federation-2/src/server.ts @@ -1,8 +1,8 @@ -import { verifyRequest, compose, signatureHeaderName } from '@graphql-hive/external-composition'; import { composeServices } from '@apollo/composition'; -import { parse, printSchema } from 'graphql'; -import { createServerAdapter } from '@whatwg-node/server'; +import { compose, signatureHeaderName, verifyRequest } from '@graphql-hive/external-composition'; import { Response } from '@whatwg-node/fetch'; +import { createServerAdapter } from '@whatwg-node/server'; +import { parse, printSchema } from 'graphql'; import { ResolvedEnv } from './environment'; const composeFederation = compose(services => { diff --git a/packages/services/police-worker/build.mjs b/packages/services/police-worker/build.mjs index bc9c365d2..e904b90d9 100644 --- a/packages/services/police-worker/build.mjs +++ b/packages/services/police-worker/build.mjs @@ -1,6 +1,6 @@ -import { build } from 'esbuild'; -import { fileURLToPath } from 'url'; import { dirname } from 'path'; +import { fileURLToPath } from 'url'; +import { build } from 'esbuild'; (async function main() { const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/services/rate-limit/src/api.ts b/packages/services/rate-limit/src/api.ts index d243f4490..a3d245241 100644 --- a/packages/services/rate-limit/src/api.ts +++ b/packages/services/rate-limit/src/api.ts @@ -1,7 +1,7 @@ -import { initTRPC } from '@trpc/server'; -import type { Limiter } from './limiter'; -import { z } from 'zod'; import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server'; +import { initTRPC } from '@trpc/server'; +import { z } from 'zod'; +import type { Limiter } from './limiter'; const t = initTRPC.context().create(); diff --git a/packages/services/rate-limit/src/emails.ts b/packages/services/rate-limit/src/emails.ts index bb2bede27..72c8eb0b4 100644 --- a/packages/services/rate-limit/src/emails.ts +++ b/packages/services/rate-limit/src/emails.ts @@ -1,6 +1,6 @@ -import { fetch } from '@whatwg-node/fetch'; -import { createTRPCProxyClient, httpLink } from '@trpc/client'; 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 }) { diff --git a/packages/services/rate-limit/src/index.ts b/packages/services/rate-limit/src/index.ts index 7e3e2e2fd..caf055b87 100644 --- a/packages/services/rate-limit/src/index.ts +++ b/packages/services/rate-limit/src/index.ts @@ -1,17 +1,17 @@ #!/usr/bin/env node import 'reflect-metadata'; -import * as Sentry from '@sentry/node'; import { createServer, - startMetrics, registerShutdown, reportReadiness, + startMetrics, } from '@hive/service-common'; -import { createRateLimiter } from './limiter'; import { createConnectionString } from '@hive/storage'; +import * as Sentry from '@sentry/node'; import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import { rateLimitApiRouter } from './api'; import { env } from './environment'; +import { createRateLimiter } from './limiter'; async function main() { if (env.sentry) { diff --git a/packages/services/rate-limit/src/limiter.ts b/packages/services/rate-limit/src/limiter.ts index 1392ad64c..328d4fd91 100644 --- a/packages/services/rate-limit/src/limiter.ts +++ b/packages/services/rate-limit/src/limiter.ts @@ -1,14 +1,13 @@ -import { fetch } from '@whatwg-node/fetch'; import type { FastifyLoggerInstance } from '@hive/service-common'; import { createStorage as createPostgreSQLStorage } from '@hive/storage'; - -import { startOfMonth, endOfMonth } from 'date-fns'; +import type { UsageEstimatorApi } from '@hive/usage-estimator'; import * as Sentry from '@sentry/node'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; -import type { UsageEstimatorApi } from '@hive/usage-estimator'; +import { fetch } from '@whatwg-node/fetch'; +import { endOfMonth, startOfMonth } from 'date-fns'; import type { RateLimitInput } from './api'; -import { rateLimitOperationsEventOrg } from './metrics'; import { createEmailScheduler } from './emails'; +import { rateLimitOperationsEventOrg } from './metrics'; export type RateLimitCheckResponse = { limited: boolean; diff --git a/packages/services/schema/src/api.ts b/packages/services/schema/src/api.ts index 52cbe5396..e5f620229 100644 --- a/packages/services/schema/src/api.ts +++ b/packages/services/schema/src/api.ts @@ -1,10 +1,10 @@ import type { inferRouterInputs } from '@trpc/server'; import { initTRPC } from '@trpc/server'; import type { FastifyLoggerInstance } from 'fastify'; +import { Redis } from 'ioredis'; import { z } from 'zod'; import { buildCounter, supergraphCounter, validateCounter } from './metrics'; import { pickOrchestrator } from './orchestrators'; -import { Redis } from 'ioredis'; const t = initTRPC .context<{ diff --git a/packages/services/schema/src/index.ts b/packages/services/schema/src/index.ts index 079f21510..7ae69858a 100644 --- a/packages/services/schema/src/index.ts +++ b/packages/services/schema/src/index.ts @@ -1,16 +1,16 @@ #!/usr/bin/env node +import crypto from 'crypto'; import { - createServer, createErrorHandler, - startMetrics, + createServer, registerShutdown, reportReadiness, + startMetrics, } from '@hive/service-common'; import * as Sentry from '@sentry/node'; -import Redis from 'ioredis'; -import crypto from 'crypto'; -import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import type { CreateFastifyContextOptions } from '@trpc/server/adapters/fastify'; +import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; +import Redis from 'ioredis'; import { schemaBuilderApiRouter } from './api'; import { env } from './environment'; diff --git a/packages/services/schema/src/orchestrators.ts b/packages/services/schema/src/orchestrators.ts index 91670ce55..8c809501e 100644 --- a/packages/services/schema/src/orchestrators.ts +++ b/packages/services/schema/src/orchestrators.ts @@ -1,24 +1,24 @@ -import type { Redis as RedisInstance } from 'ioredis'; -import type { FastifyLoggerInstance } from '@hive/service-common'; import { createHash, createHmac } from 'crypto'; -import { printSchema, parse, concatAST, visit, print, ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import { validateSDL } from 'graphql/validation/validate.js'; import { composeAndValidate, compositionHasErrors } from '@apollo/federation'; import { stitchSchemas } from '@graphql-tools/stitch'; import { stitchingDirectives } from '@graphql-tools/stitching-directives'; +import type { FastifyLoggerInstance } from '@hive/service-common'; import { fetch } from '@whatwg-node/fetch'; import retry from 'async-retry'; +import type { DocumentNode } from 'graphql'; +import { ASTNode, concatAST, parse, print, printSchema, visit } from 'graphql'; +import { validateSDL } from 'graphql/validation/validate.js'; +import type { Redis as RedisInstance } from 'ioredis'; import { z } from 'zod'; import type { - SchemaType, BuildInput, BuildOutput, - ValidationInput, - ValidationOutput, + ExternalComposition, + SchemaType, SupergraphInput, SupergraphOutput, - ExternalComposition, + ValidationInput, + ValidationOutput, } from './types'; interface CompositionSuccess { diff --git a/packages/services/server/src/api.ts b/packages/services/server/src/api.ts index 045812c6b..f961ae437 100644 --- a/packages/services/server/src/api.ts +++ b/packages/services/server/src/api.ts @@ -1,16 +1,16 @@ -import { initTRPC } from '@trpc/server'; -import type { inferAsyncReturnType } from '@trpc/server'; -import { - reservedOrganizationNames, - organizationAdminScopes, - OrganizationAccessScope, - ProjectAccessScope, - TargetAccessScope, - OrganizationType, -} from '@hive/api'; import type { Storage } from '@hive/api'; -import { z } from 'zod'; +import { + OrganizationAccessScope, + organizationAdminScopes, + OrganizationType, + ProjectAccessScope, + reservedOrganizationNames, + TargetAccessScope, +} from '@hive/api'; +import type { inferAsyncReturnType } from '@trpc/server'; +import { initTRPC } from '@trpc/server'; import { CryptoProvider } from 'packages/services/api/src/modules/shared/providers/crypto'; +import { z } from 'zod'; export async function createContext({ storage, diff --git a/packages/services/server/src/dev.ts b/packages/services/server/src/dev.ts index e0966835b..dd66c7f72 100644 --- a/packages/services/server/src/dev.ts +++ b/packages/services/server/src/dev.ts @@ -1,6 +1,6 @@ -import { config } from 'dotenv'; -import { readFileSync, existsSync } from 'fs'; +import { existsSync, readFileSync } from 'fs'; import { join } from 'path'; +import { config } from 'dotenv'; config({ debug: true, diff --git a/packages/services/server/src/graphql-handler.ts b/packages/services/server/src/graphql-handler.ts index 03d6aaa1f..220615806 100644 --- a/packages/services/server/src/graphql-handler.ts +++ b/packages/services/server/src/graphql-handler.ts @@ -1,33 +1,33 @@ -import type { - RouteHandlerMethod, - FastifyRequest, - FastifyReply, - FastifyLoggerInstance, -} from 'fastify'; -import { Registry, RegistryContext } from '@hive/api'; -import { cleanRequestId } from '@hive/service-common'; -import { createYoga, useErrorHandler, Plugin } from 'graphql-yoga'; import { isGraphQLError } from '@envelop/core'; +import { useGenericAuth } from '@envelop/generic-auth'; +import { useGraphQLModules } from '@envelop/graphql-modules'; +import { useSentry } from '@envelop/sentry'; +import { useHive } from '@graphql-hive/client'; +import { Registry, RegistryContext } from '@hive/api'; +import { HiveError } from '@hive/api'; +import { cleanRequestId } from '@hive/service-common'; +import { fetch } from '@whatwg-node/fetch'; +import type { + FastifyLoggerInstance, + FastifyReply, + FastifyRequest, + RouteHandlerMethod, +} from 'fastify'; import { GraphQLError, - ValidationContext, - ValidationRule, Kind, OperationDefinitionNode, print, + ValidationContext, + ValidationRule, } from 'graphql'; -import { useGraphQLModules } from '@envelop/graphql-modules'; -import { useGenericAuth } from '@envelop/generic-auth'; -import { fetch } from '@whatwg-node/fetch'; -import { useSentry } from '@envelop/sentry'; -import { asyncStorage } from './async-storage'; -import { useSentryUser, extractUserId } from './use-sentry-user'; -import { useHive } from '@graphql-hive/client'; +import { createYoga, Plugin, useErrorHandler } from 'graphql-yoga'; import hyperid from 'hyperid'; import zod from 'zod'; -import { HiveError } from '@hive/api'; +import { asyncStorage } from './async-storage'; import type { HiveConfig } from './environment'; import { useArmor } from './use-armor'; +import { extractUserId, useSentryUser } from './use-sentry-user'; const reqIdGenerate = hyperid({ fixedLength: true }); diff --git a/packages/services/server/src/index.ts b/packages/services/server/src/index.ts index 728e0c2f0..11cd7ab14 100644 --- a/packages/services/server/src/index.ts +++ b/packages/services/server/src/index.ts @@ -1,32 +1,32 @@ #!/usr/bin/env node import 'reflect-metadata'; -import { - createServer, - startMetrics, - registerShutdown, - reportReadiness, -} from '@hive/service-common'; -import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; -import { createRegistry, LogFn, Logger } from '@hive/api'; -import { createStorage as createPostgreSQLStorage, createConnectionString } from '@hive/storage'; -import got from 'got'; -import { GraphQLError, stripIgnoredCharacters } from 'graphql'; -import * as Sentry from '@sentry/node'; +import { Readable } from 'node:stream'; import { S3Client } from '@aws-sdk/client-s3'; -import { Dedupe, ExtraErrorData } from '@sentry/integrations'; -import { internalApiRouter, createContext } from './api'; -import { asyncStorage } from './async-storage'; -import { graphqlHandler } from './graphql-handler'; -import { clickHouseReadDuration, clickHouseElapsedDuration } from './metrics'; -import zod from 'zod'; -import { env } from './environment'; +import { createRegistry, LogFn, Logger } from '@hive/api'; import { CryptoProvider } from '@hive/api'; import { ArtifactStorageReader } from '@hive/api/src/modules/schema/providers/artifact-storage-reader'; import { createArtifactRequestHandler } from '@hive/cdn-script/artifact-handler'; import { createIsKeyValid } from '@hive/cdn-script/key-validation'; +import { + createServer, + registerShutdown, + reportReadiness, + startMetrics, +} from '@hive/service-common'; +import { createConnectionString, createStorage as createPostgreSQLStorage } from '@hive/storage'; +import { Dedupe, ExtraErrorData } from '@sentry/integrations'; +import * as Sentry from '@sentry/node'; +import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import { createServerAdapter } from '@whatwg-node/server'; -import { Readable } from 'node:stream'; +import got from 'got'; +import { GraphQLError, stripIgnoredCharacters } from 'graphql'; +import zod from 'zod'; +import { createContext, internalApiRouter } from './api'; +import { asyncStorage } from './async-storage'; +import { env } from './environment'; +import { graphqlHandler } from './graphql-handler'; +import { clickHouseElapsedDuration, clickHouseReadDuration } from './metrics'; const LegacySetUserIdMappingPayloadModel = zod.object({ auth0UserId: zod.string(), diff --git a/packages/services/server/src/use-armor.ts b/packages/services/server/src/use-armor.ts index a8ba545e7..a36e2afee 100644 --- a/packages/services/server/src/use-armor.ts +++ b/packages/services/server/src/use-armor.ts @@ -1,11 +1,11 @@ -import type { Plugin } from 'graphql-yoga'; -import type { Source, ParseOptions } from 'graphql'; import { maxAliasesRule } from '@escape.tech/graphql-armor-max-aliases'; import { maxDepthRule } from '@escape.tech/graphql-armor-max-depth'; import { maxDirectivesRule } from '@escape.tech/graphql-armor-max-directives'; import { MaxTokensParserWLexer } from '@escape.tech/graphql-armor-max-tokens'; -import promClient from 'prom-client'; import * as Sentry from '@sentry/node'; +import type { ParseOptions, Source } from 'graphql'; +import type { Plugin } from 'graphql-yoga'; +import promClient from 'prom-client'; const rejectedRequests = new promClient.Counter({ name: 'graphql_armor_rejected_requests', diff --git a/packages/services/service-common/src/errors.ts b/packages/services/service-common/src/errors.ts index e53944efa..e0fd5f53f 100644 --- a/packages/services/service-common/src/errors.ts +++ b/packages/services/service-common/src/errors.ts @@ -1,5 +1,5 @@ -import type { FastifyInstance, FastifyLoggerInstance } from 'fastify'; import * as Sentry from '@sentry/node'; +import type { FastifyInstance, FastifyLoggerInstance } from 'fastify'; export function createErrorHandler(server: FastifyInstance) { return function errorHandler(message: string, error: Error, logger?: FastifyLoggerInstance) { diff --git a/packages/services/service-common/src/fastify.ts b/packages/services/service-common/src/fastify.ts index 99155bcd0..6a798877f 100644 --- a/packages/services/service-common/src/fastify.ts +++ b/packages/services/service-common/src/fastify.ts @@ -1,8 +1,8 @@ +import * as Sentry from '@sentry/node'; import { fastify } from 'fastify'; import cors from 'fastify-cors'; -import * as Sentry from '@sentry/node'; -import { useSentryTracing } from './sentry'; import { useRequestLogging } from './request-logs'; +import { useSentryTracing } from './sentry'; export type { FastifyLoggerInstance } from 'fastify'; diff --git a/packages/services/service-common/src/request-logs.ts b/packages/services/service-common/src/request-logs.ts index 15a4b85be..657141738 100644 --- a/packages/services/service-common/src/request-logs.ts +++ b/packages/services/service-common/src/request-logs.ts @@ -1,7 +1,7 @@ import type { FastifyInstance, FastifyPluginAsync, FastifyRequest } from 'fastify'; import fp from 'fastify-plugin'; -import { cleanRequestId } from './helpers'; import { z } from 'zod'; +import { cleanRequestId } from './helpers'; const GraphQLPayloadSchema = z.object({ operationName: z.string(), diff --git a/packages/services/service-common/src/sentry.ts b/packages/services/service-common/src/sentry.ts index a1afa1bd8..1a2919e86 100644 --- a/packages/services/service-common/src/sentry.ts +++ b/packages/services/service-common/src/sentry.ts @@ -1,8 +1,8 @@ -import * as Sentry from '@sentry/node'; import '@sentry/tracing'; +import * as Sentry from '@sentry/node'; import { Transaction } from '@sentry/tracing'; -import { extractTraceparentData, normalize } from '@sentry/utils'; import type { ExtractedNodeRequestData, TraceparentData } from '@sentry/types'; +import { extractTraceparentData, normalize } from '@sentry/utils'; import type { FastifyInstance, FastifyPluginAsync, FastifyRequest } from 'fastify'; import fp from 'fastify-plugin'; import { cleanRequestId } from './helpers'; diff --git a/packages/services/storage/migrations/index.ts b/packages/services/storage/migrations/index.ts index be8d33478..0ef005cee 100644 --- a/packages/services/storage/migrations/index.ts +++ b/packages/services/storage/migrations/index.ts @@ -1,11 +1,11 @@ #!/usr/bin/env node -import url from 'node:url'; import path from 'node:path'; +import url from 'node:url'; import { SlonikMigrator } from '@slonik/migrator'; import { createPool } from 'slonik'; +import { createConnectionString } from '../src/db'; import { env } from '../src/environment'; import { migrateClickHouse } from './clickhouse'; -import { createConnectionString } from '../src/db'; const [, , cmd] = process.argv; const slonik = await createPool(createConnectionString(env.postgres)); diff --git a/packages/services/storage/src/db/pool.ts b/packages/services/storage/src/db/pool.ts index 88cc5d082..66d6832a4 100644 --- a/packages/services/storage/src/db/pool.ts +++ b/packages/services/storage/src/db/pool.ts @@ -1,10 +1,10 @@ import { - createPool, - TaggedTemplateLiteralInvocation, - QueryResultRowColumn, CommonQueryMethods, + createPool, Interceptor, QueryResultRow, + QueryResultRowColumn, + TaggedTemplateLiteralInvocation, } from 'slonik'; import { createQueryLoggingInterceptor } from 'slonik-interceptor-query-logging'; import { createSentryInterceptor } from './sentry'; diff --git a/packages/services/storage/src/db/sentry.ts b/packages/services/storage/src/db/sentry.ts index a449879a2..c6da7cebd 100644 --- a/packages/services/storage/src/db/sentry.ts +++ b/packages/services/storage/src/db/sentry.ts @@ -1,6 +1,6 @@ -import { Interceptor } from 'slonik'; -import { getCurrentHub, captureException } from '@sentry/node'; +import { captureException, getCurrentHub } from '@sentry/node'; import type { Span } from '@sentry/types'; +import { Interceptor } from 'slonik'; export const createSentryInterceptor = (): Interceptor => { const connections: Record> = {}; diff --git a/packages/services/storage/src/index.ts b/packages/services/storage/src/index.ts index 5e42c96e1..a835d2054 100644 --- a/packages/services/storage/src/index.ts +++ b/packages/services/storage/src/index.ts @@ -1,26 +1,28 @@ import type { - User, + ActivityObject, + Alert, + AlertChannel, + AuthProvider, + Member, Organization, + OrganizationAccessScope, + OrganizationBilling, + OrganizationInvitation, + OrganizationType, + PersistedOperation, Project, - Target, + ProjectAccessScope, + ProjectType, Schema, SchemaVersion, - Member, - ActivityObject, - TargetSettings, - PersistedOperation, - AlertChannel, - Alert, - AuthProvider, - OrganizationBilling, Storage, - ProjectType, - OrganizationType, - OrganizationInvitation, - OrganizationAccessScope, - ProjectAccessScope, + Target, TargetAccessScope, + TargetSettings, + User, } from '@hive/api'; +import { batch } from '@theguild/buddy'; +import { paramCase } from 'param-case'; import { DatabasePool, DatabasePoolConnection, @@ -30,30 +32,28 @@ import { UniqueIntegrityConstraintViolationError, } from 'slonik'; import { update } from 'slonik-utilities'; -import { paramCase } from 'param-case'; -import { - commits, - getPool, - organizations, - organization_member, - projects, - targets, - target_validation, - users, - versions, - version_commit, - objectToParams, - activities, - persisted_operations, - alert_channels, - alerts, - organizations_billing, - organization_invitations, -} from './db'; -import { batch } from '@theguild/buddy'; -import type { Slonik } from './shared'; import zod from 'zod'; import type { OIDCIntegration } from '../../api/src/shared/entities'; +import { + activities, + alert_channels, + alerts, + commits, + getPool, + objectToParams, + organization_invitations, + organization_member, + organizations, + organizations_billing, + persisted_operations, + projects, + target_validation, + targets, + users, + version_commit, + versions, +} from './db'; +import type { Slonik } from './shared'; export { createConnectionString } from './db/utils'; export { createTokenStorage } from './tokens'; diff --git a/packages/services/storage/src/tokens.ts b/packages/services/storage/src/tokens.ts index a12db9286..632276c9e 100644 --- a/packages/services/storage/src/tokens.ts +++ b/packages/services/storage/src/tokens.ts @@ -1,5 +1,5 @@ import { sql } from 'slonik'; -import { getPool, tokens, toDate } from './db'; +import { getPool, toDate, tokens } from './db'; import type { Slonik } from './shared'; export async function createTokenStorage(connection: string, maximumPoolSize: number) { diff --git a/packages/services/stripe-billing/src/api.ts b/packages/services/stripe-billing/src/api.ts index 4f468e16c..76bcd011c 100644 --- a/packages/services/stripe-billing/src/api.ts +++ b/packages/services/stripe-billing/src/api.ts @@ -1,9 +1,9 @@ +import { createStorage } from '@hive/storage'; import type { inferRouterInputs } from '@trpc/server'; import { initTRPC } from '@trpc/server'; -import { z } from 'zod'; -import { createStorage } from '@hive/storage'; -import { Stripe } from 'stripe'; import { addDays, startOfMonth } from 'date-fns'; +import { Stripe } from 'stripe'; +import { z } from 'zod'; export type Context = { storage$: ReturnType; diff --git a/packages/services/stripe-billing/src/index.ts b/packages/services/stripe-billing/src/index.ts index 9348504e2..5e25a7775 100644 --- a/packages/services/stripe-billing/src/index.ts +++ b/packages/services/stripe-billing/src/index.ts @@ -1,16 +1,16 @@ #!/usr/bin/env node import 'reflect-metadata'; -import * as Sentry from '@sentry/node'; import { createServer, - startMetrics, registerShutdown, reportReadiness, + startMetrics, } from '@hive/service-common'; import { createConnectionString } from '@hive/storage'; -import { createStripeBilling } from './billing-sync'; +import * as Sentry from '@sentry/node'; import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; -import { stripeBillingApiRouter, Context } from './api'; +import { Context, stripeBillingApiRouter } from './api'; +import { createStripeBilling } from './billing-sync'; import { env } from './environment'; async function main() { diff --git a/packages/services/tokens/src/api.ts b/packages/services/tokens/src/api.ts index e1a617a90..eca4af84a 100644 --- a/packages/services/tokens/src/api.ts +++ b/packages/services/tokens/src/api.ts @@ -1,11 +1,11 @@ +import { createHash } from 'crypto'; import { createErrorHandler, metrics } from '@hive/service-common'; import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server'; import { initTRPC } from '@trpc/server'; import type { FastifyLoggerInstance } from 'fastify'; +import { Lru as LruType } from 'tiny-lru'; import { z } from 'zod'; import { useCache } from './cache'; -import { createHash } from 'crypto'; -import { Lru as LruType } from 'tiny-lru'; const httpRequests = new metrics.Counter({ name: 'tokens_http_requests', diff --git a/packages/services/tokens/src/cache.ts b/packages/services/tokens/src/cache.ts index 541f79f59..35d6bd030 100644 --- a/packages/services/tokens/src/cache.ts +++ b/packages/services/tokens/src/cache.ts @@ -1,9 +1,9 @@ -import type { FastifyLoggerInstance } from 'fastify'; -import LRU from 'tiny-lru'; -import ms from 'ms'; import { metrics } from '@hive/service-common'; +import type { FastifyLoggerInstance } from 'fastify'; +import ms from 'ms'; +import LRU from 'tiny-lru'; +import { atomic, until, useActionTracker } from './helpers'; import type { Storage, StorageItem } from './storage'; -import { atomic, useActionTracker, until } from './helpers'; const cacheHits = new metrics.Counter({ name: 'tokens_cache_hits', diff --git a/packages/services/tokens/src/index.ts b/packages/services/tokens/src/index.ts index e61d6b4ba..4888c3a0f 100644 --- a/packages/services/tokens/src/index.ts +++ b/packages/services/tokens/src/index.ts @@ -1,22 +1,22 @@ #!/usr/bin/env node import 'reflect-metadata'; import { - createServer, createErrorHandler, - startMetrics, + createServer, registerShutdown, reportReadiness, startHeartbeats, + startMetrics, } from '@hive/service-common'; import * as Sentry from '@sentry/node'; -import LRU from 'tiny-lru'; -import ms from 'ms'; -import { createStorage } from './storage'; -import { useCache } from './cache'; -import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import type { CreateFastifyContextOptions } from '@trpc/server/adapters/fastify'; +import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; +import ms from 'ms'; +import LRU from 'tiny-lru'; import { Context, tokensApiRouter } from './api'; +import { useCache } from './cache'; import { env } from './environment'; +import { createStorage } from './storage'; export async function main() { if (env.sentry) { diff --git a/packages/services/tokens/src/storage.ts b/packages/services/tokens/src/storage.ts index a03c514ea..93fa3b254 100644 --- a/packages/services/tokens/src/storage.ts +++ b/packages/services/tokens/src/storage.ts @@ -1,4 +1,4 @@ -import { createTokenStorage, createConnectionString, tokens } from '@hive/storage'; +import { createConnectionString, createTokenStorage, tokens } from '@hive/storage'; import type { FastifyReply } from 'fastify'; export interface StorageItem { diff --git a/packages/services/usage-common/src/compression.ts b/packages/services/usage-common/src/compression.ts index 2058a9596..9a57fbb28 100644 --- a/packages/services/usage-common/src/compression.ts +++ b/packages/services/usage-common/src/compression.ts @@ -1,4 +1,4 @@ -import { gzip, gunzip } from 'node:zlib'; +import { gunzip, gzip } from 'node:zlib'; export async function compress(data: string): Promise { return new Promise((resolve, reject) => { diff --git a/packages/services/usage-estimator/src/api.ts b/packages/services/usage-estimator/src/api.ts index 954f22ab2..70377cb65 100644 --- a/packages/services/usage-estimator/src/api.ts +++ b/packages/services/usage-estimator/src/api.ts @@ -1,7 +1,7 @@ import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server'; import { initTRPC } from '@trpc/server'; -import type { Estimator } from './estimator'; import { z } from 'zod'; +import type { Estimator } from './estimator'; const DATE_RANGE_VALIDATION = { startTime: z.string().nonempty(), diff --git a/packages/services/usage-estimator/src/estimator.ts b/packages/services/usage-estimator/src/estimator.ts index 0540a0bb6..eb5fb4f8e 100644 --- a/packages/services/usage-estimator/src/estimator.ts +++ b/packages/services/usage-estimator/src/estimator.ts @@ -1,5 +1,5 @@ +import { ClickHouse, HttpClient, OperationsReader } from '@hive/api'; import type { FastifyLoggerInstance } from '@hive/service-common'; -import { HttpClient, ClickHouse, OperationsReader } from '@hive/api'; export type Estimator = ReturnType; diff --git a/packages/services/usage-estimator/src/index.ts b/packages/services/usage-estimator/src/index.ts index 389826a4f..f020459c3 100644 --- a/packages/services/usage-estimator/src/index.ts +++ b/packages/services/usage-estimator/src/index.ts @@ -1,17 +1,17 @@ #!/usr/bin/env node import 'reflect-metadata'; -import * as Sentry from '@sentry/node'; import { createServer, - startMetrics, registerShutdown, reportReadiness, + startMetrics, } from '@hive/service-common'; -import { createEstimator } from './estimator'; +import * as Sentry from '@sentry/node'; import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import { usageEstimatorApiRouter } from './api'; -import { clickHouseElapsedDuration, clickHouseReadDuration } from './metrics'; import { env } from './environment'; +import { createEstimator } from './estimator'; +import { clickHouseElapsedDuration, clickHouseReadDuration } from './metrics'; async function main() { if (env.sentry) { diff --git a/packages/services/usage-ingestor/__tests__/serializer.spec.ts b/packages/services/usage-ingestor/__tests__/serializer.spec.ts index 62964fa52..cf8994bed 100644 --- a/packages/services/usage-ingestor/__tests__/serializer.spec.ts +++ b/packages/services/usage-ingestor/__tests__/serializer.spec.ts @@ -1,10 +1,10 @@ import { - stringifyOperation, - stringifyRegistryRecord, + formatDate, + joinIntoSingleMessage, stringifyLegacyOperation, stringifyLegacyRegistryRecord, - joinIntoSingleMessage, - formatDate, + stringifyOperation, + stringifyRegistryRecord, } from '../src/serializer'; const timestamp = { diff --git a/packages/services/usage-ingestor/src/index.ts b/packages/services/usage-ingestor/src/index.ts index dde0e9a6a..17ae59d33 100644 --- a/packages/services/usage-ingestor/src/index.ts +++ b/packages/services/usage-ingestor/src/index.ts @@ -1,14 +1,14 @@ #!/usr/bin/env node -import * as Sentry from '@sentry/node'; import { createServer, - startMetrics, registerShutdown, reportReadiness, startHeartbeats, + startMetrics, } from '@hive/service-common'; -import { createIngestor } from './ingestor'; +import * as Sentry from '@sentry/node'; import { env } from './environment'; +import { createIngestor } from './ingestor'; async function main() { if (env.sentry) { diff --git a/packages/services/usage-ingestor/src/ingestor.ts b/packages/services/usage-ingestor/src/ingestor.ts index 023081168..69d8706dd 100644 --- a/packages/services/usage-ingestor/src/ingestor.ts +++ b/packages/services/usage-ingestor/src/ingestor.ts @@ -1,20 +1,19 @@ -import { Kafka, KafkaMessage, logLevel } from 'kafkajs'; -import { decompress } from '@hive/usage-common'; -import { - errors, - processDuration, - reportMessageBytes, - ingestedOperationsWrites, - ingestedOperationsFailures, - ingestedOperationRegistryWrites, - ingestedOperationRegistryFailures, -} from './metrics'; -import { ClickHouseConfig, createWriter } from './writer'; -import { createProcessor } from './processor'; -import type { KafkaEnvironment } from './environment'; - import type { FastifyLoggerInstance } from '@hive/service-common'; import type { RawReport } from '@hive/usage-common'; +import { decompress } from '@hive/usage-common'; +import { Kafka, KafkaMessage, logLevel } from 'kafkajs'; +import type { KafkaEnvironment } from './environment'; +import { + errors, + ingestedOperationRegistryFailures, + ingestedOperationRegistryWrites, + ingestedOperationsFailures, + ingestedOperationsWrites, + processDuration, + reportMessageBytes, +} from './metrics'; +import { createProcessor } from './processor'; +import { ClickHouseConfig, createWriter } from './writer'; enum Status { Waiting, diff --git a/packages/services/usage-ingestor/src/processor.ts b/packages/services/usage-ingestor/src/processor.ts index bced24d6e..6210ae821 100644 --- a/packages/services/usage-ingestor/src/processor.ts +++ b/packages/services/usage-ingestor/src/processor.ts @@ -1,29 +1,12 @@ -import { normalizeOperation as coreNormalizeOperation } from '@graphql-hive/core'; -import { Kind, parse } from 'graphql'; -import LRU from 'tiny-lru'; import { createHash } from 'crypto'; -import { cache } from './helpers'; -import { - reportSize, - totalOperations, - reportMessageSize, - normalizeCacheMisses, - schemaCoordinatesSize, -} from './metrics'; -import { - stringifyOperation, - stringifyRegistryRecord, - stringifyLegacyOperation, - stringifyLegacyRegistryRecord, -} from './serializer'; - +import { normalizeOperation as coreNormalizeOperation } from '@graphql-hive/core'; import type { FastifyLoggerInstance } from '@hive/service-common'; import type { - RawReport, + ProcessedOperation, RawOperation, RawOperationMap, RawOperationMapRecord, - ProcessedOperation, + RawReport, } from '@hive/usage-common'; import type { DefinitionNode, @@ -31,6 +14,22 @@ import type { OperationDefinitionNode, OperationTypeNode, } from 'graphql'; +import { Kind, parse } from 'graphql'; +import LRU from 'tiny-lru'; +import { cache } from './helpers'; +import { + normalizeCacheMisses, + reportMessageSize, + reportSize, + schemaCoordinatesSize, + totalOperations, +} from './metrics'; +import { + stringifyLegacyOperation, + stringifyLegacyRegistryRecord, + stringifyOperation, + stringifyRegistryRecord, +} from './serializer'; interface NormalizationResult { type: OperationTypeNode; diff --git a/packages/services/usage-ingestor/src/serializer.ts b/packages/services/usage-ingestor/src/serializer.ts index cd8af3202..1c2e0345a 100644 --- a/packages/services/usage-ingestor/src/serializer.ts +++ b/packages/services/usage-ingestor/src/serializer.ts @@ -1,6 +1,6 @@ +import type { ProcessedOperation, ProcessedRegistryRecord } from '@hive/usage-common'; import LRU from 'tiny-lru'; import { cache } from './helpers'; -import type { ProcessedRegistryRecord, ProcessedOperation } from '@hive/usage-common'; const delimiter = '\n'; const formatter = Intl.DateTimeFormat('en-GB', { diff --git a/packages/services/usage-ingestor/src/writer.ts b/packages/services/usage-ingestor/src/writer.ts index 739879a3b..75fc7daeb 100644 --- a/packages/services/usage-ingestor/src/writer.ts +++ b/packages/services/usage-ingestor/src/writer.ts @@ -1,16 +1,16 @@ -import * as Sentry from '@sentry/node'; -import { got, Response as GotResponse } from 'got'; -import Agent from 'agentkeepalive'; import type { FastifyLoggerInstance } from '@hive/service-common'; import { compress } from '@hive/usage-common'; +import * as Sentry from '@sentry/node'; +import Agent from 'agentkeepalive'; +import { got, Response as GotResponse } from 'got'; +import { writeDuration } from './metrics'; import { - operationsOrder, - registryOrder, + joinIntoSingleMessage, legacyOperationsOrder, legacyRegistryOrder, - joinIntoSingleMessage, + operationsOrder, + registryOrder, } from './serializer'; -import { writeDuration } from './metrics'; function hasResponse(error: unknown): error is { response: GotResponse; diff --git a/packages/services/usage/__tests__/buffer.spec.ts b/packages/services/usage/__tests__/buffer.spec.ts index 05c578ab9..11de4c573 100644 --- a/packages/services/usage/__tests__/buffer.spec.ts +++ b/packages/services/usage/__tests__/buffer.spec.ts @@ -1,4 +1,4 @@ -import { createKVBuffer, calculateChunkSize } from '../src/buffer'; +import { calculateChunkSize, createKVBuffer } from '../src/buffer'; function waitFor(time: number) { return new Promise(resolve => setTimeout(resolve, time)); diff --git a/packages/services/usage/__tests__/usage.spec.ts b/packages/services/usage/__tests__/usage.spec.ts index 72f033843..2ed4f29ab 100644 --- a/packages/services/usage/__tests__/usage.spec.ts +++ b/packages/services/usage/__tests__/usage.spec.ts @@ -1,5 +1,5 @@ -import { splitReport } from '../src/usage'; import type { RawReport } from '@hive/usage-common'; +import { splitReport } from '../src/usage'; test('should split report based on operation map length', () => { const now = Date.now(); diff --git a/packages/services/usage/src/index.ts b/packages/services/usage/src/index.ts index addf24c42..51d3b0790 100644 --- a/packages/services/usage/src/index.ts +++ b/packages/services/usage/src/index.ts @@ -1,26 +1,26 @@ #!/usr/bin/env node -import * as Sentry from '@sentry/node'; import { createServer, - startMetrics, registerShutdown, reportReadiness, + startMetrics, } from '@hive/service-common'; -import { createTokens } from './tokens'; -import { createUsage } from './usage'; +import * as Sentry from '@sentry/node'; +import { env } from './environment'; +import { maskToken } from './helpers'; import { - httpRequests, - httpRequestsWithoutToken, - httpRequestsWithNonExistingToken, - httpRequestsWithNoAccess, collectDuration, droppedReports, + httpRequests, + httpRequestsWithNoAccess, + httpRequestsWithNonExistingToken, + httpRequestsWithoutToken, tokensDuration, } from './metrics'; -import type { IncomingLegacyReport, IncomingReport } from './types'; import { createUsageRateLimit } from './rate-limit'; -import { maskToken } from './helpers'; -import { env } from './environment'; +import { createTokens } from './tokens'; +import type { IncomingLegacyReport, IncomingReport } from './types'; +import { createUsage } from './usage'; async function main() { if (env.sentry) { diff --git a/packages/services/usage/src/rate-limit.ts b/packages/services/usage/src/rate-limit.ts index 220d3e11c..600802e5f 100644 --- a/packages/services/usage/src/rate-limit.ts +++ b/packages/services/usage/src/rate-limit.ts @@ -1,8 +1,8 @@ -import { FastifyLoggerInstance } from '@hive/service-common'; -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'; +import LRU from 'tiny-lru'; export function createUsageRateLimit(config: { endpoint: string | null; diff --git a/packages/services/usage/src/tokens.ts b/packages/services/usage/src/tokens.ts index 5da1a0156..70fd63262 100644 --- a/packages/services/usage/src/tokens.ts +++ b/packages/services/usage/src/tokens.ts @@ -1,9 +1,8 @@ import { FastifyLoggerInstance } from '@hive/service-common'; -import LRU from 'tiny-lru'; - import type { TokensApi } from '@hive/tokens'; import { createTRPCProxyClient, httpLink } from '@trpc/client'; import { fetch } from '@whatwg-node/fetch'; +import LRU from 'tiny-lru'; import { tokenCacheHits, tokenRequests } from './metrics'; export enum TokenStatus { diff --git a/packages/services/usage/src/usage.ts b/packages/services/usage/src/usage.ts index 8bdbbaab0..af49c0f72 100644 --- a/packages/services/usage/src/usage.ts +++ b/packages/services/usage/src/usage.ts @@ -1,26 +1,26 @@ -import { Kafka, CompressionTypes, logLevel, Partitioners } from 'kafkajs'; import { createHash, randomUUID } from 'crypto'; +import type { FastifyLoggerInstance } from '@hive/service-common'; +import type { RawOperationMap, RawReport } from '@hive/usage-common'; import { compress } from '@hive/usage-common'; +import { CompressionTypes, Kafka, logLevel, Partitioners } from 'kafkajs'; +import { calculateChunkSize, createKVBuffer, isBufferTooBigError } from './buffer'; +import type { KafkaEnvironment } from './environment'; import { - rawOperationWrites, + bufferFlushes, + compressDuration, + estimationError, + invalidRawOperations, + kafkaDuration, rawOperationFailures, rawOperationsSize, - invalidRawOperations, + rawOperationWrites, + totalLegacyReports, totalOperations, totalReports, - totalLegacyReports, - kafkaDuration, - compressDuration, - bufferFlushes, - estimationError, } from './metrics'; -import { createKVBuffer, calculateChunkSize, isBufferTooBigError } from './buffer'; -import { validateOperation, validateOperationMapRecord } from './validation'; -import type { FastifyLoggerInstance } from '@hive/service-common'; -import type { RawReport, RawOperationMap } from '@hive/usage-common'; -import type { IncomingReport, IncomingLegacyReport } from './types'; import type { TokensResponse } from './tokens'; -import type { KafkaEnvironment } from './environment'; +import type { IncomingLegacyReport, IncomingReport } from './types'; +import { validateOperation, validateOperationMapRecord } from './validation'; const DAY_IN_MS = 86_400_000; diff --git a/packages/services/usage/src/validation.ts b/packages/services/usage/src/validation.ts index aaa0feee8..471d2da7c 100644 --- a/packages/services/usage/src/validation.ts +++ b/packages/services/usage/src/validation.ts @@ -1,8 +1,8 @@ -import type { IncomingOperation, OperationMap, OperationMapRecord } from './types'; -import Ajv from 'ajv'; import type { JSONSchemaType } from 'ajv'; +import Ajv from 'ajv'; import { parse } from 'graphql'; import LRU from 'tiny-lru'; +import type { IncomingOperation, OperationMap, OperationMapRecord } from './types'; const unixTimestampRegex = /^\d{13,}$/; diff --git a/packages/services/webhooks/src/index.ts b/packages/services/webhooks/src/index.ts index 3faed7f59..a2e0cf252 100644 --- a/packages/services/webhooks/src/index.ts +++ b/packages/services/webhooks/src/index.ts @@ -1,19 +1,19 @@ #!/usr/bin/env node import { - createServer, createErrorHandler, - startMetrics, + createServer, registerShutdown, reportReadiness, startHeartbeats, + startMetrics, } from '@hive/service-common'; import * as Sentry from '@sentry/node'; -import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import type { CreateFastifyContextOptions } from '@trpc/server/adapters/fastify'; -import { createScheduler } from './scheduler'; +import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; import { webhooksApiRouter } from './api'; -import type { Context } from './types'; import { env } from './environment'; +import { createScheduler } from './scheduler'; +import type { Context } from './types'; async function main() { if (env.sentry) { diff --git a/packages/services/webhooks/src/jobs.ts b/packages/services/webhooks/src/jobs.ts index 3d7e99c19..2f3814f87 100644 --- a/packages/services/webhooks/src/jobs.ts +++ b/packages/services/webhooks/src/jobs.ts @@ -1,8 +1,8 @@ import { createHash } from 'crypto'; +import type { Job, Queue } from 'bullmq'; import { got } from 'got'; -import type { Queue, Job } from 'bullmq'; -import type { Config } from './types'; import type { WebhookInput } from './scheduler'; +import type { Config } from './types'; export async function scheduleWebhook({ queue, diff --git a/packages/services/webhooks/src/scheduler.ts b/packages/services/webhooks/src/scheduler.ts index cefa753cb..c0c812a34 100644 --- a/packages/services/webhooks/src/scheduler.ts +++ b/packages/services/webhooks/src/scheduler.ts @@ -1,9 +1,9 @@ import * as Sentry from '@sentry/node'; -import { Queue, QueueScheduler, Worker, Job } from 'bullmq'; +import { Job, Queue, QueueScheduler, Worker } from 'bullmq'; import Redis, { Redis as RedisInstance } from 'ioredis'; import pTimeout from 'p-timeout'; +import { createWebhookJob, scheduleWebhook } from './jobs'; import type { Config } from './types'; -import { scheduleWebhook, createWebhookJob } from './jobs'; export const clientCommandMessageReg = /ERR unknown command ['`]\s*client\s*['`]/; diff --git a/packages/web/app/environment.ts b/packages/web/app/environment.ts index 98e8bf291..9ccb8c75b 100644 --- a/packages/web/app/environment.ts +++ b/packages/web/app/environment.ts @@ -1,5 +1,5 @@ -import zod from 'zod'; import * as Sentry from '@sentry/nextjs'; +import zod from 'zod'; // treat an empty string (`''`) as undefined const emptyString = (input: T) => { diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/explorer.tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/explorer.tsx index c5b3df425..1ba6d4d9b 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/explorer.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/explorer.tsx @@ -1,6 +1,5 @@ import { ReactElement } from 'react'; import { gql, useQuery } from 'urql'; - import { authenticated } from '@/components/authenticated-container'; import { TargetLayout } from '@/components/layouts'; import { SchemaExplorerFilter } from '@/components/target/explorer/filter'; diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/explorer/[typename].tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/explorer/[typename].tsx index 7094e7778..57d30e101 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/explorer/[typename].tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/explorer/[typename].tsx @@ -1,6 +1,5 @@ import { ReactElement } from 'react'; import { DocumentType, gql, useQuery } from 'urql'; - import { authenticated } from '@/components/authenticated-container'; import { TargetLayout } from '@/components/layouts'; import { diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/history.tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/history.tsx index 348d59af9..43a61b5b4 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/history.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/history.tsx @@ -4,7 +4,6 @@ import clsx from 'clsx'; import { VscBug, VscDiff, VscListFlat } from 'react-icons/vsc'; import reactStringReplace from 'react-string-replace'; import { useQuery } from 'urql'; - import { authenticated } from '@/components/authenticated-container'; import { Label } from '@/components/common'; import { TargetLayout } from '@/components/layouts'; diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/index.tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/index.tsx index 762bea2b9..d2a3067f5 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/index.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/index.tsx @@ -12,7 +12,6 @@ import { import { VscClose } from 'react-icons/vsc'; import { gql, useMutation, useQuery } from 'urql'; import { useDebouncedCallback } from 'use-debounce'; - import { authenticated } from '@/components/authenticated-container'; import { TargetLayout } from '@/components/layouts'; import { MarkAsValid } from '@/components/target/history/MarkAsValid'; diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/laboratory.tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/laboratory.tsx index 790ad0115..748e39064 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/laboratory.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/laboratory.tsx @@ -1,7 +1,6 @@ import { ReactElement } from 'react'; import { createGraphiQLFetcher } from '@graphiql/toolkit'; import { GraphiQL } from 'graphiql'; - import { authenticated } from '@/components/authenticated-container'; import { TargetLayout } from '@/components/layouts'; import { Button, Title } from '@/components/v2'; diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/operations.tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/operations.tsx index 72bd53255..6b8bf155a 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/operations.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/operations.tsx @@ -1,11 +1,10 @@ +import 'twin.macro'; import { ComponentProps, ReactElement, useCallback, useMemo, useState } from 'react'; import { useRouter } from 'next/router'; -import 'twin.macro'; import { Select, Stack } from '@chakra-ui/react'; import { formatISO, subDays, subHours, subMinutes } from 'date-fns'; import { VscChevronDown } from 'react-icons/vsc'; import { useQuery } from 'urql'; - import { authenticated } from '@/components/authenticated-container'; import { TargetLayout } from '@/components/layouts'; import { OperationsFilterTrigger } from '@/components/target/operations/Filters'; diff --git a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/settings.tsx b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/settings.tsx index f46e0d0f7..3fd6370ae 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/[targetId]/settings.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/[targetId]/settings.tsx @@ -5,7 +5,6 @@ import { formatISO, subDays } from 'date-fns'; import { useFormik } from 'formik'; import { gql, useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - import { authenticated } from '@/components/authenticated-container'; import { TargetLayout } from '@/components/layouts'; import { SchemaEditor } from '@/components/schema-editor'; diff --git a/packages/web/app/pages/[orgId]/[projectId]/alerts.tsx b/packages/web/app/pages/[orgId]/[projectId]/alerts.tsx index 84f324ada..6c706f83d 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/alerts.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/alerts.tsx @@ -1,6 +1,5 @@ import { ReactElement, useState } from 'react'; import { useMutation, useQuery } from 'urql'; - import { authenticated } from '@/components/authenticated-container'; import { ProjectLayout } from '@/components/layouts'; import { Button, Card, Checkbox, Heading, Table, Tag, Title } from '@/components/v2'; diff --git a/packages/web/app/pages/[orgId]/[projectId]/index.tsx b/packages/web/app/pages/[orgId]/[projectId]/index.tsx index a348476cc..1b9dfaa82 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/index.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/index.tsx @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import NextLink from 'next/link'; import clsx from 'clsx'; import { useQuery } from 'urql'; - import { authenticated } from '@/components/authenticated-container'; import { ProjectLayout } from '@/components/layouts'; import { diff --git a/packages/web/app/pages/[orgId]/[projectId]/settings.tsx b/packages/web/app/pages/[orgId]/[projectId]/settings.tsx index f58eb4289..98a01e3c6 100644 --- a/packages/web/app/pages/[orgId]/[projectId]/settings.tsx +++ b/packages/web/app/pages/[orgId]/[projectId]/settings.tsx @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import { useFormik } from 'formik'; import { gql, useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - import { authenticated } from '@/components/authenticated-container'; import { ProjectLayout } from '@/components/layouts'; import { ExternalCompositionSettings } from '@/components/project/settings/external-composition'; diff --git a/packages/web/app/pages/[orgId]/_new.tsx b/packages/web/app/pages/[orgId]/_new.tsx index 71236c32e..f4d733dce 100644 --- a/packages/web/app/pages/[orgId]/_new.tsx +++ b/packages/web/app/pages/[orgId]/_new.tsx @@ -1,7 +1,6 @@ import { FC, useEffect, useRef, useState } from 'react'; import clsx from 'clsx'; import tw, { css, styled } from 'twin.macro'; - import { Button, Heading, HiveLink, Input, ProjectTypes, ShineBackground } from '@/components/v2'; import MembersPage from './members'; @@ -79,7 +78,7 @@ const NewPage: FC = () => {

CHOOSE PROJECT TYPE - + ); case 3: diff --git a/packages/web/app/pages/[orgId]/index.tsx b/packages/web/app/pages/[orgId]/index.tsx index 7970d36bd..151148bf0 100644 --- a/packages/web/app/pages/[orgId]/index.tsx +++ b/packages/web/app/pages/[orgId]/index.tsx @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import NextLink from 'next/link'; import { onlyText } from 'react-children-utilities'; import { useQuery } from 'urql'; - import { authenticated } from '@/components/authenticated-container'; import { OrganizationLayout } from '@/components/layouts'; import { diff --git a/packages/web/app/pages/[orgId]/members.tsx b/packages/web/app/pages/[orgId]/members.tsx index c603d5797..5b675472a 100644 --- a/packages/web/app/pages/[orgId]/members.tsx +++ b/packages/web/app/pages/[orgId]/members.tsx @@ -3,7 +3,6 @@ import { Tooltip } from '@chakra-ui/react'; import { useFormik } from 'formik'; import { DocumentType, gql, useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - import { authenticated } from '@/components/authenticated-container'; import { OrganizationLayout } from '@/components/layouts'; import { Avatar, Button, Card, Checkbox, DropdownMenu, Input, Title } from '@/components/v2'; diff --git a/packages/web/app/pages/[orgId]/settings.tsx b/packages/web/app/pages/[orgId]/settings.tsx index a56c68a11..40899b682 100644 --- a/packages/web/app/pages/[orgId]/settings.tsx +++ b/packages/web/app/pages/[orgId]/settings.tsx @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import { useFormik } from 'formik'; import { gql, useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - import { authenticated } from '@/components/authenticated-container'; import { OrganizationLayout } from '@/components/layouts'; import { OIDCIntegrationSection } from '@/components/organization/settings/oidc-integration-section'; diff --git a/packages/web/app/pages/[orgId]/subscription/index.tsx b/packages/web/app/pages/[orgId]/subscription/index.tsx index 425329798..2d7d24bfd 100644 --- a/packages/web/app/pages/[orgId]/subscription/index.tsx +++ b/packages/web/app/pages/[orgId]/subscription/index.tsx @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import dynamic from 'next/dynamic'; import { Stat, StatHelpText, StatLabel, StatNumber } from '@chakra-ui/react'; import { endOfMonth, startOfMonth } from 'date-fns'; - import { authenticated } from '@/components/authenticated-container'; import { OrganizationLayout } from '@/components/layouts'; import { BillingView } from '@/components/organization/billing/Billing'; diff --git a/packages/web/app/pages/[orgId]/subscription/manage.tsx b/packages/web/app/pages/[orgId]/subscription/manage.tsx index 6fa31ba12..ae58fda83 100644 --- a/packages/web/app/pages/[orgId]/subscription/manage.tsx +++ b/packages/web/app/pages/[orgId]/subscription/manage.tsx @@ -1,9 +1,8 @@ -import { ReactElement, useCallback, useEffect, useRef, useState } from 'react'; import 'twin.macro'; +import { ReactElement, useCallback, useEffect, useRef, useState } from 'react'; import { Stat, StatHelpText, StatLabel, StatNumber } from '@chakra-ui/react'; import { CardElement, useElements, useStripe } from '@stripe/react-stripe-js'; import { useMutation, useQuery } from 'urql'; - import { authenticated } from '@/components/authenticated-container'; import { Section } from '@/components/common'; import { DataWrapper, QueryError } from '@/components/common/DataWrapper'; diff --git a/packages/web/app/pages/_app.tsx b/packages/web/app/pages/_app.tsx index 4876927d7..3a2fe2a03 100644 --- a/packages/web/app/pages/_app.tsx +++ b/packages/web/app/pages/_app.tsx @@ -1,23 +1,23 @@ import { ReactElement, useEffect } from 'react'; import { AppProps } from 'next/app'; -import Script from 'next/script'; import Router from 'next/router'; +import Script from 'next/script'; import { ChakraProvider, extendTheme } from '@chakra-ui/react'; +import { configureScope } from '@sentry/nextjs'; +import * as Sentry from '@sentry/react'; +import cookies from 'js-cookie'; +import SuperTokens, { SuperTokensWrapper } from 'supertokens-auth-react'; +import Session from 'supertokens-auth-react/recipe/session'; +import { Provider as UrqlProvider } from 'urql'; import GlobalStylesComponent from '@/components/common/GlobalStyles'; +import { LoadingAPIIndicator } from '@/components/common/LoadingAPI'; +import { frontendConfig } from '@/config/supertokens/frontend'; +import { LAST_VISITED_ORG_KEY } from '@/constants'; +import { env } from '@/env/frontend'; import * as gtag from '@/lib/gtag'; import { colors } from '@/lib/theme'; -import { LoadingAPIIndicator } from '@/components/common/LoadingAPI'; -import '../public/styles.css'; -import cookies from 'js-cookie'; -import Session from 'supertokens-auth-react/recipe/session'; -import SuperTokens, { SuperTokensWrapper } from 'supertokens-auth-react'; -import { frontendConfig } from '@/config/supertokens/frontend'; -import { configureScope } from '@sentry/nextjs'; -import { LAST_VISITED_ORG_KEY } from '@/constants'; -import { Provider as UrqlProvider } from 'urql'; import { urqlClient } from '@/lib/urql'; -import { env } from '@/env/frontend'; -import * as Sentry from '@sentry/react'; +import '../public/styles.css'; const theme = extendTheme({ colors }); diff --git a/packages/web/app/pages/_document.tsx b/packages/web/app/pages/_document.tsx index ac2784a54..5de953f0f 100644 --- a/packages/web/app/pages/_document.tsx +++ b/packages/web/app/pages/_document.tsx @@ -1,8 +1,8 @@ import 'regenerator-runtime/runtime'; -import Document, { Html, Head, Main, NextScript, DocumentContext } from 'next/document'; -import { extractCritical } from '@emotion/server'; // don't remove this import ; it will break the built app ; but not the dev app :) import '@/config/frontend-env'; +import Document, { DocumentContext, Head, Html, Main, NextScript } from 'next/document'; +import { extractCritical } from '@emotion/server'; export default class MyDocument extends Document<{ ids: Array; diff --git a/packages/web/app/pages/_error.tsx b/packages/web/app/pages/_error.tsx index 619a4cf18..f6ccfd204 100644 --- a/packages/web/app/pages/_error.tsx +++ b/packages/web/app/pages/_error.tsx @@ -1,6 +1,6 @@ import NextErrorComponent from 'next/error'; -import type { NextPageContext } from 'next'; import * as Sentry from '@sentry/nextjs'; +import type { NextPageContext } from 'next'; const MyError = ({ statusCode, diff --git a/packages/web/app/pages/_index.tsx b/packages/web/app/pages/_index.tsx index ff0bff247..0118c0fc3 100644 --- a/packages/web/app/pages/_index.tsx +++ b/packages/web/app/pages/_index.tsx @@ -1,6 +1,5 @@ import { FC, useState } from 'react'; import clsx from 'clsx'; - import { Button, Heading, HiveLink, Input, Link, ShineBackground } from '@/components/v2'; import { GitHubIcon, GoogleIcon, LinkedInIcon } from '@/components/v2/icon'; diff --git a/packages/web/app/pages/action/transfer/[orgId]/[code].tsx b/packages/web/app/pages/action/transfer/[orgId]/[code].tsx index d2e8b32e7..e27487b22 100644 --- a/packages/web/app/pages/action/transfer/[orgId]/[code].tsx +++ b/packages/web/app/pages/action/transfer/[orgId]/[code].tsx @@ -1,12 +1,12 @@ import * as React from 'react'; -import tw from 'twin.macro'; import { Button } from '@chakra-ui/react'; -import { gql, useQuery, useMutation } from 'urql'; -import { useRouteSelector } from '@/lib/hooks/use-route-selector'; +import tw from 'twin.macro'; +import { gql, useMutation, useQuery } from 'urql'; +import { authenticated } from '@/components/authenticated-container'; import { Title } from '@/components/common'; import { DataWrapper } from '@/components/common/DataWrapper'; import { useNotifications } from '@/lib/hooks/use-notifications'; -import { authenticated } from '@/components/authenticated-container'; +import { useRouteSelector } from '@/lib/hooks/use-route-selector'; import { withSessionProtection } from '@/lib/supertokens/guard'; const Center = tw.div`w-full h-full flex flex-row items-center justify-center`; diff --git a/packages/web/app/pages/api/auth/[[...path]].ts b/packages/web/app/pages/api/auth/[[...path]].ts index 4e35315d6..3f631e107 100644 --- a/packages/web/app/pages/api/auth/[[...path]].ts +++ b/packages/web/app/pages/api/auth/[[...path]].ts @@ -1,10 +1,10 @@ -import { superTokensNextWrapper } from 'supertokens-node/nextjs'; -import { middleware } from 'supertokens-node/framework/express'; import { NextApiRequest, NextApiResponse } from 'next'; import { Request, Response } from 'express'; -import supertokens from 'supertokens-node'; -import { backendConfig } from '@/config/supertokens/backend'; import NextCors from 'nextjs-cors'; +import supertokens from 'supertokens-node'; +import { middleware } from 'supertokens-node/framework/express'; +import { superTokensNextWrapper } from 'supertokens-node/nextjs'; +import { backendConfig } from '@/config/supertokens/backend'; import { env } from '@/env/backend'; supertokens.init(backendConfig()); diff --git a/packages/web/app/pages/api/github/callback.ts b/packages/web/app/pages/api/github/callback.ts index dcb599099..79f752918 100644 --- a/packages/web/app/pages/api/github/callback.ts +++ b/packages/web/app/pages/api/github/callback.ts @@ -1,6 +1,6 @@ import { NextApiRequest, NextApiResponse } from 'next'; -import { graphql } from '@/lib/api/utils'; import { env } from '@/env/backend'; +import { graphql } from '@/lib/api/utils'; export async function ensureGithubIntegration( req: NextApiRequest, diff --git a/packages/web/app/pages/api/github/setup-callback.ts b/packages/web/app/pages/api/github/setup-callback.ts index ee41aef5d..a93df9325 100644 --- a/packages/web/app/pages/api/github/setup-callback.ts +++ b/packages/web/app/pages/api/github/setup-callback.ts @@ -1,7 +1,7 @@ import { NextApiRequest, NextApiResponse } from 'next'; +import { env } from '@/env/backend'; import { graphql } from '@/lib/api/utils'; import { ensureGithubIntegration } from './callback'; -import { env } from '@/env/backend'; export default async function githubSetupCallback(req: NextApiRequest, res: NextApiResponse) { console.log('GitHub Integration Setup Callback'); diff --git a/packages/web/app/pages/api/lab/[...lab].ts b/packages/web/app/pages/api/lab/[...lab].ts index ed64b74a1..ff4554b2a 100644 --- a/packages/web/app/pages/api/lab/[...lab].ts +++ b/packages/web/app/pages/api/lab/[...lab].ts @@ -1,8 +1,8 @@ import { NextApiRequest, NextApiResponse } from 'next'; -import { buildSchema, execute, GraphQLError, parse } from 'graphql'; import { addMocksToSchema } from '@graphql-tools/mock'; -import { extractAccessTokenFromRequest } from '@/lib/api/extract-access-token-from-request'; +import { buildSchema, execute, GraphQLError, parse } from 'graphql'; import { env } from '@/env/backend'; +import { extractAccessTokenFromRequest } from '@/lib/api/extract-access-token-from-request'; async function lab(req: NextApiRequest, res: NextApiResponse) { const url = env.graphqlEndpoint; diff --git a/packages/web/app/pages/api/proxy.ts b/packages/web/app/pages/api/proxy.ts index 59ca1bf9a..b20e21bb1 100644 --- a/packages/web/app/pages/api/proxy.ts +++ b/packages/web/app/pages/api/proxy.ts @@ -2,8 +2,8 @@ import { NextApiRequest, NextApiResponse } from 'next'; import { captureException, startTransaction } from '@sentry/nextjs'; import type { Transaction } from '@sentry/types'; import hyperid from 'hyperid'; -import { extractAccessTokenFromRequest } from '@/lib/api/extract-access-token-from-request'; import { env } from '@/env/backend'; +import { extractAccessTokenFromRequest } from '@/lib/api/extract-access-token-from-request'; const reqIdGenerate = hyperid({ fixedLength: true }); diff --git a/packages/web/app/pages/api/slack/callback.ts b/packages/web/app/pages/api/slack/callback.ts index 840706992..c1c6d8327 100644 --- a/packages/web/app/pages/api/slack/callback.ts +++ b/packages/web/app/pages/api/slack/callback.ts @@ -1,7 +1,7 @@ -import { NextApiRequest, NextApiResponse } from 'next'; import { stringify } from 'querystring'; -import { graphql } from '@/lib/api/utils'; +import { NextApiRequest, NextApiResponse } from 'next'; import { env } from '@/env/backend'; +import { graphql } from '@/lib/api/utils'; async function fetchData({ url, diff --git a/packages/web/app/pages/auth/[[...path]].tsx b/packages/web/app/pages/auth/[[...path]].tsx index c39b22fab..1a40b3078 100644 --- a/packages/web/app/pages/auth/[[...path]].tsx +++ b/packages/web/app/pages/auth/[[...path]].tsx @@ -1,10 +1,10 @@ -import React from 'react'; -import Head from 'next/head'; import 'twin.macro'; -import { FullLogo } from '@/components/common/Logo'; +import React from 'react'; import dynamic from 'next/dynamic'; +import Head from 'next/head'; import type { GetServerSideProps } from 'next'; import SuperTokensReact from 'supertokens-auth-react'; +import { FullLogo } from '@/components/common/Logo'; import { env } from '@/env/frontend'; import { startAuthFlowForProvider } from '@/lib/supertokens/start-auth-flow-for-provider'; import { startAuthFlowForOIDCProvider } from '@/lib/supertokens/third-party-email-password-react-oidc-provider'; diff --git a/packages/web/app/pages/dev.tsx b/packages/web/app/pages/dev.tsx index 9f1f385ba..d520610d6 100644 --- a/packages/web/app/pages/dev.tsx +++ b/packages/web/app/pages/dev.tsx @@ -1,6 +1,6 @@ import { ReactElement } from 'react'; -import { GraphiQL } from 'graphiql'; import { createGraphiQLFetcher } from '@graphiql/toolkit'; +import { GraphiQL } from 'graphiql'; import { HiveLogo } from '@/components/v2/icon'; import 'graphiql/graphiql.css'; diff --git a/packages/web/app/pages/index.tsx b/packages/web/app/pages/index.tsx index ff6576eea..d358028aa 100644 --- a/packages/web/app/pages/index.tsx +++ b/packages/web/app/pages/index.tsx @@ -1,19 +1,19 @@ -import { useEffect, ReactElement } from 'react'; +import { ReactElement, useEffect } from 'react'; +import { NextApiRequest, NextApiResponse } from 'next'; +import type { InternalApi } from '@hive/server'; +import { createTRPCProxyClient, httpLink } from '@trpc/client'; +import Cookies from 'cookies'; +import Session from 'supertokens-node/recipe/session'; import { useQuery } from 'urql'; -import { OrganizationsDocument, OrganizationType } from '@/graphql'; +import { authenticated } from '@/components/authenticated-container'; import { Title } from '@/components/common'; import { DataWrapper } from '@/components/common/DataWrapper'; -import { useRouteSelector } from '@/lib/hooks/use-route-selector'; -import Cookies from 'cookies'; import { LAST_VISITED_ORG_KEY } from '@/constants'; -import { authenticated } from '@/components/authenticated-container'; -import { withSessionProtection } from '@/lib/supertokens/guard'; -import { createTRPCProxyClient, httpLink } from '@trpc/client'; -import type { InternalApi } from '@hive/server'; import { env } from '@/env/backend'; -import { NextApiRequest, NextApiResponse } from 'next'; -import Session from 'supertokens-node/recipe/session'; +import { OrganizationsDocument, OrganizationType } from '@/graphql'; import { writeLastVisitedOrganization } from '@/lib/cookies'; +import { useRouteSelector } from '@/lib/hooks/use-route-selector'; +import { withSessionProtection } from '@/lib/supertokens/guard'; async function getSuperTokensUserIdFromRequest( req: NextApiRequest, diff --git a/packages/web/app/pages/join/[inviteCode].tsx b/packages/web/app/pages/join/[inviteCode].tsx index a51868219..085ffa179 100644 --- a/packages/web/app/pages/join/[inviteCode].tsx +++ b/packages/web/app/pages/join/[inviteCode].tsx @@ -1,13 +1,13 @@ import * as React from 'react'; -import tw from 'twin.macro'; -import { useRouteSelector } from '@/lib/hooks/use-route-selector'; -import { useQuery, useMutation } from 'urql'; -import { OrganizationInvitationDocument, JoinOrganizationDocument } from '@/graphql'; import { Button } from '@chakra-ui/react'; +import tw from 'twin.macro'; +import { useMutation, useQuery } from 'urql'; +import { authenticated } from '@/components/authenticated-container'; import { Title } from '@/components/common'; import { DataWrapper } from '@/components/common/DataWrapper'; +import { JoinOrganizationDocument, OrganizationInvitationDocument } from '@/graphql'; import { useNotifications } from '@/lib/hooks/use-notifications'; -import { authenticated } from '@/components/authenticated-container'; +import { useRouteSelector } from '@/lib/hooks/use-route-selector'; import { withSessionProtection } from '@/lib/supertokens/guard'; const Center = tw.div`w-full h-full flex flex-row items-center justify-center`; diff --git a/packages/web/app/pages/logout.tsx b/packages/web/app/pages/logout.tsx index dd35ce5c0..27feb3186 100644 --- a/packages/web/app/pages/logout.tsx +++ b/packages/web/app/pages/logout.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { signOut } from 'supertokens-auth-react/recipe/thirdpartyemailpassword'; import { useRouter } from 'next/router'; +import { signOut } from 'supertokens-auth-react/recipe/thirdpartyemailpassword'; export function getServerSideProps() { return { diff --git a/packages/web/app/pages/manage/index.tsx b/packages/web/app/pages/manage/index.tsx index 2afe13546..c0faa39c8 100644 --- a/packages/web/app/pages/manage/index.tsx +++ b/packages/web/app/pages/manage/index.tsx @@ -1,14 +1,14 @@ -import React from 'react'; import 'twin.macro'; -import { Select, CheckboxGroup, Checkbox, Tooltip } from '@chakra-ui/react'; -import { VscChevronDown } from 'react-icons/vsc'; +import React from 'react'; +import { Checkbox, CheckboxGroup, Select, Tooltip } from '@chakra-ui/react'; import startOfMonth from 'date-fns/startOfMonth'; import subDays from 'date-fns/subDays'; import subHours from 'date-fns/subHours'; +import { VscChevronDown } from 'react-icons/vsc'; import { AdminStats, Filters } from '@/components/admin/AdminStats'; +import { authenticated } from '@/components/authenticated-container'; import { Page } from '@/components/common'; import { DATE_RANGE_OPTIONS, floorToMinute } from '@/components/common/TimeFilter'; -import { authenticated } from '@/components/authenticated-container'; import { withSessionProtection } from '@/lib/supertokens/guard'; type DateRangeOptions = Exclude< diff --git a/packages/web/app/pages/settings.tsx b/packages/web/app/pages/settings.tsx index 8829f38c0..29d6c10eb 100644 --- a/packages/web/app/pages/settings.tsx +++ b/packages/web/app/pages/settings.tsx @@ -1,10 +1,9 @@ import { useFormik } from 'formik'; import { gql, useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - -import { Avatar, Button, SubHeader, Heading, Input, Tabs, Title } from '@/components/v2'; -import { MeDocument } from '@/graphql'; import { authenticated } from '@/components/authenticated-container'; +import { Avatar, Button, Heading, Input, SubHeader, Tabs, Title } from '@/components/v2'; +import { MeDocument } from '@/graphql'; import { withSessionProtection } from '@/lib/supertokens/guard'; const UpdateMeMutation = gql(/* GraphQL */ ` diff --git a/packages/web/app/src/components/admin/AdminStats.tsx b/packages/web/app/src/components/admin/AdminStats.tsx index 10ecf60d1..0a7a94a74 100644 --- a/packages/web/app/src/components/admin/AdminStats.tsx +++ b/packages/web/app/src/components/admin/AdminStats.tsx @@ -1,40 +1,40 @@ import 'twin.macro'; import React, { PropsWithChildren, ReactNode } from 'react'; import { - Table, - Thead, - Tbody, - Th, - Tr, - Td, + Button, Flex, - StatGroup, + IconButton, Stat, + StatGroup, StatLabel, StatNumber, - Button, - IconButton, + Table, + Tbody, + Td, + Th, + Thead, + Tr, } from '@chakra-ui/react'; -import ReactECharts from 'echarts-for-react'; -import AutoSizer from 'react-virtualized-auto-sizer'; import { createTable, - useTableInstance, getCoreRowModel, - getSortedRowModel, getPaginationRowModel, - SortingState, + getSortedRowModel, PaginationState, - TableInstance as OriginalTableInstance, + SortingState, Table as OriginalTable, + TableInstance as OriginalTableInstance, + useTableInstance, } from '@tanstack/react-table'; -import { DocumentType, gql, useQuery } from 'urql'; import { formatISO } from 'date-fns'; -import { VscChevronUp, VscChevronDown, VscChevronLeft, VscChevronRight } from 'react-icons/vsc'; +import ReactECharts from 'echarts-for-react'; +import { VscChevronDown, VscChevronLeft, VscChevronRight, VscChevronUp } from 'react-icons/vsc'; +import AutoSizer from 'react-virtualized-auto-sizer'; +import { DocumentType, gql, useQuery } from 'urql'; import { DataWrapper } from '@/components/common/DataWrapper'; -import { theme } from '@/lib/charts'; -import { OrganizationType } from '@/graphql'; import { env } from '@/env/frontend'; +import { OrganizationType } from '@/graphql'; +import { theme } from '@/lib/charts'; interface Organization { name: React.ReactElement; diff --git a/packages/web/app/src/components/authenticated-container.tsx b/packages/web/app/src/components/authenticated-container.tsx index f8f2c7e8b..8bd3cb1f0 100644 --- a/packages/web/app/src/components/authenticated-container.tsx +++ b/packages/web/app/src/components/authenticated-container.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import type { ReactNode } from 'react'; -import { Header } from './v2'; -import { HiveStripeWrapper } from '@/lib/billing/stripe'; -import Session, { SessionAuth } from 'supertokens-auth-react/recipe/session'; import { useRouter } from 'next/router'; +import type { ReactNode } from 'react'; +import Session, { SessionAuth } from 'supertokens-auth-react/recipe/session'; +import { HiveStripeWrapper } from '@/lib/billing/stripe'; +import { Header } from './v2'; /** * Wrapper component for a authenticated route. diff --git a/packages/web/app/src/components/common/DataWrapper.tsx b/packages/web/app/src/components/common/DataWrapper.tsx index d9bf1c7f5..e8b65980b 100644 --- a/packages/web/app/src/components/common/DataWrapper.tsx +++ b/packages/web/app/src/components/common/DataWrapper.tsx @@ -1,15 +1,15 @@ import React from 'react'; -import { CombinedError, UseQueryState } from 'urql'; import { - Box, - AlertDescription, - Center, Alert, - Code, + AlertDescription, AlertIcon, - Link, AlertTitle, + Box, + Center, + Code, + Link, } from '@chakra-ui/react'; +import { CombinedError, UseQueryState } from 'urql'; import { Spinner } from './Spinner'; export const QueryError: React.FC<{ diff --git a/packages/web/app/src/components/common/Feedback.tsx b/packages/web/app/src/components/common/Feedback.tsx index 87c48d482..5b60e4696 100644 --- a/packages/web/app/src/components/common/Feedback.tsx +++ b/packages/web/app/src/components/common/Feedback.tsx @@ -1,25 +1,25 @@ -import * as React from 'react'; import 'twin.macro'; -import { useMutation } from 'urql'; -import { useFormik } from 'formik'; -import * as Yup from 'yup'; +import * as React from 'react'; import { + Alert, + AlertDescription, + AlertIcon, + AlertTitle, Button, FormControl, FormErrorMessage, - Textarea, - Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalFooter, - ModalBody, FormLabel, - Alert, - AlertIcon, - AlertTitle, - AlertDescription, + Modal, + ModalBody, + ModalContent, + ModalFooter, + ModalHeader, + ModalOverlay, + Textarea, } from '@chakra-ui/react'; +import { useFormik } from 'formik'; +import { useMutation } from 'urql'; +import * as Yup from 'yup'; import { SendFeedbackDocument } from '@/graphql'; export const Feedback: React.FC<{ diff --git a/packages/web/app/src/components/common/GlobalStyles.tsx b/packages/web/app/src/components/common/GlobalStyles.tsx index 412c1cec2..27b73f8d0 100644 --- a/packages/web/app/src/components/common/GlobalStyles.tsx +++ b/packages/web/app/src/components/common/GlobalStyles.tsx @@ -1,6 +1,6 @@ import { ReactElement } from 'react'; +import { css, Global } from '@emotion/react'; import tw, { GlobalStyles } from 'twin.macro'; -import { Global, css } from '@emotion/react'; const customStyles = css` *:active, diff --git a/packages/web/app/src/components/common/GraphQLSDLBlock.tsx b/packages/web/app/src/components/common/GraphQLSDLBlock.tsx index d63ba5df4..7ed1edd1e 100644 --- a/packages/web/app/src/components/common/GraphQLSDLBlock.tsx +++ b/packages/web/app/src/components/common/GraphQLSDLBlock.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { parse, print } from 'graphql'; import { useColorModeValue } from '@chakra-ui/react'; +import { parse, print } from 'graphql'; import { SchemaEditor, SchemaEditorProps } from '@/components/schema-editor'; function prettify(sdl: string) { diff --git a/packages/web/app/src/components/common/LoadingAPI.tsx b/packages/web/app/src/components/common/LoadingAPI.tsx index 2170159d2..3945bdfa5 100644 --- a/packages/web/app/src/components/common/LoadingAPI.tsx +++ b/packages/web/app/src/components/common/LoadingAPI.tsx @@ -1,5 +1,5 @@ -import { Progress } from '@chakra-ui/react'; import React from 'react'; +import { Progress } from '@chakra-ui/react'; import { useInflightRequests } from '@/lib/urql-exchanges/state'; export const LoadingAPIIndicator = React.memo(() => { diff --git a/packages/web/app/src/components/common/Navigation.tsx b/packages/web/app/src/components/common/Navigation.tsx index 2f9260d29..149ee7742 100644 --- a/packages/web/app/src/components/common/Navigation.tsx +++ b/packages/web/app/src/components/common/Navigation.tsx @@ -1,28 +1,28 @@ +import 'twin.macro'; import * as React from 'react'; import Link from 'next/link'; -import 'twin.macro'; import { Button, + Divider, + Link as ChakraLink, Menu, MenuButton, - MenuList, MenuItem, - Link as ChakraLink, - Divider, - useDisclosure, + MenuList, useColorModeValue, + useDisclosure, } from '@chakra-ui/react'; import { useQuery } from 'urql'; +import { env } from '@/env/frontend'; import { MeDocument } from '@/graphql'; +import { getDocsUrl } from '@/lib/docs-url'; import { OrganizationSwitcher } from '../organization/Switcher'; import { ProjectSwitcher } from '../project/Switcher'; import { TargetSwitcher } from '../target/Switcher'; -import { Logo } from './Logo'; import { Feedback } from './Feedback'; -import { UserSettings } from './UserSettings'; +import { Logo } from './Logo'; import ThemeButton from './ThemeButton'; -import { getDocsUrl } from '@/lib/docs-url'; -import { env } from '@/env/frontend'; +import { UserSettings } from './UserSettings'; export interface NavigationItem { label: string; diff --git a/packages/web/app/src/components/common/Page.tsx b/packages/web/app/src/components/common/Page.tsx index 2f817858a..2ebc90933 100644 --- a/packages/web/app/src/components/common/Page.tsx +++ b/packages/web/app/src/components/common/Page.tsx @@ -1,10 +1,10 @@ import React, { PropsWithChildren, ReactElement } from 'react'; -import tw, { styled } from 'twin.macro'; import Link from 'next/link'; import { FiTarget } from 'react-icons/fi'; -import { VscOrganization, VscFolder } from 'react-icons/vsc'; -import { useNavigation, Navigation, NavigationItem } from './Navigation'; +import { VscFolder, VscOrganization } from 'react-icons/vsc'; +import tw, { styled } from 'twin.macro'; import { useRouteSelector } from '@/lib/hooks'; +import { Navigation, NavigationItem, useNavigation } from './Navigation'; const PageContainer = tw.div`flex flex-col flex-1 overflow-y-auto relative`; diff --git a/packages/web/app/src/components/common/Spinner.tsx b/packages/web/app/src/components/common/Spinner.tsx index 01f86839c..5aaeef33e 100644 --- a/packages/web/app/src/components/common/Spinner.tsx +++ b/packages/web/app/src/components/common/Spinner.tsx @@ -1,6 +1,6 @@ +import 'twin.macro'; import React from 'react'; import { Spinner as CSpinner } from '@chakra-ui/react'; -import 'twin.macro'; export const Spinner = () => (
diff --git a/packages/web/app/src/components/common/ThemeButton.tsx b/packages/web/app/src/components/common/ThemeButton.tsx index f25eb4ca3..25c1d4647 100644 --- a/packages/web/app/src/components/common/ThemeButton.tsx +++ b/packages/web/app/src/components/common/ThemeButton.tsx @@ -1,5 +1,5 @@ -import { useColorMode, Button } from '@chakra-ui/react'; -import { FiSun, FiMoon } from 'react-icons/fi'; +import { Button, useColorMode } from '@chakra-ui/react'; +import { FiMoon, FiSun } from 'react-icons/fi'; const ThemeButton = () => { const { colorMode, toggleColorMode } = useColorMode(); diff --git a/packages/web/app/src/components/common/UserSettings.tsx b/packages/web/app/src/components/common/UserSettings.tsx index 9c96c0fb7..28082094d 100644 --- a/packages/web/app/src/components/common/UserSettings.tsx +++ b/packages/web/app/src/components/common/UserSettings.tsx @@ -1,21 +1,21 @@ -import * as React from 'react'; import 'twin.macro'; -import { DocumentType, gql, useMutation } from 'urql'; -import { useFormik } from 'formik'; -import * as Yup from 'yup'; +import * as React from 'react'; import { Button, FormControl, FormErrorMessage, + FormLabel, Input, Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalFooter, ModalBody, - FormLabel, + ModalContent, + ModalFooter, + ModalHeader, + ModalOverlay, } from '@chakra-ui/react'; +import { useFormik } from 'formik'; +import { DocumentType, gql, useMutation } from 'urql'; +import * as Yup from 'yup'; const UpdateMeFragment = gql(/* GraphQL */ ` fragment UpdateMeFragment on User { diff --git a/packages/web/app/src/components/common/index.tsx b/packages/web/app/src/components/common/index.tsx index a2279d69a..9c9b94a5f 100644 --- a/packages/web/app/src/components/common/index.tsx +++ b/packages/web/app/src/components/common/index.tsx @@ -1,6 +1,6 @@ import React, { PropsWithChildren } from 'react'; -import tw, { styled } from 'twin.macro'; import Head from 'next/head'; +import tw, { styled } from 'twin.macro'; export const Title: React.FC<{ title: string }> = ({ title }) => ( diff --git a/packages/web/app/src/components/get-started/wizard.tsx b/packages/web/app/src/components/get-started/wizard.tsx index 4eaba4db3..bb15b7900 100644 --- a/packages/web/app/src/components/get-started/wizard.tsx +++ b/packages/web/app/src/components/get-started/wizard.tsx @@ -1,17 +1,17 @@ import React from 'react'; -import { VscIssues, VscError } from 'react-icons/vsc'; import { - useDisclosure, Drawer, DrawerBody, + DrawerCloseButton, + DrawerContent, DrawerHeader, DrawerOverlay, - DrawerContent, - DrawerCloseButton, + useDisclosure, } from '@chakra-ui/react'; import clsx from 'clsx'; +import { VscError, VscIssues } from 'react-icons/vsc'; +import { DocumentType, gql } from 'urql'; import { OrganizationType } from '@/graphql'; -import { gql, DocumentType } from 'urql'; import { getDocsUrl } from '@/lib/docs-url'; const GetStartedWizard_GetStartedProgress = gql(/* GraphQL */ ` diff --git a/packages/web/app/src/components/layouts/organization.tsx b/packages/web/app/src/components/layouts/organization.tsx index 098f64ab1..7d161871c 100644 --- a/packages/web/app/src/components/layouts/organization.tsx +++ b/packages/web/app/src/components/layouts/organization.tsx @@ -1,27 +1,26 @@ import { ReactElement, ReactNode, useEffect } from 'react'; -import { useRouter } from 'next/router'; -import { useQuery } from 'urql'; import NextLink from 'next/link'; - -import { Button, Heading, Tabs, SubHeader } from '@/components/v2'; +import { useRouter } from 'next/router'; +import cookies from 'js-cookie'; +import { useQuery } from 'urql'; +import { Button, Heading, SubHeader, Tabs } from '@/components/v2'; import { PlusIcon } from '@/components/v2/icon'; import { CreateProjectModal } from '@/components/v2/modals'; +import { LAST_VISITED_ORG_KEY } from '@/constants'; import { OrganizationDocument, - OrganizationType, OrganizationFieldsFragment, + OrganizationType, OrgBillingInfoFieldsFragment, OrgRateLimitFieldsFragment, } from '@/graphql'; -import { useRouteSelector, useToggle } from '@/lib/hooks'; import { canAccessOrganization, OrganizationAccessScope, useOrganizationAccess, } from '@/lib/access/organization'; -import cookies from 'js-cookie'; -import { LAST_VISITED_ORG_KEY } from '@/constants'; import { getIsStripeEnabled } from '@/lib/billing/stripe-public-key'; +import { useRouteSelector, useToggle } from '@/lib/hooks'; enum TabValue { Overview = 'overview', diff --git a/packages/web/app/src/components/layouts/project.tsx b/packages/web/app/src/components/layouts/project.tsx index b4c1e73a9..22e44a9cb 100644 --- a/packages/web/app/src/components/layouts/project.tsx +++ b/packages/web/app/src/components/layouts/project.tsx @@ -1,19 +1,18 @@ +import 'twin.macro'; import { ReactElement, ReactNode, useEffect } from 'react'; import NextLink from 'next/link'; -import 'twin.macro'; import { useQuery } from 'urql'; - -import { Button, DropdownMenu, Heading, Link, Tabs, SubHeader } from '@/components/v2'; +import { Button, DropdownMenu, Heading, Link, SubHeader, Tabs } from '@/components/v2'; import { ArrowDownIcon, TargetIcon } from '@/components/v2/icon'; import { CreateTargetModal } from '@/components/v2/modals'; import { - ProjectDocument, - ProjectsDocument, - ProjectFieldsFragment, OrganizationFieldsFragment, + ProjectDocument, + ProjectFieldsFragment, + ProjectsDocument, } from '@/graphql'; +import { canAccessProject, ProjectAccessScope, useProjectAccess } from '@/lib/access/project'; import { useRouteSelector, useToggle } from '@/lib/hooks'; -import { useProjectAccess, ProjectAccessScope, canAccessProject } from '@/lib/access/project'; enum TabValue { Targets = 'targets', diff --git a/packages/web/app/src/components/layouts/target.tsx b/packages/web/app/src/components/layouts/target.tsx index 5e9c02ca1..46c57d58e 100644 --- a/packages/web/app/src/components/layouts/target.tsx +++ b/packages/web/app/src/components/layouts/target.tsx @@ -1,21 +1,20 @@ import { ReactElement, ReactNode, useEffect } from 'react'; import NextLink from 'next/link'; import { useQuery } from 'urql'; - -import { Button, DropdownMenu, Heading, Link, Tabs, SubHeader, Spinner } from '@/components/v2'; -import { ArrowDownIcon, Link2Icon } from '@/components/v2/icon'; -import { - ProjectDocument, - TargetsDocument, - TargetFieldsFragment, - ProjectFieldsFragment, - OrganizationFieldsFragment, -} from '@/graphql'; import { gql } from 'urql'; -import { useRouteSelector, useToggle } from '@/lib/hooks'; -import { useTargetAccess, canAccessTarget, TargetAccessScope } from '@/lib/access/target'; -import { QueryError } from '../common/DataWrapper'; +import { Button, DropdownMenu, Heading, Link, Spinner, SubHeader, Tabs } from '@/components/v2'; +import { ArrowDownIcon, Link2Icon } from '@/components/v2/icon'; import { ConnectSchemaModal } from '@/components/v2/modals'; +import { + OrganizationFieldsFragment, + ProjectDocument, + ProjectFieldsFragment, + TargetFieldsFragment, + TargetsDocument, +} from '@/graphql'; +import { canAccessTarget, TargetAccessScope, useTargetAccess } from '@/lib/access/target'; +import { useRouteSelector, useToggle } from '@/lib/hooks'; +import { QueryError } from '../common/DataWrapper'; enum TabValue { Schema = 'schema', diff --git a/packages/web/app/src/components/organization/Creator.tsx b/packages/web/app/src/components/organization/Creator.tsx index fd9804c5a..0ea8aa438 100644 --- a/packages/web/app/src/components/organization/Creator.tsx +++ b/packages/web/app/src/components/organization/Creator.tsx @@ -1,21 +1,21 @@ -import React, { ChangeEventHandler, FormEventHandler } from 'react'; import 'twin.macro'; -import { useMutation } from 'urql'; +import React, { ChangeEventHandler, FormEventHandler } from 'react'; import { Button, FormControl, FormLabel, Input, Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalFooter, ModalBody, ModalCloseButton, + ModalContent, + ModalFooter, + ModalHeader, + ModalOverlay, } from '@chakra-ui/react'; +import { useMutation } from 'urql'; +import { Description, Label } from '@/components/common'; import { CreateOrganizationDocument } from '@/graphql'; -import { Label, Description } from '@/components/common'; import { useRouteSelector } from '@/lib/hooks'; export const OrganizationCreator: React.FC<{ diff --git a/packages/web/app/src/components/organization/Permissions.tsx b/packages/web/app/src/components/organization/Permissions.tsx index 1c8cf3074..039dc2390 100644 --- a/packages/web/app/src/components/organization/Permissions.tsx +++ b/packages/web/app/src/components/organization/Permissions.tsx @@ -1,16 +1,16 @@ -import React, { FormEventHandler } from 'react'; import 'twin.macro'; +import React, { FormEventHandler } from 'react'; +import { AccordionButton, AccordionItem, AccordionPanel, Select } from '@chakra-ui/react'; import { useMutation } from 'urql'; -import { Select, AccordionItem, AccordionButton, AccordionPanel } from '@chakra-ui/react'; import { MemberFieldsFragment, - OrganizationFieldsFragment, - UpdateOrganizationMemberAccessDocument, OrganizationAccessScope, + OrganizationFieldsFragment, ProjectAccessScope, TargetAccessScope, + UpdateOrganizationMemberAccessDocument, } from '@/graphql'; -import { Scope, NoAccess } from '@/lib/access/common'; +import { NoAccess, Scope } from '@/lib/access/common'; import { canAccessOrganization } from '@/lib/access/organization'; import { canAccessProject } from '@/lib/access/project'; import { canAccessTarget } from '@/lib/access/target'; diff --git a/packages/web/app/src/components/organization/Switcher.tsx b/packages/web/app/src/components/organization/Switcher.tsx index df122aacf..a78466b1c 100644 --- a/packages/web/app/src/components/organization/Switcher.tsx +++ b/packages/web/app/src/components/organization/Switcher.tsx @@ -1,21 +1,21 @@ +import 'twin.macro'; import React from 'react'; -import { useQuery } from 'urql'; -import { VscChevronDown, VscAdd } from 'react-icons/vsc'; import { Button, Menu, MenuButton, - MenuList, - MenuItem, - MenuGroup, MenuDivider, - useDisclosure, + MenuGroup, + MenuItem, + MenuList, useColorModeValue, + useDisclosure, } from '@chakra-ui/react'; -import 'twin.macro'; +import { VscAdd, VscChevronDown } from 'react-icons/vsc'; +import { useQuery } from 'urql'; import { OrganizationsDocument, OrganizationsQuery, OrganizationType } from '@/graphql'; -import { OrganizationCreator } from './Creator'; import { useRouteSelector } from '@/lib/hooks'; +import { OrganizationCreator } from './Creator'; export const OrganizationSwitcher: React.FC<{ organizationId: string; diff --git a/packages/web/app/src/components/organization/Usage.tsx b/packages/web/app/src/components/organization/Usage.tsx index 161790c16..a80320b96 100644 --- a/packages/web/app/src/components/organization/Usage.tsx +++ b/packages/web/app/src/components/organization/Usage.tsx @@ -1,14 +1,14 @@ +import 'twin.macro'; import React from 'react'; +import { Table, TableContainer, Tbody, Td, Th, Thead, Tr } from '@chakra-ui/react'; +import { useQuery } from 'urql'; import { OrganizationFieldsFragment, OrgBillingInfoFieldsFragment, UsageEstimationDocument, } from '@/graphql'; -import { useQuery } from 'urql'; import { Scale } from '../common'; import { DataWrapper } from '../common/DataWrapper'; -import 'twin.macro'; -import { Table, TableContainer, Tbody, Td, Th, Thead, Tr } from '@chakra-ui/react'; import { calculatePeriod } from '../common/TimeFilter'; const NumericFormatter = Intl.NumberFormat('en', { diff --git a/packages/web/app/src/components/organization/billing/Billing.tsx b/packages/web/app/src/components/organization/billing/Billing.tsx index ed649cc25..cdb27a0ac 100644 --- a/packages/web/app/src/components/organization/billing/Billing.tsx +++ b/packages/web/app/src/components/organization/billing/Billing.tsx @@ -1,13 +1,13 @@ +import 'twin.macro'; import React, { PropsWithChildren } from 'react'; +import { useQuery } from 'urql'; +import { DataWrapper } from '@/components/common/DataWrapper'; import { BillingPlansDocument, OrganizationFieldsFragment, OrgBillingInfoFieldsFragment, } from '@/graphql'; -import 'twin.macro'; import { PlanSummary } from './PlanSummary'; -import { useQuery } from 'urql'; -import { DataWrapper } from '@/components/common/DataWrapper'; export const BillingView = ({ organization, diff --git a/packages/web/app/src/components/organization/billing/BillingPaymentMethod.tsx b/packages/web/app/src/components/organization/billing/BillingPaymentMethod.tsx index 8f8844706..6a65469ff 100644 --- a/packages/web/app/src/components/organization/billing/BillingPaymentMethod.tsx +++ b/packages/web/app/src/components/organization/billing/BillingPaymentMethod.tsx @@ -1,9 +1,9 @@ import { ReactElement } from 'react'; +import { CardElement } from '@stripe/react-stripe-js'; import clsx from 'clsx'; import { Section } from '@/components/common'; +import { Heading, Link } from '@/components/v2'; import { BillingPlanType, OrgBillingInfoFieldsFragment } from '@/graphql'; -import { Link, Heading } from '@/components/v2'; -import { CardElement } from '@stripe/react-stripe-js'; export const BillingPaymentMethod = ({ plan, diff --git a/packages/web/app/src/components/organization/billing/BillingPlanPicker.tsx b/packages/web/app/src/components/organization/billing/BillingPlanPicker.tsx index 3a366c041..58577590c 100644 --- a/packages/web/app/src/components/organization/billing/BillingPlanPicker.tsx +++ b/packages/web/app/src/components/organization/billing/BillingPlanPicker.tsx @@ -1,9 +1,9 @@ -import { ReactNode, ReactElement } from 'react'; +import { ReactElement, ReactNode } from 'react'; import { List, ListIcon, ListItem } from '@chakra-ui/react'; import { VscCheck } from 'react-icons/vsc'; -import { BillingPlanType, BillingPlansQuery } from '@/graphql'; import { Label, Section } from '@/components/common'; -import { Link, RadioGroup, Radio } from '@/components/v2'; +import { Link, Radio, RadioGroup } from '@/components/v2'; +import { BillingPlansQuery, BillingPlanType } from '@/graphql'; const planCollection: { [key in BillingPlanType]: { diff --git a/packages/web/app/src/components/organization/billing/InvoicesList.tsx b/packages/web/app/src/components/organization/billing/InvoicesList.tsx index 88da9d897..aad7de588 100644 --- a/packages/web/app/src/components/organization/billing/InvoicesList.tsx +++ b/packages/web/app/src/components/organization/billing/InvoicesList.tsx @@ -1,7 +1,7 @@ -import { OrganizationFieldsFragment, OrgBillingInfoFieldsFragment } from '@/graphql'; -import { Table, TableContainer, Tbody, Td, Th, Thead, Tr, Link } from '@chakra-ui/react'; import React from 'react'; +import { Link, Table, TableContainer, Tbody, Td, Th, Thead, Tr } from '@chakra-ui/react'; import { VscCloudDownload } from 'react-icons/vsc'; +import { OrganizationFieldsFragment, OrgBillingInfoFieldsFragment } from '@/graphql'; import { CurrencyFormatter, DateFormatter } from './helpers'; export const InvoicesList: React.FC<{ diff --git a/packages/web/app/src/components/organization/billing/LimitSlider.tsx b/packages/web/app/src/components/organization/billing/LimitSlider.tsx index fc00c3d30..f6ab9e313 100644 --- a/packages/web/app/src/components/organization/billing/LimitSlider.tsx +++ b/packages/web/app/src/components/organization/billing/LimitSlider.tsx @@ -1,3 +1,4 @@ +import { ReactElement, useState } from 'react'; import { Slider, SliderFilledTrack, @@ -6,9 +7,8 @@ import { SliderTrack, Tooltip, } from '@chakra-ui/react'; -import { ReactElement, useState } from 'react'; -import { Section } from '@/components/common'; import clsx from 'clsx'; +import { Section } from '@/components/common'; export const LimitSlider = (props: { value: number; diff --git a/packages/web/app/src/components/organization/billing/PlanSummary.tsx b/packages/web/app/src/components/organization/billing/PlanSummary.tsx index 143960b9d..512dd6577 100644 --- a/packages/web/app/src/components/organization/billing/PlanSummary.tsx +++ b/packages/web/app/src/components/organization/billing/PlanSummary.tsx @@ -1,4 +1,4 @@ -import { BillingPlansQuery, BillingPlanType } from '@/graphql'; +import { ReactElement, ReactNode } from 'react'; import { Stat, StatGroup, @@ -13,7 +13,7 @@ import { Thead, Tr, } from '@chakra-ui/react'; -import { ReactElement, ReactNode } from 'react'; +import { BillingPlansQuery, BillingPlanType } from '@/graphql'; import { CurrencyFormatter } from './helpers'; const PriceEstimationTable = ({ diff --git a/packages/web/app/src/components/organization/billing/RateLimitWarn.tsx b/packages/web/app/src/components/organization/billing/RateLimitWarn.tsx index a6cc40204..bafb52c21 100644 --- a/packages/web/app/src/components/organization/billing/RateLimitWarn.tsx +++ b/packages/web/app/src/components/organization/billing/RateLimitWarn.tsx @@ -1,6 +1,6 @@ -import { OrgRateLimitFieldsFragment } from '@/graphql'; -import { Alert, AlertDescription, AlertIcon, AlertTitle, Box } from '@chakra-ui/react'; import React from 'react'; +import { Alert, AlertDescription, AlertIcon, AlertTitle, Box } from '@chakra-ui/react'; +import { OrgRateLimitFieldsFragment } from '@/graphql'; export const RateLimitWarn: React.FC<{ organization: OrgRateLimitFieldsFragment; diff --git a/packages/web/app/src/components/organization/settings/oidc-integration-section.tsx b/packages/web/app/src/components/organization/settings/oidc-integration-section.tsx index 16117ef6f..84651cefc 100644 --- a/packages/web/app/src/components/organization/settings/oidc-integration-section.tsx +++ b/packages/web/app/src/components/organization/settings/oidc-integration-section.tsx @@ -1,13 +1,12 @@ +import { ReactElement } from 'react'; +import { useRouter } from 'next/router'; +import { Heading } from '@chakra-ui/react'; +import { useFormik } from 'formik'; +import { DocumentType, gql, useMutation } from 'urql'; import { Button, Input, Modal, Tag } from '@/components/v2'; import { AlertTriangleIcon, KeyIcon } from '@/components/v2/icon'; import { InlineCode } from '@/components/v2/inline-code'; import { env } from '@/env/frontend'; -import { Heading } from '@chakra-ui/react'; -import { useFormik } from 'formik'; -import { useRouter } from 'next/router'; -import { ReactElement } from 'react'; - -import { gql, DocumentType, useMutation } from 'urql'; const containerClassName = 'flex flex-col items-stretch gap-5'; const modalWidthClassName = 'w-[550px]'; diff --git a/packages/web/app/src/components/project/Switcher.tsx b/packages/web/app/src/components/project/Switcher.tsx index 10e14ad89..f96dfed62 100644 --- a/packages/web/app/src/components/project/Switcher.tsx +++ b/packages/web/app/src/components/project/Switcher.tsx @@ -1,9 +1,9 @@ +import 'twin.macro'; import React from 'react'; import { useColorModeValue } from '@chakra-ui/react'; -import { useQuery } from 'urql'; -import 'twin.macro'; +import { Button, Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/react'; import { VscChevronDown } from 'react-icons/vsc'; -import { Button, Menu, MenuButton, MenuList, MenuItem } from '@chakra-ui/react'; +import { useQuery } from 'urql'; import { ProjectsDocument } from '@/graphql'; import { useRouteSelector } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/project/settings/external-composition.tsx b/packages/web/app/src/components/project/settings/external-composition.tsx index 152dd8582..322819e69 100644 --- a/packages/web/app/src/components/project/settings/external-composition.tsx +++ b/packages/web/app/src/components/project/settings/external-composition.tsx @@ -2,7 +2,6 @@ import { useCallback, useState } from 'react'; import { useFormik } from 'formik'; import { gql, useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - import { Button, Card, Heading, Input, Spinner, Switch } from '@/components/v2'; import { OrganizationFieldsFragment, ProjectFieldsFragment } from '@/graphql'; import { useNotifications } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/target/Switcher.tsx b/packages/web/app/src/components/target/Switcher.tsx index eb1533008..001b0f38e 100644 --- a/packages/web/app/src/components/target/Switcher.tsx +++ b/packages/web/app/src/components/target/Switcher.tsx @@ -1,9 +1,9 @@ -import React from 'react'; -import { useQuery } from 'urql'; -import { useColorModeValue } from '@chakra-ui/react'; import 'twin.macro'; +import React from 'react'; +import { useColorModeValue } from '@chakra-ui/react'; +import { Button, Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/react'; import { VscChevronDown } from 'react-icons/vsc'; -import { Button, Menu, MenuButton, MenuList, MenuItem } from '@chakra-ui/react'; +import { useQuery } from 'urql'; import { TargetsDocument } from '@/graphql'; import { useRouteSelector } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/target/explorer/common.tsx b/packages/web/app/src/components/target/explorer/common.tsx index c35112dff..66be87c08 100644 --- a/packages/web/app/src/components/target/explorer/common.tsx +++ b/packages/web/app/src/components/target/explorer/common.tsx @@ -1,11 +1,11 @@ import React from 'react'; -import clsx from 'clsx'; -import { gql, DocumentType } from 'urql'; import * as Popover from '@radix-ui/react-popover'; +import clsx from 'clsx'; import { VscCommentDiscussion, VscPulse } from 'react-icons/vsc'; -import { useRouteSelector, formatNumber } from '@/lib/hooks'; +import { DocumentType, gql } from 'urql'; import { Link } from '@/components/v2/link'; import { Markdown } from '@/components/v2/markdown'; +import { formatNumber, useRouteSelector } from '@/lib/hooks'; import { useArgumentListToggle } from './provider'; function useCollapsibleList(list: T[], max: number, defaultValue: boolean) { diff --git a/packages/web/app/src/components/target/explorer/enum-type.tsx b/packages/web/app/src/components/target/explorer/enum-type.tsx index 132ee2d83..a663d8b30 100644 --- a/packages/web/app/src/components/target/explorer/enum-type.tsx +++ b/packages/web/app/src/components/target/explorer/enum-type.tsx @@ -1,4 +1,4 @@ -import { gql, DocumentType } from 'urql'; +import { DocumentType, gql } from 'urql'; import { GraphQLTypeCard, GraphQLTypeCardListItem, SchemaExplorerUsageStats } from './common'; export const GraphQLEnumTypeComponent_TypeFragment = gql(/* GraphQL */ ` diff --git a/packages/web/app/src/components/target/explorer/input-object-type.tsx b/packages/web/app/src/components/target/explorer/input-object-type.tsx index 55ddbf691..32601aa3a 100644 --- a/packages/web/app/src/components/target/explorer/input-object-type.tsx +++ b/packages/web/app/src/components/target/explorer/input-object-type.tsx @@ -1,5 +1,5 @@ -import { gql, DocumentType } from 'urql'; -import { GraphQLTypeCard, GraphQLInputFields } from './common'; +import { DocumentType, gql } from 'urql'; +import { GraphQLInputFields, GraphQLTypeCard } from './common'; export const GraphQLInputObjectTypeComponent_TypeFragment = gql(/* GraphQL */ ` fragment GraphQLInputObjectTypeComponent_TypeFragment on GraphQLInputObjectType { diff --git a/packages/web/app/src/components/target/explorer/interface-type.tsx b/packages/web/app/src/components/target/explorer/interface-type.tsx index 6f6a151b0..36843e161 100644 --- a/packages/web/app/src/components/target/explorer/interface-type.tsx +++ b/packages/web/app/src/components/target/explorer/interface-type.tsx @@ -1,5 +1,5 @@ -import { gql, DocumentType } from 'urql'; -import { GraphQLTypeCard, GraphQLFields } from './common'; +import { DocumentType, gql } from 'urql'; +import { GraphQLFields, GraphQLTypeCard } from './common'; export const GraphQLInterfaceTypeComponent_TypeFragment = gql(/* GraphQL */ ` fragment GraphQLInterfaceTypeComponent_TypeFragment on GraphQLInterfaceType { diff --git a/packages/web/app/src/components/target/explorer/object-type.tsx b/packages/web/app/src/components/target/explorer/object-type.tsx index a4987401c..1d219ec5b 100644 --- a/packages/web/app/src/components/target/explorer/object-type.tsx +++ b/packages/web/app/src/components/target/explorer/object-type.tsx @@ -1,5 +1,5 @@ -import { gql, DocumentType } from 'urql'; -import { GraphQLTypeCard, GraphQLFields } from './common'; +import { DocumentType, gql } from 'urql'; +import { GraphQLFields, GraphQLTypeCard } from './common'; export const GraphQLObjectTypeComponent_TypeFragment = gql(/* GraphQL */ ` fragment GraphQLObjectTypeComponent_TypeFragment on GraphQLObjectType { diff --git a/packages/web/app/src/components/target/explorer/scalar-type.tsx b/packages/web/app/src/components/target/explorer/scalar-type.tsx index ae6ac9750..2dd65802a 100644 --- a/packages/web/app/src/components/target/explorer/scalar-type.tsx +++ b/packages/web/app/src/components/target/explorer/scalar-type.tsx @@ -1,4 +1,4 @@ -import { gql, DocumentType } from 'urql'; +import { DocumentType, gql } from 'urql'; import { Markdown } from '@/components/v2/markdown'; import { GraphQLTypeCard, SchemaExplorerUsageStats } from './common'; diff --git a/packages/web/app/src/components/target/explorer/union-type.tsx b/packages/web/app/src/components/target/explorer/union-type.tsx index a457daf72..b8c4f8f08 100644 --- a/packages/web/app/src/components/target/explorer/union-type.tsx +++ b/packages/web/app/src/components/target/explorer/union-type.tsx @@ -1,4 +1,4 @@ -import { gql, DocumentType } from 'urql'; +import { DocumentType, gql } from 'urql'; import { GraphQLTypeCard, GraphQLTypeCardListItem, SchemaExplorerUsageStats } from './common'; export const GraphQLUnionTypeComponent_TypeFragment = gql(/* GraphQL */ ` diff --git a/packages/web/app/src/components/target/history/MarkAsValid.tsx b/packages/web/app/src/components/target/history/MarkAsValid.tsx index 624219d81..6abbf1586 100644 --- a/packages/web/app/src/components/target/history/MarkAsValid.tsx +++ b/packages/web/app/src/components/target/history/MarkAsValid.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; -import { useMutation } from 'urql'; import { Tooltip } from '@chakra-ui/react'; +import { useMutation } from 'urql'; import { Button } from '@/components/v2'; -import { useRouteSelector } from '@/lib/hooks'; import { SchemaVersionFieldsFragment, UpdateSchemaVersionStatusDocument } from '@/graphql'; +import { useRouteSelector } from '@/lib/hooks'; export const MarkAsValid: React.FC<{ version: Pick; diff --git a/packages/web/app/src/components/target/operations/Filters.tsx b/packages/web/app/src/components/target/operations/Filters.tsx index 87926f64a..f4eda9e60 100644 --- a/packages/web/app/src/components/target/operations/Filters.tsx +++ b/packages/web/app/src/components/target/operations/Filters.tsx @@ -1,5 +1,5 @@ -import React, { ComponentType } from 'react'; import 'twin.macro'; +import React, { ComponentType } from 'react'; import { Button, Checkbox, @@ -20,10 +20,9 @@ import AutoSizer from 'react-virtualized-auto-sizer'; import { FixedSizeList, ListChildComponentProps } from 'react-window'; import { useQuery } from 'urql'; import { useDebouncedCallback } from 'use-debounce'; - import { Spinner } from '@/components/common/Spinner'; import { DateRangeInput, OperationsStatsDocument, OperationStatsFieldsFragment } from '@/graphql'; -import { useRouteSelector, useFormattedNumber } from '@/lib/hooks'; +import { useFormattedNumber, useRouteSelector } from '@/lib/hooks'; const OperationsFilter: React.FC<{ onClose(): void; diff --git a/packages/web/app/src/components/target/operations/List.tsx b/packages/web/app/src/components/target/operations/List.tsx index 5b03c85cc..9885b1fc5 100644 --- a/packages/web/app/src/components/target/operations/List.tsx +++ b/packages/web/app/src/components/target/operations/List.tsx @@ -1,5 +1,5 @@ -import React, { PropsWithChildren } from 'react'; import 'twin.macro'; +import React, { PropsWithChildren } from 'react'; import { Button, Drawer, @@ -22,6 +22,16 @@ import { Tr, useDisclosure, } from '@chakra-ui/react'; +import { + createTable, + getCoreRowModel, + getPaginationRowModel, + getSortedRowModel, + OnChangeFn, + PaginationState, + SortingState, + useTableInstance, +} from '@tanstack/react-table'; import { VscChevronDown, VscChevronLeft, @@ -29,25 +39,14 @@ import { VscChevronUp, VscWarning, } from 'react-icons/vsc'; -import { - createTable, - useTableInstance, - getCoreRowModel, - getSortedRowModel, - getPaginationRowModel, - SortingState, - PaginationState, - OnChangeFn, -} from '@tanstack/react-table'; import { useQuery } from 'urql'; import { useDebouncedCallback } from 'use-debounce'; - import { Scale, Section } from '@/components/common'; import { GraphQLHighlight } from '@/components/common/GraphQLSDLBlock'; +import { env } from '@/env/frontend'; import { DateRangeInput, OperationsStatsDocument, OperationStatsFieldsFragment } from '@/graphql'; import { useDecimal, useFormattedDuration, useFormattedNumber } from '@/lib/hooks'; import { OperationsFallback } from './Fallback'; -import { env } from '@/env/frontend'; interface Operation { id: string; diff --git a/packages/web/app/src/components/target/operations/Stats.tsx b/packages/web/app/src/components/target/operations/Stats.tsx index 5a255076e..770b759fd 100644 --- a/packages/web/app/src/components/target/operations/Stats.tsx +++ b/packages/web/app/src/components/target/operations/Stats.tsx @@ -4,7 +4,6 @@ import ReactECharts from 'echarts-for-react'; import AutoSizer from 'react-virtualized-auto-sizer'; import tw from 'twin.macro'; import { useQuery } from 'urql'; - import { Section } from '@/components/common'; import { DateRangeInput, @@ -13,10 +12,10 @@ import { } from '@/graphql'; import { theme } from '@/lib/charts'; import { + formatThroughput, toDecimal, useFormattedDuration, useFormattedNumber, - formatThroughput, useFormattedThroughput, } from '@/lib/hooks'; import { OperationsFallback } from './Fallback'; diff --git a/packages/web/app/src/components/v2/activities.tsx b/packages/web/app/src/components/v2/activities.tsx index 6ed28f852..a8c50aa71 100644 --- a/packages/web/app/src/components/v2/activities.tsx +++ b/packages/web/app/src/components/v2/activities.tsx @@ -1,6 +1,5 @@ import React, { ReactElement, ReactNode } from 'react'; import { useQuery } from 'urql'; - import { ActivityNode } from '@/components/common/activities/common'; import { Heading, Link, Skeleton, TimeAgo } from '@/components/v2'; import { diff --git a/packages/web/app/src/components/v2/copy-value.tsx b/packages/web/app/src/components/v2/copy-value.tsx index 84bfad560..0864d5a11 100644 --- a/packages/web/app/src/components/v2/copy-value.tsx +++ b/packages/web/app/src/components/v2/copy-value.tsx @@ -1,5 +1,4 @@ import { ReactElement, useCallback, useEffect, useState } from 'react'; - import { Button, Input } from '@/components/v2'; import { CheckIcon, CopyIcon } from '@/components/v2/icon'; import { useClipboard } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/v2/data-wrapper.tsx b/packages/web/app/src/components/v2/data-wrapper.tsx index 890540720..51d855200 100644 --- a/packages/web/app/src/components/v2/data-wrapper.tsx +++ b/packages/web/app/src/components/v2/data-wrapper.tsx @@ -1,6 +1,5 @@ import { Component, ReactNode } from 'react'; import { UseQueryState } from 'urql'; - import { QueryError } from '@/components/common/DataWrapper'; import { Spinner } from '@/components/v2'; diff --git a/packages/web/app/src/components/v2/diff-editor.tsx b/packages/web/app/src/components/v2/diff-editor.tsx index afe2fcb66..b406701a6 100644 --- a/packages/web/app/src/components/v2/diff-editor.tsx +++ b/packages/web/app/src/components/v2/diff-editor.tsx @@ -1,7 +1,6 @@ import { ReactElement, useMemo } from 'react'; -import { parse, print } from 'graphql'; import { DiffEditor as MonacoDiffEditor } from '@monaco-editor/react'; - +import { parse, print } from 'graphql'; import { Spinner } from '@/components/common/Spinner'; const prettify = (sdl: string): string => { diff --git a/packages/web/app/src/components/v2/empty-list.tsx b/packages/web/app/src/components/v2/empty-list.tsx index df291d976..dc4e1535c 100644 --- a/packages/web/app/src/components/v2/empty-list.tsx +++ b/packages/web/app/src/components/v2/empty-list.tsx @@ -1,6 +1,5 @@ import { ReactElement } from 'react'; import Image from 'next/image'; - import { Card, Heading, Link } from '@/components/v2/index'; import { getDocsUrl } from '@/lib/docs-url'; import magnifier from '../../../public/images/figures/magnifier.svg'; diff --git a/packages/web/app/src/components/v2/graphql-block.tsx b/packages/web/app/src/components/v2/graphql-block.tsx index 9ffe0d4b2..ac058ba24 100644 --- a/packages/web/app/src/components/v2/graphql-block.tsx +++ b/packages/web/app/src/components/v2/graphql-block.tsx @@ -1,7 +1,6 @@ import React from 'react'; -import { parse, print } from 'graphql'; import clsx from 'clsx'; - +import { parse, print } from 'graphql'; import { SchemaEditor, SchemaEditorProps } from '@/components/schema-editor'; import { Card } from '@/components/v2/card'; import { Heading } from '@/components/v2/heading'; @@ -17,9 +16,8 @@ function prettify(sdl: string) { const GraphQLHighlight: React.FC< Omit & { code: string; - light?: boolean; } -> = ({ code, light, ...props }) => { +> = ({ code, ...props }) => { const pretty = React.useMemo(() => prettify(code), [code]); return ( diff --git a/packages/web/app/src/components/v2/header.tsx b/packages/web/app/src/components/v2/header.tsx index a32a36629..4606946e7 100644 --- a/packages/web/app/src/components/v2/header.tsx +++ b/packages/web/app/src/components/v2/header.tsx @@ -2,7 +2,6 @@ import { ReactElement, useEffect, useState } from 'react'; import NextLink from 'next/link'; import clsx from 'clsx'; import { useQuery } from 'urql'; - import { GetStartedProgress } from '@/components/get-started/wizard'; import { Avatar, Button, DropdownMenu, HiveLink } from '@/components/v2'; import { diff --git a/packages/web/app/src/components/v2/hive-link.tsx b/packages/web/app/src/components/v2/hive-link.tsx index 3dfb1e9b2..2bec63c43 100644 --- a/packages/web/app/src/components/v2/hive-link.tsx +++ b/packages/web/app/src/components/v2/hive-link.tsx @@ -1,7 +1,6 @@ import { ReactElement } from 'react'; import NextLink from 'next/link'; import clsx from 'clsx'; - import { HiveLogo } from '@/components/v2/icon'; import { useRouteSelector } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/v2/icon.tsx b/packages/web/app/src/components/v2/icon.tsx index a583f2488..dc8e2d876 100644 --- a/packages/web/app/src/components/v2/icon.tsx +++ b/packages/web/app/src/components/v2/icon.tsx @@ -1,5 +1,5 @@ -import { FC, ReactElement } from 'react'; import 'twin.macro'; +import { FC, ReactElement } from 'react'; import clsx from 'clsx'; const DEFAULT_PATH_PROPS = { diff --git a/packages/web/app/src/components/v2/modal.tsx b/packages/web/app/src/components/v2/modal.tsx index 73807f848..90d52c4b9 100644 --- a/packages/web/app/src/components/v2/modal.tsx +++ b/packages/web/app/src/components/v2/modal.tsx @@ -14,7 +14,6 @@ import { } from '@radix-ui/react-dialog'; import clsx from 'clsx'; import { css } from 'twin.macro'; - import { Button } from '@/components/v2'; import { XIcon } from '@/components/v2/icon'; diff --git a/packages/web/app/src/components/v2/modals/change-permissions.tsx b/packages/web/app/src/components/v2/modals/change-permissions.tsx index 23dbbecea..e001241a3 100644 --- a/packages/web/app/src/components/v2/modals/change-permissions.tsx +++ b/packages/web/app/src/components/v2/modals/change-permissions.tsx @@ -1,6 +1,5 @@ import { ReactElement } from 'react'; import { Accordion } from '@chakra-ui/react'; - import { PermissionsSpace, usePermissionsManager } from '@/components/organization/Permissions'; import { Button, Heading, Modal } from '@/components/v2'; import { MemberFieldsFragment, OrganizationFieldsFragment } from '@/graphql'; diff --git a/packages/web/app/src/components/v2/modals/connect-lab.tsx b/packages/web/app/src/components/v2/modals/connect-lab.tsx index fcc0d86ef..ac9553a23 100644 --- a/packages/web/app/src/components/v2/modals/connect-lab.tsx +++ b/packages/web/app/src/components/v2/modals/connect-lab.tsx @@ -1,5 +1,4 @@ import { ReactElement } from 'react'; - import { Button, CopyValue, Heading, Link, Modal, Tag } from '@/components/v2'; import { getDocsUrl } from '@/lib/docs-url'; diff --git a/packages/web/app/src/components/v2/modals/connect-schema.tsx b/packages/web/app/src/components/v2/modals/connect-schema.tsx index cd5f222fd..c88ee1f1f 100644 --- a/packages/web/app/src/components/v2/modals/connect-schema.tsx +++ b/packages/web/app/src/components/v2/modals/connect-schema.tsx @@ -1,7 +1,6 @@ import { ReactElement, useEffect, useState } from 'react'; import { Spinner } from '@chakra-ui/react'; import { useMutation, useQuery } from 'urql'; - import { Button, CopyValue, Heading, Link, Modal, Tag } from '@/components/v2'; import { CreateCdnTokenDocument, ProjectDocument, ProjectType } from '@/graphql'; import { getDocsUrl } from '@/lib/docs-url'; diff --git a/packages/web/app/src/components/v2/modals/create-access-token.tsx b/packages/web/app/src/components/v2/modals/create-access-token.tsx index 70df4aa75..2d529a23d 100644 --- a/packages/web/app/src/components/v2/modals/create-access-token.tsx +++ b/packages/web/app/src/components/v2/modals/create-access-token.tsx @@ -3,7 +3,6 @@ import { Accordion } from '@chakra-ui/react'; import { useFormik } from 'formik'; import { gql, useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - import { PermissionsSpace, usePermissionsManager } from '@/components/organization/Permissions'; import { Button, CopyValue, Heading, Input, Modal, Tag } from '@/components/v2'; import { OrganizationDocument, OrganizationQuery } from '@/graphql'; diff --git a/packages/web/app/src/components/v2/modals/create-alert.tsx b/packages/web/app/src/components/v2/modals/create-alert.tsx index 04e1b0238..6cf5e6a09 100644 --- a/packages/web/app/src/components/v2/modals/create-alert.tsx +++ b/packages/web/app/src/components/v2/modals/create-alert.tsx @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import { useFormik } from 'formik'; import { useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - import { Button, Heading, Modal, Select } from '@/components/v2'; import { AddAlertDocument, AlertChannelsDocument, AlertType, TargetsDocument } from '@/graphql'; import { useRouteSelector } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/v2/modals/create-channel.tsx b/packages/web/app/src/components/v2/modals/create-channel.tsx index 0d76d7f20..909191be7 100644 --- a/packages/web/app/src/components/v2/modals/create-channel.tsx +++ b/packages/web/app/src/components/v2/modals/create-channel.tsx @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import { useFormik } from 'formik'; import { gql, useMutation } from 'urql'; import * as Yup from 'yup'; - import { Button, Heading, Input, Modal, Select, Tag } from '@/components/v2'; import { AlertChannelType } from '@/graphql'; import { useRouteSelector } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/v2/modals/create-organization.tsx b/packages/web/app/src/components/v2/modals/create-organization.tsx index 059f36e6d..4f2ace35e 100644 --- a/packages/web/app/src/components/v2/modals/create-organization.tsx +++ b/packages/web/app/src/components/v2/modals/create-organization.tsx @@ -4,7 +4,6 @@ import { gql } from '@urql/core'; import { useFormik } from 'formik'; import { useMutation } from 'urql'; import * as Yup from 'yup'; - import { Button, Heading, Input, Modal } from '@/components/v2'; const CreateOrganizationMutation = gql(/* GraphQL */ ` diff --git a/packages/web/app/src/components/v2/modals/create-project.tsx b/packages/web/app/src/components/v2/modals/create-project.tsx index cc33a6554..565e265f0 100644 --- a/packages/web/app/src/components/v2/modals/create-project.tsx +++ b/packages/web/app/src/components/v2/modals/create-project.tsx @@ -3,7 +3,6 @@ import { useRouter } from 'next/router'; import { useFormik } from 'formik'; import { gql, useMutation } from 'urql'; import * as Yup from 'yup'; - import { Button, Heading, Input, Modal, ProjectTypes } from '@/components/v2'; import { ProjectType } from '@/graphql'; import { useRouteSelector } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/v2/modals/create-target.tsx b/packages/web/app/src/components/v2/modals/create-target.tsx index 682568c3a..4d8e756b5 100644 --- a/packages/web/app/src/components/v2/modals/create-target.tsx +++ b/packages/web/app/src/components/v2/modals/create-target.tsx @@ -3,7 +3,6 @@ import { useRouter } from 'next/router'; import { useFormik } from 'formik'; import { gql, useMutation } from 'urql'; import * as Yup from 'yup'; - import { Button, Heading, Input, Modal } from '@/components/v2'; import { useRouteSelector } from '@/lib/hooks'; diff --git a/packages/web/app/src/components/v2/modals/delete-members.tsx b/packages/web/app/src/components/v2/modals/delete-members.tsx index 0d555ca5a..c053dfa77 100644 --- a/packages/web/app/src/components/v2/modals/delete-members.tsx +++ b/packages/web/app/src/components/v2/modals/delete-members.tsx @@ -1,6 +1,5 @@ import { ReactElement } from 'react'; import { useMutation } from 'urql'; - import { Button, Heading, Modal } from '@/components/v2'; import { TrashIcon } from '@/components/v2/icon'; import { DeleteOrganizationMembersDocument } from '@/graphql'; diff --git a/packages/web/app/src/components/v2/modals/delete-organization.tsx b/packages/web/app/src/components/v2/modals/delete-organization.tsx index 09f78ba4a..3059cfb34 100644 --- a/packages/web/app/src/components/v2/modals/delete-organization.tsx +++ b/packages/web/app/src/components/v2/modals/delete-organization.tsx @@ -1,7 +1,6 @@ import { ReactElement } from 'react'; import { useRouter } from 'next/router'; import { useMutation } from 'urql'; - import { Button, Heading, Modal } from '@/components/v2'; import { TrashIcon } from '@/components/v2/icon'; import { DeleteOrganizationDocument, OrganizationFieldsFragment } from '@/graphql'; diff --git a/packages/web/app/src/components/v2/modals/delete-project.tsx b/packages/web/app/src/components/v2/modals/delete-project.tsx index c2169c9ab..5d0983da4 100644 --- a/packages/web/app/src/components/v2/modals/delete-project.tsx +++ b/packages/web/app/src/components/v2/modals/delete-project.tsx @@ -1,7 +1,6 @@ import { ReactElement } from 'react'; import { useRouter } from 'next/router'; import { useMutation } from 'urql'; - import { Button, Heading, Modal } from '@/components/v2'; import { TrashIcon } from '@/components/v2/icon'; import { DeleteProjectDocument } from '@/graphql'; diff --git a/packages/web/app/src/components/v2/modals/delete-target.tsx b/packages/web/app/src/components/v2/modals/delete-target.tsx index ae7a01f9f..7605113d5 100644 --- a/packages/web/app/src/components/v2/modals/delete-target.tsx +++ b/packages/web/app/src/components/v2/modals/delete-target.tsx @@ -1,7 +1,6 @@ import { ReactElement } from 'react'; import { useRouter } from 'next/router'; import { useMutation } from 'urql'; - import { Button, Heading, Modal } from '@/components/v2'; import { TrashIcon } from '@/components/v2/icon'; import { DeleteTargetDocument } from '@/graphql'; diff --git a/packages/web/app/src/components/v2/modals/transfer-organization-ownership.tsx b/packages/web/app/src/components/v2/modals/transfer-organization-ownership.tsx index a84e90f9c..18e1a27c8 100644 --- a/packages/web/app/src/components/v2/modals/transfer-organization-ownership.tsx +++ b/packages/web/app/src/components/v2/modals/transfer-organization-ownership.tsx @@ -4,7 +4,6 @@ import clsx from 'clsx'; import { useFormik } from 'formik'; import { gql, useMutation, useQuery } from 'urql'; import * as Yup from 'yup'; - import { Button, Heading, Input, Modal } from '@/components/v2'; import { ArrowDownIcon, CheckIcon } from '@/components/v2/icon'; import { MemberFieldsFragment, OrganizationFieldsFragment } from '@/graphql'; diff --git a/packages/web/app/src/components/v2/project-types.tsx b/packages/web/app/src/components/v2/project-types.tsx index 6670f18f2..43f5bb972 100644 --- a/packages/web/app/src/components/v2/project-types.tsx +++ b/packages/web/app/src/components/v2/project-types.tsx @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import Image, { ImageProps } from 'next/image'; import { RadioGroupProps } from '@radix-ui/react-radio-group'; import clsx from 'clsx'; - import { Radio, RadioGroup } from '@/components/v2'; import { ProjectType } from '@/graphql'; import custom from '../../../public/images/figures/custom.svg'; @@ -42,7 +41,9 @@ const PROJECTS: { }, ]; -export const ProjectTypes = ({ children, className, ...props }: RadioGroupProps): ReactElement => { +export const ProjectTypes = ( + props: Omit, +): ReactElement => { return ( {PROJECTS.map(({ type, image, title, description }) => { diff --git a/packages/web/app/src/components/v2/select.tsx b/packages/web/app/src/components/v2/select.tsx index 9364e5ae0..2b0fd6a92 100644 --- a/packages/web/app/src/components/v2/select.tsx +++ b/packages/web/app/src/components/v2/select.tsx @@ -2,7 +2,6 @@ import { ComponentProps, ReactElement } from 'react'; import * as SelectPrimitive from '@radix-ui/react-select'; import clsx from 'clsx'; import { VscCheck, VscChevronDown, VscChevronUp } from 'react-icons/vsc'; - import { ArrowDownIcon } from '@/components/v2/icon'; export function RadixSelect(props: { diff --git a/packages/web/app/src/components/v2/tabs.tsx b/packages/web/app/src/components/v2/tabs.tsx index 10bd15db9..69646ce9d 100644 --- a/packages/web/app/src/components/v2/tabs.tsx +++ b/packages/web/app/src/components/v2/tabs.tsx @@ -29,11 +29,8 @@ const List: FC = ({ children, className, ...props }) => ( ); -const Trigger: FC = forwardRef( - ( - { children, className, hasBorder = true, ...props }, - forwardedRef /* when has asChild prop */, - ) => ( +const Trigger: FC & { hasBorder?: boolean }> = forwardRef( + ({ children, hasBorder = true, ...props }, forwardedRef /* when has asChild prop */) => ( { const emailsService = createTRPCProxyClient({ diff --git a/packages/web/app/src/config/supertokens/frontend.ts b/packages/web/app/src/config/supertokens/frontend.ts index 43c741887..21c7c505a 100644 --- a/packages/web/app/src/config/supertokens/frontend.ts +++ b/packages/web/app/src/config/supertokens/frontend.ts @@ -1,15 +1,15 @@ -import ThirdPartyEmailPasswordReact from 'supertokens-auth-react/recipe/thirdpartyemailpassword'; +import Provider from 'supertokens-auth-react/lib/build/recipe/thirdparty/providers'; +import { CustomProviderConfig } from 'supertokens-auth-react/lib/build/recipe/thirdparty/providers/types'; import EmailVerification from 'supertokens-auth-react/recipe/emailverification'; import SessionReact from 'supertokens-auth-react/recipe/session'; -import Provider from 'supertokens-auth-react/lib/build/recipe/thirdparty/providers'; +import ThirdPartyEmailPasswordReact from 'supertokens-auth-react/recipe/thirdpartyemailpassword'; import { env } from '@/env/frontend'; import { appInfo } from '@/lib/supertokens/app-info'; -import { CustomProviderConfig } from 'supertokens-auth-react/lib/build/recipe/thirdparty/providers/types'; -import { createThirdPartyEmailPasswordReactOktaProvider } from '@/lib/supertokens/third-party-email-password-react-okta-provider'; import { createThirdPartyEmailPasswordReactOIDCProvider, getOIDCOverrides, } from '@/lib/supertokens/third-party-email-password-react-oidc-provider'; +import { createThirdPartyEmailPasswordReactOktaProvider } from '@/lib/supertokens/third-party-email-password-react-okta-provider'; export const frontendConfig = () => { const providers: Array = []; diff --git a/packages/web/app/src/lib/access/target.ts b/packages/web/app/src/lib/access/target.ts index 00d1f6bdd..76056acf4 100644 --- a/packages/web/app/src/lib/access/target.ts +++ b/packages/web/app/src/lib/access/target.ts @@ -1,5 +1,5 @@ -import { useRedirect } from './common'; import { MemberFieldsFragment, TargetAccessScope } from '../../graphql'; +import { useRedirect } from './common'; export { TargetAccessScope } from '../../graphql'; diff --git a/packages/web/app/src/lib/api/extract-access-token-from-request.ts b/packages/web/app/src/lib/api/extract-access-token-from-request.ts index 4f37caacb..e6d98ef05 100644 --- a/packages/web/app/src/lib/api/extract-access-token-from-request.ts +++ b/packages/web/app/src/lib/api/extract-access-token-from-request.ts @@ -1,9 +1,9 @@ +import type { NextApiRequest, NextApiResponse } from 'next'; import supertokens from 'supertokens-node'; +import type { SessionContainerInterface } from 'supertokens-node/lib/build/recipe/session/types'; import { superTokensNextWrapper } from 'supertokens-node/nextjs'; import { verifySession } from 'supertokens-node/recipe/session/framework/express'; -import type { NextApiRequest, NextApiResponse } from 'next'; import { backendConfig } from '@/config/supertokens/backend'; -import type { SessionContainerInterface } from 'supertokens-node/lib/build/recipe/session/types'; supertokens.init(backendConfig()); diff --git a/packages/web/app/src/lib/api/utils.ts b/packages/web/app/src/lib/api/utils.ts index da610600a..5cd3c13bf 100644 --- a/packages/web/app/src/lib/api/utils.ts +++ b/packages/web/app/src/lib/api/utils.ts @@ -1,5 +1,5 @@ -import { stripIgnoredCharacters } from 'graphql'; import type { ExecutionResult } from 'graphql'; +import { stripIgnoredCharacters } from 'graphql'; export async function graphql({ url, diff --git a/packages/web/app/src/lib/billing/stripe.tsx b/packages/web/app/src/lib/billing/stripe.tsx index de0731481..34a869240 100644 --- a/packages/web/app/src/lib/billing/stripe.tsx +++ b/packages/web/app/src/lib/billing/stripe.tsx @@ -1,7 +1,7 @@ -import { Elements as ElementsProvider } from '@stripe/react-stripe-js'; import React, { PropsWithChildren } from 'react'; -import { getStripePublicKey } from './stripe-public-key'; +import { Elements as ElementsProvider } from '@stripe/react-stripe-js'; import { loadStripe } from '@stripe/stripe-js'; +import { getStripePublicKey } from './stripe-public-key'; export const HiveStripeWrapper = ({ children }: PropsWithChildren) => { const [stripe] = React.useState(() => { diff --git a/packages/web/app/src/lib/hooks/use-local-storage.ts b/packages/web/app/src/lib/hooks/use-local-storage.ts index cbf60c4dd..939b8f23f 100644 --- a/packages/web/app/src/lib/hooks/use-local-storage.ts +++ b/packages/web/app/src/lib/hooks/use-local-storage.ts @@ -1,4 +1,4 @@ -import { useState, useCallback } from 'react'; +import { useCallback, useState } from 'react'; export function useLocalStorage(key: string, defaultValue: T) { const [value, setValue] = useState(() => { diff --git a/packages/web/app/src/lib/hooks/use-toggle.ts b/packages/web/app/src/lib/hooks/use-toggle.ts index ebf478143..476712f3b 100644 --- a/packages/web/app/src/lib/hooks/use-toggle.ts +++ b/packages/web/app/src/lib/hooks/use-toggle.ts @@ -1,4 +1,4 @@ -import { useState, useCallback } from 'react'; +import { useCallback, useState } from 'react'; export function useToggle(defaultValue = false) { const [value, setValue] = useState(defaultValue); diff --git a/packages/web/app/src/lib/supertokens/start-auth-flow-for-provider.ts b/packages/web/app/src/lib/supertokens/start-auth-flow-for-provider.ts index d808c94e0..d1cfb5189 100644 --- a/packages/web/app/src/lib/supertokens/start-auth-flow-for-provider.ts +++ b/packages/web/app/src/lib/supertokens/start-auth-flow-for-provider.ts @@ -1,5 +1,5 @@ -import { env } from '@/env/frontend'; import { getAuthorisationURLWithQueryParamsAndSetState } from 'supertokens-auth-react/recipe/thirdpartyemailpassword'; +import { env } from '@/env/frontend'; /** * utility for starting the login flow manually without clicking a button diff --git a/packages/web/app/src/lib/supertokens/third-party-email-password-node-oidc-provider.ts b/packages/web/app/src/lib/supertokens/third-party-email-password-node-oidc-provider.ts index 0d5bd9fae..9763a968f 100644 --- a/packages/web/app/src/lib/supertokens/third-party-email-password-node-oidc-provider.ts +++ b/packages/web/app/src/lib/supertokens/third-party-email-password-node-oidc-provider.ts @@ -1,10 +1,10 @@ -import zod from 'zod'; +import type { InternalApi } from '@hive/server'; +import type { inferRouterProxyClient } from '@trpc/client'; +import { ExpressRequest } from 'supertokens-node/lib/build/framework/express/framework'; import ThirdPartyEmailPasswordNode from 'supertokens-node/recipe/thirdpartyemailpassword'; import type { TypeInput as ThirdPartEmailPasswordTypeInput } from 'supertokens-node/recipe/thirdpartyemailpassword/types'; +import zod from 'zod'; import { env } from '@/env/backend'; -import { ExpressRequest } from 'supertokens-node/lib/build/framework/express/framework'; -import type { inferRouterProxyClient } from '@trpc/client'; -import type { InternalApi } from '@hive/server'; const OIDCProfileInfoSchema = zod.object({ sub: zod.string(), diff --git a/packages/web/app/src/lib/supertokens/third-party-email-password-node-okta-provider.ts b/packages/web/app/src/lib/supertokens/third-party-email-password-node-okta-provider.ts index e0480b34b..3ee03dc8b 100644 --- a/packages/web/app/src/lib/supertokens/third-party-email-password-node-okta-provider.ts +++ b/packages/web/app/src/lib/supertokens/third-party-email-password-node-okta-provider.ts @@ -1,6 +1,6 @@ -import { env } from '@/env/backend'; import type { TypeProvider } from 'supertokens-node/recipe/thirdpartyemailpassword'; import zod from 'zod'; +import { env } from '@/env/backend'; type OktaConfig = Exclude; diff --git a/packages/web/app/src/lib/supertokens/third-party-email-password-react-oidc-provider.ts b/packages/web/app/src/lib/supertokens/third-party-email-password-react-oidc-provider.ts index 8f27c70f4..1966f251f 100644 --- a/packages/web/app/src/lib/supertokens/third-party-email-password-react-oidc-provider.ts +++ b/packages/web/app/src/lib/supertokens/third-party-email-password-react-oidc-provider.ts @@ -1,6 +1,6 @@ -import { env } from '@/env/frontend'; import { UserInput } from 'supertokens-auth-react/lib/build/recipe/thirdpartyemailpassword/types'; import { getAuthorisationURLWithQueryParamsAndSetState } from 'supertokens-auth-react/recipe/thirdpartyemailpassword'; +import { env } from '@/env/frontend'; export const createThirdPartyEmailPasswordReactOIDCProvider = () => ({ id: 'oidc', diff --git a/packages/web/app/src/lib/urql-cache.ts b/packages/web/app/src/lib/urql-cache.ts index 2a2be7f4e..66e5f5252 100644 --- a/packages/web/app/src/lib/urql-cache.ts +++ b/packages/web/app/src/lib/urql-cache.ts @@ -1,45 +1,43 @@ /* eslint-disable import/no-extraneous-dependencies */ -import { getOperationName, TypedDocumentNode } from 'urql'; import { ResultOf, VariablesOf } from '@graphql-typed-document-node/core'; -import { Cache, UpdateResolver, QueryInput } from '@urql/exchange-graphcache'; +import { Cache, QueryInput, UpdateResolver } from '@urql/exchange-graphcache'; import produce from 'immer'; +import { getOperationName, TypedDocumentNode } from 'urql'; import { - TokensDocument, + ExternalComposition_DisableMutation, + ExternalComposition_ProjectConfigurationQuery, + ExternalCompositionForm_EnableMutation, +} from '@/components/project/settings/external-composition'; +import { + InvitationDeleteButton_DeleteInvitation, + MemberInvitationForm_InviteByEmail, + Members_OrganizationMembers, +} from '../../pages/[orgId]/members'; +import { + AddAlertChannelDocument, + AddAlertDocument, + AlertChannelsDocument, + AlertsDocument, + CheckIntegrationsDocument, + CreateOrganizationDocument, + CreateProjectDocument, + CreateTargetDocument, + CreateTokenDocument, + DeleteAlertChannelsDocument, + DeleteAlertsDocument, + DeleteGitHubIntegrationDocument, + DeleteOrganizationDocument, + DeletePersistedOperationDocument, + DeleteProjectDocument, + DeleteSlackIntegrationDocument, + DeleteTargetDocument, + DeleteTokensDocument, OrganizationsDocument, ProjectsDocument, TargetsDocument, - CheckIntegrationsDocument, - CreateTokenDocument, - AlertChannelsDocument, - AddAlertChannelDocument, - DeleteAlertChannelsDocument, - AlertsDocument, - AddAlertDocument, - DeleteAlertsDocument, - DeleteTokensDocument, - CreateOrganizationDocument, - DeleteOrganizationDocument, - CreateProjectDocument, - DeleteProjectDocument, - CreateTargetDocument, - DeleteTargetDocument, - DeletePersistedOperationDocument, - DeleteSlackIntegrationDocument, - DeleteGitHubIntegrationDocument, + TokensDocument, } from '../graphql'; -import { - MemberInvitationForm_InviteByEmail, - InvitationDeleteButton_DeleteInvitation, - Members_OrganizationMembers, -} from '../../pages/[orgId]/members'; - -import { - ExternalCompositionForm_EnableMutation, - ExternalComposition_DisableMutation, - ExternalComposition_ProjectConfigurationQuery, -} from '@/components/project/settings/external-composition'; - function updateQuery(cache: Cache, input: QueryInput, recipe: (obj: T) => void) { return cache.updateQuery(input, (data: T | null) => { if (!data) { diff --git a/packages/web/app/src/lib/urql-exchanges/state.ts b/packages/web/app/src/lib/urql-exchanges/state.ts index fa65408c5..8b45f844f 100644 --- a/packages/web/app/src/lib/urql-exchanges/state.ts +++ b/packages/web/app/src/lib/urql-exchanges/state.ts @@ -1,6 +1,6 @@ import type { Exchange, Operation } from 'urql'; -import { map, pipe, tap } from 'wonka'; import { proxy, useSnapshot } from 'valtio'; +import { map, pipe, tap } from 'wonka'; const inflightRequests = new Set(); diff --git a/packages/web/app/src/lib/urql.ts b/packages/web/app/src/lib/urql.ts index 3ed02f87c..1fcb17e89 100644 --- a/packages/web/app/src/lib/urql.ts +++ b/packages/web/app/src/lib/urql.ts @@ -1,6 +1,5 @@ -import { createClient, dedupExchange, errorExchange, fetchExchange } from 'urql'; import { cacheExchange } from '@urql/exchange-graphcache'; - +import { createClient, dedupExchange, errorExchange, fetchExchange } from 'urql'; import { Mutation } from './urql-cache'; import { networkStatusExchange } from './urql-exchanges/state'; diff --git a/packages/web/docs/theme.config.tsx b/packages/web/docs/theme.config.tsx index 40fbdacab..f3868490c 100644 --- a/packages/web/docs/theme.config.tsx +++ b/packages/web/docs/theme.config.tsx @@ -1,6 +1,6 @@ /* eslint sort-keys: error */ -import { defineConfig, useTheme, Giscus } from '@theguild/components'; import { useRouter } from 'next/router'; +import { defineConfig, Giscus, useTheme } from '@theguild/components'; export default defineConfig({ docsRepositoryBase: 'https://github.com/kamilkisiela/graphql-hive/tree/main/packages/web/docs', diff --git a/packages/web/landing-page/src/pages/_document.tsx b/packages/web/landing-page/src/pages/_document.tsx index ca06446fe..8aa794115 100644 --- a/packages/web/landing-page/src/pages/_document.tsx +++ b/packages/web/landing-page/src/pages/_document.tsx @@ -1,4 +1,4 @@ -import Document, { Html, Head, Main, NextScript } from 'next/document'; +import Document, { Head, Html, Main, NextScript } from 'next/document'; export default class MyDocument extends Document { render() { const richData = { diff --git a/packages/web/landing-page/src/pages/index.tsx b/packages/web/landing-page/src/pages/index.tsx index 970ce5cb1..041ff0b2a 100644 --- a/packages/web/landing-page/src/pages/index.tsx +++ b/packages/web/landing-page/src/pages/index.tsx @@ -1,13 +1,13 @@ -import { ReactElement, useState, useCallback, ReactNode } from 'react'; -import { useMounted } from '@theguild/components'; -import * as Tooltip from '@radix-ui/react-tooltip'; -import clsx from 'clsx'; -import { FiServer, FiGlobe, FiRadio, FiGithub } from 'react-icons/fi'; -import { Pricing } from '../pricing'; -import schemaHistoryImage from '../../public/features/schema-history.png'; -import monitoringImage from '../../public/features/monitoring-preview.png'; -import cicdImage from '../../public/any-ci-cd.svg'; +import { ReactElement, ReactNode, useCallback, useState } from 'react'; import Image, { StaticImageData } from 'next/image'; +import * as Tooltip from '@radix-ui/react-tooltip'; +import { useMounted } from '@theguild/components'; +import clsx from 'clsx'; +import { FiGithub, FiGlobe, FiRadio, FiServer } from 'react-icons/fi'; +import cicdImage from '../../public/any-ci-cd.svg'; +import monitoringImage from '../../public/features/monitoring-preview.png'; +import schemaHistoryImage from '../../public/features/schema-history.png'; +import { Pricing } from '../pricing'; const classes = { link: clsx( diff --git a/packages/web/landing-page/src/pricing.tsx b/packages/web/landing-page/src/pricing.tsx index 4d4ac0795..17a8d03ca 100644 --- a/packages/web/landing-page/src/pricing.tsx +++ b/packages/web/landing-page/src/pricing.tsx @@ -1,5 +1,5 @@ -import { ReactNode, ReactElement } from 'react'; -import { Root, Trigger, Content, Arrow } from '@radix-ui/react-tooltip'; +import { ReactElement, ReactNode } from 'react'; +import { Arrow, Content, Root, Trigger } from '@radix-ui/react-tooltip'; function Tooltip({ content, children }: { content: string; children: ReactNode }) { return ( diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f15f2efaf..1a505977f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,11 +42,10 @@ importers: '@graphql-inspector/cli': 3.4.0 '@sentry/cli': 2.11.0 '@swc/core': 1.3.24 + '@theguild/eslint-config': 0.4.0 '@theguild/prettier-config': 1.0.0 '@types/jest': 29.2.4 '@types/node': 18.11.18 - '@typescript-eslint/eslint-plugin': 5.47.1 - '@typescript-eslint/parser': 5.47.1 babel-jest: 29.3.1 babel-plugin-parameter-decorator: 1.0.16 babel-plugin-transform-typescript-metadata: 0.3.2 @@ -57,11 +56,6 @@ importers: eslint: 8.30.0 eslint-plugin-cypress: 2.12.1 eslint-plugin-hive: file:./rules - eslint-plugin-import: 2.26.0 - eslint-plugin-jsx-a11y: 6.6.1 - eslint-plugin-react: 7.31.11 - eslint-plugin-react-hooks: 4.6.0 - eslint-plugin-simple-import-sort: 8.0.0 eslint-plugin-tailwindcss: 3.7.1 fs-extra: 11.1.0 glob: 8.0.3 @@ -97,11 +91,10 @@ importers: '@graphql-inspector/cli': 3.4.0_jwu2wi6x3ji7ggupbvyruied7a '@sentry/cli': 2.11.0 '@swc/core': 1.3.24 + '@theguild/eslint-config': 0.4.0_lzzuuodtsqwxnvqeq4g4likcqa '@theguild/prettier-config': 1.0.0_prettier@2.8.1 '@types/jest': 29.2.4 '@types/node': 18.11.18 - '@typescript-eslint/eslint-plugin': 5.47.1_txmweb6yn7coi7nfrp22gpyqmy - '@typescript-eslint/parser': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa babel-jest: 29.3.1_@babel+core@7.20.7 babel-plugin-parameter-decorator: 1.0.16 babel-plugin-transform-typescript-metadata: 0.3.2 @@ -112,11 +105,6 @@ importers: eslint: 8.30.0 eslint-plugin-cypress: 2.12.1_eslint@8.30.0 eslint-plugin-hive: file:rules - eslint-plugin-import: 2.26.0_smw3o7qjeokkcohbvp7rylsoqq - eslint-plugin-jsx-a11y: 6.6.1_eslint@8.30.0 - eslint-plugin-react: 7.31.11_eslint@8.30.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.30.0 - eslint-plugin-simple-import-sort: 8.0.0_eslint@8.30.0 eslint-plugin-tailwindcss: 3.7.1_ts-node@10.9.1 fs-extra: 11.1.0 glob: 8.0.3 @@ -1141,7 +1129,7 @@ importers: autoprefixer: 10.4.13_postcss@8.4.20 postcss: 8.4.20 rimraf: 3.0.2 - tailwindcss: 3.2.4_postcss@8.4.20 + tailwindcss: 3.2.4 tailwindcss-radix: 2.6.1 tslib: 2.4.1 @@ -1197,7 +1185,7 @@ importers: '@types/react': 18.0.26 next-sitemap: 3.1.43_syentjjt63dukspj2zj7hzem6y postcss: 8.4.20 - tailwindcss: 3.2.4_postcss@8.4.20 + tailwindcss: 3.2.4 packages: @@ -5004,7 +4992,7 @@ packages: dependencies: '@babel/helper-module-imports': 7.18.6 '@babel/plugin-syntax-jsx': 7.18.6 - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@emotion/hash': 0.9.0 '@emotion/memoize': 0.8.0 '@emotion/serialize': 1.1.1 @@ -5583,6 +5571,16 @@ packages: dev: false optional: true + /@eslint-community/eslint-utils/4.1.2_eslint@8.30.0: + resolution: {integrity: sha512-7qELuQWWjVDdVsFQ5+beUl+KPczrEDA7S3zM4QUd/bJl7oXgsmpXaEVqrRTnOBqenOV4rWf2kVZk2Ot085zPWA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.30.0 + eslint-visitor-keys: 3.3.0 + dev: true + /@eslint/eslintrc/1.4.0: resolution: {integrity: sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -8856,26 +8854,26 @@ packages: /@radix-ui/number/1.0.0: resolution: {integrity: sha512-Ofwh/1HX69ZfJRiRBMTy7rgjAzHmwe4kW9C9Y99HTRUcYLUuVT0KESFj15rPjRgKJs20GPq8Bm5aEDJ8DuA3vA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 dev: false /@radix-ui/popper/0.1.0: resolution: {integrity: sha512-uzYeElL3w7SeNMuQpXiFlBhTT+JyaNMCwDfjKkrzugEcYrf5n52PHqncNdQPUtR42hJh8V9FsqyEDbDxkeNjJQ==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 csstype: 3.1.1 dev: false /@radix-ui/primitive/0.1.0: resolution: {integrity: sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 dev: false /@radix-ui/primitive/1.0.0: resolution: {integrity: sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 dev: false /@radix-ui/react-arrow/0.1.4_react@18.2.0: @@ -8883,7 +8881,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-primitive': 0.1.4_react@18.2.0 react: 18.2.0 dev: false @@ -8894,7 +8892,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-primitive': 1.0.1_biqbaboplfbrettd7655fr4n2y react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -8936,7 +8934,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 '@radix-ui/react-context': 0.1.1_react@18.2.0 '@radix-ui/react-primitive': 0.1.4_react@18.2.0 @@ -8950,7 +8948,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 '@radix-ui/react-context': 1.0.0_react@18.2.0 '@radix-ui/react-primitive': 1.0.1_biqbaboplfbrettd7655fr4n2y @@ -8964,7 +8962,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -8973,7 +8971,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -8982,7 +8980,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -8991,7 +8989,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9027,7 +9025,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9036,7 +9034,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/primitive': 0.1.0 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 '@radix-ui/react-primitive': 0.1.4_react@18.2.0 @@ -9052,7 +9050,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/primitive': 1.0.0 '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 '@radix-ui/react-primitive': 1.0.1_biqbaboplfbrettd7655fr4n2y @@ -9087,7 +9085,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9096,7 +9094,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9105,7 +9103,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 '@radix-ui/react-primitive': 0.1.4_react@18.2.0 '@radix-ui/react-use-callback-ref': 0.1.0_react@18.2.0 @@ -9118,7 +9116,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 '@radix-ui/react-primitive': 1.0.1_biqbaboplfbrettd7655fr4n2y '@radix-ui/react-use-callback-ref': 1.0.0_react@18.2.0 @@ -9131,7 +9129,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-use-layout-effect': 0.1.0_react@18.2.0 react: 18.2.0 dev: false @@ -9141,7 +9139,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-use-layout-effect': 1.0.0_react@18.2.0 react: 18.2.0 dev: false @@ -9151,7 +9149,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 '@radix-ui/react-context': 0.1.1_react@18.2.0 '@radix-ui/react-id': 0.1.5_react@18.2.0 @@ -9165,7 +9163,7 @@ packages: react: ^16.8 || ^17.0 react-dom: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/primitive': 0.1.0 '@radix-ui/react-collection': 0.1.4_react@18.2.0 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 @@ -9195,7 +9193,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/primitive': 1.0.0 '@radix-ui/react-collection': 1.0.1_biqbaboplfbrettd7655fr4n2y '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 @@ -9246,7 +9244,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/popper': 0.1.0 '@radix-ui/react-arrow': 0.1.4_react@18.2.0 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 @@ -9264,7 +9262,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@floating-ui/react-dom': 0.7.2_ib3m5ricvtkl2cll7qpr2f6lvq '@radix-ui/react-arrow': 1.0.1_biqbaboplfbrettd7655fr4n2y '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 @@ -9286,7 +9284,7 @@ packages: react: ^16.8 || ^17.0 react-dom: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-primitive': 0.1.4_react@18.2.0 '@radix-ui/react-use-layout-effect': 0.1.0_react@18.2.0 react: 18.2.0 @@ -9299,7 +9297,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-primitive': 1.0.1_biqbaboplfbrettd7655fr4n2y react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -9310,7 +9308,7 @@ packages: peerDependencies: react: '>=16.8' dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 '@radix-ui/react-use-layout-effect': 0.1.0_react@18.2.0 react: 18.2.0 @@ -9322,7 +9320,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 '@radix-ui/react-use-layout-effect': 1.0.0_react@18.2.0 react: 18.2.0 @@ -9334,7 +9332,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-slot': 0.1.2_react@18.2.0 react: 18.2.0 dev: false @@ -9345,7 +9343,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-slot': 1.0.1_react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -9375,7 +9373,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/primitive': 0.1.0 '@radix-ui/react-collection': 0.1.4_react@18.2.0 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 @@ -9425,7 +9423,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-primitive': 0.1.4_react@18.2.0 react: 18.2.0 dev: false @@ -9435,7 +9433,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 0.1.0_react@18.2.0 react: 18.2.0 dev: false @@ -9445,7 +9443,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-compose-refs': 1.0.0_react@18.2.0 react: 18.2.0 dev: false @@ -9502,7 +9500,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/primitive': 0.1.0 '@radix-ui/react-primitive': 0.1.4_react@18.2.0 '@radix-ui/react-use-controllable-state': 0.1.0_react@18.2.0 @@ -9554,7 +9552,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-use-layout-effect': 0.1.0_react@18.2.0 react: 18.2.0 dev: false @@ -9564,7 +9562,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9573,7 +9571,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9582,7 +9580,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-use-callback-ref': 0.1.0_react@18.2.0 react: 18.2.0 dev: false @@ -9592,7 +9590,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-use-callback-ref': 1.0.0_react@18.2.0 react: 18.2.0 dev: false @@ -9602,7 +9600,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9611,7 +9609,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-use-callback-ref': 0.1.0_react@18.2.0 react: 18.2.0 dev: false @@ -9621,7 +9619,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-use-callback-ref': 1.0.0_react@18.2.0 react: 18.2.0 dev: false @@ -9631,7 +9629,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9640,7 +9638,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9649,7 +9647,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9658,7 +9656,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9667,7 +9665,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/rect': 0.1.1 react: 18.2.0 dev: false @@ -9677,7 +9675,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/rect': 1.0.0 react: 18.2.0 dev: false @@ -9687,7 +9685,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -9696,7 +9694,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-use-layout-effect': 1.0.0_react@18.2.0 react: 18.2.0 dev: false @@ -9707,7 +9705,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@radix-ui/react-primitive': 1.0.1_biqbaboplfbrettd7655fr4n2y react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -9716,13 +9714,13 @@ packages: /@radix-ui/rect/0.1.1: resolution: {integrity: sha512-g3hnE/UcOg7REdewduRPAK88EPuLZtaq7sA9ouu8S+YEtnyFRI16jgv6GZYe3VMoQLL1T171ebmEPtDjyxWLzw==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 dev: false /@radix-ui/rect/1.0.0: resolution: {integrity: sha512-d0O68AYy/9oeEy1DdC07bz1/ZXX+DqCskRd3i4JzLSTXwefzaepQrKjXC7aNM8lTHjFLDO0pDgaEiQ7jEk+HVg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 dev: false /@reach/alert/0.13.2_biqbaboplfbrettd7655fr4n2y: @@ -10055,6 +10053,10 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 + /@rushstack/eslint-patch/1.2.0: + resolution: {integrity: sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==} + dev: true + /@rushstack/ts-command-line/4.12.5: resolution: {integrity: sha512-PCKrOu4RXKXPHcswHEQ9MYDW7Z7iQ+vbkvPtqHC46zFxD67ZCBXkm9P8QNOtED0cQzXh5nCtFnSOMuaOQf0GaQ==} dependencies: @@ -10483,7 +10485,7 @@ packages: peerDependencies: tailwindcss: '>=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1' dependencies: - tailwindcss: 3.2.4_postcss@8.4.20 + tailwindcss: 3.2.4 dev: true /@tanstack/react-table/8.0.0-beta.8_biqbaboplfbrettd7655fr4n2y: @@ -10588,6 +10590,35 @@ packages: - utf-8-validate dev: false + /@theguild/eslint-config/0.4.0_lzzuuodtsqwxnvqeq4g4likcqa: + resolution: {integrity: sha512-5XZTmLFGRgtHqVdgivurcO/QCLpMjFkRTaX+N0Y3faxsnLGVFCvXhYBHMyGfi/8ZN+tC7KKRp52n/ArzxoWPXA==} + peerDependencies: + eslint: ^8 + dependencies: + '@rushstack/eslint-patch': 1.2.0 + '@typescript-eslint/eslint-plugin': 5.47.1_txmweb6yn7coi7nfrp22gpyqmy + '@typescript-eslint/parser': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa + eslint: 8.30.0 + eslint-config-prettier: 8.5.0_eslint@8.30.0 + eslint-plugin-import: 2.26.0_smw3o7qjeokkcohbvp7rylsoqq + eslint-plugin-jsonc: 2.5.0_eslint@8.30.0 + eslint-plugin-jsx-a11y: 6.6.1_eslint@8.30.0 + eslint-plugin-mdx: 2.0.5_eslint@8.30.0 + eslint-plugin-n: 15.6.0_eslint@8.30.0 + eslint-plugin-promise: 6.1.1_eslint@8.30.0 + eslint-plugin-react: 7.31.11_eslint@8.30.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.30.0 + eslint-plugin-simple-import-sort: 8.0.0_eslint@8.30.0 + eslint-plugin-sonarjs: 0.17.0_eslint@8.30.0 + eslint-plugin-unicorn: 45.0.2_eslint@8.30.0 + eslint-plugin-yml: 1.4.0_eslint@8.30.0 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - typescript + dev: true + /@theguild/prettier-config/1.0.0_prettier@2.8.1: resolution: {integrity: sha512-EdPbtrXN1Z0QqmFJZXGj4n/xLZTCJtDxb+jeNGmOccrv0cJTB46d+lsvCO8j7SmuUhyt/gv9B6nnVKt66D2X1w==} peerDependencies: @@ -10605,7 +10636,7 @@ packages: cssnano: 5.1.14_postcss@8.4.19 postcss: 8.4.19 postcss-import: 15.0.0_postcss@8.4.19 - tailwindcss: 3.2.4_postcss@8.4.19 + tailwindcss: 3.2.4 transitivePeerDependencies: - ts-node dev: true @@ -10653,7 +10684,6 @@ packages: resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} dependencies: '@types/estree': 1.0.0 - dev: false /@types/argparse/1.0.38: resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} @@ -10735,7 +10765,6 @@ packages: resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} dependencies: '@types/ms': 0.7.31 - dev: false /@types/docker-modem/3.0.2: resolution: {integrity: sha512-qC7prjoEYR2QEe6SmCVfB1x3rfcQtUr1n4x89+3e0wSTMQ/KYCyf+/RAA9n2tllkkNc6//JMUZePdFRiGIWfaQ==} @@ -10765,7 +10794,6 @@ packages: resolution: {integrity: sha512-3qvGd0z8F2ENTGr/GG1yViqfiKmRfrXVx5sJyHGFu3z7m5g5utCQtGp/g29JnjflhtQJBv1WDQukHiT58xPcYQ==} dependencies: '@types/estree': 1.0.0 - dev: false /@types/estree/0.0.39: resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} @@ -10773,7 +10801,6 @@ packages: /@types/estree/1.0.0: resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} - dev: false /@types/expect/1.20.4: resolution: {integrity: sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==} @@ -10810,7 +10837,6 @@ packages: resolution: {integrity: sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==} dependencies: '@types/unist': 2.0.6 - dev: false /@types/http-cache-semantics/4.0.1: resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} @@ -10832,7 +10858,7 @@ packages: /@types/is-ci/3.0.0: resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} dependencies: - ci-info: 3.5.0 + ci-info: 3.7.0 dev: true /@types/is-stream/1.1.0: @@ -10933,7 +10959,6 @@ packages: resolution: {integrity: sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==} dependencies: '@types/unist': 2.0.6 - dev: false /@types/mdx/2.0.2: resolution: {integrity: sha512-mJGfgj4aWpiKb8C0nnJJchs1sHBHn0HugkVfqqyQi7Wn6mBRksLeQsPOFvih/Pu8L1vlDzfe/LidhVHBeUk3aQ==} @@ -11151,7 +11176,6 @@ packages: /@types/unist/2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} - dev: false /@types/uuid/8.3.4: resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} @@ -11823,17 +11847,6 @@ packages: engines: {node: '>=8'} dev: true - /array-includes/3.1.5: - resolution: {integrity: sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 - get-intrinsic: 1.1.3 - is-string: 1.0.7 - dev: true - /array-includes/3.1.6: resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} engines: {node: '>= 0.4'} @@ -12125,7 +12138,7 @@ packages: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 cosmiconfig: 7.0.1 resolve: 1.22.1 dev: false @@ -12248,7 +12261,6 @@ packages: /bail/2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} - dev: false /balanced-match/1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -12733,7 +12745,6 @@ packages: /ccount/2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - dev: false /chalk/1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} @@ -12830,19 +12841,27 @@ packages: /character-entities-html4/2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} - dev: false + + /character-entities-legacy/1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + dev: true /character-entities-legacy/3.0.0: resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} - dev: false + + /character-entities/1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + dev: true /character-entities/2.0.2: resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} - dev: false + + /character-reference-invalid/1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + dev: true /character-reference-invalid/2.0.1: resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} - dev: false /chardet/0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} @@ -12907,6 +12926,10 @@ packages: /ci-info/3.5.0: resolution: {integrity: sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==} + /ci-info/3.7.0: + resolution: {integrity: sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==} + engines: {node: '>=8'} + /cjs-module-lexer/1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} @@ -12921,6 +12944,13 @@ packages: source-map: 0.6.1 dev: false + /clean-regexp/1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /clean-set/1.1.2: resolution: {integrity: sha512-cA8uCj0qSoG9e0kevyOWXwPaELRPVg5Pxp6WskLMwerx257Zfnh8Nl0JBH59d7wQzij2CK7qEfJQK3RjuKKIug==} dev: false @@ -14334,7 +14364,6 @@ packages: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} dependencies: character-entities: 2.0.2 - dev: false /decompress-response/6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} @@ -14453,7 +14482,6 @@ packages: /dequal/2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} - dev: false /destroy/1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} @@ -14576,7 +14604,7 @@ packages: /dom-helpers/5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 csstype: 3.1.1 dev: false @@ -15130,6 +15158,15 @@ packages: engines: {node: '>=12'} dev: false + /eslint-config-prettier/8.5.0_eslint@8.30.0: + resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + dependencies: + eslint: 8.30.0 + dev: true + /eslint-import-resolver-node/0.3.6: resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==} dependencies: @@ -15139,6 +15176,31 @@ packages: - supports-color dev: true + /eslint-mdx/2.0.5_eslint@8.30.0: + resolution: {integrity: sha512-1ZzcJwJNfladtuK+uuG/MdC0idc1e3d1vCI2STOq/pLcJBGuao2biWh90vEh2M93zDiNoHJGUIU7UAxupiiHFw==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '>=8.0.0' + dependencies: + acorn: 8.8.0 + acorn-jsx: 5.3.2_acorn@8.8.0 + cosmiconfig: 7.0.1 + eslint: 8.30.0 + espree: 9.4.0 + estree-util-visit: 1.2.0 + remark-mdx: 2.1.5 + remark-parse: 10.0.1 + remark-stringify: 10.0.2 + synckit: 0.8.4 + tslib: 2.4.1 + unified: 10.1.2 + unist-util-visit: 4.1.1 + uvu: 0.5.6 + vfile: 5.3.5 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-module-utils/2.7.4_ehosaqfug4in6rsga5hlj3hmya: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} @@ -15177,6 +15239,17 @@ packages: globals: 11.12.0 dev: true + /eslint-plugin-es/4.1.0_eslint@8.30.0: + resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} + engines: {node: '>=8.10.0'} + peerDependencies: + eslint: '>=4.19.1' + dependencies: + eslint: 8.30.0 + eslint-utils: 2.1.0 + regexpp: 3.2.0 + dev: true + /eslint-plugin-import/2.26.0_smw3o7qjeokkcohbvp7rylsoqq: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} @@ -15188,7 +15261,7 @@ packages: optional: true dependencies: '@typescript-eslint/parser': 5.47.1_lzzuuodtsqwxnvqeq4g4likcqa - array-includes: 3.1.5 + array-includes: 3.1.6 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 @@ -15196,10 +15269,10 @@ packages: eslint-import-resolver-node: 0.3.6 eslint-module-utils: 2.7.4_ehosaqfug4in6rsga5hlj3hmya has: 1.0.3 - is-core-module: 2.10.0 + is-core-module: 2.11.0 is-glob: 4.0.3 minimatch: 3.1.2 - object.values: 1.1.5 + object.values: 1.1.6 resolve: 1.22.1 tsconfig-paths: 3.14.1 transitivePeerDependencies: @@ -15208,9 +15281,22 @@ packages: - supports-color dev: true + /eslint-plugin-jsonc/2.5.0_eslint@8.30.0: + resolution: {integrity: sha512-G257khwkrOQ5MJpSzz4yQh5K12W4xFZRcHmVlhVFWh2GCLDX+JwHnmkQoUoFDbOieSPBMsPFZDTJScwrXiWlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + eslint: 8.30.0 + eslint-utils: 3.0.0_eslint@8.30.0 + jsonc-eslint-parser: 2.1.0 + natural-compare: 1.4.0 + dev: true + /eslint-plugin-jsx-a11y/6.6.1_eslint@8.30.0: resolution: {integrity: sha512-sXgFVNHiWffBq23uiS/JaP6eVR622DqwB4yTzKvGZGcPq6/yZ3WmOZfuBks/vHWo9GaFOqC2ZK4i6+C35knx7Q==} engines: {node: '>=4.0'} + requiresBuild: true peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: @@ -15230,9 +15316,68 @@ packages: semver: 6.3.0 dev: true + /eslint-plugin-markdown/3.0.0_eslint@8.30.0: + resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.30.0 + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-mdx/2.0.5_eslint@8.30.0: + resolution: {integrity: sha512-j2xN97jSlc5IoH94rJTHqYMztl46+hHzyC8Zqjx+OI1Rvv33isyf8xSSBHN6f0z8IJmgPgGsb/fH90JbvKplXg==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + requiresBuild: true + peerDependencies: + eslint: '>=8.0.0' + dependencies: + eslint: 8.30.0 + eslint-mdx: 2.0.5_eslint@8.30.0 + eslint-plugin-markdown: 3.0.0_eslint@8.30.0 + remark-mdx: 2.1.5 + remark-parse: 10.0.1 + remark-stringify: 10.0.2 + tslib: 2.4.1 + unified: 10.1.2 + vfile: 5.3.5 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-plugin-n/15.6.0_eslint@8.30.0: + resolution: {integrity: sha512-Hd/F7wz4Mj44Jp0H6Jtty13NcE69GNTY0rVlgTIj1XBnGGVI6UTdDrpE6vqu3AHo07bygq/N+7OH/lgz1emUJw==} + engines: {node: '>=12.22.0'} + peerDependencies: + eslint: '>=7.0.0' + dependencies: + builtins: 5.0.1 + eslint: 8.30.0 + eslint-plugin-es: 4.1.0_eslint@8.30.0 + eslint-utils: 3.0.0_eslint@8.30.0 + ignore: 5.2.0 + is-core-module: 2.11.0 + minimatch: 3.1.2 + resolve: 1.22.1 + semver: 7.3.8 + dev: true + + /eslint-plugin-promise/6.1.1_eslint@8.30.0: + resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.30.0 + dev: true + /eslint-plugin-react-hooks/4.6.0_eslint@8.30.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} + requiresBuild: true peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: @@ -15242,6 +15387,7 @@ packages: /eslint-plugin-react/7.31.11_eslint@8.30.0: resolution: {integrity: sha512-TTvq5JsT5v56wPa9OYHzsrOlHzKZKjV+aLgS+55NJP/cuzdiQPC7PfYoUjMoxlffKtvijpk7vA/jmuqRb9nohw==} engines: {node: '>=4'} + requiresBuild: true peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: @@ -15271,17 +15417,66 @@ packages: eslint: 8.30.0 dev: true + /eslint-plugin-sonarjs/0.17.0_eslint@8.30.0: + resolution: {integrity: sha512-jtGtxI49UbJJeJj7CVRLI3+LLH+y+hkR3GOOwM7vBbci9DEFIRGCWvEd2BJScrzltZ6D6iubukTAfc9cyG7sdw==} + engines: {node: '>=14'} + peerDependencies: + eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.30.0 + dev: true + /eslint-plugin-tailwindcss/3.7.1_ts-node@10.9.1: resolution: {integrity: sha512-MCPpVp5VvNYuRz1JYN9sN0r/cgAt3SfIlKbvYjVij+T/8r0z4U8nPY/c07vm+dLYb7mBv9N9LLIR4l9pLHSJaQ==} engines: {node: '>=12.13.0'} dependencies: fast-glob: 3.2.12 postcss: 8.4.20 - tailwindcss: 3.2.4_ra2vnoek4vhbzktaezawwqbin4 + tailwindcss: 3.2.4_ts-node@10.9.1 transitivePeerDependencies: - ts-node dev: true + /eslint-plugin-unicorn/45.0.2_eslint@8.30.0: + resolution: {integrity: sha512-Y0WUDXRyGDMcKLiwgL3zSMpHrXI00xmdyixEGIg90gHnj0PcHY4moNv3Ppje/kDivdAy5vUeUr7z211ImPv2gw==} + engines: {node: '>=14.18'} + peerDependencies: + eslint: '>=8.28.0' + dependencies: + '@babel/helper-validator-identifier': 7.19.1 + '@eslint-community/eslint-utils': 4.1.2_eslint@8.30.0 + ci-info: 3.7.0 + clean-regexp: 1.0.0 + eslint: 8.30.0 + esquery: 1.4.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.0 + jsesc: 3.0.2 + lodash: 4.17.21 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.24 + regjsparser: 0.9.1 + safe-regex: 2.1.1 + semver: 7.3.8 + strip-indent: 3.0.0 + dev: true + + /eslint-plugin-yml/1.4.0_eslint@8.30.0: + resolution: {integrity: sha512-vzggXNfPKa+arIaNUGoC3DPRZCxNty+xD/v9xOcE5D3Bj9SbgIrEobqVB35I8QxHd2YjL/dOS0xIIFmjAalwbw==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.30.0 + lodash: 4.17.21 + natural-compare: 1.4.0 + yaml-eslint-parser: 1.1.0 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-scope/5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -15298,6 +15493,13 @@ packages: estraverse: 5.3.0 dev: true + /eslint-utils/2.1.0: + resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} + engines: {node: '>=6'} + dependencies: + eslint-visitor-keys: 1.3.0 + dev: true + /eslint-utils/3.0.0_eslint@8.30.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} @@ -15308,6 +15510,11 @@ packages: eslint-visitor-keys: 2.1.0 dev: true + /eslint-visitor-keys/1.3.0: + resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} + engines: {node: '>=4'} + dev: true + /eslint-visitor-keys/2.1.0: resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} engines: {node: '>=10'} @@ -15424,7 +15631,6 @@ packages: /estree-util-is-identifier-name/2.0.1: resolution: {integrity: sha512-rxZj1GkQhY4x1j/CSnybK9cGuMFQYFPLq0iNyopqf14aOVLFtMv7Esika+ObJWPWiOHuMOAHz3YkWoLYYRnzWQ==} - dev: false /estree-util-to-js/1.1.0: resolution: {integrity: sha512-490lbfCcpLk+ofK6HCgqDfYs4KAfq6QVvDw3+Bm1YoKRgiOjKiKYGAVQE1uwh7zVxBgWhqp4FDtp5SqunpUk1A==} @@ -15446,7 +15652,6 @@ packages: dependencies: '@types/estree-jsx': 1.0.0 '@types/unist': 2.0.6 - dev: false /estree-walker/1.0.1: resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} @@ -17386,16 +17591,25 @@ packages: is-windows: 1.0.2 dev: true + /is-alphabetical/1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + dev: true + /is-alphabetical/2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} - dev: false + + /is-alphanumerical/1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + dev: true /is-alphanumerical/2.0.1: resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} dependencies: is-alphabetical: 2.0.1 is-decimal: 2.0.1 - dev: false /is-arguments/1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} @@ -17432,7 +17646,6 @@ packages: /is-buffer/2.0.5: resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} engines: {node: '>=4'} - dev: false /is-builtin-module/3.2.0: resolution: {integrity: sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==} @@ -17449,7 +17662,7 @@ packages: resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} hasBin: true dependencies: - ci-info: 3.5.0 + ci-info: 3.7.0 dev: true /is-color-stop/1.1.0: @@ -17467,6 +17680,12 @@ packages: resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} dependencies: has: 1.0.3 + dev: true + + /is-core-module/2.11.0: + resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} + dependencies: + has: 1.0.3 /is-date-object/1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} @@ -17474,9 +17693,12 @@ packages: dependencies: has-tostringtag: 1.0.0 + /is-decimal/1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + dev: true + /is-decimal/2.0.1: resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} - dev: false /is-docker/2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} @@ -17533,9 +17755,12 @@ packages: dependencies: is-extglob: 2.1.1 + /is-hexadecimal/1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + dev: true + /is-hexadecimal/2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} - dev: false /is-installed-globally/0.4.0: resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==} @@ -17604,7 +17829,6 @@ packages: /is-plain-obj/4.1.0: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} - dev: false /is-plain-object/2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} @@ -17987,7 +18211,7 @@ packages: '@jest/types': 29.3.1 babel-jest: 29.3.1_@babel+core@7.20.7 chalk: 4.1.2 - ci-info: 3.5.0 + ci-info: 3.7.0 deepmerge: 4.2.2 glob: 7.2.3 graceful-fs: 4.2.10 @@ -18025,7 +18249,7 @@ packages: '@types/node': 18.11.18 babel-jest: 29.3.1_@babel+core@7.20.7 chalk: 4.1.2 - ci-info: 3.5.0 + ci-info: 3.7.0 deepmerge: 4.2.2 glob: 7.2.3 graceful-fs: 4.2.10 @@ -18063,7 +18287,7 @@ packages: '@types/node': 18.11.18 babel-jest: 29.3.1_@babel+core@7.20.7 chalk: 4.1.2 - ci-info: 3.5.0 + ci-info: 3.7.0 deepmerge: 4.2.2 glob: 7.2.3 graceful-fs: 4.2.10 @@ -18349,7 +18573,7 @@ packages: '@jest/types': 29.3.1 '@types/node': 18.11.18 chalk: 4.1.2 - ci-info: 3.5.0 + ci-info: 3.7.0 graceful-fs: 4.2.10 picomatch: 2.3.1 dev: true @@ -18361,7 +18585,7 @@ packages: '@jest/types': 29.3.1 '@types/node': 18.11.18 chalk: 4.1.2 - ci-info: 3.5.0 + ci-info: 3.7.0 graceful-fs: 4.2.10 picomatch: 2.3.1 @@ -18513,6 +18737,12 @@ packages: engines: {node: '>=4'} hasBin: true + /jsesc/3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + dev: true + /json-buffer/3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} @@ -18569,6 +18799,16 @@ packages: engines: {node: '>=6'} hasBin: true + /jsonc-eslint-parser/2.1.0: + resolution: {integrity: sha512-qCRJWlbP2v6HbmKW7R3lFbeiVWHo+oMJ0j+MizwvauqnCV/EvtAeEeuCgoc/ErtsuoKgYB8U4Ih8AxJbXoE6/g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.8.0 + eslint-visitor-keys: 3.3.0 + espree: 9.4.0 + semver: 7.3.8 + dev: true + /jsonc-parser/3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: false @@ -19085,7 +19325,6 @@ packages: /longest-streak/3.0.1: resolution: {integrity: sha512-cHlYSUpL2s7Fb3394mYxwTYj8niTaNHUCLr0qdiCXQfSjfuA7CKofpX2uSwEfFDQ0EB7JcnMnm+GjbqqoinYYg==} - dev: false /loose-envify/1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} @@ -19279,7 +19518,7 @@ packages: /match-sorter/6.3.1: resolution: {integrity: sha512-mxybbo3pPNuA+ZuCUhm5bwNkXrJTbsk5VWbR5wiwz/GC6LIiegBGn2w3O08UG/jdbYLinw51fSQ5xNU1U3MgBw==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 remove-accents: 0.4.2 dev: false @@ -19299,6 +19538,18 @@ packages: unist-util-visit-parents: 5.1.1 dev: false + /mdast-util-from-markdown/0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + dependencies: + '@types/mdast': 3.0.10 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + dev: true + /mdast-util-from-markdown/1.2.0: resolution: {integrity: sha512-iZJyyvKD1+K7QX1b5jXdE7Sc5dtoTry1vzV28UZZe8Z1xVnB/czKntJ7ZAkG0tANqRnBF6p3p7GpU1y19DTf2Q==} dependencies: @@ -19316,7 +19567,6 @@ packages: uvu: 0.5.6 transitivePeerDependencies: - supports-color - dev: false /mdast-util-gfm-autolink-literal/1.0.2: resolution: {integrity: sha512-FzopkOd4xTTBeGXhXSBU0OCDDh5lUj2rd+HQqG92Ld+jL4lpUfgX2AT2OHAVP9aEeDKp7G92fuooSZcYJA3cRg==} @@ -19384,7 +19634,6 @@ packages: mdast-util-to-markdown: 1.3.0 transitivePeerDependencies: - supports-color - dev: false /mdast-util-mdx-jsx/2.1.0: resolution: {integrity: sha512-KzgzfWMhdteDkrY4mQtyvTU5bc/W4ppxhe9SzelO6QUUiwLAM+Et2Dnjjprik74a336kHdo0zKm7Tp+n6FFeRg==} @@ -19399,7 +19648,6 @@ packages: unist-util-remove-position: 4.0.1 unist-util-stringify-position: 3.0.2 vfile-message: 3.1.2 - dev: false /mdast-util-mdx/2.0.0: resolution: {integrity: sha512-M09lW0CcBT1VrJUaF/PYxemxxHa7SLDHdSn94Q9FhxjCQfuW7nMAWKWimTmA3OyDMSTH981NN1csW1X+HPSluw==} @@ -19409,7 +19657,6 @@ packages: mdast-util-mdxjs-esm: 1.3.0 transitivePeerDependencies: - supports-color - dev: false /mdast-util-mdxjs-esm/1.3.0: resolution: {integrity: sha512-7N5ihsOkAEGjFotIX9p/YPdl4TqUoMxL4ajNz7PbT89BqsdWJuBC9rvgt6wpbwTZqWWR0jKWqQbwsOWDBUZv4g==} @@ -19421,7 +19668,6 @@ packages: mdast-util-to-markdown: 1.3.0 transitivePeerDependencies: - supports-color - dev: false /mdast-util-to-hast/12.2.4: resolution: {integrity: sha512-a21xoxSef1l8VhHxS1Dnyioz6grrJkoaCUgGzMD/7dWHvboYX3VW53esRUfB5tgTyz4Yos1n25SPcj35dJqmAg==} @@ -19447,11 +19693,13 @@ packages: micromark-util-decode-string: 1.0.2 unist-util-visit: 4.1.1 zwitch: 2.0.2 - dev: false + + /mdast-util-to-string/2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + dev: true /mdast-util-to-string/3.1.0: resolution: {integrity: sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA==} - dev: false /mdn-data/2.0.14: resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} @@ -19592,7 +19840,6 @@ packages: micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 uvu: 0.5.6 - dev: false /micromark-extension-gfm-autolink-literal/1.0.3: resolution: {integrity: sha512-i3dmvU0htawfWED8aHMMAzAVp/F0Z+0bPh3YrbTPPL1v4YAlCZpy5rBO5p0LPYiZo0zFVkoYh7vDU7yQSiCMjg==} @@ -19677,7 +19924,6 @@ packages: micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 uvu: 0.5.6 - dev: false /micromark-extension-mdx-jsx/1.0.3: resolution: {integrity: sha512-VfA369RdqUISF0qGgv2FfV7gGjHDfn9+Qfiv5hEwpyr1xscRj/CiVRkU7rywGFCO7JwJ5L0e7CJz60lY52+qOA==} @@ -19691,13 +19937,11 @@ packages: micromark-util-types: 1.0.2 uvu: 0.5.6 vfile-message: 3.1.2 - dev: false /micromark-extension-mdx-md/1.0.0: resolution: {integrity: sha512-xaRAMoSkKdqZXDAoSgp20Azm0aRQKGOl0RrS81yGu8Hr/JhMsBmfs4wR7m9kgVUIO36cMUQjNyiyDKPrsv8gOw==} dependencies: micromark-util-types: 1.0.2 - dev: false /micromark-extension-mdxjs-esm/1.0.3: resolution: {integrity: sha512-2N13ol4KMoxb85rdDwTAC6uzs8lMX0zeqpcyx7FhS7PxXomOnLactu8WI8iBNXW8AVyea3KIJd/1CKnUmwrK9A==} @@ -19710,7 +19954,6 @@ packages: unist-util-position-from-estree: 1.1.1 uvu: 0.5.6 vfile-message: 3.1.2 - dev: false /micromark-extension-mdxjs/1.0.0: resolution: {integrity: sha512-TZZRZgeHvtgm+IhtgC2+uDMR7h8eTKF0QUX9YsgoL9+bADBpBY6SiLvWqnBlLbCEevITmTqmEuY3FoxMKVs1rQ==} @@ -19723,7 +19966,6 @@ packages: micromark-extension-mdxjs-esm: 1.0.3 micromark-util-combine-extensions: 1.0.0 micromark-util-types: 1.0.2 - dev: false /micromark-factory-destination/1.0.0: resolution: {integrity: sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==} @@ -19731,7 +19973,6 @@ packages: micromark-util-character: 1.1.0 micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 - dev: false /micromark-factory-label/1.0.2: resolution: {integrity: sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==} @@ -19740,7 +19981,6 @@ packages: micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 uvu: 0.5.6 - dev: false /micromark-factory-mdx-expression/1.0.6: resolution: {integrity: sha512-WRQIc78FV7KrCfjsEf/sETopbYjElh3xAmNpLkd1ODPqxEngP42eVRGbiPEQWpRV27LzqW+XVTvQAMIIRLPnNA==} @@ -19753,14 +19993,12 @@ packages: unist-util-position-from-estree: 1.1.1 uvu: 0.5.6 vfile-message: 3.1.2 - dev: false /micromark-factory-space/1.0.0: resolution: {integrity: sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==} dependencies: micromark-util-character: 1.1.0 micromark-util-types: 1.0.2 - dev: false /micromark-factory-title/1.0.2: resolution: {integrity: sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==} @@ -19770,7 +20008,6 @@ packages: micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 uvu: 0.5.6 - dev: false /micromark-factory-whitespace/1.0.0: resolution: {integrity: sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==} @@ -19779,20 +20016,17 @@ packages: micromark-util-character: 1.1.0 micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 - dev: false /micromark-util-character/1.1.0: resolution: {integrity: sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==} dependencies: micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 - dev: false /micromark-util-chunked/1.0.0: resolution: {integrity: sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==} dependencies: micromark-util-symbol: 1.0.1 - dev: false /micromark-util-classify-character/1.0.0: resolution: {integrity: sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==} @@ -19800,20 +20034,17 @@ packages: micromark-util-character: 1.1.0 micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 - dev: false /micromark-util-combine-extensions/1.0.0: resolution: {integrity: sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==} dependencies: micromark-util-chunked: 1.0.0 micromark-util-types: 1.0.2 - dev: false /micromark-util-decode-numeric-character-reference/1.0.0: resolution: {integrity: sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==} dependencies: micromark-util-symbol: 1.0.1 - dev: false /micromark-util-decode-string/1.0.2: resolution: {integrity: sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==} @@ -19822,11 +20053,9 @@ packages: micromark-util-character: 1.1.0 micromark-util-decode-numeric-character-reference: 1.0.0 micromark-util-symbol: 1.0.1 - dev: false /micromark-util-encode/1.0.1: resolution: {integrity: sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==} - dev: false /micromark-util-events-to-acorn/1.2.0: resolution: {integrity: sha512-WWp3bf7xT9MppNuw3yPjpnOxa8cj5ACivEzXJKu0WwnjBYfzaBvIAT9KfeyI0Qkll+bfQtfftSwdgTH6QhTOKw==} @@ -19838,23 +20067,19 @@ packages: uvu: 0.5.6 vfile-location: 4.0.1 vfile-message: 3.1.2 - dev: false /micromark-util-html-tag-name/1.1.0: resolution: {integrity: sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==} - dev: false /micromark-util-normalize-identifier/1.0.0: resolution: {integrity: sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==} dependencies: micromark-util-symbol: 1.0.1 - dev: false /micromark-util-resolve-all/1.0.0: resolution: {integrity: sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==} dependencies: micromark-util-types: 1.0.2 - dev: false /micromark-util-sanitize-uri/1.1.0: resolution: {integrity: sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==} @@ -19862,7 +20087,6 @@ packages: micromark-util-character: 1.1.0 micromark-util-encode: 1.0.1 micromark-util-symbol: 1.0.1 - dev: false /micromark-util-subtokenize/1.0.2: resolution: {integrity: sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==} @@ -19871,15 +20095,21 @@ packages: micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 uvu: 0.5.6 - dev: false /micromark-util-symbol/1.0.1: resolution: {integrity: sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==} - dev: false /micromark-util-types/1.0.2: resolution: {integrity: sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==} - dev: false + + /micromark/2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + dependencies: + debug: 4.3.4 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true /micromark/3.1.0: resolution: {integrity: sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==} @@ -19903,7 +20133,6 @@ packages: uvu: 0.5.6 transitivePeerDependencies: - supports-color - dev: false /micromatch/4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} @@ -20065,7 +20294,7 @@ packages: /mjml-accordion/4.13.0: resolution: {integrity: sha512-E3yihZW5Oq2p+sWOcr8kWeRTROmiTYOGxB4IOxW/jTycdY07N3FX3e6vuh7Fv3rryHEUaydUQYto3ICVyctI7w==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20075,7 +20304,7 @@ packages: /mjml-body/4.13.0: resolution: {integrity: sha512-S4HgwAuO9dEsyX9sr6WBf9/xr+H2ASVaLn22aurJm1S2Lvc1wifLPYBQgFmNdCjaesTCNtOMUDpG+Rbnavyaqg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20085,7 +20314,7 @@ packages: /mjml-button/4.13.0: resolution: {integrity: sha512-3y8IAHCCxh7ESHh1aOOqobZKUgyNxOKAGQ9TlJoyaLpsKUFzkN8nmrD0KXF0ADSuzvhMZ1CdRIJuZ5mjv2TwWQ==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20095,7 +20324,7 @@ packages: /mjml-carousel/4.13.0: resolution: {integrity: sha512-ORSY5bEYlMlrWSIKI/lN0Tz3uGltWAjG8DQl2Yr3pwjwOaIzGE+kozrDf+T9xItfiIIbvKajef1dg7B7XgP0zg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20106,7 +20335,7 @@ packages: resolution: {integrity: sha512-kAZxpH0QqlTF/CcLzELgKw1ljKRxrmWJ310CJQhbPAxHvwQ/nIb+q82U+zRJAelRPPKjnOb+hSrMRqTgk9rH3w==} hasBin: true dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 chokidar: 3.5.3 glob: 7.2.3 html-minifier: 4.0.0 @@ -20124,7 +20353,7 @@ packages: /mjml-column/4.13.0: resolution: {integrity: sha512-O8FrWKK/bCy9XpKxrKRYWNdgWNaVd4TK4RqMeVI/I70IbnYnc1uf15jnsPMxCBSbT+NyXyk8k7fn099797uwpw==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20134,7 +20363,7 @@ packages: /mjml-core/4.13.0_zxxsxbqejjmcwuzpigutzzq6wa: resolution: {integrity: sha512-kU5AoVTlZaXR/EDi3ix66xpzUe+kScYus71lBH/wo/B+LZW70GHE1AYWtsog5oJp1MuTHpMFTNuBD/wePeEgWg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 cheerio: 1.0.0-rc.10 detect-node: 2.0.4 html-minifier: 4.0.0 @@ -20152,7 +20381,7 @@ packages: /mjml-divider/4.13.0: resolution: {integrity: sha512-ooPCwfmxEC+wJduqObYezMp7W5UCHjL9Y1LPB5FGna2FrOejgfd6Ix3ij8Wrmycmlol7E2N4D7c5NDH5DbRCJg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20162,7 +20391,7 @@ packages: /mjml-group/4.13.0: resolution: {integrity: sha512-U7E8m8aaoAE/dMqjqXPjjrKcwO36B4cquAy9ASldECrIZJBcpFYO6eYf5yLXrNCUM2P0id8pgVjrUq23s00L7Q==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20172,7 +20401,7 @@ packages: /mjml-head-attributes/4.13.0: resolution: {integrity: sha512-haggCafno+0lQylxJStkINCVCPMwfTpwE6yjCHeGOpQl/TkoNmjNkDr7DEEbNTZbt4Ekg070lQFn7clDy38EoA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20182,7 +20411,7 @@ packages: /mjml-head-breakpoint/4.13.0: resolution: {integrity: sha512-D2iPDeUKQK1+rYSNa2HGOvgfPxZhNyndTG0iBEb/FxdGge2hbeDCZEN0mwDYE3wWB+qSBqlCuMI+Vr4pEjZbKg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20192,7 +20421,7 @@ packages: /mjml-head-font/4.13.0: resolution: {integrity: sha512-mYn8aWnbrEap5vX2b4662hkUv6WifcYzYn++Yi6OHrJQi55LpzcU+myAGpfQEXXrpU8vGwExMTFKsJq5n2Kaow==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20202,7 +20431,7 @@ packages: /mjml-head-html-attributes/4.13.0: resolution: {integrity: sha512-m30Oro297+18Zou/1qYjagtmCOWtYXeoS38OABQ5zOSzMItE3TcZI9JNcOueIIWIyFCETe8StrTAKcQ2GHwsDw==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20212,7 +20441,7 @@ packages: /mjml-head-preview/4.13.0: resolution: {integrity: sha512-v0K/NocjFCbaoF/0IMVNmiqov91HxqT07vNTEl0Bt9lKFrTKVC01m1S4K7AB78T/bEeJ/HwmNjr1+TMtVNGGow==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20222,7 +20451,7 @@ packages: /mjml-head-style/4.13.0: resolution: {integrity: sha512-tBa33GL9Atn5bAM2UwE+uxv4rI29WgX/e5lXX+5GWlsb4thmiN6rxpFTNqBqWbBNRbZk4UEZF78M7Da8xC1ZGQ==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20232,7 +20461,7 @@ packages: /mjml-head-title/4.13.0: resolution: {integrity: sha512-Mq0bjuZXJlwxfVcjuYihQcigZSDTKeQaG3nORR1D0jsOH2BXU4XgUK1UOcTXn2qCBIfRoIMq7rfzYs+L0CRhdw==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20242,7 +20471,7 @@ packages: /mjml-head/4.13.0: resolution: {integrity: sha512-sL2qQuoVALXBCiemu4DPo9geDr8DuUdXVJxm+4nd6k5jpLCfSDmFlNhgSsLPzsYn7VEac3/sxsjLtomQ+6/BHg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20252,7 +20481,7 @@ packages: /mjml-hero/4.13.0: resolution: {integrity: sha512-aWEOScdrhyjwdKBWG4XQaElRHP8LU5PtktkpMeBXa4yxrxNs25qRnDqMNkjSrnnmFKWZmQ166tfboY6RBNf0UA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20262,7 +20491,7 @@ packages: /mjml-image/4.13.0: resolution: {integrity: sha512-agMmm2wRZTIrKwrUnYFlnAbtrKYSP0R2en+Vf92HPspAwmaw3/AeOW/QxmSiMhfGf+xsEJyzVvR/nd33jbT3sg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20273,7 +20502,7 @@ packages: resolution: {integrity: sha512-I1euHiAyNpaz+B5vH+Z4T+hg/YtI5p3PqQ3/zTLv8gi24V6BILjTaftWhH5+3R/gQkQhH0NUaWNnRmds+Mq5DQ==} hasBin: true dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 js-beautify: 1.14.6 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa @@ -20286,7 +20515,7 @@ packages: /mjml-navbar/4.13.0: resolution: {integrity: sha512-0Oqyyk+OdtXfsjswRb/7Ql1UOjN4MbqFPKoyltJqtj+11MRpF5+Wjd74Dj9H7l81GFwkIB9OaP+ZMiD+TPECgg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20305,7 +20534,7 @@ packages: /mjml-preset-core/4.13.0: resolution: {integrity: sha512-gxzYaKkvUrHuzT1oqjEPSDtdmgEnN99Hf5f1r2CR5aMOB1x66EA3T8ATvF1o7qrBTVV4KMVlQem3IubMSYJZRw==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 mjml-accordion: 4.13.0 mjml-body: 4.13.0 mjml-button: 4.13.0 @@ -20338,7 +20567,7 @@ packages: /mjml-raw/4.13.0: resolution: {integrity: sha512-JbBYxwX1a/zbqnCrlDCRNqov2xqUrMCaEdTHfqE2athj479aQXvLKFM20LilTMaClp/dR0yfvFLfFVrC5ej4FQ==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20348,7 +20577,7 @@ packages: /mjml-section/4.13.0: resolution: {integrity: sha512-BLcqlhavtRakKtzDQPLv6Ae4Jt4imYWq/P0jo+Sjk7tP4QifgVA2KEQOirPK5ZUqw/lvK7Afhcths5rXZ2ItnQ==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20358,7 +20587,7 @@ packages: /mjml-social/4.13.0: resolution: {integrity: sha512-zL2a7Wwsk8OXF0Bqu+1B3La1UPwdTMcEXptO8zdh2V5LL6Xb7Gfyvx6w0CmmBtG5IjyCtqaKy5wtrcpG9Hvjfg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20368,7 +20597,7 @@ packages: /mjml-spacer/4.13.0: resolution: {integrity: sha512-Acw4QJ0MJ38W4IewXuMX7hLaW1BZaln+gEEuTfrv0xwPdTxX1ILqz4r+s9mYMxYkIDLWMCjBvXyQK6aWlid13A==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20378,7 +20607,7 @@ packages: /mjml-table/4.13.0: resolution: {integrity: sha512-UAWPVMaGReQhf776DFdiwdcJTIHTek3zzQ1pb+E7VlypEYgIpFvdUJ39UIiiflhqtdBATmHwKBOtePwU0MzFMg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20388,7 +20617,7 @@ packages: /mjml-text/4.13.0: resolution: {integrity: sha512-uDuraaQFdu+6xfuigCimbeznnOnJfwRdcCL1lTBTusTuEvW/5Va6m2D3mnMeEpl+bp4+cxesXIz9st6A9pcg5A==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa transitivePeerDependencies: @@ -20398,13 +20627,13 @@ packages: /mjml-validator/4.13.0: resolution: {integrity: sha512-uURYfyQYtHJ6Qz/1A7/+E9ezfcoISoLZhYK3olsxKRViwaA2Mm8gy/J3yggZXnsUXWUns7Qymycm5LglLEIiQg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 dev: false /mjml-wrapper/4.13.0: resolution: {integrity: sha512-p/44JvHg04rAFR7QDImg8nZucEokIjFH6KJMHxsO0frJtLZ+IuakctzlZAADHsqiR52BwocDsXSa+o9SE2l6Ng==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 lodash: 4.17.21 mjml-core: 4.13.0_zxxsxbqejjmcwuzpigutzzq6wa mjml-section: 4.13.0 @@ -21135,15 +21364,6 @@ packages: es-abstract: 1.20.4 dev: true - /object.values/1.1.5: - resolution: {integrity: sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.4 - dev: true - /object.values/1.1.6: resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} engines: {node: '>= 0.4'} @@ -21440,6 +21660,17 @@ packages: just-diff-apply: 5.4.1 dev: true + /parse-entities/2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + dev: true + /parse-entities/4.0.0: resolution: {integrity: sha512-5nk9Fn03x3rEhGaX1FU6IDwG/k+GxLXlFAkgrbM1asuAFl3BhdQWvASaIsmwWypRNcZKHPYnIuOSfIWEyEQnPQ==} dependencies: @@ -21451,7 +21682,6 @@ packages: is-alphanumerical: 2.0.1 is-decimal: 2.0.1 is-hexadecimal: 2.0.1 - dev: false /parse-filepath/1.0.2: resolution: {integrity: sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==} @@ -21767,6 +21997,11 @@ packages: dependencies: find-up: 4.1.0 + /pluralize/8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + dev: true + /pop-iterate/1.0.1: resolution: {integrity: sha512-HRCx4+KJE30JhX84wBN4+vja9bNfysxg1y28l0DuJmkoaICiv2ZSilKddbS48pq50P8d2erAhqDLbp47yv3MbQ==} dev: false @@ -21850,29 +22085,6 @@ packages: postcss: 8.4.19 dev: true - /postcss-import/14.1.0: - resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} - engines: {node: '>=10.0.0'} - peerDependencies: - postcss: ^8.0.0 - dependencies: - postcss-value-parser: 4.2.0 - read-cache: 1.0.0 - resolve: 1.22.1 - dev: true - - /postcss-import/14.1.0_postcss@8.4.19: - resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} - engines: {node: '>=10.0.0'} - peerDependencies: - postcss: ^8.0.0 - dependencies: - postcss: 8.4.19 - postcss-value-parser: 4.2.0 - read-cache: 1.0.0 - resolve: 1.22.1 - dev: true - /postcss-import/14.1.0_postcss@8.4.20: resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} engines: {node: '>=10.0.0'} @@ -21905,25 +22117,6 @@ packages: postcss: 8.4.20 dev: false - /postcss-js/4.0.0: - resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} - engines: {node: ^12 || ^14 || >= 16} - peerDependencies: - postcss: ^8.3.3 - dependencies: - camelcase-css: 2.0.1 - dev: true - - /postcss-js/4.0.0_postcss@8.4.19: - resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} - engines: {node: ^12 || ^14 || >= 16} - peerDependencies: - postcss: ^8.3.3 - dependencies: - camelcase-css: 2.0.1 - postcss: 8.4.19 - dev: true - /postcss-js/4.0.0_postcss@8.4.20: resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} engines: {node: ^12 || ^14 || >= 16} @@ -21934,39 +22127,6 @@ packages: postcss: 8.4.20 dev: true - /postcss-load-config/3.1.4: - resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} - engines: {node: '>= 10'} - peerDependencies: - postcss: '>=8.0.9' - ts-node: '>=9.0.0' - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - dependencies: - lilconfig: 2.0.6 - yaml: 1.10.2 - dev: true - - /postcss-load-config/3.1.4_postcss@8.4.19: - resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} - engines: {node: '>= 10'} - peerDependencies: - postcss: '>=8.0.9' - ts-node: '>=9.0.0' - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - dependencies: - lilconfig: 2.0.6 - postcss: 8.4.19 - yaml: 1.10.2 - dev: true - /postcss-load-config/3.1.4_postcss@8.4.20: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} @@ -22096,25 +22256,6 @@ packages: postcss-selector-parser: 6.0.10 dev: false - /postcss-nested/6.0.0: - resolution: {integrity: sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==} - engines: {node: '>=12.0'} - peerDependencies: - postcss: ^8.2.14 - dependencies: - postcss-selector-parser: 6.0.10 - dev: true - - /postcss-nested/6.0.0_postcss@8.4.19: - resolution: {integrity: sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==} - engines: {node: '>=12.0'} - peerDependencies: - postcss: ^8.2.14 - dependencies: - postcss: 8.4.19 - postcss-selector-parser: 6.0.10 - dev: true - /postcss-nested/6.0.0_postcss@8.4.20: resolution: {integrity: sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==} engines: {node: '>=12.0'} @@ -22683,7 +22824,7 @@ packages: peerDependencies: react: ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 react: 18.2.0 dev: false @@ -22723,7 +22864,7 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 focus-lock: 0.9.2 prop-types: 15.8.1 react: 18.2.0 @@ -22767,7 +22908,7 @@ packages: algoliasearch: '>= 3.1 < 5' react: '>= 16.3.0 < 19' dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 algoliasearch: 4.14.2 algoliasearch-helper: 3.11.1_algoliasearch@4.14.2 prop-types: 15.8.1 @@ -22782,7 +22923,7 @@ packages: react: '>= 16.3.0 < 19' react-dom: '>= 16.3.0 < 19' dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 algoliasearch: 4.14.2 algoliasearch-helper: 3.11.1_algoliasearch@4.14.2 classnames: 2.3.2 @@ -22905,7 +23046,7 @@ packages: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 '@emotion/cache': 11.10.5 '@emotion/react': 11.10.5_kzbn2opkn2327fwg5yzwzya5o4 '@types/react-transition-group': 4.4.5 @@ -22983,7 +23124,7 @@ packages: react: '>=16.6.0' react-dom: '>=16.6.0' dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.20.7 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 @@ -23246,6 +23387,11 @@ packages: '@babel/runtime': 7.20.7 dev: true + /regexp-tree/0.1.24: + resolution: {integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==} + hasBin: true + dev: true + /regexp.prototype.flags/1.4.3: resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} engines: {node: '>= 0.4'} @@ -23342,7 +23488,6 @@ packages: micromark-extension-mdxjs: 1.0.0 transitivePeerDependencies: - supports-color - dev: false /remark-parse/10.0.1: resolution: {integrity: sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==} @@ -23352,7 +23497,6 @@ packages: unified: 10.1.2 transitivePeerDependencies: - supports-color - dev: false /remark-reading-time/2.0.1: resolution: {integrity: sha512-fy4BKy9SRhtYbEHvp6AItbRTnrhiDGbqLQTSYVbQPGuRCncU1ubSsh9p/W5QZSxtYcUXv8KGL0xBgPLyNJA1xw==} @@ -23372,6 +23516,14 @@ packages: unified: 10.1.2 dev: false + /remark-stringify/10.0.2: + resolution: {integrity: sha512-6wV3pvbPvHkbNnWB0wdDvVFHOe1hBRAx1Q/5g/EpH4RppAII6J8Gnwe7VbHuXaoKIF6LAg6ExTel/+kNqSQ7lw==} + dependencies: + '@types/mdast': 3.0.10 + mdast-util-to-markdown: 1.3.0 + unified: 10.1.2 + dev: true + /remedial/1.0.8: resolution: {integrity: sha512-/62tYiOe6DzS5BqVsNpH/nkGlX45C/Sp6V+NtiN6JQNS1Viay7cWkazmRkrQrdFj2eshDe96SIQNIoMxqhzBOg==} dev: true @@ -23454,7 +23606,7 @@ packages: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.10.0 + is-core-module: 2.11.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -23462,7 +23614,7 @@ packages: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} hasBin: true dependencies: - is-core-module: 2.10.0 + is-core-module: 2.11.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -23626,7 +23778,6 @@ packages: engines: {node: '>=6'} dependencies: mri: 1.2.0 - dev: false /safe-buffer/5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} @@ -23641,6 +23792,12 @@ packages: get-intrinsic: 1.1.3 is-regex: 1.1.4 + /safe-regex/2.1.1: + resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} + dependencies: + regexp-tree: 0.1.24 + dev: true + /safe-regex2/2.0.0: resolution: {integrity: sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ==} dependencies: @@ -24262,7 +24419,7 @@ packages: /std-env/2.3.0: resolution: {integrity: sha512-4qT5B45+Kjef2Z6pE0BkskzsH0GO7GrND0wGlTM1ioUe3v0dGYx9ZJH0Aro/YyA8fqQ5EyIKDRjZojJYMFTflw==} dependencies: - ci-info: 3.5.0 + ci-info: 3.7.0 dev: true /stream-transform/2.1.3: @@ -24370,7 +24527,6 @@ packages: dependencies: character-entities-html4: 2.1.0 character-entities-legacy: 3.0.0 - dev: false /strip-ansi/3.0.1: resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} @@ -24717,76 +24873,6 @@ packages: resolution: {integrity: sha512-AhwtHCKMtR71JgeYDaswmZXhPcW9iuI9Sp2LvZPo9upDZ7231ZJ7eA9RaURbhpXGVlrjX4cFNlB4ieTetEb7hQ==} engines: {node: '>=12.13.0'} hasBin: true - peerDependencies: - postcss: ^8.0.9 - dependencies: - arg: 5.0.2 - chokidar: 3.5.3 - color-name: 1.1.4 - detective: 5.2.1 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.2.12 - glob-parent: 6.0.2 - is-glob: 4.0.3 - lilconfig: 2.0.6 - micromatch: 4.0.5 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.0.0 - postcss: 8.4.20 - postcss-import: 14.1.0 - postcss-js: 4.0.0 - postcss-load-config: 3.1.4 - postcss-nested: 6.0.0 - postcss-selector-parser: 6.0.10 - postcss-value-parser: 4.2.0 - quick-lru: 5.1.1 - resolve: 1.22.1 - transitivePeerDependencies: - - ts-node - dev: true - - /tailwindcss/3.2.4_postcss@8.4.19: - resolution: {integrity: sha512-AhwtHCKMtR71JgeYDaswmZXhPcW9iuI9Sp2LvZPo9upDZ7231ZJ7eA9RaURbhpXGVlrjX4cFNlB4ieTetEb7hQ==} - engines: {node: '>=12.13.0'} - hasBin: true - peerDependencies: - postcss: ^8.0.9 - dependencies: - arg: 5.0.2 - chokidar: 3.5.3 - color-name: 1.1.4 - detective: 5.2.1 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.2.12 - glob-parent: 6.0.2 - is-glob: 4.0.3 - lilconfig: 2.0.6 - micromatch: 4.0.5 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.0.0 - postcss: 8.4.19 - postcss-import: 14.1.0_postcss@8.4.19 - postcss-js: 4.0.0_postcss@8.4.19 - postcss-load-config: 3.1.4_postcss@8.4.19 - postcss-nested: 6.0.0_postcss@8.4.19 - postcss-selector-parser: 6.0.10 - postcss-value-parser: 4.2.0 - quick-lru: 5.1.1 - resolve: 1.22.1 - transitivePeerDependencies: - - ts-node - dev: true - - /tailwindcss/3.2.4_postcss@8.4.20: - resolution: {integrity: sha512-AhwtHCKMtR71JgeYDaswmZXhPcW9iuI9Sp2LvZPo9upDZ7231ZJ7eA9RaURbhpXGVlrjX4cFNlB4ieTetEb7hQ==} - engines: {node: '>=12.13.0'} - hasBin: true - peerDependencies: - postcss: ^8.0.9 dependencies: arg: 5.0.2 chokidar: 3.5.3 @@ -24815,12 +24901,10 @@ packages: - ts-node dev: true - /tailwindcss/3.2.4_ra2vnoek4vhbzktaezawwqbin4: + /tailwindcss/3.2.4_ts-node@10.9.1: resolution: {integrity: sha512-AhwtHCKMtR71JgeYDaswmZXhPcW9iuI9Sp2LvZPo9upDZ7231ZJ7eA9RaURbhpXGVlrjX4cFNlB4ieTetEb7hQ==} engines: {node: '>=12.13.0'} hasBin: true - peerDependencies: - postcss: ^8.0.9 dependencies: arg: 5.0.2 chokidar: 3.5.3 @@ -25109,7 +25193,6 @@ packages: /trough/2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} - dev: false /ts-easing/0.2.0: resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} @@ -25641,7 +25724,6 @@ packages: is-plain-obj: 4.1.0 trough: 2.1.0 vfile: 5.3.5 - dev: false /unique-filename/1.1.1: resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} @@ -25685,13 +25767,11 @@ packages: /unist-util-is/5.1.1: resolution: {integrity: sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ==} - dev: false /unist-util-position-from-estree/1.1.1: resolution: {integrity: sha512-xtoY50b5+7IH8tFbkw64gisG9tMSpxDjhX9TmaJJae/XuxQ9R/Kc8Nv1eOsf43Gt4KV/LkriMy9mptDr7XLcaw==} dependencies: '@types/unist': 2.0.6 - dev: false /unist-util-position/4.0.3: resolution: {integrity: sha512-p/5EMGIa1qwbXjA+QgcBXaPWjSnZfQ2Sc3yBEEfgPwsEmJd8Qh+DSk3LGnmOM4S1bY2C0AjmMnB8RuEYxpPwXQ==} @@ -25704,13 +25784,17 @@ packages: dependencies: '@types/unist': 2.0.6 unist-util-visit: 4.1.1 - dev: false + + /unist-util-stringify-position/2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + dependencies: + '@types/unist': 2.0.6 + dev: true /unist-util-stringify-position/3.0.2: resolution: {integrity: sha512-7A6eiDCs9UtjcwZOcCpM4aPII3bAAGv13E96IkawkOAW0OhH+yRxtY0lzo8KiHpzEMfH7Q+FizUmwp8Iqy5EWg==} dependencies: '@types/unist': 2.0.6 - dev: false /unist-util-visit-parents/3.1.1: resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==} @@ -25731,7 +25815,6 @@ packages: dependencies: '@types/unist': 2.0.6 unist-util-is: 5.1.1 - dev: false /unist-util-visit/2.0.3: resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==} @@ -25755,7 +25838,6 @@ packages: '@types/unist': 2.0.6 unist-util-is: 5.1.1 unist-util-visit-parents: 5.1.1 - dev: false /universal-github-app-jwt/1.1.0: resolution: {integrity: sha512-3b+ocAjjz4JTyqaOT+NNBd5BtTuvJTxWElIoeHSVelUV9J3Jp7avmQTdLKCaoqi/5Ox2o/q+VK19TJ233rVXVQ==} @@ -25970,7 +26052,6 @@ packages: diff: 5.1.0 kleur: 4.1.5 sade: 1.8.1 - dev: false /v8-compile-cache-lib/3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} @@ -26070,14 +26151,12 @@ packages: dependencies: '@types/unist': 2.0.6 vfile: 5.3.5 - dev: false /vfile-message/3.1.2: resolution: {integrity: sha512-QjSNP6Yxzyycd4SVOtmKKyTsSvClqBPJcd00Z0zuPj3hOIjg0rUPG6DbFGPvUKRgYyaIWLPKpuEclcuvb3H8qA==} dependencies: '@types/unist': 2.0.6 unist-util-stringify-position: 3.0.2 - dev: false /vfile/5.3.5: resolution: {integrity: sha512-U1ho2ga33eZ8y8pkbQLH54uKqGhFJ6GYIHnnG5AhRpAh3OWjkrRHKa/KogbmQn8We+c0KVV3rTOgR9V/WowbXQ==} @@ -26086,7 +26165,6 @@ packages: is-buffer: 2.0.5 unist-util-stringify-position: 3.0.2 vfile-message: 3.1.2 - dev: false /vinyl-file/3.0.0: resolution: {integrity: sha512-BoJDj+ca3D9xOuPEM6RWVtWQtvEPQiQYn82LvdxhLWplfQsBzBqtgK0yhCP0s1BNTi6dH9BO+dzybvyQIacifg==} @@ -26462,6 +26540,15 @@ packages: resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} dev: true + /yaml-eslint-parser/1.1.0: + resolution: {integrity: sha512-b464Q1fYiX1oYx2kE8k4mEp6S9Prk+tfDsY/IPxQ0FCjEuj3AKko5Skf3/yQJeYTTDyjDE+aWIJemnv29HvEWQ==} + engines: {node: ^14.17.0 || >=16.0.0} + dependencies: + eslint-visitor-keys: 3.3.0 + lodash: 4.17.21 + yaml: 2.2.0 + dev: true + /yaml/1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} @@ -26692,7 +26779,6 @@ packages: /zwitch/2.0.2: resolution: {integrity: sha512-JZxotl7SxAJH0j7dN4pxsTV6ZLXoLdGME+PsjkL/DaBrVryK9kTGq06GfKrwcSOqypP+fdXGoCHE36b99fWVoA==} - dev: false file:rules: resolution: {directory: rules, type: directory} diff --git a/scripts/banner.js b/scripts/banner.js index 9fb12bf4d..f057dbb4e 100644 --- a/scripts/banner.js +++ b/scripts/banner.js @@ -1,3 +1,4 @@ // Adds missing require function (reason: node_modules are not transpiled) import { createRequire as _createRequire } from 'module'; + const require = _createRequire(import.meta.url); diff --git a/scripts/patch-manifests.js b/scripts/patch-manifests.js index 750afca99..1ef223043 100644 --- a/scripts/patch-manifests.js +++ b/scripts/patch-manifests.js @@ -5,8 +5,8 @@ */ import fs from 'fs'; -import path from 'path'; import { createRequire } from 'module'; +import path from 'path'; function patchPackage(name, patchFn) { const require = createRequire(import.meta.url); diff --git a/scripts/sync-env-files.js b/scripts/sync-env-files.js index 271edfd49..a5eecb5e2 100755 --- a/scripts/sync-env-files.js +++ b/scripts/sync-env-files.js @@ -3,8 +3,8 @@ * is a special value that will be replaced with the value from the root .env file. */ import { constants } from 'fs'; -import { readFile, writeFile, access } from 'fs/promises'; -import { join, dirname, relative } from 'path'; +import { access, readFile, writeFile } from 'fs/promises'; +import { dirname, join, relative } from 'path'; import { parse } from 'dotenv'; import glob from 'glob'; diff --git a/scripts/turborepo-cleanup.js b/scripts/turborepo-cleanup.js index ff115aeef..2c6e162b8 100644 --- a/scripts/turborepo-cleanup.js +++ b/scripts/turborepo-cleanup.js @@ -6,11 +6,11 @@ * The goal here is to delete it once a week. */ -import path from 'path'; import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; import fsExtra from 'fs-extra'; import rimraf from 'rimraf'; -import { fileURLToPath } from 'url'; const cwd = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); diff --git a/scripts/turborepo-setup.js b/scripts/turborepo-setup.js index 823959733..ad4e947a3 100644 --- a/scripts/turborepo-setup.js +++ b/scripts/turborepo-setup.js @@ -2,10 +2,10 @@ * Create Turborepo config file */ -import path from 'path'; import fs from 'fs'; -import dotenv from 'dotenv'; +import path from 'path'; import { fileURLToPath } from 'url'; +import dotenv from 'dotenv'; const cwd = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');