@effected/config-file 0.5.1 → 0.6.0

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.
Files changed (2) hide show
  1. package/index.d.ts +31 -31
  2. package/package.json +6 -6
package/index.d.ts CHANGED
@@ -17,7 +17,7 @@ declare const ConfigCodecError_base: Schema.Class<ConfigCodecError, Schema.Tagge
17
17
  *
18
18
  * @public
19
19
  */
20
- declare class ConfigCodecError extends ConfigCodecError_base {
20
+ export declare class ConfigCodecError extends ConfigCodecError_base {
21
21
  get message(): string;
22
22
  }
23
23
  /**
@@ -55,7 +55,7 @@ interface ConfigCodec<E = ConfigCodecError> {
55
55
  *
56
56
  * @public
57
57
  */
58
- declare const ConfigSourceRef: Schema.Struct<{
58
+ export declare const ConfigSourceRef: Schema.Struct<{
59
59
  /** The filesystem path the value was read from. */
60
60
  readonly path: Schema.String;
61
61
  /** The name of the resolver that found it. */
@@ -78,7 +78,7 @@ declare const ConfigSourceRef: Schema.Struct<{
78
78
  *
79
79
  * @public
80
80
  */
81
- declare const ConfigEventPayload: Schema.Union<readonly [Schema.TaggedStruct<"Discovered", {
81
+ export declare const ConfigEventPayload: Schema.Union<readonly [Schema.TaggedStruct<"Discovered", {
82
82
  readonly path: Schema.String;
83
83
  readonly resolver: Schema.String;
84
84
  }>, Schema.TaggedStruct<"NotFound", {}>, Schema.TaggedStruct<"Parsed", {
@@ -124,7 +124,7 @@ declare const ConfigEventPayload: Schema.Union<readonly [Schema.TaggedStruct<"Di
124
124
  *
125
125
  * @public
126
126
  */
127
- type ConfigEventPayload = typeof ConfigEventPayload.Type;
127
+ export type ConfigEventPayload = typeof ConfigEventPayload.Type;
128
128
  declare const ConfigEvent_base: Schema.Class<ConfigEvent, Schema.Struct<{
129
129
  /** When the event occurred. */
130
130
  readonly timestamp: Schema.DateTimeUtc;
@@ -175,7 +175,7 @@ declare const ConfigEvent_base: Schema.Class<ConfigEvent, Schema.Struct<{
175
175
  *
176
176
  * @public
177
177
  */
178
- declare class ConfigEvent extends ConfigEvent_base {}
178
+ export declare class ConfigEvent extends ConfigEvent_base {}
179
179
  /**
180
180
  * The service shape {@link ConfigEvents} provides.
181
181
  *
@@ -209,7 +209,7 @@ declare const ConfigEvents_base: Context.ServiceClass<ConfigEvents, "@effected/c
209
209
  *
210
210
  * @public
211
211
  */
212
- declare class ConfigEvents extends ConfigEvents_base {
212
+ export declare class ConfigEvents extends ConfigEvents_base {
213
213
  /**
214
214
  * An unbounded PubSub of config events.
215
215
  *
@@ -239,7 +239,7 @@ declare class ConfigEvents extends ConfigEvents_base {
239
239
  *
240
240
  * @public
241
241
  */
242
- interface ConfigResolver<R = never> {
242
+ export interface ConfigResolver<R = never> {
243
243
  readonly name: string;
244
244
  readonly resolve: Effect.Effect<Option.Option<string>, never, R>;
245
245
  }
@@ -248,7 +248,7 @@ interface ConfigResolver<R = never> {
248
248
  *
249
249
  * @public
250
250
  */
251
- declare class ConfigResolver {
251
+ export declare class ConfigResolver {
252
252
  private constructor();
253
253
  /** Resolves to `target` when it exists on disk, or `Option.none()` when it does not — no walking, no filename convention. */
254
254
  static readonly explicitPath: (target: string) => ConfigResolver<FileSystem.FileSystem | Path.Path>;
@@ -330,7 +330,7 @@ type NonEmptySources<A> = readonly [ConfigSource<A>, ...ConfigSource<A>[]];
330
330
  *
331
331
  * @public
332
332
  */
333
- interface MergeStrategy<A> {
333
+ export interface MergeStrategy<A> {
334
334
  readonly name: string;
335
335
  readonly resolve: (sources: NonEmptySources<A>) => Effect.Effect<A>;
336
336
  }
@@ -343,7 +343,7 @@ interface MergeStrategy<A> {
343
343
  *
344
344
  * @public
345
345
  */
346
- declare const MergeStrategy: {
346
+ export declare const MergeStrategy: {
347
347
  readonly firstMatch: <A>() => MergeStrategy<A>;
348
348
  readonly layeredMerge: <A>() => MergeStrategy<A>;
349
349
  };
@@ -363,7 +363,7 @@ declare const ConfigFileNotFoundError_base: Schema.Class<ConfigFileNotFoundError
363
363
  *
364
364
  * @public
365
365
  */
366
- declare class ConfigFileNotFoundError extends ConfigFileNotFoundError_base {
366
+ export declare class ConfigFileNotFoundError extends ConfigFileNotFoundError_base {
367
367
  get message(): string;
368
368
  }
369
369
  declare const ConfigFileReadError_base: Schema.Class<ConfigFileReadError, Schema.TaggedStruct<"ConfigFileReadError", {
@@ -381,7 +381,7 @@ declare const ConfigFileReadError_base: Schema.Class<ConfigFileReadError, Schema
381
381
  *
382
382
  * @public
383
383
  */
384
- declare class ConfigFileReadError extends ConfigFileReadError_base {
384
+ export declare class ConfigFileReadError extends ConfigFileReadError_base {
385
385
  get message(): string;
386
386
  }
387
387
  declare const ConfigFileWriteError_base: Schema.Class<ConfigFileWriteError, Schema.TaggedStruct<"ConfigFileWriteError", {
@@ -395,7 +395,7 @@ declare const ConfigFileWriteError_base: Schema.Class<ConfigFileWriteError, Sche
395
395
  *
396
396
  * @public
397
397
  */
398
- declare class ConfigFileWriteError extends ConfigFileWriteError_base {
398
+ export declare class ConfigFileWriteError extends ConfigFileWriteError_base {
399
399
  get message(): string;
400
400
  }
401
401
  declare const ConfigDefaultPathMissingError_base: Schema.Class<ConfigDefaultPathMissingError, Schema.TaggedStruct<"ConfigDefaultPathMissingError", {}>, import("effect/Cause").YieldableError>;
@@ -414,7 +414,7 @@ declare const ConfigDefaultPathMissingError_base: Schema.Class<ConfigDefaultPath
414
414
  *
415
415
  * @public
416
416
  */
417
- declare class ConfigDefaultPathMissingError extends ConfigDefaultPathMissingError_base {
417
+ export declare class ConfigDefaultPathMissingError extends ConfigDefaultPathMissingError_base {
418
418
  get message(): string;
419
419
  }
420
420
  declare const ConfigValidationError_base: Schema.Class<ConfigValidationError, Schema.TaggedStruct<"ConfigValidationError", {
@@ -436,7 +436,7 @@ declare const ConfigValidationError_base: Schema.Class<ConfigValidationError, Sc
436
436
  *
437
437
  * @public
438
438
  */
439
- declare class ConfigValidationError extends ConfigValidationError_base {
439
+ export declare class ConfigValidationError extends ConfigValidationError_base {
440
440
  get message(): string;
441
441
  }
442
442
  /**
@@ -680,7 +680,7 @@ interface ConfigReadOptions<A, I> {
680
680
  *
681
681
  * @public
682
682
  */
683
- declare class ConfigFile {
683
+ export declare class ConfigFile {
684
684
  private constructor();
685
685
  /**
686
686
  * Create a uniquely-keyed service class for one config schema.
@@ -792,7 +792,7 @@ declare const ConfigMigrationError_base: Schema.Class<ConfigMigrationError, Sche
792
792
  *
793
793
  * @public
794
794
  */
795
- declare class ConfigMigrationError extends ConfigMigrationError_base {
795
+ export declare class ConfigMigrationError extends ConfigMigrationError_base {
796
796
  get message(): string;
797
797
  }
798
798
  /**
@@ -814,12 +814,12 @@ interface ConfigFileMigration {
814
814
  readonly up: (raw: unknown) => Effect.Effect<unknown, unknown>;
815
815
  }
816
816
  /** How the version number is read from and written to the parsed config. @public */
817
- interface VersionAccess {
817
+ export interface VersionAccess {
818
818
  readonly get: (raw: unknown) => Effect.Effect<number, unknown>;
819
819
  readonly set: (raw: unknown, version: number) => Effect.Effect<unknown, unknown>;
820
820
  }
821
821
  /** Reads and writes a top-level `version` field. @public */
822
- declare const VersionAccess: {
822
+ export declare const VersionAccess: {
823
823
  readonly default: VersionAccess;
824
824
  };
825
825
  /** Options for {@link ConfigMigration.make}. @public */
@@ -829,7 +829,7 @@ interface ConfigMigrationOptions {
829
829
  readonly versionAccess?: VersionAccess;
830
830
  }
831
831
  /** Versioned migration support for config codecs. @public */
832
- declare class ConfigMigration {
832
+ export declare class ConfigMigration {
833
833
  private constructor();
834
834
  /**
835
835
  * Wrap a codec so that parsed content is brought up to the latest version.
@@ -894,7 +894,7 @@ declare class ConfigMigration {
894
894
  *
895
895
  * @public
896
896
  */
897
- declare const asConfigProvider: <A>(service: ConfigFileShape<A>) => Effect.Effect<ConfigProvider.ConfigProvider, ConfigLoadError>;
897
+ export declare const asConfigProvider: <A>(service: ConfigFileShape<A>) => Effect.Effect<ConfigProvider.ConfigProvider, ConfigLoadError>;
898
898
  /**
899
899
  * Options for {@link layerConfigProvider}.
900
900
  *
@@ -937,7 +937,7 @@ interface LayerConfigProviderOptions {
937
937
  *
938
938
  * @public
939
939
  */
940
- declare const layerConfigProvider: <Self, A>(tag: Context.Key<Self, ConfigFileShape<A>>, options?: LayerConfigProviderOptions) => Layer.Layer<never, ConfigLoadError, Self>;
940
+ export declare const layerConfigProvider: <Self, A>(tag: Context.Key<Self, ConfigFileShape<A>>, options?: LayerConfigProviderOptions) => Layer.Layer<never, ConfigLoadError, Self>;
941
941
  //#endregion
942
942
  //#region src/EncryptedCodec.d.ts
943
943
  declare const ConfigEncryptionError_base: Schema.Class<ConfigEncryptionError, Schema.TaggedStruct<"ConfigEncryptionError", {
@@ -958,7 +958,7 @@ declare const ConfigEncryptionError_base: Schema.Class<ConfigEncryptionError, Sc
958
958
  *
959
959
  * @public
960
960
  */
961
- declare class ConfigEncryptionError extends ConfigEncryptionError_base {
961
+ export declare class ConfigEncryptionError extends ConfigEncryptionError_base {
962
962
  get message(): string;
963
963
  }
964
964
  /**
@@ -971,7 +971,7 @@ declare class ConfigEncryptionError extends ConfigEncryptionError_base {
971
971
  *
972
972
  * @public
973
973
  */
974
- type EncryptedCodecKey = {
974
+ export type EncryptedCodecKey = {
975
975
  readonly _tag: "CryptoKey";
976
976
  readonly key: Effect.Effect<CryptoKey, ConfigEncryptionError>;
977
977
  } | {
@@ -984,7 +984,7 @@ type EncryptedCodecKey = {
984
984
  *
985
985
  * @public
986
986
  */
987
- declare const EncryptedCodecKey: {
987
+ export declare const EncryptedCodecKey: {
988
988
  /**
989
989
  * Use a pre-derived `CryptoKey` effect directly.
990
990
  *
@@ -1026,7 +1026,7 @@ declare const EncryptedCodecKey: {
1026
1026
  *
1027
1027
  * @public
1028
1028
  */
1029
- declare function EncryptedCodec<E>(inner: ConfigCodec<E>, keySource: EncryptedCodecKey): ConfigCodec<E | ConfigEncryptionError>;
1029
+ export declare function EncryptedCodec<E>(inner: ConfigCodec<E>, keySource: EncryptedCodecKey): ConfigCodec<E | ConfigEncryptionError>;
1030
1030
  //#endregion
1031
1031
  //#region src/JsonCodec.d.ts
1032
1032
  /**
@@ -1041,7 +1041,7 @@ declare function EncryptedCodec<E>(inner: ConfigCodec<E>, keySource: EncryptedCo
1041
1041
  *
1042
1042
  * @public
1043
1043
  */
1044
- declare const JsonCodec: ConfigCodec;
1044
+ export declare const JsonCodec: ConfigCodec;
1045
1045
  //#endregion
1046
1046
  //#region src/JsoncCodec.d.ts
1047
1047
  /**
@@ -1058,7 +1058,7 @@ declare const JsonCodec: ConfigCodec;
1058
1058
  *
1059
1059
  * @public
1060
1060
  */
1061
- declare const JsoncCodec: ConfigCodec;
1061
+ export declare const JsoncCodec: ConfigCodec;
1062
1062
  //#endregion
1063
1063
  //#region src/TomlCodec.d.ts
1064
1064
  /**
@@ -1079,7 +1079,7 @@ declare const JsoncCodec: ConfigCodec;
1079
1079
  *
1080
1080
  * @public
1081
1081
  */
1082
- declare const TomlCodec: ConfigCodec;
1082
+ export declare const TomlCodec: ConfigCodec;
1083
1083
  //#endregion
1084
1084
  //#region src/YamlCodec.d.ts
1085
1085
  /**
@@ -1095,7 +1095,7 @@ declare const TomlCodec: ConfigCodec;
1095
1095
  *
1096
1096
  * @public
1097
1097
  */
1098
- declare const YamlCodec: ConfigCodec;
1098
+ export declare const YamlCodec: ConfigCodec;
1099
1099
  //#endregion
1100
- export { type ConfigCodec, ConfigCodecError, ConfigDefaultPathMissingError, ConfigEncryptionError, ConfigEvent, ConfigEventPayload, ConfigEvents, type ConfigEventsShape, ConfigFile, type ConfigFileMigration, ConfigFileNotFoundError, type ConfigFileOptions, ConfigFileReadError, type ConfigFileShape, type ConfigFileTestOptions, ConfigFileWriteError, type ConfigLoadError, ConfigMigration, ConfigMigrationError, type ConfigMigrationOptions, type ConfigReadError, type ConfigReadOptions, ConfigResolver, type ConfigSaveError, type ConfigSource, ConfigSourceRef, type ConfigUpdateError, ConfigValidationError, type ConfigWriteError, EncryptedCodec, EncryptedCodecKey, JsonCodec, JsoncCodec, type LayerConfigProviderOptions, MergeStrategy, type NonEmptySources, TomlCodec, VersionAccess, YamlCodec, asConfigProvider, layerConfigProvider };
1100
+ export type { ConfigCodec, ConfigEventsShape, ConfigFileMigration, ConfigFileOptions, ConfigFileShape, ConfigFileTestOptions, ConfigLoadError, ConfigMigrationOptions, ConfigReadError, ConfigReadOptions, ConfigSaveError, ConfigSource, ConfigUpdateError, ConfigWriteError, LayerConfigProviderOptions, NonEmptySources };
1101
1101
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/config-file",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "private": false,
5
5
  "description": "Composable config file loading for Effect: JSON, JSONC, YAML and TOML codecs, resolution strategies, and merge behaviors.",
6
6
  "keywords": [
@@ -43,11 +43,11 @@
43
43
  "./package.json": "./package.json"
44
44
  },
45
45
  "peerDependencies": {
46
- "@effected/jsonc": "^0.7.0",
47
- "@effected/toml": "^0.5.0",
48
- "@effected/walker": "^0.5.0",
49
- "@effected/yaml": "^0.11.0",
50
- "effect": "4.0.0-rc.109"
46
+ "@effected/jsonc": "^0.9.0",
47
+ "@effected/toml": "^0.6.0",
48
+ "@effected/walker": "^0.6.0",
49
+ "@effected/yaml": "^0.13.0",
50
+ "effect": "4.0.0-rc.112"
51
51
  },
52
52
  "engines": {
53
53
  "node": ">=24.11.0"