Skip to main content Link Search Menu Expand Document (external link)

PlatformConfigProvider overview

Added in v1.0.0


Table of contents


constructors

fromDotEnv

Create a dotenv ConfigProvider.

Signature

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

Added in v1.0.0

fromFileTree

Signature

export declare const fromFileTree: (options?: {
  readonly rootDirectory?: string
}) => Effect.Effect<ConfigProvider.ConfigProvider, never, Path.Path | FileSystem.FileSystem>

Added in v1.0.0

layers

layerDotEnv

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

Signature

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

Added in v1.0.0

layerDotEnvAdd

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

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

Added in v1.0.0

layerFileTree

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

Signature

export declare const layerFileTree: (options?: {
  readonly rootDirectory?: string
}) => Layer.Layer<never, never, Path.Path | FileSystem.FileSystem>

Added in v1.0.0

layerFileTreeAdd

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

Signature

export declare const layerFileTreeAdd: (options?: {
  readonly rootDirectory?: string
}) => Layer.Layer<never, never, Path.Path | FileSystem.FileSystem>

Added in v1.0.0