@mogzol/webpackbar 7.1.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.
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ const webpack = require('webpack');
4
+ const plugin = require('./shared/webpackbar.67d03d0b.cjs');
5
+ require('std-env');
6
+ require('pretty-time');
7
+ require('node:path');
8
+ require('ansis');
9
+ require('consola');
10
+ require('node:process');
11
+ require('string-width');
12
+
13
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
14
+
15
+ const webpack__default = /*#__PURE__*/_interopDefaultCompat(webpack);
16
+
17
+ var __defProp = Object.defineProperty;
18
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19
+ var __publicField = (obj, key, value) => {
20
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
+ return value;
22
+ };
23
+ class WebpackBarProgressPlugin extends webpack__default.ProgressPlugin {
24
+ constructor(options) {
25
+ super({
26
+ activeModules: true,
27
+ handler: (percent, message, ...details) => {
28
+ if (this.webpackbar) {
29
+ this.webpackbar.updateProgress(percent, message, details);
30
+ }
31
+ }
32
+ });
33
+ __publicField(this, "webpackbar");
34
+ this.webpackbar = new plugin.WebpackBar(options);
35
+ }
36
+ apply(compiler) {
37
+ super.apply(compiler);
38
+ this.webpackbar.apply(compiler);
39
+ }
40
+ }
41
+
42
+ module.exports = WebpackBarProgressPlugin;
@@ -0,0 +1,2 @@
1
+ import 'webpack';
2
+ export { R as Reporter, S as State, a as WebpackBarOptions, b as default } from './shared/webpackbar.28dc8790.cjs';
@@ -0,0 +1,2 @@
1
+ import 'webpack';
2
+ export { R as Reporter, S as State, a as WebpackBarOptions, b as default } from './shared/webpackbar.28dc8790.mjs';
@@ -0,0 +1,2 @@
1
+ import 'webpack';
2
+ export { R as Reporter, S as State, a as WebpackBarOptions, b as default } from './shared/webpackbar.28dc8790.js';
@@ -0,0 +1,36 @@
1
+ import webpack from 'webpack';
2
+ import { W as WebpackBar } from './shared/webpackbar.07fec22c.mjs';
3
+ import 'std-env';
4
+ import 'pretty-time';
5
+ import 'node:path';
6
+ import 'ansis';
7
+ import 'consola';
8
+ import 'node:process';
9
+ import 'string-width';
10
+
11
+ var __defProp = Object.defineProperty;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __publicField = (obj, key, value) => {
14
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
15
+ return value;
16
+ };
17
+ class WebpackBarProgressPlugin extends webpack.ProgressPlugin {
18
+ constructor(options) {
19
+ super({
20
+ activeModules: true,
21
+ handler: (percent, message, ...details) => {
22
+ if (this.webpackbar) {
23
+ this.webpackbar.updateProgress(percent, message, details);
24
+ }
25
+ }
26
+ });
27
+ __publicField(this, "webpackbar");
28
+ this.webpackbar = new WebpackBar(options);
29
+ }
30
+ apply(compiler) {
31
+ super.apply(compiler);
32
+ this.webpackbar.apply(compiler);
33
+ }
34
+ }
35
+
36
+ export { WebpackBarProgressPlugin as default };
package/package.json ADDED
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "@mogzol/webpackbar",
3
+ "version": "7.1.0",
4
+ "description": "Elegant ProgressBar and Profiler for Webpack and Rspack",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/mogzol/webpackbar.git"
8
+ },
9
+ "license": "MIT",
10
+ "type": "module",
11
+ "exports": {
12
+ ".": {
13
+ "import": {
14
+ "types": "./dist/webpack.d.mts",
15
+ "default": "./dist/webpack.mjs"
16
+ },
17
+ "require": {
18
+ "types": "./dist/webpack.d.cts",
19
+ "default": "./dist/webpack.cjs"
20
+ }
21
+ },
22
+ "./rspack": {
23
+ "import": {
24
+ "types": "./dist/rspack.d.mts",
25
+ "default": "./dist/rspack.mjs"
26
+ },
27
+ "require": {
28
+ "types": "./dist/rspack.d.cts",
29
+ "default": "./dist/rspack.cjs"
30
+ }
31
+ }
32
+ },
33
+ "main": "./dist/webpack.cjs",
34
+ "types": "./dist/webpack.d.cts",
35
+ "files": [
36
+ "dist"
37
+ ],
38
+ "scripts": {
39
+ "build": "unbuild",
40
+ "lint": "eslint . && prettier -c .",
41
+ "lint:fix": "eslint --fix . && prettier -w .",
42
+ "prepack": "unbuild",
43
+ "play": "webpack --config ./playground/webpack.config.mjs",
44
+ "play:rspack": "rspack --config ./playground/rspack.config.mjs",
45
+ "release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
46
+ "test": "pnpm lint && vitest run"
47
+ },
48
+ "dependencies": {
49
+ "ansis": "^3.17.0",
50
+ "consola": "^3.4.2",
51
+ "pretty-time": "^1.1.0",
52
+ "std-env": "^3.8.1",
53
+ "string-width": "^7.2.0"
54
+ },
55
+ "devDependencies": {
56
+ "@babel/standalone": "^7.26.10",
57
+ "@rspack/cli": "^1.2.8",
58
+ "@rspack/core": "^1.2.8",
59
+ "@types/node": "^22.13.11",
60
+ "automd": "^0.4.0",
61
+ "chalk": "^5.4.1",
62
+ "changelogen": "^0.6.1",
63
+ "eslint": "^9.23.0",
64
+ "eslint-config-unjs": "^0.4.2",
65
+ "figures": "^6.1.0",
66
+ "jiti": "^2.4.2",
67
+ "markdown-table": "^3.0.4",
68
+ "memory-fs": "^0.5.0",
69
+ "prettier": "^3.5.3",
70
+ "typescript": "^5.8.2",
71
+ "unbuild": "^2.0.0",
72
+ "vitest": "^2.1.9",
73
+ "webpack": "^5.98.0",
74
+ "webpack-cli": "^5.1.4",
75
+ "wrap-ansi": "^9.0.0"
76
+ },
77
+ "peerDependencies": {
78
+ "webpack": "3 || 4 || 5",
79
+ "@rspack/core": "*"
80
+ },
81
+ "peerDependenciesMeta": {
82
+ "webpack": {
83
+ "optional": true
84
+ },
85
+ "@rspack/core": {
86
+ "optional": true
87
+ }
88
+ },
89
+ "packageManager": "pnpm@9.15.9",
90
+ "engines": {
91
+ "node": ">=14.21.3"
92
+ }
93
+ }