From b0fcc012c22ae142ddb1f60ba69d6a12d052f867 Mon Sep 17 00:00:00 2001 From: Jacob Paris Date: Wed, 22 May 2024 00:20:49 -0600 Subject: [PATCH] fix: secret store options was a circular import --- apps/webapp/app/env.server.ts | 2 +- apps/webapp/app/services/secrets/secretStore.server.ts | 4 +--- .../app/services/secrets/secretStoreOptionsSchema.server.ts | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 apps/webapp/app/services/secrets/secretStoreOptionsSchema.server.ts diff --git a/apps/webapp/app/env.server.ts b/apps/webapp/app/env.server.ts index 80dfa3ee15..71edf6a6cc 100644 --- a/apps/webapp/app/env.server.ts +++ b/apps/webapp/app/env.server.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { SecretStoreOptionsSchema } from "./services/secrets/secretStore.server"; +import { SecretStoreOptionsSchema } from "./services/secrets/secretStoreOptionsSchema.server"; import { isValidRegex } from "./utils/regex"; import { isValidDatabaseUrl } from "./utils/db"; diff --git a/apps/webapp/app/services/secrets/secretStore.server.ts b/apps/webapp/app/services/secrets/secretStore.server.ts index 43ebf32a72..855463fcd1 100644 --- a/apps/webapp/app/services/secrets/secretStore.server.ts +++ b/apps/webapp/app/services/secrets/secretStore.server.ts @@ -4,9 +4,7 @@ import { env } from "~/env.server"; import nodeCrypto from "node:crypto"; import { safeJsonParse } from "~/utils/json"; import { logger } from "../logger.server"; - -export const SecretStoreOptionsSchema = z.enum(["DATABASE", "AWS_PARAM_STORE"]); -export type SecretStoreOptions = z.infer; +import type { SecretStoreOptions } from "./secretStoreOptionsSchema.server"; type ProviderInitializationOptions = { DATABASE: { diff --git a/apps/webapp/app/services/secrets/secretStoreOptionsSchema.server.ts b/apps/webapp/app/services/secrets/secretStoreOptionsSchema.server.ts new file mode 100644 index 0000000000..7ffc22743d --- /dev/null +++ b/apps/webapp/app/services/secrets/secretStoreOptionsSchema.server.ts @@ -0,0 +1,4 @@ +import { z } from "zod"; + +export const SecretStoreOptionsSchema = z.enum(["DATABASE", "AWS_PARAM_STORE"]); +export type SecretStoreOptions = z.infer;