0.1.15 #16

Merged
Thilawyn merged 12 commits from next into master 2024-09-04 00:33:45 +02:00
Showing only changes of commit c1a9d30db6 - Show all commits

View File

@@ -1,29 +1,44 @@
// import { StudioServer } from "@prisma/studio-server" // import { StudioServer } from "@prisma/studio-server"
// import { Config, Effect, Layer } from "effect" // import { Config, Effect, Layer } from "effect"
// import proxy from "express-http-proxy"
// import { ExpressApp } from "../http/ExpressApp.service"
// import { PrismaClient } from "./PrismaClient.service"
// export const PrismaStudioRouteLive = ({ // export const PrismaStudioRoute = ({
// httpRoot = Config.succeed("/studio"),
// httpPort = Config.succeed(5555), // httpPort = Config.succeed(5555),
// schemaPath = Config.succeed(""), // schemaPath = Config.succeed(""),
// schemaText = Config.succeed(""), // schemaText = Config.succeed(""),
// }: { // }: {
// httpPort: Config.Config<number> // readonly httpRoot?: Config.Config<string>
// schemaPath: Config.Config<string> // readonly httpPort?: Config.Config<number>
// schemaText: Config.Config<string> // readonly schemaPath?: Config.Config<string>
// }) => // readonly schemaText?: Config.Config<string>
// Layer.effectDiscard(Effect.gen(function*() { // } = {}) =>
// Layer.effectDiscard(Effect.acquireRelease(
// return Effect.acquireRelease(
// Effect.gen(function*() { // Effect.gen(function*() {
// const prisma = yield* PrismaClient
// const app = yield* ExpressApp
// const port = yield* httpPort
// const server = new StudioServer({ // const server = new StudioServer({
// port: yield* httpPort, // port,
// schemaPath: yield* schemaPath, // schemaPath: yield* schemaPath,
// schemaText: yield* schemaText, // schemaText: yield* schemaText,
// versions: { prisma: prisma.Prisma.prismaVersion.client },
// }) // })
// app.use(yield* httpRoot, proxy(`http://localhost:${ port }`))
// yield* Effect.promise(() => server.start())
// return server
// }), // }),
// () => Effect.gen(function*() { // server => Effect.sync(() => server.stop()),
// ))
// }),
// ) // export const PrismaStudioRouteLive = Layer.empty
// })) // export const PrismaStudioRouteDebug = PrismaStudioRoute()