denolfe
denolfe
TTCTheo's Typesafe Cult
Created by tilman0902 on 4/13/2023 in #questions
looking for a e2e typed CMS ideally with tRPC and directly integrated in Next.js
Sure, I'd recommend joining the discord. No date set yet, but we'll be announcing it there. I'll DM as I don't know the policies here.
15 replies
TTCTheo's Typesafe Cult
Created by tilman0902 on 4/13/2023 in #questions
looking for a e2e typed CMS ideally with tRPC and directly integrated in Next.js
For Postgres, we're weighing options on the technical implementation of this. We're looking into whether we want to use one of the ORMs out there like Prisma or Drizzle. We have a "community call" coming up to chat about the options.
15 replies
TTCTheo's Typesafe Cult
Created by tilman0902 on 4/13/2023 in #questions
looking for a e2e typed CMS ideally with tRPC and directly integrated in Next.js
15 replies
TTCTheo's Typesafe Cult
Created by tilman0902 on 4/13/2023 in #questions
looking for a e2e typed CMS ideally with tRPC and directly integrated in Next.js
Postgres support coming next quarter 🙌 Feel free to DM 👍
15 replies
TTCTheo's Typesafe Cult
Created by redeemefy on 4/9/2023 in #questions
Backend deployments
@redeemefy Mostly node.js apps. Some auto-deploy from specific branches, and others have deploys triggered from GitHub Actions using their AppSpec API.
16 replies
TTCTheo's Typesafe Cult
Created by redeemefy on 4/9/2023 in #questions
Backend deployments
DigitalOcean's App Platform has been pretty great. No need to maintain infra, just pass in a few values and off it goes.
16 replies
TTCTheo's Typesafe Cult
Created by tilman0902 on 4/13/2023 in #questions
looking for a e2e typed CMS ideally with tRPC and directly integrated in Next.js
Have you checked out Payload yet? It seems like it checks all of your boxes: - Fully typed from your collection schema and types leveraged and inferred in querying API - Just released Vercel serverless support: https://github.com/payloadcms/next-payload - There are boilerplates running Payload/Next.js side-by-side (no serverless)
15 replies
TTCTheo's Typesafe Cult
Created by Patrick on 4/7/2023 in #questions
Best practices for typesafe error handling
A few things to add to this if you're making custom errors: - You'll want to take advantage of the cause property in the second parameter of the Error constructor to wrap the original error. This will preserve the original stack trace. - Be sure to set the prototype properly with Object.setPrototypeOf(this, MyCustomError.prototype). This will allow you to use if (error instanceof MyCustomError) Here is an example of using the above:
type ErrorCode =
| 'OTHER'
| 'SOME_FAILURE'
| 'ANOTHER_TYPE_OF_FAILURE'

export interface MyCustomErrorProps {
message: string
/** Original error */
cause?: unknown
code?: ErrorCode
}

export class MyCustomError extends Error {
code: ErrorCode
constructor(props: MyCustomErrorProps) {
super(props.message, (props.cause instanceof Error && { cause: props.cause }) || undefined)
this.name = this.constructor.name
this.code = props.code || 'OTHER'

Error.captureStackTrace(this)
Object.setPrototypeOf(this, MyCustomError.prototype)
}
}
type ErrorCode =
| 'OTHER'
| 'SOME_FAILURE'
| 'ANOTHER_TYPE_OF_FAILURE'

export interface MyCustomErrorProps {
message: string
/** Original error */
cause?: unknown
code?: ErrorCode
}

export class MyCustomError extends Error {
code: ErrorCode
constructor(props: MyCustomErrorProps) {
super(props.message, (props.cause instanceof Error && { cause: props.cause }) || undefined)
this.name = this.constructor.name
this.code = props.code || 'OTHER'

Error.captureStackTrace(this)
Object.setPrototypeOf(this, MyCustomError.prototype)
}
}
19 replies