@powerlines/plugin-webpack 0.5.130 → 0.5.131

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.
Files changed (130) hide show
  1. package/dist/helpers/index.cjs +3 -2
  2. package/dist/helpers/index.d.cts +3 -1
  3. package/dist/helpers/index.d.mts +3 -1
  4. package/dist/helpers/index.mjs +2 -1
  5. package/dist/helpers/unplugin.cjs +2 -11
  6. package/dist/helpers/unplugin.d.cts +2 -6
  7. package/dist/helpers/unplugin.d.mts +2 -6
  8. package/dist/helpers/unplugin.mjs +1 -9
  9. package/dist/helpers-B15z10jN.mjs +1 -0
  10. package/dist/helpers-LF26RHol.cjs +0 -0
  11. package/dist/index-9iG2qHLe.d.mts +1 -0
  12. package/dist/index-D4ELpJXS.d.cts +1 -0
  13. package/dist/index-D6CnpA_r.d.cts +1 -0
  14. package/dist/index-DL0uimUT.d.mts +1 -0
  15. package/dist/index.cjs +50 -8
  16. package/dist/index.d.cts +4 -3
  17. package/dist/index.d.mts +5 -5
  18. package/dist/index.mjs +46 -3
  19. package/dist/plugin-CsQFPhIt.d.cts +1762 -0
  20. package/dist/plugin-ifZVa20V.mjs +1 -0
  21. package/dist/plugin-pBKbb5K9.cjs +0 -0
  22. package/dist/plugin-wiaZGMv0.d.mts +1764 -0
  23. package/dist/types/index.cjs +2 -0
  24. package/dist/types/index.d.cts +2 -1
  25. package/dist/types/index.d.mts +2 -1
  26. package/dist/types/index.mjs +3 -0
  27. package/dist/types/plugin.cjs +1 -0
  28. package/dist/types/plugin.d.cts +1 -12
  29. package/dist/types/plugin.d.mts +1 -12
  30. package/dist/types/plugin.mjs +2 -0
  31. package/dist/types-U3zd8PTP.mjs +1 -0
  32. package/dist/types-o3zWarRp.cjs +0 -0
  33. package/dist/unplugin-BVSyqmCe.d.cts +7 -0
  34. package/dist/unplugin-CVrlqRhX.mjs +4615 -0
  35. package/dist/unplugin-Cemsz8kP.cjs +4659 -0
  36. package/dist/unplugin-vRGq3odL.d.mts +7 -0
  37. package/package.json +3 -3
  38. package/dist/_virtual/rolldown_runtime.cjs +0 -29
  39. package/dist/powerlines/schemas/fs.cjs +0 -226
  40. package/dist/powerlines/schemas/fs.mjs +0 -224
  41. package/dist/powerlines/src/api.cjs +0 -580
  42. package/dist/powerlines/src/api.mjs +0 -578
  43. package/dist/powerlines/src/internal/babel/module-resolver-plugin.cjs +0 -86
  44. package/dist/powerlines/src/internal/babel/module-resolver-plugin.mjs +0 -84
  45. package/dist/powerlines/src/internal/helpers/environment.cjs +0 -52
  46. package/dist/powerlines/src/internal/helpers/environment.mjs +0 -48
  47. package/dist/powerlines/src/internal/helpers/generate-types.cjs +0 -51
  48. package/dist/powerlines/src/internal/helpers/generate-types.mjs +0 -49
  49. package/dist/powerlines/src/internal/helpers/hooks.cjs +0 -63
  50. package/dist/powerlines/src/internal/helpers/hooks.mjs +0 -61
  51. package/dist/powerlines/src/internal/helpers/install-dependencies.cjs +0 -25
  52. package/dist/powerlines/src/internal/helpers/install-dependencies.mjs +0 -24
  53. package/dist/powerlines/src/internal/helpers/install.cjs +0 -37
  54. package/dist/powerlines/src/internal/helpers/install.mjs +0 -36
  55. package/dist/powerlines/src/internal/helpers/resolve-tsconfig.cjs +0 -98
  56. package/dist/powerlines/src/internal/helpers/resolve-tsconfig.mjs +0 -94
  57. package/dist/powerlines/src/internal/helpers/resolver.cjs +0 -43
  58. package/dist/powerlines/src/internal/helpers/resolver.mjs +0 -41
  59. package/dist/powerlines/src/lib/build/webpack.cjs +0 -47
  60. package/dist/powerlines/src/lib/build/webpack.mjs +0 -45
  61. package/dist/powerlines/src/lib/config-file.cjs +0 -79
  62. package/dist/powerlines/src/lib/config-file.mjs +0 -76
  63. package/dist/powerlines/src/lib/contexts/api-context.cjs +0 -184
  64. package/dist/powerlines/src/lib/contexts/api-context.mjs +0 -182
  65. package/dist/powerlines/src/lib/contexts/context.cjs +0 -931
  66. package/dist/powerlines/src/lib/contexts/context.mjs +0 -929
  67. package/dist/powerlines/src/lib/contexts/environment-context.cjs +0 -160
  68. package/dist/powerlines/src/lib/contexts/environment-context.mjs +0 -159
  69. package/dist/powerlines/src/lib/contexts/plugin-context.cjs +0 -75
  70. package/dist/powerlines/src/lib/contexts/plugin-context.mjs +0 -74
  71. package/dist/powerlines/src/lib/entry.cjs +0 -69
  72. package/dist/powerlines/src/lib/entry.mjs +0 -67
  73. package/dist/powerlines/src/lib/fs/helpers.cjs +0 -85
  74. package/dist/powerlines/src/lib/fs/helpers.mjs +0 -81
  75. package/dist/powerlines/src/lib/fs/storage/base.cjs +0 -196
  76. package/dist/powerlines/src/lib/fs/storage/base.mjs +0 -195
  77. package/dist/powerlines/src/lib/fs/storage/file-system.cjs +0 -170
  78. package/dist/powerlines/src/lib/fs/storage/file-system.mjs +0 -169
  79. package/dist/powerlines/src/lib/fs/storage/virtual.cjs +0 -88
  80. package/dist/powerlines/src/lib/fs/storage/virtual.mjs +0 -87
  81. package/dist/powerlines/src/lib/fs/vfs.cjs +0 -830
  82. package/dist/powerlines/src/lib/fs/vfs.mjs +0 -828
  83. package/dist/powerlines/src/lib/logger.cjs +0 -58
  84. package/dist/powerlines/src/lib/logger.mjs +0 -55
  85. package/dist/powerlines/src/lib/typescript/ts-morph.cjs +0 -104
  86. package/dist/powerlines/src/lib/typescript/ts-morph.mjs +0 -102
  87. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -149
  88. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -144
  89. package/dist/powerlines/src/lib/unplugin/factory.cjs +0 -6
  90. package/dist/powerlines/src/lib/unplugin/factory.mjs +0 -8
  91. package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -17
  92. package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -16
  93. package/dist/powerlines/src/lib/unplugin/index.cjs +0 -3
  94. package/dist/powerlines/src/lib/unplugin/index.mjs +0 -5
  95. package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -128
  96. package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -127
  97. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
  98. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
  99. package/dist/powerlines/src/lib/utilities/meta.cjs +0 -45
  100. package/dist/powerlines/src/lib/utilities/meta.mjs +0 -41
  101. package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -22
  102. package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -21
  103. package/dist/powerlines/src/plugin-utils/helpers.cjs +0 -148
  104. package/dist/powerlines/src/plugin-utils/helpers.mjs +0 -138
  105. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
  106. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
  107. package/dist/powerlines/src/types/babel.d.mts +0 -4
  108. package/dist/powerlines/src/types/build.cjs +0 -15
  109. package/dist/powerlines/src/types/build.d.cts +0 -149
  110. package/dist/powerlines/src/types/build.d.mts +0 -149
  111. package/dist/powerlines/src/types/build.mjs +0 -14
  112. package/dist/powerlines/src/types/commands.cjs +0 -16
  113. package/dist/powerlines/src/types/commands.d.cts +0 -8
  114. package/dist/powerlines/src/types/commands.d.mts +0 -9
  115. package/dist/powerlines/src/types/commands.mjs +0 -15
  116. package/dist/powerlines/src/types/config.d.cts +0 -370
  117. package/dist/powerlines/src/types/config.d.mts +0 -372
  118. package/dist/powerlines/src/types/context.d.cts +0 -403
  119. package/dist/powerlines/src/types/context.d.mts +0 -405
  120. package/dist/powerlines/src/types/fs.d.cts +0 -486
  121. package/dist/powerlines/src/types/fs.d.mts +0 -486
  122. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  123. package/dist/powerlines/src/types/plugin.cjs +0 -32
  124. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  125. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  126. package/dist/powerlines/src/types/plugin.mjs +0 -31
  127. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  128. package/dist/powerlines/src/types/resolved.d.mts +0 -83
  129. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  130. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
@@ -1,3 +1,4 @@
1
- const require_helpers_unplugin = require('./unplugin.cjs');
1
+ const require_unplugin = require('../unplugin-Cemsz8kP.cjs');
2
+ require('../helpers-LF26RHol.cjs');
2
3
 
3
- exports.createWebpackPlugin = require_helpers_unplugin.createWebpackPlugin;
4
+ exports.createWebpackPlugin = require_unplugin.createWebpackPlugin;
@@ -1,2 +1,4 @@
1
- import { createWebpackPlugin } from "./unplugin.cjs";
1
+ import "../plugin-CsQFPhIt.cjs";
2
+ import { t as createWebpackPlugin } from "../unplugin-BVSyqmCe.cjs";
3
+ import "../index-D6CnpA_r.cjs";
2
4
  export { createWebpackPlugin };
@@ -1,2 +1,4 @@
1
- import { createWebpackPlugin } from "./unplugin.mjs";
1
+ import "../plugin-wiaZGMv0.mjs";
2
+ import { t as createWebpackPlugin } from "../unplugin-vRGq3odL.mjs";
3
+ import "../index-DL0uimUT.mjs";
2
4
  export { createWebpackPlugin };
@@ -1,3 +1,4 @@
1
- import { createWebpackPlugin } from "./unplugin.mjs";
1
+ import { t as createWebpackPlugin } from "../unplugin-CVrlqRhX.mjs";
2
+ import "../helpers-B15z10jN.mjs";
2
3
 
3
4
  export { createWebpackPlugin };
@@ -1,12 +1,3 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_plugin = require('../powerlines/src/lib/unplugin/plugin.cjs');
3
- require('../powerlines/src/lib/unplugin/index.cjs');
4
- let unplugin = require("unplugin");
1
+ const require_unplugin = require('../unplugin-Cemsz8kP.cjs');
5
2
 
6
- //#region src/helpers/unplugin.ts
7
- function createWebpackPlugin(context) {
8
- return (0, unplugin.createWebpackPlugin)(require_plugin.createUnplugin(context))({});
9
- }
10
-
11
- //#endregion
12
- exports.createWebpackPlugin = createWebpackPlugin;
3
+ exports.createWebpackPlugin = require_unplugin.createWebpackPlugin;
@@ -1,7 +1,3 @@
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
1
+ import "../plugin-CsQFPhIt.cjs";
2
+ import { t as createWebpackPlugin } from "../unplugin-BVSyqmCe.cjs";
7
3
  export { createWebpackPlugin };
@@ -1,7 +1,3 @@
1
- import { WebpackPluginContext } from "../types/plugin.mjs";
2
- import * as webpack0 from "webpack";
3
-
4
- //#region src/helpers/unplugin.d.ts
5
- declare function createWebpackPlugin(context: WebpackPluginContext): webpack0.WebpackPluginInstance;
6
- //#endregion
1
+ import "../plugin-wiaZGMv0.mjs";
2
+ import { t as createWebpackPlugin } from "../unplugin-vRGq3odL.mjs";
7
3
  export { createWebpackPlugin };
@@ -1,11 +1,3 @@
1
- import { createUnplugin } from "../powerlines/src/lib/unplugin/plugin.mjs";
2
- import "../powerlines/src/lib/unplugin/index.mjs";
3
- import { createWebpackPlugin as createWebpackPlugin$1 } from "unplugin";
1
+ import { t as createWebpackPlugin } from "../unplugin-CVrlqRhX.mjs";
4
2
 
5
- //#region src/helpers/unplugin.ts
6
- function createWebpackPlugin(context) {
7
- return createWebpackPlugin$1(createUnplugin(context))({});
8
- }
9
-
10
- //#endregion
11
3
  export { createWebpackPlugin };
@@ -0,0 +1 @@
1
+ export { };
File without changes
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
package/dist/index.cjs CHANGED
@@ -1,14 +1,56 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_webpack = require('./powerlines/src/lib/build/webpack.cjs');
4
- const require_helpers_unplugin = require('./helpers/unplugin.cjs');
5
- require('./helpers/index.cjs');
2
+ const require_unplugin = require('./unplugin-Cemsz8kP.cjs');
3
+ require('./helpers-LF26RHol.cjs');
4
+ require('./plugin-pBKbb5K9.cjs');
5
+ require('./types-o3zWarRp.cjs');
6
6
  let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
7
7
  let defu = require("defu");
8
- defu = require_rolldown_runtime.__toESM(defu);
8
+ defu = require_unplugin.__toESM(defu);
9
+ let __stryke_helpers_omit = require("@stryke/helpers/omit");
10
+ let __stryke_path_join_paths = require("@stryke/path/join-paths");
9
11
  let webpack = require("webpack");
10
- webpack = require_rolldown_runtime.__toESM(webpack);
12
+ webpack = require_unplugin.__toESM(webpack);
11
13
 
14
+ //#region ../powerlines/src/lib/build/webpack.ts
15
+ /**
16
+ * Resolves the options for [webpack](https://webpack.js.org/).
17
+ *
18
+ * @param context - The build context.
19
+ * @returns The resolved options.
20
+ */
21
+ function extractWebpackConfig(context) {
22
+ return (0, defu.default)({ resolve: { alias: context.builtins.reduce((ret, id) => {
23
+ if (!ret[id]) {
24
+ const path = context.fs.ids[id];
25
+ if (path) ret[id] = path;
26
+ }
27
+ return ret;
28
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias.reduce((ret, alias) => {
29
+ if (!ret[alias.find.toString()]) ret[alias.find.toString()] = alias.replacement;
30
+ return ret;
31
+ }, {}) : context.config.build.alias : {}) } }, context.config.build.variant === "webpack" ? context.config.build.override : {}, context.config.build.variant === "webpack" ? (0, __stryke_helpers_omit.omit)(context.config.build, ["override", "variant"]) : {}, {
32
+ output: { path: (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
33
+ name: context.config.name,
34
+ node: context.config.build.platform === "node" ? {
35
+ __dirname: true,
36
+ __filename: true,
37
+ global: true
38
+ } : false,
39
+ mode: context.config.mode === "development" ? "development" : "production",
40
+ cache: {
41
+ type: "filesystem",
42
+ cacheDirectory: (0, __stryke_path_join_paths.joinPaths)(context.cachePath, "webpack", "cache")
43
+ },
44
+ recordsInputPath: (0, __stryke_path_join_paths.joinPaths)(context.cachePath, "webpack", ".webpack-records.json"),
45
+ recordsOutputPath: (0, __stryke_path_join_paths.joinPaths)(context.cachePath, "webpack", ".webpack-records.json"),
46
+ context: (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.projectRoot),
47
+ noExternal: context.builtins,
48
+ devtool: context.config.mode !== "development" ? false : "source-map",
49
+ optimization: { minimize: context.config.mode !== "development" }
50
+ });
51
+ }
52
+
53
+ //#endregion
12
54
  //#region src/index.ts
13
55
  /**
14
56
  * A Powerlines plugin to assist in developing other Powerlines plugins.
@@ -27,13 +69,13 @@ const plugin = (options = {}) => {
27
69
  (0, webpack.default)((0, defu.default)({ entry: this.entry.reduce((ret, entry) => {
28
70
  ret[entry.output || entry.name || entry.file] = entry.file;
29
71
  return ret;
30
- }, {}) }, require_webpack.extractWebpackConfig(this), { plugins: [require_helpers_unplugin.createWebpackPlugin(this)] }));
72
+ }, {}) }, extractWebpackConfig(this), { plugins: [require_unplugin.createWebpackPlugin(this)] }));
31
73
  }
32
74
  };
33
75
  };
34
76
  var src_default = plugin;
35
77
 
36
78
  //#endregion
37
- exports.createWebpackPlugin = require_helpers_unplugin.createWebpackPlugin;
79
+ exports.createWebpackPlugin = require_unplugin.createWebpackPlugin;
38
80
  exports.default = src_default;
39
81
  exports.plugin = plugin;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,7 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.cjs";
2
- import { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig } from "./types/plugin.cjs";
3
- import { createWebpackPlugin } from "./helpers/unplugin.cjs";
1
+ import { a as __ΩWebpackPluginOptions, i as __ΩWebpackPluginContext, n as WebpackPluginOptions, o as __ΩWebpackPluginResolvedConfig, r as WebpackPluginResolvedConfig, s as Plugin, t as WebpackPluginContext } from "./plugin-CsQFPhIt.cjs";
2
+ import { t as createWebpackPlugin } from "./unplugin-BVSyqmCe.cjs";
3
+ import "./index-D6CnpA_r.cjs";
4
+ import "./index-D4ELpJXS.cjs";
4
5
 
5
6
  //#region src/index.d.ts
6
7
 
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.mjs";
2
- import { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig } from "./types/plugin.mjs";
3
- import { createWebpackPlugin } from "./helpers/unplugin.mjs";
4
- import "./helpers/index.mjs";
5
- import "./types/index.mjs";
1
+ import { a as __ΩWebpackPluginOptions, i as __ΩWebpackPluginContext, n as WebpackPluginOptions, o as __ΩWebpackPluginResolvedConfig, r as WebpackPluginResolvedConfig, s as Plugin, t as WebpackPluginContext } from "./plugin-wiaZGMv0.mjs";
2
+ import { t as createWebpackPlugin } from "./unplugin-vRGq3odL.mjs";
3
+ import "./index-DL0uimUT.mjs";
4
+ import "./index-9iG2qHLe.mjs";
6
5
 
7
6
  //#region src/index.d.ts
7
+
8
8
  /**
9
9
  * A Powerlines plugin to assist in developing other Powerlines plugins.
10
10
  */
package/dist/index.mjs CHANGED
@@ -1,10 +1,53 @@
1
- import { extractWebpackConfig } from "./powerlines/src/lib/build/webpack.mjs";
2
- import { createWebpackPlugin } from "./helpers/unplugin.mjs";
3
- import "./helpers/index.mjs";
1
+ import { t as createWebpackPlugin } from "./unplugin-CVrlqRhX.mjs";
2
+ import "./helpers-B15z10jN.mjs";
3
+ import "./plugin-ifZVa20V.mjs";
4
+ import "./types-U3zd8PTP.mjs";
4
5
  import { LogLevelLabel } from "@storm-software/config-tools/types";
5
6
  import defu$1 from "defu";
7
+ import { omit } from "@stryke/helpers/omit";
8
+ import { joinPaths } from "@stryke/path/join-paths";
6
9
  import build from "webpack";
7
10
 
11
+ //#region ../powerlines/src/lib/build/webpack.ts
12
+ /**
13
+ * Resolves the options for [webpack](https://webpack.js.org/).
14
+ *
15
+ * @param context - The build context.
16
+ * @returns The resolved options.
17
+ */
18
+ function extractWebpackConfig(context) {
19
+ return defu$1({ resolve: { alias: context.builtins.reduce((ret, id) => {
20
+ if (!ret[id]) {
21
+ const path = context.fs.ids[id];
22
+ if (path) ret[id] = path;
23
+ }
24
+ return ret;
25
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias.reduce((ret, alias) => {
26
+ if (!ret[alias.find.toString()]) ret[alias.find.toString()] = alias.replacement;
27
+ return ret;
28
+ }, {}) : context.config.build.alias : {}) } }, context.config.build.variant === "webpack" ? context.config.build.override : {}, context.config.build.variant === "webpack" ? omit(context.config.build, ["override", "variant"]) : {}, {
29
+ output: { path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
30
+ name: context.config.name,
31
+ node: context.config.build.platform === "node" ? {
32
+ __dirname: true,
33
+ __filename: true,
34
+ global: true
35
+ } : false,
36
+ mode: context.config.mode === "development" ? "development" : "production",
37
+ cache: {
38
+ type: "filesystem",
39
+ cacheDirectory: joinPaths(context.cachePath, "webpack", "cache")
40
+ },
41
+ recordsInputPath: joinPaths(context.cachePath, "webpack", ".webpack-records.json"),
42
+ recordsOutputPath: joinPaths(context.cachePath, "webpack", ".webpack-records.json"),
43
+ context: joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot),
44
+ noExternal: context.builtins,
45
+ devtool: context.config.mode !== "development" ? false : "source-map",
46
+ optimization: { minimize: context.config.mode !== "development" }
47
+ });
48
+ }
49
+
50
+ //#endregion
8
51
  //#region src/index.ts
9
52
  /**
10
53
  * A Powerlines plugin to assist in developing other Powerlines plugins.