@powerlines/plugin-image-compression 0.2.624 → 0.2.626
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/index.cjs +3 -5
- package/dist/index.d.cts +0 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -2
- package/dist/index.mjs +1 -2
- package/dist/types/plugin.d.cts +0 -2
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +0 -2
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -25,8 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
enumerable: true
|
|
26
26
|
}) : target, mod));
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
require('./types/index.cjs');
|
|
28
|
+
require("./types/index.cjs");
|
|
30
29
|
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
31
30
|
let _stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
32
31
|
let _stryke_fs_read_file = require("@stryke/fs/read-file");
|
|
@@ -40,7 +39,7 @@ let node_fs_promises = require("node:fs/promises");
|
|
|
40
39
|
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
41
40
|
let svgo = require("svgo");
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
// src/index.ts
|
|
44
43
|
/**
|
|
45
44
|
* A Powerlines plugin to optimize image assets used by the project.
|
|
46
45
|
*
|
|
@@ -140,5 +139,4 @@ const plugin = (options = {}) => {
|
|
|
140
139
|
};
|
|
141
140
|
};
|
|
142
141
|
|
|
143
|
-
//#endregion
|
|
144
142
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ImageCompressionPluginContext, ImageCompressionPluginOptions, ImageCompressionPluginResolvedConfig, ImageCompressionPluginUserConfig } from "./types/plugin.cjs";
|
|
2
2
|
import "./types/index.cjs";
|
|
3
3
|
import { Plugin } from "powerlines";
|
|
4
|
-
//#region src/index.d.ts
|
|
5
4
|
declare module "powerlines" {
|
|
6
5
|
interface Config {
|
|
7
6
|
imageCompression?: ImageCompressionPluginOptions;
|
|
@@ -16,6 +15,5 @@ declare module "powerlines" {
|
|
|
16
15
|
* @returns A Powerlines plugin instance.
|
|
17
16
|
*/
|
|
18
17
|
declare const plugin: <TContext extends ImageCompressionPluginContext = ImageCompressionPluginContext>(options?: ImageCompressionPluginOptions) => Plugin<TContext>;
|
|
19
|
-
//#endregion
|
|
20
18
|
export { ImageCompressionPluginContext, ImageCompressionPluginOptions, ImageCompressionPluginResolvedConfig, ImageCompressionPluginUserConfig, plugin };
|
|
21
19
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;YAsCY;IACR,mBAAmB;;;;;;;;;;;cAYV,SACX,iBAAiB,gCAAgC,+BAEjD,UAAS,kCACR,OAAO"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ImageCompressionPluginContext, ImageCompressionPluginOptions, ImageCompressionPluginResolvedConfig, ImageCompressionPluginUserConfig } from "./types/plugin.mjs";
|
|
2
2
|
import "./types/index.mjs";
|
|
3
3
|
import { Plugin } from "powerlines";
|
|
4
|
-
//#region src/index.d.ts
|
|
5
4
|
declare module "powerlines" {
|
|
6
5
|
interface Config {
|
|
7
6
|
imageCompression?: ImageCompressionPluginOptions;
|
|
@@ -16,6 +15,5 @@ declare module "powerlines" {
|
|
|
16
15
|
* @returns A Powerlines plugin instance.
|
|
17
16
|
*/
|
|
18
17
|
declare const plugin: <TContext extends ImageCompressionPluginContext = ImageCompressionPluginContext>(options?: ImageCompressionPluginOptions) => Plugin<TContext>;
|
|
19
|
-
//#endregion
|
|
20
18
|
export { ImageCompressionPluginContext, ImageCompressionPluginOptions, ImageCompressionPluginResolvedConfig, ImageCompressionPluginUserConfig, plugin };
|
|
21
19
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { stat } from "node:fs/promises";
|
|
|
11
11
|
import { replacePathTokens } from "powerlines/plugin-utils";
|
|
12
12
|
import { optimize } from "svgo";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/index.ts
|
|
15
15
|
/**
|
|
16
16
|
* A Powerlines plugin to optimize image assets used by the project.
|
|
17
17
|
*
|
|
@@ -111,6 +111,5 @@ const plugin = (options = {}) => {
|
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
//#endregion
|
|
115
114
|
export { plugin };
|
|
116
115
|
//# sourceMappingURL=index.mjs.map
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
2
2
|
import { AvifOptions, GifOptions, HeifOptions, Jp2Options, JpegOptions, JxlOptions, PngOptions, TiffOptions, WebpOptions } from "sharp";
|
|
3
3
|
import { Config } from "svgo";
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
4
|
interface ImageCompressionPluginOptions {
|
|
6
5
|
/**
|
|
7
6
|
* A path or glob pattern (or an array of paths and glob patterns) to image files to optimize during Powerlines processing.
|
|
@@ -64,6 +63,5 @@ interface ImageCompressionPluginResolvedConfig extends ResolvedConfig {
|
|
|
64
63
|
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">>;
|
|
65
64
|
}
|
|
66
65
|
type ImageCompressionPluginContext<TResolvedConfig extends ImageCompressionPluginResolvedConfig = ImageCompressionPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
67
|
-
//#endregion
|
|
68
66
|
export { ImageCompressionPluginContext, ImageCompressionPluginOptions, ImageCompressionPluginResolvedConfig, ImageCompressionPluginUserConfig };
|
|
69
67
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":["SvgOptions"],"sources":["../../src/types/plugin.ts"],"mappings":";;;UAgCiB;;;;;;EAMf;;;;;;;EAQA;;;;EAKA,MAAMA;;;;EAKN,OAAO;;;;EAKP,MAAM;;;;EAKN,MAAM;;;;EAKN,MAAM;;;;EAKN,OAAO;;;;EAKP,MAAM;;;;EAKN,OAAO;;;;EAKP,OAAO;;;;EAKP,OAAO;;UAGQ,yCAAyC;EACxD,mBAAmB;;UAGJ,6CAA6C;EAC5D,kBAAkB,KAChB,gIAaA,SACE,KACE;;KAgBI,8BACV,wBAAwB,uCACtB,wCACA,cAAc"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Config } from "svgo";
|
|
2
2
|
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
3
|
import { AvifOptions, GifOptions, HeifOptions, Jp2Options, JpegOptions, JxlOptions, PngOptions, TiffOptions, WebpOptions } from "sharp";
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
4
|
interface ImageCompressionPluginOptions {
|
|
6
5
|
/**
|
|
7
6
|
* A path or glob pattern (or an array of paths and glob patterns) to image files to optimize during Powerlines processing.
|
|
@@ -64,6 +63,5 @@ interface ImageCompressionPluginResolvedConfig extends ResolvedConfig {
|
|
|
64
63
|
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">>;
|
|
65
64
|
}
|
|
66
65
|
type ImageCompressionPluginContext<TResolvedConfig extends ImageCompressionPluginResolvedConfig = ImageCompressionPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
67
|
-
//#endregion
|
|
68
66
|
export { ImageCompressionPluginContext, ImageCompressionPluginOptions, ImageCompressionPluginResolvedConfig, ImageCompressionPluginUserConfig };
|
|
69
67
|
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":["SvgOptions"],"sources":["../../src/types/plugin.ts"],"mappings":""}
|
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.626",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to optimize images used by the project.",
|
|
6
6
|
"keywords": [
|
|
@@ -96,22 +96,22 @@
|
|
|
96
96
|
"typings": "dist/index.d.mts",
|
|
97
97
|
"files": ["dist/**/*"],
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@stryke/convert": "^0.7.
|
|
100
|
-
"@stryke/fs": "^0.33.
|
|
101
|
-
"@stryke/path": "^0.29.
|
|
102
|
-
"@stryke/string-format": "^0.17.
|
|
99
|
+
"@stryke/convert": "^0.7.47",
|
|
100
|
+
"@stryke/fs": "^0.33.118",
|
|
101
|
+
"@stryke/path": "^0.29.43",
|
|
102
|
+
"@stryke/string-format": "^0.17.58",
|
|
103
103
|
"chalk": "5.6.2",
|
|
104
104
|
"defu": "^6.1.7",
|
|
105
105
|
"jiti": "^2.7.0",
|
|
106
|
-
"powerlines": "^0.47.
|
|
106
|
+
"powerlines": "^0.47.215",
|
|
107
107
|
"sharp": "^0.34.5",
|
|
108
108
|
"svgo": "^4.1.0"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
112
|
-
"@storm-software/config": "^1.138.
|
|
113
|
-
"@types/node": "^25.9.
|
|
111
|
+
"@powerlines/plugin-plugin": "^0.12.628",
|
|
112
|
+
"@storm-software/config": "^1.138.87",
|
|
113
|
+
"@types/node": "^25.9.9"
|
|
114
114
|
},
|
|
115
115
|
"publishConfig": { "access": "public" },
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "810bc635d1503594d09d9f0c8c93ea413745a9df"
|
|
117
117
|
}
|