@nathievzm/lumi 1.1.1 → 1.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.
- package/.oxlintrc.json +1 -1
- package/CHANGELOG.md +16 -0
- package/README.md +13 -11
- package/package.json +6 -3
- package/src/index.ts +16 -9
package/.oxlintrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.1.4](https://github.com/nathievzm/lumi/compare/v1.1.3...v1.1.4) (2026-05-13)
|
|
2
|
+
|
|
3
|
+
## [1.1.3](https://github.com/nathievzm/lumi/compare/v1.1.2...v1.1.3) (2026-05-13)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add update notifier to notify when there'a a new version ([#67](https://github.com/nathievzm/lumi/issues/67))
|
|
8
|
+
([b567f03](https://github.com/nathievzm/lumi/commit/b567f03b3c6617b18bdc34587d65055c5726bcfc))
|
|
9
|
+
|
|
10
|
+
## [1.1.2](https://github.com/nathievzm/lumi/compare/v1.1.1...v1.1.2) (2026-05-13)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- use boxen to fix the intro banner
|
|
15
|
+
([e3e8085](https://github.com/nathievzm/lumi/commit/e3e80853251b584aab892b688eb12c8c6b7799d4))
|
|
16
|
+
|
|
1
17
|
## [1.1.1](https://github.com/nathievzm/lumi/compare/v1.1.0...v1.1.1) (2026-05-12)
|
|
2
18
|
|
|
3
19
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -7,8 +7,8 @@ A fast, interactive CLI tool for batch image processing. Resize, convert, and op
|
|
|
7
7
|
|
|
8
8
|
- **Batch Processing:** Process hundreds of images in seconds with high concurrency.
|
|
9
9
|
- **Interactive UI:** User-friendly prompts for missing configurations using `@clack/prompts`.
|
|
10
|
-
- **Recursive Processing:**
|
|
11
|
-
- **Progress Tracking:** Real-time feedback with
|
|
10
|
+
- **Recursive Processing:** Optionally find all images in subdirectories using the recursive flag.
|
|
11
|
+
- **Progress Tracking:** Real-time feedback with interactive progress indicators.
|
|
12
12
|
- **Smart Resizing:** Automatically fits images while maintaining aspect ratio (`contain` fit).
|
|
13
13
|
- **Multi-Format Support:** Convert between all formats supported by Sharp (WebP, PNG, JPEG, GIF, AVIF, etc.).
|
|
14
14
|
- **Animated Support:** Seamlessly handles animated GIFs and WebP files.
|
|
@@ -56,15 +56,16 @@ You can bypass the prompts by providing the flags directly:
|
|
|
56
56
|
bunx @nathievzm/lumi -i ./my-vacation-pics -s 1080 -f .webp
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
| Flag
|
|
60
|
-
|
|
|
61
|
-
| `--input`
|
|
62
|
-
| `--output`
|
|
63
|
-
| `--width`
|
|
64
|
-
| `--height`
|
|
65
|
-
| `--size`
|
|
66
|
-
| `--format`
|
|
67
|
-
| `--limit`
|
|
59
|
+
| Flag | Shortcut | Description | Default / Env |
|
|
60
|
+
| :------------ | :------- | :---------------------------- | :--------------------------- |
|
|
61
|
+
| `--input` | `-i` | Input directory path | `.` / `INPUT_FOLDER` |
|
|
62
|
+
| `--output` | `-o` | Output directory path | `./output` / `OUTPUT_FOLDER` |
|
|
63
|
+
| `--width` | `-w` | Target width in pixels | Prompt / `WIDTH` |
|
|
64
|
+
| `--height` | `-h` | Target height in pixels | Prompt / `HEIGHT` |
|
|
65
|
+
| `--size` | `-s` | Sets both width and height | - |
|
|
66
|
+
| `--format` | `-f` | Output format (e.g., `.webp`) | Prompt / `FORMAT` |
|
|
67
|
+
| `--limit` | `-l` | Max concurrent operations | `10` / `LIMIT` |
|
|
68
|
+
| `--recursive` | `-r` | Process subdirectories | `false` / `RECURSIVE` |
|
|
68
69
|
|
|
69
70
|
### 🌍 Environment Variables
|
|
70
71
|
|
|
@@ -78,6 +79,7 @@ INPUT_FOLDER = './input'
|
|
|
78
79
|
OUTPUT_FOLDER = './output'
|
|
79
80
|
FORMAT = '.webp'
|
|
80
81
|
LIMIT = '10'
|
|
82
|
+
RECURSIVE = 'false'
|
|
81
83
|
```
|
|
82
84
|
|
|
83
85
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nathievzm/lumi",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "a concurrent cli tool to resize and convert images using bun and sharp",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -45,22 +45,25 @@
|
|
|
45
45
|
"fmt:check": "oxfmt --check",
|
|
46
46
|
"lint": "oxlint",
|
|
47
47
|
"lint:fix": "oxlint --fix",
|
|
48
|
-
"
|
|
48
|
+
"prepare": "bunx lefthook install",
|
|
49
49
|
"release": "bumpp --execute \"bun changelog\" --all",
|
|
50
50
|
"start": "bun src/index.ts"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@clack/prompts": "^1.3.0",
|
|
54
54
|
"@js-temporal/polyfill": "^0.5.1",
|
|
55
|
+
"boxen": "^8.0.1",
|
|
55
56
|
"image-extensions": "^1.1.0",
|
|
56
57
|
"p-limit": "^7.3.0",
|
|
57
58
|
"picocolors": "^1.1.1",
|
|
58
|
-
"sharp": "^0.34.5"
|
|
59
|
+
"sharp": "^0.34.5",
|
|
60
|
+
"update-notifier": "^7.3.1"
|
|
59
61
|
},
|
|
60
62
|
"devDependencies": {
|
|
61
63
|
"@commitlint/cli": "^20.5.3",
|
|
62
64
|
"@commitlint/config-conventional": "^20.5.3",
|
|
63
65
|
"@types/bun": "latest",
|
|
66
|
+
"@types/update-notifier": "^6.0.8",
|
|
64
67
|
"bumpp": "^11.1.0",
|
|
65
68
|
"conventional-changelog-cli": "^5.0.0",
|
|
66
69
|
"lefthook": "^2.1.6",
|
package/src/index.ts
CHANGED
|
@@ -6,26 +6,33 @@ import { exit } from 'node:process'
|
|
|
6
6
|
|
|
7
7
|
import { intro, log, note, outro, spinner } from '@clack/prompts'
|
|
8
8
|
import { Temporal } from '@js-temporal/polyfill'
|
|
9
|
+
import boxen from 'boxen'
|
|
9
10
|
import pLimit from 'p-limit'
|
|
10
11
|
import color from 'picocolors'
|
|
12
|
+
import updateNotifier from 'update-notifier'
|
|
11
13
|
|
|
12
14
|
import { cli } from '@/args'
|
|
13
15
|
import { ensureOutputExists, getInputPath, getOutputPath } from '@/folder'
|
|
14
16
|
import { getExtensions, getImages, getWidthAndHeight, resize } from '@/image'
|
|
15
17
|
|
|
16
|
-
import pkg from '../package.json'
|
|
18
|
+
import pkg from '../package.json' with { type: 'json' }
|
|
19
|
+
|
|
20
|
+
const notifier = updateNotifier({ pkg })
|
|
21
|
+
notifier.notify({
|
|
22
|
+
boxenOptions: { borderColor: 'magenta', borderStyle: 'round', padding: 1 }
|
|
23
|
+
})
|
|
17
24
|
|
|
18
25
|
console.clear()
|
|
19
26
|
|
|
20
|
-
const banner =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
const banner = boxen('lumi', {
|
|
28
|
+
backgroundColor: 'magenta',
|
|
29
|
+
borderColor: 'magenta',
|
|
30
|
+
borderStyle: 'round',
|
|
31
|
+
padding: { bottom: 2, left: 15, right: 15, top: 2 },
|
|
32
|
+
textAlignment: 'center'
|
|
33
|
+
})
|
|
27
34
|
|
|
28
|
-
console.log(banner)
|
|
35
|
+
console.log(banner, '\n')
|
|
29
36
|
|
|
30
37
|
intro(color.magenta(`welcome to lumi v${pkg.version} 🩷`))
|
|
31
38
|
|