@powerlines/plugin-image-compression 0.2.6 → 0.2.7
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/dist/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +1 -1
- package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
- package/dist/powerlines/src/plugin-utils/paths.mjs +1 -0
- package/dist/powerlines/src/types/build.d.cts +139 -0
- package/dist/powerlines/src/types/build.d.mts +139 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +8 -0
- package/dist/powerlines/src/types/config.d.cts +345 -0
- package/dist/powerlines/src/types/config.d.mts +345 -0
- package/dist/powerlines/src/types/context.d.cts +347 -0
- package/dist/powerlines/src/types/context.d.mts +347 -0
- package/dist/powerlines/src/types/fs.d.cts +458 -0
- package/dist/powerlines/src/types/fs.d.mts +458 -0
- package/dist/powerlines/src/types/plugin.d.cts +232 -0
- package/dist/powerlines/src/types/plugin.d.mts +232 -0
- package/dist/powerlines/src/types/resolved.d.cts +81 -0
- package/dist/powerlines/src/types/resolved.d.mts +81 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/types/index.cjs +0 -1
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +74 -1
- package/dist/types/plugin.d.mts +74 -1
- package/dist/types/plugin.mjs +1 -1
- package/package.json +9 -9
- package/dist/index-BgAdqTbb.d.mts +0 -1
- package/dist/index-CEgs-Dz2.d.cts +0 -1
- package/dist/plugin-Bks8mycA.d.mts +0 -1706
- package/dist/plugin-Bvn-he2n.mjs +0 -1
- package/dist/plugin-CpF9bW3G.d.cts +0 -1706
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/types-B7VYa_Pp.mjs +0 -1
- package/dist/types-DHkg7xmX.cjs +0 -0
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,75 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserConfig } from "../powerlines/src/types/config.mjs";
|
|
2
|
+
import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
|
|
3
|
+
import { PluginContext } from "../powerlines/src/types/context.mjs";
|
|
4
|
+
import { Config } from "svgo";
|
|
5
|
+
import { AvifOptions, GifOptions, HeifOptions, Jp2Options, JpegOptions, JxlOptions, PngOptions, TiffOptions, WebpOptions } from "sharp";
|
|
6
|
+
|
|
7
|
+
//#region src/types/plugin.d.ts
|
|
8
|
+
interface ImageCompressionPluginOptions {
|
|
9
|
+
/**
|
|
10
|
+
* A path or glob pattern (or an array of paths and glob patterns) to image files to optimize during Powerlines processing.
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue "\{projectRoot\}/**\/*.\{svg,jpg,jpeg,png,webp,avif,heif,gif,tiff,jp2,jxl\}"
|
|
13
|
+
*/
|
|
14
|
+
filter?: string | string[];
|
|
15
|
+
/**
|
|
16
|
+
* The output directory for the optimized images.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* By default, it will generate the output files alongside each input image file.
|
|
20
|
+
*/
|
|
21
|
+
outputPath?: string;
|
|
22
|
+
/**
|
|
23
|
+
* These SVGO options used for SVG optimization
|
|
24
|
+
*/
|
|
25
|
+
svg?: Config;
|
|
26
|
+
/**
|
|
27
|
+
* These JPEG options used for output image
|
|
28
|
+
*/
|
|
29
|
+
jpeg?: JpegOptions;
|
|
30
|
+
/**
|
|
31
|
+
* These JP2 (JPEG 2000) options used for output image
|
|
32
|
+
*/
|
|
33
|
+
jp2?: Jp2Options;
|
|
34
|
+
/**
|
|
35
|
+
* These JPEG-XL (JXL) options used for output image
|
|
36
|
+
*/
|
|
37
|
+
jxl?: JxlOptions;
|
|
38
|
+
/**
|
|
39
|
+
* These PNG options used for output image
|
|
40
|
+
*/
|
|
41
|
+
png?: PngOptions;
|
|
42
|
+
/**
|
|
43
|
+
* These WebP options used for output image
|
|
44
|
+
*/
|
|
45
|
+
webp?: WebpOptions;
|
|
46
|
+
/**
|
|
47
|
+
* These GIF options used for output image
|
|
48
|
+
*/
|
|
49
|
+
gif?: GifOptions;
|
|
50
|
+
/**
|
|
51
|
+
* These AVIF options used for output image
|
|
52
|
+
*/
|
|
53
|
+
avif?: AvifOptions;
|
|
54
|
+
/**
|
|
55
|
+
* These HEIF options used for output image
|
|
56
|
+
*/
|
|
57
|
+
heif?: HeifOptions;
|
|
58
|
+
/**
|
|
59
|
+
* These TIFF options used for output image
|
|
60
|
+
*/
|
|
61
|
+
tiff?: TiffOptions;
|
|
62
|
+
}
|
|
63
|
+
interface ImageCompressionPluginUserConfig extends UserConfig {
|
|
64
|
+
imageCompression?: ImageCompressionPluginOptions;
|
|
65
|
+
}
|
|
66
|
+
interface ImageCompressionPluginResolvedConfig extends ResolvedConfig {
|
|
67
|
+
imageCompression: Omit<ImageCompressionPluginOptions, "filter" | "svg" | "jpeg" | "png" | "webp" | "avif" | "heif" | "tiff" | "jp2" | "jxl" | "gif"> & Required<Pick<ImageCompressionPluginOptions, "filter" | "svg" | "jpeg" | "png" | "webp" | "avif" | "heif" | "tiff" | "jp2" | "jxl" | "gif">>;
|
|
68
|
+
}
|
|
69
|
+
type ImageCompressionPluginContext<TResolvedConfig extends ImageCompressionPluginResolvedConfig = ImageCompressionPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
70
|
+
declare type __ΩImageCompressionPluginOptions = any[];
|
|
71
|
+
declare type __ΩImageCompressionPluginUserConfig = any[];
|
|
72
|
+
declare type __ΩImageCompressionPluginResolvedConfig = any[];
|
|
73
|
+
declare type __ΩImageCompressionPluginContext = any[];
|
|
74
|
+
//#endregion
|
|
2
75
|
export { ImageCompressionPluginContext, ImageCompressionPluginOptions, ImageCompressionPluginResolvedConfig, ImageCompressionPluginUserConfig, __ΩImageCompressionPluginContext, __ΩImageCompressionPluginOptions, __ΩImageCompressionPluginResolvedConfig, __ΩImageCompressionPluginUserConfig };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-image-compression",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to optimize images used by the project.",
|
|
6
6
|
"repository": {
|
|
@@ -123,22 +123,22 @@
|
|
|
123
123
|
"powerlines-plugin"
|
|
124
124
|
],
|
|
125
125
|
"dependencies": {
|
|
126
|
-
"@stryke/path": "^0.22.
|
|
127
|
-
"@stryke/fs": "^0.33.
|
|
128
|
-
"@stryke/convert": "^0.6.
|
|
126
|
+
"@stryke/path": "^0.22.11",
|
|
127
|
+
"@stryke/fs": "^0.33.20",
|
|
128
|
+
"@stryke/convert": "^0.6.24",
|
|
129
129
|
"chalk": "5.6.2",
|
|
130
130
|
"defu": "^6.1.4",
|
|
131
131
|
"jiti": "^2.6.1",
|
|
132
132
|
"sharp": "^0.34.5",
|
|
133
133
|
"svgo": "^4.0.0",
|
|
134
|
-
"powerlines": "^0.30.
|
|
134
|
+
"powerlines": "^0.30.10"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
|
-
"@storm-software/config": "^1.134.
|
|
138
|
-
"@powerlines/nx": "^0.10.
|
|
139
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
137
|
+
"@storm-software/config": "^1.134.60",
|
|
138
|
+
"@powerlines/nx": "^0.10.59",
|
|
139
|
+
"@powerlines/plugin-plugin": "^0.12.11",
|
|
140
140
|
"@types/node": "^24.10.1"
|
|
141
141
|
},
|
|
142
142
|
"publishConfig": { "access": "public" },
|
|
143
|
-
"gitHead": "
|
|
143
|
+
"gitHead": "1fa17406f69248e0a35ca56c09b1f4589e4d49d7"
|
|
144
144
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|