@powerlines/plugin-webpack 0.5.125 → 0.5.127
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/_virtual/rolldown_runtime.cjs +29 -1
- package/dist/helpers/index.cjs +3 -1
- package/dist/helpers/index.mjs +3 -1
- package/dist/helpers/unplugin.cjs +12 -1
- package/dist/helpers/unplugin.mjs +11 -1
- package/dist/index.cjs +39 -1
- package/dist/index.mjs +33 -1
- package/dist/powerlines/schemas/fs.cjs +226 -1
- package/dist/powerlines/schemas/fs.mjs +224 -1
- package/dist/powerlines/src/api.cjs +576 -9
- package/dist/powerlines/src/api.mjs +578 -1
- package/dist/powerlines/src/internal/babel/module-resolver-plugin.cjs +86 -1
- package/dist/powerlines/src/internal/babel/module-resolver-plugin.mjs +84 -1
- package/dist/powerlines/src/internal/helpers/environment.cjs +52 -1
- package/dist/powerlines/src/internal/helpers/environment.mjs +48 -1
- package/dist/powerlines/src/internal/helpers/generate-types.cjs +50 -7
- package/dist/powerlines/src/internal/helpers/generate-types.mjs +48 -7
- package/dist/powerlines/src/internal/helpers/hooks.cjs +63 -1
- package/dist/powerlines/src/internal/helpers/hooks.mjs +61 -1
- package/dist/powerlines/src/internal/helpers/install-dependencies.cjs +25 -3
- package/dist/powerlines/src/internal/helpers/install-dependencies.mjs +24 -3
- package/dist/powerlines/src/internal/helpers/install.cjs +37 -1
- package/dist/powerlines/src/internal/helpers/install.mjs +36 -1
- package/dist/powerlines/src/internal/helpers/resolve-tsconfig.cjs +97 -7
- package/dist/powerlines/src/internal/helpers/resolve-tsconfig.mjs +93 -7
- package/dist/powerlines/src/internal/helpers/resolver.cjs +43 -1
- package/dist/powerlines/src/internal/helpers/resolver.mjs +41 -1
- package/dist/powerlines/src/lib/build/webpack.cjs +47 -1
- package/dist/powerlines/src/lib/build/webpack.mjs +45 -1
- package/dist/powerlines/src/lib/config-file.cjs +79 -1
- package/dist/powerlines/src/lib/config-file.mjs +76 -1
- package/dist/powerlines/src/lib/contexts/api-context.cjs +184 -1
- package/dist/powerlines/src/lib/contexts/api-context.mjs +182 -1
- package/dist/powerlines/src/lib/contexts/context.cjs +931 -1
- package/dist/powerlines/src/lib/contexts/context.mjs +929 -1
- package/dist/powerlines/src/lib/contexts/environment-context.cjs +160 -1
- package/dist/powerlines/src/lib/contexts/environment-context.mjs +159 -1
- package/dist/powerlines/src/lib/contexts/plugin-context.cjs +75 -1
- package/dist/powerlines/src/lib/contexts/plugin-context.mjs +74 -1
- package/dist/powerlines/src/lib/entry.cjs +69 -1
- package/dist/powerlines/src/lib/entry.mjs +67 -1
- package/dist/powerlines/src/lib/fs/helpers.cjs +85 -1
- package/dist/powerlines/src/lib/fs/helpers.mjs +81 -1
- package/dist/powerlines/src/lib/fs/storage/base.cjs +196 -1
- package/dist/powerlines/src/lib/fs/storage/base.mjs +195 -1
- package/dist/powerlines/src/lib/fs/storage/file-system.cjs +170 -1
- package/dist/powerlines/src/lib/fs/storage/file-system.mjs +169 -1
- package/dist/powerlines/src/lib/fs/storage/virtual.cjs +88 -1
- package/dist/powerlines/src/lib/fs/storage/virtual.mjs +87 -1
- package/dist/powerlines/src/lib/fs/vfs.cjs +830 -1
- package/dist/powerlines/src/lib/fs/vfs.mjs +828 -1
- package/dist/powerlines/src/lib/logger.cjs +58 -1
- package/dist/powerlines/src/lib/logger.mjs +55 -1
- package/dist/powerlines/src/lib/typescript/ts-morph.cjs +104 -1
- package/dist/powerlines/src/lib/typescript/ts-morph.mjs +102 -1
- package/dist/powerlines/src/lib/typescript/tsconfig.cjs +149 -4
- package/dist/powerlines/src/lib/typescript/tsconfig.mjs +144 -4
- package/dist/powerlines/src/lib/unplugin/factory.cjs +6 -1
- package/dist/powerlines/src/lib/unplugin/factory.mjs +8 -1
- package/dist/powerlines/src/lib/unplugin/helpers.cjs +17 -1
- package/dist/powerlines/src/lib/unplugin/helpers.mjs +16 -1
- package/dist/powerlines/src/lib/unplugin/index.cjs +3 -1
- package/dist/powerlines/src/lib/unplugin/index.mjs +5 -1
- package/dist/powerlines/src/lib/unplugin/plugin.cjs +127 -5
- package/dist/powerlines/src/lib/unplugin/plugin.mjs +126 -5
- package/dist/powerlines/src/lib/utilities/file-header.cjs +19 -7
- package/dist/powerlines/src/lib/utilities/file-header.mjs +18 -7
- package/dist/powerlines/src/lib/utilities/meta.cjs +45 -1
- package/dist/powerlines/src/lib/utilities/meta.mjs +41 -1
- package/dist/powerlines/src/lib/utilities/source-file.cjs +22 -1
- package/dist/powerlines/src/lib/utilities/source-file.mjs +21 -1
- package/dist/powerlines/src/plugin-utils/helpers.cjs +148 -1
- package/dist/powerlines/src/plugin-utils/helpers.mjs +138 -1
- package/dist/powerlines/src/plugin-utils/paths.cjs +36 -1
- package/dist/powerlines/src/plugin-utils/paths.mjs +35 -1
- package/dist/powerlines/src/types/build.cjs +15 -1
- package/dist/powerlines/src/types/build.mjs +14 -1
- package/dist/powerlines/src/types/commands.cjs +16 -1
- package/dist/powerlines/src/types/commands.mjs +15 -1
- package/dist/powerlines/src/types/context.d.cts +43 -2
- package/dist/powerlines/src/types/context.d.mts +43 -2
- package/dist/powerlines/src/types/fs.d.cts +14 -0
- package/dist/powerlines/src/types/fs.d.mts +14 -0
- package/dist/powerlines/src/types/plugin.cjs +32 -1
- package/dist/powerlines/src/types/plugin.mjs +31 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/package.json +9 -9
|
@@ -1 +1,148 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_build = require('../types/build.cjs');
|
|
3
|
+
const require_plugin = require('../types/plugin.cjs');
|
|
4
|
+
let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
5
|
+
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
6
|
+
let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
7
|
+
let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
8
|
+
|
|
9
|
+
//#region ../powerlines/src/plugin-utils/helpers.ts
|
|
10
|
+
/**
|
|
11
|
+
* Type guard to check if an object is a {@link Plugin}
|
|
12
|
+
*
|
|
13
|
+
* @param value - The object to check
|
|
14
|
+
* @returns True if the object is a {@link Plugin}, false otherwise
|
|
15
|
+
*/
|
|
16
|
+
function isPlugin(value) {
|
|
17
|
+
return (0, __stryke_type_checks_is_set_object.isSetObject)(value) && "name" in value && (0, __stryke_type_checks_is_set_string.isSetString)(value.name) && ((0, __stryke_type_checks_is_undefined.isUndefined)(value.api) || "api" in value && (0, __stryke_type_checks_is_set_object.isSetObject)(value.api)) && ((0, __stryke_type_checks_is_undefined.isUndefined)(value.applyToEnvironment) || "applyToEnvironment" in value && (0, __stryke_type_checks_is_function.isFunction)(value.applyToEnvironment)) && ((0, __stryke_type_checks_is_undefined.isUndefined)(value.dedupe) || "dedupe" in value && (0, __stryke_type_checks_is_function.isFunction)(value.dedupe)) && require_plugin.KNOWN_HOOKS.every((hook) => (0, __stryke_type_checks_is_undefined.isUndefined)(value[hook]) || hook in value && (isPluginHookFunction(value[hook]) || hook === "config" && (0, __stryke_type_checks_is_set_object.isSetObject)(value[hook]))) && require_build.UNPLUGIN_BUILD_VARIANTS.every((variant) => (0, __stryke_type_checks_is_undefined.isUndefined)(value[variant]) || variant in value && (0, __stryke_type_checks_is_set_object.isSetObject)(value[variant]));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Type guard to check if an object is a {@link PluginConfigObject}
|
|
21
|
+
*
|
|
22
|
+
* @param value - The object to check
|
|
23
|
+
* @returns True if the object is a {@link PluginConfigObject}, false otherwise
|
|
24
|
+
*/
|
|
25
|
+
function isPluginConfigObject(value) {
|
|
26
|
+
return (0, __stryke_type_checks_is_set_object.isSetObject)(value) && "plugin" in value && (((0, __stryke_type_checks_is_set_string.isSetString)(value.plugin) || (0, __stryke_type_checks_is_function.isFunction)(value.plugin)) && "options" in value && (0, __stryke_type_checks_is_set_object.isSetObject)(value.options) || isPlugin(value.plugin));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Type guard to check if an object is a {@link PluginConfigTuple}
|
|
30
|
+
*
|
|
31
|
+
* @param value - The object to check
|
|
32
|
+
* @returns True if the object is a {@link PluginConfigTuple}, false otherwise
|
|
33
|
+
*/
|
|
34
|
+
function isPluginConfigTuple(value) {
|
|
35
|
+
return Array.isArray(value) && (value.length === 1 || value.length === 2) && (((0, __stryke_type_checks_is_set_string.isSetString)(value[0]) || (0, __stryke_type_checks_is_function.isFunction)(value[0])) && value.length > 1 && (0, __stryke_type_checks_is_set_object.isSetObject)(value[1]) || isPlugin(value[0]));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Type guard to check if an object is a {@link PluginConfig}
|
|
39
|
+
*
|
|
40
|
+
* @param value - The object to check
|
|
41
|
+
* @returns True if the object is a {@link PluginConfig}, false otherwise
|
|
42
|
+
*/
|
|
43
|
+
function isPluginConfig(value) {
|
|
44
|
+
return (0, __stryke_type_checks_is_set_string.isSetString)(value) || (0, __stryke_type_checks_is_function.isFunction)(value) || isPlugin(value) || isPluginConfigObject(value) || isPluginConfigTuple(value) || Array.isArray(value) && value.every((item) => isPluginConfig(item));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Type guard to check if an value is a {@link PluginHook} function
|
|
48
|
+
*
|
|
49
|
+
* @param value - The value to check
|
|
50
|
+
* @returns True if the value is a {@link PluginHook} function, false otherwise
|
|
51
|
+
*/
|
|
52
|
+
function isPluginHookObject(value) {
|
|
53
|
+
return (0, __stryke_type_checks_is_set_object.isSetObject)(value) && "handler" in value && (0, __stryke_type_checks_is_function.isFunction)(value.handler);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Type guard to check if an value is a {@link PluginHook} function
|
|
57
|
+
*
|
|
58
|
+
* @param value - The value to check
|
|
59
|
+
* @returns True if the value is a {@link PluginHook} function, false otherwise
|
|
60
|
+
*/
|
|
61
|
+
function isPluginHookFunction(value) {
|
|
62
|
+
return (0, __stryke_type_checks_is_function.isFunction)(value) || isPluginHookObject(value);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Type guard to check if an object is a {@link PluginHook}
|
|
66
|
+
*
|
|
67
|
+
* @param value - The object to check
|
|
68
|
+
* @returns True if the object is a {@link PluginHook}, false otherwise
|
|
69
|
+
*/
|
|
70
|
+
function isPluginHook(value) {
|
|
71
|
+
return isPluginHookFunction(value) || isPluginHookObject(value);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Extract the hook handler function from a plugin hook
|
|
75
|
+
*
|
|
76
|
+
* @param pluginHook - The plugin hook to extract the handler function from
|
|
77
|
+
* @returns The hook handler function
|
|
78
|
+
*/
|
|
79
|
+
function getHookHandler(pluginHook) {
|
|
80
|
+
return (0, __stryke_type_checks_is_function.isFunction)(pluginHook) ? pluginHook : pluginHook.handler;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Check if a hook is external.
|
|
84
|
+
*
|
|
85
|
+
* @param hook - The name of the hook to check.
|
|
86
|
+
* @returns True if the hook is external, false otherwise.
|
|
87
|
+
*/
|
|
88
|
+
function isHookExternal(hook) {
|
|
89
|
+
return hook.startsWith("vite:") || hook.startsWith("esbuild:") || hook.startsWith("rolldown:") || hook.startsWith("rollup:") || hook.startsWith("webpack:") || hook.startsWith("rspack:") || hook.startsWith("farm:");
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Check if a plugin should be deduplicated.
|
|
93
|
+
*
|
|
94
|
+
* @param plugin - The plugin to check
|
|
95
|
+
* @param plugins - The list of plugins to check against
|
|
96
|
+
* @returns True if the plugin should be deduplicated, false otherwise
|
|
97
|
+
*/
|
|
98
|
+
function checkDedupe(plugin, plugins) {
|
|
99
|
+
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && ((0, __stryke_type_checks_is_function.isFunction)(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Add a plugin hook to the hooks list.
|
|
103
|
+
*
|
|
104
|
+
* @param context - The plugin context
|
|
105
|
+
* @param plugin - The plugin to add the hook from
|
|
106
|
+
* @param pluginHook - The plugin hook to add
|
|
107
|
+
* @param hooksList - The list of hooks to add to
|
|
108
|
+
*/
|
|
109
|
+
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
110
|
+
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin))) hooksList.push((0, __stryke_type_checks_is_function.isFunction)(pluginHook) ? {
|
|
111
|
+
plugin,
|
|
112
|
+
handler: getHookHandler(pluginHook).bind(context)
|
|
113
|
+
} : {
|
|
114
|
+
plugin,
|
|
115
|
+
...pluginHook,
|
|
116
|
+
handler: getHookHandler(pluginHook).bind(context)
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* 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.
|
|
121
|
+
*
|
|
122
|
+
* @param config - The plugin configuration to check
|
|
123
|
+
* @returns Null if the configuration is valid, otherwise an array of stringified invalid configurations
|
|
124
|
+
*/
|
|
125
|
+
function findInvalidPluginConfig(config) {
|
|
126
|
+
if (isPluginConfig(config)) return null;
|
|
127
|
+
if (Array.isArray(config)) {
|
|
128
|
+
const invalidItems = [];
|
|
129
|
+
config.forEach((item) => {
|
|
130
|
+
const invalid = findInvalidPluginConfig(item);
|
|
131
|
+
if (invalid) invalidItems.push(...invalid.map((i) => JSON.stringify(i, null, 2)));
|
|
132
|
+
});
|
|
133
|
+
return invalidItems.length > 0 ? invalidItems : null;
|
|
134
|
+
}
|
|
135
|
+
return [JSON.stringify(config, null, 2)];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
exports.addPluginHook = addPluginHook;
|
|
140
|
+
exports.checkDedupe = checkDedupe;
|
|
141
|
+
exports.findInvalidPluginConfig = findInvalidPluginConfig;
|
|
142
|
+
exports.getHookHandler = getHookHandler;
|
|
143
|
+
exports.isHookExternal = isHookExternal;
|
|
144
|
+
exports.isPlugin = isPlugin;
|
|
145
|
+
exports.isPluginConfig = isPluginConfig;
|
|
146
|
+
exports.isPluginConfigObject = isPluginConfigObject;
|
|
147
|
+
exports.isPluginConfigTuple = isPluginConfigTuple;
|
|
148
|
+
exports.isPluginHook = isPluginHook;
|
|
@@ -1 +1,138 @@
|
|
|
1
|
-
import{UNPLUGIN_BUILD_VARIANTS
|
|
1
|
+
import { UNPLUGIN_BUILD_VARIANTS } from "../types/build.mjs";
|
|
2
|
+
import { KNOWN_HOOKS } 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)) && KNOWN_HOOKS.every((hook) => isUndefined(value[hook]) || hook in value && (isPluginHookFunction(value[hook]) || hook === "config" && isSetObject(value[hook]))) && UNPLUGIN_BUILD_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 hook - The name of the hook to check.
|
|
85
|
+
* @returns True if the hook is external, false otherwise.
|
|
86
|
+
*/
|
|
87
|
+
function isHookExternal(hook) {
|
|
88
|
+
return hook.startsWith("vite:") || hook.startsWith("esbuild:") || hook.startsWith("rolldown:") || hook.startsWith("rollup:") || hook.startsWith("webpack:") || hook.startsWith("rspack:") || hook.startsWith("farm:");
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Check if a plugin should be deduplicated.
|
|
92
|
+
*
|
|
93
|
+
* @param plugin - The plugin to check
|
|
94
|
+
* @param plugins - The list of plugins to check against
|
|
95
|
+
* @returns True if the plugin should be deduplicated, false otherwise
|
|
96
|
+
*/
|
|
97
|
+
function checkDedupe(plugin, plugins) {
|
|
98
|
+
return plugin.dedupe === false || plugins.some((p) => p.dedupe !== false && (isFunction(p.dedupe) && p.dedupe(plugin) || p.name === plugin.name));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Add a plugin hook to the hooks list.
|
|
102
|
+
*
|
|
103
|
+
* @param context - The plugin context
|
|
104
|
+
* @param plugin - The plugin to add the hook from
|
|
105
|
+
* @param pluginHook - The plugin hook to add
|
|
106
|
+
* @param hooksList - The list of hooks to add to
|
|
107
|
+
*/
|
|
108
|
+
function addPluginHook(context, plugin, pluginHook, hooksList) {
|
|
109
|
+
if (!checkDedupe(plugin, hooksList.map((hook) => hook.plugin))) hooksList.push(isFunction(pluginHook) ? {
|
|
110
|
+
plugin,
|
|
111
|
+
handler: getHookHandler(pluginHook).bind(context)
|
|
112
|
+
} : {
|
|
113
|
+
plugin,
|
|
114
|
+
...pluginHook,
|
|
115
|
+
handler: getHookHandler(pluginHook).bind(context)
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* 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.
|
|
120
|
+
*
|
|
121
|
+
* @param config - The plugin configuration to check
|
|
122
|
+
* @returns Null if the configuration is valid, otherwise an array of stringified invalid configurations
|
|
123
|
+
*/
|
|
124
|
+
function findInvalidPluginConfig(config) {
|
|
125
|
+
if (isPluginConfig(config)) return null;
|
|
126
|
+
if (Array.isArray(config)) {
|
|
127
|
+
const invalidItems = [];
|
|
128
|
+
config.forEach((item) => {
|
|
129
|
+
const invalid = findInvalidPluginConfig(item);
|
|
130
|
+
if (invalid) invalidItems.push(...invalid.map((i) => JSON.stringify(i, null, 2)));
|
|
131
|
+
});
|
|
132
|
+
return invalidItems.length > 0 ? invalidItems : null;
|
|
133
|
+
}
|
|
134
|
+
return [JSON.stringify(config, null, 2)];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
export { addPluginHook, checkDedupe, findInvalidPluginConfig, getHookHandler, isHookExternal, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook };
|
|
@@ -1 +1,36 @@
|
|
|
1
|
-
const
|
|
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 +1,35 @@
|
|
|
1
|
-
import{replacePath
|
|
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 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
//#region ../powerlines/src/types/build.ts
|
|
3
|
+
const UNPLUGIN_BUILD_VARIANTS = [
|
|
4
|
+
"rollup",
|
|
5
|
+
"webpack",
|
|
6
|
+
"rspack",
|
|
7
|
+
"vite",
|
|
8
|
+
"esbuild",
|
|
9
|
+
"farm",
|
|
10
|
+
"unloader",
|
|
11
|
+
"rolldown"
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.UNPLUGIN_BUILD_VARIANTS = UNPLUGIN_BUILD_VARIANTS;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../powerlines/src/types/build.ts
|
|
2
|
+
const UNPLUGIN_BUILD_VARIANTS = [
|
|
3
|
+
"rollup",
|
|
4
|
+
"webpack",
|
|
5
|
+
"rspack",
|
|
6
|
+
"vite",
|
|
7
|
+
"esbuild",
|
|
8
|
+
"farm",
|
|
9
|
+
"unloader",
|
|
10
|
+
"rolldown"
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { UNPLUGIN_BUILD_VARIANTS };
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
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 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../powerlines/src/types/commands.ts
|
|
2
|
+
const SUPPORTED_COMMANDS = [
|
|
3
|
+
"new",
|
|
4
|
+
"clean",
|
|
5
|
+
"prepare",
|
|
6
|
+
"lint",
|
|
7
|
+
"test",
|
|
8
|
+
"build",
|
|
9
|
+
"docs",
|
|
10
|
+
"deploy",
|
|
11
|
+
"finalize"
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SUPPORTED_COMMANDS };
|
|
@@ -78,10 +78,18 @@ interface ParseOptions extends ParserOptions {
|
|
|
78
78
|
*/
|
|
79
79
|
allowReturnOutsideFunction?: boolean;
|
|
80
80
|
}
|
|
81
|
+
interface EmitOptions extends WriteOptions {
|
|
82
|
+
/**
|
|
83
|
+
* If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
|
|
84
|
+
*/
|
|
85
|
+
emitWithBundler?: boolean;
|
|
86
|
+
needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
|
|
87
|
+
originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
|
|
88
|
+
}
|
|
81
89
|
/**
|
|
82
90
|
* Options for emitting entry virtual files
|
|
83
91
|
*/
|
|
84
|
-
type EmitEntryOptions =
|
|
92
|
+
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
|
|
85
93
|
/**
|
|
86
94
|
* The unresolved Powerlines context.
|
|
87
95
|
*
|
|
@@ -292,6 +300,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
292
300
|
* The Powerlines builtin virtual files
|
|
293
301
|
*/
|
|
294
302
|
getBuiltins: () => Promise<VirtualFile[]>;
|
|
303
|
+
/**
|
|
304
|
+
* Resolves a file and writes it to the VFS if it does not already exist
|
|
305
|
+
*
|
|
306
|
+
* @param code - The source code of the file
|
|
307
|
+
* @param path - The path to write the file to
|
|
308
|
+
* @param options - Additional options for writing the file
|
|
309
|
+
*/
|
|
310
|
+
emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
|
|
311
|
+
/**
|
|
312
|
+
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
313
|
+
*
|
|
314
|
+
* @param code - The source code of the file
|
|
315
|
+
* @param path - The path to write the file to
|
|
316
|
+
* @param options - Additional options for writing the file
|
|
317
|
+
*/
|
|
318
|
+
emitSync: (code: string, path: string, options?: EmitOptions) => void;
|
|
295
319
|
/**
|
|
296
320
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
297
321
|
*
|
|
@@ -300,7 +324,16 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
300
324
|
* @param path - An optional path to write the builtin file to
|
|
301
325
|
* @param options - Additional options for writing the builtin file
|
|
302
326
|
*/
|
|
303
|
-
emitBuiltin: (code: string, id: string, path?: string, options?:
|
|
327
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: EmitOptions) => Promise<void>;
|
|
328
|
+
/**
|
|
329
|
+
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
330
|
+
*
|
|
331
|
+
* @param code - The source code of the builtin file
|
|
332
|
+
* @param id - The unique identifier of the builtin file
|
|
333
|
+
* @param path - An optional path to write the builtin file to
|
|
334
|
+
* @param options - Additional options for writing the builtin file
|
|
335
|
+
*/
|
|
336
|
+
emitBuiltinSync: (code: string, id: string, path?: string, options?: EmitOptions) => void;
|
|
304
337
|
/**
|
|
305
338
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
306
339
|
*
|
|
@@ -309,6 +342,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
309
342
|
* @param options - Additional options for writing the entry file
|
|
310
343
|
*/
|
|
311
344
|
emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
|
|
345
|
+
/**
|
|
346
|
+
* Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
347
|
+
*
|
|
348
|
+
* @param code - The source code of the entry file
|
|
349
|
+
* @param path - An optional path to write the entry file to
|
|
350
|
+
* @param options - Additional options for writing the entry file
|
|
351
|
+
*/
|
|
352
|
+
emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
|
|
312
353
|
/**
|
|
313
354
|
* A function to update the context fields using a new user configuration options
|
|
314
355
|
*/
|
|
@@ -80,10 +80,18 @@ interface ParseOptions extends ParserOptions {
|
|
|
80
80
|
*/
|
|
81
81
|
allowReturnOutsideFunction?: boolean;
|
|
82
82
|
}
|
|
83
|
+
interface EmitOptions extends WriteOptions {
|
|
84
|
+
/**
|
|
85
|
+
* If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
|
|
86
|
+
*/
|
|
87
|
+
emitWithBundler?: boolean;
|
|
88
|
+
needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
|
|
89
|
+
originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
|
|
90
|
+
}
|
|
83
91
|
/**
|
|
84
92
|
* Options for emitting entry virtual files
|
|
85
93
|
*/
|
|
86
|
-
type EmitEntryOptions =
|
|
94
|
+
type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
|
|
87
95
|
/**
|
|
88
96
|
* The unresolved Powerlines context.
|
|
89
97
|
*
|
|
@@ -294,6 +302,22 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
294
302
|
* The Powerlines builtin virtual files
|
|
295
303
|
*/
|
|
296
304
|
getBuiltins: () => Promise<VirtualFile[]>;
|
|
305
|
+
/**
|
|
306
|
+
* Resolves a file and writes it to the VFS if it does not already exist
|
|
307
|
+
*
|
|
308
|
+
* @param code - The source code of the file
|
|
309
|
+
* @param path - The path to write the file to
|
|
310
|
+
* @param options - Additional options for writing the file
|
|
311
|
+
*/
|
|
312
|
+
emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* Synchronously resolves a file and writes it to the VFS if it does not already exist
|
|
315
|
+
*
|
|
316
|
+
* @param code - The source code of the file
|
|
317
|
+
* @param path - The path to write the file to
|
|
318
|
+
* @param options - Additional options for writing the file
|
|
319
|
+
*/
|
|
320
|
+
emitSync: (code: string, path: string, options?: EmitOptions) => void;
|
|
297
321
|
/**
|
|
298
322
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
299
323
|
*
|
|
@@ -302,7 +326,16 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
302
326
|
* @param path - An optional path to write the builtin file to
|
|
303
327
|
* @param options - Additional options for writing the builtin file
|
|
304
328
|
*/
|
|
305
|
-
emitBuiltin: (code: string, id: string, path?: string, options?:
|
|
329
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: EmitOptions) => Promise<void>;
|
|
330
|
+
/**
|
|
331
|
+
* Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
332
|
+
*
|
|
333
|
+
* @param code - The source code of the builtin file
|
|
334
|
+
* @param id - The unique identifier of the builtin file
|
|
335
|
+
* @param path - An optional path to write the builtin file to
|
|
336
|
+
* @param options - Additional options for writing the builtin file
|
|
337
|
+
*/
|
|
338
|
+
emitBuiltinSync: (code: string, id: string, path?: string, options?: EmitOptions) => void;
|
|
306
339
|
/**
|
|
307
340
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
308
341
|
*
|
|
@@ -311,6 +344,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
311
344
|
* @param options - Additional options for writing the entry file
|
|
312
345
|
*/
|
|
313
346
|
emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
|
|
347
|
+
/**
|
|
348
|
+
* Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
349
|
+
*
|
|
350
|
+
* @param code - The source code of the entry file
|
|
351
|
+
* @param path - An optional path to write the entry file to
|
|
352
|
+
* @param options - Additional options for writing the entry file
|
|
353
|
+
*/
|
|
354
|
+
emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
|
|
314
355
|
/**
|
|
315
356
|
* A function to update the context fields using a new user configuration options
|
|
316
357
|
*/
|
|
@@ -13,6 +13,13 @@ interface StorageAdapter {
|
|
|
13
13
|
* A name identifying the storage adapter type.
|
|
14
14
|
*/
|
|
15
15
|
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* The storage preset for the adapter.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This can be used as an alternate way to identify the type of storage being used.
|
|
21
|
+
*/
|
|
22
|
+
preset?: StoragePreset | null;
|
|
16
23
|
/**
|
|
17
24
|
* Checks if a key exists in the storage.
|
|
18
25
|
*
|
|
@@ -207,6 +214,13 @@ interface WriteOptions {
|
|
|
207
214
|
* @defaultValue false
|
|
208
215
|
*/
|
|
209
216
|
skipFormat?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* The storage preset or adapter name for the output file.
|
|
219
|
+
*
|
|
220
|
+
* @remarks
|
|
221
|
+
* If not specified, the output mode will be determined by the provided `output.mode` value.
|
|
222
|
+
*/
|
|
223
|
+
storage?: StoragePreset | string;
|
|
210
224
|
/**
|
|
211
225
|
* Additional metadata for the file.
|
|
212
226
|
*/
|
|
@@ -13,6 +13,13 @@ interface StorageAdapter {
|
|
|
13
13
|
* A name identifying the storage adapter type.
|
|
14
14
|
*/
|
|
15
15
|
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* The storage preset for the adapter.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* This can be used as an alternate way to identify the type of storage being used.
|
|
21
|
+
*/
|
|
22
|
+
preset?: StoragePreset | null;
|
|
16
23
|
/**
|
|
17
24
|
* Checks if a key exists in the storage.
|
|
18
25
|
*
|
|
@@ -207,6 +214,13 @@ interface WriteOptions {
|
|
|
207
214
|
* @defaultValue false
|
|
208
215
|
*/
|
|
209
216
|
skipFormat?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* The storage preset or adapter name for the output file.
|
|
219
|
+
*
|
|
220
|
+
* @remarks
|
|
221
|
+
* If not specified, the output mode will be determined by the provided `output.mode` value.
|
|
222
|
+
*/
|
|
223
|
+
storage?: StoragePreset | string;
|
|
210
224
|
/**
|
|
211
225
|
* Additional metadata for the file.
|
|
212
226
|
*/
|