Commit 6f00ea4 1 parent e33149b commit 6f00ea4 Copy full SHA for 6f00ea4
File tree 6 files changed +13
-13
lines changed
6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { COMPRESSIBLE_CONTENT_TYPE_REGEX } from 'hono/utils/compress'
3
3
import {
4
4
CACHECONTROL_NOTRANSFORM_REGEXP ,
5
5
CLOUDFLARE_WORKERS_NAVIGATOR ,
6
- } from '. /constants'
6
+ } from '~ /constants'
7
7
8
8
export const isCloudflareWorkers =
9
9
globalThis . navigator ?. userAgent === CLOUDFLARE_WORKERS_NAVIGATOR
Original file line number Diff line number Diff line change 1
- export { compress , compress as default } from '. /middleware'
2
- export * from '. /streams'
3
- export * from '. /types'
1
+ export { compress , compress as default } from '~ /middleware'
2
+ export * from '~ /streams'
3
+ export * from '~ /types'
Original file line number Diff line number Diff line change 1
1
import type { Context , MiddlewareHandler } from 'hono'
2
2
3
- import type { CompressionEncoding , CompressionFilter , CompressOptions } from '. /types'
3
+ import type { CompressionEncoding , CompressionFilter , CompressOptions } from '~ /types'
4
4
5
5
import {
6
6
ACCEPTED_ENCODINGS ,
7
7
BROTLI_LEVEL ,
8
8
THRESHOLD_SIZE ,
9
9
ZLIB_LEVEL ,
10
10
ZSTD_LEVEL ,
11
- } from '. /constants'
11
+ } from '~ /constants'
12
12
import {
13
13
isCloudflareWorkers ,
14
14
isDenoDeploy ,
15
15
shouldCompress ,
16
16
shouldTransform ,
17
17
zlib ,
18
- } from '. /helpers'
18
+ } from '~ /helpers'
19
19
import {
20
20
BrotliCompressionStream ,
21
21
ZlibCompressionStream ,
22
22
ZstdCompressionStream ,
23
- } from '. /streams'
23
+ } from '~ /streams'
24
24
25
25
function checkCompressEncodings ( encodings : CompressionEncoding [ ] ) {
26
26
const unsupportedEncoding : string | undefined = encodings . find (
Original file line number Diff line number Diff line change 1
1
import zstd from '@mongodb-js/zstd'
2
2
3
- import type { NodeCompressionEncoding , NodeCompressionOptions } from '. /types'
3
+ import type { NodeCompressionEncoding , NodeCompressionOptions } from '~ /types'
4
4
5
- import { brotli , zlib } from '. /helpers'
5
+ import { brotli , zlib } from '~ /helpers'
6
6
7
7
export class ZstdCompressionStream extends TransformStream {
8
8
constructor ( level ?: number ) {
Original file line number Diff line number Diff line change 1
1
import type { Context } from 'hono'
2
2
import type { BrotliOptions , ZlibOptions } from 'node:zlib'
3
3
4
- import type { ACCEPTED_ENCODINGS , NODE_ENCODINGS } from '. /constants'
4
+ import type { ACCEPTED_ENCODINGS , NODE_ENCODINGS } from '~ /constants'
5
5
6
6
export type CompressionEncoding = ( typeof ACCEPTED_ENCODINGS ) [ number ]
7
7
Original file line number Diff line number Diff line change 1
1
import { describe , expect , it } from 'bun:test'
2
2
import { type Context , Hono } from 'hono'
3
3
4
- import type { CompressionEncoding } from '../src /types'
4
+ import type { CompressionEncoding } from '~ /types'
5
5
6
- import { compress } from '../src '
6
+ import { compress } from '~/middleware '
7
7
8
8
const TEXT = `
9
9
もしも願いが一つ叶うなら
You can’t perform that action at this time.
0 commit comments