@remix-run/compression-middleware 0.1.3 → 0.1.4
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.
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { BrotliOptions, ZlibOptions } from 'node:zlib';
|
|
2
2
|
import type { Middleware } from '@remix-run/fetch-router';
|
|
3
3
|
type Encoding = 'br' | 'gzip' | 'deflate';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for automatic response compression.
|
|
6
|
+
*/
|
|
4
7
|
export interface CompressionOptions {
|
|
5
8
|
/**
|
|
6
9
|
* Minimum size in bytes to compress (only enforced if Content-Length present).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compression.d.ts","sourceRoot":"","sources":["../../src/lib/compression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAIzD,KAAK,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;AAEzC,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IAEhD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,QAAQ,EAAE,CAAC,CAAA;IAE7D;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,WAAW,CAAC,CAAA;IAE1D;;;;;OAKG;IACH,MAAM,CAAC,EAAE,aAAa,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,aAAa,CAAC,CAAA;CACjE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,UAAU,CAwCpE"}
|
|
1
|
+
{"version":3,"file":"compression.d.ts","sourceRoot":"","sources":["../../src/lib/compression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAIzD,KAAK,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;AAEzC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IAEhD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,QAAQ,EAAE,CAAC,CAAA;IAE7D;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,WAAW,CAAC,CAAA;IAE1D;;;;;OAKG;IACH,MAAM,CAAC,EAAE,aAAa,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,aAAa,CAAC,CAAA;CACjE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,UAAU,CAwCpE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remix-run/compression-middleware",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Middleware for compressing HTTP responses",
|
|
5
5
|
"author": "Michael Jackson <mjijackson@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^24.6.0",
|
|
30
30
|
"@typescript/native-preview": "7.0.0-dev.20251125.1",
|
|
31
|
-
"@remix-run/fetch-router": "0.
|
|
31
|
+
"@remix-run/fetch-router": "0.18.0",
|
|
32
32
|
"@remix-run/response": "0.3.2",
|
|
33
33
|
"@remix-run/mime": "0.4.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@remix-run/fetch-router": "^0.
|
|
37
|
-
"@remix-run/
|
|
38
|
-
"@remix-run/
|
|
36
|
+
"@remix-run/fetch-router": "^0.18.0",
|
|
37
|
+
"@remix-run/response": "^0.3.2",
|
|
38
|
+
"@remix-run/mime": "^0.4.0"
|
|
39
39
|
},
|
|
40
40
|
"keywords": [
|
|
41
41
|
"fetch",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsgo -p tsconfig.build.json",
|
|
51
51
|
"clean": "git clean -fdX",
|
|
52
|
-
"test": "node --
|
|
52
|
+
"test": "node --test",
|
|
53
53
|
"typecheck": "tsgo --noEmit"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/src/lib/compression.ts
CHANGED
|
@@ -5,6 +5,9 @@ import { isCompressibleMimeType } from '@remix-run/mime'
|
|
|
5
5
|
|
|
6
6
|
type Encoding = 'br' | 'gzip' | 'deflate'
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for automatic response compression.
|
|
10
|
+
*/
|
|
8
11
|
export interface CompressionOptions {
|
|
9
12
|
/**
|
|
10
13
|
* Minimum size in bytes to compress (only enforced if Content-Length present).
|