@powerlines/plugin-babel 0.12.307 → 0.12.308
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/ast-utils-BcmWaIan.cjs +45 -0
- package/dist/ast-utils-BgcE0CUh.mjs +33 -0
- package/dist/ast-utils-BgcE0CUh.mjs.map +1 -0
- package/dist/ast-utils-BrOP-SXX.d.cts +20 -0
- package/dist/ast-utils-BrOP-SXX.d.cts.map +1 -0
- package/dist/ast-utils-c95WpQzC.d.mts +20 -0
- package/dist/ast-utils-c95WpQzC.d.mts.map +1 -0
- package/dist/{_virtual/rolldown_runtime.cjs → chunk-CbDLau6x.cjs} +6 -1
- package/dist/config-B8fQjuSs.d.cts +86 -0
- package/dist/config-B8fQjuSs.d.cts.map +1 -0
- package/dist/config-BGnCc0aq.d.mts +86 -0
- package/dist/config-BGnCc0aq.d.mts.map +1 -0
- package/dist/config-BLkkDfsC.mjs +1 -0
- package/dist/config-QK0F_KAD.cjs +0 -0
- package/dist/create-plugin-BbG_dRTl.mjs +40 -0
- package/dist/create-plugin-BbG_dRTl.mjs.map +1 -0
- package/dist/create-plugin-D1_rga7H.d.cts +16 -0
- package/dist/create-plugin-D1_rga7H.d.cts.map +1 -0
- package/dist/create-plugin-DaXcRyMI.cjs +46 -0
- package/dist/create-plugin-H35OVSz7.d.mts +16 -0
- package/dist/create-plugin-H35OVSz7.d.mts.map +1 -0
- package/dist/filters-CU0L1nIa.cjs +79 -0
- package/dist/filters-DX-_VLWz.d.mts +43 -0
- package/dist/filters-DX-_VLWz.d.mts.map +1 -0
- package/dist/filters-DjAUc6r9.mjs +56 -0
- package/dist/filters-DjAUc6r9.mjs.map +1 -0
- package/dist/filters-xc5uoxxD.d.cts +43 -0
- package/dist/filters-xc5uoxxD.d.cts.map +1 -0
- package/dist/helpers/ast-utils.cjs +3 -34
- package/dist/helpers/ast-utils.d.cts +2 -20
- package/dist/helpers/ast-utils.d.mts +2 -20
- package/dist/helpers/ast-utils.mjs +2 -32
- package/dist/helpers/create-plugin.cjs +2 -40
- package/dist/helpers/create-plugin.d.cts +3 -16
- package/dist/helpers/create-plugin.d.mts +3 -17
- package/dist/helpers/create-plugin.mjs +2 -39
- package/dist/helpers/filters.cjs +5 -58
- package/dist/helpers/filters.d.cts +3 -43
- package/dist/helpers/filters.d.mts +3 -44
- package/dist/helpers/filters.mjs +2 -55
- package/dist/helpers/index.cjs +22 -21
- package/dist/helpers/index.d.cts +7 -5
- package/dist/helpers/index.d.mts +7 -5
- package/dist/helpers/index.mjs +6 -5
- package/dist/helpers/module-helpers.cjs +9 -102
- package/dist/helpers/module-helpers.d.cts +3 -50
- package/dist/helpers/module-helpers.d.mts +3 -50
- package/dist/helpers/module-helpers.mjs +3 -95
- package/dist/helpers/options.cjs +4 -48
- package/dist/helpers/options.d.cts +3 -19
- package/dist/helpers/options.d.mts +3 -20
- package/dist/helpers/options.mjs +3 -46
- package/dist/helpers-Bx2yBrpn.cjs +0 -0
- package/dist/helpers-DemUUgdw.mjs +1 -0
- package/dist/index-C2gUMYkE.d.cts +1 -0
- package/dist/index-D8dPsry7.d.mts +1 -0
- package/dist/index-OEBbnNdr.d.mts +1 -0
- package/dist/index-uTS5iDq_.d.cts +1 -0
- package/dist/index.cjs +30 -27
- package/dist/index.d.cts +10 -8
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +10 -11
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +9 -6
- package/dist/index.mjs.map +1 -1
- package/dist/module-helpers-B913A2FR.d.mts +50 -0
- package/dist/module-helpers-B913A2FR.d.mts.map +1 -0
- package/dist/module-helpers-BBKb6fKg.d.cts +50 -0
- package/dist/module-helpers-BBKb6fKg.d.cts.map +1 -0
- package/dist/module-helpers-DtOc93YQ.mjs +96 -0
- package/dist/module-helpers-DtOc93YQ.mjs.map +1 -0
- package/dist/module-helpers-Non-jHMu.cjs +138 -0
- package/dist/options-2JL6WIXT.cjs +59 -0
- package/dist/options-CNyetWnk.d.cts +19 -0
- package/dist/options-CNyetWnk.d.cts.map +1 -0
- package/dist/options-DT_wvMGu.mjs +47 -0
- package/dist/options-DT_wvMGu.mjs.map +1 -0
- package/dist/options-Z_v0-Y5V.d.mts +19 -0
- package/dist/options-Z_v0-Y5V.d.mts.map +1 -0
- package/dist/plugin-10Y9IjgN.d.cts +19 -0
- package/dist/plugin-10Y9IjgN.d.cts.map +1 -0
- package/dist/plugin-25m6BdNV.d.mts +19 -0
- package/dist/plugin-25m6BdNV.d.mts.map +1 -0
- package/dist/plugin-BX9Q6Mnb.mjs +1 -0
- package/dist/plugin-DkYJiG5m.cjs +0 -0
- package/dist/types/config.cjs +1 -0
- package/dist/types/config.d.cts +2 -87
- package/dist/types/config.d.mts +2 -88
- package/dist/types/config.mjs +2 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/index.mjs +4 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +3 -20
- package/dist/types/plugin.d.mts +3 -21
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-Bjn15Uy6.mjs +1 -0
- package/dist/types-D10T4PdD.cjs +0 -0
- package/package.json +2 -2
- package/dist/core/src/lib/logger.cjs +0 -41
- package/dist/core/src/lib/logger.mjs +0 -40
- package/dist/core/src/lib/logger.mjs.map +0 -1
- package/dist/core/src/types/api.d.cts +0 -103
- package/dist/core/src/types/api.d.cts.map +0 -1
- package/dist/core/src/types/api.d.mts +0 -103
- package/dist/core/src/types/api.d.mts.map +0 -1
- package/dist/core/src/types/commands.d.cts +0 -9
- package/dist/core/src/types/commands.d.cts.map +0 -1
- package/dist/core/src/types/commands.d.mts +0 -10
- package/dist/core/src/types/commands.d.mts.map +0 -1
- package/dist/core/src/types/config.d.cts +0 -551
- package/dist/core/src/types/config.d.cts.map +0 -1
- package/dist/core/src/types/config.d.mts +0 -551
- package/dist/core/src/types/config.d.mts.map +0 -1
- package/dist/core/src/types/context.d.cts +0 -511
- package/dist/core/src/types/context.d.cts.map +0 -1
- package/dist/core/src/types/context.d.mts +0 -511
- package/dist/core/src/types/context.d.mts.map +0 -1
- package/dist/core/src/types/fs.d.cts +0 -487
- package/dist/core/src/types/fs.d.cts.map +0 -1
- package/dist/core/src/types/fs.d.mts +0 -487
- package/dist/core/src/types/fs.d.mts.map +0 -1
- package/dist/core/src/types/hooks.d.cts +0 -99
- package/dist/core/src/types/hooks.d.cts.map +0 -1
- package/dist/core/src/types/hooks.d.mts +0 -99
- package/dist/core/src/types/hooks.d.mts.map +0 -1
- package/dist/core/src/types/index.d.mts +0 -9
- package/dist/core/src/types/plugin.d.cts +0 -204
- package/dist/core/src/types/plugin.d.cts.map +0 -1
- package/dist/core/src/types/plugin.d.mts +0 -204
- package/dist/core/src/types/plugin.d.mts.map +0 -1
- package/dist/core/src/types/tsconfig.d.cts +0 -70
- package/dist/core/src/types/tsconfig.d.cts.map +0 -1
- package/dist/core/src/types/tsconfig.d.mts +0 -70
- package/dist/core/src/types/tsconfig.d.mts.map +0 -1
- package/dist/core/src/types/unplugin.d.cts +0 -24
- package/dist/core/src/types/unplugin.d.cts.map +0 -1
- package/dist/core/src/types/unplugin.d.mts +0 -25
- package/dist/core/src/types/unplugin.d.mts.map +0 -1
- package/dist/helpers/ast-utils.d.cts.map +0 -1
- package/dist/helpers/ast-utils.d.mts.map +0 -1
- package/dist/helpers/ast-utils.mjs.map +0 -1
- package/dist/helpers/create-plugin.d.cts.map +0 -1
- package/dist/helpers/create-plugin.d.mts.map +0 -1
- package/dist/helpers/create-plugin.mjs.map +0 -1
- package/dist/helpers/filters.d.cts.map +0 -1
- package/dist/helpers/filters.d.mts.map +0 -1
- package/dist/helpers/filters.mjs.map +0 -1
- package/dist/helpers/module-helpers.d.cts.map +0 -1
- package/dist/helpers/module-helpers.d.mts.map +0 -1
- package/dist/helpers/module-helpers.mjs.map +0 -1
- package/dist/helpers/options.d.cts.map +0 -1
- package/dist/helpers/options.d.mts.map +0 -1
- package/dist/helpers/options.mjs.map +0 -1
- package/dist/types/config.d.cts.map +0 -1
- package/dist/types/config.d.mts.map +0 -1
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
+
const require_filters = require('./filters-CU0L1nIa.cjs');
|
|
3
|
+
let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
4
|
+
let chalk = require("chalk");
|
|
5
|
+
chalk = require_chunk.__toESM(chalk);
|
|
6
|
+
|
|
7
|
+
//#region src/helpers/options.ts
|
|
8
|
+
function resolvePluginFunction(context, plugin) {
|
|
9
|
+
try {
|
|
10
|
+
return Array.isArray(plugin) && plugin.length > 0 && plugin[0] ? (0, __stryke_type_checks_is_function.isFunction)(plugin[0]) ? plugin[0](context) : plugin[0] : (0, __stryke_type_checks_is_function.isFunction)(plugin) ? plugin(context) : plugin;
|
|
11
|
+
} catch {
|
|
12
|
+
return plugin[0];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the [Babel](https://babeljs.io/) plugin.
|
|
17
|
+
*
|
|
18
|
+
* @param context - The context for the transformation.
|
|
19
|
+
* @param code - The code to be transformed.
|
|
20
|
+
* @param id - The ID of the source file.
|
|
21
|
+
* @param plugin - The Babel plugin to resolve.
|
|
22
|
+
* @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.
|
|
23
|
+
*/
|
|
24
|
+
function resolveBabelPlugin(context, code, id, plugin) {
|
|
25
|
+
if (Array.isArray(plugin) && plugin.length > 0 && plugin[0]) {
|
|
26
|
+
if (plugin.length > 2 && plugin[2] && (0, __stryke_type_checks_is_function.isFunction)(plugin[2]) && !plugin[2](code, id)) {
|
|
27
|
+
context.trace(`Skipping filtered Babel plugin ${chalk.default.bold.cyanBright(require_filters.getPluginName(plugin) || "unnamed")} for ${id}`);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
return plugin.length > 2 ? [
|
|
31
|
+
resolvePluginFunction(context, plugin),
|
|
32
|
+
plugin[1],
|
|
33
|
+
plugin[2]
|
|
34
|
+
] : [
|
|
35
|
+
resolvePluginFunction(context, plugin),
|
|
36
|
+
plugin[1],
|
|
37
|
+
null
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
return [
|
|
41
|
+
resolvePluginFunction(context, plugin),
|
|
42
|
+
{},
|
|
43
|
+
null
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
Object.defineProperty(exports, 'resolveBabelPlugin', {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return resolveBabelPlugin;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, 'resolvePluginFunction', {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return resolvePluginFunction;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { c as BabelTransformPluginOptions, h as ResolvedBabelTransformPluginOptions } from "./config-B8fQjuSs.cjs";
|
|
2
|
+
import { Context } from "@powerlines/core/types";
|
|
3
|
+
import { PluginOptions, PluginTarget } from "@babel/core";
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/options.d.ts
|
|
6
|
+
declare function resolvePluginFunction(context: Context, plugin: any | PluginTarget | any[] | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined]): BabelTransformPluginOptions;
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the [Babel](https://babeljs.io/) plugin.
|
|
9
|
+
*
|
|
10
|
+
* @param context - The context for the transformation.
|
|
11
|
+
* @param code - The code to be transformed.
|
|
12
|
+
* @param id - The ID of the source file.
|
|
13
|
+
* @param plugin - The Babel plugin to resolve.
|
|
14
|
+
* @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.
|
|
15
|
+
*/
|
|
16
|
+
declare function resolveBabelPlugin(context: Context, code: string, id: string, plugin: BabelTransformPluginOptions): ResolvedBabelTransformPluginOptions | undefined;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { resolvePluginFunction as n, resolveBabelPlugin as t };
|
|
19
|
+
//# sourceMappingURL=options-CNyetWnk.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options-CNyetWnk.d.cts","names":[],"sources":["../src/helpers/options.ts"],"sourcesContent":[],"mappings":";;;;;iBA4BgB,qBAAA,UACL,uBAGL,wBAEC,cAAc,kBACd,cAAc,qCAClB;;AARH;;;;;;;;AAQ8B,iBAuBd,kBAAA,CAvBc,OAAA,EAwBnB,OAxBmB,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,EAAA,MAAA,EAAA,MAAA,EA2BpB,2BA3BoB,CAAA,EA4B3B,mCA5B2B,GAAA,SAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { r as getPluginName } from "./filters-DjAUc6r9.mjs";
|
|
2
|
+
import { isFunction } from "@stryke/type-checks/is-function";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/options.ts
|
|
6
|
+
function resolvePluginFunction(context, plugin) {
|
|
7
|
+
try {
|
|
8
|
+
return Array.isArray(plugin) && plugin.length > 0 && plugin[0] ? isFunction(plugin[0]) ? plugin[0](context) : plugin[0] : isFunction(plugin) ? plugin(context) : plugin;
|
|
9
|
+
} catch {
|
|
10
|
+
return plugin[0];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the [Babel](https://babeljs.io/) plugin.
|
|
15
|
+
*
|
|
16
|
+
* @param context - The context for the transformation.
|
|
17
|
+
* @param code - The code to be transformed.
|
|
18
|
+
* @param id - The ID of the source file.
|
|
19
|
+
* @param plugin - The Babel plugin to resolve.
|
|
20
|
+
* @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.
|
|
21
|
+
*/
|
|
22
|
+
function resolveBabelPlugin(context, code, id, plugin) {
|
|
23
|
+
if (Array.isArray(plugin) && plugin.length > 0 && plugin[0]) {
|
|
24
|
+
if (plugin.length > 2 && plugin[2] && isFunction(plugin[2]) && !plugin[2](code, id)) {
|
|
25
|
+
context.trace(`Skipping filtered Babel plugin ${chalk.bold.cyanBright(getPluginName(plugin) || "unnamed")} for ${id}`);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
return plugin.length > 2 ? [
|
|
29
|
+
resolvePluginFunction(context, plugin),
|
|
30
|
+
plugin[1],
|
|
31
|
+
plugin[2]
|
|
32
|
+
] : [
|
|
33
|
+
resolvePluginFunction(context, plugin),
|
|
34
|
+
plugin[1],
|
|
35
|
+
null
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
return [
|
|
39
|
+
resolvePluginFunction(context, plugin),
|
|
40
|
+
{},
|
|
41
|
+
null
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
export { resolvePluginFunction as n, resolveBabelPlugin as t };
|
|
47
|
+
//# sourceMappingURL=options-DT_wvMGu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options-DT_wvMGu.mjs","names":[],"sources":["../src/helpers/options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { PluginOptions, PluginTarget } from \"@babel/core\";\nimport { Context } from \"@powerlines/core/types\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport chalk from \"chalk\";\nimport {\n BabelTransformPluginOptions,\n ResolvedBabelTransformPluginOptions\n} from \"../types/config\";\nimport { getPluginName } from \"./filters\";\n\nexport function resolvePluginFunction(\n context: Context,\n plugin:\n | any\n | PluginTarget\n | any[]\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | undefined]\n): BabelTransformPluginOptions {\n try {\n return Array.isArray(plugin) && plugin.length > 0 && plugin[0]\n ? isFunction(plugin[0])\n ? plugin[0](context)\n : plugin[0]\n : isFunction(plugin)\n ? plugin(context)\n : plugin;\n } catch {\n return plugin[0];\n }\n}\n\n/**\n * Resolve the [Babel](https://babeljs.io/) plugin.\n *\n * @param context - The context for the transformation.\n * @param code - The code to be transformed.\n * @param id - The ID of the source file.\n * @param plugin - The Babel plugin to resolve.\n * @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.\n */\nexport function resolveBabelPlugin(\n context: Context,\n code: string,\n id: string,\n plugin: BabelTransformPluginOptions\n): ResolvedBabelTransformPluginOptions | undefined {\n if (Array.isArray(plugin) && plugin.length > 0 && plugin[0]) {\n if (\n plugin.length > 2 &&\n plugin[2] &&\n isFunction(plugin[2]) &&\n !plugin[2](code, id)\n ) {\n context.trace(\n `Skipping filtered Babel plugin ${chalk.bold.cyanBright(\n getPluginName(plugin) || \"unnamed\"\n )} for ${id}`\n );\n\n return undefined;\n }\n\n return plugin.length > 2\n ? [resolvePluginFunction(context, plugin), plugin[1], plugin[2]]\n : [resolvePluginFunction(context, plugin), plugin[1], null];\n }\n\n return [resolvePluginFunction(context, plugin), {}, null];\n}\n"],"mappings":";;;;;AA4BA,SAAgB,sBACd,SACA,QAM6B;AAC7B,KAAI;AACF,SAAO,MAAM,QAAQ,OAAO,IAAI,OAAO,SAAS,KAAK,OAAO,KACxD,WAAW,OAAO,GAAG,GACnB,OAAO,GAAG,QAAQ,GAClB,OAAO,KACT,WAAW,OAAO,GAChB,OAAO,QAAQ,GACf;SACA;AACN,SAAO,OAAO;;;;;;;;;;;;AAalB,SAAgB,mBACd,SACA,MACA,IACA,QACiD;AACjD,KAAI,MAAM,QAAQ,OAAO,IAAI,OAAO,SAAS,KAAK,OAAO,IAAI;AAC3D,MACE,OAAO,SAAS,KAChB,OAAO,MACP,WAAW,OAAO,GAAG,IACrB,CAAC,OAAO,GAAG,MAAM,GAAG,EACpB;AACA,WAAQ,MACN,kCAAkC,MAAM,KAAK,WAC3C,cAAc,OAAO,IAAI,UAC1B,CAAC,OAAO,KACV;AAED;;AAGF,SAAO,OAAO,SAAS,IACnB;GAAC,sBAAsB,SAAS,OAAO;GAAE,OAAO;GAAI,OAAO;GAAG,GAC9D;GAAC,sBAAsB,SAAS,OAAO;GAAE,OAAO;GAAI;GAAK;;AAG/D,QAAO;EAAC,sBAAsB,SAAS,OAAO;EAAE,EAAE;EAAE;EAAK"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { c as BabelTransformPluginOptions, h as ResolvedBabelTransformPluginOptions } from "./config-BGnCc0aq.mjs";
|
|
2
|
+
import { PluginOptions, PluginTarget } from "@babel/core";
|
|
3
|
+
import { Context } from "@powerlines/core/types";
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/options.d.ts
|
|
6
|
+
declare function resolvePluginFunction(context: Context, plugin: any | PluginTarget | any[] | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined]): BabelTransformPluginOptions;
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the [Babel](https://babeljs.io/) plugin.
|
|
9
|
+
*
|
|
10
|
+
* @param context - The context for the transformation.
|
|
11
|
+
* @param code - The code to be transformed.
|
|
12
|
+
* @param id - The ID of the source file.
|
|
13
|
+
* @param plugin - The Babel plugin to resolve.
|
|
14
|
+
* @returns The resolved Babel plugin options, or undefined if the plugin is filtered out.
|
|
15
|
+
*/
|
|
16
|
+
declare function resolveBabelPlugin(context: Context, code: string, id: string, plugin: BabelTransformPluginOptions): ResolvedBabelTransformPluginOptions | undefined;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { resolvePluginFunction as n, resolveBabelPlugin as t };
|
|
19
|
+
//# sourceMappingURL=options-Z_v0-Y5V.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options-Z_v0-Y5V.d.mts","names":[],"sources":["../src/helpers/options.ts"],"sourcesContent":[],"mappings":";;;;;iBA4BgB,qBAAA,UACL,uBAGL,wBAEC,cAAc,kBACd,cAAc,qCAClB;;AARH;;;;;;;;AAQ8B,iBAuBd,kBAAA,CAvBc,OAAA,EAwBnB,OAxBmB,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,EAAA,MAAA,EAAA,MAAA,EA2BpB,2BA3BoB,CAAA,EA4B3B,mCA5B2B,GAAA,SAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { l as BabelUserConfig, n as BabelResolvedConfig } from "./config-B8fQjuSs.cjs";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core/types";
|
|
3
|
+
|
|
4
|
+
//#region src/types/plugin.d.ts
|
|
5
|
+
type BabelPluginOptions = Partial<BabelUserConfig>;
|
|
6
|
+
type BabelPluginUserConfig = UserConfig & {
|
|
7
|
+
babel?: BabelPluginOptions;
|
|
8
|
+
};
|
|
9
|
+
interface BabelPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
+
babel: BabelResolvedConfig;
|
|
11
|
+
}
|
|
12
|
+
type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
+
declare type __ΩBabelPluginOptions = any[];
|
|
14
|
+
declare type __ΩBabelPluginUserConfig = any[];
|
|
15
|
+
declare type __ΩBabelPluginResolvedConfig = any[];
|
|
16
|
+
declare type __ΩBabelPluginContext = any[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { __ΩBabelPluginContext as a, __ΩBabelPluginUserConfig as c, BabelPluginUserConfig as i, BabelPluginOptions as n, __ΩBabelPluginOptions as o, BabelPluginResolvedConfig as r, __ΩBabelPluginResolvedConfig as s, BabelPluginContext as t };
|
|
19
|
+
//# sourceMappingURL=plugin-10Y9IjgN.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-10Y9IjgN.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,kBAAA,GAAqB,QAAQ;KAE7B,qBAAA,GAAwB;EAFxB,KAAA,CAAA,EAGF,kBAHoB;AAE9B,CAAA;AAIiB,UAAA,yBAAA,SAAkC,cAAA,CAAA;EAIvC,KAAA,EAHH,mBAGqB;;AACwB,KAD1C,kBAC0C,CAAA,wBAA5B,yBAA4B,GAAA,yBAAA,CAAA,GAClD,aADkD,CACpC,eADoC,CAAA;AACpC,qCAAA,GAAA,EAAA;AAAd,wCAAA,GAAA,EAAA;AAAa,4CAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { l as BabelUserConfig, n as BabelResolvedConfig } from "./config-BGnCc0aq.mjs";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core/types";
|
|
3
|
+
|
|
4
|
+
//#region src/types/plugin.d.ts
|
|
5
|
+
type BabelPluginOptions = Partial<BabelUserConfig>;
|
|
6
|
+
type BabelPluginUserConfig = UserConfig & {
|
|
7
|
+
babel?: BabelPluginOptions;
|
|
8
|
+
};
|
|
9
|
+
interface BabelPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
+
babel: BabelResolvedConfig;
|
|
11
|
+
}
|
|
12
|
+
type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
+
declare type __ΩBabelPluginOptions = any[];
|
|
14
|
+
declare type __ΩBabelPluginUserConfig = any[];
|
|
15
|
+
declare type __ΩBabelPluginResolvedConfig = any[];
|
|
16
|
+
declare type __ΩBabelPluginContext = any[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { __ΩBabelPluginContext as a, __ΩBabelPluginUserConfig as c, BabelPluginUserConfig as i, BabelPluginOptions as n, __ΩBabelPluginOptions as o, BabelPluginResolvedConfig as r, __ΩBabelPluginResolvedConfig as s, BabelPluginContext as t };
|
|
19
|
+
//# sourceMappingURL=plugin-25m6BdNV.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-25m6BdNV.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,kBAAA,GAAqB,QAAQ;KAE7B,qBAAA,GAAwB;EAFxB,KAAA,CAAA,EAGF,kBAHoB;AAE9B,CAAA;AAIiB,UAAA,yBAAA,SAAkC,cAAA,CAAA;EAIvC,KAAA,EAHH,mBAGqB;;AACwB,KAD1C,kBAC0C,CAAA,wBAA5B,yBAA4B,GAAA,yBAAA,CAAA,GAClD,aADkD,CACpC,eADoC,CAAA;AACpC,qCAAA,GAAA,EAAA;AAAd,wCAAA,GAAA,EAAA;AAAa,4CAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
package/dist/types/config.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../config-QK0F_KAD.cjs');
|
package/dist/types/config.d.cts
CHANGED
|
@@ -1,87 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { PluginItem, PluginObj, PluginPass, TransformOptions, transformAsync } from "@babel/core";
|
|
4
|
-
import { BabelAPI } from "@babel/helper-plugin-utils";
|
|
5
|
-
|
|
6
|
-
//#region src/types/config.d.ts
|
|
7
|
-
interface NamedImportDefinition {
|
|
8
|
-
name: string;
|
|
9
|
-
source: string;
|
|
10
|
-
kind: "named";
|
|
11
|
-
}
|
|
12
|
-
interface DefaultImportDefinition {
|
|
13
|
-
source: string;
|
|
14
|
-
kind: "default";
|
|
15
|
-
}
|
|
16
|
-
type ImportDefinition = NamedImportDefinition | DefaultImportDefinition;
|
|
17
|
-
type BabelPluginPass<TState = unknown> = PluginPass & TState;
|
|
18
|
-
type BabelTransformPluginFilter = (code: string, id: string) => boolean;
|
|
19
|
-
type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
|
|
20
|
-
name: string;
|
|
21
|
-
log: LogFn;
|
|
22
|
-
api: BabelAPI;
|
|
23
|
-
options: TOptions;
|
|
24
|
-
context: TContext;
|
|
25
|
-
dirname: string;
|
|
26
|
-
}) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
|
|
27
|
-
$$name: string;
|
|
28
|
-
};
|
|
29
|
-
type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
|
|
30
|
-
type ResolvedBabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter | null];
|
|
31
|
-
type BabelTransformInput = Omit<TransformOptions & Required<Pick<TransformOptions, "presets" | "plugins">>, "filename" | "root" | "sourceFileName" | "sourceMaps" | "inputSourceMap">;
|
|
32
|
-
interface BabelTransformPluginBuilderParams<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>> {
|
|
33
|
-
name: string;
|
|
34
|
-
log: LogFn;
|
|
35
|
-
api: BabelAPI;
|
|
36
|
-
options: TOptions;
|
|
37
|
-
context: TContext;
|
|
38
|
-
dirname: string;
|
|
39
|
-
}
|
|
40
|
-
type BabelTransformPluginBuilder<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = (params: BabelTransformPluginBuilderParams<TContext, TOptions>) => PluginObj<TState & BabelPluginPass<TOptions>>;
|
|
41
|
-
type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = Omit<BabelTransformPlugin<TContext, TOptions, TState>, "$$name"> & Required<Pick<BabelTransformPlugin<TContext, TOptions, TState>, "$$name">>;
|
|
42
|
-
/**
|
|
43
|
-
* A non-local import specifier represents an import that is not defined within the current module.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
* import { bar as baz } from 'foo';
|
|
48
|
-
* // { name: 'baz', module: 'foo', imported: 'bar' }
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* @remarks
|
|
52
|
-
* It captures the details of an import statement, including the local name used in the module, the source module from which it is imported, and the original name of the export in the source module.
|
|
53
|
-
*/
|
|
54
|
-
interface ImportSpecifier {
|
|
55
|
-
name?: string;
|
|
56
|
-
module: string;
|
|
57
|
-
imported: string;
|
|
58
|
-
}
|
|
59
|
-
type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
|
|
60
|
-
/**
|
|
61
|
-
* The Babel plugins to be used during the build process
|
|
62
|
-
*/
|
|
63
|
-
plugins?: BabelTransformPluginOptions[];
|
|
64
|
-
/**
|
|
65
|
-
* The Babel presets to be used during the build process
|
|
66
|
-
*/
|
|
67
|
-
presets?: BabelTransformPluginOptions[];
|
|
68
|
-
};
|
|
69
|
-
type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
|
|
70
|
-
declare type __ΩNamedImportDefinition = any[];
|
|
71
|
-
declare type __ΩDefaultImportDefinition = any[];
|
|
72
|
-
declare type __ΩImportDefinition = any[];
|
|
73
|
-
declare type __ΩBabelPluginPass = any[];
|
|
74
|
-
declare type __ΩBabelTransformPluginFilter = any[];
|
|
75
|
-
declare type __ΩBabelTransformPlugin = any[];
|
|
76
|
-
declare type __ΩBabelTransformPluginOptions = any[];
|
|
77
|
-
declare type __ΩResolvedBabelTransformPluginOptions = any[];
|
|
78
|
-
declare type __ΩBabelTransformInput = any[];
|
|
79
|
-
declare type __ΩBabelTransformPluginBuilderParams = any[];
|
|
80
|
-
declare type __ΩBabelTransformPluginBuilder = any[];
|
|
81
|
-
declare type __ΩDeclareBabelTransformPluginReturn = any[];
|
|
82
|
-
declare type __ΩImportSpecifier = any[];
|
|
83
|
-
declare type __ΩBabelUserConfig = any[];
|
|
84
|
-
declare type __ΩBabelResolvedConfig = any[];
|
|
85
|
-
//#endregion
|
|
86
|
-
export { BabelPluginPass, BabelResolvedConfig, BabelTransformInput, BabelTransformPlugin, BabelTransformPluginBuilder, BabelTransformPluginBuilderParams, BabelTransformPluginFilter, BabelTransformPluginOptions, BabelUserConfig, DeclareBabelTransformPluginReturn, DefaultImportDefinition, ImportDefinition, ImportSpecifier, NamedImportDefinition, ResolvedBabelTransformPluginOptions, __ΩBabelPluginPass, __ΩBabelResolvedConfig, __ΩBabelTransformInput, __ΩBabelTransformPlugin, __ΩBabelTransformPluginBuilder, __ΩBabelTransformPluginBuilderParams, __ΩBabelTransformPluginFilter, __ΩBabelTransformPluginOptions, __ΩBabelUserConfig, __ΩDeclareBabelTransformPluginReturn, __ΩDefaultImportDefinition, __ΩImportDefinition, __ΩImportSpecifier, __ΩNamedImportDefinition, __ΩResolvedBabelTransformPluginOptions };
|
|
87
|
-
//# sourceMappingURL=config.d.cts.map
|
|
1
|
+
import { A as __ΩResolvedBabelTransformPluginOptions, C as __ΩBabelTransformPluginOptions, D as __ΩImportDefinition, E as __ΩDefaultImportDefinition, O as __ΩImportSpecifier, S as __ΩBabelTransformPluginFilter, T as __ΩDeclareBabelTransformPluginReturn, _ as __ΩBabelResolvedConfig, a as BabelTransformPluginBuilder, b as __ΩBabelTransformPluginBuilder, c as BabelTransformPluginOptions, d as DefaultImportDefinition, f as ImportDefinition, g as __ΩBabelPluginPass, h as ResolvedBabelTransformPluginOptions, i as BabelTransformPlugin, k as __ΩNamedImportDefinition, l as BabelUserConfig, m as NamedImportDefinition, n as BabelResolvedConfig, o as BabelTransformPluginBuilderParams, p as ImportSpecifier, r as BabelTransformInput, s as BabelTransformPluginFilter, t as BabelPluginPass, u as DeclareBabelTransformPluginReturn, v as __ΩBabelTransformInput, w as __ΩBabelUserConfig, x as __ΩBabelTransformPluginBuilderParams, y as __ΩBabelTransformPlugin } from "../config-B8fQjuSs.cjs";
|
|
2
|
+
export { BabelPluginPass, BabelResolvedConfig, BabelTransformInput, BabelTransformPlugin, BabelTransformPluginBuilder, BabelTransformPluginBuilderParams, BabelTransformPluginFilter, BabelTransformPluginOptions, BabelUserConfig, DeclareBabelTransformPluginReturn, DefaultImportDefinition, ImportDefinition, ImportSpecifier, NamedImportDefinition, ResolvedBabelTransformPluginOptions, __ΩBabelPluginPass, __ΩBabelResolvedConfig, __ΩBabelTransformInput, __ΩBabelTransformPlugin, __ΩBabelTransformPluginBuilder, __ΩBabelTransformPluginBuilderParams, __ΩBabelTransformPluginFilter, __ΩBabelTransformPluginOptions, __ΩBabelUserConfig, __ΩDeclareBabelTransformPluginReturn, __ΩDefaultImportDefinition, __ΩImportDefinition, __ΩImportSpecifier, __ΩNamedImportDefinition, __ΩResolvedBabelTransformPluginOptions };
|
package/dist/types/config.d.mts
CHANGED
|
@@ -1,88 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import "../core/src/types/index.mjs";
|
|
4
|
-
import { PluginItem, PluginObj, PluginPass, TransformOptions, transformAsync } from "@babel/core";
|
|
5
|
-
import { BabelAPI } from "@babel/helper-plugin-utils";
|
|
6
|
-
|
|
7
|
-
//#region src/types/config.d.ts
|
|
8
|
-
interface NamedImportDefinition {
|
|
9
|
-
name: string;
|
|
10
|
-
source: string;
|
|
11
|
-
kind: "named";
|
|
12
|
-
}
|
|
13
|
-
interface DefaultImportDefinition {
|
|
14
|
-
source: string;
|
|
15
|
-
kind: "default";
|
|
16
|
-
}
|
|
17
|
-
type ImportDefinition = NamedImportDefinition | DefaultImportDefinition;
|
|
18
|
-
type BabelPluginPass<TState = unknown> = PluginPass & TState;
|
|
19
|
-
type BabelTransformPluginFilter = (code: string, id: string) => boolean;
|
|
20
|
-
type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
|
|
21
|
-
name: string;
|
|
22
|
-
log: LogFn;
|
|
23
|
-
api: BabelAPI;
|
|
24
|
-
options: TOptions;
|
|
25
|
-
context: TContext;
|
|
26
|
-
dirname: string;
|
|
27
|
-
}) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
|
|
28
|
-
$$name: string;
|
|
29
|
-
};
|
|
30
|
-
type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
|
|
31
|
-
type ResolvedBabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter | null];
|
|
32
|
-
type BabelTransformInput = Omit<TransformOptions & Required<Pick<TransformOptions, "presets" | "plugins">>, "filename" | "root" | "sourceFileName" | "sourceMaps" | "inputSourceMap">;
|
|
33
|
-
interface BabelTransformPluginBuilderParams<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>> {
|
|
34
|
-
name: string;
|
|
35
|
-
log: LogFn;
|
|
36
|
-
api: BabelAPI;
|
|
37
|
-
options: TOptions;
|
|
38
|
-
context: TContext;
|
|
39
|
-
dirname: string;
|
|
40
|
-
}
|
|
41
|
-
type BabelTransformPluginBuilder<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = (params: BabelTransformPluginBuilderParams<TContext, TOptions>) => PluginObj<TState & BabelPluginPass<TOptions>>;
|
|
42
|
-
type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = Omit<BabelTransformPlugin<TContext, TOptions, TState>, "$$name"> & Required<Pick<BabelTransformPlugin<TContext, TOptions, TState>, "$$name">>;
|
|
43
|
-
/**
|
|
44
|
-
* A non-local import specifier represents an import that is not defined within the current module.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```typescript
|
|
48
|
-
* import { bar as baz } from 'foo';
|
|
49
|
-
* // { name: 'baz', module: 'foo', imported: 'bar' }
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* It captures the details of an import statement, including the local name used in the module, the source module from which it is imported, and the original name of the export in the source module.
|
|
54
|
-
*/
|
|
55
|
-
interface ImportSpecifier {
|
|
56
|
-
name?: string;
|
|
57
|
-
module: string;
|
|
58
|
-
imported: string;
|
|
59
|
-
}
|
|
60
|
-
type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
|
|
61
|
-
/**
|
|
62
|
-
* The Babel plugins to be used during the build process
|
|
63
|
-
*/
|
|
64
|
-
plugins?: BabelTransformPluginOptions[];
|
|
65
|
-
/**
|
|
66
|
-
* The Babel presets to be used during the build process
|
|
67
|
-
*/
|
|
68
|
-
presets?: BabelTransformPluginOptions[];
|
|
69
|
-
};
|
|
70
|
-
type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
|
|
71
|
-
declare type __ΩNamedImportDefinition = any[];
|
|
72
|
-
declare type __ΩDefaultImportDefinition = any[];
|
|
73
|
-
declare type __ΩImportDefinition = any[];
|
|
74
|
-
declare type __ΩBabelPluginPass = any[];
|
|
75
|
-
declare type __ΩBabelTransformPluginFilter = any[];
|
|
76
|
-
declare type __ΩBabelTransformPlugin = any[];
|
|
77
|
-
declare type __ΩBabelTransformPluginOptions = any[];
|
|
78
|
-
declare type __ΩResolvedBabelTransformPluginOptions = any[];
|
|
79
|
-
declare type __ΩBabelTransformInput = any[];
|
|
80
|
-
declare type __ΩBabelTransformPluginBuilderParams = any[];
|
|
81
|
-
declare type __ΩBabelTransformPluginBuilder = any[];
|
|
82
|
-
declare type __ΩDeclareBabelTransformPluginReturn = any[];
|
|
83
|
-
declare type __ΩImportSpecifier = any[];
|
|
84
|
-
declare type __ΩBabelUserConfig = any[];
|
|
85
|
-
declare type __ΩBabelResolvedConfig = any[];
|
|
86
|
-
//#endregion
|
|
87
|
-
export { BabelPluginPass, BabelResolvedConfig, BabelTransformInput, BabelTransformPlugin, BabelTransformPluginBuilder, BabelTransformPluginBuilderParams, BabelTransformPluginFilter, BabelTransformPluginOptions, BabelUserConfig, DeclareBabelTransformPluginReturn, DefaultImportDefinition, ImportDefinition, ImportSpecifier, NamedImportDefinition, ResolvedBabelTransformPluginOptions, __ΩBabelPluginPass, __ΩBabelResolvedConfig, __ΩBabelTransformInput, __ΩBabelTransformPlugin, __ΩBabelTransformPluginBuilder, __ΩBabelTransformPluginBuilderParams, __ΩBabelTransformPluginFilter, __ΩBabelTransformPluginOptions, __ΩBabelUserConfig, __ΩDeclareBabelTransformPluginReturn, __ΩDefaultImportDefinition, __ΩImportDefinition, __ΩImportSpecifier, __ΩNamedImportDefinition, __ΩResolvedBabelTransformPluginOptions };
|
|
88
|
-
//# sourceMappingURL=config.d.mts.map
|
|
1
|
+
import { A as __ΩResolvedBabelTransformPluginOptions, C as __ΩBabelTransformPluginOptions, D as __ΩImportDefinition, E as __ΩDefaultImportDefinition, O as __ΩImportSpecifier, S as __ΩBabelTransformPluginFilter, T as __ΩDeclareBabelTransformPluginReturn, _ as __ΩBabelResolvedConfig, a as BabelTransformPluginBuilder, b as __ΩBabelTransformPluginBuilder, c as BabelTransformPluginOptions, d as DefaultImportDefinition, f as ImportDefinition, g as __ΩBabelPluginPass, h as ResolvedBabelTransformPluginOptions, i as BabelTransformPlugin, k as __ΩNamedImportDefinition, l as BabelUserConfig, m as NamedImportDefinition, n as BabelResolvedConfig, o as BabelTransformPluginBuilderParams, p as ImportSpecifier, r as BabelTransformInput, s as BabelTransformPluginFilter, t as BabelPluginPass, u as DeclareBabelTransformPluginReturn, v as __ΩBabelTransformInput, w as __ΩBabelUserConfig, x as __ΩBabelTransformPluginBuilderParams, y as __ΩBabelTransformPlugin } from "../config-BGnCc0aq.mjs";
|
|
2
|
+
export { BabelPluginPass, BabelResolvedConfig, BabelTransformInput, BabelTransformPlugin, BabelTransformPluginBuilder, BabelTransformPluginBuilderParams, BabelTransformPluginFilter, BabelTransformPluginOptions, BabelUserConfig, DeclareBabelTransformPluginReturn, DefaultImportDefinition, ImportDefinition, ImportSpecifier, NamedImportDefinition, ResolvedBabelTransformPluginOptions, __ΩBabelPluginPass, __ΩBabelResolvedConfig, __ΩBabelTransformInput, __ΩBabelTransformPlugin, __ΩBabelTransformPluginBuilder, __ΩBabelTransformPluginBuilderParams, __ΩBabelTransformPluginFilter, __ΩBabelTransformPluginOptions, __ΩBabelUserConfig, __ΩDeclareBabelTransformPluginReturn, __ΩDefaultImportDefinition, __ΩImportDefinition, __ΩImportSpecifier, __ΩNamedImportDefinition, __ΩResolvedBabelTransformPluginOptions };
|
package/dist/types/config.mjs
CHANGED
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BabelPluginContext,
|
|
1
|
+
import { A as __ΩResolvedBabelTransformPluginOptions, C as __ΩBabelTransformPluginOptions, D as __ΩImportDefinition, E as __ΩDefaultImportDefinition, O as __ΩImportSpecifier, S as __ΩBabelTransformPluginFilter, T as __ΩDeclareBabelTransformPluginReturn, _ as __ΩBabelResolvedConfig, a as BabelTransformPluginBuilder, b as __ΩBabelTransformPluginBuilder, c as BabelTransformPluginOptions, d as DefaultImportDefinition, f as ImportDefinition, g as __ΩBabelPluginPass, h as ResolvedBabelTransformPluginOptions, i as BabelTransformPlugin, k as __ΩNamedImportDefinition, l as BabelUserConfig, m as NamedImportDefinition, n as BabelResolvedConfig, o as BabelTransformPluginBuilderParams, p as ImportSpecifier, r as BabelTransformInput, s as BabelTransformPluginFilter, t as BabelPluginPass, u as DeclareBabelTransformPluginReturn, v as __ΩBabelTransformInput, w as __ΩBabelUserConfig, x as __ΩBabelTransformPluginBuilderParams, y as __ΩBabelTransformPlugin } from "../config-B8fQjuSs.cjs";
|
|
2
|
+
import { a as __ΩBabelPluginContext, c as __ΩBabelPluginUserConfig, i as BabelPluginUserConfig, n as BabelPluginOptions, o as __ΩBabelPluginOptions, r as BabelPluginResolvedConfig, s as __ΩBabelPluginResolvedConfig, t as BabelPluginContext } from "../plugin-10Y9IjgN.cjs";
|
|
3
|
+
import "../index-uTS5iDq_.cjs";
|
|
3
4
|
export { BabelPluginContext, BabelPluginOptions, BabelPluginPass, BabelPluginResolvedConfig, BabelPluginUserConfig, BabelResolvedConfig, BabelTransformInput, BabelTransformPlugin, BabelTransformPluginBuilder, BabelTransformPluginBuilderParams, BabelTransformPluginFilter, BabelTransformPluginOptions, BabelUserConfig, DeclareBabelTransformPluginReturn, DefaultImportDefinition, ImportDefinition, ImportSpecifier, NamedImportDefinition, ResolvedBabelTransformPluginOptions, __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginPass, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig, __ΩBabelResolvedConfig, __ΩBabelTransformInput, __ΩBabelTransformPlugin, __ΩBabelTransformPluginBuilder, __ΩBabelTransformPluginBuilderParams, __ΩBabelTransformPluginFilter, __ΩBabelTransformPluginOptions, __ΩBabelUserConfig, __ΩDeclareBabelTransformPluginReturn, __ΩDefaultImportDefinition, __ΩImportDefinition, __ΩImportSpecifier, __ΩNamedImportDefinition, __ΩResolvedBabelTransformPluginOptions };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BabelPluginContext,
|
|
1
|
+
import { A as __ΩResolvedBabelTransformPluginOptions, C as __ΩBabelTransformPluginOptions, D as __ΩImportDefinition, E as __ΩDefaultImportDefinition, O as __ΩImportSpecifier, S as __ΩBabelTransformPluginFilter, T as __ΩDeclareBabelTransformPluginReturn, _ as __ΩBabelResolvedConfig, a as BabelTransformPluginBuilder, b as __ΩBabelTransformPluginBuilder, c as BabelTransformPluginOptions, d as DefaultImportDefinition, f as ImportDefinition, g as __ΩBabelPluginPass, h as ResolvedBabelTransformPluginOptions, i as BabelTransformPlugin, k as __ΩNamedImportDefinition, l as BabelUserConfig, m as NamedImportDefinition, n as BabelResolvedConfig, o as BabelTransformPluginBuilderParams, p as ImportSpecifier, r as BabelTransformInput, s as BabelTransformPluginFilter, t as BabelPluginPass, u as DeclareBabelTransformPluginReturn, v as __ΩBabelTransformInput, w as __ΩBabelUserConfig, x as __ΩBabelTransformPluginBuilderParams, y as __ΩBabelTransformPlugin } from "../config-BGnCc0aq.mjs";
|
|
2
|
+
import { a as __ΩBabelPluginContext, c as __ΩBabelPluginUserConfig, i as BabelPluginUserConfig, n as BabelPluginOptions, o as __ΩBabelPluginOptions, r as BabelPluginResolvedConfig, s as __ΩBabelPluginResolvedConfig, t as BabelPluginContext } from "../plugin-25m6BdNV.mjs";
|
|
3
|
+
import "../index-D8dPsry7.mjs";
|
|
3
4
|
export { BabelPluginContext, BabelPluginOptions, BabelPluginPass, BabelPluginResolvedConfig, BabelPluginUserConfig, BabelResolvedConfig, BabelTransformInput, BabelTransformPlugin, BabelTransformPluginBuilder, BabelTransformPluginBuilderParams, BabelTransformPluginFilter, BabelTransformPluginOptions, BabelUserConfig, DeclareBabelTransformPluginReturn, DefaultImportDefinition, ImportDefinition, ImportSpecifier, NamedImportDefinition, ResolvedBabelTransformPluginOptions, __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginPass, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig, __ΩBabelResolvedConfig, __ΩBabelTransformInput, __ΩBabelTransformPlugin, __ΩBabelTransformPluginBuilder, __ΩBabelTransformPluginBuilderParams, __ΩBabelTransformPluginFilter, __ΩBabelTransformPluginOptions, __ΩBabelUserConfig, __ΩDeclareBabelTransformPluginReturn, __ΩDefaultImportDefinition, __ΩImportDefinition, __ΩImportSpecifier, __ΩNamedImportDefinition, __ΩResolvedBabelTransformPluginOptions };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../plugin-DkYJiG5m.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
//#region src/types/plugin.d.ts
|
|
6
|
-
type BabelPluginOptions = Partial<BabelUserConfig>;
|
|
7
|
-
type BabelPluginUserConfig = UserConfig & {
|
|
8
|
-
babel?: BabelPluginOptions;
|
|
9
|
-
};
|
|
10
|
-
interface BabelPluginResolvedConfig extends ResolvedConfig {
|
|
11
|
-
babel: BabelResolvedConfig;
|
|
12
|
-
}
|
|
13
|
-
type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
14
|
-
declare type __ΩBabelPluginOptions = any[];
|
|
15
|
-
declare type __ΩBabelPluginUserConfig = any[];
|
|
16
|
-
declare type __ΩBabelPluginResolvedConfig = any[];
|
|
17
|
-
declare type __ΩBabelPluginContext = any[];
|
|
18
|
-
//#endregion
|
|
19
|
-
export { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig, __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig };
|
|
20
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
1
|
+
import "../config-B8fQjuSs.cjs";
|
|
2
|
+
import { a as __ΩBabelPluginContext, c as __ΩBabelPluginUserConfig, i as BabelPluginUserConfig, n as BabelPluginOptions, o as __ΩBabelPluginOptions, r as BabelPluginResolvedConfig, s as __ΩBabelPluginResolvedConfig, t as BabelPluginContext } from "../plugin-10Y9IjgN.cjs";
|
|
3
|
+
export { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig, __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { BabelResolvedConfig, BabelUserConfig } from "./config.mjs";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
type BabelPluginOptions = Partial<BabelUserConfig>;
|
|
8
|
-
type BabelPluginUserConfig = UserConfig & {
|
|
9
|
-
babel?: BabelPluginOptions;
|
|
10
|
-
};
|
|
11
|
-
interface BabelPluginResolvedConfig extends ResolvedConfig {
|
|
12
|
-
babel: BabelResolvedConfig;
|
|
13
|
-
}
|
|
14
|
-
type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
15
|
-
declare type __ΩBabelPluginOptions = any[];
|
|
16
|
-
declare type __ΩBabelPluginUserConfig = any[];
|
|
17
|
-
declare type __ΩBabelPluginResolvedConfig = any[];
|
|
18
|
-
declare type __ΩBabelPluginContext = any[];
|
|
19
|
-
//#endregion
|
|
20
|
-
export { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig, __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig };
|
|
21
|
-
//# sourceMappingURL=plugin.d.mts.map
|
|
1
|
+
import "../config-BGnCc0aq.mjs";
|
|
2
|
+
import { a as __ΩBabelPluginContext, c as __ΩBabelPluginUserConfig, i as BabelPluginUserConfig, n as BabelPluginOptions, o as __ΩBabelPluginOptions, r as BabelPluginResolvedConfig, s as __ΩBabelPluginResolvedConfig, t as BabelPluginContext } from "../plugin-25m6BdNV.mjs";
|
|
3
|
+
export { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig, __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-babel",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.308",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"keywords": ["babel", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -147,5 +147,5 @@
|
|
|
147
147
|
"./package.json": "./package.json"
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "c5eba2320a22122bbefaca9aba105dd8a98f19b9"
|
|
151
151
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let chalk = require("chalk");
|
|
3
|
-
chalk = require_rolldown_runtime.__toESM(chalk);
|
|
4
|
-
require("@storm-software/config-tools/logger");
|
|
5
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
6
|
-
require("@storm-software/config-tools/utilities/colors");
|
|
7
|
-
require("@stryke/helpers/noop");
|
|
8
|
-
require("@stryke/string-format/kebab-case");
|
|
9
|
-
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
10
|
-
|
|
11
|
-
//#region ../core/src/lib/logger.ts
|
|
12
|
-
const BADGE_COLORS = [
|
|
13
|
-
"#00A0DD",
|
|
14
|
-
"#6FCE4E",
|
|
15
|
-
"#FBBF24",
|
|
16
|
-
"#F43F5E",
|
|
17
|
-
"#3B82F6",
|
|
18
|
-
"#A855F7",
|
|
19
|
-
"#469592",
|
|
20
|
-
"#288EDF",
|
|
21
|
-
"#D8B4FE",
|
|
22
|
-
"#10B981",
|
|
23
|
-
"#EF4444",
|
|
24
|
-
"#F0EC56",
|
|
25
|
-
"#F472B6",
|
|
26
|
-
"#22D3EE",
|
|
27
|
-
"#EAB308",
|
|
28
|
-
"#84CC16",
|
|
29
|
-
"#F87171",
|
|
30
|
-
"#0EA5E9",
|
|
31
|
-
"#D946EF",
|
|
32
|
-
"#FACC15",
|
|
33
|
-
"#34D399",
|
|
34
|
-
"#8B5CF6"
|
|
35
|
-
];
|
|
36
|
-
const extendLog = (logFn, name) => {
|
|
37
|
-
return (type, ...args) => logFn(type, ` ${chalk.default.inverse.hex(BADGE_COLORS[name.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${(0, __stryke_string_format_title_case.titleCase)(name)} `)} ${args.join(" ")} `);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
//#endregion
|
|
41
|
-
exports.extendLog = extendLog;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import chalk from "chalk";
|
|
2
|
-
import "@storm-software/config-tools/logger";
|
|
3
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
4
|
-
import "@storm-software/config-tools/utilities/colors";
|
|
5
|
-
import "@stryke/helpers/noop";
|
|
6
|
-
import "@stryke/string-format/kebab-case";
|
|
7
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
8
|
-
|
|
9
|
-
//#region ../core/src/lib/logger.ts
|
|
10
|
-
const BADGE_COLORS = [
|
|
11
|
-
"#00A0DD",
|
|
12
|
-
"#6FCE4E",
|
|
13
|
-
"#FBBF24",
|
|
14
|
-
"#F43F5E",
|
|
15
|
-
"#3B82F6",
|
|
16
|
-
"#A855F7",
|
|
17
|
-
"#469592",
|
|
18
|
-
"#288EDF",
|
|
19
|
-
"#D8B4FE",
|
|
20
|
-
"#10B981",
|
|
21
|
-
"#EF4444",
|
|
22
|
-
"#F0EC56",
|
|
23
|
-
"#F472B6",
|
|
24
|
-
"#22D3EE",
|
|
25
|
-
"#EAB308",
|
|
26
|
-
"#84CC16",
|
|
27
|
-
"#F87171",
|
|
28
|
-
"#0EA5E9",
|
|
29
|
-
"#D946EF",
|
|
30
|
-
"#FACC15",
|
|
31
|
-
"#34D399",
|
|
32
|
-
"#8B5CF6"
|
|
33
|
-
];
|
|
34
|
-
const extendLog = (logFn, name) => {
|
|
35
|
-
return (type, ...args) => logFn(type, ` ${chalk.inverse.hex(BADGE_COLORS[name.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${titleCase(name)} `)} ${args.join(" ")} `);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
export { extendLog };
|
|
40
|
-
//# sourceMappingURL=logger.mjs.map
|