diff --git a/apps/hash-ai-worker-ts/package.json b/apps/hash-ai-worker-ts/package.json index 29cff1f7961..285ad463bcf 100644 --- a/apps/hash-ai-worker-ts/package.json +++ b/apps/hash-ai-worker-ts/package.json @@ -54,7 +54,7 @@ "@local/hash-isomorphic-utils": "0.0.0-private", "@local/hash-subgraph": "0.0.0-private", "@local/status": "0.0.0-private", - "@sentry/node": "7.118.0", + "@sentry/node": "8.23.0", "@temporalio/activity": "1.10.1", "@temporalio/common": "1.10.1", "@temporalio/worker": "1.10.1", diff --git a/apps/hash-ai-worker-ts/src/instrument.ts b/apps/hash-ai-worker-ts/src/instrument.ts new file mode 100644 index 00000000000..4f961d79b45 --- /dev/null +++ b/apps/hash-ai-worker-ts/src/instrument.ts @@ -0,0 +1,7 @@ +import * as Sentry from "@sentry/node"; + +Sentry.init({ + dsn: process.env.HASH_TEMPORAL_WORKER_AI_SENTRY_DSN, + enabled: !!process.env.HASH_TEMPORAL_WORKER_AI_SENTRY_DSN, + tracesSampleRate: 1.0, +}); diff --git a/apps/hash-ai-worker-ts/src/main.ts b/apps/hash-ai-worker-ts/src/main.ts index fe2a1b48ecf..9b3ca727ad6 100644 --- a/apps/hash-ai-worker-ts/src/main.ts +++ b/apps/hash-ai-worker-ts/src/main.ts @@ -1,12 +1,4 @@ -/* eslint-disable import/first */ - -import * as Sentry from "@sentry/node"; - -Sentry.init({ - dsn: process.env.HASH_TEMPORAL_WORKER_AI_SENTRY_DSN, - enabled: !!process.env.HASH_TEMPORAL_WORKER_AI_SENTRY_DSN, - tracesSampleRate: 1.0, -}); +import "./instrument"; import * as http from "node:http"; import { createRequire } from "node:module"; diff --git a/apps/hash-api/package.json b/apps/hash-api/package.json index 1ddd90d8eea..51cc343f394 100644 --- a/apps/hash-api/package.json +++ b/apps/hash-api/package.json @@ -6,6 +6,7 @@ "license": "AGPL-3.0", "type": "module", "scripts": { + "build": "rimraf dist && tsc --build tsconfig.build.json", "build:docker": "docker buildx build --tag hash-api --file ../../infra/docker/api/prod/Dockerfile ../../ --load", "codegen": "rimraf './src/**/*.gen.*'; graphql-codegen --config codegen.config.ts", "dev": "NODE_ENV=development NODE_OPTIONS=--max-old-space-size=2048 tsx watch --clear-screen=false ./src/index.ts", @@ -14,10 +15,10 @@ "generate-ontology-type-ids": "tsx ./src/generate-ontology-type-ids.ts; yarn prettier --write ../../libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts", "lint:eslint": "eslint --report-unused-disable-directives .", "lint:tsc": "tsc --noEmit", - "start": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=2048 tsx ./src/index.ts", + "start": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=2048 node --import ./dist/sentry.js ./dist/index.js", "start:healthcheck": "wait-on --timeout 300000 http://0.0.0.0:5001", "start:migrate": "NODE_ENV=production tsx ./src/ensure-system-graph-is-initialized.ts", - "start:test": "cross-env NODE_ENV=test NODE_OPTIONS=--max-old-space-size=2048 tsx ./src/index.ts", + "start:test": "cross-env NODE_ENV=test NODE_OPTIONS=--max-old-space-size=2048 node --import ./dist/sentry.js ./dist/index.js", "start:test:healthcheck": "wait-on --timeout 300000 http://0.0.0.0:5001", "start:test:migrate": "NODE_ENV=test tsx ./src/ensure-system-graph-is-initialized.ts", "test:unit": "vitest --run" @@ -55,7 +56,7 @@ "@ory/hydra-client": "2.2.0-rc.3", "@ory/kratos-client": "1.0.0", "@rudderstack/rudder-sdk-node": "2.0.3", - "@sentry/node": "7.118.0", + "@sentry/node": "8.23.0", "@snowplow/node-tracker": "3.3.1", "@temporalio/client": "1.10.1", "@temporalio/proto": "1.10.1", diff --git a/apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts b/apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts index 9995fc39605..cae38e430fc 100644 --- a/apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts +++ b/apps/hash-api/src/ai/gpt/gpt-get-user-webs.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import type { SimpleWeb } from "./shared/webs"; -import { getUserSimpleWebs } from "./shared/webs"; +import type { SimpleWeb } from "./shared/webs.js"; +import { getUserSimpleWebs } from "./shared/webs.js"; export type GptGetUserWebsResponseBody = | { error: string } diff --git a/apps/hash-api/src/ai/gpt/gpt-query-entities.ts b/apps/hash-api/src/ai/gpt/gpt-query-entities.ts index 141d6fe6b74..f672143ed84 100644 --- a/apps/hash-api/src/ai/gpt/gpt-query-entities.ts +++ b/apps/hash-api/src/ai/gpt/gpt-query-entities.ts @@ -25,10 +25,10 @@ import { } from "@local/hash-subgraph"; import type { RequestHandler } from "express"; -import { getLatestEntityById } from "../../graph/knowledge/primitive/entity"; -import { stringifyResults } from "./shared/stringify-results"; -import type { SimpleWeb } from "./shared/webs"; -import { getUserSimpleWebs } from "./shared/webs"; +import { getLatestEntityById } from "../../graph/knowledge/primitive/entity.js"; +import { stringifyResults } from "./shared/stringify-results.js"; +import type { SimpleWeb } from "./shared/webs.js"; +import { getUserSimpleWebs } from "./shared/webs.js"; export type GptQueryEntitiesRequestBody = { /** diff --git a/apps/hash-api/src/ai/gpt/gpt-query-types.ts b/apps/hash-api/src/ai/gpt/gpt-query-types.ts index 4d3ceb104a2..8e5108b4eb2 100644 --- a/apps/hash-api/src/ai/gpt/gpt-query-types.ts +++ b/apps/hash-api/src/ai/gpt/gpt-query-types.ts @@ -10,7 +10,7 @@ import { currentTimeInstantTemporalAxes } from "@local/hash-isomorphic-utils/gra import { mapGraphApiSubgraphToSubgraph } from "@local/hash-isomorphic-utils/subgraph-mapping"; import type { RequestHandler } from "express"; -import { stringifyResults } from "./shared/stringify-results"; +import { stringifyResults } from "./shared/stringify-results.js"; export type GptQueryTypesRequestBody = { /** diff --git a/apps/hash-api/src/ai/gpt/shared/webs.ts b/apps/hash-api/src/ai/gpt/shared/webs.ts index 5be3cf7ff86..4b72679dd96 100644 --- a/apps/hash-api/src/ai/gpt/shared/webs.ts +++ b/apps/hash-api/src/ai/gpt/shared/webs.ts @@ -1,9 +1,9 @@ import type { AccountId } from "@local/hash-graph-types/account"; -import type { ImpureGraphContext } from "../../../graph/context-types"; -import { getOrgMembershipOrg } from "../../../graph/knowledge/system-types/org-membership"; -import type { User } from "../../../graph/knowledge/system-types/user"; -import { getUserOrgMemberships } from "../../../graph/knowledge/system-types/user"; +import type { ImpureGraphContext } from "../../../graph/context-types.js"; +import { getOrgMembershipOrg } from "../../../graph/knowledge/system-types/org-membership.js"; +import type { User } from "../../../graph/knowledge/system-types/user.js"; +import { getUserOrgMemberships } from "../../../graph/knowledge/system-types/user.js"; export type SimpleWeb = { uuid: string; diff --git a/apps/hash-api/src/ai/gpt/upsert-gpt-oauth-client.ts b/apps/hash-api/src/ai/gpt/upsert-gpt-oauth-client.ts index 7a9ce887b8b..ae0ecc35f8f 100644 --- a/apps/hash-api/src/ai/gpt/upsert-gpt-oauth-client.ts +++ b/apps/hash-api/src/ai/gpt/upsert-gpt-oauth-client.ts @@ -1,7 +1,7 @@ import { isUserHashInstanceAdmin } from "@local/hash-backend-utils/hash-instance"; import type { RequestHandler } from "express"; -import { hydraAdmin } from "../../auth/ory-hydra"; +import { hydraAdmin } from "../../auth/ory-hydra.js"; type UpsertOAuthClientRequestBody = { redirectUri: string; diff --git a/apps/hash-api/src/ai/infer-entities-websocket.ts b/apps/hash-api/src/ai/infer-entities-websocket.ts index 364e32985d7..456bf2c56a2 100644 --- a/apps/hash-api/src/ai/infer-entities-websocket.ts +++ b/apps/hash-api/src/ai/infer-entities-websocket.ts @@ -17,12 +17,12 @@ import type { Client } from "@temporalio/client"; import type { WebSocket } from "ws"; import { WebSocketServer } from "ws"; -import { getUserAndSession } from "../auth/create-auth-handlers"; -import type { GraphApi, ImpureGraphContext } from "../graph/context-types"; -import type { User } from "../graph/knowledge/system-types/user"; -import { FlowRunStatus } from "../graphql/api-types.gen"; -import { handleCancelInferEntitiesRequest } from "./infer-entities-websocket/handle-cancel-infer-entities-request"; -import { handleInferEntitiesRequest } from "./infer-entities-websocket/handle-infer-entities-request"; +import { getUserAndSession } from "../auth/create-auth-handlers.js"; +import type { GraphApi, ImpureGraphContext } from "../graph/context-types.js"; +import type { User } from "../graph/knowledge/system-types/user.js"; +import { FlowRunStatus } from "../graphql/api-types.gen.js"; +import { handleCancelInferEntitiesRequest } from "./infer-entities-websocket/handle-cancel-infer-entities-request.js"; +import { handleInferEntitiesRequest } from "./infer-entities-websocket/handle-infer-entities-request.js"; const inferEntitiesMessageHandler = async ({ socket, diff --git a/apps/hash-api/src/ai/infer-entities-websocket/handle-cancel-infer-entities-request.ts b/apps/hash-api/src/ai/infer-entities-websocket/handle-cancel-infer-entities-request.ts index efb91cffe36..f828853f0fc 100644 --- a/apps/hash-api/src/ai/infer-entities-websocket/handle-cancel-infer-entities-request.ts +++ b/apps/hash-api/src/ai/infer-entities-websocket/handle-cancel-infer-entities-request.ts @@ -3,8 +3,8 @@ import type { EntityUuid } from "@local/hash-graph-types/entity"; import type { CancelInferEntitiesWebsocketRequestMessage } from "@local/hash-isomorphic-utils/ai-inference-types"; import type { Client } from "@temporalio/client"; -import type { GraphApi } from "../../graph/context-types"; -import type { User } from "../../graph/knowledge/system-types/user"; +import type { GraphApi } from "../../graph/context-types.js"; +import type { User } from "../../graph/knowledge/system-types/user.js"; export const handleCancelInferEntitiesRequest = async ({ graphApiClient, diff --git a/apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts b/apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts index 0c563054284..96267cd7f60 100644 --- a/apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts +++ b/apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts @@ -24,8 +24,8 @@ import type { } from "@local/hash-isomorphic-utils/flows/types"; import type { Client } from "@temporalio/client"; -import type { User } from "../../graph/knowledge/system-types/user"; -import { FlowRunStatus } from "../../graphql/api-types.gen"; +import type { User } from "../../graph/knowledge/system-types/user.js"; +import { FlowRunStatus } from "../../graphql/api-types.gen.js"; export const handleInferEntitiesRequest = async ({ graphApiClient, diff --git a/apps/hash-api/src/auth/create-auth-handlers.ts b/apps/hash-api/src/auth/create-auth-handlers.ts index d737f6832b7..1922a2bc3a5 100644 --- a/apps/hash-api/src/auth/create-auth-handlers.ts +++ b/apps/hash-api/src/auth/create-auth-handlers.ts @@ -6,16 +6,16 @@ import type { Session } from "@ory/client"; import type { AxiosError } from "axios"; import type { Express, Request, RequestHandler } from "express"; -import type { ImpureGraphContext } from "../graph/context-types"; -import type { User } from "../graph/knowledge/system-types/user"; +import type { ImpureGraphContext } from "../graph/context-types.js"; +import type { User } from "../graph/knowledge/system-types/user.js"; import { createUser, getUserByKratosIdentityId, -} from "../graph/knowledge/system-types/user"; -import { systemAccountId } from "../graph/system-account"; -import { hydraAdmin } from "./ory-hydra"; -import type { KratosUserIdentity } from "./ory-kratos"; -import { kratosFrontendApi } from "./ory-kratos"; +} from "../graph/knowledge/system-types/user.js"; +import { systemAccountId } from "../graph/system-account.js"; +import { hydraAdmin } from "./ory-hydra.js"; +import type { KratosUserIdentity } from "./ory-kratos.js"; +import { kratosFrontendApi } from "./ory-kratos.js"; const KRATOS_API_KEY = getRequiredEnv("KRATOS_API_KEY"); diff --git a/apps/hash-api/src/auth/oauth-consent-handlers.ts b/apps/hash-api/src/auth/oauth-consent-handlers.ts index 51003da23b8..8dad8a25502 100644 --- a/apps/hash-api/src/auth/oauth-consent-handlers.ts +++ b/apps/hash-api/src/auth/oauth-consent-handlers.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { hydraAdmin } from "./ory-hydra"; +import { hydraAdmin } from "./ory-hydra.js"; /** * @see https://github.com/ory/hydra-login-consent-node/tree/master diff --git a/apps/hash-api/src/cache/index.ts b/apps/hash-api/src/cache/index.ts index 80ff49363d4..d7931968ddb 100644 --- a/apps/hash-api/src/cache/index.ts +++ b/apps/hash-api/src/cache/index.ts @@ -1,5 +1,5 @@ -import type { CacheAdapter } from "./adapter"; +import type { CacheAdapter } from "./adapter.js"; export type { CacheAdapter }; -export { RedisCache } from "./redis"; +export { RedisCache } from "./redis.js"; diff --git a/apps/hash-api/src/cache/redis.ts b/apps/hash-api/src/cache/redis.ts index 09bae5a2ade..e4997285c59 100644 --- a/apps/hash-api/src/cache/redis.ts +++ b/apps/hash-api/src/cache/redis.ts @@ -3,7 +3,7 @@ import type { RedisSocketConfig } from "@local/hash-backend-utils/redis"; import { AsyncRedisClient } from "@local/hash-backend-utils/redis"; import { DataSource } from "apollo-datasource"; -import type { CacheAdapter } from "./adapter"; +import type { CacheAdapter } from "./adapter.js"; export class RedisCache extends DataSource implements CacheAdapter { private client: AsyncRedisClient; diff --git a/apps/hash-api/src/email/index.ts b/apps/hash-api/src/email/index.ts index 403c122ff0e..95e843b827b 100644 --- a/apps/hash-api/src/email/index.ts +++ b/apps/hash-api/src/email/index.ts @@ -10,7 +10,7 @@ import { URLSearchParams } from "node:url"; import { frontendUrl } from "@local/hash-isomorphic-utils/environment"; import dedent from "dedent"; -import type { EmailTransporter } from "./transporters"; +import type { EmailTransporter } from "./transporters.js"; export const sendOrgEmailInvitationToEmailAddress = (emailTransporter: EmailTransporter) => diff --git a/apps/hash-api/src/email/transporters/aws-ses-email-transporter.ts b/apps/hash-api/src/email/transporters/aws-ses-email-transporter.ts index 8fe2feca932..4bbfde5cb03 100644 --- a/apps/hash-api/src/email/transporters/aws-ses-email-transporter.ts +++ b/apps/hash-api/src/email/transporters/aws-ses-email-transporter.ts @@ -4,11 +4,11 @@ import { convert } from "html-to-text"; import nodemailer from "nodemailer"; import type SESTransport from "nodemailer/lib/ses-transport"; -import { logger } from "../../logger"; +import { logger } from "../../logger.js"; import type { EmailTransporter, EmailTransporterSendMailOptions, -} from "./types"; +} from "./types.js"; export interface AwsSesEmailTransporterConfig { from: string; diff --git a/apps/hash-api/src/email/transporters/dummy-email-transporter.ts b/apps/hash-api/src/email/transporters/dummy-email-transporter.ts index 45ab559c386..f59fbf06b29 100644 --- a/apps/hash-api/src/email/transporters/dummy-email-transporter.ts +++ b/apps/hash-api/src/email/transporters/dummy-email-transporter.ts @@ -6,11 +6,11 @@ import dedent from "dedent"; import { convert } from "html-to-text"; import { dump } from "js-yaml"; -import { logger } from "../../logger"; +import { logger } from "../../logger.js"; import type { EmailTransporter, EmailTransporterSendMailOptions, -} from "./types"; +} from "./types.js"; interface PlainEmailDump { date: string; diff --git a/apps/hash-api/src/email/transporters/index.ts b/apps/hash-api/src/email/transporters/index.ts index d908d4ad2ad..aa6777a4cde 100644 --- a/apps/hash-api/src/email/transporters/index.ts +++ b/apps/hash-api/src/email/transporters/index.ts @@ -1,3 +1,3 @@ -export * from "./aws-ses-email-transporter"; -export * from "./dummy-email-transporter"; -export * from "./types"; +export * from "./aws-ses-email-transporter.js"; +export * from "./dummy-email-transporter.js"; +export * from "./types.js"; diff --git a/apps/hash-api/src/ensure-system-graph-is-initialized.ts b/apps/hash-api/src/ensure-system-graph-is-initialized.ts index 380923429f1..8c9545178c0 100644 --- a/apps/hash-api/src/ensure-system-graph-is-initialized.ts +++ b/apps/hash-api/src/ensure-system-graph-is-initialized.ts @@ -2,9 +2,9 @@ import { createGraphClient } from "@local/hash-backend-utils/create-graph-client import { getRequiredEnv } from "@local/hash-backend-utils/environment"; import { createTemporalClient } from "@local/hash-backend-utils/temporal"; -import type { ImpureGraphContext } from "./graph/context-types"; -import { ensureSystemGraphIsInitialized } from "./graph/ensure-system-graph-is-initialized"; -import { logger } from "./logger"; +import type { ImpureGraphContext } from "./graph/context-types.js"; +import { ensureSystemGraphIsInitialized } from "./graph/ensure-system-graph-is-initialized.js"; +import { logger } from "./logger.js"; const context: ImpureGraphContext = { provenance: { diff --git a/apps/hash-api/src/express.d.ts b/apps/hash-api/src/express.d.ts index 45fade285bc..4a70f20fcb5 100644 --- a/apps/hash-api/src/express.d.ts +++ b/apps/hash-api/src/express.d.ts @@ -1,8 +1,8 @@ import type { VaultClient } from "@local/hash-backend-utils/vault"; import type { Session } from "@ory/client"; -import type { ImpureGraphContext } from "./graph/context-types"; -import type { User } from "./graph/knowledge/system-types/user"; +import type { ImpureGraphContext } from "./graph/context-types.js"; +import type { User } from "./graph/knowledge/system-types/user.js"; declare global { namespace Express { diff --git a/apps/hash-api/src/generate-ontology-type-ids.ts b/apps/hash-api/src/generate-ontology-type-ids.ts index f4054c66a8e..aff36e620ea 100644 --- a/apps/hash-api/src/generate-ontology-type-ids.ts +++ b/apps/hash-api/src/generate-ontology-type-ids.ts @@ -23,15 +23,15 @@ import { extractBaseUrl } from "@local/hash-subgraph/type-system-patch"; import type { ImpureGraphContext, ImpureGraphFunction, -} from "./graph/context-types"; -import type { Org } from "./graph/knowledge/system-types/org"; -import { getOrgByShortname } from "./graph/knowledge/system-types/org"; -import { getDataTypes } from "./graph/ontology/primitive/data-type"; +} from "./graph/context-types.js"; +import type { Org } from "./graph/knowledge/system-types/org.js"; +import { getOrgByShortname } from "./graph/knowledge/system-types/org.js"; +import { getDataTypes } from "./graph/ontology/primitive/data-type.js"; import { getEntityTypes, isEntityTypeLinkEntityType, -} from "./graph/ontology/primitive/entity-type"; -import { getPropertyTypes } from "./graph/ontology/primitive/property-type"; +} from "./graph/ontology/primitive/entity-type.js"; +import { getPropertyTypes } from "./graph/ontology/primitive/property-type.js"; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); diff --git a/apps/hash-api/src/graph/account-permission-management.ts b/apps/hash-api/src/graph/account-permission-management.ts index 7a8b72b4ab2..00fdcce9a51 100644 --- a/apps/hash-api/src/graph/account-permission-management.ts +++ b/apps/hash-api/src/graph/account-permission-management.ts @@ -9,7 +9,7 @@ import type { } from "@local/hash-graph-types/account"; import type { OwnedById } from "@local/hash-graph-types/web"; -import type { ImpureGraphFunction } from "./context-types"; +import type { ImpureGraphFunction } from "./context-types.js"; export const addAccountGroupMember: ImpureGraphFunction< { accountId: AccountId; accountGroupId: AccountGroupId }, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized.ts index 4edf8828f47..65a45dfbebc 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized.ts @@ -1,9 +1,9 @@ import type { Logger } from "@local/hash-backend-utils/logger"; -import type { ImpureGraphContext } from "./context-types"; -import { migrateOntologyTypes } from "./ensure-system-graph-is-initialized/migrate-ontology-types"; -import { ensureSystemEntitiesExist } from "./ensure-system-graph-is-initialized/system-webs-and-entities"; -import { ensureHashSystemAccountExists } from "./system-account"; +import type { ImpureGraphContext } from "./context-types.js"; +import { migrateOntologyTypes } from "./ensure-system-graph-is-initialized/migrate-ontology-types.js"; +import { ensureSystemEntitiesExist } from "./ensure-system-graph-is-initialized/system-webs-and-entities.js"; +import { ensureHashSystemAccountExists } from "./system-account.js"; export const ensureSystemGraphIsInitialized = async (params: { logger: Logger; diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types.ts index e4ab14a718f..960557157a4 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types.ts @@ -4,13 +4,13 @@ import { fileURLToPath } from "node:url"; import type { Logger } from "@local/hash-backend-utils/logger"; -import { isProdEnv } from "../../lib/env-config"; -import type { ImpureGraphContext } from "../context-types"; -import { systemAccountId } from "../system-account"; +import { isProdEnv } from "../../lib/env-config.js"; +import type { ImpureGraphContext } from "../context-types.js"; +import { systemAccountId } from "../system-account.js"; import type { MigrationFunction, MigrationState, -} from "./migrate-ontology-types/types"; +} from "./migrate-ontology-types/types.js"; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-load-cached-bp-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-load-cached-bp-types.migration.ts index 4b69d6d9e01..0ff408ed3cb 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-load-cached-bp-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-load-cached-bp-types.migration.ts @@ -4,13 +4,13 @@ import { CACHED_DATA_TYPE_SCHEMAS, CACHED_ENTITY_TYPE_SCHEMAS, CACHED_PROPERTY_TYPE_SCHEMAS, -} from "../../../../seed-data"; -import type { MigrationFunction } from "../types"; +} from "../../../../seed-data/index.js"; +import type { MigrationFunction } from "../types.js"; import { loadExternalDataTypeIfNotExists, loadExternalEntityTypeIfNotExists, loadExternalPropertyTypeIfNotExists, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts index 1ee3d0fff09..5dd1a8cd215 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts @@ -5,13 +5,13 @@ import { mimeTypePropertyTypeUrl, } from "@local/hash-subgraph"; -import { systemAccountId } from "../../../system-account"; -import type { MigrationFunction } from "../types"; +import { systemAccountId } from "../../../system-account.js"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/002-load-uncached-bp-query-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/002-load-uncached-bp-query-types.migration.ts index 1803773e2c9..04f7dfa28b8 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/002-load-uncached-bp-query-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/002-load-uncached-bp-query-types.migration.ts @@ -1,5 +1,5 @@ -import type { MigrationFunction } from "../types"; -import { loadExternalEntityTypeIfNotExists } from "../util"; +import type { MigrationFunction } from "../types.js"; +import { loadExternalEntityTypeIfNotExists } from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts index 1f13939b156..b49654a9d1f 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts @@ -1,13 +1,13 @@ import { linkEntityTypeUrl } from "@local/hash-subgraph"; -import { enabledIntegrations } from "../../../../integrations/enabled-integrations"; -import type { MigrationFunction } from "../types"; +import { enabledIntegrations } from "../../../../integrations/enabled-integrations.js"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, getCurrentHashPropertyTypeId, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts index 2992d1c4f3e..e9c205bc66f 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts @@ -2,9 +2,9 @@ import type { EntityType } from "@blockprotocol/type-system"; import { atLeastOne } from "@blockprotocol/type-system"; import { blockProtocolPropertyTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { getEntityTypeById } from "../../../ontology/primitive/entity-type"; -import { systemAccountId } from "../../../system-account"; -import type { MigrationFunction } from "../types"; +import { getEntityTypeById } from "../../../ontology/primitive/entity-type.js"; +import { systemAccountId } from "../../../system-account.js"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemEntityTypeIfNotExists, @@ -13,7 +13,7 @@ import { getCurrentHashSystemEntityTypeId, updateSystemEntityType, upgradeDependenciesInHashEntityType, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/005-create-hash-system-entities-and-web-bots.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/005-create-hash-system-entities-and-web-bots.migration.ts index 52fb0e18ecf..56bd3b6a27e 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/005-create-hash-system-entities-and-web-bots.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/005-create-hash-system-entities-and-web-bots.migration.ts @@ -7,18 +7,18 @@ import { import type { AccountId } from "@local/hash-graph-types/account"; import { extractOwnedByIdFromEntityId } from "@local/hash-subgraph"; -import { logger } from "../../../../logger"; -import { createHashInstance } from "../../../knowledge/system-types/hash-instance"; -import { systemAccountId } from "../../../system-account"; +import { logger } from "../../../../logger.js"; +import { createHashInstance } from "../../../knowledge/system-types/hash-instance.js"; +import { systemAccountId } from "../../../system-account.js"; import { ensureSystemWebEntitiesExist, owningWebs, -} from "../../system-webs-and-entities"; -import type { MigrationFunction } from "../types"; +} from "../../system-webs-and-entities.js"; +import type { MigrationFunction } from "../types.js"; import { getCurrentHashSystemEntityTypeId, getExistingUsersAndOrgs, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/006-create-first-custom-data-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/006-create-first-custom-data-types.migration.ts index d6ee686c79d..961acf1657b 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/006-create-first-custom-data-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/006-create-first-custom-data-types.migration.ts @@ -1,5 +1,5 @@ -import type { MigrationFunction } from "../types"; -import { createSystemDataTypeIfNotExists } from "../util"; +import type { MigrationFunction } from "../types.js"; +import { createSystemDataTypeIfNotExists } from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts index cd8aa61ce65..49a5a4f3597 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts @@ -4,17 +4,17 @@ import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-proper import type { ServiceFeature } from "@local/hash-isomorphic-utils/system-types/shared"; import { linkEntityTypeUrl } from "@local/hash-subgraph"; -import { logger } from "../../../../logger"; -import { createEntity } from "../../../knowledge/primitive/entity"; -import { getOrgByShortname } from "../../../knowledge/system-types/org"; -import type { MigrationFunction } from "../types"; +import { logger } from "../../../../logger.js"; +import { createEntity } from "../../../knowledge/primitive/entity.js"; +import { getOrgByShortname } from "../../../knowledge/system-types/org.js"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, getCurrentHashDataTypeId, getEntitiesByType, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts index b1d0b7a6e76..2452346f328 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts @@ -3,8 +3,8 @@ import type { BaseUrl } from "@local/hash-graph-types/ontology"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { linkEntityTypeUrl } from "@local/hash-subgraph"; -import { getEntityTypeById } from "../../../ontology/primitive/entity-type"; -import type { MigrationFunction } from "../types"; +import { getEntityTypeById } from "../../../ontology/primitive/entity-type.js"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemEntityTypeIfNotExists, @@ -13,7 +13,7 @@ import { updateSystemEntityType, upgradeDependenciesInHashEntityType, upgradeEntitiesToNewTypeVersion, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts index 5001f89d19f..c031b984998 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts @@ -3,8 +3,8 @@ import type { BaseUrl } from "@local/hash-graph-types/ontology"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { extractBaseUrl } from "@local/hash-subgraph/type-system-patch"; -import { getEntityTypeById } from "../../../ontology/primitive/entity-type"; -import type { MigrationFunction } from "../types"; +import { getEntityTypeById } from "../../../ontology/primitive/entity-type.js"; +import type { MigrationFunction } from "../types.js"; import { createSystemPropertyTypeIfNotExists, getCurrentHashDataTypeId, @@ -12,7 +12,7 @@ import { updateSystemEntityType, upgradeDependenciesInHashEntityType, upgradeEntitiesToNewTypeVersion, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts index eb6ec442c92..deaaaf7db10 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts @@ -1,9 +1,9 @@ -import type { MigrationFunction } from "../types"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemEntityTypeIfNotExists, getCurrentHashSystemEntityTypeId, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts index d4f7041445d..94636d3c7d1 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts @@ -6,15 +6,15 @@ import { systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { getEntityTypeById } from "../../../ontology/primitive/entity-type"; -import type { MigrationFunction } from "../types"; +import { getEntityTypeById } from "../../../ontology/primitive/entity-type.js"; +import type { MigrationFunction } from "../types.js"; import { getCurrentHashSystemEntityTypeId, updateSystemEntityType, upgradeDependenciesInHashEntityType, upgradeEntitiesToNewTypeVersion, -} from "../util"; -import { upgradeEntityTypeDependencies } from "../util/upgrade-entity-type-dependencies"; +} from "../util.js"; +import { upgradeEntityTypeDependencies } from "../util/upgrade-entity-type-dependencies.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts index 0255befd99b..44dbe0294ed 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts @@ -1,8 +1,8 @@ import { blockProtocolPropertyTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { linkEntityTypeUrl } from "@local/hash-subgraph"; -import { enabledIntegrations } from "../../../../integrations/enabled-integrations"; -import type { MigrationFunction } from "../types"; +import { enabledIntegrations } from "../../../../integrations/enabled-integrations.js"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemDataTypeIfNotExists, @@ -11,7 +11,7 @@ import { getCurrentHashLinkEntityTypeId, getCurrentHashPropertyTypeId, getCurrentHashSystemEntityTypeId, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/013-add-enabled-feature-flags-property.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/013-add-enabled-feature-flags-property.migration.ts index 686f528d4bf..482a337113e 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/013-add-enabled-feature-flags-property.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/013-add-enabled-feature-flags-property.migration.ts @@ -3,15 +3,15 @@ import type { BaseUrl } from "@local/hash-graph-types/ontology"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { extractBaseUrl } from "@local/hash-subgraph/type-system-patch"; -import { getEntityTypeById } from "../../../ontology/primitive/entity-type"; -import type { MigrationFunction } from "../types"; +import { getEntityTypeById } from "../../../ontology/primitive/entity-type.js"; +import type { MigrationFunction } from "../types.js"; import { createSystemPropertyTypeIfNotExists, getCurrentHashSystemEntityTypeId, updateSystemEntityType, upgradeDependenciesInHashEntityType, upgradeEntitiesToNewTypeVersion, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/014-add-instance-admin-permission.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/014-add-instance-admin-permission.migration.ts index ac66850cf06..162958dfa7f 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/014-add-instance-admin-permission.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/014-add-instance-admin-permission.migration.ts @@ -5,8 +5,8 @@ import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-id import { getEntities, modifyEntityAuthorizationRelationships, -} from "../../../knowledge/primitive/entity"; -import type { MigrationFunction } from "../types"; +} from "../../../knowledge/primitive/entity.js"; +import type { MigrationFunction } from "../types.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/015-add-flow-types.dev.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/015-add-flow-types.dev.migration.ts index 12a61edfc2c..12b399f53e8 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/015-add-flow-types.dev.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/015-add-flow-types.dev.migration.ts @@ -5,8 +5,8 @@ import { } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { linkEntityTypeUrl } from "@local/hash-subgraph"; -import { getEntityTypeById } from "../../../ontology/primitive/entity-type"; -import type { MigrationFunction } from "../types"; +import { getEntityTypeById } from "../../../ontology/primitive/entity-type.js"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemEntityTypeIfNotExists, @@ -14,7 +14,7 @@ import { getCurrentHashSystemEntityTypeId, updateSystemEntityType, upgradeEntitiesToNewTypeVersion, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/016-add-initial-currency-data-types.dev.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/016-add-initial-currency-data-types.dev.migration.ts index d874664d442..62843859076 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/016-add-initial-currency-data-types.dev.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/016-add-initial-currency-data-types.dev.migration.ts @@ -1,5 +1,5 @@ -import type { MigrationFunction } from "../types"; -import { createSystemDataTypeIfNotExists } from "../util"; +import type { MigrationFunction } from "../types.js"; +import { createSystemDataTypeIfNotExists } from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts index dd934d85591..b9b50e13ad2 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts @@ -7,13 +7,13 @@ import { import { createOrg, getOrgByShortname, -} from "../../../knowledge/system-types/org"; -import type { MigrationFunction } from "../types"; +} from "../../../knowledge/system-types/org.js"; +import type { MigrationFunction } from "../types.js"; import { anyUserInstantiator, createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, -} from "../util"; +} from "../util.js"; const migrate: MigrationFunction = async ({ context, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/types.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/types.ts index ef82380dddc..d16b26c8ac4 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/types.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/types.ts @@ -1,7 +1,7 @@ import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; import type { BaseUrl } from "@local/hash-graph-types/ontology"; -import type { ImpureGraphContext } from "../../context-types"; +import type { ImpureGraphContext } from "../../context-types.js"; export type MigrationState = { propertyTypeVersions: Record; diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.ts index 54c2be93bc8..38a3ce42f52 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.ts @@ -74,26 +74,26 @@ import { CACHED_DATA_TYPE_SCHEMAS, CACHED_ENTITY_TYPE_SCHEMAS, CACHED_PROPERTY_TYPE_SCHEMAS, -} from "../../../seed-data"; -import type { ImpureGraphFunction } from "../../context-types"; -import { getEntities } from "../../knowledge/primitive/entity"; +} from "../../../seed-data/index.js"; +import type { ImpureGraphFunction } from "../../context-types.js"; +import { getEntities } from "../../knowledge/primitive/entity.js"; import { createDataType, getDataTypeById, -} from "../../ontology/primitive/data-type"; +} from "../../ontology/primitive/data-type.js"; import { createEntityType, getEntityTypeById, -} from "../../ontology/primitive/entity-type"; +} from "../../ontology/primitive/entity-type.js"; import { createPropertyType, getPropertyTypeById, -} from "../../ontology/primitive/property-type"; -import type { PrimitiveDataTypeKey } from "../system-webs-and-entities"; -import { getOrCreateOwningAccountGroupId } from "../system-webs-and-entities"; -import type { MigrationState } from "./types"; -import { upgradeWebEntities } from "./util/upgrade-entities"; -import { upgradeEntityTypeDependencies } from "./util/upgrade-entity-type-dependencies"; +} from "../../ontology/primitive/property-type.js"; +import type { PrimitiveDataTypeKey } from "../system-webs-and-entities.js"; +import { getOrCreateOwningAccountGroupId } from "../system-webs-and-entities.js"; +import type { MigrationState } from "./types.js"; +import { upgradeWebEntities } from "./util/upgrade-entities.js"; +import { upgradeEntityTypeDependencies } from "./util/upgrade-entity-type-dependencies.js"; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entities.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entities.ts index a1d4bbcec3f..309a5168ee5 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entities.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/util/upgrade-entities.ts @@ -21,13 +21,13 @@ import { } from "@local/hash-subgraph/type-system-patch"; import isEqual from "lodash/isEqual"; -import type { ImpureGraphContext } from "../../../context-types"; +import type { ImpureGraphContext } from "../../../context-types.js"; import { getEntitySubgraph, updateEntity, -} from "../../../knowledge/primitive/entity"; -import { systemAccountId } from "../../../system-account"; -import type { MigrationState } from "../types"; +} from "../../../knowledge/primitive/entity.js"; +import { systemAccountId } from "../../../system-account.js"; +import type { MigrationState } from "../types.js"; export const upgradeWebEntities = async ({ authentication, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/system-webs-and-entities.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/system-webs-and-entities.ts index 68e0bc02f9f..e692c07aa59 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/system-webs-and-entities.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/system-webs-and-entities.ts @@ -14,16 +14,16 @@ import type { blockProtocolDataTypes } from "@local/hash-isomorphic-utils/ontolo import type { SystemTypeWebShortname } from "@local/hash-isomorphic-utils/ontology-types"; import { componentsFromVersionedUrl } from "@local/hash-subgraph/type-system-patch"; -import { enabledIntegrations } from "../../integrations/enabled-integrations"; -import { logger } from "../../logger"; +import { enabledIntegrations } from "../../integrations/enabled-integrations.js"; +import { logger } from "../../logger.js"; import { createAccount, createAccountGroup, createWeb, -} from "../account-permission-management"; -import type { ImpureGraphContext } from "../context-types"; -import { createOrg, getOrgByShortname } from "../knowledge/system-types/org"; -import { systemAccountId } from "../system-account"; +} from "../account-permission-management.js"; +import type { ImpureGraphContext } from "../context-types.js"; +import { createOrg, getOrgByShortname } from "../knowledge/system-types/org.js"; +import { systemAccountId } from "../system-account.js"; export const owningWebs: Record< SystemTypeWebShortname, diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity.ts b/apps/hash-api/src/graph/knowledge/primitive/entity.ts index e2e8645d953..fc761f2d51d 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity.ts @@ -60,16 +60,16 @@ import { ApolloError } from "apollo-server-errors"; import type { EntityDefinition, LinkedEntityDefinition, -} from "../../../graphql/api-types.gen"; -import { isTestEnv } from "../../../lib/env-config"; -import { linkedTreeFlatten } from "../../../util"; -import type { ImpureGraphFunction } from "../../context-types"; -import { rewriteSemanticFilter } from "../../shared/rewrite-semantic-filter"; -import { afterCreateEntityHooks } from "./entity/after-create-entity-hooks"; -import { afterUpdateEntityHooks } from "./entity/after-update-entity-hooks"; -import { beforeCreateEntityHooks } from "./entity/before-create-entity-hooks"; -import { beforeUpdateEntityHooks } from "./entity/before-update-entity-hooks"; -import { createLinkEntity, isEntityLinkEntity } from "./link-entity"; +} from "../../../graphql/api-types.gen.js"; +import { isTestEnv } from "../../../lib/env-config.js"; +import { linkedTreeFlatten } from "../../../util.js"; +import type { ImpureGraphFunction } from "../../context-types.js"; +import { rewriteSemanticFilter } from "../../shared/rewrite-semantic-filter.js"; +import { afterCreateEntityHooks } from "./entity/after-create-entity-hooks.js"; +import { afterUpdateEntityHooks } from "./entity/after-update-entity-hooks.js"; +import { beforeCreateEntityHooks } from "./entity/before-create-entity-hooks.js"; +import { beforeUpdateEntityHooks } from "./entity/before-update-entity-hooks.js"; +import { createLinkEntity, isEntityLinkEntity } from "./link-entity.js"; /** @todo: potentially directly export this from the subgraph package */ export type PropertyValue = PropertyObject[BaseUrl]; diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-create-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-create-entity-hooks.ts index a8c76a25869..c1e4e985bd7 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-create-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-create-entity-hooks.ts @@ -10,35 +10,35 @@ import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-proper import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; import { entityIdFromComponents } from "@local/hash-subgraph"; -import { isProdEnv } from "../../../../lib/env-config"; -import { createOrUpdateMailchimpUser } from "../../../../mailchimp"; +import { isProdEnv } from "../../../../lib/env-config.js"; +import { createOrUpdateMailchimpUser } from "../../../../mailchimp.js"; import { getBlockCollectionByBlock, getBlockFromEntity, -} from "../../system-types/block"; +} from "../../system-types/block.js"; import { getCommentAncestorBlock, getCommentAuthor, getCommentFromEntity, getCommentParent, -} from "../../system-types/comment"; +} from "../../system-types/comment.js"; import { createCommentNotification, createMentionNotification, getMentionNotification, -} from "../../system-types/notification"; -import { getPageFromEntity } from "../../system-types/page"; +} from "../../system-types/notification.js"; +import { getPageFromEntity } from "../../system-types/page.js"; import { getMentionedUsersInTextualContent, getTextById, -} from "../../system-types/text"; -import { getUserById } from "../../system-types/user"; -import { checkPermissionsOnEntity } from "../entity"; +} from "../../system-types/text.js"; +import { getUserById } from "../../system-types/user.js"; +import { checkPermissionsOnEntity } from "../entity.js"; import type { AfterCreateEntityHook, AfterCreateEntityHookCallback, -} from "./create-entity-hooks"; -import { getTextUpdateOccurredIn } from "./shared/mention-notification"; +} from "./create-entity-hooks.js"; +import { getTextUpdateOccurredIn } from "./shared/mention-notification.js"; /** * This after create `Comment` entity hook is responsible for creating diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks.ts index 7703bb4e1dc..3ddaabf2059 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks.ts @@ -3,10 +3,10 @@ import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-id import { entityTypesToParseTextFrom, parseTextFromFileAfterUpdateEntityHookCallback, -} from "./after-update-entity-hooks/file-document-after-update-entity-hook-callback"; -import { textAfterUpdateEntityHookCallback } from "./after-update-entity-hooks/text-after-update-entity-hook-callback"; -import { userAfterUpdateEntityHookCallback } from "./after-update-entity-hooks/user-after-update-entity-hook"; -import type { AfterUpdateEntityHook } from "./update-entity-hooks"; +} from "./after-update-entity-hooks/file-document-after-update-entity-hook-callback.js"; +import { textAfterUpdateEntityHookCallback } from "./after-update-entity-hooks/text-after-update-entity-hook-callback.js"; +import { userAfterUpdateEntityHookCallback } from "./after-update-entity-hooks/user-after-update-entity-hook.js"; +import type { AfterUpdateEntityHook } from "./update-entity-hooks.js"; export const afterUpdateEntityHooks: AfterUpdateEntityHook[] = [ { diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/file-document-after-update-entity-hook-callback.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/file-document-after-update-entity-hook-callback.ts index 837ddd4c7dc..57342efde65 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/file-document-after-update-entity-hook-callback.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/file-document-after-update-entity-hook-callback.ts @@ -15,7 +15,7 @@ import type { PDFDocument } from "@local/hash-isomorphic-utils/system-types/pdfd import type { PPTXPresentation } from "@local/hash-isomorphic-utils/system-types/pptxpresentation"; import { extractOwnedByIdFromEntityId } from "@local/hash-subgraph"; -import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks"; +import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks.js"; export const entityTypesToParseTextFrom: VersionedUrl[] = [ systemEntityTypes.docxDocument.entityTypeId, diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/text-after-update-entity-hook-callback.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/text-after-update-entity-hook-callback.ts index c9bade35334..25df9fd859a 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/text-after-update-entity-hook-callback.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/text-after-update-entity-hook-callback.ts @@ -9,15 +9,15 @@ import { archiveNotification, createMentionNotification, getMentionNotification, -} from "../../../system-types/notification"; +} from "../../../system-types/notification.js"; import { getMentionedUsersInTextualContent, getTextFromEntity, -} from "../../../system-types/text"; -import { getUserById } from "../../../system-types/user"; -import { checkPermissionsOnEntity } from "../../entity"; -import { getTextUpdateOccurredIn } from "../shared/mention-notification"; -import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks"; +} from "../../../system-types/text.js"; +import { getUserById } from "../../../system-types/user.js"; +import { checkPermissionsOnEntity } from "../../entity.js"; +import { getTextUpdateOccurredIn } from "../shared/mention-notification.js"; +import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks.js"; /** * This after update `Text` entity hook is responsible for creating diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/user-after-update-entity-hook.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/user-after-update-entity-hook.ts index ca226d81a80..121ba868be1 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/user-after-update-entity-hook.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/after-update-entity-hooks/user-after-update-entity-hook.ts @@ -2,13 +2,13 @@ import { getDefinedPropertyFromPatchesGetter } from "@local/hash-graph-sdk/entit import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; -import { isProdEnv } from "../../../../../lib/env-config"; -import { createOrUpdateMailchimpUser } from "../../../../../mailchimp"; +import { isProdEnv } from "../../../../../lib/env-config.js"; +import { createOrUpdateMailchimpUser } from "../../../../../mailchimp.js"; import { getUserFromEntity, updateUserKratosIdentityTraits, -} from "../../../system-types/user"; -import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks"; +} from "../../../system-types/user.js"; +import type { AfterUpdateEntityHookCallback } from "../update-entity-hooks.js"; export const userAfterUpdateEntityHookCallback: AfterUpdateEntityHookCallback = async ({ context, propertyPatches, updatedEntity }) => { diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/before-create-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/before-create-entity-hooks.ts index 855132e827d..c8efed0aad7 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/before-create-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/before-create-entity-hooks.ts @@ -1,3 +1,3 @@ -import type { BeforeCreateEntityHook } from "./create-entity-hooks"; +import type { BeforeCreateEntityHook } from "./create-entity-hooks.js"; export const beforeCreateEntityHooks: BeforeCreateEntityHook[] = []; diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks.ts index 71c7213c32d..5fe12365c21 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks.ts @@ -1,7 +1,7 @@ import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { userBeforeEntityUpdateHookCallback } from "./before-update-entity-hooks/user-before-update-entity-hook-callback"; -import type { BeforeUpdateEntityHook } from "./update-entity-hooks"; +import { userBeforeEntityUpdateHookCallback } from "./before-update-entity-hooks/user-before-update-entity-hook-callback.js"; +import type { BeforeUpdateEntityHook } from "./update-entity-hooks.js"; export const beforeUpdateEntityHooks: BeforeUpdateEntityHook[] = [ { diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks/user-before-update-entity-hook-callback.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks/user-before-update-entity-hook-callback.ts index 7c5f220e5e9..3538880466d 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks/user-before-update-entity-hook-callback.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/before-update-entity-hooks/user-before-update-entity-hook-callback.ts @@ -7,19 +7,19 @@ import type { OwnedById } from "@local/hash-graph-types/web"; import type { UserProperties } from "@local/hash-isomorphic-utils/system-types/user"; import { ApolloError, UserInputError } from "apollo-server-express"; -import { userHasAccessToHash } from "../../../../../shared/user-has-access-to-hash"; -import type { ImpureGraphContext } from "../../../../context-types"; -import { modifyWebAuthorizationRelationships } from "../../../../ontology/primitive/util"; -import { systemAccountId } from "../../../../system-account"; +import { userHasAccessToHash } from "../../../../../shared/user-has-access-to-hash.js"; +import type { ImpureGraphContext } from "../../../../context-types.js"; +import { modifyWebAuthorizationRelationships } from "../../../../ontology/primitive/util.js"; +import { systemAccountId } from "../../../../system-account.js"; import { shortnameContainsInvalidCharacter, shortnameIsRestricted, shortnameIsTaken, shortnameMaximumLength, shortnameMinimumLength, -} from "../../../system-types/account.fields"; -import { getUserFromEntity } from "../../../system-types/user"; -import type { BeforeUpdateEntityHookCallback } from "../update-entity-hooks"; +} from "../../../system-types/account.fields.js"; +import { getUserFromEntity } from "../../../system-types/user.js"; +import type { BeforeUpdateEntityHookCallback } from "../update-entity-hooks.js"; const validateAccountShortname = async ( context: ImpureGraphContext, diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/create-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/create-entity-hooks.ts index 10eb61be42d..540fb7481af 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/create-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/create-entity-hooks.ts @@ -3,7 +3,7 @@ import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication import type { Entity } from "@local/hash-graph-sdk/entity"; import type { PropertyObjectWithMetadata } from "@local/hash-graph-types/entity"; -import type { ImpureGraphContext } from "../../../context-types"; +import type { ImpureGraphContext } from "../../../context-types.js"; export type BeforeCreateEntityHookCallback = (params: { context: ImpureGraphContext; diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/shared/mention-notification.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/shared/mention-notification.ts index 98abcf7da78..0388cfaadf4 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/shared/mention-notification.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/shared/mention-notification.ts @@ -1,17 +1,17 @@ import { isPageEntityTypeId } from "@local/hash-isomorphic-utils/page-entity-type-ids"; -import type { ImpureGraphFunction } from "../../../../context-types"; -import type { Block } from "../../../system-types/block"; -import { getBlockCollectionByBlock } from "../../../system-types/block"; -import type { Comment } from "../../../system-types/comment"; -import { getCommentAncestorBlock } from "../../../system-types/comment"; -import type { Page } from "../../../system-types/page"; -import { getPageFromEntity } from "../../../system-types/page"; -import type { Text } from "../../../system-types/text"; +import type { ImpureGraphFunction } from "../../../../context-types.js"; +import type { Block } from "../../../system-types/block.js"; +import { getBlockCollectionByBlock } from "../../../system-types/block.js"; +import type { Comment } from "../../../system-types/comment.js"; +import { getCommentAncestorBlock } from "../../../system-types/comment.js"; +import type { Page } from "../../../system-types/page.js"; +import { getPageFromEntity } from "../../../system-types/page.js"; +import type { Text } from "../../../system-types/text.js"; import { getCommentByText, getPageAndBlockByText, -} from "../../../system-types/text"; +} from "../../../system-types/text.js"; export const getTextUpdateOccurredIn: ImpureGraphFunction< { text: Text; includeDrafts?: boolean }, diff --git a/apps/hash-api/src/graph/knowledge/primitive/entity/update-entity-hooks.ts b/apps/hash-api/src/graph/knowledge/primitive/entity/update-entity-hooks.ts index cc21cc5a76d..a59465075fa 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/entity/update-entity-hooks.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/entity/update-entity-hooks.ts @@ -3,7 +3,7 @@ import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication import type { Entity } from "@local/hash-graph-sdk/entity"; import type { PropertyPatchOperation } from "@local/hash-graph-types/entity"; -import type { ImpureGraphContext } from "../../../context-types"; +import type { ImpureGraphContext } from "../../../context-types.js"; type UpdateEntityHookCallbackBaseParams = { context: ImpureGraphContext; diff --git a/apps/hash-api/src/graph/knowledge/primitive/link-entity.ts b/apps/hash-api/src/graph/knowledge/primitive/link-entity.ts index a936940874a..9361958d6ae 100644 --- a/apps/hash-api/src/graph/knowledge/primitive/link-entity.ts +++ b/apps/hash-api/src/graph/knowledge/primitive/link-entity.ts @@ -9,13 +9,13 @@ import type { PropertyPatchOperation, } from "@local/hash-graph-types/entity"; -import type { ImpureGraphFunction } from "../../context-types"; +import type { ImpureGraphFunction } from "../../context-types.js"; import { getEntityTypeById, isEntityTypeLinkEntityType, -} from "../../ontology/primitive/entity-type"; -import { getLatestEntityById } from "./entity"; -import { afterCreateEntityHooks } from "./entity/after-create-entity-hooks"; +} from "../../ontology/primitive/entity-type.js"; +import { getLatestEntityById } from "./entity.js"; +import { afterCreateEntityHooks } from "./entity/after-create-entity-hooks.js"; export const isEntityLinkEntity = (entity: Entity): entity is LinkEntity => !!entity.linkData; diff --git a/apps/hash-api/src/graph/knowledge/system-types/account.fields.ts b/apps/hash-api/src/graph/knowledge/system-types/account.fields.ts index 8c82f061602..8fe765e3c3b 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/account.fields.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/account.fields.ts @@ -1,9 +1,9 @@ import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; -import { getOrgByShortname } from "./org"; -import { getUserByShortname } from "./user"; +} from "../../context-types.js"; +import { getOrgByShortname } from "./org.js"; +import { getUserByShortname } from "./user.js"; /** @todo: enable admins to expand upon restricted shortnames block list */ export const RESTRICTED_SHORTNAMES = [ diff --git a/apps/hash-api/src/graph/knowledge/system-types/block-collection.ts b/apps/hash-api/src/graph/knowledge/system-types/block-collection.ts index 04c6c391130..ebb5b003beb 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/block-collection.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/block-collection.ts @@ -15,19 +15,19 @@ import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; import { extractOwnedByIdFromEntityId } from "@local/hash-subgraph"; -import type { PositionInput } from "../../../graphql/api-types.gen"; -import type { ImpureGraphFunction } from "../../context-types"; +import type { PositionInput } from "../../../graphql/api-types.gen.js"; +import type { ImpureGraphFunction } from "../../context-types.js"; import { getEntityOutgoingLinks, getLatestEntityById, -} from "../primitive/entity"; +} from "../primitive/entity.js"; import { createLinkEntity, getLinkEntityRightEntity, updateLinkEntity, -} from "../primitive/link-entity"; -import type { Block } from "./block"; -import { getBlockFromEntity } from "./block"; +} from "../primitive/link-entity.js"; +import type { Block } from "./block.js"; +import { getBlockFromEntity } from "./block.js"; /** * Get the blocks in this blockCollection. diff --git a/apps/hash-api/src/graph/knowledge/system-types/block.ts b/apps/hash-api/src/graph/knowledge/system-types/block.ts index 6011b694ee3..1d55320a9c8 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/block.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/block.ts @@ -27,22 +27,22 @@ import { import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; +} from "../../context-types.js"; import { createEntity, getEntities, getEntityIncomingLinks, getEntityOutgoingLinks, getLatestEntityById, -} from "../primitive/entity"; +} from "../primitive/entity.js"; import { createLinkEntity, getLinkEntityLeftEntity, getLinkEntityRightEntity, isEntityLinkEntity, -} from "../primitive/link-entity"; -import type { Comment } from "./comment"; -import { getCommentFromEntity } from "./comment"; +} from "../primitive/link-entity.js"; +import type { Comment } from "./comment.js"; +import { getCommentFromEntity } from "./comment.js"; export type Block = { componentId: string; diff --git a/apps/hash-api/src/graph/knowledge/system-types/comment.ts b/apps/hash-api/src/graph/knowledge/system-types/comment.ts index e41a4200598..190e35efcd5 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/comment.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/comment.ts @@ -22,24 +22,24 @@ import type { EntityRelationAndSubject } from "@local/hash-subgraph"; import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; +} from "../../context-types.js"; import { createEntity, getEntityIncomingLinks, getEntityOutgoingLinks, getLatestEntityById, updateEntity, -} from "../primitive/entity"; +} from "../primitive/entity.js"; import { getLinkEntityLeftEntity, getLinkEntityRightEntity, -} from "../primitive/link-entity"; -import type { Block } from "./block"; -import { getBlockFromEntity } from "./block"; -import type { Text } from "./text"; -import { getTextFromEntity } from "./text"; -import type { User } from "./user"; -import { getUserFromEntity } from "./user"; +} from "../primitive/link-entity.js"; +import type { Block } from "./block.js"; +import { getBlockFromEntity } from "./block.js"; +import type { Text } from "./text.js"; +import { getTextFromEntity } from "./text.js"; +import type { User } from "./user.js"; +import { getUserFromEntity } from "./user.js"; export type Comment = { /** diff --git a/apps/hash-api/src/graph/knowledge/system-types/file.ts b/apps/hash-api/src/graph/knowledge/system-types/file.ts index bd9e5d20d4b..bb4aa52a5f9 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/file.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/file.ts @@ -19,16 +19,16 @@ import mime from "mime-types"; import type { MutationCreateFileFromUrlArgs, MutationRequestFileUploadArgs, -} from "../../../graphql/api-types.gen"; +} from "../../../graphql/api-types.gen.js"; import type { ImpureGraphContext, ImpureGraphFunction, -} from "../../context-types"; +} from "../../context-types.js"; import { createEntity, getLatestEntityById, updateEntity, -} from "../primitive/entity"; +} from "../primitive/entity.js"; // 1800 seconds const UPLOAD_URL_EXPIRATION_SECONDS = 60 * 30; diff --git a/apps/hash-api/src/graph/knowledge/system-types/hash-instance.ts b/apps/hash-api/src/graph/knowledge/system-types/hash-instance.ts index 9d8e7c56c1c..47b4dc750a1 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/hash-instance.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/hash-instance.ts @@ -8,12 +8,12 @@ import type { OwnedById } from "@local/hash-graph-types/web"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import type { HASHInstance as HashInstanceEntity } from "@local/hash-isomorphic-utils/system-types/hashinstance"; -import { createAccountGroup } from "../../account-permission-management"; -import type { ImpureGraphFunction } from "../../context-types"; -import { modifyEntityTypeAuthorizationRelationships } from "../../ontology/primitive/entity-type"; -import { createEntity } from "../primitive/entity"; -import { getOrgByShortname } from "./org"; -import type { User } from "./user"; +import { createAccountGroup } from "../../account-permission-management.js"; +import type { ImpureGraphFunction } from "../../context-types.js"; +import { modifyEntityTypeAuthorizationRelationships } from "../../ontology/primitive/entity-type.js"; +import { createEntity } from "../primitive/entity.js"; +import { getOrgByShortname } from "./org.js"; +import type { User } from "./user.js"; /** * Create the hash instance entity. diff --git a/apps/hash-api/src/graph/knowledge/system-types/linear-integration-entity.ts b/apps/hash-api/src/graph/knowledge/system-types/linear-integration-entity.ts index 8b55bf26520..87800213412 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/linear-integration-entity.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/linear-integration-entity.ts @@ -37,10 +37,10 @@ import { import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; -import { systemAccountId } from "../../system-account"; -import { getLatestEntityById, updateEntity } from "../primitive/entity"; -import { createLinkEntity } from "../primitive/link-entity"; +} from "../../context-types.js"; +import { systemAccountId } from "../../system-account.js"; +import { getLatestEntityById, updateEntity } from "../primitive/entity.js"; +import { createLinkEntity } from "../primitive/link-entity.js"; export type LinearIntegration = { linearOrgId: string; diff --git a/apps/hash-api/src/graph/knowledge/system-types/linear-user-secret.ts b/apps/hash-api/src/graph/knowledge/system-types/linear-user-secret.ts index 84d5f1968d0..7b0773b9e00 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/linear-user-secret.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/linear-user-secret.ts @@ -28,7 +28,7 @@ import { import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; +} from "../../context-types.js"; export type LinearUserSecret = { connectionSourceName: string; diff --git a/apps/hash-api/src/graph/knowledge/system-types/notification.ts b/apps/hash-api/src/graph/knowledge/system-types/notification.ts index 748a992281e..8c2d3256bb0 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/notification.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/notification.ts @@ -41,18 +41,18 @@ import { import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; +} from "../../context-types.js"; import { createEntity, getEntitySubgraph, updateEntity, -} from "../primitive/entity"; -import { createLinkEntity } from "../primitive/link-entity"; -import type { Block } from "./block"; -import type { Comment } from "./comment"; -import type { Page } from "./page"; -import type { Text } from "./text"; -import type { User } from "./user"; +} from "../primitive/entity.js"; +import { createLinkEntity } from "../primitive/link-entity.js"; +import type { Block } from "./block.js"; +import type { Comment } from "./comment.js"; +import type { Page } from "./page.js"; +import type { Text } from "./text.js"; +import type { User } from "./user.js"; type Notification = { archived?: boolean; diff --git a/apps/hash-api/src/graph/knowledge/system-types/org-membership.ts b/apps/hash-api/src/graph/knowledge/system-types/org-membership.ts index 4ff16fca6c3..4d3b8cabfd6 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/org-membership.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/org-membership.ts @@ -18,16 +18,16 @@ import { import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; +} from "../../context-types.js"; import { createLinkEntity, getLinkEntityLeftEntity, getLinkEntityRightEntity, -} from "../primitive/link-entity"; -import type { Org } from "./org"; -import { getOrgFromEntity } from "./org"; -import type { User } from "./user"; -import { getUserFromEntity } from "./user"; +} from "../primitive/link-entity.js"; +import type { Org } from "./org.js"; +import { getOrgFromEntity } from "./org.js"; +import type { User } from "./user.js"; +import { getUserFromEntity } from "./user.js"; export type OrgMembership = { linkEntity: LinkEntity; diff --git a/apps/hash-api/src/graph/knowledge/system-types/org.ts b/apps/hash-api/src/graph/knowledge/system-types/org.ts index 58d766bcc54..9bbaf3bb2d5 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/org.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/org.ts @@ -26,21 +26,21 @@ import { import { createAccountGroup, createWeb, -} from "../../account-permission-management"; +} from "../../account-permission-management.js"; import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; +} from "../../context-types.js"; import { createEntity, getLatestEntityById, updateEntity, -} from "../primitive/entity"; +} from "../primitive/entity.js"; import { shortnameIsInvalid, shortnameIsRestricted, shortnameIsTaken, -} from "./account.fields"; +} from "./account.fields.js"; export type Org = { accountGroupId: AccountGroupId; diff --git a/apps/hash-api/src/graph/knowledge/system-types/page.ts b/apps/hash-api/src/graph/knowledge/system-types/page.ts index 9d6f633ea66..eb3d119e50d 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/page.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/page.ts @@ -36,22 +36,22 @@ import { generateKeyBetween } from "fractional-indexing"; import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; +} from "../../context-types.js"; import { createEntity, getEntities, getEntityOutgoingLinks, getLatestEntityById, updateEntity, -} from "../primitive/entity"; +} from "../primitive/entity.js"; import { createLinkEntity, getLinkEntityRightEntity, -} from "../primitive/link-entity"; -import type { Block } from "./block"; -import { getBlockComments, getBlockFromEntity } from "./block"; -import { addBlockToBlockCollection } from "./block-collection"; -import type { Comment } from "./comment"; +} from "../primitive/link-entity.js"; +import type { Block } from "./block.js"; +import { getBlockComments, getBlockFromEntity } from "./block.js"; +import { addBlockToBlockCollection } from "./block-collection.js"; +import type { Comment } from "./comment.js"; export type Page = { title: string; diff --git a/apps/hash-api/src/graph/knowledge/system-types/text.ts b/apps/hash-api/src/graph/knowledge/system-types/text.ts index c6d94baf5b6..75193e48db6 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/text.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/text.ts @@ -21,17 +21,17 @@ import { extractEntityUuidFromEntityId } from "@local/hash-subgraph"; import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; -import { getEntities, getLatestEntityById } from "../primitive/entity"; -import { isEntityLinkEntity } from "../primitive/link-entity"; -import type { Block } from "./block"; -import { getBlockById } from "./block"; -import type { Comment } from "./comment"; -import { getCommentById } from "./comment"; -import type { Page } from "./page"; -import { getPageFromEntity } from "./page"; -import type { User } from "./user"; -import { getUserById } from "./user"; +} from "../../context-types.js"; +import { getEntities, getLatestEntityById } from "../primitive/entity.js"; +import { isEntityLinkEntity } from "../primitive/link-entity.js"; +import type { Block } from "./block.js"; +import { getBlockById } from "./block.js"; +import type { Comment } from "./comment.js"; +import { getCommentById } from "./comment.js"; +import type { Page } from "./page.js"; +import { getPageFromEntity } from "./page.js"; +import type { User } from "./user.js"; +import { getUserById } from "./user.js"; export type Text = { textualContent: TextToken[]; diff --git a/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts b/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts index 3575c09a3e1..7c71cc44f91 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts @@ -18,8 +18,8 @@ import type { UserSecret } from "@local/hash-isomorphic-utils/system-types/share import type { EntityRelationAndSubject } from "@local/hash-subgraph"; import type { Auth } from "googleapis"; -import { createEntity } from "../primitive/entity"; -import { createLinkEntity } from "../primitive/link-entity"; +import { createEntity } from "../primitive/entity.js"; +import { createLinkEntity } from "../primitive/link-entity.js"; type CreateUserSecretParams = { /** diff --git a/apps/hash-api/src/graph/knowledge/system-types/user.ts b/apps/hash-api/src/graph/knowledge/system-types/user.ts index ed0cbd60fe0..c366f252749 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/user.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/user.ts @@ -27,31 +27,34 @@ import { import type { KratosUserIdentity, KratosUserIdentityTraits, -} from "../../../auth/ory-kratos"; -import { kratosIdentityApi } from "../../../auth/ory-kratos"; -import { createAccount, createWeb } from "../../account-permission-management"; +} from "../../../auth/ory-kratos.js"; +import { kratosIdentityApi } from "../../../auth/ory-kratos.js"; +import { + createAccount, + createWeb, +} from "../../account-permission-management.js"; import type { ImpureGraphFunction, PureGraphFunction, -} from "../../context-types"; -import { systemAccountId } from "../../system-account"; +} from "../../context-types.js"; +import { systemAccountId } from "../../system-account.js"; import { createEntity, getEntityOutgoingLinks, getLatestEntityById, -} from "../primitive/entity"; +} from "../primitive/entity.js"; import { shortnameIsInvalid, shortnameIsRestricted, shortnameIsTaken, -} from "./account.fields"; -import { addHashInstanceAdmin } from "./hash-instance"; -import type { OrgMembership } from "./org-membership"; +} from "./account.fields.js"; +import { addHashInstanceAdmin } from "./hash-instance.js"; +import type { OrgMembership } from "./org-membership.js"; import { createOrgMembership, getOrgMembershipFromLinkEntity, getOrgMembershipOrg, -} from "./org-membership"; +} from "./org-membership.js"; export type User = { accountId: AccountId; diff --git a/apps/hash-api/src/graph/ontology/primitive/data-type.ts b/apps/hash-api/src/graph/ontology/primitive/data-type.ts index eaedf048bc2..91682e80fe1 100644 --- a/apps/hash-api/src/graph/ontology/primitive/data-type.ts +++ b/apps/hash-api/src/graph/ontology/primitive/data-type.ts @@ -32,8 +32,8 @@ import type { } from "@local/hash-subgraph"; import { ontologyTypeRecordIdToVersionedUrl } from "@local/hash-subgraph"; -import type { ImpureGraphFunction } from "../../context-types"; -import { getWebShortname, isExternalTypeId } from "./util"; +import type { ImpureGraphFunction } from "../../context-types.js"; +import { getWebShortname, isExternalTypeId } from "./util.js"; /** * Create a data type. diff --git a/apps/hash-api/src/graph/ontology/primitive/entity-type.ts b/apps/hash-api/src/graph/ontology/primitive/entity-type.ts index cd715e60490..c197352d7b8 100644 --- a/apps/hash-api/src/graph/ontology/primitive/entity-type.ts +++ b/apps/hash-api/src/graph/ontology/primitive/entity-type.ts @@ -43,9 +43,9 @@ import { ontologyTypeRecordIdToVersionedUrl, } from "@local/hash-subgraph"; -import type { ImpureGraphFunction } from "../../context-types"; -import { rewriteSemanticFilter } from "../../shared/rewrite-semantic-filter"; -import { getWebShortname, isExternalTypeId } from "./util"; +import type { ImpureGraphFunction } from "../../context-types.js"; +import { rewriteSemanticFilter } from "../../shared/rewrite-semantic-filter.js"; +import { getWebShortname, isExternalTypeId } from "./util.js"; export const getEntityTypeAuthorizationRelationships: ImpureGraphFunction< { entityTypeId: VersionedUrl }, diff --git a/apps/hash-api/src/graph/ontology/primitive/property-type.ts b/apps/hash-api/src/graph/ontology/primitive/property-type.ts index eddb281b8cf..a7d5d19cdbf 100644 --- a/apps/hash-api/src/graph/ontology/primitive/property-type.ts +++ b/apps/hash-api/src/graph/ontology/primitive/property-type.ts @@ -33,8 +33,8 @@ import type { } from "@local/hash-subgraph"; import { ontologyTypeRecordIdToVersionedUrl } from "@local/hash-subgraph"; -import type { ImpureGraphFunction } from "../../context-types"; -import { getWebShortname, isExternalTypeId } from "./util"; +import type { ImpureGraphFunction } from "../../context-types.js"; +import { getWebShortname, isExternalTypeId } from "./util.js"; /** * Create a property type. diff --git a/apps/hash-api/src/graph/ontology/primitive/util.ts b/apps/hash-api/src/graph/ontology/primitive/util.ts index 99e377dda7e..25750dff58d 100644 --- a/apps/hash-api/src/graph/ontology/primitive/util.ts +++ b/apps/hash-api/src/graph/ontology/primitive/util.ts @@ -11,9 +11,9 @@ import { isSelfHostedInstance } from "@local/hash-isomorphic-utils/instance"; import type { WebAuthorizationRelationship } from "@local/hash-subgraph"; import { entityIdFromComponents } from "@local/hash-subgraph"; -import type { ImpureGraphFunction } from "../../context-types"; -import { getOrgById } from "../../knowledge/system-types/org"; -import { getUserById } from "../../knowledge/system-types/user"; +import type { ImpureGraphFunction } from "../../context-types.js"; +import { getOrgById } from "../../knowledge/system-types/org.js"; +import { getUserById } from "../../knowledge/system-types/user.js"; export const isExternalTypeId = (typeId: VersionedUrl) => !typeId.startsWith(frontendUrl) && diff --git a/apps/hash-api/src/graph/system-account.ts b/apps/hash-api/src/graph/system-account.ts index e6eb2fa013f..50bccceb3f4 100644 --- a/apps/hash-api/src/graph/system-account.ts +++ b/apps/hash-api/src/graph/system-account.ts @@ -4,9 +4,9 @@ import type { AccountId } from "@local/hash-graph-types/account"; import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { versionedUrlFromComponents } from "@local/hash-subgraph/type-system-patch"; -import { createAccount } from "./account-permission-management"; -import type { ImpureGraphContext } from "./context-types"; -import { getEntityTypeById } from "./ontology/primitive/entity-type"; +import { createAccount } from "./account-permission-management.js"; +import type { ImpureGraphContext } from "./context-types.js"; +import { getEntityTypeById } from "./ontology/primitive/entity-type.js"; // eslint-disable-next-line import/no-mutable-exports export let systemAccountId: AccountId; diff --git a/apps/hash-api/src/graphql/context.ts b/apps/hash-api/src/graphql/context.ts index 4b17a52f7d8..b9640d9a06b 100644 --- a/apps/hash-api/src/graphql/context.ts +++ b/apps/hash-api/src/graphql/context.ts @@ -6,10 +6,10 @@ import type { VaultClient } from "@local/hash-backend-utils/vault"; import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; import type { EnforcedEntityEditionProvenance } from "@local/hash-graph-sdk/entity"; -import type { CacheAdapter } from "../cache"; -import type { EmailTransporter } from "../email/transporters"; -import type { GraphApi } from "../graph/context-types"; -import type { User } from "../graph/knowledge/system-types/user"; +import type { CacheAdapter } from "../cache/index.js"; +import type { EmailTransporter } from "../email/transporters/index.js"; +import type { GraphApi } from "../graph/context-types.js"; +import type { User } from "../graph/knowledge/system-types/user.js"; /** * Apollo context object with dataSources. For details see: diff --git a/apps/hash-api/src/graphql/create-apollo-server.ts b/apps/hash-api/src/graphql/create-apollo-server.ts index a83948df772..55ef44270ce 100644 --- a/apps/hash-api/src/graphql/create-apollo-server.ts +++ b/apps/hash-api/src/graphql/create-apollo-server.ts @@ -13,12 +13,12 @@ import { ApolloServerPluginLandingPageGraphQLPlayground } from "apollo-server-co import { ApolloServer } from "apollo-server-express"; import type { StatsD } from "hot-shots"; -import { getActorIdFromRequest } from "../auth/get-actor-id"; -import type { CacheAdapter } from "../cache"; -import type { EmailTransporter } from "../email/transporters"; -import type { GraphApi } from "../graph/context-types"; -import type { GraphQLContext } from "./context"; -import { resolvers } from "./resolvers"; +import { getActorIdFromRequest } from "../auth/get-actor-id.js"; +import type { CacheAdapter } from "../cache/index.js"; +import type { EmailTransporter } from "../email/transporters/index.js"; +import type { GraphApi } from "../graph/context-types.js"; +import type { GraphQLContext } from "./context.js"; +import { resolvers } from "./resolvers/index.js"; export interface CreateApolloServerParams { graphApi: GraphApi; diff --git a/apps/hash-api/src/graphql/opentelemetry.ts b/apps/hash-api/src/graphql/opentelemetry.ts index cfc68169c8c..729289e2c1b 100644 --- a/apps/hash-api/src/graphql/opentelemetry.ts +++ b/apps/hash-api/src/graphql/opentelemetry.ts @@ -10,7 +10,7 @@ import { Resource } from "@opentelemetry/resources"; import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base"; import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node"; -import { logger } from "../logger"; +import { logger } from "../logger.js"; const traceTimeout = 5000; diff --git a/apps/hash-api/src/graphql/resolvers/blockprotocol/get-block.ts b/apps/hash-api/src/graphql/resolvers/blockprotocol/get-block.ts index d70c983ee8d..21e5dd12aba 100644 --- a/apps/hash-api/src/graphql/resolvers/blockprotocol/get-block.ts +++ b/apps/hash-api/src/graphql/resolvers/blockprotocol/get-block.ts @@ -1,8 +1,8 @@ import { blockProtocolHubOrigin } from "@local/hash-isomorphic-utils/blocks"; import { ApolloError, ForbiddenError } from "apollo-server-express"; -import type { BlockProtocolBlock, ResolverFn } from "../../api-types.gen"; -import type { GraphQLContext } from "../../context"; +import type { BlockProtocolBlock, ResolverFn } from "../../api-types.gen.js"; +import type { GraphQLContext } from "../../context.js"; export const getBlockProtocolBlocksResolver: ResolverFn< BlockProtocolBlock[], diff --git a/apps/hash-api/src/graphql/resolvers/embed/index.ts b/apps/hash-api/src/graphql/resolvers/embed/index.ts index c8782729eb6..140444218d9 100644 --- a/apps/hash-api/src/graphql/resolvers/embed/index.ts +++ b/apps/hash-api/src/graphql/resolvers/embed/index.ts @@ -1,13 +1,13 @@ import { ApolloError } from "apollo-server-errors"; -import oEmbedData from "oembed-providers/providers.json"; +import oEmbedData from "oembed-providers/providers.json" assert { type: "json" }; import type { Embed, Maybe, QueryEmbedCodeArgs, ResolverFn, -} from "../../api-types.gen"; -import type { GraphQLContext } from "../../context"; +} from "../../api-types.gen.js"; +import type { GraphQLContext } from "../../context.js"; oEmbedData.unshift({ provider_name: "HASH", diff --git a/apps/hash-api/src/graphql/resolvers/flows/get-flow-run-by-id.ts b/apps/hash-api/src/graphql/resolvers/flows/get-flow-run-by-id.ts index f10b89e88f6..509d37b0d6c 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/get-flow-run-by-id.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/get-flow-run-by-id.ts @@ -7,9 +7,9 @@ import type { FlowRun, QueryGetFlowRunByIdArgs, ResolverFn, -} from "../../api-types.gen"; -import type { GraphQLContext } from "../../context"; -import { wereDetailedFieldsRequested } from "./shared/were-detailed-fields-requested"; +} from "../../api-types.gen.js"; +import type { GraphQLContext } from "../../context.js"; +import { wereDetailedFieldsRequested } from "./shared/were-detailed-fields-requested.js"; export const getFlowRunByIdResolver: ResolverFn< FlowRun | SparseFlowRun, diff --git a/apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts b/apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts index e59258dff52..ec927d80a84 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts @@ -5,9 +5,9 @@ import type { FlowRun, QueryGetFlowRunsArgs, ResolverFn, -} from "../../api-types.gen"; -import type { GraphQLContext } from "../../context"; -import { wereDetailedFieldsRequested } from "./shared/were-detailed-fields-requested"; +} from "../../api-types.gen.js"; +import type { GraphQLContext } from "../../context.js"; +import { wereDetailedFieldsRequested } from "./shared/were-detailed-fields-requested.js"; export const getFlowRunsResolver: ResolverFn< FlowRun[] | SparseFlowRun[], diff --git a/apps/hash-api/src/graphql/resolvers/flows/start-flow.ts b/apps/hash-api/src/graphql/resolvers/flows/start-flow.ts index a708441994b..d8299970ef1 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/start-flow.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/start-flow.ts @@ -6,8 +6,8 @@ import type { import { validateFlowDefinition } from "@local/hash-isomorphic-utils/flows/util"; import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; -import type { MutationStartFlowArgs, ResolverFn } from "../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../context"; +import type { MutationStartFlowArgs, ResolverFn } from "../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../context.js"; export const startFlow: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/flows/submit-external-input-response.ts b/apps/hash-api/src/graphql/resolvers/flows/submit-external-input-response.ts index 578ecb0fbe2..ee48fa9a003 100644 --- a/apps/hash-api/src/graphql/resolvers/flows/submit-external-input-response.ts +++ b/apps/hash-api/src/graphql/resolvers/flows/submit-external-input-response.ts @@ -6,8 +6,8 @@ import { ApolloError } from "apollo-server-errors"; import type { MutationSubmitExternalInputResponseArgs, ResolverFn, -} from "../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../context"; +} from "../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../context.js"; export const submitExternalInputResponse: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/index.ts b/apps/hash-api/src/graphql/resolvers/index.ts index f17d462fcff..5d195fe7949 100644 --- a/apps/hash-api/src/graphql/resolvers/index.ts +++ b/apps/hash-api/src/graphql/resolvers/index.ts @@ -3,34 +3,34 @@ import { JSONObjectResolver } from "graphql-scalars"; import { addAccountGroupMember, removeAccountGroupMember, -} from "../../graph/account-permission-management"; +} from "../../graph/account-permission-management.js"; import type { EntityAuthorizationSubject, MutationResolvers, QueryResolvers, Resolvers, -} from "../api-types.gen"; -import { getBlockProtocolBlocksResolver } from "./blockprotocol/get-block"; -import { embedCode } from "./embed"; -import { getFlowRunByIdResolver } from "./flows/get-flow-run-by-id"; -import { getFlowRunsResolver } from "./flows/get-flow-runs"; -import { startFlow } from "./flows/start-flow"; -import { submitExternalInputResponse } from "./flows/submit-external-input-response"; -import { getLinearOrganizationResolver } from "./integrations/linear/linear-organization"; -import { syncLinearIntegrationWithWorkspacesMutation } from "./integrations/linear/sync-workspaces-with-teams"; -import { blocksResolver } from "./knowledge/block/block"; -import { blockChildEntityResolver } from "./knowledge/block/data-entity"; -import { blockCollectionContents } from "./knowledge/block-collection/block-collection-contents"; -import { updateBlockCollectionContents } from "./knowledge/block-collection/update-block-collection-contents"; -import { commentAuthorResolver } from "./knowledge/comment/author"; -import { createCommentResolver } from "./knowledge/comment/comment"; -import { deleteCommentResolver } from "./knowledge/comment/delete"; -import { commentHasTextResolver } from "./knowledge/comment/has-text"; -import { commentParentResolver } from "./knowledge/comment/parent"; -import { commentRepliesResolver } from "./knowledge/comment/replies"; -import { resolveCommentResolver } from "./knowledge/comment/resolve"; -import { commentTextUpdatedAtResolver } from "./knowledge/comment/text-updated-at"; -import { updateCommentTextResolver } from "./knowledge/comment/update-text"; +} from "../api-types.gen.js"; +import { getBlockProtocolBlocksResolver } from "./blockprotocol/get-block.js"; +import { embedCode } from "./embed/index.js"; +import { getFlowRunByIdResolver } from "./flows/get-flow-run-by-id.js"; +import { getFlowRunsResolver } from "./flows/get-flow-runs.js"; +import { startFlow } from "./flows/start-flow.js"; +import { submitExternalInputResponse } from "./flows/submit-external-input-response.js"; +import { getLinearOrganizationResolver } from "./integrations/linear/linear-organization.js"; +import { syncLinearIntegrationWithWorkspacesMutation } from "./integrations/linear/sync-workspaces-with-teams.js"; +import { blocksResolver } from "./knowledge/block/block.js"; +import { blockChildEntityResolver } from "./knowledge/block/data-entity.js"; +import { blockCollectionContents } from "./knowledge/block-collection/block-collection-contents.js"; +import { updateBlockCollectionContents } from "./knowledge/block-collection/update-block-collection-contents.js"; +import { commentAuthorResolver } from "./knowledge/comment/author.js"; +import { createCommentResolver } from "./knowledge/comment/comment.js"; +import { deleteCommentResolver } from "./knowledge/comment/delete.js"; +import { commentHasTextResolver } from "./knowledge/comment/has-text.js"; +import { commentParentResolver } from "./knowledge/comment/parent.js"; +import { commentRepliesResolver } from "./knowledge/comment/replies.js"; +import { resolveCommentResolver } from "./knowledge/comment/resolve.js"; +import { commentTextUpdatedAtResolver } from "./knowledge/comment/text-updated-at.js"; +import { updateCommentTextResolver } from "./knowledge/comment/update-text.js"; import { addEntityEditorResolver, addEntityOwnerResolver, @@ -48,32 +48,32 @@ import { removeEntityViewerResolver, updateEntitiesResolver, updateEntityResolver, -} from "./knowledge/entity/entity"; -import { getEntityDiffsResolver } from "./knowledge/entity/get-entity-diffs"; -import { createFileFromUrl } from "./knowledge/file/create-file-from-url"; -import { requestFileUpload } from "./knowledge/file/request-file-upload"; -import { hashInstanceSettingsResolver } from "./knowledge/hash-instance/hash-instance"; -import { createOrgResolver } from "./knowledge/org/create-org"; -import { pageContents } from "./knowledge/page"; +} from "./knowledge/entity/entity.js"; +import { getEntityDiffsResolver } from "./knowledge/entity/get-entity-diffs.js"; +import { createFileFromUrl } from "./knowledge/file/create-file-from-url.js"; +import { requestFileUpload } from "./knowledge/file/request-file-upload.js"; +import { hashInstanceSettingsResolver } from "./knowledge/hash-instance/hash-instance.js"; +import { createOrgResolver } from "./knowledge/org/create-org.js"; +import { pageContents } from "./knowledge/page/index.js"; import { createPageResolver, pageCommentsResolver, -} from "./knowledge/page/page"; -import { setParentPageResolver } from "./knowledge/page/set-parent-page"; -import { updatePageResolver } from "./knowledge/page/update-page"; +} from "./knowledge/page/page.js"; +import { setParentPageResolver } from "./knowledge/page/set-parent-page.js"; +import { updatePageResolver } from "./knowledge/page/update-page.js"; import { canUserEdit, checkUserPermissionsOnEntity, -} from "./knowledge/shared/check-permissions"; -import { getUsageRecordsResolver } from "./knowledge/user/get-usage-records"; -import { getWaitlistPositionResolver } from "./knowledge/user/get-waitlist-position"; -import { hasAccessToHashResolver } from "./knowledge/user/has-access-to-hash"; -import { isShortnameTakenResolver } from "./knowledge/user/is-shortname-taken"; -import { meResolver } from "./knowledge/user/me"; -import { submitEarlyAccessFormResolver } from "./knowledge/user/submit-early-access-form"; -import { loggedInMiddleware } from "./middlewares/logged-in"; -import { loggedInAndSignedUpMiddleware } from "./middlewares/logged-in-and-signed-up"; -import { getDataType, queryDataTypes } from "./ontology/data-type"; +} from "./knowledge/shared/check-permissions.js"; +import { getUsageRecordsResolver } from "./knowledge/user/get-usage-records.js"; +import { getWaitlistPositionResolver } from "./knowledge/user/get-waitlist-position.js"; +import { hasAccessToHashResolver } from "./knowledge/user/has-access-to-hash.js"; +import { isShortnameTakenResolver } from "./knowledge/user/is-shortname-taken.js"; +import { meResolver } from "./knowledge/user/me.js"; +import { submitEarlyAccessFormResolver } from "./knowledge/user/submit-early-access-form.js"; +import { loggedInMiddleware } from "./middlewares/logged-in.js"; +import { loggedInAndSignedUpMiddleware } from "./middlewares/logged-in-and-signed-up.js"; +import { getDataType, queryDataTypes } from "./ontology/data-type.js"; import { archiveEntityTypeResolver, checkUserPermissionsOnEntityTypeResolver, @@ -82,7 +82,7 @@ import { queryEntityTypesResolver, unarchiveEntityTypeResolver, updateEntityTypeResolver, -} from "./ontology/entity-type"; +} from "./ontology/entity-type.js"; import { archivePropertyTypeResolver, createPropertyTypeResolver, @@ -90,7 +90,7 @@ import { queryPropertyTypesResolver, unarchivePropertyTypeResolver, updatePropertyTypeResolver, -} from "./ontology/property-type"; +} from "./ontology/property-type.js"; export const resolvers: Omit & { Query: Required; diff --git a/apps/hash-api/src/graphql/resolvers/integrations/linear/linear-organization.ts b/apps/hash-api/src/graphql/resolvers/integrations/linear/linear-organization.ts index 3454d2c0991..082b13e0b7b 100644 --- a/apps/hash-api/src/graphql/resolvers/integrations/linear/linear-organization.ts +++ b/apps/hash-api/src/graphql/resolvers/integrations/linear/linear-organization.ts @@ -1,12 +1,12 @@ -import { getLinearUserSecretByLinearOrgId } from "../../../../graph/knowledge/system-types/linear-user-secret"; -import { getOrganization, listTeams } from "../../../../integrations/linear"; +import { getLinearUserSecretByLinearOrgId } from "../../../../graph/knowledge/system-types/linear-user-secret.js"; +import { getOrganization, listTeams } from "../../../../integrations/linear.js"; import type { LinearOrganization, QueryGetLinearOrganizationArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const getLinearOrganizationResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/integrations/linear/sync-workspaces-with-teams.ts b/apps/hash-api/src/graphql/resolvers/integrations/linear/sync-workspaces-with-teams.ts index 07f475af6f8..a9acbffb41d 100644 --- a/apps/hash-api/src/graphql/resolvers/integrations/linear/sync-workspaces-with-teams.ts +++ b/apps/hash-api/src/graphql/resolvers/integrations/linear/sync-workspaces-with-teams.ts @@ -15,21 +15,21 @@ import { import { getLatestEntityById, modifyEntityAuthorizationRelationships, -} from "../../../../graph/knowledge/primitive/entity"; +} from "../../../../graph/knowledge/primitive/entity.js"; import { getLinearIntegrationById, getSyncedWorkspacesForLinearIntegration, linkIntegrationToWorkspace, -} from "../../../../graph/knowledge/system-types/linear-integration-entity"; -import { getLinearUserSecretByLinearOrgId } from "../../../../graph/knowledge/system-types/linear-user-secret"; -import { systemAccountId } from "../../../../graph/system-account"; -import { Linear } from "../../../../integrations/linear"; +} from "../../../../graph/knowledge/system-types/linear-integration-entity.js"; +import { getLinearUserSecretByLinearOrgId } from "../../../../graph/knowledge/system-types/linear-user-secret.js"; +import { systemAccountId } from "../../../../graph/system-account.js"; +import { Linear } from "../../../../integrations/linear.js"; import type { MutationSyncLinearIntegrationWithWorkspacesArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const syncLinearIntegrationWithWorkspacesMutation: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/block-collection-contents.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/block-collection-contents.ts index d5902b44113..d5b6b1439be 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/block-collection-contents.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/block-collection-contents.ts @@ -2,12 +2,12 @@ import type { Entity, LinkEntity } from "@local/hash-graph-sdk/entity"; import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils/system-types/canvas"; import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; -import { getBlockCollectionBlocks } from "../../../../graph/knowledge/system-types/block-collection"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedBlockGQL } from "../graphql-mapping"; -import { mapBlockToGQL } from "../graphql-mapping"; +import { getBlockCollectionBlocks } from "../../../../graph/knowledge/system-types/block-collection.js"; +import type { ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedBlockGQL } from "../graphql-mapping.js"; +import { mapBlockToGQL } from "../graphql-mapping.js"; export const blockCollectionContents: ResolverFn< { diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-actions.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-actions.ts index d2bf5dc9359..a528ed8a9cc 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-actions.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-actions.ts @@ -11,20 +11,20 @@ import { createDefaultAuthorizationRelationships } from "@local/hash-isomorphic- import { ApolloError, UserInputError } from "apollo-server-errors"; import produce from "immer"; -import type { ImpureGraphContext } from "../../../../graph/context-types"; -import type { PropertyValue } from "../../../../graph/knowledge/primitive/entity"; +import type { ImpureGraphContext } from "../../../../graph/context-types.js"; +import type { PropertyValue } from "../../../../graph/knowledge/primitive/entity.js"; import { createEntityWithLinks, getLatestEntityById, updateEntity, -} from "../../../../graph/knowledge/primitive/entity"; -import type { Block } from "../../../../graph/knowledge/system-types/block"; +} from "../../../../graph/knowledge/primitive/entity.js"; +import type { Block } from "../../../../graph/knowledge/system-types/block.js"; import { createBlock, getBlockById, updateBlockDataEntity, -} from "../../../../graph/knowledge/system-types/block"; -import type { User } from "../../../../graph/knowledge/system-types/user"; +} from "../../../../graph/knowledge/system-types/block.js"; +import type { User } from "../../../../graph/knowledge/system-types/user.js"; import type { CreateEntityAction, EntityDefinition, @@ -32,7 +32,7 @@ import type { SwapBlockDataAction, UpdateBlockCollectionAction, UpdateEntityAction, -} from "../../../api-types.gen"; +} from "../../../api-types.gen.js"; export const createEntityWithPlaceholdersFn = ( diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-contents.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-contents.ts index da2fbdae94e..e4e743c6a7d 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-contents.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block-collection/update-block-collection-contents.ts @@ -1,20 +1,20 @@ import type { Entity } from "@local/hash-graph-sdk/entity"; import { UserInputError } from "apollo-server-errors"; -import { getLatestEntityById } from "../../../../graph/knowledge/primitive/entity"; +import { getLatestEntityById } from "../../../../graph/knowledge/primitive/entity.js"; import { addBlockToBlockCollection, moveBlockInBlockCollection, removeBlockFromBlockCollection, -} from "../../../../graph/knowledge/system-types/block-collection"; -import { exactlyOne } from "../../../../util"; +} from "../../../../graph/knowledge/system-types/block-collection.js"; +import { exactlyOne } from "../../../../util.js"; import type { MutationUpdateBlockCollectionContentsArgs, ResolverFn, UpdateBlockCollectionContentsResult, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; import { createEntityWithPlaceholdersFn, filterForAction, @@ -23,7 +23,7 @@ import { handleSwapBlockData, handleUpdateEntity, PlaceholderResultsMap, -} from "./update-block-collection-actions"; +} from "./update-block-collection-actions.js"; /** * @todo This operation should ideally be atomic in nature, either we do all diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block/block.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block/block.ts index 67538bca43f..039e2e00a40 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block/block.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block/block.ts @@ -1,8 +1,8 @@ -import { getBlockById } from "../../../../graph/knowledge/system-types/block"; -import type { QueryBlocksArgs, ResolverFn } from "../../../api-types.gen"; -import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedBlockGQL } from "../graphql-mapping"; +import { getBlockById } from "../../../../graph/knowledge/system-types/block.js"; +import type { QueryBlocksArgs, ResolverFn } from "../../../api-types.gen.js"; +import type { GraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedBlockGQL } from "../graphql-mapping.js"; export const blocksResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/block/data-entity.ts b/apps/hash-api/src/graphql/resolvers/knowledge/block/data-entity.ts index 49243c277de..4cb848fed96 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/block/data-entity.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/block/data-entity.ts @@ -3,11 +3,11 @@ import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; import { getBlockById, getBlockData, -} from "../../../../graph/knowledge/system-types/block"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedBlockGQL } from "../graphql-mapping"; +} from "../../../../graph/knowledge/system-types/block.js"; +import type { ResolverFn } from "../../../api-types.gen.js"; +import type { GraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedBlockGQL } from "../graphql-mapping.js"; export const blockChildEntityResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/author.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/author.ts index eec16745ade..91246bd10b7 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/author.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/author.ts @@ -1,10 +1,10 @@ import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; -import { getCommentAuthor } from "../../../../graph/knowledge/system-types/comment"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedCommentGQL } from "../graphql-mapping"; +import { getCommentAuthor } from "../../../../graph/knowledge/system-types/comment.js"; +import type { ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedCommentGQL } from "../graphql-mapping.js"; export const commentAuthorResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/comment.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/comment.ts index a7df0af3894..d19e78c82e0 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/comment.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/comment.ts @@ -1,14 +1,14 @@ import { extractOwnedByIdFromEntityId } from "@local/hash-subgraph"; -import { createComment } from "../../../../graph/knowledge/system-types/comment"; +import { createComment } from "../../../../graph/knowledge/system-types/comment.js"; import type { MutationCreateCommentArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedCommentGQL } from "../graphql-mapping.js"; +import { mapCommentToGQL } from "../graphql-mapping.js"; export const createCommentResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/delete.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/delete.ts index af3c769c648..88349a03ce7 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/delete.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/delete.ts @@ -1,15 +1,15 @@ import { deleteComment, getCommentById, -} from "../../../../graph/knowledge/system-types/comment"; +} from "../../../../graph/knowledge/system-types/comment.js"; import type { MutationDeleteCommentArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedCommentGQL } from "../graphql-mapping.js"; +import { mapCommentToGQL } from "../graphql-mapping.js"; export const deleteCommentResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/has-text.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/has-text.ts index 61b18eff06d..313682c0247 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/has-text.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/has-text.ts @@ -1,10 +1,10 @@ import type { TextToken } from "@local/hash-isomorphic-utils/types"; -import { getCommentText } from "../../../../graph/knowledge/system-types/comment"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedCommentGQL } from "../graphql-mapping"; +import { getCommentText } from "../../../../graph/knowledge/system-types/comment.js"; +import type { ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedCommentGQL } from "../graphql-mapping.js"; export const commentHasTextResolver: ResolverFn< TextToken[], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/parent.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/parent.ts index 3404ac698c5..b57a27f9413 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/parent.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/parent.ts @@ -1,10 +1,10 @@ import type { SerializedEntity } from "@local/hash-graph-sdk/entity"; -import { getCommentParent } from "../../../../graph/knowledge/system-types/comment"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedCommentGQL } from "../graphql-mapping"; +import { getCommentParent } from "../../../../graph/knowledge/system-types/comment.js"; +import type { ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedCommentGQL } from "../graphql-mapping.js"; export const commentParentResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/replies.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/replies.ts index e4cee3cb2e8..368c6ffb8c7 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/replies.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/replies.ts @@ -1,9 +1,9 @@ -import { getCommentReplies } from "../../../../graph/knowledge/system-types/comment"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; +import { getCommentReplies } from "../../../../graph/knowledge/system-types/comment.js"; +import type { ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedCommentGQL } from "../graphql-mapping.js"; +import { mapCommentToGQL } from "../graphql-mapping.js"; export const commentRepliesResolver: ResolverFn< UnresolvedCommentGQL[], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/resolve.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/resolve.ts index d60a8a5e231..45ac35d2607 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/resolve.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/resolve.ts @@ -1,15 +1,15 @@ import { getCommentById, resolveComment, -} from "../../../../graph/knowledge/system-types/comment"; +} from "../../../../graph/knowledge/system-types/comment.js"; import type { MutationResolveCommentArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedCommentGQL } from "../graphql-mapping.js"; +import { mapCommentToGQL } from "../graphql-mapping.js"; export const resolveCommentResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/text-updated-at.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/text-updated-at.ts index d523f3642fa..3bced8ead3a 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/text-updated-at.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/text-updated-at.ts @@ -1,7 +1,7 @@ -import { getCommentText } from "../../../../graph/knowledge/system-types/comment"; -import type { CommentResolvers } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import { getCommentText } from "../../../../graph/knowledge/system-types/comment.js"; +import type { CommentResolvers } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const commentTextUpdatedAtResolver: CommentResolvers["textUpdatedAt"] = async ({ metadata }, _, graphQLContext) => { diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/comment/update-text.ts b/apps/hash-api/src/graphql/resolvers/knowledge/comment/update-text.ts index 92bf7194aae..b3100d17684 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/comment/update-text.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/comment/update-text.ts @@ -1,15 +1,15 @@ import { getCommentById, updateCommentText, -} from "../../../../graph/knowledge/system-types/comment"; +} from "../../../../graph/knowledge/system-types/comment.js"; import type { MutationUpdateCommentTextArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedCommentGQL } from "../graphql-mapping"; -import { mapCommentToGQL } from "../graphql-mapping"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedCommentGQL } from "../graphql-mapping.js"; +import { mapCommentToGQL } from "../graphql-mapping.js"; export const updateCommentTextResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/entity/entity.ts b/apps/hash-api/src/graphql/resolvers/knowledge/entity/entity.ts index ef1c907bc9b..a6ae8d833e4 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/entity/entity.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/entity/entity.ts @@ -37,12 +37,12 @@ import { removeEntityAdministrator, removeEntityEditor, updateEntity, -} from "../../../../graph/knowledge/primitive/entity"; +} from "../../../../graph/knowledge/primitive/entity.js"; import { createLinkEntity, isEntityLinkEntity, updateLinkEntity, -} from "../../../../graph/knowledge/primitive/link-entity"; +} from "../../../../graph/knowledge/primitive/link-entity.js"; import type { AuthorizationViewerInput, EntityAuthorizationRelationship, @@ -62,15 +62,18 @@ import type { QueryIsEntityPublicArgs, QueryResolvers, ResolverFn, -} from "../../../api-types.gen"; +} from "../../../api-types.gen.js"; import { AccountGroupAuthorizationSubjectRelation, AuthorizationSubjectKind, EntityAuthorizationRelation, -} from "../../../api-types.gen"; -import type { GraphQLContext, LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import { createSubgraphAndPermissionsReturn } from "../shared/create-subgraph-and-permissions-return"; +} from "../../../api-types.gen.js"; +import type { + GraphQLContext, + LoggedInGraphQLContext, +} from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import { createSubgraphAndPermissionsReturn } from "../shared/create-subgraph-and-permissions-return.js"; export const createEntityResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/entity/get-entity-diffs.ts b/apps/hash-api/src/graphql/resolvers/knowledge/entity/get-entity-diffs.ts index 107aeca0577..5537eb87920 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/entity/get-entity-diffs.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/entity/get-entity-diffs.ts @@ -1,11 +1,11 @@ -import { calculateEntityDiff } from "../../../../graph/knowledge/primitive/entity"; +import { calculateEntityDiff } from "../../../../graph/knowledge/primitive/entity.js"; import type { EntityDiff, Query, QueryGetEntityDiffsArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { GraphQLContext } from "../../../context"; +} from "../../../api-types.gen.js"; +import type { GraphQLContext } from "../../../context.js"; export const getEntityDiffsResolver: ResolverFn< Query["getEntityDiffs"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts b/apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts index 8d7449c1b27..37bf98f83c4 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts @@ -1,13 +1,13 @@ import type { Entity } from "@local/hash-graph-sdk/entity"; import type { File as FileEntity } from "@local/hash-isomorphic-utils/system-types/shared"; -import { createFileFromExternalUrl } from "../../../../graph/knowledge/system-types/file"; +import { createFileFromExternalUrl } from "../../../../graph/knowledge/system-types/file.js"; import type { MutationCreateFileFromUrlArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const createFileFromUrl: ResolverFn< Promise>, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts b/apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts index 5477cf2c713..d6e5b4e1fe3 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts @@ -1,13 +1,13 @@ import { UserInputError } from "apollo-server-errors"; -import { createFileFromUploadRequest } from "../../../../graph/knowledge/system-types/file"; +import { createFileFromUploadRequest } from "../../../../graph/knowledge/system-types/file.js"; import type { MutationRequestFileUploadArgs, RequestFileUploadResponse, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; /** * We want to limit the size of files that can be uploaded to account diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/graphql-mapping.ts b/apps/hash-api/src/graphql/resolvers/knowledge/graphql-mapping.ts index 39c471fea84..96c48467845 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/graphql-mapping.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/graphql-mapping.ts @@ -1,11 +1,11 @@ -import type { Block } from "../../../graph/knowledge/system-types/block"; -import type { Comment } from "../../../graph/knowledge/system-types/comment"; -import type { Page } from "../../../graph/knowledge/system-types/page"; +import type { Block } from "../../../graph/knowledge/system-types/block.js"; +import type { Comment } from "../../../graph/knowledge/system-types/comment.js"; +import type { Page } from "../../../graph/knowledge/system-types/page.js"; import type { Block as GQLBlock, Comment as GQLComment, Page as GQLPage, -} from "../../api-types.gen"; +} from "../../api-types.gen.js"; export type ExternalPageResolversGQL = | "contents" diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/hash-instance/hash-instance.ts b/apps/hash-api/src/graphql/resolvers/knowledge/hash-instance/hash-instance.ts index f6d3a79f463..9de579235d1 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/hash-instance/hash-instance.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/hash-instance/hash-instance.ts @@ -1,9 +1,12 @@ import { getHashInstance } from "@local/hash-backend-utils/hash-instance"; -import { checkEntityPermission } from "../../../../graph/knowledge/primitive/entity"; -import type { HashInstanceSettings, ResolverFn } from "../../../api-types.gen"; -import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import { checkEntityPermission } from "../../../../graph/knowledge/primitive/entity.js"; +import type { + HashInstanceSettings, + ResolverFn, +} from "../../../api-types.gen.js"; +import type { GraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const hashInstanceSettingsResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/org/create-org.ts b/apps/hash-api/src/graphql/resolvers/knowledge/org/create-org.ts index 15a70efbae6..c7df507ed54 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/org/create-org.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/org/create-org.ts @@ -1,11 +1,14 @@ import type { Subgraph } from "@local/hash-subgraph"; -import { getLatestEntityRootedSubgraph } from "../../../../graph/knowledge/primitive/entity"; -import { createOrg } from "../../../../graph/knowledge/system-types/org"; -import { joinOrg } from "../../../../graph/knowledge/system-types/user"; -import type { MutationCreateOrgArgs, ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import { getLatestEntityRootedSubgraph } from "../../../../graph/knowledge/primitive/entity.js"; +import { createOrg } from "../../../../graph/knowledge/system-types/org.js"; +import { joinOrg } from "../../../../graph/knowledge/system-types/user.js"; +import type { + MutationCreateOrgArgs, + ResolverFn, +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const createOrgResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/index.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/index.ts index 20af35c3ac3..f8009eb08e3 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/index.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/index.ts @@ -1 +1 @@ -export { pageContents } from "./page-contents"; +export { pageContents } from "./page-contents.js"; diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/page-contents.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/page-contents.ts index 8db3af48b6f..58b6b9d3ea0 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/page-contents.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/page-contents.ts @@ -3,12 +3,15 @@ import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-id import type { HasSpatiallyPositionedContent } from "@local/hash-isomorphic-utils/system-types/canvas"; import type { HasIndexedContent } from "@local/hash-isomorphic-utils/system-types/shared"; -import { getPageBlocks } from "../../../../graph/knowledge/system-types/page"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedBlockGQL, UnresolvedPageGQL } from "../graphql-mapping"; -import { mapBlockToGQL } from "../graphql-mapping"; +import { getPageBlocks } from "../../../../graph/knowledge/system-types/page.js"; +import type { ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { + UnresolvedBlockGQL, + UnresolvedPageGQL, +} from "../graphql-mapping.js"; +import { mapBlockToGQL } from "../graphql-mapping.js"; export const pageContents: ResolverFn< { diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/page.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/page.ts index 836ffc65133..3bb04e96921 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/page.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/page.ts @@ -1,19 +1,19 @@ import { createPage, getPageComments, -} from "../../../../graph/knowledge/system-types/page"; +} from "../../../../graph/knowledge/system-types/page.js"; import type { MutationCreatePageArgs, QueryPageCommentsArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; import type { UnresolvedCommentGQL, UnresolvedPageGQL, -} from "../graphql-mapping"; -import { mapCommentToGQL, mapPageToGQL } from "../graphql-mapping"; +} from "../graphql-mapping.js"; +import { mapCommentToGQL, mapPageToGQL } from "../graphql-mapping.js"; export const createPageResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/set-parent-page.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/set-parent-page.ts index fc272ae2f85..d03c7eae954 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/set-parent-page.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/set-parent-page.ts @@ -3,15 +3,15 @@ import { ApolloError } from "apollo-server-express"; import { getPageById, setPageParentPage, -} from "../../../../graph/knowledge/system-types/page"; +} from "../../../../graph/knowledge/system-types/page.js"; import type { MutationSetParentPageArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedPageGQL } from "../graphql-mapping"; -import { mapPageToGQL } from "../graphql-mapping"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedPageGQL } from "../graphql-mapping.js"; +import { mapPageToGQL } from "../graphql-mapping.js"; export const setParentPageResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/page/update-page.ts b/apps/hash-api/src/graphql/resolvers/knowledge/page/update-page.ts index f8907902282..f7263abec00 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/page/update-page.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/page/update-page.ts @@ -1,19 +1,19 @@ import { mergePropertiesAndMetadata } from "@local/hash-graph-sdk/entity"; import { systemPropertyTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { updateEntity } from "../../../../graph/knowledge/primitive/entity"; +import { updateEntity } from "../../../../graph/knowledge/primitive/entity.js"; import { getPageById, getPageFromEntity, -} from "../../../../graph/knowledge/system-types/page"; +} from "../../../../graph/knowledge/system-types/page.js"; import type { MutationUpdatePageArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import type { UnresolvedPageGQL } from "../graphql-mapping"; -import { mapPageToGQL } from "../graphql-mapping"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import type { UnresolvedPageGQL } from "../graphql-mapping.js"; +import { mapPageToGQL } from "../graphql-mapping.js"; export const updatePageResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/shared/check-permissions.ts b/apps/hash-api/src/graphql/resolvers/knowledge/shared/check-permissions.ts index c595d525f48..c6260f84fca 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/shared/check-permissions.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/shared/check-permissions.ts @@ -4,10 +4,13 @@ import type { UserPermissions } from "@local/hash-isomorphic-utils/types"; import { checkEntityPermission, checkPermissionsOnEntity, -} from "../../../../graph/knowledge/primitive/entity"; -import type { ResolverFn } from "../../../api-types.gen"; -import type { GraphQLContext, LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../../graph/knowledge/primitive/entity.js"; +import type { ResolverFn } from "../../../api-types.gen.js"; +import type { + GraphQLContext, + LoggedInGraphQLContext, +} from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const checkUserPermissionsOnEntity: ResolverFn< UserPermissions, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/shared/create-subgraph-and-permissions-return.ts b/apps/hash-api/src/graphql/resolvers/knowledge/shared/create-subgraph-and-permissions-return.ts index 8cb0eec8c4d..6bcae34d494 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/shared/create-subgraph-and-permissions-return.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/shared/create-subgraph-and-permissions-return.ts @@ -5,10 +5,10 @@ import type { GraphQLResolveInfo } from "graphql"; import type { ResolveTree } from "graphql-parse-resolve-info"; import { parseResolveInfo } from "graphql-parse-resolve-info"; -import { checkPermissionsOnEntitiesInSubgraph } from "../../../../graph/knowledge/primitive/entity"; -import type { SubgraphAndPermissions } from "../../../api-types.gen"; -import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +import { checkPermissionsOnEntitiesInSubgraph } from "../../../../graph/knowledge/primitive/entity.js"; +import type { SubgraphAndPermissions } from "../../../api-types.gen.js"; +import type { GraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; const werePermissionsRequested = (info: GraphQLResolveInfo) => { const parsedResolveInfoFragment = parseResolveInfo(info); diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/get-usage-records.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/get-usage-records.ts index a884ea53137..9a95807aa0d 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/get-usage-records.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/get-usage-records.ts @@ -12,14 +12,14 @@ import type { AccountEntityId } from "@local/hash-subgraph"; import { extractAccountId } from "@local/hash-subgraph"; import { ForbiddenError } from "apollo-server-express"; -import { getEntities } from "../../../../graph/knowledge/primitive/entity"; +import { getEntities } from "../../../../graph/knowledge/primitive/entity.js"; import type { Query, ResolverFn, UserUsageRecords, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const getUsageRecordsResolver: ResolverFn< Query["getUsageRecords"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/get-waitlist-position.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/get-waitlist-position.ts index 50f7eab4f50..83e1ac59655 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/get-waitlist-position.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/get-waitlist-position.ts @@ -2,8 +2,8 @@ import { internalApiClient } from "@local/hash-backend-utils/internal-api-client import { isSelfHostedInstance } from "@local/hash-isomorphic-utils/instance"; import type { GetWaitlistPosition200Response } from "@local/internal-api-client"; -import type { Query, ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; +import type { Query, ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; export const getWaitlistPositionResolver: ResolverFn< Query["getWaitlistPosition"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/has-access-to-hash.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/has-access-to-hash.ts index aa9d56c7290..8396f90ecb8 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/has-access-to-hash.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/has-access-to-hash.ts @@ -1,6 +1,6 @@ -import { userHasAccessToHash } from "../../../../shared/user-has-access-to-hash"; -import type { Query, ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; +import { userHasAccessToHash } from "../../../../shared/user-has-access-to-hash.js"; +import type { Query, ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; export const hasAccessToHashResolver: ResolverFn< Query["hasAccessToHash"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/is-shortname-taken.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/is-shortname-taken.ts index dc6d9a90863..253aada58f5 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/is-shortname-taken.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/is-shortname-taken.ts @@ -1,13 +1,13 @@ import { shortnameIsRestricted, shortnameIsTaken, -} from "../../../../graph/knowledge/system-types/account.fields"; +} from "../../../../graph/knowledge/system-types/account.fields.js"; import type { QueryIsShortnameTakenArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { GraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { GraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const isShortnameTakenResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/me.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/me.ts index d5df4aacfd2..0668dec2659 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/me.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/me.ts @@ -1,8 +1,8 @@ -import { getLatestEntityRootedSubgraph } from "../../../../graph/knowledge/primitive/entity"; -import type { Query, QueryMeArgs, ResolverFn } from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; -import { createSubgraphAndPermissionsReturn } from "../shared/create-subgraph-and-permissions-return"; +import { getLatestEntityRootedSubgraph } from "../../../../graph/knowledge/primitive/entity.js"; +import type { Query, QueryMeArgs, ResolverFn } from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; +import { createSubgraphAndPermissionsReturn } from "../shared/create-subgraph-and-permissions-return.js"; export const meResolver: ResolverFn< Query["me"], diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts index b4b01d76266..71bf244c122 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts @@ -4,14 +4,14 @@ import { systemEntityTypes } from "@local/hash-isomorphic-utils/ontology-type-id import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; import type { ProspectiveUser } from "@local/hash-isomorphic-utils/system-types/prospectiveuser"; -import { createEntity } from "../../../../graph/knowledge/primitive/entity"; -import { systemAccountId } from "../../../../graph/system-account"; +import { createEntity } from "../../../../graph/knowledge/primitive/entity.js"; +import { systemAccountId } from "../../../../graph/system-account.js"; import type { MutationSubmitEarlyAccessFormArgs, ResolverFn, -} from "../../../api-types.gen"; -import type { LoggedInGraphQLContext } from "../../../context"; -import { graphQLContextToImpureGraphContext } from "../../util"; +} from "../../../api-types.gen.js"; +import type { LoggedInGraphQLContext } from "../../../context.js"; +import { graphQLContextToImpureGraphContext } from "../../util.js"; export const submitEarlyAccessFormResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/middlewares/logged-in-and-signed-up.ts b/apps/hash-api/src/graphql/resolvers/middlewares/logged-in-and-signed-up.ts index 88609a464bf..80b54582099 100644 --- a/apps/hash-api/src/graphql/resolvers/middlewares/logged-in-and-signed-up.ts +++ b/apps/hash-api/src/graphql/resolvers/middlewares/logged-in-and-signed-up.ts @@ -1,7 +1,7 @@ -import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; -import { loggedInMiddleware } from "./logged-in"; -import type { ResolverMiddleware } from "./middleware-types"; -import { signedUpMiddleware } from "./signed-up"; +import type { GraphQLContext, LoggedInGraphQLContext } from "../../context.js"; +import { loggedInMiddleware } from "./logged-in.js"; +import type { ResolverMiddleware } from "./middleware-types.js"; +import { signedUpMiddleware } from "./signed-up.js"; export const loggedInAndSignedUpMiddleware: ResolverMiddleware< GraphQLContext, diff --git a/apps/hash-api/src/graphql/resolvers/middlewares/logged-in.ts b/apps/hash-api/src/graphql/resolvers/middlewares/logged-in.ts index 45388f16ca8..75fda06d029 100644 --- a/apps/hash-api/src/graphql/resolvers/middlewares/logged-in.ts +++ b/apps/hash-api/src/graphql/resolvers/middlewares/logged-in.ts @@ -1,7 +1,7 @@ import { ForbiddenError } from "apollo-server-express"; -import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; -import type { ResolverMiddleware } from "./middleware-types"; +import type { GraphQLContext, LoggedInGraphQLContext } from "../../context.js"; +import type { ResolverMiddleware } from "./middleware-types.js"; export const loggedInMiddleware: ResolverMiddleware< GraphQLContext, diff --git a/apps/hash-api/src/graphql/resolvers/middlewares/middleware-types.ts b/apps/hash-api/src/graphql/resolvers/middlewares/middleware-types.ts index bf72a98530f..ca9a17f88a8 100644 --- a/apps/hash-api/src/graphql/resolvers/middlewares/middleware-types.ts +++ b/apps/hash-api/src/graphql/resolvers/middlewares/middleware-types.ts @@ -1,4 +1,4 @@ -import type { ResolverFn } from "../../api-types.gen"; +import type { ResolverFn } from "../../api-types.gen.js"; export type ResolverMiddleware< TStartContext, diff --git a/apps/hash-api/src/graphql/resolvers/middlewares/signed-up.ts b/apps/hash-api/src/graphql/resolvers/middlewares/signed-up.ts index da3f7f29712..dc7c99c3621 100644 --- a/apps/hash-api/src/graphql/resolvers/middlewares/signed-up.ts +++ b/apps/hash-api/src/graphql/resolvers/middlewares/signed-up.ts @@ -1,7 +1,7 @@ import { ForbiddenError } from "apollo-server-express"; -import type { LoggedInGraphQLContext } from "../../context"; -import type { ResolverMiddleware } from "./middleware-types"; +import type { LoggedInGraphQLContext } from "../../context.js"; +import type { ResolverMiddleware } from "./middleware-types.js"; export const signedUpMiddleware: ResolverMiddleware< LoggedInGraphQLContext, diff --git a/apps/hash-api/src/graphql/resolvers/ontology/data-type.ts b/apps/hash-api/src/graphql/resolvers/ontology/data-type.ts index 6e54cee82a3..b107e689b90 100644 --- a/apps/hash-api/src/graphql/resolvers/ontology/data-type.ts +++ b/apps/hash-api/src/graphql/resolvers/ontology/data-type.ts @@ -12,14 +12,14 @@ import type { SerializedSubgraph, } from "@local/hash-subgraph"; -import { getDataTypeSubgraphById } from "../../../graph/ontology/primitive/data-type"; +import { getDataTypeSubgraphById } from "../../../graph/ontology/primitive/data-type.js"; import type { QueryGetDataTypeArgs, QueryQueryDataTypesArgs, ResolverFn, -} from "../../api-types.gen"; -import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; -import { graphQLContextToImpureGraphContext } from "../util"; +} from "../../api-types.gen.js"; +import type { GraphQLContext, LoggedInGraphQLContext } from "../../context.js"; +import { graphQLContextToImpureGraphContext } from "../util.js"; export const queryDataTypes: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/ontology/entity-type.ts b/apps/hash-api/src/graphql/resolvers/ontology/entity-type.ts index a039c32451e..86064f27864 100644 --- a/apps/hash-api/src/graphql/resolvers/ontology/entity-type.ts +++ b/apps/hash-api/src/graphql/resolvers/ontology/entity-type.ts @@ -22,7 +22,7 @@ import { getEntityTypeSubgraphById, unarchiveEntityType, updateEntityType, -} from "../../../graph/ontology/primitive/entity-type"; +} from "../../../graph/ontology/primitive/entity-type.js"; import type { MutationArchiveEntityTypeArgs, MutationCreateEntityTypeArgs, @@ -32,9 +32,9 @@ import type { QueryGetEntityTypeArgs, QueryQueryEntityTypesArgs, ResolverFn, -} from "../../api-types.gen"; -import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; -import { graphQLContextToImpureGraphContext } from "../util"; +} from "../../api-types.gen.js"; +import type { GraphQLContext, LoggedInGraphQLContext } from "../../context.js"; +import { graphQLContextToImpureGraphContext } from "../util.js"; export const createEntityTypeResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/ontology/property-type.ts b/apps/hash-api/src/graphql/resolvers/ontology/property-type.ts index 8876463b0d6..5ccf84b9b45 100644 --- a/apps/hash-api/src/graphql/resolvers/ontology/property-type.ts +++ b/apps/hash-api/src/graphql/resolvers/ontology/property-type.ts @@ -22,7 +22,7 @@ import { getPropertyTypeSubgraphById, unarchivePropertyType, updatePropertyType, -} from "../../../graph/ontology/primitive/property-type"; +} from "../../../graph/ontology/primitive/property-type.js"; import type { MutationArchivePropertyTypeArgs, MutationCreatePropertyTypeArgs, @@ -31,9 +31,9 @@ import type { QueryGetPropertyTypeArgs, QueryQueryPropertyTypesArgs, ResolverFn, -} from "../../api-types.gen"; -import type { GraphQLContext, LoggedInGraphQLContext } from "../../context"; -import { graphQLContextToImpureGraphContext } from "../util"; +} from "../../api-types.gen.js"; +import type { GraphQLContext, LoggedInGraphQLContext } from "../../context.js"; +import { graphQLContextToImpureGraphContext } from "../util.js"; export const createPropertyTypeResolver: ResolverFn< Promise, diff --git a/apps/hash-api/src/graphql/resolvers/util.ts b/apps/hash-api/src/graphql/resolvers/util.ts index fbc91eb9ec6..cb0d8ce25b8 100644 --- a/apps/hash-api/src/graphql/resolvers/util.ts +++ b/apps/hash-api/src/graphql/resolvers/util.ts @@ -1,5 +1,5 @@ -import type { ImpureGraphContext } from "../../graph/context-types"; -import type { GraphQLContext } from "../context"; +import type { ImpureGraphContext } from "../../graph/context-types.js"; +import type { GraphQLContext } from "../context.js"; export const graphQLContextToImpureGraphContext = ({ dataSources, diff --git a/apps/hash-api/src/index.ts b/apps/hash-api/src/index.ts index 8363ba3d502..03b51594158 100644 --- a/apps/hash-api/src/index.ts +++ b/apps/hash-api/src/index.ts @@ -1,5 +1,6 @@ /* eslint-disable import/first */ +import { getAwsRegion } from "@local/hash-backend-utils/aws-config"; import { getRequiredEnv, monorepoRootDir, @@ -10,18 +11,12 @@ import type { ErrorRequestHandler } from "express"; import express, { raw } from "express"; import { create as handlebarsCreate } from "express-handlebars"; -// eslint-disable-next-line import/order -import { initSentry } from "./sentry"; - const app = express(); -initSentry(app); - import http from "node:http"; import path from "node:path"; import { promisify } from "node:util"; -import { getAwsRegion } from "@local/hash-backend-utils/aws-config"; import { createGraphClient } from "@local/hash-backend-utils/create-graph-client"; import { OpenSearch } from "@local/hash-backend-utils/search/opensearch"; import { GracefulShutdown } from "@local/hash-backend-utils/shutdown"; @@ -41,59 +36,62 @@ import { StatsD } from "hot-shots"; import httpTerminator from "http-terminator"; import { customAlphabet } from "nanoid"; -import { gptGetUserWebs } from "./ai/gpt/gpt-get-user-webs"; -import { gptQueryEntities } from "./ai/gpt/gpt-query-entities"; -import { gptQueryTypes } from "./ai/gpt/gpt-query-types"; -import { upsertGptOauthClient } from "./ai/gpt/upsert-gpt-oauth-client"; -import { openInferEntitiesWebSocket } from "./ai/infer-entities-websocket"; +import { gptGetUserWebs } from "./ai/gpt/gpt-get-user-webs.js"; +import { gptQueryEntities } from "./ai/gpt/gpt-query-entities.js"; +import { gptQueryTypes } from "./ai/gpt/gpt-query-types.js"; +import { upsertGptOauthClient } from "./ai/gpt/upsert-gpt-oauth-client.js"; +import { openInferEntitiesWebSocket } from "./ai/infer-entities-websocket.js"; import { addKratosAfterRegistrationHandler, createAuthMiddleware, -} from "./auth/create-auth-handlers"; -import { getActorIdFromRequest } from "./auth/get-actor-id"; +} from "./auth/create-auth-handlers.js"; +import { getActorIdFromRequest } from "./auth/get-actor-id.js"; import { oauthConsentRequestHandler, oauthConsentSubmissionHandler, -} from "./auth/oauth-consent-handlers"; -import { hydraPublicUrl } from "./auth/ory-hydra"; -import { kratosPublicUrl } from "./auth/ory-kratos"; -import { setupBlockProtocolExternalServiceMethodProxy } from "./block-protocol-external-service-method-proxy"; -import { RedisCache } from "./cache"; -import type { EmailTransporter } from "./email/transporters"; +} from "./auth/oauth-consent-handlers.js"; +import { hydraPublicUrl } from "./auth/ory-hydra.js"; +import { kratosPublicUrl } from "./auth/ory-kratos.js"; +import { setupBlockProtocolExternalServiceMethodProxy } from "./block-protocol-external-service-method-proxy.js"; +import { RedisCache } from "./cache/index.js"; +import type { EmailTransporter } from "./email/transporters/index.js"; import { AwsSesEmailTransporter, DummyEmailTransporter, -} from "./email/transporters"; -import { ensureSystemGraphIsInitialized } from "./graph/ensure-system-graph-is-initialized"; -import { ensureHashSystemAccountExists } from "./graph/system-account"; -import { createApolloServer } from "./graphql/create-apollo-server"; -import { registerOpenTelemetryTracing } from "./graphql/opentelemetry"; -import { enabledIntegrations } from "./integrations/enabled-integrations"; -import { checkGoogleAccessToken } from "./integrations/google/check-access-token"; -import { getGoogleAccessToken } from "./integrations/google/get-access-token"; -import { googleOAuthCallback } from "./integrations/google/oauth-callback"; -import { oAuthLinear, oAuthLinearCallback } from "./integrations/linear/oauth"; -import { linearWebhook } from "./integrations/linear/webhook"; -import { createIntegrationSyncBackWatcher } from "./integrations/sync-back-watcher"; +} from "./email/transporters/index.js"; +import { ensureSystemGraphIsInitialized } from "./graph/ensure-system-graph-is-initialized.js"; +import { ensureHashSystemAccountExists } from "./graph/system-account.js"; +import { createApolloServer } from "./graphql/create-apollo-server.js"; +import { registerOpenTelemetryTracing } from "./graphql/opentelemetry.js"; +import { enabledIntegrations } from "./integrations/enabled-integrations.js"; +import { checkGoogleAccessToken } from "./integrations/google/check-access-token.js"; +import { getGoogleAccessToken } from "./integrations/google/get-access-token.js"; +import { googleOAuthCallback } from "./integrations/google/oauth-callback.js"; +import { + oAuthLinear, + oAuthLinearCallback, +} from "./integrations/linear/oauth.js"; +import { linearWebhook } from "./integrations/linear/webhook.js"; +import { createIntegrationSyncBackWatcher } from "./integrations/sync-back-watcher.js"; import { CORS_CONFIG, getEnvStorageType, LOCAL_FILE_UPLOAD_PATH, -} from "./lib/config"; +} from "./lib/config.js"; import { isDevEnv, isProdEnv, isStatsDEnabled, isTestEnv, port, -} from "./lib/env-config"; -import { logger } from "./logger"; -import { seedOrgsAndUsers } from "./seed-data"; +} from "./lib/env-config.js"; +import { logger } from "./logger.js"; +import { seedOrgsAndUsers } from "./seed-data/index.js"; import { setupFileDownloadProxyHandler, setupStorageProviders, -} from "./storage"; -import { setupTelemetry } from "./telemetry/snowplow-setup"; +} from "./storage/index.js"; +import { setupTelemetry } from "./telemetry/snowplow-setup.js"; const shutdown = new GracefulShutdown(logger, "SIGINT", "SIGTERM"); @@ -134,6 +132,7 @@ const main = async () => { logger.info("Type System initialized"); registerOpenTelemetryTracing(process.env.HASH_OTLP_ENDPOINT ?? null); + Sentry.validateOpenTelemetrySetup(); if (process.env.HASH_TELEMETRY_ENABLED === "true") { logger.info("Starting [Snowplow] telemetry"); @@ -173,14 +172,6 @@ const main = async () => { logger.error(`Could not start StatsD client: ${err}`); } - // Configure Sentry error / trace handling - app.use( - Sentry.Handlers.requestHandler({ - ip: true, - }), - ); - app.use(Sentry.Handlers.tracingHandler()); - app.use(cors(CORS_CONFIG)); // Add logging of requests @@ -581,16 +572,14 @@ const main = async () => { * 1. Come AFTER all non-error controllers * 2. Come BEFORE all error controllers/middleware */ - app.use( - Sentry.Handlers.errorHandler({ - shouldHandleError(_error) { - /** - * Capture all errors for now – we can selectively filter out errors based on code if needed. - */ - return true; - }, - }), - ); + Sentry.setupExpressErrorHandler(app, { + shouldHandleError(_error) { + /** + * Capture all errors for now – we can selectively filter out errors based on code if needed. + */ + return true; + }, + }); // Fallback error handler for errors that haven't been caught and sent as a response already const errorHandler: ErrorRequestHandler = (err, _req, res, _next) => { diff --git a/apps/hash-api/src/integrations/google/check-access-token.ts b/apps/hash-api/src/integrations/google/check-access-token.ts index 12c72b3ff1f..dd5801045fa 100644 --- a/apps/hash-api/src/integrations/google/check-access-token.ts +++ b/apps/hash-api/src/integrations/google/check-access-token.ts @@ -4,7 +4,7 @@ import type { } from "@local/hash-isomorphic-utils/google-integration"; import type { RequestHandler } from "express"; -import { getGoogleAccessTokenForExpressRequest } from "./shared/get-or-check-access-token"; +import { getGoogleAccessTokenForExpressRequest } from "./shared/get-or-check-access-token.js"; /** * Check if a valid access token is present for the requested Google Account. diff --git a/apps/hash-api/src/integrations/google/get-access-token.ts b/apps/hash-api/src/integrations/google/get-access-token.ts index d4a91e38990..a0051984f3b 100644 --- a/apps/hash-api/src/integrations/google/get-access-token.ts +++ b/apps/hash-api/src/integrations/google/get-access-token.ts @@ -4,7 +4,7 @@ import type { } from "@local/hash-isomorphic-utils/google-integration"; import type { RequestHandler } from "express"; -import { getGoogleAccessTokenForExpressRequest } from "./shared/get-or-check-access-token"; +import { getGoogleAccessTokenForExpressRequest } from "./shared/get-or-check-access-token.js"; /** * Get an access token for use in the client where unavoidable, e.g. to use the Google File Picker. * Access tokens last for 1 hour. diff --git a/apps/hash-api/src/integrations/google/oauth-callback.ts b/apps/hash-api/src/integrations/google/oauth-callback.ts index 4bb6d6bdf6c..63a78f1d397 100644 --- a/apps/hash-api/src/integrations/google/oauth-callback.ts +++ b/apps/hash-api/src/integrations/google/oauth-callback.ts @@ -13,9 +13,9 @@ import type { Account as GoogleAccount } from "@local/hash-isomorphic-utils/syst import type { RequestHandler } from "express"; import { google } from "googleapis"; -import { createEntity } from "../../graph/knowledge/primitive/entity"; -import { createUserSecret } from "../../graph/knowledge/system-types/user-secret"; -import { enabledIntegrations } from "../enabled-integrations"; +import { createEntity } from "../../graph/knowledge/primitive/entity.js"; +import { createUserSecret } from "../../graph/knowledge/system-types/user-secret.js"; +import { enabledIntegrations } from "../enabled-integrations.js"; export const googleOAuthCallback: RequestHandler< Record, diff --git a/apps/hash-api/src/integrations/google/shared/get-or-check-access-token.ts b/apps/hash-api/src/integrations/google/shared/get-or-check-access-token.ts index cf7d70045a9..27ac5c12b6d 100644 --- a/apps/hash-api/src/integrations/google/shared/get-or-check-access-token.ts +++ b/apps/hash-api/src/integrations/google/shared/get-or-check-access-token.ts @@ -5,7 +5,7 @@ import { } from "@local/hash-backend-utils/google"; import type { Request, Response } from "express"; -import { enabledIntegrations } from "../../enabled-integrations"; +import { enabledIntegrations } from "../../enabled-integrations.js"; /** * Shared function to retrieve a Google access token for an Express request, diff --git a/apps/hash-api/src/integrations/linear/oauth.ts b/apps/hash-api/src/integrations/linear/oauth.ts index 13d47fdfad9..3bd70da6de8 100644 --- a/apps/hash-api/src/integrations/linear/oauth.ts +++ b/apps/hash-api/src/integrations/linear/oauth.ts @@ -17,14 +17,14 @@ import type { LinearIntegrationPropertiesWithMetadata } from "@local/hash-isomor import { extractEntityUuidFromEntityId } from "@local/hash-subgraph"; import type { RequestHandler } from "express"; -import { createEntity } from "../../graph/knowledge/primitive/entity"; -import type { LinearIntegration } from "../../graph/knowledge/system-types/linear-integration-entity"; +import { createEntity } from "../../graph/knowledge/primitive/entity.js"; +import type { LinearIntegration } from "../../graph/knowledge/system-types/linear-integration-entity.js"; import { getLinearIntegrationByLinearOrgId, getLinearIntegrationFromEntity, -} from "../../graph/knowledge/system-types/linear-integration-entity"; -import { isUserMemberOfOrg } from "../../graph/knowledge/system-types/user"; -import { createUserSecret } from "../../graph/knowledge/system-types/user-secret"; +} from "../../graph/knowledge/system-types/linear-integration-entity.js"; +import { isUserMemberOfOrg } from "../../graph/knowledge/system-types/user.js"; +import { createUserSecret } from "../../graph/knowledge/system-types/user-secret.js"; const linearClientId = process.env.LINEAR_CLIENT_ID; const linearClientSecret = process.env.LINEAR_CLIENT_SECRET; diff --git a/apps/hash-api/src/integrations/linear/sync-back.ts b/apps/hash-api/src/integrations/linear/sync-back.ts index 251c9ce9dc5..c48b2f9f83d 100644 --- a/apps/hash-api/src/integrations/linear/sync-back.ts +++ b/apps/hash-api/src/integrations/linear/sync-back.ts @@ -16,10 +16,10 @@ import { extractOwnedByIdFromEntityId, } from "@local/hash-subgraph"; -import type { ImpureGraphContext } from "../../graph/context-types"; -import { getLatestEntityById } from "../../graph/knowledge/primitive/entity"; -import { getLinearSecretValueByHashWorkspaceId } from "../../graph/knowledge/system-types/linear-user-secret"; -import { systemAccountId } from "../../graph/system-account"; +import type { ImpureGraphContext } from "../../graph/context-types.js"; +import { getLatestEntityById } from "../../graph/knowledge/primitive/entity.js"; +import { getLinearSecretValueByHashWorkspaceId } from "../../graph/knowledge/system-types/linear-user-secret.js"; +import { systemAccountId } from "../../graph/system-account.js"; const supportedLinearEntityTypeIds = linearTypeMappings.map( ({ hashEntityTypeId }) => hashEntityTypeId as VersionedUrl, diff --git a/apps/hash-api/src/integrations/linear/webhook.ts b/apps/hash-api/src/integrations/linear/webhook.ts index b319a3276c3..6759e2e5c41 100644 --- a/apps/hash-api/src/integrations/linear/webhook.ts +++ b/apps/hash-api/src/integrations/linear/webhook.ts @@ -11,14 +11,14 @@ import { generateUuid } from "@local/hash-isomorphic-utils/generate-uuid"; import { extractEntityUuidFromEntityId } from "@local/hash-subgraph"; import type { RequestHandler } from "express"; -import type { ImpureGraphContext } from "../../graph/context-types"; +import type { ImpureGraphContext } from "../../graph/context-types.js"; import { getAllLinearIntegrationsWithLinearOrgId, getSyncedWorkspacesForLinearIntegration, -} from "../../graph/knowledge/system-types/linear-integration-entity"; -import { getLinearSecretValueByHashWorkspaceId } from "../../graph/knowledge/system-types/linear-user-secret"; -import { systemAccountId } from "../../graph/system-account"; -import { logger } from "../../logger"; +} from "../../graph/knowledge/system-types/linear-integration-entity.js"; +import { getLinearSecretValueByHashWorkspaceId } from "../../graph/knowledge/system-types/linear-user-secret.js"; +import { systemAccountId } from "../../graph/system-account.js"; +import { logger } from "../../logger.js"; type LinearWebhookPayload = { action: "create" | "update" | "delete"; diff --git a/apps/hash-api/src/integrations/sync-back-watcher.ts b/apps/hash-api/src/integrations/sync-back-watcher.ts index c7090356475..6e45ff4d04e 100644 --- a/apps/hash-api/src/integrations/sync-back-watcher.ts +++ b/apps/hash-api/src/integrations/sync-back-watcher.ts @@ -9,12 +9,12 @@ import type { Entity } from "@local/hash-graph-sdk/entity"; import { fullDecisionTimeAxis } from "@local/hash-isomorphic-utils/graph-queries"; import { mapGraphApiEntityToEntity } from "@local/hash-isomorphic-utils/subgraph-mapping"; -import { systemAccountId } from "../graph/system-account"; -import { logger } from "../logger"; +import { systemAccountId } from "../graph/system-account.js"; +import { logger } from "../logger.js"; import { processEntityChange as processLinearEntityChange, supportedLinearTypeIds, -} from "./linear/sync-back"; +} from "./linear/sync-back.js"; const sendEntityToRelevantProcessor = ( entity: Entity, diff --git a/apps/hash-api/src/logger.ts b/apps/hash-api/src/logger.ts index 77f8e164c3d..866db2856a9 100644 --- a/apps/hash-api/src/logger.ts +++ b/apps/hash-api/src/logger.ts @@ -1,7 +1,7 @@ import { Logger } from "@local/hash-backend-utils/logger"; import { apiOrigin } from "@local/hash-isomorphic-utils/environment"; -import { isDevEnv, isTestEnv } from "./lib/env-config"; +import { isDevEnv, isTestEnv } from "./lib/env-config.js"; export const logger = new Logger({ environment: isDevEnv ? "development" : isTestEnv ? "test" : "production", diff --git a/apps/hash-api/src/mailchimp.ts b/apps/hash-api/src/mailchimp.ts index e0af99ac21e..b73c76e0398 100644 --- a/apps/hash-api/src/mailchimp.ts +++ b/apps/hash-api/src/mailchimp.ts @@ -1,7 +1,7 @@ import mailchimp from "@mailchimp/mailchimp_marketing"; import md5 from "md5"; -import { logger } from "./logger"; +import { logger } from "./logger.js"; mailchimp.setConfig({ apiKey: process.env.MAILCHIMP_API_KEY, diff --git a/apps/hash-api/src/seed-data/index.ts b/apps/hash-api/src/seed-data/index.ts index 4ffe44839a1..915ea7328ca 100644 --- a/apps/hash-api/src/seed-data/index.ts +++ b/apps/hash-api/src/seed-data/index.ts @@ -2,17 +2,17 @@ import type { VersionedUrl } from "@blockprotocol/type-system"; import type { Logger } from "@local/hash-backend-utils/logger"; import type { OwnedById } from "@local/hash-graph-types/web"; -import type { ImpureGraphContext } from "../graph/context-types"; -import type { Org } from "../graph/knowledge/system-types/org"; +import type { ImpureGraphContext } from "../graph/context-types.js"; +import type { Org } from "../graph/knowledge/system-types/org.js"; import { createOrg, getOrgByShortname, -} from "../graph/knowledge/system-types/org"; -import type { User } from "../graph/knowledge/system-types/user"; -import { joinOrg } from "../graph/knowledge/system-types/user"; -import type { PageDefinition } from "./seed-pages"; -import { seedPages } from "./seed-pages"; -import { ensureUsersAreSeeded } from "./seed-users"; +} from "../graph/knowledge/system-types/org.js"; +import type { User } from "../graph/knowledge/system-types/user.js"; +import { joinOrg } from "../graph/knowledge/system-types/user.js"; +import type { PageDefinition } from "./seed-pages.js"; +import { seedPages } from "./seed-pages.js"; +import { ensureUsersAreSeeded } from "./seed-users.js"; export const CACHED_DATA_TYPE_SCHEMAS: Record = { "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1": diff --git a/apps/hash-api/src/seed-data/seed-flow-test-types.ts b/apps/hash-api/src/seed-data/seed-flow-test-types.ts index 46e7b9d6adf..25a6b2927d7 100644 --- a/apps/hash-api/src/seed-data/seed-flow-test-types.ts +++ b/apps/hash-api/src/seed-data/seed-flow-test-types.ts @@ -22,29 +22,29 @@ import type { EntityTypeRelationAndSubject } from "@local/hash-subgraph"; import { linkEntityTypeUrl } from "@local/hash-subgraph"; import { versionedUrlFromComponents } from "@local/hash-subgraph/type-system-patch"; -import type { ImpureGraphFunction } from "../graph/context-types"; +import type { ImpureGraphFunction } from "../graph/context-types.js"; import type { EntityTypeDefinition, PropertyTypeDefinition, -} from "../graph/ensure-system-graph-is-initialized/migrate-ontology-types/util"; +} from "../graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.js"; import { generateSystemEntityTypeSchema, generateSystemPropertyTypeSchema, generateSystemTypeBaseUrl, -} from "../graph/ensure-system-graph-is-initialized/migrate-ontology-types/util"; +} from "../graph/ensure-system-graph-is-initialized/migrate-ontology-types/util.js"; import { createOrg, getOrgByShortname, -} from "../graph/knowledge/system-types/org"; +} from "../graph/knowledge/system-types/org.js"; import { createEntityType, getEntityTypeById, -} from "../graph/ontology/primitive/entity-type"; +} from "../graph/ontology/primitive/entity-type.js"; import { createPropertyType, getPropertyTypeById, -} from "../graph/ontology/primitive/property-type"; -import { logger } from "../logger"; +} from "../graph/ontology/primitive/property-type.js"; +import { logger } from "../logger.js"; const provenance: EnforcedEntityEditionProvenance = { actorType: "machine", diff --git a/apps/hash-api/src/seed-data/seed-pages.ts b/apps/hash-api/src/seed-data/seed-pages.ts index e5b1b1a13e0..ab566dd5d5a 100644 --- a/apps/hash-api/src/seed-data/seed-pages.ts +++ b/apps/hash-api/src/seed-data/seed-pages.ts @@ -2,12 +2,12 @@ import type { Logger } from "@local/hash-backend-utils/logger"; import type { AuthenticationContext } from "@local/hash-graph-sdk/authentication-context"; import type { OwnedById } from "@local/hash-graph-types/web"; -import type { ImpureGraphContext } from "../graph/context-types"; -import type { Page } from "../graph/knowledge/system-types/page"; +import type { ImpureGraphContext } from "../graph/context-types.js"; +import type { Page } from "../graph/knowledge/system-types/page.js"; import { createPage, setPageParentPage, -} from "../graph/knowledge/system-types/page"; +} from "../graph/knowledge/system-types/page.js"; export type PageDefinition = { title: string; diff --git a/apps/hash-api/src/seed-data/seed-users.ts b/apps/hash-api/src/seed-data/seed-users.ts index 2bd8b0b4227..63f1220c669 100644 --- a/apps/hash-api/src/seed-data/seed-users.ts +++ b/apps/hash-api/src/seed-data/seed-users.ts @@ -3,12 +3,12 @@ import type { FeatureFlag } from "@local/hash-isomorphic-utils/feature-flags"; import { featureFlags } from "@local/hash-isomorphic-utils/feature-flags"; import type { AxiosError } from "axios"; -import { createKratosIdentity } from "../auth/ory-kratos"; -import type { ImpureGraphContext } from "../graph/context-types"; -import type { User } from "../graph/knowledge/system-types/user"; -import { createUser } from "../graph/knowledge/system-types/user"; -import { systemAccountId } from "../graph/system-account"; -import { isDevEnv, isTestEnv } from "../lib/env-config"; +import { createKratosIdentity } from "../auth/ory-kratos.js"; +import type { ImpureGraphContext } from "../graph/context-types.js"; +import type { User } from "../graph/knowledge/system-types/user.js"; +import { createUser } from "../graph/knowledge/system-types/user.js"; +import { systemAccountId } from "../graph/system-account.js"; +import { isDevEnv, isTestEnv } from "../lib/env-config.js"; type SeededUser = { email: string; diff --git a/apps/hash-api/src/sentry.ts b/apps/hash-api/src/sentry.ts index 69d6cce608c..3593eb945ea 100644 --- a/apps/hash-api/src/sentry.ts +++ b/apps/hash-api/src/sentry.ts @@ -1,32 +1,19 @@ import * as Sentry from "@sentry/node"; -import type { Router } from "express"; -import { isProdEnv } from "./lib/env-config"; +import { isProdEnv } from "./lib/env-config.js"; const sentryDsn = process.env.NODE_API_SENTRY_DSN; -export const initSentry = (app: Router) => { - // TODO: Sentry's integration does not work properly. There are several circumstances where spans are not created - // properly. This implies that the same TraceID is used for different transactions and spans. This is a problem - // because it means that the spans are not correctly linked to the transaction and the transaction is not - // correctly linked to the parent transaction. - // see https://linear.app/hash/issue/H-1916 - Sentry.init({ - dsn: sentryDsn, - enabled: !!sentryDsn, - environment: isProdEnv ? "production" : "development", - integrations: [ - // Listen to routes specified in `app` - new Sentry.Integrations.Express({ app }), - // Hooks into Node's internal http module - new Sentry.Integrations.Http({ tracing: true }), - // Create spans for resolvers - // TODO: Sentry's ApolloServer integration does not yet work when constructing the ApolloServer with a 'schema' - // property - // see https://github.com/getsentry/sentry-javascript/issues/8227 - // new Sentry.Integrations.Apollo({ useNestjs: true }), - ], +Sentry.init({ + dsn: sentryDsn, + enabled: !!sentryDsn, + environment: isProdEnv ? "production" : "development", + integrations: [ + // Listen to routes specified in `app` + Sentry.expressIntegration(), + Sentry.httpIntegration(), + Sentry.graphqlIntegration(), + ], - tracesSampleRate: 1.0, - }); -}; + tracesSampleRate: 1.0, +}); diff --git a/apps/hash-api/src/shared/user-has-access-to-hash.ts b/apps/hash-api/src/shared/user-has-access-to-hash.ts index 931f9c442e4..872816006d5 100644 --- a/apps/hash-api/src/shared/user-has-access-to-hash.ts +++ b/apps/hash-api/src/shared/user-has-access-to-hash.ts @@ -1,4 +1,4 @@ -import type { User } from "../graph/knowledge/system-types/user"; +import type { User } from "../graph/knowledge/system-types/user.js"; const userEmailAllowList = process.env.USER_EMAIL_ALLOW_LIST ? (JSON.parse(process.env.USER_EMAIL_ALLOW_LIST) as string[]) diff --git a/apps/hash-api/src/storage/index.ts b/apps/hash-api/src/storage/index.ts index ff8989a6984..04fde506032 100644 --- a/apps/hash-api/src/storage/index.ts +++ b/apps/hash-api/src/storage/index.ts @@ -23,13 +23,13 @@ import type { File as FileEntity } from "@local/hash-isomorphic-utils/system-typ import { isEntityId, splitEntityId } from "@local/hash-subgraph"; import type { Express } from "express"; -import { getActorIdFromRequest } from "../auth/get-actor-id"; -import type { CacheAdapter } from "../cache"; -import type { ImpureGraphContext } from "../graph/context-types"; -import { getEntities } from "../graph/knowledge/primitive/entity"; -import { LOCAL_FILE_UPLOAD_PATH } from "../lib/config"; -import { logger } from "../logger"; -import { LocalFileSystemStorageProvider } from "./local-file-storage"; +import { getActorIdFromRequest } from "../auth/get-actor-id.js"; +import type { CacheAdapter } from "../cache/index.js"; +import type { ImpureGraphContext } from "../graph/context-types.js"; +import { getEntities } from "../graph/knowledge/primitive/entity.js"; +import { LOCAL_FILE_UPLOAD_PATH } from "../lib/config.js"; +import { logger } from "../logger.js"; +import { LocalFileSystemStorageProvider } from "./local-file-storage.js"; // S3-like APIs have a upper bound. // 7 days. diff --git a/apps/hash-api/src/util.test.ts b/apps/hash-api/src/util.test.ts index 6d0a9039ba7..159f1b767af 100644 --- a/apps/hash-api/src/util.test.ts +++ b/apps/hash-api/src/util.test.ts @@ -5,7 +5,7 @@ import { linkedTreeFlatten, topologicalSort, treeFromParentReferences, -} from "./util"; +} from "./util.js"; describe("topological sort", () => { it("can do topological sort", () => { diff --git a/apps/hash-api/tsconfig.build.json b/apps/hash-api/tsconfig.build.json new file mode 100644 index 00000000000..67fc1dbc5f2 --- /dev/null +++ b/apps/hash-api/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "include": ["src"], + "compilerOptions": { + "outDir": "dist", + "sourceMap": true, + "inlineSources": true, + "paths": {} + } +} diff --git a/apps/hash-api/turbo.json b/apps/hash-api/turbo.json index 1fe7bac1dcb..e2cabb45827 100644 --- a/apps/hash-api/turbo.json +++ b/apps/hash-api/turbo.json @@ -5,6 +5,9 @@ // Outputs of GraphQL generation "outputs": ["./src/**/*.gen.*"], "dependsOn": ["^codegen"] + }, + "build": { + "outputs": ["dist"] } } } diff --git a/apps/hash-frontend/package.json b/apps/hash-frontend/package.json index 1696c339aff..90370d9c821 100644 --- a/apps/hash-frontend/package.json +++ b/apps/hash-frontend/package.json @@ -52,8 +52,8 @@ "@ory/client": "1.1.41", "@ory/integrations": "1.1.4", "@popperjs/core": "2.11.8", - "@sentry/nextjs": "7.118.0", - "@sentry/react": "7.118.0", + "@sentry/nextjs": "8.23.0", + "@sentry/react": "8.23.0", "@svgr/webpack": "8.1.0", "@tldraw/editor": "2.0.0-alpha.12", "@tldraw/primitives": "2.0.0-alpha.12", diff --git a/apps/hash-frontend/sentry.client.config.ts b/apps/hash-frontend/sentry.client.config.ts index 11644412e10..b10233376e9 100644 --- a/apps/hash-frontend/sentry.client.config.ts +++ b/apps/hash-frontend/sentry.client.config.ts @@ -14,7 +14,7 @@ Sentry.init({ dsn: SENTRY_DSN, enabled: !!SENTRY_DSN, environment: VERCEL_ENV || "development", - integrations: [new Sentry.Replay({ stickySession: true })], + integrations: [Sentry.replayIntegration({ stickySession: true })], release: buildStamp, replaysOnErrorSampleRate: 1, replaysSessionSampleRate: parseFloat( diff --git a/apps/hash-frontend/src/instrument.ts b/apps/hash-frontend/src/instrument.ts new file mode 100644 index 00000000000..dfb5b39d78f --- /dev/null +++ b/apps/hash-frontend/src/instrument.ts @@ -0,0 +1,7 @@ +import * as Sentry from "@sentry/nextjs"; + +Sentry.init({ + dsn: process.env.SENTRY_DSN, + enabled: !!process.env.SENTRY_DSN, + tracesSampleRate: 1.0, +}); diff --git a/apps/hash-frontend/src/pages/_app.page.tsx b/apps/hash-frontend/src/pages/_app.page.tsx index 7686fa7fb13..4a33b616e7e 100644 --- a/apps/hash-frontend/src/pages/_app.page.tsx +++ b/apps/hash-frontend/src/pages/_app.page.tsx @@ -1,3 +1,4 @@ +import "./instrument.ts"; /* eslint-disable import/first */ import "./_app.page/why-did-you-render"; @@ -18,7 +19,7 @@ import type { User } from "@local/hash-isomorphic-utils/system-types/user"; import type { EntityRootType, Subgraph } from "@local/hash-subgraph"; import { getRoots } from "@local/hash-subgraph/stdlib"; import { CssBaseline, GlobalStyles, ThemeProvider } from "@mui/material"; -import { configureScope, ErrorBoundary } from "@sentry/nextjs"; +import { ErrorBoundary, getCurrentScope } from "@sentry/nextjs"; import type { AppProps as NextAppProps } from "next/app"; import { useRouter } from "next/router"; import { SnackbarProvider } from "notistack"; diff --git a/apps/hash-frontend/src/pages/shared/sentry.ts b/apps/hash-frontend/src/pages/shared/sentry.ts index 00f826b289f..7a1023c0961 100644 --- a/apps/hash-frontend/src/pages/shared/sentry.ts +++ b/apps/hash-frontend/src/pages/shared/sentry.ts @@ -1,10 +1,11 @@ -import { configureScope, setUser } from "@sentry/nextjs"; +import { getCurrentScope, setUser } from "@sentry/nextjs"; import type { User } from "../../lib/user-and-org"; export const setSentryUser = (params: { authenticatedUser?: User }) => { const { authenticatedUser } = params; - configureScope((scope) => { + { + const scope = getCurrentScope(); const sentryUser = scope.getUser(); if (!authenticatedUser && sentryUser) { scope.setUser(null); @@ -20,5 +21,5 @@ export const setSentryUser = (params: { authenticatedUser?: User }) => { email: primaryEmail?.address, }); } - }); + } }; diff --git a/apps/hash-integration-worker/package.json b/apps/hash-integration-worker/package.json index 0726f59b204..c1fc16abe30 100644 --- a/apps/hash-integration-worker/package.json +++ b/apps/hash-integration-worker/package.json @@ -29,7 +29,7 @@ "@local/hash-graph-sdk": "0.0.0-private", "@local/hash-isomorphic-utils": "0.0.0-private", "@local/hash-subgraph": "0.0.0-private", - "@sentry/node": "7.118.0", + "@sentry/node": "8.23.0", "@temporalio/activity": "1.10.1", "@temporalio/worker": "1.10.1", "@temporalio/workflow": "1.10.1", diff --git a/apps/hash-integration-worker/src/instrument.ts b/apps/hash-integration-worker/src/instrument.ts new file mode 100644 index 00000000000..69b2674c75c --- /dev/null +++ b/apps/hash-integration-worker/src/instrument.ts @@ -0,0 +1,7 @@ +import * as Sentry from "@sentry/node"; + +Sentry.init({ + dsn: process.env.HASH_TEMPORAL_WORKER_INTEGRATION_SENTRY_DSN, + enabled: !!process.env.HASH_TEMPORAL_WORKER_INTEGRATION_SENTRY_DSN, + tracesSampleRate: 1.0, +}); diff --git a/apps/hash-integration-worker/src/main.ts b/apps/hash-integration-worker/src/main.ts index 519b7e1307e..6fb29381f0f 100644 --- a/apps/hash-integration-worker/src/main.ts +++ b/apps/hash-integration-worker/src/main.ts @@ -1,12 +1,4 @@ -/* eslint-disable import/first */ - -import * as Sentry from "@sentry/node"; - -Sentry.init({ - dsn: process.env.HASH_TEMPORAL_WORKER_INTEGRATION_SENTRY_DSN, - enabled: !!process.env.HASH_TEMPORAL_WORKER_INTEGRATION_SENTRY_DSN, - tracesSampleRate: 1.0, -}); +import "./instrument"; import * as http from "node:http"; import { createRequire } from "node:module"; diff --git a/apps/plugin-browser/package.json b/apps/plugin-browser/package.json index b255b2262f9..3d1d8a5527c 100755 --- a/apps/plugin-browser/package.json +++ b/apps/plugin-browser/package.json @@ -35,7 +35,7 @@ "@local/hash-isomorphic-utils": "0.0.0-private", "@local/hash-subgraph": "0.0.0-private", "@mui/material": "5.14.11", - "@sentry/browser": "7.118.0", + "@sentry/browser": "8.23.0", "bowser": "2.11.0", "date-fns": "2.28.0", "fractional-indexing": "2.1.0", diff --git a/apps/plugin-browser/src/pages/shared/sentry.ts b/apps/plugin-browser/src/pages/shared/sentry.ts index 99fc4936b7e..ffd37e095a3 100644 --- a/apps/plugin-browser/src/pages/shared/sentry.ts +++ b/apps/plugin-browser/src/pages/shared/sentry.ts @@ -13,7 +13,7 @@ export const initializeSentry = () => enabled: !!SENTRY_DSN, environment: ENVIRONMENT, integrations: [ - new Sentry.BrowserTracing({ + Sentry.browserTracingIntegration({ // Which URLs distributed tracing is enabled for tracePropagationTargets: ["localhost", /^https:\/\/(?:.*\.)?hash\.ai/], }), @@ -22,7 +22,8 @@ export const initializeSentry = () => }); export const setSentryUser = (user?: LocalStorage["user"] | null) => { - Sentry.configureScope((scope) => { + { + const scope = Sentry.getCurrentScope(); const sentryUser = scope.getUser(); if (!user && sentryUser) { scope.setUser(null); @@ -32,5 +33,5 @@ export const setSentryUser = (user?: LocalStorage["user"] | null) => { email: user.properties.email[0], }); } - }); + } }; diff --git a/libs/@blockprotocol/graph/src/types.ts b/libs/@blockprotocol/graph/src/types.ts index ff9a6b6ad2a..fb06aadc754 100644 --- a/libs/@blockprotocol/graph/src/types.ts +++ b/libs/@blockprotocol/graph/src/types.ts @@ -1,6 +1,24 @@ +import { validateBaseUrl } from "@blockprotocol/type-system"; + +import type { OntologyTypeRecordId } from "./types/ontology.js"; + export * from "./types/block-graph.js"; export * from "./types/entity.js"; export * from "./types/file.js"; export * from "./types/ontology.js"; export * from "./types/subgraph.js"; export * from "./types/temporal-versioning.js"; + +export const isOntologyTypeRecordId = ( + recordId: unknown, +): recordId is OntologyTypeRecordId => { + return ( + recordId != null && + typeof recordId === "object" && + "baseUrl" in recordId && + typeof recordId.baseUrl === "string" && + validateBaseUrl(recordId.baseUrl).type === "Ok" && + "version" in recordId && + typeof recordId.version === "number" + ); +}; diff --git a/libs/@blockprotocol/graph/src/types/ontology.ts b/libs/@blockprotocol/graph/src/types/ontology.ts index 482f70cb16b..a562fcc6f52 100644 --- a/libs/@blockprotocol/graph/src/types/ontology.ts +++ b/libs/@blockprotocol/graph/src/types/ontology.ts @@ -1,5 +1,4 @@ import type { BaseUrl } from "@blockprotocol/type-system/slim"; -import { validateBaseUrl } from "@blockprotocol/type-system/slim"; export * from "./ontology/data-type.js"; export * from "./ontology/entity-type.js"; @@ -17,21 +16,6 @@ export type OntologyTypeRecordId = { baseUrl: BaseUrl; version: number; }; - -export const isOntologyTypeRecordId = ( - recordId: unknown, -): recordId is OntologyTypeRecordId => { - return ( - recordId != null && - typeof recordId === "object" && - "baseUrl" in recordId && - typeof recordId.baseUrl === "string" && - validateBaseUrl(recordId.baseUrl).type === "Ok" && - "version" in recordId && - typeof recordId.version === "number" - ); -}; - /** * The second component of the [{@link BaseUrl}, RevisionId] tuple needed to identify a specific ontology type vertex * within a {@link Subgraph}. This should be the version number as a string. diff --git a/libs/@blockprotocol/graph/src/types/subgraph/edges/outward-edge.ts b/libs/@blockprotocol/graph/src/types/subgraph/edges/outward-edge.ts index ead704a0f90..f0dd66a41ee 100644 --- a/libs/@blockprotocol/graph/src/types/subgraph/edges/outward-edge.ts +++ b/libs/@blockprotocol/graph/src/types/subgraph/edges/outward-edge.ts @@ -1,6 +1,6 @@ +import { isOntologyTypeRecordId } from "../../../types.js"; import type { EntityId } from "../../entity.js"; import { isEntityRecordId } from "../../entity.js"; -import { isOntologyTypeRecordId } from "../../ontology.js"; import type { LimitedTemporalBound, TemporalBound, diff --git a/libs/@local/hash-backend-utils/package.json b/libs/@local/hash-backend-utils/package.json index a8141c7adc7..11834c2000a 100644 --- a/libs/@local/hash-backend-utils/package.json +++ b/libs/@local/hash-backend-utils/package.json @@ -37,7 +37,7 @@ "@local/internal-api-client": "0.0.0-private", "@local/status": "0.0.0-private", "@opensearch-project/opensearch": "2.1.0", - "@sentry/node": "7.118.0", + "@sentry/node": "8.23.0", "@temporalio/activity": "1.10.1", "@temporalio/client": "1.10.1", "@temporalio/proto": "1.10.1", diff --git a/libs/@local/hash-isomorphic-utils/package.json b/libs/@local/hash-isomorphic-utils/package.json index 3368dfd4071..f9dd3085a28 100644 --- a/libs/@local/hash-isomorphic-utils/package.json +++ b/libs/@local/hash-isomorphic-utils/package.json @@ -33,7 +33,7 @@ "@local/hash-graph-sdk": "0.0.0-private", "@local/hash-graph-types": "0.0.0-private", "@local/hash-subgraph": "0.0.0-private", - "@sentry/browser": "7.118.0", + "@sentry/browser": "8.23.0", "@sindresorhus/slugify": "1.1.2", "apollo-server-express": "3.9.0", "fractional-indexing": "2.1.0", diff --git a/yarn.lock b/yarn.lock index 39cf9e00ba0..c173c250800 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5269,7 +5269,7 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== @@ -6065,17 +6065,17 @@ dependencies: "@opentelemetry/api" "^1.0.0" -"@opentelemetry/api@1.9.0", "@opentelemetry/api@^1.0.0", "@opentelemetry/api@^1.4.1": +"@opentelemetry/api@1.9.0", "@opentelemetry/api@^1.0.0", "@opentelemetry/api@^1.4.1", "@opentelemetry/api@^1.8", "@opentelemetry/api@^1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== -"@opentelemetry/context-async-hooks@1.25.1", "@opentelemetry/context-async-hooks@^1.17.1": +"@opentelemetry/context-async-hooks@1.25.1", "@opentelemetry/context-async-hooks@^1.17.1", "@opentelemetry/context-async-hooks@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/context-async-hooks/-/context-async-hooks-1.25.1.tgz#810bff2fcab84ec51f4684aff2d21f6c057d9e73" integrity sha512-UW/ge9zjvAEmRWVapOP0qyCvPulWU6cQxGxDbWEFfGOj1VBBZAuOqTo3X6yWmDTD3Xe15ysCZChHncr2xFMIfQ== -"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.8.0": +"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.1.0", "@opentelemetry/core@^1.25.1", "@opentelemetry/core@^1.8.0": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.1.tgz#ff667d939d128adfc7c793edae2f6bca177f829d" integrity sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ== @@ -6163,6 +6163,16 @@ "@opentelemetry/sdk-trace-base" "1.25.1" "@opentelemetry/semantic-conventions" "1.25.1" +"@opentelemetry/instrumentation-connect@0.38.0": + version "0.38.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.38.0.tgz#1f4aa27894eac2538fb3c8fce7b1be92cae0217e" + integrity sha512-2/nRnx3pjYEmdPIaBwtgtSviTKHWnDZN3R+TkRUnhIVrvBKVcq+I5B2rtd6mr6Fe9cHlZ9Ojcuh7pkNh/xdWWg== + dependencies: + "@opentelemetry/core" "^1.8.0" + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.22.0" + "@types/connect" "3.4.36" + "@opentelemetry/instrumentation-express@0.41.1": version "0.41.1" resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-express/-/instrumentation-express-0.41.1.tgz#658561df6ffbae86f5ad33e8d7ef2abb7b4967fc" @@ -6172,6 +6182,15 @@ "@opentelemetry/instrumentation" "^0.52.0" "@opentelemetry/semantic-conventions" "^1.22.0" +"@opentelemetry/instrumentation-fastify@0.38.0": + version "0.38.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-fastify/-/instrumentation-fastify-0.38.0.tgz#0cb02ee1156197075e8a90e4fd18a6b6c94221ba" + integrity sha512-HBVLpTSYpkQZ87/Df3N0gAw7VzYZV3n28THIBrJWfuqw3Or7UqdhnjeuMIPQ04BKk3aZc0cWn2naSQObbh5vXw== + dependencies: + "@opentelemetry/core" "^1.8.0" + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.22.0" + "@opentelemetry/instrumentation-graphql@0.42.0": version "0.42.0" resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.42.0.tgz#588a18c39e3b3f655bc09243566172ab0b638d35" @@ -6179,6 +6198,15 @@ dependencies: "@opentelemetry/instrumentation" "^0.52.0" +"@opentelemetry/instrumentation-hapi@0.40.0": + version "0.40.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.40.0.tgz#ae11190f0f57cdb4dc8d792cb8bca61e5343684c" + integrity sha512-8U/w7Ifumtd2bSN1OLaSwAAFhb9FyqWUki3lMMB0ds+1+HdSxYBe9aspEJEgvxAqOkrQnVniAPTEGf1pGM7SOw== + dependencies: + "@opentelemetry/core" "^1.8.0" + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.22.0" + "@opentelemetry/instrumentation-http@0.52.1": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-http/-/instrumentation-http-0.52.1.tgz#12061501601838d1c912f9c29bdd40a13a7e44cf" @@ -6189,7 +6217,89 @@ "@opentelemetry/semantic-conventions" "1.25.1" semver "^7.5.2" -"@opentelemetry/instrumentation@0.52.1", "@opentelemetry/instrumentation@^0.52.0": +"@opentelemetry/instrumentation-ioredis@0.42.0": + version "0.42.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.42.0.tgz#0f488ffc68af3caa474e2f67861759075170729c" + integrity sha512-P11H168EKvBB9TUSasNDOGJCSkpT44XgoM6d3gRIWAa9ghLpYhl0uRkS8//MqPzcJVHr3h3RmfXIpiYLjyIZTw== + dependencies: + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/redis-common" "^0.36.2" + "@opentelemetry/semantic-conventions" "^1.23.0" + +"@opentelemetry/instrumentation-koa@0.42.0": + version "0.42.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.42.0.tgz#1c180f3605448c2e57a4ba073b69ffba7b2970b3" + integrity sha512-H1BEmnMhho8o8HuNRq5zEI4+SIHDIglNB7BPKohZyWG4fWNuR7yM4GTlR01Syq21vODAS7z5omblScJD/eZdKw== + dependencies: + "@opentelemetry/core" "^1.8.0" + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.22.0" + +"@opentelemetry/instrumentation-mongodb@0.46.0": + version "0.46.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.46.0.tgz#e3720e8ca3ca9f228fbf02f0812f7518c030b05e" + integrity sha512-VF/MicZ5UOBiXrqBslzwxhN7TVqzu1/LN/QDpkskqM0Zm0aZ4CVRbUygL8d7lrjLn15x5kGIe8VsSphMfPJzlA== + dependencies: + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/sdk-metrics" "^1.9.1" + "@opentelemetry/semantic-conventions" "^1.22.0" + +"@opentelemetry/instrumentation-mongoose@0.40.0": + version "0.40.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.40.0.tgz#9c888312e524c381bfdf56a094c799150332dd51" + integrity sha512-niRi5ZUnkgzRhIGMOozTyoZIvJKNJyhijQI4nF4iFSb+FUx2v5fngfR+8XLmdQAO7xmsD8E5vEGdDVYVtKbZew== + dependencies: + "@opentelemetry/core" "^1.8.0" + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.22.0" + +"@opentelemetry/instrumentation-mysql2@0.40.0": + version "0.40.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.40.0.tgz#fa2992c36d54427dccea68e5c69fff01103dabe6" + integrity sha512-0xfS1xcqUmY7WE1uWjlmI67Xg3QsSUlNT+AcXHeA4BDUPwZtWqF4ezIwLgpVZfHOnkAEheqGfNSWd1PIu3Wnfg== + dependencies: + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.22.0" + "@opentelemetry/sql-common" "^0.40.1" + +"@opentelemetry/instrumentation-mysql@0.40.0": + version "0.40.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.40.0.tgz#bde5894c8eb447a4b8e940b030b2b73898da03fa" + integrity sha512-d7ja8yizsOCNMYIJt5PH/fKZXjb/mS48zLROO4BzZTtDfhNCl2UM/9VIomP2qkGIFVouSJrGr/T00EzY7bPtKA== + dependencies: + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.22.0" + "@types/mysql" "2.15.22" + +"@opentelemetry/instrumentation-nestjs-core@0.39.0": + version "0.39.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.39.0.tgz#733fef4306c796951d7ea1951b45f9df0aed234d" + integrity sha512-mewVhEXdikyvIZoMIUry8eb8l3HUjuQjSjVbmLVTt4NQi35tkpnHQrG9bTRBrl3403LoWZ2njMPJyg4l6HfKvA== + dependencies: + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.23.0" + +"@opentelemetry/instrumentation-pg@0.43.0": + version "0.43.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.43.0.tgz#3cd94ad5144e1fd326a921280fa8bb7b49005eb5" + integrity sha512-og23KLyoxdnAeFs1UWqzSonuCkePUzCX30keSYigIzJe/6WSYA8rnEI5lobcxPEzg+GcU06J7jzokuEHbjVJNw== + dependencies: + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/semantic-conventions" "^1.22.0" + "@opentelemetry/sql-common" "^0.40.1" + "@types/pg" "8.6.1" + "@types/pg-pool" "2.0.4" + +"@opentelemetry/instrumentation-redis-4@0.41.0": + version "0.41.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.41.0.tgz#6c1b1a37c18478887f346a3bc7ef309ee9f726c0" + integrity sha512-H7IfGTqW2reLXqput4yzAe8YpDC0fmVNal95GHMLOrS89W+qWUKIqxolSh63hJyfmwPSFwXASzj7wpSk8Az+Dg== + dependencies: + "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/redis-common" "^0.36.2" + "@opentelemetry/semantic-conventions" "^1.22.0" + +"@opentelemetry/instrumentation@0.52.1", "@opentelemetry/instrumentation@^0.49 || ^0.50 || ^0.51 || ^0.52.0", "@opentelemetry/instrumentation@^0.52.0", "@opentelemetry/instrumentation@^0.52.1": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.1.tgz#2e7e46a38bd7afbf03cf688c862b0b43418b7f48" integrity sha512-uXJbYU/5/MBHjMp1FqrILLRuiJCs3Ofk0MeRDk8g1S1gD47U8X3JnSwcMO1rtRo1x1a7zKaQHaoYu49p/4eSKw== @@ -6201,6 +6311,17 @@ semver "^7.5.2" shimmer "^1.2.1" +"@opentelemetry/instrumentation@^0.46.0": + version "0.46.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.46.0.tgz#a8a252306f82e2eace489312798592a14eb9830e" + integrity sha512-a9TijXZZbk0vI5TGLZl+0kxyFfrXHhX6Svtz7Pp2/VBlCSKrazuULEyoJQrOknJyFWNMEmbbJgOciHCCpQcisw== + dependencies: + "@types/shimmer" "^1.0.2" + import-in-the-middle "1.7.1" + require-in-the-middle "^7.1.1" + semver "^7.5.2" + shimmer "^1.2.1" + "@opentelemetry/otlp-exporter-base@0.52.1": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.52.1.tgz#657d9b27c55bd42ab6a8bb181006b57f9c84b91d" @@ -6246,7 +6367,12 @@ dependencies: "@opentelemetry/core" "1.25.1" -"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.15.2": +"@opentelemetry/redis-common@^0.36.2": + version "0.36.2" + resolved "https://registry.yarnpkg.com/@opentelemetry/redis-common/-/redis-common-0.36.2.tgz#906ac8e4d804d4109f3ebd5c224ac988276fdc47" + integrity sha512-faYX1N0gpLhej/6nyp6bgRjzAKXn5GOEMYY7YhciSfCoITAktLUtQ36d24QEWNA1/WA1y6qQunCe0OhHRkVl9g== + +"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.15.2", "@opentelemetry/resources@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.25.1.tgz#bb9a674af25a1a6c30840b755bc69da2796fefbb" integrity sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ== @@ -6263,7 +6389,7 @@ "@opentelemetry/core" "1.25.1" "@opentelemetry/resources" "1.25.1" -"@opentelemetry/sdk-metrics@1.25.1", "@opentelemetry/sdk-metrics@^1.15.2": +"@opentelemetry/sdk-metrics@1.25.1", "@opentelemetry/sdk-metrics@^1.15.2", "@opentelemetry/sdk-metrics@^1.9.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-metrics/-/sdk-metrics-1.25.1.tgz#50c985ec15557a9654334e7fa1018dc47a8a56b7" integrity sha512-9Mb7q5ioFL4E4dDrc4wC/A3NTHDat44v4I3p2pLPSxRvqUbDIQyMVr9uK+EU69+HWhlET1VaSrRzwdckWqY15Q== @@ -6291,7 +6417,7 @@ "@opentelemetry/sdk-trace-node" "1.25.1" "@opentelemetry/semantic-conventions" "1.25.1" -"@opentelemetry/sdk-trace-base@1.25.1", "@opentelemetry/sdk-trace-base@^1.15.2": +"@opentelemetry/sdk-trace-base@1.25.1", "@opentelemetry/sdk-trace-base@^1.15.2", "@opentelemetry/sdk-trace-base@^1.22", "@opentelemetry/sdk-trace-base@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz#cbc1e60af255655d2020aa14cde17b37bd13df37" integrity sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw== @@ -6312,11 +6438,18 @@ "@opentelemetry/sdk-trace-base" "1.25.1" semver "^7.5.2" -"@opentelemetry/semantic-conventions@1.25.1", "@opentelemetry/semantic-conventions@^1.15.2", "@opentelemetry/semantic-conventions@^1.22.0": +"@opentelemetry/semantic-conventions@1.25.1", "@opentelemetry/semantic-conventions@^1.15.2", "@opentelemetry/semantic-conventions@^1.17.0", "@opentelemetry/semantic-conventions@^1.22.0", "@opentelemetry/semantic-conventions@^1.23.0", "@opentelemetry/semantic-conventions@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz#0deecb386197c5e9c2c28f2f89f51fb8ae9f145e" integrity sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ== +"@opentelemetry/sql-common@^0.40.1": + version "0.40.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/sql-common/-/sql-common-0.40.1.tgz#93fbc48d8017449f5b3c3274f2268a08af2b83b6" + integrity sha512-nSDlnHSqzC3pXn/wZEZVLuAuJ1MYMXPBwtv2qAbCa3847SaHItdE7SzUq/Jtb0KZmh1zfAbNi3AAMjztTT4Ugg== + dependencies: + "@opentelemetry/core" "^1.1.0" + "@ory/client@1.1.41": version "1.1.41" resolved "https://registry.yarnpkg.com/@ory/client/-/client-1.1.41.tgz#504fd7b08c6f2bcf8351158fa8c5becff4827dae" @@ -6444,6 +6577,15 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== +"@prisma/instrumentation@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.17.0.tgz#f741ff517f54b1a896fb8605e0d702f29855c6cb" + integrity sha512-c1Sle4ji8aasMcYfBBHFM56We4ljfenVtRmS8aY06BllS7SoU6SmJBwG7vil+GHiR0Yrh+t9iBwt4AY0Jr4KNQ== + dependencies: + "@opentelemetry/api" "^1.8" + "@opentelemetry/instrumentation" "^0.49 || ^0.50 || ^0.51 || ^0.52.0" + "@opentelemetry/sdk-trace-base" "^1.22" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -7085,18 +7227,6 @@ resolved "https://registry.yarnpkg.com/@repeaterjs/repeater/-/repeater-3.0.4.tgz#a04d63f4d1bf5540a41b01a921c9a7fddc3bd1ca" integrity "sha1-oE1j9NG/VUCkGwGpIcmn/dw70co= sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==" -"@rollup/plugin-commonjs@24.0.0": - version "24.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-24.0.0.tgz#fb7cf4a6029f07ec42b25daa535c75b05a43f75c" - integrity sha512-0w0wyykzdyRRPHOb0cQt14mIBLujfAv6GgP6g8nvg/iBxEm112t3YPPq+Buqe2+imvElTka+bjNlJ/gB56TD8g== - dependencies: - "@rollup/pluginutils" "^5.0.1" - commondir "^1.0.1" - estree-walker "^2.0.2" - glob "^8.0.3" - is-reference "1.2.1" - magic-string "^0.27.0" - "@rollup/plugin-commonjs@26.0.1": version "26.0.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-26.0.1.tgz#16d4d6e54fa63021249a292b50f27c0b0f1a30d8" @@ -7251,52 +7381,80 @@ domhandler "^4.2.0" selderee "^0.6.0" -"@sentry-internal/feedback@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.118.0.tgz#5b4b13ba514452d07a22ec8c66c2e4bc2091d8e6" - integrity sha512-IYOGRcqIqKJJpMwBBv+0JTu0FPpXnakJYvOx/XEa/SNyF5+l7b9gGEjUVWh1ok50kTLW/XPnpnXNAGQcoKHg+w== - dependencies: - "@sentry/core" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" - -"@sentry-internal/replay-canvas@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.118.0.tgz#d9741962439a85525e660973042c801c569ea9e4" - integrity sha512-XxHlCClvrxmVKpiZetFYyiBaPQNiojoBGFFVgbbWBIAPc+fWeLJ2BMoQEBjn/0NA/8u8T6lErK5YQo/eIx9+XQ== - dependencies: - "@sentry/core" "7.118.0" - "@sentry/replay" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" - -"@sentry-internal/tracing@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.118.0.tgz#1a96ea745db818e20c2f8273d317f284a416a90a" - integrity sha512-dERAshKlQLrBscHSarhHyUeGsu652bDTUN1FK0m4e3X48M3I5/s+0N880Qjpe5MprNLcINlaIgdQ9jkisvxjfw== - dependencies: - "@sentry/core" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" +"@sentry-internal/browser-utils@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.23.0.tgz#a99f465a2d35d6a6f8b298adafcb4049c8af19f4" + integrity sha512-PQ0S7MRP8REo1iF+qZHNuLF+Qh7fuULA56tw0CRzTO1j7y87hQz9EJ8L0fBewuOitFQhSrZ7bfjJt9lIDTMfTQ== + dependencies: + "@sentry/core" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + +"@sentry-internal/feedback@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.23.0.tgz#4932ce3f86ec8040b78c00f1416247df4107eec0" + integrity sha512-xDwUohTOAW2Vwv9Vc6T2k8s8lvmQQck0YLmiafLbM2uqfyd2g3azRmWYQIsASSru2KdMYXgoLhZ/A0FGUlte9w== + dependencies: + "@sentry/core" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + +"@sentry-internal/replay-canvas@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.23.0.tgz#9e12b7949c305b1d1de2c494c5ff60f80a1518a5" + integrity sha512-Guqy+Ae0ZdNNBFnkHFT6bbyzUcW/8liTUZUQS3fdHkaav4qKIPAdMGob2e09GKczf5zSaaobiChsMpaXMLHlMA== + dependencies: + "@sentry-internal/replay" "8.23.0" + "@sentry/core" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + +"@sentry-internal/replay@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.23.0.tgz#91a4c33d1aaa168fc18c5aeacd5c0de57e028277" + integrity sha512-3HeLMgtJoQvX6FHw2kzo3vlLElMyNWLIaJl5BtUzVnQw1fEoV8R3Mwrn02nwW3IFIPUv0O+xn/Icx6InenfBqQ== + dependencies: + "@sentry-internal/browser-utils" "8.23.0" + "@sentry/core" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + +"@sentry/babel-plugin-component-annotate@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.20.1.tgz#204c63ed006a048f48f633876e1b8bacf87a9722" + integrity sha512-4mhEwYTK00bIb5Y9UWIELVUfru587Vaeg0DQGswv4aIRHIiMKLyNqCEejaaybQ/fNChIZOKmvyqXk430YVd7Qg== "@sentry/babel-plugin-component-annotate@2.21.1": version "2.21.1" resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.21.1.tgz#1fbf7ceca62fdc44957e37b60312808588c87350" integrity sha512-u1L8gZ4He0WdyiIsohYkA/YOY1b6Oa5yIMRtfZZ9U5TiWYLgOfMWyb88X0GotZeghSbgxrse/yI4WeHnhAUQDQ== -"@sentry/browser@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.118.0.tgz#2395b47d693f7e49057552997d5125fc1a3d3448" - integrity sha512-8onDOFV1VLEoBuqA5yaJeR3FF1JNuxr5C7p1oN3OwY724iTVqQnOLmZKZaSnHV3RkY67wKDGQkQIie14sc+42g== +"@sentry/browser@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.23.0.tgz#4c5af74583193cea6c6b8dff6c70203f660bc4df" + integrity sha512-KyoFp4et+y26wn99sXRp6+vme1Gha8DPQo2DbO64IR49tqkBXr8/D1QkpV3rqkPdttH7fefFNvaM4h3+9d6OtQ== dependencies: - "@sentry-internal/feedback" "7.118.0" - "@sentry-internal/replay-canvas" "7.118.0" - "@sentry-internal/tracing" "7.118.0" - "@sentry/core" "7.118.0" - "@sentry/integrations" "7.118.0" - "@sentry/replay" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" + "@sentry-internal/browser-utils" "8.23.0" + "@sentry-internal/feedback" "8.23.0" + "@sentry-internal/replay" "8.23.0" + "@sentry-internal/replay-canvas" "8.23.0" + "@sentry/core" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + +"@sentry/bundler-plugin-core@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.20.1.tgz#c9dd35e2177a4c22ecf675558eb84fbc2607e465" + integrity sha512-6ipbmGzHekxeRCbp7eoefr6bdd/lW4cNA9eNnrmd9+PicubweGaZZbH2NjhFHsaxzgOezwipDHjrTaap2kTHgw== + dependencies: + "@babel/core" "^7.18.5" + "@sentry/babel-plugin-component-annotate" "2.20.1" + "@sentry/cli" "^2.22.3" + dotenv "^16.3.1" + find-up "^5.0.0" + glob "^9.3.2" + magic-string "0.30.8" + unplugin "1.0.1" "@sentry/bundler-plugin-core@2.21.1": version "2.21.1" @@ -7366,117 +7524,120 @@ "@sentry/cli-win32-i686" "2.33.1" "@sentry/cli-win32-x64" "2.33.1" -"@sentry/cli@^1.77.1": - version "1.77.1" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.77.1.tgz#ebcf884712ef6c3c75443f491ec16f6a22148aec" - integrity sha512-OtJ7U9LeuPUAY/xow9wwcjM9w42IJIpDtClTKI/RliE685vd/OJUIpiAvebHNthDYpQynvwb/0iuF4fonh+CKw== - dependencies: - https-proxy-agent "^5.0.0" - mkdirp "^0.5.5" - node-fetch "^2.6.7" - progress "^2.0.3" - proxy-from-env "^1.1.0" - which "^2.0.2" - -"@sentry/core@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.118.0.tgz#1549b49621bc05a8df16c3546793a299b0638559" - integrity sha512-ol0xBdp3/K11IMAYSQE0FMxBOOH9hMsb/rjxXWe0hfM5c72CqYWL3ol7voPci0GELJ5CZG+9ImEU1V9r6gK64g== - dependencies: - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" - -"@sentry/integrations@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.118.0.tgz#f090db621979785c6dc44406da1f72653fa0617c" - integrity sha512-C2rR4NvIMjokF8jP5qzSf1o2zxDx7IeYnr8u15Kb2+HdZtX559owALR0hfgwnfeElqMhGlJBaKUWZ48lXJMzCQ== - dependencies: - "@sentry/core" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" - localforage "^1.8.1" - -"@sentry/nextjs@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.118.0.tgz#313f101d86d2792b0eb9261e4a3272c7545cb0f7" - integrity sha512-UFhg4QSZ6LqOKTU67kgjojy23ZqoIgB1fjwOS6S10d5LKdbz7POwrNwHqi+aB3YIqyrSvRtFCXA+8mmsE0QoqA== - dependencies: - "@rollup/plugin-commonjs" "24.0.0" - "@sentry/core" "7.118.0" - "@sentry/integrations" "7.118.0" - "@sentry/node" "7.118.0" - "@sentry/react" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" - "@sentry/vercel-edge" "7.118.0" - "@sentry/webpack-plugin" "1.21.0" +"@sentry/core@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.23.0.tgz#76a46f5295857eebd8ec7d9be9341df31e0b66e3" + integrity sha512-o0tHpxwi5WxjaQPtY+BPkG8FliM4QB91QKoi2QclWvR9t9jUgMWZ4ikziybNiKICZRXtN9B6wSBWlPVWfsiN6A== + dependencies: + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + +"@sentry/nextjs@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-8.23.0.tgz#bd58a4dc629fd14053d0e5de4af8ea7a1df8b923" + integrity sha512-4NFQ6elhD3T9s0EZiiOZiY+742jc0lQKneQq4D8OONc5f1uFtQJyPhQDZRkwiPBARZP+4npAQD7GFknUHVn+bQ== + dependencies: + "@opentelemetry/instrumentation-http" "0.52.1" + "@opentelemetry/semantic-conventions" "^1.25.1" + "@rollup/plugin-commonjs" "26.0.1" + "@sentry/core" "8.23.0" + "@sentry/node" "8.23.0" + "@sentry/opentelemetry" "8.23.0" + "@sentry/react" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + "@sentry/vercel-edge" "8.23.0" + "@sentry/webpack-plugin" "2.20.1" chalk "3.0.0" resolve "1.22.8" - rollup "2.78.0" + rollup "3.29.4" stacktrace-parser "^0.1.10" -"@sentry/node@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.118.0.tgz#c0b78cabc737eb8a638e82f338fc533455552117" - integrity sha512-79N63DvYKkNPqzmc0cjO+vMZ/nU7+CbE3K3COQNiV7gk58+666G9mRZQJuZVOVebatq5wM5UR0G4LPkwD+J84g== - dependencies: - "@sentry-internal/tracing" "7.118.0" - "@sentry/core" "7.118.0" - "@sentry/integrations" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" - -"@sentry/react@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.118.0.tgz#88ae04e1abec1fd9a242ad6d852a1fe5e6851ad4" - integrity sha512-oEYe5TGk8S7YzPsFqDf4xDHjfzs35/QFE+dou3S2d24OYpso8Tq4C5f1VzYmnOOyy85T7JNicYLSo0n0NSJvQg== - dependencies: - "@sentry/browser" "7.118.0" - "@sentry/core" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" +"@sentry/node@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-8.23.0.tgz#d3e62a19a755b3dc32bf02d5363b5fd3e703eeb5" + integrity sha512-Ys1A5XII74TWG07q/Y2K+fQoatX2sEiTPHLzLyKjsr1nOL6ANnyz+xnWAuYpF5RNa5R39vgJSwvJTR3S0+DnKw== + dependencies: + "@opentelemetry/api" "^1.9.0" + "@opentelemetry/context-async-hooks" "^1.25.1" + "@opentelemetry/core" "^1.25.1" + "@opentelemetry/instrumentation" "^0.52.1" + "@opentelemetry/instrumentation-connect" "0.38.0" + "@opentelemetry/instrumentation-express" "0.41.1" + "@opentelemetry/instrumentation-fastify" "0.38.0" + "@opentelemetry/instrumentation-graphql" "0.42.0" + "@opentelemetry/instrumentation-hapi" "0.40.0" + "@opentelemetry/instrumentation-http" "0.52.1" + "@opentelemetry/instrumentation-ioredis" "0.42.0" + "@opentelemetry/instrumentation-koa" "0.42.0" + "@opentelemetry/instrumentation-mongodb" "0.46.0" + "@opentelemetry/instrumentation-mongoose" "0.40.0" + "@opentelemetry/instrumentation-mysql" "0.40.0" + "@opentelemetry/instrumentation-mysql2" "0.40.0" + "@opentelemetry/instrumentation-nestjs-core" "0.39.0" + "@opentelemetry/instrumentation-pg" "0.43.0" + "@opentelemetry/instrumentation-redis-4" "0.41.0" + "@opentelemetry/resources" "^1.25.1" + "@opentelemetry/sdk-trace-base" "^1.25.1" + "@opentelemetry/semantic-conventions" "^1.25.1" + "@prisma/instrumentation" "5.17.0" + "@sentry/core" "8.23.0" + "@sentry/opentelemetry" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + import-in-the-middle "^1.11.0" + optionalDependencies: + opentelemetry-instrumentation-fetch-node "1.2.3" + +"@sentry/opentelemetry@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/opentelemetry/-/opentelemetry-8.23.0.tgz#75dd763ae70e749573f775efb1307f1cdce6190d" + integrity sha512-qBDCVHpFAhyV7iZDz4cLpx7U1SBb/MynCwEuLWfK4yojpIihPcxhbJENxjJvsoc/I9img4wx8nJ34G9xpBlOag== + dependencies: + "@sentry/core" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" + +"@sentry/react@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.23.0.tgz#f074d0fc2eb61ffcf3e011448978f311d090b305" + integrity sha512-Q+xuAySlQDvp0YWcxH4BtaDqA7On+ZvsZYcp0rFe1DE+e3/pyCqPae9dBCI+sQYPqnLgVoz05ANWorzSbpk08Q== + dependencies: + "@sentry/browser" "8.23.0" + "@sentry/core" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" hoist-non-react-statics "^3.3.2" -"@sentry/replay@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.118.0.tgz#ae55b7e14b85f22256dcc5a96bf3e63b252c1acf" - integrity sha512-boQfCL+1L/tSZ9Huwi00+VtU+Ih1Lcg8HtxBuAsBCJR9pQgUL5jp7ECYdTeeHyCh/RJO7JqV1CEoGTgohe10mA== - dependencies: - "@sentry-internal/tracing" "7.118.0" - "@sentry/core" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" - -"@sentry/types@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.118.0.tgz#ca3ab06912f60bc2a7ccf2d2e5ccf43985851aef" - integrity sha512-2drqrD2+6kgeg+W/ycmiti3G4lJrV3hGjY9PpJ3bJeXrh6T2+LxKPzlgSEnKFaeQWkXdZ4eaUbtTXVebMjb5JA== +"@sentry/types@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.23.0.tgz#02912ee3be3bc79a40d2d5313d035b524de27d7e" + integrity sha512-oJbZ04chsz3Gqro3GJuAAcEsJ7RVjk3k4TvAMxmhN5tQUqwvKFtvWjfskcF75ECzY+8Qge6PI7eXoibkhjx8sg== -"@sentry/utils@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.118.0.tgz#bfc60826fe3d5d2ae7338ec6ac1f06c20beb179e" - integrity sha512-43qItc/ydxZV1Zb3Kn2M54RwL9XXFa3IAYBO8S82Qvq5YUYmU2AmJ1jgg7DabXlVSWgMA1HntwqnOV3JLaEnTQ== +"@sentry/utils@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.23.0.tgz#532fb96a645345e2492eb1338b823b95f1078ac7" + integrity sha512-g+rkk+vFQnAz7xHGUTHXybA9qFdp1mtv3JGXtFKlLxPm8bKpzbBlJA3FiX4E7ai/Ksbv0N+K7c5fDth3LX3wAA== dependencies: - "@sentry/types" "7.118.0" + "@sentry/types" "8.23.0" -"@sentry/vercel-edge@7.118.0": - version "7.118.0" - resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-7.118.0.tgz#2b18b1cc13c7cc127dbf370edadfc5e92687ce9d" - integrity sha512-DclIpD0/Xi0kNeT97aFFtMLBzk3GFZXf9mpGgbx29Gt9Vt7Fyq8ZA9izALHYzXx056fqQaLtvOAkQxWsy9QuSA== +"@sentry/vercel-edge@8.23.0": + version "8.23.0" + resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-8.23.0.tgz#d13bd452b4fa1fae9a69a9ba268c2bc9288b92e1" + integrity sha512-9zcPh3XXTeJ6b88nxeOHndtlstmuyxryWgCEIxLtA+s9SK7osl9u9PYZS4owqjIQRjYf88ADP/RqjAwz3fiJSw== dependencies: - "@sentry-internal/tracing" "7.118.0" - "@sentry/core" "7.118.0" - "@sentry/integrations" "7.118.0" - "@sentry/types" "7.118.0" - "@sentry/utils" "7.118.0" + "@sentry/core" "8.23.0" + "@sentry/types" "8.23.0" + "@sentry/utils" "8.23.0" -"@sentry/webpack-plugin@1.21.0": - version "1.21.0" - resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.21.0.tgz#bbe7cb293751f80246a4a56f9a7dd6de00f14b58" - integrity sha512-x0PYIMWcsTauqxgl7vWUY6sANl+XGKtx7DCVnnY7aOIIlIna0jChTAPANTfA2QrK+VK+4I/4JxatCEZBnXh3Og== +"@sentry/webpack-plugin@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-2.20.1.tgz#285d325a0a1bd0a534126b97e0190da9486ff7f6" + integrity sha512-U6LzoE09Ndt0OCWROoRaZqqIHGxyMRdKpBhbqoBqyyfVwXN/zGW3I/cWZ1e8rreiKFj+2+c7+X0kOS+NGMTUrg== dependencies: - "@sentry/cli" "^1.77.1" - webpack-sources "^2.0.0 || ^3.0.0" + "@sentry/bundler-plugin-core" "2.20.1" + unplugin "1.0.1" + uuid "^9.0.0" "@sentry/webpack-plugin@2.21.1": version "2.21.1" @@ -10223,6 +10384,13 @@ dependencies: "@types/node" "*" +"@types/connect@3.4.36": + version "3.4.36" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.36.tgz#e511558c15a39cb29bd5357eebb57bd1459cd1ab" + integrity sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w== + dependencies: + "@types/node" "*" + "@types/cors@2.8.12": version "2.8.12" resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" @@ -10897,6 +11065,13 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity "sha1-MbfKZAcSij0rvCf+LSGzRTl/YZc= sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" +"@types/mysql@2.15.22": + version "2.15.22" + resolved "https://registry.yarnpkg.com/@types/mysql/-/mysql-2.15.22.tgz#8705edb9872bf4aa9dbc004cd494e00334e5cdb4" + integrity sha512-wK1pzsJVVAjYCSZWQoWHziQZbNggXFDUEIGf54g4ZM/ERuP86uGdWeKZWMYlqTPMZfHJJvLPyogXGvCOg87yLQ== + dependencies: + "@types/node" "*" + "@types/node-fetch@2.6.2": version "2.6.2" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" @@ -10988,6 +11163,31 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity "sha1-L4u0QUNNFjs1+4/9zNcTiSf/uMA= sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" +"@types/pg-pool@2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/pg-pool/-/pg-pool-2.0.4.tgz#b5c60f678094ff3acf3442628a7f708928fcf263" + integrity sha512-qZAvkv1K3QbmHHFYSNRYPkRjOWRLBYrL4B9c+wG0GSVGBw0NtJwPcgx/DSddeDJvRGMHCEQ4VMEVfuJ/0gZ3XQ== + dependencies: + "@types/pg" "*" + +"@types/pg@*": + version "8.11.6" + resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.11.6.tgz#a2d0fb0a14b53951a17df5197401569fb9c0c54b" + integrity sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ== + dependencies: + "@types/node" "*" + pg-protocol "*" + pg-types "^4.0.1" + +"@types/pg@8.6.1": + version "8.6.1" + resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.6.1.tgz#099450b8dc977e8197a44f5229cedef95c8747f9" + integrity sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w== + dependencies: + "@types/node" "*" + pg-protocol "*" + pg-types "^2.2.0" + "@types/pg@^8.11.5": version "8.11.5" resolved "https://registry.yarnpkg.com/@types/pg/-/pg-8.11.5.tgz#a1ffb4dc4a46a83bda096cb298051a5b171de167" @@ -19687,7 +19887,17 @@ import-from@4.0.0: resolved "https://registry.yarnpkg.com/import-from/-/import-from-4.0.0.tgz#2710b8d66817d232e16f4166e319248d3d5492e2" integrity "sha1-JxC41mgX0jLhb0Fm4xkkjT1UkuI= sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==" -import-in-the-middle@^1.8.1: +import-in-the-middle@1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.7.1.tgz#3e111ff79c639d0bde459bd7ba29dd9fdf357364" + integrity sha512-1LrZPDtW+atAxH42S6288qyDFNQ2YCty+2mxEPRtfazH6Z5QwkaBSTS2ods7hnVJioF6rkRfNoA6A/MstpFXLg== + dependencies: + acorn "^8.8.2" + acorn-import-assertions "^1.9.0" + cjs-module-lexer "^1.2.2" + module-details-from-path "^1.0.3" + +import-in-the-middle@^1.11.0, import-in-the-middle@^1.8.1: version "1.11.0" resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.11.0.tgz#a94c4925b8da18256cde3b3b7b38253e6ca5e708" integrity sha512-5DimNQGoe0pLUHbR9qK84iWaWjjbsxiqXnw6Qz64+azRgleqv9k2kTt5fw7QsOpmaGYtuxxursnPPsnTKEx10Q== @@ -21330,13 +21540,6 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lie@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" - integrity "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4= sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==" - dependencies: - immediate "~3.0.5" - lie@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" @@ -21508,13 +21711,6 @@ loader-utils@^2.0.0, loader-utils@^2.0.4: emojis-list "^3.0.0" json5 "^2.1.2" -localforage@^1.8.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" - integrity "sha1-XEZdxfYrKAfDqEwMahsbMhJ4HdQ= sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==" - dependencies: - lie "3.1.1" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -21954,13 +22150,6 @@ magic-string@0.30.8: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" -magic-string@^0.27.0: - version "0.27.0" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" - integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.4.13" - magic-string@^0.30.10, magic-string@^0.30.3: version "0.30.10" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e" @@ -23591,7 +23780,7 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@^0.5.1, mkdirp@^0.5.4, mkdirp@^0.5.5: +mkdirp@^0.5.1, mkdirp@^0.5.4: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -24687,6 +24876,14 @@ opener@^1.5.2: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity "sha1-XTfh81B3udysQwE3InGv3rKhNZg= sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==" +opentelemetry-instrumentation-fetch-node@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/opentelemetry-instrumentation-fetch-node/-/opentelemetry-instrumentation-fetch-node-1.2.3.tgz#beb24048bdccb1943ba2a5bbadca68020e448ea7" + integrity sha512-Qb11T7KvoCevMaSeuamcLsAD+pZnavkhDnlVL0kRozfhl42dKG5Q3anUklAFKJZjY3twLR+BnRa6DlwwkIE/+A== + dependencies: + "@opentelemetry/instrumentation" "^0.46.0" + "@opentelemetry/semantic-conventions" "^1.17.0" + opentracing@^0.14.4, opentracing@^0.14.5: version "0.14.7" resolved "https://registry.yarnpkg.com/opentracing/-/opentracing-0.14.7.tgz#25d472bd0296dc0b64d7b94cbc995219031428f5" @@ -25335,7 +25532,7 @@ pg-protocol@*, pg-protocol@^1.6.1: resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.6.1.tgz#21333e6d83b01faaebfe7a33a7ad6bfd9ed38cb3" integrity sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg== -pg-types@^2.1.0: +pg-types@^2.1.0, pg-types@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.2.0.tgz#2d0250d636454f7cfa3b6ae0382fdfa8063254a3" integrity "sha1-LQJQ1jZFT3z6O2rgOC/fqAYyVKM= sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==" @@ -27628,10 +27825,10 @@ robust-predicates@^3.0.0: resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.2.tgz#d5b28528c4824d20fc48df1928d41d9efa1ad771" integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== -rollup@2.78.0: - version "2.78.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.78.0.tgz#00995deae70c0f712ea79ad904d5f6b033209d9e" - integrity "sha1-AJld6ucMD3Eup5rZBNX2sDMgnZ4= sha512-4+YfbQC9QEVvKTanHhIAFVUFSRsezvQF8vFOJwtGfb9Bb+r014S+qryr9PSmw8x6sMnPkmFBGAvIFVQxvJxjtg==" +rollup@3.29.4: + version "3.29.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.4.tgz#4d70c0f9834146df8705bfb69a9a19c9e1109981" + integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== optionalDependencies: fsevents "~2.3.2" @@ -31530,7 +31727,7 @@ webpack-merge@^5.7.3: clone-deep "^4.0.1" wildcard "^2.0.0" -"webpack-sources@^2.0.0 || ^3.0.0", webpack-sources@^3.2.3: +webpack-sources@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity "sha1-LU2quEUf1LJAzCcFX/agwszqDN4= sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w=="