@prisma/config 6.4.0-dev.43 → 6.4.0-dev.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,34 @@
1
1
  import type { DriverAdapter as QueryableDriverAdapter } from '@prisma/driver-adapter-utils';
2
- export type PrismaConfig<Env = any> = {
2
+ import { Schema } from 'effect';
3
+ import type { Either } from 'effect/Either';
4
+ import type { ParseError } from 'effect/ParseResult';
5
+ declare const createPrismaConfigSchema: <Env = any>() => Schema.Struct<{
3
6
  /**
4
- * Whether experimental features are enabled.
7
+ * Whether features with an unstable API are enabled.
5
8
  */
6
- experimental: true;
7
- /**
8
- * The path from where the config was loaded. `null` if no config file was found and only default config is applied.
9
- */
10
- loadedFromFile: string | null;
9
+ earlyAccess: Schema.Literal<[true]>;
11
10
  /**
12
11
  * The configuration for Prisma Studio.
13
12
  */
14
- studio?: {
13
+ studio: Schema.optional<Schema.Struct<{
15
14
  /**
16
- * Istantiates the Prisma driver adapter to use for Prisma Studio.
15
+ * Instantiates the Prisma driver adapter to use for Prisma Studio.
17
16
  */
18
- createAdapter: (env: Env) => Promise<QueryableDriverAdapter>;
19
- };
20
- };
17
+ createAdapter: Schema.SchemaClass<(env: Env) => Promise<QueryableDriverAdapter>, (env: Env) => Promise<QueryableDriverAdapter>, never>;
18
+ }>>;
19
+ /**
20
+ * The path from where the config was loaded.
21
+ * It's set to `null` if no config file was found and only default config is applied.
22
+ */
23
+ loadedFromFile: Schema.NullOr<typeof Schema.String>;
24
+ }>;
25
+ /**
26
+ * The configuration for the Prisma Development Kit.
27
+ */
28
+ export type PrismaConfig<Env = any> = ReturnType<typeof createPrismaConfigSchema<Env>>['Type'];
29
+ /**
30
+ * Parse a given input object to ensure it conforms to the `PrismaConfig` type schema.
31
+ * This function may fail, but it will never throw.
32
+ */
33
+ export declare function parsePrismaConfig<Env = any>(input: unknown): Either<PrismaConfig<Env>, ParseError>;
34
+ export {};