@powerlines/plugin-babel 0.12.241 → 0.12.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/create-plugin.cjs +2 -2
- package/dist/helpers/create-plugin.d.cts +2 -2
- package/dist/helpers/create-plugin.d.mts +2 -2
- package/dist/helpers/create-plugin.mjs +1 -1
- package/dist/helpers/filters.d.cts +2 -2
- package/dist/helpers/filters.d.mts +2 -3
- package/dist/helpers/module-helpers.d.cts +1 -1
- package/dist/helpers/module-helpers.d.mts +1 -1
- package/dist/helpers/options.d.cts +2 -2
- package/dist/helpers/options.d.mts +2 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +1 -1
- package/dist/types/plugin.d.cts +3 -3
- package/dist/types/plugin.d.mts +3 -3
- package/package.json +146 -25
- package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
- package/dist/powerlines/src/lib/logger.cjs +0 -41
- package/dist/powerlines/src/lib/logger.mjs +0 -39
- package/dist/powerlines/src/types/api.d.cts +0 -104
- package/dist/powerlines/src/types/api.d.mts +0 -104
- package/dist/powerlines/src/types/babel.d.cts +0 -50
- package/dist/powerlines/src/types/babel.d.mts +0 -50
- package/dist/powerlines/src/types/build.d.cts +0 -185
- package/dist/powerlines/src/types/build.d.mts +0 -185
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -435
- package/dist/powerlines/src/types/config.d.mts +0 -435
- package/dist/powerlines/src/types/context.d.cts +0 -514
- package/dist/powerlines/src/types/context.d.mts +0 -514
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.cts +0 -32
- package/dist/powerlines/src/types/hooks.d.mts +0 -32
- package/dist/powerlines/src/types/index.d.mts +0 -12
- package/dist/powerlines/src/types/plugin.d.cts +0 -205
- package/dist/powerlines/src/types/plugin.d.mts +0 -205
- package/dist/powerlines/src/types/resolved.d.cts +0 -94
- package/dist/powerlines/src/types/resolved.d.mts +0 -94
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
- package/dist/powerlines/src/types/unplugin.d.cts +0 -22
- package/dist/powerlines/src/types/unplugin.d.mts +0 -23
|
@@ -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 chalk = require("chalk");
|
|
4
3
|
chalk = require_rolldown_runtime.__toESM(chalk);
|
|
5
4
|
let __babel_helper_plugin_utils = require("@babel/helper-plugin-utils");
|
|
6
5
|
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BabelTransformPluginBuilder, DeclareBabelTransformPluginReturn } from "powerlines/types/babel";
|
|
2
|
+
import { Context } from "powerlines/types/context";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/create-plugin.d.ts
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BabelTransformPluginBuilder, DeclareBabelTransformPluginReturn } from "powerlines/types/babel";
|
|
2
|
+
import { Context } from "powerlines/types/context";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/create-plugin.d.ts
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { extendLog } from "../powerlines/src/lib/logger.mjs";
|
|
2
1
|
import chalk from "chalk";
|
|
3
2
|
import { declare } from "@babel/helper-plugin-utils";
|
|
4
3
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
4
|
+
import { extendLog } from "powerlines/lib/logger";
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/create-plugin.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions, ResolvedBabelTransformPluginOptions } from "powerlines/types/babel";
|
|
2
|
+
import { Context } from "powerlines/types";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/filters.d.ts
|
|
5
5
|
declare function getPluginName(plugin: BabelTransformPluginOptions): string | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../powerlines/src/types/index.mjs";
|
|
1
|
+
import { BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions, ResolvedBabelTransformPluginOptions } from "powerlines/types/babel";
|
|
2
|
+
import { Context } from "powerlines/types";
|
|
4
3
|
|
|
5
4
|
//#region src/helpers/filters.d.ts
|
|
6
5
|
declare function getPluginName(plugin: BabelTransformPluginOptions): string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ImportSpecifier } from "../powerlines/src/types/babel.cjs";
|
|
2
1
|
import { ParseResult } from "@babel/parser";
|
|
3
2
|
import * as t from "@babel/types";
|
|
3
|
+
import { ImportSpecifier } from "powerlines/types/babel";
|
|
4
4
|
import { NodePath } from "@babel/core";
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/module-helpers.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ImportSpecifier } from "../powerlines/src/types/babel.mjs";
|
|
2
1
|
import { NodePath } from "@babel/core";
|
|
3
2
|
import { ParseResult } from "@babel/parser";
|
|
4
3
|
import * as t from "@babel/types";
|
|
4
|
+
import { ImportSpecifier } from "powerlines/types/babel";
|
|
5
5
|
|
|
6
6
|
//#region src/helpers/module-helpers.d.ts
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BabelTransformPluginOptions, ResolvedBabelTransformPluginOptions } from "powerlines/types/babel";
|
|
2
|
+
import { Context } from "powerlines/types/context";
|
|
3
3
|
import { PluginOptions, PluginTarget } from "@babel/core";
|
|
4
4
|
|
|
5
5
|
//#region src/helpers/options.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Context } from "../powerlines/src/types/context.mjs";
|
|
2
|
-
import { BabelTransformPluginOptions, ResolvedBabelTransformPluginOptions } from "../powerlines/src/types/babel.mjs";
|
|
3
1
|
import { PluginOptions, PluginTarget } from "@babel/core";
|
|
2
|
+
import { BabelTransformPluginOptions, ResolvedBabelTransformPluginOptions } from "powerlines/types/babel";
|
|
3
|
+
import { Context } from "powerlines/types/context";
|
|
4
4
|
|
|
5
5
|
//#region src/helpers/options.d.ts
|
|
6
6
|
declare function resolvePluginFunction(context: Context, plugin: any | PluginTarget | any[] | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined]): BabelTransformPluginOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { GenerateFromAstOptions, GeneratorResult, __ΩGenerateFromAstOptions, generateFromAst, parseAst } from "./helpers/ast-utils.cjs";
|
|
2
|
-
import { Plugin } from "./powerlines/src/types/plugin.cjs";
|
|
3
2
|
import { createBabelPlugin } from "./helpers/create-plugin.cjs";
|
|
4
3
|
import { addPluginFilter, filterPluginByFileId, getPluginName, isDuplicatePlugin } from "./helpers/filters.cjs";
|
|
5
4
|
import { addImport, addImportsToProgram, findExport, getImport, isImportCall, listExports, listImports } from "./helpers/module-helpers.cjs";
|
|
6
5
|
import { resolveBabelPlugin, resolvePluginFunction } from "./helpers/options.cjs";
|
|
6
|
+
import "./helpers/index.cjs";
|
|
7
7
|
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig, __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig } from "./types/plugin.cjs";
|
|
8
|
+
import "./types/index.cjs";
|
|
9
|
+
import { Plugin } from "powerlines/types/plugin";
|
|
8
10
|
|
|
9
11
|
//#region src/index.d.ts
|
|
10
|
-
|
|
11
12
|
/**
|
|
12
13
|
* Babel plugin for Powerlines.
|
|
13
14
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { GenerateFromAstOptions, GeneratorResult, __ΩGenerateFromAstOptions, generateFromAst, parseAst } from "./helpers/ast-utils.mjs";
|
|
2
|
-
import { Plugin } from "./powerlines/src/types/plugin.mjs";
|
|
3
2
|
import { createBabelPlugin } from "./helpers/create-plugin.mjs";
|
|
4
3
|
import { addPluginFilter, filterPluginByFileId, getPluginName, isDuplicatePlugin } from "./helpers/filters.mjs";
|
|
5
4
|
import { addImport, addImportsToProgram, findExport, getImport, isImportCall, listExports, listImports } from "./helpers/module-helpers.mjs";
|
|
@@ -7,6 +6,7 @@ import { resolveBabelPlugin, resolvePluginFunction } from "./helpers/options.mjs
|
|
|
7
6
|
import "./helpers/index.mjs";
|
|
8
7
|
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig, __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig } from "./types/plugin.mjs";
|
|
9
8
|
import "./types/index.mjs";
|
|
9
|
+
import { Plugin } from "powerlines/types/plugin";
|
|
10
10
|
|
|
11
11
|
//#region src/index.d.ts
|
|
12
12
|
/**
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { PluginContext } from "powerlines/types/context";
|
|
2
|
+
import { BabelUserConfig, UserConfig } from "powerlines/types/config";
|
|
3
|
+
import { BabelResolvedConfig, ResolvedConfig } from "powerlines/types/resolved";
|
|
4
4
|
|
|
5
5
|
//#region src/types/plugin.d.ts
|
|
6
6
|
type BabelPluginOptions = Partial<BabelUserConfig>;
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { PluginContext } from "powerlines/types/context";
|
|
2
|
+
import { BabelUserConfig, UserConfig } from "powerlines/types/config";
|
|
3
|
+
import { BabelResolvedConfig, ResolvedConfig } from "powerlines/types/resolved";
|
|
4
4
|
|
|
5
5
|
//#region src/types/plugin.d.ts
|
|
6
6
|
type BabelPluginOptions = Partial<BabelUserConfig>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-babel",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.243",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -41,40 +41,161 @@
|
|
|
41
41
|
"main": "./dist/index.cjs",
|
|
42
42
|
"module": "./dist/index.mjs",
|
|
43
43
|
"exports": {
|
|
44
|
-
".": {
|
|
44
|
+
".": {
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./dist/index.d.cts",
|
|
47
|
+
"default": "./dist/index.cjs"
|
|
48
|
+
},
|
|
49
|
+
"import": {
|
|
50
|
+
"types": "./dist/index.d.mts",
|
|
51
|
+
"default": "./dist/index.mjs"
|
|
52
|
+
},
|
|
53
|
+
"default": {
|
|
54
|
+
"types": "./dist/index.d.mts",
|
|
55
|
+
"default": "./dist/index.mjs"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
45
58
|
"./helpers": {
|
|
46
|
-
"require":
|
|
47
|
-
|
|
59
|
+
"require": {
|
|
60
|
+
"types": "./dist/helpers/index.d.cts",
|
|
61
|
+
"default": "./dist/helpers/index.cjs"
|
|
62
|
+
},
|
|
63
|
+
"import": {
|
|
64
|
+
"types": "./dist/helpers/index.d.mts",
|
|
65
|
+
"default": "./dist/helpers/index.mjs"
|
|
66
|
+
},
|
|
67
|
+
"default": {
|
|
68
|
+
"types": "./dist/helpers/index.d.mts",
|
|
69
|
+
"default": "./dist/helpers/index.mjs"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"./helpers/*": {
|
|
73
|
+
"require": {
|
|
74
|
+
"types": "./dist/helpers/*.d.cts",
|
|
75
|
+
"default": "./dist/helpers/*.cjs"
|
|
76
|
+
},
|
|
77
|
+
"import": {
|
|
78
|
+
"types": "./dist/helpers/*.d.mts",
|
|
79
|
+
"default": "./dist/helpers/*.mjs"
|
|
80
|
+
},
|
|
81
|
+
"default": {
|
|
82
|
+
"types": "./dist/helpers/*.d.mts",
|
|
83
|
+
"default": "./dist/helpers/*.mjs"
|
|
84
|
+
}
|
|
48
85
|
},
|
|
49
86
|
"./helpers/ast-utils": {
|
|
50
|
-
"require":
|
|
51
|
-
|
|
87
|
+
"require": {
|
|
88
|
+
"types": "./dist/helpers/ast-utils.d.cts",
|
|
89
|
+
"default": "./dist/helpers/ast-utils.cjs"
|
|
90
|
+
},
|
|
91
|
+
"import": {
|
|
92
|
+
"types": "./dist/helpers/ast-utils.d.mts",
|
|
93
|
+
"default": "./dist/helpers/ast-utils.mjs"
|
|
94
|
+
},
|
|
95
|
+
"default": {
|
|
96
|
+
"types": "./dist/helpers/ast-utils.d.mts",
|
|
97
|
+
"default": "./dist/helpers/ast-utils.mjs"
|
|
98
|
+
}
|
|
52
99
|
},
|
|
53
100
|
"./helpers/create-plugin": {
|
|
54
|
-
"require":
|
|
55
|
-
|
|
101
|
+
"require": {
|
|
102
|
+
"types": "./dist/helpers/create-plugin.d.cts",
|
|
103
|
+
"default": "./dist/helpers/create-plugin.cjs"
|
|
104
|
+
},
|
|
105
|
+
"import": {
|
|
106
|
+
"types": "./dist/helpers/create-plugin.d.mts",
|
|
107
|
+
"default": "./dist/helpers/create-plugin.mjs"
|
|
108
|
+
},
|
|
109
|
+
"default": {
|
|
110
|
+
"types": "./dist/helpers/create-plugin.d.mts",
|
|
111
|
+
"default": "./dist/helpers/create-plugin.mjs"
|
|
112
|
+
}
|
|
56
113
|
},
|
|
57
114
|
"./helpers/filters": {
|
|
58
|
-
"require":
|
|
59
|
-
|
|
115
|
+
"require": {
|
|
116
|
+
"types": "./dist/helpers/filters.d.cts",
|
|
117
|
+
"default": "./dist/helpers/filters.cjs"
|
|
118
|
+
},
|
|
119
|
+
"import": {
|
|
120
|
+
"types": "./dist/helpers/filters.d.mts",
|
|
121
|
+
"default": "./dist/helpers/filters.mjs"
|
|
122
|
+
},
|
|
123
|
+
"default": {
|
|
124
|
+
"types": "./dist/helpers/filters.d.mts",
|
|
125
|
+
"default": "./dist/helpers/filters.mjs"
|
|
126
|
+
}
|
|
60
127
|
},
|
|
61
128
|
"./helpers/module-helpers": {
|
|
62
|
-
"require":
|
|
63
|
-
|
|
129
|
+
"require": {
|
|
130
|
+
"types": "./dist/helpers/module-helpers.d.cts",
|
|
131
|
+
"default": "./dist/helpers/module-helpers.cjs"
|
|
132
|
+
},
|
|
133
|
+
"import": {
|
|
134
|
+
"types": "./dist/helpers/module-helpers.d.mts",
|
|
135
|
+
"default": "./dist/helpers/module-helpers.mjs"
|
|
136
|
+
},
|
|
137
|
+
"default": {
|
|
138
|
+
"types": "./dist/helpers/module-helpers.d.mts",
|
|
139
|
+
"default": "./dist/helpers/module-helpers.mjs"
|
|
140
|
+
}
|
|
64
141
|
},
|
|
65
142
|
"./helpers/options": {
|
|
66
|
-
"require":
|
|
67
|
-
|
|
143
|
+
"require": {
|
|
144
|
+
"types": "./dist/helpers/options.d.cts",
|
|
145
|
+
"default": "./dist/helpers/options.cjs"
|
|
146
|
+
},
|
|
147
|
+
"import": {
|
|
148
|
+
"types": "./dist/helpers/options.d.mts",
|
|
149
|
+
"default": "./dist/helpers/options.mjs"
|
|
150
|
+
},
|
|
151
|
+
"default": {
|
|
152
|
+
"types": "./dist/helpers/options.d.mts",
|
|
153
|
+
"default": "./dist/helpers/options.mjs"
|
|
154
|
+
}
|
|
68
155
|
},
|
|
156
|
+
"./package.json": "./package.json",
|
|
69
157
|
"./types": {
|
|
70
|
-
"require":
|
|
71
|
-
|
|
158
|
+
"require": {
|
|
159
|
+
"types": "./dist/types/index.d.cts",
|
|
160
|
+
"default": "./dist/types/index.cjs"
|
|
161
|
+
},
|
|
162
|
+
"import": {
|
|
163
|
+
"types": "./dist/types/index.d.mts",
|
|
164
|
+
"default": "./dist/types/index.mjs"
|
|
165
|
+
},
|
|
166
|
+
"default": {
|
|
167
|
+
"types": "./dist/types/index.d.mts",
|
|
168
|
+
"default": "./dist/types/index.mjs"
|
|
169
|
+
}
|
|
72
170
|
},
|
|
73
|
-
"./types
|
|
74
|
-
"require":
|
|
75
|
-
|
|
171
|
+
"./types/*": {
|
|
172
|
+
"require": {
|
|
173
|
+
"types": "./dist/types/*.d.cts",
|
|
174
|
+
"default": "./dist/types/*.cjs"
|
|
175
|
+
},
|
|
176
|
+
"import": {
|
|
177
|
+
"types": "./dist/types/*.d.mts",
|
|
178
|
+
"default": "./dist/types/*.mjs"
|
|
179
|
+
},
|
|
180
|
+
"default": {
|
|
181
|
+
"types": "./dist/types/*.d.mts",
|
|
182
|
+
"default": "./dist/types/*.mjs"
|
|
183
|
+
}
|
|
76
184
|
},
|
|
77
|
-
"./
|
|
185
|
+
"./types/plugin": {
|
|
186
|
+
"require": {
|
|
187
|
+
"types": "./dist/types/plugin.d.cts",
|
|
188
|
+
"default": "./dist/types/plugin.cjs"
|
|
189
|
+
},
|
|
190
|
+
"import": {
|
|
191
|
+
"types": "./dist/types/plugin.d.mts",
|
|
192
|
+
"default": "./dist/types/plugin.mjs"
|
|
193
|
+
},
|
|
194
|
+
"default": {
|
|
195
|
+
"types": "./dist/types/plugin.d.mts",
|
|
196
|
+
"default": "./dist/types/plugin.mjs"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
78
199
|
},
|
|
79
200
|
"types": "./dist/index.d.cts",
|
|
80
201
|
"typings": "dist/index.d.mts",
|
|
@@ -92,17 +213,17 @@
|
|
|
92
213
|
"@babel/plugin-syntax-typescript": "^7.28.6",
|
|
93
214
|
"@babel/types": "^7.28.6",
|
|
94
215
|
"@storm-software/config-tools": "^1.189.0",
|
|
95
|
-
"@stryke/fs": "^0.33.
|
|
96
|
-
"@stryke/path": "^0.26.
|
|
216
|
+
"@stryke/fs": "^0.33.39",
|
|
217
|
+
"@stryke/path": "^0.26.3",
|
|
97
218
|
"@stryke/type-checks": "^0.5.22",
|
|
98
219
|
"@stryke/types": "^0.10.36",
|
|
99
220
|
"chalk": "5.6.2",
|
|
100
221
|
"defu": "^6.1.4",
|
|
101
222
|
"jiti": "^2.6.1",
|
|
102
|
-
"powerlines": "^0.38.
|
|
223
|
+
"powerlines": "^0.38.1"
|
|
103
224
|
},
|
|
104
225
|
"devDependencies": {
|
|
105
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
226
|
+
"@powerlines/plugin-plugin": "^0.12.185",
|
|
106
227
|
"@types/node": "^24.10.9"
|
|
107
228
|
},
|
|
108
229
|
"publishConfig": {
|
|
@@ -144,5 +265,5 @@
|
|
|
144
265
|
"./package.json": "./package.json"
|
|
145
266
|
}
|
|
146
267
|
},
|
|
147
|
-
"gitHead": "
|
|
268
|
+
"gitHead": "2a4d9ef63cc29e4551fa9f680ea63874c7f48d2d"
|
|
148
269
|
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SelectHooksOptions } from "../../types/context.cjs";
|
|
2
|
-
import { MaybePromise } from "@stryke/types/base";
|
|
3
|
-
|
|
4
|
-
//#region ../powerlines/src/internal/helpers/hooks.d.ts
|
|
5
|
-
type CallHookOptions = SelectHooksOptions & (({
|
|
6
|
-
/**
|
|
7
|
-
* Whether to call the hooks sequentially or in parallel.
|
|
8
|
-
*
|
|
9
|
-
* @defaultValue true
|
|
10
|
-
*/
|
|
11
|
-
sequential?: true;
|
|
12
|
-
} & ({
|
|
13
|
-
/**
|
|
14
|
-
* How to handle multiple return values from hooks.
|
|
15
|
-
* - "merge": Merge all non-undefined return values (if they are objects).
|
|
16
|
-
* - "first": Return the first non-undefined value.
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
* Merging only works if the return values are objects.
|
|
20
|
-
*
|
|
21
|
-
* @defaultValue "merge"
|
|
22
|
-
*/
|
|
23
|
-
result: "first";
|
|
24
|
-
} | {
|
|
25
|
-
/**
|
|
26
|
-
* How to handle multiple return values from hooks.
|
|
27
|
-
* - "merge": Merge all non-undefined return values (if they are objects).
|
|
28
|
-
* - "first": Return the first non-undefined value.
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* Merging only works if the return values are objects.
|
|
32
|
-
*
|
|
33
|
-
* @defaultValue "merge"
|
|
34
|
-
*/
|
|
35
|
-
result?: "merge" | "last";
|
|
36
|
-
/**
|
|
37
|
-
* An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter
|
|
38
|
-
*/
|
|
39
|
-
asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
|
|
40
|
-
})) | {
|
|
41
|
-
/**
|
|
42
|
-
* Whether to call the hooks sequentially or in parallel.
|
|
43
|
-
*/
|
|
44
|
-
sequential: false;
|
|
45
|
-
});
|
|
46
|
-
//#endregion
|
|
47
|
-
export { CallHookOptions };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import "../../types/resolved.mjs";
|
|
2
|
-
import "../../types/hooks.mjs";
|
|
3
|
-
import { SelectHooksOptions } from "../../types/context.mjs";
|
|
4
|
-
import { MaybePromise } from "@stryke/types/base";
|
|
5
|
-
|
|
6
|
-
//#region ../powerlines/src/internal/helpers/hooks.d.ts
|
|
7
|
-
type CallHookOptions = SelectHooksOptions & (({
|
|
8
|
-
/**
|
|
9
|
-
* Whether to call the hooks sequentially or in parallel.
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue true
|
|
12
|
-
*/
|
|
13
|
-
sequential?: true;
|
|
14
|
-
} & ({
|
|
15
|
-
/**
|
|
16
|
-
* How to handle multiple return values from hooks.
|
|
17
|
-
* - "merge": Merge all non-undefined return values (if they are objects).
|
|
18
|
-
* - "first": Return the first non-undefined value.
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* Merging only works if the return values are objects.
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue "merge"
|
|
24
|
-
*/
|
|
25
|
-
result: "first";
|
|
26
|
-
} | {
|
|
27
|
-
/**
|
|
28
|
-
* How to handle multiple return values from hooks.
|
|
29
|
-
* - "merge": Merge all non-undefined return values (if they are objects).
|
|
30
|
-
* - "first": Return the first non-undefined value.
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Merging only works if the return values are objects.
|
|
34
|
-
*
|
|
35
|
-
* @defaultValue "merge"
|
|
36
|
-
*/
|
|
37
|
-
result?: "merge" | "last";
|
|
38
|
-
/**
|
|
39
|
-
* An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter
|
|
40
|
-
*/
|
|
41
|
-
asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
|
|
42
|
-
})) | {
|
|
43
|
-
/**
|
|
44
|
-
* Whether to call the hooks sequentially or in parallel.
|
|
45
|
-
*/
|
|
46
|
-
sequential: false;
|
|
47
|
-
});
|
|
48
|
-
//#endregion
|
|
49
|
-
export { CallHookOptions };
|
|
@@ -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
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
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 chalk from "chalk";
|
|
2
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
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 };
|