@depup/sharp-cli 5.2.0-depup.0

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.
Files changed (46) hide show
  1. package/.gitattributes +1 -0
  2. package/CHANGELOG.md +336 -0
  3. package/LICENSE.txt +20 -0
  4. package/README.md +35 -0
  5. package/bin/cli.js +32 -0
  6. package/changes.json +26 -0
  7. package/cmd/channel-manipulation/bandbool.js +61 -0
  8. package/cmd/channel-manipulation/ensure-alpha.js +62 -0
  9. package/cmd/channel-manipulation/extract-channel.js +61 -0
  10. package/cmd/channel-manipulation/join-channel.js +60 -0
  11. package/cmd/channel-manipulation/remove-alpha.js +49 -0
  12. package/cmd/colour-manipulation/greyscale.js +50 -0
  13. package/cmd/colour-manipulation/pipeline-colourspace.js +63 -0
  14. package/cmd/colour-manipulation/tint.js +58 -0
  15. package/cmd/colour-manipulation/tocolourspace.js +63 -0
  16. package/cmd/compositing/composite.js +187 -0
  17. package/cmd/operations/affine.js +110 -0
  18. package/cmd/operations/blur.js +87 -0
  19. package/cmd/operations/boolean.js +66 -0
  20. package/cmd/operations/clahe.js +82 -0
  21. package/cmd/operations/convolve.js +103 -0
  22. package/cmd/operations/flatten.js +63 -0
  23. package/cmd/operations/flip.js +49 -0
  24. package/cmd/operations/flop.js +49 -0
  25. package/cmd/operations/gamma.js +66 -0
  26. package/cmd/operations/linear.js +73 -0
  27. package/cmd/operations/median.js +62 -0
  28. package/cmd/operations/modulate.js +78 -0
  29. package/cmd/operations/negate.js +60 -0
  30. package/cmd/operations/normalise.js +69 -0
  31. package/cmd/operations/recomb.js +74 -0
  32. package/cmd/operations/rotate.js +72 -0
  33. package/cmd/operations/sharpen.js +109 -0
  34. package/cmd/operations/threshold.js +73 -0
  35. package/cmd/operations/unflatten.js +49 -0
  36. package/cmd/output.js +125 -0
  37. package/cmd/resizing/extend.js +102 -0
  38. package/cmd/resizing/extract.js +79 -0
  39. package/cmd/resizing/resize.js +124 -0
  40. package/cmd/resizing/trim.js +82 -0
  41. package/lib/cli.js +800 -0
  42. package/lib/constants.js +55 -0
  43. package/lib/convert.js +121 -0
  44. package/lib/index.js +58 -0
  45. package/lib/queue.js +44 -0
  46. package/package.json +84 -0
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ * text=auto
package/CHANGELOG.md ADDED
@@ -0,0 +1,336 @@
1
+ # Changelog
2
+
3
+ ## 5.2.0 (June 24, 2025)
4
+
5
+ - Added [`--autoOrient`, `pdfBackground`](https://sharp.pixelplumbing.com/api-constructor/) input option.
6
+ - Added [`--smartDeblock`](https://sharp.pixelplumbing.com/api-output#webp) output option.
7
+ - Updated `sharp` dependency.
8
+ - Updated dependencies.
9
+
10
+ ## 5.1.0 (September 12, 2024)
11
+
12
+ - Added `--minAmplitude` and `--precision` blur options.
13
+ - Updated `sharp` dependency.
14
+
15
+ ## 5.0.0 (July 14, 2024)
16
+
17
+ - Added `hbitdepth`, `miniswhite` options to `heif` command.
18
+ - Added `lineArt` option to `trim` command.
19
+ - Updated `sharp` dependency (requiring dependency to bump Node to 18.17+).
20
+ - Updated dependencies.
21
+
22
+ ## 4.2.0 (November 25, 2023)
23
+
24
+ - Exit process when there are no input files ([#83](https://github.com/vseventer/sharp-cli/issues/83)).
25
+ - Added `unflatten` command.
26
+ - Added `extendWith` option to `extend` command.
27
+ - Added `ignoreIcc` option to `composite` command.
28
+ - Added `interFrameMaxError` and `interPaletteMaxError` output options.
29
+ - Added `lower` and `upper` options to `normalise` command.
30
+ - Added `preset` output option.
31
+ - Added `reuse` alias to `optimise` and `optimize` output options.
32
+ - Updated `sharp` dependency.
33
+
34
+ ## 4.1.1 (March 21, 2023)
35
+
36
+ - Fixes bug with AVIF filename formatting ([#28](https://github.com/vseventer/sharp-cli/issues/82)).
37
+
38
+ ## 4.1.0 (December 15, 2022)
39
+
40
+ - Recategorized top-level options under Global, Input, Output, and Optimization Options.
41
+ - Added `--subifd` and `unlimited` input options.
42
+ - Updated `--metadata` (previously `--withMetadata`) input option to accept more granular options.
43
+ - Expand `--animate`, `--failOn`, and `--limitInputPixels` from `composite` command to top-level.
44
+
45
+ ## 4.0.0 (December 9, 2022)
46
+
47
+ - Updated `sharp` dependency.
48
+ - Updated `yargs` dependency.
49
+ - Added [`affine`](https://sharp.pixelplumbing.com/api-operation#affine) command.
50
+ - Added `--background`, `--basename`, and `--skipBlanks` to `tile` command.
51
+ - Removed `--density` from `joinChannel` command.
52
+ - Renamed `--band` to `--channel` (`extractChannel` command).
53
+ - Updated `composite` command to accept multiple images ([#73](https://github.com/vseventer/sharp-cli/issues/73)).
54
+ - Updated `--kernel` option usage in `convolve` command.
55
+ - Updated `--offset` option usage in `linear` command.
56
+ - Updated `matrix` positional usage in `recomb` command.
57
+
58
+ ## 3.0.0 (September 15, 2022)
59
+
60
+ - Added [`--background`](https://sharp.pixelplumbing.com/api-resize#trim) when trimming images.
61
+ - Added [`--minSize` and `--mixed`](https://sharp.pixelplumbing.com/api-output#webp).
62
+ - Added [`--reoptimise`](https://sharp.pixelplumbing.com/api-output#gif).
63
+ - Updated TIFF compression options.
64
+ - Updated `sharp` dependency - which now requires Node.js >= 14.15.
65
+
66
+ ## 2.1.1 (June 30, 2022)
67
+
68
+ - Fixed bug where images were always formatted as HEIF ([#68](https://github.com/vseventer/sharp-cli/issues/68)).
69
+
70
+ ## 2.1.0 (June 19, 2022)
71
+
72
+ - Added AVIF support.
73
+ - Added GIF support.
74
+ - Added [`clahe`](https://sharp.pixelplumbing.com/api-operation#clahe) command.
75
+ - Added [`pipelineColourspace`](https://sharp.pixelplumbing.com/api-colour#pipelinecolorspace) command.
76
+ - Added `--alpha` flag to [`ensureAlpha`](https://sharp.pixelplumbing.com/api-channel#ensurealpha) and [`negate`](https://sharp.pixelplumbing.com/api-operation#negate).
77
+ - Added [`--center`](https://sharp.pixelplumbing.com/api-output#tile).
78
+ - Added [`--id`](https://sharp.pixelplumbing.com/api-output#tile).
79
+ - Added [`--lightness`](https://sharp.pixelplumbing.com/api-operation#modulate).
80
+ - Added [`--mozjpeg`](https://sharp.pixelplumbing.com/api-output#jpeg).
81
+ - Added [`--resolutionUnit`](https://sharp.pixelplumbing.com/api-output#tiff).
82
+ - Added [`--timeout`](https://sharp.pixelplumbing.com/api-output#timeout).
83
+ - Added [`--withoutReduction`](https://sharp.pixelplumbing.com/api-resize#resize).
84
+ - Added [`--x1`, `--y2`, `--y3`](https://sharp.pixelplumbing.com/api-operation#sharpen).
85
+ - Drop Node.js 10 support, now requires Node.js >= 12.22.
86
+ - Renamed `--reductionEffort` option to `--effort`.
87
+ - Replaced `--squash` by [`--bitdepth`](https://sharp.pixelplumbing.com/api-output#tiff).
88
+ - Updated default [`--compressionLevel`](http://sharp.pixelplumbing.com/api-output#png).
89
+ - Updated dependencies.
90
+
91
+ ## 2.0.0 (June 18, 2022)
92
+
93
+ - Removed `--limitInputPixels` and `--sequentialRead`.
94
+ - Added [`--limitInputPixels`](https://sharp.pixelplumbing.com/api-composite#composite) when compositing images.
95
+ - Updated `sharp` dependency (adding support for Apple M1) ([#61](https://github.com/vseventer/sharp-cli/pull/61)).
96
+
97
+ ## 1.15.0 (March 13, 2021)
98
+
99
+ - Added [`alpha`](https://sharp.pixelplumbing.com/api-channel#extractchannel) band option to `extractChannel`.
100
+ - Added [`density`, `level`, `page`, and `pages`](https://sharp.pixelplumbing.com/api-constructor) to input options.
101
+ - Added `iiif` layout option to tile-based output.
102
+ - Updated `sharp` dependency.
103
+
104
+ ## 1.14.1 (June 6, 2020)
105
+
106
+ - Fixed bug introduced in [#24](https://github.com/vseventer/sharp-cli/issues/24) where tile-based output was not working ([#41](https://github.com/vseventer/sharp-cli/issues/41)).
107
+ - Removed path normalization for input- and output options to support URI templates ([#40](https://github.com/vseventer/sharp-cli/issues/40)).
108
+
109
+ ## 1.14.0 (May 16, 2020)
110
+
111
+ - Fixed bug where resize example was missing width ([#35](https://github.com/vseventer/sharp-cli/issues/35)).
112
+ - Resizing without specifying height will now auto-scale ([#36](https://github.com/vseventer/sharp-cli/issues/36)).
113
+ - Updated `sharp` dependency (now requires Node.js >= 10).
114
+
115
+ ## 1.13.1 (November 22, 2019)
116
+
117
+ - Fixed bug where output directory was invalid ([#26](https://github.com/vseventer/sharp-cli/issues/26)).
118
+
119
+ ## 1.13.0 (November 22, 2019)
120
+
121
+ - Added support for glob input ([#27](https://github.com/vseventer/sharp-cli/issues/27)).
122
+ - Fixed bug where options were applied to HEIF, even if libheif was not installed ([#25](https://github.com/vseventer/sharp-cli/issues/25)).
123
+ - Replaced `url-template` dependency by regex replacement ([#26](https://github.com/vseventer/sharp-cli/issues/26)).
124
+
125
+ ## 1.12.0 (November 18, 2019)
126
+
127
+ - Added [`--tileBackground`](https://sharp.pixelplumbing.com/api-output#tile) option.
128
+ - Added support for same file for input and output ([#24](https://github.com/vseventer/sharp-cli/issues/24)).
129
+ - Replaced `tempfile` with `tempy` dependency.
130
+ - Updated `sharp` dependency.
131
+
132
+ ## 1.11.0 (November 2, 2019)
133
+
134
+ - Added support for HEIF images.
135
+ - Added [`--hcompression`](https://sharp.pixelplumbing.com/api-output#heif) option.
136
+ - Added [`--premultiplied`](https://sharp.pixelplumbing.com/en/latest/api-composite#composite) option.
137
+ - Added [`--reductionEffort` and `--smartSubsample`](https://sharp.pixelplumbing.com/api-output#webp) options.
138
+ - Fixed bug with output directories ([#16](https://github.com/vseventer/sharp-cli/issues/16)).
139
+ - Removed [`overlayWith`](http://sharp.pixelplumbing.com/en/v0.21.3/api-composite#overlaywith) command.
140
+ - Updated `fs-extra`, `mocha`, `sharp`, `sinon`, and `standard` dependencies.
141
+
142
+ ## 1.10.0 (June 26, 2019)
143
+
144
+ - Added [`composite`](http://sharp.pixelplumbing.com/api-composite#composite) command.
145
+ - Added [`modulate`](http://sharp.pixelplumbing.com/api-operation#modulate) command.
146
+ - Deprecated [`overlayWith`](http://sharp.pixelplumbing.com/en/v0.21.3/api-composite#overlaywith) command.
147
+ - Increased required version to Node.js 8.
148
+ - Updated `fs-extra`, `mocha`, `nyc`, `sharp`, `sinon`, and `tempfile` dependencies (#18).
149
+
150
+ ## 1.9.0 (January 26, 2019)
151
+
152
+ - Added [`--colors`, `--dither`, and `--palette`](https://sharp.pixelplumbing.com/api-output#png) options.
153
+ - Added [`ensureAlpha`](https://sharp.pixelplumbing.com/api-channel#ensurealpha) command.
154
+ - Added exit code 1 for errorneuos commands (#15).
155
+ - Updated `sharp` dependency.
156
+
157
+ ## 1.8.0 (January 5, 2019)
158
+
159
+ - Added `--background` option to [`resize`](https://sharp.dimens.io/api-resize#resize) and [`rotate`](https://sharp.dimens.io/api-operation#rotate) commands.
160
+ - Added [`--fit` and `--position`](https://sharp.dimens.io/api-resize#resize) options.
161
+ - Added [`--factorOut`](https://sharp.dimens.io/api-operation#gamma) option.
162
+ - Added [`--pyramid`, `--tileWidth`, and `--tileHeight`](https://sharp.dimens.io/api-output#tiff) options.
163
+ - Added [`extend`](https://sharp.dimens.io/api-resize#extend) command.
164
+ - Added [`flatten`](https://sharp.dimens.io/api-operation#flatten) command.
165
+ - Added [`recomb`](https://sharp.dimens.io/api-operation#recomb) command.
166
+ - Removed `--crop`, `--ignoreAspectRatio`, `--min`, and `--max` options.
167
+ - Removed `background` command.
168
+ - Renamed `--tolerance` option to [`--threshold`](https://sharp.dimens.io/api-resize#trim).
169
+ - Updated `sharp` and `sinon` dependencies.
170
+
171
+ ## 1.7.2 (December 4, 2018)
172
+
173
+ - Added [`--depth`](https://sharp.pixelplumbing.com/api-output#tile) option.
174
+ - Added [`--quantisationTable`](https://sharp.pixelplumbing.com/api-output#jpeg) option.
175
+ - Added [removeAlpha](https://sharp.pixelplumbing.com/api-channel#removealpha) command.
176
+ - Updated `nyc`, `sharp`, `sinon`, `snazzy`, `standard`, and `yargs` dependencies.
177
+
178
+ ## 1.7.1 (July 24, 2018)
179
+
180
+ - Added [`--optimiseCoding`](http://sharp.pixelplumbing.com/api-output#jpeg) option.
181
+ - Added `ccittfax4` compression option to TIFF output.
182
+ - Added [median](http://sharp.pixelplumbing.com/api-operation#median) command.
183
+ - Added [tint](http://sharp.pixelplumbing.com/api-colour#tint) command.
184
+ - Updated `fs-extra`, `mocha`, `nyc`, `sharp`, and `sinon` dependencies.
185
+
186
+ ## 1.7.0 (March 9, 2018)
187
+
188
+ - Added [linear](http://sharp.pixelplumbing.com/api-operation#linear) command.
189
+ - Added `--angle` option to [tile](http://sharp.pixelplumbing.com/api-output#tile) command.
190
+ - Updated `sharp`, `sinon`, `snazzy`, and `standard` dependencies.
191
+
192
+ ## 1.6.0 (January 28, 2018)
193
+
194
+ - Added [`--fastShrinkOnLoad`](http://sharp.pixelplumbing.com/api-resize#resize)
195
+ (`sharp` 0.19.0).
196
+ - Added gravity option to [`--embed`](http://sharp.pixelplumbing.com/api-resize#embed).
197
+ - Fixed bug with [`--withoutEnlargement`](http://sharp.pixelplumbing.com/api-resize#withoutenlargement)
198
+ ([#11](https://github.com/vseventer/sharp-cli/issues/11)).
199
+ - Fixed bug with URI templates on Windows ([#8](https://github.com/vseventer/sharp-cli/issues/8)).
200
+ - Removed `--interpolator` and `--centreSampling` resize options (`sharp` 0.19.0).
201
+ - Updated default [`--compressionLevel`](http://sharp.pixelplumbing.com/api-output#png)
202
+ and [`--predictor`](http://sharp.pixelplumbing.com/api-output#tiff)
203
+ (`sharp` 0.19.0).
204
+ - Updated output paths to resolve only after parsing URI template ([#9](https://github.com/vseventer/sharp-cli/issues/9)).
205
+ - Updated `fs-extra`, `mocha`, `nyc`, `sharp`, `sinon`, and `yargs` dependencies.
206
+
207
+ ## 1.5.2 (October 27, 2017)
208
+
209
+ - Updated `mocha`, `sinon`, and `yargs` dependencies.
210
+
211
+ ## 1.5.1 (September 22, 2017)
212
+
213
+ - Updated `mocha`, `nyc`, and `sharp` dependencies.
214
+
215
+ ## 1.5.0 (July 20, 2017)
216
+
217
+ > https://github.com/vseventer/sharp-cli/compare/v1.4.0...v1.5.0
218
+
219
+ - Added [`--xres`](http://sharp.pixelplumbing.com/api-output#tiff) and
220
+ [`--yres`](http://sharp.pixelplumbing.com/api-output#tiff) (`sharp` 0.18.2).
221
+ - Updated `fs-extra` dependency.
222
+
223
+ ## 1.4.0 (June 26, 2017)
224
+
225
+ > https://github.com/vseventer/sharp-cli/compare/v1.3.0...v1.4.0
226
+
227
+ - Added [`--squash`](http://sharp.pixelplumbing.com/api-output#tiff)
228
+ (`sharp` 0.18.0).
229
+ - Updated `fs-extra`, `mocha`, `nyc`, `sharp`, `sinon`, `snazzy`, `standard`,
230
+ and `yargs` dependencies.
231
+
232
+ ## 1.3.0 (April 3, 2017)
233
+
234
+ > https://github.com/vseventer/sharp-cli/compare/v1.2.0...v1.3.0
235
+
236
+ - Added [`--compression`](http://sharp.pixelplumbing.com/api-output#tiff)
237
+ and [`--predictor`](http://sharp.pixelplumbing.com/api-output#tiff)
238
+ (`sharp` 0.17.3).
239
+ - Added [`--create`](http://sharp.pixelplumbing.com/api-composite#overlaywith)
240
+ (`sharp` 0.17.3).
241
+ - Updated `fs-extra`, `nyc`, `sinon`, and `tempfile` dependencies.
242
+
243
+ ## 1.2.0 (March 18, 2017)
244
+
245
+ > https://github.com/vseventer/sharp-cli/compare/v1.1.0...v1.2.0
246
+
247
+ - Added support for [URI templates](https://www.npmjs.com/package/url-template).
248
+ - Replaced `chai` with `must`.
249
+ - Updated `multiyargs`, `sinon`, and `standard` dependencies.
250
+
251
+ ## 1.1.0 (Febuary 13, 2017)
252
+
253
+ > https://github.com/vseventer/sharp-cli/compare/v1.0.1...v1.1.0
254
+
255
+ - Added [`--alphaQuality`](http://sharp.pixelplumbing.com/api-output#webp),
256
+ [`--lossless`](http://sharp.pixelplumbing.com/api-output#webp), and
257
+ [`nearLossless`](http://sharp.pixelplumbing.com/api-output#webp)
258
+ (`sharp` 0.17.2).
259
+ - Removed `stream-to-buffer` as it caused errors when working with large files.
260
+ Unfortunately, this means input and output cannot use the same file.
261
+
262
+ ## 1.0.1 (January 29, 2017)
263
+
264
+ - Allow and prioritize `--input`, even if there is an input stream
265
+ (i.e. `process.stdin`).
266
+ - Added `--optimise` shorthand for `--optimiseScans`, `--overshootDeringing`,
267
+ and `--trellisQuantisation`.
268
+ - Abstracted multiple command parsing algorithm to `multiyargs`.
269
+
270
+ ## 1.0.0 (January 24, 2017)
271
+
272
+ - Full rewrite.
273
+
274
+ ## 0.7.0 (August 21, 2016)
275
+
276
+ - Enhancement: add [`--toColorspace`](http://sharp.readthedocs.io/api#tocolourspacecolourspace-tocolorspacecolorspace).
277
+ - Enhancement: update `sharp` (`0.16.x`).
278
+
279
+ ## 0.6.0 (August 18, 2016)
280
+
281
+ - Enhancement: add [`--bandbool`](http://sharp.pixelplumbing.com/api#bandbooloperation).
282
+ - Enhancement: add [`--extractChannel`](http://sharp.pixelplumbing.com/api#extractchannelchannel).
283
+ - Enhancement: add [`--overlayCutout`](http://sharp.pixelplumbing.com/api#overlaywithimage-options).
284
+ - Enhancement: add [`--overlayLeft`](http://sharp.pixelplumbing.com/api#overlaywithimage-options).
285
+ - Enhancement: add [`--overlayTile`](http://sharp.pixelplumbing.com/api#overlaywithimage-options).
286
+ - Enhancement: add [`--overlayTop`](http://sharp.pixelplumbing.com/api#overlaywithimage-options).
287
+ - Enhancement: add [`--trim`](http://sharp.pixelplumbing.com/api#trimtolerance).
288
+ - Enhancement: simplify verbose output.
289
+ - Enhancement: update dependencies.
290
+
291
+ ## 0.5.0 (June 21, 2016)
292
+
293
+ - Enhancement: add [`--kernel`](http://sharp.pixelplumbing.com/api#resizewidth-height-options).
294
+ - Enhancement: rename `--interpolateWith` to [`--interpolator`](http://sharp.pixelplumbing.com/api#resizewidth-height-options).
295
+
296
+ ## 0.4.2 (June 21, 2016)
297
+
298
+ - Bugfix: mark `--grayscale` as boolean option.
299
+ - Enhancement: update dependencies, including `sharp` (`0.15.x`).
300
+
301
+ ## 0.4.1 (April 18, 2016)
302
+
303
+ - Enhancement: add [`--tileContainer`](http://sharp.pixelplumbing.com/api#tileoptions).
304
+
305
+ ## 0.4.0 (April 4, 2016)
306
+
307
+ - Enhancement: add [`--extend`](http://sharp.pixelplumbing.com/api#extendextension) support.
308
+ - Enhancement: add [`--overlayGravity`](http://sharp.pixelplumbing.com/api#overlaywithimage-options) support.
309
+ - Enhancement: add [`--tileLayout`](http://sharp.pixelplumbing.com/api#tileoptions) support.
310
+ - Enhancement: update dependencies, including `sharp` (`0.14.x`).
311
+
312
+ ## 0.3.1 (February 21, 2016)
313
+
314
+ - Enhancement: update dependencies, including `sharp` (`0.13.x`).
315
+
316
+ ## 0.3.0 (January 26, 2016)
317
+
318
+ - Enhancement: add [`--negate`](http://sharp.pixelplumbing.com/api#negate) support.
319
+ - Enhancement: add [`--threshold`](http://sharp.pixelplumbing.com/api#thresholdthreshold) support.
320
+ - Enhancement: update dependencies, including `sharp` (`0.12.x`).
321
+
322
+ ## 0.2.2 (January 13, 2016)
323
+
324
+ - Enhancement: process multiple files in batches of `25`.
325
+
326
+ ## 0.2.1 (January 3, 2016)
327
+
328
+ - Enhancement: allow `rotate` without angle.
329
+
330
+ ## 0.2.0 (November 6, 2015)
331
+
332
+ - Enhancement: allow same file for input and output.
333
+
334
+ ## 0.1.0 (November 5, 2015)
335
+
336
+ - Initial version.
package/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Mark van Seventer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @depup/sharp-cli
2
+
3
+ > Dependency-bumped version of [sharp-cli](https://www.npmjs.com/package/sharp-cli)
4
+
5
+ Generated by [DepUp](https://github.com/depup/npm) -- all production
6
+ dependencies bumped to latest versions.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @depup/sharp-cli
12
+ ```
13
+
14
+ | Field | Value |
15
+ |-------|-------|
16
+ | Original | [sharp-cli](https://www.npmjs.com/package/sharp-cli) @ 5.2.0 |
17
+ | Processed | 2026-03-19 |
18
+ | Smoke test | failed |
19
+ | Deps updated | 5 |
20
+
21
+ ## Dependency Changes
22
+
23
+ | Dependency | From | To |
24
+ |------------|------|-----|
25
+ | glob | 11.0.x | ^13.0.6 |
26
+ | is-directory | 0.3.x | ^0.3.1 |
27
+ | lodash.pick | 3.1.0 | ^4.4.0 |
28
+ | sharp | 0.34.2 | ^0.34.5 |
29
+ | yargs | ^17.6.2 | ^18.0.0 |
30
+
31
+ ---
32
+
33
+ Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/sharp-cli
34
+
35
+ License inherited from the original package.
package/bin/cli.js ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ /*!
3
+ * The MIT License (MIT)
4
+ *
5
+ * Copyright (c) 2019 Mark van Seventer
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
8
+ * this software and associated documentation files (the "Software"), to deal in
9
+ * the Software without restriction, including without limitation the rights to
10
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11
+ * the Software, and to permit persons to whom the Software is furnished to do so,
12
+ * subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+ */
24
+
25
+ // Strict mode.
26
+ 'use strict'
27
+
28
+ // Package modules.
29
+ const { hideBin } = require('yargs/helpers')
30
+
31
+ // Run.
32
+ require('../lib')(hideBin(process.argv))
package/changes.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "bumped": {
3
+ "glob": {
4
+ "from": "11.0.x",
5
+ "to": "^13.0.6"
6
+ },
7
+ "is-directory": {
8
+ "from": "0.3.x",
9
+ "to": "^0.3.1"
10
+ },
11
+ "lodash.pick": {
12
+ "from": "3.1.0",
13
+ "to": "^4.4.0"
14
+ },
15
+ "sharp": {
16
+ "from": "0.34.2",
17
+ "to": "^0.34.5"
18
+ },
19
+ "yargs": {
20
+ "from": "^17.6.2",
21
+ "to": "^18.0.0"
22
+ }
23
+ },
24
+ "timestamp": "2026-03-19T03:28:37.858Z",
25
+ "totalUpdated": 5
26
+ }
@@ -0,0 +1,61 @@
1
+ /*!
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2019 Mark van Seventer
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
7
+ * this software and associated documentation files (the "Software"), to deal in
8
+ * the Software without restriction, including without limitation the rights to
9
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10
+ * the Software, and to permit persons to whom the Software is furnished to do so,
11
+ * subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ */
23
+
24
+ // @see https://sharp.pixelplumbing.com/api-channel#bandbool
25
+
26
+ // Strict mode.
27
+ 'use strict'
28
+
29
+ // Local modules.
30
+ const constants = require('../../lib/constants')
31
+ const queue = require('../../lib/queue')
32
+
33
+ // Configure.
34
+ const positionals = {
35
+ operator: {
36
+ choices: constants.BOOL,
37
+ desc: 'Operator to perform that bitwise operation'
38
+ }
39
+ }
40
+
41
+ // Command builder.
42
+ const builder = (yargs) => {
43
+ return yargs
44
+ .strict()
45
+ .example('$0 bandbool and', 'The output will be a single channel image where each pixel `P = R & G & B`')
46
+ .epilog('For more information on available options, please visit https://sharp.pixelplumbing.com/api-channel#bandbool')
47
+ .positional('operator', positionals.operator)
48
+ }
49
+
50
+ // Command handler.
51
+ const handler = (args) => {
52
+ return queue.push(['bandbool', (sharp) => sharp.bandbool(args.operator)])
53
+ }
54
+
55
+ // Exports.
56
+ module.exports = {
57
+ command: 'bandbool <operator>',
58
+ describe: 'Perform a bitwise boolean operation on all input image channels (bands) to produce a single channel output image',
59
+ builder,
60
+ handler
61
+ }
@@ -0,0 +1,62 @@
1
+ /*!
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2019 Mark van Seventer
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
7
+ * this software and associated documentation files (the "Software"), to deal in
8
+ * the Software without restriction, including without limitation the rights to
9
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10
+ * the Software, and to permit persons to whom the Software is furnished to do so,
11
+ * subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ */
23
+
24
+ // @see https://sharp.pixelplumbing.com/api-channel#ensurealpha
25
+
26
+ // Strict mode.
27
+ 'use strict'
28
+
29
+ // Local modules.
30
+ const queue = require('../../lib/queue')
31
+
32
+ // Configure.
33
+ const positionals = {
34
+ alpha: {
35
+ default: 1,
36
+ desc: 'Alpha transparency level',
37
+ type: 'number'
38
+ }
39
+ }
40
+
41
+ // Command builder.
42
+ const builder = (yargs) => {
43
+ return yargs
44
+ .strict()
45
+ .example('$0 ensureAlpha', 'The output will be a 4 channel image with a fully-opaque alpha channel')
46
+ .example('$0 ensureAlpha 0', 'The output will be a 4 channel image with a fully-transparent alpha channel')
47
+ .epilog('For more information on available options, please visit https://sharp.pixelplumbing.com/api-channel#removealpha')
48
+ .positional('alpha', positionals.alpha)
49
+ }
50
+
51
+ // Command handler.
52
+ const handler = (args) => {
53
+ return queue.push(['ensureAlpha', (sharp) => sharp.ensureAlpha(args.alpha)])
54
+ }
55
+
56
+ // Exports.
57
+ module.exports = {
58
+ command: 'ensureAlpha [alpha]',
59
+ describe: 'Ensure the output image has an alpha transparency channel',
60
+ builder,
61
+ handler
62
+ }
@@ -0,0 +1,61 @@
1
+ /*!
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2019 Mark van Seventer
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
7
+ * this software and associated documentation files (the "Software"), to deal in
8
+ * the Software without restriction, including without limitation the rights to
9
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10
+ * the Software, and to permit persons to whom the Software is furnished to do so,
11
+ * subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ */
23
+
24
+ // @see https://sharp.pixelplumbing.com/api-channel#extractchannel
25
+
26
+ // Strict mode.
27
+ 'use strict'
28
+
29
+ // Local modules.
30
+ const constants = require('../../lib/constants')
31
+ const queue = require('../../lib/queue')
32
+
33
+ // Configure.
34
+ const positionals = {
35
+ channel: {
36
+ choices: constants.CHANNEL,
37
+ desc: 'The channel/band number to extract'
38
+ }
39
+ }
40
+
41
+ // Command builder.
42
+ const builder = (yargs) => {
43
+ return yargs
44
+ .strict()
45
+ .example('$0 extractChannel green', 'The output will contain the green channel of the input image')
46
+ .epilog('For more information on available options, please visit https://sharp.pixelplumbing.com/api-channel#extractchannel')
47
+ .positional('channel', positionals.channel)
48
+ }
49
+
50
+ // Command handler.
51
+ const handler = (args) => {
52
+ return queue.push(['extractChannel', (sharp) => sharp.extractChannel(args.channel)])
53
+ }
54
+
55
+ // Exports.
56
+ module.exports = {
57
+ command: 'extractChannel <channel>',
58
+ describe: 'Extract a single channel from a multi-channel image',
59
+ builder,
60
+ handler
61
+ }