@powerlines/plugin-webpack 0.5.299 → 0.5.300
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/core/src/lib/logger.mjs +40 -0
- package/dist/core/src/lib/logger.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/helpers.mjs +19 -0
- package/dist/core/src/lib/unplugin/helpers.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/index.mjs +5 -0
- package/dist/core/src/lib/unplugin/module-resolution.mjs +66 -0
- package/dist/core/src/lib/unplugin/module-resolution.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/plugin.mjs +71 -0
- package/dist/core/src/lib/unplugin/plugin.mjs.map +1 -0
- package/dist/core/src/lib/utilities/source-file.mjs +22 -0
- package/dist/core/src/lib/utilities/source-file.mjs.map +1 -0
- package/dist/core/src/types/api.d.mts +103 -0
- package/dist/core/src/types/api.d.mts.map +1 -0
- package/dist/core/src/types/commands.d.mts +10 -0
- package/dist/core/src/types/commands.d.mts.map +1 -0
- package/dist/core/src/types/config.d.mts +551 -0
- package/dist/core/src/types/config.d.mts.map +1 -0
- package/dist/core/src/types/context.d.mts +511 -0
- package/dist/core/src/types/context.d.mts.map +1 -0
- package/dist/core/src/types/fs.d.mts +487 -0
- package/dist/core/src/types/fs.d.mts.map +1 -0
- package/dist/core/src/types/hooks.d.mts +99 -0
- package/dist/core/src/types/hooks.d.mts.map +1 -0
- package/dist/core/src/types/index.d.mts +9 -0
- package/dist/core/src/types/plugin.d.mts +204 -0
- package/dist/core/src/types/plugin.d.mts.map +1 -0
- package/dist/core/src/types/tsconfig.d.mts +70 -0
- package/dist/core/src/types/tsconfig.d.mts.map +1 -0
- package/dist/core/src/types/unplugin.d.mts +25 -0
- package/dist/core/src/types/unplugin.d.mts.map +1 -0
- package/dist/core/src/types/unplugin.mjs +22 -0
- package/dist/core/src/types/unplugin.mjs.map +1 -0
- package/dist/helpers/index.d.mts +2 -1
- package/dist/helpers/index.mjs +2 -1
- package/dist/helpers/resolve-options.d.mts +16 -0
- package/dist/helpers/resolve-options.d.mts.map +1 -0
- package/dist/helpers/resolve-options.mjs +37 -0
- package/dist/helpers/resolve-options.mjs.map +1 -0
- package/dist/helpers/unplugin.mjs +2 -1
- package/dist/helpers/unplugin.mjs.map +1 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -7
- package/dist/index.mjs.map +1 -1
- package/dist/types/build.d.mts +8 -0
- package/dist/types/build.d.mts.map +1 -0
- package/dist/types/build.mjs +1 -0
- package/dist/types/index.d.mts +2 -2
- package/dist/types/plugin.d.mts +13 -6
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +14 -80
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/helpers/index.cjs +0 -3
- package/dist/helpers/index.d.cts +0 -2
- package/dist/helpers/unplugin.cjs +0 -11
- package/dist/helpers/unplugin.d.cts +0 -8
- package/dist/helpers/unplugin.d.cts.map +0 -1
- package/dist/index.cjs +0 -38
- package/dist/index.d.cts +0 -14
- package/dist/index.d.cts.map +0 -1
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +0 -2
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +0 -14
- package/dist/types/plugin.d.cts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-webpack",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.300",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to build projects using Webpack.",
|
|
6
6
|
"repository": {
|
|
@@ -38,95 +38,29 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"private": false,
|
|
41
|
-
"main": "./dist/index.
|
|
41
|
+
"main": "./dist/index.mjs",
|
|
42
42
|
"module": "./dist/index.mjs",
|
|
43
43
|
"exports": {
|
|
44
|
-
".":
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
"default": {
|
|
54
|
-
"types": "./dist/index.d.mts",
|
|
55
|
-
"default": "./dist/index.mjs"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"./helpers": {
|
|
59
|
-
"require": {
|
|
60
|
-
"types": "./dist/helpers/index.d.cts",
|
|
61
|
-
"default": "./dist/helpers/index.cjs"
|
|
62
|
-
},
|
|
63
|
-
"import": {
|
|
64
|
-
"types": "./dist/helpers/index.d.mts",
|
|
65
|
-
"default": "./dist/helpers/index.mjs"
|
|
66
|
-
},
|
|
67
|
-
"default": {
|
|
68
|
-
"types": "./dist/helpers/index.d.mts",
|
|
69
|
-
"default": "./dist/helpers/index.mjs"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"./helpers/unplugin": {
|
|
73
|
-
"require": {
|
|
74
|
-
"types": "./dist/helpers/unplugin.d.cts",
|
|
75
|
-
"default": "./dist/helpers/unplugin.cjs"
|
|
76
|
-
},
|
|
77
|
-
"import": {
|
|
78
|
-
"types": "./dist/helpers/unplugin.d.mts",
|
|
79
|
-
"default": "./dist/helpers/unplugin.mjs"
|
|
80
|
-
},
|
|
81
|
-
"default": {
|
|
82
|
-
"types": "./dist/helpers/unplugin.d.mts",
|
|
83
|
-
"default": "./dist/helpers/unplugin.mjs"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"./package.json": "./package.json",
|
|
87
|
-
"./types": {
|
|
88
|
-
"require": {
|
|
89
|
-
"types": "./dist/types/index.d.cts",
|
|
90
|
-
"default": "./dist/types/index.cjs"
|
|
91
|
-
},
|
|
92
|
-
"import": {
|
|
93
|
-
"types": "./dist/types/index.d.mts",
|
|
94
|
-
"default": "./dist/types/index.mjs"
|
|
95
|
-
},
|
|
96
|
-
"default": {
|
|
97
|
-
"types": "./dist/types/index.d.mts",
|
|
98
|
-
"default": "./dist/types/index.mjs"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"./types/plugin": {
|
|
102
|
-
"require": {
|
|
103
|
-
"types": "./dist/types/plugin.d.cts",
|
|
104
|
-
"default": "./dist/types/plugin.cjs"
|
|
105
|
-
},
|
|
106
|
-
"import": {
|
|
107
|
-
"types": "./dist/types/plugin.d.mts",
|
|
108
|
-
"default": "./dist/types/plugin.mjs"
|
|
109
|
-
},
|
|
110
|
-
"default": {
|
|
111
|
-
"types": "./dist/types/plugin.d.mts",
|
|
112
|
-
"default": "./dist/types/plugin.mjs"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
44
|
+
".": "./dist/index.mjs",
|
|
45
|
+
"./helpers": "./dist/helpers/index.mjs",
|
|
46
|
+
"./helpers/resolve-options": "./dist/helpers/resolve-options.mjs",
|
|
47
|
+
"./helpers/unplugin": "./dist/helpers/unplugin.mjs",
|
|
48
|
+
"./types": "./dist/types/index.mjs",
|
|
49
|
+
"./types/build": "./dist/types/build.mjs",
|
|
50
|
+
"./types/plugin": "./dist/types/plugin.mjs",
|
|
51
|
+
"./*": "./*"
|
|
115
52
|
},
|
|
116
53
|
"typings": "dist/index.d.mts",
|
|
117
54
|
"files": ["dist/**/*"],
|
|
118
55
|
"keywords": ["webpack", "powerlines", "storm-software", "powerlines-plugin"],
|
|
119
56
|
"dependencies": {
|
|
120
57
|
"defu": "^6.1.4",
|
|
121
|
-
"
|
|
58
|
+
"@stryke/path": "^0.26.6",
|
|
122
59
|
"unplugin": "3.0.0-beta.3",
|
|
123
60
|
"webpack": "^5.105.3"
|
|
124
61
|
},
|
|
125
|
-
"devDependencies": {
|
|
126
|
-
"@powerlines/plugin-plugin": "^0.12.241",
|
|
127
|
-
"@types/node": "^25.3.1"
|
|
128
|
-
},
|
|
62
|
+
"devDependencies": { "@types/node": "^25.3.2" },
|
|
129
63
|
"publishConfig": { "access": "public" },
|
|
130
|
-
"types": "./dist/index.d.
|
|
131
|
-
"gitHead": "
|
|
64
|
+
"types": "./dist/index.d.mts",
|
|
65
|
+
"gitHead": "0dcb16f054b8a69915b074578e6d4dfa3ecc1529"
|
|
132
66
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
|
|
29
|
-
exports.__toESM = __toESM;
|
package/dist/helpers/index.cjs
DELETED
package/dist/helpers/index.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let powerlines_lib_unplugin = require("powerlines/lib/unplugin");
|
|
3
|
-
let unplugin = require("unplugin");
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/unplugin.ts
|
|
6
|
-
function createWebpackPlugin(context) {
|
|
7
|
-
return (0, unplugin.createWebpackPlugin)((0, powerlines_lib_unplugin.createUnplugin)(context))({});
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
exports.createWebpackPlugin = createWebpackPlugin;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { WebpackPluginContext } from "../types/plugin.cjs";
|
|
2
|
-
import * as webpack0 from "webpack";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createWebpackPlugin(context: WebpackPluginContext): webpack0.WebpackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createWebpackPlugin };
|
|
8
|
-
//# sourceMappingURL=unplugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.d.cts","names":[],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,mBAAA,UAA6B,uBAAoB,QAAA,CAAA"}
|
package/dist/index.cjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
const require_helpers_unplugin = require('./helpers/unplugin.cjs');
|
|
4
|
-
require('./helpers/index.cjs');
|
|
5
|
-
let defu = require("defu");
|
|
6
|
-
defu = require_rolldown_runtime.__toESM(defu);
|
|
7
|
-
let powerlines_lib_build_webpack = require("powerlines/lib/build/webpack");
|
|
8
|
-
let webpack = require("webpack");
|
|
9
|
-
webpack = require_rolldown_runtime.__toESM(webpack);
|
|
10
|
-
|
|
11
|
-
//#region src/index.ts
|
|
12
|
-
/**
|
|
13
|
-
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
14
|
-
*/
|
|
15
|
-
const plugin = (options = {}) => {
|
|
16
|
-
return {
|
|
17
|
-
name: "webpack",
|
|
18
|
-
config() {
|
|
19
|
-
this.trace("Providing default configuration for the Powerlines `webpack` build plugin.");
|
|
20
|
-
return { build: {
|
|
21
|
-
...options,
|
|
22
|
-
variant: "webpack"
|
|
23
|
-
} };
|
|
24
|
-
},
|
|
25
|
-
async build() {
|
|
26
|
-
(0, webpack.default)((0, defu.default)({ entry: this.entry.reduce((ret, entry) => {
|
|
27
|
-
ret[entry.output || entry.name || entry.file] = entry.file;
|
|
28
|
-
return ret;
|
|
29
|
-
}, {}) }, (0, powerlines_lib_build_webpack.extractWebpackConfig)(this), { plugins: [require_helpers_unplugin.createWebpackPlugin(this)] }));
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
var src_default = plugin;
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
exports.createWebpackPlugin = require_helpers_unplugin.createWebpackPlugin;
|
|
37
|
-
exports.default = src_default;
|
|
38
|
-
exports.plugin = plugin;
|
package/dist/index.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig } from "./types/plugin.cjs";
|
|
2
|
-
import { createWebpackPlugin } from "./helpers/unplugin.cjs";
|
|
3
|
-
import "./helpers/index.cjs";
|
|
4
|
-
import "./types/index.cjs";
|
|
5
|
-
import { Plugin } from "powerlines/types/plugin";
|
|
6
|
-
|
|
7
|
-
//#region src/index.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
10
|
-
*/
|
|
11
|
-
declare const plugin: <TContext extends WebpackPluginContext = WebpackPluginContext>(options?: WebpackPluginOptions) => Plugin<TContext>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig, createWebpackPlugin, plugin as default, plugin };
|
|
14
|
-
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAgCa,cAAA,MAwCZ,EAAA,CAAA,iBAvCkB,oBAuClB,GAvCyC,oBAuCzC,CAAA,CAAA,OAAA,CAAA,EArCU,oBAqCV,EAAA,GApCE,MAoCF,CApCS,QAoCT,CAAA"}
|
package/dist/types/index.cjs
DELETED
|
File without changes
|
package/dist/types/index.d.cts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig } from "./plugin.cjs";
|
|
2
|
-
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig };
|
package/dist/types/plugin.cjs
DELETED
|
File without changes
|
package/dist/types/plugin.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { WebpackBuildConfig } from "powerlines/types/build";
|
|
2
|
-
import { PluginContext } from "powerlines/types/context";
|
|
3
|
-
import { WebpackResolvedConfig } from "powerlines/types/resolved";
|
|
4
|
-
|
|
5
|
-
//#region src/types/plugin.d.ts
|
|
6
|
-
type WebpackPluginOptions = Partial<WebpackBuildConfig>;
|
|
7
|
-
type WebpackPluginResolvedConfig = WebpackResolvedConfig;
|
|
8
|
-
type WebpackPluginContext<TResolvedConfig extends WebpackPluginResolvedConfig = WebpackPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
9
|
-
declare type __ΩWebpackPluginOptions = any[];
|
|
10
|
-
declare type __ΩWebpackPluginResolvedConfig = any[];
|
|
11
|
-
declare type __ΩWebpackPluginContext = any[];
|
|
12
|
-
//#endregion
|
|
13
|
-
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig };
|
|
14
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;KAsBY,oBAAA,GAAuB,QAAQ;KAE/B,2BAAA,GAA8B;AAF9B,KAIA,oBAJoB,CAAA,wBAKN,2BALgB,GAMtC,2BANsC,CAAA,GAOtC,aAPsC,CAOxB,eAPwB,CAAA;AAE9B,uCAA8B,GAAA,EAAA;AAE9B,8CAAoB,GAAA,EAAA;AACN,uCAAA,GAAA,EAAA"}
|