hono 4.7.8 → 4.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,7 +105,7 @@ const setSignedCookie = async (c, name, value, secret, opt) => {
105
105
  c.header("set-cookie", cookie, { append: true });
106
106
  };
107
107
  const deleteCookie = (c, name, opt) => {
108
- const deletedCookie = getCookie(c, name);
108
+ const deletedCookie = getCookie(c, name, opt?.prefix);
109
109
  setCookie(c, name, "", { ...opt, maxAge: 0 });
110
110
  return deletedCookie;
111
111
  };
@@ -240,7 +240,9 @@ const toSSG = async (app, fs, options) => {
240
240
  return;
241
241
  }
242
242
  for (const content of getContentGen) {
243
- savePromises.push(saveContentToFile(content, fs, outputDir).catch((e) => e));
243
+ savePromises.push(
244
+ saveContentToFile(content, fs, outputDir, options?.extensionMap).catch((e) => e)
245
+ );
244
246
  }
245
247
  })
246
248
  );
@@ -79,7 +79,7 @@ var setSignedCookie = async (c, name, value, secret, opt) => {
79
79
  c.header("set-cookie", cookie, { append: true });
80
80
  };
81
81
  var deleteCookie = (c, name, opt) => {
82
- const deletedCookie = getCookie(c, name);
82
+ const deletedCookie = getCookie(c, name, opt?.prefix);
83
83
  setCookie(c, name, "", { ...opt, maxAge: 0 });
84
84
  return deletedCookie;
85
85
  };
@@ -212,7 +212,9 @@ var toSSG = async (app, fs, options) => {
212
212
  return;
213
213
  }
214
214
  for (const content of getContentGen) {
215
- savePromises.push(saveContentToFile(content, fs, outputDir).catch((e) => e));
215
+ savePromises.push(
216
+ saveContentToFile(content, fs, outputDir, options?.extensionMap).catch((e) => e)
217
+ );
216
218
  }
217
219
  })
218
220
  );
@@ -6,7 +6,7 @@ import type { Context } from '../../context';
6
6
  export type Runtime = "node" | "deno" | "bun" | "workerd" | "fastly" | "edge-light" | "other";
7
7
  export declare const env: <T extends Record<string, unknown>, C extends Context = Context<{
8
8
  Bindings: T;
9
- }, any, {}>>(c: T extends Record<string, unknown> ? Context : C, runtime?: Runtime) => T & C["env"];
9
+ }>>(c: T extends Record<string, unknown> ? Context : C, runtime?: Runtime) => T & C["env"];
10
10
  export declare const knownUserAgents: Partial<Record<Runtime, string>>;
11
11
  export declare const getRuntimeKey: () => Runtime;
12
12
  export declare const checkUserAgentEquals: (platform: string) => boolean;
@@ -7,12 +7,12 @@ import type { Cookie, CookieOptions, CookiePrefixOptions, SignedCookie } from '.
7
7
  interface GetCookie {
8
8
  (c: Context, key: string): string | undefined;
9
9
  (c: Context): Cookie;
10
- (c: Context, key: string, prefixOptions: CookiePrefixOptions): string | undefined;
10
+ (c: Context, key: string, prefixOptions?: CookiePrefixOptions): string | undefined;
11
11
  }
12
12
  interface GetSignedCookie {
13
13
  (c: Context, secret: string | BufferSource, key: string): Promise<string | undefined | false>;
14
- (c: Context, secret: string): Promise<SignedCookie>;
15
- (c: Context, secret: string | BufferSource, key: string, prefixOptions: CookiePrefixOptions): Promise<string | undefined | false>;
14
+ (c: Context, secret: string | BufferSource): Promise<SignedCookie>;
15
+ (c: Context, secret: string | BufferSource, key: string, prefixOptions?: CookiePrefixOptions): Promise<string | undefined | false>;
16
16
  }
17
17
  export declare const getCookie: GetCookie;
18
18
  export declare const getSignedCookie: GetSignedCookie;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "4.7.8",
3
+ "version": "4.7.9",
4
4
  "description": "Web framework built on Web Standards",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",