@wnodex/compression 0.2.1 → 0.2.2
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.
- package/.turbo/turbo-build.log +2 -2
- package/README.md +56 -5
- package/package.json +9 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
> @wnodex/compression@0.2.
|
|
2
|
+
> @wnodex/compression@0.2.2 build /home/runner/work/wnodex/wnodex/packages/compression
|
|
3
3
|
> rolldown -c && tsc
|
|
4
4
|
|
|
5
5
|
[log] <DIR>/index.js chunk │ size: 0.80 kB
|
|
6
6
|
[log]
|
|
7
|
-
[success] rolldown v1.0.0-rc.1 Finished in
|
|
7
|
+
[success] rolldown v1.0.0-rc.1 Finished in 15.66 ms
|
package/README.md
CHANGED
|
@@ -1,14 +1,65 @@
|
|
|
1
1
|
# @wnodex/compression
|
|
2
2
|
|
|
3
|
-
wnodex compression middleware
|
|
3
|
+
> wnodex compression middleware
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Part of the [wnodex](https://github.com/wnodex/wnodex) ecosystem, this package provides compression middleware for `wnodex`.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## About
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`@wnodex/compression` integrates the `compression` middleware into your `wnodex` application. It enables gzip compression to decrease the size of the response body and increase the speed of your web app.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- Easy to enable or disable through the `wnodex` configuration.
|
|
14
|
+
- Uses the standard `compression` Express middleware.
|
|
15
|
+
- Improves application performance by reducing response sizes.
|
|
16
|
+
|
|
17
|
+
## Why use it?
|
|
18
|
+
|
|
19
|
+
Using this package allows you to manage response compression consistently with other `wnodex` features. It's a simple and effective way to improve your application's performance with minimal configuration.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
You can install the package using your favorite package manager:
|
|
24
|
+
|
|
25
|
+
**pnpm**
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm add @wnodex/compression
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**npm**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install @wnodex/compression
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**yarn**
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
yarn add @wnodex/compression
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**bun**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bun add @wnodex/compression
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
`@wnodex/compression` is enabled by default. To change this, you can pass the `compression` option to the `Wnodex` constructor.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { Wnodex } from 'wnodex';
|
|
55
|
+
|
|
56
|
+
// Example: Disable compression
|
|
57
|
+
const server = new Wnodex({
|
|
58
|
+
compression: false,
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
server.start();
|
|
62
|
+
```
|
|
12
63
|
|
|
13
64
|
## License
|
|
14
65
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wnodex/compression",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "wnodex compression
|
|
5
|
+
"description": "A wnodex middleware that integrates compression to enable gzip compression for responses.",
|
|
6
6
|
"keywords": [
|
|
7
|
-
"wnodex"
|
|
7
|
+
"wnodex",
|
|
8
|
+
"middleware",
|
|
9
|
+
"compression",
|
|
10
|
+
"express",
|
|
11
|
+
"gzip",
|
|
12
|
+
"performance"
|
|
8
13
|
],
|
|
9
14
|
"homepage": "https://github.com/wnodex/wnodex#readme",
|
|
10
15
|
"bugs": {
|
|
@@ -39,7 +44,7 @@
|
|
|
39
44
|
"@types/node": "^25.0.10",
|
|
40
45
|
"rolldown": "1.0.0-rc.1",
|
|
41
46
|
"typescript": "5.9.2",
|
|
42
|
-
"@wnodex/typescript-config": "0.2.
|
|
47
|
+
"@wnodex/typescript-config": "0.2.2"
|
|
43
48
|
},
|
|
44
49
|
"publishConfig": {
|
|
45
50
|
"access": "public"
|