@thi.ng/imago 0.7.7 → 0.7.8
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/CHANGELOG.md +7 -1
- package/README.md +2 -2
- package/api.d.ts +0 -1
- package/ops/output.js +4 -4
- package/package.json +20 -20
- package/path.d.ts +0 -1
- package/units.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-
|
|
3
|
+
- **Last updated**: 2024-06-21T19:34:38Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [0.7.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/imago@0.7.8) (2024-06-21)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
|
|
17
|
+
|
|
12
18
|
### [0.7.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/imago@0.7.3) (2024-04-20)
|
|
13
19
|
|
|
14
20
|
#### ♻️ Refactoring
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 193 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -357,7 +357,7 @@ For Node.js REPL:
|
|
|
357
357
|
const imago = await import("@thi.ng/imago");
|
|
358
358
|
```
|
|
359
359
|
|
|
360
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 4.
|
|
360
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 4.92 KB
|
|
361
361
|
|
|
362
362
|
## Dependencies
|
|
363
363
|
|
package/api.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { Fn, Fn3, IObjectOf, Keys, Range1_4, TypedArray } from "@thi.ng/api";
|
|
3
2
|
import type { ILogger } from "@thi.ng/logger";
|
|
4
3
|
import type { AvifOptions, Blend, Exif, ExtendWith, FitEnum, GifOptions, Jp2Options, JpegOptions, JxlOptions, KernelEnum, Metadata, OverlayOptions, PngOptions, Sharp, TiffOptions, TileOptions, WebpOptions } from "sharp";
|
package/ops/output.js
CHANGED
|
@@ -9,12 +9,12 @@ const outputProc = async (spec, input, ctx) => {
|
|
|
9
9
|
const outDir = resolve(ctx.opts.outDir || ".");
|
|
10
10
|
let output = input.clone();
|
|
11
11
|
if (opts.blurhash) {
|
|
12
|
-
await
|
|
12
|
+
await __outputBlurHash(opts, output, ctx);
|
|
13
13
|
return [input, false];
|
|
14
14
|
}
|
|
15
15
|
if (!opts.path) illegalArgs("output path missing");
|
|
16
16
|
if (opts.raw) {
|
|
17
|
-
await
|
|
17
|
+
await __outputRaw(opts, output, ctx, outDir);
|
|
18
18
|
return [input, false];
|
|
19
19
|
}
|
|
20
20
|
if (ctx.meta.exif && ctx.opts.keepEXIF) {
|
|
@@ -69,7 +69,7 @@ const outputProc = async (spec, input, ctx) => {
|
|
|
69
69
|
ctx.outputs[opts.id] = path;
|
|
70
70
|
return [input, false];
|
|
71
71
|
};
|
|
72
|
-
const
|
|
72
|
+
const __outputRaw = async (opts, output, ctx, outDir) => {
|
|
73
73
|
const { alpha = false, meta = false } = isPlainObject(opts.raw) ? opts.raw : {};
|
|
74
74
|
if (alpha) output = output.ensureAlpha();
|
|
75
75
|
const { data, info } = await output.raw().toBuffer({ resolveWithObject: true });
|
|
@@ -86,7 +86,7 @@ const outputRaw = async (opts, output, ctx, outDir) => {
|
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
const
|
|
89
|
+
const __outputBlurHash = async (opts, output, ctx) => {
|
|
90
90
|
const { data, info } = await output.ensureAlpha().raw().toBuffer({ resolveWithObject: true });
|
|
91
91
|
const detail = opts.blurhash === true ? 4 : opts.blurhash;
|
|
92
92
|
const [dx, dy] = isNumber(detail) ? [detail, detail] : detail;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/imago",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "JSON & API-based declarative and extensible image processing trees/pipelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://thi.ng/imago",
|
|
14
14
|
"funding": [
|
|
15
15
|
{
|
|
16
16
|
"type": "github",
|
|
@@ -36,26 +36,26 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.11.
|
|
40
|
-
"@thi.ng/associative": "^6.3.
|
|
41
|
-
"@thi.ng/blurhash": "^0.1.
|
|
42
|
-
"@thi.ng/checks": "^3.6.
|
|
43
|
-
"@thi.ng/date": "^2.7.
|
|
44
|
-
"@thi.ng/defmulti": "^3.0.
|
|
45
|
-
"@thi.ng/errors": "^2.5.
|
|
46
|
-
"@thi.ng/file-io": "^2.1.
|
|
47
|
-
"@thi.ng/logger": "^3.0.
|
|
48
|
-
"@thi.ng/pixel": "^6.1.
|
|
49
|
-
"@thi.ng/pixel-dither": "^1.1.
|
|
50
|
-
"@thi.ng/prefixes": "^2.3.
|
|
51
|
-
"sharp": "^0.33.
|
|
39
|
+
"@thi.ng/api": "^8.11.3",
|
|
40
|
+
"@thi.ng/associative": "^6.3.61",
|
|
41
|
+
"@thi.ng/blurhash": "^0.1.25",
|
|
42
|
+
"@thi.ng/checks": "^3.6.5",
|
|
43
|
+
"@thi.ng/date": "^2.7.19",
|
|
44
|
+
"@thi.ng/defmulti": "^3.0.40",
|
|
45
|
+
"@thi.ng/errors": "^2.5.8",
|
|
46
|
+
"@thi.ng/file-io": "^2.1.3",
|
|
47
|
+
"@thi.ng/logger": "^3.0.13",
|
|
48
|
+
"@thi.ng/pixel": "^6.1.33",
|
|
49
|
+
"@thi.ng/pixel-dither": "^1.1.131",
|
|
50
|
+
"@thi.ng/prefixes": "^2.3.20",
|
|
51
|
+
"sharp": "^0.33.4"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@microsoft/api-extractor": "^7.
|
|
55
|
-
"@thi.ng/vectors": "^7.
|
|
56
|
-
"esbuild": "^0.21.
|
|
54
|
+
"@microsoft/api-extractor": "^7.47.0",
|
|
55
|
+
"@thi.ng/vectors": "^7.11.0",
|
|
56
|
+
"esbuild": "^0.21.5",
|
|
57
57
|
"typedoc": "^0.25.13",
|
|
58
|
-
"typescript": "^5.
|
|
58
|
+
"typescript": "^5.5.2"
|
|
59
59
|
},
|
|
60
60
|
"keywords": [
|
|
61
61
|
"avif",
|
|
@@ -185,5 +185,5 @@
|
|
|
185
185
|
"status": "alpha",
|
|
186
186
|
"year": 2024
|
|
187
187
|
},
|
|
188
|
-
"gitHead": "
|
|
188
|
+
"gitHead": "154c95cf9d6bab32174498ec3b5b5d87e42be7f9\n"
|
|
189
189
|
}
|
package/path.d.ts
CHANGED