@effect/io
Advanced tools
Comparing version 0.30.0 to 0.31.0
@@ -152,3 +152,7 @@ /** | ||
*/ | ||
export declare const make: <Key, Environment, Error, Value>(capacity: number, timeToLive: Duration.Duration, lookup: Lookup<Key, Environment, Error, Value>) => Effect.Effect<Environment, never, Cache<Key, Error, Value>>; | ||
export declare const make: <Key, Environment, Error, Value>(options: { | ||
readonly capacity: number; | ||
readonly timeToLive: Duration.DurationInput; | ||
readonly lookup: Lookup<Key, Environment, Error, Value>; | ||
}) => Effect.Effect<Environment, never, Cache<Key, Error, Value>>; | ||
/** | ||
@@ -162,3 +166,7 @@ * Constructs a new cache with the specified capacity, time to live, and | ||
*/ | ||
export declare const makeWith: <Key, Environment, Error, Value>(capacity: number, lookup: Lookup<Key, Environment, Error, Value>, timeToLive: (exit: Exit.Exit<Error, Value>) => Duration.Duration) => Effect.Effect<Environment, never, Cache<Key, Error, Value>>; | ||
export declare const makeWith: <Key, Environment, Error, Value>(options: { | ||
readonly capacity: number; | ||
readonly lookup: Lookup<Key, Environment, Error, Value>; | ||
readonly timeToLive: (exit: Exit.Exit<Error, Value>) => Duration.DurationInput; | ||
}) => Effect.Effect<Environment, never, Cache<Key, Error, Value>>; | ||
/** | ||
@@ -182,3 +190,7 @@ * `CacheStats` represents a snapshot of statistics for the cache as of a | ||
*/ | ||
export declare const makeCacheStats: (hits: number, misses: number, size: number) => CacheStats; | ||
export declare const makeCacheStats: (options: { | ||
readonly hits: number; | ||
readonly misses: number; | ||
readonly size: number; | ||
}) => CacheStats; | ||
/** | ||
@@ -185,0 +197,0 @@ * Represents a snapshot of statistics for an entry in the cache. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.makeWith = exports.makeEntryStats = exports.makeCacheStats = exports.make = exports.CacheTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/cache")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/cache")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -25,3 +25,2 @@ /** | ||
import type * as Chunk from "@effect/data/Chunk"; | ||
import type { SourceLocation } from "@effect/data/Debug"; | ||
import type * as Either from "@effect/data/Either"; | ||
@@ -132,25 +131,4 @@ import type * as Equal from "@effect/data/Equal"; | ||
* @since 1.0.0 | ||
* @category models | ||
*/ | ||
export interface StackAnnotationConstructor { | ||
new (stack: Chunk.Chunk<SourceLocation>, seq: number): StackAnnotation; | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category models | ||
*/ | ||
export interface StackAnnotation { | ||
readonly [StackAnnotationTypeId]: StackAnnotationTypeId; | ||
readonly stack: Chunk.Chunk<SourceLocation>; | ||
readonly seq: number; | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category stack | ||
*/ | ||
export declare const StackAnnotation: StackAnnotationConstructor; | ||
/** | ||
* @since 1.0.0 | ||
* @category stack | ||
*/ | ||
export declare const globalErrorSeq: import("@effect/data/MutableRef").MutableRef<number>; | ||
@@ -670,4 +648,20 @@ /** | ||
export declare const match: { | ||
<Z, E>(emptyCase: Z, failCase: (error: E) => Z, dieCase: (defect: unknown) => Z, interruptCase: (fiberId: FiberId.FiberId) => Z, annotatedCase: (value: Z, annotation: unknown) => Z, sequentialCase: (left: Z, right: Z) => Z, parallelCase: (left: Z, right: Z) => Z): (self: Cause<E>) => Z; | ||
<Z, E>(self: Cause<E>, emptyCase: Z, failCase: (error: E) => Z, dieCase: (defect: unknown) => Z, interruptCase: (fiberId: FiberId.FiberId) => Z, annotatedCase: (value: Z, annotation: unknown) => Z, sequentialCase: (left: Z, right: Z) => Z, parallelCase: (left: Z, right: Z) => Z): Z; | ||
<Z, E>(options: { | ||
readonly onEmpty: Z; | ||
readonly onFail: (error: E) => Z; | ||
readonly onDie: (defect: unknown) => Z; | ||
readonly onInterrupt: (fiberId: FiberId.FiberId) => Z; | ||
readonly onAnnotated: (value: Z, annotation: unknown) => Z; | ||
readonly onSequential: (left: Z, right: Z) => Z; | ||
readonly onParallel: (left: Z, right: Z) => Z; | ||
}): (self: Cause<E>) => Z; | ||
<Z, E>(self: Cause<E>, options: { | ||
readonly onEmpty: Z; | ||
readonly onFail: (error: E) => Z; | ||
readonly onDie: (defect: unknown) => Z; | ||
readonly onInterrupt: (fiberId: FiberId.FiberId) => Z; | ||
readonly onAnnotated: (value: Z, annotation: unknown) => Z; | ||
readonly onSequential: (left: Z, right: Z) => Z; | ||
readonly onParallel: (left: Z, right: Z) => Z; | ||
}): Z; | ||
}; | ||
@@ -766,9 +760,2 @@ /** | ||
/** | ||
* Checks if an annotation is a StackAnnotation | ||
* | ||
* @since 1.0.0 | ||
* @category guards | ||
*/ | ||
export declare const isStackAnnotation: (u: unknown) => u is StackAnnotation; | ||
/** | ||
* Removes any annotation from the cause | ||
@@ -775,0 +762,0 @@ * |
22
Cause.js
@@ -6,5 +6,5 @@ "use strict"; | ||
}); | ||
exports.unannotate = exports.stripSomeDefects = exports.stripFailures = exports.squashWith = exports.squash = exports.size = exports.sequential = exports.reduceWithContext = exports.reduce = exports.pretty = exports.parallel = exports.match = exports.map = exports.linearize = exports.keepDefects = exports.isStackAnnotation = exports.isSequentialType = exports.isRuntimeException = exports.isParallelType = exports.isNoSuchElementException = exports.isInterruptedOnly = exports.isInterruptedException = exports.isInterrupted = exports.isInterruptType = exports.isIllegalArgumentException = exports.isFailure = exports.isFailType = exports.isEmptyType = exports.isEmpty = exports.isDieType = exports.isDie = exports.isCause = exports.isAnnotatedType = exports.interruptors = exports.interruptOption = exports.interrupt = exports.globalErrorSeq = exports.flipCauseOption = exports.flatten = exports.flatMap = exports.find = exports.filter = exports.failures = exports.failureOrCause = exports.failureOption = exports.fail = exports.empty = exports.dieOption = exports.die = exports.defects = exports.contains = exports.as = exports.annotated = exports.StackAnnotationTypeId = exports.StackAnnotation = exports.RuntimeExceptionTypeId = exports.RuntimeException = exports.NoSuchElementExceptionTypeId = exports.NoSuchElementException = exports.InvalidHubCapacityExceptionTypeId = exports.InterruptedExceptionTypeId = exports.InterruptedException = exports.IllegalArgumentExceptionTypeId = exports.IllegalArgumentException = exports.CauseTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/cause")); | ||
var _pretty = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/cause-pretty")); | ||
exports.unannotate = exports.stripSomeDefects = exports.stripFailures = exports.squashWith = exports.squash = exports.size = exports.sequential = exports.reduceWithContext = exports.reduce = exports.pretty = exports.parallel = exports.match = exports.map = exports.linearize = exports.keepDefects = exports.isSequentialType = exports.isRuntimeException = exports.isParallelType = exports.isNoSuchElementException = exports.isInterruptedOnly = exports.isInterruptedException = exports.isInterrupted = exports.isInterruptType = exports.isIllegalArgumentException = exports.isFailure = exports.isFailType = exports.isEmptyType = exports.isEmpty = exports.isDieType = exports.isDie = exports.isCause = exports.isAnnotatedType = exports.interruptors = exports.interruptOption = exports.interrupt = exports.globalErrorSeq = exports.flipCauseOption = exports.flatten = exports.flatMap = exports.find = exports.filter = exports.failures = exports.failureOrCause = exports.failureOption = exports.fail = exports.empty = exports.dieOption = exports.die = exports.defects = exports.contains = exports.as = exports.annotated = exports.StackAnnotationTypeId = exports.RuntimeExceptionTypeId = exports.RuntimeException = exports.NoSuchElementExceptionTypeId = exports.NoSuchElementException = exports.InvalidHubCapacityExceptionTypeId = exports.InterruptedExceptionTypeId = exports.InterruptedException = exports.IllegalArgumentExceptionTypeId = exports.IllegalArgumentException = exports.CauseTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/cause")); | ||
var _pretty = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/cause-pretty")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -58,8 +58,2 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
exports.StackAnnotationTypeId = StackAnnotationTypeId; | ||
const StackAnnotation = internal.StackAnnotation; | ||
/** | ||
* @since 1.0.0 | ||
* @category stack | ||
*/ | ||
exports.StackAnnotation = StackAnnotation; | ||
const globalErrorSeq = internal.globalErrorSeq; | ||
@@ -529,10 +523,2 @@ /** | ||
/** | ||
* Checks if an annotation is a StackAnnotation | ||
* | ||
* @since 1.0.0 | ||
* @category guards | ||
*/ | ||
exports.pretty = pretty; | ||
const isStackAnnotation = internal.isStackAnnotation; | ||
/** | ||
* Removes any annotation from the cause | ||
@@ -543,5 +529,5 @@ * | ||
*/ | ||
exports.isStackAnnotation = isStackAnnotation; | ||
exports.pretty = pretty; | ||
const unannotate = internal.unannotate; | ||
exports.unannotate = unannotate; | ||
//# sourceMappingURL=Cause.js.map |
@@ -33,3 +33,3 @@ /** | ||
*/ | ||
currentTimeMillis(): Effect.Effect<never, never, number>; | ||
readonly currentTimeMillis: Effect.Effect<never, never, number>; | ||
/** | ||
@@ -42,3 +42,3 @@ * Unsafely returns the current time in nanoseconds. | ||
*/ | ||
currentTimeNanos(): Effect.Effect<never, never, bigint>; | ||
readonly currentTimeNanos: Effect.Effect<never, never, bigint>; | ||
/** | ||
@@ -78,3 +78,3 @@ * Asynchronously sleeps for the specified duration. | ||
*/ | ||
export declare const sleep: (duration: Duration.Duration) => Effect.Effect<never, never, void>; | ||
export declare const sleep: (duration: Duration.DurationInput) => Effect.Effect<never, never, void>; | ||
/** | ||
@@ -84,3 +84,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const currentTimeMillis: (_: void) => Effect.Effect<never, never, number>; | ||
export declare const currentTimeMillis: Effect.Effect<never, never, number>; | ||
/** | ||
@@ -90,3 +90,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const currentTimeNanos: (_: void) => Effect.Effect<never, never, bigint>; | ||
export declare const currentTimeNanos: Effect.Effect<never, never, bigint>; | ||
/** | ||
@@ -93,0 +93,0 @@ * @since 1.0.0 |
@@ -7,4 +7,4 @@ "use strict"; | ||
exports.sleep = exports.make = exports.currentTimeNanos = exports.currentTimeMillis = exports.clockWith = exports.ClockTypeId = exports.Clock = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/clock")); | ||
var defaultServices = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/defaultServices")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/clock")); | ||
var defaultServices = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/defaultServices")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -11,0 +11,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -240,4 +240,10 @@ /** | ||
export declare const orElseIf: { | ||
<A2>(that: LazyArg<Config<A2>>, condition: Predicate<ConfigError.ConfigError>): <A>(self: Config<A>) => Config<A>; | ||
<A, A2>(self: Config<A>, that: LazyArg<Config<A2>>, condition: Predicate<ConfigError.ConfigError>): Config<A>; | ||
<A2>(options: { | ||
readonly if: Predicate<ConfigError.ConfigError>; | ||
readonly orElse: LazyArg<Config<A2>>; | ||
}): <A>(self: Config<A>) => Config<A>; | ||
<A, A2>(self: Config<A>, options: { | ||
readonly if: Predicate<ConfigError.ConfigError>; | ||
readonly orElse: LazyArg<Config<A2>>; | ||
}): Config<A>; | ||
}; | ||
@@ -341,6 +347,18 @@ /** | ||
export declare const validate: { | ||
<A, B extends A>(message: string, f: Refinement<A, B>): (self: Config<A>) => Config<B>; | ||
<A>(message: string, f: Predicate<A>): (self: Config<A>) => Config<A>; | ||
<A, B extends A>(self: Config<A>, message: string, f: Refinement<A, B>): Config<B>; | ||
<A>(self: Config<A>, message: string, f: Predicate<A>): Config<A>; | ||
<A, B extends A>(options: { | ||
readonly message: string; | ||
readonly validation: Refinement<A, B>; | ||
}): (self: Config<A>) => Config<B>; | ||
<A>(options: { | ||
readonly message: string; | ||
readonly validation: Predicate<A>; | ||
}): (self: Config<A>) => Config<A>; | ||
<A, B extends A>(self: Config<A>, options: { | ||
readonly message: string; | ||
readonly validation: Refinement<A, B>; | ||
}): Config<B>; | ||
<A>(self: Config<A>, options: { | ||
readonly message: string; | ||
readonly validation: Predicate<A>; | ||
}): Config<A>; | ||
}; | ||
@@ -347,0 +365,0 @@ /** |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.zipWith = exports.zip = exports.withDescription = exports.withDefault = exports.validate = exports.unwrap = exports.table = exports.sync = exports.suspend = exports.succeed = exports.string = exports.setOf = exports.secret = exports.repeat = exports.primitive = exports.orElseIf = exports.orElse = exports.optional = exports.nested = exports.mapOrFail = exports.mapAttempt = exports.map = exports.logLevel = exports.isConfig = exports.integer = exports.float = exports.fail = exports.date = exports.chunkOf = exports.bool = exports.arrayOf = exports.all = exports.ConfigTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/config")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/config")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.reduceWithContext = exports.prefixed = exports.isUnsupported = exports.isSourceUnavailable = exports.isOr = exports.isMissingDataOnly = exports.isMissingData = exports.isInvalidData = exports.isConfigError = exports.isAnd = exports.Unsupported = exports.SourceUnavailable = exports.Or = exports.MissingData = exports.InvalidData = exports.ConfigErrorTypeId = exports.And = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/configError")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/configError")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -71,4 +71,4 @@ /** | ||
patch: PathPatch.PathPatch; | ||
load<A>(path: Array<string>, config: Config.Config.Primitive<A>, split?: boolean): Effect.Effect<never, ConfigError.ConfigError, Array<A>>; | ||
enumerateChildren(path: Array<string>): Effect.Effect<never, ConfigError.ConfigError, HashSet.HashSet<string>>; | ||
load<A>(path: ReadonlyArray<string>, config: Config.Config.Primitive<A>, split?: boolean): Effect.Effect<never, ConfigError.ConfigError, ReadonlyArray<A>>; | ||
enumerateChildren(path: ReadonlyArray<string>): Effect.Effect<never, ConfigError.ConfigError, HashSet.HashSet<string>>; | ||
} | ||
@@ -105,3 +105,6 @@ /** | ||
*/ | ||
export declare const make: (load: <A>(config: Config.Config<A>) => Effect.Effect<never, ConfigError.ConfigError, A>, flattened: ConfigProvider.Flat) => ConfigProvider; | ||
export declare const make: (options: { | ||
readonly load: <A>(config: Config.Config<A>) => Effect.Effect<never, ConfigError.ConfigError, A>; | ||
readonly flattened: ConfigProvider.Flat; | ||
}) => ConfigProvider; | ||
/** | ||
@@ -113,3 +116,7 @@ * Creates a new flat config provider. | ||
*/ | ||
export declare const makeFlat: (load: <A>(path: Array<string>, config: Config.Config.Primitive<A>) => Effect.Effect<never, ConfigError.ConfigError, Array<A>>, enumerateChildren: (path: Array<string>) => Effect.Effect<never, ConfigError.ConfigError, HashSet.HashSet<string>>, patch: PathPatch.PathPatch) => ConfigProvider.Flat; | ||
export declare const makeFlat: (options: { | ||
readonly load: <A>(path: ReadonlyArray<string>, config: Config.Config.Primitive<A>, split: boolean) => Effect.Effect<never, ConfigError.ConfigError, ReadonlyArray<A>>; | ||
readonly enumerateChildren: (path: ReadonlyArray<string>) => Effect.Effect<never, ConfigError.ConfigError, HashSet.HashSet<string>>; | ||
readonly patch: PathPatch.PathPatch; | ||
}) => ConfigProvider.Flat; | ||
/** | ||
@@ -248,5 +255,5 @@ * A config provider that loads configuration from context variables, | ||
export declare const within: { | ||
(path: Array<string>, f: (self: ConfigProvider) => ConfigProvider): (self: ConfigProvider) => ConfigProvider; | ||
(self: ConfigProvider, path: Array<string>, f: (self: ConfigProvider) => ConfigProvider): ConfigProvider; | ||
(path: ReadonlyArray<string>, f: (self: ConfigProvider) => ConfigProvider): (self: ConfigProvider) => ConfigProvider; | ||
(self: ConfigProvider, path: ReadonlyArray<string>, f: (self: ConfigProvider) => ConfigProvider): ConfigProvider; | ||
}; | ||
//# sourceMappingURL=Provider.d.ts.map |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.within = exports.upperCase = exports.unnested = exports.snakeCase = exports.orElse = exports.nested = exports.makeFlat = exports.make = exports.lowerCase = exports.kebabCase = exports.fromMap = exports.fromFlat = exports.fromEnv = exports.contramapPath = exports.constantCase = exports.FlatConfigProviderTypeId = exports.ConfigProviderTypeId = exports.ConfigProvider = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/configProvider")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/configProvider")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.unnested = exports.nested = exports.mapName = exports.empty = exports.andThen = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/configProvider/pathPatch")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/configProvider/pathPatch")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.value = exports.unsafeWipe = exports.make = exports.isConfigSecret = exports.fromString = exports.fromChunk = exports.ConfigSecretTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/configSecret")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/configSecret")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.liveServices = exports.currentServices = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/defaultServices")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/defaultServices")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,4 +7,4 @@ "use strict"; | ||
exports.unsafeMake = exports.unsafeDone = exports.sync = exports.succeed = exports.poll = exports.makeAs = exports.make = exports.isDone = exports.interruptWith = exports.interrupt = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.done = exports.dieSync = exports.die = exports.completeWith = exports.complete = exports.await = exports.DeferredTypeId = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/deferred")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/deferred")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -11,0 +11,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.sequential = exports.parallelN = exports.parallel = exports.match = exports.isSequential = exports.isParallelN = exports.isParallel = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/executionStrategy")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/executionStrategy")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -125,19 +125,9 @@ /** | ||
* | ||
* **Note**: `Exit.collectAll` combines `Cause` values sequentially. | ||
* | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export declare const collectAll: <E, A>(exits: Iterable<Exit<E, A>>) => Option.Option<Exit<E, Array<A>>>; | ||
export declare const all: <E, A>(exits: Iterable<Exit<E, A>>, options?: { | ||
readonly parallel?: boolean; | ||
} | undefined) => Option.Option<Exit<E, Array<A>>>; | ||
/** | ||
* Collects all of the specified exit values into a `Some<Exit<E, List<A>>>`. If | ||
* the provided iterable contains no elements, `None` will be returned. | ||
* | ||
* **Note**: `Exit.collectAll` combines `Cause` values in parallel. | ||
* | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export declare const collectAllPar: <E, A>(exits: Iterable<Exit<E, A>>) => Option.Option<Exit<E, Array<A>>>; | ||
/** | ||
* Constructs a new `Exit.Failure` from the specified unrecoverable defect. | ||
@@ -257,4 +247,10 @@ * | ||
export declare const mapBoth: { | ||
<E, A, E2, A2>(onFailure: (e: E) => E2, onSuccess: (a: A) => A2): (self: Exit<E, A>) => Exit<E2, A2>; | ||
<E, A, E2, A2>(self: Exit<E, A>, onFailure: (e: E) => E2, onSuccess: (a: A) => A2): Exit<E2, A2>; | ||
<E, A, E2, A2>(options: { | ||
readonly onFailure: (e: E) => E2; | ||
readonly onSuccess: (a: A) => A2; | ||
}): (self: Exit<E, A>) => Exit<E2, A2>; | ||
<E, A, E2, A2>(self: Exit<E, A>, options: { | ||
readonly onFailure: (e: E) => E2; | ||
readonly onSuccess: (a: A) => A2; | ||
}): Exit<E2, A2>; | ||
}; | ||
@@ -288,4 +284,10 @@ /** | ||
export declare const match: { | ||
<E, A, Z>(onFailure: (cause: Cause.Cause<E>) => Z, onSuccess: (a: A) => Z): (self: Exit<E, A>) => Z; | ||
<E, A, Z>(self: Exit<E, A>, onFailure: (cause: Cause.Cause<E>) => Z, onSuccess: (a: A) => Z): Z; | ||
<E, A, Z>(options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Z; | ||
readonly onSuccess: (a: A) => Z; | ||
}): (self: Exit<E, A>) => Z; | ||
<E, A, Z>(self: Exit<E, A>, options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Z; | ||
readonly onSuccess: (a: A) => Z; | ||
}): Z; | ||
}; | ||
@@ -297,4 +299,10 @@ /** | ||
export declare const matchEffect: { | ||
<E, A, R, E2, A2, R2, E3, A3>(onFailure: (cause: Cause.Cause<E>) => Effect.Effect<R, E2, A2>, onSuccess: (a: A) => Effect.Effect<R2, E3, A3>): (self: Exit<E, A>) => Effect.Effect<R | R2, E3, A3>; | ||
<E, A, R, E2, A2, R2, E3, A3>(self: Exit<E, A>, onFailure: (cause: Cause.Cause<E>) => Effect.Effect<R, E2, A2>, onSuccess: (a: A) => Effect.Effect<R2, E3, A3>): Effect.Effect<R | R2, E2 | E3, A2 | A3>; | ||
<E, A, R, E2, A2, R2, E3, A3>(options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Effect.Effect<R, E2, A2>; | ||
readonly onSuccess: (a: A) => Effect.Effect<R2, E3, A3>; | ||
}): (self: Exit<E, A>) => Effect.Effect<R | R2, E3, A3>; | ||
<E, A, R, E2, A2, R2, E3, A3>(self: Exit<E, A>, options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Effect.Effect<R, E2, A2>; | ||
readonly onSuccess: (a: A) => Effect.Effect<R2, E3, A3>; | ||
}): Effect.Effect<R | R2, E2 | E3, A2 | A3>; | ||
}; | ||
@@ -321,3 +329,3 @@ /** | ||
*/ | ||
export declare const unit: (_: void) => Exit<never, void>; | ||
export declare const unit: Exit<never, void>; | ||
/** | ||
@@ -397,5 +405,11 @@ * Sequentially zips the this result with the specified result or else returns | ||
export declare const zipWith: { | ||
<E, E2, A, B, C>(that: Exit<E2, B>, f: (a: A, b: B) => C, g: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2>): (self: Exit<E, A>) => Exit<E | E2, C>; | ||
<E, E2, A, B, C>(self: Exit<E, A>, that: Exit<E2, B>, f: (a: A, b: B) => C, g: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2>): Exit<E | E2, C>; | ||
<E, E2, A, B, C>(that: Exit<E2, B>, options: { | ||
readonly onSuccess: (a: A, b: B) => C; | ||
readonly onFailure: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2>; | ||
}): (self: Exit<E, A>) => Exit<E | E2, C>; | ||
<E, E2, A, B, C>(self: Exit<E, A>, that: Exit<E2, B>, options: { | ||
readonly onSuccess: (a: A, b: B) => C; | ||
readonly onFailure: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2>; | ||
}): Exit<E | E2, C>; | ||
}; | ||
//# sourceMappingURL=Exit.d.ts.map |
21
Exit.js
@@ -6,4 +6,4 @@ "use strict"; | ||
}); | ||
exports.zipWith = exports.zipRight = exports.zipParRight = exports.zipParLeft = exports.zipPar = exports.zipLeft = exports.zip = exports.unit = exports.unannotate = exports.succeed = exports.matchEffect = exports.match = exports.mapErrorCause = exports.mapError = exports.mapBoth = exports.map = exports.isSuccess = exports.isInterrupted = exports.isFailure = exports.isExit = exports.interrupt = exports.getOrElse = exports.fromOption = exports.fromEither = exports.forEachEffect = exports.flatten = exports.flatMapEffect = exports.flatMap = exports.failCause = exports.fail = exports.exists = exports.die = exports.collectAllPar = exports.collectAll = exports.causeOption = exports.asUnit = exports.as = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
exports.zipWith = exports.zipRight = exports.zipParRight = exports.zipParLeft = exports.zipPar = exports.zipLeft = exports.zip = exports.unit = exports.unannotate = exports.succeed = exports.matchEffect = exports.match = exports.mapErrorCause = exports.mapError = exports.mapBoth = exports.map = exports.isSuccess = exports.isInterrupted = exports.isFailure = exports.isExit = exports.interrupt = exports.getOrElse = exports.fromOption = exports.fromEither = exports.forEachEffect = exports.flatten = exports.flatMapEffect = exports.flatMap = exports.failCause = exports.fail = exports.exists = exports.die = exports.causeOption = exports.asUnit = exports.as = exports.all = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -73,4 +73,2 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
* | ||
* **Note**: `Exit.collectAll` combines `Cause` values sequentially. | ||
* | ||
* @since 1.0.0 | ||
@@ -80,15 +78,4 @@ * @category constructors | ||
exports.causeOption = causeOption; | ||
const collectAll = core.exitCollectAll; | ||
const all = core.exitCollectAll; | ||
/** | ||
* Collects all of the specified exit values into a `Some<Exit<E, List<A>>>`. If | ||
* the provided iterable contains no elements, `None` will be returned. | ||
* | ||
* **Note**: `Exit.collectAll` combines `Cause` values in parallel. | ||
* | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
exports.collectAll = collectAll; | ||
const collectAllPar = core.exitCollectAllPar; | ||
/** | ||
* Constructs a new `Exit.Failure` from the specified unrecoverable defect. | ||
@@ -99,3 +86,3 @@ * | ||
*/ | ||
exports.collectAllPar = collectAllPar; | ||
exports.all = all; | ||
const die = core.exitDie; | ||
@@ -102,0 +89,0 @@ /** |
@@ -7,3 +7,3 @@ /** | ||
import type * as Option from "@effect/data/Option"; | ||
import type * as order from "@effect/data/typeclass/Order"; | ||
import type * as order from "@effect/data/Order"; | ||
import type * as Cause from "@effect/io/Cause"; | ||
@@ -245,3 +245,3 @@ import type * as Effect from "@effect/io/Effect"; | ||
*/ | ||
export declare const collectAll: <E, A>(fibers: Iterable<Fiber<E, A>>) => Fiber<E, Array<A>>; | ||
export declare const all: <E, A>(fibers: Iterable<Fiber<E, A>>) => Fiber<E, ReadonlyArray<A>>; | ||
/** | ||
@@ -425,4 +425,10 @@ * A fiber that is done with the specified `Exit` value. | ||
export declare const match: { | ||
<E, A, Z>(onFiber: (fiber: Fiber<E, A>) => Z, onRuntimeFiber: (fiber: RuntimeFiber<E, A>) => Z): (self: Fiber<E, A>) => Z; | ||
<E, A, Z>(self: Fiber<E, A>, onFiber: (fiber: Fiber<E, A>) => Z, onRuntimeFiber: (fiber: RuntimeFiber<E, A>) => Z): Z; | ||
<E, A, Z>(options: { | ||
readonly onFiber: (fiber: Fiber<E, A>) => Z; | ||
readonly onRuntimeFiber: (fiber: RuntimeFiber<E, A>) => Z; | ||
}): (self: Fiber<E, A>) => Z; | ||
<E, A, Z>(self: Fiber<E, A>, options: { | ||
readonly onFiber: (fiber: Fiber<E, A>) => Z; | ||
readonly onRuntimeFiber: (fiber: RuntimeFiber<E, A>) => Z; | ||
}): Z; | ||
}; | ||
@@ -435,3 +441,3 @@ /** | ||
*/ | ||
export declare const never: (_: void) => Fiber<never, never>; | ||
export declare const never: Fiber<never, never>; | ||
/** | ||
@@ -482,3 +488,3 @@ * Returns a fiber that prefers `this` fiber, but falls back to the `that` one | ||
*/ | ||
export declare const roots: (_: void) => Effect.Effect<never, never, Array<RuntimeFiber<any, any>>>; | ||
export declare const roots: Effect.Effect<never, never, Array<RuntimeFiber<any, any>>>; | ||
/** | ||
@@ -519,3 +525,3 @@ * Returns a chunk containing all root fibers. | ||
*/ | ||
export declare const unit: (_: void) => Fiber<never, void>; | ||
export declare const unit: Fiber<never, void>; | ||
/** | ||
@@ -522,0 +528,0 @@ * Zips this fiber and the specified fiber together, producing a tuple of |
14
Fiber.js
@@ -6,7 +6,7 @@ "use strict"; | ||
}); | ||
exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.unsafeRoots = exports.unit = exports.succeed = exports.status = exports.scoped = exports.roots = exports.pretty = exports.poll = exports.orElseEither = exports.orElse = exports.never = exports.match = exports.mapFiber = exports.mapEffect = exports.map = exports.joinAll = exports.join = exports.isRuntimeFiber = exports.isFiber = exports.interrupted = exports.interruptFork = exports.interruptAsFork = exports.interruptAs = exports.interruptAllAs = exports.interruptAll = exports.interrupt = exports.inheritAll = exports.id = exports.getCurrentFiber = exports.fromEffect = exports.failCause = exports.fail = exports.dumpAll = exports.dump = exports.done = exports.collectAll = exports.children = exports.awaitAll = exports.await = exports.RuntimeFiberTypeId = exports.Order = exports.FiberTypeId = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/effect/circular")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiber")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRuntime")); | ||
exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.unsafeRoots = exports.unit = exports.succeed = exports.status = exports.scoped = exports.roots = exports.pretty = exports.poll = exports.orElseEither = exports.orElse = exports.never = exports.match = exports.mapFiber = exports.mapEffect = exports.map = exports.joinAll = exports.join = exports.isRuntimeFiber = exports.isFiber = exports.interrupted = exports.interruptFork = exports.interruptAsFork = exports.interruptAs = exports.interruptAllAs = exports.interruptAll = exports.interrupt = exports.inheritAll = exports.id = exports.getCurrentFiber = exports.fromEffect = exports.failCause = exports.fail = exports.dumpAll = exports.dump = exports.done = exports.children = exports.awaitAll = exports.await = exports.all = exports.RuntimeFiberTypeId = exports.Order = exports.FiberTypeId = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/effect/circular")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiber")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRuntime")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -82,3 +82,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
exports.children = children; | ||
const collectAll = fiberRuntime.fiberCollectAll; | ||
const all = fiberRuntime.fiberAll; | ||
/** | ||
@@ -90,3 +90,3 @@ * A fiber that is done with the specified `Exit` value. | ||
*/ | ||
exports.collectAll = collectAll; | ||
exports.all = all; | ||
const done = internal.done; | ||
@@ -93,0 +93,0 @@ /** |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.unsafeMake = exports.toSet = exports.toOption = exports.threadName = exports.runtime = exports.none = exports.make = exports.isRuntime = exports.isNone = exports.isFiberId = exports.isComposite = exports.ids = exports.getOrElse = exports.composite = exports.combineAll = exports.combine = exports.FiberIdTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberId")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberId")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -107,3 +107,3 @@ /** | ||
*/ | ||
export declare const differ: (_: void) => Differ.Differ<RuntimeFlags, RuntimeFlagsPatch.RuntimeFlagsPatch>; | ||
export declare const differ: Differ.Differ<RuntimeFlags, RuntimeFlagsPatch.RuntimeFlagsPatch>; | ||
/** | ||
@@ -133,3 +133,3 @@ * Disables the specified `RuntimeFlag`. | ||
*/ | ||
export declare const disableCooperativeYielding: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const disableCooperativeYielding: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -139,3 +139,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const disableInterruption: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const disableInterruption: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -145,3 +145,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const disableOpSupervision: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const disableOpSupervision: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -151,3 +151,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const disableRuntimeMetrics: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const disableRuntimeMetrics: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -157,3 +157,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const disableWindDown: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const disableWindDown: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -183,3 +183,3 @@ * Enables the specified `RuntimeFlag`. | ||
*/ | ||
export declare const enableCooperativeYielding: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const enableCooperativeYielding: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -189,3 +189,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const enableInterruption: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const enableInterruption: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -195,3 +195,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const enableOpSupervision: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const enableOpSupervision: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -201,3 +201,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const enableRuntimeMetrics: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const enableRuntimeMetrics: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -207,3 +207,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const enableWindDown: (_: void) => Layer.Layer<never, never, never>; | ||
export declare const enableWindDown: Layer.Layer<never, never, never>; | ||
/** | ||
@@ -210,0 +210,0 @@ * Returns true only if the `Interruption` flag is **enabled** and the |
@@ -7,4 +7,4 @@ "use strict"; | ||
exports.windDown = exports.toSet = exports.runtimeMetrics = exports.render = exports.patch = exports.opSupervision = exports.none = exports.make = exports.isEnabled = exports.isDisabled = exports.interruption = exports.interruptible = exports.enableWindDown = exports.enableRuntimeMetrics = exports.enableOpSupervision = exports.enableInterruption = exports.enableCooperativeYielding = exports.enableAll = exports.enable = exports.disableWindDown = exports.disableRuntimeMetrics = exports.disableOpSupervision = exports.disableInterruption = exports.disableCooperativeYielding = exports.disableAll = exports.disable = exports.differ = exports.diff = exports.cooperativeYielding = exports.WindDown = exports.RuntimeMetrics = exports.OpSupervision = exports.None = exports.Interruption = exports.CooperativeYielding = void 0; | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/layer/circular")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/runtimeFlags")); | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/layer/circular")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/runtimeFlags")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -11,0 +11,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,4 +7,4 @@ "use strict"; | ||
exports.render = exports.make = exports.isEnabled = exports.isEmpty = exports.isDisabled = exports.isActive = exports.inverse = exports.includes = exports.exclude = exports.enabledSet = exports.enable = exports.empty = exports.either = exports.disabledSet = exports.disable = exports.both = exports.andThen = void 0; | ||
var runtimeFlags = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/runtimeFlags")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/runtimeFlagsPatch")); | ||
var runtimeFlags = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/runtimeFlags")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/runtimeFlagsPatch")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -11,0 +11,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.suspended = exports.running = exports.isSuspended = exports.isRunning = exports.isFiberStatus = exports.isDone = exports.done = exports.FiberStatusTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberStatus")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberStatus")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -52,3 +52,6 @@ /** | ||
*/ | ||
export declare const make: <A>(initial: A, fork?: (a: A) => A, join?: (left: A, right: A) => A) => Effect.Effect<Scope.Scope, never, FiberRef<A>>; | ||
export declare const make: <A>(initial: A, options?: { | ||
readonly fork?: (a: A) => A; | ||
readonly join?: (left: A, right: A) => A; | ||
}) => Effect.Effect<Scope.Scope, never, FiberRef<A>>; | ||
/** | ||
@@ -73,3 +76,6 @@ * @since 1.0.0 | ||
*/ | ||
export declare const unsafeMake: <Value>(initial: Value, fork?: (a: Value) => Value, join?: (left: Value, right: Value) => Value) => FiberRef<Value>; | ||
export declare const unsafeMake: <Value>(initial: Value, options?: { | ||
readonly fork?: (a: Value) => Value; | ||
readonly join?: (left: Value, right: Value) => Value; | ||
}) => FiberRef<Value>; | ||
/** | ||
@@ -94,3 +100,7 @@ * @since 1.0.0 | ||
*/ | ||
export declare const unsafeMakePatch: <Value, Patch>(initial: Value, differ: Differ.Differ<Value, Patch>, fork: Patch, join?: (oldV: Value, newV: Value) => Value) => FiberRef<Value>; | ||
export declare const unsafeMakePatch: <Value, Patch>(initial: Value, options: { | ||
readonly differ: Differ.Differ<Value, Patch>; | ||
readonly fork: Patch; | ||
readonly join?: (oldV: Value, newV: Value) => Value; | ||
}) => FiberRef<Value>; | ||
/** | ||
@@ -222,2 +232,7 @@ * @since 1.0.0 | ||
*/ | ||
export declare const currentSchedulingPriority: FiberRef<number>; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiberRefs | ||
*/ | ||
export declare const currentMaxFiberOps: FiberRef<number>; | ||
@@ -263,7 +278,2 @@ /** | ||
*/ | ||
export declare const currentParallelism: FiberRef<Option.Option<number>>; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiberRefs | ||
*/ | ||
export declare const currentScheduler: FiberRef<Scheduler.Scheduler>; | ||
@@ -279,3 +289,3 @@ /** | ||
*/ | ||
export declare const currentTags: FiberRef<HashSet.HashSet<MetricLabel.MetricLabel>>; | ||
export declare const currentMetricLabels: FiberRef<HashSet.HashSet<MetricLabel.MetricLabel>>; | ||
/** | ||
@@ -282,0 +292,0 @@ * @since 1.0.0 |
@@ -6,6 +6,6 @@ "use strict"; | ||
}); | ||
exports.updateSomeAndGet = exports.updateSome = exports.updateAndGet = exports.update = exports.unsafeMakeSupervisor = exports.unsafeMakePatch = exports.unsafeMakeHashSet = exports.unsafeMakeContext = exports.unsafeMake = exports.unhandledErrorLogLevel = exports.set = exports.reset = exports.modifySome = exports.modify = exports.makeWith = exports.makeRuntimeFlags = exports.makeContext = exports.make = exports.interruptedCause = exports.getWith = exports.getAndUpdateSome = exports.getAndUpdate = exports.getAndSet = exports.get = exports.delete = exports.currentTracerSpanAnnotations = exports.currentTracerSpan = exports.currentTags = exports.currentSupervisor = exports.currentScheduler = exports.currentRuntimeFlags = exports.currentRequestCacheEnabled = exports.currentRequestCache = exports.currentRequestBatchingEnabled = exports.currentParallelism = exports.currentMinimumLogLevel = exports.currentMaxFiberOps = exports.currentLoggers = exports.currentLogSpan = exports.currentLogLevel = exports.currentLogAnnotations = exports.currentContext = exports.FiberRefTypeId = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRuntime")); | ||
var query = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/query")); | ||
exports.updateSomeAndGet = exports.updateSome = exports.updateAndGet = exports.update = exports.unsafeMakeSupervisor = exports.unsafeMakePatch = exports.unsafeMakeHashSet = exports.unsafeMakeContext = exports.unsafeMake = exports.unhandledErrorLogLevel = exports.set = exports.reset = exports.modifySome = exports.modify = exports.makeWith = exports.makeRuntimeFlags = exports.makeContext = exports.make = exports.interruptedCause = exports.getWith = exports.getAndUpdateSome = exports.getAndUpdate = exports.getAndSet = exports.get = exports.delete = exports.currentTracerSpanAnnotations = exports.currentTracerSpan = exports.currentSupervisor = exports.currentSchedulingPriority = exports.currentScheduler = exports.currentRuntimeFlags = exports.currentRequestCacheEnabled = exports.currentRequestCache = exports.currentRequestBatchingEnabled = exports.currentMinimumLogLevel = exports.currentMetricLabels = exports.currentMaxFiberOps = exports.currentLoggers = exports.currentLogSpan = exports.currentLogLevel = exports.currentLogAnnotations = exports.currentContext = exports.FiberRefTypeId = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRuntime")); | ||
var query = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/query")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -157,3 +157,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
exports.updateSomeAndGet = updateSomeAndGet; | ||
const currentRequestBatchingEnabled = fiberRuntime.currentRequestBatchingEnabled; | ||
const currentRequestBatchingEnabled = core.currentRequestBatchingEnabled; | ||
/** | ||
@@ -182,2 +182,8 @@ * @since 1.0.0 | ||
exports.currentContext = currentContext; | ||
const currentSchedulingPriority = core.currentSchedulingPriority; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiberRefs | ||
*/ | ||
exports.currentSchedulingPriority = currentSchedulingPriority; | ||
const currentMaxFiberOps = core.currentMaxFiberOps; | ||
@@ -231,8 +237,2 @@ /** | ||
exports.currentRuntimeFlags = currentRuntimeFlags; | ||
const currentParallelism = core.currentParallelism; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiberRefs | ||
*/ | ||
exports.currentParallelism = currentParallelism; | ||
const currentScheduler = core.currentScheduler; | ||
@@ -250,3 +250,3 @@ /** | ||
exports.currentSupervisor = currentSupervisor; | ||
const currentTags = core.currentTags; | ||
const currentMetricLabels = core.currentMetricLabels; | ||
/** | ||
@@ -256,3 +256,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.currentTags = currentTags; | ||
exports.currentMetricLabels = currentMetricLabels; | ||
const currentTracerSpan = core.currentTracerSpan; | ||
@@ -259,0 +259,0 @@ /** |
@@ -112,4 +112,12 @@ /** | ||
export declare const updatedAs: { | ||
<A>(fiberId: FiberId.Runtime, fiberRef: FiberRef.FiberRef<A>, value: A): (self: FiberRefs) => FiberRefs; | ||
<A>(self: FiberRefs, fiberId: FiberId.Runtime, fiberRef: FiberRef.FiberRef<A>, value: A): FiberRefs; | ||
<A>(options: { | ||
readonly fiberId: FiberId.Runtime; | ||
readonly fiberRef: FiberRef.FiberRef<A>; | ||
readonly value: A; | ||
}): (self: FiberRefs) => FiberRefs; | ||
<A>(self: FiberRefs, options: { | ||
readonly fiberId: FiberId.Runtime; | ||
readonly fiberRef: FiberRef.FiberRef<A>; | ||
readonly value: A; | ||
}): FiberRefs; | ||
}; | ||
@@ -116,0 +124,0 @@ /** |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.updatedAs = exports.unsafeMake = exports.setAll = exports.joinAs = exports.getOrDefault = exports.get = exports.forkAs = exports.fiberRefs = exports.delete = exports.FiberRefsSym = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRefs")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRefs")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -63,3 +63,3 @@ /** | ||
*/ | ||
export declare const empty: (_: void) => FiberRefsPatch; | ||
export declare const empty: FiberRefsPatch; | ||
/** | ||
@@ -66,0 +66,0 @@ * Constructs a patch that describes the changes between the specified |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.patch = exports.empty = exports.diff = exports.combine = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRefs/patch")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRefs/patch")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.unbounded = exports.subscribe = exports.sliding = exports.size = exports.shutdown = exports.publishAll = exports.publish = exports.isShutdown = exports.isFull = exports.isEmpty = exports.dropping = exports.capacity = exports.bounded = exports.awaitShutdown = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/hub")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/hub")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -64,3 +64,6 @@ /** | ||
*/ | ||
export declare const makeSized: <K, R, E, A>(get: (key: K) => Effect.Effect<R, E, A>, size: number) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>>; | ||
export declare const make: <K, R, E, A>(options: { | ||
readonly acquire: (key: K) => Effect.Effect<R, E, A>; | ||
readonly size: number; | ||
}) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>>; | ||
/** | ||
@@ -77,3 +80,6 @@ * Makes a new pool of the specified fixed size. The pool is returned in a | ||
*/ | ||
export declare const makeSizedWith: <K, R, E, A>(get: (key: K) => Effect.Effect<R, E, A>, size: (key: K) => number) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>>; | ||
export declare const makeWith: <K, R, E, A>(options: { | ||
readonly acquire: (key: K) => Effect.Effect<R, E, A>; | ||
readonly size: (key: K) => number; | ||
}) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>>; | ||
/** | ||
@@ -92,3 +98,8 @@ * Makes a new pool with the specified minimum and maximum sizes and time to | ||
*/ | ||
export declare const makeSizedWithTTL: <K, R, E, A>(get: (key: K) => Effect.Effect<R, E, A>, min: (key: K) => number, max: (key: K) => number, timeToLive: Duration.Duration) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>>; | ||
export declare const makeWithTTL: <K, R, E, A>(options: { | ||
readonly acquire: (key: K) => Effect.Effect<R, E, A>; | ||
readonly min: (key: K) => number; | ||
readonly max: (key: K) => number; | ||
readonly timeToLive: Duration.DurationInput; | ||
}) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>>; | ||
/** | ||
@@ -107,3 +118,8 @@ * Makes a new pool with the specified minimum and maximum sizes and time to | ||
*/ | ||
export declare const makeSizedWithTTLBy: <K, R, E, A>(get: (key: K) => Effect.Effect<R, E, A>, min: (key: K) => number, max: (key: K) => number, timeToLive: (key: K) => Duration.Duration) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>>; | ||
export declare const makeWithTTLBy: <K, R, E, A>(options: { | ||
readonly acquire: (key: K) => Effect.Effect<R, E, A>; | ||
readonly min: (key: K) => number; | ||
readonly max: (key: K) => number; | ||
readonly timeToLive: (key: K) => Duration.DurationInput; | ||
}) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>>; | ||
/** | ||
@@ -110,0 +126,0 @@ * Retrieves an item from the pool belonging to the given key in a scoped |
@@ -6,4 +6,4 @@ "use strict"; | ||
}); | ||
exports.makeSizedWithTTLBy = exports.makeSizedWithTTL = exports.makeSizedWith = exports.makeSized = exports.invalidate = exports.get = exports.KeyedPoolTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/keyedPool")); | ||
exports.makeWithTTLBy = exports.makeWithTTL = exports.makeWith = exports.make = exports.invalidate = exports.get = exports.KeyedPoolTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/keyedPool")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -26,3 +26,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
exports.KeyedPoolTypeId = KeyedPoolTypeId; | ||
const makeSized = internal.makeSized; | ||
const make = internal.make; | ||
/** | ||
@@ -39,4 +39,4 @@ * Makes a new pool of the specified fixed size. The pool is returned in a | ||
*/ | ||
exports.makeSized = makeSized; | ||
const makeSizedWith = internal.makeSizedWith; | ||
exports.make = make; | ||
const makeWith = internal.makeWith; | ||
/** | ||
@@ -55,4 +55,4 @@ * Makes a new pool with the specified minimum and maximum sizes and time to | ||
*/ | ||
exports.makeSizedWith = makeSizedWith; | ||
const makeSizedWithTTL = internal.makeSizedWithTTL; | ||
exports.makeWith = makeWith; | ||
const makeWithTTL = internal.makeWithTTL; | ||
/** | ||
@@ -71,4 +71,4 @@ * Makes a new pool with the specified minimum and maximum sizes and time to | ||
*/ | ||
exports.makeSizedWithTTL = makeSizedWithTTL; | ||
const makeSizedWithTTLBy = internal.makeSizedWithTTLBy; | ||
exports.makeWithTTL = makeWithTTL; | ||
const makeWithTTLBy = internal.makeWithTTLBy; | ||
/** | ||
@@ -83,3 +83,3 @@ * Retrieves an item from the pool belonging to the given key in a scoped | ||
*/ | ||
exports.makeSizedWithTTLBy = makeSizedWithTTLBy; | ||
exports.makeWithTTLBy = makeWithTTLBy; | ||
const get = internal.get; | ||
@@ -86,0 +86,0 @@ /** |
@@ -167,3 +167,6 @@ /** | ||
*/ | ||
export declare const effect: <T extends Context.Tag<any, any>, R, E>(tag: T, effect: Effect.Effect<R, E, Context.Tag.Service<T>>) => Layer<R, E, Context.Tag.Identifier<T>>; | ||
export declare const effect: { | ||
<T extends Context.Tag<any, any>>(tag: T): <R, E>(effect: Effect.Effect<R, E, Context.Tag.Service<T>>) => Layer<R, E, Context.Tag.Identifier<T>>; | ||
<T extends Context.Tag<any, any>, R, E>(tag: T, effect: Effect.Effect<R, E, Context.Tag.Service<T>>): Layer<R, E, Context.Tag.Identifier<T>>; | ||
}; | ||
/** | ||
@@ -294,5 +297,11 @@ * Constructs a layer from the specified effect discarding it's output. | ||
*/ | ||
export declare const matchLayer: { | ||
<E, R2, E2, A2, A, R3, E3, A3>(onFailure: (error: E) => Layer<R2, E2, A2>, onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3>): <R>(self: Layer<R, E, A>) => Layer<R2 | R3 | R, E2 | E3, A2 & A3>; | ||
<R, E, A, R2, E2, A2, R3, E3, A3>(self: Layer<R, E, A>, onFailure: (error: E) => Layer<R2, E2, A2>, onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3>): Layer<R | R2 | R3, E2 | E3, A2 & A3>; | ||
export declare const match: { | ||
<E, R2, E2, A2, A, R3, E3, A3>(options: { | ||
readonly onFailure: (error: E) => Layer<R2, E2, A2>; | ||
readonly onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3>; | ||
}): <R>(self: Layer<R, E, A>) => Layer<R2 | R3 | R, E2 | E3, A2 & A3>; | ||
<R, E, A, R2, E2, A2, R3, E3, A3>(self: Layer<R, E, A>, options: { | ||
readonly onFailure: (error: E) => Layer<R2, E2, A2>; | ||
readonly onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3>; | ||
}): Layer<R | R2 | R3, E2 | E3, A2 & A3>; | ||
}; | ||
@@ -307,5 +316,11 @@ /** | ||
*/ | ||
export declare const matchCauseLayer: { | ||
<E, A, R2, E2, A2, R3, E3, A3>(onFailure: (cause: Cause.Cause<E>) => Layer<R2, E2, A2>, onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3>): <R>(self: Layer<R, E, A>) => Layer<R2 | R3 | R, E2 | E3, A2 & A3>; | ||
<R, E, A, R2, E2, A2, R3, E3, A3>(self: Layer<R, E, A>, onFailure: (cause: Cause.Cause<E>) => Layer<R2, E2, A2>, onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3>): Layer<R | R2 | R3, E2 | E3, A2 & A3>; | ||
export declare const matchCause: { | ||
<E, A, R2, E2, A2, R3, E3, A3>(options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Layer<R2, E2, A2>; | ||
readonly onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3>; | ||
}): <R>(self: Layer<R, E, A>) => Layer<R2 | R3 | R, E2 | E3, A2 & A3>; | ||
<R, E, A, R2, E2, A2, R3, E3, A3>(self: Layer<R, E, A>, options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Layer<R2, E2, A2>; | ||
readonly onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3>; | ||
}): Layer<R | R2 | R3, E2 | E3, A2 & A3>; | ||
}; | ||
@@ -459,3 +474,3 @@ /** | ||
*/ | ||
export declare const scope: (_: void) => Layer<never, never, Scope.CloseableScope>; | ||
export declare const scope: Layer<never, never, Scope.CloseableScope>; | ||
/** | ||
@@ -467,3 +482,6 @@ * Constructs a layer from the specified scoped effect. | ||
*/ | ||
export declare const scoped: <T extends Context.Tag<any, any>, R, E>(tag: T, effect: Effect.Effect<R, E, Context.Tag.Service<T>>) => Layer<Exclude<R, Scope.Scope>, E, Context.Tag.Identifier<T>>; | ||
export declare const scoped: { | ||
<T extends Context.Tag<any, any>>(tag: T): <R, E>(effect: Effect.Effect<R, E, Context.Tag.Service<T>>) => Layer<Exclude<R, Scope.Scope>, E, Context.Tag.Identifier<T>>; | ||
<T extends Context.Tag<any, any>, R, E>(tag: T, effect: Effect.Effect<R, E, Context.Tag.Service<T>>): Layer<Exclude<R, Scope.Scope>, E, Context.Tag.Identifier<T>>; | ||
}; | ||
/** | ||
@@ -498,3 +516,6 @@ * Constructs a layer from the specified scoped effect. | ||
*/ | ||
export declare const succeed: <T extends Context.Tag<any, any>>(tag: T, resource: Context.Tag.Service<T>) => Layer<never, never, Context.Tag.Identifier<T>>; | ||
export declare const succeed: { | ||
<T extends Context.Tag<any, any>>(tag: T): (resource: Context.Tag.Service<T>) => Layer<never, never, Context.Tag.Identifier<T>>; | ||
<T extends Context.Tag<any, any>>(tag: T, resource: Context.Tag.Service<T>): Layer<never, never, Context.Tag.Identifier<T>>; | ||
}; | ||
/** | ||
@@ -522,3 +543,6 @@ * Constructs a layer from the specified value, which must return one or more | ||
*/ | ||
export declare const sync: <T extends Context.Tag<any, any>>(tag: T, evaluate: LazyArg<Context.Tag.Service<T>>) => Layer<never, never, Context.Tag.Identifier<T>>; | ||
export declare const sync: { | ||
<T extends Context.Tag<any, any>>(tag: T): (evaluate: LazyArg<Context.Tag.Service<T>>) => Layer<never, never, Context.Tag.Identifier<T>>; | ||
<T extends Context.Tag<any, any>>(tag: T, evaluate: LazyArg<Context.Tag.Service<T>>): Layer<never, never, Context.Tag.Identifier<T>>; | ||
}; | ||
/** | ||
@@ -525,0 +549,0 @@ * Lazily constructs a layer from the specified value, which must return one or more |
12
Layer.js
@@ -6,5 +6,5 @@ "use strict"; | ||
}); | ||
exports.zipWithPar = exports.useMerge = exports.use = exports.unwrapScoped = exports.unwrapEffect = exports.toRuntime = exports.tapErrorCause = exports.tapError = exports.tap = exports.syncContext = exports.sync = exports.suspend = exports.succeedContext = exports.succeed = exports.service = exports.scopedDiscard = exports.scopedContext = exports.scoped = exports.scope = exports.retry = exports.provideMerge = exports.provide = exports.project = exports.passthrough = exports.orElse = exports.orDie = exports.mergeAll = exports.merge = exports.memoize = exports.matchLayer = exports.matchCauseLayer = exports.mapError = exports.map = exports.locallyWith = exports.locallyScoped = exports.locallyEffect = exports.locally = exports.launch = exports.isLayer = exports.isFresh = exports.function = exports.fresh = exports.flatten = exports.flatMap = exports.fiberRefLocallyScopedWith = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.extendScope = exports.effectDiscard = exports.effectContext = exports.effect = exports.discard = exports.dieSync = exports.die = exports.context = exports.catchAllCause = exports.catchAll = exports.buildWithScope = exports.build = exports.LayerTypeId = void 0; | ||
exports.zipWithPar = exports.useMerge = exports.use = exports.unwrapScoped = exports.unwrapEffect = exports.toRuntime = exports.tapErrorCause = exports.tapError = exports.tap = exports.syncContext = exports.sync = exports.suspend = exports.succeedContext = exports.succeed = exports.service = exports.scopedDiscard = exports.scopedContext = exports.scoped = exports.scope = exports.retry = exports.provideMerge = exports.provide = exports.project = exports.passthrough = exports.orElse = exports.orDie = exports.mergeAll = exports.merge = exports.memoize = exports.matchCause = exports.match = exports.mapError = exports.map = exports.locallyWith = exports.locallyScoped = exports.locallyEffect = exports.locally = exports.launch = exports.isLayer = exports.isFresh = exports.function = exports.fresh = exports.flatten = exports.flatMap = exports.fiberRefLocallyScopedWith = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.extendScope = exports.effectDiscard = exports.effectContext = exports.effect = exports.discard = exports.dieSync = exports.die = exports.context = exports.catchAllCause = exports.catchAll = exports.buildWithScope = exports.build = exports.LayerTypeId = void 0; | ||
var Context = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Context")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/layer")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/layer")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -252,3 +252,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
exports.mapError = mapError; | ||
const matchLayer = internal.matchLayer; | ||
const match = internal.match; | ||
/** | ||
@@ -262,4 +262,4 @@ * Feeds the error or output services of this layer into the input of either | ||
*/ | ||
exports.matchLayer = matchLayer; | ||
const matchCauseLayer = internal.matchCauseLayer; | ||
exports.match = match; | ||
const matchCause = internal.matchCause; | ||
/** | ||
@@ -272,3 +272,3 @@ * Returns a scoped effect that, if evaluated, will return the lazily computed | ||
*/ | ||
exports.matchCauseLayer = matchCauseLayer; | ||
exports.matchCause = matchCause; | ||
const memoize = internal.memoize; | ||
@@ -275,0 +275,0 @@ /** |
@@ -31,3 +31,12 @@ /** | ||
export interface Logger<Message, Output> extends Logger.Variance<Message, Output> { | ||
readonly log: (fiberId: FiberId.FiberId, logLevel: LogLevel.LogLevel, message: Message, cause: Cause.Cause<unknown>, context: FiberRefs.FiberRefs, spans: List.List<LogSpan.LogSpan>, annotations: HashMap.HashMap<string, string>, now: Date) => Output; | ||
readonly log: (options: { | ||
readonly fiberId: FiberId.FiberId; | ||
readonly logLevel: LogLevel.LogLevel; | ||
readonly message: Message; | ||
readonly cause: Cause.Cause<unknown>; | ||
readonly context: FiberRefs.FiberRefs; | ||
readonly spans: List.List<LogSpan.LogSpan>; | ||
readonly annotations: HashMap.HashMap<string, string>; | ||
readonly date: Date; | ||
}) => Output; | ||
} | ||
@@ -53,3 +62,12 @@ /** | ||
*/ | ||
export declare const make: <Message, Output>(log: (fiberId: FiberId.FiberId, logLevel: LogLevel.LogLevel, message: Message, cause: Cause.Cause<unknown>, context: FiberRefs.FiberRefs, spans: List.List<LogSpan.LogSpan>, annotations: HashMap.HashMap<string, string>, now: Date) => Output) => Logger<Message, Output>; | ||
export declare const make: <Message, Output>(log: (options: { | ||
readonly fiberId: FiberId.FiberId; | ||
readonly logLevel: LogLevel.LogLevel; | ||
readonly message: Message; | ||
readonly cause: Cause.Cause<unknown>; | ||
readonly context: FiberRefs.FiberRefs; | ||
readonly spans: List.List<LogSpan.LogSpan>; | ||
readonly annotations: HashMap.HashMap<string, string>; | ||
readonly date: Date; | ||
}) => Output) => Logger<Message, Output>; | ||
/** | ||
@@ -103,3 +121,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const none: (_: void) => Logger<unknown, void>; | ||
export declare const none: Logger<unknown, void>; | ||
/** | ||
@@ -106,0 +124,0 @@ * @since 1.0.0 |
@@ -7,6 +7,6 @@ "use strict"; | ||
exports.zipRight = exports.zipLeft = exports.zip = exports.withMinimumLogLevel = exports.tracerLogger = exports.test = exports.sync = exports.succeed = exports.stringLogger = exports.simple = exports.replaceScoped = exports.replaceEffect = exports.replace = exports.remove = exports.none = exports.minimumLogLevel = exports.map = exports.make = exports.logfmtLogger = exports.logFmt = exports.filterLogLevel = exports.defaultLogger = exports.contramap = exports.addScoped = exports.addEffect = exports.add = exports.LoggerTypeId = void 0; | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRuntime")); | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/layer/circular")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/logger")); | ||
var internalCircular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/logger-circular")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRuntime")); | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/layer/circular")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/logger")); | ||
var internalCircular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/logger-circular")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -13,0 +13,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -1,2 +0,2 @@ | ||
import * as order from "@effect/data/typeclass/Order"; | ||
import * as order from "@effect/data/Order"; | ||
import type * as Effect from "@effect/io/Effect"; | ||
@@ -20,2 +20,7 @@ /** | ||
*/ | ||
export type Literal = LogLevel["_tag"]; | ||
/** | ||
* @since 1.0.0 | ||
* @category model | ||
*/ | ||
export interface All { | ||
@@ -194,3 +199,3 @@ readonly _tag: "All"; | ||
*/ | ||
export declare const fromLiteral: (_: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None") => LogLevel; | ||
export declare const fromLiteral: (_: Literal) => LogLevel; | ||
//# sourceMappingURL=Level.d.ts.map |
@@ -7,6 +7,6 @@ "use strict"; | ||
exports.locally = exports.lessThanEqual = exports.lessThan = exports.greaterThanEqual = exports.greaterThan = exports.fromLiteral = exports.allLevels = exports.Warning = exports.Trace = exports.Order = exports.None = exports.Info = exports.Fatal = exports.Error = exports.Debug = exports.All = void 0; | ||
var debug = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Debug")); | ||
var _Function = /*#__PURE__*/require("@effect/data/Function"); | ||
var number = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Number")); | ||
var order = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/typeclass/Order")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var order = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Order")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -79,3 +79,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
exports.allLevels = allLevels; | ||
const locally = /*#__PURE__*/debug.dualWithTrace(2, trace => (use, self) => core.fiberRefLocally(use, core.currentLogLevel, self).traced(trace)); | ||
const locally = /*#__PURE__*/(0, _Function.dual)(2, (use, self) => core.fiberRefLocally(use, core.currentLogLevel, self)); | ||
/** | ||
@@ -82,0 +82,0 @@ * @since 1.0.0 |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.render = exports.make = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/logSpan")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/logSpan")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -226,3 +226,3 @@ /** | ||
*/ | ||
export declare const snapshot: () => Effect.Effect<never, never, HashSet.HashSet<MetricPair.MetricPair.Untyped>>; | ||
export declare const snapshot: Effect.Effect<never, never, HashSet.HashSet<MetricPair.MetricPair.Untyped>>; | ||
/** | ||
@@ -246,3 +246,10 @@ * Creates a metric that ignores input and produces constant output. | ||
*/ | ||
export declare const summary: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>, description?: string) => Metric.Summary<number>; | ||
export declare const summary: (options: { | ||
readonly name: string; | ||
readonly maxAge: Duration.DurationInput; | ||
readonly maxSize: number; | ||
readonly error: number; | ||
readonly quantiles: Chunk.Chunk<number>; | ||
readonly description?: string; | ||
}) => Metric.Summary<number>; | ||
/** | ||
@@ -252,3 +259,10 @@ * @since 1.0.0 | ||
*/ | ||
export declare const summaryTimestamp: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>, description?: string) => Metric.Summary<readonly [value: number, timestamp: number]>; | ||
export declare const summaryTimestamp: (options: { | ||
readonly name: string; | ||
readonly maxAge: Duration.DurationInput; | ||
readonly maxSize: number; | ||
readonly error: number; | ||
readonly quantiles: Chunk.Chunk<number>; | ||
readonly description?: string; | ||
}) => Metric.Summary<readonly [value: number, timestamp: number]>; | ||
/** | ||
@@ -472,2 +486,7 @@ * Returns a new metric, which is identical in every way to this one, except | ||
export declare const fiberLifetimes: Metric<MetricKeyType.MetricKeyType.Histogram, number, MetricState.MetricState.Histogram>; | ||
/** | ||
* @since 1.0.0 | ||
* @category metrics | ||
*/ | ||
export declare const fiberActive: Metric.Counter<number>; | ||
//# sourceMappingURL=Metric.d.ts.map |
@@ -6,5 +6,5 @@ "use strict"; | ||
}); | ||
exports.zip = exports.withNow = exports.withConstantInput = exports.value = exports.update = exports.unsafeSnapshot = exports.trackSuccessWith = exports.trackSuccess = exports.trackErrorWith = exports.trackError = exports.trackDurationWith = exports.trackDuration = exports.trackDefectWith = exports.trackDefect = exports.trackAll = exports.timerWithBoundaries = exports.timer = exports.taggedWithLabelsInput = exports.taggedWithLabels = exports.tagged = exports.sync = exports.summaryTimestamp = exports.summary = exports.succeed = exports.snapshot = exports.set = exports.mapType = exports.map = exports.make = exports.incrementBy = exports.increment = exports.histogram = exports.globalMetricRegistry = exports.gauge = exports.fromMetricKey = exports.frequency = exports.fiberSuccesses = exports.fiberStarted = exports.fiberLifetimes = exports.fiberFailures = exports.counter = exports.contramap = exports.MetricTypeId = void 0; | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRuntime")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric")); | ||
exports.zip = exports.withNow = exports.withConstantInput = exports.value = exports.update = exports.unsafeSnapshot = exports.trackSuccessWith = exports.trackSuccess = exports.trackErrorWith = exports.trackError = exports.trackDurationWith = exports.trackDuration = exports.trackDefectWith = exports.trackDefect = exports.trackAll = exports.timerWithBoundaries = exports.timer = exports.taggedWithLabelsInput = exports.taggedWithLabels = exports.tagged = exports.sync = exports.summaryTimestamp = exports.summary = exports.succeed = exports.snapshot = exports.set = exports.mapType = exports.map = exports.make = exports.incrementBy = exports.increment = exports.histogram = exports.globalMetricRegistry = exports.gauge = exports.fromMetricKey = exports.frequency = exports.fiberSuccesses = exports.fiberStarted = exports.fiberLifetimes = exports.fiberFailures = exports.fiberActive = exports.counter = exports.contramap = exports.MetricTypeId = void 0; | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRuntime")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -339,3 +339,3 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
exports.unsafeSnapshot = unsafeSnapshot; | ||
const fiberStarted = fiberRuntime.fibersStarted; | ||
const fiberStarted = fiberRuntime.fiberStarted; | ||
/** | ||
@@ -359,3 +359,9 @@ * @since 1.0.0 | ||
const fiberLifetimes = fiberRuntime.fiberLifetimes; | ||
/** | ||
* @since 1.0.0 | ||
* @category metrics | ||
*/ | ||
exports.fiberLifetimes = fiberLifetimes; | ||
const fiberActive = fiberRuntime.fiberActive; | ||
exports.fiberActive = fiberActive; | ||
//# sourceMappingURL=Metric.js.map |
@@ -41,3 +41,7 @@ /** | ||
*/ | ||
export declare const linear: (start: number, width: number, count: number) => MetricBoundaries; | ||
export declare const linear: (options: { | ||
readonly start: number; | ||
readonly width: number; | ||
readonly count: number; | ||
}) => MetricBoundaries; | ||
/** | ||
@@ -50,3 +54,7 @@ * A helper method to create histogram bucket boundaries for a histogram | ||
*/ | ||
export declare const exponential: (start: number, factor: number, count: number) => MetricBoundaries; | ||
export declare const exponential: (options: { | ||
readonly start: number; | ||
readonly factor: number; | ||
readonly count: number; | ||
}) => MetricBoundaries; | ||
//# sourceMappingURL=Boundaries.d.ts.map |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.linear = exports.isMetricBoundaries = exports.fromChunk = exports.exponential = exports.MetricBoundariesTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/boundaries")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/boundaries")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -79,3 +79,6 @@ /** | ||
*/ | ||
export declare const make: <In, Out>(get: LazyArg<Out>, update: (input: In) => void) => MetricHook<In, Out>; | ||
export declare const make: <In, Out>(options: { | ||
readonly get: LazyArg<Out>; | ||
readonly update: (input: In) => void; | ||
}) => MetricHook<In, Out>; | ||
/** | ||
@@ -82,0 +85,0 @@ * @since 1.0.0 |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.summary = exports.onUpdate = exports.make = exports.histogram = exports.gauge = exports.frequency = exports.counter = exports.MetricHookTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/hook")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/hook")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -123,3 +123,10 @@ /** | ||
*/ | ||
export declare const summary: (name: string, maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>, description?: string) => MetricKey.Summary; | ||
export declare const summary: (options: { | ||
readonly name: string; | ||
readonly maxAge: Duration.DurationInput; | ||
readonly maxSize: number; | ||
readonly error: number; | ||
readonly quantiles: Chunk.Chunk<number>; | ||
readonly description?: string; | ||
}) => MetricKey.Summary; | ||
/** | ||
@@ -126,0 +133,0 @@ * Returns a new `MetricKey` with the specified tag appended. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.taggedWithLabels = exports.taggedWithLabelSet = exports.tagged = exports.summary = exports.isMetricKey = exports.histogram = exports.gauge = exports.frequency = exports.counter = exports.MetricKeyTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/key")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/key")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -181,3 +181,8 @@ /** | ||
*/ | ||
export declare const summary: (maxAge: Duration.Duration, maxSize: number, error: number, quantiles: Chunk.Chunk<number>) => MetricKeyType.Summary; | ||
export declare const summary: (options: { | ||
readonly maxAge: Duration.DurationInput; | ||
readonly maxSize: number; | ||
readonly error: number; | ||
readonly quantiles: Chunk.Chunk<number>; | ||
}) => MetricKeyType.Summary; | ||
/** | ||
@@ -184,0 +189,0 @@ * @since 1.0.0 |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.summary = exports.isSummaryKey = exports.isMetricKeyType = exports.isHistogramKey = exports.isGaugeKey = exports.isFrequencyKey = exports.isCounterKey = exports.histogram = exports.gauge = exports.frequency = exports.counter = exports.SummaryKeyTypeTypeId = exports.MetricKeyTypeTypeId = exports.HistogramKeyTypeTypeId = exports.GaugeKeyTypeTypeId = exports.FrequencyKeyTypeTypeId = exports.CounterKeyTypeTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/keyType")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/keyType")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.make = exports.isMetricLabel = exports.MetricLabelTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/label")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/label")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.unsafeMake = exports.make = exports.MetricPairTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/pair")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/pair")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -35,3 +35,3 @@ /** | ||
*/ | ||
poll(): Effect.Effect<R, E, In>; | ||
readonly poll: Effect.Effect<R, E, In>; | ||
} | ||
@@ -38,0 +38,0 @@ /** |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.zip = exports.retry = exports.pollAndUpdate = exports.poll = exports.make = exports.launch = exports.collectAll = exports.PollingMetricTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/polling")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/polling")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.make = exports.MetricRegistryTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/registry")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/registry")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -167,3 +167,9 @@ /** | ||
*/ | ||
export declare const histogram: (buckets: Chunk.Chunk<readonly [number, number]>, count: number, min: number, max: number, sum: number) => MetricState.Histogram; | ||
export declare const histogram: (options: { | ||
readonly buckets: Chunk.Chunk<readonly [number, number]>; | ||
readonly count: number; | ||
readonly min: number; | ||
readonly max: number; | ||
readonly sum: number; | ||
}) => MetricState.Histogram; | ||
/** | ||
@@ -173,3 +179,10 @@ * @since 1.0.0 | ||
*/ | ||
export declare const summary: (error: number, quantiles: Chunk.Chunk<readonly [number, Option.Option<number>]>, count: number, min: number, max: number, sum: number) => MetricState.Summary; | ||
export declare const summary: (options: { | ||
readonly error: number; | ||
readonly quantiles: Chunk.Chunk<readonly [number, Option.Option<number>]>; | ||
readonly count: number; | ||
readonly min: number; | ||
readonly max: number; | ||
readonly sum: number; | ||
}) => MetricState.Summary; | ||
/** | ||
@@ -176,0 +189,0 @@ * @since 1.0.0 |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.summary = exports.isSummaryState = exports.isMetricState = exports.isHistogramState = exports.isGaugeState = exports.isFrequencyState = exports.isCounterState = exports.histogram = exports.gauge = exports.frequency = exports.counter = exports.SummaryStateTypeId = exports.MetricStateTypeId = exports.HistogramStateTypeId = exports.GaugeStateTypeId = exports.FrequencyStateTypeId = exports.CounterStateTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/metric/state")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/metric/state")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
{ | ||
"name": "@effect/io", | ||
"version": "0.30.0", | ||
"version": "0.31.0", | ||
"license": "MIT", | ||
@@ -10,3 +10,3 @@ "repository": { | ||
"dependencies": { | ||
"@effect/data": "~0.12.10" | ||
"@effect/data": "^0.13.0" | ||
}, | ||
@@ -13,0 +13,0 @@ "publishConfig": { |
@@ -71,3 +71,6 @@ /** | ||
*/ | ||
export declare const make: <R, E, A>(get: Effect.Effect<R, E, A>, size: number) => Effect.Effect<Scope.Scope | R, never, Pool<E, A>>; | ||
export declare const make: <R, E, A>(options: { | ||
readonly acquire: Effect.Effect<R, E, A>; | ||
readonly size: number; | ||
}) => Effect.Effect<Scope.Scope | R, never, Pool<E, A>>; | ||
/** | ||
@@ -106,3 +109,8 @@ * Makes a new pool with the specified minimum and maximum sizes and time to | ||
*/ | ||
export declare const makeWithTTL: <R, E, A>(get: Effect.Effect<R, E, A>, min: number, max: number, timeToLive: Duration.Duration) => Effect.Effect<Scope.Scope | R, never, Pool<E, A>>; | ||
export declare const makeWithTTL: <R, E, A>(options: { | ||
readonly acquire: Effect.Effect<R, E, A>; | ||
readonly min: number; | ||
readonly max: number; | ||
readonly timeToLive: Duration.DurationInput; | ||
}) => Effect.Effect<Scope.Scope | R, never, Pool<E, A>>; | ||
/** | ||
@@ -109,0 +117,0 @@ * Retrieves an item from the pool in a scoped effect. Note that if |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.makeWithTTL = exports.make = exports.isPool = exports.invalidate = exports.get = exports.PoolTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/pool")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/pool")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -56,2 +56,6 @@ /** | ||
/** | ||
* Places one value in the queue when possible without needing the fiber runtime. | ||
*/ | ||
unsafeOffer(value: A): boolean; | ||
/** | ||
* For Bounded Queue: uses the `BackPressure` Strategy, places the values in | ||
@@ -107,6 +111,10 @@ * the queue and always returns true. If the queue has reached capacity, then | ||
/** | ||
* Returns the number of elements the queue can hold. | ||
* Returns the number of elements the queue can hold. | ||
*/ | ||
capacity(): number; | ||
/** | ||
* Returns false if shutdown has been called. | ||
*/ | ||
isActive(): boolean; | ||
/** | ||
* Retrieves the size of the queue, which is equal to the number of elements | ||
@@ -351,2 +359,12 @@ * in the queue. This may be negative if fibers are suspended waiting for | ||
/** | ||
* Places one value in the queue. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export declare const unsafeOffer: { | ||
<A>(value: A): (self: Enqueue<A>) => boolean; | ||
<A>(self: Enqueue<A>, value: A): boolean; | ||
}; | ||
/** | ||
* For Bounded Queue: uses the `BackPressure` Strategy, places the values in | ||
@@ -353,0 +371,0 @@ * the queue and always returns true. If the queue has reached capacity, then |
14
Queue.js
@@ -6,4 +6,4 @@ "use strict"; | ||
}); | ||
exports.unbounded = exports.takeUpTo = exports.takeN = exports.takeBetween = exports.takeAll = exports.take = exports.slidingStrategy = exports.sliding = exports.size = exports.shutdown = exports.poll = exports.offerAll = exports.offer = exports.isShutdown = exports.isQueue = exports.isFull = exports.isEnqueue = exports.isEmpty = exports.isDequeue = exports.droppingStrategy = exports.dropping = exports.capacity = exports.bounded = exports.backPressureStrategy = exports.awaitShutdown = exports.QueueStrategyTypeId = exports.EnqueueTypeId = exports.DequeueTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/queue")); | ||
exports.unsafeOffer = exports.unbounded = exports.takeUpTo = exports.takeN = exports.takeBetween = exports.takeAll = exports.take = exports.slidingStrategy = exports.sliding = exports.size = exports.shutdown = exports.poll = exports.offerAll = exports.offer = exports.isShutdown = exports.isQueue = exports.isFull = exports.isEnqueue = exports.isEmpty = exports.isDequeue = exports.droppingStrategy = exports.dropping = exports.capacity = exports.bounded = exports.backPressureStrategy = exports.awaitShutdown = exports.QueueStrategyTypeId = exports.EnqueueTypeId = exports.DequeueTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/queue")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -193,2 +193,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
/** | ||
* Places one value in the queue. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
exports.offer = offer; | ||
const unsafeOffer = internal.unsafeOffer; | ||
/** | ||
* For Bounded Queue: uses the `BackPressure` Strategy, places the values in | ||
@@ -211,3 +219,3 @@ * the queue and always returns true. If the queue has reached capacity, then | ||
*/ | ||
exports.offer = offer; | ||
exports.unsafeOffer = unsafeOffer; | ||
const offerAll = internal.offerAll; | ||
@@ -214,0 +222,0 @@ /** |
@@ -55,3 +55,3 @@ /** | ||
*/ | ||
export declare const next: (_: void) => Effect.Effect<never, never, number>; | ||
export declare const next: Effect.Effect<never, never, number>; | ||
/** | ||
@@ -63,3 +63,3 @@ * Returns the next integer value from the pseudo-random number generator. | ||
*/ | ||
export declare const nextInt: (_: void) => Effect.Effect<never, never, number>; | ||
export declare const nextInt: Effect.Effect<never, never, number>; | ||
/** | ||
@@ -71,3 +71,3 @@ * Returns the next boolean value from the pseudo-random number generator. | ||
*/ | ||
export declare const nextBoolean: (_: void) => Effect.Effect<never, never, boolean>; | ||
export declare const nextBoolean: Effect.Effect<never, never, boolean>; | ||
/** | ||
@@ -74,0 +74,0 @@ * Returns the next numeric value in the specified range from the |
@@ -7,4 +7,4 @@ "use strict"; | ||
exports.shuffle = exports.randomWith = exports.nextRange = exports.nextIntBetween = exports.nextInt = exports.nextBoolean = exports.next = exports.RandomTypeId = void 0; | ||
var defaultServices = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/defaultServices")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/random")); | ||
var defaultServices = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/defaultServices")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/random")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -11,0 +11,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.updateSomeAndGet = exports.updateSome = exports.updateAndGet = exports.update = exports.unsafeMake = exports.setAndGet = exports.set = exports.modifySome = exports.modify = exports.make = exports.getAndUpdateSome = exports.getAndUpdate = exports.getAndSet = exports.get = exports.RefTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/ref")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/ref")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,5 +7,5 @@ "use strict"; | ||
exports.updateSomeEffect = exports.updateSomeAndGetEffect = exports.updateSomeAndGet = exports.updateSome = exports.updateEffect = exports.updateAndGetEffect = exports.updateAndGet = exports.update = exports.unsafeMake = exports.setAndGet = exports.set = exports.modifySomeEffect = exports.modifySome = exports.modifyEffect = exports.modify = exports.make = exports.getAndUpdateSomeEffect = exports.getAndUpdateSome = exports.getAndUpdateEffect = exports.getAndUpdate = exports.getAndSet = exports.get = exports.SynchronizedTypeId = void 0; | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/effect/circular")); | ||
var ref = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/ref")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/synchronizedRef")); | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/effect/circular")); | ||
var ref = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/ref")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/synchronizedRef")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -12,0 +12,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -49,3 +49,6 @@ /** | ||
*/ | ||
export declare const auto: <Out extends Context.Tag<any, any>, In, E, R>(tag: Out, layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>>, policy: Schedule.Schedule<R, unknown, unknown>) => Layer.Layer<In | R, E, Reloadable<Context.Tag.Identifier<Out>>>; | ||
export declare const auto: <Out extends Context.Tag<any, any>, In, E, R>(tag: Out, options: { | ||
readonly layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>>; | ||
readonly schedule: Schedule.Schedule<R, unknown, unknown>; | ||
}) => Layer.Layer<In | R, E, Reloadable<Context.Tag.Identifier<Out>>>; | ||
/** | ||
@@ -59,3 +62,6 @@ * Makes a new reloadable service from a layer that describes the construction | ||
*/ | ||
export declare const autoFromConfig: <Out extends Context.Tag<any, any>, In, E, R>(tag: Out, layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>>, scheduleFromConfig: (context: Context.Context<In>) => Schedule.Schedule<R, unknown, unknown>) => Layer.Layer<In | R, E, Reloadable<Context.Tag.Identifier<Out>>>; | ||
export declare const autoFromConfig: <Out extends Context.Tag<any, any>, In, E, R>(tag: Out, options: { | ||
readonly layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>>; | ||
readonly scheduleFromConfig: (context: Context.Context<In>) => Schedule.Schedule<R, unknown, unknown>; | ||
}) => Layer.Layer<In | R, E, Reloadable<Context.Tag.Identifier<Out>>>; | ||
/** | ||
@@ -75,3 +81,5 @@ * Retrieves the current version of the reloadable service. | ||
*/ | ||
export declare const manual: <Out extends Context.Tag<any, any>, In, E>(tag: Out, layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>>) => Layer.Layer<In, E, Reloadable<Context.Tag.Identifier<Out>>>; | ||
export declare const manual: <Out extends Context.Tag<any, any>, In, E>(tag: Out, options: { | ||
readonly layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>>; | ||
}) => Layer.Layer<In, E, Reloadable<Context.Tag.Identifier<Out>>>; | ||
/** | ||
@@ -78,0 +86,0 @@ * Reloads the specified service. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.tag = exports.reloadFork = exports.reload = exports.manual = exports.get = exports.autoFromConfig = exports.auto = exports.ReloadableTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/reloadable")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/reloadable")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -181,3 +181,6 @@ /** | ||
*/ | ||
export declare const makeCache: (capacity: number, timeToLive: Duration) => Effect.Effect<never, never, Cache>; | ||
export declare const makeCache: (options: { | ||
readonly capacity: number; | ||
readonly timeToLive: Duration; | ||
}) => Effect.Effect<never, never, Cache>; | ||
/** | ||
@@ -240,5 +243,11 @@ * @since 1.0.0 | ||
*/ | ||
export declare const makeEntry: <A extends Request<any, any>>(request: A, result: Deferred<Request.Error<A>, Request.Success<A>>, listeners: Listeners, ownerId: FiberId, state: { | ||
completed: boolean; | ||
export declare const makeEntry: <A extends Request<any, any>>(options: { | ||
readonly request: A; | ||
readonly result: Deferred<Request.Error<A>, Request.Success<A>>; | ||
readonly listeners: Listeners; | ||
readonly ownerId: FiberId; | ||
readonly state: { | ||
completed: boolean; | ||
}; | ||
}) => Entry<A>; | ||
//# sourceMappingURL=Request.d.ts.map |
@@ -7,7 +7,7 @@ "use strict"; | ||
exports.tagged = exports.succeed = exports.of = exports.makeEntry = exports.makeCache = exports.isRequest = exports.isEntry = exports.interruptWhenPossible = exports.fail = exports.completeEffect = exports.complete = exports.RequestTypeId = exports.EntryTypeId = void 0; | ||
var _RequestBlock = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/blockedRequests")); | ||
var cache = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/cache")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRuntime")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/request")); | ||
var _RequestBlock = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/blockedRequests")); | ||
var cache = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/cache")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRuntime")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/request")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -91,6 +91,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
exports.succeed = succeed; | ||
const makeCache = (capacity, timeToLive) => cache.make(capacity, timeToLive, () => core.map(core.deferredMake(), handle => ({ | ||
listeners: new internal.Listeners(), | ||
handle | ||
}))); | ||
const makeCache = options => cache.make({ | ||
...options, | ||
lookup: () => core.map(core.deferredMake(), handle => ({ | ||
listeners: new internal.Listeners(), | ||
handle | ||
})) | ||
}); | ||
/** | ||
@@ -97,0 +100,0 @@ * @since 1.0.0 |
@@ -7,5 +7,5 @@ "use strict"; | ||
exports.single = exports.sequential = exports.reduce = exports.parallel = exports.mapRequestResolvers = exports.locally = exports.empty = exports.contramapContext = void 0; | ||
var _RequestBlock = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/blockedRequests")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var _dataSource = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/dataSource")); | ||
var _RequestBlock = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/blockedRequests")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
var _dataSource = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/dataSource")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -12,0 +12,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -184,3 +184,3 @@ /** | ||
*/ | ||
export declare const never: (_: void) => RequestResolver<never, never>; | ||
export declare const never: RequestResolver<never, never>; | ||
/** | ||
@@ -187,0 +187,0 @@ * Provides this data source with its required context. |
@@ -9,4 +9,4 @@ "use strict"; | ||
var Effect = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Effect")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/dataSource")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/dataSource")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -13,0 +13,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.refresh = exports.manual = exports.get = exports.auto = exports.ResourceTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/resource")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/resource")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -5,3 +5,2 @@ /** | ||
import type * as Context from "@effect/data/Context"; | ||
import type { Either } from "@effect/data/Either"; | ||
import type { Cause } from "@effect/io/Cause"; | ||
@@ -96,14 +95,2 @@ import type * as Effect from "@effect/io/Effect"; | ||
/** | ||
* Executes the effect synchronously returning either the result or a failure. | ||
* | ||
* Throwing in case of defects and interruptions. | ||
* | ||
* This method is effectful and should only be invoked at the edges of your | ||
* program. | ||
* | ||
* @since 1.0.0 | ||
* @category execution | ||
*/ | ||
export declare const runSyncEither: <R>(runtime: Runtime<R>) => <E, A>(effect: Effect.Effect<R, E, A>) => Either<E, A>; | ||
/** | ||
* Runs the `Effect`, returning a JavaScript `Promise` that will be resolved | ||
@@ -132,15 +119,3 @@ * with the value of the effect once the effect has been executed, or will be | ||
/** | ||
* Runs the `Effect`, returning a JavaScript `Promise` that will be resolved | ||
* with the either a success or a failure. The promise will be rejected in case | ||
* of defects and interruption. | ||
* | ||
* This method is effectful and should only be used at the edges of your | ||
* program. | ||
* | ||
* @since 1.0.0 | ||
* @category execution | ||
*/ | ||
export declare const runPromiseEither: <R>(runtime: Runtime<R>) => <E, A>(effect: Effect.Effect<R, E, A>) => Promise<Either<E, A>>; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
@@ -158,3 +133,7 @@ */ | ||
*/ | ||
export declare const make: <R>(context: Context.Context<R>, runtimeFlags: RuntimeFlags.RuntimeFlags, fiberRefs: FiberRefs.FiberRefs) => Runtime<R>; | ||
export declare const make: <R>(options: { | ||
readonly context: Context.Context<R>; | ||
readonly flags: RuntimeFlags.RuntimeFlags; | ||
readonly fiberRefs: FiberRefs.FiberRefs; | ||
}) => Runtime<R>; | ||
/** | ||
@@ -161,0 +140,0 @@ * @since 1.0.0 |
@@ -6,4 +6,4 @@ "use strict"; | ||
}); | ||
exports.runSyncExit = exports.runSyncEither = exports.runSync = exports.runPromiseExit = exports.runPromiseEither = exports.runPromise = exports.runFork = exports.runCallback = exports.makeFiberFailure = exports.make = exports.isFiberFailure = exports.isAsyncFiberException = exports.defaultRuntimeFlags = exports.defaultRuntime = exports.NodePrint = exports.FiberFailureId = exports.FiberFailureCauseId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/runtime")); | ||
exports.runSyncExit = exports.runSync = exports.runPromiseExit = exports.runPromise = exports.runFork = exports.runCallback = exports.makeFiberFailure = exports.make = exports.isFiberFailure = exports.isAsyncFiberException = exports.defaultRuntimeFlags = exports.defaultRuntime = exports.NodePrint = exports.FiberFailureId = exports.FiberFailureCauseId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/runtime")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -54,15 +54,2 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
/** | ||
* Executes the effect synchronously returning either the result or a failure. | ||
* | ||
* Throwing in case of defects and interruptions. | ||
* | ||
* This method is effectful and should only be invoked at the edges of your | ||
* program. | ||
* | ||
* @since 1.0.0 | ||
* @category execution | ||
*/ | ||
exports.runCallback = runCallback; | ||
const runSyncEither = internal.unsafeRunSyncEither; | ||
/** | ||
* Runs the `Effect`, returning a JavaScript `Promise` that will be resolved | ||
@@ -78,3 +65,3 @@ * with the value of the effect once the effect has been executed, or will be | ||
*/ | ||
exports.runSyncEither = runSyncEither; | ||
exports.runCallback = runCallback; | ||
const runPromise = internal.unsafeRunPromise; | ||
@@ -94,19 +81,6 @@ /** | ||
/** | ||
* Runs the `Effect`, returning a JavaScript `Promise` that will be resolved | ||
* with the either a success or a failure. The promise will be rejected in case | ||
* of defects and interruption. | ||
* | ||
* This method is effectful and should only be used at the edges of your | ||
* program. | ||
* | ||
* @since 1.0.0 | ||
* @category execution | ||
* @category constructors | ||
*/ | ||
exports.runPromiseExit = runPromiseExit; | ||
const runPromiseEither = internal.unsafeRunPromiseEither; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
exports.runPromiseEither = runPromiseEither; | ||
const defaultRuntime = internal.defaultRuntime; | ||
@@ -113,0 +87,0 @@ /** |
@@ -14,3 +14,2 @@ /** | ||
import type * as ScheduleDecision from "@effect/io/Schedule/Decision"; | ||
import type * as Interval from "@effect/io/Schedule/Interval"; | ||
import type * as Intervals from "@effect/io/Schedule/Intervals"; | ||
@@ -124,4 +123,4 @@ /** | ||
export declare const addDelay: { | ||
<Out>(f: (out: Out) => Duration.Duration): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, f: (out: Out) => Duration.Duration): Schedule<Env, In, Out>; | ||
<Out>(f: (out: Out) => Duration.DurationInput): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, f: (out: Out) => Duration.DurationInput): Schedule<Env, In, Out>; | ||
}; | ||
@@ -136,4 +135,4 @@ /** | ||
export declare const addDelayEffect: { | ||
<Out, Env2>(f: (out: Out) => Effect.Effect<Env2, never, Duration.Duration>): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out>; | ||
<Env, In, Out, Env2>(self: Schedule<Env, In, Out>, f: (out: Out) => Effect.Effect<Env2, never, Duration.Duration>): Schedule<Env | Env2, In, Out>; | ||
<Out, Env2>(f: (out: Out) => Effect.Effect<Env2, never, Duration.DurationInput>): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out>; | ||
<Env, In, Out, Env2>(self: Schedule<Env, In, Out>, f: (out: Out) => Effect.Effect<Env2, never, Duration.DurationInput>): Schedule<Env | Env2, In, Out>; | ||
}; | ||
@@ -214,24 +213,2 @@ /** | ||
/** | ||
* Returns a new schedule that allows choosing between feeding inputs to this | ||
* schedule, or feeding inputs to the specified schedule. | ||
* | ||
* @since 1.0.0 | ||
* @category alternatives | ||
*/ | ||
export declare const choose: { | ||
<Env2, In2, Out2>(that: Schedule<Env2, In2, Out2>): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, Either.Either<In, In2>, Either.Either<Out, Out2>>; | ||
<Env, In, Out, Env2, In2, Out2>(self: Schedule<Env, In, Out>, that: Schedule<Env2, In2, Out2>): Schedule<Env | Env2, Either.Either<In, In2>, Either.Either<Out, Out2>>; | ||
}; | ||
/** | ||
* Returns a new schedule that chooses between two schedules with a common | ||
* output. | ||
* | ||
* @since 1.0.0 | ||
* @category alternatives | ||
*/ | ||
export declare const chooseMerge: { | ||
<Env2, In2, Out2>(that: Schedule<Env2, In2, Out2>): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, Either.Either<In, In2>, Out2 | Out>; | ||
<Env, In, Out, Env2, In2, Out2>(self: Schedule<Env, In, Out>, that: Schedule<Env2, In2, Out2>): Schedule<Env | Env2, Either.Either<In, In2>, Out | Out2>; | ||
}; | ||
/** | ||
* A schedule that recurs anywhere, collecting all inputs into a `Chunk`. | ||
@@ -334,3 +311,3 @@ * | ||
*/ | ||
export declare const count: (_: void) => Schedule<never, unknown, number>; | ||
export declare const count: Schedule<never, unknown, number>; | ||
/** | ||
@@ -367,4 +344,4 @@ * Cron-like schedule that recurs every specified `day` of month. Won't recur | ||
export declare const delayed: { | ||
(f: (duration: Duration.Duration) => Duration.Duration): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, f: (duration: Duration.Duration) => Duration.Duration): Schedule<Env, In, Out>; | ||
(f: (duration: Duration.Duration) => Duration.DurationInput): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, f: (duration: Duration.Duration) => Duration.DurationInput): Schedule<Env, In, Out>; | ||
}; | ||
@@ -379,4 +356,4 @@ /** | ||
export declare const delayedEffect: { | ||
<Env2>(f: (duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.Duration>): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out>; | ||
<Env, In, Out, Env2>(self: Schedule<Env, In, Out>, f: (duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.Duration>): Schedule<Env | Env2, In, Out>; | ||
<Env2>(f: (duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.DurationInput>): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out>; | ||
<Env, In, Out, Env2>(self: Schedule<Env, In, Out>, f: (duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.DurationInput>): Schedule<Env | Env2, In, Out>; | ||
}; | ||
@@ -405,4 +382,10 @@ /** | ||
export declare const dimap: { | ||
<In, Out, In2, Out2>(f: (in2: In2) => In, g: (out: Out) => Out2): <Env>(self: Schedule<Env, In, Out>) => Schedule<Env, In2, Out2>; | ||
<Env, In, Out, In2, Out2>(self: Schedule<Env, In, Out>, f: (in2: In2) => In, g: (out: Out) => Out2): Schedule<Env, In2, Out2>; | ||
<In, Out, In2, Out2>(options: { | ||
readonly onInput: (in2: In2) => In; | ||
readonly onOutput: (out: Out) => Out2; | ||
}): <Env>(self: Schedule<Env, In, Out>) => Schedule<Env, In2, Out2>; | ||
<Env, In, Out, In2, Out2>(self: Schedule<Env, In, Out>, options: { | ||
readonly onInput: (in2: In2) => In; | ||
readonly onOutput: (out: Out) => Out2; | ||
}): Schedule<Env, In2, Out2>; | ||
}; | ||
@@ -416,4 +399,10 @@ /** | ||
export declare const dimapEffect: { | ||
<In2, Env2, In, Out, Env3, Out2>(f: (input: In2) => Effect.Effect<Env2, never, In>, g: (out: Out) => Effect.Effect<Env3, never, Out2>): <Env>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env3 | Env, In2, Out2>; | ||
<Env, In, Out, In2, Env2, Env3, Out2>(self: Schedule<Env, In, Out>, f: (input: In2) => Effect.Effect<Env2, never, In>, g: (out: Out) => Effect.Effect<Env3, never, Out2>): Schedule<Env | Env2 | Env3, In2, Out2>; | ||
<In2, Env2, In, Out, Env3, Out2>(options: { | ||
readonly onInput: (input: In2) => Effect.Effect<Env2, never, In>; | ||
readonly onOutput: (out: Out) => Effect.Effect<Env3, never, Out2>; | ||
}): <Env>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env3 | Env, In2, Out2>; | ||
<Env, In, Out, In2, Env2, Env3, Out2>(self: Schedule<Env, In, Out>, options: { | ||
readonly onInput: (input: In2) => Effect.Effect<Env2, never, In>; | ||
readonly onOutput: (out: Out) => Effect.Effect<Env3, never, Out2>; | ||
}): Schedule<Env | Env2 | Env3, In2, Out2>; | ||
}; | ||
@@ -435,3 +424,3 @@ /** | ||
*/ | ||
export declare const duration: (duration: Duration.Duration) => Schedule<never, unknown, Duration.Duration>; | ||
export declare const duration: (duration: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration>; | ||
/** | ||
@@ -465,3 +454,3 @@ * Returns a new schedule that performs a geometric union on the intervals | ||
*/ | ||
export declare const elapsed: (_: void) => Schedule<never, unknown, Duration.Duration>; | ||
export declare const elapsed: Schedule<never, unknown, Duration.Duration>; | ||
/** | ||
@@ -489,3 +478,3 @@ * Returns a new schedule that will run the specified finalizer as soon as the | ||
*/ | ||
export declare const exponential: (base: Duration.Duration, factor?: number) => Schedule<never, unknown, Duration.Duration>; | ||
export declare const exponential: (base: Duration.DurationInput, factor?: number) => Schedule<never, unknown, Duration.Duration>; | ||
/** | ||
@@ -499,3 +488,3 @@ * A schedule that always recurs, increasing delays by summing the preceding | ||
*/ | ||
export declare const fibonacci: (one: Duration.Duration) => Schedule<never, unknown, Duration.Duration>; | ||
export declare const fibonacci: (one: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration>; | ||
/** | ||
@@ -516,3 +505,3 @@ * A schedule that recurs on a fixed interval. Returns the number of | ||
*/ | ||
export declare const fixed: (interval: Duration.Duration) => Schedule<never, unknown, number>; | ||
export declare const fixed: (interval: Duration.DurationInput) => Schedule<never, unknown, number>; | ||
/** | ||
@@ -524,3 +513,3 @@ * A schedule that always recurs, producing a count of repeats: 0, 1, 2. | ||
*/ | ||
export declare const forever: (_: void) => Schedule<never, unknown, number>; | ||
export declare const forever: Schedule<never, unknown, number>; | ||
/** | ||
@@ -532,3 +521,3 @@ * A schedule that recurs once with the specified delay. | ||
*/ | ||
export declare const fromDelay: (delay: Duration.Duration) => Schedule<never, unknown, Duration.Duration>; | ||
export declare const fromDelay: (delay: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration>; | ||
/** | ||
@@ -542,3 +531,3 @@ * A schedule that recurs once for each of the specified durations, delaying | ||
*/ | ||
export declare const fromDelays: (delay: Duration.Duration, ...delays: Array<Duration.Duration>) => Schedule<never, unknown, Duration.Duration>; | ||
export declare const fromDelays: (delay: Duration.DurationInput, ...delays: Array<Duration.DurationInput>) => Schedule<never, unknown, Duration.Duration>; | ||
/** | ||
@@ -626,11 +615,2 @@ * A schedule that always recurs, mapping input values through the specified | ||
/** | ||
* Returns a new schedule that makes this schedule available on the `Left` | ||
* side of an `Either` input, allowing propagating some type `X` through this | ||
* channel on demand. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export declare const left: <Env, In, Out, X>(self: Schedule<Env, In, Out>) => Schedule<Env, Either.Either<In, X>, Either.Either<Out, X>>; | ||
/** | ||
* A schedule that always recurs, but will repeat on a linear time interval, | ||
@@ -643,3 +623,3 @@ * given by `base * n` where `n` is the number of repetitions so far. Returns | ||
*/ | ||
export declare const linear: (base: Duration.Duration) => Schedule<never, unknown, Duration.Duration>; | ||
export declare const linear: (base: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration>; | ||
/** | ||
@@ -686,4 +666,4 @@ * Returns a new schedule that maps the output of this schedule through the | ||
export declare const modifyDelay: { | ||
<Out>(f: (out: Out, duration: Duration.Duration) => Duration.Duration): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, f: (out: Out, duration: Duration.Duration) => Duration.Duration): Schedule<Env, In, Out>; | ||
<Out>(f: (out: Out, duration: Duration.Duration) => Duration.DurationInput): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, f: (out: Out, duration: Duration.Duration) => Duration.DurationInput): Schedule<Env, In, Out>; | ||
}; | ||
@@ -698,4 +678,4 @@ /** | ||
export declare const modifyDelayEffect: { | ||
<Out, Env2>(f: (out: Out, duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.Duration>): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out>; | ||
<Env, In, Out, Env2>(self: Schedule<Env, In, Out>, f: (out: Out, duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.Duration>): Schedule<Env | Env2, In, Out>; | ||
<Out, Env2>(f: (out: Out, duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.DurationInput>): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out>; | ||
<Env, In, Out, Env2>(self: Schedule<Env, In, Out>, f: (out: Out, duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.DurationInput>): Schedule<Env | Env2, In, Out>; | ||
}; | ||
@@ -720,3 +700,3 @@ /** | ||
*/ | ||
export declare const once: (_: void) => Schedule<never, unknown, void>; | ||
export declare const once: Schedule<never, unknown, void>; | ||
/** | ||
@@ -753,26 +733,2 @@ * Returns a new schedule that passes through the inputs of this schedule. | ||
/** | ||
* Returns a new schedule that reconsiders every decision made by this | ||
* schedule, possibly modifying the next interval and the output type in the | ||
* process. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export declare const reconsider: { | ||
<Out, Out2>(f: (out: Out, decision: ScheduleDecision.ScheduleDecision) => Either.Either<Out2, readonly [Out2, Interval.Interval]>): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out2>; | ||
<Env, In, Out, Out2>(self: Schedule<Env, In, Out>, f: (out: Out, decision: ScheduleDecision.ScheduleDecision) => Either.Either<Out2, readonly [Out2, Interval.Interval]>): Schedule<Env, In, Out2>; | ||
}; | ||
/** | ||
* Returns a new schedule that effectfully reconsiders every decision made by | ||
* this schedule, possibly modifying the next interval and the output type in | ||
* the process. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export declare const reconsiderEffect: { | ||
<Out, Env2, Out2>(f: (out: Out, decision: ScheduleDecision.ScheduleDecision) => Effect.Effect<Env2, never, Either.Either<Out2, readonly [Out2, Interval.Interval]>>): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out2>; | ||
<Env, In, Out, Env2, Out2>(self: Schedule<Env, In, Out>, f: (out: Out, decision: ScheduleDecision.ScheduleDecision) => Effect.Effect<Env2, never, Either.Either<Out2, readonly [Out2, Interval.Interval]>>): Schedule<Env | Env2, In, Out2>; | ||
}; | ||
/** | ||
* A schedule that recurs for until the predicate evaluates to true. | ||
@@ -792,9 +748,2 @@ * | ||
/** | ||
* A schedule that recurs for until the predicate is equal. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export declare const recurUntilEquals: <A>(value: A) => Schedule<never, A, A>; | ||
/** | ||
* A schedule that recurs for until the input value becomes applicable to | ||
@@ -813,3 +762,3 @@ * partial function and then map that value with given function. | ||
*/ | ||
export declare const recurUpTo: (duration: Duration.Duration) => Schedule<never, unknown, Duration.Duration>; | ||
export declare const recurUpTo: (duration: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration>; | ||
/** | ||
@@ -831,10 +780,2 @@ * A schedule that recurs for as long as the predicate evaluates to true. | ||
/** | ||
* A schedule that recurs for as long as the predicate is equal to the | ||
* specified value. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export declare const recurWhileEquals: <A>(value: A) => Schedule<never, A, A>; | ||
/** | ||
* A schedule spanning all time, which can be stepped only the specified | ||
@@ -874,3 +815,3 @@ * number of times before it terminates. | ||
*/ | ||
export declare const repeatForever: (_: void) => Schedule<never, unknown, number>; | ||
export declare const repeatForever: Schedule<never, unknown, number>; | ||
/** | ||
@@ -891,4 +832,4 @@ * Returns a new schedule that outputs the number of repetitions of this one. | ||
export declare const resetAfter: { | ||
(duration: Duration.Duration): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, duration: Duration.Duration): Schedule<Env, In, Out>; | ||
(duration: Duration.DurationInput): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, duration: Duration.DurationInput): Schedule<Env, In, Out>; | ||
}; | ||
@@ -907,11 +848,2 @@ /** | ||
/** | ||
* Returns a new schedule that makes this schedule available on the `Right` | ||
* side of an `Either` input, allowing propagating some type `X` through this | ||
* channel on demand. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export declare const right: <Env, In, Out, X>(self: Schedule<Env, In, Out>) => Schedule<Env, Either.Either<X, In>, Either.Either<X, Out>>; | ||
/** | ||
* Runs a schedule using the provided inputs, and collects all outputs. | ||
@@ -944,3 +876,3 @@ * | ||
*/ | ||
export declare const spaced: (duration: Duration.Duration) => Schedule<never, unknown, number>; | ||
export declare const spaced: (duration: Duration.DurationInput) => Schedule<never, unknown, number>; | ||
/** | ||
@@ -952,3 +884,3 @@ * A schedule that does not recur, it just stops. | ||
*/ | ||
export declare const stop: (_: void) => Schedule<never, unknown, void>; | ||
export declare const stop: Schedule<never, unknown, void>; | ||
/** | ||
@@ -1074,4 +1006,4 @@ * Returns a schedule that repeats one time, producing the specified constant | ||
export declare const upTo: { | ||
(duration: Duration.Duration): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, duration: Duration.Duration): Schedule<Env, In, Out>; | ||
(duration: Duration.DurationInput): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out>; | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, duration: Duration.DurationInput): Schedule<Env, In, Out>; | ||
}; | ||
@@ -1138,3 +1070,3 @@ /** | ||
*/ | ||
export declare const windowed: (interval: Duration.Duration) => Schedule<never, unknown, number>; | ||
export declare const windowed: (interval: Duration.DurationInput) => Schedule<never, unknown, number>; | ||
/** | ||
@@ -1141,0 +1073,0 @@ * The same as `intersect` but ignores the right output. |
@@ -6,5 +6,4 @@ "use strict"; | ||
}); | ||
exports.whileInputEffect = exports.whileInput = exports.upTo = exports.untilOutputEffect = exports.untilOutput = exports.untilInputEffect = exports.untilInput = exports.unionWith = exports.union = exports.unfold = exports.tapOutput = exports.tapInput = exports.sync = exports.succeed = exports.stop = exports.spaced = exports.secondOfMinute = exports.run = exports.right = exports.resetWhen = exports.resetAfter = exports.repetitions = exports.repeatForever = exports.reduceEffect = exports.reduce = exports.recurs = exports.recurWhileEquals = exports.recurWhileEffect = exports.recurWhile = exports.recurUpTo = exports.recurUntilOption = exports.recurUntilEquals = exports.recurUntilEffect = exports.recurUntil = exports.reconsiderEffect = exports.reconsider = exports.provideService = exports.provideContext = exports.passthrough = exports.once = exports.onDecision = exports.modifyDelayEffect = exports.modifyDelay = exports.minuteOfHour = exports.mapEffect = exports.map = exports.makeWithState = exports.linear = exports.left = exports.jitteredWith = exports.jittered = exports.intersectWith = exports.intersect = exports.identity = exports.hourOfDay = exports.fromFunction = exports.fromDelays = exports.fromDelay = exports.forever = exports.fixed = exports.fibonacci = exports.exponential = exports.ensuring = exports.elapsed = exports.eitherWith = exports.either = exports.duration = exports.driver = exports.dimapEffect = exports.dimap = exports.delays = exports.delayedSchedule = exports.delayedEffect = exports.delayed = exports.dayOfWeek = exports.dayOfMonth = exports.count = exports.contramapEffect = exports.contramapContext = exports.contramap = exports.compose = exports.collectWhileEffect = exports.collectWhile = exports.collectUntilEffect = exports.collectUntil = exports.collectAllOutputs = exports.collectAllInputs = exports.chooseMerge = exports.choose = exports.checkEffect = exports.check = exports.bothInOut = exports.asUnit = exports.as = exports.andThenEither = exports.andThen = exports.addDelayEffect = exports.addDelay = exports.ScheduleTypeId = exports.ScheduleDriverTypeId = void 0; | ||
exports.zipWith = exports.zipRight = exports.zipLeft = exports.windowed = exports.whileOutputEffect = exports.whileOutput = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/schedule")); | ||
exports.zipWith = exports.zipRight = exports.zipLeft = exports.windowed = exports.whileOutputEffect = exports.whileOutput = exports.whileInputEffect = exports.whileInput = exports.upTo = exports.untilOutputEffect = exports.untilOutput = exports.untilInputEffect = exports.untilInput = exports.unionWith = exports.union = exports.unfold = exports.tapOutput = exports.tapInput = exports.sync = exports.succeed = exports.stop = exports.spaced = exports.secondOfMinute = exports.run = exports.resetWhen = exports.resetAfter = exports.repetitions = exports.repeatForever = exports.reduceEffect = exports.reduce = exports.recurs = exports.recurWhileEffect = exports.recurWhile = exports.recurUpTo = exports.recurUntilOption = exports.recurUntilEffect = exports.recurUntil = exports.provideService = exports.provideContext = exports.passthrough = exports.once = exports.onDecision = exports.modifyDelayEffect = exports.modifyDelay = exports.minuteOfHour = exports.mapEffect = exports.map = exports.makeWithState = exports.linear = exports.jitteredWith = exports.jittered = exports.intersectWith = exports.intersect = exports.identity = exports.hourOfDay = exports.fromFunction = exports.fromDelays = exports.fromDelay = exports.forever = exports.fixed = exports.fibonacci = exports.exponential = exports.ensuring = exports.elapsed = exports.eitherWith = exports.either = exports.duration = exports.driver = exports.dimapEffect = exports.dimap = exports.delays = exports.delayedSchedule = exports.delayedEffect = exports.delayed = exports.dayOfWeek = exports.dayOfMonth = exports.count = exports.contramapEffect = exports.contramapContext = exports.contramap = exports.compose = exports.collectWhileEffect = exports.collectWhile = exports.collectUntilEffect = exports.collectUntil = exports.collectAllOutputs = exports.collectAllInputs = exports.checkEffect = exports.check = exports.bothInOut = exports.asUnit = exports.as = exports.andThenEither = exports.andThen = exports.addDelayEffect = exports.addDelay = exports.ScheduleTypeId = exports.ScheduleDriverTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/schedule")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -113,20 +112,2 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
/** | ||
* Returns a new schedule that allows choosing between feeding inputs to this | ||
* schedule, or feeding inputs to the specified schedule. | ||
* | ||
* @since 1.0.0 | ||
* @category alternatives | ||
*/ | ||
exports.checkEffect = checkEffect; | ||
const choose = internal.choose; | ||
/** | ||
* Returns a new schedule that chooses between two schedules with a common | ||
* output. | ||
* | ||
* @since 1.0.0 | ||
* @category alternatives | ||
*/ | ||
exports.choose = choose; | ||
const chooseMerge = internal.chooseMerge; | ||
/** | ||
* A schedule that recurs anywhere, collecting all inputs into a `Chunk`. | ||
@@ -137,3 +118,3 @@ * | ||
*/ | ||
exports.chooseMerge = chooseMerge; | ||
exports.checkEffect = checkEffect; | ||
const collectAllInputs = internal.collectAllInputs; | ||
@@ -499,12 +480,2 @@ /** | ||
/** | ||
* Returns a new schedule that makes this schedule available on the `Left` | ||
* side of an `Either` input, allowing propagating some type `X` through this | ||
* channel on demand. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
exports.jitteredWith = jitteredWith; | ||
const left = internal.left; | ||
/** | ||
* A schedule that always recurs, but will repeat on a linear time interval, | ||
@@ -517,3 +488,3 @@ * given by `base * n` where `n` is the number of repetitions so far. Returns | ||
*/ | ||
exports.left = left; | ||
exports.jitteredWith = jitteredWith; | ||
const linear = internal.linear; | ||
@@ -614,5 +585,3 @@ /** | ||
/** | ||
* Returns a new schedule that reconsiders every decision made by this | ||
* schedule, possibly modifying the next interval and the output type in the | ||
* process. | ||
* A schedule that recurs for until the predicate evaluates to true. | ||
* | ||
@@ -623,20 +592,2 @@ * @since 1.0.0 | ||
exports.provideService = provideService; | ||
const reconsider = internal.reconsider; | ||
/** | ||
* Returns a new schedule that effectfully reconsiders every decision made by | ||
* this schedule, possibly modifying the next interval and the output type in | ||
* the process. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
exports.reconsider = reconsider; | ||
const reconsiderEffect = internal.reconsiderEffect; | ||
/** | ||
* A schedule that recurs for until the predicate evaluates to true. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
exports.reconsiderEffect = reconsiderEffect; | ||
const recurUntil = internal.recurUntil; | ||
@@ -652,10 +603,2 @@ /** | ||
/** | ||
* A schedule that recurs for until the predicate is equal. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
exports.recurUntilEffect = recurUntilEffect; | ||
const recurUntilEquals = internal.recurUntilEquals; | ||
/** | ||
* A schedule that recurs for until the input value becomes applicable to | ||
@@ -667,3 +610,3 @@ * partial function and then map that value with given function. | ||
*/ | ||
exports.recurUntilEquals = recurUntilEquals; | ||
exports.recurUntilEffect = recurUntilEffect; | ||
const recurUntilOption = internal.recurUntilOption; | ||
@@ -696,11 +639,2 @@ /** | ||
/** | ||
* A schedule that recurs for as long as the predicate is equal to the | ||
* specified value. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
exports.recurWhileEffect = recurWhileEffect; | ||
const recurWhileEquals = internal.recurWhileEquals; | ||
/** | ||
* A schedule spanning all time, which can be stepped only the specified | ||
@@ -712,3 +646,3 @@ * number of times before it terminates. | ||
*/ | ||
exports.recurWhileEquals = recurWhileEquals; | ||
exports.recurWhileEffect = recurWhileEffect; | ||
const recurs = internal.recurs; | ||
@@ -767,12 +701,2 @@ /** | ||
/** | ||
* Returns a new schedule that makes this schedule available on the `Right` | ||
* side of an `Either` input, allowing propagating some type `X` through this | ||
* channel on demand. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
exports.resetWhen = resetWhen; | ||
const right = internal.right; | ||
/** | ||
* Runs a schedule using the provided inputs, and collects all outputs. | ||
@@ -783,3 +707,3 @@ * | ||
*/ | ||
exports.right = right; | ||
exports.resetWhen = resetWhen; | ||
const run = internal.run; | ||
@@ -786,0 +710,0 @@ /** |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.isDone = exports.isContinue = exports.done = exports.continueWith = exports.continue = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/schedule/decision")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/schedule/decision")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.union = exports.size = exports.min = exports.max = exports.make = exports.lessThan = exports.isNonEmpty = exports.isEmpty = exports.intersect = exports.empty = exports.before = exports.after = exports.IntervalTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/schedule/interval")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/schedule/interval")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.union = exports.start = exports.max = exports.make = exports.lessThan = exports.isNonEmpty = exports.intersect = exports.fromIterable = exports.end = exports.empty = exports.IntervalsTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/schedule/intervals")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/schedule/intervals")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -14,8 +14,22 @@ /** | ||
export interface Scheduler { | ||
scheduleTask(task: Task): void; | ||
scheduleTask(task: Task, priority: number): void; | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category utils | ||
*/ | ||
export declare class PriorityBuckets<T = Task> { | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
buckets: Array<[number, Array<T>]>; | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
scheduleTask(task: T, priority: number): void; | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export declare class MixedScheduler implements Scheduler { | ||
@@ -33,3 +47,3 @@ /** | ||
*/ | ||
tasks: Array<Task>; | ||
tasks: PriorityBuckets<Task>; | ||
constructor( | ||
@@ -51,3 +65,3 @@ /** | ||
*/ | ||
scheduleTask(task: Task): void; | ||
scheduleTask(task: Task, priority: number): void; | ||
} | ||
@@ -61,3 +75,3 @@ /** | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
@@ -68,3 +82,3 @@ export declare class SyncScheduler implements Scheduler { | ||
*/ | ||
tasks: Array<Task>; | ||
tasks: PriorityBuckets<Task>; | ||
/** | ||
@@ -77,3 +91,3 @@ * @since 1.0.0 | ||
*/ | ||
scheduleTask(task: Task): void; | ||
scheduleTask(task: Task, priority: number): void; | ||
/** | ||
@@ -86,3 +100,3 @@ * @since 1.0.0 | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
@@ -93,3 +107,3 @@ export declare class ControlledScheduler implements Scheduler { | ||
*/ | ||
tasks: Array<Task>; | ||
tasks: PriorityBuckets<Task>; | ||
/** | ||
@@ -102,3 +116,3 @@ * @since 1.0.0 | ||
*/ | ||
scheduleTask(task: Task): void; | ||
scheduleTask(task: Task, priority: number): void; | ||
/** | ||
@@ -111,5 +125,25 @@ * @since 1.0.0 | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
export declare const timeBased: Scheduler; | ||
export declare const makeMatrix: (...record: Array<[number, Scheduler]>) => Scheduler; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export declare const make: (scheduleTask: Scheduler["scheduleTask"]) => Scheduler; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export declare const makeBatched: (callback: (runBatch: () => void) => void) => Scheduler; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export declare const timer: (ms: number) => Scheduler; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export declare const timerBatched: (ms: number) => Scheduler; | ||
//# sourceMappingURL=Scheduler.d.ts.map |
180
Scheduler.js
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.timeBased = exports.defaultScheduler = exports.SyncScheduler = exports.MixedScheduler = exports.ControlledScheduler = void 0; | ||
exports.timerBatched = exports.timer = exports.makeMatrix = exports.makeBatched = exports.make = exports.defaultScheduler = exports.SyncScheduler = exports.PriorityBuckets = exports.MixedScheduler = exports.ControlledScheduler = void 0; | ||
var _Global = /*#__PURE__*/require("@effect/data/Global"); | ||
@@ -15,4 +15,44 @@ /** | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category utils | ||
*/ | ||
class PriorityBuckets { | ||
constructor() { | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
this.buckets = []; | ||
} | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
scheduleTask(task, priority) { | ||
let bucket = undefined; | ||
let index; | ||
for (index = 0; index < this.buckets.length; index++) { | ||
if (this.buckets[index][0] <= priority) { | ||
bucket = this.buckets[index]; | ||
} else { | ||
break; | ||
} | ||
} | ||
if (bucket) { | ||
bucket[1].push(task); | ||
} else { | ||
const newBuckets = []; | ||
for (let i = 0; i < index; i++) { | ||
newBuckets.push(this.buckets[i]); | ||
} | ||
newBuckets.push([priority, [task]]); | ||
for (let i = index; i < this.buckets.length; i++) { | ||
newBuckets.push(this.buckets[i]); | ||
} | ||
this.buckets = newBuckets; | ||
} | ||
} | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
exports.PriorityBuckets = PriorityBuckets; | ||
class MixedScheduler { | ||
@@ -32,3 +72,3 @@ constructor( | ||
*/ | ||
this.tasks = []; | ||
this.tasks = new PriorityBuckets(); | ||
} | ||
@@ -39,8 +79,10 @@ /** | ||
starveInternal(depth) { | ||
const toRun = this.tasks; | ||
this.tasks = []; | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i](); | ||
const tasks = this.tasks.buckets; | ||
this.tasks.buckets = []; | ||
for (const [_, toRun] of tasks) { | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i](); | ||
} | ||
} | ||
if (this.tasks.length === 0) { | ||
if (this.tasks.buckets.length === 0) { | ||
this.running = false; | ||
@@ -64,4 +106,4 @@ } else { | ||
*/ | ||
scheduleTask(task) { | ||
this.tasks.push(task); | ||
scheduleTask(task, priority) { | ||
this.tasks.scheduleTask(task, priority); | ||
if (!this.running) { | ||
@@ -81,3 +123,3 @@ this.running = true; | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
@@ -90,3 +132,3 @@ exports.defaultScheduler = defaultScheduler; | ||
*/ | ||
this.tasks = []; | ||
this.tasks = new PriorityBuckets(); | ||
/** | ||
@@ -100,7 +142,7 @@ * @since 1.0.0 | ||
*/ | ||
scheduleTask(task) { | ||
scheduleTask(task, priority) { | ||
if (this.deferred) { | ||
defaultScheduler.scheduleTask(task); | ||
defaultScheduler.scheduleTask(task, priority); | ||
} else { | ||
this.tasks.push(task); | ||
this.tasks.scheduleTask(task, priority); | ||
} | ||
@@ -112,7 +154,9 @@ } | ||
flush() { | ||
while (this.tasks.length > 0) { | ||
const toRun = this.tasks; | ||
this.tasks = []; | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i](); | ||
while (this.tasks.buckets.length > 0) { | ||
const tasks = this.tasks.buckets; | ||
this.tasks.buckets = []; | ||
for (const [_, toRun] of tasks) { | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i](); | ||
} | ||
} | ||
@@ -125,3 +169,3 @@ } | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
@@ -134,3 +178,3 @@ exports.SyncScheduler = SyncScheduler; | ||
*/ | ||
this.tasks = []; | ||
this.tasks = new PriorityBuckets(); | ||
/** | ||
@@ -144,7 +188,7 @@ * @since 1.0.0 | ||
*/ | ||
scheduleTask(task) { | ||
scheduleTask(task, priority) { | ||
if (this.deferred) { | ||
defaultScheduler.scheduleTask(task); | ||
defaultScheduler.scheduleTask(task, priority); | ||
} else { | ||
this.tasks.push(task); | ||
this.tasks.scheduleTask(task, priority); | ||
} | ||
@@ -156,6 +200,8 @@ } | ||
step() { | ||
const toRun = this.tasks; | ||
this.tasks = []; | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i](); | ||
const tasks = this.tasks.buckets; | ||
this.tasks.buckets = []; | ||
for (const [_, toRun] of tasks) { | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i](); | ||
} | ||
} | ||
@@ -166,13 +212,73 @@ } | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
exports.ControlledScheduler = ControlledScheduler; | ||
const timeBased = { | ||
scheduleTask(task) { | ||
setTimeout(() => { | ||
task(); | ||
}, 0); | ||
} | ||
const makeMatrix = (...record) => { | ||
const index = record.sort(([p0], [p1]) => p0 < p1 ? -1 : p0 > p1 ? 1 : 0); | ||
return { | ||
scheduleTask(task, priority) { | ||
let scheduler = undefined; | ||
for (const i of index) { | ||
if (priority >= i[0]) { | ||
scheduler = i[1]; | ||
} else { | ||
return (scheduler ?? defaultScheduler).scheduleTask(task, priority); | ||
} | ||
} | ||
return (scheduler ?? defaultScheduler).scheduleTask(task, priority); | ||
} | ||
}; | ||
}; | ||
exports.timeBased = timeBased; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
exports.makeMatrix = makeMatrix; | ||
const make = scheduleTask => ({ | ||
scheduleTask | ||
}); | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
exports.make = make; | ||
const makeBatched = callback => { | ||
let running = false; | ||
const tasks = new PriorityBuckets(); | ||
const starveInternal = () => { | ||
const tasksToRun = tasks.buckets; | ||
tasks.buckets = []; | ||
for (const [_, toRun] of tasksToRun) { | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i](); | ||
} | ||
} | ||
if (tasks.buckets.length === 0) { | ||
running = false; | ||
} else { | ||
starve(); | ||
} | ||
}; | ||
const starve = () => callback(starveInternal); | ||
return make((task, priority) => { | ||
tasks.scheduleTask(task, priority); | ||
if (!running) { | ||
running = true; | ||
starve(); | ||
} | ||
}); | ||
}; | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
exports.makeBatched = makeBatched; | ||
const timer = ms => make(task => setTimeout(task, ms)); | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
exports.timer = timer; | ||
const timerBatched = ms => makeBatched(task => setTimeout(task, ms)); | ||
exports.timerBatched = timerBatched; | ||
//# sourceMappingURL=Scheduler.js.map |
@@ -7,4 +7,4 @@ "use strict"; | ||
exports.use = exports.make = exports.fork = exports.extend = exports.close = exports.addFinalizerExit = exports.addFinalizer = exports.ScopeTypeId = exports.Scope = exports.CloseableScopeTypeId = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/fiberRuntime")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
var fiberRuntime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/fiberRuntime")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -11,0 +11,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -100,3 +100,7 @@ /** | ||
*/ | ||
export declare const make: <Key, Environment, Error, Value>(capacity: number, timeToLive: Duration.Duration, lookup: Lookup<Key, Environment, Error, Value>) => Effect.Effect<Scope.Scope | Environment, never, ScopedCache<Key, Error, Value>>; | ||
export declare const make: <Key, Environment, Error, Value>(options: { | ||
readonly lookup: Lookup<Key, Environment, Error, Value>; | ||
readonly capacity: number; | ||
readonly timeToLive: Duration.DurationInput; | ||
}) => Effect.Effect<Scope.Scope | Environment, never, ScopedCache<Key, Error, Value>>; | ||
/** | ||
@@ -110,3 +114,7 @@ * Constructs a new cache with the specified capacity, time to live, and | ||
*/ | ||
export declare const makeWith: <Key, Environment, Error, Value>(capacity: number, lookup: Lookup<Key, Environment, Error, Value>, timeToLive: (exit: Exit.Exit<Error, Value>) => Duration.Duration) => Effect.Effect<Scope.Scope | Environment, never, ScopedCache<Key, Error, Value>>; | ||
export declare const makeWith: <Key, Environment, Error, Value>(options: { | ||
readonly capacity: number; | ||
readonly lookup: Lookup<Key, Environment, Error, Value>; | ||
readonly timeToLive: (exit: Exit.Exit<Error, Value>) => Duration.DurationInput; | ||
}) => Effect.Effect<Scope.Scope | Environment, never, ScopedCache<Key, Error, Value>>; | ||
/** | ||
@@ -113,0 +121,0 @@ * Similar to `Cache.Lookup`, but executes the lookup function within a `Scope`. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.makeWith = exports.make = exports.ScopedCacheTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/scopedCache")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/scopedCache")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.set = exports.make = exports.get = exports.fromAcquire = exports.ScopedRefTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/scopedRef")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/scopedRef")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -10,0 +10,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -9,3 +9,3 @@ /** | ||
import type * as Exit from "@effect/io/Exit" | ||
import * as internal from "@effect/io/internal_effect_untraced/cache" | ||
import * as internal from "@effect/io/internal/cache" | ||
@@ -175,5 +175,7 @@ /** | ||
export const make: <Key, Environment, Error, Value>( | ||
capacity: number, | ||
timeToLive: Duration.Duration, | ||
lookup: Lookup<Key, Environment, Error, Value> | ||
options: { | ||
readonly capacity: number | ||
readonly timeToLive: Duration.DurationInput | ||
readonly lookup: Lookup<Key, Environment, Error, Value> | ||
} | ||
) => Effect.Effect<Environment, never, Cache<Key, Error, Value>> = internal.make | ||
@@ -190,5 +192,7 @@ | ||
export const makeWith: <Key, Environment, Error, Value>( | ||
capacity: number, | ||
lookup: Lookup<Key, Environment, Error, Value>, | ||
timeToLive: (exit: Exit.Exit<Error, Value>) => Duration.Duration | ||
options: { | ||
readonly capacity: number | ||
readonly lookup: Lookup<Key, Environment, Error, Value> | ||
readonly timeToLive: (exit: Exit.Exit<Error, Value>) => Duration.DurationInput | ||
} | ||
) => Effect.Effect<Environment, never, Cache<Key, Error, Value>> = internal.makeWith | ||
@@ -215,3 +219,9 @@ | ||
*/ | ||
export const makeCacheStats: (hits: number, misses: number, size: number) => CacheStats = internal.makeCacheStats | ||
export const makeCacheStats: ( | ||
options: { | ||
readonly hits: number | ||
readonly misses: number | ||
readonly size: number | ||
} | ||
) => CacheStats = internal.makeCacheStats | ||
@@ -218,0 +228,0 @@ /** |
@@ -25,3 +25,2 @@ /** | ||
import type * as Chunk from "@effect/data/Chunk" | ||
import type { SourceLocation } from "@effect/data/Debug" | ||
import type * as Either from "@effect/data/Either" | ||
@@ -33,4 +32,4 @@ import type * as Equal from "@effect/data/Equal" | ||
import type * as FiberId from "@effect/io/Fiber/Id" | ||
import * as internal from "@effect/io/internal_effect_untraced/cause" | ||
import * as _pretty from "@effect/io/internal_effect_untraced/cause-pretty" | ||
import * as internal from "@effect/io/internal/cause" | ||
import * as _pretty from "@effect/io/internal/cause-pretty" | ||
@@ -159,28 +158,4 @@ /** | ||
* @since 1.0.0 | ||
* @category models | ||
*/ | ||
export interface StackAnnotationConstructor { | ||
new(stack: Chunk.Chunk<SourceLocation>, seq: number): StackAnnotation | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category models | ||
*/ | ||
export interface StackAnnotation { | ||
readonly [StackAnnotationTypeId]: StackAnnotationTypeId | ||
readonly stack: Chunk.Chunk<SourceLocation> | ||
readonly seq: number | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category stack | ||
*/ | ||
export const StackAnnotation: StackAnnotationConstructor = internal.StackAnnotation | ||
/** | ||
* @since 1.0.0 | ||
* @category stack | ||
*/ | ||
export const globalErrorSeq = internal.globalErrorSeq | ||
@@ -757,19 +732,23 @@ | ||
<Z, E>( | ||
emptyCase: Z, | ||
failCase: (error: E) => Z, | ||
dieCase: (defect: unknown) => Z, | ||
interruptCase: (fiberId: FiberId.FiberId) => Z, | ||
annotatedCase: (value: Z, annotation: unknown) => Z, | ||
sequentialCase: (left: Z, right: Z) => Z, | ||
parallelCase: (left: Z, right: Z) => Z | ||
options: { | ||
readonly onEmpty: Z | ||
readonly onFail: (error: E) => Z | ||
readonly onDie: (defect: unknown) => Z | ||
readonly onInterrupt: (fiberId: FiberId.FiberId) => Z | ||
readonly onAnnotated: (value: Z, annotation: unknown) => Z | ||
readonly onSequential: (left: Z, right: Z) => Z | ||
readonly onParallel: (left: Z, right: Z) => Z | ||
} | ||
): (self: Cause<E>) => Z | ||
<Z, E>( | ||
self: Cause<E>, | ||
emptyCase: Z, | ||
failCase: (error: E) => Z, | ||
dieCase: (defect: unknown) => Z, | ||
interruptCase: (fiberId: FiberId.FiberId) => Z, | ||
annotatedCase: (value: Z, annotation: unknown) => Z, | ||
sequentialCase: (left: Z, right: Z) => Z, | ||
parallelCase: (left: Z, right: Z) => Z | ||
options: { | ||
readonly onEmpty: Z | ||
readonly onFail: (error: E) => Z | ||
readonly onDie: (defect: unknown) => Z | ||
readonly onInterrupt: (fiberId: FiberId.FiberId) => Z | ||
readonly onAnnotated: (value: Z, annotation: unknown) => Z | ||
readonly onSequential: (left: Z, right: Z) => Z | ||
readonly onParallel: (left: Z, right: Z) => Z | ||
} | ||
): Z | ||
@@ -885,10 +864,2 @@ } = internal.match | ||
/** | ||
* Checks if an annotation is a StackAnnotation | ||
* | ||
* @since 1.0.0 | ||
* @category guards | ||
*/ | ||
export const isStackAnnotation: (u: unknown) => u is StackAnnotation = internal.isStackAnnotation | ||
/** | ||
* Removes any annotation from the cause | ||
@@ -895,0 +866,0 @@ * |
@@ -7,4 +7,4 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/clock" | ||
import * as defaultServices from "@effect/io/internal_effect_untraced/defaultServices" | ||
import * as internal from "@effect/io/internal/clock" | ||
import * as defaultServices from "@effect/io/internal/defaultServices" | ||
@@ -39,3 +39,3 @@ /** | ||
*/ | ||
currentTimeMillis(): Effect.Effect<never, never, number> | ||
readonly currentTimeMillis: Effect.Effect<never, never, number> | ||
/** | ||
@@ -48,3 +48,3 @@ * Unsafely returns the current time in nanoseconds. | ||
*/ | ||
currentTimeNanos(): Effect.Effect<never, never, bigint> | ||
readonly currentTimeNanos: Effect.Effect<never, never, bigint> | ||
/** | ||
@@ -89,3 +89,3 @@ * Asynchronously sleeps for the specified duration. | ||
*/ | ||
export const sleep: (duration: Duration.Duration) => Effect.Effect<never, never, void> = defaultServices.sleep | ||
export const sleep: (duration: Duration.DurationInput) => Effect.Effect<never, never, void> = defaultServices.sleep | ||
@@ -96,3 +96,3 @@ /** | ||
*/ | ||
export const currentTimeMillis: (_: void) => Effect.Effect<never, never, number> = defaultServices.currentTimeMillis | ||
export const currentTimeMillis: Effect.Effect<never, never, number> = defaultServices.currentTimeMillis | ||
@@ -103,3 +103,3 @@ /** | ||
*/ | ||
export const currentTimeNanos: (_: void) => Effect.Effect<never, never, bigint> = defaultServices.currentTimeNanos | ||
export const currentTimeNanos: Effect.Effect<never, never, bigint> = defaultServices.currentTimeNanos | ||
@@ -106,0 +106,0 @@ /** |
@@ -13,3 +13,3 @@ /** | ||
import type * as ConfigSecret from "@effect/io/Config/Secret" | ||
import * as internal from "@effect/io/internal_effect_untraced/config" | ||
import * as internal from "@effect/io/internal/config" | ||
import type * as LogLevel from "@effect/io/Logger/Level" | ||
@@ -275,4 +275,15 @@ | ||
export const orElseIf: { | ||
<A2>(that: LazyArg<Config<A2>>, condition: Predicate<ConfigError.ConfigError>): <A>(self: Config<A>) => Config<A> | ||
<A, A2>(self: Config<A>, that: LazyArg<Config<A2>>, condition: Predicate<ConfigError.ConfigError>): Config<A> | ||
<A2>( | ||
options: { | ||
readonly if: Predicate<ConfigError.ConfigError> | ||
readonly orElse: LazyArg<Config<A2>> | ||
} | ||
): <A>(self: Config<A>) => Config<A> | ||
<A, A2>( | ||
self: Config<A>, | ||
options: { | ||
readonly if: Predicate<ConfigError.ConfigError> | ||
readonly orElse: LazyArg<Config<A2>> | ||
} | ||
): Config<A> | ||
} = internal.orElseIf | ||
@@ -392,6 +403,23 @@ | ||
export const validate: { | ||
<A, B extends A>(message: string, f: Refinement<A, B>): (self: Config<A>) => Config<B> | ||
<A>(message: string, f: Predicate<A>): (self: Config<A>) => Config<A> | ||
<A, B extends A>(self: Config<A>, message: string, f: Refinement<A, B>): Config<B> | ||
<A>(self: Config<A>, message: string, f: Predicate<A>): Config<A> | ||
<A, B extends A>( | ||
options: { | ||
readonly message: string | ||
readonly validation: Refinement<A, B> | ||
} | ||
): (self: Config<A>) => Config<B> | ||
<A>(options: { | ||
readonly message: string | ||
readonly validation: Predicate<A> | ||
}): (self: Config<A>) => Config<A> | ||
<A, B extends A>( | ||
self: Config<A>, | ||
options: { | ||
readonly message: string | ||
readonly validation: Refinement<A, B> | ||
} | ||
): Config<B> | ||
<A>(self: Config<A>, options: { | ||
readonly message: string | ||
readonly validation: Predicate<A> | ||
}): Config<A> | ||
} = internal.validate | ||
@@ -398,0 +426,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
import type * as Cause from "@effect/io/Cause" | ||
import * as internal from "@effect/io/internal_effect_untraced/configError" | ||
import * as internal from "@effect/io/internal/configError" | ||
@@ -8,0 +8,0 @@ /** |
@@ -11,3 +11,3 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/configProvider" | ||
import * as internal from "@effect/io/internal/configProvider" | ||
@@ -81,7 +81,9 @@ /** | ||
load<A>( | ||
path: Array<string>, | ||
path: ReadonlyArray<string>, | ||
config: Config.Config.Primitive<A>, | ||
split?: boolean | ||
): Effect.Effect<never, ConfigError.ConfigError, Array<A>> | ||
enumerateChildren(path: Array<string>): Effect.Effect<never, ConfigError.ConfigError, HashSet.HashSet<string>> | ||
): Effect.Effect<never, ConfigError.ConfigError, ReadonlyArray<A>> | ||
enumerateChildren( | ||
path: ReadonlyArray<string> | ||
): Effect.Effect<never, ConfigError.ConfigError, HashSet.HashSet<string>> | ||
} | ||
@@ -123,4 +125,6 @@ | ||
export const make: ( | ||
load: <A>(config: Config.Config<A>) => Effect.Effect<never, ConfigError.ConfigError, A>, | ||
flattened: ConfigProvider.Flat | ||
options: { | ||
readonly load: <A>(config: Config.Config<A>) => Effect.Effect<never, ConfigError.ConfigError, A> | ||
readonly flattened: ConfigProvider.Flat | ||
} | ||
) => ConfigProvider = internal.make | ||
@@ -134,12 +138,13 @@ | ||
*/ | ||
export const makeFlat: ( | ||
load: <A>( | ||
path: Array<string>, | ||
config: Config.Config.Primitive<A> | ||
) => Effect.Effect<never, ConfigError.ConfigError, Array<A>>, | ||
enumerateChildren: ( | ||
path: Array<string> | ||
) => Effect.Effect<never, ConfigError.ConfigError, HashSet.HashSet<string>>, | ||
patch: PathPatch.PathPatch | ||
) => ConfigProvider.Flat = internal.makeFlat | ||
export const makeFlat: (options: { | ||
readonly load: <A>( | ||
path: ReadonlyArray<string>, | ||
config: Config.Config.Primitive<A>, | ||
split: boolean | ||
) => Effect.Effect<never, ConfigError.ConfigError, ReadonlyArray<A>> | ||
readonly enumerateChildren: ( | ||
path: ReadonlyArray<string> | ||
) => Effect.Effect<never, ConfigError.ConfigError, HashSet.HashSet<string>> | ||
readonly patch: PathPatch.PathPatch | ||
}) => ConfigProvider.Flat = internal.makeFlat | ||
@@ -292,4 +297,4 @@ /** | ||
export const within: { | ||
(path: Array<string>, f: (self: ConfigProvider) => ConfigProvider): (self: ConfigProvider) => ConfigProvider | ||
(self: ConfigProvider, path: Array<string>, f: (self: ConfigProvider) => ConfigProvider): ConfigProvider | ||
(path: ReadonlyArray<string>, f: (self: ConfigProvider) => ConfigProvider): (self: ConfigProvider) => ConfigProvider | ||
(self: ConfigProvider, path: ReadonlyArray<string>, f: (self: ConfigProvider) => ConfigProvider): ConfigProvider | ||
} = internal.within |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as internal from "@effect/io/internal_effect_untraced/configProvider/pathPatch" | ||
import * as internal from "@effect/io/internal/configProvider/pathPatch" | ||
@@ -6,0 +6,0 @@ /** |
@@ -6,3 +6,3 @@ /** | ||
import type * as Equal from "@effect/data/Equal" | ||
import * as internal from "@effect/io/internal_effect_untraced/configSecret" | ||
import * as internal from "@effect/io/internal/configSecret" | ||
@@ -9,0 +9,0 @@ /** |
@@ -8,3 +8,3 @@ /** | ||
import type * as FiberRef from "@effect/io/FiberRef" | ||
import * as internal from "@effect/io/internal_effect_untraced/defaultServices" | ||
import * as internal from "@effect/io/internal/defaultServices" | ||
import type * as Random from "@effect/io/Random" | ||
@@ -11,0 +11,0 @@ import type * as Tracer from "@effect/io/Tracer" |
@@ -11,4 +11,4 @@ /** | ||
import type * as FiberId from "@effect/io/Fiber/Id" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as internal from "@effect/io/internal_effect_untraced/deferred" | ||
import * as core from "@effect/io/internal/core" | ||
import * as internal from "@effect/io/internal/deferred" | ||
@@ -15,0 +15,0 @@ /** |
@@ -5,3 +5,3 @@ /** | ||
import type { LazyArg } from "@effect/data/Function" | ||
import * as internal from "@effect/io/internal_effect_untraced/executionStrategy" | ||
import * as internal from "@effect/io/internal/executionStrategy" | ||
@@ -8,0 +8,0 @@ /** |
@@ -11,3 +11,3 @@ /** | ||
import type * as FiberId from "@effect/io/Fiber/Id" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as core from "@effect/io/internal/core" | ||
@@ -142,22 +142,11 @@ /** | ||
* | ||
* **Note**: `Exit.collectAll` combines `Cause` values sequentially. | ||
* | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export const collectAll: <E, A>(exits: Iterable<Exit<E, A>>) => Option.Option<Exit<E, Array<A>>> = core.exitCollectAll | ||
export const all: <E, A>( | ||
exits: Iterable<Exit<E, A>>, | ||
options?: { readonly parallel?: boolean } | undefined | ||
) => Option.Option<Exit<E, Array<A>>> = core.exitCollectAll | ||
/** | ||
* Collects all of the specified exit values into a `Some<Exit<E, List<A>>>`. If | ||
* the provided iterable contains no elements, `None` will be returned. | ||
* | ||
* **Note**: `Exit.collectAll` combines `Cause` values in parallel. | ||
* | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export const collectAllPar: <E, A>(exits: Iterable<Exit<E, A>>) => Option.Option<Exit<E, Array<A>>> = | ||
core.exitCollectAllPar | ||
/** | ||
* Constructs a new `Exit.Failure` from the specified unrecoverable defect. | ||
@@ -295,4 +284,9 @@ * | ||
export const mapBoth: { | ||
<E, A, E2, A2>(onFailure: (e: E) => E2, onSuccess: (a: A) => A2): (self: Exit<E, A>) => Exit<E2, A2> | ||
<E, A, E2, A2>(self: Exit<E, A>, onFailure: (e: E) => E2, onSuccess: (a: A) => A2): Exit<E2, A2> | ||
<E, A, E2, A2>( | ||
options: { readonly onFailure: (e: E) => E2; readonly onSuccess: (a: A) => A2 } | ||
): (self: Exit<E, A>) => Exit<E2, A2> | ||
<E, A, E2, A2>( | ||
self: Exit<E, A>, | ||
options: { readonly onFailure: (e: E) => E2; readonly onSuccess: (a: A) => A2 } | ||
): Exit<E2, A2> | ||
} = core.exitMapBoth | ||
@@ -329,4 +323,9 @@ | ||
export const match: { | ||
<E, A, Z>(onFailure: (cause: Cause.Cause<E>) => Z, onSuccess: (a: A) => Z): (self: Exit<E, A>) => Z | ||
<E, A, Z>(self: Exit<E, A>, onFailure: (cause: Cause.Cause<E>) => Z, onSuccess: (a: A) => Z): Z | ||
<E, A, Z>( | ||
options: { readonly onFailure: (cause: Cause.Cause<E>) => Z; readonly onSuccess: (a: A) => Z } | ||
): (self: Exit<E, A>) => Z | ||
<E, A, Z>( | ||
self: Exit<E, A>, | ||
options: { readonly onFailure: (cause: Cause.Cause<E>) => Z; readonly onSuccess: (a: A) => Z } | ||
): Z | ||
} = core.exitMatch | ||
@@ -340,9 +339,13 @@ | ||
<E, A, R, E2, A2, R2, E3, A3>( | ||
onFailure: (cause: Cause.Cause<E>) => Effect.Effect<R, E2, A2>, | ||
onSuccess: (a: A) => Effect.Effect<R2, E3, A3> | ||
options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Effect.Effect<R, E2, A2> | ||
readonly onSuccess: (a: A) => Effect.Effect<R2, E3, A3> | ||
} | ||
): (self: Exit<E, A>) => Effect.Effect<R | R2, E3, A3> | ||
<E, A, R, E2, A2, R2, E3, A3>( | ||
self: Exit<E, A>, | ||
onFailure: (cause: Cause.Cause<E>) => Effect.Effect<R, E2, A2>, | ||
onSuccess: (a: A) => Effect.Effect<R2, E3, A3> | ||
options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Effect.Effect<R, E2, A2> | ||
readonly onSuccess: (a: A) => Effect.Effect<R2, E3, A3> | ||
} | ||
): Effect.Effect<R | R2, E2 | E3, A2 | A3> | ||
@@ -373,3 +376,3 @@ } = core.exitMatchEffect | ||
*/ | ||
export const unit: (_: void) => Exit<never, void> = core.exitUnit | ||
export const unit: Exit<never, void> = core.exitUnit | ||
@@ -458,4 +461,6 @@ /** | ||
that: Exit<E2, B>, | ||
f: (a: A, b: B) => C, | ||
g: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2> | ||
options: { | ||
readonly onSuccess: (a: A, b: B) => C | ||
readonly onFailure: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2> | ||
} | ||
): (self: Exit<E, A>) => Exit<E | E2, C> | ||
@@ -465,5 +470,7 @@ <E, E2, A, B, C>( | ||
that: Exit<E2, B>, | ||
f: (a: A, b: B) => C, | ||
g: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2> | ||
options: { | ||
readonly onSuccess: (a: A, b: B) => C | ||
readonly onFailure: (cause: Cause.Cause<E>, cause2: Cause.Cause<E2>) => Cause.Cause<E | E2> | ||
} | ||
): Exit<E | E2, C> | ||
} = core.exitZipWith |
@@ -7,3 +7,3 @@ /** | ||
import type * as Option from "@effect/data/Option" | ||
import type * as order from "@effect/data/typeclass/Order" | ||
import type * as order from "@effect/data/Order" | ||
import type * as Cause from "@effect/io/Cause" | ||
@@ -16,6 +16,6 @@ import type * as Effect from "@effect/io/Effect" | ||
import type * as FiberRefs from "@effect/io/FiberRefs" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as circular from "@effect/io/internal_effect_untraced/effect/circular" | ||
import * as internal from "@effect/io/internal_effect_untraced/fiber" | ||
import * as fiberRuntime from "@effect/io/internal_effect_untraced/fiberRuntime" | ||
import * as core from "@effect/io/internal/core" | ||
import * as circular from "@effect/io/internal/effect/circular" | ||
import * as internal from "@effect/io/internal/fiber" | ||
import * as fiberRuntime from "@effect/io/internal/fiberRuntime" | ||
import type * as Scope from "@effect/io/Scope" | ||
@@ -283,3 +283,3 @@ | ||
*/ | ||
export const collectAll: <E, A>(fibers: Iterable<Fiber<E, A>>) => Fiber<E, Array<A>> = fiberRuntime.fiberCollectAll | ||
export const all: <E, A>(fibers: Iterable<Fiber<E, A>>) => Fiber<E, ReadonlyArray<A>> = fiberRuntime.fiberAll | ||
@@ -490,9 +490,7 @@ /** | ||
<E, A, Z>( | ||
onFiber: (fiber: Fiber<E, A>) => Z, | ||
onRuntimeFiber: (fiber: RuntimeFiber<E, A>) => Z | ||
options: { readonly onFiber: (fiber: Fiber<E, A>) => Z; readonly onRuntimeFiber: (fiber: RuntimeFiber<E, A>) => Z } | ||
): (self: Fiber<E, A>) => Z | ||
<E, A, Z>( | ||
self: Fiber<E, A>, | ||
onFiber: (fiber: Fiber<E, A>) => Z, | ||
onRuntimeFiber: (fiber: RuntimeFiber<E, A>) => Z | ||
options: { readonly onFiber: (fiber: Fiber<E, A>) => Z; readonly onRuntimeFiber: (fiber: RuntimeFiber<E, A>) => Z } | ||
): Z | ||
@@ -507,3 +505,3 @@ } = internal.match | ||
*/ | ||
export const never: (_: void) => Fiber<never, never> = internal.never | ||
export const never: Fiber<never, never> = internal.never | ||
@@ -560,3 +558,3 @@ /** | ||
*/ | ||
export const roots: (_: void) => Effect.Effect<never, never, Array<RuntimeFiber<any, any>>> = internal.roots | ||
export const roots: Effect.Effect<never, never, Array<RuntimeFiber<any, any>>> = internal.roots | ||
@@ -604,3 +602,3 @@ /** | ||
*/ | ||
export const unit: (_: void) => Fiber<never, void> = internal.unit | ||
export const unit: Fiber<never, void> = internal.unit | ||
@@ -607,0 +605,0 @@ /** |
@@ -7,3 +7,3 @@ /** | ||
import type * as Option from "@effect/data/Option" | ||
import * as internal from "@effect/io/internal_effect_untraced/fiberId" | ||
import * as internal from "@effect/io/internal/fiberId" | ||
@@ -10,0 +10,0 @@ /** |
@@ -7,4 +7,4 @@ /** | ||
import type * as RuntimeFlagsPatch from "@effect/io/Fiber/Runtime/Flags/Patch" | ||
import * as circular from "@effect/io/internal_effect_untraced/layer/circular" | ||
import * as internal from "@effect/io/internal_effect_untraced/runtimeFlags" | ||
import * as circular from "@effect/io/internal/layer/circular" | ||
import * as internal from "@effect/io/internal/runtimeFlags" | ||
import type * as Layer from "@effect/io/Layer" | ||
@@ -122,3 +122,3 @@ | ||
*/ | ||
export const differ: (_: void) => Differ.Differ<RuntimeFlags, RuntimeFlagsPatch.RuntimeFlagsPatch> = internal.differ | ||
export const differ: Differ.Differ<RuntimeFlags, RuntimeFlagsPatch.RuntimeFlagsPatch> = internal.differ | ||
@@ -151,4 +151,3 @@ /** | ||
*/ | ||
export const disableCooperativeYielding: (_: void) => Layer.Layer<never, never, never> = | ||
circular.disableCooperativeYielding | ||
export const disableCooperativeYielding: Layer.Layer<never, never, never> = circular.disableCooperativeYielding | ||
@@ -159,3 +158,3 @@ /** | ||
*/ | ||
export const disableInterruption: (_: void) => Layer.Layer<never, never, never> = circular.disableInterruption | ||
export const disableInterruption: Layer.Layer<never, never, never> = circular.disableInterruption | ||
@@ -166,3 +165,3 @@ /** | ||
*/ | ||
export const disableOpSupervision: (_: void) => Layer.Layer<never, never, never> = circular.disableOpSupervision | ||
export const disableOpSupervision: Layer.Layer<never, never, never> = circular.disableOpSupervision | ||
@@ -173,3 +172,3 @@ /** | ||
*/ | ||
export const disableRuntimeMetrics: (_: void) => Layer.Layer<never, never, never> = circular.disableRuntimeMetrics | ||
export const disableRuntimeMetrics: Layer.Layer<never, never, never> = circular.disableRuntimeMetrics | ||
@@ -180,3 +179,3 @@ /** | ||
*/ | ||
export const disableWindDown: (_: void) => Layer.Layer<never, never, never> = circular.disableWindDown | ||
export const disableWindDown: Layer.Layer<never, never, never> = circular.disableWindDown | ||
@@ -209,4 +208,3 @@ /** | ||
*/ | ||
export const enableCooperativeYielding: (_: void) => Layer.Layer<never, never, never> = | ||
circular.enableCooperativeYielding | ||
export const enableCooperativeYielding: Layer.Layer<never, never, never> = circular.enableCooperativeYielding | ||
@@ -217,3 +215,3 @@ /** | ||
*/ | ||
export const enableInterruption: (_: void) => Layer.Layer<never, never, never> = circular.enableInterruption | ||
export const enableInterruption: Layer.Layer<never, never, never> = circular.enableInterruption | ||
@@ -224,3 +222,3 @@ /** | ||
*/ | ||
export const enableOpSupervision: (_: void) => Layer.Layer<never, never, never> = circular.enableOpSupervision | ||
export const enableOpSupervision: Layer.Layer<never, never, never> = circular.enableOpSupervision | ||
@@ -231,3 +229,3 @@ /** | ||
*/ | ||
export const enableRuntimeMetrics: (_: void) => Layer.Layer<never, never, never> = circular.enableRuntimeMetrics | ||
export const enableRuntimeMetrics: Layer.Layer<never, never, never> = circular.enableRuntimeMetrics | ||
@@ -238,3 +236,3 @@ /** | ||
*/ | ||
export const enableWindDown: (_: void) => Layer.Layer<never, never, never> = circular.enableWindDown | ||
export const enableWindDown: Layer.Layer<never, never, never> = circular.enableWindDown | ||
@@ -241,0 +239,0 @@ /** |
@@ -5,4 +5,4 @@ /** | ||
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags" | ||
import * as runtimeFlags from "@effect/io/internal_effect_untraced/runtimeFlags" | ||
import * as internal from "@effect/io/internal_effect_untraced/runtimeFlagsPatch" | ||
import * as runtimeFlags from "@effect/io/internal/runtimeFlags" | ||
import * as internal from "@effect/io/internal/runtimeFlagsPatch" | ||
@@ -9,0 +9,0 @@ /** |
@@ -7,3 +7,3 @@ /** | ||
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags" | ||
import * as internal from "@effect/io/internal_effect_untraced/fiberStatus" | ||
import * as internal from "@effect/io/internal/fiberStatus" | ||
@@ -10,0 +10,0 @@ /** |
@@ -14,5 +14,5 @@ /** | ||
import type * as RuntimeFlags from "@effect/io/Fiber/Runtime/Flags" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as fiberRuntime from "@effect/io/internal_effect_untraced/fiberRuntime" | ||
import * as query from "@effect/io/internal_effect_untraced/query" | ||
import * as core from "@effect/io/internal/core" | ||
import * as fiberRuntime from "@effect/io/internal/fiberRuntime" | ||
import * as query from "@effect/io/internal/query" | ||
import type * as Logger from "@effect/io/Logger" | ||
@@ -75,4 +75,6 @@ import type * as LogLevel from "@effect/io/Logger/Level" | ||
initial: A, | ||
fork?: (a: A) => A, | ||
join?: (left: A, right: A) => A | ||
options?: { | ||
readonly fork?: (a: A) => A | ||
readonly join?: (left: A, right: A) => A | ||
} | ||
) => Effect.Effect<Scope.Scope, never, FiberRef<A>> = fiberRuntime.fiberRefMake | ||
@@ -109,4 +111,6 @@ | ||
initial: Value, | ||
fork?: (a: Value) => Value, | ||
join?: (left: Value, right: Value) => Value | ||
options?: { | ||
readonly fork?: (a: Value) => Value | ||
readonly join?: (left: Value, right: Value) => Value | ||
} | ||
) => FiberRef<Value> = core.fiberRefUnsafeMake | ||
@@ -141,5 +145,7 @@ | ||
initial: Value, | ||
differ: Differ.Differ<Value, Patch>, | ||
fork: Patch, | ||
join?: (oldV: Value, newV: Value) => Value | ||
options: { | ||
readonly differ: Differ.Differ<Value, Patch> | ||
readonly fork: Patch | ||
readonly join?: (oldV: Value, newV: Value) => Value | ||
} | ||
) => FiberRef<Value> = core.fiberRefUnsafeMakePatch | ||
@@ -273,3 +279,3 @@ | ||
*/ | ||
export const currentRequestBatchingEnabled: FiberRef<boolean> = fiberRuntime.currentRequestBatchingEnabled | ||
export const currentRequestBatchingEnabled: FiberRef<boolean> = core.currentRequestBatchingEnabled | ||
@@ -298,2 +304,8 @@ /** | ||
*/ | ||
export const currentSchedulingPriority: FiberRef<number> = core.currentSchedulingPriority | ||
/** | ||
* @since 1.0.0 | ||
* @category fiberRefs | ||
*/ | ||
export const currentMaxFiberOps: FiberRef<number> = core.currentMaxFiberOps | ||
@@ -347,8 +359,2 @@ | ||
*/ | ||
export const currentParallelism: FiberRef<Option.Option<number>> = core.currentParallelism | ||
/** | ||
* @since 1.0.0 | ||
* @category fiberRefs | ||
*/ | ||
export const currentScheduler: FiberRef<Scheduler.Scheduler> = core.currentScheduler | ||
@@ -366,3 +372,3 @@ | ||
*/ | ||
export const currentTags: FiberRef<HashSet.HashSet<MetricLabel.MetricLabel>> = core.currentTags | ||
export const currentMetricLabels: FiberRef<HashSet.HashSet<MetricLabel.MetricLabel>> = core.currentMetricLabels | ||
@@ -369,0 +375,0 @@ /** |
@@ -10,3 +10,3 @@ /** | ||
import type * as FiberRef from "@effect/io/FiberRef" | ||
import * as internal from "@effect/io/internal_effect_untraced/fiberRefs" | ||
import * as internal from "@effect/io/internal/fiberRefs" | ||
@@ -127,4 +127,17 @@ /** | ||
export const updatedAs: { | ||
<A>(fiberId: FiberId.Runtime, fiberRef: FiberRef.FiberRef<A>, value: A): (self: FiberRefs) => FiberRefs | ||
<A>(self: FiberRefs, fiberId: FiberId.Runtime, fiberRef: FiberRef.FiberRef<A>, value: A): FiberRefs | ||
<A>( | ||
options: { | ||
readonly fiberId: FiberId.Runtime | ||
readonly fiberRef: FiberRef.FiberRef<A> | ||
readonly value: A | ||
} | ||
): (self: FiberRefs) => FiberRefs | ||
<A>( | ||
self: FiberRefs, | ||
options: { | ||
readonly fiberId: FiberId.Runtime | ||
readonly fiberRef: FiberRef.FiberRef<A> | ||
readonly value: A | ||
} | ||
): FiberRefs | ||
} = internal.updatedAs | ||
@@ -131,0 +144,0 @@ |
@@ -7,3 +7,3 @@ /** | ||
import type * as FiberRefs from "@effect/io/FiberRefs" | ||
import * as internal from "@effect/io/internal_effect_untraced/fiberRefs/patch" | ||
import * as internal from "@effect/io/internal/fiberRefs/patch" | ||
@@ -72,3 +72,3 @@ /** | ||
*/ | ||
export const empty: (_: void) => FiberRefsPatch = internal.empty | ||
export const empty: FiberRefsPatch = internal.empty | ||
@@ -75,0 +75,0 @@ /** |
@@ -5,3 +5,3 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/hub" | ||
import * as internal from "@effect/io/internal/hub" | ||
import type * as Queue from "@effect/io/Queue" | ||
@@ -8,0 +8,0 @@ import type * as Scope from "@effect/io/Scope" |
@@ -6,3 +6,3 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/keyedPool" | ||
import * as internal from "@effect/io/internal/keyedPool" | ||
import type * as Scope from "@effect/io/Scope" | ||
@@ -72,6 +72,5 @@ | ||
*/ | ||
export const makeSized: <K, R, E, A>( | ||
get: (key: K) => Effect.Effect<R, E, A>, | ||
size: number | ||
) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>> = internal.makeSized | ||
export const make: <K, R, E, A>( | ||
options: { readonly acquire: (key: K) => Effect.Effect<R, E, A>; readonly size: number } | ||
) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>> = internal.make | ||
@@ -89,6 +88,5 @@ /** | ||
*/ | ||
export const makeSizedWith: <K, R, E, A>( | ||
get: (key: K) => Effect.Effect<R, E, A>, | ||
size: (key: K) => number | ||
) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>> = internal.makeSizedWith | ||
export const makeWith: <K, R, E, A>( | ||
options: { readonly acquire: (key: K) => Effect.Effect<R, E, A>; readonly size: (key: K) => number } | ||
) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>> = internal.makeWith | ||
@@ -108,8 +106,10 @@ /** | ||
*/ | ||
export const makeSizedWithTTL: <K, R, E, A>( | ||
get: (key: K) => Effect.Effect<R, E, A>, | ||
min: (key: K) => number, | ||
max: (key: K) => number, | ||
timeToLive: Duration.Duration | ||
) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>> = internal.makeSizedWithTTL | ||
export const makeWithTTL: <K, R, E, A>( | ||
options: { | ||
readonly acquire: (key: K) => Effect.Effect<R, E, A> | ||
readonly min: (key: K) => number | ||
readonly max: (key: K) => number | ||
readonly timeToLive: Duration.DurationInput | ||
} | ||
) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>> = internal.makeWithTTL | ||
@@ -129,8 +129,10 @@ /** | ||
*/ | ||
export const makeSizedWithTTLBy: <K, R, E, A>( | ||
get: (key: K) => Effect.Effect<R, E, A>, | ||
min: (key: K) => number, | ||
max: (key: K) => number, | ||
timeToLive: (key: K) => Duration.Duration | ||
) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>> = internal.makeSizedWithTTLBy | ||
export const makeWithTTLBy: <K, R, E, A>( | ||
options: { | ||
readonly acquire: (key: K) => Effect.Effect<R, E, A> | ||
readonly min: (key: K) => number | ||
readonly max: (key: K) => number | ||
readonly timeToLive: (key: K) => Duration.DurationInput | ||
} | ||
) => Effect.Effect<Scope.Scope | R, never, KeyedPool<K, E, A>> = internal.makeWithTTLBy | ||
@@ -137,0 +139,0 @@ /** |
@@ -25,3 +25,3 @@ /** | ||
import type { FiberRef } from "@effect/io/FiberRef" | ||
import * as internal from "@effect/io/internal_effect_untraced/layer" | ||
import * as internal from "@effect/io/internal/layer" | ||
import type * as Runtime from "@effect/io/Runtime" | ||
@@ -190,6 +190,11 @@ import type * as Schedule from "@effect/io/Schedule" | ||
*/ | ||
export const effect: <T extends Context.Tag<any, any>, R, E>( | ||
tag: T, | ||
effect: Effect.Effect<R, E, Context.Tag.Service<T>> | ||
) => Layer<R, E, Context.Tag.Identifier<T>> = internal.fromEffect | ||
export const effect: { | ||
<T extends Context.Tag<any, any>>( | ||
tag: T | ||
): <R, E>(effect: Effect.Effect<R, E, Context.Tag.Service<T>>) => Layer<R, E, Context.Tag.Identifier<T>> | ||
<T extends Context.Tag<any, any>, R, E>( | ||
tag: T, | ||
effect: Effect.Effect<R, E, Context.Tag.Service<T>> | ||
): Layer<R, E, Context.Tag.Identifier<T>> | ||
} = internal.fromEffect | ||
@@ -348,13 +353,17 @@ /** | ||
*/ | ||
export const matchLayer: { | ||
export const match: { | ||
<E, R2, E2, A2, A, R3, E3, A3>( | ||
onFailure: (error: E) => Layer<R2, E2, A2>, | ||
onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3> | ||
options: { | ||
readonly onFailure: (error: E) => Layer<R2, E2, A2> | ||
readonly onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3> | ||
} | ||
): <R>(self: Layer<R, E, A>) => Layer<R2 | R3 | R, E2 | E3, A2 & A3> | ||
<R, E, A, R2, E2, A2, R3, E3, A3>( | ||
self: Layer<R, E, A>, | ||
onFailure: (error: E) => Layer<R2, E2, A2>, | ||
onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3> | ||
options: { | ||
readonly onFailure: (error: E) => Layer<R2, E2, A2> | ||
readonly onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3> | ||
} | ||
): Layer<R | R2 | R3, E2 | E3, A2 & A3> | ||
} = internal.matchLayer | ||
} = internal.match | ||
@@ -369,13 +378,17 @@ /** | ||
*/ | ||
export const matchCauseLayer: { | ||
export const matchCause: { | ||
<E, A, R2, E2, A2, R3, E3, A3>( | ||
onFailure: (cause: Cause.Cause<E>) => Layer<R2, E2, A2>, | ||
onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3> | ||
options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Layer<R2, E2, A2> | ||
readonly onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3> | ||
} | ||
): <R>(self: Layer<R, E, A>) => Layer<R2 | R3 | R, E2 | E3, A2 & A3> | ||
<R, E, A, R2, E2, A2, R3, E3, A3>( | ||
self: Layer<R, E, A>, | ||
onFailure: (cause: Cause.Cause<E>) => Layer<R2, E2, A2>, | ||
onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3> | ||
options: { | ||
readonly onFailure: (cause: Cause.Cause<E>) => Layer<R2, E2, A2> | ||
readonly onSuccess: (context: Context.Context<A>) => Layer<R3, E3, A3> | ||
} | ||
): Layer<R | R2 | R3, E2 | E3, A2 & A3> | ||
} = internal.matchCauseLayer | ||
} = internal.matchCause | ||
@@ -589,3 +602,3 @@ /** | ||
*/ | ||
export const scope: (_: void) => Layer<never, never, Scope.CloseableScope> = internal.scope | ||
export const scope: Layer<never, never, Scope.CloseableScope> = internal.scope | ||
@@ -598,6 +611,13 @@ /** | ||
*/ | ||
export const scoped: <T extends Context.Tag<any, any>, R, E>( | ||
tag: T, | ||
effect: Effect.Effect<R, E, Context.Tag.Service<T>> | ||
) => Layer<Exclude<R, Scope.Scope>, E, Context.Tag.Identifier<T>> = internal.scoped | ||
export const scoped: { | ||
<T extends Context.Tag<any, any>>( | ||
tag: T | ||
): <R, E>( | ||
effect: Effect.Effect<R, E, Context.Tag.Service<T>> | ||
) => Layer<Exclude<R, Scope.Scope>, E, Context.Tag.Identifier<T>> | ||
<T extends Context.Tag<any, any>, R, E>( | ||
tag: T, | ||
effect: Effect.Effect<R, E, Context.Tag.Service<T>> | ||
): Layer<Exclude<R, Scope.Scope>, E, Context.Tag.Identifier<T>> | ||
} = internal.scoped | ||
@@ -641,6 +661,11 @@ /** | ||
*/ | ||
export const succeed: <T extends Context.Tag<any, any>>( | ||
tag: T, | ||
resource: Context.Tag.Service<T> | ||
) => Layer<never, never, Context.Tag.Identifier<T>> = internal.succeed | ||
export const succeed: { | ||
<T extends Context.Tag<any, any>>( | ||
tag: T | ||
): (resource: Context.Tag.Service<T>) => Layer<never, never, Context.Tag.Identifier<T>> | ||
<T extends Context.Tag<any, any>>( | ||
tag: T, | ||
resource: Context.Tag.Service<T> | ||
): Layer<never, never, Context.Tag.Identifier<T>> | ||
} = internal.succeed | ||
@@ -671,6 +696,11 @@ /** | ||
*/ | ||
export const sync: <T extends Context.Tag<any, any>>( | ||
tag: T, | ||
evaluate: LazyArg<Context.Tag.Service<T>> | ||
) => Layer<never, never, Context.Tag.Identifier<T>> = internal.sync | ||
export const sync: { | ||
<T extends Context.Tag<any, any>>( | ||
tag: T | ||
): (evaluate: LazyArg<Context.Tag.Service<T>>) => Layer<never, never, Context.Tag.Identifier<T>> | ||
<T extends Context.Tag<any, any>>( | ||
tag: T, | ||
evaluate: LazyArg<Context.Tag.Service<T>> | ||
): Layer<never, never, Context.Tag.Identifier<T>> | ||
} = internal.sync | ||
@@ -677,0 +707,0 @@ /** |
@@ -12,6 +12,6 @@ /** | ||
import type * as FiberRefs from "@effect/io/FiberRefs" | ||
import * as fiberRuntime from "@effect/io/internal_effect_untraced/fiberRuntime" | ||
import * as circular from "@effect/io/internal_effect_untraced/layer/circular" | ||
import * as internal from "@effect/io/internal_effect_untraced/logger" | ||
import * as internalCircular from "@effect/io/internal_effect_untraced/logger-circular" | ||
import * as fiberRuntime from "@effect/io/internal/fiberRuntime" | ||
import * as circular from "@effect/io/internal/layer/circular" | ||
import * as internal from "@effect/io/internal/logger" | ||
import * as internalCircular from "@effect/io/internal/logger-circular" | ||
import type * as Layer from "@effect/io/Layer" | ||
@@ -40,10 +40,12 @@ import type * as LogLevel from "@effect/io/Logger/Level" | ||
readonly log: ( | ||
fiberId: FiberId.FiberId, | ||
logLevel: LogLevel.LogLevel, | ||
message: Message, | ||
cause: Cause.Cause<unknown>, | ||
context: FiberRefs.FiberRefs, | ||
spans: List.List<LogSpan.LogSpan>, | ||
annotations: HashMap.HashMap<string, string>, | ||
now: Date | ||
options: { | ||
readonly fiberId: FiberId.FiberId | ||
readonly logLevel: LogLevel.LogLevel | ||
readonly message: Message | ||
readonly cause: Cause.Cause<unknown> | ||
readonly context: FiberRefs.FiberRefs | ||
readonly spans: List.List<LogSpan.LogSpan> | ||
readonly annotations: HashMap.HashMap<string, string> | ||
readonly date: Date | ||
} | ||
) => Output | ||
@@ -74,10 +76,12 @@ } | ||
log: ( | ||
fiberId: FiberId.FiberId, | ||
logLevel: LogLevel.LogLevel, | ||
message: Message, | ||
cause: Cause.Cause<unknown>, | ||
context: FiberRefs.FiberRefs, | ||
spans: List.List<LogSpan.LogSpan>, | ||
annotations: HashMap.HashMap<string, string>, | ||
now: Date | ||
options: { | ||
readonly fiberId: FiberId.FiberId | ||
readonly logLevel: LogLevel.LogLevel | ||
readonly message: Message | ||
readonly cause: Cause.Cause<unknown> | ||
readonly context: FiberRefs.FiberRefs | ||
readonly spans: List.List<LogSpan.LogSpan> | ||
readonly annotations: HashMap.HashMap<string, string> | ||
readonly date: Date | ||
} | ||
) => Output | ||
@@ -158,3 +162,3 @@ ) => Logger<Message, Output> = internal.makeLogger | ||
*/ | ||
export const none: (_: void) => Logger<unknown, void> = internal.none | ||
export const none: Logger<unknown, void> = internal.none | ||
@@ -161,0 +165,0 @@ /** |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as debug from "@effect/data/Debug" | ||
import { pipe } from "@effect/data/Function" | ||
import { dual, pipe } from "@effect/data/Function" | ||
import * as number from "@effect/data/Number" | ||
import * as order from "@effect/data/typeclass/Order" | ||
import * as order from "@effect/data/Order" | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as core from "@effect/io/internal/core" | ||
@@ -29,2 +28,8 @@ /** | ||
*/ | ||
export type Literal = LogLevel["_tag"] | ||
/** | ||
* @since 1.0.0 | ||
* @category model | ||
*/ | ||
export interface All { | ||
@@ -178,6 +183,6 @@ readonly _tag: "All" | ||
<R, E, B>(use: Effect.Effect<R, E, B>, self: LogLevel): Effect.Effect<R, E, B> | ||
} = debug.dualWithTrace< | ||
} = dual< | ||
(self: LogLevel) => <R, E, B>(use: Effect.Effect<R, E, B>) => Effect.Effect<R, E, B>, | ||
<R, E, B>(use: Effect.Effect<R, E, B>, self: LogLevel) => Effect.Effect<R, E, B> | ||
>(2, (trace) => (use, self) => core.fiberRefLocally(use, core.currentLogLevel, self).traced(trace)) | ||
>(2, (use, self) => core.fiberRefLocally(use, core.currentLogLevel, self)) | ||
@@ -234,3 +239,3 @@ /** | ||
export const fromLiteral = ( | ||
_: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None" | ||
_: Literal | ||
): LogLevel => { | ||
@@ -237,0 +242,0 @@ switch (_) { |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as internal from "@effect/io/internal_effect_untraced/logSpan" | ||
import * as internal from "@effect/io/internal/logSpan" | ||
@@ -6,0 +6,0 @@ /** |
@@ -9,4 +9,4 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as fiberRuntime from "@effect/io/internal_effect_untraced/fiberRuntime" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric" | ||
import * as fiberRuntime from "@effect/io/internal/fiberRuntime" | ||
import * as internal from "@effect/io/internal/metric" | ||
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries" | ||
@@ -268,4 +268,3 @@ import type * as MetricKey from "@effect/io/Metric/Key" | ||
*/ | ||
export const snapshot: () => Effect.Effect<never, never, HashSet.HashSet<MetricPair.MetricPair.Untyped>> = | ||
internal.snapshot | ||
export const snapshot: Effect.Effect<never, never, HashSet.HashSet<MetricPair.MetricPair.Untyped>> = internal.snapshot | ||
@@ -293,8 +292,10 @@ /** | ||
export const summary: ( | ||
name: string, | ||
maxAge: Duration.Duration, | ||
maxSize: number, | ||
error: number, | ||
quantiles: Chunk.Chunk<number>, | ||
description?: string | ||
options: { | ||
readonly name: string | ||
readonly maxAge: Duration.DurationInput | ||
readonly maxSize: number | ||
readonly error: number | ||
readonly quantiles: Chunk.Chunk<number> | ||
readonly description?: string | ||
} | ||
) => Metric.Summary<number> = internal.summary | ||
@@ -307,8 +308,10 @@ | ||
export const summaryTimestamp: ( | ||
name: string, | ||
maxAge: Duration.Duration, | ||
maxSize: number, | ||
error: number, | ||
quantiles: Chunk.Chunk<number>, | ||
description?: string | ||
options: { | ||
readonly name: string | ||
readonly maxAge: Duration.DurationInput | ||
readonly maxSize: number | ||
readonly error: number | ||
readonly quantiles: Chunk.Chunk<number> | ||
readonly description?: string | ||
} | ||
) => Metric.Summary<readonly [value: number, timestamp: number]> = internal.summaryTimestamp | ||
@@ -605,3 +608,3 @@ | ||
*/ | ||
export const fiberStarted: Metric.Counter<number> = fiberRuntime.fibersStarted | ||
export const fiberStarted: Metric.Counter<number> = fiberRuntime.fiberStarted | ||
@@ -626,1 +629,7 @@ /** | ||
fiberRuntime.fiberLifetimes | ||
/** | ||
* @since 1.0.0 | ||
* @category metrics | ||
*/ | ||
export const fiberActive: Metric.Counter<number> = fiberRuntime.fiberActive |
@@ -6,3 +6,3 @@ /** | ||
import type * as Equal from "@effect/data/Equal" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/boundaries" | ||
import * as internal from "@effect/io/internal/metric/boundaries" | ||
@@ -49,3 +49,9 @@ /** | ||
*/ | ||
export const linear: (start: number, width: number, count: number) => MetricBoundaries = internal.linear | ||
export const linear: ( | ||
options: { | ||
readonly start: number | ||
readonly width: number | ||
readonly count: number | ||
} | ||
) => MetricBoundaries = internal.linear | ||
@@ -59,2 +65,8 @@ /** | ||
*/ | ||
export const exponential: (start: number, factor: number, count: number) => MetricBoundaries = internal.exponential | ||
export const exponential: ( | ||
options: { | ||
readonly start: number | ||
readonly factor: number | ||
readonly count: number | ||
} | ||
) => MetricBoundaries = internal.exponential |
@@ -5,3 +5,3 @@ /** | ||
import type { LazyArg } from "@effect/data/Function" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/hook" | ||
import * as internal from "@effect/io/internal/metric/hook" | ||
import type * as MetricKey from "@effect/io/Metric/Key" | ||
@@ -93,3 +93,6 @@ import type * as MetricState from "@effect/io/Metric/State" | ||
*/ | ||
export const make: <In, Out>(get: LazyArg<Out>, update: (input: In) => void) => MetricHook<In, Out> = internal.make | ||
export const make: <In, Out>(options: { | ||
readonly get: LazyArg<Out> | ||
readonly update: (input: In) => void | ||
}) => MetricHook<In, Out> = internal.make | ||
@@ -96,0 +99,0 @@ /** |
@@ -9,3 +9,3 @@ /** | ||
import type * as Option from "@effect/data/Option" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/key" | ||
import * as internal from "@effect/io/internal/metric/key" | ||
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries" | ||
@@ -149,8 +149,10 @@ import type * as MetricKeyType from "@effect/io/Metric/KeyType" | ||
export const summary: ( | ||
name: string, | ||
maxAge: Duration.Duration, | ||
maxSize: number, | ||
error: number, | ||
quantiles: Chunk.Chunk<number>, | ||
description?: string | ||
options: { | ||
readonly name: string | ||
readonly maxAge: Duration.DurationInput | ||
readonly maxSize: number | ||
readonly error: number | ||
readonly quantiles: Chunk.Chunk<number> | ||
readonly description?: string | ||
} | ||
) => MetricKey.Summary = internal.summary | ||
@@ -157,0 +159,0 @@ |
@@ -7,3 +7,3 @@ /** | ||
import type * as Equal from "@effect/data/Equal" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/keyType" | ||
import * as internal from "@effect/io/internal/metric/keyType" | ||
import type * as MetricBoundaries from "@effect/io/Metric/Boundaries" | ||
@@ -212,6 +212,8 @@ import type * as MetricState from "@effect/io/Metric/State" | ||
export const summary: ( | ||
maxAge: Duration.Duration, | ||
maxSize: number, | ||
error: number, | ||
quantiles: Chunk.Chunk<number> | ||
options: { | ||
readonly maxAge: Duration.DurationInput | ||
readonly maxSize: number | ||
readonly error: number | ||
readonly quantiles: Chunk.Chunk<number> | ||
} | ||
) => MetricKeyType.Summary = internal.summary | ||
@@ -218,0 +220,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
import type * as Equal from "@effect/data/Equal" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/label" | ||
import * as internal from "@effect/io/internal/metric/label" | ||
@@ -8,0 +8,0 @@ /** |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/pair" | ||
import * as internal from "@effect/io/internal/metric/pair" | ||
import type * as MetricKey from "@effect/io/Metric/Key" | ||
@@ -6,0 +6,0 @@ import type * as MetricKeyType from "@effect/io/Metric/KeyType" |
@@ -6,3 +6,3 @@ /** | ||
import type * as Fiber from "@effect/io/Fiber" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/polling" | ||
import * as internal from "@effect/io/internal/metric/polling" | ||
import type * as Metric from "@effect/io/Metric" | ||
@@ -40,3 +40,3 @@ import type * as Schedule from "@effect/io/Schedule" | ||
*/ | ||
poll(): Effect.Effect<R, E, In> | ||
readonly poll: Effect.Effect<R, E, In> | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
import type * as HashSet from "@effect/data/HashSet" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/registry" | ||
import * as internal from "@effect/io/internal/metric/registry" | ||
import type * as MetricHook from "@effect/io/Metric/Hook" | ||
@@ -8,0 +8,0 @@ import type * as MetricKey from "@effect/io/Metric/Key" |
@@ -8,3 +8,3 @@ /** | ||
import type * as Option from "@effect/data/Option" | ||
import * as internal from "@effect/io/internal_effect_untraced/metric/state" | ||
import * as internal from "@effect/io/internal/metric/state" | ||
import type * as MetricKeyType from "@effect/io/Metric/KeyType" | ||
@@ -192,7 +192,9 @@ | ||
export const histogram: ( | ||
buckets: Chunk.Chunk<readonly [number, number]>, | ||
count: number, | ||
min: number, | ||
max: number, | ||
sum: number | ||
options: { | ||
readonly buckets: Chunk.Chunk<readonly [number, number]> | ||
readonly count: number | ||
readonly min: number | ||
readonly max: number | ||
readonly sum: number | ||
} | ||
) => MetricState.Histogram = internal.histogram | ||
@@ -205,8 +207,10 @@ | ||
export const summary: ( | ||
error: number, | ||
quantiles: Chunk.Chunk<readonly [number, Option.Option<number>]>, | ||
count: number, | ||
min: number, | ||
max: number, | ||
sum: number | ||
options: { | ||
readonly error: number | ||
readonly quantiles: Chunk.Chunk<readonly [number, Option.Option<number>]> | ||
readonly count: number | ||
readonly min: number | ||
readonly max: number | ||
readonly sum: number | ||
} | ||
) => MetricState.Summary = internal.summary | ||
@@ -213,0 +217,0 @@ |
@@ -7,3 +7,3 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/pool" | ||
import * as internal from "@effect/io/internal/pool" | ||
import type * as Scope from "@effect/io/Scope" | ||
@@ -81,4 +81,6 @@ | ||
export const make: <R, E, A>( | ||
get: Effect.Effect<R, E, A>, | ||
size: number | ||
options: { | ||
readonly acquire: Effect.Effect<R, E, A> | ||
readonly size: number | ||
} | ||
) => Effect.Effect<Scope.Scope | R, never, Pool<E, A>> = internal.make | ||
@@ -119,8 +121,8 @@ | ||
*/ | ||
export const makeWithTTL: <R, E, A>( | ||
get: Effect.Effect<R, E, A>, | ||
min: number, | ||
max: number, | ||
timeToLive: Duration.Duration | ||
) => Effect.Effect<Scope.Scope | R, never, Pool<E, A>> = internal.makeWithTTL | ||
export const makeWithTTL: <R, E, A>(options: { | ||
readonly acquire: Effect.Effect<R, E, A> | ||
readonly min: number | ||
readonly max: number | ||
readonly timeToLive: Duration.DurationInput | ||
}) => Effect.Effect<Scope.Scope | R, never, Pool<E, A>> = internal.makeWithTTL | ||
@@ -127,0 +129,0 @@ /** |
@@ -10,3 +10,3 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/queue" | ||
import * as internal from "@effect/io/internal/queue" | ||
@@ -77,2 +77,7 @@ /** | ||
/** | ||
* Places one value in the queue when possible without needing the fiber runtime. | ||
*/ | ||
unsafeOffer(value: A): boolean | ||
/** | ||
* For Bounded Queue: uses the `BackPressure` Strategy, places the values in | ||
@@ -133,3 +138,3 @@ * the queue and always returns true. If the queue has reached capacity, then | ||
/** | ||
* Returns the number of elements the queue can hold. | ||
* Returns the number of elements the queue can hold. | ||
*/ | ||
@@ -139,2 +144,7 @@ capacity(): number | ||
/** | ||
* Returns false if shutdown has been called. | ||
*/ | ||
isActive(): boolean | ||
/** | ||
* Retrieves the size of the queue, which is equal to the number of elements | ||
@@ -420,2 +430,13 @@ * in the queue. This may be negative if fibers are suspended waiting for | ||
/** | ||
* Places one value in the queue. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export const unsafeOffer: { | ||
<A>(value: A): (self: Enqueue<A>) => boolean | ||
<A>(self: Enqueue<A>, value: A): boolean | ||
} = internal.unsafeOffer | ||
/** | ||
* For Bounded Queue: uses the `BackPressure` Strategy, places the values in | ||
@@ -422,0 +443,0 @@ * the queue and always returns true. If the queue has reached capacity, then |
@@ -6,4 +6,4 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as defaultServices from "@effect/io/internal_effect_untraced/defaultServices" | ||
import * as internal from "@effect/io/internal_effect_untraced/random" | ||
import * as defaultServices from "@effect/io/internal/defaultServices" | ||
import * as internal from "@effect/io/internal/random" | ||
@@ -62,3 +62,3 @@ /** | ||
*/ | ||
export const next: (_: void) => Effect.Effect<never, never, number> = defaultServices.next | ||
export const next: Effect.Effect<never, never, number> = defaultServices.next | ||
@@ -71,3 +71,3 @@ /** | ||
*/ | ||
export const nextInt: (_: void) => Effect.Effect<never, never, number> = defaultServices.nextInt | ||
export const nextInt: Effect.Effect<never, never, number> = defaultServices.nextInt | ||
@@ -80,3 +80,3 @@ /** | ||
*/ | ||
export const nextBoolean: (_: void) => Effect.Effect<never, never, boolean> = defaultServices.nextBoolean | ||
export const nextBoolean: Effect.Effect<never, never, boolean> = defaultServices.nextBoolean | ||
@@ -83,0 +83,0 @@ /** |
@@ -6,3 +6,3 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/ref" | ||
import * as internal from "@effect/io/internal/ref" | ||
@@ -9,0 +9,0 @@ /** |
@@ -6,5 +6,5 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as circular from "@effect/io/internal_effect_untraced/effect/circular" | ||
import * as ref from "@effect/io/internal_effect_untraced/ref" | ||
import * as internal from "@effect/io/internal_effect_untraced/synchronizedRef" | ||
import * as circular from "@effect/io/internal/effect/circular" | ||
import * as ref from "@effect/io/internal/ref" | ||
import * as internal from "@effect/io/internal/synchronizedRef" | ||
import type * as Ref from "@effect/io/Ref" | ||
@@ -11,0 +11,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/reloadable" | ||
import * as internal from "@effect/io/internal/reloadable" | ||
import type * as Layer from "@effect/io/Layer" | ||
@@ -67,4 +67,6 @@ import type * as Schedule from "@effect/io/Schedule" | ||
tag: Out, | ||
layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>>, | ||
policy: Schedule.Schedule<R, unknown, unknown> | ||
options: { | ||
readonly layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>> | ||
readonly schedule: Schedule.Schedule<R, unknown, unknown> | ||
} | ||
) => Layer.Layer<In | R, E, Reloadable<Context.Tag.Identifier<Out>>> = internal.auto | ||
@@ -82,4 +84,6 @@ | ||
tag: Out, | ||
layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>>, | ||
scheduleFromConfig: (context: Context.Context<In>) => Schedule.Schedule<R, unknown, unknown> | ||
options: { | ||
readonly layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>> | ||
readonly scheduleFromConfig: (context: Context.Context<In>) => Schedule.Schedule<R, unknown, unknown> | ||
} | ||
) => Layer.Layer<In | R, E, Reloadable<Context.Tag.Identifier<Out>>> = internal.autoFromConfig | ||
@@ -106,3 +110,3 @@ | ||
tag: Out, | ||
layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>> | ||
options: { readonly layer: Layer.Layer<In, E, Context.Tag.Identifier<Out>> } | ||
) => Layer.Layer<In, E, Reloadable<Context.Tag.Identifier<Out>>> = internal.manual | ||
@@ -109,0 +113,0 @@ |
@@ -12,7 +12,7 @@ /** | ||
import type { FiberId } from "@effect/io/Fiber/Id" | ||
import * as _RequestBlock from "@effect/io/internal_effect_untraced/blockedRequests" | ||
import * as cache from "@effect/io/internal_effect_untraced/cache" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as fiberRuntime from "@effect/io/internal_effect_untraced/fiberRuntime" | ||
import * as internal from "@effect/io/internal_effect_untraced/request" | ||
import * as _RequestBlock from "@effect/io/internal/blockedRequests" | ||
import * as cache from "@effect/io/internal/cache" | ||
import * as core from "@effect/io/internal/core" | ||
import * as fiberRuntime from "@effect/io/internal/fiberRuntime" | ||
import * as internal from "@effect/io/internal/request" | ||
@@ -215,10 +215,11 @@ /** | ||
export const makeCache = ( | ||
capacity: number, | ||
timeToLive: Duration | ||
options: { | ||
readonly capacity: number | ||
readonly timeToLive: Duration | ||
} | ||
): Effect.Effect<never, never, Cache> => | ||
cache.make( | ||
capacity, | ||
timeToLive, | ||
() => core.map(core.deferredMake(), (handle) => ({ listeners: new internal.Listeners(), handle })) | ||
) | ||
cache.make({ | ||
...options, | ||
lookup: () => core.map(core.deferredMake(), (handle) => ({ listeners: new internal.Listeners(), handle })) | ||
}) | ||
@@ -225,0 +226,0 @@ /** |
@@ -6,5 +6,5 @@ /** | ||
import type { FiberRef } from "@effect/io/FiberRef" | ||
import * as _RequestBlock from "@effect/io/internal_effect_untraced/blockedRequests" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as _dataSource from "@effect/io/internal_effect_untraced/dataSource" | ||
import * as _RequestBlock from "@effect/io/internal/blockedRequests" | ||
import * as core from "@effect/io/internal/core" | ||
import * as _dataSource from "@effect/io/internal/dataSource" | ||
import type * as Request from "@effect/io/Request" | ||
@@ -11,0 +11,0 @@ import type * as RequestResolver from "@effect/io/RequestResolver" |
@@ -10,4 +10,4 @@ /** | ||
import type { FiberRef } from "@effect/io/FiberRef" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as internal from "@effect/io/internal_effect_untraced/dataSource" | ||
import * as core from "@effect/io/internal/core" | ||
import * as internal from "@effect/io/internal/dataSource" | ||
import type * as Request from "@effect/io/Request" | ||
@@ -252,3 +252,3 @@ | ||
*/ | ||
export const never: (_: void) => RequestResolver<never, never> = internal.never | ||
export const never: RequestResolver<never, never> = internal.never | ||
@@ -255,0 +255,0 @@ /** |
@@ -6,3 +6,3 @@ /** | ||
import type * as Exit from "@effect/io/Exit" | ||
import * as internal from "@effect/io/internal_effect_untraced/resource" | ||
import * as internal from "@effect/io/internal/resource" | ||
import type * as Schedule from "@effect/io/Schedule" | ||
@@ -9,0 +9,0 @@ import type * as Scope from "@effect/io/Scope" |
@@ -5,3 +5,2 @@ /** | ||
import type * as Context from "@effect/data/Context" | ||
import type { Either } from "@effect/data/Either" | ||
import type { Cause } from "@effect/io/Cause" | ||
@@ -14,3 +13,3 @@ import type * as Effect from "@effect/io/Effect" | ||
import type * as FiberRefs from "@effect/io/FiberRefs" | ||
import * as internal from "@effect/io/internal_effect_untraced/runtime" | ||
import * as internal from "@effect/io/internal/runtime" | ||
import type { Scheduler } from "@effect/io/Scheduler" | ||
@@ -117,16 +116,2 @@ | ||
/** | ||
* Executes the effect synchronously returning either the result or a failure. | ||
* | ||
* Throwing in case of defects and interruptions. | ||
* | ||
* This method is effectful and should only be invoked at the edges of your | ||
* program. | ||
* | ||
* @since 1.0.0 | ||
* @category execution | ||
*/ | ||
export const runSyncEither: <R>(runtime: Runtime<R>) => <E, A>(effect: Effect.Effect<R, E, A>) => Either<E, A> = | ||
internal.unsafeRunSyncEither | ||
/** | ||
* Runs the `Effect`, returning a JavaScript `Promise` that will be resolved | ||
@@ -160,18 +145,3 @@ * with the value of the effect once the effect has been executed, or will be | ||
/** | ||
* Runs the `Effect`, returning a JavaScript `Promise` that will be resolved | ||
* with the either a success or a failure. The promise will be rejected in case | ||
* of defects and interruption. | ||
* | ||
* This method is effectful and should only be used at the edges of your | ||
* program. | ||
* | ||
* @since 1.0.0 | ||
* @category execution | ||
*/ | ||
export const runPromiseEither: <R>( | ||
runtime: Runtime<R> | ||
) => <E, A>(effect: Effect.Effect<R, E, A>) => Promise<Either<E, A>> = internal.unsafeRunPromiseEither | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
@@ -192,5 +162,7 @@ */ | ||
export const make: <R>( | ||
context: Context.Context<R>, | ||
runtimeFlags: RuntimeFlags.RuntimeFlags, | ||
fiberRefs: FiberRefs.FiberRefs | ||
options: { | ||
readonly context: Context.Context<R> | ||
readonly flags: RuntimeFlags.RuntimeFlags | ||
readonly fiberRefs: FiberRefs.FiberRefs | ||
} | ||
) => Runtime<R> = internal.make | ||
@@ -197,0 +169,0 @@ |
@@ -13,5 +13,4 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/schedule" | ||
import * as internal from "@effect/io/internal/schedule" | ||
import type * as ScheduleDecision from "@effect/io/Schedule/Decision" | ||
import type * as Interval from "@effect/io/Schedule/Interval" | ||
import type * as Intervals from "@effect/io/Schedule/Intervals" | ||
@@ -146,4 +145,4 @@ | ||
export const addDelay: { | ||
<Out>(f: (out: Out) => Duration.Duration): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out> | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, f: (out: Out) => Duration.Duration): Schedule<Env, In, Out> | ||
<Out>(f: (out: Out) => Duration.DurationInput): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out> | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, f: (out: Out) => Duration.DurationInput): Schedule<Env, In, Out> | ||
} = internal.addDelay | ||
@@ -160,7 +159,7 @@ | ||
<Out, Env2>( | ||
f: (out: Out) => Effect.Effect<Env2, never, Duration.Duration> | ||
f: (out: Out) => Effect.Effect<Env2, never, Duration.DurationInput> | ||
): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out> | ||
<Env, In, Out, Env2>( | ||
self: Schedule<Env, In, Out>, | ||
f: (out: Out) => Effect.Effect<Env2, never, Duration.Duration> | ||
f: (out: Out) => Effect.Effect<Env2, never, Duration.DurationInput> | ||
): Schedule<Env | Env2, In, Out> | ||
@@ -270,38 +269,2 @@ } = internal.addDelayEffect | ||
/** | ||
* Returns a new schedule that allows choosing between feeding inputs to this | ||
* schedule, or feeding inputs to the specified schedule. | ||
* | ||
* @since 1.0.0 | ||
* @category alternatives | ||
*/ | ||
export const choose: { | ||
<Env2, In2, Out2>( | ||
that: Schedule<Env2, In2, Out2> | ||
): <Env, In, Out>( | ||
self: Schedule<Env, In, Out> | ||
) => Schedule<Env2 | Env, Either.Either<In, In2>, Either.Either<Out, Out2>> | ||
<Env, In, Out, Env2, In2, Out2>( | ||
self: Schedule<Env, In, Out>, | ||
that: Schedule<Env2, In2, Out2> | ||
): Schedule<Env | Env2, Either.Either<In, In2>, Either.Either<Out, Out2>> | ||
} = internal.choose | ||
/** | ||
* Returns a new schedule that chooses between two schedules with a common | ||
* output. | ||
* | ||
* @since 1.0.0 | ||
* @category alternatives | ||
*/ | ||
export const chooseMerge: { | ||
<Env2, In2, Out2>( | ||
that: Schedule<Env2, In2, Out2> | ||
): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, Either.Either<In, In2>, Out2 | Out> | ||
<Env, In, Out, Env2, In2, Out2>( | ||
self: Schedule<Env, In, Out>, | ||
that: Schedule<Env2, In2, Out2> | ||
): Schedule<Env | Env2, Either.Either<In, In2>, Out | Out2> | ||
} = internal.chooseMerge | ||
/** | ||
* A schedule that recurs anywhere, collecting all inputs into a `Chunk`. | ||
@@ -434,3 +397,3 @@ * | ||
*/ | ||
export const count: (_: void) => Schedule<never, unknown, number> = internal.count | ||
export const count: Schedule<never, unknown, number> = internal.count | ||
@@ -471,7 +434,7 @@ /** | ||
( | ||
f: (duration: Duration.Duration) => Duration.Duration | ||
f: (duration: Duration.Duration) => Duration.DurationInput | ||
): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out> | ||
<Env, In, Out>( | ||
self: Schedule<Env, In, Out>, | ||
f: (duration: Duration.Duration) => Duration.Duration | ||
f: (duration: Duration.Duration) => Duration.DurationInput | ||
): Schedule<Env, In, Out> | ||
@@ -489,7 +452,7 @@ } = internal.delayed | ||
<Env2>( | ||
f: (duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.Duration> | ||
f: (duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.DurationInput> | ||
): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out> | ||
<Env, In, Out, Env2>( | ||
self: Schedule<Env, In, Out>, | ||
f: (duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.Duration> | ||
f: (duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.DurationInput> | ||
): Schedule<Env | Env2, In, Out> | ||
@@ -526,9 +489,13 @@ } = internal.delayedEffect | ||
<In, Out, In2, Out2>( | ||
f: (in2: In2) => In, | ||
g: (out: Out) => Out2 | ||
options: { | ||
readonly onInput: (in2: In2) => In | ||
readonly onOutput: (out: Out) => Out2 | ||
} | ||
): <Env>(self: Schedule<Env, In, Out>) => Schedule<Env, In2, Out2> | ||
<Env, In, Out, In2, Out2>( | ||
self: Schedule<Env, In, Out>, | ||
f: (in2: In2) => In, | ||
g: (out: Out) => Out2 | ||
options: { | ||
readonly onInput: (in2: In2) => In | ||
readonly onOutput: (out: Out) => Out2 | ||
} | ||
): Schedule<Env, In2, Out2> | ||
@@ -545,9 +512,13 @@ } = internal.dimap | ||
<In2, Env2, In, Out, Env3, Out2>( | ||
f: (input: In2) => Effect.Effect<Env2, never, In>, | ||
g: (out: Out) => Effect.Effect<Env3, never, Out2> | ||
options: { | ||
readonly onInput: (input: In2) => Effect.Effect<Env2, never, In> | ||
readonly onOutput: (out: Out) => Effect.Effect<Env3, never, Out2> | ||
} | ||
): <Env>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env3 | Env, In2, Out2> | ||
<Env, In, Out, In2, Env2, Env3, Out2>( | ||
self: Schedule<Env, In, Out>, | ||
f: (input: In2) => Effect.Effect<Env2, never, In>, | ||
g: (out: Out) => Effect.Effect<Env3, never, Out2> | ||
options: { | ||
readonly onInput: (input: In2) => Effect.Effect<Env2, never, In> | ||
readonly onOutput: (out: Out) => Effect.Effect<Env3, never, Out2> | ||
} | ||
): Schedule<Env | Env2 | Env3, In2, Out2> | ||
@@ -574,3 +545,4 @@ } = internal.dimapEffect | ||
*/ | ||
export const duration: (duration: Duration.Duration) => Schedule<never, unknown, Duration.Duration> = internal.duration | ||
export const duration: (duration: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration> = | ||
internal.duration | ||
@@ -619,3 +591,3 @@ /** | ||
*/ | ||
export const elapsed: (_: void) => Schedule<never, unknown, Duration.Duration> = internal.elapsed | ||
export const elapsed: Schedule<never, unknown, Duration.Duration> = internal.elapsed | ||
@@ -645,4 +617,6 @@ /** | ||
*/ | ||
export const exponential: (base: Duration.Duration, factor?: number) => Schedule<never, unknown, Duration.Duration> = | ||
internal.exponential | ||
export const exponential: ( | ||
base: Duration.DurationInput, | ||
factor?: number | ||
) => Schedule<never, unknown, Duration.Duration> = internal.exponential | ||
@@ -657,3 +631,4 @@ /** | ||
*/ | ||
export const fibonacci: (one: Duration.Duration) => Schedule<never, unknown, Duration.Duration> = internal.fibonacci | ||
export const fibonacci: (one: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration> = | ||
internal.fibonacci | ||
@@ -675,3 +650,3 @@ /** | ||
*/ | ||
export const fixed: (interval: Duration.Duration) => Schedule<never, unknown, number> = internal.fixed | ||
export const fixed: (interval: Duration.DurationInput) => Schedule<never, unknown, number> = internal.fixed | ||
@@ -684,3 +659,3 @@ /** | ||
*/ | ||
export const forever: (_: void) => Schedule<never, unknown, number> = internal.forever | ||
export const forever: Schedule<never, unknown, number> = internal.forever | ||
@@ -693,3 +668,4 @@ /** | ||
*/ | ||
export const fromDelay: (delay: Duration.Duration) => Schedule<never, unknown, Duration.Duration> = internal.fromDelay | ||
export const fromDelay: (delay: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration> = | ||
internal.fromDelay | ||
@@ -705,4 +681,4 @@ /** | ||
export const fromDelays: ( | ||
delay: Duration.Duration, | ||
...delays: Array<Duration.Duration> | ||
delay: Duration.DurationInput, | ||
...delays: Array<Duration.DurationInput> | ||
) => Schedule<never, unknown, Duration.Duration> = internal.fromDelays | ||
@@ -810,14 +786,2 @@ | ||
/** | ||
* Returns a new schedule that makes this schedule available on the `Left` | ||
* side of an `Either` input, allowing propagating some type `X` through this | ||
* channel on demand. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export const left: <Env, In, Out, X>( | ||
self: Schedule<Env, In, Out> | ||
) => Schedule<Env, Either.Either<In, X>, Either.Either<Out, X>> = internal.left | ||
/** | ||
* A schedule that always recurs, but will repeat on a linear time interval, | ||
@@ -830,3 +794,3 @@ * given by `base * n` where `n` is the number of repetitions so far. Returns | ||
*/ | ||
export const linear: (base: Duration.Duration) => Schedule<never, unknown, Duration.Duration> = internal.linear | ||
export const linear: (base: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration> = internal.linear | ||
@@ -883,7 +847,7 @@ /** | ||
<Out>( | ||
f: (out: Out, duration: Duration.Duration) => Duration.Duration | ||
f: (out: Out, duration: Duration.Duration) => Duration.DurationInput | ||
): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out> | ||
<Env, In, Out>( | ||
self: Schedule<Env, In, Out>, | ||
f: (out: Out, duration: Duration.Duration) => Duration.Duration | ||
f: (out: Out, duration: Duration.Duration) => Duration.DurationInput | ||
): Schedule<Env, In, Out> | ||
@@ -901,7 +865,7 @@ } = internal.modifyDelay | ||
<Out, Env2>( | ||
f: (out: Out, duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.Duration> | ||
f: (out: Out, duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.DurationInput> | ||
): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out> | ||
<Env, In, Out, Env2>( | ||
self: Schedule<Env, In, Out>, | ||
f: (out: Out, duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.Duration> | ||
f: (out: Out, duration: Duration.Duration) => Effect.Effect<Env2, never, Duration.DurationInput> | ||
): Schedule<Env | Env2, In, Out> | ||
@@ -934,3 +898,3 @@ } = internal.modifyDelayEffect | ||
*/ | ||
export const once: (_: void) => Schedule<never, unknown, void> = internal.once | ||
export const once: Schedule<never, unknown, void> = internal.once | ||
@@ -979,50 +943,2 @@ /** | ||
/** | ||
* Returns a new schedule that reconsiders every decision made by this | ||
* schedule, possibly modifying the next interval and the output type in the | ||
* process. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export const reconsider: { | ||
<Out, Out2>( | ||
f: ( | ||
out: Out, | ||
decision: ScheduleDecision.ScheduleDecision | ||
) => Either.Either<Out2, readonly [Out2, Interval.Interval]> | ||
): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out2> | ||
<Env, In, Out, Out2>( | ||
self: Schedule<Env, In, Out>, | ||
f: ( | ||
out: Out, | ||
decision: ScheduleDecision.ScheduleDecision | ||
) => Either.Either<Out2, readonly [Out2, Interval.Interval]> | ||
): Schedule<Env, In, Out2> | ||
} = internal.reconsider | ||
/** | ||
* Returns a new schedule that effectfully reconsiders every decision made by | ||
* this schedule, possibly modifying the next interval and the output type in | ||
* the process. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export const reconsiderEffect: { | ||
<Out, Env2, Out2>( | ||
f: ( | ||
out: Out, | ||
decision: ScheduleDecision.ScheduleDecision | ||
) => Effect.Effect<Env2, never, Either.Either<Out2, readonly [Out2, Interval.Interval]>> | ||
): <Env, In>(self: Schedule<Env, In, Out>) => Schedule<Env2 | Env, In, Out2> | ||
<Env, In, Out, Env2, Out2>( | ||
self: Schedule<Env, In, Out>, | ||
f: ( | ||
out: Out, | ||
decision: ScheduleDecision.ScheduleDecision | ||
) => Effect.Effect<Env2, never, Either.Either<Out2, readonly [Out2, Interval.Interval]>> | ||
): Schedule<Env | Env2, In, Out2> | ||
} = internal.reconsiderEffect | ||
/** | ||
* A schedule that recurs for until the predicate evaluates to true. | ||
@@ -1045,10 +961,2 @@ * | ||
/** | ||
* A schedule that recurs for until the predicate is equal. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export const recurUntilEquals: <A>(value: A) => Schedule<never, A, A> = internal.recurUntilEquals | ||
/** | ||
* A schedule that recurs for until the input value becomes applicable to | ||
@@ -1069,3 +977,3 @@ * partial function and then map that value with given function. | ||
*/ | ||
export const recurUpTo: (duration: Duration.Duration) => Schedule<never, unknown, Duration.Duration> = | ||
export const recurUpTo: (duration: Duration.DurationInput) => Schedule<never, unknown, Duration.Duration> = | ||
internal.recurUpTo | ||
@@ -1092,11 +1000,2 @@ | ||
/** | ||
* A schedule that recurs for as long as the predicate is equal to the | ||
* specified value. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export const recurWhileEquals: <A>(value: A) => Schedule<never, A, A> = internal.recurWhileEquals | ||
/** | ||
* A schedule spanning all time, which can be stepped only the specified | ||
@@ -1146,3 +1045,3 @@ * number of times before it terminates. | ||
*/ | ||
export const repeatForever: (_: void) => Schedule<never, unknown, number> = internal.forever | ||
export const repeatForever: Schedule<never, unknown, number> = internal.forever | ||
@@ -1166,4 +1065,4 @@ /** | ||
export const resetAfter: { | ||
(duration: Duration.Duration): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out> | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, duration: Duration.Duration): Schedule<Env, In, Out> | ||
(duration: Duration.DurationInput): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out> | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, duration: Duration.DurationInput): Schedule<Env, In, Out> | ||
} = internal.resetAfter | ||
@@ -1184,14 +1083,2 @@ | ||
/** | ||
* Returns a new schedule that makes this schedule available on the `Right` | ||
* side of an `Either` input, allowing propagating some type `X` through this | ||
* channel on demand. | ||
* | ||
* @since 1.0.0 | ||
* @category utils | ||
*/ | ||
export const right: <Env, In, Out, X>( | ||
self: Schedule<Env, In, Out> | ||
) => Schedule<Env, Either.Either<X, In>, Either.Either<X, Out>> = internal.right | ||
/** | ||
* Runs a schedule using the provided inputs, and collects all outputs. | ||
@@ -1233,3 +1120,3 @@ * | ||
*/ | ||
export const spaced: (duration: Duration.Duration) => Schedule<never, unknown, number> = internal.spaced | ||
export const spaced: (duration: Duration.DurationInput) => Schedule<never, unknown, number> = internal.spaced | ||
@@ -1242,3 +1129,3 @@ /** | ||
*/ | ||
export const stop: (_: void) => Schedule<never, unknown, void> = internal.stop | ||
export const stop: Schedule<never, unknown, void> = internal.stop | ||
@@ -1408,4 +1295,4 @@ /** | ||
export const upTo: { | ||
(duration: Duration.Duration): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out> | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, duration: Duration.Duration): Schedule<Env, In, Out> | ||
(duration: Duration.DurationInput): <Env, In, Out>(self: Schedule<Env, In, Out>) => Schedule<Env, In, Out> | ||
<Env, In, Out>(self: Schedule<Env, In, Out>, duration: Duration.DurationInput): Schedule<Env, In, Out> | ||
} = internal.upTo | ||
@@ -1487,3 +1374,3 @@ | ||
*/ | ||
export const windowed: (interval: Duration.Duration) => Schedule<never, unknown, number> = internal.windowed | ||
export const windowed: (interval: Duration.DurationInput) => Schedule<never, unknown, number> = internal.windowed | ||
@@ -1490,0 +1377,0 @@ /** |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as internal from "@effect/io/internal_effect_untraced/schedule/decision" | ||
import * as internal from "@effect/io/internal/schedule/decision" | ||
import type * as Interval from "@effect/io/Schedule/Interval" | ||
@@ -6,0 +6,0 @@ import type * as Intervals from "@effect/io/Schedule/Intervals" |
@@ -6,3 +6,3 @@ /** | ||
import type * as Option from "@effect/data/Option" | ||
import * as internal from "@effect/io/internal_effect_untraced/schedule/interval" | ||
import * as internal from "@effect/io/internal/schedule/interval" | ||
@@ -9,0 +9,0 @@ /** |
@@ -5,3 +5,3 @@ /** | ||
import type * as Check from "@effect/data/Chunk" | ||
import * as internal from "@effect/io/internal_effect_untraced/schedule/intervals" | ||
import * as internal from "@effect/io/internal/schedule/intervals" | ||
import type * as Interval from "@effect/io/Schedule/Interval" | ||
@@ -8,0 +8,0 @@ |
@@ -18,3 +18,3 @@ /** | ||
export interface Scheduler { | ||
scheduleTask(task: Task): void | ||
scheduleTask(task: Task, priority: number): void | ||
} | ||
@@ -24,4 +24,42 @@ | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category utils | ||
*/ | ||
export class PriorityBuckets<T = Task> { | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
public buckets: Array<[number, Array<T>]> = [] | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
scheduleTask(task: T, priority: number) { | ||
let bucket: [number, Array<T>] | undefined = undefined | ||
let index: number | ||
for (index = 0; index < this.buckets.length; index++) { | ||
if (this.buckets[index][0] <= priority) { | ||
bucket = this.buckets[index] | ||
} else { | ||
break | ||
} | ||
} | ||
if (bucket) { | ||
bucket[1].push(task) | ||
} else { | ||
const newBuckets: Array<[number, Array<T>]> = [] | ||
for (let i = 0; i < index; i++) { | ||
newBuckets.push(this.buckets[i]) | ||
} | ||
newBuckets.push([priority, [task]]) | ||
for (let i = index; i < this.buckets.length; i++) { | ||
newBuckets.push(this.buckets[i]) | ||
} | ||
this.buckets = newBuckets | ||
} | ||
} | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export class MixedScheduler implements Scheduler { | ||
@@ -35,3 +73,3 @@ /** | ||
*/ | ||
tasks: Array<Task> = [] | ||
tasks = new PriorityBuckets() | ||
@@ -49,8 +87,10 @@ constructor( | ||
private starveInternal(depth: number) { | ||
const toRun = this.tasks | ||
this.tasks = [] | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i]() | ||
const tasks = this.tasks.buckets | ||
this.tasks.buckets = [] | ||
for (const [_, toRun] of tasks) { | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i]() | ||
} | ||
} | ||
if (this.tasks.length === 0) { | ||
if (this.tasks.buckets.length === 0) { | ||
this.running = false | ||
@@ -76,4 +116,4 @@ } else { | ||
*/ | ||
scheduleTask(task: Task) { | ||
this.tasks.push(task) | ||
scheduleTask(task: Task, priority: number) { | ||
this.tasks.scheduleTask(task, priority) | ||
if (!this.running) { | ||
@@ -97,3 +137,3 @@ this.running = true | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
@@ -104,3 +144,3 @@ export class SyncScheduler implements Scheduler { | ||
*/ | ||
tasks: Array<Task> = [] | ||
tasks = new PriorityBuckets() | ||
@@ -115,7 +155,7 @@ /** | ||
*/ | ||
scheduleTask(task: Task) { | ||
scheduleTask(task: Task, priority: number) { | ||
if (this.deferred) { | ||
defaultScheduler.scheduleTask(task) | ||
defaultScheduler.scheduleTask(task, priority) | ||
} else { | ||
this.tasks.push(task) | ||
this.tasks.scheduleTask(task, priority) | ||
} | ||
@@ -128,7 +168,9 @@ } | ||
flush() { | ||
while (this.tasks.length > 0) { | ||
const toRun = this.tasks | ||
this.tasks = [] | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i]() | ||
while (this.tasks.buckets.length > 0) { | ||
const tasks = this.tasks.buckets | ||
this.tasks.buckets = [] | ||
for (const [_, toRun] of tasks) { | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i]() | ||
} | ||
} | ||
@@ -142,3 +184,3 @@ } | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
@@ -149,3 +191,3 @@ export class ControlledScheduler implements Scheduler { | ||
*/ | ||
tasks: Array<Task> = [] | ||
tasks = new PriorityBuckets() | ||
@@ -160,7 +202,7 @@ /** | ||
*/ | ||
scheduleTask(task: Task) { | ||
scheduleTask(task: Task, priority: number) { | ||
if (this.deferred) { | ||
defaultScheduler.scheduleTask(task) | ||
defaultScheduler.scheduleTask(task, priority) | ||
} else { | ||
this.tasks.push(task) | ||
this.tasks.scheduleTask(task, priority) | ||
} | ||
@@ -173,6 +215,8 @@ } | ||
step() { | ||
const toRun = this.tasks | ||
this.tasks = [] | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i]() | ||
const tasks = this.tasks.buckets | ||
this.tasks.buckets = [] | ||
for (const [_, toRun] of tasks) { | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i]() | ||
} | ||
} | ||
@@ -184,10 +228,70 @@ } | ||
* @since 1.0.0 | ||
* @category schedulers | ||
* @category constructors | ||
*/ | ||
export const timeBased: Scheduler = { | ||
scheduleTask(task) { | ||
setTimeout(() => { | ||
task() | ||
}, 0) | ||
export const makeMatrix = (...record: Array<[number, Scheduler]>): Scheduler => { | ||
const index = record.sort(([p0], [p1]) => p0 < p1 ? -1 : p0 > p1 ? 1 : 0) | ||
return { | ||
scheduleTask(task, priority) { | ||
let scheduler: Scheduler | undefined = undefined | ||
for (const i of index) { | ||
if (priority >= i[0]) { | ||
scheduler = i[1] | ||
} else { | ||
return (scheduler ?? defaultScheduler).scheduleTask(task, priority) | ||
} | ||
} | ||
return (scheduler ?? defaultScheduler).scheduleTask(task, priority) | ||
} | ||
} | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export const make = (scheduleTask: Scheduler["scheduleTask"]): Scheduler => ({ scheduleTask }) | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export const makeBatched = (callback: (runBatch: () => void) => void) => { | ||
let running = false | ||
const tasks = new PriorityBuckets() | ||
const starveInternal = () => { | ||
const tasksToRun = tasks.buckets | ||
tasks.buckets = [] | ||
for (const [_, toRun] of tasksToRun) { | ||
for (let i = 0; i < toRun.length; i++) { | ||
toRun[i]() | ||
} | ||
} | ||
if (tasks.buckets.length === 0) { | ||
running = false | ||
} else { | ||
starve() | ||
} | ||
} | ||
const starve = () => callback(starveInternal) | ||
return make((task, priority) => { | ||
tasks.scheduleTask(task, priority) | ||
if (!running) { | ||
running = true | ||
starve() | ||
} | ||
}) | ||
} | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export const timer = (ms: number) => make((task) => setTimeout(task, ms)) | ||
/** | ||
* @since 1.0.0 | ||
* @category constructors | ||
*/ | ||
export const timerBatched = (ms: number) => makeBatched((task) => setTimeout(task, ms)) |
@@ -9,4 +9,4 @@ /** | ||
import type * as Exit from "@effect/io/Exit" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as fiberRuntime from "@effect/io/internal_effect_untraced/fiberRuntime" | ||
import * as core from "@effect/io/internal/core" | ||
import * as fiberRuntime from "@effect/io/internal/fiberRuntime" | ||
@@ -13,0 +13,0 @@ /** |
@@ -9,3 +9,3 @@ /** | ||
import type * as Exit from "@effect/io/Exit" | ||
import * as internal from "@effect/io/internal_effect_untraced/scopedCache" | ||
import * as internal from "@effect/io/internal/scopedCache" | ||
import type * as Scope from "@effect/io/Scope" | ||
@@ -117,5 +117,7 @@ | ||
export const make: <Key, Environment, Error, Value>( | ||
capacity: number, | ||
timeToLive: Duration.Duration, | ||
lookup: Lookup<Key, Environment, Error, Value> | ||
options: { | ||
readonly lookup: Lookup<Key, Environment, Error, Value> | ||
readonly capacity: number | ||
readonly timeToLive: Duration.DurationInput | ||
} | ||
) => Effect.Effect<Scope.Scope | Environment, never, ScopedCache<Key, Error, Value>> = internal.make | ||
@@ -132,5 +134,7 @@ | ||
export const makeWith: <Key, Environment, Error, Value>( | ||
capacity: number, | ||
lookup: Lookup<Key, Environment, Error, Value>, | ||
timeToLive: (exit: Exit.Exit<Error, Value>) => Duration.Duration | ||
options: { | ||
readonly capacity: number | ||
readonly lookup: Lookup<Key, Environment, Error, Value> | ||
readonly timeToLive: (exit: Exit.Exit<Error, Value>) => Duration.DurationInput | ||
} | ||
) => Effect.Effect<Scope.Scope | Environment, never, ScopedCache<Key, Error, Value>> = internal.makeWith | ||
@@ -137,0 +141,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
import type * as Effect from "@effect/io/Effect" | ||
import * as internal from "@effect/io/internal_effect_untraced/scopedRef" | ||
import * as internal from "@effect/io/internal/scopedRef" | ||
import type * as Synchronized from "@effect/io/Ref/Synchronized" | ||
@@ -9,0 +9,0 @@ import type * as Scope from "@effect/io/Scope" |
@@ -14,5 +14,5 @@ /** | ||
import type * as Fiber from "@effect/io/Fiber" | ||
import * as core from "@effect/io/internal_effect_untraced/core" | ||
import * as circular from "@effect/io/internal_effect_untraced/layer/circular" | ||
import * as internal from "@effect/io/internal_effect_untraced/supervisor" | ||
import * as core from "@effect/io/internal/core" | ||
import * as circular from "@effect/io/internal/layer/circular" | ||
import * as internal from "@effect/io/internal/supervisor" | ||
import type * as Layer from "@effect/io/Layer" | ||
@@ -146,4 +146,3 @@ | ||
*/ | ||
export const track: (_: void) => Effect.Effect<never, never, Supervisor<Array<Fiber.RuntimeFiber<any, any>>>> = | ||
internal.track | ||
export const track: Effect.Effect<never, never, Supervisor<Array<Fiber.RuntimeFiber<any, any>>>> = internal.track | ||
@@ -150,0 +149,0 @@ /** |
@@ -8,4 +8,4 @@ /** | ||
import type * as Exit from "@effect/io/Exit" | ||
import * as defaultServices from "@effect/io/internal_effect_untraced/defaultServices" | ||
import * as internal from "@effect/io/internal_effect_untraced/tracer" | ||
import * as defaultServices from "@effect/io/internal/defaultServices" | ||
import * as internal from "@effect/io/internal/tracer" | ||
@@ -61,3 +61,2 @@ /** | ||
readonly _tag: "ExternalSpan" | ||
readonly name: string | ||
readonly spanId: string | ||
@@ -64,0 +63,0 @@ readonly traceId: string |
@@ -118,3 +118,3 @@ /** | ||
*/ | ||
export declare const track: (_: void) => Effect.Effect<never, never, Supervisor<Array<Fiber.RuntimeFiber<any, any>>>>; | ||
export declare const track: Effect.Effect<never, never, Supervisor<Array<Fiber.RuntimeFiber<any, any>>>>; | ||
/** | ||
@@ -121,0 +121,0 @@ * Unsafely creates a new supervisor that tracks children in a set. |
@@ -7,5 +7,5 @@ "use strict"; | ||
exports.unsafeTrack = exports.track = exports.none = exports.fromEffect = exports.fibersIn = exports.addSupervisor = exports.SupervisorTypeId = exports.AbstractSupervisor = void 0; | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/core")); | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/layer/circular")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/supervisor")); | ||
var core = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/core")); | ||
var circular = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/layer/circular")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/supervisor")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -12,0 +12,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
@@ -47,3 +47,2 @@ /** | ||
readonly _tag: "ExternalSpan"; | ||
readonly name: string; | ||
readonly spanId: string; | ||
@@ -50,0 +49,0 @@ readonly traceId: string; |
@@ -7,4 +7,4 @@ "use strict"; | ||
exports.tracerWith = exports.make = exports.TracerTypeId = exports.Tracer = void 0; | ||
var defaultServices = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/defaultServices")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal_effect_untraced/tracer")); | ||
var defaultServices = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/defaultServices")); | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/internal/tracer")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -11,0 +11,0 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1023
6329677
113072
1
+ Added@effect/data@0.13.6(transitive)
- Removed@effect/data@0.12.10(transitive)
Updated@effect/data@^0.13.0