( raw: string | undefined, )
| 1489 | }; |
| 1490 | |
| 1491 | const parseOptionalJsonObject = ( |
| 1492 | raw: string | undefined, |
| 1493 | ): Effect.Effect<Record<string, unknown> | undefined, Error> => |
| 1494 | raw === undefined |
| 1495 | ? Effect.succeed(undefined) |
| 1496 | : parseJsonObjectInput(raw).pipe( |
| 1497 | Effect.mapError((error) => new Error(`Invalid --content JSON: ${error.message}`)), |
| 1498 | ); |
| 1499 | |
| 1500 | const formatUnknownMessage = (cause: unknown): string => { |
| 1501 | if (cause instanceof Error) return cause.message; |
no test coverage detected