@effect/platform 0.49.0 → 0.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/FileSystem.js +8 -1
- package/dist/cjs/FileSystem.js.map +1 -1
- package/dist/cjs/Http/Headers.js +3 -3
- package/dist/cjs/Http/Headers.js.map +1 -1
- package/dist/cjs/Http/UrlParams.js +12 -12
- package/dist/cjs/Http/UrlParams.js.map +1 -1
- package/dist/cjs/PlatformConfigProvider.js +2 -2
- package/dist/cjs/PlatformConfigProvider.js.map +1 -1
- package/dist/cjs/Template.js.map +1 -1
- package/dist/cjs/internal/http/multiplex.js +2 -2
- package/dist/cjs/internal/http/multiplex.js.map +1 -1
- package/dist/cjs/internal/worker.js +2 -2
- package/dist/cjs/internal/worker.js.map +1 -1
- package/dist/dts/FileSystem.d.ts +11 -0
- package/dist/dts/FileSystem.d.ts.map +1 -1
- package/dist/dts/Http/UrlParams.d.ts.map +1 -1
- package/dist/dts/Template.d.ts.map +1 -1
- package/dist/esm/FileSystem.js +6 -0
- package/dist/esm/FileSystem.js.map +1 -1
- package/dist/esm/Http/Headers.js +3 -3
- package/dist/esm/Http/Headers.js.map +1 -1
- package/dist/esm/Http/UrlParams.js +12 -12
- package/dist/esm/Http/UrlParams.js.map +1 -1
- package/dist/esm/PlatformConfigProvider.js +2 -2
- package/dist/esm/PlatformConfigProvider.js.map +1 -1
- package/dist/esm/Template.js.map +1 -1
- package/dist/esm/internal/http/multiplex.js +2 -2
- package/dist/esm/internal/http/multiplex.js.map +1 -1
- package/dist/esm/internal/worker.js +2 -2
- package/dist/esm/internal/worker.js.map +1 -1
- package/package.json +3 -3
- package/src/FileSystem.ts +13 -0
- package/src/Http/Headers.ts +4 -4
- package/src/Http/UrlParams.ts +14 -14
- package/src/PlatformConfigProvider.ts +2 -2
- package/src/Template.ts +4 -5
- package/src/internal/http/multiplex.ts +2 -2
- package/src/internal/worker.ts +2 -2
package/src/Template.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* @since 1.0.0
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect"
|
|
5
|
-
import type * as core from "effect/internal/core"
|
|
6
5
|
import * as Option from "effect/Option"
|
|
7
6
|
import * as Predicate from "effect/Predicate"
|
|
8
7
|
import * as Stream from "effect/Stream"
|
|
@@ -82,7 +81,7 @@ export function make<A extends ReadonlyArray<Interpolated>>(
|
|
|
82
81
|
if (Option.isOption(arg)) {
|
|
83
82
|
values[i] = arg._tag === "Some" ? primitiveToString(arg.value) : ""
|
|
84
83
|
} else if (isSuccess(arg)) {
|
|
85
|
-
values[i] = primitiveToString(arg
|
|
84
|
+
values[i] = primitiveToString((arg as any).effect_instruction_i0)
|
|
86
85
|
} else if (Effect.isEffect(arg)) {
|
|
87
86
|
effects.push([i, arg])
|
|
88
87
|
} else {
|
|
@@ -131,7 +130,7 @@ export function stream<A extends ReadonlyArray<InterpolatedWithStream>>(
|
|
|
131
130
|
if (Option.isOption(arg)) {
|
|
132
131
|
buffer += arg._tag === "Some" ? primitiveToString(arg.value) : ""
|
|
133
132
|
} else if (isSuccess(arg)) {
|
|
134
|
-
buffer += primitiveToString(arg
|
|
133
|
+
buffer += primitiveToString((arg as any).effect_instruction_i0)
|
|
135
134
|
} else if (Predicate.hasProperty(arg, Stream.StreamTypeId)) {
|
|
136
135
|
if (buffer.length > 0) {
|
|
137
136
|
chunks.push(buffer)
|
|
@@ -194,6 +193,6 @@ function consolidate(
|
|
|
194
193
|
return out + strings[strings.length - 1]
|
|
195
194
|
}
|
|
196
195
|
|
|
197
|
-
function isSuccess(u: unknown)
|
|
198
|
-
return Effect.isEffect(u) && (u as
|
|
196
|
+
function isSuccess(u: unknown) {
|
|
197
|
+
return Effect.isEffect(u) && (u as any)._op === "Success"
|
|
199
198
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as Arr from "effect/Array"
|
|
2
2
|
import * as Effect from "effect/Effect"
|
|
3
3
|
import * as Effectable from "effect/Effectable"
|
|
4
4
|
import { dual } from "effect/Function"
|
|
@@ -72,7 +72,7 @@ export const make = <R, E>(
|
|
|
72
72
|
apps: Iterable<
|
|
73
73
|
readonly [predicate: (request: ServerRequest.ServerRequest) => Effect.Effect<boolean, E, R>, app: App.Default<E, R>]
|
|
74
74
|
>
|
|
75
|
-
): Multiplex.Multiplex<E, R> => new MultiplexImpl(
|
|
75
|
+
): Multiplex.Multiplex<E, R> => new MultiplexImpl(Arr.fromIterable(apps))
|
|
76
76
|
|
|
77
77
|
/** @internal */
|
|
78
78
|
export const add = dual<
|
package/src/internal/worker.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from "@effect/schema/Schema"
|
|
2
2
|
import * as Serializable from "@effect/schema/Serializable"
|
|
3
|
-
import * as
|
|
3
|
+
import * as Arr from "effect/Array"
|
|
4
4
|
import * as Cause from "effect/Cause"
|
|
5
5
|
import * as Channel from "effect/Channel"
|
|
6
6
|
import * as Chunk from "effect/Chunk"
|
|
@@ -240,7 +240,7 @@ export const makeManager = Effect.gen(function*(_) {
|
|
|
240
240
|
const executeEffect = (request: I) =>
|
|
241
241
|
Effect.acquireUseRelease(
|
|
242
242
|
executeAcquire(request),
|
|
243
|
-
([, queue]) => Effect.flatMap(Queue.take(queue), Exit.map(
|
|
243
|
+
([, queue]) => Effect.flatMap(Queue.take(queue), Exit.map(Arr.unsafeGet(0))),
|
|
244
244
|
executeRelease
|
|
245
245
|
)
|
|
246
246
|
|