Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jan 27, 2025
1 parent 8fe3c39 commit 178138c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,48 +115,3 @@ export interface CookieSerializeOptions {
*/
secure?: boolean | undefined;
}

/**
* Additional parsing options
*/
export interface CookieParseOptions {
/**
* Specifies a function that will be used to decode a cookie's value. Since
* the value of a cookie has a limited character set (and must be a simple
* string), this function can be used to decode a previously-encoded cookie
* value into a JavaScript string or other object.
*
* The default function is the global `decodeURIComponent`, which will decode
* any URL-encoded sequences into their byte representations.
*
* *Note* if an error is thrown from this function, the original, non-decoded
* cookie value will be returned as the cookie's value.
*/
decode?(value: string): string;
}

/**
* Parse an HTTP Cookie header string and returning an object of all cookie
* name-value pairs.
*
* @param str the string representing a `Cookie` header value
* @param [options] object containing parsing options
*/
export function parse(
str: string,
options?: CookieParseOptions,
): Record<string, string>;

/**
* Serialize a cookie name-value pair into a `Set-Cookie` header string.
*
* @param name the name for the cookie
* @param value value to set the cookie to
* @param [options] object containing serialization options
* @throws {TypeError} when `maxAge` options is invalid
*/
export function serialize(
name: string,
value: string,
options?: CookieSerializeOptions,
): string;
2 changes: 1 addition & 1 deletion packages/engine.io/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type { Duplex } from "stream";
import { WebTransport } from "./transports/webtransport";
import { createPacketDecoderStream } from "engine.io-parser";
import type { EngineRequest } from "./transport";
import { CookieSerializeOptions } from "./contrib/cookie.types";
import type { CookieSerializeOptions } from "./contrib/types.cookie";

const debug = debugModule("engine");

Expand Down

0 comments on commit 178138c

Please sign in to comment.