Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@effect/platform

Package Overview
Dependencies
Maintainers
3
Versions
398
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect/platform - npm Package Compare versions

Comparing version 0.10.4 to 0.11.0

README.md

20

package.json
{
"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"
}
}

130

src/Effectify.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc