@powerlines/plugin-babel 0.12.137 → 0.12.138
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_logger = require('../powerlines/src/lib/logger.cjs');
|
|
3
2
|
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
4
3
|
let chalk = require("chalk");
|
|
5
4
|
chalk = require_rolldown_runtime.__toESM(chalk);
|
|
6
5
|
let __babel_helper_plugin_utils = require("@babel/helper-plugin-utils");
|
|
6
|
+
let powerlines_lib_logger = require("powerlines/lib/logger");
|
|
7
7
|
|
|
8
8
|
//#region src/helpers/create-plugin.ts
|
|
9
9
|
/**
|
|
@@ -18,7 +18,7 @@ function createBabelPlugin(name, builder) {
|
|
|
18
18
|
return (0, __babel_helper_plugin_utils.declare)((api, options, dirname) => {
|
|
19
19
|
api.cache.using(() => context.meta.checksum);
|
|
20
20
|
api.assertVersion("^7.0.0-0");
|
|
21
|
-
const log =
|
|
21
|
+
const log = (0, powerlines_lib_logger.extendLog)(context.log, name);
|
|
22
22
|
log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Initializing the ${chalk.default.bold.cyanBright(name)} Babel plugin`);
|
|
23
23
|
const result = builder({
|
|
24
24
|
log,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { extendLog } from "../powerlines/src/lib/logger.mjs";
|
|
2
1
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
3
2
|
import chalk from "chalk";
|
|
4
3
|
import { declare } from "@babel/helper-plugin-utils";
|
|
4
|
+
import { extendLog } from "powerlines/lib/logger";
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/create-plugin.ts
|
|
7
7
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-babel",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.138",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -153,6 +153,7 @@
|
|
|
153
153
|
"@babel/generator": "^7.28.5",
|
|
154
154
|
"@babel/helper-plugin-utils": "^7.27.1",
|
|
155
155
|
"@babel/parser": "^7.28.5",
|
|
156
|
+
"@babel/plugin-syntax-typescript": "^7.27.1",
|
|
156
157
|
"@babel/types": "^7.28.5",
|
|
157
158
|
"@storm-software/config-tools": "^1.188.75",
|
|
158
159
|
"@stryke/fs": "^0.33.27",
|
|
@@ -162,15 +163,12 @@
|
|
|
162
163
|
"chalk": "5.6.2",
|
|
163
164
|
"defu": "^6.1.4",
|
|
164
165
|
"jiti": "^2.6.1",
|
|
165
|
-
"powerlines": "^0.37.
|
|
166
|
-
"unplugin": "3.0.0-beta.3"
|
|
166
|
+
"powerlines": "^0.37.3"
|
|
167
167
|
},
|
|
168
168
|
"devDependencies": {
|
|
169
|
-
"@
|
|
170
|
-
"@powerlines/nx": "^0.11.58",
|
|
171
|
-
"@powerlines/plugin-plugin": "^0.12.80",
|
|
169
|
+
"@powerlines/plugin-plugin": "^0.12.81",
|
|
172
170
|
"@types/node": "^24.10.4"
|
|
173
171
|
},
|
|
174
172
|
"publishConfig": { "access": "public" },
|
|
175
|
-
"gitHead": "
|
|
173
|
+
"gitHead": "ae9a5afaa497538477b63988242f433b60974623"
|
|
176
174
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
3
|
-
let chalk = require("chalk");
|
|
4
|
-
chalk = require_rolldown_runtime.__toESM(chalk);
|
|
5
|
-
require("@storm-software/config-tools/logger");
|
|
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 ../powerlines/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,39 +0,0 @@
|
|
|
1
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import "@storm-software/config-tools/logger";
|
|
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 ../powerlines/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 };
|