( raw: string | undefined, )
| 1512 | }; |
| 1513 | |
| 1514 | const parseOptionalJsonObject = ( |
| 1515 | raw: string | undefined, |
| 1516 | ): Effect.Effect<Record<string, unknown> | undefined, Error> => |
| 1517 | raw === undefined |
| 1518 | ? Effect.succeed(undefined) |
| 1519 | : parseJsonObjectInput(raw).pipe( |
| 1520 | Effect.mapError((error) => new Error(`Invalid --content JSON: ${error.message}`)), |
| 1521 | ); |
| 1522 | |
| 1523 | const formatUnknownMessage = (cause: unknown): string => { |
| 1524 | if (cause instanceof Error) return cause.message; |
no test coverage detected