Skip to content

PlatformConfigProvider

6 exports Added in v1.0.0 Source

Constructors

fromDotEnv

Added in v1.0.0 Source

Create a dotenv ConfigProvider.

Signature

declare const fromDotEnv: (
  paths: string,
) => Effect.Effect<ConfigProvider.ConfigProvider, PlatformError, FileSystem.FileSystem>;

fromFileTree

Added in v1.0.0 Source

Signature

declare function fromFileTree(options?: {
  readonly rootDirectory?: string;
}): Effect<ConfigProvider, never, FileSystem | Path>;

Layers

layerDotEnv

Added in v1.0.0 Source

Add the dotenv ConfigProvider to the environment, replacing the current ConfigProvider.

Signature

declare const layerDotEnv: (
  path: string,
) => Layer.Layer<never, PlatformError, FileSystem.FileSystem>;

Add the dotenv ConfigProvider to the environment, as a fallback to the current ConfigProvider. If the file is not found, a debug log is produced and empty layer is returned.

Signature

declare const layerDotEnvAdd: (path: string) => Layer.Layer<never, never, FileSystem.FileSystem>;

Add the file tree ConfigProvider to the environment, replacing the current ConfigProvider.

Signature

declare function layerFileTree(options?: {
  readonly rootDirectory?: string;
}): Layer<never, never, FileSystem | Path>;

Add the file tree ConfigProvider to the environment, as a fallback to the current ConfigProvider.

Signature

declare function layerFileTreeAdd(options?: {
  readonly rootDirectory?: string;
}): Layer<never, never, FileSystem | Path>;