@powerlines/plugin-babel 0.12.303 → 0.12.304
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 -0
- package/dist/core/src/lib/logger.cjs +41 -0
- package/dist/core/src/types/api.d.cts +103 -0
- package/dist/core/src/types/api.d.cts.map +1 -0
- package/dist/core/src/types/commands.d.cts +9 -0
- package/dist/core/src/types/commands.d.cts.map +1 -0
- package/dist/core/src/types/config.d.cts +551 -0
- package/dist/core/src/types/config.d.cts.map +1 -0
- package/dist/core/src/types/context.d.cts +511 -0
- package/dist/core/src/types/context.d.cts.map +1 -0
- package/dist/core/src/types/fs.d.cts +487 -0
- package/dist/core/src/types/fs.d.cts.map +1 -0
- package/dist/core/src/types/hooks.d.cts +99 -0
- package/dist/core/src/types/hooks.d.cts.map +1 -0
- package/dist/core/src/types/plugin.d.cts +204 -0
- package/dist/core/src/types/plugin.d.cts.map +1 -0
- package/dist/core/src/types/tsconfig.d.cts +70 -0
- package/dist/core/src/types/tsconfig.d.cts.map +1 -0
- package/dist/core/src/types/unplugin.d.cts +24 -0
- package/dist/core/src/types/unplugin.d.cts.map +1 -0
- package/dist/helpers/ast-utils.cjs +35 -0
- package/dist/helpers/ast-utils.d.cts +20 -0
- package/dist/helpers/ast-utils.d.cts.map +1 -0
- package/dist/helpers/create-plugin.cjs +41 -0
- package/dist/helpers/create-plugin.d.cts +16 -0
- package/dist/helpers/create-plugin.d.cts.map +1 -0
- package/dist/helpers/filters.cjs +59 -0
- package/dist/helpers/filters.d.cts +43 -0
- package/dist/helpers/filters.d.cts.map +1 -0
- package/dist/helpers/index.cjs +22 -0
- package/dist/helpers/index.d.cts +6 -0
- package/dist/helpers/module-helpers.cjs +103 -0
- package/dist/helpers/module-helpers.d.cts +50 -0
- package/dist/helpers/module-helpers.d.cts.map +1 -0
- package/dist/helpers/options.cjs +49 -0
- package/dist/helpers/options.d.cts +19 -0
- package/dist/helpers/options.d.cts.map +1 -0
- package/dist/index.cjs +104 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/types/config.cjs +0 -0
- package/dist/types/config.d.cts +87 -0
- package/dist/types/config.d.cts.map +1 -0
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +3 -0
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +20 -0
- package/dist/types/plugin.d.cts.map +1 -0
- package/package.json +41 -14
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,41 @@
|
|
|
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;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { CallHookOptions, InferHookParameters, InferHookReturnType } from "./hooks.cjs";
|
|
2
|
+
import { APIContext, EnvironmentContext, PluginContext } from "./context.cjs";
|
|
3
|
+
import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig, ResolvedConfig } from "./config.cjs";
|
|
4
|
+
|
|
5
|
+
//#region ../core/src/types/api.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Powerlines API Interface
|
|
9
|
+
*/
|
|
10
|
+
interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
11
|
+
/**
|
|
12
|
+
* The Powerlines shared API context
|
|
13
|
+
*/
|
|
14
|
+
context: APIContext<TResolvedConfig>;
|
|
15
|
+
/**
|
|
16
|
+
* Prepare the Powerlines API
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* This method will prepare the Powerlines API for use, initializing any necessary resources.
|
|
20
|
+
*
|
|
21
|
+
* @param inlineConfig - The inline configuration for the prepare command
|
|
22
|
+
*/
|
|
23
|
+
prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Create a new Powerlines project
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This method will create a new Powerlines project in the current directory.
|
|
29
|
+
*
|
|
30
|
+
* @param inlineConfig - The inline configuration for the new command
|
|
31
|
+
* @returns A promise that resolves when the project has been created
|
|
32
|
+
*/
|
|
33
|
+
new: (inlineConfig: NewInlineConfig) => Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Clean any previously prepared artifacts
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* This method will remove the previous Powerlines artifacts from the project.
|
|
39
|
+
*
|
|
40
|
+
* @param inlineConfig - The inline configuration for the clean command
|
|
41
|
+
* @returns A promise that resolves when the clean command has completed
|
|
42
|
+
*/
|
|
43
|
+
clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Lint the project source code
|
|
46
|
+
*
|
|
47
|
+
* @param inlineConfig - The inline configuration for the lint command
|
|
48
|
+
* @returns A promise that resolves when the lint command has completed
|
|
49
|
+
*/
|
|
50
|
+
lint: (inlineConfig: LintInlineConfig) => Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Build the project
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* This method will build the Powerlines project, generating the necessary artifacts.
|
|
56
|
+
*
|
|
57
|
+
* @param inlineConfig - The inline configuration for the build command
|
|
58
|
+
* @returns A promise that resolves when the build command has completed
|
|
59
|
+
*/
|
|
60
|
+
build: (inlineConfig: BuildInlineConfig) => Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Prepare the documentation for the project
|
|
63
|
+
*
|
|
64
|
+
* @param inlineConfig - The inline configuration for the docs command
|
|
65
|
+
* @returns A promise that resolves when the documentation generation has completed
|
|
66
|
+
*/
|
|
67
|
+
docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Deploy the project source code
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
|
|
73
|
+
*
|
|
74
|
+
* @param inlineConfig - The inline configuration for the deploy command
|
|
75
|
+
*/
|
|
76
|
+
deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Finalization process
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
|
|
82
|
+
*
|
|
83
|
+
* @returns A promise that resolves when the finalization process has completed
|
|
84
|
+
*/
|
|
85
|
+
finalize: () => Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Invokes the configured plugin hooks
|
|
88
|
+
*
|
|
89
|
+
* @remarks
|
|
90
|
+
* By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
|
|
91
|
+
*
|
|
92
|
+
* @param hook - The hook to call
|
|
93
|
+
* @param options - The options to provide to the hook
|
|
94
|
+
* @param args - The arguments to pass to the hook
|
|
95
|
+
* @returns The result of the hook call
|
|
96
|
+
*/
|
|
97
|
+
callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
|
|
98
|
+
environment?: string | EnvironmentContext<TResolvedConfig>;
|
|
99
|
+
}, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { API };
|
|
103
|
+
//# sourceMappingURL=api.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.cts","names":[],"sources":["../../../../../core/src/types/api.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAsCA;AAA6C,UAA5B,GAA4B,CAAA,wBAAA,cAAA,GAAiB,cAAjB,CAAA,CAAA;EAAiB;;;EAgBtD,OAAA,EAZG,UAYH,CAZc,eAYd,CAAA;EACA;;;;;;;;EAiBkC,OAAA,EAAA,CAAA,YAAA,EAlBlC,mBAkBkC,GAjBlC,eAiBkC,GAhBlC,iBAgBkC,GAflC,iBAekC,GAdlC,gBAckC,GAblC,gBAakC,GAZlC,kBAYkC,EAAA,GAXnC,OAWmC,CAAA,IAAA,CAAA;EAYxB;;;;;;;;;EAsCO,GAAA,EAAA,CAAA,YAAA,EAlDH,eAkDG,EAAA,GAlDiB,OAkDjB,CAAA,IAAA,CAAA;EAAuB;;;;;;;;;EA4BnC,KAAA,EAAA,CAAA,YAAA,EAlEK,iBAkEL,GAlEyB,mBAkEzB,EAAA,GAjEN,OAiEM,CAAA,IAAA,CAAA;EAEyB;;;;;;uBA3Df,qBAAqB;;;;;;;;;;wBAWpB,sBAAsB;;;;;;;uBAQvB,qBAAqB;;;;;;;;;yBAUnB,uBAAuB;;;;;;;;;kBAU9B;;;;;;;;;;;;wCAcR,eACG;2BACgB,mBAAmB;cAEnC,oBAAoB,cAAc,kBAAkB,UAC1D,QACH,oBAAoB,cAAc,kBAAkB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MaybePromise } from "@stryke/types/base";
|
|
2
|
+
import { ArrayValues } from "@stryke/types/array";
|
|
3
|
+
|
|
4
|
+
//#region ../core/src/types/commands.d.ts
|
|
5
|
+
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
6
|
+
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { CommandType };
|
|
9
|
+
//# sourceMappingURL=commands.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.cts","names":[],"sources":["../../../../../core/src/types/commands.ts"],"sourcesContent":[],"mappings":";;;;cAsBa;AAAA,KAYD,WAAA,GAAc,WAFhB,CAAA,OAEmC,kBAFnC,CAAA"}
|