mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
[ci] format
This commit is contained in:
parent
21e0757ea2
commit
b18d4bf3b1
3 changed files with 20 additions and 24 deletions
|
@ -92,11 +92,7 @@ export function createAPIContext({
|
||||||
type ResponseParameters = ConstructorParameters<typeof Response>;
|
type ResponseParameters = ConstructorParameters<typeof Response>;
|
||||||
|
|
||||||
export class ResponseWithEncoding extends Response {
|
export class ResponseWithEncoding extends Response {
|
||||||
constructor(
|
constructor(body: ResponseParameters[0], init: ResponseParameters[1], encoding?: BufferEncoding) {
|
||||||
body: ResponseParameters[0],
|
|
||||||
init: ResponseParameters[1],
|
|
||||||
encoding?: BufferEncoding
|
|
||||||
) {
|
|
||||||
// If a body string is given, try to encode it to preserve the behaviour as simple objects.
|
// If a body string is given, try to encode it to preserve the behaviour as simple objects.
|
||||||
// We don't do the full handling as simple objects so users can control how headers are set instead.
|
// We don't do the full handling as simple objects so users can control how headers are set instead.
|
||||||
if (typeof body === 'string') {
|
if (typeof body === 'string') {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import crypto from 'node:crypto';
|
|
||||||
import buffer from 'node:buffer';
|
import buffer from 'node:buffer';
|
||||||
|
import crypto from 'node:crypto';
|
||||||
|
|
||||||
export function apply() {
|
export function apply() {
|
||||||
// Remove when Node 18 is dropped for Node 20
|
// Remove when Node 18 is dropped for Node 20
|
||||||
|
|
Loading…
Reference in a new issue