@effect/platform
Advanced tools
Comparing version 0.10.4 to 0.11.0
{ | ||
"name": "@effect/platform", | ||
"version": "0.10.4", | ||
"version": "0.11.0", | ||
"description": "Unified interfaces for common platform-specific services", | ||
"license": "MIT", | ||
@@ -9,12 +10,5 @@ "repository": { | ||
}, | ||
"dependencies": { | ||
"@effect/data": "^0.17.1", | ||
"@effect/io": "^0.37.0", | ||
"@effect/stream": "^0.33.0", | ||
"path-browserify": "^1.0.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"sideEffects": [], | ||
"exports": { | ||
@@ -31,3 +25,13 @@ "./*": { | ||
} | ||
}, | ||
"sideEffects": [], | ||
"author": "Effect contributors", | ||
"dependencies": { | ||
"path-browserify": "^1.0.1" | ||
}, | ||
"peerDependencies": { | ||
"@effect/data": "^0.17.1", | ||
"@effect/io": "^0.38.0", | ||
"@effect/stream": "^0.34.0" | ||
} | ||
} |
@@ -32,13 +32,13 @@ /** | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
(...args: Args7): Effect.Effect<never, E, WithoutNull<A7>> | ||
(...args: Args8): Effect.Effect<never, E, WithoutNull<A8>> | ||
(...args: Args9): Effect.Effect<never, E, WithoutNull<A9>> | ||
(...args: Args10): Effect.Effect<never, E, WithoutNull<A10>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
(...args: Args7): Effect.Effect<never, E, WithoutNull<A7>> | ||
(...args: Args8): Effect.Effect<never, E, WithoutNull<A8>> | ||
(...args: Args9): Effect.Effect<never, E, WithoutNull<A9>> | ||
(...args: Args10): Effect.Effect<never, E, WithoutNull<A10>> | ||
} | ||
: T extends { | ||
@@ -55,12 +55,12 @@ (...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
(...args: Args7): Effect.Effect<never, E, WithoutNull<A7>> | ||
(...args: Args8): Effect.Effect<never, E, WithoutNull<A8>> | ||
(...args: Args9): Effect.Effect<never, E, WithoutNull<A9>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
(...args: Args7): Effect.Effect<never, E, WithoutNull<A7>> | ||
(...args: Args8): Effect.Effect<never, E, WithoutNull<A8>> | ||
(...args: Args9): Effect.Effect<never, E, WithoutNull<A9>> | ||
} | ||
: T extends { | ||
@@ -76,11 +76,11 @@ (...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
(...args: Args7): Effect.Effect<never, E, WithoutNull<A7>> | ||
(...args: Args8): Effect.Effect<never, E, WithoutNull<A8>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
(...args: Args7): Effect.Effect<never, E, WithoutNull<A7>> | ||
(...args: Args8): Effect.Effect<never, E, WithoutNull<A8>> | ||
} | ||
: T extends { | ||
@@ -95,10 +95,10 @@ (...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
(...args: Args7): Effect.Effect<never, E, WithoutNull<A7>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
(...args: Args7): Effect.Effect<never, E, WithoutNull<A7>> | ||
} | ||
: T extends { | ||
@@ -112,9 +112,9 @@ (...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
(...args: Args6): Effect.Effect<never, E, WithoutNull<A6>> | ||
} | ||
: T extends { | ||
@@ -127,8 +127,8 @@ (...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
(...args: Args5): Effect.Effect<never, E, WithoutNull<A5>> | ||
} | ||
: T extends { | ||
@@ -140,7 +140,7 @@ (...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
(...args: Args4): Effect.Effect<never, E, WithoutNull<A4>> | ||
} | ||
: T extends { | ||
@@ -151,6 +151,6 @@ (...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
(...args: Args3): Effect.Effect<never, E, WithoutNull<A3>> | ||
} | ||
: T extends { | ||
@@ -160,10 +160,10 @@ (...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
(...args: Args2): Effect.Effect<never, E, WithoutNull<A2>> | ||
} | ||
: T extends { | ||
(...args: ArgsWithCallback<infer Args1, infer _E1, infer A1>): infer _R1 | ||
} ? { | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
} | ||
(...args: Args1): Effect.Effect<never, E, WithoutNull<A1>> | ||
} | ||
: never | ||
@@ -170,0 +170,0 @@ |
@@ -175,10 +175,10 @@ import { Tag } from "@effect/data/Context" | ||
export const withGroup = (options?: { label?: string; collapsed?: boolean }) => | ||
<R, E, A>( | ||
self: Effect.Effect<R, E, A> | ||
) => Effect.flatMap(Console, (_) => _.withGroup(options)(self)) | ||
<R, E, A>( | ||
self: Effect.Effect<R, E, A> | ||
) => Effect.flatMap(Console, (_) => _.withGroup(options)(self)) | ||
/** @internal */ | ||
export const withTime = (label?: string) => | ||
<R, E, A>( | ||
self: Effect.Effect<R, E, A> | ||
) => Effect.flatMap(Console, (_) => _.withTime(label)(self)) | ||
<R, E, A>( | ||
self: Effect.Effect<R, E, A> | ||
) => Effect.flatMap(Console, (_) => _.withTime(label)(self)) |
@@ -18,15 +18,15 @@ import * as Effect from "@effect/io/Effect" | ||
(<A>(fn: Function, onError?: (e: any, args: any) => any, onSyncError?: (e: any, args: any) => any) => | ||
(...args: Array<any>) => | ||
Effect.async<never, Error, A>((resume) => { | ||
try { | ||
fn(...args, (err: Error | null, result: A) => { | ||
if (err) { | ||
resume(Effect.fail(onError ? onError(err, args) : err)) | ||
} else { | ||
resume(Effect.succeed(result)) | ||
} | ||
}) | ||
} catch (err) { | ||
resume(onSyncError ? Effect.fail(onSyncError(err, args)) : Effect.die(err)) | ||
} | ||
})) as any | ||
(...args: Array<any>) => | ||
Effect.async<never, Error, A>((resume) => { | ||
try { | ||
fn(...args, (err: Error | null, result: A) => { | ||
if (err) { | ||
resume(Effect.fail(onError ? onError(err, args) : err)) | ||
} else { | ||
resume(Effect.succeed(result)) | ||
} | ||
}) | ||
} catch (err) { | ||
resume(onSyncError ? Effect.fail(onSyncError(err, args)) : Effect.die(err)) | ||
} | ||
})) as any |
@@ -9,4 +9,4 @@ import * as Data from "@effect/data/Data" | ||
const make = <A extends Error.PlatformError>(tag: A["_tag"]) => | ||
(props: Omit<A, Error.PlatformError.ProvidedFields>): A => | ||
const make = | ||
<A extends Error.PlatformError>(tag: A["_tag"]) => (props: Omit<A, Error.PlatformError.ProvidedFields>): A => | ||
Data.struct({ | ||
@@ -13,0 +13,0 @@ [PlatformErrorTypeId]: PlatformErrorTypeId, |
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
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
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
316569
112
1
0
4
+ Added@effect/io@0.38.2(transitive)
+ Added@effect/stream@0.34.0(transitive)
- Removed@effect/data@^0.17.1
- Removed@effect/io@^0.37.0
- Removed@effect/stream@^0.33.0
- Removed@effect/io@0.37.1(transitive)
- Removed@effect/stream@0.33.0(transitive)