Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/cli/src/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

import { USER_AGENT } from "./installation";

const refreshRegistry = IntegrationsRegistry.asEffect().pipe(
const refreshRegistry = IntegrationsRegistry.pipe(
Effect.flatMap((service) => service.refresh()),
Effect.asVoid,
);
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/src/account/account-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const AccountProviderMiddleware = HttpRouter.middleware<{ provides: AccountProvi
// over the per-request `UserStoreService` (postgres socket) supplied by
// the combined request-scoped layer.
const accountProvider = yield* Effect.provide(
AccountProvider.asEffect(),
AccountProvider,
workosAccountProvider.pipe(
Layer.provide(ApiKeyService.WorkOS),
Layer.provide(Layer.succeed(AccountCaller)({ session })),
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/src/api/protected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const ExecutionStackMiddleware = makeExecutionStackMiddleware<
>({
plugins: cloudPlugins,
authenticate: (request) =>
IdentityProvider.asEffect().pipe(Effect.flatMap((provider) => provider.authenticate(request))),
IdentityProvider.pipe(Effect.flatMap((provider) => provider.authenticate(request))),
strategy: cloudIdentityFailureStrategy,
stackLayer: CloudMeteredExecutionStackLayer,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/src/auth/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ export class UserStoreService extends Context.Service<UserStoreService, UserStor
"@executor-js/cloud/UserStoreService",
) {
static Live = Layer.effect(this)(
Effect.map(DbService.asEffect(), ({ db }) => makeService(makeUserStore(db))),
Effect.map(DbService, ({ db }) => makeService(makeUserStore(db))),
);
}
2 changes: 1 addition & 1 deletion apps/cloud/src/db/fuma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const cloudDbProviderLayer = (
tables: FumaTables,
): Layer.Layer<DbProvider, never, DbService> =>
Layer.effect(DbProvider)(
Effect.map(DbService.asEffect(), ({ db }): ExecutorDbHandle => {
Effect.map(DbService, ({ db }): ExecutorDbHandle => {
const fuma = createDrizzleFumaDb({
db,
tables,
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/src/engine/execution-stack-metered.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { withExecutionUsageTracking } from "./execution-usage";
// user-facing execution.
export const CloudMeteringEngineDecorator: Layer.Layer<EngineDecorator, never, AutumnService> =
Layer.effect(EngineDecorator)(
Effect.map(AutumnService.asEffect(), (autumn): EngineDecorator["Service"] => ({
Effect.map(AutumnService, (autumn): EngineDecorator["Service"] => ({
decorate: (engine, identity: EngineStackIdentity) =>
withExecutionUsageTracking(identity.organizationId, engine, (organizationId) =>
Effect.runFork(autumn.trackExecution(organizationId)),
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/src/extensions/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import { ApiErrorLoggingLive } from "../observability/error-logging";
// plane). Derived from the ambient router, exactly as `ExecutorApp.make` builds
// its own internal prefixed view for the protected API.
const apiPrefixedRouter = Layer.effect(HttpRouter.HttpRouter)(
Effect.map(HttpRouter.HttpRouter.asEffect(), (router) => router.prefixed("/api")),
Effect.map(HttpRouter.HttpRouter, (router) => router.prefixed("/api")),
);

// The full cloud OpenAPI spec, prefixed so the served paths match `/api/*`.
Expand Down
4 changes: 2 additions & 2 deletions apps/host-selfhost/src/admin/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
// ---------------------------------------------------------------------------

const requestHeaders = Effect.map(
HttpServerRequest.HttpServerRequest.asEffect(),
HttpServerRequest.HttpServerRequest,
(request): Headers => new Headers({ ...request.headers }),
);

Expand Down Expand Up @@ -127,7 +127,7 @@ export const makeSelfHostAdminApiLayer = ({
mountPrefix,
}: SelfHostAdminApiDeps) => {
const prefixedRouter = Layer.effect(HttpRouter.HttpRouter)(
Effect.map(HttpRouter.HttpRouter.asEffect(), (router) => router.prefixed(mountPrefix)),
Effect.map(HttpRouter.HttpRouter, (router) => router.prefixed(mountPrefix)),
);
return HttpApiBuilder.layer(AdminHttpApi).pipe(
Layer.provide(AdminHandlers),
Expand Down
2 changes: 1 addition & 1 deletion apps/host-selfhost/src/db/self-host-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const SelfHostDbProvider: Layer.Layer<DbProvider, never, SelfHostDb> = La
DbProvider,
)(
Effect.map(
SelfHostDb.asEffect(),
SelfHostDb,
(handle): ExecutorDbHandle => ({
db: handle.db,
fuma: handle.fuma,
Expand Down
2 changes: 1 addition & 1 deletion apps/host-selfhost/src/system/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const makeSelfHostSystemApiLayer = ({
mountPrefix,
}: SelfHostSystemApiDeps) => {
const prefixedRouter = Layer.effect(HttpRouter.HttpRouter)(
Effect.map(HttpRouter.HttpRouter.asEffect(), (router) => router.prefixed(mountPrefix)),
Effect.map(HttpRouter.HttpRouter, (router) => router.prefixed(mountPrefix)),
);
return HttpApiBuilder.layer(SystemHttpApi).pipe(
Layer.provide(SystemHandlers),
Expand Down
2 changes: 1 addition & 1 deletion apps/local/src/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ const createLocalExecutorLayer = () => {
export const createExecutorHandle = async () => {
const layer = createLocalExecutorLayer();
const runtime = ManagedRuntime.make(layer);
const bundle = await runtime.runPromise(LocalExecutorTag.asEffect());
const bundle = await runtime.runPromise(LocalExecutorTag);

return {
executor: bundle.executor,
Expand Down
2 changes: 1 addition & 1 deletion apps/local/src/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ const integrationsRuntime = ManagedRuntime.make(
* absorbed inside the forked fiber and the layer's catchCause handlers.
*/
export const startIntegrationsRefresh = (): void => {
integrationsRuntime.runFork(IntegrationsRegistry.asEffect());
integrationsRuntime.runFork(IntegrationsRegistry);
};
2 changes: 1 addition & 1 deletion apps/local/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const ServerHandlersLive = Layer.effect(ServerHandlersService)(
const serverHandlersRuntime = ManagedRuntime.make(ServerHandlersLive);

export const getServerHandlers = (): Promise<ServerHandlers> =>
serverHandlersRuntime.runPromise(ServerHandlersService.asEffect());
serverHandlersRuntime.runPromise(ServerHandlersService);

export const disposeServerHandlers = async (): Promise<void> => {
await Effect.runPromise(
Expand Down
36 changes: 15 additions & 21 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@
},
"packageManager": "bun@1.3.11",
"catalog": {
"effect": "4.0.0-beta.59",
"@effect/platform-bun": "4.0.0-beta.59",
"@effect/platform-node": "4.0.0-beta.59",
"@effect/atom-react": "4.0.0-beta.59",
"@effect/vitest": "4.0.0-beta.59",
"effect": "4.0.0-beta.66",
"@effect/platform-bun": "4.0.0-beta.66",
"@effect/platform-node": "4.0.0-beta.66",
"@effect/atom-react": "4.0.0-beta.66",
"@effect/vitest": "4.0.0-beta.66",
"@types/node": "^24.3.1",
"bun-types": "^1.2.22",
"drizzle-orm": "^0.45.0",
Expand Down Expand Up @@ -122,7 +122,7 @@
"quickjs-emscripten": "^0.31.0",
"@jitl/quickjs-wasmfile-release-sync": "0.31.0",
"tsup": "^8.5.0",
"@effect/opentelemetry": "4.0.0-beta.59"
"@effect/opentelemetry": "4.0.0-beta.66"
},
"patchedDependencies": {
"postgres@3.4.9": "patches/postgres@3.4.9.patch",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/api/src/account/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { AccountProvider, type AccountHeaders } from "./service";
// ---------------------------------------------------------------------------

const requestHeaders = Effect.map(
HttpServerRequest.HttpServerRequest.asEffect(),
HttpServerRequest.HttpServerRequest,
(req): AccountHeaders => ({ ...req.headers }),
);

Expand Down
4 changes: 2 additions & 2 deletions packages/core/api/src/server/executor-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export const make = <
const prefix = config.mountPrefix;
const prefixedRouter = prefix
? Layer.effect(HttpRouter.HttpRouter)(
Effect.map(HttpRouter.HttpRouter.asEffect(), (router) => router.prefixed(prefix)),
Effect.map(HttpRouter.HttpRouter, (router) => router.prefixed(prefix)),
)
: undefined;

Expand All @@ -399,7 +399,7 @@ export const make = <
const authenticate = (
request: Request,
): Effect.Effect<Principal, IdentityFailure, IdentityProvider> =>
Effect.flatMap(IdentityProvider.asEffect(), (provider) => provider.authenticate(request));
Effect.flatMap(IdentityProvider, (provider) => provider.authenticate(request));

// The per-request layer combined into the middleware: cloud's `requestScoped`
// (the postgres socket) with `providers.identity` PROVIDE-MERGEd over it, so the
Expand Down
Loading
Loading