@powerlines/plugin-webpack 0.5.137 → 0.5.139
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/helpers/unplugin.cjs +2 -3
- package/dist/helpers/unplugin.mjs +1 -2
- package/dist/index.cjs +3 -4
- package/dist/index.mjs +4 -5
- package/dist/powerlines/src/types/babel.d.mts +1 -3
- package/dist/powerlines/src/types/config.d.mts +1 -2
- package/dist/powerlines/src/types/context.d.mts +5 -5
- package/dist/powerlines/src/types/fs.d.mts +1 -1
- package/dist/powerlines/src/types/tsconfig.d.mts +1 -1
- package/package.json +5 -10
- package/dist/powerlines/schemas/fs.cjs +0 -226
- package/dist/powerlines/schemas/fs.mjs +0 -224
- package/dist/powerlines/src/api.cjs +0 -580
- package/dist/powerlines/src/api.mjs +0 -578
- package/dist/powerlines/src/internal/babel/module-resolver-plugin.cjs +0 -86
- package/dist/powerlines/src/internal/babel/module-resolver-plugin.mjs +0 -84
- package/dist/powerlines/src/internal/helpers/environment.cjs +0 -52
- package/dist/powerlines/src/internal/helpers/environment.mjs +0 -48
- package/dist/powerlines/src/internal/helpers/generate-types.cjs +0 -51
- package/dist/powerlines/src/internal/helpers/generate-types.mjs +0 -49
- package/dist/powerlines/src/internal/helpers/hooks.cjs +0 -66
- package/dist/powerlines/src/internal/helpers/hooks.mjs +0 -64
- package/dist/powerlines/src/internal/helpers/install-dependencies.cjs +0 -25
- package/dist/powerlines/src/internal/helpers/install-dependencies.mjs +0 -24
- package/dist/powerlines/src/internal/helpers/install.cjs +0 -37
- package/dist/powerlines/src/internal/helpers/install.mjs +0 -36
- package/dist/powerlines/src/internal/helpers/resolve-tsconfig.cjs +0 -98
- package/dist/powerlines/src/internal/helpers/resolve-tsconfig.mjs +0 -94
- package/dist/powerlines/src/internal/helpers/resolver.cjs +0 -43
- package/dist/powerlines/src/internal/helpers/resolver.mjs +0 -41
- package/dist/powerlines/src/lib/build/webpack.cjs +0 -47
- package/dist/powerlines/src/lib/build/webpack.mjs +0 -45
- package/dist/powerlines/src/lib/config-file.cjs +0 -79
- package/dist/powerlines/src/lib/config-file.mjs +0 -76
- package/dist/powerlines/src/lib/contexts/api-context.cjs +0 -184
- package/dist/powerlines/src/lib/contexts/api-context.mjs +0 -182
- package/dist/powerlines/src/lib/contexts/context.cjs +0 -933
- package/dist/powerlines/src/lib/contexts/context.mjs +0 -931
- package/dist/powerlines/src/lib/contexts/environment-context.cjs +0 -195
- package/dist/powerlines/src/lib/contexts/environment-context.mjs +0 -194
- package/dist/powerlines/src/lib/contexts/plugin-context.cjs +0 -75
- package/dist/powerlines/src/lib/contexts/plugin-context.mjs +0 -74
- package/dist/powerlines/src/lib/entry.cjs +0 -69
- package/dist/powerlines/src/lib/entry.mjs +0 -67
- package/dist/powerlines/src/lib/fs/helpers.cjs +0 -85
- package/dist/powerlines/src/lib/fs/helpers.mjs +0 -81
- package/dist/powerlines/src/lib/fs/storage/base.cjs +0 -196
- package/dist/powerlines/src/lib/fs/storage/base.mjs +0 -195
- package/dist/powerlines/src/lib/fs/storage/file-system.cjs +0 -170
- package/dist/powerlines/src/lib/fs/storage/file-system.mjs +0 -169
- package/dist/powerlines/src/lib/fs/storage/virtual.cjs +0 -88
- package/dist/powerlines/src/lib/fs/storage/virtual.mjs +0 -87
- package/dist/powerlines/src/lib/fs/vfs.cjs +0 -830
- package/dist/powerlines/src/lib/fs/vfs.mjs +0 -828
- package/dist/powerlines/src/lib/logger.cjs +0 -58
- package/dist/powerlines/src/lib/logger.mjs +0 -55
- package/dist/powerlines/src/lib/typescript/ts-morph.cjs +0 -104
- package/dist/powerlines/src/lib/typescript/ts-morph.mjs +0 -102
- package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -149
- package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -144
- package/dist/powerlines/src/lib/unplugin/factory.cjs +0 -6
- package/dist/powerlines/src/lib/unplugin/factory.mjs +0 -8
- package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -29
- package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -27
- package/dist/powerlines/src/lib/unplugin/index.cjs +0 -3
- package/dist/powerlines/src/lib/unplugin/index.mjs +0 -5
- package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -128
- package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -127
- package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
- package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
- package/dist/powerlines/src/lib/utilities/meta.cjs +0 -45
- package/dist/powerlines/src/lib/utilities/meta.mjs +0 -41
- package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -22
- package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -21
- package/dist/powerlines/src/plugin-utils/helpers.cjs +0 -167
- package/dist/powerlines/src/plugin-utils/helpers.mjs +0 -156
- package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
- package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
- package/dist/powerlines/src/types/build.cjs +0 -23
- package/dist/powerlines/src/types/build.mjs +0 -21
- package/dist/powerlines/src/types/commands.cjs +0 -16
- package/dist/powerlines/src/types/commands.mjs +0 -15
- package/dist/powerlines/src/types/plugin.cjs +0 -33
- package/dist/powerlines/src/types/plugin.mjs +0 -32
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from "../types/build.mjs";
|
|
2
|
-
import { PLUGIN_HOOKS_FIELDS } from "../types/plugin.mjs";
|
|
3
|
-
import { isFunction } from "@stryke/type-checks/is-function";
|
|
4
|
-
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
5
|
-
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
6
|
-
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
7
|
-
|
|
8
|
-
//#region ../powerlines/src/plugin-utils/helpers.ts
|
|
9
|
-
/**
|
|
10
|
-
* Type guard to check if an object is a {@link Plugin}
|
|
11
|
-
*
|
|
12
|
-
* @param value - The object to check
|
|
13
|
-
* @returns True if the object is a {@link Plugin}, false otherwise
|
|
14
|
-
*/
|
|
15
|
-
function isPlugin(value) {
|
|
16
|
-
return isSetObject(value) && "name" in value && isSetString(value.name) && (isUndefined(value.api) || "api" in value && isSetObject(value.api)) && (isUndefined(value.applyToEnvironment) || "applyToEnvironment" in value && isFunction(value.applyToEnvironment)) && (isUndefined(value.dedupe) || "dedupe" in value && isFunction(value.dedupe)) && PLUGIN_HOOKS_FIELDS.every((hook) => isUndefined(value[hook]) || hook in value && (isPluginHookFunction(value[hook]) || hook === "config" && isSetObject(value[hook]))) && BUILDER_VARIANTS.every((variant) => isUndefined(value[variant]) || variant in value && isSetObject(value[variant]));
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Type guard to check if an object is a {@link PluginConfigObject}
|
|
20
|
-
*
|
|
21
|
-
* @param value - The object to check
|
|
22
|
-
* @returns True if the object is a {@link PluginConfigObject}, false otherwise
|
|
23
|
-
*/
|
|
24
|
-
function isPluginConfigObject(value) {
|
|
25
|
-
return isSetObject(value) && "plugin" in value && ((isSetString(value.plugin) || isFunction(value.plugin)) && "options" in value && isSetObject(value.options) || isPlugin(value.plugin));
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Type guard to check if an object is a {@link PluginConfigTuple}
|
|
29
|
-
*
|
|
30
|
-
* @param value - The object to check
|
|
31
|
-
* @returns True if the object is a {@link PluginConfigTuple}, false otherwise
|
|
32
|
-
*/
|
|
33
|
-
function isPluginConfigTuple(value) {
|
|
34
|
-
return Array.isArray(value) && (value.length === 1 || value.length === 2) && ((isSetString(value[0]) || isFunction(value[0])) && value.length > 1 && isSetObject(value[1]) || isPlugin(value[0]));
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Type guard to check if an object is a {@link PluginConfig}
|
|
38
|
-
*
|
|
39
|
-
* @param value - The object to check
|
|
40
|
-
* @returns True if the object is a {@link PluginConfig}, false otherwise
|
|
41
|
-
*/
|
|
42
|
-
function isPluginConfig(value) {
|
|
43
|
-
return isSetString(value) || isFunction(value) || isPlugin(value) || isPluginConfigObject(value) || isPluginConfigTuple(value) || Array.isArray(value) && value.every((item) => isPluginConfig(item));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Type guard to check if an value is a {@link PluginHook} function
|
|
47
|
-
*
|
|
48
|
-
* @param value - The value to check
|
|
49
|
-
* @returns True if the value is a {@link PluginHook} function, false otherwise
|
|
50
|
-
*/
|
|
51
|
-
function isPluginHookObject(value) {
|
|
52
|
-
return isSetObject(value) && "handler" in value && isFunction(value.handler);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Type guard to check if an value is a {@link PluginHook} function
|
|
56
|
-
*
|
|
57
|
-
* @param value - The value to check
|
|
58
|
-
* @returns True if the value is a {@link PluginHook} function, false otherwise
|
|
59
|
-
*/
|
|
60
|
-
function isPluginHookFunction(value) {
|
|
61
|
-
return isFunction(value) || isPluginHookObject(value);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Type guard to check if an object is a {@link PluginHook}
|
|
65
|
-
*
|
|
66
|
-
* @param value - The object to check
|
|
67
|
-
* @returns True if the object is a {@link PluginHook}, false otherwise
|
|
68
|
-
*/
|
|
69
|
-
function isPluginHook(value) {
|
|
70
|
-
return isPluginHookFunction(value) || isPluginHookObject(value);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Extract the hook handler function from a plugin hook
|
|
74
|
-
*
|
|
75
|
-
* @param pluginHook - The plugin hook to extract the handler function from
|
|
76
|
-
* @returns The hook handler function
|
|
77
|
-
*/
|
|
78
|
-
function getHookHandler(pluginHook) {
|
|
79
|
-
return isFunction(pluginHook) ? pluginHook : pluginHook.handler;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Check if a hook is external.
|
|
83
|
-
*
|
|
84
|
-
* @param keys - The name of the hook to check.
|
|
85
|
-
* @returns True if the hook is external, false otherwise.
|
|
86
|
-
*/
|
|
87
|
-
function isUnpluginHookKey(keys) {
|
|
88
|
-
return UNPLUGIN_BUILDER_VARIANTS.some((variant) => keys.startsWith(`${variant}:`));
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Check if a hook is internal.
|
|
92
|
-
*
|
|
93
|
-
* @param keys - The name of the hook to check.
|
|
94
|
-
* @returns True if the hook is external, false otherwise.
|
|
95
|
-
*/
|
|
96
|
-
function isPluginHookField(keys) {
|
|
97
|
-
return !isUnpluginHookKey(keys) && PLUGIN_HOOKS_FIELDS.includes(keys);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Check if a hook is external.
|
|
101
|
-
*
|
|
102
|
-
* @param field - The name of the hook to check.
|
|
103
|
-
* @returns True if the hook is external, false otherwise.
|
|
104
|
-
*/
|
|
105
|
-
function isUnpluginHookField(field) {
|
|
106
|
-
return !isPluginHookField(field) && UNPLUGIN_BUILDER_VARIANTS.includes(field);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Check if a plugin should be deduplicated.
|
|
110
|
-
*
|
|
111
|
-
* @param plugin - The plugin to check
|
|
112
|
-
* @param plugins - The list of plugins to check against
|
|
113
|
-
* @returns True if the plugin should be deduplicated, false otherwise
|
|
114
|
-
*/
|
|
115
|
-
function checkDedupe(plugin, plugins) {
|
|
116
|
-
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Add a plugin hook to the hooks list.
|
|
120
|
-
*
|
|
121
|
-
* @param context - The plugin context
|
|
122
|
-
* @param plugin - The plugin to add the hook from
|
|
123
|
-
* @param pluginHook - The plugin hook to add
|
|
124
|
-
* @param hooksList - The list of hooks to add to
|
|
125
|
-
*/
|
|
126
|
-
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
127
|
-
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin).filter(Boolean))) {
|
|
128
|
-
const handler = ((...args) => getHookHandler(pluginHook).apply(context, args));
|
|
129
|
-
if (!handler) return;
|
|
130
|
-
hooksList.push({
|
|
131
|
-
plugin,
|
|
132
|
-
handler
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Check the provided {@link PluginConfig}, and return a stringified version of the invalid configuration. If an array is provided, check each item in the array.
|
|
138
|
-
*
|
|
139
|
-
* @param config - The plugin configuration to check
|
|
140
|
-
* @returns Null if the configuration is valid, otherwise an array of stringified invalid configurations
|
|
141
|
-
*/
|
|
142
|
-
function findInvalidPluginConfig(config) {
|
|
143
|
-
if (isPluginConfig(config)) return null;
|
|
144
|
-
if (Array.isArray(config)) {
|
|
145
|
-
const invalidItems = [];
|
|
146
|
-
config.forEach((item) => {
|
|
147
|
-
const invalid = findInvalidPluginConfig(item);
|
|
148
|
-
if (invalid) invalidItems.push(...invalid.map((i) => JSON.stringify(i, null, 2)));
|
|
149
|
-
});
|
|
150
|
-
return invalidItems.length > 0 ? invalidItems : null;
|
|
151
|
-
}
|
|
152
|
-
return [JSON.stringify(config, null, 2)];
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
//#endregion
|
|
156
|
-
export { addPluginHook, checkDedupe, findInvalidPluginConfig, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookField, isUnpluginHookField, isUnpluginHookKey };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let __stryke_path_replace = require("@stryke/path/replace");
|
|
3
|
-
|
|
4
|
-
//#region ../powerlines/src/plugin-utils/paths.ts
|
|
5
|
-
/**
|
|
6
|
-
* Replaces tokens in the given path string with their corresponding values from the context.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* The following tokens are supported:
|
|
10
|
-
* - `{workspaceRoot}` - The root directory of the workspace.
|
|
11
|
-
* - `{root}` - The root directory of the project (same as `{projectRoot}`).
|
|
12
|
-
* - `{projectRoot}` - The root directory of the project (same as `{root}`).
|
|
13
|
-
* - `{sourceRoot}` - The source root directory of the project (usually `./src`).
|
|
14
|
-
* - `{powerlinesPath}` - The directory where Powerlines is installed.
|
|
15
|
-
* - `{cachePath}` - The environment's directory for cached files.
|
|
16
|
-
* - `{dataPath}` - The environment's directory for data files.
|
|
17
|
-
* - `{logPath}` - The environment's directory for log files.
|
|
18
|
-
* - `{tempPath}` - The environment's directory for temporary files.
|
|
19
|
-
* - `{configPath}` - The environment's directory for configuration files.
|
|
20
|
-
* - `{outputPath}` - The configured output directory for the project.
|
|
21
|
-
* - `{buildPath}` - The configured distribution directory for the project.
|
|
22
|
-
* - `{artifactsPath}` - The configured directory for build artifacts.
|
|
23
|
-
* - `{builtinPath}` - The configured directory for generated built-in plugins.
|
|
24
|
-
* - `{entryPath}` - The configured directory for generated entry files.
|
|
25
|
-
*
|
|
26
|
-
* @param context - The context containing the values for the path tokens.
|
|
27
|
-
* @param path - The path string with tokens to replace.
|
|
28
|
-
* @returns The path string with tokens replaced by their corresponding values from the context.
|
|
29
|
-
*/
|
|
30
|
-
function replacePathTokens(context, path) {
|
|
31
|
-
if (!path) return path;
|
|
32
|
-
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", (0, __stryke_path_replace.replacePath)(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", (0, __stryke_path_replace.replacePath)(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", (0, __stryke_path_replace.replacePath)(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
exports.replacePathTokens = replacePathTokens;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { replacePath } from "@stryke/path/replace";
|
|
2
|
-
|
|
3
|
-
//#region ../powerlines/src/plugin-utils/paths.ts
|
|
4
|
-
/**
|
|
5
|
-
* Replaces tokens in the given path string with their corresponding values from the context.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* The following tokens are supported:
|
|
9
|
-
* - `{workspaceRoot}` - The root directory of the workspace.
|
|
10
|
-
* - `{root}` - The root directory of the project (same as `{projectRoot}`).
|
|
11
|
-
* - `{projectRoot}` - The root directory of the project (same as `{root}`).
|
|
12
|
-
* - `{sourceRoot}` - The source root directory of the project (usually `./src`).
|
|
13
|
-
* - `{powerlinesPath}` - The directory where Powerlines is installed.
|
|
14
|
-
* - `{cachePath}` - The environment's directory for cached files.
|
|
15
|
-
* - `{dataPath}` - The environment's directory for data files.
|
|
16
|
-
* - `{logPath}` - The environment's directory for log files.
|
|
17
|
-
* - `{tempPath}` - The environment's directory for temporary files.
|
|
18
|
-
* - `{configPath}` - The environment's directory for configuration files.
|
|
19
|
-
* - `{outputPath}` - The configured output directory for the project.
|
|
20
|
-
* - `{buildPath}` - The configured distribution directory for the project.
|
|
21
|
-
* - `{artifactsPath}` - The configured directory for build artifacts.
|
|
22
|
-
* - `{builtinPath}` - The configured directory for generated built-in plugins.
|
|
23
|
-
* - `{entryPath}` - The configured directory for generated entry files.
|
|
24
|
-
*
|
|
25
|
-
* @param context - The context containing the values for the path tokens.
|
|
26
|
-
* @param path - The path string with tokens to replace.
|
|
27
|
-
* @returns The path string with tokens replaced by their corresponding values from the context.
|
|
28
|
-
*/
|
|
29
|
-
function replacePathTokens(context, path) {
|
|
30
|
-
if (!path) return path;
|
|
31
|
-
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
export { replacePathTokens };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../powerlines/src/types/build.ts
|
|
3
|
-
const UNPLUGIN_BUILDER_VARIANTS = [
|
|
4
|
-
"rollup",
|
|
5
|
-
"webpack",
|
|
6
|
-
"rspack",
|
|
7
|
-
"vite",
|
|
8
|
-
"esbuild",
|
|
9
|
-
"farm",
|
|
10
|
-
"unloader",
|
|
11
|
-
"rolldown",
|
|
12
|
-
"bun"
|
|
13
|
-
];
|
|
14
|
-
const BUILDER_VARIANTS = [
|
|
15
|
-
...UNPLUGIN_BUILDER_VARIANTS,
|
|
16
|
-
"tsup",
|
|
17
|
-
"tsdown",
|
|
18
|
-
"unbuild"
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
exports.BUILDER_VARIANTS = BUILDER_VARIANTS;
|
|
23
|
-
exports.UNPLUGIN_BUILDER_VARIANTS = UNPLUGIN_BUILDER_VARIANTS;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//#region ../powerlines/src/types/build.ts
|
|
2
|
-
const UNPLUGIN_BUILDER_VARIANTS = [
|
|
3
|
-
"rollup",
|
|
4
|
-
"webpack",
|
|
5
|
-
"rspack",
|
|
6
|
-
"vite",
|
|
7
|
-
"esbuild",
|
|
8
|
-
"farm",
|
|
9
|
-
"unloader",
|
|
10
|
-
"rolldown",
|
|
11
|
-
"bun"
|
|
12
|
-
];
|
|
13
|
-
const BUILDER_VARIANTS = [
|
|
14
|
-
...UNPLUGIN_BUILDER_VARIANTS,
|
|
15
|
-
"tsup",
|
|
16
|
-
"tsdown",
|
|
17
|
-
"unbuild"
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../powerlines/src/types/commands.ts
|
|
3
|
-
const SUPPORTED_COMMANDS = [
|
|
4
|
-
"new",
|
|
5
|
-
"clean",
|
|
6
|
-
"prepare",
|
|
7
|
-
"lint",
|
|
8
|
-
"test",
|
|
9
|
-
"build",
|
|
10
|
-
"docs",
|
|
11
|
-
"deploy",
|
|
12
|
-
"finalize"
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.SUPPORTED_COMMANDS = SUPPORTED_COMMANDS;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const require_build = require('./build.cjs');
|
|
2
|
-
const require_commands = require('./commands.cjs');
|
|
3
|
-
|
|
4
|
-
//#region ../powerlines/src/types/plugin.ts
|
|
5
|
-
const PLUGIN_NON_HOOK_FIELDS = [
|
|
6
|
-
"name",
|
|
7
|
-
"api",
|
|
8
|
-
"enforce",
|
|
9
|
-
"dedupe",
|
|
10
|
-
"applyToEnvironment"
|
|
11
|
-
];
|
|
12
|
-
const PLUGIN_HOOKS_FIELDS = [
|
|
13
|
-
...require_commands.SUPPORTED_COMMANDS,
|
|
14
|
-
"config",
|
|
15
|
-
"configEnvironment",
|
|
16
|
-
"configResolved",
|
|
17
|
-
"types",
|
|
18
|
-
"buildStart",
|
|
19
|
-
"buildEnd",
|
|
20
|
-
"transform",
|
|
21
|
-
"load",
|
|
22
|
-
"resolveId",
|
|
23
|
-
"writeBundle"
|
|
24
|
-
];
|
|
25
|
-
const KNOWN_PLUGIN_FIELDS = [
|
|
26
|
-
...PLUGIN_NON_HOOK_FIELDS,
|
|
27
|
-
...PLUGIN_HOOKS_FIELDS,
|
|
28
|
-
...require_build.BUILDER_VARIANTS
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
exports.PLUGIN_HOOKS_FIELDS = PLUGIN_HOOKS_FIELDS;
|
|
33
|
-
exports.PLUGIN_NON_HOOK_FIELDS = PLUGIN_NON_HOOK_FIELDS;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { BUILDER_VARIANTS } from "./build.mjs";
|
|
2
|
-
import { SUPPORTED_COMMANDS } from "./commands.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../powerlines/src/types/plugin.ts
|
|
5
|
-
const PLUGIN_NON_HOOK_FIELDS = [
|
|
6
|
-
"name",
|
|
7
|
-
"api",
|
|
8
|
-
"enforce",
|
|
9
|
-
"dedupe",
|
|
10
|
-
"applyToEnvironment"
|
|
11
|
-
];
|
|
12
|
-
const PLUGIN_HOOKS_FIELDS = [
|
|
13
|
-
...SUPPORTED_COMMANDS,
|
|
14
|
-
"config",
|
|
15
|
-
"configEnvironment",
|
|
16
|
-
"configResolved",
|
|
17
|
-
"types",
|
|
18
|
-
"buildStart",
|
|
19
|
-
"buildEnd",
|
|
20
|
-
"transform",
|
|
21
|
-
"load",
|
|
22
|
-
"resolveId",
|
|
23
|
-
"writeBundle"
|
|
24
|
-
];
|
|
25
|
-
const KNOWN_PLUGIN_FIELDS = [
|
|
26
|
-
...PLUGIN_NON_HOOK_FIELDS,
|
|
27
|
-
...PLUGIN_HOOKS_FIELDS,
|
|
28
|
-
...BUILDER_VARIANTS
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS };
|